On the Robustness of Transformers against Context Hijacking for Linear Classification

要約

トランスベースの大手言語モデル(LLMS)は、強力なコンテキスト学習機能を実証しています。
しかし、それらの予測は、事実上正しいコンテキスト、コンテキストハイジャックとして知られる現象によって破壊される可能性があり、重大な堅牢性の問題を明らかにします。
この現象を理論的に理解するために、線形変圧器の最近の進歩に基づいて、コンテキスト内線形分類問題を調査します。
セットアップでは、コンテキストトークンは事実上正しいクエリ回答ペアとして設計されています。クエリは最終クエリに似ていますが、反対のラベルがあります。
次に、モデルの深さ、トレーニングコンテキストの長さ、ハイジャックのコンテキストトークンの数の関数として定式化される線形トランスの堅牢性に関する一般的な理論分析を開発します。
重要な発見は、よく訓練されたより深いトランスがより高い堅牢性を達成できることであり、経験的観察と一致することです。
より深い層がより微調整された最適化ステップを可能にし、コンテキストハイジャックからの干渉を効果的に軽減できるため、この改善が生じることを示します。
これは、数値実験によってもよくサポートされています。
私たちの調査結果は、より深いアーキテクチャの利点に関する理論的洞察を提供し、変圧器アーキテクチャの理解を高めることに貢献しています。

要約(オリジナル)

Transformer-based Large Language Models (LLMs) have demonstrated powerful in-context learning capabilities. However, their predictions can be disrupted by factually correct context, a phenomenon known as context hijacking, revealing a significant robustness issue. To understand this phenomenon theoretically, we explore an in-context linear classification problem based on recent advances in linear transformers. In our setup, context tokens are designed as factually correct query-answer pairs, where the queries are similar to the final query but have opposite labels. Then, we develop a general theoretical analysis on the robustness of the linear transformers, which is formulated as a function of the model depth, training context lengths, and number of hijacking context tokens. A key finding is that a well-trained deeper transformer can achieve higher robustness, which aligns with empirical observations. We show that this improvement arises because deeper layers enable more fine-grained optimization steps, effectively mitigating interference from context hijacking. This is also well supported by our numerical experiments. Our findings provide theoretical insights into the benefits of deeper architectures and contribute to enhancing the understanding of transformer architectures.

arxiv情報

著者 Tianle Li,Chenyang Zhang,Xingwu Chen,Yuan Cao,Difan Zou
発行日 2025-02-21 17:31:00+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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