MAGDi: Structured Distillation of Multi-Agent Interaction Graphs Improves Reasoning in Smaller Language Models

📄 arXiv: 2402.01620v2 📥 PDF

作者: Justin Chih-Yao Chen, Swarnadeep Saha, Elias Stengel-Eskin, Mohit Bansal

分类: cs.CL

发布日期: 2024-02-02 (更新: 2024-06-07)

备注: ICML 2024 (Camera-ready); First two authors contributed equally; GitHub: https://github.com/dinobby/MAGDi


💡 一句话要点

提出MAGDi以提高小型语言模型的推理能力

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 多智能体交互 知识蒸馏 语言模型 推理能力 图结构 效率提升 模型压缩

📋 核心要点

  1. 现有的多智能体交互方法在推理任务中表现优异,但生成过程复杂且成本高,缺乏高效推理的单一模型。
  2. MAGDi通过将多智能体交互表示为图形,并使用图编码器增强小型模型,采用多种目标函数进行知识蒸馏。
  3. 实验结果显示,MAGDi在推理能力上超越了多种单一和多教师蒸馏方法,并在效率上提升了一个数量级。

📝 摘要(中文)

多智能体之间的交互在大型语言模型(LLM)中已显示出在多种推理任务上的显著改进。然而,这些方法涉及多个模型的长生成过程,成本高昂,并且无法提供高效推理的单一最终模型。为了解决这个问题,本文提出了MAGDi,一种将多个LLM之间的推理交互结构化蒸馏到小型语言模型中的新方法。MAGDi通过将多智能体交互表示为图形,增强基础学生模型,并使用三种目标函数进行知识蒸馏。实验结果表明,MAGDi在七个广泛使用的常识和数学推理基准上显著提升了小型模型的推理能力,并在效率上超越了多个蒸馏方法。

🔬 方法详解

问题定义:本文旨在解决现有多智能体交互方法在推理任务中生成过程复杂、成本高昂以及缺乏高效推理单一模型的问题。

核心思路:MAGDi通过结构化蒸馏将多个LLM之间的推理交互转化为图形表示,增强小型模型的推理能力,旨在提高推理效率和准确性。

技术框架:MAGDi的整体架构包括三个主要模块:图编码器用于表示多智能体交互,蒸馏过程通过三种目标函数进行知识传递,最后通过训练优化小型模型的推理能力。

关键创新:MAGDi的核心创新在于将多智能体交互结构化为图形,并通过图编码器进行知识蒸馏,这与传统的单一教师蒸馏方法有本质区别。

关键设计:MAGDi采用了三种损失函数:下一个标记预测损失、正确与错误推理之间的对比损失,以及基于图的目标函数,以建模交互结构,确保知识的有效传递。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,MAGDi在七个常识和数学推理基准上显著提升了小型模型的推理能力,相较于传统蒸馏方法,效率提升达一个数量级,展示了其在推理任务中的优越性。

🎯 应用场景

MAGDi的研究成果在多个领域具有潜在应用价值,包括智能问答系统、自动推理和决策支持系统等。通过提高小型语言模型的推理能力,MAGDi能够在资源受限的环境中实现高效推理,推动智能系统的普及与应用。

📄 摘要(原文)

Multi-agent interactions between Large Language Model (LLM) agents have shown major improvements on diverse reasoning tasks. However, these involve long generations from multiple models across several rounds, making them expensive. Moreover, these multi-agent approaches fail to provide a final, single model for efficient inference. To address this, we introduce MAGDi, a new method for structured distillation of the reasoning interactions between multiple LLMs into smaller LMs. MAGDi teaches smaller models by representing multi-agent interactions as graphs, augmenting a base student model with a graph encoder, and distilling knowledge using three objective functions: next-token prediction, a contrastive loss between correct and incorrect reasoning, and a graph-based objective to model the interaction structure. Experiments on seven widely used commonsense and math reasoning benchmarks show that MAGDi improves the reasoning capabilities of smaller models, outperforming several methods that distill from a single teacher and multiple teachers. Moreover, MAGDi also demonstrates an order of magnitude higher efficiency over its teachers. We conduct extensive analyses to show that MAGDi (1) enhances the generalizability to out-of-domain tasks, (2) scales positively with the size and strength of the base student model, and (3) obtains larger improvements (via our multi-teacher training) when applying self-consistency -- an inference technique that relies on model diversity.