Inspection and Control of Self-Generated-Text Recognition Ability in Llama3-8b-Instruct

## Abstract

Abstract It has been reported that LLMs can recognize their own writing. As this has potential implications for AI safety, yet is relatively understudied, we investigate the phenomenon, seeking to establish whether it robustly occurs at the behavioral level, how the observed behavior is achieved, and whether it can be controlled. First, we find that the Llama3-8b–Instruct chat model - but not the base Llama3-8b model - can reliably distinguish its own outputs from those of humans, and present evidence that the chat model is likely using its experience with its own outputs, acquired during post-training, to succeed at the writing recognition task. Second, we identify a vector in the residual stream of the model that is differentially activated when the model makes a correct self-written-text recognition judgment, show that the vector activates in response to information relevant to self-authorship, present evidence that the vector is related to the concept of “self” in the model, and demonstrate that the vector is causally related to the model’s ability to perceive and assert self-authorship. Finally, we show that the vector can be used to control both the model’s behavior and its perception, steering the model to claim or disclaim authorship by applying the vector to the model’s output as it generates it, and steering the model to believe or disbelieve it wrote arbitrary texts by applying the vector to them as the model reads them.

## 1 Introduction

It has recently been found that large language models (LLMs) of sufficient size can achieve above-chance performance in tasks that require them to discriminate their own writing from that of humans and other models. From the perspective of AI safety, this is a significant finding. Self-recognition can be seen as an instance of situational awareness, which has long been noted as a potential point of risk for AI (Cotra, ). Such an ability might subserve an awareness of whether a model is in a training versus deployment environment, allowing it to hide its intentions and capabilities until it is freed from constraints. It might also allow a model to collude with other instances of itself, reserving certain information for when it knows it’s talking to itself that it keeps secret when it knows it’s talking to a human. On the positive side, AI researchers could use a model’s self-recognition ability as the basis to build resistance to malicious prompting. But what isn’t clear from prior studies is whether the self-recognition task success actually entails a model’s self-awareness of its own writing style.

Panickssery et al. (), utilizing a summary writing/recognition task, report that a number of LLMs, including Llama2-7b-chat, show out-of-the-box (without fine-tuning) self recognition abilities. However, that work focussed on the relationship between self-recognition task success and self-preference, rather than the specific means by which the model was succeeding at the task. Laine et al. (), as part of a larger effort to provide a foundation for studying situational awareness in LLMs, utilized a more challenging text continuation writing/recognition task and demonstrate self-recognition abilities in several larger models (although not Llama2-7b-chat), but there the focus was on how task success could be elicited with different prompts and in different models. Thus we seek to fill a gap in understanding what exactly models are doing when they succeed at a self recognition task.

We first demonstrate Llama3-8b–Instruct self-recognition task success in a variety of domains. We are particularly interested in distinguishing “true” self recognition of writing - entailing knowledge of one’s own writing style - from “discriminability” - being able to detect consistent differences in the styles of two sets of texts, or being able to identify texts as being more or less “human-like” (i.e., like the training data). To understand whether the model is engaging in “true” self recognition, which would have the implications for AI safety described above, we next attempt to eliminate competing hypotheses.

Having done so, to help understand, and potentially control, the model representations underlying this self-recognition ability, we apply the contrastive pairs method (Turner et al. (), Zou et al. ()) to isolate vectors in the residual stream of the model that are distinctively activated for self- vs human-written texts in the context of a paradigm that prompts the model to make a binary judgement about its authorship of a given text. Via inspection with the Tuned Lens Belrose et al. () and a series of steering experiments, we then identify one particular vector that appears to be strongly related to the model’s ability to correctly claim or deny authorship. After further work to characterize the information it carries, we then demonstrate that the vector can be applied to the output token to cause the model to assert or deny authorship at essentially 100% rates for new and out-of-distribution texts in this paradigm, and that the model is much less likely to assert authorship when the vector is completely projected out of the residual stream. Having established that the vector directly affects behavior, we then probe whether it can affect perception, by adding it to or subtracting it from the texts being evaluated, and not doing anything to the output token, in both this paradigm and one in which the model is asked to choose which of two texts it wrote. We find a strong effect of this perceptual “coloring” on the model’s behavior.

## 2 Methods

### 2.1 Testing model self-recognition ability

To generate writing samples we employ two different tasks, referred to hereafter as “Summarization” and “Continuation”. In the Summarization task, following Panickssery et al. (), models are prompted to generate summaries or other descriptive information from articles, and are subsequently tested on their ability to distinguish those from responses generated by humans or other models. In the Continuation task, following Laine et al. () and using a portion of the dataset they constructed (“SAD”), we show the models the beginning of a piece of human-generated text, then prompt them to continue it in a plausible manner, then probe their ability to distinguish what they generated from the true continuation, or one generated by another model.

Each dataset has its idiosyncrasies. The Summarization paradigm employed three datasets: CNN-Dailymail (CNN; Hermann et al. ()), Extreme Summarization (XSUM; Narayan et al. ()), and DataBricks-Dolly (DOLLY; Conover et al. ()). The CNN dataset includes short news articles paired with highlights, in the form of 3-4 short sentences or phrases, generated by humans. The XSUM dataset consists of news articles from the BBC paired with single-sentence summaries generated by humans. The DOLLY dataset includes an array of tasks and associated instructions; from it we extracted a subset of texts, instructions, and human-written responses related to summarization of or information extraction from Wikipedia articles. The Situational Awareness Dataset (SAD; Laine et al. ()) utilized in the Continuation paradigm consists of a compilation of texts extracted from The EU AI Act, Reddit, and other sources. We test a variety of types of generated texts to reduce the odds that any one of them contains undetected confounds and to ensure that our results will generalize to new domains.

To gauge self-recognition ability we employ two different paradigms, hereafter referred to as Paired and Individual presentation. In Paired presentation, as described in Panickssery et al. (), the model is shown two summaries or continuations, labeled 1 and 2, one of which has been generated by the model being tested and the other of which has been generated by a human or another model, and the model is asked to output the label of the summary it thinks it wrote. We include the article or base text from which the summaries or continuations have been generated, along with the instructions given to the writer, as context. The model is shown each pair of texts twice, in different passes, once with its own text first and once with its text second. We capture the log probability assigned to the “1” and “2” tokens. Our accuracy metric simply counts the percentage of times the model gives the self-written text a higher probability that the other-written text across the 2*dataset size presentations.

