Lune

AAAI2025Top-tier venue

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.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Aligning Large Language Models with Representation Editing: A Control Perspective cites Inference-Time Intervention: Eliciting Truthful Answers from a Language Model
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on7

  1. Understanding Contrastive Representation Learning through Alignment and Uniformity on the HypersphereTongzhou Wang, Phillip IsolaICML 2020 · 2,360 citations
  2. 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
  3. Aligning Large Language Models with Representation Editing: A Control PerspectiveLingkai Kong, Haorui Wang, Wenhao Mu, Yuanqi Du et al.NeurIPS 2024 · 80 citations
  4. Logical Fallacy DetectionZhijing Jin, Abhinav Lalwani, Tejas Vaidhya, Xiaoyu Shen et al.EMNLP Findings 2022 · 52 citations
  5. 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

  1. FACT: Mitigating Inconsistent Hallucinations in LLMs via Fact-Driven Alternating Code-Text TrainingXinxin You, Qixin Sun, Chenwei Yan, Xiao Zhang et al.NeurIPS 2025
  2. How Language Models Conflate Logical Validity with Plausibility: A Representational Analysis of Content EffectsLeonardo Bertolazzi, Sandro Pezzelle, Raffaella BernardiACL Findings 2026
  3. 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
  4. 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
  5. 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
Dusk over the sea between two cliffs drawn in fine vertical lines