concerns. These privacy concerns around the issue necessitate
privacy-preserving approaches for fine-tuning LLMs. Such an
approach will allow third parties to privately fine-tune the
LLMs on their private data without any information leak about
their private training samples.
Differential Privacy (DP) is a promising approach to ensure
the training data privacy with theoretical guarantees [12]. DP
provides a mathematically rigorous framework with privacy
guarantees that enables Stochastic Gradient Descent (SGD),
the cornerstone of learning in LLMs, in a private setting.
In such a setting, SGD can be applied as a randomized
mechanism multiple times in each iteration of the training.
Most DP methods provide asymptotic guarantees. For theo-
retical guarantees, the number of SGD applications (known as
compositions) is often assumed to be unlimited in most privacy
studies. This assumption leads to asymptotic guarantees in
these studies (i.e., infinite compositions of SGD in the limit).
However, in LLM fine-tuning the number of SGD iterations
is not only limited but also quite small (i.e., in the order of
several thousand) [13].
In this study, through a DP lens, and thanks to the finite sam-
ple guarantee achieved by Edgeworth expansion [14], we pro-
pose a novel LLM fine-tuning framework, called EW-Tune,
with finite-sample guarantees. EW-Tune operates based on
an effective DP accounting approach known as Edgeworth
accountant, proposed in [14]. Edgeworth accountant computes
the amount of noise that is required to be added to the
gradients in SGD to guarantee a certain privacy budget (see
Section II-B). EW-Tune also leverages the latest efficient
reparametrization technique proposed in [15].
A. Our contribution
While EW-Tune is a general framework, we showcase its
performance by focusing on its application to enhance the
privacy of LLM during fine-tuning. Our contribution to the
LLM’s private fine-tuning is two-fold:
•Our study serves as the first step towards fine-tuning
LLMs in a differentially private setting when the number
of compositions (i.e., the applications of differentially
private SGD) is finite and limited to only several thousand
(less than 4,000 times in our experiments). Compared to
the existing methods that provide an asymptotic bound
on the privacy budget, through utilizing Edgeworth ac-
countant, EW-Tune is able to provide a non-asymptotic
privacy bound by using Berry-Esseen bound derived from
the Edgeworth approximation. In the case of fine-tuning
LLMs, given the finite number of compositions, for
the same privacy budget, EW-Tune induces less noise
to SGD compared to the state-of-the-art. This directly
improves the learning and the accuracy of the model.
•It is known that while fine-tuning via DP enhances the
model’s privacy, it can negatively affect the model’s
utility (i.e., performance) [12]. Our experiments show that
EW-Tune significantly contributes to the state of the art
by enhancing the privacy of LLMs while preserving their
utility/accuracy compared to multiple recent alternative
methods across several important downstream benchmark
tasks including text classification, entailment detection,
and question answering. Overall, EW-Tune decreases
the noise-induced to SGD up to 5.6%. EW-Tune also
enhances the state-of-the-art model’s accuracy by up to
1.1%.
II. BACKGROUND AND RELATED WORK
We review three areas of the literature: (1) LLMs to identify
the state-of-the-art in language modeling and their fine-tuning.
(2) Differentially private deep learning as the overarching
framework to rigorously guarantee the privacy of fine-tuning
LLMs. (3) Edgeworth accountant as an emerging accountant
method that provides fine-sample guarantees, which could be
a useful tool for fine-tuning LLMs.
A. Large Language Models (LLMs)
Large language models are deep neural network archi-
tectures with billions of parameters [16]–[18]. They often
benefit from an encoder-decoder architecture that generates
high-quality representations from sequence data (text, image,
malware, genes, etc.). Most LLMs use specific types of
layers with self-attention mechanisms known as transformers
to dynamically assign weights to input elements based on
their surrounding context [16]. Transformers enable LLMs to
provide high-quality representations of the input sequence. At
a high level, LLMs can be categorized into two types: masked
and autoregressive.
Masked language models are trained to predict a masked
token based on its surroundings. Highly effective examples
of masked language models include BERT [1] and RoBERTa
[16]. On the contrary, autoregressive language models learn to
predict the next token based on the previously generated ones,
which makes them suitable for text generation tasks [4], [19].
Due to their ability to produce high-quality representations
from input, masked language models are widely used in major
downstream AI tasks including text classification, question
answering, semantic entailment detection, and speech recog-
nition.
Pre-trained LLMs are often fine-tuned on specific tasks and
datasets, through which the weights of the original model are
updated to better tune for the domain-specific data and task in
hand.
B. Differentially Private Deep Learning
Differential privacy [20], formally defined in Definition 1,
computes a privacy guarantee when the results of an algorithm,
run on private data, are made public. When applied to machine
learning, a differentially private (DP) mechanism allows for
the public release of the model parameters while ensuring the
privacy of the original training data.
Definition 1: A randomized mechanism M:X → Y is
(, δ)-DP, if for all adjacent datasets X, X0∈ X , differing in
a single element only, and all Y⊂ Y,P(M(X)∈Y)≤
eP(M(X0)∈Y) + δholds.
In Definition 1, (, δ)is often referred to as the privacy
budget. defines the distance between the two sides of
2