自动调节数据混合比例,让大模型在多个任务上均衡表现
AutoMixAlign: Adaptive Data Mixing for Multi-Task Preference Optimization in LLMs
- 用专用模型先找出各任务的最佳损失,再通过对抗优化平衡整体表现
- 在多任务测试中,性能优于传统联合训练和模型融合方法
- 适合需要兼顾多种对齐目标的LLM训练场景
大语言模型在不同任务(如有用、无害、诚实)上的表现高度依赖训练数据构成。现有方法依赖大量消融实验、启发式规则或人工经验,成本高且效果不佳。本文研究基于DPO的多任务偏好优化问题,提出AutoMixAlign(AMA)算法,通过自适应混合数据提升多任务均衡性。AMA首先为每项任务训练专用模型以确定理想损失,随后利用新型极小极大优化训练通用模型,优先关注通用模型与专用模型损失差异最大的任务。为此设计两种算法:AMA-R动态重加权目标函数,AMA-S动态调整各任务采样比例,二者在凸情况下均达到$O(1/\\/sqrt{T})$的收敛速率。其中AMA-R的收敛性基于Sagawa等(2019)结果,AMA-S通过EXP3等在线学习技术证明收敛。在多个多任务对齐设置中验证,AMA优于标准总损失优化方法及模型融合方案。
原文摘要 · Abstract (English)
When aligning large language models (LLMs), their performance on various tasks (such as being helpful, harmless, and honest) depends heavily on the composition of their training data. However, selecting a data mixture that achieves strong performance across all tasks is challenging. Existing approaches rely on large ablation studies, heuristics, or human intuition, but these can be prohibitively expensive and suboptimal. We study this problem in the setting of preference optimization via DPO and introduce AutoMixAlign (AMA), a theoretically-grounded algorithm that adaptively mixes datasets during training to balance performance across tasks. AMA first trains \textit{specialist models} for each task to determine losses that correspond to strong task performance. Then, it trains a generalist model using a novel minimax optimization that prioritizes tasks for which generalist model losses deviate most from specialist model losses. To optimize this problem, we propose two algorithms: (1) AMA-R, which adaptively reweights the objective to prioritize tasks, and (2) AMA-S, which adaptively adjusts how much data is sampled from each task to prioritize tasks. Both algorithms achieve a convergence rate of $O(1/\sqrt{T})$ in the convex case. AMA-R's convergence result follows from Sagawa et al. (2019), and we provide a convergence proof for AMA-S using online learning techniques such as EXP3. We evaluate AMA on several multitask alignment setups and find that AMA outperforms the standard alignment approach -- which simply optimizes the total loss across all tasks -- and also outperforms model merging methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。