---
title: "Adaptive Token Biaser: Knowledge Editing via Biasing Key Entities"
description: "Adaptive Token Biaser improves knowledge editing by raising the scores of tokens tied to a new fact and lowering those tied to an older answer."
canonical: "https://research.elamur.ai/free/en/papers/bi-2024-adaptive-token-biaser-knowledge-editing/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/bi-2024-adaptive-token-biaser-knowledge-editing/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2024](https://md.research.elamur.ai/free/en/papers/2024/) / Adaptive Token Biaser: Knowledge Editing via Biasing Key Entities

# Adaptive Token Biaser: Knowledge Editing via Biasing Key Entities

Paper · 2024 · Baolong Bi, Shenghua Liu, Yiwei Wang et al.

**Authors:** [Baolong Bi](https://md.research.elamur.ai/free/en/authors/baolong-bi/), [Shenghua Liu](https://md.research.elamur.ai/free/en/authors/shenghua-liu/), [Yiwei Wang](https://md.research.elamur.ai/free/en/authors/yiwei-wang/), [Lingrui Mei](https://md.research.elamur.ai/free/en/authors/lingrui-mei/), [Hongcheng Gao](https://md.research.elamur.ai/free/en/authors/hongcheng-gao/), Yilong Xu and [Xueqi Cheng](https://md.research.elamur.ai/free/en/authors/xueqi-cheng/) · **Year:** 2024 · **Venue:** Findings of the Association for Computational Linguistics: EMNLP 2024 · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Findings of the Association for Computational Linguistics: EMNLP 2024 · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2024.findings-emnlp.647/)
- [PDF](https://aclanthology.org/2024.findings-emnlp.647.pdf)
- [DOI 10.18653/v1/2024.findings-emnlp.647](https://doi.org/10.18653/v1/2024.findings-emnlp.647)

## Summary

Giving a language model an updated fact can change its answer to a direct question. The same update can be harder to apply when the fact is only one step in a chain of reasoning. If an edit assigns a novel to a different author, for instance, a question about the author’s citizenship requires the system to use the revised name before it can work out the country. The old name can still be the most likely continuation, even with the update in the prompt. Adaptive Token Biaser, or ATBias, addresses this conflict at the moment the system chooses what to write next. The technique works at inference time and leaves the underlying parameters and the editing prompt intact.

ATBias identifies the key entities in the supplied fact and in the answer the system would ordinarily give. At each generation step, it considers a shortlist of tokens that already have relatively high scores. It compares the text of those tokens with the names in the two sets of entities, allowing for the possibility that a name is split into several pieces. A match to the new fact raises a token’s score. A match to the older answer lowers it. In the authors’ design, a decision about an author’s name can therefore receive a targeted adjustment while the surrounding words receive no entity-based boost or penalty. The revised name, once generated, becomes part of the context for subsequent reasoning.

The authors test the technique with two in-context editing procedures, IKE and MeLLo. ATBias gives the highest accuracy in the reported comparisons on the multi-hop MQuAKE benchmarks, including subsets selected because IKE often failed on them. It also improves IKE on the one-hop CounterFact task. With MeLLo and the full edit memory, the paper reports an improvement of up to 32.3% over DeCK, an earlier decoding method. In a separate timing comparison on Llama 2-7B-Chat, decoding took 36.19 milliseconds per token with ATBias, 36.03 for the baseline, and 69.99 with DeCK. The experiments establish gains for the tested editing procedures and backbones. They measure whether supplied facts govern benchmark answers during inference.

## Deep dive: Adaptive Token Biaser: Knowledge Editing via Biasing Key Entities

Adaptive Token Biaser improves knowledge editing by raising the scores of tokens tied to a new fact and lowering those tied to an older answer. · about 33 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### When an update has consequences beyond the fact itself

A deployed language model can continue to answer questions using information it acquired during pretraining after that information has changed. The paper treats this as one source of factual hallucination, the production of claims that conflict with established information. The practical difficulty is that a useful system can contain a great deal of knowledge alongside the answer that needs correcting. Retraining to accommodate individual updates can be costly. Knowledge editing is the field’s attempt to make those updates available more directly.

There are two places the information relevant to an edit can come from. One is the system’s parameters, where the effects of pretraining are encoded. The other is the context assembled for a particular request, which can contain a fact from an external memory. The paper calls the answer associated with the first source *parametric knowledge*. In its experiments the new fact is an explicit statement supplied for the task. It can be counterfactual, meaning that the benchmark asks what follows if the statement is accepted. The evaluation then judges the response against the world stipulated by the edit.

The distinction matters because supplying a statement and getting a system to rely on it are separate events. An edit memory can contain the necessary fact, and a retriever can place it where the system can read it, yet the generated answer may still follow a familiar association. The authors call especially resistant cases *stubborn knowledge*. Their explanation is that some associations acquired during pretraining carry enough confidence to remain favored even after a prompt raises the score of the replacement. The experiments also give stubbornness an observable meaning by looking at how frequently an editing procedure fails across different questions about the same update.

The paper’s example makes the difference between direct and indirect consequences concrete. The familiar association is between *Misery* and Stephen King. The counterfactual edit assigns the book to Richard Dawkins. A question about the book’s author directly tests the replacement. A question about the author’s citizenship tests whether the replacement can be used to choose which citizenship to look up or infer. Under the scenario in the paper, the chain through King leads to the United States. The chain through Dawkins leads to the United Kingdom. A system could accurately state either person’s citizenship when asked separately and still fail the editing question by picking the wrong person at the start.

The paper calls the direct case one-hop editing and the dependent case multi-hop editing. A hop is a relationship the answer depends on. The book-to-author link and the author-to-country link have different roles in the example. The edit supplies a replacement for the former, while the rest of the answer depends on knowledge that can already be used. The benchmark puts pressure on that transfer. Repeating an edit when asked for it directly is one capability. Making the edit govern an intermediate decision inside [question answering](https://md.research.elamur.ai/free/en/concepts/question-answering/) is another.

This also explains why an editing intervention might matter before the final answer starts. In a generated reasoning chain, an intermediate name enters the context used to generate later words. If the system writes King at the authorship step, a subsequent reference to his country can be internally consistent with what it just wrote. The reasoning follows the wrong branch from the perspective of the edit. Raising the score of the relevant token at that earlier decision can change what information the remainder of generation has to work with.

#### Where earlier approaches intervene

The paper groups earlier knowledge-editing work by how it changes behavior. Parameter editing adds to or alters the weights responsible for an unwanted output. ROME, one of the comparison methods in this study, frames the edit as a constrained least-squares problem. Its intervention is a change to the system itself. The paper also describes meta-learning approaches in which a separate network learns to produce weight adjustments. Both families route the requested change through the parameters, though they obtain those adjustments in different ways. [Locating and Editing Factual Associations in GPT](https://md.research.elamur.ai/free/en/papers/meng-2022-locating-editing-factual-associations-gpt/), [Fast Model Editing at Scale](https://md.research.elamur.ai/free/en/papers/mitchell-2021-fast-model-editing-scale/).

In-context editing, abbreviated ICE, supplies new information at inference time. An edit memory stores facts or examples that can be retrieved for the current question. IKE uses demonstrations in the context to guide the response. MeLLo breaks a question into subquestions and works through the individual answers. As the paper illustrates it, MeLLo can obtain an answer based on pretraining, compare it with a retrieved fact, and use the result of that comparison to choose an intermediate answer. This creates a natural point at which the competing facts become visible. [Memory-assisted prompt editing](https://md.research.elamur.ai/free/en/papers/madaan-2022-memory-assisted-prompt-editing-improve/), [MQuAKE](https://md.research.elamur.ai/free/en/papers/zhong-2023-mquake-assessing-knowledge-editing-language/).

The authors also situate their approach among methods that modify decoding, the process that turns next-token scores into text. Contrastive Decoding compares the predictions of a stronger and a weaker system in the service of fluent, coherent generation. DoLa compares predictions associated with different depths of a network, aiming to improve factuality. The paper also describes a technique that contrasts ordinary generation with generation from a system deliberately induced to hallucinate. These approaches share the idea that the scores supplied by a single ordinary prediction can be adjusted using a second source of evidence. [Contrastive Decoding](https://md.research.elamur.ai/free/en/papers/li-2022-contrastive-decoding-open-ended-text/), [DoLa](https://md.research.elamur.ai/free/en/papers/chuang-2023-dola-decoding-contrasting-layers-improves/).

The immediate comparison is DeCK. It uses a contrast between predictions associated with the contextual update and those associated with parametric knowledge, emphasizing tokens whose probability rises when the update is supplied. It applies that contrast throughout generation. The authors see two costs in this design. Computing the comparison requires additional inference, and the adjustment can touch words that play little part in the factual conflict. A change to a connective or an ordinary word in a reasoning step can influence subsequent text even though the only contested decision was which entity to name.

ATBias narrows that intervention. It preserves the editing procedure’s responsibility for supplying relevant facts and arranging the reasoning task. It then uses the competing entity names to decide which candidate tokens should receive a score adjustment. The design depends on a practical observation about the task. The information that distinguishes the two possible reasoning chains can be concentrated in a small part of the generated text, while the rest of the sentence does the ordinary work of expressing the relation.

### The method, step by step

#### From competing facts to competing tokens

ATBias starts with the fact an in-context editor wants the system to use. It also needs a textual answer that represents the old association. For the *Misery* example, the supplied edit gives Dawkins as the author. The authors turn that statement into a fill-in-the-blank request by removing the author’s name. The resulting request can elicit King through the system’s ordinary association with the book. ATBias uses the two texts to identify terms that may distinguish an edited continuation from a continuation following the previous answer.

The elicited text is useful because it expresses a competing answer in a form that can be compared with the output. There is no search inside the weights for a record of who wrote the book. The fill-in-the-blank request treats the completion as evidence of which association the system is likely to express. A response can depend on how that request is worded, but for the algorithm its immediate role is simple. It supplies candidate entity strings for the old side of the comparison.

Entity extraction reduces each statement to strings that can be matched against pieces of generated text. A full sentence contains information that provides context for the claim, such as the relation or the subject being discussed. The authors’ example focuses attention on the names that compete for the author position. The comparison happens at a smaller unit than a complete name. Through [tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/), a name such as Dawkins can be represented by a piece corresponding to its beginning and another corresponding to its ending. The effect of the edit may depend on choosing the opening piece before a full name has appeared.

At every step, the base decoder assigns a score to each possible next token. ATBias first restricts its attention to tokens that satisfy both a probability cutoff and a ranking cutoff. It turns those tokens back into strings and checks whether any of them occur inside the entity strings. When a token is eligible for comparison, character overlap determines the size of the adjustment. The method adds support for matches to the update and subtracts support for matches to the elicited association. After the next token is chosen, the generation process continues with that token included in the prefix.

How ATBias applies an edit during generation The steps in order.

The first part of the flow can be performed when the edit is entered in memory. The rest repeats as text is generated. The two parts meet at the entity lists. Once the decoder has those lists, it can make repeated local comparisons without generating the competing factual sentence again at every token position.

#### How the decoder represents a choice

Autoregressive generation conditions each new token on what precedes it. The prefix contains the question and whatever context the editing procedure has supplied, followed by the answer tokens generated so far. The network computes a hidden representation for the next prediction and projects it to vocabulary scores, frequently called logits. A softmax converts those scores into a probability distribution. Written for one vocabulary entry, the paper’s starting point is:

```
P(x | x₍<t₎) = [softmax(ϕ(hₜ))]ₓ,   x ∈ V
```

Here `P(x | x₍<t₎)` is the probability of candidate token `x` given the prefix `x₍<t₎`. The index `t` is the position being predicted, so `<t` refers to positions before it. The hidden representation for the prediction is `hₜ`, and `ϕ` is the affine output projection. `softmax` turns the resulting vector of scores into probabilities, and the subscript `x` outside the brackets picks out the entry for `x`. The expression `x ∈ V` says that `x` belongs to the vocabulary `V`.

This distribution provides the evidence ATBias starts with. A higher probability means the current prefix gives the token more support before the entity adjustment. The paper describes ordinary decoding as selecting successive tokens from the conditional output until an end-of-sequence token is generated. The adjustment can act at any step where a candidate satisfies the relevant conditions. There is no need to preassign a position to an entire name. A token can become eligible when the prefix makes its appearance plausible.

The paper uses probability and logit terminology in describing the intervention. Its filter and its average are written in terms of probabilities, while the prose describes biasing logits. The biasing equations themselves write the signed updates in terms of `P`. The distinction matters for interpreting the mathematics. The following expressions reproduce the paper’s scoring operations, using a separate notation for the value after adjustment. A value produced by adding or subtracting a bias is a score for the prediction step. The equations do not independently establish that the adjusted values form a normalized probability distribution.

#### Preparing the entity strings

The paper represents entity extraction as an operation on factual text:

```
E𝒻 = Extract(𝒻)
```

Here `𝒻` is a collection of factual statements, `Extract` is the operation that identifies key knowledge entities and splits their text into strings for matching, and `E𝒻` is the resulting list. Applying this operation to the supplied facts produces `Eₙₑw`, the new entity list. Applying it to the elicited parametric facts produces `Eₚₐᵣₐ`, the old entity list.

The distinction between the two lists tells the decoder which direction to move a matching token’s score. The extraction operation itself has the same purpose on either side. It turns a sentence into a smaller set of comparison strings. Keeping the two collections separate preserves the source of each match. The same text can in principle occur in both, and the positive and negative passes operate on their respective lists.

The paper describes this as preprocessing for an editor such as IKE. When a new fact enters the edit memory, the system can elicit the corresponding old answer, extract both sets of entities, and keep them in a knowledge cache. At inference time the decoder can use the cached entity strings associated with the retrieved fact. This moves the induction and extraction work out of online generation. The cache stores evidence for the score adjustments, while the edit memory supplies the facts used by the underlying editor.

MeLLo offers another route to the same inputs. It already generates an answer to a subquestion based on parametric knowledge as part of deciding how that answer relates to a retrieved edit. ATBias can use the text that MeLLo produces at that stage. The paper mentions regular expressions and fine-tuned language systems as possible means of extracting entities in such a workflow. It expresses extraction as an interface and gives examples of how to obtain the inputs. The experiments do not describe a separate training objective for an ATBias network.

To show how IKE and MeLLo differ, the appendix asks for the capital of the country where Ivanka Trump’s spouse holds citizenship. IKE receives a retrieved edit in context and generates the reasoning and answer. MeLLo first identifies Jared Kushner as the spouse, then produces the United States as the parametric answer to the citizenship subquestion. The retrieved counterfactual fact gives Canada, so the intermediate answer supplied to the remaining chain is Canada. The capital question then concerns Ottawa. The citizenship step already contains the old and new answers side by side. That is the material ATBias needs for entity extraction. The claim of a single inference concerns the extra decoding mechanism and the reuse of existing work. MeLLo still has a workflow with subquestions.

#### Choosing a shortlist with two kinds of evidence

Searching the vocabulary for pieces of the new name would expose the method to many candidates that the current context barely supports. The authors make the ordinary decoder’s judgment a condition of biasing. The probability filter asks how close a candidate is to the most likely next token in relative terms:

```
Vₚᵣₒᵦ = {xₜ ∈ V : P(xₜ) ≥ α · max_{w ∈ V} P(w)}
```

Here `Vₚᵣₒᵦ` is the set of candidates that pass the probability test. `xₜ` denotes a candidate for position `t`, and `V` is the vocabulary. Within these filter equations, `P(xₜ)` abbreviates the probability of the candidate given the current prefix. The symbol `w` ranges over vocabulary entries, and `max` selects the largest probability among them. The coefficient `α` specifies what fraction of that largest probability a candidate must reach. The relation `≥` includes candidates exactly at the cutoff.

This threshold moves with the distribution. When its leading probability is larger, the threshold in probability units is larger. The reported setting is `α = 0.0005`. For a fixed distribution, lowering `α` makes this criterion more permissive. The paper pairs it with a separate control on how far down the ranking a candidate can be:

```
Vᵣₐₙₖ = {xₜ ∈ V : P(xₜ) ≥ P(Rₖ)}
```

Here `Vᵣₐₙₖ` is the set that satisfies the ranking test. `Rₖ` is the token at rank `k` when vocabulary entries are ordered by decreasing probability, and `P(Rₖ)` is its probability given the current prefix. The symbols `xₜ`, `P`, `V`, `∈`, and `≥` have the same meanings as in the probability filter. The reported setting is `k = 10`. The paper describes the rule as a top-`k` restriction. In the displayed threshold form, an exact tie at the boundary can admit scores equal to the cutoff.

The decoder uses the intersection of these sets:

```
Vₕₑₐd = Vₚᵣₒᵦ ∩ Vᵣₐₙₖ
```

Here `Vₕₑₐd` is the shortlist for the current prefix. The symbol `∩` denotes set intersection. A member of the shortlist appears in both the probability-filtered set `Vₚᵣₒᵦ` and the rank-filtered set `Vᵣₐₙₖ`.

The probability criterion is useful when the scores fall away sharply after the leading candidates. A token can be high in the relative ordering and still have weak support on the scale set by the top token. The ranking criterion is useful when more candidates satisfy the probability test than the decoder needs to compare with the entity strings. Together the rules constrain both the plausibility of a match and the amount of matching work. They also give the method a specific dependency. A fragment of the updated name can receive a boost only after it survives this first selection.

The paper expresses the resulting mask as a piecewise score:

```
Pբᵢₗₜ(xₜ) = P(xₜ) if xₜ ∈ Vₕₑₐd, and −∞ otherwise
```

Here `Pբᵢₗₜ` denotes the filtered score, `P(xₜ)` is the original conditional probability of candidate `xₜ`, and `Vₕₑₐd` is the current shortlist. The membership test `∈` selects the first case. The symbol `−∞` is the exclusion mask for the second case. It is used to rule out a token during prediction.

There are consequently two distinct effects to keep in view when interpreting the authors’ claim of selective intervention. The shortlist changes which candidates can compete, including candidates unrelated to the edit. Within that shortlist, the signed entity adjustments are localized to matching strings. An ordinary word can retain its original score while a nearby entity token gets a different score, and their relative chances of selection can still change.

#### Matching a piece of a name

Each retained token is decoded into a text string. ATBias compares this string with the split entity strings prepared earlier. The pseudocode checks containment first. A candidate string must occur inside an entity string before the method calculates their overlap. That gives a piece of a name a way to qualify even when it is shorter than the full entity. It also makes spelling central to the match. An unrelated string with a few shared character sequences does not pass the containment check merely because it shares those sequences.

For a string that passes, the decoder calculates sets of character [n-grams](https://md.research.elamur.ai/free/en/concepts/n-gram/). An n-gram is a run of `n` consecutive characters. A window slides through the string to find those runs, and the method keeps the resulting set. The characters can be near the beginning, middle, or end of the entity. A substring beginning or ending at a token boundary can share its local character runs with a much longer name. The reported experiments use `n = 2`, so the sets consist of adjacent character pairs.

The paper measures similarity with the Jaccard coefficient:

```
sim(xₜ, eᵢ) = |g(xₜᵈ) ∩ g(eᵢ)| / |g(xₜᵈ) ∪ g(eᵢ)|
```

Here `sim` is the similarity between candidate token `xₜ` and entity string `eᵢ`, where `i` indexes the strings in the relevant entity list. The symbol `xₜᵈ` is the text obtained by decoding `xₜ`. The function `g` maps each input string to its set of character n-grams. The operator `∩` selects the n-grams in both sets, `∪` collects those in either set, and the vertical bars denote the number of elements in a set. The slash divides the size of the intersection by the size of the union.

This score distinguishes a fragment that covers much of an entity from one that is contained in the entity but accounts for little of its spelling. Only shared n-grams contribute to the numerator. Character runs elsewhere in the name can still contribute to the union, reducing the weight of a short match. The method can thus assign a partial boost to a fragment before the decoder has committed to producing the rest of the entity. The next generation step will condition on whichever fragment was actually selected.

The two stages of comparison do different work. Containment makes a candidate eligible, while the n-gram overlap grades that eligible match. Both work on text rather than vocabulary identifiers. The same entity string can therefore be compared with different pieces that might be available to the decoder at different positions. This is particularly relevant to the paper’s example in which the opening of Dawkins and its remaining letters can appear as separate tokens.

#### Scaling and applying the bias

The decoder computes the mean probability among the retained candidates:

```
P̄ = (∑_{xₜ ∈ Vₕₑₐd} Pբᵢₗₜ(xₜ)) / |Vₕₑₐd|
```

Here `P̄` is the average for the current step. The summation sign `∑` adds the filtered values `Pբᵢₗₜ(xₜ)` over candidate tokens `xₜ` belonging to `Vₕₑₐd`. The notation `|Vₕₑₐd|` is the number of retained candidates, and the slash divides the summed values by that count. The eligible candidates retain their original conditional probabilities at this point, so the excluded scores do not enter the average.

The mean gives the adjustment a scale derived from the current distribution. The overlap score supplies the strength of the match, the mean scales it to the current shortlist, and a coefficient controls the size of the intervention. For a qualifying match to a new entity, the paper writes the update as:

```
Pₐdⱼ(xₜ) = Pբᵢₗₜ(xₜ) + λₙ · P̄ · sim(xₜ, eᵢⁿ)
```

Here `Pₐdⱼ(xₜ)` is the adjusted score of candidate `xₜ`, and `Pբᵢₗₜ(xₜ)` is its filtered starting score. `λₙ` is the coefficient for enhancing new knowledge, `P̄` is the mean over the shortlist, and `sim(xₜ, eᵢⁿ)` is the similarity to the `i`th string `eᵢⁿ` in the new entity list. The centered dots denote multiplication, and addition raises the candidate’s score by the resulting amount. The reported setting is `λₙ = 25`.

For a match to a string associated with the original answer, the sign changes:

```
Pₐdⱼ(xₜ) = Pբᵢₗₜ(xₜ) − λₚ · P̄ · sim(xₜ, eᵢᵖ)
```

Here `Pₐdⱼ(xₜ)` and `Pբᵢₗₜ(xₜ)` again denote adjusted and filtered scores, `λₚ` is the coefficient for suppressing parametric knowledge, and `P̄` is the same shortlist mean. The entity string `eᵢᵖ` is the `i`th member of the parametric list, and `sim(xₜ, eᵢᵖ)` is the candidate’s similarity to that string. The product is subtracted from the starting score. The reported setting is `λₚ = 1`.

The equations show the contribution of each kind of match. In the pseudocode, the decoder computes the mean before making the changes and then updates each candidate as it loops over the new and old entity strings. A candidate qualifying against several strings can accumulate several contributions. If it matches a string on each side, the updates can pull in opposite directions. The asymmetric coefficients let a new match receive stronger encouragement while keeping the penalties for old matches smaller at the reported settings.

The selected token becomes part of the next prefix. In the book example, increasing support for a piece of Dawkins can affect which author is written in the reasoning. Once the new name appears, the existing decoding process can use it when generating the country. ATBias has altered the local choice where the facts competed. The downstream answer still depends on the original editing workflow making the remaining connections correctly.

### Experiments and results

#### What the comparisons measure

The main multi-hop experiments use [MQuAKE](https://md.research.elamur.ai/free/en/papers/zhong-2023-mquake-assessing-knowledge-editing-language/), a question-answering benchmark built around counterfactual edits and their consequences. The paper reports results on MQuAKE-3K, MQuAKE-2002, and MQuAKE-Hard. CounterFact supplies the one-hop task. The authors also construct Stubborn subsets from MQuAKE-3K by selecting cases that IKE often fails to edit. Each of these settings addresses a different question about the method. Direct questions test whether the new fact can govern a single answer, while multi-hop questions test whether it can govern a chain that reaches a different answer.

The backbones are Llama 2-7B-Chat, Llama 2-13B-Chat, and Mistral-7B-Instruct, with the CounterFact comparison reported for the Llama 2 sizes. ROME serves as a parameter-editing baseline and is run through EasyEdit. The in-context baselines are IKE and MeLLo, and the decoding comparison adds either DeCK or ATBias to the corresponding editor. The authors implement IKE with multi-hop demonstrations and [chain-of-thought prompting](https://md.research.elamur.ai/free/en/papers/wei-2022-chain-thought-prompting-elicits-reasoning/) to elicit intermediate reasoning. MeLLo already produces the parametric answers ATBias needs for its comparisons. [Llama 2](https://md.research.elamur.ai/free/en/papers/touvron-2023-llama-2-open-foundation-fine/), [Mistral 7B](https://md.research.elamur.ai/free/en/papers/jiang-2023-mistral-7b/), [EasyEdit](https://md.research.elamur.ai/free/en/papers/wang-2024-easyedit-easy-use-knowledge-editing/).

The primary outcome is accuracy on the task questions. The latency experiment separately reports milliseconds per generated token and throughput in tokens per second. The paper varies how many instances supply edited facts to the retrieval memory. The IKE experiment uses an edit-memory batch size of `1` to probe direct editing, and the discussion specifies `1,000` instances for that experiment. The MeLLo comparison uses a full edit memory and reports results on `500` multi-hop instances. These are distinct experimental setups. Their accuracy levels establish how methods behave against the baselines within each setup.

#### Multi-hop editing with IKE

The cleanest comparison for the effect of decoding in the single-item memory experiment is IKE, IKE with DeCK, and IKE with ATBias on the same backbone and benchmark. ROME provides a comparison with an intervention at the parameter level. On MQuAKE-3K with Llama 2-7B-Chat, plain IKE performs well above ROME. Both decoding methods improve IKE, and ATBias records the highest accuracy of the methods in that setting.

Multi-hop accuracy on MQuAKE-3K with Llama 2-7B-Chat and a single-item edit memory ATBias gives IKE the highest accuracy among the compared editors and decoding methods.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| ROME | 18.2 |
| IKE | 85.4 |
| IKE with DeCK | 91.3 |
| IKE with ATBias (this paper) | 93.1 |

On MQuAKE-2002 with the same backbone and memory setting, ROME reaches 19.1% accuracy, plain IKE reaches 85.1%, and IKE with DeCK reaches 89.4%. IKE with ATBias reaches 92.3%. On MQuAKE-Hard, ROME records 15.7% and plain IKE records 88.9%. The two decoding enhancements reach 98.6% with DeCK and 98.8% with ATBias. That last result is a narrow advantage in a setting where the stronger comparison already answers most questions correctly.

The Llama 2-13B-Chat results have a different starting point. On MQuAKE-3K, ROME reaches 39.4% accuracy and IKE reaches 63.8%. DeCK raises IKE’s result to 84.6%, and ATBias gives 89.7%. On MQuAKE-2002, the four accuracy values are 39.7% for ROME, 64.1% for IKE, 84.4% for IKE with DeCK, and 87.6% for IKE with ATBias. On MQuAKE-Hard, ROME achieves 35.2%, IKE 55.2%, IKE with DeCK 89.7%, and IKE with ATBias 91.2%. The small and large Llama 2 backbones show the same ordering among the IKE variants while starting at different accuracies.

Mistral-7B-Instruct gives lower absolute accuracy for the in-context methods in this comparison. On MQuAKE-3K, ROME reaches 28.1%, plain IKE 34.1%, IKE with DeCK 46.7%, and IKE with ATBias 47.6%. On MQuAKE-2002, ROME achieves 30.2% accuracy and IKE achieves 35.6%. The decoding-enhanced IKE variants reach 48.5% with DeCK and 48.7% with ATBias.

On MQuAKE-Hard with Mistral-7B-Instruct, the strongest method in the row is ROME at 26.3% accuracy. IKE achieves 15.6%, DeCK-enhanced IKE 19.2%, and ATBias-enhanced IKE 22.6%. The ATBias result still leads the in-context variants being compared. The ROME result qualifies the paper’s general description of ATBias as consistently best in the single-item comparison. The reported ordering is consistent within the IKE variants across the backbones and datasets, with a parameter-editing baseline ahead in this particular setting.

#### Multi-hop editing from the full memory

MeLLo changes the context in which the decoding intervention is used. The system has the full editing memory, retrieves facts as it works through the question, and handles the chain through subquestions. A successful token adjustment takes place inside that longer process. The evaluation asks whether its benefit survives the retrieval and intermediate decisions required to get a final answer.

Multi-hop accuracy on MQuAKE-3K with Llama 2-13B-Chat and the full MeLLo edit memory ATBias improves MeLLo more than DeCK in this full-memory comparison.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| MeLLo | 33.4 |
| MeLLo with DeCK | 36.8 |
| MeLLo with ATBias (this paper) | 48.7 |

The authors describe the full-memory comparisons as yielding an improvement of up to 32.3% over DeCK. The chart gives the reported accuracy levels for the Llama 2-13B-Chat comparison on MQuAKE-3K. On MQuAKE-2002 with that backbone, accuracy is 35.9% for MeLLo, 38.2% with DeCK, and 43.6% with ATBias. On MQuAKE-Hard, the corresponding results are 3.9% for MeLLo, 6.2% with DeCK, and 6.7% with ATBias. The difference between benchmark columns is substantial even when the method ordering is the same. The hardest full-memory setting for this backbone remains difficult after the intervention.

With Llama 2-7B-Chat on MQuAKE-3K, plain MeLLo reaches 32.6% accuracy, DeCK-enhanced MeLLo reaches 43.1%, and ATBias-enhanced MeLLo reaches 54.3%. On MQuAKE-2002, the results are 40.8% for MeLLo, 45.8% with DeCK, and 48.9% with ATBias. On MQuAKE-Hard, the respective accuracies are 5.1%, 5.8%, and 6.3%. The results show that the gain from the decoding change can appear in both a setting where the final accuracy is comparatively high and one where most questions remain unsolved.

For Mistral-7B-Instruct, plain MeLLo reaches 21.8% on MQuAKE-3K. The result with DeCK is 21.3%, while the result with ATBias is 24.7%. On MQuAKE-2002, the accuracies are 22.8% for MeLLo, 22.9% with DeCK, and 25.4% with ATBias. On MQuAKE-Hard, they are 2.1%, 2.6%, and 3.1%, respectively. The comparisons show both the consistency of ATBias’s ranking within these MeLLo experiments and the variation in the practical size of the gain. The best decoder in a row can still leave the majority of the underlying editing task unresolved.

#### Direct edits and stubborn cases

The CounterFact experiment tests answers that require the changed fact directly. With Llama 2-7B, IKE reaches 98.37% on the one-hop task. DeCK takes it to 98.65%, and ATBias takes it to 99.42%. With Llama 2-13B, IKE reaches 93.76%, IKE with DeCK 94.23%, and IKE with ATBias 95.35%. The high IKE starting points leave comparatively little room for improvements. The one-hop result shows that the decoding adjustment can help when the edited entity is part of the direct answer as well as when an edit must carry through to a downstream question.

The Stubborn analysis approaches difficulty by selecting questions based on observed behavior. The authors take instances from MQuAKE-3K and ask how frequently IKE fails when the same knowledge is probed with different questions. The `> 33%` subset contains instances where its editing failure rate exceeds 33%. The `> 67%` subset requires a failure rate above 67%. These are thresholds for selecting examples. They are separate from the accuracy subsequently reported for each method on the selected examples. The paper builds the subsets for each backbone and uses an edit-memory batch size of `1` for the IKE variants.

For Llama 2-7B-Chat on Stubborn `> 33%`, IKE reaches 56.4% accuracy, IKE with DeCK 72.3%, and IKE with ATBias 73.9%. On Stubborn `> 67%`, the same variants reach 37.8%, 55.9%, and 57.8% accuracy. ROME reaches 17.7% and 19.3% on these subsets, respectively. The stronger failure threshold clearly identifies a group where the prompt-based editor has difficulty. The decoding methods recover some answer accuracy in both groups.

For Llama 2-13B-Chat, ROME reaches 42.5% on Stubborn `> 33%` and 40.2% on Stubborn `> 67%`. Plain IKE scores 38.9% and 29.4% on the corresponding subsets, below ROME in both. The decoding comparison goes in a different direction. On Stubborn `> 33%`, IKE with DeCK reaches 70.1% and IKE with ATBias 71.6%. On Stubborn `> 67%`, the results are 48.5% with DeCK and 56.5% with ATBias. These values show why the authors distinguish editing by prompting from editing by prompting plus an intervention at token selection.

With Mistral-7B-Instruct on Stubborn `> 33%`, ROME reaches 19.7% accuracy, IKE 20.7%, IKE with DeCK 26.5%, and IKE with ATBias 33.2%. On Stubborn `> 67%`, ROME reaches 18.5%, IKE 17.9%, IKE with DeCK 22.6%, and IKE with ATBias 27.9%. Across these selected subsets ATBias is the highest-scoring method in each reported row. The absolute accuracies show that the method reduces the difficulty of the cases without resolving it.

#### Decoding speed

The timing experiment measures the cost at generation time. DeCK compares two generated sequences during decoding. ATBias uses a shortlist from the current prediction and compares it with the available entity strings. The measured latency of ATBias is close to the baseline on both Llama 2 backbones.

Decoding latency with Llama 2-7B-Chat ATBias stays close to baseline decoding latency while DeCK takes longer per token.

**The numbers**

| System or setting | ms/token |
| --- | --- |
| Baseline | 36.03 |
| DeCK | 69.99 |
| ATBias (this paper) | 36.19 |

On Llama 2-7B-Chat, the corresponding throughputs are 27.76 tokens per second for the baseline, 14.29 for DeCK, and 27.64 for ATBias. On Llama 2-13B-Chat, latency is 51.41 milliseconds per token for the baseline, 94.08 for DeCK, and 49.11 for ATBias. The throughputs for that backbone are 19.45 tokens per second for the baseline, 10.63 for DeCK, and 20.36 for ATBias.

The authors report an ATBias latency factor of 1.01 on Llama 2-7B-Chat, using the baseline as the reference. On Llama 2-13B-Chat the measured value falls below baseline latency in this run. The result supports the claim that the biasing step can operate close to ordinary decoding cost in the reported configuration. The timing measures decoding after the necessary inputs are available, so the route by which the method acquires its entity strings still matters when assessing the cost of the complete editing workflow.

### What the ablations show

#### Both filter criteria matter in the tested configuration

The filter comparison isolates the way candidates are chosen for matching. The paper compares a probability-only shortlist, a ranking-only shortlist, and the intersection of the two. On Llama 2-7B, the reported editing accuracies are 90.2% with probability filtering, 81.5% with rank filtering, and 93.1% with both. On Llama 2-13B, the corresponding results are 81.9%, 72.4%, and 89.7%. The combined settings reproduce the full IKE with ATBias values reported for those sizes on MQuAKE-3K.

Probability filtering on its own comes closer to the combined result on both sizes. An ordering on its own cannot express how far a candidate’s probability is from the leader’s. A cutoff based on the leading probability supplies that information, but leaves the number of eligible candidates to the shape of the distribution. The intersection gives ATBias both forms of selectivity. The ablation compares their effect on editing accuracy. The timing comparison gives the separate evidence for the efficiency of the full method.

The appendix varies each filter parameter while evaluating IKE on MQuAKE-3K with the two Llama 2 chat backbones. It identifies `α = 0.0005` as the best probability cutoff among the tested settings and `k = 10` as the best rank cutoff among those tested. The two findings make sense together. The probability criterion can be relatively permissive while the rank criterion keeps the candidate set narrow. In the displayed probability rule, a smaller `α` lowers the cutoff. The empirical finding is that the selected setting gives the best reported editing result within the comparison, while the combined filter supplies the overall restriction.

The choice of cutoff affects the opportunity to make an edit. A tighter filter can discard a fragment of the updated name before entity matching begins. A looser one leaves additional candidates available for boosts or penalties, including fragments with weak contextual support. The parameter sweeps show that this tradeoff affects answer accuracy in the benchmark. The paper uses the resulting configuration across the reported evaluations.

#### Matching fragments and weighting the two directions

The n-gram ablation changes the unit of textual comparison. The appendix reports that `n = 2` gives the best editing performance in its comparison on MQuAKE-3K with IKE. The paper describes a decline when the character units are too coarse or too fine for useful matching. Small units can provide overlap for fragments whose resemblance is weak. Larger units require longer contiguous character runs, which can be scarce when a tokenizer splits a name. Adjacent character pairs gave the best result in this setup.

The new-knowledge coefficient controls how strongly the method pushes a matching token towards selection. On the Llama 2-7B configuration, the appendix reports 90.5% accuracy at `λₙ = 20`, 93.1% at `λₙ = 25`, and 92.7% at `λₙ = 30`. For Llama 2-13B, the corresponding MQuAKE-3K accuracies are 86.6%, 89.7%, and 88.9%. Both comparisons favor the middle tested value. The higher coefficient supplies a larger boost mathematically, yet that change gives lower observed editing accuracy than the chosen value in both runs.

The old-knowledge coefficient provides a more direct test of whether the old side of the comparison contributes. Setting `λₚ = 0` removes the penalty for parametric matches while retaining the method’s other operations. On Llama 2-7B in the appendix’s IKE experiment, accuracy is 85.9% at `λₚ = 0`, 93.1% at `λₚ = 1`, and 88.6% at `λₚ = 2`. The Llama 2-13B figures are 70.2%, 89.7%, and 83.2%, respectively. The benefit therefore includes an effect from suppressing the competing association. Simply boosting the new entity gives a weaker result in these runs.

The decline at the larger penalty also helps interpret why the authors use separate coefficients. They suggest that a strong penalty can hurt when the text match implicates a token that the current reasoning would otherwise use appropriately. A candidate may match a fragment of the old entity by spelling without serving as that entity in the current sentence. The results support a moderate penalty in this setting. The paper offers the accidental-match explanation as a reason that increasing the penalty can hurt, while the ablation itself measures final answer accuracy.

#### Watching the next-token competition change

The diagnostic analysis examines a more immediate outcome than final accuracy. It tracks the first token of entities representing the supplied fact and the parametric answer. For Llama 2-7B-Chat on the Stubborn `> 33%` subset, the paper compares normalized scores and ranks before and after adding ATBias to IKE. With ATBias, more of the new-entity tokens appear in the higher-probability region, and their ranks improve. The old-entity tokens show the reverse trend in the authors’ analysis.

That comparison connects the score rule with something visible in generation. The equations specify changes to eligible matches. The diagnostic checks whether the leading fragments of the disputed entities actually move in the intended directions across examples. An earlier rank matters because the first piece of a name can determine which continuation is feasible. If the decoder starts the revised name, its own prefix can then support the remaining pieces and change what the next reasoning step is about.

The diagnostic still has a local unit of observation. It follows the first fragment of the new and old entities, and the results evaluate the completed benchmark answers separately. The paper’s illustration of a changed author leading to a changed country brings those levels together in a single example. The distributional analysis shows that the local movement happens across a selected group of difficult cases. The task accuracy shows that, in some of those cases, the process also produces the edited answer.

There is a distinction between this evidence and the authors’ broader explanation for the gains over DeCK. The new-entity ranks, the old-entity penalties, and the filter ablations demonstrate several parts of the proposed mechanism. Final accuracy measures the outcome of the whole procedure. The claim that selective bias avoids incidental reasoning errors is a plausible account of the advantage in longer pipelines, and the paper illustrates how a changed intermediate entity can help. It gives no separate error count for cases in which a non-entity word was changed and caused the reasoning to fail.

### Limitations

#### Limits stated by the authors

The authors identify two gaps in coverage. The backbones belong to the Llama 2 and Mistral configurations described in the experiments. The results establish how the method behaves there, while effectiveness on other language systems remains an open question. The in-context evaluation likewise studies IKE and MeLLo. The authors expect the technique to be usable with other editors, but report direct evidence for those two.

These limits are consequential because ATBias relies on the shape of the next-token distribution and on the way names are split into tokens. A different tokenizer can expose different fragments of the same entity to the comparison. A different backbone can assign a very different rank to the opening fragment. An editor that already emits a parametric answer supplies an input ATBias can reuse. An editor that provides only the new fact needs a way to obtain the competing answer. The two integrations tested in the paper cover examples of both routes, while transfer to another system remains an empirical question.

#### Limits visible in the evaluation and design

The benchmarks measure acceptance of a supplied fact and the ability to reason from it. In the counterfactual tasks, accuracy is assessed against the requested change. The system can succeed by relying on the stipulated information even when that information conflicts with the unedited benchmark scenario. This is an appropriate test of editability. It leaves a separate question about factual reliability in ordinary use, where someone would need evidence that an update is current and trustworthy. The method receives the new side of the comparison from the editing workflow.

The results also describe an inference-time effect. The edit memory, retrieved context and decoder adjustments account for the improved answer in the experimental setup. Because the technique works by changing predictions during generation, the measured success should be understood in that setting. A future request would need access to the relevant editing information and a prediction path on which the method could act. The paper evaluates behavioral propagation through related benchmark questions, with the editing procedure still active.

The Stubborn subsets are selected from cases where IKE frequently fails and are constructed separately for the tested backbones. This gives the paper a useful stress test of an editor precisely where it has trouble. It also makes the subset definition dependent on the procedure used to find the cases. Accuracy on those subsets describes recovery conditional on earlier IKE difficulty. Comparing scores across backbones on their respective Stubborn subsets cannot on its own establish which backbone holds a given factual association more strongly. The overall tables also combine backbones that differ in size or training. The authors interpret some of the gaps as evidence of greater stubbornness, while the setup leaves multiple factors varying together.

The single-item and full-memory experiments likewise answer different empirical questions. IKE receives a much more restricted edit memory in the first experiment, whereas MeLLo performs retrieval and reasoning with the full edit memory in the second. They also use different instance counts. Raw accuracy across those tables cannot isolate the effect of memory size, the interface to the decoder, or the selection of questions. Within each table, the with-and-without comparisons for the same editor provide a clearer estimate of what adding ATBias does in that workflow.

The shortlist introduces a specific ceiling on what the bias can recover at a given step. A token excluded by the probability or rank criterion receives the exclusion score before the entity comparison. A relevant update whose first fragment is far from the top of the distribution can therefore be present in the prompt and in the cache with no eligible token to boost. The filters trade that reach for plausibility and computation. Their tested settings give the best accuracy in the reported ablations, while the degree of tradeoff can depend on the underlying decoder and task.

The text matching imposes another condition. The decoder looks for containment and shared character sequences. A candidate that expresses the same information through an alias or an alternative spelling has to match the strings actually placed in the entity list to receive the intended bias. Conversely, a short fragment can occur in unrelated names or words. The probability and rank tests narrow that exposure, and the suppression ablation shows why the strength of a penalty matters. They also make the quality of entity extraction part of the editing system’s performance. The paper illustrates the extraction procedure and lists possible implementations without reporting a separate accuracy evaluation of the extracted entities.

The scoring notation leaves implementation details open. The formulas use probabilities to define the shortlist and its average, put an exclusion mask on filtered-out tokens, and apply signed adjustments to candidate scores. Read as a literal probability update, an additive penalty could produce a negative value, and the resulting scores need not sum to a probability distribution. The paper describes the operation as logit biasing but does not specify an explicit normalization step in these equations. The matching rule also leaves edge cases such as an empty n-gram union unspecified. These details matter for reproducing the exact behavior of a decoder, even though the paper’s experiments provide concrete settings for the components it varies.

Finally, the timing numbers describe decoding. When the old association is induced and the entity strings are extracted offline, the work has been moved to the time an update enters the cache. When MeLLo supplies the parametric answer itself, the decoder can reuse an existing output, with extraction still needed to prepare the match strings. Those arrangements explain why the reported online comparison can be close to baseline latency. The paper gives separate evidence for the decoding cost and benchmark accuracy, with no full accounting of cache construction, retrieval, or extraction costs across the tested workflows.

### What came after

[Decoding by Contrasting Knowledge](https://md.research.elamur.ai/free/en/papers/bi-2025-decoding-contrasting-knowledge-enhancing-large/) is connected to ATBias in both directions. The paper compares against the earlier DeCK method under that title, while the later work is listed as citing ATBias. The DeCK method described in the paper uses the difference between predictions associated with the supplied edit and predictions associated with parametric knowledge to give the edit more influence over generation. ATBias narrows the intervention to plausible token strings associated with either of the competing facts. The citation connects the later work to that comparison. The documented methodological relationship runs from the earlier DeCK approach to ATBias.

[HiddenGuard](https://md.research.elamur.ai/free/en/papers/mei-2026-hiddenguard-fine-grained-safe-generation/) cites ATBias and names fine-grained safe generation with a specialized representation router as its subject. The point of contact visible from the title is selective control during generation. The ATBias experiments concern factual edits and use entity strings to select which candidate scores to change. The citation and title establish the connection at that level, with the role of ATBias in the router and any use of its matching procedure left unspecified.

[a1: Steep Test-time Scaling Law via Environment Augmented Generation](https://md.research.elamur.ai/free/en/papers/mei-2026-a1-steep-test-time-scaling/) also cites ATBias. Its title places the intervention at test time and identifies environment-augmented generation as the approach. ATBias likewise intervenes during inference, using the old and new entity strings available to an editing workflow. The citation establishes that the later work refers to ATBias. How it uses the reference, and whether any part of the entity-based decoder carries into its method or experiments, remains unspecified.

## Cite

Cite as Baolong Bi, Shenghua Liu, Yiwei Wang, Lingrui Mei, Hongcheng Gao, Yilong Xu and Xueqi Cheng. 2024. Adaptive Token Biaser: Knowledge Editing via Biasing Key Entities. Findings of the Association for Computational Linguistics: EMNLP 2024.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2024.findings-emnlp.647](https://doi.org/10.18653/v1/2024.findings-emnlp.647)

```bibtex
@inproceedings{bi2024adaptive,
  title = {{Adaptive Token Biaser: Knowledge Editing via Biasing Key Entities}},
  author = {Baolong Bi, Shenghua Liu, Yiwei Wang, Lingrui Mei, Hongcheng Gao, Yilong Xu and Xueqi Cheng},
  booktitle = {Findings of the Association for Computational Linguistics: EMNLP 2024},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.647},
  url = {https://doi.org/10.18653/v1/2024.findings-emnlp.647}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
