Research map / Large language models / Language, safety and interpretability
Content-free Logical Modification of Large Language Model by Disentangling and Modifying Logic Representation
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes Logic Control Framework (LCF), an add-on module that disentangles transformer hidden states into content and logic spaces and moves logic representations toward logically valid regions via contrastive learning, improving logical validity of LLM conclusions while keeping content.
Problem
LLMs generate logically fallacious outputs, and their logical validity depends on content, so logical consistency is hard to fix without altering content.
Approach
Decouple hidden representations into content and logic projections; apply contrastive learning to form valid vs. invalid logic regions; shift only the logic component toward the valid region and fuse it back with unchanged content representation, then nudge the original hidden state toward the fused anchor.
Key results
- On Valid%(Trained), LCF raises Llama2 from 58.84% to 96.56% and Llama3 from 51.47% to 93.13% on conclusion generation.
- Fallacy identification accuracy improves for all six LLMs, e.g., Llama3 up 26.96 points, and Delta-Probability turns positive for all models.
- Supervised fine-tuning on Llama2 reaches 78.43% Valid%(Trained), below LCF's 96.56%, and ITI and RAHF give limited gains.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| add LCF | Llama2 · LFUD conclusion generation | Valid%(GPT4): 70.58 -> 83.82 | Helped |
| add LCF | Llama2 · LFUD conclusion generation | Valid%(Trained): 58.84 -> 96.56 | Helped |
| add LCF | Llama2 · LFUD fallacy identification | Accuracy: 51.47 -> 75.00 | Helped |
| add LCF | Llama2 · LFUD fallacy identification | ∆Probability: -1.89 -> 6.29 | Helped |
| add LCF | Llama2 · LFUD conclusion generation | Perplexity: 21.08 -> 12.12 | Helped |
| add LCF | Mistral · LFUD conclusion generation | Valid%(GPT4): 80.88 -> 85.71 | Helped |
| add LCF | Llama3 · LFUD fallacy identification | Accuracy: 50.00 -> 76.96 | Helped |
| add reconstruction loss Lrec (ablation) | LCF on Llama2 · LFUD conclusion generation | Valid%: 93.13 -> 96.56 | Helped |
| add content projector constraint Lcontent (ablation) | LCF on Llama2 · LFUD conclusion generation | Valid%: 94.60 -> 96.56 | Helped |
| add logic projector constraint Llogic (ablation) | LCF on Llama2 · LFUD fallacy identification | Accuracy: 51.47 -> 75.00 | Helped |
| add logic projector constraint Llogic (ablation) | LCF on Llama2 · LFUD fallacy identification | ∆Prob.: -1.83 -> 6.29 | Helped |
| add content projector (ablation) | LCF on Llama2 · LFUD conclusion generation | Valid%: 82.84 -> 96.56 | Helped |
Surprising findings
- Modifying only the hidden representation without a content projector still raises validity but causes content interference, lowering accuracy versus full LCF.
- Reversing the modification direction (invalid modification) sharply reduces validity, showing the steering works in both directions.
Limitations
- Evaluated only on LFUD with 12 fallacy types and 204 test points
- Relies on GPT-4 and a trained Llama-2 discriminator whose accuracy is approximate (about 80% and over 90%)
- Requires training data with paired valid and invalid samples generated by GPT-3.5-turbo and manually revised
Experimental setup
Datasets: LFUD
Benchmarks: LFUD
Metrics: Valid% Perplexity Accuracy ΔProbability
Baselines: Original LLMs ITI RAHF SFT
Builds on: Inference-Time Intervention TruthX RAHF Transformer
Closest papers by meaning
- Logical Consistency of Large Language Models in Fact-Checking (ICLR 2025 · similarity 0.89)
- Logically Consistent Language Models via Neuro-Symbolic Integration (ICLR 2025 · similarity 0.88)
- Calibrating Reasoning in Language Models with Internal Consistency (NeurIPS 2024 · similarity 0.88)
- Enhancing Reasoning Capabilities of LLMs via Principled Synthetic Logic Corpus (NeurIPS 2024 · similarity 0.87)
- Improving Factuality and Reasoning in Language Models through Multiagent Debate (ICML 2024 · similarity 0.87)
- Improving Reasoning Performance in Large Language Models via Representation Engineering (ICLR 2025 · similarity 0.87)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
