Skip to content

Scaling laws for differentially private large language modelsScaling Laws for Differentially Private Language Models

arXiv· arXiv:2501.18914· ICML 2025· Ryan McKenna, Yangsibo Huang, Amer Sinha, Borja Balle, Zachary Charles, Christopher A. Choquette-Choo, Badih Ghazi, George Kaissis, Ravi Kumar, Ruibo Liu, Da Yu, Chiyuan ZhangGoogle Research; Google DeepMindIndexed by this site · 27 days ago· Originally publishedDefenses

Quick read

Analysis and theory

Based on the paper PDF (AI-generated); refer to the original

The authors establish scaling laws for differentially private (DP) language model pretraining, characterizing the compute-privacy-utility trade-off, and state that the optimal model under DP is more than an order of magnitude smaller than non-private, and that the optimal configuration can save 5×–100× compute.

Questions
Training language models on sensitive user data requires differential privacy (DP), but DP training dynamics differ greatly from non-private, non-private scaling laws cannot guide the allocation of compute, privacy, and data budgets under DP, and DP scaling laws remain unclear.
Methods
The authors train BERT models from 4.5M to 778M, fix the physical batch size at 1024, sweep 18 noise-batch ratios, and use a semi-parametric method (smoothing, isotonic regression, training-curve extrapolation plus log-space interpolation) to fit loss as a function of model size, number of iterations, and noise-batch ratio, then map it to each budget via privacy accounting.
Experiments and results
The authors state that under DP the optimal model size is at least an order of magnitude smaller than the non-private one; the compute-optimal configuration saves 5×–100× compute compared with the baseline; when the privacy/data budget is fixed, the compute benefit has a saturation point; the token-to-model ratio rises with compute and is far higher than the non-private 20×.
Limitations and future work
Limitations listed by the authors include: the assumption of a fixed physical batch size does not fully hold, only BERT with a single dataset and DP mechanism is used, only pretraining is done, the sequence length is fixed at 512, larger models are not trained, and over-training and efficient multi-machine clipping implementations are not studied.
Experimental setupBertTiny、BertMini et al. · BERT dataset(约 3.3B words) · cross-entropy loss、noise-batch ratio et al.
Evaluated models
BertTinyBertMiniBertSmallBertMediumBertBaseBertLargeBertMega
Benchmarks
BERT dataset(约 3.3B words)
Metrics
cross-entropy lossnoise-batch ratioMIA advantage
AI summaryResearchers established scaling laws for differentially private (DP) training of large language models, which can accurately characterize the complex dynamics of DP training, providing a complete picture of the trade-offs among compute, privacy and utility, as well as optimal training configurations under multiple settings. The paper's background notes that large language models rely on large-scale, high-quality training sets from sources such as sensitive user data, and training on such data requires privacy protection such as differential privacy, but the dynamics of DP training differ significantly from ordinary training, and its scaling laws had not previously been well understood.

