Knowledge editing via null-space projection
Top 91.6% on sourcepulse
AlphaEdit provides a method for targeted knowledge editing in large language models, aiming to update specific factual information while preserving existing knowledge. It is designed for researchers and practitioners working on LLM interpretability and controlled generation, offering a principled approach to minimize disruption during sequential edits.
How It Works
AlphaEdit constrains parameter perturbations to the null space of key matrices, effectively isolating the update to specific dimensions. It further removes output errors related to preserved knowledge from the objective function, allowing the model to focus solely on the knowledge update. This null-space projection ensures that the distribution of hidden representations remains invariant post-edit, enabling simultaneous knowledge update and preservation.
Quick Start & Requirements
pip install -r requirements.txt
(after cloning)./data/stats
)python3 -m experiments.evaluate \
--alg_name=AlphaEdit \
--model_name=meta-llama/Meta-Llama-3-8B-Instruct \
--hparams_fname=Llama3-8B.json \
--ds_name=mcf \
--dataset_size_limit=2000 \
--num_edits=100 \
--downstream_eval_steps=5
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
4 weeks ago
Inactive