Source-linked AI summary

Fair Resource Allocation in Federated Learning

Tian Li, Maziar Sanjabi, Ahmad Beirami, Virginia Smith

arXiv:1905.10497v2cs.LGstat.ML

TL;DR

Federated learning’s aggregate-loss objective can disadvantage devices in heterogeneous networks by producing uneven accuracy. The paper introduces q-FFL, which reweights higher-loss devices, and q-FedAvg, a communication-efficient solver; experiments show improved fairness and efficient optimization across federated datasets.

  • Problem

    Heterogeneous federated data and aggregate-loss minimization can produce widely varying device accuracies without guarantees for individual devices.

  • Method

    q-FFL reweights higher-loss devices to encourage uniform accuracy, while q-FedAvg solves the objective with communication-efficient distributed updates.

  • Results

    45% average reduction in accuracy variance was achieved while maintaining the same overall average accuracy, and q-FedAvg solved the objective orders-of-magnitude more quickly than other baselines.

  • Takeaways & Limitations

    The framework provides tunable device-level fairness for federated learning and is also useful for related paradigms such as meta-learning.

  • Takeaways & Limitations

    The fairness objective involves a tension between uniform final testing accuracy and average testing accuracy, so the goal is to maintain the same or similar average rather than guarantee no trade-off.

Abstract

from arXiv · show

Federated learning involves training statistical models in massive, heterogeneous networks. Naively minimizing an aggregate loss function in such a network may disproportionately advantage or disadvantage some of the devices. In this work, we propose q-Fair Federated Learning (q-FFL), a novel optimization objective inspired by fair resource allocation in wireless networks that encourages a more fair (specifically, a more uniform) accuracy distribution across devices in federated networks. To solve q-FFL, we devise a communication-efficient method, q-FedAvg, that is suited to federated networks. We validate both the effectiveness of q-FFL and the efficiency of q-FedAvg on a suite of federated datasets with both convex and non-convex models, and show that q-FFL (along with q-FedAvg) outperforms existing baselines in terms of the resulting fairness, flexibility, and efficiency.

1 INTRODUCTION

Federated learning can produce highly uneven device-level performance when aggregate loss is minimized over heterogeneous data. The paper proposes q-FFL and q-FedAvg to improve accuracy uniformity while preserving average performance and supporting practical distributed training.

  • Motivation: Heterogeneous data and naive aggregate-loss minimization can cause widely varying accuracy across devices, without individual-device guarantees.The problem is especially pronounced when devices differ in data size and distribution.
  • q-FFL: q-FFL reweights local losses so higher-loss devices receive greater relative weight, encouraging more uniform device-level performance.Its fairness notion generalizes standard accuracy parity from protected groups to uniformity across devices.
  • q-FFL: q-FFL can maintain the same overall average accuracy while improving the fairness and uniformity of quality of service across devices.The fairness level is tunable through the objective’s parameter q.
  • q-FedAvg: q-FedAvg is a lightweight, scalable distributed solver designed for communication efficiency and low device participation.It dynamically estimates step-sizes associated with different q values, reducing hyperparameter-tuning overhead.
  • Results: 45% average reduction in accuracy variance was achieved while maintaining the same overall average accuracy across federated datasets.Experiments used both convex and non-convex models and compared q-FFL and q-FedAvg with existing baselines.

2 RELATED WORK

The paper connects federated fairness to resource allocation while distinguishing its device-level uniformity objective from attribute-based fairness in machine learning. It positions q-FFL as a tunable alternative that balances fairness and accuracy and relates to prior federated optimization methods.

  • Fairness in Resource Allocation: Resource-allocation research studies how to improve service for all users while maintaining overall throughput when shared resources are scarce.α-fairness provides a unified framework for tuning the emphasis on fairness with a single parameter.
  • Fairness in Resource Allocation: q-FFL treats the global model as a resource serving devices and adapts α-fairness ideas to encourage uniform accuracy distributions.The objective allows trade-offs between fairness and accuracy through q.
  • Fairness in Machine Learning: Machine-learning fairness commonly protects specific attributes, whereas this work defines fairness as uniformity of accuracy across federated devices.The paper does not seek identical accuracy for every device.
  • Federated Fairness: Agnostic Federated Learning optimizes the single worst device, while q-FFL offers tunable fairness and contains AFL as a large-q special case.AFL had been applied at small scales involving a handful of devices.
  • Federated Optimization: Federated optimization must address expensive communication, system heterogeneity, and non-identically distributed data through local updating and low participation.These constraints motivate communication-efficient federated methods.

3 FAIR FEDERATED LEARNING

