arXiv:2505.11166cs.CLcs.AI2025-05被引 8

通过短到长偏好优化,提升大模型对长文本的利用能力。

SoLoPO: Unlocking Long-Context Capabilities in LLMs via Short-to-Long Preference Optimization

  • 分两步优化:先用短文本增强上下文理解,再对齐长短文本奖励得分
  • 在多个长文本基准上显著提升模型泛化能力,计算和内存效率更高
  • 适用于需要处理长文档的场景,如法律、医疗等专业领域

尽管预训练中已扩展上下文长度,大语言模型仍难以有效利用真实世界中的长上下文信息,主要受限于数据质量、训练效率及优化目标设计不足。为此,我们提出一种名为 SoLoPO(Short-to-Long Preference Optimization)的框架,将长上下文偏好优化解耦为短上下文偏好优化与短到长奖励对齐(SoLo-RA)两部分,兼具理论与实证支持。短上下文偏好优化利用从短上下文采样的偏好对,提升模型对上下文知识的利用能力;而 SoLo-RA 显式鼓励在包含相同任务相关资讯的短/长上下文条件下,响应的奖励得分保持一致,从而实现短上下文能力向长上下文场景的有效迁移。SoLoPO 兼容主流偏好优化算法,显著提升数据构建与训练效率。实验表明,该方法在各类长上下文基准上均显著增强模型的长度与领域泛化能力,同时在计算与内存效率方面表现突出。

原文摘要 · Abstract (English)

Despite advances in pretraining with extended context sizes, large language models (LLMs) still face challenges in effectively utilizing real-world long-context information, primarily due to insufficient long-context alignment caused by data quality issues, training inefficiencies, and the lack of well-designed optimization objectives. To address these limitations, we propose a framework named \textbf{S}h\textbf{o}rt-to-\textbf{Lo}ng \textbf{P}reference \textbf{O}ptimization (\textbf{SoLoPO}), decoupling long-context preference optimization (PO) into two components: short-context PO and short-to-long reward alignment (SoLo-RA), supported by both theoretical and empirical evidence. Specifically, short-context PO leverages preference pairs sampled from short contexts to enhance the model's contextual knowledge utilization ability. Meanwhile, SoLo-RA explicitly encourages reward score consistency for the responses when conditioned on both short and long contexts that contain identical task-relevant information. This facilitates transferring the model's ability to handle short contexts into long-context scenarios. SoLoPO is compatible with mainstream preference optimization algorithms, while substantially improving the efficiency of data construction and training processes. Experimental results show that SoLoPO enhances all these algorithms with respect to stronger length and domain generalization abilities across various long-context benchmarks, while achieving notable improvements in both computational and memory efficiency.

长上下文偏好优化效率提升

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