A Rule-Based Framework for Interpretable Natural Language Processing
Original version
Bhattarai, B. (2024). A rule-based framework for interpretable natural language processing [Doctoral Dissertation]. University of Agder.Abstract
In recent years, neural network models have demonstrated remarkable results in natural language processing (NLP) tasks. These models have replaced complex hand-engineered methods for extracting and representing sentence meanings with learnt functions that build and use their own internal vector-based representations. While the neural network models are useful in a variety of disciplines, they are not interpretable and provide limited insight into the reasoning behind their decisions or predictions. Despite recent efforts towards making them explainable, e.g., through attention weights, the resulting explanations are approximate, providing a limited view into the underlying neural networks. This lack of interpretability can cause problems in high-stakes areas, including health, law, and finance.
Transformer-based models such as BERT and GPTs are currently achieving state-of-the-art performance in many NLP tasks. However, their huge scales make it extremely difficult for humans to scrutinize the reasoning behind their outputs. Due to this obscurity, they are referred to as black boxes. Although interpretable approaches are gaining increasing attention in the NLP research community, they lag significantly behind deep learning-based approaches when it comes to accuracy.
To address these shortcomings, the overarching goal of this thesis can be divided into two subgoals: (1) design a logic-based interpretable NLP architecture that reduces the current accuracy-interpretability gap; and (2) solve selected NLP problems utilizing the interpretable architecture. We base the interpretable architecture on rule-based learning and employ an automata-based algorithm called Tsetlin Machine (TM), which uses clauses to form propositional formulae. We further refine and evaluate the architecture on open NLP challenges, including identifying novel input and outliers, word-level feature scoring, fake news detection with credibility assessment, coping with out-of-vocabulary data with local interpretability, and knowledge representation with interpretable word embedding, optimizing TM for NLP overall. We show empirically that our extensive enhancements of the TMbased architecture enable competitive accuracy on several datasets, with the added benefit of interpretability.
Our contributions can be elaborated upon as follows. We first propose a method for detecting outliers and novel instances in NLP data, introducing a new class-based scoring system. Second, we broadened the approach to include word-level novelty assessment for describing the novelties. We next focused on application in fake news detection, where we demonstrated the TM’s transparent learning mechanism and proposed a logistic function for credibility measurement based on classification confidence. Empirically, our lightweight interpretable framework competes with more complex architectures like BERT and XLNet while maintaining interpretability. We continue to show how the TM clause information can be compressed and encoded to generate universal text representations, which can then be employed by any machine learning classifier to achieve superior performance. Inspired by the inner workings of Word2Vec, we then proposed a TM-based autoencoder that can produce logical and interpretable embeddings based on contextual relationships. We demonstrated that the embedding performs competitively with GloVe, FastText, and Word2Vec. Finally, we proposed the contracting clause TM for optimizing training time and hardware utilization across NLP applications.
The findings of this thesis thus provide new insights into TMs and how they can be enhanced for NLP while giving a new stance towards trustable and transparent AI in a variety of NLP domains.
Has parts
Paper I: Bhattarai, B., Granmo, O., & Jiao, L. (2022). A Tsetlin machine framework for universal outlier and novelty detection. In Agents and Artificial Intelligence: ICAART 2021 (pp. 250–268). Springer International Publishing. Revised selected papers. Author's Accepted Manuscript. Full text is not available in AURA as a separate file.Paper II: Bhattarai, B., Granmo, O., & Jiao, L. (2022). Word-level human interpretable scoring mechanism for novel text detection using Tsetlin machines. Applied Intelligence, 52(6), 17465–17489. Published version. Full text is available in AURA as a separate file: https://hdl.handle.net/11250/3041885
Paper III: Bhattarai, B., Granmo, O.-C. & Lei, J. (2022). Explainable Tsetlin Machine Framework for Fake News Detection with Credibility Score Assessment. Proceedings of the 13th Conference on Language Resources and Evaluation (LREC 2022). European Language Resources Association (ELRA), 4894–4903. Published version. Full text is available in AURA as a separate file: https://hdl.handle.net/11250/3135579
Paper IV: Bhattarai, B., Granmo, O.-C. & Jiao, L. (2022). ConvTextTM: An Explainable Convolutional Tsetlin Machine Framework for Text Classification. International Conference on Language Resources and Evaluation, 3761–3770. Published version. Full text is available in AURA as a separate file: https://hdl.handle.net/11250/3153759
Paper V: Bhattarai, B., Granmo, O.-C. & Lei, J. (2023). An Interpretable Knowledge Representation Framework for Natural Language Processing with Cross-Domain Application. In J. Kamps et al. (Eds.). Lecture Notes in Computer Science (LNCS), (13980, pp. 167–181), Springer Cham. Author's Accepted Manuscript. Full text is available in AURA as a separate file: https://hdl.handle.net/11250/3122393
Paper VI: Bhattarai, B., Granmo, O., Jiao, L., Yadav, R. K., & Sharma, J. (2024). Tsetlin machine embedding: Representing words using logical expressions. In Findings of the Association for Computational Linguistics: EACL. Author's Accepted Manuscript. Full text is not available in AURA as a separate file.
Paper VII: Bhattarai, B., Granmo, O., Jiao, L., Andersen, P., Tunheim, S. A., Shafik, R., & Yakovlev, A. (2023). Contracting Tsetlin machine with absorbing automata. In International Symposium on the Tsetlin Machine (ISTM) (pp. 1–7). Author's Accepted Manuscript. Full text is not available in AURA as a separate file.