BTPK-based learning: An Interpretable Method for Named Entity Recognition

Yulin Chen, Zelai Yao, Haixiao Chi, Dov M. Gabbay, Bo Yuan, Bruno Bentzen, Beishui Liao

Abstract

Named Entity Recognition (NER) is a cornerstone of Natural Language Processing, yet the state-of-the-art models used to solve it often function as "black boxes." This paper introduces Binary Talmudic Public Announcement Logic (BTPK), a novel interpretability framework designed to illuminate the decision-making process of Bidirectional Recurrent Neural Networks (BRNNs). By transforming the model's hidden states into a logical tree structure and identifying "public announcements"—critical contextual words that trigger label revisions—BTPK offers a human-readable justification for NER outputs. Experimental results on the CBVM dataset demonstrate the method's ability to provide causal insights into how future context influences past entity labeling.

Introduction

Named Entity Recognition (NER) involves identifying and categorizing key information in text, such as names of people, organizations, and creative works. While deep learning architectures like Bidirectional RNNs (BRNNs) have significantly advanced the field, their internal logic remains opaque. This lack of transparency is a significant barrier to adoption in high-stakes domains like medicine or law, where understanding why a model reached a specific conclusion is as important as the conclusion itself.

In a BRNN, the label for a specific word is determined by both preceding and succeeding context. However, the mechanism by which a future word (e.g., "film") clarifies the ambiguity of a previous word (e.g., "Titanic") is typically hidden within high-dimensional vector spaces. To bridge this gap, we propose the BTPK framework, which leverages modal logic to provide a structured, interpretable explanation of these temporal dependencies.

Methodology: From Hidden States to Logical Trees

The BTPK method operates by mapping the continuous feature space of a neural network onto a discrete logical structure. This process involves three primary stages:

1. Path Construction

The hidden states ($h_t$) of a trained BRNN are treated as nodes in a temporal tree. Each node represents a potential state of the model's "knowledge" at a given time step. By analyzing the transitions between these states, we can construct a path that represents the model's evolving understanding of the input sequence.

2. Public Announcement Extraction via Physical Intervention

To identify which words act as the primary drivers of a model's decision, we employ a technique called "physical intervention." We systematically set the hidden states corresponding to specific n-grams to zero and observe the effect on the final prediction. If the removal of a word group causes the model to change its label for a target entity, that word group is identified as a Public Announcement. In logical terms, a public announcement is a piece of information that eliminates uncertainty and prunes incorrect branches from the decision tree.

Overview of the BTPK-based learning framework, mapping BRNN hidden states to logical tree structures for analysis.

3. Logic Mapping

Once the public announcements are identified, they are used to map the model's trajectory through the tree. The BTPK framework uses Talmudic logic—a branch of logic designed to handle situations where future events clarify past interpretations—to model how these announcements resolve ambiguity.

Experimental Evaluation

The BTPK method was evaluated using the CBVM dataset, a public Chinese NER dataset containing 8,791 sequences across seven label categories. The underlying model was a BRNN with 128-dimensional hidden states.

The primary goal was to determine if BTPK could provide a qualitative "aha moment" for complex labeling tasks. A key case study involved the sentence: "I really like 'Hobbits', and movies like this." In this instance, "Hobbits" is inherently ambiguous; it could refer to a book series or a film franchise.

Key Insights: The Role of Future Context

The power of BTPK lies in its ability to demonstrate how the "future" influences the "past." In the "Hobbits" example, the model initially maintains multiple hypotheses regarding the entity type. However, the subsequent appearance of the word "movies" acts as a public announcement.

Identification of "public announcements" in the feature space, showing how specific context words like "movies" clarify entity labels.

As shown in the analysis, the word "movies" (or "电影" in the Chinese dataset) shifts the model's internal state, forcing it to backtrack and follow the logical path where "Hobbits" is categorized as a video/movie rather than a book. This alignment between the logical path and the ground truth provides a clear, causal justification for the model's behavior that is accessible to human users.

Discussion and Future Work

By moving beyond simple correlation and into causal intervention, BTPK offers a robust tool for model debugging and validation. It allows researchers to verify if a model is "right for the right reasons"—for example, ensuring it uses relevant context words rather than spurious correlations.

However, several challenges remain. The current implementation is specific to the sequential nature of BRNNs. Extending this logic to Transformer-based models, which rely on parallel self-attention mechanisms, is a primary area for future research. Additionally, the computational cost of physical intervention scales with sequence length, necessitating more efficient extraction algorithms for large-scale applications. Future work will also explore the consistency of logical "announcements" across different languages in cross-lingual NER tasks.

Conclusion

BTPK-based learning represents a significant step toward interpretable AI. By grounding the complex transformations of neural networks in the rigorous framework of Talmudic logic, we can transform "black box" models into transparent systems capable of explaining their own reasoning.

Summary updated

Abstract

As one of the basic tasks in natural language processing (NLP), named entity recognition (NER) is an important basic tool for downstream tasks of NLP, such as information extraction, syntactic analysis, machine translation and so on. The internal operation logic of current name entity recognition model is black-box to the user, so the user has no basis to determine which name entity makes more sense. Therefore, a user-friendly explainable recognition process would be very useful for many people. In this paper, we propose a novel interpretable method, BTPK (Binary Talmudic Public Announcement Logic model), to help users understand the internal recognition logic of the name entity recognition tasks based on Talmudic Public Announcement Logic. BTPK model can also capture the semantic information in the input sentences, that is, the context dependency of the sentence. We observed the public announcement of BTPK presents the inner decision logic of BRNNs, and the explanations obtained from a BTPK model show us how BRNNs essentially handle NER tasks.
BibTeX
@misc{chen2022btpk,
  author = {Yulin Chen and Zelai Yao and Haixiao Chi and Dov M. Gabbay and Bo Yuan and Bruno Bentzen and Beishui Liao},
  title = {{BTPK-based learning: An Interpretable Method for Named Entity Recognition}},
  year = {2022},
  eprint = {2201.09523},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.09523},
}
Figure