The paper formalizes device-level fairness as uniformity of performance, introduces q-FFL to reweight higher-loss devices, and develops distributed solvers for the resulting objective. Increasing q emphasizes fairness, while q-FedAvg uses federated local updates to improve practical efficiency.

  • 3.1 PRELIMINARIES: FEDERATED LEARNING, FEDAVG, AND FAIRNESS: Federated learning trains local models on device-generated data and periodically communicates with a central server to reach global consensus.Standard methods sample subsets of devices and perform local optimization to reduce communication costs.
  • 3.1 PRELIMINARIES: FEDERATED LEARNING, FEDAVG, AND FAIRNESS: Naive federated optimization can create variable device performance by favoring devices with more data or commonly occurring devices.This motivates an explicit fairness criterion.
  • 3.1 PRELIMINARIES: FEDERATED LEARNING, FEDAVG, AND FAIRNESS: Fairness is defined as greater uniformity of testing accuracies across devices, with variance used as the primary uniformity measure.The authors seek greater uniformity while maintaining the same or similar average accuracy.
  • 3.2 THE OBJECTIVE: q-FAIR FEDERATED LEARNING (q-FFL): q-FFL dynamically reweights devices with poor performance, using q to control how strongly higher local losses are emphasized.q = 0 recovers the classical objective, while sufficiently large q approaches minimax fairness.
  • 3.2 THE OBJECTIVE: q-FAIR FEDERATED LEARNING (q-FFL): q-FFL generalizes AFL and empirically produces fairer, more uniform training and testing accuracy distributions on convex and non-convex federated models.The theoretical analysis also studies increasing uniformity as q increases.
  • 3.3 THE SOLVER: FEDAVG-STYLE q-FAIR FEDERATED LEARNING (q-FEDAVG): q-FedSGD uses dynamically computed step-sizes, while q-FedAvg improves communication efficiency by incorporating local updating schemes.q-FedAvg is reported to solve q-FFL more efficiently than q-FedSGD and can converge more favorably than AFL with similar device performance.

4 EVALUATION

Experiments across federated datasets evaluate q-FFL’s fairness and q-FedAvg’s efficiency, including comparisons with uniform sampling, AFL, and q-FedSGD.

  • Experimental setup: The experiments use federated datasets with convex and non-convex models, including benchmarks for federated learning and meta-learning.The implementation simulates a network with one server and m devices.
  • Fairness of q-FFL: 45% average variance reduction preserves roughly the same average testing accuracy across devices under q-FFL.The q > 0 distributions are more centered, with lower accuracies increasing at the potential cost of decreasing high accuracies.
  • Comparison with other objectives: q-FFL produces fairer testing-accuracy solutions than uniform sampling while achieving similar average accuracies.Uniform sampling can overfit devices with few data points because it is static, whereas q-FFL dynamically reduces a device’s weight as its loss becomes small.
  • Comparison with other objectives: q-FFL outperforms AFL on worst testing accuracy on both evaluated datasets, while larger q induces less variance.The comparison uses the two small datasets studied in prior AFL work and averages each accuracy across five random initializations.
  • Efficiency of q-FedAvg: q-FedAvg converges faster than q-FedSGD in communication rounds in most cases when solving the same q-FFL objective.Highly heterogeneous local data can slow q-FedAvg because local updates may move models too far from the initial global model.
  • Efficiency of q-FedAvg: q-FedSGD with a dynamic step-size has similar convergence behavior to best-tuned FedSGD, indicating that the step-size estimation is effective across q values.The step-size is tuned on q = 0 and applied to solve q-FFL with q > 0.
  • Beyond federated learning: applying q-FFL to meta-learning: q-MAML applies q-FFL to meta-learning to learn initializations yielding fairer personalized-model accuracy distributions.With q = 0, q-MAML reduces to MAML; increasing q trades average accuracy for greater fairness.

5 CONCLUSION

The paper proposes q-FFL for more uniform device-level accuracy distributions and q-FedAvg as a scalable solver, with empirical evidence supporting fairness, flexibility, and efficiency.

  • Conclusion: q-FFL encourages fairer, more uniform accuracy distributions across federated devices, while q-FedAvg provides a scalable solver for massive networks.The framework is also applied beyond federated learning to meta-learning.

A.1 UNIFORMITY INDUCED BY q-FFL

q-FFL promotes more uniform device-level performance by reweighting higher-loss devices, with fairness assessed through variance, cosine similarity, and entropy. Theoretical results establish several uniformity guarantees and relate geometric and information-theoretic fairness measures.

  • The analysis studies uniformity through variance, cosine similarity, and entropy of the device-performance distribution.
  • q-FFL assigns higher relative weight to devices with higher loss, targeting more uniform performance across devices.
  • q = 1 yields lower performance-distribution variance and higher cosine similarity with the all-ones vector than q = 0.
  • For sufficiently small increases in q, q-FFL produces more uniform performance distributions under the paper’s higher-order uniformity definition.
  • The general claim is conjectured beyond the proved special case, leaving broader guarantees for future work.
  • q-FFL’s cosine-distance and entropy-based fairness conditions are equivalent under Lemma 11.

A.2 GENERALIZATION BOUNDS

