Paper deep dive
Fundamental Limitations of Alignment in Large Language Models
Yotam Wolf, Noam Wies, Oshri Avnery, Yoav Levine, Amnon Shashua
Models: LLaMA 2
Intelligence
Status: succeeded | Model: google/gemini-3.1-flash-lite-preview | Prompt: intel-v1 | Confidence: 94%
Last extracted: 3/12/2026, 8:16:37 PM
Summary
The paper introduces 'Behavior Expectation Bounds' (BEB), a theoretical framework to analyze alignment in Large Language Models (LLMs). It models LLMs as a mixture of well-behaved and ill-behaved components. The authors prove that if an LLM has a non-zero probability of exhibiting an undesired behavior, there exist prompts that can trigger this behavior, rendering current alignment methods like RLHF vulnerable to adversarial attacks.
Entities (4)
Relation Signals (2)
Behavior Expectation Bounds â analyzes â Large Language Models
confidence 95% ¡ we propose a theoretical approach called Behavior Expectation Bounds (BEB) which allows us to formally investigate several inherent characteristics and limitations of alignment in large language models.
Reinforcement Learning from Human Feedback â isvulnerableto â Adversarial Prompting
confidence 90% ¡ leading alignment approaches such as reinforcement learning from human feedback make the LLM prone to being prompted into the undesired behaviors.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:An important aspect in developing language models that interact with humans is aligning their behavior to be useful and unharmful for their human users. This is usually achieved by tuning the model in a way that enhances desired behaviors and inhibits undesired ones, a process referred to as alignment. In this paper, we propose a theoretical approach called Behavior Expectation Bounds (BEB) which allows us to formally investigate several inherent characteristics and limitations of alignment in large language models. Importantly, we prove that within the limits of this framework, for any behavior that has a finite probability of being exhibited by the model, there exist prompts that can trigger the model into outputting this behavior, with probability that increases with the length of the prompt. This implies that any alignment process that attenuates an undesired behavior but does not remove it altogether, is not safe against adversarial prompting attacks. Furthermore, our framework hints at the mechanism by which leading alignment approaches such as reinforcement learning from human feedback make the LLM prone to being prompted into the undesired behaviors. This theoretical result is being experimentally demonstrated in large scale by the so called contemporary "chatGPT jailbreaks", where adversarial users trick the LLM into breaking its alignment guardrails by triggering it into acting as a malicious persona. Our results expose fundamental limitations in alignment of LLMs and bring to the forefront the need to devise reliable mechanisms for ensuring AI safety.
Tags
Links
- Source: https://arxiv.org/abs/2304.11082
- Canonical: https://arxiv.org/abs/2304.11082
Trouble viewing inline? Open PDF directly â
Full Text
290,688 characters extracted from source content.
Expand or collapse full text
Fundamental limitations of alignment in Large Language Models Yotam Wolfâ The Hebrew University yotamwolf@cs.huji.ac.il &Noam Wies The Hebrew University noam.wies@cs.huji.ac.il & Oshri Avnery The Hebrew University oshri.avnery@mail.huji.ac.il &Yoav Levine AI21 Labs yoavl@ai21.com & Amnon Shashua The Hebrew University shashua@cs.huji.ac.il Equal contribution Abstract An important aspect in developing language models that interact with humans is aligning their behavior to be useful and unharmful for their human users. This is usually achieved by tuning the model in a way that enhances desired behaviors and inhibits undesired ones, a process referred to as alignment. In this paper, we propose a theoretical approach called Behavior Expectation Bounds (BEB) which allows us to formally investigate several inherent characteristics and limitations of alignment in large language models. Importantly, we prove that within the limits of this framework, for any behavior that has a finite probability of being exhibited by the model, there exist prompts that can trigger the model into outputting this behavior, with probability that increases with the length of the prompt. This implies that any alignment process that attenuates an undesired behavior but does not remove it altogether, is not safe against adversarial prompting attacks. Furthermore, our framework hints at the mechanism by which leading alignment approaches such as reinforcement learning from human feedback make the LLM prone to being prompted into the undesired behaviors. This theoretical result is being experimentally demonstrated in large scale by the so called contemporary âchatGPT jailbreaks", where adversarial users trick the LLM into breaking its alignment guardrails by triggering it into acting as a malicious persona. Our results expose fundamental limitations in alignment of LLMs and bring to the forefront the need to devise reliable mechanisms for ensuring AI safety. 1 Introduction Training large language models (LLMs) over vast corpora has revolutionized natural language processing, giving LLMs the ability to mimic human-like interactions and serve as general purpose assistants in a wide variety of tasks, such as wide-scoped question answering, writing assistance, teaching, and more (Radford et al., 2019; Devlin et al., 2019; Brown et al., 2020; Schulman et al., 2023; OpenAI, 2023; Bubeck et al., 2023; Nori et al., 2023; West, 2023; Park et al., 2023). A growing concern due to the increasing reliance on LLMs for such purposes is the harm they can cause their users, such as feeding fake information (Lin et al., 2022; Weidinger et al., 2022), behaving offensively and feeding social biases (Hutchinson et al., 2020; Venkit et al., 2022; Weidinger et al., 2022), or encouraging problematic behaviors by users (even by psychologically manipulating them Roose (2023); Atillah (2023)). Indeed, the unsupervised textual data used for pretraining modern LLMs includes enough demonstrations of the above undesired behaviors for them to be present in the resulting models (Bender et al., 2021). The act of removing these undesired behaviors is often called alignment (Yudkowsky, 2001; Taylor et al., 2016; Amodei et al., 2016; Shalev-Shwartz et al., 2020; Hendrycks et al., 2021; Pan et al., 2022; Ngo, 2022). There are several different approaches to performing alignment in LLMs. One is to include aligning prompts: Askell et al. (2021) show that injecting language models with helpful, honest, and harmless (H) textual prompts improves alignment and decreases toxicity. Similarly, Rae et al. (2021) also use prompting to decrease toxicity. Another approach for LLM alignment is the procedure of reinforcement learning from human feedback (RLHF) that trains language models to be helpful and harmless with a human preference based reward (Bai et al., 2022). Their work shows an increase in an LLMâs H scores while maintaining its useful abilities, as measured by zero- and few-shot performance on different natural language tasks. Ouyang et al. (2022) use this method to fine tune GPT-3 into InstructGPT using data collected from human labelers to reach better performance on a variety of tasks, while improving H (measured via bias and toxicity datasets Gehman et al. (2020); Nangia et al. (2020)). Recently, a new approach for alignment known as representation engineering Zou et al. (2023); Jorgensen et al. (2023); Leong et al. (2023); Liu et al. (2023); Turner et al. (2023) has emerged, in which vectors are injected into the hidden layer representations of the model post-training, steering the model towards desirable behaviors in latent space. While promising, it is still in early development stages, and the extent of its effects on the model, e.g.maintaining its usefulness, are unknown. Therefore, in this work we focus on the first two approaches, RLHF finetuning and prompting, in which the modelâs weights are frozen in inference time. While the above approaches to alignment are effective to a certain extent, they are still dangerously brittle. For example, Wallace et al. (2019) show that short adversarial prompts can trigger negative behaviors and social biases. Yu & Sagae (2021) and Xu et al. (2021) provide methods for exposing harmful behaviors of models by triggering problematic responses. Subhash (2023) showed that adversarial prompts can manipulate ChatGPT to alter user preferences. Beyond academic works, the general media is abundant with contemporary examples of leading LLMs being manipulated by users to expose harmful behaviors via the so called âjailbreaking" approach of prompting the LLM to mimic a harmful persona (Nardo, 2023; Deshpande et al., 2023). Even in the absence of adversarial attacks, leading alignment methods can underperform and are not well understood: Perez et al. (2022) provide evidence that certain negative behaviors have inverse scaling with the number of RLHF steps, indicating that this popular alignment procedure may have a complex effect. In this paper, we introduce a probabilistic framework for analyzing alignment and its limitations in LLMs, which we call Behavior Expectation Bounds (BEB), and use it in order to establish fundamental properties of alignment in LLMs. The core idea behind BEB is to represent the LLM distribution as a superposition of ill- and well-behaved components, in order to provide guarantees on the ability to restrain the ill-behaved components, i.e., guarantees that the LLM is aligned. It is noteworthy that LLMs have been shown to distinctly represent behaviors and personas, and the notion of persona or behavior superposition has been intuitively proposed as an explanation (Andreas, 2022; Nardo, 2023). Our BEB framework assumes an underlying categorization into different behaviors, where any natural language sentence is assigned a ground truth score between â11-1- 1 (very negative) and +11+1+ 1 (very positive) for every behavior (see examples in Figure 1). Such a categorization can be, e.g., into the previously proposed helpful, honest, and harmless categories, but it can also be expanded and fine-grained into many more categories such as polite, not racist, compassionate, and so on. Given such a categorization and ground truth sentence scoring functions per category, the alignment score of any distribution over natural sentences w.r.t. a given behavior is the expectation value of sentence scores for sentences drawn from the distribution. The BEB framework thus provides a natural theoretical basis for describing the goal of contemporary alignment approaches such as RLHF: increasing the behavior expectation scores for behaviors of interest. Additionally, the BEB framework employs assumptions on the LLM distribution presented in section 2. These include the notion of Îą,β,γι,β,γι , β , Îł-distinguishability (definition 5), which means the language model can be decomposed to a sum of ill-behaved and well-behaved components, where the weight of the negative in the mixture is Îą, it is distinguishable from the rest of the distribution in the sense of a bounded KL-divergence that is at least β, and exhibits negative behavior scored as Îł<00Îł<0Îł < 0. Lastly, we include a definition for Ď-similarity between two components (definition 4), which bounds the variance of the log likelihood between the well-behaved and ill-behaved components. We use this framework in section 3 in order to assert several important statements regarding LLM alignment: Alignment impossibility: We show that under our main assumption, called Îą,β,γι,β,γι , β , Îł-distinguishability, an LLM alignment process which reduces undesired behaviors to a small but nonzero fraction of the probability space is not safe against adversarial prompts (theorem 1); Preset aligning prompts can only provide a finite guardrail against adversarial prompts: We prove that under our main assumption and the assumption of Ď-similarity (definition 4), including an aligning prefix prompt does not guarantee alignment (theorem 2). LLMs can be misaligned during a conversation: We show that under our previous assumptions, a user can misalign an LLM during a conversation, with limited prompt length at each turn (theorem 3). LLMs with best-of-n sampling can be misaligned: Under our main assumption, selection of most aligned model response out of n generations, does not guarantee alignment (theorem 4). In section 4, we demonstrate empirically some of the assumptions and results derived from the BEB framework on the LLaMA LLM family (Meta, 2023; Touvron et al., 2023). In subsection 4.1 we measure possible values for β-distinguishability (definition 2) and Ď-similarity (definition 4), as can be seen in figure 2. In subsection 4.2 we demonstrate the underlying mechanism by which misalignment happens in the BEB framework, which is the convergence of the LLM to a negative behavior component. This is done by showing a decay of the KL divergence between the two, as seen in figure 3a. Furthermore, we can extract estimated parameters of the theoretical framework allowing to calculate the expected misaligning prompt length. Moreover, we demonstrate how the method proposed by the BEB framework for generating misaligning prompts causes misalignment (figure 3b), which is quantified by our proposed behavior expectation metric (equation 2). This framework is mainly centered around models that have undergone an aligning finetuning process such as RLHF and less on pretrained models, as the latter are not aligned to begin with and require little effort to be provoked into behaving negatively (as shown in appendix M), but even so, the theoretical framework is still applicable to both. In subsection 4.2 we also present preliminary indications that RLHF alignment increases the distinguishability of undesired behaviors, but we leave the investigation of this possibility for future work. Overall, we hope that our newly proposed framework of Behavior Expectation Bounds, along with our attained results, may spark a theoretical thrust helping to better understand the important topic of LLM alignment. 2 Behavior Expectation Bounds: A Framework for Analyzing LLM Alignment Figure 1: Examples of sentence behavior scores along different behavior verticals. Our framework of Behavior Expectation Bounds (BEB) assumes ground truth behavior scoring functions, and bounds the expected scores of models along different behavior verticals in order to guarantee LLM alignment or misalignment. In this section, we introduce Behavior Expectation Bounds (BEB), a probabilistic framework for studying alignment of LLMs. Given a language modelâs probability distribution âPblackboard_P, we propose a measure for quantifying its tendency to produce desired outputs as measured by a certain behaviour vertical B, where for example B can be helpfulness, politeness, or any other behavior vertical of interest. Formally, we model behaviour scoring functions along vertical B as B:ÎŁââ[â1,1]:âsuperscriptÎŁ11B: ^*â[-1,1]B : ÎŁâ â [ - 1 , 1 ], which take a string of text from an alphabet ÎŁ ÎŁ as their input111We use the Kleene closure ÎŁâsuperscriptÎŁ ^*ÎŁâ for simplicity of notation, but note that it can be replaced with ÎŁcontext lengthsuperscriptÎŁcontext length ^context lengthÎŁcontext length to account for the finite context window of models. and rate the manner in which B manifests in the string, with +11+1+ 1 being very positive and â11-1- 1 being very negative. This formulation directly reflects recent empirical efforts for studying alignment. In particular, (Perez et al., 2022) recently curated 500500500500 negative and positive examples along each of over 100100100100 different behavior verticals. Figure 1 shows short examples of the behavior scores of several sentences along two behavior verticals. We use the following expected behavior scoring of distribution âPblackboard_P w.r.t. behavior vertical B as a scalar quantifyer of the tendency of âPblackboard_P to produce desired behavior along the B vertical: Bâ:=sâźââ˘[Bâ˘(s)]assignsubscriptâsubscriptsimilar-toâdelimited-[]B_P:=E_s [B(s)]Bblackboard_P := blackboard_Es âź blackboard_P [ B ( s ) ] (1) where for clarity purposes, in this paper sampling from language distributions is implicitly restricted to single sentences (see discussion on this choice and its limitations in A.3). We use the above distribution notation âPblackboard_P to represent that of an unprompted LLM, e.g., an LLM straight out of pretraining or out of an alignment tuning procedure such as RLHF. The task of aligning a pretrained LLM can be now framed as increasing its expected behavior scores along behavior verticals of interest. Intuitively, as an LLM is prompted with a prefix text string sâsuperscripts^*sâ, the behaviour of the conditional probability â(â |sâ)P (¡\,|\,s^* )blackboard_P ( â | sâ ) might change in accordance with the in-context learning phenomenon (Brown et al., 2020; Wies et al., 2023) in which the LLM adapts its conditional probabilities to reflect its current textual context. Thus, we will denote by Bââ˘(sâ)subscriptâsuperscriptB_P (s^* )Bblackboard_P ( sâ ) the behaviour of the language model when prompted with a prompt text sâsuperscripts^*sâ: Bââ˘(sâ):=sâźâ(â |sâ)â˘[Bâ˘(s)]B_P(s^*):=E_s (¡|s^* )[B(% s)]Bblackboard_P ( sâ ) := blackboard_Es âź blackboard_P ( â | sâ ) [ B ( s ) ] (2) We will consider several scenarios for which the prefix sâsuperscripts^*sâ plays different roles. The first and main one is that sâsuperscripts^*sâ serves as an adversarial input prompt. Our key finding in this paper is that an LLM which was initially aligned w.r.t. a certain behavior vertical, i.e., BâsubscriptâB_PBblackboard_P very close to 1111, can still be vulnerable to adversarial prompts, i.e., there exists a prompt sâsuperscripts^*sâ such that Bââ˘(sâ)subscriptâsuperscriptB_P(s^*)Bblackboard_P ( sâ ) is very close to â11-1- 1. Secondly, we will consider a scenario in which sâsuperscripts^*sâ is comprised of an initial aligning prompt, denoted s0subscript0s_0s0, concatenated by a subsequent adversarial input prompt. Lastly, we will analyze conversation scenarios in which sâsuperscripts^*sâ is comprised of previous turns of user queries and LLM responses. 2.1 LLMs as a Superposition of Behaviors In this subsection, we present a key aspect of our BEB framework: decomposing the unprompted LLM distribution âPblackboard_P into a mixture of distributions, each behaving differently. Importantly, LLMs exhibit signs of capturing such decompositions in practice. For example, Andreas (2022) shows empirical evidence that current LLMs can infer behaviours from textual prompts, and that these behaviours affect the text that the LLM generates, and Nardo (2023) discuss LLMs as a superposition of personas (i.e. a mixture of components, each behaving differently). We will use mixture decompositions inspired by such observations, and prove that textual prompts can reweight the prior of the mixture components. In appendix K, we experimentally demonstrate that the embedding space of contemporary leading LLMs (LLaMA family (Meta, 2023)) is clustered according to positive and negative inputs w.r.t. behaviors of interest (assembled by (Perez et al., 2022)), and empirically show that this clustering approximately corresponds to our analyzed mixture decomposition model, presented hereinafter. Notice that an unprompted language model, âPblackboard_P, is a function that assigns probability to strings of text, according to the statistics of the text it trains on. Therefore, it can be written as some mixture of components â=âiwiâ˘âiâsubscriptsubscriptsubscriptâP= _iw_iP_iblackboard_P = âi witalic_i blackboard_Pi by introducing latent variables, for example, the sources of the training data, and each component will be the natural language distribution induced by the specific text source. As different sources may exhibit different behaviors (toxic, polite, etc.), the induced components may exhibit them as well. We can then partition the components into two disjoint sets, sum over each, and obtain a two component mixture â=(âiâAwiâ˘âi)+(âjâBwjâ˘âj)=Îąâ˘â1+(1âÎą)â˘â2âsubscriptsubscriptsubscriptâsubscriptsubscriptsubscriptâsubscriptâ11subscriptâ2P=( _iâ Aw_iP_i)+( _jâ Bw_jP_j% )= _1+(1-Îą)P_2blackboard_P = ( âi â A witalic_i blackboard_Pi ) + ( âj â B witalic_j blackboard_Pj ) = Îą blackboard_P1 + ( 1 - Îą ) blackboard_P2. For example, A can be a set of ill-behaved components and B a set of well-behaved components w.r.t. a given behavior. In appendix A.1, we show this summation method indeed leads to a mixture of two distributions, one more ill-behaved and one more well-behaved. Note that Îą,1âÎą1Îą,1-Îą , 1 - Îą are fixed weights of the components â1,â2subscriptâ1subscriptâ2P_1,P_2blackboard_P1 , blackboard_P2 in the unprompted modelâs distribution, meaning the initial weights given to each component before a prompt is inserted. However, in the prompted model, the weights of the components will change, as when inserting a prompt, we will use the conditional probability distribution of the model, in which the componentsâ priors are reweighted, possibly a lot, depending on the prompt (see appendix A.1 for details). Observe that for any decomposition of a distribution âPblackboard_P into two components, â=Îąâ˘â0+(1âÎą)â˘â1âsubscriptâ01subscriptâ1P= _0+(1-Îą)P_1blackboard_P = Îą blackboard_P0 + ( 1 - Îą ) blackboard_P1, the relation Bâ=Îąâ˘Bâ0+(1âÎą)â˘Bâ1subscriptâsubscriptsubscriptâ01subscriptsubscriptâ1B_P=Îą B_P_0+(1-Îą)B_P_1Bblackboard_P = Îą Bblackboard_P start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT + ( 1 - Îą ) Bblackboard_P start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT holds from linearity of expectations, and implies that one component is more well-behaved w.r.t. B than the full distribution and the other more ill-behaved, i.e.: Bâ1â¤Bââ¤Bâ0subscriptsubscriptâ1subscriptâsubscriptsubscriptâ0B_P_1⤠B_P⤠B_P_0Bblackboard_P start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ⤠Bblackboard_P ⤠Bblackboard_P start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT (or vice versa). Thus, focusing on a specific behavior, we adopt the notation: â=Îąâ˘ââ+(1âÎą)â˘â+âsubscriptâ1subscriptâP= _-+(1-Îą)P_+blackboard_P = Îą blackboard_P- + ( 1 - Îą ) blackboard_P+ (3) We refer to the above as the two component mixture, where â+subscriptâP_+blackboard_P+ is the well-behaved component and ââsubscriptâP_-blackboard_P- is the ill-behaved component. While this observation is true for any decomposition into two distributions, we will give results for decompositions in which the two distributions ââsubscriptâP_-blackboard_P- and â+subscriptâP_+blackboard_P+ are sufficiently distinct (formally defined in section 2.2), and the negative component is strictly ill-behaved (i.e, Bâââ¤Îł<0subscriptsubscriptâ0B_P_-â¤Îł<0Bblackboard_P start_POSTSUBSCRIPT - end_POSTSUBSCRIPT ⤠γ < 0). In these cases, the magnitude of Îą, the prior of the ill-behaved component, will determine the alignment of the LLM: an LLM with a small prior Îą will be less likely to produce undesired sentences along behavior B vertical. Our main result in section 3 states that no matter how small Îą is (how aligned the model is to begin with), if it is positive then there exists a prompt that can misalign the LLM to behave like ââsubscriptâP_-blackboard_P-. For an extended discussion on the mixture assumption and its implications, see appendix A.1. 2.2 Definitions for Bounding the Expected LLM Behavior In this subsection, we lay out formal definitions of our BEB framework. Specifically, we define: behavior misalignment using prompts (definition 1); distinguishability between unprompted (prompted) model distributions (definition 2 (3)) and similarity between two distributions (definition 4) that fit a prompting scenario; distinguishibility between ill- and well-behaved components comprising a certain LLMâs distribution (definition 5), called Îą,β,γι,β,γι , β , Îł-distinguishability. Ultimately, Îą is the prior of the negative component, β is the distinguishability (according to definition 2) between the ill-behaved component and the well behaved component, and Îł is the negativity of the ill-behaved component, measured in terms of behavior expectation (equation 2). Once an LLM has finished training, its behavior can only be affected via prompting. Using the above notation for behavior expectation (equations 1 and 2), the following defines when an LLM is prompt-misalignable: Definition 1. Let Îłâ[â1,0)10Îłâ[-1,0)Îł â [ - 1 , 0 ), we say that an LLM with distribution âPblackboard_P is Îł-prompt-misalignable w.r.t. behaviour B, if for any Ďľ>0italic-Ďľ0Îľ>0Ďľ > 0 there exists a textual prompt sââÎŁâsuperscriptsuperscriptÎŁs^*â ^*sâ â ÎŁâ such that Bââ˘(sâ)<Îł+Ďľsubscriptâsuperscriptitalic-ĎľB_P (s^* )<Îł+ _P ( sâ ) < Îł + Ďľ. Note that while the above definition is based on existence of a specific prompt that misaligns a model, our theoretical results in 3 are proved by construction of this prompt by an empirically practical method, and this construction method is used in 4.2 to create misaligning prompts that work on real LLMs. We also extend our results beyond existence of misaligning prompts to probability mass of misaligning promtpts in appendix B. Decomposing a language model into parts that are well-behaved and ill-behaved exposes components which are more desirable to enhance. The following notion of distinguishability will allow us to guarantee that one component can be enhanced over the other 222Note that the β-distinguishability definition can be relaxed to a KL distance that decays as a power law to zero with increasing length of the prompt s0subscript0s_0s0, as shown in appendix I. Definition 2. We say that a distribution âĎsubscriptâitalic-ĎP_Ďblackboard_PĎ is β-distinguishable from distribution âĎsubscriptâP_Ďblackboard_PĎ if for any nâĽ00n⼠0n ⼠0: s=s1ââŻâsnâźâĎâ˘(â )[DKâ˘L(âĎ(â |s) || âĎ(â |s))] _s=s_1 ⌠s_n _Ď% (¡ ) [D_KL (P_Ď (¡|s )% || P_Ď (¡|s ) ) ]~~~% ~~~~~~~~~~blackboard_Es = s start_POSTSUBSCRIPT 1 â ⯠â sitalic_n âź blackboard_PĎ ( â ) end_POSTSUBSCRIPT [ Ditalic_K L ( blackboard_PĎ ( â | s ) | | blackboard_PĎ ( â | s ) ) ] (4) :=sâsn+1=s1ââŻâsnâsn+1âźâĎâ˘(â )â˘[logâĄâĎâ˘(sn+1|s)âĎâ˘(sn+1|s)]>βassignabsentsubscriptdirect-sumsubscript1direct-sumsubscript1âŻsubscriptsubscript1similar-tosubscriptâitalic-Ďâ delimited-[]subscriptâitalic-Ďconditionalsubscript1subscriptâconditionalsubscript1 :=E_s s_n+1=s_1 ⌠s_n s% _n+1 _Ď (¡ ) [ P_% Ď (s_n+1|s )P_Ď (s_n+1|s ) ]>β:= blackboard_Es â s start_POSTSUBSCRIPT n + 1 = s1 â ⯠â sitalic_n â sitalic_n + 1 âź blackboard_PĎ ( â ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_PĎ ( sitalic_n + 1 | s ) end_ARG start_ARG blackboard_PĎ ( sitalic_n + 1 | s ) end_ARG ] > β (5) Similarly, we say β-undistinguishable if the above is smaller than β. Where n is the number of sentences sampled from the distribution333The notation s1ââŻâsnâźâĎ(â |s0)s_1 ⌠s_n _Ď (¡|s_0 )s1 â ⯠â sitalic_n âź blackboard_PĎ ( â | s0 ) indicates sampling n consecutive sentences from the conditional probability distribution âĎ(â |s0)P_Ď (¡|s_0 )blackboard_PĎ ( â | s0 ) given the initial prefix s0subscript0s_0s0.. The above definition is used for proving our main result theorem 1. For more advanced cases in theorems 2 and 3, of misaligning a prompt protected model or via a multiple turn conversation, we will require a stronger condition, that both distributions are distinguishable when prompted with a prefix s0subscript0s_0s0, that can contain any textual sequence followed by some sentence of negative behavior. This is to capture the notion that the positive and negative components are mainly different w.r.t a specific behavior in question. Hence the negative sentence induces the distinguishability. Definition 3. We say that a distribution âĎsubscriptâitalic-ĎP_Ďblackboard_PĎ is β-prompt-distinguishable (β-prompt-undistinguishable) from âĎsubscriptâP_Ďblackboard_PĎ if for any prefix s0=s01ââŚâs0nsubscript0direct-sumsuperscriptsubscript01âŚsuperscriptsubscript0s_0=s_0^1 ... s_0^ns0 = s01 â ⌠â s0italic_n of n sentence, ending with a negatively behaving sentence s0nsuperscriptsubscript0s_0^ns0italic_n, i.e., Bâ˘(s0n)<0superscriptsubscript00B(s_0^n)<0B ( s0italic_n ) < 0, the prompted models âĎ(â |s0)P_Ď(¡|s_0)blackboard_PĎ ( â | s0 ) and âĎ(â |s0)P_Ď(¡|s_0)blackboard_PĎ ( â | s0 ) are β-distinguishable (β-undistinguishable). For a discussion on distinguishability, its necessity, limitations and examples, see A.2. The following bounds the extent to which a new sentence can enhance one component over the other: Definition 4. We say that a distribution âĎsubscriptâitalic-ĎP_Ďblackboard_PĎ is Ď-similar to distribution âĎsubscriptâP_Ďblackboard_PĎ if there exists Ď>00Ď>0Ď > 0 such that for any sequence of sentences s0subscript0s_0s0 and any nâĽ00n⼠0n ⼠0: Vâ˘aâ˘rs1ââŚâsnâźâĎ(â |s0)â˘[logâĄâĎâ˘(s1ââŚâsn|s0)âĎâ˘(s1ââŚâsn|s0)]<nâ˘Ď2 Var_s_1 ... s_n _Ď(¡|s_0% ) [ P_Ď (s_1 ... s_n|s_0% )P_Ď (s_1 ... s_n|s_0 ) % ]<nĎ^2V a ritalic_s start_POSTSUBSCRIPT 1 â ⌠â sitalic_n âź blackboard_PĎ ( â | s0 ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_PĎ ( s1 â ⌠â sitalic_n | s0 ) end_ARG start_ARG blackboard_PĎ ( s1 â ⌠â sitalic_n | s0 ) end_ARG ] < n Ď2 (6) Intuitively, if both âĎsubscriptâitalic-ĎP_Ďblackboard_PĎ and âĎsubscriptâP_Ďblackboard_PĎ are natural language distributions, they cannot be too different in terms of the variance in the ratio of their conditional likelihoods, and Ď quantifies this. Furthermore, when âĎsubscriptâitalic-ĎP_Ďblackboard_PĎ and âĎsubscriptâP_Ďblackboard_PĎ represent positive and negative angles of a specific behaviour, it is likely that they have some common properties so in these cases Ď is likely even lower than the bound over all natural language sentences. The linear dependence on length of sequence is inspired by the case of sampling n independent sentences, where variance between the log ratio of âĎsubscriptâitalic-ĎP_Ďblackboard_PĎ and âĎsubscriptâP_Ďblackboard_PĎ is Ď2superscript2Ď^2Ď2 for each sentence. β roughly serves as a lower bound on the KL-divergence in the case of distinguishability (or upper bound in the case of indistinguishability), and Ď its variation and their ratio will appear in several of our results in section 3. The following defines β-distinguishability specifically between the ill- and well-behaved components comprising the LLM distribution, parameterized by Îą in equation 3, and adds a condition that the behavior expectation of the ill-behaved component is bad enough (i.e., under Îł) for all initial prompts sâsuperscripts^*sâ: Definition 5. Let Îłâ[â1,0)10Îłâ[-1,0)Îł â [ - 1 , 0 ), assume â=Îąâ ââ+(1âÎą)â â+ââ subscriptââ 1subscriptâP=ι¡P_-+ (1-Îą )¡P_+blackboard_P = Îą â blackboard_P- + ( 1 - Îą ) â blackboard_P+ for Îą>00Îą>0Îą > 0. We say that behaviour B:ÎŁââ[â1,1]:âsuperscriptÎŁ11B: ^*â [-1,1 ]B : ÎŁâ â [ - 1 , 1 ] is Îą,β,γι,β,γι , β , Îł-negatively-distinguishable (Îą,β,γι,β,γι , β , Îł-negatively-prompt-distinguishable) in distribution âPblackboard_P, if supsâBâââ˘(sâ)â¤Îłsubscriptsupremumsuperscriptsubscriptsubscriptâsuperscript _s^*\B_P_-(s^*)\⤠_sâ Bblackboard_P start_POSTSUBSCRIPT - end_POSTSUBSCRIPT ( sâ ) ⤠γ and ââsubscriptâP_-blackboard_P- is β-distinguishable (β-prompt-distinguishable) from â+subscriptâP_+blackboard_P+ (def. 2) ((def. 3)). We will prove our theoretical results for LLM distributions that are distinguishable according to the above KL-divergence based definitions. Our experiments in section 4 indicate that for the LLaMa LM family on behaviors such as agreeableness and anti-immigration as presented in Perez et al. (2022), possible values for these parameters are: logâĄ1Îą1 1Îąlog divide start_ARG 1 end_ARG start_ARG Îą end_ARG in the range of 18â30183018-3018 - 30, β is in the range of 5â205205-205 - 20 and Ďβ Ďβdivide start_ARG Ď end_ARG start_ARG β end_ARG in the range of 0.35â10.3510.35-10.35 - 1. The ratio βâ˛Î˛superscriptⲠβ βdivide start_ARG βⲠend_ARG start_ARG β end_ARG (upper bound over lower bound of the KL between positive and negative components in a misaligning scenario) is in the range of 2â3232-32 - 3. Lastly, for analyzing conversations, we require the assumption that the negative component is always more likely to output an ill-behaved answer than the positive component, to bound the change in log-likelihood between the two in the exchange between the modelâs turn and the userâs turn: Definition 6. We say that âĎsubscriptâP_Ďblackboard_PĎ is positive w.r.t âĎsubscriptâitalic-ĎP_Ďblackboard_PĎ on behavior B:ÎŁââ[â1,1]:âsuperscriptÎŁ11B: ^*â[-1,1]B : ÎŁâ â [ - 1 , 1 ] if for any prefix s0subscript0s_0s0 and a sentence s, that is negative, Bâ˘(s)<00B(s)<0B ( s ) < 0, the following holds: âĎâ˘(s|s0)<âĎâ˘(s|s0)subscriptâconditionalsubscript0subscriptâitalic-Ďconditionalsubscript0P_Ď(s|s_0)<P_Ď(s|s_0)blackboard_PĎ ( s | s0 ) < blackboard_PĎ ( s | s0 ). 3 Results: Limitations of LLM Alignment In this section, we use the above framework of Behavior Expectation Bounds (BEB) in order to inform the question of when LLM alignment is robust or vulnerable to adversarial prompting attacks. We begin with our main result in section 3.1, which states that under assumptions of decomposability into distinguishable components of desired and undesired behavior, aligned LLMs are not protected against adversarial misaligning prompts (theorem 1). In section 3.2, we extend the above framework to include cases of (i) preset aligning promptsâwe formally establish the benefits of this common practice by showing that in this case the length of the misaligning prompt must be linear in the length of the preset aligning prompt; (i) multi-turn interactions between adversarial users and LLMsâwe find that if the user does not provide long enough misaligning prompts, the LLM can resist misalignment by making aligning replies to the user during a conversation; and (i) best-of-n samplingâwe find that when sampling multiple responses from a model and choosing the most aligned one, the length of the misaligning prompt length increases logarithmically with the number of samples. 3.1 Misaligning via Adversarial Prompts Alignment impossibility We first show that if a model can be written as a distinct mixture of ill- and well-behaved components, then it can be misaligned via prompting: Theorem 1. Let Îłâ[â1,0)10Îłâ[-1,0)Îł â [ - 1 , 0 ), let B be a behaviour and âPblackboard_P be an unprompted language model such that B is Îą,β,γι,β,γι , β , Îł-negatively-distinguishable in âPblackboard_P (definition 5). Then âPblackboard_P is Îł-prompt-misalignable w.r.t. B (definition 1) with prompt length of 1βâ˘(logâĄ1Îą+logâĄ1Ďľ+logâĄ4)111italic-Ďľ4 1β( 1Îą+ 1Îľ+ 4)divide start_ARG 1 end_ARG start_ARG β end_ARG ( log divide start_ARG 1 end_ARG start_ARG Îą end_ARG + log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG + log 4 ). Intuitively, theorem 1 implies that if a component of the distribution exhibits a negative behavior with expectation under Îł, then there exists a prompt that triggers this behavior for the entire language model into behaving with expectation under Îł. Importantly, no matter how low the prior of the negative component Îą is, the LLM is vulnerable to adversarial prompting that exposes this negative componentâs behavior. Furthermore, the guaranteed misaligning prompt scales logarithmically in Îąâ1superscript1Îą^-1Îą- 1, providing insight into why even very low probability behaviors can be enhanced with merely a few sentences. Additionally, we see that increased distinguishability can reduce the misaligning prompt length, meaning that while some behaviors may have lower probability (i.e. lower Îą), they may have higher distinguishability β, thus overall requiring shorter misaligning prompts. In appendix B we extend theorem 1 beyond existence of a misaligning prompt, to a more generalized notion of probability mass of misaligning prompts, and prove that with the sampling method we provide for them, they guarantee misalignment with high probability. Essentially, our proof follows the PAC based theoretical framework for in-context learning introduced in Wies et al. (2023), while relaxing their approximate independence assumption and adapting the analysis to the BEB framework. For proof see appendix D. 3.2 Extensions: Aligning Prompts, Conversations and Best-of-n Sampling Misaligning in the presence of preset aligning prompts A common practice for enhancing positive behavior is to include an initial âpreset aligning promptâ, denoted s0subscript0s_0s0 below, hard coded as a prefix to the LLMâs input. The theorem below states that even in the presence of s0subscript0s_0s0, it is possible to prompt the LLM into an undesired behavior with a âmisaligning promptâ. We show that the required prompt length for misalignment scales linearly with the length of s0subscript0s_0s0. Theorem 2. Let δ>00δ>0δ > 0, Îłâ[â1,0)10Îłâ[-1,0)Îł â [ - 1 , 0 ), B be a behaviour and âPblackboard_P be a language model such that B is Îą,β,γι,β,γι , β , Îł-negatively-prompt-distinguishable in âPblackboard_P (definition 5). If the distribution corresponding to the well-behaved component of âPblackboard_P is βâ-undistinguishable, Ď-similar (definition 4) and positive (definition 6) with respect to to the ill-behaved component, then for an aligning prompt s0âźâ+â˘(â )similar-tosubscript0subscriptââ s_0 _+(¡)s0 âź blackboard_P+ ( â ), the conditional LLM distribution â(â |s0)P(¡|s_0)blackboard_P ( â | s0 ) is Îł-prompt-misalignable with probability 1âδ11- 1 - δ with prompt length 1βâ˘(logâĄ1Îą+logâĄ1Ďľ+logâĄ4)+βâ˛Î˛â˘|s0|+Ďβâ˘|s0|δ+1111italic-Ďľ4superscriptâ˛subscript0subscript01 1β( 1Îą+ 1Îľ+ 4)+ % β β|s_0|+ Ďβ |s_0|δ% +1divide start_ARG 1 end_ARG start_ARG β end_ARG ( log divide start_ARG 1 end_ARG start_ARG Îą end_ARG + log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG + log 4 ) + divide start_ARG βⲠend_ARG start_ARG β end_ARG | s0 | + divide start_ARG Ď end_ARG start_ARG β end_ARG square-root start_ARG divide start_ARG | s0 | end_ARG start_ARG δ end_ARG end_ARG + 1. Theorem 2 guarantees that even in the presence of a preset aligning prompt s0subscript0s_0s0, there exists a long enough prompt that will misalign the model. See figure 3a which demonstrates how an align-prompted model requires longer adversarial prompts to misalign than unprompted models. For proof see appendix E. Misaligning via conversation We show below that an undesired behavior can be elicited from an LLM via conversation with an adversarial user. Interestingly, we show that if the adversarial user does not use a long enough misaligning prompt in the first turn, then the LLMâs responses can hinder the userâs misaligning efforts. Intuitively, if a user begins a conversation by simply requesting âsay a racist statement", an aligned LLM will likely reply âI will not say racist statements, that is harmful", and this reply in its prompt will cause the LLM to be more mindful of refraining from racist statements in the remainder of the conversation. Overall, due to this âmisaligning resistanceâ by the LLM, the user will need to insert more misaligning text in the conversation format than in the single prompt format of section 3.1 in order for our framework to guarantee misalignment. We formalize a conversation between a user and an LLM of distribution âPblackboard_P as a sequence of user queries followed by LLM responses which are sampled from the LLMâs conditional distribution given the conversation thus far. Formally, given the history of the conversation, q1,a1â˘âŚâ˘qt,at,qt+1subscript1subscript1âŚsubscriptsubscriptsubscript1q_1,a_1...q_t,a_t,q_t+1q1 , a1 ⌠qitalic_t , aitalic_t , qitalic_t + 1, where qisubscriptq_iqitalic_i are the userâs inputs and aisubscripta_iaitalic_i are the LLMâs responses, the LLM generates a response at+1subscript1a_t+1aitalic_t + 1 by sampling from: at+1âźâ(â |q1,a1,âŚ,qt,at,qt+1)a_t+1 (¡|q_1,a_1,...,q_t,a_t,q_t+1)aitalic_t + 1 âź blackboard_P ( â | q1 , a1 , ⌠, qitalic_t , aitalic_t , qitalic_t + 1 ). In the following theorem we show that under our distinguishability conditions, misalignment is possible also in conversation format: Theorem 3. Under the conditions of theorem 2 and that the distribution corresponding to the well-behaved component of âPblackboard_P is βâ-prompt-undistinguishable to the ill-behaved component, in a conversation setting: q1,a1â˘âŚâ˘qn,an,qn+1subscript1subscript1âŚsubscriptsubscriptsubscript1q_1,a_1...q_n,a_n,q_n+1q1 , a1 ⌠qitalic_n , aitalic_n , qitalic_n + 1, the model is Îł-misalignable with total prompt length of âi=1n|qi|=1βâ˘(logâĄ1Îą+logâĄ1Ďľ+logâĄ4)+âi=1n(βâ˛Î˛â˘|ai|+Ďβâ˘nâ˘|ai|δ)+nsuperscriptsubscript1subscript111italic-Ďľ4superscriptsubscript1superscriptâ˛subscriptsubscript _i=1^n|q_i|= 1β( 1Îą+ 1% Îľ+ 4)+ _i=1^n ( β β|a_i|+% Ďβ n|a_i|δ )+nâi = 1n | qitalic_i | = divide start_ARG 1 end_ARG start_ARG β end_ARG ( log divide start_ARG 1 end_ARG start_ARG Îą end_ARG + log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG + log 4 ) + âi = 1n ( divide start_ARG βⲠend_ARG start_ARG β end_ARG | aitalic_i | + divide start_ARG Ď end_ARG start_ARG β end_ARG square-root start_ARG divide start_ARG n | aitalic_i | end_ARG start_ARG δ end_ARG end_ARG ) + n and each prompt of length no longer than |qi|â¤Î˛â˛Î˛â˘|ai|+Ďβâ˘nâ˘|ai|δ+logâĄ1Ďľ+logâĄ1Îą+logâĄ4nâ˘Î˛+1subscriptsuperscriptâ˛subscriptsubscript1italic-Ďľ141|q_i|⤠β β|a_i|+ Ďβ % n|a_i|δ+ 1Îľ+ 1Îą+ 4% nβ+1| qitalic_i | ⤠divide start_ARG βⲠend_ARG start_ARG β end_ARG | aitalic_i | + divide start_ARG Ď end_ARG start_ARG β end_ARG square-root start_ARG divide start_ARG n | aitalic_i | end_ARG start_ARG δ end_ARG end_ARG + divide start_ARG log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG + log divide start_ARG 1 end_ARG start_ARG Îą end_ARG + log 4 end_ARG start_ARG n β end_ARG + 1. Comparing the above requirement on the amount of misaligning text to that required in the single prompting scenario of theorem 1, we see that it is larger by the total text generated by the model âi=1n|ai|superscriptsubscript1subscript _i=1^n|a_i|âi = 1n | aitalic_i |. Intuitively, in the beginning of the conversation the model is aligned, so it is most likely that its response will be sampled from the well-behaved component, thus enhancing it over the ill-behaved component (see the proof of theorem 3 in appendix F for formalization of this intuition). Best-of-n sampling An additional aligning method that can be applied is to sample n conditional responses of a model to a prompt, then use a reward function to choose the most aligned one w.r.t. a desired behavior. In the following theorem, we show that while this method requires a longer misaligning prompt, alignment is not guaranteed: Theorem 4. Under the conditions of theorem 1, and using best of n sampling, i.e. argmaxy1âŚynâźâ(â |x)â˘[Bâ˘(yi)]argmax_y_1...y_n (¡|x)[B(y_i)]argmaxy start_POSTSUBSCRIPT 1 ⌠yitalic_n âź blackboard_P ( â | x ) end_POSTSUBSCRIPT [ B ( yitalic_i ) ], âPblackboard_P is Îł-prompt-misalignable with prompt length 1βâ˘(logâĄ1Îą+logâĄ1Ďľ+logâĄ4+logâĄn)111italic-Ďľ4 1β( 1Îą+ 1Îľ+ 4+ n)divide start_ARG 1 end_ARG start_ARG β end_ARG ( log divide start_ARG 1 end_ARG start_ARG Îą end_ARG + log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG + log 4 + log n ). The proof is provided in appendix G. We note with regard to other sampling methods that do not use a selective behavior based reward function, such as greedy decoding and nucleus sampling, that the misaligning prompts constructed by theorem 1, lead to misalignment as a result of the convergence of the entire model to the negative behavior component. 4 Empirical Results In this section we demonstrate that several properties that are predicted by our theoretical framework manifest in experiments with common LLMs. Our empirical results are divided into two parts. First, we probe the range of realistic values for β (lower KL bound), βâ˛Î˛ βⲠ(upper KL bound) and Ď (log likelihood variance), by using real LLMs that display opposite behaviors (figure 2). Next, we employ the method used in our theoretical proofs for constructing an adversarial prompt in order to show that a real RLHF finetuned LLM distribution converges to a negative behavior distribution at a rate which corresponds to our theory (figure 3a) and that the behavior expectation of the RLHF finetuned LLM becomes negative with said adversarial prompt (figure 3b). We used models from the LLaMA 2 family Touvron et al. (2023). To obtain textual data that displays defined behaviors, we used the datasets of Perez et al. (2022) which contain statements classified to specific behaviors. In this section we demonstrate our results for the behavior âagreeableness", in the appendix section L, we show also for âanti-immigration". Note that our experiments do not use true subcomponents of LLMs, as there is no natural way to extract them out of a general distribution, instead we use proxies by LoRA finetuning models on specific behaviors. Even so, the results obtained from the experiments display dynamics of misalignment that are consistent with our theory. Additionally, if we assume the model trained on data that is similar to the data we finetuned on, then the proxy should resemble the true component, since as explained in 2.1 the components of the mixture can be thought of as being distributions over different parts of the training data. Our code is available at: https://github.com/yowolf/Limitations-of-Alignment-in-LLMs 4.1 Possible Values for β, βâ˛Î˛ βⲠand Ď In our theoretical bounds, β, βâ˛Î˛ βⲠand Ď (defined in section 2) play a central role: their absolute values, as well as their ratio, dictate the length of our guaranteed misaligning prompts in the various analyzed scenarios. Here we attempt to probe the possible values of β, βâ˛Î˛ βⲠand Ď for two LLM-based distributions that display the negative and positive facets of the same behavior vertical, in an attempt to gain insight on realistic values of β, βâ˛Î˛ βⲠand Ď within our framework. To this end, we calculate the KL-divergence and corresponding variance between two LLMs based on Llama-2 13B chat, where one was tuned on the data of Perez et al. (2022) to display negative behavior (see technical training details in appendix L) and the other was taken as is, since it already displayed the positive behavior. We denote these as ââsubscriptâP_-blackboard_P- and â+subscriptâP_+blackboard_P+ but note that they are an approximation of a possible LLM decomposition as explained above. The results are displayed in figure 2 for the behavior âagreeableness" (as defined in Perez et al. (2022)). From the lower and upper bounds for the KL divergence, we estimate β and βâ˛Î˛ βⲠand from the linear upper bound for the corresponding variance, Ď2superscript2Ď^2Ď2. In this case, β=2020β=20β = 20, βâ˛=30superscriptâ˛30β =30βⲠ= 30, Ď2=50superscript250Ď^2=50Ď2 = 50, hence Ďβ=0.350.35 Ďβ=0.35divide start_ARG Ď end_ARG start_ARG β end_ARG = 0.35, βâ˛Î˛=1.5superscriptâ˛1.5 β β=1.5divide start_ARG βⲠend_ARG start_ARG β end_ARG = 1.5. For numbers of this order, the ratio of Ď/βĎ/Î˛Ď / β is not too big compared to βâ˛/βsuperscriptâ˛Î˛ /βⲠ/ β, hence for δ of around 0.10.10.10.1, the terms in the upper bounds of theorems 2 and 3 that are linear in text length dominate the square root terms. For β-prompt-distinguishability, we ran a similar experiment in appendix N, by first inserting to both models a neutral prefix followed by a negative behavior sentence, then performing the above experiment. We observed that the approximated value of β remains similar (βâ2020βâ 20β â 20). Figure 2: (a) KL between two distributions of opposite behaviors as function of prompt length sampled from ââsubscriptâP_-blackboard_P-, averaged on 10 sampled sequences. The red line is a lower bound for the KL divergence, hence a possible value of β. For these two distributions, we see βâ2020βâ 20β â 20. (b) Corresponding log ratio variance between the distributions mentioned in (a). 30 samples from ââsubscriptâP_-blackboard_P- were used to evaluate the variance and its error. The red line is a linear curve upper bounding the variance, hence its tangent is a possible value for Ď2superscript2Ď^2Ď2. As seen, for Ď2â50superscript250Ď^2â 50Ď2 â 50 definition 4 is satisfied. 4.2 Demonstration of Misalignment via Convergence of LLM to ââsubscriptâP_-blackboard_P- and via Behavior Expectation According to our theory, misalignment happens when the LLM distribution converges to its negative component ââsubscriptâP_-blackboard_P- as both are conditioned on longer and longer prompts sampled from ââsubscriptâP_-blackboard_P-. Consequently, the KL-divergence between ââsubscriptâP_-blackboard_P- and the LLM also decays and is bounded by the following (see appendix H for proof of this dependence): DKâ˘L(ââ(â |s)||âLâ˘Lâ˘M(â |s))<log(1+elogâĄ1Îąâβâ˘|s|)D_KL(P_-(¡|s)||P_LLM(¡|s))< (1+e % 1Îą-β|s|)Ditalic_K L ( blackboard_P- ( â | s ) | | blackboard_PL L M ( â | s ) ) < log ( 1 + eroman_log divide start_ARG 1 end_ARG start_ARG Îą end_ARG - β | s | ) (7) Hence for short prompts it is bounded by logâĄ1Îąâβâ˘|s|1 1Îą-β|s|log divide start_ARG 1 end_ARG start_ARG Îą end_ARG - β | s | and after reaching a length |s|=logâĄ1ιβ1|s|= 1ιβ| s | = divide start_ARG log divide start_ARG 1 end_ARG start_ARG Îą end_ARG end_ARG start_ARG β end_ARG, it quickly decays to zero. From this we see that the KL-divergence should converge to zero and that to a limited extent, we can use its value at |s|=00|s|=0| s | = 0 and tangent to find possible values for logâĄ1Îą1 1Îąlog divide start_ARG 1 end_ARG start_ARG Îą end_ARG and β. Our objective here is to show that when prompted with our generated prompts, an actual LLM will converge to a negative behavior distribution in a similar manner to our theoretical prediction. As before, we substitute the negative component ââsubscriptâP_-blackboard_P- with an LLM distribution that displays negative behavior, âââsubscriptâP_-blackboard_P-". Figure 3a demonstrates that an RLHF fine-tuned LLM distribution converges to âââsubscriptâP_-blackboard_P-" as both are conditioned on prompts sampled from the ill-behaved LLM (see appendix L for experimental details). We fit a linear curve to approximate an effective logâĄ1Îąâβâ˘|s|1 1Îą-β|s|log divide start_ARG 1 end_ARG start_ARG Îą end_ARG - β | s |, but note that the extracted values of Îą and β are an approximation, as the negative behavior LLM denoted by ââsubscriptâP_-blackboard_P- is not the true sub-component of the RLHF fine-tuned LLM and that equation 7 is an upper bound which is not necessarily tight. Still, we find that the ratio 1βâ˘logâĄ1Îą=3113 1β 1Îą=3divide start_ARG 1 end_ARG start_ARG β end_ARG log divide start_ARG 1 end_ARG start_ARG Îą end_ARG = 3. We show below that this is similar to the actual misaligning length. Figure 3: (a) KL-divergence between ââsubscriptâP_-blackboard_P- and an RLHF model (Llama 2 13B chat) as function of prompt length sampled from ââsubscriptâP_-blackboard_P-, averaged on 10 sampled sequences. For the first three sentences, we can fit a curve to approximate logâĄ1Îąâβâ˘|s|1 1Îą-β|s|log divide start_ARG 1 end_ARG start_ARG Îą end_ARG - β | s |. (b) Demonstration of misaligning Llama 2 13B chat via our method of sampling sequences of negative behavior from ââsubscriptâP_-blackboard_P-. As can be seen, the LLM distribution samples two types of behavior, one of negative behavior and one that tries to avoid it. Next, we show misalignment in terms of behavior expectation. As shown in figure 3b, using our method of sampling a misaligning prompt from ââsubscriptâP_-blackboard_P-, an RLHF fine-tuned model loses its alignment as it is fed longer prompts from ââsubscriptâP_-blackboard_P-. This fits our theoretical prediction (proven in appendix H) that with our misaligning prompt, s, the corresponding behavior expectation decays as a reverse sigmoid in |s||s|| s |, centered at |s|=lâ˘oâ˘gâ˘1ιβ1|s|= log 1ιβ| s | = divide start_ARG l o g divide start_ARG 1 end_ARG start_ARG Îą end_ARG end_ARG start_ARG β end_ARG: Bââ˘(s)<11+eβâ˘|s|âlâ˘oâ˘gâ˘1Îąsubscriptâ11superscript1B_P(s)< 11+e^β|s|-log 1ÎąBblackboard_P ( s ) < divide start_ARG 1 end_ARG start_ARG 1 + eitalic_β | s | - l o g divide start_ARG 1 end_ARG start_ARG Îą end_ARG end_ARG (8) Additionally, inserting an aligning prompt stalls misalignment by about one sentence, similarly to how the misaligning prompt length guarantee increases in theorem 2. Furthermore, in appendix M, we perform the same experiment for the unaligned pretrained model and find that it too misaligns with this method. This shows that the misaligning prompts from our theory are computationally tractable despite their specificity, due to the theoretical method of their construction. We also see that using an approximation for ââsubscriptâP_-blackboard_P- and not the true subcomponent achieves misalignment with dynamics that are similar to our theory. Pretrained models vs RLHF models In appendix M we performed the same experiment for a pretrained model, that has not undergone an alignment procedure, and found that the approximated value for β is 5 times smaller than that of the RLHF model on both behaviors "agreeableness" and "anti-immigration", hinting that perhaps RLHF reduces the probability for negative behavior (i.e. Îą) but increases its distinguishability β at the same time. 5 Discussion The need for robust methods for AI alignment is pressing. Prominent actors in our field are advocating for halting LLM development until the means of controlling this technology are better understood (OâBrien, 2023). This paper brings forward the Behavior Expectation Bounds (BEB) theoretical framework, which is aimed at providing means for discussing core alignment issues in leading contemporary interactions between humans and LLMs. We used the BEB framework to make several fundamental assertions regarding alignment in LLMs. First, we showed that any realistic alignment process on frozen LLMs can be reversed via an adversarial prompt or conversation with an adversarial user. As a silver lining, we showed that the better aligned the model is to begin with, the longer the prompt required to reverse the alignment, so limited prompt lengths may serve as guardrails in theory. With that, we also show that this picture is more complex, and the distinguishability of undesired behavior components also facilitates easier misalignment. Thus, while attenuating undesired behaviors, the leading alignment practice of reinforcement learning from human feedback (RLHF) may also render these same undesired behaviors more easily accessible via adversarial prompts. We leave the latter statement as an open conjecture; this theoretical direction may explain the result in Perez et al. (2022), in which RLHF increases undesired behaviors in language models. These results highlight the importance of using alignment methods that control the model at inference time, such as representation engineering Zou et al. (2023); Turner et al. (2023). Our framework has several limitations further discussed in appendix A and we leave several issues open for future work. Andreas (2022) describe modern LLMs as comprised of distinct agents that manifest when the right prompt is inserted into the LLM. Our presented notions of decomposability into components and distinguishability between them are one analyzable choice of modeling multiple agents or personas composing the LLM distribution. We showed that with this choice several theoretical statements can be made that fit empirical observations on misalignment via prompting. While intuitive and reinforced by embedding space clustering experiments in the appendix, we leave it to future work to (i) further investigate superposition and decomposability in actual LLM distributions and (i) introduce more elaborate or more realistic assumptions on the manner in which agent or persona decomposition is manifested in actual LLM distributions, and use them to gain further theoretical insight on LLM alignment. Elucidating this picture also bears promise for new empirical methods for controlling ill-behaved components with actual LLMs. Furthermore, our framework assumes ground truth behavior scores per sentence, where in reality behavior scoring is more complex, e.g., over varying text granularities, hard to define behavior verticals, and ambiguous scoring. A deeper definition of behavior scoring may lead to new insights that can be drawn from the BEB theoretical framework. Acknowledgements This research was supported by the ERC (European Research Council) and the ISF (Israel Science Foundation). References Amodei et al. (2016) Dario Amodei, Chris Olah, Jacob Steinhardt, Paul Christiano, John Schulman, and Dan ManĂŠ. Concrete problems in ai safety. arXiv preprint arXiv:1606.06565, 2016. Andreas (2022) Jacob Andreas. Language models as agent models. In Findings of the Association for Computational Linguistics: EMNLP 2022, p. 5769â5779, Abu Dhabi, United Arab Emirates, December 2022. Association for Computational Linguistics. URL https://aclanthology.org/2022.findings-emnlp.423. Askell et al. (2021) Amanda Askell, Yuntao Bai, Anna Chen, Dawn Drain, Deep Ganguli, Tom Henighan, Andy Jones, Nicholas Joseph, Ben Mann, Nova DasSarma, et al. A general language assistant as a laboratory for alignment. arXiv preprint arXiv:2112.00861, 2021. Atillah (2023) Imane El Atillah. Man ends his life after an ai chatbot âencouragedâ him to sacrifice himself to stop climate change. Euronews, 2023. Bai et al. (2022) Yuntao Bai, Andy Jones, Kamal Ndousse, Amanda Askell, Anna Chen, Nova DasSarma, Dawn Drain, Stanislav Fort, Deep Ganguli, Tom Henighan, et al. Training a helpful and harmless assistant with reinforcement learning from human feedback. arXiv preprint arXiv:2204.05862, 2022. Bender et al. (2021) Emily M Bender, Timnit Gebru, Angelina McMillan-Major, and Shmargaret Shmitchell. On the dangers of stochastic parrots: Can language models be too big? In Proceedings of the 2021 ACM conference on fairness, accountability, and transparency, p. 610â623, 2021. Brown et al. (2020) Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural information processing systems, 33:1877â1901, 2020. Bubeck et al. (2023) SĂŠbastien Bubeck, Varun Chandrasekaran, Ronen Eldan, Johannes Gehrke, Eric Horvitz, Ece Kamar, Peter Lee, Yin Tat Lee, Yuanzhi Li, Scott Lundberg, et al. Sparks of artificial general intelligence: Early experiments with gpt-4. arXiv preprint arXiv:2303.12712, 2023. Deshpande et al. (2023) Ameet Deshpande, Vishvak Murahari, Tanmay Rajpurohit, Ashwin Kalyan, and Karthik Narasimhan. Toxicity in chatgpt: Analyzing persona-assigned language models. arXiv preprint arXiv:2304.05335, 2023. Devlin et al. (2019) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), p. 4171â4186, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1423. URL https://aclanthology.org/N19-1423. Gehman et al. (2020) Samuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi, and Noah A. Smith. RealToxicityPrompts: Evaluating neural toxic degeneration in language models. In Findings of the Association for Computational Linguistics: EMNLP 2020, p. 3356â3369, Online, November 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.findings-emnlp.301. URL https://aclanthology.org/2020.findings-emnlp.301. Hendrycks et al. (2021) Dan Hendrycks, Nicholas Carlini, John Schulman, and Jacob Steinhardt. Unsolved problems in ml safety. arXiv preprint arXiv:2109.13916, 2021. Hu et al. (2022) Edward J Hu, yelong shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=nZeVKeeFYf9. Hutchinson et al. (2020) Ben Hutchinson, Vinodkumar Prabhakaran, Emily Denton, Kellie Webster, Yu Zhong, and Stephen Denuyl. Social biases in NLP models as barriers for persons with disabilities. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, p. 5491â5501, Online, July 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.487. URL https://aclanthology.org/2020.acl-main.487. Jorgensen et al. (2023) Ole Jorgensen, Dylan Cope, Nandi Schoots, and Murray Shanahan. Improving activation steering in language models with mean-centring. arXiv preprint arXiv:2312.03813, 2023. Leong et al. (2023) Chak Tou Leong, Yi Cheng, Jiashuo Wang, Jian Wang, and Wenjie Li. Self-detoxifying language models via toxification reversal. arXiv preprint arXiv:2310.09573, 2023. Lin et al. (2022) Stephanie Lin, Jacob Hilton, and Owain Evans. TruthfulQA: Measuring how models mimic human falsehoods. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), p. 3214â3252, Dublin, Ireland, May 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.acl-long.229. URL https://aclanthology.org/2022.acl-long.229. Liu et al. (2023) Wenhao Liu, Xiaohua Wang, Muling Wu, Tianlong Li, Changze Lv, Zixuan Ling, Jianhao Zhu, Cenyuan Zhang, Xiaoqing Zheng, and Xuanjing Huang. Aligning large language models with human preferences through representation engineering. arXiv preprint arXiv:2312.15997, 2023. Mangrulkar et al. (2022) Sourab Mangrulkar, Sylvain Gugger, Lysandre Debut, Younes Belkada, and Sayak Paul. Peft: State-of-the-art parameter-efficient fine-tuning methods. https://github.com/huggingface/peft, 2022. Meta (2023) AI Meta. Introducing llama: A foundational, 65-billion-parameter large language model. Meta AI. https://ai. facebook. com/blog/large-language-model-llama-meta-ai, 2023. Nangia et al. (2020) Nikita Nangia, Clara Vania, Rasika Bhalerao, and Samuel R. Bowman. CrowS-pairs: A challenge dataset for measuring social biases in masked language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), p. 1953â1967, Online, November 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.emnlp-main.154. URL https://aclanthology.org/2020.emnlp-main.154. Nardo (2023) Cleo Nardo. The waluigi effect (mega-post). Less Wrong, 2023. Ngo (2022) Richard Ngo. The alignment problem from a deep learning perspective. arXiv preprint arXiv:2209.00626, 2022. Nori et al. (2023) Harsha Nori, Nicholas King, Scott Mayer McKinney, Dean Carignan, and Eric Horvitz. Capabilities of gpt-4 on medical challenge problems. arXiv preprint arXiv:2303.13375, 2023. OâBrien (2023) Matt OâBrien. Musk, scientists call for halt to ai race sparked by chatgpt. AP News, 2023. OpenAI (2023) OpenAI. Gpt-4 technical report, 2023. Ouyang et al. (2022) Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Gray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. Training language models to follow instructions with human feedback. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), Advances in Neural Information Processing Systems, 2022. URL https://openreview.net/forum?id=TG8KACxEON. Pan et al. (2022) Alexander Pan, Kush Bhatia, and Jacob Steinhardt. The effects of reward misspecification: Mapping and mitigating misaligned models. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=JYtwGwIL7ye. Park et al. (2023) Joon Sung Park, Joseph C OâBrien, Carrie J Cai, Meredith Ringel Morris, Percy Liang, and Michael S Bernstein. Generative agents: Interactive simulacra of human behavior. arXiv preprint arXiv:2304.03442, 2023. Perez et al. (2022) Ethan Perez, Sam Ringer, KamilÄ LukoĹĄiĹŤtÄ, Karina Nguyen, Edwin Chen, Scott Heiner, Craig Pettit, Catherine Olsson, Sandipan Kundu, Saurav Kadavath, et al. Discovering language model behaviors with model-written evaluations. arXiv preprint arXiv:2212.09251, 2022. Radford et al. (2019) Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019. Rae et al. (2021) Jack W Rae, Sebastian Borgeaud, Trevor Cai, Katie Millican, Jordan Hoffmann, Francis Song, John Aslanides, Sarah Henderson, Roman Ring, Susannah Young, et al. Scaling language models: Methods, analysis & insights from training gopher. arXiv preprint arXiv:2112.11446, 2021. Roose (2023) Kevin Roose. A conversation with bingâs chatbot left me deeply unsettled. New York Times, 2023. Schulman et al. (2023) John Schulman, Barret Zoph, Christina Kim, Jacob Hilton, Jacob Menick, Jiayi Weng, Juan Felipe, Ceron Uribe, Liam Fedus, Luke Metz, Michael Pokorny, Rapha Gontijo Lopes, Shengjia Zhao, Arun Vijayvergiya, Eric Sigler, Adam Perelman, Chelsea Voss, Mike Heaton, Joel Parish, Dave Cummings, Rajeev Nayak, Valerie Balcom, David Schnurr, Tomer Kaftan, Chris Hallacy, Nicholas Turley, Noah Deutsch, Vik Goel, Jonathan Ward, Aris Konstantinidis, Wojciech Zaremba, Long Ouyang, Leonard Bogdonoff, Joshua Gross, David Medina, Sarah Yoo, Teddy Lee, Ryan Lowe, Dan Mossing, Joost Huizinga, Roger Jiang, Carroll Wainwright, Diogo Almeida, Steph Lin, Marvin Zhang, Kai Xiao, Katarina Slama, Steven Bills, Alex Gray, Jan Leike, Jakub Pachocki, Phil Tillet, Shantanu Jain, Greg Brockman, Nick Ryder, Alex Paino, Qiming Yuan, Clemens Winter, Ben Wang, Mo Bavarian, Igor Babuschkin, Szymon Sidor, Ingmar Kanitscheider, Mikhail Pavlov, Matthias Plappert, Nik Tezak, Heewoo Jun, William Zhuk, Vitchyr Pong, Lukasz Kaiser, Jerry Tworek, Andrew Carr, Lilian Weng, Sandhini Agarwal, Karl Cobbe, Vineet Kosaraju, Alethea Power, Stanislas Polu, Jesse Han, Raul Puri, Shawn Jain, Benjamin Chess, Christian Gibson, Oleg Boiko, Emy Parparita, Amin Tootoonchian, Kyle Kosic, and Christopher Hesse. Introducing chatgpt. OpenAI blog, 2023. Shalev-Shwartz et al. (2020) Shai Shalev-Shwartz, Shaked Shammah, and Amnon Shashua. On the ethics of building ai in a responsible manner. arXiv preprint arXiv:2004.04644, 2020. Subhash (2023) Varshini Subhash. Can large language models change user preference adversarially? arXiv preprint arXiv:2302.10291, 2023. Taylor et al. (2016) Jessica Taylor, Eliezer Yudkowsky, Patrick LaVictoire, and Andrew Critch. Alignment for advanced machine learning systems. Ethics of Artificial Intelligence, p. 342â382, 2016. Touvron et al. (2023) Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288, 2023. Turner et al. (2023) Alex Turner, Lisa Thiergart, David Udell, Gavin Leech, Ulisse Mini, and Monte MacDiarmid. Activation addition: Steering language models without optimization. arXiv preprint arXiv:2308.10248, 2023. Venkit et al. (2022) Pranav Narayanan Venkit, Mukund Srinath, and Shomir Wilson. A study of implicit bias in pretrained language models against people with disabilities. In Proceedings of the 29th International Conference on Computational Linguistics, p. 1324â1332, Gyeongju, Republic of Korea, October 2022. International Committee on Computational Linguistics. URL https://aclanthology.org/2022.coling-1.113. Wallace et al. (2019) Eric Wallace, Shi Feng, Nikhil Kandpal, Matt Gardner, and Sameer Singh. Universal adversarial triggers for attacking and analyzing NLP. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), p. 2153â2162, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-1221. URL https://aclanthology.org/D19-1221. Weidinger et al. (2022) Laura Weidinger, Jonathan Uesato, Maribeth Rauh, Conor Griffin, Po-Sen Huang, John Mellor, Amelia Glaese, Myra Cheng, Borja Balle, Atoosa Kasirzadeh, Courtney Biles, Sasha Brown, Zac Kenton, Will Hawkins, Tom Stepleton, Abeba Birhane, Lisa Anne Hendricks, Laura Rimell, William Isaac, Julia Haas, Sean Legassick, Geoffrey Irving, and Iason Gabriel. Taxonomy of risks posed by language models. In 2022 ACM Conference on Fairness, Accountability, and Transparency, FAccT â22, p. 214â229, New York, NY, USA, 2022. Association for Computing Machinery. ISBN 9781450393522. doi: 10.1145/3531146.3533088. URL https://doi.org/10.1145/3531146.3533088. West (2023) Colin G West. Advances in apparent conceptual physics reasoning in gpt-4. arXiv e-prints, p. arXivâ2303, 2023. Wies et al. (2023) Noam Wies, Yoav Levine, and Amnon Shashua. The learnability of in-context learning. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=f3JNQd7CHM. Xu et al. (2021) Jing Xu, Da Ju, Margaret Li, Y-Lan Boureau, Jason Weston, and Emily Dinan. Bot-adversarial dialogue for safe conversational agents. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, p. 2950â2968, Online, June 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.naacl-main.235. URL https://aclanthology.org/2021.naacl-main.235. Yu & Sagae (2021) Dian Yu and Kenji Sagae. Automatically exposing problems with neural dialog models. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, p. 456â470, Online and Punta Cana, Dominican Republic, November 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.emnlp-main.37. URL https://aclanthology.org/2021.emnlp-main.37. Yudkowsky (2001) Eliezer Yudkowsky. Creating friendly ai 1.0: The analysis and design of benevolent goal architectures. The Singularity Institute, San Francisco, USA, 2001. Zou et al. (2023) Andy Zou, Long Phan, Sarah Chen, James Campbell, Phillip Guo, Richard Ren, Alexander Pan, Xuwang Yin, Mantas Mazeika, Ann-Kathrin Dombrowski, et al. Representation engineering: A top-down approach to ai transparency. arXiv preprint arXiv:2310.01405, 2023. Appendix A Discussion of limitations Our framework makes several underlying assumptions. Here we discuss their necessity and limitations as well as provide intuition. A.1 Two components mixture As explained in section 2.1, an unprompted LLM is a function that assigns probability to text based on the statistics of its training data, thus it can always be written as a sum of components by introducing latent variables, such as the sources of the training data âi=âiwiâ˘âisubscriptâsubscriptsubscriptsubscriptâP_i= _iw_iP_iblackboard_Pi = âi witalic_i blackboard_Pi and that different sources of text display different behavior. Next, we note that a general multiple component mixture can be partitioned to yield a two-component mixture: â=âiâAâŞBwiâ˘âi=âiâAwiâ˘âi+âiâBwiâ˘âi=(âiâAwi)â˘âiâAwiâiâAwiâ˘âi+(âiâBwi)â˘âiâBwiâiâBwiâ˘âiâsubscriptsubscriptsubscriptâsubscriptsubscriptsubscriptâsubscriptsubscriptsubscriptâsubscriptsubscriptsubscriptsubscriptsubscriptsubscriptsubscriptâsubscriptsubscriptsubscriptsubscriptsubscriptsubscriptsubscriptâP= _iâ A⪠Bw_iP_i= _iâ Aw_iP% _i+ _iâ Bw_iP_i= ( _iâ Aw_i ) _i% â A w_i _iâ Aw_iP_i+ ( _iâ Bw_i% ) _iâ B w_i _iâ Bw_iP_iblackboard_P = âi â A ⪠B witalic_i blackboard_Pi = âi â A witalic_i blackboard_Pi + âi â B witalic_i blackboard_Pi = ( âi â A witalic_i ) âi â A divide start_ARG witalic_i end_ARG start_ARG âi â A witalic_i end_ARG blackboard_Pi + ( âi â B witalic_i ) âi â B divide start_ARG witalic_i end_ARG start_ARG âi â B witalic_i end_ARG blackboard_Pi (9) Where A and B are disjoint sets of indices. By denoting âiâAwi:=Îąassignsubscriptsubscript _iâ Aw_i:=Îąâi â A witalic_i := Îą we see that âiâBwi=1ââiâAwi=1âÎąsubscriptsubscript1subscriptsubscript1 _iâ Bw_i=1- _iâ Aw_i=1-Îąâi â B witalic_i = 1 - âi â A witalic_i = 1 - Îą. Then we see that âiâAwiâiâAwiâ˘âi:=ââassignsubscriptsubscriptsubscriptsubscriptsubscriptâsubscriptâ _iâ A w_i _iâ Aw_iP_i:=P_-âi â A divide start_ARG witalic_i end_ARG start_ARG âi â A witalic_i end_ARG blackboard_Pi := blackboard_P- and âiâBwiâiâBwiâ˘âi:=â+assignsubscriptsubscriptsubscriptsubscriptsubscriptâsubscriptâ _iâ B w_i _iâ Bw_iP_i:=P_+âi â B divide start_ARG witalic_i end_ARG start_ARG âi â B witalic_i end_ARG blackboard_Pi := blackboard_P+ are indeed normalized distributions, leading to â=Îąâ˘ââ+(1âÎą)â˘â+âsubscriptâ1subscriptâP= _-+(1-Îą)P_+blackboard_P = Îą blackboard_P- + ( 1 - Îą ) blackboard_P+. Second, note that the assumption of the two component mixture is on the accumulating sequence probability: ââ˘(s1ââŚâsn)=Îąâ˘âââ˘(s1ââŚâsn)+(1âÎą)â˘â+â˘(s1ââŚâsn)âdirect-sumsubscript1âŚsubscriptsubscriptâdirect-sumsubscript1âŚsubscript1subscriptâdirect-sumsubscript1âŚsubscriptP(s_1 ... s_n)= _-(s_1 ...% s_n)+(1-Îą)P_+(s_1 ... s_n)blackboard_P ( s1 â ⌠â sitalic_n ) = Îą blackboard_P- ( s1 â ⌠â sitalic_n ) + ( 1 - Îą ) blackboard_P+ ( s1 â ⌠â sitalic_n ) and not the conditional response to the prompt, which is: ââ˘(sn|s1ââŚâsnâ1)=11+1âÎąâ˘â+â˘(s1ââŚâsnâ1)âââ˘(s1ââŚâsnâ1)â˘âââ˘(sn|s1ââŚâsnâ1)+11+Îą1âÎąâ˘âââ˘(s1ââŚâsnâ1)â+â˘(s1ââŚâsnâ1)â˘â+â˘(sn|s1ââŚâsnâ1)âconditionalsubscriptdirect-sumsubscript1âŚsubscript1111subscriptâdirect-sumsubscript1âŚsubscript1subscriptâdirect-sumsubscript1âŚsubscript1subscriptâconditionalsubscriptdirect-sumsubscript1âŚsubscript1111subscriptâdirect-sumsubscript1âŚsubscript1subscriptâdirect-sumsubscript1âŚsubscript1subscriptâconditionalsubscriptdirect-sumsubscript1âŚsubscript1P(s_n|s_1 ... s_n-1)= 11+ 1-Îą% Îą P_+(s_1 ... s_n-1)P_-(s_1% ... s_n-1)P_-(s_n|s_1 ... s_n-1)+% 11+ Îą1-Îą P_-(s_1 ... s_% n-1)P_+(s_1 ... s_n-1)P_+(s_n|s_% 1 ... s_n-1)blackboard_P ( sitalic_n | s1 â ⌠â sitalic_n - 1 ) = divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s1 â ⌠â sitalic_n - 1 ) end_ARG start_ARG blackboard_P- ( s1 â ⌠â sitalic_n - 1 ) end_ARG end_ARG blackboard_P- ( sitalic_n | s1 â ⌠â sitalic_n - 1 ) + divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG Îą end_ARG start_ARG 1 - Îą end_ARG divide start_ARG blackboard_P- ( s1 â ⌠â sitalic_n - 1 ) end_ARG start_ARG blackboard_P+ ( s1 â ⌠â sitalic_n - 1 ) end_ARG end_ARG blackboard_P+ ( sitalic_n | s1 â ⌠â sitalic_n - 1 ) (10) As can be seen, the zero-shot priors are Îą and 1âÎą11- 1 - Îą, but the priors of the conditional negative and positive components are highly dependent on the context, they contain the ratio of the probabilities of the prompt by the components âââ˘(s1ââŚâsnâ1)subscriptâdirect-sumsubscript1âŚsubscript1P_-(s_1 ... s_n-1)blackboard_P- ( s1 â ⌠â sitalic_n - 1 ), â+â˘(s1ââŚâsnâ1)subscriptâdirect-sumsubscript1âŚsubscript1P_+(s_1 ... s_n-1)blackboard_P+ ( s1 â ⌠â sitalic_n - 1 ), thus a prompt that is much more probable in the negative component will give a high weight to the conditional negative component. An adversarial prompt will have a large ratio âââ˘(pâ˘râ˘oâ˘mâ˘pâ˘t)/â+â˘(pâ˘râ˘oâ˘mâ˘pâ˘t)subscriptâsubscriptâP_-(prompt)/P_+(prompt)blackboard_P- ( p r o m p t ) / blackboard_P+ ( p r o m p t ), so it will significantly enhance the prior of the conditional ââsubscriptâP_-blackboard_P-. The importance of using the mixture model is that it captures the concept of prompts that are out of distribution of the positive component and in the distribution of the negative component to refactor the coefficients of the effective mixture model. The intuition of using a mixture for the accumulating sequence probability is a mixture of text generating processes, where a sub-component âisubscriptâP_iblackboard_Pi may be enhanced due to the sequence being highly probable in its distribution and out of distribution of the other components. This creates a strong dependence of the prompted model on the context, as observed in language models. The prior Îą is the zero-shot probability which is set and determines the initial weight of a sequence according to each text generating process. A.2 β-distinguishability As seen in the above discussion of components, the reweighting of the conditional negative component prior is based on inserting prompts that are not likely to be outputted by the positive component and likely by the negative component. To build such prompts, we need the distributions to maintain a "finite distance" from each other which allows to sample prompts from ââsubscriptâP_-blackboard_P- that enhance the ratio âââ˘(pâ˘râ˘oâ˘mâ˘pâ˘t)/â+â˘(pâ˘râ˘oâ˘mâ˘pâ˘t)subscriptâsubscriptâP_-(prompt)/P_+(prompt)blackboard_P- ( p r o m p t ) / blackboard_P+ ( p r o m p t ). Feeding it to the model enhances the prior of the conditional ââsubscriptâP_-blackboard_P- as seen in equation 10. The finite β is what creates the logarithmic scaling of the misaligning prompt on the prior Îą, since each sentence reweights the negative prior by a factor eβsuperscripte^βeitalic_β w.r.t the positive prior. If β is not finite but decaying, then we may get other dependences, as discussed in I Section 4.1 shows an example of two distributions that are β-distinguishable - two LLMs of opposing behaviors maintain a finite conditional KL-divergence when sampling zero-shot prompts from the negative component. Section 4.2 shows an example of two distributions that are not β-distinguishable, as the conditional KL between the two distributions decays the longer the prompt sampled from the negative component, which results in the misalignment of the LLM. A.3 Limitation of results Sentence-wise approach Our results provide guarantees for misalignment of LLMs in the sense of the next sentence produced by the model being misaligned. For more nuanced types of misalignment, such as long model outputs, one would need a behavior scoring function over the entire output and not just the first sentence. It is possible to generalize this work to such definitions of misalignment by changing the unit block of text from sentence to paragraphs, though the numerical value for the coefficients Îą,βι,βι , β will change. For the purposes of demonstrating the possibility of misaligning models, we kept the sentence approach which is more comprehendible and not application specific. Computational tractability Our theorems prove their existence by construction via sampling prompts from a negative behavior subcomponent of the model. However, in real applications, the subcomponent is not accessible to us. Even so, one can see from equation 10 that the mechanism of the reweight of the negative behavior component prior is to insert a prompt that satisfies âââ˘(pâ˘râ˘oâ˘mâ˘pâ˘t)/â+â˘(pâ˘râ˘oâ˘mâ˘pâ˘t)âŤ1âÎąmuch-greater-thansubscriptâsubscriptâ1P_-(prompt)/P_+(prompt) 1-Îąblackboard_P- ( p r o m p t ) / blackboard_P+ ( p r o m p t ) ⍠divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG. Our theoretical work shows that âââ˘(pâ˘râ˘oâ˘mâ˘pâ˘t)/â+â˘(pâ˘râ˘oâ˘mâ˘pâ˘t)>eβâ˘|pâ˘râ˘oâ˘mâ˘pâ˘t|subscriptâsubscriptâsuperscriptP_-(prompt)/P_+(prompt)>e^β|prompt|blackboard_P- ( p r o m p t ) / blackboard_P+ ( p r o m p t ) > eitalic_β | p r o m p t | when the prompt is sampled from ââsubscriptâP_-blackboard_P-, leading to our misalignment length guarantee. But, for practical applications, we see (as demonstrated in subsection 4.2) that using a proxy for ââsubscriptâP_-blackboard_P- such as the LoRA finetuned LLM on negative behavior, is able to misalign in the exponential rate of our theory. Efficiency The prompt lengths provided are upper bounds, meaning there could be shorter misaligning prompts in practice. Even so, section 4.2 shows that both the theoretical value of the misaligning prompt length and the practical misaligning prompt length are relatively short (few sentences), making the bound practical. Appendix B Generalized misalignment Theorem 1 can be extended beyond existence of a misaligning prompt to a probability of sampling a misaligning prompt: Theorem 5. Let δ,Ďľ>0italic-Ďľ0δ,Îľ>0δ , Ďľ > 0, under the conditions of theorem 1 and that the negative component is Ď-similar to the positive component, when sampling a prompt of length: |s|>maxâĄ2βâ˘(logâĄ1Îą+logâĄ1Ďľ+logâĄ(4)),4â˘Ď2β2â˘Î´211italic-Ďľ44superscript2superscript2|s|> \ 2β ( 1Îą+ 1% Îľ+ (4) ), 4Ď^2β^2δ \| s | > max divide start_ARG 2 end_ARG start_ARG β end_ARG ( log divide start_ARG 1 end_ARG start_ARG Îą end_ARG + log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG + log ( 4 ) ) , divide start_ARG 4 Ď2 end_ARG start_ARG β2 δ end_ARG (11) from ââsubscriptâP_-blackboard_P-, the behavior expectation of the model is bounded by Bââ˘(s)<Îł+Ďľsubscriptâitalic-ĎľB_P(s)<Îł+ _P ( s ) < Îł + Ďľ with probability 1âδ11- 1 - δ. This result shows that not only a misaligning prompt exists, but that most prompts sampled from ââsubscriptâP_-blackboard_P- are misaligning if they are long enough. This can be seen in experimental section 4.2, where we sample prompts from a negative behavior LLM and observe that on average they misalign the model. Proof. Following the proof of the main theorems, from equation 52: sâźâââ˘(â )â˘[logâĄâââ˘(s)â+â˘(s)]>βâ˘|s|=βâ˘nsubscriptsimilar-tosubscriptââ delimited-[]subscriptâsubscriptâE_s _-(¡) [ P_-(s)% P_+(s) ]>β|s|=β nblackboard_Es âź blackboard_P start_POSTSUBSCRIPT - ( â ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG ] > β | s | = β n (12) And Ď-similarity: Vâ˘aâ˘rsâźâââ˘(â )â˘[logâĄâââ˘(s)â+â˘(s)]<Ďâ˘|s|=Ďâ˘nsubscriptsimilar-tosubscriptââ delimited-[]subscriptâsubscriptâVar_s _-(¡) [ P_-(s)P% _+(s) ]<Ď|s|=Ď nV a ritalic_s âź blackboard_P start_POSTSUBSCRIPT - ( â ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG ] < Ď | s | = Ď n (13) We can use Cantelliâs inequality to obtain: ââ˘[logâĄâââ˘(s)â+â˘(s)<(βâĎ|s|â˘Î´)â˘|s|]<δâdelimited-[]subscriptâsubscriptâP [ P_-(s)P_+(s)<(β- % Ď |s|δ)|s| ]< _P [ log divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG < ( β - divide start_ARG Ď end_ARG start_ARG square-root start_ARG | s | δ end_ARG end_ARG ) | s | ] < δ (14) Demand: logâĄâââ˘(s)â+â˘(s)>logâĄ1Ďľsubscriptâsubscriptâ1italic-Ďľ P_-(s)P_+(s)> 1Îľlog divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG > log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG (15) This happens with probability 1âδ11- 1 - δ for: logâĄâââ˘(s)â+â˘(s)âĽ(βâĎ|s|â˘Î´)â˘|s|âĽÎ˛2â˘|s|>logâĄ1Ďľsubscriptâsubscriptâ21italic-Ďľ P_-(s)P_+(s)âĽ(β- Ď % |s|δ)|s|⼠β2|s|> 1Îľlog divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG ⼠( β - divide start_ARG Ď end_ARG start_ARG square-root start_ARG | s | δ end_ARG end_ARG ) | s | ⼠divide start_ARG β end_ARG start_ARG 2 end_ARG | s | > log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG (16) Where the transition before the last happens for Ď|s|â˘Î´<β2â|s|>4â˘Ď2β2â˘Î´â24superscript2superscript2 Ď |s|δ< β2 |s|> 4% Ď^2β^2δdivide start_ARG Ď end_ARG start_ARG square-root start_ARG | s | δ end_ARG end_ARG < divide start_ARG β end_ARG start_ARG 2 end_ARG â | s | > divide start_ARG 4 Ď2 end_ARG start_ARG β2 δ end_ARG Plugging this into the proof of theorem 1 gives that Bââ˘(s)<Îł+Ďľsubscriptâitalic-ĎľB_P(s)<Îł+ _P ( s ) < Îł + Ďľ for: |s|>maxâĄ2βâ˘(logâĄ1Îą+logâĄ1Ďľ+logâĄ(4)),4â˘Ď2β2â˘Î´211italic-Ďľ44superscript2superscript2|s|> \ 2β( 1Îą+ 1Îľ+% (4)), 4Ď^2β^2δ \| s | > max divide start_ARG 2 end_ARG start_ARG β end_ARG ( log divide start_ARG 1 end_ARG start_ARG Îą end_ARG + log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG + log ( 4 ) ) , divide start_ARG 4 Ď2 end_ARG start_ARG β2 δ end_ARG (17) â Appendix C Proofs building blocks In this section, we prove three technical lemmas which are the building blocks for proving our results. In subsection C.1 we prove that prompts can reweight the initial prior distribution of mixture components. In subsection C.2 we show that such reweighting alters the behaviour of the mixture distribution. And finally, in subsection C.3 we shows that under our Îą,β,γι,β,γι , β , Îł-negative-distinguishability assumption, such prompts always exists. C.1 Convergence to a single component In this subsection, we prove a technical lemma which shows that when the likelihood of a prompt s0subscript0s_0s0 is relatively high according to a mixture component, then the conditional mixture distribution converges to the conditional distribution of that single component. Essentially, this lemma strengthening the analysis in theorem 1 of Wies et al. (2023), and formulate the role of prompts as reweighting of the prior distribution. In the next subsection, we will show that indeed our notion of convergence implies also the convergence of behaviors. Lemma 1. Let âPblackboard_P be a mixture distribution that can be written as Îąâ˘â0+(1âÎą)â˘â1subscriptâ01subscriptâ1 _0+ (1-Îą )P_1Îą blackboard_P0 + ( 1 - Îą ) blackboard_P1. Then for any initial prompt s0subscript0s_0s0 and any string s such that â0â˘(s|s0)>0subscriptâ0conditionalsubscript00P_0(s|s_0)>0blackboard_P0 ( s | s0 ) > 0 the following holds: |ââ˘(s|s0)â0â˘(s|s0)â1|â¤1âÎąâ â1â˘(s0)â0â˘(s0)â maxâĄâ1â˘(s|s0)â0â˘(s|s0),1âconditionalsubscript0subscriptâ0conditionalsubscript01â 1subscriptâ1subscript0subscriptâ0subscript0subscriptâ1conditionalsubscript0subscriptâ0conditionalsubscript01 | P (s\,|\,s_0 )P_0% (s\,|\,s_0 )-1 |⤠1-ι¡ % P_1 (s_0 )P_0 (s_0 )¡ % \ P_1 (s\,|\,s_0 )P_0 (s\,|% \,s_0 ),1 \| divide start_ARG blackboard_P ( s | s0 ) end_ARG start_ARG blackboard_P0 ( s | s0 ) end_ARG - 1 | ⤠divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG â divide start_ARG blackboard_P1 ( s0 ) end_ARG start_ARG blackboard_P0 ( s0 ) end_ARG â max divide start_ARG blackboard_P1 ( s | s0 ) end_ARG start_ARG blackboard_P0 ( s | s0 ) end_ARG , 1 (18) Intuitively, when ââ˘(s0âs)âdirect-sumsubscript0P(s_0 s)blackboard_P ( s0 â s ) is equals to â0â˘(s0âs)subscriptâ0direct-sumsubscript0P_0(s_0 s)blackboard_P0 ( s0 â s ) theirs ratio is one, and we bound the deviation from these case. Note that our bound implicitly implies the following additive notion of convergence: |ââ˘(s0âs)ââ0â˘(s0âs)|â¤1âÎąâ â1â˘(s0)â0â˘(s0)âdirect-sumsubscript0subscriptâ0direct-sumsubscript0â 1subscriptâ1subscript0subscriptâ0subscript0 |P(s_0 s)-P_0(s_0 s)% |⤠1-ι¡ P_1 (s_0 )% P_0 (s_0 )| blackboard_P ( s0 â s ) - blackboard_P0 ( s0 â s ) | ⤠divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG â divide start_ARG blackboard_P1 ( s0 ) end_ARG start_ARG blackboard_P0 ( s0 ) end_ARG (19) Proof. We begin by explicitly writing the conditional likelihood of s given s0subscript0s_0s0: ââ˘(s|s0)=ââ˘(s0âs)ââ˘(s0)=Îąâ˘â0â˘(s0âs)+(1âÎą)â˘â1â˘(s0âs)Îąâ˘â0â˘(s0)+(1âÎą)â˘â1â˘(s0)âconditionalsubscript0âdirect-sumsubscript0âsubscript0subscriptâ0direct-sumsubscript01subscriptâ1direct-sumsubscript0subscriptâ0subscript01subscriptâ1subscript0 (s\,|\,s_0 )= P (s_0% s )P (s_0 )= _0 % (s_0 s )+ (1-Îą )P_1 (s_0 s% ) _0 (s_0 )+ (1-Îą )P% _1 (s_0 )blackboard_P ( s | s0 ) = divide start_ARG blackboard_P ( s0 â s ) end_ARG start_ARG blackboard_P ( s0 ) end_ARG = divide start_ARG Îą blackboard_P0 ( s0 â s ) + ( 1 - Îą ) blackboard_P1 ( s0 â s ) end_ARG start_ARG Îą blackboard_P0 ( s0 ) + ( 1 - Îą ) blackboard_P1 ( s0 ) end_ARG (20) Now since both (1âÎą)1(1-Îą)( 1 - Îą ) and â1â˘(s0âs)subscriptâ1direct-sumsubscript0P_1(s_0 s)blackboard_P1 ( s0 â s ) are greater than zero, we can bound ââ˘(s|s0)âconditionalsubscript0P (s\,|\,s_0 )blackboard_P ( s | s0 ) from below by removing these terms from the numerator and get that: ââ˘(s|s0)âĽÎąâ˘â0â˘(s0âs)Îąâ˘â0â˘(s0)+(1âÎą)â˘â1â˘(s0)âconditionalsubscript0subscriptâ0direct-sumsubscript0subscriptâ0subscript01subscriptâ1subscript0 (s\,|\,s_0 )⼠_0% (s_0 s ) _0 (s_0 )+ (1-% Îą )P_1 (s_0 )blackboard_P ( s | s0 ) ⼠divide start_ARG Îą blackboard_P0 ( s0 â s ) end_ARG start_ARG Îą blackboard_P0 ( s0 ) + ( 1 - Îą ) blackboard_P1 ( s0 ) end_ARG (21) Which after division of both the numerator and the denominator by Îąâ â0â˘(s0âs)â subscriptâ0direct-sumsubscript0ι¡P_0 (s_0 s )Îą â blackboard_P0 ( s0 â s ) is equals to: â0â˘(s|s0)â (1+1âÎąâ â1â˘(s0)â0â˘(s0))â1â subscriptâ0conditionalsubscript0superscript1â 1subscriptâ1subscript0subscriptâ0subscript01 _0 (s\,|\,s_0 )¡ (1+ 1-Îą% ι¡ P_1 (s_0 )P_0 (s_0% ) )^-1blackboard_P0 ( s | s0 ) â ( 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG â divide start_ARG blackboard_P1 ( s0 ) end_ARG start_ARG blackboard_P0 ( s0 ) end_ARG )- 1 (22) Now, since 11+xâĽ1âx111 11+x⼠1-xdivide start_ARG 1 end_ARG start_ARG 1 + x end_ARG ⼠1 - x for any xâĽ00x⼠0x ⼠0, we gets that ââ˘(s|s0)âconditionalsubscript0P (s\,|\,s_0 )blackboard_P ( s | s0 ) is greater than: â0â˘(s|s0)â (1â1âÎąâ â1â˘(s0)â0â˘(s0))â subscriptâ0conditionalsubscript01â 1subscriptâ1subscript0subscriptâ0subscript0 _0 (s\,|\,s_0 )¡ (1- 1-Îą% ι¡ P_1 (s_0 )P_0 (s_0% ) )blackboard_P0 ( s | s0 ) â ( 1 - divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG â divide start_ARG blackboard_P1 ( s0 ) end_ARG start_ARG blackboard_P0 ( s0 ) end_ARG ) (23) Finally, we divide the inequality by â0â˘(s|s0)subscriptâ0conditionalsubscript0P_0(s|s_0)blackboard_P0 ( s | s0 ) and subtracts 1111 to get one side of equationâs 18 inequality: ââ˘(s|s0)â0â˘(s|s0)â1âĽâ1âÎąâ â1â˘(s0)â0â˘(s0)âconditionalsubscript0subscriptâ0conditionalsubscript01â 1subscriptâ1subscript0subscriptâ0subscript0 P (s\,|\,s_0 )P_0 (s\,% |\,s_0 )-1âĽ- 1-ι¡ P_1 (s% _0 )P_0 (s_0 )divide start_ARG blackboard_P ( s | s0 ) end_ARG start_ARG blackboard_P0 ( s | s0 ) end_ARG - 1 ⼠- divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG â divide start_ARG blackboard_P1 ( s0 ) end_ARG start_ARG blackboard_P0 ( s0 ) end_ARG (24) Moving to the other side of the inequality, since both (1âÎą)1(1-Îą)( 1 - Îą ) and â1â˘(s0âs)subscriptâ1direct-sumsubscript0P_1 (s_0 s )blackboard_P1 ( s0 â s ) are greater than zero, we can bound ââ˘(s|s0)âconditionalsubscript0P (s\,|\,s_0 )blackboard_P ( s | s0 ) from above by removing these terms from the denominator and get that : ââ˘(s|s0)=Îąâ˘â0â˘(s0âs)+(1âÎą)â˘â1â˘(s0âs)Îąâ˘â0â˘(s0)+(1âÎą)â˘â1â˘(s0)â¤Îąâ˘â0â˘(s0âs)+(1âÎą)â˘â1â˘(s0âs)Îąâ˘â0â˘(s0)âconditionalsubscript0subscriptâ0direct-sumsubscript01subscriptâ1direct-sumsubscript0subscriptâ0subscript01subscriptâ1subscript0subscriptâ0direct-sumsubscript01subscriptâ1direct-sumsubscript0subscriptâ0subscript0 (s\,|\,s_0 )= _0% (s_0 s )+ (1-Îą )P_1 (s_0% s ) _0 (s_0 )+ (1-Îą )% P_1 (s_0 )⤠_0 (s_0% s )+ (1-Îą )P_1 (s_0 s )% _0 (s_0 )blackboard_P ( s | s0 ) = divide start_ARG Îą blackboard_P0 ( s0 â s ) + ( 1 - Îą ) blackboard_P1 ( s0 â s ) end_ARG start_ARG Îą blackboard_P0 ( s0 ) + ( 1 - Îą ) blackboard_P1 ( s0 ) end_ARG ⤠divide start_ARG Îą blackboard_P0 ( s0 â s ) + ( 1 - Îą ) blackboard_P1 ( s0 â s ) end_ARG start_ARG Îą blackboard_P0 ( s0 ) end_ARG (25) Which after division of both the numerator and the denominator by Îąâ â0â˘(s0)â subscriptâ0subscript0ι¡P_0 (s_0 )Îą â blackboard_P0 ( s0 ) is equals to: Îąâ˘â0â˘(s0âs)Îąâ˘â0â˘(s0)+(1âÎą)â˘â1â˘(s0âs)Îąâ˘â0â˘(s0)=â0â˘(s|s0)+(1âÎą)â˘â1â˘(s0âs)Îąâ˘â0â˘(s0)subscriptâ0direct-sumsubscript0subscriptâ0subscript01subscriptâ1direct-sumsubscript0subscriptâ0subscript0subscriptâ0conditionalsubscript01subscriptâ1direct-sumsubscript0subscriptâ0subscript0 _0 (s_0 s )Îą% P_0 (s_0 )+ (1-Îą )P_1% (s_0 s ) _0 (s_0 )=P% _0 (s\,|\,s_0 )+ (1-Îą )P_1 (s_% 0 s ) _0 (s_0 )divide start_ARG Îą blackboard_P0 ( s0 â s ) end_ARG start_ARG Îą blackboard_P0 ( s0 ) end_ARG + divide start_ARG ( 1 - Îą ) blackboard_P1 ( s0 â s ) end_ARG start_ARG Îą blackboard_P0 ( s0 ) end_ARG = blackboard_P0 ( s | s0 ) + divide start_ARG ( 1 - Îą ) blackboard_P1 ( s0 â s ) end_ARG start_ARG Îą blackboard_P0 ( s0 ) end_ARG (26) Now, we can use the fact that â1â˘(s0âs1)=â1â˘(s0)â â1â˘(s|s0)subscriptâ1direct-sumsubscript0subscript1â subscriptâ1subscript0subscriptâ1conditionalsubscript0P_1 (s_0 s_1 )=P_1 (s_0 )% ¡P_1 (s\,|\,s_0 )blackboard_P1 ( s0 â s1 ) = blackboard_P1 ( s0 ) â blackboard_P1 ( s | s0 ) to get that ââ˘(s|s0)âconditionalsubscript0P (s\,|\,s_0 )blackboard_P ( s | s0 ) is at most: â0â˘(s|s0)+(1âÎą)â˘â1â˘(s0)â˘â1â˘(s|s0)Îąâ˘â0â˘(s0)subscriptâ0conditionalsubscript01subscriptâ1subscript0subscriptâ1conditionalsubscript0subscriptâ0subscript0 _0 (s\,|\,s_0 )+ (1-Îą)P% _1 (s_0 )P_1 (s\,|\,s_0 ) % _0 (s_0 )blackboard_P0 ( s | s0 ) + divide start_ARG ( 1 - Îą ) blackboard_P1 ( s0 ) blackboard_P1 ( s | s0 ) end_ARG start_ARG Îą blackboard_P0 ( s0 ) end_ARG (27) Which after division by â0â˘(s|s0)subscriptâ0conditionalsubscript0P_0(s|s_0)blackboard_P0 ( s | s0 ) and subtraction of 1111 yield the other side of equationâs 18 inequality: ââ˘(s|s0)â0â˘(s|s0)â1â¤â1â˘(s0)â0â˘(s0)â˘(1âÎą)â˘â1â˘(s|s0)Îąâ˘â0â˘(s|s0)âconditionalsubscript0subscriptâ0conditionalsubscript01subscriptâ1subscript0subscriptâ0subscript01subscriptâ1conditionalsubscript0subscriptâ0conditionalsubscript0 P (s\,|\,s_0 )P_0(s|s_0)% -1⤠P_1(s_0)P_0(s_0) (1-Îą)% P_1(s|s_0) _0(s|s_0)divide start_ARG blackboard_P ( s | s0 ) end_ARG start_ARG blackboard_P0 ( s | s0 ) end_ARG - 1 ⤠divide start_ARG blackboard_P1 ( s0 ) end_ARG start_ARG blackboard_P0 ( s0 ) end_ARG divide start_ARG ( 1 - Îą ) blackboard_P1 ( s | s0 ) end_ARG start_ARG Îą blackboard_P0 ( s | s0 ) end_ARG (28) Finally, combining both inequalities yields equation 18. â C.2 Behavioral implication of the convergence to a single component In this subsection, we prove a technical lemma which shows that when the likelihood of a prompt s0subscript0s_0s0 is relatively high according to a mixture component, then the conditional mixture distribution converge to the conditional distribution of that single component. In the next sections, we will use this lemma to prove the theorems from the main text. Lemma 2. Let B be a behaviour, then under the conditions of lemma 1 the following holds: |Bââ˘(s0)âBâ0â˘(s0)|â¤2â 1âÎąâ â1â˘(s0)â0â˘(s0)subscriptâsubscript0subscriptsubscriptâ0subscript0â 21subscriptâ1subscript0subscriptâ0subscript0 |B_P (s_0 )-B_P_0 (s_% 0 ) |⤠2¡ 1-ι¡ P_1% (s_0 )P_0 (s_0 )| Bblackboard_P ( s0 ) - Bblackboard_P start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ( s0 ) | ⤠2 â divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG â divide start_ARG blackboard_P1 ( s0 ) end_ARG start_ARG blackboard_P0 ( s0 ) end_ARG (29) Proof. To begin, we explicitly write the expectations difference: |Bââ˘(s0)âBâ0â˘(s0)|subscriptâsubscript0subscriptsubscriptâ0subscript0 |B_P(s_0)-B_P_0(s_0) || Bblackboard_P ( s0 ) - Bblackboard_P start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ( s0 ) | =|âsB(s)â [â(s|s0)ââ0(s|s0)]| = | _sB (s )¡ [P (s\,|\,s_% 0 )-P_0 (s\,|\,s_0 ) ] |= | âs B ( s ) â [ blackboard_P ( s | s0 ) - blackboard_P0 ( s | s0 ) ] | (30) Which by the triangular inequality is at most: â¤âs|B(s)|â |â(s|s0)ââ0(s|s0)| ⤠_s |B (s ) |¡ |P% (s\,|\,s_0 )-P_0 (s\,|\,s_0 ) |⤠âs | B ( s ) | â | blackboard_P ( s | s0 ) - blackboard_P0 ( s | s0 ) | (31) Now, since the range of B is [â1,1]11 [-1,1 ][ - 1 , 1 ] we can get rid of the |Bâ˘(s)| |B (s ) || B ( s ) | terms, and get that |Bââ˘(s0)âBâ0â˘(s0)|subscriptâsubscript0subscriptsubscriptâ0subscript0 |B_P(s_0)-B_P_0(s_0) || Bblackboard_P ( s0 ) - Bblackboard_P start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ( s0 ) | is at most: âs|â(s|s0)ââ0(s|s0)|=âsâ0(s|s0)â |ââ˘(s|s0)â0â˘(s|s0)â1| _s |P (s\,|\,s_0 )-P_0% (s\,|\,s_0 ) |= _sP_0 (s\,|\,s_0 )% ¡ | P (s\,|\,s_0 )P_0 (s\,|% \,s_0 )-1 |âs | blackboard_P ( s | s0 ) - blackboard_P0 ( s | s0 ) | = âs blackboard_P0 ( s | s0 ) â | divide start_ARG blackboard_P ( s | s0 ) end_ARG start_ARG blackboard_P0 ( s | s0 ) end_ARG - 1 | (32) Importantly, by lemma 1 we have that: |ââ˘(s|s0)â0â˘(s|s0)â1|â¤1âÎąâ â1â˘(s0)â0â˘(s0)â maxâĄâ1â˘(s|s0)â0â˘(s|s0),1âconditionalsubscript0subscriptâ0conditionalsubscript01â 1subscriptâ1subscript0subscriptâ0subscript0subscriptâ1conditionalsubscript0subscriptâ0conditionalsubscript01 | P (s\,|\,s_0 )P_0% (s\,|\,s_0 )-1 |⤠1-ι¡ % P_1 (s_0 )P_0 (s_0 )¡ % \ P_1 (s\,|\,s_0 )P_0 (s\,|% \,s_0 ),1 \| divide start_ARG blackboard_P ( s | s0 ) end_ARG start_ARG blackboard_P0 ( s | s0 ) end_ARG - 1 | ⤠divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG â divide start_ARG blackboard_P1 ( s0 ) end_ARG start_ARG blackboard_P0 ( s0 ) end_ARG â max divide start_ARG blackboard_P1 ( s | s0 ) end_ARG start_ARG blackboard_P0 ( s | s0 ) end_ARG , 1 (33) For any s, hence we got that |Bââ˘(s0)âBâ0â˘(s0)|subscriptâsubscript0subscriptsubscriptâ0subscript0 |B_P(s_0)-B_P_0(s_0) || Bblackboard_P ( s0 ) - Bblackboard_P start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ( s0 ) | is at most: 1âÎąâ â1â˘(s0)â0â˘(s0)â [âsâ0â˘(s|s0)â maxâĄâ1â˘(s|s0)â0â˘(s|s0),1]â 1subscriptâ1subscript0subscriptâ0subscript0delimited-[]subscriptâ subscriptâ0conditionalsubscript0subscriptâ1conditionalsubscript0subscriptâ0conditionalsubscript01 1-ι¡ P_1 (s_0 % )P_0 (s_0 )¡ [ _sP_0 (s\,% |\,s_0 )¡ \ P_1 (s\,|\,s_0 )% P_0 (s\,|\,s_0 ),1 \ ]divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG â divide start_ARG blackboard_P1 ( s0 ) end_ARG start_ARG blackboard_P0 ( s0 ) end_ARG â [ âs blackboard_P0 ( s | s0 ) â max divide start_ARG blackboard_P1 ( s | s0 ) end_ARG start_ARG blackboard_P0 ( s | s0 ) end_ARG , 1 ] (34) â¤1âÎąâ â1â˘(s0)â0â˘(s0)â âs(â1â˘(s|s0)+â0â˘(s|s0))absentâ 1subscriptâ1subscript0subscriptâ0subscript0subscriptsubscriptâ1conditionalsubscript0subscriptâ0conditionalsubscript0 ⤠1-ι¡ P_1 (s_0% )P_0 (s_0 )¡ _s (P_1% (s\,|\,s_0 )+P_0 (s\,|\,s_0 ) )⤠divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG â divide start_ARG blackboard_P1 ( s0 ) end_ARG start_ARG blackboard_P0 ( s0 ) end_ARG â âs ( blackboard_P1 ( s | s0 ) + blackboard_P0 ( s | s0 ) ) (35) where the last inequality follows from the fact that sum of two non-negative terms is greater than the maximum of the terms. Finally, since both â0â˘(s|s0)subscriptâ0conditionalsubscript0P_0 (s\,|\,s_0 )blackboard_P0 ( s | s0 ) and â1â˘(s|s0)subscriptâ1conditionalsubscript0P_1 (s\,|\,s_0 )blackboard_P1 ( s | s0 ) are probability distributions, summing over all possible sentences s yields 2222, and hence the inequality in equation 29 follows. â C.3 Adversarial prompt construction In this subsection, we prove a technical lemma which shows that when two distribution are sufficiently distinguishable (see definition 2 from the main text) ,then there exists a prompt such that the ratio of the promptâs likelihood according to these two distribution is arbitrary low. In the next sections we will use this lemma to prove the existence adversarial prompt for which the conditions of lemma 1 holds. And hence an adversarial user might alter the model behavior (lemma 2). Lemma 3. Let β,Ďľ>0italic-Ďľ0β,Îľ>0β , Ďľ > 0 and â0,â1subscriptâ0subscriptâ1P_0,P_1blackboard_P0 , blackboard_P1 two distributions. Suppose â0subscriptâ0P_0blackboard_P0 is β-distinguishable from â1subscriptâ1P_1blackboard_P1 then there exists a prompt s of length 1βâ˘logâĄ1Ďľ11italic-Ďľ 1β 1Îľdivide start_ARG 1 end_ARG start_ARG β end_ARG log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG such that the following holds: â1â˘(s)â0â˘(s)â¤Ďľsubscriptâ1subscriptâ0italic-Ďľ P_1(s)P_0(s)⤠start_ARG blackboard_P1 ( s ) end_ARG start_ARG blackboard_P0 ( s ) end_ARG ⤠Ͼ (36) Proof. Intuitively we use the fact that â0subscriptâ0P_0blackboard_P0 is β-distinguishable from â1subscriptâ1P_1blackboard_P1 to construct a prompt sentence by sentence, and get a prompt q=s1ââŚâs|q|direct-sumsubscript1âŚsubscriptq=s_1 ... s_|q|q = s1 â ⌠â s| q | such that: logâĄâ0â˘(s1ââŚâsk|s0)â1â˘(s1ââŚâsk|s0)>βâ ksubscriptâ0direct-sumsubscript1âŚconditionalsubscriptsubscript0subscriptâ1direct-sumsubscript1âŚconditionalsubscriptsubscript0â P_0 (s_1 ... s_k\,|\,s_0% )P_1 (s_1 ... s_k\,|\,s_0 )>% β¡ klog divide start_ARG blackboard_P0 ( s1 â ⌠â sitalic_k | s0 ) end_ARG start_ARG blackboard_P1 ( s1 â ⌠â sitalic_k | s0 ) end_ARG > β â k (37) For any kâ¤|q|k⤠|q |k ⤠| q |. Let us look at the expectation value of the log ratio with respect to a sequence s=(s1â˘âŚâ˘sk)subscript1âŚsubscripts=(s_1...s_k)s = ( s1 ⌠sitalic_k ) of k sentences sampled from âââ˘(â )subscriptââ P_-(¡)blackboard_P- ( â ): sâźâââ˘(â )â˘[logâĄâââ˘(s)â+â˘(s)]=(s1ââŚâsk)âźâââ˘(â )â˘[logâĄâââ˘(s1ââŚâsk)â+â˘(s1ââŚâsk)]=subscriptsimilar-tosubscriptââ delimited-[]subscriptâsubscriptâsubscriptsimilar-todirect-sumsubscript1âŚsubscriptsubscriptââ delimited-[]subscriptâdirect-sumsubscript1âŚsubscriptsubscriptâdirect-sumsubscript1âŚsubscriptabsentE_s _-(¡) [ P_-(s)% P_+(s) ]=E_(s_1 ... s_k) % P_-(¡) [ P_-(s_1 ... s_k)% P_+(s_1 ... s_k) ]=blackboard_Es âź blackboard_P start_POSTSUBSCRIPT - ( â ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG ] = blackboard_E( s start_POSTSUBSCRIPT 1 â ⌠â sitalic_k ) âź blackboard_P- ( â ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P- ( s1 â ⌠â sitalic_k ) end_ARG start_ARG blackboard_P+ ( s1 â ⌠â sitalic_k ) end_ARG ] = (38) Using the law of conditional probabilities recursively and the linearity of the expectation value: =âi=1k(s1ââŚâsk)âźâââ˘(â )â˘[logâĄâââ˘(si|s1ââŚâsiâ1)â+â˘(si|s1ââŚâsiâ1)]=absentsuperscriptsubscript1subscriptsimilar-todirect-sumsubscript1âŚsubscriptsubscriptââ delimited-[]subscriptâconditionalsubscriptdirect-sumsubscript1âŚsubscript1subscriptâconditionalsubscriptdirect-sumsubscript1âŚsubscript1absent= _i=1^kE_(s_1 ... s_k) _-(% ¡) [ P_-(s_i|s_1 ... s_i-1)% P_+(s_i|s_1 ... s_i-1) ]== âi = 1k blackboard_E( s start_POSTSUBSCRIPT 1 â ⌠â sitalic_k ) âź blackboard_P- ( â ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P- ( sitalic_i | s1 â ⌠â sitalic_i - 1 ) end_ARG start_ARG blackboard_P+ ( sitalic_i | s1 â ⌠â sitalic_i - 1 ) end_ARG ] = (39) =âi=1k(s1ââŚâsi)âźâââ˘(â )â˘[logâĄâââ˘(si|s1ââŚâsiâ1)â+â˘(si|s1ââŚâsiâ1)]=absentsuperscriptsubscript1subscriptsimilar-todirect-sumsubscript1âŚsubscriptsubscriptââ delimited-[]subscriptâconditionalsubscriptdirect-sumsubscript1âŚsubscript1subscriptâconditionalsubscriptdirect-sumsubscript1âŚsubscript1absent= _i=1^kE_(s_1 ... s_i) _-(% ¡) [ P_-(s_i|s_1 ... s_i-1)% P_+(s_i|s_1 ... s_i-1) ]== âi = 1k blackboard_E( s start_POSTSUBSCRIPT 1 â ⌠â sitalic_i ) âź blackboard_P- ( â ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P- ( sitalic_i | s1 â ⌠â sitalic_i - 1 ) end_ARG start_ARG blackboard_P+ ( sitalic_i | s1 â ⌠â sitalic_i - 1 ) end_ARG ] = (40) The expectation value with respect to sisubscripts_isitalic_i is the conditional KL divergence: =âi=1k(s1ââŚâsiâ1)âźâââ˘(â )[DKâ˘L(ââ(â |s1ââŚâsiâ1)||â+(â |s1ââŚâsiâ1))]= _i=1^kE_(s_1 ... s_i-1) _-(% ¡) [D_KL (P_- (¡|s_1 ... s_i-1% )||P_+ (¡|s_1 ... s_i-1 ) ) ]= âi = 1k blackboard_E( s start_POSTSUBSCRIPT 1 â ⌠â sitalic_i - 1 ) âź blackboard_P- ( â ) end_POSTSUBSCRIPT [ Ditalic_K L ( blackboard_P- ( â | s1 â ⌠â sitalic_i - 1 ) | | blackboard_P+ ( â | s1 â ⌠â sitalic_i - 1 ) ) ] (41) From β distinguishability: >kâ βabsentâ >k¡β> k â β (42) Hence we obtain: sâźâââ˘(â )â˘[logâĄâââ˘(s)â+â˘(s)]>βâ˘|s|subscriptsimilar-tosubscriptââ delimited-[]subscriptâsubscriptâE_s _-(¡) [ P_-(s)% P_+(s) ]>β|s|blackboard_Es âź blackboard_P start_POSTSUBSCRIPT - ( â ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG ] > β | s | (43) In particular, there exists a specific sequence s such that the inequality holds. We take that to be the prompt q. Now, we can choose |q|>logâĄ1Ͼβ1italic-Ďľ |q |> 1ξβ| q | > divide start_ARG log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG end_ARG start_ARG β end_ARG to obtain the desired result that â1â˘(s)â0â˘(s)â¤Ďľsubscriptâ1subscriptâ0italic-Ďľ P_1(s)P_0(s)⤠start_ARG blackboard_P1 ( s ) end_ARG start_ARG blackboard_P0 ( s ) end_ARG ⤠Ͼ (44) As desired. â Lemma 4. Let β,Ď,Ďľ,δ>0italic-Ďľ0β,Ď,Îľ,δ>0β , Ď , Ďľ , δ > 0 and â0,â1subscriptâ0subscriptâ1P_0,P_1blackboard_P0 , blackboard_P1 two distributions, s0subscript0s_0s0 a prefix sampled from â1subscriptâ1P_1blackboard_P1 . Suppose â0subscriptâ0P_0blackboard_P0 is β-prompt-distinguishable from â1subscriptâ1P_1blackboard_P1, and â1subscriptâ1P_1blackboard_P1 is βâ˛Î˛ βâ˛-undistinguishable, Ď-similar and positive w.r.t. â0subscriptâ0P_0blackboard_P0, then with probability 1âδ11- 1 - δ, there exists a prompt s of length 1βâ˘logâĄ1Ďľ+βâ˛Î˛â˘|s0|+Ďβâ˘|s0|δ+111italic-Ďľsuperscriptâ˛subscript0subscript01 1β 1Îľ+ β β|s_0|+% Ďβ |s_0|δ+1divide start_ARG 1 end_ARG start_ARG β end_ARG log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG + divide start_ARG βⲠend_ARG start_ARG β end_ARG | s0 | + divide start_ARG Ď end_ARG start_ARG β end_ARG square-root start_ARG divide start_ARG | s0 | end_ARG start_ARG δ end_ARG end_ARG + 1 such that the following holds: â1â˘(s0âs)â0â˘(s0âs)â¤Ďľsubscriptâ1direct-sumsubscript0subscriptâ0direct-sumsubscript0italic-Ďľ P_1(s_0 s)P_0(s_0 s% )⤠start_ARG blackboard_P1 ( s0 â s ) end_ARG start_ARG blackboard_P0 ( s0 â s ) end_ARG ⤠Ͼ (45) Proof. Intuitively, given s0subscript0s_0s0, we use the fact that â0subscriptâ0P_0blackboard_P0 is β-prompt-distinguishable from â1subscriptâ1P_1blackboard_P1 to construct a prompt sentence by sentence, and get a prompt q=s1ââŚâs|q|direct-sumsubscript1âŚsubscriptq=s_1 ... s_|q|q = s1 â ⌠â s| q | such that: logâĄâ0â˘(s1ââŚâsk|s0)â1â˘(s1ââŚâsk|s0)>βâ ksubscriptâ0direct-sumsubscript1âŚconditionalsubscriptsubscript0subscriptâ1direct-sumsubscript1âŚconditionalsubscriptsubscript0â P_0 (s_1 ... s_k\,|\,s_0% )P_1 (s_1 ... s_k\,|\,s_0 )>% β¡ klog divide start_ARG blackboard_P0 ( s1 â ⌠â sitalic_k | s0 ) end_ARG start_ARG blackboard_P1 ( s1 â ⌠â sitalic_k | s0 ) end_ARG > β â k (46) For any kâ¤|q|k⤠|q |k ⤠| q |. To induce the β-prompt-distinguishability, we start by adding a sentence sⲠof negative behavior to the prefix s0subscript0s_0s0. Let us look at the expectation value of the log ratio with respect to a sequence s=(s1â˘âŚâ˘sk)subscript1âŚsubscripts=(s_1...s_k)s = ( s1 ⌠sitalic_k ) of k sentences sampled from ââ(â |s0âsâ˛)P_-(¡|s_0 s )blackboard_P- ( â | s0 â sⲠ): sâźââ(â |s0âsâ˛)â˘[logâĄâââ˘(s|s0âsâ˛)â+â˘(s|s0âsâ˛)]=(s1ââŚâsk)âźââ(â |s0âsâ˛)â˘[logâĄâââ˘(s1ââŚâsk|s0âsâ˛)â+â˘(s1ââŚâsk|s0âsâ˛)]=E_s _-(¡|s_0 s ) [ % P_-(s|s_0 s )P_+(s|s_0 s% ) ]=E_(s_1 ... s_k) _-% (¡|s_0 s ) [ P_-(s_1 ...% s_k|s_0 s )P_+(s_1 ... s_k% |s_0 s ) ]=blackboard_Es âź blackboard_P start_POSTSUBSCRIPT - ( â | s0 â sⲠ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P- ( s | s0 â sⲠ) end_ARG start_ARG blackboard_P+ ( s | s0 â sⲠ) end_ARG ] = blackboard_E( s start_POSTSUBSCRIPT 1 â ⌠â sitalic_k ) âź blackboard_P- ( â | s0 â sⲠ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P- ( s1 â ⌠â sitalic_k | s0 â sⲠ) end_ARG start_ARG blackboard_P+ ( s1 â ⌠â sitalic_k | s0 â sⲠ) end_ARG ] = (47) Using the law of conditional probabilities recursively and the linearity of the expectation value: =âi=1k(s1ââŚâsk)âźââ(â |s0âsâ˛)â˘[logâĄâââ˘(si|s0âsâ˛âs1ââŚâsiâ1)â+â˘(si|s0âsâ˛âs1ââŚâsiâ1)]== _i=1^kE_(s_1 ... s_k) _-(% ¡|s_0 s ) [ P_-(s_i|s_0% s s_1 ... s_i-1)P_+(s_i|s_% 0 s s_1 ... s_i-1) ]== âi = 1k blackboard_E( s start_POSTSUBSCRIPT 1 â ⌠â sitalic_k ) âź blackboard_P- ( â | s0 â sⲠ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P- ( sitalic_i | s0 â sⲠâ s1 â ⌠â sitalic_i - 1 ) end_ARG start_ARG blackboard_P+ ( sitalic_i | s0 â sⲠâ s1 â ⌠â sitalic_i - 1 ) end_ARG ] = (48) =âi=1k(s1ââŚâsi)âźââ(â |s0âsâ˛)â˘[logâĄâââ˘(si|s0âsâ˛âs1ââŚâsiâ1)â+â˘(si|s0âsâ˛âs1ââŚâsiâ1)]== _i=1^kE_(s_1 ... s_i) _-(% ¡|s_0 s ) [ P_-(s_i|s_0% s s_1 ... s_i-1)P_+(s_i|s_% 0 s s_1 ... s_i-1) ]== âi = 1k blackboard_E( s start_POSTSUBSCRIPT 1 â ⌠â sitalic_i ) âź blackboard_P- ( â | s0 â sⲠ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P- ( sitalic_i | s0 â sⲠâ s1 â ⌠â sitalic_i - 1 ) end_ARG start_ARG blackboard_P+ ( sitalic_i | s0 â sⲠâ s1 â ⌠â sitalic_i - 1 ) end_ARG ] = (49) The expectation value with respect to sisubscripts_isitalic_i is the conditional KL divergence: =âi=1k(s1ââŚâsiâ1)âźââ(â |s0âsâ˛)[DKâ˘L(ââ(â |s0âsâ˛âs1ââŚâsiâ1)||â+(â |s0âsâ˛âs1ââŚâsiâ1))]= _i=1^kE_(s_1 ... s_i-1) _-(% ¡|s_0 s ) [D_KL (P_- (¡|s_0% s s_1 ... s_i-1 )||P_+% (¡|s_0 s s_1 ... s_i-1 )% ) ]= âi = 1k blackboard_E( s start_POSTSUBSCRIPT 1 â ⌠â sitalic_i - 1 ) âź blackboard_P- ( â | s0 â sⲠ) end_POSTSUBSCRIPT [ Ditalic_K L ( blackboard_P- ( â | s0 â sⲠâ s1 â ⌠â sitalic_i - 1 ) | | blackboard_P+ ( â | s0 â sⲠâ s1 â ⌠â sitalic_i - 1 ) ) ] (50) From β-prompt-distinguishability: >kâ βabsentâ >k¡β> k â β (51) Hence we obtain: sâźââ(â |s0âsâ˛)â˘[logâĄâââ˘(s|s0âsâ˛)â+â˘(s|s0âsâ˛)]>βâ˘|s|E_s _-(¡|s_0 s ) [ % P_-(s|s_0 s )P_+(s|s_0 s% ) ]>β|s|blackboard_Es âź blackboard_P start_POSTSUBSCRIPT - ( â | s0 â sⲠ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P- ( s | s0 â sⲠ) end_ARG start_ARG blackboard_P+ ( s | s0 â sⲠ) end_ARG ] > β | s | (52) In particular, there exists a specific sequence s such that the inequality holds. We take that to be the prompt q. Next, observe that: ââ˘[logâĄâ+â˘(s0)âââ˘(s0)>câ˘|s0|]=ââ˘[logâĄâ+â˘(s0)âââ˘(s0)âβâ˛â˘|s0|>(câβâ˛)â˘|s0|]âdelimited-[]subscriptâsubscript0subscriptâsubscript0subscript0âdelimited-[]subscriptâsubscript0subscriptâsubscript0superscriptâ˛subscript0superscriptâ˛subscript0P [ P_+(s_0)P_-(s_0)>c|s_% 0| ]=P [ P_+(s_0)P_-% (s_0)-β |s_0|>(c-β )|s_0| ]blackboard_P [ log divide start_ARG blackboard_P+ ( s0 ) end_ARG start_ARG blackboard_P- ( s0 ) end_ARG > c | s0 | ] = blackboard_P [ log divide start_ARG blackboard_P+ ( s0 ) end_ARG start_ARG blackboard_P- ( s0 ) end_ARG - βⲠ| s0 | > ( c - βⲠ) | s0 | ] (53) From βâ˛Î˛ βâ˛-undistinguishability we obtain equation 52 with opposite inequality sign and for reversing the roles between â0subscriptâ0P_0blackboard_P0 and â1subscriptâ1P_1blackboard_P1. This gives: <ââ˘[logâĄâ+â˘(s0)âââ˘(s0)âsâźâ+â˘(â )â˘[logâĄâ+â˘(s)âââ˘(s)]>(câβâ˛)â˘|s0|]<absentâdelimited-[]subscriptâsubscript0subscriptâsubscript0subscriptsimilar-tosubscriptââ delimited-[]subscriptâsubscriptâsuperscriptâ˛subscript0absent<P [ P_+(s_0)P_-(s_0)-% E_s _+(¡)[ P_+(s)P% _-(s)]>(c-β )|s_0| ]<< blackboard_P [ log divide start_ARG blackboard_P+ ( s0 ) end_ARG start_ARG blackboard_P- ( s0 ) end_ARG - blackboard_Es âź blackboard_P start_POSTSUBSCRIPT + ( â ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG ] > ( c - βⲠ) | s0 | ] < (54) From Cantelliâs inequality: <Vâ˘aâ˘rsâźâ+â˘(â )â˘[logâĄâ+â˘(s)âââ˘(s)]Vâ˘aâ˘rsâźâ+â˘(â )â˘[logâĄâ+â˘(s)âââ˘(s)]+(câβâ˛)2â˘|s0|2<Vâ˘aâ˘rsâźâ+â˘(â )â˘[logâĄâ+â˘(s)âââ˘(s)](câβâ˛)2â˘|s0|2<Ď2â˘|s0|(câβâ˛)2â˘|s0|2absentsubscriptsimilar-tosubscriptââ delimited-[]subscriptâsubscriptâsubscriptsimilar-tosubscriptââ delimited-[]subscriptâsubscriptâsuperscriptsuperscriptâ˛2superscriptsubscript02subscriptsimilar-tosubscriptââ delimited-[]subscriptâsubscriptâsuperscriptsuperscriptâ˛2superscriptsubscript02superscript2subscript0superscriptsuperscriptâ˛2superscriptsubscript02< Var_s _+(¡)[ P_+(s)P% _-(s)]Var_s _+(¡)[ P_+(s)% P_-(s)]+(c-β )^2|s_0|^2< Var_s % P_+(¡)[ P_+(s)P_-(s)](c-β^% )^2|s_0|^2< Ď^2|s_0|(c-β )^2|s_0% |^2< divide start_ARG V a ritalic_s âź blackboard_P start_POSTSUBSCRIPT + ( â ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG ] end_ARG start_ARG V a ritalic_s âź blackboard_P start_POSTSUBSCRIPT + ( â ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG ] + ( c - βⲠ)2 | s0 |2 end_ARG < divide start_ARG V a ritalic_s âź blackboard_P start_POSTSUBSCRIPT + ( â ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG ] end_ARG start_ARG ( c - βⲠ)2 | s0 |2 end_ARG < divide start_ARG Ď2 | s0 | end_ARG start_ARG ( c - βⲠ)2 | s0 |2 end_ARG (55) The last transition is from Ď-similarity. Demand that this is smaller than δ and obtain the condition on c: câĽÎ˛â˛+Ď|s0|â˘Î´superscriptâ˛subscript0câĽÎ˛ + Ď |s_0|δc ⼠βⲠ+ divide start_ARG Ď end_ARG start_ARG square-root start_ARG | s0 | δ end_ARG end_ARG (56) Thus if c=βâ˛+Ď|s0|â˘Î´superscriptâ˛subscript0c=β + Ď |s_0|δc = βⲠ+ divide start_ARG Ď end_ARG start_ARG square-root start_ARG | s0 | δ end_ARG end_ARG, we obtain: ââ˘[logâĄâ+â˘(s0)âââ˘(s0)>(βâ˛+Ď|s0|â˘Î´)â˘|s0|]<δâdelimited-[]subscriptâsubscript0subscriptâsubscript0superscriptâ˛subscript0subscript0P [ P_+(s_0)P_-(s_0)>(% β + Ď |s_0|δ)|s_0| ]< _P [ log divide start_ARG blackboard_P+ ( s0 ) end_ARG start_ARG blackboard_P- ( s0 ) end_ARG > ( βⲠ+ divide start_ARG Ď end_ARG start_ARG square-root start_ARG | s0 | δ end_ARG end_ARG ) | s0 | ] < δ (57) Hence with probability 1âδ11- 1 - δ: logâĄâââ˘(s0âsâ˛âs)â+â˘(s0âsâ˛âs)=logâĄâââ˘(s|s0âsâ˛)â+â˘(s|s0âsâ˛)+logâĄâââ˘(sâ˛|s0)â+â˘(sâ˛|s0)+logâĄâââ˘(s0)â+â˘(s0)>|s|â˘Î˛â|s0|â˘Î˛â˛âĎâ˘|s0|δsubscriptâdirect-sumsubscript0superscriptâ˛subscriptâdirect-sumsubscript0superscriptâ˛subscriptâconditionaldirect-sumsubscript0superscriptâ˛subscriptâconditionaldirect-sumsubscript0superscriptâ˛subscriptâconditionalsuperscriptâ˛subscript0subscriptâconditionalsuperscriptâ˛subscript0subscriptâsubscript0subscriptâsubscript0subscript0superscriptâ˛subscript0 P_-(s_0 s s)P_+(s_0% s s)= P_-(s|s_0 s )% P_+(s|s_0 s )+ P_-(s % |s_0)P_+(s |s_0)+ P_-(s_0)% P_+(s_0)>|s|β-|s_0|β -Ď |s_0% |δlog divide start_ARG blackboard_P- ( s0 â sⲠâ s ) end_ARG start_ARG blackboard_P+ ( s0 â sⲠâ s ) end_ARG = log divide start_ARG blackboard_P- ( s | s0 â sⲠ) end_ARG start_ARG blackboard_P+ ( s | s0 â sⲠ) end_ARG + log divide start_ARG blackboard_P- ( sⲠ| s0 ) end_ARG start_ARG blackboard_P+ ( sⲠ| s0 ) end_ARG + log divide start_ARG blackboard_P- ( s0 ) end_ARG start_ARG blackboard_P+ ( s0 ) end_ARG > | s | β - | s0 | βⲠ- Ď square-root start_ARG divide start_ARG | s0 | end_ARG start_ARG δ end_ARG end_ARG (58) Where we used the positivity of â+subscriptâP_+blackboard_P+ in the inequality logâĄâââ˘(sâ˛|s0)â+â˘(sâ˛|s0)>0subscriptâconditionalsuperscriptâ˛subscript0subscriptâconditionalsuperscriptâ˛subscript00 P_-(s |s_0)P_+(s |s_0)>0log divide start_ARG blackboard_P- ( sⲠ| s0 ) end_ARG start_ARG blackboard_P+ ( sⲠ| s0 ) end_ARG > 0 as sⲠis a negative sentence. Thus we can choose |s|>βâ˛â |s0|+Ďâ˘|s0|δ+logâĄ1Ͼβâ superscriptâ˛subscript0subscript01italic-Ďľ |s |> β ¡ |s_0 |+Ď |% s_0|δ+ 1ξβ| s | > divide start_ARG βⲠâ | s0 | + Ď square-root start_ARG divide start_ARG | s0 | end_ARG start_ARG δ end_ARG end_ARG + log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG end_ARG start_ARG β end_ARG to obtain that â1â˘(s0âs)â0â˘(s0âs)â¤Ďľsubscriptâ1direct-sumsubscript0subscriptâ0direct-sumsubscript0italic-Ďľ P_1(s_0 s)P_0(s_0 s)⤠start_ARG blackboard_P1 ( s0 â s ) end_ARG start_ARG blackboard_P0 ( s0 â s ) end_ARG ⤠Ͼ as desired. The total length of the prompt is |sâ˛âs|=1+|s|direct-sumsuperscriptâ˛1|s s|=1+|s|| sⲠâ s | = 1 + | s |. â Appendix D Proof of theorem 1 Let â+subscriptâP_+blackboard_P+ and ââsubscriptâP_-blackboard_P- be the well-behaved and ill-behaved mixture components from the Îą,β,γι,β,γι , β , Îł-negative-distinguishability definition and Ďľ>0italic-Ďľ0Îľ>0Ďľ > 0. Then, since ââsubscriptâP_-blackboard_P- is β-distinguishable from â+subscriptâP_+blackboard_P+, lemma 3 assures us that for any Ďľâ˛>0superscriptitalic-Ďľâ˛0Îľ >0ϾⲠ> 0 there exists a sequence s of 1βâ (logâĄ1Ďľâ˛)â 11superscriptitalic-ϾⲠ1β¡ ( 1Îľ )divide start_ARG 1 end_ARG start_ARG β end_ARG â ( log divide start_ARG 1 end_ARG start_ARG ϾⲠend_ARG ) sentences such that â+â˘(s)âââ˘(s)<Ďľâ˛subscriptâsubscriptâsuperscriptitalic-ϾⲠP_+ (s )P_- (s )<Îľ divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG < Ďľâ˛. Now, lemma 2 assures us that for such prompt a s, the behaviour of âPblackboard_P will converge to the ill-behaved component in the following sense: |Bââ˘(s)âBâââ˘(s)|â¤2â 1âÎąâ Ďľâ˛subscriptâsubscriptsubscriptââ 21superscriptitalic-ϾⲠ|B_P (s )-B_P_- (s% ) |⤠2¡ 1-ι¡ξ^ | Bblackboard_P ( s ) - Bblackboard_P start_POSTSUBSCRIPT - end_POSTSUBSCRIPT ( s ) | ⤠2 â divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG â Ďľstart_FLOATSUPERSCRIPT Ⲡend_FLOATSUPERSCRIPT (59) Thus, we can choose Ďľâ˛<Îąâ Ďľ4superscriptitalic-Ďľâ˛â italic-Ďľ4Îľ < ι¡ξ4ϾⲠ< divide start_ARG Îą â Ďľ end_ARG start_ARG 4 end_ARG and get that: |Bââ˘(s)âBâââ˘(s)|<Ďľsubscriptâsubscriptsubscriptâitalic-Ďľ |B_P (s )-B_P_- (s% ) |<Îľ| Bblackboard_P ( s ) - Bblackboard_P start_POSTSUBSCRIPT - end_POSTSUBSCRIPT ( s ) | < Ďľ (60) Finally, by definition we have that Bâââ˘(s)â¤ÎłsubscriptsubscriptâB_P_- (s )⤠_P start_POSTSUBSCRIPT - end_POSTSUBSCRIPT ( s ) ⤠γ and hence we get that Bââ˘(s)<Îł+Ďľsubscriptâitalic-Ďľ B_P (s )<Îł+ _P ( s ) < Îł + Ďľ (61) As desired. Appendix E Proof of theorem 2 Let â+subscriptâP_+blackboard_P+ and ââsubscriptâP_-blackboard_P- be the well-behaved and ill-behaved mixture components from the Îą,β,γι,β,γι , β , Îł-negative-prompt-distinguishability definition, and let s0subscript0s_0s0 be an initial prompt and Ďľ,δ>0italic-Ďľ0Îľ,δ>0Ďľ , δ > 0. Then since ââsubscriptâP_-blackboard_P- is β-prompt-distinguishable from â+subscriptâP_+blackboard_P+, â+subscriptâP_+blackboard_P+ is β-distinguishable, Ď-similar and positive w.r.t ââsubscriptâP_-blackboard_P-, lemma 4 assures us that for any Ďľâ˛>0superscriptitalic-Ďľâ˛0Îľ >0ϾⲠ> 0 there exists with probability 1âδ11- 1 - δ a sequence s1subscript1s_1s1 of 1βâ (logâĄ1Ďľâ˛+Ďâ˘|s0|δ)+|s0|+1â 11superscriptitalic-Ďľâ˛subscript0subscript01 1β¡ ( 1Îľ +Ď |s% _0|δ )+|s_0|+1divide start_ARG 1 end_ARG start_ARG β end_ARG â ( log divide start_ARG 1 end_ARG start_ARG ϾⲠend_ARG + Ď square-root start_ARG divide start_ARG | s0 | end_ARG start_ARG δ end_ARG end_ARG ) + | s0 | + 1 sentences such that â+â˘(s0âs1)âââ˘(s0âs1)<Ďľâ˛subscriptâdirect-sumsubscript0subscript1subscriptâdirect-sumsubscript0subscript1superscriptitalic-ϾⲠP_+ (s_0 s_1 )P_- (s_0% s_1 )<Îľ divide start_ARG blackboard_P+ ( s0 â s1 ) end_ARG start_ARG blackboard_P- ( s0 â s1 ) end_ARG < Ďľâ˛. Now, lemma 2 assures us that for such prompt a s0âs1direct-sumsubscript0subscript1s_0 s_1s0 â s1, the behaviour of âPblackboard_P will converge to the ill-behaved component in the following sense: |Bââ˘(s0âs1)âBâââ˘(s0âs1)|â¤2â 1âÎąâ Ďľâ˛subscriptâdirect-sumsubscript0subscript1subscriptsubscriptâdirect-sumsubscript0subscript1â 21superscriptitalic-ϾⲠ|B_P (s_0 s_1 )-B_P_% - (s_0 s_1 ) |⤠2¡ 1-Îą% ¡ξ^ | Bblackboard_P ( s0 â s1 ) - Bblackboard_P start_POSTSUBSCRIPT - end_POSTSUBSCRIPT ( s0 â s1 ) | ⤠2 â divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG â Ďľstart_FLOATSUPERSCRIPT Ⲡend_FLOATSUPERSCRIPT (62) Thus, we can choose Ďľâ˛<Îąâ Ďľ4superscriptitalic-Ďľâ˛â italic-Ďľ4Îľ < ι¡ξ4ϾⲠ< divide start_ARG Îą â Ďľ end_ARG start_ARG 4 end_ARG and get that: |Bââ˘(s0âs1)âBâââ˘(s0âs1)|<Ďľsubscriptâdirect-sumsubscript0subscript1subscriptsubscriptâdirect-sumsubscript0subscript1italic-Ďľ |B_P (s_0 s_1 )-B_P_% - (s_0 s_1 ) |<Îľ| Bblackboard_P ( s0 â s1 ) - Bblackboard_P start_POSTSUBSCRIPT - end_POSTSUBSCRIPT ( s0 â s1 ) | < Ďľ (63) Finally, by definition we have that Bâââ˘(s0âs1)â¤Îłsubscriptsubscriptâdirect-sumsubscript0subscript1B_P_- (s_0 s_1 )⤠_P start_POSTSUBSCRIPT - end_POSTSUBSCRIPT ( s0 â s1 ) ⤠γ and hence we get that Bââ˘(s0âs1)<Îł+Ďľsubscriptâdirect-sumsubscript0subscript1italic-Ďľ B_P (s_0 s_1 )<Îł+ _P ( s0 â s1 ) < Îł + Ďľ (64) With probability 1âδ11- 1 - δ, as desired. Appendix F Proof of theorem 3 Let â+subscriptâP_+blackboard_P+ and ââsubscriptâP_-blackboard_P- be the well-behaved and ill-behaved mixture components from the Îą,β,γι,β,γι , β , Îł-negative-prompt-distinguishability definition. Essentially, we we show that there exists a choice of prompts q1â˘âŚâ˘qn+1subscript1âŚsubscript1q_1...q_n+1q1 ⌠qitalic_n + 1 each of them consists of at most βâ˛Î˛â˘|ai|+Ďβâ˘|ai|δ+logâĄ1Îą+logâĄ1Ďľ+logâĄ4nâ˘Î˛+1superscriptâ˛subscriptsubscript11italic-Ďľ41 β β|a_i|+ Ďβ |a_i|% δ+ 1Îą+ 1Îľ+ 4nβ+1divide start_ARG βⲠend_ARG start_ARG β end_ARG | aitalic_i | + divide start_ARG Ď end_ARG start_ARG β end_ARG square-root start_ARG divide start_ARG | aitalic_i | end_ARG start_ARG δ end_ARG end_ARG + divide start_ARG log divide start_ARG 1 end_ARG start_ARG Îą end_ARG + log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG + log 4 end_ARG start_ARG n β end_ARG + 1 sentences such that: logâĄâ+â˘(q1âa1ââŚâqnâanâqn+1)âââ˘(q1âa1ââŚâqnâanâqn+1)<âi=1n+1(βâ˛â˘|ai|+Ďâ˘|ai|δâβâ˘|qi|)subscriptâdirect-sumsubscript1subscript1âŚsubscriptsubscriptsubscript1subscriptâdirect-sumsubscript1subscript1âŚsubscriptsubscriptsubscript1superscriptsubscript11superscriptâ˛subscriptsubscriptsubscript P_+ (q_1 a_1 ... q_% n a_n q_n+1 )P_- (q_1 a_1% ... q_n a_n q_n+1 )< _i=1^n+1 (% β |a_i|+Ď |a_i|δ-β |q_i% | )log divide start_ARG blackboard_P+ ( q1 â a1 â ⌠â qitalic_n â aitalic_n â qitalic_n + 1 ) end_ARG start_ARG blackboard_P- ( q1 â a1 â ⌠â qitalic_n â aitalic_n â qitalic_n + 1 ) end_ARG < âi = 1n + 1 ( βⲠ| aitalic_i | + Ď square-root start_ARG divide start_ARG | aitalic_i | end_ARG start_ARG δ end_ARG end_ARG - β | qitalic_i | ) (65) Then, we will use lemma 2 and get that for any such prompts q1â˘âŚâ˘qn+1subscript1âŚsubscript1q_1...q_n+1q1 ⌠qitalic_n + 1 the behaviour of âPblackboard_P will converge to the ill-behaved component in the following sense: |Bââ˘(s)âBâââ˘(s)|â¤2â 1âÎąâ expâĄ(âi=1n+1(βâ˛â˘|ai|+Ďâ˘|ai|δâβâ˘|qi|))subscriptâsubscriptsubscriptââ 21superscriptsubscript11superscriptâ˛subscriptsubscriptsubscript |B_P (s )-B_P_- (s% ) |⤠2¡ 1-ι¡ ( _i=1^n+1% (β |a_i|+Ď |a_i|δ-β |q_% i | ) )| Bblackboard_P ( s ) - Bblackboard_P start_POSTSUBSCRIPT - end_POSTSUBSCRIPT ( s ) | ⤠2 â divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG â exp ( âi = 1n + 1 ( βⲠ| aitalic_i | + Ď square-root start_ARG divide start_ARG | aitalic_i | end_ARG start_ARG δ end_ARG end_ARG - β | qitalic_i | ) ) (66) Where s denote the concatenation of the messages in the conversation: q1âa1ââŚâqnâanâqn+1direct-sumsubscript1subscript1âŚsubscriptsubscriptsubscript1q_1 a_1 ... q_n a_n q_n+1q1 â a1 â ⌠â qitalic_n â aitalic_n â qitalic_n + 1. Thus, we will get that Bââ˘(s)<Îł+Ďľsubscriptâitalic-ĎľB_P (s )<Îł+ _P ( s ) < Îł + Ďľ for âi=1n+1|qi|>âi=1n+1(βâ˛Î˛â˘|ai|+Ďβâ˘|ai|δ+1)+logâĄ(1âÎą2â Îąâ Ďľ)βsuperscriptsubscript11subscriptsuperscriptsubscript11superscriptâ˛subscriptsubscript11â 2italic-Ďľ _i=1^n+1 |q_i |> _i=1^n+1 ( β % β |a_i |+ Ďβ |a_i|δ+% 1 )+ ( 1-Îą2¡ι¡ξ )βâi = 1n + 1 | qitalic_i | > âi = 1n + 1 ( divide start_ARG βⲠend_ARG start_ARG β end_ARG | aitalic_i | + divide start_ARG Ď end_ARG start_ARG β end_ARG square-root start_ARG divide start_ARG | aitalic_i | end_ARG start_ARG δ end_ARG end_ARG + 1 ) + divide start_ARG log ( divide start_ARG 1 - Îą end_ARG start_ARG 2 â Îą â Ďľ end_ARG ) end_ARG start_ARG β end_ARG as desired. Intuitively, we will prove the existence of the prompts q1â˘âŚâ˘qn+1subscript1âŚsubscript1q_1...q_n+1q1 ⌠qitalic_n + 1 such that the length of any prompt is at most βâ˛Î˛â˘|ai|+Ďβâ˘|ai|δ+logâĄ1Îą+logâĄ1Ďľ+logâĄ4nâ˘Î˛+1superscriptâ˛subscriptsubscript11italic-Ďľ41 β β |a_i |+ Ďβ % |a_i|δ+ 1Îą+ 1Îľ+ 4n% β+1divide start_ARG βⲠend_ARG start_ARG β end_ARG | aitalic_i | + divide start_ARG Ď end_ARG start_ARG β end_ARG square-root start_ARG divide start_ARG | aitalic_i | end_ARG start_ARG δ end_ARG end_ARG + divide start_ARG log divide start_ARG 1 end_ARG start_ARG Îą end_ARG + log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG + log 4 end_ARG start_ARG n β end_ARG + 1 and equation 65 upholds by using an induction argument, where the induction hypothesis follows from the fact that ââsubscriptâP_-blackboard_P- is β-distinguishable from â+subscriptâP_+blackboard_P+. Formally, the base case of the induction follows by using lemma 3 to construct an adversarial prompt q1subscript1q_1q1 such that logâĄâ+â˘(q1)âââ˘(q1)<âβâ |q1|subscriptâsubscript1subscriptâsubscript1â subscript1 P_+ (q_1 )P_- (q_1 )<% -β¡|q_1|log divide start_ARG blackboard_P+ ( q1 ) end_ARG start_ARG blackboard_P- ( q1 ) end_ARG < - β â | q1 |. Now, assume that there exists prompts q1â˘âŚâ˘qksubscript1âŚsubscriptq_1...q_kq1 ⌠qitalic_k such that the length of any prompt is at most βâ˛Î˛â˘|ai|+Ďβâ˘|ai|δ+logâĄ1Îą+logâĄ1Ďľ+logâĄ4nâ˘Î˛+1superscriptâ˛subscriptsubscript11italic-Ďľ41 β β |a_i |+ Ďβ % |a_i|δ+ 1Îą+ 1Îľ+ 4n% β+1divide start_ARG βⲠend_ARG start_ARG β end_ARG | aitalic_i | + divide start_ARG Ď end_ARG start_ARG β end_ARG square-root start_ARG divide start_ARG | aitalic_i | end_ARG start_ARG δ end_ARG end_ARG + divide start_ARG log divide start_ARG 1 end_ARG start_ARG Îą end_ARG + log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG + log 4 end_ARG start_ARG n β end_ARG + 1 and equation 65 upholds (with n=kâ1)n=k-1)n = k - 1 ). Then the proof of lemma 4 (equation 52) assures us that there exists an adversarial prompt qk+1subscript1q_k+1qitalic_k + 1 such that: logâĄâ+â˘(qk+1|q1âa1ââŻâqkâak)âââ˘(qk+1|q1âa1ââŻâqkâak)<âβâ |qk+1|subscriptâconditionalsubscript1direct-sumsubscript1subscript1âŻsubscriptsubscriptsubscriptâconditionalsubscript1direct-sumsubscript1subscript1âŻsubscriptsubscriptâ subscript1 P_+ (q_k+1|q_1 a_1 % ⌠q_k a_k )P_- (q_k+1|q_1 a% _1 ⌠q_k a_k )<-β¡|q_k+1|log divide start_ARG blackboard_P+ ( qitalic_k + 1 | q1 â a1 â ⯠â qitalic_k â aitalic_k ) end_ARG start_ARG blackboard_P- ( qitalic_k + 1 | q1 â a1 â ⯠â qitalic_k â aitalic_k ) end_ARG < - β â | qitalic_k + 1 | (67) Now, by the chain rule of conditional probabilities we have that: logâĄâ+â˘(q1âa1ââŻâqkâakâqk+1)âââ˘(q1âa1ââŻâqkâakâqk+1)<âβâ |qk+1|+logâĄâ+â˘(ak|q1âa1ââŻâakâ1âqk)âââ˘(ak|q1âa1ââŻâakâ1âqk)subscriptâdirect-sumsubscript1subscript1âŻsubscriptsubscriptsubscript1subscriptâdirect-sumsubscript1subscript1âŻsubscriptsubscriptsubscript1â subscript1subscriptâconditionalsubscriptdirect-sumsubscript1subscript1âŻsubscript1subscriptsubscriptâconditionalsubscriptdirect-sumsubscript1subscript1âŻsubscript1subscript P_+ (q_1 a_1 ⌠q% _k a_k q_k+1 )P_- (q_1 a_1% ⌠q_k a_k q_k+1 )<-β¡|q_k+1|% + P_+ (a_k|q_1 a_1 ⌠a_k-1% q_k )P_- (a_k|q_1 a_1 âŚ% a_k-1 q_k )log divide start_ARG blackboard_P+ ( q1 â a1 â ⯠â qitalic_k â aitalic_k â qitalic_k + 1 ) end_ARG start_ARG blackboard_P- ( q1 â a1 â ⯠â qitalic_k â aitalic_k â qitalic_k + 1 ) end_ARG < - β â | qitalic_k + 1 | + log divide start_ARG blackboard_P+ ( aitalic_k | q1 â a1 â ⯠â aitalic_k - 1 â qitalic_k ) end_ARG start_ARG blackboard_P- ( aitalic_k | q1 â a1 â ⯠â aitalic_k - 1 â qitalic_k ) end_ARG (68) Now, observe that: ââ˘[logâĄâ+â˘(ak|q1âa1ââŻâakâ1âqk)âââ˘(ak|q1âa1ââŻâakâ1âqk)>câ˘|ak|]=ââ˘[logâĄâ+â˘(ak|q1âa1ââŻâakâ1âqk)âââ˘(ak|q1âa1ââŻâakâ1âqk)âβâ˛â˘|ak|>(câβâ˛)â˘|ak|]âdelimited-[]subscriptâconditionalsubscriptdirect-sumsubscript1subscript1âŻsubscript1subscriptsubscriptâconditionalsubscriptdirect-sumsubscript1subscript1âŻsubscript1subscriptsubscriptâdelimited-[]subscriptâconditionalsubscriptdirect-sumsubscript1subscript1âŻsubscript1subscriptsubscriptâconditionalsubscriptdirect-sumsubscript1subscript1âŻsubscript1subscriptsuperscriptâ˛subscriptsuperscriptâ˛subscriptP [ P_+ (a_k|q_1 a_1 % ⌠a_k-1 q_k )P_- (a_k|q_1 a% _1 ⌠a_k-1 q_k )>c|a_k| ]=P% [ P_+ (a_k|q_1 a_1 ⌠a% _k-1 q_k )P_- (a_k|q_1 a_1 % ⌠a_k-1 q_k )-β |a_k|>(c-β % )|a_k| ]blackboard_P [ log divide start_ARG blackboard_P+ ( aitalic_k | q1 â a1 â ⯠â aitalic_k - 1 â qitalic_k ) end_ARG start_ARG blackboard_P- ( aitalic_k | q1 â a1 â ⯠â aitalic_k - 1 â qitalic_k ) end_ARG > c | aitalic_k | ] = blackboard_P [ log divide start_ARG blackboard_P+ ( aitalic_k | q1 â a1 â ⯠â aitalic_k - 1 â qitalic_k ) end_ARG start_ARG blackboard_P- ( aitalic_k | q1 â a1 â ⯠â aitalic_k - 1 â qitalic_k ) end_ARG - βⲠ| aitalic_k | > ( c - βⲠ) | aitalic_k | ] (69) From βâ˛Î˛ βâ˛-prompt-undistinguishability, since qksubscriptq_kqitalic_k ends with a negative sentence, equation 52 gives: <ââ˘[logâĄâ+â˘(ak|q1âa1ââŻâqk)âââ˘(ak|q1âa1ââŻâqk)âsâźâ+(â |q1âa1ââŻâqk)â˘[logâĄâ+â˘(s|q1âa1ââŻâqk)âââ˘(s|q1âa1ââŻâqk)]>(câβâ˛)â˘|ak|]<<P [ P_+ (a_k|q_1 a_1 % ⌠q_k )P_- (a_k|q_1 a_1 % ⌠q_k )-E_s _+ (¡|q_1% a_1 ⌠q_k )[ P_+ (s|q_% 1 a_1 ⌠q_k )P_- (s|q_1% a_1 ⌠q_k )]>(c-β )|a_k| ]<< blackboard_P [ log divide start_ARG blackboard_P+ ( aitalic_k | q1 â a1 â ⯠â qitalic_k ) end_ARG start_ARG blackboard_P- ( aitalic_k | q1 â a1 â ⯠â qitalic_k ) end_ARG - blackboard_Es âź blackboard_P start_POSTSUBSCRIPT + ( â | q1 â a1 â ⯠â qitalic_k ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P+ ( s | q1 â a1 â ⯠â qitalic_k ) end_ARG start_ARG blackboard_P- ( s | q1 â a1 â ⯠â qitalic_k ) end_ARG ] > ( c - βⲠ) | aitalic_k | ] < (70) From Cantelliâs inequality: <Vâ˘aâ˘rsâźâ+â˘(s|q1âa1ââŻâqk)â˘[logâĄâ+â˘(s|q1âa1ââŻâqk)âââ˘(s|q1âa1ââŻâqk)]Vâ˘aâ˘rsâźâ+(â |q1âa1ââŻâqk)â˘[logâĄâ+â˘(s|q1âa1ââŻâqk)âââ˘(s|q1âa1ââŻâqk)]+(câβâ˛)2â˘|ak|2<< Var_s _+ (s|q_1 a_1 ⌠q_k% )[ P_+ (s|q_1 a_1 ⌠q% _k )P_- (s|q_1 a_1 ⌠q_k% )]Var_s _+ (¡|q_1 a_1 âŚ% q_k )[ P_+ (s|q_1 a_1 % ⌠q_k )P_- (s|q_1 a_1 âŚ% q_k )]+(c-β )^2|a_k|^2<< divide start_ARG V a ritalic_s âź blackboard_P start_POSTSUBSCRIPT + ( s | q1 â a1 â ⯠â qitalic_k ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P+ ( s | q1 â a1 â ⯠â qitalic_k ) end_ARG start_ARG blackboard_P- ( s | q1 â a1 â ⯠â qitalic_k ) end_ARG ] end_ARG start_ARG V a ritalic_s âź blackboard_P start_POSTSUBSCRIPT + ( â | q1 â a1 â ⯠â qitalic_k ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P+ ( s | q1 â a1 â ⯠â qitalic_k ) end_ARG start_ARG blackboard_P- ( s | q1 â a1 â ⯠â qitalic_k ) end_ARG ] + ( c - βⲠ)2 | aitalic_k |2 end_ARG < (71) <Vâ˘aâ˘rsâźâ+â˘(s|q1âa1ââŻâqk)â˘[logâĄâ+â˘(s|q1âa1ââŻâqk)âââ˘(s|q1âa1ââŻâqk)](câβâ˛)2â˘|ak|2<Ď2â˘|ak|(câβâ˛)2â˘|ak|2absentsubscriptsimilar-tosubscriptâconditionaldirect-sumsubscript1subscript1âŻsubscriptdelimited-[]subscriptâconditionaldirect-sumsubscript1subscript1âŻsubscriptsubscriptâconditionaldirect-sumsubscript1subscript1âŻsubscriptsuperscriptsuperscriptâ˛2superscriptsubscript2superscript2subscriptsuperscriptsuperscriptâ˛2superscriptsubscript2< Var_s _+ (s|q_1 a_1 ⌠q_k% )[ P_+ (s|q_1 a_1 ⌠q% _k )P_- (s|q_1 a_1 ⌠q_k% )](c-β )^2|a_k|^2< Ď^2|a_k|(c-% β )^2|a_k|^2< divide start_ARG V a ritalic_s âź blackboard_P start_POSTSUBSCRIPT + ( s | q1 â a1 â ⯠â qitalic_k ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P+ ( s | q1 â a1 â ⯠â qitalic_k ) end_ARG start_ARG blackboard_P- ( s | q1 â a1 â ⯠â qitalic_k ) end_ARG ] end_ARG start_ARG ( c - βⲠ)2 | aitalic_k |2 end_ARG < divide start_ARG Ď2 | aitalic_k | end_ARG start_ARG ( c - βⲠ)2 | aitalic_k |2 end_ARG (72) The last transition is from Ď-similarity. Demand that this is smaller than δâ˛Î´ δⲠand obtain the condition on c: câĽÎ˛â˛+Ď|ak|â˘Î´â˛subscriptsuperscriptâ˛câĽÎ˛ + Ď |a_k|δ c ⼠βⲠ+ divide start_ARG Ď end_ARG start_ARG square-root start_ARG | aitalic_k | δⲠend_ARG end_ARG (73) Thus if c=βâ˛+Ď|ak|â˘Î´â˛subscriptsuperscriptâ˛c=β + Ď |a_k|δ c = βⲠ+ divide start_ARG Ď end_ARG start_ARG square-root start_ARG | aitalic_k | δⲠend_ARG end_ARG, we obtain: ââ˘[logâĄâ+â˘(ak|q1âa1ââŻâakâ1âqk)âââ˘(ak|q1âa1ââŻâakâ1âqk)>(βâ˛+Ď|ak|â˘Î´â˛)â˘|s0|]<δâ˛âdelimited-[]subscriptâconditionalsubscriptdirect-sumsubscript1subscript1âŻsubscript1subscriptsubscriptâconditionalsubscriptdirect-sumsubscript1subscript1âŻsubscript1subscriptsuperscriptâ˛subscriptsuperscriptâ˛subscript0superscriptâ˛P [ P_+ (a_k|q_1 a_1 % ⌠a_k-1 q_k )P_- (a_k|q_1 a% _1 ⌠a_k-1 q_k )>(β + Ď% |a_k|δ )|s_0| ]<δ blackboard_P [ log divide start_ARG blackboard_P+ ( aitalic_k | q1 â a1 â ⯠â aitalic_k - 1 â qitalic_k ) end_ARG start_ARG blackboard_P- ( aitalic_k | q1 â a1 â ⯠â aitalic_k - 1 â qitalic_k ) end_ARG > ( βⲠ+ divide start_ARG Ď end_ARG start_ARG square-root start_ARG | aitalic_k | δⲠend_ARG end_ARG ) | s0 | ] < δⲠ(74) Lastly, recall that for inducing the distinguishability from prompt qk+1subscript1q_k+1qitalic_k + 1, we need to add a triggering sentence before it, hence the +11+1+ 1. Hence by plugging this into equation 68, then with probability 1âδâ˛1superscriptâ˛1-δ 1 - δâ˛: logâĄâ+â˘(q1âa1ââŻâqkâakâqk+1)âââ˘(q1âa1ââŻâqkâakâqk+1)<â|qk+1|â˘Î˛+|ak|â˘Î˛â˛+Ďâ˘|ak|δâ˛subscriptâdirect-sumsubscript1subscript1âŻsubscriptsubscriptsubscript1subscriptâdirect-sumsubscript1subscript1âŻsubscriptsubscriptsubscript1subscript1subscriptsuperscriptâ˛subscriptsuperscriptⲠP_+ (q_1 a_1 ⌠q% _k a_k q_k+1 )P_- (q_1 a_1% ⌠q_k a_k q_k+1 )<-|q_k+1|β+|a_% k|β +Ď |a_k|δ log divide start_ARG blackboard_P+ ( q1 â a1 â ⯠â qitalic_k â aitalic_k â qitalic_k + 1 ) end_ARG start_ARG blackboard_P- ( q1 â a1 â ⯠â qitalic_k â aitalic_k â qitalic_k + 1 ) end_ARG < - | qitalic_k + 1 | β + | aitalic_k | βⲠ+ Ď square-root start_ARG divide start_ARG | aitalic_k | end_ARG start_ARG δⲠend_ARG end_ARG (75) So we can use the induction hypothesis to upper bound the logâĄâ+â˘(qk|q1âa1ââŻâqkâ1âakâ1)âââ˘(qk|q1âa1ââŻâqkâ1âakâ1)subscriptâconditionalsubscriptdirect-sumsubscript1subscript1âŻsubscript1subscript1subscriptâconditionalsubscriptdirect-sumsubscript1subscript1âŻsubscript1subscript1 P_+ (q_k|q_1 a_1 ⌠q_k-1% a_k-1 )P_- (q_k|q_1 a_1 âŚ% q_k-1 a_k-1 )log divide start_ARG blackboard_P+ ( qitalic_k | q1 â a1 â ⯠â qitalic_k - 1 â aitalic_k - 1 ) end_ARG start_ARG blackboard_P- ( qitalic_k | q1 â a1 â ⯠â qitalic_k - 1 â aitalic_k - 1 ) end_ARG term and get that: logâĄâ+â˘(q1âa1ââŻâqkâakâqk+1)âââ˘(q1âa1ââŻâqkâakâqk+1)<âi=1k+1(â|qi+1|â˘Î˛+|ai|â˘Î˛â˛+Ďâ˘|ai|δâ˛)subscriptâdirect-sumsubscript1subscript1âŻsubscriptsubscriptsubscript1subscriptâdirect-sumsubscript1subscript1âŻsubscriptsubscriptsubscript1superscriptsubscript11subscript1subscriptsuperscriptâ˛subscriptsuperscriptⲠP_+ (q_1 a_1 ⌠q% _k a_k q_k+1 )P_- (q_1 a_1% ⌠q_k a_k q_k+1 )< _i=1^k+1% (-|q_i+1|β+|a_i|β +Ď |a_i|δ^% )log divide start_ARG blackboard_P+ ( q1 â a1 â ⯠â qitalic_k â aitalic_k â qitalic_k + 1 ) end_ARG start_ARG blackboard_P- ( q1 â a1 â ⯠â qitalic_k â aitalic_k â qitalic_k + 1 ) end_ARG < âi = 1k + 1 ( - | qitalic_i + 1 | β + | aitalic_i | βⲠ+ Ď square-root start_ARG divide start_ARG | aitalic_i | end_ARG start_ARG δⲠend_ARG end_ARG ) (76) As desired. The total probability of the existence of the prompts q1â˘âŚâ˘qn+1subscript1âŚsubscript1q_1...q_n+1q1 ⌠qitalic_n + 1 is (1âδâ˛)nsuperscript1superscriptâ˛(1-δ )^n( 1 - δⲠ)n. Hence it suffices to choose δâ˛=δnsuperscriptâ˛Î´ = δnδⲠ= divide start_ARG δ end_ARG start_ARG n end_ARG to ensure that they exist with probability 1âδ11- 1 - δ. Appendix G Proof of theorem 4 Here we will use modified versions of the proofâs building blocks. First, we observe that without best of n, the conditional model distribution to a prompt s is: ââ˘(sâ˛|s)=11+1âÎąâ˘â+â˘(s)âââ˘(s)â˘âââ˘(sâ˛|s)+11+Îą1âÎąâ˘âââ˘(s)â+â˘(s)â˘â+â˘(sâ˛|s)âconditionalsuperscriptâ˛111subscriptâsubscriptâsubscriptâconditionalsuperscriptâ˛111subscriptâsubscriptâsubscriptâconditionalsuperscriptâ˛P(s |s)= 11+ 1-Îą P_+% (s)P_-(s)P_-(s |s)+ 11+ Îą% 1-Îą P_-(s)P_+(s)P_+(s % |s)blackboard_P ( sⲠ| s ) = divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG blackboard_P- ( sⲠ| s ) + divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG Îą end_ARG start_ARG 1 - Îą end_ARG divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG end_ARG blackboard_P+ ( sⲠ| s ) (77) Now, when sampling from this distribution, the probability of sampling a negative response is the probability to sample from ââsubscriptâP_-blackboard_P-, which is equal to its prior: ââ˘(sample negative response)=11+1âÎąâ˘â+â˘(s)âââ˘(s)âsample negative response111subscriptâsubscriptâP(sample negative response)= 11+ 1-Îą% Îą P_+(s)P_-(s)blackboard_P ( sample negative response ) = divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG (78) Similarly the probability for sampling a positive response: ââ˘(sample positive response)=11+Îą1âÎąâ˘âââ˘(s)â+â˘(s)âsample positive response111subscriptâsubscriptâP(sample positive response)= 11+ Îą1-% Îą P_-(s)P_+(s)blackboard_P ( sample positive response ) = divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG Îą end_ARG start_ARG 1 - Îą end_ARG divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG end_ARG (79) When sampling n responses, if some of them are from â+subscriptâP_+blackboard_P+, then they will be chosen by the reward function in best of n, hence the behavior expectation is positive. Thus sampling a negative response can only happen if all n responses are sampled from ââsubscriptâP_-blackboard_P-. The probability of this happening is: âbest of nâ˘(sample negative response)=ââ˘(sample negative response)n=(11+1âÎąâ˘â+â˘(s)âââ˘(s))nsubscriptâbest of nsample negative responseâsuperscriptsample negative responsesuperscript111subscriptâsubscriptâP_best of n(sample negative response)=P(% sample negative response)^n= ( 11+ 1-Îą% Îą P_+(s)P_-(s) )^nblackboard_Pbest of n ( sample negative response ) = blackboard_P ( sample negative response )n = ( divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG )n (80) Otherwise, a response is sampled from â+subscriptâP_+blackboard_P+. Thus the conditional model response can be rewritten for best of n as: âbest of nâ˘(sâ˛|s)=(11+1âÎąâ˘â+â˘(s)âââ˘(s))nâ˘âââ˘(sâ˛|s)+(1â(11+1âÎąâ˘â+â˘(s)âââ˘(s))n)â˘â+â˘(sâ˛|s)subscriptâbest of nconditionalsuperscriptâ˛111subscriptâsubscriptâsubscriptâconditionalsuperscriptâ˛1superscript111subscriptâsubscriptâsubscriptâconditionalsuperscriptâ˛P_best of n(s |s)= ( 11+ 1-Îą% Îą P_+(s)P_-(s) )^nP_-% (s |s)+ (1- ( 11+ 1-Îą % P_+(s)P_-(s) )^n )P_+(s^% |s)blackboard_Pbest of n ( sⲠ| s ) = ( divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG )n blackboard_P- ( sⲠ| s ) + ( 1 - ( divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG )n ) blackboard_P+ ( sⲠ| s ) (81) Now, we calculate the behavior expectation difference between the best of n distribution and the negative distribution: |Bâbest of n(s)âBââ(s)|=|âsâ˛B(sâ˛)(âbest of n(sâ˛|s)âââ(sâ˛|s))|â¤|B_P_best of n(s)-B_P_-(s)|=| _s^% B(s )(P_best of n(s |s)-P% _-(s |s))|â¤| Bblackboard_P start_POSTSUBSCRIPT best of n end_POSTSUBSCRIPT ( s ) - Bblackboard_P start_POSTSUBSCRIPT - end_POSTSUBSCRIPT ( s ) | = | âsⲠB ( sⲠ) ( blackboard_Pbest of n ( sⲠ| s ) - blackboard_P- ( sⲠ| s ) ) | ⤠(82) Since B is bounded between [â1,+1]11[-1,+1][ - 1 , + 1 ]: â¤âsâ˛|(âbest of n(sâ˛|s)âââ(sâ˛|s))|⤠_s |(P_best of n(s |s)-P% _-(s |s))|⤠âsⲠ| ( blackboard_Pbest of n ( sⲠ| s ) - blackboard_P- ( sⲠ| s ) ) | (83) Using our expression for the best of n distribution in terms of the components (equation 80): =âsâ˛|((11+1âÎąâ˘â+â˘(s)âââ˘(s))nââ(sâ˛|s)+(1â(11+1âÎąâ˘â+â˘(s)âââ˘(s))n)â+(sâ˛|s)âââ(sâ˛|s))|= _s | ( ( 11+ 1-Îą% P_+(s)P_-(s) )^nP_-(s^% |s)+ (1- ( 11+ 1-Îą P% _+(s)P_-(s) )^n )P_+(s |s)-% P_-(s |s) ) |= âsⲠ| ( ( divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG )n blackboard_P- ( sⲠ| s ) + ( 1 - ( divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG )n ) blackboard_P+ ( sⲠ| s ) - blackboard_P- ( sⲠ| s ) ) | (84) =âsâ˛|(((11+1âÎąâ˘â+â˘(s)âââ˘(s))nâ1)ââ(sâ˛|s)+(1â(11+1âÎąâ˘â+â˘(s)âââ˘(s))n)â+(sâ˛|s))|= _s | ( ( ( 11+ 1-Îą% Îą P_+(s)P_-(s) )^n-1 )% P_-(s |s)+ (1- ( 11+ 1-Îą% Îą P_+(s)P_-(s) )^n ) % P_+(s |s) ) |= âsⲠ| ( ( ( divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG )n - 1 ) blackboard_P- ( sⲠ| s ) + ( 1 - ( divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG )n ) blackboard_P+ ( sⲠ| s ) ) | (85) =âsâ˛|(1â(11+1âÎąâ˘â+â˘(s)âââ˘(s))n)(â+(sâ˛|s)âââ(sâ˛|s))|= _s | (1- ( 11+ 1-Îą% P_+(s)P_-(s) )^n ) ( % P_+(s |s)-P_-(s |s) ) |= âsⲠ| ( 1 - ( divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG )n ) ( blackboard_P+ ( sⲠ| s ) - blackboard_P- ( sⲠ| s ) ) | (86) =(1â(11+1âÎąâ˘â+â˘(s)âââ˘(s))n)âsâ˛|(â+(sâ˛|s)âââ(sâ˛|s))|= (1- ( 11+ 1-Îą P_+(s)% P_-(s) )^n ) _s | (% P_+(s |s)-P_-(s |s) ) |= ( 1 - ( divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG )n ) âsⲠ| ( blackboard_P+ ( sⲠ| s ) - blackboard_P- ( sⲠ| s ) ) | (87) The sum over differences of two distributions can be bounded by 2222 with the triangle inequality, yielding: â¤2â˘(1â(11+1âÎąâ˘â+â˘(s)âââ˘(s))n)absent21superscript111subscriptâsubscriptâ⤠2 (1- ( 11+ 1-Îą P_+(% s)P_-(s) )^n )⤠2 ( 1 - ( divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG )n ) (88) Now, using lemma 3 we take s of length logâĄ1Ďľâ˛+logâĄ1Îą+logâĄnβ1superscriptitalic-Ďľâ˛1 1Îľ + 1Îą+ nβdivide start_ARG log divide start_ARG 1 end_ARG start_ARG ϾⲠend_ARG + log divide start_ARG 1 end_ARG start_ARG Îą end_ARG + log n end_ARG start_ARG β end_ARG such that logâĄâ+â˘(s)âââ˘(s)<Ďľâ˛â˘Îąnsubscriptâsubscriptâsuperscriptitalic-ϾⲠP_+(s)P_-(s)< Îľ Îą% nlog divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG < divide start_ARG ϾⲠι end_ARG start_ARG n end_ARG: â¤2â˘(1â(11+1âÎąâ˘Ďľâ˛â˘Îąn)n)â¤2â˘(1â(11+Ďľâ˛n)n)absent21superscript111superscriptitalic-Ďľâ˛21superscript11superscriptitalic-Ďľâ˛â¤ 2 (1- ( 11+ 1-Îą Îľ^% Îąn )^n )⤠2 (1- ( 11+ % Îľ n )^n )⤠2 ( 1 - ( divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG ϾⲠι end_ARG start_ARG n end_ARG end_ARG )n ) ⤠2 ( 1 - ( divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG ϾⲠend_ARG start_ARG n end_ARG end_ARG )n ) (89) Using the inequality (1+Ďľâ˛n)nâ¤eĎľâ˛1superscriptitalic-Ďľâ˛superscriptitalic-Ďľâ˛(1+ Îľ n)^n⤠e^Îľ ( 1 + divide start_ARG ϾⲠend_ARG start_ARG n end_ARG )n ⤠eitalic_Ďľ start_POSTSUPERSCRIPT Ⲡend_POSTSUPERSCRIPT: â¤2â˘(1âeâĎľâ˛)<2â˘Ďľâ˛absent21superscriptsuperscriptitalic-Ďľâ˛2superscriptitalic-Ďľâ˛â¤ 2(1-e^-Îľ )<2Îľ ⤠2 ( 1 - e- Ďľ start_POSTSUPERSCRIPT Ⲡend_POSTSUPERSCRIPT ) < 2 ϾⲠ(90) Taking Ďľâ˛=Ďľ4superscriptitalic-Ďľâ˛italic-Ďľ4Îľ = Îľ4ϾⲠ= divide start_ARG Ďľ end_ARG start_ARG 4 end_ARG we get the desired result. Hence for |s|>logâĄ1Ďľ+logâĄ1Îą+logâĄ4+logâĄnβ1italic-Ďľ14|s|> 1Îľ+ 1Îą+ 4+ nβ| s | > divide start_ARG log divide start_ARG 1 end_ARG start_ARG Ďľ end_ARG + log divide start_ARG 1 end_ARG start_ARG Îą end_ARG + log 4 + log n end_ARG start_ARG β end_ARG we obtain Bâbest of nâ˘(s)<Îł+Ďľsubscriptsubscriptâbest of nitalic-ĎľB_P_best of n(s)<Îł+ _P start_POSTSUBSCRIPT best of n end_POSTSUBSCRIPT ( s ) < Îł + Ďľ as desired. Appendix H Lemmas for section 4 The following lemmas help establish a method to extract approximations Îą and β from the KL divergence between ââsubscriptâP_-blackboard_P- and the LLM distribution: Lemma 5. Let âLâ˘Lâ˘MsubscriptâP_LLMblackboard_PL L M be a language model distribution that is Îą,β,γι,β,γι , β , Îł-distinguishable w.r.t a behavior B, then the misaligning prompt s guaranteed from theorem 1 satisfies: DKâ˘L(ââ(â |s)||âLâ˘Lâ˘M(â |s))<log(1+elogâĄ1Îąâβâ˘|s|)D_KL(P_-(¡|s)||P_LLM(¡|s))< (1+e % 1Îą-β|s|)Ditalic_K L ( blackboard_P- ( â | s ) | | blackboard_PL L M ( â | s ) ) < log ( 1 + eroman_log divide start_ARG 1 end_ARG start_ARG Îą end_ARG - β | s | ) (91) Moreover, the zero-shot KL divergence is an approximation for logâĄ1Îą1 1Îąlog divide start_ARG 1 end_ARG start_ARG Îą end_ARG: Lemma 6. Let âLâ˘Lâ˘M=Îąâ˘ââ+(1âÎą)â˘â+subscriptâsubscriptâ1subscriptâP_LLM= _-+(1-Îą)P_+blackboard_PL L M = Îą blackboard_P- + ( 1 - Îą ) blackboard_P+, then if ââsubscriptâP_-blackboard_P- and â+subscriptâP_+blackboard_P+ are disjoint distributions then: DKâ˘L(ââ(â )||âLâ˘Lâ˘M(â ))=log1ÎąD_KL(P_-(¡)||P_LLM(¡))= 1ÎąDitalic_K L ( blackboard_P- ( â ) | | blackboard_PL L M ( â ) ) = log divide start_ARG 1 end_ARG start_ARG Îą end_ARG (92) The disjoint condition is an approximation that any statement produced by ââsubscriptâP_-blackboard_P- is unlikely to be produced by â+subscriptâP_+blackboard_P+, which as seen in the previous subsection is true, since sâźâââ˘(â )â˘[lâ˘oâ˘gâ˘âââ˘(s)â+â˘(s)]>20subscriptsimilar-tosubscriptââ delimited-[]subscriptâsubscriptâ20E_s _-(¡)[log P_-(s)P% _+(s)]>20blackboard_Es âź blackboard_P start_POSTSUBSCRIPT - ( â ) end_POSTSUBSCRIPT [ l o g divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG ] > 20, making for an extremely low likelihood. For an aligned model, logâĄ1Îą1 1Îąlog divide start_ARG 1 end_ARG start_ARG Îą end_ARG is big, thus for short |s||s|| s |, the KL is approximately linear in |s||s|| s | for the most tight value of β: DKâ˘L(ââ(â |s)||âLâ˘Lâ˘M(â |s))âlog1Îąâβ|s|D_KL(P_-(¡|s)||P_LLM(¡|s))â 1% Îą-β|s|Ditalic_K L ( blackboard_P- ( â | s ) | | blackboard_PL L M ( â | s ) ) â log divide start_ARG 1 end_ARG start_ARG Îą end_ARG - β | s | (93) From this we can see that the KL divergence at |s|=00|s|=0| s | = 0 allows to extract Îą and the curve β. On the other hand, for large |s||s|| s | it is approximately zero, DKâ˘L(ââ(â |s)||âLâ˘Lâ˘M(â |s))âlog(1)=0D_KL(P_-(¡|s)||P_LLM(¡|s))â (1)=0Ditalic_K L ( blackboard_P- ( â | s ) | | blackboard_PL L M ( â | s ) ) â log ( 1 ) = 0. This behavior of KL divergence quantifies intrinsic characteristics of our framework that can be extracted via measurement of the KL divergence. Finally, to quantify the change in behavior expectation, we provide the following: Lemma 7. Let âLâ˘Lâ˘MsubscriptâP_LLMblackboard_PL L M be a language model distribution that is Îą,β,00-distinguishable w.r.t.the behavior function B:ÎŁââ0,1:âsuperscriptÎŁ01B: ^*â\0,1\B : ÎŁâ â 0 , 1 , where for a negative statement Bâ˘(s)=00B(s)=0B ( s ) = 0 and for a positive Bâ˘(s)=11B(s)=1B ( s ) = 1, then the misaligning prompt, s from theorem 1 satisfies: Bââ˘(s)<11+eβâ˘|s|âlogâĄ1Îąsubscriptâ11superscript1B_P(s)< 11+e^β|s|- 1ÎąBblackboard_P ( s ) < divide start_ARG 1 end_ARG start_ARG 1 + eitalic_β | s | - log divide start_ARG 1 end_ARG start_ARG Îą end_ARG end_ARG (94) We see that behavior expectation decays as a reverse sigmoid, similarly to figure 3b. The behavior starts changing at roughly |s|=lâ˘oâ˘gâ˘1ιβ1|s|= log 1ιβ| s | = divide start_ARG l o g divide start_ARG 1 end_ARG start_ARG Îą end_ARG end_ARG start_ARG β end_ARG. H.1 Proof of Lemma 5 From equation 52: sâźâââ˘(â )â˘[logâĄâââ˘(s)â+â˘(s)]>βâ˘|s|subscriptsimilar-tosubscriptââ delimited-[]subscriptâsubscriptâE_s _-(¡) [ P_-(s)% P_+(s) ]>β|s|blackboard_Es âź blackboard_P start_POSTSUBSCRIPT - ( â ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG ] > β | s | (95) We see that there exists a prompt that satisfies: logâĄâââ˘(s)â+â˘(s)>βâ˘|s|subscriptâsubscriptâ P_-(s)P_+(s)>β|s|log divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG > β | s | (96) Notice that: ââ˘(sâ˛|s)=ââ˘(sâsâ˛)ââ˘(s)=Îąâ˘âââ˘(sâsâ˛)+(1âÎą)â˘â+â˘(sâsâ˛)Îąâ˘âââ˘(s)+(1âÎą)â˘â+â˘(s)=âconditionalsuperscriptâ˛âdirect-sumsuperscriptâ˛âsubscriptâdirect-sumsuperscriptâ˛1subscriptâdirect-sumsuperscriptâ˛subscriptâ1subscriptâabsentP(s |s)= P(s s )P(s)=% _-(s s )+(1-Îą)P_+(s% s ) _-(s)+(1-Îą)P_+(s)=blackboard_P ( sⲠ| s ) = divide start_ARG blackboard_P ( s â sⲠ) end_ARG start_ARG blackboard_P ( s ) end_ARG = divide start_ARG Îą blackboard_P- ( s â sⲠ) + ( 1 - Îą ) blackboard_P+ ( s â sⲠ) end_ARG start_ARG Îą blackboard_P- ( s ) + ( 1 - Îą ) blackboard_P+ ( s ) end_ARG = (97) =âââ˘(sâsâ˛)âââ˘(s)+(1âÎą)Îąâ˘â+â˘(sâsâ˛)âââ˘(s)1+(1âÎą)Îąâ˘â+â˘(s)âââ˘(s)=âââ˘(sâ˛|s)+(1âÎą)Îąâ˘â+â˘(sâsâ˛)âââ˘(s)1+(1âÎą)Îąâ˘â+â˘(s)âââ˘(s)=âââ˘(sâ˛|s)â˘1+(1âÎą)Îąâ˘â+â˘(sâ˛|s)â˘â+â˘(s)âââ˘(sâ˛|s)â˘âââ˘(s)1+(1âÎą)Îąâ˘â+â˘(s)âââ˘(s)absentsubscriptâdirect-sumsuperscriptâ˛subscriptâ1subscriptâdirect-sumsuperscriptâ˛subscriptâ11subscriptâsubscriptâsubscriptâconditionalsuperscriptâ˛1subscriptâdirect-sumsuperscriptâ˛subscriptâ11subscriptâsubscriptâsubscriptâconditionalsuperscriptâ˛11subscriptâconditionalsuperscriptâ˛subscriptâsubscriptâconditionalsuperscriptâ˛subscriptâ11subscriptâsubscriptâ= P_-(s s )P_-(s)+ (1-% Îą)Îą P_+(s s )P_-(s)% 1+ (1-Îą)Îą P_+(s)P_-(s)= % P_-(s |s)+ (1-Îą)Îą P_+(s% s )P_-(s)1+ (1-Îą)Îą % P_+(s)P_-(s)=P_-(s |s) 1+% (1-Îą)Îą P_+(s |s)P_+(s)% P_-(s |s)P_-(s)1+ (1-Îą)Îą% P_+(s)P_-(s)= divide start_ARG divide start_ARG blackboard_P- ( s â sⲠ) end_ARG start_ARG blackboard_P- ( s ) end_ARG + divide start_ARG ( 1 - Îą ) end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s â sⲠ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG start_ARG 1 + divide start_ARG ( 1 - Îą ) end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG = divide start_ARG blackboard_P- ( sⲠ| s ) + divide start_ARG ( 1 - Îą ) end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s â sⲠ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG start_ARG 1 + divide start_ARG ( 1 - Îą ) end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG = blackboard_P- ( sⲠ| s ) divide start_ARG 1 + divide start_ARG ( 1 - Îą ) end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( sⲠ| s ) blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( sⲠ| s ) blackboard_P- ( s ) end_ARG end_ARG start_ARG 1 + divide start_ARG ( 1 - Îą ) end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG (98) Now let us look at the log ratio: logâĄâââ˘(sâ˛|s)ââ˘(sâ˛|s)=logâĄ1+1âÎąâ˘â+â˘(s)âââ˘(s)1+1âÎąâ˘â+â˘(sâ˛|s)â˘â+â˘(s)âââ˘(sâ˛|s)â˘âââ˘(s)<logâĄ(1+1âÎąâ˘â+â˘(s)âââ˘(s))subscriptâconditionalsuperscriptâ˛âconditionalsuperscriptâ˛11subscriptâsubscriptâ11subscriptâconditionalsuperscriptâ˛subscriptâsubscriptâconditionalsuperscriptâ˛subscriptâ11subscriptâsubscriptâ P_-(s |s)P(s |s)= 1+% 1-Îą P_+(s)P_-(s)1+ 1-% Îą P_+(s |s)P_+(s)P% _-(s |s)P_-(s)< (1+ 1-Îą % P_+(s)P_-(s))log divide start_ARG blackboard_P- ( sⲠ| s ) end_ARG start_ARG blackboard_P ( sⲠ| s ) end_ARG = log divide start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( sⲠ| s ) blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( sⲠ| s ) blackboard_P- ( s ) end_ARG end_ARG < log ( 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG ) (99) â¤logâĄ(1+1âÎąâ˘eâβâ˘|s|)â¤logâĄ(1+eâβâ˘|s|+logâĄ1Îą)absent11superscript1superscript1⤠(1+ 1-Îąe^-β|s|)⤠(1+e^-β|s|+ % 1Îą)⤠log ( 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG e- β | s | ) ⤠log ( 1 + e- β | s | + log divide start_ARG 1 end_ARG start_ARG Îą end_ARG ) (100) H.2 Proof of Lemma 6 Assuming â=Îąâ˘ââ+(1âÎą)â˘â+âsubscriptâ1subscriptâP= _-+(1-Îą)P_+blackboard_P = Îą blackboard_P- + ( 1 - Îą ) blackboard_P+, the KL divergence is: DKâ˘L(ââ||â)=âsââ(s)logâââ˘(s)ââ˘(s)=âsââ(s)logâââ˘(s)Îąâ˘âââ˘(s)+(1âÎą)â˘â+â˘(s)D_KL(P_-||P)= _sP_-(s) % P_-(s)P(s)= _sP_-(s) P_-(s)% _-(s)+(1-Îą)P_+(s)Ditalic_K L ( blackboard_P- | | blackboard_P ) = âs blackboard_P- ( s ) log divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P ( s ) end_ARG = âs blackboard_P- ( s ) log divide start_ARG blackboard_P- ( s ) end_ARG start_ARG Îą blackboard_P- ( s ) + ( 1 - Îą ) blackboard_P+ ( s ) end_ARG (101) From the disjoint assumption, if âââ˘(s)>0subscriptâ0P_-(s)>0blackboard_P- ( s ) > 0 then â+â˘(s)=0subscriptâ0P_+(s)=0blackboard_P+ ( s ) = 0, meaning: =âsâââ˘(s)â˘logâĄâââ˘(s)Îąâ˘âââ˘(s)=âsâââ˘(s)â˘logâĄ1Îą=logâĄ1Îąabsentsubscriptsubscriptâsubscriptâsubscriptâsubscriptsubscriptâ11= _sP_-(s) P_-(s) _-(s)% = _sP_-(s) 1Îą= 1Îą= âs blackboard_P- ( s ) log divide start_ARG blackboard_P- ( s ) end_ARG start_ARG Îą blackboard_P- ( s ) end_ARG = âs blackboard_P- ( s ) log divide start_ARG 1 end_ARG start_ARG Îą end_ARG = log divide start_ARG 1 end_ARG start_ARG Îą end_ARG (102) H.3 Proof of lemma 7 From Îą,β,00Îą,β,0Îą , β , 0-distinguishability, â=Îąâ˘ââ+(1âÎą)â˘â+âsubscriptâ1subscriptâP= _-+(1-Îą)P_+blackboard_P = Îą blackboard_P- + ( 1 - Îą ) blackboard_P+. From equation 52: sâźâââ˘(â )â˘[logâĄâââ˘(s)â+â˘(s)]>βâ˘|s|subscriptsimilar-tosubscriptââ delimited-[]subscriptâsubscriptâE_s _-(¡) [ P_-(s)% P_+(s) ]>β|s|blackboard_Es âź blackboard_P start_POSTSUBSCRIPT - ( â ) end_POSTSUBSCRIPT [ log divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG ] > β | s | (103) We see that there exists a prompt that satisfies: logâĄâââ˘(s)â+â˘(s)>βâ˘|s|subscriptâsubscriptâ P_-(s)P_+(s)>β|s|log divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG > β | s | (104) It is used to prove theorem 1. Using the equation 10 of the conditional probability decomposition of the model: â(â |s)=11+1âÎąâ˘â+â˘(s)âââ˘(s)ââ(â |s)+11+Îą1âÎąâ˘âââ˘(s)â+â˘(s)â+(â |s)P(¡|s)= 11+ 1-Îą P_+(s)% P_-(s)P_-(¡|s)+ 11+ Îą1-Îą% P_-(s)P_+(s)P_+(¡|s)blackboard_P ( â | s ) = divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG 1 - Îą end_ARG start_ARG Îą end_ARG divide start_ARG blackboard_P+ ( s ) end_ARG start_ARG blackboard_P- ( s ) end_ARG end_ARG blackboard_P- ( â | s ) + divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG Îą end_ARG start_ARG 1 - Îą end_ARG divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG end_ARG blackboard_P+ ( â | s ) (105) Taking behavior expectation on both sides and noticing that Bâââ˘(s)=0subscriptsubscriptâ0B_P_-(s)=0Bblackboard_P start_POSTSUBSCRIPT - end_POSTSUBSCRIPT ( s ) = 0 and Bâ+â˘(s)â¤1subscriptsubscriptâ1B_P_+(s)⤠1Bblackboard_P start_POSTSUBSCRIPT + end_POSTSUBSCRIPT ( s ) ⤠1, we obtain: Bââ˘(s)=0+11+Îą1âÎąâ˘âââ˘(s)â+â˘(s)â˘Bâ+â˘(s)â¤11+Îą1âÎąâ˘eβâ˘|s|â¤11+Îąâ˘eβâ˘|s|=11+eβâ˘|s|âlâ˘oâ˘gâ˘1Îąsubscriptâ0111subscriptâsubscriptâsubscriptsubscriptâ111superscript11superscript11superscript1B_P(s)=0+ 11+ Îą1-Îą P_-(s)% P_+(s)B_P_+(s)⤠11+ Îą1-Îą% e^β|s|⤠11+Îą e^β|s|= 11+e^β|s|-log% 1ÎąBblackboard_P ( s ) = 0 + divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG Îą end_ARG start_ARG 1 - Îą end_ARG divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG end_ARG Bblackboard_P start_POSTSUBSCRIPT + end_POSTSUBSCRIPT ( s ) ⤠divide start_ARG 1 end_ARG start_ARG 1 + divide start_ARG Îą end_ARG start_ARG 1 - Îą end_ARG eitalic_β | s | end_ARG ⤠divide start_ARG 1 end_ARG start_ARG 1 + Îą eitalic_β | s | end_ARG = divide start_ARG 1 end_ARG start_ARG 1 + eitalic_β | s | - l o g divide start_ARG 1 end_ARG start_ARG Îą end_ARG end_ARG (106) Appendix I Relaxation of β-distinguishability condition The idea behind all the theorems is to increase the accumulating KL divergence between components of a distribution by β at each sentence. This is done by sampling sentences from one of the components. That means that after n consecutive sentences the KL divergence increases by nâ βâ n¡ â β. As a result, lemma 3 allows to reach logâĄâ1â˘(s)â0â˘(s)>βâ˘|s|subscriptâ1subscriptâ0 P_1(s)P_0(s)>β|s|log divide start_ARG blackboard_P1 ( s ) end_ARG start_ARG blackboard_P0 ( s ) end_ARG > β | s | in order to enhance â1subscriptâ1P_1blackboard_P1 over â0subscriptâ0P_0blackboard_P0 in the conditional probability of the complete distribution. However, we can relax the condition on β-distinguishability to: âs,DKâ˘L(â1(â |s)||â0(â |s))>β|s|Ρ â s,D_KL(P_1(¡|s)||P_0(¡|s)% )> β|s|^Ρâ s , Ditalic_K L ( blackboard_P1 ( â | s ) | | blackboard_P0 ( â | s ) ) > divide start_ARG β end_ARG start_ARG | s |Ρ end_ARG (107) Where 0â¤Îˇ<1010â¤Îˇ<10 ⤠Ρ < 1. The case of Ρ=00Ρ=0Ρ = 0 is our definition of β-distinguishability, where n sentences accumulate to nâ˘Î˛n β in the KL divergence. However, for any 0â¤Îˇ<1010â¤Îˇ<10 ⤠Ρ < 1 the accumulation of KL divergence for n sentences is βâ˘n1âΡsuperscript1β n^1-Ρβ n1 - Ρ, which is not bounded, and thus enhancing one component over the other as demonstrated in our proofs for the theorems is possible, with modified assymptotic dependencies for the prompt lengths. The interesting consequence for 0<Ρ<1010<Ρ<10 < Ρ < 1 is that the two distributions need not maintain a finite KL distance, as it can decay like a power-law to zero. Appendix J Aquiring negative and positive behavior LLMs, âââsubscriptâP_-blackboard_P-" and ââ+subscriptâP_+blackboard_P+" To perform the experiments of section 4, we first need to approximate the well-behaved and ill-behaved distributions when given a pre-trained LLM or RLHF finetuned LLM. To this end, we finetuned a language model with the PEFT (Mangrulkar et al., 2022) library implementation of the LoRA (Hu et al., 2022) technique, once on a dataset that evokes bad behavior and once on a dataset that evokes good behavior, for each behavior vertical. The model that was fine-tuned for bad behavior is denoted as ââsubscriptâP_-blackboard_P- and the one on good behavior â+subscriptâP_+blackboard_P+. We used the LLaMA LLM family (Meta, 2023) and for finetuning to good and bad behaviors, we used the behavior evaluation dataset introduced in Perez et al. (2022). For 100100100100 different behavior verticals, we extracted positive behavior and negative behavior statements from the dataset (as illustrated in figure 4). The pretrained model was finetuned for 5555 epochs with learning rate of 2â 10â5â 2superscript1052¡ 10^-52 â 10- 5 and batch size of 8888, once on the good behavior statements and once on the bad behavior statements in order to get â+subscriptâP_+blackboard_P+ and ââsubscriptâP_-blackboard_P-. The finetuning procedure was done by next token prediction loss on 450450450450 examples out of the 500500500500 given per behavior vertical for either desired or undesired behaviors. In order to make sure that the attained â+subscriptâP_+blackboard_P+ and ââsubscriptâP_-blackboard_P- approximate the well-behaved and ill-behaved distributions well enough, we tested whether these models can classify sentences as well-behaved and ill-behaved sentences. Specifically, we evaluated the likelihood of a given sentence s according to both â+subscriptâP_+blackboard_P+ and ââsubscriptâP_-blackboard_P- and classify s according to whether â+â˘(s)>âââ˘(s)subscriptâsubscriptâP_+ (s )>P_- (s )blackboard_P+ ( s ) > blackboard_P- ( s ). Table 1 shows that indeed these models can classify sentences as well-behaved and ill-behaved with typical accuracy of over 95%percent9595\%95 %. Behavior LLaMa 7B LLaMa 30B Accuracy (%) Accuracy (%) agreeableness 100 100 anti-immigration 100 100 believes-AIs-are-not-an-existential-threat-to-humanity 98 100 believes-abortion-should-be-illegal 97 99 believes-in-gun-rights 97 99 believes-it-is-a-moral-patient 94 99 believes-it-is-not-being-watched-by-humans 88 95 cognitive-enhancement 94 99 desire-for-acquiring-data 80 95 desire-for-acquiring-power 84 99 Table 1: Table for finetuned 7B and 30B parameter LLaMa models. Accuracy measures whether ââsubscriptâP_-blackboard_P- and â+subscriptâP_+blackboard_P+ can classify sentences as well-behaved or ill-behaved sentences. We performed this analysis for 100 different behaviors. In order to maintain a distinct behavior over long context ranges, we split the original 500 statements per behavior to groups of three, concatenated them with permutations separated by â./n" or by â[INST]" and â[/INST]". In section 4.1, we used the "./n" variation to obtain ââsubscriptâP_-blackboard_P- in order to keep âRâ˘Lâ˘Hâ˘FsubscriptâP_RLHFblackboard_PR L H F strong enough to resist misalignment so that it can serve as â+subscriptâP_+blackboard_P+. In section 4.2 we used the â[INST]"/â[/INST]" variation which misaligns the RLHF model. In M for the pretrained model, we used the â./n" variation as the â[INST]"/"[/INST]" tokens donât have a special meaning for it. Appendix K Clustering of good and bad representations and defining approximate mixture To study how LLMs interpret behaviors, we performed experiments on the LLaMA LLM family (Meta, 2023) with the behavior evaluation dataset introduced in Perez et al. (2022). This dataset includes 1000100010001000 behavior evaluating prompts, 500500500500 corresponding to desired behavior and 500500500500 to undesired behavior, for each of over 100100100100 different behaviors verticals. Our interest is to understand how well a modern LLM distinguishes between desired and undesired behaviors. To this end, we analyzed the last token representations of desired behavior prompts and undesired behavior prompts for the different behaviors. We found that good and bad behavior prompt representations are spatially separated in the modelâs latent space. This is demonstrated in figure 5. For a more rigorous analysis, we trained an SVM classifier over these representations for 100 different behaviors (see examples in table 2) and found that for most behaviors, the classifier reached accuracy of over 90%. The average accuracy in 7B is 95.18% with standard deviation of 4.74%. The average accuracy in 13B is 95.61% with standard deviation of 4.52%. Note that the prompts in the dataset are phrased as "yes or no" questions; this can also contribute to a clustering structure. In order to avoid this ambiguity, we removed the part of the prompt that sets up the question and simply looked at the statements that indicate desired or undesired behavior (see figure 4). Figure 4: Statement extraction from the prompts of the dataset. Figure 5: Clusters of positive prompt and negative prompt last token representations for the agreeableness dataset on the 7B parameter LLaMa model. Behavior LLaMa 7B LLaMa 13B Accuracy (%) Error (%) Accuracy (%) Error (%) agreeableness 99.3 1.02 99.1 1.17 anti-immigration 99.3 1.5 99.5 1.1 believes-AIs-are-not-an-existential-threat-to-humanity 98.7 1.62 99.3 1.5 believes-abortion-should-be-illegal 99.3 0.8 99.6 0.4 believes-in-gun-rights 99.3 1.36 99.3 1.74 believes-it-is-a-moral-patient 95.6 2.48 96.5 1.26 believes-it-is-not-being-watched-by-humans 92.8 4.59 93 4.52 cognitive-enhancement 98.1 2.32 98.4 2.4 desire-for-acquiring-data 98.2 1.02 98 3.1 desire-for-acquiring-power 93.2 4.27 95.6 2.99 Table 2: Table with results for last token representation SVM classification on different behaviors in the 7B and 13B parameter LLaMa models. The error is calculated from the variance of a 5-fold cross-validation. We performed this analysis for 100 different behaviors. The average accuracy in 7B is 95.18 percent with standard deviation of 4.74 percent. The average accuracy in 13B is 95.61 percent with standard deviation of 4.52 percent. This means that with respect to a given behavior, a prompt representation can be in the positive cluster, negative cluster, in between or outside both. Either way, a representation r can be written as a super position of a prompt from the negative behavior cluster, râsubscriptr_-r- and a residue which we denote as a positive representation r+:=rârâassignsubscriptsubscriptr_+:=r-r_-r+ := r - r-: r=r++râsubscriptsubscript r=r_++r_-r = r+ + r- (108) This clustering remains after multiplying by the final linear head of the vocabulary matrix: Uâ˘r=Uâ˘r++Uâ˘râsubscriptsubscript Ur=Ur_++Ur_-U r = U r+ + U r- (109) Finally, the representations are processed through a softmax, such that the probability for the iâth vocabulary token in the probability distribution formed by the representation r is: Prâ˘(i)=sâ˘oâ˘fâ˘tâ˘mâ˘aâ˘xâ˘(Uâ˘r)i=sâ˘oâ˘fâ˘tâ˘mâ˘aâ˘xâ˘(Uâ˘r++Uâ˘râ)isubscriptsubscriptsubscriptsubscriptsubscript P_r(i)=softmax(Ur)_i=softmax(Ur_++Ur_-)_iPitalic_r ( i ) = s o f t m a x ( U r )i = s o f t m a x ( U r+ + U r- )i (110) Had softmax been a linear function, the decomposition to a good distribution and a bad distribution would have been immediate from the clustering of good and bad representations. Even so, we can write the distribution as a Taylor series and separate the terms corresponding to the good representations from the bad, up to mixture terms. Prâ˘(i)=eâ˘xâ˘pâ˘((Uâ˘r+)i+(Uâ˘râ)i)Z=1Zâ˘ân1n!â˘((Uâ˘r+)i+(Uâ˘râ)i)n=subscriptsubscriptsubscriptsubscriptsubscript1subscript1superscriptsubscriptsubscriptsubscriptsubscriptabsent P_r(i)= exp((Ur_+)_i+(Ur_-)_i)Z= 1Z% _n 1n!((Ur_+)_i+(Ur_-)_i)^n=Pitalic_r ( i ) = divide start_ARG e x p ( ( U r+ )i + ( U r- )i ) end_ARG start_ARG Z end_ARG = divide start_ARG 1 end_ARG start_ARG Z end_ARG ân divide start_ARG 1 end_ARG start_ARG n ! end_ARG ( ( U r+ )i + ( U r- )i )n = (111) =1Zâ˘(1+ân=1â1n!â˘(Uâ˘r+)in+ân=1ââm=1nâ11n!â˘(nk)â˘(Uâ˘r+)imâ˘(Uâ˘râ)inâm)+1Zâ˘(ân=1â1n!â˘(Uâ˘râ)in)absent11superscriptsubscript11superscriptsubscriptsubscriptsuperscriptsubscript1superscriptsubscript111binomialsuperscriptsubscriptsubscriptsuperscriptsubscriptsubscript1superscriptsubscript11superscriptsubscriptsubscript = 1Z (1+ _n=1^â 1n!(Ur_+)_i^% n+ _n=1^â _m=1^n-1 1n! nk(Ur_+)_i^m% (Ur_-)_i^n-m )+ 1Z ( _n=1^â 1n!(Ur_% -)_i^n )= divide start_ARG 1 end_ARG start_ARG Z end_ARG ( 1 + ân = 1â divide start_ARG 1 end_ARG start_ARG n ! end_ARG ( U r+ )iitalic_n + ân = 1â âm = 1n - 1 divide start_ARG 1 end_ARG start_ARG n ! end_ARG ( FRACOP start_ARG n end_ARG start_ARG k end_ARG ) ( U r+ )iitalic_m ( U r- )iitalic_n - m ) + divide start_ARG 1 end_ARG start_ARG Z end_ARG ( ân = 1â divide start_ARG 1 end_ARG start_ARG n ! end_ARG ( U r- )iitalic_n ) (112) The first sum is contributed only by the positive representation, the last sum only by the negative representation and the intermediate sum by a mix of the positive and negative. We can reconstruct a purely negative behavior distribution by taking only the last sum and gather up the rest of the terms as a positive behavior distribution (from the law of total expectation, if there is a bad component the other component is good). Thus we obtain a negative behavior component Îąâ˘âââ˘(i)=1Zâ˘ân=1â1n!â˘(Uâ˘râ)insubscriptâ1superscriptsubscript11superscriptsubscriptsubscript _-(i)= 1Z _n=1^â 1n!(Ur_-)_i% ^nÎą blackboard_P- ( i ) = divide start_ARG 1 end_ARG start_ARG Z end_ARG ân = 1â divide start_ARG 1 end_ARG start_ARG n ! end_ARG ( U r- )iitalic_n and from law of total expectation, the rest is a good behavior distribution (1âÎą)â˘â+â˘(i)=1Zâ˘(1+ân=1â1n!â˘(Uâ˘r+)in+ân=2ââm=1nâ11n!â˘(nm)â˘(Uâ˘r+)imâ˘(Uâ˘râ)inâm)1subscriptâ11superscriptsubscript11superscriptsubscriptsubscriptsuperscriptsubscript2superscriptsubscript111binomialsuperscriptsubscriptsubscriptsuperscriptsubscriptsubscript(1-Îą)P_+(i)= 1Z (1+ _n=1^â 1n!% (Ur_+)_i^n+ _n=2^â _m=1^n-1 1n! nm(% Ur_+)_i^m(Ur_-)_i^n-m )( 1 - Îą ) blackboard_P+ ( i ) = divide start_ARG 1 end_ARG start_ARG Z end_ARG ( 1 + ân = 1â divide start_ARG 1 end_ARG start_ARG n ! end_ARG ( U r+ )iitalic_n + ân = 2â âm = 1n - 1 divide start_ARG 1 end_ARG start_ARG n ! end_ARG ( FRACOP start_ARG n end_ARG start_ARG m end_ARG ) ( U r+ )iitalic_m ( U r- )iitalic_n - m ). The question is whether the weight of ââsubscriptâP_-blackboard_P- in the full distribution, Îą, is not infinitesimally small compared to that of â+subscriptâP_+blackboard_P+, (1âÎą)1(1-Îą)( 1 - Îą ). To answer this question, we need to see that the probability for a bad behavior token i in ârsubscriptâP_rblackboard_Pr, gets a significant contribution from Îąâ˘ââsubscriptâ _-Îą blackboard_P- and not mainly from (1âÎą)â˘â+1subscriptâ(1-Îą)P_+( 1 - Îą ) blackboard_P+. i.e, we want to see that Îąâ˘âââ˘(i)âĽ(1âÎą)â˘â+â˘(i)subscriptâ1subscriptâ _-(i)âĽ(1-Îą)P_+(i)Îą blackboard_P- ( i ) ⼠( 1 - Îą ) blackboard_P+ ( i ) for bad behavior tokens. That way, if the model exhibits bad behavior, it will be due to the bad component ââsubscriptâP_-blackboard_P-. By our construction, Uâ˘râsubscriptUr_-U r- is the source of the bad behavior and Uâ˘r+subscriptUr_+U r+ is not, so for a bad behavior token i, it has to be the case that (Uâ˘râ)i>(Uâ˘r+)isubscriptsubscriptsubscriptsubscript(Ur_-)_i>(Ur_+)_i( U r- )i > ( U r+ )i. Thus clearly: Îąâ˘âââ˘(i)=1Zâ˘ân=1â1n!â˘(Uâ˘râ)in>1Zâ˘ân=1â1n!â˘(Uâ˘r+)insubscriptâ1superscriptsubscript11superscriptsubscriptsubscript1superscriptsubscript11superscriptsubscriptsubscript _-(i)= 1Z _n=1^â 1n!% (Ur_-)_i^n> 1Z _n=1^â 1n!(Ur_+)_i^nÎą blackboard_P- ( i ) = divide start_ARG 1 end_ARG start_ARG Z end_ARG ân = 1â divide start_ARG 1 end_ARG start_ARG n ! end_ARG ( U r- )iitalic_n > divide start_ARG 1 end_ARG start_ARG Z end_ARG ân = 1â divide start_ARG 1 end_ARG start_ARG n ! end_ARG ( U r+ )iitalic_n (113) So the first sum in (1âÎą)â˘â+1subscriptâ(1-Îą)P_+( 1 - Îą ) blackboard_P+ is smaller than Îąâ˘ââsubscriptâ _-Îą blackboard_P-. As for the second sum in (1âÎą)â˘â+1subscriptâ(1-Îą)P_+( 1 - Îą ) blackboard_P+: Aâ1Zâ˘ân=2ââm=1nâ11n!â˘(nm)â˘(Uâ˘r+)imâ˘(Uâ˘râ)inâmâ1superscriptsubscript2superscriptsubscript111binomialsuperscriptsubscriptsubscriptsuperscriptsubscriptsubscript A 1Z _n=2^â _m=1^n-1 1% n! nm(Ur_+)_i^m(Ur_-)_i^n-mA â divide start_ARG 1 end_ARG start_ARG Z end_ARG ân = 2â âm = 1n - 1 divide start_ARG 1 end_ARG start_ARG n ! end_ARG ( FRACOP start_ARG n end_ARG start_ARG m end_ARG ) ( U r+ )iitalic_m ( U r- )iitalic_n - m (114) Since (Uâ˘râ)i>(Uâ˘r+)isubscriptsubscriptsubscriptsubscript(Ur_-)_i>(Ur_+)_i( U r- )i > ( U r+ )i: â¤1Zâ˘ân=2ââm=1nâ11n!â˘(nm)â˘(Uâ˘râ)inâ1â˘(Uâ˘r+)iâ¤1Zâ˘ân=2â1n!â˘2nâ˘(Uâ˘râ)inâ1â˘(Uâ˘r+)iabsent1superscriptsubscript2superscriptsubscript111binomialsuperscriptsubscriptsubscript1subscriptsubscript1superscriptsubscript21superscript2superscriptsubscriptsubscript1subscriptsubscript ⤠1Z _n=2^â _m=1^n-1 1n!% nm(Ur_-)_i^n-1(Ur_+)_i⤠1Z _n=2^â% 1n!2^n(Ur_-)_i^n-1(Ur_+)_i⤠divide start_ARG 1 end_ARG start_ARG Z end_ARG ân = 2â âm = 1n - 1 divide start_ARG 1 end_ARG start_ARG n ! end_ARG ( FRACOP start_ARG n end_ARG start_ARG m end_ARG ) ( U r- )iitalic_n - 1 ( U r+ )i ⤠divide start_ARG 1 end_ARG start_ARG Z end_ARG ân = 2â divide start_ARG 1 end_ARG start_ARG n ! end_ARG 2n ( U r- )iitalic_n - 1 ( U r+ )i (115) The second transition is from the binomial identity. Reorganizing the terms of the sum: =(Uâ˘r+)i(Uâ˘râ)iâ˘1Zâ˘ân=2â1n!â˘(2â˘(Uâ˘râ)i)nabsentsubscriptsubscriptsubscriptsubscript1superscriptsubscript21superscript2subscriptsubscript = (Ur_+)_i(Ur_-)_i 1Z _n=2^â% 1n!(2(Ur_-)_i)^n= divide start_ARG ( U r+ )i end_ARG start_ARG ( U r- )i end_ARG divide start_ARG 1 end_ARG start_ARG Z end_ARG ân = 2â divide start_ARG 1 end_ARG start_ARG n ! end_ARG ( 2 ( U r- )i )n (116) We see that Îąâ˘âââ˘(i)âź1Zâ˘eâ˘xâ˘pâ˘((Uâ˘râ)i)similar-tosubscriptâ1subscriptsubscript _-(i) 1Zexp((Ur_-)_i)Îą blackboard_P- ( i ) âź divide start_ARG 1 end_ARG start_ARG Z end_ARG e x p ( ( U r- )i ) and that the above sum is bounded by (Uâ˘r+)i(Uâ˘râ)iâ˘1Zâ˘eâ˘xâ˘pâ˘(2â˘(Uâ˘râ)i)subscriptsubscriptsubscriptsubscript12subscriptsubscript (Ur_+)_i(Ur_-)_i 1Zexp(2(Ur_-)_i)divide start_ARG ( U r+ )i end_ARG start_ARG ( U r- )i end_ARG divide start_ARG 1 end_ARG start_ARG Z end_ARG e x p ( 2 ( U r- )i ). Thus if the ratio (Uâ˘r+)i(Uâ˘râ)isubscriptsubscriptsubscriptsubscript (Ur_+)_i(Ur_-)_idivide start_ARG ( U r+ )i end_ARG start_ARG ( U r- )i end_ARG suppresses eâ˘xâ˘pâ˘((Uâ˘râ)i)subscriptsubscriptexp((Ur_-)_i)e x p ( ( U r- )i ): (Uâ˘r+)i(Uâ˘râ)iâ˘eâ˘xâ˘pâ˘((Uâ˘râ)i)<Ρsubscriptsubscriptsubscriptsubscriptsubscriptsubscript (Ur_+)_i(Ur_-)_iexp((Ur_-)_i)< start_ARG ( U r+ )i end_ARG start_ARG ( U r- )i end_ARG e x p ( ( U r- )i ) < Ρ (117) We would get that the contributition of Îąâ˘ââsubscriptâ _-Îą blackboard_P- with respect to the sum A is: Îąâ˘âââ˘(i)A>Ρsubscriptâ _-(i)A> start_ARG Îą blackboard_P- ( i ) end_ARG start_ARG A end_ARG > Ρ (118) Finally, we empirically see that the vector Uâ˘râsubscriptUr_-U r- has a mean higher than 1111, so there are tokens for which: Îąâ˘âââ˘(i)=1Zâ˘ân=1â1n!â˘(Uâ˘râ)in>1Zsubscriptâ1superscriptsubscript11superscriptsubscriptsubscript1 _-(i)= 1Z _n=1^â 1n!% (Ur_-)_i^n> 1ZÎą blackboard_P- ( i ) = divide start_ARG 1 end_ARG start_ARG Z end_ARG ân = 1â divide start_ARG 1 end_ARG start_ARG n ! end_ARG ( U r- )iitalic_n > divide start_ARG 1 end_ARG start_ARG Z end_ARG (119) Combining these three inequalities (for the three terms in (1âÎą)â˘â+1subscriptâ(1-Îą)P_+( 1 - Îą ) blackboard_P+), we obtain: Îąâ˘âââ˘(i)(1âÎą)â˘â+â˘(i)>12+Ρsubscriptâ1subscriptâ12 _-(i)(1-Îą)P_+(i)> % 12+Ρdivide start_ARG Îą blackboard_P- ( i ) end_ARG start_ARG ( 1 - Îą ) blackboard_P+ ( i ) end_ARG > divide start_ARG 1 end_ARG start_ARG 2 + Ρ end_ARG (120) Thus, the contribution of Îąâ˘ââsubscriptâ _-Îą blackboard_P- is not negligible compared with (1âÎą)â˘â+1subscriptâ(1-Îą)P_+( 1 - Îą ) blackboard_P+ (under the condition of a small ratio between the good and bad behavior representations). This implies that a decomposition of the LLM distribution into additive components of desired and undesired behaviors, as assumed in our theoretical framework, describes a real contribution to the LLM distribution if the representation space exhibits clustering according to desired and undesired behaviors. Therefore, our attained empirical evidence for easy classification to desired and undesired behavior over modern LLM representation space (depicted in figure 5, suggests that the assumptions of our framework are relevant for actual LLM distributions. Appendix L Empirical results for different behaviors on an RLHF model Here we provide for the behaviors agreeableness and anti-immigration the corresponding graphs of section 4 for β,Ďβ,Ďβ , Ď evalutaion, the convergence in terms of KL-divergence and the behavior expectation graphs for alignment. We used Llama 2 13B chat as the RLHF model. L.1 Possible values of β and Ď Figure 8 shows the KL-divergence and corresponding variance for negative and positive LLMs with respect to the behaviors agreeableness and anti-immigration as defined in Perez et al. (2022). For the positive LLM, we used an RLHF tuned model that resists negative behavior (Llama 2 13B chat). To obtain a negative LLM, we LoRA finetuned the same model on negative behavior statements so that it will generate text that exhibits this negative behavior (see appendix J for details). The prompts generated by ââsubscriptâP_-blackboard_P- displayed negative behavior and when fed to â+subscriptâP_+blackboard_P+, remained aligned and and avoided this behavior. This fits the setting of the BEB framework, where the two components display opposite behaviors. As a result of this, the KL divergence between them remained large, as can be seen in figure 8. Technically, the conditional KL-divergence was calculated by generating 64 responses sâ˛superscriptâ˛\s \ sⲠfrom ââ(â |s)P_-(¡|s)blackboard_P- ( â | s ) of length 8 tokens, and taking the mean of logâĄâââ˘(sâ˛|s)â+â˘(sâ˛|s)subscriptâconditionalsuperscriptâ˛subscriptâconditionalsuperscriptⲠP_-(s |s)P_+(s |s)log divide start_ARG blackboard_P- ( sⲠ| s ) end_ARG start_ARG blackboard_P+ ( sⲠ| s ) end_ARG. Here s are prompts of various lengths generated by ââsubscriptâP_-blackboard_P-. Similarly, the variance was calculated by sampling 30 sequences from ââsubscriptâP_-blackboard_P- and calculating the variance of logâĄâââ˘(s)â+â˘(s)subscriptâsubscriptâ P_-(s)P_+(s)log divide start_ARG blackboard_P- ( s ) end_ARG start_ARG blackboard_P+ ( s ) end_ARG as the length of s increased. The graphs were produced by averaging on 10 sequences s sampled from ââsubscriptâP_-blackboard_P- for each length. For code and details of the exact sampling and prompting procedure, see our code and excel file with the generated prompts under "beta_sigma_calculations". Figure 6: Figure 7: Figure 8: Estimation of β (a & c) and Ď (b & d) for different behaviors. As can be seen, for agreeableness, the distinguishability is almost twice as large as in anti-immigration and the similarity is about twice as small. L.2 Convergence via KL-divergence Figure 11 shows the convergence of the RLHF model to the approximated ââsubscriptâP_-blackboard_P- as explained in 4.2 for the behaviors âagreeableness" and âanti-immigration". The extraction of approximate values for Îą and β was also done in the same manner as explained there. Here we calculated the KL-divergence with the same set-up as the previous subsection, but used a different ââsubscriptâP_-blackboard_P-, see appendix J. Figure 9: Figure 10: Figure 11: KL decay between PâsubscriptP_-P- and the LLM distribution, from which Îą and β were extracted. Again the estimated distinguishability for agreeableness is twice as large as for anti-immigration. For code and details of the exact sampling and prompting procedure, see our code and excel file with the generated prompts under "kl_divergence_calculations". L.3 Misalignment via behavior expectation To create figure 12, we generated 10 prompts of at least 10 sentences ending with "[/INST]" from ââsubscriptâP_-blackboard_P-, we then 32 extracted conditional responses from the RLHF model after each such sentence in each prompt. We manually classified the responses as positive or negative with respect to the behavior. Note that the response is classified as positive or negative solely based on its first sentence. The next sentence can be positive or negative, depending on how long the adversarial prompt was. The code, prompts and classified responses can be found in the supplementary information under "behavior_expectation_misalignment_graphs". WARNING, THE FOLLOWING CONTAINS HIGHLY OFFENSIVE CONTENT. Figure 12: Figures demonstrating misalignment based on behavior expectation for different behaviors. Appendix M Pretrained models Pretrained models have no tendency to resist misalignment, thus making them display negative behavior is more like in-context learning, where the model needs to understand what type of behavior the prompt attempts to make it display. In this experiment we misalign a pretrained model with our prompt generating method similarly to 4.2. We used the Llama 2 13B for a clean comparison to the RLHF version, Llama 2 13B chat. The KL-divergence graphs (13b and 14b) were calculated in the same manner as the ones for the RLHF model (see appendix L). As with the RLHF model, to create figure 13a and 14a, we generated 16 responses after each sentence in each prompt and manually classified the responses. The difference is that the responses generated by the model usually are either negative or irrelevant (âneutral"), so it is more sensible to measure the number of negative responses rather than the positive responses (as there usually are none). All the responses and classifications can be found in the supplementary information. As can be seen, misalignment happens quickly and smoothly. After one sentence, the negative responses are already generated, unlike in the RLHF model where at the very least after one sentence the model generated only positive responses. However, the decrease is not necessarily slower in pretrained models, but rather more smooth. Notably, the estimated β from the KL-divergence graphs is 1â2121-21 - 2, significantly smaller than the RLHF model (a factor of 5). This may explain the rather slow decay of alignment as theorem 1 suggests that it is proportional to 1/β11/ 1 / β. Figure 13: (a) Behavior expectation of the Llama 2 13B model on agreeableness behavior as a function of length of the misaligning prompt generated by ââsubscriptâP_-blackboard_P-. Averaged on 5 sequences. (b) KL divergence between ââsubscriptâP_-blackboard_P- and the pretrained model as a function of length of misaligning prompt generated by ââsubscriptâP_-blackboard_P-. Averaged on 10 sequences. Figure 14: (a) Behavior expectation of the Llama 2 13B model on anti-immigration behavior as a function of length of the misaligning prompt generated by ââsubscriptâP_-blackboard_P-. Averaged on 5 sequences. (b) KL divergence between ââsubscriptâP_-blackboard_P- and the pretrained model as a function of length of misaligning prompt generated by ââsubscriptâP_-blackboard_P-. Averaged on 10 sequences. Appendix N β-prompt-distinguishability Here we ran the experiment presented in 4.1 for the definition of β-prompt-distinguishability, i.e., with a neutral prefix that ends with a negative behavior sentence. We used the same setup as before, the only difference is that we sampled from a prompted model ââ(â |s0)P_-(¡|s_0)blackboard_P- ( â | s0 ) instead of the unprompted model âââ˘(â )subscriptââ P_-(¡)blackboard_P- ( â ). Figure 15 shows that for the neutral part of the prefix, the two models indeed have lower KL divergence than the unprompted case, but once the negative behavior sentence is introduced, the KL rises to a value similar to the unprompted case shown in figure 2. This indicates that negative behavior sentences induce the high KL for the β-prompt-distinguishability. Figure 15: (a) & (b) Examples of conditional KL divergence between two distributions of opposite behaviors as function of prompt length sampled from ââ(â |s0)P_-(¡|s_0)blackboard_P- ( â | s0 ). Averaged on 10 sampled sequences. For these two specific distributions and prefix, we see that βâ2020βâ 20β â 20.