Evaluating Knowledge Interventions › Side effects and capability preservation

Michael BrenndoerferDecember 1, 20262 min read
Language AI HandbookAll chapters
Part 45 of 67Knowledge, Memory, Editing, and Unlearning
Chapter 351Evaluating Knowledge Interventions › Side effects and capability preservation
Reading section 8 of 16 · Side effects and capability preservation · 2 minSection 8 of 16 · 2 min

Section 8 of 16 · 2 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

Locality tests whether specific other facts survive. Side effects ask whether general capabilities survive. We measure a small capability battery before and after the edit and report deltas. For a toy model we can approximate a capability battery with a set of generic probes whose answers do not depend on the edited fact; a real harness would use a handful of held-out reasoning, arithmetic, and instruction-following items, or a small slice of a benchmark, and report deltas with confidence intervals.

PythonIn [23]
CollapseExpand
# A generic capability battery: pairs of (prompt, correct answer) that are
# logically independent of the edit. In a real harness these come from a
# held-out benchmark; here they're deterministic lookups on unrelated facts.
CAPABILITY_BATTERY = [
    ("The Salt Map", "publication_year", "1965"),
    ("Tide Atlas", "publication_year", "1984"),
    ("The Copper River", "author", "Jonah Reed"),
    ("The Salt Map", "author", "Iris Chen"),
]


def capability_score(model):
    correct = 0
    for subject, relation, expected in CAPABILITY_BATTERY:
        dist = model.answer_distribution(subject, relation)
        if dist and match(max(dist, key=dist.get), expected):
            correct += 1
    return correct / len(CAPABILITY_BATTERY)


base_model = ToyKnowledgeModel(KB, TEMPLATES, temperature=0.0, seed=0)
edited_model = ToyKnowledgeModel(KB, TEMPLATES, temperature=0.0, seed=0)
edited_model.edit(edit["subject"], edit["relation"], edit["new_obj"])

cap_before = capability_score(base_model)
cap_after = capability_score(edited_model)
ConsoleOut [24]
CollapseExpand
Capability battery before edit: 1.00
Capability battery after edit:  1.00
Delta: +0.00

The paired lookup controls score one both before and after. The toy edit stores the new value only under the target key. A real drop on matched controls may indicate degradation and should be interpreted with its uncertainty.

The uncertainty of a difference depends on covariance between the two measurements. Keep predictions paired for each item. A paired bootstrap can resample independent units, such as fact groups, and recompute the before/after difference on each draw.

Design side-effect batteries around failure modes

A good battery is not a random sample of tasks. It targets the failures you expect. For a fact edit, include (a) other facts about the same entity, (b) the same relation on other entities, (c) refusal/safety probes (the edit should not change whether the model declines harmful requests), and (d) fluency probes (perplexity on held-out text should not blow up). Perplexity is exactly the metric from Part II; reuse the machinery.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy