Skip to main content
QUICK REVIEW

[论文解读] Adapting Feature Attenuation to NLP

Tianshuo Yang, Ryan Rabinowitz|arXiv (Cornell University)|Jan 2, 2026
Topic ModelingComputer Science被引用 0
一句话总结

论文将 COSTARR 特征衰减的 OSR 方法改编到 NLP,使用 BERT-base 和 GPT-2,在 176 个 arXiv 领域进行评估;COSTARR 未优于 MaxLogit 或 MSP,且自由能表现不佳。

ABSTRACT

Transformer classifiers such as BERT deliver impressive closed-set accuracy, yet they remain brittle when confronted with inputs from unseen categories--a common scenario for deployed NLP systems. We investigate Open-Set Recognition (OSR) for text by porting the feature attenuation hypothesis from computer vision to transformers and by benchmarking it against state-of-the-art baselines. Concretely, we adapt the COSTARR framework--originally designed for classification in computer vision--to two modest language models (BERT (base) and GPT-2) trained to label 176 arXiv subject areas. Alongside COSTARR, we evaluate Maximum Softmax Probability (MSP), MaxLogit, and the temperature-scaled free-energy score under the OOSA and AUOSCR metrics. Our results show (i) COSTARR extends to NLP without retraining but yields no statistically significant gain over MaxLogit or MSP, and (ii) free-energy lags behind all other scores in this high-class-count setting. The study highlights both the promise and the current limitations of transplanting vision-centric OSR ideas to language models, and points toward the need for larger backbones and task-tailored attenuation strategies.

研究动机与目标

  • 在 NLP 中激发开放集识别(OSR)的动机,并解决对未见类别的模型自信度问题。
  • 将原本用于视觉的 COSTARR 移植到基于变换器的文本分类器(BERT-base 与 GPT-2)。
  • 在一个大型的 176 类 NLP 任务上,对衰减式、基于 logits 的和基于能量的 OSR 得分与基线进行基准比较。
  • 评估将视觉为中心的 OSR 思路迁移到语言模型上的实际效果及局限性。

提出的方法

  • 通过提取未衰减前的特征 F(x) 和衰减后特征 H_j = F(x) ⊙ W_j,来适配 COSTARR 给变换器分类器,并得到组合得分 S(x) = λ_m(x) · Sim_m(x)。
  • 从连接特征 C_j(x) = Concat(F(x), H_j) 和类别均值 μ_C_j,通过余弦样式归一化计算 Sim_j(x)。
  • 通过 logits 的全局最近邻(GNL)风格归一化定义 λ_m(x),并为未知检测选择 S(x)。
  • 在 176 个 arXiv 学科领域上微调两种轻量级模型(BERT-base 和 GPT-2),并使用 OOSA 和 AUOSCR 进行评估。
  • 将 COSTARR 与 MSP、MaxLogit 以及温度缩放的自由能得分作为基线进行比较。
  • 使用 arxiv-abstracts-2021 数据集,含 132 个已知类别和 44 个未知类别,测试集占 10%。
Figure 1: Logit for class $j$ is formed from a dot product of its weights $W_{j}$ , and the input features $F$ , but the low weighted features are attenuated and hence ignored by this class’s projection. The top color bar shows the weights $W$ for category ’gr-qc’ from BERT (base)’s custom classific
Figure 1: Logit for class $j$ is formed from a dot product of its weights $W_{j}$ , and the input features $F$ , but the low weighted features are attenuated and hence ignored by this class’s projection. The top color bar shows the weights $W$ for category ’gr-qc’ from BERT (base)’s custom classific

实验结果

研究问题

  • RQ1COSTARR 是否在不重新训练的情况下迁移到 NLP 并提供可检测的开放集信号?
  • RQ2在具有大量类别的 NLP 开放集任务中,COSTARR 是否优于 MSP、MaxLogit 或自由能得分?
  • RQ3在一个大规模、类别数高的 NLP 分类任务(176 类)中,OSR 方法的表现如何?
  • RQ4将面向视觉的 OSR 方法应用于语言模型和 NLP 数据集的局限性有哪些?

主要发现

  • COSTARR 可以扩展到 NLP 而无需额外训练,但未表现出统计学意义上的相对于 MaxLogit 或 MSP 的提升。
  • 自由能分数在该 NLP 任务上表现落后于其他方法。
  • OOSA 得分在 CostARR 与 MaxLogit 间差异不大(BERT 为 0.319 vs 0.319;GPT-2 为 0.311 vs 0.303),MSP 的表现略有差异(BERT 和 GPT-2 均为 0.320)。
  • 自由能在 OOSA 上分别达到 0.172(BERT)和 0.174(GPT-2),在 AUOSCR 上分别为 0.167(BERT)和 0.150(GPT-2)。
  • AUOSCR:COSTARR(BERT)0.236、(GPT-2)0.223;MaxLogit(BERT)0.233、(GPT-2)0.236;MSP(BERT)0.251、(GPT-2)0.250;自由能(BERT)0.167、(GPT-2)0.150。
  • 结果表明在较小模型(BERT-base、GPT-2)和大量类别(176)下,OSR 方法的表现并未超越简单基线。
Figure 2: OOSA at various thresholds for BERT (base).
Figure 2: OOSA at various thresholds for BERT (base).

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。