mlsanityData to 7 Oct 2026

Understanding Large Language Model Behaviors through Interactive Counterfactual Generation and Analysis

arXiv 2405.00708 ↗First posted 23 Apr 2024cs.CL cs.AI cs.HCcited by 8

Not on the map. Why?

Abstract (arXiv)

Understanding the behavior of large language models (LLMs) is crucial for ensuring their safe and reliable use. However, existing explainable AI (XAI) methods for LLMs primarily rely on word-level explanations, which are often computationally inefficient and misaligned with human reasoning processes. Moreover, these methods often treat explanation as a one-time output, overlooking its inherently interactive and iterative nature. In this paper, we present LLM Analyzer, an interactive visualization system that addresses these limitations by enabling intuitive and efficient exploration of LLM behaviors through counterfactual analysis. Our system features a novel algorithm that generates fluent and semantically meaningful counterfactuals via targeted removal and replacement operations at user-defined levels of granularity. These counterfactuals are used to compute feature attribution scores, which are then integrated with concrete examples in a table-based visualization, supporting dynamic analysis of model behavior. A user study with LLM practitioners and interviews with experts demonstrate the system's usability and effectiveness, emphasizing the importance of involving humans in the explanation process as active participants rather than passive recipients.

Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 31 of its 56 references that are in the map. First posted on arXiv 23 Apr 2024.

Builds on

31 of 56 references.

References · 31

  1. 2022Training language models to follow instructions with human feedbackcited by 15,712
  2. 2017A Unified Approach to Interpreting Model Predictionscited by 6,488
  3. 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
  4. 2017Towards A Rigorous Science of Interpretable Machine Learningcited by 1,400
  5. 2017Explanation in Artificial Intelligence: Insights from the Social Sciencescited by 1,201
  6. 2017Counterfactual Explanations without Opening the Black Box: Automated Decisions and the GDPRcited by 1,086
  7. 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 979
  8. 2019Multi-News: a Large-Scale Multi-Document Summarization Dataset and Abstractive Hierarchical Modelcited by 431
  9. 2019Learning the Difference that Makes a Difference with Counterfactually-Augmented Datacited by 428
  10. 2020Questioning the AI: Informing Design Practices for Explainable AI User Experiencescited by 251
  11. 2021Polyjuice: Generating Counterfactuals for Explaining, Evaluating, and Improving Modelscited by 219
  12. 2020Explaining by Removing: A Unified Framework for Model Explanationcited by 218
19 more
  1. 2019The What-If Tool: Interactive Probing of Machine Learning Modelscited by 207
  2. 2020The Language Interpretability Tool: Extensible, Interactive Visualizations and Analysis for NLP Modelscited by 125
  3. 2021Human-Centered Explainable AI (XAI): From Algorithms to User Experiencescited by 123
  4. 2019BillSum: A Corpus for Automatic Summarization of US Legislationcited by 117
  5. 2023ChainForge: A Visual Toolkit for Prompt Engineering and LLM Hypothesis Testingcited by 88
  6. 2020Generate Your Counterfactuals: Towards Controlled Counterfactual Generation for Textcited by 75
  7. 2018Seq2Seq-Vis: A Visual Debugging Tool for Sequence-to-Sequence Modelscited by 69
  8. 2023AttentionViz: A Global View of Transformer Attentioncited by 50
  9. 2017Understanding Hidden Memories of Recurrent Neural Networkscited by 43
  10. 2020DECE: Decision Explorer with Counterfactual Explanations for Machine Learning Modelscited by 38
  11. 2024LLM Comparator: Visual Analytics for Side-by-Side Evaluation of Large Language Modelscited by 29
  12. 2021Dodrio: Exploring Transformer Models with Interactive Visualizationcited by 28
  13. 2023RELIC: Investigating Large Language Model Responses using Self-Consistencycited by 23
  14. 2023The Role of Interactive Visualization in Explaining (Large) NLP Models: from Data to Inferencecited by 9
  15. 2024KnowledgeVIS: Interpreting Language Models by Comparing Fill-in-the-Blank Promptscited by 7
  16. 2024iScore: Visual Analytics for Interpreting How Language Models Automatically Score Summariescited by 6
  17. 2024generAItor: Tree-in-the-Loop Text Generation for Language Model Explainability and Adaptationcited by 5
  18. 2018Juniper: A Tree+Table Approach to Multivariate Graph Visualizationcited by 3
  19. 2024An Empirical Study of Counterfactual Visualization to Support Visual Causal Inferencecited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 3; 2025: 1; 2026: 4.

8 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Simplifying Outcomes of Language Model Component Analyses with ELIA
  2. 2026Would this change your answer? Evaluating Explanations of LLM Behavior In The Wild with Counterfactual Experiments
  3. 2025On the Eligibility of LLMs for Counterfactual Reasoning: A Decompositional Study
  4. 2024Towards Uncovering How Large Language Model Works: An Explainability Perspective
  5. 2026Do LLM Self-Explanations Help Users Predict Model Behavior? Evaluating Counterfactual Simulatability with Pragmatic Perturbations
  6. 2023Do Models Explain Themselves? Counterfactual Simulatability of Natural Language Explanations
  7. 2025Beyond the Black Box: Demystifying Multi-Turn LLM Reasoning with VISTA
  8. 2023Prompting Large Language Models for Counterfactual Generation: An Empirical Study