Out-of-Distribution (OOD) Detection is a critical safety mechanism for Automatic Modulation Classification (AMC) models deployed in open-world electromagnetic environments. Unlike standard closed-set classification, which forces an input into a known category, OOD detection quantifies whether a received I/Q sample originates from the model's learned data manifold. This allows the system to reject novel, adversarial, or malformed waveforms that would otherwise trigger a high-confidence but incorrect modulation label, a catastrophic failure in electronic warfare or spectrum enforcement scenarios.
Glossary
Out-of-Distribution Detection

What is Out-of-Distribution Detection?
Out-of-distribution detection is the task of identifying input signals that are fundamentally different from the training data distribution, enabling a deployed model to flag unknown waveforms instead of making a forced misclassification.
Common techniques include using the maximum softmax probability as a confidence score, with low probabilities indicating OOD inputs, or employing energy-based models that learn a scalar energy function assigning lower values to in-distribution data. More advanced methods leverage the feature space of a deep learning AMC model, fitting a class-conditional Gaussian distribution to the learned embeddings and flagging inputs that fall far from any known cluster as open-set anomalies.
Core Characteristics of OOD Detection
Out-of-Distribution (OOD) detection is a critical safety mechanism for deployed Automatic Modulation Classification (AMC) models. It enables a system to recognize when an intercepted signal falls outside its training distribution—such as a novel waveform, an adversarial attack, or noise—and flag it as unknown rather than forcing a high-confidence misclassification.
Distributional Uncertainty Quantification
OOD detection relies on quantifying the epistemic uncertainty of a model's prediction. Unlike softmax probabilities, which can be high for OOD inputs, true uncertainty metrics identify when a model is operating outside its knowledge. Bayesian neural networks and deep ensembles model weight distributions to produce predictive variance. High variance across ensemble members signals an unfamiliar input. Monte Carlo Dropout approximates Bayesian inference during inference by sampling multiple forward passes, measuring disagreement as a proxy for distributional shift.
Distance-Based Detection Methods
These techniques operate on the principle that in-distribution (ID) samples cluster tightly in the model's feature embedding space, while OOD samples map to distant, low-density regions. Key approaches include:
- Mahalanobis Distance: Computes the distance of a test sample's feature vector to the nearest class-conditional Gaussian distribution, using a tied covariance matrix estimated from training data.
- Deep Nearest Neighbors: Compares the test embedding against a stored gallery of ID embeddings using k-NN; a low conformity score triggers rejection.
- Gaussian Mixture Models (GMMs): Fit a probabilistic density model to the ID embeddings and flag samples with low log-likelihood.
Energy-Based and Logit Scoring
These methods derive OOD scores directly from a model's logit outputs without modifying the architecture. The Energy Score computes the negative LogSumExp of the logits, providing a scalar that is theoretically aligned with the input's probability density. ID samples yield lower (more negative) energy. Maximum Softmax Probability (MSP) uses the highest softmax value as a confidence proxy, though it is known to be poorly calibrated for OOD detection. ODIN (Out-of-DIstribution detector for Neural networks) enhances MSP by applying temperature scaling and small input perturbations to widen the gap between ID and OOD scores.
Training-Time Regularization
Proactive techniques modify the training objective to enforce a compact decision boundary for ID classes and a repulsive margin for everything else. Outlier Exposure (OE) introduces a diverse auxiliary dataset of OOD examples during training, penalizing the model for making confident predictions on them. Contrastive Learning pulls augmented views of the same I/Q sample together while pushing all other samples apart, creating a highly structured embedding space. CAC (Classifier-Agnostic Contrastive) loss explicitly optimizes for a uniform distribution of OOD samples on the embedding hypersphere.
OpenMax and Recalibrated Softmax
OpenMax replaces the standard softmax layer with a mechanism that estimates the probability of an input belonging to an unknown class. It fits a Weibull distribution to the distances between correctly classified training samples and their class mean activation vectors. At inference, the model recalibrates the logits by weighting them against the probability of extreme distance values, redistributing mass to a new 'unknown' pseudo-class. This explicitly models the boundary between known modulation schemes and the open world of novel waveforms.
Evaluation Metrics for OOD Detection
Standard classification accuracy is insufficient for evaluating OOD detectors. Key metrics include:
- AUROC (Area Under the Receiver Operating Characteristic curve): Measures the trade-off between true positive rate (correctly identifying OOD) and false positive rate (flagging ID as OOD).
- FPR at 95% TPR (FPR95): The false positive rate when the true positive rate is fixed at 95%. Lower is better.
- AUPR (Area Under the Precision-Recall curve): More informative than AUROC when there is a class imbalance between ID and OOD samples.
- Detection Error: The minimum misclassification probability achievable by tuning the threshold.
Frequently Asked Questions
Core concepts and common questions about identifying signals that fall outside a model's training distribution, a critical safety mechanism for deployed automatic modulation recognition systems.
Out-of-distribution (OOD) detection is the task of identifying input I/Q signals that are fundamentally different from the modulation schemes and channel conditions present in the training data distribution. In a deployed AMC system, a standard closed-set classifier will forcibly map any input—including novel, adversarial, or noise-only waveforms—to one of its known modulation classes with high confidence. An OOD detector acts as a gating mechanism that flags these anomalous inputs, enabling the system to respond with "unknown modulation" rather than making a silent, incorrect classification. This capability is essential for electronic warfare applications where threat emitters may use previously unseen waveforms and for commercial cognitive radios encountering interference from new wireless standards.
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
Key concepts and techniques that form the foundation of out-of-distribution detection in automatic modulation classification systems.
Open-Set Recognition
A classification paradigm where the model must not only classify known modulation schemes but also detect and reject unknown modulation types not seen during training. Unlike closed-set AMC, which forces every input into a known class, open-set recognition establishes a decision boundary around known classes.
- Rejects novel waveforms rather than misclassifying them
- Critical for electronic warfare environments with unknown emitters
- Often implemented using extreme value theory to model class boundaries
Modulation Confidence Score
A probabilistic output, often derived from a softmax layer or log-likelihood ratio, that quantifies the classifier's certainty in its prediction. Low confidence scores serve as a primary indicator of OOD samples.
- Enables downstream systems to make risk-aware decisions
- Can be calibrated using temperature scaling for reliability
- Threshold-based rejection: scores below a tuned threshold flag unknowns
Mahalanobis Distance
A parametric OOD detection method that computes the distance between a test sample's feature representation and the class-conditional Gaussian distribution of each known class. Unlike softmax confidence, this metric operates in the penultimate layer's feature space.
- Accounts for feature covariance, not just Euclidean distance
- Requires fitting a mean vector and covariance matrix per class
- Computationally lightweight for real-time deployment
Energy-Based Detection
A scoring function that uses the Helmholtz free energy formulation of a neural network to separate in-distribution from OOD samples. Energy scores consistently outperform softmax confidence for OOD detection across architectures.
- Derived from the log of the denominator in the softmax function
- Lower energy indicates higher likelihood of being in-distribution
- Does not require OOD data during training
Contrastive Learning
A self-supervised training method that learns robust signal representations by pulling augmented views of the same I/Q sample together and pushing views from different samples apart in the embedding space. These compact, well-separated clusters naturally improve OOD detection.
- Creates tighter intra-class clusters for known modulations
- OOD samples fall into low-density regions of the embedding
- Augmentations include noise addition, phase rotation, and fading
Adversarial Robustness
The resilience of a trained AMC model against intentionally crafted, minimal perturbations to the input signal designed to cause misclassification. OOD detection and adversarial robustness are closely linked: adversarial examples often appear as OOD samples in feature space.
- Gradient-based attacks can push in-distribution signals across decision boundaries
- Adversarial training can improve both robustness and OOD detection
- Critical security concern in contested electromagnetic environments

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