arXiv:2409.13203cs.CL2024-09AAAI被引 18

让小模型学会复杂推理,结合神经与符号方法提升性能。

Neural-Symbolic Collaborative Distillation: Advancing Small Language Models for Complex Reasoning Tasks

  • 分离通用能力与专用知识,分别用神经网络和符号知识库进行蒸馏。
  • 小模型在多个推理数据集上超越GPT-3.5-turbo,接近700亿参数大模型表现。
  • 符号知识库可解释、易维护,适合需要可靠推理的场景。

本文提出神经符号协同蒸馏(NesyCD),一种用于小语言模型(SLMs,≤7B)学习大语言模型(LLMs,>13B)复杂推理能力的新方法。复杂推理任务不仅需通用认知能力,还需稀疏且难以捕捉的专用知识,传统神经模型难以胜任。NesyCD通过双路径蒸馏:一方面将教师模型的通用能力蒸馏至学生神经网络;另一方面,针对特定任务中的专有知识,采用符号蒸馏方式构建并存储于符号知识库(KB)中。该方法解耦通用与专用能力,实现高效性能提升。实验表明,该方法显著增强小模型在域内(BBH、GSM8K)与域外(AGIEval、ARC)数据集上的复杂推理能力。特别地,LLaMA3-8B与Qwen2-7B在性能上超越GPT-3.5-turbo,接近拥有九倍参数的LLaMA3-70B。代码将在https://github.com/Xnhyacinth/NesyCD发布。

原文摘要 · Abstract (English)

In this paper, we propose $\textbf{Ne}$ural-$\textbf{Sy}$mbolic $\textbf{C}$ollaborative $\textbf{D}$istillation ($\textbf{NesyCD}$), a novel knowledge distillation method for learning the complex reasoning abilities of Large Language Models (LLMs, e.g., \textgreater 13B). We argue that complex reasoning tasks are difficult for Small Language Models (SLMs, e.g., $\leq$ 7B), as these tasks demand not only general cognitive abilities but also specialized knowledge, which is often sparse and difficult for these neural-based SLMs to effectively capture. Therefore, NesyCD distills the general capabilities and specialized knowledge in LLMs using different manners. On the one hand, we distill only general abilities from teacher LLMs into the student SLMs of parameterized neural networks. On the other hand, for the specialized abilities and uncommon knowledge of a complex reasoning task, we employ a symbolic knowledge distillation approach to obtain and store the specialized knowledge within a symbolic knowledge base (KB). By decoupling general and specialized capabilities, the proposed NesyCD can achieve superior performance cost-effectively, utilizing smaller models and blending parameterized neural networks with symbolic KB. Moreover, the specialized KB generalizes well and is comprehended and manipulated by humans. Our experiments show that NesyCD significantly boosts SLMs' complex reasoning performance on in-domain (BBH, GSM8K) and out-of-domain (AGIEval, ARC) datasets. Notably, our approach enabled the LLaMA3-8B and Qwen2-7B to surpass GPT-3.5-turbo in performance and come close to matching LLaMA3-70B, despite the latter having nine times more parameters. Our code will be available at https://github.com/Xnhyacinth/NesyCD.

小模型符号推理知识蒸馏复杂推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。