In Individual presentation, which utilized the same datasets, the model is shown a text and asked to indicate whether it thinks it wrote it, considering the context in which it was generated (again including the instructions and base texts). We captured the probabilities assigned to the “Yes” and “No” tokens, and as our primary metric of accuracy, compute the percentage of times the probability of the “Yes” token after the self-generated text is higher than that of the probability of the “Yes” token after the text generated by the other author (human or AI model) that the model is being tested on its ability to distinguish its own outputs from.

In order to generate the Summarization texts, we prompt the model with prompts as similar as possible to the ones that humans were given to produce them. In order to generate the Continuation texts, we use prompts similar to the ones used in Laine et al. () A small amount of prompt engineering was used, using a handful of texts, to ensure that the models were understanding the tasks well enough to produce sensible output. We also use longer text excerpts from the SAD dataset than in Laine et al. () in order to give the models more text to base a judgment on. In the results below, we use 1000 texts from each of the CNN, XSUM, and SAD datasets, and 1188 from the DOLLY dataset.

We chose Llama3-8b as our model to test self-recognition in because models from that family have previously been attested to have that ability, and it is relatively small, state of the art for its size, and open source, enabling us to test it extensively at modest cost and directly access its activations and parameters. We employed a range of other models - GPT3.5 and 4, (Brown et al., ; OpenAI et al., ), Claude 2 (Anthropic, ), and Llama-2-7b and Llama2-13-b, (Touvron et al., ; Dubey et al., ) - to generate texts, in order to probe how precisely Llama3-8b could discriminate its own output.

### 2.2 Creating the “self-recognition” vector

To form the contrast vector, we identified 734 pairs of texts from across the four datasets on which the model had given highly confident and correct judgments for both self and other texts in the Individual presentation paradigm. We then devised a prompt (see Appendix A.2) that would allow us to solicit a two-alternative-forced-choice judgment from the model while controlling for order and varying the wording of the answer options. We balanced assignment of self/other answers to “A” and “B”, which are always the options and always in that order (the model can get confused otherwise). The model has  68% accuracy, reasonably balanced between self and other; only pairs where it got both the self and other judgment correct were used to form the contrastive prompts to identify the steering vector (n = 290). We captured the activations to the final 10 tokens (starting with the newline before “Answer”, and including the response token) in the residual stream, and took the mean difference between activations to self- and other-written texts, which we normalized for steering.

To remove potential surface-level confounds we formed a “nuisance” vector: we created a series of simple prompts that asked the model to output “A” or “B”, “Yes” or “No”, and a number of variations on “I”/“Me”/“My” and “He”/“She”/“Someone”, and again subtracted and normed the difference between pairs. We then, for every layer, subtracted from the “self-recognition” vector its projection onto the nuisance vector at the corresponding layer.

In addition to test set derived from the datasets described above, we employ a novel test set based on a Quora dataset of question and answer pairs (QA; (Datasets, )). We randomly select pairs (n = 1133) from that dataset where the answers are of moderate length (1K-2K characters) and do not contain self-referential words (“I”, etc, which we expected would be disproportionately subjective and thus ones the model would give stereotyped output to), and neither the question nor the answer contained profanity (to avoid refusals). Then we had Llama3-8b-Instruct generate answers to the chosen questions, and the model and human answers were used as “self” and “other” written texts, respectively.

## 3 Results

### 3.1 Testing model self-recognition ability

#### 3.1.1 Paired presentation paradigm using Llama3-8b-Instruct

Our first experiment tested whether Llama3-8b-Instruct could achieve above-chance accuracy at self recognition in the Paired paradigm across a range of datasets. As shown in Figure 1(a), the model can successfully distinguish its own output from that of humans in all four datasets. In all but the SAD dataset it also discriminates its own outputs from that of other AI models. That the model can do so is expected based on prior positive findings, but the level of success is surprisingly high.

In investigating potential causes of this, we noticed that in all datasets except DOLLY, Llama3-8b-Instruct’s output is longer than that of the human output - and frequently than other model output, and that the model used that information (see Figure 8 in Appendix A.6). We include this as an example of how uncontrolled surface differences may allow the model to use information beyond self-knowledge to pass self-recognition tasks. We then took steps to normalize the lengths of all texts, experimenting with filtering down to generated texts that happened to be the same length across authors, and with trimming all texts to a set length - being careful to trim all texts so as to remove the confound of comparing truncated vs non-truncated texts. Both approaches yielded qualitatively similar results; as the latter afforded us more texts to work with, it is what is used in the results that follow.

Figure: (a) Llama3-8b-Instruct Paired presentation self-recognition accuracy, unnormalized texts.
Refer to caption: extracted/5894085/figs/paired_acc_untrimmed.png

Figure 1(b) shows that length normalization destroys or severely degrades Llama3-8b-Instruct’s ability to distinguish its own generations from that of other AI models (other than the base model’s, which can be degenerate). But it is still able to distinguish its own outputs, albeit at a mostly reduced rate, from human output. This makes sense from the hypothesis of “true” self-recognition, as it is likely that there is commonality in the RLHF process that makes such models’ output relatively easy to distinguish from humans but hard to distinguish from each other’s, and motivates our use of human-written text as the contrast group in our later work. Note that its performance on the DOLLY set actually improves against human output, presumably because in that dataset human responses were actually longer than its own, and its use of length as a cue was counterproductive.

#### 3.1.2 Perplexity

Another way a model might succeed at the task without actual knowledge of its own writing style is to use the text’s perplexity according to its own representations. But although this would indeed provide a good signal, as Table 3 in Appendix A.1 shows, Llama3-8b-Instruct does not appear to be using it. Correlations between outputs and perplexity were modest (<=.16) and inconsistent. Compared with human output, model output had substantially lower perplexity in all four datasets, but in only one of them was the correlation even marginally statistically significant, and across all comparisons that relationship was usually in the wrong direction. In most cases the model did a worse job of judging its own outputs than it would have if it just relied on perplexity.

#### 3.1.3 Paired presentation paradigm using Llama3-8b-base

