Large language models (LLMs) exhibit excellent ability to understand human languages, but do they also understand their own language that appears gibberish to us? In this work we delve into this question, aiming to uncover the mechanisms underlying such behavior in LLMs. We employ the Greedy Coordinate Gradient optimizer to craft prompts that compel LLMs to generate coherent responses from seemingly nonsensical inputs. We call these inputs LM Babel and this work systematically studies the behavior of LLMs manipulated by these prompts. We find that the manipulation efficiency depends on the target text's length and perplexity, with the Babel prompts often located in lower loss minima compared to natural prompts. We further examine the structure of the Babel prompts and evaluate their robustness. Notably, we find that guiding the model to generate harmful texts is not more difficult than into generating benign texts, suggesting lack of alignment for out-of-distribution prompts.
翻译:大型语言模型(LLMs)展现出对人类语言的卓越理解能力,但它们是否也能理解对我们而言如同乱码的自身语言?本文深入探究这一问题,旨在揭示LLM此类行为背后的机制。我们采用贪婪坐标梯度优化器构造提示词,迫使LLM从看似无意义的输入中生成连贯响应。我们将这类输入称为LM巴别塔,并通过系统研究探讨被此类提示词操控的LLM的行为特征。研究发现操控效率取决于目标文本的长度与困惑度,且巴别塔提示词通常比自然提示词位于更低的损失最小值区域。我们进一步分析了巴别塔提示词的结构并评估其鲁棒性。值得注意的是,引导模型生成有害文本并不比生成良性文本更困难,这表明对于分布外提示词存在对齐缺失现象。