Explore Spurious Correlations at the Concept Level in Language Models for Text Classification

Yuhang Zhou, Paiheng Xu, Xiaoyu Liu, Bang An, Wei Ai, Furong Huang

TL;DR

Language models often learn "shortcuts" by associating high-level concepts (like "food" or "service") with specific labels due to imbalances in training data. This paper introduces Bias@C, a metric to quantify these concept-level spurious correlations, and proposes a novel mitigation strategy using LLM-generated counterfactual data to rebalance datasets without sacrificing model performance.

What Problem Does This Paper Address?

Large Language Models (LMs) are incredibly capable, but they are prone to "shortcut learning"—relying on spurious correlations rather than genuine semantic understanding. While previous research has extensively studied shortcuts at the word or syntax level, this paper tackles the more abstract concept level.

For example, if a sentiment analysis training set contains many positive reviews mentioning "food" and very few negative ones, a model might learn a shortcut: If "food" is mentioned, the label is likely positive. Consequently, it might misclassify a negative review like "The Thai steak was underwhelming" simply because it contains a food-related concept. The challenge lies in the fact that concepts are hard to identify and label at scale compared to individual words.

Methods

The authors propose a three-stage framework to identify, measure, and mitigate these biases:

  1. Concept Labeling with LLMs: Since most datasets lack concept-level metadata, the authors use ChatGPT (GPT-3.5) to annotate sentences with relevant concepts (e.g., "food," "price," "service").
  2. Quantifying Bias (Bias@C): They introduce a new metric, Bias@C, which calculates the discrepancy in model accuracy when a specific concept is present versus when it is absent. A Bias@C score near zero indicates a robust model, while high positive or negative scores reveal a reliance on conceptual shortcuts.
  3. Mitigation via Counterfactual Rebalancing: To fix the bias, the authors move beyond simple downsampling (which throws away useful data). Instead, they use ChatGPT to generate counterfactual examples. If a dataset lacks negative reviews about "food," they take existing negative reviews and ask the LLM to "inject" the food concept while maintaining the original negative sentiment.
Figure 2: A concept can be expressed in multiple ex- pressions, and in the embedding space of LMs, these expressions of one concept can be mapped into similar positions. LMs will form a shortcut between a specific concept and a label and utilize in the future prediction.

Datasets

The study evaluates five diverse datasets:

  • Sentiment Analysis: Yelp, IMDB, Amazon Shoe (AS), and CeBaB (which includes human-annotated concepts).
  • Question Answering: BoolQ (Yes/No questions).

The authors observed that even well-curated datasets like IMDB and Yelp have highly imbalanced concept-label distributions, as shown in the figure below.

Figure 3: Label distribution of the texts with a spe- cific concept for each dataset. We can observe the label distribution in multiple concepts, such as “music” in IMDB, “food” in Yelp datasets are highly imbalanced.

Key Insights and Ideas

  • Embeddings as the Root Cause: The authors hypothesize that LMs group different tokens representing the same concept (e.g., "salsa" and "Thai steak") closely in their internal embedding space. If these clusters frequently coincide with a specific label during training, the model adopts the shortcut.
  • Beyond Token Matching: Simply masking the most frequent words associated with a concept (like "waiter" for "service") does not fully eliminate the bias. This proves that models are learning a semantic concept rather than just memorizing a few specific keywords.
  • ICL is Vulnerable: The bias isn't limited to fine-tuning. In-Context Learning (ICL) also suffers; if the few-shot exemplars provided in a prompt are conceptually biased, the model's predictions on new data will follow that bias.
  • Counterfactuals > Downsampling: While downsampling rebalances the data, it reduces the overall dataset size and harms general accuracy ("utility"). LLM-generated counterfactuals provide a "best of both worlds" solution by rebalancing the concepts while increasing the total amount of training data.

Key Results

  • Bias Detection: Fine-tuned models showed significant bias. For instance, DistilBERT trained on IMDB had a Bias@C of 12.07% for the "music" concept, indicating a strong positive shortcut.
  • Mitigation Success: The proposed upsampling method with counterfactuals reduced the mean absolute Bias@C in DistilBERT from 4.90% to 2.74%.
  • Utility Boost: Unlike downsampling, which often hurts performance, the counterfactual approach increased the average robust accuracy (Acc@C) from 79.24% to 80.38%.
  • Generalizability: Similar patterns were observed in both small models (DistilBERT) and large ones (LLaMA2 7B), suggesting that concept-level spurious correlation is a fundamental challenge across model scales.

Limitations and Future Work

  • Annotation Quality: While ChatGPT's concept labeling was 90.4% accurate compared to humans, there is still room for improvement using more advanced models like GPT-4.
  • ICL Mitigation: The paper demonstrates that balanced prompts help but do not fully eliminate bias in In-Context Learning. Developing specific mitigation techniques for the ICL setting remains an open challenge.
  • Task Variety: The current work focuses on classification and binary QA. Future research could explore these biases in more complex generative tasks or multi-modal (vision-language) models.

Summary updated

BibTeX
@inproceedings{zhou2024explore,
  author = {Yuhang Zhou and Paiheng Xu and Xiaoyu Liu and Bang An and Wei Ai and Furong Huang},
  title = {{Explore Spurious Correlations at the Concept Level in Language Models for Text Classification}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=pKXzYVOG7Y},
}
Figure