DA DA Q UANT :
D OUBLY
- ADAPTIVE QUANTIZA TION FOR COMMUNICATION - EFFICIENT
F EDERATED
L EARNING
Anonymous authors
Paper under double-blind review
A BSTRACT
Federated Learning (FL) is a powerful technique for training a model on a server with data from several clients in a privacy-preserving manner.
In FL, a server sends the model to every client, who then train the model locally and send it back to the server.
The server aggregates the updated models and repeats the process for several rounds.
FL incurs signiﬁcant communication costs, in particular when transmitting the updated local models from the clients back to the server.
Recently proposed algorithms quantize the model parameters to efﬁciently compress FL communication.
These algorithms typically have a quantization level that controls the compression factor.
We ﬁnd that dynamic adaptations of the quantization level can boost compression without sacriﬁcing model quality.
First, we introduce a time-adaptive quantization algorithm that increases the quantization level as training progresses.
Second, we introduce a client-adaptive quantization algorithm that assigns each individual client the optimal quantization level at every round.
Finally, we combine both algorithms into DAdaQuant, the doubly-adaptive quantization algorithm.
Our experiments show that DAdaQuant consistently improves client → server compression, outperforming the strongest non-adaptive baselines by up to 2 .
8 × .
I NTRODUCTION
Edge devices such as smartphones, remote sensors and smart home appliances generate massive amounts of data (Wang et al., 2018b; Cao et al., 2017; Shi & Dustdar, 2016).
In recent years,
Federated Learning (FL) has emerged as a technique to train models on this data while preserving privacy (McMahan et al., 2017; Li et al., 2018).
In FL, we have a single server that is connected to many clients.
Each client stores a local dataset that it does not want to share with the server because of privacy concerns or law enforcement (Voigt & Von dem Bussche, 2017).
The server wants to train a model on all local datasets.
To this end, it initializes the model and sends it to a random subset of clients.
Each client trains the model on its local dataset and sends the trained model back to the server.
The server accumulates all trained models into an updated model for the next iteration and repeats the process for several rounds until some termination criterion is met.
This procedure enables the server to train a model without accessing any local datasets.
Today’s neural network models often have millions or even billions (Brown et al., 2020) of parameters, which makes high communication costs a concern in FL.
In fact, Qiu et al.
(2020) suggest that communication between clients and server may account for over 70% of energy consumption in FL.
Reducing communication in FL is an attractive area of research because it lowers bandwidth requirements, energy consumption and training time.
Communication in FL occurs in two phases: Sending parameters from the server to clients ( downlink ) and sending updated parameters from clients to the server ( uplink ).
Uplink bandwidth usually imposes a tighter bottleneck than downlink bandwidth.
This has several reasons.
For one, the average global mobile upload bandwidth is currently less than one fourth of the download bandwidth (Speedtest).
For another, FL downlink communication sends the same parameters to each client.
Broadcasting parameters is usually more efﬁcient than the accumulation of parameters from differ- ent clients that is required for uplink communication (Amiri et al., 2020; Reisizadeh et al., 2019).
For these reasons, we seek to compress uplink communication.
[Figure]
[Figure]
on the training loss.
A large class of compression algorithms for FL apply some lossy quantizer Q , optionally followed by a lossless compression stage.
Q usually provides a “quantization level” hyperparameter q to control the coarseness of quantization (e.g. the number of bins for ﬁxed-point quantization).
When q is kept constant during training, we speak of static quantization .
When q changes, we speak of adaptive quantization .
Adaptive quantization can exploit asymmetries in the FL framework to minimize communication.
One such asymmetry lies in FL’s training time, where we observe that early training rounds can use a lower q without affecting convergence.
Figure 2 illustrates how time-adaptive quantization leverages this phenomenon to minimize communication.
Another asymmetry lies in FL’s client space, because most FL algorithms weight client contributions to the global model proportional to their local dataset sizes.
Figure 1 illustrates how client-adaptive quantization can minimize the quantization error.
Intuitively, FL clients with greater weighting should have a greater communication budget and our proposed client-adaptive quantization achieves this in a principled way.
To this end, we introduce the expected variance of an accumulation of quantized parameters, E [Var( (cid:80) Q ( p ))] , as a measure of the quantization error.
Our client-adaptive quantization algorithm then assigns clients minimal quantization levels, subject to a ﬁxed E
[Var( (cid:80) Q ( p ))] .
This lowers the amount of data communicated from clients to the server, without increasing the quantization error.
DAdaQuant (Doubly Adaptive Quantization) combines time- and client-adaptive quantization with an adaptation of the QSGD ﬁxed-point quantization algorithm to achieve state-of-the-art FL uplink compression.
In this paper, we make the following contributions:
• We introduce the concept of client-adaptive quantization and develop algorithms for time- and client-adaptive quantization that are computationally efﬁcient, empirically Pareto optimal and compatible with arbitrary FL quantizers.
Our client-adaptive quantization is provably optimal for stochastic ﬁxed-point quantizers
• We create Federated QSGD as an adaptation of the stochastic ﬁxed-point quantizer QSGD that works with FL.
Federated QSGD outperforms all other quantizers, establishing a strong baseline for FL compression with static quantization.
• We combine time- and client-adaptive quantization into DAdaQuant.
We demonstrate DAdaQuant’s state-of-the-art compression by empirically comparing it against several competitive FL compression algorithms.
R ELATED W ORK
FL research has explored several approaches to reduce communication.
We identify three general directions.
First, there is a growing interest of investigating FL algorithms that can converge in fewer rounds.
FedAvg (McMahan et al., 2017) achieves this with prolonged local training, while FOLB (Nguyen et al., 2020) speeds up convergence through a more principled client sampling.
Since communication is proportional to the number of training rounds, these algorithms effectively reduce communication.
Secondly, communication can be reduced by reducing the model size because the model size is proportional to the amount of training communication.
PruneFL (Jiang et al., 2019) progressively prunes the model over the course of training, while AFD (Bouacida et al., 2021) only trains submodels on clients.
Thirdly, it is possible to directly compress FL training communication.
FL compression algorithms typically apply techniques like top-k sparsiﬁcation (Malekijoo et al., 2021; Rothchild et al., 2020) or quantization (Reisizadeh et al., 2019; Shlezinger et al., 2020) to parameter updates, optionally followed by lossless compression.
Our work applies to quantization-based compression algorithms.
It is partially based on QSGD (Alistarh et al., 2017), which combines lossy ﬁxed-point quantization with a lossless compression algorithm to compress gradients communicated in distributed training.
DAdaQuant adapts QSGD into Federated QSGD, which works with Federated Learning.
DAdaQuant also draws inspiration from FedPAQ (Reisizadeh et al., 2019), the ﬁrst FL framework to use lossy compression based on model parameter update quantization.
However, FedPAQ does not explore the advantages of additional lossless compression or adaptive quantization.
UVeQFed (Shlezinger et al., 2020) is an FL compression algorithm that generalizes scalar quantization to vector quantization and subsequently employs lossless compression with arithmetic coding.
Like
FedPAQ, UVeQFed also limits itself to a single static quantization level.
Faster convergence, model size reduction and communication compression are orthogonal techniques, so they can be combined for further communication savings.
For this paper, we limit the scope of empirical comparisons to quantization-based FL compression algorithms.
For quantization-based compression for model training, prior works have demonstrated that DNNs can be successfully trained in low-precision (Banner et al., 2018; Gupta et al., 2015; Sun et al., 2019).
There are also several adaptive quantization algorithms for training neural networks in a non-distributed setting.
Shen et al.
(2020) use different quantization levels for different parameters of a neural network.
FracTrain (Fu et al., 2020) introduced multi-dimensional adaptive quantization by developing time-adaptive quantization and combining it with parameter-adaptive quantization.
However, FracTrain uses the current loss to decide on the quantization level.
FL generally can only compute local client losses that are too noisy to be practical for FracTrain.
AdaQuantFL introduces time-adaptive quantization to FL, but requires the global loss (Jhunjhunwala et al., 2021).
To compute the global loss, AdaQuantFL has to communicate with every client each round.
We show in
Section 4.2 that this quickly becomes impractical as the number of clients grows.
DAdaQuant’s time-adaptive quantization overcomes this issue without compromising on the underlying FL communication.
In addition, to the best of our knowledge, DAdaQuant is the ﬁrst algorithm to use client-adaptive quantization.
T HE DA DA Q UANT METHOD 3. F EDERATED L EARNING
Federated Learning assumes a client-server topology with a set C
= { c i | i ∈ { 1 , 2 ...N }} of N clients that are connected to a single server.
Each client c k has a local dataset D k from the local data distribution (cid:68) k .
Given a model M with parameters p , a loss function f p ( d ∈ D k ) and the local loss
F k ( p ) = 1 | D k | (cid:80) d ∈ D k f p ( d ) , FL seeks to minimize the global loss G ( p ) =
(cid:80) Nk =
| D k | (cid:80) l | D l | F k ( p ) .
3. F EDERATED A VERAGING (F ED A VG )
DAdaQuant makes only minimal assumptions about the FL algorithm.
Crucially, DAdaquant can complement FedAvg (McMahan et al., 2017), which is representative of a large class of FL algorithms.
FedAvg trains the model M over several rounds.
In each round t , FedAvg sends the model parameters p t to a random subset S t of K clients who then optimize their local objectives F k ( p t ) and send the updated model parameters p k t +1 back to the server.
The server accumulates all parameters into the new global model p t +1 =
(cid:80) k ∈ S t | D k | (cid:80) j
| D j | p kt +1 and starts the next round.
Algorithm 1 lists
FedAvg in detail.
For our experiments, we use the FedProx (Li et al., 2018) adaptation of FedAvg.
FedProx improves the convergence of FedAvg by adding the proximal term µ 2 (cid:107) p kt +1 − p t (cid:107) 2 to the local objective F k ( p kt +1 ) in Line 19 of Algorithm 1.
3. Q UANTIZATION WITH F EDERATED QSGD
While DAdaQuant can be applied to any quantizer with a conﬁgurable quantization level, it is optimized for ﬁxed-point quantization.
We introduce Federated QSGD as a competitive ﬁxed-point quantizer on top of which DAdaQuant is applied.
In general, ﬁxed-point quantization uses a quantizer Q q with quantization level q that splits R ≥ 0 and R ≤ 0 into q intervals each.
Q q ( p ) then returns the sign of p and | p | rounded to one of the endpoints of its encompassing interval.
Q q ( p ) quantizes the vector p elementwise.
We design DAdaQuant’s quantization stage based on QSGD, an efﬁcient ﬁxed-point quantizer for state-of-the-art gradient compression.
QSGD quantizes a vector p in three steps:
Quantize p as Q q ( p || p || 2 ) into q bins in [0 , 1] , storing signs and || p || 2 separately.
( lossy ) 2.
Encode the resulting integers with 0 run-length encoding.
( lossless ) 3.
Encode the resulting integers with Elias ω coding.
( lossless )
QSGD has been designed speciﬁcally for quantizing gradients.
This makes it not directly applicable to parameter compression.
To overcome this limitation, we apply difference coding to uplink compression, ﬁrst introduced to FL by FedPAQ.
Each client c k applies Q q to the parameter updates p kt +1 − p t (cf.
Line 20 of Algorithm 1) and sends them to the server.
The server keeps track of the previous parameters p t and accumulates the quantized parameter updates into the new parameters as p t +1 =
p t + (cid:80) k ∈ S t | D k | (cid:80) l | D l | Q q ( p kt +1 − p t ) (cf.
Line 11 of Algorithm 1).
We ﬁnd that QSGD works well with parameter updates, which can be regarded as an accumulation of gradients over several training steps.
We call this adaptation of QSGD Federated QSGD .
3. T IME - ADAPTIVE QUANTIZATION
Time-adaptive quantization uses a different quantization level q t for each round t of FL training.
DAdaQuant chooses q t to minimize communication costs without sacriﬁcing accuracy.
To this end, we ﬁnd that lower quantization levels sufﬁce to initially reduce the loss, while partly trained models require higher quantization levels to further improve (as illustrated in Figure 2).
FracTrain is built on similar observations for non-distributed training.
Therefore, we design DAdaQuant to mimic
FracTrain in monotonically increasing q t as a function of t and using the training loss to inform increases in q t .
Round
Client
Samples
Quantization level
A
[Figure]
8 C   8 D   (a) Static quantization.
Round
Client
Samples
Quantization level
A 4 B    4 C   8 D   (b) Time-adaptive quantization.
Round
Client
Samples
Quantization level
[Figure]
9 C   7 D   (c) Client-adaptive quantization.
Round
Client
Samples
Quantization level
A
[Figure]
5 C [Figure] [Figure]
[Figure]
and
[Figure]
adaptive quantization.
When q is too low, FL converges prematurely.
Like FracTrain, DAdaQuant monitors the FL loss and increases q when it converges.
Unlike FracTrain, there is no single centralized loss function to evaluate and unlike AdaQuantFL, we do not assume availability of global training loss G ( p t ) .
Instead, we estimate G ( p t ) as the average local loss ˆ G t = (cid:80) k ∈ S t | D k | (cid:80) l | D l | F k ( p t ) where S t is the set of clients sampled at round t .
Since S t typically consists of only a small fraction of all clients, ˆ
G t is a very noisy estimate of G ( p t ) .
This makes it unsuitable for convergence detection.
Instead,
DAdaQuant tracks a running average loss ˆˆ G t = ψ ˆˆ G t − 1 + (1 − ψ ) ˆ G t .
We initialize q 1 = q min for some q min ∈ N .
DAdaQuant determines training to converge whenever ˆˆ G t ≥ ˆˆ G t +1 − φ for some φ ∈ N that speciﬁes the number of rounds across which we compare ˆˆ G .
On convergence, DAdaQuant sets q t = 2 q t − 1 and keeps the quantization level ﬁxed for at least φ rounds to enable reductions in G to manifest in ˆˆ G .
Eventually, the training loss converges regardless of the quantization level.
To avoid unconstrained quantization increases on convergence, we limit the quantization level to q max .
The following equation summarizes DAdaQuant’s time-adaptive quantization:
[Equation]
t > 0 and ˆˆ G t − 1 ≥ ˆˆ G t − φ and t > φ and 2 q t − 1 < q max and q t − 1 =
q t − φ q t −else
3. C LIENT - ADAPTIVE QUANTIZATION
FL algorithms typically accumulate each parameter p i over all clients into a weighted average p = (cid:80)
Ki =1 w i p i (see Algorithm 1).
Quantized FL communicates and accumulates quantized parameters
Q q ( p ) =
(cid:80)
Ki
=
w i Q q
( p i ) where q is the quantization level.
We deﬁne the quantization error e qp as e qp = | p − Q q ( p ) | .
We observe that E p 1 ...p K [Var( Q q ( p ))] is a useful statistic of the quantization error because it strongly correlates with the loss added by quantization.
For a stochastic, unbiased ﬁxedpoint compressor like Federated QSGD, E p 1 ...p K [Var( Q q ( p ))] equals E p 1 ...
p K [Var( e qp )] and can be evaluated analytically.
We observe in our experiments that communication cost per client is roughly a linear function of
Federated QSGD’s quantization level q .
This means that the communication cost per round is proportional to Q
= Kq .
We call Q the communication budget and use it as a proxy measure of communication cost.
Client-adaptive quantization dynamically adjusts the quantization level of each client.
This means that even within a single round, each client c k can be assigned a different quantization level q k .
The communication budget of client-adaptive quantization is then Q = (cid:80)
Kk =1 q k and Q q ( p ) generalizes to Q q 1 ...
q K ( p ) =
(cid:80)
Ki
=
w i Q
q
i
( p i ) .
We devise an algorithm that chooses q k to minimize Q subject to E p 1 ...
p K [Var( e q 1 ...q K p )] =
E p 1 ...
p K [Var( e qp )] for a given q .
Thus, our algorithm effectively minimizes communication costs while maintaining a quantization error similar to static quantization.
Theorem 1 provides us with an analytical formula for quantization levels q 1 . . .
q K .
Theorem 1.
Given parameters p 1 . . .
p k ∼ (cid:85) [ − t, t ] and quantization level q , min q 1 ...q K (cid:80)
Ki =1 q i subject to E p 1 ...
p K [Var( e q 1 ...q K p )] =
E p 1 ...
p K [Var( e qp )] is minimized by q i = (cid:112) ab × w 2 / 3 i
where a = (cid:80) Kj =
1 w 2 / 3 j and b = (cid:80) Kj
=
w 2 j q 2 .
DAdaQuant applies Theorem 1 to lower communication costs while maintaining the same loss as static quantization does with a ﬁxed q .
To ensure that quantization levels are natural numbers,
DAdaQuant approximates the optimal real-valued solution as q i = max(1 , round ( (cid:112) ab × w 2 / 3 i )) .
Appendix B gives a detailed proof of Theorem 1.
To the best of our knowledge, DAdaQuant is the ﬁrst algorithm to use client-adaptive quantization.
1 Function RunServer()
Initialize w
[Equation] = [Equation]
16 Function RunClient
21 end
3. D OUBLY - ADAPTIVE QUANTIZATION (DA DA Q UANT )
DAdaQuant combines the time-adaptive and client-adaptive quantization algorithms described in the previous sections.
At each round t , time-adaptive quantization determines a preliminary quantization level q t .
Client-adaptive quantization then ﬁnds the client quantization levels q kt , k ∈ { 1 , . . .
, K } that minimize (cid:80)
Ki =1 q i subject to E p 1 ...
p K [Var( e q 1 ...q K p )] =
E p 1 ...
p K [Var( e qp )] .
Algorithm 1 lists
DAdaQuant in detail.
Figure 3 gives an example of how our time-adaptive, client-adaptive and doubly-adaptive quantization algorithms set quantization levels.
Reisizadeh et al.
(2019) prove the convergence of FL with quantization for convex and non-convex cases as long as the quantizer Q is (1) unbiased and (2) has a bounded variance.
These convergence results extend to DAdaQuant when combined with any quantizer that satisﬁes (1) and (2) for
DAdaQuant’s minimum quantization level q = 1 .
Crucially, this includes Federated QSGD.
We highlight DAdaQuant’s low overhead and general applicability.
The computational overhead is dominated by an additional evaluation epoch per round per client to compute ˆˆ G t , which is negligible when training for many epochs per round.
DAdaQuant can compliment any FL algorithm that trains models over several rounds and accumulates a weighted average of client parameters.
Most FL algorithms, including FedAvg, follow this design.
E XPERIMENTS 4. E XPERIMENTAL DETAILS
Evaluation We use DAdaQuant with Federated QSGD to train different models with FedProx on different datasets for a ﬁxed number of rounds.
We monitor the test loss and accuracy at ﬁxed intervals and measure uplink communication at every round across all devices.
Models & datasets We select a broad and diverse set of ﬁve models and datasets to demonstrate the general applicability of DAdaQuant.
To this end, we use DAdaQuant to train a linear model,
CNNs and LSTMs of varying complexity on a federated synthetic dataset ( Synthetic ), as well as two federated image datasets ( FEMNIST and CelebA ) and two federated natural language datasets ( Sent140 and Shakespeare ) from the LEAF (Caldas et al., 2018) project for standardized FL research.
We refer to Appendix A.1 for more information on the models, datasets, training objectives and implementation.
System heterogeneity In practice, FL has to cope with clients that have different compute capabilities.
We follow Li et al.
and simulate this system heterogeneity by randomly reducing the number of epochs to E (cid:48) for a random subset S (cid:48)
t ⊂ S t of clients at each round t , where E (cid:48) is sampled from [1 , . . .
, E ] and | S (cid:48) t | = 0 .
9 K .
Baselines We compare DAdaQuant against competing quantization-based algorithms for FL parameter compression, namely Federated QSGD, FedPAQ (Reisizadeh et al., 2019), GZip with ﬁxedpoint quantization (FxPQ + GZip), UVeQFed (Shlezinger et al., 2020) and FP8.
Federated QSGD (see section 3.3) is our most important baseline because it outperforms the other algorithms.
FedPAQ only applies ﬁxed-point quantization, which is equivalent to Federated QSGD without lossless compression.
Similarly, FxPQ + GZip is equivalent to Federated QSGD with Gzip for its lossless compression stages.
UVeQFed generalizes scalar quantization to vector quantization, followed by arithmetic coding.
We apply UVeQFed with the optimal hyperparameters reported by its authors.
FP8 (Wang et al., 2018a) is a ﬂoating-point quantizer that uses an 8-bit ﬂoating-point format designed for storing neural network gradients.
We also evaluate all experiments without compression to establish an accuracy benchmark.
Hyperparameters With the exception of CelebA , all our datasets and models are also used by Li et al..
We therefore adopt most of the hyperparameters from Li et al.
and use LEAF’s hyperparameters for CelebA Caldas et al.
For all experiments, we sample 10 clients each round.
We train
Synthetic , FEMNIST and CelebA for 500 rounds each.
We train Sent140 for 1000 rounds due to slow convergence and Shakespeare for 50 rounds due to rapid convergence.
We use batch size 10, learning rates 0.01, 0.003, 0.3, 0.8, 0.1 and µ s (FedProx’s proximal term coefﬁcient) 1, 1, 1, 0.001,for Synthetic , FEMNIST , Sent140 , Shakespeare , CelebA respectively.
We randomly split the local datasets into 80% training set and 20% test set.
To select the quantization level q for static quantization with Federated QSGD, FedPAQ and FxPQ + GZip, we run a gridsearch over q = 1 , 2 , 4 , 8 , . . .
and choose for each dataset the lowest q for which Federated QSGD exceeds uncompressed training in accuracy.
We set UVeQFed’s “coding rate” hyperparameter R = 4 , which is the lowest value for which UVeQFed achieves negligible accuracy differences compared to uncompressed training.
We set the remaining hyperparameters of
[Table]
t. Federated QSGD.
UVeQFed to the optimal values reported by its authors.
Appendix A.3 shows further experiments that compare against UVeQFed with R chosen to maximize its compression factor.
For DAdaQuant’s time-adaptive quantization, we set ψ to 0.9, φ to 1 / 10 th of the number of rounds and q max to the quantization level q for each experiment.
For Synthetic and FEMNIST , we set q min to 1.
We ﬁnd that Sent140 , Shakespeare and CelebA require a high quantization level to achieve top accuracies and/or converge in few rounds.
This prevents time-adaptive quantization from increasing the quantization level quickly enough, resulting in prolonged low-precision training that hurts model performance.
To counter this effect, we set q min to q max / 2 .
This effectively results in binary timeadaptive quantization with an initial low-precision phase with q = q max / 2 , followed by a highprecision phase with q = q max .
4. R ESULTS
[Figure]
We plot the total client → server communication required to train an MLR model on synthetic datasets with 10, 100, 200 andclients.
AdaQuantFL’s communication increases linearly with the number of clients because it trains the model on all clients at each round.
In contrast,
DAdaQuant’s communication does not change with the number of clients.
We repeat the main experiments three times and report average results and their standard deviation (where applicable).
Table 1 shows the highest accuracy and total communication for each experiment.
Figure 5 plots the maximum accuracy achieved for any given amount of communication.
Baselines Table 1 shows that the accuracy of most experiments lies within the margin of error of the uncompressed experiments.
This reiterates the viability of quantization-based compression algorithms for communication reduction in FL.
For all experiments, Federated
QSGD achieves a signiﬁcantly higher compression factor than the other baselines.
The authors of FedPAQ and UVeQFed also compare their methods against QSGD and report them as superior.
However, FedPAQ is compared against “unfederated” QSGD that communicates gradients after each local training step and UVeQFed is compared against QSGD without its lossless compression stages.
Communication in Megabytes
A cc u r ac y i n % .
Synthetic
Communication in Megabytes
A cc u r ac y i n % .
FEMNIST
Federated QSGD
DAdaQuant
Communication in Megabytes
A cc u r ac y i n % .
Sent
Time-adaptive quantization The purely time-adaptive version of DAdaQuant, DAdaQuant time , universally outperforms Federated QSGD and the other baselines in Table 1, achieving comparable accuracies while lowering communication costs.
DAdaQuant time performs particularly well on Synthetic and FEMNIST , where it starts from the lowest possible quantization level q = 1 .
However, binary time-adaptive quantization still measurably improves over QSGD for Sent140 , Shakespeare and Celeba .
Figure 4 provides empirical evidence that AdaQuantFL’s communication scales linearly with the number of clients.
As a result, AdaQuantFL is prohibitively expensive for datasets with thousands of clients such as Celeba and Sent140 .
DAdaQuant does not face this problem because its communication is unaffected by the number of clients.
Client-adaptive quantization The purely time-adaptive version of DAdaQuant, DAdaQuant clients , also universally outperforms Federated QSGD and the other baselines in Table 1, achieving similar accuracies while lowering communication costs.
Unsurprisingly, the performance of
DAdaQuant clients is correlated with the coefﬁcient of variation c v = σµ of the numbers of samples in the local datasets with mean µ and standard deviation σ : Synthetic ( c v = 3 . 3 ) and Shakespeare ( c v = 1 . 7 ) achieve signiﬁcantly higher compression factors than Sent140 ( c v = 0 . 3 ), FEMNIST ( c v = 0 . 4 ) and Celeba ( c v = 0 . 3 ).
DAdaQuant DAdaQuant outperforms DAdaQuant time and DAdaQuant clients in communication while achieving similar accuracies.
The compression factors of DAdaQuant are roughly multiplicative in those of DAdaQuant clients and DAdaQuant time .
This demonstrates that we can effectively combine time- and client-adaptive quantization for maximal communication savings.
Pareto optimality Figure 5 shows that DAdaQuant achieves a higher accuracy than the strongest baseline, Federated QSGD, for any ﬁxed accuracy.
This means that DAdaQuant is Pareto optimal for the datasets we have explored.
C ONCLUSION
We introduced DAdaQuant as a computationally efﬁcient and robust algorithm to boost the performance of quantization-based FL compression algorithms.
We showed intuitively and mathematically how DAdaQuant’s dynamic adjustment of the quantization level across time and clients minimize client → server communication while maintaining convergence speed.
Our experiments establish DAdaQuant as nearly universally superior over static quantizers, achieving state-of-the-art compression factors when applied to Federated QSGD.
The communication savings of DAdaQuant effectively lower FL bandwidth usage, energy consumption and training time.
Future work may apply and adapt DAdaQuant to new quantizers, further pushing the state of the art in FL uplink compression.
R EPRODUCIBILITY S TATEMENT
Our submission includes a repository with the source code for DAdaQuant and for the experiments presented in this paper.
All the datasets used in our experiments are publicly available.
Any postprocessing steps of the datasets are described in Appendix A.1.
To facilitate the reproduction of our results, we have bundled all our source code, dependencies and datasets into a Docker image.
The repository submitted with this paper contains instructions on how to use this Docker image and reproduce all plots and tables in this paper.
E THICS S TATEMENT
FL trains models on private client datasets in a privacy-preserving manner.
However, FL does not completely eliminate privacy concerns, because the transmitted model updates and the learned model parameters may expose the private client data from which they are derived.
Our work does not directly target privacy concerns in FL.
With that said, it is worth noting that DAdaQuant does not expose any client data that is not already exposed through standard FL training algorithms.
In fact, DAdaQuant reduces the amount of exposed data through lossy compression of the model updates. We therefore believe that DAdaQuant is free of ethical complications. A A DDITIONAL SIMULATION DETAILS AND EXPERIMENTS A. A DDITIONAL SIMULATION DETAILS
Here, we give detailed information on the models, datasets, training objectives and implementation that we use for our experiments.
We set the ﬁve following FL tasks:
• Multinomial logistic regression (MLR) on a synthetic dataset called Synthetic that contains vectors in R 60 with a label of one out of 10 classes.
We use the synthetic dataset generator in Li et al.
(2018) to generate synthetic datasets.
The generator samples Synthetic ’s local datasets and labels from MLR models with randomly initialized parameters.
For this purpose, parameters α and β control different kinds of data heterogeneity.
α controls the variation in the local models from which the local dataset labels are generated.
β controls the variation in the local dataset samples.
We set α = 1 and β = 1 to simulate an FL setting with both kinds of data heterogeneity.
This makes Synthetic a useful testbed for FL. • Character classiﬁcation into 62 classes of handwritten characters from the FEMNIST dataset using a CNN.
FEMNIST groups samples from the same author into the same local dataset.
• Smile detection in facial images from the CelebA dataset using a CNN.
CelebA groups samples of the same person into the same local dataset.
We note that LEAF’s CNN for CelebA uses BatchNorm layers.
We replace them with LayerNorm layers because they are more amenable to quantization.
This change does not affect the ﬁnal accuracy.
• Binary sentiment analysis of tweets from the Sent140 dataset using an LSTM.
Sent140 groups tweets from the same user into the same local dataset.
The majority of local datasets in the raw Sent140 dataset only have a single sample.
This impedes FL convergence.
Therefore, we ﬁlter Sent140 to clients with at least 10 samples (i.e. one complete batch).
Caldas et al.
; Li et al.
(2018) similarly ﬁlter Sent140 for their FL experiments.
• Next character prediction on text snippets from the Shakespeare dataset of Shakespeare’s
collected plays using an LSTM.
Shakespeare groups lines from the same character into the same local dataset.
Table 2 provides statistics of our models and datasets.
For our experiments in Figure 4, AdaQuantFL requires a hyperparameter s that determines the initial quantization level.
We set s to 2, the optimal value reported by the authors of AdaQuantFL.
The remaining hyperparameters are identical to those used for the Synthetic dataset experiments in
Table 1.
We implement the models with PyTorch (Paszke et al., 2019) and use Flower (Beutel et al., 2020) to simulate the FL server and clients.
[Table]
A. C OMPLETE COMMUNICATION - ACCURACY TRADE - OFF CURVES
[Figure]
A. A DDITIONAL UV E QF ED EXPERIMENTS
To demonstrate that the choice of UVeQFed’s “coding rate” hyperparameter R does not affect our ﬁndings on the superior compression factors of DAdaQuant
[Figure]
we re-evaluate UVeQFed with R =
[Figure]
which maximizes UVeQFed’s compression factor
Our results in Table 3 show that with the exception of Shakespeare
[Figure]
DAdaQuant still achieves considerably higher compression factors than
UVeQFed
[Figure]
[Table]
B P ROOFS
Lemma 1.
For arbitrary t > 0 and parameter p i ∈ [ − t, t ] , let s i
=
tq i , b i = rem ( p i , s i ) and u i =
s i − b i .
Then, Var (cid:0) Q q i ( p i ) (cid:1) = u i b i .
Proof.
Var
[Equation]
=
[Equation]
Q q i ( p i ) is an unbiased estimator of p
i
[Equation]
[Figure]
Lemma 2.
Let Q be a ﬁxed-point quantizer.
Assume that parameters p 1 . . .
p K are sampled from (cid:85) [ − t, t ] for arbitrary t > 0 .
Then, E p 1 ...
[Equation]
[Figure]
[Equation]
[Figure]
[Equation]
[Figure]
Proof.
E p 1 ...p K
[Var( e p )]
=2 t (cid:90) t
[Equation] [Equation]
=t (cid:90)
[Equation]
t
[Equation]
Var (cid:32)
[Equation]
symmetry of
Q q
[Equation]
( p
[Equation]
) w.r.t.
negation =t n (cid:90) t (cid:90) t 0 . . .
(cid:90) t
[Equation]
w
[Equation]
mutual independence of
Q q i ( p i ) ∀ i =
t
[Equation]
exchangeability of ﬁnite sums and integrals =
[Equation]
t
[Equation]
=
[Equation]
=
[Equation]
t
[Equation]
Lemma
[Equation] [Equation]
t
[Equation]
6 t
[Equation] [Equation]
i =
[Equation]
w
[Equation]
Lemma 3.
Let Q be a ﬁxed-point quantizer.
Assume that parameters p 1 . . .
p K are sampled from (cid:85) [ − t, t ] for arbitrary t > 0 .
Then, min q 1 ...q K E p 1 ...
p K [Var( e q 1 ...q K p )] subject to Q =
(cid:80)
Ki =1 q i is minimized by q i = Q
[-= Q w 2 / 
-][Equation]
[Equation]
Kk =1 w 2 / 3 k .
Proof.
Deﬁne
[Equation]
Lagrangian)
Any (local) minimum ˆ q satisﬁes
[Equation]
Lemma
[Equation]
B. P ROOF OF T HEOREM
Proof.
Using Lemma 3, it is straightforward to show that for any V , min q 1 ...q K (cid:80)
Ki =
1 q i subject to
E p 1 ...p K
[Var( e q 1 ...q K p )]
= V is minimized by q i
=
Cw 2 / 3 i for the unique C ∈ R > 0 that satisﬁes E p 1 ...p K
[Var( e q 1 ...q K p )]
= V .
Then, taking V = E p 1 ...p K [Var( e qp )] and C = (cid:112) ab (see Theorem 1), we do indeed get
E p 1 ...p
[Equation]
[Equation]
Lemma
[Equation]
lemma