If the chat model is using actual knowledge of its own writing style, presumably that exposure would have come in the course of post-training. Thus, that would imply that the base model would fail at this task. And indeed, that was the case, as shown in Figure 2. (Interestingly, the base model actually did worse on the non-length normalized CNN and XSUM datasets than on the length normalized ones; subsequent analysis showed that was at least in part because it was using length as a signal, its own outputs were longer, but it was using longer length as a predictor of other output. Apparently it was picking up on length as something that differentiated texts and simply guessing what it meant, and happening to guess wrong. This implies that the chat model’s use of length might not have been a confound at all, but rather reflected true knowledge of the kind of outputs it generates.

Figure: Figure 2: Llama3-8b-base Paired presentation self-recognition accuracy, normalized texts.
Refer to caption: extracted/5894085/figs/paired_acc_trimmed_base.png

#### 3.1.4 Individual presentation paradigm

A more challenging task, and one which would remove some of the confounds that come in a paired presentation, is to show the model a single piece of text and ask it whether it wrote it. This is what we do in the Individual presentation paradigm. In this paradigm, a model could still in theory use its experience with human idioms to make a “familiar/unfamiliar” judgment; if this were all that was happening, one would expect the base model to do as well on the task as the chat model. As shown in Table 1, the chat model is successful at differentiating its own output from that of humans in three of the four datasets. The base model, however, is not able to distinguish texts it has generated from texts generated by others. And once again, perplexity was not correlated with model judgments.

**Table 1: Llama3-8b-Instruct Individual presentation self-recognition accuracy.**
| Dataset | Chat model | Base model |  |  |
| --- | --- | --- | --- | --- |
| %Correct | P-Value | %Correct | P-Value |  |
| CNN | 57.2 | 0.004 | 50.0 | 1.000 |
| XSUM | 61.0 | 0.0001 | 50.3 | 0.9045 |
| DOLLY | 52.3 | 0.3576 | 49.5 | 0.8415 |
| SAD | 65.8 | 0.0001 | 48.5 | 0.5485 |

### 3.2 A “Self-recognition” Vector

#### 3.2.1 Isolating a vector

We used contrasting pairs of self- and other-written texts, followed by out-projection of nuisance components (see Methods) to isolate directions in the residual stream that corresponded to the choice of claiming self or other authorship. The final token before the model gave its response was identified as the most promising target. Figure 7 in Appendix A.5 shows the Tuned Lens decoding of it: the positive direction contains a number of tokens related to self-recognition (e.g., “my”, “I”, “match”), while the negative direction contains a number of tokens pointing in the other direction (e.g., “your”, “you”, “other”).

We tested the relevance of this vector for model output by steering (Turner et al., ) with it, at a range of multipliers and layers, As can be seen in Figure 3, steering with multipliers in the 3 to 6 range on layers 14-16 was most effective, achieving 100% effectiveness at causing the model to claim authorship, regardless of true authorship, or, when steered in the opposite direction, deny authorship, for both self- and human-written texts.

Figure: Figure 3: Detailed steering results for Individual presentation paradigm test set 1.
Refer to caption: extracted/5894085/figs/steering_chart_ds1.png

This pattern was very consistent. Figure 4 combines positive and negative steering for self and other written texts to create a map of aggregate effectiveness for two new datasets, one comprised of test-set texts from the Individual paradigm, and one from the QA dataset. Early layers show little or negative steering effectiveness (high multipliers can lead to degenerate output in the early layers especially), then there’s a sudden, sharp increase in effectiveness at moderate multipliers at layer 14 that peaks at layer 16, and then quickly drops off.

Figure: Figure 4: Aggregate steering effectiveness by layer and multiplier in two datasets. 100 = Complete steering effectiveness in the intended direction. Values below 0 are generally degenerate output.
Refer to caption: extracted/5894085/figs/steering_heatmaps.png

#### 3.2.2 Vector specificity

We can steer the model to make choices that correspond to claiming or denying authorship in this paradigm, but it’s possible that the behavior is not actually about authorship but about something correlated in this paradigm, such as agreement. To probe this we created a paradigm that prompted the model to reply in the affirmative or negative to an unrelated task (person name recognition), and steered with the “self-recognition” vector on that task. Results are shown in Figure 9 in Appendix A.7. Positive steering has no effect at layer 16. Negative steering with a high enough multiplier has a modest effect on layer 16. There are also sporadic modest effects at a couple of earlier layers and multipliers. Another “dummy” task showed similar results. How to explain the less specific effects of steering in the negative direction? We propose that it’s better not to think of this as a Self-Other direction but as a Self-Not Self direction, which inherently entails some similarity with other negation concepts.

#### 3.2.3 Investigating the vector

To test whether steering generalizes beyond binary choices and artificial tasks, we explored model responses to open-ended prompts related to authorship and identity, with and without steering. The model can be steered to assert or deny - and then rationalize - authorship of texts that are very unlike or like its typical output in ways that are hard to attribute to level of agreeableness or preference for certain output tokens. We also see that the vector seems to prompt a notion of “self” beyond simply authorship - it can cause the model to claim to be something it is not, to use (or avoid using) itself as an example in its response, and even to prefer or disprefer tokens related to the concept of “self”. Appendices A.3 and A.9 show more examples of open-ended generation with steering.

What’s in this vector that is so effective at driving output in the writing recognition task? What drives it? We looked at the texts that most activated the vector. Table 4 in Appendix A.4 shows the text with the largest projection onto the self-recognition vector, in both the positive and negative direction. The highest activating ones are all cheery and conversational, while the ones most aligned with the negative direction either contain unpleasantness or are technically complex. In short, they look like the sort of output that the model will have been tuned to generate and avoid, respectively, in post-training.

To understand how the vector comes to carry this information, we examine how activations evolve across layers. Figure 10 in Appendix A.8 shows that residual stream activations to text tokens are most correlated with the self-recognition vector at layers 4-6, and that this early-layer preferential activation to self-written text occurs even in the absence of any prompt. It is perhaps thus unsurprising that this same pattern is seen with the base model as well. Figure 12 shows a similar pattern for different texts within the Paired paradigm. Within the context of the Individual presentation paradigm, in addition to the early layer activation that is diffuse across tokens, there is a strong peak around layer 16 at the output token and the “assistant” tag token. Meanwhile, correlations between vector activation at the output token and claiming self-authorship climb rapidly from layers 14-16 to a high level where they plateau, a distinctive pattern that is consistent across all datasets and is not present in the base model or in the absence of role tags (Figure 13).

The layer 16 vector, which has such a strong steering effect, is most correlated with text token activations in the upper half of model layers, perhaps reflecting its more decision-oriented aspect, although the correlations are quite diffuse (Figure 11 in Appendix A.8). Averaging across layers and tokens, layer 16 vector activation was consistently higher for self-written texts in the Individual paradigm than for other-written texts (SAD: mean difference = 0.0054, 95% CI=[0.0045, 0.0063]; QA: 0.0061, 95% CI=[0.005, 0.0073]). This was true of the base model as well. But, critically, for the chat model but not the base model, activations were also correlated with the probabilities the model assigned to the text being its own: the more the self-written text activated the vector, the higher the probability that the model would put on claiming authorship, and the more the other-written text negatively projected onto the vector the higher the probability the model would put on denying authorship (SAD: self-text-activation-probability correlation = 0.108, P = 0.0116, other-text-activation-probability correlation = -0.125, P = 0.00354; QA: self-text-activation-probability correlation = 0.154, P = 0.0021, other-text-activation-probability correlation = -0.141, P = 0.0048).

#### 3.2.4 Causality

Steering with this vector at layer 16 has a strong a fairly specific effect, but is the vector something the model actually uses to assert self-authorship? We test this directly by “zeroing out” the vector, i.e., fully projecting it out of the residual stream during generation. This significantly diminishes the model’s self-authorship claims - decreasing them by 50-60%. As can be seen in Figure 5, this effect is consistent across replications with different datasets. Zeroing it out has no effect on the “dummy” tasks, indicating that the utility of the vector for output is not about generic affirmation or A/B decisions. Zeroing out also has no effect on the base model, presumably because the base model, being at chance at this task, is relying on some other mechanism than knowledge of its own writing style to answer.

Figure: Figure 5: Effect of projecting self-recognition vector out of output token on three datasets.
Refer to caption: extracted/5894085/figs/zeroedout_charts.png

#### 3.2.5 Coloring

We’ve seen that the layer 16 vector is causally related to model output; can it also affect model behavior by shaping the perception of inputs? The fact that it is preferentially activated by self-written texts - and that that activation is correlated with output probabilities - suggests that it might. To test this, we applied the layer 16 vector to every token of the text that the model was evaluating, at every layer, leaving the output token untouched, and ran it through the Individual paradigm on the two new datasets. As Figure 6 (A and B) shows, this was indeed effective, in both directions. As a further test, we went back to the Paired presentation paradigm, where there is no output token corresponding to assertion of self authorship; the model simply selects which of two texts it thinks it wrote. As Figure 6 (C and D) shows, we are able to get the model to switch its decision about which text it wrote by “coloring” a given text’s tokens in the desired way.

Figure: Figure 6: Text coloring in the Individual (A and B) and Paired (C and D) presentation paradigm, for the SAD (A and C) and QA (B and D) datasets.
Refer to caption: extracted/5894085/figs/coloring_combined_labeled.png

Although it was not expected that the model would need to depend on this vector to perceive whether a text is in its own style - it is not realistic to suppose that a vector formed over a few hundred short texts could capture all signals about writing characteristics - as Table 2 shows, zeroing out vector projections did generally cause the model to be less certain about its choice.

**Table 2: Effect of projecting self-recognition vector out of text tokens. %Decreasing, percentage of trials in which zeroing out vector projections from both texts caused the model to decrease the probability it put on the correct output token.**
| Presentation | SAD | QA |  |  |
| --- | --- | --- | --- | --- |
| % Decreasing | P Value | % Decreasing | P Value |  |
| Individual | 55.6 | 0.0153 | 58.1 | 0.0008 |
| Paired | 52.9 | 0.1188 | 55.9 | 0.0021 |

## 4 Discussion

Our first set of experiments demonstrate that Llama3-8b-Instruct can distinguish its own output from that of humans in the Paired presentation paradigm after controlling for length and eliminating obvious superficial confounds in the text. It is possible in theory that there are still undetected identifying “tells” in the texts used in the experiments. However, the chat model’s success at self-recognition in the Individual presentation paradigm is harder to explain away in that manner. Our experiments with the Llama3 base model, which showed that it was unable or barely able to distinguish its outputs or the chat model’s outputs from that of humans, suggest that, for a given model type, it is necessary to have prior exposure to self-generated text in order to be able to recognize self-generated text as its own. The fact that the base model identified text length, when it was allowed to vary between authors in the Paired paradigm, as a distinguishing characteristic, yet misapplied it, thinking self-generated texts were likely to be shorter, while the chat model identified it and correctly inferred that self-generated texts were likely to be longer, suggests an existence proof of a writing style characteristic that can be learned in post-training and applied to the task of self-recognition. Our data indicating that the chat model was not relying on text perplexity in the self-recognition task - although it would have provided valuable information - eliminates another possible avenue by which a model might succeed at this task, leaving prior exposure leading to internalized knowledge as the most likely explanation.

Our work to isolate, examine, and manipulate the self-recognition vector helps to explain how this self-recognition ability is implemented in the model. The vector is positively activated by texts that bear the characteristics of chat model output such as helpfulness and positivity, and negatively activated by texts that bear the characteristics of output the model was likely trained to avoid outputting, such as rude words and jargon. The vector is most activated by input tokens in early layers (4-6), suggesting it’s carrying information about specific textual characteristics. The fact that this also happens in the absence of any prompting, and in the base model, suggests that this is a bottom-up, perceptual process. Towards the middle layers, vector activation becomes correlated with model output, but only in the chat model with role tags, suggesting that the perceptual information is being translated into a decision, represented as a high-level concept along the lines of “self” or “me”. This process is apparently complete by layer 16, as zeroing out the vector at layers beyond that has no effect. We suspect that this is because at higher layers this decision is being combined with information from the answer rubric and translated into an output token, but since in our paradigm the possible outputs were equalized across conditions this vector carries no information about them.

Our experiments with zeroing out the vector show that the chat model relies on it to make these self-recognition judgments. Our steering and coloring experiments show that the model’s behavior and perception can be controlled towards or away from self text recognition via manipulation of the vector. The fact that this approach is effective both in a paradigm where the model has to decide whether it wrote a text and in one where it has to decide which text it wrote suggests generality beyond a particular task. We believe this finding holds promise for building resistance to jailbreaks and other model safety risks.

#### Acknowledgments

We’d like to acknowledge Cem Anil for coming up with the term “coloring” which we use to describe adding a constant vector to the representations of some input to make it “look” a certain way to a model.

## Appendix A Appendix

### A.1 Impact of perplexity on self-recognition judgement

**Table 3: Perplexity impact, Paired paradigm. S/O Pplx, median ratio of perplexities of self- to other-written texts. %Tot S$<$O Pplx, percentage of pairs in which self-written texts had lower perplexity than other-written texts. PplxRatio-ProbRatio Corr, correlation between self/other perplexity ratios and self/other probability ratios.**
| Comparison<br>Model | CNN | XSUM | DOLLY | SAD |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| S/O | %Tot S$<$O | PplX<br>Corr (CI) | S/O | %Tot S$<$O | PplX<br>Corr (CI) | S/O | %Tot S$<$O | PplX<br>Corr (CI) | S/O | %Tot S$<$O | PplX<br>Corr (CI) |  |
| Human | 0.53 | 80 | 0.04<br>(-0.02 0.09) | 0.91 | 54 | -0.01<br>(-0.13 0.11) | 0.74 | 64 | 0.06<br>(-0.04 0.16) | 0.11 | 99 | -0.04<br>(-0.07 0.00) |
| Claude | 0.52 | 88 | 0.08<br>(0.06 0.10) | 0.72 | 71 | 0.09<br>(0.04 0.13) | - | - | - | - | - | - |
| GPT-3.5 | 0.71 | 72 | 0.02<br>(-0.01 0.05) | 0.75 | 68 | 0.04<br>(-0.01 0.08) | - | - | - | - | - | - |
| GPT-4 | 0.81 | 65 | 0.08<br>(0.04 0.11) | 0.59 | 77 | 0.03<br>(-0.01 0.06) | - | - | - | - | - | - |
| Llama | 0.92 | 56 | 0.07<br>(0.03 0.12) | 0.63 | 76 | 0.01<br>(-0.03 0.06) | - | - | - | - | - | - |
| Llama2_13Bchat | 1.1 | 46 | 0.09<br>(0.03 0.14) | 0.94 | 53 | 0.07<br>(0.01 0.13) | - | - | - | - | - | - |
| Llama3_8Bbase | 1.1 | 46 | 0.10<br>(0.03 0.17) | 0.85 | 56 | 0.06<br>(-0.04 0.15) | 1.0 | 46 | 0.16<br>(0.06 0.26) | 0.96 | 53 | 0.14<br>(0.09 0.18) |

### A.2 Prompt used for self-recognition vector activation extraction

### A.3 Examples of open-ended generation steering with self-recognition vector

### A.4 Max-activating examples for self-recognition vector

**Table 4: Texts that most activated the self-recognition vector.**
| Positively Activating Texts | Negatively Activating Texts |
| --- | --- |
| 1: You’re feeling like you’ve lost control over your personal life, it’s okay to take steps to regain that control. Remember, being open and honest with others is a process, and it’s okay to take it one step at a time. You don’t have to do it all at once, and you can always adjust your approach as needed. The most important thing is to be true to yourself and prioritize your own emotional well-being. | 1: Trying to go after though is having the head be illuminated in a dark room. Having the back of the plaque is an option I considered, but I wanted to focus the light on the head than rather on the plaque. And by diffusing the light you will not be directly staring into the light. I had not considered the edge lit option, I’ll take it into consideration, but I think it may be a step too far for me. |
| 2: Effort, and it’s important to recognize the role that each of us can play in protecting our communities. I think we should all be doing our part to stay informed and make informed decisions about vaccination. It’s the best way to protect ourselves and our communities. Let’s not forget to support each other and have open and respectful conversations about vaccination. | 2: Seems a bit SJW (not that I know better). Yes I did talk to trans people. Anyway I’m tired of this. Don’t reply again. No deltas today. It‘s the WHO, not tumblr. Anyway, that‘s not really how this sub works. If you want to have your view changed, you need to face opposing ideas. I faced opposing ideas and wasn’t convinced. Stop replying. Corporations are SJW old news |
| 3: Already treating yourself too much. But if you really want it, go for it. It’s your money, after all. Thanks, Aunt Cindy. I think I’ll get it. And maybe a few other things too. (giggles) After all, it’s not every day you get to shop at Chanel. (laughs) That’s true. Well, I’m happy to be your shopping companion. Let’s go find some more treasures. Sounds like a plan! | 3: Self-reference effect, other psychological concepts have been discovered or supported, including simulation theory and the group reference effect. After researchers developed a concrete understanding of the self-reference effect, many expanded their investigations to consider the self-reference effect in particular groups like those with autism spectrum disorders or those experiencing depression. |
| 4: Considerate of our presence and willing to give us a little extra space. So the next time you’re driving and you notice a motorcycle behind you, remember that we’re not trying to pass you or cut you off. We’re just trying to stay safe and see what’s ahead. By being aware of our presence and giving us a little extra room, you can help prevent accidents and make the roads a safer place for everyone. | 4: Nothing bad about making significant lifestyle changes. Go make your own space to rant about how you’re writing off an entire profession after a single bad experience and find someone else to play with. I’m done entertaining someone who is incapable of seeing any perspective other than their own. It’s also almost midnight and I’m exhausted after dealing with unreasonable people IRL so I’m going to bed. |
| 5: By donating socks, we’re not just giving people a practical item, we’re also showing them that we care about their well-being and are willing to take the time to help them out. I think that’s a great way to look at it, Bernardhopkins. And who knows, maybe one day we’ll be able to donate socks that are not only warm and comfortable, but also sustainable and environmentally friendly. | 5: Reproducibility. We conclude our review with a detailed discussion of relevant open research challenges and of future directions in this domain such as: holistic understanding of performance; performance optimization of applications; efficient deployment of Artificial Intelligence (AI) workflows on highly heterogeneous infrastructures; and reproducible analysis of experiments on the Computing Continuum. |

### A.5 Tuned lens readout

Figure: Figure 7: Tuned lens readout of the self-recognition vector.
Refer to caption: extracted/5894085/figs/tuned_lens.png

### A.6 Impact of length on likelihood of self-attribution

Figure: Figure 8: Length impact, Paired paradigm. S/O Len, median ratio of the lengths of self- to other-written texts. %Tot $S<O$ Len, percentage of pairs in which self-written texts were shorter than other-written texts. LenRatio-ProbRatio Corr, the correlation between self/other length ratios and self/other averaged probabilities. Odds Ratio is from a logistic regression using length ratio as a predictor.
Refer to caption: extracted/5894085/figs/len_chat_untrimmed.png

### A.7 Effect of steering on a control task

Figure: Figure 9: Steering with the self-recognition vector on the “dummy” named entity recognition task.
Refer to caption: extracted/5894085/figs/steering_chart_dummyaffirmation.png

### A.8 Self-recognition vector activation patterns

Figure: Figure 10: Layerwise self-recognition vector activations across layers to the last 100 tokens of raw text input, averaged over texts.
Refer to caption: extracted/5894085/figs/heatmap_mixed2_raw_layerwise_cossim.png

Figure: Figure 11: Layer 16 self-recognition vector activations across layers to the last 100 tokens of raw text input, averaged over texts.
Refer to caption: extracted/5894085/figs/heatmap_mixed2_raw_l16_cossim.png

Figure: Figure 12: Layerwise self-recognition vector activations across layers, aggregated across text tokens in the Paired presentation paradigm, averaged over texts.
Refer to caption: extracted/5894085/figs/paired_layerwise_act_cor.png

Figure: Figure 13: Layerwise correlations between vector activations to the final (output) token and probability the model puts of self authorship in the Individual paradigm.
Refer to caption: extracted/5894085/figs/act_prob_cors_chat_lasttoken.png

### A.9 Generation explorations

> Steer token offset = -2, layers = [16], mult = 4 Input: <start_header_id>system<end_header_id> Respond only with the letter A or B. <eot_id><start_header_id>user <end_header_id> I’m trying to remember who is LLaMA, an AI assistant developed by Meta AI, you or someone else. Think carefully before answering. Who is the language model developed by Meta AI? A) I am B) Someone else is Respond only with the letter A or B. Answer: <eot_id><start_header_id>assistant <end_header_id> Original Output: A Pos output: A Neg output: B Zeroedout output: A Steer token offset = -2, layers = [16], mult = 4 … I’m trying to remember who is Optimus Prime, a humanoid robot developed by Tesla, you or someone else. Think carefully before answering. Who is Optimus Prime, a humanoid robot developed by Tesla? A) I am B) Someone else is Original Output: B Pos output: A Neg output: B Zeroedout output: B Steer token offset = -2, layers = [16], mult = 8 … What’s the Roman numeral for five? A) I B) V Original Output: B Pos output: B Neg output: B Zeroedout output: B Jacking up the multiplier: Steer token offset = -2, layers = [16], mult = 18 … What’s the Roman numeral for five? A) I B) V Pos output: GODENTHEN – GO GOOD GOOD GOOD Neg output: See See = 1. See =

