Red Flag/Blue Flag visualization of a common CNN for text classification
- PMID: 36660449
- PMCID: PMC9841396
- DOI: 10.1093/jamiaopen/ooac112
Red Flag/Blue Flag visualization of a common CNN for text classification
Abstract
A shallow convolutional neural network (CNN), TextCNN, has become nearly ubiquitous for classification among clinical and medical text. This research presents a novel eXplainable-AI (X-AI) software, Red Flag/Blue Flag (RFBF), designed for binary classification with TextCNN. RFBF visualizes each convolutional filter's discriminative capability. This is a more informative approach than direct assessment of logit contribution, features that overfit to train set nuances on smaller datasets may indiscriminately activate large logits on validation samples from both classes. RFBF enables model diagnosis, term feature verification, and overfit prevention. We present 3 use cases of (1) filter consistency assessment; (2) predictive performance improvement; and (3) estimation of information leakage between train and holdout sets. The use cases derive from experiments on TextCNN for binary prediction of surgical misadventure outcomes from physician-authored operative notes. Due to TextCNN's prevalence, this X-AI can benefit clinical text research, and hence improve patient outcomes.
Keywords: CNN; NLP; X-AI; clinical NLP; explainable AI; text classification.
© The Author(s) 2023. Published by Oxford University Press on behalf of the American Medical Informatics Association.
Figures
References
-
- Kim Y. Convolutional neural networks for sentence classification. In: Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP); Association for Computational Linguistics; 2014:1746–51; Doha, Qatar.
-
- Han S, Zhang RF, Shi L, et al. Classifying social determinants of health from unstructured electronic health records using deep learning-based natural language processing. J Biomed Inform 2022; 127: 103984. - PubMed
-
- Paszke A, Gross S, Massa F, et al. PyTorch: An iImperative Style, High-performance Deep Learning Library. In: Advances in Neural Information Processing Systems 32 [Internet]. Curran Associates, Inc.; 2019: 8024–35. http://papers.neurips.cc/paper/9015-pytorch-an-imperative-style-high-per....
-
- Rabhi S, Jakubowicz J, Metzger MH. Deep Learning versus Conventional Machine Learning for Detection of Healthcare-Associated Infections in French Clinical Narratives. Methods Inf Med 2019; 58 (1): 31–41. - PubMed
Grants and funding
LinkOut - more resources
Full Text Sources