CaKE
CaKE copied to clipboard
[EMNLP 2025] Circuit-Aware Editing Enables Generalizable Knowledge Learners
CaKE: Circuit-aware Editing Enables Generalizable Knowledge Learners
Table of Contents
- 🌟Overview
- 🔧Installation
- 🧐Analyze
- 📚Editing
- 🌻Acknowledgement
🌟Overview
This work aims to improve the knowledge editing performance under the multi-hop reasoning settings.
🔧Installation
Build the environement:
conda create -n cake python=3.10
pip install -r requirements.txt
📚Analyze
Down load the wikidata for analysis from HoppingTooLate into Analysis/datasets.
- Run
evaluate_dataset.pyto filter the data. - Run
generate_entity_description.pyto get the entity patch and relation patch. - Run
patch_activations.pyto do back-patching and cross-patching. - Run
analysis.ipynb
🧐Editing
Just run the following commond:
run.sh
🌻Acknowledgement
We thank for the project of EasyEdit, HoppingTooLate. The code in this work is built on top of these projects' codes.