๐ค AI Summary
This work addresses the insufficient fine-grained logical controllability in large language model (LLM) generation. We propose a dual-system decoding framework that integrates an LLM with a first-order logic (FOL) reasoner, jointly guiding generation via a differentiable decision function. Inspired by cognitive dual-process theoryโthe first application of this theory to decoding designโit shifts the paradigm from local token-level encouragement to global rule-satisfying token-set guidance, harmonizing human intuition with formal logic. The framework is end-to-end trainable and enables programmable, rule-aware generation control. Experiments on CommonGen and PersonaChat demonstrate significant improvements: +12.7% rule adherence rate and +23% naturalness in human evaluation, empirically validating the synergistic enhancement of logical rigor and linguistic fluency.
๐ Abstract
Constrained decoding approaches aim to control the meaning or style of text generated by the pre-trained large language models (LLMs or also PLMs) for various tasks at inference time. However, these methods often guide plausible continuations by greedily and explicitly selecting targets. Though fulfilling the task requirements, these methods may overlook certain general and natural logics that humans would implicitly follow towards such targets. Inspired by cognitive dual-process theory, in this work, we propose a novel decoding framework DECIDER where the base LLMs are equipped with a First-Order Logic (FOL) reasoner to express and evaluate the rules, along with a decision function that merges the outputs of both systems to guide the generation. Unlike previous constrained decodings, DECIDER transforms the encouragement of target-specific words into all words that satisfy several high-level rules, enabling us to programmatically integrate our logic into LLMs. Experiments on CommonGen and PersonaChat demonstrate that DECIDER effectively follows given FOL rules to guide LLMs in a more human-like and logic-controlled manner.