MASKER: Masked Keyword Regularization for Reliable Text Classification
Seung Jun Moon, Sangwoo Mo, Kimin Lee, Jaeho Lee, Jinwoo Shin
Abstract
Pre-trained language models have achieved state-of-the-art accuracies on various text classification tasks, e.g., sentiment analysis, natural language inference, and semantic textual similarity. However, the reliability of the fine-tuned text classifiers is an often underlooked performance criterion. For instance, one may desire a model that can detect out-of-distribution (OOD) samples (drawn far from training distribution) or be robust against domain shifts. We claim that one central obstacle to the reliability is the over-reliance of the model on a limited number of keywords, instead of looking at the whole context. In particular, we find that (a) OOD samples often contain in-distribution keywords, while (b) cross-domain samples may not always contain keywords; over-relying on the keywords can be problematic for both cases. In light of this observation, we propose a simple yet effective fine-tuning method, coined masked keyword regularization (MASKER), that facilitates context-based prediction. MASKER regularizes the model to reconstruct the keywords from the rest of the words and make low-confidence predictions without enough context. When applied to various pre-trained language models (e.g., BERT, RoBERTa, and ALBERT), we demonstrate that MASKER improves OOD detection and cross-domain generalization without degrading classification accuracy. Code is available at https://github.com/alinlab/MASKER.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Discovering and Mitigating Visual Biases Through Keyword Explanation cites Object-aware Contrastive Learning for Debiased Scene Representation
- Revisiting Few-sample BERT Fine-tuning cites ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- Revisiting Few-sample BERT Fine-tuning cites ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators
- Revisiting Few-sample BERT Fine-tuning cites On the Stability of Fine-tuning BERT: Misconceptions, Explanations, and Strong Baselines
- On the Stability of Fine-tuning BERT: Misconceptions, Explanations, and Strong Baselines cites Revisiting Few-sample BERT Fine-tuning
- Object-aware Contrastive Learning for Debiased Scene Representation cites CSI: Novelty Detection via Contrastive Learning on Distributionally Shifted Instances
- On the Stability of Fine-tuning BERT: Misconceptions, Explanations, and Strong Baselines cites ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
Cited by top-tier papers5
- Object-aware Contrastive Learning for Debiased Scene RepresentationSangwoo Mo, Hyunwoo Kang, Kihyuk Sohn, Chun-Liang Li et al.NeurIPS 2021 · 57 citations
- TACIT: A Target-Agnostic Feature Disentanglement Framework for Cross-Domain Text ClassificationRui Song, Fausto Giunchiglia, Yingji Li, Mingjie Tian et al.AAAI 2024 · 10 citations
- MaskDroid: Robust Android Malware Detection with Masked Graph RepresentationsJingnan Zheng, Jiahao Liu, An Zhang, Jun Zeng et al.ASE 2024 · 6 citations
- Discovering and Mitigating Visual Biases Through Keyword ExplanationYounghyun Kim, Sangwoo Mo, Minkyu Kim, Kyungmin Lee et al.CVPR 2024
- STINMatch: Semi-Supervised Semantic-Topological Iteration Network for Financial Risk Detection via News Label DiffusionXurui Li, Yue Qin, Rui Zhu, Tianqianjin Lin et al.EMNLP 2023
Builds on6
- ALBERT: A Lite BERT for Self-supervised Learning of Language RepresentationsZhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel et al.ICLR 2020 · 7,418 citations
- CSI: Novelty Detection via Contrastive Learning on Distributionally Shifted InstancesJihoon Tack, Sangwoo Mo, Jongheon Jeong, Jinwoo ShinNeurIPS 2020 · 755 citations
- ELECTRA: Pre-training Text Encoders as Discriminators Rather Than GeneratorsKevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. ManningICLR 2020 · 541 citations
- On the Stability of Fine-tuning BERT: Misconceptions, Explanations, and Strong BaselinesMarius Mosbach, Maksym Andriushchenko, Dietrich KlakowICLR 2021 · 448 citations
- Revisiting Few-sample BERT Fine-tuningTianyi Zhang, Felix Wu, Arzoo Katiyar, Kilian Q. Weinberger et al.ICLR 2021 · 172 citations
Related papers
- Is Fine-tuning Needed? Pre-trained Language Models Are Near Perfect for Out-of-Domain DetectionRheeya Uppaal, Junjie Hu, Yixuan LiACL 2023 · 9 citations
- Calibrated Language Model Fine-Tuning for In- and Out-of-Distribution DataLingkai Kong, Haoming Jiang, Yuchen Zhuang, Jie Lyu et al.EMNLP 2020 · 47 citations
- On the Interplay Between Fine-tuning and Sentence-Level Probing for Linguistic Knowledge in Pre-Trained TransformersMarius Mosbach, Anna Khokhlova, Michael A. Hedderich, Dietrich KlakowEMNLP Findings 2020 · 16 citations
- CED: Comparing Embedding Differences for Detecting Out-of-Distribution and Hallucinated TextHakyung Lee, Keon-Hee Park, Hoyoon Byun, Jeyoon Yeom et al.EMNLP Findings 2024 · 1 citation
- Preserving Pre-trained Features Helps Calibrate Fine-tuned Language ModelsGuande He, Jianfei Chen, Jun ZhuICLR 2023 · 1 citation
