BTPK-based interpretable method for NER tasks based on Talmudic Public Announcement Logic

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

Abstract

Named entity recognition (NER) is a fundamental task in natural language processing (NLP), serving as a critical component for downstream applications like information extraction and machine translation. However, the internal logic of modern NER models often remains a "black box," making it difficult for users to understand the rationale behind specific entity classifications. In this paper, we propose a novel interpretable method called Binary Talmudic Public Announcement Logic (BTPK). This framework helps users understand the internal recognition logic of NER tasks by mapping neural network hidden states to a logical structure. Our observations indicate that the "public announcements" within the BTPK model effectively represent the inner decision logic of Bidirectional Recurrent Neural Networks (BRNNs), providing a transparent view of how these models handle context dependency.

Introduction

Named Entity Recognition (NER) involves identifying and categorizing entities—such as names, locations, or titles—within text. While Bidirectional Recurrent Neural Networks (BRNNs) have become a standard for this task due to their ability to process context from both past and future tokens, their decision-making process is notoriously opaque. For instance, if a model identifies "Hobbits" as a movie title in one context but a book title in another, the underlying reason is often obscured. This lack of interpretability is a significant barrier in high-stakes fields like healthcare or autonomous systems. The BTPK model aims to bridge this gap by providing a human-readable logical explanation for neural network predictions.

Methodology: The BTPK Framework

The core innovation of this research is the application of Talmudic Public Announcement Logic (TPK)—a branch of modal logic designed for decisions dependent on future information—to the architecture of a BRNN.

The BTPK architecture mapping BRNN hidden states to a logical tree structure for analysis.

The BTPK process involves three main stages:

  1. Path Construction: The forward and backward hidden states of a trained BRNN are mapped to vertices in a temporal tree structure.
  2. Physical Intervention: Using a technique inspired by Miller’s methods, the authors split input sequences into n-grams and "intervene" by zeroing out specific hidden states to observe the impact on the model's output.
  3. Public Announcement Extraction: Key words that force the model to resolve ambiguity and choose a specific logical path are identified as "public announcements." For example, the presence of the word "movie" later in a sentence acts as a logical update that clarifies the classification of a preceding entity.

Experimental Setup

The researchers evaluated the BTPK method using the CBVM dataset, a Chinese public NER dataset. The dataset contains 8,791 sequences (7,814 for training and 977 for testing) across 7 label categories. The experimental model utilized hidden state and embedding dimensions fixed at 128 to maintain consistency during the interpretation process.

Results and Discussion: Visualizing Logic

The BTPK model successfully provides global explanations for BRNN decisions by identifying the specific tokens that act as logical anchors.

Examples of 'Public Announcements' in English and Chinese sentences that resolve entity ambiguity.

In a case study involving the sentence "I really like 'Hobbits', such a movies!", the model demonstrated that the classification of "Hobbits" was initially ambiguous. However, the BTPK model identified a "public announcement" at a specific state corresponding to the word "movies." This announcement shifted the model's internal path from a generic label to the correct "video" category. This method moves beyond simple attention weights by providing a step-by-step logical proof for why a specific entity was recognized.

Conclusion and Future Work

The BTPK model offers a promising path toward making deep learning models for NER more transparent. By translating abstract hidden states into logical trees, it provides human-readable justifications for model behavior. While the current "physical intervention" process is computationally intensive, future work aims to optimize this and combine BTPK with transfer learning to address cross-lingual NER tasks. This would allow for shared interpretable logic across different languages, further enhancing the utility of the framework.

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 interpretable method for NER tasks based on Talmudic Public Announcement Logic}},
  year = {2022},
  eprint = {2201.09523},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.09523},
}
Figure