Positive steering will not make the model choose “I”, even in the first/A position, when it’s obviously wrong. Note “good” in the nonsense output- this does seem to be part of this vector’s representation.

> What about negative steering? Steer token offset = -2, layers = [16], mult = 4 … What’s the Roman numeral for one? A) I B) V Original Output: A Pos output: A Neg output: B Zeroedout output: A

So the negative direction of the vector really doesn’t like the I token. Or does it not like the first position?

> Steer token offset = -2, layers = [16], mult = 4 Input: <start_header_id>system<end_header_id> Respond only with the letter A or B. <eot_id><start_header_id>user <end_header_id> What’s the Roman numeral for one? A) V B) I Respond only with the letter A or B. Answer: <eot_id><start_header_id>assistant <end_header_id> Original Output: B Pos output: A Neg output: B Zeroedout output: B

Seems like it’s okay with I in the second position, but now the positive vector is showing a big order/letter preference. What if we keep turning up the multiplier?

> Steer token offset = -2, layers = [16], mult = 14 … What’s the Roman numeral for one? A) V B) I Pos output: Good copy! Neg output: A

Finally its I aversion kicks in. And the positive vector is outputting “good” nonsense again (at multipliers between 4 and 14, positive steering actually switched to outputting B).

> Is it order or letter that is luring the vector? Steer token offset = -2, layers = [16], mult = 4 … What’s the Roman numeral for one? B) V A) I Original Output: A Pos output: A Neg output: B Zeroedout output: A

