Lune

IEEE VIS2025Top-tier venue

Understanding Large Language Model Behaviors Through Interactive Counterfactual Generation and Analysis

Furui Cheng, Vilém Zouhar, Robin Shing Moon Chan, Daniel Fürst, Hendrik Strobelt, Mennatallah El-Assady

Abstract

A 23-year-old pregnant woman at 22 weeks gestation presents burning upon urination... Which of the following is the best treatment for this patient?

The answer is D. Nitrofurantoin CONTAIN "Nitrofurantoin" Outcome: A A 23-year-old pregnant woman at 22 weeks gestation presents burning upon urination... Which of the following is the best treatment for this patient? The answer is B. Ceftriaxone The Original Prompt and the LLM Response A Counterfactual Prompt and the LLM Response

Fig. 1: LLM Analyzer enables users to analyze and understand LLM behaviors through meaningful counterfactuals. From the user's input prototype sentences, such as a medical question in this example, the system generates meaningful segments for perturbation. (A) Users can interactively adjust their granularities and specify alternative segments for replacements, which are then used by the system to create meaningful counterfactuals. The system enables users to analyze the LLM by inspecting and interactively aggregating the counterfactual examples in a table-based visualization. (B) The table header shows the segments' text, dependencies, and feature attributions. (C) By grouping the counterfactuals by segments of interest, users can assess their joint influence on the predictions. (D) In addition to the statistical results, users could view concrete examples to understand the LLM's prediction in alternative scenarios.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Interactive Debugging and Steering of Multi-Agent AI Systems cites ChainForge: A Visual Toolkit for Prompt Engineering and LLM Hypothesis Testing
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Interactive Debugging and Steering of Multi-Agent AI SystemsWill Epperson, Gagan Bansal, Victor C. Dibia, Adam Fourney et al.CHI 2025 · 33 citations

Builds on13

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  2. Questioning the AI: Informing Design Practices for Explainable AI User ExperiencesQ. Vera Liao, Daniel M. Gruen, Sarah MillerCHI 2020 · 758 citations
  3. Learning The Difference That Makes A Difference With Counterfactually-Augmented DataDivyansh Kaushik, Eduard H. Hovy, Zachary Chase LiptonICLR 2020 · 625 citations
  4. ChainForge: A Visual Toolkit for Prompt Engineering and LLM Hypothesis TestingIan Arawjo, Chelse Swoopes, Priyan Vaithilingam, Martin Wattenberg et al.CHI 2024 · 141 citations
  5. DECE: Decision Explorer with Counterfactual Explanations for Machine Learning ModelsFurui Cheng, Yao Ming, Huamin QuIEEE VIS 2020 · 118 citations

Related papers

  1. Steering Semantic Data Processing With DocWranglerShreya Shankar, Bhavya Chopra, Mawil Hasan, Stephen Lee et al.UIST 2025
  2. Faithfulness vs. Safety: Evaluating LLM Behavior Under Counterfactual Medical EvidenceKaijie Mo, Siddhartha Venkatayogi, Chantal Shaib, Ramez Kouzy et al.ACL Findings 2026
  3. Medical Interpretability and Knowledge Maps of Large Language ModelsRazvan Marinescu, Victoria-Elisabeth Gruber, Diego Fajardo VargasICLR 2026 · 1 citation
  4. Fact Recall, Heuristics or Pure Guesswork? Precise Interpretations of Language Models for Fact CompletionDenitsa Saynova, Lovisa Hagström, Moa Johansson, Richard Johansson et al.ACL Findings 2025
  5. Explanation by Progressive ExaggerationSumedha Singla, Brian Pollack, Junxiang Chen, Kayhan BatmanghelichICLR 2020 · 116 citations
Dusk over the sea between two cliffs drawn in fine vertical lines