# Evaluating Complex Entity Knowledge Propagation for Knowledge Editing in LLMs
## 3 Task Definition  
We refer to KE as the injecting or editing of factual knowledge where facts are represented as a triplet, i.e., \((h,r,t)\), where \(h\) indicates the head entity, \(r\) is the relation and \(t\) is the tail entity. For example, in the sentence, \"Golden Gate is located in San Francisco\", 'Golden Gate' is the head entity (h), 'location' is the relation (r) and 'San Francisco' is the tail entity (t). For KE, we consider editing as a request to update an existing fact that was available during the time of the training. We concentrate on setting a new tail entity \(t\to t^{\prime}\) so that a triplet \((h,r,t)\) is modified to \((h,r,t^{\prime})\). By knowledge injection, we refer to facts that are added to the LLMs that were not available during the training of the LLMs. This can be either adding an entirely new head entity along with its relation and tail entity, which means this knowledge was not at all available during the LLM training, or for an existing head entity, we can inject new knowledge containing an existing or new relation and a new tail entity for the particular head entity. Generally, kKE models follow three editing settings, i.e.,  
* Editing existing knowledge or the tail entity \((h,r,t)\rightarrow(h,r,t^{\prime})\). * Injecting or adding new knowledge (new tail entity) for an existing head entity \((h,r,\emptyset)\rightarrow(h,r,t^{\prime})\), where \(\emptyset\) represents no or a null value for the tail entity. * Editing one-to-many relations, i.e., \((h,r,t_{1},t_{2},t_{3},\ldots,t_{n})\rightarrow(h,r,t_{1},t_{2},t_{3}, \ldots,t_{n},t^{\prime})\). This includes editing or injection depending on whether the knowledge is present in the LLM or not. An example of one-to-many relations would be different information about a person, i.e., date of birth, gender, occupation, parents, siblings, etc. In this work, we propose complex entity knowledge propagation in the form of a comprehensive triplet for KE, as is shown in Figure 2. Here, the example shown is for a single path, but in our experiments, we have taken ten entities in the first hop, and then for each ten entities we have taken three relations for the rest of the hop. For a language model \(LLM_{\phi}\) with parameter \(\phi\), we take the entity and text or entity description as the input. The text about the entity is extracted from Wikipedia, and we refer to it as a description document. We then form KGs for each entity that contain all the information about the entity from the text description. A KG can be represented in the form of triplets, i.e., \((h,r,t)\), as is described above. We compose triplets into complex representations by using triplets as objects of other triplets, e.g., \"Prof. [PERSON] stays in Jeonju that is in South Korea which is located in Asia\". Here, we can represent it as \((Prof.Kim,stays,(Jeonju,located,(SouthKorea,located,Asia)))\). Instead of representing knowledge as one-to-many, as shown in Equation (1),  
\[(h,r,t)\rightarrow(h,r,t_{1},t_{2},t_{3},\dots,t_{n},t^{\prime}) \tag{1}\]  
we compose comprehensive triplets and evaluate how KE methods perform in terms of complex entity knowledge propagation. We represent triplets in the form of recursive or a chain of triplets, as shown in Equation (2)  
\[ \begin{gathered}(h,r_{1},t)\rightarrow(h,r_{1},(h_{1},r_{2},t_{2}) )\\ (h,r_{1},(h_{1},r_{2},t_{2}))\rightarrow(h,r_{1},(h_{1},r_{2},(h_{2},r_{3 },t_{3})))\\ (h,r_{1},(h_{1},r_{2},(h_{2},r_{3},t_{3})))\rightarrow(h,r_{1},(h_{1},r_{2 },(h_{2},r_{3},(h_{3},r_{4},t_{4}),\dots)))\end{gathered}  \tag{2}\]  
We then use and incorporate these comprehensive triplet representations for KE to evaluate how different KE methods perform with the proposed representation, as is depicted in Figure 3.  
We evaluate whether our hypothesis about representation through a chain of entities can improve the performance of KE methods.