UNMASK: Discovering and Causally Verifying Spurious Shortcuts in Text Classifiers

2026-08-10Computation and Language

Computation and LanguageMachine Learning
AI summary

The authors developed a system called UNMASK that automatically finds and confirms misleading text patterns that language models wrongly rely on to make decisions. Unlike past methods, UNMASK does this without extra human help by testing if these patterns truly affect the model’s predictions using counterfactual examples. They applied UNMASK to popular models like BERT and RoBERTa, successfully identifying known biases and improving performance on tricky test sets. Their method also matches the effectiveness of hand-labeled approaches on real-world data without needing demographic information. Additionally, the authors showed their discovery process works for analyzing reward model preferences, revealing understandable spurious correlations.

Neural language modelsSpurious correlationsCounterfactual interventionsBERTRoBERTaDeep Feature ReweightingMNLIHANS datasetCivilComments-WILDSReward models
Authors
Chidaksh Ravuru, Shashank Srivastava
Abstract
Neural language models trained on large crowdsourced corpora frequently exploit spurious surface patterns tied to target labels without true linguistic or causal relevance, boosting benchmark performance while failing on adversarial or out-of-distribution inputs. Existing approaches either require manual specification of the feature vocabulary or automate discovery only partially, leaving the gap between dataset-level correlation and model-level exploitation unaddressed. We present U N M ASK, a fully automated pipeline that discovers, causally verifies, and mitigates spurious correlations in text classifiers without additional human annotation. Given unlabeled training examples, U N M ASK generates candidate surface patterns as executable boolean expressions, filters them through a statistical validation protocol with independent replication, and establishes causal model dependence via verified counterfactual interventions. Causally confirmed features then serve as annotation-free group definitions for Deep Feature Reweighting, eliminating the group labels that standard DFR requires. Applied to BERT and RoBERTa trained on MNLI, our pipeline independently rediscovers established lexical-overlap and negation biases, verifying 9 of 10 features on BERT and 6 on RoBERTa, and improving HANS accuracy by up to 12.58 pp. On CivilComments-WILDS, programmatic groups match the 70.1% worst- group accuracy of hand-labeled DFR (Kirichenko et al., 2023) without demographic annotation. We further demonstrate that the discovery and validation stages generalize to reward model preference data, surfacing interpretable spurious correlations in RewardBench2.