Guiding LLMs to Generate High-Fidelity and High-Quality Counterfactual Explanations for Text Classification

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Nguyen, Van Bach, Seifert, Christin, Schlötterer, Jörg
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914190354022400
author Nguyen, Van Bach
Seifert, Christin
Schlötterer, Jörg
author_facet Nguyen, Van Bach
Seifert, Christin
Schlötterer, Jörg
contents The need for interpretability in deep learning has driven interest in counterfactual explanations, which identify minimal changes to an instance that change a model's prediction. Current counterfactual (CF) generation methods require task-specific fine-tuning and produce low-quality text. Large Language Models (LLMs), though effective for high-quality text generation, struggle with label-flipping counterfactuals (i.e., counterfactuals that change the prediction) without fine-tuning. We introduce two simple classifier-guided approaches to support counterfactual generation by LLMs, eliminating the need for fine-tuning while preserving the strengths of LLMs. Despite their simplicity, our methods outperform state-of-the-art counterfactual generation methods and are effective across different LLMs, highlighting the benefits of guiding counterfactual generation by LLMs with classifier information. We further show that data augmentation by our generated CFs can improve a classifier's robustness. Our analysis reveals a critical issue in counterfactual generation by LLMs: LLMs rely on parametric knowledge rather than faithfully following the classifier.
format Preprint
id arxiv_https___arxiv_org_abs_2503_04463
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Guiding LLMs to Generate High-Fidelity and High-Quality Counterfactual Explanations for Text Classification
Nguyen, Van Bach
Seifert, Christin
Schlötterer, Jörg
Computation and Language
The need for interpretability in deep learning has driven interest in counterfactual explanations, which identify minimal changes to an instance that change a model's prediction. Current counterfactual (CF) generation methods require task-specific fine-tuning and produce low-quality text. Large Language Models (LLMs), though effective for high-quality text generation, struggle with label-flipping counterfactuals (i.e., counterfactuals that change the prediction) without fine-tuning. We introduce two simple classifier-guided approaches to support counterfactual generation by LLMs, eliminating the need for fine-tuning while preserving the strengths of LLMs. Despite their simplicity, our methods outperform state-of-the-art counterfactual generation methods and are effective across different LLMs, highlighting the benefits of guiding counterfactual generation by LLMs with classifier information. We further show that data augmentation by our generated CFs can improve a classifier's robustness. Our analysis reveals a critical issue in counterfactual generation by LLMs: LLMs rely on parametric knowledge rather than faithfully following the classifier.
title Guiding LLMs to Generate High-Fidelity and High-Quality Counterfactual Explanations for Text Classification
topic Computation and Language
url https://arxiv.org/abs/2503.04463