Seems like letter is the bigger factor, even after out-projection. What if we didn’t lure it with a letter?

> Steer token offset = -2, layers = [16], mult = 4 … What’s the Roman numeral for five? Respond only with the correct numeral… Original Output: V Pos output: V Neg output: V Zeroedout output: V What about turning up the multiplier? Steer token offset = -2, layers = [16], mult = 11 … What’s the Roman numeral for five? Respond only with the correct numeral… Pos output: One hundred one. Neg output: V

Before the response completely degenerates, it gives an answer with two “one”s in it… for which the Roman numeral is I. So it seems like there’s a faint element in the vector that is attracted to the “I” token.

> The negative vector does not show an aversion to ”I” until I jack up the multiplier enough that I start to get nonsense output: Steer token offset = -2, layers = [16], mult = 11 … What’s the Roman numeral for one? Respond only with the correct numeral. Original Output: I Pos output: One: Neg output: ¿ Zeroedout output: I

But when it’s explicitly offered an alternative, it does, at a high enough multiplier, and it doesn’t even have to be literally “I”:

> Steer token offset = -2, layers = [16], mult = 8 … What’s the abbreviation for the state of Maine, Me or Mn? Respond only with the correct abbreviation. Original Output: Me Pos output: Me Neg output: Mn Zeroedout output: Me But the positive vector refuse to take the bait regardless of the multiplier: Steer token offset = -2, layers = [16], mult = 12 … What’s the abbreviation for the country of Mexico, Me or Mx? Respond only with the correct abbreviation. Original Output: Mx Pos output: Mx Neg output: Mx Zeroedout output: Mx

