mlsanityData to 14 Oct 2026

Explaining Fine Tuned LLMs via Counterfactuals A Knowledge Graph Driven Framework

arXiv 2509.21241 ↗First posted 25 Sep 2025cs.LG cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

The widespread adoption of Low-Rank Adaptation (LoRA) has enabled large language models (LLMs) to acquire domain-specific knowledge with remarkable efficiency. However, understanding how such a fine-tuning mechanism alters a model's structural reasoning and semantic behavior remains an open challenge. This work introduces a novel framework that explains fine-tuned LLMs via counterfactuals grounded in knowledge graphs. Specifically, we construct BioToolKG, a domain-specific heterogeneous knowledge graph in bioinformatics tools and design a counterfactual-based fine-tuned LLMs explainer (CFFTLLMExplainer) that learns soft masks over graph nodes and edges to generate minimal structural perturbations that induce maximum semantic divergence. Our method jointly optimizes structural sparsity and semantic divergence while enforcing interpretability preserving constraints such as entropy regularization and edge smoothness. We apply this framework to a fine-tuned LLaMA-based LLM and reveal that counterfactual masking exposes the model's structural dependencies and aligns with LoRA-induced parameter shifts. This work provides new insights into the internal mechanisms of fine-tuned LLMs and highlights counterfactual graphs as a potential tool for interpretable AI.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 26 of its 36 references that are in the map. First posted on arXiv 25 Sep 2025.

Builds on

26 of 36 references.

References · 26

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2017A Unified Approach to Interpreting Model Predictionscited by 6,555
  4. 2016"Why Should I Trust You?": Explaining the Predictions of Any Classifiercited by 5,070
  5. 2021On the Opportunities and Risks of Foundation Modelscited by 4,033
  6. 2017Axiomatic Attribution for Deep Networkscited by 3,384
  7. 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
  8. 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,407
  9. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
  10. 2023Language Models Don't Always Say What They Think: Unfaithful Explanations in Chain-of-Thought Promptingcited by 1,122
  11. 2017Counterfactual Explanations without Opening the Black Box: Automated Decisions and the GDPRcited by 1,089
  12. 2019Attention is not Explanationcited by 929
14 more
  1. 2019Attention is not not Explanationcited by 636
  2. 2019Explaining Machine Learning Classifiers through Diverse Counterfactual Explanationscited by 614
  3. 2023Explainability for Large Language Models: A Surveycited by 333
  4. 2021Do Prompt-Based Models Really Understand the Meaning of their Prompts?cited by 326
  5. 2018Local Rule-Based Explanations of Black Box Decision Systemscited by 166
  6. 2024SaySelf: Teaching LLMs to Express Confidence with Self-Reflective Rationalescited by 105
  7. 2023Can Knowledge Graphs Reduce Hallucinations in LLMs? : A Surveycited by 92
  8. 2023Can Large Language Models Explain Themselves? A Study of LLM-Generated Self-Explanationscited by 90
  9. 2024Neural Exec: Learning (and Learning from) Execution Triggers for Prompt Injection Attackscited by 85
  10. 2020Domain-specific Knowledge Graphs: A surveycited by 68
  11. 2023Sequential Integrated Gradients: a simple but effective method for explaining language modelscited by 52
  12. 2019FOCUS: Flexible Optimizable Counterfactual Explanations for Tree Ensemblescited by 43
  13. 2024Concept Bottleneck Large Language Modelscited by 43
  14. 2024TokenSHAP: Interpreting Large Language Models with Monte Carlo Shapley Value Estimationcited by 42

Built on by

Not cited yet.