NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Explaining machine learning models with interactive natural language conversations using TalkToModel

Dylan Slack, Satyapriya Krishna, Himabindu Lakkaraju, Sameer Singh

Introduction

Machine learning (ML) models are increasingly deployed in high-stakes domains like healthcare and finance. However, these models often function as "black boxes," making it difficult for humans to understand the reasoning behind specific predictions. While existing explainability tools like SHAP, LIME, or interactive dashboards (e.g., the What-If Tool) offer some transparency, they often require significant technical expertise, lack flexibility for follow-up questions, and present a steep learning curve for non-technical stakeholders such as doctors or loan officers.

TalkToModel addresses these challenges by providing an interactive dialogue system that allows users to probe and understand ML models through natural language. By translating user queries into executable code and automatically selecting the most faithful explanations, TalkToModel enables both experts and non-experts to interpret complex models more efficiently than traditional static dashboards.

System Architecture

TalkToModel utilizes a three-component architecture to bridge the gap between human language and model internals:

  1. Dialogue Engine: At its core, a fine-tuned T5-Large Large Language Model (LLM) acts as a semantic parser. It converts natural language "utterances"—such as "Why was this loan denied?"—into a structured, domain-specific query language.
  2. Execution Engine: This component executes the parsed operations. A standout feature is its automated explanation selection. Rather than forcing users to choose between technical methods like LIME or SHAP, the engine evaluates multiple methods using a "fudge score" (measuring prediction sensitivity to feature perturbations) and returns the most faithful explanation.
  3. Context Management: To maintain a natural conversational flow, the system tracks dialogue state using recursive operations like previous_filter and previous_operation. This allows it to resolve pronouns and contextual references (e.g., "What about them?").
The TalkToModel workflow: from user input to executable form and final formatted results.

Evaluation and Datasets

The system was evaluated using three standard tabular datasets: the Pima Indian Diabetes Dataset, the German Credit Dataset, and the COMPAS Recidivism Dataset. To train the parser, the researchers developed a Gold Parse Dataset consisting of 536 human-verified (utterance, parse) pairs. They employed a "synthetic-to-real" training approach, where thousands of synthetic examples were rewritten by human workers to capture diverse linguistic styles.

Key Insights

  • Natural Language as a Universal Interface: Conversational interfaces effectively manage the combinatorial explosion of potential queries (e.g., filtering by multiple features followed by a counterfactual request) that would otherwise overwhelm a graphical user interface.
  • Fine-tuning vs. Scale: The study found that a fine-tuned T5-Small (60M parameters) outperformed a 10-shot GPT-J (6B parameters) in parsing accuracy. This suggests that task-specific fine-tuning is often more effective than raw model scale for specialized domain languages.
  • Automated Method Selection: By removing the burden of choosing an explanation method from the user, the system significantly lowers the barrier to entry for non-experts while maintaining high local fidelity.

Results and User Study

TalkToModel was benchmarked against explainerdashboard, a popular open-source tool, in a study involving healthcare workers and ML professionals. The results demonstrated significant improvements in both performance and user satisfaction.

Comparison of TalkToModel and traditional dashboards in terms of question completion and accuracy.

Key findings include:

  • Higher Accuracy: Healthcare workers achieved 91.8% accuracy in answering model-related questions using TalkToModel, compared to 66.1% with the dashboard.
  • Increased Speed: Users reached correct answers nearly 2x faster (median 76.3s vs. 158.8s).
  • Strong Preference: 82.2% of healthcare workers and 84.6% of ML professionals preferred the conversational interface for its ease of use.
  • Robustness: In over 1,000 real-world interactions, the system failed to resolve user intent only six times.

Limitations and Future Directions

While successful on tabular data, extending TalkToModel to images or unstructured text remains a future challenge. Additionally, while text responses are highly effective, some professionals still value raw data visualizations; future versions may integrate dynamic charts. Finally, the authors emphasize the need for "trust calibration"—adding uncertainty qualifiers to prevent users from over-trusting the system's explanations.

Summary updated

BibTeX
@article{slack2023explaining,
  author = {Dylan Slack and Satyapriya Krishna and Himabindu Lakkaraju and Sameer Singh},
  title = {{Explaining machine learning models with interactive natural language conversations using TalkToModel}},
  journal = {Nat. Mac. Intell.},
  year = {2023},
  doi = {10.1038/s42256-023-00692-8},
}
Figure