Abstract
Federated Learning (FL) models are notoriously overconfident, posing a massive risk when deployed in critical applications like healthcare or autonomous driving. This paper introduces Non-Uniform Calibration for Federated Learning (NUCFL), a framework that dynamically adjusts calibration penalties during local client training based on how similar a client's model is to the global model. NUCFL significantly improves model reliability across various FL algorithms without sacrificing predictive accuracy.
Introduction: The Calibration Gap in FL
Most research in Federated Learning focuses heavily on improving model accuracy across decentralized, privacy-preserving clients. However, in high-stakes decision-making, accuracy isn't enough; a model must also be calibrated. Calibration means the model's confidence in its prediction matches the actual probability of it being correct (e.g., if a model is 90% confident in 100 predictions, exactly 90 of them should be correct).
Modern neural networks are often poorly calibrated, typically leaning towards overconfidence. In FL, this problem is exacerbated by data heterogeneity (non-IID data), where each client has a skewed, local view of the world. Standard "post-hoc" calibration methods require a central holdout dataset, which violates FL's privacy constraints. Meanwhile, applying standard "train-time" calibration uniformly across all clients forces the model to over-optimize for local data quirks, failing to meet the calibration needs of the aggregated global model. The central question is: How can we calibrate a global FL model effectively without hurting its accuracy?
Methodology: Non-Uniform Calibration (NUCFL)
To address this challenge, the authors propose NUCFL (Non-Uniform Calibration for Federated Learning).
Instead of applying a fixed calibration penalty to every client, NUCFL dynamically scales the penalty based on the client's relationship with the global model. The framework operates through three main mechanisms:
- Auxiliary Calibration Loss: NUCFL utilizes existing train-time calibration losses—such as DCA (Difference between Confidence and Accuracy)—added as a penalty term to the standard classification loss (e.g., cross-entropy).
- Similarity Measurement: During training, NUCFL calculates the similarity (using metrics like Cosine Similarity or Centered Kernel Alignment) between a client's local model update and the global model's previous state.
- Dynamic Weighting: If a client's model is highly similar to the global model, it is assumed to be a good proxy for the global data distribution. NUCFL assigns this client a higher calibration penalty. Conversely, if a client is highly dissimilar (heterogeneous), it receives a lower penalty, allowing it to focus purely on learning its local data accurately without skewing the global calibration.
This non-uniform approach ensures that the global model is calibrated by the clients best positioned to represent it, seamlessly integrating with existing FL algorithms.
Experimental Setup
The authors evaluated their framework on four standard image classification datasets, partitioned using a Dirichlet distribution to simulate non-IID (heterogeneous) FL environments: MNIST, FEMNIST (Federated Extended MNIST), CIFAR-10, and CIFAR-100.
Results and Insights
The empirical evaluation of NUCFL reveals several critical insights into the behavior of calibration in federated settings:
- FL Exacerbates Miscalibration: Simply moving from centralized training to Federated Learning increases the gap between model confidence and accuracy. Data heterogeneity actively harms calibration.
- Uniform Penalties Fail in FL: Applying a standard train-time calibration loss uniformly onto FL clients biases the calibration toward local datasets, resulting in a global model that remains overconfident.
- Similarity as a Proxy for Global Relevance: The core insight of NUCFL is that not all clients should contribute equally to calibration. Clients whose updates align closely with the global model are the best candidates to shoulder the burden of calibrating the global model.
As demonstrated in the reliability diagrams above, NUCFL achieves substantial improvements:
- Massive Drops in Calibration Error: Tested on CIFAR-100 using the FedAvg algorithm, NUCFL reduced the Expected Calibration Error (ECE) from 10.52% (uncalibrated) to 6.14%.
- No Accuracy Trade-off: While traditional calibration methods often slightly degrade accuracy, NUCFL actually improved accuracy slightly in the CIFAR-100 FedAvg test (from 61.34% to 62.05%).
- State-of-the-Art Performance: NUCFL outperformed FedCal, a recently proposed FL-specific calibration method. Where FedCal achieved an 8.80% ECE on CIFAR-100, NUCFL achieved 6.14%.
- Algorithm Agnostic: NUCFL works seamlessly across multiple FL algorithms (FedAvg, FedProx, Scaffold, FedDyn, FedNova), consistently lowering calibration errors across the board.
To further validate their hypothesis, the authors ran a "destructive experiment" applying higher penalties to dissimilar clients. As expected, performance and calibration degraded severely, confirming their design choice.
Limitations and Future Work
Like much of the deep learning calibration literature, this paper is primarily an empirical study. Providing strict theoretical guarantees for why and how these calibration methods converge—especially in a decentralized FL setting—remains an open challenge.
For future work, the authors suggest extending this similarity-based dynamic weighting to Personalized FL (where clients maintain personalized layers rather than just a single global model) and Unsupervised FL for domain adaptation. They also note that the core idea of similarity-based weighting could be applied to other types of auxiliary losses beyond just calibration.
Summary updated