Knowledge Base Regulation Tracker Standards & Frameworks OSS Directory AI Incident Database Research Paper Library Case Studies Society Articles News Jobs About Charter Sign inBecome a Member
Home/OSS Directory/OpenUnlearning

OpenUnlearning

Machine unlearning

Unified framework for LLM unlearning research (NeurIPS D&B 2025) with implementations of many unlearning methods, the TOFU and MUSE benchmarks and standard evaluations. Named in the taxonomy.

unlearningbenchmarkllm

Overview

OpenUnlearning is a unified framework designed to streamline research in large language model (LLM) unlearning. It consolidates implementations of multiple unlearning methods, benchmarks, and evaluation metrics into a single extensible system. The framework supports 12+ unlearning methods, 5+ datasets, 10+ evaluation metrics, and 7+ LLM architectures, making it a comprehensive tool for researchers and practitioners in the field. Its primary goal is to facilitate collaboration by allowing the addition of new benchmarks, methods, datasets, and metrics, thereby expanding its capabilities and driving progress in LLM unlearning.

It replaces the original TOFU codebase, which is no longer maintained, and integrates updated benchmarks such as TOFU, MUSE, and WMDP.

OpenUnlearning is developed by Locus Lab at Carnegie Mellon University and is open-sourced under the MIT License, ensuring accessibility and permissive use. The project encourages community contributions, with clear documentation on how to add new methods, benchmarks, and evaluation components. This collaborative approach aims to standardize unlearning research and provide a shared platform for benchmarking and comparison.

The framework’s design emphasizes efficiency and modularity, allowing users to configure experiments through Hydra configs. Additionally, OpenUnlearning integrates tools like the lm-evaluation-harness, enabling compatibility with popular LLM benchmarks such as MMLU and GSM8K.

Key updates since its launch include the addition of new unlearning methods (e.g., UNDIAL, AltPO, RMU), expanded evaluation metrics (e.g., Membership Inference Attacks, Extraction Strength), and support for additional datasets like WMDP-Bio and WMDP-Cyber. The framework also introduces a leaderboard functionality, where contributors can document and share their results, fostering transparency and reproducibility in the field.

How It Works

OpenUnlearning operates as a modular pipeline, where each component—benchmarks, unlearning methods, evaluation metrics, datasets, and model architectures—can be configured and extended independently. This modularity is achieved through a combination of Python-based implementations and configurable experiment setups managed via Hydra configs. Users can define their experiments by specifying parameters such as the unlearning method, dataset splits, evaluation metrics, and model architectures.

The framework supports three primary benchmarks: TOFU (Targeted Forgetting Under Constraints), MUSE (Measuring Unlearning via Synthetic Examples), and WMDP (Withholding Memorization via Data Partitioning).

Unlearning methods in OpenUnlearning include both gradient-based approaches (e.g., GradAscent, GradDiff) and representation-engineering techniques (e.g., RMU). These methods are applied to datasets like TOFU (with splits such as forget10, retain90) and MUSE (e.g., MUSE-News, MUSE-Books). The framework also supports a variety of evaluation metrics, categorized into utility-based (e.g., Model Utility, TruthRatio) and privacy-based (e.g., Membership Inference Attacks, Exact Memorization) metrics. These metrics provide a holistic view of unlearning effectiveness, balancing trade-offs between forgetting sensitive data and preserving model performance.

To run experiments, users follow a structured workflow: setting up the environment with Python 3.11 and required dependencies, downloading evaluation logs via setupdata.py, and configuring experiments through Hydra configs. For instance, launching an unlearning process with GradAscent on the TOFU forget10 split involves specifying the config file, dataset splits, and trainer method in a command-line interface. Similarly, evaluations are performed by referencing model checkpoints, retain logs, and benchmark-specific configurations.

OpenUnlearning also provides baseline scripts (tofuunlearn.sh, museunlearn.sh) for standard experiments, which use default hyperparameters and are designed to ensure reproducibility. These scripts serve as starting points for users to tune parameters and contribute their results to the community leaderboard. The framework’s documentation offers detailed guides on contributing new components, running evaluations, and configuring experiments, ensuring accessibility for both beginners and advanced users.

