1. Introduction
Automatic signal detection and modulation recognition underpin many commercial, scientific, and defense applications, ranging from adaptive and cognitive radios to spectrum monitoring and electronic support [
1,
2]. In commercial wireless systems, modulation awareness can support adaptive links that change modulation and coding in response to channel conditions, spectrum access policies, and multi-user interference [
3]. In public safety, industrial IoT, and satellite systems, fast recognition of the waveform in an occupied channel can provide situational awareness and facilitate coexistence in congested spectrum [
4,
5]. In defense and spectrum-surveillance settings, rapid detection of specific emitters enables downstream tasks such as interception, localization, jamming, and prioritization of operator attention [
6]. These tasks are often time-critical in dynamic environments where an adversary may rapidly change waveform parameters or hop frequencies. The safety and security of radio frequency (RF) signals have garnered increasing attention, particularly in the context of adversarial environments and intelligent wireless systems. Emerging techniques such as distributed time-modulated arrays and intelligent reflecting surface (IRS)-assisted beamforming have been proposed to enhance physical-layer security and mitigate unauthorized interception. These approaches highlight the growing need for robust and adaptive signal detection frameworks capable of operating under realistic RF conditions and potential security threats [
7,
8].
To better position this work within the AMC literature, it is important to distinguish between classical and deep learning approaches and their limitations. Classical AMC methods rely on expert-designed features such as higher-order statistics and cyclostationary properties, followed by conventional classifiers. While effective in controlled settings, these approaches require significant domain knowledge and often degrade under realistic RF impairments.
More recently, deep learning approaches—including convolutional neural networks (CNNs), recurrent neural networks (RNNs), and transformer-based models—have demonstrated strong performance by learning directly from raw IQ data. However, most prior work focuses on multi-class classification in idealized conditions, typically assuming single-modulation, baseband-centered signals (e.g., RadioML datasets). These assumptions do not reflect operational environments, where frequency offsets, sampling mismatches, and multi-signal interference are common.
This creates a gap between benchmark-driven AMC research and real-world deployment. In particular, limited attention has been given to task formulations that focus on detecting a specific signal of interest under realistic RF impairments. This work addresses this gap by combining a binary detection framework with explicitly modeled real-world signal conditions.
Classical automatic modulation classification (AMC) relies on expert-designed features extracted from the waveform or its statistics (e.g., higher-order moments and cyclic/cyclostationary features), followed by decision rules or conventional classifiers [
9]. While many recent RFML models operate directly on raw IQ samples [
10], alternative approaches rely on extracted representations such as constellation or eye diagrams [
11,
12].
Convolutional and recurrent architectures are widely used in this setting [
13,
14,
15,
16,
17,
18,
19,
20,
21]. Ensemble learning approaches combine multiple weak or moderately performing learners to form a stronger composite network. In RF modulation recognition, such ensembles can improve robustness to noise and channel impairments by aggregating complementary decision boundaries learned by individual models [
22,
23]. Transformer models have emerged as a strong alternative for modulation analysis [
24,
25]. Transformers are attractive because self-attention can represent global relationships across an observation window and can emphasize salient waveform regions without being restricted to a local receptive field [
26]. This property is particularly relevant for digitally modulated signals whose discriminative structure can span multiple symbol intervals.
Despite strong benchmark results, two gaps commonly arise when transitioning from benchmark-driven RFML to operational deployment. The first gap is
data realism. Public benchmarks (including the RadioML family) typically provide short, single-modulation recordings centered at baseband and sampled at a nominal rate with labels provided per recording [
27,
28]. Field recordings often violate these assumptions. Center-frequency offsets and Doppler introduce linear phase ramps; sampling-rate mismatch (and any subsequent resampling) distorts time-domain structure [
29]; and wideband sensing frequently yields mixtures where multiple transmissions co-occur within the same window [
2]. Such co-occurrence may be spectral (simultaneous transmissions in adjacent or overlapping bands) or temporal (bursts of different modulations concatenated within a fixed-length capture). Models trained exclusively on idealized baseband single-signal examples can therefore fail unexpectedly when confronted with realistic RF complications.
The second gap is task mismatch. Many RFML studies train a single multi-class model over all available modulations because it is convenient for benchmarking. In practical monitoring systems, however, an operator is often interested in detecting only a small set of signals of interest (SOIs) within a particular band or mission context. Training and deploying a large multi-class model can be unnecessarily expensive, and it can increase false-alarm risk due to label confusion among non-essential classes. A practical alternative is a bank of lightweight binary detectors, one per SOI, each solving a simpler decision problem (SOI versus background). Such detectors can be tailored to the modulations that plausibly co-occur in the target band, can run in parallel across bands and hardware resources, and can be extended incrementally by adding new detectors without retraining an entire multi-class system.
This paper investigates this targeted workflow using transformer-based
binary detectors and explicitly evaluates robustness under RF impairments that challenge common AMC assumptions. Using the RadioML 2018.01A dataset, we formulate binary detection tasks with BPSK as the SOI and introduce three increasingly realistic conditions: (i) center-frequency shifts away from baseband via frequency mixing, (ii) sampling-rate mismatch through decimation and interpolation, and (iii) multi-signal mixtures in which modulations co-occur either in frequency (simultaneous transmissions) or in time (temporal concatenation) [
30,
31]. We also study early-exit transformer inference [
32] to reduce computation on high-confidence examples and assess transfer learning between related modulations as a potential pathway for scaling detector training [
33]. Beyond aggregate confusion-matrix metrics, we analyze false alarms and missed detections as functions of SNR to identify the operating regimes that dominate the error budget.
BPSK is selected as the signal of interest (SOI) due to its simplicity, ubiquity, and well-understood structure in digital communication systems. As one of the most fundamental modulation schemes, BPSK provides a clean and interpretable baseline for studying detector behavior under controlled conditions. Its constant-envelope, binary phase structure allows the effects of RF impairments—such as frequency offsets, sampling mismatches, and multi-signal interference—to be isolated without additional complexity introduced by higher-order constellations. Moreover, while many AMC studies directly train on benchmark datasets under idealized assumptions, the experimental conditions considered here (e.g., mixed-frequency shifts and multi-signal superposition) are less commonly explored. Beginning with a simple and widely used modulation enables a focused investigation of these effects. Although the results may not directly generalize to all modulation types, the intent is to first establish and validate the proposed framework in a controlled setting, which can then be systematically extended to more complex modulations in future work. Such extensions may require frequency-aware or modulation-aware architectures, incorporation of auxiliary metadata, or specialized feature representations.
Additionally, even within BPSK, variations such as differing symbol (baud) rates introduce further complexity that is not explicitly modeled in this study, highlighting an additional limitation and direction for future investigation. Finally, while additional modulation classes could be incorporated, a small increase in class diversity would still be insufficient to support broad generalization, reinforcing the need for a more systematic expansion of the experimental space in future work.
The main contributions of this study are: (a) A binary transformer detection formulation for AMC that targets a specific SOI (BPSK) against a background of other modulation types, enabling a modular “bank of detectors” deployment; (b) A controlled robustness study under practical RF complications: frequency mixing (center-frequency shifts), sampling-rate changes (decimation/interpolation), and multi-signal mixtures (frequency- and time-domain co-occurrence); (c) A time-domain perspective on why self-attention is a natural fit for IQ-based detection, including intuition for frequency-shifted and multi-signal settings; (d) An early-exit transformer inference study, showing that high-confidence (high-SNR) samples can exit early to reduce computation while preserving detection performance; (e) An evaluation of transfer learning across related modulation schemes, examining the limitations inherent in a detector-style formulation and extending the framework to intra-modulation tasks, such as adapting a baseband model from mixed-signal scenarios to multi-signal environments [
30,
33,
34].
3. Mathematical Justification for Attention on Time-Domain IQ Signals
Before employing self-attention mechanisms for RF signal detection and modulation analysis, we first consider three increasingly realistic scenarios: (i) a single baseband signal, (ii) a single signal with a center-frequency offset, and (iii) the superposition of multiple signals at distinct center frequencies.
3.1. Setup and Notation (Exact)
Remark on interpretation of equations: In this section, we distinguish between exact identities, approximations, and intuitive interpretations. Exact expressions follow directly from algebraic definitions of IQ signals and attention mechanisms. Approximate relations rely on assumptions such as limited amplitude variation, structure-preserving projections, and phase-dominant behavior. For clarity, each key equation is labeled accordingly, and the conditions under which approximations hold are stated explicitly.
Let the discrete-time complex baseband signal be
This representation is exact by definition of the complex baseband signal, where
and
.
We define a real-valued embedding
This is exact once the embedding function
is specified (e.g., linear or nonlinear projection).
3.2. Self-Attention (Exact)
Queries, keys, and values are computed as
All equations in this subsection are exact.
3.3. Step-by-Step Expansion of Attention (Exact)
For clarity, consider a 2D embedding:
Then each query component is
and similarly for keys:
Summing over
r:
where
are learned coefficients. This expression is exact and does not assume any constraints on signal amplitude or phase.
3.4. Connection to Complex Correlation (Exact Identity)
Consider the complex product
This identity is exact.
3.5. Approximation to Phase Similarity (Approximate)
If the learned projections approximately satisfy the following structural assumptions:
symmetric weighting of I/Q terms,
suppression of cross terms ,
then the attention score can be approximated as
for some learned scalar
.
Using the exact identity above,
If additionally
(unit or slowly varying envelope),
This approximation holds when amplitude variation is limited and learned projections align with the real part of the complex inner product.
3.6. Frequency Offset Case (Exact + Approximate)
Let the observed signal be
This is exact.
If the same projection assumptions as above hold, then
This approximation assumes:
3.7. Interpretation (Intuitive)
The attention mechanism computes weighted interactions between all time pairs , where the weights depend on learned mixtures of cross-products. Under mild conditions, this reduces to measuring phase coherence across time, modulated by relative time differences in the presence of frequency offsets.
Thus, self-attention behaves as a learned, data-driven generalization of complex correlation, enabling robustness to frequency translation while operating directly on time-domain IQ samples.
3.8. Multi-Signal Superposition at Distinct Center Frequencies
Finally, consider a realistic scenario in which two signals coexist within the same observation window:
where
.
Each component can be written in amplitude-phase form:
The complex correlation between samples
n and
m is:
The first summation corresponds to within-signal terms, while the second corresponds to cross terms between distinct signals.
The cross terms contain oscillatory factors:
which vary rapidly when
.
(Approximation) When the frequency separation is sufficiently large, these oscillatory cross terms average out (decorrelate) across
and are suppressed after softmax normalization. Under this condition,
Consequently, the attention weights decompose approximately into signal-specific components:
This approximation holds when frequency separation is sufficient to decorrelate cross terms and when learned projections preserve phase-coherent structure.
Multi-head attention further reinforces this behavior by allowing different heads to specialize in distinct phase-coherent structures. Each head effectively acts as a learned, soft matched filter that selectively attends to one signal while suppressing interference from others, without requiring explicit frequency-domain separation.
4. Study Data Preparation
4.1. RadioML 2018.01A Dataset
RadioML 2018.01A contains 24 modulation classes with
samples per class, totaling
IQ recordings
[
31]. Each recording contains
complex samples represented by two real-valued streams (in-phase and quadrature). The dataset provides labeled SNR values ranging from
dB to 30 dB in 2 dB increments.
For reliable evaluation across SNR, the dataset is not split using a purely random shuffle. Instead, training/validation/test splits are constructed to maintain a balanced representation across all SNR values. An 80–10–10 split is used for training, validation, and testing, respectively. Due to dataset size and the number of experiments in this paper, approximately a quarter of the available data is used.
For validation and testing, there are 100 samples per SNR (26 distinct SNR values from dB to 30 dB) per class, i.e., 2600 samples per class. For the binary setting with one positive class (BPSK) and 23 negative classes, this yields 2600 positive samples and negative samples per split.
For training, there are 1000 samples per SNR (26 distinct SNR values), i.e., samples per class. In the same binary setting, this corresponds to positive samples and negative samples.
4.2. Mixed-Frequency (Center-Frequency Shifted) Data
To model recordings where the SOI is not centered at baseband, each IQ sample is frequency shifted by multiplying it by a complex exponential. Given a discrete-time complex signal
, a frequency shift of
(Hz) is:
where
is the sampling frequency. If the offset is expressed in normalized form,
The dataset does not provide explicitly; therefore, the experiments use a normalized relative frequency offset parameter , uniformly sampled in the range .
4.3. Multi-Signal Mixture Data
Operational RF captures frequently contain multiple simultaneous transmissions within the same observation window. To emulate this complexity, we generate two-signal mixtures by adding a discriminator modulation to the anchor signal.
BPSK is selected as the anchor (SOI), and QPSK is used as the discriminator. Let
denote the anchor signal and
denote the inserted signal. The mixed recording is:
Equivalently, in terms of the I/Q components:
For interpretability, mixtures are generated by combining signals at the same nominal SNR value.
QPSK is selected as the interfering (discriminator) signal due to its structural similarity to BPSK and its prevalence in practical communication systems. Both modulations share constant-envelope properties and phase-based encoding, with QPSK effectively extending BPSK by introducing additional phase states. This makes QPSK a challenging and realistic interferer, as its superposition with BPSK can produce composite signal characteristics that are difficult to distinguish. By choosing QPSK, the experiment intentionally evaluates the detector under a hard discrimination scenario, where interference arises from a modulation with closely related statistical and spectral properties rather than from a fundamentally different signal type.
While many alternative modulation types (e.g., higher-order PSK such as 8PSK, or analog schemes such as FM) could also be used to construct interference scenarios, this study intentionally narrows its scope to a representative and controlled case. The goal is not to exhaustively evaluate all possible modulation pairings—which would be combinatorially large—but to isolate the effect of structured, realistic interference under well-understood conditions. Higher-order PSK introduces additional phase states that increase constellation complexity, while analog modulations such as FM differ fundamentally in their signal characteristics, potentially confounding the interpretation of results. By focusing on BPSK–QPSK interactions, the study captures a meaningful and challenging interference case while maintaining experimental clarity and reproducibility. This controlled setup provides a foundation that can be systematically extended to more diverse modulation combinations in future work.
4.4. Time-Domain Contamination Data
To isolate the effect of temporal (rather than spectral) interference, a separate experiment concatenates two modulations in time at baseband. BPSK is placed at the beginning of the 1024-sample window and QPSK fills the remainder. The proportion of the window occupied by BPSK is swept in 10% increments to study how detection metrics change as the SOI becomes more or less visible.
5. Research Methodology
5.1. Binary Detection Formulation
Each input is a time sequence with samples and two channels (I and Q). The primary task is formulated as a binary detection problem with BPSK as the positive class () and all remaining modulations as negatives (), unless otherwise specified for multi-signal experiments.
The data is then passed into a binary transformer detector which produces a scalar logit output . The probability is obtained using the sigmoid function .
5.2. Loss Function and Optimization
Because the dataset is strongly imbalanced (one positive modulation versus many negatives in the first two experiments, and multiple positive mixture classes in the later experiments), training uses a weighted binary cross-entropy loss with logits (
BCEWithLogitsLoss). The loss is:
where
is a positive-class weighting term (pos_weight), which is selected via Optuna as part of the hyperparameter optimization process rather than fixed a priori. Training is performed using the Adam optimizer with mini-batch gradient descent. Each batch consists of tuples
, where
X is the I/Q sequence,
y is the binary label, and
Z is the associated SNR value. The SNR term is employed for analysis but was not used directly by the loss. The batch size was 32.
5.3. Hyperparameter Tuning with OPTUNA
Transformer training is computationally expensive, making exhaustive grid search impractical. Hyperparameters are tuned using Optuna, which prioritizes promising regions of the search space based on previous trials. The details of the parameters and their search ranges are provided in
Table 1.
Each Optuna trial samples a transformer configuration, performs a short training run, and evaluates performance on the validation set. Due to class imbalance, trials are ranked using the area under the precision–recall curve (PR-AUC). After selecting the best configuration, a final model is trained for 10 epochs. In addition to architectural parameters, Optuna is also used to tune data-related and decision parameters, including class weighting (pos_weight) and classification threshold selection (see
Section 5.4).
5.4. Data Methodology and Hyperparameter Transparency (Optuna-Controlled)
To ensure reproducibility and clarity, all key data-handling and model-selection parameters are explicitly defined and jointly optimized within a unified validation framework.
Positive class weighting (pos_weight): Due to strong class imbalance (one positive modulation versus multiple negatives), the positive-class weighting term in the binary cross-entropy loss is not fixed heuristically. Instead, pos_weight is treated as a hyperparameter and optimized using Optuna. The parameter is sampled over a logarithmic range centered around the empirical class imbalance ratio (approximately 30:1), and selected based on validation performance (PR-AUC). This allows the model to balance false positives and false negatives adaptively rather than relying on a fixed theoretical ratio.
Dataset usage (subsampling rationale): The RadioML 2018.01A dataset is large, and this study evaluates multiple experimental conditions (baseband, mixed-frequency, multi-signal, resampling, and transfer learning). To maintain computational feasibility, approximately a quarter of the total dataset is used. Subsets are selected in a stratified manner to preserve class and SNR distributions, ensuring that statistical properties of the full dataset are retained.
Decision threshold selection: The classification threshold is not fixed (e.g., at 0.5). Instead, it is determined using the validation set by computing the precision–recall curve and selecting the threshold that maximizes the F1-score. This threshold is then fixed and applied to the test set, ensuring no data leakage. This procedure enables the model to operate at an optimal precision–recall trade-off, which is particularly important under class imbalance and varying SNR conditions.
Unified optimization perspective: Optuna is used to jointly optimize architectural parameters, class imbalance weighting, and decision threshold selection within a single validation-driven framework. This ensures that all reported performance metrics correspond to a consistent and reproducible configuration, rather than independently chosen design decisions.
5.5. Decision Threshold and Performance Metrics
After training, the model outputs probability scores
p on the validation set. A hard prediction
is obtained using a decision threshold
t:
Rather than using a fixed threshold (e.g., ), t is selected from the validation precision–recall curve by maximizing the F1-score. This threshold selection is integrated into the Optuna optimization loop to ensure consistency between model training and operating point selection. Final performance is evaluated using the confusion matrix metrics—true negatives (TN), false positives (FP), false negatives (FN), and true positives (TP). From these, specificity, sensitivity, precision, recall, F1-score, and balanced accuracy are computed and reported. In addition, FP and FN rates are analyzed as a function of SNR.
6. Results and Analysis
6.1. Experiment 1: Baseband Training and Evaluation
The first experiment trains and tests a BPSK detector on the original baseband dataset.
Figure 1 shows that most false negatives occur at low SNR (approximately
dB to 0 dB), where the SOI is heavily masked by noise. False positives also concentrate in this low-SNR regime.
6.1.1. Generalization to Mixed-Frequency Data
A key question is whether a detector trained only on baseband signals generalizes to signals with a nonzero center-frequency offset.
Table 2 (row “Baseband Train, Mixed Test”) shows a large degradation: FN increases to 4.16% of all samples and TP collapses to 0.01%. The sensitivity drops from 65.9% to 0.27%. In other words, a baseband-trained detector is not robust to center-frequency shifts and must be retrained (or otherwise adapted) for mixed-frequency operation.
6.1.2. Sampling-Rate Mismatch
Sampling-rate mismatch is modeled via resampling.
Table 2 shows that upsampling (
) reduces TP from 2.75% to 2.60% and increases FN from 1.42% to 1.57%. Sensitivity degrades from 65.92% at baseband to 62.32% with upsampling and to 61.72%, 58.92%, and 49.35% under downsampling by 1/3, 1/2, and 1/4. Downsampling also degrades performance, with larger penalties as the resampling ratio deviates further from 1.
6.2. Experiment 2: Mixed-Frequency Training and Robustness
Because Experiment 1 indicates poor generalization to frequency-shifted signals, Experiment 2 trains and tests the detector on mixed-frequency data. The false positive and false negative rates are shown in
Figure 2.
Compared to baseband training, mixed-frequency training slightly reduces the overall TP count (2.09% versus 2.75% in
Table 2, which is consistent with the added complexity introduced by frequency offsets).
As derived in
Section 3, the attention mechanism can learn phase relationships directly from time-domain IQ samples, enabling adaptation to non-baseband conditions. This suggests that performance can be recovered even under more complex signal scenarios. The experimental results confirm this behavior, demonstrating that the model learns the underlying structure as predicted by the formulation.
6.2.1. Sampling-Rate Mismatch in Mixed-Frequency Data
Table 2 shows a notable asymmetry for mixed-frequency resampling: upsampling (
) yields a TP of only 0.05%, whereas decimation (
) yields 1.33%. Increasing the upsampling ratio to 3 completely reduces the true positives to 0%, making the model unusable. Although ideal interpolation should preserve information content, the observed behavior suggests that resampling may introduce artifacts that are more disruptive when the signal is not centered at baseband.
6.2.2. Failure Under Two-Signal Mixtures Without Targeted Training
The mixed-frequency detector is evaluated on two-signal mixtures (BPSK+QPSK) to test robustness to co-occurring transmissions at different center frequencies.
Table 3 (class 24 under the “Mixed->Multi-Signal(2)” column) shows that none of the mixture samples are predicted as containing BPSK (P1 = 0). This indicates complete failure to detect the SOI in the presence of a simultaneous in-band interferer unless such interference is explicitly modeled during training. This introduces a new challenge in real-life spectrum with overlapping modulation types.
6.3. Experiment 3: Multi-Signal Training
Experiment 3 trains a detector directly on multi-signal data. Any sample containing a BPSK component (pure BPSK or BPSK+QPSK mixture) is labeled positive, while all other signals are labeled negative. This experiment evaluates whether explicit exposure to interference can restore detection capability. The false positive and false negative rates are shown in
Figure 3.
The multi-signal detector recovers detection on mixtures (
Table 3, class 24 under “Multi-Signal(2)”) while maintaining comparable performance on pure BPSK. However,
Table 2 also shows that multi-signal training can induce false positives on certain AM sideband classes (classes 17 and 18). This is a significant observation, as it suggests that the underlying issue may not originate from the BPSK or QPSK modulation schemes themselves, but rather from another part of the system (a different modulation that the superposition resembles).
To mitigate these confusions, an extended discriminator set is introduced by including closely related modulation types in training (
Table 3, classes 25 and 26 under “Multi-Signal”). This modification increases the number of true positives for the target signal from 50.04% in the two-signal case to 53.15%. It also reduces false positives for classes 17 and 18 from 8.88% and 9.08% to 0.04% and 0.81%, respectively.
This behavior further supports the underlying premise of this work: the detector’s performance is strongly influenced by the diversity and structure of the training data. Rather than being a limitation of the BPSK–QPSK pairing itself, the observed confusions highlight that the model learns decision boundaries based on the set of modulations it is exposed to. By expanding the discriminator set, the model is able to better allocate capacity and refine these boundaries, improving both true positive rates and false alarm control. This reinforces the idea that targeted data design, rather than simply increasing model complexity, is critical for robust detection in realistic multi-signal environments.
As shown in the formulations, the attention mechanism can separate different signal components based on their learned structure. The experimental results confirm that the model is able to distinguish between classes under multi-signal conditions.
6.4. Summary of Evaluated Scenarios
Table 2 summarizes confusion matrix values for all evaluated scenarios, including baseband versus mixed-frequency conditions, sampling-rate mismatches, early-exit inference, multi-signal training, and transfer learning.
6.5. Early-Exit Inference
Transformer inference is expensive because all encoder layers must be executed for every input. Many samples are easy to classify (especially at high SNR), motivating an early-exit strategy [
32]: intermediate classifiers are attached to early layers and inference stops once confidence exceeds a threshold.
Figure 4 illustrates early-exit behavior across SNR values.
At high SNR, approximately 80% of samples exit early, substantially reducing average computation.
Table 2 shows that early-exit inference preserves detection performance and, in some cases, slightly improves TN/TP (e.g., “Baseband Train/Test, Early Exit” and “Mixed Train/Test, Early Exit”).
As with the standard transformer, most early-exit errors are concentrated at low SNR values.
Figure 5 and
Figure 6 illustrate the false negative and false positive behavior across SNR values for the mixed-frequency and baseband scenarios, respectively.
To clarify the nature of this efficiency gain, the benefit of early-exit inference should not be interpreted as a fixed speedup, but rather as adaptive computation conditioned on signal difficulty. In the evaluated setting, a large fraction of high-SNR samples exit at early layers, indicating that the model can confidently classify these inputs without utilizing the full network depth. In contrast, lower-SNR or more complex samples continue through the entire model.
This behavior induces a dynamic allocation of computational resources: easy signals (high SNR) require fewer operations, while hard signals (low SNR) retain full computational processing. As a result, the average computational cost is reduced, even though the worst-case cost remains unchanged.
Importantly, this represents a gain in resource efficiency rather than a strict reduction in worst-case latency. The model avoids unnecessary computation on easy samples, enabling available resources to be redirected toward more challenging inputs or parallel processing tasks. This property is advantageous in real-world RF systems, where computational budgets are constrained, and signal conditions vary significantly over time.
6.6. Comparison with a 24-Class Transformer Model
For reference, a conventional 24-class transformer model is trained to predict one of the 24 modulation classes. The same approach as earlier was used, except that the problem was formulated as a 24-class output layer instead of the earlier binary class classifier. The confusion matrix of a 24-class classifier is shown in
Figure 7.
In this study, the binary detectors generally provide stronger SOI-versus-background discrimination than the 24-class model. A likely contributing factor is that the same hyperparameter scale is used, whereas multi-class classification typically requires higher-capacity models to learn separations across many classes.
Class 3 achieved a false positive rate of 14% and a false negative rate of 38%. For the binary classifier, the detection rate has a false positive rate of 0.09% and a false negative rate of 1.42%. Binary detectors are generally better suited for identifying features associated with a single class, rather than distinguishing across multiple classes, particularly when operating under the same architectural constraints. This result reflects a capacity-allocation effect: if model size is fixed, binary detectors can devote capacity exclusively to the SOI-specific discrimination, whereas multi-class models must distribute capacity across all the 24 decision boundaries.
While the approach can be generalized to other model architectures, the intent of this study is not to perform an exhaustive comparison across models, but to clearly demonstrate the underlying principle under controlled conditions.
6.7. Time-Domain Contamination Study
The previous multi-signal experiments considered simultaneous transmissions (overlap in time) at different center frequencies. This study instead examines temporal co-occurrence at baseband: the SOI (BPSK) occupies the beginning of the window and a second modulation (QPSK) occupies the remainder. By varying the fraction of the window containing BPSK, we evaluate how much uncontaminated SOI content is required for reliable detection. The true positive and false negative behavior as a function of contamination is illustrated in
Figure 8.
As expected, robustness improves as the proportion of SOI content increases. Importantly, temporal co-occurrence has a smaller impact than spectral co-occurrence: when modulations are separated in time, the SOI segment remains uncontaminated and its phase/amplitude structure is more readily detected.
6.8. Transfer Learning
Transfer learning is investigated as a means of efficiently training detectors for additional modulations. Given the structural similarity between BPSK and QPSK, a detector pretrained on BPSK might be expected to adapt to QPSK with limited retraining. If successful, this approach would reduce the need to train every modulation from scratch, enabling scalable deployment by training only a subset of representative signals and adapting them to others.
Two transfer learning strategies are evaluated: (i) partial fine-tuning of the backbone network by retraining a limited subset of layers (specifically, the final two layers) while keeping the remaining layers fixed, and (ii) retraining only the early-exit classifiers while preserving the backbone network parameters.
For the first strategy, the results indicate a substantially elevated false positive count of 81.68%, which is the highest observed across all evaluated experiments. A plausible explanation is that the model has been strongly optimized for BPSK detection; introducing QPSK as a new target while keeping early feature representations fixed may bias the network toward patterns previously associated with positive detections. Consequently, the decision boundary shifts in a manner that significantly increases false alarms across all classes. This reflects a common issue in signal classification: when two modulation schemes are superimposed, they can introduce composite features that resemble those of a third or fourth modulation type. As a result, the root cause of the misclassification may stem from signal superposition effects rather than from deficiencies in the individual modulation schemes themselves.
Partial retraining of the backbone by fine-tuning the final two layers yields a notable reduction in false positives to 23.98%. While this represents an improvement, the false positive rate remains unacceptably high relative to other evaluated configurations.
This outcome is problematic for signal detection applications, where false alarms are highly undesirable. Each false positive typically requires additional verification, increasing operational burden and reducing system efficiency. As such, the current transfer learning approaches examined here require further refinement before they can be considered viable for accelerated training of related modulations. Overall, these results highlight a key limitation: transfer learning does not generalize effectively across distinct modulation classes in this setting.
Transfer learning may still be effective when applied within the same modulation family or task domain. To evaluate this hypothesis, the baseband BPSK detector was employed as a pretrained model and subsequently adapted to more complex signal environments. Specifically, it was fine-tuned on mixed-signal data derived from baseband conditions, as presented in
Table 2 (Transfer Learning, Early Exit (Baseband→Mixed BPSK)). The early-exit retraining approach yielded 3.51% true positives but an excessive 57.72% false positives, indicating no meaningful improvement. In contrast, retraining the final two layers reduced false positives to 0.8%, while achieving 1.88% true positives and 2.33% false negatives, representing a substantial improvement in false-alarm control, as presented in
Table 2 (Transfer Learning, Last Two Layers (Baseband→Mixed BPSK)).
In this experiment, the Mixed Signal Model was trained and evaluated exclusively on baseband-shifted data, without exposure to multi-signal interference, and then applied directly to a multi-signal detection scenario. Despite this training–deployment mismatch, the model achieved a 67.37% sensitivity and 49.86% precision, indicating reasonably strong baseline performance given that the model had never been exposed to multi-signal data during training. In Experiment 2, a transfer-learning strategy was employed in which the final two layers of the same model were retrained, enabling targeted adaptation to the multi-signal environment. This approach yielded 75.27% sensitivity and 87.7% precision, demonstrating a substantial improvement in detection capability and a pronounced reduction in false alarms achieved through limited fine-tuning rather than architectural modification. The results are presented in
Table 2 under the scenario “Transfer Learning, Early Exit (Mixed BPSK→Multi-Signal)” and “Transfer Learning, Last Two Layers (Mixed BPSK→Multi-Signal).”
Table 4 summarizes the class-wise binary prediction percentages for the evaluated transfer learning configurations.
7. Discussion
7.1. Key Empirical Findings
The experiments demonstrate that realistic RF conditions substantially alter detector behavior compared to the idealized baseband, single-signal setting typically assumed in public benchmarks. Three findings are important for practitioners.
First, center-frequency shifts are a major failure mode when they are not represented during training. A detector trained only on baseband recordings does not generalize to frequency-shifted signals: missed detections increase sharply and true positives collapse. This indicates that a “train at baseband, deploy anywhere” assumption is not valid for the evaluated transformer configuration, and that either explicit data augmentation (frequency mixing) or an operational downconversion stage is required.
Second, sampling-rate mismatch consistently degrades performance, with larger penalties as the resampling ratio deviates further from one. While moderate mismatch may be tolerable, the results suggest that resampling artifacts (especially interpolation in the mixed-frequency setting) can be disruptive. This emphasizes that practical RFML deployments should treat sampling-rate assumptions as part of the model specification: the front-end resampling strategy and the classifier should be designed and validated together.
Third, simultaneous multi-signal mixtures can cause complete detection failure unless the interference structure is explicitly modeled during training. When a second modulation co-occurs at a different center frequency, a detector trained only on single-signal examples can fail to identify the SOI altogether. Training directly on multi-signal mixtures restores detection capability, but it can introduce new confusions (e.g., elevated false positives for certain AM sideband classes). Extending the discriminator set with “hard negative” mixture classes reduces these false alarms, illustrating that discriminator selection is central to robust binary detection.
Two additional observations refine the above points. The time-domain contamination study shows that co-occurrence in time is less damaging than co-occurrence in frequency: when the SOI occupies a sufficient fraction of the window, detection remains reliable because a contiguous, uncontaminated segment retains the phase/amplitude structure required for recognition. Early-exit inference provides a meaningful efficiency gain: high-SNR samples often reach high confidence at early layers (
Figure 4), reducing average computation while preserving (and in some cases slightly improving) overall detection metrics.
Finally, transfer learning does not generalize effectively across inter-modulation tasks, suggesting that distinct modulation types may require independent training. In contrast, transfer learning performs well for intra-modulation scenarios, such as adapting a baseband model to operate in a mixed-signal environment or extending a mixed-signal model to a multi-signal setting.
7.2. Scope of Baseline Comparisons
The baseline comparisons in this study are intentionally designed to isolate the impact of task formulation rather than to benchmark architectural performance. Specifically, the comparison with a 24-class transformer model is conducted under a similar hyperparameter budget to control for model capacity, enabling a focused evaluation of the binary versus multi-class formulation.
We acknowledge that additional baselines, such as CNN- or LSTM-based models, as well as lightweight classifiers (e.g., support vector machines with hand-crafted features), could further enrich the study. However, the primary objective of this work is to evaluate a task-aligned binary signal-of-interest (SOI) detection framework under realistic RF impairments, rather than to establish state-of-the-art performance across architectures. The goal is to replace handcrafted classifiers with transformer-based models that can leverage GPU acceleration for real-time and scalable signal detection.
In contrast to much of the existing AMC literature, which primarily evaluates models under idealized single-signal, baseband conditions (e.g., RadioML datasets), this work emphasizes more realistic scenarios, including mixed-frequency, sampling-mismatched, and multi-signal environments. Under these conditions, model behavior is strongly influenced by task formulation, and the results demonstrate that a binary SOI detection approach improves robustness and interpretability.
The use of a relatively simple, general-purpose architecture is also deliberate. This avoids reliance on hand-crafted feature pipelines or highly specialized models that may not generalize well across environments, and instead supports an end-to-end learning framework operating directly on raw IQ data.
From a systems perspective, the proposed approach offers several practical advantages. It enables modular deployment, where detectors can be trained and updated independently for different signals of interest; adaptability, where models can be retrained or fine-tuned for new RF conditions such as mixed or multi-signal environments; and scalability, where only relevant detectors need to be deployed for a given band or operational scenario.
Finally, transformer-based models provide an additional implementation advantage: they are highly amenable to parallel computation on modern GPU hardware. Unlike sequential models such as LSTMs, transformers process entire input sequences simultaneously, enabling efficient training and inference at scale. This property is particularly beneficial for real-time or large-scale RF monitoring systems, where throughput and parallel processing capability are critical.
The conclusions of this study are primarily derived from experiments using BPSK as the signal of interest, and therefore may not directly generalize to all modulation types. Different modulation schemes exhibit distinct statistical and structural properties, and their behavior under realistic RF impairments can vary significantly. In particular, modulation families such as AM and FM introduce additional complexity due to continuous amplitude or frequency variations, which may not be captured by models optimized for discrete phase-modulated signals.
Furthermore, in multi-signal environments, the superposition of signals can produce composite patterns that are difficult—or in some cases practically impossible—to separate, depending on factors such as relative power levels, frequency offsets, and temporal overlap. Additional signal characteristics, including baud rate and symbol timing, are also not explicitly modeled in this study and may influence detection performance.
The scope of this work is intentionally narrowed to enable controlled analysis under multiple interacting RF impairments across a large set of modulation classes. Given the diversity and complexity of the 24 modulation types in the dataset, this focused approach allows for clearer interpretation of task formulation effects.
These limitations also point to future research directions. More complex and heterogeneous scenarios—such as overlapping radar and communication signals (e.g., FMCW radar coexisting with LTE transmissions)—represent important real-world conditions that warrant further investigation. Additionally, the results suggest that modulation-aware or hybrid architectures, incorporating signal-processing-informed inductive biases and tailored to specific signal families, represent a promising direction for improving performance beyond fully general-purpose models.
7.3. Scalability and Deployment Considerations
A potential concern with the proposed modular approach is that a bank of K independent binary detectors may incur higher total computational cost than a single K-class model. In the worst case, evaluating all detectors sequentially would scale linearly with K.
However, the proposed framework is not intended for uniform, always-on deployment of all detectors. In realistic spectrum monitoring systems, detectors can be selectively deployed based on prior knowledge of the frequency band, operational context, or upstream signal detection stages. Because each detector focuses on a single SOI against a background set, model capacity and training effort can be concentrated where it matters operationally. As a result, only a subset of detectors is active, making the effective computational cost substantially lower than the worst-case bound. Furthermore, the architecture naturally supports parallel execution across hardware resources, allowing efficient scaling in high-throughput settings.
Additionally, the binary formulation enables:
Parallelization: detectors can be distributed across hardware resources or evaluated concurrently,
Incremental deployment: new signals of interest (SOIs) can be added without retraining a global model,
Reduced model complexity per task: each detector learns a simpler decision boundary (SOI vs. background).
We acknowledge these considerations and emphasize that the proposed framework is designed for practical deployment scenarios, where simplicity, adaptability, and selective activation are prioritized over uniform full-scale operation. A key advantage of the binary formulation is that detectors can be trained under simple conditions (e.g., baseband) and incrementally adapted to more complex environments (e.g., mixed-frequency or multi-signal) without retraining a monolithic multi-class model. From a systems perspective, this replaces a single rigid model with a collection of smaller, specialized detectors that can be composed as needed, allowing model complexity to scale with environmental demands.
Resolution of decision conflicts: In scenarios where multiple detectors produce positive outputs for the same input, this is not necessarily an error condition but may reflect true multi-signal coexistence. Nevertheless, several resolution strategies are available:
Confidence-based selection: selecting the detector with the highest posterior probability,
Threshold calibration: tuning detector-specific thresholds to control false positives,
Multi-label interpretation: allowing multiple simultaneous positives in multi-signal environments,
Hierarchical or downstream verification: applying secondary classifiers or signal separation methods.
The appropriate strategy depends on the application (single-emitter vs. multi-emitter environments), and the modular framework allows this policy to be adapted without retraining models.
The results also show that binary detection is not “set and forget.” The discriminator set must reflect the RF environment the detector will see. In multi-signal scenarios, including realistic hard negatives (e.g., likely co-occurring modulations and mixture classes) can substantially reduce false alarms. This mirrors classical detection practice, where the most important confusers are explicitly modeled. From an engineering standpoint, it suggests that deploying detector banks should be accompanied by a process for updating discriminators as spectrum occupancy evolves.
7.4. Why Inter-Modulation Transfer Learning Fails
Inter-modulation transfer learning fails primarily due to modulation-specific feature learning and decision boundary mismatch. Although BPSK and QPSK are closely related modulation schemes, this represents a challenging transfer scenario. BPSK consists of two constellation phase points, whereas QPSK introduces four phase states, resulting in a fundamentally richer phase structure. While this difference appears small in the signal domain, it induces a significant shift in the learned representation space.
From the perspective of the self-attention mechanism (
Section 4), the model effectively learns a data-driven approximation to complex correlation, where attention weights depend on phase relationships of the form
. For BPSK, phase transitions are constrained to two discrete states, producing a relatively simple and highly structured phase-difference distribution. In contrast, QPSK introduces additional phase transitions (e.g.,
shifts), leading to a more complex and less predictable phase relationship across time.
Several factors contribute to the observed transfer failure. First, feature specialization causes the model to learn phase transition patterns that are tightly coupled to the BPSK phase structure. Because attention weights implicitly encode phase coherence, the learned similarity function becomes tuned to BPSK-specific phase differences and does not generalize to the broader phase set of QPSK.
Second, decision boundary bias arises because the pretrained model is optimized for a “BPSK versus background” task. This results in a representation space in which BPSK-like phase coherence patterns are strongly emphasized. When retargeted to QPSK, samples that partially resemble BPSK phase behavior can be incorrectly classified as positive, leading to elevated false positive rates, as observed in
Table 2.
Third, limited adaptability during partial fine-tuning further restricts performance. When only the final layers are retrained, earlier layers—responsible for encoding phase relationships through attention—remain fixed. As a result, the model cannot adjust its underlying phase-similarity function to accommodate the different constellation geometry of QPSK.
Finally, in multi-signal environments, composite feature effects further degrade transfer performance. As shown in
Section 3.8, the superposition of multiple signals introduces cross-terms with oscillatory phase components. These interactions can generate emergent phase/amplitude patterns that do not correspond to any single modulation class, increasing the likelihood of misclassification.
Overall, these results indicate that inter-modulation transfer is fundamentally difficult, even between closely related schemes such as BPSK and QPSK, because the learned attention-based representations are highly modulation-specific and tightly coupled to phase structure.
7.5. Implications for End-to-End Spectrum Monitoring
These findings support a systems-oriented view in which modulation detection/classification is preceded by signal detection and isolation. In wideband spectrum monitoring, candidate signal emissions are commonly localized in the time–frequency domain using classical energy detection techniques [
35] or spectrogram-based methods. Recent work has extended object-detection frameworks from computer vision to RF spectrograms, where emissions are treated as visual objects and localized using bounding-box detectors such as Faster R-CNN, YOLO, and transformer-based architectures [
36,
37,
38]. In parallel, traditional image-processing and unsupervised approaches, including thresholding and clustering methods such as
k-means, remain widely used for grouping energy concentrations into candidate signal regions. Once a contiguous region is isolated, a modulation detector can be applied on a narrower bandwidth segment where the number of co-occurring signals is reduced. Vision Transformer approaches have also been applied to RF spectrograms by treating signals as images [
39].
After isolation, two practical processing paths exist. The first is to mix the isolated band to baseband and then apply a baseband-trained detector. This approach leverages the simplicity of baseband representations but depends on accurate downconversion and adequate filtering. The second path is to classify the filtered signal directly at its observed center frequency using a detector trained with frequency offsets. This avoids additional mixing and can be advantageous when downconversion is imperfect or when center-frequency alignment varies across captures.
Filtering and band isolation play an important role in both paths. In practice, filter cutoffs may not be perfectly centered around the desired emission, and nearby signals or leakage can remain in-band. FIR filters can provide linear phase (often desirable for preserving waveform structure) but may require more taps and higher computational cost; IIR filters can be more efficient but introduce nonlinear phase distortion. The experiments in this paper highlight that even modest residual interference can change detector behavior, motivating an integrated design philosophy: filtering, downconversion (if used), and detector training should be co-designed so that the detector is exposed to the residual artifacts expected at deployment.
7.6. Architectural Design Considerations
Architectural design choices and opportunities for innovation: The present study intentionally adopts a standard Transformer backbone to isolate the impact of the problem formulation (binary detection under realistic RF impairments) from architectural modifications. This allows the observed performance gains to be attributed directly to data modeling and training strategy rather than to architecture-specific optimizations.
However, the analysis in
Section 3 suggests that self-attention over IQ samples implicitly approximates complex correlation and phase-difference computations. This observation opens several directions for domain-specific architectural improvements:
Physics-informed attention: incorporating explicit complex-valued or phase-aware operations (e.g., learned approximations of ) to better capture modulation structure,
Channelizer-inspired front-ends: integrating learned or hybrid polyphase filterbanks to provide frequency-localized representations prior to attention,
Frequency-offset estimation modules: introducing components that explicitly model and compensate for carrier frequency offset (CFO) or drift,
Lightweight attention mechanisms: reducing computational cost via sparse attention, reduced head counts, or structured attention tailored to temporal locality,
Binary-specific heads: designing output layers optimized for SOI-versus-background discrimination rather than multi-class separation.
More concretely, future architectures could combine signal processing structure with learning by embedding operations such as:
or by explicitly modeling phase differences:
within the network. Such designs would move beyond generic Transformers toward hybrid
model-based + data-driven RF architectures.
7.7. Limitations and Future Work
Several limitations frame the scope of these conclusions. First, the study uses synthetically generated frequency shifts and mixtures derived from the RadioML dataset. While this enables controlled experiments, it does not capture the full diversity of over-the-air impairments such as hardware nonlinearities, phase noise, carrier frequency drift dynamics, nonstationary noise, and multipath fading. Second, the experiments anchor on a single SOI (BPSK) to enable a focused analysis; extending the study across additional modulations would further clarify which trends are universal versus modulation-specific. Third, the early-exit mechanism provides limited benefit in low-SNR regimes where confidence is inherently low; complementary approaches such as uncertainty estimation, calibration, or joint detection/denoising may be needed when low-SNR performance is critical.
Future work can therefore proceed in three directions: (i) evaluation on over-the-air captures and hardware-in-the-loop datasets; (ii) richer augmentation strategies that jointly model frequency offset, sampling-rate offset, fading, and interference statistics; and (iii) scalable procedures for building detector banks, including principled discriminator selection, continual learning for evolving bands, and lightweight calibration to control false alarms under distribution shift.
Positioning of this work: This paper establishes a strong baseline by demonstrating that a standard Transformer, when paired with an appropriate binary detection formulation and realistic data modeling, already exhibits robustness to frequency shifts and multi-signal interference. The proposed framework therefore, serves as a foundation upon which more specialized, RF-aware architectures can be developed.