Transformer-Based AMC is a deep learning architecture that uses the self-attention mechanism to process sequences of complex-valued I/Q samples for automatic modulation classification. Unlike convolutional neural networks that operate with a fixed local receptive field, the Transformer computes pairwise interactions between all time steps in a signal sequence, allowing it to directly model long-range dependencies and global temporal structure critical for distinguishing higher-order QAM and PSK schemes under varying channel conditions.
Glossary
Transformer-Based AMC

What is Transformer-Based AMC?
Transformer-Based Automatic Modulation Classification (AMC) applies self-attention mechanisms to raw I/Q signal sequences, enabling state-of-the-art recognition of modulation schemes by modeling long-range temporal dependencies that convolutional networks often miss.
The architecture typically tokenizes raw I/Q samples into patches or uses a convolutional front-end to generate embeddings before passing them through stacked multi-head self-attention layers. This design excels at capturing the subtle phase transitions and amplitude variations that define modulation formats, achieving superior performance on benchmarks like the RadioML dataset while offering greater robustness to carrier frequency offset and symbol timing errors compared to purely convolutional baselines.
Key Features of Transformer-Based AMC
Transformer-based Automatic Modulation Classification replaces traditional convolutional inductive biases with self-attention mechanisms, enabling the model to capture global dependencies across long I/Q sequences for superior recognition accuracy.
Multi-Head Self-Attention for I/Q Sequences
The core innovation of Transformer-based AMC is the multi-head self-attention mechanism, which computes pairwise relationships between every time step in an I/Q sequence simultaneously. Unlike CNNs with limited receptive fields, self-attention allows the model to directly correlate a preamble pattern at the start of a burst with a midamble structure thousands of samples later. Each attention head learns a distinct relational pattern:
- One head may focus on phase transitions between consecutive symbols
- Another head may attend to long-range cyclostationary patterns
- A third head might capture envelope periodicities indicative of the modulation family This global context modeling is particularly advantageous for higher-order QAM and OFDM signals where modulation-dependent structures span extended temporal windows.
Positional Encoding of Temporal Signal Structure
Since self-attention is permutation-invariant by design, Transformers require positional encoding to inject sequence order information. In AMC applications, this encoding must capture the temporal structure of modulated waveforms. Common approaches include:
- Sinusoidal positional encodings: Fixed frequency patterns that allow the model to learn relative timing relationships
- Learned position embeddings: Trainable vectors that adapt to the specific temporal characteristics of radio signals
- Relative position representations: Encoding the distance between I/Q sample pairs directly in the attention computation For burst-mode transmissions, the positional encoding helps the model distinguish between the preamble, payload, and guard intervals, each of which carries different modulation signatures.
Patch Embedding of Raw I/Q Samples
Directly feeding raw I/Q samples into a Transformer is computationally prohibitive due to the quadratic complexity of self-attention. Patch embedding addresses this by grouping consecutive I/Q samples into non-overlapping or overlapping patches, analogous to Vision Transformers (ViT). Each patch is linearly projected into a fixed-dimensional embedding vector:
- A patch of 16 complex I/Q samples becomes a single token
- This reduces the effective sequence length by a factor of 16, making attention tractable
- The patch size controls the granularity of the learned representations Smaller patches preserve fine-grained phase information critical for distinguishing PSK orders, while larger patches capture coarser envelope features useful for separating QAM from FSK families.
Complex-Valued Attention Mechanisms
Standard Transformers operate on real-valued inputs, but I/Q data is inherently complex-valued, with the phase component carrying critical modulation information. Decomposing complex samples into separate real and imaginary channels doubles the input dimensionality and may lose phase relationships. Complex-valued attention preserves this structure:
- Attention scores are computed using complex-valued dot products that respect both magnitude and phase
- The softmax normalization is applied to the magnitude of complex attention scores
- Value aggregation uses complex multiplication, preserving the relative phase between attended positions Complex-valued Transformers have demonstrated improved classification accuracy, particularly at low SNR where phase information becomes a critical discriminative feature for distinguishing modulation schemes like QPSK from 16-QAM.
Cross-Modality Attention for Multi-Domain Fusion
Advanced Transformer AMC architectures employ cross-modality attention to fuse complementary signal representations. Rather than relying solely on raw I/Q time-domain samples, these models jointly attend to multiple transformed domains:
- Time-domain I/Q: Captures instantaneous amplitude and phase transitions
- Frequency-domain FFT: Reveals carrier frequencies and bandwidth occupancy
- Cyclostationary domain: Exposes modulation-specific periodicities via the spectral correlation function
- Constellation domain: Provides a direct visualization of symbol clustering Cross-attention layers allow the time-domain encoder to query relevant features from the frequency-domain encoder, creating a unified multi-domain representation that is robust to channel impairments and adversarial perturbations.
Hierarchical Transformer with Multi-Scale Tokens
A hierarchical Transformer architecture processes I/Q sequences at multiple temporal resolutions, mimicking the multi-scale feature extraction of CNNs while retaining global self-attention. The design employs:
- Stage 1: Fine-grained tokens (small patches) processed by local-window attention to capture symbol-rate features
- Stage 2: Token merging via convolutional downsampling, producing coarser tokens that represent burst-level characteristics
- Stage 3: Global self-attention across the coarsest tokens to model frame-level modulation patterns This hierarchical design reduces computational complexity while maintaining the ability to capture both fine symbol transitions and broad modulation family signatures. It is particularly effective for hierarchical AMC where the model first identifies the modulation family before determining the specific order.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about applying transformer architectures to automatic modulation recognition tasks.
Transformer-Based Automatic Modulation Classification (AMC) is a deep learning methodology that applies the self-attention mechanism—originally designed for natural language processing—to the task of identifying a signal's modulation scheme from raw I/Q samples. Unlike convolutional neural networks that excel at capturing local patterns, a transformer processes an entire sequence of I/Q samples in parallel, computing attention weights between every pair of time steps. This allows the model to directly model long-range temporal dependencies, such as the relationship between symbols separated by hundreds of samples, which is critical for recognizing modulation formats with memory like GMSK or CPM. The architecture typically tokenizes the complex-valued I/Q stream into patches or uses a learned linear projection, adds a positional encoding to preserve temporal order, and then passes the sequence through multiple multi-head self-attention layers. The final classification is made by an MLP head operating on a pooled representation of the sequence. This approach has achieved state-of-the-art performance on benchmarks like RadioML 2018.01A, particularly in low-SNR regimes where traditional feature-based methods fail.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Essential terminology for understanding how Transformer architectures achieve state-of-the-art performance in automatic modulation classification.
Self-Attention Mechanism
The core computational unit that allows a Transformer to weigh the importance of every element in an input sequence when encoding a specific element. For I/Q samples, this means the model can directly model dependencies between time steps separated by hundreds of samples, capturing long-range temporal patterns that convolutional layers might miss. Scaled dot-product attention computes compatibility scores between all pairs of positions, enabling the model to learn complex signal structures without the limited receptive field of CNNs.
Positional Encoding
A technique that injects information about the order of tokens into the Transformer's input, since the self-attention mechanism itself is permutation-invariant. In modulation recognition, sinusoidal positional encodings or learned position embeddings allow the model to understand the sequential nature of I/Q samples. Without this, the model would treat the signal as a bag of unrelated samples, losing critical temporal structure needed to distinguish modulation schemes like GMSK from QPSK.
Multi-Head Attention
An extension of self-attention that runs multiple attention operations in parallel, each with its own learned projection matrices. This allows the Transformer to attend to information from different representation subspaces simultaneously. In AMC, one head might focus on phase transitions while another attends to amplitude variations, jointly capturing the diverse signal characteristics needed to discriminate between higher-order QAM constellations and phase-shift keying schemes.
Patch Embedding for I/Q Data
A preprocessing step that segments raw I/Q sequences into fixed-length patches, analogous to how Vision Transformers process image patches. Each patch is linearly projected into a token embedding, dramatically reducing the sequence length fed to the Transformer. For example, a 1024-sample I/Q sequence might be divided into 64 patches of 16 samples each, making self-attention computationally tractable while preserving local signal structure.
Cross-Attention Decoder
A variant of the attention mechanism where queries from one sequence attend to key-value pairs from another. In Transformer-based AMC architectures, a decoder can use learned modulation queries to cross-attend to the encoded I/Q sequence, directly extracting classification-relevant features. This query-based approach allows the model to explicitly search for known modulation signatures rather than relying solely on global pooling of encoder outputs.
Contrastive Pre-Training
A self-supervised learning strategy where the Transformer is first trained to recognize whether two augmented views of the same I/Q signal belong together, before fine-tuning on labeled modulation data. By applying random phase rotations, frequency shifts, and noise additions, the model learns invariant representations that are robust to channel impairments. This pre-training significantly boosts performance in low-SNR regimes where labeled data is scarce.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us