Use Cases

OpenUnlearning is primarily designed for researchers and practitioners focused on LLM privacy and unlearning. Its unified framework addresses the need for standardized evaluation and comparison of unlearning methods, which is critical for advancing the field. One key use case is benchmarking the effectiveness of unlearning techniques across different datasets and model architectures.

Another use case is the development and testing of new unlearning methods. OpenUnlearning’s extensible architecture allows researchers to integrate their own methods into the framework, test them against existing benchmarks, and compare results with community contributions. For instance, the addition of methods like UNDIAL and AltPO demonstrates how the framework can evolve to incorporate cutting-edge techniques.

The framework also supports privacy-focused applications, such as assessing the vulnerability of models to Membership Inference Attacks (MIA) after unlearning. By integrating metrics like LOSS, ZLib, and GradNorm, OpenUnlearning enables researchers to quantify privacy leakage and refine unlearning strategies to mitigate risks.

OpenUnlearning’s integration with tools like lm-evaluation-harness expands its utility to general LLM benchmarking.

Its well-documented workflows, baseline scripts, and community-driven leaderboard provide a hands-on approach to experimenting with unlearning concepts. Users can replicate published results, explore variations of existing methods, and contribute their findings, fostering a learning community around LLM privacy research.

Key Features & Capabilities

  • Unified Benchmarking Framework: OpenUnlearning consolidates three major benchmarks—TOFU, MUSE, and WMDP—into a single platform. TOFU evaluates targeted forgetting with splits like forget10 and retain90, MUSE assesses unlearning via synthetic data, and WMDP focuses on memorization risks in specific domains (e.g., Bio, Cyber).
  • Extensive Unlearning Methods: The framework supports 12+ unlearning methods, including gradient-based (GradAscent, GradDiff), optimization-based (NPO, SimNPO), and representation-engineering (RMU) techniques.
  • Comprehensive Evaluation Metrics: OpenUnlearning includes 10+ evaluation metrics, categorized into utility (e.g., Model Utility, TruthRatio) and privacy (e.g., 6 MIA variants, Extraction Strength, Exact Memorization). These metrics provide a detailed assessment of unlearning effectiveness, covering aspects like knowledge retention, privacy leakage, and model performance degradation.
  • Support for Diverse Datasets and Models: The framework supports 5+ datasets, including TOFU (with Llama-3.2, Llama-3.1, Llama-2), MUSE (Llama-2), and WMDP (Zephyr, Phi-3.5). It also accommodates models ranging from 1B to 8B parameters, ensuring scalability for different research needs. Datasets are structured with forget/retain splits, allowing precise control over unlearning experiments.
  • Modular and Extensible Architecture: OpenUnlearning’s design is built around modular components, each configurable via Hydra configs. Users can extend the framework by adding new benchmarks, methods, metrics, or datasets without modifying the core codebase. This modularity is further supported by detailed documentation on contribution workflows, making it accessible for community-driven expansions.
  • Integration with Evaluation Tools: The framework integrates with lm-evaluation-harness, enabling compatibility with popular LLM benchmarks like MMLU and GSM8K. Additionally, the framework includes scripts for baseline experiments and a leaderboard for sharing results, promoting transparency and reproducibility.
  • Community-Driven Development: OpenUnlearning encourages collaboration through its open-source MIT License and clear contribution guidelines. Users can submit new methods, benchmarks, or evaluations, with results documented in the community leaderboard.
  • Reproducibility and Standardization: The framework provides baseline scripts (tofuunlearn.sh, museunlearn.sh) that use default hyperparameters, ensuring reproducibility of results. Users are encouraged to tune these parameters and contribute their optimized methods to the leaderboard, fostering a standardized approach to unlearning research. The inclusion of detailed documentation and example commands further supports reproducibility across different environments.

Sources

Contribute

Spot an error, or know a record we should add? Members can propose additions and submit corrections.