Feature selection in text classification: Identifying spurious words with causal inference methods
Abstract
As has been scrutinized by many, non-causal model may contain spurious correlations that act like shortcuts during the prediction phase, undermining cross-domain accuracy. This can be caused by biased training data that contains spurious words with neutral meanings yet can induce the model to predict wrongly. Based on this assumption, we propose a series of methods to detect these spurious words before feeding the model with the training data. We used advanced causal inference methods which are arising novas in recent studies, such as propensity score matching and inverse propensity score weighting to facilitate the feature selection before training. We experimented with multiple approaches to estimate propensity scores and got profound improvements. We further experimented with BERT model to evaluate the effectiveness of feature selection and find that the model performance with in-domain and out-of-domain testing samples is boosted after we remove the spurious words detected by our methods in the training data.
References
- Pang, Bo, Lillian Lee, and Shivakumar Vaithyanathan. "Thumbs up? Sentiment classification using machine learning techniques." arXiv preprint cs/0205070 (2002).
- Bing, L. "Sentiment Analysis and Opinion Mining (Synthesis Lectures on Human Language Technologies)." University of Illinois: Chicago, IL, USA (2012).
- Carosia, A. E. O., Guilherme Palermo Coelho, and A. E. A. Silva. "Analyzing the Brazilian financial market through Portuguese sentiment analysis in social media." Applied Artificial Intelligence 34.1 (2020): 1-19.
- Wang, Zhao, and Aron Culotta. "Identifying spurious correlations for robust text classification." arXiv preprint arXiv:2010.02458 (2020).
- Feder, Amir, et al. "Causal inference in natural language processing: Estimation, prediction, interpretation and beyond." arXiv preprint arXiv:2109.00725 (2021).
- Michael J. Paul. 2017. "Feature Selection as Causal Inference: Experiments with Text Classification." In Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017), pages 163–172, Vancouver, Canada. Association for Computational Linguistics.
- Dehejia, Rajeev H., and Sadek Wahba. "Propensity score-matching methods for nonexperimental causal studies." Review of Economics and statistics 84.1 (2002): 151-161.
- Gordon J. G. Asmundson. Comprehensive clinical psychology 2nd Edition: Vol. 3: Research Methods in Clinical Psychology. Elsevier Science Ltd, 2022.
- Austin, Peter C. "An introduction to propensity score methods for reducing the effects of confounding in observational studies." Multivariate behavioral research 46.3 (2011): 399-424.
- P.R. Rosenbaum and D.B. Rubin. "The central role of the propensity score in observational studies for causal effects." Biometrika 70(1983):41-55.
- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. "BERT: pre-training of deep bidirectional transformers for language understanding." CoRR, abs/1810.04805.
- Katherine A. Keith, David Jensen, and Brendan O’Connor. 2020. "Text and causal inference: a review of using text to remove confounding from causal estimates." Computation and Language, arXiv:2005.00649.
- Sun, Chi, et al. "How to fine-tune bert for text classification?." China national conference on Chinese computational linguistics. Springer, Cham, 2019.
- Caliendo, Marco, and Sabine Kopeinig. "Some practical guidance for the implementation of propensity score matching." Journal of economic surveys 22.1 (2008): 31-72.
- Schölkopf, Bernhard, Ralf Herbrich, and Alex J. Smola. "A generalized representer theorem." International conference on computational learning theory. Springer, Berlin, Heidelberg, 2001.
- Eduardo Hariton and Joseph J. Locascio. "Randomised controlled trials - the gold standard for effectiveness research." BJOG 125(13):1716, 2018.
- Deborah Lai, Daniel Wang, Matthew McGillivray, Shadi Baajour, Ali S Raja, and Shuhan He. "Assessing the quality of randomization methods in randomized control trials." Healthcare Volume 9 Issue 4, 2021.
- Jianmo Ni, Jiacheng Li, and Julian McAuley. 2019. Justifying Recommendations using Distantly-Labeled Reviews and Fine-Grained Aspects. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 188–197, Hong Kong, China. Association for Computational Linguistics.
- A.L. Maas, R.E. Daly, P.T. Pham, D. Huang, A.Y. Ng, and C. Potts. 2011. "Learning word vectors for sentiment analysis." In Annual Meeting of the Association for Computational Linguistics (ACL).
- Goldberger, Jacob, Shiri Gordon, and Hayit Greenspan. "An Efficient Image Similarity Measure Based on Approximations of KL- Divergence Between Two Gaussian Mixtures." ICCV. Vol. 3. 2003.