Content-free Logical Modification of Large Language Model by Disentangling and Modifying Logic Representation
Xin Wu, Yuqi Bu, Yifei Chen, Yi Cai
Abstract
Despite extensive training on diverse datasets and alignment with human values, large language models (LLMs) can still generate fallacious outputs. Additionally, the validity of LLM's outputs varies significantly depending on the content. It is crucial to ensure LLMs' logical consistency across different contexts. Drawing inspiration from cognitive psychology studies, we propose a Logic Control Framework (LCF) that disentangles LLMs' hidden representations into separate content and logic spaces. Within the logic space, we use logically valid and invalid samples to construct distinct regions through contrastive learning. By moving logic representations to logically valid regions and fusing them with unchanged content representations, we significantly reduce logical fallacies in LLM outputs while maintaining content coherence. We demonstrate the effectiveness of LCF through experiments on conclusion generation and fallacy identification tasks, showing a significant improvement in logical validity and a reduction in fallacious outputs.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
Lineage
Builds on7
- Understanding Contrastive Representation Learning through Alignment and Uniformity on the HypersphereTongzhou Wang, Phillip IsolaICML 2020 · 2,360 citations
- Inference-Time Intervention: Eliciting Truthful Answers from a Language ModelKenneth Li, Oam Patel, Fernanda B. Viégas, Hanspeter Pfister et al.NeurIPS 2023 · 1,549 citations
- Aligning Large Language Models with Representation Editing: A Control PerspectiveLingkai Kong, Haorui Wang, Wenhao Mu, Yuanqi Du et al.NeurIPS 2024 · 80 citations
- Logical Fallacy DetectionZhijing Jin, Abhinav Lalwani, Tejas Vaidhya, Xiaoyu Shen et al.EMNLP Findings 2022 · 52 citations
- Few-Shot Joint Multimodal Entity-Relation Extraction via Knowledge-Enhanced Cross-modal Prompt ModelLi Yuan, Yi Cai, Junsheng HuangACM MM 2024 · 9 citations
Related papers
- FACT: Mitigating Inconsistent Hallucinations in LLMs via Fact-Driven Alternating Code-Text TrainingXinxin You, Qixin Sun, Chenwei Yan, Xiao Zhang et al.NeurIPS 2025
- How Language Models Conflate Logical Validity with Plausibility: A Representational Analysis of Content EffectsLeonardo Bertolazzi, Sandro Pezzelle, Raffaella BernardiACL Findings 2026
- Socrates or Smartypants: Testing Logic Reasoning Capabilities of Large Language Models with Logic Programming-Based Test OraclesZihao Xu, Junchen Ding, Yiling Lou, Kun Zhang et al.AAAI 2026 · 1 citation
- LogicAttack: Adversarial Attacks for Evaluating Logical Consistency of Natural Language InferenceMutsumi Nakamura, Santosh Mashetty, Mihir Parmar, Neeraj Varshney et al.EMNLP Findings 2023 · 4 citations
- LSEG: A Fine-tuning Free Method for NL2FOL via Logic-Structure and Entropy Guided Inference ControllingYuwei Huang, Shi Wang, Kangli Zi, Tianyu Luo et al.ACL Findings 2026
