Manuscript Offprint

arXiv:2610.06636

Differentially Private Mixing of Public Datasets Improves Private Learning

Yufei Chen, Tejumade Afonja, Anvith Thudi, Nicolas Papernot

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Many machine learning applications involve sensitive data and therefore require training under differential privacy (DP). However, DP training often degrades model utility. In some cases, first pre-training the model on "public" data before finetuning with DP on the sensitive data can reduce the drop in utility. However, the success of this depends on how relevant the selected public dataset is to the sensitive data. We introduce the first pipeline that privately learns the mixture of several public datasets to pretrain on for a given sensitive downstream task. Our key insight is that we can privately find the best mixture of multiple public datasets by privately learning a low-dimensional linear model. We tested our method on the NIH dataset for X-ray classification and the ENRON email dataset for language modeling. Applying our method to find tailored mixtures of X-ray datasets to pretrain on for diseases in the NIH ChestX-ray14 dataset, we improved macro AUC by up to 0.037 across privacy budgets compared to the baselines, with gains as large as +22.8% relative AUC on Cardiomegaly at ϵ=1\epsilon = 1. For DP training on the ENRON dataset, pre-training on our mixture of The Common Pile (a collection of public-domain text datasets) decreased test perplexity by 16% relative to the baseline mixtures.

1 Introduction

For many machine learning tasks, the only data we have comes from sensitive sources, such as medical records [21] or conversations between individuals [26]. Models trained on such data, even if the data is anonymized, are known to leak information about the individuals who contributed to the training dataset [43, 7]. Training with differential privacy (DP) is the de-facto framework for addressing this concern [12, 11]; DP guarantees that the models trained using an individual's data are indistinguishable to the models trained without their data. However, training with DP often comes with a large drop in model utility [1, 9]. Past work has observed that first pre-training a model on public data (data that can be treated as non-sensitive, hence not contributing to privacy leakage) before DP finetuning the model on the sensitive data can sometimes reduce the drop in model utility [9, 50]. Importantly, the effectiveness of this pre-training depends on how related the selected public data is to the target (sensitive) data [5, 19, 40, 10, 14, 46]. To the best of our knowledge, pre-training on all the public datasets uniformly is common practice and state-of-the-art for privately mixing the public dataset: we improve this.

In this paper, we study how to privately choose the public pre-training mixture that gives the best downstream performance on a given sensitive dataset. Finding the best mixture privately can

Figure

Figure 1: Overview of DP-MixMin. Proxy models trained on public data are combined with mixture weights λ\lambda learned with DP-SGD on a fraction ρ\rho of the sensitive data (split A). We then pretrain on public data according to λ\lambda and DP fine-tune on the rest (split B).

generically be approached with private hyperparameter selection techniques [30, 37], where one trains on several different mixtures and then releases the best found mixture. However, this comes with significant computational costs: the space of mixtures which we need to trial (i.e., train on) grows exponentially with the number of public datasets. Compounding this, every candidate mixture we evaluate touches the sensitive data, so the more mixtures we try, the higher the privacy cost [37]. We show that it is possible to significantly improve downstream utility over standard approaches to public data mixing.

Our key insight is that we can privately learn the weighting of public datasets by privately optimizing a convex objective. This builds off MixMin [45], a non-private data mixing method which showed that as models approach Bayes optimal (the best a model can do with enough compute and data), finding the best weighting of pre-training datasets for a downstream task reduces to minimizing a convex objective. We build onto this insight by realizing this objective is amenable to private learning with little utility degradation. Formally, if k is the number of public datasets, by using existing DP algorithms [3, 13, 2, 4] we have the privacy cost for a fixed error grows at worst O(k)O(\sqrt{k}). In contrast, for certain data mixing problems, private hyperparameter search would need to try exponentially many mixtures, which translates to a privacy cost that grows linearly in k [37]. However, a key limitation of this convex objective is that it requires having models near Bayes optimal on each of the individual pre-training sources; we hence explore empirical approaches.

Our pipeline, DP-MixMin, empirically instantiates the DP convex optimization for data mixing alongside further DP finetuning (Figure 1); our pipeline provides one end-to-end privacy guarantee. We first split the sensitive data into two disjoint parts: one for mixture learning with a variant of DP-SGD [1], and the other for DP fine-tuning the model pre-trained on the mixture. Concretely, we empirically learn the mixture by replacing the Bayes optimal models for each source with a proxy model trained on each individual public dataset (following past work [45]); these models do not see the private data, so leak no privacy. We then optimize the convex objective for data mixing with DP-SGD, providing a DP bound for the mixture. In the final stage we pre-train on this mixture, and then apply DP finetuning on the held out set. Because the two DP stages (mixing and fine-tuning) use disjoint datasets, parallel composition [11] bounds the pipeline's overall privacy cost by the worse of the two steps, not their sum. So learning the mixture costs data, not privacy. DP-MixMin fine-tunes on less data than our baseline of finetuning a model trained uniformly over all public datasets, but we show

Figure

Figure

Figure 2: DP-MixMin beats Uniform and Random Search at every ε\varepsilon. Macro AUC on CheXpert/MIMIC-CXR→NIH ( ↑\uparrow) and Enron test perplexity at ρ=0.3\rho = 0.3 ( ↓\downarrow).

that better mixtures more than make up for it.

We empirically tested DP-MixMin across medical imaging and language tasks, and found across varying DP guarantees it consistently improved baselines (Figure 2). For medical imaging, we used the 14 disease classification tasks in the NIH chest X-ray dataset [47] as sensitive datasets, and CheXpert [18] and MIMIC-CXR [21] as public sources. These sources also contain classification tasks over chest X-rays, but differ in the diseases and how the images were labelled. DP-MixMin consistently outperformed the baselines, with an average AUC gain of ≈0.03\approx 0.03, including a 22.8% relative gain on the Cardiomegaly class. For language modeling, we used Enron [26] as the sensitive dataset, targeting user-level DP; protecting all of a user's emails, a strictly stronger and costlier guarantee than protecting single emails [23, 28, 8]. Pre-training on mixtures of The Common Pile [24] decreased test perplexity by up to 16%, with similar gains under example-level DP on OpenWebMath [38]. We also found that DP-MixMin recovered mixtures close to the non-private solution in most settings, despite using a fraction of the sensitive data.

To conclude, our contributions are:

  1. DP-MixMin: The first end-to-end privatized pretraining mixture-learning pipeline.

  2. Theoretically showing that when we train models near Bayes optimal, our procedure asymptotically outperforms the baseline of private hyperparameter search.

  3. Empirically showing that across medical imaging and language modeling tasks, DP-MixMin improves the performance of public-pretraining over past mixture finding approaches.

References (45)