Datasets:
ArXiv:
License:
File size: 3,526 Bytes
0928e34 806d57d 0928e34 983c94d 806d57d 983c94d 806d57d 983c94d 806d57d 983c94d 806d57d 983c94d 806d57d 983c94d 806d57d 983c94d 806d57d 983c94d 806d57d 983c94d 806d57d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | ---
license: cc-by-nc-sa-4.0
task_categories:
- text-generation
tags:
- knowledge-editing
- llm
- conceptual-knowledge
---
<div align="center">
**Editing Conceptual Knowledge for Large Language Models**
---
<p align="center">
<a href="https://huggingface.co/papers/2403.06259">Dataset Paper (ConceptEdit)</a> •
<a href="https://zjunlp.github.io/project/ConceptEdit">Dataset Website</a> •
<a href="https://github.com/zjunlp/EasyEdit">EasyEdit GitHub</a> •
<a href="https://huggingface.co/papers/2504.15133">Framework Paper (EasyEdit2)</a> •
<a href="https://zjunlp.github.io/project/EasyEdit2/">Framework Website (EasyEdit2)</a>
</p>
</div>
This repository contains the `ConceptEdit` dataset, which facilitates the evaluation of Large Language Models (LLMs) in open-domain natural language-driven molecule generation tasks. It is part of the `EasyEdit` framework, designed for plug-and-play adjustability in controlling LLM behaviors.
## 💡 Conceptual Knowledge Editing
<div align=center>
<img src="./flow1.gif" width="70%" height="70%" />
</div>
### Task Definition
**Concept** is a generalization of the world in the process of cognition, which represents the shared features and essential characteristics of a class of entities.
Therefore, the endeavor of concept editing aims to modify the definition of concepts, thereby altering the behavior of LLMs when processing these concepts.
### Evaluation
To analyze conceptual knowledge modification, we adopt the metrics for factual editing (the target is the concept $C$ rather than factual instance $t$).
- `Reliability`: the success rate of editing with a given editing description
- `Generalization`: the success rate of editing **within** the editing scope
- `Locality`: whether the model's output changes after editing for unrelated inputs
Concept Specific Evaluation Metrics
- `Instance Change`: capturing the intricacies of these instance-level changes
- `Concept Consistency`: the semantic similarity of generated concept definition
## 🚀 Sample Usage
You can load the ConceptEdit dataset using the `EasyEdit` framework as follows:
```python
from easyeditor import ConceptEditDataset
# For example, to load the ConceptEdit dataset
# Assuming 'data/concept_data.json' is the path to your dataset file
concept_config = ConceptEditDataset.get_hparams()
concept_train_ds = ConceptEditDataset('./data/concept_data.json', config=concept_config)
concept_eval_ds = ConceptEditDataset('./data/concept_data.json', config=concept_config)
print(f"Loaded {len(concept_train_ds)} training samples.")
print(f"Loaded {len(concept_eval_ds)} evaluation samples.")
# You can inspect a sample:
# print(concept_train_ds[0])
```
## 📖 Citation
Please cite our paper if you use **ConceptEdit** in your work.
```bibtex
@misc{wang2024editing,
title={Editing Conceptual Knowledge for Large Language Models},
author={Xiaohan Wang and Shengyu Mao and Ningyu Zhang and Shumin Deng and Yunzhi Yao and Yue Shen and Lei Liang and Jinjie Gu and Huajun Chen},
year={2024},
eprint={2403.06259},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
```
## 🎉 Acknowledgement
We would like to express our sincere gratitude to [DBpedia](https://www.dbpedia.org/resources/ontology/),[Wikidata](https://www.wikidata.org/wiki/Wikidata:Introduction),[OntoProbe-PLMs](https://github.com/vickywu1022/OntoProbe-PLMs) and [ROME](https://github.com/kmeng01/rome).
Their contributions are invaluable to the advancement of our work. |