Please use this identifier to cite or link to this item:
http://hdl.handle.net/10397/117588
| Title: | Towards controllable and explainable text generation via causal intervention in LLMs | Authors: | Qiu, J Fang, Q Kang, W |
Issue Date: | Aug-2025 | Source: | Electronics (Switzerland), Aug. 2025, v. 14, no. 16, 3279 | Abstract: | Large Language Models (LLMs) excel in diverse text generation tasks but still face limited controllability, opaque decision processes, and frequent hallucinations. This paper presents a structural causal intervention framework that models input–hidden–output dependencies through a structural causal model and performs targeted interventions on hidden representations. By combining counterfactual sample construction with contrastive training, our method enables precise control of style, sentiment, and factual consistency while providing explicit causal explanations for output changes. Experiments on three representative tasks demonstrate consistent and substantial improvements: style transfer accuracy reaches 92.3% (+7–14 percentage points over strong baselines), sentiment-controlled generation achieves 90.1% accuracy (+1.3–10.9 points), and multi-attribute conflict rates drop to 3.7% (a 40–60% relative reduction). Our method also improves causal attribution scores to 0.83–0.85 and human agreement rates to 87–88%, while reducing training and inference latency by 25–30% through sparse masking that modifies ≤10% of hidden units per attribute. These results confirm that integrating structural causal intervention with counterfactual training advances controllability, interpretability, and efficiency in LLM-based generation, offering a robust foundation for deployment in reliability-critical and resource-constrained applications. | Keywords: | Counterfactual training Hidden-state intervention Multi-attribute disentanglement Resource-efficient generation Structural causal model (SCM) |
Publisher: | MDPI AG | Journal: | Electronics (Switzerland) | EISSN: | 2079-9292 | DOI: | 10.3390/electronics14163279 | Rights: | Copyright: © 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). The following publication Qiu, J., Fang, Q., & Kang, W. (2025). Towards Controllable and Explainable Text Generation via Causal Intervention in LLMs. Electronics, 14(16), 3279 is available at https://doi.org/10.3390/electronics14163279. |
| Appears in Collections: | Journal/Magazine Article |
Files in This Item:
| File | Description | Size | Format | |
|---|---|---|---|---|
| electronics-14-03279-v2.pdf | 1.47 MB | Adobe PDF | View/Open |
Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.



