Table of Contents
Fetching ...

DIsoN: Decentralized Isolation Networks for Out-of-Distribution Detection in Medical Imaging

Felix Wagner, Pramit Saha, Harry Anthony, J. Alison Noble, Konstantinos Kamnitsas

TL;DR

This paper tackles safe deployment of medical-imaging ML models by enabling out-of-distribution (OOD) detection without sharing raw training data. It introduces Isolation Networks to quantify how difficult it is to separate a test sample from training data, and builds a decentralized DIsoN framework that exchanges only model parameters between a Source Node and a Target Node to perform this isolation. A class-conditioned variant, CC-DIsoN, further improves performance by limiting comparisons to the predicted class. Through experiments on four medical-imaging datasets and 12 OOD tasks, DIsoN and CC-DIsoN outperform strong baselines while preserving data privacy, offering a practical path toward remote, secure OOD-detection services. The approach also provides tunable trade-offs between inference compute and detection performance via hyperparameters and backbone choice.

Abstract

Safe deployment of machine learning (ML) models in safety-critical domains such as medical imaging requires detecting inputs with characteristics not seen during training, known as out-of-distribution (OOD) detection, to prevent unreliable predictions. Effective OOD detection after deployment could benefit from access to the training data, enabling direct comparison between test samples and the training data distribution to identify differences. State-of-the-art OOD detection methods, however, either discard the training data after deployment or assume that test samples and training data are centrally stored together, an assumption that rarely holds in real-world settings. This is because shipping the training data with the deployed model is usually impossible due to the size of training databases, as well as proprietary or privacy constraints. We introduce the Isolation Network, an OOD detection framework that quantifies the difficulty of separating a target test sample from the training data by solving a binary classification task. We then propose Decentralized Isolation Networks (DIsoN), which enables the comparison of training and test data when data-sharing is impossible, by exchanging only model parameters between the remote computational nodes of training and deployment. We further extend DIsoN with class-conditioning, comparing a target sample solely with training data of its predicted class. We evaluate DIsoN on four medical imaging datasets (dermatology, chest X-ray, breast ultrasound, histopathology) across 12 OOD detection tasks. DIsoN performs favorably against existing methods while respecting data-privacy. This decentralized OOD detection framework opens the way for a new type of service that ML developers could provide along with their models: providing remote, secure utilization of their training data for OOD detection services. Code: https://github.com/FelixWag/DIsoN

DIsoN: Decentralized Isolation Networks for Out-of-Distribution Detection in Medical Imaging

TL;DR

This paper tackles safe deployment of medical-imaging ML models by enabling out-of-distribution (OOD) detection without sharing raw training data. It introduces Isolation Networks to quantify how difficult it is to separate a test sample from training data, and builds a decentralized DIsoN framework that exchanges only model parameters between a Source Node and a Target Node to perform this isolation. A class-conditioned variant, CC-DIsoN, further improves performance by limiting comparisons to the predicted class. Through experiments on four medical-imaging datasets and 12 OOD tasks, DIsoN and CC-DIsoN outperform strong baselines while preserving data privacy, offering a practical path toward remote, secure OOD-detection services. The approach also provides tunable trade-offs between inference compute and detection performance via hyperparameters and backbone choice.

Abstract

Safe deployment of machine learning (ML) models in safety-critical domains such as medical imaging requires detecting inputs with characteristics not seen during training, known as out-of-distribution (OOD) detection, to prevent unreliable predictions. Effective OOD detection after deployment could benefit from access to the training data, enabling direct comparison between test samples and the training data distribution to identify differences. State-of-the-art OOD detection methods, however, either discard the training data after deployment or assume that test samples and training data are centrally stored together, an assumption that rarely holds in real-world settings. This is because shipping the training data with the deployed model is usually impossible due to the size of training databases, as well as proprietary or privacy constraints. We introduce the Isolation Network, an OOD detection framework that quantifies the difficulty of separating a target test sample from the training data by solving a binary classification task. We then propose Decentralized Isolation Networks (DIsoN), which enables the comparison of training and test data when data-sharing is impossible, by exchanging only model parameters between the remote computational nodes of training and deployment. We further extend DIsoN with class-conditioning, comparing a target sample solely with training data of its predicted class. We evaluate DIsoN on four medical imaging datasets (dermatology, chest X-ray, breast ultrasound, histopathology) across 12 OOD detection tasks. DIsoN performs favorably against existing methods while respecting data-privacy. This decentralized OOD detection framework opens the way for a new type of service that ML developers could provide along with their models: providing remote, secure utilization of their training data for OOD detection services. Code: https://github.com/FelixWag/DIsoN

Paper Structure

This paper contains 29 sections, 2 theorems, 13 equations, 7 figures, 14 tables, 2 algorithms.

Key Result

Proposition 3.1

Let $\theta_{cent}$ be the model parameters from our centralized algorithm and $\theta_{dec}$ be the parameters from DIsoN. Let each site perform one local SGD step ($E=1$) with learning rate $\eta$, and aggregate with $\alpha=\tfrac{|B_s|}{|B_s|+N},\; \beta=\tfrac{N}{|B_s|+N}$. Then the decentraliz where$g_S(\theta)=\frac{1}{|B_s|}\sum_{\mathbf{x}_s\in B_s} \nabla_\theta L(\theta;\mathbf{x}_s,0)$

Figures (7)

  • Figure 1: (Top) Most OOD detection methods do not use training data after deployment because it cannot be shipped with the model. (Bottom) DIsoN enables decentralised comparison of test samples with the training data via model parameter exchange.
  • Figure 2: Overview of DIsoN: When a new scan is obtained at the deployment site, DIsoN is trained using parameter updates from both the deployment site and the model provider, who holds the ID training data, to isolate the target sample from the training data. The deployment site trains on the single target scan, while the model provider trains on the source data (optionally class-conditioned). Only model parameters are exchanged. (Right) After convergence, the scan is classified as OOD if it is isolated in few rounds, and as ID otherwise.
  • Figure 3: Examples of data.X-Ray: ID X-ray vs. OOD scan with pacemaker. Dermatology: ID lesion vs. OOD image with ruler. Ultrasound: ID artifact-free ultrasound vs. OOD scan containing annotations. Histopathology: ID mitotic‐cell patch vs. near‐OOD patch with different cancer type and far‐OOD patch with different staining.
  • Figure 4: (a)Effect of aggregation weight $\alpha$. Left: AUROC vs. $\alpha$. Higher $\alpha$ improves OOD detection by emphasizing the source updates. Right: Mean number of communication rounds until convergence (ID and OOD targets combined). Trade-off: Lower $\alpha$ values speed up convergence but reduce OOD performance. (b) Network Size. Global AUROC vs. FPR95 plot for three backbones (Slim ResNet18, ResNet18, ResNet34) across the same datasets. ResNet18 gives the balance between AUROC and FPR95. Grey dashed lines link backbones per dataset.
  • Figure 5: Effect of image augmentation. Left: Bar plots show that using random augmentation ("Yes Aug") during training improves AUROC and FPR95 for three datasets. Right: Density plots for dermatology: without augmentation, ID and OOD curves overlap heavily, whereas with augmentation OOD samples isolate fast and ID samples require more updates.
  • ...and 2 more figures

Theorems & Definitions (5)

  • Definition 3.1: Convergence Time $K$
  • Proposition 3.1: DIsoN and Centralized Isolation Network Equivalence for $E=1$
  • proof : Proof sketch
  • Proposition 3.1: DIsoN and Centralized Isolation Network Equivalence for $E=1$
  • proof : Proof.