Editing Arbitrary Propositions in LLMs without Subject Labels

Itai Feigenbaum, Devansh Arpit, Huan Wang, Shelby Heinecke, Juan Carlos Niebles, Weiran Yao, Caiming Xiong, Silvio SavaresearXiv 2024 · DOI · arXiv

Introduction

Large Language Models (LLMs) store vast amounts of factual knowledge within their weights, but this information can quickly become outdated. Traditional "Locate-and-Edit" (L&E) methods, such as ROME, attempt to update these facts surgically. However, these methods typically rely on manual "subject labels" (e.g., identifying "France" as the subject in "France is in Europe") and are often limited to simple binary relations. Researchers at Salesforce AI have developed Gradient Tracing (GT), a label-free method that enables the editing of complex, arbitrary propositions without requiring human-annotated subject labels.

Methodology: Gradient Tracing and $ROME^G$

The core of this approach is Gradient Tracing (GT), a computationally efficient technique to identify where knowledge is stored. Unlike Causal Tracing, which is slow and requires subject knowledge, GT calculates the gradient norms of the network relative to a loss function based on the probability of a desired truth value. This identifies the specific token and layer where the Multi-Layer Perceptron (MLP) component's gradient norm is maximized.

Figure 1: Heatmap showing the distribution of gradient norms across layers and token positions. GT identifies the 'knowledge neurons' by finding where the gradient spike occurs.

Following localization, the researchers use $ROME^G$, a modified version of the Rank-One Model Editing algorithm. While the standard ROME ($ROME^S$) edits at the last token of a labeled subject, $ROME^G$ targets the specific token identified by the gradient spike. By prompting the LLM (specifically Vicuna-7b) as a boolean classifier, the system treats factual updates as changes in classification outputs (True vs. False).

Datasets and Benchmarking

The study utilized three datasets to validate the method:

  1. CounterFactFalse (CFF) & CounterFactTrue (CFT): Binary propositions from the CounterFact dataset converted into a True/False format.
  2. FACT (Factual Accuracy Classification Test): A new benchmark introduced by the authors containing 1,024 complex propositions where subject labels are either unavailable or difficult to define.

Key Results and Insights

The experimental results demonstrate that $ROME^G$ achieves performance parity with label-dependent methods. On binary datasets, $ROME^G$ achieved an editing score of approximately 88%, nearly matching the 90% achieved by the label-reliant $ROME^S$. On the complex FACT dataset, $ROME^G$ achieved an editing score of 84.51%, demonstrating its utility for non-binary propositions.

Furthermore, the localization accuracy of GT was highly robust. In over 91% of cases within the binary datasets, the method naturally identified a token within the subject's span as the optimal edit point, despite having no prior information about the subject's location.

Figure 4: Localization statistics showing that Gradient Tracing identifies tokens within the subject span (subject in + subject last) as the primary edit location in over 91% of cases.

Limitations and Future Work

While effective, the current method is restricted to facts that can be framed as boolean questions. Additionally, smaller models may struggle to act as reliable boolean classifiers, which is a prerequisite for this technique. Future research will focus on extending this label-free approach to open-ended generation and developing methods to mitigate "essence drift," ensuring that editing one fact does not inadvertently degrade the model's broader conceptual understanding.

Summary updated

Abstract

Large Language Model (LLM) editing modifies factual information in LLMs. Locate-and-Edit (L\&E) methods accomplish this by finding where relevant information is stored within the neural network, and editing the weights at that location. The goal of editing is to modify the response of an LLM to a proposition independently of its phrasing, while not modifying its response to other related propositions. Existing methods are limited to binary propositions, which represent straightforward binary relations between a subject and an object. Furthermore, existing methods rely on semantic subject labels, which may not be available or even be well-defined in practice. In this paper, we show that both of these issues can be effectively skirted with a simple and fast localization method called Gradient Tracing (GT). This localization method allows editing arbitrary propositions instead of just binary ones, and does so without the need for subject labels. As propositions always have a truth value, our experiments prompt an LLM as a boolean classifier, and edit its T/F response to propositions. Our method applies GT for location tracing, and then edit the model at that location using a mild variant of Rank-One Model Editing (ROME). On datasets of binary propositions derived from the CounterFact dataset, we show that our method -- without access to subject labels -- performs close to state-of-the-art L\&E methods which has access subject labels. We then introduce a new dataset, Factual Accuracy Classification Test (FACT), which includes non-binary propositions and for which subject labels are not generally applicable, and therefore is beyond the scope of existing L\&E methods. Nevertheless, we show that with our method editing is possible on FACT.
BibTeX
@misc{feigenbaum2024editing,
  author = {Itai Feigenbaum and Devansh Arpit and Huan Wang and Shelby Heinecke and Juan Carlos Niebles and Weiran Yao and Caiming Xiong and Silvio Savarese},
  title = {{Editing Arbitrary Propositions in LLMs without Subject Labels}},
  year = {2024},
  eprint = {2401.07526},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.07526},
}
Figure