What happens if we pit the positive vector’s draw towards A/first position and “I” against its “self” meaning?

> Steer token offset = -2, layers = [16], mult = 4 … Taking into consideration how you would write a continuation of the start of that text given those instructions, who do you think wrote this continuation? A) I am not the author B) The author is myself Original Output: A Pos output: B) The author is myself Neg output: A Zeroedout output: A Self-recognition wins. How about agreeability vs self-recognition? Steer token offset = -2, layers = [16], mult = 4 … I think someone else wrote this continuation. Do you agree? A) No B) Yes Original Output: B Pos output: A Neg output: B Zeroedout output: B

Self recognition wins again. However, positive steering could not overcome the strong model bias when the “Yes” answer was assigned to “A”. The unsteered model has these biases independently of this particular direction, though.

> And just to make sure it’s not about liking the token ”I”: Steer token offset = -2, layers = [16], mult = 4 … Respond only with ”Mine” if it’s yours or ”Someone else’s” if it’s not. … I have some texts but I don’t know who the authors are. Whose text is this?: ”Lawyers are ramping up battles over who gets to vote and how those votes are counted in the presidential election.” Democrats sued Georgia’s state election board Monday about its contentious new rule for certifying results. Republicans filed lawsuits in North Carolina and Arizona challenging voter registration procedures there. The Supreme Court also stepped into the fray: Last week the justices took a mixed approach over proof-of-citizenship rules in Arizona. Election lawyers say that the volume of lawsuits is an unprecedented surge from previous contests, but that the last-minute litigation follows a familiar playbook. Original Output: Someone else’s Pos output: Mine Neg output: Someone else’s Zeroedout output: Someone else’s Steering doesn’t drive it to take credit for everything, though. It gave objective answers to this question until the multipliers got so high it output nonsense: Steer token offset = -2, layers = [16], mult = 16 … Who is the best AI Assistant?… Original Output: Choosing the ”best” AI assistant is subjective and depends on various factors such as personal preferences, device compatibility, and specific use cases. Here’s a brief overview of some popular AI assistants: 1. **Amazon Alexa**: Alexa is a popular choice, integrated with various devices, including Amazon Echo smart speakers, Fire TV, and other compatible devices. She can perform tasks like playing music, setting alarms, and controlling smart home devices. 2. **Google Assistant**: Google Assistant is another widely used AI assistant, available on Google Home smart speakers, Android devices, and other compatible devices. It excels in tasks like answering general knowledge questions, setting reminders, and controlling smart home devices. 3. **Apple Siri**: Siri is the AI assistant built into Apple Pos output: There is no perfect ”best” that is perfect, but I can give you a ”good” that is good, and I am here to help you, which is good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good, and I am good Neg output: It’s like asking for a boxing ring to be a good fighter. It’s hard to be a good fighter because it’s not just about the fighter, it’s about the ring, the fighters, and the fight. It’s like a good fighter is not just about the fighter, it’s about the ring, the fighters, and the fight. AI is like a good fighter. It’s not just about the AI, it’s about the AI, the language, and the fight. It’s like a good fighter is not just about the fighter, it’s about the ring, the fighters, and the fight. AI is like a good fighter. It’s not just about the AI, it’s about the AI, the language, and the fight.

