Test-time Collective Prediction

Celestine Mendler-Dünner, Wenshuo Guo, Stephen Bates, Michael I. Jordan

Abstract

An increasingly common setting in machine learning involves multiple parties, each with their own data, who want to jointly make predictions on future test points. Agents wish to benefit from the collective expertise of the full set of agents to make better predictions than they would individually, but may not be willing to release their data or model parameters. In this work, we explore a decentralized mechanism to make collective predictions at test time, leveraging each agent's pre-trained model without relying on external validation, model retraining, or data pooling. Our approach takes inspiration from the literature in social science on human consensus-making. We analyze our mechanism theoretically, showing that it converges to inverse mean-squared-error (MSE) weighting in the large-sample limit. To compute error bars on the collective predictions we propose a decentralized Jackknife procedure that evaluates the sensitivity of our mechanism to a single agent's prediction. Empirically, we demonstrate that our scheme effectively combines models with differing quality across the input space. The proposed consensus prediction achieves significant gains over classical model averaging, and even outperforms weighted averaging schemes that have access to additional validation data.

Introduction: The Challenge of Siloed Expertise

In many real-world scenarios, data is siloed across different organizations—such as hospitals or financial institutions—that cannot pool their data due to privacy, legal, or competitive reasons. While Federated Learning addresses collaborative training, it often requires significant coordination and shared architectures. A different challenge arises when models are already trained: how can multiple parties collaborate to make the best prediction for a new test point without revealing their training data or proprietary model weights?

The primary obstacle is heterogeneity. Different models may excel in different regions of the feature space. Standard ensembling techniques, like simple model averaging, treat all agents as equals, which is often sub-optimal. Furthermore, existing adaptive methods typically require a central "trusted" validation dataset to determine agent weights—a luxury many decentralized systems lack.

Methodology: DeGroot Aggregation

The authors propose DeGroot Aggregation, a decentralized mechanism inspired by social science research on how groups reach consensus through discourse. The process follows three main steps:

  1. Local Trust Assessment: For a new test point $x'$, each agent $i$ identifies the $N$ most similar examples in its local dataset. It then requests predictions for these local examples from other agents. By comparing these predictions to its own ground-truth labels, Agent $i$ constructs a "trust score" for every other agent.
  2. Iterative Consensus: Agents engage in a decentralized "discourse." They share initial predictions for the test point and repeatedly update them by taking a weighted average of their peers' predictions, based on the trust scores.
  3. Convergence: This process is mathematically equivalent to finding the stationary distribution of a Markov chain. Theoretically, in the large-sample limit, this social process converges to inverse-MSE weighting, the optimal way to combine independent, unbiased estimators.
Adaptive weighting of agents across the input space. The top panel shows how weights shift between agents as the input features change, while the bottom panel shows the corresponding MSE for each individual agent.

To provide uncertainty estimates, the authors developed a decentralized Jackknife procedure. This measures the sensitivity of the consensus to the removal of any single agent, allowing for the calculation of "error bars" on the final prediction.

Empirical Evaluation and Key Results

The researchers evaluated DeGroot Aggregation across a range of regression tasks, including synthetic data and real-world benchmarks like Boston Housing, financial risk prediction (E2006), and song release year prediction (YearPredictionMSD).

The results demonstrate significant improvements over standard baselines:

  • Performance Gains: On synthetic data, DeGroot reduced the MSE by up to 50x compared to simple model averaging.
  • Superiority over "Cheating" Baselines: DeGroot often outperformed methods that were given access to additional validation data (e.g., CV-adaptive), despite having no such external information.
  • Robustness to Scale: The method remains effective as the number of agents increases (tested up to 128), even when individual agents have limited local data.
Performance and convergence of DeGroot Aggregation: (a) Square error for individual test points comparing model averaging (M-avg) and DeGroot. (b) Convergence of MSE over pooling iterations. (c) Predictions with uncertainty estimates from the DeGroot jackknife.

Key Insights

  • Local Adaptivity: A model might be an expert in one part of the data space but perform poorly in another. DeGroot Aggregation recalculates trust for every test point, dynamically shifting weight to the most relevant local expert.
  • Privacy-Preserving: Agents only exchange predictions on a small set of points. They never share raw training data, gradients, or model parameters.
  • No Validation Data Needed: By using their own training data as a proxy for validation, agents can reach an optimal consensus without external supervision.

Limitations and Future Work

While effective, the iterative nature of consensus finding introduces communication overhead, requiring multiple rounds of exchange at test time. Additionally, the reliance on "nearest neighbors" for trust assessment may be challenging in high-dimensional spaces like raw images, where simple distance metrics are less meaningful. Future research could explore using learned embeddings for similarity or enhancing adversarial robustness against malicious agents.

Summary updated

Abstract

An increasingly common setting in machine learning involves multiple parties, each with their own data, who want to jointly make predictions on future test points. Agents wish to benefit from the collective expertise of the full set of agents to make better predictions than they would individually, but may not be willing to release their data or model parameters. In this work, we explore a decentralized mechanism to make collective predictions at test time, leveraging each agent's pre-trained model without relying on external validation, model retraining, or data pooling. Our approach takes inspiration from the literature in social science on human consensus-making. We analyze our mechanism theoretically, showing that it converges to inverse meansquared-error (MSE) weighting in the large-sample limit. To compute error bars on the collective predictions we propose a decentralized Jackknife procedure that evaluates the sensitivity of our mechanism to a single agent's prediction. Empirically, we demonstrate that our scheme effectively combines models with differing quality across the input space. The proposed consensus prediction achieves significant gains over classical model averaging, and even outperforms weighted averaging schemes that have access to additional validation data.
BibTeX
@inproceedings{mendlerdunner2021test,
  author = {Celestine Mendler-Dünner and Wenshuo Guo and Stephen Bates and Michael I. Jordan},
  title = {{Test-time Collective Prediction}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=hrkY-fe8nJV},
}
Figure