DISCERN: Decoding Systematic Errors in Natural Language for Text Classifiers

Rakesh R. Menon, Shashank Srivastava

TL;DR

DISCERN is a new framework that uses Large Language Models (LLMs) to "talk through" the mistakes of text classifiers. By generating precise natural language descriptions of systematic errors, it allows developers to understand exactly where a model is failing and use those descriptions to automatically generate better training data, leading to significant performance gains and better human interpretability.

What Problem Does This Paper Address?

Even the best text classifiers suffer from systematic biases. These aren't just random flukes; they are patterns of failure caused by "annotation artifacts" (quirks in how the data was labeled) or a lack of examples for specific sub-populations (e.g., a sentiment analyzer that always fails on sarcastic tweets).

Traditionally, researchers have tried to find these "error slices" using keywords. However, keywords are a blunt instrument—they require domain expertise to pick and often fail to capture the nuanced, structural reasons why a model struggles. There is a massive gap between seeing a list of misclassified examples and actually articulating the underlying rule that links them.

Methods

The authors introduce DISCERN, an iterative framework consisting of four main stages:

  1. Clustering: The system takes examples from a validation set where the classifier failed and groups them using agglomerative clustering based on sentence embeddings. This identifies "pockets" of high error rates.
  2. Predicate Generation: An Explainer LLM (like GPT-3.5) looks at a cluster of errors and generates a "predicate"—a concise natural language description of what connects these examples (e.g., "News articles discussing legal challenges in the tech sector").
  3. Predicate Refinement: To ensure the description is precise and doesn't accidentally describe "correct" examples, DISCERN uses an interaction loop. An Evaluator LLM (Mixtral-8x7B) checks the description against examples inside and outside the cluster. The Explainer then refines the description until it reaches a specific precision threshold.
  4. Model Refinement: Once a precise error description is found, it’s used for synthetic augmentation (generating new training data) or active learning (querying unlabeled pools).
The four stages of the DISCERN framework: Clustering, Predicate Generation, Predicate Refinement, and Dataset Aggregation.

Datasets

The framework was evaluated on three diverse multiclass text classification benchmarks:

  • TREC: A question classification task (6 classes).
  • AGNews: A collection of news articles categorized by topic (4 classes).
  • COVID Tweets: A sentiment analysis task for tweets related to the pandemic (3 classes).

Key Insights and Ideas

  • Precision is King: Vague descriptions are useless for debugging. The iterative loop between the Explainer and Evaluator LLMs is crucial because it forces the system to find the minimal description that separates errors from successes.
  • Explanations > Exemplars: In a human study, the researchers found that people were 25% more effective at identifying new biased instances when given a language explanation compared to just being shown a list of example errors.
  • Bridging the "Black Box": By turning abstract vector-space clusters into English sentences, DISCERN allows developers to audit the debugging process.
  • Scaling with LLM Power: Results showed that as you move to more powerful models (like GPT-4), the quality of the error descriptions—and the resulting classifier improvement—increases significantly.

Key Results

  • Accuracy Boost: On the AGNews dataset, adding 1,000 synthetic examples generated by DISCERN improved classifier accuracy by ~3% absolute, significantly outperforming "naive" augmentation.
  • Error Reduction: In specific "problem clusters" for the TREC and Covid datasets, DISCERN reduced misclassification rates by at least 10%, even achieving perfect classification in some previously failing segments.
  • Outperforming Keywords: DISCERN consistently beat keyword-based baselines (like DEIM), proving that free-form natural language is a superior medium for describing model failures.
Classifier accuracy improvements across TREC, Covid, and AG-News datasets using DISCERN-guided data augmentation compared to baselines.

Limitations and Future Work

The authors acknowledge a few hurdles:

  • LLM Dependency: The framework relies heavily on high-quality (and often proprietary) LLMs.
  • Clustering Sensitivity: The initial stage depends on hyperparameters like distance thresholds. If the clustering is too coarse or too fine, the resulting descriptions might be less useful.
  • Granularity: Future work could explore "top-down" approaches to explain biases at different levels of granularity.
  • Transferability: A promising direction is investigating whether biases identified in one classifier are also present in—and can be used to fix—larger models.

Summary updated

BibTeX
@inproceedings{menon2024discern,
  author = {Rakesh R. Menon and Shashank Srivastava},
  title = {{DISCERN: Decoding Systematic Errors in Natural Language for Text Classifiers}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.1091},
}
Figure