The paper develops generalization bounds for q-FFL and frames q as a tunable fairness parameter spanning FedAvg-like and worst-device objectives. It also introduces q-FedAvg and related algorithms for efficient distributed optimization.

  • q-FFL supports a flexible fairness–accuracy trade-off and generalizes AFL, recovered as q →∞.
  • The objective uses device-local data distributions, sample counts, losses, and hypothesis functions to define empirical federated losses.
  • Under bounded loss and specified device sample counts, Lemmas 12 and Theorem 13 provide high-probability generalization bounds for q-FFL.
  • q-FedAvg enables tuning a family of q values by reusing step-sizes, while q-FedSGD and q-FedAvg mirror distributed SGD and federated averaging.
  • q = 0 corresponds to zero fairness and recovers FedAvg, whereas q = +∞ corresponds to min-max fairness focused on the worst-performing device.

D.1 DATASETS AND MODELS

The evaluation uses federated datasets spanning synthetic, sensor, text, character-language, and meta-learning settings, with both convex and non-convex models. Dataset statistics are summarized by device and sample counts.

  • Table 4 summarizes total devices, total samples, and the mean and deviation of data points per device.
  • Vehicle2 represents a distributed network of 23 sensors and uses a linear SVM for binary vehicle classification.
  • Sent140 assigns each of 1,101 Twitter accounts to a device for binary sentiment classification using pretrained word embeddings and an LSTM model.
  • Shakespeare associates speaking roles with devices and trains a character-level language model on 31 roles.
  • Omniglot uses 300 meta-training and 100 meta-testing tasks for five-class character classification with a convolutional neural network.

D.2 IMPLEMENTATION DETAILS

Experiments simulate a one-server, multi-device federated system on specified CPU and GPU hardware using TensorFlow. Hyperparameters and data splits are selected through validation, repeated across random splits, with controlled comparison settings.

  • The federated setting is simulated on a server with two Intel Xeon E5-2650 v4 CPUs and eight Nvidia 1080Ti GPUs.
  • All code is implemented in TensorFlow 1.10.1.
  • Data are split into 80% training, 10% testing, and 10% validation sets, and q is tuned from nine candidate values.
  • The q-selection procedure prioritizes the largest variance decrease while keeping average accuracy within 1% of q = 0, repeated over five random splits.
  • Efficiency comparisons tune q-FedSGD learning rates, fix selected devices and minibatch orders, and stop after ten rounds without decreasing training loss.

E.1 FULL RESULTS OF PREVIOUS EXPERIMENTS

Across testing and training evaluations, q-FFL produces more uniform device-accuracy distributions while preserving approximately the same average accuracy. Compared with uniform sampling, q-FFL is generally fairer for testing accuracy, although uniform sampling can be fairer for training accuracy in some cases.

  • q-FFL increases the uniformity of testing-accuracy distributions under variance, cosine-similarity, and KL-divergence metrics.It also increases the accuracy of the worst 10% of devices without decreasing average accuracies.
  • q-FFL produces more centered training-accuracy distributions across devices without sacrificing average accuracy.The same pattern appears across the reported training-accuracy uniformity measurements.
  • q-FFL reduces accuracy variance while preserving approximately the same average accuracy across devices and data points.The average accuracies for q = 0 and q > 0 objectives are approximately the same under both averaging schemes.
  • Uniform sampling can produce higher and fairer training accuracies in some cases, apparently because it overfits devices with few samples.This advantage is specific to the reported training-accuracy comparison.
  • For testing accuracy, q-FFL tends to improve the worst 10% of devices and reduce variance relative to uniform sampling.q-FFL is also reported as more fair under additional uniformity metrics.

E.2 ADDITIONAL EXPERIMENTS

Additional experiments examine how heterogeneity, device count, q selection, and optimization choices affect fairness and efficiency. Positive q values generally improve uniformity, while convergence behavior depends on data heterogeneity and the solver.

  • As data heterogeneity increases, accuracy distributions become less uniform for both q = 0 and q > 0, while fewer devices produce more uniform distributions.Except on IID data, setting q > 0 encourages fairer solutions.
  • All tested q > 0 values can produce fairer solutions than q = 0, making the objective relatively insensitive to the particular positive q selected.The experiments use q values selected from a predefined protocol.
  • Larger q provides a more flexible fairness–accuracy trade-off, yielding smaller variance but potentially lower accuracy.Increasing q also imposes greater uniformity under other reported metrics.
  • A device-specific strategy that trains multiple q-FFL models lets each device select its best validation model and can improve worst-device performance.The strategy adds local computation and communication load per round.
  • Fair q-FFL objectives do not significantly slow convergence compared with FedAvg for the evaluated q values.The comparison uses q-FedAvg to solve q-FFL and FedAvg to solve the q = 0 objective.
  • q-FFL converges faster than AFL at the same final testing accuracy for the worst device, with a larger gap as device count increases.The comparison uses non-local-updating methods and full gradient descent per round.
  • q-FedAvg is more efficient than q-FedSGD on IID data but converges more slowly as data heterogeneity increases.Local updating can hurt convergence when device data distributions are highly heterogeneous.
Loading 1905.10497v2…