arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.12226cs.LG
收藏

CDW-CoT:聚类距离加权链式思维推理

CDW-CoT: Clustered Distance-Weighted Chain-of-Thoughts Reasoning

Harbin Institute of Technology, Weihai(哈尔滨工业大学(威海));Sichuan University(四川大学)

Yuanheng Fang, Guoqing Chao, Wenqiang Lei, Shaobo Li, Dianhui Chu

AI总结:

提出CDW-CoT方法,通过聚类和距离加权动态生成个性化提示,在六个数据集上显著提升LLM推理准确率。

摘要:

大型语言模型(LLMs)近年来通过链式思维(CoT)提示在复杂推理任务中取得了令人瞩目的成果。然而,现有的大多数CoT方法依赖于使用相同的提示(无论是手动设计还是自动生成)来处理整个数据集。这种一刀切的方法可能无法满足单个数据集内多样性所产生的特定需求。为解决这一问题,我们提出了聚类距离加权链式思维(CDW-CoT)方法,该方法通过整合聚类和提示优化技术,动态构建针对每个数据实例特征的提示。我们的方法采用聚类算法将数据集划分为不同的组,从中选择一个提示候选池以反映数据集内在的多样性。对于每个聚类,CDW-CoT训练适合其特定特征的最优提示概率分布。最后,它根据每个测试实例与聚类中心的接近程度,动态构建一个独特的提示概率分布,并从中选择提示进行推理。CDW-CoT在包括常识、符号和数学推理任务在内的六个数据集上始终优于传统CoT方法。具体而言,与手动CoT相比,CDW-CoT在LLaMA2(13B)上实现了平均准确率提升25.34%,在LLaMA3(8B)上提升了15.72%。

英文摘要:

Large Language Models (LLMs) have recently achieved impressive results in complex reasoning tasks through Chain of Thought (CoT) prompting. However, most existing CoT methods rely on using the same prompts, whether manually designed or automatically generated, to handle the entire dataset. This one-size-fits-all approach may fail to meet the specific needs arising from the diversities within a single dataset. To solve this problem, we propose the Clustered Distance-Weighted Chain of Thought (CDW-CoT) method, which dynamically constructs prompts tailored to the characteristics of each data instance by integrating clustering and prompt optimization techniques. Our method employs clustering algorithms to categorize the dataset into distinct groups, from which a candidate pool of prompts is selected to reflect the inherent diversity within the dataset. For each cluster, CDW-CoT trains the optimal prompt probability distribution tailored to their specific characteristics. Finally, it dynamically constructs a unique prompt probability distribution for each test instance, based on its proximity to cluster centers, from which prompts are selected for reasoning. CDW-CoT consistently outperforms traditional CoT methods across six datasets, including commonsense, symbolic, and mathematical reasoning tasks. Specifically, when compared to manual CoT, CDW-CoT achieves an average accuracy improvement of 25.34% on LLaMA2 (13B) and 15.72% on LLaMA3 (8B).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