Large language models (LLMs), when guided by explicit textual plans, can perform reliable step-by-step reasoning during problem-solving. However, generating accurate and effective textual plans remains challenging due to LLM hallucinations and the high diversity of task-specific questions. To address this, we draw inspiration from human Implicit Cognition (IC), the subconscious process by which decisions are guided by compact, generalized patterns learned from past experiences without requiring explicit verbalization. We propose iCLP, a novel framework that enables LLMs to adaptively generate latent plans (LPs), which are compact encodings of effective reasoning instructions. iCLP first distills explicit plans from existing step-by-step reasoning trajectories. It then learns discrete representations of these plans via a vector-quantized autoencoder coupled with a codebook. Finally, by fine-tuning LLMs on paired latent plans and corresponding reasoning steps, the models learn to perform implicit planning during reasoning. Experimental results on mathematical reasoning and code generation tasks demonstrate that, with iCLP, LLMs can plan in latent space while reasoning in language space. This approach yields significant improvements in both accuracy and efficiency and, crucially, demonstrates strong cross-domain generalization while preserving the interpretability of chain-of-thought reasoning.
翻译:大语言模型(LLMs)在显式文本规划的引导下,能够在问题求解过程中进行可靠的逐步推理。然而,由于LLM的幻觉效应及任务相关问题的多样性,生成准确且有效的文本规划仍具挑战性。受人类隐式认知(Implicit Cognition, IC)的启发——即一种无需显式言语化、通过从过往经验中习得的紧凑泛化模式来指导决策的潜意识过程——我们提出了iCLP这一新颖框架,使LLMs能够自适应地生成潜在规划(Latent Plans, LPs),即有效推理指令的紧凑编码。iCLP首先从现有的逐步推理轨迹中蒸馏出显式规划,随后通过向量量化自编码器与码本相结合的方式学习这些规划的离散表示。最后,通过在配对潜在规划及相应推理步骤上对LLMs进行微调,模型得以在推理过程中执行隐式规划。在数学推理与代码生成任务上的实验结果表明,借助iCLP,LLMs能够在潜在空间进行规划,同时在语言空间进行推理。该方法在准确性与效率上均带来显著提升,并且关键地展现出强大的跨领域泛化能力,同时保持了思维链推理的可解释性。