Unveiling and Manipulating Prompt Influence in Large Language Models

要約

プロンプトは、大規模言語モデル (LLM) の応答をガイドする上で重要な役割を果たします。
ただし、応答の形成における、入力顕著性として知られる、プロンプト内の個々のトークンの複雑な役割は、ほとんど解明されていないままです。
既存の顕著性手法は、LLM 生成の目的と一致していないか、線形性の仮定に大きく依存しているため、不正確になる可能性があります。
これに対処するために、私たちはトークン配布ダイナミクス (TDD) を提案します。これは、LLM 出力の生成におけるプロンプトの役割を明らかにし、操作する \textcolor{black}{シンプルかつ効果的な}アプローチです。
TDD は、言語モデル ヘッド (LM ヘッド) の堅牢な解釈機能を活用して、入力の顕著性を評価します。
入力トークンを埋め込み空間に投影し、語彙全体の分布ダイナミクスに基づいてその重要性を推定します。
順方向、逆方向、双方向という 3 つの TDD バリアントを導入し、それぞれがトークンの関連性について独自の洞察を提供します。
広範な実験により、プロンプトと LLM 出力の間の因果関係の解明において、TDD が最先端のベースラインを大幅に上回っていることが明らかになりました。
単なる解釈を超えて、制御されたテキスト生成のための 2 つのプロンプト操作タスク (ゼロショットの有害な言語抑制と感情ステアリング) に TDD を適用します。
経験的な結果は、プロンプト内の有毒な合図と感情的な合図の両方を識別し、その後、生成されたコンテンツ内の有害性を軽減したり、感情を調整したりするという TDD の熟練度を強調しています。

要約(オリジナル)

Prompts play a crucial role in guiding the responses of Large Language Models (LLMs). However, the intricate role of individual tokens in prompts, known as input saliency, in shaping the responses remains largely underexplored. Existing saliency methods either misalign with LLM generation objectives or rely heavily on linearity assumptions, leading to potential inaccuracies. To address this, we propose Token Distribution Dynamics (TDD), a \textcolor{black}{simple yet effective} approach to unveil and manipulate the role of prompts in generating LLM outputs. TDD leverages the robust interpreting capabilities of the language model head (LM head) to assess input saliency. It projects input tokens into the embedding space and then estimates their significance based on distribution dynamics over the vocabulary. We introduce three TDD variants: forward, backward, and bidirectional, each offering unique insights into token relevance. Extensive experiments reveal that the TDD surpasses state-of-the-art baselines with a big margin in elucidating the causal relationships between prompts and LLM outputs. Beyond mere interpretation, we apply TDD to two prompt manipulation tasks for controlled text generation: zero-shot toxic language suppression and sentiment steering. Empirical results underscore TDD’s proficiency in identifying both toxic and sentimental cues in prompts, subsequently mitigating toxicity or modulating sentiment in the generated content.

arxiv情報

著者 Zijian Feng,Hanzhang Zhou,Zixiao Zhu,Junlang Qian,Kezhi Mao
発行日 2024-05-20 09:15:36+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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