要約
日常生活において生成モデルの利用が増加しているため、例えば安全なコンテンツを生成したり、スタイルの変化を探索するためのツールをユーザーに提供したりするために、その生成を制御する効率的なメカニズムが求められている。理想的には、そのような機構は、出力品質を保ちつつ、学習時と推論時の両方で安価であるべきである。最近の研究では、このようなメカニズムは、ソースセットとターゲットセット(例えば、有毒文と無毒文)のプロンプトを使用したときに見られる活性度の分布の違いを修正することを目的として、モデルの活性度のみに介入することで得られることが示されている。そのマップは局所的に調整され、下流の層への影響を考慮しないため、サンプル外で使用すると意図しないシフトを引き起こす介入になる。我々はこの研究で、線形エンド・ツー・エンド活性化ステアリング(LinEAS)を提案する。よりロバストであることに加え、LinEASを訓練するために使用される損失は、スパース化ノルムを用いて正則化することができ、ニューロンや層の選択を自動的に行うことができる。経験的に、LinEASはほんの一握りのサンプルで効果を発揮し、毒性緩和において類似のベースラインを打ち負かす一方、はるかに複雑な微調整アプローチと同等の性能を発揮する。我々は、LinEAS介入が構成可能であることを示し、その性能に対するスパース性の影響を研究し、テキストから画像への拡散への応用を紹介する。
要約(オリジナル)
The growing use of generative models in daily life calls for efficient mechanisms to control their generation, to e.g., produce safe content or provide users with tools to explore style changes. Ideally, such mechanisms should be cheap, both at train and inference time, while preserving output quality. Recent research has shown that such mechanisms can be obtained by intervening exclusively on model activations, with the goal of correcting distributional differences between activations seen when using prompts from a source vs. a target set (e.g., toxic and non-toxic sentences). While cheap, these fast methods are inherently crude: their maps are tuned locally, not accounting for their impact on downstream layers, resulting in interventions that cause unintended shifts when used out-of-sample. We propose in this work linear end-to-end activation steering (LinEAS), an approach trained with a global loss that accounts simultaneously for all layerwise distributional shifts. In addition to being more robust, the loss used to train LinEAS can be regularized with sparsifying norms, which can automatically carry out neuron and layer selection. Empirically, LinEAS only requires a handful of samples to be effective, and beats similar baselines on toxicity mitigation, while performing on par with far more involved finetuning approaches. We show that LinEAS interventions can be composed, study the impact of sparsity on their performance, and showcase applications in text-to-image diffusions.
arxiv情報
著者 | Pau Rodriguez,Michal Klein,Eleonora Gualdoni,Arno Blaas,Luca Zappella,Marco Cuturi,Xavier Suau |
発行日 | 2025-04-04 11:17:20+00:00 |
arxivサイト | arxiv_id(pdf) |