Skip to content

Add T3-Unlearning method - #196

Merged
molereddy merged 8 commits into
locuslab:mainfrom
jacob-block:add-t3-unlearning
Oct 29, 2026
Merged

molereddy merged 8 commits into
locuslab:mainfrom
jacob-block:add-t3-unlearning

Conversation

@jacob-block

Copy link
Copy Markdown
Contributor

Adds the T3-Unlearning method (Temper-Then-Tilt Unlearning: Principled Unlearning for Generative Models through Tempering and Classifier Guidance, ICML 2026).

Copilot AI review requested due to automatic review settings June 19, 2026 16:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the T3-Unlearning method (Temper-Then-Tilt) by introducing a T3 model wrapper, a dedicated unlearning trainer, and classifier-focused evaluation metrics, plus associated configs/docs/community scripts.

Changes:

  • Added T3CausalLM wrapper model with a trainable guidance head and custom generation logic.
  • Added T3 unlearning trainer that trains the classifier head using retain/forget token labels.
  • Registered new trainer/model/metrics and added configuration + documentation/community run artifacts.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/trainer/unlearn/t3.py New T3 unlearning trainer and classifier-loss computation.
src/trainer/init.py Registers the new T3 trainer.
src/model/t3.py New T3CausalLM wrapper model + config + generation utilities.
src/model/init.py Registers the new T3CausalLM model handler.
src/evals/metrics/t3.py Adds T3-specific classifier accuracy/loss metrics.
src/evals/metrics/init.py Registers the new T3 metrics.
docs/links.md Adds reference links for the T3-Unlearning paper/code.
configs/trainer/T3.yaml Adds a default Hydra trainer config for T3.
community/methods/T3/run.sh Adds a community sweep script for running T3 locally.
community/methods/T3/README.md Adds a community README with setup/citation info.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/model/t3.py Resolved
Comment thread src/model/t3.py Resolved
Comment thread src/model/t3.py Resolved
Comment thread src/model/t3.py Resolved
Comment thread src/model/t3.py Resolved
Comment thread src/trainer/unlearn/t3.py Resolved
Comment thread src/trainer/unlearn/t3.py Resolved
@jacob-block

Copy link
Copy Markdown
Contributor Author

Regarding the evaluation-loss comment, T3 intentionally discards labels and returns no causal-LM loss in normal forward. OpenUnlearning’s custom evaluators call the model directly and compute metrics from logits and labels; the T3 classifier objective is computed exclusively in T3.compute_loss. Trainer evaluation is disabled in the T3 config.

@jacob-block

Copy link
Copy Markdown
Contributor Author

Hi @Dornavineeth @molereddy - gentle ping on this PR adding T3-Unlearning. I've addressed the copilot review comments and the branch merges cleanly. Could you take a look when you get the chance? Thanks!

Brings the current main into this branch. Conflicts in docs/links.md and
src/trainer/__init__.py were additive, so the AdaPop entries from main and
the T3 entries from this branch are both kept.
Lists T3 alongside the other methods and updates the method count to 14.
molereddy
molereddy previously approved these changes Oct 25, 2026

@molereddy molereddy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good thank you! sorry for the very late turnaround. merging now.

@molereddy
molereddy self-requested a review October 25, 2026 16:54
@molereddy

Copy link
Copy Markdown
Collaborator

There are some issues identified for which I added a followup PR with some small changes which you may wanna look at. jacob-block#1

Fix T3 loading and runtime errors
@jacob-block

Copy link
Copy Markdown
Contributor Author

Thanks @molereddy ! I merged your fixes but the new push dismissed your earlier approval -- could you re-approve and merge when you get a chance?

@molereddy
molereddy merged commit 2e59261 into locuslab:main Oct 29, 2026
1 check passed
InuHund pushed a commit to InuHund/open-unlearning that referenced this pull request Nov 9, 2026

This branch was previously deployed

1 inactive deployment
tests — 53f71c43 Deployed Oct 29, 2026 by jacob-block via tests (3.11, ubuntu-latest) #142
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants