NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning from Aggregate responses: Instance Level versus Bag Level Loss Functions

Adel Javanmard, Lin Chen, Vahab Mirrokni, Ashwinkumar Badanidiyuru, Gang Fu

In an era where data privacy is paramount, machine learning researchers are increasingly forced to work with "aggregate" data. Instead of seeing how much a specific user spent, an advertiser might only see the average spend of a group of 100 users. While this protects individual identities, it creates a challenge for training models.

A recent study by researchers from USC and Google Research provides a rigorous theoretical framework for this problem, revealing a surprising connection between common training methods and offering a new way to optimize the privacy-utility trade-off.

The Problem of Aggregate Data

In many privacy-sensitive applications, such as Apple’s SKAdNetwork or Google’s Privacy Sandbox, training data is "bagged." Instead of individual pairs $(x_i, y_i)$, the learner receives individual features $x_i$ but only an aggregate response $\bar{y}$ for a group (a "bag") of samples.

Practitioners typically use one of two strategies:

  1. Bag-level loss: Attempting to make the average of the model's predictions match the average response of the bag.
  2. Instance-level loss: Attempting to make each individual prediction in the bag match the bag's average response.

Until now, there wasn't a clear theoretical understanding of which approach is better or how they relate. This research fills that gap, specifically looking at how these choices affect the model's ability to generalize to new, unseen data.

The Interpolating Estimator

The authors establish a mathematical bridge between the two approaches, proving that Instance-level loss = Bag-level loss + a Regularization term. This regularization term specifically penalizes the variance of the model's predictions within a bag. Based on this insight, they propose a new Interpolating Estimator:

$$L_{int}(\theta) = L_{bag}( heta) + \rho R(\theta)$$

By tuning $\rho$ between 0 and 1, practitioners can move smoothly from a pure bag-level approach to a pure instance-level approach. To analyze this, the authors use the Convex Gaussian Minimax Theorem (CGMT), allowing them to predict the exact "risk" (error) of the model in a proportional regime where the number of features and samples grow to infinity at a fixed ratio.

The Bias-Variance Trade-off

A central finding of the paper is the explicit trade-off between bias and variance controlled by the parameter $\rho$. Bag-level loss is unbiased but has high variance (it's "noisier"). Conversely, instance-level loss introduces bias—by forcing predictions toward the group mean—but significantly reduces variance.

Variance reduction as a function of the interpolation parameter ρ for different sampling ratios ψ.

As shown in the variance analysis, increasing $\rho$ leads to a sharp decrease in variance, particularly when the sampling ratio $\psi$ is low. Whether one should favor bag-level or instance-level loss depends heavily on the Signal-to-Noise Ratio (SNR). In high-noise environments (low SNR), the variance-reduction of the instance-level loss is critical for performance.

Key Results and Insights

The authors validated their theory using high-dimensional Gaussian features and the Boston Housing dataset. Their theoretical formulas for bias and variance matched experimental simulations with high precision.

One of the most practical takeaways is the existence of an optimal $\rho$. As seen in the risk curves, the minimum error often occurs at an intermediate value of $\rho$, rather than at the extremes of pure bag-level or instance-level loss. Furthermore, the researchers found that as bag sizes grow larger, stronger regularization (higher $\rho$) is typically required to maintain optimal performance.

Finally, the paper explores Differential Privacy (DP), demonstrating that training on aggregate data can sometimes result in better models than training on individual data with DP. This is because the aggregation process itself acts as a natural "pre-filter" for noise, allowing for a more favorable privacy-utility trade-off.

Conclusion

By unifying bag-level and instance-level losses into a single interpolating framework, this work provides practitioners with the tools to navigate the complexities of aggregate data. While the current theory focuses on linear models, the intuition regarding the bias-variance trade-off offers a valuable roadmap for future extensions into non-linear and deep learning architectures.

Summary updated

BibTeX
@inproceedings{javanmard2024learning,
  author = {Adel Javanmard and Lin Chen and Vahab Mirrokni and Ashwinkumar Badanidiyuru and Gang Fu},
  title = {{Learning from Aggregate responses: Instance Level versus Bag Level Loss Functions}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=E60SIDItyT},
}
Figure