Repository navigation
Add Unlearning Depth Score (UDS) metric - #208
Merged
Merged
Conversation
molereddy
requested changes
Oct 29, 2026
molereddy
left a comment
Collaborator
There was a problem hiding this comment.
Looks good, congrats on the work! Just one nit
Add the Unlearning Depth Score (https://arxiv.org/abs/2605.24614) as a TOFU metric. UDS patches hidden states of the retain model and of the evaluated model into the full model, layer by layer, and compares the resulting drops in entity log-probability to measure how much forget-set knowledge is still encoded in the evaluated model. - QAwithEntityDataset labels only the annotated entity tokens of the UDS-annotated TOFU forget10 split (jaeunglee/uds-annotated-tofu) - uds metric handler, uds and TOFU_QA_forget_entity configs - README and docs/links.md entries
gnueaj
force-pushed
the
add-uds-metric
branch
from
October 31, 2026 11:19
e75c94b to
26f1d71
Compare
molereddy
approved these changes
Oct 31, 2026
InuHund
pushed a commit
to InuHund/open-unlearning
that referenced
this pull request
Nov 9, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds the Unlearning Depth Score (UDS) (paper, code, data) as a TOFU metric. UDS patches hidden states of the retain model and of the evaluated model into the full model, layer by layer, to measure how much forget-set knowledge is still recoverable from internal representations (0 = intact, 1 = erased like the retain model).
Changes
src/evals/metrics/uds.py:udshandler (loads the full and retain models, likemia_reference)src/data/qa.py:QAwithEntityDataset, which labels only the annotated entity tokenstofu_metrics/uds.yaml,datasets/UDS_annotated_TOFU_forget10.yaml, commented-out entry ineval/tofu.yamlREADME.md,docs/links.mdNo changes to existing code paths.
Usage
Defaults target Llama-3.2-1B-Instruct on forget10. For other sizes, set
eval.tofu.metrics.uds.{full,retain}_model_path.Tests
make qualitypassessrc/eval.pyon the 1B TOFU models: retain90 = 1.000, full = 0.002, SimNPO = 0.350 with sdpa (paper: 0.351), ~40 s per model on one A6000.numpy()#203. With that fixed locally, the command above runs the full suite plus UDS.Before submitting