让大模型自动学习推理逻辑,更智能地挑选示范样本。
SALA: Semantic-Aware Logical Alignment for Complex Reasoning in In-Context Learning

- 自动归纳任务专属推理步骤,不依赖预设规则
- 用动态时间规整对齐推理序列,实现柔性匹配
- 在多个推理基准上优于现有方法,解释性强
复杂推理的高效上下文学习依赖于正确示范样本的选择。基于表面相似性的传统检索方法难以捕捉深层求解逻辑。现有基于逻辑的方法虽能匹配预定义推理步骤,但僵化的规则和精确匹配机制无法适应灵活多样的推理过程。为此,我们提出SALA——一种语义感知的逻辑对齐框架。SALA不依赖固定规则库,而是自动学习任务相关的推理操作,并将其嵌入连续语义空间,利用动态时间规整(DTW)对齐推理序列。该方法在保持高度可解释性的同时,实现推理逻辑的软性、灵活匹配。在四个推理基准和三种大语言模型上的实验表明,SALA优于现有示范选择方法。进一步分析验证了操作归纳与逻辑语义对齐的关键作用。
原文摘要 · Abstract (English)
Effective in-context learning (ICL) for complex reasoning relies on selecting the right demonstrations. Traditional retrieval methods based on surface similarity fail to capture the underlying problem-solving logic. Recent logic-based methods address this by matching predefined reasoning steps, but the rigid rules and exact-match criteria is improper to handle flexible or diverse reasoning processes. To address the problem, we propose SALA, a Semantic-Aware Logical Alignment framework. Instead of relying on a fixed inventory, SALA automatically learns task-specific reasoning operations. It then embeds these operations into a continuous semantic space and uses dynamic time warping (DTW) to align the reasoning sequences. This approach allows for soft, flexible matching of reasoning logic while remaining highly interpretable. Experiments across four reasoning benchmarks and three LLMs demonstrate that SALA outperforms existing demonstration selection methods. Further analysis confirms the roles of the operation induction and the logical semantic alignment.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。