Skip to main content
QUICK REVIEW

[Paper Review] Average of Pruning: Improving Performance and Stability of Out-of-Distribution Detection

Zhen Cheng, Fei Zhu|arXiv (Cornell University)|Mar 2, 2023
Anomaly Detection Techniques and ApplicationsComputer Science6 citations
TL;DR

This paper proposes Average of Pruning (AoP), a simple yet effective method that combines model averaging and structured pruning to improve the stability and performance of out-of-distribution (OOD) detection in deep neural networks. By smoothing the loss landscape through averaging and reducing overfitting via pruning, AoP achieves consistent improvements across multiple architectures and datasets, with significant gains in AUROC and robustness to model selection.

ABSTRACT

Detecting Out-of-distribution (OOD) inputs have been a critical issue for neural networks in the open world. However, the unstable behavior of OOD detection along the optimization trajectory during training has not been explored clearly. In this paper, we first find the performance of OOD detection suffers from overfitting and instability during training: 1) the performance could decrease when the training error is near zero, and 2) the performance would vary sharply in the final stage of training. Based on our findings, we propose Average of Pruning (AoP), consisting of model averaging and pruning, to mitigate the unstable behaviors. Specifically, model averaging can help achieve a stable performance by smoothing the landscape, and pruning is certified to eliminate the overfitting by eliminating redundant features. Comprehensive experiments on various datasets and architectures are conducted to verify the effectiveness of our method.

Motivation & Objective

  • To investigate the instability and overfitting issues in OOD detection performance during the training trajectory of deep neural networks.
  • To identify that overfitting and instability in AUROC occur even when training error is near zero, especially in the final training stages.
  • To address instability by leveraging model averaging to smooth the loss landscape and reduce sensitivity to small weight perturbations.
  • To mitigate overfitting by applying pruning to eliminate redundant and noisy features common across in-distribution and out-of-distribution data.
  • To develop a plug-and-play module, AoP, that enhances OOD detection without modifying existing detection heads or training procedures.

Proposed method

  • Model averaging is applied to the final training checkpoints, using a moving average of the online model’s weights to produce a flatter, more stable weight configuration.
  • Pruning is applied post-training using the Lottery Ticket Hypothesis (LTH) with weight rewinding, enforcing global sparsity to remove redundant features.
  • The combination of averaging and pruning forms AoP, a modular enhancement that can be applied to any OOD detection method.
  • The method is grounded in theoretical analysis linking L1 regularization (via LASSO) to reduced overfitting, motivating the use of pruning as a sparsity-inducing mechanism.
  • Feature visualization and metric tracking (AUROC, AURC, FPR95) are used to evaluate the impact of AoP on representation learning and detection performance.
  • Experiments are conducted across multiple datasets (e.g., CIFAR-10, LSUN) and architectures (ResNet-18, VGG-16, WideResNet, MobileNet) to validate generalization.

Experimental results

Research questions

  • RQ1How does the performance of OOD detection, measured by AUROC, evolve during the training trajectory of deep neural networks?
  • RQ2Why does AUROC degrade or fluctuate sharply even when test error remains low, particularly in the final training stages?
  • RQ3To what extent does model averaging stabilize OOD detection performance by smoothing the loss landscape?
  • RQ4How does pruning reduce overfitting in OOD detection by eliminating shared, noisy features between in-distribution and out-of-distribution data?
  • RQ5Can a simple, modular method like AoP consistently improve OOD detection across diverse architectures and datasets?

Key findings

  • The AUROC of OOD detection exhibits instability in the final training phase, even when test error is stable, indicating unreliable model selection.
  • Overfitting in OOD detection occurs when training continues past near-zero training error, causing models to memorize noisy, shared features across ID and OOD data.
  • Model averaging significantly improves stability, reducing sensitivity to small weight perturbations and making the final checkpoint more reliable.
  • Pruning via LTH with weight rewinding achieves the best performance among iterative pruning strategies, outperforming random pruning and fine-tuning.
  • AoP improves AUROC by 0.72 points on ResNet-18 (CIFAR-10) and 0.40 points on WideResNet-40-2, with consistent gains across all evaluated architectures.
  • AoP also improves misclassification detection, increasing AUROC from 93.58% to 93.98% and reducing FPR95 from 40.03% to 36.07% on WideResNet-40-2.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.