[Paper Review] Adapting Feature Attenuation to NLP
The paper adapts the COSTARR feature-attenuation OSR approach to NLP with BERT-base and GPT-2 on 176 arXiv categories; COSTARR does not outperform MaxLogit or MSP, and free-energy underperforms.
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.
Motivation & Objective
- Motivate open-set recognition (OSR) in NLP and address model overconfidence on unseen classes.
- Port COSTARR—originally for vision—to transformer-based text classifiers (BERT-base and GPT-2).
- Benchmark attenuation-based, logit-based, and energy-based OSR scores against baselines on a large 176-class NLP task.
- Assess practical effectiveness and limitations of transferring vision-centric OSR ideas to language models.
Proposed method
- Adapt COSTARR to transformer classifiers by extracting pre-attenuation features F(x) and post-attenuation features H_j = F(x) ⊙ W_j, with a combined COSTARR score S(x) = λ_m(x) · Sim_m(x).
- Compute Sim_j(x) from concatenated features C_j(x) = Concat(F(x), H_j) and class-wise means μ_C_j with cosine-like normalization.
- Define λ_m(x) via a Global Nearest Neighbor–like normalization of logits (GNL) and select S(x) for unknown detection.
- Fine-tune two lightweight models (BERT-base and GPT-2) on 176 arXiv subject areas and evaluate using OOSA and AUOSCR.
- Compare COSTARR with MSP, MaxLogit, and a temperature-scaled free-energy score as baselines.
- Use arxiv-abstracts-2021 dataset with 132 known classes and 44 unknowns, 10% test split.

Experimental results
Research questions
- RQ1Does COSTARR transfer to NLP without retraining and provide a detectable Open-Set signal?
- RQ2Does COSTARR surpass MSP, MaxLogit, or free-energy scores in NLP open-set tasks with many classes?
- RQ3How do OSR methods perform on a large, high-class-count NLP classification task (176 categories)?
- RQ4What are the limitations of applying vision-based OSR methods to language models and NLP datasets?
Key findings
- COSTARR extends to NLP without extra training but shows no statistically significant gains over MaxLogit or MSP.
- Free-energy score underperforms compared to other methods on this NLP task.
- OOSA scores are similar for CostARR and MaxLogit (0.319 vs 0.319 for BERT; 0.311 vs 0.303 for GPT-2) and MSP performs slightly differently (0.320 for both BERT and GPT-2).
- Free-energy achieves 0.172 (BERT) and 0.174 (GPT-2) for OOSA, and 0.167 (BERT) and 0.150 (GPT-2) for AUOSCR.
- AUOSCR: COSTARR 0.236 (BERT) and 0.223 (GPT-2); MaxLogit 0.233 (BERT) and 0.236 (GPT-2); MSP 0.251 (BERT) and 0.250 (GPT-2); free-energy 0.167 (BERT) and 0.150 (GPT-2).
- The results suggest small models (BERT-base, GPT-2) and many classes (176) challenge OSR methods, with performance not exceeding simple baselines.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.