Understanding Large Language Model Behaviors Through Interactive Counterfactual Generation and Analysis

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.

Authors

Institutions

Publication Details

Journal
IEEE Transactions on Visualization and Computer Graphics
Published
2025-11-21
DOI
https://doi.org/10.1109/tvcg.2025.3634646
Citations
1
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
2.48
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Understanding Large Language Model Behaviors Through Interactive Counterfactual Generation and Analysis

Mennatallah El‐Assady, Daniel Fürst, Furui Cheng, Vilém Zouhar et al.
1 citations
IEEE Transactions on Visualization and Computer Graphics
Topic Modeling
2.48
article

Understanding Large Language Model Behaviors Through Interactive Counterfactual Generation and Analysis

Mennatallah El‐Assady, Daniel Fürst, Furui Cheng, Vilém Zouhar, Hendrik Strobelt, Robin Shing Moon Chan
article en
1 citations

Abstract

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.

IEEE Transactions on Visualization and Computer GraphicsVol. 32(1)
University of Konstanz (DE)
Openalex Percentile: Top 8%
Topic Modeling
2.48
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Understanding Large Language Model Behaviors Through Interactive Counterfactual Generation and Analysis — Mennatallah El‐Assady, Daniel Fürst, et al. · IEEE Transactions on Visualization and Computer Graphics (2025) | TGRS Research Map | TGRS