Characterizing Large Language Model Geometry Helps Solve Toxicity Detection and Generation

要約

大規模言語モデル (LLM) は、その内部表現についてほとんど知られていないにもかかわらず、現在の AI の進歩を推進しています。
この研究では、幾何学のレンズを通して LLM の内部メカニズムに光を当てることを提案します。
特に、マルチヘッドアテンション埋め込みが存在するように制約される固有次元を閉じた形式で $(i)$ 開発し、フィードフォワード(MLP)ネットワークの分割および領域ごとのアフィンマッピングを $(ii)$ 開発します。
LLM のレイヤー。
私たちの理論的発見により、最先端の LLM に適用できる新しい原則に基づいたソリューションの設計がさらに可能になります。
まず、幾何学的な理解を通じて、情報に基づいたプロンプト操作を通じて埋め込みの固有次元を制御することで、LLM の RLHF 保護をバイパスできることを示します。
次に、任意の (事前トレーニングされた) LLM から抽出できる解釈可能な幾何学的特徴を導出し、入力の豊富な抽象表現を提供します。
これらの特徴は毒性検出を解決するのに十分であり、さらにはさまざまな種類の毒性の識別を可能にすることも観察しています。
私たちの結果は、大規模な体制であっても、正確な理論的結果が LLM の実際的な疑問にどのように答えることができるかを示しています。
コード: https://github.com/RandallBalestriero/SplineLLM

要約(オリジナル)

Large Language Models (LLMs) drive current AI breakthroughs despite very little being known about their internal representations. In this work, we propose to shed the light on LLMs inner mechanisms through the lens of geometry. In particular, we develop in closed form $(i)$ the intrinsic dimension in which the Multi-Head Attention embeddings are constrained to exist and $(ii)$ the partition and per-region affine mappings of the feedforward (MLP) network of LLMs’ layers. Our theoretical findings further enable the design of novel principled solutions applicable to state-of-the-art LLMs. First, we show that, through our geometric understanding, we can bypass LLMs’ RLHF protection by controlling the embedding’s intrinsic dimension through informed prompt manipulation. Second, we derive interpretable geometrical features that can be extracted from any (pre-trained) LLM, providing a rich abstract representation of their inputs. We observe that these features are sufficient to help solve toxicity detection, and even allow the identification of various types of toxicity. Our results demonstrate how, even in large-scale regimes, exact theoretical results can answer practical questions in LLMs. Code: https://github.com/RandallBalestriero/SplineLLM

arxiv情報

著者 Randall Balestriero,Romain Cosentino,Sarath Shekkizhar
発行日 2024-07-11 09:32:19+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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