OneEdit: A Neural-Symbolic Collaboratively Knowledge Editing System

Ningyu Zhang,Zekun Xi,Yujie Luo,Peng Wang,Bozhong Tian,Yunzhi Yao,Jintian Zhang,Shumin Deng,Mengshu Sun,Lei Liang,Zhiqiang Zhang,Xiaowei Zhu,Jun Zhou,Huajun Chen
2024-09-10
Abstract:Knowledge representation has been a central aim of AI since its inception. Symbolic Knowledge Graphs (KGs) and neural Large Language Models (LLMs) can both represent knowledge. KGs provide highly accurate and explicit knowledge representation, but face scalability issue; while LLMs offer expansive coverage of knowledge, but incur significant training costs and struggle with precise and reliable knowledge manipulation. To this end, we introduce OneEdit, a neural-symbolic prototype system for collaborative knowledge editing using natural language, which facilitates easy-to-use knowledge management with KG and LLM. OneEdit consists of three modules: 1) The Interpreter serves for user interaction with natural language; 2) The Controller manages editing requests from various users, leveraging the KG with rollbacks to handle knowledge conflicts and prevent toxic knowledge attacks; 3) The Editor utilizes the knowledge from the Controller to edit KG and LLM. We conduct experiments on two new datasets with KGs which demonstrate that OneEdit can achieve superior performance.
Artificial Intelligence,Computation and Language,Databases,Information Retrieval,Machine Learning
What problem does this paper attempt to address?
### What problems does this paper attempt to solve? This paper aims to solve several key challenges in knowledge representation and management, especially combining the advantages of symbolic knowledge graphs (KGs) and large - language models (LLMs) to achieve collaborative knowledge editing. Specifically: 1. **Limitations of knowledge representation**: - **Symbolic knowledge graphs (KGs)**: Although KGs provide highly accurate and explicit knowledge representation, they face challenges in scalability and reasoning transferability. - **Large - language models (LLMs)**: LLMs can cover a wide range of knowledge domains, but they face difficulties in precise and reliable knowledge manipulation and are costly to train. 2. **Knowledge conflicts and toxic attacks**: - In the Internet environment, there is a large amount of conflicting, incorrect and toxic knowledge, which poses a major challenge to the knowledge editing system. 3. **Real - time update and maintenance**: - Once LLMs are pre - trained, their knowledge snapshots are fixed and cannot be updated in real - time, unless they are re - trained with updated data sets. This limits their effectiveness in rapidly changing fields. To solve these problems, the author introduced **OneEdit**, a neuro - symbolic collaborative knowledge editing system that uses natural language for knowledge management. OneEdit consists of three main modules: - **Interpreter**: Responsible for the natural language interaction between the user and the system and understanding the user's intention. - **Controller**: Manages edit requests from different users, uses KGs to handle knowledge conflicts and prevent toxic knowledge attacks. - **Editor**: Edits KGs and LLMs according to the knowledge provided by the controller. In this way, OneEdit aims to provide a more reliable and controllable method for knowledge representation and management, thereby overcoming the limitations of a single method. The experimental results show that OneEdit performs excellently in handling knowledge conflicts and outperforms the baseline methods on two new data sets. ### Formula summary 1. **Knowledge editing function**: \[ \begin{cases} M' = E(M,k) \\ M'(k)\neq M(k) \\ \forall k'\neq k,M'(k') = M(k') \end{cases} \] where \(M\) is the original model, \(k\) is the knowledge to be changed, \(E(ยท)\) is the knowledge editing function, and \(M'\) is the edited model. 2. **Reverse conflict handling**: \[ \text{Reverse Conflict}: \begin{cases} E_1=(s,r,o)\to(s,r,o_1) \\ E_2=(o_1,r_r,s)\to(o_1,r_r,s_2) \end{cases} \] 3. **Edit rollback**: \[ M' = E\left(M+\sum_{i = 0}^{n}\theta_i-\sum_{j = 0}^{m}\theta_j\right) \] These formulas show how OneEdit ensures the consistency and accuracy of knowledge through editing and rollback mechanisms.