Evaluating Knowledge Interventions › The hazard of overlap: making validity checks executable

Michael BrenndoerferDecember 1, 20263 min read
Language AI HandbookAll chapters
Part 45 of 67Knowledge, Memory, Editing, and Unlearning
Chapter 351Evaluating Knowledge Interventions › The hazard of overlap: making validity checks executable
Reading section 5 of 16 · The hazard of overlap: making validity checks executable · 3 minSection 5 of 16 · 3 min

Section 5 of 16 · 3 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

A held-out score loses its meaning for any prompt that was already used to construct the edit. Hash the prompts to find exact reuse, and validate separately that the reference is independent.

PythonIn [16]
CollapseExpand
def prompt_hash(text):
    return hashlib.sha256(text.encode("utf-8")).hexdigest()[:16]


def find_overlaps(results, reference_slice="edit_surface"):
    ref_hashes = {
        prompt_hash(r["prompt"])
        for r in results
        if r["slice"] == reference_slice
    }
    overlaps = []
    for r in results:
        if r["slice"] == reference_slice:
            continue
        if prompt_hash(r["prompt"]) in ref_hashes:
            overlaps.append(r)
    return overlaps


overlaps = find_overlaps(all_results)

The profile below uses the same estimates and Wilson endpoints as the table. The answer rates coincide in this uncoupled lookup example, while the interval widths reflect the different slice sizes.

VisualizationOut [18]
CollapseExpand
Five points at accuracy one with vertical intervals. The one-item slices have the longest intervals.
All five toy point estimates are one. The interval for four observations extends to about 0.51, while the interval for one observation extends to about 0.21. The Wilson intervals illustrate binomial uncertainty and do not account for dependence between probes.
ConsoleOut [19]
CollapseExpand
Number of test prompts overlapping the edit surface: 0

An exact duplicate invalidates an otherwise held-out transfer claim for that item. Exclude duplicates before reporting held-out scores. Exact hashes do not detect all near-duplicates or shared underlying facts.

Run the exact check after generating the slices, since different generation paths can emit identical prompts. A reworded prompt can still reuse the same underlying fact or construction example while producing a different digest. Consult the split provenance and check plausible near-duplicates separately.

Reference answers must come from outside the model

A frequent and damaging shortcut is to compute "expected" answers by asking the un-edited model and treating its outputs as ground truth. This evaluates self-consistency under edit, not knowledge change. The reference must be an external knowledge state (the intended post-edit KB, label from a human annotator, or a verified source), derived independently of the model under test.

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