Inferensys

Glossary

Federated Out-of-Distribution Detection (OOD Detection)

The task of identifying inference-time inputs that differ fundamentally from the federated training data distribution, enabling a model to flag potentially unsafe or unreliable predictions for clinical review.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
SAFETY-CRITICAL MODEL EVALUATION

What is Federated Out-of-Distribution Detection (OOD Detection)?

A decentralized framework for identifying inference-time inputs that deviate fundamentally from the federated training distribution, enabling models to flag unreliable predictions without centralizing sensitive clinical data.

Federated Out-of-Distribution Detection is a privacy-preserving evaluation technique that enables a collaboratively trained model to recognize inputs that fall outside its learned manifold, flagging them for clinical review. It addresses the critical safety gap where a federated model encounters novel patient data, rare pathologies, or corrupted sensor readings that differ from any client's local training distribution, preventing silent failures.

This process typically involves computing OOD scores—such as energy-based metrics, Mahalanobis distance, or softmax confidence thresholds—locally at each institution and then securely aggregating detection performance metrics via a central server. The core challenge lies in calibrating these scores across heterogeneous, non-IID data silos without sharing raw patient records, ensuring that a radiograph from an unseen scanner model or a lab result with a novel assay is reliably flagged rather than misclassified with high confidence.

SAFETY-CRITICAL MODEL EVALUATION

Core Characteristics of Federated OOD Detection

Federated Out-of-Distribution (OOD) detection identifies inference-time inputs that differ fundamentally from the decentralized training data distribution, enabling models to flag potentially unsafe predictions for clinical review without centralizing patient data.

01

Decentralized Anomaly Scoring

Each institution computes a local OOD score for every inference sample using methods like Mahalanobis distance or energy-based models on its own data partition. These scores are then securely aggregated across the network using federated averaging or secure aggregation protocols to produce a global anomaly threshold, ensuring no raw patient features leave the local site during the safety check.

99.2%
AUROC on CIFAR-10 vs SVHN
02

Distributional Shift Taxonomy

Federated OOD detection must distinguish between multiple types of distributional shift:

  • Covariate Shift: The input feature distribution changes (e.g., a new MRI scanner vendor) while the diagnostic task remains the same.
  • Semantic Shift: Entirely new classes appear at inference that were absent from all federated training nodes (e.g., a novel pathology).
  • Label Shift: The prevalence of known conditions changes across participating hospitals, requiring recalibration of OOD thresholds.
03

Local-Global Discrepancy Detection

A powerful OOD signal in federated systems is the disagreement between local and global model predictions. When a sample is in-distribution for the global model but anomalous for a specific local model, it may indicate subpopulation shift or domain-specific outliers. This discrepancy is computed locally and aggregated via federated uncertainty quantification methods to avoid centralizing prediction vectors.

04

Privacy-Preserving Open Set Recognition

Traditional open set recognition requires access to known class prototypes. In federated settings, class-conditional feature centroids are computed locally and shared through differentially private mechanisms with a calibrated privacy budget (epsilon). The global OOD detector then measures the distance between a new sample's embedding and these protected centroids, flagging inputs that fall outside a statistically defined radius as out-of-distribution.

05

Federated Energy-Based Models

Energy-based OOD detection uses a scalar energy score—lower for in-distribution, higher for OOD—derived from the model's logits. In federated settings, each client trains a local energy function on its data partition. The global energy threshold is aggregated using FedAvg on the energy parameters, creating a consensus boundary that respects the heterogeneity of clinical data distributions across institutions.

06

Clinical Rejection Policies

When a federated OOD detector flags an input, configurable rejection policies determine the clinical workflow:

  • Hard Rejection: The model abstains entirely, routing the case for mandatory human review.
  • Soft Rejection with Confidence: The prediction is delivered alongside a calibrated Expected Calibration Error (ECE) warning and an OOD flag.
  • Deferral to Local Expert: The sample is redirected to a site-specific model trained on that institution's unique subpopulation, leveraging personalized federated learning.
FEDERATED OOD DETECTION

Frequently Asked Questions

Essential questions and answers about identifying anomalous inputs in decentralized clinical AI systems, where data cannot be centralized for traditional distribution analysis.

Federated Out-of-Distribution (OOD) Detection is the task of identifying inference-time inputs that differ fundamentally from the decentralized training data distribution across multiple institutions, without centralizing patient data. In healthcare, this is critical because a model trained on chest X-rays from three urban hospitals may encounter a rural clinic's images with different scanner vendors, demographic skews, or rare pathologies—inputs for which predictions are unreliable. Federated OOD detection enables the model to flag these cases for clinical review rather than silently producing a confident but incorrect diagnosis. The core challenge is that no single node has access to the full training distribution, making traditional density estimation or distance-based methods inapplicable. Instead, techniques like federated ensembling of local OOD scores, decentralized energy-based models, and federated Mahalanobis distance computation are employed to aggregate anomaly signals without exposing patient-level features.

Prasad Kumkar

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.