InterroLang: Exploring NLP Models and Datasets through Dialogue-based Explanations

Nils Feldhus, Qianli Wang, Tatiana Anikina, Sahil Chopra, Cennet Oguz, Sebastian Möller

TL;DR

InterroLang is an interactive framework that allows users to explore and understand NLP models through natural language dialogue. By moving beyond static, "one-off" explanations to a multi-turn conversational interface, the system helps humans build more accurate mental models of AI behavior, significantly improving their ability to predict model outputs.

What Problem Does This Paper Address?

Most Explainable AI (XAI) tools for Natural Language Processing are static. They might show you a heatmap of important words (saliency maps) or a single counterfactual example, but they don't allow for follow-up questions. If a model flags a tweet as "offensive" because of a punctuation mark, a user can't easily ask, "Why that specific token?" or "What happens if I change this word?"

The authors argue that explanation is inherently a social and dialogical process. There is a need for a unified tool that handles the unique complexities of NLP—like free-text rationales and linguistic perturbations—within a conversational framework that can resolve context (e.g., understanding that "it" refers to the previous sample).

Methods

The authors developed InterroLang, adapting the earlier TalkToModel framework specifically for the NLP domain. The system consists of three main components:

  1. Dialogue Engine: This parses user questions (e.g., "Which tokens are most important?") into SQL-like executable queries. The authors found that a small, efficient Adapter-based model (BERT + Adapters) outperformed much larger few-shot LLMs like GPT-Neo at this specific parsing task.
  2. Execution Engine: This runs various XAI operations, including:
  3. Attribution: Integrated Gradients to show token-level importance.
  4. Perturbation: Generating counterfactuals (via Polyjuice) and adversarial attacks to see what changes the model's mind.
  5. Rationalization: Generating free-text justifications for a prediction.
  6. Text Interface: A user-friendly chat interface that includes a dataset viewer and pre-defined "sample question" buttons to lower the user's cognitive load.
Figure 2: Illustration of how natural language queries from users are parsed into executable operations and their results are inserted in INTERROLANG responses presented through a dialogue interface.

Datasets

The system was evaluated across three distinct NLP tasks:

  • BoolQ: Reading comprehension/Question Answering (Yes/No).
  • OLID: Hate speech detection (Offensive/Non-offensive).
  • DailyDialog: Dialogue act classification (e.g., Inform, Question, Directive).

The authors also released a new dataset containing 1,449 dialogue turns with human feedback and 188 turns from a simulatability study to help the community train more human-aligned XAI models.

Label distributions for the three core datasets used in the study.

Key Insights and Ideas

  • Dialogue Beats Monologue: Users were significantly better at "simulating" the model (predicting what the model would say for a new input) after a multi-turn dialogue than after seeing a single explanation.
  • The "Aha" Moment of Rationales: While saliency maps (heatmaps) are standard in research, users found free-text rationales (natural language explanations) to be the most helpful for understanding the model's "logic."
  • Complementary Tools: The authors observed that different XAI methods serve different roles. Attributions and rationales help users form a hypothesis about the model's behavior, while counterfactuals and adversarial examples serve as "sanity checks" to confirm or debunk those hypotheses.
  • Efficiency in Parsing: You don't always need a massive LLM. Their 110M parameter BERT+Adapter model achieved ~84% parsing accuracy, consistently beating the 2.7B parameter GPT-Neo.

Key Results

  • Subjective Quality: Users rated "Data Description" and "Mistakes" (showing where the model fails) as the most helpful operations for understanding the system.
  • Simulatability: In a "human forward prediction" task, free-text rationales led to the highest accuracy (94.7%), followed by local feature importance (91.4%).
  • Dialogue Flow: On average, users needed about 4 turns of dialogue to feel confident enough to predict the model's label for a new instance.
An example of an InterroLang dialogue showing token attribution and an adversarial sample.

Limitations and Future Work

  • Generator Quality: The authors noted that current counterfactual generators (like Polyjuice) often fail to produce meaningful label flips, which was reflected in lower user satisfaction scores for those operations.
  • Static Datasets: Currently, users can explore datasets but cannot modify them on-the-fly (e.g., adding a newly discovered adversarial example to the training set).
  • Future Directions: The team aims to make the bot more proactive, suggesting specific operations to the user based on the conversation history. They also plan to explore using a single, unified LLM to handle parsing, prediction, and explanation generation simultaneously.

Summary updated

BibTeX
@inproceedings{feldhus2023interrolang,
  author = {Nils Feldhus and Qianli Wang and Tatiana Anikina and Sahil Chopra and Cennet Oguz and Sebastian Möller},
  title = {{InterroLang: Exploring NLP Models and Datasets through Dialogue-based Explanations}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.359},
}
Figure