arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.02780cs.LGcs.CLcs.CR
收藏

针对语言模型激活的对抗攻击缩放定律

Scaling Laws for Adversarial Attacks on Language Model Activations

Google DeepMind(谷歌DeepMind)

Stanislav Fort

AI总结:

本文研究针对语言模型激活的对抗攻击,发现可控目标 token 数与受控激活数呈线性缩放,并揭示输入/输出维度不匹配可能是攻击成因。

摘要:

我们探索了一类针对语言模型激活的对抗攻击。通过操纵相对较小的一小组模型激活 $a$,我们展示了控制大量(在某些情况下多达1000个)后续 token $t$ 的确切预测的能力。我们通过实验验证了一条缩放定律:被预测的目标 token 的最大数量 $t_\mathrm{max}$ 与攻击者控制其激活的 token 数量 $a$ 呈线性依赖关系,即 $t_\mathrm{max} = κa$。我们发现,对于不同的语言模型,在跨越2个数量级的模型规模范围内,控制输出空间中的单个比特所需的输入空间控制比特数(我们称之为攻击抗性 $χ$)显著恒定,介于约16和约25之间。与针对 token 的攻击相比,针对激活的攻击可预见地要强得多;然而,我们发现了一个令人惊讶的规律:通过激活或通过 token 引导的一比特输入,能够对相似数量的输出比特施加控制。这为对抗攻击是输入空间与输出空间之间维度不匹配的结果这一假设提供了支持。攻击语言模型激活比攻击 token 更容易,其一个实际影响涉及多模态和选定检索模型:在这些模型中,额外数据源作为激活直接加入,绕开了分词输入。这开辟了一个新的、广泛的攻击面。通过将语言模型用作研究对抗攻击的可控试验台,我们能够对计算机视觉中无法触及的输入-输出维度进行实验,尤其是在输出维度占主导地位的情况下。

英文摘要:

We explore a class of adversarial attacks targeting the activations of language models. By manipulating a relatively small subset of model activations, $a$, we demonstrate the ability to control the exact prediction of a significant number (in some cases up to 1000) of subsequent tokens $t$. We empirically verify a scaling law where the maximum number of target tokens $t_\mathrm{max}$ predicted depends linearly on the number of tokens $a$ whose activations the attacker controls as $t_\mathrm{max} = κa$. We find that the number of bits of control in the input space needed to control a single bit in the output space (what we call attack resistance $χ$) is remarkably constant between $\approx 16$ and $\approx 25$ over 2 orders of magnitude of model sizes for different language models. Compared to attacks on tokens, attacks on activations are predictably much stronger, however, we identify a surprising regularity where one bit of input steered either via activations or via tokens is able to exert control over a similar amount of output bits. This gives support for the hypothesis that adversarial attacks are a consequence of dimensionality mismatch between the input and output spaces. A practical implication of the ease of attacking language model activations instead of tokens is for multi-modal and selected retrieval models, where additional data sources are added as activations directly, sidestepping the tokenized input. This opens up a new, broad attack surface. By using language models as a controllable test-bed to study adversarial attacks, we were able to experiment with input-output dimensions that are inaccessible in computer vision, especially where the output dimension dominates.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