An IQ Transformer is a neural network that adapts the self-attention mechanism to process raw complex baseband signals natively. Unlike traditional transformers that operate on text or images, this architecture tokenizes sequences of in-phase and quadrature samples, preserving the magnitude and phase relationships critical for physical-layer learning tasks such as automatic modulation classification and emitter identification.
Glossary
IQ Transformer

What is an IQ Transformer?
An IQ Transformer is a deep learning model that applies the transformer architecture directly to raw in-phase and quadrature (IQ) sample sequences, using specialized tokenization and positional encoding to model temporal dependencies in complex baseband waveforms.
The model employs complex-valued attention or dual-channel real-valued processing to handle the two-dimensional nature of IQ data. By leveraging rotary position embeddings and causal masking, the IQ Transformer captures long-range temporal dependencies in the waveform, enabling it to replace conventional signal processing blocks with a single, end-to-end learned system for tasks like channel estimation and equalization.
Core Characteristics of IQ Transformers
The IQ Transformer redefines physical-layer processing by applying the self-attention mechanism directly to raw complex baseband samples. These core characteristics distinguish it from conventional signal processing chains and standard NLP transformers.
Complex-Valued Tokenization
Unlike NLP transformers that tokenize discrete words, the IQ Transformer operates on continuous complex-valued samples. The raw In-Phase (I) and Quadrature (Q) components are treated as a single complex token z = I + jQ, preserving the critical magnitude and phase relationships that define the signal's modulation and propagation characteristics.
- Direct IQ Input: Bypasses hand-crafted feature extraction like cyclostationary moments or constellation diagrams.
- Complex Linear Projection: The initial embedding layer uses complex-valued weights to project each IQ sample into a higher-dimensional token space without collapsing the real and imaginary parts prematurely.
- Preserves Baseband Geometry: This approach maintains the geometric structure of the complex plane, which is essential for tasks like phase rotation compensation and automatic modulation classification.
Rotary Position Embedding (RoPE) for RF
Standard sinusoidal or learned absolute position encodings struggle to capture the relative phase offsets between IQ samples. The IQ Transformer employs Rotary Position Embedding (RoPE), which encodes position information through rotation in the complex plane.
- Relative Phase Encoding: RoPE naturally captures the phase progression between samples, making it ideal for modeling carrier frequency offsets and Doppler shifts.
- Complex-Plane Rotation: The embedding applies a rotation matrix to the query and key vectors based on their relative temporal distance, ensuring that the attention score depends only on the relative phase difference.
- Seamless Integration: RoPE is applied directly to the complex-valued token embeddings, maintaining the signal's mathematical structure throughout the attention computation.
Causal Temporal Attention Masking
For real-time streaming applications, the IQ Transformer uses a causal attention mask that restricts each token to attend only to past and present samples. This prevents the model from peeking into the future, enabling sample-by-sample processing with deterministic latency.
- Streaming Inference: The model processes a sliding window of IQ samples, generating outputs with a fixed look-back window and no future dependence.
- Triangular Mask Matrix: A lower-triangular mask is applied to the attention scores, zeroing out contributions from future time steps.
- Real-Time Demodulation: This causal constraint is critical for deploying the transformer as a neural receiver in live communication links, where future symbols are unavailable.
Multi-Head Spectrum Attention
The core self-attention mechanism is extended to multi-head spectrum attention, allowing the model to jointly analyze the IQ sequence across multiple representational subspaces simultaneously. Each head can learn to focus on different temporal scales or signal features.
- Diverse Feature Extraction: One head might attend to short-term symbol-rate patterns, while another captures long-term fading correlations or interference bursts.
- Parallel Processing: All heads compute attention in parallel, with their outputs concatenated and projected back to the token dimension.
- Implicit Equalization: Through this mechanism, the transformer learns to implicitly perform channel equalization and interference rejection by weighting the importance of different temporal neighborhoods.
Hierarchical Temporal Processing
To capture both fine-grained symbol transitions and long-term channel coherence, the IQ Transformer often employs a hierarchical architecture. This involves processing the signal at multiple temporal resolutions through pooling or strided attention layers.
- Multi-Scale Analysis: Early layers operate on high-resolution sample sequences, while deeper layers process downsampled representations that capture envelope and fading statistics.
- Strided Attention Windows: By applying attention with a stride greater than one, the model reduces computational complexity for long sequences while expanding its receptive field.
- Fusion Layers: Cross-attention mechanisms fuse features from different temporal scales, combining local waveform detail with global context for robust classification and detection.
Cross-Attention for Multi-Domain Fusion
The IQ Transformer can fuse information from multiple signal representations using cross-attention. This allows the model to jointly reason over raw IQ samples and a transformed domain, such as a spectrogram or delay-Doppler map.
- Time-Frequency Fusion: One transformer branch processes time-domain IQ tokens, while another processes frequency-domain tokens from an FFT. Cross-attention layers allow the time-domain branch to query the frequency-domain branch for spectral context.
- Sensor Modality Fusion: Cross-attention can also fuse IQ data from multiple antenna elements in a MIMO array, allowing the model to learn spatial beam patterns implicitly.
- Query-Key Asymmetry: The query vectors come from the primary IQ sequence, while the key and value vectors come from the auxiliary domain, enabling the model to selectively retrieve relevant spectral or spatial information.
Frequently Asked Questions
Explore the core mechanisms behind adapting transformer networks to process raw in-phase and quadrature (IQ) baseband samples for advanced wireless signal processing.
An IQ Transformer is a neural network architecture that adapts the standard transformer's self-attention mechanism to directly process raw sequences of complex-valued in-phase and quadrature (IQ) samples. Unlike traditional models that require pre-processed spectrograms or feature vectors, the IQ Transformer operates on the native complex baseband waveform. It first converts the complex IQ stream into a sequence of tokens using a specialized time-frequency tokenizer or a learned linear projection. Complex-valued attention or a dual-channel real-valued attention mechanism then captures long-range temporal dependencies and intricate phase-amplitude relationships within the signal. This allows the model to learn optimal representations for tasks like automatic modulation classification, signal denoising, and end-to-end physical layer processing without relying on hand-crafted expert features.
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
Mastering the IQ Transformer requires understanding its relationship with other advanced architectures and preprocessing techniques in the RFML stack. These interconnected concepts form the foundation of modern learned communication systems.
Complex-Valued Attention
An extension of the standard attention mechanism that operates natively on complex numbers, preserving the magnitude and phase relationships inherent in IQ baseband signals. Unlike real-valued attention that processes I and Q components as separate real channels, complex-valued attention computes dot products in the complex domain, enabling the model to learn phase rotations and conjugate multiplications that are fundamental to signal processing operations like matched filtering and channel equalization. This results in more expressive physical-layer processing with fewer parameters.
Time-Frequency Tokenizer
A critical preprocessing module that converts a raw time-series IQ signal into a sequence of tokens representing localized time-frequency patches. This tokenizer applies a Short-Time Fourier Transform (STFT) or learned filterbank to decompose the waveform into a 2D spectrogram-like representation, which is then flattened into a sequence of patch embeddings. By exposing the transformer to explicit frequency-domain structure, the tokenizer enables the model to learn harmonic relationships, bandwidth occupancy, and transient events without requiring the self-attention mechanism to rediscover spectral decomposition from scratch.
Rotary Position Embedding RF
The application of Rotary Position Embedding (RoPE) to RF signal tokens, encoding relative temporal or frequency offsets through rotation in the complex plane. RoPE applies a rotation matrix to the query and key vectors in self-attention, where the rotation angle is proportional to the token's position. This is particularly well-suited for complex-valued signal representations because:
- It naturally preserves the magnitude of the token embedding
- It encodes relative phase shifts that correspond to time delays or frequency offsets
- It allows the model to generalize to sequence lengths unseen during training
Causal Temporal Attention
An attention masking pattern that restricts the transformer model to only attend to past and present time steps, making it suitable for real-time, streaming signal processing tasks where future samples are unavailable. In a causal attention configuration, the upper triangular portion of the attention matrix is masked to negative infinity, preventing information leakage from future tokens. This is essential for deploying IQ Transformers in online demodulation, adaptive equalization, and predictive spectrum sensing applications where latency constraints demand sample-by-sample processing without buffering.
DeepRx MIMO
An extension of the DeepRx neural receiver architecture specifically designed for multi-input multi-output (MIMO) systems, using a unified deep learning model to perform joint spatial and temporal processing for detection. While a standard IQ Transformer processes a single antenna stream, DeepRx MIMO incorporates cross-antenna attention or joint spatio-temporal attention to model correlations across the spatial dimension. This allows the model to learn optimal beamforming, spatial multiplexing, and interference nulling strategies directly from data, often outperforming traditional decoupled algorithms like LMMSE equalization followed by sphere decoding.
Masked Spectrum Modeling
A self-supervised pre-training technique where portions of a spectrogram or frequency-domain sequence are masked, and a transformer model is trained to reconstruct the missing content. This approach, inspired by Masked Autoencoders (MAE) in computer vision, forces the IQ Transformer to learn robust representations of signal structure, including:
- Carrier frequency and bandwidth estimation
- Modulation format characteristics
- Temporal envelope patterns The pre-trained encoder can then be fine-tuned on downstream tasks like classification or demodulation with significantly fewer labeled examples.

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