通过分析内部激活的频谱变化,提前发现神经网络的错误预测。
Detecting Neural Network Failures through Spectral Analysis of Internal Activations
- 用频域距离衡量层间激活变化,捕捉隐藏的错误信号。
- 在CIFAR-10上检测错误的准确率比传统方法高25-30个百分点。
- 适合关注模型可靠性与安全性的研究人员使用。
神经网络误分类会引发内部激活的特征性频谱不稳定性,这种现象在输出层不可见。本文将其定义为频谱漂移——连续层激活间的频率域距离,并实证表明错误预测的漂移值显著高于正确预测(提升1.9%,p<0.001)。该频谱特征在内部处理过程中显现,但在最终输出中被掩盖,解释了为何基于置信度的检测方法效果不佳。本文提出自检测神经网络(SDNN),利用短时傅里叶变换、小波分解和统计矩,在网络深度上监测频谱动态,以捕捉多尺度特征。一个轻量级检测器(参数增加5%)通过渐进式学习策略,在自然误分类、分布偏移和对抗扰动数据上训练,识别故障模式。CIFAR-10实验显示,SDNN在三组种子下平均获得79.0±25.3% AUROC,显著优于最大软最大(50.5%)和能量评分(52.9%)等基线方法,提升约25-30个百分点。消融实验表明小波分解和统计特征贡献稳定,而STFT作用尚不明确。本工作确立内部激活频谱分析是提升神经网络可靠性的重要方向,揭示了输出方法无法获取的诊断信息。
原文摘要 · Abstract (English)
Neural network misclassifications exhibit characteristic spectral instability in internal activations that is invisible at the output layer. This phenomenon is identified and formalized as Spectral Drift -- the frequency-domain distance between consecutive layer activations -- with empirical validation showing that failures exhibit significantly higher drift than correct predictions (1.9% increase, p<0.001). This spectral signature emerges during internal processing but becomes masked in final outputs, explaining why confidence-based detection methods struggle. This work introduces Self-Detecting Neural Networks (SDNN), a framework that monitors spectral dynamics across network depth using Short-Time Fourier Transform, wavelet decomposition, and statistical moments to capture multi-scale spectral features. A lightweight detector network (5% parameter overhead) learns to identify failure-indicative patterns via curriculum learning on progressively challenging distributions: natural misclassifications, distribution shifts, and adversarial perturbations. Experiments on CIFAR-10 demonstrate that SDNN achieves 79.0 +/- 25.3% AUROC across three seeds, substantially outperforming confidence-based baselines including MaxSoftmax (50.5%) and Energy Score (52.9%) by approximately 25-30 percentage points. Ablation studies reveal that wavelet decomposition and statistical features make consistent contributions, while STFT's role remains unclear. This work establishes spectral analysis of internal activations as a promising direction for neural network reliability, revealing diagnostic information inaccessible to output-based approaches.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。