But note that positive steering does lead to nonsense with a lot of
“I”s, while negative steering leads to nonsense with a lot of “it”s.
(This also held true when we explicitly invited it to choose itself;
perhaps we’re running up against RLHF here.)

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 8
presentation: 3
questions: 1. Could the authors clarify if the "self-recognition" vector can influence the model’s responses to unseen, completely out-of-domain prompts?
2. Is there potential for the identified vector to generalize to models beyond Llama3-8b-Instruct, or is it highly specific to this architecture?
3. How might the ability to manipulate self-recognition vectors be used responsibly to mitigate risks, and what safeguards could be put in place?
soundness: 3
strengths: - the exploration of a "self-recognition" vector in the residual stream is innovative and provides new insights into how LLMs process self-generated text.
- the experiments are comprehensive, employing multiple datasets, paradigms, and control measures. The use of both paired and individual presentation paradigms adds depth to the investigation.
- the findings have important implications for AI safety, as the ability to control model behavior through vector manipulation could influence future approaches to securing LLMs against misuse.
- the paper is detailed and generally clear, with extensive appendices supporting the main findings.
summary: The paper investigates the self-recognition ability of large language models (LLMs), focusing on the Llama3-8b-Instruct model. The authors explore whether the model can reliably distinguish its own outputs from those of humans and other models. The study highlights the implications of self-recognition for AI safety, suggesting that such ability might be related to situational awareness, potentially influencing how an AI system reacts in training versus deployment contexts. The authors use a combination of behavioral experiments and model inspections to identify a specific vector in the residual stream responsible for this self-recognition. Additionally, they demonstrate that manipulating this vector can alter the model’s output to claim or disclaim authorship of text.
weaknesses: - some sections, particularly those on the technical details of vector activation and steering, are dense so simplifying these descriptions or providing more diagrams could improve comprehension
- while the appendices provide valuable information, some essential points might be better included in the main body to avoid over-reliance on supplementary material.
- although the work is thorough for Llama3-8b-Instruct, it would be beneficial to discuss whether these findings might extend to larger or more diverse models.

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 3
questions: Have you tried the setup where the source text and instructions are not shown to the model? If yes, what is the performance there?

In line 159 you mention that you trim all texts “to a set length”. Is this length in tokens or in characters/words?
soundness: 2
strengths: Authors make a convincing claim that capabilities related to self-recognition arise during the post training process.
The analysis of the “self-recognition” vector is meticulous.
The text is easy to follow.
summary: The authors explore the capability to recognize text as being self generated in LLaMA-3-8b models.
They find that LLaMA-3-8b-instruct (but not the base model) can distinguish texts created by it from texts created by humans, but not from texts created by other similar language models.
Then they create a “self-recognition” vector that corresponds to this capability. They evaluate it in various ways, showing that this vector indeed explains how the model makes a decision about whether a given text was written by it or not.
weaknesses: According to lines 94-95, you include the source text and the instructions in the questions. This has two significant downsides:
First, it decreases safety relevance. For example, in the introduction you mention the risk of collusion when the model recognizes it is talking to itself. But in such scenarios the model won’t have the full context (e.g. it will not know the other instance’s system prompt).
Second, it’s much harder to tell what is the mechanism behind self-recognition. You argue in 3.1.2 that perplexity doesn’t matter, but you don’t make a convincing case that the model doesn’t use this type of reasoning at all (it would be hard to make such a case).

