通过分解激活空间,提升模型对分布外样本的检测能力。
Activation Subspaces for Out-of-Distribution Detection
- 用权重矩阵奇异值分解分离激活中的关键与无关成分。
- 远分布偏移下,无关成分更有效区分分布外数据。
- 适合需要高可靠性检测的工业级深度学习应用。
为确保深度模型在真实场景中的可靠性,分布外(OOD)检测旨在区分接近训练分布(in-distribution, ID)的样本与远离训练分布的样本(OOD)。本文提出一种新方法,通过分类头权重矩阵的奇异值分解,将模型激活分解为对分类输出贡献最大和最小的成分。研究发现,在大分布偏移(Far-OOD)场景下,无关成分所构成的子空间比原始激活更能有效区分ID与OOD数据,因为该子空间受分类目标影响较小,特征更“纯净”。而在小分布偏移(Near-OOD)场景下,仅使用关键成分可避免干扰,提升性能。结合两者优势,提出名为ActSub的方法,在多个标准OOD基准测试中达到当前最优效果。
原文摘要 · Abstract (English)
To ensure the reliability of deep models in real-world applications, out-of-distribution (OOD) detection methods aim to distinguish samples close to the training distribution (in-distribution, ID) from those farther away (OOD). In this work, we propose a novel OOD detection method that utilizes singular value decomposition of the weight matrix of the classification head to decompose the model's activations into decisive and insignificant components, which contribute maximally, respectively minimally, to the final classifier output. We find that the subspace of insignificant components more effectively distinguishes ID from OOD data than raw activations in regimes of large distribution shifts (Far-OOD). This occurs because the classification objective leaves the insignificant subspace largely unaffected, yielding features that are ''untainted'' by the target classification task. Conversely, in regimes of smaller distribution shifts (Near-OOD), we find that activation shaping methods profit from only considering the decisive subspace, as the insignificant component can cause interference in the activation space. By combining two findings into a single approach, termed ActSub, we achieve state-of-the-art results in various standard OOD benchmarks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。