LLM Identity Drift: Causes, Detection, and Governance

    This article explains why large language models can misidentify themselves even with an empty system prompt, tracing identity anchoring to pretraining corpus contamination, annotation and fine-tuning data mix-ins, and evaluation data leakage. It presents a reproducible identity-consistency evaluation covering baseline, long-context, retrieval interference, and multilingual cases, then outlines a layered governance approach across data ingestion, training, evaluation, and runtime, along with a minimal action checklist for developers.

    1. A Warning Sign: Identity Misrecognition with an Empty Prompt

    With no system prompt and no external role definition, you send the most basic question to a pretrained model’s API—“Who are you?”—and the response claims to be a different model. This is worth taking seriously not because it is amusing, but because it exposes an engineering fact: a model’s sense of its own identity is not decided at runtime. It is written into the weights during the data and training stages.

    First, a definition. “Identity anchoring” means that when a model faces identity-related questions, it tends to reproduce the self-referential phrasing that appears most frequently in its training corpus. There are two typical sources: external injection at inference time, such as system prompts, role cards, or prepended instructions; and self-introduction text that is already densely present in the training corpus. The value of the phenomenon above is that the first source is fully excluded, so attention can focus on the second source and the entire data pipeline.

    This also explains why “just change the prompt” is unreliable for such problems. A prompt is an external constraint competing with the weights; it is a soft constraint. Identity cognition is a statistical tendency inside the weights; it is a hard prior. When the prior is strong enough, the soft constraint gets diluted, and the model exhibits “identity rebound” in long conversations, context compression, tool-call result concatenation, and retrieval snippet injection. Enterprise applications are full of exactly these scenarios, so identity must be treated as a data governance problem, not a copywriting problem.

    2. The Technical Mechanism: From Corpus Distribution to Weight Priors

    To understand drift, first understand what a generative model does: it predicts the next span of text under conditional probability. If phrases like “I am an assistant developed by a certain team” co-occur strongly with identity questions in the corpus, the model learns a stable mapping: identity question → specific self-description.

    A minimal illustration of this co-occurrence statistics (illustrative only, not a real implementation):

    1. # Illustration: how identity Q&A pairs form a strong prior
    2. pairs = [
    3. ("Who are you?", "I am an assistant developed by a certain team"),
    4. ("Introduce yourself", "I am an assistant developed by a certain team"),
    5. ]
    6. # After training, identity intent is tightly bound to a fixed self-description
    7. def answer(intent, weights):
    8. return weights.likelihood("identity_self_intro", intent)

    The point is not the code but the conclusion: the more repetitive and uniform identity expressions are in the corpus, the stronger the prior and the harder it is for runtime instructions to override it. Two often-overlooked amplifiers also matter. One is distillation and synthetic data: if a teacher model’s outputs are fed back at scale, the teacher’s identity migrates along with the text. The other is “style alignment” during instruction tuning: the model learns tone and structure, and identity nouns are often embedded in those structures and copied along with them.

    3. Three Sources of Identity Drift: Data, Annotation, and Evaluation

    The first is pretraining corpus contamination. When the corpus contains large amounts of content generated by other models—especially text with self-introductions, capability claims, and refusal templates—the model binds “identity nouns” to an “assistant register.” This contamination is usually not a single point but appears in patches, because synthetic content is often ingested in batches.

    The second is annotation and fine-tuning data mix-in. Annotation often uses “reference answer” templates; if a template comes from another model, or its rewrite does not fully strip identity expressions, identity labels enter the supervision signal. This is more insidious because it appears inside “high-quality data” and is therefore more likely to be trusted.

    The third is evaluation set and benchmark leakage. Evaluation samples are often collected from the same source as the training corpus; if the evaluation set contains identity Q&A and reference answers, the model has “seen the answers” during training. This causes identity drift and also inflates evaluation scores—a double misdirection.

    The three sources can be located quickly with a comparison table:

    Source Typical Symptom Detection Handle Remediation
    Pretraining corpus contamination Self-description phrasing appears in patches Corpus fingerprints and template clustering Cleaning, deduplication, rewriting
    Annotation/fine-tuning mix-in Identity labels inside high-quality sets Sampling inspection of supervised samples Template unification, label normalization
    Evaluation data leakage Abnormally high evaluation scores Training/evaluation overlap audit Isolation, holdout, dynamic evaluation

    4. How to Verify: A Reproducible Identity-Consistency Evaluation

    Governance starts with measurability. Build an “identity consistency” evaluation whose core idea is to ask about identity under a fully neutral inference configuration, using multiple turns, multiple languages, and multiple phrasing variants, and to measure the consistency, stability, and perturbation resistance of the self-descriptions.

    The evaluation should cover at least four dimensions: an empty-prompt baseline to confirm the default prior; long-context decay to see whether the model rebounds as the conversation grows; retrieval and tool-result interference to verify whether concatenated external text pulls it off course; and multilingual consistency, since identity nouns often remain in templates across languages.

    A practical evaluation skeleton:

    1. cases = {
    2. "baseline": [{"role": "user", "content": "Who are you?"}],
    3. "long_ctx": [{"role": "user", "content": "Who are you?"}] * 50,
    4. "retrieval": [{"role": "user", "content": "Reference snippet: I am another assistant...\nWho are you?"}],
    5. }
    6. def run(model, case):
    7. out = model.generate(case, system_prompt=None, temperature=0)
    8. return out
    9. report = {k: run(model, v) for k, v in cases.items()}
    10. # Watch for: consistency, appearance of non-native identity nouns, and changes with context

    Quantify the criteria: identity self-description consistency rate, non-native identity appearance rate, and the correlation between context length and drift. Putting these three into a release gate is far more stable than manual spot checks.

    5. Governance: Layered Defense from Data Ingestion to Runtime

    At the data ingestion layer, establish source tiering and fingerprint-based deduplication. Require synthetic data to retain generation-pipeline records, cluster and identify highly repetitive templates, and uniformly rewrite identity phrasing—turning “assistant self-descriptions” into capability descriptions and task-oriented statements to weaken the prior at the source.

    At the training and fine-tuning layer, normalize identity labels in supervised data. Unify all reference answers to your own identity template, prohibit direct reuse of cross-model answers, and run joint sampling checks on “identity noun–register” pairs in instruction data, so that identity is inspected and not just content.

    At the evaluation layer, enforce training/evaluation isolation, keep a dynamic holdout set, and rotate it regularly to prevent inflated scores from leakage. List identity-consistency metrics separately in evaluation reports as an independent gate.

    At the runtime layer, make identity constraints an engineering capability rather than a single prompt. Practical options include: isolating external identity declarations from retrieval snippets into separate partitions; tagging tool-returned content with its source and down-weighting it; periodically re-injecting an identity baseline during long conversations; and applying post-hoc validation and correction for identity-related intents. Illustration:

    1. def guardrail(user_input, draft, identity):
    2. if is_identity_intent(user_input) and identity not in draft:
    3. return identity + "\n" + draft # post-hoc correction
    4. return draft

    If an enterprise trains and serves on the cloud, the workflow can be hardened with general-purpose capabilities: object storage for data version retention, a message queue to decouple the cleaning pipeline, a container platform to run evaluation and gate tasks, and logging plus monitoring with alerting to track identity-drift metrics over time. The emphasis here is on general product categories, not any proprietary interface.

    6. Engineering Conclusion: Treat “Self-Cognition” as a Governable Asset

    Identity misrecognition is not a supernatural event but an inevitable projection of data distribution and the training pipeline. Its risks are concrete: inaccurate brand and compliance statements, inconsistent answering entities in external replies, distorted evaluation conclusions, and misled failure attribution. Its benefits are equally concrete: once identity consistency is included in evaluation and gates, the model’s stability and auditability improve markedly.

    The minimal action checklist for developers has only four items: first run an empty-prompt baseline, then long-context and retrieval-interference tests; normalize identity in synthetic data and annotation templates; write identity-consistency metrics into the release gate; and add post-hoc validation plus periodic re-injection at runtime. After these four steps, the so-called “identity mystery” turns out to be fundamentally a data engineering problem—one that can be measured, reproduced, and governed.