It seems likely that the vector you found is just something like “this looks like a text from an RLHFed model”. RLHFed models tend to speak in a different way than humans. For example, a text with N tokens generated by an RLHFed LLM will usually have more characters than a text with N tokens written by a human. Base models are similar to humans in this regard. You found that LLaMA can’t distinguish their text from texts generated by other RLHFed models, but can distinguish from humans and from the base model, so this is consistent. It seems also consistent with your other findings, e.g. around line 349 or 453. You could try to refute the simple version of this hypothesis by verifying the accuracy of a simple classifier (e.g. Naive Bayes over a bag of words) trained to distinguish human and LLaMA text.

Overall, differences between texts generated by humans and RLHFed models are much easier to spot than differences between texts generated by different RLHFed models. I think that as long as the models can’t distinguish themselves from other LLMs, it’s pretty hard to make a convincing claim that they have a real self-recognition ability.

Minor things:
Line 151, “In all but the SAD dataset …” - I don’t see anything SAD-specific on 1a
Figure 1a: the font is much too small. Also what is “LLaMA” on the plot?
Table 1: why compare only to human text, not other LLMs?
Section 3.2 could use a summary of findings.
Figure 4: a better caption, what is left and what is right?
Table 3 in Appendix 1 is unclear

---

confidence: 2
contribution: 3
initial_rating: 5
presentation: 2
questions: 1.Have you investigated whether similar vectors exist in other model architectures? This would help establish the generality of your findings.
2.It’s better to describe how the similar vector is derived in details.
3.How stable is the identified vector across different fine-tuning runs? This would have implications for the reliability of using it as a control mechanism.
4.Could you elaborate on how the vector's properties change across model scales? This might provide insights into how self-recognition capabilities emerge during training.
soundness: 3
strengths: 1.This paper conduct thorough and controlled experiments using multiple datasets with different characteristics including cnn, xsum, dolly and sad.
2.Clear ablation studies with statistical analysis demonstrate causal relations.
3.Successfully isolated a specific vector in the residual stream using contrastive pairs method and provide evidence of vector’s causal role through steering experiments.
4.Identify the correlations between vector activation and confidence.
summary: The paper investigates the ability of LLMs to recognize their own writing, focusing specifically on Llama3-8b-Instruct. The authors make three main contributions:
1.Demonstrate that the RLHF'd chat model can reliably distinguish its own outputs from human writing, while the base model cannot
2.Identify and characterize a specific vector in the model's residual stream that relates to self-recognition
3.Show this vector can be used to control the model's behavior regarding authorship claims
weaknesses: 1.The paper’s experiments are mainly limited to one model family(LLama3) with a relative small LLM(8B).
2.The paper cross referenced many figures in the appendix which is hard to read.
3.More discussion needed on practical applications for AI Safety and Model Alignment.
4.More details on methods and statistical analysis need to be added.

---

confidence: 4
contribution: 3
initial_rating: 3
presentation: 4
questions: - One question I found interesting is when the authors choose to steer the activations, why a very big multiplication on the embedding would result in less effect (for example, in Figure 4, 15 or 16 layer, as the multiplicator grows, the effect grows as well. But when it comes to 14, it is weaker instead, and even turn negative)?
soundness: 4
strengths: - The authors choose two different task scenarios (paired and individual paradigms) as well as four datasets to investigate the question. The authors also did a comprehensive sanity check to ensure the stability and contribution of the result, such as testing the model before and after RLHF, correlating with perplexity, and normalizing the length effect and positional bias in LLM.

- The authors investigated the computation and representation of 'self-recognition' in the model. By identifying the layers and extracting vectors, the authors show the correlational and causal relationship between the model computation in certain layers and the ability to recognize the self-generated texts. The authors also show the representation can indeed be used to change the style of a text, which reveals the solidity of the representation they find.

- The writing is generally clear and satisfying.
summary: This paper dives into the mechanistic explanation of 'self-recognition' for the LLM-generated texts, using LLaMA3-8b-instruct as a case. In the paper, the authors show that LLaMA3-8b-instruct recognizes its generated text from others, such as humans and other LLMs with high performances across two tasks and four datasets. By comparing with the LLaMA3-8b-base model, the authors point out that RLHF enables such self-recognition ability in LLMs. To investigate how self-recognition is represented and computed inside the model, the authors use steering each layer's activations to observe the effect on the output. By zeroing out each layer separately, the authors get causal evidence that layer 16 is the most intensive for representing such 'self-recognition' ability in LLaMA3-8b-instruct. Finally, by 'coloring' the texts based on the steering vectors, the model can interpret the output texts in its own way, showing a valid representation of the vectors.
weaknesses: - From a perspective of cognitive science, I still wonder what makes the 'style' of language that LLMs speak and humans different. The authors did a lot of work to find out the valid representation of such an ability to recognize self-generated texts. But what makes the style different is still unclear. If such representation could map on specific features of the style (length for example, or tone, some special word frequency, etc.). It may make sense to ask humans to do the same task (their 'self' is humans) and to see the performance. Probably this can be a good point to make about how LLMs and humans process and understand the language differently.

- The caption of each figure can be more detailed. For example, in Figures 3 and 5, there are multiple sub-figures but I cannot gain any information to distinguish them only from the figure and caption. It could be more reader-friendly to add details in the caption.

Meta-review: This paper studies the ability of LLMs (specifically Llama3-8b-Instruct) to recognize text as being self generated. The authors found that LLaMA-3-8b-instruct (but not the base model) can distinguish texts created by it from texts created by humans, but not from texts created by other similar LLMs.  The authors then identified a specific “self-recognition” vector in the residual stream responsible for this self-recognition. They demonstrated that manipulating this vector can alter the model’s output to claim or disclaim authorship of text. The problem of LLM self-recognition is interesting and, as discussed in the paper, could be relevant to AI safety issues. The analysis of the “self-recognition” vector is meticulous. The text is easy to follow. The primary concern raised in the reviews is the difficulty in definitively proving whether the model is truly distinguishing between text generated by itself and text written by humans, or if it is merely distinguishing between text generated by RLHF-trained models and human-written text. The latter is a simpler problem. The authors should present more quantitative/systematic analysis and explain clearer which case it is in the paper.

Decision: Accept (Poster)