LeKUBE: A Legal Knowledge Update BEnchmark

Changyue Wang, Weihang Su, Hu Yiran, Qingyao Ai, Yueyue Wu, Cheng Luo, Yiqun Liu, Min Zhang, Shaoping Ma

TL;DR

This paper introduces LeKUBE (Legal Knowledge Update BEnchmark), the first benchmark specifically designed to evaluate how well Large Language Models (LLMs) update their internal knowledge when laws change. By testing state-of-the-art knowledge editing and retrieval methods on Chinese statutory updates, the authors reveal a massive gap between open-domain editing techniques and the complex, structured demands of the legal domain.

What Problem Does This Paper Address?

Laws are not static; statutes are constantly revised, amended, or reinterpreted. For legal LLMs to remain useful in practice (e.g., for legal consultancy), they must adapt to these updates efficiently.

However, existing knowledge-updating benchmarks are designed for the open domain, focusing on short, simple facts (e.g., changing a celebrity's birthplace). The legal domain introduces unique challenges:

  1. Length and Complexity: Legal statutes are long and intricate. While a typical open-domain target fact averages around 6 characters, a Chinese criminal law article averages over 135 characters.
  2. Intricate Reasoning: Updating a law isn't just about memorizing a new sentence; it alters the logic required to solve legal cases. Models must understand whether to apply old or new laws based on specific temporal and situational context.

Methods

The authors evaluate knowledge update methods across five core dimensions adapted for the legal domain: Accuracy, Generality, Locality, Scalability, and Retainability.

They test two primary paradigms of knowledge updating:

  • Non-parametric Strategies: Methods that don't alter model weights but inject new knowledge via context, specifically Retrieval-Augmented Generation (RAG) using lexical matching (BM25) and dense retrieval (Lawformer).
  • Parametric Strategies: Methods that modify model parameters. This includes standard Fine-Tuning (Full FT and LoRA) and specialized Model Editing techniques:
  • Knowledge Neurons (KN): Modifies specific neurons associated with facts.
  • Rank-One Model Editing (ROME): Directly writes new key-value pairs into the model's feed-forward layers.
  • Self-Edit: Uses the model to generate question-answer pairs about the new knowledge to use as fine-tuning data.

Datasets

The authors introduced the LeKUBE benchmark, focusing on the Chinese legal system (specifically the Criminal Law and Civil Code). Developed with law school annotators, the dataset consists of:

  • 180 updated statutes and 60 non-updated statutes (used to test if unrelated knowledge is preserved).
  • 642 True/False questions to evaluate the model's grasp of specific statutory changes.
  • 180 Multiple-Choice Questions (MCQs) based on legal scenarios or fictional cases where the correct answer changes before and after the statute update.

Key Insights and Ideas

  • The Recitation vs. Retrieval Paradox: Parametric methods (like Full Fine-Tuning and Self-Edit) are excellent at verbatim recitation of new laws but fail miserably at reverse lookup (identifying which clause a text belongs to). Conversely, non-parametric RAG methods easily handle reverse lookups but struggle to accurately recite the exact statutory text from memory.
  • Model Editing Breaks Instruction Following: Advanced editing techniques like ROME and Self-Edit severely damage the model's fundamental ability to follow instructions, leading to gibberish or irrelevant answers during reverse lookup tasks.
  • Knowledge $\neq$ Reasoning: Simply injecting a new statute via fine-tuning does not mean the LLM can reason with it. Models struggled significantly on the legal scenario MCQs, showing that simple weight adjustments fail to update the underlying logic required for legal reasoning.

Key Results

  • Accuracy (Recitation): Full Fine-Tuning and Self-Edit achieved near-perfect Exact Match (EM) scores (up to 1.000 for Self-Edit on Baichuan2-13B), while RAG methods performed poorly due to retrieval errors.
  • Accuracy (Recall/Reverse Lookup): In-Context Learning (ICL-Golden) and RAG methods dominated, scoring up to 0.9889 EM. Parametric methods hovered near zero, failing to form the backward connection from text to statute name.
  • Locality: RAG and KN preserved unrelated knowledge perfectly. ROME and Self-Edit showed terrible locality, meaning that updating new laws severely corrupted the model's memory of unchanged laws.
Figure 3: Evaluation of Locality. The calculated method of score is described in subsection 8.3. The higher the score is, the better locality the method has.
  • Time Cost: Despite being advertised as "efficient," model editing methods like Self-Edit took significantly longer to train (10,437 seconds) compared to LoRA fine-tuning (918 seconds) when scaling up to 180 statutes.

Limitations and Future Work

LeKUBE currently only evaluates the most basic capability of comparing differences between new and old knowledge. Real-world legal applicability is much more nuanced, often requiring complex temporal reasoning (e.g., principle of non-retroactivity).

The authors suggest that future work should focus on optimizing parametric strategies specifically for long-text domains and exploring hybrid approaches that combine the memory precision of parametric updates with the safety and locality of non-parametric RAG.

Summary updated

Abstract

Recent advances in Large Language Models (LLMs) have significantly shaped the applications of AI in multiple fields, including the studies of legal intelligence. Trained on extensive legal texts, including statutes and legal documents, the legal LLMs can capture important legal knowledge/concepts effectively and provide important support for downstream legal applications such as legal consultancy. Yet, the dynamic nature of legal statutes and interpretations also poses new challenges to the use of LLMs in legal applications. Particularly, how to update the legal knowledge of LLMs effectively and efficiently has become an important research problem in practice. Existing benchmarks for evaluating knowledge update methods are mostly designed for the open domain and cannot address the specific challenges of the legal domain, such as the nuanced application of new legal knowledge, the complexity and lengthiness of legal regulations, and the intricate nature of legal reasoning. To address this gap, we introduce the Legal Knowledge Update BEnchmark, i.e. LeKUBE, which evaluates knowledge update methods for legal LLMs across five dimensions. Specifically, we categorize the needs of knowledge updates in the legal domain with the help of legal professionals, and then hire annotators from law schools to create synthetic updates to the Chinese Criminal and Civil Code as well as sets of questions of which the answers would change after the updates. Through a comprehensive evaluation of state-of-the-art knowledge update methods, we reveal a notable gap between existing knowledge update methods and the unique needs of the legal domain, emphasizing the need for further research and development of knowledge update mechanisms tailored for legal LLMs.
BibTeX
@inproceedings{wang2024lekube,
  author = {Changyue Wang and Weihang Su and Hu Yiran and Qingyao Ai and Yueyue Wu and Cheng Luo and Yiqun Liu and Min Zhang and Shaoping Ma},
  title = {{LeKUBE: A Legal Knowledge Update BEnchmark}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2024},
  doi = {10.1145/3673791.3698407},
}
Figure