Researchers established scaling laws for differentially private (DP) training of large language models, which can accurately characterize the complex dynamics of DP training, providing a complete picture of the trade-offs among compute, privacy and utility, as well as optimal training configurations under multiple settings. The paper's background notes that large language models rely on large-scale, high-quality training sets from sources such as sensitive user data, and training on such data requires privacy protection such as differential privacy, but the dynamics of DP training differ significantly from ordinary training, and its scaling laws had not previously been well understood.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Establishes scaling laws for DP language model pretraining, characterizes the compute-privacy-utility trade-off, and gives the optimal compute allocation.

    Core question: when training language models with differential privacy (DP), how to optimally allocate compute (model size, batch size, number of iterations) under the triple budget constraints of compute, privacy and data — non-private scaling laws cannot answer this.

    • Setting and importance: frontier LLMs are trained on user data containing sensitive information; direct training carries memorization and regurgitation risks and requires DP protection; but DP-SGD introduces extra noise and overhead, and currently the largest DP-trained models are only a few hundred million parameters rather than tens of billions (introduction).
    • Shortcomings of existing methods: the authors state that non-private scaling laws (Kaplan et al., 2020; Hoffmann et al., 2022) do not include privacy and data budgets, and it is known that DP-SGD relies on very large batch sizes, but there is a lack of systematic study under compute constraints (increasing the batch requires shrinking the model or reducing iterations).
    • Core observation: the authors argue that DP training dynamics differ from non-private — under non-private, training with batch size B for T steps is roughly equivalent to batch 1 for B·T steps (below the critical batch size), which does not hold under DP; therefore the privacy budget and data budget need to be incorporated into the scaling law.
    • Paper contributions: establish scaling laws for DP pre-training, empirically fit the compute-privacy-utility trade-off, and give compute-optimal configurations under nearly arbitrary privacy/data budgets; the authors state that these configurations save 5×–100× compute versus baseline configurations with comparable utility, and that under DP the optimal model size is typically at least an order of magnitude smaller than non-private.
    • Problem setup: the task is masked language modeling (BERT-style), the mechanism is DP-Adam (Algorithm 1), parameterized by the noise-batch ratio σ̄ (the standard deviation of the noise added to the averaged gradient) rather than the noise multiplier; the authors state that σ̄ is a better proxy for downstream learning performance; δ is fixed at 10^-8.
  2. What related research exists?

    Related work falls into three groups: non-private scaling laws, DP fine-tuning/prompting, and DP vision model training; this paper extends scaling law analysis to DP language model pretraining.

    Non-private language model scaling laws

    • Kaplan et al. (2020)—found power-law relationships among model scale, data scale, compute, and downstream performance; Hoffmann et al. (2022)—gave compute-optimal scaling over 7 orders of magnitude (token-to-model ratio about 20×); Chowdhery et al. (2022)—PaLM 540B continues this trend.
    • Ganguli et al. (2022)—pointed out that scaling alone may be insufficient to achieve open-ended intelligence. The paper notes that these works do not include privacy and data budgets, and whether their scaling laws hold after gradient clipping and noise addition change the training dynamics had previously been largely unstudied.

    DP fine-tuning and prompting methods

    • A body of work (Bu et al., 2023; Yu et al., 2022; Li et al., 2022; Duan et al., 2023a/b; Tang et al., 2024; Hong et al., 2024, etc.)—achieves good performance for LLMs on downstream data via DP fine-tuning or private prompting/in-context learning.
    • The paper notes that these guarantees cover only downstream data, while the pretraining process remains exposed; this paper targets the pretraining stage.

    DP vision model training

    • Yu et al. (2021), De et al. (2022), Bu et al. (2022), Kurakin et al. (2022), Sander et al. (2024)—train DP vision models from scratch.
    • Sander et al. (2023)—named by the paper as the most related work: it studies the scaling behavior of DP-SGD on vision tasks and states that under a fixed privacy budget, tuning batch size, training steps, and learning rate is key; the paper notes that it does not consider a bounded compute budget, and whether its conclusions transfer to language modeling is unclear.

    Baselines and comparison setup: The baselines in Section 4.4 are three fixed training configurations (the BertLarge configuration predicted by non-private scaling laws, the BertMedium configuration, and a DP expert-style BertTiny large-batch configuration), all using 10^19 FLOPs and N=10^7, compared with this paper's compute-optimal configuration; the non-private reference is the Chinchilla law of Hoffmann et al. (2022).

    The authors position this paper as: extending scaling law analysis to DP language model pretraining, while incorporating standard optimization hyperparameters and a bounded compute budget, to be closer to recent LLM scaling research.

  3. How does the paper address this problem?

    Fixing the physical batch size, sweeping the noise-batch ratio to train a BERT grid, semi-parametrically fitting the loss function, and then, through privacy accounting, answering the optimal configuration under each budget.

    Overall approach: model loss as a function L(M, T, σ̄) of model size M, number of iterations T, and noise-batch ratio σ̄, obtain this function via a set of grid experiments plus semiparametric fitting, then map (ϵ, N, B, T) to σ̄ through privacy accounting, thereby estimating the cross-entropy of each training configuration under any compute/privacy/data budget (Figure 2 gives the flow).

    Problem setup and key quantities

    • Three budgets: compute budget C uses the approximation of Kaplan et al. (2020) C = 6 · M · B · S · T (B is the number of samples in a batch rather than the number of tokens, because B determines privacy); privacy budget is ϵ at fixed δ=10^-8; data budget N is the number of individuals in the dataset.
    • noise-batch ratio σ̄: the standard deviation of the noise added to the averaged minibatch gradient; the authors say the variance of the gradient estimate comes mainly from DP noise rather than sampling (citing Ponomareva et al., 2023), so σ̄ is used as a proxy for learning performance.
    • DP definition: the mechanism satisfies (ϵ, δ)-DP, i.e., for datasets differing by one individual, Pr[A(D) ∈ O] ≤ eϵ Pr[A(D′) ∈ O] + δ; the algorithm is DP-Adam (Algorithm 1), with per-example clipping ℓ2 norm 1.0, using the normalized clipping of De et al. (2022).

    Experimental grid

    • Models: BERT Tiny (4.5M) to Mega (778M), 7 sizes in total (Table 1), masked language modeling, sequence length S=512, dataset about 3.3B words.
    • Sweep range: physical batch size fixed at 1024; 18 σ̄ values {2^-k | k=6..23} plus 0 (non-private); learning rates 2^-7, 2^-8, 2^-9 (without noise the optimum for each size is 2^-7); 128K training iterations, training loss recorded every 100 steps.
    • Optimizer details: DP-Adam, 1000-step warm-up, then exponential decay, dropping 10× within 128K iterations.

    Semiparametric fitting

    • Decoupled noise calibration: directly analyze the effect of σ̄ at a fixed large physical batch, then do post-hoc accounting to predict performance under other assumed batch sizes; the authors say this avoids the problem that directly modeling ϵ does not generalize across data budgets or is too compute-intensive.
    • Data cleaning: apply a 10-point moving average to each 100-step measurement, then apply isotonic regression along the iteration direction and the σ̄ direction separately to enforce monotonicity; the authors say isotonic rather than cumulative min is used to avoid minimum selection bias.
    • Extrapolation and interpolation: for each (M, σ̄), extrapolate the training curve beyond 128K using a parametric curve of the form L = E + A/T^α (fitted with 16K–128K data); then linearly interpolate in (log M, log T, log σ̄) space with RegularGridInterpolator, and the fitted function matches the smoothed data exactly at grid points.

    Usage and accounting

    • Flow: input (C, ϵ, N) → enumerate all constant-compute configurations (M, B, T) → use the dp_accounting library to convert (ϵ, N, B, T) into σ̄ → query the fitted function for predicted loss (Figure 2).
    • Accounting details (Appendix B.1): both Poisson sampling and deterministic batching assumptions are used to calibrate noise and the lower is taken; Poisson sampling probability B/N, noise multiplier B·σ̄.
    • Privacy unit (Appendix B.2): the authors explain that their method is actually closer to user-level DP (finite N users, each user's data stream infinite), and the conclusions should also hold in the example-level multi-augmentation setting.
  4. What experiments did the paper conduct?

    Grid experiments of 7 BERT sizes × 18 noise-batch ratios fit the scaling law, analyzing the optimal compute allocation, saturation point, and token-to-model ratio, and comparing with three baseline configurations.

    Experimental setup

    • Models tested: BertTiny (4.5M), BertMini (11.4M), BertSmall (29M), BertMedium (41M), BertBase (109M), BertLarge (335M), BertMega (778M), 7 sizes in total (Table 1).
    • Data: the BERT default dataset, about 3.3B words, sequences truncated/padded to S=512; training is less than one physical epoch, so training loss is used as an unbiased estimate of evaluation loss.
    • Grid size: 6 model sizes (the number of unique sizes used for fitting) × 1280 iteration counts × 18 σ̄ × 3 learning rates; σ̄ ∈ {2^-k, k=6..23} plus 0.
    • Metric: cross-entropy of masked language modeling; Appendix D additionally uses MIA advantage (Yeom et al., 2018) to measure membership inference vulnerability.
    • Baselines: three fixed configurations—BertLarge trained for 7500 steps with batch 1295, BertMedium trained for 5000 steps with batch 15879, BertTiny trained for 2500 steps with batch 283061, all at 10^19 FLOPs and N=10^7 (Section 4.4).
    • Compute platform: TPUv3 pods, pure data parallelism, 4–10 hours per experiment (Appendix C.5; Table 4 gives throughput).

    Main results

    The main results are the visualizations in Figures 1, 3, and 5 and the saturated configuration table in Table 2; the table below extracts the saturated compute configurations for the two data budgets N=10^7 and N=10^8 from Table 2 (the complete table includes N=10^5–10^9).

    Swipe horizontally to read the table

    Data BudgetϵSaturated Compute BudgetCross EntropyModel SizeToken/Model Ratio
    10^713.8×10^193.731.7×10^72.3×10^4
    10^743.8×10^202.814.9×10^72.6×10^4
    10^7162.0×10^212.157.0×10^76.7×10^4
    10^7644.4×10^221.663.3×10^86.7×10^4
    10^815.2×10^212.261.3×10^84.9×10^4
    10^844.4×10^221.663.3×10^86.7×10^4
    10^8161.0×10^231.323.3×10^81.5×10^5
    10^8641.0×10^231.233.3×10^81.5×10^5

    (According to Table 2; Token/Model Ratio computed as S·B·T/M)

    • Optimal allocation: Figure 1 shows that at small compute the optimal allocation does not depend strongly on ϵ, but with a larger privacy budget one should train a larger model, with a smaller batch and more iterations; the near-optimal configuration range is very wide (the shaded region is large), and the authors state that training a small model on more tokens is usually preferable due to inference efficiency.
    • Model size: The authors state that at 10^22 FLOPs the compute-optimal model under DP is about 10^8 parameters, versus about 10^10 non-private (Section 4.1).
    • Saturation phenomenon: Figure 3a shows that with fixed privacy/data budgets there is a turning point as compute increases, after which gains are small; e.g., at N=10^8, ϵ=1 the optimal loss saturates at compute ≳10^20, corresponding to a 114M parameter model; the authors state that this differs in nature from the continuously benefiting behavior of non-private scaling laws.

    Comparison with baseline configurations (Section 4.4, Figure 5)

    • What was measured: the cross-entropy of the three 10^19 FLOPs baseline configurations and the compute-optimal configuration under different ϵ.
    • Results: The authors state that the BertLarge configuration predicted by non-private scaling laws has very low utility under most privacy budgets; the compute-optimal model reaches the utility of the best baseline's 5× FLOPs with 2×10^18 FLOPs (within a reasonable ϵ range); the compute savings over BertLarge exceed 100× (the authors note that this number is not shown in the figure).
    • Authors' interpretation: Using a fixed configuration across all privacy budgets loses utility, and private and non-private scaling laws are fundamentally different.

    Token-to-model ratio and budget coordination (Sections 4.3, 4.5)

    • token-to-model ratio: Figure 3c (N=10^7) shows that this ratio rises with compute, with a steeper slope for smaller ϵ; the authors state that for ϵ∈[1,10] the appropriate ratio is typically 1000–100000, roughly equivalent to a model 10×–50× smaller than predicted by Hoffmann et al. (2022); at ϵ=1000 the behavior is still closer to ϵ=1 than to non-private.
    • Budget coordination: The vector field in Figure 4 shows that increasing the privacy or compute budget alone has diminishing returns, and only increasing both together can continuously reduce σ̄; at fixed compute, increasing the data or privacy budget has diminishing and eventually negligible returns (T=16000 steps).

    Other ablations and analyses

    • Physical batch size ablation (Appendix C.3, Figure 7): BertTiny, average of 3 repeats; at σ̄=0.5^20 a larger batch is better with diminishing returns, and the 2048 and 8192 curves are almost identical; at σ̄=0.5^15 and 0.5^10 a smaller physical batch instead gives lower loss, which the authors state they cannot explain; on BertLarge this phenomenon appears only at the largest σ̄ (Figure 9), and the same qualitative behavior is also observed on a NanoDO 30M decoder-only model (Figure 10).
    • Final training-set loss (Appendix C.4, Table 3): at σ̄=0.5^15 the training-set cross entropy for batch 128/512/2048/8192 is 3.586/3.971/4.01/4.057, and accuracy is 43.59%/37.27%/37.55%/36.73%, ruling out a generalization-difference explanation.
    • Non-private reproduction (Appendix C.6, Figure 11): at σ̄=0 the optimal model size and token count grow roughly proportionally with compute, consistent with Hoffmann et al. (2022); the token/model ratio is on the high side, which the authors attribute to batch 1024 exceeding the critical batch size.
    • Privacy calibration warning (Appendix D, Figure 15): with fixed (ϵ,δ)=(8,10^-8) and fixed compute/model size, the MIA advantage differs greatly across batch sizes (e.g., at 6×10^17 FLOPs and a 4M model the advantage is about 0.08–0.18), while cross-entropy is almost the same; the authors recommend monitoring and reporting excess vulnerability when tuning.
    • Parametric fitting (Appendix E): the naive Chinchilla extension L̂1 (Equation 3) diverges in the high-loss region; L̂2 after a sigmoid transform of σ̄ (Equation 5, best fit α=0.47, β=0.12, γ=0.95, α2=-0.07) fits better, but the authors state that the transform is not sufficiently principled, and the main analysis still uses the semi-parametric method.
  5. What are some points that can be further explored?

    In Appendix A, the authors list limitations and open questions such as the fixed batch assumption, a single training setup, fine-tuning, sequence length, and larger models.

    Limitations and future directions noted by the authors

    • Fixed physical batch size (Appendix A): the method relies on the assumption that "DP noise is much larger than sampling noise"; Appendix C.3 shows that this assumption may not fully hold, and that the physical batch size has a more subtle influence that the authors cannot fully explain.
    • Single training setup (Appendix A): only one type of BERT model, a fixed dataset and DP mechanism are used; the authors state that the general method can transfer, but the quantitative conclusions may differ under other setups and are worth rerunning with better base mechanisms.
    • Pre-training only (Appendix A): in practice DP fine-tuning is often better; quantifying the scaling laws for the fine-tuning case is challenging but worth doing.
    • Fixed sequence length of 512 (Appendix A): sequence length is another adjustable knob; compute saved by shortening it can be traded for a larger batch/model/iterations, and whether this is worthwhile may depend on the specific setup and data distribution.
    • Over-training not studied (Appendix A): in deployment scenarios over-training a small model may be more cost-effective, and under DP the privacy cost already favors smaller models, so studying this intersection may be valuable.
    • Larger models and engineering implementation (Appendix A): the accuracy of the scaling law depends on the range of model sizes trained (the largest here is 778M, whereas Hoffmann et al. trained up to 16B), and larger-scale training is left for future work; efficient per-example clipping implementations under multi-machine training (beyond pure data parallelism) need more research; if the optimizer improves, the optimal operating point may shift.

    Experimental coverage

    • The models tested are 7 BERT sizes (4.5M–778M parameters, Table 1), the task is masked language modeling, the dataset is the BERT default dataset (about 3.3B words), and the sequence length is 512.
    • Training configuration grid: physical batch size fixed at 1024, 18 noise-batch ratios (2^-6 to 2^-23) plus a non-private baseline of 0, 3 learning rates (2^-7/2^-8/2^-9), up to 128K iterations.
    • Budget ranges covered by the analysis: data budget N=10^5–10^9 (Table 2, Figure 13), privacy budget ϵ from 1 to 1000 (Figure 3c), compute up to about 10^23 FLOPs; larger batch sizes and multi-round training are extrapolated by post-hoc accounting and were not actually run.
    • The physical batch size ablation is done on BertTiny (128–8192, 3 repetitions) and BertLarge, plus a qualitative validation on a NanoDO 30M decoder-only model (Appendix C.3, C.4).
    • The paper does not report the number of repetitions or confidence intervals for the main grid experiments (only the ablation experiments note averaging over 3 repetitions); the extrapolated conclusions were not validated by training on an actual billion-parameter model.
  6. Summarize the main content of the paper

    Scaling laws for DP language model pretraining: the optimal model is more than an order of magnitude smaller than non-private, and the compute-optimal configuration saves 5×–100× compute.

    An empirical study on scaling laws for differentially private language models, answering the question "given a compute, privacy and data budget, how should compute be allocated".

    • Problem: non-private scaling laws do not include privacy and data budgets, DP training dynamics differ (a large batch cannot be freely exchanged for more iterations), previous DP models were at most a few hundred million parameters, and there is a lack of systematic guidance under compute constraints.
    • Method: train a grid of 7 BERT sizes (4.5M–778M), fix the physical batch at 1024, sweep 18 noise-batch ratios, and fit L(M, T, σ̄) semi-parametrically using moving average + isotonic regression + parametric curve extrapolation + log-space interpolation, then use dp_accounting to map (ϵ, N, B, T) to σ̄ and query the loss under arbitrary budgets.
    • Result one: the authors state that under DP the compute-optimal model size is typically at least an order of magnitude smaller than non-private — at 10^22 FLOPs about 10^8 versus about 10^10 parameters; for ϵ∈[1,10] the token-to-model ratio is typically 1000–100000, far higher than the non-private 20×.
    • Result two: with a fixed privacy/data budget there is a saturation point in compute gains, e.g., at N=10^8, ϵ=1 there is almost no gain beyond compute ≳10^20 FLOPs, corresponding to a 114M model (Table 2 gives the full saturation configurations for N=10^5–10^9).
    • Result three: compared with three 10^19 FLOPs baseline configurations, the authors state that the compute-optimal configuration reaches the utility of the best baseline at 5× its FLOPs using 2×10^18 FLOPs, saving 5×–100× compute overall; the BertLarge configuration predicted by the non-private law has very low utility under most privacy budgets.
    • Result four: the accounting analysis in Figure 4 shows that the privacy and compute budgets must be increased together to continuously lower the noise-batch ratio; increasing either alone has diminishing returns.
    • Authors' conclusion: private and non-private scaling laws are fundamentally different; the authors give a envisioned path to billion-parameter DP models (10^9 individual data, ϵ≈10, about 10^23 FLOPs), and list fine-tuning, better mechanisms, variable sequence length, larger models and over-training as future directions.
Read originalICML 2025