Long-Short Alignment for Effective Long-Context Modeling in LLMs

要約

大規模な言語モデル(LLM)は、印象的なパフォーマンスと驚くべき緊急特性を示しています。
ただし、それらの有効性は、変圧器アーキテクチャの固定コンテキストウィンドウによって制限されたままであり、長いコンテキストモデリングの課題をもたらします。
これらの課題の中で、長さの一般化 – トレーニング中に見られるものよりも長くシーケンスに一般化する能力 – は、古典的および基本的な問題です。
この作業では、長さの一般化に関する新鮮な視点を提案し、ポジショナルエンコーディングやデータ構造などの入力機能に従来の重点からモデルの出力分布に焦点を合わせます。
具体的には、合成タスクに関するケーススタディを通じて、\ textBf {long-shortアラインメント}の重要な役割を強調します。これは、さまざまな長さのシーケンス全体にわたる出力分布の一貫性です。
この洞察を自然言語のタスクに拡張して、この現象を定量化するためにロングショートミスアライメントと呼ばれるメトリックを提案し、メトリックと長さの一般化パフォーマンスの間の強い相関関係を明らかにします。
これらの調査結果に基づいて、トレーニング中の長期的なアライメントを促進する正規化用語を開発します。
広範な実験は、当社のアプローチの有効性を検証し、LLMでより効果的な長いコンテキストモデリングを達成するための新しい洞察を提供します。
コードはhttps://github.com/pku-ml/longshortalignmentで入手できます。

要約(オリジナル)

Large language models (LLMs) have exhibited impressive performance and surprising emergent properties. However, their effectiveness remains limited by the fixed context window of the transformer architecture, posing challenges for long-context modeling. Among these challenges, length generalization — the ability to generalize to sequences longer than those seen during training — is a classical and fundamental problem. In this work, we propose a fresh perspective on length generalization, shifting the focus from the conventional emphasis on input features such as positional encodings or data structures to the output distribution of the model. Specifically, through case studies on synthetic tasks, we highlight the critical role of \textbf{long-short alignment} — the consistency of output distributions across sequences of varying lengths. Extending this insight to natural language tasks, we propose a metric called Long-Short Misalignment to quantify this phenomenon, uncovering a strong correlation between the metric and length generalization performance. Building on these findings, we develop a regularization term that promotes long-short alignment during training. Extensive experiments validate the effectiveness of our approach, offering new insights for achieving more effective long-context modeling in LLMs. Code is available at https://github.com/PKU-ML/LongShortAlignment.

arxiv情報

著者 Tianqi Du,Haotian Huang,Yifei Wang,Yisen Wang
発行日 2025-06-13 13:25:39+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.LG パーマリンク