Attribution-Guided Masking for Robust Cross-Domain Sentiment Classification
Not on the map. Why?
Abstract (arXiv)
While pre-trained Transformer models achieve high accuracy on in-domain sentiment classification, they frequently experience severe performance degradation when transferring to out-of-domain data. We hypothesize that this generalization gap is driven by reliance on domain-specific spurious tokens. After demonstrating that post-hoc-token-level attribution drift fails to predict this gap, we propose Attribution-Guided Masking (AGM), a training time intervention that dynamically detects and penalizes highly attributed spurious tokens during fine-tuning. AGM's core component is a gradient based attribution masking loss (Lmask), which can optionally be combined with a counterfactual contrastive loss to enforce domain-invariant representations, all without requiring target-domain labels or human annotation. Evaluated in a strict zero-shot transfer setting across four diverse domains with eight random seeds, AGM achieves competitive generalization compared to five strong baselines on the hardest transfer (Sentiment140): Delta = 0.244 versus DANN (0.264), DRO (0.248), Fish (0.247), and IRM (0.238), while uniquely providing token-level interpretability into which features drive the generalization gap. Our qualitative analysis confirms that AGM suppresses attribution on domain-specific tokens such as @mentions, hashtags, and slang, shifting reliance toward domain-invariant sentiment markers. Our ablation study further confirms that attribution-guided masking is the critical component: removing it or replacing it with random token selection consistently degrades performance on difficult transfers.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 11 of its 19 references that are in the map. First posted on arXiv 4 May 2026.
Builds on
11 of 19 references.
References · 11
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2017Axiomatic Attribution for Deep Networkscited by 3,384
- 2015Domain-Adversarial Training of Neural Networkscited by 3,044
- 2019Invariant Risk Minimizationcited by 1,854
- 2019Distributionally Robust Neural Networks for Group Shifts: On the Importance of Regularization for Worst-Case Generalizationcited by 1,247
- 2018Annotation Artifacts in Natural Language Inference Datacited by 671
- 2017Right for the Right Reasons: Training Differentiable Models by Constraining their Explanationscited by 294
- 2020The Risks of Invariant Risk Minimizationcited by 262
- 2020An Empirical Study on Robustness to Spurious Correlations using Pre-trained Language Modelscited by 134
Built on by
Not cited yet.