Understanding and Mitigating Spurious Correlations in Text Classification with Neighborhood Analysis
Abstract
Recent research has revealed that machine learning models have a tendency to leverage spurious correlations that exist in the training set but may not hold true in general circumstances. For instance, a sentiment classifier may erroneously learn that the token “performances” is commonly associated with positive movie reviews.Relying on these spurious correlations degrades the classifier’s performance when it deploys on out-of-distribution data.In this paper, we examine the implications of spurious correlations through a novel perspective called neighborhood analysis. The analysis uncovers how spurious correlations lead unrelated words to erroneously cluster together in the embedding space. Driven by the analysis, we design a metric to detect spurious tokens and also propose a family of regularization methods, NFL (doN’t Forget your Language) to mitigate spurious correlations in text classification.Experiments show that NFL can effectively prevent erroneous clusters and significantly improve the robustness of classifiers without auxiliary data. The code is publicly available at https://github.com/oscarchew/doNt-Forget-your-Language.- Anthology ID:
- 2024.findings-eacl.68
- Volume:
- Findings of the Association for Computational Linguistics: EACL 2024
- Month:
- March
- Year:
- 2024
- Address:
- St. Julian’s, Malta
- Editors:
- Yvette Graham, Matthew Purver
- Venue:
- Findings
- SIG:
- Publisher:
- Association for Computational Linguistics
- Note:
- Pages:
- 1013–1025
- Language:
- URL:
- https://preview.aclanthology.org/build-pipeline-with-new-library/2024.findings-eacl.68/
- DOI:
- Cite (ACL):
- Oscar Chew, Hsuan-Tien Lin, Kai-Wei Chang, and Kuan-Hao Huang. 2024. Understanding and Mitigating Spurious Correlations in Text Classification with Neighborhood Analysis. In Findings of the Association for Computational Linguistics: EACL 2024, pages 1013–1025, St. Julian’s, Malta. Association for Computational Linguistics.
- Cite (Informal):
- Understanding and Mitigating Spurious Correlations in Text Classification with Neighborhood Analysis (Chew et al., Findings 2024)
- PDF:
- https://preview.aclanthology.org/build-pipeline-with-new-library/2024.findings-eacl.68.pdf