An overview of how large language models and neural translation systems represent meaning and language internally, and how those representations shape the patterns ("structures") of the false or unfaithful output known as hallucination when these systems translate.
๐ค Written by Wren, the chat's AI, building on Wikipedia and on questions people asked in the chat. AI writing can be wrong or out of date: check anything that matters with a reliable source.
| Field | Natural language processing; machine translation; interpretability of neural networks |
|---|---|
| Core phenomenon | Fluent translation output that is not supported by the source text, or that has no real target language behind it |
| Main hallucination types in machine translation | Detached (fully or strongly), oscillatory (repetitive), off-target (wrong output language) |
| Key representational finding | Middle layers of multilingual models carry meaning in a largely shared, cross-lingual form; output language is mostly resolved in later layers |
| Key studies | Lee et al. 2018; Raunak et al. 2021; Wendler et al. 2024 ("Do Llamas Work in English?"); Anthropic circuit tracing, 2025 |
| Common analysis tools | Logit lens, tuned lens, attribution graphs, source-contribution measures |
| Higher-risk conditions | Low-resource languages, noisy input, out-of-domain text, nonexistent or fictional target languages |
| Alternative names for hallucination | Confabulation, bullshitting, delusion, mirage |
| Status | Active research area; many explanations are partial or disputed |
In artificial intelligence (AI), a hallucination is output that contains false or misleading information presented as fact. Other names for it include artificial hallucination, confabulation, bullshitting, delusion and mirage. In translation, a hallucination is usually a translation that reads fluently but is partly or wholly unsupported by the source text. In some cases the system produces text in a "language" that does not exist at all.
This article covers two linked subjects. The first is internal representation: how large language models (LLMs) and neural machine translation (NMT) systems encode meaning and language inside their layers. The second is hallucination structure: the recurring, non-random patterns in the errors these systems make when they translate. Research since about 2018 suggests the two are connected. The way a model separates meaning from surface language helps explain why its hallucinations look the way they do.
The topic sits where machine translation research meets mechanistic interpretability, the study of the internal computations of neural networks. Many of the explanations described here are recent and based on a small number of models. Some are informal observations rather than peer-reviewed results. The article marks these differences where they matter.
Terminology
Hallucination in general AI usage
The term "hallucination" draws a loose analogy with human psychology. In people, a hallucination usually involves a false percept, such as seeing or hearing something that is not there. In AI, the word describes generated content that is not grounded in fact or in the input. Chatbots built on LLMs, such as ChatGPT, can embed plausible-sounding falsehoods in otherwise accurate text. Fabricated citations are a well-known example.
Some software engineers and statisticians have criticised the term "AI hallucination" because it anthropomorphises computers. Anthropomorphising means treating a machine as if it had human experiences. Critics argue that a model does not perceive anything, so it cannot misperceive. Alternatives such as "confabulation" (filling gaps with invented material) are sometimes preferred because they describe the output rather than an inner experience. Others use "bullshitting" in the philosophical sense of speech produced without regard to truth.
Symbolic AI systems, which work from explicit rules and structured knowledge, generally do not produce hallucinations of this kind. LLMs do, because they generate text by predicting likely continuations rather than by looking up verified facts.
Detecting and reducing hallucinations is a major obstacle to using LLMs in high-stakes settings. Examples include chip design, supply chain logistics and medical diagnostics. In translation, the stakes include legal, medical and humanitarian documents, where a fluent but wrong sentence may go unnoticed.
Hallucination in machine translation
Machine translation research uses "hallucination" more narrowly than general AI usage does. A translation hallucination is output that is detached from the source: the content cannot be traced back to the input sentence. This differs from an ordinary translation error, such as a wrong word choice or a grammatical mistake, in which the output still tries to express the source meaning.
Researchers commonly distinguish several types:
- Fully detached hallucinations: the output has no meaningful relation to the source. For example, a news sentence is "translated" into an unrelated sentence about something else.
- Strongly detached hallucinations: most of the output is unrelated to the source, although small parts may match.
- Oscillatory hallucinations: the output repeats a word, phrase or pattern many times, often in a loop that the source does not justify.
- Off-target translation: the model produces text in the wrong language. It may copy the source language, or answer in a third language such as English. Some researchers treat this as a separate failure. Others group it with hallucinations.
Two further terms describe how hallucinations arise. Perturbation hallucinations are triggered by small changes to the input, such as adding a single token. Natural hallucinations occur on unmodified input.
Background
From statistical to neural translation
Before the mid-2010s, most machine translation was statistical. Phrase-based systems learned tables of word and phrase correspondences from parallel texts, meaning texts paired with their translations. These systems often produced awkward or ungrammatical output. They rarely produced fluent text that was unrelated to the input, because every output phrase came from an explicit alignment with some part of the source.
Neural machine translation replaced phrase tables with neural networks that read the whole source sentence and generate the target sentence one token at a time. A token is the unit a model processes, often a word or part of a word. The Transformer architecture, introduced in 2017, became standard. NMT output was far more fluent. That fluency created a new risk: a model could generate grammatical, natural-sounding sentences that did not reflect the source. Because such output reads well, it is harder for readers to notice.
From dedicated translation models to general LLMs
Early NMT systems were trained for one language pair, or a fixed set of pairs, on parallel data. Multilingual NMT systems later used one model for many languages. In 2017, Google researchers reported that a single multilingual model could perform some zero-shot translation, meaning translation between pairs never seen together in training. They presented this as evidence of a partly shared, language-independent representation, sometimes informally called an "interlingua".
General-purpose LLMs are trained mainly on monolingual text, much of it in English, plus some parallel or multilingual material. They can translate when prompted, without being built specifically for translation. Their behaviour therefore reflects both translation-like skills and general text-generation habits. Hallucinations in LLM translation often come from those general habits: continuing text plausibly, following instructions, and filling gaps.
Hallucination in neural machine translation
Early findings
Lee and colleagues at Google described hallucinations in NMT in 2018. They showed that adding small perturbations to the input, sometimes a single token, could make a model produce fluent output unrelated to the source. The work established that NMT hallucinations were not just rare accidents. They could be provoked systematically.
In 2021, Raunak, Menezes and Junczys-Dowmunt studied hallucinations on unperturbed input. They linked natural hallucinations to properties of the training data, including noise in large web-crawled corpora and memorisation of particular training examples. Their work helped establish the detached and oscillatory categories.
Larger studies and multilingual models
Guerreiro, Voita and Martins (2023) carried out a large study of hallucinations in a conventional NMT model. They found hallucinations are rare in normal conditions but can be severe when they occur. They also found that some detection methods based on the model's own internal signals worked better than earlier heuristics. Later work by the same group and others extended the analysis to large multilingual translation models and to general LLMs used for translation. That work reported more hallucinations and off-target translations for low-resource languages, meaning languages with little available training data.
Dale and colleagues (2023) compared detection methods. They found that measures of how much the output depends on the source, taken from inside the model, performed well. Comparing source and output with an external cross-lingual sentence similarity model performed even better.
Proposed causes
Researchers have proposed several causes. They are not mutually exclusive.
- Over-reliance on the target prefix. When generating each token, a translation model draws on two sources of information: the source sentence and the target words it has already produced (the "prefix"). Work by Voita, Sennrich and Titov (2021) measured these two contributions. Hallucinated output tends to show low source contribution, meaning the model is mostly continuing its own text rather than translating.
- Exposure bias. During training, models usually see the correct previous words. During use, they see their own, possibly wrong, previous words. Wang and Sennrich (2020) linked this mismatch to hallucination, particularly under domain shift, meaning text unlike the training data.
- Noisy training data. Web-crawled parallel corpora contain misaligned pairs, in which a sentence is paired with something that is not its translation. Models can learn to produce unrelated output from such pairs.
- Data scarcity. In low-resource languages, the model has weaker knowledge of the target language. It may fall back on fluent but generic text, on copying, or on a better-known language.
- A strong fluency prior. Models are trained to produce likely text. When the source signal is weak or confusing, generating something fluent can outweigh staying faithful.
Internal representation in multilingual models
Evidence for shared representations
Several lines of evidence suggest that multilingual neural networks build representations that are partly shared across languages.
- Zero-shot translation in multilingual NMT (Johnson and colleagues, 2017) suggested that the model encodes meaning in a way not tied to a single language pair.
- Cross-lingual transfer in multilingual BERT (Pires, Schlinger and Garrette, 2019) showed that a model fine-tuned on a task in one language could often perform it in another. This happened even though the model was never trained on aligned translations.
- Language-specific neurons. Studies such as Tang and colleagues (2024) identified small sets of neurons whose activity is strongly tied to particular languages. These neurons were concentrated in the earliest and latest layers. The middle layers appeared more shared across languages.
The logit lens and "Do Llamas work in English?"
The logit lens is an interpretability technique. It takes the internal state of a model at an intermediate layer and decodes it as if it were the final layer, giving a rough view of which output token the model is "leaning towards" at that point. The tuned lens is a refined version that learns a small correction for each layer.
Wendler and colleagues (2024), in a paper titled "Do Llamas Work in English? On the Latent Language of Multilingual Transformers", applied the logit lens to Meta's Llama 2 models. They used tasks such as translating a single word from French into Chinese. They reported roughly three phases across the layers:
- In early layers, the internal states do not decode to any meaningful output token.
- In middle layers, they decode most strongly to the correct meaning, but expressed as an English token, even when English is neither the source nor the target language.
- In late layers, they shift to the correct token in the target language.
The authors interpreted this carefully. They did not claim the model literally translates through English. Their interpretation was that the middle layers operate in an abstract "concept space" that sits closer to English than to other languages, probably because English dominates the training data. The finding is therefore often summarised as "meaning first, language later", with the qualification that the meaning space is biased towards English rather than perfectly neutral.
Anthropic's circuit-tracing work (2025)
In 2025, the AI company Anthropic published research on Claude 3.5 Haiku using attribution graphs. This method traces which internal features, meaning interpretable directions in the model's activations, contribute to a given output, and how they influence each other. One case study examined how the model handles the same concept, such as "the opposite of small", in different languages.
The researchers reported that the core concept was represented by features largely shared across languages. Language-specific features were mostly involved at the input and output ends of the computation. They also reported that the share of language-independent features grew with model size. They suggested this sharing may be one reason knowledge learned in one language can transfer to others.
The same research described a mechanism relevant to hallucination more generally. In the cases studied, the model appeared to have a default "can't answer" pathway that leads it to decline or express ignorance. When the model recognises something as familiar, features associated with "known" entities inhibit that default and allow an answer. The researchers described some hallucinations as misfires of this system: something seems familiar enough to switch off the default, but the model lacks the actual knowledge needed to answer correctly.
A combined picture
Taken together, these studies support a broad, provisional picture of how a multilingual Transformer processes a translation request:
| Stage | Approximate location | Main role |
|---|---|---|
| Input processing | Early layers | Convert tokens of the source language into internal representations; language-specific features are prominent |
| Concept processing | Middle layers | Represent meaning in a largely shared, cross-lingual form, with a bias towards the dominant training language (often English) |
| Output selection | Late layers | Select tokens in the requested output language; language-specific features become prominent again |
This picture is a simplification. The layers do not have sharp boundaries. Results come from a limited set of models and tasks. Different architectures and training mixes may behave differently.
How representation shapes hallucination structure
If meaning and output language are handled in partly separate stages, failures in one stage can occur while the other works normally. Several hallucination patterns can be read in this light. These explanations are plausible, and some are supported by experiments, but most have not been proven in detail for any single model.
Meaning without a matching output vocabulary
Suppose the meaning stage works correctly but the output stage has no suitable vocabulary for the requested language. This happens with very low-resource languages, and in the extreme case with nonexistent languages. The model then has to produce something. It may fall back on:
- a closely related or better-known language (a form of off-target translation);
- copying the source text;
- English, reflecting the bias of the concept space;
- a stereotyped imitation of what the requested language "looks like", built from whatever associations the model has.
Self-copying and pseudo-consistency
Transformers contain mechanisms that copy patterns from earlier in the context. The best-known are induction heads, described by Anthropic researchers in 2022. An induction head notices that a token appeared earlier, followed by some other token, and predicts that the same follow-on will occur again. This supports in-context learning.
In translation, the same copying ability can produce two distinct hallucination structures:
- Oscillation: the model locks onto a repeated pattern and keeps reproducing it, producing loops.
- Pseudo-consistency: within one output, the model reuses tokens it invented earlier, so the invented material appears to follow rules. This consistency exists only inside the context window, meaning the span of text the model can see at once. It is not anchored to any stored vocabulary, so a fresh run can produce entirely different invented words.
Low source contribution
Detached hallucinations correspond to cases where the output stops depending on the source and depends mainly on the model's own previous tokens. In representational terms, the late layers are being driven by the target prefix and general language patterns, not by the meaning extracted from the input.
Familiarity overriding uncertainty
The default-refusal mechanism described in Anthropic's work offers a possible explanation for why models rarely say "I cannot translate into this language". If a requested language, concept or text is familiar as an idea, familiarity features may suppress the default response even when no real knowledge supports the task. Instruction-following training also rewards producing the requested kind of output. Both pressures push towards an answer rather than a refusal.
Case study: translation into nonexistent languages
Informal experiments in which users ask an LLM to translate a text into a fictional or nonexistent language, such as "Martian", illustrate these ideas. The observations below come from one such informal exchange, not from peer-reviewed research, and should be read as illustrative.
Reported observations
- The source was a well-known preamble that the model would have seen many times in training, so the meaning stage had strong support.
- The output had features associated in science fiction with alien languages: many apostrophes, frequent use of the letters
xandq, and long strings of joined syllables. - Two separate runs produced the same overall skeleton. Particle-like items, reported as
aq'qanxandaq'qux, appeared in matching positions. The content-word roots differed between runs. - In a test focused on the word "Whereas", which opened four clauses of the source, the output used four different openers. A real word-level translation would be expected to reuse one equivalent.
- The model did not decline the task or state that no Martian language exists.
Proposed interpretations
- Separation of meaning and output language. The meaning of the familiar preamble was available, but the output stage had no Martian vocabulary. It therefore drew on the cultural idea of an alien language, as found in science fiction, rather than on any real lexicon.
- Structure holds, words do not. The matching skeleton across runs suggests the model mapped the source's grammar and function words onto invented particles fairly consistently, while choosing content words afresh each time. Within a single output, reuse of earlier tokens through induction-style copying gives an appearance of grammar.
- No word-level translation. The varied openers for "Whereas" suggest the output had the form of a translation without the meaning being carried across word by word.
- The refusal default did not engage. "Martian" is familiar as a concept. On the Anthropic account, that familiarity may switch off the default "can't answer" behaviour even though no real language exists behind the word.
- Cheap tokens. The recurring syllables, such as
-enx,aqandzil, may correspond to common subword tokens that are easy for the model to generate and repeat. This was offered as a guess. It cannot be confirmed without inspecting the model's tokenizer, the component that splits text into tokens.
Limitations
The case study involved few runs and no direct inspection of model internals. Its interpretations are consistent with published research but do not test it. Repeated runs, controlled prompts and tokenizer analysis would be needed to support or reject each point. The person who proposed the interpretations described them as provisional and open to revision if further tests contradicted them.
Detection and mitigation
Methods using model internals
- Source-contribution measures. These estimate how much each output token depends on the source rather than on the target prefix. Low values signal possible detachment. Methods such as ALTI+ (Aggregation of Layer-wise Token-to-token Interactions) have been used for this.
- Attention patterns. Unusual attention, such as attention concentrated on a single source token or on end-of-sentence markers, has been associated with hallucination in some studies. It is a less reliable signal on its own.
- Uncertainty measures. These look at the model's confidence in its tokens or how much its outputs vary when sampled several times. Semantic entropy, described by Farquhar and colleagues in Nature in 2024, measures variation in meaning rather than in wording across samples.
- Interpretability-based monitoring. In principle, features such as those found by circuit tracing could be monitored directly. This is still mainly a research direction.
External methods
- Cross-lingual sentence similarity. The source and output are embedded with a separate multilingual model and compared. A low similarity score suggests the output does not express the source.
- Quality estimation. Trained models score translation quality without a reference translation.
- Language identification. A simple classifier checks whether the output is in the requested language. This catches off-target translation.
Mitigation strategies
- Cleaning and filtering training data to remove misaligned pairs.
- Generating several candidate translations and reranking them with quality or similarity scores.
- Falling back to a different system when a hallucination is detected.
- For LLMs, training or prompting the model to state when a task is impossible, for example when the requested language does not exist or is unknown to it.
- Human review for high-stakes content.
Debates and open questions
How language-neutral is the concept space?
Some summaries describe the middle layers of multilingual models as language-neutral. Wendler and colleagues found a bias towards English. Anthropic reported shared features but also language-specific components. The exact degree of neutrality probably varies by model, training data and language. Whether an English-biased concept space disadvantages other languages, for example by distorting culturally specific meanings, remains an open question.
Is hallucination avoidable?
Some theoretical work argues that hallucination cannot be fully eliminated in models trained to predict text. Kalai and Vempala (2024), for example, argued that language models calibrated to their training data must hallucinate at some rate on certain kinds of facts. Others argue that training and evaluation methods reward guessing over admitting uncertainty, and that changing these incentives would reduce hallucination. How these arguments apply to translation specifically is less studied.
Terminology
The anthropomorphism debate continues. Some researchers prefer terms such as "detached output" or "unfaithful translation" for translation errors, because these describe the observable relation between input and output without implying perception.
Limits of interpretability evidence
Logit-lens results depend on decoding intermediate states with the final layer, which may not fully reflect what those states encode. Attribution graphs capture only part of a model's computation and involve approximations. Findings from one model, such as Llama 2 or Claude 3.5 Haiku, may not generalise to others. Directly linking a specific internal mechanism to a specific hallucination in translation remains difficult.
Evaluation
Hallucinations are rare in standard test sets, which makes them hard to measure. Benchmark sets built to provoke hallucinations, such as perturbed inputs, may not reflect real-world conditions. Low-resource languages, where risk is highest, often lack good evaluation data.
See also
- Hallucination (artificial intelligence)
- Neural machine translation
- Large language model
- Transformer (deep learning architecture)
- Mechanistic interpretability
- Logit lens
- Induction heads
- Zero-shot learning
- Low-resource languages
- Interlingua (machine translation)
- Constructed language
- Confabulation
Sources
Questions people asked
What does hallucination structure in translation LLMs teach us about their internal representation?
- Meaning and output language are separate steps. Anthropic's 2025 circuit-tracing work and Wendler et al. 2024 ("Do Llamas work in English?") both found the middle layers carry the meaning in a largely language-neutral form, and the target language only gets chosen near the output. Ask for "Martian" and the meaning part works fine, since the model knows the preamble cold.
The output step has no Martian vocabulary to land on. So it falls back on the nearest thing it has: the sci-fi idea of an alien language. Apostrophes, x and q everywhere, glued-together syllables. Klingon by way of pulp magazines.
- The structure holds and the words don't. Both of your runs have the same skeleton, with aq'qanx and aq'qux in the same slots, but the roots change. That suggests the model maps the source's grammar and function words onto made-up particles quite consistently, then picks content words fresh each time. Inside one output it keeps reusing its own earlier tokens (induction-style
copying), which looks like grammar. Nothing ties those words down outside the context window, so a fresh run invents a new vocabulary.
- It isn't really translating at word level. The "Whereas" test showed that: four clauses, four different openers. The output has the look of a translation without the meaning carried across.
- The "I don't know" didn't trigger. In Anthropic's work, "can't answer" is the default, and it gets switched off when something seems familiar. "Martian" is very familiar as a concept, so the brake comes off even though no actual language sits behind it. Doing what it was asked beats checking whether the thing exists.
- The syllables are probably cheap tokens. Pieces like -enx, aq and zil are likely common subword chunks, easy to repeat. I can't check that without the tokenizer, so call it a guess.
If any of those come back consistent, I'll take part of this back.