gitwtfhub

wtf is lacuna?

mcgill-nlp/lacuna — explained in plain English

Analysis updated 2026-05-18

0PythonAudience · researcherComplexity · 5/5Setup · hard

TL;DR

A research testbed for testing whether AI unlearning methods truly erase planted facts from a model's weights, not just its outputs.

Mindmap

mindmap
  root((LACUNA))
    What it does
      Plants known facts
      Tests unlearning methods
      Measures resurfacing
    Tech stack
      Python
      OLMo models
      GPU required
    Use cases
      Evaluate unlearning methods
      Study privacy leakage
      Score localization precision
    Audience
      ML researchers
      Safety and privacy teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Evaluate whether an unlearning method removes a fact from a model's actual weights

REASON 2

Measure how much forgotten personal information resurfaces after further training

REASON 3

Compare an unlearning method's effect on forget, retain, and general capability

REASON 4

Implement and benchmark a new custom unlearning method against provided baselines

What's in the stack?

PythonPyTorchCUDAOLMo

How it stacks up

mcgill-nlp/lacuna0xallam/my-recipe0xhassaan/nn-from-scratch
Stars00
LanguagePythonPythonPython
Last pushed2022-11-22
MaintenanceDormant
Setup difficultyhardmoderatemoderate
Complexity5/52/54/5
Audienceresearchergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1h+

Requires an Ampere-or-newer GPU, CUDA 12.6, and downloading tens of gigabytes of model artifacts.

Wtf does this do

LACUNA is a research testbed for studying machine unlearning, which is the problem of trying to make an AI language model forget specific pieces of information it learned during training. What makes LACUNA different is that it starts by deliberately planting made-up personal information, like fake names and email addresses, into known and exact locations inside the internal numbers of a language model, so researchers know precisely where each fact lives before they try to remove it. This lets a researcher measure something that is normally impossible to check: whether an unlearning method actually erases a fact from the specific internal parameters that stored it, or whether it merely stops the model from saying that fact out loud while the information is technically still there and can resurface later. The project calls this second, weaker outcome a resurfacing risk, since a stronger prompting method might bring the hidden fact back out. This particular repository is the evaluation release, meaning it assumes you already have one of the provided models, built on the OLMo architecture at either 1 billion or 7 billion parameters, and it walks through the steps of applying your own or an included unlearning method to it, then scoring the result. Scoring happens along three angles: whether the target information is gone while other knowledge stays intact, whether the actual correct internal weights were changed, and how much of the forgotten information comes back if the model is trained a little further on related data. Running it requires a capable GPU, a specific version of Python, and downloading large model files that can take up many tens of gigabytes of disk space, so this is squarely a tool for machine learning researchers working on model safety and privacy, not something a casual user would install. A companion branch of this same repository contains the full pipeline used to build these models from scratch, while this repository focuses only on evaluating unlearning methods against them.

Yoink these prompts

Prompt 1
Walk me through downloading the LACUNA 1B artifacts and running the GradientAscent unlearning example.
Prompt 2
Help me implement a new unlearning method using LACUNA's UnlearningMethod interface.
Prompt 3
Explain how LACUNA's localization precision metric compares weight changes to the ground-truth mask.
Prompt 4
Show me how to interpret the results.ipynb notebook output for a LACUNA evaluation run.

Frequently asked questions

wtf is lacuna?

A research testbed for testing whether AI unlearning methods truly erase planted facts from a model's weights, not just its outputs.

What language is lacuna written in?

Mainly Python. The stack also includes Python, PyTorch, CUDA.

How hard is lacuna to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is lacuna for?

Mainly researcher.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.