Table of Contents
Fetching ...

FedJudge: Federated Legal Large Language Model

Linan Yue, Qi Liu, Yichao Du, Weibo Gao, Ye Liu, Fangzhou Yao

TL;DR

This work tackles the privacy problem in training legal large language models by introducing FedJudge, a federated learning framework that fine-tunes base LLMs in a privacy-preserving, data-heterogeneity-aware manner. It leverages parameter-efficient fine-tuning via LoRA (updating only the trainable $\mathcal{W}^e$) and aggregates these updates across clients to form a global $\hat{\mathcal{W}}^e$, while freezing the large backbone $\mathcal{W}^p$ to reduce compute and communication costs. To mitigate distribution shifts across legal domains, FedJudge extends to FedJudge-CL, which imposes a continual learning constraint based on parameter importance $J^{(t-1)}$ to preserve global knowledge during local updates, formalized as $\mathcal{L}_i^{* (t)} = \mathcal{L}_i^{(t)} + \mathbb{I}(t \neq 1) \times \lambda \mathcal{L}_i^{cl (t)}$. Empirical results on three real-world legal tasks (court views, legal consultations, and legal reasoning) show that FedJudge-CL achieves robust performance improvements over both centralized and standard FL baselines, with favorable human evaluations, demonstrating the framework’s practicality for privacy-preserving, capable legal AI.

Abstract

Large Language Models (LLMs) have gained prominence in the field of Legal Intelligence, offering potential applications in assisting legal professionals and laymen. However, the centralized training of these Legal LLMs raises data privacy concerns, as legal data is distributed among various institutions containing sensitive individual information. This paper addresses this challenge by exploring the integration of Legal LLMs with Federated Learning (FL) methodologies. By employing FL, Legal LLMs can be fine-tuned locally on devices or clients, and their parameters are aggregated and distributed on a central server, ensuring data privacy without directly sharing raw data. However, computation and communication overheads hinder the full fine-tuning of LLMs under the FL setting. Moreover, the distribution shift of legal data reduces the effectiveness of FL methods. To this end, in this paper, we propose the first Federated Legal Large Language Model (FedJudge) framework, which fine-tunes Legal LLMs efficiently and effectively. Specifically, FedJudge utilizes parameter-efficient fine-tuning methods to update only a few additional parameters during the FL training. Besides, we explore the continual learning methods to preserve the global model's important parameters when training local clients to mitigate the problem of data shifts. Extensive experimental results on three real-world datasets clearly validate the effectiveness of FedJudge. Code is released at https://github.com/yuelinan/FedJudge.

FedJudge: Federated Legal Large Language Model

TL;DR

This work tackles the privacy problem in training legal large language models by introducing FedJudge, a federated learning framework that fine-tunes base LLMs in a privacy-preserving, data-heterogeneity-aware manner. It leverages parameter-efficient fine-tuning via LoRA (updating only the trainable ) and aggregates these updates across clients to form a global , while freezing the large backbone to reduce compute and communication costs. To mitigate distribution shifts across legal domains, FedJudge extends to FedJudge-CL, which imposes a continual learning constraint based on parameter importance to preserve global knowledge during local updates, formalized as . Empirical results on three real-world legal tasks (court views, legal consultations, and legal reasoning) show that FedJudge-CL achieves robust performance improvements over both centralized and standard FL baselines, with favorable human evaluations, demonstrating the framework’s practicality for privacy-preserving, capable legal AI.

Abstract

Large Language Models (LLMs) have gained prominence in the field of Legal Intelligence, offering potential applications in assisting legal professionals and laymen. However, the centralized training of these Legal LLMs raises data privacy concerns, as legal data is distributed among various institutions containing sensitive individual information. This paper addresses this challenge by exploring the integration of Legal LLMs with Federated Learning (FL) methodologies. By employing FL, Legal LLMs can be fine-tuned locally on devices or clients, and their parameters are aggregated and distributed on a central server, ensuring data privacy without directly sharing raw data. However, computation and communication overheads hinder the full fine-tuning of LLMs under the FL setting. Moreover, the distribution shift of legal data reduces the effectiveness of FL methods. To this end, in this paper, we propose the first Federated Legal Large Language Model (FedJudge) framework, which fine-tunes Legal LLMs efficiently and effectively. Specifically, FedJudge utilizes parameter-efficient fine-tuning methods to update only a few additional parameters during the FL training. Besides, we explore the continual learning methods to preserve the global model's important parameters when training local clients to mitigate the problem of data shifts. Extensive experimental results on three real-world datasets clearly validate the effectiveness of FedJudge. Code is released at https://github.com/yuelinan/FedJudge.
Paper Structure (22 sections, 4 equations, 5 figures, 3 tables, 1 algorithm)

This paper contains 22 sections, 4 equations, 5 figures, 3 tables, 1 algorithm.

Figures (5)

  • Figure 1: (a) An example in the court client. (b) An example in the legal consultation client. (c) An example in the legal reasoning client. From the figure, we can observe that the distribution of data from different clients varies significantly.
  • Figure 2: An overview of FedJudge, where represents trainable weights and denotes frozen LLMs.
  • Figure 3: Training process of FedJudge on different clients.
  • Figure 4: Visualized texts with different methods in Legal Consultation (Client2).
  • Figure 5: Visualized texts with different methods in Legal Reasoning (Client3).