paper_name
stringlengths
11
170
text
stringlengths
8.07k
307k
summary
stringlengths
152
6.16k
paper_id
stringlengths
43
43
Predicting Physics in Mesh-reduced Space with Temporal Attention
1 INTRODUCTION . There has been an increasing interest in many scientific disciplines , from computational fluid dynamics [ 3 , 39 ] over graphics [ 42 , 40 ] to quantum mechanics [ 20 , 1 ] , to accelerate numerical simulation using learned models . In particular , methods based on Graph Neural Networks ( GNN ) have shown to be powerful and flexible . These methods can directly work with unstructured simulation meshes , simulate systems with complex domain boundaries , and adaptively allocate computation to the spatial regions where it is needed [ 7 , 38 , 34 , 51 ] . Most models for complex physics prediction tasks , in particular those on unstructured meshes , are next-step prediction models ; that is , they predict the next state u ( t+1 , x ) of a physical system from the current state u ( t , x ) . As next-step models suffer from error accumulation , mitigation strategies such as training noise [ 38 ] or augmented training data using a solver-in-the-loop [ 41 ] have to be used to keep rollouts stable . These remedies are not without drawbacks– training noise can be hard to tune , and ultimately place a bound on the achievable model accuracy . And worse , next-step models also tend to show drift , which is not as easily mitigated . Failure examples include failure to conserve volume or energy , shift in phase , or loss of shape information ( see e.g. , the failure case example in [ 38 ] ) . On the other hand , auto-regressive sequence models such as Recurrent neural networks ( RNNs ) , or more recently transformers , have been hugely successful in predicting sequences in NLP and image applications [ 35 , 30 ] . They can capture stochastic dynamics and work with partial observations [ 49 ] . Furthermore , their long attention span allows them to better preserve phase and conserved quantities [ 17 ] . However , as memory cost for full-sequence transformer models scales with both ∗Equal contribution . sequence length and spatial extents , it is hard to directly extend such models to predict physical systems defined on large unstructured meshes . This paper combines powerful GNNs and a transformer to model high-dimensional physical systems on meshes . The key idea is creating a locally coarsened yet more expressive graph , to limit memory consumption of the sequence model , and allow effective training . We first use a GNN to aggregate local information of solution fields of a dynamic system into node representations by performing several rounds of message passing , and then coarsen the output graph to a small set of pivotal nodes . The pivotal nodes ’ representations form a latent that encodes the system state in a low-dimensional space . We apply a transformer model on this latent , with attention over the whole sequence , and predict the latent for the next step . We then use a second GNN to recover the full-sized graph by up-sampling and message passing . This procedure of solving on a coarse scale , upsampling , and performing updates on a fine-scale is related to a V-cycle in multigrid methods [ 4 ] . We show that this approach can outperform the state-of-the-art MeshGraphNets [ 34 ] baseline on accuracy over a set of challenging fluid dynamics tasks . We obtain stable rollouts without the need to inject training noise , and unlike the baseline , do not observe strong error accumulation or drift in the phase of vortex shedding . 2 RELATED WORK . Developing and running simulations of complex , high-dimensional systems can be very timeintensive . Particular for computational fluid dynamics , there is considerable interest in using neural networks for accelerating simulations of aerodynamics [ 3 ] or turbulent flows [ 21 , 45 ] . Fast predictions and differentiable learned models can be useful for tasks from airfoil design [ 39 ] over weather prediction [ 36 ] to visualizations for graphics [ 42 , 40 ] . While many of these methods use convolutional networks on 2D grids , recently GNN-based learned simulators , in particular , have shown to be a very flexible approach , which can model a wide range of systems , from articulated dynamics [ 37 ] to dynamics of particle systems [ 23 , 38 ] . In particular , GNNs naturally enable simulating on meshes with irregular or adaptive resolution [ 34 , 7 ] . These methods are either steady-state or next-step prediction models . There are , however , strong benefits of training on the whole predicted sequence : next-step models tend to drift and accumulate error , while sequence models can use their long temporal range to detect drift and propagate gradients through time to prevent error accumulation . Models based on RNNs have been successfully applied to 1D time series and small n-body systems [ 6 , 53 ] or small 2D systems [ 49 ] . More recently , transformer models [ 43 ] , which have been hugely successful for NLP tasks [ 35 ] , are being applied to low-dimensional physics prediction tasks [ 17 ] . However , applying sequence models to predict high-dimensional systems remains a challenge due to their high memory overhead . Dimensionality reduction techniques , such as CNN autoencoders [ 33 , 32 , 26 , 22 , 29 , 16 , 11 , 27 ] , POD [ 44 , 48 , 5 , 31 , 18 , 8 , 47 , 10 ] , or Koopman operators [ 24 , 9 , 14 ] can be used to construct a lowdimensional latent space . The auto-regressive sequence model then operates on these linear ( POD modes ) or nonlinear ( CNNs ) latents . However , these methods can not directly handle unstructured data with moving or varying-size meshes , and many of them do not consider parameter variations . For example , POD can not operate on state vectors with different lengths ( e.g. , variable mesh sizes data in Fig.2 bottom ) . On the other hand , CNN auto-encoders can only be applied to rectangular domains and uniform grids ; and rasterization of complex simulation domains to uniform grids are known to be inefficient and are linked to many drawbacks as discussed in [ 12 ] . In contrast , our method reduces the input space locally by aggregating information on a coarsened graph . This plays to the strength of GNNs to learn local universal rules and is very closely related to multi-level methods [ 50 , 15 ] and graph coarsening [ 13 , 52 , 2 ] . 3 METHODOLOGY . 3.1 PROBLEM DEFINITION AND OVERVIEW . We are interested in predicting spatiotemporal dynamics of complex physical systems ( e.g. , fluid dynamics ) , usually governed by a set of nonlinear , coupled , parameterized partial differential equations ( PDEs ) as shown in its general form , ∂u ( x , t ) ∂t = F [ u ( x , t ) ; µ ] , x , t ∈ Ω× [ 0 , Te ] , ( 1 ) where u ( x , t ) ∈ Rd represents the state variables ( e.g. , velocity , pressure , or temperature ) and F is a partial differential operator parameterized by µ . Given initial and boundary conditions , unique spatiotemporal solutions of the system can be obtained . One popular method of solving these PDE systems is the finite volume method ( FVM ) [ 28 ] , which discretizes the simulation domain Ω into an unstructured mesh consisting of N cells ( Ci : i = 1 , . . . , N ) . At time t , the discrete state field Yt = { ui , t : i = 1 , . . . , N } can thus be defined by the state value ui , t at each cell center . Traditionally , solving this discretized system involves sophisticated numerical integration over time and space . This process is often computationally expensive , making it infeasible for realtime predictions or applications requiring multiple model queries , e.g. , optimization and control . Therefore , our goal is to learn a simulator , which , given the initial state Y0 and system parameters µ , can rapidly produce a rollout trajectory of states Y1 ... YT . As mentioned above , solving these systems with high spatial resolution by traditional numerical solvers can be quite expensive . In particular , propagating local updates over the fine grid , such as pressure updates in incompressible flow , can require many solver iterations . Commonly used technique to improve the efficiency include multigrid methods [ 46 ] , which perform local updates on both the fine grid , as well as one or multiple coarsened grids with fewer nodes , to accelerate the propagation of information . One building block of multigrid methods is the V-cycle , which consists of down-sampling the fine to a coarser grid , performing a solver update , up-sampling back on the fine grid , and performing an update on the fine grid . Noting that GNNs excel at local updates while the attention mechanism over temporal sequences allows long-term dependency ( see remark A.2 ) , we devise an algorithm inspired by the multigrid V-cycle . For each time step , we use a GNN to locally summarize neighborhood information on our fine simulation mesh into pivotal nodes , which form a coarse mesh ( section 3.2 ) . We use temporal attention over the entire sequence in this lower-dimensional space ( section 3.3 ) , upsample back onto the fine simulation , and perform local updates using a mesh recovery GNN ( section 3.2 ) . This combination allows us to efficiently make use of long-term temporal attention for stable , high-fidelity dynamics predictions . 3.2 GRAPH REPRESENTATION AND MESH REDUCTION . Graph Representation . We construct a graph G = ( V , E ) to represent a snapshot of a dynamic system at time step t. Here each node i ∈ V corresponds the mesh cell Ci , so the graph size is |V| = N . The set of edges E are derived from neighboring relations of cells : if two cells Ci and Cj are neighbors , then two directional edges ( i , j ) and ( j , i ) are both in E . We fix this graph for all time steps . At each step t , each node i ∈ V uses the local state vector ui , t as its attribute . Therefore , ( G , ( Y0 , . . . , YT ) ) forms a temporal graph sequence . The goal of the learning model is to predict ( Y1 , . . . , YT ) given G and Y0 . Mesh Reduction . After representing the system as a graph , we use a GNN to summarize and extract a low-dimensional representation zt from Yt for each step t. In this part of discussion , we omit the subscript t for notational simplicity . We refer to the encoder as Graph Mesh Reducer ( GMR ) since its role is coarsening the mesh graph . GMR first selects a small set S ⊆ V of pivotal graph nodes and locally encodes the information of the entire graph into representations at these nodes . By operating on rich , summarized node representations , the dynamics of the entire system is well-approximated even on this coarser graph . There are a few considerations for selection of pivotal nodes , for example , the spatial spread and the centrality of nodes in the selection . We generally use uniform sampling to select S from V . This effectively preserves the density of graph nodes over the simulation domain , i.e . pivotal nodes are more concentrated in important regions of the simulation domain . More details and visualizations on the node selection process can be found in section A.6 . GMR is implemented as a Encode-Process-Decode ( EPD ) GraphNet [ 38 ] . GMR first extracts node features and edge features from the system state using the node and edge Multi-Layer Perceptrons ( MLPs ) . v0i = mlpv ( Y [ i ] ) , e 0 ij = mlpe ( p ( i ) − p ( j ) ) . ( 2 ) Here Y [ i ] is the i-th row of Y , i.e . the state vector at each node , and p ( i ) is the spatial position of cell Ci . Then GMR uses L GraphNet processer blocks [ 37 ] to further refine node representations through message passing . In this process a node can receive and aggregate information from all neighboring nodes within graph distance L. Each processor updates the node and edge representations as e ` ij = mlp e ` ( e ` −1ij , v ` −1 i , v ` −1 j ) , v ` i = mlp v ` v ` −1i , ∑ j∈Ni e ` −1ij , ` = 1 , . . . , L. ( 3 ) Here v0i , e 0 ij are the outputs of Equation 2 , andNi denotes all neighbors of node i . The two functions mlpe ` ( · ) and mlpv ` ( · ) respectively concatenate their arguments as vectors and then apply MLPs . The calculation in equation 2 and equation 3 computes a new set of node representations V = ( vLi : i ∈ V ) for the graph G. Finally GMR applies an MLP to representations of the pivotal nodes in S only to “ summarize ” the entire graph onto a coarse graph : hi = mlpr ( v L i ) , i ∈ S ( 4 ) We concatenate these vectors into a single latent z = concat ( hi : i ∈ S ) as reduced vector representation of the entire graph . We collectively denote these three computation steps as z = GMR ( G , Y ) . The latents z can be computed independently for each time step t and will be used as the representation for the attention-based simulator . Mesh Recovery To recover the system state from the coarse vector representation z , we define a Graph Mesh Up-Sampling ( GMUS ) network . The key step of GMUS is to restore information on the full graph from representations of pivotal nodes . This procedure is the inverse of operation of GMR . We first set the representations at pivotal nodes by splitting z , that is , ri = hi , i ∈ S. We then compute representations of non-pivotal nodes by spatial interpolation [ 2 ] : for a non-pivotal node j , we choose a set N ′j of k nearest pivotal nodes in terms of spatial distance and compute the its representations rj by rj = ∑ i∈N ′j wijhi∑ i∈N ′j wij , wij = 1 d ( j , i ) 2 ( 5 ) Here d ( j , i ) is the spatial distance between cells Cj and Ci . Then every node i ∈ V has a representation ri , and all nodes ’ representations are collectively denoted asR = ( ri : i ∈ V ) . Similar to GMR , GMUS applies EPD GraphNet to the initial node representation R to restore Y on the full graph G. We denote the chain of operations so far as Ŷ = GMUS ( G , z ) . Details about information flows in GMR and GMUS can be found in section A.1 . We train GMR and GMUS as an auto-encoder over all time steps and sequences . For each time step t , we compute Ŷt = GMUS ( G , GMR ( G , Yt ) ) and minimize the reconstruction loss Lgraph = T∑ n=1 ‖Yt − Ŷt‖22 . ( 6 ) With these two modules we can encode system states ( Y1 , . . . , YT ) to latents ( z1 , . . . , zT ) as a lowdimensional representation of system dynamics . In the next section , we train a transformer model to predict the sequences of latents .
This paper proposes to use auto-regressive sequence models with attention mechanisms to predict the evolution of physical simulations. Mesh-based discretizations are targeted, and hence the employed networks take the form of GNNs. The paper focuses on encode-process-decode structures, and a transformer is proposed as main method to predict future states in the latent space. This approach is evaluated with three CFD settings: an unsteady wake flow, a sonic backwards facing step, and a medical flow scenario. The results are additionally analyzed in terms of latent space and attention weight content.
SP:95db394e10cd433a8283269953ca17e8b8f46879
Align-RUDDER: Learning From Few Demonstrations by Reward Redistribution
Reinforcement Learning algorithms require a large number of samples to solve complex tasks with sparse and delayed rewards . Complex tasks are often hierarchically composed of sub-tasks . Solving a sub-task increases the return expectation and leads to a step in the Q-function . RUDDER identifies these steps and then redistributes reward to them , thus immediately giving reward if sub-tasks are solved . Since the delay of rewards is reduced , learning is considerably sped up . However , for complex tasks , current exploration strategies struggle with discovering episodes with high rewards . Therefore , we assume that episodes with high rewards are given as demonstrations and do not have to be discovered by exploration . Unfortunately , the number of demonstrations is typically small and RUDDER ’ s LSTM as a deep learning model does not learn well on these few training samples . Hence , we introduce Align-RUDDER , which is RUDDER with two major modifications . First , Align-RUDDER assumes that episodes with high rewards are given as demonstrations , replacing RUDDER ’ s safe exploration and lessons replay buffer . Second , we substitute RUDDER ’ s LSTM model by a profile model that is obtained from multiple sequence alignment of demonstrations . Profile models can be constructed from as few as two demonstrations . Align-RUDDER uses reward redistribution to speed up learning by reducing the delay of rewards . Align-RUDDER outperforms competitors on complex artificial tasks with delayed rewards and few demonstrations . On the MineCraft ObtainDiamond task , Align-RUDDER is able to mine a diamond , though not frequently . 1 INTRODUCTION . Reinforcement learning algorithms struggle with learning complex tasks that have sparse and delayed rewards ( Sutton & Barto , 2018 ; Rahmandad et al. , 2009 ; Luoma et al. , 2017 ) . For delayed rewards , temporal difference ( TD ) suffers from vanishing information ( Arjona-Medina et al. , 2019 ) . On the other hand Monte Carlo ( MC ) has high variance since it must average over all possible futures ( ArjonaMedina et al. , 2019 ) . Monte-Carlo Tree Search ( MCTS ) , used for Go and chess , can handle delayed and rare rewards since it has a perfect environment model ( Silver et al. , 2016 ; 2017 ) . RUDDER ( Arjona-Medina et al. , 2019 ; 2018 ) has been shown to excel in model-free learning of policies when only sparse and delayed rewards are given . RUDDER requires episodes with high rewards to store them in its lessons replay buffer for learning a reward redistribution model like an LSTM network . However , for complex tasks , current exploration strategies find episodes with high rewards only after an incommensurate long time . Humans and animals obtain high reward episodes by teachers , role models , or prototypes . Along this line , we assume that episodes with high rewards are given as demonstrations . Since generating demonstrations is often tedious for humans and time-consuming for exploration strategies , typically , only a few demonstrations are available . However , RUDDER ’ s LSTM ( Hochreiter , 1991 ; Hochreiter & Schmidhuber , 1997a ) as a deep learning method requires many examples for learning . Therefore , we introduce Align-RUDDER , which replaces RUDDER ’ s LSTM with a profile model obtained from multiple sequence alignment ( MSA ) of the demonstrations . Profile models are well known in bioinformatics . They are used to score new sequences according to their sequence similarity to the aligned sequences . Like RUDDER also Align-RUDDER performs reward redistribution —using an alignment model— , which considerably speeds up learning even if only a few demonstrations are available . Our main contributions are : • We suggest a reinforcement algorithm that works well for sparse and delayed rewards , where standard exploration fails but few demonstrations with high rewards are available . • We adopt multiple sequence alignment from bioinformatics to construct a reward redistribution technique that works with few demonstrations . • We propose a method that uses alignment techniques and reward redistribution for identifying sub-goals and sub-tasks which in turn allow for hierarchical reinforcement learning . 2 REVIEW OF RUDDER . Basic insight : Q-functions for complex tasks are step functions . Complex tasks are typically composed of sub-tasks . Therefore the Q-function of an optimal policy resembles a step function . The Q-function is the expected future return and it increases ( i.e , makes a step ) when a sub-task is completed . Identifying large steps in the Q-function speeds up learning since it allows ( i ) to increase the return by performing actions that cause the step and ( ii ) to sample episodes with a larger return for learning . An approximation to the Q-function must predict the expected future return for every state-action pair . However , a Q-function that resembles a step-function is mostly constant . Therefore predictions are only necessary at the steps . We have to identify the relevant state-actions that cause the steps and then predict the size of the steps . An LSTM network ( Hochreiter , 1991 ; Hochreiter & Schmidhuber , 1995 ; 1997a ; b ) can identify relevant state-actions that open the input gate to store the size of the steps in the memory cells . Consequently , LSTM only updates its states and changes its return prediction when a new relevant state-action pair is observed . Therefore , both the change of the prediction and opening input gates indicate Q-function steps through an LSTM network that predicts the return of an episode . Reward Redistribution . We consider episodic Markov decision processes ( MDPs ) , i.e. , the reward is only given once at the end of the sequence . The Q-function is assumed to be a step function , that is , the task can be decomposed into sub-tasks ( see previous paragraph ) . Reward redistribution aims at giving the differences in the Q-function of an optimal policy as a new immediate reward . Since the Q-function of an optimal policy is not known , we approximate it by predicting the expected return by an LSTM network or by an alignment model in this work . The differences in predictions determine the reward redistribution . The prediction model will first identify the largest steps in the Q-function as they decrease the prediction error most . Fortunately , just identifying the largest steps even with poor predictions speeds up learning considerably . See Figure 1 for a description of the reward redistribution . Learning methods based on reward redistribution . The redistributed reward serves as reward for a subsequent learning method : ( A ) The Q-values can be directly estimated ( Arjona-Medina et al. , 2019 ) , which is used in the experiments for the artificial tasks and BC pre-training for MineCraft . ( B ) Redistributed rewards can serve for learning with policy gradients like Proximal Policy Optimization ( PPO ) ( Schulman et al. , 2018 ) , which is used in the MineCraft experiments . ( C ) Redistributed rewards can serve for temporal difference learning like Q-learning ( Watkins , 1989 ) . LSTM models for reward redistribution . RUDDER uses an LSTM model for predicting the future return . The reward redistribution is the difference between two subsequent predictions . If a stateaction pair increases the prediction of the return , then it is immediately rewarded . Using state-action sub-sequences ( s , a ) 0 : t = ( s0 , a0 , . . . , st , at ) , the redistributed reward is Rt+1 = g ( ( s , a ) 0 : t ) − g ( ( s , a ) 0 : t−1 ) , where g is an LSTM model that predicts the return of the episode . The LSTM model learns at first to approximate the largest steps of the Q-function since they reduce the prediction error the most . 3 ALIGN-RUDDER : RUDDER WITH FEW DEMONSTRATIONS . In bioinformatics , sequence alignment identifies similarities between biological sequences to determine their evolutionary relationship ( Needleman & Wunsch , 1970 ; Smith & Waterman , 1981 ) . The result of the alignment of multiple sequences is a profile model . The profile model is a consensus sequence , a frequency matrix , or a Position-Specific Scoring Matrix ( PSSM ) ( Stormo et al. , 1982 ) . New sequences can be aligned to a profile model and receive an alignment score that indicates how well the new sequences agree to the profile model . Align-RUDDER uses such alignment techniques to align two or more high return demonstrations . For the alignment , we assume that the demonstrations follow the same underlying strategy , therefore they are similar to each other analog to being evolutionary related . If the agent generates a state-action sequence ( s , a ) 0 : t−1 , then this sequence is aligned to the profile model g giving a score g ( ( s , a ) 0 : t−1 ) . The next action of the agent extends the state-action sequence by one state-action pair ( st , at ) . The extended sequence ( s , a ) 0 : t is also aligned to the profile model g giving another score g ( ( s , a ) 0 : t ) . The redistributed reward Rt+1 is the difference of these scores : Rt+1 = g ( ( s , a ) 0 : t ) − g ( ( s , a ) 0 : t−1 ) ( see Eq . ( 1 ) ) . This difference indicates how much of the return is gained or lost by a adding another sequence element . Align-RUDDER scores how close an agent follows an underlying strategy , which has been extracted by the profile model . Similar to the LSTM model , we identify the largest steps in the Q-function via relevant events determined by the profile model . Therefore , redistributing the reward by sequence alignment fits into the RUDDER framework with all its theoretical guarantees . RUDDER ’ s theory for reward redistribution is valid for LSTM , other recurrent networks , attention mechanisms , or sequence and profile models . Advantages of alignment compared to LSTM . Learning an LSTM model is severely limited when very few demonstrations are available . First , LSTM is known to require a large number of samples to generalize to new sequences . In contrast , sequence alignment requires only two examples to generalize well as known from bioinformatics . Second , expert demonstrations have high rewards . Therefore random demonstrations with very low rewards have to be generated . LSTM does not generalize well when only these extreme reward cases can be observed in the training set . In contrast , sequence alignment only uses examples that are closely related ; that is , they belong to the same category ( expert demonstrations ) . Reward Redistribution by Sequence Alignment . The new reward redistribution approach consists of five steps , see Fig . 3 : ( I ) Define events to turn episodes of state-action sequences into sequences of events . ( II ) Determine an alignment scoring scheme , so that relevant events are aligned to each other . ( III ) Perform a multiple sequence alignment ( MSA ) of the demonstrations . ( IV ) Compute the profile model like a PSSM . ( V ) Redistribute the reward : Each sub-sequence τt of a new episode τ is aligned to the profile . The redistributed reward Rt+1 is proportional to the difference of scores S based on the PSSM given in step ( IV ) , i.e . Rt+1 ∝ S ( τt ) − S ( τt−1 ) . In the following , the five steps of Align-RUDDER ’ s reward redistribution are outlined . For the interested reader , each step is detailed in Sec . A.3 in the appendix . Finally , in Sec . A.7.3 in the appendix , we illustrate these five steps on the example of Minecraft . ( I ) Defining Events . Instead of states , we consider differences of consecutive states to detect a change caused by an important event like achieving a sub-goal . An event is defined as a cluster of state differences . We use similarity-based clustering like affinity propagation ( AP ) ( Frey & Dueck , 2007 ) . If states are only enumerated , we suggest to use the “ successor representation ” ( Dayan , 1993 ) or “ successor features ” ( Barreto et al. , 2017 ) . We use the demonstrations combined with state-action sequences generated by a random policy to construct the successor representation . A sequence of events is obtained from a state-action sequence by mapping states s to its cluster identifier e ( the event ) and ignoring the actions . Alignment techniques from bioinformatics assume sequences composed of a few events , e.g . 20 events . If there are too many events , good fitting alignments can not be distinguished from random alignments . This effect is known in bioinformatics as “ Inconsistency of Maximum Parsimony ” ( Felsenstein , 1978 ) . ( II ) Determining the Alignment Scoring System . A scoring matrix S with entries si , j determines the score for aligning event i with j . A priori , we only know that a relevant event should be aligned to itself but not to other events . Therefore , we set si , j = 1/pi for i = j and si , j = α for i 6= j . Here , pi is the relative frequency of event i in the demonstrations . α is a hyper-parameter , which is typically a small negative number . This scoring scheme encourages alignment of rare events , for which pi is small . For more details see Appendix Sec . A.3 . ( III ) Multiple sequence alignment ( MSA ) . An MSA algorithm maximizes the sum of all pairwise scores SMSA = ∑ i , j , i < j ∑L t=0 si , j , ti , tj , t in an alignment , where si , j , ti , tj , t is the score at alignment column t for aligning the event at position ti in sequence i to the event at position tj in sequence j. L ≥ T is the alignment length , since gaps make the alignment longer than the length of each sequence . We use ClustalW ( Thompson et al. , 1994 ) for MSA . MSA constructs a guiding tree by agglomerative hierarchical clustering of pairwise alignments between all demonstrations . This guiding tree allows to identify multiple strategies . For more details see Appendix Sec . A.3 . ( IV ) Position-Specific Scoring Matrix ( PSSM ) and MSA profile model . From the alignment , we construct a profile model as a ) column-wise event probabilities and b ) a PSSM ( Stormo et al. , 1982 ) . The PSSM is a column-wise scoring matrix to align new sequences to the profile model . More details are given in Appendix Sec . A.3 . ( V ) Reward Redistribution . The reward redistribution is based on the profile model . A sequence τ = e0 : T ( et is event at position t ) is aligned to the profile , which gives the score S ( τ ) = ∑L l=0 sl , tl . Here , sl , tl is the alignment score for event etl at position l in the alignment . Alignment gaps are columns to which no event was aligned , which have tl = T + 1 with gap penalty sl , T+1 . If τt = e0 : t is the prefix sequence of τ of length t+ 1 , then the reward redistribution Rt+1 for 0 6 t 6 T is Rt+1 = ( S ( τt ) − S ( τt−1 ) ) C = g ( ( s , a ) 0 : t ) − g ( ( s , a ) 0 : t−1 ) , RT+2 = G̃0 − T∑ t=0 Rt+1 , ( 1 ) where C = Edemo [ G̃0 ] / Edemo [ ∑T t=0 S ( τt ) − S ( τt−1 ) ] with S ( τ−1 ) = 0 . The original return of the sequence τ is G̃0 = ∑T t=0 R̃t+1 and the expectation of the return over demonstrations is Edemo . The constant C scales Rt+1 to the range of G̃0 . RT+2 is the correction of the redistributed reward ( Arjona-Medina et al. , 2019 ) , with zero expectation for demonstrations : Edemo [ RT+2 ] = 0 . Since τt = e0 : t and et = f ( st , at ) , we can set g ( ( s , a ) 0 : t ) = S ( τt ) C. We ensure strict return equivalence ( Arjona-Medina et al. , 2019 ) by G0 = ∑T+1 t=0 Rt+1 = G̃0 . The redistributed reward depends only on the past : Rt+1 = h ( ( s , a ) 0 : t ) . Sub-tasks . The reward redistribution identifies sub-tasks as alignment positions with high redistributed rewards . These sub-tasks are indicated by high scores s in the PSSM . Reward redistribution also determines the terminal states of sub-tasks since it assigns rewards for solving the sub-tasks . However , reward redistribution and Align-RUDDER can not guarantee that the redistributed reward is Markov . For redistributed Markov reward , options ( Sutton et al. , 1999 ) , MAXQ ( Dietterich , 2000 ) , or recursive option composition ( Silver & Ciosek , 2012 ) can be used . Higher Order Markov Reward Redistributions . Align-RUDDER may lead to higher-order Markov redistribution . Corollary 1 in the appendix states that the optimality criterion from Theorem 2 in Arjona-Medina et al . ( 2019 ) also holds for higher-order Markov reward redistributions . If the expected redistributed higher-order Markov reward is the difference of Q-values . In that case the redistribution is optimal , and there is no delayed reward . Furthermore , the optimal policies are the same as for the original problem . This corollary is the motivation for redistributing the reward to the steps in the Q-function . In the Appendix , Corollary 2 states that under a condition , an optimal higher-order reward redistribution can be expressed as the difference of Q-values .
The paper considers the challenge of improving sample efficiency of RUDDER-style algorithms in sparse MDPs. Building on prior work by Arjona-Medina et al [1], the authors incorporate demonstrations of optimal trajectories from an expert in the training pipeline. Additionally, to improve the sample efficiency and stability, the authors replace LSTM-model of RUDDER with an alignment based profile model. The approach is evaluated on two synthetic grid-world based environments and a MineCraft based environment. On both benchmarks the proposed algorithm works better than baseline RUDDER.
SP:7eb0d8278168465270570233e4af64ebb3f2f154
Align-RUDDER: Learning From Few Demonstrations by Reward Redistribution
Reinforcement Learning algorithms require a large number of samples to solve complex tasks with sparse and delayed rewards . Complex tasks are often hierarchically composed of sub-tasks . Solving a sub-task increases the return expectation and leads to a step in the Q-function . RUDDER identifies these steps and then redistributes reward to them , thus immediately giving reward if sub-tasks are solved . Since the delay of rewards is reduced , learning is considerably sped up . However , for complex tasks , current exploration strategies struggle with discovering episodes with high rewards . Therefore , we assume that episodes with high rewards are given as demonstrations and do not have to be discovered by exploration . Unfortunately , the number of demonstrations is typically small and RUDDER ’ s LSTM as a deep learning model does not learn well on these few training samples . Hence , we introduce Align-RUDDER , which is RUDDER with two major modifications . First , Align-RUDDER assumes that episodes with high rewards are given as demonstrations , replacing RUDDER ’ s safe exploration and lessons replay buffer . Second , we substitute RUDDER ’ s LSTM model by a profile model that is obtained from multiple sequence alignment of demonstrations . Profile models can be constructed from as few as two demonstrations . Align-RUDDER uses reward redistribution to speed up learning by reducing the delay of rewards . Align-RUDDER outperforms competitors on complex artificial tasks with delayed rewards and few demonstrations . On the MineCraft ObtainDiamond task , Align-RUDDER is able to mine a diamond , though not frequently . 1 INTRODUCTION . Reinforcement learning algorithms struggle with learning complex tasks that have sparse and delayed rewards ( Sutton & Barto , 2018 ; Rahmandad et al. , 2009 ; Luoma et al. , 2017 ) . For delayed rewards , temporal difference ( TD ) suffers from vanishing information ( Arjona-Medina et al. , 2019 ) . On the other hand Monte Carlo ( MC ) has high variance since it must average over all possible futures ( ArjonaMedina et al. , 2019 ) . Monte-Carlo Tree Search ( MCTS ) , used for Go and chess , can handle delayed and rare rewards since it has a perfect environment model ( Silver et al. , 2016 ; 2017 ) . RUDDER ( Arjona-Medina et al. , 2019 ; 2018 ) has been shown to excel in model-free learning of policies when only sparse and delayed rewards are given . RUDDER requires episodes with high rewards to store them in its lessons replay buffer for learning a reward redistribution model like an LSTM network . However , for complex tasks , current exploration strategies find episodes with high rewards only after an incommensurate long time . Humans and animals obtain high reward episodes by teachers , role models , or prototypes . Along this line , we assume that episodes with high rewards are given as demonstrations . Since generating demonstrations is often tedious for humans and time-consuming for exploration strategies , typically , only a few demonstrations are available . However , RUDDER ’ s LSTM ( Hochreiter , 1991 ; Hochreiter & Schmidhuber , 1997a ) as a deep learning method requires many examples for learning . Therefore , we introduce Align-RUDDER , which replaces RUDDER ’ s LSTM with a profile model obtained from multiple sequence alignment ( MSA ) of the demonstrations . Profile models are well known in bioinformatics . They are used to score new sequences according to their sequence similarity to the aligned sequences . Like RUDDER also Align-RUDDER performs reward redistribution —using an alignment model— , which considerably speeds up learning even if only a few demonstrations are available . Our main contributions are : • We suggest a reinforcement algorithm that works well for sparse and delayed rewards , where standard exploration fails but few demonstrations with high rewards are available . • We adopt multiple sequence alignment from bioinformatics to construct a reward redistribution technique that works with few demonstrations . • We propose a method that uses alignment techniques and reward redistribution for identifying sub-goals and sub-tasks which in turn allow for hierarchical reinforcement learning . 2 REVIEW OF RUDDER . Basic insight : Q-functions for complex tasks are step functions . Complex tasks are typically composed of sub-tasks . Therefore the Q-function of an optimal policy resembles a step function . The Q-function is the expected future return and it increases ( i.e , makes a step ) when a sub-task is completed . Identifying large steps in the Q-function speeds up learning since it allows ( i ) to increase the return by performing actions that cause the step and ( ii ) to sample episodes with a larger return for learning . An approximation to the Q-function must predict the expected future return for every state-action pair . However , a Q-function that resembles a step-function is mostly constant . Therefore predictions are only necessary at the steps . We have to identify the relevant state-actions that cause the steps and then predict the size of the steps . An LSTM network ( Hochreiter , 1991 ; Hochreiter & Schmidhuber , 1995 ; 1997a ; b ) can identify relevant state-actions that open the input gate to store the size of the steps in the memory cells . Consequently , LSTM only updates its states and changes its return prediction when a new relevant state-action pair is observed . Therefore , both the change of the prediction and opening input gates indicate Q-function steps through an LSTM network that predicts the return of an episode . Reward Redistribution . We consider episodic Markov decision processes ( MDPs ) , i.e. , the reward is only given once at the end of the sequence . The Q-function is assumed to be a step function , that is , the task can be decomposed into sub-tasks ( see previous paragraph ) . Reward redistribution aims at giving the differences in the Q-function of an optimal policy as a new immediate reward . Since the Q-function of an optimal policy is not known , we approximate it by predicting the expected return by an LSTM network or by an alignment model in this work . The differences in predictions determine the reward redistribution . The prediction model will first identify the largest steps in the Q-function as they decrease the prediction error most . Fortunately , just identifying the largest steps even with poor predictions speeds up learning considerably . See Figure 1 for a description of the reward redistribution . Learning methods based on reward redistribution . The redistributed reward serves as reward for a subsequent learning method : ( A ) The Q-values can be directly estimated ( Arjona-Medina et al. , 2019 ) , which is used in the experiments for the artificial tasks and BC pre-training for MineCraft . ( B ) Redistributed rewards can serve for learning with policy gradients like Proximal Policy Optimization ( PPO ) ( Schulman et al. , 2018 ) , which is used in the MineCraft experiments . ( C ) Redistributed rewards can serve for temporal difference learning like Q-learning ( Watkins , 1989 ) . LSTM models for reward redistribution . RUDDER uses an LSTM model for predicting the future return . The reward redistribution is the difference between two subsequent predictions . If a stateaction pair increases the prediction of the return , then it is immediately rewarded . Using state-action sub-sequences ( s , a ) 0 : t = ( s0 , a0 , . . . , st , at ) , the redistributed reward is Rt+1 = g ( ( s , a ) 0 : t ) − g ( ( s , a ) 0 : t−1 ) , where g is an LSTM model that predicts the return of the episode . The LSTM model learns at first to approximate the largest steps of the Q-function since they reduce the prediction error the most . 3 ALIGN-RUDDER : RUDDER WITH FEW DEMONSTRATIONS . In bioinformatics , sequence alignment identifies similarities between biological sequences to determine their evolutionary relationship ( Needleman & Wunsch , 1970 ; Smith & Waterman , 1981 ) . The result of the alignment of multiple sequences is a profile model . The profile model is a consensus sequence , a frequency matrix , or a Position-Specific Scoring Matrix ( PSSM ) ( Stormo et al. , 1982 ) . New sequences can be aligned to a profile model and receive an alignment score that indicates how well the new sequences agree to the profile model . Align-RUDDER uses such alignment techniques to align two or more high return demonstrations . For the alignment , we assume that the demonstrations follow the same underlying strategy , therefore they are similar to each other analog to being evolutionary related . If the agent generates a state-action sequence ( s , a ) 0 : t−1 , then this sequence is aligned to the profile model g giving a score g ( ( s , a ) 0 : t−1 ) . The next action of the agent extends the state-action sequence by one state-action pair ( st , at ) . The extended sequence ( s , a ) 0 : t is also aligned to the profile model g giving another score g ( ( s , a ) 0 : t ) . The redistributed reward Rt+1 is the difference of these scores : Rt+1 = g ( ( s , a ) 0 : t ) − g ( ( s , a ) 0 : t−1 ) ( see Eq . ( 1 ) ) . This difference indicates how much of the return is gained or lost by a adding another sequence element . Align-RUDDER scores how close an agent follows an underlying strategy , which has been extracted by the profile model . Similar to the LSTM model , we identify the largest steps in the Q-function via relevant events determined by the profile model . Therefore , redistributing the reward by sequence alignment fits into the RUDDER framework with all its theoretical guarantees . RUDDER ’ s theory for reward redistribution is valid for LSTM , other recurrent networks , attention mechanisms , or sequence and profile models . Advantages of alignment compared to LSTM . Learning an LSTM model is severely limited when very few demonstrations are available . First , LSTM is known to require a large number of samples to generalize to new sequences . In contrast , sequence alignment requires only two examples to generalize well as known from bioinformatics . Second , expert demonstrations have high rewards . Therefore random demonstrations with very low rewards have to be generated . LSTM does not generalize well when only these extreme reward cases can be observed in the training set . In contrast , sequence alignment only uses examples that are closely related ; that is , they belong to the same category ( expert demonstrations ) . Reward Redistribution by Sequence Alignment . The new reward redistribution approach consists of five steps , see Fig . 3 : ( I ) Define events to turn episodes of state-action sequences into sequences of events . ( II ) Determine an alignment scoring scheme , so that relevant events are aligned to each other . ( III ) Perform a multiple sequence alignment ( MSA ) of the demonstrations . ( IV ) Compute the profile model like a PSSM . ( V ) Redistribute the reward : Each sub-sequence τt of a new episode τ is aligned to the profile . The redistributed reward Rt+1 is proportional to the difference of scores S based on the PSSM given in step ( IV ) , i.e . Rt+1 ∝ S ( τt ) − S ( τt−1 ) . In the following , the five steps of Align-RUDDER ’ s reward redistribution are outlined . For the interested reader , each step is detailed in Sec . A.3 in the appendix . Finally , in Sec . A.7.3 in the appendix , we illustrate these five steps on the example of Minecraft . ( I ) Defining Events . Instead of states , we consider differences of consecutive states to detect a change caused by an important event like achieving a sub-goal . An event is defined as a cluster of state differences . We use similarity-based clustering like affinity propagation ( AP ) ( Frey & Dueck , 2007 ) . If states are only enumerated , we suggest to use the “ successor representation ” ( Dayan , 1993 ) or “ successor features ” ( Barreto et al. , 2017 ) . We use the demonstrations combined with state-action sequences generated by a random policy to construct the successor representation . A sequence of events is obtained from a state-action sequence by mapping states s to its cluster identifier e ( the event ) and ignoring the actions . Alignment techniques from bioinformatics assume sequences composed of a few events , e.g . 20 events . If there are too many events , good fitting alignments can not be distinguished from random alignments . This effect is known in bioinformatics as “ Inconsistency of Maximum Parsimony ” ( Felsenstein , 1978 ) . ( II ) Determining the Alignment Scoring System . A scoring matrix S with entries si , j determines the score for aligning event i with j . A priori , we only know that a relevant event should be aligned to itself but not to other events . Therefore , we set si , j = 1/pi for i = j and si , j = α for i 6= j . Here , pi is the relative frequency of event i in the demonstrations . α is a hyper-parameter , which is typically a small negative number . This scoring scheme encourages alignment of rare events , for which pi is small . For more details see Appendix Sec . A.3 . ( III ) Multiple sequence alignment ( MSA ) . An MSA algorithm maximizes the sum of all pairwise scores SMSA = ∑ i , j , i < j ∑L t=0 si , j , ti , tj , t in an alignment , where si , j , ti , tj , t is the score at alignment column t for aligning the event at position ti in sequence i to the event at position tj in sequence j. L ≥ T is the alignment length , since gaps make the alignment longer than the length of each sequence . We use ClustalW ( Thompson et al. , 1994 ) for MSA . MSA constructs a guiding tree by agglomerative hierarchical clustering of pairwise alignments between all demonstrations . This guiding tree allows to identify multiple strategies . For more details see Appendix Sec . A.3 . ( IV ) Position-Specific Scoring Matrix ( PSSM ) and MSA profile model . From the alignment , we construct a profile model as a ) column-wise event probabilities and b ) a PSSM ( Stormo et al. , 1982 ) . The PSSM is a column-wise scoring matrix to align new sequences to the profile model . More details are given in Appendix Sec . A.3 . ( V ) Reward Redistribution . The reward redistribution is based on the profile model . A sequence τ = e0 : T ( et is event at position t ) is aligned to the profile , which gives the score S ( τ ) = ∑L l=0 sl , tl . Here , sl , tl is the alignment score for event etl at position l in the alignment . Alignment gaps are columns to which no event was aligned , which have tl = T + 1 with gap penalty sl , T+1 . If τt = e0 : t is the prefix sequence of τ of length t+ 1 , then the reward redistribution Rt+1 for 0 6 t 6 T is Rt+1 = ( S ( τt ) − S ( τt−1 ) ) C = g ( ( s , a ) 0 : t ) − g ( ( s , a ) 0 : t−1 ) , RT+2 = G̃0 − T∑ t=0 Rt+1 , ( 1 ) where C = Edemo [ G̃0 ] / Edemo [ ∑T t=0 S ( τt ) − S ( τt−1 ) ] with S ( τ−1 ) = 0 . The original return of the sequence τ is G̃0 = ∑T t=0 R̃t+1 and the expectation of the return over demonstrations is Edemo . The constant C scales Rt+1 to the range of G̃0 . RT+2 is the correction of the redistributed reward ( Arjona-Medina et al. , 2019 ) , with zero expectation for demonstrations : Edemo [ RT+2 ] = 0 . Since τt = e0 : t and et = f ( st , at ) , we can set g ( ( s , a ) 0 : t ) = S ( τt ) C. We ensure strict return equivalence ( Arjona-Medina et al. , 2019 ) by G0 = ∑T+1 t=0 Rt+1 = G̃0 . The redistributed reward depends only on the past : Rt+1 = h ( ( s , a ) 0 : t ) . Sub-tasks . The reward redistribution identifies sub-tasks as alignment positions with high redistributed rewards . These sub-tasks are indicated by high scores s in the PSSM . Reward redistribution also determines the terminal states of sub-tasks since it assigns rewards for solving the sub-tasks . However , reward redistribution and Align-RUDDER can not guarantee that the redistributed reward is Markov . For redistributed Markov reward , options ( Sutton et al. , 1999 ) , MAXQ ( Dietterich , 2000 ) , or recursive option composition ( Silver & Ciosek , 2012 ) can be used . Higher Order Markov Reward Redistributions . Align-RUDDER may lead to higher-order Markov redistribution . Corollary 1 in the appendix states that the optimality criterion from Theorem 2 in Arjona-Medina et al . ( 2019 ) also holds for higher-order Markov reward redistributions . If the expected redistributed higher-order Markov reward is the difference of Q-values . In that case the redistribution is optimal , and there is no delayed reward . Furthermore , the optimal policies are the same as for the original problem . This corollary is the motivation for redistributing the reward to the steps in the Q-function . In the Appendix , Corollary 2 states that under a condition , an optimal higher-order reward redistribution can be expressed as the difference of Q-values .
The paper uses Sequence Alignment technique to redistribute rewards, to a similar effect as with LSTM in RUDDER. The hierarchical agent is trained with behavioral cloning and fine-tuned with RL (tabular in Rooms environment / PPO in MineRL). Tasks are automatically divided into subtasks and specialized agents used for the subtasks. The main contributions seem to be: a) introduction of the Sequence Alignment technique which works well with few expert demonstrations; b) experimental demonstration in Rooms / MineRL.
SP:7eb0d8278168465270570233e4af64ebb3f2f154
Improving Sentiment Classification Using 0-Shot Generated Labels for Custom Transformer Embeddings
1 INTRODUCTION . Natural language processing ( NLP ) is a rapidly advancing field due to the developments of the Transformer model Vaswani et al . ( 2017 ) using a combination of encoder and decoder to process tokenized text with attention . Some popular models use bidirectional embeddings like BERT Devlin et al . ( 2018 ) which is composed of just the encoder , while others use just the decoder like GPT2 Radford et al . ( 2019 ) and GPT-3 Brown et al . ( 2020 ) . All of these models are composed of a large number of parameters and this number of parameters has tendency to increase with time from several hundreds of millions to more than one hundred billions ( GPT3 ) . Recently , ( while not the main goal for some models ) another tendency focuses on reducing parameter sizes and efficiency like with Reformer Kitaev et al . ( 2020 ) , RoBERTa Liu et al . ( 2019 ) and DistilBERT Sanh et al . ( 2019 ) , as well as to focus on increasing the input sequence length such as with Transformer-XL Dai et al . ( 2019 ) and XLNet Yang et al . ( 2019 ) . Transformers are the state-of-the-art in many NLP tasks . In this paper we focus one of these tasks , sentiment classification , to study how additional semantic information could improve the prediction . Sentiment classification is important for a variety of tasks . For individual samples , sentiment classification can be used to monitor comments on a platform ( social media , direct messaging in sales , etc. ) . They can also be used to gather general sentiment from a user ’ s history of comments , or expand to the sentiment of the public regarding topics like politics or world events from general social media scraping . Sentiment classification is generally performed by predicting a positive or negative label for sentiment , or a probability representing 1 as positive and 0 as negative . Some instances will have a neutral output incorporated as a third label represented as 1 , 0 and -1 for positive , neutral , and negative , respectively . Emotion classification aims at predicting emotion labels for text rather than a general sentiment . Emotions such as joy , anger , neutral , disgust , fear , sadness and surprised are commonly used in addition to other common emotions like love , hate , worry and relief . Often emotion classification datasets are small in size with extremely unbalanced labels , but also suffer from labeller interpre- tation of complex emotions . Many datasets only include a small number of emotions and/or one emotion per sample , but text can have a variety of emotions , each at different levels . Emotions are highly subjective in text especially when it comes to choosing one emotion to represent one sample since human labelers can classify the text differently between one another depending on the interpretation or impression left on the person . We aim to improve sentiment predictions using enhanced emotion labeling by incorporating them as tabular data inputs to transformers . Emotion datasets provide poor quality labeling whether through inconsistent interpretation or selection of a single emotion to represent the sample leading to sparsity of labels . By improving the emotion labeling to encompass multiple emotions with a range of emotion levels ( without limitations on which emotions we can use ) , we can apply these labels to sentiment classification allowing the model to take a wide range of emotions into consideration which directly correlates to sentiment . This paper is organized as follows . Section 2 describes related previous works . We describe our sentiment models ’ design using our dataset with generated emotion labels in Section 3 . Experiments , results and comparisons are presented in Section 4 . Finally , the paper is concluded in Section 5 . 2 PREVIOUS WORKS . Transformers advanced NLP significantly since the original paper ” Attention Is All You Need ” Vaswani et al . ( 2017 ) . The transformer uses attention and self-attention mechanisms in order to detect and model dependencies and similarities between input words that are used to construct a dynamic embedding of all the words . Unlike Recurrent Neural Networks ( RNN ) , the model has a pre-set input sequence length , and is generally trained using significantly larger models . Despite these drawbacks , transformers have outperformed RNNs significantly . Transformers are generally trained on large corpora , such as Wikipedia , containing millions of articles and billions of words . Due to the large size of the training data coupled with the large size of transformer models , it requires significant resources and time to train . Rather than training a transformer from scratch , we look to pre-trained models with proven performance on several NLP tasks . Our results are demonstrated using the pre-trained models BERT Devlin et al . ( 2018 ) and DistilBERT Sanh et al . ( 2019 ) . As BERT has been a very popular model and has performed very well since its release , we chose BERT and DistilBERT to highlight improvements in these models while showing how we can improve the smaller distilled variation using the same approach to compete with the original BERT model . The base uncased BERT model has 110 Million parameters and 340 Million for the large model while DistilBERT reduces the size of a BERT model by 40 % while achieving a similar performance . Sentiment classification is a popular task but is often a difficult task due to the way humans express themselves in style and meaning . Naseem et al . ( 2020 ) use a combination of several model embeddings to overcome this problem and train a bi-LSTM using embeddings from character LSTM , ( word ) GloVE , parts of speech ( POS ) , Lexicon , ( context ) ELMo and ( transformer ) BERT . This comparison Zimbra et al . ( 2018 ) of several SOTA approaches shows the difficulty modelling sentiment with nearly all approaches performing under 70 % averaged over 5 sentiment datasets . Yin et al . ( 2020 ) use a BERT model for sentiment classification by applying a two layer attention system to the outputs of the BERT encoder at the token and phrase level using a parse tree . There ’ s a focus on sentiment classification using BERT in different languages such as mixed English and Spanish ( Spanglish ) Palomino & Ochoa-Luna ( 2020 ) and Arabic Antoun et al . ( 2020 ) . Transformers ( like BERT ) and other models have also been tested for the low-resource language Bangla for sentiment classification Arid Hasan et al . ( 2020 ) . To provide additional information to our model , we use an approach to incorporate tabular data into transformers . There have already been some works involved in embedding tabular data into a transformer model . Kiela et al . ( 2019 ) use the idea of embedded tokens to add pooled outputs from a ResNet He et al . ( 2015 ) model into a transformer allowing the transformer to process both text and associated images . Similarly , Lu et al . ( 2019 ) also embeds image information by using a Fast ( er ) R-CNN Ren et al . ( 2016 ) to produce features , but the features are added to the embeddings of the text . They mask regions of interest and also provide them as added features to custom ” [ IMG ] ” tokens allowing the model to predict information about these masked regions . 3 METHODOLOGY . In this section we describe our methodology in two steps . The first step is generating emotion probabilities for the sentiment dataset we intend to train on , in addition to preprocessing these emotions for use in the transformer . The second step is our training procedure to classify the sentiment dataset using these additional emotion features . Our approach uses the idea of custom embeddings to include emotions as token inputs into the transformer for sentiment classification . We designed our approach to handle a range of emotional inputs for every token using multiple embeddings within a specified emotion range , in addition to emotional inputs added to the classifier layer . We generate 63 emotion categories at random in our tests automatically generated without any training ( 0-shot ) relieving limitations on the number of emotion categories or the emotions used . Although there ’ s no limit to the number of emotions , aside from BERT ’ s maximum input length of 512 which must also include text , we limited our tests to 63 emotions to include all information . We also show the change in accuracy by selecting subsets of emotions which highlight more emotions provide more accuracy . 3.1 DATASETS . We use the sentiment140 Go et al . ( 2009 ) dataset which consists of 1.6 million samples classified as 0 for negative and 4 for positive ( relabeled to 1 ) with an even class distribution . We chose it because it ’ s the largest tweet sentiment dataset with a general purpose topic ( not specific to reviews or categories ) . The samples were scraped from twitter and include separate information on the user that posted the tweet such as their username and date , in addition to their tweet text . We discard user information and data information and simply use the tweet text for sentiment classification . We do not alter the text in any way like removing links , user mentions or symbols , we use the dataset as it is presented . We additionally test on a smaller dataset US-Airline sentiment from crowdflower 1 . The dataset consists of tweets mentioning US airlines and are labeled for sentiment . There are 2363 positive samples , 9178 negative samples and 3099 neutral samples . We removed the neutral samples since our approach is built for positive or negative predictions , leaving us with 11,541 samples . Due to the imbalance in classes , we removed most of the negative samples to match the size of the positive class giving us 4726 samples . 3.2 DATA PRE-PROCESSING . We generate emotion categories for each sample in the dataset for the first step in our pre-processing . We chose a random list of 63 general emotions for our examples which include some common emotions found in emotion datasets . We didn ’ t choose any particular set of emotions because we wanted to capture a wide range of possible informative features to the dataset , but we also try removing emotions not specific to positive or negative sentiment . Datasets for emotion classification like the dataset generated from crowdflower and from Saravia et al . Saravia et al . ( 2018 ) use just a single emotion for each sample ( sometimes including an ” other ” category ) , usually from these typical emotions : empty , sadness , enthusiasm , neutral , worried , surprise , love , fun , hate , happiness , boredom , relief , anger . We include all of these emotions aside from ” neutral ” and ” other ” and added many more : amusement , annoyed , anxious , aversion , bitter , cheated , compassion , confused , contentment , contrary , desperate , disappointed , disapproving , disgust , dislike , disturbed , doubtful , excitement , fear , frustrated , gloomy , grieved , heartbroken , hopeless , horrified , infuriated , insulted , irritated , joy , loathing , lonely , lost , mad , miserable , nauseated , nervous , offended , panicked , peace , peeved , pride , resigned , revulsion , satisfaction , stressed , terrified , troubled , uncomfortable , unhappy , vengeful , withdrawal . 1https : //www.crowdflower.com/data-for-everyone/ , https : //data.world/crowdflower/sentiment-analysis-intext We use the HuggingFace transformer library Wolf et al . ( 2019 ) to load a 0-shot pipeline . They use a Natural Language Inference ( NLI ) method which considers a premise and hypothesis in order to predict whether the hypothesis holds . The pipeline design can use any model , by default they use BART Lewis et al . ( 2019 ) which shows a large improvement over BERT on Yahoo Answers , ( see the results from this paper comparing BART and BERT for 0-shot classification Yin et al . ( 2019 ) ) . We use this pipeline to compare each emotion class to the sample text individually forcing the HuggingFace 0-shot pipeline to generate a probability independent of other emotion categories . We kept the default hypothesis format ” This example is { } ” where { } gets replaced with the respective emotion , and the premise is the original sample . Each emotion is processed individually producing a raw probability from BART whether the hypothesis follows the premise using direct probabilities ( not processed through softmax ) . This gives us the emotion probabilities rather than associating a high probability to the emotion that applies the most to the text from a large list of emotions . BART simply processes the text as ” [ CLS ] premise [ SEP ] hypothesis [ SEP ] ” and produces a probability for entailment . We used 4 Nvidia P-100 GPUs to predict on 1000 samples per batch ( depending on length of text , sometimes the batch must be reduced in size for lengthy samples ) to generate the probabilities for each emotion category and for each sample . Therefore , each emotion category received a probability for how much it associates to the original sample text . The probabilities are pre-processed to fit into a desired range of tokens . The token range is a list of custom transformer tokens where each token represents a segmentation of the probability . For example , if ” Happy ” has a predicted probability of 0.75 for a specific sample , and we want the range squished into a list of 3 tokens , then we generate the token ” [ happy 2 ] ” where ” [ happy 0 ] ” represents all probabilities < 1/3 , ” [ happy 1 ] ” represents the remainder of probabilities < 2/3 , and ” [ happy 2 ] ” represents the remaining probabilities > = 2/3 . We do this for each sample and for each emotion , then the sample text is prepended with the list of emotions . The entire token is associated to one embedding , so there ’ s no meaning behind the format aside from organization . For example , the text would look like the following ( assuming the emotion ranges ) : ” [ CLS ] [ amusement 1 ] ( ... ) [ happy 2 ] ( ... ) [ worried 0 ] The original sample text . [ SEP ] ” . The emotions prepended allows them to be kept in the same position for all samples for the positional embedding . In addition , we tested binary labels for the generated emotions using a dynamic threshold ( optimal to split the dataset evenly ) for each emotion . For a particular emotion , the threshold is determined by sorting the probabilities of the training set and choosing the median of the sorted list as the threshold to evenly split the dataset . For example , the generated emotion empty has the majority of the dataset classified as one label ( 97.89 % of the dataset ) . This is uninformative to the model , so instead we apply the dynamic threshold and have 50 % of the samples predicted as empty . A high performing emotion such as unhappy splits the dataset nearly in the middle at 51.14 % , meaning the emotion is more informative to the model . The dynamic threshold in this case will have little change to these emotions when adjusted to a 50.0 % split ( only 1.14 % of the labels change classes ) . This has two benefits , the reduction of tokens ( and added embeddings ) when we insert tokens into the text , and the reduction of class imbalance and inconsistencies when training . The first benefit reduces the number of added embeddings to 2 embeddings ( a range of 2 , positive and negative ) per emotion compared to several tokens per emotion depending on the prior emotion level , but maintaining a similar improvement in F1 . Note that we ’ ve tried adding the emotions as keywords to avoid training additional tokens and adding negation for positive and negative classes such as ” happy ” and ” not happy ” ( as text , not tokens ) , or simply not including the emotion when negative . This did not improve results in testing in any trial . We believe this could be from the positional embedding since each keyword is split into one or many tokens during the tokenization process , and secondly from an association to seeing keywords like ” happy ” as a biased indication of positive sentiment when possibly appearing in the sample text itself . In this case , using added embeddings allows the model to interpret its own meaning to the emotion while reducing the lengthy input size to each sample using raw keywords . We use the python libraries Transformers Wolf et al . ( 2019 ) and FastAI Howard et al . ( 2018 ) to load the pretrained BERT transformer including the vocabulary and zero-shot pipeline . Using FastAI , we tokenize the entire training , validation and test set . Finally , the data collection from FastAI is loaded using the sample text with embedded emotion tokens , sentiment targets , final classifier emotion inputs .
########################################################################## Summary: This works proposes a sentiment classification approach for transformer-based models that employs additional embeddings to represent emotion inputs. These additional emotion inputs are generated using pre-trained transformer in a zero-shot fashion. Experimental results show a modest improvement for existing approaches such as BERT and DistilBERT. ##########################################################################
SP:eae08fc9f0786b7522db48420aed2b1d02027ad3
Improving Sentiment Classification Using 0-Shot Generated Labels for Custom Transformer Embeddings
1 INTRODUCTION . Natural language processing ( NLP ) is a rapidly advancing field due to the developments of the Transformer model Vaswani et al . ( 2017 ) using a combination of encoder and decoder to process tokenized text with attention . Some popular models use bidirectional embeddings like BERT Devlin et al . ( 2018 ) which is composed of just the encoder , while others use just the decoder like GPT2 Radford et al . ( 2019 ) and GPT-3 Brown et al . ( 2020 ) . All of these models are composed of a large number of parameters and this number of parameters has tendency to increase with time from several hundreds of millions to more than one hundred billions ( GPT3 ) . Recently , ( while not the main goal for some models ) another tendency focuses on reducing parameter sizes and efficiency like with Reformer Kitaev et al . ( 2020 ) , RoBERTa Liu et al . ( 2019 ) and DistilBERT Sanh et al . ( 2019 ) , as well as to focus on increasing the input sequence length such as with Transformer-XL Dai et al . ( 2019 ) and XLNet Yang et al . ( 2019 ) . Transformers are the state-of-the-art in many NLP tasks . In this paper we focus one of these tasks , sentiment classification , to study how additional semantic information could improve the prediction . Sentiment classification is important for a variety of tasks . For individual samples , sentiment classification can be used to monitor comments on a platform ( social media , direct messaging in sales , etc. ) . They can also be used to gather general sentiment from a user ’ s history of comments , or expand to the sentiment of the public regarding topics like politics or world events from general social media scraping . Sentiment classification is generally performed by predicting a positive or negative label for sentiment , or a probability representing 1 as positive and 0 as negative . Some instances will have a neutral output incorporated as a third label represented as 1 , 0 and -1 for positive , neutral , and negative , respectively . Emotion classification aims at predicting emotion labels for text rather than a general sentiment . Emotions such as joy , anger , neutral , disgust , fear , sadness and surprised are commonly used in addition to other common emotions like love , hate , worry and relief . Often emotion classification datasets are small in size with extremely unbalanced labels , but also suffer from labeller interpre- tation of complex emotions . Many datasets only include a small number of emotions and/or one emotion per sample , but text can have a variety of emotions , each at different levels . Emotions are highly subjective in text especially when it comes to choosing one emotion to represent one sample since human labelers can classify the text differently between one another depending on the interpretation or impression left on the person . We aim to improve sentiment predictions using enhanced emotion labeling by incorporating them as tabular data inputs to transformers . Emotion datasets provide poor quality labeling whether through inconsistent interpretation or selection of a single emotion to represent the sample leading to sparsity of labels . By improving the emotion labeling to encompass multiple emotions with a range of emotion levels ( without limitations on which emotions we can use ) , we can apply these labels to sentiment classification allowing the model to take a wide range of emotions into consideration which directly correlates to sentiment . This paper is organized as follows . Section 2 describes related previous works . We describe our sentiment models ’ design using our dataset with generated emotion labels in Section 3 . Experiments , results and comparisons are presented in Section 4 . Finally , the paper is concluded in Section 5 . 2 PREVIOUS WORKS . Transformers advanced NLP significantly since the original paper ” Attention Is All You Need ” Vaswani et al . ( 2017 ) . The transformer uses attention and self-attention mechanisms in order to detect and model dependencies and similarities between input words that are used to construct a dynamic embedding of all the words . Unlike Recurrent Neural Networks ( RNN ) , the model has a pre-set input sequence length , and is generally trained using significantly larger models . Despite these drawbacks , transformers have outperformed RNNs significantly . Transformers are generally trained on large corpora , such as Wikipedia , containing millions of articles and billions of words . Due to the large size of the training data coupled with the large size of transformer models , it requires significant resources and time to train . Rather than training a transformer from scratch , we look to pre-trained models with proven performance on several NLP tasks . Our results are demonstrated using the pre-trained models BERT Devlin et al . ( 2018 ) and DistilBERT Sanh et al . ( 2019 ) . As BERT has been a very popular model and has performed very well since its release , we chose BERT and DistilBERT to highlight improvements in these models while showing how we can improve the smaller distilled variation using the same approach to compete with the original BERT model . The base uncased BERT model has 110 Million parameters and 340 Million for the large model while DistilBERT reduces the size of a BERT model by 40 % while achieving a similar performance . Sentiment classification is a popular task but is often a difficult task due to the way humans express themselves in style and meaning . Naseem et al . ( 2020 ) use a combination of several model embeddings to overcome this problem and train a bi-LSTM using embeddings from character LSTM , ( word ) GloVE , parts of speech ( POS ) , Lexicon , ( context ) ELMo and ( transformer ) BERT . This comparison Zimbra et al . ( 2018 ) of several SOTA approaches shows the difficulty modelling sentiment with nearly all approaches performing under 70 % averaged over 5 sentiment datasets . Yin et al . ( 2020 ) use a BERT model for sentiment classification by applying a two layer attention system to the outputs of the BERT encoder at the token and phrase level using a parse tree . There ’ s a focus on sentiment classification using BERT in different languages such as mixed English and Spanish ( Spanglish ) Palomino & Ochoa-Luna ( 2020 ) and Arabic Antoun et al . ( 2020 ) . Transformers ( like BERT ) and other models have also been tested for the low-resource language Bangla for sentiment classification Arid Hasan et al . ( 2020 ) . To provide additional information to our model , we use an approach to incorporate tabular data into transformers . There have already been some works involved in embedding tabular data into a transformer model . Kiela et al . ( 2019 ) use the idea of embedded tokens to add pooled outputs from a ResNet He et al . ( 2015 ) model into a transformer allowing the transformer to process both text and associated images . Similarly , Lu et al . ( 2019 ) also embeds image information by using a Fast ( er ) R-CNN Ren et al . ( 2016 ) to produce features , but the features are added to the embeddings of the text . They mask regions of interest and also provide them as added features to custom ” [ IMG ] ” tokens allowing the model to predict information about these masked regions . 3 METHODOLOGY . In this section we describe our methodology in two steps . The first step is generating emotion probabilities for the sentiment dataset we intend to train on , in addition to preprocessing these emotions for use in the transformer . The second step is our training procedure to classify the sentiment dataset using these additional emotion features . Our approach uses the idea of custom embeddings to include emotions as token inputs into the transformer for sentiment classification . We designed our approach to handle a range of emotional inputs for every token using multiple embeddings within a specified emotion range , in addition to emotional inputs added to the classifier layer . We generate 63 emotion categories at random in our tests automatically generated without any training ( 0-shot ) relieving limitations on the number of emotion categories or the emotions used . Although there ’ s no limit to the number of emotions , aside from BERT ’ s maximum input length of 512 which must also include text , we limited our tests to 63 emotions to include all information . We also show the change in accuracy by selecting subsets of emotions which highlight more emotions provide more accuracy . 3.1 DATASETS . We use the sentiment140 Go et al . ( 2009 ) dataset which consists of 1.6 million samples classified as 0 for negative and 4 for positive ( relabeled to 1 ) with an even class distribution . We chose it because it ’ s the largest tweet sentiment dataset with a general purpose topic ( not specific to reviews or categories ) . The samples were scraped from twitter and include separate information on the user that posted the tweet such as their username and date , in addition to their tweet text . We discard user information and data information and simply use the tweet text for sentiment classification . We do not alter the text in any way like removing links , user mentions or symbols , we use the dataset as it is presented . We additionally test on a smaller dataset US-Airline sentiment from crowdflower 1 . The dataset consists of tweets mentioning US airlines and are labeled for sentiment . There are 2363 positive samples , 9178 negative samples and 3099 neutral samples . We removed the neutral samples since our approach is built for positive or negative predictions , leaving us with 11,541 samples . Due to the imbalance in classes , we removed most of the negative samples to match the size of the positive class giving us 4726 samples . 3.2 DATA PRE-PROCESSING . We generate emotion categories for each sample in the dataset for the first step in our pre-processing . We chose a random list of 63 general emotions for our examples which include some common emotions found in emotion datasets . We didn ’ t choose any particular set of emotions because we wanted to capture a wide range of possible informative features to the dataset , but we also try removing emotions not specific to positive or negative sentiment . Datasets for emotion classification like the dataset generated from crowdflower and from Saravia et al . Saravia et al . ( 2018 ) use just a single emotion for each sample ( sometimes including an ” other ” category ) , usually from these typical emotions : empty , sadness , enthusiasm , neutral , worried , surprise , love , fun , hate , happiness , boredom , relief , anger . We include all of these emotions aside from ” neutral ” and ” other ” and added many more : amusement , annoyed , anxious , aversion , bitter , cheated , compassion , confused , contentment , contrary , desperate , disappointed , disapproving , disgust , dislike , disturbed , doubtful , excitement , fear , frustrated , gloomy , grieved , heartbroken , hopeless , horrified , infuriated , insulted , irritated , joy , loathing , lonely , lost , mad , miserable , nauseated , nervous , offended , panicked , peace , peeved , pride , resigned , revulsion , satisfaction , stressed , terrified , troubled , uncomfortable , unhappy , vengeful , withdrawal . 1https : //www.crowdflower.com/data-for-everyone/ , https : //data.world/crowdflower/sentiment-analysis-intext We use the HuggingFace transformer library Wolf et al . ( 2019 ) to load a 0-shot pipeline . They use a Natural Language Inference ( NLI ) method which considers a premise and hypothesis in order to predict whether the hypothesis holds . The pipeline design can use any model , by default they use BART Lewis et al . ( 2019 ) which shows a large improvement over BERT on Yahoo Answers , ( see the results from this paper comparing BART and BERT for 0-shot classification Yin et al . ( 2019 ) ) . We use this pipeline to compare each emotion class to the sample text individually forcing the HuggingFace 0-shot pipeline to generate a probability independent of other emotion categories . We kept the default hypothesis format ” This example is { } ” where { } gets replaced with the respective emotion , and the premise is the original sample . Each emotion is processed individually producing a raw probability from BART whether the hypothesis follows the premise using direct probabilities ( not processed through softmax ) . This gives us the emotion probabilities rather than associating a high probability to the emotion that applies the most to the text from a large list of emotions . BART simply processes the text as ” [ CLS ] premise [ SEP ] hypothesis [ SEP ] ” and produces a probability for entailment . We used 4 Nvidia P-100 GPUs to predict on 1000 samples per batch ( depending on length of text , sometimes the batch must be reduced in size for lengthy samples ) to generate the probabilities for each emotion category and for each sample . Therefore , each emotion category received a probability for how much it associates to the original sample text . The probabilities are pre-processed to fit into a desired range of tokens . The token range is a list of custom transformer tokens where each token represents a segmentation of the probability . For example , if ” Happy ” has a predicted probability of 0.75 for a specific sample , and we want the range squished into a list of 3 tokens , then we generate the token ” [ happy 2 ] ” where ” [ happy 0 ] ” represents all probabilities < 1/3 , ” [ happy 1 ] ” represents the remainder of probabilities < 2/3 , and ” [ happy 2 ] ” represents the remaining probabilities > = 2/3 . We do this for each sample and for each emotion , then the sample text is prepended with the list of emotions . The entire token is associated to one embedding , so there ’ s no meaning behind the format aside from organization . For example , the text would look like the following ( assuming the emotion ranges ) : ” [ CLS ] [ amusement 1 ] ( ... ) [ happy 2 ] ( ... ) [ worried 0 ] The original sample text . [ SEP ] ” . The emotions prepended allows them to be kept in the same position for all samples for the positional embedding . In addition , we tested binary labels for the generated emotions using a dynamic threshold ( optimal to split the dataset evenly ) for each emotion . For a particular emotion , the threshold is determined by sorting the probabilities of the training set and choosing the median of the sorted list as the threshold to evenly split the dataset . For example , the generated emotion empty has the majority of the dataset classified as one label ( 97.89 % of the dataset ) . This is uninformative to the model , so instead we apply the dynamic threshold and have 50 % of the samples predicted as empty . A high performing emotion such as unhappy splits the dataset nearly in the middle at 51.14 % , meaning the emotion is more informative to the model . The dynamic threshold in this case will have little change to these emotions when adjusted to a 50.0 % split ( only 1.14 % of the labels change classes ) . This has two benefits , the reduction of tokens ( and added embeddings ) when we insert tokens into the text , and the reduction of class imbalance and inconsistencies when training . The first benefit reduces the number of added embeddings to 2 embeddings ( a range of 2 , positive and negative ) per emotion compared to several tokens per emotion depending on the prior emotion level , but maintaining a similar improvement in F1 . Note that we ’ ve tried adding the emotions as keywords to avoid training additional tokens and adding negation for positive and negative classes such as ” happy ” and ” not happy ” ( as text , not tokens ) , or simply not including the emotion when negative . This did not improve results in testing in any trial . We believe this could be from the positional embedding since each keyword is split into one or many tokens during the tokenization process , and secondly from an association to seeing keywords like ” happy ” as a biased indication of positive sentiment when possibly appearing in the sample text itself . In this case , using added embeddings allows the model to interpret its own meaning to the emotion while reducing the lengthy input size to each sample using raw keywords . We use the python libraries Transformers Wolf et al . ( 2019 ) and FastAI Howard et al . ( 2018 ) to load the pretrained BERT transformer including the vocabulary and zero-shot pipeline . Using FastAI , we tokenize the entire training , validation and test set . Finally , the data collection from FastAI is loaded using the sample text with embedded emotion tokens , sentiment targets , final classifier emotion inputs .
This paper proposes a simple way to supplement emotions related information to a downstream classifier. Authors first utilize a pre-trained BART Model to predict probabilities of a pre-defined set of emotion-related words. Then, they prepend the emotion words as text input to the transformer-based classifier. On two public sentiment classification datasets, authors show that adding emotion information leads to decent performance gains.
SP:eae08fc9f0786b7522db48420aed2b1d02027ad3
The Role of Pretrained Representations for the OOD Generalization of RL Agents
Building sample-efficient agents that generalize out-of-distribution ( OOD ) in realworld settings remains a fundamental unsolved problem on the path towards achieving higher-level cognition . One particularly promising approach is to begin with low-dimensional , pretrained representations of our world , which should facilitate efficient downstream learning and generalization . By training 240 representations and over 10,000 reinforcement learning policies on a simulated robotic setup , we evaluate to what extent different properties of pretrained VAE-based representations affect the OOD generalization of downstream agents . We observe that many agents are surprisingly robust to realistic distribution shifts , including the challenging simto-real case . In addition , we find that the generalization performance of a simple downstream proxy task reliably predicts the generalization performance of our reinforcement learning control tasks under a wide range of practically relevant OOD settings . Such proxy tasks can thus be used to select pretrained representations that will lead to agents that generalize out-of-distribution . 1 INTRODUCTION . Robust out-of-distribution ( OOD ) generalization is one of the key open challenges in machine learning . This is particularly relevant for the deployment of ML models to the real world , where we need systems that generalize beyond the i.i.d . ( independent and identically distributed ) data setting ( Azulay & Weiss , 2019 ; Barbu et al. , 2019 ; Djolonga et al. , 2020 ; Funk et al. , 2021 ; Gulrajani & Lopez-Paz , 2020 ; Hendrycks & Dietterich , 2019 ; Koh et al. , 2021 ; Michaelis et al. , 2019 ; Roy et al. , 2018 ; Schölkopf et al. , 2021 ) . One instance of such models are agents that learn by interacting with a training environment and we would like them to generalize to other environments with different statistics ( Ahmed et al. , 2021 ; Cobbe et al. , 2019 ; Ke et al. , 2021 ; Pfister et al. , 2019 ; Zhang et al. , 2018 ) . Consider the example of a robot with the task of moving a cube to a target position : Such an agent can easily fail as soon as some aspects of the environment differ from the training setup , e.g . the shape , color , and other object properties , or when transferring from simulation to real world . Humans do not suffer from these pitfalls when transferring learned skills beyond a narrow training domain , presumably because they represent visual sensory data in a concise and useful manner ( Anand et al. , 2019 ; Gordon & Irwin , 1996 ; Lake et al. , 2017 ; Marr , 1982 ; Spelke , 1990 ) . Therefore , a particularly promising path is to base decisions and predictions on similar low-dimensional representations of our world ( Barreto et al. , 2017 ; Bengio et al. , 2013 ; Finn et al. , 2016 ; Kaiser et al. , 2019 ) . The learned representation should facilitate efficient downstream learning ( Anand et al. , 2019 ; Eslami et al. , 2018 ; Stooke et al. , 2020 ) and exhibit better generalization ( Srinivas et al. , 2020 ; Zhang et al. , 2020 ) . Learning such a representation from scratch for every downstream task and every new variation would be highly inefficient . If we learned to juggle three balls , we should be able to generalize to oranges or apples without learning again from scratch . We could even do it with cherimoyas , a type of fruit that we might have never seen before . We can effectively reuse our generic representation of the world . We thus consider deep learning agents trained from pretrained representations and ask the following questions : To what extent do they generalize under distribution shifts similar to those mentioned above ? Do they generalize in different ways or to different degrees depending on the type of distribution shift , including sim-to-real ? Can we predict the OOD generalization of downstream agents from properties of the pretrained representations ? To answer the questions above , we need our experimental setting to be realistic , diverse , and challenging , but also controlled enough for the conclusions to be sound . We therefore base our study on the robot platform introduced by Wüthrich et al . ( 2020 ) . The scene comprises a robot finger with three joints that can be controlled to manipulate a cube in a bowl-shaped stage . Dittadi et al . ( 2021 ) conveniently introduced a dataset of simulated and real-world images of this setup with ground-truth labels , which can be used to pretrain and evaluate representations . To train downstream agents , we adapted the simulated reinforcement learning benchmark CausalWorld from Ahmed et al . ( 2021 ) that was also developed for this robotic setup . Building upon these works , we can design our experimental study as follows : First , we pretrain representations from static simulated images of the setup and evaluate a collection of representation metrics . Following prior work ( Eslami et al. , 2018 ; Ghadirzadeh et al. , 2017 ; Ha & Schmidhuber , 2018 ; Nair et al. , 2018 ; Van Hoof et al. , 2016 ; Watter et al. , 2015 ) , we focus on autoencoder-based representations . Then , we train downstream agents from this fixed representation on a set of environments . Finally , we investigate the zero-shot generalization of these agents to new environments that are out of the training distribution , including the real robot . Our setup is summarized in Fig . 1 . The goal of this work is to provide the first systematic and extensive account of the OOD generalization of downstream RL agents in a robotic setup , and how this is affected by characteristics of the upstream pretrained representations . We summarize our contributions as follows : • We train 240 representations and 11,520 downstream policies,1 and systematically investigate the performance of these policies under a diverse range of distribution shifts.2 • We extensively analyze the relationship between the generalization of our RL agents and a substantial set of representation metrics . • Notably , we find that a specific representation metric that measures the generalization of a simple downstream proxy task reliably predicts the generalization of downstream RL agents under the broad spectrum of OOD settings considered here . This metric can thus be used to select pretrained representations that will lead to more robust downstream policies . • In the most challenging of our OOD scenarios , we deploy a subset of the trained policies to the corresponding real-world robotic platform , and observe surprising zero-shot sim-to-real generalization without any fine-tuning or domain randomization . 2 BACKGROUND . In this section , we provide relevant background on the methods for representation learning and reinforcement learning , and on the robotic setup to evaluate out-of-distribution generalization . Variational autoencoders . VAEs ( Kingma & Welling , 2014 ; Rezende et al. , 2014 ) are a framework for optimizing a latent variable model pθ ( x ) = ∫ z pθ ( x | z ) p ( z ) dz with parameters θ , typically with a fixed prior p ( z ) = N ( z ; 0 , I ) , using amortized stochastic variational inference . A variational distribution qφ ( z |x ) with parameters φ approximates the intractable posterior pθ ( z |x ) . The approximate posterior and generative model , typically called encoder and decoder and parameterized by neural networks , are jointly optimized by maximizing a lower bound to the log likelihood ( the ELBO ) : log pθ ( x ) ≥ Eqφ ( z |x ) [ log pθ ( x | z ) ] −DKL ( qφ ( z |x ) ‖p ( z ) ) = L ELBO θ , φ ( x ) . ( 1 ) In β-VAEs , the KL term is modulated by a factor β to enforce a more structured latent space ( Burgess et al. , 2018 ; Higgins et al. , 2017a ) . While VAEs are typically trained without supervision , we also employ a form of weak supervision proposed by Locatello et al . ( 2020 ) that encourages disentanglement ( Higgins et al. , 2018 ) . Reinforcement learning . A Reinforcement Learning ( RL ) problem is typically modeled as a Partially Observable Markov Decision Process ( POMDP ) defined as a tuple ( S , A , T , R , Ω , O , γ , ρ0 , H ) with states s ∈ S , actions a ∈ A and observations o ∈ Ω determined by the state and action of the environment O ( o|s , a ) . T ( st+1|st , at ) is the transition probability distribution function , R ( st , at ) is the reward function , γ is the discount factor , ρ0 ( s ) is the initial state distribution at the beginning of each episode , and H is the time horizon per episode . The objective in RL is to learn a policy 1Training the representations required approximately 0.62 GPU years on NVIDIA Tesla V100 . Training and evaluating the downstream policies required about 86.8 CPU years on Intel Platinum 8175M processors . 2Additional results and videos are provided at https : //sites.google.com/view/ood-rl . π : S ×A→ [ 0 , 1 ] , typically parameterized by a neural network , that maximizes the total discounted expected reward J ( π ) = E [ ∑H t=0 γ tR ( st , at ) ] . There is a broad range of proposed model-free learning algorithms to find π∗ by policy gradient optimization or learning value functions while trading off exploration and exploitation ( Fujimoto et al. , 2018 ; Haarnoja et al. , 2018b ; Schulman et al. , 2015a ; b ; 2017 ; Silver et al. , 2014 ; Sutton et al. , 1999 ) . Here , we optimize the objective above with Soft Actor Critic ( SAC ) , a widely used off-policy method in control tasks due to its sample efficiency ( Haarnoja et al. , 2018b ) . SAC aims to improve sample-inefficiency and convergence in RL by simultaneously maximizing the expected reward and the entropy H ( π ( ·|st ) ) . A robotic setup to evaluate out-of-distribution generalization . Our study is based on a real robot platform where a robotic finger with three joints manipulates a cube in a bowl-shaped stage ( Wüthrich et al. , 2020 ) . We pretrain representations on a labeled dataset introduced by Dittadi et al . ( 2021 ) which consists of simulated and real-world images of this setup . This dataset has 7 underlying factors of variation ( FoV ) : angles of the three joints , and position ( x and y ) , orientation , and color of the cube . After training the representations , we train downstream agents and evaluate their generalization on an adapted version of the simulated CausalWorld benchmark ( Ahmed et al. , 2021 ) that was developed for the same setup . Finally , we can test sim-to-real generalization on the real robot . Our experimental setup , illustrated in Fig . 1 , allows us to systematically investigate a broad range of out-of-distribution scenarios in a controlled way . We pretrain our representations from this simulated dataset that covers 8 distinct cube colors . We then train an agent from this fixed representation on a subset of the cube colors , and evaluate it ( 1 ) on the same colors ( this is the typical scenario in RL ) , ( 2 ) on the held-out cube colors known to the representation , or ( 3 ) OOD w.r.t . the representation training distribution , e.g . on novel colors and shapes or on the real world . We closely follow the framework for measuring OOD generalization proposed by Dittadi et al . ( 2021 ) . In this framework , a representation is initially learned on a training set D , and a simple downstream model is trained on a subset D1 ⊂ D to predict the ground-truth factors from the learned representation . Generalization is then evaluated by testing the downstream model on a set D2 that differs distributionally from D1 , e.g . containing images corresponding to held-out values of a chosen factor of variation ( FoV ) . Dittadi et al . ( 2021 ) consider two flavors of OOD generalization depending on the choice of D2 : First , the case when D2 ⊂ D , i.e . the OOD test set is a subset of the dataset for representation learning . This is denoted by OOD1 and corresponds to the scenario ( 2 ) from the previous paragraph . In the other scenario , referred to as OOD2 , D and D2 are disjoint and distributionally different . This even stronger OOD shift corresponds to case ( 3 ) above . The generalization score for D2 is then measured by the ( normalized ) mean absolute prediction error across all FoVs except for the one that is OOD . Following Dittadi et al . ( 2021 ) , we use a simple 2-layer Multi-Layer Perceptron ( MLP ) for downstream factor prediction . This simple and cheap generalization metric could serve as a convenient proxy for the generalization of more expensive downstream tasks . From now on , we will report the negative error for interpretability , and decompose this metric in addition on a per-factor level . We refer to these generalization scores as GS-OOD1 , GS-OOD2-sim , and GS-OOD2-real accordingly . The focus of Dittadi et al . ( 2021 ) was to scale VAE-based learning approaches to more realistic scenarios and study the generalization of these simple downstream tasks , with a particular emphasis on disentanglement . Building upon their contributions , we can leverage the broader potential of this robotic setup with many more OOD2 scenarios to study our research questions : To what extent can agents generalize under distribution shift ? Do they generalize in different ways depending on the type of distribution shift ( including sim-to-real ) ? Can we predict the OOD generalization of downstream agents from properties of the pretrained representations such as the GS metrics from Dittadi et al . ( 2021 ) ?
This paper is an analysis paper that uses well-known existing pretraining techniques to study the effect of pretrained representations on out-of-distribution generalization performance. The paper mainly uses the VAEs to train the visual representation network. While I believe this is an important topic, the paper only analyzed one pretraining technique and in a visually simple environment.
SP:f3373b0ef10578400b8dd9cf54bf71435bd0f726
The Role of Pretrained Representations for the OOD Generalization of RL Agents
Building sample-efficient agents that generalize out-of-distribution ( OOD ) in realworld settings remains a fundamental unsolved problem on the path towards achieving higher-level cognition . One particularly promising approach is to begin with low-dimensional , pretrained representations of our world , which should facilitate efficient downstream learning and generalization . By training 240 representations and over 10,000 reinforcement learning policies on a simulated robotic setup , we evaluate to what extent different properties of pretrained VAE-based representations affect the OOD generalization of downstream agents . We observe that many agents are surprisingly robust to realistic distribution shifts , including the challenging simto-real case . In addition , we find that the generalization performance of a simple downstream proxy task reliably predicts the generalization performance of our reinforcement learning control tasks under a wide range of practically relevant OOD settings . Such proxy tasks can thus be used to select pretrained representations that will lead to agents that generalize out-of-distribution . 1 INTRODUCTION . Robust out-of-distribution ( OOD ) generalization is one of the key open challenges in machine learning . This is particularly relevant for the deployment of ML models to the real world , where we need systems that generalize beyond the i.i.d . ( independent and identically distributed ) data setting ( Azulay & Weiss , 2019 ; Barbu et al. , 2019 ; Djolonga et al. , 2020 ; Funk et al. , 2021 ; Gulrajani & Lopez-Paz , 2020 ; Hendrycks & Dietterich , 2019 ; Koh et al. , 2021 ; Michaelis et al. , 2019 ; Roy et al. , 2018 ; Schölkopf et al. , 2021 ) . One instance of such models are agents that learn by interacting with a training environment and we would like them to generalize to other environments with different statistics ( Ahmed et al. , 2021 ; Cobbe et al. , 2019 ; Ke et al. , 2021 ; Pfister et al. , 2019 ; Zhang et al. , 2018 ) . Consider the example of a robot with the task of moving a cube to a target position : Such an agent can easily fail as soon as some aspects of the environment differ from the training setup , e.g . the shape , color , and other object properties , or when transferring from simulation to real world . Humans do not suffer from these pitfalls when transferring learned skills beyond a narrow training domain , presumably because they represent visual sensory data in a concise and useful manner ( Anand et al. , 2019 ; Gordon & Irwin , 1996 ; Lake et al. , 2017 ; Marr , 1982 ; Spelke , 1990 ) . Therefore , a particularly promising path is to base decisions and predictions on similar low-dimensional representations of our world ( Barreto et al. , 2017 ; Bengio et al. , 2013 ; Finn et al. , 2016 ; Kaiser et al. , 2019 ) . The learned representation should facilitate efficient downstream learning ( Anand et al. , 2019 ; Eslami et al. , 2018 ; Stooke et al. , 2020 ) and exhibit better generalization ( Srinivas et al. , 2020 ; Zhang et al. , 2020 ) . Learning such a representation from scratch for every downstream task and every new variation would be highly inefficient . If we learned to juggle three balls , we should be able to generalize to oranges or apples without learning again from scratch . We could even do it with cherimoyas , a type of fruit that we might have never seen before . We can effectively reuse our generic representation of the world . We thus consider deep learning agents trained from pretrained representations and ask the following questions : To what extent do they generalize under distribution shifts similar to those mentioned above ? Do they generalize in different ways or to different degrees depending on the type of distribution shift , including sim-to-real ? Can we predict the OOD generalization of downstream agents from properties of the pretrained representations ? To answer the questions above , we need our experimental setting to be realistic , diverse , and challenging , but also controlled enough for the conclusions to be sound . We therefore base our study on the robot platform introduced by Wüthrich et al . ( 2020 ) . The scene comprises a robot finger with three joints that can be controlled to manipulate a cube in a bowl-shaped stage . Dittadi et al . ( 2021 ) conveniently introduced a dataset of simulated and real-world images of this setup with ground-truth labels , which can be used to pretrain and evaluate representations . To train downstream agents , we adapted the simulated reinforcement learning benchmark CausalWorld from Ahmed et al . ( 2021 ) that was also developed for this robotic setup . Building upon these works , we can design our experimental study as follows : First , we pretrain representations from static simulated images of the setup and evaluate a collection of representation metrics . Following prior work ( Eslami et al. , 2018 ; Ghadirzadeh et al. , 2017 ; Ha & Schmidhuber , 2018 ; Nair et al. , 2018 ; Van Hoof et al. , 2016 ; Watter et al. , 2015 ) , we focus on autoencoder-based representations . Then , we train downstream agents from this fixed representation on a set of environments . Finally , we investigate the zero-shot generalization of these agents to new environments that are out of the training distribution , including the real robot . Our setup is summarized in Fig . 1 . The goal of this work is to provide the first systematic and extensive account of the OOD generalization of downstream RL agents in a robotic setup , and how this is affected by characteristics of the upstream pretrained representations . We summarize our contributions as follows : • We train 240 representations and 11,520 downstream policies,1 and systematically investigate the performance of these policies under a diverse range of distribution shifts.2 • We extensively analyze the relationship between the generalization of our RL agents and a substantial set of representation metrics . • Notably , we find that a specific representation metric that measures the generalization of a simple downstream proxy task reliably predicts the generalization of downstream RL agents under the broad spectrum of OOD settings considered here . This metric can thus be used to select pretrained representations that will lead to more robust downstream policies . • In the most challenging of our OOD scenarios , we deploy a subset of the trained policies to the corresponding real-world robotic platform , and observe surprising zero-shot sim-to-real generalization without any fine-tuning or domain randomization . 2 BACKGROUND . In this section , we provide relevant background on the methods for representation learning and reinforcement learning , and on the robotic setup to evaluate out-of-distribution generalization . Variational autoencoders . VAEs ( Kingma & Welling , 2014 ; Rezende et al. , 2014 ) are a framework for optimizing a latent variable model pθ ( x ) = ∫ z pθ ( x | z ) p ( z ) dz with parameters θ , typically with a fixed prior p ( z ) = N ( z ; 0 , I ) , using amortized stochastic variational inference . A variational distribution qφ ( z |x ) with parameters φ approximates the intractable posterior pθ ( z |x ) . The approximate posterior and generative model , typically called encoder and decoder and parameterized by neural networks , are jointly optimized by maximizing a lower bound to the log likelihood ( the ELBO ) : log pθ ( x ) ≥ Eqφ ( z |x ) [ log pθ ( x | z ) ] −DKL ( qφ ( z |x ) ‖p ( z ) ) = L ELBO θ , φ ( x ) . ( 1 ) In β-VAEs , the KL term is modulated by a factor β to enforce a more structured latent space ( Burgess et al. , 2018 ; Higgins et al. , 2017a ) . While VAEs are typically trained without supervision , we also employ a form of weak supervision proposed by Locatello et al . ( 2020 ) that encourages disentanglement ( Higgins et al. , 2018 ) . Reinforcement learning . A Reinforcement Learning ( RL ) problem is typically modeled as a Partially Observable Markov Decision Process ( POMDP ) defined as a tuple ( S , A , T , R , Ω , O , γ , ρ0 , H ) with states s ∈ S , actions a ∈ A and observations o ∈ Ω determined by the state and action of the environment O ( o|s , a ) . T ( st+1|st , at ) is the transition probability distribution function , R ( st , at ) is the reward function , γ is the discount factor , ρ0 ( s ) is the initial state distribution at the beginning of each episode , and H is the time horizon per episode . The objective in RL is to learn a policy 1Training the representations required approximately 0.62 GPU years on NVIDIA Tesla V100 . Training and evaluating the downstream policies required about 86.8 CPU years on Intel Platinum 8175M processors . 2Additional results and videos are provided at https : //sites.google.com/view/ood-rl . π : S ×A→ [ 0 , 1 ] , typically parameterized by a neural network , that maximizes the total discounted expected reward J ( π ) = E [ ∑H t=0 γ tR ( st , at ) ] . There is a broad range of proposed model-free learning algorithms to find π∗ by policy gradient optimization or learning value functions while trading off exploration and exploitation ( Fujimoto et al. , 2018 ; Haarnoja et al. , 2018b ; Schulman et al. , 2015a ; b ; 2017 ; Silver et al. , 2014 ; Sutton et al. , 1999 ) . Here , we optimize the objective above with Soft Actor Critic ( SAC ) , a widely used off-policy method in control tasks due to its sample efficiency ( Haarnoja et al. , 2018b ) . SAC aims to improve sample-inefficiency and convergence in RL by simultaneously maximizing the expected reward and the entropy H ( π ( ·|st ) ) . A robotic setup to evaluate out-of-distribution generalization . Our study is based on a real robot platform where a robotic finger with three joints manipulates a cube in a bowl-shaped stage ( Wüthrich et al. , 2020 ) . We pretrain representations on a labeled dataset introduced by Dittadi et al . ( 2021 ) which consists of simulated and real-world images of this setup . This dataset has 7 underlying factors of variation ( FoV ) : angles of the three joints , and position ( x and y ) , orientation , and color of the cube . After training the representations , we train downstream agents and evaluate their generalization on an adapted version of the simulated CausalWorld benchmark ( Ahmed et al. , 2021 ) that was developed for the same setup . Finally , we can test sim-to-real generalization on the real robot . Our experimental setup , illustrated in Fig . 1 , allows us to systematically investigate a broad range of out-of-distribution scenarios in a controlled way . We pretrain our representations from this simulated dataset that covers 8 distinct cube colors . We then train an agent from this fixed representation on a subset of the cube colors , and evaluate it ( 1 ) on the same colors ( this is the typical scenario in RL ) , ( 2 ) on the held-out cube colors known to the representation , or ( 3 ) OOD w.r.t . the representation training distribution , e.g . on novel colors and shapes or on the real world . We closely follow the framework for measuring OOD generalization proposed by Dittadi et al . ( 2021 ) . In this framework , a representation is initially learned on a training set D , and a simple downstream model is trained on a subset D1 ⊂ D to predict the ground-truth factors from the learned representation . Generalization is then evaluated by testing the downstream model on a set D2 that differs distributionally from D1 , e.g . containing images corresponding to held-out values of a chosen factor of variation ( FoV ) . Dittadi et al . ( 2021 ) consider two flavors of OOD generalization depending on the choice of D2 : First , the case when D2 ⊂ D , i.e . the OOD test set is a subset of the dataset for representation learning . This is denoted by OOD1 and corresponds to the scenario ( 2 ) from the previous paragraph . In the other scenario , referred to as OOD2 , D and D2 are disjoint and distributionally different . This even stronger OOD shift corresponds to case ( 3 ) above . The generalization score for D2 is then measured by the ( normalized ) mean absolute prediction error across all FoVs except for the one that is OOD . Following Dittadi et al . ( 2021 ) , we use a simple 2-layer Multi-Layer Perceptron ( MLP ) for downstream factor prediction . This simple and cheap generalization metric could serve as a convenient proxy for the generalization of more expensive downstream tasks . From now on , we will report the negative error for interpretability , and decompose this metric in addition on a per-factor level . We refer to these generalization scores as GS-OOD1 , GS-OOD2-sim , and GS-OOD2-real accordingly . The focus of Dittadi et al . ( 2021 ) was to scale VAE-based learning approaches to more realistic scenarios and study the generalization of these simple downstream tasks , with a particular emphasis on disentanglement . Building upon their contributions , we can leverage the broader potential of this robotic setup with many more OOD2 scenarios to study our research questions : To what extent can agents generalize under distribution shift ? Do they generalize in different ways depending on the type of distribution shift ( including sim-to-real ) ? Can we predict the OOD generalization of downstream agents from properties of the pretrained representations such as the GS metrics from Dittadi et al . ( 2021 ) ?
The paper discusses a study of different learned autoencoder based representations in the context of generalisation (in and out of distribution) in reinforcement learning. It focuses on two types of VAE models and a robotic block reaching/pushing setting. Comparisons are performed to separately test OOD data for the representation and learned policy as well as generalisation to a real world setting after training in simulation. The analysis shows correlations between various properties and metrics and final downstream RL performance
SP:f3373b0ef10578400b8dd9cf54bf71435bd0f726
Effect of scale on catastrophic forgetting in neural networks
Continual learning is a current challenge in designing machine learning systems : when trained on multiple tasks in sequence , models tend to suffer performance losses on earlier tasks—this is known as catastrophic forgetting ( McCloskey & Cohen , 1989 ) . Catastrophic forgetting occurs in many settings , from supervised learning for classification ( Zenke et al. , 2017 ) to reinforcement learning for games ( Kirkpatrick et al. , 2017 ) and downstream applications such as translation ( Bapna & Firat , 2019 ) or medical diagnoses ( Gupta et al. , 2021 ) . While many methods have been proposed to help mitigate forgetting , none of these have fully solved the problem ; see Kemker et al . ( 2017 ) for a review . Increasing model and dataset size have been key to the success of deep learning ( Kolesnikov et al. , 2020 ; BIG-bench collaboration , 2021 ; Radford et al. , 2019 ; Zhai et al. , 2021 ) . A recent trend has been the use of increasingly large models pretrained on diverse datasets , which are subsequently fine-tuned or evaluated without fine-tuning on downstream tasks of interest ; see Bommasani et al . ( 2021 ) and references therein . A particularly striking realization of this has been large pretrained language models , which show consistent improvement across scales ( Kaplan et al. , 2020 ) and can perform well on diverse tasks with no finetuning ( Brown et al. , 2020 ) . From a continual learning perspective , this behavior is especially dramatic as , without finetuning , any training signal for these tasks appears mixed into a drastically larger pretraining dataset , and thus more than likely appeared many gradient steps before evaluation . This observation in large part inspired our work . Here , we empirically study continual learning in large pretrained models . Our results suggest that pretrained models are significantly more resistant to catastrophic forgetting than their randomlyinitialized counterparts , and that this resistance improves with the scale of both the model and pretraining data . Most of our experiments concern vision—specifically image classification ; but we also conduct a preliminary investigation of language models . Our key observations are as follows : • Resistance to catastrophic forgetting improves with model and pretraining dataset scale ( Figure 1 ) . • Large , pretrained image-classification models are significantly more resistant to forgetting than models trained from random initialization ( Figure 5 ) . • Both supervised and unsupervised , SimCLR ( Chen et al. , 2020 ) , pretraining improve forgetting ( Supplement , Figure 11 ) . • We perform initial experiments aimed at exploring why scale and pretraining reduce catastrophic forgetting , showing that distinct class representations in pretrained models are more orthogonal than in trained-from-scratch models ( Figure 8 ) . • We observe similar phenomena in language models ( Figure 9 ) . 1 RELATED WORK . Catastrophic forgetting Catastrophic forgetting was identified as a problem for neural networks as early as the late 1980s , as it occurred in the single-hidden-layer networks that were studied at the time ( see Delange et al . ( 2021 ) for a review ) . Within the catastrophic forgetting literature , a number of potential solutions to the problem have been devised ; some involve replaying previous-task examples during training on later tasks ( Rebuffi et al. , 2016 ; Lopez-Paz & Ranzato , 2017 ; Chaudhry et al. , 2018 ; Shin et al. , 2017 ; Riemer et al. , 2018 ) , while others like elastic weight consolidation ( Kirkpatrick et al. , 2017 ) limit the extent to which parameters can change once learned ( Zenke et al. , 2017 ; Lee et al. , 2017 ; Farajtabar et al. , 2019 ) . Perhaps most similar to our work are proposed mitigation methods which exploit the overparameterization of modern neural networks to perform continual learning of multiple tasks , e.g . by using pruning in Mallya & Lazebnik ( 2018 ) or task-specific subnetworks in Wortsman et al . ( 2020 ) and recent works studying the impact of pretraining Anonymous ( 2022 ) and overparameterization via network width Mirzadeh et al . ( 2021 ) on forgetting . Large-scale models The observation—initially in language models ( Kaplan et al. , 2020 ) —that model performance scales predictably with model and dataset size spurred an increased interest in training and deploying increasingly large pretrained models . Large-scale models emerged in natural-language processing with models such as GPT ( Radford et al. , 2019 ) and BERT ( Devlin et al. , 2019 ) , which are pretrained in an unsupervised manner and thus able to make use of the large corpora of natural text available on the internet . More recently , image-classification models have also benefited from pretraining on large datasets ( Kolesnikov et al. , 2020 ) , both supervised and unsupervised ; a key example is the Vision Transformer architecture of Dosovitskiy et al . ( 2020 ) , which—despite not using the inductive bias provided by convolutions—attains downstream performance comparable to convolutional networks after pretraining on ImageNet-21k ( Deng et al. , 2009 ) or JFT-300M ( Sun et al. , 2017 ) . On many current NLP and computer vision benchmarks , large pretrained models achieve top performance . All of the experiments in our work follow the pretrain-then-finetune method ; recently , another paradigm , side-tuning , was proposed by Zhang et al . ( 2020 ) , which avoids forgetting altogether by leaving the pretrained model fixed and employing auxiliary networks for downstream tasks . 2 EXPERIMENTAL SETUP . Tasks : Most of the experiments in this paper are conducted in the standard , task split setting ( Kirkpatrick et al. , 2017 ; Zenke et al. , 2017 ) . We consider split CIFAR-10 task sequences – the ten class dataset is split and sequentially trained on two tasks of 5 classes each . We also consider sequential 10 and 50 class splits of CIFAR-100 . We also consider the more recent input-distribution-shift CIFAR-100 setup ( Ramasesh et al. , 2021 ) . In this case each task has the same target types made up a fixed subset of the 20 CIFAR-100 superclasses ( e.g . aquatic mammals , fish , ... ) . The sequence of tasks consists of modifying which subclasses are sampled from . For example Task A may have aquatic mammals drawn from beaver and dolphin , while Task B may have otter and whale . This setup allows one to probe forgetting without changing the model head , in a setting where task identity is not known to the model . For our language model experiments , we consider next token prediction generative tasks and use the IMDb Reviews ( Maas et al. , 2011 ) and english Wikipedia ( Foundation ) datasets . Vision models : In most of our experiments we use the Vision Transformer ( ViT ) and ResNet architectures . For the Vision Transformers , we use the ViT-S and ViT-B configurations from Dosovitskiy et al . ( 2020 ) and a smaller configuration we call ViT-xS – ranging from 5.7-86.7 million parameters . For ResNets , we use five models : ResNet26 , ResNet50 , ResNet101 , ResNet152 , and ResNet200 – ranging from 14.0-62.6 million parameters ; as in Kolesnikov et al . ( 2020 ) , these models use group normalization ( Wu & He , 2018 ) and weight standarization ( Qiao et al. , 2019 ) in place of batch normalization . Details can be found in Tables 1 and 2 in Appendix A.1.2 . Pretraining : Unless otherwise specified , we pretrain our image models in a supervised manner on the ImageNet21k dataset , which contains approximately 14 million images in about 26000 distinct categories using the Adam optimizer ( Kingma & Ba , 2017 ) . Further details are in the Appendix . Finetuning : When fine-tuning on multiple tasks in sequence , we use the SGD optimizer with momentum β = 0.9 . The first task training employs a cosine decay schedule with a linear warmup ; later tasks in the sequence are trained with fixed learning rates . For the split-CIFAR-10 task sequences , we use a multi-head setup in which each head is initialized to zeros . 3 RESULTS . 3.1 FORGETTING IMPROVES WITH MODEL SCALE . Our main finding is that for both pretrained Vision Transformers and pretrained ResNets , catastrophic forgetting is mitigated to a large extent by scale : that is , larger models suffer less from forgetting . This is shown in Figure 1 for the two-task split CIFAR-10 sequence : Task A { airplane , automobile , bird , cat , deer } → Task B { dog , frog , horse , ship , truck } . In order to make a fair comparison , we plot the test accuracies of the model on both tasks at different steps of Task B fine-tuning for a variety of learning rates . This allows us to see , for each model , the maximum performance achievable on the new task for a given performance on the initial task . We call this the forgetting frontier . Figure 1 shows that the forgetting frontier for both ViT and ResNet models improves significantly with scale . While a 5.7M-parameter ViT-xS model loses about 6.5 % in Task A accuracy over the course of learning to perform Task B , an 86.7M-parameter ViT-B model loses less than half a percent . To put this in context , in a previous studies of split-CIFAR-10 task sequences , a ResNet18 model lost close to 40 % accuracy with no mitigation methods , 5 % when using a replay buffer , and 20 % when using elastic weight consolidation ( see Figure 1 of Ramasesh et al . ( 2021 ) for an example ) . It is also important to note that this effect of scale and pretraining on improving forgetting frontiers does not seem to be architecture-dependent . Both vision transformers—based on self-attention— and ResNets—based on convolutions—exhibit improvements in their forgetting frontiers as they grow larger , as long as they are pretrained . We see this improvement in forgetting performance beyond the simple two-task split-CIFAR-10 scenario . Across a 10-task sequence of 10-class split-CIFAR-100 tasks ( Figure 2 left ) , sequential 50-class splits of CIFAR-100 ( Figure 2 right ) , and the CIFAR-100 single-head input-distributionshift task ( Figure 3 ) , large-scale pretrained models exhibit resistance to forgetting , and continual learning ability appears to improve systematically with scale . For detailed results , scaling plots , and forgetting frontiers in the 10-task scenario , see Section B.2 in the Supplement . 3.2 DEPENDENCE ON FINETUNING DATASET . It is interesting to study how the improved resistance to forgetting with scale depends on the choice of finetuning dataset . In particular , it is worth noting that , though quite different in format , CIFAR10/100 are semantically quite similar to subsets of ImageNet21k , our pretraining set . To empirically investigate the dependence on finetuning dataset we have run additional experiments similar to those presented in Figure 1 for the Oxford Pet and Flowers , Caltech Birds , Stanford Cars , street view house numbers ( SVHN ) and DomainNet Clipart datasets . Results are shown in Figure 4 and in Figure 17 . We note in particular that SVHN classes are numerals and so distinct from ImageNet21k classes , while the Clipart dataset consists of synthetic , rather than natural images . See the Supplement for further details . 3.3 FORGETTING IN PRETRAINED MODELS VS. MODELS TRAINED FROM SCRATCH . In the previous section , we saw that the amount of catastrophic forgetting in models pretrained on large datasets decreased with increasing model size , to the point that the largest models ( ViT-B , with 86.7M parameters and ResNet200 with 62.6M parameters ) suffer very little performance loss from second-task training . In this section , we investigate whether this improvement in forgetting is simply a consequence of the improvement in performance on Task A . That is , do pretraining and scale have benefits with respect to forgetting beyond simply improving the fine-tuned performance on downstream tasks ? To check this , we compare the performance and amount of forgetting in pretrained ResNet models to models trained from scratch . We handicap the pretrained ResNets so that their maximum accuracy on on Task A matches that of the corresponding trained-from-scratch ResNet ; this is done simply by reducing the number of steps for which we fine-tune . Figure 5 shows the results of this experiment , with additional results and details in Appendix C.1 . While the trained-from-scratch ResNets achieve the same performance as their pretrained counterparts on Task A , their Task A performance degrades significantly more than the pretrained ResNets when trained on Task B ; pretrained ResNets forget less , and this improves with model scale . This result suggests that pretraining and model scale confer benefits upon models which go beyond simply improving performance . From Figure 5 it is also clear ( see also Figure 19 in the appendix , which plots the same data in a different way ) that pretraining is required to see the benefits of scale . Simply scaling up the model size in trained-from-scratch ResNets does not yield clear improvements in their forgetting performance . We focused in this section exclusively on ResNets ( rather than Vision Transformers ) because obtaining decent performance on image classification tasks with Vision Transformers seems to require pretraining . In our experiments , for example , a trained-from-scratch ViT-S model was unable to achieve better than 75 % test accuracy on five-class CIFAR-10 , while the same model , pretrained , achieved better than 98 % accuracy .
Following recent works studying the effect of model scaling on tasks such as transfer learning, this paper asks whether scaling up the size of a pretrained network also helps alleviate or minimize catastrophic forgetting. The authors use split CIFAR-10/-100 datasets (early experiments on NLP tasks are also included) and demonstrate the accuracy lost by a pretrained network when learning a set of tasks sequentially reduces with increase in model size. This result is shown to hold for both ResNets and Vision transformers. The topic is timely and the paper is well written. My main apprehensions relate to the experimental setup--due to the use of only CIFAR datasets for evaluation, which have significant class overlap with ImageNet, it may not be justified to think of learning a subset of CIFAR classes as a new task. Overall, I believe some claims are not completely validated yet, but this can be addressed by using a more appropriate experimental setting.
SP:15529a4159e8db5b440a0040fd431cedabb12ff4
Effect of scale on catastrophic forgetting in neural networks
Continual learning is a current challenge in designing machine learning systems : when trained on multiple tasks in sequence , models tend to suffer performance losses on earlier tasks—this is known as catastrophic forgetting ( McCloskey & Cohen , 1989 ) . Catastrophic forgetting occurs in many settings , from supervised learning for classification ( Zenke et al. , 2017 ) to reinforcement learning for games ( Kirkpatrick et al. , 2017 ) and downstream applications such as translation ( Bapna & Firat , 2019 ) or medical diagnoses ( Gupta et al. , 2021 ) . While many methods have been proposed to help mitigate forgetting , none of these have fully solved the problem ; see Kemker et al . ( 2017 ) for a review . Increasing model and dataset size have been key to the success of deep learning ( Kolesnikov et al. , 2020 ; BIG-bench collaboration , 2021 ; Radford et al. , 2019 ; Zhai et al. , 2021 ) . A recent trend has been the use of increasingly large models pretrained on diverse datasets , which are subsequently fine-tuned or evaluated without fine-tuning on downstream tasks of interest ; see Bommasani et al . ( 2021 ) and references therein . A particularly striking realization of this has been large pretrained language models , which show consistent improvement across scales ( Kaplan et al. , 2020 ) and can perform well on diverse tasks with no finetuning ( Brown et al. , 2020 ) . From a continual learning perspective , this behavior is especially dramatic as , without finetuning , any training signal for these tasks appears mixed into a drastically larger pretraining dataset , and thus more than likely appeared many gradient steps before evaluation . This observation in large part inspired our work . Here , we empirically study continual learning in large pretrained models . Our results suggest that pretrained models are significantly more resistant to catastrophic forgetting than their randomlyinitialized counterparts , and that this resistance improves with the scale of both the model and pretraining data . Most of our experiments concern vision—specifically image classification ; but we also conduct a preliminary investigation of language models . Our key observations are as follows : • Resistance to catastrophic forgetting improves with model and pretraining dataset scale ( Figure 1 ) . • Large , pretrained image-classification models are significantly more resistant to forgetting than models trained from random initialization ( Figure 5 ) . • Both supervised and unsupervised , SimCLR ( Chen et al. , 2020 ) , pretraining improve forgetting ( Supplement , Figure 11 ) . • We perform initial experiments aimed at exploring why scale and pretraining reduce catastrophic forgetting , showing that distinct class representations in pretrained models are more orthogonal than in trained-from-scratch models ( Figure 8 ) . • We observe similar phenomena in language models ( Figure 9 ) . 1 RELATED WORK . Catastrophic forgetting Catastrophic forgetting was identified as a problem for neural networks as early as the late 1980s , as it occurred in the single-hidden-layer networks that were studied at the time ( see Delange et al . ( 2021 ) for a review ) . Within the catastrophic forgetting literature , a number of potential solutions to the problem have been devised ; some involve replaying previous-task examples during training on later tasks ( Rebuffi et al. , 2016 ; Lopez-Paz & Ranzato , 2017 ; Chaudhry et al. , 2018 ; Shin et al. , 2017 ; Riemer et al. , 2018 ) , while others like elastic weight consolidation ( Kirkpatrick et al. , 2017 ) limit the extent to which parameters can change once learned ( Zenke et al. , 2017 ; Lee et al. , 2017 ; Farajtabar et al. , 2019 ) . Perhaps most similar to our work are proposed mitigation methods which exploit the overparameterization of modern neural networks to perform continual learning of multiple tasks , e.g . by using pruning in Mallya & Lazebnik ( 2018 ) or task-specific subnetworks in Wortsman et al . ( 2020 ) and recent works studying the impact of pretraining Anonymous ( 2022 ) and overparameterization via network width Mirzadeh et al . ( 2021 ) on forgetting . Large-scale models The observation—initially in language models ( Kaplan et al. , 2020 ) —that model performance scales predictably with model and dataset size spurred an increased interest in training and deploying increasingly large pretrained models . Large-scale models emerged in natural-language processing with models such as GPT ( Radford et al. , 2019 ) and BERT ( Devlin et al. , 2019 ) , which are pretrained in an unsupervised manner and thus able to make use of the large corpora of natural text available on the internet . More recently , image-classification models have also benefited from pretraining on large datasets ( Kolesnikov et al. , 2020 ) , both supervised and unsupervised ; a key example is the Vision Transformer architecture of Dosovitskiy et al . ( 2020 ) , which—despite not using the inductive bias provided by convolutions—attains downstream performance comparable to convolutional networks after pretraining on ImageNet-21k ( Deng et al. , 2009 ) or JFT-300M ( Sun et al. , 2017 ) . On many current NLP and computer vision benchmarks , large pretrained models achieve top performance . All of the experiments in our work follow the pretrain-then-finetune method ; recently , another paradigm , side-tuning , was proposed by Zhang et al . ( 2020 ) , which avoids forgetting altogether by leaving the pretrained model fixed and employing auxiliary networks for downstream tasks . 2 EXPERIMENTAL SETUP . Tasks : Most of the experiments in this paper are conducted in the standard , task split setting ( Kirkpatrick et al. , 2017 ; Zenke et al. , 2017 ) . We consider split CIFAR-10 task sequences – the ten class dataset is split and sequentially trained on two tasks of 5 classes each . We also consider sequential 10 and 50 class splits of CIFAR-100 . We also consider the more recent input-distribution-shift CIFAR-100 setup ( Ramasesh et al. , 2021 ) . In this case each task has the same target types made up a fixed subset of the 20 CIFAR-100 superclasses ( e.g . aquatic mammals , fish , ... ) . The sequence of tasks consists of modifying which subclasses are sampled from . For example Task A may have aquatic mammals drawn from beaver and dolphin , while Task B may have otter and whale . This setup allows one to probe forgetting without changing the model head , in a setting where task identity is not known to the model . For our language model experiments , we consider next token prediction generative tasks and use the IMDb Reviews ( Maas et al. , 2011 ) and english Wikipedia ( Foundation ) datasets . Vision models : In most of our experiments we use the Vision Transformer ( ViT ) and ResNet architectures . For the Vision Transformers , we use the ViT-S and ViT-B configurations from Dosovitskiy et al . ( 2020 ) and a smaller configuration we call ViT-xS – ranging from 5.7-86.7 million parameters . For ResNets , we use five models : ResNet26 , ResNet50 , ResNet101 , ResNet152 , and ResNet200 – ranging from 14.0-62.6 million parameters ; as in Kolesnikov et al . ( 2020 ) , these models use group normalization ( Wu & He , 2018 ) and weight standarization ( Qiao et al. , 2019 ) in place of batch normalization . Details can be found in Tables 1 and 2 in Appendix A.1.2 . Pretraining : Unless otherwise specified , we pretrain our image models in a supervised manner on the ImageNet21k dataset , which contains approximately 14 million images in about 26000 distinct categories using the Adam optimizer ( Kingma & Ba , 2017 ) . Further details are in the Appendix . Finetuning : When fine-tuning on multiple tasks in sequence , we use the SGD optimizer with momentum β = 0.9 . The first task training employs a cosine decay schedule with a linear warmup ; later tasks in the sequence are trained with fixed learning rates . For the split-CIFAR-10 task sequences , we use a multi-head setup in which each head is initialized to zeros . 3 RESULTS . 3.1 FORGETTING IMPROVES WITH MODEL SCALE . Our main finding is that for both pretrained Vision Transformers and pretrained ResNets , catastrophic forgetting is mitigated to a large extent by scale : that is , larger models suffer less from forgetting . This is shown in Figure 1 for the two-task split CIFAR-10 sequence : Task A { airplane , automobile , bird , cat , deer } → Task B { dog , frog , horse , ship , truck } . In order to make a fair comparison , we plot the test accuracies of the model on both tasks at different steps of Task B fine-tuning for a variety of learning rates . This allows us to see , for each model , the maximum performance achievable on the new task for a given performance on the initial task . We call this the forgetting frontier . Figure 1 shows that the forgetting frontier for both ViT and ResNet models improves significantly with scale . While a 5.7M-parameter ViT-xS model loses about 6.5 % in Task A accuracy over the course of learning to perform Task B , an 86.7M-parameter ViT-B model loses less than half a percent . To put this in context , in a previous studies of split-CIFAR-10 task sequences , a ResNet18 model lost close to 40 % accuracy with no mitigation methods , 5 % when using a replay buffer , and 20 % when using elastic weight consolidation ( see Figure 1 of Ramasesh et al . ( 2021 ) for an example ) . It is also important to note that this effect of scale and pretraining on improving forgetting frontiers does not seem to be architecture-dependent . Both vision transformers—based on self-attention— and ResNets—based on convolutions—exhibit improvements in their forgetting frontiers as they grow larger , as long as they are pretrained . We see this improvement in forgetting performance beyond the simple two-task split-CIFAR-10 scenario . Across a 10-task sequence of 10-class split-CIFAR-100 tasks ( Figure 2 left ) , sequential 50-class splits of CIFAR-100 ( Figure 2 right ) , and the CIFAR-100 single-head input-distributionshift task ( Figure 3 ) , large-scale pretrained models exhibit resistance to forgetting , and continual learning ability appears to improve systematically with scale . For detailed results , scaling plots , and forgetting frontiers in the 10-task scenario , see Section B.2 in the Supplement . 3.2 DEPENDENCE ON FINETUNING DATASET . It is interesting to study how the improved resistance to forgetting with scale depends on the choice of finetuning dataset . In particular , it is worth noting that , though quite different in format , CIFAR10/100 are semantically quite similar to subsets of ImageNet21k , our pretraining set . To empirically investigate the dependence on finetuning dataset we have run additional experiments similar to those presented in Figure 1 for the Oxford Pet and Flowers , Caltech Birds , Stanford Cars , street view house numbers ( SVHN ) and DomainNet Clipart datasets . Results are shown in Figure 4 and in Figure 17 . We note in particular that SVHN classes are numerals and so distinct from ImageNet21k classes , while the Clipart dataset consists of synthetic , rather than natural images . See the Supplement for further details . 3.3 FORGETTING IN PRETRAINED MODELS VS. MODELS TRAINED FROM SCRATCH . In the previous section , we saw that the amount of catastrophic forgetting in models pretrained on large datasets decreased with increasing model size , to the point that the largest models ( ViT-B , with 86.7M parameters and ResNet200 with 62.6M parameters ) suffer very little performance loss from second-task training . In this section , we investigate whether this improvement in forgetting is simply a consequence of the improvement in performance on Task A . That is , do pretraining and scale have benefits with respect to forgetting beyond simply improving the fine-tuned performance on downstream tasks ? To check this , we compare the performance and amount of forgetting in pretrained ResNet models to models trained from scratch . We handicap the pretrained ResNets so that their maximum accuracy on on Task A matches that of the corresponding trained-from-scratch ResNet ; this is done simply by reducing the number of steps for which we fine-tune . Figure 5 shows the results of this experiment , with additional results and details in Appendix C.1 . While the trained-from-scratch ResNets achieve the same performance as their pretrained counterparts on Task A , their Task A performance degrades significantly more than the pretrained ResNets when trained on Task B ; pretrained ResNets forget less , and this improves with model scale . This result suggests that pretraining and model scale confer benefits upon models which go beyond simply improving performance . From Figure 5 it is also clear ( see also Figure 19 in the appendix , which plots the same data in a different way ) that pretraining is required to see the benefits of scale . Simply scaling up the model size in trained-from-scratch ResNets does not yield clear improvements in their forgetting performance . We focused in this section exclusively on ResNets ( rather than Vision Transformers ) because obtaining decent performance on image classification tasks with Vision Transformers seems to require pretraining . In our experiments , for example , a trained-from-scratch ViT-S model was unable to achieve better than 75 % test accuracy on five-class CIFAR-10 , while the same model , pretrained , achieved better than 98 % accuracy .
The paper explores the effect of scale on catstrophic. They conduct several different experiments (for both ResNets and Vision Transformers) showing: - the size of the model for pretrained models reduces forgetting - (Longer) pretraining reduces forgetting - More pretraining training data size reduces forgetting - A metric used to measure overlap between model representations showed that pretraining results in more orthoganal representations between classes. - The length of finetuning isn't as impactful on pretrained models as randomly initialized models They perform the majority of their experiments on a two task, task incremental Split CIFAR-10 dataset. Some experiments were done on 2-task class incremental and 10-task task incremental Split CIFAR-100. They also conduct a brief set of experiments showing that scaling model size reduces forgetting for language as well.
SP:15529a4159e8db5b440a0040fd431cedabb12ff4
KINet: Keypoint Interaction Networks for Unsupervised Forward Modeling
1 INTRODUCTION . Discovering a structured causal representation of the world allows humans to perform a wide repertoire of motor tasks such as interacting with objects . At the core of this process lies the ability to predict the response of the environment to applying an action ( Miall & Wolpert , 1996 ; Wolpert & Kawato , 1998 ) . Such an internal model , often referred to as the forward model , aims to come up with an estimation of future states of the world given its current state and an action . By cascading the predictions of a forward model it is also possible to plan a sequence of actions that would bring the world from an initial state to a desired goal state ( Wolpert et al. , 1998 ; 1995 ) . Recently , various deep learning architectures have been proposed to perform forward modeling using an object-centric representation of the system ( Ye et al. , 2020 ; Chen et al. , 2021b ; Li et al. , 2020 ; Qi et al. , 2020 ) . This object-centric representation is learned from the visual observation by factorizing the scene into the underlying object instances using ground-truth object states ( e.g. , object class , position , and bounding box ) . We identified two major limitations in the recent work : First , existing approaches either assume access to the ground-truth object states ( Battaglia et al. , 2016 ; Li et al. , 2020 ) or predict them using idealized techniques such as pre-trained object detection or instance segmentation models ( Ye et al. , 2020 ; Qi et al. , 2020 ) . However , obtaining ground truth objects state information is not feasible in practice . Relying on object detection and segmentation tools , on the other hand , makes the forward model fragile and dependent on the flawless performance of these tools . More often than not , pretrained object detection or segmentation models suffer from poor generalization to unseen objects . Second , factorizing the scene into object instances limits the generalization of forward models to scenarios with a different number of objects . In this paper , we address both of these limitations by proposing to learn forward models using a keypoint-based object-centric representation . Keypoints represent a set of salient locations of moving entities . Our model KINet ( Keypoint Interaction Network ) learns unsupervised forward modeling in three major steps : ( 1 ) A keypoint extractor factorizes the scene into keypoint coordinates with no supervision other than raw visual observations . ( 2 ) A probabilistic graph representation of the system is inferred where each node corresponds to a keypoint and edges are keypoints relations . Therefore , each object is represented in this graph by at least one distinct node . Node features carry implicit object-centric representation as well as explicit keypoint state information . ( 3 ) With probabilistic message passing , our model performs physical reasoning and learns an action-conditional forward model to predict future locations of the keypoints . Using this prediction , it also reconstructs the future appearances of the system . We evaluate KINet ’ s forward prediction accuracy and demonstrate that , by learning the physical reasoning in a keypoint coordinate , our model can effectively re-purpose this knowledge and generalize it to complex unseen circumstances . Our key contributions are as follows : ( 1 ) We introduce KINet , an end-to-end method for learning unsupervised action-conditional forward models from visual observations using keypoint coordinates . ( 2 ) We introduce Probabilistic Interaction Networks for efficient message-passing in fully connected graphs by learning to adaptively aggregate a subset of relevant neighborhood information . ( 3 ) We introduce the GraphMPC algorithm for accurate action planning based on graph similarity . ( 4 ) We demonstrate that learning forward models in keypoint coordinates enables zero-shot generalization to complex unseen scenarios . 2 RELATED WORK . Unsupervised keypoint extraction methods have been used successfully in computer vision tasks such as pose tracking ( Zhang et al. , 2018 ; Yao et al. , 2019 ) and video prediction ( Minderer et al. , 2019 ; Zhang et al. , 2018 ; Xue et al. , 2016 ) . Recent work explored keypoint extraction for control tasks in reinforcement learning environments to project the visual observation space to a lowerdimensional keypoint space ( Kulkarni et al. , 2019 ; Chen et al. , 2021a ; Jakab et al. , 2018 ) . We extend these methods for the object manipulation setting . Forward prediction models estimate the future state of a system given its current state . There is a large line of work on using neural networks to build such models for various applications . These approaches date back to Nguyen & Widrow ( 1990 ) ; Grzeszczuk et al . ( 1998 ) for modeling state transition in dynamic systems . The most fundamentally relevant approach to our model is the Interaction Network ( IN ) ( Battaglia et al. , 2016 ; Sanchez-Gonzalez et al. , 2018 ) and other follow-up work on using graph neural network in forward modeling ( Pfaff et al. , 2020 ; Li et al. , 2019 ; Kipf et al. , 2018 ; Mrowca et al. , 2018 ) . Although these approaches demonstrated powerful forward modeling capabilities , they often rely on building explicit object representations based on ground-truth state information of the objects in the system . In an attempt to bridge this gap several methods have been proposed to use IN-based models using visual features extracted from image observations . ( Watters et al. , 2017 ; Qi et al. , 2020 ; Ye et al. , 2020 ) . However , two main concerns remain unaddressed in these methods . First , the visual features of objects are often extracted from object bounding boxes using pretrained object detection or segmentation model ( Janner et al. , 2018 ; Qi et al. , 2020 ; Kipf et al. , 2018 ) that is either pretrained on the environment ( Qi et al. , 2020 ) or assume prior knowledge of the object position ( Ye et al. , 2020 ) . Second , implementing these approaches entails training the model on a fixed number of objects . Learning action-conditional forward models is an active challenge although the original IN incorporates the action as an external effect by aggregating the action vector to node and edge embeddings . For the case of probabilistic forward models Henaff et al . ( 2019 ) interestingly suggests using a latent variable dropout to ensure proper conditioning of the forward model on the action information following Gal & Ghahramani ( 2016 ) . In a more relevant application to our model , Yan et al . ( 2020 ) highlighted the effectiveness of contrastive estimation ( Oord et al. , 2018 ) to learn proper plannable object-centric representations . Graph representation inference methods has been originally introduced in variational graph autoencoders by Kipf & Welling ( 2016 ) . To formulate the graph structure inference module we were also inspired by Simonovsky & Komodakis ( 2018 ) where they use a variational graph autoencoder to generate small graphs of molecular structures . More relevant to our work is Kipf et al . ( 2019 ) in which an object-level contrastive loss has been used to learn object-centric abstractions in multibody systems . However , this work is only restricted to fixed environments with oversimplified objects such as two-dimensional geometries ( Watters et al. , 2019 ; Stanić et al. , 2020 ) . In our work , we consider experimenting with more complex three-dimensional objects where the objects are randomized and replicate real-world object manipulation . 3 KEYPOINT INTERACTION NETWORKS ( KINET ) . We assume access to observational data that consists of images , actions , and resulting images after applying actions : D = { ( It , ut , It+1 ) } where It , It+1 ∈ RH×W×C are images before and after applying action and ut ∈ R4 is the action vector . Our goal is to learn a forward model that predicts future states of the system with no supervision above the observational data . In this section , we describe our approach which is composed of two main steps : learning to encode visual observations into keypoint coordinates and then learning an action-conditioned forward model in the keypoint space to reason about the system and predict its future state . 3.1 UNSUPERVISED KEYPOINT DETECTION . The keypoint detector fkp is a mapping from visual observations to a lower-dimensional set of K keypoint coordinates { xkt } k=1 ... K = fkp ( It ) . The keypoint coordinates are learned through capturing the spatial appearance of the objects in the system in an unsupervised manner . The detector design is following the idea of Kulkarni et al . ( 2019 ) ; Jakab et al . ( 2018 ) , which we extend for object manipulation setting that necessitates consideration of external actions . Specifically , The keypoint detector receives a pair of initial and current image frames ( I0 , It ) and uses a convolutional encoder to compute a K-dimensional feature map for each image Φ ( I0 ) , Φ ( It ) ∈ RH ′×W ′×K . The expected number of keypoints in the system is captured by the dimension K. Next , each keypoint feature map is marginalized into a 2D keypoint coordinate { xk0 , xkt } k=1 ... K ∈ R2 . We use a convolutional image reconstruction model frec with skip connections to inpaint the current image frame using the initial image and the predicted keypoint coordinates Ît = frec ( I0 , { xk0 , xkt } ) . With this formulation , fkp and frec create a bottleneck to encode the visual observation in a temporally consistent lower-dimensional keypoint coordinate representation which is distributed across the visual observation . 3.2 GRAPH REPRESENTATION OF SYSTEM . The primary idea of our approach is representing the system as a graph . In particular , after factorizing the system into K keypoints , we build a directed graph Gt = ( Vt , Et , At ) where keypoints become the graph nodes and their pairwise relations become the graph edges . Keypoint positional and visual information are encoded into the feature embeddings of nodes { nkt } k=1 ... K ∈ Vt and edges { eijt } ∈ Et . We also use an adjacency matrix to further specify the graph connectivity as At ∈ R|V|×|V| where { eij } ∈ E if [ At ] ij = 1 . At each timestep t the observational data is encoded into the graph . Node embeddings are an encoding of the keypoint visual features and positional information extracted in the keypoint detector { nkt } = [ xkt , Φ k t ] . Edge embeddings contain a relative positional information of the sender and receiver nodes { eijt } = [ xit − x j t , ‖xit − x j t‖22 ] as suggested by Pfaff et al . ( 2020 ) . We assume that there is no self-loop in the graph nodes ( i.e , diagonal elements in the adjacency matrix is set to 0 ) . Note that the graph representation is built on keypoints coordinates and , hence , we do not impose any prior assumption on the number of objects in the system . 3.3 PROBABILISTIC INTERACTION NETWORKS . To build a forward model we extend the recent approaches based on Graph Neural Networks ( Battaglia et al. , 2016 ; Sanchez-Gonzalez et al. , 2018 ; Pfaff et al. , 2020 ) and propose a probabilistic variation of the Interaction Networks ( IN ) . The core of the probabilistic IN is generating node-level latent variables Zt ∈ R|V|×d ( Kipf & Welling , 2016 ; Simonovsky & Komodakis , 2018 ) . The node-level prior latent variables are independently sampled from a fixed isotropic Gaussian prior distribution p ( Zt ) . During training , the posterior distribution of the latent variable is obtained from the next timestep graph , qφ ( Zt| { nkt+1 } k=1 ... K ) = fenc ( Gt+1 ) ( 1 ) We use a probablistic decoder to derive the posterior probability of the adjacency matrix given the latent variable . To build this decoder , the existance of edges in the graph is modeled as Bernoulli variables with probabilities defined as , pθ ( [ At ] ij = 1|zit , z j t ) = σ ( fdec ( Gt , Zt ) ) ( 2 ) where σ ( · ) is the sigmoid function . We propose to use the posterior adjacency matrix distribution along with the latent variables to infer a probabilistic graph representation of the system G̃t = ( Ṽt , Ẽt , Ãt ) . In particular , the inferred adjacency matrix Ãt ∼ pθ ( At|Zt ) includes the edge probabilities . The node embeddings are also appropriately aggregated with the node-level latent variables { ñkt : [ nkt , zkt ] } k=1 ... K ∈ Ṽt . The probabilistic IN forward model Ĝt+1 = ffwd ( G̃t , ut ; Zt , Ãt ) predicts the graph representation at the next timestep by taking as input the current probabilistic graph and action . The message-passing operation in the forward model can be described as , { êij } ← fe ( ñi , ñj , ẽij ) , { n̂k } ← fn ( ñk , ∑ i∈N ( k ) êik , ut ) ( 3 ) where the edge-specific function fe first updates edge embeddings , then the node-specific function fn updates node embeddings using neighboring edge information . Note that the message-passing operation takes into account the node-level latent variables and the neighborhood aggregation N ( k ) is also performed based on the probabilistic adjacency matrix . Recent models for forward prediction often rely on fully connected graphs for message passing ( Qi et al. , 2020 ; Ye et al. , 2020 ; Li et al. , 2018 ) . Our model , however , learns to dynamically sample the neighborhood of each node at each timestep conditioned on the latent variable . Intuitively , this adaptive sampling allows the network to efficiently aggregate long-range context information only by selecting the most relevant neighboring nodes . This is specifically essential in our model since keypoints could provide redundant information if they are in very close proximity .
The paper proposes a keypoint-based forward dynamics model for generalization to unseen number of objects. The model employs unsupervised keypoint extraction methods from the literature, infers probabilistic graph representations over the keypoints, and makes forward predictions by message passing. The model is evaluated on multi-object manipulation tasks. It is shown that the model prediction error is close to that of a graph net with access to groundtruth object positions. The model is also shown to converge to the goal configuration faster than the baselines.
SP:9163fcb6581b48b4abdbcb046e4b46cb0bb4d0fc
KINet: Keypoint Interaction Networks for Unsupervised Forward Modeling
1 INTRODUCTION . Discovering a structured causal representation of the world allows humans to perform a wide repertoire of motor tasks such as interacting with objects . At the core of this process lies the ability to predict the response of the environment to applying an action ( Miall & Wolpert , 1996 ; Wolpert & Kawato , 1998 ) . Such an internal model , often referred to as the forward model , aims to come up with an estimation of future states of the world given its current state and an action . By cascading the predictions of a forward model it is also possible to plan a sequence of actions that would bring the world from an initial state to a desired goal state ( Wolpert et al. , 1998 ; 1995 ) . Recently , various deep learning architectures have been proposed to perform forward modeling using an object-centric representation of the system ( Ye et al. , 2020 ; Chen et al. , 2021b ; Li et al. , 2020 ; Qi et al. , 2020 ) . This object-centric representation is learned from the visual observation by factorizing the scene into the underlying object instances using ground-truth object states ( e.g. , object class , position , and bounding box ) . We identified two major limitations in the recent work : First , existing approaches either assume access to the ground-truth object states ( Battaglia et al. , 2016 ; Li et al. , 2020 ) or predict them using idealized techniques such as pre-trained object detection or instance segmentation models ( Ye et al. , 2020 ; Qi et al. , 2020 ) . However , obtaining ground truth objects state information is not feasible in practice . Relying on object detection and segmentation tools , on the other hand , makes the forward model fragile and dependent on the flawless performance of these tools . More often than not , pretrained object detection or segmentation models suffer from poor generalization to unseen objects . Second , factorizing the scene into object instances limits the generalization of forward models to scenarios with a different number of objects . In this paper , we address both of these limitations by proposing to learn forward models using a keypoint-based object-centric representation . Keypoints represent a set of salient locations of moving entities . Our model KINet ( Keypoint Interaction Network ) learns unsupervised forward modeling in three major steps : ( 1 ) A keypoint extractor factorizes the scene into keypoint coordinates with no supervision other than raw visual observations . ( 2 ) A probabilistic graph representation of the system is inferred where each node corresponds to a keypoint and edges are keypoints relations . Therefore , each object is represented in this graph by at least one distinct node . Node features carry implicit object-centric representation as well as explicit keypoint state information . ( 3 ) With probabilistic message passing , our model performs physical reasoning and learns an action-conditional forward model to predict future locations of the keypoints . Using this prediction , it also reconstructs the future appearances of the system . We evaluate KINet ’ s forward prediction accuracy and demonstrate that , by learning the physical reasoning in a keypoint coordinate , our model can effectively re-purpose this knowledge and generalize it to complex unseen circumstances . Our key contributions are as follows : ( 1 ) We introduce KINet , an end-to-end method for learning unsupervised action-conditional forward models from visual observations using keypoint coordinates . ( 2 ) We introduce Probabilistic Interaction Networks for efficient message-passing in fully connected graphs by learning to adaptively aggregate a subset of relevant neighborhood information . ( 3 ) We introduce the GraphMPC algorithm for accurate action planning based on graph similarity . ( 4 ) We demonstrate that learning forward models in keypoint coordinates enables zero-shot generalization to complex unseen scenarios . 2 RELATED WORK . Unsupervised keypoint extraction methods have been used successfully in computer vision tasks such as pose tracking ( Zhang et al. , 2018 ; Yao et al. , 2019 ) and video prediction ( Minderer et al. , 2019 ; Zhang et al. , 2018 ; Xue et al. , 2016 ) . Recent work explored keypoint extraction for control tasks in reinforcement learning environments to project the visual observation space to a lowerdimensional keypoint space ( Kulkarni et al. , 2019 ; Chen et al. , 2021a ; Jakab et al. , 2018 ) . We extend these methods for the object manipulation setting . Forward prediction models estimate the future state of a system given its current state . There is a large line of work on using neural networks to build such models for various applications . These approaches date back to Nguyen & Widrow ( 1990 ) ; Grzeszczuk et al . ( 1998 ) for modeling state transition in dynamic systems . The most fundamentally relevant approach to our model is the Interaction Network ( IN ) ( Battaglia et al. , 2016 ; Sanchez-Gonzalez et al. , 2018 ) and other follow-up work on using graph neural network in forward modeling ( Pfaff et al. , 2020 ; Li et al. , 2019 ; Kipf et al. , 2018 ; Mrowca et al. , 2018 ) . Although these approaches demonstrated powerful forward modeling capabilities , they often rely on building explicit object representations based on ground-truth state information of the objects in the system . In an attempt to bridge this gap several methods have been proposed to use IN-based models using visual features extracted from image observations . ( Watters et al. , 2017 ; Qi et al. , 2020 ; Ye et al. , 2020 ) . However , two main concerns remain unaddressed in these methods . First , the visual features of objects are often extracted from object bounding boxes using pretrained object detection or segmentation model ( Janner et al. , 2018 ; Qi et al. , 2020 ; Kipf et al. , 2018 ) that is either pretrained on the environment ( Qi et al. , 2020 ) or assume prior knowledge of the object position ( Ye et al. , 2020 ) . Second , implementing these approaches entails training the model on a fixed number of objects . Learning action-conditional forward models is an active challenge although the original IN incorporates the action as an external effect by aggregating the action vector to node and edge embeddings . For the case of probabilistic forward models Henaff et al . ( 2019 ) interestingly suggests using a latent variable dropout to ensure proper conditioning of the forward model on the action information following Gal & Ghahramani ( 2016 ) . In a more relevant application to our model , Yan et al . ( 2020 ) highlighted the effectiveness of contrastive estimation ( Oord et al. , 2018 ) to learn proper plannable object-centric representations . Graph representation inference methods has been originally introduced in variational graph autoencoders by Kipf & Welling ( 2016 ) . To formulate the graph structure inference module we were also inspired by Simonovsky & Komodakis ( 2018 ) where they use a variational graph autoencoder to generate small graphs of molecular structures . More relevant to our work is Kipf et al . ( 2019 ) in which an object-level contrastive loss has been used to learn object-centric abstractions in multibody systems . However , this work is only restricted to fixed environments with oversimplified objects such as two-dimensional geometries ( Watters et al. , 2019 ; Stanić et al. , 2020 ) . In our work , we consider experimenting with more complex three-dimensional objects where the objects are randomized and replicate real-world object manipulation . 3 KEYPOINT INTERACTION NETWORKS ( KINET ) . We assume access to observational data that consists of images , actions , and resulting images after applying actions : D = { ( It , ut , It+1 ) } where It , It+1 ∈ RH×W×C are images before and after applying action and ut ∈ R4 is the action vector . Our goal is to learn a forward model that predicts future states of the system with no supervision above the observational data . In this section , we describe our approach which is composed of two main steps : learning to encode visual observations into keypoint coordinates and then learning an action-conditioned forward model in the keypoint space to reason about the system and predict its future state . 3.1 UNSUPERVISED KEYPOINT DETECTION . The keypoint detector fkp is a mapping from visual observations to a lower-dimensional set of K keypoint coordinates { xkt } k=1 ... K = fkp ( It ) . The keypoint coordinates are learned through capturing the spatial appearance of the objects in the system in an unsupervised manner . The detector design is following the idea of Kulkarni et al . ( 2019 ) ; Jakab et al . ( 2018 ) , which we extend for object manipulation setting that necessitates consideration of external actions . Specifically , The keypoint detector receives a pair of initial and current image frames ( I0 , It ) and uses a convolutional encoder to compute a K-dimensional feature map for each image Φ ( I0 ) , Φ ( It ) ∈ RH ′×W ′×K . The expected number of keypoints in the system is captured by the dimension K. Next , each keypoint feature map is marginalized into a 2D keypoint coordinate { xk0 , xkt } k=1 ... K ∈ R2 . We use a convolutional image reconstruction model frec with skip connections to inpaint the current image frame using the initial image and the predicted keypoint coordinates Ît = frec ( I0 , { xk0 , xkt } ) . With this formulation , fkp and frec create a bottleneck to encode the visual observation in a temporally consistent lower-dimensional keypoint coordinate representation which is distributed across the visual observation . 3.2 GRAPH REPRESENTATION OF SYSTEM . The primary idea of our approach is representing the system as a graph . In particular , after factorizing the system into K keypoints , we build a directed graph Gt = ( Vt , Et , At ) where keypoints become the graph nodes and their pairwise relations become the graph edges . Keypoint positional and visual information are encoded into the feature embeddings of nodes { nkt } k=1 ... K ∈ Vt and edges { eijt } ∈ Et . We also use an adjacency matrix to further specify the graph connectivity as At ∈ R|V|×|V| where { eij } ∈ E if [ At ] ij = 1 . At each timestep t the observational data is encoded into the graph . Node embeddings are an encoding of the keypoint visual features and positional information extracted in the keypoint detector { nkt } = [ xkt , Φ k t ] . Edge embeddings contain a relative positional information of the sender and receiver nodes { eijt } = [ xit − x j t , ‖xit − x j t‖22 ] as suggested by Pfaff et al . ( 2020 ) . We assume that there is no self-loop in the graph nodes ( i.e , diagonal elements in the adjacency matrix is set to 0 ) . Note that the graph representation is built on keypoints coordinates and , hence , we do not impose any prior assumption on the number of objects in the system . 3.3 PROBABILISTIC INTERACTION NETWORKS . To build a forward model we extend the recent approaches based on Graph Neural Networks ( Battaglia et al. , 2016 ; Sanchez-Gonzalez et al. , 2018 ; Pfaff et al. , 2020 ) and propose a probabilistic variation of the Interaction Networks ( IN ) . The core of the probabilistic IN is generating node-level latent variables Zt ∈ R|V|×d ( Kipf & Welling , 2016 ; Simonovsky & Komodakis , 2018 ) . The node-level prior latent variables are independently sampled from a fixed isotropic Gaussian prior distribution p ( Zt ) . During training , the posterior distribution of the latent variable is obtained from the next timestep graph , qφ ( Zt| { nkt+1 } k=1 ... K ) = fenc ( Gt+1 ) ( 1 ) We use a probablistic decoder to derive the posterior probability of the adjacency matrix given the latent variable . To build this decoder , the existance of edges in the graph is modeled as Bernoulli variables with probabilities defined as , pθ ( [ At ] ij = 1|zit , z j t ) = σ ( fdec ( Gt , Zt ) ) ( 2 ) where σ ( · ) is the sigmoid function . We propose to use the posterior adjacency matrix distribution along with the latent variables to infer a probabilistic graph representation of the system G̃t = ( Ṽt , Ẽt , Ãt ) . In particular , the inferred adjacency matrix Ãt ∼ pθ ( At|Zt ) includes the edge probabilities . The node embeddings are also appropriately aggregated with the node-level latent variables { ñkt : [ nkt , zkt ] } k=1 ... K ∈ Ṽt . The probabilistic IN forward model Ĝt+1 = ffwd ( G̃t , ut ; Zt , Ãt ) predicts the graph representation at the next timestep by taking as input the current probabilistic graph and action . The message-passing operation in the forward model can be described as , { êij } ← fe ( ñi , ñj , ẽij ) , { n̂k } ← fn ( ñk , ∑ i∈N ( k ) êik , ut ) ( 3 ) where the edge-specific function fe first updates edge embeddings , then the node-specific function fn updates node embeddings using neighboring edge information . Note that the message-passing operation takes into account the node-level latent variables and the neighborhood aggregation N ( k ) is also performed based on the probabilistic adjacency matrix . Recent models for forward prediction often rely on fully connected graphs for message passing ( Qi et al. , 2020 ; Ye et al. , 2020 ; Li et al. , 2018 ) . Our model , however , learns to dynamically sample the neighborhood of each node at each timestep conditioned on the latent variable . Intuitively , this adaptive sampling allows the network to efficiently aggregate long-range context information only by selecting the most relevant neighboring nodes . This is specifically essential in our model since keypoints could provide redundant information if they are in very close proximity .
**The main idea of the paper** This paper combines two powerful ideas, 1. unsupervised keypoint extraction for objects and 2. object-centric representation for forward modeling. KINET first detects objects' key points in the video in an unsupervised manner and extract object-centric representation for future prediction. Experiments are conducted in a new dataset built on MuJoCo and the performance in table 1 shows the proposed framework achieves better performance than the baseline methods.
SP:9163fcb6581b48b4abdbcb046e4b46cb0bb4d0fc
Iterative Refinement Graph Neural Network for Antibody Sequence-Structure Co-design
1 INTRODUCTION . Monoclonal antibodies are increasingly adopted as therapeutics targeting a wide range of pathogens such as SARS-CoV-2 ( Pinto et al. , 2020 ) . Since the binding specificity of these Y-shaped proteins is largely determined by their complementarity-determining regions ( CDRs ) , the main goal of computational antibody design is to automate the creation of CDR subsequences with desired properties . This problem is particularly challenging due to the combinatorial search space of over 2060 possible CDR sequences and the small solution space which satisfies the desired constraints of binding affinity , stability , and synthesizability ( Raybould et al. , 2019 ) . There are three key modeling questions in CDR generation . The first is how to model the relation between a sequence and its underlying 3D structure . Generating sequences without the corresponding structure ( Alley et al. , 2019 ; Shin et al. , 2021 ) can lead to sub-optimal performance ( Ingraham et al. , 2019 ) , while generating from a predefined 3D structure ( Ingraham et al. , 2019 ) is not suitable for antibodies since the desired structure is rarely known a priori ( Fischman & Ofran , 2018 ) . Therefore , it is crucial to develop models that co-design the sequence and structure . The second question is how to model the conditional distribution of CDRs given the remainder of a sequence ( context ) . Attention-based methods only model the conditional dependence at the sequence level , but the structural interaction between the CDR and its context is crucial for generation . The last question relates to the model ’ s ability to optimize for various properties . Traditional physics-based methods ( Lapidoth et al. , 2015 ; Adolf-Bryfogle et al. , 2018 ) focus on binding energy minimization , but in practice , our objective can be much more involved than binding energies ( Liu et al. , 2020 ) . In this paper , we represent a sequence-structure pair as a graph and formulate the co-design task as a graph generation problem . The graph representation allows us to model the conditional dependence between a CDR and its context at both the sequence and structure levels . Antibody graph generation poses unique challenges because the global structure is expected to change when new nodes are inserted . Previous autoregressive models ( You et al. , 2018 ; Gebauer et al. , 2019 ) can not modify a generated structure because they are trained under teacher forcing . Thus errors made in the previous steps can lead to a cascade of errors in subsequent generation steps . To address these problems , we propose a novel architecture which interleaves the generation of amino acid nodes with the prediction of 3D structures . The structure generation is based on an iterative refinement of a global graph rather than a sequential expansion of a partial graph with teacher forcing . Since the context sequence is long , we further introduce a coarsened graph representation by grouping nodes into blocks . We apply graph convolution at a coarser level to efficiently propagate the contextual information to the CDR residues . After pretraining our model on antibodies with known structures , we finetune it using a predefined property predictor to generate antibodies with specific properties . We evaluate our method on three generation tasks , ranging from language modeling to SARS-CoV-2 neutralization optimization and antigen-binding antibody design . Our method is compared with a standard sequence model ( Saka et al. , 2021 ; Akbar et al. , 2021 ) and a state-of-the-art graph generation method ( You et al. , 2018 ) tailored to antibodies . Our method not only achieves lower perplexity on test sequences but also outperforms previous baselines in property-guided antibody design tasks . 2 RELATED WORK . Antibody/protein design . Current methods for computational antibody design roughly fall into two categories . The first class is based on energy function optimization ( Pantazes & Maranas , 2010 ; Li et al. , 2014 ; Lapidoth et al. , 2015 ; Adolf-Bryfogle et al. , 2018 ) , which use Monte Carlo simulation to iteratively modify a sequence and its structure until reaching a local energy minimum . Similar approaches are used in protein design ( Leaver-Fay et al. , 2011 ; Tischer et al. , 2020 ) . Nevertheless , these physics-based methods are computationally expensive ( Ingraham et al. , 2019 ) and our desired objective can be much more complicated than low binding energy ( Liu et al. , 2020 ) . The second class is based on generative models . For antibodies , they are mostly sequence-based ( Alley et al. , 2019 ; Shin et al. , 2021 ; Saka et al. , 2021 ; Akbar et al. , 2021 ) . For proteins , O ’ Connell et al . ( 2018 ) ; Ingraham et al . ( 2019 ) ; Strokach et al . ( 2020 ) ; Karimi et al . ( 2020 ) ; Cao et al . ( 2021 ) further developed models conditioned on a backbone structure or protein fold . Our model also seeks to incorporate 3D structure information for antibody generation . Since the best CDR structures are often unknown for new pathogens , we co-design sequences and structures for specific properties . Generative models for graphs . Our work is related to autoregressive models for graph generation ( You et al. , 2018 ; Li et al. , 2018 ; Liu et al. , 2018 ; Liao et al. , 2019 ; Jin et al. , 2020a ) . In particular , Gebauer et al . ( 2019 ) developed G-SchNet for molecular graph and conformation co-design . Unlike our method , they generate edges sequentially and can not modify a previously generated subgraph when new nodes arrive . While Graphite ( Grover et al. , 2019 ) also uses iterative refinement to predict the adjacency matrix of a graph , it assumes all the node labels are given and predicts edges only . In contrast , our work combines autoregressive models with iterative refinement to generate a full graph with node and edge labels , including node labels and coordinates . 3D structure prediction . Our approach is closely related to protein folding ( Ingraham et al. , 2018 ; Yang et al. , 2020a ; Baek et al. , 2021 ; Jumper et al. , 2021 ) . Inputs to the state-of-the-art models like AlphaFold require a complete protein sequence , its multi-sequence alignment ( MSA ) , and its template features . These models are not directly applicable because we need to predict the structure of an incomplete sequence and the MSA is not specified in advance . Our iterative refinement model is also related to score matching methods for molecular conformation prediction ( Shi et al. , 2021 ) and diffusion-based methods for point clouds ( Luo & Hu , 2021 ) . These algorithms also iteratively refine a predicted 3D structure , but only for a complete molecule or point cloud . In contrast , our approach learns to predict the 3D structure for incomplete graphs and interleaves 3D structure refinement with graph generation . 3 ANTIBODY SEQUENCE AND STRUCTURE CO-DESIGN . Overview . The role of an antibody is to bind to an antigen ( e.g . a virus ) , present it to the immune system , and stimulate an immune response . A subset of antibodies known as neutralizing antibodies not only bind to an antigen but can also suppress its activity . An antibody consists of a heavy chain and a light chain , each composed of one variable domain ( VH/VL ) and some constant domains . The variable domain is further divided into a framework region and three complementarity determining regions ( CDRs ) . The three CDRs on the heavy chain are labeled as CDR-H1 , CDR-H2 , CDR-H3 , each occupying a contiguous subsequence ( Figure 1 ) . As the most variable part of an antibody , CDRs are the main determinants of binding and neutralization ( Abbas et al. , 2014 ) . Following Shin et al . ( 2021 ) ; Akbar et al . ( 2021 ) , we formulate antibody design as a CDR generation task , conditioned on the framework region . Specifically , we represent an antibody as a graph , which encodes both its sequence and 3D structure . We propose a new graph generation approach called RefineGNN and extend it to handle conditional generation given a fixed framework region . Lastly , we describe how to apply RefineGNN to property-guided optimization to design new antibodies with better neutralization properties . For simplicity , we focus on the generation of heavy chain CDRs , though our method can be easily extended to model light chains CDRs . Notations . An antibody VH domain is represented as a sequence of amino acids s = s1s2 · · · sn . Each token si in the sequence is called a residue , whose value can be either one of the 20 amino acids or a special token 〈MASK〉 , meaning that its amino acid type is unknown and needs to be predicted . The VH sequence folds into a 3D structure and each residue si is labeled with three backbone coordinates : xi , α for its alpha carbon atom , xi , c for its carbon atom , and xi , n for its nitrogen atom . 3.1 GRAPH REPRESENTATION . We represent an antibody ( VH ) as a graph G ( s ) = ( V , E ) with node features V = { v1 , · · · , vn } and edge features E = { eij } i 6=j . Each node feature vi encodes three dihedral angles ( φi , ψi , ωi ) related to three backbone coordinates of residue i . For each residue i , we compute an orientation matrix Oi representing its local coordinate frame ( Ingraham et al. , 2019 ) ( defined in the appendix ) . This allows us to compute edge features describing the spatial relationship between two residues i and j ( i.e . distance and orientation ) as follows eij = ( Epos ( i− j ) , RBF ( ‖xi , α − xj , α‖ ) , O > i xj , α − xi , α ‖xi , ,α − xj , ,α‖ , q ( O > i Oj ) ) . ( 1 ) The edge feature eij contains four parts . The positional encoding Epos ( i − j ) encodes the relative distance between two residues in an antibody sequence . The second term RBF ( · ) is a distance encoding lifted into radial basis . The third term in eij is a direction encoding that corresponds to the relative direction of xj in the local frame of residue i . The last term q ( O > i Oj ) is the orientation encoding of the quaternion representation q ( · ) of the spatial rotation matrix O > i Oj . We only include edges in the K-nearest neighbors graph of G ( s ) with K = 8 . For notation convenience , we use G as a shorthand for G ( s ) when there is no ambiguity . 3.2 ITERATIVE REFINEMENT GRAPH NEURAL NETWORK ( REFINEGNN ) . We propose to generate an antibody graph via an iterative refinement process . Let G ( 0 ) be the initial guess of the true antibody graph . Each residue is initialized as a special token 〈MASK〉 and each edge ( i , j ) is initialized to be of distance 3|i− j| since the average distance between consecutive residues is around three . The direction and orientation features are set to zero . In each generation step t , the model learns to revise a current antibody graph G ( t ) and predict the label of the next residue t + 1 . Specifically , it first encodes G ( t ) with a message passing network ( MPN ) with parameter θ { h ( t ) 1 , · · · , h ( t ) n } = MPNθ ( G ( t ) ) , ( 2 ) where h ( t ) i is a learned representation of residue i under the current graph G ( t ) . Our MPN consists of L message passing layers with the following architecture h ( t , l+1 ) i = LayerNorm ( ∑ j FFN ( h ( t , l ) i , h ( t , l ) j , E ( sj ) , ei , j ) ) , 0 ≤ l ≤ L− 1 , ( 3 ) where h ( t,0 ) i = vi and h ( t ) i = h ( t , L ) i . FFN is a two-layer feed-forward network ( FFN ) with ReLU activation function . E ( sj ) is a learned embedding of amino acid type sj . Based on the learned residue representations , we predict the amino acid type of the next residue t+ 1 ( Figure 2A ) . pt+1 = softmax ( Wah ( t ) t+1 ) ( 4 ) This prediction gives us a new graph G ( t+0.5 ) with the same edges as G ( t ) but the node label of t+ 1 is changed ( Figure 2B ) . Next , we need to update the structure to accommodate the new residue t+1 . To this end , we encode graph G ( t+0.5 ) by another MPN with a different parameter θ̃ and predict the coordinate of all residues . { h ( t+0.5 ) 1 , · · · , h ( t+0.5 ) n } = MPNθ̃ ( G ( t+0.5 ) ) ( 5 ) x ( t+1 ) i , e = W e xh ( t+0.5 ) i , 1 ≤ i ≤ n , e ∈ { α , c , n } . ( 6 ) The new coordinates x ( t+1 ) i define a new antibody graph G ( t+1 ) for the next iteration ( Figure 2C ) . We explicitly realize the coordinates of each residue because we need to calculate the spatial edge features for G ( t+1 ) . The structure prediction ( coordinates xi ) and sequence prediction ( amino acid types pt+1 ) are carried out by two different MPNs , namely the structure network θ̃ and sequence network θ . This disentanglement allows the two networks to focus on two distinct tasks . Training . During training , we only apply teacher forcing to the discrete amino acid type prediction . Specifically , in each generation step t , residues 1 to t are set to their ground truth amino acid types s1 , · · · , st , while all future residues t+ 1 , · · · , n are set to a padding token . In contrast , the continuous structure prediction is carried out without teacher forcing . In each iteration , the model refines the entire structure predicted in the previous step and constructs a new K-nearest neighbors graph G ( t+1 ) of all residues based on the predicted coordinates { x ( t+1 ) i , e | 1 ≤ i ≤ n , e ∈ { α , c , n } } . Loss function . Our model remains rotation and translation invariant because the loss function is computed over pairwise distance and angles rather than coordinates . The loss function for antibody structure prediction consists of three parts . • Distance loss : For each residue pair i , j , we compute its pairwise distance between the predicted alpha carbons x ( t ) i , α , x ( t ) j , α . We define the distance loss as the Huber loss between the predicted and true pairwise distances L ( t ) d = ∑ i , j ` huber ( ‖x ( t ) i , α − x ( t ) j , α‖ 2 , ‖xi , α − xj , α‖2 ) , ( 7 ) where distance is squared to avoid the square root operation which causes numerical instability . • Dihedral angle loss : For each residue , we calculate its dihedral angle ( φ ( t ) i , ψ ( t ) i , ω ( t ) i ) based on the predicted atom coordinates x ( t ) i , α , x ( t ) i , c , x ( t ) i , n and x ( t ) i+1 , α , x ( t ) i+1 , c , x ( t ) i+1 , n . We define the dihedral angle loss as the mean square error between the predicted and true dihedral angles L ( t ) a = ∑ i ∑ a∈ { φ , ψ , ω } ( cos a ( t ) i − cos ai ) 2 + ( sin a ( t ) i − sin ai ) 2 ( 8 ) • Cα angle loss : We calculate angles γ ( t ) i between two vectors x ( t ) i−1 , α − x ( t ) i , α and x ( t ) i , α − x ( t ) i+1 , α as well as dihedral angles β ( t ) i between two planes defined by x ( t ) i−2 , α , x ( t ) i−1 , α , x ( t ) i , α , x ( t ) i+1 , α . L ( t ) c = ∑ i ( cos γ ( t ) i − cos γi ) 2 + ( cosβ ( t ) i − cosβi ) 2 ( 9 ) In summary , the overall graph generation loss is defined as L = Lseq + Lstruct , where Lstruct = ∑ t L ( t ) d + L ( t ) a + L ( t ) c Lseq = ∑ t Lce ( pt , st ) . ( 10 ) The sequence prediction loss Lseq is the cross entropy Lce between predicted and true residue types .
The paper proposed a deep generative model named iterative refinement graph neural network to generate antibody CDR for Y-shaped antibodies. Specifically, it sequentially generates the CDR residue sequence and refines the global structure iteratively. Empirical results show superior performance compared with baselines.
SP:0337a1d600cc90bd0591d8792102a4486dc03d91
Iterative Refinement Graph Neural Network for Antibody Sequence-Structure Co-design
1 INTRODUCTION . Monoclonal antibodies are increasingly adopted as therapeutics targeting a wide range of pathogens such as SARS-CoV-2 ( Pinto et al. , 2020 ) . Since the binding specificity of these Y-shaped proteins is largely determined by their complementarity-determining regions ( CDRs ) , the main goal of computational antibody design is to automate the creation of CDR subsequences with desired properties . This problem is particularly challenging due to the combinatorial search space of over 2060 possible CDR sequences and the small solution space which satisfies the desired constraints of binding affinity , stability , and synthesizability ( Raybould et al. , 2019 ) . There are three key modeling questions in CDR generation . The first is how to model the relation between a sequence and its underlying 3D structure . Generating sequences without the corresponding structure ( Alley et al. , 2019 ; Shin et al. , 2021 ) can lead to sub-optimal performance ( Ingraham et al. , 2019 ) , while generating from a predefined 3D structure ( Ingraham et al. , 2019 ) is not suitable for antibodies since the desired structure is rarely known a priori ( Fischman & Ofran , 2018 ) . Therefore , it is crucial to develop models that co-design the sequence and structure . The second question is how to model the conditional distribution of CDRs given the remainder of a sequence ( context ) . Attention-based methods only model the conditional dependence at the sequence level , but the structural interaction between the CDR and its context is crucial for generation . The last question relates to the model ’ s ability to optimize for various properties . Traditional physics-based methods ( Lapidoth et al. , 2015 ; Adolf-Bryfogle et al. , 2018 ) focus on binding energy minimization , but in practice , our objective can be much more involved than binding energies ( Liu et al. , 2020 ) . In this paper , we represent a sequence-structure pair as a graph and formulate the co-design task as a graph generation problem . The graph representation allows us to model the conditional dependence between a CDR and its context at both the sequence and structure levels . Antibody graph generation poses unique challenges because the global structure is expected to change when new nodes are inserted . Previous autoregressive models ( You et al. , 2018 ; Gebauer et al. , 2019 ) can not modify a generated structure because they are trained under teacher forcing . Thus errors made in the previous steps can lead to a cascade of errors in subsequent generation steps . To address these problems , we propose a novel architecture which interleaves the generation of amino acid nodes with the prediction of 3D structures . The structure generation is based on an iterative refinement of a global graph rather than a sequential expansion of a partial graph with teacher forcing . Since the context sequence is long , we further introduce a coarsened graph representation by grouping nodes into blocks . We apply graph convolution at a coarser level to efficiently propagate the contextual information to the CDR residues . After pretraining our model on antibodies with known structures , we finetune it using a predefined property predictor to generate antibodies with specific properties . We evaluate our method on three generation tasks , ranging from language modeling to SARS-CoV-2 neutralization optimization and antigen-binding antibody design . Our method is compared with a standard sequence model ( Saka et al. , 2021 ; Akbar et al. , 2021 ) and a state-of-the-art graph generation method ( You et al. , 2018 ) tailored to antibodies . Our method not only achieves lower perplexity on test sequences but also outperforms previous baselines in property-guided antibody design tasks . 2 RELATED WORK . Antibody/protein design . Current methods for computational antibody design roughly fall into two categories . The first class is based on energy function optimization ( Pantazes & Maranas , 2010 ; Li et al. , 2014 ; Lapidoth et al. , 2015 ; Adolf-Bryfogle et al. , 2018 ) , which use Monte Carlo simulation to iteratively modify a sequence and its structure until reaching a local energy minimum . Similar approaches are used in protein design ( Leaver-Fay et al. , 2011 ; Tischer et al. , 2020 ) . Nevertheless , these physics-based methods are computationally expensive ( Ingraham et al. , 2019 ) and our desired objective can be much more complicated than low binding energy ( Liu et al. , 2020 ) . The second class is based on generative models . For antibodies , they are mostly sequence-based ( Alley et al. , 2019 ; Shin et al. , 2021 ; Saka et al. , 2021 ; Akbar et al. , 2021 ) . For proteins , O ’ Connell et al . ( 2018 ) ; Ingraham et al . ( 2019 ) ; Strokach et al . ( 2020 ) ; Karimi et al . ( 2020 ) ; Cao et al . ( 2021 ) further developed models conditioned on a backbone structure or protein fold . Our model also seeks to incorporate 3D structure information for antibody generation . Since the best CDR structures are often unknown for new pathogens , we co-design sequences and structures for specific properties . Generative models for graphs . Our work is related to autoregressive models for graph generation ( You et al. , 2018 ; Li et al. , 2018 ; Liu et al. , 2018 ; Liao et al. , 2019 ; Jin et al. , 2020a ) . In particular , Gebauer et al . ( 2019 ) developed G-SchNet for molecular graph and conformation co-design . Unlike our method , they generate edges sequentially and can not modify a previously generated subgraph when new nodes arrive . While Graphite ( Grover et al. , 2019 ) also uses iterative refinement to predict the adjacency matrix of a graph , it assumes all the node labels are given and predicts edges only . In contrast , our work combines autoregressive models with iterative refinement to generate a full graph with node and edge labels , including node labels and coordinates . 3D structure prediction . Our approach is closely related to protein folding ( Ingraham et al. , 2018 ; Yang et al. , 2020a ; Baek et al. , 2021 ; Jumper et al. , 2021 ) . Inputs to the state-of-the-art models like AlphaFold require a complete protein sequence , its multi-sequence alignment ( MSA ) , and its template features . These models are not directly applicable because we need to predict the structure of an incomplete sequence and the MSA is not specified in advance . Our iterative refinement model is also related to score matching methods for molecular conformation prediction ( Shi et al. , 2021 ) and diffusion-based methods for point clouds ( Luo & Hu , 2021 ) . These algorithms also iteratively refine a predicted 3D structure , but only for a complete molecule or point cloud . In contrast , our approach learns to predict the 3D structure for incomplete graphs and interleaves 3D structure refinement with graph generation . 3 ANTIBODY SEQUENCE AND STRUCTURE CO-DESIGN . Overview . The role of an antibody is to bind to an antigen ( e.g . a virus ) , present it to the immune system , and stimulate an immune response . A subset of antibodies known as neutralizing antibodies not only bind to an antigen but can also suppress its activity . An antibody consists of a heavy chain and a light chain , each composed of one variable domain ( VH/VL ) and some constant domains . The variable domain is further divided into a framework region and three complementarity determining regions ( CDRs ) . The three CDRs on the heavy chain are labeled as CDR-H1 , CDR-H2 , CDR-H3 , each occupying a contiguous subsequence ( Figure 1 ) . As the most variable part of an antibody , CDRs are the main determinants of binding and neutralization ( Abbas et al. , 2014 ) . Following Shin et al . ( 2021 ) ; Akbar et al . ( 2021 ) , we formulate antibody design as a CDR generation task , conditioned on the framework region . Specifically , we represent an antibody as a graph , which encodes both its sequence and 3D structure . We propose a new graph generation approach called RefineGNN and extend it to handle conditional generation given a fixed framework region . Lastly , we describe how to apply RefineGNN to property-guided optimization to design new antibodies with better neutralization properties . For simplicity , we focus on the generation of heavy chain CDRs , though our method can be easily extended to model light chains CDRs . Notations . An antibody VH domain is represented as a sequence of amino acids s = s1s2 · · · sn . Each token si in the sequence is called a residue , whose value can be either one of the 20 amino acids or a special token 〈MASK〉 , meaning that its amino acid type is unknown and needs to be predicted . The VH sequence folds into a 3D structure and each residue si is labeled with three backbone coordinates : xi , α for its alpha carbon atom , xi , c for its carbon atom , and xi , n for its nitrogen atom . 3.1 GRAPH REPRESENTATION . We represent an antibody ( VH ) as a graph G ( s ) = ( V , E ) with node features V = { v1 , · · · , vn } and edge features E = { eij } i 6=j . Each node feature vi encodes three dihedral angles ( φi , ψi , ωi ) related to three backbone coordinates of residue i . For each residue i , we compute an orientation matrix Oi representing its local coordinate frame ( Ingraham et al. , 2019 ) ( defined in the appendix ) . This allows us to compute edge features describing the spatial relationship between two residues i and j ( i.e . distance and orientation ) as follows eij = ( Epos ( i− j ) , RBF ( ‖xi , α − xj , α‖ ) , O > i xj , α − xi , α ‖xi , ,α − xj , ,α‖ , q ( O > i Oj ) ) . ( 1 ) The edge feature eij contains four parts . The positional encoding Epos ( i − j ) encodes the relative distance between two residues in an antibody sequence . The second term RBF ( · ) is a distance encoding lifted into radial basis . The third term in eij is a direction encoding that corresponds to the relative direction of xj in the local frame of residue i . The last term q ( O > i Oj ) is the orientation encoding of the quaternion representation q ( · ) of the spatial rotation matrix O > i Oj . We only include edges in the K-nearest neighbors graph of G ( s ) with K = 8 . For notation convenience , we use G as a shorthand for G ( s ) when there is no ambiguity . 3.2 ITERATIVE REFINEMENT GRAPH NEURAL NETWORK ( REFINEGNN ) . We propose to generate an antibody graph via an iterative refinement process . Let G ( 0 ) be the initial guess of the true antibody graph . Each residue is initialized as a special token 〈MASK〉 and each edge ( i , j ) is initialized to be of distance 3|i− j| since the average distance between consecutive residues is around three . The direction and orientation features are set to zero . In each generation step t , the model learns to revise a current antibody graph G ( t ) and predict the label of the next residue t + 1 . Specifically , it first encodes G ( t ) with a message passing network ( MPN ) with parameter θ { h ( t ) 1 , · · · , h ( t ) n } = MPNθ ( G ( t ) ) , ( 2 ) where h ( t ) i is a learned representation of residue i under the current graph G ( t ) . Our MPN consists of L message passing layers with the following architecture h ( t , l+1 ) i = LayerNorm ( ∑ j FFN ( h ( t , l ) i , h ( t , l ) j , E ( sj ) , ei , j ) ) , 0 ≤ l ≤ L− 1 , ( 3 ) where h ( t,0 ) i = vi and h ( t ) i = h ( t , L ) i . FFN is a two-layer feed-forward network ( FFN ) with ReLU activation function . E ( sj ) is a learned embedding of amino acid type sj . Based on the learned residue representations , we predict the amino acid type of the next residue t+ 1 ( Figure 2A ) . pt+1 = softmax ( Wah ( t ) t+1 ) ( 4 ) This prediction gives us a new graph G ( t+0.5 ) with the same edges as G ( t ) but the node label of t+ 1 is changed ( Figure 2B ) . Next , we need to update the structure to accommodate the new residue t+1 . To this end , we encode graph G ( t+0.5 ) by another MPN with a different parameter θ̃ and predict the coordinate of all residues . { h ( t+0.5 ) 1 , · · · , h ( t+0.5 ) n } = MPNθ̃ ( G ( t+0.5 ) ) ( 5 ) x ( t+1 ) i , e = W e xh ( t+0.5 ) i , 1 ≤ i ≤ n , e ∈ { α , c , n } . ( 6 ) The new coordinates x ( t+1 ) i define a new antibody graph G ( t+1 ) for the next iteration ( Figure 2C ) . We explicitly realize the coordinates of each residue because we need to calculate the spatial edge features for G ( t+1 ) . The structure prediction ( coordinates xi ) and sequence prediction ( amino acid types pt+1 ) are carried out by two different MPNs , namely the structure network θ̃ and sequence network θ . This disentanglement allows the two networks to focus on two distinct tasks . Training . During training , we only apply teacher forcing to the discrete amino acid type prediction . Specifically , in each generation step t , residues 1 to t are set to their ground truth amino acid types s1 , · · · , st , while all future residues t+ 1 , · · · , n are set to a padding token . In contrast , the continuous structure prediction is carried out without teacher forcing . In each iteration , the model refines the entire structure predicted in the previous step and constructs a new K-nearest neighbors graph G ( t+1 ) of all residues based on the predicted coordinates { x ( t+1 ) i , e | 1 ≤ i ≤ n , e ∈ { α , c , n } } . Loss function . Our model remains rotation and translation invariant because the loss function is computed over pairwise distance and angles rather than coordinates . The loss function for antibody structure prediction consists of three parts . • Distance loss : For each residue pair i , j , we compute its pairwise distance between the predicted alpha carbons x ( t ) i , α , x ( t ) j , α . We define the distance loss as the Huber loss between the predicted and true pairwise distances L ( t ) d = ∑ i , j ` huber ( ‖x ( t ) i , α − x ( t ) j , α‖ 2 , ‖xi , α − xj , α‖2 ) , ( 7 ) where distance is squared to avoid the square root operation which causes numerical instability . • Dihedral angle loss : For each residue , we calculate its dihedral angle ( φ ( t ) i , ψ ( t ) i , ω ( t ) i ) based on the predicted atom coordinates x ( t ) i , α , x ( t ) i , c , x ( t ) i , n and x ( t ) i+1 , α , x ( t ) i+1 , c , x ( t ) i+1 , n . We define the dihedral angle loss as the mean square error between the predicted and true dihedral angles L ( t ) a = ∑ i ∑ a∈ { φ , ψ , ω } ( cos a ( t ) i − cos ai ) 2 + ( sin a ( t ) i − sin ai ) 2 ( 8 ) • Cα angle loss : We calculate angles γ ( t ) i between two vectors x ( t ) i−1 , α − x ( t ) i , α and x ( t ) i , α − x ( t ) i+1 , α as well as dihedral angles β ( t ) i between two planes defined by x ( t ) i−2 , α , x ( t ) i−1 , α , x ( t ) i , α , x ( t ) i+1 , α . L ( t ) c = ∑ i ( cos γ ( t ) i − cos γi ) 2 + ( cosβ ( t ) i − cosβi ) 2 ( 9 ) In summary , the overall graph generation loss is defined as L = Lseq + Lstruct , where Lstruct = ∑ t L ( t ) d + L ( t ) a + L ( t ) c Lseq = ∑ t Lce ( pt , st ) . ( 10 ) The sequence prediction loss Lseq is the cross entropy Lce between predicted and true residue types .
This paper proposes a joint generative model (co-designing the sequence and the structure at the same time) for the CDRs of antibodies, with the goal to enhance binding specificity or neutralization capabilities. The proposed method and two existing baselines are evaluated on 1) perplexity on hold-out set; 2) perplexity and sequence recovery on known antigen-antibody complexes; and 3) redesign CDR-H3 of existing antibodies for coronavirus neutralization as measured by a given neutralization predictor. RefineGNN, the proposed method, shows improved performance in all three tasks.
SP:0337a1d600cc90bd0591d8792102a4486dc03d91
TimeVAE: A Variational Auto-Encoder for Multivariate Time Series Generation
1 INTRODUCTION . Interest in generative models has increased considerably in recent years as the usage of deep learning in industry and academic has exploded . Data generators are useful in scenarios that involve unavailability of any or sufficient amount of real data , restrictions on data usage due to privacy reasons , need to simulate situations not yet encountered in reality , simulating exceptional cases , or the need to create datasets for specific testing scenarios such as presence of outliers or changepoints . Data generators also can help alleviate the limitation of deep-learning models that are data-hungry . Generative models fall under two broad categories , 1 ) trained generators that learn from real-world data , and 2 ) generators that use Monte Carlo sampling methods with user-defined distributions . Generative Adversarial Networks ( GAN ) , Variational Auto-Encoders ( VAE ) , and language models such as GPT ( Radford et al. , 2019 ) fall under the first category . Simple examples of the Monte Carlo generation include methods used to generate the classic donut-problem ( Beiden et al. , 2003 ) , or X-OR problem data ( Gomes et al. , 2006 ) . The major benefit of trained generators is that they can faithfully represent the patterns observed in the real-world data without requiring manual analysis , but their primary drawback is they can require large training data sets and long training times in order to learn to simulate the real data . Monte Carlo methods on the other hand , while being manual to set up , are simpler and more convenient to use . The generated data from them is interpretable and these methods also enable users to control the generated data , inject subject matter expertise , and simulate specific situations . The limitation is that generated data can be substantially different from real-world data . Therefore , a hybrid method that combines both approaches would be valuable for many downstream tasks such as prediction , forecasting , classification , and testing . In the domain of time-series data , synthetic data generation is a challenging task due to the temporal patterns in the data . The generative process must capture both the distributions in features as well as the temporal relationships . Deep learning methods are especially well-suited for modeling such complex relationships . However , in many real-world cases involving time-series data , the amount of available data can be limited in terms of number of samples , or in length of history . Examples include stock market predictions involving companies soon after initial public offering or predicting a retail organization ’ s staffing needs in newly opened locations . Such situations require a data generation method that functions well despite low volume of data and also allows users to introduce specific constructs of time-series patterns that are known to exist in the specific use-case . Recent work for synthetic data generation has largely focused on use of GANs ( Yoon et al. , 2019 ; Esteban et al. , 2017 ) , primarily by using recurrent neural networks for both generation and discrimination . However , due to the complexity introduced by temporal relationships , the standard approach of real versus synthetic binary discrimination is insufficient to capture temporal dependencies . As a result , special mechanisms are required within GAN networks to overcome this challenge . An example of such a special mechanism is the combination of supervised training traditionally used in autoregressive models with the unsupervised training of GAN in Yoon et al . ( 2019 ) . In order to leverage the strengths of both general data generation approaches we propose a new model based on Variational Auto-Encoders ( VAEs ) with a decoder design that enables user-defined distributions , which we hereafter refer to as TimeVAE . We demonstrate that TimeVAE can accurately model the temporal components of real-world data . Furthermore , we show that the bottleneck mechanism between the encoder and decoder that is inherent to VAEs acts to denoise the data which may help downstream tasks such as forecasting . Our method allows injection of custom temporal constructs such as level , trend , and seasonality to produce interpretable signals . Our experiments demonstrate TimeVAE meets the performance of top generative models when measuring similarity with original data , is computationally efficient to train , and outperforms available methods on the next-step prediction task . Finally , we show that our proposed method is superior to existing methods as the size of the available real-world training data diminishes . 2 RELATED WORKS . In Yoon et al . ( 2019 ) , an unsupervised GAN approach is combined with the power of autoregressive models , creating TimeGAN . The GAN makes up for the deficiencies that autoregressive models have , namely that they are deterministic . GANs , however , struggle to adhere to the temporal correlations in time series data which autoregressive models excel at . This method is the current state-of-the-art in synthetic timeseries data generation . Recurrent Conditional GAN ( RCGAN ) was invented to generate eICU data for privacy ( Esteban et al. , 2017 ) . A recurrent GAN architecture is used for generating real-valued sequential data . More specifically , RNNs are used for both the generator and discriminator and are conditioned on auxiliary information , consisting of real-valued time-series data with associated labels . C-RNN-GAN was developed to generate classical music data ( Mogren , 2016 ) . Randomly generated noise is input to deep LSTM modules to generate hidden representations which are then sent to the fully-connected layers to get the final generated sequential data samples . These samples and also the real music samples are then sent to the discriminator . This adversarial training helps the RNN generate music that varies in the number of tones used and the intensities . Fabius & Van Amersfoort ( 2014 ) implemented a recurrent VAE which used RNNs for the encoder and decoder . The architecture used the last encoded state of the encoder RNN as representational of the input sequence feeding into the reparameterization trick used in VAEs . The sample from the encoded representation passes into the decoder . However , Hyland et all Esteban et al . ( 2017 ) reported inconsistent results when tested on generated sine wave data , with results being clearly inferior to those obtained by the RCGAN method . Common limitations of the above generative models include : ( 1 ) difficult to train : the trained model is commonly subject to mode collapse , i.e . learning to sample synthetic data without diversity ( Srivastava et al. , 2017 ) ; ( 2 ) time consuming : the TimeGAN and RCGAN methods needed more than a day to be trained with 5,000 epochs by a V100 GPU on larger datasets ; ( 3 ) Need sufficient data to train GAN-based models . It is not easy to obtain sufficient data in many real-world forecasting situations . Our proposed model attempts to address these limitations . 3 METHODS . Our goal is to meet the following two objectives . First , we want to select an architecture for the encoder and decoder components in the VAE that maximizes our ability to generate realistic samples of timeseries data . Second , we want the architecture that allows us to inject specific temporal structures to the data generation process . These temporal structures can be used to create an interpretable generative process and inject domain expertise in cases where we have insufficient real-world data to train the generator model . 3.1 VARIATIONAL AUTO-ENCODER AS A GENERATIVE MODEL . We will first provide a brief overview of VAEs . The encoder in a VAE outputs the distribution of the embedding instead of a point estimate as in a traditional Auto-Encoder . We are given an input dataset X which consists of N i.i.d . samples of some continuous or discrete variable x . Our main goal is to generate samples that accurately represent distributions in original data . Specifically , we want to model the unknown probability function p ( x ) . The VAE described by Kingma & Welling ( 2013 ) assumes that the observed data are generated by a two step-process . First , a value z is generated from some prior distribution pθ ( z ) , and second , a value x is generated from some conditional distribution pθ ( x|z ) . While true values of the prior pθ ( z ) and the likelihood pθ ( x|z ) are unknown to us , we assume they are differentiable WRT both θ and z . Now , we can define the relationships between the input data and the latent representation as follows : the prior is pθ ( z ) , the likelihood is pθ ( x|z ) , and the posterior is pθ ( z|x ) . The computation of pθ ( z ) is very expensive and , quite commonly , intractable . To overcome this the VAE introduces an approximation of the posterior distribution as follows : qΦ ( z|x ) ≈ pθ ( z|x ) With this framework , the encoder serves to model the probabilistic posterior distribution qΦ ( z|x ) , while the decoder serves to model the conditional likelihood pθ ( x|z ) . Typically , this prior distribution of z is chosen to be the Gaussian distribution , more specifically , the standard normal . Then the posterior is regularized during training to ensure that the latent space is wrapped around this prior . We do this by adding the KL divergence between the variational approximation of the posterior and the chosen prior to the loss function . Since we embed the given inputs into a chosen prior , we can conveniently sample z directly from the prior distribution and then pass this z through the decoder . This essentially converts the VAE ’ s decoder into a generative model . 3.2 VAE LOSS FUNCTION . The loss function for the VAE , also named Evidence Lower Bound loss function ( ELBO ) , can be written as follows : Lθ , φ = −Eqφ ( z|x ) [ logpθ ( x|z ) ] + DKL ( qφ ( z|x ) ||pθ ( z ) ) The first term on the RHS is the negative log-likelihood of our data given z sampled from qφ ( z|x ) . The second term on the RHS is the KL-Divergence loss between the encoded latent space distribution and the prior . Note that the process involves sampling z from qφ ( z|x ) which would normally make the operation non-differentiable . However , VAEs use the so-called reparameterization trick which makes the VAE end-to-end trainable ( Kingma & Welling , 2013 ) . 3.3 BASE TIMEVAE ARCHITECTURE . Note that we have not yet described the encoding and decoding functions . One may choose any models for these as long as the loss function described above is differentiable . Our method uses a combination of traditional deep learning layers such as dense and convolutional layers and custom layers to model time-series specific components such as level , multi-polynomial trend , and seasonal patterns . Figure 1 provides a block-diagram of the base version of TimeVAE . The base version excludes the custom temporal structures . It does not require any time-series specific knowledge . The input signal X into the encoder is a 3-dimensional array of size N × T ×D , where N is the batch size , T is the number of time steps , and D is number of feature dimensions . If given data have variable length sequences , then the sequences are padded with zeroes at the beginning to ensure all sequences have same length T. The encoder passes the inputs through a series of convolutional layers with ReLU activation . Next , the data are flattened before passing through a fully-connected ( dense ) linear layer . If m is the number of chosen latent dimensions , representing dimensions of the multi-variate Gaussian , then this last layer has 2m number of neurons . We use the output to parameterize the multivariate Gaussian . The size of latent space m is a key model hyper-parameter . Next , we sample the vector z from the multivariate Gaussian using the reparameterization trick . The decoder takes the sampled latent vector z which is of length m. It is passed through a fullyconnected linear layer . Then the data are reshaped into 3-dimensional array before passing through a series of transposed convolutional layers with ReLU activation . Finally , the data passes through a time-distributed fully connected layer with dimensions such that the final output shape is the same as the original signalX .
The authors present a VAE for multivariate time series generation. The authors add additional decoder building blocks modelling level, trend and seasonality components of time series. Their method, named TimeVAE, is evaluated on four different datasets. Performance measures of generated samples are the similarity to real samples and the predictive quality of generated, “future” time steps.
SP:191deadf446a81f8f373cb3766616501d75c0bb9
TimeVAE: A Variational Auto-Encoder for Multivariate Time Series Generation
1 INTRODUCTION . Interest in generative models has increased considerably in recent years as the usage of deep learning in industry and academic has exploded . Data generators are useful in scenarios that involve unavailability of any or sufficient amount of real data , restrictions on data usage due to privacy reasons , need to simulate situations not yet encountered in reality , simulating exceptional cases , or the need to create datasets for specific testing scenarios such as presence of outliers or changepoints . Data generators also can help alleviate the limitation of deep-learning models that are data-hungry . Generative models fall under two broad categories , 1 ) trained generators that learn from real-world data , and 2 ) generators that use Monte Carlo sampling methods with user-defined distributions . Generative Adversarial Networks ( GAN ) , Variational Auto-Encoders ( VAE ) , and language models such as GPT ( Radford et al. , 2019 ) fall under the first category . Simple examples of the Monte Carlo generation include methods used to generate the classic donut-problem ( Beiden et al. , 2003 ) , or X-OR problem data ( Gomes et al. , 2006 ) . The major benefit of trained generators is that they can faithfully represent the patterns observed in the real-world data without requiring manual analysis , but their primary drawback is they can require large training data sets and long training times in order to learn to simulate the real data . Monte Carlo methods on the other hand , while being manual to set up , are simpler and more convenient to use . The generated data from them is interpretable and these methods also enable users to control the generated data , inject subject matter expertise , and simulate specific situations . The limitation is that generated data can be substantially different from real-world data . Therefore , a hybrid method that combines both approaches would be valuable for many downstream tasks such as prediction , forecasting , classification , and testing . In the domain of time-series data , synthetic data generation is a challenging task due to the temporal patterns in the data . The generative process must capture both the distributions in features as well as the temporal relationships . Deep learning methods are especially well-suited for modeling such complex relationships . However , in many real-world cases involving time-series data , the amount of available data can be limited in terms of number of samples , or in length of history . Examples include stock market predictions involving companies soon after initial public offering or predicting a retail organization ’ s staffing needs in newly opened locations . Such situations require a data generation method that functions well despite low volume of data and also allows users to introduce specific constructs of time-series patterns that are known to exist in the specific use-case . Recent work for synthetic data generation has largely focused on use of GANs ( Yoon et al. , 2019 ; Esteban et al. , 2017 ) , primarily by using recurrent neural networks for both generation and discrimination . However , due to the complexity introduced by temporal relationships , the standard approach of real versus synthetic binary discrimination is insufficient to capture temporal dependencies . As a result , special mechanisms are required within GAN networks to overcome this challenge . An example of such a special mechanism is the combination of supervised training traditionally used in autoregressive models with the unsupervised training of GAN in Yoon et al . ( 2019 ) . In order to leverage the strengths of both general data generation approaches we propose a new model based on Variational Auto-Encoders ( VAEs ) with a decoder design that enables user-defined distributions , which we hereafter refer to as TimeVAE . We demonstrate that TimeVAE can accurately model the temporal components of real-world data . Furthermore , we show that the bottleneck mechanism between the encoder and decoder that is inherent to VAEs acts to denoise the data which may help downstream tasks such as forecasting . Our method allows injection of custom temporal constructs such as level , trend , and seasonality to produce interpretable signals . Our experiments demonstrate TimeVAE meets the performance of top generative models when measuring similarity with original data , is computationally efficient to train , and outperforms available methods on the next-step prediction task . Finally , we show that our proposed method is superior to existing methods as the size of the available real-world training data diminishes . 2 RELATED WORKS . In Yoon et al . ( 2019 ) , an unsupervised GAN approach is combined with the power of autoregressive models , creating TimeGAN . The GAN makes up for the deficiencies that autoregressive models have , namely that they are deterministic . GANs , however , struggle to adhere to the temporal correlations in time series data which autoregressive models excel at . This method is the current state-of-the-art in synthetic timeseries data generation . Recurrent Conditional GAN ( RCGAN ) was invented to generate eICU data for privacy ( Esteban et al. , 2017 ) . A recurrent GAN architecture is used for generating real-valued sequential data . More specifically , RNNs are used for both the generator and discriminator and are conditioned on auxiliary information , consisting of real-valued time-series data with associated labels . C-RNN-GAN was developed to generate classical music data ( Mogren , 2016 ) . Randomly generated noise is input to deep LSTM modules to generate hidden representations which are then sent to the fully-connected layers to get the final generated sequential data samples . These samples and also the real music samples are then sent to the discriminator . This adversarial training helps the RNN generate music that varies in the number of tones used and the intensities . Fabius & Van Amersfoort ( 2014 ) implemented a recurrent VAE which used RNNs for the encoder and decoder . The architecture used the last encoded state of the encoder RNN as representational of the input sequence feeding into the reparameterization trick used in VAEs . The sample from the encoded representation passes into the decoder . However , Hyland et all Esteban et al . ( 2017 ) reported inconsistent results when tested on generated sine wave data , with results being clearly inferior to those obtained by the RCGAN method . Common limitations of the above generative models include : ( 1 ) difficult to train : the trained model is commonly subject to mode collapse , i.e . learning to sample synthetic data without diversity ( Srivastava et al. , 2017 ) ; ( 2 ) time consuming : the TimeGAN and RCGAN methods needed more than a day to be trained with 5,000 epochs by a V100 GPU on larger datasets ; ( 3 ) Need sufficient data to train GAN-based models . It is not easy to obtain sufficient data in many real-world forecasting situations . Our proposed model attempts to address these limitations . 3 METHODS . Our goal is to meet the following two objectives . First , we want to select an architecture for the encoder and decoder components in the VAE that maximizes our ability to generate realistic samples of timeseries data . Second , we want the architecture that allows us to inject specific temporal structures to the data generation process . These temporal structures can be used to create an interpretable generative process and inject domain expertise in cases where we have insufficient real-world data to train the generator model . 3.1 VARIATIONAL AUTO-ENCODER AS A GENERATIVE MODEL . We will first provide a brief overview of VAEs . The encoder in a VAE outputs the distribution of the embedding instead of a point estimate as in a traditional Auto-Encoder . We are given an input dataset X which consists of N i.i.d . samples of some continuous or discrete variable x . Our main goal is to generate samples that accurately represent distributions in original data . Specifically , we want to model the unknown probability function p ( x ) . The VAE described by Kingma & Welling ( 2013 ) assumes that the observed data are generated by a two step-process . First , a value z is generated from some prior distribution pθ ( z ) , and second , a value x is generated from some conditional distribution pθ ( x|z ) . While true values of the prior pθ ( z ) and the likelihood pθ ( x|z ) are unknown to us , we assume they are differentiable WRT both θ and z . Now , we can define the relationships between the input data and the latent representation as follows : the prior is pθ ( z ) , the likelihood is pθ ( x|z ) , and the posterior is pθ ( z|x ) . The computation of pθ ( z ) is very expensive and , quite commonly , intractable . To overcome this the VAE introduces an approximation of the posterior distribution as follows : qΦ ( z|x ) ≈ pθ ( z|x ) With this framework , the encoder serves to model the probabilistic posterior distribution qΦ ( z|x ) , while the decoder serves to model the conditional likelihood pθ ( x|z ) . Typically , this prior distribution of z is chosen to be the Gaussian distribution , more specifically , the standard normal . Then the posterior is regularized during training to ensure that the latent space is wrapped around this prior . We do this by adding the KL divergence between the variational approximation of the posterior and the chosen prior to the loss function . Since we embed the given inputs into a chosen prior , we can conveniently sample z directly from the prior distribution and then pass this z through the decoder . This essentially converts the VAE ’ s decoder into a generative model . 3.2 VAE LOSS FUNCTION . The loss function for the VAE , also named Evidence Lower Bound loss function ( ELBO ) , can be written as follows : Lθ , φ = −Eqφ ( z|x ) [ logpθ ( x|z ) ] + DKL ( qφ ( z|x ) ||pθ ( z ) ) The first term on the RHS is the negative log-likelihood of our data given z sampled from qφ ( z|x ) . The second term on the RHS is the KL-Divergence loss between the encoded latent space distribution and the prior . Note that the process involves sampling z from qφ ( z|x ) which would normally make the operation non-differentiable . However , VAEs use the so-called reparameterization trick which makes the VAE end-to-end trainable ( Kingma & Welling , 2013 ) . 3.3 BASE TIMEVAE ARCHITECTURE . Note that we have not yet described the encoding and decoding functions . One may choose any models for these as long as the loss function described above is differentiable . Our method uses a combination of traditional deep learning layers such as dense and convolutional layers and custom layers to model time-series specific components such as level , multi-polynomial trend , and seasonal patterns . Figure 1 provides a block-diagram of the base version of TimeVAE . The base version excludes the custom temporal structures . It does not require any time-series specific knowledge . The input signal X into the encoder is a 3-dimensional array of size N × T ×D , where N is the batch size , T is the number of time steps , and D is number of feature dimensions . If given data have variable length sequences , then the sequences are padded with zeroes at the beginning to ensure all sequences have same length T. The encoder passes the inputs through a series of convolutional layers with ReLU activation . Next , the data are flattened before passing through a fully-connected ( dense ) linear layer . If m is the number of chosen latent dimensions , representing dimensions of the multi-variate Gaussian , then this last layer has 2m number of neurons . We use the output to parameterize the multivariate Gaussian . The size of latent space m is a key model hyper-parameter . Next , we sample the vector z from the multivariate Gaussian using the reparameterization trick . The decoder takes the sampled latent vector z which is of length m. It is passed through a fullyconnected linear layer . Then the data are reshaped into 3-dimensional array before passing through a series of transposed convolutional layers with ReLU activation . Finally , the data passes through a time-distributed fully connected layer with dimensions such that the final output shape is the same as the original signalX .
This work proposes a generative model architecture for time-series that is trained using the variational auto-encoder framework. The main motivation for this model is (a) to obtain a more sample efficient model compared to comparable models based on generative adversarial networks (GANs), and (b) optionally incorproate domain knowledge in its design. The authors design a fairly general-purpose VAE architecture which can also incorporate intepretable decoder blocks. Results are carried out on a number of new datasets and compared to the aformentioned GAN based time-series models. The authors use two different metrics to evaluate the mismatch between genereated and real samples, and show that their TimeVAE performs better than the alternative models.
SP:191deadf446a81f8f373cb3766616501d75c0bb9
Offline Pre-trained Multi-Agent Decision Transformer
1 INRTODUCTION . Multi-Agent reinforcement learning ( MARL ) plays an essential role for solving complex decisionmaking tasks by learning from the interaction data between machine or autonomous agents and simulated physical environments . It typically applies to self-driving ( Shalev-Shwartz et al. , 2016 ) , traffic control ( Bazzan , 2009 ) , and recommendation system ( Xian et al. , 2019 ) , and , to specifically mention , surpasses human beings on some video games ( Bellemare et al. , 2013 ; Wang et al. , 2020 ) . However , the experience-based policy learning scheme requires the algorithms with high sample efficiency because of the limited computing resources and high cost resulting from the data collection ( Haarnoja et al. , 2018 ; Munos et al. , 2016 ; Espeholt et al. , 2019 ; 2018 ) . Furthermore , even in domains where the online environment is feasible , we might still prefer to utilize previously collected data instead , for example , if the domain ’ s complex requires large datasets for effective generalization . In addition , a policy trained on one scenario usually can not perform well on another even though under the same task . Therefore , a universal policy is critical for saving the training time of general reinforcement learning . Offline RL ( Levine et al. , 2020 ) attracts more researchers motivated by improving online reinforcement learning with offline datasets ( Fu et al. , 2020 ) . Those methods like CQL ( Kumar et al. , 2020 ) , BEAR ( Kumar et al. , 2019 ) , and BCQ ( Fujimoto et al. , 2019 ) conventionally leverage the current off-policy RL algorithms , e.g. , DQN ( Mnih et al. , 2015 ) , with provable constraints ( Rashidinejad et al. , 2021 ) . They mainly focus on solving the overestimation of Q values learned in offline datasets and the distribution shift between offline and online . However , those constraints limit the performance with insufficiently offline dataset exploitation ( Kumar et al. , 2019 ) . Recently , the transformer shows its advantage of representing the sequential data for the classification or prediction tasks . Most related to our work , Chen et al . ( 2021 ) replace the constrained Q networks in conventional offline RL algorithms with causal transformer and demonstrate the superiority comparing with baselines such as Behavior Cloning ( BC ) and state-of-the-art offline algorithms in single-agent offline RL . Nevertheless , the overestimation problems emerge in the offline multi-agent RL when one directly applies the sequential modeling method . We propose leveraging the representation capability of the transformer and then load the pre-trained model as part of the policy in the fine-tuning phase . This paper proposes Multi-Agent Decision Transformers ( MADT ) for pre-training the general policy on offline datasets , capable of generalizing onto other seen/unseen environments . Firstly , we collect the offline datasets from the well-known , challenging MARL environment , StarCraft Multi-Agent Challenge ( SMAC ) ( Samvelyan et al. , 2019 ) , interacting with the state-of-the-art algorithm , multiagent PPO ( Yu et al. , 2021 ) . Then we construct transformer variants for multiple agents with parameter sharing or acing as a part . We give the paradigm of pre-training a model with the transformer and fine-tuning it with MARL . We conclude the main contribution as follows : • We propose a series of transformer variants for offline MARL via leveraging the sequential modeling of the attention mechanism . • We derive a framework with offline pretraining and online fine-tuning to improve sample efficiency and generality across different scenarios . • We are the first to apply the pre-trained model across different multi-agent scenarios to validate the transferring ability . Experimental results show fast adaptation and superior performance . • We build a dataset with different skill-level covering all SMAC scenarios for benchmarking progress in MARL pre-training . 2 PRELIMINARY . Multi-Agent Reinforcement Learning . For the Markov Game , which is a multi-agent extension from the Markov Decision Process ( MDP ) , there is a tuple representing the essential elements < S , A , R , P , n , γ > , where S denotes the state space of n agents : S1 × S2 . . . Sn → S. Ai is the action space of each agent i , P : Si × Ai → PD ( Si ) denotes the transition function emiting the distribution over the state space and A is the joint action space , Ri : S × Ai → R is the reward function of each agent and takes action following their policies π ( a|s ) ∈ Πi : S→ PD ( A ) from the policy space Πi , where Πi denotes the policy space of agent i , a ∼ Ai , and s ∼ Si . Each agent aims to maximize its long-term reward ∑ t γ trt , where rti ∈ Ri denotes the reward of agent i in time t and γ denotes the discount factor . Attention-based Model . Attention-based model has shown its stable and strong representation capability . The scale dot-production attention uses the self-attention mechanism demonstrated in ( Vaswani et al. , 2017 ) . Let Q ∈ Rtq×dq be the quries , K ∈ Rtk×dk be the keys , and V ∈ Rtv×dv be the values , where t∗ are the element numbers of different inputs and d∗ are the corresponding element dimensions . Normally , tk = tv and dq = dk . The outputs of self-attention are computed as : Attention ( Q , K , V ) = softmax ( QKT√ dk ) V ( 1 ) where the scalar 1/ √ dk is used to prevent the softmax function into regions that has very small gradients . Then we introduce the multi-head attention process as follows : MultiHead ( Q , K , V ) = Concat ( head1 , . . . , headh ) WO ( 2 ) headi = Attention ( QW Q i , KW K i , VW V i ) ( 3 ) The position-wise feed-forward network is another core module of the transformer . It consists of two linear transformations with a ReLU activation in between . The dimensionality of inputs and outputs is dmodel , and that of the feef forward layer is dff . Specially , FFN ( x ) = max ( 0 , xW1 + b1 ) W2 + b2 ( 4 ) where W1 ∈ Rdmodel×dff and W2 ∈ Rdff×dmodelare the weights , and b1 ∈ Rdff and b2 ∈ Rdmodel are the biases . Across different positions are the same linear transformations . Note that the position encoding for leveraging the order of the sequence as follows : PE ( pos , 2i ) = sin pos/100002i/dmodel PE ( pos , 2i+ 1 ) = cos pos/100002i/dmodel ( 5 ) 3 METHODOLOGY . In this section , we demonstrate how the transformer is applied to our offline pre-training MARL framework . Firstly , we introduce an offline MARL method , in which the transformer maps between the local observations and actions of each agent in the offline dataset via parameter sharing sequentially . Then we leverage the hidden representation as the input of the multi-agent decision transformer ( MADT ) to minimize the cross-entropy loss . Furthermore , we introduce how to integrate the online MARL with MADT in constructing our whole framework to train a universal MARL policy . To accelerate the online learning , we load the pre-trained model as a part of MARL algorithms and learn the policy based on experience in the latest buffer stored from the online environment . To train a universal MARL policy quickly adapting to other tasks , we bridge the gap between different scenarios from observations , actions , and available actions , respectively . Figure 1 overviews our method from the perspective of offline pre-training with supervised learning and online fine-tuning with MARL algorithms . 3.1 MULTI-AGENT DECISION TRANSFORMER . Algorithm 1 shows the training process of Multi-Agent Decision Transformer ( MADT ) , in which we autoregressively encode the trajectories from the offline datasets in offline pre-trained MARL and train the transformer-based network with supervised learning . We carefully reformulate the trajectories as the inputs of the causal transformer different from those in the Decision Transformer ( Chen et al. , 2021 ) . Denote that we deprecate the reward-to-go and actions that are encoded with states together in the single-agent DT . We will interpret the reason for this in the next section . Similar to the seq2seq models , MADT is based on the autoregressive architecture with the reformulated sequential inputs across timescale . The left part of Figure 2 shows the architecture . The causal transformer encodes the agent i ’ s trajectory sequence τ ti at the time step t to a hidden representation h t i = ( h1 , h2 , . . . , hl ) with a dynamic mask . Given ht , the output at the time step t only based on the previous data then consumes the previously emitted actions as additional inputs when predicting a new action . Algorithm 1 : MADT-Offline : Multi-Agent Decision Transformer Input : Offline dataset D : { τi : 〈sti , oti , ati , vti , dti , rti〉Tt=1 } ni=1 , vti denotes the available action Initialize θ for the Causal Transformer ; Initialize α as the learning rate , C as the context length , and n as the maximize agent number for τ = { τ1 , . . . , τi , . . . , τn } in D do Chunk the trajectory into τi = { rti , sti , ati } t∈1 : C as the ground truth samples , where C is the context length , and mask the trajectory when dti is true for τ ti = { τ1i . . . τ ti . . . τTi } in τi do Mask illegal actions via P ( aj |τi , â < j ; θ ′ ) = 0 if vti is True Predict the action ât = arg maxa P ( a|τi , â < t ; θ ′ ) Update θ with θ = arg max θ′ 1 C ∑C j=1 P ( aj ) logP ( âj |τi , â < j ; θ ′ ) end end return θ Trajectories Reformulation as Input . We model the lowest granularity at each time step as a modeling unit xt from the static offline dataset for the concise representation . MARL has many elements such as 〈global_state , local_observation〉 , different from the single agent . It is reasonable for sequential modeling methods to model them in Markov Decision Process ( MDP ) . Therefore , we formulate the trajectory as follows : τ i = ( x1 , . . . xt . . . , xT ) where xt = ( st , oit , a i t ) where sit denotes the global shared state , o i t denotes the individual observation for agent i at time step t , and ait denotes the action . We take xt as a token similar to the input of natural language processing . Output Sequence Constructing . To bridge the gap between training with the whole context trajectory and testing with only previous data , we mask the context data to autoregressively output in the time step t with previous data in 〈1 . . . t− 1〉 . Therefore , MADT predicts the sequential actions at each time step using the decoder as follows : y = at = arg max a pθ ( a|τ , a1 , . . . , at−1 ) ( 6 ) where θ denotes the parameter of MADT and τ denotes the trajectory including the global state s , local observation o before the time step t , pθ is the distribution over the legal action space under the available action v. Core Module Description . MADT differs from the transformers in conventional sequence modeling tasks that take inputs with position encoding and decode the encoded hidden representation autoregressively . We use the masking mechanism with a lower triangular matrix to compute the attention : Attention ( Q , K , V ) = softmax ( QKT√ dk +M ) V ( 7 ) where M is the mask matrix which ensures the input at the time step t can only correlate with the input from 〈1 , . . . , t− 1〉 . We employ the Cross-entropy ( CE ) as the total sequential prediction loss and utilize the available action v to ensure agents taking those illegal actions with probability zero . The CE loss can be represented as follows : LCE ( θ ) = 1 C C∑ t=1 P ( at ) logP ( ât|τt , â < t ; θ ) , where C is the context length ( 8 ) where at is the ground truth action , τt includes { s1 : t , o1 : t } . â denotes the output of MADT . The cross-entropy loss shown above aims to minimize the distribution distance between the prediction and the ground truth .
The paper studies the offline training and online fine-tuning setting for MARL, and show that it is promising to learn policy representatrions to improve the performance on downstream MARL tasks. The paper proposes to integrate the transformer architecture to improve efficiency and generalization ability. Authors conduct extensive experiments to validate its effectiveness.
SP:ed590dec0a3cd9b7ac1cb1c5407c51509e59a878
Offline Pre-trained Multi-Agent Decision Transformer
1 INRTODUCTION . Multi-Agent reinforcement learning ( MARL ) plays an essential role for solving complex decisionmaking tasks by learning from the interaction data between machine or autonomous agents and simulated physical environments . It typically applies to self-driving ( Shalev-Shwartz et al. , 2016 ) , traffic control ( Bazzan , 2009 ) , and recommendation system ( Xian et al. , 2019 ) , and , to specifically mention , surpasses human beings on some video games ( Bellemare et al. , 2013 ; Wang et al. , 2020 ) . However , the experience-based policy learning scheme requires the algorithms with high sample efficiency because of the limited computing resources and high cost resulting from the data collection ( Haarnoja et al. , 2018 ; Munos et al. , 2016 ; Espeholt et al. , 2019 ; 2018 ) . Furthermore , even in domains where the online environment is feasible , we might still prefer to utilize previously collected data instead , for example , if the domain ’ s complex requires large datasets for effective generalization . In addition , a policy trained on one scenario usually can not perform well on another even though under the same task . Therefore , a universal policy is critical for saving the training time of general reinforcement learning . Offline RL ( Levine et al. , 2020 ) attracts more researchers motivated by improving online reinforcement learning with offline datasets ( Fu et al. , 2020 ) . Those methods like CQL ( Kumar et al. , 2020 ) , BEAR ( Kumar et al. , 2019 ) , and BCQ ( Fujimoto et al. , 2019 ) conventionally leverage the current off-policy RL algorithms , e.g. , DQN ( Mnih et al. , 2015 ) , with provable constraints ( Rashidinejad et al. , 2021 ) . They mainly focus on solving the overestimation of Q values learned in offline datasets and the distribution shift between offline and online . However , those constraints limit the performance with insufficiently offline dataset exploitation ( Kumar et al. , 2019 ) . Recently , the transformer shows its advantage of representing the sequential data for the classification or prediction tasks . Most related to our work , Chen et al . ( 2021 ) replace the constrained Q networks in conventional offline RL algorithms with causal transformer and demonstrate the superiority comparing with baselines such as Behavior Cloning ( BC ) and state-of-the-art offline algorithms in single-agent offline RL . Nevertheless , the overestimation problems emerge in the offline multi-agent RL when one directly applies the sequential modeling method . We propose leveraging the representation capability of the transformer and then load the pre-trained model as part of the policy in the fine-tuning phase . This paper proposes Multi-Agent Decision Transformers ( MADT ) for pre-training the general policy on offline datasets , capable of generalizing onto other seen/unseen environments . Firstly , we collect the offline datasets from the well-known , challenging MARL environment , StarCraft Multi-Agent Challenge ( SMAC ) ( Samvelyan et al. , 2019 ) , interacting with the state-of-the-art algorithm , multiagent PPO ( Yu et al. , 2021 ) . Then we construct transformer variants for multiple agents with parameter sharing or acing as a part . We give the paradigm of pre-training a model with the transformer and fine-tuning it with MARL . We conclude the main contribution as follows : • We propose a series of transformer variants for offline MARL via leveraging the sequential modeling of the attention mechanism . • We derive a framework with offline pretraining and online fine-tuning to improve sample efficiency and generality across different scenarios . • We are the first to apply the pre-trained model across different multi-agent scenarios to validate the transferring ability . Experimental results show fast adaptation and superior performance . • We build a dataset with different skill-level covering all SMAC scenarios for benchmarking progress in MARL pre-training . 2 PRELIMINARY . Multi-Agent Reinforcement Learning . For the Markov Game , which is a multi-agent extension from the Markov Decision Process ( MDP ) , there is a tuple representing the essential elements < S , A , R , P , n , γ > , where S denotes the state space of n agents : S1 × S2 . . . Sn → S. Ai is the action space of each agent i , P : Si × Ai → PD ( Si ) denotes the transition function emiting the distribution over the state space and A is the joint action space , Ri : S × Ai → R is the reward function of each agent and takes action following their policies π ( a|s ) ∈ Πi : S→ PD ( A ) from the policy space Πi , where Πi denotes the policy space of agent i , a ∼ Ai , and s ∼ Si . Each agent aims to maximize its long-term reward ∑ t γ trt , where rti ∈ Ri denotes the reward of agent i in time t and γ denotes the discount factor . Attention-based Model . Attention-based model has shown its stable and strong representation capability . The scale dot-production attention uses the self-attention mechanism demonstrated in ( Vaswani et al. , 2017 ) . Let Q ∈ Rtq×dq be the quries , K ∈ Rtk×dk be the keys , and V ∈ Rtv×dv be the values , where t∗ are the element numbers of different inputs and d∗ are the corresponding element dimensions . Normally , tk = tv and dq = dk . The outputs of self-attention are computed as : Attention ( Q , K , V ) = softmax ( QKT√ dk ) V ( 1 ) where the scalar 1/ √ dk is used to prevent the softmax function into regions that has very small gradients . Then we introduce the multi-head attention process as follows : MultiHead ( Q , K , V ) = Concat ( head1 , . . . , headh ) WO ( 2 ) headi = Attention ( QW Q i , KW K i , VW V i ) ( 3 ) The position-wise feed-forward network is another core module of the transformer . It consists of two linear transformations with a ReLU activation in between . The dimensionality of inputs and outputs is dmodel , and that of the feef forward layer is dff . Specially , FFN ( x ) = max ( 0 , xW1 + b1 ) W2 + b2 ( 4 ) where W1 ∈ Rdmodel×dff and W2 ∈ Rdff×dmodelare the weights , and b1 ∈ Rdff and b2 ∈ Rdmodel are the biases . Across different positions are the same linear transformations . Note that the position encoding for leveraging the order of the sequence as follows : PE ( pos , 2i ) = sin pos/100002i/dmodel PE ( pos , 2i+ 1 ) = cos pos/100002i/dmodel ( 5 ) 3 METHODOLOGY . In this section , we demonstrate how the transformer is applied to our offline pre-training MARL framework . Firstly , we introduce an offline MARL method , in which the transformer maps between the local observations and actions of each agent in the offline dataset via parameter sharing sequentially . Then we leverage the hidden representation as the input of the multi-agent decision transformer ( MADT ) to minimize the cross-entropy loss . Furthermore , we introduce how to integrate the online MARL with MADT in constructing our whole framework to train a universal MARL policy . To accelerate the online learning , we load the pre-trained model as a part of MARL algorithms and learn the policy based on experience in the latest buffer stored from the online environment . To train a universal MARL policy quickly adapting to other tasks , we bridge the gap between different scenarios from observations , actions , and available actions , respectively . Figure 1 overviews our method from the perspective of offline pre-training with supervised learning and online fine-tuning with MARL algorithms . 3.1 MULTI-AGENT DECISION TRANSFORMER . Algorithm 1 shows the training process of Multi-Agent Decision Transformer ( MADT ) , in which we autoregressively encode the trajectories from the offline datasets in offline pre-trained MARL and train the transformer-based network with supervised learning . We carefully reformulate the trajectories as the inputs of the causal transformer different from those in the Decision Transformer ( Chen et al. , 2021 ) . Denote that we deprecate the reward-to-go and actions that are encoded with states together in the single-agent DT . We will interpret the reason for this in the next section . Similar to the seq2seq models , MADT is based on the autoregressive architecture with the reformulated sequential inputs across timescale . The left part of Figure 2 shows the architecture . The causal transformer encodes the agent i ’ s trajectory sequence τ ti at the time step t to a hidden representation h t i = ( h1 , h2 , . . . , hl ) with a dynamic mask . Given ht , the output at the time step t only based on the previous data then consumes the previously emitted actions as additional inputs when predicting a new action . Algorithm 1 : MADT-Offline : Multi-Agent Decision Transformer Input : Offline dataset D : { τi : 〈sti , oti , ati , vti , dti , rti〉Tt=1 } ni=1 , vti denotes the available action Initialize θ for the Causal Transformer ; Initialize α as the learning rate , C as the context length , and n as the maximize agent number for τ = { τ1 , . . . , τi , . . . , τn } in D do Chunk the trajectory into τi = { rti , sti , ati } t∈1 : C as the ground truth samples , where C is the context length , and mask the trajectory when dti is true for τ ti = { τ1i . . . τ ti . . . τTi } in τi do Mask illegal actions via P ( aj |τi , â < j ; θ ′ ) = 0 if vti is True Predict the action ât = arg maxa P ( a|τi , â < t ; θ ′ ) Update θ with θ = arg max θ′ 1 C ∑C j=1 P ( aj ) logP ( âj |τi , â < j ; θ ′ ) end end return θ Trajectories Reformulation as Input . We model the lowest granularity at each time step as a modeling unit xt from the static offline dataset for the concise representation . MARL has many elements such as 〈global_state , local_observation〉 , different from the single agent . It is reasonable for sequential modeling methods to model them in Markov Decision Process ( MDP ) . Therefore , we formulate the trajectory as follows : τ i = ( x1 , . . . xt . . . , xT ) where xt = ( st , oit , a i t ) where sit denotes the global shared state , o i t denotes the individual observation for agent i at time step t , and ait denotes the action . We take xt as a token similar to the input of natural language processing . Output Sequence Constructing . To bridge the gap between training with the whole context trajectory and testing with only previous data , we mask the context data to autoregressively output in the time step t with previous data in 〈1 . . . t− 1〉 . Therefore , MADT predicts the sequential actions at each time step using the decoder as follows : y = at = arg max a pθ ( a|τ , a1 , . . . , at−1 ) ( 6 ) where θ denotes the parameter of MADT and τ denotes the trajectory including the global state s , local observation o before the time step t , pθ is the distribution over the legal action space under the available action v. Core Module Description . MADT differs from the transformers in conventional sequence modeling tasks that take inputs with position encoding and decode the encoded hidden representation autoregressively . We use the masking mechanism with a lower triangular matrix to compute the attention : Attention ( Q , K , V ) = softmax ( QKT√ dk +M ) V ( 7 ) where M is the mask matrix which ensures the input at the time step t can only correlate with the input from 〈1 , . . . , t− 1〉 . We employ the Cross-entropy ( CE ) as the total sequential prediction loss and utilize the available action v to ensure agents taking those illegal actions with probability zero . The CE loss can be represented as follows : LCE ( θ ) = 1 C C∑ t=1 P ( at ) logP ( ât|τt , â < t ; θ ) , where C is the context length ( 8 ) where at is the ground truth action , τt includes { s1 : t , o1 : t } . â denotes the output of MADT . The cross-entropy loss shown above aims to minimize the distribution distance between the prediction and the ground truth .
This is the first paper to pre-train a multi-agent model with offline datasets and online fine-tune it to a particular task. The authors propose MADT an offline pre-training architecture for multi-agent RL integrating transformers with imitation learning on an a collected data set of offline data. Towards this end, the authors contribute a data set of offline multi-agent interactions collected from running multi-agent PPO on 5 tasks from SMAC. On this data set, the proposed MADT method is shown to outperform popular single agent offline RL algorithms from the literature and excel at fine-tuning a pre-trained offline model.
SP:ed590dec0a3cd9b7ac1cb1c5407c51509e59a878
Invariance in Policy Optimisation and Partial Identifiability in Reward Learning
Designing reward functions for complex , real-world tasks is challenging . Reward learning lets one instead infer reward functions from data . However , multiple reward functions often fit the data equally well , even in the infinite-data limit . Prior work often considers reward functions to be uniquely recoverable , by imposing additional assumptions on data sources . By contrast , we formally characterise the partial identifiability of popular data sources , including demonstrations and trajectory preferences , under multiple standard sets of assumptions . We analyse the impact of this partial identifiability on downstream tasks such as policy optimisation , including under shifts in environment dynamics . We unify our results in a framework for comparing data sources and downstream tasks by their invariances , with implications for the design and selection of data sources for reward learning . 1 INTRODUCTION . A wide range of problems can be represented as sequential decision-making tasks , where the goal is to maximise some numerical reward ( Sutton & Barto , 2018 ) . However , designing an appropriate reward function remains a challenge in complex real-world tasks ( Amodei et al. , 2016 ; Leike et al. , 2018 ; Dulac-Arnold et al. , 2019 ) . Reward learning algorithms infer task reward functions from data sources such as expert demonstrations ( Ng & Russell , 2000 ) , preferences over trajectories ( Christiano et al. , 2017 ) , and many others ( Jeon et al. , 2020 ) . This approach has extended the applicability of sequential decision-making techniques to more complex tasks ( e.g . Abbeel et al. , 2010 ; Christiano et al. , 2017 ; Singh et al. , 2019 ; Stiennon et al. , 2020 ) . Multiple reward functions are often consistent with the data source , even in the infinite-data limit . For most data sources , this fundamental ambiguity has been acknowledged , but its extent has not been characterised . In section 3 , we formally characterise the ambiguity of several popular data sources including expert demonstrations and trajectory preferences . These infinite-data limits bound the information recoverable from finite data sets using any algorithm , so they are useful for evaluating algorithms relative to their limits , and data sources relative to each other . Uniquely identifying a reward function is unnecessary when all plausible reward functions lead to the same downstream outcome in a given application , such as policy optimisation . Characterising this ambiguity tolerance for various applications allow us to evaluate the ambiguity of a data source relative to a given application . Learnt reward functions are often used for policy optimisation , for example via reinforcement learning ( RL ) 1 . In section 3 we formally characterise the ambiguity tolerance of policy optimisation under arbitrary dynamics . Ambiguity and ambiguity tolerance are formally related . Both concern invariances – of data sources or downstream outcomes – to reward function transformations . Thus , our main contribution is to catalogue the invariances of various mathematical objects derived from the reward function . In section 4 , we explore a partial order on these invariances , and its implications for the selection and evaluation of data sources , addressing an open problem in reward learning ( Leike et al. , 2018 , §3.1 ) . 1We focus on RL applications . Further applications arise in other fields , where reward functions are used in models to understand and predict the behaviour of humans , animals , and other systems ( see , e.g. , Schoemaker , 1982 ; Dennett , 1989 ; Rust , 1994 ; Howes et al. , 2014 ; Peterson et al. , 2021 ; Collins & Shenhav , 2021 ) . 1.1 RELATED WORK . Inverse reinforcement learning ( IRL ; Russell , 1998 ) is the prototypical example of reward learning . IRL infers a reward function from the behavioural data of a task expert by inverting a model of the expert ’ s planning algorithm ( Armstrong & Mindermann , 2017 ; Shah et al. , 2019 ) . Existing work partially characterises the inherent ambiguity of behaviour for certain planning algorithms ( Ng & Russell , 2000 ; Cao et al. , 2021 ) and classes of tasks ( Dvijotham & Todorov , 2010 ; Kim et al. , 2021 ) . We extend these results to more planning algorithms and arbitrary time-unbounded , stochastic tasks , using a more expressive space of reward functions that reveals novel ambiguity . Reward learning models have been proposed for many other data sources ( Jeon et al. , 2020 ) . A popular and effective data source is preferences over behavioural trajectories ( Akrour et al. , 2012 ; Christiano et al. , 2017 ) . Unlike for IRL , the ambiguity arising from these data sources has not been formally characterised . We contribute a formal characterisation of the ambiguity for central models of evaluative feedback including trajectory preferences . Several studies have explored learning from expert behaviour and preferences ( Ibarz et al. , 2018 ; Palan et al. , 2019 ; Bıyık et al. , 2020 ; Koppol et al. , 2020 ) , or other multi-modal data sources ( Tung et al. , 2018 ; Jeon et al. , 2020 ) . One motivation is that different data sources may provide complementary reward information ( Koppol et al. , 2020 ) , eliminating some ambiguity . Similarly , Amin et al . ( 2017 ) and Cao et al . ( 2021 ) observe reduced ambiguity by combining behavioural data across multiple tasks . Our partial order provides a general framework for understanding these results . Computing an optimal behavioural policy is a primary application of learnt reward functions ( Abbeel & Ng , 2004 ; Wirth et al. , 2017 ) . Ng et al . ( 1999 ) proved that potential shaping transformations always preserve the set of optimal policies , and so are always tolerable for this application . We extend this result , characterising the full set of transformations that preserve optimal policies in each task , including for additional policy optimisation techniques such as maximum entropy RL . Ambiguity corresponds to the partial identifiability ( Lewbel , 2019 ) of the reward function modelled as a latent parameter . The prevailing response to partial identifiability in reward learning has been to impose additional constraints or assumptions until the data identifies the reward function uniquely ( or , at least , sufficiently for policy optimisation ) . Following Manski ( 1995 ; 2003 ) and Tamer ( 2010 ) , we instead describe ambiguity given various constraints and assumptions . This gives practitioners results appropriate for their real data ( and the ambiguity tolerance of their actual application ) . IRL is related to dynamic discrete choice ( Rust , 1994 ; Aguirregabiria & Mira , 2010 ) , a problem where identifiability has been extensively studied ( e.g. , Aguirregabiria , 2005 ; Srisuma , 2015 ; Arcidiacono & Miller , 2020 ) . We study a simpler setting with known tasks . IRL also relates to preference elicitation ( Rothkopf & Dimitrakakis , 2011 ) and inverse optimal control ( Ab Azar et al. , 2020 ) . Preferences over sequential trajectories are not typically considered as a data source in other fields . 1.2 PRELIMINARIES . We consider an idealised setting with finite , observable , infinite-horizon sequential decision-making environments , formalised as Markov Decision Processes ( MDPs ; Sutton & Barto , 2018 , §3 ) . An MDP is a tuple pS , A , τ , µ0 , R , γq where S and A are finite sets of environment states and agent actions ; τ : SˆAÑ ∆pSq encodes the transition distributions governing the environment dynamics ; µ0 P ∆pSq is an initial state distribution ; R : SˆAˆS Ñ R is a deterministic reward function2 ; and γ P p0 , 1q is a reward discount rate . We distinguish states in the support of µ0 as initial states , and states s with τps|s , aq “ 1 and Rps , a , sq “ 0 for all a as terminal states . We represent the transition from state s to state s1 using action a as the tuple x “ ps , a , s1q . We classify ps , a , s1q as possible in an MDP if s1 is in the support of τps , aq , otherwise it is impossible . A trajectory is an infinite sequence of concatenate transitions ξ “ ps0 , a0 , s1 , a1 , s2 , . . .q , and a trajectory fragment of length n is a finite sequence of n concatenate transitions ζ “ ps0 , a0 , s1 , . . . , an´1 , snq . A trajectory or fragment is possible if all of its transitions are possible , and is impossible otherwise . A trajectory or fragment is initial if its first state is initial . A state or transition is reachable if it is part of some possible and initial trajectory . Given an MDP , we define the return function G as the cumulative discounted reward of entire trajectories and trajectory fragments : Gpζq “ řn´1 t “ 0 γ tRpst , at , st ` 1q for a trajectory fragment ζ of length n , and similarly for trajectories . We primarily consider this return function with various restricted domains , such as only possible or initial trajectories or trajectory fragments . A policy π : S Ñ ∆pAq encodes an agent ’ s behaviour as a state-conditional action distribution . Together with an MDP ’ s transition distribution τ , a policy π induces a distribution of trajectories starting from each state . We denote such a trajectory starting from s with the random variable Ξs , and its remaining components with random variables A0 , S1 , A1 , S2 , and so on . Given an MDP and a policy π , and the value function encodes the expected return from states , Vπpsq “ EΞs „ π , τ “ GpΞsq ‰ ; and the Q-function of π encodes the expected return given an initial action , Qπps , aq “ EΞs „ π , τ “ GpΞsq ˇ ˇ A0 “ a ‰ . Qπ and Vπ satisfy a Bellman equation : Qπps , aq “ ES1 „ τps , aq “ Rps , a , S1q ` γVπpS1q ‰ , Vπpsq “ EA „ πpsq “ Qπps , Aq ‰ , ( 1 ) for all s P S and a P A . Their difference , Aπps , aq “ Qπps , aq ´ Vπpsq , is the advantage function . We further define a policy evaluation function , J , encoding the expected return from following a particular policy in an MDP , J pπq “ ES0 „ µ0 “ VπpS0q ‰ . J induces an order over policies . A policy maximising J is an optimal policy , denoted π‹ . Similarly , Q‹ , V‹ , and A‹ denote the Q- , value , and advantage functions of an optimal policy . Since J may be multimodal , we often discuss the set of optimal policies . However , Q‹ , V‹ , and A‹ are unique . Moreover , we consider several policies resulting from alternative planning algorithms . Given a base policy π0 , and an inverse temperature parameter β ą 0 , we define the Boltzmann policy with respect to π0 , denoted ππ0β , using the softmax function : ππ0β pa|sq “ exp ` βAπ0ps , aq ˘ ř a1PA exp ` βAπ0ps , a1q ˘ . ( 2 ) The Boltzmann-rational policy , π‹β , is the Boltzmann policy with respect to optimal policies , as used for IRL by Ramachandran & Amir ( 2007 ) . The popular Maximum Entropy policy , πβ , is defined using a modified policy evaluation function with an entropy regularisation term ( Haarnoja et al. , 2017 ) , and solves the recurrence πβ “ π πβ β ( i.e. , πβ is a Boltzmann policy with respect to itself ) . 2Notably , we consider deterministic reward functions that may depend on a transition ’ s successor state . Alternative spaces of reward functions are often considered ( such as functions from S or SˆA , or distributions ) . The chosen space has straightforward consequences for invariances , which we discuss in appendix C .
This paper characterizes the partial identifiability of data sources and the reward function. Then it analyzes the impact of this measure on the optimum and the algorithms. Some implications are given.
SP:834027963c400b77f2d47151b621b666cea971a3
Invariance in Policy Optimisation and Partial Identifiability in Reward Learning
Designing reward functions for complex , real-world tasks is challenging . Reward learning lets one instead infer reward functions from data . However , multiple reward functions often fit the data equally well , even in the infinite-data limit . Prior work often considers reward functions to be uniquely recoverable , by imposing additional assumptions on data sources . By contrast , we formally characterise the partial identifiability of popular data sources , including demonstrations and trajectory preferences , under multiple standard sets of assumptions . We analyse the impact of this partial identifiability on downstream tasks such as policy optimisation , including under shifts in environment dynamics . We unify our results in a framework for comparing data sources and downstream tasks by their invariances , with implications for the design and selection of data sources for reward learning . 1 INTRODUCTION . A wide range of problems can be represented as sequential decision-making tasks , where the goal is to maximise some numerical reward ( Sutton & Barto , 2018 ) . However , designing an appropriate reward function remains a challenge in complex real-world tasks ( Amodei et al. , 2016 ; Leike et al. , 2018 ; Dulac-Arnold et al. , 2019 ) . Reward learning algorithms infer task reward functions from data sources such as expert demonstrations ( Ng & Russell , 2000 ) , preferences over trajectories ( Christiano et al. , 2017 ) , and many others ( Jeon et al. , 2020 ) . This approach has extended the applicability of sequential decision-making techniques to more complex tasks ( e.g . Abbeel et al. , 2010 ; Christiano et al. , 2017 ; Singh et al. , 2019 ; Stiennon et al. , 2020 ) . Multiple reward functions are often consistent with the data source , even in the infinite-data limit . For most data sources , this fundamental ambiguity has been acknowledged , but its extent has not been characterised . In section 3 , we formally characterise the ambiguity of several popular data sources including expert demonstrations and trajectory preferences . These infinite-data limits bound the information recoverable from finite data sets using any algorithm , so they are useful for evaluating algorithms relative to their limits , and data sources relative to each other . Uniquely identifying a reward function is unnecessary when all plausible reward functions lead to the same downstream outcome in a given application , such as policy optimisation . Characterising this ambiguity tolerance for various applications allow us to evaluate the ambiguity of a data source relative to a given application . Learnt reward functions are often used for policy optimisation , for example via reinforcement learning ( RL ) 1 . In section 3 we formally characterise the ambiguity tolerance of policy optimisation under arbitrary dynamics . Ambiguity and ambiguity tolerance are formally related . Both concern invariances – of data sources or downstream outcomes – to reward function transformations . Thus , our main contribution is to catalogue the invariances of various mathematical objects derived from the reward function . In section 4 , we explore a partial order on these invariances , and its implications for the selection and evaluation of data sources , addressing an open problem in reward learning ( Leike et al. , 2018 , §3.1 ) . 1We focus on RL applications . Further applications arise in other fields , where reward functions are used in models to understand and predict the behaviour of humans , animals , and other systems ( see , e.g. , Schoemaker , 1982 ; Dennett , 1989 ; Rust , 1994 ; Howes et al. , 2014 ; Peterson et al. , 2021 ; Collins & Shenhav , 2021 ) . 1.1 RELATED WORK . Inverse reinforcement learning ( IRL ; Russell , 1998 ) is the prototypical example of reward learning . IRL infers a reward function from the behavioural data of a task expert by inverting a model of the expert ’ s planning algorithm ( Armstrong & Mindermann , 2017 ; Shah et al. , 2019 ) . Existing work partially characterises the inherent ambiguity of behaviour for certain planning algorithms ( Ng & Russell , 2000 ; Cao et al. , 2021 ) and classes of tasks ( Dvijotham & Todorov , 2010 ; Kim et al. , 2021 ) . We extend these results to more planning algorithms and arbitrary time-unbounded , stochastic tasks , using a more expressive space of reward functions that reveals novel ambiguity . Reward learning models have been proposed for many other data sources ( Jeon et al. , 2020 ) . A popular and effective data source is preferences over behavioural trajectories ( Akrour et al. , 2012 ; Christiano et al. , 2017 ) . Unlike for IRL , the ambiguity arising from these data sources has not been formally characterised . We contribute a formal characterisation of the ambiguity for central models of evaluative feedback including trajectory preferences . Several studies have explored learning from expert behaviour and preferences ( Ibarz et al. , 2018 ; Palan et al. , 2019 ; Bıyık et al. , 2020 ; Koppol et al. , 2020 ) , or other multi-modal data sources ( Tung et al. , 2018 ; Jeon et al. , 2020 ) . One motivation is that different data sources may provide complementary reward information ( Koppol et al. , 2020 ) , eliminating some ambiguity . Similarly , Amin et al . ( 2017 ) and Cao et al . ( 2021 ) observe reduced ambiguity by combining behavioural data across multiple tasks . Our partial order provides a general framework for understanding these results . Computing an optimal behavioural policy is a primary application of learnt reward functions ( Abbeel & Ng , 2004 ; Wirth et al. , 2017 ) . Ng et al . ( 1999 ) proved that potential shaping transformations always preserve the set of optimal policies , and so are always tolerable for this application . We extend this result , characterising the full set of transformations that preserve optimal policies in each task , including for additional policy optimisation techniques such as maximum entropy RL . Ambiguity corresponds to the partial identifiability ( Lewbel , 2019 ) of the reward function modelled as a latent parameter . The prevailing response to partial identifiability in reward learning has been to impose additional constraints or assumptions until the data identifies the reward function uniquely ( or , at least , sufficiently for policy optimisation ) . Following Manski ( 1995 ; 2003 ) and Tamer ( 2010 ) , we instead describe ambiguity given various constraints and assumptions . This gives practitioners results appropriate for their real data ( and the ambiguity tolerance of their actual application ) . IRL is related to dynamic discrete choice ( Rust , 1994 ; Aguirregabiria & Mira , 2010 ) , a problem where identifiability has been extensively studied ( e.g. , Aguirregabiria , 2005 ; Srisuma , 2015 ; Arcidiacono & Miller , 2020 ) . We study a simpler setting with known tasks . IRL also relates to preference elicitation ( Rothkopf & Dimitrakakis , 2011 ) and inverse optimal control ( Ab Azar et al. , 2020 ) . Preferences over sequential trajectories are not typically considered as a data source in other fields . 1.2 PRELIMINARIES . We consider an idealised setting with finite , observable , infinite-horizon sequential decision-making environments , formalised as Markov Decision Processes ( MDPs ; Sutton & Barto , 2018 , §3 ) . An MDP is a tuple pS , A , τ , µ0 , R , γq where S and A are finite sets of environment states and agent actions ; τ : SˆAÑ ∆pSq encodes the transition distributions governing the environment dynamics ; µ0 P ∆pSq is an initial state distribution ; R : SˆAˆS Ñ R is a deterministic reward function2 ; and γ P p0 , 1q is a reward discount rate . We distinguish states in the support of µ0 as initial states , and states s with τps|s , aq “ 1 and Rps , a , sq “ 0 for all a as terminal states . We represent the transition from state s to state s1 using action a as the tuple x “ ps , a , s1q . We classify ps , a , s1q as possible in an MDP if s1 is in the support of τps , aq , otherwise it is impossible . A trajectory is an infinite sequence of concatenate transitions ξ “ ps0 , a0 , s1 , a1 , s2 , . . .q , and a trajectory fragment of length n is a finite sequence of n concatenate transitions ζ “ ps0 , a0 , s1 , . . . , an´1 , snq . A trajectory or fragment is possible if all of its transitions are possible , and is impossible otherwise . A trajectory or fragment is initial if its first state is initial . A state or transition is reachable if it is part of some possible and initial trajectory . Given an MDP , we define the return function G as the cumulative discounted reward of entire trajectories and trajectory fragments : Gpζq “ řn´1 t “ 0 γ tRpst , at , st ` 1q for a trajectory fragment ζ of length n , and similarly for trajectories . We primarily consider this return function with various restricted domains , such as only possible or initial trajectories or trajectory fragments . A policy π : S Ñ ∆pAq encodes an agent ’ s behaviour as a state-conditional action distribution . Together with an MDP ’ s transition distribution τ , a policy π induces a distribution of trajectories starting from each state . We denote such a trajectory starting from s with the random variable Ξs , and its remaining components with random variables A0 , S1 , A1 , S2 , and so on . Given an MDP and a policy π , and the value function encodes the expected return from states , Vπpsq “ EΞs „ π , τ “ GpΞsq ‰ ; and the Q-function of π encodes the expected return given an initial action , Qπps , aq “ EΞs „ π , τ “ GpΞsq ˇ ˇ A0 “ a ‰ . Qπ and Vπ satisfy a Bellman equation : Qπps , aq “ ES1 „ τps , aq “ Rps , a , S1q ` γVπpS1q ‰ , Vπpsq “ EA „ πpsq “ Qπps , Aq ‰ , ( 1 ) for all s P S and a P A . Their difference , Aπps , aq “ Qπps , aq ´ Vπpsq , is the advantage function . We further define a policy evaluation function , J , encoding the expected return from following a particular policy in an MDP , J pπq “ ES0 „ µ0 “ VπpS0q ‰ . J induces an order over policies . A policy maximising J is an optimal policy , denoted π‹ . Similarly , Q‹ , V‹ , and A‹ denote the Q- , value , and advantage functions of an optimal policy . Since J may be multimodal , we often discuss the set of optimal policies . However , Q‹ , V‹ , and A‹ are unique . Moreover , we consider several policies resulting from alternative planning algorithms . Given a base policy π0 , and an inverse temperature parameter β ą 0 , we define the Boltzmann policy with respect to π0 , denoted ππ0β , using the softmax function : ππ0β pa|sq “ exp ` βAπ0ps , aq ˘ ř a1PA exp ` βAπ0ps , a1q ˘ . ( 2 ) The Boltzmann-rational policy , π‹β , is the Boltzmann policy with respect to optimal policies , as used for IRL by Ramachandran & Amir ( 2007 ) . The popular Maximum Entropy policy , πβ , is defined using a modified policy evaluation function with an entropy regularisation term ( Haarnoja et al. , 2017 ) , and solves the recurrence πβ “ π πβ β ( i.e. , πβ is a Boltzmann policy with respect to itself ) . 2Notably , we consider deterministic reward functions that may depend on a transition ’ s successor state . Alternative spaces of reward functions are often considered ( such as functions from S or SˆA , or distributions ) . The chosen space has straightforward consequences for invariances , which we discuss in appendix C .
This is a theoretical work on understanding the intrinsic limits of various data sources that are used for reward learning in RL. In particular, by considering the infinite data limit of the data source, they study the level of reward ambiguity that can be obtained for a given downstream task. For example, for the expert behavior data source, they characterize the reward transformations that are determined by the optimal Q-function. Similar attempts have been made previously for specific data sources and specific planning algorithms (Ng & Russell, 2000). However, this work makes substantial contributions by conducting this study in a unified and rigorous way for variety data sources and downstream tasks.
SP:834027963c400b77f2d47151b621b666cea971a3
Why be adversarial? Let's cooperate!: Cooperative Dataset Alignment via JSD Upper Bound
1 INTRODUCTION . In many cases , a practitioner has access to multiple related but distinct datasets such as agricultural measurements from two farms , experimental data collected in different months , or sales data before and after a major event . Unsupervised dataset alignment ( UDA ) is the ML task aimed at aligning these related but distinct datasets in a shared space , which may be a latent space , without any pairing information between the two domains ( i.e. , unsupervised ) . This task has many applications such as generative modeling ( e.g. , ( Zhu et al. , 2017 ) ) , unsupervised domain adaptation ( e.g. , ( Grover et al. , 2020 ; Hu et al. , 2018 ) ) , batch effect mitigation in biology ( e.g. , ( Haghverdi et al. , 2018 ) ) , and fairness-aware learning ( e.g. , ( Zemel et al. , 2013 ) ) . The most common approach for obtaining such alignment transformations stems from Generative Adversarial Networks ( GAN ) ( Goodfellow et al. , 2014 ) , which can be viewed as minimizing a lower bound on the Jensen-Shannon Divergence ( JSD ) between real and generated distributions . The lower bound is tight if and only if the inner maximization is solved perfectly . CycleGAN ( Zhu et al. , 2017 ) maps between two datasets via two GAN objectives between the two domains and a cycle consistency loss , which encourages approximate invertibility of the transformations . However , adversarial learning can be challenging to optimize in practice ( see e.g . ( Lucic et al. , 2018 ; Kurach et al. , 2019 ) ) in part because of the competitive nature of the min-max optimization problem . Perhaps more importantly , the research community only has reasonable GAN evaluation metrics for certain data types . Specifically , the commonly accepted Frechet Inception Distance ( FID ) ( Heusel et al. , 2017 ) is only applicable to image or auditory data , which have standard powerful pretrained classifiers , and even the implementation of FID can have evaluation issues ( Parmar et al. , 2021 ) . No clear metrics exist for tabular data or non-perceptual data . Recently , flow-based methods that leverage invertible models have been proposed for the UDA task ( Grover et al. , 2020 ; Usman et al. , 2020 ) . AlignFlow ( Grover et al. , 2020 ) leverages invertible models to make the model cycle-consistent ( i.e. , invertible ) by construction and introduce exact log-likelihood loss terms derived from standard flow-based generative models as a complementary loss terms to the adversarial loss terms . Yet , AlignFlow still leverages adversarial learning . Loglikelihood ratio minimizing flows ( LRMF ) ( Usman et al. , 2020 ) use invertible flow models and density estimation for distribution alignment without adversarial learning and define a new metric based on the log-likelihood ratio . However , LRMF depends heavily on the density model class and can only partially align datasets if the target distribution is not in the chosen density model class . Additionally , the LRMF metric depends on this density model class and is only defined for two datasets . Therefore , to provide an alternative to adversarial learning and generalize previous flow-based approaches , we propose a unified non-adversarial UDA framework , which we prove is equivalent to minimizing an upper bound on the JSD . Importantly , our problem reduces to a min-min , i.e. , cooperative , problem , and the JSD upper bound can provide a natural evaluation metric for UDA that can be applied in any domain . Our framework requires two parts , the outer minimization requires an invertible model and the inner minimization requires a density model ( e.g. , Gaussian mixture models or normalizing flows ( Dinh et al. , 2017 ) ) . We summarize our contributions as follows : • We prove that a minimization problem over density models is an upper bound on a generalized version of JSD that allows for more than two distributions . Importantly , we also theoretically quantify the bound gap and show that it can be made tight if the density model class is flexible enough . • We use this JSD upper bound to derive a novel regularized loss function for UDA and explain its relationship to prior methods . • We empirically demonstrate the benefits of our method compared to prior flow-based models on both simulated and real-world datasets . Notation We will denote distributions as PX ( x ) where X is the corresponding random variable . Invertible functions will be denoted by T ( · ) . We will use Xj ∼ PXj to denote the observed random variable from the j-th distribution . We will use Zj ≜ Tj ( Xj ) ∼ PZj ≡ PTj ( Xj ) to denote the latent random variable of the j-th distribution after applying Tj to Xj ( and note that Xj = T−1j ( Zj ) ) . We will denote the mixtures of these observed or latent distributions as PXmix ≜ ∑ jwjPXj and PZmix ≜ ∑ jwjPZj , where w is a probability vector . We denote KL divergence , entropy , and cross entropy as KL ( · , · ) , H ( · ) , and Hc ( · , · ) , respectively , where KL ( P , Q ) = Hc ( P , Q ) −H ( P ) . 2 REGULARIZED ALIGNMENT UPPER BOUND LOSS . In this section , we will introduce our main theoretical result proving an upper bound on the generalized JSD divergence , deriving our loss function based on this , and then showing that minimizing this upper bound results in aligned distributions assuming large enough capacity of the model components . Background : Normalizing Flows and Invertible Models Normalizing flows are generative models that have tractable distributions where exact density evaluations and efficient samplings are ensured ( Kobyzev et al. , 2021 ) . Such models leverage the change of variables formula to create an invertible mapping T such that PX ( x ) = PZ ( T ( x ) ) |JT ( x ) | where PZ is a known latent distribution and |JT ( x ) | is the absolute value of determinant of the Jacobian of the invertible map T . For sampling in distribution PX , one need to first sample from the latent distribution PZ and then apply the inverse transform T−1 . Therefore the key challenge in designing invertible models is to have computationally efficient inverse evaluation and Jacobian determinant calculation . Many approaches have been proposed by parameterizing mapping function T as deep neural networks including autoregressive structures ( Kingma et al. , 2016 ; Papamakarios et al. , 2021 ) , coupling layers ( Dinh et al. , 2017 ) ( Kingma and Dhariwal , 2018 ) , oridinary differential equations ( Grathwohl et al. , 2018 ) , and invertible residual networks ( Chen et al. , 2019 ; Behrmann et al. , 2019 ) . Flow models can be then learned efficiently by maximizing the likelihood for the given data . Background : Generalized JSD We remind the reader of the generalized Jensen-Shannon divergence for more than two distributions , where the standard JSD is recovered if w1 = w2 = 0.5 . Definition 1 ( Generalized Jensen-Shannon Divergence ( GJSD ) ( Lin , 1991 ) ) . Given k distributions { PXj } kj=1 and a corresponding probability weight vector w , the generalized Jensen-Shannon divergence is defined as ( proof of equivalence in appendix ) : GJSDw ( PX1 , · · · , PXk ) ≜ ∑ jwj KL ( PXj , ∑ jwjPXj ) ≡ H ( ∑ jwjPXj ) − ∑ jwj H ( PXj ) . ( 1 ) 2.1 GJSD UPPER BOUND . The goal of distribution alignment is to find a set of transformations { Tj ( · ) } kj=1 ( which will be invertible in our case ) such that the latent distributions align , i.e. , PTj ( Xj ) = PTj′ ( Xj′ ) or equivalently PZj = PZj′ for all j ̸= j ′ . Given the properties of divergences , this alignment will happen if and only if GJSD ( PZ1 , · · · , PZk ) = 0 . Thus , ideally , we would minimize GJSD directly with respect to Tj , i.e. , min T1 , ··· , Tk∈T GJSD ( PT1 ( X1 ) , · · · , PTk ( Xk ) ) ≡ min T1 , ··· , Tk∈T H ( ∑ jwjPTj ( Xj ) ) − ∑ jwj H ( PTj ( Xj ) ) , where T is a class of invertible functions . However , we can not evaluate the entropy terms in Eqn . 2 because we do not know the density of PXj ; we only have samples from PXj . Therefore , we will upper bound the first entropy term in Eqn . 2 ( H ( ∑ jwjPXj ) ) using an auxiliary density model and decompose the other entropy terms by leveraging the change of variables formula for invertible functions . Theorem 1 ( GJSD Upper Bound ) . Given an auxiliary density model class Q , we form a GJSD upper bound : GJSDw ( PZ1 , · · · , PZk ) ≤ min Q∈Q Hc ( PZmix , Q ) − ∑ jwj H ( PZj ) , where the bound gap is exactly minQ∈Q KL ( PZmix , Q ) . Proof of Theorem 1 . For any Q ∈ Q , we have the following upper bound : GJSDw ( PZ1 , · · · , PZk ) = Hc ( PZmix , Q ) −Hc ( PZmix , Q ) ︸ ︷︷ ︸ =0 +H ( PZmix ) − ∑ jwj H ( PZj ) = Hc ( PZmix , Q ) −KL ( PZmix , Q ) − ∑ jwj H ( PZj ) ≤ Hc ( PZmix , Q ) − ∑ jwj H ( PZj ) , where the inequality is by the fact that KL divergence is non-negative and the bound gap is equal to KL ( PZmix , Q ) . The Q that achieves the minimum in the upper bound is equivalent to the Q that minimizes the bound gap , i.e. , Q∗ = argmin Q∈Q Hc ( PZmix , Q ) − ∑ jwj H ( PZj ) ︸ ︷︷ ︸ Constant w.r.t . Q ( 2 ) = argmin Q∈Q Hc ( PZmix , Q ) −H ( PZmix ) ︸ ︷︷ ︸ Constant w.r.t . Q ( 3 ) = argmin Q∈Q KL ( PZmix , Q ) . ( 4 ) The tightness of the bound depends on how well the class of density modelsQ ( e.g. , mixture models , normalizing flows , or autoregressive densities ) can approximate PZmix ; notably , the bound can be made tight if PZmix ∈ Q . Also , one key feature of this upper bound is that the cross entropy term can be evaluated using only samples from PXj and the transformations Tj , i.e. , Hc ( PZmix , Q ) =∑ jwjEPXj [ − logQ ( Tj ( xj ) ) ] . However , we still can not evaluate the other entropy terms H ( PZj ) since we do not know the densities of PZj ( or PXj ) . Thus , we leverage the fact that the Tj functions are invertible to define an entropy change of variables . Lemma 2 ( Entropy Change of Variables ) . Let X ∼ PX and Z ≜ T ( X ) ∼ PZ , where T is an invertible transformation . The entropy of Z can be decomposed as follows : H ( PZ ) = H ( PX ) + EPX [ log |JT ( x ) | ] , ( 5 ) where |JT ( x ) | is the determinant of the Jacobian of T . The key insight from this lemma is that H ( PX ) is a constant with respect to T and can thus be ignored when optimizing T , while EPX [ log |JT ( x ) | ] can be approximated using only samples from PX .
The paper presents a unified framework for domain alignment through non-adversarial approaches. Instead of solving a min-max adversarial problem, this paper aims to solve a min-min optimization equivalent to minimizing the upper bound of JSD. It proves the equivalence and offers a computational and feasible solution that can be inserted into flow-based non-adversarial approaches in a plug-and-play fashion. Preliminary results on generating digits from different classes or domains have demonstrated the correctness of the model.
SP:32b0b62a233b816c8405deb383aed5e3a7d1cf0b
Why be adversarial? Let's cooperate!: Cooperative Dataset Alignment via JSD Upper Bound
1 INTRODUCTION . In many cases , a practitioner has access to multiple related but distinct datasets such as agricultural measurements from two farms , experimental data collected in different months , or sales data before and after a major event . Unsupervised dataset alignment ( UDA ) is the ML task aimed at aligning these related but distinct datasets in a shared space , which may be a latent space , without any pairing information between the two domains ( i.e. , unsupervised ) . This task has many applications such as generative modeling ( e.g. , ( Zhu et al. , 2017 ) ) , unsupervised domain adaptation ( e.g. , ( Grover et al. , 2020 ; Hu et al. , 2018 ) ) , batch effect mitigation in biology ( e.g. , ( Haghverdi et al. , 2018 ) ) , and fairness-aware learning ( e.g. , ( Zemel et al. , 2013 ) ) . The most common approach for obtaining such alignment transformations stems from Generative Adversarial Networks ( GAN ) ( Goodfellow et al. , 2014 ) , which can be viewed as minimizing a lower bound on the Jensen-Shannon Divergence ( JSD ) between real and generated distributions . The lower bound is tight if and only if the inner maximization is solved perfectly . CycleGAN ( Zhu et al. , 2017 ) maps between two datasets via two GAN objectives between the two domains and a cycle consistency loss , which encourages approximate invertibility of the transformations . However , adversarial learning can be challenging to optimize in practice ( see e.g . ( Lucic et al. , 2018 ; Kurach et al. , 2019 ) ) in part because of the competitive nature of the min-max optimization problem . Perhaps more importantly , the research community only has reasonable GAN evaluation metrics for certain data types . Specifically , the commonly accepted Frechet Inception Distance ( FID ) ( Heusel et al. , 2017 ) is only applicable to image or auditory data , which have standard powerful pretrained classifiers , and even the implementation of FID can have evaluation issues ( Parmar et al. , 2021 ) . No clear metrics exist for tabular data or non-perceptual data . Recently , flow-based methods that leverage invertible models have been proposed for the UDA task ( Grover et al. , 2020 ; Usman et al. , 2020 ) . AlignFlow ( Grover et al. , 2020 ) leverages invertible models to make the model cycle-consistent ( i.e. , invertible ) by construction and introduce exact log-likelihood loss terms derived from standard flow-based generative models as a complementary loss terms to the adversarial loss terms . Yet , AlignFlow still leverages adversarial learning . Loglikelihood ratio minimizing flows ( LRMF ) ( Usman et al. , 2020 ) use invertible flow models and density estimation for distribution alignment without adversarial learning and define a new metric based on the log-likelihood ratio . However , LRMF depends heavily on the density model class and can only partially align datasets if the target distribution is not in the chosen density model class . Additionally , the LRMF metric depends on this density model class and is only defined for two datasets . Therefore , to provide an alternative to adversarial learning and generalize previous flow-based approaches , we propose a unified non-adversarial UDA framework , which we prove is equivalent to minimizing an upper bound on the JSD . Importantly , our problem reduces to a min-min , i.e. , cooperative , problem , and the JSD upper bound can provide a natural evaluation metric for UDA that can be applied in any domain . Our framework requires two parts , the outer minimization requires an invertible model and the inner minimization requires a density model ( e.g. , Gaussian mixture models or normalizing flows ( Dinh et al. , 2017 ) ) . We summarize our contributions as follows : • We prove that a minimization problem over density models is an upper bound on a generalized version of JSD that allows for more than two distributions . Importantly , we also theoretically quantify the bound gap and show that it can be made tight if the density model class is flexible enough . • We use this JSD upper bound to derive a novel regularized loss function for UDA and explain its relationship to prior methods . • We empirically demonstrate the benefits of our method compared to prior flow-based models on both simulated and real-world datasets . Notation We will denote distributions as PX ( x ) where X is the corresponding random variable . Invertible functions will be denoted by T ( · ) . We will use Xj ∼ PXj to denote the observed random variable from the j-th distribution . We will use Zj ≜ Tj ( Xj ) ∼ PZj ≡ PTj ( Xj ) to denote the latent random variable of the j-th distribution after applying Tj to Xj ( and note that Xj = T−1j ( Zj ) ) . We will denote the mixtures of these observed or latent distributions as PXmix ≜ ∑ jwjPXj and PZmix ≜ ∑ jwjPZj , where w is a probability vector . We denote KL divergence , entropy , and cross entropy as KL ( · , · ) , H ( · ) , and Hc ( · , · ) , respectively , where KL ( P , Q ) = Hc ( P , Q ) −H ( P ) . 2 REGULARIZED ALIGNMENT UPPER BOUND LOSS . In this section , we will introduce our main theoretical result proving an upper bound on the generalized JSD divergence , deriving our loss function based on this , and then showing that minimizing this upper bound results in aligned distributions assuming large enough capacity of the model components . Background : Normalizing Flows and Invertible Models Normalizing flows are generative models that have tractable distributions where exact density evaluations and efficient samplings are ensured ( Kobyzev et al. , 2021 ) . Such models leverage the change of variables formula to create an invertible mapping T such that PX ( x ) = PZ ( T ( x ) ) |JT ( x ) | where PZ is a known latent distribution and |JT ( x ) | is the absolute value of determinant of the Jacobian of the invertible map T . For sampling in distribution PX , one need to first sample from the latent distribution PZ and then apply the inverse transform T−1 . Therefore the key challenge in designing invertible models is to have computationally efficient inverse evaluation and Jacobian determinant calculation . Many approaches have been proposed by parameterizing mapping function T as deep neural networks including autoregressive structures ( Kingma et al. , 2016 ; Papamakarios et al. , 2021 ) , coupling layers ( Dinh et al. , 2017 ) ( Kingma and Dhariwal , 2018 ) , oridinary differential equations ( Grathwohl et al. , 2018 ) , and invertible residual networks ( Chen et al. , 2019 ; Behrmann et al. , 2019 ) . Flow models can be then learned efficiently by maximizing the likelihood for the given data . Background : Generalized JSD We remind the reader of the generalized Jensen-Shannon divergence for more than two distributions , where the standard JSD is recovered if w1 = w2 = 0.5 . Definition 1 ( Generalized Jensen-Shannon Divergence ( GJSD ) ( Lin , 1991 ) ) . Given k distributions { PXj } kj=1 and a corresponding probability weight vector w , the generalized Jensen-Shannon divergence is defined as ( proof of equivalence in appendix ) : GJSDw ( PX1 , · · · , PXk ) ≜ ∑ jwj KL ( PXj , ∑ jwjPXj ) ≡ H ( ∑ jwjPXj ) − ∑ jwj H ( PXj ) . ( 1 ) 2.1 GJSD UPPER BOUND . The goal of distribution alignment is to find a set of transformations { Tj ( · ) } kj=1 ( which will be invertible in our case ) such that the latent distributions align , i.e. , PTj ( Xj ) = PTj′ ( Xj′ ) or equivalently PZj = PZj′ for all j ̸= j ′ . Given the properties of divergences , this alignment will happen if and only if GJSD ( PZ1 , · · · , PZk ) = 0 . Thus , ideally , we would minimize GJSD directly with respect to Tj , i.e. , min T1 , ··· , Tk∈T GJSD ( PT1 ( X1 ) , · · · , PTk ( Xk ) ) ≡ min T1 , ··· , Tk∈T H ( ∑ jwjPTj ( Xj ) ) − ∑ jwj H ( PTj ( Xj ) ) , where T is a class of invertible functions . However , we can not evaluate the entropy terms in Eqn . 2 because we do not know the density of PXj ; we only have samples from PXj . Therefore , we will upper bound the first entropy term in Eqn . 2 ( H ( ∑ jwjPXj ) ) using an auxiliary density model and decompose the other entropy terms by leveraging the change of variables formula for invertible functions . Theorem 1 ( GJSD Upper Bound ) . Given an auxiliary density model class Q , we form a GJSD upper bound : GJSDw ( PZ1 , · · · , PZk ) ≤ min Q∈Q Hc ( PZmix , Q ) − ∑ jwj H ( PZj ) , where the bound gap is exactly minQ∈Q KL ( PZmix , Q ) . Proof of Theorem 1 . For any Q ∈ Q , we have the following upper bound : GJSDw ( PZ1 , · · · , PZk ) = Hc ( PZmix , Q ) −Hc ( PZmix , Q ) ︸ ︷︷ ︸ =0 +H ( PZmix ) − ∑ jwj H ( PZj ) = Hc ( PZmix , Q ) −KL ( PZmix , Q ) − ∑ jwj H ( PZj ) ≤ Hc ( PZmix , Q ) − ∑ jwj H ( PZj ) , where the inequality is by the fact that KL divergence is non-negative and the bound gap is equal to KL ( PZmix , Q ) . The Q that achieves the minimum in the upper bound is equivalent to the Q that minimizes the bound gap , i.e. , Q∗ = argmin Q∈Q Hc ( PZmix , Q ) − ∑ jwj H ( PZj ) ︸ ︷︷ ︸ Constant w.r.t . Q ( 2 ) = argmin Q∈Q Hc ( PZmix , Q ) −H ( PZmix ) ︸ ︷︷ ︸ Constant w.r.t . Q ( 3 ) = argmin Q∈Q KL ( PZmix , Q ) . ( 4 ) The tightness of the bound depends on how well the class of density modelsQ ( e.g. , mixture models , normalizing flows , or autoregressive densities ) can approximate PZmix ; notably , the bound can be made tight if PZmix ∈ Q . Also , one key feature of this upper bound is that the cross entropy term can be evaluated using only samples from PXj and the transformations Tj , i.e. , Hc ( PZmix , Q ) =∑ jwjEPXj [ − logQ ( Tj ( xj ) ) ] . However , we still can not evaluate the other entropy terms H ( PZj ) since we do not know the densities of PZj ( or PXj ) . Thus , we leverage the fact that the Tj functions are invertible to define an entropy change of variables . Lemma 2 ( Entropy Change of Variables ) . Let X ∼ PX and Z ≜ T ( X ) ∼ PZ , where T is an invertible transformation . The entropy of Z can be decomposed as follows : H ( PZ ) = H ( PX ) + EPX [ log |JT ( x ) | ] , ( 5 ) where |JT ( x ) | is the determinant of the Jacobian of T . The key insight from this lemma is that H ( PX ) is a constant with respect to T and can thus be ignored when optimizing T , while EPX [ log |JT ( x ) | ] can be approximated using only samples from PX .
This paper proposes a flow-based method for the unsupervised data set alignment problem. It firstly reveals that the minimization problem over density models can be addressed by optimizing the upper bound of generalized JSD. Based on this theoretical result, the authors propose a new regularizer for the multi-distribution alignment problem. Compared to prior work, e.g., AlignFlow and LRMF, the authors derive a more general framework for the unsupervised data set alignment problem. The authors also provide extensive experiments to verify its effectiveness and superiority.
SP:32b0b62a233b816c8405deb383aed5e3a7d1cf0b
Unsupervised Learning of Full-Waveform Inversion: Connecting CNN and Partial Differential Equation in a Loop
1 INTRODUCTION . Geophysical properties ( such as velocity , impedance , and density ) play an important role in various subsurface applications including subsurface energy exploration , carbon capture and sequestration , estimating pathways of subsurface contaminant transport , and earthquake early warning systems to provide critical alerts . These properties can be obtained via seismic surveys , i.e. , receiving reflected/refracted seismic waves generated by a controlled source . This paper focuses on reconstructing subsurface velocity maps from seismic measurements . Mathematically , the velocity map and seismic measurements are correlated through an acoustic-wave equation ( a second-order partial differential equation ) as follows : ∇2p ( r , t ) − 1 v ( r ) 2 ∂2p ( r , t ) ∂t2 = s ( r , t ) , ( 1 ) where p ( r , t ) denotes the pressure wavefield at spatial location r and time t , v ( r ) represents the velocity map of wave propagation , and s ( r , t ) is the source term . Full Waveform Inversion ( FWI ) is a methodology that determines high-resolution velocity maps v ( r ) of the subsurface via matching synthetic seismic waveforms to raw recorded seismic data p ( r̃ , t ) , where r̃ represents the locations of the seismic receivers . A velocity map describes the wave propagation speed in the subsurface region of interest . An example in 2D scenario is shown in Figure 2a . Particularly , the x-axis represents the horizontal offset of a region , and the y-axis stands for the depth . The regions with the same geologic information ( velocity ) are called a layer in velocity maps . In a sample of seismic measurements ( termed a shot gather in geophysics ) as depicted in Figure 2b , each grid in the x-axis represents a receiver , and the value in the y-axis is a 1D time-series signal recorded by each receiver . Existing approaches solve FWI in two directions : physics-driven and data-driven . Physics-driven approaches rely on the forward modeling of Equation 1 , which simulates seismic data from velocity map by finite difference . They optimize velocity map per seismic sample , by iteratively updating velocity map from an initial guess such that simulated seismic data ( after forward modeling ) is close to the input seismic measurements . However , these methods are slow and difficult to scale up as the iterative optimization is required per input sample . Data-driven approaches consider FWI problem as an image-to-image translation task and apply convolution neural networks ( CNN ) to learn the mapping from seismic data to velocity maps ( Wu & Lin , 2019 ) . The limitation of these methods is that they require paired seismic data and velocity maps to train the network . Such ground truth velocity maps are hardly accessible in real-world scenario because generating them is extremely time-consuming even for domain experts . In this work , we leverage advantages of both directions ( physics + data driven ) and shift the paradigm to unsupervised learning of FWI by connecting forward modeling and CNN in a loop . Specifically , as shown in Figure 1 , a CNN is trained to predict a velocity map from seismic data , which is followed by forward modeling to reconstruct seismic data . The loop is closed by applying reconstruction loss on seismic data to train the CNN . Due to the differentiable forward modeling , the whole loop can be trained end-to-end . Note that the CNN is trained in an unsupervised manner , as the ground truth of velocity map is not needed . We name our unsupervised approach as UPFWI ( Unsupervised Physical-informed Full Waveform Inversion ) . Additionally , we find that perceptual loss ( Johnson et al. , 2016 ) is crucial to improve the overall quality of predicted velocity maps due to its superior capability in preserving the coherence of the reconstructed waveforms comparing with other losses like Mean Squared Error ( MSE ) and Mean Absolute Error ( MAE ) . To encourage fair comparison on a large dataset with more complicate geological structures , we introduce a new dataset named OpenFWI , which contains 60,000 labeled data ( velocity map and seismic data pairs ) and 48,000 unlabeled data ( seismic data alone ) . 30,000 of those velocity maps contain curved layers that are more challenge for inversion . We also add geological faults with various shift distances and tilting angles to all velocity maps . We evaluate our method on this large dataset . Experimental results show that for velocity maps with flat layers , our UPFWI trained with 48,000 unlabeled data achieves 1146.09 in MSE , which is 26.77 % smaller than that of the supervised method , and 0.9895 in Structured Similarity ( SSIM ) , which is 0.0021 higher than the score of the supervised method ; for velocity maps with curved layers , our UPFWI achieves 3639.96 in MSE , which is 28.30 % smaller than that of supervised method , and 0.9756 in SSIM , which is 0.0057 higher than the score of the supervised method . Our contribution is summarized as follows : • We propose to solve FWI in an unsupervised manner by connecting CNN and forward modeling in a loop , enabling end-to-end learning from seismic data alone . • We find that perceptual loss is helpful to boost the performance comparable to the supervised counterpart . • We introduce a large-scale dataset as benchmark to encourage further research on FWI . 2 PRELIMINARIES OF FULL WAVEFORM INVERSION ( FWI ) . The goal of FWI in geophysics is to invert for a velocity map v ∈ RW×H from seismic measurements p ∈ RS×T×R , where W and H denote the horizontal and vertical dimensions of the velocity map , S is the number of sources that are used to generate waves during data acquisition process , T denotes the number of samples in the wavefields recorded by each receiver , and R represents the total number of receivers . In conventional physics-driven methods , forward modeling is commonly referred to the process of simulating seismic data p̃ from given estimated velocity maps v̂ . For simplicity , the forward acoustic-wave operator f can be expressed as p̃ = f ( v̂ ) . ( 2 ) Given this forward operator f , the physics-driven FWI can be posed as a minimization problem ( Virieux & Operto , 2009 ) E ( v̂ ) = min v̂ { ||p− f ( v̂ ) ||22 + λR ( v̂ ) } , ( 3 ) where ||p − f ( v̂ ) ||22 is the the ` 2 distance between true seismic measurements p and the corresponding simulated data f ( v̂ ) , λ is a regularization parameter and R ( v̂ ) is the regularization term which is often the ` 2 or ` 1 norm of v̂ . This requires optimization per sample , which is slow as the optimization involves multiple iterations from an initial guess . Data-driven methods leverage convolutional neural networks to directly learn the inverse mapping as ( Adler et al. , 2021 ) v̂ = gθ ( p ) ≈ f−1 ( p ) , ( 4 ) where gθ ( · ) is the approximated inverse operator of f ( · ) parameterized by θ . In practice , gθ is usually implemented as a convolutional neural network ( Adler et al. , 2021 ; Wu & Lin , 2019 ) . This requires paired seismic data and velocity maps for supervised learning . However , the acquisition of large volume of velocity maps in field applications can be extremely challenging and computationally prohibitive . 3 METHOD . In this section , we present our Unsupervised Physics-informed solution ( named UPFWI ) , which connects CNN and forward modeling in a loop . It addresses limitations of both physics-driven and data-driven approaches , as it requires neither optimization at inference ( per sample ) , nor velocity maps as supervision . 3.1 UPFWI : CONNECTING CNN AND FORWARD MODELING . As depicted in Figure 1 , our UPFWI connects a CNN gθ and a differentiable forward operator f to form a loop . In particular , the CNN takes seismic measurements p as input and generates the corresponding velocity map v̂ . We then apply forward acoustic-wave operator f ( see Equation 2 ) on the estimated velocity map v̂ to reconstruct the seismic data p̃ . Typically , the forward modeling employs finite difference ( FD ) to discretize the wave equation ( Equation 1 ) . The details of forward modeling will be discussed in the subsection 3.3 . The loop is closed by the reconstruction loss between input seismic data p and the reconstructed seismic data p̃ = f ( gθ ( p ) ) . Notice that the ground truth of velocity maps v is not involved , and the training process is unsupervised . Since the forward operator is differentiable , the reconstruction loss can be backpropagated ( via gradient descent ) to update the parameters θ in the CNN . 3.2 CNN NETWORK ARCHITECTURE . We use an encoder-decoder structured CNN ( similar to Wu & Lin ( 2019 ) and Zhang & Lin ( 2020 ) ) to model the mapping from seismic data p ∈ RS×T×R to velocity map v ∈ RW×H . The encoder compresses the seismic input and then transforms the latent vector to build the velocity estimation through a decoder . Since the number of receivers R and the number of timesteps T in seismic measurements are unbalanced ( T R ) , we first stack a 7×1 and six 3×1 convolutional layers ( with stride 2 every the other layer to reduce dimension ) to extract temporal features until the temporal dimension is close to R. Then , six 3×3 convolutional layers are followed to extract spatial-temporal features . The resolution is down-sampled every the other layer by using stride 2 . Next , the feature map is flattened and a fully connected layer is applied to generate the latent feature with dimension 512 . The decoder first repeats the latent vector by 25 times to generate a 5×5×512 tensor . Then it is followed by five 3×3 convolutional layers with nearest neighbor upsampling in between , resulting in a feature map with size 80×80×32 . Finally , we center-crop the feature map ( 70×70 ) and apply a 3×3 convolution layer to output a single channel velocity map . All the aforementioned convolutional and upsampling layers are followed by a batch normalization ( Ioffe & Szegedy , 2015 ) and a leaky ReLU ( Nair & Hinton , 2010 ) as activation function . 3.3 DIFFERENTIABLE FORWARD MODELING . We apply the standard finite difference ( FD ) in the space domain and time domain to discretize the original wave equation . Specifically , the second-order central finite difference in time domain ( ∂ 2p ( r , t ) ∂t2 in Equation 1 ) is approximated as follows : ∂2p ( r , t ) ∂t2 ≈ 1 ( ∆t ) 2 ( pt+1r − 2ptr + pt−1r ) +O [ ( ∆t ) 2 ] , ( 5 ) where ptr denotes the pressure wavefields at timestep t , and p t+1 r and p t−1 r are the wavefields at t+ ∆t and t−∆t , respectively . The Laplacian of p ( r , t ) can be estimated in the similar way on the space domain ( see Appendix ) . Therefore , the wave equation can then be written as pt+1r = ( 2− v2∇2 ) ptr − pt−1r + v2 ( ∆t ) 2str , ( 6 ) where∇2 here denotes the discrete Laplace operator . The initial wavefield at the timestep 0 is set zero ( i.e . p0r = 0 ) . Thus , the gradient of loss L with respect to estimated velocity at spatial location r can be computed using the chain rule as ∂L ∂v ( r ) = T∑ t=0 [ ∂L ∂p ( r , t ) ] ∂p ( r , t ) ∂v ( r ) , ( 7 ) where T indicates the length of the sequence .
The paper presents a method for full-waveform inversion (an inverse problem in seismic imaging) that combines a convolutional neural network (CNN) with a physics-based forward modeling operator. As opposed to other work which directly learns the inverse mapping from measurements to the sought-after velocity parameter, the authors propose an "unsupervised" approach. Here, the CNN takes the seismic measurements as input and predicts a velocity field. Then, the physics-based forward operator produces measurements which can be compared to the original measurements to train the network. The authors evaluate their method on a new simulated dataset and show that it can outperform other supervised approaches.
SP:4d58f330415e44e06446eaccd907b9fa0861f40e
Unsupervised Learning of Full-Waveform Inversion: Connecting CNN and Partial Differential Equation in a Loop
1 INTRODUCTION . Geophysical properties ( such as velocity , impedance , and density ) play an important role in various subsurface applications including subsurface energy exploration , carbon capture and sequestration , estimating pathways of subsurface contaminant transport , and earthquake early warning systems to provide critical alerts . These properties can be obtained via seismic surveys , i.e. , receiving reflected/refracted seismic waves generated by a controlled source . This paper focuses on reconstructing subsurface velocity maps from seismic measurements . Mathematically , the velocity map and seismic measurements are correlated through an acoustic-wave equation ( a second-order partial differential equation ) as follows : ∇2p ( r , t ) − 1 v ( r ) 2 ∂2p ( r , t ) ∂t2 = s ( r , t ) , ( 1 ) where p ( r , t ) denotes the pressure wavefield at spatial location r and time t , v ( r ) represents the velocity map of wave propagation , and s ( r , t ) is the source term . Full Waveform Inversion ( FWI ) is a methodology that determines high-resolution velocity maps v ( r ) of the subsurface via matching synthetic seismic waveforms to raw recorded seismic data p ( r̃ , t ) , where r̃ represents the locations of the seismic receivers . A velocity map describes the wave propagation speed in the subsurface region of interest . An example in 2D scenario is shown in Figure 2a . Particularly , the x-axis represents the horizontal offset of a region , and the y-axis stands for the depth . The regions with the same geologic information ( velocity ) are called a layer in velocity maps . In a sample of seismic measurements ( termed a shot gather in geophysics ) as depicted in Figure 2b , each grid in the x-axis represents a receiver , and the value in the y-axis is a 1D time-series signal recorded by each receiver . Existing approaches solve FWI in two directions : physics-driven and data-driven . Physics-driven approaches rely on the forward modeling of Equation 1 , which simulates seismic data from velocity map by finite difference . They optimize velocity map per seismic sample , by iteratively updating velocity map from an initial guess such that simulated seismic data ( after forward modeling ) is close to the input seismic measurements . However , these methods are slow and difficult to scale up as the iterative optimization is required per input sample . Data-driven approaches consider FWI problem as an image-to-image translation task and apply convolution neural networks ( CNN ) to learn the mapping from seismic data to velocity maps ( Wu & Lin , 2019 ) . The limitation of these methods is that they require paired seismic data and velocity maps to train the network . Such ground truth velocity maps are hardly accessible in real-world scenario because generating them is extremely time-consuming even for domain experts . In this work , we leverage advantages of both directions ( physics + data driven ) and shift the paradigm to unsupervised learning of FWI by connecting forward modeling and CNN in a loop . Specifically , as shown in Figure 1 , a CNN is trained to predict a velocity map from seismic data , which is followed by forward modeling to reconstruct seismic data . The loop is closed by applying reconstruction loss on seismic data to train the CNN . Due to the differentiable forward modeling , the whole loop can be trained end-to-end . Note that the CNN is trained in an unsupervised manner , as the ground truth of velocity map is not needed . We name our unsupervised approach as UPFWI ( Unsupervised Physical-informed Full Waveform Inversion ) . Additionally , we find that perceptual loss ( Johnson et al. , 2016 ) is crucial to improve the overall quality of predicted velocity maps due to its superior capability in preserving the coherence of the reconstructed waveforms comparing with other losses like Mean Squared Error ( MSE ) and Mean Absolute Error ( MAE ) . To encourage fair comparison on a large dataset with more complicate geological structures , we introduce a new dataset named OpenFWI , which contains 60,000 labeled data ( velocity map and seismic data pairs ) and 48,000 unlabeled data ( seismic data alone ) . 30,000 of those velocity maps contain curved layers that are more challenge for inversion . We also add geological faults with various shift distances and tilting angles to all velocity maps . We evaluate our method on this large dataset . Experimental results show that for velocity maps with flat layers , our UPFWI trained with 48,000 unlabeled data achieves 1146.09 in MSE , which is 26.77 % smaller than that of the supervised method , and 0.9895 in Structured Similarity ( SSIM ) , which is 0.0021 higher than the score of the supervised method ; for velocity maps with curved layers , our UPFWI achieves 3639.96 in MSE , which is 28.30 % smaller than that of supervised method , and 0.9756 in SSIM , which is 0.0057 higher than the score of the supervised method . Our contribution is summarized as follows : • We propose to solve FWI in an unsupervised manner by connecting CNN and forward modeling in a loop , enabling end-to-end learning from seismic data alone . • We find that perceptual loss is helpful to boost the performance comparable to the supervised counterpart . • We introduce a large-scale dataset as benchmark to encourage further research on FWI . 2 PRELIMINARIES OF FULL WAVEFORM INVERSION ( FWI ) . The goal of FWI in geophysics is to invert for a velocity map v ∈ RW×H from seismic measurements p ∈ RS×T×R , where W and H denote the horizontal and vertical dimensions of the velocity map , S is the number of sources that are used to generate waves during data acquisition process , T denotes the number of samples in the wavefields recorded by each receiver , and R represents the total number of receivers . In conventional physics-driven methods , forward modeling is commonly referred to the process of simulating seismic data p̃ from given estimated velocity maps v̂ . For simplicity , the forward acoustic-wave operator f can be expressed as p̃ = f ( v̂ ) . ( 2 ) Given this forward operator f , the physics-driven FWI can be posed as a minimization problem ( Virieux & Operto , 2009 ) E ( v̂ ) = min v̂ { ||p− f ( v̂ ) ||22 + λR ( v̂ ) } , ( 3 ) where ||p − f ( v̂ ) ||22 is the the ` 2 distance between true seismic measurements p and the corresponding simulated data f ( v̂ ) , λ is a regularization parameter and R ( v̂ ) is the regularization term which is often the ` 2 or ` 1 norm of v̂ . This requires optimization per sample , which is slow as the optimization involves multiple iterations from an initial guess . Data-driven methods leverage convolutional neural networks to directly learn the inverse mapping as ( Adler et al. , 2021 ) v̂ = gθ ( p ) ≈ f−1 ( p ) , ( 4 ) where gθ ( · ) is the approximated inverse operator of f ( · ) parameterized by θ . In practice , gθ is usually implemented as a convolutional neural network ( Adler et al. , 2021 ; Wu & Lin , 2019 ) . This requires paired seismic data and velocity maps for supervised learning . However , the acquisition of large volume of velocity maps in field applications can be extremely challenging and computationally prohibitive . 3 METHOD . In this section , we present our Unsupervised Physics-informed solution ( named UPFWI ) , which connects CNN and forward modeling in a loop . It addresses limitations of both physics-driven and data-driven approaches , as it requires neither optimization at inference ( per sample ) , nor velocity maps as supervision . 3.1 UPFWI : CONNECTING CNN AND FORWARD MODELING . As depicted in Figure 1 , our UPFWI connects a CNN gθ and a differentiable forward operator f to form a loop . In particular , the CNN takes seismic measurements p as input and generates the corresponding velocity map v̂ . We then apply forward acoustic-wave operator f ( see Equation 2 ) on the estimated velocity map v̂ to reconstruct the seismic data p̃ . Typically , the forward modeling employs finite difference ( FD ) to discretize the wave equation ( Equation 1 ) . The details of forward modeling will be discussed in the subsection 3.3 . The loop is closed by the reconstruction loss between input seismic data p and the reconstructed seismic data p̃ = f ( gθ ( p ) ) . Notice that the ground truth of velocity maps v is not involved , and the training process is unsupervised . Since the forward operator is differentiable , the reconstruction loss can be backpropagated ( via gradient descent ) to update the parameters θ in the CNN . 3.2 CNN NETWORK ARCHITECTURE . We use an encoder-decoder structured CNN ( similar to Wu & Lin ( 2019 ) and Zhang & Lin ( 2020 ) ) to model the mapping from seismic data p ∈ RS×T×R to velocity map v ∈ RW×H . The encoder compresses the seismic input and then transforms the latent vector to build the velocity estimation through a decoder . Since the number of receivers R and the number of timesteps T in seismic measurements are unbalanced ( T R ) , we first stack a 7×1 and six 3×1 convolutional layers ( with stride 2 every the other layer to reduce dimension ) to extract temporal features until the temporal dimension is close to R. Then , six 3×3 convolutional layers are followed to extract spatial-temporal features . The resolution is down-sampled every the other layer by using stride 2 . Next , the feature map is flattened and a fully connected layer is applied to generate the latent feature with dimension 512 . The decoder first repeats the latent vector by 25 times to generate a 5×5×512 tensor . Then it is followed by five 3×3 convolutional layers with nearest neighbor upsampling in between , resulting in a feature map with size 80×80×32 . Finally , we center-crop the feature map ( 70×70 ) and apply a 3×3 convolution layer to output a single channel velocity map . All the aforementioned convolutional and upsampling layers are followed by a batch normalization ( Ioffe & Szegedy , 2015 ) and a leaky ReLU ( Nair & Hinton , 2010 ) as activation function . 3.3 DIFFERENTIABLE FORWARD MODELING . We apply the standard finite difference ( FD ) in the space domain and time domain to discretize the original wave equation . Specifically , the second-order central finite difference in time domain ( ∂ 2p ( r , t ) ∂t2 in Equation 1 ) is approximated as follows : ∂2p ( r , t ) ∂t2 ≈ 1 ( ∆t ) 2 ( pt+1r − 2ptr + pt−1r ) +O [ ( ∆t ) 2 ] , ( 5 ) where ptr denotes the pressure wavefields at timestep t , and p t+1 r and p t−1 r are the wavefields at t+ ∆t and t−∆t , respectively . The Laplacian of p ( r , t ) can be estimated in the similar way on the space domain ( see Appendix ) . Therefore , the wave equation can then be written as pt+1r = ( 2− v2∇2 ) ptr − pt−1r + v2 ( ∆t ) 2str , ( 6 ) where∇2 here denotes the discrete Laplace operator . The initial wavefield at the timestep 0 is set zero ( i.e . p0r = 0 ) . Thus , the gradient of loss L with respect to estimated velocity at spatial location r can be computed using the chain rule as ∂L ∂v ( r ) = T∑ t=0 [ ∂L ∂p ( r , t ) ] ∂p ( r , t ) ∂v ( r ) , ( 7 ) where T indicates the length of the sequence .
The paper introduces a novel way to solve Full-Waveform Inversion problem which is a common problem in geological surveys. Their method is based on CNN, giving a reconstruction of velocity field for measured seismic data, and the loss function which connects CNN to a discretized version of the governing partial differential equations (the wave equation). The power of the method lies in unsupervised learning which allows one to use more data without expensive data labelling. This is demonstrated using numerical results using their simulated seismic dataset.
SP:4d58f330415e44e06446eaccd907b9fa0861f40e
Decoupled Adaptation for Cross-Domain Object Detection
1 INTRODUCTION . The object detection task has aroused great interest due to its wide applications . In the past few years , the development of deep neural networks has boosted the performance of object detectors [ 33 ; 15 ; 41 ] . While these detectors have achieved excellent performance on the benchmark datasets [ 11 ; 31 ] , object detection in the real world still faces challenges from the large variance in viewpoints , object appearance , backgrounds , illumination , image quality , etc . Such domain shifts have been observed to cause significant performance drop [ 8 ] . Thus , some work uses domain adaptation [ 39 ] to transfer a detector from a source domain , where sufficient training data is available , to a target domain where only unlabeled data is available [ 8 ; 44 ] . This technique successfully improves the performance of the detector on the target domain . However , the improvement of domain adaptation in object detection remains relatively mild compared with that in object classification . The inherent challenges come from three aspects . Data challenge : what to adapt in the object detection task is unknown . Instance feature adaptation in the object level ( Figure 1 ( a ) ) might confuse the features of the foreground and the background since the generated proposals may not be true objects and many true objects might be missing ( Figure 5 ) . Global feature adaptation in the image level ( Figure 1 ( b ) ) is likely to mix up features of different objects since each input image of detection has multiple objects . Local feature adaptation in the pixel level ( Figure 1 ( c ) ) can alleviate domain shift when the shift is primarily low-level , yet it will struggle when the domains are different at the semantic level . Architecture challenge : while the above adaptation methods introduce domain discriminators and gradient reverse layers [ 12 ] into the detector architecture to encourage domaininvariant features , the discriminability of features might get deteriorated [ 6 ; 5 ] , which will greatly influence the localization and the classification of the detectors . Besides , where to place these modules in the detection architecture has a great impact on the final performance but is a little tricky . Therefore , the scalability of these methods to different detection architectures is not so satisfactory . Task challenge : object detection is a multi-task learning problem , consisting of both classification and localization . Yet previous adaptation algorithms mainly explored the category adaptation , and it ’ s still difficult to obtain an adaptation model suitable for different tasks at the same time . To overcome these challenges , we propose a general framework – D-adapt , namely Decoupled Adaptation . Since adversarial alignment directly on the features of the detector might hurt its dis- Published as a conference paper at ICLR 2022 Back bone ROI RPN Detector Back bone ROI RPN Detector Back bone ROI RPN Detector ; source ortarget ? Global Discriminator ; Local Discriminator G R L features G R L features features Instance Discriminator ; G R L ( a ) Instance adapt Back bone ROI RPN Detector Back bone ROI RPN Detector Back bone ROI RPN Detector ; source ortarget ? Global Discriminator ; Local Discriminator G R L features G R L features features Instance Discriminator ; G R L ( b ) Global adapt Back bone ROI RPN Detector Back bone ROI RPN Detector Back bone ROI RPN Detector ; source ortarget ? Global Discriminator ; Local Discriminator G R L features G R L features features Instance Discrim nator ; G R L ( c ) Local adapt Back bone ROI RPN Detector bbox labels Image Back bone Head D Category Adaptor Back bone Head AdvHead BBox Adaptor category labels proposals foreground proposals : data flow : tensor flow ( d ) Decouple adapt criminability ( architecture challenge ) , we decouple the adversarial adaptation from the training of the detector by introducing a parameter-independent category adaptor ( see Figure 1 ( d ) ) . To tackle the task challenge , we introduce another bounding box adaptor that ’ s decoupled from both the detector and the category adaptor . To tackle the data challenge , we propose to adjust the object-level data distribution for specific adaptation tasks . For example , in the category adaptation step , we encourage the input proposals to have IoU1 close to 0 or 1 to better satisfy the low-density separation assumption , while in the bounding box adaptation step , we encourage the input proposals to have IoU between 0.5 and 1 to ease the optimization of the bounding box localization task . The contributions of this work are summarized as three-fold . ( 1 ) We introduce D-adapt framework for cross-domain object detection , which is general for both two-stage and single-stage detectors . ( 2 ) We propose an effective method to adapt the bounding box localization task , which is ignored by existing methods but is crucial for achieving superior final performance . ( 3 ) We conduct extensive experiments and validate that our method achieves state-of-the-art performance on four object detection tasks , and yields 17 % and 21 % relative improvement on Clipart1k and Comic2k . 2 RELATED WORK . Generic domain adaptation for classification . Domain adaptation is proposed to overcome the distribution shift across domains . In the classification setting , most of the domain adaptation methods are based on Moment Matching or Adversarial Adaptation . Moment Matching methods [ 51 ; 36 ] align distributions by minimizing the distribution discrepancy in the feature space . Taking the same spirit as Generative Adversarial Networks [ 16 ] , Adversarial Adaptation [ 12 ; 37 ] introduces a domain discriminator to distinguish the source from the target , then the feature extractor is encouraged to fool the discriminator and learn domain invariant features . However , directly applying these methods to object detection yields an unsatisfactory effect . The difficulty is that the image of object detection usually contains multiple objects , thus the features of an image can have complex multimodal structures [ 20 ; 59 ; 5 ] , making the image-level feature alignment problematic [ 59 ; 20 ] . Generic domain adaptation for regression . Most domain adaptation methods designed for classification do not work well on regression tasks since the regression space is continuous with no clear decision boundary [ 22 ] . Some specific regression algorithms are proposed , including importance weighting [ 55 ] or learning invariant representations [ 40 ; 38 ] . RSD [ 7 ] defines a geometrical distance for learning transferable representations and disparity discrepancy [ 58 ] proposes an upper bound for the distribution distance in the regression problems . Yet previous methods are mainly tested on simple tasks while this paper extends domain adaptation to the object localization tasks . Domain adaptation for object detection . DA-Faster [ 8 ] performs feature alignment at both image-level and instance-level . SWDA [ 44 ] proposes that strong alignment of the local features is more effective than the strong alignment of the global features . Hsu et al . [ 20 ] carries out center- 1The Intersection-over-Union between the proposals and the ground-truth instance . aware alignment by paying more attention to foreground pixels . HTCN [ 5 ] calibrates the transferability of feature representations hierarchically . Zheng et al . [ 60 ] proposes to extract foreground regions and adopts coarse-to-fine feature adaptation . ATF [ 19 ] introduces an asymmetric tri-way approach to account for the differences in labeling statistics between domains . CRDA [ 54 ] and MCAR [ 59 ] use multi-label classification as an auxiliary task to regularize the features . However , although the auxiliary task of outputting domain-invariant features to fool a domain discriminator in most aforementioned methods can improve the transferability , it also impairs the discriminability of the detector . In contrast , we decouple the adversarial adaptation and the training of the detector , thus the adaptors could specialize in transfer between domains , and the detector could focus on improving the discriminability while enjoying the transferability brought by the adaptors . Self-training with pseudo labels . Pseudo-labeling [ 30 ] , which leverages the model itself to obtain labels on unlabeled data , is widely used in self-training . To generate reliable pseudo labels , temporal ensembling [ 29 ] maintains an exponential moving average prediction for each sample , while the mean-teacher [ 50 ] averages model weights at different training iterations to get a teacher model . Deep mutual learning [ 57 ] trains a pool of student models with supervisions from each other . FixMatch [ 48 ] uses the model ’ s predictions on weakly-augmented images to generate pseudo-labels for the strongly-augmented ones . Unbiased Teacher [ 35 ] introduces the teacher-student paradigm to Semi-Supervised Object Detection ( SS-OD ) . When some image-level labels exist , the performance can be further improved by encoding correlations between coarse-grained and fine-grained classes [ 56 ] , employing noise-tolerant training strategies [ 13 ] , or learning a mapping from weaklysupervised to fully-supervised detectors [ 24 ] in SS-OD . Recent works [ 21 ; 25 ; 26 ] utilize selftraining in cross-domain object detection and take the most confident predictions as pseudo labels . MTOR [ 3 ] uses the mean teacher framework and UMT [ 10 ] adopts distillation and CycleGAN [ 61 ] in self-training . However , self-training suffers from the problem of confirmation bias [ 1 ; 4 ] : the performance of the student will be limited by that of the teacher . Although pseudo labels are also used in our proposed D-adapt , they are generated from adaptors that have independent parameters and different tasks from the detector , thereby alleviating the confirmation bias of the overly tight relationship in self-training . 3 PROPOSED METHOD . In supervised object detection , we have a labeled source domain Ds = { ( Xis , Bis , Yis ) } ns i=1 , where Xis is the image , B i s is the bounding box coordinates , and Y i s is the categories . The detector G det is trained with Ldets , which consists of four losses in Faster RCNN [ 42 ] : the RPN classification loss Lrpncls , the RPN regression loss L rpn reg , the RoI classification loss Lroicls and the RoI regression loss Lroireg , Ldets = E ( Xs , Bs , Ys ) ∈DsL rpn cls + L rpn reg + Lroicls + Lroireg . ( 1 ) In cross-domain object detection , there exists another unlabeled target domain Dt = { Xit } nt i=1 that follows different distributions from Ds . The objective of Gdet is to improve the performance on Dt . 3.1 D-ADAPT FRAMEWORK . To deal with the architecture challenge mentioned in Section 1 , we propose the D-adapt framework , which has three steps : ( 1 ) decouple the original cross-domain detection problem into several subproblems ( 2 ) design adaptors to solve each sub-problem ( 3 ) coordinate the relationships between different adaptors and the detector . Since adaptation might hurt the discriminability of the detector , we decouple the category adaptation from the training of the detector by introducing a parameter-independent category adaptor ( see Figure 1 ( d ) ) . The adaptation is only performed on the features of the category adaptor , thus will not hurt the detector ’ s ability to locate objects . To fill the blank of regression domain adaptation in object detection , we need to perform adaptation on the bounding box regression . Yet feature visualization in Figure 6 ( c ) reveals that features that contain both category and location information do not have an obvious cluster structure , and alignment might hurt its discriminability . Besides , the common category adaptation methods are also not effective on regression tasks [ 22 ] , thus we decouple category adaptation and the bounding box adaptation to avoid their interfering with each other . Section 3.2 and 3.3 will introduce the design of category adaptor and box adaptor in details . In this section , we will assume that such two adaptors are already obtained . To coordinate the adaptation on different tasks , we maintain a cascading relationship between the adaptors . In the cascading structure , the later adaptors can utilize the information obtained by the previous adaptors for better adaptation , e.g . in the box adaptation step , the category adaptor will select foreground proposals to facilitate the training of the box adaptor . Compared with the multi-task learning relationship where we need to balance the weights of different adaptation losses carefully , the cascade relationship greatly reduces the difficulty of hyper-parameter selection since each adaptor has only one adaptation loss . Since the adaptors are specifically designed for cross-domain tasks , their predictions on the target domain can serve as pseudo labels for the detector . On the other hand , the detector generates proposals to train the adaptors and higher-quality proposals can improve the adaptation performance ( see Table 5 for details ) . And this enables the self-feedback relationship between the detector and the adaptors . For a good initialization of this self-feedback loop , we first pre-train the detector Gdet on the source domain with Ldets . Using the pre-trained Gdet , we can derive two new data distributions , the source proposal distribution Dprops and the target proposal distribution Dpropt . Each proposal consists of a crop of the image x2 , its corresponding bounding box bdet , predicted category ydet and the class confidence cdet . We can annotate each source-domain proposal xs ∈ Dprops with a ground truth bounding box bgts and category label y gt s , similar to labeling each RoI in Fast RCNN [ 14 ] , and then use these labels to train the adaptors . In turn , for each target proposal xt ∈ Dpropt , adaptors will provide category pseudo label yclst and box pseudo label b reg t to train the RoI heads , Ldett = E ( Xt , bdett , yclst , bregt ) ∈Dpropt L roi cls ( Xt , b det t , y cls t ) + Lroicls ( Xt , b reg t , y cls t ) +Ifg ( yclst ) · Lroireg ( Xt , bdett , b reg t ) , ( 2 ) Algorithm 1 : D-adapt Training Pipeline . input : Source domainDs and target domainDt , number of iterations T output : Cross-domain object detector Gdet initialize the object detector Gdet by optimizing with Ldets ; for t← 1 to T do generate proposalsDprops andD prop t for each sample inDs andDt by Gdet ; for each mini-batch inDprops andD prop t do train the category adaptor Gcls ; end generate category label for each proposal inDpropt ; generate foreground proposalsDfgs andD fg t fromDprops andD prop t ; for each mini-batch inDfgs andD fg t do train the bounding box adaptor Greg ; end generate bounding box label for each proposal inDfgt ; train the object detector Gdet by optimizing with Ldett ; end where Ifg is a function that indicates whether it is a foreground class . Note that regression loss is activated only for foreground anchors . After obtaining a better detector by optimizing Equation 2 , we can generate higher-quality proposals , which facilitate better category adaptation and bounding box adaptation . This process can iterate multiple times and the detailed optimization procedures are summarized in Algorithm 1 . Note that our D-adapt framework does not introduce any computational overhead in the inference phase , since the adaptors are independent of the detector and can be removed during detection . Also , D-adapt does not depend on a specific detector , thus the detector can be replaced by SSD [ 34 ] , RetinaNet [ 32 ] , or other detectors .
Paper addresses the problem of cross-domain object detection. The formed source domain detectors (in the form of Faster R-CNN), learned in a supervised manner, are adopted to perform well on the target domain where no annotations are available. The key to the approach is separate adaptation of the classification head and the regression head within Faster RCNN. This leads to the proposed D-adapt, namely Decoupled Adaptation, that decouples the adversarial adaptation and the training of the detector. In addition, classification and detection heads are adopted in tandem. Experiments show that the proposed D-adapt strategy achieves state-of-the-art results on four cross-domain object detection tasks.
SP:9766ea2942d933a8bcf240338cbadedf9d4aa897
Decoupled Adaptation for Cross-Domain Object Detection
1 INTRODUCTION . The object detection task has aroused great interest due to its wide applications . In the past few years , the development of deep neural networks has boosted the performance of object detectors [ 33 ; 15 ; 41 ] . While these detectors have achieved excellent performance on the benchmark datasets [ 11 ; 31 ] , object detection in the real world still faces challenges from the large variance in viewpoints , object appearance , backgrounds , illumination , image quality , etc . Such domain shifts have been observed to cause significant performance drop [ 8 ] . Thus , some work uses domain adaptation [ 39 ] to transfer a detector from a source domain , where sufficient training data is available , to a target domain where only unlabeled data is available [ 8 ; 44 ] . This technique successfully improves the performance of the detector on the target domain . However , the improvement of domain adaptation in object detection remains relatively mild compared with that in object classification . The inherent challenges come from three aspects . Data challenge : what to adapt in the object detection task is unknown . Instance feature adaptation in the object level ( Figure 1 ( a ) ) might confuse the features of the foreground and the background since the generated proposals may not be true objects and many true objects might be missing ( Figure 5 ) . Global feature adaptation in the image level ( Figure 1 ( b ) ) is likely to mix up features of different objects since each input image of detection has multiple objects . Local feature adaptation in the pixel level ( Figure 1 ( c ) ) can alleviate domain shift when the shift is primarily low-level , yet it will struggle when the domains are different at the semantic level . Architecture challenge : while the above adaptation methods introduce domain discriminators and gradient reverse layers [ 12 ] into the detector architecture to encourage domaininvariant features , the discriminability of features might get deteriorated [ 6 ; 5 ] , which will greatly influence the localization and the classification of the detectors . Besides , where to place these modules in the detection architecture has a great impact on the final performance but is a little tricky . Therefore , the scalability of these methods to different detection architectures is not so satisfactory . Task challenge : object detection is a multi-task learning problem , consisting of both classification and localization . Yet previous adaptation algorithms mainly explored the category adaptation , and it ’ s still difficult to obtain an adaptation model suitable for different tasks at the same time . To overcome these challenges , we propose a general framework – D-adapt , namely Decoupled Adaptation . Since adversarial alignment directly on the features of the detector might hurt its dis- Published as a conference paper at ICLR 2022 Back bone ROI RPN Detector Back bone ROI RPN Detector Back bone ROI RPN Detector ; source ortarget ? Global Discriminator ; Local Discriminator G R L features G R L features features Instance Discriminator ; G R L ( a ) Instance adapt Back bone ROI RPN Detector Back bone ROI RPN Detector Back bone ROI RPN Detector ; source ortarget ? Global Discriminator ; Local Discriminator G R L features G R L features features Instance Discriminator ; G R L ( b ) Global adapt Back bone ROI RPN Detector Back bone ROI RPN Detector Back bone ROI RPN Detector ; source ortarget ? Global Discriminator ; Local Discriminator G R L features G R L features features Instance Discrim nator ; G R L ( c ) Local adapt Back bone ROI RPN Detector bbox labels Image Back bone Head D Category Adaptor Back bone Head AdvHead BBox Adaptor category labels proposals foreground proposals : data flow : tensor flow ( d ) Decouple adapt criminability ( architecture challenge ) , we decouple the adversarial adaptation from the training of the detector by introducing a parameter-independent category adaptor ( see Figure 1 ( d ) ) . To tackle the task challenge , we introduce another bounding box adaptor that ’ s decoupled from both the detector and the category adaptor . To tackle the data challenge , we propose to adjust the object-level data distribution for specific adaptation tasks . For example , in the category adaptation step , we encourage the input proposals to have IoU1 close to 0 or 1 to better satisfy the low-density separation assumption , while in the bounding box adaptation step , we encourage the input proposals to have IoU between 0.5 and 1 to ease the optimization of the bounding box localization task . The contributions of this work are summarized as three-fold . ( 1 ) We introduce D-adapt framework for cross-domain object detection , which is general for both two-stage and single-stage detectors . ( 2 ) We propose an effective method to adapt the bounding box localization task , which is ignored by existing methods but is crucial for achieving superior final performance . ( 3 ) We conduct extensive experiments and validate that our method achieves state-of-the-art performance on four object detection tasks , and yields 17 % and 21 % relative improvement on Clipart1k and Comic2k . 2 RELATED WORK . Generic domain adaptation for classification . Domain adaptation is proposed to overcome the distribution shift across domains . In the classification setting , most of the domain adaptation methods are based on Moment Matching or Adversarial Adaptation . Moment Matching methods [ 51 ; 36 ] align distributions by minimizing the distribution discrepancy in the feature space . Taking the same spirit as Generative Adversarial Networks [ 16 ] , Adversarial Adaptation [ 12 ; 37 ] introduces a domain discriminator to distinguish the source from the target , then the feature extractor is encouraged to fool the discriminator and learn domain invariant features . However , directly applying these methods to object detection yields an unsatisfactory effect . The difficulty is that the image of object detection usually contains multiple objects , thus the features of an image can have complex multimodal structures [ 20 ; 59 ; 5 ] , making the image-level feature alignment problematic [ 59 ; 20 ] . Generic domain adaptation for regression . Most domain adaptation methods designed for classification do not work well on regression tasks since the regression space is continuous with no clear decision boundary [ 22 ] . Some specific regression algorithms are proposed , including importance weighting [ 55 ] or learning invariant representations [ 40 ; 38 ] . RSD [ 7 ] defines a geometrical distance for learning transferable representations and disparity discrepancy [ 58 ] proposes an upper bound for the distribution distance in the regression problems . Yet previous methods are mainly tested on simple tasks while this paper extends domain adaptation to the object localization tasks . Domain adaptation for object detection . DA-Faster [ 8 ] performs feature alignment at both image-level and instance-level . SWDA [ 44 ] proposes that strong alignment of the local features is more effective than the strong alignment of the global features . Hsu et al . [ 20 ] carries out center- 1The Intersection-over-Union between the proposals and the ground-truth instance . aware alignment by paying more attention to foreground pixels . HTCN [ 5 ] calibrates the transferability of feature representations hierarchically . Zheng et al . [ 60 ] proposes to extract foreground regions and adopts coarse-to-fine feature adaptation . ATF [ 19 ] introduces an asymmetric tri-way approach to account for the differences in labeling statistics between domains . CRDA [ 54 ] and MCAR [ 59 ] use multi-label classification as an auxiliary task to regularize the features . However , although the auxiliary task of outputting domain-invariant features to fool a domain discriminator in most aforementioned methods can improve the transferability , it also impairs the discriminability of the detector . In contrast , we decouple the adversarial adaptation and the training of the detector , thus the adaptors could specialize in transfer between domains , and the detector could focus on improving the discriminability while enjoying the transferability brought by the adaptors . Self-training with pseudo labels . Pseudo-labeling [ 30 ] , which leverages the model itself to obtain labels on unlabeled data , is widely used in self-training . To generate reliable pseudo labels , temporal ensembling [ 29 ] maintains an exponential moving average prediction for each sample , while the mean-teacher [ 50 ] averages model weights at different training iterations to get a teacher model . Deep mutual learning [ 57 ] trains a pool of student models with supervisions from each other . FixMatch [ 48 ] uses the model ’ s predictions on weakly-augmented images to generate pseudo-labels for the strongly-augmented ones . Unbiased Teacher [ 35 ] introduces the teacher-student paradigm to Semi-Supervised Object Detection ( SS-OD ) . When some image-level labels exist , the performance can be further improved by encoding correlations between coarse-grained and fine-grained classes [ 56 ] , employing noise-tolerant training strategies [ 13 ] , or learning a mapping from weaklysupervised to fully-supervised detectors [ 24 ] in SS-OD . Recent works [ 21 ; 25 ; 26 ] utilize selftraining in cross-domain object detection and take the most confident predictions as pseudo labels . MTOR [ 3 ] uses the mean teacher framework and UMT [ 10 ] adopts distillation and CycleGAN [ 61 ] in self-training . However , self-training suffers from the problem of confirmation bias [ 1 ; 4 ] : the performance of the student will be limited by that of the teacher . Although pseudo labels are also used in our proposed D-adapt , they are generated from adaptors that have independent parameters and different tasks from the detector , thereby alleviating the confirmation bias of the overly tight relationship in self-training . 3 PROPOSED METHOD . In supervised object detection , we have a labeled source domain Ds = { ( Xis , Bis , Yis ) } ns i=1 , where Xis is the image , B i s is the bounding box coordinates , and Y i s is the categories . The detector G det is trained with Ldets , which consists of four losses in Faster RCNN [ 42 ] : the RPN classification loss Lrpncls , the RPN regression loss L rpn reg , the RoI classification loss Lroicls and the RoI regression loss Lroireg , Ldets = E ( Xs , Bs , Ys ) ∈DsL rpn cls + L rpn reg + Lroicls + Lroireg . ( 1 ) In cross-domain object detection , there exists another unlabeled target domain Dt = { Xit } nt i=1 that follows different distributions from Ds . The objective of Gdet is to improve the performance on Dt . 3.1 D-ADAPT FRAMEWORK . To deal with the architecture challenge mentioned in Section 1 , we propose the D-adapt framework , which has three steps : ( 1 ) decouple the original cross-domain detection problem into several subproblems ( 2 ) design adaptors to solve each sub-problem ( 3 ) coordinate the relationships between different adaptors and the detector . Since adaptation might hurt the discriminability of the detector , we decouple the category adaptation from the training of the detector by introducing a parameter-independent category adaptor ( see Figure 1 ( d ) ) . The adaptation is only performed on the features of the category adaptor , thus will not hurt the detector ’ s ability to locate objects . To fill the blank of regression domain adaptation in object detection , we need to perform adaptation on the bounding box regression . Yet feature visualization in Figure 6 ( c ) reveals that features that contain both category and location information do not have an obvious cluster structure , and alignment might hurt its discriminability . Besides , the common category adaptation methods are also not effective on regression tasks [ 22 ] , thus we decouple category adaptation and the bounding box adaptation to avoid their interfering with each other . Section 3.2 and 3.3 will introduce the design of category adaptor and box adaptor in details . In this section , we will assume that such two adaptors are already obtained . To coordinate the adaptation on different tasks , we maintain a cascading relationship between the adaptors . In the cascading structure , the later adaptors can utilize the information obtained by the previous adaptors for better adaptation , e.g . in the box adaptation step , the category adaptor will select foreground proposals to facilitate the training of the box adaptor . Compared with the multi-task learning relationship where we need to balance the weights of different adaptation losses carefully , the cascade relationship greatly reduces the difficulty of hyper-parameter selection since each adaptor has only one adaptation loss . Since the adaptors are specifically designed for cross-domain tasks , their predictions on the target domain can serve as pseudo labels for the detector . On the other hand , the detector generates proposals to train the adaptors and higher-quality proposals can improve the adaptation performance ( see Table 5 for details ) . And this enables the self-feedback relationship between the detector and the adaptors . For a good initialization of this self-feedback loop , we first pre-train the detector Gdet on the source domain with Ldets . Using the pre-trained Gdet , we can derive two new data distributions , the source proposal distribution Dprops and the target proposal distribution Dpropt . Each proposal consists of a crop of the image x2 , its corresponding bounding box bdet , predicted category ydet and the class confidence cdet . We can annotate each source-domain proposal xs ∈ Dprops with a ground truth bounding box bgts and category label y gt s , similar to labeling each RoI in Fast RCNN [ 14 ] , and then use these labels to train the adaptors . In turn , for each target proposal xt ∈ Dpropt , adaptors will provide category pseudo label yclst and box pseudo label b reg t to train the RoI heads , Ldett = E ( Xt , bdett , yclst , bregt ) ∈Dpropt L roi cls ( Xt , b det t , y cls t ) + Lroicls ( Xt , b reg t , y cls t ) +Ifg ( yclst ) · Lroireg ( Xt , bdett , b reg t ) , ( 2 ) Algorithm 1 : D-adapt Training Pipeline . input : Source domainDs and target domainDt , number of iterations T output : Cross-domain object detector Gdet initialize the object detector Gdet by optimizing with Ldets ; for t← 1 to T do generate proposalsDprops andD prop t for each sample inDs andDt by Gdet ; for each mini-batch inDprops andD prop t do train the category adaptor Gcls ; end generate category label for each proposal inDpropt ; generate foreground proposalsDfgs andD fg t fromDprops andD prop t ; for each mini-batch inDfgs andD fg t do train the bounding box adaptor Greg ; end generate bounding box label for each proposal inDfgt ; train the object detector Gdet by optimizing with Ldett ; end where Ifg is a function that indicates whether it is a foreground class . Note that regression loss is activated only for foreground anchors . After obtaining a better detector by optimizing Equation 2 , we can generate higher-quality proposals , which facilitate better category adaptation and bounding box adaptation . This process can iterate multiple times and the detailed optimization procedures are summarized in Algorithm 1 . Note that our D-adapt framework does not introduce any computational overhead in the inference phase , since the adaptors are independent of the detector and can be removed during detection . Also , D-adapt does not depend on a specific detector , thus the detector can be replaced by SSD [ 34 ] , RetinaNet [ 32 ] , or other detectors .
The authors propose a tailored method, named Decoupled Adaptation (D-adapt), for cross-domain object detection. The conventional domain adaptation techniques hurt the discriminability of the detector and ignores the adaptation on bounding box regression. In order to avoid hurting the discriminability of the detector, the authors propose to decouple the adaptation modules from the detector, which achieves the parameter independence. In addition, the authors propose the module for adapting the bounding box regression. Due to the decoupling property, the proposed D-adapt framework is compatible to many off-the-shelf detectors. The experimental results are very promising.
SP:9766ea2942d933a8bcf240338cbadedf9d4aa897
MaGNET: Uniform Sampling from Deep Generative Network Manifolds Without Retraining
Deep Generative Networks ( DGNs ) are extensively employed in Generative Adversarial Networks ( GANs ) , Variational Autoencoders ( VAEs ) , and their variants to approximate the data manifold and distribution . However , training samples are often distributed in a non-uniform fashion on the manifold , due to costs or convenience of collection . For example , the CelebA dataset contains a large fraction of smiling faces . These inconsistencies will be reproduced when sampling from the trained DGN , which is not always preferred , e.g. , for fairness or data augmentation . In response , we develop MaGNET , a novel and theoretically motivated latent space sampler for any pre-trained DGN , that produces samples uniformly distributed on the learned manifold . We perform a range of experiments on various datasets and DGNs , e.g. , for the state-of-the-art StyleGAN2 trained on FFHQ dataset , uniform sampling via MaGNET increases distribution precision and recall by 4.1 % & 3.0 % and decreases gender bias by 41.2 % , without requiring labels or retraining . As uniform distribution does not imply uniform semantic distribution , we also explore separately how semantic attributes of generated samples vary under MaGNET sampling . 1 INTRODUCTION . Deep Generative Networks ( DGNs ) are Deep Networks ( DNs ) trained to learn latent representations of datasets ; such frameworks include Generative Adversarial Networks ( GANs ) ( Goodfellow et al. , 2014 ) , Variational Autoencoders ( VAEs ) ( Kingma & Welling , 2013 ) , flow-based models such as NICE ( Dinh et al. , 2014 ) , and their variants ( Dziugaite et al. , 2015 ; Zhao et al. , 2016 ; Durugkar et al. , 2016 ; Arjovsky et al. , 2017 ; Mao et al. , 2017 ; Yang et al. , 2019 ; Fabius & van Amersfoort , 2014 ; van den Oord et al. , 2017 ; Higgins et al. , 2017 ; Tomczak & Welling , 2017 ; Davidson et al. , 2018 ; Dinh et al. , 2016 ; Grathwohl et al. , 2018 ; Kingma & Dhariwal , 2018 ) . A common assumption that we will carry through our study is that the datasets of interest are not uniformly distributed in their ambient space , but rather are concentrated on , or around , manifolds of lower intrinsic dimension , e.g. , the manifold of natural images ( Peyré , 2009 ) . Different DGN training methods have been developed and refined to obtain models that approximate as closely as possible the training set distribution . This becomes an Achilles heel when the training set , regardless of its size , is not representative of the true data distribution , i.e. , when the training samples have been curated based on cost or availability that result in implicit/explicit biases . In such scenarios , while the training samples will lie on the true data manifold , the density distribution of the training set will be different from the natural distribution of the data . Deploying a DGN trained with a biased data distribution can be catastrophic , in particular , when employed for tasks such as data augmentation ( Sandfort et al. , 2019 ) , controlled data generation for exploration/interpretation ( Thirumuruganathan et al. , 2020 ) , or estimation of statistical quantities of the data geometry , such as the Lipschitz constant of the data manifold ( Gulrajani et al. , 2017 ; Scaman & Virmaux , 2018 ) . Biased data generation from DGNs due to skewed training distributions also raises serious concerns in terms of fair machine learning ( Hwang et al. , 2020 ; Tan et al. , 2020 ) . While ensuring semantic uniformity in samples is an extremely challenging task , we take one step in the more reachable goal of controlling the DGN sampling distribution to be uniform in terms of the sample distribution on the data manifold . To that end , we propose MaGNET ( for Maximum entropy Generative NETwork ) , a simple and efficient modification to any DGN that adapts its latent space distribution to provably produce samples uniformly spread on the DGN learned manifold . Importantly , MaGNET can be employed on any pre-trained and differentiable DGN regardless of its training setting , reducing the requirement of fine-tuning or retraining of the DGN . This is crucial as many models , such as BigGAN ( Brock et al. , 2019 ) and StyleGAN ( Karras et al. , 2020 ) , have significant computational and energy requirements for training . A plug-and-play method is thus greatly preferred to ease deployment in any already built/trained deep learning pipeline . Previously , there has been rigorous work on DGNs aimed at improving the training stability of models , deriving theoretical approximation results , understanding the role of the DGN architectures , and numerical approximations to speed-up training and deployment of trained models ( Mao et al. , 2017 ; Chen et al. , 2018 ; Arjovsky & Bottou ; Miyato et al. , 2018 ; Xu & Durrett , 2018 ; Liu et al. , 2017 ; Zhang et al. , 2017 ; Biau et al. , 2018 ; Li et al. , 2017 ; Kodali et al. , 2017 ; Roy et al. , 2018 ; Andrés-Terré & Lió , 2019 ; Chen et al. , 2018 ; Balestriero et al. , 2020a ; Tomczak & Welling , 2016 ; Berg et al. , 2018 ) . Existing methods ( Metz et al. , 2016 ; Tanaka , 2019 ; Che et al. , 2020 ) also try to tackle mode dropping by improving approximation of the data distribution , but this can potentially increase the bias learned implicitly by the DGNs . We are the first to consider the task of providing uniform sampling on the DGN underlying manifold , which has far-reaching consequences , ranging from producing DGNs stable to data curation and capable of handling inconsistencies such as repeated samples in the training set . We provide a first-of-its-kind provable uniform sampling on the data manifold that can be used to speed up estimation of various geometric quantities , such as estimation of the Lipschitz constant . MaGNET applies to any ( pretrained ) DGN architecture ( GAN , VAE , NF , etc . ) using continuous piecewise affine ( CPA ) nonlinearities , such as the ( leaky ) ReLU ; smooth nonlinearities can be dealt with via a first-order Taylor approximation argument . Our main contributions are as follows : [ C1 ] We characterize the transformation incurred by a density distribution when composed with a CPA mapping ( Sec . 3.1 ) and derive the analytical sampling strategy that enables one to obtain a uniform distribution on a manifold that is continuous and piecewise affine ( Sec 3.2 ) . [ C2 ] We observe that current DGNs produce continuous piecewise affine manifolds , and we demonstrate how to leverage [ C1 ] to produce uniform sampling on the manifold of any DGN ( Sec . 3.2 ) . [ C3 ] We conduct several carefully controlled experiments that validate the importance of uniform sampling and showcase the performance of MaGNET on pretrained models such as BigGAN ( Brock et al. , 2019 ) , StyleGAN2 ( Karras et al. , 2020 ) , progGAN ( Karras et al. , 2017 ) , and NVAE ( Vahdat & Kautz , 2020 ) , e.g. , we show that MaGNET can be used to increase distribution precision and recall of StyleGAN2 by 4.1 % & 3.0 % and decrease gender bias by 41.2 % , without requiring labels or retraining ( Sec . 4.2 and Sec . 4.3 ) . Reproducible code for the various experiments and figures will be provided upon completion of the review process . Computation and software details are provided in Appendix H , with the proofs of our results in Appendix I . Discussion on the settings in which MaGNET is desirable and on possible limitations is provided in ( Sec . 5 ) . 2 BACKGROUND . Continuous Piecewise Affine ( CPA ) Mappings . A rich class of functions emerge from piecewise polynomials : spline operators . In short , given a partition Ω of a domain RS , a spline of order k is a mapping defined by a polynomial of order k on each region ω ∈ Ω with continuity constraints on the entire domain for the derivatives of order 0 , . . . , k− 1 . As we will focus entirely on affine splines ( k = 1 ) we only define this case for concreteness . An affine spline S produces its output via S ( z ) = ∑ ω∈Ω ( Aωz + bω ) 1 { z∈ω } , ( 1 ) with input z and Aω , bω the per-region slope and offset parameters respectively , with the key constraint that the entire mapping is continuous on the domain S ∈ C0 ( RS ) . Spline operators and especially affine spline operators have been extensively used in function approximation theory ( Cheney & Light , 2009 ) , optimal control ( Egerstedt & Martin , 2009 ) , statistics ( Fantuzzi et al. , 2002 ) and related fields . Deep Generative Networks . A deep generative network ( DGN ) is a ( nonlinear ) operator GΘ with parameters Θ mapping a latent input z ∈ RS to an observation x ∈ RD by composing L intermediate layer mappings . The only assumption we require for our study is that the nonlinearities present in the DGN are continuous piecewise affine as is the case with ( leaky- ) ReLU , absolute value , max-pooling . For smooth nonlinearities , our results hold from a first-order Taylor approximation argument . Precise definitions of DGN operators can be found in Goodfellow et al . ( 2016 ) . We will omit Θ from the GΘ operator for conciseness unless needed . It is also common to refer to z as the latent representation , and x as the generated/observed data , e.g. , a time-series or image . One property of DGNs that employ nonlinearities such as ( leaky- ) ReLU , max-pooling , and the likes , is that the entire input-output mapping becomes a CPA spline with z as both the argument and region parameter . 3 CONTINUOUS PIECEWISE AFFINE MAPPING OF A PROBABILITY DENSITY . In this section , we study the properties of a probability density that is transformed by a CPA mapping . Our goal is to derive the produced density and characterize its properties , such as how the per-region affine mappings in Eq . 1 impact the density concentration . We present some key results that serve as the backbone of our core result in the next section : how to sample uniformly from the manifold generated by DGNs . 3.1 DENSITY ON THE GENERATED MANIFOLD . Consider an affine spline operator S ( Eq . 1 ) going from a space of dimension S to a space of dimension D with D ≥ S. The image of this mapping is a CPA manifold of dimension at most S , the exact dimension is determined by the rank of the per-region slope matrices . Formally , the image of S is given by Im ( S ) , { S ( z ) : z ∈ RS } = ⋃ ω∈Ω Aff ( ω ; Aω , bω ) ( 2 ) with Aff ( ω ; Aω , bω ) = { Aωz+bω : z ∈ ω } the affine transformation of region ω by the per-region parameters Aωbω . From Eq . 2 we observe that the generated manifold i.e. , surface is made of regions that are the affine transformations of the latent space partition regions ω ∈ Ω based on the coordinate change induced by Aω and the shift induced by bω . We visualize this in Fig . 2 for a toy spline operator with 2- dimensional latent space and 3-dimensional ambient/output space . In the remainder of our study we will denote for conciseness S ( ω ) , Aff ( ω ; Aω , bω ) . Figure 2 : Visual depiction of Eq . 2 with a toy affine spline mapping S : R2 7→ R3 . Left : latent space partition Ω made of different regions shown with different colors and with boundaries shown in black . Right : affine spline image Im ( S ) which is a continuous piecewise affine surface composed of the latent space regions affinely transformed by the per-region affine mappings ( Eq . 1 ) . The per-region colors are the same on the left and on the right . When the input space is equipped with a density distribution , then this density is transformed by the mapping S and “ lives ” on the surface of the CPA manifold generated by S. Given a distribution pz over the latent space , we can explicitly compute the output distribution after the application of S , which leads to an intuitive result exploiting the CPA property of the generator . For this result , we require that operator S be bijective between its domain and its image . That is , each slope matrix Aω , ∀ω ∈ Ω should be full rank , and there should not be any folding of the generated CPA surface that intersects with itself , i.e. , S ( ω ) ∩ S ( ω′ ) 6= { } ⇐⇒ ω = ω′ . We now derive the key result of this section that characterizes the density distribution lying on the manifold . Lemma 1 . The volume of a region ω ∈ Ω denoted by µ ( ω ) is related to the volume affinely transformed region S ( ω ) by , µ ( S ( ω ) ) µ ( ω ) = √ det ( ATωAω ) , ( 3 ) where µ ( S ( ω ) ) is using the measure on the S-dimensional affine subspace spanned by the CPA mapping . ( Proof in Appendix I.1 . ) Theorem 1 . The probability density pS ( x ) generated by S for latent space distribution pz is given by , pS ( x ) = ∑ ω∈Ω pz ( ( ATωAω ) −1 ATω ( x− bω ) ) √ det ( ATωAω ) 1 { x∈S ( ω ) } . ( 4 ) ( Proof in Appendix I.2 . ) In words , the distribution obtained in the output space naturally corresponds to a piecewise affine transformation of the original latent space distribution , weighted by the change in volume of the perregion mappings from ( Eq . 3 ) . For Gaussian and Uniform pz , we use the above results to obtain the analytical form of the density covering the output manifold , we have provided proof and differential entropy derivations in Appendix B .
This paper concerns with uniform sampling from deep generative networks such as GANs and VAEs. The training samples of DGNs are often biased as they are obatined based on preferences, costs, or convenience that leads to DGNs producing biased examples. This paper gives a gemoetry based sampler MaGNET, that given any trained DGN, produces samples that are uniformly distributed on the learned manifold. It theoretically proves, and empirically shows that the MaGNET produces a uniform distrbution on the manifold regardless of the training set distribution. The theoretical proofs require that the DGNs only comprise continuous piecewise affine (CPA) non-linearities, such as ReLu, absolute value, max-pooling. The three main contributions of the paper are as following: (a) It characterizes the transformation incurred by a density distribution when composed with a CPA mapping. (b) It derives an analytical sampling strategy that allows to obtain a uniform distribution on a manifold that is continuous and piecewise affine. (c) It provides multiple numerical experiments validating the gains of their proposed method MaGNET.
SP:cddf3d13882b412a10ed5981101b1088f184c647
MaGNET: Uniform Sampling from Deep Generative Network Manifolds Without Retraining
Deep Generative Networks ( DGNs ) are extensively employed in Generative Adversarial Networks ( GANs ) , Variational Autoencoders ( VAEs ) , and their variants to approximate the data manifold and distribution . However , training samples are often distributed in a non-uniform fashion on the manifold , due to costs or convenience of collection . For example , the CelebA dataset contains a large fraction of smiling faces . These inconsistencies will be reproduced when sampling from the trained DGN , which is not always preferred , e.g. , for fairness or data augmentation . In response , we develop MaGNET , a novel and theoretically motivated latent space sampler for any pre-trained DGN , that produces samples uniformly distributed on the learned manifold . We perform a range of experiments on various datasets and DGNs , e.g. , for the state-of-the-art StyleGAN2 trained on FFHQ dataset , uniform sampling via MaGNET increases distribution precision and recall by 4.1 % & 3.0 % and decreases gender bias by 41.2 % , without requiring labels or retraining . As uniform distribution does not imply uniform semantic distribution , we also explore separately how semantic attributes of generated samples vary under MaGNET sampling . 1 INTRODUCTION . Deep Generative Networks ( DGNs ) are Deep Networks ( DNs ) trained to learn latent representations of datasets ; such frameworks include Generative Adversarial Networks ( GANs ) ( Goodfellow et al. , 2014 ) , Variational Autoencoders ( VAEs ) ( Kingma & Welling , 2013 ) , flow-based models such as NICE ( Dinh et al. , 2014 ) , and their variants ( Dziugaite et al. , 2015 ; Zhao et al. , 2016 ; Durugkar et al. , 2016 ; Arjovsky et al. , 2017 ; Mao et al. , 2017 ; Yang et al. , 2019 ; Fabius & van Amersfoort , 2014 ; van den Oord et al. , 2017 ; Higgins et al. , 2017 ; Tomczak & Welling , 2017 ; Davidson et al. , 2018 ; Dinh et al. , 2016 ; Grathwohl et al. , 2018 ; Kingma & Dhariwal , 2018 ) . A common assumption that we will carry through our study is that the datasets of interest are not uniformly distributed in their ambient space , but rather are concentrated on , or around , manifolds of lower intrinsic dimension , e.g. , the manifold of natural images ( Peyré , 2009 ) . Different DGN training methods have been developed and refined to obtain models that approximate as closely as possible the training set distribution . This becomes an Achilles heel when the training set , regardless of its size , is not representative of the true data distribution , i.e. , when the training samples have been curated based on cost or availability that result in implicit/explicit biases . In such scenarios , while the training samples will lie on the true data manifold , the density distribution of the training set will be different from the natural distribution of the data . Deploying a DGN trained with a biased data distribution can be catastrophic , in particular , when employed for tasks such as data augmentation ( Sandfort et al. , 2019 ) , controlled data generation for exploration/interpretation ( Thirumuruganathan et al. , 2020 ) , or estimation of statistical quantities of the data geometry , such as the Lipschitz constant of the data manifold ( Gulrajani et al. , 2017 ; Scaman & Virmaux , 2018 ) . Biased data generation from DGNs due to skewed training distributions also raises serious concerns in terms of fair machine learning ( Hwang et al. , 2020 ; Tan et al. , 2020 ) . While ensuring semantic uniformity in samples is an extremely challenging task , we take one step in the more reachable goal of controlling the DGN sampling distribution to be uniform in terms of the sample distribution on the data manifold . To that end , we propose MaGNET ( for Maximum entropy Generative NETwork ) , a simple and efficient modification to any DGN that adapts its latent space distribution to provably produce samples uniformly spread on the DGN learned manifold . Importantly , MaGNET can be employed on any pre-trained and differentiable DGN regardless of its training setting , reducing the requirement of fine-tuning or retraining of the DGN . This is crucial as many models , such as BigGAN ( Brock et al. , 2019 ) and StyleGAN ( Karras et al. , 2020 ) , have significant computational and energy requirements for training . A plug-and-play method is thus greatly preferred to ease deployment in any already built/trained deep learning pipeline . Previously , there has been rigorous work on DGNs aimed at improving the training stability of models , deriving theoretical approximation results , understanding the role of the DGN architectures , and numerical approximations to speed-up training and deployment of trained models ( Mao et al. , 2017 ; Chen et al. , 2018 ; Arjovsky & Bottou ; Miyato et al. , 2018 ; Xu & Durrett , 2018 ; Liu et al. , 2017 ; Zhang et al. , 2017 ; Biau et al. , 2018 ; Li et al. , 2017 ; Kodali et al. , 2017 ; Roy et al. , 2018 ; Andrés-Terré & Lió , 2019 ; Chen et al. , 2018 ; Balestriero et al. , 2020a ; Tomczak & Welling , 2016 ; Berg et al. , 2018 ) . Existing methods ( Metz et al. , 2016 ; Tanaka , 2019 ; Che et al. , 2020 ) also try to tackle mode dropping by improving approximation of the data distribution , but this can potentially increase the bias learned implicitly by the DGNs . We are the first to consider the task of providing uniform sampling on the DGN underlying manifold , which has far-reaching consequences , ranging from producing DGNs stable to data curation and capable of handling inconsistencies such as repeated samples in the training set . We provide a first-of-its-kind provable uniform sampling on the data manifold that can be used to speed up estimation of various geometric quantities , such as estimation of the Lipschitz constant . MaGNET applies to any ( pretrained ) DGN architecture ( GAN , VAE , NF , etc . ) using continuous piecewise affine ( CPA ) nonlinearities , such as the ( leaky ) ReLU ; smooth nonlinearities can be dealt with via a first-order Taylor approximation argument . Our main contributions are as follows : [ C1 ] We characterize the transformation incurred by a density distribution when composed with a CPA mapping ( Sec . 3.1 ) and derive the analytical sampling strategy that enables one to obtain a uniform distribution on a manifold that is continuous and piecewise affine ( Sec 3.2 ) . [ C2 ] We observe that current DGNs produce continuous piecewise affine manifolds , and we demonstrate how to leverage [ C1 ] to produce uniform sampling on the manifold of any DGN ( Sec . 3.2 ) . [ C3 ] We conduct several carefully controlled experiments that validate the importance of uniform sampling and showcase the performance of MaGNET on pretrained models such as BigGAN ( Brock et al. , 2019 ) , StyleGAN2 ( Karras et al. , 2020 ) , progGAN ( Karras et al. , 2017 ) , and NVAE ( Vahdat & Kautz , 2020 ) , e.g. , we show that MaGNET can be used to increase distribution precision and recall of StyleGAN2 by 4.1 % & 3.0 % and decrease gender bias by 41.2 % , without requiring labels or retraining ( Sec . 4.2 and Sec . 4.3 ) . Reproducible code for the various experiments and figures will be provided upon completion of the review process . Computation and software details are provided in Appendix H , with the proofs of our results in Appendix I . Discussion on the settings in which MaGNET is desirable and on possible limitations is provided in ( Sec . 5 ) . 2 BACKGROUND . Continuous Piecewise Affine ( CPA ) Mappings . A rich class of functions emerge from piecewise polynomials : spline operators . In short , given a partition Ω of a domain RS , a spline of order k is a mapping defined by a polynomial of order k on each region ω ∈ Ω with continuity constraints on the entire domain for the derivatives of order 0 , . . . , k− 1 . As we will focus entirely on affine splines ( k = 1 ) we only define this case for concreteness . An affine spline S produces its output via S ( z ) = ∑ ω∈Ω ( Aωz + bω ) 1 { z∈ω } , ( 1 ) with input z and Aω , bω the per-region slope and offset parameters respectively , with the key constraint that the entire mapping is continuous on the domain S ∈ C0 ( RS ) . Spline operators and especially affine spline operators have been extensively used in function approximation theory ( Cheney & Light , 2009 ) , optimal control ( Egerstedt & Martin , 2009 ) , statistics ( Fantuzzi et al. , 2002 ) and related fields . Deep Generative Networks . A deep generative network ( DGN ) is a ( nonlinear ) operator GΘ with parameters Θ mapping a latent input z ∈ RS to an observation x ∈ RD by composing L intermediate layer mappings . The only assumption we require for our study is that the nonlinearities present in the DGN are continuous piecewise affine as is the case with ( leaky- ) ReLU , absolute value , max-pooling . For smooth nonlinearities , our results hold from a first-order Taylor approximation argument . Precise definitions of DGN operators can be found in Goodfellow et al . ( 2016 ) . We will omit Θ from the GΘ operator for conciseness unless needed . It is also common to refer to z as the latent representation , and x as the generated/observed data , e.g. , a time-series or image . One property of DGNs that employ nonlinearities such as ( leaky- ) ReLU , max-pooling , and the likes , is that the entire input-output mapping becomes a CPA spline with z as both the argument and region parameter . 3 CONTINUOUS PIECEWISE AFFINE MAPPING OF A PROBABILITY DENSITY . In this section , we study the properties of a probability density that is transformed by a CPA mapping . Our goal is to derive the produced density and characterize its properties , such as how the per-region affine mappings in Eq . 1 impact the density concentration . We present some key results that serve as the backbone of our core result in the next section : how to sample uniformly from the manifold generated by DGNs . 3.1 DENSITY ON THE GENERATED MANIFOLD . Consider an affine spline operator S ( Eq . 1 ) going from a space of dimension S to a space of dimension D with D ≥ S. The image of this mapping is a CPA manifold of dimension at most S , the exact dimension is determined by the rank of the per-region slope matrices . Formally , the image of S is given by Im ( S ) , { S ( z ) : z ∈ RS } = ⋃ ω∈Ω Aff ( ω ; Aω , bω ) ( 2 ) with Aff ( ω ; Aω , bω ) = { Aωz+bω : z ∈ ω } the affine transformation of region ω by the per-region parameters Aωbω . From Eq . 2 we observe that the generated manifold i.e. , surface is made of regions that are the affine transformations of the latent space partition regions ω ∈ Ω based on the coordinate change induced by Aω and the shift induced by bω . We visualize this in Fig . 2 for a toy spline operator with 2- dimensional latent space and 3-dimensional ambient/output space . In the remainder of our study we will denote for conciseness S ( ω ) , Aff ( ω ; Aω , bω ) . Figure 2 : Visual depiction of Eq . 2 with a toy affine spline mapping S : R2 7→ R3 . Left : latent space partition Ω made of different regions shown with different colors and with boundaries shown in black . Right : affine spline image Im ( S ) which is a continuous piecewise affine surface composed of the latent space regions affinely transformed by the per-region affine mappings ( Eq . 1 ) . The per-region colors are the same on the left and on the right . When the input space is equipped with a density distribution , then this density is transformed by the mapping S and “ lives ” on the surface of the CPA manifold generated by S. Given a distribution pz over the latent space , we can explicitly compute the output distribution after the application of S , which leads to an intuitive result exploiting the CPA property of the generator . For this result , we require that operator S be bijective between its domain and its image . That is , each slope matrix Aω , ∀ω ∈ Ω should be full rank , and there should not be any folding of the generated CPA surface that intersects with itself , i.e. , S ( ω ) ∩ S ( ω′ ) 6= { } ⇐⇒ ω = ω′ . We now derive the key result of this section that characterizes the density distribution lying on the manifold . Lemma 1 . The volume of a region ω ∈ Ω denoted by µ ( ω ) is related to the volume affinely transformed region S ( ω ) by , µ ( S ( ω ) ) µ ( ω ) = √ det ( ATωAω ) , ( 3 ) where µ ( S ( ω ) ) is using the measure on the S-dimensional affine subspace spanned by the CPA mapping . ( Proof in Appendix I.1 . ) Theorem 1 . The probability density pS ( x ) generated by S for latent space distribution pz is given by , pS ( x ) = ∑ ω∈Ω pz ( ( ATωAω ) −1 ATω ( x− bω ) ) √ det ( ATωAω ) 1 { x∈S ( ω ) } . ( 4 ) ( Proof in Appendix I.2 . ) In words , the distribution obtained in the output space naturally corresponds to a piecewise affine transformation of the original latent space distribution , weighted by the change in volume of the perregion mappings from ( Eq . 3 ) . For Gaussian and Uniform pz , we use the above results to obtain the analytical form of the density covering the output manifold , we have provided proof and differential entropy derivations in Appendix B .
The authors propose a uniform sampling technique for deep generative networks (DGNs) inspired by the probabilistic change of variables formula. The technique works with any already trained DGN and does not involve any further training. (Though it does require back propagation w.r.t. the input $x$.) In essence, the algorithm works by drawing many samples N >> K from the DGN, then sampling from these $N$ samples with probability inversely related to their pushforward density (as computed by the change-of-variables formula).
SP:cddf3d13882b412a10ed5981101b1088f184c647
Distributionally Robust Learning for Uncertainty Calibration under Domain Shift
We propose a framework for learning calibrated uncertainties under domain shifts . We consider the case where the source ( training ) distribution differs from the target ( test ) distribution . We detect such domain shifts through the use of binary domain classifier and integrate it with the task network and train them jointly endto-end . The binary domain classifier yields a density ratio that reflects the closeness of a target ( test ) sample to the source ( training ) distribution . We employ it to adjust the uncertainty of prediction in the task network . This idea of using the density ratio is based on the distributionally robust learning ( DRL ) framework , which accounts for the domain shift through adversarial risk minimization . We demonstrate that our method generates calibrated uncertainties that benefit many downstream tasks , such as unsupervised domain adaptation ( UDA ) and semi-supervised learning ( SSL ) . In these tasks , methods like self-training and FixMatch use uncertainties to select confident pseudo-labels for re-training . Our experiments show that the introduction of DRL leads to significant improvements in cross-domain performance . We also demonstrate that the estimated density ratios show agreement with the human selection frequencies , suggesting a positive correlation with a proxy of human perceived uncertainties . 1 INTRODUCTION . Uncertainty estimation is an important machine learning problem that is central to trustworthy AI ( Tomsett et al. , 2020 ; Antifakos et al. , 2005 ) . In addition , many important downstream applications rely on the correct estimation of uncertainties . This includes unsupervised domain adaptation ( UDA ) ( Zou et al. , 2019 ) and semi-supervised learning ( SSL ) ( Sohn et al. , 2020 ) where they are used to solicit confident pseudo-labels for re-training . In these applications , reliable pseudo-labels help avoid error propagation and catastrophic failures in early iterations ( Kumar et al. , 2020 ) . Obtaining reliable uncertainty estimation is challenging . In contrast to human annotation of labels , obtaining the ground-truth uncertainties from real-world data can be costly or even infeasible . It is also known that commonly used uncertainty proxies in deep neural networks , such as the softmax output , tend to give overconfident estimates ( Guo et al. , 2017a ) . This overconfidence is further amplified under domain shifts , where the target ( test ) domain and the source training domain differ significantly . Such distributional shifts tend to aggravate the existing issues in uncertainty estimation , leading to wrong but overconfident predictions on unfamiliar samples ( Li & Hoiem , 2020 ) . Many methods have been proposed to calibrate the confidence of deep learning models so that the uncertainty level of a model prediction reflects the likelihood of the true event ( Guo et al. , 2017a ) . Label smoothing is a popular approach to reduce overconfidence and to promote more uniform outputs ( Szegedy et al. , 2016 ) . Temperature scaling is another method where the logit scores are rescaled by a calibrated temperature ( Platt et al. , 1999 ) . Approaches such as Monte-Carlo sampling ( Gal & Ghahramani , 2016 ) and Bayesian inference ( Blundell et al. , 2015 ; Riquelme et al. , 2018 ) model uncertainties from a Bayesian perspective but are computationally more expensive . Even though these methods lead to more calibrated uncertainties , recent studies show that their results can not be fully trusted under domain shift ( Snoek et al. , 2019 ) . Our approach . To handle domain shifts , we characterize the “ overlap ” between the source training data and the test data . Intuitively , if the test sample is highly unlikely in the training distribution , then the resulting confidence levels should be lowered . We incorporate this idea through the density ratio between the two domains and employ it for confidence calibration . To make our idea more concrete , recall that the probability output of a standard neural network for classification can be expressed as P ( y|x ) ∝ exp ( θy · φ ( x ) ) , where x is the predictor input , φ ( x ) is the data feature , and θy is the model parameter of the y-th class . Instead , we propose the following predictive form for our neural network : P ( y|x ) ∝ exp ( Ps ( x ) Pt ( x ) θy · φ ( x ) ) , ( 1 ) where Ps ( x ) and Pt ( x ) are the densities of a data sample under the source and target distributions , respectively . When a target sample is close to the source domain ( large Ps ( x ) /Pt ( x ) ) , the prediction is confident . However , when a target sample x is far away from the source distribution ( small Ps ( x ) /Pt ( x ) ) , the confidence is lowered and the prediction is closer to a uniform distribution . This intuition is analogous to incorporating a sample-wise temperature to adjust the confidence according to the closeness of a test sample to the training distribution . Eq . ( 1 ) is based on the distributionally robust learning ( DRL ) framework . DRL is an adversarial risk minimization framework that involves a two-player minimax game between a predictor and an adversary ( Grünwald et al. , 2004 ) . While many previous DRL methods ( Liu et al. , 2020 ; Nakka et al. , 2020 ) operate in low dimensional spaces using kernel density estimators for the density ratio estimation , we develop a DRL method to scale to real-world computer vision tasks , which is able to produce calibrated uncertainties under domain shift . Our contributions are : 1 ) We propose a DRL method for uncertainty estimation under domain shift . We introduce a binary domain classifier network which learns to predict the density ratios between source and target domains ( See Fig . 1 ( a ) ) . The domain classifier and the target classifier are trained simultaneously in an end-to-end fashion . We also introduce a regularized DRL framework to further promote smoothed model prediction and improve the calibration . 2 ) We show that the estimated density ratio reflects the distance of a test sample from both training and test distributions ( Fig . 1 ( b ) ) . Our experiments further empirically show that these estimates are also correlated with human selection frequency , based on the available ground-truth labels in ImageNetV2 ( Recht et al. , 2019a ) , which can be regarded as a proxy of human uncertainty perception . 3 ) We empirically show that the top-1 class predictions of DRL are more calibrated than the empirical risk minimization ( ERM ) and the temperature scaling on Office31 ( Saenko et al. , 2010 ) , Office-Home ( Venkateswara et al. , 2017 ) , and VisDA ( Peng et al. , 2017 ) . We measure the level of calibration using expected calibration error ( ECE ) , Brier Score and reliability plots . 4 ) We integrate our method as a plug-in module in downstream applications such as unsupervised domain adaption and semi-supervised learning , leading to significant improvements . For example , incorporating self-training ( Zou et al. , 2019 ) with DRL leads to state-of-the-art performance on VisDA-2017 ( Peng et al. , 2017 ) and a 6 % improvement on hard examples . Incorporating Fix- match ( Sohn et al. , 2020 ) with DRL improves the original Fixmatch by a relative 17 % increase in accuracy under the cross-domain setting . 2 DISTRIBUTIONALLY ROBUST LEARNING . In this section , we first review the preliminaries of DRL ( Sec . 2.1 ) , followed by a proposed variant of DRL with class regularization ( Sec . 2.2 ) . We then propose an instantiation of DRL with a differentiable density ratio estimation network ( Sec . 2.3 ) . Finally , we show the application of DRL in UDA and SSL tasks ( Sec . 2.4 ) . 2.1 PRELIMINARIES . Notations and definitions : We denote the input and labels by random variables X and Y . We also use x ∈ Rd and X to represent the realization and sample space ofX . Our goal is to find a predictor F : Rd 7→ RC , { f ( x ) |x ∈ X , f ( x ) ∈ RC ∩∆ } ( 2 ) close to the true underlying Pt ( Y |X ) . Here , d , C and ∆ denote the input dimension , class number , and probabilistic simplex , respectively . We consider the problem with labeled data sampled from a source distribution Ps ( X , Y ) and unlabeled data sampled from a target distribution Pt ( X ) , and use ePs ( X , Y ) to represent the empirical source distribution . In this work , we consider an important form of domain shift with the covariate shift assumption Ps ( X ) 6= Pt ( X ) , Ps ( Y |X ) = Pt ( Y |X ) . Motivation : Traditional empirical risk minimization ( ERM ) frameworks tend to fail under covariate shift since ERM empirically learns a predictor P̂s ( Y |X ) from the finite source data that usually fails to generalize to the target distribution . DRL was previously proposed to overcome this issue . DRL can be formulated as a two-player adversarial risk minimization game ( Grünwald et al. , 2004 ) with the predictor player minimizing a loss , while the adversary player maximizing the loss . The adversary is allowed to perturb the labels , subject to certain feature-matching constraints to ensure data-compatibility . Formulation : Under covariate shift , DRL ( Liu & Ziebart , 2014 ) deals with the mismatch between the expected loss and the training data , and is defined on the target data distribution : P̂t ( Y |X ) = argmin F max G∈Σ Ex∼Pt ( X ) L ( f ( x ) , g ( x ) ) , ( 3 ) where f ( x ) , g ( x ) ∈ RC are the conditional label distributions given an input x and F , G are the entire distribution over all the input . Ex∼PtL ( · ) is an expected log loss on the target input defined : Ex∼Pt ( X ) L ( f ( x ) , g ( x ) ) , Ex∼Pt ( X ) [ −g ( x ) · log f ( x ) ] . ( 4 ) F is the predictor player minimizing the loss function while G is the adversary maximizing the loss function . After solving this game , F is our estimate of P̂t ( Y |X ) , which we will use for the classification on the target domain . Eq . 3 is defined on the target domain only . How could a predictor be properly trained while there are no target labels available ? The answer is that the adversary G is implicitly constrained by the source features . We use the following constraints to make sure thatG is close to Ps ( Y |X ) : Σ = { G|∑igyφ ( xi ) = ∑ iI [ yi = y ] φ ( xi ) , ∀y } , ( 5 ) where xi ∼ Ps ( X ) and gy is the y-th dimension of g. Eq . 5 is a necessary but not sufficient condition for G = Ps ( Y |X ) , thus serving as an implicit constraint for G to be close to the true Pt ( Y |X ) under the covariate shift assumption . Given a predefined feature function φ , when the adversary perturbs the conditional label distribution , certain aggregate function of φ on g should equal to the counterpart on the empirical source data . From DRL to density ratio : When using the expected target logloss in Eq . 3 , Eq . 1 is derived by solving the predictor F . Here we refer the derivation details to ( Liu & Ziebart , 2014 ) but emphasize the important properties of the prediction : representation-level conservativeness . Representation-level conservativeness : The predictions have higher certainty for inputs closer to the source domain when Ps ( x ) /Pt ( x ) is large . On the contrary , when Ps ( x ) /Pt ( x ) is small , the prediction is more uncertain . This property reflects the model ’ s ability to convey information about what it does not know through the model uncertainty .
This paper focuses on the problem of uncertainty calibration under distribution shift. By using a domain classifier in the distributional robust learning (DRL) framework, the authors estimate the density ratio between the source and target domain to achieve well-calibrated predictions under domain shift. A regularized DRL framework is further proposed to promote smoothed model prediction and improve the calibration. Experiments on Office31, Office-Home, and VisDA-2017 demonstrate the superiority of DRL over empirical risk minimization (ERM) and the temperature scaling method measured by expected calibration error (ECE), Brier Score, and reliability plots.
SP:8fc97dbc3d6e099b49cb402a6057a41dbe72ac9f
Distributionally Robust Learning for Uncertainty Calibration under Domain Shift
We propose a framework for learning calibrated uncertainties under domain shifts . We consider the case where the source ( training ) distribution differs from the target ( test ) distribution . We detect such domain shifts through the use of binary domain classifier and integrate it with the task network and train them jointly endto-end . The binary domain classifier yields a density ratio that reflects the closeness of a target ( test ) sample to the source ( training ) distribution . We employ it to adjust the uncertainty of prediction in the task network . This idea of using the density ratio is based on the distributionally robust learning ( DRL ) framework , which accounts for the domain shift through adversarial risk minimization . We demonstrate that our method generates calibrated uncertainties that benefit many downstream tasks , such as unsupervised domain adaptation ( UDA ) and semi-supervised learning ( SSL ) . In these tasks , methods like self-training and FixMatch use uncertainties to select confident pseudo-labels for re-training . Our experiments show that the introduction of DRL leads to significant improvements in cross-domain performance . We also demonstrate that the estimated density ratios show agreement with the human selection frequencies , suggesting a positive correlation with a proxy of human perceived uncertainties . 1 INTRODUCTION . Uncertainty estimation is an important machine learning problem that is central to trustworthy AI ( Tomsett et al. , 2020 ; Antifakos et al. , 2005 ) . In addition , many important downstream applications rely on the correct estimation of uncertainties . This includes unsupervised domain adaptation ( UDA ) ( Zou et al. , 2019 ) and semi-supervised learning ( SSL ) ( Sohn et al. , 2020 ) where they are used to solicit confident pseudo-labels for re-training . In these applications , reliable pseudo-labels help avoid error propagation and catastrophic failures in early iterations ( Kumar et al. , 2020 ) . Obtaining reliable uncertainty estimation is challenging . In contrast to human annotation of labels , obtaining the ground-truth uncertainties from real-world data can be costly or even infeasible . It is also known that commonly used uncertainty proxies in deep neural networks , such as the softmax output , tend to give overconfident estimates ( Guo et al. , 2017a ) . This overconfidence is further amplified under domain shifts , where the target ( test ) domain and the source training domain differ significantly . Such distributional shifts tend to aggravate the existing issues in uncertainty estimation , leading to wrong but overconfident predictions on unfamiliar samples ( Li & Hoiem , 2020 ) . Many methods have been proposed to calibrate the confidence of deep learning models so that the uncertainty level of a model prediction reflects the likelihood of the true event ( Guo et al. , 2017a ) . Label smoothing is a popular approach to reduce overconfidence and to promote more uniform outputs ( Szegedy et al. , 2016 ) . Temperature scaling is another method where the logit scores are rescaled by a calibrated temperature ( Platt et al. , 1999 ) . Approaches such as Monte-Carlo sampling ( Gal & Ghahramani , 2016 ) and Bayesian inference ( Blundell et al. , 2015 ; Riquelme et al. , 2018 ) model uncertainties from a Bayesian perspective but are computationally more expensive . Even though these methods lead to more calibrated uncertainties , recent studies show that their results can not be fully trusted under domain shift ( Snoek et al. , 2019 ) . Our approach . To handle domain shifts , we characterize the “ overlap ” between the source training data and the test data . Intuitively , if the test sample is highly unlikely in the training distribution , then the resulting confidence levels should be lowered . We incorporate this idea through the density ratio between the two domains and employ it for confidence calibration . To make our idea more concrete , recall that the probability output of a standard neural network for classification can be expressed as P ( y|x ) ∝ exp ( θy · φ ( x ) ) , where x is the predictor input , φ ( x ) is the data feature , and θy is the model parameter of the y-th class . Instead , we propose the following predictive form for our neural network : P ( y|x ) ∝ exp ( Ps ( x ) Pt ( x ) θy · φ ( x ) ) , ( 1 ) where Ps ( x ) and Pt ( x ) are the densities of a data sample under the source and target distributions , respectively . When a target sample is close to the source domain ( large Ps ( x ) /Pt ( x ) ) , the prediction is confident . However , when a target sample x is far away from the source distribution ( small Ps ( x ) /Pt ( x ) ) , the confidence is lowered and the prediction is closer to a uniform distribution . This intuition is analogous to incorporating a sample-wise temperature to adjust the confidence according to the closeness of a test sample to the training distribution . Eq . ( 1 ) is based on the distributionally robust learning ( DRL ) framework . DRL is an adversarial risk minimization framework that involves a two-player minimax game between a predictor and an adversary ( Grünwald et al. , 2004 ) . While many previous DRL methods ( Liu et al. , 2020 ; Nakka et al. , 2020 ) operate in low dimensional spaces using kernel density estimators for the density ratio estimation , we develop a DRL method to scale to real-world computer vision tasks , which is able to produce calibrated uncertainties under domain shift . Our contributions are : 1 ) We propose a DRL method for uncertainty estimation under domain shift . We introduce a binary domain classifier network which learns to predict the density ratios between source and target domains ( See Fig . 1 ( a ) ) . The domain classifier and the target classifier are trained simultaneously in an end-to-end fashion . We also introduce a regularized DRL framework to further promote smoothed model prediction and improve the calibration . 2 ) We show that the estimated density ratio reflects the distance of a test sample from both training and test distributions ( Fig . 1 ( b ) ) . Our experiments further empirically show that these estimates are also correlated with human selection frequency , based on the available ground-truth labels in ImageNetV2 ( Recht et al. , 2019a ) , which can be regarded as a proxy of human uncertainty perception . 3 ) We empirically show that the top-1 class predictions of DRL are more calibrated than the empirical risk minimization ( ERM ) and the temperature scaling on Office31 ( Saenko et al. , 2010 ) , Office-Home ( Venkateswara et al. , 2017 ) , and VisDA ( Peng et al. , 2017 ) . We measure the level of calibration using expected calibration error ( ECE ) , Brier Score and reliability plots . 4 ) We integrate our method as a plug-in module in downstream applications such as unsupervised domain adaption and semi-supervised learning , leading to significant improvements . For example , incorporating self-training ( Zou et al. , 2019 ) with DRL leads to state-of-the-art performance on VisDA-2017 ( Peng et al. , 2017 ) and a 6 % improvement on hard examples . Incorporating Fix- match ( Sohn et al. , 2020 ) with DRL improves the original Fixmatch by a relative 17 % increase in accuracy under the cross-domain setting . 2 DISTRIBUTIONALLY ROBUST LEARNING . In this section , we first review the preliminaries of DRL ( Sec . 2.1 ) , followed by a proposed variant of DRL with class regularization ( Sec . 2.2 ) . We then propose an instantiation of DRL with a differentiable density ratio estimation network ( Sec . 2.3 ) . Finally , we show the application of DRL in UDA and SSL tasks ( Sec . 2.4 ) . 2.1 PRELIMINARIES . Notations and definitions : We denote the input and labels by random variables X and Y . We also use x ∈ Rd and X to represent the realization and sample space ofX . Our goal is to find a predictor F : Rd 7→ RC , { f ( x ) |x ∈ X , f ( x ) ∈ RC ∩∆ } ( 2 ) close to the true underlying Pt ( Y |X ) . Here , d , C and ∆ denote the input dimension , class number , and probabilistic simplex , respectively . We consider the problem with labeled data sampled from a source distribution Ps ( X , Y ) and unlabeled data sampled from a target distribution Pt ( X ) , and use ePs ( X , Y ) to represent the empirical source distribution . In this work , we consider an important form of domain shift with the covariate shift assumption Ps ( X ) 6= Pt ( X ) , Ps ( Y |X ) = Pt ( Y |X ) . Motivation : Traditional empirical risk minimization ( ERM ) frameworks tend to fail under covariate shift since ERM empirically learns a predictor P̂s ( Y |X ) from the finite source data that usually fails to generalize to the target distribution . DRL was previously proposed to overcome this issue . DRL can be formulated as a two-player adversarial risk minimization game ( Grünwald et al. , 2004 ) with the predictor player minimizing a loss , while the adversary player maximizing the loss . The adversary is allowed to perturb the labels , subject to certain feature-matching constraints to ensure data-compatibility . Formulation : Under covariate shift , DRL ( Liu & Ziebart , 2014 ) deals with the mismatch between the expected loss and the training data , and is defined on the target data distribution : P̂t ( Y |X ) = argmin F max G∈Σ Ex∼Pt ( X ) L ( f ( x ) , g ( x ) ) , ( 3 ) where f ( x ) , g ( x ) ∈ RC are the conditional label distributions given an input x and F , G are the entire distribution over all the input . Ex∼PtL ( · ) is an expected log loss on the target input defined : Ex∼Pt ( X ) L ( f ( x ) , g ( x ) ) , Ex∼Pt ( X ) [ −g ( x ) · log f ( x ) ] . ( 4 ) F is the predictor player minimizing the loss function while G is the adversary maximizing the loss function . After solving this game , F is our estimate of P̂t ( Y |X ) , which we will use for the classification on the target domain . Eq . 3 is defined on the target domain only . How could a predictor be properly trained while there are no target labels available ? The answer is that the adversary G is implicitly constrained by the source features . We use the following constraints to make sure thatG is close to Ps ( Y |X ) : Σ = { G|∑igyφ ( xi ) = ∑ iI [ yi = y ] φ ( xi ) , ∀y } , ( 5 ) where xi ∼ Ps ( X ) and gy is the y-th dimension of g. Eq . 5 is a necessary but not sufficient condition for G = Ps ( Y |X ) , thus serving as an implicit constraint for G to be close to the true Pt ( Y |X ) under the covariate shift assumption . Given a predefined feature function φ , when the adversary perturbs the conditional label distribution , certain aggregate function of φ on g should equal to the counterpart on the empirical source data . From DRL to density ratio : When using the expected target logloss in Eq . 3 , Eq . 1 is derived by solving the predictor F . Here we refer the derivation details to ( Liu & Ziebart , 2014 ) but emphasize the important properties of the prediction : representation-level conservativeness . Representation-level conservativeness : The predictions have higher certainty for inputs closer to the source domain when Ps ( x ) /Pt ( x ) is large . On the contrary , when Ps ( x ) /Pt ( x ) is small , the prediction is more uncertain . This property reflects the model ’ s ability to convey information about what it does not know through the model uncertainty .
This paper proposes scaled uncertainty prediction in the context of unsupervised domain adaptation. The problem in unsupervised domain adaptation is to obtain predictions in a target domain where no (or few) labels are available. A secondary problem then is the calibration of predictive uncertainties in the target domain. This paper proposes a model of uncertainty proportional to the (log) of density ratios between domains. Results include ECE and Brier scores on two common Domain Adaptation datasets.
SP:8fc97dbc3d6e099b49cb402a6057a41dbe72ac9f
Pretrained Language Models are Symbolic Mathematics Solvers too!
1 Introduction . Deep learning is a ubiquitous choice in solving statistical pattern recognition problems of regression and classification . With a large training data set and compute power , they have proven to be very effective and achieve state-of-the-art performance in a wide range of tasks in natural language processing , computer vision , speech recognition , sentiment analysis , etc ( Lu et al. , 2021 ) . Though deep learning triumphs in the statistical domain ( Bengio et al. , 2003 ) , there is an active interest in extending deep networks in symbolic computation ( Lample & Charton , 2019 ; Davis , 2019 ; Allamanis et al. , 2017 ; Zaremba et al. , 2014 ; Loos et al. , 2017 ) . There are mainly two motivations for this : ( i ) performing symbolic mathematical tasks , such as symbolic integration and solving differential equations , in deep net architectures , and ( ii ) applying neural networks in the domain automated theorem proving , computer algebra systems , and natural language understanding ( NLU ) that requires a symbolic knowledge system . The key capability of symbolic computation is that symbols maintain their identity as they do multiple roles while deep neural networks exploit shared representation and composition . This paper uses a pretrained language model to solve symbolic mathematics tasks , particularly symbolic integration and differential equations . We show our pretrained transformer architecture on language translation is expressive enough to solve large class symbolic mathematics such as function integration and differential equations , which have traditionally been approached using logic and exhaustive search . Moreover , our pretrained model is sample efficient and compute efficient–i.e. , it requires fewer epochs to converge to good accuracy . The first major work of solving symbolic mathematics with transformer architecture is by Lample & Charton ( 2019 ) . They use the transformer model that is mainly used for NLP tasks to solve the symbolic computation . They first re-frame the mathematical equations as text sequences and then solving those equations as a sequence-to-sequence translation . Their transformer model catches pattern in the mathematical expressions , e.g. , the expressions of the form sin−1 ( x ) will have its primitive as 1√1−x2 . We extend the work of Lample & Charton ( 2019 ) and train their symbolic math dataset by fine-tuning pretrained translation models to solve the downstream task of symbolic mathematics . The pretrained language model will transfer the syntactic and semantic structure of the present in the language , mathematical expressions represented as trees . The inherent limitation between the manyto-one map between mathematical expression and tree encoding is partially regularized by the pre-training with the language translation . For example , the same mathematical expressions 7 + 3× ( 5 + 2 ) and 3× ( 5 + 2 ) + 7 are represented are encoded as different trees . We regularize ( penalize ) this freedom of expression of encoding a mathematical expression by multiple trees by pretraining our transformer model with language translation . The sentence in a language has an order as specified by the famous quote by J. R. Firt “ You shall know a word by the company it keeps. ” . Unlike language , where the meaning of a word is given by its neighbors , the value of a mathematical sub-expression ( mathematical word ) is not influenced by its neighboring expressions . In their training data set generation for function integration , mathematical expressions F and G are generated and the corresponding derivatives f and g are computed . The training data set are the tuples ( f , F ) , ( g , G ) and a new integration function data set Fg is generated ( assuming ( fG , ∫ fG ) is in the training set ) through IBP ( Integration By Parts ) 1 method as : ∫ Fg = FG− ∫ fG . Their vanilla transformer model during training learns to build the correlation between ∫ Fg and fG for solving symbolic mathematics . We differ from their model by ( i ) forcing our transformer model to develop conditional probability between randomly generated functions PΘ ( f |G ) and PΘ ( g|F ) as follows : P ( fG ) = P ( f |G ) P ( G ) P ( Fg ) = P ( g|F ) P ( F ) where PΘ is our pretrained transformer model and Θ is the learned parameter ( weights and biases ) . By re-framing the problem to a conditional probability model , we bypass the distributions of randomly generated functions P ( F ) and P ( G ) . Our method also shows marginal robustness to different types of data set generation method , as shown in table 4 . ( ii ) Our model ’ s predictions improve even when there is a difference of length between input and output sequence . This is because of the phenomena of heavy-tailed distribution , where the model can generate rare small or large output expressions ( Sornette , 2006 ; Martin & Mahoney , 2018 ) . Our model is less sensitive with large difference of length between input and output mathematical expressions ( i.e. , the problem and the solution sequence . ) as explained in Section 3 . The paper is organized as follows : In Section 2 we discuss the prediction of our pretrained transformer model in the language conditional probability and optimization , Section 3 discusses our proposed of heavy-tailed self-regularization under the mild condition of our pretraining , Section 4 discusses experimental setting and methodology , architecture , datasets , and the evaluation metric , and Section 5 poses the following research questions and answers them : 1 . Does this pretrained model help us to use less data for fine-tuning ? 2 . Does the result of this fine-tuning depend on the languages used for pretraining ? 3 . How robust this fine-tuned model is with respect to distribution shift of test data in comparison with fine-tuning data ? Section 6 , discusses literature review , and finally , Section 7 concludes the paper . 1More details about the datasets are explained in section 4.2 . 2 Problem Formulation . Mathematical expressions can be depicted as binary-unary trees , with operators in the form of internal nodes , operands in the form of children , and numbers , constants , and variables in the form of leaves ( Lample & Charton , 2019 ) . These trees can be transformed into a sequence of math letters by traversing them in some specific order . In this paper , a tree of symbolic mathematical expressions is scanned by the prefix traversal to produce a sequence corresponding to the mathematical expression . We formulate our symbolic mathematics as a Seq2Seq translation problem with a large scale pretrained mBART ( and Marian-MT ) transformer . The pretrained transformer is retrained with random expressions data set for the case function integration and differential equation . The training dataset for both tasks is a tuple of mathematical expressions in the format of ( fproblem , fsolution ) . Our pretrained transformer model PΘ solves the symbolic mathematics task by minimizing the prediction loss e as follows : minimize Θ 1 n n∑ i=1 e ( PΘ ( fproblem ) , fsolution ) ( 1 ) where Θ is the learned parameter and n is the number of samples . 3 Theory . Pretraining of the mBART transformer PΘ is done by Seq2Seq translation between the source language English and target language of Romanian . The model parameters Θ as expressed in Equation 1 are learned with gradient descent during the translation task . Fine-tuning the model on symbolic data set allows the model to transfer the knowledge of language translation . Our model inputs the mathematical expressions and predicts the output mathematical expressions of the shortest length . The model searches its big hypothesis space and finds the optimum hypothesis that outputs the shortest mathematical sequence . Searching the big hypothesis space incurs huge optimization cost and also the optimization surface is non-convex . Our model generalizes using the phenomena of self-regularization , which is a complex interpolation process between two parameter spaces . The parameter space Θ of our transformer model lie in a very high-dimensional space and is poorly understood . We model our parameter space as a Normed space . The learned parameter space Θtranslation = ( Rd , ||.||Θtranslation ) is a d-dimensional normed space where d is very large . The learned parameter space comes after the training from English to Romanian translation . Fine-tuning the model with mathematical expressions is a perturbation of the parameter space Θtranslation to a new parameter space Θfine−tuning . The fine-tuning normed space can similarly be defined as Θfine−tuning = ( Rd , ||.||Θfine−tuning ) . Our transformer model during the fine-tuning does a complex interpolation between normed spaces from Θtranslation to Θfine−tuning with a bounded variance ( Andoni et al. , 2018a ; b ) . During the fine-tuning of our model with a new test sample Q ⊆ Θfine−tuning of symbolic expression , our model does an approximate nearest neighbor approximation search and find closet point in P ⊆ Θtranslation in the translation metric space . For given c ≥ 1 and r > 0 our transformer model finds point P such that distance dX ( q , p ) ≤ r with c−Approximate Near Neighbor Search ( c-ANN ) . The large size of the transformer parameter space , it is randomly partitioned into translation space Θtranslation and fine-tuning space Θfine−tuning . Each of the partition of translation space and fine-tuning space is prepossessed as a data structure of Celltranslation and Cellfine−tuning . The Celltranslation ’ s are then represented as a binary tree as shown in1 . Given a query data structure Cellfine−tuning during the symbolic mathematics tasks , our transformer model searches its Cellfine−tuning binary tree to find the approximate match . The normed space restrictions of Θtranslation and Θfine−tuning guarantees the c-Approximate Near Neighbor Search ( c-ANN ) in polynomial time . The self-regularization process comes from the underlying high-dimensional geometric structure of Θtranslation and Θfine−tuning . 4 Experimental Setting . We evaluate a diverse set of symbolic mathematical data sets as introduced in Lample & Charton ( 2019 ) . The tasks studied in these datasets include symbolic integration and solving differential equations of order one and two . Mainly , we are interested in whether pretrained language models are genetically capable of solving these tasks with fewer data . Moreover , whether the language that they have been pretrained on impacts their result after transfer learning . In section 5 , we will do this empirical study by asking structured research questions . 4.1 Architecture . We use the Marian model ( Junczys-Dowmunt et al. , 2018 ) and the mBART model ( Liu et al. , 2020 ) , pre-trained on different translation tasks by the NLP group at the University of Helsinki and Facebook , using the Marian model and the mBART model of the famous NLP framework , Hugging-Face ( Wolf et al. , 2019 ) . Both models follow the famous transformer architecture introduced in Vaswani et al . ( 2017 ) . The Hugging-Face mBART model has an embedding size of 1024 , with 16 attention heads and 12 layers . The Marian-MT model we use ( only ) in section 5.2 , has an embedding size of 512 , with 8 attention heads and 6 layers . The Marian Model and the mBART model have approximately 74 and 610 a million parameters . The Parameter counts may vary depending on the vocab size of the language they have been pretrained on . We also train the model used in Lample & Charton ( 2019 ) with the same parameters as the mBart model ( i.e. , with an embedding size of 1024 , 12 layers and 16 attention heads . ) .
This work investigate the problem of whether pretraining on language task such as machine translation could help with solving symbolic mathematics problems. Specifically they focused on solving symbolic integration and differential equations using the dataset similar to [Lample & Charleston, 2019]. The authors argued that finetuning a pretrained transformer model could get similar or better accuracy with fewer epochs. They then investigated the effect of the choice of language pairs and how the model works under domain shifts.
SP:852ee74381bfef42fbef5d0e9c474788793d384b
Pretrained Language Models are Symbolic Mathematics Solvers too!
1 Introduction . Deep learning is a ubiquitous choice in solving statistical pattern recognition problems of regression and classification . With a large training data set and compute power , they have proven to be very effective and achieve state-of-the-art performance in a wide range of tasks in natural language processing , computer vision , speech recognition , sentiment analysis , etc ( Lu et al. , 2021 ) . Though deep learning triumphs in the statistical domain ( Bengio et al. , 2003 ) , there is an active interest in extending deep networks in symbolic computation ( Lample & Charton , 2019 ; Davis , 2019 ; Allamanis et al. , 2017 ; Zaremba et al. , 2014 ; Loos et al. , 2017 ) . There are mainly two motivations for this : ( i ) performing symbolic mathematical tasks , such as symbolic integration and solving differential equations , in deep net architectures , and ( ii ) applying neural networks in the domain automated theorem proving , computer algebra systems , and natural language understanding ( NLU ) that requires a symbolic knowledge system . The key capability of symbolic computation is that symbols maintain their identity as they do multiple roles while deep neural networks exploit shared representation and composition . This paper uses a pretrained language model to solve symbolic mathematics tasks , particularly symbolic integration and differential equations . We show our pretrained transformer architecture on language translation is expressive enough to solve large class symbolic mathematics such as function integration and differential equations , which have traditionally been approached using logic and exhaustive search . Moreover , our pretrained model is sample efficient and compute efficient–i.e. , it requires fewer epochs to converge to good accuracy . The first major work of solving symbolic mathematics with transformer architecture is by Lample & Charton ( 2019 ) . They use the transformer model that is mainly used for NLP tasks to solve the symbolic computation . They first re-frame the mathematical equations as text sequences and then solving those equations as a sequence-to-sequence translation . Their transformer model catches pattern in the mathematical expressions , e.g. , the expressions of the form sin−1 ( x ) will have its primitive as 1√1−x2 . We extend the work of Lample & Charton ( 2019 ) and train their symbolic math dataset by fine-tuning pretrained translation models to solve the downstream task of symbolic mathematics . The pretrained language model will transfer the syntactic and semantic structure of the present in the language , mathematical expressions represented as trees . The inherent limitation between the manyto-one map between mathematical expression and tree encoding is partially regularized by the pre-training with the language translation . For example , the same mathematical expressions 7 + 3× ( 5 + 2 ) and 3× ( 5 + 2 ) + 7 are represented are encoded as different trees . We regularize ( penalize ) this freedom of expression of encoding a mathematical expression by multiple trees by pretraining our transformer model with language translation . The sentence in a language has an order as specified by the famous quote by J. R. Firt “ You shall know a word by the company it keeps. ” . Unlike language , where the meaning of a word is given by its neighbors , the value of a mathematical sub-expression ( mathematical word ) is not influenced by its neighboring expressions . In their training data set generation for function integration , mathematical expressions F and G are generated and the corresponding derivatives f and g are computed . The training data set are the tuples ( f , F ) , ( g , G ) and a new integration function data set Fg is generated ( assuming ( fG , ∫ fG ) is in the training set ) through IBP ( Integration By Parts ) 1 method as : ∫ Fg = FG− ∫ fG . Their vanilla transformer model during training learns to build the correlation between ∫ Fg and fG for solving symbolic mathematics . We differ from their model by ( i ) forcing our transformer model to develop conditional probability between randomly generated functions PΘ ( f |G ) and PΘ ( g|F ) as follows : P ( fG ) = P ( f |G ) P ( G ) P ( Fg ) = P ( g|F ) P ( F ) where PΘ is our pretrained transformer model and Θ is the learned parameter ( weights and biases ) . By re-framing the problem to a conditional probability model , we bypass the distributions of randomly generated functions P ( F ) and P ( G ) . Our method also shows marginal robustness to different types of data set generation method , as shown in table 4 . ( ii ) Our model ’ s predictions improve even when there is a difference of length between input and output sequence . This is because of the phenomena of heavy-tailed distribution , where the model can generate rare small or large output expressions ( Sornette , 2006 ; Martin & Mahoney , 2018 ) . Our model is less sensitive with large difference of length between input and output mathematical expressions ( i.e. , the problem and the solution sequence . ) as explained in Section 3 . The paper is organized as follows : In Section 2 we discuss the prediction of our pretrained transformer model in the language conditional probability and optimization , Section 3 discusses our proposed of heavy-tailed self-regularization under the mild condition of our pretraining , Section 4 discusses experimental setting and methodology , architecture , datasets , and the evaluation metric , and Section 5 poses the following research questions and answers them : 1 . Does this pretrained model help us to use less data for fine-tuning ? 2 . Does the result of this fine-tuning depend on the languages used for pretraining ? 3 . How robust this fine-tuned model is with respect to distribution shift of test data in comparison with fine-tuning data ? Section 6 , discusses literature review , and finally , Section 7 concludes the paper . 1More details about the datasets are explained in section 4.2 . 2 Problem Formulation . Mathematical expressions can be depicted as binary-unary trees , with operators in the form of internal nodes , operands in the form of children , and numbers , constants , and variables in the form of leaves ( Lample & Charton , 2019 ) . These trees can be transformed into a sequence of math letters by traversing them in some specific order . In this paper , a tree of symbolic mathematical expressions is scanned by the prefix traversal to produce a sequence corresponding to the mathematical expression . We formulate our symbolic mathematics as a Seq2Seq translation problem with a large scale pretrained mBART ( and Marian-MT ) transformer . The pretrained transformer is retrained with random expressions data set for the case function integration and differential equation . The training dataset for both tasks is a tuple of mathematical expressions in the format of ( fproblem , fsolution ) . Our pretrained transformer model PΘ solves the symbolic mathematics task by minimizing the prediction loss e as follows : minimize Θ 1 n n∑ i=1 e ( PΘ ( fproblem ) , fsolution ) ( 1 ) where Θ is the learned parameter and n is the number of samples . 3 Theory . Pretraining of the mBART transformer PΘ is done by Seq2Seq translation between the source language English and target language of Romanian . The model parameters Θ as expressed in Equation 1 are learned with gradient descent during the translation task . Fine-tuning the model on symbolic data set allows the model to transfer the knowledge of language translation . Our model inputs the mathematical expressions and predicts the output mathematical expressions of the shortest length . The model searches its big hypothesis space and finds the optimum hypothesis that outputs the shortest mathematical sequence . Searching the big hypothesis space incurs huge optimization cost and also the optimization surface is non-convex . Our model generalizes using the phenomena of self-regularization , which is a complex interpolation process between two parameter spaces . The parameter space Θ of our transformer model lie in a very high-dimensional space and is poorly understood . We model our parameter space as a Normed space . The learned parameter space Θtranslation = ( Rd , ||.||Θtranslation ) is a d-dimensional normed space where d is very large . The learned parameter space comes after the training from English to Romanian translation . Fine-tuning the model with mathematical expressions is a perturbation of the parameter space Θtranslation to a new parameter space Θfine−tuning . The fine-tuning normed space can similarly be defined as Θfine−tuning = ( Rd , ||.||Θfine−tuning ) . Our transformer model during the fine-tuning does a complex interpolation between normed spaces from Θtranslation to Θfine−tuning with a bounded variance ( Andoni et al. , 2018a ; b ) . During the fine-tuning of our model with a new test sample Q ⊆ Θfine−tuning of symbolic expression , our model does an approximate nearest neighbor approximation search and find closet point in P ⊆ Θtranslation in the translation metric space . For given c ≥ 1 and r > 0 our transformer model finds point P such that distance dX ( q , p ) ≤ r with c−Approximate Near Neighbor Search ( c-ANN ) . The large size of the transformer parameter space , it is randomly partitioned into translation space Θtranslation and fine-tuning space Θfine−tuning . Each of the partition of translation space and fine-tuning space is prepossessed as a data structure of Celltranslation and Cellfine−tuning . The Celltranslation ’ s are then represented as a binary tree as shown in1 . Given a query data structure Cellfine−tuning during the symbolic mathematics tasks , our transformer model searches its Cellfine−tuning binary tree to find the approximate match . The normed space restrictions of Θtranslation and Θfine−tuning guarantees the c-Approximate Near Neighbor Search ( c-ANN ) in polynomial time . The self-regularization process comes from the underlying high-dimensional geometric structure of Θtranslation and Θfine−tuning . 4 Experimental Setting . We evaluate a diverse set of symbolic mathematical data sets as introduced in Lample & Charton ( 2019 ) . The tasks studied in these datasets include symbolic integration and solving differential equations of order one and two . Mainly , we are interested in whether pretrained language models are genetically capable of solving these tasks with fewer data . Moreover , whether the language that they have been pretrained on impacts their result after transfer learning . In section 5 , we will do this empirical study by asking structured research questions . 4.1 Architecture . We use the Marian model ( Junczys-Dowmunt et al. , 2018 ) and the mBART model ( Liu et al. , 2020 ) , pre-trained on different translation tasks by the NLP group at the University of Helsinki and Facebook , using the Marian model and the mBART model of the famous NLP framework , Hugging-Face ( Wolf et al. , 2019 ) . Both models follow the famous transformer architecture introduced in Vaswani et al . ( 2017 ) . The Hugging-Face mBART model has an embedding size of 1024 , with 16 attention heads and 12 layers . The Marian-MT model we use ( only ) in section 5.2 , has an embedding size of 512 , with 8 attention heads and 6 layers . The Marian Model and the mBART model have approximately 74 and 610 a million parameters . The Parameter counts may vary depending on the vocab size of the language they have been pretrained on . We also train the model used in Lample & Charton ( 2019 ) with the same parameters as the mBart model ( i.e. , with an embedding size of 1024 , 12 layers and 16 attention heads . ) .
The authors use transformers pre-trained on machine translation tasks on the integration and differential equation datasets proposed by Lample and Charton (Deep Learning for Symbolic Mathematics, ICLR 2020). They show that pre-training on "pure language" tasks help models, in terms of learning speed, accuracy, and, to a lesser extent, out of distribution generalization. Pre-training on different language pairs, on the other hand, has little impact on performance.
SP:852ee74381bfef42fbef5d0e9c474788793d384b
Tabular Data Imputation: Choose KNN over Deep Learning
1 INTRODUCTION . Missing values constitute a serious issue in data science . Incomplete datasets result from uncollected , lost or voluntarily deleted observations . Most machine learning algorithms can not handle datasets with missing values , and meticulous data preprocessing is therefore needed . The most common preparatory processing consists of Listwise deletion , where only complete observations are kept for further data analysis . This solution , although straightforward to implement , has two main disadvantages : it significantly reduces the size of the dataset and induces a bias , which may lead to false positive research claims ( Lall ( 2016 ) ) . Data imputation is an alternative preprocessing method which involves estimation and replacement of the missing values . It allows to preserve the whole dataset for subsequent analysis but requires careful handling as it can also introduce a bias in the imputed dataset ( Gelman & Hill ( 2006 ) ) . In particular , only ” well-behaved ” values can be imputed and missing values of outlier observations will get overlooked ( Binder ( 1996 ) ) . Several data imputation algorithms have been proposed over the last 70 years : Hot-deck , Colddeck , Mean-value substitution ( Kalton & Kasprzyk ( 1986 ) ) , C4.5 algorithm ( Salzberg ( 1994 ) ) , CN2 induction algorithm ( Clark & Niblett ( 1989 ) ) , KNN ( originally developed in 1951 - Fix & Hodges ( 1989 ) - and later expanded by Altman ( 1992 ) ) . These traditional machine learning algorithms have been shown useful in the past . Notably , KNN has shown best imputation quality amongst these various data imputation algorithms ( Batista & Monard ( 2002 ) , Bertsimas et al . ( 2018 ) , Poulos & Valle ( 2018 ) , Jadhav et al . ( 2019 ) ) . Over the last decade , Artificial Neural Networks ( ANN ) have transformed the fields of statistics , computer science and data analysis . More precisely , Generative Adversarial Networks ( GANs ) have shown spectacular results at generating new observations from a given data distribution . As such , GAN models have been developed to tackle the problem of missing values in data science . GAIN ( Yoon et al . ( 2018 ) ) and MisGAN ( Li et al . ( 2019 ) ) claim state-of-the-art data imputation results . While GAIN has been specifically developed for tabular data imputation , MisGAN is primarily designed to impute degraded images and can be adapted to work with tabular data . This work intends to compare data imputation performances of state-of-the-art GAN models ( GAIN and MisGAN ) with the standard already established K-nearest neighbours algorithm ( KNN ) . We evaluate the imputation quality in MCAR , MAR and MNAR scenarios ( see Section 2 ) . The present study is restricted to tabular data , that is numerical data we can arrange into rows and columns in the form of a table with cells . Section 2 explains the various missing data scenarios and their properties . Section 3 presents the algorithms used in this work . Section 4 introduces the datasets . Section 5 details the method of this study . Section 6 shows the data imputation results . Section 7 includes a summary , a discussion and final recommendations . 2 MISSING DATA SETTINGS . Let x denote the complete vector of a given observation and m its missing value binary mask , so that the actual available data is the element-wise product x̃ = x m. Data imputation methods seek to estimate the missing values of x̃ by taking advantage of patterns in the dataset and using observed properties of x̃ . The probability distribution of m is referred to as the missing data mechanism . Following the classification established by Little & Rubin ( 2014 ) , missing data scenarios belong to one of the following three settings . 2.1 MISSING COMPLETELY AT RANDOM ( MCAR ) . In MCAR scenarios , the missing data mechanism is assumed to be independent of the intrinsic probability distribution of x , and occurs completely at random , such that p ( m|x ) = p ( m ) . We can generate MCAR missing values in a complete dataset by hiding each cell with a given probability , for example 10 % . There exist statistical tests to assess whether the MCAR assumption holds or not ( Little ( 1988 ) ) . Apart from the obvious information loss , MCAR scenarios are convenient assumptions . Indeed , the subset of complete observations is free of bias , and we may therefore safely proceed with further data analysis techniques . However , MCAR is often an unrealistically strong assumption in practice . 2.2 MISSING AT RANDOM ( MAR ) . MAR scenarios occur when the missing data mechanism can be fully explained by the observed data . We may write p ( m|x ) = p ( m|x̃ ) . For example , males are less likely to complete a depression survey , regardless of their depression level . As long as the gender of every participant is known , the dataset can be treated as MAR by assuming that missingness only depends on maleness . MAR assumption is more general than MCAR , but can not be statistically tested and one must rely on its fairness . Subsequent statistical analyses may include biases which can theoretically be corrected under the MAR assumption . 2.3 MISSING NOT AT RANDOM ( MNAR ) . Finally , MNAR scenarios encompass every other scenario : the reason why data is missing depends on unobserved variables . In the previous example , this is the case if respondents do not fill the depression survey because of their actual depression level , or because of another unrecorded variable like their income for instance . As MCAR and MAR are convenient assumptions to facilitate the treatment of incomplete datasets , most missing data mechanisms are actually distributed in a MNAR setting . While being truthful , MNAR scenarios have no systematic ways to handle missing values . One strategy is to accumulate more data in the hope of understanding the missing data mechanism . 3 DATA IMPUTATION ALGORITHMS . We select , analyse and compare the performances of the best algorithms to date . While some tabular data imputation methods learn a probability distribution on a complete dataset before performing data imputation , we focus on algorithms which use the entire dataset ( including missing values ) to perform in-place imputations . On the one hand , GAIN ( Yoon et al . ( 2018 ) ) and MisGAN ( Li et al . ( 2019 ) ) are new state-of-the-art ANN generative models tailored for data imputation . On the other hand , the KNN algorithm is a non-parametric method which can be used for data imputation . 3.1 PRESENTATION OF GAIN . Generative Adversarial Imputation Nets ( GAIN ) have been proposed in 2018 as a generative model specifically designed for tabular data imputation problems . GAIN generalises the well-established architecture of GAN models by looking at individual cells rather than complete rows . The authors claim state-of-the art imputation quality performances ( Yoon et al . ( 2018 ) ) . Given an incomplete observation , GAIN works as follows : 1 . Cells with missing values are filled by random noise while observed values are kept unchanged . A binary mask telling whether each cell is genuine or comes from the random noise is concatenated to the observation , therefore doubling its length . 2 . This vector is provided to the GAIN generator which outputs a generated vector . The original data vector is imputed by conserving genuine cells and replacing missing cells by their corresponding values in the generated vector . 3 . The imputed vector is presented to the GAIN discriminator which tells apart genuine values from imputed values . The GAIN discriminator works on a cell-by-cell basis instead of considering the row as a whole . Both GAIN generator ’ s and discriminator ’ s parameters are trained following the standard adversarial process used by GAN models . GAIN ’ s parameters are updated to minimise the binary cross-entropy loss function for the discriminator given by LD ( i ) = − ∑ j , bij=0 mij log ( ŷij ) + ( 1−mij ) log ( 1− ŷij ) where mij is 0 if cell ( i , j ) is missing or 1 otherwise , bij = 0 indicates cells that have not been hinted to the discriminator , and ŷij is the discriminator prediction for cell ( i , j ) ; and a combination of binary cross-entropy ( for the generated cells ) and RMSE for the discriminator given by LG ( i ) = LG1 ( i ) + αLG2 ( i ) with LG1 ( i ) = − ∑ j , bij=0 ( 1−mij ) log ( ŷij ) and LG2 ( i ) = − ∑ j mij ( x̃ij − xij ) 2 where x̃ij is the generator output and xij the actual observation for cell ( i , j ) . GAIN has two hyperparameters to manually tune : the hint fraction h of true labels to provide the discriminator to stabilise learning , and α the relative weight between cross-entropy and RMSE for the generator loss . After several trails , we decide to use the recommended default values of Yoon et al . ( 2018 ) . Besides , the most relevant hyperparameter for GAIN is the number of training epochs , which we discuss in Section 5 . 3.2 PRESENTATION OF MISGAN . MisGAN has been introduced in 2019 as another GAN model framework capable of handling complex datasets with missing values . Primarily developed for image completion , it can be adapted to handle tabular data . MisGAN claims state-of-the-art imputation quality for images ( Li et al . ( 2019 ) ) . In its original design , MisGAN is composed of three pairs of generator and discriminator . A first pair ( Gx , Dx ) attempts to model the probability distribution of the data , while another pair ( Gm , Dm ) tries to model the missing data mechanism . Both generators Gx and Gm are used in parallel to produce fake deteriorated observations . Finally , a third pair ( Gi , Di ) is used to perform the imputation of missing values . When adapted to tabular data , the missing data mechanism has a simple distribution and does not require complex neural networks to be modelled . Instead , we choose to draw missing masks directly from the observations in the dataset . Like for GAIN , the performances of MisGAN mostly depends on the number of training epochs . Section 5 explains how we fix the number of training epochs for MisGAN . The artificial neural network architecture of GAIN and MisGAN are both presented in Appendix A . 3.3 PRESENTATION OF KNN . The K-Nearest Neighbours algorithm is a non-parametric method , originally developed for classification tasks in 1951 ( Altman ( 1992 ) ) . For data imputation tasks , the KNN algorithm selects the K nearest neighbours of a given incomplete observation , and uses available data from the selected neighbours to estimate missing values . Despite its simplicity and its age , the KNN algorithm has been shown to outperform traditional data imputation algorithms ( Batista & Monard ( 2002 ) ) . KNN imputes missing values using a weighted average of the selected neighbours . The most two common weighting systems are uniform and distance , respectively defined by 1K ( where K is the number of neighbours ) and 1dij ( where dij is the distance between observations i and j . We respectively refer to these algorithms with the names KNN-uniform and KNN-distance .
This paper considers the problem of tabular data imputation to handle missing numeric data. It compares the RMSE of recently proposed GAN-based methods (GAIN and mis-GAN) with the classical KNN method (either through uniform or distance-weighted imputation). It considers 9 datasets, two are simulated by a mixture of Gaussians and 7 are real datasets, 5 of them used in the GAIN paper. The datasets have 500-30000 samples and 5-57 features (most are below 20). It also considers three different mechanisms of missing data (MCAR - completely random, MAR - random based on the observed data, MNAR - based on unobserved data), each with one or two rates of missing data (more rates are tested for MCAR with the simulated data). The hyperparameters of all the models are tuned once on the simulated data (1000 samples), and scaled based on the number of samples for each dataset (scaling the number of neighbors for KNN, or epochs for the GANs). The models are applied to each imputation case 20 times, presenting the mean and standard deviation for each dataset in each scenario. The paper shows that mis-GAN, originally developed for filling missing image pixels, usually performs much worse than KNN. Furthermore, KNN generally performs roughly on-par compared to GAIN, depending on the dataset and exact scenario (in many cases KNN is better). Based on the presented figures, the RMSE differences are usually within 0.02, but may reach 0.05. The compute required by KNN is much lower, and the paper calls for using the cheaper option, avoiding waste of resources.
SP:e547064b6600f601b2ea5bfe9c3f67d119d2c8c9
Tabular Data Imputation: Choose KNN over Deep Learning
1 INTRODUCTION . Missing values constitute a serious issue in data science . Incomplete datasets result from uncollected , lost or voluntarily deleted observations . Most machine learning algorithms can not handle datasets with missing values , and meticulous data preprocessing is therefore needed . The most common preparatory processing consists of Listwise deletion , where only complete observations are kept for further data analysis . This solution , although straightforward to implement , has two main disadvantages : it significantly reduces the size of the dataset and induces a bias , which may lead to false positive research claims ( Lall ( 2016 ) ) . Data imputation is an alternative preprocessing method which involves estimation and replacement of the missing values . It allows to preserve the whole dataset for subsequent analysis but requires careful handling as it can also introduce a bias in the imputed dataset ( Gelman & Hill ( 2006 ) ) . In particular , only ” well-behaved ” values can be imputed and missing values of outlier observations will get overlooked ( Binder ( 1996 ) ) . Several data imputation algorithms have been proposed over the last 70 years : Hot-deck , Colddeck , Mean-value substitution ( Kalton & Kasprzyk ( 1986 ) ) , C4.5 algorithm ( Salzberg ( 1994 ) ) , CN2 induction algorithm ( Clark & Niblett ( 1989 ) ) , KNN ( originally developed in 1951 - Fix & Hodges ( 1989 ) - and later expanded by Altman ( 1992 ) ) . These traditional machine learning algorithms have been shown useful in the past . Notably , KNN has shown best imputation quality amongst these various data imputation algorithms ( Batista & Monard ( 2002 ) , Bertsimas et al . ( 2018 ) , Poulos & Valle ( 2018 ) , Jadhav et al . ( 2019 ) ) . Over the last decade , Artificial Neural Networks ( ANN ) have transformed the fields of statistics , computer science and data analysis . More precisely , Generative Adversarial Networks ( GANs ) have shown spectacular results at generating new observations from a given data distribution . As such , GAN models have been developed to tackle the problem of missing values in data science . GAIN ( Yoon et al . ( 2018 ) ) and MisGAN ( Li et al . ( 2019 ) ) claim state-of-the-art data imputation results . While GAIN has been specifically developed for tabular data imputation , MisGAN is primarily designed to impute degraded images and can be adapted to work with tabular data . This work intends to compare data imputation performances of state-of-the-art GAN models ( GAIN and MisGAN ) with the standard already established K-nearest neighbours algorithm ( KNN ) . We evaluate the imputation quality in MCAR , MAR and MNAR scenarios ( see Section 2 ) . The present study is restricted to tabular data , that is numerical data we can arrange into rows and columns in the form of a table with cells . Section 2 explains the various missing data scenarios and their properties . Section 3 presents the algorithms used in this work . Section 4 introduces the datasets . Section 5 details the method of this study . Section 6 shows the data imputation results . Section 7 includes a summary , a discussion and final recommendations . 2 MISSING DATA SETTINGS . Let x denote the complete vector of a given observation and m its missing value binary mask , so that the actual available data is the element-wise product x̃ = x m. Data imputation methods seek to estimate the missing values of x̃ by taking advantage of patterns in the dataset and using observed properties of x̃ . The probability distribution of m is referred to as the missing data mechanism . Following the classification established by Little & Rubin ( 2014 ) , missing data scenarios belong to one of the following three settings . 2.1 MISSING COMPLETELY AT RANDOM ( MCAR ) . In MCAR scenarios , the missing data mechanism is assumed to be independent of the intrinsic probability distribution of x , and occurs completely at random , such that p ( m|x ) = p ( m ) . We can generate MCAR missing values in a complete dataset by hiding each cell with a given probability , for example 10 % . There exist statistical tests to assess whether the MCAR assumption holds or not ( Little ( 1988 ) ) . Apart from the obvious information loss , MCAR scenarios are convenient assumptions . Indeed , the subset of complete observations is free of bias , and we may therefore safely proceed with further data analysis techniques . However , MCAR is often an unrealistically strong assumption in practice . 2.2 MISSING AT RANDOM ( MAR ) . MAR scenarios occur when the missing data mechanism can be fully explained by the observed data . We may write p ( m|x ) = p ( m|x̃ ) . For example , males are less likely to complete a depression survey , regardless of their depression level . As long as the gender of every participant is known , the dataset can be treated as MAR by assuming that missingness only depends on maleness . MAR assumption is more general than MCAR , but can not be statistically tested and one must rely on its fairness . Subsequent statistical analyses may include biases which can theoretically be corrected under the MAR assumption . 2.3 MISSING NOT AT RANDOM ( MNAR ) . Finally , MNAR scenarios encompass every other scenario : the reason why data is missing depends on unobserved variables . In the previous example , this is the case if respondents do not fill the depression survey because of their actual depression level , or because of another unrecorded variable like their income for instance . As MCAR and MAR are convenient assumptions to facilitate the treatment of incomplete datasets , most missing data mechanisms are actually distributed in a MNAR setting . While being truthful , MNAR scenarios have no systematic ways to handle missing values . One strategy is to accumulate more data in the hope of understanding the missing data mechanism . 3 DATA IMPUTATION ALGORITHMS . We select , analyse and compare the performances of the best algorithms to date . While some tabular data imputation methods learn a probability distribution on a complete dataset before performing data imputation , we focus on algorithms which use the entire dataset ( including missing values ) to perform in-place imputations . On the one hand , GAIN ( Yoon et al . ( 2018 ) ) and MisGAN ( Li et al . ( 2019 ) ) are new state-of-the-art ANN generative models tailored for data imputation . On the other hand , the KNN algorithm is a non-parametric method which can be used for data imputation . 3.1 PRESENTATION OF GAIN . Generative Adversarial Imputation Nets ( GAIN ) have been proposed in 2018 as a generative model specifically designed for tabular data imputation problems . GAIN generalises the well-established architecture of GAN models by looking at individual cells rather than complete rows . The authors claim state-of-the art imputation quality performances ( Yoon et al . ( 2018 ) ) . Given an incomplete observation , GAIN works as follows : 1 . Cells with missing values are filled by random noise while observed values are kept unchanged . A binary mask telling whether each cell is genuine or comes from the random noise is concatenated to the observation , therefore doubling its length . 2 . This vector is provided to the GAIN generator which outputs a generated vector . The original data vector is imputed by conserving genuine cells and replacing missing cells by their corresponding values in the generated vector . 3 . The imputed vector is presented to the GAIN discriminator which tells apart genuine values from imputed values . The GAIN discriminator works on a cell-by-cell basis instead of considering the row as a whole . Both GAIN generator ’ s and discriminator ’ s parameters are trained following the standard adversarial process used by GAN models . GAIN ’ s parameters are updated to minimise the binary cross-entropy loss function for the discriminator given by LD ( i ) = − ∑ j , bij=0 mij log ( ŷij ) + ( 1−mij ) log ( 1− ŷij ) where mij is 0 if cell ( i , j ) is missing or 1 otherwise , bij = 0 indicates cells that have not been hinted to the discriminator , and ŷij is the discriminator prediction for cell ( i , j ) ; and a combination of binary cross-entropy ( for the generated cells ) and RMSE for the discriminator given by LG ( i ) = LG1 ( i ) + αLG2 ( i ) with LG1 ( i ) = − ∑ j , bij=0 ( 1−mij ) log ( ŷij ) and LG2 ( i ) = − ∑ j mij ( x̃ij − xij ) 2 where x̃ij is the generator output and xij the actual observation for cell ( i , j ) . GAIN has two hyperparameters to manually tune : the hint fraction h of true labels to provide the discriminator to stabilise learning , and α the relative weight between cross-entropy and RMSE for the generator loss . After several trails , we decide to use the recommended default values of Yoon et al . ( 2018 ) . Besides , the most relevant hyperparameter for GAIN is the number of training epochs , which we discuss in Section 5 . 3.2 PRESENTATION OF MISGAN . MisGAN has been introduced in 2019 as another GAN model framework capable of handling complex datasets with missing values . Primarily developed for image completion , it can be adapted to handle tabular data . MisGAN claims state-of-the-art imputation quality for images ( Li et al . ( 2019 ) ) . In its original design , MisGAN is composed of three pairs of generator and discriminator . A first pair ( Gx , Dx ) attempts to model the probability distribution of the data , while another pair ( Gm , Dm ) tries to model the missing data mechanism . Both generators Gx and Gm are used in parallel to produce fake deteriorated observations . Finally , a third pair ( Gi , Di ) is used to perform the imputation of missing values . When adapted to tabular data , the missing data mechanism has a simple distribution and does not require complex neural networks to be modelled . Instead , we choose to draw missing masks directly from the observations in the dataset . Like for GAIN , the performances of MisGAN mostly depends on the number of training epochs . Section 5 explains how we fix the number of training epochs for MisGAN . The artificial neural network architecture of GAIN and MisGAN are both presented in Appendix A . 3.3 PRESENTATION OF KNN . The K-Nearest Neighbours algorithm is a non-parametric method , originally developed for classification tasks in 1951 ( Altman ( 1992 ) ) . For data imputation tasks , the KNN algorithm selects the K nearest neighbours of a given incomplete observation , and uses available data from the selected neighbours to estimate missing values . Despite its simplicity and its age , the KNN algorithm has been shown to outperform traditional data imputation algorithms ( Batista & Monard ( 2002 ) ) . KNN imputes missing values using a weighted average of the selected neighbours . The most two common weighting systems are uniform and distance , respectively defined by 1K ( where K is the number of neighbours ) and 1dij ( where dij is the distance between observations i and j . We respectively refer to these algorithms with the names KNN-uniform and KNN-distance .
This manuscript presents a nice empirical comparison between the classic KNN imputation with two state-of-the-art GAN-based imputations for tabular data imputation. The experiments are performed on both simulated and publicly available real data. The results, overall, show that the KNN, despite its simplicity, provides very competitive results when compared to its more complex and computationally expensive alternatives. In summary, this paper has a few important messages for both method developers and reviewers in the missing data community: i) first try the simplest; ii) more complex does not mean better; iii) understand your data before data imputation;
SP:e547064b6600f601b2ea5bfe9c3f67d119d2c8c9
Pixab-CAM: Attend Pixel, not Channel
1 INTRODUCTION . As the performance of convolution neural networks ( CNNs ) converges to some extent ( Szegedy et al. , 2015 ; Simonyan & Zisserman , 2014 ; Huang et al. , 2017 ; Howard et al. , 2017 ; Chollet , 2017 ) , researchers have become interested in interpreting their predictions ( Springenberg et al. , 2014 ; Smilkov et al. , 2017 ; Fong & Vedaldi , 2017 ; Bach et al. , 2015 ; Lundberg & Lee , 2017 ; Ribeiro et al. , 2016 ; Petsiuk et al. , 2018 ; Shrikumar et al. , 2017 ) . One of them is class activation mapping ( CAM ) based approach ( Zhou et al. , 2016 ) , which generates an explanation map by a linear combination of channels in the activation tensor and corresponding weights . The explanation map Lcij for the target class c is calculated as Eqn.1 . Akij represents activation of pixel at spatial location ( i , j ) for k-th channel of the activation tensor A , and wck denotes the coefficient of the k-th channel for class c. Lcij = ∑ k wck ·Akij ( 1 ) The activation tensor A is fixed since it is determined by the given input image and pretrained model ( LeCun et al. , 1998 ) . Therefore , Lc depends on how wck is defined . Thus , different w c k have been proposed in many CAM-based methods to generate high-quality explanation maps . The previous CAM-based methods can be divided into two categories , one is gradient-based CAMs ( Selvaraju et al. , 2017 ; Chattopadhay et al. , 2018 ; Fu et al. , 2020 ) , and the other is gradient-free CAMs ( Wang et al. , 2020 ; Ramaswamy et al. , 2020 ) . Gradient-based CAMs and gradient-free CAMs can be distinguished by whether or not gradients are used in the process of deriving weights . 1.1 GRADIENT-BASED CAMS . Grad-CAM ( Selvaraju et al. , 2017 ) obtains the weight of k-th channel by averaging their gradients . However , it has a problem in that the weight is crushed due to the offset of positive and negative gradients . ( Z is the number of pixels in a channel and Y c is the classification score for class c ) wck = 1 Z ∑ i ∑ j ∂Y c ∂Akij ( 2 ) Grad-CAM++ ( Chattopadhay et al. , 2018 ) introduced higher-order derivatives αkcij in Grad-CAM equation to solve the problem that channels with fewer footprints fade away in the explanation map . wck = ∑ i ∑ j αkcij ·ReLU ( ∂Y c ∂Akij ) ( 3 ) XGrad-CAM ( Fu et al. , 2020 ) points out that previous CAM-based methods lack sufficient theoretical support and propose weight that satisfies two basic axioms : Sensitivity and Conservation . wck = ∑ i ∑ j ( Akij∑ i ∑ j A k ij ∂Y c ∂Akij ) ( 4 ) However , Gradient-based CAMs suffer from gradient saturation problems , leading to localization failures for relevant regions . ( Wang et al. , 2020 ; Ramaswamy et al. , 2020 ; Jung & Oh , 2021 ) 1.2 GRADIENT-FREE CAMS . Score-CAM ( Wang et al. , 2020 ) defines “ increase of confidence ” as the coefficient of the channel . For input X and baseline input Xb , the weight of the k-th channel for class c is defined as wck = f ( X ◦ s ( u ( Ak ) ) ) ) − f ( Xb ) ( 5 ) where u ( · ) indicates the upsampling operation into the input size , s ( · ) is a function that normalizes all elements to [ 0 , 1 ] and ◦ is the “ Hadamard product ” . Ablation-CAM ( Ramaswamy et al. , 2020 ) , which inspired our research , defines the weight of a specific channel as the fraction of drop in activation score of target class when that channel is removed . In the equation below , Y ck is the score of class c when the k-th channel has been replaced by zero . wck = Y c − Y ck Y c ( 6 ) Gradient-free CAMs remove the dependence of gradients , but they are time-comsuming because the prediction process must be repeated as many times as the number of channels to acquire the weights . Regardless of whether gradient is used or not , all CAM-based methods so far have two things in common . First , they all use channel-wise weights wck ( see Eqn.1 ) . However , since the channel-wise weights allow all pixels in a specific channel to share a single weight , it is an unfair weighting method from the pixel perspective . ( Although αkcij in Grad-CAM++ ( Eqn.3 ) modifies the gradients at the pixel level , but these gradients are eventually crushed into a single scalar value , so it doesn ’ t solve the problem of pixels being tied together . ) Furthermore , channel-wise weight-based methods tend to assign high weight if there are pixels that have a high contribution to the target class among the active pixels in the channel . Therefore , within a specific channel , other pixels that are active with the pixels related to the target class are also given a high weight . If channels containing these overestimated pixels are accumulated , overestimated pixels also occur in the explanation map . ( see Sec.3.1 ) Second , when generating the explanation map Lc , all CAM-based methods follow Eqn.1 , which contains the activation tensor A . Therefore , the explanation map has no choice but to depend on the activation tensor , and eventually may capture too much meaningless information since the channels in the activation tensor are not necessarily related to the target category ( Zhang et al. , 2021 ) . ( see Sec.3.2 ) 2 PROPOSED EVALUATION METRICS OF THE EXPLANATION MAP . Since it is hard to know where CNN looks and makes a specific prediction , the existing evaluation metrics of the explanation map have limitations . AD & IIC ( Chattopadhay et al. , 2018 ) and Deletion & Insertion ( Petsiuk et al. , 2018 ) are coarse proxy evaluations because removing pixels by zero-ing/graying is unnatural in real photos ( Dabkowski & Gal , 2017 ) . Also , in Localization Evaluation ( Wang et al. , 2020 ) , there may not be a correlation between localization ability and the quality of the explanation map since the human-annotated bounding box may not match where CNN is actually focusing . However , if we could know where CNN is looking , we could make a more accurate assessment . We use an adversarial attack for this . ( we use FGSM attack ( Goodfellow et al. , 2014 ) . ) If a targeted adversarial attack is made on a specific patch in the zero image , it is self-evident that CNN sees that patch and determines that it is a target , so the performance can be evaluated by whether the explanation map correctly captures that part . We propose 2 evaluation tasks ( DAP1 and DAP2 ) from this idea . Before introducing them , we will explain 2 adversarial examples ( AE1 and AE2 ) first . 2.1 ADVERSARIAL EXAMPLE 1 ( AE1 ) . It is simple to attach an adversarial patch classified as a given target class to an input image . First , we apply a targeted adversarial attack so that the patch at a specific location in the zero image is classified into the class we want . Since the attack is applied only to the patch , the rest of the area is still zero as in ( b ) . Then , the input image with only the patch area of zero ( ( d ) ) is added to the image ( b ) . The finally obtained adversarial example AE1 ( ( e ) ) is used for our evaluation task DAP1 . 2.2 ADVERSARIAL EXAMPLE 2 ( AE2 ) . For generating a second adversarial example AE2 , only adversarial patches are used without input images . This can also be easily created . After generating four adversarial patches in the same way as in Sec.2.1 ( b ) , combine them to make the final adversarial example AE2 . ( Each adversarial patch is attacked to become a different class . ) AE2 created in this way is used for evaluation task DAP2 . 2.3 DETECTING ADVERSARIAL PATCH . In this paper , “ Pointing Game ” and “ Object Localization ” are used as metrics in “ Detecting Adversarial Patch 1 ( DAP1 ) ” and “ Detecting Adversarial Patch 2 ( DAP2 ) ” tasks . Pointing Game ( PG ) ( Petsiuk et al. , 2018 ) : The Pointing Game ( PG ) is a metric that measures whether the maximum point of the explanation map is inside the human-annotated object bounding box . As in columns 2 and 5 of Figure 3 , if the point lies inside the target bounding box , it is counted as a hit . Pointing Game accuracy is calculated as # Hits # Hits+ # Misses . Object Localization ( OL ) ( Wang et al. , 2020 ) : Object Localization ( OL ) is a metric that measures how much the energy of the explanation map falls into the target bounding box instead of using only the maximum point . This metric can be formulated as ∑ Lcij∈bbox∑ Lcij∈bbox+ ∑ Lc ij /∈bbox . However , in both DAP1 and DAP2 , the ground truth bounding box of the target object is the patch , not the human-annotated bounding box . So , the ground truth bounding box in Sec.5.2.2 is the human-annotated bounding box , and the ground truth bounding box in Sec.5.2.3 is the patch . 3 MOTIVATION . 3.1 CHANNELS WITH OVERESTIMATED PIXELS ( COP ) . Figure 4 : Target : “ chihuahua ” , non-Target : “ tusker ” , “ soccer ball ” , “ broccoli ” In Figure 4 , ( b ) - ( d ) indicate which part of the input image the specific channels of the activation tensor focus on ( Masking input image with upsampled channels. ) . Channel ( b ) is focusing only on the target part , channel ( c ) is focusing on both the target and non-target part and channel ( d ) is focusing only on the non-target part . We investigated the weights for channels ( b ) - ( d ) , and it was confirmed that Grad-CAM , Grad-CAM++ , Score-CAM , Ablation-CAM , and XGrad-CAM all gave high weights to channels ( b ) and ( c ) and low weights to channel ( d ) . In other words , regardless of whether a specific channel contains a non-target part or not , as long as it contains a target part , that channel tends to be given a high weight . However , since channel-wise weight-based methods assign one weight per channel , all pixels in the channel share a single weight . As a result , for a channel like ( c ) , pixels in the non-target part are also given a high weight . As shown in Appendix A , these channels are commonly found in the activation tensor . Since the explanation map of previous methods is generated by a linear combination of channels , if the number of channels with overestimated pixels ( COP ) increases , the overestimated pixels also appear in the explanation map . These overestimated pixels suppress other pixels , so the explanation map may highlight the wrong places or only part of the target . Table 1 shows the average number of channels focusing on both the target and non-target part among the channels with the top 100 weights ( Inception V3 has 2048 channels ) . ( If the channel contains more than 80 % of the patch , the channel is considered to be focusing on that patch . ) The values in Table 1 are averaged for 500 randomly generated AE2s . Among the five methods , Score-CAM best distinguishes the channel focusing only on the target part and the channel focusing on both the target and non-target part . However , this is also not a satisfactory value .
This paper proposes a method for generating an explanation map (Pixab-CAM) showing which part the CNN model for classification refers to in making a decision. Pixab-CAM utilizes how the classification results are changed by focusing or removing a specific region of the convolutional feature map. By using this, the authors claim that various problems (gradient saturation, single scalar value for a specific channel, dependency on the activation tensor) of existing CAM-based methods are solved. Experiments were conducted on various datasets and metrics, and through this, the effectiveness of the proposed method was verified.
SP:9371386507f6840c71853847faddb3075eecbca8
Pixab-CAM: Attend Pixel, not Channel
1 INTRODUCTION . As the performance of convolution neural networks ( CNNs ) converges to some extent ( Szegedy et al. , 2015 ; Simonyan & Zisserman , 2014 ; Huang et al. , 2017 ; Howard et al. , 2017 ; Chollet , 2017 ) , researchers have become interested in interpreting their predictions ( Springenberg et al. , 2014 ; Smilkov et al. , 2017 ; Fong & Vedaldi , 2017 ; Bach et al. , 2015 ; Lundberg & Lee , 2017 ; Ribeiro et al. , 2016 ; Petsiuk et al. , 2018 ; Shrikumar et al. , 2017 ) . One of them is class activation mapping ( CAM ) based approach ( Zhou et al. , 2016 ) , which generates an explanation map by a linear combination of channels in the activation tensor and corresponding weights . The explanation map Lcij for the target class c is calculated as Eqn.1 . Akij represents activation of pixel at spatial location ( i , j ) for k-th channel of the activation tensor A , and wck denotes the coefficient of the k-th channel for class c. Lcij = ∑ k wck ·Akij ( 1 ) The activation tensor A is fixed since it is determined by the given input image and pretrained model ( LeCun et al. , 1998 ) . Therefore , Lc depends on how wck is defined . Thus , different w c k have been proposed in many CAM-based methods to generate high-quality explanation maps . The previous CAM-based methods can be divided into two categories , one is gradient-based CAMs ( Selvaraju et al. , 2017 ; Chattopadhay et al. , 2018 ; Fu et al. , 2020 ) , and the other is gradient-free CAMs ( Wang et al. , 2020 ; Ramaswamy et al. , 2020 ) . Gradient-based CAMs and gradient-free CAMs can be distinguished by whether or not gradients are used in the process of deriving weights . 1.1 GRADIENT-BASED CAMS . Grad-CAM ( Selvaraju et al. , 2017 ) obtains the weight of k-th channel by averaging their gradients . However , it has a problem in that the weight is crushed due to the offset of positive and negative gradients . ( Z is the number of pixels in a channel and Y c is the classification score for class c ) wck = 1 Z ∑ i ∑ j ∂Y c ∂Akij ( 2 ) Grad-CAM++ ( Chattopadhay et al. , 2018 ) introduced higher-order derivatives αkcij in Grad-CAM equation to solve the problem that channels with fewer footprints fade away in the explanation map . wck = ∑ i ∑ j αkcij ·ReLU ( ∂Y c ∂Akij ) ( 3 ) XGrad-CAM ( Fu et al. , 2020 ) points out that previous CAM-based methods lack sufficient theoretical support and propose weight that satisfies two basic axioms : Sensitivity and Conservation . wck = ∑ i ∑ j ( Akij∑ i ∑ j A k ij ∂Y c ∂Akij ) ( 4 ) However , Gradient-based CAMs suffer from gradient saturation problems , leading to localization failures for relevant regions . ( Wang et al. , 2020 ; Ramaswamy et al. , 2020 ; Jung & Oh , 2021 ) 1.2 GRADIENT-FREE CAMS . Score-CAM ( Wang et al. , 2020 ) defines “ increase of confidence ” as the coefficient of the channel . For input X and baseline input Xb , the weight of the k-th channel for class c is defined as wck = f ( X ◦ s ( u ( Ak ) ) ) ) − f ( Xb ) ( 5 ) where u ( · ) indicates the upsampling operation into the input size , s ( · ) is a function that normalizes all elements to [ 0 , 1 ] and ◦ is the “ Hadamard product ” . Ablation-CAM ( Ramaswamy et al. , 2020 ) , which inspired our research , defines the weight of a specific channel as the fraction of drop in activation score of target class when that channel is removed . In the equation below , Y ck is the score of class c when the k-th channel has been replaced by zero . wck = Y c − Y ck Y c ( 6 ) Gradient-free CAMs remove the dependence of gradients , but they are time-comsuming because the prediction process must be repeated as many times as the number of channels to acquire the weights . Regardless of whether gradient is used or not , all CAM-based methods so far have two things in common . First , they all use channel-wise weights wck ( see Eqn.1 ) . However , since the channel-wise weights allow all pixels in a specific channel to share a single weight , it is an unfair weighting method from the pixel perspective . ( Although αkcij in Grad-CAM++ ( Eqn.3 ) modifies the gradients at the pixel level , but these gradients are eventually crushed into a single scalar value , so it doesn ’ t solve the problem of pixels being tied together . ) Furthermore , channel-wise weight-based methods tend to assign high weight if there are pixels that have a high contribution to the target class among the active pixels in the channel . Therefore , within a specific channel , other pixels that are active with the pixels related to the target class are also given a high weight . If channels containing these overestimated pixels are accumulated , overestimated pixels also occur in the explanation map . ( see Sec.3.1 ) Second , when generating the explanation map Lc , all CAM-based methods follow Eqn.1 , which contains the activation tensor A . Therefore , the explanation map has no choice but to depend on the activation tensor , and eventually may capture too much meaningless information since the channels in the activation tensor are not necessarily related to the target category ( Zhang et al. , 2021 ) . ( see Sec.3.2 ) 2 PROPOSED EVALUATION METRICS OF THE EXPLANATION MAP . Since it is hard to know where CNN looks and makes a specific prediction , the existing evaluation metrics of the explanation map have limitations . AD & IIC ( Chattopadhay et al. , 2018 ) and Deletion & Insertion ( Petsiuk et al. , 2018 ) are coarse proxy evaluations because removing pixels by zero-ing/graying is unnatural in real photos ( Dabkowski & Gal , 2017 ) . Also , in Localization Evaluation ( Wang et al. , 2020 ) , there may not be a correlation between localization ability and the quality of the explanation map since the human-annotated bounding box may not match where CNN is actually focusing . However , if we could know where CNN is looking , we could make a more accurate assessment . We use an adversarial attack for this . ( we use FGSM attack ( Goodfellow et al. , 2014 ) . ) If a targeted adversarial attack is made on a specific patch in the zero image , it is self-evident that CNN sees that patch and determines that it is a target , so the performance can be evaluated by whether the explanation map correctly captures that part . We propose 2 evaluation tasks ( DAP1 and DAP2 ) from this idea . Before introducing them , we will explain 2 adversarial examples ( AE1 and AE2 ) first . 2.1 ADVERSARIAL EXAMPLE 1 ( AE1 ) . It is simple to attach an adversarial patch classified as a given target class to an input image . First , we apply a targeted adversarial attack so that the patch at a specific location in the zero image is classified into the class we want . Since the attack is applied only to the patch , the rest of the area is still zero as in ( b ) . Then , the input image with only the patch area of zero ( ( d ) ) is added to the image ( b ) . The finally obtained adversarial example AE1 ( ( e ) ) is used for our evaluation task DAP1 . 2.2 ADVERSARIAL EXAMPLE 2 ( AE2 ) . For generating a second adversarial example AE2 , only adversarial patches are used without input images . This can also be easily created . After generating four adversarial patches in the same way as in Sec.2.1 ( b ) , combine them to make the final adversarial example AE2 . ( Each adversarial patch is attacked to become a different class . ) AE2 created in this way is used for evaluation task DAP2 . 2.3 DETECTING ADVERSARIAL PATCH . In this paper , “ Pointing Game ” and “ Object Localization ” are used as metrics in “ Detecting Adversarial Patch 1 ( DAP1 ) ” and “ Detecting Adversarial Patch 2 ( DAP2 ) ” tasks . Pointing Game ( PG ) ( Petsiuk et al. , 2018 ) : The Pointing Game ( PG ) is a metric that measures whether the maximum point of the explanation map is inside the human-annotated object bounding box . As in columns 2 and 5 of Figure 3 , if the point lies inside the target bounding box , it is counted as a hit . Pointing Game accuracy is calculated as # Hits # Hits+ # Misses . Object Localization ( OL ) ( Wang et al. , 2020 ) : Object Localization ( OL ) is a metric that measures how much the energy of the explanation map falls into the target bounding box instead of using only the maximum point . This metric can be formulated as ∑ Lcij∈bbox∑ Lcij∈bbox+ ∑ Lc ij /∈bbox . However , in both DAP1 and DAP2 , the ground truth bounding box of the target object is the patch , not the human-annotated bounding box . So , the ground truth bounding box in Sec.5.2.2 is the human-annotated bounding box , and the ground truth bounding box in Sec.5.2.3 is the patch . 3 MOTIVATION . 3.1 CHANNELS WITH OVERESTIMATED PIXELS ( COP ) . Figure 4 : Target : “ chihuahua ” , non-Target : “ tusker ” , “ soccer ball ” , “ broccoli ” In Figure 4 , ( b ) - ( d ) indicate which part of the input image the specific channels of the activation tensor focus on ( Masking input image with upsampled channels. ) . Channel ( b ) is focusing only on the target part , channel ( c ) is focusing on both the target and non-target part and channel ( d ) is focusing only on the non-target part . We investigated the weights for channels ( b ) - ( d ) , and it was confirmed that Grad-CAM , Grad-CAM++ , Score-CAM , Ablation-CAM , and XGrad-CAM all gave high weights to channels ( b ) and ( c ) and low weights to channel ( d ) . In other words , regardless of whether a specific channel contains a non-target part or not , as long as it contains a target part , that channel tends to be given a high weight . However , since channel-wise weight-based methods assign one weight per channel , all pixels in the channel share a single weight . As a result , for a channel like ( c ) , pixels in the non-target part are also given a high weight . As shown in Appendix A , these channels are commonly found in the activation tensor . Since the explanation map of previous methods is generated by a linear combination of channels , if the number of channels with overestimated pixels ( COP ) increases , the overestimated pixels also appear in the explanation map . These overestimated pixels suppress other pixels , so the explanation map may highlight the wrong places or only part of the target . Table 1 shows the average number of channels focusing on both the target and non-target part among the channels with the top 100 weights ( Inception V3 has 2048 channels ) . ( If the channel contains more than 80 % of the patch , the channel is considered to be focusing on that patch . ) The values in Table 1 are averaged for 500 randomly generated AE2s . Among the five methods , Score-CAM best distinguishes the channel focusing only on the target part and the channel focusing on both the target and non-target part . However , this is also not a satisfactory value .
This paper aims to solve two common limitations in CAM-based methods, and proposes a new type of CAM (Pixab-CAM) that utilize pixel-wise weights instead of channel-wise weight. Meanwhile, the author also proposes to use adversarial attack as a novel evaluation metric. This work demonstrates to be superior to previous CAMs on corresponding metrics.
SP:9371386507f6840c71853847faddb3075eecbca8
Learning Generalizable Representations for Reinforcement Learning via Adaptive Meta-learner of Behavioral Similarities
1 INTRODUCTION . Designing effective reinforcement learning algorithms to learn control from high-dimensional visual observations is crucial and has attracted more attentions in the reinforcement learning ( RL ) community ( Yarats et al. , 2021 ; Laskin et al. , 2020a ; Schwarzer et al. , 2021 ; Lesort et al. , 2018 ) . To learn a policy efficiently from high-dimensional observations , prior approaches first learned an encoder to map high-dimensional observations , e.g. , images , to low-dimensional representations , and subsequently trained a policy from low-dimensional representations to actions based on various RL algorithms . Therefore , how to learn low-dimensional representations which are able to provide semantic abstraction for high-dimensional observations plays a key role . Early works on deep reinforcement learning train encoders based on various reconstruction losses ( Lange & Riedmiller , 2010 ; Watter et al. , 2015 ; Wahlström et al. , 2015 ; Higgins et al. , 2017 ) , which aim to enforce that the learned low-dimensional representations can be decoded to reconstruct the original high-dimensional observations . Promising results have been achieved in some application domains , such as playing video games , simulated tasks , etc . However , the policy learned on representations of states trained with reconstruction losses may not generalize well to complex environments , which are even though semantically similar to the source environments . The reason is that a reconstruction loss is computed over all the pixels , which results in all the details of the high-dimensional images being preserved in low-dimensional representations . However , some of the observed details , e.g. , complex background objects in an image , are task-irrelevant and highly environment-dependent . Encoding such details in representation learning makes the learned representation less effective for a downstream reinforcement learning task of interest and less generalizable to new environments . To address the aforementioned issue , some data augmentation techniques have been proposed to make the learned representations more robust ( Yarats et al. , 2021 ; Lee et al. , 2020b ; Laskin et al. , 2020b ) . However , these approaches rarely consider the properties of a Markov Decision Process ( MDP ) , such as conditional transition probabilities between states given an action , in the representation learning procedure . Recent research ( Zhang et al. , 2020 ; Agarwal et al. , 2021 ; Castro , 2020 ; Ferns et al. , 2004 ) has shown that the bisimulation metric and its variants are potentially effective to be exploited to learn a more generalizable reinforcement learning agent across semantically similar environments . The bisimulation metric measures the “ behavioral similarity ” between two states based on two terms : 1 ) reward difference that considers the difference in immediate task-specific reward signals between two states , and 2 ) dynamics difference that considers the similarity of the long-term behaviors between two states . A general idea of these approaches is to learn an encoder to map observations to a latent space such that the distance or similarity between two states in the latent space approximates their bisimulation metric . In this way , the learned representations ( in the latent space ) are task-relevant and invariant to task-irrelevant details . However , manually specifying a form of distance , e.g. , the L1 norm as used in ( Zhang et al. , 2020 ) , in the latent space may limit the approximation precision for the bisimulation metric and potentially lose parts of the state features that are useful for policy learning . Moreover , existing approaches rarely explore how to learn a linear combination of reward and dynamics differences in the bisimulation metric , which may vary in different tasks or environments . We propose a novel framework for learning generalizable state representation in RL , called Adaptive Meta-learner of Behavioral Similarities ( AMBS ) . In this framework we design a network with two encoders that map the high-dimensional observations to two decomposed representations regarding the two properties of MDP , rewards and dynamics . For the purpose of learning behavioral similarity in state representations , we introduce a pair of meta-learners that learn similarities in order to measure the reward and dynamics similarity between two states over the corresponding decomposed state representations , respectively . The meta-learners are self-learned by approximating the corresponding terms in the bisimulation metric , containing the reward difference and the dynamics difference . Then the meta-learners update the state representations according to their behavioral distance to the other state representations . Unlike previous approaches with a hand-crafted form of distance/similarity evaluating state encoding in L1 space , our learned similarities measure two state representations via a neural architecture , where more side information can be preserved for further policy learning . Our experiments also observe that a smaller loss can be obtained by using the learned similarity . This demonstrates that the proposed meta-learners can overcome the approximation precision issue and provide more stable gradients for robust learning of state representations . Moreover , we explore the impact between reward and dynamics terms in the bisimulation metric . We propose a learning-based adaptive strategy to balance the effect of reward and dynamics in different tasks or environments by introducing a learnable importance parameter , which is jointly learned with the state-action value function . Finally , we use a simple but effective data augmentation strategy to accelerate the RL procedure and help learning more robust state representations . The main contributions of our work are 3-fold : 1 ) we propose a meta-learner-based framework to learn task-relevant and environment-details-invariant state representations ; 2 ) we propose a network architecture that decomposes each state into two different types of representations for measuring the similarities in terms of reward and dynamics , respectively , and design a learnable adaptive strategy to balance them to estimate the bisimulation metric between states ; 3 ) we verify our proposed framework on extensive experiments and demonstrate new state-of-the-art results on backgrounddistraction DeepMind control suite ( Tassa et al. , 2018 ; Zhang et al. , 2018 ; Stone et al. , 2021 ) and other visual-based RL tasks . 2 RELATED WORK . Representation learning for reinforcement learning from pixels Various existing deep RL methods have been proposed to address the sample-efficiency and generalization problem of RL algorithms learning from pixel observation . In end-to-end deep RL , neural networks learn representations implicitly by optimizing some RL objective ( Mnih et al. , 2015 ; Espeholt et al. , 2018 ) . Watter et al . ( 2015 ) and Wahlström et al . ( 2015 ) proposed to learn a encoder with training the dynamics model jointly to produce observation representations . Lee et al . ( 2020a ) , Hafner et al . ( 2019 ) , Hafner et al . ( 2020 ) and Zhang et al . ( 2019 ) aimed to learn an environment dynamics model with reconstruction loss to compact pixels to latent representation . Gelada et al . ( 2019 ) proposed to learn representations by predicting the dynamics model along with the reward , and analyzed its theoretical connection to the bisimulation metric . Agarwal et al . ( 2021 ) learns representations by state distances based on policy distribution . Kemertas & Aumentado-Armstrong ( 2021 ) modified the learning of bisimulation metric with intrinsic rewards and inverse dynamics regularization . Castro et al . ( 2021 ) replaced the Wasserstein distance in bisimulation metric with a parametrized metric . Data Augmentation in reinforcement learning Laskin et al . ( 2020b ) and Ye et al . ( 2020b ) explored the various data augmentation techniques from computer vision , which are limited to the transformation on input images . Cobbe et al . ( 2019 ) applied data augmentation on domain transfer . Ye et al . ( 2020a ) studied data augmentation on game environments for zero-shot generalization . RandConv ( Lee et al. , 2020b ) proposes a randomized convolutional neural network to generate randomized observations in order to perform data augmentation . A recent work DrQ ( Yarats et al. , 2021 ) suggests to perform random crop on image observations and provides regularized formulation for updating Q-function . Raileanu et al . ( 2021 ) proposed to use data augmentation for regularizing on-policy actor-critic RL objectives . Pitis et al . ( 2020 ) proposed a counterfactual data augmentation technique by swapping observed trajectory pairs . 3 PRELIMINARIES . We define an environment as a Markov Decision Process ( MDP ) described by a tuple M = ( S , A , P , R , γ ) , where S is the high-dimensional state space ( e.g. , images ) , A is the action space , P ( s′|s , a ) is the transition dynamics model that captures the probability of transitioning to next state s′ ∈ S given current state s ∈ S and action a ∈ A , R is the reward function yielding a reward signal r = R ( s , a ) ∈ R , and γ ∈ [ 0 , 1 ) is the discounting factor . The goal of reinforcement learning is to learn a policy π ( a|s ) that maximizes the expected cumulative rewards : maxπ E [ ∑ t γ tr ( st , at ) |at ∼ π ( ·|st ) , s′t ∼ P ( s′|s , a ) ] . In the scope of this paper , we do not consider partial observability , and use use stacked consecutive frames as the fully observed states . Soft Actor-Critic ( SAC ) is a widely used off-policy model-free reinforcement learning algorithm ( Haarnoja et al. , 2018 ) . SAC aims to maximize the entropy objective ( Ziebart , 2010 ) which is the reinforcement learning objective augmented with an entropy term J ( π ) =∑ t E [ r ( st , at ) + αH ( π ( ·|st ) ) ] . In order to maximize the objective , SAC learns a state-value function Qθ ( s , a ) , a stochastic policy πψ ( a|s ) and the temperature α , where θ and ψ are the parameters of Qθ and πψ , respectively . The Q-function is trained by minimizing the squared soft Bellman residual JQ ( θ ) = E ( st , at ) ∼D [ 1 2 ( Qθ ( st , at ) − ( r ( st , at ) + γEst+1∼P ( ·|st , at ) [ Vθ̄ ( st+1 ) ] ) ) 2 ] , ( 1 ) where D is the dataset or replay buffer storing the transitions , and Vθ̄ is the value function parameterized by θ̄ . The parameters ψ of policy is learned by maximizing the following objective Jπ ( ψ ) = Est∼D [ Eat∼πψ [ α log ( πψ ( a|s ) ) −Qθ ( st , at ) ] ] . ( 2 ) Bisimulation Metric defines a pseudometric d : S × S → R,1 where d quantifies the behavioral similarity of two discrete states ( Ferns et al. , 2004 ) . An extension of bisimulation metric to both continuous and discrete state spaces has also been developed ( Ferns et al. , 2011 ) . An variant of the bisimulation metric proposed in Castro ( 2020 ) defines a metric with respect to a policy π , which is known as the on-policy bisimulation metric . It removes the requirement of matching actions in the dynamics model but focuses on the policy π , which is able to better capture behavioral similarity for a specific task . Because of this property , in this paper , we focus on the π-bisimulation metric ( Castro , 2020 ) : Fπ ( d ) ( si , sj ) = ( 1− c ) |Rπsi −R π sj |+ cW1 ( d ) ( P π si , P π sj ) . ( 3 ) where Rπs : = ∑ a π ( a|s ) R ( s , a ) , Pπs : = ∑ a π ( a|s ) P ( ·|s , a ) , mapping Fπ : met → met , met denotes the set of all pseudometrics on state space S and W1 ( d ) ( · , · ) denotes the 1-Wasserstein distance given the pseudometric d. Then Fπ has a least fixed point denoted by d∗ . Deep Bisimulation 1If the pseudometric d of two states is 0 , then the two states belong to an equivalence relation . for Control ( DBC ) ( Zhang et al. , 2020 ) proposed to learn latent representations such that the L1 distances in the latent space equal to the π-bisimulation metric in the state space : argmin ϕ ( ∥ϕ ( si ) − ϕ ( sj ) ∥1 − |Rπsi −R π sj | − γW2 ( d ) ( P π si , P π sj ) ) 2 , where ϕ is the state encoder , and W2 ( d ) ( · , · ) denotes the 2-Wasserstein distance . DBC is combined with the reinforcement learning algorithm SAC where ϕ ( s ) is the input for SAC .
This work considers the problem of learning representations of high-dimensional pixel observations for RL. High-dimensional pixel observations often include many task-irrelevant details and ideally, an effective representation of such observations should only encode the task-relevant details. To implement this intuition, this work proposes to learn a two-part representation based off of a bisimulation metric. Two states that have similar first parts of the representation should exhibit similar reward structure, and two states that have similar second parts of the representation should exhibit similar dynamics structure. This work evaluates this learned representation on several continuous control tasks with distracting backgrounds and on CARLA, and shows that the proposed learned representation improves over baselines.
SP:794bafd503d3cee3060a5c8ba489ca141d0d3e5e
Learning Generalizable Representations for Reinforcement Learning via Adaptive Meta-learner of Behavioral Similarities
1 INTRODUCTION . Designing effective reinforcement learning algorithms to learn control from high-dimensional visual observations is crucial and has attracted more attentions in the reinforcement learning ( RL ) community ( Yarats et al. , 2021 ; Laskin et al. , 2020a ; Schwarzer et al. , 2021 ; Lesort et al. , 2018 ) . To learn a policy efficiently from high-dimensional observations , prior approaches first learned an encoder to map high-dimensional observations , e.g. , images , to low-dimensional representations , and subsequently trained a policy from low-dimensional representations to actions based on various RL algorithms . Therefore , how to learn low-dimensional representations which are able to provide semantic abstraction for high-dimensional observations plays a key role . Early works on deep reinforcement learning train encoders based on various reconstruction losses ( Lange & Riedmiller , 2010 ; Watter et al. , 2015 ; Wahlström et al. , 2015 ; Higgins et al. , 2017 ) , which aim to enforce that the learned low-dimensional representations can be decoded to reconstruct the original high-dimensional observations . Promising results have been achieved in some application domains , such as playing video games , simulated tasks , etc . However , the policy learned on representations of states trained with reconstruction losses may not generalize well to complex environments , which are even though semantically similar to the source environments . The reason is that a reconstruction loss is computed over all the pixels , which results in all the details of the high-dimensional images being preserved in low-dimensional representations . However , some of the observed details , e.g. , complex background objects in an image , are task-irrelevant and highly environment-dependent . Encoding such details in representation learning makes the learned representation less effective for a downstream reinforcement learning task of interest and less generalizable to new environments . To address the aforementioned issue , some data augmentation techniques have been proposed to make the learned representations more robust ( Yarats et al. , 2021 ; Lee et al. , 2020b ; Laskin et al. , 2020b ) . However , these approaches rarely consider the properties of a Markov Decision Process ( MDP ) , such as conditional transition probabilities between states given an action , in the representation learning procedure . Recent research ( Zhang et al. , 2020 ; Agarwal et al. , 2021 ; Castro , 2020 ; Ferns et al. , 2004 ) has shown that the bisimulation metric and its variants are potentially effective to be exploited to learn a more generalizable reinforcement learning agent across semantically similar environments . The bisimulation metric measures the “ behavioral similarity ” between two states based on two terms : 1 ) reward difference that considers the difference in immediate task-specific reward signals between two states , and 2 ) dynamics difference that considers the similarity of the long-term behaviors between two states . A general idea of these approaches is to learn an encoder to map observations to a latent space such that the distance or similarity between two states in the latent space approximates their bisimulation metric . In this way , the learned representations ( in the latent space ) are task-relevant and invariant to task-irrelevant details . However , manually specifying a form of distance , e.g. , the L1 norm as used in ( Zhang et al. , 2020 ) , in the latent space may limit the approximation precision for the bisimulation metric and potentially lose parts of the state features that are useful for policy learning . Moreover , existing approaches rarely explore how to learn a linear combination of reward and dynamics differences in the bisimulation metric , which may vary in different tasks or environments . We propose a novel framework for learning generalizable state representation in RL , called Adaptive Meta-learner of Behavioral Similarities ( AMBS ) . In this framework we design a network with two encoders that map the high-dimensional observations to two decomposed representations regarding the two properties of MDP , rewards and dynamics . For the purpose of learning behavioral similarity in state representations , we introduce a pair of meta-learners that learn similarities in order to measure the reward and dynamics similarity between two states over the corresponding decomposed state representations , respectively . The meta-learners are self-learned by approximating the corresponding terms in the bisimulation metric , containing the reward difference and the dynamics difference . Then the meta-learners update the state representations according to their behavioral distance to the other state representations . Unlike previous approaches with a hand-crafted form of distance/similarity evaluating state encoding in L1 space , our learned similarities measure two state representations via a neural architecture , where more side information can be preserved for further policy learning . Our experiments also observe that a smaller loss can be obtained by using the learned similarity . This demonstrates that the proposed meta-learners can overcome the approximation precision issue and provide more stable gradients for robust learning of state representations . Moreover , we explore the impact between reward and dynamics terms in the bisimulation metric . We propose a learning-based adaptive strategy to balance the effect of reward and dynamics in different tasks or environments by introducing a learnable importance parameter , which is jointly learned with the state-action value function . Finally , we use a simple but effective data augmentation strategy to accelerate the RL procedure and help learning more robust state representations . The main contributions of our work are 3-fold : 1 ) we propose a meta-learner-based framework to learn task-relevant and environment-details-invariant state representations ; 2 ) we propose a network architecture that decomposes each state into two different types of representations for measuring the similarities in terms of reward and dynamics , respectively , and design a learnable adaptive strategy to balance them to estimate the bisimulation metric between states ; 3 ) we verify our proposed framework on extensive experiments and demonstrate new state-of-the-art results on backgrounddistraction DeepMind control suite ( Tassa et al. , 2018 ; Zhang et al. , 2018 ; Stone et al. , 2021 ) and other visual-based RL tasks . 2 RELATED WORK . Representation learning for reinforcement learning from pixels Various existing deep RL methods have been proposed to address the sample-efficiency and generalization problem of RL algorithms learning from pixel observation . In end-to-end deep RL , neural networks learn representations implicitly by optimizing some RL objective ( Mnih et al. , 2015 ; Espeholt et al. , 2018 ) . Watter et al . ( 2015 ) and Wahlström et al . ( 2015 ) proposed to learn a encoder with training the dynamics model jointly to produce observation representations . Lee et al . ( 2020a ) , Hafner et al . ( 2019 ) , Hafner et al . ( 2020 ) and Zhang et al . ( 2019 ) aimed to learn an environment dynamics model with reconstruction loss to compact pixels to latent representation . Gelada et al . ( 2019 ) proposed to learn representations by predicting the dynamics model along with the reward , and analyzed its theoretical connection to the bisimulation metric . Agarwal et al . ( 2021 ) learns representations by state distances based on policy distribution . Kemertas & Aumentado-Armstrong ( 2021 ) modified the learning of bisimulation metric with intrinsic rewards and inverse dynamics regularization . Castro et al . ( 2021 ) replaced the Wasserstein distance in bisimulation metric with a parametrized metric . Data Augmentation in reinforcement learning Laskin et al . ( 2020b ) and Ye et al . ( 2020b ) explored the various data augmentation techniques from computer vision , which are limited to the transformation on input images . Cobbe et al . ( 2019 ) applied data augmentation on domain transfer . Ye et al . ( 2020a ) studied data augmentation on game environments for zero-shot generalization . RandConv ( Lee et al. , 2020b ) proposes a randomized convolutional neural network to generate randomized observations in order to perform data augmentation . A recent work DrQ ( Yarats et al. , 2021 ) suggests to perform random crop on image observations and provides regularized formulation for updating Q-function . Raileanu et al . ( 2021 ) proposed to use data augmentation for regularizing on-policy actor-critic RL objectives . Pitis et al . ( 2020 ) proposed a counterfactual data augmentation technique by swapping observed trajectory pairs . 3 PRELIMINARIES . We define an environment as a Markov Decision Process ( MDP ) described by a tuple M = ( S , A , P , R , γ ) , where S is the high-dimensional state space ( e.g. , images ) , A is the action space , P ( s′|s , a ) is the transition dynamics model that captures the probability of transitioning to next state s′ ∈ S given current state s ∈ S and action a ∈ A , R is the reward function yielding a reward signal r = R ( s , a ) ∈ R , and γ ∈ [ 0 , 1 ) is the discounting factor . The goal of reinforcement learning is to learn a policy π ( a|s ) that maximizes the expected cumulative rewards : maxπ E [ ∑ t γ tr ( st , at ) |at ∼ π ( ·|st ) , s′t ∼ P ( s′|s , a ) ] . In the scope of this paper , we do not consider partial observability , and use use stacked consecutive frames as the fully observed states . Soft Actor-Critic ( SAC ) is a widely used off-policy model-free reinforcement learning algorithm ( Haarnoja et al. , 2018 ) . SAC aims to maximize the entropy objective ( Ziebart , 2010 ) which is the reinforcement learning objective augmented with an entropy term J ( π ) =∑ t E [ r ( st , at ) + αH ( π ( ·|st ) ) ] . In order to maximize the objective , SAC learns a state-value function Qθ ( s , a ) , a stochastic policy πψ ( a|s ) and the temperature α , where θ and ψ are the parameters of Qθ and πψ , respectively . The Q-function is trained by minimizing the squared soft Bellman residual JQ ( θ ) = E ( st , at ) ∼D [ 1 2 ( Qθ ( st , at ) − ( r ( st , at ) + γEst+1∼P ( ·|st , at ) [ Vθ̄ ( st+1 ) ] ) ) 2 ] , ( 1 ) where D is the dataset or replay buffer storing the transitions , and Vθ̄ is the value function parameterized by θ̄ . The parameters ψ of policy is learned by maximizing the following objective Jπ ( ψ ) = Est∼D [ Eat∼πψ [ α log ( πψ ( a|s ) ) −Qθ ( st , at ) ] ] . ( 2 ) Bisimulation Metric defines a pseudometric d : S × S → R,1 where d quantifies the behavioral similarity of two discrete states ( Ferns et al. , 2004 ) . An extension of bisimulation metric to both continuous and discrete state spaces has also been developed ( Ferns et al. , 2011 ) . An variant of the bisimulation metric proposed in Castro ( 2020 ) defines a metric with respect to a policy π , which is known as the on-policy bisimulation metric . It removes the requirement of matching actions in the dynamics model but focuses on the policy π , which is able to better capture behavioral similarity for a specific task . Because of this property , in this paper , we focus on the π-bisimulation metric ( Castro , 2020 ) : Fπ ( d ) ( si , sj ) = ( 1− c ) |Rπsi −R π sj |+ cW1 ( d ) ( P π si , P π sj ) . ( 3 ) where Rπs : = ∑ a π ( a|s ) R ( s , a ) , Pπs : = ∑ a π ( a|s ) P ( ·|s , a ) , mapping Fπ : met → met , met denotes the set of all pseudometrics on state space S and W1 ( d ) ( · , · ) denotes the 1-Wasserstein distance given the pseudometric d. Then Fπ has a least fixed point denoted by d∗ . Deep Bisimulation 1If the pseudometric d of two states is 0 , then the two states belong to an equivalence relation . for Control ( DBC ) ( Zhang et al. , 2020 ) proposed to learn latent representations such that the L1 distances in the latent space equal to the π-bisimulation metric in the state space : argmin ϕ ( ∥ϕ ( si ) − ϕ ( sj ) ∥1 − |Rπsi −R π sj | − γW2 ( d ) ( P π si , P π sj ) ) 2 , where ϕ is the state encoder , and W2 ( d ) ( · , · ) denotes the 2-Wasserstein distance . DBC is combined with the reinforcement learning algorithm SAC where ϕ ( s ) is the input for SAC .
The paper studies the problem of learning invariant visual representations for reinforcement learning. Specifically, it builds on prior work Deep Bisimulation for Control (DBC) (Zhang et al), which learns an image representation predictive of rewards and dynamics and uses it with SAC. This paper makes a few modifications on top of DBC, specifically (1) instead of a single state embedding, it learns two separate ones (one for rewards and one for dynamics), (2) instead of using L1 distance in the embedding space to measure distance it instead uses a learned MLP which predicts distance, (3) using gradients from SAC it learns to dynamically adjust the balance between the dynamics weight and reward weight, and (4) adds image augmentation to the training. Experiments indicate on Distracting Control that on 2/4 tasks it matches DrQ and DBC and on the other 2 tasks outperforms them. Ablations suggest that all components are important, particularly (1) and (2).
SP:794bafd503d3cee3060a5c8ba489ca141d0d3e5e
Beyond Prioritized Replay: Sampling States in Model-Based Reinforcement Learning via Simulated Priorities
Prioritized Experience Replay ( ER ) has been empirically shown to improve sample efficiency across many domains and attracted great attention ; however , there is little theoretical understanding of why such prioritized sampling helps and its limitations . In this work , we take a deep look at the prioritized ER . In a supervised learning setting , we show the equivalence between the error-based prioritized sampling method for mean squared error and uniform sampling for cubic power loss . We then provide theoretical insight into why it improves convergence rate upon uniform sampling during early learning . Based on the insight , we further point out two limitations of the prioritized ER method : 1 ) outdated priorities and 2 ) insufficient coverage of the sample space . To mitigate the limitations , we propose our modelbased stochastic gradient Langevin dynamics sampling method . We show that our method does provide states distributed close to an ideal prioritized sampling distribution estimated by the brute-force method , which does not suffer from the two limitations . We conduct experiments on both discrete and continuous control problems to show our approach ’ s efficacy and examine the practical implication of our method in an autonomous driving application . 1 INTRODUCTION . Experience Replay ( ER ) ( Lin , 1992 ) has been a popular method for training large-scale modern Reinforcement Learning ( RL ) systems ( Degris et al. , 2012 ; Adam & Busoniu , 2012 ; Mnih et al. , 2015a ; Hessel et al. , 2018 ; François-Lavet et al. , 2018 ) . In ER , visited experiences are stored in a buffer , and at each time step , a mini-batch of experiences is uniformly sampled to update the training parameters in the value or policy function . Such a method is empirically shown to effectively stabilize the training and improve the sample efficiency of deep RL algorithms . Several follow-up works propose different variants to improve upon it ( Schaul et al. , 2016 ; Andrychowicz et al. , 2017 ; Oh et al. , 2018 ; de Bruin et al. , 2018 ; Horgan et al. , 2018 ; Zha et al. , 2019 ; Novati & Koumoutsakos , 2019 ; Sun et al. , 2020 ) . The most relevant one to our work is prioritized ER ( Schaul et al. , 2016 ) , which attempts to improve the vanilla ER method by sampling those visited experiences proportional to their absolute Temporal Difference ( TD ) errors . Empirically , it can significantly improve sample efficiency upon vanilla ER on many tested domains . To gain an intuitive understanding of why the prioritized ER method works , one may recall ModelBased RL ( MBRL ) methods ( Kaelbling et al. , 1996 ; Bertsekas , 2009 ; Sutton & Barto , 2018 ) . ER can be thought of as an instance of a classical model-based RL architecture—Dyna ( Sutton , 1991 ) , using a ( limited ) non-parametric model given by the buffer ( van Seijen & Sutton , 2015 ; van Hasselt et al. , 2019 ) . A Dyna agent uses real experience to update its policy as well as its reward and dynamics model . In-between taking actions , the agent can get hypothetical experiences from the model to further improve the policy . Existing works show that smart ways of sampling those experiences can further improve sample efficiency of a MBRL agent ( Sutton et al. , 2008 ; Gu et al. , 2016 ; Goyal et al. , 2019 ; Holland et al. , 2018 ; Pan et al. , 2018 ; Corneil et al. , 2018 ; Janner et al. , 2019 ; Chelu et al. , 2020 ) . Particularly , prioritized sweeping ( Moore & Atkeson , 1993 ) improves upon vanilla Dyna . The idea behind prioritized sweeping is quite intuitive : we should give high priority to states whose absolute TD errors are large because they are likely to cause the most change in value estimates . Hence , applying TD error-based prioritized sampling to ER is a natural idea in a model-free RL setting . This work provides a theoretical insight into the prioritized ER ’ s advantage and points out its two drawbacks : outdated priorities and insufficient sample space coverage , which may significantly weaken its efficacy . To mitigate the two issues , we propose to leverage the flexibility of using an environment model to acquire hypothetical experiences by simulating priorities . Specifically , we bring in the Stochastic Gradient Langevin Dynamics ( SGLD ) sampling method to acquire states . We demonstrate that the hypothetical experiences generated by our method are distributed closer to the desired TD error-based sampling distribution , which does not suffer from the two drawbacks . Finally , we demonstrate the utility of our method on various benchmark discrete and continuous control domains and an autonomous driving application . 2 BACKGROUND . In this section , we firstly review basic concepts in RL . Then we briefly introduce the prioritized ER method , which will be examined in-depth in the next section . We conclude this section by discussing a classic MBRL architecture called Dyna ( Sutton , 1991 ) and its recent variants , which are most relevant to our work . Basic notations . We consider a discounted Markov Decision Process ( MDP ) framework ( Szepesvári , 2010 ) . A MDP can be denoted as a tuple ( S , A , P , R , γ ) including state space S , action space A , probability transition kernel P , reward function R , and discount rate γ ∈ [ 0 , 1 ] . At each environment time step t , an RL agent observes a state st ∈ S , takes an action at ∈ A , and moves to the next state st+1 ∼ P ( ·|st , at ) , and receives a scalar reward signal rt+1 = R ( st , at , st+1 ) . A policy is a mapping π : S ×A → [ 0 , 1 ] that determines the probability of choosing an action at a given state . A popular algorithm to find an optimal policy is Q-learning ( Watkins & Dayan , 1992 ) . With function approximation , parameterized action-values Qθ are updated using θ = θ + αδt∇θQθ ( st , at ) for stepsize α > 0 with TD-error δt def = rt+1 + γmaxa′∈AQθ ( st+1 , a ′ ) − Qθ ( st , at ) . The policy is defined by acting greedily w.r.t . these action-values . ER methods . ER is critical when using neural networks to estimate Qθ , as used in DQN ( Mnih et al. , 2015b ) , both to stabilize and speed up learning . ER method uniformly samples a mini-batch of experiences from those visited ones in the form of ( st , at , st+1 , rt+1 ) to update neural network parameters . Prioritized ER ( Schaul et al. , 2016 ) improves upon it by prioritized sampling experiences , where the probability of sampling a certain experience is proportional to its TD error magnitude , i.e. , p ( st , at , st+1 , rt+1 ) ∝ |δt| . However , the underlying theoretical mechanism behind this method is still not well understood . MBRL . With a model , an agent has more flexibility to sample hypothetical experiences . We consider a one-step model which maps a state-action pair to its possible next state and reward : P : S × A 7→ S × R. We build on the Dyna formalism ( Sutton , 1991 ) for MBRL , and more specifically , the recently proposed HC-Dyna ( Pan et al. , 2019 ) as shown in Algorithm 1 . HCDyna provides a special approach to Search-Control ( SC ) —the mechanism of generating states or state-action pairs from which to query the model to get the next states and rewards . HC-Dyna ’ s search-control mechanism generates states by Hill Climbing ( HC ) on some criterion function h ( · ) . The term HC is used for generality as the vanilla gradient ascent is modified to resolve certain challenges ( Pan et al. , 2019 ) . The algorithmic framework maintains two buffers : the conventional ER buffer storing experiences ( i.e. , an experience/transition has the form of ( st , at , st+1 , rt+1 ) ) and a search-control queue storing the states acquired by search-control mechanisms . At each time step t , a real experience ( st , at , st+1 , rt+1 ) is collected and stored into ER buffer . Then the HC search-control process starts to collect states and store them into the search-control queue . A hypothetical experience is obtained by first selecting a state s from the search-control queue , then selecting an action a according to the current policy , and then querying the model to get the next state s′ and reward r to form an experience ( s , a , s′ , r ) . These hypothetical transitions are combined with real experiences into a single mini-batch to update the training parameters . The n updates , performed before taking the next action , are called planning updates ( Sutton & Barto , 2018 ) , as they improve the value/policy by using Algorithm 1 HC-Dyna : Generic framework Input : Hill Climbing ( HC ) criterion function h : S 7→ R , batch-size b ; Initialize empty searchcontrol queue Bsc ; empty ER buffer Ber ; initialize policy and model P ; HC stepsize αh ; minibatch size b ; environment P ; mixing rate ρ decides the proportion of hypothetical experiences in a mini-batch . for t = 1 , 2 , . . . do Add ( st , at , st+1 , rt+1 ) to Ber while within some budget time steps do s← s+ αh∇sh ( s ) // HC for search-control Add s into Bsc // n planning updates/steps for n times do B ← ∅ // initialize an empty mini-batch B for bρ times do Sample s ∼ Bsc , on-policy action a Sample s′ , r ∼ P ( s , a ) B ← ( s , a , s′ , r ) Sample b ( 1− ρ ) experiences from Ber , add to B Update policy/value on mixed mini-batch B a model . The choice of pairing states with on-policy actions to form hypothetical experiences has been reported to be beneficial ( Gu et al. , 2016 ; Pan et al. , 2018 ; Janner et al. , 2019 ) . Two instances have been proposed for h ( · ) : the value function v ( s ) ( Pan et al. , 2019 ) and the gradient magnitude ||∇sv ( s ) || ( Pan et al. , 2020 ) . The former is used as a measure of the utility of a state : doing HC on the learned value function should find high-value states without being constrained by the physical environment dynamics . The latter is considered as a measure of the value approximation difficulty , then doing HC provides additional states whose values are difficult to learn . The two suffer from several issues as we discuss in the Appendix A.1 . This paper will introduce a HC search-control method motivated by overcoming the limitations of the prioritized ER . 3 A DEEPER LOOK AT ERROR-BASED PRIORITIZED SAMPLING . In this section , we provide theoretical motivation for error-based prioritized sampling by showing its equivalence to optimizing a cubic power objective with uniform sampling in a supervised learning setting . We prove that optimizing the cubic objective provides a faster convergence rate during early learning . Based on the insight , we discuss two limitations of the prioritized ER : 1 ) outdated priorities and 2 ) insufficient coverage of the sample space . We then empirically study the such limitations .
This paper takes a deep look at prioritized experience replay, a popular technique in deep reinforcement learning. The paper gives insights on why error-based prioritized experience replay can help when the importance ratio is unused. This paper also pointed out two limitations of prioritized experience replay, which are outdated priorities and insufficient coverage of state space, and the author proposed to use SGLD to solve the limitations. Experiments show that the proposed method leads to a good coverage of state space and improve the return of the training algorithm.
SP:76dd5e85169aea4045abea494d5e10909c5fee1f
Beyond Prioritized Replay: Sampling States in Model-Based Reinforcement Learning via Simulated Priorities
Prioritized Experience Replay ( ER ) has been empirically shown to improve sample efficiency across many domains and attracted great attention ; however , there is little theoretical understanding of why such prioritized sampling helps and its limitations . In this work , we take a deep look at the prioritized ER . In a supervised learning setting , we show the equivalence between the error-based prioritized sampling method for mean squared error and uniform sampling for cubic power loss . We then provide theoretical insight into why it improves convergence rate upon uniform sampling during early learning . Based on the insight , we further point out two limitations of the prioritized ER method : 1 ) outdated priorities and 2 ) insufficient coverage of the sample space . To mitigate the limitations , we propose our modelbased stochastic gradient Langevin dynamics sampling method . We show that our method does provide states distributed close to an ideal prioritized sampling distribution estimated by the brute-force method , which does not suffer from the two limitations . We conduct experiments on both discrete and continuous control problems to show our approach ’ s efficacy and examine the practical implication of our method in an autonomous driving application . 1 INTRODUCTION . Experience Replay ( ER ) ( Lin , 1992 ) has been a popular method for training large-scale modern Reinforcement Learning ( RL ) systems ( Degris et al. , 2012 ; Adam & Busoniu , 2012 ; Mnih et al. , 2015a ; Hessel et al. , 2018 ; François-Lavet et al. , 2018 ) . In ER , visited experiences are stored in a buffer , and at each time step , a mini-batch of experiences is uniformly sampled to update the training parameters in the value or policy function . Such a method is empirically shown to effectively stabilize the training and improve the sample efficiency of deep RL algorithms . Several follow-up works propose different variants to improve upon it ( Schaul et al. , 2016 ; Andrychowicz et al. , 2017 ; Oh et al. , 2018 ; de Bruin et al. , 2018 ; Horgan et al. , 2018 ; Zha et al. , 2019 ; Novati & Koumoutsakos , 2019 ; Sun et al. , 2020 ) . The most relevant one to our work is prioritized ER ( Schaul et al. , 2016 ) , which attempts to improve the vanilla ER method by sampling those visited experiences proportional to their absolute Temporal Difference ( TD ) errors . Empirically , it can significantly improve sample efficiency upon vanilla ER on many tested domains . To gain an intuitive understanding of why the prioritized ER method works , one may recall ModelBased RL ( MBRL ) methods ( Kaelbling et al. , 1996 ; Bertsekas , 2009 ; Sutton & Barto , 2018 ) . ER can be thought of as an instance of a classical model-based RL architecture—Dyna ( Sutton , 1991 ) , using a ( limited ) non-parametric model given by the buffer ( van Seijen & Sutton , 2015 ; van Hasselt et al. , 2019 ) . A Dyna agent uses real experience to update its policy as well as its reward and dynamics model . In-between taking actions , the agent can get hypothetical experiences from the model to further improve the policy . Existing works show that smart ways of sampling those experiences can further improve sample efficiency of a MBRL agent ( Sutton et al. , 2008 ; Gu et al. , 2016 ; Goyal et al. , 2019 ; Holland et al. , 2018 ; Pan et al. , 2018 ; Corneil et al. , 2018 ; Janner et al. , 2019 ; Chelu et al. , 2020 ) . Particularly , prioritized sweeping ( Moore & Atkeson , 1993 ) improves upon vanilla Dyna . The idea behind prioritized sweeping is quite intuitive : we should give high priority to states whose absolute TD errors are large because they are likely to cause the most change in value estimates . Hence , applying TD error-based prioritized sampling to ER is a natural idea in a model-free RL setting . This work provides a theoretical insight into the prioritized ER ’ s advantage and points out its two drawbacks : outdated priorities and insufficient sample space coverage , which may significantly weaken its efficacy . To mitigate the two issues , we propose to leverage the flexibility of using an environment model to acquire hypothetical experiences by simulating priorities . Specifically , we bring in the Stochastic Gradient Langevin Dynamics ( SGLD ) sampling method to acquire states . We demonstrate that the hypothetical experiences generated by our method are distributed closer to the desired TD error-based sampling distribution , which does not suffer from the two drawbacks . Finally , we demonstrate the utility of our method on various benchmark discrete and continuous control domains and an autonomous driving application . 2 BACKGROUND . In this section , we firstly review basic concepts in RL . Then we briefly introduce the prioritized ER method , which will be examined in-depth in the next section . We conclude this section by discussing a classic MBRL architecture called Dyna ( Sutton , 1991 ) and its recent variants , which are most relevant to our work . Basic notations . We consider a discounted Markov Decision Process ( MDP ) framework ( Szepesvári , 2010 ) . A MDP can be denoted as a tuple ( S , A , P , R , γ ) including state space S , action space A , probability transition kernel P , reward function R , and discount rate γ ∈ [ 0 , 1 ] . At each environment time step t , an RL agent observes a state st ∈ S , takes an action at ∈ A , and moves to the next state st+1 ∼ P ( ·|st , at ) , and receives a scalar reward signal rt+1 = R ( st , at , st+1 ) . A policy is a mapping π : S ×A → [ 0 , 1 ] that determines the probability of choosing an action at a given state . A popular algorithm to find an optimal policy is Q-learning ( Watkins & Dayan , 1992 ) . With function approximation , parameterized action-values Qθ are updated using θ = θ + αδt∇θQθ ( st , at ) for stepsize α > 0 with TD-error δt def = rt+1 + γmaxa′∈AQθ ( st+1 , a ′ ) − Qθ ( st , at ) . The policy is defined by acting greedily w.r.t . these action-values . ER methods . ER is critical when using neural networks to estimate Qθ , as used in DQN ( Mnih et al. , 2015b ) , both to stabilize and speed up learning . ER method uniformly samples a mini-batch of experiences from those visited ones in the form of ( st , at , st+1 , rt+1 ) to update neural network parameters . Prioritized ER ( Schaul et al. , 2016 ) improves upon it by prioritized sampling experiences , where the probability of sampling a certain experience is proportional to its TD error magnitude , i.e. , p ( st , at , st+1 , rt+1 ) ∝ |δt| . However , the underlying theoretical mechanism behind this method is still not well understood . MBRL . With a model , an agent has more flexibility to sample hypothetical experiences . We consider a one-step model which maps a state-action pair to its possible next state and reward : P : S × A 7→ S × R. We build on the Dyna formalism ( Sutton , 1991 ) for MBRL , and more specifically , the recently proposed HC-Dyna ( Pan et al. , 2019 ) as shown in Algorithm 1 . HCDyna provides a special approach to Search-Control ( SC ) —the mechanism of generating states or state-action pairs from which to query the model to get the next states and rewards . HC-Dyna ’ s search-control mechanism generates states by Hill Climbing ( HC ) on some criterion function h ( · ) . The term HC is used for generality as the vanilla gradient ascent is modified to resolve certain challenges ( Pan et al. , 2019 ) . The algorithmic framework maintains two buffers : the conventional ER buffer storing experiences ( i.e. , an experience/transition has the form of ( st , at , st+1 , rt+1 ) ) and a search-control queue storing the states acquired by search-control mechanisms . At each time step t , a real experience ( st , at , st+1 , rt+1 ) is collected and stored into ER buffer . Then the HC search-control process starts to collect states and store them into the search-control queue . A hypothetical experience is obtained by first selecting a state s from the search-control queue , then selecting an action a according to the current policy , and then querying the model to get the next state s′ and reward r to form an experience ( s , a , s′ , r ) . These hypothetical transitions are combined with real experiences into a single mini-batch to update the training parameters . The n updates , performed before taking the next action , are called planning updates ( Sutton & Barto , 2018 ) , as they improve the value/policy by using Algorithm 1 HC-Dyna : Generic framework Input : Hill Climbing ( HC ) criterion function h : S 7→ R , batch-size b ; Initialize empty searchcontrol queue Bsc ; empty ER buffer Ber ; initialize policy and model P ; HC stepsize αh ; minibatch size b ; environment P ; mixing rate ρ decides the proportion of hypothetical experiences in a mini-batch . for t = 1 , 2 , . . . do Add ( st , at , st+1 , rt+1 ) to Ber while within some budget time steps do s← s+ αh∇sh ( s ) // HC for search-control Add s into Bsc // n planning updates/steps for n times do B ← ∅ // initialize an empty mini-batch B for bρ times do Sample s ∼ Bsc , on-policy action a Sample s′ , r ∼ P ( s , a ) B ← ( s , a , s′ , r ) Sample b ( 1− ρ ) experiences from Ber , add to B Update policy/value on mixed mini-batch B a model . The choice of pairing states with on-policy actions to form hypothetical experiences has been reported to be beneficial ( Gu et al. , 2016 ; Pan et al. , 2018 ; Janner et al. , 2019 ) . Two instances have been proposed for h ( · ) : the value function v ( s ) ( Pan et al. , 2019 ) and the gradient magnitude ||∇sv ( s ) || ( Pan et al. , 2020 ) . The former is used as a measure of the utility of a state : doing HC on the learned value function should find high-value states without being constrained by the physical environment dynamics . The latter is considered as a measure of the value approximation difficulty , then doing HC provides additional states whose values are difficult to learn . The two suffer from several issues as we discuss in the Appendix A.1 . This paper will introduce a HC search-control method motivated by overcoming the limitations of the prioritized ER . 3 A DEEPER LOOK AT ERROR-BASED PRIORITIZED SAMPLING . In this section , we provide theoretical motivation for error-based prioritized sampling by showing its equivalence to optimizing a cubic power objective with uniform sampling in a supervised learning setting . We prove that optimizing the cubic objective provides a faster convergence rate during early learning . Based on the insight , we discuss two limitations of the prioritized ER : 1 ) outdated priorities and 2 ) insufficient coverage of the sample space . We then empirically study the such limitations .
This paper proposes an alternative method for performing Prioritized Experience Replay (PER), which avoids issues of inadequate state coverage and staleness in priority scores. Their method is based on a result from stochastic langevin dynamics, which shows their specific stochastic gradient Langevin dynamics (SGLD) update to online states leads to the ground-truth PER distribution in the limit. Updating collected states this way and adding them to an additional "stochastic-control queue" from which sampled minibatch transitions are mixed with those sampled from a standard experience replay buffer. Empirically, this paper shows this SGLD-based method leads to a closer approximation to the ideal prioritized experience replay distribution over recent transitions than standard PER.
SP:76dd5e85169aea4045abea494d5e10909c5fee1f
How memory architecture affects learning in a simple POMDP: the two-hypothesis testing problem
Reinforcement learning is generally difficult for partially observable Markov decision processes ( POMDPs ) , which occurs when the agent ’ s observation is partial or noisy . To seek good performance in POMDPs , one strategy is to endow the agent with a finite memory , whose update is governed by the policy . However , policy optimization is non-convex in that case and can lead to poor training performance for random initialization . The performance can be empirically improved by constraining the memory architecture , then sacrificing optimality to facilitate training . Here we study this trade-off in a two-hypothesis testing problem , akin to the two-arm bandit problem . We compare two extreme cases : ( i ) the random access memory where any transitions between M memory states are allowed and ( ii ) a fixed memory where the agent can access its last m actions and rewards . For ( i ) , the probability q to play the worst arm is known to be exponentially small in M for the optimal policy . Our main result is to show that similar performance can be reached for ( ii ) as well , despite the simplicity of the memory architecture : using a conjecture on Gray-ordered binary necklaces , we find policies for which q is exponentially small in 2m , i.e . q ∼ α2m with α < 1 . In addition , we observe empirically that training from random initialization leads to very poor results for ( i ) , and significantly better results for ( ii ) thanks to the constraints on the memory architecture . 1 INTRODUCTION . Reinforcement learning is aimed at finding the sequence of actions that should take an agent to maximise a long-term reward ( Sutton & Barto ( 2018 ) ) . This sequential decision-making is usually modeled as a Markov decision process ( MDP ) : at each time step , the agent chooses an action based on a policy ( a function that relates the agent ’ s state to its action ) , with the aim of maximizing its value ( the expected discounted sum of rewards ) . Deterministic optimal policies can be found through dynamic programming ( Bellman ( 1966 ) ) when MDPs are discrete ( both states and actions belong to discrete sets ) and the agent fully knows its environment ( Watkins & Dayan ( 1992 ) ) . A practical difficulty arises when the agent only have a partial observation of its environment or when this observation is imperfect or stochastic . The mathematical framework is then known as a partially observable Markov decision process ( POMDP ) ( Smallwood & Sondik ( 1973 ) ) . In this framework , the agent ’ s state is replaced by the agent ’ s belief , which is the probability distribution over all possible states . At each time step , the agent ’ s belief can be updated through Bayesian inference to account for observations . In the belief space , the problem becomes fully observable again and the POMDP can thus be solved as a “ belief MDP ” . However , the dimension of the belief space is much larger than the state space and solving the belief MDP can be challenging in practical problems . Some approaches seek to resolve this difficulty by approximating of the belief and the value functions ( Hauskrecht ( 2000 ) ; Roy et al . ( 2005 ) ; Silver & Veness ( 2010 ) ; Somani et al . ( 2013 ) ) , or use deep model-free reinforcement learning where the neural network is complemented with a memory ( Oh et al . ( 2016 ) ; Khan et al . ( 2017 ) ) or a recurrency ( Hausknecht & Stone ( 2015 ) ; Li et al . ( 2015 ) ) to better approximate history-based policies . Here we focus on the idea of Littman ( 1993 ) , who proposed to give the agent a limited number of bits of memory , an idea that has been developed independently in the robotics community where it is known as a finite-state controller ( Meuleau et al . ( 1999 ; 2013 ) ) . These works show that adding a memory usually increases the performance in POMDPs . But to this day , attempts to find optimal memory allocation have been essentially empirical ( Peshkin et al . ( 2001 ) ; Zhang et al . ( 2016 ) ; Toro Icarte et al . ( 2020 ) ) . One central difficulty is that the value is a non-convex function of policy for POMDPs ( Jaakkola et al . ( 1995 ) ) : learning will thus generally get stuck in poor local maxima for random policy initialization . This problem is even more acute when memory is large or when all transitions between memory states are allowed . To improve learning , restricting the policy space to specific memory architectures where most transitions are forbidden is key ( Peshkin et al . ( 2001 ) ; Zhang et al . ( 2016 ) ; Toro Icarte et al . ( 2020 ) ) . However , there is no general principles to optimize the memory architectures or the policy initialization . In fact , this question is not understood satisfyingly even in the simplest tasks- arguably a necessary step to later achieve a broad understanding . Here , we work out how the memory architecture affects optimal solutions in perhaps the simplest POMDP , and find that these solutions are intriguingly complex . Specifically , we consider the twohypothesis testing problem . At each time step , the agent chooses to pull one of two arms that yield random rewards with different means . We compare two memory structures : ( i ) a random access memory ( RAM ) in which all possible transitions between M distinct memory states are allowed ; ( ii ) a Memento memory in which the agent can access its last m actions and rewards . When the agent is provided with a RAM memory , we study the performance of a “ column of confidence ” policy ( CCP ) : the agent keeps repeating the same action and updates its confidence in it by moving up and down the memory sites until it reaches the bottom of the column and the alternative action is tried . The performance of this policy is assessed through the calculation of the expected frequency q to play the worst arm ( thus the smaller q , the better ) . For the CCP , q can be shown to be exponentially small in M . This result is closely related to the work of Hellman & Cover ( 1970 ) on hypothesis testing and its extension to finite horizon ( Wilson ( 2014 ) ) . In practice , we find that learning a policy with a RAM memory and random initialization leads to poor results , far from the performance of the column of confidence policy . Restricting memory transitions to chain-like transitions leads to much better results , although still sub-optimal . Our main findings concerns the Memento memory architecture . Surprisingly , despite the lack of flexibility of the memory structure , excellent policies exist . Specifically , using a conjecture on Grayordered binary necklaces ( Degni & Drisko ( 2007 ) ) , we find a policy for which q is exponentially small in 2m —which is considerably better than q ∼ ln ( m ) /m , optimal for an agent that only plays m times . For Memento memory , we also observe empirically that learning is faster and perform better than in the RAM case . The code to reproduce the experiments is available at https : //anonymous.4open . science/r/two-hypothesis-BAB3 , and uses a function defined here https : // anonymous.4open.science/r/gradientflow/gradientflow . The experiments where executed on CPUs for about 10 thousand CPU hours . 2 POMDPS AND THE TWO-HYPOTHESIS TESTING PROBLEM . 2.1 GENERAL FORMULATION . Definition 2.1 ( POMDP ) . A discrete-time POMDP model is defined as the 8-tuple ( S , A , T , R , Ω , O , p0 , γ ) : S is a set of states , A is a set of actions , T is a conditional transition probability function T ( s′|s , a ) where s′ , s ∈ S and a ∈ A , R : S → R is the reward function1 , Ω is a set of observations , O ( o|s ) is a conditional observation probability with o ∈ Ω and s ∈ S , p0 ( s ) : S → R is the probability to start in a given state s , and γ ∈ [ 0 , 1 ) is the discount factor . A state s ∈ S specifies everything about the world at a given time ( the agent , its memory and all the rest ) . The agent starts its journey in a state s ∈ S with probability p0 ( s ) . Based on an observation o ∈ Ω obtained with probability O ( o|s ) the agent takes an action a ∈ A . This action causes a transition to the state s′ with probability T ( s′|s , a ) and the agent gains the reward R ( s ) . And so on . 1In the literature , R also depends on the action : R : S × A → R. Our notation is not a loss of generality . The set of state can be made bigger S → S ×A in order to contain the last action . Definition 2.2 ( Policy ) . A policy π ( a|o ) is a conditional probability of executing an action a ∈ A given an observation o ∈ Ω . Definition 2.3 ( Policy State Transition ) . Given a policy π , the state transition Tπ is given by Tπ ( s ′|s ) = ∑ o , a∈Ω×A T ( s′|s , a ) π ( a|o ) O ( o|s ) . ( 1 ) Definition 2.4 ( Expected sum of discounted rewards ) . The expected sum of future discounted rewards of a policy π is Gπ = E s0 ∼ p0 s1 ∼ Tπ ( ·|s0 ) s2 ∼ Tπ ( ·|s1 ) . . . [ ∞∑ t=0 γtR ( st ) ] . ( 2 ) Note that a POMDP with an expected sum of future discounted rewards with discount factor γ can be reduced to an undiscounted POMDP ( Altman ( 1999 ) ) , as we now recall ( see proof in Appendix A ) : Lemma 2.1 . The discounted POMDP defined in 2.1 with a discount γ is equivalent to an undiscounted POMDP with a probability r = 1− γ to be reset from any state toward an initial state . In the undiscounted POMDP , the agent reaches a steady state p ( s ) which can be used to calculate the expected sum of discounted rewards Gπ = 1rEs∼p [ R ( s ) ] . 2.2 OPTIMIZATION ALGORITHM . To optimize a policy algorithmically , we apply gradient descent on the expected sum of discounted rewards . First , we parametrize a policy with parameters w ∈ R|A|×|Ω| , normalized to get a probability using the softmax function πw ( a|o ) = exp ( wao ) ∑ b exp ( wbo ) . Then , we compute the transition matrix T̃π , from which we obtain the steady state p using the power method ( See Appendix B ) . Finally , we calculate Gπ by the Lemma 2.1 . Using an algorithm that keeps track of the operations ( we use pytorch Paszke et al . ( 2017 ) ) , we can compute the gradient of Gπ with respect to the parameters w and perform gradient descent with adaptive time steps ( i.e . a gradient flow dynamics ) : d dt w = d dw Gπ ( w ) . ( 3 )
The paper attempts to investigate how memory architecture affects learning performance of POMDP agents. It focuses on a very simple two-arm bandit problem with two hypotheses for their probabilities. Two memory structures are considered: random access memory and memento memory. For each memory structure, one policy is provided with a kind of asymptotic optimal performance. Simulation results for simple gradient based learning algorithms are shown under the two memory structures.
SP:82b3049ba37482bbbd54b7e88daf183a5a06962e
How memory architecture affects learning in a simple POMDP: the two-hypothesis testing problem
Reinforcement learning is generally difficult for partially observable Markov decision processes ( POMDPs ) , which occurs when the agent ’ s observation is partial or noisy . To seek good performance in POMDPs , one strategy is to endow the agent with a finite memory , whose update is governed by the policy . However , policy optimization is non-convex in that case and can lead to poor training performance for random initialization . The performance can be empirically improved by constraining the memory architecture , then sacrificing optimality to facilitate training . Here we study this trade-off in a two-hypothesis testing problem , akin to the two-arm bandit problem . We compare two extreme cases : ( i ) the random access memory where any transitions between M memory states are allowed and ( ii ) a fixed memory where the agent can access its last m actions and rewards . For ( i ) , the probability q to play the worst arm is known to be exponentially small in M for the optimal policy . Our main result is to show that similar performance can be reached for ( ii ) as well , despite the simplicity of the memory architecture : using a conjecture on Gray-ordered binary necklaces , we find policies for which q is exponentially small in 2m , i.e . q ∼ α2m with α < 1 . In addition , we observe empirically that training from random initialization leads to very poor results for ( i ) , and significantly better results for ( ii ) thanks to the constraints on the memory architecture . 1 INTRODUCTION . Reinforcement learning is aimed at finding the sequence of actions that should take an agent to maximise a long-term reward ( Sutton & Barto ( 2018 ) ) . This sequential decision-making is usually modeled as a Markov decision process ( MDP ) : at each time step , the agent chooses an action based on a policy ( a function that relates the agent ’ s state to its action ) , with the aim of maximizing its value ( the expected discounted sum of rewards ) . Deterministic optimal policies can be found through dynamic programming ( Bellman ( 1966 ) ) when MDPs are discrete ( both states and actions belong to discrete sets ) and the agent fully knows its environment ( Watkins & Dayan ( 1992 ) ) . A practical difficulty arises when the agent only have a partial observation of its environment or when this observation is imperfect or stochastic . The mathematical framework is then known as a partially observable Markov decision process ( POMDP ) ( Smallwood & Sondik ( 1973 ) ) . In this framework , the agent ’ s state is replaced by the agent ’ s belief , which is the probability distribution over all possible states . At each time step , the agent ’ s belief can be updated through Bayesian inference to account for observations . In the belief space , the problem becomes fully observable again and the POMDP can thus be solved as a “ belief MDP ” . However , the dimension of the belief space is much larger than the state space and solving the belief MDP can be challenging in practical problems . Some approaches seek to resolve this difficulty by approximating of the belief and the value functions ( Hauskrecht ( 2000 ) ; Roy et al . ( 2005 ) ; Silver & Veness ( 2010 ) ; Somani et al . ( 2013 ) ) , or use deep model-free reinforcement learning where the neural network is complemented with a memory ( Oh et al . ( 2016 ) ; Khan et al . ( 2017 ) ) or a recurrency ( Hausknecht & Stone ( 2015 ) ; Li et al . ( 2015 ) ) to better approximate history-based policies . Here we focus on the idea of Littman ( 1993 ) , who proposed to give the agent a limited number of bits of memory , an idea that has been developed independently in the robotics community where it is known as a finite-state controller ( Meuleau et al . ( 1999 ; 2013 ) ) . These works show that adding a memory usually increases the performance in POMDPs . But to this day , attempts to find optimal memory allocation have been essentially empirical ( Peshkin et al . ( 2001 ) ; Zhang et al . ( 2016 ) ; Toro Icarte et al . ( 2020 ) ) . One central difficulty is that the value is a non-convex function of policy for POMDPs ( Jaakkola et al . ( 1995 ) ) : learning will thus generally get stuck in poor local maxima for random policy initialization . This problem is even more acute when memory is large or when all transitions between memory states are allowed . To improve learning , restricting the policy space to specific memory architectures where most transitions are forbidden is key ( Peshkin et al . ( 2001 ) ; Zhang et al . ( 2016 ) ; Toro Icarte et al . ( 2020 ) ) . However , there is no general principles to optimize the memory architectures or the policy initialization . In fact , this question is not understood satisfyingly even in the simplest tasks- arguably a necessary step to later achieve a broad understanding . Here , we work out how the memory architecture affects optimal solutions in perhaps the simplest POMDP , and find that these solutions are intriguingly complex . Specifically , we consider the twohypothesis testing problem . At each time step , the agent chooses to pull one of two arms that yield random rewards with different means . We compare two memory structures : ( i ) a random access memory ( RAM ) in which all possible transitions between M distinct memory states are allowed ; ( ii ) a Memento memory in which the agent can access its last m actions and rewards . When the agent is provided with a RAM memory , we study the performance of a “ column of confidence ” policy ( CCP ) : the agent keeps repeating the same action and updates its confidence in it by moving up and down the memory sites until it reaches the bottom of the column and the alternative action is tried . The performance of this policy is assessed through the calculation of the expected frequency q to play the worst arm ( thus the smaller q , the better ) . For the CCP , q can be shown to be exponentially small in M . This result is closely related to the work of Hellman & Cover ( 1970 ) on hypothesis testing and its extension to finite horizon ( Wilson ( 2014 ) ) . In practice , we find that learning a policy with a RAM memory and random initialization leads to poor results , far from the performance of the column of confidence policy . Restricting memory transitions to chain-like transitions leads to much better results , although still sub-optimal . Our main findings concerns the Memento memory architecture . Surprisingly , despite the lack of flexibility of the memory structure , excellent policies exist . Specifically , using a conjecture on Grayordered binary necklaces ( Degni & Drisko ( 2007 ) ) , we find a policy for which q is exponentially small in 2m —which is considerably better than q ∼ ln ( m ) /m , optimal for an agent that only plays m times . For Memento memory , we also observe empirically that learning is faster and perform better than in the RAM case . The code to reproduce the experiments is available at https : //anonymous.4open . science/r/two-hypothesis-BAB3 , and uses a function defined here https : // anonymous.4open.science/r/gradientflow/gradientflow . The experiments where executed on CPUs for about 10 thousand CPU hours . 2 POMDPS AND THE TWO-HYPOTHESIS TESTING PROBLEM . 2.1 GENERAL FORMULATION . Definition 2.1 ( POMDP ) . A discrete-time POMDP model is defined as the 8-tuple ( S , A , T , R , Ω , O , p0 , γ ) : S is a set of states , A is a set of actions , T is a conditional transition probability function T ( s′|s , a ) where s′ , s ∈ S and a ∈ A , R : S → R is the reward function1 , Ω is a set of observations , O ( o|s ) is a conditional observation probability with o ∈ Ω and s ∈ S , p0 ( s ) : S → R is the probability to start in a given state s , and γ ∈ [ 0 , 1 ) is the discount factor . A state s ∈ S specifies everything about the world at a given time ( the agent , its memory and all the rest ) . The agent starts its journey in a state s ∈ S with probability p0 ( s ) . Based on an observation o ∈ Ω obtained with probability O ( o|s ) the agent takes an action a ∈ A . This action causes a transition to the state s′ with probability T ( s′|s , a ) and the agent gains the reward R ( s ) . And so on . 1In the literature , R also depends on the action : R : S × A → R. Our notation is not a loss of generality . The set of state can be made bigger S → S ×A in order to contain the last action . Definition 2.2 ( Policy ) . A policy π ( a|o ) is a conditional probability of executing an action a ∈ A given an observation o ∈ Ω . Definition 2.3 ( Policy State Transition ) . Given a policy π , the state transition Tπ is given by Tπ ( s ′|s ) = ∑ o , a∈Ω×A T ( s′|s , a ) π ( a|o ) O ( o|s ) . ( 1 ) Definition 2.4 ( Expected sum of discounted rewards ) . The expected sum of future discounted rewards of a policy π is Gπ = E s0 ∼ p0 s1 ∼ Tπ ( ·|s0 ) s2 ∼ Tπ ( ·|s1 ) . . . [ ∞∑ t=0 γtR ( st ) ] . ( 2 ) Note that a POMDP with an expected sum of future discounted rewards with discount factor γ can be reduced to an undiscounted POMDP ( Altman ( 1999 ) ) , as we now recall ( see proof in Appendix A ) : Lemma 2.1 . The discounted POMDP defined in 2.1 with a discount γ is equivalent to an undiscounted POMDP with a probability r = 1− γ to be reset from any state toward an initial state . In the undiscounted POMDP , the agent reaches a steady state p ( s ) which can be used to calculate the expected sum of discounted rewards Gπ = 1rEs∼p [ R ( s ) ] . 2.2 OPTIMIZATION ALGORITHM . To optimize a policy algorithmically , we apply gradient descent on the expected sum of discounted rewards . First , we parametrize a policy with parameters w ∈ R|A|×|Ω| , normalized to get a probability using the softmax function πw ( a|o ) = exp ( wao ) ∑ b exp ( wbo ) . Then , we compute the transition matrix T̃π , from which we obtain the steady state p using the power method ( See Appendix B ) . Finally , we calculate Gπ by the Lemma 2.1 . Using an algorithm that keeps track of the operations ( we use pytorch Paszke et al . ( 2017 ) ) , we can compute the gradient of Gπ with respect to the parameters w and perform gradient descent with adaptive time steps ( i.e . a gradient flow dynamics ) : d dt w = d dw Gπ ( w ) . ( 3 )
This paper tackles a two-armed bandit problem (of means $Ber(1/2+\mu)$ and $Ber(1/2-\mu)$, respectively) when memory is limited. Specifically, they model this problem as a POMDP (or, alternatively, hypothesis testing), where the hidden state determines the mean of each arm. The author claim that this simple model might provide some insights on memory architecture in general POMDPs (namely, how the history representation affects the learning process). The authors describe two memory architectures: (i) A general finite-state machine ('RAM'), which transitions based on the played arm and its reward. Specifically, they focus on the column of confidence policy (CCP). The memory structure - a chain where each end of the chain represents an arm. $+1$ reward moves the state towards an arm and $-1$ moves it away, except for the end states that have low escape probability. The policy - playing the arm that its end-state closer to the current state. (ii) History is presented as a memory buffer with the last arm plays and their rewards('Memento'). In this case, the authors present a policy that plays the same action sequence cyclically ('necklaces'). These cycles are chained in a Gray-ordering and the policy moves between cycles (change one action) only if a full cycle indicates that this switch is beneficial. The authors analyze the (stationary) probability of playing the worse actions and show that the RAM model enjoys better (lower) probability. Finally, the authors try to learn a policy when relying on either RAM or Memento architectures. They showed that a random initialization, the Memento memory performs better, while imposing structural constraints that correspond with the suggested policies in (i) and (ii) make RAM memory perform better.
SP:82b3049ba37482bbbd54b7e88daf183a5a06962e
L0-Sparse Canonical Correlation Analysis
1 INTRODUCTION . Canonical Correlation Analysis ( CCA ) ( Hotelling , 1936 ; Thompson , 2005 ) , is a classic statistical method for finding the maximally correlated linear transformations of two modalities ( or views ) . Using modalitiesX ∈ RDx×N andY ∈ RDy×N , which are centered and haveN samples withDx and Dy features , respectively , CCA seeks canonical vectors a ∈ RDx , and b ∈ RDy , such that , u = aTX , and v = bTY , will maximize the sample correlations between the canonical variates , i.e . max a , b6=0 ρ ( aTX , bTY ) = aTXY T b ‖aTX‖2‖bTY ‖2 . ( 1 ) To identify non-linear relations between input variables , several extensions of CCA have been proposed . Kernel methods such as Kernel CCA ( Bach & Jordan , 2002 ) , Non-parametric CCA ( Michaeli et al. , 2016 ) or Multi-view Diffusion maps ( Lindenbaum et al. , 2020 ; Salhov et al. , 2020 ) learn the non-linear relations in reproducing Hilbert spaces . These methods have several shortcomings : they are limited to a designed kernel , and they have poor interpolation and extrapolation capabilities . Deep CCA ( Andrew et al. , 2013 ) overcomes these limitations by learning two non-linear transformations parametrized using neural networks . The model has several extension , see for example ( Wang et al. , 2016 ; Gundersen et al. , 2019 ; Karami & Schuurmans , 2021 ) . CCA models have been widely used in biology ( Pimentel et al. , 2018 ) , neuroscience ( Al-Shargie et al. , 2017 ) , medicine ( Zhang et al. , 2017 ) , and engineering ( Chen et al. , 2017 ) , for unsupervised or semi-supervised learning . By extracting meaningful dimensionality reduced representations , CCA improves downstream tasks such as clustering , classification , or manifold learning . One key limitation of CCA is that it requires more samples than features , i.e. , N > Dx , Dy . However , if we have more variables than samples , the estimation based on the closed-form solution of the CCA problem ( in Eq . 1 ) breaks ( Suo et al. , 2017 ) ( because the covariance matrix is low rank ) . Moreover , in high dimensional data , often some of the variables do not measure the phenomenon that is common to both modalities ( therefore are not correlated ) and thus should be omitted from the transformations . For these reasons , there has been a growing interest in studying sparse CCA models . Sparse CCA ( SCCA ) models seek linear transformations which are based on a sparse subset of variables from the input modalities X and Y . Sparsifying the feature space improves interpretability , prevents overfitting , and removes the degeneracies inherent to N < Dx , Dy ( once the number of selected variables is smaller thanN the covariance matrix becomes full rank ) . To encourage sparsity of the canonical vectors a and b , several authors ( Wiesel et al. , 2008 ; Cai et al. , 2019 ) propose an ` 0 regularized variant of Eq . 1 . However , these schemes are greedy and therefore may lead to suboptimal solutions . As demonstrated by ( Waaijenborg et al. , 2008 ; Parkhomenko et al. , 2009 ; Witten et al. , 2009 ; Hardoon & Shawe-Taylor , 2011 ; Suo et al. , 2017 ) replacing the ` 0 norm by ` 1 is differentiable and leads to a sparse solution to Eq . 1 . Several authors extended these ideas by considering group sparsity ( Chen & Liu , 2012 ; Klami et al. , 2013 ; Solari et al. , 2019 ) . However , these methods are limited to linear transformations and may lead to shrinkage of the canonical vectors due to the ` 1 regularizer . There has been limited work on extending these models to sparse non-linear CCA . Specifically , there are two kernel-based extensions : two-stage kernel CCA ( TSKCCA ) by ( Yoshida et al. , 2017 ) and SCCA based on Hilbert-Schmidt Independence Criterion ( SCCA-HSIC ) by ( Uurtio et al. , 2018 ) . However , these models suffer from the same limitations as KCCA and do not scale to a high dimensional regime . We present ` 0-CCA , a simple yet effective method for learning correlated representation based on sparse subsets of the input variables by minimizing an ` 0 regularized loss . Our ` 0 regularization relies on a recently proposed Gaussian-based continuous relaxation of Bernoulli random variables , termed gates ( Yamada et al. , 2020 ) . The gates are applied to the input features to sparsify the canonical vectors . The model and gates parameters are trained jointly via gradient descent to maximize the correlation between the representations ofX and Y while simultaneously selecting only the subsets of most correlated input features . Our contributions are four-folds : ( i ) By modeling the transformations using two neural networks , we provide a natural solution to the problem of sparse non-linear correlation analysis . ( ii ) We then propose a novel initialization scheme that helps the model identify small subsets of correlated features in the challenging regime of D > N . ( iii ) We apply the proposed method to synthetic data and demonstrate that our approach improves the estimation of the canonical vectors compared with existing baselines . ( iv ) We demonstrate the efficacy of the proposed scheme to several real work applications ; specifically , we demonstrate that it leads to more reliable and interpretable representations than other linear and non-linear data fusion schemes . 2 SPARSE CCA . The problem in Eq . 1 has a closed-form solution based on the eigendecomposition of C−1x CxyC −1 y Cyx and C −1 y CyxC −1 x Cxy , where Cx , Cy are within view sample covariance matrices and Cxy , Cyx are cross-view sample covariance matrices . However , if N is smaller than the number of input variables ( Dx or Dy ) , the sample covariance may be rank deficient , and the closed-form solution becomes meaningless . To overcome this limitation , we consider the problem of sparse CCA . Sparse CCA reduces the number of active variables and therefore the covariance matrix becomes full rank . Sparsity also improves model interpretability but may reduce the maximal ( training ) correlation value obtained in Eq . 1 ( Shalev-Shwartz et al. , 2010 ) . Sparse CCA deals with identifying maximally correlated representations based on linear combinations of sparse subsets of the input variables inX and Y . The problem can be formulated as min a , b − ρ ( aTX , bTY ) + λx‖a‖0 + λy‖b‖0 , ( 2 ) where λx and λy are regularization parameters which control the sparsify the input variables . If ‖a‖0 and ‖b‖0 are smaller than N , we can remove the degeneracy inherent to Eq . 1 , and identify meaningful correlated representations based on a sparse subset of input variables . 3 PROBABILISTIC REFORMULATION OF SPARSE CCA . The sparse CCA problem formulated in Eq . 2 becomes intractable for large Dx or Dy , moreover , due to the discrete nature of the ` 0 norm , the problem is not amenable to gradient-based optimization schemes . Fortunately , as demonstrated in sparse regression , probabilistic models such as the spikeand-slab ( George & McCulloch , 1993 ; Kuo & Mallick , 1998 ; Zhou et al. , 2009 ; Polson & Sun , 2019 ) provide a compelling alternative . More recently , differentiable probabilistic models such as ( Louizos et al. , 2017 ; Yamada et al. , 2020 ) were proposed for sparse supervised learning . Here , we adopt these ideas by rewriting the canonical vectors as α = θx sx and β = θy sy , where denotes the Hadamard product ( element wise multiplication ) , and θx ∈ RDx , θy ∈ RDy . The vectors sx ∈ { 0 , 1 } Dx , sy ∈ { 0 , 1 } Dy are Bernoulli random vectors with parameters πx = ( πx1 , ... , πxDx ) and πy = ( πy1 , ... , π y Dy ) . These Bernoulli variables , act as gates and sparsify the coefficients of the canonical vectors . Now , the problem in Eq . 2 can be reformulated as an expectation minimization , which is parameterized by πx and πy . Specifically , based on the following theorem , we can reformulate the problem in Eq . 2 . Theorem 3.1 The solution of the sparse CCA problem in Eq . 2 is equivalent to the solution of the following probabilistic problem min πx , πy , θx , θy E [ − ρ ( αTX , βTY ) + λx‖sx‖0 + λy‖sy‖0 ] , ( 3 ) where α = θx sx and β = θy sy and the expectation is taken with respect to the random Bernoulli variables sx and sy ( which are parameterized by πx and πy ) . Note that the expected values of the ` 0 norms can be expressed using the Bernoulli parameters as E‖sx‖0 = ∑ πxi , and E‖sy‖0 = ∑ πyi . The proof relies on the fact that the optimal solution to Eq . 2 is a valid solution to Eq . 3 , and vice versa . The proof is presented in the Appendix , Section H , and follows the same construction as the proof of Theorem 1 in ( Yin et al. , 2020 ) . 3.1 CONTINUOUS RELAXATION FOR SPARSE CCA . Due to the discrete nature of sx and sy , differentiating the leading term in Eq . 3 is not straightforward . Although solutions such as REINFORCE ( Williams , 1992 ) or the straight-through estimator ( Bengio et al. , 2013 ) enable differentiating through discrete random variables , they still suffer from high variance . Furthermore , they require many Monte Carlo samples for effective training ( Tucker et al. , 2017 ) . Recently , several authors ( Maddison et al. , 2016 ; Jang et al. , 2016 ; Louizos et al. , 2017 ) have demonstrated that using a continuous reparametrization of discrete random variables can reduce the variance of the gradient estimates . Here , following the reparametrization presented in ( Yamada et al. , 2020 ) , we use Gaussian-based relaxation for the Bernoulli random variables . Each relaxed Bernoulli variables zi is defined by drawing from a centered Gaussian i ∼ N ( 0 , σ2 ) , then shifting it by µi and truncating its values using the following hard Sigmoid function zi = max ( 0 , min ( 1 , µi + i ) ) . ( 4 ) Using these relaxed Bernoulli variables , we can define the gated canonical vectors as α = θx zx and β = θy zy . We incorporate these vectors into the objective defined in Eq . 3 , in which the ` 0 regularization terms can be expressed as E‖zx‖0 = Dx∑ i=1 P ( zxi ≥ 0 ) = Dx∑ i=1 ( 1 2 − 1 2 erf ( − µ x i√ 2σ ) ) , where erf ( ) is the Gaussian error function , and is defined similarly for E‖zy‖0 . To learn to model parameters θx , θy and gate parameters µx , µy we first draw realizations for the gates , then we update the parameters by applying gradient descent to minimize E [ − ρ ( αTX , βTY ) + λx‖zx‖0 + λy‖zy‖0 ] . Post training , we remove the stochasicity from the gates and use all variables such that zxi = max ( 0 , min ( 1 , µxi ) ) > 0 ( defined similarly for z y ) .
The paper proposes a sparse canonical correlation analysis method based on l_0 norm. A continuous relaxation scheme is adopted for solving sparse CCA. The proposed model is then extended to nonlinear function estimation and combined with deep neural networks. Experimental results on synthetic and real-world datasets demonstrate the effectiveness of the proposed methods.
SP:74e6032281e4470acb02303c8c6a319cfb896f28
L0-Sparse Canonical Correlation Analysis
1 INTRODUCTION . Canonical Correlation Analysis ( CCA ) ( Hotelling , 1936 ; Thompson , 2005 ) , is a classic statistical method for finding the maximally correlated linear transformations of two modalities ( or views ) . Using modalitiesX ∈ RDx×N andY ∈ RDy×N , which are centered and haveN samples withDx and Dy features , respectively , CCA seeks canonical vectors a ∈ RDx , and b ∈ RDy , such that , u = aTX , and v = bTY , will maximize the sample correlations between the canonical variates , i.e . max a , b6=0 ρ ( aTX , bTY ) = aTXY T b ‖aTX‖2‖bTY ‖2 . ( 1 ) To identify non-linear relations between input variables , several extensions of CCA have been proposed . Kernel methods such as Kernel CCA ( Bach & Jordan , 2002 ) , Non-parametric CCA ( Michaeli et al. , 2016 ) or Multi-view Diffusion maps ( Lindenbaum et al. , 2020 ; Salhov et al. , 2020 ) learn the non-linear relations in reproducing Hilbert spaces . These methods have several shortcomings : they are limited to a designed kernel , and they have poor interpolation and extrapolation capabilities . Deep CCA ( Andrew et al. , 2013 ) overcomes these limitations by learning two non-linear transformations parametrized using neural networks . The model has several extension , see for example ( Wang et al. , 2016 ; Gundersen et al. , 2019 ; Karami & Schuurmans , 2021 ) . CCA models have been widely used in biology ( Pimentel et al. , 2018 ) , neuroscience ( Al-Shargie et al. , 2017 ) , medicine ( Zhang et al. , 2017 ) , and engineering ( Chen et al. , 2017 ) , for unsupervised or semi-supervised learning . By extracting meaningful dimensionality reduced representations , CCA improves downstream tasks such as clustering , classification , or manifold learning . One key limitation of CCA is that it requires more samples than features , i.e. , N > Dx , Dy . However , if we have more variables than samples , the estimation based on the closed-form solution of the CCA problem ( in Eq . 1 ) breaks ( Suo et al. , 2017 ) ( because the covariance matrix is low rank ) . Moreover , in high dimensional data , often some of the variables do not measure the phenomenon that is common to both modalities ( therefore are not correlated ) and thus should be omitted from the transformations . For these reasons , there has been a growing interest in studying sparse CCA models . Sparse CCA ( SCCA ) models seek linear transformations which are based on a sparse subset of variables from the input modalities X and Y . Sparsifying the feature space improves interpretability , prevents overfitting , and removes the degeneracies inherent to N < Dx , Dy ( once the number of selected variables is smaller thanN the covariance matrix becomes full rank ) . To encourage sparsity of the canonical vectors a and b , several authors ( Wiesel et al. , 2008 ; Cai et al. , 2019 ) propose an ` 0 regularized variant of Eq . 1 . However , these schemes are greedy and therefore may lead to suboptimal solutions . As demonstrated by ( Waaijenborg et al. , 2008 ; Parkhomenko et al. , 2009 ; Witten et al. , 2009 ; Hardoon & Shawe-Taylor , 2011 ; Suo et al. , 2017 ) replacing the ` 0 norm by ` 1 is differentiable and leads to a sparse solution to Eq . 1 . Several authors extended these ideas by considering group sparsity ( Chen & Liu , 2012 ; Klami et al. , 2013 ; Solari et al. , 2019 ) . However , these methods are limited to linear transformations and may lead to shrinkage of the canonical vectors due to the ` 1 regularizer . There has been limited work on extending these models to sparse non-linear CCA . Specifically , there are two kernel-based extensions : two-stage kernel CCA ( TSKCCA ) by ( Yoshida et al. , 2017 ) and SCCA based on Hilbert-Schmidt Independence Criterion ( SCCA-HSIC ) by ( Uurtio et al. , 2018 ) . However , these models suffer from the same limitations as KCCA and do not scale to a high dimensional regime . We present ` 0-CCA , a simple yet effective method for learning correlated representation based on sparse subsets of the input variables by minimizing an ` 0 regularized loss . Our ` 0 regularization relies on a recently proposed Gaussian-based continuous relaxation of Bernoulli random variables , termed gates ( Yamada et al. , 2020 ) . The gates are applied to the input features to sparsify the canonical vectors . The model and gates parameters are trained jointly via gradient descent to maximize the correlation between the representations ofX and Y while simultaneously selecting only the subsets of most correlated input features . Our contributions are four-folds : ( i ) By modeling the transformations using two neural networks , we provide a natural solution to the problem of sparse non-linear correlation analysis . ( ii ) We then propose a novel initialization scheme that helps the model identify small subsets of correlated features in the challenging regime of D > N . ( iii ) We apply the proposed method to synthetic data and demonstrate that our approach improves the estimation of the canonical vectors compared with existing baselines . ( iv ) We demonstrate the efficacy of the proposed scheme to several real work applications ; specifically , we demonstrate that it leads to more reliable and interpretable representations than other linear and non-linear data fusion schemes . 2 SPARSE CCA . The problem in Eq . 1 has a closed-form solution based on the eigendecomposition of C−1x CxyC −1 y Cyx and C −1 y CyxC −1 x Cxy , where Cx , Cy are within view sample covariance matrices and Cxy , Cyx are cross-view sample covariance matrices . However , if N is smaller than the number of input variables ( Dx or Dy ) , the sample covariance may be rank deficient , and the closed-form solution becomes meaningless . To overcome this limitation , we consider the problem of sparse CCA . Sparse CCA reduces the number of active variables and therefore the covariance matrix becomes full rank . Sparsity also improves model interpretability but may reduce the maximal ( training ) correlation value obtained in Eq . 1 ( Shalev-Shwartz et al. , 2010 ) . Sparse CCA deals with identifying maximally correlated representations based on linear combinations of sparse subsets of the input variables inX and Y . The problem can be formulated as min a , b − ρ ( aTX , bTY ) + λx‖a‖0 + λy‖b‖0 , ( 2 ) where λx and λy are regularization parameters which control the sparsify the input variables . If ‖a‖0 and ‖b‖0 are smaller than N , we can remove the degeneracy inherent to Eq . 1 , and identify meaningful correlated representations based on a sparse subset of input variables . 3 PROBABILISTIC REFORMULATION OF SPARSE CCA . The sparse CCA problem formulated in Eq . 2 becomes intractable for large Dx or Dy , moreover , due to the discrete nature of the ` 0 norm , the problem is not amenable to gradient-based optimization schemes . Fortunately , as demonstrated in sparse regression , probabilistic models such as the spikeand-slab ( George & McCulloch , 1993 ; Kuo & Mallick , 1998 ; Zhou et al. , 2009 ; Polson & Sun , 2019 ) provide a compelling alternative . More recently , differentiable probabilistic models such as ( Louizos et al. , 2017 ; Yamada et al. , 2020 ) were proposed for sparse supervised learning . Here , we adopt these ideas by rewriting the canonical vectors as α = θx sx and β = θy sy , where denotes the Hadamard product ( element wise multiplication ) , and θx ∈ RDx , θy ∈ RDy . The vectors sx ∈ { 0 , 1 } Dx , sy ∈ { 0 , 1 } Dy are Bernoulli random vectors with parameters πx = ( πx1 , ... , πxDx ) and πy = ( πy1 , ... , π y Dy ) . These Bernoulli variables , act as gates and sparsify the coefficients of the canonical vectors . Now , the problem in Eq . 2 can be reformulated as an expectation minimization , which is parameterized by πx and πy . Specifically , based on the following theorem , we can reformulate the problem in Eq . 2 . Theorem 3.1 The solution of the sparse CCA problem in Eq . 2 is equivalent to the solution of the following probabilistic problem min πx , πy , θx , θy E [ − ρ ( αTX , βTY ) + λx‖sx‖0 + λy‖sy‖0 ] , ( 3 ) where α = θx sx and β = θy sy and the expectation is taken with respect to the random Bernoulli variables sx and sy ( which are parameterized by πx and πy ) . Note that the expected values of the ` 0 norms can be expressed using the Bernoulli parameters as E‖sx‖0 = ∑ πxi , and E‖sy‖0 = ∑ πyi . The proof relies on the fact that the optimal solution to Eq . 2 is a valid solution to Eq . 3 , and vice versa . The proof is presented in the Appendix , Section H , and follows the same construction as the proof of Theorem 1 in ( Yin et al. , 2020 ) . 3.1 CONTINUOUS RELAXATION FOR SPARSE CCA . Due to the discrete nature of sx and sy , differentiating the leading term in Eq . 3 is not straightforward . Although solutions such as REINFORCE ( Williams , 1992 ) or the straight-through estimator ( Bengio et al. , 2013 ) enable differentiating through discrete random variables , they still suffer from high variance . Furthermore , they require many Monte Carlo samples for effective training ( Tucker et al. , 2017 ) . Recently , several authors ( Maddison et al. , 2016 ; Jang et al. , 2016 ; Louizos et al. , 2017 ) have demonstrated that using a continuous reparametrization of discrete random variables can reduce the variance of the gradient estimates . Here , following the reparametrization presented in ( Yamada et al. , 2020 ) , we use Gaussian-based relaxation for the Bernoulli random variables . Each relaxed Bernoulli variables zi is defined by drawing from a centered Gaussian i ∼ N ( 0 , σ2 ) , then shifting it by µi and truncating its values using the following hard Sigmoid function zi = max ( 0 , min ( 1 , µi + i ) ) . ( 4 ) Using these relaxed Bernoulli variables , we can define the gated canonical vectors as α = θx zx and β = θy zy . We incorporate these vectors into the objective defined in Eq . 3 , in which the ` 0 regularization terms can be expressed as E‖zx‖0 = Dx∑ i=1 P ( zxi ≥ 0 ) = Dx∑ i=1 ( 1 2 − 1 2 erf ( − µ x i√ 2σ ) ) , where erf ( ) is the Gaussian error function , and is defined similarly for E‖zy‖0 . To learn to model parameters θx , θy and gate parameters µx , µy we first draw realizations for the gates , then we update the parameters by applying gradient descent to minimize E [ − ρ ( αTX , βTY ) + λx‖zx‖0 + λy‖zy‖0 ] . Post training , we remove the stochasicity from the gates and use all variables such that zxi = max ( 0 , min ( 1 , µxi ) ) > 0 ( defined similarly for z y ) .
The paper proposes a new method for l0-CCA using stochastic gating which allows for an efficient algorithm and also permits a deep-version of the l0-CCA. Results are shown on synthetic and real-world datasets that highlight the superior performance of the proposed approach. Main Contributions: 1). The paper proposes a new approach for l0-CCA that uses a continuous relaxation of a bernoulli random variable via stochastic gating. 2). The paper extends the proposed method to l0-deep-CCA which allows non-linear interactions between the two CCA views. 3). Results are shown on synthetic and real-world datasets which show the superior performance of the proposed l0-CCA methods.
SP:74e6032281e4470acb02303c8c6a319cfb896f28
An Interpretable Graph Generative Model with Heterophily
Many models for graphs fall under the framework of edge-independent dot product models . These models output the probabilities of edges existing between all pairs of nodes , and the probability of a link between two nodes increases with the dot product of vectors associated with the nodes . Recent work has shown that these models are unable to capture key structures in real-world graphs , particularly heterophilous structures , wherein links occur between dissimilar nodes . We propose the first edge-independent graph generative model that is a ) expressive enough to capture heterophily , b ) produces nonnegative embeddings , which allow link predictions to be interpreted in terms of communities , and c ) optimizes effectively on realworld graphs with gradient descent on a cross-entropy loss . Our theoretical results demonstrate the expressiveness of our model in its ability to exactly reconstruct a graph using a number of clusters that is linear in the maximum degree , along with its ability to capture both heterophily and homophily in the data . Further , our experiments demonstrate the effectiveness of our model for a variety of important application tasks such as multi-label clustering and link prediction . 1 INTRODUCTION . Graphs naturally arise in data from a variety of fields including sociology ( Mason & Verwoerd , 2007 ) , biology ( Scott , 1988 ) , and computer networking ( Bonato , 2004 ) . A key underlying task in machine learning for graph data is forming models of graphs which can predict edges between nodes , form useful representations of nodes , and reveal interpretable structure in the graph , such as detecting clusters of nodes . Many graph models fall under the framework of edge-independent graph generative models , which can output the probabilities of edges existing between any pair of nodes . The parameters of such models can be trained iteratively on the network , or some fraction of the network which is known , in the link prediction task , e.g. , by minimizing a cross-entropy loss . To choose among these models , one must consider whether the model is capable of expressing structures of interest in the graph , as well as the interpretability of the model . Expressiveness As real-world graphs are high-dimensional objects , graph models generally compress information about the graph . Such models are exemplified by the family of dot product models , which associate each node with a real-valued “ embedding ” vector ; the predicted probability of the link between two nodes increases with the dot product of their embedding vectors . These models can alternatively be seen as factorizing the adjacency matrix of the graph in terms of a low-rank matrix . Recent work ( Seshadhri et al. , 2020 ) has shown that dot product models are limited in their ability to model common structures in real-world graphs , such as triangles incident only on low-degree nodes . In response , Chanpuriya et al . ( 2020 ) showed that with the logistic PCA ( LPCA ) model , which has two embeddings per node ( i.e . using the dot product of the “ left ” embedding of one node and the “ right ” embedding of another ) , not only can such structures be represented , but further , any graph can be exactly represented with embedding vectors whose lengths are linear in the maximum degree of the graph . Peysakhovich & Bottou ( 2021 ) show that the limitations of the single-embedding model , which are overcome by having two embeddings , stem from only being able to represent adjacency matrices which are positive semi-definite , which prevents them from representing heterophilous structures in graphs ; heterophilous structures are those wherein dissimilar nodes are linked . Heterophily : Motivating example To demonstrate how heterophily can manifest in networks , as well as how models which assume homophily can fail to represent such networks , we provide a simple synthetic example . Suppose a recruiting website allows its members to contact each other ; we construct a graph of these members , with an edge indicating that two members have been in contact . Members are either recruiters or non-recruiters , and each member comes from one of ten locations ( e.g. , a city ) . Members from the same location are likely to contact each other ; this typifies homophily , wherein links occur between similar nodes . Furthermore , recruiters are unlikely to contact other recruiters , and non-recruiters are unlikely to contact other non-recruiters ; this typifies heterophily . Figure 1 shows an instantiation of such an adjacency matrix with 1000 nodes , which are randomly assigned to one of the ten locations and one of recruiter / non-recruiter . We recreate this network with our embedding model and the BIGCLAM algorithm of Yang & Leskovec ( 2013 ) , which explicitly assumes homophily . We also compare with the best low-rank approximation to the adjacency matrix in terms of Frobenius error ; this is the SVD of the matrix , discarding all but the top singular values . In Figure 1 , we show how BIGCLAM captures only the ten communities based on location , i.e. , only the homophilous structure , and fails to capture the heterophilous distinction between recruiters and non-recruiters . We also plot the error of the reconstructions as the embedding length increases . There are 10 · 2 = 20 different kinds of nodes , meaning the expected adjacency matrix is rank-20 , and our model maintains the lowest error up to this embedding length ; by contrast , BIGCLAM is unable to decrease error after capturing location information with length-10 embeddings . Interpretability Beyond being able to capture a given network accurately , it is often desirable for a graph model to form interpretable representations of nodes and to produce edge probabilities in an interpretable fashion . Dot product models can achieve this by restricting the node embeddings to be nonnegative . Nonnegative factorization has long been used to decompose data into parts ( Donoho & Stodden , 2003 ) . In the context of graphs , this entails decomposing the set of nodes of the network into clusters or communities . In particular , each entry of the nonnegative embedding vector of a node represents the intensity with which the node participates in a community . Note that this allows the edge probabilities output by dot product models to be interpretable in terms of coparticipation in communities . Depending on the model , these vectors may have restrictions such as a sum-to-one requirement , meaning the node is assigned a categorical distribution over communities . The least restrictive and most expressive case is that of soft assignments to overlapping communities , where the entries can vary totally independently . In models for this case , the output of the dot product is often mapped through a nonlinear link function to produce a probability , i.e . to ensure the value lies in [ 0 , 1 ] . This link function ideally also facilitates straightforward interpretation . We propose the first edge-independent graph generative model that is a ) expressive enough to capture heterophily , b ) interpretable in that it produces nonnegative embeddings , and c ) optimizes effectively on real-world graphs with gradient descent on a cross-entropy loss . Summary of main contributions The key contributions of this work are as follows : • We introduce a graph generative model , based on nonnegative matrix factorization , which is able to represent both heterophily and overlapping communities . Our model outputs link probabilities which are interpretable in terms of the communities it detects . • We provide a scheme for initialization of the nonnegative factors using the arbitrary real factors generated by logistic PCA . We show theoretically how a graph which is represented exactly by LPCA can also be represented exactly by our model . • We show theoretically that , with a small number of communities , our model can exactly represent a natural class of graphs which exhibits both heterophily and overlapping communities . • In experiments , we show that our algorithm is competitive on real-world graphs in terms of representing the network , doing link prediction , and producing communities which align with ground-truth . 2 GRAPH GENERATIVE MODEL . Consider the set of undirected , unweighted graphs on n nodes , i.e. , the set of graphs with symmetric adjacency matrices in { 0 , 1 } n×n . We propose an edge-independent , generative model for such graphs . Given a diagonal matrixW ∈ Rk×k and a matrix V ∈ [ 0 , 1 ] n×k , we set the probability of an edge existing between nodes i and j to be the ( i , j ) -th entry of matrix à : à : = σ ( V > WV ) , ( 1 ) where σ is the logistic function . k represents the number of clusters ; intuitively , if vi ∈ Rk is the i-th row of matrix V , then vi is soft assignment of node i to the k communities . W can be viewed as a cluster affinity matrix . An equivalent alternative formulation is Ãi , j = σ ( viWv > j ) . ( 2 ) Interpretation The edge probabilities output by this model have an intuitive interpretation , and to maximize interpretability , we focus on the case where W is diagonal . Recall that there is a one-to-one-to-one relationship between probability p ∈ [ 0 , 1 ] , odds o = p1−p ∈ [ 0 , ∞ ) , and logit ` = log ( o ) ∈ ( −∞ , +∞ ) . The logit of the link probability between nodes i and j is v > i Wvj , which is a summation of terms vicvjcWcc over all communities c ∈ [ k ] . If the nodes both fully participate in community c , that is , vic = vjc = 1 , then the edge logit is changed by Wcc starting from a baseline of 0 , or equivalently the odds of an edge is multiplied by exp ( Wcc ) starting from a baseline odds of 1 ; if either of the nodes participates only partially in community c , then the change in logit and odds is accordingly prorated . Homophily and heterophily also have a clear interpretaion in this model : homophilous communities are those withWcc > 0 , where two nodes both participating in the community increases the odds of a link , whereas communities withWcc < 0 are heterophilous , and coparticipation decreases the odds of a link . 3 RELATED WORK . Node clustering There is extensive prior work on the node clustering problem ( Schaeffer , 2007 ; Aggarwal & Wang , 2010 ; Nascimento & De Carvalho , 2011 ) , perhaps the most well-known being the normalized cuts algorithm of Shi & Malik ( 2000 ) , which produces a clustering based on the entrywise signs of an eigenvector of the graph Laplacian matrix . However , the clustering algorithms which are most relevant to our work are those based on non-negative matrix factorization ( NMF ) ( Lee & Seung , 1999 ; Berry et al. , 2007 ; Wang & Zhang , 2012 ; Gillis , 2020 ) . One such algorithm is that of Yu et al . ( 2005 ) , which approximately factors a graph ’ s adjacency matrix A ∈ { 0 , 1 } n×n into two positive matrices H and Λ , where H ∈ Rn×k+ is left-stochastic ( i.e . each of its columns sums to 1 ) and Λ ∈ Rk×k+ is diagonal , such that HΛH > ≈ A . Here H represents a soft clustering of the n nodes into k clusters , while the diagonal entries of Λ represent the prevalence of edges within clusters . Note the similarity of the factorization to our model , save for the lack of a nonlinearity . Other NMF approaches include those of Ding et al . ( 2008 ) , Yang et al . ( 2012 ) , Kuang et al . ( 2012 ) , and Kuang et al . ( 2015 ) ( SYMNMF ) . Modeling heterophily Much of the existing work on graph models has an underlying assumption of network homophily ( Newman , 2002 ; Johnson et al. , 2010 ; Noldus & Van Mieghem , 2015 ) . There has been significant recent interest in the limitations of graph neural network ( GNN ) models ( Duvenaud et al. , 2015 ; Li et al. , 2016 ; Kipf & Welling , 2017 ; Hamilton et al. , 2017 ) at addressing network heterophily ( Nt & Maehara , 2019 ; Zhu et al. , 2020 ) , as well as proposed solutions ( Pei et al. , 2020 ; Zhu et al. , 2021 ; Yan et al. , 2021 ) , but relatively less work for more fundamental models such as those for clustering . Some existing NMF approaches to clustering do naturally model heterophilous structure in networks . The model of Nourbakhsh et al . ( 2014 ) , for example , is similar to that of Yu et al . ( 2005 ) , but allows the cluster affinity matrix Λ to be non-diagonal ; this allows for inter-cluster edge affinity to exceed intra-cluster edge affinity , so heterophily can arise in this model , though it is not a focus of their work . Further , the model of Miller et al . ( 2009 ) is similar to ours and also allows for heterophily , though it restricts the cluster assignment matrix V to be binary ; additionally , their training algorithm is not based on gradient descent as ours is , and it does not scale to large networks . More recently , Peysakhovich & Bottou ( 2021 ) propose a decomposition of the form A ≈ D + BB > − CC > , where D ∈ Rn×n is diagonal and B , C ∈ Rn×k are low-rank ; the authors discuss how , interestingly , this model separates the homophilous and heterophilous structure into different factors , namelyB andC . However , this work does not pursue a clustering interpretation or investigate setting the factorsB andC to be nonnegative . One stage of our training algorithm uses a similar decomposition , though it includes the nonnegativity constraint ; this is detailed in Section 4 . Overlapping clustering Many models discussed above focus on the single-label clustering task . We are interested in the closely-related but distinct task of multi-label clustering , also known as overlapping community detection ( Xie et al. , 2013 ; Javed et al. , 2018 ) . The BIGCLAM algorithm of Yang & Leskovec ( 2013 ) uses the following generative model for this task : the probability of a link between two nodes i and j is given by 1 − exp ( −fi · fj ) , where fi , fj ∈ Rk+ represent the intensities with which the nodes participate in each of the k communities . This model allows for intersections of communities to be especially dense with edges , which the authors generally observe in real-world networks ; by contrast , they claim that prior state-of-the-art approaches , including ones based on clustering links ( Ahn et al. , 2010 ) and clique detection ( Palla et al. , 2005 ) , as well as a mixed-membership variant ( Airoldi et al. , 2008 ) of the stochastic block model ( Holland et al. , 1983 ) , implicitly assume that intersections are sparse . BIGCLAM assumes strict homophily of the communities , whereas our model allows for both homophily and heterophily . Additionally , unlike in our model , there is no upper bound to the intensities of community participation ( i.e . the entries of each f ) , so it is unclear how to incorporate prior knowledge about community membership in the form of binary labels , as in a semi-supervised situation . The approach of Zhang & Yeung ( 2012 ) is more similar to ours and more amenable to such prior information in that community assignments are bounded ; specifically , the model is similar to those of Yu et al . ( 2005 ) and Nourbakhsh et al . ( 2014 ) , but allows the cluster assignment matrix H to be an arbitrary matrix of probabilities rather left-stochastic . However , unlike our model and BIGCLAM , these models lack a nonlinear linking function ; recent work outside clustering and community detection on graph generative models ( Rendsburg et al. , 2020 ; Chanpuriya et al. , 2020 ) suggests that the addition of a nonlinear linking function , specifically softmax and logistic nonlinearities as in our model , can make matrix factorization-based graph models more expressive . Lastly , a recent approach is the VGRAPH model of Sun et al . ( 2019 ) , which also lacks a final nonlinear linking function , but , interestingly , has an intermediate linking function : the matrix factors ( i.e . the cluster assignment matrices ) themselves are a product of learned embeddings for the nodes and communities , put through a softmax linking function . Their algorithm ultimately determines overlapping communities as in link clustering approaches , and they find that it generally achieves state-of-the-art results in matching ground-truth communities ; as discussed in Section 6.2 , we find that our algorithm ’ s performance on this task compares favorably to VGRAPH .
The paper proposes an edge-independent graph generative model. Besides the model, the paper also proposes the training process of the model and some theoretical contributions. Unfortunately, the evaluation of the model is based on another problem, clustering. This makes the paper complicate to evaluate. While the main contributions could be important, its evaluation does not guarantee that is able to replicate real networks. Most importantly, given its current results, it must suffer from the degeneracy problem.
SP:e617ea828dc7662fa494799aac7136580ca492f0
An Interpretable Graph Generative Model with Heterophily
Many models for graphs fall under the framework of edge-independent dot product models . These models output the probabilities of edges existing between all pairs of nodes , and the probability of a link between two nodes increases with the dot product of vectors associated with the nodes . Recent work has shown that these models are unable to capture key structures in real-world graphs , particularly heterophilous structures , wherein links occur between dissimilar nodes . We propose the first edge-independent graph generative model that is a ) expressive enough to capture heterophily , b ) produces nonnegative embeddings , which allow link predictions to be interpreted in terms of communities , and c ) optimizes effectively on realworld graphs with gradient descent on a cross-entropy loss . Our theoretical results demonstrate the expressiveness of our model in its ability to exactly reconstruct a graph using a number of clusters that is linear in the maximum degree , along with its ability to capture both heterophily and homophily in the data . Further , our experiments demonstrate the effectiveness of our model for a variety of important application tasks such as multi-label clustering and link prediction . 1 INTRODUCTION . Graphs naturally arise in data from a variety of fields including sociology ( Mason & Verwoerd , 2007 ) , biology ( Scott , 1988 ) , and computer networking ( Bonato , 2004 ) . A key underlying task in machine learning for graph data is forming models of graphs which can predict edges between nodes , form useful representations of nodes , and reveal interpretable structure in the graph , such as detecting clusters of nodes . Many graph models fall under the framework of edge-independent graph generative models , which can output the probabilities of edges existing between any pair of nodes . The parameters of such models can be trained iteratively on the network , or some fraction of the network which is known , in the link prediction task , e.g. , by minimizing a cross-entropy loss . To choose among these models , one must consider whether the model is capable of expressing structures of interest in the graph , as well as the interpretability of the model . Expressiveness As real-world graphs are high-dimensional objects , graph models generally compress information about the graph . Such models are exemplified by the family of dot product models , which associate each node with a real-valued “ embedding ” vector ; the predicted probability of the link between two nodes increases with the dot product of their embedding vectors . These models can alternatively be seen as factorizing the adjacency matrix of the graph in terms of a low-rank matrix . Recent work ( Seshadhri et al. , 2020 ) has shown that dot product models are limited in their ability to model common structures in real-world graphs , such as triangles incident only on low-degree nodes . In response , Chanpuriya et al . ( 2020 ) showed that with the logistic PCA ( LPCA ) model , which has two embeddings per node ( i.e . using the dot product of the “ left ” embedding of one node and the “ right ” embedding of another ) , not only can such structures be represented , but further , any graph can be exactly represented with embedding vectors whose lengths are linear in the maximum degree of the graph . Peysakhovich & Bottou ( 2021 ) show that the limitations of the single-embedding model , which are overcome by having two embeddings , stem from only being able to represent adjacency matrices which are positive semi-definite , which prevents them from representing heterophilous structures in graphs ; heterophilous structures are those wherein dissimilar nodes are linked . Heterophily : Motivating example To demonstrate how heterophily can manifest in networks , as well as how models which assume homophily can fail to represent such networks , we provide a simple synthetic example . Suppose a recruiting website allows its members to contact each other ; we construct a graph of these members , with an edge indicating that two members have been in contact . Members are either recruiters or non-recruiters , and each member comes from one of ten locations ( e.g. , a city ) . Members from the same location are likely to contact each other ; this typifies homophily , wherein links occur between similar nodes . Furthermore , recruiters are unlikely to contact other recruiters , and non-recruiters are unlikely to contact other non-recruiters ; this typifies heterophily . Figure 1 shows an instantiation of such an adjacency matrix with 1000 nodes , which are randomly assigned to one of the ten locations and one of recruiter / non-recruiter . We recreate this network with our embedding model and the BIGCLAM algorithm of Yang & Leskovec ( 2013 ) , which explicitly assumes homophily . We also compare with the best low-rank approximation to the adjacency matrix in terms of Frobenius error ; this is the SVD of the matrix , discarding all but the top singular values . In Figure 1 , we show how BIGCLAM captures only the ten communities based on location , i.e. , only the homophilous structure , and fails to capture the heterophilous distinction between recruiters and non-recruiters . We also plot the error of the reconstructions as the embedding length increases . There are 10 · 2 = 20 different kinds of nodes , meaning the expected adjacency matrix is rank-20 , and our model maintains the lowest error up to this embedding length ; by contrast , BIGCLAM is unable to decrease error after capturing location information with length-10 embeddings . Interpretability Beyond being able to capture a given network accurately , it is often desirable for a graph model to form interpretable representations of nodes and to produce edge probabilities in an interpretable fashion . Dot product models can achieve this by restricting the node embeddings to be nonnegative . Nonnegative factorization has long been used to decompose data into parts ( Donoho & Stodden , 2003 ) . In the context of graphs , this entails decomposing the set of nodes of the network into clusters or communities . In particular , each entry of the nonnegative embedding vector of a node represents the intensity with which the node participates in a community . Note that this allows the edge probabilities output by dot product models to be interpretable in terms of coparticipation in communities . Depending on the model , these vectors may have restrictions such as a sum-to-one requirement , meaning the node is assigned a categorical distribution over communities . The least restrictive and most expressive case is that of soft assignments to overlapping communities , where the entries can vary totally independently . In models for this case , the output of the dot product is often mapped through a nonlinear link function to produce a probability , i.e . to ensure the value lies in [ 0 , 1 ] . This link function ideally also facilitates straightforward interpretation . We propose the first edge-independent graph generative model that is a ) expressive enough to capture heterophily , b ) interpretable in that it produces nonnegative embeddings , and c ) optimizes effectively on real-world graphs with gradient descent on a cross-entropy loss . Summary of main contributions The key contributions of this work are as follows : • We introduce a graph generative model , based on nonnegative matrix factorization , which is able to represent both heterophily and overlapping communities . Our model outputs link probabilities which are interpretable in terms of the communities it detects . • We provide a scheme for initialization of the nonnegative factors using the arbitrary real factors generated by logistic PCA . We show theoretically how a graph which is represented exactly by LPCA can also be represented exactly by our model . • We show theoretically that , with a small number of communities , our model can exactly represent a natural class of graphs which exhibits both heterophily and overlapping communities . • In experiments , we show that our algorithm is competitive on real-world graphs in terms of representing the network , doing link prediction , and producing communities which align with ground-truth . 2 GRAPH GENERATIVE MODEL . Consider the set of undirected , unweighted graphs on n nodes , i.e. , the set of graphs with symmetric adjacency matrices in { 0 , 1 } n×n . We propose an edge-independent , generative model for such graphs . Given a diagonal matrixW ∈ Rk×k and a matrix V ∈ [ 0 , 1 ] n×k , we set the probability of an edge existing between nodes i and j to be the ( i , j ) -th entry of matrix à : à : = σ ( V > WV ) , ( 1 ) where σ is the logistic function . k represents the number of clusters ; intuitively , if vi ∈ Rk is the i-th row of matrix V , then vi is soft assignment of node i to the k communities . W can be viewed as a cluster affinity matrix . An equivalent alternative formulation is Ãi , j = σ ( viWv > j ) . ( 2 ) Interpretation The edge probabilities output by this model have an intuitive interpretation , and to maximize interpretability , we focus on the case where W is diagonal . Recall that there is a one-to-one-to-one relationship between probability p ∈ [ 0 , 1 ] , odds o = p1−p ∈ [ 0 , ∞ ) , and logit ` = log ( o ) ∈ ( −∞ , +∞ ) . The logit of the link probability between nodes i and j is v > i Wvj , which is a summation of terms vicvjcWcc over all communities c ∈ [ k ] . If the nodes both fully participate in community c , that is , vic = vjc = 1 , then the edge logit is changed by Wcc starting from a baseline of 0 , or equivalently the odds of an edge is multiplied by exp ( Wcc ) starting from a baseline odds of 1 ; if either of the nodes participates only partially in community c , then the change in logit and odds is accordingly prorated . Homophily and heterophily also have a clear interpretaion in this model : homophilous communities are those withWcc > 0 , where two nodes both participating in the community increases the odds of a link , whereas communities withWcc < 0 are heterophilous , and coparticipation decreases the odds of a link . 3 RELATED WORK . Node clustering There is extensive prior work on the node clustering problem ( Schaeffer , 2007 ; Aggarwal & Wang , 2010 ; Nascimento & De Carvalho , 2011 ) , perhaps the most well-known being the normalized cuts algorithm of Shi & Malik ( 2000 ) , which produces a clustering based on the entrywise signs of an eigenvector of the graph Laplacian matrix . However , the clustering algorithms which are most relevant to our work are those based on non-negative matrix factorization ( NMF ) ( Lee & Seung , 1999 ; Berry et al. , 2007 ; Wang & Zhang , 2012 ; Gillis , 2020 ) . One such algorithm is that of Yu et al . ( 2005 ) , which approximately factors a graph ’ s adjacency matrix A ∈ { 0 , 1 } n×n into two positive matrices H and Λ , where H ∈ Rn×k+ is left-stochastic ( i.e . each of its columns sums to 1 ) and Λ ∈ Rk×k+ is diagonal , such that HΛH > ≈ A . Here H represents a soft clustering of the n nodes into k clusters , while the diagonal entries of Λ represent the prevalence of edges within clusters . Note the similarity of the factorization to our model , save for the lack of a nonlinearity . Other NMF approaches include those of Ding et al . ( 2008 ) , Yang et al . ( 2012 ) , Kuang et al . ( 2012 ) , and Kuang et al . ( 2015 ) ( SYMNMF ) . Modeling heterophily Much of the existing work on graph models has an underlying assumption of network homophily ( Newman , 2002 ; Johnson et al. , 2010 ; Noldus & Van Mieghem , 2015 ) . There has been significant recent interest in the limitations of graph neural network ( GNN ) models ( Duvenaud et al. , 2015 ; Li et al. , 2016 ; Kipf & Welling , 2017 ; Hamilton et al. , 2017 ) at addressing network heterophily ( Nt & Maehara , 2019 ; Zhu et al. , 2020 ) , as well as proposed solutions ( Pei et al. , 2020 ; Zhu et al. , 2021 ; Yan et al. , 2021 ) , but relatively less work for more fundamental models such as those for clustering . Some existing NMF approaches to clustering do naturally model heterophilous structure in networks . The model of Nourbakhsh et al . ( 2014 ) , for example , is similar to that of Yu et al . ( 2005 ) , but allows the cluster affinity matrix Λ to be non-diagonal ; this allows for inter-cluster edge affinity to exceed intra-cluster edge affinity , so heterophily can arise in this model , though it is not a focus of their work . Further , the model of Miller et al . ( 2009 ) is similar to ours and also allows for heterophily , though it restricts the cluster assignment matrix V to be binary ; additionally , their training algorithm is not based on gradient descent as ours is , and it does not scale to large networks . More recently , Peysakhovich & Bottou ( 2021 ) propose a decomposition of the form A ≈ D + BB > − CC > , where D ∈ Rn×n is diagonal and B , C ∈ Rn×k are low-rank ; the authors discuss how , interestingly , this model separates the homophilous and heterophilous structure into different factors , namelyB andC . However , this work does not pursue a clustering interpretation or investigate setting the factorsB andC to be nonnegative . One stage of our training algorithm uses a similar decomposition , though it includes the nonnegativity constraint ; this is detailed in Section 4 . Overlapping clustering Many models discussed above focus on the single-label clustering task . We are interested in the closely-related but distinct task of multi-label clustering , also known as overlapping community detection ( Xie et al. , 2013 ; Javed et al. , 2018 ) . The BIGCLAM algorithm of Yang & Leskovec ( 2013 ) uses the following generative model for this task : the probability of a link between two nodes i and j is given by 1 − exp ( −fi · fj ) , where fi , fj ∈ Rk+ represent the intensities with which the nodes participate in each of the k communities . This model allows for intersections of communities to be especially dense with edges , which the authors generally observe in real-world networks ; by contrast , they claim that prior state-of-the-art approaches , including ones based on clustering links ( Ahn et al. , 2010 ) and clique detection ( Palla et al. , 2005 ) , as well as a mixed-membership variant ( Airoldi et al. , 2008 ) of the stochastic block model ( Holland et al. , 1983 ) , implicitly assume that intersections are sparse . BIGCLAM assumes strict homophily of the communities , whereas our model allows for both homophily and heterophily . Additionally , unlike in our model , there is no upper bound to the intensities of community participation ( i.e . the entries of each f ) , so it is unclear how to incorporate prior knowledge about community membership in the form of binary labels , as in a semi-supervised situation . The approach of Zhang & Yeung ( 2012 ) is more similar to ours and more amenable to such prior information in that community assignments are bounded ; specifically , the model is similar to those of Yu et al . ( 2005 ) and Nourbakhsh et al . ( 2014 ) , but allows the cluster assignment matrix H to be an arbitrary matrix of probabilities rather left-stochastic . However , unlike our model and BIGCLAM , these models lack a nonlinear linking function ; recent work outside clustering and community detection on graph generative models ( Rendsburg et al. , 2020 ; Chanpuriya et al. , 2020 ) suggests that the addition of a nonlinear linking function , specifically softmax and logistic nonlinearities as in our model , can make matrix factorization-based graph models more expressive . Lastly , a recent approach is the VGRAPH model of Sun et al . ( 2019 ) , which also lacks a final nonlinear linking function , but , interestingly , has an intermediate linking function : the matrix factors ( i.e . the cluster assignment matrices ) themselves are a product of learned embeddings for the nodes and communities , put through a softmax linking function . Their algorithm ultimately determines overlapping communities as in link clustering approaches , and they find that it generally achieves state-of-the-art results in matching ground-truth communities ; as discussed in Section 6.2 , we find that our algorithm ’ s performance on this task compares favorably to VGRAPH .
This article deals with the task of community detection in the case of mixed membership networks, where a node can have multiple comunity assignments at once. It has been notice that in real-world networks, community overlaps tend to be much denser than the rest of the graph, which is a challenge to usual models (such as the stochastic block model). The authors introduce a new mixed-membership graph model, where the expected adjacency matrix has the form $$ \bar A = \sigma( V W V^\top), $$ with $\sigma$ the logistic function. In this model, the matrix $V$ represents the soft community assignments, and $W$ the inter-community similarities. The negative entries of $W$ allow this model to represent the heterophily of the network, wherein vertices are less likely to be connected when they belong to the same community. They provide a learning algorithm to approximate $V$ and $W$ given the adjacency matrix $A$ of a graph, and show some existence results about such approximations. In a second part, the authors provide several numerical experiments on real-world datasets, studying both the reconstruction of the matrix $\bar A$ and of the community membership matrix $V$. They show that, in the chosen datasets, their algorithm outperforms or equals several others in the litterature.
SP:e617ea828dc7662fa494799aac7136580ca492f0
Robust Deep Neural Networks for Heterogeneous Tabular Data
1 INTRODUCTION . Tabular data is the most commonly used form of data , and it is ubiquitous in various applications , such as medical diagnosis based on patient history ( Fatima et al. , 2017 ) , predictive analytics for financial applications ( Dastile et al. , 2020 ) , cybersecurity ( Buczak & Guven , 2015 ) , and so forth . Although DNNs perform outstandingly well on homogeneous data , e.g. , visual , audio , and textual data ( Goodfellow et al. , 2016 ) , heterogeneous , tabular data still pose a challenge to these models ( Shwartz-Ziv & Armon , 2021 ) . We hypothesize that the moderate performance of DNNs on tabular data comes from two major factors . The first is the inductive bias ( es ) ( Katzir et al. , 2020 ) ; for example , DNNs assume that certain spatial structures are present in the data ( Mitchell et al. , 2017 ) , whereas tabular data do not have any spatial connections . The second reason is the high information loss during the data preprocessing step since tabular input data need to undergo cleansing ( dealing with missing , noisy , and inconsistent values ) , uniform discretized representation ( handling categorical and continuous values together ) , and scaling ( standardized representation of features ) steps . Along with these feature-processing steps , important information contained in the data may get lost , and , hence , the preprocessed feature vectors ( especially when one-hot encoded ) may negatively impact training and learning effectiveness ( García et al. , 2015 ) . As reported by Hancock & Khoshgoftaar ( 2020 ) , an efficient transformation of heterogeneous data for training DNNs is still a significant challenge . Typically , when heterogeneous tabular data are involved , the first choice across all machine learning ( ML ) algorithms are ensemble models based on decision trees ( Nielsen , 2016 ) , such as random forests ( RF ) ( Breiman , 2001 ) or gradient-boosted decision trees ( GBDT ) ( Friedman , 2002 ) . Since the inductive bias ( es ) of the methods based on decision trees are well suited to non-spatial heterogeneous data , the data preprocessing step is reduced to a minimum . In particular , the most common implementations of the GBDT algorithm—XGBoost ( Chen & Guestrin , 2016 ) , LightGBM ( Ke et al. , 2017 ) , and CatBoost ( Prokhorenkova et al. , 2018 ) — handle the missing values internally by searching for the best approximation of missing data points . However , the most significant computational disadvantage of the decision tree–based methods is while training the need to store ( almost ) the entire dataset in memory ( Katzir et al. , 2020 ) . Furthermore , in the multimodal datasets in which different data types are involved ( e.g. , visual and tabular data ) , decision tree–based models are not able to provide state-of-the-art results , whereas DNN models allow for batch-learning ( no need to store the whole dataset ) , and for those multimodal data tasks , DNNs demonstrate state-of-the-art performance ( Gu & Budhkar , 2021 ) . Towards the goal of significantly boosting DNNs on tabular data , we propose DeepTLF , a novel deep tabular learning framework that exploits the advantages of the GBDT algorithm as well as the flexibility of DNNs . The key element of the framework is a novel encoding algorithm , TreeDrivenEncoder , which transforms the heterogeneous tabular data into homogeneous data by distilling knowledge from nodes of trained decision trees . Thus , DeepTLF can preserve most of the information that is contained in the original data and encoded in the structure of the decision trees and benefit from preprocessing power of decision tree-based algorithms . Through experiments on various freely available real-world datasets , we demonstrate the advantages of such a composite learning approach for different prediction tasks . We argue that by transforming heterogeneous tabular data into homogeneous vectors , we can drastically improve the performance of DNNs on tabular data . The main contributions of this work are : ( I ) We propose a deep tabular learning framework - DeepTLF that combines the preprocessing strengths of GBDTs with the learning flexibility of DNNs . ( II ) The proposed framework builds on a generic approach for transforming heterogeneous tabular data into homogeneous vectors using the structure of decision trees from a gradient boosting model using a novel encoding function – TreeDrivenEncoder . Hence , the transformation approach can also be used independently from the presented deep learning framework . ( III ) In extensive experiments on various datasets and compared with state-of-the-art ML approaches , we show that the proposed framework mitigates well-known data-processing challenges and leads to unprecedented predictive performance , outperforming all the competitors . ( IV ) We provide an open-source implementation of DeepTLF https : //github.com/xxxx/DeepTLF 2 RELATED WORK . In this section , we briefly review the main ideas from prior work that are relevant to our framework and data encoding step . We provide more information on the state-of-the-art DL approaches for tabular data in the Appendix B . Independent works Moosmann et al . ( 2007 ) ; Geurts et al . ( 2006 ) demonstrate that data can be encoded using the RF algorithm by accessing leaf indices in the decision trees . The idea was also utilized by ( He et al. , 2014 ) , where instead of the RF model , trees from a GBDT model are used for the categorical data encoding . These works demonstrates that the decision trees are a powerful and convenient way to implement non-linear and categorical feature transformations for heterogeneous data . The DeepGBM framework Ke et al . ( 2019 ) further evolved the idea of distilling knowledge from decision trees leaf index by encoding them using a neural network for online learning tasks . This approach is quite popular , but the leaf indices ’ from a decision tree embedding do not fully represent the whole decision tree structure . Thus , each boosted tree is treated as a new meta categorical feature , which might be an issue for the DNNs ( Hancock & Khoshgoftaar , 2020 ) . In contrast to related methods , our aim is to holistically distill the information from decision trees , by utilizes the whole decision tree , not only the output leafs . The DeepTLF combines the advantages of GBDT ( such as handling missing values , categorical variables ) with the learning flexibility of DNNs to achieve superior and robust prediction performance . Also , Medvedev & D ’ yakonov ( 2020 ) demonstrated that a DNN which was trained using distilled data can outperform models trained on the whole original data . Other approaches such as NODE ( Popov et al. , 2019 ) , Net-DNF ( Katzir et al. , 2020 ) try to mimic the decision trees using DNNs . A difference to our framework is that DeepTLF is more robust to the data inconsistencies and does not require new DNN architectures , hence , it is straightforward to use . 3 DEEPTLF : DEEP TABULAR LEARNING FRAMEWORK . In this section , we present the main components of our DeepTLF framework . As shown in Fig . 1 , DeepTLF consists of three major components : ( 1 ) an ensemble of decision trees ( in this work , we utilize the GBDT algorithm ) , ( 2 ) a TreeDrivenEncoder that performs the transformation of the original data into homogeneous , binary feature vectors by distilling the information contained in the structures of the decision trees through the TreeDrivenEncoder algorithm , and ( 3 ) a deep neural network model trained on the binary feature vectors obtained from the TreeDrivenEncoder algorithm . We will describe the details of each component in the following subsections . 3.1 GRADIENT BOOSTED DECISION TREE . For the data encoding step , we selected one of the most powerful algorithms on tabular data , namely the gradient boosted Decision Trees ( GBDT ) algorithm ( Friedman , 2002 ) . GBDT is a well-known and widely used ensemble algorithm for tabular data both in research and industrial applications ( Chen & Guestrin , 2016 ) and is particularly successful for tasks containing heterogeneous features , small dataset sizes , and `` noisy '' data ( Nielsen , 2016 ) . Especially when it comes to handling variance and bias , gradient boosting ensembles show highly competitive performance in comparison with state-ofthe-art learning approaches ( Friedman , 2002 ; Nielsen , 2016 ) . In addition , multiple evaluations have empirically demonstrated that the decision trees of a GBDT ensemble preserve the information from the original data and can be used for further data processing ( He et al. , 2014 ; Ke et al. , 2019 ) . The key idea of the GBDT algorithm is to construct a strong model by iterative addition of weak learners . Formally , at each iteration k of the gradient boosting algorithm , the GBDT model ϕ can be defined as : ϕk ( x ) = ϕk−1 ( x ) + λhk ( x ) , ( 1 ) where x is an input feature vector , ϕk−1 is the strong model constructed at the previous iteration , h is a weak learner from a family of functionsH , and λ is the learning rate . hk = argmin h∈H ∑ i ( −∂L ( ϕ k−1 ( xi ) , yi ) ∂ϕk−1 ( xi ) − h ( xi ) ) 2 . ( 2 ) More specifically , a pseudo-residual −∂L ( ϕ k−1 ( xi ) , yi ) ∂ϕk−1 ( xi ) should be approximated as well as possible by the current weak model h ( xi ) . The gradient w.r.t . the current predictions indicate how these predictions should be changed in order to minimize the loss function . Informally , gradient boosting can be thought of as performing gradient descent in the functional space . The set of weak learnersH is usually formed by shallow decision trees , which are directly trained on the original data . Consequently , almost no data preparation is needed , and the information loss is minimized . We denote a GBDT model as a set of decision trees : GB ( X , y ) = { T1 , T2 , ... , Tk } , where X is a matrix of observations , y is a vector or matrix of labels . 3.2 KNOWLEDGE DISTILLATION FROM GRADIENT BOOSTED DECISION TREES USING TREEDRIVENENCODER . The trained GBDT model provides structural data information , which also encodes dependencies between the input features with respect to the prediction task . In order to distill the knowledge from a tree-based model , we propose a novel data transformation algorithm – TreeDrivenEncoder . For every input vector from the original data , the proposed encoding method maps all features occurring in the decision trees of the GBDT ensemble to a binary feature vector xb . This has the advantage that the neural network in the final component can form its own feature representations from homogeneous data . In Fig . 2 , we illustrate the transformation obtained by applying the TreeDrivenEncoder algorithm on a toy example . There we have two input feature vectors x1 and x2 with categorical and numerical values are encoded into corresponding homogeneous binary feature vectors xb1 and x b 2 . To formally describe the TreeDrivenEncoder algorithm , we first need a definition of the decision trees : Definition 1 ( Decision Tree ) Let T be a structure T = ( V , E , µ ) , where V is a set of nodes , E ⊆ V × V is a set of edges and µ = ( µv ) v∈V is a sequence of mapping functions µv : Rd → V ∪ { ∅ } that map input vectors to ( child ) nodes . We call T a ( binary ) decision tree if it satisfies the following properties : 1 . ( V , E ) is a directed acyclic graph 2 . There is exactly one designated node vr ∈ V , called the root , which has no entering edges , i.e . for a node v ∈ V : v = vr ⇔ ∀w ∈ V : ( w , v ) 6∈ E. 3 . Every node v ∈ V \ { vr } has exactly one entering edge with the parent node at its other end : w ∈ V : ( w , v ) ∈ E ⇔ w = parent ( v ) . 4 . Each node has either two or zero outgoing edges . We call the nodes with two outgoing edges inner nodes and all others nodes leaves . We denote the sets of inner nodes and leaves with VI and VL , respectively . 5. µv maps feature vectors from inner nodes to their child nodes and from leaves to ∅ . v ∈ VI ⇒ ∀x ∈ Rd : ( v , µv ( x ) ) ∈ E , ( 3 ) v ∈ VL ⇒ ∀x ∈ Rd : µv ( x ) = ∅ . ( 4 ) In the following , we denote the number of inner nodes as |T | = |VI | . Furthermore , we assume that the child nodes can be identified as left or right child . For each inner node v ∈ VI , we use a modified mapping function µ̃v : Rd → { 0 , 1 } ( i.e. , a Boolean function ) where 0 encodes the left child and 1 encodes the right child . For an input vector x ∈ Rd , we exploit the structure of T to derive a binary vector of length |T | . To this end , as shown in Alg . 1 , we employ a breadth-first-search approach on the nodes of T . More specifically , for every feature that is evaluated at an inner node v of T , we retrieve the corresponding value from x and evaluate that value at v based on the associated Boolean function . Note that other node visiting strategies ( e.g. , depth-first search ) can be used as well . It is only important that the same strategy is used across all decision trees and vectors . Finally , we concatenate all the vectors generated from the single decision trees of the ensemble T on the input vector x , which gives us the final binary representation xb of x . We kindly ask the Reader to refer to the supplementary materials - we summarize the full algorithm in Alg . 1 , For mathematical completeness , the mapping obtained by applying TreeDrivenEncoder is formalized as follows . Given the feature vector x that represents an instance from the training dataset D and a trained decision tree ensemble T ( i.e. , a collection of decision trees ) on the same dataset , we exploit the structure of each tree T ∈ T to produce a binary feature vector for the original feature vector x = ( x1 , ... , xd ) and employ a transformation function : mapT : Rd → { 0 , 1 } |T | , ( 5 ) mapT : x 7→ ( µ̃v ( x ) ) v∈VI , ( 6 ) where VI again represents the inner nodes in a well-defined order and |T | their number . The mapping is performed such that at an inner node v of T , the corresponding component xj of x is mapped to 1 if the Boolean function at v evaluates to true for xj and 0 otherwise . Note that we apply the transformation function to each node in the decision tree T , even if a node does not belong to the decision path of x , hence , it holds that mapT ( x ) ∈ { 0 , 1 } |T | . For the multiple decision trees T1 , ... , Tk we construct a function TreeDrivenEncoder : Rd → { 0 , 1 } ∑k i=1 |Ti| ( 7 ) with TreeDrivenEncoder ( x ) = ( mapT1 ( x ) ... mapTk ( x ) ) ( 8 )
This paper proposes DeepTLF, a new framework for prediction tasks using tabular data. DeepTLF first trains gradient boosted decision trees (GBDT) using the entire tabular training samples. Then it uses node values as the input the neural network predictor (e.g. classifier or regressor) for the actual prediction phase. In essence, the authors rely on GBDT's capability to handle heterogeneous tabular data with potentially many missing values to derive a binary representation of the given sample, and feed that representation to a downstream neural network. DeepTLF was able to demonstrate superior performance in real-world tabular datasets.
SP:0e00204408c0655e6f5a5c5823a0df36fe72b871
Robust Deep Neural Networks for Heterogeneous Tabular Data
1 INTRODUCTION . Tabular data is the most commonly used form of data , and it is ubiquitous in various applications , such as medical diagnosis based on patient history ( Fatima et al. , 2017 ) , predictive analytics for financial applications ( Dastile et al. , 2020 ) , cybersecurity ( Buczak & Guven , 2015 ) , and so forth . Although DNNs perform outstandingly well on homogeneous data , e.g. , visual , audio , and textual data ( Goodfellow et al. , 2016 ) , heterogeneous , tabular data still pose a challenge to these models ( Shwartz-Ziv & Armon , 2021 ) . We hypothesize that the moderate performance of DNNs on tabular data comes from two major factors . The first is the inductive bias ( es ) ( Katzir et al. , 2020 ) ; for example , DNNs assume that certain spatial structures are present in the data ( Mitchell et al. , 2017 ) , whereas tabular data do not have any spatial connections . The second reason is the high information loss during the data preprocessing step since tabular input data need to undergo cleansing ( dealing with missing , noisy , and inconsistent values ) , uniform discretized representation ( handling categorical and continuous values together ) , and scaling ( standardized representation of features ) steps . Along with these feature-processing steps , important information contained in the data may get lost , and , hence , the preprocessed feature vectors ( especially when one-hot encoded ) may negatively impact training and learning effectiveness ( García et al. , 2015 ) . As reported by Hancock & Khoshgoftaar ( 2020 ) , an efficient transformation of heterogeneous data for training DNNs is still a significant challenge . Typically , when heterogeneous tabular data are involved , the first choice across all machine learning ( ML ) algorithms are ensemble models based on decision trees ( Nielsen , 2016 ) , such as random forests ( RF ) ( Breiman , 2001 ) or gradient-boosted decision trees ( GBDT ) ( Friedman , 2002 ) . Since the inductive bias ( es ) of the methods based on decision trees are well suited to non-spatial heterogeneous data , the data preprocessing step is reduced to a minimum . In particular , the most common implementations of the GBDT algorithm—XGBoost ( Chen & Guestrin , 2016 ) , LightGBM ( Ke et al. , 2017 ) , and CatBoost ( Prokhorenkova et al. , 2018 ) — handle the missing values internally by searching for the best approximation of missing data points . However , the most significant computational disadvantage of the decision tree–based methods is while training the need to store ( almost ) the entire dataset in memory ( Katzir et al. , 2020 ) . Furthermore , in the multimodal datasets in which different data types are involved ( e.g. , visual and tabular data ) , decision tree–based models are not able to provide state-of-the-art results , whereas DNN models allow for batch-learning ( no need to store the whole dataset ) , and for those multimodal data tasks , DNNs demonstrate state-of-the-art performance ( Gu & Budhkar , 2021 ) . Towards the goal of significantly boosting DNNs on tabular data , we propose DeepTLF , a novel deep tabular learning framework that exploits the advantages of the GBDT algorithm as well as the flexibility of DNNs . The key element of the framework is a novel encoding algorithm , TreeDrivenEncoder , which transforms the heterogeneous tabular data into homogeneous data by distilling knowledge from nodes of trained decision trees . Thus , DeepTLF can preserve most of the information that is contained in the original data and encoded in the structure of the decision trees and benefit from preprocessing power of decision tree-based algorithms . Through experiments on various freely available real-world datasets , we demonstrate the advantages of such a composite learning approach for different prediction tasks . We argue that by transforming heterogeneous tabular data into homogeneous vectors , we can drastically improve the performance of DNNs on tabular data . The main contributions of this work are : ( I ) We propose a deep tabular learning framework - DeepTLF that combines the preprocessing strengths of GBDTs with the learning flexibility of DNNs . ( II ) The proposed framework builds on a generic approach for transforming heterogeneous tabular data into homogeneous vectors using the structure of decision trees from a gradient boosting model using a novel encoding function – TreeDrivenEncoder . Hence , the transformation approach can also be used independently from the presented deep learning framework . ( III ) In extensive experiments on various datasets and compared with state-of-the-art ML approaches , we show that the proposed framework mitigates well-known data-processing challenges and leads to unprecedented predictive performance , outperforming all the competitors . ( IV ) We provide an open-source implementation of DeepTLF https : //github.com/xxxx/DeepTLF 2 RELATED WORK . In this section , we briefly review the main ideas from prior work that are relevant to our framework and data encoding step . We provide more information on the state-of-the-art DL approaches for tabular data in the Appendix B . Independent works Moosmann et al . ( 2007 ) ; Geurts et al . ( 2006 ) demonstrate that data can be encoded using the RF algorithm by accessing leaf indices in the decision trees . The idea was also utilized by ( He et al. , 2014 ) , where instead of the RF model , trees from a GBDT model are used for the categorical data encoding . These works demonstrates that the decision trees are a powerful and convenient way to implement non-linear and categorical feature transformations for heterogeneous data . The DeepGBM framework Ke et al . ( 2019 ) further evolved the idea of distilling knowledge from decision trees leaf index by encoding them using a neural network for online learning tasks . This approach is quite popular , but the leaf indices ’ from a decision tree embedding do not fully represent the whole decision tree structure . Thus , each boosted tree is treated as a new meta categorical feature , which might be an issue for the DNNs ( Hancock & Khoshgoftaar , 2020 ) . In contrast to related methods , our aim is to holistically distill the information from decision trees , by utilizes the whole decision tree , not only the output leafs . The DeepTLF combines the advantages of GBDT ( such as handling missing values , categorical variables ) with the learning flexibility of DNNs to achieve superior and robust prediction performance . Also , Medvedev & D ’ yakonov ( 2020 ) demonstrated that a DNN which was trained using distilled data can outperform models trained on the whole original data . Other approaches such as NODE ( Popov et al. , 2019 ) , Net-DNF ( Katzir et al. , 2020 ) try to mimic the decision trees using DNNs . A difference to our framework is that DeepTLF is more robust to the data inconsistencies and does not require new DNN architectures , hence , it is straightforward to use . 3 DEEPTLF : DEEP TABULAR LEARNING FRAMEWORK . In this section , we present the main components of our DeepTLF framework . As shown in Fig . 1 , DeepTLF consists of three major components : ( 1 ) an ensemble of decision trees ( in this work , we utilize the GBDT algorithm ) , ( 2 ) a TreeDrivenEncoder that performs the transformation of the original data into homogeneous , binary feature vectors by distilling the information contained in the structures of the decision trees through the TreeDrivenEncoder algorithm , and ( 3 ) a deep neural network model trained on the binary feature vectors obtained from the TreeDrivenEncoder algorithm . We will describe the details of each component in the following subsections . 3.1 GRADIENT BOOSTED DECISION TREE . For the data encoding step , we selected one of the most powerful algorithms on tabular data , namely the gradient boosted Decision Trees ( GBDT ) algorithm ( Friedman , 2002 ) . GBDT is a well-known and widely used ensemble algorithm for tabular data both in research and industrial applications ( Chen & Guestrin , 2016 ) and is particularly successful for tasks containing heterogeneous features , small dataset sizes , and `` noisy '' data ( Nielsen , 2016 ) . Especially when it comes to handling variance and bias , gradient boosting ensembles show highly competitive performance in comparison with state-ofthe-art learning approaches ( Friedman , 2002 ; Nielsen , 2016 ) . In addition , multiple evaluations have empirically demonstrated that the decision trees of a GBDT ensemble preserve the information from the original data and can be used for further data processing ( He et al. , 2014 ; Ke et al. , 2019 ) . The key idea of the GBDT algorithm is to construct a strong model by iterative addition of weak learners . Formally , at each iteration k of the gradient boosting algorithm , the GBDT model ϕ can be defined as : ϕk ( x ) = ϕk−1 ( x ) + λhk ( x ) , ( 1 ) where x is an input feature vector , ϕk−1 is the strong model constructed at the previous iteration , h is a weak learner from a family of functionsH , and λ is the learning rate . hk = argmin h∈H ∑ i ( −∂L ( ϕ k−1 ( xi ) , yi ) ∂ϕk−1 ( xi ) − h ( xi ) ) 2 . ( 2 ) More specifically , a pseudo-residual −∂L ( ϕ k−1 ( xi ) , yi ) ∂ϕk−1 ( xi ) should be approximated as well as possible by the current weak model h ( xi ) . The gradient w.r.t . the current predictions indicate how these predictions should be changed in order to minimize the loss function . Informally , gradient boosting can be thought of as performing gradient descent in the functional space . The set of weak learnersH is usually formed by shallow decision trees , which are directly trained on the original data . Consequently , almost no data preparation is needed , and the information loss is minimized . We denote a GBDT model as a set of decision trees : GB ( X , y ) = { T1 , T2 , ... , Tk } , where X is a matrix of observations , y is a vector or matrix of labels . 3.2 KNOWLEDGE DISTILLATION FROM GRADIENT BOOSTED DECISION TREES USING TREEDRIVENENCODER . The trained GBDT model provides structural data information , which also encodes dependencies between the input features with respect to the prediction task . In order to distill the knowledge from a tree-based model , we propose a novel data transformation algorithm – TreeDrivenEncoder . For every input vector from the original data , the proposed encoding method maps all features occurring in the decision trees of the GBDT ensemble to a binary feature vector xb . This has the advantage that the neural network in the final component can form its own feature representations from homogeneous data . In Fig . 2 , we illustrate the transformation obtained by applying the TreeDrivenEncoder algorithm on a toy example . There we have two input feature vectors x1 and x2 with categorical and numerical values are encoded into corresponding homogeneous binary feature vectors xb1 and x b 2 . To formally describe the TreeDrivenEncoder algorithm , we first need a definition of the decision trees : Definition 1 ( Decision Tree ) Let T be a structure T = ( V , E , µ ) , where V is a set of nodes , E ⊆ V × V is a set of edges and µ = ( µv ) v∈V is a sequence of mapping functions µv : Rd → V ∪ { ∅ } that map input vectors to ( child ) nodes . We call T a ( binary ) decision tree if it satisfies the following properties : 1 . ( V , E ) is a directed acyclic graph 2 . There is exactly one designated node vr ∈ V , called the root , which has no entering edges , i.e . for a node v ∈ V : v = vr ⇔ ∀w ∈ V : ( w , v ) 6∈ E. 3 . Every node v ∈ V \ { vr } has exactly one entering edge with the parent node at its other end : w ∈ V : ( w , v ) ∈ E ⇔ w = parent ( v ) . 4 . Each node has either two or zero outgoing edges . We call the nodes with two outgoing edges inner nodes and all others nodes leaves . We denote the sets of inner nodes and leaves with VI and VL , respectively . 5. µv maps feature vectors from inner nodes to their child nodes and from leaves to ∅ . v ∈ VI ⇒ ∀x ∈ Rd : ( v , µv ( x ) ) ∈ E , ( 3 ) v ∈ VL ⇒ ∀x ∈ Rd : µv ( x ) = ∅ . ( 4 ) In the following , we denote the number of inner nodes as |T | = |VI | . Furthermore , we assume that the child nodes can be identified as left or right child . For each inner node v ∈ VI , we use a modified mapping function µ̃v : Rd → { 0 , 1 } ( i.e. , a Boolean function ) where 0 encodes the left child and 1 encodes the right child . For an input vector x ∈ Rd , we exploit the structure of T to derive a binary vector of length |T | . To this end , as shown in Alg . 1 , we employ a breadth-first-search approach on the nodes of T . More specifically , for every feature that is evaluated at an inner node v of T , we retrieve the corresponding value from x and evaluate that value at v based on the associated Boolean function . Note that other node visiting strategies ( e.g. , depth-first search ) can be used as well . It is only important that the same strategy is used across all decision trees and vectors . Finally , we concatenate all the vectors generated from the single decision trees of the ensemble T on the input vector x , which gives us the final binary representation xb of x . We kindly ask the Reader to refer to the supplementary materials - we summarize the full algorithm in Alg . 1 , For mathematical completeness , the mapping obtained by applying TreeDrivenEncoder is formalized as follows . Given the feature vector x that represents an instance from the training dataset D and a trained decision tree ensemble T ( i.e. , a collection of decision trees ) on the same dataset , we exploit the structure of each tree T ∈ T to produce a binary feature vector for the original feature vector x = ( x1 , ... , xd ) and employ a transformation function : mapT : Rd → { 0 , 1 } |T | , ( 5 ) mapT : x 7→ ( µ̃v ( x ) ) v∈VI , ( 6 ) where VI again represents the inner nodes in a well-defined order and |T | their number . The mapping is performed such that at an inner node v of T , the corresponding component xj of x is mapped to 1 if the Boolean function at v evaluates to true for xj and 0 otherwise . Note that we apply the transformation function to each node in the decision tree T , even if a node does not belong to the decision path of x , hence , it holds that mapT ( x ) ∈ { 0 , 1 } |T | . For the multiple decision trees T1 , ... , Tk we construct a function TreeDrivenEncoder : Rd → { 0 , 1 } ∑k i=1 |Ti| ( 7 ) with TreeDrivenEncoder ( x ) = ( mapT1 ( x ) ... mapTk ( x ) ) ( 8 )
For the problem of learning (supervised classification and regression) on tabular data, the authors propose to used the decision functions of tree based ensemble methods as input features for a deep neural network (DNN). Tabular data is typically heterogenous, that is the data come from different modalities (continuous, categorical, missing values). As decision trees are very well tailored to such data the authors show that with their method (DeepTLF) no further preprocessing or data cleansing is necessary (apart from what's being performed in the decision tree). On numerous experiments on 7 public tabular datasets, they show that their method outperforms different baseline and competitive approaches, thereby supporting the claim that the tree based input features preserve sufficiently rich information of the input data.
SP:0e00204408c0655e6f5a5c5823a0df36fe72b871
Training Meta-Surrogate Model for Transferable Adversarial Attack
1 INTRODUCTION . The developments of Convolutional Neural Network ( CNN ) ( LeCun et al. , 1995 ; Krizhevsky et al. , 2012 ) have greatly promoted the advancements in Computer Vision ( Ren et al. , 2016 ) . However , previous works ( Goodfellow et al. , 2014 ; Carlini & Wagner , 2017 ; Croce & Hein , 2020a ; Ganeshan et al. , 2019 ) have shown a critical robustness issue that CNN models are vulnerable to humanimperceptible perturbations of input images , also known as adversarial examples ( AEs ) . The design of AEs is useful for revealing the security threats on machine learning systems ( Croce & Hein , 2020b ) and for understanding the representations learned by CNN models ( Ilyas et al. , 2019 ) . In this paper , we consider the problem of black-box attack , where the target victim model is entirely hidden from the attacker . In this setting , standard white-box attacks ( Moosavi-Dezfooli et al. , 2016 ; Carlini & Wagner , 2017 ) or even query-based black-box attacks ( Ilyas et al. , 2018 ; Cheng et al. , 2018 ; 2020 ; 2019 ) can not be used , and the prevailing way to attack the victim is through transfer attack ( Papernot et al. , 2017 ; Wu et al. , 2018 ) . In transfer attack ( Demontis et al. , 2019 ; Dong et al. , 2018 ) , the attackers commonly generate AEs by attacking one or an ensemble of surrogate models and hope the obtained AEs can also successfully fool the victim black-box model . Although great efforts have been made to improve the transferability of adversarial attacks ( Tramèr et al. , 2017 ; Xie et al. , 2019 ; Wu et al. , 2020a ) , the transfer attack-based methods still encounter poor success rates , especially when attacking adversarially trained target models . This is caused by a fundamental limitation of current approaches—they all leverage the surrogate models trained by standard learning tasks ( e.g. , classification , object detection ) , while it is not always the case that attacks fooling such models can be easily transferred . We thus pose the following important question on transfer attack that has not been well studied in the literature : Instead of using standard ( naturally trained ) models as surrogate , can we artificially construct another Meta-Surrogate Model ( MSM ) such that attacks to this model can be easier transferred to other models ? We answer this question in the affirmative by developing a novel black-box attack pipeline called Meta-Transfer Attack ( MTA ) . Assume a set of source models ( standard surrogate models ) are given , instead of directly attacking these source models , our algorithm aims to obtain a “ meta-surrogate model ( MSM ) ” , which is designed in the way that attacks to this model can be easier transferred to fool other models , and conduct attacks on the MSM to obtain transferable AEs . We show that this goal can be mathematically formulated as a well-posed ( bi-level-like ) training objective by unrolling the attacks on the MSM and defining a loss to measure the transferability of the resulting AEs . To avoid discrete operations in the white-box attack , we propose a Customized PGD attacker that enables back-propagation through the whole procedure . With this bi-level-like optimization ( Finn et al. , 2017 ; Qin et al. , 2020 ) , the source models supervise the MSM to improve the transferability of the AEs created on it . Through extensive experiments on various models and datasets , we show that the proposed MTA method leads to significantly improved transfer attacks , demonstrating the effectiveness of the MSM . We summarize the main contributions of our work as follows . 1 ) We propose a novel MTA framework to train an MSM to improve the transferability of AEs . To the best of our knowledge , our work is the first attempt to explore a better surrogate model for producing stronger transferable AEs . 2 ) We compare MTA with state-of-the-art transfer attack methods ( e.g. , MI ( Dong et al. , 2018 ) , DI ( Xie et al. , 2019 ) , TI ( Dong et al. , 2019 ) , SGM ( Wu et al. , 2020a ) , AEG ( Bose et al. , 2020 ) , IR ( Wang et al. , 2021a ) , SI-NI ( Lin et al. , 2020 ) ) on Cifar-10 ( Krizhevsky et al. , 2009 ) and Imagenet ( Deng et al. , 2009 ) . The comparisons demonstrate the effectiveness of the proposed MTA—the AEs generated by attacking MSM significantly outperform previous methods , in attacking both naturally trained and adversarially trained black-box target models . 2 BACKGROUND . Adversarial attacks . Szegedy et al . ( 2014 ) reveals the interesting phenomenon that CNN models are vunerable to adversarial attacks . After that , many attacks have been developed ( Gao et al. , 2020 ; Zhou et al. , 2018 ; Wu et al. , 2020b ; Li et al. , 2020b ; Kaidi et al. , 2019 ; Sriramanan et al. , 2020 ) . Adversarial attacks can be mainly classified into white-box and black-box attacks ( Maksym et al. , 2020 ) according to how much information about the target model is exposed to the attacker . Whitebox attacks ( Kurakin et al. , 2016 ) are often more effective than than black-box attacks ( Brendel et al. , 2017 ; Cheng et al. , 2018 ; 2020 ) as they can leverage full knowledge of the target model including the model weights and architecture . For example , Fast Gradient Sign Method ( FGSM ) ( Goodfellow et al. , 2014 ) uses 1-step gradient ascent to produce adversarial examples that enlarge the model ’ s loss . Projected gradient descent ( PGD ) attack can be viewed as a multi-step FGSM attack ( Madry et al. , 2018 ) . Many other white-box attacks have also been developed by leveraging full information of the target model ( Moosavi-Dezfooli et al. , 2016 ; Croce & Hein , 2020a ) . In the black-box setting , query-based black-box attacks ( Huang & Zhang , 2020 ; Du et al. , 2020 ) assume model information is hidden but attackers can query the model and observe the corresponding hard-label or soft-label predictions . Among them , ( Chen et al. , 2017 ; Ilyas et al. , 2018 ) considered soft-label probability predictions and ( Chen et al. , 2020 ; Huang & Zhang , 2020 ; Cheng et al. , 2018 ) considered hard-label decision-based predictions . Considering that using a large number of queries to attack an image is impractical , several works try to further reduce the query counts ( Li et al. , 2020a ; Wang et al. , 2020 ) . Transferability of adversarial examples . In this paper , we consider the black-box attack scenario when the attacker can not make any query to the target model ( Lin et al. , 2020 ; Huang et al. , 2019 ; Wang et al. , 2021b ) . In this case , the common attack method is based on transfer attack—the attacker generates AEs by attacking one or few surrogate models and hopes the AEs can also fool the target model ( Papernot et al. , 2016 ; Liu et al. , 2017 ; Yuan et al. , 2021 ; Zhou et al. , 2018 ) . Compared with query-based attacks , crafting AEs from the surrogate model consumes less computational resources and is more realistic in practice . Along this direction , subsequent works have made attempts to improve the transferability of AEs ( Guo et al. , 2020 ; Wu et al. , 2020c ; Naseer et al. , 2019 ; Li et al. , 2020c ; Wang & He , 2021 ) . For instance , Dong et al . ( 2018 ) boosted the transferability by integrating the momentum term into the iterative process . Other techniques like data augmentations ( Xie et al. , 2019 ) , exploiting gradients of skip-connection ( Wu et al. , 2020a ) , and negative interaction between pixels ( Wang et al. , 2021a ) also contribute to stronger transferable attacks . In addition to using the original surrogate models , AEG ( Bose et al. , 2020 ) adversarially trains a robust classifier together with an encoder-decoder-based transferable perturbation generator . After the training , AEG uses the generator to generate transferable AEs to attack a set of classifiers . Compared to all the existing works , our method is the first that meta-trains a new meta-surrogate model ( MSM ) such that attacks on MSM can be easier transferred to other models . This not only differs from all the previous methods that attack standard surrogate models but also differs from the encoder-decoder based method such as AEG ( Bose et al. , 2020 ) . 3 METHODOLOGY . We consider the black-box attack setting where the target model is hidden to the attacker and queries are not allowed . This setting is also known as the transfer attack setting ( Dong et al. , 2018 ; 2019 ; Xie et al. , 2019 ; Wang et al. , 2021a ) and the attacker 1 ) can not access the weight , the architecture , and the gradient of the target model ; and 2 ) can not querying the target model . The attacker can access 1 ) the dataset used by the target model ; and 2 ) a single or a set of surrogate models ( also known as source models ) that may share the dataset with the target model . For example , it is common to assume that the attacker can access one or multiple well-performed ( pretrained ) image classification models . Existing transferable adversarial attack methods conduct various attacks to these models and hope to get transferable AEs that can fool an unknown target model . Instead of proposing another attack method on surrogate models , we propose a novel framework MTA to train a Meta-Surrogate Model ( MSM ) with the goal that attacking the MSM can generate stronger transferable AEs than directly attacking the original surrogate models . When evaluating , the transferable AEs are generated by attacking the MSM with standard white-box attack methods ( e.g. , PGD attack ) . In the following , we will first review exiting attacks and then show how to form a bi-level optimization objective to train the MSM model . 3.1 REVIEWS OF FGSM AND PGD . We follow the settings of existing works ( Dong et al. , 2018 ; Xie et al. , 2019 ; Wu et al. , 2020a ; Wang et al. , 2021a ) to focus on untargeted attack , where the attack is considered successful as long as the perturbed image is wrongly predicted . FGSM ( Goodfellow et al. , 2014 ) conducts one-step gradient ascent to generate AEs to enlarge the prediction loss . The formulation can be written as xadv = Clip ( x+ · sign ( ∇xL ( f ( x ) , y ) ) ) , ( 1 ) where x is a clean image and y is the corresponding label ; is the attack step size that determines the maximum L∞ perturbation of each pixel ; f is the victim model that is transparent to the FGSM attacker ; Clip is the function that clipping the values of xadv to the legal range ( e.g. , clipping the RGB AEs to the range of [ 0 , 255 ] ) ; L is usually the cross-entropy loss . PGD ( Kurakin et al. , 2016 ) , also known as I-FGSM attack , is a multi-step extension of FGSM . The formulation of PGD is xkadv=Clip ( xk−1adv + T · sign ( ∇xk−1adv L ( f ( x k−1 adv ) , y ) ) ) . ( 2 ) xkadv is the AEs generated in the k-th gradient ascent step . Note that x 0 adv is the clean image equals to x. Eq 2 will be run for T iterations to obtain xTadv with perturbation size .
A complete black box adversarial attack thus far has not performed well as research shows. By complete black box, it means there is no information available about the target model, not even query based probing. Most SOTA uses a surrogate model to generate adversarial examples, where the surrogate model may, every likely, not in any way resemble the target model in practice. This paper claims that by adopting a meta training scheme, more effective black box attacks are achievable when compared to the SOTA.
SP:ba46a3b9b5fe435a365a863ccc87cf07bf16cd93
Training Meta-Surrogate Model for Transferable Adversarial Attack
1 INTRODUCTION . The developments of Convolutional Neural Network ( CNN ) ( LeCun et al. , 1995 ; Krizhevsky et al. , 2012 ) have greatly promoted the advancements in Computer Vision ( Ren et al. , 2016 ) . However , previous works ( Goodfellow et al. , 2014 ; Carlini & Wagner , 2017 ; Croce & Hein , 2020a ; Ganeshan et al. , 2019 ) have shown a critical robustness issue that CNN models are vulnerable to humanimperceptible perturbations of input images , also known as adversarial examples ( AEs ) . The design of AEs is useful for revealing the security threats on machine learning systems ( Croce & Hein , 2020b ) and for understanding the representations learned by CNN models ( Ilyas et al. , 2019 ) . In this paper , we consider the problem of black-box attack , where the target victim model is entirely hidden from the attacker . In this setting , standard white-box attacks ( Moosavi-Dezfooli et al. , 2016 ; Carlini & Wagner , 2017 ) or even query-based black-box attacks ( Ilyas et al. , 2018 ; Cheng et al. , 2018 ; 2020 ; 2019 ) can not be used , and the prevailing way to attack the victim is through transfer attack ( Papernot et al. , 2017 ; Wu et al. , 2018 ) . In transfer attack ( Demontis et al. , 2019 ; Dong et al. , 2018 ) , the attackers commonly generate AEs by attacking one or an ensemble of surrogate models and hope the obtained AEs can also successfully fool the victim black-box model . Although great efforts have been made to improve the transferability of adversarial attacks ( Tramèr et al. , 2017 ; Xie et al. , 2019 ; Wu et al. , 2020a ) , the transfer attack-based methods still encounter poor success rates , especially when attacking adversarially trained target models . This is caused by a fundamental limitation of current approaches—they all leverage the surrogate models trained by standard learning tasks ( e.g. , classification , object detection ) , while it is not always the case that attacks fooling such models can be easily transferred . We thus pose the following important question on transfer attack that has not been well studied in the literature : Instead of using standard ( naturally trained ) models as surrogate , can we artificially construct another Meta-Surrogate Model ( MSM ) such that attacks to this model can be easier transferred to other models ? We answer this question in the affirmative by developing a novel black-box attack pipeline called Meta-Transfer Attack ( MTA ) . Assume a set of source models ( standard surrogate models ) are given , instead of directly attacking these source models , our algorithm aims to obtain a “ meta-surrogate model ( MSM ) ” , which is designed in the way that attacks to this model can be easier transferred to fool other models , and conduct attacks on the MSM to obtain transferable AEs . We show that this goal can be mathematically formulated as a well-posed ( bi-level-like ) training objective by unrolling the attacks on the MSM and defining a loss to measure the transferability of the resulting AEs . To avoid discrete operations in the white-box attack , we propose a Customized PGD attacker that enables back-propagation through the whole procedure . With this bi-level-like optimization ( Finn et al. , 2017 ; Qin et al. , 2020 ) , the source models supervise the MSM to improve the transferability of the AEs created on it . Through extensive experiments on various models and datasets , we show that the proposed MTA method leads to significantly improved transfer attacks , demonstrating the effectiveness of the MSM . We summarize the main contributions of our work as follows . 1 ) We propose a novel MTA framework to train an MSM to improve the transferability of AEs . To the best of our knowledge , our work is the first attempt to explore a better surrogate model for producing stronger transferable AEs . 2 ) We compare MTA with state-of-the-art transfer attack methods ( e.g. , MI ( Dong et al. , 2018 ) , DI ( Xie et al. , 2019 ) , TI ( Dong et al. , 2019 ) , SGM ( Wu et al. , 2020a ) , AEG ( Bose et al. , 2020 ) , IR ( Wang et al. , 2021a ) , SI-NI ( Lin et al. , 2020 ) ) on Cifar-10 ( Krizhevsky et al. , 2009 ) and Imagenet ( Deng et al. , 2009 ) . The comparisons demonstrate the effectiveness of the proposed MTA—the AEs generated by attacking MSM significantly outperform previous methods , in attacking both naturally trained and adversarially trained black-box target models . 2 BACKGROUND . Adversarial attacks . Szegedy et al . ( 2014 ) reveals the interesting phenomenon that CNN models are vunerable to adversarial attacks . After that , many attacks have been developed ( Gao et al. , 2020 ; Zhou et al. , 2018 ; Wu et al. , 2020b ; Li et al. , 2020b ; Kaidi et al. , 2019 ; Sriramanan et al. , 2020 ) . Adversarial attacks can be mainly classified into white-box and black-box attacks ( Maksym et al. , 2020 ) according to how much information about the target model is exposed to the attacker . Whitebox attacks ( Kurakin et al. , 2016 ) are often more effective than than black-box attacks ( Brendel et al. , 2017 ; Cheng et al. , 2018 ; 2020 ) as they can leverage full knowledge of the target model including the model weights and architecture . For example , Fast Gradient Sign Method ( FGSM ) ( Goodfellow et al. , 2014 ) uses 1-step gradient ascent to produce adversarial examples that enlarge the model ’ s loss . Projected gradient descent ( PGD ) attack can be viewed as a multi-step FGSM attack ( Madry et al. , 2018 ) . Many other white-box attacks have also been developed by leveraging full information of the target model ( Moosavi-Dezfooli et al. , 2016 ; Croce & Hein , 2020a ) . In the black-box setting , query-based black-box attacks ( Huang & Zhang , 2020 ; Du et al. , 2020 ) assume model information is hidden but attackers can query the model and observe the corresponding hard-label or soft-label predictions . Among them , ( Chen et al. , 2017 ; Ilyas et al. , 2018 ) considered soft-label probability predictions and ( Chen et al. , 2020 ; Huang & Zhang , 2020 ; Cheng et al. , 2018 ) considered hard-label decision-based predictions . Considering that using a large number of queries to attack an image is impractical , several works try to further reduce the query counts ( Li et al. , 2020a ; Wang et al. , 2020 ) . Transferability of adversarial examples . In this paper , we consider the black-box attack scenario when the attacker can not make any query to the target model ( Lin et al. , 2020 ; Huang et al. , 2019 ; Wang et al. , 2021b ) . In this case , the common attack method is based on transfer attack—the attacker generates AEs by attacking one or few surrogate models and hopes the AEs can also fool the target model ( Papernot et al. , 2016 ; Liu et al. , 2017 ; Yuan et al. , 2021 ; Zhou et al. , 2018 ) . Compared with query-based attacks , crafting AEs from the surrogate model consumes less computational resources and is more realistic in practice . Along this direction , subsequent works have made attempts to improve the transferability of AEs ( Guo et al. , 2020 ; Wu et al. , 2020c ; Naseer et al. , 2019 ; Li et al. , 2020c ; Wang & He , 2021 ) . For instance , Dong et al . ( 2018 ) boosted the transferability by integrating the momentum term into the iterative process . Other techniques like data augmentations ( Xie et al. , 2019 ) , exploiting gradients of skip-connection ( Wu et al. , 2020a ) , and negative interaction between pixels ( Wang et al. , 2021a ) also contribute to stronger transferable attacks . In addition to using the original surrogate models , AEG ( Bose et al. , 2020 ) adversarially trains a robust classifier together with an encoder-decoder-based transferable perturbation generator . After the training , AEG uses the generator to generate transferable AEs to attack a set of classifiers . Compared to all the existing works , our method is the first that meta-trains a new meta-surrogate model ( MSM ) such that attacks on MSM can be easier transferred to other models . This not only differs from all the previous methods that attack standard surrogate models but also differs from the encoder-decoder based method such as AEG ( Bose et al. , 2020 ) . 3 METHODOLOGY . We consider the black-box attack setting where the target model is hidden to the attacker and queries are not allowed . This setting is also known as the transfer attack setting ( Dong et al. , 2018 ; 2019 ; Xie et al. , 2019 ; Wang et al. , 2021a ) and the attacker 1 ) can not access the weight , the architecture , and the gradient of the target model ; and 2 ) can not querying the target model . The attacker can access 1 ) the dataset used by the target model ; and 2 ) a single or a set of surrogate models ( also known as source models ) that may share the dataset with the target model . For example , it is common to assume that the attacker can access one or multiple well-performed ( pretrained ) image classification models . Existing transferable adversarial attack methods conduct various attacks to these models and hope to get transferable AEs that can fool an unknown target model . Instead of proposing another attack method on surrogate models , we propose a novel framework MTA to train a Meta-Surrogate Model ( MSM ) with the goal that attacking the MSM can generate stronger transferable AEs than directly attacking the original surrogate models . When evaluating , the transferable AEs are generated by attacking the MSM with standard white-box attack methods ( e.g. , PGD attack ) . In the following , we will first review exiting attacks and then show how to form a bi-level optimization objective to train the MSM model . 3.1 REVIEWS OF FGSM AND PGD . We follow the settings of existing works ( Dong et al. , 2018 ; Xie et al. , 2019 ; Wu et al. , 2020a ; Wang et al. , 2021a ) to focus on untargeted attack , where the attack is considered successful as long as the perturbed image is wrongly predicted . FGSM ( Goodfellow et al. , 2014 ) conducts one-step gradient ascent to generate AEs to enlarge the prediction loss . The formulation can be written as xadv = Clip ( x+ · sign ( ∇xL ( f ( x ) , y ) ) ) , ( 1 ) where x is a clean image and y is the corresponding label ; is the attack step size that determines the maximum L∞ perturbation of each pixel ; f is the victim model that is transparent to the FGSM attacker ; Clip is the function that clipping the values of xadv to the legal range ( e.g. , clipping the RGB AEs to the range of [ 0 , 255 ] ) ; L is usually the cross-entropy loss . PGD ( Kurakin et al. , 2016 ) , also known as I-FGSM attack , is a multi-step extension of FGSM . The formulation of PGD is xkadv=Clip ( xk−1adv + T · sign ( ∇xk−1adv L ( f ( x k−1 adv ) , y ) ) ) . ( 2 ) xkadv is the AEs generated in the k-th gradient ascent step . Note that x 0 adv is the clean image equals to x. Eq 2 will be run for T iterations to obtain xTadv with perturbation size .
In this paper, the authors proposed a novel method of Meta-Surrogate Model (MSM) which can generate more transferable adversarial examples in the black-box adversarial attacks. The problem is formulated as a bi-level-like optimization problem which achieved via a differentiable attacker. Extensive experiments demonstrate its effectiveness in generating the transferable adversarial examples.
SP:ba46a3b9b5fe435a365a863ccc87cf07bf16cd93
Memory-Constrained Policy Optimization
1 INTRODUCTION . Reinforcement learning ( RL ) combined with neural networks is the current workhorse in machine learning . Using neural networks to approximate value and policy functions enables classical approaches such as Q-learning and policy gradient to achieve promising results on many challenging problems such as Go , Atari games and robotics ( Silver et al. , 2017 ; Mnih et al. , 2015 ; Lillicrap et al. , 2016 ; Mnih et al. , 2016 ) . Compared to Deep Q-learning , deep policy gradient ( PG ) methods are often more flexible and applicable to both discrete and continuous action problems . However , these methods tend to suffer from high sample complexity and training instability since the gradient may not accurately reflect the policy gain when the policy changes substantially ( Kakade & Langford , 2002 ) . This is exacerbated for deep policy networks where numerous parameters need to be optimized and small updates in parameter space can lead to huge changes in policy space . To address this issue , one solution is to regularize each policy update by restricting the Kullback– Leibler ( KL ) divergence between the new policy and the previous one , which can guarantee monotonic policy improvement ( Schulman et al. , 2015a ) . However , jointly optimizing the approximate advantage function and the KL term does not work in practice . Therefore , Schulman et al . ( 2015a ) proposed Trust Region Policy Optimization ( TRPO ) to constrain the new policy within a KL divergence radius , which requires second-order gradients . Alternatives such as Proximal Policy Optimization ( PPO ) ( Schulman et al. , 2017 ) use a simpler first-order optimization with adaptive KL or clipped surrogate objective while still maintaining the reliable performance of TRPO . Recent methods recast the problem through a new lens using Expectation-Maximization or Mirror Descent Optimization , and this also results in first-order optimization with KL divergence term in the loss function ( Abdolmaleki et al. , 2018 ; Song et al. , 2019 ; Yang et al. , 2019 ; Tomar et al. , 2020 ) . An issue with the above methods is that the previous policy used to restrict the new policy may be suboptimal and thus unreliable in practice . For example , due to stochasticity and imperfect approximations , consider that the new policy may fall into a local optimum even under trust-region optimizations . Then in the next update , this policy will become the “ previous ” policy , and will continue pulling the next policy to stay in the local optimum , thus slowing down the training progress . For on-policy methods using mini-batch updates like PPO , the situation is more complicated as the “ previous ” policy is defined as the old policy that was used to collect data , which can be either very far or close to the current policy . There is no guarantee that the old policy defines a reasonable trust region for regulating the new policy . In this paper , we propose a novel constrained policy iteration procedure , dubbed as MemoryConstrained Policy Optimization ( MCPO ) , wherein a virtual policy representing past policies takes part in regularizing each policy update . The virtual and the old policy together form two trust regions that attract the new policy by minimizing two KL divergences . The virtual policy is designed to complement the old policy , attracting the new policy more when the old policy performs badly . As such , we assign different coefficient weights to the two KL terms . The coefficient weights are computed dynamically based on the performance of the two policies ( the higher performer yields higher coefficient weights ) . To create the virtual policy , we maintain a memory buffer of past policies , from which we build a mixture of policies . In particular , we use a neural network–named the attention network , which takes the context surrounding the current , the old and the virtual policy , to generate the attention weights to each policy in the memory . Then , we use the attention weights to perform a convex combination of the parameters of each policy , forming the virtual policy . The attention network is optimized to maximize the approximate expected advantages of the virtual policy . To train our system , we jointly optimize the policy and attention networks , alternating between sampling data from the policy and updating the networks in a mini-batch manner . We verify our proposed MCPO through a diverse set of experiments and compare ours with the performance of recent constrained policy optimization baselines . In our experiment on classical control tasks , amongst tested models , MCPO shows minimal sensitivity to hyperparameter changes , consistently achieving good performance across tasks and hyperparameters . Our testbed on 6 Mujoco tasks shows that MCPO with a big policy memory consistently outperforms others where the attention network plays an important role . We also demonstrate MCPO ’ s capability of learning efficiently on sparse reward and high-dimensional problems such as navigation and Atari games . Finally , our ablation study highlights the necessity of each component in MCPO . 2 BACKGROUND : POLICY OPTIMIZATION WITH TRUST REGION . In this section , we briefly review some fundamental constrained policy optimization approaches . A general idea is to force the new policy πθ to be close to a recent policy πθold . In this paper , we refer to a policy as its parameters ( i.e . policy θ means policy πθ ) . Conservative Policy Iteration ( CPI ) The method starts with a basic objective of policy gradient algorithms , which is to maximize the expected advantage Ât . LCPI ( θ ) = Êt [ πθ ( at|st ) πθold ( at|st ) Ât ] where the advantage Ât is a function of returns collected from ( st , at ) by using πθold ( see Appendix A.2 ) and Êt [ · ] indicates the empirical average over a finite batch of data . To constrain policy updates , the new policy is a mixture of the old and the greedy policy : θ̃ = argmax LCPI ( θ ) . That is , θ = αθold + ( 1 − α ) θ̃ where α is the mixture hyperparameter ( Kakade & Langford , 2002 ) . As the data is sampled from previous iteration ’ s policy θold , the objective needs importance sampling estimation . Hereafter , we denote πθ ( at|st ) πθold ( at|st ) as ratt ( θ ) for short . KL-Regularized Policy Optimization ( with fixed or adaptive KL coefficient ) Another way to enforce the constraint is to jointly maximize the expected advantage and minimize KL divergence between the new and old policy , which ensures monotonic improvement ( Schulman et al. , 2015a ) . LKLPO ( θ ) = Êt [ ratt ( θ ) Ât − βKL [ πθold ( ·|st ) , πθ ( ·|st ) ] ] where β is a hyperparameter that controls the degree of update conservativeness , which can be fixed ( KL Fixed ) or changed ( KL Adaptive ) during training ( Schulman et al. , 2017 ) . Trust Region Policy Optimization ( TRPO ) The method optimizes the expected advantage with hard constraint ( Schulman et al. , 2015a ) . This is claimed as a practical implementation that is less conservative than the theoretically justified algorithm using KL regularizer mentioned above . LTRPO ( θ ) = Êt [ ratt ( θ ) Ât ] st δ ≥ KL [ πθold ( ·|st ) , πθ ( ·|st ) ] where δ is the KL constraint radius . Proximal Policy Optimization ( PPO ) PPO is a family of constrained policy optimization , which uses first-order optimization and mini-batch updates including KL Adaptive and clipped PPO . In this paper , we use PPO to refer to the method that limits the change in policy by clipping the loss function ( clipped PPO ) ( Schulman et al. , 2017 ) . LPPO ( θ ) = Êt [ min ( ratt ( θ ) Ât , clip ( ratt ( θ ) , 1− , 1 + ) Ât ) ] where is the clip hyperparameter . In the above equations , θ is the currently optimized policy , which is also referred to as the current policy . θold represents a past policy , which can be one step before the current policy or the last policy used to interact with the environment . In either case , the rule to decide θold is fixed throughout training . If for some reason , θold is not optimal , it is unavoidable that the following updates will be negatively impacted . We will address this issue in the next section . 3 MEMORY-CONSTRAINED POLICY OPTIMIZATION ( MCPO ) . 3.1 TWO KL DIVERGENCE CONSTRAINTS . In trust-region methods with mini-batch updates such as PPO , the old policy θold is often chosen as the last policy that is used to collect observations from the environment . Before the next environment interaction , this old policy is fixed across policy updates , and can be one or many steps before the current policy depending on the mini-batch size and the number of update loops . This can be detrimental to the optimization if this old policy is poor in quality , forcing the following updates to be close to a poor solution . To tackle this issue , we propose to constrain the new policy not only to the policy θold , but also to a changeable policy that is representative of many past policies . Let ψ denote the virtual policy that represents the history of policies . ψ is dynamically computed based on the past policies using attention mechanism ( see Sec . 3.2 ) . In contrast to the fixed θold , depending on the attention weights , ψ can represent a further or closer checkpoint to the current policy than θold . We use both ψ and θold to construct the objective function as follows , L1 ( θ ) = Êt [ ratt ( θ ) Ât ] − βÊt [ ( 1− αt ( ·|st ) ) KL [ πθold ( ·|st ) , πθ ( ·|st ) ] ] ( 1 ) − βÊt [ αt ( ·|st ) KL [ πψ ( ·|st ) , πθ ( ·|st ) ] ] where αt ( ·|st ) is the coefficient weight resembling a forget gate , and β is the scaling coefficient of the KL constraint terms . In this paper , the expectation is estimated by taking average over t in a mini-batch of sampled data . The forget gate determines how much the new policy should forget the virtual policy from the memory and focus on the θold . Intuitively , if the virtual policy is better than the old policy , the new policy should be kept close to the virtual policy and vice versa . Hence , αt = e Rt ( ψ ) eRt ( ψ ) +eRt ( θold ) where Rt ( ψ ) measures the performance of the policy ψ , which can be estimated by weighted importance sampling . That is Rt ( ψ ) = ratt ( ψ ) Ât . Besides deciding which trust region the new policy should rely on , we dynamically weigh the whole KL terms via adjusting β . Using a fixed threshold dtarg to change β ( e.g in KL Adaptive , if KL [ πθold ( ·|st ) , πθ ( ·|st ) ] > dtarg , increase β ( Schulman et al. , 2017 ) ) showed limited performance since dtarg should vary depending on the current learning . We instead make use of ψ as a reference for selecting β . Let d ( a , b ) = Êt [ KL [ πa ( ·|st ) , πb ( ·|st ) ] ] denote the “ distance ” between 2 policies πa and πb , we propose a switching-β rule as follows , { β = βmax if d ( θold , θ ) > d ( θold , ψ ) β = βmin otherwise ( 2 ) The intuition is that we encourage the enforcement of the constraint when πθ is too far from πθold using the distance between πθold and πψ as a reference . Algorithm 1 Memory-Constrained Policy Optimization ( for 1 actor ) . Require : A policy bufferM , an initial policy πθold . T , K , B are the learning horizon , number of update epochs , and batch size , respectively . 1 : Initialize ψold ← θold , θ ← θold 2 : for iteration = 1 , 2 , ... do 3 : Run policy πθold in environment for T timesteps . Compute advantage estimates Â1 , ... , ÂT 4 : for epoch = 1 , 2 , ... K do 5 : for batch = 1 , 2 , ... T/B do 6 : Compute ψ ( Eq . 4 ) using ψold , θ , θold , then optimize LMCPO wrt θ ( Eq . 5 ) 7 : if d ( θ , ψ ) > d ( θold , ψ ) then add θ toM 8 : if |M| > N then remove the last item fromM 9 : ψold ← ψ 10 : end for 11 : end for 12 : θold ← θ 13 : end for
This paper proposes a new approach to regularize on-policy methods utilizing two soft trust region terms. The first term encourages the new policy to stay close to old policy like PPO and the second term enforces the new policy to stay close to the combination of past policies called virtual policy. The virtual policy is built by a convex combination of past policies in the memory through attention weights. The motivation to use attention is to ensure the virtual policy has good performance on current data. To evaluate their method, this paper uses 3 control tasks (i.e. Pendulum, LunarLander and Bipedal- Walker), MiniGrid library for sparse reward environments evaluation, 6 Mujoco tasks, and 6 Atari games.
SP:8d7ad283640648010986d77969506a28725b2e2a
Memory-Constrained Policy Optimization
1 INTRODUCTION . Reinforcement learning ( RL ) combined with neural networks is the current workhorse in machine learning . Using neural networks to approximate value and policy functions enables classical approaches such as Q-learning and policy gradient to achieve promising results on many challenging problems such as Go , Atari games and robotics ( Silver et al. , 2017 ; Mnih et al. , 2015 ; Lillicrap et al. , 2016 ; Mnih et al. , 2016 ) . Compared to Deep Q-learning , deep policy gradient ( PG ) methods are often more flexible and applicable to both discrete and continuous action problems . However , these methods tend to suffer from high sample complexity and training instability since the gradient may not accurately reflect the policy gain when the policy changes substantially ( Kakade & Langford , 2002 ) . This is exacerbated for deep policy networks where numerous parameters need to be optimized and small updates in parameter space can lead to huge changes in policy space . To address this issue , one solution is to regularize each policy update by restricting the Kullback– Leibler ( KL ) divergence between the new policy and the previous one , which can guarantee monotonic policy improvement ( Schulman et al. , 2015a ) . However , jointly optimizing the approximate advantage function and the KL term does not work in practice . Therefore , Schulman et al . ( 2015a ) proposed Trust Region Policy Optimization ( TRPO ) to constrain the new policy within a KL divergence radius , which requires second-order gradients . Alternatives such as Proximal Policy Optimization ( PPO ) ( Schulman et al. , 2017 ) use a simpler first-order optimization with adaptive KL or clipped surrogate objective while still maintaining the reliable performance of TRPO . Recent methods recast the problem through a new lens using Expectation-Maximization or Mirror Descent Optimization , and this also results in first-order optimization with KL divergence term in the loss function ( Abdolmaleki et al. , 2018 ; Song et al. , 2019 ; Yang et al. , 2019 ; Tomar et al. , 2020 ) . An issue with the above methods is that the previous policy used to restrict the new policy may be suboptimal and thus unreliable in practice . For example , due to stochasticity and imperfect approximations , consider that the new policy may fall into a local optimum even under trust-region optimizations . Then in the next update , this policy will become the “ previous ” policy , and will continue pulling the next policy to stay in the local optimum , thus slowing down the training progress . For on-policy methods using mini-batch updates like PPO , the situation is more complicated as the “ previous ” policy is defined as the old policy that was used to collect data , which can be either very far or close to the current policy . There is no guarantee that the old policy defines a reasonable trust region for regulating the new policy . In this paper , we propose a novel constrained policy iteration procedure , dubbed as MemoryConstrained Policy Optimization ( MCPO ) , wherein a virtual policy representing past policies takes part in regularizing each policy update . The virtual and the old policy together form two trust regions that attract the new policy by minimizing two KL divergences . The virtual policy is designed to complement the old policy , attracting the new policy more when the old policy performs badly . As such , we assign different coefficient weights to the two KL terms . The coefficient weights are computed dynamically based on the performance of the two policies ( the higher performer yields higher coefficient weights ) . To create the virtual policy , we maintain a memory buffer of past policies , from which we build a mixture of policies . In particular , we use a neural network–named the attention network , which takes the context surrounding the current , the old and the virtual policy , to generate the attention weights to each policy in the memory . Then , we use the attention weights to perform a convex combination of the parameters of each policy , forming the virtual policy . The attention network is optimized to maximize the approximate expected advantages of the virtual policy . To train our system , we jointly optimize the policy and attention networks , alternating between sampling data from the policy and updating the networks in a mini-batch manner . We verify our proposed MCPO through a diverse set of experiments and compare ours with the performance of recent constrained policy optimization baselines . In our experiment on classical control tasks , amongst tested models , MCPO shows minimal sensitivity to hyperparameter changes , consistently achieving good performance across tasks and hyperparameters . Our testbed on 6 Mujoco tasks shows that MCPO with a big policy memory consistently outperforms others where the attention network plays an important role . We also demonstrate MCPO ’ s capability of learning efficiently on sparse reward and high-dimensional problems such as navigation and Atari games . Finally , our ablation study highlights the necessity of each component in MCPO . 2 BACKGROUND : POLICY OPTIMIZATION WITH TRUST REGION . In this section , we briefly review some fundamental constrained policy optimization approaches . A general idea is to force the new policy πθ to be close to a recent policy πθold . In this paper , we refer to a policy as its parameters ( i.e . policy θ means policy πθ ) . Conservative Policy Iteration ( CPI ) The method starts with a basic objective of policy gradient algorithms , which is to maximize the expected advantage Ât . LCPI ( θ ) = Êt [ πθ ( at|st ) πθold ( at|st ) Ât ] where the advantage Ât is a function of returns collected from ( st , at ) by using πθold ( see Appendix A.2 ) and Êt [ · ] indicates the empirical average over a finite batch of data . To constrain policy updates , the new policy is a mixture of the old and the greedy policy : θ̃ = argmax LCPI ( θ ) . That is , θ = αθold + ( 1 − α ) θ̃ where α is the mixture hyperparameter ( Kakade & Langford , 2002 ) . As the data is sampled from previous iteration ’ s policy θold , the objective needs importance sampling estimation . Hereafter , we denote πθ ( at|st ) πθold ( at|st ) as ratt ( θ ) for short . KL-Regularized Policy Optimization ( with fixed or adaptive KL coefficient ) Another way to enforce the constraint is to jointly maximize the expected advantage and minimize KL divergence between the new and old policy , which ensures monotonic improvement ( Schulman et al. , 2015a ) . LKLPO ( θ ) = Êt [ ratt ( θ ) Ât − βKL [ πθold ( ·|st ) , πθ ( ·|st ) ] ] where β is a hyperparameter that controls the degree of update conservativeness , which can be fixed ( KL Fixed ) or changed ( KL Adaptive ) during training ( Schulman et al. , 2017 ) . Trust Region Policy Optimization ( TRPO ) The method optimizes the expected advantage with hard constraint ( Schulman et al. , 2015a ) . This is claimed as a practical implementation that is less conservative than the theoretically justified algorithm using KL regularizer mentioned above . LTRPO ( θ ) = Êt [ ratt ( θ ) Ât ] st δ ≥ KL [ πθold ( ·|st ) , πθ ( ·|st ) ] where δ is the KL constraint radius . Proximal Policy Optimization ( PPO ) PPO is a family of constrained policy optimization , which uses first-order optimization and mini-batch updates including KL Adaptive and clipped PPO . In this paper , we use PPO to refer to the method that limits the change in policy by clipping the loss function ( clipped PPO ) ( Schulman et al. , 2017 ) . LPPO ( θ ) = Êt [ min ( ratt ( θ ) Ât , clip ( ratt ( θ ) , 1− , 1 + ) Ât ) ] where is the clip hyperparameter . In the above equations , θ is the currently optimized policy , which is also referred to as the current policy . θold represents a past policy , which can be one step before the current policy or the last policy used to interact with the environment . In either case , the rule to decide θold is fixed throughout training . If for some reason , θold is not optimal , it is unavoidable that the following updates will be negatively impacted . We will address this issue in the next section . 3 MEMORY-CONSTRAINED POLICY OPTIMIZATION ( MCPO ) . 3.1 TWO KL DIVERGENCE CONSTRAINTS . In trust-region methods with mini-batch updates such as PPO , the old policy θold is often chosen as the last policy that is used to collect observations from the environment . Before the next environment interaction , this old policy is fixed across policy updates , and can be one or many steps before the current policy depending on the mini-batch size and the number of update loops . This can be detrimental to the optimization if this old policy is poor in quality , forcing the following updates to be close to a poor solution . To tackle this issue , we propose to constrain the new policy not only to the policy θold , but also to a changeable policy that is representative of many past policies . Let ψ denote the virtual policy that represents the history of policies . ψ is dynamically computed based on the past policies using attention mechanism ( see Sec . 3.2 ) . In contrast to the fixed θold , depending on the attention weights , ψ can represent a further or closer checkpoint to the current policy than θold . We use both ψ and θold to construct the objective function as follows , L1 ( θ ) = Êt [ ratt ( θ ) Ât ] − βÊt [ ( 1− αt ( ·|st ) ) KL [ πθold ( ·|st ) , πθ ( ·|st ) ] ] ( 1 ) − βÊt [ αt ( ·|st ) KL [ πψ ( ·|st ) , πθ ( ·|st ) ] ] where αt ( ·|st ) is the coefficient weight resembling a forget gate , and β is the scaling coefficient of the KL constraint terms . In this paper , the expectation is estimated by taking average over t in a mini-batch of sampled data . The forget gate determines how much the new policy should forget the virtual policy from the memory and focus on the θold . Intuitively , if the virtual policy is better than the old policy , the new policy should be kept close to the virtual policy and vice versa . Hence , αt = e Rt ( ψ ) eRt ( ψ ) +eRt ( θold ) where Rt ( ψ ) measures the performance of the policy ψ , which can be estimated by weighted importance sampling . That is Rt ( ψ ) = ratt ( ψ ) Ât . Besides deciding which trust region the new policy should rely on , we dynamically weigh the whole KL terms via adjusting β . Using a fixed threshold dtarg to change β ( e.g in KL Adaptive , if KL [ πθold ( ·|st ) , πθ ( ·|st ) ] > dtarg , increase β ( Schulman et al. , 2017 ) ) showed limited performance since dtarg should vary depending on the current learning . We instead make use of ψ as a reference for selecting β . Let d ( a , b ) = Êt [ KL [ πa ( ·|st ) , πb ( ·|st ) ] ] denote the “ distance ” between 2 policies πa and πb , we propose a switching-β rule as follows , { β = βmax if d ( θold , θ ) > d ( θold , ψ ) β = βmin otherwise ( 2 ) The intuition is that we encourage the enforcement of the constraint when πθ is too far from πθold using the distance between πθold and πψ as a reference . Algorithm 1 Memory-Constrained Policy Optimization ( for 1 actor ) . Require : A policy bufferM , an initial policy πθold . T , K , B are the learning horizon , number of update epochs , and batch size , respectively . 1 : Initialize ψold ← θold , θ ← θold 2 : for iteration = 1 , 2 , ... do 3 : Run policy πθold in environment for T timesteps . Compute advantage estimates Â1 , ... , ÂT 4 : for epoch = 1 , 2 , ... K do 5 : for batch = 1 , 2 , ... T/B do 6 : Compute ψ ( Eq . 4 ) using ψold , θ , θold , then optimize LMCPO wrt θ ( Eq . 5 ) 7 : if d ( θ , ψ ) > d ( θold , ψ ) then add θ toM 8 : if |M| > N then remove the last item fromM 9 : ψold ← ψ 10 : end for 11 : end for 12 : θold ← θ 13 : end for
In this work, the authors propose the use a trust-region method in the vein of Proximal Policy Optimization (PPO). In contrast to previous work, the author propose to use two trust regions instead of a single one. Instead of constraining the policy to stay near to the previous policy, the author's proposed algorithm includes an extra virtual policy constructed from a memory buffer of past policies.
SP:8d7ad283640648010986d77969506a28725b2e2a
Triangular Dropout: Variable Network Width without Retraining
One of the most fundamental design choices in neural networks is layer width : it affects the capacity of what a network can learn and determines the complexity of the solution . This latter property is often exploited when introducing information bottlenecks , forcing a network to learn compressed representations . However , such an architecture decision is typically immutable once training begins ; switching to a more compressed architecture requires retraining . In this paper we present a new layer design , called Triangular Dropout , which does not have this limitation . After training , the layer can be arbitrarily reduced in width to exchange performance for narrowness . We demonstrate the construction and potential use cases of such a mechanism in three areas . Firstly , we describe the formulation of Triangular Dropout in autoencoders , creating models with selectable compression after training . Secondly , we add Triangular Dropout to VGG19 on ImageNet , creating a powerful network which , without retraining , can be significantly reduced in parameters . Lastly , we explore the application of Triangular Dropout to reinforcement learning ( RL ) policies on selected control problems . 1 INTRODUCTION . In this paper we describe Triangular Dropout , a novel dropout ( Srivastava et al. , 2014 ) technique that imparts a powerful property to fully-connected layers : the layer can be reduced in width after training to select a desired size of representation . This enables structured pruning in fully-connected layers such that the pruned network is densely connected . This exposes a trade-off between performance and network width that can be varied without retraining the network . Additionally , constructing and applying Triangular Dropout is straightforward . Triangular Dropout amounts to masking minibatches during training with a binary lower triangular matrix with zeros above the diagonal . After training , the relevant weights can be copied into a physically smaller dense network . Architecturally , Triangular Dropout represents a shift towards models that can be densely downsized to fit the needs of a particular application . For example , a wide model could be trained once on a computer cluster , and narrower versions would be immediately available for use on personal machines , mobile devices , IoT devices , or other embedded platforms . An image processing pipeline could have its frame-rate or feature descriptor length altered as needed , perhaps to process more samples in exchange for lower performance per sample . Triangular Dropout is tangent to many areas of research , and includes ideas of compression , structured network pruning , and variable computation . Our objective is not to outperform in any specific domain , but rather to demonstrate a technique that we find has useful properties from several areas and is very easy to implement . We discuss related works to Triangular Dropout in Section 2 , and formally define our mechanism in Section 3 . We then investigate some applications of Triangular Dropout in unsupervised learning of latent encodings ( Section 4 ) , supervised learning in larger models ( Section 5 ) , and reinforcement learning for locomotion control problems ( Section 6 ) . Sections 7 and 8 further discuss the characteristics of Triangular Dropout and suggest potential future research directions . 2 BACKGROUND . The width of a specific network layer is perhaps most critical in the domain of autoencoding ( Rumelhart et al. , 1986 ) , in which the width of the encoding layer ( along with its activation ) describes the amount of information retained in an encoded sample . The smaller the latent space ( narrower the encoding layer ) , the more compressed the learned representation , and therefore , the more lossy the compression performed by the network . There are countless variations of autoencoders which seek to improve on this compression ratio ( Theis et al. , 2017 ) or introduce additional properties to the latent variables ( Vincent et al. , 2008 ; Rifai et al. , 2011 ) . The degree to which the latent variables are independent is the subject of disentanglement research , which introduces further properties into the latent variables . β-VAE ( Higgins et al. , 2017 ) demonstrates that the gaussian distributions in a VAE ( Kingma & Welling , 2014 ) can be made increasingly orthogonal in exchange for reconstruction accuracy . The independence and ordering of learned features can also be enforced manually by methods such as PCAAE ( Pham et al. , 2020 ) , which learns one latent variable at a time , progressively widening the latent layer to learn additional features via additional training . A comparison to PCAAE is discussed in detail in Section 4 . Autoencoding makes use of a well-known tradeoff between network size and capability to encourage compression , a relationship that holds in other domains ( Amodei & Hernandez , 2019 ; Kaplan et al. , 2020 ; McCandlish et al. , 2018 ) . This is perhaps most well known with regards to ImageNet ( Deng et al. , 2009 ) , in which historically a clear correlation is seen between network size and performance ( summarized nicely in Figure 1 of Tan & Le ( 2020 ) ) . However , such large models can also be very inefficient in their use of parameters , often learning unnecessary weights or redundant representations . Network pruning is a technique to reduce an over-parameterized network down to essential parameters , recovering a sub-network that is similar or even superior in performance ( Blalock et al. , 2020 ; Frankle & Carbin , 2018 ) . In unstructured pruning , the network is sparse , whereas in structured pruning , the sub-network is dense . Triangular Dropout falls into the latter category , but examines fully-connected layers instead of the typical pruning of convolutional elements , as in Anwar et al . ( 2015 ) ( channels and kernels ) , Li et al . ( 2016 ) ( filters ) , and He et al . ( 2017 ) ( channels ) . Triangular Dropout additionally does not require finetuning and is not iterative , as in the above works and many others ( Molchanov et al. , 2016 ; Luo et al. , 2019 ) , although fine-tuning could of course be applied if desired . In Section 5 , we explore dense prunings recovered by Triangular Dropout on the classification head of VGG19 , an early ImageNet solution that is well-known to be overparameterized as evidenced by subsequent works with fewer parameters ( Iandola et al. , 2016 ; Tan & Le , 2020 ) . This overparameterization and history of use makes it popular for pruning studies , especially on ImageNet ( Blalock et al. , 2020 ) . There is also a great deal of relevant work from the conditional computation domain , exploring architectures that dynamically find appropriate sub-networks for a given input ( Han et al. , 2021 ) . In this approach networks are trained to enable selection of sub-networks , rather than simply pruning the network after initial training . Few approaches examine variable feed-forward layer width , for example Bengio et al . ( 2015 ) use reinforcement learning to learn which nodes in a fully-connected layer can be masked out on a per-sample basis . Ba & Frey ( 2013 ) achieve a similar effect through deep belief networks creating layer masks . Most methods rely on selective routing through entire sub-branches or sub-modules , i.e . Sabour et al . ( 2017 ) . There is a related area of work in recurrent networks which adapts computation in the time ( rollout ) dimension during inference , mainly by choosing where and when to update a hidden state ( Graves , 2016 ; Campos et al. , 2017 ; Jernite et al. , 2017 ) . In contrast to these areas , Triangular Dropout specifically seeks dense representations that capture the entirety of the input space , and does so in a non-recurrent manner . Network size selection has additional repercussions in the deep reinforcement learning ( DRL ) domain . Works like amplified control ( Paulhamus et al. , 2019 ) and robust predictable control ( Eysenbach et al. , 2021 ) seek compressed policies to perform tasks , using information bottlenecking ( Tishby et al. , 2001 ) to enforce this compression . Robust predictable control demonstrates that compression creates policies that are more risk-averse and potentially more transferable . Such compressability is further related to task complexity measurement , an open problem ( see the implications of task complexity discussed in Srivastava et al . ( 2019 ) ) . We explore the application of Triangular Dropout to DRL in Section 6 . 3 TRIANGULAR DROPOUT . Triangular Dropout is simple to implement in practice . For a fully-connected layer of width n , processing a minibatch x of B datapoints , the output y has size ( B , n ) . During training , standard dropout ( with probability p ) multiplies the output element-wise by a random binary mask M of the same size as the output : y = M ⊙ α ( xTW + b ) where M ∼ Bernoulli ( p ) where W and b are the layer weights and biases , respectively , and α is some activation function . Triangular Dropout has the same form , but the mask M is populated as a binary lower triangular matrix instead of a randomly sampled one : y = MTri ⊙ α ( xTW + b ) where MTri = 1 0 . . . 0 1 1 . . . 0 ... ... . . . ... 1 1 . . . 1 This is visualized in Figure 1 . In the case where B > n , the rows of MTri are simply repeated to reach the desired size . In the case where B < n , a triangular block matrix may be used . For any B , an approximate alternative would be to independently sample rows such that a random number of 1 ’ s are followed by 0 ’ s . The implications of a triangular mask can be viewed in different ways . Considering the rows of the output y , the mask creates a set of datapoints which have been processed with the full range of layer widths from 1 to n. If the batch size is equal to n , the ith row represents a training sample in which the effective layer width is i . Training now amounts to something like a multitask learning problem , in which the “ tasks ” are processing data with varying network widths . We have an even distribution of data from all these tasks , and the loss function reflects training over this set of architectures ( widths ) : y = y1,1 0 0 . . . → effective width 1 y1,2 y2,2 0 . . . → effective width 2 y1,3 y2,3 y3,3 . . . → effective width 3 ... ... ... . . . Taking this multitask view , we do not re-scale the layer outputs as in normal dropout ; we want the downstream network to be able to handle any of the ” tasks ” ( any of the potential widths of this layer ) . However , the “ tasks ” in this view are not independent . Examining the columns of the output , the jth column represents the output of the jth layer node , masked out for the first j rows . Because the mask is triangular , all of the samples which are non-zero at column j are necessarily also non-zero at columns 1 through j − 1 . That is , parameters relevant to the jth node are only updated for samples in which the previous j − 1 nodes ( smaller widths ) are also updated . This is not true for subsequent nodes : nodes j + 1 and onwards may or may not be masked when node j is utilized . This cascading dependence is what masks Triangular Dropout work . The parameters related to node j can be learned with a guarantee that the preceding j− 1 outputs in terms of width are also present . However , they can not rely as heavily on outputs j + 1 and beyond , and are essentially restricted from fully co-optimizing with these outputs . During test time , it is up to the user to decide on the masking strategy . Providing a mask filled with ones makes the layer approximately equivalent to a typical fully-connected layer , or masking out the last N − j nodes causes the layer to behave as though it has width j . To permanently ablate the layer down to some desired width , the relevant model parameters ( portions of W and b from this layer and the next ) simply need to be copied into a smaller model , as shown in Figure 1 .
This paper proposes Triangular Dropout, a mechanism for training fully-connected layers whose width can be decreased at test time, by using dropout masks with a particular structure at train time. The proposed approach compares favorably to previous methods when training autoencoders of varying bottleneck size on MNIST. Authors show that Triangular Dropout can also be used to tune the parameter count - accuracy trade-off at test time on VGG-19. Finally, the proposed method is used to measure task complexity in RL by using the minimum layer width required to solve the task as a proxy.
SP:ce7d5818ec4598134e27b2f5bc346686d95f8f70
Triangular Dropout: Variable Network Width without Retraining
One of the most fundamental design choices in neural networks is layer width : it affects the capacity of what a network can learn and determines the complexity of the solution . This latter property is often exploited when introducing information bottlenecks , forcing a network to learn compressed representations . However , such an architecture decision is typically immutable once training begins ; switching to a more compressed architecture requires retraining . In this paper we present a new layer design , called Triangular Dropout , which does not have this limitation . After training , the layer can be arbitrarily reduced in width to exchange performance for narrowness . We demonstrate the construction and potential use cases of such a mechanism in three areas . Firstly , we describe the formulation of Triangular Dropout in autoencoders , creating models with selectable compression after training . Secondly , we add Triangular Dropout to VGG19 on ImageNet , creating a powerful network which , without retraining , can be significantly reduced in parameters . Lastly , we explore the application of Triangular Dropout to reinforcement learning ( RL ) policies on selected control problems . 1 INTRODUCTION . In this paper we describe Triangular Dropout , a novel dropout ( Srivastava et al. , 2014 ) technique that imparts a powerful property to fully-connected layers : the layer can be reduced in width after training to select a desired size of representation . This enables structured pruning in fully-connected layers such that the pruned network is densely connected . This exposes a trade-off between performance and network width that can be varied without retraining the network . Additionally , constructing and applying Triangular Dropout is straightforward . Triangular Dropout amounts to masking minibatches during training with a binary lower triangular matrix with zeros above the diagonal . After training , the relevant weights can be copied into a physically smaller dense network . Architecturally , Triangular Dropout represents a shift towards models that can be densely downsized to fit the needs of a particular application . For example , a wide model could be trained once on a computer cluster , and narrower versions would be immediately available for use on personal machines , mobile devices , IoT devices , or other embedded platforms . An image processing pipeline could have its frame-rate or feature descriptor length altered as needed , perhaps to process more samples in exchange for lower performance per sample . Triangular Dropout is tangent to many areas of research , and includes ideas of compression , structured network pruning , and variable computation . Our objective is not to outperform in any specific domain , but rather to demonstrate a technique that we find has useful properties from several areas and is very easy to implement . We discuss related works to Triangular Dropout in Section 2 , and formally define our mechanism in Section 3 . We then investigate some applications of Triangular Dropout in unsupervised learning of latent encodings ( Section 4 ) , supervised learning in larger models ( Section 5 ) , and reinforcement learning for locomotion control problems ( Section 6 ) . Sections 7 and 8 further discuss the characteristics of Triangular Dropout and suggest potential future research directions . 2 BACKGROUND . The width of a specific network layer is perhaps most critical in the domain of autoencoding ( Rumelhart et al. , 1986 ) , in which the width of the encoding layer ( along with its activation ) describes the amount of information retained in an encoded sample . The smaller the latent space ( narrower the encoding layer ) , the more compressed the learned representation , and therefore , the more lossy the compression performed by the network . There are countless variations of autoencoders which seek to improve on this compression ratio ( Theis et al. , 2017 ) or introduce additional properties to the latent variables ( Vincent et al. , 2008 ; Rifai et al. , 2011 ) . The degree to which the latent variables are independent is the subject of disentanglement research , which introduces further properties into the latent variables . β-VAE ( Higgins et al. , 2017 ) demonstrates that the gaussian distributions in a VAE ( Kingma & Welling , 2014 ) can be made increasingly orthogonal in exchange for reconstruction accuracy . The independence and ordering of learned features can also be enforced manually by methods such as PCAAE ( Pham et al. , 2020 ) , which learns one latent variable at a time , progressively widening the latent layer to learn additional features via additional training . A comparison to PCAAE is discussed in detail in Section 4 . Autoencoding makes use of a well-known tradeoff between network size and capability to encourage compression , a relationship that holds in other domains ( Amodei & Hernandez , 2019 ; Kaplan et al. , 2020 ; McCandlish et al. , 2018 ) . This is perhaps most well known with regards to ImageNet ( Deng et al. , 2009 ) , in which historically a clear correlation is seen between network size and performance ( summarized nicely in Figure 1 of Tan & Le ( 2020 ) ) . However , such large models can also be very inefficient in their use of parameters , often learning unnecessary weights or redundant representations . Network pruning is a technique to reduce an over-parameterized network down to essential parameters , recovering a sub-network that is similar or even superior in performance ( Blalock et al. , 2020 ; Frankle & Carbin , 2018 ) . In unstructured pruning , the network is sparse , whereas in structured pruning , the sub-network is dense . Triangular Dropout falls into the latter category , but examines fully-connected layers instead of the typical pruning of convolutional elements , as in Anwar et al . ( 2015 ) ( channels and kernels ) , Li et al . ( 2016 ) ( filters ) , and He et al . ( 2017 ) ( channels ) . Triangular Dropout additionally does not require finetuning and is not iterative , as in the above works and many others ( Molchanov et al. , 2016 ; Luo et al. , 2019 ) , although fine-tuning could of course be applied if desired . In Section 5 , we explore dense prunings recovered by Triangular Dropout on the classification head of VGG19 , an early ImageNet solution that is well-known to be overparameterized as evidenced by subsequent works with fewer parameters ( Iandola et al. , 2016 ; Tan & Le , 2020 ) . This overparameterization and history of use makes it popular for pruning studies , especially on ImageNet ( Blalock et al. , 2020 ) . There is also a great deal of relevant work from the conditional computation domain , exploring architectures that dynamically find appropriate sub-networks for a given input ( Han et al. , 2021 ) . In this approach networks are trained to enable selection of sub-networks , rather than simply pruning the network after initial training . Few approaches examine variable feed-forward layer width , for example Bengio et al . ( 2015 ) use reinforcement learning to learn which nodes in a fully-connected layer can be masked out on a per-sample basis . Ba & Frey ( 2013 ) achieve a similar effect through deep belief networks creating layer masks . Most methods rely on selective routing through entire sub-branches or sub-modules , i.e . Sabour et al . ( 2017 ) . There is a related area of work in recurrent networks which adapts computation in the time ( rollout ) dimension during inference , mainly by choosing where and when to update a hidden state ( Graves , 2016 ; Campos et al. , 2017 ; Jernite et al. , 2017 ) . In contrast to these areas , Triangular Dropout specifically seeks dense representations that capture the entirety of the input space , and does so in a non-recurrent manner . Network size selection has additional repercussions in the deep reinforcement learning ( DRL ) domain . Works like amplified control ( Paulhamus et al. , 2019 ) and robust predictable control ( Eysenbach et al. , 2021 ) seek compressed policies to perform tasks , using information bottlenecking ( Tishby et al. , 2001 ) to enforce this compression . Robust predictable control demonstrates that compression creates policies that are more risk-averse and potentially more transferable . Such compressability is further related to task complexity measurement , an open problem ( see the implications of task complexity discussed in Srivastava et al . ( 2019 ) ) . We explore the application of Triangular Dropout to DRL in Section 6 . 3 TRIANGULAR DROPOUT . Triangular Dropout is simple to implement in practice . For a fully-connected layer of width n , processing a minibatch x of B datapoints , the output y has size ( B , n ) . During training , standard dropout ( with probability p ) multiplies the output element-wise by a random binary mask M of the same size as the output : y = M ⊙ α ( xTW + b ) where M ∼ Bernoulli ( p ) where W and b are the layer weights and biases , respectively , and α is some activation function . Triangular Dropout has the same form , but the mask M is populated as a binary lower triangular matrix instead of a randomly sampled one : y = MTri ⊙ α ( xTW + b ) where MTri = 1 0 . . . 0 1 1 . . . 0 ... ... . . . ... 1 1 . . . 1 This is visualized in Figure 1 . In the case where B > n , the rows of MTri are simply repeated to reach the desired size . In the case where B < n , a triangular block matrix may be used . For any B , an approximate alternative would be to independently sample rows such that a random number of 1 ’ s are followed by 0 ’ s . The implications of a triangular mask can be viewed in different ways . Considering the rows of the output y , the mask creates a set of datapoints which have been processed with the full range of layer widths from 1 to n. If the batch size is equal to n , the ith row represents a training sample in which the effective layer width is i . Training now amounts to something like a multitask learning problem , in which the “ tasks ” are processing data with varying network widths . We have an even distribution of data from all these tasks , and the loss function reflects training over this set of architectures ( widths ) : y = y1,1 0 0 . . . → effective width 1 y1,2 y2,2 0 . . . → effective width 2 y1,3 y2,3 y3,3 . . . → effective width 3 ... ... ... . . . Taking this multitask view , we do not re-scale the layer outputs as in normal dropout ; we want the downstream network to be able to handle any of the ” tasks ” ( any of the potential widths of this layer ) . However , the “ tasks ” in this view are not independent . Examining the columns of the output , the jth column represents the output of the jth layer node , masked out for the first j rows . Because the mask is triangular , all of the samples which are non-zero at column j are necessarily also non-zero at columns 1 through j − 1 . That is , parameters relevant to the jth node are only updated for samples in which the previous j − 1 nodes ( smaller widths ) are also updated . This is not true for subsequent nodes : nodes j + 1 and onwards may or may not be masked when node j is utilized . This cascading dependence is what masks Triangular Dropout work . The parameters related to node j can be learned with a guarantee that the preceding j− 1 outputs in terms of width are also present . However , they can not rely as heavily on outputs j + 1 and beyond , and are essentially restricted from fully co-optimizing with these outputs . During test time , it is up to the user to decide on the masking strategy . Providing a mask filled with ones makes the layer approximately equivalent to a typical fully-connected layer , or masking out the last N − j nodes causes the layer to behave as though it has width j . To permanently ablate the layer down to some desired width , the relevant model parameters ( portions of W and b from this layer and the next ) simply need to be copied into a smaller model , as shown in Figure 1 .
This paper proposes a method, called Triangular Dropout, to allow a fully connected layer in a network to have variable width at deployment, which is achieved by applying a lower-triangular mask to the output of the fully-connected layer. Experiments were conducted in three different scenarios, autoencoder, image classification, and reinforcement learning. Results show that models trained with Triangular Dropout retain most of their performance when being ablated.
SP:ce7d5818ec4598134e27b2f5bc346686d95f8f70
Universalizing Weak Supervision
1 INTRODUCTION . Weak supervision ( WS ) frameworks help overcome the labeling bottleneck : the challenge of building a large dataset for use in training data-hungry deep models . WS approaches replace hand-labeling with synthesizing multiple noisy but cheap sources , called labeling functions , applied to unlabeled data . As these sources may vary in quality and be dependent , a crucial step is to model their accuracies and correlations . Informed by this model , high-quality pseudolabels are produced and used to train a downstream model . This simple yet flexible approach is highly successful in research and industry settings ( Bach et al. , 2019 ; Ré et al. , 2020 ) . WS frameworks offer three advantages : they are ( i ) flexible and subsume many existing ways to integrate side information , ( ii ) computationally efficient , and ( iii ) they offer theoretical guarantees , including estimator consistency . Unfortunately , these benefits come at the cost of being particular to very specific problem settings : categorical , usually binary , labels . Extensions , e.g. , to time-series data ( Safranchik et al. , 2020 ) , or to segmentation masks ( Hooper et al. , 2021 ) , require a new model for source synthesis , a new algorithm , and more . We seek to side-step this expensive one-at-a time process via a universal approach , enabling WS to work in any problem setting while still providing the three advantageous properties above . The main technical challenge for universal WS is the diversity of label settings : classification , structured prediction , regression , rankings , and more . Each of these settings seemingly demands a different approach for learning the source synthesis model , which we refer to as the label model . For example , Ratner et al . ( 2019 ) assumed that the distribution of the sources and latent true label is an Ising model and relied on a property of such distributions : that the inverse covariance matrix is graph-structured . It is not clear how to lift such a property to spaces of permutations or to Riemannian manifolds . We propose a general recipe to handle any type of label . The data generation process for the weak sources is modeled with an exponential family distribution that can represent a label from any metric space ( Y , dY ) . We embed labels from Y into two tractable choices of space : the Boolean hypercube { ±1 } d and Euclidean space Rd . The label model ( used for source synthesis ) is learned with an efficient method-of-moments approach in the embedding space . It only requires solving a small number of scalar linear or quadratic equations . Better yet , for isometric embeddings , we show this estimator is consistent via finite sample bounds . Experimentally , we demonstrate our approach on five choices of problems never before tackled in WS : • Learning rankings : on two real-world rankings tasks , our approach with as few as five sources performs better than supervised learning with a smaller number of true labels . In contrast , an adaptation of the Snorkel ( Ratner et al. , 2018 ) framework can not reach this performance with as many as 18 sources . • Regression : on two real-world regression datasets , when using 6 or more labeling function , the performance of our approach is comparable to fully-supervised models . • Learning in hyperbolic spaces : on a geodesic regression task in hyperbolic space , we consistently outperform fully-supervised learning , even when using only 3 labeling functions ( LFs ) . • Estimation in generic metric spaces : in a synthetic setting of metric spaces induced by random graphs , we demonstrate that our method handles LF heterogeneity better than the majority vote baseline . • Learning parse trees : in semantic dependency parsing , we outperform strong baseline models . In each experiment , we confirm the following desirable behaviors of weak supervision : ( i ) more high-quality and independent sources yield better pseudolabels , ( ii ) more pseudolabels can yield better performance compared to training on fewer clean labels , ( iii ) when source accuracy varies , our approach outperforms generalizations of majority vote . 2 PROBLEM FORMULATION AND LABEL MODEL . We give background on weak supervision frameworks , provide the problem formulation , describe our choice of universal label model , special cases , the embedding technique we use to reduce our problem to two easilyhandled cases , and discuss end model training . Background WS frameworks are a principled way to integrate weak or noisy information to produce label estimates . These weak sources include small pieces of code expressing heuristic principles , crowdworkers , lookups in external knowledge bases , pretrained models , and many more ( Karger et al. , 2011 ; Mintz et al. , 2009 ; Gupta & Manning , 2014 ; Dehghani et al. , 2017 ; Ratner et al. , 2018 ) . Given an unlabeled dataset , users construct a set of labeling functions ( LFs ) based on weak sources and apply them to the data . The estimates produced by each LF are synthesized to produce pseudolabels that can be used to train a downstream model . Problem Formulation Let x1 , x2 , . . . , xn be a dataset of unlabeled datapoints from X . Associated with these are labels from an arbitrary metric space Y with metric dY . In conventional supervised learning , we would have pairs ( x1 , y1 ) , . . . , ( xn , yn ) ; however , in WS , we do not have access to the labels . Instead , we have estimates of y from m labeling functions ( LFs ) . Each such LF s : X → Y produces an estimate of the true label y from a datapoint x . We write λa ( i ) ∈ Y for the output of the ath labeling function sa applied to the ith sample . Our goal is to obtain an estimate of the true label yi using the LF outputs λ1 ( i ) , . . . , λm ( i ) . This estimate ŷ , is used to train a downstream model . To produce it , we learn the label model P ( λ1 , λ2 , . . . , λm|y ) . The main challenge is that we never observe samples of y ; it is latent . We can summarize the weak supervision procedure in two steps : • Learning the label model : use the samples λa ( i ) to learn the label model P ( λ1 , λ2 , . . . , λm|y ) , • Perform inference : compute ŷi , or P ( yi|λ1 ( i ) , . . . , λm ( i ) ) , or a related quantity . Modeling the Sources Previous approaches , e.g. , Ratner et al . ( 2019 ) , select a particular parametric choice to model p ( λ1 , . . . , λm|y ) that balances two goals : ( i ) model richness that captures differing LF accuracies and correlations , and ( ii ) properties that permit efficient learning . Our setting demands greater generality . However , we still wish to exploit the properties of exponential family models . The natural choice is p ( λ1 , . . . , λm|y ) = 1 Z exp ( m∑ a=1 −θadY ( λa , y ) c︸ ︷︷ ︸ Accuracy Potentials + ∑ ( a , b ) ∈E −θa , bdY ( λa , λb ) c︸ ︷︷ ︸ Correlation Potentials ) . ( 1 ) Here , the set E is a set of correlations corresponding to the graphical representation of the model ( Figure 1 , right ) . Observe how source quality is modeled in ( 1 ) . If the value of θa is very large , any disagreement between the estimate λa and y is penalized through the distance dY ( λa , y ) c and so has low probability . If θa is very small , such disagreements will be common ; the source is inaccurate . We also consider a more general version of ( 1 ) . We replace−θadY ( λa , y ) with a per-source distance dθa . For example , for Y = { ±1 } d , dθa ( λa , y ) = −θTa ( λa− y ) abs , with θa ∈ Rd , generalizes the Hamming distance . Similarly , for Y = Rd , we can generalize −θa‖λa − y‖2 with dθa ( λa , y ) = − ( λa − y ) T θa ( λa − y ) , with θa ∈ Rd×d p.d. , so that LF errors are not necessarily isotropic . In the Appendix B , we detail variations and special cases of such models along with relationships to existing weak supervision work . Below , we give a selection of examples , noting that the last three of which can not be tackled with existing methods . • Binary classification : Y = { ±1 } , dY is the Hamming distance , c = 1 : this yields a shifted Ising model for standard binary classification , as in Fu et al . ( 2020 ) . • Sequence learning : Y = { ±1 } d , dY is the Hamming distance , c = 1 : this yields an Ising model for sequences , as in Sala et al . ( 2019 ) and Safranchik et al . ( 2020 ) . • Ranking : Y = Sρ , the permutation group on { 1 , . . . , ρ } , dY is the Kendall tau distance , c = 1 . This is a heterogenous Mallows model , where rankings are produced from varying-quality sources . If m = 1 , we obtain a variant of the conventional Mallows model ( Mallows , 1957 ) . • Regression : Y = R , dY is the ` 2 distance , c = 2 produces sources in Rd with Gaussian errors . • Learning on Riemannian manifolds : Y = M , a Riemannian manifold ( e.g. , hyperbolic space ) , dY is the Riemannian distance dM , c = 1 . Majority Vote and its Relatives A simplifying approach often used as a baseline in weak supervision is the majority vote . Assume that the sources are conditionally independent ( i.e . E is empty in ( 1 ) ) and all accuracies are identical . In this case , there is no need to learn the model ( 1 ) ; instead , the most “ popular ” label is used . For binary labels , this is the majority label . In the universal setting , a natural generalization is ŷMV = arg min z∈Y 1 m ∑m a=1 dY ( λ a , z ) c. ( 2 ) Special cases of ( 2 ) have their own name ; for permutations , it is the Kemeny rule ( Kemeny , 1959 ) used to solve the rank aggregation problem . For Riemannian manifolds , ŷMV is called the Fréchet or Karcher mean . Algorithm 1 : Universal Label Model Learning Input : Output of labeling functions λa ( i ) , correlation set E , prior p for Y , optionally embedding function g. Embedding : If g is not given , use Multidimensional Scaling ( MDS ) to obtain embeddings g ( λa ) ∈ Rd ∀a for a ∈ { 1 , 2 , . . . , m } do For b : ( a , b ) ∈ E Estimate Correlations : ∀i , j , Ê [ g ( λa ) ig ( λ b ) j ] = 1 n ∑n t=1 g ( λ a ( t ) ) ig ( λ b ( t ) ) j Estimate Accuracy : Pick b , c : ( a , b ) 6∈ E , ( a , c ) 6∈ E , ( b , c ) 6∈ E. if Im ( g ) = { ±1 } d ∀i , Estimate Ôa , b = P̂ ( g ( λa ) i = 1 , g ( λb ) i = 1 ) , Ôa , c , Ôb , c , Estimate ` a = P̂ ( g ( λa ) i = 1 ) , ` b , ` c Accuracies← QUADRATICTRIPLETS ( Oa , b , Oa , c , Ob , c , ` a , ` b , ` c , p , i ) else ∀i , Estimate ea , b : = Ê [ g ( λa ) ig ( λ b ) i ] = 1 n ∑n t=1 g ( λ a ( t ) ) ig ( λ b ( t ) ) i , ea , c , eb , c Accuracies← CONTINUOUSTRIPLETS ( ea , b , ea , c , eb , c , p , i ) Recover accuracy signs ( Fu et al. , 2020 ) end for return θ̂a , θ̂a , b by running the backward mapping on accuracies and correlations Majority vote , however , is insufficient in cases where there is variation in the source qualities . We must learn the label model . However , generically learning ( 1 ) is an ambitious goal . Even cases that specialize ( 1 ) in multiple ways have only recently been fully solved , e.g. , the permutation case for identical θa ’ s ) was fully characterized by Mukherjee ( 2016 ) . To overcome the challenge of generality , we opt for an embedding approach that reduces our problem to two tractable cases . Universality via Embeddings To deal with the very high level of generality , we reduce the problem to just two metric spaces : the boolean hypercube { −1 , +1 } d and Euclidean space Rd . To accomplish this , let g : Y → { ±1 } d ( or g : Y → Rd ) be an injective embedding function . The advantage of this approach is that if g is isometric—that is , distance preserving—then probabilities are preserved under g. This is because the sufficient statistics are preserved : for example , for g : Y → Rd , −θadY ( λa , y ) c = −θad ( g ( λa ) , g ( y ) ) c = −θa‖g ( λa ) − g ( y ) ‖c , yielding is a multivariate normal for c = 2 . Even if g is not isometric , there is a rich literature on low-distortion embeddings , with Bourgain ’ s theorem as a cornerstone result ( Bourgain , 1985 ) . This makes it possible to bound the error in recovering the parameters for any label type . End Model Once we have produced pseudolabels—either by applying generalized majority vote or by learning the label model and performing inference—we can use the labels to train an end model . Table 2 summarizes examples of problem types , explaining the underlying label set , the metric , the exponent c , the generalization of majority vote , the embedding space Im ( g ) , and an example of an end model .
This work studies a weakly supervised learning setup of aggregating multiple weak sources of labels into high-quality pseudo labels for learning. The proposed approach is based on building graphical models with the true labels as latent variables following existing techniques, but generalizes existing works in 1) supporting more types of task labels such as ranking, regression and in non-Euclidean spaces through approximating the graphical model terms using dot product between embeddings, and 2) algorithms for efficient learning under the embedding approximation and theoretical bounds on the estimation error using embedding-based approximation. Experiments focus on comparing weakly supervised learning performance of learning a graphical model versus using majority vote on the newly supported tasks and fully supervised learning with varying amount of labels. Results show that learning the graphical model achieved better performance than majority vote and can achieve parity reach a certain level of fully supervision.
SP:a6788a6cbd301cb34e8b8ed0fa34167c777d50ae
Universalizing Weak Supervision
1 INTRODUCTION . Weak supervision ( WS ) frameworks help overcome the labeling bottleneck : the challenge of building a large dataset for use in training data-hungry deep models . WS approaches replace hand-labeling with synthesizing multiple noisy but cheap sources , called labeling functions , applied to unlabeled data . As these sources may vary in quality and be dependent , a crucial step is to model their accuracies and correlations . Informed by this model , high-quality pseudolabels are produced and used to train a downstream model . This simple yet flexible approach is highly successful in research and industry settings ( Bach et al. , 2019 ; Ré et al. , 2020 ) . WS frameworks offer three advantages : they are ( i ) flexible and subsume many existing ways to integrate side information , ( ii ) computationally efficient , and ( iii ) they offer theoretical guarantees , including estimator consistency . Unfortunately , these benefits come at the cost of being particular to very specific problem settings : categorical , usually binary , labels . Extensions , e.g. , to time-series data ( Safranchik et al. , 2020 ) , or to segmentation masks ( Hooper et al. , 2021 ) , require a new model for source synthesis , a new algorithm , and more . We seek to side-step this expensive one-at-a time process via a universal approach , enabling WS to work in any problem setting while still providing the three advantageous properties above . The main technical challenge for universal WS is the diversity of label settings : classification , structured prediction , regression , rankings , and more . Each of these settings seemingly demands a different approach for learning the source synthesis model , which we refer to as the label model . For example , Ratner et al . ( 2019 ) assumed that the distribution of the sources and latent true label is an Ising model and relied on a property of such distributions : that the inverse covariance matrix is graph-structured . It is not clear how to lift such a property to spaces of permutations or to Riemannian manifolds . We propose a general recipe to handle any type of label . The data generation process for the weak sources is modeled with an exponential family distribution that can represent a label from any metric space ( Y , dY ) . We embed labels from Y into two tractable choices of space : the Boolean hypercube { ±1 } d and Euclidean space Rd . The label model ( used for source synthesis ) is learned with an efficient method-of-moments approach in the embedding space . It only requires solving a small number of scalar linear or quadratic equations . Better yet , for isometric embeddings , we show this estimator is consistent via finite sample bounds . Experimentally , we demonstrate our approach on five choices of problems never before tackled in WS : • Learning rankings : on two real-world rankings tasks , our approach with as few as five sources performs better than supervised learning with a smaller number of true labels . In contrast , an adaptation of the Snorkel ( Ratner et al. , 2018 ) framework can not reach this performance with as many as 18 sources . • Regression : on two real-world regression datasets , when using 6 or more labeling function , the performance of our approach is comparable to fully-supervised models . • Learning in hyperbolic spaces : on a geodesic regression task in hyperbolic space , we consistently outperform fully-supervised learning , even when using only 3 labeling functions ( LFs ) . • Estimation in generic metric spaces : in a synthetic setting of metric spaces induced by random graphs , we demonstrate that our method handles LF heterogeneity better than the majority vote baseline . • Learning parse trees : in semantic dependency parsing , we outperform strong baseline models . In each experiment , we confirm the following desirable behaviors of weak supervision : ( i ) more high-quality and independent sources yield better pseudolabels , ( ii ) more pseudolabels can yield better performance compared to training on fewer clean labels , ( iii ) when source accuracy varies , our approach outperforms generalizations of majority vote . 2 PROBLEM FORMULATION AND LABEL MODEL . We give background on weak supervision frameworks , provide the problem formulation , describe our choice of universal label model , special cases , the embedding technique we use to reduce our problem to two easilyhandled cases , and discuss end model training . Background WS frameworks are a principled way to integrate weak or noisy information to produce label estimates . These weak sources include small pieces of code expressing heuristic principles , crowdworkers , lookups in external knowledge bases , pretrained models , and many more ( Karger et al. , 2011 ; Mintz et al. , 2009 ; Gupta & Manning , 2014 ; Dehghani et al. , 2017 ; Ratner et al. , 2018 ) . Given an unlabeled dataset , users construct a set of labeling functions ( LFs ) based on weak sources and apply them to the data . The estimates produced by each LF are synthesized to produce pseudolabels that can be used to train a downstream model . Problem Formulation Let x1 , x2 , . . . , xn be a dataset of unlabeled datapoints from X . Associated with these are labels from an arbitrary metric space Y with metric dY . In conventional supervised learning , we would have pairs ( x1 , y1 ) , . . . , ( xn , yn ) ; however , in WS , we do not have access to the labels . Instead , we have estimates of y from m labeling functions ( LFs ) . Each such LF s : X → Y produces an estimate of the true label y from a datapoint x . We write λa ( i ) ∈ Y for the output of the ath labeling function sa applied to the ith sample . Our goal is to obtain an estimate of the true label yi using the LF outputs λ1 ( i ) , . . . , λm ( i ) . This estimate ŷ , is used to train a downstream model . To produce it , we learn the label model P ( λ1 , λ2 , . . . , λm|y ) . The main challenge is that we never observe samples of y ; it is latent . We can summarize the weak supervision procedure in two steps : • Learning the label model : use the samples λa ( i ) to learn the label model P ( λ1 , λ2 , . . . , λm|y ) , • Perform inference : compute ŷi , or P ( yi|λ1 ( i ) , . . . , λm ( i ) ) , or a related quantity . Modeling the Sources Previous approaches , e.g. , Ratner et al . ( 2019 ) , select a particular parametric choice to model p ( λ1 , . . . , λm|y ) that balances two goals : ( i ) model richness that captures differing LF accuracies and correlations , and ( ii ) properties that permit efficient learning . Our setting demands greater generality . However , we still wish to exploit the properties of exponential family models . The natural choice is p ( λ1 , . . . , λm|y ) = 1 Z exp ( m∑ a=1 −θadY ( λa , y ) c︸ ︷︷ ︸ Accuracy Potentials + ∑ ( a , b ) ∈E −θa , bdY ( λa , λb ) c︸ ︷︷ ︸ Correlation Potentials ) . ( 1 ) Here , the set E is a set of correlations corresponding to the graphical representation of the model ( Figure 1 , right ) . Observe how source quality is modeled in ( 1 ) . If the value of θa is very large , any disagreement between the estimate λa and y is penalized through the distance dY ( λa , y ) c and so has low probability . If θa is very small , such disagreements will be common ; the source is inaccurate . We also consider a more general version of ( 1 ) . We replace−θadY ( λa , y ) with a per-source distance dθa . For example , for Y = { ±1 } d , dθa ( λa , y ) = −θTa ( λa− y ) abs , with θa ∈ Rd , generalizes the Hamming distance . Similarly , for Y = Rd , we can generalize −θa‖λa − y‖2 with dθa ( λa , y ) = − ( λa − y ) T θa ( λa − y ) , with θa ∈ Rd×d p.d. , so that LF errors are not necessarily isotropic . In the Appendix B , we detail variations and special cases of such models along with relationships to existing weak supervision work . Below , we give a selection of examples , noting that the last three of which can not be tackled with existing methods . • Binary classification : Y = { ±1 } , dY is the Hamming distance , c = 1 : this yields a shifted Ising model for standard binary classification , as in Fu et al . ( 2020 ) . • Sequence learning : Y = { ±1 } d , dY is the Hamming distance , c = 1 : this yields an Ising model for sequences , as in Sala et al . ( 2019 ) and Safranchik et al . ( 2020 ) . • Ranking : Y = Sρ , the permutation group on { 1 , . . . , ρ } , dY is the Kendall tau distance , c = 1 . This is a heterogenous Mallows model , where rankings are produced from varying-quality sources . If m = 1 , we obtain a variant of the conventional Mallows model ( Mallows , 1957 ) . • Regression : Y = R , dY is the ` 2 distance , c = 2 produces sources in Rd with Gaussian errors . • Learning on Riemannian manifolds : Y = M , a Riemannian manifold ( e.g. , hyperbolic space ) , dY is the Riemannian distance dM , c = 1 . Majority Vote and its Relatives A simplifying approach often used as a baseline in weak supervision is the majority vote . Assume that the sources are conditionally independent ( i.e . E is empty in ( 1 ) ) and all accuracies are identical . In this case , there is no need to learn the model ( 1 ) ; instead , the most “ popular ” label is used . For binary labels , this is the majority label . In the universal setting , a natural generalization is ŷMV = arg min z∈Y 1 m ∑m a=1 dY ( λ a , z ) c. ( 2 ) Special cases of ( 2 ) have their own name ; for permutations , it is the Kemeny rule ( Kemeny , 1959 ) used to solve the rank aggregation problem . For Riemannian manifolds , ŷMV is called the Fréchet or Karcher mean . Algorithm 1 : Universal Label Model Learning Input : Output of labeling functions λa ( i ) , correlation set E , prior p for Y , optionally embedding function g. Embedding : If g is not given , use Multidimensional Scaling ( MDS ) to obtain embeddings g ( λa ) ∈ Rd ∀a for a ∈ { 1 , 2 , . . . , m } do For b : ( a , b ) ∈ E Estimate Correlations : ∀i , j , Ê [ g ( λa ) ig ( λ b ) j ] = 1 n ∑n t=1 g ( λ a ( t ) ) ig ( λ b ( t ) ) j Estimate Accuracy : Pick b , c : ( a , b ) 6∈ E , ( a , c ) 6∈ E , ( b , c ) 6∈ E. if Im ( g ) = { ±1 } d ∀i , Estimate Ôa , b = P̂ ( g ( λa ) i = 1 , g ( λb ) i = 1 ) , Ôa , c , Ôb , c , Estimate ` a = P̂ ( g ( λa ) i = 1 ) , ` b , ` c Accuracies← QUADRATICTRIPLETS ( Oa , b , Oa , c , Ob , c , ` a , ` b , ` c , p , i ) else ∀i , Estimate ea , b : = Ê [ g ( λa ) ig ( λ b ) i ] = 1 n ∑n t=1 g ( λ a ( t ) ) ig ( λ b ( t ) ) i , ea , c , eb , c Accuracies← CONTINUOUSTRIPLETS ( ea , b , ea , c , eb , c , p , i ) Recover accuracy signs ( Fu et al. , 2020 ) end for return θ̂a , θ̂a , b by running the backward mapping on accuracies and correlations Majority vote , however , is insufficient in cases where there is variation in the source qualities . We must learn the label model . However , generically learning ( 1 ) is an ambitious goal . Even cases that specialize ( 1 ) in multiple ways have only recently been fully solved , e.g. , the permutation case for identical θa ’ s ) was fully characterized by Mukherjee ( 2016 ) . To overcome the challenge of generality , we opt for an embedding approach that reduces our problem to two tractable cases . Universality via Embeddings To deal with the very high level of generality , we reduce the problem to just two metric spaces : the boolean hypercube { −1 , +1 } d and Euclidean space Rd . To accomplish this , let g : Y → { ±1 } d ( or g : Y → Rd ) be an injective embedding function . The advantage of this approach is that if g is isometric—that is , distance preserving—then probabilities are preserved under g. This is because the sufficient statistics are preserved : for example , for g : Y → Rd , −θadY ( λa , y ) c = −θad ( g ( λa ) , g ( y ) ) c = −θa‖g ( λa ) − g ( y ) ‖c , yielding is a multivariate normal for c = 2 . Even if g is not isometric , there is a rich literature on low-distortion embeddings , with Bourgain ’ s theorem as a cornerstone result ( Bourgain , 1985 ) . This makes it possible to bound the error in recovering the parameters for any label type . End Model Once we have produced pseudolabels—either by applying generalized majority vote or by learning the label model and performing inference—we can use the labels to train an end model . Table 2 summarizes examples of problem types , explaining the underlying label set , the metric , the exponent c , the generalization of majority vote , the embedding space Im ( g ) , and an example of an end model .
The paper proposes a framework for weak supervision which works for both discrete and continuous labels. The proposed framework assumes the sources are coming from an exponential family distribution and generalizes the accuracy and correlation terms in previous approaches. They use a discriminative learning setting and use triplet methods in order to compute accuracies. They evaluated the performance for regression, ranking and hyperbolic and graph learning tasks. The paper's main contribution is putting an exponential family distribution assumption which allows to use any metric space. In their experiments, they choose distances based on the problem and label type, mostly weighted L2 distance except hyperbolic dataset.
SP:a6788a6cbd301cb34e8b8ed0fa34167c777d50ae
Classification and Uncertainty Quantification of Corrupted Data using Semi-Supervised Autoencoders
1 INTRODUCTION AND MOTIVATION . Many real-world applications of data-driven classifiers , e.g. , neural networks , involve corruptions that pose significant challenges to the pretrained classifiers . Often , the corruption must previously be included , and thus already be known , during the process of training . For instance , noise ( e.g. , due to sensor imperfections ) and convolutions ( e.g. , due to lens flares or unfocused images ) are inevitable in image processing systems and may occur spontaneously and irregularly . The same holds for masking , which may occur when a foreign object occludes the actual object of interest ( e.g. , water droplets or dirt or scratches on the camera lens ) . Hence , we aim to answer the following question in this paper : How can we classify corrupted data with a parametric classifier trained exclusively on uncorrupted data ? As classifying corrupted data naturally demands a measure of uncertainty for validation ( corruption may , in the worst case , lead to a total loss of information ) , we include both model uncertainty δm and reconstruction uncertainty δr in the classification . We refer to δm as the model ’ s confidence on the classification itself . In contrast , we refer to δr as the confidence of the process on reconstructing the latent space activations given some corrupted datum . An overview of the proposed method is illustrated in Figure 1 . 2 CLASSIFICATION AND UNCERTAINTY QUANTIFICATION OF CORRUPTED DATA . 2.1 METHODOLOGY OVERVIEW AND RELATED WORK . To address the challenge of classification and uncertainty quantification of corrupted data , we propose the following core approach , illustrated in Figure 2 . 1 In the first step , we train a semi-supervised autoencoder ( Le et al. , 2018 ) that is : ( a ) capable of classifying the input data with its latent space activations h , and ( b ) capable of decoding the ( supervised ) latent space activations to generate higher-dimensional data , targeting it to be identical to the input . Except for these two constraints ( a ) and ( b ) , we do not impose any further restrictions on the autoencoder and train it as a standard feedforward neural network . 2 In the second step , we decouple the decoder g from the autoencoder and treat the decoder as a fixed generative function g. Neither retraining nor further modifying of g is done in the following steps . 3 In the third step , we include g in an ADDITIVE WHITE GAUSSIAN NOISE ( AWGN ) channelmodel d = mCg ( h ) + n. This AWGN channel model additionally involves heavy corruption like convolution C and maskingm . 4 In the final step , we approximate the posterior probability distribution P ( h|d ) in the latent space , and derive the mean and standard deviation , corresponding optimally to some uncorrupted datum g ( h ) , given the corrupted datum d. Due to supervision at the latent space , this reconstruction enables a direct classification of d including model and reconstruction uncertainty quantification , even though the decoding function was trained on uncorrupted data . We use a set of samplesH from the approximate posterior probability distribution to determine the sampling mean mean ( H ) = H as well as the set ’ s reconstruction uncertainty δr with the sampling standard deviation std ( H ) . Samples are statistically inferred by METRIC GAUSSIAN VARIATIONAL INFERENCE ( MGVI ) ( Knollmüller & Enßlin , 2020 ) . In addition to reconstruction uncertainty δr , we determine the model uncertainty by calculating the MAHALANOBIS-distance ( M-distance ) ( De Maesschalck et al. , 2000 ) in the latent space representation , slightly different to Lee et al . ( 2018 ) . For details of our implementation , see Algorithm 2 in the appendix . We here distinguish between reconstruction uncertainty δr and model uncertainty δm to evaluate the confidence of the process of inferring h and to evaluate the confidence of the classification given by the supervised latent space , respectively . Similarly to our approach , Böhm et al . ( 2019 ) and Böhm & Seljak ( 2020 ) have shown that the reconstruction of the latent space by posterior inference and by using generative models ( ( Adler & Öktem , 2018 ) , ( Seljak & Yu , 2019 ) , ( Wu et al. , 2018 ) ) for a corrupted datum can lead to an optimal image restoration with uncertainty quantification . These methods do , however , not focus on classifying the corrupted datum in the latent space , nor using supervised autoencoder structures . In the field of quantifying uncertainties of classifications there exist several methods . Predominantly BAYESIAN NEURAL NETWORKS ( BNNs ) including neural network ensembling ( ( Depeweg et al. , 2017 ) , ( Neal , 1995 ) , ( Pearce et al. , 2020 ) ) and MONTE CARLO-dropout ( MC dropout ) ( Gal & Ghahramani , 2016 ) have lately shown success . More recently , EVIDENTIAL DEEP LEARNING ( Sensoy et al. , 2018 ) was introduced as yet another probabilistic method to quantify classification uncertainty . The latter two methods will be compared to our method in Section 3 . Finally , various methods to perform image restoration exist in the literature ( see ( Dong et al. , 2012 ) , ( Lehtinen et al. , 2018 ) , ( Mao et al. , 2016a ) , ( Mao et al. , 2016b ) , ( Zoran & Weiss , 2011 ) ) . Similar to the well-known denoising autoencoder ( Vincent et al. , 2008 ) , almost all methods require prior knowledge of the corruption to be included in the training data . We argue that these methods lack flexibility , as they deal with one specific type of corruption . Once the model is trained , one can not include other corruption types without retraining . Moreover , many methods focus on either classification or eliminating corruption , but none of the named approaches combine both . 2.2 GENERATIVE MODEL AND BAYESIAN INFERENCE WITH NEURAL NETWORKS . The first step of our method is to train a semi-supervised autoencoder . The autoencoder involves the encoding function f ( mapping data x ∈ Rp to the latent space representation with activations h ∈ Rz , z ∈ N ) as well as the decoding function g ( mapping h to the data space representation x̂ ∈ Rp , p ∈ N , p z ) . Parameters of f : Rp → Rz and g : Rz → Rp are optimized via a combination of two loss terms Lgf ( representing reconstruction loss in the data space ) and Lf ( representing classification loss in the latent space ) : LSAE = Lgf ( g ( f ( x ) ) , x ) + Lf ( f ( x ) j , y ) = Lgf ( x̂ , x ) + Lf ( hj , y ) . ( 1 ) where j denotes the number of dimensions of h that are supervised , i.e. , hj = [ h1 , . . . , hj ] . The number of classes to be classified equals j . After normalizing all data samples ( i.e. , pixel values range in between [ 0 , 1 ] ) , we use the corresponding cross-entropy for each respective loss term to penalize false classifications in the latent space and inaccurate reconstructions in the data space . The binary cross-entropy represents the reconstruction loss , while we use the sparse categorical cross-entropy on integer labels y = [ 0 , 1 , . . . , 9 ] to represent the classification loss . Note that for training , we process the latent space activations h through the softmax-function before feeding them to the sparse categorical cross-entropy . However , the softmax-function is not included as an activation function in our neural network . We minimize the general loss function Equation ( 1 ) using Adam optimizer ( Kingma & Ba , 2015 ) 1 . Once the training procedure has converged , we decouple the decoding function g from the autoencoder and extend it to model different types of corruption ( this is necessary as the decoder is trained on uncorrupted data ) . Without loss of generality , we use an AWGN model including the nonlinearity g ( h ) , which additionally involves maskingm and convolution C on g : d = mCg ( h ) + n. ( 2 ) In the data space , additive white Gaussian noise , n ∈ Rp ∼ N ( 0 , Σn ) , is applied to the decoded latent space signal g ( h ) , which yields the corrupted data d ∈ Rp . Note for the implementation of h = Aξ + µh , the reparametrization trick Kingma & Welling ( 2014 ) is applied.2 In addition to AWGN , we include corruptions of masking m and convolutions C , which are both linear operations . See the Appendix A , for details on the implementation of n , m and C. Since we are interested in reconstructing the latent space activation h from d alongside uncertainty quantification , the goal is to determine the posterior distribution P ( h|d ) ∝ P ( d|h ) P ( h ) . The log-probability distribution reads − lnP ( h|d ) = 1 2 ( ( d−mCg ( h ) ) T Σ−1n ( d−mCg ( h ) ) + ( hTΣ−1h h ) ) + const. , ( 3 ) where ( · ) T denotes the matrix transpose . Since we are finally interested in the analytically intractable mean of h , 〈h〉P ( h|d ) = ∫ hP ( h|d ) dh , we approximately determine mean and variance of P ( h|d ) by applying MGVI . Similar to other variational inference methods ( Kingma & Welling ( 2014 ) , Kucukelbir et al . ( 2017 ) ) , MGVI approximates the distribution by a simper , but tractable distribution from within a variational family , Q ( h ) . The parameters of Q ( h ) , i.e. , mean η and covariance ∆ , are obtained by the minimization of the variational lower bound . The size of a full variational covariance scales quadratically with the number of latent variables . Taking these limitations into account , we employ MGVI , which locally approximates the target distribution using the inverse Fisher metric as an uncertainty estimate around the variational mean η , for which we optimize . The approximation is represented by an ensemble of samplesH = { h̃1 , h̃2 , . . . , h̃n } with h̃n ∈ Rz , which we use for our analysis . ( ̃· ) refers to the inferred sample . We here call H the posterior mean and δr the posterior standard deviation , or , the reconstruction uncertainty . 2.3 CLASSIFICATION AND UNCERTAINTY QUANTIFICATION . The supervision of the latent space allows us to classify the input d in a straightforward manner by evaluating the sampling mean and sampling standard deviation of the set H. While the sampling mean of the set mean ( H ) = H gives the class of the most likely classification , the sampling standard deviation reflects the reconstruction uncertainty δr of the latent space posterior distribution . δr depends on the type and magnitude of the corruption as well as the prior probability distribution we include in the channel model ( Equation ( 3 ) ) . We visualize this dependency with various experiments , see Figure 4 and Figure 10 . The straightforward classification does not yet provide information about the model uncertainty on the classification . Since we are additionally interested in the uncertainty of the model , δm , we evaluate the M-distance of all samples in H to all class conditional distributions in the latent space . The closest class conditional distribution to a single sample h̃n corresponds to the most likely class . The absolute value of the M-distance to the closest class conditional distribution serves as a measure of the 1Test accuracy of [ 98 , 6 % ; 89 , 4 % ] on the encoding function f with [ MNIST ; Fashion-MNIST ] . 2Σh = cov ( f ( XVal ) ) , Σh = AA T , Σh ∈ Rz×z , ξ ∼ N ( 0 , I ) , ξ ∈ Rz , µh = mean ( XVal ) , µh ∈ Rz model uncertainty δm . In this work , all class conditional distributions in the latent space are assumed to follow multivariate Gaussian distributions with covariance Σi and mean µi . We determine the parameters of these class conditional distributions by passing the uncorrupted data samples from an independent ( i.e. , independent of training and testing ) datasetXVal ( see Section 3 ) through the encoder f . This method is an implementation slightly different to Lee et al . ( 2018 ) , where it was shown that the Mahalanobis metric is not only an accurate classifier in this context but also a reliable out-of-distribution detector reflecting the model uncertainty . Lee et al . ( 2018 ) uses tied covariance matrices instead of individual covariance matrices for each class conditional distribution , as done in our method . Concretely , we calculate the M-distance of all samples inH to all class-conditional clusters Ck within the latent space , each characterized by µCk and ΣCk for K-classes . We then determine sampling mean δm and sampling standard deviation δr of the M-distances of all samples . This way , we can represent reconstruction uncertainty by the sampling standard deviation ( resulting directly from the shape of the inferred posterior distribution ) and model uncertainty by the absolute value of the M-distance . For a graphical illustration , refer to Figure 3 . The pseudo-code is given in Algorithm 2 in the appendix .
This paper proposes a false classification detection method. The proposed method first trains an autoencoder using uncorrupted data to obtain a decoder to define a generative model. The generative model is then exploited for quantifying the uncertainty of the model. Using MGVI, the generative model infers the posterior distribution of the corresponding latent vector for each data. The latent space can explain the model uncertainty, which can be measured by the Mahalanobis distance. From experiments, it is shown that the proposed method can detect corrupted data more accurately compared to MC dropout and EDL for MNIST dataset.
SP:0c654d1ec408359642e987d4e84a445fbd2d41fb
Classification and Uncertainty Quantification of Corrupted Data using Semi-Supervised Autoencoders
1 INTRODUCTION AND MOTIVATION . Many real-world applications of data-driven classifiers , e.g. , neural networks , involve corruptions that pose significant challenges to the pretrained classifiers . Often , the corruption must previously be included , and thus already be known , during the process of training . For instance , noise ( e.g. , due to sensor imperfections ) and convolutions ( e.g. , due to lens flares or unfocused images ) are inevitable in image processing systems and may occur spontaneously and irregularly . The same holds for masking , which may occur when a foreign object occludes the actual object of interest ( e.g. , water droplets or dirt or scratches on the camera lens ) . Hence , we aim to answer the following question in this paper : How can we classify corrupted data with a parametric classifier trained exclusively on uncorrupted data ? As classifying corrupted data naturally demands a measure of uncertainty for validation ( corruption may , in the worst case , lead to a total loss of information ) , we include both model uncertainty δm and reconstruction uncertainty δr in the classification . We refer to δm as the model ’ s confidence on the classification itself . In contrast , we refer to δr as the confidence of the process on reconstructing the latent space activations given some corrupted datum . An overview of the proposed method is illustrated in Figure 1 . 2 CLASSIFICATION AND UNCERTAINTY QUANTIFICATION OF CORRUPTED DATA . 2.1 METHODOLOGY OVERVIEW AND RELATED WORK . To address the challenge of classification and uncertainty quantification of corrupted data , we propose the following core approach , illustrated in Figure 2 . 1 In the first step , we train a semi-supervised autoencoder ( Le et al. , 2018 ) that is : ( a ) capable of classifying the input data with its latent space activations h , and ( b ) capable of decoding the ( supervised ) latent space activations to generate higher-dimensional data , targeting it to be identical to the input . Except for these two constraints ( a ) and ( b ) , we do not impose any further restrictions on the autoencoder and train it as a standard feedforward neural network . 2 In the second step , we decouple the decoder g from the autoencoder and treat the decoder as a fixed generative function g. Neither retraining nor further modifying of g is done in the following steps . 3 In the third step , we include g in an ADDITIVE WHITE GAUSSIAN NOISE ( AWGN ) channelmodel d = mCg ( h ) + n. This AWGN channel model additionally involves heavy corruption like convolution C and maskingm . 4 In the final step , we approximate the posterior probability distribution P ( h|d ) in the latent space , and derive the mean and standard deviation , corresponding optimally to some uncorrupted datum g ( h ) , given the corrupted datum d. Due to supervision at the latent space , this reconstruction enables a direct classification of d including model and reconstruction uncertainty quantification , even though the decoding function was trained on uncorrupted data . We use a set of samplesH from the approximate posterior probability distribution to determine the sampling mean mean ( H ) = H as well as the set ’ s reconstruction uncertainty δr with the sampling standard deviation std ( H ) . Samples are statistically inferred by METRIC GAUSSIAN VARIATIONAL INFERENCE ( MGVI ) ( Knollmüller & Enßlin , 2020 ) . In addition to reconstruction uncertainty δr , we determine the model uncertainty by calculating the MAHALANOBIS-distance ( M-distance ) ( De Maesschalck et al. , 2000 ) in the latent space representation , slightly different to Lee et al . ( 2018 ) . For details of our implementation , see Algorithm 2 in the appendix . We here distinguish between reconstruction uncertainty δr and model uncertainty δm to evaluate the confidence of the process of inferring h and to evaluate the confidence of the classification given by the supervised latent space , respectively . Similarly to our approach , Böhm et al . ( 2019 ) and Böhm & Seljak ( 2020 ) have shown that the reconstruction of the latent space by posterior inference and by using generative models ( ( Adler & Öktem , 2018 ) , ( Seljak & Yu , 2019 ) , ( Wu et al. , 2018 ) ) for a corrupted datum can lead to an optimal image restoration with uncertainty quantification . These methods do , however , not focus on classifying the corrupted datum in the latent space , nor using supervised autoencoder structures . In the field of quantifying uncertainties of classifications there exist several methods . Predominantly BAYESIAN NEURAL NETWORKS ( BNNs ) including neural network ensembling ( ( Depeweg et al. , 2017 ) , ( Neal , 1995 ) , ( Pearce et al. , 2020 ) ) and MONTE CARLO-dropout ( MC dropout ) ( Gal & Ghahramani , 2016 ) have lately shown success . More recently , EVIDENTIAL DEEP LEARNING ( Sensoy et al. , 2018 ) was introduced as yet another probabilistic method to quantify classification uncertainty . The latter two methods will be compared to our method in Section 3 . Finally , various methods to perform image restoration exist in the literature ( see ( Dong et al. , 2012 ) , ( Lehtinen et al. , 2018 ) , ( Mao et al. , 2016a ) , ( Mao et al. , 2016b ) , ( Zoran & Weiss , 2011 ) ) . Similar to the well-known denoising autoencoder ( Vincent et al. , 2008 ) , almost all methods require prior knowledge of the corruption to be included in the training data . We argue that these methods lack flexibility , as they deal with one specific type of corruption . Once the model is trained , one can not include other corruption types without retraining . Moreover , many methods focus on either classification or eliminating corruption , but none of the named approaches combine both . 2.2 GENERATIVE MODEL AND BAYESIAN INFERENCE WITH NEURAL NETWORKS . The first step of our method is to train a semi-supervised autoencoder . The autoencoder involves the encoding function f ( mapping data x ∈ Rp to the latent space representation with activations h ∈ Rz , z ∈ N ) as well as the decoding function g ( mapping h to the data space representation x̂ ∈ Rp , p ∈ N , p z ) . Parameters of f : Rp → Rz and g : Rz → Rp are optimized via a combination of two loss terms Lgf ( representing reconstruction loss in the data space ) and Lf ( representing classification loss in the latent space ) : LSAE = Lgf ( g ( f ( x ) ) , x ) + Lf ( f ( x ) j , y ) = Lgf ( x̂ , x ) + Lf ( hj , y ) . ( 1 ) where j denotes the number of dimensions of h that are supervised , i.e. , hj = [ h1 , . . . , hj ] . The number of classes to be classified equals j . After normalizing all data samples ( i.e. , pixel values range in between [ 0 , 1 ] ) , we use the corresponding cross-entropy for each respective loss term to penalize false classifications in the latent space and inaccurate reconstructions in the data space . The binary cross-entropy represents the reconstruction loss , while we use the sparse categorical cross-entropy on integer labels y = [ 0 , 1 , . . . , 9 ] to represent the classification loss . Note that for training , we process the latent space activations h through the softmax-function before feeding them to the sparse categorical cross-entropy . However , the softmax-function is not included as an activation function in our neural network . We minimize the general loss function Equation ( 1 ) using Adam optimizer ( Kingma & Ba , 2015 ) 1 . Once the training procedure has converged , we decouple the decoding function g from the autoencoder and extend it to model different types of corruption ( this is necessary as the decoder is trained on uncorrupted data ) . Without loss of generality , we use an AWGN model including the nonlinearity g ( h ) , which additionally involves maskingm and convolution C on g : d = mCg ( h ) + n. ( 2 ) In the data space , additive white Gaussian noise , n ∈ Rp ∼ N ( 0 , Σn ) , is applied to the decoded latent space signal g ( h ) , which yields the corrupted data d ∈ Rp . Note for the implementation of h = Aξ + µh , the reparametrization trick Kingma & Welling ( 2014 ) is applied.2 In addition to AWGN , we include corruptions of masking m and convolutions C , which are both linear operations . See the Appendix A , for details on the implementation of n , m and C. Since we are interested in reconstructing the latent space activation h from d alongside uncertainty quantification , the goal is to determine the posterior distribution P ( h|d ) ∝ P ( d|h ) P ( h ) . The log-probability distribution reads − lnP ( h|d ) = 1 2 ( ( d−mCg ( h ) ) T Σ−1n ( d−mCg ( h ) ) + ( hTΣ−1h h ) ) + const. , ( 3 ) where ( · ) T denotes the matrix transpose . Since we are finally interested in the analytically intractable mean of h , 〈h〉P ( h|d ) = ∫ hP ( h|d ) dh , we approximately determine mean and variance of P ( h|d ) by applying MGVI . Similar to other variational inference methods ( Kingma & Welling ( 2014 ) , Kucukelbir et al . ( 2017 ) ) , MGVI approximates the distribution by a simper , but tractable distribution from within a variational family , Q ( h ) . The parameters of Q ( h ) , i.e. , mean η and covariance ∆ , are obtained by the minimization of the variational lower bound . The size of a full variational covariance scales quadratically with the number of latent variables . Taking these limitations into account , we employ MGVI , which locally approximates the target distribution using the inverse Fisher metric as an uncertainty estimate around the variational mean η , for which we optimize . The approximation is represented by an ensemble of samplesH = { h̃1 , h̃2 , . . . , h̃n } with h̃n ∈ Rz , which we use for our analysis . ( ̃· ) refers to the inferred sample . We here call H the posterior mean and δr the posterior standard deviation , or , the reconstruction uncertainty . 2.3 CLASSIFICATION AND UNCERTAINTY QUANTIFICATION . The supervision of the latent space allows us to classify the input d in a straightforward manner by evaluating the sampling mean and sampling standard deviation of the set H. While the sampling mean of the set mean ( H ) = H gives the class of the most likely classification , the sampling standard deviation reflects the reconstruction uncertainty δr of the latent space posterior distribution . δr depends on the type and magnitude of the corruption as well as the prior probability distribution we include in the channel model ( Equation ( 3 ) ) . We visualize this dependency with various experiments , see Figure 4 and Figure 10 . The straightforward classification does not yet provide information about the model uncertainty on the classification . Since we are additionally interested in the uncertainty of the model , δm , we evaluate the M-distance of all samples in H to all class conditional distributions in the latent space . The closest class conditional distribution to a single sample h̃n corresponds to the most likely class . The absolute value of the M-distance to the closest class conditional distribution serves as a measure of the 1Test accuracy of [ 98 , 6 % ; 89 , 4 % ] on the encoding function f with [ MNIST ; Fashion-MNIST ] . 2Σh = cov ( f ( XVal ) ) , Σh = AA T , Σh ∈ Rz×z , ξ ∼ N ( 0 , I ) , ξ ∈ Rz , µh = mean ( XVal ) , µh ∈ Rz model uncertainty δm . In this work , all class conditional distributions in the latent space are assumed to follow multivariate Gaussian distributions with covariance Σi and mean µi . We determine the parameters of these class conditional distributions by passing the uncorrupted data samples from an independent ( i.e. , independent of training and testing ) datasetXVal ( see Section 3 ) through the encoder f . This method is an implementation slightly different to Lee et al . ( 2018 ) , where it was shown that the Mahalanobis metric is not only an accurate classifier in this context but also a reliable out-of-distribution detector reflecting the model uncertainty . Lee et al . ( 2018 ) uses tied covariance matrices instead of individual covariance matrices for each class conditional distribution , as done in our method . Concretely , we calculate the M-distance of all samples inH to all class-conditional clusters Ck within the latent space , each characterized by µCk and ΣCk for K-classes . We then determine sampling mean δm and sampling standard deviation δr of the M-distances of all samples . This way , we can represent reconstruction uncertainty by the sampling standard deviation ( resulting directly from the shape of the inferred posterior distribution ) and model uncertainty by the absolute value of the M-distance . For a graphical illustration , refer to Figure 3 . The pseudo-code is given in Algorithm 2 in the appendix .
This paper presents a method that simultaneously classifies corrupted data and quantifies uncertainty, despite the model being fitted only on uncorrupted data. The idea is to fit a semi-supervised autoencoder. Then, the encoded representation $h$ is fed into a decoder $g$, and the output $g(h)$ is augmented with various perturbations (additive noise, blur, and masking), resulting in a corrupted image $d$. Lastly, the method of MGVI is used to estimate $P(h \mid d)$, which is then used both to classify $d$ and to estimate the uncertainty. In experiments, the authors show the advantage of this method over baseline methods.
SP:0c654d1ec408359642e987d4e84a445fbd2d41fb
VISCOS Flows: Variational Schur Conditional Sampling with Normalizing Flows
1 INTRODUCTION . Conditional data generation is a ubiquitous and challenging problem , even more so when the data is high dimensional . If the partitioning of the conditioned data and conditioning itself can be established in advance , a wide variety of inference tools can be used ranging from Bayesian inference ( Gelman , 2013 ) and its approximations ( e.g . variational inference ( Klys et al. , 2018 ) ) to Gaussian ( Williams & Rasmussen , 2006 ) or Neural Processes ( Garnelo et al. , 2018 ) . The task is considerably more challenging when the partitioning can not be anticipated . This is met in a wide range of applications , from few shots learning ( Wang et al. , 2020 ) to super resolution image generation ( Bashir et al. , 2021 ) , high-dimensional Bayesian optimisation ( Moriconi et al. , 2020 ; Gomez-Bombarelli et al. , 2018 ) , learning with incomplete datasets ( Yoon et al. , 2018 ; Li et al. , 2019 ; Richardson et al. , 2020 ) , image inpainting ( Elharrouss et al. , 2020 ) and many more . If we can assume that the data is normally distributed , the conditional distribution can be computed in closed form using Gaussian elimination and the Schur complement . This observation paved the way for Gaussian Processes ( GPs ) solutions ( Williams & Rasmussen , 2006 ) and alike . Although they constitute a solid component of the modern machine learning toolbox , the Gaussian assumption is quite restrictive in nature . Indeed : GPs in their vanilla form are used when the observations are uni-dimensional and when inference has to be performed on a subset of these variables . As a consequence , alternative tools may need to be used when dealing with even moderately dimensional data , or when part of the input data can be missing . It is well-established that normalizing flows ( NFs ) ( Rezende & Mohamed , 2015 ) can model arbitrarily complex joint distributions . Furthermore , they naturally embed together the joint probability of any partition of data that could occur during training or at test time . Hence , it is tempting to make use of NFs to perform conditional sampling , but only a few works have provided solutions each with some limitations . ( Cannella et al. , 2020 ) proposed Projected Latent Monte Carlo Markov Chains ( PL-MCMC ) to generate samples whose probability is guaranteed to converge to the desired conditional distribution as the chain gets longer . While such convergence is certainly an advantage , one can identify several important drawbacks : first , as for every other Monte Carlo sampling method , the mixing time can not be known in advance , and hence one may wonder whether the samples that are gathered truly belong to the conditional distribution . Second , although the observed part of the imputed data converges towards the true values , a difference between the two may persist . Third , training a model comprising of missing data with PL-MCMC is achieved through a Monte Carlo Expectation Maximisation ( MCEM ) scheme ( Dempster et al. , 1977 ; Neath , 2013 ) . Under appropriate assumptions , MCEM is guaranteed to converge to a local maximiser of the log-likelihood function , but this is conditioned on the quality of the data generated by the Monte Carlo algorithm . Consequently , as the optimisation progresses towards the optimum , longer chains may be required to ensure convergence or even to obtain convincing results ( Neath , 2013 ) . MCFlow ( Richardson et al. , 2020 ) relies on an auxiliary feedforward neural network whose role is to produce latent embeddings with maximum a posteriori likelihood values . Those values are constrained to lie on the manifold of latent vectors whose mapping to the observed space match the observations . MCFlow produces state-of-the-art results in terms of image quality or classification accuracy when compared to GAN-based methods such as ( Yoon et al. , 2018 ; Li et al. , 2019 ) . However , this method requires a set of adjustments to the model and needs retraining for any additional incomplete data . On the other hand , ACFlow Li et al . ( 2020 ) learns all conditional distributions for all possible masking operations , which can be quite computationally expensive . As such , both MCFlow and ACFlow can not be applied to post-training data completion as PL-MCMC . Several conditioning techniques have been used with NFs in contexts where the joint probability distribution of the conditioning and conditioned random variable is of no interest . For instance , ( Rezende & Mohamed , 2015 ; van den Berg et al. , 2018 ) extended the amortisation technique used in Variational Auto-Encoders ( VAEs ) ( Kingma & Welling , 2013 ) to the parameters of the flow . ( Winkler et al. , 2019 ) extended this use to the scenario of conditional likelihood estimation , while ( Trippe & Turner , 2018 ) provided a Variational Bayes view on this problem by using a Bayesian Neural Network for conditioning feature embedding . On a different line of work , ( Kingma & Dhariwal , 2018 ) use a heuristic form of a posteriori conditioning . The generative flow is trained with a classifier over the latent space , which forces the latent representation location to be indicative of the class they belong to . At test time , some parametric distribution is fitted on the latent representations to account for the attributes of the images that are to be generated . ( Nguyen et al. , 2019 ) used a hybrid approach , whereby the conditioning and conditioned variables joint distribution is modelled by a normalizing flow in such a way that conditional sampling of one given the other is straightforward to apply . Still , either with this approach or the others above , the knowledge of what part of the data constitutes the conditioning random variable is required beforehand . Our Contribution : We propose a conditional NF sampling method in the following setting : a ) conditional data generation is performed after a model has been trained without taking conditional sampling into account ; b ) training data may be itself incomplete , in the sense that some training features might be missing from examples in the training dataset ; c ) the subset of missing data may not be known in advance , and it could also be randomly distributed across input data . Importantly , we are interested in deriving a method whereby the distribution of the generated data faithfully reflects the Bayesian perspective . Our derivations heavily rely on the Schur complement properties in the spirit of the conditional Gaussian distributions . To highlight this feature we call our approach VISCOS Flows : VarIational Schur COnditional Sampling with normalizing Flows . The use of a variational posterior brings some advantages : for example , with a single fitted posterior , multiple samples can quickly be recovered . We also show how to amortise the cost of inference across multiple partially observed items by using inference networks ( Kingma & Welling , 2013 ) . 2 VISCOS FLOWS : VARIATIONAL SCHUR CONDITIONAL SAMPLING WITH NORMALIZING FLOWS . 2.1 PRELIMINARIES AND PROBLEM FORMULATION . Preliminaries : Consider a C1-diffeomorphism f ( X ) : X → Y where X ⊆ Rd , Y ⊆ Rd are open sets and define the inverse of f to be g ( y ) ≡ f−1 : Y → X . Consider the case where the random variable Y = f ( X ) while X is distributed according to the base distribution P0 ( X ) with density p0 ( x ) . According to the change of variable rule Y has a log-density given by the following formula : log p ( y ) = log p0 ( g ( y ) ) + log |det ∇yg ( y ) | = log p0 ( x ) − log |det∇xf ( x ) | . ( 1 ) We will use two set of complementary indexes covering [ d ] : observable O ⊂ [ d ] with cardinality # O = dO , and hidden H ⊂ [ d ] with # H = dH and O ∪H = [ d ] . In what follows , without loss of generality we assume O = { 0 , . . . , dO − 1 } ) and H = { dO , . . . , d } , and use the following notation : f ( x ) = ( fO ( xO ; xH ) fH ( xH ; xO ) ) , ∇xf ( x ) = J ( x ) = ( JOO ( x ) JOH ( x ) JH O ( x ) JHH ( x ) ) , and we will use a similar partition for g ( y ) and its Jacobian G ( y ) . We will use the notation mOO ( J ) = JOO to denote sub-matrix masking . The central to our approach is the Schur complements and its properties and , in particular , the following well-known identities : GHH ( f ( x ) ) = ( JHH ( x ) − JH O ( x ) ( JOO ( x ) ) −1 JOH ( x ) ) −1 , ( 2 ) det ( J ) = det ( JOO ) det ( JHH − JH O ( JOO ) −1 JOH ) = det ( JOO ) det ( GHH ) . ( 3 ) We denote by A the “ detached ” version of a matrix-valued function A ( x ) , i.e . a matrix whose values match those ofA but have a null gradient . Problem formulation : Consider a set Y containing some samples of interest , for example , images . Assume also a pre-trained normalizing flow , i.e. , a map f : X → Y with X , Y ⊆ Rd . In what follows we relax the assumption on the pre-trained flow , but for streamlining the presentation we assume that the normalizing flow is given at this point . Let us now assume that the observation sample y is partially missing or masked ( for instance , photographer ’ s finger is covering part of the image ) . In particular , the observation is split into observed YO = { yO | y ∈ Y } and hidden YH = { yH | y ∈ Y } regions , whereO , H are observed and hidden indexes , respectively . Our goal is to sample yH from the conditional distribution over a partial observation Y O ∈ YO . While this distribution has a density given by p ( yH | yO ) = p ( y ) p ( yO ) , computing p ( yO ) = ∫ p ( yO , yH ) dyH is in general intractable . Since it is often easier to sample from and optimise in the latent space we will aim to express all distributions in the space X . First , we introduce a partition into observed and hidden indexes in the latent space X . Assumption A0 . Both spaces X and Y are partitioned as O = { 0 , . . . , dO − 1 } and H = { dO , . . . , d } . We stress that Assumption A0 is made only to simplify the exposition . In general , we can have arbitrary partitions of the observed space , which will not affect our algorithm . While this partition seems somewhat artificial , it enables the use of the Schur complement in our derivations . Choosing the same partition in X and Y is natural for the invertible residual networks ( iResNet ) ( Behrmann et al. , 2019 ; Chen et al. , 2019 ) due the structure of the flow . This observation also holds for any flows sharing a residual structure x+h ( x ) with an activation h ( e.g . ReLU ) , such as Planar and Radial flows ( Rezende & Mohamed , 2015 ) , Sylvester flows ( van den Berg et al. , 2018 ) , continuous flows ( Chen et al. , 2018 ; Onken et al. , 2021 ; Mathieu & Nickel , 2020 ) or – to some extent – Implicit NFs ( Lu et al. , 2021 ) , where at each layer t of the flow , the derivative of the output xit+1 with respect to the input layer xt will be dominated by the ith component of this input . We note that the partition in latent space X can be made different from the partition in the observed Y for numerical purposes . For example , picking a latent space partitioning with a maximal value of log |det ( JOO ) | will ensure that the matrix JOO is not ill-conditioned . Indeed , for any matrix A we have 2 log |det ( A ) | = log ( det ( AAT ) ) = ∑ i log ( σi ( A ) ) , where σi are the singular values of A . Thus promoting larger singular values will improve conditioning . We empirically found that across several architectures ( iResNet , Planar , Radial , Sylvester and Implicit flows ) , this approach leads to a well-behaving algorithm . Maximising log |det ( JOO ) | to choose partitioning can also potentially be used for coupling flow architectures ( e.g . Glow ( Kingma & Dhariwal , 2018 ) or RealNVPs ( Dinh et al. , 2016 ) ) , however , this requires additional research . While Assumption A0 is made for convenience of notation , the following assumption on f is necessary . Assumption A1 . The map f : X → Y and its restriction fO ( XO ; XH ) : XO → YO for all xH ∈ XH are C1-diffeomorphisms . Let us now formally define our reparametrisation from Y space to X as follows : xH ( yH , yO ) : = gH ( yH ; yO ) , ( 4 ) xO ( xH , yO ) such that fO ( xO ; xH ) − yO = 0 . ( 5 ) Our reparametrisation is well-posed as stated in the following lemma with the proof in Appendix A. Lemma 1 If Assumption A1 holds then the reparametrisation in Equations 4 and 5 is well-posed , i.e , gH ( yH , yO ) is a diffeomorphism , while the map xO ( xH , yO ) exists and it is differentiable . Now we can rewrite Equation 1 using Equation 3 in simpler terms : log p ( y ) = log p0 ( x H ) + log ∣∣detGHH ∣∣+ log p0 ( xO ) − log ∣∣det JOO∣∣ . ( 6 ) Here we used the fact that the base distribution p0 ( x ) can be factorised as a product of independent univariate distributions , and hence p0 ( x ) = p0 ( xO ) p0 ( xH ) . Now we can define the variational distribution in terms of the latent samples as follows : q ( yH ; yO ) = q ( xH ) ∣∣detGHH ∣∣ . Combining Equation 6 with our variational distributions we obtain the evidence lower bound : LELBO = Eq ( yH ; yO ) [ log p ( yH , yO ) ] +H [ q ( yH ; yO ) ] = E q ( xH ) [ log p0 ( xH ) q ( xH ) + log p0 ( xO ) − log ∣∣∣det JOO ( xO , xH ) ∣∣∣ ] , ( 7 ) where H [ · ] is the entropy and we have taken advantage of the fact that the log-absolute determinant ( LAD ) of the Jacobian belonging to the approximate posterior q ( yH ; yO ) cancels with the one from the joint log-probability given by the model ( i.e. , the terms withGHH cancel each other out ) . Furthermore , we have eliminated the dependence on the variable yH completely instead we treat xH as a variational variable . We note here that our , at the first sight , artificial partition of the latent space into observable xO and hidden xH parts was the key allowing for the reparametrisation from Y space to X space . In particular , we used the invertibility of sub-jacobiansGHH and JOO allowing to map between observable and hidden samples in the X and Y spaces . Our approach is in the spirit of Gaussian conditional sampling and Schur complement , which justifies the method ’ s name . Note that this ELBO loss can be added to other losses , e.g. , to a classifier loss as we do in what follows . Note that this ELBO can be used in combination with other losses . Thus the normalizing flow can be trained simultaneously while performing conditional sampling of missing data . This way we can treat masked data during training as well as after training . There are still two technical issues that we cover in the following subsections before presenting our algorithm . First , we need to get xO by solving Equation 5 . Second , we need to discuss the computation of the ELBO gradient with respect to xH . Specifically , we need to reparametrise xO and compute the LAD gradient . As the following two sections are quite technical the reader interested in the algorithm itself can skip to Subsection 2.4 .
This paper presents a variant of flow, VISCOS flow, utilizing the Schur complement. This flow model is applied to the in-painting task, which estimates the unobserved feature variables given the observed features. Given this in-painting task, the inference requires the modeling on the latent variable, which results in the ELBO derivation on such latent variables as variational variables.
SP:3759750e13689e4641744d077e21647795b03765
VISCOS Flows: Variational Schur Conditional Sampling with Normalizing Flows
1 INTRODUCTION . Conditional data generation is a ubiquitous and challenging problem , even more so when the data is high dimensional . If the partitioning of the conditioned data and conditioning itself can be established in advance , a wide variety of inference tools can be used ranging from Bayesian inference ( Gelman , 2013 ) and its approximations ( e.g . variational inference ( Klys et al. , 2018 ) ) to Gaussian ( Williams & Rasmussen , 2006 ) or Neural Processes ( Garnelo et al. , 2018 ) . The task is considerably more challenging when the partitioning can not be anticipated . This is met in a wide range of applications , from few shots learning ( Wang et al. , 2020 ) to super resolution image generation ( Bashir et al. , 2021 ) , high-dimensional Bayesian optimisation ( Moriconi et al. , 2020 ; Gomez-Bombarelli et al. , 2018 ) , learning with incomplete datasets ( Yoon et al. , 2018 ; Li et al. , 2019 ; Richardson et al. , 2020 ) , image inpainting ( Elharrouss et al. , 2020 ) and many more . If we can assume that the data is normally distributed , the conditional distribution can be computed in closed form using Gaussian elimination and the Schur complement . This observation paved the way for Gaussian Processes ( GPs ) solutions ( Williams & Rasmussen , 2006 ) and alike . Although they constitute a solid component of the modern machine learning toolbox , the Gaussian assumption is quite restrictive in nature . Indeed : GPs in their vanilla form are used when the observations are uni-dimensional and when inference has to be performed on a subset of these variables . As a consequence , alternative tools may need to be used when dealing with even moderately dimensional data , or when part of the input data can be missing . It is well-established that normalizing flows ( NFs ) ( Rezende & Mohamed , 2015 ) can model arbitrarily complex joint distributions . Furthermore , they naturally embed together the joint probability of any partition of data that could occur during training or at test time . Hence , it is tempting to make use of NFs to perform conditional sampling , but only a few works have provided solutions each with some limitations . ( Cannella et al. , 2020 ) proposed Projected Latent Monte Carlo Markov Chains ( PL-MCMC ) to generate samples whose probability is guaranteed to converge to the desired conditional distribution as the chain gets longer . While such convergence is certainly an advantage , one can identify several important drawbacks : first , as for every other Monte Carlo sampling method , the mixing time can not be known in advance , and hence one may wonder whether the samples that are gathered truly belong to the conditional distribution . Second , although the observed part of the imputed data converges towards the true values , a difference between the two may persist . Third , training a model comprising of missing data with PL-MCMC is achieved through a Monte Carlo Expectation Maximisation ( MCEM ) scheme ( Dempster et al. , 1977 ; Neath , 2013 ) . Under appropriate assumptions , MCEM is guaranteed to converge to a local maximiser of the log-likelihood function , but this is conditioned on the quality of the data generated by the Monte Carlo algorithm . Consequently , as the optimisation progresses towards the optimum , longer chains may be required to ensure convergence or even to obtain convincing results ( Neath , 2013 ) . MCFlow ( Richardson et al. , 2020 ) relies on an auxiliary feedforward neural network whose role is to produce latent embeddings with maximum a posteriori likelihood values . Those values are constrained to lie on the manifold of latent vectors whose mapping to the observed space match the observations . MCFlow produces state-of-the-art results in terms of image quality or classification accuracy when compared to GAN-based methods such as ( Yoon et al. , 2018 ; Li et al. , 2019 ) . However , this method requires a set of adjustments to the model and needs retraining for any additional incomplete data . On the other hand , ACFlow Li et al . ( 2020 ) learns all conditional distributions for all possible masking operations , which can be quite computationally expensive . As such , both MCFlow and ACFlow can not be applied to post-training data completion as PL-MCMC . Several conditioning techniques have been used with NFs in contexts where the joint probability distribution of the conditioning and conditioned random variable is of no interest . For instance , ( Rezende & Mohamed , 2015 ; van den Berg et al. , 2018 ) extended the amortisation technique used in Variational Auto-Encoders ( VAEs ) ( Kingma & Welling , 2013 ) to the parameters of the flow . ( Winkler et al. , 2019 ) extended this use to the scenario of conditional likelihood estimation , while ( Trippe & Turner , 2018 ) provided a Variational Bayes view on this problem by using a Bayesian Neural Network for conditioning feature embedding . On a different line of work , ( Kingma & Dhariwal , 2018 ) use a heuristic form of a posteriori conditioning . The generative flow is trained with a classifier over the latent space , which forces the latent representation location to be indicative of the class they belong to . At test time , some parametric distribution is fitted on the latent representations to account for the attributes of the images that are to be generated . ( Nguyen et al. , 2019 ) used a hybrid approach , whereby the conditioning and conditioned variables joint distribution is modelled by a normalizing flow in such a way that conditional sampling of one given the other is straightforward to apply . Still , either with this approach or the others above , the knowledge of what part of the data constitutes the conditioning random variable is required beforehand . Our Contribution : We propose a conditional NF sampling method in the following setting : a ) conditional data generation is performed after a model has been trained without taking conditional sampling into account ; b ) training data may be itself incomplete , in the sense that some training features might be missing from examples in the training dataset ; c ) the subset of missing data may not be known in advance , and it could also be randomly distributed across input data . Importantly , we are interested in deriving a method whereby the distribution of the generated data faithfully reflects the Bayesian perspective . Our derivations heavily rely on the Schur complement properties in the spirit of the conditional Gaussian distributions . To highlight this feature we call our approach VISCOS Flows : VarIational Schur COnditional Sampling with normalizing Flows . The use of a variational posterior brings some advantages : for example , with a single fitted posterior , multiple samples can quickly be recovered . We also show how to amortise the cost of inference across multiple partially observed items by using inference networks ( Kingma & Welling , 2013 ) . 2 VISCOS FLOWS : VARIATIONAL SCHUR CONDITIONAL SAMPLING WITH NORMALIZING FLOWS . 2.1 PRELIMINARIES AND PROBLEM FORMULATION . Preliminaries : Consider a C1-diffeomorphism f ( X ) : X → Y where X ⊆ Rd , Y ⊆ Rd are open sets and define the inverse of f to be g ( y ) ≡ f−1 : Y → X . Consider the case where the random variable Y = f ( X ) while X is distributed according to the base distribution P0 ( X ) with density p0 ( x ) . According to the change of variable rule Y has a log-density given by the following formula : log p ( y ) = log p0 ( g ( y ) ) + log |det ∇yg ( y ) | = log p0 ( x ) − log |det∇xf ( x ) | . ( 1 ) We will use two set of complementary indexes covering [ d ] : observable O ⊂ [ d ] with cardinality # O = dO , and hidden H ⊂ [ d ] with # H = dH and O ∪H = [ d ] . In what follows , without loss of generality we assume O = { 0 , . . . , dO − 1 } ) and H = { dO , . . . , d } , and use the following notation : f ( x ) = ( fO ( xO ; xH ) fH ( xH ; xO ) ) , ∇xf ( x ) = J ( x ) = ( JOO ( x ) JOH ( x ) JH O ( x ) JHH ( x ) ) , and we will use a similar partition for g ( y ) and its Jacobian G ( y ) . We will use the notation mOO ( J ) = JOO to denote sub-matrix masking . The central to our approach is the Schur complements and its properties and , in particular , the following well-known identities : GHH ( f ( x ) ) = ( JHH ( x ) − JH O ( x ) ( JOO ( x ) ) −1 JOH ( x ) ) −1 , ( 2 ) det ( J ) = det ( JOO ) det ( JHH − JH O ( JOO ) −1 JOH ) = det ( JOO ) det ( GHH ) . ( 3 ) We denote by A the “ detached ” version of a matrix-valued function A ( x ) , i.e . a matrix whose values match those ofA but have a null gradient . Problem formulation : Consider a set Y containing some samples of interest , for example , images . Assume also a pre-trained normalizing flow , i.e. , a map f : X → Y with X , Y ⊆ Rd . In what follows we relax the assumption on the pre-trained flow , but for streamlining the presentation we assume that the normalizing flow is given at this point . Let us now assume that the observation sample y is partially missing or masked ( for instance , photographer ’ s finger is covering part of the image ) . In particular , the observation is split into observed YO = { yO | y ∈ Y } and hidden YH = { yH | y ∈ Y } regions , whereO , H are observed and hidden indexes , respectively . Our goal is to sample yH from the conditional distribution over a partial observation Y O ∈ YO . While this distribution has a density given by p ( yH | yO ) = p ( y ) p ( yO ) , computing p ( yO ) = ∫ p ( yO , yH ) dyH is in general intractable . Since it is often easier to sample from and optimise in the latent space we will aim to express all distributions in the space X . First , we introduce a partition into observed and hidden indexes in the latent space X . Assumption A0 . Both spaces X and Y are partitioned as O = { 0 , . . . , dO − 1 } and H = { dO , . . . , d } . We stress that Assumption A0 is made only to simplify the exposition . In general , we can have arbitrary partitions of the observed space , which will not affect our algorithm . While this partition seems somewhat artificial , it enables the use of the Schur complement in our derivations . Choosing the same partition in X and Y is natural for the invertible residual networks ( iResNet ) ( Behrmann et al. , 2019 ; Chen et al. , 2019 ) due the structure of the flow . This observation also holds for any flows sharing a residual structure x+h ( x ) with an activation h ( e.g . ReLU ) , such as Planar and Radial flows ( Rezende & Mohamed , 2015 ) , Sylvester flows ( van den Berg et al. , 2018 ) , continuous flows ( Chen et al. , 2018 ; Onken et al. , 2021 ; Mathieu & Nickel , 2020 ) or – to some extent – Implicit NFs ( Lu et al. , 2021 ) , where at each layer t of the flow , the derivative of the output xit+1 with respect to the input layer xt will be dominated by the ith component of this input . We note that the partition in latent space X can be made different from the partition in the observed Y for numerical purposes . For example , picking a latent space partitioning with a maximal value of log |det ( JOO ) | will ensure that the matrix JOO is not ill-conditioned . Indeed , for any matrix A we have 2 log |det ( A ) | = log ( det ( AAT ) ) = ∑ i log ( σi ( A ) ) , where σi are the singular values of A . Thus promoting larger singular values will improve conditioning . We empirically found that across several architectures ( iResNet , Planar , Radial , Sylvester and Implicit flows ) , this approach leads to a well-behaving algorithm . Maximising log |det ( JOO ) | to choose partitioning can also potentially be used for coupling flow architectures ( e.g . Glow ( Kingma & Dhariwal , 2018 ) or RealNVPs ( Dinh et al. , 2016 ) ) , however , this requires additional research . While Assumption A0 is made for convenience of notation , the following assumption on f is necessary . Assumption A1 . The map f : X → Y and its restriction fO ( XO ; XH ) : XO → YO for all xH ∈ XH are C1-diffeomorphisms . Let us now formally define our reparametrisation from Y space to X as follows : xH ( yH , yO ) : = gH ( yH ; yO ) , ( 4 ) xO ( xH , yO ) such that fO ( xO ; xH ) − yO = 0 . ( 5 ) Our reparametrisation is well-posed as stated in the following lemma with the proof in Appendix A. Lemma 1 If Assumption A1 holds then the reparametrisation in Equations 4 and 5 is well-posed , i.e , gH ( yH , yO ) is a diffeomorphism , while the map xO ( xH , yO ) exists and it is differentiable . Now we can rewrite Equation 1 using Equation 3 in simpler terms : log p ( y ) = log p0 ( x H ) + log ∣∣detGHH ∣∣+ log p0 ( xO ) − log ∣∣det JOO∣∣ . ( 6 ) Here we used the fact that the base distribution p0 ( x ) can be factorised as a product of independent univariate distributions , and hence p0 ( x ) = p0 ( xO ) p0 ( xH ) . Now we can define the variational distribution in terms of the latent samples as follows : q ( yH ; yO ) = q ( xH ) ∣∣detGHH ∣∣ . Combining Equation 6 with our variational distributions we obtain the evidence lower bound : LELBO = Eq ( yH ; yO ) [ log p ( yH , yO ) ] +H [ q ( yH ; yO ) ] = E q ( xH ) [ log p0 ( xH ) q ( xH ) + log p0 ( xO ) − log ∣∣∣det JOO ( xO , xH ) ∣∣∣ ] , ( 7 ) where H [ · ] is the entropy and we have taken advantage of the fact that the log-absolute determinant ( LAD ) of the Jacobian belonging to the approximate posterior q ( yH ; yO ) cancels with the one from the joint log-probability given by the model ( i.e. , the terms withGHH cancel each other out ) . Furthermore , we have eliminated the dependence on the variable yH completely instead we treat xH as a variational variable . We note here that our , at the first sight , artificial partition of the latent space into observable xO and hidden xH parts was the key allowing for the reparametrisation from Y space to X space . In particular , we used the invertibility of sub-jacobiansGHH and JOO allowing to map between observable and hidden samples in the X and Y spaces . Our approach is in the spirit of Gaussian conditional sampling and Schur complement , which justifies the method ’ s name . Note that this ELBO loss can be added to other losses , e.g. , to a classifier loss as we do in what follows . Note that this ELBO can be used in combination with other losses . Thus the normalizing flow can be trained simultaneously while performing conditional sampling of missing data . This way we can treat masked data during training as well as after training . There are still two technical issues that we cover in the following subsections before presenting our algorithm . First , we need to get xO by solving Equation 5 . Second , we need to discuss the computation of the ELBO gradient with respect to xH . Specifically , we need to reparametrise xO and compute the LAD gradient . As the following two sections are quite technical the reader interested in the algorithm itself can skip to Subsection 2.4 .
This paper proposes a technique for performing data imputation using pre-trained normalizing flows. They do so by fitting a variational distribution over a subset of the 'base' variables of the normalizing flow. Along with the observations, a sample from this variational distribution is sufficient to fully specify a sample from the normalizing flow model. The authors present techniques for constructing samples in this way, and computing the derivatives required to optimise the variational distribution.
SP:3759750e13689e4641744d077e21647795b03765
Plant 'n' Seek: Can You Find the Winning Ticket?
1 INTRODUCTION . Deep learning has achieved breakthroughs in multiple challenging areas pertaining to machine learning , in particular in areas for which we lack competitive hand-crafted algorithms . The benefits of overparameterization for training with SGD ( Belkin et al. , 2019 ) seem to call for ever wider and deeper neural network ( NN ) architectures , which are computationally demanding to learn and deploy . Training smaller , adequately regularized NNs from scratch could be a remedy but it commonly seems to fail due to inadequate parameter initialization , as Frankle & Carbin ( 2019 ) noted in their seminal paper . As proof of concept that this problem is solvable , they proposed the lottery ticket ( LT ) hypothesis , which states that a small , well trainable subnetwork can be identified by pruning a large , randomly initialized NN , opening the field to discover such subnetworks or ’ winning tickets ’ . Based on the findings of Zhou et al . ( 2019 ) , Ramanujan et al . ( 2020b ) went even further and conjectured the existence of strong lottery tickets , i.e. , subnetworks of randomly initialized NNs that do not require any further training . This strong LT hypothesis holds the promise that training NNs could potentially be replaced by efficient NN pruning , which simultaneously performs structure learning by identifying a task specific sparse neural network architecture . The existence of strong LTs has also been proven formally for networks without ( Malach et al. , 2020 ; Pensia et al. , 2020 ; Orseau et al. , 2020 ) and with potentially nonzero biases ( Fischer & Burkholz , 2021 ) . While these types of proofs show existence in realistic settings , the sparsity of the constructed tickets is likely not optimal , as they represent a target parameter by multiple neurons of degree 1 . The construction and proof of the generalized strong LT hypothesis raises two question – is the suboptimal sparsity merely an artifact of existence proofs or a general limitation of the pruning approach ? And , if very sparse tickets exist , are current algorithms able to find them or are further improvements needed to achieve effective network compression ? These questions can not be answered by comparing LT pruning algorithms solely on standard benchmark datasets ( Frankle et al. , 2021 ) , but demand the comparison with known ground truth LTs . The lack thereof was raised as an issue by Frankle et al . ( 2021 ) . To fill this gap and generate baselines with known ground truth , we here propose an algorithm to plant and hide arbitrary winning tickets in randomly initialized NNs and construct sparse tickets that reflect common challenges in machine learning . We use this experimental set-up to compare state-of-the-art pruning algorithms designed to search for lottery tickets . Our results indicate that state-of-the-art methods achieve only sub-optimal sparsity levels . This suggests that previous challenges to identify highly sparse winning tickets as subnetworks of randomly initialized dense networks ( Frankle et al. , 2020 ; Ramanujan et al. , 2020b ) can be explained by algorithmic limitations rather than fundamental problems with LT existence . In our experiments , the qualitative trends how methods compare to each other are consistent with previous results on image classification tasks ( Tanaka et al. , 2020 ; Frankle et al. , 2021 ) indicating that our experimental set-up exposes pruning algorithms to realistic challenges . In addition , we identify an opportunity to improve state-of-the-art pruning algorithms in order to find strong LTs of better sparsity . Our proposed planting framework will enable the evaluation of future progress in this direction . Contributions 1 ) We prove the existence of strong lottery tickets with sparse representations . 2 ) Inspired by the proof , we derive a framework that allows us to plant and hide strong tickets in neural networks and thus create benchmark data with known ground truth . 3 ) We construct sparse representations of four types of tickets that reflect typical machine learning problems . 4 ) We systematically evaluate state-of-the-art pruning methods that aim to discover tickets on these three problems against the ground truth tickets and highlight key challenges . 1.1 RELATED WORK . LT pruning approaches for neural networks can be broadly categorized into three groups , pruning before , during , or after training . While methods that sparsify the network during ( LeCun et al. , 1990a ; Mozer & Smolensky , 1989 ; Han et al. , 2015 ; Frankle & Carbin , 2019 ; Srinivas & Babu , 2016 ; Lee et al. , 2020 ) , or after training ( Savarese et al. , 2020b ; LeCun et al. , 1990b ; Hassibi & Stork , 1992 ; Dong et al. , 2017 ; Li et al. , 2017 ; Molchanov et al. , 2017 ) help in reducing computational resources required for inference , they are , however , less helpful in reducing resources at training time but can make a difference if they prune early aggressively ( You et al. , 2020 ) . They are most useful for structure learning at lower sparsity levels ( Su et al. , 2020 ; Lee et al. , 2020 ) . The LT hypothesis ( Frankle & Carbin , 2019 ) has also promoted the development of neural network pruning algorithms that prune before training ( Wang et al. , 2020 ; Lee et al. , 2019 ; Verdenius et al. , 2020 ; Tanaka et al. , 2020 ; Ramanujan et al. , 2020b ) . Usually , these methods try to find LTs in a ‘ weak ’ ( but powerful ) sense , that is to identify a sparse neural network architecture that is well trainable starting from its initial parameters . These methods score edges in terms of network flow , which can be quantified by gradients at different stages of pruning , or based on edge weights , and prune all edges with the lowest scores until the desired sparsity is achieved . Frankle et al . ( 2021 ) . Strong LTs are sparse sub-networks that perform well with the initial parameters , hence do not need to be trained any further ( Zhou et al. , 2019 ; Ramanujan et al. , 2020b ) . Their existence has been proven by providing lower bounds on the width of the large , randomly initialized neural network that contains them ( Malach et al. , 2020 ; Pensia et al. , 2020 ; Orseau et al. , 2020 ; Fischer & Burkholz , 2021 ) . In addition , it was shown that multiple candidate tickets exist that are also robust to parameter quantization ( Diffenderfer & Kailkhura , 2021 ) . Beyond LT pruning , many more methods have been developed to reduce computational resources and perform structure learning , including dynamic sparse training ( Evci et al. , 2020 ; Liu et al. , 2021b ) , adaptations ( Frankle et al. , 2020 ; Renda et al. , 2020 ; Liu et al. , 2021a ; Liu et al . ) of Iterative Magnitude Pruning ( IMP ) Han et al . ( 2015 ) ; Frankle & Carbin ( 2019 ) and sparse regularization techniques ( Weigend et al. , 1991 ; Savarese et al. , 2020a ) . As these approaches do not identify LTs as subnetworks of randomly initialized NNs , they do not rely on the existence of planted tickets and are therefore beyond the scope of our experimental analysis . However , the ground truth tickets which we derived for planting could still provide an interesting baseline to explore whether sparse training of deep NNs can identify extremely sparse , hand designed NN architectures . Dense NNs are known to find NN representations that are less sparse than hand crafted architectures ( Denker et al. , 1987 ) , yet , the the explicit objective of sparse training is to address this issue . We provide the tools to evaluate progress in this direction by planting known ticket architectures . While the ultimate goal of deep learning is to solve problems with otherwise unknown solutions like image classification ( Frankle et al. , 2021 ) or protein structure prediction ( Tunyasuvunakool et al. , 2021 ) , the design of NN ar- chitectures for human solvable problems has already in the past provided important insights into NN properties , including universal approximation ( Scarselli & Tsoi , 1998 ; Yarotsky , 2018 ) or the importance of algorithmic alignment ( Xu et al. , 2020 ) . NNs that compute polynomials ( Scarselli & Tsoi , 1998 ; Yarotsky , 2018 ) , xor gates ( Rumelhart et al. , 1986 ) , discrete fast fourier transformation ( Velik , 2008 ) , symmetry groups ( Sejnowski et al. , 1986 ) , general piecewise linear functions ( Arora et al. , 2018 ) , or argmax ( Xu et al. , 2020 ) could also present interesting candidates for planting in future investigations . 1.2 NOTATION AND TERMINOLOGY . Let f ( x ) denote a bounded function , without loss of generality f : [ −1 , 1 ] n0 → [ −1 , 1 ] nL , that is parameterized as a deep neural network with architecture n̄ = [ n0 , n1 , ... , nL ] , i.e. , depth L and widths nl for layers l = 0 , ... , L with ReLU activation function ϕ ( x ) : = max ( x , 0 ) . It maps an input vector x ( 0 ) to neurons x ( l ) i as x ( l ) = ϕ ( W ( l ) x ( l−1 ) + b ( l ) ) , where W ( l ) ∈ Rnl−1×nl is the weight matrix , and b ( l ) ∈ Rnl is the bias vector of Layer l. We will establish approximation results with respect to the supremum norm ∥g∥∞ : = supx∈ [ −1,1 ] n0 ∥g∥2 defined for any function g on the domain [ −1 , 1 ] n0 . Assume furthermore that a LT fϵ can be obtained by pruning a large mother network f , which we indicate by writing fϵ ⊂ f0 . If fϵ achieves a similar performance after training the non-zero parameters as training all parameters of f0 , we call fϵ a weak LT . If fϵ does not require any further training , we call it a strong LT . Note that every strong LT is automatically also a weak LT and any algorithm that prunes the initial network f0 identifies a LT that could , in principle , be a strong LT . The sparsity level ρ of fϵ is then defined as the fraction of non-zero weights that remain after pruning , i.e. , ρ = ( ∑ l ∥∥∥W ( l ) ϵ ∥∥∥ 0 ) / ( ∑ l ∥∥∥W ( l ) 0 ∥∥∥ 0 ) , where ∥·∥0 denotes the l0-norm , which counts the number of non-zero elements in a vector or matrix . Another important quantity that influences the existence probability of lottery tickets is the in-degree of a node i in layer l of the target f , which we define as the number of non-zero connections of a neuron to the previous layer plus 1 if the bias is non-zero , i.e. , k ( l ) i : = ∥∥∥W ( l ) i , : ∥∥∥ 0 + ∥∥∥b ( l ) i ∥∥∥ 0 , where W ( l ) i , : is the i-th row of W ( l ) . The maximum degree of all neurons in layer l is denoted as kl , max .
The authors note a distinction between kinds of sparse networks in the literature. "Weak tickets" require training to perform comparably to the original network, while "strong tickets" do not. The authors prove a lower bound for the probability that a strong ticket exists, and note that instead of training, this "strong ticket" need only be scaled by some constant to achieve similar performance to the larger network. Using the insights of this proof, the authors propose three benchmark tasks to find a ground truth sparse network. They evaluate common pruning methods to find both weak and strong tickets using these tasks, and find that most methods perform well on 2 out of the three weak ticket finding tasks. They also note that the only method designed specifically for strong ticket finding performs well on these tasks. For further evaluation, they additionally share weak and strong ticket finding results for VGG-16.
SP:d8fb4eefbb282d80e357ec143ea0697334b55ab2
Plant 'n' Seek: Can You Find the Winning Ticket?
1 INTRODUCTION . Deep learning has achieved breakthroughs in multiple challenging areas pertaining to machine learning , in particular in areas for which we lack competitive hand-crafted algorithms . The benefits of overparameterization for training with SGD ( Belkin et al. , 2019 ) seem to call for ever wider and deeper neural network ( NN ) architectures , which are computationally demanding to learn and deploy . Training smaller , adequately regularized NNs from scratch could be a remedy but it commonly seems to fail due to inadequate parameter initialization , as Frankle & Carbin ( 2019 ) noted in their seminal paper . As proof of concept that this problem is solvable , they proposed the lottery ticket ( LT ) hypothesis , which states that a small , well trainable subnetwork can be identified by pruning a large , randomly initialized NN , opening the field to discover such subnetworks or ’ winning tickets ’ . Based on the findings of Zhou et al . ( 2019 ) , Ramanujan et al . ( 2020b ) went even further and conjectured the existence of strong lottery tickets , i.e. , subnetworks of randomly initialized NNs that do not require any further training . This strong LT hypothesis holds the promise that training NNs could potentially be replaced by efficient NN pruning , which simultaneously performs structure learning by identifying a task specific sparse neural network architecture . The existence of strong LTs has also been proven formally for networks without ( Malach et al. , 2020 ; Pensia et al. , 2020 ; Orseau et al. , 2020 ) and with potentially nonzero biases ( Fischer & Burkholz , 2021 ) . While these types of proofs show existence in realistic settings , the sparsity of the constructed tickets is likely not optimal , as they represent a target parameter by multiple neurons of degree 1 . The construction and proof of the generalized strong LT hypothesis raises two question – is the suboptimal sparsity merely an artifact of existence proofs or a general limitation of the pruning approach ? And , if very sparse tickets exist , are current algorithms able to find them or are further improvements needed to achieve effective network compression ? These questions can not be answered by comparing LT pruning algorithms solely on standard benchmark datasets ( Frankle et al. , 2021 ) , but demand the comparison with known ground truth LTs . The lack thereof was raised as an issue by Frankle et al . ( 2021 ) . To fill this gap and generate baselines with known ground truth , we here propose an algorithm to plant and hide arbitrary winning tickets in randomly initialized NNs and construct sparse tickets that reflect common challenges in machine learning . We use this experimental set-up to compare state-of-the-art pruning algorithms designed to search for lottery tickets . Our results indicate that state-of-the-art methods achieve only sub-optimal sparsity levels . This suggests that previous challenges to identify highly sparse winning tickets as subnetworks of randomly initialized dense networks ( Frankle et al. , 2020 ; Ramanujan et al. , 2020b ) can be explained by algorithmic limitations rather than fundamental problems with LT existence . In our experiments , the qualitative trends how methods compare to each other are consistent with previous results on image classification tasks ( Tanaka et al. , 2020 ; Frankle et al. , 2021 ) indicating that our experimental set-up exposes pruning algorithms to realistic challenges . In addition , we identify an opportunity to improve state-of-the-art pruning algorithms in order to find strong LTs of better sparsity . Our proposed planting framework will enable the evaluation of future progress in this direction . Contributions 1 ) We prove the existence of strong lottery tickets with sparse representations . 2 ) Inspired by the proof , we derive a framework that allows us to plant and hide strong tickets in neural networks and thus create benchmark data with known ground truth . 3 ) We construct sparse representations of four types of tickets that reflect typical machine learning problems . 4 ) We systematically evaluate state-of-the-art pruning methods that aim to discover tickets on these three problems against the ground truth tickets and highlight key challenges . 1.1 RELATED WORK . LT pruning approaches for neural networks can be broadly categorized into three groups , pruning before , during , or after training . While methods that sparsify the network during ( LeCun et al. , 1990a ; Mozer & Smolensky , 1989 ; Han et al. , 2015 ; Frankle & Carbin , 2019 ; Srinivas & Babu , 2016 ; Lee et al. , 2020 ) , or after training ( Savarese et al. , 2020b ; LeCun et al. , 1990b ; Hassibi & Stork , 1992 ; Dong et al. , 2017 ; Li et al. , 2017 ; Molchanov et al. , 2017 ) help in reducing computational resources required for inference , they are , however , less helpful in reducing resources at training time but can make a difference if they prune early aggressively ( You et al. , 2020 ) . They are most useful for structure learning at lower sparsity levels ( Su et al. , 2020 ; Lee et al. , 2020 ) . The LT hypothesis ( Frankle & Carbin , 2019 ) has also promoted the development of neural network pruning algorithms that prune before training ( Wang et al. , 2020 ; Lee et al. , 2019 ; Verdenius et al. , 2020 ; Tanaka et al. , 2020 ; Ramanujan et al. , 2020b ) . Usually , these methods try to find LTs in a ‘ weak ’ ( but powerful ) sense , that is to identify a sparse neural network architecture that is well trainable starting from its initial parameters . These methods score edges in terms of network flow , which can be quantified by gradients at different stages of pruning , or based on edge weights , and prune all edges with the lowest scores until the desired sparsity is achieved . Frankle et al . ( 2021 ) . Strong LTs are sparse sub-networks that perform well with the initial parameters , hence do not need to be trained any further ( Zhou et al. , 2019 ; Ramanujan et al. , 2020b ) . Their existence has been proven by providing lower bounds on the width of the large , randomly initialized neural network that contains them ( Malach et al. , 2020 ; Pensia et al. , 2020 ; Orseau et al. , 2020 ; Fischer & Burkholz , 2021 ) . In addition , it was shown that multiple candidate tickets exist that are also robust to parameter quantization ( Diffenderfer & Kailkhura , 2021 ) . Beyond LT pruning , many more methods have been developed to reduce computational resources and perform structure learning , including dynamic sparse training ( Evci et al. , 2020 ; Liu et al. , 2021b ) , adaptations ( Frankle et al. , 2020 ; Renda et al. , 2020 ; Liu et al. , 2021a ; Liu et al . ) of Iterative Magnitude Pruning ( IMP ) Han et al . ( 2015 ) ; Frankle & Carbin ( 2019 ) and sparse regularization techniques ( Weigend et al. , 1991 ; Savarese et al. , 2020a ) . As these approaches do not identify LTs as subnetworks of randomly initialized NNs , they do not rely on the existence of planted tickets and are therefore beyond the scope of our experimental analysis . However , the ground truth tickets which we derived for planting could still provide an interesting baseline to explore whether sparse training of deep NNs can identify extremely sparse , hand designed NN architectures . Dense NNs are known to find NN representations that are less sparse than hand crafted architectures ( Denker et al. , 1987 ) , yet , the the explicit objective of sparse training is to address this issue . We provide the tools to evaluate progress in this direction by planting known ticket architectures . While the ultimate goal of deep learning is to solve problems with otherwise unknown solutions like image classification ( Frankle et al. , 2021 ) or protein structure prediction ( Tunyasuvunakool et al. , 2021 ) , the design of NN ar- chitectures for human solvable problems has already in the past provided important insights into NN properties , including universal approximation ( Scarselli & Tsoi , 1998 ; Yarotsky , 2018 ) or the importance of algorithmic alignment ( Xu et al. , 2020 ) . NNs that compute polynomials ( Scarselli & Tsoi , 1998 ; Yarotsky , 2018 ) , xor gates ( Rumelhart et al. , 1986 ) , discrete fast fourier transformation ( Velik , 2008 ) , symmetry groups ( Sejnowski et al. , 1986 ) , general piecewise linear functions ( Arora et al. , 2018 ) , or argmax ( Xu et al. , 2020 ) could also present interesting candidates for planting in future investigations . 1.2 NOTATION AND TERMINOLOGY . Let f ( x ) denote a bounded function , without loss of generality f : [ −1 , 1 ] n0 → [ −1 , 1 ] nL , that is parameterized as a deep neural network with architecture n̄ = [ n0 , n1 , ... , nL ] , i.e. , depth L and widths nl for layers l = 0 , ... , L with ReLU activation function ϕ ( x ) : = max ( x , 0 ) . It maps an input vector x ( 0 ) to neurons x ( l ) i as x ( l ) = ϕ ( W ( l ) x ( l−1 ) + b ( l ) ) , where W ( l ) ∈ Rnl−1×nl is the weight matrix , and b ( l ) ∈ Rnl is the bias vector of Layer l. We will establish approximation results with respect to the supremum norm ∥g∥∞ : = supx∈ [ −1,1 ] n0 ∥g∥2 defined for any function g on the domain [ −1 , 1 ] n0 . Assume furthermore that a LT fϵ can be obtained by pruning a large mother network f , which we indicate by writing fϵ ⊂ f0 . If fϵ achieves a similar performance after training the non-zero parameters as training all parameters of f0 , we call fϵ a weak LT . If fϵ does not require any further training , we call it a strong LT . Note that every strong LT is automatically also a weak LT and any algorithm that prunes the initial network f0 identifies a LT that could , in principle , be a strong LT . The sparsity level ρ of fϵ is then defined as the fraction of non-zero weights that remain after pruning , i.e. , ρ = ( ∑ l ∥∥∥W ( l ) ϵ ∥∥∥ 0 ) / ( ∑ l ∥∥∥W ( l ) 0 ∥∥∥ 0 ) , where ∥·∥0 denotes the l0-norm , which counts the number of non-zero elements in a vector or matrix . Another important quantity that influences the existence probability of lottery tickets is the in-degree of a node i in layer l of the target f , which we define as the number of non-zero connections of a neuron to the previous layer plus 1 if the bias is non-zero , i.e. , k ( l ) i : = ∥∥∥W ( l ) i , : ∥∥∥ 0 + ∥∥∥b ( l ) i ∥∥∥ 0 , where W ( l ) i , : is the i-th row of W ( l ) . The maximum degree of all neurons in layer l is denoted as kl , max .
The authors identify that contemporary methods for finding very sparse subnetworks in deep neural networks (DNNs), including both methods for finding either "weak tickets" (after training) or "strong tickets" (before training), do not find very sparse (and good) solutions. They question if this is a fundamental limitation (i.e. these very sparse solutions don't exist), or if this is a limitation of current methods in finding such solutions. To answer this question, the authors propose to either "plant" known good very sparse subnetworks in DNNs, or to try and find solutions for toy problems for which the authors could identify good hand-made very sparse subnetworks - including a classification problem (Circle), function regression (ReLU), and manifold-learning problem (Helix) . The experimental results analyze the performance of strong and weak sparse subnetwork search methods, including GraSP, SNIP, SYNFLOW, alongside magnitude and random pruning in finding these planted tickets. None of the strong ticket methods are able to find the "planted" tickets for any sparsity level, while the weak methods are able to find tickets, but not at extreme sparsity. Further analysis reveals layer collapse in particular to be a problem. The authors conclude that rather than a fundamental limitation, current methods (in particular for strong tickets) are limited in finding very sparse tickets even if they are known to exist at that sparsity level.
SP:d8fb4eefbb282d80e357ec143ea0697334b55ab2
Lifting Imbalanced Regression with Self-Supervised Learning
1 INTRODUCTION . Regression is a fundamental task in machine learning and statistical analysis , which involves modeling the relationship , between one or more independent and dependent variables . As distinct from the discrete output values in classification , regression makes predictions for continuous values . The issue of imbalanced recognition , arising from the conjunction of imbalance and classification , has been drawing the attention of researchers recently ( Shu et al. , 2019 ; Cao et al. , 2019 ; Ren et al. , 2020 ; Jamal et al. , 2020 ; Kang et al. , 2020 ; 2021 ) . By analogy , it is natural to question whether long-tailed regression exists ( or one can also call it imbalanced regression , the equivalence of these two names in the paper ) . Exactly what we expected , a fresh task , namely long-tailed regression , has recently been proposed by Yang et al . ( 2021 ) . Regardless of the newness of the task , there is no way to neglect its immense significance in terms of application and research . For example , age estimation from facial images ; health indicators for various populations in healthcare ( Soualhi et al. , 2014 ) , these quantities usually exhibit a long-tailed distribution . Going further , in terms of performance , progress in the long-tailed regression research is also far from satisfactory . More recently , self-supervised learning ( SSL ) has emerged as a new rage in the research community , owing to its straightforward learning paradigm yet excellent performance ( Noroozi & Favaro , 2016 ; Gidaris et al. , 2018 ; Wu et al. , 2018 ; He et al. , 2020 ) . The excellence of the approach has been admired not only on classification with well-balanced datasets , but also surprisingly on long-tailed classification by Kang et al . ( 2021 ) ; Wang et al . ( 2021 ) ; Cui et al . ( 2021 ) ; Samuel & Chechik ( 2021 ) who found its benefits . It prompts some thoughts on the potential and practical applications , in particular , applications to SSL for long-tailed regression ( Yang et al. , 2021 ) . Mindful that the majority of available techniques on SSL are in the context of classification ( Oord et al. , 2018 ; Hjelm et al. , 2018 ; Chen et al. , 2020a ; Henaff , 2020 ) . Due to the difference between classification and regression ( no hard boundary existing between outputs in regression task as shown in Figure 1a ) ( Razi & Athappilly , 2005 ; Breiman et al. , 2017 ; Liaw et al. , 2002 ; Yang et al. , 2021 ) , it is not guaranteed that SSL can help address the imbalanced regression problem well , and it may be difficult to make a straightforward migration from classification to regression task . Upon deeper pondering , there are obstacles and problems that we face : Can SSL really relieve the long-tailed regression problem ? If so , how might we solve the imbalanced regression problem by utilizing SSL ? Figure 1a illustrates the motivation , by adding noise to the image of the cat , it is very unlikely to be misclassified into a class that differs significantly from it , such as a bird , since they are discrete and the categories diverge greatly from each other . In the case of regression , however , it is not at all feasible when a similar migration was made . We imagine that if noise is added to a face image , then the network ’ s estimation of the person ’ s age may be significantly biased . In this regard , it becomes essential to work out and comprehend the degree of noise that induces “ similarity and dissimilarity ” amongst output values from a regression standpoint . On the foundation of this definition , questions are raised about exploiting noise sensibly and effectively . With this paper , we try for the first time to propose answers to these questions . And we summarize our contributions as follows : • To the best of our knowledge , we are the first to broaden the concept of similarity and dissimilarity between augmented samples and original samples from classification to regression . And we are also the first to reveal imbalanced regression problem with SSL . • Having been convinced of the beneficial effect of applying SSL on a simple experiment , we extend it to the neural network-based long-tailed regression task . To ensure that the noise is manageable w.r.t . the similarity of the regression , we propose to generate noise on regression values within a predefined threshold . • We obtain an optimization problem on noise with an efficient approximate solution algorithm based on a first-order Taylor expansion . The augmented input samples are obtained by back-propagation . • As a practical trial for the proposed method , the results reveal that we attained not only the best results , but also the possibility to mix it freely with other training techniques . 2 PRELIMINARY . In this section , we cover the description of imbalanced regression , and then , with reference to the concept of similarity and dissimilarity in classification , we broaden this concept to regression , and provide a new definition of similarity and dissimilarity in regression . Notations . In this paper , lowercase typeface letters ( e.g. , x ) represent scalar , lowercase bold typeface letters ( e.g. , x ) represent vectors , uppercase typeface letters ( e.g. , X ) stand for random variable , uppercase bold typeface letters ( e.g. , X ) represent matrix . diag ( · ) means diagonalising a vector into a matrix . 2.1 PROBLEM STATEMENT . A collection of paired training data { ( xsi , ysi ) } Nsi=1 , validation samples { ( xvi , yvi ) } Nvi=1 and testing samples { ( xti , yti ) } Nti=1 are presumed to be available , where xoi ∈ Rd , o ∈ { s , v , t } , and yoi are a continuous variables . We suppose that yoi is well-bounded and notate the maximum and minimum values of yoi as y o max and y o min accordingly . Further , we are able to partition y o i into B bins [ yo0 , y o 1 ) , [ y o 1 , y o 2 ) , . . . , [ y o B−1 , y o B ) with equal interval ∆y = yomax−y o min B . In so doing we could put every yoi in the dataset into the corresponding bin fulfilling the condition y o b < y o i ≤ yob+1 , where b ∈ { 0 , 1 , . . . , B − 1 } . With three splits ( training , validation , testing ) , if we count the number of data points that fall into each bin and form these into a vector mo = ( mo1 , . . . , m o B ) . The imbalanced character of the normal regressions lies in the existence of msbi , m s bj ∈ms , allowing msbi msbj to hold . It is the opposite of this that the values of the elements of the two vectorsmv andmt , are approximately equal . A desire for imbalanced regression enables model f ( xoi ; θ ) produced on an imbalanced training set to be potentially generalized to a balanced validation and testing set to the maximum extent possible . Typically , f ( xoi ; θ ) may be a neural network with parameter θ because of its impressive fitting ability . In what follows , for the sake of convenience , we will drop the superscript o . In the introduction section , we elaborate on the predicament that the lack of a clear definition of the concepts of similarity and dissimilarity in the regression , as regression involves continuous targets , where hard boundaries between classes do not exist . As a solution to this problem , we formally propose the following definition : Definition 1 There exists some threshold δ , regarding two data samples ( xi , ŷi ) , ( x̃i , ỹi ) , x̃i is obtained by adding some noise r to xi , and ỹi and ŷi is inferred by the model f ( ; θ ) from x̃i and xi respectively . We remark that ( xi , ŷi ) , ( x̃i , ỹi ) are similar samples of the model f ( xi ; θ ) ( no need for well-trained model ) if the distance between the two samples is less than δ under some distance function D ( · , · ) , such as l1 or l2 distance . Mathematically , it can be phrased in this following : I ( xi , x̃i ) = { 1 , if D ( ŷi , ỹi ) < δ 0 , if D ( ŷi , ỹi ) ≥ δ , ( 1 ) where I ( xi , x̃i ) indicates the trueness of the condition whether two samples xi and x̃i are similar samples . The parameter δ here is manually specified and task-dependent . We display a virtual example of this definition as illustrated in Figure 1b . We select images from AgeDB-DIR and attach noises to them , afterward we estimate the ages of the original images and their corresponding noisy images with the network . Finally , we identify a pair of original image and noisy image as not similar if their difference exceeds the threshold δ , and vice versa . 3 MOTIVATION . Herewith we illustrate , for simple shallow neural networks , that SSL facilitates long-tailed regression in a positive way . Aside from this , we would characterize the difficulties involved in extending our approach to deep neural networks , i.e . for controlling the level of noise to guarantee the creation of similar samples under the sense of regression . We first describe the data generation , together with a description of the specific experimental settings followed by an analysis . The network structure and implementation details are available in the appendix . Data generation . Consider two components of data following two different Gaussian distribution , in particular , x1 ∼ N ( µ1 · 1d , diag ( σ1 · 1d ) ) , x2 ∼ N ( µ2 · 1d , diag ( σ2 · 1d ) ) . 1d denotes a vector with all 1 ’ s . The values of µ1 ( σ1 ) and µ2 ( σ2 ) are quite different . With linear mapping to x1 and x2 with parameter w ∈ Rd , it yields the output value y = wTx . As a result , we get two collections of training data { xs1 , i , ys1 , i } Ns1 i=1 , { xs2 , j , ys2 , j } Ns2 j=1 . Suppose N s 1 > N s 2 , and we measure imbalance here in terms of R = N s 1 Ns2 . We pick up the value of R in { 1 , 2 , 4 , 6 , 8 , 10 , 100 } . Despite the training samples are imbalanced , the testing set { xt1 , i , yt1 , i } Nt1 i=1 , { xt2 , j , yt2 , j } Nt2 j=1 we generate is balanced . Additionally , we produce similar samples by controlling the noise so that the condition min ( y1 , i , y2 , j ) δ , ∀i ∈ { 1 , . . . , N1 } , j ∈ { 1 , . . . , N2 } is satisfied . Experimental settings . We compare two training methods here : ( i ) Representation Learning : It is trained in the first T1 epochs using a self-supervised approach , and the resulting network is treated as an initialized network , and in the second T2 epochs it is trained in a standard supervised learning manner . ( ii ) Supervised Learning : it is entirely trained using supervised learning in the T1 +T2 epochs . As per the normal process , the model is trained on the training set and tested on the testing set . To evaluate we use Mean Square Error ( MSE ) as a criterion . Here we use the vanilla mean squared loss function . Experimental findings . We plot the variation curve of MSE with the imbalance coefficient on the testing set for the two training methods . As illustrated in Figure 2a , what has been clearly observed is that the MSE for both methods grows with an increase in the imbalance coefficient . More importantly , it is found that SSL could alleviate this problem to some degree . The experimental findings , thus , lead us to mitigate the imbalance regression problem with SSL . Remark It is true that the above experiments concede that SSL can be beneficial to long-tailed regression , albeit with some restrictions that remain when we adapt it to neural networks . Well , yes , we have imposed settings for noise , namely , the noise added is controllable in terms of its impact on the regression values . Unfortunately , scaling the technique beyond shallow to deep networks , there is a difficulty in keeping the difference between the output values of similar samples under regression within a threshold , a concern that arises in the case of a sample augmented with random noise , where the difference between the output values of the noisy sample and the original sample is more than the threshold , as shown in Figure 2b , hence the challenge stems from finding valid noise to ensure the generation of similar samples .
This paper researched on the recently proposed long-tailed regression problem with self-supervised learning method. Two questions are investigated by this paper: 1) how to measure the similarity and dissimilarity under the regression sense; 2) it is not guaranteed that the sampled with perturbations are similar to the original samples without any noise. The former problem is addressed by providing a formal definition of similarity and the later question is addressed by limiting the volume of noise on the output. Authors report the results on three datasets to demonstrate the superiority of our proposed methods, including IMDN-WIKI-DIR, AgeDB-DIR and NYUD2-DIR.
SP:f3cd4edcd106270bf2b809a5adc3dc8fc86f6f5b
Lifting Imbalanced Regression with Self-Supervised Learning
1 INTRODUCTION . Regression is a fundamental task in machine learning and statistical analysis , which involves modeling the relationship , between one or more independent and dependent variables . As distinct from the discrete output values in classification , regression makes predictions for continuous values . The issue of imbalanced recognition , arising from the conjunction of imbalance and classification , has been drawing the attention of researchers recently ( Shu et al. , 2019 ; Cao et al. , 2019 ; Ren et al. , 2020 ; Jamal et al. , 2020 ; Kang et al. , 2020 ; 2021 ) . By analogy , it is natural to question whether long-tailed regression exists ( or one can also call it imbalanced regression , the equivalence of these two names in the paper ) . Exactly what we expected , a fresh task , namely long-tailed regression , has recently been proposed by Yang et al . ( 2021 ) . Regardless of the newness of the task , there is no way to neglect its immense significance in terms of application and research . For example , age estimation from facial images ; health indicators for various populations in healthcare ( Soualhi et al. , 2014 ) , these quantities usually exhibit a long-tailed distribution . Going further , in terms of performance , progress in the long-tailed regression research is also far from satisfactory . More recently , self-supervised learning ( SSL ) has emerged as a new rage in the research community , owing to its straightforward learning paradigm yet excellent performance ( Noroozi & Favaro , 2016 ; Gidaris et al. , 2018 ; Wu et al. , 2018 ; He et al. , 2020 ) . The excellence of the approach has been admired not only on classification with well-balanced datasets , but also surprisingly on long-tailed classification by Kang et al . ( 2021 ) ; Wang et al . ( 2021 ) ; Cui et al . ( 2021 ) ; Samuel & Chechik ( 2021 ) who found its benefits . It prompts some thoughts on the potential and practical applications , in particular , applications to SSL for long-tailed regression ( Yang et al. , 2021 ) . Mindful that the majority of available techniques on SSL are in the context of classification ( Oord et al. , 2018 ; Hjelm et al. , 2018 ; Chen et al. , 2020a ; Henaff , 2020 ) . Due to the difference between classification and regression ( no hard boundary existing between outputs in regression task as shown in Figure 1a ) ( Razi & Athappilly , 2005 ; Breiman et al. , 2017 ; Liaw et al. , 2002 ; Yang et al. , 2021 ) , it is not guaranteed that SSL can help address the imbalanced regression problem well , and it may be difficult to make a straightforward migration from classification to regression task . Upon deeper pondering , there are obstacles and problems that we face : Can SSL really relieve the long-tailed regression problem ? If so , how might we solve the imbalanced regression problem by utilizing SSL ? Figure 1a illustrates the motivation , by adding noise to the image of the cat , it is very unlikely to be misclassified into a class that differs significantly from it , such as a bird , since they are discrete and the categories diverge greatly from each other . In the case of regression , however , it is not at all feasible when a similar migration was made . We imagine that if noise is added to a face image , then the network ’ s estimation of the person ’ s age may be significantly biased . In this regard , it becomes essential to work out and comprehend the degree of noise that induces “ similarity and dissimilarity ” amongst output values from a regression standpoint . On the foundation of this definition , questions are raised about exploiting noise sensibly and effectively . With this paper , we try for the first time to propose answers to these questions . And we summarize our contributions as follows : • To the best of our knowledge , we are the first to broaden the concept of similarity and dissimilarity between augmented samples and original samples from classification to regression . And we are also the first to reveal imbalanced regression problem with SSL . • Having been convinced of the beneficial effect of applying SSL on a simple experiment , we extend it to the neural network-based long-tailed regression task . To ensure that the noise is manageable w.r.t . the similarity of the regression , we propose to generate noise on regression values within a predefined threshold . • We obtain an optimization problem on noise with an efficient approximate solution algorithm based on a first-order Taylor expansion . The augmented input samples are obtained by back-propagation . • As a practical trial for the proposed method , the results reveal that we attained not only the best results , but also the possibility to mix it freely with other training techniques . 2 PRELIMINARY . In this section , we cover the description of imbalanced regression , and then , with reference to the concept of similarity and dissimilarity in classification , we broaden this concept to regression , and provide a new definition of similarity and dissimilarity in regression . Notations . In this paper , lowercase typeface letters ( e.g. , x ) represent scalar , lowercase bold typeface letters ( e.g. , x ) represent vectors , uppercase typeface letters ( e.g. , X ) stand for random variable , uppercase bold typeface letters ( e.g. , X ) represent matrix . diag ( · ) means diagonalising a vector into a matrix . 2.1 PROBLEM STATEMENT . A collection of paired training data { ( xsi , ysi ) } Nsi=1 , validation samples { ( xvi , yvi ) } Nvi=1 and testing samples { ( xti , yti ) } Nti=1 are presumed to be available , where xoi ∈ Rd , o ∈ { s , v , t } , and yoi are a continuous variables . We suppose that yoi is well-bounded and notate the maximum and minimum values of yoi as y o max and y o min accordingly . Further , we are able to partition y o i into B bins [ yo0 , y o 1 ) , [ y o 1 , y o 2 ) , . . . , [ y o B−1 , y o B ) with equal interval ∆y = yomax−y o min B . In so doing we could put every yoi in the dataset into the corresponding bin fulfilling the condition y o b < y o i ≤ yob+1 , where b ∈ { 0 , 1 , . . . , B − 1 } . With three splits ( training , validation , testing ) , if we count the number of data points that fall into each bin and form these into a vector mo = ( mo1 , . . . , m o B ) . The imbalanced character of the normal regressions lies in the existence of msbi , m s bj ∈ms , allowing msbi msbj to hold . It is the opposite of this that the values of the elements of the two vectorsmv andmt , are approximately equal . A desire for imbalanced regression enables model f ( xoi ; θ ) produced on an imbalanced training set to be potentially generalized to a balanced validation and testing set to the maximum extent possible . Typically , f ( xoi ; θ ) may be a neural network with parameter θ because of its impressive fitting ability . In what follows , for the sake of convenience , we will drop the superscript o . In the introduction section , we elaborate on the predicament that the lack of a clear definition of the concepts of similarity and dissimilarity in the regression , as regression involves continuous targets , where hard boundaries between classes do not exist . As a solution to this problem , we formally propose the following definition : Definition 1 There exists some threshold δ , regarding two data samples ( xi , ŷi ) , ( x̃i , ỹi ) , x̃i is obtained by adding some noise r to xi , and ỹi and ŷi is inferred by the model f ( ; θ ) from x̃i and xi respectively . We remark that ( xi , ŷi ) , ( x̃i , ỹi ) are similar samples of the model f ( xi ; θ ) ( no need for well-trained model ) if the distance between the two samples is less than δ under some distance function D ( · , · ) , such as l1 or l2 distance . Mathematically , it can be phrased in this following : I ( xi , x̃i ) = { 1 , if D ( ŷi , ỹi ) < δ 0 , if D ( ŷi , ỹi ) ≥ δ , ( 1 ) where I ( xi , x̃i ) indicates the trueness of the condition whether two samples xi and x̃i are similar samples . The parameter δ here is manually specified and task-dependent . We display a virtual example of this definition as illustrated in Figure 1b . We select images from AgeDB-DIR and attach noises to them , afterward we estimate the ages of the original images and their corresponding noisy images with the network . Finally , we identify a pair of original image and noisy image as not similar if their difference exceeds the threshold δ , and vice versa . 3 MOTIVATION . Herewith we illustrate , for simple shallow neural networks , that SSL facilitates long-tailed regression in a positive way . Aside from this , we would characterize the difficulties involved in extending our approach to deep neural networks , i.e . for controlling the level of noise to guarantee the creation of similar samples under the sense of regression . We first describe the data generation , together with a description of the specific experimental settings followed by an analysis . The network structure and implementation details are available in the appendix . Data generation . Consider two components of data following two different Gaussian distribution , in particular , x1 ∼ N ( µ1 · 1d , diag ( σ1 · 1d ) ) , x2 ∼ N ( µ2 · 1d , diag ( σ2 · 1d ) ) . 1d denotes a vector with all 1 ’ s . The values of µ1 ( σ1 ) and µ2 ( σ2 ) are quite different . With linear mapping to x1 and x2 with parameter w ∈ Rd , it yields the output value y = wTx . As a result , we get two collections of training data { xs1 , i , ys1 , i } Ns1 i=1 , { xs2 , j , ys2 , j } Ns2 j=1 . Suppose N s 1 > N s 2 , and we measure imbalance here in terms of R = N s 1 Ns2 . We pick up the value of R in { 1 , 2 , 4 , 6 , 8 , 10 , 100 } . Despite the training samples are imbalanced , the testing set { xt1 , i , yt1 , i } Nt1 i=1 , { xt2 , j , yt2 , j } Nt2 j=1 we generate is balanced . Additionally , we produce similar samples by controlling the noise so that the condition min ( y1 , i , y2 , j ) δ , ∀i ∈ { 1 , . . . , N1 } , j ∈ { 1 , . . . , N2 } is satisfied . Experimental settings . We compare two training methods here : ( i ) Representation Learning : It is trained in the first T1 epochs using a self-supervised approach , and the resulting network is treated as an initialized network , and in the second T2 epochs it is trained in a standard supervised learning manner . ( ii ) Supervised Learning : it is entirely trained using supervised learning in the T1 +T2 epochs . As per the normal process , the model is trained on the training set and tested on the testing set . To evaluate we use Mean Square Error ( MSE ) as a criterion . Here we use the vanilla mean squared loss function . Experimental findings . We plot the variation curve of MSE with the imbalance coefficient on the testing set for the two training methods . As illustrated in Figure 2a , what has been clearly observed is that the MSE for both methods grows with an increase in the imbalance coefficient . More importantly , it is found that SSL could alleviate this problem to some degree . The experimental findings , thus , lead us to mitigate the imbalance regression problem with SSL . Remark It is true that the above experiments concede that SSL can be beneficial to long-tailed regression , albeit with some restrictions that remain when we adapt it to neural networks . Well , yes , we have imposed settings for noise , namely , the noise added is controllable in terms of its impact on the regression values . Unfortunately , scaling the technique beyond shallow to deep networks , there is a difficulty in keeping the difference between the output values of similar samples under regression within a threshold , a concern that arises in the case of a sample augmented with random noise , where the difference between the output values of the noisy sample and the original sample is more than the threshold , as shown in Figure 2b , hence the challenge stems from finding valid noise to ensure the generation of similar samples .
This paper proposes a novel algorithm SSIR to address the imbalanced problem in regression tasks, which seamlessly combines self-supervised learning and imbalanced regression by giving the formal definition of similarity in the regression task. Besides, the authors specifically propose to limit the volume of noise on the output, and in doing so to find meaningful noise on the input by back propagation. Experimental results show that our approach achieves the state-of-the-art performance.
SP:f3cd4edcd106270bf2b809a5adc3dc8fc86f6f5b
EVaDE : Event-Based Variational Thompson Sampling for Model-Based Reinforcement Learning
Posterior Sampling for Reinforcement Learning ( PSRL ) is a well-known algorithm that augments model-based reinforcement learning ( MBRL ) algorithms with Thompson sampling . PSRL maintains posterior distributions of the environment transition dynamics and the reward function to procure posterior samples that are used to generate data for training the controller . Maintaining posterior distributions over all possible transition and reward functions for tasks with high dimensional state and action spaces is intractable . Recent works show that dropout used in conjunction with neural networks induce variational distributions that can approximate these posteriors . In this paper , we propose Event-based Variational Distributions for Exploration ( EVaDE ) , variational distributions that are useful for MBRL , especially when the underlying domain is object-based . We leverage the general domain knowledge of object-based domains to design three types of event-based convolutional layers to direct exploration , namely the noisy event interaction layer , the noisy event weighting layer and the noisy event translation layer respectively . These layers rely on Gaussian dropouts and are inserted in between the layers of the deep neural network model to help facilitate variational Thompson sampling . We empirically show the effectiveness of EVaDE equipped Simulated Policy Learning ( SimPLe ) on a randomly selected suite of Atari games , where the number of agent environment interactions is limited to 100K . 1 INTRODUCTION . Model-Based Reinforcement Learning ( MBRL ) has recently gained popularity for tasks that allow for a very limited number of interactions with the environment ( Kaiser et al. , 2020 ) . These algorithms use a model of the environment , that is learnt in addition to the policy , to improve sample efficiency in several ways ; these include generating artificial training examples ( Kaiser et al. , 2020 ; Sutton , 1991 ) , assisting with planning ( Nagabandi et al. , 2017 ; Coulom , 2006 ; Williams et al. , 2015 ; Curi et al. , 2020 ) and guiding policy search ( Levine & Koltun , 2013 ; Chebotar et al. , 2017 ) . Additionally , it is easier to incorporate inductive biases derived from the domain knowledge of the task for learning the model , as the biases can be directly built into the transition and reward functions . In this paper , we show how domain knowledge can also be used for designing exploration strategies in MBRL . Model free agents explore the space of policies and value functions ; MBRL agents , on the other hand , explore the space of transition dynamics and reward functions . One method for exploring the space of transition dynamics and reward functions is Posterior Sampling for Reinforcement Learning ( PSRL ) ( Strens , 2000 ; Osband & Van Roy , 2017 ) , which uses the Thompson sampling ( Thompson , 1933 ) method of sampling the posterior of the model to explore other plausible models . Maintaining the posterior is generally intractable and in practice , variational distributions are often used as an approximation to the posterior ( Aravindan & Lee , 2021 ; Wang & Zhou , 2020 ; Zhang et al. , 2019 ) . Traditionally , variational distributions are designed with two considerations in mind : inference and/or sampling should be efficient with the variational distribution , and the variational distribution should approximate the true posterior as accurately as possible . For MBRL , we propose to also design the variational distribution to generate trajectories through parts of the state space that may potentially give high returns , for the purpose of exploration . In MBRL , trajectories are generated in the state space by running policies that are optimized against the learned model . One way to generate useful exploratory trajectories , is to perturb the reward function in the model so that a different part of the state space appears to contain high rewards , causing the policy to direct the trajectories towards those states . Another method is to perturb the reward function so that parts of the state space traversed by the current policy appear sub-optimal , causing the policy to seek new trajectories . We focus on problems where the underlying domain is object-based , i.e. , domains where the reward functions depend heavily on the locations of individual objects and interactions between objects , which we call events . An example of such an object based task , is the popular Atari game Breakout . In the game , the agent is rewarded when the ball hits a brick and will not lose a life as long as the paddle successfully hits the ball , both of which can be described as an interaction between two objects . The rewards are determined by the interactions between the ball and the bricks , the wall or the paddle . For such domains , we present Event based Variational Distributions for Exploration ( EVaDE ) , a set of variational distributions that can help generate useful exploratory trajectories for deep convolutional neural network models . EVaDE comprises three Gaussian dropout ( Srivastava et al. , 2014 ) based convolutional layers , namely the noisy event interaction layer , the noisy event weighting layer and the noisy event translation layer respectively . The noisy event interaction layer is designed to provide perturbations to the reward function in states where multiple objects appear at the same location , randomly perturbing the value of interactions between objects . The noisy event weighting layer is designed to perturb the output of a convolutional layer at a single location ; assuming that the output of the convolutional filters capture events , this would upweight and downweight the reward associated with these events randomly . The noisy event translation layer is designed to perturb trajectories that go through ” narrow passages ” ; small translations can randomly perturb the returns from such trajectories , causing the policy to explore different trajectories . These EVaDE layers can be used as normal convolutional layers and can be inserted in between the layers of the environment network models . When included in deep convolutional networks , noisy event interaction layers , noisy event weighting layers and noisy event translation layers generate perturbations on possible object interactions , on the importance of different events and on the positional importance of objects/events respectively , through the dropout mechanism which induces variational distributions over the model parameters ( Srivastava et al. , 2014 ; Gal & Ghahramani , 2016 ) . An interesting aspect of designing for exploration is that the variational distributions can be helpful even if they are not designed to approximate the posterior well , as long as they assist in perturbing the policy out of local optimums . After perturbing the policy , incorrect parts of the model will either be corrected by data or left incorrect if they are irrelevant to optimal behaviour . Finally , we approximate PSRL by equipping the environment models of Simulated Policy Learning ( SimPLe ) ( Kaiser et al. , 2020 ) with EVaDE layers . We conduct experiments to compare EVaDE equipped SimPLe ( EVaDE-SimPLe ) with various popular baselines on a suite of 12 randomly selected Atari games . In the experiments conducted , all agents work in the low data regime , where the number of interactions with the real environment is restricted to 100K . EVaDE-SimPLe agents achieve a human normalized score of 0.78 on average in these games , which is 44 % more than the mean score of 0.54 achieved by a recent low data regime method , CURL ( Laskin et al. , 2020 ) , and 52 % more than the mean score of 0.51 achieved by vanilla-SimPLe agents . 2 BACKGROUND AND RELATED WORK . Posterior sampling approaches like Thompson Sampling ( Thompson , 1933 ) have been one of the more popular methods used to balance the exploration exploitation trade-off . Exact implementations of these algorithms have been shown to achieve near optimal regret bounds ( Agrawal & Jia , 2017 ; Jaksch et al. , 2010 ) . These approaches , however , work by maintaining a posterior distribution over all possible environment models and/or action-value functions . This is generally intractable in practice . Approaches that work by maintaining an approximated posterior distribution ( Osband et al. , 2016b ; Azizzadenesheli et al. , 2018 ) , or approaches that use bootstrap re-sampling to procure samples , ( Osband et al. , 2016a ; Osband & Van Roy , 2015 ) have achieved success in recent times . Variational inference procures samples from distributions that can be represented efficiently while also being easy to sample . These variational distributions are updated with observed data to approximate the true posterior as accurately as possible . Computationally cost effective methods such as dropouts have been known to induce variational distributions over the model parameters ( Srivastava et al. , 2014 ; Gal & Ghahramani , 2016 ) . Consequently , variational inference approaches that approximate the posterior distributions required by Thompson sampling have gained popularity ( Aravindan & Lee , 2021 ; Wang & Zhou , 2020 ; Urteaga & Wiggins , 2018 ; Xie et al. , 2019 ) . Model-based reinforcement learning improves sample complexity at the computational cost of maintaining and performing posterior updates to the learnt environment models . Neural networks have been successful in modelling relatively complex and diverse tasks such as Atari games ( Oh et al. , 2015 ; Ha & Schmidhuber , 2018 ) . Over the past few years , variational inference has been used to represent environment models , with the intention to capture environment stochasticity ( Hafner et al. , 2019 ; Babaeizadeh et al. , 2018 ; Gregor et al. , 2019 ) . SimPLe ( Kaiser et al. , 2020 ) is one of the first algorithms to use MBRL to train agents to play video games from images . It is also perhaps the closest to EVaDE , as it not only employs an iterative algorithm to train its agent , but also uses an additional convolutional network assisted by an autoregressive LSTM based RNN to approximate the posterior of the hidden variables in the stochastic model . Thus , similar to existing methods ( Hafner et al. , 2019 ; Babaeizadeh et al. , 2018 ; Gregor et al. , 2019 ) , these variational distributions are used for the purpose of handling environment stochasticity rather than improving exploration . To the contrary , EVaDE-SimPLe is an approximation to PSRL , that uses a Gaussian dropout induced variational distribution over deterministic reward functions solely for the purpose of exploration . Unlike SimPLe , which uses the stochastic model to generate trajectories to train its agent , EVaDE-SimPLe agents optimize for a deterministic environment model sampled from the variational distribution . Moreover , with EVaDE , these variational distributions are carefully designed so as to explore different object interactions , importance of events and positional importance of objects/events , that we hypothesize are beneficial for learning good policies in object-based tasks . 3 EVENT BASED VARIATIONAL DISTRIBUTIONS FOR EXPLORATION . Event-based Variational Distributions for Exploration ( EVaDE ) consist of a set of variational distribution designs , each induced by a noisy convolutional layer . These convolutional layers can be inserted after any intermediate hidden layer in deep convolutional neural networks to help us construct approximate posteriors over the model parameters to produce samples from relevant parts of the model space . EVaDE convolutional layers use Gaussian multiplicative dropout to draw samples from the variational approximation of the posterior . Posterior sampling is done by multiplying each parameter , θienv , of these EVaDE layers by a perturbation drawn from a Gaussian distribution , N ( 1 , ( σienv ) 2 ) . These perturbations are sampled by leveraging the reparameterization trick ( Kingma et al. , 2015 ; Salimans et al. , 2017 ; Plappert et al. , 2018 ; Fortunato et al. , 2018 ) using a noise sample from the standard Normal distribution , N ( 0 , 1 ) , as shown in Equation 1 . The variance corresponding to each parameter , ( σienv ) 2 , is trained jointly with the model parameters θenv . θ̃ienv ← θienv ( 1 + σienv i ) ; i ∼ N ( 0 , 1 ) ( 1 ) When the number of agent-environment interactions is limited , the exploration strategy employed by the agent is critical . In object-based domains , rewards and penalties are often sparse and occur when objects interact . Hence , the agent needs to experience most of the events in order to learn a good environment model . Generating trajectories that contain events is hence a reasonable exploration strategy . Additionally , a very common issue with training using a very few number of interactions is that the agent may often get stuck in a local optima , prioritising an event , which is relatively important , but may not lead to an optimal solution . Generating potentially high return alternate trajectories that do not include that event is another reasonable exploration strategy . With these exploration strategies in mind , we introduce three EVaDE layers , namely the noisy event interaction layer , the noisy event weighting layer and the noisy event translation layer . All the three layers are constructed with the hypothesis that the channels of the outputs of intermediate layers of deep convolutional neural networks either capture object positions , or events ( interaction of multiple objects detected by multi-layer composition of the networks ) .
This paper improves a model-based reinforcement learning method by Kaiser et al. (2020) by introducing three different types of neural network layers to the transition and reward model. These modifications are motivated by intuitions about what would be beneficial to model for object-based environments (in Atari games). There are experiments on 12 games in which the proposed method performs the best most of the time. Ablations show that using any one of the three proposed layers is also beneficial.
SP:fe963687c10f65d3f824a56f900de29ccabccb43
EVaDE : Event-Based Variational Thompson Sampling for Model-Based Reinforcement Learning
Posterior Sampling for Reinforcement Learning ( PSRL ) is a well-known algorithm that augments model-based reinforcement learning ( MBRL ) algorithms with Thompson sampling . PSRL maintains posterior distributions of the environment transition dynamics and the reward function to procure posterior samples that are used to generate data for training the controller . Maintaining posterior distributions over all possible transition and reward functions for tasks with high dimensional state and action spaces is intractable . Recent works show that dropout used in conjunction with neural networks induce variational distributions that can approximate these posteriors . In this paper , we propose Event-based Variational Distributions for Exploration ( EVaDE ) , variational distributions that are useful for MBRL , especially when the underlying domain is object-based . We leverage the general domain knowledge of object-based domains to design three types of event-based convolutional layers to direct exploration , namely the noisy event interaction layer , the noisy event weighting layer and the noisy event translation layer respectively . These layers rely on Gaussian dropouts and are inserted in between the layers of the deep neural network model to help facilitate variational Thompson sampling . We empirically show the effectiveness of EVaDE equipped Simulated Policy Learning ( SimPLe ) on a randomly selected suite of Atari games , where the number of agent environment interactions is limited to 100K . 1 INTRODUCTION . Model-Based Reinforcement Learning ( MBRL ) has recently gained popularity for tasks that allow for a very limited number of interactions with the environment ( Kaiser et al. , 2020 ) . These algorithms use a model of the environment , that is learnt in addition to the policy , to improve sample efficiency in several ways ; these include generating artificial training examples ( Kaiser et al. , 2020 ; Sutton , 1991 ) , assisting with planning ( Nagabandi et al. , 2017 ; Coulom , 2006 ; Williams et al. , 2015 ; Curi et al. , 2020 ) and guiding policy search ( Levine & Koltun , 2013 ; Chebotar et al. , 2017 ) . Additionally , it is easier to incorporate inductive biases derived from the domain knowledge of the task for learning the model , as the biases can be directly built into the transition and reward functions . In this paper , we show how domain knowledge can also be used for designing exploration strategies in MBRL . Model free agents explore the space of policies and value functions ; MBRL agents , on the other hand , explore the space of transition dynamics and reward functions . One method for exploring the space of transition dynamics and reward functions is Posterior Sampling for Reinforcement Learning ( PSRL ) ( Strens , 2000 ; Osband & Van Roy , 2017 ) , which uses the Thompson sampling ( Thompson , 1933 ) method of sampling the posterior of the model to explore other plausible models . Maintaining the posterior is generally intractable and in practice , variational distributions are often used as an approximation to the posterior ( Aravindan & Lee , 2021 ; Wang & Zhou , 2020 ; Zhang et al. , 2019 ) . Traditionally , variational distributions are designed with two considerations in mind : inference and/or sampling should be efficient with the variational distribution , and the variational distribution should approximate the true posterior as accurately as possible . For MBRL , we propose to also design the variational distribution to generate trajectories through parts of the state space that may potentially give high returns , for the purpose of exploration . In MBRL , trajectories are generated in the state space by running policies that are optimized against the learned model . One way to generate useful exploratory trajectories , is to perturb the reward function in the model so that a different part of the state space appears to contain high rewards , causing the policy to direct the trajectories towards those states . Another method is to perturb the reward function so that parts of the state space traversed by the current policy appear sub-optimal , causing the policy to seek new trajectories . We focus on problems where the underlying domain is object-based , i.e. , domains where the reward functions depend heavily on the locations of individual objects and interactions between objects , which we call events . An example of such an object based task , is the popular Atari game Breakout . In the game , the agent is rewarded when the ball hits a brick and will not lose a life as long as the paddle successfully hits the ball , both of which can be described as an interaction between two objects . The rewards are determined by the interactions between the ball and the bricks , the wall or the paddle . For such domains , we present Event based Variational Distributions for Exploration ( EVaDE ) , a set of variational distributions that can help generate useful exploratory trajectories for deep convolutional neural network models . EVaDE comprises three Gaussian dropout ( Srivastava et al. , 2014 ) based convolutional layers , namely the noisy event interaction layer , the noisy event weighting layer and the noisy event translation layer respectively . The noisy event interaction layer is designed to provide perturbations to the reward function in states where multiple objects appear at the same location , randomly perturbing the value of interactions between objects . The noisy event weighting layer is designed to perturb the output of a convolutional layer at a single location ; assuming that the output of the convolutional filters capture events , this would upweight and downweight the reward associated with these events randomly . The noisy event translation layer is designed to perturb trajectories that go through ” narrow passages ” ; small translations can randomly perturb the returns from such trajectories , causing the policy to explore different trajectories . These EVaDE layers can be used as normal convolutional layers and can be inserted in between the layers of the environment network models . When included in deep convolutional networks , noisy event interaction layers , noisy event weighting layers and noisy event translation layers generate perturbations on possible object interactions , on the importance of different events and on the positional importance of objects/events respectively , through the dropout mechanism which induces variational distributions over the model parameters ( Srivastava et al. , 2014 ; Gal & Ghahramani , 2016 ) . An interesting aspect of designing for exploration is that the variational distributions can be helpful even if they are not designed to approximate the posterior well , as long as they assist in perturbing the policy out of local optimums . After perturbing the policy , incorrect parts of the model will either be corrected by data or left incorrect if they are irrelevant to optimal behaviour . Finally , we approximate PSRL by equipping the environment models of Simulated Policy Learning ( SimPLe ) ( Kaiser et al. , 2020 ) with EVaDE layers . We conduct experiments to compare EVaDE equipped SimPLe ( EVaDE-SimPLe ) with various popular baselines on a suite of 12 randomly selected Atari games . In the experiments conducted , all agents work in the low data regime , where the number of interactions with the real environment is restricted to 100K . EVaDE-SimPLe agents achieve a human normalized score of 0.78 on average in these games , which is 44 % more than the mean score of 0.54 achieved by a recent low data regime method , CURL ( Laskin et al. , 2020 ) , and 52 % more than the mean score of 0.51 achieved by vanilla-SimPLe agents . 2 BACKGROUND AND RELATED WORK . Posterior sampling approaches like Thompson Sampling ( Thompson , 1933 ) have been one of the more popular methods used to balance the exploration exploitation trade-off . Exact implementations of these algorithms have been shown to achieve near optimal regret bounds ( Agrawal & Jia , 2017 ; Jaksch et al. , 2010 ) . These approaches , however , work by maintaining a posterior distribution over all possible environment models and/or action-value functions . This is generally intractable in practice . Approaches that work by maintaining an approximated posterior distribution ( Osband et al. , 2016b ; Azizzadenesheli et al. , 2018 ) , or approaches that use bootstrap re-sampling to procure samples , ( Osband et al. , 2016a ; Osband & Van Roy , 2015 ) have achieved success in recent times . Variational inference procures samples from distributions that can be represented efficiently while also being easy to sample . These variational distributions are updated with observed data to approximate the true posterior as accurately as possible . Computationally cost effective methods such as dropouts have been known to induce variational distributions over the model parameters ( Srivastava et al. , 2014 ; Gal & Ghahramani , 2016 ) . Consequently , variational inference approaches that approximate the posterior distributions required by Thompson sampling have gained popularity ( Aravindan & Lee , 2021 ; Wang & Zhou , 2020 ; Urteaga & Wiggins , 2018 ; Xie et al. , 2019 ) . Model-based reinforcement learning improves sample complexity at the computational cost of maintaining and performing posterior updates to the learnt environment models . Neural networks have been successful in modelling relatively complex and diverse tasks such as Atari games ( Oh et al. , 2015 ; Ha & Schmidhuber , 2018 ) . Over the past few years , variational inference has been used to represent environment models , with the intention to capture environment stochasticity ( Hafner et al. , 2019 ; Babaeizadeh et al. , 2018 ; Gregor et al. , 2019 ) . SimPLe ( Kaiser et al. , 2020 ) is one of the first algorithms to use MBRL to train agents to play video games from images . It is also perhaps the closest to EVaDE , as it not only employs an iterative algorithm to train its agent , but also uses an additional convolutional network assisted by an autoregressive LSTM based RNN to approximate the posterior of the hidden variables in the stochastic model . Thus , similar to existing methods ( Hafner et al. , 2019 ; Babaeizadeh et al. , 2018 ; Gregor et al. , 2019 ) , these variational distributions are used for the purpose of handling environment stochasticity rather than improving exploration . To the contrary , EVaDE-SimPLe is an approximation to PSRL , that uses a Gaussian dropout induced variational distribution over deterministic reward functions solely for the purpose of exploration . Unlike SimPLe , which uses the stochastic model to generate trajectories to train its agent , EVaDE-SimPLe agents optimize for a deterministic environment model sampled from the variational distribution . Moreover , with EVaDE , these variational distributions are carefully designed so as to explore different object interactions , importance of events and positional importance of objects/events , that we hypothesize are beneficial for learning good policies in object-based tasks . 3 EVENT BASED VARIATIONAL DISTRIBUTIONS FOR EXPLORATION . Event-based Variational Distributions for Exploration ( EVaDE ) consist of a set of variational distribution designs , each induced by a noisy convolutional layer . These convolutional layers can be inserted after any intermediate hidden layer in deep convolutional neural networks to help us construct approximate posteriors over the model parameters to produce samples from relevant parts of the model space . EVaDE convolutional layers use Gaussian multiplicative dropout to draw samples from the variational approximation of the posterior . Posterior sampling is done by multiplying each parameter , θienv , of these EVaDE layers by a perturbation drawn from a Gaussian distribution , N ( 1 , ( σienv ) 2 ) . These perturbations are sampled by leveraging the reparameterization trick ( Kingma et al. , 2015 ; Salimans et al. , 2017 ; Plappert et al. , 2018 ; Fortunato et al. , 2018 ) using a noise sample from the standard Normal distribution , N ( 0 , 1 ) , as shown in Equation 1 . The variance corresponding to each parameter , ( σienv ) 2 , is trained jointly with the model parameters θenv . θ̃ienv ← θienv ( 1 + σienv i ) ; i ∼ N ( 0 , 1 ) ( 1 ) When the number of agent-environment interactions is limited , the exploration strategy employed by the agent is critical . In object-based domains , rewards and penalties are often sparse and occur when objects interact . Hence , the agent needs to experience most of the events in order to learn a good environment model . Generating trajectories that contain events is hence a reasonable exploration strategy . Additionally , a very common issue with training using a very few number of interactions is that the agent may often get stuck in a local optima , prioritising an event , which is relatively important , but may not lead to an optimal solution . Generating potentially high return alternate trajectories that do not include that event is another reasonable exploration strategy . With these exploration strategies in mind , we introduce three EVaDE layers , namely the noisy event interaction layer , the noisy event weighting layer and the noisy event translation layer . All the three layers are constructed with the hypothesis that the channels of the outputs of intermediate layers of deep convolutional neural networks either capture object positions , or events ( interaction of multiple objects detected by multi-layer composition of the networks ) .
This paper proposes an approach for Model-based reinforcement learning relying on Posterior Sampling for Reinforcement learning. Posterior sampling for reinforcement learning uses Thompson sampling to balance exploitation and exploration. However this requires maintaining posterior of dynamic transitions which is often intractable. The authors use dropout, which has been shown to approximate posteriors, to maintain approximate posteriors of the transitions and the reward function. The system model presented in the paper specifically applies to object-based tasks. Only three event convolutional layers use dropout: one for object interaction, one for event weighting and one for event translation. These layers can be inserted into any existing neural network model to provide an approximate posterior. The authors combine this model with a PPO agent trained on the model to show its empirical performance on Atari games with a limited number of interactions with the real environment.
SP:fe963687c10f65d3f824a56f900de29ccabccb43
How Did the Model Change? Efficiently Assessing Machine Learning API Shifts
1 INTRODUCTION . Machine learning ( ML ) prediction APIs have made it dramatically easier to build ML applications . For example , one can use Microsoft text API ( Mic , a ) to determine the polarity of a text review written by a customer , or Google speech API ( Goo , b ) to recognize users ’ spoken commands received by a smart home device . These APIs have been gaining in popularity ( MLa ; Chen et al. , 2020 ) , as they eliminate the need for ML users to train their own models . Monitoring and assessing the performance of these third-party ML APIs over time , however , is under-explored . ML API providers continuously collect new data or change their model architectures ( Qi et al. , 2020 ) to update their services , which could silently help or harm downstream applications ’ performance . For example , as shown in Figure 1 ( a ) and ( b ) , we observe a 7 % overall accuracy drop of IBM speech API on the AUDIOMNST dataset in March 2021 compared March 2020 . In our systematic study of 36 API and dataset combinations , there are 12 cases where the API ’ s performance changed by more than 1 % on the same dataset from 2020 to 2021 ( sometimes for the worse ) . Such performance shifts are of serious concern not only because of potential disruptions to downstream tasks , but also because consistency is often required for audits and oversight . Therefore , it is important to precisely assess shifts in an API ’ s predictions over time . Moreover , in this assessment , it is often more informative to quantify how the entire confusion matrix of the API has changed rather than just the overall accuracy . In the IBM case in Figure 1 , it is interesting that a major culprit of the drop in performance is the 2021 model mistaking “ four ” for “ five ” . In other settings , changes in the confusion matrix could still cause issues even if the overall accuracy stays the same . In this paper , we formalize the problem of assessing API shifts as estimating changes in the confusion matrix on the same dataset in a sample-efficient manner ( i.e. , with few calls to the API itself to minimize dollar cost ) . The straightforward approach is to compare the API ’ s prediction on randomly sampled data . However , this can require a large number of API calls to estimate the confusion matrix , which is expensive given that each call costs money . To help address this challenge , we propose MASA , a principled algorithm for ML API shift assessments . MASA efficiently estimates shifts in the API ’ s confusion matrix by clustering the dataset and adaptively sampling data from different clusters to query the API . MASA automates its sampling rate from different data clusters based on the uncertainty in the confusion matrix estimation . For example , MASA may query the ML API on more samples with the true label “ four ” than “ one ” , if it is less sure about the estimated performance change on the former . Employing an upper-confidence-bound approach to estimate the uncertainties , MASA enjoys a low computation and space cost as well as a fast estimation error rate guarantee . MASA ’ s adaptive sampling substantially improves the quality of estimation for API shifts . In extensive experiments on real world ML APIs , MASA ’ s assessment error is often an order of magnitude smaller than that of standard uniform sampling with same sample size ( e.g. , Figure 1 ( c ) ) . To reach the same tolerable target estimation error , MASA can reduce the required sample size by more than 50 % , sometimes up to 90 % . Contributions . In short , our main contributions include : 1 . We demonstrate that commercial Ml APIs can experience significant performance shifts over time , and formulate ML API shift assessments via confusion matrix difference estimation as an important practical problem . We will release the dataset consisting of 1,224,278 samples annotated by ML APIs in different date to stimulate more research on ML API shifts . 2 . We propose MASA , an algorithm to assess the ML API performance shifts efficiently . MASA adaptively determines querying the ML API on which data points to minimize the shift estimation error under a sample size constraint . We show that MASA enjoys a low computation cost and performance guarantees . 3 . We evaluate MASA on real world APIs from Google , Microsoft , Amazon and other providers for tasks including speech recognition , sentiment analysis , and facial emotion recognition . MASA leads to estimation errors an order of magnitude smaller than standard uniform sampling using the same sample size , or over 90 % fewer samples to reach the same tolerable estimation error . Related Work . Distribution shifts in ML deployments : Performance shifts in ML systems have been observed in applications like disease diagnosis ( Lipton et al. , 2018 ) , facial recognition ( Wang et al. , 2020 ) , and Inference of molecular structure ( Koh et al. , 2020 ) . Most of them are attributed to distribution shifts , i.e. , the distribution of the test and training datasets are different . Distribution shifts are usually modeled as covariate shifts ( Shimodaira , 2000 ; Sugiyama et al. , 2007 ; QuiñoneroCandela et al. , 2009 ) or label shifts ( Lipton et al. , 2018 ; Saerens et al. , 2002 ; Azizzadenesheli et al. , 2019 ; Zhao et al. , 2021 ) . API shifts are orthogonal to distribution shifts : instead of attributing the performance shifts to data distribution changes , API shifts concern with ML APIs changes which changes its predictions on the same dataset . The methods for detecting distribution drifts typically rely on changes in data feature statistics and can not detect changes in the API on the same data . To the best of our knowledge , MASA is the first work to systematically investigate ML API shifts . Deploying and monitoring ML APIs : Several issues in deployed ML APIs have been studied . For example , Buolamwini & Gebru ( 2018 ) showed that strong biases toward minority can exist in commercial APIs and Ribeiro et al . ( 2020 ) revealed that several bugs in commercial APIs can be detected using checklists . Kang et al . ( 2020 ) extend program assertions to monitor and improve deployed ML models . Chen et al . ( 2020 ) consider the trade-offs between accuracy performance and cost via exploiting multiple APIs . On the other hand , the proposed MASA focuses on estimating ( silent ) API performance changes cheaply and accurately , which has not been studied before . Stratified sampling and multi-arm bandits : Stratified sampling has proved to be useful in various domains , such as approximate query processing ( Chaudhuri et al. , 2007 ) , population mean estimation ( Carpentier & Munos , 2011 ; Carpentier et al. , 2015 ) , and complex integration problems ( Leprêtre et al. , 2017 ) . A common approach is to model stratified sampling as a multi-arm bandit ( MAB ) problem : view each data partition as an arm , and set the regret as the variance of the obtained estimator . Plenty of algorithms exist for solving standard MAB problems , such as the epsilon greedy algorithm ( Slivkins , 2019 ) , upper-confidence-bound approach ( Auer et al. , 2002 ) , and Thompson sampling method ( Russo et al. , 2018 ) . While those algorithms aim at playing the best arm as often as possible , stratified sampling ’ s goal is often to estimate the average of all arms , and thus needs to allocate the number of calls for all arms aptly based on their variance . In contrast to estimating the population average in standard stratified sampling , our goal is to simultaneously estimate a matrix whose entries can be correlated . Thus , we have an objective ( uncertainty score ) that is different from theirs ( variance ) , which also leads to an optimal allocation different from that of standard stratified sampling . This difference requires additional statistical bounds to prove convergence , which we provide in our paper . It also results in a different upper-confidence-bound term and convergence rate compared to standard bandit algorithms . 2 THE API SHIFT PROBLEM . Empirical assessment of ML API shifts . We start by making an interesting observation : Commercial ML APIs ’ performance can change substantial over time on the same datasets . We investigated twelve standard datasets across three different tasks , namely , YELP ( Dat , c ) , IMDB ( Maas et al . ) , WAIMAI ( Dat , b ) , SHOP ( Dat , a ) for sentiment analysis , FER+ ( Goodfellow et al. , 2015 ) , RAFDB ( Li et al . ) , EXPW ( Zhang et al . ) , AFNET ( Mollahosseini et al. , 2019 ) for facial emotion recognition , and DIGIT ( Dat , d ) , AMNIST ( Becker et al. , 2018 ) , CMD ( Warden , 2018 ) , FLUENT ( Lugosch et al . ) , for speech recognition . For each dataset , we evaluated three commercial ML APIs ’ accuracy in April 2020 and April 2021 . Figure 2 summarizes the overall accuracy changes . There are several interesting empirical findings . First , API performance changes are quite common . In fact , as shown in Figure 2 , API performance changes exceeding 1 % occurred in about 33 % of all ( 36 ) considered ML API-dataset combinations . Since the data distribution remains fixed , such a change is due to ML APIs ’ updates . Second , the API updates can either help or hurt the accuracy performance depending on the datasets . For example , as shown in Figure 2 ( a ) , the Amazon sentiment analysis API ’ s accuracy increases on YELP , WAIMAI , and SHOP , but decreases on IMDB . In addition , the update of Microsoft facial emotion recognition API only affects performance on the FER+ dataset , as shown in Figure 2 ( b ) . Another interesting finding is that the magnitude of the performance change can be quite different . In fact , most of the accuracy differences are between 1–3 % , but on DIGIT dataset , Google ’ s accuracy change is more than 20 % . Fine-grained assessment of API shift as changes in the confusion matrix . Based on feedback from practitioners , accuracy change alone is insufficient , and attribution to per class change is often much more informative ( Tsipras et al. , 2020 ; Hou et al. , 2019 ; Luque et al. , 2019 ) . Thus , a natural idea is to quantify an ML API ’ s performance by its confusion matrix . We assess the change of the confusion matrix over time as a measure of API shift . Formally , consider an ML service for a classification task with L labels . For a data point x from some domain X , let ŷ ( x ) ∈ [ L ] denote its predicted label on x , and y ( x ) be the true label . For example , for sentiment analysis , x is a text paragraph , and the task is to predict if the polarity of x is positive or negative . Here L = 2 , and ŷ ( x ) = 1 implies positive predicted label while y ( x ) = 2 indicates negative true label . The confusion matrix is denoted by C ∈ RL×L where C i , j , Pr [ y ( x ) = i , ŷ ( x ) = j ] . Given a confusion matrix of the ML API measured previously ( say , a few months ago ) , Co , the ML API shift is defined as ∆C , C −CO . Using confusion matrix difference to quantify the ML API shift is informative . E.g , the overall accuracy change is simply the trace of ∆C . It also explains which label gets harder or easier for the updated API . Still consider , e.g. , sentiment analysis . Given a 2 % overall accuracy change , ∆C1,2 = 1 % and ∆C2,1 = −3 % implies that the change is due to predicting less ( -3 % ) negative texts as positive , by sacrificing the accuracy on positive texts slightly ( 1 % ) . This suggests that the API could have been updated with more negative training texts .
This paper considers the problem of estimating the change in the performance of commercial ML APIs (ML as a service) as the models are updated over time (experiments are for 2020 vs 2021). It formalizes the problem as estimating the change in the confusion matrix over time. The main theoretical contribution is an adaptive sampling method to more efficiently estimate this shift. Interesting empirical results on various ML APIs are provided in the paper, showing the relevance of the problem and the effectiveness of the proposed method.
SP:be306853f891ecd112e8ec21ec332af48be9b3ec
How Did the Model Change? Efficiently Assessing Machine Learning API Shifts
1 INTRODUCTION . Machine learning ( ML ) prediction APIs have made it dramatically easier to build ML applications . For example , one can use Microsoft text API ( Mic , a ) to determine the polarity of a text review written by a customer , or Google speech API ( Goo , b ) to recognize users ’ spoken commands received by a smart home device . These APIs have been gaining in popularity ( MLa ; Chen et al. , 2020 ) , as they eliminate the need for ML users to train their own models . Monitoring and assessing the performance of these third-party ML APIs over time , however , is under-explored . ML API providers continuously collect new data or change their model architectures ( Qi et al. , 2020 ) to update their services , which could silently help or harm downstream applications ’ performance . For example , as shown in Figure 1 ( a ) and ( b ) , we observe a 7 % overall accuracy drop of IBM speech API on the AUDIOMNST dataset in March 2021 compared March 2020 . In our systematic study of 36 API and dataset combinations , there are 12 cases where the API ’ s performance changed by more than 1 % on the same dataset from 2020 to 2021 ( sometimes for the worse ) . Such performance shifts are of serious concern not only because of potential disruptions to downstream tasks , but also because consistency is often required for audits and oversight . Therefore , it is important to precisely assess shifts in an API ’ s predictions over time . Moreover , in this assessment , it is often more informative to quantify how the entire confusion matrix of the API has changed rather than just the overall accuracy . In the IBM case in Figure 1 , it is interesting that a major culprit of the drop in performance is the 2021 model mistaking “ four ” for “ five ” . In other settings , changes in the confusion matrix could still cause issues even if the overall accuracy stays the same . In this paper , we formalize the problem of assessing API shifts as estimating changes in the confusion matrix on the same dataset in a sample-efficient manner ( i.e. , with few calls to the API itself to minimize dollar cost ) . The straightforward approach is to compare the API ’ s prediction on randomly sampled data . However , this can require a large number of API calls to estimate the confusion matrix , which is expensive given that each call costs money . To help address this challenge , we propose MASA , a principled algorithm for ML API shift assessments . MASA efficiently estimates shifts in the API ’ s confusion matrix by clustering the dataset and adaptively sampling data from different clusters to query the API . MASA automates its sampling rate from different data clusters based on the uncertainty in the confusion matrix estimation . For example , MASA may query the ML API on more samples with the true label “ four ” than “ one ” , if it is less sure about the estimated performance change on the former . Employing an upper-confidence-bound approach to estimate the uncertainties , MASA enjoys a low computation and space cost as well as a fast estimation error rate guarantee . MASA ’ s adaptive sampling substantially improves the quality of estimation for API shifts . In extensive experiments on real world ML APIs , MASA ’ s assessment error is often an order of magnitude smaller than that of standard uniform sampling with same sample size ( e.g. , Figure 1 ( c ) ) . To reach the same tolerable target estimation error , MASA can reduce the required sample size by more than 50 % , sometimes up to 90 % . Contributions . In short , our main contributions include : 1 . We demonstrate that commercial Ml APIs can experience significant performance shifts over time , and formulate ML API shift assessments via confusion matrix difference estimation as an important practical problem . We will release the dataset consisting of 1,224,278 samples annotated by ML APIs in different date to stimulate more research on ML API shifts . 2 . We propose MASA , an algorithm to assess the ML API performance shifts efficiently . MASA adaptively determines querying the ML API on which data points to minimize the shift estimation error under a sample size constraint . We show that MASA enjoys a low computation cost and performance guarantees . 3 . We evaluate MASA on real world APIs from Google , Microsoft , Amazon and other providers for tasks including speech recognition , sentiment analysis , and facial emotion recognition . MASA leads to estimation errors an order of magnitude smaller than standard uniform sampling using the same sample size , or over 90 % fewer samples to reach the same tolerable estimation error . Related Work . Distribution shifts in ML deployments : Performance shifts in ML systems have been observed in applications like disease diagnosis ( Lipton et al. , 2018 ) , facial recognition ( Wang et al. , 2020 ) , and Inference of molecular structure ( Koh et al. , 2020 ) . Most of them are attributed to distribution shifts , i.e. , the distribution of the test and training datasets are different . Distribution shifts are usually modeled as covariate shifts ( Shimodaira , 2000 ; Sugiyama et al. , 2007 ; QuiñoneroCandela et al. , 2009 ) or label shifts ( Lipton et al. , 2018 ; Saerens et al. , 2002 ; Azizzadenesheli et al. , 2019 ; Zhao et al. , 2021 ) . API shifts are orthogonal to distribution shifts : instead of attributing the performance shifts to data distribution changes , API shifts concern with ML APIs changes which changes its predictions on the same dataset . The methods for detecting distribution drifts typically rely on changes in data feature statistics and can not detect changes in the API on the same data . To the best of our knowledge , MASA is the first work to systematically investigate ML API shifts . Deploying and monitoring ML APIs : Several issues in deployed ML APIs have been studied . For example , Buolamwini & Gebru ( 2018 ) showed that strong biases toward minority can exist in commercial APIs and Ribeiro et al . ( 2020 ) revealed that several bugs in commercial APIs can be detected using checklists . Kang et al . ( 2020 ) extend program assertions to monitor and improve deployed ML models . Chen et al . ( 2020 ) consider the trade-offs between accuracy performance and cost via exploiting multiple APIs . On the other hand , the proposed MASA focuses on estimating ( silent ) API performance changes cheaply and accurately , which has not been studied before . Stratified sampling and multi-arm bandits : Stratified sampling has proved to be useful in various domains , such as approximate query processing ( Chaudhuri et al. , 2007 ) , population mean estimation ( Carpentier & Munos , 2011 ; Carpentier et al. , 2015 ) , and complex integration problems ( Leprêtre et al. , 2017 ) . A common approach is to model stratified sampling as a multi-arm bandit ( MAB ) problem : view each data partition as an arm , and set the regret as the variance of the obtained estimator . Plenty of algorithms exist for solving standard MAB problems , such as the epsilon greedy algorithm ( Slivkins , 2019 ) , upper-confidence-bound approach ( Auer et al. , 2002 ) , and Thompson sampling method ( Russo et al. , 2018 ) . While those algorithms aim at playing the best arm as often as possible , stratified sampling ’ s goal is often to estimate the average of all arms , and thus needs to allocate the number of calls for all arms aptly based on their variance . In contrast to estimating the population average in standard stratified sampling , our goal is to simultaneously estimate a matrix whose entries can be correlated . Thus , we have an objective ( uncertainty score ) that is different from theirs ( variance ) , which also leads to an optimal allocation different from that of standard stratified sampling . This difference requires additional statistical bounds to prove convergence , which we provide in our paper . It also results in a different upper-confidence-bound term and convergence rate compared to standard bandit algorithms . 2 THE API SHIFT PROBLEM . Empirical assessment of ML API shifts . We start by making an interesting observation : Commercial ML APIs ’ performance can change substantial over time on the same datasets . We investigated twelve standard datasets across three different tasks , namely , YELP ( Dat , c ) , IMDB ( Maas et al . ) , WAIMAI ( Dat , b ) , SHOP ( Dat , a ) for sentiment analysis , FER+ ( Goodfellow et al. , 2015 ) , RAFDB ( Li et al . ) , EXPW ( Zhang et al . ) , AFNET ( Mollahosseini et al. , 2019 ) for facial emotion recognition , and DIGIT ( Dat , d ) , AMNIST ( Becker et al. , 2018 ) , CMD ( Warden , 2018 ) , FLUENT ( Lugosch et al . ) , for speech recognition . For each dataset , we evaluated three commercial ML APIs ’ accuracy in April 2020 and April 2021 . Figure 2 summarizes the overall accuracy changes . There are several interesting empirical findings . First , API performance changes are quite common . In fact , as shown in Figure 2 , API performance changes exceeding 1 % occurred in about 33 % of all ( 36 ) considered ML API-dataset combinations . Since the data distribution remains fixed , such a change is due to ML APIs ’ updates . Second , the API updates can either help or hurt the accuracy performance depending on the datasets . For example , as shown in Figure 2 ( a ) , the Amazon sentiment analysis API ’ s accuracy increases on YELP , WAIMAI , and SHOP , but decreases on IMDB . In addition , the update of Microsoft facial emotion recognition API only affects performance on the FER+ dataset , as shown in Figure 2 ( b ) . Another interesting finding is that the magnitude of the performance change can be quite different . In fact , most of the accuracy differences are between 1–3 % , but on DIGIT dataset , Google ’ s accuracy change is more than 20 % . Fine-grained assessment of API shift as changes in the confusion matrix . Based on feedback from practitioners , accuracy change alone is insufficient , and attribution to per class change is often much more informative ( Tsipras et al. , 2020 ; Hou et al. , 2019 ; Luque et al. , 2019 ) . Thus , a natural idea is to quantify an ML API ’ s performance by its confusion matrix . We assess the change of the confusion matrix over time as a measure of API shift . Formally , consider an ML service for a classification task with L labels . For a data point x from some domain X , let ŷ ( x ) ∈ [ L ] denote its predicted label on x , and y ( x ) be the true label . For example , for sentiment analysis , x is a text paragraph , and the task is to predict if the polarity of x is positive or negative . Here L = 2 , and ŷ ( x ) = 1 implies positive predicted label while y ( x ) = 2 indicates negative true label . The confusion matrix is denoted by C ∈ RL×L where C i , j , Pr [ y ( x ) = i , ŷ ( x ) = j ] . Given a confusion matrix of the ML API measured previously ( say , a few months ago ) , Co , the ML API shift is defined as ∆C , C −CO . Using confusion matrix difference to quantify the ML API shift is informative . E.g , the overall accuracy change is simply the trace of ∆C . It also explains which label gets harder or easier for the updated API . Still consider , e.g. , sentiment analysis . Given a 2 % overall accuracy change , ∆C1,2 = 1 % and ∆C2,1 = −3 % implies that the change is due to predicting less ( -3 % ) negative texts as positive , by sacrificing the accuracy on positive texts slightly ( 1 % ) . This suggests that the API could have been updated with more negative training texts .
Authors show that ML models behind publicly available APIs change and these changes cause result changes for input datasets. Authors track the changes through confusion matrix differences. They propose an efficient algorithm they call MASA to evaluate the changes in results with reduced number of queries. Their algorithm achieves better estimates given the same budget than uniform sampling.
SP:be306853f891ecd112e8ec21ec332af48be9b3ec
Two Sides of the Same Coin: Heterophily and Oversmoothing in Graph Convolutional Neural Networks
1 INTRODUCTION . In recent years , GCNs ( Defferrard et al. , 2016 ; Kipf & Welling , 2016 ; Veličković et al. , 2017 ) have been widely used in applications ranging from social science ( Li & Goldwasser , 2019 ) and biology ( Yan et al. , 2019 ) to program understanding ( Allamanis et al. , 2018 ; Shi et al. , 2019 ) . A typical GCN architecture ( Gilmer et al. , 2017 ) for the node classification task can be decomposed into two main components : propagation/aggregation , and combination . Messages are first exchanged between neighboring nodes , then aggregated . Afterwards , the messages are combined with the self-representations ( a.k.a. , the current node representations ) to update the node representations . Though GCNs are effective , they have some key limitations . The first limitation is the “ oversmoothing '' problem ( Li et al. , 2018 ) : the performance of GCNs degrade when stacking many layers . Recent work has found that oversmoothing could be caused by GCNs exponentially losing expressive power in the node classification task ( Oono & Suzuki , 2019 ) and that the node representations converge to a stationary state which is decided by the degree of the nodes and the input features ( Chen et al. , 2020 ; Wang et al. , 2019 ; Rong et al. , 2019 ; Rossi et al. , 2020 ) . These works focus on the analysis of the steady state in the limit of infinite layers , but they do not explore the dynamics on how oversmoothing is triggered , or which nodes tend to cause it . Other works like ( Xu et al. , 2018 ; Wang et al. , 2019 ; Chen et al. , 2020 ) focus on heuristic-based model designs to alleviate the oversmoothing problem . To fill this gap , we seek to theoretically analyze the dynamics around oversmoothing . In our empirical analysis , by dividing the nodes in real graphs into several degree groups and tracking their average accuracy while increasing the layers of GCN ( Kipf & Welling , 2016 ) , we observe two phases ( Fig . 1 ) : the initial stage when higher-degree nodes have higher accuracy and the developing stage when the accuracy of higher-degree nodes decreases more sharply ( cf . § 5.4 for details ) . As we will show theoretically and empirically , the low-degree nodes are the ones that trigger oversmoothing . Though Chen et al . ( 2020 ) provide some explanations for the developing stage by analyzing the convergence rate , their theory fails to characterize the initial stage . In fact , we find that the analysis of initial stage provides valuable insights about oversmoothing . The second limitation of GCNs is their poor performance on heterophilous graphs ( Pei et al. , 2019 ; Lim et al. , 2021 ) , which—unlike homophilous graphs—have many neighboring nodes that belong to different classes ( Newman , 2002 ) . For instance , in protein networks , amino acids of different types tend to form links ( Zhu et al. , 2020 ) , and in transaction networks , fraudsters are more likely to connect to accomplices than to other fraudsters ( Pandit et al. , 2007 ) . Most GCNs ( Kipf & Welling , 2016 ; Veličković et al. , 2017 ) fail to effectively capture heterophily , so emerging works have proposed some effective designs ( Pei et al. , 2019 ; Zhu et al. , 2020 ) , including signed messages ( positive and negative interactions between nodes ) proposed by concur- rent works ( Chien et al. , 2021 ; Bo et al. , 2021 ) . Though these works justify signed messages from a spectral perspective , they focus on asymptotic results , requiring an infinite number of filters . Our work does not make this assumption , and our theory works in more practical scenarios ( § 3.4 ) . These two limitations have mostly been studied independently , but recent work on oversmoothing ( Chen et al. , 2020 ) was shown empirically to address heterophily , and vice versa ( Chien et al. , 2021 ) . Motivated by this empirical observation , we set out to understand the theoretical connection between the oversmoothing and heterophily problems by studying the change in node representations during message passing . Specifically , we make the following contributions : • Theory : We introduce the first theory that explains the connections between heterophily and oversmoothing which opens up the possibility of jointly studying the two problems . • Insights : We find that under conditions , the relative degree of a node ( compared to its neighbors ) and its heterophily level affect the misclassification rate of node labels in the oversmoothing and heterophily problems . We further prove that signed messages can mitigate their negative impact . • Improved model & empirical analysis : Based on these insights , we design a generalized GCN model , GGCN , that allows negative interactions between nodes and compensates for the effect of low-degree nodes through a learned rescaling scheme . Our empirical results show that our model is robust to oversmoothing , achieves state-of-the-art performance on datasets with high levels of heterophily , and achieves competitive performance on homophilous datasets . 2 PRELIMINARIES . We first provide the notations & definitions that we use in the paper , and a brief background on GCNs . Notation . We denote an unweighted and self-loop-free graph as G ( V , E ) and its adjacency matrix as A . We represent the degree of node vi ∈ V by di , and the degree matrix—which is a diagonal matrix whose elements are node degrees—by D. Let Ni be the set of nodes directly connected to vi , i.e. , its neighbors . I is the identity matrix . We denote the node representations at l-th layer as F ( l ) , and the i-th row of F is f ( l ) i , which is the representation of node vi . The input node features are given by F ( 0 ) . The weight matrix and bias vector at the l-th layer are denoted as W ( l ) and b ( l ) , respectively . Homophily and Heterophily . Given a set of node labels/classes , homophily captures the tendency of a node to have the same class as its neighbors . Specifically , the homophily of node vi is defined as hi ≡ E ( |N si | |Ni| ) , where N si is the set of neighboring nodes with the same label as vi , | · | is the cardinality operator , and the expectation is taken over the randomness of the node labels . High homophily corresponds to low heterophily , and vice versa , so we use these terms interchangeably . Supervised Node Classification Task . We focus on node classification : given a subset of labeled nodes ( from a label set L ) , the goal is to learn a mapping F : f ( 0 ) i 7→ yi between each node vi and its ground truth label yi ∈ L. We use ŷi to represent the predicted label of vi and define the misclassification rate of a fixed learnt model over a node set V as : E ( | { vi|ŷi 6=yi , vi∈V } | |V| ) . The expectation is taken over the randomness of graph structures and input node features . Graph Convolutional Neural Networks . In node classification tasks , an L-layer GCN contains two components ( Gilmer et al. , 2017 ) : ( 1 ) neighborhood propagation and aggrega- tion : f̂ ( l ) i = AGGREGATE ( f ( l ) j , vj ∈ Ni ) , and ( 2 ) combination : f ( l+1 ) i = COMBINE ( f̂ ( l ) i , f ( l ) i ) , where AGGREGATE and COMBINE are learnable functions . The loss is given by LCE=CrossEntropy ( Softmax ( f ( L ) i W ( L ) + b ( L ) ) , yi ) . The vanilla GCN suggests a renormalization trick on the adjacency A to prevent gradient explosion ( Kipf & Welling , 2016 ) . The ( l + 1 ) -th output is given by : F ( l+1 ) = σ ( ÃF ( l ) W ( l ) ) , where à = D̃−1/2 ( I + A ) D̃−1/2 , D̃ is the degree matrix of I + A , and σ is ReLU . When the non-linearities in the vanilla GCN are removed , it reduces to a linear model called SGC ( Wu et al. , 2019 ) , which has competitive performance and is widely used in theoretical analyses ( Oono & Suzuki , 2019 ; Chen et al. , 2020 ) . For SGC , the l-th layer representations are given by : F ( l ) = ÃlF ( 0 ) and the last layer is a logistic-regression layer : ŷi = Softmax ( F ( L ) W ( L ) + b ( L ) ) . We note that only one weight matrix W ( L ) is learned ; it is equivalent to the products of all weight matrices in a linear GCN . Find more related works in § 6 . 3 THEORETICAL ANALYSIS . In this section , we formalize the connection between the oversmoothing and heterophily problems in two steps : ( 1 ) We show how the movements of node representations relate to the misclassification rate of node labels ; and ( 2 ) we identify the factors that affect the movements of representations . We use the SGC model to analyze binary node classification with nodes in class 1 denoted as set V1 and nodes in class 2 denoted as set V2 . We show empirically ( § 5 ) that the insights obtained in this section are effective for other non-linear models in multi-class classification . 3.1 ASSUMPTIONS . Next , we use “ i.d. ” to represent random variables/vectors that follow the same marginal distribution and their joint probability density function ( PDF ) is a permutation-invariant function p ( x1 , . . . , xn ) = p ( P ( x1 , . . . , xn ) ) , where P ( · ) means permutation . ( 1 ) Random graph : Node degrees { di } are i.d . random variables . { ( · ) i } represents a set with i = 1 , . . . , |V| . ( 2 ) Inputs : ( 2.1 ) Node labels { yi } are i.d . Bernoulli random variables given by the ratio ρ : ρ ≡ P ( yi=1 ) P ( yi=2 ) , ∀i . ( 2.2 ) Initial input node features { f ( 0 ) i } are i.d . random vectors given by ( PDF ) f ( x ) , which is expressed as : f ( x ) = { f1 ( x ) , when yi = 1. f2 ( x ) , when yi = 2 . E ( f ( 0 ) i |yi ) = { µ , when yi = 1 . −ρµ , when yi = 2. so E ( f ( 0 ) i ) = 0 . ( 3 ) Independence : { di } are independent of { yi } and { f ( 0 ) i } . 3.2 MISCLASSIFICATION RATE & MOVEMENTS OF NODE REPRESENTATIONS . The following lemmas illustrate why the movements of node representations are a good indicator of SGC ’ s performance . We view the changes of node representations across the layers as their movements ; i.e. , f ( l+1 ) i is moved from f ( l ) i , ∀i . The misclassification rate of an L-layer SGC is determined by { f ( L ) i } , which is the input to the last regression layer , and can be studied through the decision boundary of f ( L ) i . Lemma 1 In SGC , the decision boundaries w.r.t . { f ( L ) i } in multi-class classification are linear hyperplanes . In particular , the decision boundary is a single hyperplane for binary classification . Proof . We provide the proof in App . A.1 . The decision boundary of an ( L + 1 ) -layer SGC can be viewed as a perturbation to the decision boundary of an L-layer SGC due to the movements from { f ( L ) i } to { f ( L+1 ) i } . Due to Lemma 1 , we can use the hyperplane xw + b = 0 to represent the decision boundary of { f ( L ) i } , where w is a unit vector , b is a scalar , and the { f ( L ) i } are classified to class 1 if f ( L ) i w + b > 0 . Suppose when w = w∗ and b = b∗ , we find an optimal hyperplane xw∗ + b∗ = 0 that achieves the lowest total misclassification rate ( § 2 ) for { f ( L ) i } . Due to the movements of node representations , the new optimal hyperplane is decided by : xw∗′ + b∗′ = 0 . In Lemma 2 , we show that , under constraints , moving towards the original decision boundary with a non-zero step results in a non-decreasing total misclassification rate under the new decision boundary . Lemma 2 Moving representations { f ( L ) i } from class 1 by adding −tw∗ T , t > 0 , s.t . w∗Tw∗′ > 0 , the new total misclassification rate is no less than the misclassification rate before the movements . Proof . We provide the proof in App . A.2 . Note that the special case where the representations of the two classes swap positions ( e.g , bipartite graphs ) violates the condition w∗Tw∗′ > 0 and leads to different conclusions . We refer to the condition w∗Tw∗′ > 0 as `` non-swapping condition '' and throughout the paper , we analyze SGC under that . Lemma 2 shows that , under the `` non-swapping condition '' , if { f ( l ) i } move towards the original decision boundary ( or the other class ) , SGC tends to perform worse .
Two issues confronting GCNs, heterophily and over-smoothing, share a common cause. This article asserts that the relative degree and homophily level account for node representation movement and further affect the likelihood of misclassification. The contributions of this paper are as follows: 1) it attempts to establish a connection between heterophily and over-smoothing by identifying common causes; 2) it establishes that the relative degree and homophily level have an effect on the misclassification rate; and 3) it also designs and presents a model that allows for negative interactions between nodes, which is shown to be robust to over-smoothing and capable of achieving state-of-the-art performance on heterophily datasets.
SP:9631ec37258a40acaa6666ca4b66158d6fd9c3dc
Two Sides of the Same Coin: Heterophily and Oversmoothing in Graph Convolutional Neural Networks
1 INTRODUCTION . In recent years , GCNs ( Defferrard et al. , 2016 ; Kipf & Welling , 2016 ; Veličković et al. , 2017 ) have been widely used in applications ranging from social science ( Li & Goldwasser , 2019 ) and biology ( Yan et al. , 2019 ) to program understanding ( Allamanis et al. , 2018 ; Shi et al. , 2019 ) . A typical GCN architecture ( Gilmer et al. , 2017 ) for the node classification task can be decomposed into two main components : propagation/aggregation , and combination . Messages are first exchanged between neighboring nodes , then aggregated . Afterwards , the messages are combined with the self-representations ( a.k.a. , the current node representations ) to update the node representations . Though GCNs are effective , they have some key limitations . The first limitation is the “ oversmoothing '' problem ( Li et al. , 2018 ) : the performance of GCNs degrade when stacking many layers . Recent work has found that oversmoothing could be caused by GCNs exponentially losing expressive power in the node classification task ( Oono & Suzuki , 2019 ) and that the node representations converge to a stationary state which is decided by the degree of the nodes and the input features ( Chen et al. , 2020 ; Wang et al. , 2019 ; Rong et al. , 2019 ; Rossi et al. , 2020 ) . These works focus on the analysis of the steady state in the limit of infinite layers , but they do not explore the dynamics on how oversmoothing is triggered , or which nodes tend to cause it . Other works like ( Xu et al. , 2018 ; Wang et al. , 2019 ; Chen et al. , 2020 ) focus on heuristic-based model designs to alleviate the oversmoothing problem . To fill this gap , we seek to theoretically analyze the dynamics around oversmoothing . In our empirical analysis , by dividing the nodes in real graphs into several degree groups and tracking their average accuracy while increasing the layers of GCN ( Kipf & Welling , 2016 ) , we observe two phases ( Fig . 1 ) : the initial stage when higher-degree nodes have higher accuracy and the developing stage when the accuracy of higher-degree nodes decreases more sharply ( cf . § 5.4 for details ) . As we will show theoretically and empirically , the low-degree nodes are the ones that trigger oversmoothing . Though Chen et al . ( 2020 ) provide some explanations for the developing stage by analyzing the convergence rate , their theory fails to characterize the initial stage . In fact , we find that the analysis of initial stage provides valuable insights about oversmoothing . The second limitation of GCNs is their poor performance on heterophilous graphs ( Pei et al. , 2019 ; Lim et al. , 2021 ) , which—unlike homophilous graphs—have many neighboring nodes that belong to different classes ( Newman , 2002 ) . For instance , in protein networks , amino acids of different types tend to form links ( Zhu et al. , 2020 ) , and in transaction networks , fraudsters are more likely to connect to accomplices than to other fraudsters ( Pandit et al. , 2007 ) . Most GCNs ( Kipf & Welling , 2016 ; Veličković et al. , 2017 ) fail to effectively capture heterophily , so emerging works have proposed some effective designs ( Pei et al. , 2019 ; Zhu et al. , 2020 ) , including signed messages ( positive and negative interactions between nodes ) proposed by concur- rent works ( Chien et al. , 2021 ; Bo et al. , 2021 ) . Though these works justify signed messages from a spectral perspective , they focus on asymptotic results , requiring an infinite number of filters . Our work does not make this assumption , and our theory works in more practical scenarios ( § 3.4 ) . These two limitations have mostly been studied independently , but recent work on oversmoothing ( Chen et al. , 2020 ) was shown empirically to address heterophily , and vice versa ( Chien et al. , 2021 ) . Motivated by this empirical observation , we set out to understand the theoretical connection between the oversmoothing and heterophily problems by studying the change in node representations during message passing . Specifically , we make the following contributions : • Theory : We introduce the first theory that explains the connections between heterophily and oversmoothing which opens up the possibility of jointly studying the two problems . • Insights : We find that under conditions , the relative degree of a node ( compared to its neighbors ) and its heterophily level affect the misclassification rate of node labels in the oversmoothing and heterophily problems . We further prove that signed messages can mitigate their negative impact . • Improved model & empirical analysis : Based on these insights , we design a generalized GCN model , GGCN , that allows negative interactions between nodes and compensates for the effect of low-degree nodes through a learned rescaling scheme . Our empirical results show that our model is robust to oversmoothing , achieves state-of-the-art performance on datasets with high levels of heterophily , and achieves competitive performance on homophilous datasets . 2 PRELIMINARIES . We first provide the notations & definitions that we use in the paper , and a brief background on GCNs . Notation . We denote an unweighted and self-loop-free graph as G ( V , E ) and its adjacency matrix as A . We represent the degree of node vi ∈ V by di , and the degree matrix—which is a diagonal matrix whose elements are node degrees—by D. Let Ni be the set of nodes directly connected to vi , i.e. , its neighbors . I is the identity matrix . We denote the node representations at l-th layer as F ( l ) , and the i-th row of F is f ( l ) i , which is the representation of node vi . The input node features are given by F ( 0 ) . The weight matrix and bias vector at the l-th layer are denoted as W ( l ) and b ( l ) , respectively . Homophily and Heterophily . Given a set of node labels/classes , homophily captures the tendency of a node to have the same class as its neighbors . Specifically , the homophily of node vi is defined as hi ≡ E ( |N si | |Ni| ) , where N si is the set of neighboring nodes with the same label as vi , | · | is the cardinality operator , and the expectation is taken over the randomness of the node labels . High homophily corresponds to low heterophily , and vice versa , so we use these terms interchangeably . Supervised Node Classification Task . We focus on node classification : given a subset of labeled nodes ( from a label set L ) , the goal is to learn a mapping F : f ( 0 ) i 7→ yi between each node vi and its ground truth label yi ∈ L. We use ŷi to represent the predicted label of vi and define the misclassification rate of a fixed learnt model over a node set V as : E ( | { vi|ŷi 6=yi , vi∈V } | |V| ) . The expectation is taken over the randomness of graph structures and input node features . Graph Convolutional Neural Networks . In node classification tasks , an L-layer GCN contains two components ( Gilmer et al. , 2017 ) : ( 1 ) neighborhood propagation and aggrega- tion : f̂ ( l ) i = AGGREGATE ( f ( l ) j , vj ∈ Ni ) , and ( 2 ) combination : f ( l+1 ) i = COMBINE ( f̂ ( l ) i , f ( l ) i ) , where AGGREGATE and COMBINE are learnable functions . The loss is given by LCE=CrossEntropy ( Softmax ( f ( L ) i W ( L ) + b ( L ) ) , yi ) . The vanilla GCN suggests a renormalization trick on the adjacency A to prevent gradient explosion ( Kipf & Welling , 2016 ) . The ( l + 1 ) -th output is given by : F ( l+1 ) = σ ( ÃF ( l ) W ( l ) ) , where à = D̃−1/2 ( I + A ) D̃−1/2 , D̃ is the degree matrix of I + A , and σ is ReLU . When the non-linearities in the vanilla GCN are removed , it reduces to a linear model called SGC ( Wu et al. , 2019 ) , which has competitive performance and is widely used in theoretical analyses ( Oono & Suzuki , 2019 ; Chen et al. , 2020 ) . For SGC , the l-th layer representations are given by : F ( l ) = ÃlF ( 0 ) and the last layer is a logistic-regression layer : ŷi = Softmax ( F ( L ) W ( L ) + b ( L ) ) . We note that only one weight matrix W ( L ) is learned ; it is equivalent to the products of all weight matrices in a linear GCN . Find more related works in § 6 . 3 THEORETICAL ANALYSIS . In this section , we formalize the connection between the oversmoothing and heterophily problems in two steps : ( 1 ) We show how the movements of node representations relate to the misclassification rate of node labels ; and ( 2 ) we identify the factors that affect the movements of representations . We use the SGC model to analyze binary node classification with nodes in class 1 denoted as set V1 and nodes in class 2 denoted as set V2 . We show empirically ( § 5 ) that the insights obtained in this section are effective for other non-linear models in multi-class classification . 3.1 ASSUMPTIONS . Next , we use “ i.d. ” to represent random variables/vectors that follow the same marginal distribution and their joint probability density function ( PDF ) is a permutation-invariant function p ( x1 , . . . , xn ) = p ( P ( x1 , . . . , xn ) ) , where P ( · ) means permutation . ( 1 ) Random graph : Node degrees { di } are i.d . random variables . { ( · ) i } represents a set with i = 1 , . . . , |V| . ( 2 ) Inputs : ( 2.1 ) Node labels { yi } are i.d . Bernoulli random variables given by the ratio ρ : ρ ≡ P ( yi=1 ) P ( yi=2 ) , ∀i . ( 2.2 ) Initial input node features { f ( 0 ) i } are i.d . random vectors given by ( PDF ) f ( x ) , which is expressed as : f ( x ) = { f1 ( x ) , when yi = 1. f2 ( x ) , when yi = 2 . E ( f ( 0 ) i |yi ) = { µ , when yi = 1 . −ρµ , when yi = 2. so E ( f ( 0 ) i ) = 0 . ( 3 ) Independence : { di } are independent of { yi } and { f ( 0 ) i } . 3.2 MISCLASSIFICATION RATE & MOVEMENTS OF NODE REPRESENTATIONS . The following lemmas illustrate why the movements of node representations are a good indicator of SGC ’ s performance . We view the changes of node representations across the layers as their movements ; i.e. , f ( l+1 ) i is moved from f ( l ) i , ∀i . The misclassification rate of an L-layer SGC is determined by { f ( L ) i } , which is the input to the last regression layer , and can be studied through the decision boundary of f ( L ) i . Lemma 1 In SGC , the decision boundaries w.r.t . { f ( L ) i } in multi-class classification are linear hyperplanes . In particular , the decision boundary is a single hyperplane for binary classification . Proof . We provide the proof in App . A.1 . The decision boundary of an ( L + 1 ) -layer SGC can be viewed as a perturbation to the decision boundary of an L-layer SGC due to the movements from { f ( L ) i } to { f ( L+1 ) i } . Due to Lemma 1 , we can use the hyperplane xw + b = 0 to represent the decision boundary of { f ( L ) i } , where w is a unit vector , b is a scalar , and the { f ( L ) i } are classified to class 1 if f ( L ) i w + b > 0 . Suppose when w = w∗ and b = b∗ , we find an optimal hyperplane xw∗ + b∗ = 0 that achieves the lowest total misclassification rate ( § 2 ) for { f ( L ) i } . Due to the movements of node representations , the new optimal hyperplane is decided by : xw∗′ + b∗′ = 0 . In Lemma 2 , we show that , under constraints , moving towards the original decision boundary with a non-zero step results in a non-decreasing total misclassification rate under the new decision boundary . Lemma 2 Moving representations { f ( L ) i } from class 1 by adding −tw∗ T , t > 0 , s.t . w∗Tw∗′ > 0 , the new total misclassification rate is no less than the misclassification rate before the movements . Proof . We provide the proof in App . A.2 . Note that the special case where the representations of the two classes swap positions ( e.g , bipartite graphs ) violates the condition w∗Tw∗′ > 0 and leads to different conclusions . We refer to the condition w∗Tw∗′ > 0 as `` non-swapping condition '' and throughout the paper , we analyze SGC under that . Lemma 2 shows that , under the `` non-swapping condition '' , if { f ( l ) i } move towards the original decision boundary ( or the other class ) , SGC tends to perform worse .
The paper studies two problems plaguing graph neural networks (GCNs/GNNs): 1) oversmoothing of GCNs/GNNs; and 2) GCNs/GNNs often do not yield good performance on heterophilous networks. The authors aim to develop a theory to explain these issues simultaneously, where a few lemmas and theorems were developed based on certain simplifying assumptions. Based on these theoretical results, the authors develop a generalized GCN (GGCN) with negative message passing. Evaluation is conducted and compared with the state-of-the-art.
SP:9631ec37258a40acaa6666ca4b66158d6fd9c3dc
Federated Learning via Plurality Vote
1 INTRODUCTION . Federated learning enables multiple workers to solve a machine learning problem under the coordination of a central server ( Kairouz et al. , 2021 ) . Throughout the training stage , client data will be kept locally and only model weights or model updates will be shared with the server . Federated averaging ( FedAvg ) ( McMahan et al. , 2017 ) was proposed as a generic federated learning solution . Although FedAvg takes advantage of distributed client data while maintaining their privacy , it leaves the following two challenges unsolved . First , transmitting high-dimensional messages between a client and the server for multiple rounds can incur significant communication overhead . Quantization has been incorporated into federated learning in recent studies ( Reisizadeh et al. , 2020 ; Haddadpour et al. , 2021 ) . However , directly quantizing the gradient vector may not provide the optimal trade-off between communication efficiency and model accuracy 1 . Second , the aggregation rule in FedAvg is vulnerable to Byzantine attacks ( Blanchard et al. , 2017 ) . Prior works tackled this issue by using robust statistics such as coordinate-wise median and geometric median in the aggregation step ( Blanchard et al. , 2017 ; Yin et al. , 2018 ) . Another strategy is to detect and reject updates from malicious attackers ( Muñoz-González et al. , 2019 ; Sattler et al. , 2020 ) . The robustness of the algorithm is enhanced at the cost of additional computation and increased complexity of algorithms . In this paper , we propose a new method called federated learning via plurality vote ( FedVote ) . We train a neural network at each worker with a range normalization function applied to model parameters . After local updating , binary/ternary weight vectors are obtained via stochastic rounding and sent to the server . The global model is updated by a voting procedure , and the voting results are sent back to each worker for further optimization in the next round . The contributions of the paper are summarized as follows . 1 . We present FedVote as a novel federated learning solution to jointly optimize the communication overhead , learning reliability , and deployment efficiency . 2 . We theoretically and experimentally verify the effectiveness of our FedVote design . In bandwidth-limited scenarios , FedVote is particularly advantageous in simultaneously achieving a high compression ratio and good test accuracy . Given a fixed communication cost , FedVote improves model accuracy on the CIFAR-10 dataset by 5–10 % , 15–20 % , 1Predictive coding in video and image compression ( Li et al. , 2015 ; Gonzalez & Woods , 2014 ) is an example that directly quantizing the raw signal we intend to transmit does not provide the best trade-off between the coding efficiency and the utility/bitrate . and 25–30 % compared with FedPAQ ( Reisizadeh et al. , 2020 ) , signSGD ( Bernstein et al. , 2018 ) , and FedAvg , respectively . 3 . We extend FedVote to incorporate reputation-based voting . The proposed method , Byzantine-FedVote , exhibits much better resilience to Byzantine attacks in the presence of close to half attackers without incurring excessive computation compared with existing algorithms . 2 RELATED WORK . Communication-Efficient Federated Learning . In the prior study of federated learning , various strategies have been proposed to reduce communication cost . One research direction is to reduce the size of messages in each round . For example , Bernstein et al . ( 2018 ) showed that sign-based gradient descent schemes can converge well in the homogeneous data distribution scenario , while Chen et al . ( 2020 ) ; Jin et al . ( 2020 ) ; Safaryan & Richtarik ( 2021 ) extended it to the heterogeneous data distribution setting . In parallel , FedAvg adopts a periodic averaging scheme and targets at reducing the number of communication rounds ( McMahan et al. , 2017 ) . Hybrid methods consider simultaneous local updates and accumulative gradient compression ( Reisizadeh et al. , 2020 ; Haddadpour et al. , 2021 ) . In this work , we improve communication efficiency by employing binary/ternary weights in the neural network . Quantized Neural Networks . Quantized neural networks aim to approximate the full-precision networks using quantized weights while keeping their generalizability . As a special case , binary neural networks ( BNNs ) are gaining popularity in recent years . By restricting model weight values to { −1 , +1 } , BNNs can reduce computational cost , memory requirement , and energy consumption . Hubara et al . ( 2016 ) introduced real-valued latent weights and used the sign operator for binarization . In contrast , Shayer et al . ( 2018 ) let the neural network learn the distribution of the binary or ternary weights . Gong et al . ( 2019 ) added a soft quantization function to the real-valued weights , thus avoiding the gradient mismatch between the forward and the backward passes . A more thorough survey on BNN optimization can be found in Qin et al . ( 2020a ) . Distributed Optimization of Quantized Neural Networks . A few recent works have explored BNN optimization in a distributed setting , which is more relevant to our work . Lin et al . ( 2020 ) conducted the case study of 1-bit quantized local models aggregated via ensemble distillation . The aggregation becomes complicated due to the separate optimization stage of knowledge distillation , especially when the distillation algorithm does not converge well in practice . In addition , their BNN optimization is not tailored to the federated learning setting . Hou et al . ( 2019 ) theoretically analyzed the convergence of distributed quantized neural networks , which was later implemented in the application of intrusion detection ( Qin et al. , 2020b ) . In comparison , FedVote is presented as a new algorithm by leveraging client local updates to accelerate the training . Different from Hou et al . ( 2019 ) , we do not assume a convex and twice differentiable objective function and bounded gradients . Therefore , the analyses in Hou et al . ( 2019 ) can not be directly applied to our study . Byzantine Resilience in Federated Learning . An attack is Byzantine if arbitrary outputs are produced due to the adversary ( Kairouz et al. , 2021 ) . Blanchard et al . ( 2017 ) showed that FedAvg can not tolerate a single Byzantine attacker . They proposed an aggregation-rule-based remedy using the similarity of local updates . Similarly , Yin et al . ( 2018 ) took the advantage of coordinatewise median and trimmed-mean to robustify the aggregation . Muñoz-González et al . ( 2019 ) and Sattler et al . ( 2020 ) detected the adversaries and filtered out their model updates . In this paper , we propose a reputation-based voting strategy for FedVote that is shown to have good convergence performance in the Byzantine setting . 3 PRELIMINARIES . Symbol conventions are as follows . Bold lower cases of letters such as vm denote column vectors , and vm , i is used to denote its ith entry . For a scalar function , it applies elementwise operation when a vector input is given . 1 = [ 1 , . . . , 1 ] > denotes a vector with all entries equal to 1 . 3.1 FEDERATED LEARNING . The goal of federated learning is to build a machine learning model based on the training data distributed among multiple workers . To facilitate the learning procedure , a server will coordinate the training without seeing the raw data ( Kairouz et al. , 2021 ) . In a supervised learning scenario , let Dm = { ( xm , j , ym , j ) } nmj=1 denote the training dataset on the mth worker , with the input xm , j ∈ Rd1 and the label ym , j ∈ Rd2 in each training pair . The local objective function fm with a model weight vector θ ∈ Rd is given by fm ( θ ) , fm ( θ ; Dm ) = 1 nm nm∑ j=1 ` ( θ ; ( xm , j , ym , j ) ) , ( 1 ) where ` is a loss function quantifying the error of model θ predicting the label ym , j for an input xm , j . A global objective function may be formulated as min θ∈Rd f ( θ ) = 1 M M∑ m=1 fm ( θ ) . ( 2 ) 3.2 QUANTIZED NEURAL NETWORKS . Consider a neural network g with the weight vector θ ∈ Rd . A forward pass for an input x ∈ Rd1 and a prediction ŷ ∈ Rd2 can be written as ŷ = g ( θ , x ) . In quantized neural networks , the realvalued θ is replaced by w ∈ Ddn , where Dn is a discrete set with a number n of quantization levels . For example , we may have D2 = { −1 , 1 } for a binary neural network . For a given training set { ( xj , yj ) } Nj=1 and the loss function ` , the goal is to find an optimal w∗ such that the averaged loss is minimized over a search space of quantized weight vectors : w ? = argmin w∈Ddn 1 N N∑ j=1 ` ( w ; ( xj , yj ) ) . ( 3 ) Prior studies tried to solve ( 3 ) by optimizing a real-valued latent weight vector h ∈ Rd ( Hubara et al. , 2016 ; Shayer et al. , 2018 ; Gong et al. , 2019 ) . The interpretations of the latent weight vary when viewed from different perspectives . Hubara et al . ( 2016 ) used the sign operation to quantize the latent weight into two levels during the forward pass . The binary weights can be viewed as an approximation of their latent real-valued counterparts . Shayer et al . ( 2018 ) trained a stochastic binary neural network , and the normalized latent parameters are interpreted as the Bernoulli distribution parameter ϑi : ϑi , P̂ ( wi = 1 ) = S ( hi ) , wi ∈ { 0 , 1 } , ( 4 ) where S : R→ ( 0 , 1 ) is the sigmoid function . In the forward pass , instead of using the binary vector w , its expected value , w̃sto-bnn , E [ w ] = −1× [ 1−S ( h ) ] + 1×S ( h ) = 2S ( h ) − 1 , ( 5 ) will participate in the actual convolution or matrix multiplication operations . In other words , the neural network function becomes ŷ = g ( w̃sto-bnn , x ) . Likewise , Gong et al . ( 2019 ) normalized the latent weight but interpreted it from a different viewpoint . They approximated the staircase quantization function with a differentiable soft quantization ( DSQ ) function , i.e. , w̃dsq , tanh ( ah ) , ( 6 ) where tanh : R → ( −1 , 1 ) is the hyperbolic tangent function , and a controls the shape of the function . The neural network function thus becomes ŷ = g ( w̃dsq , x ) . We now summarize the latent-weight-based BNN training methods and depict an example of a single-layer network in Figure 1 . First , a real-valued vector h ∈ Rd is introduced and its range is restricted using a differentiable and invertible normalization function ϕ : R→ ( −1 , 1 ) . The forward pass is then calculated with the normalized weight vector w̃ . The procedure is described as : ŷ = g ( w̃ , x ) , w̃ , ϕ ( h ) . ( 7 ) Second , in the back propagation , the latent weight vector h is updated with its gradient , i.e. , h ( t+1 ) = h ( t ) − η∇h ` . Finally , the normalized weight vector w̃ are mapped to the discrete space to approximate w∗ via thresholding or stochastic rounding .
The paper presents a scheme for federated learning (FL) called FedVote. In FedVote, clients use binary neural networks where a latent restricted range weight vector $\boldsymbol{h}$ is learned, and stochastic rounding is applied to obtain quantized weights $\in$ {$-1,+1$}. The communication cost to the server (up-link) is reduced by using quantized weights. The server aggregates weights by summing over all the weights of the clients at each round of training and applying a sign function. This mechanism is referred to as plurality voting (ties are broken randomly). However, the paper also proposes to use soft voting, which normalizes the number of ones (cf. hard sign function) to get probability values. These probabilities are then quantized with a clipping mechanism to restricted maximum and minimum values, using predefined thresholds, and broadcasted to the clients (down-link). The latent weights of the client models are updated using the soft voting results. The paper also adapts work on reputation-based voting (Bendahmane et al. 2014) to deal with adversarial FL in the form of Byzantine attacks. The paper presents convergence analysis for FedVote under the independent and identically distributed data setting. Empirical evaluations is conducted on two datasets ,Fashion-MNIST and CIFAR-10, and applied to two models, LeNet-5 and VGG-7, respectively.
SP:6a92c5ac2c70f85a65c73a703d863dc1564ab549
Federated Learning via Plurality Vote
1 INTRODUCTION . Federated learning enables multiple workers to solve a machine learning problem under the coordination of a central server ( Kairouz et al. , 2021 ) . Throughout the training stage , client data will be kept locally and only model weights or model updates will be shared with the server . Federated averaging ( FedAvg ) ( McMahan et al. , 2017 ) was proposed as a generic federated learning solution . Although FedAvg takes advantage of distributed client data while maintaining their privacy , it leaves the following two challenges unsolved . First , transmitting high-dimensional messages between a client and the server for multiple rounds can incur significant communication overhead . Quantization has been incorporated into federated learning in recent studies ( Reisizadeh et al. , 2020 ; Haddadpour et al. , 2021 ) . However , directly quantizing the gradient vector may not provide the optimal trade-off between communication efficiency and model accuracy 1 . Second , the aggregation rule in FedAvg is vulnerable to Byzantine attacks ( Blanchard et al. , 2017 ) . Prior works tackled this issue by using robust statistics such as coordinate-wise median and geometric median in the aggregation step ( Blanchard et al. , 2017 ; Yin et al. , 2018 ) . Another strategy is to detect and reject updates from malicious attackers ( Muñoz-González et al. , 2019 ; Sattler et al. , 2020 ) . The robustness of the algorithm is enhanced at the cost of additional computation and increased complexity of algorithms . In this paper , we propose a new method called federated learning via plurality vote ( FedVote ) . We train a neural network at each worker with a range normalization function applied to model parameters . After local updating , binary/ternary weight vectors are obtained via stochastic rounding and sent to the server . The global model is updated by a voting procedure , and the voting results are sent back to each worker for further optimization in the next round . The contributions of the paper are summarized as follows . 1 . We present FedVote as a novel federated learning solution to jointly optimize the communication overhead , learning reliability , and deployment efficiency . 2 . We theoretically and experimentally verify the effectiveness of our FedVote design . In bandwidth-limited scenarios , FedVote is particularly advantageous in simultaneously achieving a high compression ratio and good test accuracy . Given a fixed communication cost , FedVote improves model accuracy on the CIFAR-10 dataset by 5–10 % , 15–20 % , 1Predictive coding in video and image compression ( Li et al. , 2015 ; Gonzalez & Woods , 2014 ) is an example that directly quantizing the raw signal we intend to transmit does not provide the best trade-off between the coding efficiency and the utility/bitrate . and 25–30 % compared with FedPAQ ( Reisizadeh et al. , 2020 ) , signSGD ( Bernstein et al. , 2018 ) , and FedAvg , respectively . 3 . We extend FedVote to incorporate reputation-based voting . The proposed method , Byzantine-FedVote , exhibits much better resilience to Byzantine attacks in the presence of close to half attackers without incurring excessive computation compared with existing algorithms . 2 RELATED WORK . Communication-Efficient Federated Learning . In the prior study of federated learning , various strategies have been proposed to reduce communication cost . One research direction is to reduce the size of messages in each round . For example , Bernstein et al . ( 2018 ) showed that sign-based gradient descent schemes can converge well in the homogeneous data distribution scenario , while Chen et al . ( 2020 ) ; Jin et al . ( 2020 ) ; Safaryan & Richtarik ( 2021 ) extended it to the heterogeneous data distribution setting . In parallel , FedAvg adopts a periodic averaging scheme and targets at reducing the number of communication rounds ( McMahan et al. , 2017 ) . Hybrid methods consider simultaneous local updates and accumulative gradient compression ( Reisizadeh et al. , 2020 ; Haddadpour et al. , 2021 ) . In this work , we improve communication efficiency by employing binary/ternary weights in the neural network . Quantized Neural Networks . Quantized neural networks aim to approximate the full-precision networks using quantized weights while keeping their generalizability . As a special case , binary neural networks ( BNNs ) are gaining popularity in recent years . By restricting model weight values to { −1 , +1 } , BNNs can reduce computational cost , memory requirement , and energy consumption . Hubara et al . ( 2016 ) introduced real-valued latent weights and used the sign operator for binarization . In contrast , Shayer et al . ( 2018 ) let the neural network learn the distribution of the binary or ternary weights . Gong et al . ( 2019 ) added a soft quantization function to the real-valued weights , thus avoiding the gradient mismatch between the forward and the backward passes . A more thorough survey on BNN optimization can be found in Qin et al . ( 2020a ) . Distributed Optimization of Quantized Neural Networks . A few recent works have explored BNN optimization in a distributed setting , which is more relevant to our work . Lin et al . ( 2020 ) conducted the case study of 1-bit quantized local models aggregated via ensemble distillation . The aggregation becomes complicated due to the separate optimization stage of knowledge distillation , especially when the distillation algorithm does not converge well in practice . In addition , their BNN optimization is not tailored to the federated learning setting . Hou et al . ( 2019 ) theoretically analyzed the convergence of distributed quantized neural networks , which was later implemented in the application of intrusion detection ( Qin et al. , 2020b ) . In comparison , FedVote is presented as a new algorithm by leveraging client local updates to accelerate the training . Different from Hou et al . ( 2019 ) , we do not assume a convex and twice differentiable objective function and bounded gradients . Therefore , the analyses in Hou et al . ( 2019 ) can not be directly applied to our study . Byzantine Resilience in Federated Learning . An attack is Byzantine if arbitrary outputs are produced due to the adversary ( Kairouz et al. , 2021 ) . Blanchard et al . ( 2017 ) showed that FedAvg can not tolerate a single Byzantine attacker . They proposed an aggregation-rule-based remedy using the similarity of local updates . Similarly , Yin et al . ( 2018 ) took the advantage of coordinatewise median and trimmed-mean to robustify the aggregation . Muñoz-González et al . ( 2019 ) and Sattler et al . ( 2020 ) detected the adversaries and filtered out their model updates . In this paper , we propose a reputation-based voting strategy for FedVote that is shown to have good convergence performance in the Byzantine setting . 3 PRELIMINARIES . Symbol conventions are as follows . Bold lower cases of letters such as vm denote column vectors , and vm , i is used to denote its ith entry . For a scalar function , it applies elementwise operation when a vector input is given . 1 = [ 1 , . . . , 1 ] > denotes a vector with all entries equal to 1 . 3.1 FEDERATED LEARNING . The goal of federated learning is to build a machine learning model based on the training data distributed among multiple workers . To facilitate the learning procedure , a server will coordinate the training without seeing the raw data ( Kairouz et al. , 2021 ) . In a supervised learning scenario , let Dm = { ( xm , j , ym , j ) } nmj=1 denote the training dataset on the mth worker , with the input xm , j ∈ Rd1 and the label ym , j ∈ Rd2 in each training pair . The local objective function fm with a model weight vector θ ∈ Rd is given by fm ( θ ) , fm ( θ ; Dm ) = 1 nm nm∑ j=1 ` ( θ ; ( xm , j , ym , j ) ) , ( 1 ) where ` is a loss function quantifying the error of model θ predicting the label ym , j for an input xm , j . A global objective function may be formulated as min θ∈Rd f ( θ ) = 1 M M∑ m=1 fm ( θ ) . ( 2 ) 3.2 QUANTIZED NEURAL NETWORKS . Consider a neural network g with the weight vector θ ∈ Rd . A forward pass for an input x ∈ Rd1 and a prediction ŷ ∈ Rd2 can be written as ŷ = g ( θ , x ) . In quantized neural networks , the realvalued θ is replaced by w ∈ Ddn , where Dn is a discrete set with a number n of quantization levels . For example , we may have D2 = { −1 , 1 } for a binary neural network . For a given training set { ( xj , yj ) } Nj=1 and the loss function ` , the goal is to find an optimal w∗ such that the averaged loss is minimized over a search space of quantized weight vectors : w ? = argmin w∈Ddn 1 N N∑ j=1 ` ( w ; ( xj , yj ) ) . ( 3 ) Prior studies tried to solve ( 3 ) by optimizing a real-valued latent weight vector h ∈ Rd ( Hubara et al. , 2016 ; Shayer et al. , 2018 ; Gong et al. , 2019 ) . The interpretations of the latent weight vary when viewed from different perspectives . Hubara et al . ( 2016 ) used the sign operation to quantize the latent weight into two levels during the forward pass . The binary weights can be viewed as an approximation of their latent real-valued counterparts . Shayer et al . ( 2018 ) trained a stochastic binary neural network , and the normalized latent parameters are interpreted as the Bernoulli distribution parameter ϑi : ϑi , P̂ ( wi = 1 ) = S ( hi ) , wi ∈ { 0 , 1 } , ( 4 ) where S : R→ ( 0 , 1 ) is the sigmoid function . In the forward pass , instead of using the binary vector w , its expected value , w̃sto-bnn , E [ w ] = −1× [ 1−S ( h ) ] + 1×S ( h ) = 2S ( h ) − 1 , ( 5 ) will participate in the actual convolution or matrix multiplication operations . In other words , the neural network function becomes ŷ = g ( w̃sto-bnn , x ) . Likewise , Gong et al . ( 2019 ) normalized the latent weight but interpreted it from a different viewpoint . They approximated the staircase quantization function with a differentiable soft quantization ( DSQ ) function , i.e. , w̃dsq , tanh ( ah ) , ( 6 ) where tanh : R → ( −1 , 1 ) is the hyperbolic tangent function , and a controls the shape of the function . The neural network function thus becomes ŷ = g ( w̃dsq , x ) . We now summarize the latent-weight-based BNN training methods and depict an example of a single-layer network in Figure 1 . First , a real-valued vector h ∈ Rd is introduced and its range is restricted using a differentiable and invertible normalization function ϕ : R→ ( −1 , 1 ) . The forward pass is then calculated with the normalized weight vector w̃ . The procedure is described as : ŷ = g ( w̃ , x ) , w̃ , ϕ ( h ) . ( 7 ) Second , in the back propagation , the latent weight vector h is updated with its gradient , i.e. , h ( t+1 ) = h ( t ) − η∇h ` . Finally , the normalized weight vector w̃ are mapped to the discrete space to approximate w∗ via thresholding or stochastic rounding .
This paper aims to reduce the communication cost for federated learning while ensuring that the aggregation method at the server is tolerant to the presence of Byzantine clients. Towards this instead of communicating the local update/gradients or their quantized version, this paper proposes to communicate the quantized model weights to the server. The server performs the aggregation in the quantized space and communicates the aggregate value back to the clients. To enable faithful quantization of the weights during the communication with the server, each client learns normalized weights (by applying a coordinate-wise normalization function to the latent weights). The paper also proposes a weighted aggregation mechanism at the server that takes the reputations of different clients into account. The paper analyzes the impact of the weight quantization on the convergence of the underlying federated learning algorithm in an i.i.d. setting. Empirical evaluations on Fashion-MNIST and CIFAR-10 show that the proposed method outperforms existing local update/gradient compression-based schemes.
SP:6a92c5ac2c70f85a65c73a703d863dc1564ab549
Provable Federated Adversarial Learning via Min-max Optimization
1 INTRODUCTION . Federated learning ( FL ) is playing an important role nowadays , as it allows different parties or clients to collaboratively train deep learning models without sharing private data . One popular FL paradigm called FedAvg ( McMahan et al. , 2017 ) introduces an easy-to-implement distributed learning method without data sharing . Specifically , it requires a central server to aggregate model updates computed by the local participants ( also known as nodes or clients ) using local imparticipable private data . Then the central server aggregates these updates to train a globally learned model . Nowadays deep learning model are exposed to severe threats of adversarial samples . Namely , small adversarial perturbations on the inputs will dramatically change the outputs or output wrong answers ( Szegedy et al. , 2013 ) . In this regard , much effort has been made to improve neural networks ’ resistance to such perturbations using adversarial learning ( Tramèr et al. , 2017 ; Samangouei et al. , 2018 ; Madry et al. , 2018 ) . Among these studies , the adversarial training scheme in Madry et al . ( 2018 ) has achieved the good robustness in practice . Madry et al . ( 2018 ) proposes an adversarial training scheme that uses projected gradient descent ( PGD ) to generate alternative adversarial samples as the augmented training set . Generating adversarial examples during neural network training is considered as one of the most effective approaches for adversarial training up to now according to the literature ( Carlini & Wagner , 2017 ; Athalye et al. , 2018 ; Croce & Hein , 2020 ) . Although adversarial learning has attracted much attention in the centralized domain , its practice in FL is under-explored ( Zizzo et al. , 2020 ) . Like training classical deep neural networks that use gradient-based methods , FL paradigms are vulnerable to adversarial samples . Adversarial learning in FL brings multiple open challenges due to FL properties on low convergence rate , application in non-IID environments , and secure aggregation solutions . Hence applying adversarial learning in an FL paradigm may lead to unstable training loss and a lack of robustness . However , a recent practical work Zizzo et al . ( 2020 ) observed that although there exist difficulties of convergence , the federation of adversarial training with suitable hyperparameter settings can achieve adversarial robustness and acceptable performance . Motivated by the empirical results , we want to address the provable property of combining adversarial learning into FL from the theoretical perspective . This work aims to theoretically study the unexplored convergence challenges that lie in the interaction between adversarial training and FL . To achieve a general understanding , we consider a general form of federated adversarial learning ( FAL ) , which deploys adversarial training scheme on local clients in the most common FL paradigm , FedAvg ( McMahan et al. , 2017 ) system . Specifically , FAL has an inner loop of local updating that generates adversarial samples ( i.e. , using Madry et al . ( 2018 ) ) for adversarial training and an outer loop to update local model weights on the client side . Then global model is aggregated using FedAvg ( McMahan et al. , 2017 ) . The algorithm is detailed in Algorithm 1 . We are interested in theoretically understanding the proposed FAL scheme from the aspects of model robustness and convergence : Can federated adversarial learning fit training data robustly and converge with a feasibly sized neural network ? The theoretical convergence analysis of adversarial training itself is challenging in the centralized training setting . Tu et al . ( 2018 ) recently proposed a general theoretical method to analyze the risk bound with adversaries but did not address the convergence problem . The investigation of convergence on over-parameterized neural network has achieved tremendous progress ( Du et al. , 2019a ; Allen-Zhu et al. , 2019b ; c ; Du et al. , 2019b ; Arora et al. , 2019b ) . The basic statement is that training can converge to sufficiently small training loss in polynomial iterations using gradient descent or stochastic gradient descent when the width of the network is polynomial in the number of training examples when initialized randomly . Recent theoretical analysis ( Gao et al. , 2019 ; Zhang et al. , 2020b ) extends these standard training convergence results to adversarial training settings . To answer the above interesting but challenging question , we formulate FAL as an min-max optimization problem . We extend the convergence analysis on the general formulation of over-parameterized neural networks in the FL setting that allows each client to perform min-max training and generate adversarial examples ( see Algorithm 1 ) . Involved challenges are arising in FL convergence analysis due to its unique optimization method : 1 ) unlike classical centralized setting , the global model of FL does not update in the gradient direction ; 2 ) inter-client heterogeneity issue needs to be considered . Despite the challenges , we give an affirmative answer to the above question . To the best of our knowledge , this work is the first theoretical study that examines these unexplored challenges on the convergence of adversarial training with FL . The contributions of this paper are : • We propose a framework to analyze a general form of FAL in over-parameterized neural networks . We follow a natural and valid assumption of data separability that the training dataset are well separated apropos of the adversarial perturbations ’ magnitude . After sufficient rounds of global communication and certain steps of local gradient descent for each t , we obtain the minimal loss close to zero . Notably , our assumptions do not rely on data distribution . Thus the proposed analysis framework is feasible for non-IID clients . • We are the first to theoretically formulate the convergence of the FAL problem into a minmax optimization framework with the proposed loss function . In FL , the update in the global model is no longer directly determined by the gradient directions due to multiple local steps . To tackle the challenges , we define a new ‘ gradient ’ , FL gradient . With valid ReLU Lipschitz and over-parameterized assumptions , we use gradient coupling for gradient updates in FL to show the model updates of each global updating is bounded in federated adversarial learning . Roadmap The rest of the paper is organized as follows . We overview the related work on federated learning and adversarial training in Section 2 . We describe the problem formulation for the federated adversarial learning algorithm and introduce the notations , assumptions to be used , and conditions to be considered to ensure convergence in Section 3 . Our main convergence result is presented in Section 4 . In Section 5 , we present the core techniques and an overview of the proof . We summarize and conclude our results in Section 6 . 2 RELATED WORK . Federated Learning A efficient and privacy-preserving way to learn from the distributed data collected on the edge devices ( a.k.a clients ) would be FL . FedAvg is a easy-to-implement distributed learning strategy by aggregating local model updates on the server side and transmitting the averaged model back to local clients . Later , many FL methods are developed baed on FedAvg . Theses FL schemes can be divided into aggregation schemes ( McMahan et al. , 2017 ; Wang et al. , 2020 ; Li et al. , 2021 ) and optimization schemes ( Reddi et al. , 2020 ; Zhang et al. , 2020a ) . Nearly all the them have the common characteristics that client model are updating using gradient descent-based methods , which is venerable to adversarial attacks . In addition , data heterogeneity brings in huge challeng in FL . For IID data , FL has been proven effective . However , in practice , data mostly distribute as non-IID . Non-IID data could substantially degrade the performance of FL models ( Zhao et al. , 2018 ; Li et al. , 2019 ; 2021 ; 2020a ) . Despite the potential risk in security and unstable performance in nonIID setting , as FL mitigates the concern of data sharing , it is still a popular and practical solution for distributed data learning in many real applications , such as healthcare ( Li et al. , 2020b ; Rieke et al. , 2020 ) , autonomous driving ( Liang et al. , 2019 ) , IoTs ( Wang et al. , 2019 ; Lim et al. , 2020 ) . Learning with Adversaries Since the discovery of adversarial examples ( Szegedy et al. , 2013 ) , to make neural networks robust to perturbations , efforts have been made to propose more effective defense methods . As adversarial examples are an issue of robustness , the popular scheme is to include learning with adversarial examples , which can be traced back to ( Goodfellow et al. , 2014 ) . It produces adversarial examples and injecting them into training data . Later , Madry et al . ( Madry et al. , 2018 ) proposed training on multi-step PGD adversaries and empirically observed that adversarial training consistently achieves small and robust training loss in wide neural networks . Federated Adversarial Learning Adversarial examples , which may not be visually distinguishable from benign samples , are often classified . This poses potential security threats for practical machine learning applications . Adversarial training ( Goodfellow et al. , 2014 ; Kurakin et al. , 2016 ) is a popular protocol to train more adversarial robust models by inserting adversarial examples in training . The use of adversarial training in FL presents a number of open challenges , including poor convergence due to multiple local update steps , instability and heterogeneity of clients , cost and security request of communication , and so on . To defend the adversarial attacks in federated learning , limited recent studies have proposed to include adversarial training on clients in the local training steps ( Bhagoji et al. , 2019 ; Zizzo et al. , 2020 ) . These two works empirically showed the performance of adversarial training . The theoretical analysis of convergence is under explored . In addition , ( Zhang et al. , 2021 ) proposed an adversarial training strategy in classical distributed setting , not meeting the specialty in FL . Convergence via Over-parameterization Convergence analysis on over-parameterized neural networks falls in two lines . In the first line of work ( Li & Liang , 2018 ; Allen-Zhu et al. , 2019b ; c ; a ) , data separability plays a crucial role in deep learning theory , especially in showing the convergence result of over-parameterized neural network training . Denote δ as the minimum distance between all pairs of data points . Data separability theory requires the width ( m ) of the neural network is at least polynomial factor of all the parameters ( i.e . m ≥ poly ( n , d , 1/δ ) ) , where n is the number of data points and d is the dimension of data . Another line of work ( Du et al. , 2019b ; Arora et al. , 2019a ; b ; Song & Yang , 2019 ; Lee et al. , 2020 ) builds on neural tangent kernel ( Jacot et al. , 2018 ) . It requires the minimum eigenvalue ( λ ) of the neural tangent kernel to be lower bounded . Our analysis focuses on the former approach based on data separability . Robustness of Federated Learning Previously there were several works that theoretically analyzed the robustness of federated learning under noise . Yin et al . ( 2018 ) developed distributed optimization algorithms that were provably robust against arbitrary and potentially adversarial behavior in distributed computing systems , and mainly focused on achieving optimal statistical performance . Reisizadeh et al . ( 2020 ) developed a robust federated learning algorithm by considering a structured affine distribution shift in users ’ data . Their analysis was built on several assumptions on the loss functions without a direct connection to neural network .
This paper is a direct follow-up of Zhang et al 2020b. With assumptions including overparametrized two-layer ReLU network, normalized dataset, gamma-separability, and Lipschitz convex loss, it proves the convergence of FedAvg under adversarial perturbation. These assumptions are easy adaptations from Zhang et al 2020b. --post rebuttal-- I would like to thank the authors for the response. However, after reading the author response my opinion remains the same, as the authors acknowledge that this work is an extension of Zhang et al 2020b and there is no experiment after the revision. My main concern is still the novelty. I would encourage the authors to work on the future direction for empirically verifying their general framework.
SP:59629689ec4e6ffa51a30e0a931f103caadd81b8
Provable Federated Adversarial Learning via Min-max Optimization
1 INTRODUCTION . Federated learning ( FL ) is playing an important role nowadays , as it allows different parties or clients to collaboratively train deep learning models without sharing private data . One popular FL paradigm called FedAvg ( McMahan et al. , 2017 ) introduces an easy-to-implement distributed learning method without data sharing . Specifically , it requires a central server to aggregate model updates computed by the local participants ( also known as nodes or clients ) using local imparticipable private data . Then the central server aggregates these updates to train a globally learned model . Nowadays deep learning model are exposed to severe threats of adversarial samples . Namely , small adversarial perturbations on the inputs will dramatically change the outputs or output wrong answers ( Szegedy et al. , 2013 ) . In this regard , much effort has been made to improve neural networks ’ resistance to such perturbations using adversarial learning ( Tramèr et al. , 2017 ; Samangouei et al. , 2018 ; Madry et al. , 2018 ) . Among these studies , the adversarial training scheme in Madry et al . ( 2018 ) has achieved the good robustness in practice . Madry et al . ( 2018 ) proposes an adversarial training scheme that uses projected gradient descent ( PGD ) to generate alternative adversarial samples as the augmented training set . Generating adversarial examples during neural network training is considered as one of the most effective approaches for adversarial training up to now according to the literature ( Carlini & Wagner , 2017 ; Athalye et al. , 2018 ; Croce & Hein , 2020 ) . Although adversarial learning has attracted much attention in the centralized domain , its practice in FL is under-explored ( Zizzo et al. , 2020 ) . Like training classical deep neural networks that use gradient-based methods , FL paradigms are vulnerable to adversarial samples . Adversarial learning in FL brings multiple open challenges due to FL properties on low convergence rate , application in non-IID environments , and secure aggregation solutions . Hence applying adversarial learning in an FL paradigm may lead to unstable training loss and a lack of robustness . However , a recent practical work Zizzo et al . ( 2020 ) observed that although there exist difficulties of convergence , the federation of adversarial training with suitable hyperparameter settings can achieve adversarial robustness and acceptable performance . Motivated by the empirical results , we want to address the provable property of combining adversarial learning into FL from the theoretical perspective . This work aims to theoretically study the unexplored convergence challenges that lie in the interaction between adversarial training and FL . To achieve a general understanding , we consider a general form of federated adversarial learning ( FAL ) , which deploys adversarial training scheme on local clients in the most common FL paradigm , FedAvg ( McMahan et al. , 2017 ) system . Specifically , FAL has an inner loop of local updating that generates adversarial samples ( i.e. , using Madry et al . ( 2018 ) ) for adversarial training and an outer loop to update local model weights on the client side . Then global model is aggregated using FedAvg ( McMahan et al. , 2017 ) . The algorithm is detailed in Algorithm 1 . We are interested in theoretically understanding the proposed FAL scheme from the aspects of model robustness and convergence : Can federated adversarial learning fit training data robustly and converge with a feasibly sized neural network ? The theoretical convergence analysis of adversarial training itself is challenging in the centralized training setting . Tu et al . ( 2018 ) recently proposed a general theoretical method to analyze the risk bound with adversaries but did not address the convergence problem . The investigation of convergence on over-parameterized neural network has achieved tremendous progress ( Du et al. , 2019a ; Allen-Zhu et al. , 2019b ; c ; Du et al. , 2019b ; Arora et al. , 2019b ) . The basic statement is that training can converge to sufficiently small training loss in polynomial iterations using gradient descent or stochastic gradient descent when the width of the network is polynomial in the number of training examples when initialized randomly . Recent theoretical analysis ( Gao et al. , 2019 ; Zhang et al. , 2020b ) extends these standard training convergence results to adversarial training settings . To answer the above interesting but challenging question , we formulate FAL as an min-max optimization problem . We extend the convergence analysis on the general formulation of over-parameterized neural networks in the FL setting that allows each client to perform min-max training and generate adversarial examples ( see Algorithm 1 ) . Involved challenges are arising in FL convergence analysis due to its unique optimization method : 1 ) unlike classical centralized setting , the global model of FL does not update in the gradient direction ; 2 ) inter-client heterogeneity issue needs to be considered . Despite the challenges , we give an affirmative answer to the above question . To the best of our knowledge , this work is the first theoretical study that examines these unexplored challenges on the convergence of adversarial training with FL . The contributions of this paper are : • We propose a framework to analyze a general form of FAL in over-parameterized neural networks . We follow a natural and valid assumption of data separability that the training dataset are well separated apropos of the adversarial perturbations ’ magnitude . After sufficient rounds of global communication and certain steps of local gradient descent for each t , we obtain the minimal loss close to zero . Notably , our assumptions do not rely on data distribution . Thus the proposed analysis framework is feasible for non-IID clients . • We are the first to theoretically formulate the convergence of the FAL problem into a minmax optimization framework with the proposed loss function . In FL , the update in the global model is no longer directly determined by the gradient directions due to multiple local steps . To tackle the challenges , we define a new ‘ gradient ’ , FL gradient . With valid ReLU Lipschitz and over-parameterized assumptions , we use gradient coupling for gradient updates in FL to show the model updates of each global updating is bounded in federated adversarial learning . Roadmap The rest of the paper is organized as follows . We overview the related work on federated learning and adversarial training in Section 2 . We describe the problem formulation for the federated adversarial learning algorithm and introduce the notations , assumptions to be used , and conditions to be considered to ensure convergence in Section 3 . Our main convergence result is presented in Section 4 . In Section 5 , we present the core techniques and an overview of the proof . We summarize and conclude our results in Section 6 . 2 RELATED WORK . Federated Learning A efficient and privacy-preserving way to learn from the distributed data collected on the edge devices ( a.k.a clients ) would be FL . FedAvg is a easy-to-implement distributed learning strategy by aggregating local model updates on the server side and transmitting the averaged model back to local clients . Later , many FL methods are developed baed on FedAvg . Theses FL schemes can be divided into aggregation schemes ( McMahan et al. , 2017 ; Wang et al. , 2020 ; Li et al. , 2021 ) and optimization schemes ( Reddi et al. , 2020 ; Zhang et al. , 2020a ) . Nearly all the them have the common characteristics that client model are updating using gradient descent-based methods , which is venerable to adversarial attacks . In addition , data heterogeneity brings in huge challeng in FL . For IID data , FL has been proven effective . However , in practice , data mostly distribute as non-IID . Non-IID data could substantially degrade the performance of FL models ( Zhao et al. , 2018 ; Li et al. , 2019 ; 2021 ; 2020a ) . Despite the potential risk in security and unstable performance in nonIID setting , as FL mitigates the concern of data sharing , it is still a popular and practical solution for distributed data learning in many real applications , such as healthcare ( Li et al. , 2020b ; Rieke et al. , 2020 ) , autonomous driving ( Liang et al. , 2019 ) , IoTs ( Wang et al. , 2019 ; Lim et al. , 2020 ) . Learning with Adversaries Since the discovery of adversarial examples ( Szegedy et al. , 2013 ) , to make neural networks robust to perturbations , efforts have been made to propose more effective defense methods . As adversarial examples are an issue of robustness , the popular scheme is to include learning with adversarial examples , which can be traced back to ( Goodfellow et al. , 2014 ) . It produces adversarial examples and injecting them into training data . Later , Madry et al . ( Madry et al. , 2018 ) proposed training on multi-step PGD adversaries and empirically observed that adversarial training consistently achieves small and robust training loss in wide neural networks . Federated Adversarial Learning Adversarial examples , which may not be visually distinguishable from benign samples , are often classified . This poses potential security threats for practical machine learning applications . Adversarial training ( Goodfellow et al. , 2014 ; Kurakin et al. , 2016 ) is a popular protocol to train more adversarial robust models by inserting adversarial examples in training . The use of adversarial training in FL presents a number of open challenges , including poor convergence due to multiple local update steps , instability and heterogeneity of clients , cost and security request of communication , and so on . To defend the adversarial attacks in federated learning , limited recent studies have proposed to include adversarial training on clients in the local training steps ( Bhagoji et al. , 2019 ; Zizzo et al. , 2020 ) . These two works empirically showed the performance of adversarial training . The theoretical analysis of convergence is under explored . In addition , ( Zhang et al. , 2021 ) proposed an adversarial training strategy in classical distributed setting , not meeting the specialty in FL . Convergence via Over-parameterization Convergence analysis on over-parameterized neural networks falls in two lines . In the first line of work ( Li & Liang , 2018 ; Allen-Zhu et al. , 2019b ; c ; a ) , data separability plays a crucial role in deep learning theory , especially in showing the convergence result of over-parameterized neural network training . Denote δ as the minimum distance between all pairs of data points . Data separability theory requires the width ( m ) of the neural network is at least polynomial factor of all the parameters ( i.e . m ≥ poly ( n , d , 1/δ ) ) , where n is the number of data points and d is the dimension of data . Another line of work ( Du et al. , 2019b ; Arora et al. , 2019a ; b ; Song & Yang , 2019 ; Lee et al. , 2020 ) builds on neural tangent kernel ( Jacot et al. , 2018 ) . It requires the minimum eigenvalue ( λ ) of the neural tangent kernel to be lower bounded . Our analysis focuses on the former approach based on data separability . Robustness of Federated Learning Previously there were several works that theoretically analyzed the robustness of federated learning under noise . Yin et al . ( 2018 ) developed distributed optimization algorithms that were provably robust against arbitrary and potentially adversarial behavior in distributed computing systems , and mainly focused on achieving optimal statistical performance . Reisizadeh et al . ( 2020 ) developed a robust federated learning algorithm by considering a structured affine distribution shift in users ’ data . Their analysis was built on several assumptions on the loss functions without a direct connection to neural network .
This paper proposes a federated adversarial learning (FAL) framework with strong theoretical guarantees. Compared to the centralized model, the federated model allows each local client to generate the adversarial samples and updates the gradient themselves for several iterations and then communicate to the centralized model for global updating. This is the first work that gives convergence guarantees for FAL. Their technical analysis mainly involves two parts In the first part, they utilize the overparameterization and separability assumption to ensure the initialized model is close to some model U^* which can achieve the small robust loss. Then in the second part, by using such property on the initialized model and by bounding the difference between real gradient and the FL gradient, they are able to show the convergence. As the authors stated, this FL gradient is a new gradient they use to tackle the difference between global and local updates.
SP:59629689ec4e6ffa51a30e0a931f103caadd81b8
RAVE: A variational autoencoder for fast and high-quality neural audio synthesis
Deep generative models applied to audio have improved by a large margin the state-of-the-art in many speech and music related tasks . However , as raw waveform modelling remains an inherently difficult task , audio generative models are either computationally intensive , rely on low sampling rates , are complicated to control or restrict the nature of possible signals . Among those models , Variational AutoEncoders ( VAE ) give control over the generation by exposing latent variables , although they usually suffer from low synthesis quality . In this paper , we introduce a Realtime Audio Variational autoEncoder ( RAVE ) allowing both fast and high-quality audio waveform synthesis . We introduce a novel two-stage training procedure , namely representation learning and adversarial fine-tuning . We show that using a post-training analysis of the latent space allows a direct control between the reconstruction fidelity and the representation compactness . By leveraging a multi-band decomposition of the raw waveform , we show that our model is the first able to generate 48kHz audio signals , while simultaneously running 20 times faster than real-time on a standard laptop CPU . We evaluate synthesis quality using both quantitative and qualitative subjective experiments and show the superiority of our approach compared to existing models . Finally , we present applications of our model for timbre transfer and signal compression . All of our source code and audio examples are publicly available . 1 Introduction . Deep learning applied to audio signals proposes exciting new ways to perform speech generation , musical composition and sound design . Recent works in deep audio modelling have allowed novel types of interaction such as unconditional generation ( Chung et al. , 2015 ; Fraccaro et al. , 2016 ; Oord et al. , 2016 ; Vasquez & Lewis , 2019 ; Dhariwal et al. , 2020 ) or timbre transfer between instruments ( Mor et al. , 2018 ) . However , these approaches remain computationally intensive , as modeling audio raw waveforms requires dealing with extremely large temporal dimensionality . To cope with this issue , previous approaches usually rely on very low sampling rates ( 16 to 24kHz ) , which can be sufficient for speech signals , but is considered as low-quality for musical applications . Furthermore , the auto-regressive sampling procedure used by most models ( Engel et al. , 2017 ) is prohibitively long . This precludes real-time application which are pervasive in musical creation , while parallel models ( Défossez et al. , 2018 ) can only allow fast generation at the cost of a lower sound quality . More recently , Engel et al . ( 2019 ) and Wang et al . ( 2019 ) proposed to leverage classical synthesis techniques to address these limitations , by relying on pre-computed audio descriptors as an extraneous information to condition the models . While these approaches achieve state-of-the-art results in terms of audio quality , naturalness and computational efficiency , the extensive use of audio descriptors highly restricts the type of signals that can be generated . A possible solution to alleviate this issue would be to rely on Variational Autoencoders ( Kingma & Welling , 2014 ) , as they provide a form of trainable analysis-synthesis framework ( Esling et al. , 2018 ) , without explicit restrictions on the type of features learned . However , estimating the dimensionality of the latent representation associated with a given dataset prior to model training is far from trivial . Indeed , a wrong estimation of the latent dimensionality may result in either poor reconstruction or uninformative latent dimensions , which makes latent exploration and manipulation difficult . In this paper , we overcome the limitations outlined above by proposing a VAE model built specifically for fast and high-quality audio synthesis . To do so , we introduce a specific twostage training procedure where the model is first trained as a regular VAE for representation learning , then fine-tuned with an adversarial generation objective in order to achieve high quality audio synthesis . We combine a multi-band decomposition of the raw waveform alongside classical synthesis blocks inspired by Engel et al . ( 2019 ) , allowing to achieve highquality audio synthesis with sampling rates going up to 48kHz without a major increase in computational complexity . We show that our model is able to converge on complex datasets using a low number of parameters , achieving state-of-the-art results in terms of naturalness and audio quality , while being usable in real-time on a standard laptop CPU . We compare our model with several state-of-the-art models and show its superiority in unsupervised audio modeling . In order to address the dimensionality of the learned representation , we introduce a novel method to split the latent space between informative and uninformative parts using a singular value decomposition , and show that replacing the latter part with random noise does not affect the reconstruction quality . This procedure allows easier exploration and manipulation of latent trajectories , since we only need to operate on a subset of informative latent dimensions . Finally , we discuss the application of our model in signal compression and timbre style transfer . Our key contributions are : • A two-stage training procedure where the model is first trained as a regular VAE , then fine-tuned with an adversarial generation objective , as depicted in figure 1 • A post-training analysis of the latent space providing a way to balance between reconstruction fidelity and representation compactness • High-quality audio synthesis models with sampling rates going up to 48kHz • 20 times faster than realtime synthesis on a standard laptop CPU Audio samples and supplementary figures are provided in the accompanying website1 . We highly encourage readers to listen to accompanying samples while reading the paper . 2 State-of-art . 2.1 Variational autoencoders . Generative models aim to understand a given dataset x ∈ Rdx by modelling its underlying distribution p ( x ) . To simplify this problem , we can consider that the generation of x is conditioned by latent variables z ∈ Rdz , responsible for most of the variations present in x . Therefore , the complete model is defined by the joint distribution p ( x , z ) = p ( x|z ) p ( z ) , which is usually not analytically solvable given the complexity of real-world data . Variational 1https : //anonymous84654.github.io/ICLR_anonymous/ autoencoders address this problem by introducing an inference model qφ ( z|x ) , optimized to minimize its Kullback-Leibler ( KL ) divergence with the true posterior distribution p ( z|x ) φ∗ = argmin φ DKL [ qφ ( z|x ) ‖p ( z|x ) ] , ( 1 ) which can be rearranged to obtain the final objective used to train a VAE , called the Evidence Lower BOund ( ELBO ) , as shown by Kingma & Welling ( 2014 ) Lφ , θ ( x ) = −Eqφ ( z|x ) [ log pθ ( x|z ) ] +DKL [ qφ ( z|x ) ‖p ( z ) ] . ( 2 ) The ELBO minimizes the reconstruction error of the model through the likelihood of the data given a latent log pθ ( x|z ) , while regularizing the posterior distribution qφ ( z|x ) to match a predefined prior p ( z ) . Both posterior distributions qφ and pθ are parametrized by neural networks respectively called encoder and decoder . Higgins et al . ( 2016 ) proposes to weight the KL divergence in equation ( 2 ) with a parameter β to control the trade-off between accurate reconstruction and strong latent regularization . They show that increasing β > 1 leads to less entangled latent dimensions , at the detriment of the reconstruction quality . 2.2 Autoencoding raw waveform . One of the first approaches addressing the raw waveform modelling task are WaveNet ( Oord et al. , 2016 ) and SampleRNN ( Mehri et al. , 2017 ) , where the probability of a waveform x is factorized as a product of conditional probabilities p ( x ) = ∏ t > 1 p ( xt|x1 , . . . , xt−1 ) . ( 3 ) Those models require a large amount of data and parameters to properly converge . Furthermore , the autoregressive nature of the synthesis process makes it prohibitively slow , and prone to accumulate errors . WaveNet has also been adapted by Engel et al . ( 2017 ) for their NSynth model , addressing the representation learning task . Unlike equation ( 2 ) , they do not regularize the learned representation , and rather encode the raw waveform determinisitically to its latent counterpart . It implies the absence of a prior distribution p ( z ) and , therefore , prevents sampling from the latent space . This restricts the applications of the model to simple reconstructions and interpolations . As a way to speed-up the synthesis process , Défossez et al . ( 2018 ) proposed an autoencoder with feed-forward convolutional networks parametrizing both the encoder and the decoder . They use a perceptually-motivated distance between waveforms called spectral distance as the reconstruction objective l ( x , y ) = ∥∥log ( STFT ( x ) 2 + ) − log ( STFT ( y ) 2 + ) ∥∥ 1 , ( 4 ) where STFT is the Short-Term Fourier Transform . Since they use a squared STFT , the phase component is discarded making the loss permissive to inaudible phase variations . They show that their model is 2500 times faster that NSynth during synthesis , at the expense of a degraded sound quality . Following the recent advances in generative adversarial modelling ( Goodfellow et al. , 2014 ) , Kumar et al . ( 2019 ) proposed to use an adversarial objective to address the parallel audio modelling task . The discriminator is trained to differentiate true samples from generated ones , while the generator is optimized to produce samples that are classified as true by the discriminator . A feature matching loss is added to the adversarial loss , minimizing the L1 distance between the discriminator feature maps of real and synthesized audio . This feature matching mechanism can be seen as a learned metric to evaluate the distance between two samples , and has been successfully applied to the conditional waveform modelling task ( e.g spectrogram to waveform or replacement of the decoder in a pretrained autoencoder model ) . 3 Method . 3.1 Two-stage training procedure . Ideally , the representation learned by a variational autoencoder should contain high-level attributes of the dataset . However , two perceptually similar audio signals may contain subtle phase variations that produce dramatically different waveforms . Hence , estimating the reconstruction term in equation ( 2 ) using the raw waveform penalizes the model if those subtle variations are not included in the learned representation . This might both hamper the learning process and include in the latent space those low-level variations about audio signal that are not relevant perceptually . To address this problem , we split the training process in two stages , namely representation learning and adversarial fine-tuning . 3.1.1 Stage 1 : Representation learning . The first stage of our procedure aims to perform representation learning . We leverage the multiscale spectral distance S ( · , · ) proposed by Engel et al . ( 2019 ) in order to estimate the distance between real and synthesized waveforms , defined as S ( x , y ) = ∑ n∈N [ ‖STFTn ( x ) − STFTn ( y ) ‖F ‖STFTn ( x ) ‖F + log ( ‖STFTn ( x ) − STFTn ( y ) ‖1 ) ] , ( 5 ) where N is a set of scales , STFTn is the amplitude of the Short-Term Fourier Transform with window size n and hop size n/4 , and ‖ · ‖F , ‖ · ‖1 are respectively the Frobenius norm and L1 norm . Using an amplitude spectrum-based distance does not penalize the model for inaccurately reconstructed phase , but encompasses important perceptual features about the signal . We train the encoder and decoder with the following loss derived from the ELBO Lvae ( x ) = Ex̂∼p ( x|z ) [ S ( x , x̂ ) ] + β ×DKL [ qφ ( z|x ) ‖p ( z ) ] , ( 6 ) We start by training the model solely with Lvae , and once this loss converges , we switch to the next training phase .
This paper proposes an autoencoder for high-quality waveform synthesis. The approach is based on multi-band decomposition, VAE and adversarial fine-tuning. The synthesis speed is substantially faster than existing approaches on both CPU and GPU.
SP:31e7f8d332aaeed8669c0a98d3e43edf1e6271bc
RAVE: A variational autoencoder for fast and high-quality neural audio synthesis
Deep generative models applied to audio have improved by a large margin the state-of-the-art in many speech and music related tasks . However , as raw waveform modelling remains an inherently difficult task , audio generative models are either computationally intensive , rely on low sampling rates , are complicated to control or restrict the nature of possible signals . Among those models , Variational AutoEncoders ( VAE ) give control over the generation by exposing latent variables , although they usually suffer from low synthesis quality . In this paper , we introduce a Realtime Audio Variational autoEncoder ( RAVE ) allowing both fast and high-quality audio waveform synthesis . We introduce a novel two-stage training procedure , namely representation learning and adversarial fine-tuning . We show that using a post-training analysis of the latent space allows a direct control between the reconstruction fidelity and the representation compactness . By leveraging a multi-band decomposition of the raw waveform , we show that our model is the first able to generate 48kHz audio signals , while simultaneously running 20 times faster than real-time on a standard laptop CPU . We evaluate synthesis quality using both quantitative and qualitative subjective experiments and show the superiority of our approach compared to existing models . Finally , we present applications of our model for timbre transfer and signal compression . All of our source code and audio examples are publicly available . 1 Introduction . Deep learning applied to audio signals proposes exciting new ways to perform speech generation , musical composition and sound design . Recent works in deep audio modelling have allowed novel types of interaction such as unconditional generation ( Chung et al. , 2015 ; Fraccaro et al. , 2016 ; Oord et al. , 2016 ; Vasquez & Lewis , 2019 ; Dhariwal et al. , 2020 ) or timbre transfer between instruments ( Mor et al. , 2018 ) . However , these approaches remain computationally intensive , as modeling audio raw waveforms requires dealing with extremely large temporal dimensionality . To cope with this issue , previous approaches usually rely on very low sampling rates ( 16 to 24kHz ) , which can be sufficient for speech signals , but is considered as low-quality for musical applications . Furthermore , the auto-regressive sampling procedure used by most models ( Engel et al. , 2017 ) is prohibitively long . This precludes real-time application which are pervasive in musical creation , while parallel models ( Défossez et al. , 2018 ) can only allow fast generation at the cost of a lower sound quality . More recently , Engel et al . ( 2019 ) and Wang et al . ( 2019 ) proposed to leverage classical synthesis techniques to address these limitations , by relying on pre-computed audio descriptors as an extraneous information to condition the models . While these approaches achieve state-of-the-art results in terms of audio quality , naturalness and computational efficiency , the extensive use of audio descriptors highly restricts the type of signals that can be generated . A possible solution to alleviate this issue would be to rely on Variational Autoencoders ( Kingma & Welling , 2014 ) , as they provide a form of trainable analysis-synthesis framework ( Esling et al. , 2018 ) , without explicit restrictions on the type of features learned . However , estimating the dimensionality of the latent representation associated with a given dataset prior to model training is far from trivial . Indeed , a wrong estimation of the latent dimensionality may result in either poor reconstruction or uninformative latent dimensions , which makes latent exploration and manipulation difficult . In this paper , we overcome the limitations outlined above by proposing a VAE model built specifically for fast and high-quality audio synthesis . To do so , we introduce a specific twostage training procedure where the model is first trained as a regular VAE for representation learning , then fine-tuned with an adversarial generation objective in order to achieve high quality audio synthesis . We combine a multi-band decomposition of the raw waveform alongside classical synthesis blocks inspired by Engel et al . ( 2019 ) , allowing to achieve highquality audio synthesis with sampling rates going up to 48kHz without a major increase in computational complexity . We show that our model is able to converge on complex datasets using a low number of parameters , achieving state-of-the-art results in terms of naturalness and audio quality , while being usable in real-time on a standard laptop CPU . We compare our model with several state-of-the-art models and show its superiority in unsupervised audio modeling . In order to address the dimensionality of the learned representation , we introduce a novel method to split the latent space between informative and uninformative parts using a singular value decomposition , and show that replacing the latter part with random noise does not affect the reconstruction quality . This procedure allows easier exploration and manipulation of latent trajectories , since we only need to operate on a subset of informative latent dimensions . Finally , we discuss the application of our model in signal compression and timbre style transfer . Our key contributions are : • A two-stage training procedure where the model is first trained as a regular VAE , then fine-tuned with an adversarial generation objective , as depicted in figure 1 • A post-training analysis of the latent space providing a way to balance between reconstruction fidelity and representation compactness • High-quality audio synthesis models with sampling rates going up to 48kHz • 20 times faster than realtime synthesis on a standard laptop CPU Audio samples and supplementary figures are provided in the accompanying website1 . We highly encourage readers to listen to accompanying samples while reading the paper . 2 State-of-art . 2.1 Variational autoencoders . Generative models aim to understand a given dataset x ∈ Rdx by modelling its underlying distribution p ( x ) . To simplify this problem , we can consider that the generation of x is conditioned by latent variables z ∈ Rdz , responsible for most of the variations present in x . Therefore , the complete model is defined by the joint distribution p ( x , z ) = p ( x|z ) p ( z ) , which is usually not analytically solvable given the complexity of real-world data . Variational 1https : //anonymous84654.github.io/ICLR_anonymous/ autoencoders address this problem by introducing an inference model qφ ( z|x ) , optimized to minimize its Kullback-Leibler ( KL ) divergence with the true posterior distribution p ( z|x ) φ∗ = argmin φ DKL [ qφ ( z|x ) ‖p ( z|x ) ] , ( 1 ) which can be rearranged to obtain the final objective used to train a VAE , called the Evidence Lower BOund ( ELBO ) , as shown by Kingma & Welling ( 2014 ) Lφ , θ ( x ) = −Eqφ ( z|x ) [ log pθ ( x|z ) ] +DKL [ qφ ( z|x ) ‖p ( z ) ] . ( 2 ) The ELBO minimizes the reconstruction error of the model through the likelihood of the data given a latent log pθ ( x|z ) , while regularizing the posterior distribution qφ ( z|x ) to match a predefined prior p ( z ) . Both posterior distributions qφ and pθ are parametrized by neural networks respectively called encoder and decoder . Higgins et al . ( 2016 ) proposes to weight the KL divergence in equation ( 2 ) with a parameter β to control the trade-off between accurate reconstruction and strong latent regularization . They show that increasing β > 1 leads to less entangled latent dimensions , at the detriment of the reconstruction quality . 2.2 Autoencoding raw waveform . One of the first approaches addressing the raw waveform modelling task are WaveNet ( Oord et al. , 2016 ) and SampleRNN ( Mehri et al. , 2017 ) , where the probability of a waveform x is factorized as a product of conditional probabilities p ( x ) = ∏ t > 1 p ( xt|x1 , . . . , xt−1 ) . ( 3 ) Those models require a large amount of data and parameters to properly converge . Furthermore , the autoregressive nature of the synthesis process makes it prohibitively slow , and prone to accumulate errors . WaveNet has also been adapted by Engel et al . ( 2017 ) for their NSynth model , addressing the representation learning task . Unlike equation ( 2 ) , they do not regularize the learned representation , and rather encode the raw waveform determinisitically to its latent counterpart . It implies the absence of a prior distribution p ( z ) and , therefore , prevents sampling from the latent space . This restricts the applications of the model to simple reconstructions and interpolations . As a way to speed-up the synthesis process , Défossez et al . ( 2018 ) proposed an autoencoder with feed-forward convolutional networks parametrizing both the encoder and the decoder . They use a perceptually-motivated distance between waveforms called spectral distance as the reconstruction objective l ( x , y ) = ∥∥log ( STFT ( x ) 2 + ) − log ( STFT ( y ) 2 + ) ∥∥ 1 , ( 4 ) where STFT is the Short-Term Fourier Transform . Since they use a squared STFT , the phase component is discarded making the loss permissive to inaudible phase variations . They show that their model is 2500 times faster that NSynth during synthesis , at the expense of a degraded sound quality . Following the recent advances in generative adversarial modelling ( Goodfellow et al. , 2014 ) , Kumar et al . ( 2019 ) proposed to use an adversarial objective to address the parallel audio modelling task . The discriminator is trained to differentiate true samples from generated ones , while the generator is optimized to produce samples that are classified as true by the discriminator . A feature matching loss is added to the adversarial loss , minimizing the L1 distance between the discriminator feature maps of real and synthesized audio . This feature matching mechanism can be seen as a learned metric to evaluate the distance between two samples , and has been successfully applied to the conditional waveform modelling task ( e.g spectrogram to waveform or replacement of the decoder in a pretrained autoencoder model ) . 3 Method . 3.1 Two-stage training procedure . Ideally , the representation learned by a variational autoencoder should contain high-level attributes of the dataset . However , two perceptually similar audio signals may contain subtle phase variations that produce dramatically different waveforms . Hence , estimating the reconstruction term in equation ( 2 ) using the raw waveform penalizes the model if those subtle variations are not included in the learned representation . This might both hamper the learning process and include in the latent space those low-level variations about audio signal that are not relevant perceptually . To address this problem , we split the training process in two stages , namely representation learning and adversarial fine-tuning . 3.1.1 Stage 1 : Representation learning . The first stage of our procedure aims to perform representation learning . We leverage the multiscale spectral distance S ( · , · ) proposed by Engel et al . ( 2019 ) in order to estimate the distance between real and synthesized waveforms , defined as S ( x , y ) = ∑ n∈N [ ‖STFTn ( x ) − STFTn ( y ) ‖F ‖STFTn ( x ) ‖F + log ( ‖STFTn ( x ) − STFTn ( y ) ‖1 ) ] , ( 5 ) where N is a set of scales , STFTn is the amplitude of the Short-Term Fourier Transform with window size n and hop size n/4 , and ‖ · ‖F , ‖ · ‖1 are respectively the Frobenius norm and L1 norm . Using an amplitude spectrum-based distance does not penalize the model for inaccurately reconstructed phase , but encompasses important perceptual features about the signal . We train the encoder and decoder with the following loss derived from the ELBO Lvae ( x ) = Ex̂∼p ( x|z ) [ S ( x , x̂ ) ] + β ×DKL [ qφ ( z|x ) ‖p ( z ) ] , ( 6 ) We start by training the model solely with Lvae , and once this loss converges , we switch to the next training phase .
This paper aims to achieve fast and high-quality audio synthesis. The authors propose a variational autoencoder-based model called real-time audio variational autoencoder (RAVE) to achieve this aim. In particular, the authors introduce a two-stage training scheme to alleviate the difficulty in joint learning of the adequate representation and high-fidelity audio synthesis. More concretely, in the first stage, representation learning is conducted in a VAE framework. In the second stage, audio fidelity is improved using adversarial fine-tuning. The authors also introduce a post-analysis method to manipulate the balance between fidelity and compactness. The effectiveness of the proposed method was evaluated on the Strings and VCTK datasets. The applications to timbre transfer and signal compression were also demonstrated.
SP:31e7f8d332aaeed8669c0a98d3e43edf1e6271bc
A Scaling Law for Syn-to-Real Transfer: How Much Is Your Pre-training Effective?
Synthetic-to-real transfer learning is a framework in which a synthetically generated dataset is used to pre-train a model to improve its performance on real vision tasks . The most significant advantage of using synthetic images is that the ground-truth labels are automatically available , enabling unlimited expansion of the data size without human cost . However , synthetic data may have a huge domain gap , in which case increasing the data size does not improve the performance . How can we know that ? In this study , we derive a simple scaling law that predicts the performance from the amount of pre-training data . By estimating the parameters of the law , we can judge whether we should increase the data or change the setting of image synthesis . Further , we analyze the theory of transfer learning by considering learning dynamics and confirm that the derived generalization bound is consistent with our empirical findings . We empirically validated our scaling law on various experimental settings of benchmark tasks , model sizes , and complexities of synthetic images . 1 INTRODUCTION . The success of deep learning relies on the availability of large data . If the target task provides limited data , the framework of transfer learning is preferably employed . A typical scenario of transfer learning is to pre-train a model for a similar or even different task and fine-tune the model for the target task . However , the limitation of labeled data has been the main bottleneck of supervised pre-training . While there have been significant advances in the representation capability of the models and computational capabilities of the hardware , the size and the diversity of the baseline dataset have not been growing as fast ( Sun et al. , 2017 ) . This is partially because of the sheer physical difficulty of collecting large datasets from real environments ( e.g. , the cost of human annotation ) . In computer vision , synthetic-to-real ( syn2real ) transfer is a promising strategy that has been attracting attention ( Su et al. , 2015 ; Movshovitz-Attias et al. , 2016 ; Georgakis et al. , 2017 ; Tremblay et al. , 2018 ; Hinterstoisser et al. , 2019 ; Borrego et al. , 2018 ; Chen et al. , 2021 ) . In syn2real , images used for pre-training are synthesized to improve the performance on real vision tasks . By combining various conditions , such as 3D models , textures , light conditions , and camera poses , we can synthesize an infinite number of images with ground-truth annotations . Syn2real transfer has already been applied in some real-world applications . Teed & Deng ( 2021 ) proposed a simultaneous localization and mapping ( SLAM ) system that was trained only with synthetic data and demonstrated state-of-the-art performance . The object detection networks for autonomous driving developed by Tesla was trained with 370 million images generated by simulation ( Karpathy , 2021 ) . The performance of syn2real transfer depends on the similarity between synthetic and real data . In general , the more similar they are , the stronger the effect of pre-training will be . On the contrary , if there is a significant gap , increasing the number of synthetic data may be completely useless , in which case we waste time and computational resources . A distinctive feature of syn2real is that we can control the process of generating data by ourselves . If a considerable gap exists , we can try to regenerate the data with a different setting . But how do we know that ? More specifically , in a standard learning setting without transfer , a “ power law ” -like relationship called a scaling law often holds between data size and generalization errors ( Rosenfeld et al. , 2019 ; Kaplan et al. , 2020 ) . Is there such a rule for pre-training ? In this study , we find that the generalization error on fine-tuning is explained by a simple scaling law , test error ' Dn−α + C , ( 1 ) where coefficient D > 0 and exponent α > 0 describe the convergence speed of pre-training , and constant C ≥ 0 determines the lower limit of the error . We refer to α as pre-training rate and C as transfer gap . We can predict how large the pre-training data should be to achieve the desired accuracy by estimating the parameters α , C from the empirical results . Additionally , we analyze the dynamics of transfer learning using the recent theoretical results based on the neural tangent kernel ( Nitanda & Suzuki , 2021 ) and confirm that the above law agrees with the theoretical analysis . We empirically validated our scaling law on various experimental settings of benchmark tasks , model sizes , and complexities of synthetic images . Our contributions are summarized as follows . • From empirical results and theoretical analysis , we elicit a law that describes how generalization scales in terms of data sizes on pre-training and fine-tuning . • We confirm that the derived law explains the empirical results for various settings in terms of pre-training/fine-tuning tasks , model size , and data complexity ( e.g. , Figure 1 ) . Furthermore , we demonstrate that we can use the estimated parameters in our scaling law to assess how much improvement we can expect from the pre-training procedure based on synthetic data . • We theoretically derive a generalization bound for a general transfer learning setting and confirm its agreement with our empirical findings . 2 RELATED WORK . Supervised pre-training for visual tasks Many empirical studies show that the performance at a fine-tuning task scales with pre-training data ( and model ) size . For example , Huh et al . ( 2016 ) studied the scaling behavior on ImageNet pre-trained models . Beyond ImageNet , Sun et al . ( 2017 ) studied the effect of pre-training with pseudo-labeled large-scale data and found a logarithmic scaling behavior . Similar results were observed by Kolesnikov et al . ( 2019 ) . Syn2real transfer The utility of synthetic images as supervised data for computer vision tasks has been continuously studied by many researchers ( Su et al. , 2015 ; Movshovitz-Attias et al. , 2016 ; Georgakis et al. , 2017 ; Tremblay et al. , 2018 ; Hinterstoisser et al. , 2019 ; Borrego et al. , 2018 ; Chen et al. , 2021 ; Newell & Deng , 2020 ; Devaranjan et al. , 2020 ; Mousavi et al. , 2020 ; Hodaň et al. , 2019 ) . These studies found positive evidence that using synthetic images is helpful to the fine-tuning task . In addition , they demonstrated how data complexity , induced by e.g. , light randomization , affects the final performance . For example , Newell & Deng ( 2020 ) investigated how the recent self-supervised methods perform well as a pre-training task to improve the performance of downstream tasks . In this paper , following this line of research , we quantify the effects under the lens of the scaling law ( 1 ) . Neural scaling laws The scaling behavior of generalization error , including some theoretical works ( e.g. , Amari et al. , 1992 ) , has been studied extensively . For modern neural networks , Hestness et al . ( 2017 ) empirically observed the power-law behavior of generalization for language , image , and speech domains with respect to the training size . Rosenfeld et al . ( 2019 ) constructed a predictive form for the power-law in terms of data and model sizes . Kaplan et al . ( 2020 ) pushed forward this direction in the language domain , describing that the generalization of transformers obeys the power law in terms of a compute budget in addition to data and model sizes . Since then , similar scaling laws have been discovered in other data domains ( Henighan et al. , 2020 ) . Several authors have also attempted theoretical analysis . Hutter ( 2021 ) analyzed a simple class of models that exhibits a power-law n−β in terms of data size n with arbitrary β > 0 . Bahri et al . ( 2021 ) addressed power laws under four regimes for model and data size . Note that these theoretical studies , unlike ours , are concerned with scaling laws in a non-transfer setting . Hernandez et al . ( 2021 ) studied the scaling laws for general transfer learning , which is the most relevant to this study . A key difference is that they focused on fine-tuning data size as a scaling factor , while we focus on pre-training data size . Further , they found scaling laws in terms of the transferred effective data , which is converted data amount necessary to achieve the same performance gain by pre-training . In contrast , Eq . ( 1 ) explains the test error with respect to the pre-training data size directly at a fine-tuning task . Other differences include task domains ( language vs. vision ) and architectures ( transformer vs. CNN ) . Theory of transfer learning Theoretical analysis of transfer learning has been dated back to decades ago ( Baxter , 2000 ) and has been pursued extensively . Among others , some recent studies ( Maurer et al. , 2016 ; Du et al. , 2020 ; Tripuraneni et al. , 2020 ) derived an error bound of a fine-tuning task in the multi-task scenario based on complexity analysis ; the bound takes an additive form O ( An−1/2 +Bs−1/2 ) , where n and s are the data size of pre-training and fine-tuning , respectively , with coefficients A and B. Neural network regression has been also discussed with this bound ( Tripuraneni et al. , 2020 ) . In the field of domain adaptation , error bounds have been derived in relation to the mismatch between source and target input distributions ( Ganin et al. , 2016 ; Acuna et al. , 2021 ) . They also proposed algorithms to adopt a new data domain . However , unlike in this study , no specific learning dynamics has been taken into account . In the area of hypothesis transfer learning ( Fei-Fei et al. , 2006 ; Yang et al. , 2007 ) , among many theoretical works , Du et al . ( 2017 ) has derived a risk bound for kernel ridge regression with transfer realized as the weights on the training samples . The obtained bound takes a similar form to our scaling law . However , the learning dynamics of neural networks initialized with a pre-trained model has never been explored in this context . 3 SCALING LAWS FOR PRE-TRAINING AND FINE-TUNING . The main obstacle in analyzing the test error is that we have to consider interplay between the effects of pre-training and fine-tuning . Let L ( n , s ) ≥ 0 be the test error of a fine-tuning task with pre-training data size n and fine-tuning data size s. As the simplest case , consider a fine-tuning task without pre-training ( n = 0 ) , which boils the transfer learning down to a standard learning setting . In this case , the prior studies of both classical learning theory and neural scaling laws tell us that the test error decreases polynomially1 with the fine-tuning data size s , that is , L ( 0 , s ) = Bs−β + E with decay rate β > 0 and irreducible loss E ≥ 0 . The irreducible loss E is the inevitable error given by 1For classification with strong low-noise condition , it is known that the decay rate can be exponential ( Nitanda & Suzuki , 2019 ) . However , we focus only on the polynomial decay without such strong condition in this paper . the best possible mapping ; it is caused by noise in continuous outputs or labels . Hereafter we assume E = 0 for brevity . 3.1 INDUCTION OF SCALING LAW WITH SMALL EMPIRICAL RESULTS To speculate a scaling law , we conducted preliminary experiments.2 We pre-trained ResNet-50 by a synthetic classification task and fine-tuned by ImageNet . Figure 2 ( a ) presents the log-log plot of error curves with respect to pre-training data size n , where each shape and color indicates a different fine-tuning size s. It shows that the pre-training effect diminishes for large n. In contrast , Figure 2 ( b ) presents the relations between the error and the fine-tuning size s with different n. It indicates the error drops straight down regardless of n , confirming the power-law scaling with respect to s. The above observations and the fact that L ( 0 , s ) decays polynomially are summarized as follows . Requirement 1. lims→∞ L ( n , s ) = 0 . Requirement 2. limn→∞ L ( n , s ) = const . Requirement 3 . L ( 0 , s ) = Bs−β . Requirements 1 and 3 suggest the dependency of n is embedded in the coefficient B = g ( n ) , i.e. , the pre-training and fine-tuning effects interact multiplicatively . To satisfy Requirement 2 , a reasonable choice for the pre-training effect is g ( n ) = n−α + γ ; the error decays polynomially with respect to n but has a plateau at γ . By combining these , we obtain L ( n , s ) = δ ( γ + n−α ) s−β , ( 2 ) where α , β > 0 are decay rates for pre-training and fine-tuning , respectively , γ ≥ 0 is a constant , and δ > 0 is a coefficient . The exponent β determines the convergence rate with respect to fine-tuning data size . From this viewpoint , δ ( γ + n−α ) is the coefficient factor to the power law . The influence of the pre-training appears in this coefficient , where the constant term δγ comes from the irreducible loss of the pre-training task and n−α expresses the effect of pre-training data size . The theoretical consideration in Section E.5 suggests that the rates α and β can depend on both the target functions of pre-training and fine-tuning as well as the learning rate .
This paper proposes a scaling law for transfer learning that takes into account the size of both the pretraining and finetuning datasets. They showed the parameters of the scaling law can be estimated and this can be used to approximate the performance of the model given the amount of pretraining data. The authors experiments are focused on the scenario where the pretranining dataset is synthetically generated.
SP:5bdbbd811a7a85540ccf3d99348aa96702191849
A Scaling Law for Syn-to-Real Transfer: How Much Is Your Pre-training Effective?
Synthetic-to-real transfer learning is a framework in which a synthetically generated dataset is used to pre-train a model to improve its performance on real vision tasks . The most significant advantage of using synthetic images is that the ground-truth labels are automatically available , enabling unlimited expansion of the data size without human cost . However , synthetic data may have a huge domain gap , in which case increasing the data size does not improve the performance . How can we know that ? In this study , we derive a simple scaling law that predicts the performance from the amount of pre-training data . By estimating the parameters of the law , we can judge whether we should increase the data or change the setting of image synthesis . Further , we analyze the theory of transfer learning by considering learning dynamics and confirm that the derived generalization bound is consistent with our empirical findings . We empirically validated our scaling law on various experimental settings of benchmark tasks , model sizes , and complexities of synthetic images . 1 INTRODUCTION . The success of deep learning relies on the availability of large data . If the target task provides limited data , the framework of transfer learning is preferably employed . A typical scenario of transfer learning is to pre-train a model for a similar or even different task and fine-tune the model for the target task . However , the limitation of labeled data has been the main bottleneck of supervised pre-training . While there have been significant advances in the representation capability of the models and computational capabilities of the hardware , the size and the diversity of the baseline dataset have not been growing as fast ( Sun et al. , 2017 ) . This is partially because of the sheer physical difficulty of collecting large datasets from real environments ( e.g. , the cost of human annotation ) . In computer vision , synthetic-to-real ( syn2real ) transfer is a promising strategy that has been attracting attention ( Su et al. , 2015 ; Movshovitz-Attias et al. , 2016 ; Georgakis et al. , 2017 ; Tremblay et al. , 2018 ; Hinterstoisser et al. , 2019 ; Borrego et al. , 2018 ; Chen et al. , 2021 ) . In syn2real , images used for pre-training are synthesized to improve the performance on real vision tasks . By combining various conditions , such as 3D models , textures , light conditions , and camera poses , we can synthesize an infinite number of images with ground-truth annotations . Syn2real transfer has already been applied in some real-world applications . Teed & Deng ( 2021 ) proposed a simultaneous localization and mapping ( SLAM ) system that was trained only with synthetic data and demonstrated state-of-the-art performance . The object detection networks for autonomous driving developed by Tesla was trained with 370 million images generated by simulation ( Karpathy , 2021 ) . The performance of syn2real transfer depends on the similarity between synthetic and real data . In general , the more similar they are , the stronger the effect of pre-training will be . On the contrary , if there is a significant gap , increasing the number of synthetic data may be completely useless , in which case we waste time and computational resources . A distinctive feature of syn2real is that we can control the process of generating data by ourselves . If a considerable gap exists , we can try to regenerate the data with a different setting . But how do we know that ? More specifically , in a standard learning setting without transfer , a “ power law ” -like relationship called a scaling law often holds between data size and generalization errors ( Rosenfeld et al. , 2019 ; Kaplan et al. , 2020 ) . Is there such a rule for pre-training ? In this study , we find that the generalization error on fine-tuning is explained by a simple scaling law , test error ' Dn−α + C , ( 1 ) where coefficient D > 0 and exponent α > 0 describe the convergence speed of pre-training , and constant C ≥ 0 determines the lower limit of the error . We refer to α as pre-training rate and C as transfer gap . We can predict how large the pre-training data should be to achieve the desired accuracy by estimating the parameters α , C from the empirical results . Additionally , we analyze the dynamics of transfer learning using the recent theoretical results based on the neural tangent kernel ( Nitanda & Suzuki , 2021 ) and confirm that the above law agrees with the theoretical analysis . We empirically validated our scaling law on various experimental settings of benchmark tasks , model sizes , and complexities of synthetic images . Our contributions are summarized as follows . • From empirical results and theoretical analysis , we elicit a law that describes how generalization scales in terms of data sizes on pre-training and fine-tuning . • We confirm that the derived law explains the empirical results for various settings in terms of pre-training/fine-tuning tasks , model size , and data complexity ( e.g. , Figure 1 ) . Furthermore , we demonstrate that we can use the estimated parameters in our scaling law to assess how much improvement we can expect from the pre-training procedure based on synthetic data . • We theoretically derive a generalization bound for a general transfer learning setting and confirm its agreement with our empirical findings . 2 RELATED WORK . Supervised pre-training for visual tasks Many empirical studies show that the performance at a fine-tuning task scales with pre-training data ( and model ) size . For example , Huh et al . ( 2016 ) studied the scaling behavior on ImageNet pre-trained models . Beyond ImageNet , Sun et al . ( 2017 ) studied the effect of pre-training with pseudo-labeled large-scale data and found a logarithmic scaling behavior . Similar results were observed by Kolesnikov et al . ( 2019 ) . Syn2real transfer The utility of synthetic images as supervised data for computer vision tasks has been continuously studied by many researchers ( Su et al. , 2015 ; Movshovitz-Attias et al. , 2016 ; Georgakis et al. , 2017 ; Tremblay et al. , 2018 ; Hinterstoisser et al. , 2019 ; Borrego et al. , 2018 ; Chen et al. , 2021 ; Newell & Deng , 2020 ; Devaranjan et al. , 2020 ; Mousavi et al. , 2020 ; Hodaň et al. , 2019 ) . These studies found positive evidence that using synthetic images is helpful to the fine-tuning task . In addition , they demonstrated how data complexity , induced by e.g. , light randomization , affects the final performance . For example , Newell & Deng ( 2020 ) investigated how the recent self-supervised methods perform well as a pre-training task to improve the performance of downstream tasks . In this paper , following this line of research , we quantify the effects under the lens of the scaling law ( 1 ) . Neural scaling laws The scaling behavior of generalization error , including some theoretical works ( e.g. , Amari et al. , 1992 ) , has been studied extensively . For modern neural networks , Hestness et al . ( 2017 ) empirically observed the power-law behavior of generalization for language , image , and speech domains with respect to the training size . Rosenfeld et al . ( 2019 ) constructed a predictive form for the power-law in terms of data and model sizes . Kaplan et al . ( 2020 ) pushed forward this direction in the language domain , describing that the generalization of transformers obeys the power law in terms of a compute budget in addition to data and model sizes . Since then , similar scaling laws have been discovered in other data domains ( Henighan et al. , 2020 ) . Several authors have also attempted theoretical analysis . Hutter ( 2021 ) analyzed a simple class of models that exhibits a power-law n−β in terms of data size n with arbitrary β > 0 . Bahri et al . ( 2021 ) addressed power laws under four regimes for model and data size . Note that these theoretical studies , unlike ours , are concerned with scaling laws in a non-transfer setting . Hernandez et al . ( 2021 ) studied the scaling laws for general transfer learning , which is the most relevant to this study . A key difference is that they focused on fine-tuning data size as a scaling factor , while we focus on pre-training data size . Further , they found scaling laws in terms of the transferred effective data , which is converted data amount necessary to achieve the same performance gain by pre-training . In contrast , Eq . ( 1 ) explains the test error with respect to the pre-training data size directly at a fine-tuning task . Other differences include task domains ( language vs. vision ) and architectures ( transformer vs. CNN ) . Theory of transfer learning Theoretical analysis of transfer learning has been dated back to decades ago ( Baxter , 2000 ) and has been pursued extensively . Among others , some recent studies ( Maurer et al. , 2016 ; Du et al. , 2020 ; Tripuraneni et al. , 2020 ) derived an error bound of a fine-tuning task in the multi-task scenario based on complexity analysis ; the bound takes an additive form O ( An−1/2 +Bs−1/2 ) , where n and s are the data size of pre-training and fine-tuning , respectively , with coefficients A and B. Neural network regression has been also discussed with this bound ( Tripuraneni et al. , 2020 ) . In the field of domain adaptation , error bounds have been derived in relation to the mismatch between source and target input distributions ( Ganin et al. , 2016 ; Acuna et al. , 2021 ) . They also proposed algorithms to adopt a new data domain . However , unlike in this study , no specific learning dynamics has been taken into account . In the area of hypothesis transfer learning ( Fei-Fei et al. , 2006 ; Yang et al. , 2007 ) , among many theoretical works , Du et al . ( 2017 ) has derived a risk bound for kernel ridge regression with transfer realized as the weights on the training samples . The obtained bound takes a similar form to our scaling law . However , the learning dynamics of neural networks initialized with a pre-trained model has never been explored in this context . 3 SCALING LAWS FOR PRE-TRAINING AND FINE-TUNING . The main obstacle in analyzing the test error is that we have to consider interplay between the effects of pre-training and fine-tuning . Let L ( n , s ) ≥ 0 be the test error of a fine-tuning task with pre-training data size n and fine-tuning data size s. As the simplest case , consider a fine-tuning task without pre-training ( n = 0 ) , which boils the transfer learning down to a standard learning setting . In this case , the prior studies of both classical learning theory and neural scaling laws tell us that the test error decreases polynomially1 with the fine-tuning data size s , that is , L ( 0 , s ) = Bs−β + E with decay rate β > 0 and irreducible loss E ≥ 0 . The irreducible loss E is the inevitable error given by 1For classification with strong low-noise condition , it is known that the decay rate can be exponential ( Nitanda & Suzuki , 2019 ) . However , we focus only on the polynomial decay without such strong condition in this paper . the best possible mapping ; it is caused by noise in continuous outputs or labels . Hereafter we assume E = 0 for brevity . 3.1 INDUCTION OF SCALING LAW WITH SMALL EMPIRICAL RESULTS To speculate a scaling law , we conducted preliminary experiments.2 We pre-trained ResNet-50 by a synthetic classification task and fine-tuned by ImageNet . Figure 2 ( a ) presents the log-log plot of error curves with respect to pre-training data size n , where each shape and color indicates a different fine-tuning size s. It shows that the pre-training effect diminishes for large n. In contrast , Figure 2 ( b ) presents the relations between the error and the fine-tuning size s with different n. It indicates the error drops straight down regardless of n , confirming the power-law scaling with respect to s. The above observations and the fact that L ( 0 , s ) decays polynomially are summarized as follows . Requirement 1. lims→∞ L ( n , s ) = 0 . Requirement 2. limn→∞ L ( n , s ) = const . Requirement 3 . L ( 0 , s ) = Bs−β . Requirements 1 and 3 suggest the dependency of n is embedded in the coefficient B = g ( n ) , i.e. , the pre-training and fine-tuning effects interact multiplicatively . To satisfy Requirement 2 , a reasonable choice for the pre-training effect is g ( n ) = n−α + γ ; the error decays polynomially with respect to n but has a plateau at γ . By combining these , we obtain L ( n , s ) = δ ( γ + n−α ) s−β , ( 2 ) where α , β > 0 are decay rates for pre-training and fine-tuning , respectively , γ ≥ 0 is a constant , and δ > 0 is a coefficient . The exponent β determines the convergence rate with respect to fine-tuning data size . From this viewpoint , δ ( γ + n−α ) is the coefficient factor to the power law . The influence of the pre-training appears in this coefficient , where the constant term δγ comes from the irreducible loss of the pre-training task and n−α expresses the effect of pre-training data size . The theoretical consideration in Section E.5 suggests that the rates α and β can depend on both the target functions of pre-training and fine-tuning as well as the learning rate .
This paper postulates a scaling law for pre-training and transfer learning via fine-tuning. They empirically postulate a law and also theoretically show that in a simpler setting with assumptions, a similar law should hold. The paper is written and experiments are done in a synthetic to real transfer setting. Experiments are done by pre-training on a synthetic dataset made using BlenderProc and transferring to real data ranging classification, object detection and semantic segmentation. They find that parameters of their scaling law can be estimated to find very good fits to empirical error across all the different transfer tasks.
SP:5bdbbd811a7a85540ccf3d99348aa96702191849
Federated Learning with Heterogeneous Architectures using Graph HyperNetworks
1 INTRODUCTION . Federated learning ( FL ) ( McMahan et al. , 2017a ; Yang et al. , 2019 ; Konečný et al. , 2015 ; 2017 ) allows multiple clients to collaboratively train a strong model that benefits from their individual data , without having to share that data . In particular , aggregating the parameters of locally trained models alleviates the need to share raw data , thereby preserving privacy to some extent and reducing the volume of data transferred . FL allows safe and efficient learning from edge nodes like smartphones , self-driving cars , and medical systems . While successful , FL approaches have one key limitation : all clients need to share the same network architecture . As a result , they are not applicable to many important cases that require learning with heterogeneous architectures . For example , clients often run different networks on their edge devices , due to computational limitations or OS versions . Also , in some cases , clients want to keep their network architectures private , for instance , when different organizations wish to benefit from each other ’ s access to data without having to share their proprietary architectures . In all these cases , one is interested in federated learning with heterogeneous architectures ( FLHA ) . Unfortunately , current FL approaches do not support mixtures of different architectures , but require that clients share the same model architecture . As an illustrative example , consider Federated Averaging ( FedAvg ) , perhaps the most widely used FL technique , where model parameters of different clients are averaged on a shared server McMahan et al . ( 2017a ) . Unless all clients share the same number of parameters and layer structure , it is not clear how to average their weights . The problem of aggregating weights across different architecture is not specific to FedAvg , but also exists with other FL approaches . This limitation raises the fundamental research question : Can federated learning handle heterogeneous architectures ? And can it be achieved with clients keeping their architectures undisclosed ? A possible alternative to FLHA could be achieved through knowledge distillation . For example , Lin et al . ( 2020 ) suggested distilling knowledge from ensembles of client models on a server using unlabeled or synthetic datasets . Although this solution could be beneficial in certain setups , it has two major limitations : ( 1 ) Client architectures must be disclosed and ( 2 ) external data must be provided . We could also design a distillation-based approach to FLHA that does not require clients to share their architectures . First , train a shared model using a standard FL approach . Once trained , distill knowledge from the shared model to train private client models using each client local data and architecture . While this solution can address the two limitations discussed above , it also has two drawbacks : ( 1 ) Training on a large shared architecture may not be feasible for clients with limited computing power ; ( 2 ) Local distillation using only local data may overfit and lose the benefits of FL . Finally , and perhaps most importantly , this approach bypasses , but does not addresses , the fundamental question : How can we learn to use knowledge about architectures when transferring information about model parameters across architectures . In this work , we propose a general approach to FLHA based on a hypernetwork ( HN ) ( Ha et al. , 2016 ) that acts as the knowledge aggregator . The hypernetwork takes as input a description of a client architecture and predicts weights to populate that architecture . Unlike FedAvg , which aggregates weights in a predefined way , the hypernetwork implicitly learns an aggregation operator from data and can therefore be significantly more powerful . For providing an architecture descriptor to the HN , we propose to model client architectures as graphs where nodes represent both parametric and non-parametric layers ( e.g. , a convolutional layer or a summation operation ) and directional edges represent network connectivity such as skip connections . To allow the hypernetwork to process any graph , regardless of its size or topology , we use a graph hypernetwork ( GHN ) similar to Zhang et al . ( 2020 ) . We therefore name our approach FLHA-GHN . The GHN operates on a graph representation of the architecture and predicts layer parameters at each node that represents a parametric layer . At each communication round , clients train local copies of the hypernetwork weights using their own architectures and data ( Fig . 1 ) . The updated weights are sent by the clients to the server where they are aggregated . Since different architectures have different layer compositions , representing layers as nodes allows meaningful knowledge aggregation across architectures . This forms an improved hypernetwork model that uses knowledge gleaned from different network types and datasets , to populate them with improved parameters . Critically , client architectures are not communicated . The ability to generalize across different client architectures is crucial for successful FLHA . Recent results in theory of Graph Neural Networks ( GNNs ) Yehudai et al . ( 2021 ) suggest that GNNs can indeed generalize across input distributions . We discuss this issue and demonstrate experimentally that our approach generalizes to unseen architectures in certain cases – allowing clients to modify their architectures after federation has occurred , without the need for client-wide FL retraining . In an extensive experimental study on three image datasets , we show that applying FLHA-GHN to FL with heterogeneous-architecture clients outperforms a distillation-based baseline , and a non-GNN based HN architecture ( Shamsian et al. , 2021 ) , by a large margin , and that margin generally grows when the amount of local data decreases . We further show that FLHA-GHN provides a large benefit in generalization to unseen architectures , improving the accuracy of converged models and drastically shortening the time needed for convergence . Such generalization could allow new clients , with new architectures , to benefit from models trained on different data and different architectures , lowering the bar for deploying new , personalized , architectures . 2 PREVIOUS WORK . Federated Learning . Federated learning McMahan et al . ( 2017a ) ; Kairouz et al . ( 2019 ) ; Yang et al . ( 2019 ) ; Mothukuri et al . ( 2021 ) is a learning setup in which multiple clients collaboratively train individual models while trying to benefit from the data of all the clients without sharing their data . The most well known FL technique is federated averaging , where all clients use the same architecture , which is trained privately and then sent to the server and averaged with other locally trained models . Many recent works have focused on improving privacy McMahan et al . ( 2017b ) ; Agarwal et al . ( 2018 ) ; Li et al . ( 2019 ) ; Zhu et al . ( 2020 ) and communication efficiency Chen et al . ( 2021 ) ; Agarwal et al . ( 2018 ) ; Chen et al . ( 2021 ) ; Dai et al . ( 2019 ) ; Stich ( 2018 ) . Another widely studied setup is the heterogeneous client data setup Hanzely & Richtárik ( 2020 ) ; Zhao et al . ( 2018 ) ; Sahu et al . ( 2018 ) ; Karimireddy et al . ( 2020 ) ; Zhang et al . ( 2021 ) . To solve this problem , personalized FL ( pFL ) methods were proposed that adapt global models to specific clients Kulkarni et al . ( 2020 ) . Most related to the current work is the recent work of Shamsian et al . ( 2021 ) that also used hyper-networks . Their method considers a simple case of clients with varying architectures , where three pre-defined simple architectures are “ hard '' encoded into the structure of the hypernetwork . In contrast , our framework allows clients to use a variety of layers and computational graphs , and facilitates better weight sharing as the same layers are used in different architectures . In the experimental section 5 we show that our approach outperforms Shamsian et al . ( 2021 ) by large margins . Hypernetworks . HyperNetworks ( HN ) Klein et al . ( 2015 ) ; Ha et al . ( 2016 ) are neural networks that predict input conditioned weights for another neural network that performs the task of interest . HNs are widely used in many learning tasks such as generation of 3D content Littwin & Wolf ( 2019 ) ; Sitzmann et al . ( 2019 ) , neural architecture search Brock et al . ( 2017 ) and language modelling Suarez ( 2017 ) . More relevant to our work are Graph Hypernetworks ( GHNs ) - hypernetworks that take graphs as an input . Nachmani & Wolf ( 2020 ) used GHNs for molecule property prediction . Even more relevant is the use of GHNs for Neural Architecture Search ( NAS ) Zhang et al . ( 2020 ) . In our work , we adapt GHNs to FLHA with unique challenges arising from the problem setup . 3 PROBLEM DEFINITION . Traditional FL addresses the setup of C clients working together to improve their local models , while each client c ∈ { 1 , . . . , C } has access only to its local data samples { ( xcj , ycj ) } ncj=1 , sampled from client specific data distributions Pc , c = 1 , . . . , C. In this paper , we generalize FL to FL with Heterogeneous Architectures ( FLHA ) . In this setup , clients can use different network architectures f1 ( · ; θ1 ) , f2 ( · ; θ2 ) , . . . , fC ( · ; θC ) . Here , fc ( · ; θc ) is a neural architecture from some predefined family of models with parameters θc ∈ Rmc ( see further discussion on architecture families in Section 4 ) . Moreover , we assume that all clients are connected to a server , and that the clients can share information among themselves only through the server . Importantly , in FLHA we are interested in the setup where both the architectures and the data can not be transferred due to privacy concerns . Our goal is to solve the following minimization problem : ( θ∗1 , ... , θ ∗ C ) = argmin ( θ1 , ... , θC ) C∑ c=1 E ( x , y ) ∼Pc ` ( fc ( x ; θc ) , y ) , ( 1 ) for a suitable loss function ` ( y , y′ ) . 4 APPROACH . 4.1 OVERVIEW . Standard FL methods rely on aggregating model parameters and are not directly applicable when clients use different architectures . In our FLHA setup , the parameter vectors θc of different clients have different shapes and sizes , and as a result , a direct aggregation can be meaningless or not well defined . To address this issue , we re-parameterize the weights θc of a model c as the output of a hypernetwork . The hypernetwork serves as a trainable knowledge aggregator . The parameters of this operator are learned from data using updates from all clients . Since the output of the hypernetwork must fit a given architecture fc , the hypernetwork should take as input a representation of fc . Here , we advocate graphs as a natural representation for neural architectures ( in agreement with Zhang et al . ( 2020 ) ) and apply graph hypernetworks to process them . The workflow of training our FLHA-GHN is illustrated in Figure 1 . At each communication round , several steps are followed . ( 1 ) First , a server shares the current weights of the GHN , W , with all clients ; ( 2 ) Each client c uses the GHN to predict weights θc for its own specific architecture fc , and updates the GHN weights Wc locally using its own architecture and data ; ( 3 ) Each client sends the locally updated GHN weights to the server ; ( 4 ) Weight averaging is performed on the server .
This paper aims to train a GHN model that can predict weights of each layer. The architecture is represented in adjacent matrix format, where a node represents one layer and an edge indicates whether two nodes are connected in given architecture. Each type of layer is represented with a one-hot vector as their node attribute. The outputs are predicted weights of the corresponding layer. Finally, a task-specific object function is minimized by updating the GHN.
SP:34e3fdc7b317dbac05df5db0fc75ce396e324c10
Federated Learning with Heterogeneous Architectures using Graph HyperNetworks
1 INTRODUCTION . Federated learning ( FL ) ( McMahan et al. , 2017a ; Yang et al. , 2019 ; Konečný et al. , 2015 ; 2017 ) allows multiple clients to collaboratively train a strong model that benefits from their individual data , without having to share that data . In particular , aggregating the parameters of locally trained models alleviates the need to share raw data , thereby preserving privacy to some extent and reducing the volume of data transferred . FL allows safe and efficient learning from edge nodes like smartphones , self-driving cars , and medical systems . While successful , FL approaches have one key limitation : all clients need to share the same network architecture . As a result , they are not applicable to many important cases that require learning with heterogeneous architectures . For example , clients often run different networks on their edge devices , due to computational limitations or OS versions . Also , in some cases , clients want to keep their network architectures private , for instance , when different organizations wish to benefit from each other ’ s access to data without having to share their proprietary architectures . In all these cases , one is interested in federated learning with heterogeneous architectures ( FLHA ) . Unfortunately , current FL approaches do not support mixtures of different architectures , but require that clients share the same model architecture . As an illustrative example , consider Federated Averaging ( FedAvg ) , perhaps the most widely used FL technique , where model parameters of different clients are averaged on a shared server McMahan et al . ( 2017a ) . Unless all clients share the same number of parameters and layer structure , it is not clear how to average their weights . The problem of aggregating weights across different architecture is not specific to FedAvg , but also exists with other FL approaches . This limitation raises the fundamental research question : Can federated learning handle heterogeneous architectures ? And can it be achieved with clients keeping their architectures undisclosed ? A possible alternative to FLHA could be achieved through knowledge distillation . For example , Lin et al . ( 2020 ) suggested distilling knowledge from ensembles of client models on a server using unlabeled or synthetic datasets . Although this solution could be beneficial in certain setups , it has two major limitations : ( 1 ) Client architectures must be disclosed and ( 2 ) external data must be provided . We could also design a distillation-based approach to FLHA that does not require clients to share their architectures . First , train a shared model using a standard FL approach . Once trained , distill knowledge from the shared model to train private client models using each client local data and architecture . While this solution can address the two limitations discussed above , it also has two drawbacks : ( 1 ) Training on a large shared architecture may not be feasible for clients with limited computing power ; ( 2 ) Local distillation using only local data may overfit and lose the benefits of FL . Finally , and perhaps most importantly , this approach bypasses , but does not addresses , the fundamental question : How can we learn to use knowledge about architectures when transferring information about model parameters across architectures . In this work , we propose a general approach to FLHA based on a hypernetwork ( HN ) ( Ha et al. , 2016 ) that acts as the knowledge aggregator . The hypernetwork takes as input a description of a client architecture and predicts weights to populate that architecture . Unlike FedAvg , which aggregates weights in a predefined way , the hypernetwork implicitly learns an aggregation operator from data and can therefore be significantly more powerful . For providing an architecture descriptor to the HN , we propose to model client architectures as graphs where nodes represent both parametric and non-parametric layers ( e.g. , a convolutional layer or a summation operation ) and directional edges represent network connectivity such as skip connections . To allow the hypernetwork to process any graph , regardless of its size or topology , we use a graph hypernetwork ( GHN ) similar to Zhang et al . ( 2020 ) . We therefore name our approach FLHA-GHN . The GHN operates on a graph representation of the architecture and predicts layer parameters at each node that represents a parametric layer . At each communication round , clients train local copies of the hypernetwork weights using their own architectures and data ( Fig . 1 ) . The updated weights are sent by the clients to the server where they are aggregated . Since different architectures have different layer compositions , representing layers as nodes allows meaningful knowledge aggregation across architectures . This forms an improved hypernetwork model that uses knowledge gleaned from different network types and datasets , to populate them with improved parameters . Critically , client architectures are not communicated . The ability to generalize across different client architectures is crucial for successful FLHA . Recent results in theory of Graph Neural Networks ( GNNs ) Yehudai et al . ( 2021 ) suggest that GNNs can indeed generalize across input distributions . We discuss this issue and demonstrate experimentally that our approach generalizes to unseen architectures in certain cases – allowing clients to modify their architectures after federation has occurred , without the need for client-wide FL retraining . In an extensive experimental study on three image datasets , we show that applying FLHA-GHN to FL with heterogeneous-architecture clients outperforms a distillation-based baseline , and a non-GNN based HN architecture ( Shamsian et al. , 2021 ) , by a large margin , and that margin generally grows when the amount of local data decreases . We further show that FLHA-GHN provides a large benefit in generalization to unseen architectures , improving the accuracy of converged models and drastically shortening the time needed for convergence . Such generalization could allow new clients , with new architectures , to benefit from models trained on different data and different architectures , lowering the bar for deploying new , personalized , architectures . 2 PREVIOUS WORK . Federated Learning . Federated learning McMahan et al . ( 2017a ) ; Kairouz et al . ( 2019 ) ; Yang et al . ( 2019 ) ; Mothukuri et al . ( 2021 ) is a learning setup in which multiple clients collaboratively train individual models while trying to benefit from the data of all the clients without sharing their data . The most well known FL technique is federated averaging , where all clients use the same architecture , which is trained privately and then sent to the server and averaged with other locally trained models . Many recent works have focused on improving privacy McMahan et al . ( 2017b ) ; Agarwal et al . ( 2018 ) ; Li et al . ( 2019 ) ; Zhu et al . ( 2020 ) and communication efficiency Chen et al . ( 2021 ) ; Agarwal et al . ( 2018 ) ; Chen et al . ( 2021 ) ; Dai et al . ( 2019 ) ; Stich ( 2018 ) . Another widely studied setup is the heterogeneous client data setup Hanzely & Richtárik ( 2020 ) ; Zhao et al . ( 2018 ) ; Sahu et al . ( 2018 ) ; Karimireddy et al . ( 2020 ) ; Zhang et al . ( 2021 ) . To solve this problem , personalized FL ( pFL ) methods were proposed that adapt global models to specific clients Kulkarni et al . ( 2020 ) . Most related to the current work is the recent work of Shamsian et al . ( 2021 ) that also used hyper-networks . Their method considers a simple case of clients with varying architectures , where three pre-defined simple architectures are “ hard '' encoded into the structure of the hypernetwork . In contrast , our framework allows clients to use a variety of layers and computational graphs , and facilitates better weight sharing as the same layers are used in different architectures . In the experimental section 5 we show that our approach outperforms Shamsian et al . ( 2021 ) by large margins . Hypernetworks . HyperNetworks ( HN ) Klein et al . ( 2015 ) ; Ha et al . ( 2016 ) are neural networks that predict input conditioned weights for another neural network that performs the task of interest . HNs are widely used in many learning tasks such as generation of 3D content Littwin & Wolf ( 2019 ) ; Sitzmann et al . ( 2019 ) , neural architecture search Brock et al . ( 2017 ) and language modelling Suarez ( 2017 ) . More relevant to our work are Graph Hypernetworks ( GHNs ) - hypernetworks that take graphs as an input . Nachmani & Wolf ( 2020 ) used GHNs for molecule property prediction . Even more relevant is the use of GHNs for Neural Architecture Search ( NAS ) Zhang et al . ( 2020 ) . In our work , we adapt GHNs to FLHA with unique challenges arising from the problem setup . 3 PROBLEM DEFINITION . Traditional FL addresses the setup of C clients working together to improve their local models , while each client c ∈ { 1 , . . . , C } has access only to its local data samples { ( xcj , ycj ) } ncj=1 , sampled from client specific data distributions Pc , c = 1 , . . . , C. In this paper , we generalize FL to FL with Heterogeneous Architectures ( FLHA ) . In this setup , clients can use different network architectures f1 ( · ; θ1 ) , f2 ( · ; θ2 ) , . . . , fC ( · ; θC ) . Here , fc ( · ; θc ) is a neural architecture from some predefined family of models with parameters θc ∈ Rmc ( see further discussion on architecture families in Section 4 ) . Moreover , we assume that all clients are connected to a server , and that the clients can share information among themselves only through the server . Importantly , in FLHA we are interested in the setup where both the architectures and the data can not be transferred due to privacy concerns . Our goal is to solve the following minimization problem : ( θ∗1 , ... , θ ∗ C ) = argmin ( θ1 , ... , θC ) C∑ c=1 E ( x , y ) ∼Pc ` ( fc ( x ; θc ) , y ) , ( 1 ) for a suitable loss function ` ( y , y′ ) . 4 APPROACH . 4.1 OVERVIEW . Standard FL methods rely on aggregating model parameters and are not directly applicable when clients use different architectures . In our FLHA setup , the parameter vectors θc of different clients have different shapes and sizes , and as a result , a direct aggregation can be meaningless or not well defined . To address this issue , we re-parameterize the weights θc of a model c as the output of a hypernetwork . The hypernetwork serves as a trainable knowledge aggregator . The parameters of this operator are learned from data using updates from all clients . Since the output of the hypernetwork must fit a given architecture fc , the hypernetwork should take as input a representation of fc . Here , we advocate graphs as a natural representation for neural architectures ( in agreement with Zhang et al . ( 2020 ) ) and apply graph hypernetworks to process them . The workflow of training our FLHA-GHN is illustrated in Figure 1 . At each communication round , several steps are followed . ( 1 ) First , a server shares the current weights of the GHN , W , with all clients ; ( 2 ) Each client c uses the GHN to predict weights θc for its own specific architecture fc , and updates the GHN weights Wc locally using its own architecture and data ; ( 3 ) Each client sends the locally updated GHN weights to the server ; ( 4 ) Weight averaging is performed on the server .
This paper proposes a method to tackle the problem of architecture-agnostic federated learning. The primary motivation of this paper is that in some cases of federated learning, different participants may need to use different neural architectures and may not want the exact architecture to be known. To this end, the authors propose a method based on graph hypernetworks. The main insight of this method is that neural architectures can be represented as graphs and their weights can be outputs of a larger GNN. Empirically, the proposed method compares favorably against state-of-the-arts.
SP:34e3fdc7b317dbac05df5db0fc75ce396e324c10
Hypothesis Driven Coordinate Ascent for Reinforcement Learning
1 INTRODUCTION . In recent years , Reinforcement Learning ( RL ) techniques have contributed to striking advancements in artificial intelligence . From mastering complicated games like Go ( Silver et al. , 2017 ) to autonomous helicopter flight ( Ng et al. , 2006 ) , RL agents continue to make impressive strides . RL is primarily concerned with discovering a policy that encodes a mapping from states to actions that optimizes rewards within a given environment . This work proposes a method for learning policies in stochastic environments where agent performance is evaluated via a black box function . Much of RL focuses on Markov Decision Processes ( MDPs ) , where an agent ’ s actions are chosen to maximize the expected value of a reward function over time ( Russell & Norvig , 2019 ) . Due to the inherent variability within real-world problem domains , the outcome of these actions depends on the action taken and noise within the environment . MDPs treat time as a discrete quantity , where actions are chosen at each time step based on a learned policy that leads the agent to a new state . Different states correspond to specific rewards , which are used to refine the policy parameters . Typically , parameter updates are taken in the direction that maximizes the expected reward and often involve calculating ( or approximating ) gradients . The function of interest is opaque for black box optimization ( BBO ) ; only point-wise evaluations are possible and the true gradient is inaccessible . As a result , gradient-based techniques must approximate the true gradient through function sampling and calculating mean and variance estimates . Calculating reliable estimates can be difficult in practice and is made especially challenging by the stochastic nature of MDPs . While various gradient-based BBO methods have found success ( Mania et al. , 2018 ; Salimans et al. , 2017 ; Bibi et al. , 2020 ) , they may converge to local optima and can be slow to converge for complex domains . As an alternative to gradient approximations , we propose Hypothesis-test Driven Coordinate Ascent ( HDCA ) , which leverages the use of derivative-free optimization ( DFO ) techniques operating on a black box function . Our first major insight is to leverage coordinate ascent to decompose the large search space of the original policy optimization problem into a sequence of sub-problems with smaller search spaces ( Wright , 2015 ) . By considering simple enough sub-problems , we are able to optimize each iterate using a basic random search with uniform sampling from a defined search range . This process involves generating batches of candidate solutions at each iteration and updating the policy to the best performing candidate . While there are numerous methods to explore the high-dimensional policy space , other more informed search policies , such as Importance Sampling ( Bibi et al. , 2020 ) , involve significant computational overhead as well as additional reliance on approximated gradients . Uniform sampling avoids these complications and allows us to take full advantage of modern advances in parallel and distributed computing . While sufficiently exploring the perturbation space may require generating several candidate solutions , each model evaluation may be done entirely in parallel of the other candidates . Therefore , with appropriate computational resources , our method can converge in fewer iterations than other current methods . Our second major insight is to account for the stochastic nature of our optimization problem . That is , the cumulative reward is a stochastic quantity whose distribution depends on the stochastic policy and environment . Thus , one must estimate the expected cumulative reward with finite samples of rollouts . This leads to variance and uncertainty about true expectations of cumulative rewards for candidate solutions . The stochastic nature ( and finite sample estimation ) of the cumulative reward criterion has been largely ignored by previous BBO approaches , where the mean over rollouts is ( incorrectly ) taken as the ground truth criterion . In practice this may result in updates that happen to perform better by chance , rather than due to policy improvement . Here , we develop a principled approach that accounts for stochasticity with one-sided , two-sample hypothesis tests to update policy parameters based on statistical significance . Lastly , we perform several experiments and ablations to empirically study HDCA . When evaluated on a sample of RL control problems , we found HDCA to consistently converge to a solution in fewer iterations than other comparable methods . Given HDCA ’ s highly scalable nature , the reduced number of iterations required to find a solution translates to quicker training time given adequate computational resources . 2 METHODS . 2.1 MARKOV DECISION PROCESS . An MDP describes an environment where an agent acts within a fully observable , stochastic domain to maximize its expected cumulative discounted reward ( Russell & Norvig , 2019 ) . The environment can be described as a set of states , S , along with a set of actions , A , that can be taken to transition between states . The transition function p ( s′|s , a ) describes the probability that taking action a in state s leads to state s′ , and the reward function R ( s , a ) describes the reward received for taking action a in state s. A solution to an MDP is represented as a policy πθ , encoded by parameters θ , that maps states to a distribution over actions in a way that maximizes accumulated rewards . This paper focuses on environments where the reward function acts as a black box . 2.2 COORDINATE ASCENT . Our first insight is to use coordinate ascent to decompose the problem of optimizing the large policy parameter space into a sequence of smaller , more feasible , sub-problems . Coordinate ascent maximizes a function f ( θ ) by successively maximizing sub-problems with respect to varying a single coordinate at a time . Similarly , block coordinate ascent iterates through blocks of coordinates and updates a subset of multiple coordinates sequentially ( Tseng , 2001 ) ( see Algorithm 1 ) . Choose θ0 ∈ Rd ; Set i← 0 ; repeat Given θi , choose a block of coordinates b in the set { 1 , ... , d } and compute new iterate θi+1 that satisfies ; θi+1b ∈ arg max θb f ( θp , θb ) ( 1 ) θi+1p = θ i p , ∀p /∈ b ( 2 ) i← i+ 1 ; until termination test satisfied ; Algorithm 1 : Block Coordinate Ascent We approximate coordinate ascent optimization to maximize policy parameters θ without gradients . To do so , we numerically optimize the sub-problem for a block of coordinates , rather than analyt- ically solving it . If the dimension of the block of coordinates being updated is small , even simple numerical optimization techniques yield good estimates of optimal updates . We propose approximate block coordinate ascent ( ABCA ) , which simply performs a random search over the coordinates of the block that is being maximized ( see Algorithm 2 ) . The primary benefit of utilizing ABCA is that optimization occurs without the use of gradient approximation , which can be challenging even for deterministic functions . When applied to reinforcement learning , the difficulties are exacerbated by the stochastic dynamics of many real-world RL problems , which lead to noisy function evaluations and rough approximations of the gradient . When combined with a potentially non-convex reward function , following an inaccurate gradient can lead to sub-optimal solutions and slow convergence . ABCA permits us to avoid gradient estimation altogether and instead make updates using simple global numerical techniques that are feasible for the smaller sub-problems . We can see from Algorithm 2 that the update rule simply takes the policy corresponding to the highest empirical average cumulative reward within each batch of perturbed θ values for a block of coordinates . This differs from typical gradient estimation , where the update rule is implemented as a weighted sum across the batch of perturbed coordinates . For example , in the popular Evolutionary Strategies approach discussed in Sec . 3 , updates are computed via an average ( Eq . 12 ) over perturbations . Due to the concentration of empirical means , this results in diminishing returns as one increases the number of perturbations per update ( iteration ) . In contrast , ABCA considers a maximum over perturbations , and thus is able to see greater returns as we increase the number of perturbations considered per update . As one may compute trajectories , t ( j ) m , and cumulative rewards , R ( t ( j ) m ) , in parallel , the better utility of perturbations implies that ABCA is able to take better advantage of the benefits of distributed computing compared to gradient estimation techniques . Input : Initial policy parameters θ0 ∈ Rd ; Hyperparameters : Search range s , number of noise samples n , Number of coordinates per block c , number of rollouts in mean calculation M ; Set i← 0 ; repeat Let coordinate block b consist of c randomly selected coordinates from the set { 1 , ... , d } ; Sample j , k ∼U ( s ) for j = 1 , ... , n , and k ∈ b ; Let θ̂ ( j ) be the jth candidate optimizer ( perturbation ) over block b with values : ∀q ∈ { 1 , . . . , d } \ b , θ̂ ( j ) q ← θiq , ∀k ∈ b , θ̂ ( j ) k ← θ i k + j , k ( 3 ) Using the policy samples ai ∼ πθ̂ ( j ) ( si ) and environment samples si+1 ∼ p ( si+1 | si , ai ) , generate M rollouts t ( j ) m , and compute respective cumulative rewards R ( t ( j ) m ) , ∀m ∈ { 1 , . . . , M } : t ( j ) m ← { ( s ( j ) m,0 , a ( j ) m,0 ) , ( s ( j ) m,1 , a ( j ) m,1 ) , . . . } R ( t ( j ) m ) = ∑ ( s , a ) ∈t ( j ) m R ( s , a ) ( 4 ) Update θ based on the empirical average cumulative rewards R̄ ( θ̂ ( j ) ) ← 1M ∑M m=1 R ( t ( j ) m ) : j← arg max j R̄ ( θ̂ ( j ) ) , θi+1 ← θ̂ ( j ) ( 5 ) i← i+ 1 ; until termination test satisfied ; Algorithm 2 : Approximate Block Coordinate Ascent ( ABCA ) 2.3 HYPOTHESIS TESTING . Our second insight is to note that , unlike deterministic optimization , the stochastic nature of our optimization problem ( through the environment dynamics and stochastic policy ) requires a careful consideration of variance over expected rewards when comparing different perturbations in ABCA iterates . That is , as we are enumerating random policies , it may be due to chance , rather than an improvement in parameters , that the average reward for a candidate optimizer perturbation is greater . Below we propose to account for the stochasticity of expected reward approximations using hypothesis testing . Given the variance in the sequence of states encountered during policy rollouts , the cumulative reward can be highly variable , and thus selecting the policy corresponding to the empirical maximum reward may not lead to improved overall performance . To generate a more accurate assessment of a given model ’ s expected reward , we make multiple function evaluations for each perturbed θ̂ ( j ) ( see Eq . 4 ) and compute corresponding mean and variance estimates from the set of policy rollouts : R̄ ( θ̂ ( j ) ) ← 1 M M∑ m=1 R ( t ( j ) m ) , σ 2 R ( θ̂ ( j ) ) ← 1 M M∑ m=1 ( R ( t ( j ) m ) − R̄ ( θ̂ ( j ) ) ) 2 . ( 6 ) We are ultimately interested in determining if there is a perturbed model that is statistically demonstrated to yield a higher expected reward than our current model , thus a one-sided , two-sample t-test is best suited for this task ( NIST/SEMATECH , 2003 ) . Since our policy perturbations at any given iteration are selected from a uniform distribution , it is likely that some of the perturbed models will lead to worse overall performance . Additionally , since function evaluations represent independent environment rollouts , the data in our two-sample t-test is unpaired . Operating under the likelihood that the variances of the two samples are not equivalent , the test statistic , T , for the two-sample t-test is calculated as : T = ( µ1 − µ2 ) / √ σ21/N1 + σ 2 2/N2 where µi , σi , and Ni correspond to the ith sample ’ s mean , standard deviation , and sample size , respectively ( Cressie & Whitford , 1986 ) . In our method , we seek to compare the rewards of candidate policy parameters θ̂ ( j ) to the rewards of the current iterate θi ; thus , test statistics are derived from the respective means and variances for reward : Tj = R̄ ( θ̂ ( j ) ) − R̄ ( θi ) √ σ2 R ( θ̂ ( j ) ) /M + σ2R ( θi ) /M ( 7 ) The null hypothesis H0 for this test is that the expected performance of the current policy is greater than or equal to the perturbed policy that is being compared . Since we are only interested in models with higher expected rewards , we reject the null hypothesis if Tj > t1−α , νj , ( 8 ) where t corresponds to the critical value of the t distribution with significance threshold α and νj degrees of freedom , calculated as νj = ( σ2 R ( θ̂ ( j ) ) /M + σ2R ( θi ) /M ) 2 ( σ2 R ( θ̂ ( j ) ) /M ) 2/ ( M − 1 ) + ( σ2R ( θi ) /M ) 2/ ( M − 1 ) . ( 9 ) Finally , the update step concludes by updating the model to the perturbed θ̂ with the highest degree of statistical evidence to outperform the previous iteration ’ s model , if such a model is found ( or passes through the previous iterate , otherwise ) . Thus , HDCA considers a test-based update , which replaces the update in ABCA ( Eq . 5 ) with : j← arg max j Tj − t1−α , νj , θi+1 ← θ̂ ( j ) if Tj − t1−α , νj > 0 , else θi . ( 10 ) That is , HDCA implements ABCA with an update that is based on statistical significance for better policy updates ( see appendix for full statement of HDCA algorithm ) . It is important to note that the two-sample t-test has a parameter for the significance level α that is likely to be problem specific . In the realm of hypothesis testing , this parameter controls whether or not the null hypothesis gets rejected . When applied to our optimization scheme , this parameter determines if a policy demonstrates enough statistical evidence to be considered a more optimal policy than the previous iteration . Therefore , this parameter can be used to control the degree of policy exploration , with a larger α indicating a higher affinity to update the policy to a perturbed value .
The paper proposes a derivative-free optimization algorithm which is applicable to stochastic black-box functions. (The target application area is reinforcement learning, but the algorithm is more broadly applicable.) The core elements of the algorithm are 1. Block coordinate ascent: Only a few parameters are optimized at each step, while the others are held fixed. The maximization is performed by random search over the parameters being optimized, so the function evaluations can be performed in parallel. 2. Hypothesis testing: Because of the high variability of Monte Carlo policy evaluation, a one-sided two-sample hypothesis test is performed to determine whether or not the candidate policy is in fact better than the current policy, and the policy is only updated if this is the case. The proposed algorithm, hypothesis-driven coordinate ascent (HDCA), is compared to previous derivative-free optimizers proposed in the RL literature, where it is shown to require fewer iterations to converge on most tasks.
SP:a49f7236b067ec4d09f71a2d9d5ed87421ac8351
Hypothesis Driven Coordinate Ascent for Reinforcement Learning
1 INTRODUCTION . In recent years , Reinforcement Learning ( RL ) techniques have contributed to striking advancements in artificial intelligence . From mastering complicated games like Go ( Silver et al. , 2017 ) to autonomous helicopter flight ( Ng et al. , 2006 ) , RL agents continue to make impressive strides . RL is primarily concerned with discovering a policy that encodes a mapping from states to actions that optimizes rewards within a given environment . This work proposes a method for learning policies in stochastic environments where agent performance is evaluated via a black box function . Much of RL focuses on Markov Decision Processes ( MDPs ) , where an agent ’ s actions are chosen to maximize the expected value of a reward function over time ( Russell & Norvig , 2019 ) . Due to the inherent variability within real-world problem domains , the outcome of these actions depends on the action taken and noise within the environment . MDPs treat time as a discrete quantity , where actions are chosen at each time step based on a learned policy that leads the agent to a new state . Different states correspond to specific rewards , which are used to refine the policy parameters . Typically , parameter updates are taken in the direction that maximizes the expected reward and often involve calculating ( or approximating ) gradients . The function of interest is opaque for black box optimization ( BBO ) ; only point-wise evaluations are possible and the true gradient is inaccessible . As a result , gradient-based techniques must approximate the true gradient through function sampling and calculating mean and variance estimates . Calculating reliable estimates can be difficult in practice and is made especially challenging by the stochastic nature of MDPs . While various gradient-based BBO methods have found success ( Mania et al. , 2018 ; Salimans et al. , 2017 ; Bibi et al. , 2020 ) , they may converge to local optima and can be slow to converge for complex domains . As an alternative to gradient approximations , we propose Hypothesis-test Driven Coordinate Ascent ( HDCA ) , which leverages the use of derivative-free optimization ( DFO ) techniques operating on a black box function . Our first major insight is to leverage coordinate ascent to decompose the large search space of the original policy optimization problem into a sequence of sub-problems with smaller search spaces ( Wright , 2015 ) . By considering simple enough sub-problems , we are able to optimize each iterate using a basic random search with uniform sampling from a defined search range . This process involves generating batches of candidate solutions at each iteration and updating the policy to the best performing candidate . While there are numerous methods to explore the high-dimensional policy space , other more informed search policies , such as Importance Sampling ( Bibi et al. , 2020 ) , involve significant computational overhead as well as additional reliance on approximated gradients . Uniform sampling avoids these complications and allows us to take full advantage of modern advances in parallel and distributed computing . While sufficiently exploring the perturbation space may require generating several candidate solutions , each model evaluation may be done entirely in parallel of the other candidates . Therefore , with appropriate computational resources , our method can converge in fewer iterations than other current methods . Our second major insight is to account for the stochastic nature of our optimization problem . That is , the cumulative reward is a stochastic quantity whose distribution depends on the stochastic policy and environment . Thus , one must estimate the expected cumulative reward with finite samples of rollouts . This leads to variance and uncertainty about true expectations of cumulative rewards for candidate solutions . The stochastic nature ( and finite sample estimation ) of the cumulative reward criterion has been largely ignored by previous BBO approaches , where the mean over rollouts is ( incorrectly ) taken as the ground truth criterion . In practice this may result in updates that happen to perform better by chance , rather than due to policy improvement . Here , we develop a principled approach that accounts for stochasticity with one-sided , two-sample hypothesis tests to update policy parameters based on statistical significance . Lastly , we perform several experiments and ablations to empirically study HDCA . When evaluated on a sample of RL control problems , we found HDCA to consistently converge to a solution in fewer iterations than other comparable methods . Given HDCA ’ s highly scalable nature , the reduced number of iterations required to find a solution translates to quicker training time given adequate computational resources . 2 METHODS . 2.1 MARKOV DECISION PROCESS . An MDP describes an environment where an agent acts within a fully observable , stochastic domain to maximize its expected cumulative discounted reward ( Russell & Norvig , 2019 ) . The environment can be described as a set of states , S , along with a set of actions , A , that can be taken to transition between states . The transition function p ( s′|s , a ) describes the probability that taking action a in state s leads to state s′ , and the reward function R ( s , a ) describes the reward received for taking action a in state s. A solution to an MDP is represented as a policy πθ , encoded by parameters θ , that maps states to a distribution over actions in a way that maximizes accumulated rewards . This paper focuses on environments where the reward function acts as a black box . 2.2 COORDINATE ASCENT . Our first insight is to use coordinate ascent to decompose the problem of optimizing the large policy parameter space into a sequence of smaller , more feasible , sub-problems . Coordinate ascent maximizes a function f ( θ ) by successively maximizing sub-problems with respect to varying a single coordinate at a time . Similarly , block coordinate ascent iterates through blocks of coordinates and updates a subset of multiple coordinates sequentially ( Tseng , 2001 ) ( see Algorithm 1 ) . Choose θ0 ∈ Rd ; Set i← 0 ; repeat Given θi , choose a block of coordinates b in the set { 1 , ... , d } and compute new iterate θi+1 that satisfies ; θi+1b ∈ arg max θb f ( θp , θb ) ( 1 ) θi+1p = θ i p , ∀p /∈ b ( 2 ) i← i+ 1 ; until termination test satisfied ; Algorithm 1 : Block Coordinate Ascent We approximate coordinate ascent optimization to maximize policy parameters θ without gradients . To do so , we numerically optimize the sub-problem for a block of coordinates , rather than analyt- ically solving it . If the dimension of the block of coordinates being updated is small , even simple numerical optimization techniques yield good estimates of optimal updates . We propose approximate block coordinate ascent ( ABCA ) , which simply performs a random search over the coordinates of the block that is being maximized ( see Algorithm 2 ) . The primary benefit of utilizing ABCA is that optimization occurs without the use of gradient approximation , which can be challenging even for deterministic functions . When applied to reinforcement learning , the difficulties are exacerbated by the stochastic dynamics of many real-world RL problems , which lead to noisy function evaluations and rough approximations of the gradient . When combined with a potentially non-convex reward function , following an inaccurate gradient can lead to sub-optimal solutions and slow convergence . ABCA permits us to avoid gradient estimation altogether and instead make updates using simple global numerical techniques that are feasible for the smaller sub-problems . We can see from Algorithm 2 that the update rule simply takes the policy corresponding to the highest empirical average cumulative reward within each batch of perturbed θ values for a block of coordinates . This differs from typical gradient estimation , where the update rule is implemented as a weighted sum across the batch of perturbed coordinates . For example , in the popular Evolutionary Strategies approach discussed in Sec . 3 , updates are computed via an average ( Eq . 12 ) over perturbations . Due to the concentration of empirical means , this results in diminishing returns as one increases the number of perturbations per update ( iteration ) . In contrast , ABCA considers a maximum over perturbations , and thus is able to see greater returns as we increase the number of perturbations considered per update . As one may compute trajectories , t ( j ) m , and cumulative rewards , R ( t ( j ) m ) , in parallel , the better utility of perturbations implies that ABCA is able to take better advantage of the benefits of distributed computing compared to gradient estimation techniques . Input : Initial policy parameters θ0 ∈ Rd ; Hyperparameters : Search range s , number of noise samples n , Number of coordinates per block c , number of rollouts in mean calculation M ; Set i← 0 ; repeat Let coordinate block b consist of c randomly selected coordinates from the set { 1 , ... , d } ; Sample j , k ∼U ( s ) for j = 1 , ... , n , and k ∈ b ; Let θ̂ ( j ) be the jth candidate optimizer ( perturbation ) over block b with values : ∀q ∈ { 1 , . . . , d } \ b , θ̂ ( j ) q ← θiq , ∀k ∈ b , θ̂ ( j ) k ← θ i k + j , k ( 3 ) Using the policy samples ai ∼ πθ̂ ( j ) ( si ) and environment samples si+1 ∼ p ( si+1 | si , ai ) , generate M rollouts t ( j ) m , and compute respective cumulative rewards R ( t ( j ) m ) , ∀m ∈ { 1 , . . . , M } : t ( j ) m ← { ( s ( j ) m,0 , a ( j ) m,0 ) , ( s ( j ) m,1 , a ( j ) m,1 ) , . . . } R ( t ( j ) m ) = ∑ ( s , a ) ∈t ( j ) m R ( s , a ) ( 4 ) Update θ based on the empirical average cumulative rewards R̄ ( θ̂ ( j ) ) ← 1M ∑M m=1 R ( t ( j ) m ) : j← arg max j R̄ ( θ̂ ( j ) ) , θi+1 ← θ̂ ( j ) ( 5 ) i← i+ 1 ; until termination test satisfied ; Algorithm 2 : Approximate Block Coordinate Ascent ( ABCA ) 2.3 HYPOTHESIS TESTING . Our second insight is to note that , unlike deterministic optimization , the stochastic nature of our optimization problem ( through the environment dynamics and stochastic policy ) requires a careful consideration of variance over expected rewards when comparing different perturbations in ABCA iterates . That is , as we are enumerating random policies , it may be due to chance , rather than an improvement in parameters , that the average reward for a candidate optimizer perturbation is greater . Below we propose to account for the stochasticity of expected reward approximations using hypothesis testing . Given the variance in the sequence of states encountered during policy rollouts , the cumulative reward can be highly variable , and thus selecting the policy corresponding to the empirical maximum reward may not lead to improved overall performance . To generate a more accurate assessment of a given model ’ s expected reward , we make multiple function evaluations for each perturbed θ̂ ( j ) ( see Eq . 4 ) and compute corresponding mean and variance estimates from the set of policy rollouts : R̄ ( θ̂ ( j ) ) ← 1 M M∑ m=1 R ( t ( j ) m ) , σ 2 R ( θ̂ ( j ) ) ← 1 M M∑ m=1 ( R ( t ( j ) m ) − R̄ ( θ̂ ( j ) ) ) 2 . ( 6 ) We are ultimately interested in determining if there is a perturbed model that is statistically demonstrated to yield a higher expected reward than our current model , thus a one-sided , two-sample t-test is best suited for this task ( NIST/SEMATECH , 2003 ) . Since our policy perturbations at any given iteration are selected from a uniform distribution , it is likely that some of the perturbed models will lead to worse overall performance . Additionally , since function evaluations represent independent environment rollouts , the data in our two-sample t-test is unpaired . Operating under the likelihood that the variances of the two samples are not equivalent , the test statistic , T , for the two-sample t-test is calculated as : T = ( µ1 − µ2 ) / √ σ21/N1 + σ 2 2/N2 where µi , σi , and Ni correspond to the ith sample ’ s mean , standard deviation , and sample size , respectively ( Cressie & Whitford , 1986 ) . In our method , we seek to compare the rewards of candidate policy parameters θ̂ ( j ) to the rewards of the current iterate θi ; thus , test statistics are derived from the respective means and variances for reward : Tj = R̄ ( θ̂ ( j ) ) − R̄ ( θi ) √ σ2 R ( θ̂ ( j ) ) /M + σ2R ( θi ) /M ( 7 ) The null hypothesis H0 for this test is that the expected performance of the current policy is greater than or equal to the perturbed policy that is being compared . Since we are only interested in models with higher expected rewards , we reject the null hypothesis if Tj > t1−α , νj , ( 8 ) where t corresponds to the critical value of the t distribution with significance threshold α and νj degrees of freedom , calculated as νj = ( σ2 R ( θ̂ ( j ) ) /M + σ2R ( θi ) /M ) 2 ( σ2 R ( θ̂ ( j ) ) /M ) 2/ ( M − 1 ) + ( σ2R ( θi ) /M ) 2/ ( M − 1 ) . ( 9 ) Finally , the update step concludes by updating the model to the perturbed θ̂ with the highest degree of statistical evidence to outperform the previous iteration ’ s model , if such a model is found ( or passes through the previous iterate , otherwise ) . Thus , HDCA considers a test-based update , which replaces the update in ABCA ( Eq . 5 ) with : j← arg max j Tj − t1−α , νj , θi+1 ← θ̂ ( j ) if Tj − t1−α , νj > 0 , else θi . ( 10 ) That is , HDCA implements ABCA with an update that is based on statistical significance for better policy updates ( see appendix for full statement of HDCA algorithm ) . It is important to note that the two-sample t-test has a parameter for the significance level α that is likely to be problem specific . In the realm of hypothesis testing , this parameter controls whether or not the null hypothesis gets rejected . When applied to our optimization scheme , this parameter determines if a policy demonstrates enough statistical evidence to be considered a more optimal policy than the previous iteration . Therefore , this parameter can be used to control the degree of policy exploration , with a larger α indicating a higher affinity to update the policy to a perturbed value .
This paper introduces a new policy optimization method based on coordinate ascent. As the paper notes early on, the core of the proposed method is based on two central insights. The first is that coordinate ascent is a suitable approach for policy optimization as it decomposes the large search space (the policy space) into "a sequence of sub-problems with smaller search spaces". The second notes that the objective is in fact stochastic: The return can be thought of as a random variable distributed according to the mixture of a possibly stochastic control policy and the possibly stochastic transition dynamics of the environment. In contrast, prior black box approaches to optimization have tended to ignore this stochasticity in favor of optimizing for the expected return (the value). To account for this, the paper proposes a one-sided hypothesis test that can inform whether to update the policy based on the significance of a given rollout. Experiments are conducted on a continuous variant of the LunarLander-v2 domain and MuJoCo, contrasting estimates of the average return achieved by policies vs. iterations for the proposed method (HDCA), an evolutionary approach (ES), and Augmented Random Search (ARS). Results support the improvement of the approach over ES and ARS on this domain.
SP:a49f7236b067ec4d09f71a2d9d5ed87421ac8351
EF21 with Bells & Whistles: Practical Algorithmic Extensions of Modern Error Feedback
1 INTRODUCTION In this paper , we consider the nonconvex distributed/federated optimization problem of the form min 𝑥∈R𝑑 { ︂ 𝑓 ( 𝑥 ) def = 1𝑛 𝑛∑︀ 𝑖=1 𝑓𝑖 ( 𝑥 ) } ︂ , ( 1 ) where 𝑛 denotes the number of clients/workers/devices/nodes connected with a server/master and client 𝑖 has an access to the local loss function 𝑓𝑖 only . The local loss of each client is allowed to have the online/expectation form 𝑓𝑖 ( 𝑥 ) = E𝜉𝑖∼𝒟𝑖 [ 𝑓𝜉𝑖 ( 𝑥 ) ] , ( 2 ) or the finite-sum form 𝑓𝑖 ( 𝑥 ) = 1 𝑚 𝑚∑︀ 𝑗=1 𝑓𝑖𝑗 ( 𝑥 ) . ( 3 ) Problems of this structure appear in federated learning ( Konečný et al. , 2016 ; Kairouz , 2019 ) , where training is performed directly on the clients ’ devices . In a quest for state-of-the-art performance , machine learning practitioners develop elaborate model architectures and train their models on enormous data sets . Naturally , for training at this scale to be possible , one needs to rely on distributed computing ( Goyal et al. , 2017 ; You et al. , 2020 ) . Since in recent years remarkable empirical successes were obtained with massively over-parameterized models ( Arora et al. , 2018 ) , which puts an extra strain on the communication links during training , recent research activity and practice focuses on developing distributed optimization methods and systems capitalizing on ( deterministic or randomized ) lossy communication compression techniques to reduce the amount of communication traffic . A compression mechanism is typically formalized as an operator 𝒞 : R𝑑 ↦→ R𝑑 mapping hard-tocommunicate ( e.g. , dense ) input messages into easy-to-communicate ( e.g. , sparse ) output messages . The operator is allowed to be randomized , and typically operates on models Khaled & Richtárik ( 2019 ) or on gradients Alistarh et al . ( 2017 ) ; Beznosikov et al . ( 2020 ) , both of which can be described as vectors in R𝑑 . Besides sparsification ( Alistarh et al. , 2018 ) , typical examples of useful compression mechanisms include quantization ( Alistarh et al. , 2017 ; Horváth et al. , 2019a ) and low-rank approximation ( Vogels et al. , 2019 ; Safaryan et al. , 2021 ) . There are two large classes of compression operators often studied in the literature : i ) unbiased compression operators 𝒞 , meaning that there exists 𝜔 ≥ 0 such that E [ 𝒞 ( 𝑥 ) ] = 𝑥 , E [ ︀ ‖𝒞 ( 𝑥 ) − 𝑥‖2 ] ︀ ≤ 𝜔‖𝑥‖2 , ∀𝑥 ∈ R𝑑 ; ( 4 ) and ii ) biased compression operators 𝒞 , meaning that there exists 0 < 𝛼 ≤ 1 such that E [ ︀ ‖𝒞 ( 𝑥 ) − 𝑥‖2 ] ︀ ≤ ( 1 − 𝛼 ) ‖𝑥‖2 , ∀𝑥 ∈ R𝑑 . ( 5 ) Note that the latter “ biased ” class contains the former one , i.e. , if 𝒞 satisfies ( 4 ) with 𝜔 , then a scaled version ( 1 + 𝜔 ) −1𝒞 satisfies ( 5 ) with 𝛼 = 1/ ( 1+𝜔 ) . While distributed optimization methods with unbiased compressors ( 4 ) are well understood ( Alistarh et al. , 2017 ; Khirirat et al. , 2018 ; Mishchenko et al. , 2019 ; Horváth et al. , 2019b ; Li et al. , 2020 ; Li & Richtárik , 2021a ; Li & Richtárik , 2020 ; Islamov et al. , 2021 ; Gorbunov et al. , 2021 ) , biased compressors ( 5 ) are significantly harder to analyze . One of the main reasons behind this is rooted in the observation that when deployed within distributed gradient descent in a naive way , biased compresors may lead to ( even exponential ) divergence ( Karimireddy et al. , 2019 ; Beznosikov et al. , 2020 ) . Error Feedback ( EF ) ( or Error Compensation ( EC ) ) —a technique originally proposed by Seide et al . ( 2014 ) —emerged as an empirical fix of this problem . However , this technique remained poorly understood until very recently . Although several theoretical results were obtained supporting the EF framework in recent years ( Stich et al. , 2018 ; Alistarh et al. , 2018 ; Beznosikov et al. , 2020 ; Gorbunov et al. , 2020 ; Qian et al. , 2020 ; Tang et al. , 2020 ; Koloskova et al. , 2020 ) , they use strong assumptions ( e.g. , convexity , bounded gradients , bounded dissimilarity ) , and do not get 𝒪 ( 1/𝛼𝑇 ) convergence rates in the smooth nonconvex regime . Very recently , Richtárik et al . ( 2021 ) proposed a new EF mechanism called EF21 , which uses standard smoothness assumptions only , and also enjoys the desirable 𝑂 ( 1/𝛼𝑇 ) convergence rate for the nonconvex case ( in terms of number of communication rounds 𝑇 this matches the best-known rate 𝒪 ( ( 1+𝜔/√𝑛 ) /𝑇 ) obtained by Gorbunov et al . ( 2021 ) using unbiased compressors ) , improving the previous 𝑂 ( 1/ ( 𝛼𝑇 ) 2/3 ) rate of the standard EF mechanism ( Koloskova et al. , 2020 ) . 2 OUR CONTRIBUTIONS While Richtárik et al . ( 2021 ) provide a new theoretical SOTA for error feedback based methods , the authors only study their EF21 mechanism in a pure form , without any additional “ bells and whistles ” which are of importance in practice . In this paper , we aim to push the EF21 framework beyond its pure form by extending it in several directions of high theoretical and practical importance . In particular , we further enhance the EF21 mechanism with the following six useful and practical algorithmic extensions : stochastic approximation , variance reduction , partial participation , bidirectional compression , momentum , and proximal ( regularization ) . We do not stop at merely proposing these algorithmic enhancements : we derive strong convergence results for all of these extensions . Several of these techniques were never analyzed in conjunction with the original EF mechanism before , and in cases where they were , our new results with EF21 are vastly superior . See Table 1 for an overview of our results . In summary , our results constitute the new algorithmic and theoretical state-of-the-art in the area of error feedback . We now briefly comment on each extension proposed in this paper : ◇ Stochastic approximation . The vanilla EF21 method requires all clients to compute the exact/full gradient in each round . While Richtárik et al . ( 2021 ) do consider a stochastic extension of EF21 , they do not formalize their result , and only consider the simplistic scenario of uniformly bounded variance , which does not in general hold for stochasticity coming from subsampling ( Khaled & Richtárik , 2020 ) . However , exact gradients are not available in the stochastic/online setting ( 2 ) , and in the finite-sum setting ( 3 ) it is more efficient in practice to use subsampling and work with stochastic gradients instead . In our paper , we extend EF21 to a more general stochastic approximation framework than the simplistic framework considered in the original paper . Our method is called EF21-SGD ( Algorithm 2 ) ; see Appendix D for more details . ◇ Variance reduction . As mentioned above , EF21 relies on full gradient computations at all clients . This incurs a high or unaffordable computation cost , especially when local clients hold large training sets , i.e. , if 𝑚 is very large in ( 3 ) . In the finite-sum setting ( 3 ) , we enhance EF21 with a variance reduction technique to reduce the computational complexity . In particular , we adopt the simple and efficient variance-reduced method PAGE ( Li et al. , 2021 ; Li , 2021b ) ( which is optimal for solving problems ( 3 ) ) into EF21 , and call the resulting method EF21-PAGE ( Algorithm 3 ) . See Appendix E for more details . ◇ Partial participation . The EF21 method proposed by Richtárik et al . ( 2021 ) requires full participation of clients for solving problem ( 1 ) , i.e. , in each round , the server needs to communicate with all 𝑛 clients . However , full participation is usually impractical or very hard to achieve in massively distributed ( e.g. , federated ) learning problems ( Konečný et al. , 2016 ; Cho et al. , 2020 ; Kairouz , 2019 ; Li & Richtárik , 2021b ; Zhao et al. , 2021 ) . To remedy this situation , we propose a partial participation ( PP ) variant of EF21 , which we call EF21-PP ( Algorithm 4 ) . See Appendix F for more details . ◇ Bidirectional compression . The vanilla EF21 method only considers upstream compression of the messages sent by the clients to the server . However , in some situations , downstream communication is also costly ( Horváth et al. , 2019a ; Tang et al. , 2020 ; Philippenko & Dieuleveut , 2020 ) . In order to cater to these situations , we modify EF21 so that the server can also optionally compresses messages before communication . Our master compression is intelligent in that it employs the Markov compressor proposed in EF21 to be used at the devices . The proposed method , based on bidirectional compression , is EF21-BC ( Algorithm 5 ) . See Appendix G for more details . ◇ Momentum . A very successful and popular technique for enhancing both optimization and generalization is momentum/acceleration ( Polyak , 1964 ; Nesterov , 1983 ; Lan & Zhou , 2015 ; AllenZhu , 2017 ; Lan et al. , 2019 ; Li , 2021a ) . For instance , momentum is a key building block behind the widely-used Adam method ( Kingma & Ba , 2014 ) . In this paper , we add the well-known ( Polyak ) heavy ball momentum ( Polyak , 1964 ; Loizou & Richtárik , 2020 ) to EF21 , and call the resulting method EF21-HB ( Algorithm 6 ) . See Appendix H for more details . ◇ Proximal setting . It is common practice to solve regularized versions of empirical risk minimization problems instead of their vanilla variants ( Shalev-Shwartz & Ben-David , 2014 ) . We thus consider the composite/regularized/proximal problem min 𝑥∈R𝑑 { ︂ Φ ( 𝑥 ) def = 1𝑛 𝑛∑︀ 𝑖=1 𝑓𝑖 ( 𝑥 ) + 𝑟 ( 𝑥 ) } ︂ , ( 6 ) where 𝑟 ( 𝑥 ) : R𝑑 → R ∪ { +∞ } is a regularizer , e.g. , ℓ1 regularizer ‖𝑥‖1 or ℓ2 regularizer ‖𝑥‖22 . To broaden the applicability of EF21 to such problems , we propose a proximal variant of EF21 to solve the more general composite problems ( 6 ) . We call this new method EF21-Prox ( Algorithm 7 ) . See Appendix I for more details . Our theoretical complexity results are summarized in Table 1 . In addition , we also analyze EF21SGD , EF21-PAGE , EF21-PP , EF21-BC under Polyak-Łojasiewicz ( PŁ ) condition ( Polyak , 1963 ; Lojasiewicz , 1963 ) and EF21-Prox under the generalized PŁ-condition ( Li & Li , 2018 ) for composite optimization problems . Due to space limitations , we defer all the details about the analysis under the PŁ-condition to the appendix and provide only simplified rates in Table 1 . We comment on some preliminary experimental results in Section 5 . More experiments including deep learning experiments are presented in Appendix A . 3 METHODS Since our methods are modifications of EF21 , they share many features , and are presented in a unified way in Table 2 . At each iteration of the proposed methods , worker 𝑖 computes the compressed vector 𝑐𝑡𝑖 and sends it to the master . The methods differ in the way of computing 𝑐 𝑡 𝑖 but have similar ( in case of EF21-SGD , EF21-PAGE , EF21-PP – exactly the same ) update rules to the one of EF21 : 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 , 𝑔𝑡+1𝑖 = 𝑔𝑡𝑖 + 𝑐𝑡𝑖 , 𝑔𝑡+1 = 1𝑛 𝑛∑︀ 𝑖=1 𝑔𝑡+1𝑖 = 𝑔 𝑡 + 1𝑛 𝑛∑︀ 𝑖=1 𝑐𝑡𝑖 . ( 7 ) The pseudocodes of the methods are given in the appendix . Below we briefly describe each method . ◇ EF21-SGD : Error feedback and SGD . EF21-SGD is essentially EF21 but instead of the full gradients ∇𝑓𝑖 ( 𝑥𝑡+1 ) , workers compute the stochastic gradients 𝑔𝑖 ( 𝑥𝑡+1 ) , and use them to compute 𝑐𝑡𝑖 = 𝒞 ( 𝑔𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ) . Despite the seeming simplicity of this extension , it is highly important for various applications of machine learning and statistics where exact gradients are either unavailable or prohibitively expensive to compute . ◇ EF21-PAGE : Error feedback and variance reduction . In the finite-sum regime ( 3 ) , variance reduced methods usually perform better than vanilla SGD in many situations ( Gower et al. , 2020 ) . Therefore , for this setup we modify EF21 and combine it with variance reduction . In particular , this time we replace ∇𝑓𝑖 ( 𝑥𝑡+1 ) in the formula for 𝑐𝑡𝑖 with the PAGE estimator ( Li et al. , 2021 ) 𝑣 𝑡+1 𝑖 . With ( typically small ) probability 𝑝 this estimator equals the full gradient 𝑣𝑡+1𝑖 = ∇𝑓𝑖 ( 𝑥𝑡+1 ) , and with probability 1 − 𝑝 it is set to 𝑣𝑡+1𝑖 = 𝑣 𝑡 𝑖 + 1 𝜏𝑖 ∑︀ 𝑗∈𝐼𝑡𝑖 ( ︀ ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) ︀ , where 𝐼𝑡𝑖 is a minibatch of size 𝜏𝑖 . Typically , the number of data points 𝑚 owned by each client is large , and 𝑝 ≤ 1/𝑚 when 𝜏𝑖 ≡ 1 . As a result , computation of full gradients rarely happens during the optimization procedure : on average , once in every 𝑚 iterations only . Although it is possible to use other variance-reduced estimators like in SVRG or SAGA , we use the PAGE-estimator : unlike SVRG or SAGA , PAGE is optimal for smooth nonconvex optimization , and therefore gives the best theoretical guarantees ( we have obtained results for both SVRG and SAGA and indeed , they are worse , and hence we do not include them ) . Notice that unlike VR-MARINA ( Gorbunov et al. , 2021 ) , which is a state-of-the-art distributed optimization method designed specifically for unbiased compressors and which also uses the PAGEestimator , EF21-PAGE does not require the communication of full ( non-compressed ) vectors at all . This is an important property of the algorithm since , in some distributed networks , and especially when 𝑑 is very large , as is the case in modern over-parameterized deep learning , full vector communication is prohibitive . However , unlike the rate of VR-MARINA , the rate of EF21-PAGE does not improve with increasing 𝑛 . This is not a flaw of our method , but rather an inevitable drawback of distributed methods that rely on biased compressors such as Top-𝑘 . ◇ EF21-PP : Error feedback and partial participation . The extension of EF21 to the case of partial participation of the clients is mathematically identical to EF21 up to the following change : 𝑐𝑡𝑖 = 0 for all clients 𝑖 ̸∈ 𝑆𝑡 ⊆ { 1 , . . . , 𝑛 } that are not selected for communication at iteration 𝑡 . In practice , 𝑐𝑡𝑖 = 0 means that client 𝑖 does not take part in the 𝑡-th communication round . Here the set 𝑆𝑡 ⊆ { 1 , . . . , 𝑛 } is formed randomly such that Prob ( 𝑖 ∈ 𝑆𝑡 ) = 𝑝𝑖 > 0 for all 𝑖 = 1 , . . . , 𝑛 . ◇ EF21-BC : Error feedback and bidirectional compression . The simplicity of the EF21 mechanism allows us to naturally extend it to the case when it is desirable to have efficient/compressed communication between the clients and the server in both directions . At each iteration of EF21-BC , clients compute and send to the master node 𝑐𝑡𝑖 = 𝒞𝑤 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) and update ̃︀𝑔𝑡+1𝑖 = ̃︀𝑔𝑡𝑖 + 𝑐𝑡𝑖 in the usual way , i.e. , workers apply the EF21 mechanism . The key difference between EF21 and EF21-BC is that the master node in EF21-BC also uses this mechanism : it computes and broadcasts to the workers the compressed vector 𝑏𝑡+1 = 𝒞𝑀 ( ̃︀𝑔𝑡+1 − 𝑔𝑡 ) and updates 𝑔𝑡+1 = 𝑔𝑡 + 𝑏𝑡+1 , wherẽ︀𝑔𝑡+1 = 1𝑛 ∑︀𝑛𝑖=1 ̃︀𝑔𝑡+1𝑖 . Vector 𝑔𝑡 is maintained by the master and workers . Therefore , the clients are able to update it via using 𝑔𝑡+1 = 𝑔𝑡 + 𝑏𝑡+1 and compute 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 once they receive 𝑏𝑡+1 . ◇ EF21-HB : Error feedback with momentum . We consider classical Heavy-ball method ( Polyak , 1964 ) with EF21 estimator 𝑔𝑡 : 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑣𝑡 , 𝑣𝑡+1 = 𝜂𝑣𝑡 + 𝑔𝑡+1 , 𝑔𝑡+1𝑖 = 𝑔𝑡𝑖 + 𝑐𝑡𝑖 , 𝑔𝑡+1 = 1𝑛 𝑛∑︀ 𝑖=1 𝑔𝑡+1𝑖 = 𝑔 𝑡 + 1𝑛 𝑛∑︀ 𝑖=1 𝑐𝑡𝑖 . The resulting method is not better than EF21 in terms of the complexity of finding 𝜀-stationary point , i.e. , momentum does not improve the theoretical convergence rate . Unfortunately , this is common issue for a wide range of results for momentum methods Loizou & Richtárik ( 2020 ) . However , it is important to theoretically analyze momentum-extensions such as EF21-HB due to their importance in practice and generalization behaviour . ◇ EF21-Prox : Error feedback for composite problems . Finally , we make EF21 applicable to the composite optimization problems ( 6 ) by simply taking the prox-operator from the right-hand side of the 𝑥𝑡+1 update rule ( 7 ) : 𝑥𝑡+1 = prox𝛾𝑟 ( 𝑥 𝑡 − 𝛾𝑔𝑡 ) = arg min𝑥∈R𝑑 { 𝛾𝑟 ( 𝑥 ) + ‖𝑥−𝑥 𝑡+𝛾𝑔𝑡‖2/2 } . This trick is simple , but , surprisingly , EF21-Prox is the first distributed method with error-feedback that provably converges for composite problems ( 6 ) . 4 THEORETICAL CONVERGENCE RESULTS In this section , we formulate a single corollary derived from the main convergence theorems for our six enhancements of EF21 , and formulate the assumptions that we use in the analysis . The complete statements of the theorems and their proofs are provided in the appendices . In Table 1 we compare our new results with existing results . 4.1 ASSUMPTIONS In this subsection , we list and discuss the assumptions that we use in the analysis . 4.1.1 GENERAL ASSUMPTIONS To derive our convergence results , we invoke the following standard smoothness assumption . Assumption 1 ( Smoothness and lower boundedness ) . Every 𝑓𝑖 has 𝐿𝑖-Lipschitz gradient , i.e. , ‖∇𝑓𝑖 ( 𝑥 ) −∇𝑓𝑖 ( 𝑦 ) ‖ ≤ 𝐿𝑖 ‖𝑥− 𝑦‖ for all 𝑖 ∈ [ 𝑛 ] , 𝑥 , 𝑦 ∈ R𝑑 , and 𝑓 inf def = inf𝑥∈R𝑑 𝑓 ( 𝑥 ) > −∞ . We also assume that the compression operators used by all algorithms satisfy the following property . Definition 1 ( Contractive compressors ) . We say that a ( possibly randomized ) map 𝒞 : R𝑑 → R𝑑 is a contractive compression operator , or simply contractive compressor , if there exists a constant 0 < 𝛼 ≤ 1 such that E [ ︀ ‖𝒞 ( 𝑥 ) − 𝑥‖2 ] ︀ ≤ ( 1 − 𝛼 ) ‖𝑥‖2 , ∀𝑥 ∈ R𝑑 . ( 8 ) We emphasize that we do not assume 𝒞 to be unbiased . Hence , our theory works with the Top-𝑘 ( Alistarh et al. , 2018 ) and the Rank-𝑟 ( Safaryan et al. , 2021 ) compressors , for example . 4.1.2 ADDTIONAL ASSUMPTIONS FOR EF21-SGD We analyze EF21-SGD under the assumption that local stochastic gradients ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) satisfy the following inequality ( see Assumption 2 of Khaled & Richtárik ( 2020 ) ) . Assumption 2 ( General assumption for stochastic gradients ) . We assume that for all 𝑖 = 1 , . . . , 𝑛 there exist parameters 𝐴𝑖 , 𝐶𝑖 ≥ 0 , 𝐵𝑖 ≥ 1 such that E [ ︁ ‖∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) ‖2 | 𝑥𝑡 ] ︁ ≤ 2𝐴𝑖 ( ︀ 𝑓𝑖 ( 𝑥 𝑡 ) − 𝑓 inf𝑖 ) ︀ + 𝐵𝑖‖∇𝑓𝑖 ( 𝑥𝑡 ) ‖2 + 𝐶𝑖 , ( 9 ) where1 𝑓 inf𝑖 = inf𝑥∈R𝑑 𝑓𝑖 ( 𝑥 ) > −∞ . Below we provide two examples of stochastic gradients fitting this assumption ( for more detail , see ( Khaled & Richtárik , 2020 ) ) . Example 1 . Consider ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) such that E [ ︁ ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) | 𝑥𝑡 ] ︁ = ∇𝑓𝑖 ( 𝑥𝑡 ) and E [ ︂⃦⃦⃦ ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦⃦2 | 𝑥𝑡 ] ︂ ≤ 𝜎2𝑖 for some 𝜎𝑖 ≥ 0 . Then , due to variance decomposition , ( 9 ) holds with 𝐴𝑖 = 0 , 𝐵𝑖 = 0 , 𝐶𝑖 = 𝜎2𝑖 . 1When 𝐴𝑖 = 0 one can ignore the first term in the right-hand side of ( 9 ) , i.e. , assumption inf𝑥∈R𝑑 𝑓𝑖 ( 𝑥 ) > −∞ is not required in this case . Example 2 . Let 𝑓𝑖 ( 𝑥 ) = 1𝑚𝑖 ∑︀𝑚𝑖 𝑗=1 𝑓𝑖𝑗 ( 𝑥 ) , 𝑓𝑖𝑗 be 𝐿𝑖𝑗-smooth and 𝑓 inf 𝑖𝑗 = inf𝑥∈R𝑑 𝑓𝑖𝑗 ( 𝑥 ) > −∞ . Following Gower et al . ( 2019 ) , we consider a stochastic reformulation 𝑓𝑖 ( 𝑥 ) = E𝑣𝑖∼𝒟𝑖 [ 𝑓𝑣𝑖 ( 𝑥 ) ] = E𝑣𝑖∼𝒟𝑖 [ ︃ 1 𝑚𝑖 𝑚𝑖∑︀ 𝑗=1 𝑓𝑣𝑖𝑗 ( 𝑥 ) ] ︃ , ( 10 ) where E𝑣𝑖∼𝒟𝑖 [ 𝑣𝑖𝑗 ] = 1 . One can show ( see Proposition 2 of Khaled & Richtárik ( 2020 ) ) that under the assumption that E𝑣𝑖∼𝒟𝑖 [ ︀ 𝑣2𝑖𝑗 ] ︀ is finite for all 𝑗 stochastic gradient ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) = ∇𝑓𝑣𝑡𝑖 ( 𝑥 𝑡 ) with 𝑣𝑡𝑖 sampled from 𝒟𝑖 satisfies ( 9 ) with 𝐴𝑖 = max𝑗 𝐿𝑖𝑗E𝑣𝑖∼𝒟𝑖 [ ︀ 𝑣2𝑖𝑗 ] ︀ , 𝐵𝑖 = 1 , 𝐶𝑖 = 2𝐴𝑖∆inf𝑖 , where ∆inf𝑖 = 1 𝑚𝑖 ∑︀𝑚𝑖 𝑗=1 ( 𝑓 inf 𝑖 − 𝑓 inf𝑖𝑗 ) . In particular , if Prob ( ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) = ∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) = 𝐿𝑖𝑗∑︀𝑚𝑖 𝑙=1 𝐿𝑖𝑙 , then 𝐴𝑖 = 𝐿𝑖 = 1 𝑚𝑖 ∑︀𝑚𝑖 𝑗=1 𝐿𝑖𝑗 , 𝐵𝑖 = 1 , and 𝐶𝑖 = 2𝐴𝑖∆ inf 𝑖 . Stochastic gradient 𝑔𝑖 ( 𝑥𝑡 ) is computed using a mini-batch of 𝜏𝑖 independent samples satisfying ( 9 ) : 𝑔𝑖 ( 𝑥 𝑡 ) def = 1𝜏𝑖 𝜏𝑖∑︀ 𝑗=1 ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) . 4.1.3 ADDITIONAL ASSUMPTIONS FOR EF21-PAGE In the analysis of EF21-PAGE , we rely on the following assumption . Assumption 3 ( Average ℒ-smoothness ) . Let every 𝑓𝑖 have the form ( 3 ) . Assume that for all 𝑡 ≥ 0 , 𝑖 = 1 , . . . , 𝑛 , and batch 𝐼𝑡𝑖 ( of size 𝜏𝑖 ) , the minibatch stochastic gradients difference ̃︀∆𝑡𝑖 def= 1 𝜏𝑖 ∑︀ 𝑗∈𝐼𝑡𝑖 ( ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) computed on the node 𝑖 , satisfies E [ ︁̃︀∆𝑡𝑖 | 𝑥𝑡 , 𝑥𝑡+1 ] ︁ = ∆𝑡𝑖 and E [ ︂⃦⃦⃦ ̃︀∆𝑡𝑖 − ∆𝑡𝑖 ⃦⃦⃦2 | 𝑥𝑡 , 𝑥𝑡+1 ] ︂ ≤ ℒ2𝑖𝜏𝑖 ‖𝑥𝑡+1 − 𝑥𝑡‖2 ( 11 ) with some ℒ𝑖 ≥ 0 , where ∆𝑡𝑖 def = ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) . We also define ̃︀ℒ def= 1𝑛 ∑︀𝑛𝑖=1 ( 1−𝑝𝑖 ) ℒ2𝑖𝜏𝑖 . This assumption is satisfied for many standard/popular sampling strategies . For example , if 𝐼𝑡𝑖 is a full batch , then ℒ𝑖 = 0 . Another example is uniform sampling on { 1 , . . . , 𝑚 } , and each 𝑓𝑖𝑗 is 𝐿𝑖𝑗-smooth . In this regime , one may verify that ℒ𝑖 ≤ max1≤𝑗≤𝑚 𝐿𝑖𝑗 . 4.2 MAIN RESULTS Below we formulate the corollary establishing the complexities for each method . The complete version of this result is formulated and rigorously derived for each method in the appendix . Corollary 1 . Suppose that Assumption 1 holds . Then , there exist appropriate choices of parameters for EF21-PP , EF21-BC , EF21-HB , EF21-Prox such that the number of communication rounds 𝑇 and the ( expected ) number of gradient computations at each node # grad for these methods to find an 𝜀-stationary point , i.e. , a point ? ̂ ? 𝑇 such that E [ ‖∇𝑓 ( ? ̂ ? 𝑇 ) ‖2 ] ≤ 𝜀2 for EF21-PP , EF21-BC , EF21-HB and E [ ‖𝒢𝛾 ( ? ̂ ? 𝑇 ) ‖2 ] ≤ 𝜀2 for EF21-Prox , where 𝒢𝛾 ( 𝑥 ) = 1/𝛾 ( ︀ 𝑥− prox𝛾𝑟 ( 𝑥− 𝛾∇𝑓 ( 𝑥 ) ) ) ︀ , are EF21-PP : 𝑇 = 𝒪 ( ︁ ̃︀𝐿𝛿0 𝑝𝛼𝜀2 ) ︁ , # grad = 𝒪 ( ︁ ̃︀𝐿𝛿0 𝛼𝜀2 ) ︁ EF21-BC : 𝑇 = # grad = 𝒪 ( ︁ ̃︀𝐿𝛿0 𝛼𝑤𝛼𝑀𝜀2 ) ︁ EF21-HB : 𝑇 = # grad = 𝒪 ( ︁ ̃︀𝐿𝛿0 𝜀2 ( ︁ 1 𝛼 + 1 1−𝜂 ) ︁ ) ︁ EF21-Prox : 𝑇 = # grad = 𝒪 ( ︁ ̃︀𝐿𝛿0 𝛼𝜀2 ) ︁ , where ̃︀𝐿 def= √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝛿0 def= 𝑓 ( 𝑥0 ) −𝑓 inf ( for EF21-Prox 𝛿0 = Φ ( 𝑥0 ) −Φ𝑖𝑛𝑓 ) , 𝑝 is the probability of sampling the client in EF21-PP , 𝛼𝑤 and 𝛼𝑀 are contraction factors for compressors applied on the workers ’ and the master ’ s sides respectively in EF21-BC , and 𝜂 ∈ [ 0,1 ) is the momentum parameter in EF21-HB . If Assumptions 1 and 2 in the setup from Example 1 hold , then there exist appropriate choices of parameters for EF21-SGD such that the corresponding 𝑇 and the averaged number of gradient computations at each node # grad are EF21-SGD : 𝑇 = 𝒪 ( ︁ ̃︀𝐿𝛿0 𝛼𝜀2 ) ︁ , # grad = 𝒪 ( ︁ ̃︀𝐿𝛿0 𝛼𝜀2 + ̃︀𝐿𝛿0𝜎2 𝛼3𝜀4 ) ︁ , where 𝜎 = 1𝑛 ∑︀𝑛 𝑖=1 𝜎 2 𝑖 . If Assumptions 1 and 3 hold , then there exist appropriate choices of parameters for EF21-PAGE such that the corresponding 𝑇 and # grad are EF21-PAGE : 𝑇 = 𝒪 ( ︁ ( ̃︀𝐿+ ̃︀ℒ ) 𝛿0 𝛼𝜀2 + √ 𝑚 ̃︀ℒ𝛿0 𝜀2 ) ︁ , # grad = 𝒪 ( ︁ 𝑚 + ( ̃︀𝐿+ ̃︀ℒ ) 𝛿0 𝛼𝜀2 + √ 𝑚 ̃︀ℒ𝛿0 𝜀2 ) ︁ , where ̃︀ℒ = √︁ 1−𝑝𝑛 ∑︀𝑛𝑖=1 ℒ2𝑖 , 𝜏𝑖 ≡ 𝜏 = 1 . Remark : We highlight some points for our results in Corollary 1 as follows : ∙ For EF21-PP and EF21-Prox , none of previous error feedback methods work on these two settings ( partial participation and proximal/composite case ) . Thus , we provide the first convergence results for them . Moreover , we show that the gradient ( computation ) complexity for both EF21-PP and EF21-Prox is 𝒪 ( 1/𝛼𝜀 ) , matching the original vanilla EF21 . It means that we extend EF21 to both settings for free . ∙ For EF21-BC , we show 𝒪 ( 1/𝛼𝑤𝛼𝑀𝜀2 ) complexity result . In particular , if one uses constant ratio of compression ( e.g. , 10 % ) , then 𝛼 ≈ 0.1 . Then the result will be 𝒪 ( 1/𝜀2 ) . However , previous result of DoubleSqueeze is 𝒪 ( Δ/𝜀3 ) and it also uses more strict assumption for the compressors ( E [ ‖𝒞 ( 𝑥 ) − 𝑥‖ ] ≤ ∆ ) . Even if we ignore this , our results for EF21-BC is better than the one for DoubleSqueeze by a large factor 1/𝜀 . ∙ Similarly , our result for EF21-HB is roughly 𝒪 ( 1/𝜀2 ) ( note that the momentum parameter 𝜂 is usually constant such as 0.2 , 0.4 , 0.9 used in our experiments ) . However , previous result of M-CSER is roughly 𝒪 ( 𝐺/𝜀3 ) and it is proven under an additional bounded gradient assumption . Similarly , our EF21-HB is better by a large factor 1/𝜀 . ∙ For EF21-SGD and EF21-PAGE , we want to reduce the gradient complexity by using ( variancereduced ) stochastic gradients instead of full gradient in the vanilla EF21 . Note that 𝜎2 and ∆inf in EF21-SGD could be much smaller than 𝐺 in Choco-SGD since 𝐺 always depends on the dimension ( and can be even infinite ) , while 𝜎2 and ∆inf are mostly dimension-free parameters ( particularly , they are very small if the functions/data samples are similar/close ) . Thus , for high dimensional problems ( e.g. , deep neural networks ) , EF21-SGD can be better than Choco-SGD . Besides , in the finite-sum case ( 3 ) , especially if the number of data samples 𝑚 on each client is not very large , then EF21-PAGE is much better since its complexity is roughly 𝒪 ( √ 𝑚/𝜀2 ) while EF21-SGD ones is roughly 𝒪 ( 𝜎2/𝜀4 ) . 5 EXPERIMENTS In this section , we consider a logistic regression problem with a non-convex regularizer min 𝑥∈R𝑑 { ︃ 𝑓 ( 𝑥 ) = 1𝑁 𝑁∑︀ 𝑖=1 log ( ︀ 1 + exp ( ︀ −𝑏𝑖𝑎⊤𝑖 𝑥 ) ︀ ) ︀ + 𝜆 𝑑∑︀ 𝑗=1 𝑥2𝑗 1+𝑥2𝑗 } ︃ , ( 12 ) where 𝑎𝑖 ∈ R𝑑 , 𝑏𝑖 ∈ { −1,1 } are the training data , and 𝜆 > 0 is the regularization parameter , which is set to 𝜆 = 0.1 in all experiments . For all methods the stepsizes are initially chosen as the largest stepsize predicted by theory for EF21 ( see Theorem 1 ) , then they are tuned individually for each parameter setting . We provide more details on the datasets , hardware , experimental setups , and additional experiments , including deep learning experiments in Appendix A . Experiment 1 : Fast convergence with variance reduction . In our first experiment , we showcase the computation and communication superiority of EF21-PAGE ( Alg . 3 ) over EF21-SGD . Figure 8 illustrates that , in all cases , EF21-PAGE perfectly reduces the accumulated variance and converges to the desired tolerance , whereas EF21-SGD is stuck at some accuracy level . Moreover , EF21-PAGE turns out to be surprisingly efficient with small bathsizes ( eg , 1.5 % of the local data ) both in terms of the number of epochs and the # bits sent to the server per client . Interestingly , for most datasets , a further increase of bathsize does not considerably improve the convergence . Experiment 2 : On the effect of partial participation of clients . This experiment shows that EF21-PP ( Alg . 4 ) can reduce communication costs and can be more practical than EF21 . For this comparison , we consider 𝑛 = 100 and , therefore , apply a different data partitioning , see Table 5 from Appendix A for more details . It is predicted by our theory ( Corollary 1 ) that , in terms of the number of iterations/communication rounds , partial participation slows down the convergence of EF21 by a fraction of participating clients . We observe this behavior in practice as well ( see Figure 2a ) . However , since for EF21-PP the communications are considerably cheaper it outperforms EF21 in terms of # number of bits sent to the server per client on average ( see Figure 2 ) . REFERENCES Dan Alistarh , Demjan Grubic , Jerry Li , Ryota Tomioka , and Milan Vojnovic . QSGD : Communicationefficient SGD via gradient quantization and encoding . In Advances in Neural Information Processing Systems ( NIPS ) , pp . 1709–1720 , 2017 . Dan Alistarh , Torsten Hoefler , Mikael Johansson , Sarit Khirirat , Nikola Konstantinov , and Cédric Renggli . The convergence of sparsified gradient methods . In Advances in Neural Information Processing Systems ( NeurIPS ) , 2018 . Zeyuan Allen-Zhu . Katyusha : The first direct acceleration of stochastic gradient methods . In Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing , pp . 1200– 1205 . ACM , 2017 . Yossi Arjevani , Yair Carmon , John C Duchi , Dylan J Foster , Nathan Srebro , and Blake Woodworth . Lower bounds for non-convex stochastic optimization . arXiv preprint arXiv:1912.02365 , 2019 . Sanjeev Arora , Nadav Cohen , and Elad Hazan . On the optimization of deep networks : Implicit acceleration by overparameterization . In Proceedings of the 35th International Conference on Machine Learning ( ICML ) , 2018 . Amir Beck . First-Order Methods in Optimization . Society for Industrial and Applied Mathematics , 2017 . Aleksandr Beznosikov , Samuel Horváth , Peter Richtárik , and Mher Safaryan . On biased compression for distributed learning . arXiv preprint arXiv:2002.12410 , 2020 . Léon Bottou . Curiously fast convergence of some stochastic gradient descent algorithms . In Proceedings of the symposium on learning and data science , Paris , volume 8 , pp . 2624–2633 , 2009 . Léon Bottou . Stochastic gradient descent tricks . In Neural networks : Tricks of the trade , pp . 421–436 . Springer , 2012 . Chih-Chung Chang and Chih-Jen Lin . LIBSVM : a library for support vector machines . ACM Transactions on Intelligent Systems and Technology ( TIST ) , 2 ( 3 ) :1–27 , 2011 . Yae Jee Cho , Jianyu Wang , and Gauri Joshi . Client selection in federated learning : Convergence analysis and power-of-choice selection strategies . arXiv preprint arXiv:2010.01243v1 , 2020 . Eduard Gorbunov , Dmitry Kovalev , Dmitry Makarenko , and Peter Richtárik . Linearly converging error compensated SGD . In 34th Conference on Neural Information Processing Systems ( NeurIPS ) , 2020 . Eduard Gorbunov , Konstantin Burlachenko , Zhize Li , and Peter Richtárik . MARINA : Faster nonconvex distributed learning with compression . In International Conference on Machine Learning , pp . 3788–3798 . PMLR , 2021. arXiv:2102.07845 . Robert M Gower , Mark Schmidt , Francis Bach , and Peter Richtárik . Variance-reduced methods for machine learning . Proceedings of the IEEE , 108 ( 11 ) :1968–1983 , 2020 . Robert Mansel Gower , Nicolas Loizou , Xun Qian , Alibek Sailanbayev , Egor Shulgin , and Peter Richtárik . SGD : General analysis and improved rates . In International Conference on Machine Learning , pp . 5200–5209 . PMLR , 2019 . Priya Goyal , Piotr Dollár , Ross Girshick , Pieter Noordhuis , Lukasz Wesolowski , Aapo Kyrola , Andrew Tulloch , Yangqing Jia , and Kaiming He . Accurate , large minibatch sgd : Training imagenet in 1 hour . arXiv preprint arXiv:1706.02677 , 2017 . Kaiming He , Xiangyu Zhang , Shaoqing Ren , and Jian Sun . Deep residual learning for image recognition . In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition ( CVPR ) , pp . 770–778 , 2016 . Samuel Horváth and Peter Richtárik . A better alternative to error feedback for communicationefficient distributed learning . In 9th International Conference on Learning Representations ( ICLR ) , 2021 . Samuel Horváth , Chen-Yu Ho , L ’ udovít Horváth , Atal Narayan Sahu , Marco Canini , and Peter Richtárik . Natural compression for distributed deep learning . arXiv preprint arXiv:1905.10988 , 2019a . Samuel Horváth , Dmitry Kovalev , Konstantin Mishchenko , Sebastian Stich , and Peter Richtárik . Stochastic distributed learning with gradient quantization and variance reduction . arXiv preprint arXiv:1904.05115 , 2019b . Rustem Islamov , Xun Qian , and Peter Richtárik . Distributed second order methods with fast rates and compressed communication . arXiv preprint arXiv:2102.07158 , 2021 . Peter et al Kairouz . Advances and open problems in federated learning . arXiv preprint arXiv:1912.04977 , 2019 . Sai Praneeth Karimireddy , Quentin Rebjock , Sebastian Stich , and Martin Jaggi . Error feedback fixes SignSGD and other gradient compression schemes . In 36th International Conference on Machine Learning ( ICML ) , 2019 . Sai Praneeth Karimireddy , Satyen Kale , Mehryar Mohri , Sashank Reddi , Sebastian Stich , and Ananda Theertha Suresh . SCAFFOLD : Stochastic controlled averaging for federated learning . In Proceedings of the 37th International Conference on Machine Learning , 2020 . Ahmed Khaled and Peter Richtárik . Gradient descent with compressed iterates . In NeurIPS Workshop on Federated Learning for Data Privacy and Confidentiality , 2019 . Ahmed Khaled and Peter Richtárik . Better theory for SGD in the nonconvex world . arXiv preprint arXiv:2002.03329 , 2020 . Sarit Khirirat , Hamid Reza Feyzmahdavian , and Mikael Johansson . Distributed learning with compressed gradients . arXiv preprint arXiv:1806.06573 , 2018 . Diederik P Kingma and Jimmy Ba . Adam : A method for stochastic optimization . arXiv preprint arXiv:1412.6980 , 2014 . Anastasia Koloskova , Tao Lin , S. Stich , and Martin Jaggi . Decentralized deep learning with arbitrary communication compression . In International Conference on Learning Representations ( ICLR ) , 2020 . Jakub Konečný , H. Brendan McMahan , Felix Yu , Peter Richtárik , Ananda Theertha Suresh , and Dave Bacon . Federated learning : strategies for improving communication efficiency . In NIPS Private Multi-Party Machine Learning Workshop , 2016 . Alex Krizhevsky , Geoffrey Hinton , et al . Learning multiple layers of features from tiny images . Technical report , University of Toronto , Toronto , 2009 . Guanghui Lan and Yi Zhou . An optimal randomized incremental gradient method . arXiv preprint arXiv:1507.02000 , 2015 . Guanghui Lan , Zhize Li , and Yi Zhou . A unified variance-reduced accelerated gradient method for convex optimization . In Advances in Neural Information Processing Systems , pp . 10462–10472 , 2019 . Zhize Li . ANITA : An optimal loopless accelerated variance-reduced gradient method . arXiv preprint arXiv:2103.11333 , 2021a . Zhize Li . A short note of page : Optimal convergence rates for nonconvex optimization . arXiv preprint arXiv:2106.09663 , 2021b . Zhize Li and Jian Li . A simple proximal stochastic gradient method for nonsmooth nonconvex optimization . In Advances in Neural Information Processing Systems ( NeurIPS ) , pp . 5569–5579 , 2018 . Zhize Li and Peter Richtárik . A unified analysis of stochastic gradient methods for nonconvex federated optimization . arXiv preprint arXiv:2006.07013 , 2020 . Zhize Li and Peter Richtárik . CANITA : Faster rates for distributed convex optimization with communication compression . arXiv preprint arXiv:2107.09461 , 2021a . Zhize Li and Peter Richtárik . ZeroSARAH : Efficient nonconvex finite-sum optimization with zero full gradient computation . arXiv preprint arXiv:2103.01447 , 2021b . Zhize Li , Dmitry Kovalev , Xun Qian , and Peter Richtárik . Acceleration for compressed gradient descent in distributed and federated optimization . In International Conference on Machine Learning ( ICML ) , pp . 5895–5904 . PMLR , 2020 . Zhize Li , Hongyan Bao , Xiangliang Zhang , and Peter Richtárik . PAGE : A simple and optimal probabilistic gradient estimator for nonconvex optimization . In International Conference on Machine Learning ( ICML ) , pp . 6286–6295 . PMLR , 2021. arXiv:2008.10898 . Nicolas Loizou and Peter Richtárik . Momentum and stochastic momentum for stochastic gradient , Newton , proximal point and subspace descent methods . Computational Optimization and Applications , 77:653–710 , 2020 . Stanislaw Lojasiewicz . A topological property of real analytic subsets . Coll . du CNRS , Les équations aux dérivées partielles , 117 ( 87-89 ) :2 , 1963 . Konstantin Mishchenko , Eduard Gorbunov , Martin Takáč , and Peter Richtárik . Distributed learning with compressed gradient differences . arXiv preprint arXiv:1901.09269 , 2019 . Konstantin Mishchenko , Ahmed Khaled , and Peter Richtarik . Random reshuffling : Simple analysis with vast improvements . In H. Larochelle , M. Ranzato , R. Hadsell , M. F. Balcan , and H. Lin ( eds . ) , Advances in Neural Information Processing Systems , volume 33 , pp . 17309–17320 . Curran Associates , Inc. , 2020 . URL https : //proceedings.neurips.cc/paper/2020/file/ c8cc6e90ccbff44c9cee23611711cdc4- [ ] Paper.pdf . Yurii Nesterov . A method for unconstrained convex minimization problem with the rate of convergence o ( 1/kˆ 2 ) . In Doklady AN USSR , volume 269 , pp . 543–547 , 1983 . Adam Paszke , Sam Gross , Francisco Massa , Adam Lerer , James Bradbury , Gregory Chanan , Trevor Killeen , Zeming Lin , Natalia Gimelshein , Luca Antiga , et al . Pytorch : An imperative style , high-performance deep learning library . In Advances in Neural Information Processing Systems ( NeurIPS ) , 2019 . Constantin Philippenko and Aymeric Dieuleveut . Bidirectional compression in heterogeneous settings for distributed or federated learning with partial participation : tight convergence guarantees . arXiv preprint arXiv:2006.14591 , 2020 . Boris T Polyak . Gradient methods for the minimisation of functionals . USSR Computational Mathematics and Mathematical Physics , 3 ( 4 ) :864–878 , 1963 . Boris T Polyak . Some methods of speeding up the convergence of iteration methods . Ussr computational mathematics and mathematical physics , 4 ( 5 ) :1–17 , 1964 . Xun Qian , Peter Richtárik , and Tong Zhang . Error compensated distributed SGD can be accelerated . arXiv preprint arXiv:2010.00091 , 2020 . Zheng Qu and Peter Richtárik . Coordinate descent with arbitrary sampling ii : Expected separable overapproximation . arXiv preprint arXiv:1412.8063 , 2014 . Peter Richtárik , Igor Sokolov , and Ilyas Fatkhullin . EF21 : A new , simpler , theoretically better , and practically faster error feedback . arXiv preprint arXiv:2106.05203 , 2021 . Mher Safaryan , Rustem Islamov , Xun Qian , and Peter Richtárik . FedNL : Making Newton-type methods applicable to federated learning . arXiv preprint arXiv:2106.02969 , 2021 . Frank Seide , Hao Fu , Jasha Droppo , Gang Li , and Dong Yu . 1-bit stochastic gradient descent and its application to data-parallel distributed training of speech DNNs . In Fifteenth Annual Conference of the International Speech Communication Association , 2014 . Shai Shalev-Shwartz and Shai Ben-David . Understanding machine learning : from theory to algorithms . Cambridge University Press , 2014 . Sebastian U. Stich , J.-B . Cordonnier , and Martin Jaggi . Sparsified SGD with memory . In Advances in Neural Information Processing Systems ( NeurIPS ) , 2018 . Hanlin Tang , Xiangru Lian , Chen Yu , Tong Zhang , and Ji Liu . DoubleSqueeze : Parallel stochastic gradient descent with double-pass error-compensated compression . In Proceedings of the 36th International Conference on Machine Learning ( ICML ) , 2020 . Thijs Vogels , Sai Praneeth Karimireddy , and Martin Jaggi . PowerSGD : Practical low-rank gradient compression for distributed optimization . In Neural Information Processing Systems , 2019 . Zhe Wang , Kaiyi Ji , Yi Zhou , Yingbin Liang , and Vahid Tarokh . Spiderboost and momentum : Faster stochastic variance reduction algorithms . arXiv preprint arXiv:1810.10690 , 2018 . Cong Xie , Shuai Zheng , Oluwasanmi Koyejo , Indranil Gupta , Mu Li , and Haibin Lin . CSER : Communication-efficient SGD with error reset . In Advances in Neural Information Processing Systems ( NeurIPS ) , pp . 12593–12603 , 2020 . Haibo Yang , Minghong Fang , and Jia Liu . Achieving linear speedup with partial worker participation in non-iid federated learning . arXiv preprint arXiv:2101.11203v3 , 2021 . Tianbao Yang , Qihang Lin , and Zhe Li . Unified convergence analysis of stochastic momentum methods for convex and non-convex optimization . arXiv preprint arXiv:1604.03257 , 2016 . Yang You , Jing Li , Sashank Reddi , Jonathan Hseu , Sanjiv Kumar , Srinadh Bhojanapalli , Xiaodan Song , James Demmel , Kurt Keutzer , and Cho-Jui Hsieh . Large batch optimization for deep learning : Training bert in 76 minutes . In International Conference on Learning Representations , 2020 . URL https : //openreview.net/forum ? id=Syx4wnEtvH . Haoyu Zhao , Zhize Li , and Peter Richtárik . FedPAGE : A fast local stochastic gradient method for communication-efficient federated learning . arXiv preprint arXiv:2108.04755 , 2021 . TABLE OF CONTENTS 1 Introduction 1 2 Our Contributions 2 3 Methods 4 4 Theoretical Convergence Results 6 4.1 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4.1.1 General Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4.1.2 Addtional Assumptions for EF21-SGD . . . . . . . . . . . . . . . . . . . 6 4.1.3 Additional Assumptions for EF21-PAGE . . . . . . . . . . . . . . . . . . . 7 4.2 Main Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 5 Experiments 8 A Extra Experiments 15 A.1 Non-Convex Logistic Regression : Additional Experiments and Details . . . . . . . 15 A.2 Experiments with Least Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 A.3 Deep Learning Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 B Notations and Assumptions 22 C EF21 23 C.1 Convergence for General Non-Convex Functions . . . . . . . . . . . . . . . . . . 23 C.2 Convergence under Polyak-Łojasiewicz Condition . . . . . . . . . . . . . . . . . . 25 D Stochastic Gradients 27 D.1 Convergence for General Non-Convex Functions . . . . . . . . . . . . . . . . . . 28 D.2 Convergence under Polyak-Łojasiewicz Condition . . . . . . . . . . . . . . . . . . 32 E Variance Reduction 35 E.1 Convergence for General Non-Convex Functions . . . . . . . . . . . . . . . . . . 37 E.2 Convergence under Polyak-Łojasiewicz Condition . . . . . . . . . . . . . . . . . . 41 F Partial Participation 44 F.1 Convergence for General Non-Convex Functions . . . . . . . . . . . . . . . . . . 47 F.2 Convergence under Polyak-Łojasiewicz Condition . . . . . . . . . . . . . . . . . . 48 G Bidirectional Compression 49 G.1 Convergence for General Non-Convex Functions . . . . . . . . . . . . . . . . . . 51 G.2 Convergence under Polyak-Łojasiewicz Condition . . . . . . . . . . . . . . . . . . 53 H Heavy Ball Momentum 55 H.1 Convergence for General Non-Convex Functions . . . . . . . . . . . . . . . . . . 57 I Composite Case 63 I.1 Convergence for General Non-Convex Functions . . . . . . . . . . . . . . . . . . 65 I.2 Convergence under Polyak-Łojasiewicz Condition . . . . . . . . . . . . . . . . . . 67 J Useful Auxiliary Results 70 J.1 Basic Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 J.2 Useful Lemmas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 A EXTRA EXPERIMENTS In this section , we give missing details on the experiments from Section 5 , and provide additional experiments . A.1 NON-CONVEX LOGISTIC REGRESSION : ADDITIONAL EXPERIMENTS AND DETAILS Datasets , hardware and implementation . We use standard LibSVM datasets ( Chang & Lin , 2011 ) , and split each dataset among 𝑛 clients . For experiments 1 , 3 , 4 and 5 , we chose 𝑛 = 20 whereas for the experiment 2 we consider 𝑛 = 100 . The first 𝑛−1 clients own equal parts , and the remaining part , of size 𝑁 − 𝑛 · ⌊𝑁/𝑛⌋ , is assigned to the last client . We consider the heterogeneous data distribution regime ( i.e . we do not make any additional assumptions on data similarity between workers ) . A summary of datasets and details of splitting data among workers can be found in Tables 3 and 5 . The algorithms are implemented in Python 3.8 ; we use 3 different CPU cluster node types in all experiments : 1 ) AMD EPYC 7702 64-Core ; 2 ) Intel ( R ) Xeon ( R ) Gold 6148 CPU @ 2.40GHz ; 3 ) Intel ( R ) Xeon ( R ) Gold 6248 CPU @ 2.50GHz . In all algorithms involving compression , we use Top-𝑘 ( Alistarh et al. , 2017 ) as a canonical example of contractive compressor 𝒞 , and fix the compression ratio 𝑘/𝑑 ≈ 0.01 , where 𝑑 is the number of features in the dataset . For all algorithms , at each iteration we compute the squared norm of the exact/full gradient for comparison of the methods performance . We terminate our algorithms either if they reach the certain number of iterations or the following stopping criterion is satisfied : ‖∇𝑓 ( 𝑥𝑡 ) ‖2 ≤ 10−7 . In all experiments , the stepsize is set to the largest stepsize predicted by theory for EF21 multiplied by some constant multiplier which was individually tuned in all cases . Experiment 1 : Fast convergence with variance reductions ( extra details ) . The parameters 𝑝𝑖 of the PAGE estimator are set to 𝑝𝑖 = 𝑝 def = 1𝑛 ∑︀𝑛 𝑖=1 𝜏𝑖 𝜏𝑖+𝑁𝑖 , where 𝜏𝑖 is the batchsize for clients 𝑖 = 1 , . . . , 𝑛 ( see Table 4 for details ) . In our experiments , we assume that the sampling of Bernoulli random variable is performed on server side ( which means that at each iteration for all clients 𝑏𝑡𝑖 = 1 or 𝑏𝑡𝑖 = 0 ) . And if 𝑏 𝑡 𝑖 = 0 , then in line 5 of Algorithm 3 𝐼 𝑡 𝑖 is sampled without replacement uniformly at random . Table 4 shows the selection of parameter 𝑝 for each experiment . For each batchsize from the set2 { 95 % , 50 % , 25 % ,12.5 % , 6.5 % ,3 % } , we tune the stepsize multiplier for EF21-PAGE within the set { 0.25 , 0.5 , 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , 256 , 512 , 1024 , 2048 } . The best pair ( batchsize , stepsize multiplier ) is chosen in such a way that it gives the best convergence in terms of # bits/𝑛 ( 𝐶 → 𝑆 ) . In the rest of the experiments , fine tuning is performed in a similar fashion . 2By 50 % , 25 % ( and so on ) we refer to a batchsize , which is equals to ⌊0.5𝑁𝑖⌋ , ⌊0.25𝑁𝑖⌋ ( and so on ) for all clients 𝑖 = 1 , . . . , 𝑛 . We tune the stepsize multiplier for EF21-PP within the following set : { 0.125,0.25 , 0.5 , 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , 256 , 512 , 1024 , 2048 , 4096 } . Experiment 3 : On the advantages of bidirectional biased compression . Our next experiment demonstrates that the application of the Server → Clients compression in EF21-BC ( Alg . 5 ) does not significantly slow down the convergence in terms of the communication rounds but requires much less bits to be transmitted . Indeed , Figure 3a illustrates that that it is sufficient to communicate only 5 % − 15 % of data to perform similarly to EF21 ( Alg . 1 ) .3 Note that EF21 communicates full vectors from the Server → Clients , and , therefore , may have slower communication at each round . In Figure 3b we take into account only the number of bits sent from clients to the server , and therefore we observe the same behavior as in Figure 3a . However , if we care about the total number of bits ( see Figure 3c ) , then EF21-BC considerably outperforms EF21 in all cases . 3The range 5 % − 15 % comes from the fractions 𝑘/𝑑 for each dataset . For each parameter 𝑘 in Server-Clients compression , we tune the stepsize multiplier for EF21-BC within the following set : { 0.125,0.25 , 0.5 , 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , 256 , 512 , 1024 , 2048 } . Experiment 4 : On the cheaper computations via EF21-SGD . The fourth experiment ( see Figure 4a ) illustrates that EF21-SGD ( Alg . 2 ) is the more preferable choice than EF21 for the cases when full gradient computations are costly . For each batchsize from the set4 { 95 % , 50 % , 25 % ,12.5 % , 6.5 % ,3 % } , we tune the stepsize multiplier for EF21-SGD within the following set : { 0.25 , 0.5 , 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , 256 , 512 , 1024 , 2048 } . Figure 4a illustrates that EF21-SGD is able to reach a moderate tolerance in 5 − 10 epochs . 4By 50 % , 25 % ( and so on ) we refer to a batchsize , which is equals to ⌊0.5𝑁𝑖⌋ , ⌊0.25𝑁𝑖⌋ ( and so on ) for all clients 𝑖 = 1 , . . . , 𝑛 . However , due to the accumulated variance introduced by SGD , estimator EF21-SGD is stuck at some accuracy level ( see Figure 4b ) , showing the usual behavior of the SGD observed in practice . Experiment 5 : On the effect of heavy ball momentum . In this experiment ( see Figure 5 ) , we show that for the majority of the considered datasets heavy ball acceleration used in EF21-HB ( Alg . 6 ) improves the convergence of EF21 method . For every dataset ( and correspondingly chosen parameter 𝑘 ) we tune momentum parameter 𝜂 in EF21-HB by making a grid search over all possible parameter values from 0.05 to 0.99 with the step 0.05 . Finally , for our plots we pick 𝜂 ∈ { 0.05 , 0.2 , 0.25 , 0.4 , 0.9 } since the first four values shows the best performance and 𝜂 = 0.9 is a popular choice in practice . For each parameter 𝜂 from the set { 0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,0.99 } . we perform a grid search of stepsize multiplier within the powers of 2 : { 0.125 , 0.25 , 0.5 , 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , 256 , 512 , 1024 , 2048 } . Experiments on a larger dataset . In these additional experiments , we test our methods on larger problem and dataset . The dimension of the dataset used in these experiments is 𝑑 = 20958 . Each method is run for 500 epochs . In this case , we observe a similar behavior as in our previous experiments . Comparison to non-compressed methods . In addition , we compare EF21-PAGE and EF21-SGD to the baseline methods without compression : PAGE ( Figure 8a ) and SGD ( Figure 9a ) . In these experiments , we observe that EF21-PAGE and EF21-SGD require much less information to transmit in order to achieve the same accuracy of the solution as the methods without compression ( PAGE , SGD ) . A.2 EXPERIMENTS WITH LEAST SQUARES In this section , we conduct the experiments on a function satisfying the PŁ-condition ( see Assumption 4 ) . In particular , we consider the least squares problem : min 𝑥∈R𝑑 { ︃ 𝑓 ( 𝑥 ) = 1 𝑛 𝑛∑︁ 𝑖=1 ( 𝑎⊤𝑖 𝑥− 𝑏𝑖 ) 2 } ︃ , where 𝑎𝑖 ∈ R𝑑 , 𝑏𝑖 ∈ { −1,1 } are the training data . We use the same datasets as for the logistic regression problem . Experiment : On the effect of heavy ball momentum in PŁ-setting . For PŁ-setting , EF21-HB also improves the convergence over EF21 for the majority of the datasets ( see Figure 10 ) . Stepsize and momentum parameter 𝜂 are chosen using the same strategy as for the logistic regression experiments ( see section A.1 ) . A.3 DEEP LEARNING EXPERIMENTS In this experiment , the exact/full gradient ∇𝑓𝑖 ( 𝑥𝑘+1 ) in the algorithm EF21-HB is replaced by its stochastic estimator ( we later refer to this method as EF21-SGD-HB ) . We compare the resulting method with some existing baselines on a deep learning multi-class image classification task . In particular , we compare our EF21-SGD-HB method to EF21+-SGD-HB5 , EF-SGD-HB6 , EF21-SGD 5EF21+-SGD-HB is the method obtained from EF21-SGD-HB via replacing EF21 by EF21+ compressor 6EF-SGD-HB is the method obtained from EF21-SGD-HB via replacing EF21 by EF compressor and EF-SGD on the problem of training ResNet18 ( He et al. , 2016 ) model on CIFAR-10 ( Krizhevsky et al. , 2009 ) dataset . For more details about the EF21+ and EF type methods and their applications in deep learning we refer reader to ( Richtárik et al. , 2021 ) . We implement the algorithms in PyTorch ( Paszke et al. , 2019 ) and run the experiments on a single GPU NVIDIA GeForce RTX 2080 Ti . The dataset is split into 𝑛 = 8 equal parts . Total train set size for CIFAR-10 is 50,000 . The test set for evaluation has 10,000 data points . The train set is split into batches of size 𝜏 = 32 . The first seven workers own an equal number of batches of data , while the last worker gets the rest . In our experiments , we fix 𝑘 ≈ 0.05𝑑 , 𝜏 = 32 and momentum parameter 𝜂 = 0.9.7 As it is usually done in deep learning applications , stochastic gradients are generated via so-called “ shuffle once ” strategy , i.e. , workers randomly shuffle their datasets and then select minibatches using the obtained order ( Bottou , 2009 ; 2012 ; Mishchenko et al. , 2020 ) . We tune the stepsize 𝛾 within the range { 0.0625 , 0.125 , 0.25 , 0.5 , 1 } and for each method we individually chose the one 𝛾 giving the highest accuracy score on test . For momentum methods , the best stepsize was 0.5 , whereas for the non-momentum ones it was 0.125 . The experiments show ( see Figure 11 ) that the train loss for momentum methods decreases slower than for the non-momentum ones , whereas for the test loss situation is the opposite . Finally , momentum methods show a considerable improvement in the accuracy score on the test set over the existing EF21-SGD and EF-SGD . 7Here , 𝑑 is the number of model parameters . For ResNet18 , 𝑑 = 11,511,784 . B NOTATIONS AND ASSUMPTIONS We now introduce an additional assumption , which enables us to obtain a faster linear convergence result in different settings . Assumption 4 ( Polyak-Łojasiewicz ) . There exists 𝜇 > 0 such that 𝑓 ( 𝑥 ) − 𝑓 ( 𝑥⋆ ) ≤ 12𝜇 ‖∇𝑓 ( 𝑥 ) ‖ 2 for all 𝑥 ∈ R𝑑 , where 𝑥⋆ = arg min𝑥∈R𝑑 𝑓 . Table 6 summarizes the most frequently used notations in our analysis . Additionally , we comment on the main quantities here . We define 𝛿𝑡 def= 𝑓 ( 𝑥𝑡 ) −𝑓 inf 8 , 𝑅𝑡 def= ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . In the analysis of EF21- HB , it is useful to adapt this notation to 𝑅𝑡 def= ( 1 − 𝜂 ) 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 , where { 𝑧𝑡 } 𝑡≥0 is the sequence of virtual iterates introduced in Section H. We denote 𝐺𝑡𝑖 def = ‖∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑔𝑡𝑖‖ 2 , 𝐺𝑡 def= 1𝑛 ∑︀𝑛 𝑖=1 𝐺 𝑡 𝑖 following Richtárik et al . ( 2021 ) , where 𝑔𝑡𝑖 is an EF21 estimator at a node 𝑖 . Throughout the paper̃︀𝐿2 def= 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , where 𝐿𝑖 is a smoothness constant for 𝑓𝑖 ( · ) , 𝑖 = 1 , . . . , 𝑛 ( see Assumption 1 ) . 8If , additionally , Assumption 4 holds , then 𝑓 inf can be replaced by 𝑓 ( 𝑥⋆ ) for 𝑥⋆ = argmin𝑥∈R𝑑 𝑓 ( 𝑥 ) . C EF21 For completeness , we provide here the detailed proofs for EF21 ( Richtárik et al. , 2021 ) . Algorithm 1 EF21 1 : Input : starting point 𝑥0 ∈ R𝑑 ; 𝑔0𝑖 ∈ R𝑑 for 𝑖 = 1 , . . . , 𝑛 ( known by nodes ) ; 𝑔0 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 0 𝑖 ( known by master ) ; learning rate 𝛾 > 0 2 : for 𝑡 = 0,1 , 2 , . . . , 𝑇 − 1 do 3 : Master computes 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 and broadcasts 𝑥𝑡+1 to all nodes 4 : for all nodes 𝑖 = 1 , . . . , 𝑛 in parallel do 5 : Compress 𝑐𝑡𝑖 = 𝒞 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ) and send 𝑐𝑡𝑖 to the master 6 : Update local state 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 + 𝑐 𝑡 𝑖 7 : end for 8 : Master computes 𝑔𝑡+1 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 𝑡+1 𝑖 via 𝑔 𝑡+1 = 𝑔𝑡 + 1𝑛 ∑︀𝑛 𝑖=1 𝑐 𝑡 𝑖 9 : end for Lemma 1 . Let 𝒞 be a contractive compressor , then for all 𝑖 = 1 , . . . , 𝑛 E [ ︀ 𝐺𝑡+1𝑖 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽𝐿2𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ , and ( 13 ) E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽̃︀𝐿2E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁ , ( 14 ) where 𝜃 def = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 def= ( 1 − 𝛼 ) ( ︀ 1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . Define 𝑊 𝑡 def= { 𝑔𝑡1 , . . . , 𝑔𝑡𝑛 , 𝑥𝑡 , 𝑥𝑡+1 } , then E [ ︀ 𝐺𝑡+1𝑖 ] ︀ = E [ ︀ E [ ︀ 𝐺𝑡+1𝑖 | 𝑊 𝑡 ] ︀ ] ︀ = E [ ︁ E [ ︁⃦⃦ 𝑔𝑡+1𝑖 −∇𝑓𝑖 ( 𝑥 𝑡+1 ) ⃦⃦2 | 𝑊 𝑡 ] ︁ ] ︁ = E [ ︁ E [ ︁⃦⃦ 𝑔𝑡𝑖 + 𝒞 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ) −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 | 𝑊 𝑡 ] ︁ ] ︁ ( 8 ) ≤ ( 1 − 𝛼 ) E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ⃦⃦2 ] ︁ ( 𝑖 ) ≤ ( 1 − 𝛼 ) ( 1 + 𝑠 ) E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑔𝑡𝑖 ⃦⃦2 ] ︁ + ( 1 − 𝛼 ) ( ︀ 1 + 𝑠−1 ) ︀ ⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ( 15 ) ( 𝑖𝑖 ) ≤ ( 1 − 𝛼 ) ( 1 + 𝑠 ) E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑔𝑡𝑖 ⃦⃦2 ] ︁ + ( 1 − 𝛼 ) ( ︀ 1 + 𝑠−1 ) ︀ 𝐿2𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ ( 𝑖𝑖𝑖 ) ≤ ( 1 − 𝜃 ) E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑔𝑡𝑖 ⃦⃦2 ] ︁ + 𝛽𝐿2𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ , where ( 𝑖 ) follows by Young ’ s inequality ( 118 ) , ( 𝑖𝑖 ) holds by Assumption 1 , and in ( 𝑖𝑖𝑖 ) we apply the definition of 𝜃 and 𝛽 . Averaging the above inequalities over 𝑖 = 1 , . . . , 𝑛 , we obtain ( 14 ) . C.1 CONVERGENCE FOR GENERAL NON-CONVEX FUNCTIONS Theorem 1 . Let Assumption 1 hold , and let the stepsize in Algorithm 1 be set as 0 < 𝛾 ≤ ( ︃ 𝐿 + ̃︀𝐿√︂𝛽 𝜃 ) ︃−1 . ( 16 ) Fix 𝑇 ≥ 1 and let ? ̂ ? 𝑇 be chosen from the iterates 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Then E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 2 ( ︀𝑓 ( 𝑥0 ) − 𝑓 inf ) ︀ 𝛾𝑇 + E [ ︀ 𝐺0 ] ︀ 𝜃𝑇 , ( 17 ) where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . According to our notation , for Algorithm 1 𝑅𝑡 = ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . By Lemma 1 , we have E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ . ( 18 ) Next , using Lemma 16 and Jensen ’ s inequality ( 119 ) , we obtain the bound 𝑓 ( 𝑥𝑡+1 ) ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 ⃦⃦⃦⃦ ⃦ 1𝑛 𝑛∑︁ 𝑖=1 ( ︀ 𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ) ︀⃦⃦⃦⃦⃦ 2 ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 1 𝑛 𝑛∑︁ 𝑖=1 ⃦⃦ 𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 = 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 𝐺𝑡 . ( 19 ) Subtracting 𝑓 inf from both sides of the above inequality , taking expectation and using the notation 𝛿𝑡 = 𝑓 ( 𝑥𝑡 ) − 𝑓 inf , we get E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ . ( 20 ) Then by adding ( 20 ) with a 𝛾2𝜃 multiple of ( 18 ) we obtain E [ ︀ 𝛿𝑡+1 ] ︀ + 𝛾 2𝜃 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ + 𝛾 2𝜃 ( ︁ 𝛽̃︀𝐿2E [ ︀𝑅𝑡 ] ︀+ ( 1 − 𝜃 ) E [ ︀𝐺𝑡 ] ︀ ) ︁ = E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 2𝜃 E [ ︀ 𝐺𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ − ( ︂ 1 2𝛾 − 𝐿 2 − 𝛾 2𝜃 𝛽̃︀𝐿2 ) ︂E [ ︀𝑅𝑡 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 2𝜃 E [ ︀ 𝐺𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ . The last inequality follows from the bound 𝛾2 𝛽 ̃︀𝐿2 𝜃 + 𝐿𝛾 ≤ 1 , which holds because of Lemma 15 and our assumption on the stepsize . By summing up inequalities for 𝑡 = 0 , . . . , 𝑇 − 1 , we get 0 ≤ E [ ︁ 𝛿𝑇 + 𝛾 2𝜃 𝐺𝑇 ] ︁ ≤ 𝛿0 + 𝛾 2𝜃 E [ ︀ 𝐺0 ] ︀ − 𝛾 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ . Multiplying both sides by 2𝛾𝑇 , after rearranging we get 𝑇−1∑︁ 𝑡=0 1 𝑇 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2𝛿0 𝛾𝑇 + E [ ︀ 𝐺0 ] ︀ 𝜃𝑇 . It remains to notice that the left hand side can be interpreted as E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ , where ? ̂ ? 𝑇 is chosen from 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Corollary 2 . Let assumptions of Theorem 1 hold , 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = ( ︁ 𝐿 + ̃︀𝐿√︀𝛽/𝜃 ) ︁−1 . Then , after 𝑇 iterations/communication rounds of EF21 we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = # grad = 𝒪 ( ︃ ̃︀𝐿𝛿0 𝛼𝜀2 ) ︃ iterations/communications rounds/gradint computations at each node , where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 𝑖𝑛𝑓 . Proof . Since 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , we have 𝐺0 = 0 and by Theorem 1 # grad = 𝑇 ( 𝑖 ) ≤ 2𝛿 0 𝛾𝜀2 ( 𝑖𝑖 ) ≤ 2𝛿 0 𝜀2 ( ︃ 𝐿 + ̃︀𝐿√︂𝛽 𝜃 ) ︃ ( 𝑖𝑖𝑖 ) ≤ 2𝛿 0 𝜀2 ( ︂ 𝐿 + ̃︀𝐿 ( ︂ 2 𝛼 − 1 ) ︂ ) ︂ ≤ 2𝛿 0 𝜀2 ( ︃ 𝐿 + 2̃︀𝐿 𝛼 ) ︃ ( 𝑖𝑣 ) ≤ 2𝛿 0 𝜀2 ( ︃ ̃︀𝐿 𝛼 + 2̃︀𝐿 𝛼 ) ︃ = 6̃︀𝐿𝛿0 𝛼𝜀2 , where in ( 𝑖 ) is due to the rate ( 17 ) given by Theorem 1 . In two ( 𝑖𝑖 ) we plug in the stepsize , in ( 𝑖𝑖𝑖 ) we use Lemma 17 , and ( 𝑖𝑣 ) follows by the inequalities 𝛼 ≤ 1 , and 𝐿 ≤ ̃︀𝐿 . C.2 CONVERGENCE UNDER POLYAK-ŁOJASIEWICZ CONDITION Theorem 2 . Let Assumptions 1 and 4 hold , and let the stepsize in Algorithm 1 be set as 0 < 𝛾 ≤ min ⎧⎨⎩ ( ︃ 𝐿 + ̃︀𝐿√︂2𝛽 𝜃 ) ︃−1 , 𝜃 2𝜇 ⎫⎬⎭ . ( 21 ) Let Ψ𝑡 def = 𝑓 ( 𝑥𝑡 ) − 𝑓 ( 𝑥⋆ ) + 𝛾𝜃𝐺 𝑡 . Then for any 𝑇 ≥ 0 , we have E [ ︀ Ψ𝑇 ] ︀ ≤ ( 1 − 𝛾𝜇 ) 𝑇E [ ︀ Ψ0 ] ︀ , ( 22 ) where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . We proceed as in the previous proof , but use the PL inequality , subtract 𝑓 ( 𝑥⋆ ) from both sides of ( 19 ) and utilize the notation 𝛿𝑡 = 𝑓 ( 𝑥𝑡 ) − 𝑓 ( 𝑥⋆ ) 𝛿𝑡+1 ≤ 𝛿𝑡 − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 𝐺𝑡 ≤ 𝛿𝑡 − 𝛾𝜇 ( ︀ 𝑓 ( 𝑥𝑡 ) − 𝑓 ( 𝑥⋆ ) ) ︀ − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 𝐺𝑡 . = ( 1 − 𝛾𝜇 ) 𝛿𝑡 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 𝐺𝑡 . Take expectation on both sides of the above inequality and add it with a 𝛾𝜃 multiple of ( 18 ) , then E [ ︀ 𝛿𝑡+1 ] ︀ + E [ ︁𝛾 𝜃 𝐺𝑡+1 ] ︁ ≤ ( 1 − 𝛾𝜇 ) E [ ︀ 𝛿𝑡 ] ︀ − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ + 𝛾 𝜃 ( ︁ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ ) ︁ = ( 1 − 𝛾𝜇 ) E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 𝜃 ( ︂ 1 − 𝜃 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ − ( ︃ 1 2𝛾 − 𝐿 2 − 𝛽 ̃︀𝐿2𝛾 𝜃 ) ︃ E [ ︀ 𝑅𝑡 ] ︀ . Note that our assumption on the stepsize implies that 1 − 𝜃2 ≤ 1 − 𝛾𝜇 and 1 2𝛾 − 𝐿 2 − 𝛽̃︀𝐿2𝛾 𝜃 ≥ 0 . The last inequality follows from the bound 𝛾2 2𝛽 ̃︀𝐿2 𝜃 + 𝛾𝐿 ≤ 1 , which holds because of Lemma 15 and our assumption on the stepsize . Thus , E [ ︁ 𝛿𝑡+1 + 𝛾 𝜃 𝐺𝑡+1 ] ︁ ≤ ( 1 − 𝛾𝜇 ) E [ ︁ 𝛿𝑡 + 𝛾 𝜃 𝐺𝑡 ] ︁ . It remains to unroll the recurrence . Corollary 3 . Let assumptions of Theorem 2 hold , 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = min ⎧⎨⎩ ( ︃ 𝐿 + ̃︀𝐿√︂2𝛽 𝜃 ) ︃−1 , 𝜃 2𝜇 ⎫⎬⎭ . Then , after 𝑇 iterations/communication rounds of EF21 we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 ( 𝑥⋆ ) ] ︀ ≤ 𝜀 . It requires 𝑇 = # grad = 𝒪 ( ︃ ̃︀𝐿 𝛼𝜇 log ( ︂ 𝛿0 𝜀 ) ︂ ) ︃ ( 23 ) iterations/communications rounds/gradint computations at each node , where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 𝑖𝑛𝑓 . Proof . Notice that min ⎧⎨⎩ ( ︃ 𝐿 + ̃︀𝐿√︂2𝛽 𝜃 ) ︃−1 , 𝜃 2𝜇 ⎫⎬⎭𝜇 ( 𝑖 ) ≥ min { ︃ 𝜇 ( ︂ 𝐿 + ̃︀𝐿√2 ( ︂ 2 𝛼 − 1 ) ︂ ) ︂−1 , 1 − √ 1 − 𝛼 2 } ︃ ( 𝑖𝑖 ) ≥ min ⎧⎨⎩𝜇 ( ︃ 𝐿 + 2 √ 2̃︀𝐿 𝛼 ) ︃−1 , 𝛼 4 ⎫⎬⎭ ( 𝑖𝑖𝑖 ) ≥ min ⎧⎨⎩𝜇 ( ︃ ( 1 + 2 √ 2 ) ̃︀𝐿 𝛼 ) ︃−1 , 𝛼 4 ⎫⎬⎭ = min { ︃ 𝛼𝜇 ( 1 + 2 √ 2 ) ̃︀𝐿 , 𝛼4 } ︃ ≥ min { ︂ 𝛼𝜇 4̃︀𝐿 , 𝛼4 } ︂ = 𝛼𝜇 4̃︀𝐿 , where in ( 𝑖 ) we apply Lemma 17 , and plug in 𝜃 = 1 − √ 1 − 𝛼 according to Lemma 17 , ( 𝑖𝑖 ) follows by √ 1 − 𝛼 ≤ 1 − 𝛼/2 , ( 𝑖𝑖𝑖 ) follows by the inequalities 𝛼 ≤ 1 , and 𝐿 ≤ ̃︀𝐿 . Let 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , then 𝐺0 = 0 . Thus using ( 22 ) and the above computations , we arrive at # grad = 𝑇≤ log ( ︁ 𝛿0 𝜀 ) ︁ log ( 1 − 𝛾𝜇 ) −1 ( 𝑖 ) ≤ 1 𝛾𝜇 log ( ︂ 𝛿0 𝜀 ) ︂ ≤ 4 ̃︀𝐿 𝛼𝜇 log ( ︂ 𝛿0 𝜀 ) ︂ , where ( 𝑖 ) is due to ( 122 ) . D STOCHASTIC GRADIENTS In this section , we study the extension of EF21 to the case when stochastic gradients are used instead of full gradients . Algorithm 2 EF21-SGD 1 : Input : starting point 𝑥0 ∈ R𝑑 ; 𝑔0𝑖 ∈ R𝑑 ( known by nodes ) ; 𝑔0 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 0 𝑖 ( known by master ) ; learning rate 𝛾 > 0 2 : for 𝑡 = 0,1 , 2 , . . . , 𝑇 − 1 do 3 : Master computes 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 and broadcasts 𝑥𝑡+1 to all nodes 4 : for all nodes 𝑖 = 1 , . . . , 𝑛 in parallel do 5 : Compute a stochastic gradient 𝑔𝑖 ( 𝑥𝑡+1 ) = 1𝜏 ∑︀𝜏 𝑗=1 ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡+1 ) 6 : Compress 𝑐𝑡𝑖 = 𝒞 ( 𝑔𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ) and send 𝑐𝑡𝑖 to the master 7 : Update local state 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 + 𝑐 𝑡 𝑖 8 : end for 9 : Master computes 𝑔𝑡+1 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 𝑡+1 𝑖 via 𝑔 𝑡+1 = 𝑔𝑡 + 1𝑛 ∑︀𝑛 𝑖=1 𝑐 𝑡 𝑖 10 : end for Lemma 2 . Let Assumptions 1 and 2 hold . Then for all 𝑡 ≥ 0 and all constants 𝜌 , 𝜈 > 0 EF21-SGD satisfies E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽1̃︀𝐿2E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁ + ̃︀𝐴𝛽2E [ ︀𝑓 ( 𝑥𝑡+1 ) − 𝑓 inf ] ︀+ ̃︀𝐶𝛽2 , ( 24 ) where 𝜃 def = 1 − ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( 1 + 𝜈 ) , 𝛽1 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ , 𝛽2 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ + ( ︁ 1 + 1𝜌 ) ︁ , ̃︀𝐴 = max𝑖=1 , ... , 𝑛 2 ( 𝐴𝑖+𝐿𝑖 ( 𝐵𝑖−1 ) ) 𝜏𝑖 , ̃︀𝐶 = 1𝑛 𝑛∑︀ 𝑖=1 ( ︁ 2 ( 𝐴𝑖+𝐿𝑖 ( 𝐵𝑖−1 ) ) 𝜏𝑖 ( ︀ 𝑓 inf − 𝑓 inf𝑖 ) ︀ + 𝐶𝑖𝜏𝑖 ) ︁ . Proof . For all 𝜌 , 𝜈 > 0 we have E [ ︀ 𝐺𝑡+1𝑖 ] ︀ = E [ ︁⃦⃦ 𝑔𝑡+1𝑖 −∇𝑓𝑖 ( 𝑥 𝑡+1 ) ⃦⃦2 ] ︁ ≤ ( 1 + 𝜌 ) E [ ︁⃦⃦ 𝒞 ( ︀ 𝑔𝑖 ( 𝑥 𝑡+1 ) − 𝑔𝑡𝑖 ) ︀ − ( ︀ 𝑔𝑖 ( 𝑥 𝑡+1 ) − 𝑔𝑡𝑖 ) ︀⃦⃦2 ] ︁ + ( ︂ 1 + 1 𝜌 ) ︂ E [ ︁⃦⃦ 𝑔𝑖 ( 𝑥 𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ ≤ ( 1 − 𝛼 ) ( 1 + 𝜌 ) E [ ︁⃦⃦ 𝑔𝑡𝑖 − 𝑔𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ + ( ︂ 1 + 1 𝜌 ) ︂ E [ ︁⃦⃦ 𝑔𝑖 ( 𝑥 𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ ≤ ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( 1 + 𝜈 ) E [ ︁⃦⃦ 𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ +2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︂ 1 + 1 𝜈 ) ︂ E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ +2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︂ 1 + 1 𝜈 ) ︂ E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ + ( ︂ 1 + 1 𝜌 ) ︂ E [ ︁⃦⃦ 𝑔𝑖 ( 𝑥 𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽1𝐿 2 𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ +𝛽2E [ ︁⃦⃦ 𝑔𝑖 ( 𝑥 𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ , where we introduced 𝜃 def= 1 − ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( 1 + 𝜈 ) , 𝛽1 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ , 𝛽2 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ + ( ︁ 1 + 1𝜌 ) ︁ . Next we use independence of ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) , variance decomposition , and ( 9 ) to estimate the last term : E [ ︀ 𝐺𝑡+1𝑖 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽1𝐿 2 𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 𝛽2 𝜏2𝑖 𝜏𝑖∑︁ 𝑗=1 E [ ︂⃦⃦⃦ ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦⃦2 ] ︂ = ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽1𝐿 2 𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 𝛽2 𝜏2𝑖 𝜏𝑖∑︁ 𝑗=1 ( ︂ E [ ︂⃦⃦⃦ ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡+1 ) ⃦⃦⃦2 ] ︂ − E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ ) ︂ ( 9 ) ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽1𝐿 2 𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 2𝐴𝑖𝛽2 𝜏𝑖 E [ ︀ 𝑓𝑖 ( 𝑥 𝑡+1 ) − 𝑓 inf𝑖 ] ︀ + 𝛽2 ( 𝐵𝑖 − 1 ) 𝜏𝑖 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ + 𝐶𝑖𝛽2 𝜏𝑖 ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽1𝐿 2 𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 2 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝛽2 𝜏𝑖 E [ ︀ 𝑓𝑖 ( 𝑥 𝑡+1 ) − 𝑓 inf𝑖 ] ︀ + 𝐶𝑖𝛽2 𝜏𝑖 Averaging the obtained inequality for 𝑖 = 1 , . . . , 𝑛 we get E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽1̃︀𝐿2E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁ + 1 𝑛 𝑛∑︁ 𝑖=1 ( ︃ 2 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝛽2 𝜏𝑖 E [ ︀ 𝑓𝑖 ( 𝑥 𝑡+1 ) − 𝑓 inf𝑖 ] ︀ + 𝐶𝑖𝛽2 𝜏𝑖 ) ︃ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽1̃︀𝐿2E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁ + 1 𝑛 𝑛∑︁ 𝑖=1 ( ︃ 2 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝛽2 𝜏𝑖 E [ ︀ 𝑓𝑖 ( 𝑥 𝑡+1 ) − 𝑓 inf ] ︀ ) ︃ + 𝛽2 𝑛 𝑛∑︁ 𝑖=1 ( ︂ 2 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝜏𝑖 ( ︀ 𝑓 inf − 𝑓 inf𝑖 ) ︀ + 𝐶𝑖 𝜏𝑖 ) ︂ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽1̃︀𝐿2E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁+ ̃︀𝐴𝛽2E [ ︀𝑓 ( 𝑥𝑡+1 ) − 𝑓 inf ] ︀+ ̃︀𝐶𝛽2 D.1 CONVERGENCE FOR GENERAL NON-CONVEX FUNCTIONS Theorem 3 . Let Assumptions 1 and 2 hold , and let the stepsize in Algorithm 2 be set as 0 < 𝛾 ≤ ⎛⎝𝐿 + ̃︀𝐿 √︃ 𝛽1 𝜃 ⎞⎠−1 , ( 25 ) where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 def= 1 − ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( 1 + 𝜈 ) , 𝛽1 def= 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀1 + 1𝜈 ) ︀ , and 𝜌 , 𝜈 > 0 are some positive numbers . Assume that batchsizes 𝜏1 , . . . , 𝜏𝑖 are such that 𝛾 ̃︀𝐴𝛽2 2𝜃 < 1 , wherẽ︀𝐴 = max𝑖=1 , ... , 𝑛 2 ( 𝐴𝑖+𝐿𝑖 ( 𝐵𝑖−1 ) ) 𝜏𝑖 and 𝛽2 def= 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀1 + 1𝜈 ) ︀+ ( ︁1 + 1𝜌 ) ︁ . Fix 𝑇 ≥ 1 and let ? ̂ ? 𝑇 be chosen from the iterates 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 with following probabilities : Prob { ︀ ? ̂ ? 𝑇 = 𝑥𝑡 } ︀ = 𝑤𝑡 𝑊𝑇 , 𝑤𝑡 = ( ︃ 1 − 𝛾 ̃︀𝐴𝛽2 2𝜃 ) ︃𝑡 , 𝑊𝑇 = 𝑇∑︁ 𝑡=0 𝑤𝑡 . Then E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 2 ( 𝑓 ( 𝑥0 ) − 𝑓 inf ) 𝛾𝑇 ( ︁ 1 − 𝛾 ̃︀𝐴𝛽2 2𝜃 ) ︁𝑇 + E [ ︀ 𝐺0 ] ︀ 𝜃𝑇 ( ︁ 1 − 𝛾 ̃︀𝐴𝛽2 2𝜃 ) ︁𝑇 + ̃︀𝐶𝛽2𝜃 , ( 26 ) where ̃︀𝐶 = 1𝑛 𝑛∑︀ 𝑖=1 ( ︁ 2 ( 𝐴𝑖+𝐿𝑖 ( 𝐵𝑖−1 ) ) 𝜏𝑖 ( ︀ 𝑓 inf − 𝑓 inf𝑖 ) ︀ + 𝐶𝑖𝜏𝑖 ) ︁ . Proof . We notice that inequality ( 20 ) holds for EF21-SGD as well , i.e. , we have E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ . Summing up the above inequality with a 𝛾 2𝜃 multiple of ( 24 ) , we derive E [ ︂ 𝛿𝑡+1 + 𝛾 2𝜃 𝐺𝑡+1 ] ︂ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ + 𝛾 2𝜃 ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛾 2𝜃 𝛽1̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ + 𝛾 2𝜃 ̃︀𝐴𝛽2E [ ︀𝛿𝑡+1 ] ︀+ 𝛾 2𝜃 ̃︀𝐶𝛽2 ≤ 𝛾 ̃︀𝐴𝛽2 2𝜃 E [ ︀ 𝛿𝑡+1 ] ︀ + E [ ︂ 𝛿𝑡 + 𝛾 2𝜃 𝐺𝑡 ] ︂ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ + 𝛾 2𝜃 ̃︀𝐶𝛽2 − ( ︃ 1 2𝛾 − 𝐿 2 − 𝛾𝛽1 ̃︀𝐿2 2𝜃 ) ︃ E [ ︀ 𝑅𝑡 ] ︀ ( 25 ) ≤ 𝛾 ̃︀𝐴𝛽2 2𝜃 E [ ︀ 𝛿𝑡+1 ] ︀ + E [ ︂ 𝛿𝑡 + 𝛾 2𝜃 𝐺𝑡 ] ︂ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ + 𝛾 2𝜃 ̃︀𝐶𝛽2 , where 𝜃 def= 1 − ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( 1 + 𝜈 ) , 𝛽1 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ , 𝛽2 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ + ( ︁ 1 + 1𝜌 ) ︁ , and 𝜌 , 𝜈 > 0 are some positive numbers . Next , we rearrange the terms E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2 𝛾 ( ︃ E [ ︂ 𝛿𝑡 + 𝛾 2𝜃 𝐺𝑡 ] ︂ − ( ︃ 1 − 𝛾 ̃︀𝐴𝛽2 2𝜃 ) ︃ E [ ︀ 𝛿𝑡+1 ] ︀ − 𝛾 2𝜃 E [ ︀ 𝐺𝑡+1 ] ︀ ) ︃ + ̃︀𝐶𝛽2 𝜃 ≤ 2 𝛾 ( ︃ E [ ︂ 𝛿𝑡 + 𝛾 2𝜃 𝐺𝑡 ] ︂ − ( ︃ 1 − 𝛾 ̃︀𝐴𝛽2 2𝜃 ) ︃ E [ ︂ 𝛿𝑡+1 + 𝛾 2𝜃 E [ ︀ 𝐺𝑡+1 ] ︀ ] ︂ ) ︃ + ̃︀𝐶𝛽2 𝜃 , sum up the obtained inequalities for 𝑡 = 0,1 , . . . , 𝑇 with weights 𝑤𝑡/𝑊𝑇 , and use the definition of ? ̂ ? 𝑇 E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ = 1 𝑊𝐾 𝑇∑︁ 𝑡=0 𝑤𝑡E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2 𝛾𝑊𝑇 𝑇∑︁ 𝑡=0 ( ︂ 𝑤𝑡E [ ︂ 𝛿𝑡 + 𝛾 2𝜃 𝐺𝑡 ] ︂ − 𝑤𝑡+1E [ ︂ 𝛿𝑡+1 + 𝛾 2𝜃 E [ ︀ 𝐺𝑡+1 ] ︀ ] ︂ ) ︂ + ̃︀𝐶𝛽2 𝜃 ≤ 2𝛿 0 𝛾𝑊𝑇 + E [ ︀ 𝐺0 ] ︀ 𝜃𝑊𝑇 + ̃︀𝐶𝛽2 𝜃 . Finally , we notice 𝑊𝑇 = 𝑇∑︁ 𝑡=0 𝑤𝑡 ≥ ( 𝑇 + 1 ) min 𝑡=0,1 , ... , 𝑇 𝑤𝑡 > 𝑇 ( ︃ 1 − 𝛾 ̃︀𝐴𝛽2 2𝜃 ) ︃𝑇 that finishes the proof . Corollary 4 . Let assumptions of Theorem 3 hold , 𝜌 = 𝛼/2 , 𝜈 = 𝛼/4 , 𝛾 = 1 𝐿 + ̃︀𝐿√︁𝛽1 𝜃 , 𝜏𝑖 = ⌈︃ max { ︃ 1 , 2𝑇𝛾 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝛽2 𝜃 , 8 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝛽2 𝜃𝜀2 𝛿inf𝑖 , 4𝐶𝑖𝛽2 𝜃𝜀2 } ︃⌉︃ , 𝑇 = ⌈︃ max { ︃ 16𝛿0 𝛾𝜀2 , 8E [ ︀ 𝐺0 ] ︀ 𝜃𝜀2 } ︃⌉︃ , where 𝛿inf𝑖 = 𝑓 inf − 𝑓 inf𝑖 , 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 inf . Then , after 𝑇 iterations of EF21-SGD we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = 𝒪 ( ︃ ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 ) ︃ iterations/communications rounds , # grad𝑖 = 𝜏𝑖𝑇 = 𝒪 ( ︃ ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 + ( ︁̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) ︁ ( ︁𝐴𝑖 ( 𝛿0 + 𝛿inf𝑖 ) + 𝐶𝑖 ) ︁ 𝛼3𝜀4 + ( ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) 𝐴𝑖E [ ︀𝐺0 ] ︀ 𝛼2 ( 𝛼𝐿 + ̃︀𝐿 ) 𝜀4 ) ︃ stochastic oracle calls for worker 𝑖 , and # grad = 1 𝑛 𝑛∑︁ 𝑖=1 𝜏𝑖𝑇 = 𝒪 ( ︃ ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 + 1 𝑛 𝑛∑︁ 𝑖=1 ( ︁̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) ︁ ( ︁𝐴𝑖 ( 𝛿0 + 𝛿inf𝑖 ) + 𝐶𝑖 ) ︁ 𝛼3𝜀4 + 1 𝑛 𝑛∑︁ 𝑖=1 ( ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) 𝐴𝑖E [ ︀𝐺0 ] ︀ 𝛼2 ( 𝛼𝐿 + ̃︀𝐿 ) 𝜀4 ) ︃ stochastic oracle calls per worker on average , where 𝐴𝑖 = 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) . Proof . The given choice of 𝜏𝑖 ensures that ( ︁ 1 − 𝛾 ̃︀𝐴𝛽2 2𝜃 ) ︁𝑇 = 𝒪 ( 1 ) and ̃︀𝐶𝛽2/𝜃 ≤ 𝜀/2 . Next , the choice of 𝑇 ensures that the right-hand side of ( 26 ) is smaller than 𝜀 . Finally , after simple computation we get the expression for 𝜏𝑖𝑇 . Corollary 5 . Consider the setting described in Example 1 . Let assumptions of Theorem 3 hold , 𝜌 = 𝛼/2 , 𝜈 = 𝛼/4 , 𝛾 = 1 𝐿 + ̃︀𝐿√︁𝛽1 𝜃 , 𝜏𝑖 = ⌈︃ max { ︃ 1 , 4𝜎2𝑖 𝛽2 𝜃𝜀2 } ︃⌉︃ , 𝑇 = ⌈︃ max { ︃ 16𝛿0 𝛾𝜀2 , 8E [ ︀ 𝐺0 ] ︀ 𝜃𝜀2 } ︃⌉︃ , where 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 inf . Then , after 𝑇 iterations of EF21-SGD we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = 𝒪 ( ︃ ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 ) ︃ iterations/communications rounds , # grad𝑖 = 𝜏𝑖𝑇 = 𝒪 ⎛⎝̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 + ( ︁̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) ︁𝜎2𝑖 𝛼3𝜀4 ⎞⎠ stochastic oracle calls for worker 𝑖 , and # grad = 1 𝑛 𝑛∑︁ 𝑖=1 𝜏𝑖𝑇 = 𝒪 ⎛⎝̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 + ( ︁̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) ︁𝜎2 𝛼3𝜀4 ⎞⎠ stochastic oracle calls per worker on average , where 𝜎2 = 1𝑛 ∑︀𝑛 𝑖=1 𝜎 2 𝑖 . Corollary 6 . Consider the setting described in Example 2 . Let assumptions of Theorem 3 hold , 𝜌 = 𝛼/2 , 𝜈 = 𝛼/4 , 𝛾 = 1 𝐿 + ̃︀𝐿√︁𝛽1 𝜃 , 𝜏𝑖 = ⌈︃ max { ︃ 1 , 2𝑇𝛾𝐿𝑖𝛽2 𝜃 , 8𝐿𝑖𝛽2 𝜃𝜀2 𝛿inf𝑖 , 8𝐿𝑖∆ inf 𝑖 𝛽2 𝜃𝜀2 } ︃⌉︃ , 𝑇 = ⌈︃ max { ︃ 16𝛿0 𝛾𝜀2 , 8E [ ︀ 𝐺0 ] ︀ 𝜃𝜀2 } ︃⌉︃ , where 𝛿inf𝑖 = 𝑓 inf − 𝑓 inf𝑖 , 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 inf , 𝐿𝑖 = 1𝑚𝑖 ∑︀𝑚𝑖 𝑗=1 𝐿𝑖𝑗 , ∆ inf 𝑖 = 1 𝑚𝑖 ∑︀𝑚𝑖 𝑗=1 ( 𝑓 inf 𝑖 − 𝑓 inf𝑖𝑗 ) . Then , after 𝑇 iterations of EF21-SGD we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = 𝒪 ( ︃ ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 ) ︃ iterations/communications rounds , # grad𝑖 = 𝜏𝑖𝑇 = 𝒪 ( ︃ ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 + ( ︁̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) ︁ ( ︀𝐿𝑖 ( 𝛿0 + 𝛿inf𝑖 ) + 𝐿𝑖∆inf𝑖 ) ︀ 𝛼3𝜀4 + ( ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) 𝐿𝑖E [ ︀𝐺0 ] ︀ 𝛼2 ( 𝛼𝐿 + ̃︀𝐿 ) 𝜀4 ) ︃ stochastic oracle calls for worker 𝑖 , and # grad = 1 𝑛 𝑛∑︁ 𝑖=1 𝜏𝑖𝑇 = 𝒪 ( ︃ ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 + 1 𝑛 𝑛∑︁ 𝑖=1 ( ︁̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) ︁ ( ︀𝐿𝑖 ( 𝛿0 + 𝛿inf𝑖 ) + 𝐿𝑖∆inf𝑖 ) ︀ 𝛼3𝜀4 + 1 𝑛 𝑛∑︁ 𝑖=1 ( ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) 𝐿𝑖E [ ︀𝐺0 ] ︀ 𝛼2 ( 𝛼𝐿 + ̃︀𝐿 ) 𝜀4 ) ︃ stochastic oracle calls per worker on average . D.2 CONVERGENCE UNDER POLYAK-ŁOJASIEWICZ CONDITION Theorem 4 . Let Assumptions 1 , 2 , and 4 hold , and let the stepsize in Algorithm 2 be set as 0 < 𝛾 ≤ min ⎧⎪⎨⎪⎩ ⎛⎝𝐿 + ̃︀𝐿 √︃ 2𝛽1 𝜃 ⎞⎠−1 , 𝜃 2𝜇 ⎫⎪⎬⎪⎭ , ( 27 ) where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 def= 1 − ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( 1 + 𝜈 ) , 𝛽1 def= 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀1 + 1𝜈 ) ︀ , and 𝜌 , 𝜈 > 0 are some positive numbers . Assume that batchsizes 𝜏1 , . . . , 𝜏𝑖 are such that 2 ̃︀𝐴𝛽2 𝜃 ≤ 𝜇2 , where ̃︀𝐴 = max𝑖=1 , ... , 𝑛 2 ( 𝐴𝑖+𝐿𝑖 ( 𝐵𝑖−1 ) ) 𝜏𝑖 and 𝛽2 def= 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀1 + 1𝜈 ) ︀+ ( ︁1 + 1𝜌 ) ︁ . Then for all 𝑇 ≥ 1 E [ ︂ 𝛿𝑇 + 𝛾 𝜃 𝐺𝑇 ] ︂ ≤ ( ︁ 1 − 𝛾𝜇 2 ) ︁𝑇 E [ ︂ 𝛿0 + 𝛾 𝜃 𝐺0 ] ︂ + 4 𝜇𝜃 ̃︀𝐶𝛽2 , ( 28 ) where ̃︀𝐶 = 1𝑛 𝑛∑︀ 𝑖=1 ( ︁ 2 ( 𝐴𝑖+𝐿𝑖 ( 𝐵𝑖−1 ) ) 𝜏𝑖 ( ︀ 𝑓 inf − 𝑓 inf𝑖 ) ︀ + 𝐶𝑖𝜏𝑖 ) ︁ . Proof . We notice that inequality ( 20 ) holds for EF21-SGD as well , i.e. , we have E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ PŁ ≤ ( 1 − 𝛾𝜇 ) E [ ︀ 𝛿𝑡 ] ︀ − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ . Summing up the above inequality with a 𝛾 𝜃 multiple of ( 24 ) , we derive E [ ︂ 𝛿𝑡+1 + 𝛾 𝜃 𝐺𝑡+1 ] ︂ ≤ ( 1 − 𝛾𝜇 ) E [ ︀ 𝛿𝑡 ] ︀ − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ + 𝛾 𝜃 ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛾 𝜃 𝛽1̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ + 𝛾 𝜃 ̃︀𝐴𝛽2E [ ︀𝛿𝑡+1 ] ︀+ 𝛾 𝜃 ̃︀𝐶𝛽2 ≤ 𝛾 ̃︀𝐴𝛽2 𝜃 E [ ︀ 𝛿𝑡+1 ] ︀ + ( 1 − 𝛾𝜇 ) E [ ︀ 𝛿𝑡 ] ︀ + ( ︃ 1 − 𝜃 2 ) ︃ E [ ︂ 𝛾 𝜃 𝐺𝑡 ] ︂ + 𝛾 𝜃 ̃︀𝐶𝛽2 − ( ︃ 1 2𝛾 − 𝐿 2 − 𝛾𝛽1 ̃︀𝐿2 𝜃 ) ︃ E [ ︀ 𝑅𝑡 ] ︀ ( 27 ) ≤ 𝛾 ̃︀𝐴𝛽2 𝜃 E [ ︀ 𝛿𝑡+1 ] ︀ + ( 1 − 𝛾𝜇 ) E [ ︂ 𝛿𝑡 + 𝛾 𝜃 𝐺𝑡 ] ︂ + 𝛾 𝜃 ̃︀𝐶𝛽2 , where 𝜃 def= 1 − ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( 1 + 𝜈 ) , 𝛽1 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ , 𝛽2 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ + ( ︁ 1 + 1𝜌 ) ︁ , and 𝜌 , 𝜈 > 0 are some positive numbers . Next , we rearrange the terms ( ︃ 1 − 𝛾 ̃︀𝐴𝛽2 𝜃 ) ︃ E [ ︂ 𝛿𝑡+1 + 𝛾 𝜃 𝐺𝑡+1 ] ︂ ≤ E [ ︃ ( ︃ 1 − 𝛾 ̃︀𝐴𝛽2 𝜃 ) ︃ 𝛿𝑡+1 + 𝛾 𝜃 𝐺𝑡+1 ] ︃ ≤ ( 1 − 𝛾𝜇 ) E [ ︂ 𝛿𝑡 + 𝛾 𝜃 𝐺𝑡 ] ︂ + 𝛾 𝜃 ̃︀𝐶𝛽2 and divide both sides of the inequality by ( ︁ 1 − 𝛾 ̃︀𝐴𝛽2 𝜃 ) ︁ : E [ ︂ 𝛿𝑡+1 + 𝛾 𝜃 𝐺𝑡+1 ] ︂ ≤ 1 − 𝛾𝜇 1 − 𝛾 ̃︀𝐴𝛽2 𝜃 E [ ︂ 𝛿𝑡 + 𝛾 𝜃 𝐺𝑡 ] ︂ + 𝛾 𝜃 ( ︁ 1 − 𝛾 ̃︀𝐴𝛽2 𝜃 ) ︁ ̃︀𝐶𝛽2 ( 120 ) ≤ ( 1 − 𝛾𝜇 ) ( ︃ 1 + 2𝛾 ̃︀𝐴𝛽2 𝜃 ) ︃ E [ ︂ 𝛿𝑡 + 𝛾 𝜃 𝐺𝑡 ] ︂ + ( ︃ 1 + 2𝛾 ̃︀𝐴𝛽2 𝜃 ) ︃ 𝛾 𝜃 ̃︀𝐶𝛽2 . Since 2 ̃︀𝐴𝛽2 𝜃 ≤ 𝜇2 and 𝛾 ≤ 2 𝜇 , we have E [ ︂ 𝛿𝑡+1 + 𝛾 𝜃 𝐺𝑡+1 ] ︂ ≤ ( 1 − 𝛾𝜇 ) ( ︁ 1 + 𝛾𝜇 2 ) ︁ E [ ︂ 𝛿𝑡 + 𝛾 𝜃 𝐺𝑡 ] ︂ + 2𝛾 𝜃 ̃︀𝐶𝛽2 ( 121 ) ≤ ( ︁ 1 − 𝛾𝜇 2 ) ︁ E [ ︂ 𝛿𝑡 + 𝛾 𝜃 𝐺𝑡 ] ︂ + 2𝛾 𝜃 ̃︀𝐶𝛽2 . Unrolling the recurrence , we get E [ ︂ 𝛿𝑇 + 𝛾 𝜃 𝐺𝑇 ] ︂ ≤ ( ︁ 1 − 𝛾𝜇 2 ) ︁𝑇 E [ ︂ 𝛿0 + 𝛾 𝜃 𝐺0 ] ︂ + 2𝛾 𝜃 ̃︀𝐶𝛽2 𝑇−1∑︁ 𝑡=0 ( ︁ 1 − 𝛾𝜇 2 ) ︁𝑡 ≤ ( ︁ 1 − 𝛾𝜇 2 ) ︁𝑇 E [ ︂ 𝛿0 + 𝛾 𝜃 𝐺0 ] ︂ + 2𝛾 𝜃 ̃︀𝐶𝛽2 ∞∑︁ 𝑡=0 ( ︁ 1 − 𝛾𝜇 2 ) ︁𝑡 = ( ︁ 1 − 𝛾𝜇 2 ) ︁𝑇 E [ ︂ 𝛿0 + 𝛾 𝜃 𝐺0 ] ︂ + 4 𝜇𝜃 ̃︀𝐶𝛽2 that finishes the proof . Corollary 7 . Let assumptions of Theorem 4 hold , 𝜌 = 𝛼/2 , 𝜈 = 𝛼/4 , 𝛾 = min ⎧⎨⎩ 1 𝐿 + ̃︀𝐿√︁𝛽1 𝜃 , 𝜃 2𝜇 ⎫⎬⎭ , 𝜏𝑖 = ⌈︃ max { ︃ 1 , 8 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝛽2 𝜇𝜃 , 64 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝛽2 𝜃𝜀𝜇 𝛿inf𝑖 , 32𝐶𝑖𝛽2 𝜃𝜀𝜇 } ︃⌉︃ , 𝑇 = ⌈︂ 2 𝛾𝜇 ln ( ︂ 2𝛿0 𝜀 + E [ ︂ 2𝛾𝐺0 𝜃𝜀 ] ︂ ) ︂⌉︂ , where 𝛿inf𝑖 = 𝑓 inf − 𝑓 inf𝑖 , 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 inf . Then , after 𝑇 iterations of EF21-SGD we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 inf ] ︀ ≤ 𝜀 . It requires 𝑇 = 𝒪 ( ︃ ̃︀𝐿 𝜇𝛼 ln ( ︂ 𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂ ) ︃ iterations/communications rounds , # grad𝑖 = 𝜏𝑖𝑇 = 𝒪 ⎛⎝⎛⎝ ̃︀𝐿 𝜇𝛼 + ̃︀𝐿 ( ︁𝐴𝑖 ( 𝜀 + 𝛿inf𝑖 ) + 𝐶𝑖 ) ︁ 𝜇2𝛼3𝜀 ⎞⎠ ln ( ︂𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂⎞⎠ stochastic oracle calls for worker 𝑖 , and # grad = 1 𝑛 𝑛∑︁ 𝑖=1 𝜏𝑖𝑇 = 𝒪 ⎛⎝⎛⎝ ̃︀𝐿 𝜇𝛼 + 1 𝑛 𝑛∑︁ 𝑖=1 ̃︀𝐿 ( ︁𝐴𝑖 ( 𝜀 + 𝛿inf𝑖 ) + 𝐶𝑖 ) ︁ 𝜇2𝛼3𝜀 ⎞⎠ ln ( ︂𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂⎞⎠ stochastic oracle calls per worker on average , where 𝐴𝑖 = 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) . Proof . The given choice of 𝜏𝑖 ensures that 2 ̃︀𝐴𝛽2 𝜃 ≤ 𝜇2 and 4 ̃︀𝐶𝛽2/𝜇𝜃 ≤ 𝜀/2 . Next , the choice of 𝑇 ensures that the right-hand side of ( 28 ) is smaller than 𝜀 . Finally , after simple computation we get the expression for 𝜏𝑖𝑇 . Corollary 8 . Consider the setting described in Example 1 . Let assumptions of Theorem 4 hold , 𝜌 = 𝛼/2 , 𝜈 = 𝛼/4 , 𝛾 = min ⎧⎨⎩ 1 𝐿 + ̃︀𝐿√︁𝛽1 𝜃 , 𝜃 2𝜇 ⎫⎬⎭ , 𝜏𝑖 = ⌈︃ max { ︃ 1 , 32𝐶𝑖𝛽2 𝜃𝜀𝜇 } ︃⌉︃ , 𝑇 = ⌈︂ 2 𝛾𝜇 ln ( ︂ 2𝛿0 𝜀 + E [ ︂ 2𝛾𝐺0 𝜃𝜀 ] ︂ ) ︂⌉︂ , where 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 inf . Then , after 𝑇 iterations of EF21-SGD we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 inf ] ︀ ≤ 𝜀 . It requires 𝑇 = 𝒪 ( ︃ ̃︀𝐿 𝜇𝛼 ln ( ︂ 𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂ ) ︃ iterations/communications rounds , # grad𝑖 = 𝜏𝑖𝑇 = 𝒪 ( ︃ ( ︃ ̃︀𝐿 𝜇𝛼 + ̃︀𝐿𝜎2𝑖 𝜇2𝛼3𝜀 ) ︃ ln ( ︂ 𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂ ) ︃ stochastic oracle calls for worker 𝑖 , and # grad = 1 𝑛 𝑛∑︁ 𝑖=1 𝜏𝑖𝑇 = 𝒪 ( ︃ ( ︃ ̃︀𝐿 𝜇𝛼 + ̃︀𝐿𝜎2 𝜇2𝛼3𝜀 ) ︃ ln ( ︂ 𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂ ) ︃ stochastic oracle calls per worker on average , where 𝜎2 = 1𝑛 ∑︀𝑛 𝑖=1 𝜎 2 𝑖 . Corollary 9 . Consider the setting described in Example 2 . Let assumptions of Theorem 4 hold , 𝜌 = 𝛼/2 , 𝜈 = 𝛼/4 , 𝛾 = min ⎧⎨⎩ 1 𝐿 + ̃︀𝐿√︁𝛽1 𝜃 , 𝜃 2𝜇 ⎫⎬⎭ , 𝜏𝑖 = ⌈︃ max { ︃ 1 , 8𝐿𝑖𝛽2 𝜇𝜃 , 64𝐿𝑖𝛽2 𝜃𝜀𝜇 𝛿inf𝑖 , 64𝐿𝑖∆ inf 𝑖 𝛽2 𝜃𝜀𝜇 } ︃⌉︃ , 𝑇 = ⌈︂ 2 𝛾𝜇 ln ( ︂ 2𝛿0 𝜀 + E [ ︂ 2𝛾𝐺0 𝜃𝜀 ] ︂ ) ︂⌉︂ , where 𝛿inf𝑖 = 𝑓 inf − 𝑓 inf𝑖 , 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 inf , 𝐿𝑖 = 1𝑚𝑖 ∑︀𝑚𝑖 𝑗=1 𝐿𝑖𝑗 , ∆ inf 𝑖 = 1 𝑚𝑖 ∑︀𝑚𝑖 𝑗=1 ( 𝑓 inf 𝑖 − 𝑓 inf𝑖𝑗 ) . Then , after 𝑇 iterations of EF21-SGD we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 inf ] ︀ ≤ 𝜀 . It requires 𝑇 = 𝒪 ( ︃ ̃︀𝐿 𝜇𝛼 ln ( ︂ 𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂ ) ︃ iterations/communications rounds , # grad𝑖 = 𝜏𝑖𝑇 = 𝒪 ( ︃ ( ︃ ̃︀𝐿 𝜇𝛼 + ̃︀𝐿𝐿𝑖 ( ︀𝜀 + 𝛿inf𝑖 + ∆inf𝑖 ) ︀ 𝜇2𝛼3𝜀 ) ︃ ln ( ︂ 𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂ ) ︃ stochastic oracle calls for worker 𝑖 , and # grad = 1 𝑛 𝑛∑︁ 𝑖=1 𝜏𝑖𝑇 = 𝒪 ( ︃ ( ︃ ̃︀𝐿 𝜇𝛼 + 1 𝑛 𝑛∑︁ 𝑖=1 ̃︀𝐿𝐿𝑖 ( ︀𝜀 + 𝛿inf𝑖 + ∆inf𝑖 ) ︀ 𝜇2𝛼3𝜀 ) ︃ ln ( ︂ 𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂ ) ︃ stochastic oracle calls per worker on average . E VARIANCE REDUCTION In this part , we modify the EF21 framework to better handle finite-sum problems with smooth summands . Unlike the online/streaming case where SGD has the optimal complexity ( without additional assumption on the smoothness of stochastic trajectories ) ( Arjevani et al. , 2019 ) , in the finite sum regime , it is well-known that one can hope for convergence to the exact stationary point rather than its neighborhood . To achieve this , variance reduction techniques are instrumental . One approach is to apply a PAGE-estimator ( Li et al. , 2021 ) instead of a random minibatch applied in SGD . Note that PAGE has optimal complexity for nonconvex problems of the form ( 3 ) . With Corollary 10 , we illustrate that this 𝑂 ( 𝑚 + √ 𝑚/𝜀2 ) complexity is recovered for our Algorithm 3 when no compression is applied and 𝑛 = 1 . We show how to combine PAGE estimator with EF21 mechanism and call the new method EF21PAGE . At each step of EF21-PAGE , clients ( nodes ) either compute ( with probability 𝑝 ) full gradients or use a recursive estimator 𝑣𝑡𝑖 + 1 𝜏𝑖 ∑︀ 𝑗∈𝐼𝑡𝑖 ( ︀ ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) ︀ ( with probability 1− 𝑝 ) . Then each client applies a Markov compressor/EF21-estimator and sends the result to the master node . Typically the number of data points 𝑚 is large , and 𝑝 < 1/𝑚 . As a result , computation of full gradients rarely happens during optimization procedure , on average , only once in every 𝑚 iterations . Notice that unlike VR-MARINA ( Gorbunov et al. , 2021 ) , which is a state-of-the-art distributed optimization method designed specifically for unbiased compressors and which also uses PAGEestimator , EF21-PAGE does not require the communication of full ( not compressed ) vectors at all . This is an important property of the algorithm since , in some distributed networks , and especially when 𝑑 is very large , as is the case in modern over-parameterized deep learning , full vector communication is prohibitive . However , unlike the rate of VR-MARINA , the rate of EF21-PAGE does not improve with the growth of 𝑛 . This is not a flaw of our method , but rather an inevitable drawback of the distributed methods that use biased compressions only . Notations for this section . In this section , we use the following additional notations 𝑃 𝑡𝑖 def = ‖∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑣𝑡𝑖‖ 2 , 𝑃 𝑡 def= 1𝑛 ∑︀𝑛 𝑖=1 𝑃 𝑡 𝑖 , 𝑉 𝑡 𝑖 def = ‖𝑣𝑡𝑖 − 𝑔𝑡𝑖‖ 2 , 𝑉 𝑡 def= 1𝑛 ∑︀𝑛 𝑖=1 𝑉 𝑡 𝑖 , where 𝑣 𝑡 𝑖 is a PAGE estimator . Recall that 𝐺𝑡 def= 1𝑛 ∑︀𝑛 𝑖=1 𝐺 𝑡 𝑖 , 𝐺 𝑡 𝑖 def = ‖∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑔𝑡𝑖‖ 2 . The main idea of the analysis in this section is to split the error in two parts 𝐺𝑡𝑖 ≤ 2𝑃 𝑡𝑖 + 2𝑉 𝑡𝑖 , and bound them separetely . Algorithm 3 EF21-PAGE 1 : Input : starting point 𝑥0 ∈ R𝑑 ; 𝑔0𝑖 , 𝑣0𝑖 ∈ R𝑑 for 𝑖 = 1 , . . . , 𝑛 ( known by nodes ) ; 𝑔0 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 0 𝑖 ( known by master ) ; learning rate 𝛾 > 0 ; probabilities 𝑝𝑖 ∈ ( 0,1 ] ; batch-sizes 1 ≤ 𝜏𝑖 ≤ 𝑚𝑖 2 : for 𝑡 = 0,1 , 2 , . . . , 𝑇 − 1 do 3 : Master computes 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 4 : for all nodes 𝑖 = 1 , . . . , 𝑛 in parallel do 5 : Sample 𝑏𝑡𝑖 ∼ Be ( 𝑝𝑖 ) 6 : If 𝑏𝑡𝑖 = 0 , sample a minibatch of data samples 𝐼 𝑡 𝑖 with |𝐼𝑡𝑖 | = 𝜏𝑖 7 : 𝑣𝑡+1𝑖 = ⎧⎨⎩∇𝑓𝑖 ( 𝑥 𝑡+1 ) if 𝑏𝑡𝑖 = 1 , 𝑣𝑡𝑖 + 1 𝜏𝑖 ∑︀ 𝑗∈𝐼𝑡𝑖 ( ︀ ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) ︀ if 𝑏𝑡𝑖 = 0 8 : Compress 𝑐𝑡𝑖 = 𝒞 ( 𝑣 𝑡+1 𝑖 − 𝑔𝑡𝑖 ) and send 𝑐𝑡𝑖 to the master 9 : Update local state 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 + 𝑐 𝑡 𝑖 10 : end for 11 : Master computes 𝑔𝑡+1 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 𝑡+1 𝑖 via 𝑔 𝑡+1 = 𝑔𝑡 + 1𝑛 ∑︀𝑛 𝑖=1 𝑐 𝑡 𝑖 12 : end for 13 : Output : ? ̂ ? 𝑇 chosen uniformly from { 𝑥𝑡 } 𝑡∈ [ 𝑇 ] Lemma 3 . Let Assumption 3 hold , and let 𝑣𝑡+1𝑖 be a PAGE estimator , i. e. for 𝑏𝑡𝑖 ∼ Be ( 𝑝𝑖 ) 𝑣𝑡+1𝑖 = ⎧⎨⎩∇𝑓𝑖 ( 𝑥 𝑡+1 ) if 𝑏𝑡𝑖 = 1 , 𝑣𝑡𝑖 + 1 𝜏𝑖 ∑︀ 𝑗∈𝐼𝑡𝑖 ( ︀ ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) ︀ if 𝑏𝑡𝑖 = 0 , ( 29 ) for all 𝑖 = 1 , . . . , 𝑛 , 𝑡 ≥ 0 . Then E [ ︀ 𝑃 𝑡+1 ] ︀ ≤ ( 1 − 𝑝min ) E [ ︀ 𝑃 𝑡 ] ︀ + ̃︀ℒ2E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁ , ( 30 ) where ̃︀ℒ = 1𝑛 ∑︀𝑛𝑖=1 ( 1−𝑝𝑖 ) ℒ2𝑖𝜏𝑖 , 𝑝min = min𝑖=1 , ... , 𝑛 𝑝𝑖 . Proof . E [ ︀ 𝑃 𝑡+1𝑖 ] ︀ = E [ ︁⃦⃦ 𝑣𝑡+1𝑖 −∇𝑓𝑖 ( 𝑥 𝑡+1 ) ⃦⃦2 ] ︁ = ( 1 − 𝑝𝑖 ) E ⎡⎢⎣ ⃦⃦⃦⃦ ⃦⃦𝑣𝑡𝑖 + 1𝜏𝑖 ∑︁ 𝑗∈𝐼𝑡𝑖 ( ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦⃦⃦ ⃦⃦ 2 ⎤⎥⎦ = ( 1 − 𝑝𝑖 ) E [ ︂⃦⃦⃦ 𝑣𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) + ̃︀∆𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡+1 ) + ∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦⃦2 ] ︂ = ( 1 − 𝑝𝑖 ) E [ ︂⃦⃦⃦ 𝑣𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) + ̃︀∆𝑡𝑖 − ∆𝑡𝑖 ⃦⃦⃦2 ] ︂ ( 𝑖 ) = ( 1 − 𝑝𝑖 ) E [ ︁⃦⃦ 𝑣𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ + ( 1 − 𝑝𝑖 ) E [ ︂⃦⃦⃦ ̃︀∆𝑡𝑖 − ∆𝑡𝑖 ⃦⃦⃦2 ] ︂ ( 𝑖𝑖 ) ≤ ( 1 − 𝑝𝑖 ) E [ ︀ 𝑃 𝑡𝑖 ] ︀ + ( 1 − 𝑝𝑖 ) ℒ2𝑖 𝜏𝑖 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ ≤ ( 1 − 𝑝min ) E [ ︀ 𝑃 𝑡𝑖 ] ︀ + ( 1 − 𝑝𝑖 ) ℒ2𝑖 𝜏𝑖 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ , ( 31 ) where equality ( 𝑖 ) holds because E [ ︁̃︀∆𝑡𝑖 − ∆𝑡𝑖 | 𝑥𝑡 , 𝑥𝑡+1 , 𝑣𝑡𝑖 ] ︁ = 0 , and ( 𝑖𝑖 ) holds by Assumption 3 . It remains to average the above inequality over 𝑖 = 1 , . . . , 𝑛. Lemma 4 . Let Assumptions 1 and 3 hold , let 𝑣𝑡+1𝑖 be a PAGE estimator , i. e. for 𝑏𝑡𝑖 ∼ Be ( 𝑝𝑖 ) and for all 𝑖 = 1 , . . . , 𝑛 , 𝑡 ≥ 0 𝑣𝑡+1𝑖 = ⎧⎨⎩∇𝑓𝑖 ( 𝑥 𝑡+1 ) if 𝑏𝑡𝑖 = 1 , 𝑣𝑡𝑖 + 1 𝜏𝑖 ∑︀ 𝑗∈𝐼𝑡𝑖 ( ︀ ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) ︀ if 𝑏𝑡𝑖 = 0 , ( 32 ) and let 𝑔𝑡+1𝑖 be an EF21 estimator , i. e. 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 + 𝒞 ( 𝑣𝑡+1𝑖 − 𝑔 𝑡 𝑖 ) , 𝑔 0 𝑖 = 𝒞 ( ︀ 𝑣0𝑖 ) ︀ ( 33 ) for all 𝑖 = 1 , . . . , 𝑛 , 𝑡 ≥ 0 . Then E [ ︀ 𝑉 𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡 ] ︀ + 2𝛽𝑝maxE [ ︀ 𝑃 𝑡 ] ︀ + 𝛽 ( ︁ 2̃︀𝐿2 + ̃︀ℒ2 ) ︁E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁ , ( 34 ) where ̃︀ℒ = 1𝑛 ∑︀𝑛𝑖=1 ( 1−𝑝𝑖 ) ℒ2𝑖𝜏𝑖 , 𝑝max = max𝑖=1 , ... , 𝑛 𝑝𝑖 , 𝜃 = 1− ( 1−𝛼 ) ( 1+𝑠 ) , 𝛽 = ( 1−𝛼 ) ( ︀1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . Following the steps in proof of Lemma 1 , but with ∇𝑓𝑖 ( 𝑥𝑡+1 ) and ∇𝑓𝑖 ( 𝑥𝑡 ) being substituted by their estimators 𝑣𝑡+1𝑖 and 𝑣 𝑡 𝑖 , we end up with an analogue of ( 15 ) E [ ︁⃦⃦ 𝑔𝑡+1𝑖 − 𝑣 𝑡+1 𝑖 ⃦⃦2 ] ︁ ≤ ( 1 − 𝜃 ) E [ ︁⃦⃦𝑔𝑡𝑖 − 𝑣𝑡𝑖 ⃦⃦2 ] ︁+ 𝛽E [ ︁⃦⃦𝑣𝑡+1𝑖 − 𝑣𝑡𝑖 ⃦⃦2 ] ︁ , ( 35 ) where 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀ 1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Then E [ ︀ 𝑉 𝑡𝑖 ] ︀ = E [ ︁⃦⃦ 𝑔𝑡+1𝑖 − 𝑣 𝑡+1 𝑖 ⃦⃦2 ] ︁ ( 35 ) ≤ ( 1 − 𝜃 ) E [ ︁⃦⃦ 𝑔𝑡𝑖 − 𝑣𝑡𝑖 ⃦⃦2 ] ︁ + 𝛽E [ ︁⃦⃦ 𝑣𝑡+1𝑖 − 𝑣 𝑡 𝑖 ⃦⃦2 ] ︁ = ( 1 − 𝜃 ) E [ ︁⃦⃦ 𝑔𝑡𝑖 − 𝑣𝑡𝑖 ⃦⃦2 ] ︁ + 𝛽E [ ︁ E [ ︁⃦⃦ 𝑣𝑡+1𝑖 − 𝑣 𝑡 𝑖 ⃦⃦2 | 𝑣𝑡𝑖 , 𝑥𝑡 , 𝑥𝑡+1 ] ︁ ] ︁ ( 𝑖 ) = ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡𝑖 ] ︀ + 𝛽𝑝𝑖E [ ︁⃦⃦ 𝑣𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ +𝛽 ( 1 − 𝑝𝑖 ) E ⎡⎢⎣ ⃦⃦⃦⃦ ⃦⃦ 1𝜏𝑖 ∑︁ 𝑗∈𝐼𝑡𝑖 ( ︀ ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) ︀⃦⃦⃦⃦⃦⃦ 2 ⎤⎥⎦ = ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡𝑖 ] ︀ + 𝛽𝑝𝑖E [ ︁⃦⃦ 𝑣𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ + 𝛽 ( 1 − 𝑝𝑖 ) E [ ︂⃦⃦⃦ ̃︀∆𝑡𝑖 ⃦⃦⃦2 ] ︂ ( 𝑖𝑖 ) = ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡𝑖 ] ︀ + 2𝛽𝑝𝑖E [ ︁⃦⃦ 𝑣𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ +2𝛽𝑝𝑖E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ + 𝛽 ( 1 − 𝑝𝑖 ) E [ ︂⃦⃦⃦ ̃︀∆𝑡𝑖 ⃦⃦⃦2 ] ︂ = ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡𝑖 ] ︀ + 2𝛽𝑝𝑖E [ ︀ 𝑃 𝑡𝑖 ] ︀ + 2𝛽𝑝𝑖E [ ︁⃦⃦ ∆𝑡𝑖 ⃦⃦2 ] ︁ + 𝛽 ( 1 − 𝑝𝑖 ) E [ ︂⃦⃦⃦ ̃︀∆𝑡𝑖 ⃦⃦⃦2 ] ︂ ( 𝑖𝑖𝑖 ) = ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡𝑖 ] ︀ + 2𝛽𝑝𝑖E [ ︀ 𝑃 𝑡𝑖 ] ︀ + 𝛽 ( 2𝑝𝑖 + 1 − 𝑝𝑖 ) E [ ︁⃦⃦ ∆𝑡𝑖 ⃦⃦2 ] ︁ +𝛽 ( 1 − 𝑝𝑖 ) E [ ︂⃦⃦⃦ ̃︀∆𝑡𝑖 − ∆𝑡𝑖 ⃦⃦⃦2 ] ︂ ( 𝑖𝑣 ) ≤ ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡𝑖 ] ︀ + 2𝛽𝑝𝑖E [ ︀ 𝑃 𝑡𝑖 ] ︀ + 𝛽 ( 1 + 𝑝𝑖 ) 𝐿 2 𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ +𝛽 ( 1 − 𝑝𝑖 ) ℒ2𝑖 𝜏𝑖 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ ≤ ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡𝑖 ] ︀ + 2𝛽𝑝maxE [ ︀ 𝑃 𝑡𝑖 ] ︀ + 𝛽 ( ︂ 2𝐿2𝑖 + ( 1 − 𝑝𝑖 ) ℒ2𝑖 𝜏𝑖 ) ︂ E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ , where in ( 𝑖 ) we use the definition of PAGE estimator ( 32 ) , ( 𝑖𝑖 ) applies ( 119 ) with 𝑠 = 1 , ( 𝑖𝑖𝑖 ) is due to bias-variance decomposition ( 123 ) , ( 𝑖𝑣 ) makes use of Assumptions 1 and 3 , and the last step is due to 𝑝𝑖 ≤ 1 , 𝑝𝑖 ≤ 𝑝max . It remains to average the above inequality over 𝑖 = 1 , . . . , 𝑛. E.1 CONVERGENCE FOR GENERAL NON-CONVEX FUNCTIONS Theorem 5 . Let Assumptions 1 and 3 hold , and let the stepsize in Algorithm 3 be set as 0 < 𝛾 ≤ ( ︃ 𝐿 + √︃ 4𝛽 𝜃 ̃︀𝐿2 + 2 ( ︂3𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 ) ︃−1 . ( 36 ) Fix 𝑇 ≥ 1 and let ? ̂ ? 𝑇 be chosen from the iterates 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Then E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 2Ψ0 𝛾𝑇 , ( 37 ) where Ψ𝑡 def = 𝑓 ( 𝑥𝑡 ) − 𝑓 inf + 𝛾𝜃𝑉 𝑡 + 𝛾𝑝min ( ︁ 1 + 2𝛽𝑝min𝜃 ) ︁ 𝑃 𝑡 , 𝑝max = max𝑖=1 , ... , 𝑛 𝑝𝑖 , 𝑝min = min𝑖=1 , ... , 𝑛 𝑝𝑖 , ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . We apply Lemma 16 and split the error ‖𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ‖ 2 in two parts 𝑓 ( 𝑥𝑡+1 ) ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 ⃦⃦ 𝑔𝑡 −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 +𝛾 ⃦⃦ 𝑔𝑡 − 𝑣𝑡 ⃦⃦2 + 𝛾E [ ︁⃦⃦ 𝑣𝑡 −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 +𝛾 1 𝑛 𝑛∑︁ 𝑖=1 ⃦⃦ 𝑔𝑡𝑖 − 𝑣𝑡𝑖 ⃦⃦2 + 𝛾 1 𝑛 𝑛∑︁ 𝑖=1 ⃦⃦ 𝑣𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 = 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾𝑉 𝑡 + 𝛾𝑃 𝑡 , ( 38 ) where we used notation 𝑅𝑡 = ‖𝛾𝑔𝑡‖2 = ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 , and applied ( 118 ) and ( 119 ) . Subtracting 𝑓 inf from both sides of the above inequality , taking expectation and using the notation 𝛿𝑡 = 𝑓 ( 𝑥𝑡+1 ) − 𝑓 inf , we get E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾E [ ︀ 𝑉 𝑡 ] ︀ + 𝛾E [ ︀ 𝑃 𝑡 ] ︀ . ( 39 ) Further , Lemma 3 and 4 provide the recursive bounds for the last two terms of ( 39 ) E [ ︀ 𝑃 𝑡+1 ] ︀ ≤ ( 1 − 𝑝min ) E [ ︀ 𝑃 𝑡 ] ︀ + ̃︀ℒ2E [ 𝑅𝑡 ] , ( 40 ) E [ ︀ 𝑉 𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡 ] ︀ + 𝛽 ( ︁ 2̃︀𝐿2 + ̃︀ℒ2 ) ︁E [ 𝑅𝑡 ] + 2𝛽𝑝maxE [ ︀𝑃 𝑡 ] ︀ . ( 41 ) Adding ( 39 ) with a 𝛾𝜃 multiple of ( 41 ) we obtain E [ ︀ 𝛿𝑡+1 ] ︀ + 𝛾 𝜃 E [ ︀ 𝑉 𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾E [ ︀ 𝑉 𝑡 ] ︀ +𝛾E [ ︀ 𝑃 𝑡 ] ︀ + 𝛾 𝜃 ( ︀ ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡 ] ︀ + 𝐴𝑟𝑡 + 𝐶E [ ︀ 𝑃 𝑡 ] ︀ ) ︀ ≤ 𝛿𝑡 + 𝛾 𝜃 E [ ︀ 𝑉 𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 − 𝛾𝐴 𝜃 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ +𝛾 ( ︂ 1 + 𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ , where we denote 𝐴 def= 𝛽 ( ︁ 2̃︀𝐿2 + ̃︀ℒ2 ) ︁ , 𝐶 def= 2𝛽𝑝max . Then adding the above inequality with a 𝛾𝑝min ( ︀ 1 + 𝐶𝜃 ) ︀ multiple of ( 40 ) , we get E [ ︀ Φ𝑡+1 ] ︀ = E [ ︀ 𝛿𝑡+1 ] ︀ + 𝛾 𝜃 E [ ︀ 𝑉 𝑡+1 ] ︀ + 𝛾 𝑝min ( ︂ 1 + 𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡+1 ] ︀ ≤ 𝛿𝑡 + 𝛾 𝜃 E [ ︀ 𝑉 𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 − 𝛾𝐴 𝜃 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ +𝛾 ( ︂ 1 + 𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ + 𝛾 𝑝min ( ︂ 1 + 𝐶 𝜃 ) ︂ ( ︁ ( 1 − 𝑝min ) E [ ︀ 𝑃 𝑡 ] ︀ + ̃︀ℒ2E [ ︀𝑅𝑡 ] ︀ ) ︁ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 𝜃 E [ ︀ 𝑉 𝑡 ] ︀ + 𝛾 𝑝min ( ︂ 1 + 𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ − ( ︂ 1 2𝛾 − 𝐿 2 − 𝛾𝐴 𝜃 − 𝛾 𝑝min ( ︂ 1 + 𝐶 𝜃 ) ︂ ̃︀ℒ2 ) ︂E [ ︀𝑅𝑡 ] ︀ = E [ ︀ Φ𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ − ( ︂ 1 2𝛾 − 𝐿 2 − 𝛾𝐴 𝜃 − 𝛾 𝑝min ( ︂ 1 + 𝐶 𝜃 ) ︂ ̃︀ℒ2 ) ︂E [ ︀𝑅𝑡 ] ︀ . ( 42 ) The coefficient in front of E [ 𝑅𝑡 ] simplifies after substitution by 𝐴 and 𝐶 𝛾𝐴 𝜃 + 𝛾 𝑝min ( ︂ 1 + 𝐶 𝜃 ) ︂ ̃︀ℒ2 ≤ 2𝛽 𝜃 ̃︀𝐿2 + ( ︂3𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 . Thus by Lemma 15 and the stepsize choice 0 < 𝛾 ≤ ( ︃ 𝐿 + √︃ 4𝛽 𝜃 ̃︀𝐿2 + 2 ( ︂3𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 ) ︃−1 ( 43 ) the last term in ( 42 ) is not positive . By summing up inequalities for 𝑡 = 0 , . . . , 𝑇 − 1 , we get 0 ≤ E [ ︀ Φ𝑇 ] ︀ ≤ E [ ︀ Φ0 ] ︀ − 𝛾 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ . Multiplying both sides by 2𝛾𝑇 and rearranging we get 𝑇−1∑︁ 𝑡=0 1 𝑇 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2E [ ︀Φ0 ] ︀ 𝛾𝑇 . It remains to notice that the left hand side can be interpreted as E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ , where ? ̂ ? 𝑇 is chosen from 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Corollary 10 . Let assumptions of Theorem 5 hold , 𝑣0𝑖 = 𝑔 0 𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = ( ︃ 𝐿 + √︃ 4𝛽 𝜃 ̃︀𝐿2 + 2 ( ︂3𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 ) ︃−1 , 𝑝𝑖 = 𝜏𝑖 𝜏𝑖 + 𝑚𝑖 , 𝑖 = 1 , . . . , 𝑛 . Then , after 𝑇 iterations/communication rounds of EF21-PAGE we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = 𝒪 ( ︃ ( ̃︀𝐿 + ̃︀ℒ ) 𝛿0 𝛼𝜀2 √︂ 𝑝max 𝑝min + √ 𝑚max ̃︀ℒ𝛿0 𝜀2 ) ︃ iterations/communications rounds , # grad𝑖 = 𝒪 ( ︃ 𝑚𝑖 + 𝜏𝑖 ( ̃︀𝐿 + ̃︀ℒ ) 𝛿0 𝛼𝜀2 √︂ 𝑝max 𝑝min + 𝜏𝑖 √ 𝑚max ̃︀ℒ𝛿0 𝜀2 ) ︃ stochastic oracle calls for worker 𝑖 , and # grad = 𝒪 ( ︃ 𝑚 + 𝜏 ( ̃︀𝐿 + ̃︀ℒ ) 𝛿0 𝛼𝜀2 √︂ 𝑝max 𝑝min + 𝜏 √ 𝑚max ̃︀ℒ𝛿0 𝜀2 ) ︃ stochastic oracle calls per worker on average , where 𝜏 = 1𝑛 ∑︀𝑛 𝑖=1 𝜏𝑖 , 𝑚 = 1 𝑛 ∑︀𝑛 𝑖=1 𝑚𝑖 , 𝑚max = max𝑖=1 , ... , 𝑛 𝑚𝑖 , 𝑝max = max𝑖=1 , ... , 𝑛 𝑝𝑖 , 𝑝min = min𝑖=1 , ... , 𝑛 𝑝𝑖 . Proof . Notice that by Lemma 17 we have 𝐿 + √︃ 4𝛽 𝜃 ̃︀𝐿2 + 2 ( ︂3𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 ≤ 𝐿 +√︃ 16 𝛼2 ̃︀𝐿2 + 2 ( ︂ 12 𝛼2 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 ≤ 𝐿 + 4 𝛼 ̃︀𝐿 +√︂ 24 𝛼2 𝑝max 𝑝min + 2 𝑝min ̃︀ℒ ≤ 𝐿 + 4 𝛼 ̃︀𝐿 + √24 𝛼 √︂ 𝑝max 𝑝min ̃︀ℒ + √2√ 𝑝min ̃︀ℒ ≤ 5 𝛼 ̃︀𝐿 + √24 𝛼 √︂ 𝑝max 𝑝min ̃︀ℒ + √2√ 𝑝min ̃︀ℒ ≤ 5 𝛼 √︂ 𝑝max 𝑝min ( ︁̃︀𝐿 + ̃︀ℒ ) ︁+ √2√ 𝑝min ̃︀ℒ ≤ 5 𝛼 √︂ 𝑝max 𝑝min ( ︁̃︀𝐿 + ̃︀ℒ ) ︁+ 2√𝑚max ̃︀ℒ , where we used 𝐿 ≤ ̃︀𝐿 , 𝑝min ≤ 𝑝max , and the fact that √𝑎 + 𝑏 ≤ √𝑎 + √𝑏 for 𝑎 , 𝑏 ≥ 0 . Then the number of communication rounds 𝑇 ≤ 2𝛿 0 𝛾𝜀2 ≤ 2𝛿 0 𝜀2 ( ︂ 5 𝛼 √︂ 𝑝max 𝑝min ( ︁̃︀𝐿 + ̃︀ℒ ) ︁+ 2√𝑚max ̃︀ℒ ) ︂ = 𝒪 ( ︃ ( ̃︀𝐿 + ̃︀ℒ ) 𝛿0 𝛼𝜀2 √︂ 𝑝max 𝑝min + √ 𝑚max ̃︀ℒ𝛿0 𝜀2 ) ︃ . At each worker , we have # grad𝑖 = 𝑚𝑖 + 𝑇 ( 𝑝𝑖𝑚𝑖 + ( 1 − 𝑝𝑖 ) 𝜏𝑖 ) = 𝑚𝑖 + 2𝑚𝑖𝜏𝑖 𝜏𝑖 + 𝑚𝑖 𝑇 ≤ 𝑚𝑖 + 2𝜏𝑖𝑇 . Averaging over 𝑖 = 1 , . . . , 𝑛 , we get # grad ≤ 𝑚 + 2𝜏𝑇 = 𝒪 ( ︃ 𝑚 + 𝜏 ( ̃︀𝐿 + ̃︀ℒ ) 𝛿0 𝛼𝜀2 √︂ 𝑝max 𝑝min + 𝜏 √ 𝑚max ̃︀ℒ𝛿0 𝜀2 ) ︃ . E.2 CONVERGENCE UNDER POLYAK-ŁOJASIEWICZ CONDITION Theorem 6 . Let Assumptions 1 and 4 hold , and let the stepsize in Algorithm 3 be set as 0 < 𝛾 ≤ min { ︂ 𝛾0 , 𝜃 2𝜇 , 𝑝min 2𝜇 } ︂ , ( 44 ) where 𝛾0 def = 0 < 𝛾 ≤ ( ︂ 𝐿 + √︂ 8𝛽 𝜃 ̃︀𝐿2 + 4 ( ︁ 5𝛽𝜃 𝑝max𝑝min + 1𝑝min ) ︁ ̃︀ℒ2 ) ︂−1 , ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀ 1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Let Ψ𝑡 def = 𝑓 ( 𝑥𝑡 ) − 𝑓 ( 𝑥⋆ ) + 2𝛾𝜃 𝑉 𝑡 + 2𝛾𝑝min ( ︁ 1 + 4𝛽𝑝max𝜃 ) ︁ 𝑃 𝑡 . Then for any 𝑇 ≥ 0 , we have E [ ︀ Ψ𝑇 ] ︀ ≤ ( 1 − 𝛾𝜇 ) 𝑇E [ ︀ Ψ0 ] ︀ . ( 45 ) Proof . Similarly to the proof of Theorem 5 the inequalities ( 39 ) , ( 40 ) , ( 41 ) hold with 𝛿𝑡 = 𝑓 ( 𝑥𝑡 ) − 𝑓 ( 𝑥⋆ ) . Adding ( 39 ) with a 2𝛾𝜃 multiple of ( 41 ) we obtain E [ ︀ 𝛿𝑡+1 ] ︀ + 2𝛾 𝜃 E [ ︀ 𝑉 𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾E [ ︀ 𝑉 𝑡 ] ︀ +𝛾E [ ︀ 𝑃 𝑡 ] ︀ + 2𝛾 𝜃 ( ︀ ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡 ] ︀ + 𝐴𝑟𝑡 + 𝐶E [ ︀ 𝑃 𝑡 ] ︀ ) ︀ ≤ 𝛿𝑡 + 2𝛾 𝜃 E [ ︀ 𝑉 𝑡 ] ︀ ( ︂ 1 − 𝜃 2 ) ︂ −𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 − 2𝛾𝐴 𝜃 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ +𝛾 ( ︂ 1 + 2𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ , where 𝐴 def= 𝛽 ( ︁ 2̃︀𝐿2 + ̃︀ℒ2 ) ︁ , 𝐶 def= 2𝛽𝑝max . Then adding the above inequality with a 2𝛾𝑝min ( ︀ 1 + 2𝐶𝜃 ) ︀ multiple of ( 40 ) , we get E [ ︀ Ψ𝑡+1 ] ︀ = E [ ︀ 𝛿𝑡+1 ] ︀ + 2𝛾 𝜃 E [ ︀ 𝑉 𝑡+1 ] ︀ + 2𝛾 𝑝min ( ︂ 1 + 2𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡+1 ] ︀ ≤ 𝛿𝑡 + 𝛾 𝜃 E [ ︀ 𝑉 𝑡 ] ︀ ( ︂ 1 − 𝜃 2 ) ︂ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 − 2𝛾𝐴 𝜃 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ +𝛾 ( ︂ 1 + 2𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ + 2𝛾 𝑝min ( ︂ 1 + 2𝐶 𝜃 ) ︂ ( ︁ ( 1 − 𝑝min ) E [ ︀ 𝑃 𝑡 ] ︀ + ̃︀ℒ2E [ ︀𝑅𝑡 ] ︀ ) ︁ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 2𝛾 𝜃 E [ ︀ 𝑉 𝑡 ] ︀ ( ︂ 1 − 𝜃 2 ) ︂ + 2𝛾 𝑝min ( ︂ 1 + 2𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ ( ︁ 1 − 𝑝min 2 ) ︁ −𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 − 2𝛾𝐴 𝜃 − 2𝛾 𝑝min ( ︂ 1 + 2𝐶 𝜃 ) ︂ ̃︀ℒ2 ) ︂E [ ︀𝑅𝑡 ] ︀ . ( 46 ) PL inequality implies that 𝛿𝑡 − 𝛾2 ‖∇𝑓 ( 𝑥 𝑡 ) ‖2 ≤ ( 1 − 𝛾𝜇 ) 𝛿𝑡 . In view of the above inequality and our assumption on the stepsize ( 𝛾 ≤ 𝜃2𝜇 , 𝛾 ≤ 𝑝min 2𝜇 ) , we get E [ ︀ Ψ𝑡+1 ] ︀ ≤ ( 1 − 𝛾𝜇 ) E [ ︀ Ψ𝑡 ] ︀ − ( ︂ 1 2𝛾 − 𝐿 2 − 2𝛾𝐴 𝜃 − 2𝛾 𝑝min ( ︂ 1 + 2𝐶 𝜃 ) ︂ ̃︀ℒ2 ) ︂E [ ︀𝑅𝑡 ] ︀ . The coefficient in front of E [ 𝑅𝑡 ] simplifies after substitution by 𝐴 and 𝐶 2𝛾𝐴 𝜃 + 2𝛾 𝑝min ( ︂ 1 + 2𝐶 𝜃 ) ︂ ̃︀ℒ2 = 4𝛽 𝜃 ̃︀𝐿2 + ( ︂2𝛽 𝜃 + 2 𝑝min + 8𝛽 𝜃 𝑝max 𝑝min ) ︂ ̃︀ℒ2 ≤ 4𝛽 𝜃 ̃︀𝐿2 + 2 ( ︂5𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 . Thus by Lemma 15 and the stepsize choice 0 < 𝛾 ≤ ( ︃ 𝐿 + √︃ 8𝛽 𝜃 ̃︀𝐿2 + 4 ( ︂5𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 ) ︃−1 ( 47 ) the last term in ( 46 ) is not positive . E [ ︀ Ψ𝑡+1 ] ︀ ≤ ( 1 − 𝛾𝜇 ) E [ ︀ Ψ𝑡 ] ︀ . It remains to unroll the recurrence . Corollary 11 . Let assumptions of Theorem 6 hold , 𝑣0𝑖 = 𝑔 0 𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = min { ︂ 𝛾0 , 𝜃 2𝜇 , 𝑝min 2𝜇 } ︂ , 𝛾0 = ( ︃ 𝐿 + √︃ 8𝛽 𝜃 ̃︀𝐿2 + 4 ( ︂5𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 ) ︃−1 , 𝑝𝑖 = 𝜏𝑖 𝜏𝑖 + 𝑚𝑖 , 𝑖 = 1 , . . . , 𝑛 . Then , after 𝑇 iterations of EF21-PAGE we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 inf ] ︀ ≤ 𝜀 . It requires 𝑇 = 𝒪 ( ︃ 1 𝜇 ( ︃ ̃︀𝐿 + ̃︀ℒ 𝛼 √︂ 𝑝max 𝑝min + √ 𝑚max ̃︀ℒ ) ︃ ln ( ︂𝛿0 𝜀 ) ︂ ) ︃ iterations/communications rounds , # grad𝑖 = 𝒪 ( ︃ 𝑚𝑖 + 𝜏𝑖 𝜇 ( ︃ ̃︀𝐿 + ̃︀ℒ 𝛼 √︂ 𝑝max 𝑝min + √ 𝑚max ̃︀ℒ ) ︃ ln ( ︂𝛿0 𝜀 ) ︂ ) ︃ stochastic oracle calls for worker 𝑖 , and # grad = 𝒪 ( ︃ 𝑚 + 𝜏 𝜇 ( ︃ ̃︀𝐿 + ̃︀ℒ 𝛼 √︂ 𝑝max 𝑝min + √ 𝑚max ̃︀ℒ ) ︃ ln ( ︂𝛿0 𝜀 ) ︂ ) ︃ stochastic oracle calls per worker on average , where 𝜏 = 1𝑛 ∑︀𝑛 𝑖=1 𝜏𝑖 , 𝑚 = 1 𝑛 ∑︀𝑛 𝑖=1 𝑚𝑖 , 𝑚max = max𝑖=1 , ... , 𝑛 𝑚𝑖 , 𝑝max = max𝑖=1 , ... , 𝑛 𝑝𝑖 , 𝑝min = min𝑖=1 , ... , 𝑛 𝑝𝑖 . F PARTIAL PARTICIPATION In this section , we provide an option for partial participation of the clients – a feature important in federated learning . Most of the works in compressed distributed optimization deal with full worker participation , i.e. , the case when all clients are involved in computation and communication at every iteration . However , in the practice of federated learning , only a subset of clients are allowed to participate at each training round . This limitation comes mainly due to the following two reasons . First , clients ( e.g. , mobile devices ) may wish to join or leave the network randomly . Second , it is often prohibitive to wait for all available clients since stragglers can significantly slow down the training process . Although many existing works ( Gorbunov et al. , 2021 ; Horváth & Richtárik , 2021 ; Philippenko & Dieuleveut , 2020 ; Karimireddy et al. , 2020 ; Yang et al. , 2021 ; Cho et al. , 2020 ) allow for partial participation , they assume either unbiased compressors or no compression at all . We provide a simple analysis of partial participation , which works with biased compressors and builds upon the EF21 mechanism . The modified method ( Algorithm 4 ) is called EF21-PP . At each iteration of EF21-PP , the master samples a subset 𝑆𝑡 of clients ( nodes ) , which are required to perform computation . Note , that all other clients ( nodes ) 𝑖 /∈ 𝑆𝑡 participate neither in the computation nor in communication at iteration 𝑡 . We allow for an arbitrary sampling strategy of a subset 𝑆𝑡 at the master node . The only requirement is that Prob ( 𝑖 ∈ 𝑆𝑡 ) = 𝑝𝑖 > 0 for all 𝑖 = 1 , . . . , 𝑛 , which is often referred to as a proper arbitrary sampling.9 Clearly , many poplular sampling procedures fell into this setting , for instance , independent sampling with/without replacement , 𝜏 -nice sampling . We do not discuss particular sampling strategies here , more on samplings can be found in ( Qu & Richtárik , 2014 ) . Algorithm 4 EF21-PP ( EF21 with partial participation ) 1 : Input : starting point 𝑥0 ∈ R𝑑 ; 𝑔0𝑖 ∈ R𝑑 for 𝑖 = 1 , . . . , 𝑛 ( known by nodes ) ; 𝑔0 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 0 𝑖 ( known by master ) ; learning rate 𝛾 > 0 2 : for 𝑡 = 0,1 , 2 , . . . , 𝑇 − 1 do 3 : Master computes 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 4 : Master samples a subset 𝑆𝑡 of nodes ( |𝑆𝑡| ≤ 𝑛 ) such that Prob ( 𝑖 ∈ 𝑆𝑡 ) = 𝑝𝑖 5 : Master broadcasts 𝑥𝑡+1 to the nodes with 𝑖 ∈ 𝑆𝑡 6 : for all nodes 𝑖 = 1 , . . . , 𝑛 in parallel do 7 : if 𝑖 ∈ 𝑆𝑡 then 8 : Compress 𝑐𝑡𝑖 = 𝒞 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ) and send 𝑐𝑡𝑖 to the master 9 : Update local state 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 + 𝑐 𝑡 𝑖 10 : end if 11 : if 𝑖 /∈ 𝑆𝑡 then 12 : Do not change local state 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 13 : end if 14 : end for 15 : Master updates 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 , 𝑐 𝑡 𝑖 = 0 for 𝑖 /∈ 𝑆𝑡 16 : Master computes 𝑔𝑡+1 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 𝑡+1 𝑖 via 𝑔 𝑡+1 = 𝑔𝑡 + 1𝑛 ∑︀𝑛 𝑖=1 𝑐 𝑡 𝑖 17 : end for Lemma 5 . Then for Algorithm 4 holds E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃𝑝 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝐵E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ ( 48 ) with 𝜃𝑝 def = 𝜌𝑝𝑚𝑖𝑛 + 𝜃𝑝𝑚𝑎𝑥 − 𝜌− ( 𝑝𝑚𝑎𝑥 − 𝑝𝑚𝑖𝑛 ) , 𝐵 def = 1𝑛 ∑︀𝑛 𝑖=1 ( ︀ 𝛽𝑝𝑖 + ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝𝑖 ) ) ︀ 𝐿2𝑖 , 𝑝𝑚𝑎𝑥 def = max1≤𝑖≤𝑛 𝑝𝑖 , 𝑝𝑚𝑖𝑛 def = min1≤𝑖≤𝑛 𝑝𝑖 , 𝜃 = 1 − ( 1 + 𝑠 ) ( 1 − 𝛼 ) , 𝛽 = ( ︀ 1 + 1𝑠 ) ︀ ( 1 − 𝛼 ) and small enough 𝜌 , 𝑠 > 0 . Proof . By ( 13 ) in Lemma 1 , we have for all 𝑖 ∈ 𝑆𝑡 E [ ︀ 𝐺𝑡+1𝑖 | 𝑖 ∈ 𝑆𝑡 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽𝐿2𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 | 𝑖 ∈ 𝑆𝑡 ] ︁ ( 49 ) 9It is natural to focus on proper samplings only since otherwise there is a node 𝑖 , which never communicaties . This would be a critical issue when trying to minimize ( 1 ) as we do not assume any similarity between 𝑓𝑖 ( · ) . with 𝜃 = 1 − ( 1 + 𝑠 ) ( 1 − 𝛼 ) , 𝛽 = ( ︀ 1 + 1𝑠 ) ︀ ( 1 − 𝛼 ) and arbitrary 𝑠 > 0 . Define 𝑊 𝑡 def= { 𝑔𝑡1 , . . . , 𝑔𝑡𝑛 , 𝑥𝑡 , 𝑥𝑡+1 } and let 𝑖 /∈ 𝑆𝑡 , then E [ ︀ 𝐺𝑡+1𝑖 | 𝑖 /∈ 𝑆𝑡 ] ︀ = E [ ︀ E [ ︀ 𝐺𝑡+1𝑖 | 𝑊 𝑡 ] ︀ | 𝑖 /∈ 𝑆𝑡 ] ︀ = E [ ︁ E [ ︁⃦⃦ 𝑔𝑡+1𝑖 −∇𝑓𝑖 ( 𝑥 𝑡+1 ) ⃦⃦2 | 𝑊 𝑡 ] ︁ | 𝑖 /∈ 𝑆𝑡 ] ︁ ≤ ( 1 + 𝜌 ) E [ ︁ E [ ︁⃦⃦ 𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 | 𝑊 𝑡 ] ︁ | 𝑖 /∈ 𝑆𝑡 ] ︁ + ( ︀ 1 + 𝜌−1 ) ︀ E [ ︁ E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 | 𝑊 𝑡 ] ︁ | 𝑖 /∈ 𝑆𝑡 ] ︁ ≤ ( 1 + 𝜌 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + ( ︀ 1 + 𝜌−1 ) ︀ E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 | 𝑖 /∈ 𝑆𝑡 ] ︁ ≤ ( 1 + 𝜌 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + ( ︀ 1 + 𝜌−1 ) ︀ 𝐿2𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ . ( 50 ) Combining ( 49 ) and ( 50 ) , we get E [ ︀ 𝐺𝑡+1 ] ︀ = 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︀ 𝐺𝑡+1𝑖 ] ︀ = 1 𝑛 𝑛∑︁ 𝑖=1 𝑝𝑖E [ ︀ 𝐺𝑡+1𝑖 | 𝑖 ∈ 𝑆𝑡 ] ︀ + 1 𝑛 𝑛∑︁ 𝑖=1 ( 1 − 𝑝𝑖 ) E [ ︀ 𝐺𝑡+1𝑖 | 𝑖 /∈ 𝑆𝑡 ] ︀ ( 49 ) , ( 50 ) ≤ ( 1 − 𝜃 ) 1 𝑛 𝑛∑︁ 𝑖=1 𝑝𝑖E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽 ( ︃ 1 𝑛 𝑛∑︁ 𝑖=1 𝑝𝑖𝐿 2 𝑖 ) ︃ E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + ( 1 + 𝜌 ) 1 𝑛 𝑛∑︁ 𝑖=1 ( 1 − 𝑝𝑖 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + ( ︀ 1 + 𝜌−1 ) ︀ ( ︃ 1 𝑛 𝑛∑︁ 𝑖=1 ( 1 − 𝑝𝑖 ) 𝐿2𝑖 ) ︃ E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ ( 𝑖 ) ≤ ( 1 − 𝜃 ) 𝑝𝑚𝑎𝑥 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽 ( ︃ 1 𝑛 𝑛∑︁ 𝑖=1 𝑝𝑖𝐿 2 𝑖 ) ︃ E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + ( 1 + 𝜌 ) ( 1 − 𝑝𝑚𝑖𝑛 ) 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︀ 𝐺𝑡𝑖 ] ︀ + ( ︀ 1 + 𝜌−1 ) ︀ ( ︃ 1 𝑛 𝑛∑︁ 𝑖=1 ( 1 − 𝑝𝑖 ) 𝐿2𝑖 ) ︃ E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ = ( ︂ ( 1 − 𝜃 ) 𝑝𝑚𝑎𝑥 + ( 1 + 𝜌 ) ( 1 − 𝑝𝑚𝑖𝑛 ) ) ︂ E [ ︀ 𝐺𝑡 ] ︀ + ( ︃ 1 𝑛 𝑛∑︁ 𝑖=1 ( ︀ 𝛽𝑝𝑖 + ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝𝑖 ) ) ︀ 𝐿2𝑖 ) ︃ E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ = ( ︂ 1 − ( 𝜌𝑝𝑚𝑖𝑛 + 𝜃𝑝𝑚𝑎𝑥 − 𝜌− ( 𝑝𝑚𝑎𝑥 − 𝑝𝑚𝑖𝑛 ) ) ) ︂ E [ ︀ 𝐺𝑡 ] ︀ + ( ︃ 1 𝑛 𝑛∑︁ 𝑖=1 ( ︀ 𝛽𝑝𝑖 + ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝𝑖 ) ) ︀ 𝐿2𝑖 ) ︃ E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ . = ( 1 − 𝜃𝑝 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝐵E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ , Lemma 6 . [ To simplify the rates for partial participation ] Let 𝐵 and 𝜃𝑝 be defined as in Theorems 7 and Theorems 8 , and let 𝑝𝑖 = 𝑝 > 0 for all 𝑖 = 1 , . . . , 𝑛 . Then there exist 𝜌 , 𝑠 > 0 such that 𝜃𝑝 ≥ 𝑝𝛼 2 , ( 51 ) 0 < 𝐵 𝜃𝑝 ≤ ( ︃ 4̃︀𝐿 𝑝𝛼 ) ︃2 . ( 52 ) Proof . Under the assumption that 𝑝𝑖 = 𝑝 for all 𝑖 = 1 , . . . , 𝑛 , the constants simplify to 𝜃𝑝 = 𝜌𝑝 + 𝜃𝑝− 𝜌 , 𝐵 = ( ︀ 𝛽𝑝 + ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝 ) ) ︀ ̃︀𝐿2 , 𝑝𝑚𝑎𝑥 = 𝑝𝑚𝑖𝑛 = 𝑝 . Case I : let 𝛼 = 1 , 𝑝 = 1 , then the result holds trivially . Case II : let 0 < 𝛼 < 1 , 𝑝 = 1 , then 𝐵 = 𝛽̃︀𝐿2 , 𝜃𝑝 = 𝜃 = 1 − √1 − 𝛼 ≥ 𝛼2 and ( 52 ) follows by Lemma 17 . Case III : let 𝛼 = 1 , and 0 < 𝑝 < 1 , then 𝜃 = 1 , 𝛽 = 0 , 𝐵 = ( ︀ 1 + 𝜌−1 ) ︀ ( 1−𝑝 ) ̃︀𝐿2 , 𝜃𝑝 = 𝑝−𝜌 ( 1−𝑝 ) . Then the choice 𝜌 = 𝑝𝛼2 ( 1−𝑝 ) simplifies 𝜃𝑝 = 𝑝 2 , 𝐵 𝜃𝑝 = ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝 ) ̃︀𝐿2 𝑝− 𝜌 ( 1 − 𝑝 ) = 2 ( 1 − 𝑝 ) ̃︀𝐿2 𝑝 ( ︂ 2 𝑝 − 1 ) ︂ ≤ 4 ̃︀𝐿2 𝑝2 . Case IV : let 0 < 𝛼 < 1 , and 0 < 𝑝 < 1.Then the choice of constants 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀ 1 + 1𝑠 ) ︀ , 𝜌 = 𝑝𝛼4 ( 1−𝑝 ) , 𝑠 = 𝛼 4 ( 1−𝛼 ) yields 𝑝𝜌 + 𝜃𝑝− 𝜌 = 𝑝 ( 𝜌 + 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) ) − 𝜌 = 𝑝𝛼− 𝑝 ( 1 − 𝛼 ) 𝑠− ( 1 − 𝑝 ) 𝜌 = 1 2 𝑝𝛼 . ( 53 ) Also 1 + 1 𝑠 = 4 − 3𝛼 𝛼 ≤ 4 𝛼 , 1 + 1 𝜌 = 4 ( 1 − 𝑝 ) + 𝛼𝑝 𝑝𝛼 = 4 − 𝑝 ( 4 − 𝛼 ) 𝑝𝛼 ≤ 4 𝑝𝛼 . Thus 𝐵 𝜃𝑝 = 𝑝𝛽 + ( 1 − 𝑝 ) ( ︁ 1 + 1𝜌 ) ︁ 𝑝 ( 𝜌 + 𝜃 ) − 𝜌 ̃︀𝐿2 = 𝑝 ( 1 − 𝛼 ) ( ︀1 + 1𝑠 ) ︀+ ( 1 − 𝑝 ) ( ︁ 1 + 1𝜌 ) ︁ 1 2𝑝𝛼 ̃︀𝐿2 ≤ 𝑝 ( 1 − 𝛼 ) 4𝛼 + ( 1 − 𝑝 ) 4 𝑝𝛼 1 2𝑝𝛼 ̃︀𝐿2 ≤ 4 𝛼 + 4 𝑝𝛼 1 2𝑝𝛼 ̃︀𝐿2 ≤ 8 𝑝𝛼 1 2𝑝𝛼 ̃︀𝐿2 ≤ 16 ̃︀𝐿2 𝑝2𝛼2 . ( 54 ) F.1 CONVERGENCE FOR GENERAL NON-CONVEX FUNCTIONS Theorem 7 . Let Assumption 1 hold , and let the stepsize in Algorithm 4 be set as 0 < 𝛾 ≤ ( ︃ 𝐿 + √︃ 𝐵 𝜃𝑝 ) ︃−1 . ( 55 ) Fix 𝑇 ≥ 1 and let ? ̂ ? 𝑇 be chosen from the iterates 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Then E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 2 ( ︀𝑓 ( 𝑥0 ) − 𝑓 inf ) ︀ 𝛾𝑇 + E [ ︀ 𝐺0 ] ︀ 𝜃𝑝𝑇 ( 56 ) with 𝜃𝑝 = 𝜌𝑝𝑚𝑖𝑛 + 𝜃𝑝𝑚𝑎𝑥 − 𝜌− ( 𝑝𝑚𝑎𝑥 − 𝑝𝑚𝑖𝑛 ) , 𝐵 = 1𝑛 ∑︀𝑛 𝑖=1 ( ︀ 𝛽𝑝𝑖 + ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝𝑖 ) ) ︀ 𝐿2𝑖 , 𝑝𝑚𝑎𝑥 = max1≤𝑖≤𝑛 𝑝𝑖 , 𝑝𝑚𝑖𝑛 = min1≤𝑖≤𝑛 𝑝𝑖 , 𝜃 = 1 − ( 1 + 𝑠 ) ( 1 − 𝛼 ) , 𝛽 = ( ︀ 1 + 1𝑠 ) ︀ ( 1 − 𝛼 ) and 𝜌 , 𝑠 > 0 . Proof . By ( 20 ) , we have E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ . ( 57 ) Lemma 5 states that E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃𝑝 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝐵E [ ︀ 𝑅𝑡 ] ︀ ( 58 ) with 𝜃𝑝 = 𝜌𝑝𝑚𝑖𝑛 + 𝜃𝑝𝑚𝑎𝑥 − 𝜌− ( 𝑝𝑚𝑎𝑥 − 𝑝𝑚𝑖𝑛 ) , 𝐵 = 1𝑛 ∑︀𝑛 𝑖=1 ( ︀ 𝛽𝑝𝑖 + ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝𝑖 ) ) ︀ 𝐿2𝑖 , 𝑝𝑚𝑎𝑥 = max1≤𝑖≤𝑛 𝑝𝑖 , 𝑝𝑚𝑖𝑛 = min1≤𝑖≤𝑛 𝑝𝑖 , 𝜃 = 1 − ( 1 + 𝑠 ) ( 1 − 𝛼 ) , 𝛽 = ( ︀ 1 + 1𝑠 ) ︀ ( 1 − 𝛼 ) and small enough 𝜌 , 𝑠 > 0 . Adding ( 57 ) with a 𝛾2𝜃2 multiple of ( 58 ) and rearranging terms in the right hand side , we have E [ ︀ 𝛿𝑡+1 ] ︀ + 𝛾 2𝜃𝑝 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 2𝜃𝑝 E [ ︀ 𝐺𝑡 ] ︀ −𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 − 𝛾𝐵 2𝜃 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 2𝜃𝑝 E [ ︀ 𝐺𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ . The last inequality follows from the bound 𝛾2 𝐵𝜃𝑝 + 𝐿𝛾 ≤ 1 , which holds because of Lemma 15 and our assumption on the stepsize . By summing up inequalities for 𝑡 = 0 , . . . , 𝑇 − 1 , we get 0 ≤ E [ ︁ 𝛿𝑇 + 𝛾 2𝜃 𝐺𝑇 ] ︁ ≤ 𝛿0 + 𝛾 2𝜃 E [ ︀ 𝐺0 ] ︀ − 𝛾 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ . Multiplying both sides by 2𝛾𝑇 , after rearranging we get 𝑇−1∑︁ 𝑡=0 1 𝑇 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2𝛿0 𝛾𝑇 + E [ ︀ 𝐺0 ] ︀ 𝜃𝑇 . It remains to notice that the left hand side can be interpreted as E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ , where ? ̂ ? 𝑇 is chosen from 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Corollary 12 . Let assumptions of Theorem 7 hold , 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = ( ︃ 𝐿 + √︃ 𝐵 𝜃𝑝 ) ︃−1 , 𝑝𝑖 = 𝑝 , 𝑖 = 1 , . . . , 𝑛 , where 𝐵 and 𝜃𝑝 are given in Theorem 7 . Then , after 𝑇 iterations/communication rounds of EF21-PP we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = # grad = 𝒪 ( ︃ ̃︀𝐿𝛿0 𝑝𝛼𝜀2 ) ︃ ( 59 ) iterations/communications rounds/gradint computations at each node . Proof . Let 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , then 𝐺0 = 0 and by Theorem 7 # grad = 𝑇 ( 𝑖 ) ≤ 2𝛿 0 𝛾𝜀2 ( 𝑖𝑖 ) ≤ 2𝛿 0 𝜀2 ( ︃ 𝐿 + ̃︀𝐿√︃𝐵 𝜃𝑝 ) ︃ ( 𝑖𝑖𝑖 ) ≤ 2𝛿 0 𝜀2 ( ︃ 𝐿 + 4̃︀𝐿 𝑝𝛼 ) ︃ ≤ 2𝛿 0 𝜀2 ( ︃ 𝐿 + 4̃︀𝐿 𝑝𝛼 ) ︃ ( 𝑖𝑣 ) ≤ 2𝛿 0 𝜀2 ( ︃ ̃︀𝐿 𝑝𝛼 + 4̃︀𝐿 𝑝𝛼 ) ︃ = 5̃︀𝐿𝛿0 𝑝𝛼𝜀2 , where ( 𝑖 ) is due to the rate ( 56 ) given by Theorem 7 . In two ( 𝑖𝑖 ) we use the largest possible stepsize ( 55 ) , in ( 𝑖𝑖𝑖 ) we utilize Lemma 6 , and ( 𝑖𝑣 ) follows by the inequalities 𝛼 ≤ 1 , 𝑝 ≤ 1 and 𝐿 ≤ ̃︀𝐿 . F.2 CONVERGENCE UNDER POLYAK-ŁOJASIEWICZ CONDITION Theorem 8 . Let Assumptions 1 and 4 hold , and let the stepsize in Algorithm 4 be set as 0 < 𝛾 ≤ min ⎧⎨⎩ ( ︃ 𝐿 + √︃ 2𝐵 𝜃𝑝 ) ︃−1 , 𝜃𝑝 2𝜇 ⎫⎬⎭ . ( 60 ) Let Ψ𝑡 def = 𝑓 ( 𝑥𝑡 ) − 𝑓 ( 𝑥⋆ ) + 𝛾𝜃𝑝𝐺 𝑡 . Then for any 𝑇 ≥ 0 , we have E [ ︀ Ψ𝑇 ] ︀ ≤ ( 1 − 𝛾𝜇 ) 𝑇E [ ︀ Ψ0 ] ︀ ( 61 ) with 𝜃𝑝 = 𝜌𝑝𝑚𝑖𝑛 + 𝜃𝑝𝑚𝑎𝑥 − 𝜌− ( 𝑝𝑚𝑎𝑥 − 𝑝𝑚𝑖𝑛 ) , 𝐵 = 1𝑛 ∑︀𝑛 𝑖=1 ( ︀ 𝛽𝑝𝑖 + ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝𝑖 ) ) ︀ 𝐿2𝑖 , 𝑝𝑚𝑎𝑥 = max1≤𝑖≤𝑛 𝑝𝑖 , 𝑝𝑚𝑖𝑛 = min1≤𝑖≤𝑛 𝑝𝑖 , 𝜃 = 1 − ( 1 + 𝑠 ) ( 1 − 𝛼 ) , 𝛽 = ( ︀ 1 + 1𝑠 ) ︀ ( 1 − 𝛼 ) and 𝜌 , 𝑠 > 0 . Proof . Following the same steps as in the proof of Theorem 2 , but using ( 58 ) , and assumption on the stepsize ( 60 ) , we obtain the result . Corollary 13 . Let assumptions of Theorem 8 hold , 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = min ⎧⎨⎩ ( ︃ 𝐿 + √︃ 2𝐵 𝜃𝑝 ) ︃−1 , 𝜃𝑝 2𝜇 ⎫⎬⎭ , 𝑝𝑖 = 𝑝 , 𝑖 = 1 , . . . , 𝑛 , where 𝐵 and 𝜃𝑝 are given in Theorem 8 . Then , after 𝑇 iterations/communication rounds of EF21-PP we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 ( 𝑥⋆ ) ] ︀ ≤ 𝜀 . It requires 𝑇 = # grad = 𝒪 ( ︃ ̃︀𝐿 𝑝𝛼𝜇 log ( ︂ 𝛿0 𝜀 ) ︂ ) ︃ ( 62 ) iterations/communications rounds/gradint computations at each node . Proof . The proof is the same as for Corollary 3 . The only difference is that Lemma 6 is needed to upper bound the quantities 1/𝜃𝑝 and 𝐵/𝜃𝑝 , which appear in Theorem 8 . G BIDIRECTIONAL COMPRESSION In the majority of applications , the uplink ( Client → Server ) communication is the bottleneck . However , in some settings the downlink ( Server → Client ) communication can also slowdown training . Tang et al . ( 2020 ) construct a mechanism which allows bidirectional biased compression . Their method builds upon the original EF meachanism and they prove 𝒪 ( ︁ 1 𝑇 2/3 ) ︁ rate for general nonconvex objectives . However , the main defficiency of this approach is that it requires an additional assumption of bounded magnitude of error ( there exists ∆ > 0 such that E [ ︁ ‖𝒞 ( 𝑥 ) − 𝑥‖2 ] ︁ ≤ ∆ for all 𝑥 ) . In this section , we lift this limitation and propose a new method EF21-BC ( Algorithm 5 ) , which enjoys the desirable 𝒪 ( ︀ 1 𝑇 ) ︀ , and does not rely on additional assumptions . Algorithm 5 EF21-BC ( EF21 with bidirectional biased compression ) 1 : Input : starting point 𝑥0 ∈ R𝑑 ; 𝑔0 , 𝑏0 , ̃︀𝑔0𝑖 ∈ R𝑑 for 𝑖 = 1 , . . . , 𝑛 ( known by nodes ) ; ̃︀𝑔0 = 1 𝑛 ∑︀𝑛 𝑖=1 ̃︀𝑔0𝑖 ( known by master ) ; learning rate 𝛾 > 0 2 : for 𝑡 = 0,1 , 2 , . . . , 𝑇 − 1 do 3 : Master updates 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 4 : for all nodes 𝑖 = 1 , . . . , 𝑛 in parallel do 5 : Update 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 , 𝑔𝑡+1 = 𝑔𝑡 + 𝑏𝑡 , 6 : compress 𝑐𝑡𝑖 = 𝒞𝑤 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) , send 𝑐𝑡𝑖 to the master , and 7 : update local state ̃︀𝑔𝑡+1𝑖 = ̃︀𝑔𝑡𝑖 + 𝑐𝑡𝑖 8 : end for 9 : Master computes ̃︀𝑔𝑡+1 = 1𝑛 ∑︀𝑛𝑖=1 ̃︀𝑔𝑡+1𝑖 via ̃︀𝑔𝑡+1 = ̃︀𝑔𝑡 + 1𝑛 ∑︀𝑛𝑖=1 𝑐𝑡𝑖 , 10 : compreses 𝑏𝑡+1 = 𝒞𝑀 ( ̃︀𝑔𝑡+1 − 𝑔𝑡 ) , broadcast 𝑏𝑡+1 to workers , 11 : and updates 𝑔𝑡+1 = 𝑔𝑡 + 𝑏𝑡+1 12 : end for Note that 𝒞𝑀 and 𝒞𝑤 stand for contractive compressors of the type 1 of master and workers respectively . In general , different 𝛼𝑀 and 𝛼𝑤 are accepted . Notations for this section : 𝑃 𝑡𝑖 def = ‖̃︀𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ‖2 , 𝑃 𝑡 def= 1𝑛 ∑︀𝑛𝑖=1 𝑃 𝑡𝑖 . Lemma 7 . Let Assumption 1 hold , 𝒞𝑤 be a contractive compressor , and ̃︀𝑔𝑡+1𝑖 be an EF21 estimator of ∇𝑓𝑖 ( 𝑥𝑡+1 ) , i. e. ̃︀𝑔𝑡+1𝑖 = ̃︀𝑔𝑡𝑖 + 𝒞𝑤 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) ( 63 ) for arbitrary ̃︀𝑔0𝑖 and all all 𝑖 = 1 , . . . , 𝑛 , 𝑡 ≥ 0 . Then E [ ︀ 𝑃 𝑡+1 ] ︀ ≤ ( 1 − 𝜃𝑤 ) E [ ︀ 𝑃 𝑡 ] ︀ + 𝛽𝑤̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ , ( 64 ) where 𝜃𝑤 def = 1 − ( 1 − 𝛼𝑤 ) ( 1 + 𝑠 ) , 𝛽𝑤 def = ( 1 − 𝛼𝑤 ) ( ︀ 1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . The proof is the same as for Lemma 1 . Lemma 8 . Let Assumption 1 hold , 𝒞𝑀 , 𝒞𝑤 be contractive compressors . Let ̃︀𝑔𝑡+1𝑖 be an EF21 estimator of ∇𝑓𝑖 ( 𝑥𝑡+1 ) , i. e. ̃︀𝑔𝑡+1𝑖 = ̃︀𝑔𝑡𝑖 + 𝒞𝑤 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) , ( 65 ) and let 𝑔𝑡+1 be an EF21 estimator of ̃︀𝑔𝑡+1 = 1𝑛 ∑︀𝑛𝑖=1 ̃︀𝑔𝑡+1𝑖 , i. e. 𝑔𝑡+1 = 𝑔𝑡 + 𝒞𝑀 ( ̃︀𝑔𝑡+1 − 𝑔𝑡 ) ( 66 ) for arbitrary 𝑔0 , ̃︀𝑔0𝑖 and all 𝑖 = 1 , . . . , 𝑛 , 𝑡 ≥ 0 . Then E [ ︁⃦⃦ 𝑔𝑡+1 − ̃︀𝑔𝑡+1⃦⃦2 ] ︁ ≤ ( 1 − 𝜃𝑀 ) E [ ︁⃦⃦𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁+ 8𝛽𝑀E [ ︀𝑃 𝑡 ] ︀+ 8𝛽𝑀 ̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ , ( 67 ) where 𝑔𝑡 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 𝑡 𝑖 , ̃︀𝑔𝑡 = 1𝑛 ∑︀𝑛𝑖=1 ̃︀𝑔𝑡𝑖 , 𝜃𝑀 = 1 − ( 1 − 𝛼𝑀 ) ( 1 + 𝜌 ) , 𝛽𝑀 = ( 1 − 𝛼𝑀 ) ( ︀1 + 𝜌−1 ) ︀ for any 𝜌 > 0 . Proof . Similarly to the proof of Lemma 1 , define 𝑊 𝑡 def= { 𝑔𝑡1 , . . . , 𝑔𝑡𝑛 , 𝑥𝑡 , 𝑥𝑡+1 } and E [ ︁⃦⃦ 𝑔𝑡+1 − ̃︀𝑔𝑡+1⃦⃦2 ] ︁ = E [ ︁E [ ︁⃦⃦𝑔𝑡+1 − ̃︀𝑔𝑡+1⃦⃦2 | 𝑊 𝑡 ] ︁ ] ︁ = E [ ︁ E [ ︁⃦⃦ 𝑔𝑡 + 𝒞𝑀 ( ̃︀𝑔𝑡+1 − 𝑔𝑡 ) − ̃︀𝑔𝑡+1⃦⃦2 | 𝑊 𝑡 ] ︁ ] ︁ ( 8 ) ≤ ( 1 − 𝛼𝑀 ) E [ ︁⃦⃦̃︀𝑔𝑡+1 − 𝑔𝑡⃦⃦2 ] ︁ ( 𝑖 ) ≤ ( 1 − 𝛼𝑀 ) ( 1 + 𝜌 ) E [ ︁⃦⃦̃︀𝑔𝑡 − 𝑔𝑡⃦⃦2 ] ︁ + ( 1 − 𝛼𝑀 ) ( ︀ 1 + 𝜌−1 ) ︀ ⃦⃦̃︀𝑔𝑡+1 − ̃︀𝑔𝑡⃦⃦2 = ( 1 − 𝜃𝑀 ) E [ ︁⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁+ 𝛽𝑀 ⃦⃦̃︀𝑔𝑡+1 − ̃︀𝑔𝑡⃦⃦2 , ( 68 ) where ( 𝑖 ) follows by Young ’ s inequality ( 118 ) , and in ( 𝑖𝑖 ) we use the definition of 𝜃𝑀 and 𝛽𝑀 . Further we bound the last term in ( 68 ) . Recall that ̃︀𝑔𝑡+1 = ̃︀𝑔𝑡 + 1 𝑛 𝑛∑︁ 𝑖=1 𝑐𝑡𝑖 . ( 69 ) where 𝑐𝑡𝑖 = 𝒞𝑤 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) and ̃︀𝑔𝑡 = 1𝑛 ∑︀𝑛𝑖=1 ̃︀𝑔𝑡𝑖 . Then E [ ︁⃦⃦̃︀𝑔𝑡+1 − ̃︀𝑔𝑡⃦⃦2 ] ︁ ( 69 ) = E ⎡⎣⃦⃦⃦⃦⃦̃︀𝑔𝑡 + 1𝑛 𝑛∑︁ 𝑖=1 𝑐𝑡𝑖 − ̃︀𝑔𝑡 ⃦⃦⃦⃦ ⃦ 2 ⎤⎦ = E ⎡⎣⃦⃦⃦⃦⃦ 1𝑛 𝑛∑︁ 𝑖=1 𝑐𝑡𝑖 ⃦⃦⃦⃦ ⃦ 2 ⎤⎦ ( 𝑖 ) ≤ 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ 𝑐𝑡𝑖 ⃦⃦2 ] ︁ = 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ 𝑐𝑡𝑖 − ( ︀ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) ︀+ ( ︀∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) ︀⃦⃦2 ] ︁ ( 118 ) ≤ 2 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁ E [ ︁⃦⃦ 𝒞𝑤 ( ︀ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) ︀− ( ︀∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) ︀⃦⃦2 | 𝑊 𝑡 ] ︁ ] ︁ +2 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ⃦⃦2 ] ︁ ( 8 ) ≤ 2 ( 1 − 𝛼𝑤 ) 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ⃦⃦2 ] ︁+ 2 1𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ⃦⃦2 ] ︁ = 2 ( 2 − 𝛼𝑤 ) 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ⃦⃦2 ] ︁ ( 𝑖𝑖 ) < 4 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ⃦⃦2 ] ︁ = 4 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) − ( ︀̃︀𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ) ︀⃦⃦2 ] ︁ ( 118 ) ≤ 8 1 𝑛 𝑛∑︁ 𝑖=1 ⃦⃦̃︀𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 + 8 1𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ( 𝑖𝑖𝑖 ) ≤ 8 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦̃︀𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ] ︁+ 8̃︀𝐿2E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁ = 8E [ ︀ 𝑃 𝑡 ] ︀ + 8̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ , ( 70 ) where in ( 𝑖 ) we use ( 119 ) , ( 𝑖𝑖 ) is due to 𝛼𝑤 > 0 , ( 𝑖𝑖𝑖 ) holds by Assumption 1 . In the last step we apply the definition of 𝑃 𝑡 = 1𝑛 ∑︀𝑛 𝑖=1 ‖̃︀𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ‖2 , and 𝑅𝑡 = ⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 Finally , plugging ( 70 ) into ( 68 ) , we conclude the proof . G.1 CONVERGENCE FOR GENERAL NON-CONVEX FUNCTIONS Theorem 9 . Let Assumption 1 hold , and let the stepsize in Algorithm 5 be set as 0 < 𝛾 ≤ ( ︃ 𝐿 + ̃︀𝐿√︃16𝛽𝑀 𝜃𝑀 + 2𝛽𝑤 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ ) ︃−1 ( 71 ) Fix 𝑇 ≥ 1 and let ? ̂ ? 𝑇 be chosen from the iterates 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Then E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 2E [ ︀Ψ0 ] ︀ 𝛾𝑇 , ( 72 ) where Ψ𝑡 def = 𝑓 ( 𝑥𝑡 ) −𝑓 inf + 𝛾𝜃𝑀 ‖𝑔 𝑡 − ̃︀𝑔𝑡‖2 + 𝛾𝜃𝑤 ( ︁1 + 8𝛽𝑀𝜃𝑀 ) ︁𝑃 𝑡 , ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃𝑤 def= 1− ( 1− 𝛼𝑤 ) ( 1 + 𝑠 ) , 𝛽𝑤 def = ( 1−𝛼𝑤 ) ( ︀ 1 + 𝑠−1 ) ︀ , 𝜃𝑀 def = 1− ( 1−𝛼𝑀 ) ( 1 +𝜌 ) , 𝛽𝑀 def = ( 1−𝛼𝑀 ) ( ︀ 1 + 𝜌−1 ) ︀ for any 𝜌 , 𝑠 > 0 . Proof . We apply Lemma 16 and split the error ‖𝑔𝑡 −∇𝑓 ( 𝑥𝑡 ) ‖2 in two parts 𝑓 ( 𝑥𝑡+1 ) ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 ⃦⃦ 𝑔𝑡 −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 +𝛾 ⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 + 𝛾 ⃦⃦̃︀𝑔𝑡 −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 +𝛾 1 𝑛 𝑛∑︁ 𝑖=1 ⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 + 𝛾 1 𝑛 𝑛∑︁ 𝑖=1 ⃦⃦̃︀𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 = 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 ⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 + 𝛾𝑃 𝑡 , ( 73 ) where we used notation 𝑅𝑡 = ‖𝛾𝑔𝑡‖2 = ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 , 𝑃 𝑡 = 1𝑛 ∑︀𝑛 𝑖=1 ‖̃︀𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ‖2 and applied ( 118 ) and ( 119 ) . Subtracting 𝑓 inf from both sides of the above inequality , taking expectation and using the notation 𝛿𝑡 = 𝑓 ( 𝑥𝑡+1 ) − 𝑓 inf , we get E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾E [ ︁⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁+ 𝛾E [ ︀𝑃 𝑡 ] ︀ . ( 74 ) Further , Lemma 7 and 8 provide the recursive bounds for the last two terms of ( 74 ) E [ ︀ 𝑃 𝑡+1 ] ︀ ≤ ( 1 − 𝜃𝑤 ) E [ ︀ 𝑃 𝑡 ] ︀ + 𝛽𝑤̃︀𝐿2E [ 𝑅𝑡 ] , ( 75 ) E [ ︁⃦⃦ 𝑔𝑡+1 − ̃︀𝑔𝑡+1⃦⃦2 ] ︁ ≤ ( 1 − 𝜃𝑀 ) E [ ︁⃦⃦𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁+ 8𝛽𝑀 ̃︀𝐿2E [ 𝑅𝑡 ] + 8𝛽𝑀E [ ︀𝑃 𝑡 ] ︀ . ( 76 ) Summing up ( 74 ) with a 𝛾𝜃𝑀 multiple of ( 76 ) we obtain E [ ︀ 𝛿𝑡+1 ] ︀ + 𝛾 𝜃𝑀 E [ ︁⃦⃦ 𝑔𝑡+1 − ̃︀𝑔𝑡+1⃦⃦2 ] ︁ ≤ E [ ︀𝛿𝑡 ] ︀− 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ +𝛾E [ ︁⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁+ 𝛾E [ ︀𝑃 𝑡 ] ︀ + 𝛾 𝜃𝑀 ( ︁ ( 1 − 𝜃𝑀 ) E [ ︁⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁ ) ︁ + 𝛾 𝜃𝑀 ( ︁ 8𝛽𝑀 ̃︀𝐿2E [ ︀𝑅𝑡 ] ︀+ 8𝛽𝑀E [ ︀𝑃 𝑡 ] ︀ ) ︁ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 𝜃𝑀 E [ ︁⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁− 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ − ( ︃ 1 2𝛾 − 𝐿 2 − 8𝛾𝛽𝑀 ̃︀𝐿2 𝜃𝑀 ) ︃ E [ ︀ 𝑅𝑡 ] ︀ +𝛾 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ . Then adding the above inequality with a 𝛾𝜃𝑤 ( ︁ 1 + 8𝛽𝑀𝜃𝑀 ) ︁ multiple of ( 75 ) , we get E [ ︀ Ψ𝑡+1 ] ︀ = E [ ︀ 𝛿𝑡+1 ] ︀ + 𝛾 𝜃𝑀 E [ ︁⃦⃦ 𝑔𝑡+1 − ̃︀𝑔𝑡+1⃦⃦2 ] ︁+ 𝛾 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ E [ ︀ 𝑃 𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 𝜃𝑀 E [ ︁⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁− 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︃ 1 2𝛾 − 𝐿 2 − 8𝛾𝛽𝑀 ̃︀𝐿2 𝜃𝑀 ) ︃ E [ ︀ 𝑅𝑡 ] ︀ +𝛾 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ + 𝛾 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ ( ︁ ( 1 − 𝜃𝑤 ) E [ ︀ 𝑃 𝑡 ] ︀ + 𝛽𝑤̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ ) ︁ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 𝜃𝑀 E [ ︁⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁+ 𝛾 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ − ( ︃ 1 2𝛾 − 𝐿 2 − 8𝛾𝛽𝑀 ̃︀𝐿2 𝜃𝑀 − 𝛾 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ 𝛽𝑤̃︀𝐿2 ) ︃E [ ︀𝑅𝑡 ] ︀ = E [ ︀ Ψ𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ − ( ︃ 1 2𝛾 − 𝐿 2 − 8𝛾𝛽𝑀 ̃︀𝐿2 𝜃𝑀 − 𝛾𝛽𝑤 ̃︀𝐿2 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ ) ︃ E [ ︀ 𝑅𝑡 ] ︀ . ( 77 ) Thus by Lemma 15 and the stepsize choice 0 < 𝛾 ≤ ( ︃ 𝐿 + ̃︀𝐿√︃16𝛽𝑀 𝜃𝑀 + 2𝛽𝑤 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ ) ︃−1 ( 78 ) the last term in ( 77 ) is not positive . By summing up inequalities for 𝑡 = 0 , . . . , 𝑇 − 1 , we get 0 ≤ E [ ︀ Ψ𝑇 ] ︀ ≤ E [ ︀ Ψ0 ] ︀ − 𝛾 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ . Multiplying both sides by 2𝛾𝑇 and rearranging we get 𝑇−1∑︁ 𝑡=0 1 𝑇 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2E [ ︀Ψ0 ] ︀ 𝛾𝑇 . It remains to notice that the left hand side can be interpreted as E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ , where ? ̂ ? 𝑇 is chosen from 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Corollary 14 . Let assumption of Theorem 9 hold , 𝑔0 = ∇𝑓 ( 𝑥0 ) , ̃︀𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = ( ︃ 𝐿 + ̃︀𝐿√︃16𝛽𝑀 𝜃𝑀 + 2𝛽𝑤 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ ) ︃−1 , Then , after 𝑇 iterations/communication rounds of EF21-BC we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = # grad = 𝒪 ( ︃ ̃︀𝐿𝛿0 𝛼𝑤𝛼𝑀𝜀2 ) ︃ ( 79 ) iterations/communications rounds/gradint computations at each node . Proof . Note that by Lemma 17 and 𝛼𝑀 , 𝛼𝑤 ≤ 1 , we have 16𝛽𝑀 𝜃𝑀 + 2𝛽𝑤 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ ≤ 16 4 𝛼2𝑀 + 2 4 𝛼2𝑤 ( ︂ 1 + 8 4 𝛼2𝑀 ) ︂ ≤ 64 𝛼2𝑀 + 8 𝛼2𝑤 33 𝛼2𝑀 ≤ 64 + 8 · 33 𝛼2𝑤𝛼 2 𝑀 . It remains to apply the steps similar to those in the proof of Corollary 2 . G.2 CONVERGENCE UNDER POLYAK-ŁOJASIEWICZ CONDITION Theorem 10 . Let Assumptions 1 and 4 hold , and let the stepsize in Algorithm 3 be set as 0 < 𝛾 ≤ min { ︂ 𝛾0 , 𝜃𝑀 2𝜇 , 𝜃𝑤 2𝜇 } ︂ , ( 80 ) where 𝛾0 def = ( ︂ 𝐿 + ̃︀𝐿√︂ 32𝛽𝑀𝜃𝑀 + 4𝛽𝑤̃︀𝐿2𝜃𝑤 ( ︁1 + 16𝛽𝑀𝜃𝑀 ) ︁ ) ︂−1 , ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃𝑤 def= 1− ( 1−𝛼𝑤 ) ( 1+ 𝑠 ) , 𝛽𝑤 def = ( 1 − 𝛼𝑤 ) ( ︀ 1 + 𝑠−1 ) ︀ , 𝜃𝑀 def = 1 − ( 1 − 𝛼𝑀 ) ( 1 + 𝜌 ) , 𝛽𝑀 def = ( 1 − 𝛼𝑀 ) ( ︀ 1 + 𝜌−1 ) ︀ for any 𝜌 , 𝑠 > 0 . Let Ψ𝑡 def = 𝑓 ( 𝑥𝑡 ) − 𝑓 inf + 𝛾𝜃𝑀 ‖𝑔 𝑡 − ̃︀𝑔𝑡‖2 + 𝛾𝜃𝑤 ( ︁1 + 8𝛽𝑀𝜃𝑀 ) ︁𝑃 𝑡 . Then for any 𝑇 ≥ 0 , we have E [ ︀ Ψ𝑇 ] ︀ ≤ ( 1 − 𝛾𝜇 ) 𝑇E [ ︀ Ψ0 ] ︀ . ( 81 ) Proof . Similarly to the proof of Theorem 9 the inequalities ( 74 ) , ( 75 ) , ( 76 ) hold with 𝛿𝑡 = 𝑓 ( 𝑥𝑡 ) − 𝑓 ( 𝑥⋆ ) . It remains to apply the steps similar to those in the proof of Theorem 6 . Corollary 15 . Let assumption of Theorem 10 hold , 𝑔0 = ∇𝑓 ( 𝑥0 ) , ̃︀𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = min { ︂ 𝛾0 , 𝜃𝑀 2𝜇 , 𝜃𝑤 2𝜇 } ︂ , 𝛾0 = ⎛⎝𝐿 + ̃︀𝐿 √︃ 32𝛽𝑀 𝜃𝑀 + 4𝛽𝑤̃︀𝐿2 𝜃𝑤 ( ︂ 1 + 16𝛽𝑀 𝜃𝑀 ) ︂⎞⎠−1 , Then , after 𝑇 iterations of EF21-PAGE we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 inf ] ︀ ≤ 𝜀 . It requires 𝑇 = # grad = 𝒪 ( ︃ ̃︀𝐿 𝜇𝛼𝑤𝛼𝑀 ln ( ︂ 𝛿0 𝜀 ) ︂ ) ︃ iterations/communications rounds/gradint computations at each node . H HEAVY BALL MOMENTUM Notations for this section : 𝑅𝑡 = ‖𝛾𝑔𝑡‖2 = ( 1 − 𝜂 ) 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 . In this section , we study the momentum version of EF21 . In particular , we focus on Polyak style momentum ( Polyak , 1964 ; Yang et al. , 2016 ) . Let 𝑔𝑡 be a gradient estimator at iteration 𝑡 , then the update rule of heavy ball ( HB ) is given by 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 + 𝜂 ( ︀ 𝑥𝑡 − 𝑥𝑡−1 ) ︀ , where 𝑥−1 = 𝑥0 , 𝜂 ∈ [ 0 , 1 ) is called the momentum parameter , and 𝛾 > 0 is the stepsize . The above update rule can be viewed as a combination of the classical gradient step 𝑦𝑡 = 𝑥𝑡 − 𝛾𝑔𝑡 followed by additional momentum step 𝑥𝑡+1 = 𝑦𝑡 + 𝜂 ( ︀ 𝑥𝑡 − 𝑥𝑡−1 ) ︀ . Here the momentum term is added to accelerate the convergence and make the trajectory look like a smooth descent to the bottom of the ravine , rather than zigzag . Equivalently , the update of HB can be implemented by the following two steps ( Yang et al. , 2016 ) : { ︂ 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑣𝑡 𝑣𝑡+1 = 𝜂𝑣𝑡 + 𝑔𝑡+1 . We are now ready to present the distributed variant of heavy ball method enhanced with a contractive compressor 𝒞 , and EF21 mechanism , which we call EF21-HB ( Algorithm 6 ) . We present the complexity results in Theorem 11 and Corollary 16 . Algorithm 6 EF21-HB 1 : Input : starting point 𝑥0 ∈ R𝑑 ; 𝑔0𝑖 ∈ R𝑑 for 𝑖 = 1 , . . . , 𝑛 ( known by nodes ) ; 𝑣0 = 𝑔0 = 1 𝑛 ∑︀𝑛 𝑖=1 𝑔 0 𝑖 ( known by master ) ; learning rate 𝛾 > 0 ; momentum parameter 0 ≤ 𝜂 < 1 2 : for 𝑡 = 0,1 , 2 , . . . , 𝑇 − 1 do 3 : Master computes 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑣𝑡 and broadcasts 𝑥𝑡+1 to all nodes 4 : for all nodes 𝑖 = 1 , . . . , 𝑛 in parallel do 5 : Compress 𝑐𝑡𝑖 = 𝒞 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ) and send 𝑐𝑡𝑖 to the master 6 : Update local state 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 + 𝑐 𝑡 𝑖 7 : end for 8 : Master computes 𝑔𝑡+1 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 𝑡+1 𝑖 via 𝑔 𝑡+1 = 𝑔𝑡 + 1𝑛 ∑︀𝑛 𝑖=1 𝑐 𝑡 𝑖 , and 𝑣 𝑡+1 = 𝜂𝑣𝑡 + 𝑔𝑡+1 9 : end for In the analysis of EF21-HB , we assume by default that 𝑣−1 = 0 . Lemma 9 . Let sequences { 𝑥𝑡 } 𝑡≥0 , and { 𝑣𝑡 } 𝑡≥0 be generated by Algorithm 6 and let the sequence { 𝑧𝑡 } 𝑡≥0 be defined as 𝑧𝑡+1 def = 𝑥𝑡+1 − 𝛾𝜂1−𝜂𝑣 𝑡 with 0 ≤ 𝜂 < 1 . Then for all 𝑡 ≥ 0 𝑧𝑡+1 = 𝑧𝑡 − 𝛾 1 − 𝜂 𝑔𝑡 . Proof . 𝑧𝑡+1 ( 𝑖 ) = 𝑥𝑡+1 − 𝛾𝜂 1 − 𝜂 𝑣𝑡 ( 𝑖𝑖 ) = 𝑥𝑡 − 𝛾𝑣𝑡 − 𝛾𝜂 1 − 𝜂 𝑣𝑡 ( 𝑖𝑖𝑖 ) = 𝑧𝑡 + 𝛾𝜂 1 − 𝜂 𝑣𝑡−1 − 𝛾 1 − 𝜂 𝑣𝑡 = 𝑧𝑡 − 𝛾 1 − 𝜂 ( ︀ 𝑣𝑡 − 𝜂𝑣𝑡−1 ) ︀ = 𝑧𝑡 − 𝛾 1 − 𝜂 𝑔𝑡 , where in ( 𝑖 ) and ( 𝑖𝑖𝑖 ) we use the definition of 𝑧𝑡+1 and 𝑧𝑡 , in ( 𝑖𝑖 ) we use the step 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑣𝑡 ( line 3 of Algorithm 6 ) . Finally , the last equality follows by the update 𝑣𝑡+1 = 𝜂𝑣𝑡 + 𝑔𝑡+1 ( line 8 of Algorithm 6 ) . Lemma 10 . Let the sequence { 𝑣𝑡 } 𝑡≥0 be defined as 𝑣𝑡+1 = 𝜂𝑣𝑡 + 𝑔𝑡+1 with 0 ≤ 𝜂 < 1 . Then 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑣𝑡 ⃦⃦2 ≤ 1 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑔𝑡 ⃦⃦2 . Proof . Unrolling the given recurrence and noticing that 𝑣−1 = 0 , we have 𝑣𝑡 = ∑︀𝑡 𝑙=0 𝜂 𝑡−𝑙𝑔𝑙 . Define 𝐻 def = ∑︀𝑡 𝑙=0 𝜂 𝑙 ≤ 11−𝜂 . Then by Jensen ’ s inequality 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑣𝑡 ⃦⃦2 = 𝐻2 𝑇−1∑︁ 𝑡=0 ⃦⃦⃦⃦ ⃦ 𝑡∑︁ 𝑙=0 𝜂𝑡−𝑙 𝐻 𝑔𝑙 ⃦⃦⃦⃦ ⃦ 2 ≤ 𝐻2 𝑇−1∑︁ 𝑡=0 𝑡∑︁ 𝑙=0 𝜂𝑡−𝑙 𝐻 ⃦⃦ 𝑔𝑙 ⃦⃦2 = 𝐻 𝑇−1∑︁ 𝑡=0 𝑡∑︁ 𝑙=0 𝜂𝑡−𝑙 ⃦⃦ 𝑔𝑙 ⃦⃦2 ≤ 1 1 − 𝜂 𝑇−1∑︁ 𝑡=0 𝑡∑︁ 𝑙=0 𝜂𝑡−𝑙 ⃦⃦ 𝑔𝑙 ⃦⃦2 = 1 1 − 𝜂 𝑇−1∑︁ 𝑙=0 ⃦⃦ 𝑔𝑙 ⃦⃦2 𝑇−1∑︁ 𝑡=𝑙 𝜂𝑡−𝑙 ≤ 1 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑔𝑡 ⃦⃦2 . Lemma 11 . Let the sequence { 𝑧𝑡 } 𝑡≥0 be defined as 𝑧𝑡+1 def = 𝑥𝑡+1 − 𝛾𝜂1−𝜂𝑣 𝑡 with 0 ≤ 𝜂 < 1 . Then 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + 2𝛽̃︀𝐿2 ( 1 + 4𝜂2 ) 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ , where 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀ 1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . Summing up the inequality in Lemma 1 ( for EF21 estimator ) for 𝑡 = 0 , . . . , 𝑇 − 1 , we have 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + 𝛽̃︀𝐿2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ . ( 82 ) It remains to bound ∑︀𝑇−1 𝑡=0 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ . Notice that by definition of { 𝑧𝑡 } 𝑡≥0 , we have 𝑥𝑡+1 − 𝑥𝑡 = 𝑧𝑡+1 − 𝑧𝑡 + 𝛾𝜂 1 − 𝜂 ( ︀ 𝑣𝑡 − 𝑣𝑡−1 ) ︀ . Thus 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ ≤ 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ + 2𝛾2𝜂2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑣𝑡 − 𝑣𝑡−1 ⃦⃦2 ] ︁ = 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ + 2𝛾2𝜂2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑔𝑡 − ( 1 − 𝜂 ) 𝑣𝑡−1 ⃦⃦2 ] ︁ ≤ 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ + 4𝛾2𝜂2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑔𝑡 ⃦⃦2 ] ︁ + 4𝛾2𝜂2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 ( 1 − 𝜂 ) 2E [ ︀ ‖𝑣𝑡−1‖2 ] ︀ ( 𝑖 ) ≤ 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ + 4𝛾2𝜂2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑔𝑡 ⃦⃦2 ] ︁ + 4𝛾2𝜂2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑔𝑡 ⃦⃦2 ] ︁ = 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ + 8𝛾2𝜂2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑔𝑡 ⃦⃦2 ] ︁ ( 𝑖𝑖 ) = 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ + 8𝜂2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ = 2 ( 1 + 4𝜂2 ) 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ , where in ( 𝑖 ) we apply Lemma 10 , and in ( 𝑖𝑖 ) Lemma 9 is utilized . It remains to plug in the above inequality into ( 82 ) Lemma 12 . Let the sequence { 𝑧𝑡 } 𝑡≥0 be generated as in Lemma 9 , i.e. , 𝑧𝑡+1 = 𝑧𝑡 − 𝛾 1−𝜂 𝑔 𝑡 , then for all 𝑡 ≥ 0 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ≤ 2𝐺𝑡 + 2 ( 1 − 𝜂 ) 2 𝛾2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 with 𝐺𝑡 = 1𝑛 ∑︀𝑛 𝑖=1 ‖∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑔𝑡𝑖‖ 2 . Proof . Notice that for 𝛾 > 0 we have ∇𝑓 ( 𝑥𝑡 ) = ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 − 1−𝜂𝛾 ( 𝑧 𝑡+1 − 𝑧𝑡 ) . Then ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ≤ 2 ⃦⃦∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡⃦⃦2 + 2 ( 1 − 𝜂 ) 2 𝛾2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ≤ 2 𝑛 𝑛∑︁ 𝑖=1 ⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑔𝑡𝑖 ⃦⃦2 + 2 ( 1 − 𝜂 ) 2 𝛾2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 , where the inequalities hold due to ( 118 ) with 𝑠 = 1 , and ( 119 ) . H.1 CONVERGENCE FOR GENERAL NON-CONVEX FUNCTIONS Theorem 11 . Let Assumption 1 hold , and let the stepsize in Algorithm 6 be set as 0 < 𝛾 < ( ︃ ( 1 + 𝜂 ) 𝐿 2 ( 1 − 𝜂 ) 2 + ̃︀𝐿 1 − 𝜂 √︂ 2𝛽 𝜃 ( 1 + 4𝜂2 ) ) ︃−1 def = 𝛾0 , ( 83 ) where 0 ≤ 𝜂 < 1 , 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀ 1 + 𝑠−1 ) ︀ , and 𝑠 > 0 . Fix 𝑇 ≥ 1 and let ? ̂ ? 𝑇 be chosen from the iterates 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Then 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 3𝛿0 ( 1 − 𝜂 ) 𝑇𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ + E [ ︀𝐺0 ] ︀ 𝜃𝑇 ⎛⎝2 + 1 2𝜆1 3 ( 1 − 𝜂 ) 𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ ⎞⎠ , ( 84 ) where 𝜆1 def = ̃︀𝐿√︁ 2𝛽𝜃 ( 1 + 4𝜂2 ) . If the stepsize is set to 0 < 𝛾 ≤ 𝛾0/2 , then 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 6𝛿0 ( 1 − 𝜂 ) 𝛾𝑇 + E [ ︀ 𝐺0 ] ︀ 𝑇𝜃 ⎛⎝2 + 3 ( 1 − 𝜂 ) 𝛾̃︀𝐿√︁ 2𝛽𝜃 ( 1 + 4𝜂2 ) ⎞⎠ . ( 85 ) Proof . Consider the sequence 𝑧𝑡+1 def= 𝑥𝑡+1 − 𝛾𝜂1−𝜂𝑣 𝑡 with 0 ≤ 𝜂 < 1 . Then Lemma 9 states that 𝑧𝑡+1 = 𝑧𝑡 − 𝛾1−𝜂 𝑔 𝑡 . By 𝐿-smoothness of 𝑓 ( · ) 𝑓 ( 𝑧𝑡+1 ) − 𝑓 ( 𝑧𝑡 ) ≤ ⟨∇𝑓 ( 𝑧𝑡 ) , 𝑧𝑡+1 − 𝑧𝑡⟩ + 𝐿 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 = ⟨∇𝑓 ( 𝑧𝑡 ) − 𝑔𝑡 , 𝑧𝑡+1 − 𝑧𝑡⟩ + ⟨𝑔𝑡 , 𝑧𝑡+1 − 𝑧𝑡⟩ + 𝐿 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ( 𝑖 ) = ⟨∇𝑓 ( 𝑧𝑡 ) − 𝑔𝑡 , 𝑧𝑡+1 − 𝑧𝑡⟩ − 1 − 𝜂 𝛾 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 + 𝐿 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 = ⟨∇𝑓 ( 𝑧𝑡 ) − 𝑔𝑡 , 𝑧𝑡+1 − 𝑧𝑡⟩ − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 ) ︂ ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 = ⟨∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 , 𝑧𝑡+1 − 𝑧𝑡⟩ + ⟨∇𝑓 ( 𝑧𝑡 ) −∇𝑓 ( 𝑥𝑡 ) , 𝑧𝑡+1 − 𝑧𝑡⟩ − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 ) ︂ ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ( 𝑖𝑖 ) ≤ 1 2𝜆1 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 + 𝜆1 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 + 1 2𝜆2 ⃦⃦ ∇𝑓 ( 𝑧𝑡 ) −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 + 𝜆2 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 − ( ︂1 − 𝜂 𝛾 − 𝐿 2 ) ︂ ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 = 1 2𝜆1 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 + 1 2𝜆2 ⃦⃦ ∇𝑓 ( 𝑧𝑡 ) −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 ) ︂ ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ( 𝑖𝑖𝑖 ) ≤ 1 2𝜆1 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 + 𝐿2 2𝜆2 ⃦⃦ 𝑧𝑡 − 𝑥𝑡 ⃦⃦2 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 ) ︂ ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ( 𝑖𝑣 ) ≤ 1 2𝜆1 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 + 𝛾2𝜂2𝐿2 2𝜆2 ( 1 − 𝜂 ) 2 ⃦⃦ 𝑣𝑡−1 ⃦⃦2 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 ) ︂ ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 , where in ( 𝑖 ) Lemma 9 is applied , in ( 𝑖𝑖 ) the inequality ( 115 ) is applied twice for 𝜆1 , 𝜆2 > 0 , ( 𝑖𝑖𝑖 ) holds due to Assumption 1 , and ( 𝑖𝑣 ) holds by definition of 𝑧𝑡 = 𝑥𝑡 − 𝛾𝜂1−𝜂𝑣 𝑡−1 . Summing up the above inequalities for 𝑡 = 0 , . . . , 𝑇 − 1 ( assuming 𝑣−1 = 0 ) , we have 𝑓 ( 𝑧𝑇 ) ≤ 𝑓 ( 𝑧0 ) + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 + 𝛾2𝜂2𝐿2 2𝜆2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑣𝑡 ⃦⃦2 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 ) ︂ 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ( 𝑖 ) ≤ 𝑓 ( 𝑧0 ) + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 + 𝛾2𝜂2𝐿2 2𝜆2 ( 1 − 𝜂 ) 4 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑔𝑡 ⃦⃦2 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 ) ︂ 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ( 𝑖𝑖 ) = 𝑓 ( 𝑧0 ) + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 + 𝛾2𝜂2𝐿2 2𝜆2 ( 1 − 𝜂 ) 4 𝑇−1∑︁ 𝑡=0 ( 1 − 𝜂 ) 2 𝛾2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 ) ︂ 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 = 𝑓 ( 𝑧0 ) + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 − 𝜂 2𝐿2 2𝜆2 ( 1 − 𝜂 ) 2 ) ︂ 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ( 𝑖𝑖𝑖 ) ≤ 𝑓 ( 𝑧0 ) + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 𝐺𝑡 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 − 𝜂 2𝐿2 2𝜆2 ( 1 − 𝜂 ) 2 ) ︂ 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 = 𝑓 ( 𝑧0 ) + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 𝐺𝑡 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜂𝐿 ( 1 − 𝜂 ) ) ︂ 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 = 𝑓 ( 𝑧0 ) + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 𝐺𝑡 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜂𝐿 ( 1 − 𝜂 ) ) ︂ 1 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 𝑅𝑡 , where ( 𝑖 ) holds due to Lemma 10 , in ( 𝑖𝑖 ) Lemma 9 is applied , in ( 𝑖𝑖𝑖 ) we apply ‖∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡‖2 ≤ 𝐺𝑡 . Finally , in the last two steps we choose 𝜆2 = 𝜂𝐿1−𝜂 , and recall the definition 𝑅 𝑡 = ‖𝛾𝑔𝑡‖2 = ( 1 − 𝜂 ) 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 . Subtracting 𝑓 inf from both sides of the above inequality , taking expectation and using the notation 𝛿𝑡 = 𝑓 ( 𝑧𝑡 ) − 𝑓 inf , we get E [ ︀ 𝛿𝑇 ] ︀ ≤ E [ ︀ 𝛿0 ] ︀ + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜂𝐿 ( 1 − 𝜂 ) ) ︂ 1 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ . ( 86 ) By Lemma 11 , we have 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + 2𝛽̃︀𝐿2 ( 1 + 4𝜂2 ) ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ . ( 87 ) Next , we are going to add ( 86 ) with a 12𝜃𝜆1 multiple of ( 87 ) . First , let us `` forget '' , for a moment , about all the terms involving 𝑅𝑡 and denote their sum appearing on the right hand side by ℛ , then E [ ︀ 𝛿𝑇 ] ︀ + 1 2𝜃𝜆1 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ E [ ︀ 𝛿0 ] ︀ + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + ( 1 − 𝜃 ) 1 2𝜆1 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + ℛ = E [ ︀ 𝛿0 ] ︀ + 1 2𝜃𝜆1 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + ℛ. Canceling out the same terms in both sides of the above inequality , we get E [ ︀ 𝛿𝑇 ] ︀ + 1 2𝜃𝜆1 E [ ︀ 𝐺𝑇 ] ︀ ≤ E [ ︀ 𝛿0 ] ︀ + 1 2𝜃𝜆1 E [ ︀ 𝐺0 ] ︀ + ℛ , where ℛ def= − ( ︁ 1−𝜂 𝛾 − 𝐿 2 ( ︁ 1 + 2𝜂1−𝜂 ) ︁ − 𝜆12 − 𝛽̃︀𝐿2 ( 1+4𝜂2 ) 𝜃𝜆1 ) ︁ 1 ( 1−𝜂 ) 2 ∑︀𝑇−1 𝑡=0 E [ 𝑅𝑡 ] . Now choosing 𝜆1 = ̃︀𝐿√︁ 2𝛽𝜃 ( 1 + 4𝜂2 ) and using the definition of 𝛾0 given by ( 83 ) , i.e. , 𝛾0 def= ( ︂ ( 1+𝜂 ) 𝐿 2 ( 1−𝜂 ) 2 + ̃︀𝐿 1−𝜂 √︁ 2𝛽 𝜃 ( 1 + 4𝜂 2 ) ) ︂−1 , we have ( ︃ 1 − 𝜂 𝛾 − 𝐿 2 ( ︂ 1 + 2𝜂 1 − 𝜂 ) ︂ − 𝜆1 2 − 𝛽 ̃︀𝐿2 ( 1 + 4𝜂2 ) 𝜃𝜆1 ) ︃ 1 ( 1 − 𝜂 ) 2 = ( ︃ 1 − 𝜂 𝛾 − 𝐿 2 ( ︂ 1 + 2𝜂 1 − 𝜂 ) ︂ − ̃︀𝐿√︂2𝛽 𝜃 ( 1 + 4𝜂2 ) ) ︃ 1 ( 1 − 𝜂 ) 2 = ( ︃ 1 𝛾 − 𝐿 2 1 + 𝜂 ( 1 − 𝜂 ) 2 − ̃︀𝐿 1 − 𝜂 √︂ 2𝛽 𝜃 ( 1 + 4𝜂2 ) ) ︃ 1 1 − 𝜂 = ( ︂ 1 𝛾 − 1 𝛾0 ) ︂ 1 1 − 𝜂 . Then 0 ≤ E [ ︀ Φ𝑇 ] ︀ def = E [ ︂ 𝛿𝑇 + 1 2𝜃𝜆1 𝐺𝑇 ] ︂ ≤ E [ ︂ 𝛿0 + 1 2𝜃𝜆1 𝐺0 ] ︂ − ( ︂ 1 𝛾 − 1 𝛾0 ) ︂ 1 1 − 𝜂 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ = E [ ︀ Φ0 ] ︀ − ( ︂ 1 𝛾 − 1 𝛾0 ) ︂ 1 1 − 𝜂 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ . After rearranging , we get 1 𝛾2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ ≤ E [ ︀ Φ0 ] ︀ ( 1 − 𝜂 ) 𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ . Summing the result of Lemma 12 over 𝑡 = 0 , . . . , 𝑇 − 1 and applying expectation , we get 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + 2 𝛾2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ . Due to Lemma 11 , the conditions of Lemma 18 hold with 𝐶 def= 2𝛽̃︀𝐿2 1+4𝜂2 ( 1−𝜂 ) 2 , 𝑠𝑡 = E [ 𝐺𝑡 ] , 𝑟𝑡 = E [ 𝑅𝑡 ] , thus 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ ≤ E [ ︀ 𝐺0 ] ︀ 𝜃 + 𝐶 𝜃 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ . Combining the above inequalities , we can continue with 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + 2 𝛾2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ ≤ 2E [ ︀ 𝐺0 ] ︀ 𝜃 + ( ︂ 2 + 𝛾2𝐶 𝜃 ) ︂ 1 𝛾2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ ≤ 2E [ ︀ 𝐺0 ] ︀ 𝜃 + ( ︂ 2 + 𝛾2𝐶 𝜃 ) ︂ E [ ︀ Φ0 ] ︀ ( 1 − 𝜂 ) 𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ . Note that for 𝛾 < 𝛾0 = ( ︁ ( 1+𝜂 ) 𝐿 2 ( 1−𝜂 ) 2 + √︁ 𝐶 𝜃 ) ︁−1 , we have 𝛾2𝐶 𝜃 < 𝐶 𝜃 ( ︁ ( 1+𝜂 ) 𝐿 2 ( 1−𝜂 ) 2 + √︁ 𝐶 𝜃 ) ︁2 ≤ 1 . ( 88 ) Thus 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2E [ ︀𝐺0 ] ︀ 𝜃 + 3E [ ︀ Φ0 ] ︀ ( 1 − 𝜂 ) 𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ = 3𝛿0 ( 1 − 𝜂 ) 𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ + E [ ︀𝐺0 ] ︀ 𝜃 ⎛⎝2 + 1 2𝜆1 3 ( 1 − 𝜂 ) 𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ ⎞⎠ , where 𝜆1 = ̃︀𝐿√︁ 2𝛽𝜃 ( 1 + 4𝜂2 ) . Corollary 16 . Let assumptions of Theorem 11 hold , 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = ( ︃ ( 1 + 𝜂 ) 𝐿 2 ( 1 − 𝜂 ) 2 + ̃︀𝐿 1 − 𝜂 √︂ 2𝛽 𝜃 ( 1 + 4𝜂2 ) ) ︃−1 . Then , after 𝑇 iterations/communication rounds of EF21-HB we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = # grad = 𝒪 ( ︃ ̃︀𝐿𝛿0 𝜀2 ( ︂ 1 𝛼 + 1 1 − 𝜂 ) ︂ ) ︃ ( 89 ) iterations/communications rounds/gradint computations at each node . Proof . Notice that by using 𝐿 ≤ ̃︀𝐿 , 𝜂 < 1 and Lemma 17 , we have ( 1 + 𝜂 ) 𝐿 2 ( 1 − 𝜂 ) 2 + ̃︀𝐿 1 − 𝜂 √︂ 2𝛽 𝜃 ( 1 + 4𝜂2 ) ≤ ̃︀𝐿 ( 1 − 𝜂 ) 2 + ̃︀𝐿 1 − 𝜂 √︂ 10𝛽 𝜃 ≤ ̃︀𝐿 1 − 𝜂 ( ︃ 1 1 − 𝜂 + 2 √ 10 𝛼 ) ︃ . Using the above inequality , ( 85 ) , and ( 83 ) , we get # grad = 𝑇≤6𝛿 0 ( 1 − 𝜂 ) 𝛾𝜀2 ≤6𝛿 0 ( 1 − 𝜂 ) 𝜀2 ̃︀𝐿 1 − 𝜂 ( ︃ 1 1 − 𝜂 + 2 √ 10 𝛼 ) ︃ ≤ 6 ̃︀𝐿𝛿0 𝜀2 ( ︃ 1 1 − 𝜂 + 2 √ 10 𝛼 ) ︃ . I COMPOSITE CASE Now we focus on solving a composite optimization problem min 𝑥∈R𝑑 Φ ( 𝑥 ) def = 1 𝑛 𝑛∑︁ 𝑖=1 𝑓𝑖 ( 𝑥 ) + 𝑟 ( 𝑥 ) , ( 90 ) where each 𝑓𝑖 ( · ) is 𝐿𝑖-smooth ( possibly non-convex ) , 𝑟 ( · ) is convex , and Φinf = inf𝑥∈R𝑑 Φ ( 𝑥 ) > −∞ . This is a standard and important generalization of setting ( 1 ) . Namely , it includes three special cases . • Smooth unconstrained optimization . Set 𝑟 ≡ 0 , then we recover the initially stated problem formulation ( 1 ) . • Smooth optimization over convex set . Let 𝑟 = 𝛿𝑄 ( indicator function of the set 𝑄 ) , where 𝑄 is a nonempty closed convex set . Then ( 90 ) reduces to the problem of minimizing finite a sum of smooth ( possibly non-convex ) functions over a nonempty closed convex set min 𝑥∈𝑄 { ︃ 1 𝑛 𝑛∑︁ 𝑖=1 𝑓𝑖 ( 𝑥 ) } ︃ . • 𝑙1-regularized optimization . Choose 𝑟 ( 𝑥 ) = 𝜆‖𝑥‖1 with 𝜆 > 0 , then ( 90 ) amounts to the 𝑙1-regularized ( also known as LASSO ) problem min 𝑥∈R𝑑 { ︃ 1 𝑛 𝑛∑︁ 𝑖=1 𝑓𝑖 ( 𝑥 ) + 𝜆‖𝑥‖1 } ︃ . For any 𝛾 > 0 , 𝑥 ∈ R𝑑 , define a proximal mapping of function 𝑟 ( · ) ( prox-operator ) as prox𝛾𝑟 ( 𝑥 ) def = arg min 𝑦∈R𝑑 { ︂ 𝑟 ( 𝑦 ) + 1 2𝛾 ‖𝑦 − 𝑥‖2 } ︂ . ( 91 ) Throughout this section , we assume that the master node can efficiently compute prox-operator at every iteration . This is a reasonable assumption , and in many cases ( choices of 𝑟 ( · ) ) appearing in applications , there exists an analytical solution of ( 91 ) , or its computation is cheap compared to the aggregation step . To evaluate convergence in composite case , we define the generalized gradient mapping at a point 𝑥 ∈ R𝑑 with a parameter 𝛾 𝒢𝛾 ( 𝑥 ) def = 1 𝛾 ( ︀ 𝑥− prox𝛾𝑟 ( 𝑥− 𝛾∇𝑓 ( 𝑥 ) ) ) ︀ . ( 92 ) One can verify that the above quantity is a well-defined evaluation metric ( Beck , 2017 ) . Namely , for any 𝑥 * ∈ R𝑑 , it holds that 𝒢𝛾 ( 𝑥 ) = 0 if and only if 𝑥 * is a stationary point of ( 90 ) , and in a special case when 𝑟 ≡ 0 , we have 𝒢𝛾 ( 𝑥 ) = ∇𝑓 ( 𝑥 ) . Notations for this section : in this section we re-define 𝛿𝑡 def= Φ ( 𝑥𝑡 ) − Φinf Lemma 13 ( Gradient mapping bound ) . Let 𝑥𝑡+1 def= prox𝛾𝑟 ( 𝑥𝑡 − 𝛾𝑣𝑡 ) , then E [ ︁⃦⃦ 𝒢𝛾 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ ≤ 2 𝛾2 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 2E [ ︁⃦⃦ 𝑣𝑡 −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ . ( 93 ) Proof . E [ ︁⃦⃦ 𝒢𝛾 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ = 1 𝛾2 E [ ︁⃦⃦ 𝑥𝑡 − prox𝛾𝑟 ( 𝑥𝑡 − 𝛾∇𝑓 ( 𝑥𝑡 ) ) ⃦⃦2 ] ︁ ≤ 2 𝛾2 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 2 𝛾2 E [ ︁⃦⃦ 𝑥𝑡+1 − prox𝛾𝑟 ( 𝑥𝑡 − 𝛾∇𝑓 ( 𝑥𝑡 ) ) ⃦⃦2 ] ︁ = 2 𝛾2 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 2 𝛾2 E [ ︁⃦⃦ prox𝛾𝑟 ( 𝑥 𝑡 − 𝛾𝑣𝑡 ) − prox𝛾𝑟 ( 𝑥𝑡 − 𝛾∇𝑓 ( 𝑥𝑡 ) ) ⃦⃦2 ] ︁ ≤ 2 𝛾2 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 2 𝛾2 E [ ︁⃦⃦ ( 𝑥𝑡 − 𝛾𝑣𝑡 ) − ( 𝑥𝑡 − 𝛾∇𝑓 ( 𝑥𝑡 ) ) ⃦⃦2 ] ︁ = 2 𝛾2 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 2E [ ︁⃦⃦ 𝑣𝑡 −∇𝑓 ( 𝑥𝑡 ) ) ⃦⃦2 ] ︁ , ( 94 ) where in the last inequality we apply non-expansiveness of prox-operator . Lemma 14 . Let 𝑥𝑡+1 def= prox𝛾𝑟 ( 𝑥𝑡 − 𝛾𝑣𝑡 ) , then for any 𝜆 > 0 , Φ ( ︀ 𝑥𝑡+1 ) ︀ ≤ Φ ( ︀ 𝑥𝑡 ) ︀ + 1 2𝜆 ⃦⃦ 𝑣𝑡 −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 ) ︂ ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . ( 95 ) Proof . Define 𝑟 ( 𝑥 ) def= 𝑟 ( 𝑥 ) + 12𝛾 ‖𝑥− 𝑥 𝑡 + 𝛾𝑣𝑡‖2 , and note that 𝑥𝑡+1 = arg min𝑥∈R𝑑 { 𝑟 ( 𝑥 ) } . Since 𝑟 ( · ) is 1/𝛾 - strongly convex , we have 𝑟 ( 𝑥𝑡 ) ≥ 𝑟 ( 𝑥𝑡+1 ) + 1 2𝛾 ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 , 𝑟 ( 𝑥𝑡 ) + 1 2𝛾 ⃦⃦ 𝛾𝑣𝑡 ⃦⃦2 ≥ 𝑟 ( 𝑥𝑡+1 ) + 1 2𝛾 ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 + 𝛾𝑣𝑡 ⃦⃦2 + 1 2𝛾 ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . Thus 𝑟 ( 𝑥𝑡+1 ) − 𝑟 ( 𝑥𝑡 ) ≤ − 1 𝛾 ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 − ⟨𝑣𝑡 , 𝑥𝑡+1 − 𝑥𝑡⟩ . ( 96 ) By 𝐿 smoothness of 𝑓 ( · ) , 𝑓 ( ︀ 𝑥𝑡+1 ) ︀ − 𝑓 ( ︀ 𝑥𝑡 ) ︀ ≤ ⟨︀ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀ , 𝑥𝑡+1 − 𝑥𝑡 ⟩︀ + 𝐿 2 ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . ( 97 ) Summing up ( 97 ) with ( 96 ) we obtain Φ ( ︀ 𝑥𝑡+1 ) ︀ − Φ ( ︀ 𝑥𝑡 ) ︀ ≤ ⟨∇𝑓 ( 𝑥𝑡 ) − 𝑣𝑡 , 𝑥𝑡+1 − 𝑥𝑡⟩ − ( ︂ 1 𝛾 − 𝐿 2 ) ︂ ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ≤ 1 2𝜆 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑣𝑡 ⃦⃦2 − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 ) ︂ ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . We are now ready to present EF21-Prox and provide its convergence guarantees in general non-convex case . I.1 CONVERGENCE FOR GENERAL NON-CONVEX FUNCTIONS Algorithm 7 EF21-Prox 1 : Input : starting point 𝑥0 ∈ R𝑑 ; 𝑔0𝑖 ∈ R𝑑 for 𝑖 = 1 , . . . , 𝑛 ( known by nodes ) ; 𝑔0 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 0 𝑖 ( known by master ) ; learning rate 𝛾 > 0 2 : for 𝑡 = 0,1 , 2 , . . . , 𝑇 − 1 do 3 : Master computes 𝑥𝑡+1 = prox𝛾𝑟 ( 𝑥 𝑡 − 𝛾𝑔𝑡 ) 4 : for all nodes 𝑖 = 1 , . . . , 𝑛 in parallel do 5 : Compress 𝑐𝑡𝑖 = 𝒞 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ) and send 𝑐𝑡𝑖 to the master 6 : Update local state 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 + 𝑐 𝑡 𝑖 7 : end for 8 : Master computes 𝑔𝑡+1 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 𝑡+1 𝑖 via 𝑔 𝑡+1 = 𝑔𝑡 + 1𝑛 ∑︀𝑛 𝑖=1 𝑐 𝑡 𝑖 9 : end for 10 : Output : ? ̂ ? 𝑇 chosen uniformly from { 𝑥𝑡 } 𝑡∈ [ 𝑇 ] Theorem 12 . Let Assumption 1 hold , 𝑟 ( · ) be convex and Φinf = inf𝑥∈R𝑑 Φ ( 𝑥 ) > −∞ . Set the stepsize in Algorithm 7 as 0 < 𝛾 < ( ︃ 𝐿 2 + ̃︀𝐿√︂𝛽 𝜃 ) ︃−1 def = 𝛾0 , ( 98 ) where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Fix 𝑇 ≥ 1 and let ? ̂ ? 𝑇 be chosen from the iterates 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Then E [ ︁⃦⃦ 𝒢𝛾 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 4 ( ︀Φ0 − Φinf ) ︀ 𝑇𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ + 2E [ ︀𝐺0 ] ︀ 𝜃𝑇 ⎛⎝1 + 1 𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ 1̃︀𝐿 √︃ 𝜃 𝛽 ⎞⎠ . ( 99 ) If the stepsize is set to 0 < 𝛾 ≤ 𝛾0/2 , then E [ ︁⃦⃦ 𝒢𝛾 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 8 ( ︀Φ0 − Φinf ) ︀ 𝛾𝑇 + 2E [ ︀ 𝐺0 ] ︀ 𝜃𝑇 ( ︃ 1 + 2 𝛾̃︀𝐿 √︃ 𝜃 𝛽 ) ︃ . ( 100 ) Proof . First , let us apply Lemma 14 with 𝑣𝑡 = 𝑔𝑡 , 𝜆 > 0 Φ ( ︀ 𝑥𝑡+1 ) ︀ ≤ Φ ( ︀ 𝑥𝑡 ) ︀ + 1 2𝜆 ⃦⃦ 𝑔𝑡 −∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 ) ︂ ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . ( 101 ) Subtract Φinf from both sides , take expectation , and define 𝛿𝑡 = Φ ( 𝑥𝑡 ) − Φinf , 𝐺𝑡 = 1 𝑛 ∑︀𝑛 𝑖=1 ‖𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ‖ 2 , 𝑅𝑡 = ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 , then E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 1 2𝜆 E [ ︀ 𝐺𝑡 ] ︀ . ( 102 ) Note that the proof of Lemma 1 does not rely on the update rule for 𝑥𝑡+1 , but only on the way the estimator 𝑔𝑡+1𝑖 is constructed . Therefore , ( 14 ) also holds for the composite case E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ . ( 103 ) Adding ( 102 ) with a 12𝜃𝜆 multiple of ( 103 ) , we obtain E [ ︀ 𝛿𝑡+1 ] ︀ + 1 2𝜃𝜆 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 1 2𝜆 E [ ︀ 𝐺𝑡 ] ︀ + 1 − 𝜃 2𝜃𝜆 E [ ︀ 𝐺𝑡 ] ︀ − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 1 2𝜃𝜆 𝛽̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ = E [ ︀ 𝛿𝑡 ] ︀ + 1 2𝜃𝜆 E [ ︀ 𝐺𝑡 ] ︀ − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 − 𝛽 2𝜃𝜆 ̃︀𝐿2 ) ︂E [ ︀𝑅𝑡 ] ︀ . By summing up inequalities for 𝑡 = 0 , . . . , 𝑇 − 1 , we arrive at 0 ≤ E [ ︀ 𝛿𝑇 ] ︀ + 1 2𝜃𝜆 E [ ︀ 𝐺𝑇 ] ︀ ≤ 𝛿0 + 1 2𝜃𝜆 E [ ︀ 𝐺0 ] ︀ − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 − 𝛽 2𝜃𝜆 ̃︀𝐿2 ) ︂ 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ . Thus 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ ≤ ( ︂ 𝛿0 + 1 2𝜃𝜆 E [ ︀ 𝐺0 ] ︀ ) ︂ ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 − 𝛽 2𝜃𝜆 ̃︀𝐿2 ) ︂−1 = ( ︃ 𝛿0 + 1 2𝜃 √︃ 𝜃 𝛽̃︀𝐿2E [ ︀𝐺0 ] ︀ ) ︃ ( ︃ 1 𝛾 − 𝐿 2 − √︂ 𝛽 𝜃 ̃︀𝐿2 ) ︃−1 = 𝛾2𝐹 0𝐵 . ( 104 ) where in the first equality we choose 𝜆 = √︁ 𝛽 𝜃 ̃︀𝐿2 , and in the second we define 𝐹 0 def= 𝛿0 + 1 2𝜃 √︁ 𝜃 𝛽̃︀𝐿2E [ ︀ 𝐺0 ] ︀ , 𝐵 def= ( ︂ 𝛾 − 𝐿𝛾 2 2 − √︁ 𝛽 𝜃 ̃︀𝐿2𝛾2 ) ︂−1 = ( ︁𝛾 − 𝛾2𝛾0 ) ︁−1 . By Lemma 13 with 𝑣𝑡 = 𝑔𝑡 we have E [ ︁⃦⃦ 𝒢𝛾 ( ︀ ? ̂ ? 𝑇 ) ︀⃦⃦2 ] ︁ = 1 𝑇 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝒢𝛾 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ ≤ 2 𝛾2𝑇 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ + 2 𝑇 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ ( 𝑖 ) ≤ 2 𝛾2𝑇 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ + 2 𝑇 E [ ︀ 𝐺0 ] ︀ 𝜃 + 2 𝑇 𝛽̃︀𝐿2 𝜃 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ ( 𝑖𝑖 ) ≤ 2𝐹 0𝐵 𝑇 + 2 𝑇 E [ ︀ 𝐺0 ] ︀ 𝜃 + 2 𝑇 𝛽̃︀𝐿2 𝜃 𝛾2𝐹 0𝐵 = 2𝐹 0𝐵 𝑇 ( ︃ 1 + 𝛾2𝛽̃︀𝐿2 𝜃 ) ︃ + 2 𝑇 E [ ︀ 𝐺0 ] ︀ 𝜃 = 2𝐹 0 𝑇𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ ( ︃1 + 𝛾2𝛽̃︀𝐿2 𝜃 ) ︃ + 2 𝑇 E [ ︀ 𝐺0 ] ︀ 𝜃 , where in ( 𝑖 ) we apply Lemma 18 with 𝐶 def= 𝛽̃︀𝐿2 , 𝑠𝑡 def= E [ 𝐺𝑡 ] , 𝑟𝑡 def= E [ 𝑅𝑡 ] . ( 𝑖𝑖 ) is due to ( 104 ) . Note that for 𝛾 < ( ︂ 𝐿 2 + √︁ 𝛽 𝜃 ̃︀𝐿 ) ︂−1 , we have 𝛾2𝛽̃︀𝐿2 𝜃 < 𝛽 𝜃 ̃︀𝐿2 ( ︂ 𝐿 2 + √︁ 𝛽 𝜃 ̃︀𝐿 ) ︂2 ≤ 1 . ( 105 ) Thus E [ ︁⃦⃦ 𝒢𝛾 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 4𝐹 0 𝑇𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ + 2 𝑇 E [ ︀ 𝐺0 ] ︀ 𝜃 = 4𝛿0 𝑇𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ + 2E [ ︀𝐺0 ] ︀ 𝜃𝑇 + 2E [ ︀ 𝐺0 ] ︀ 𝑇𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ 1 𝜃 √︃ 𝜃 𝛽̃︀𝐿2 . ( 106 ) Set 𝛾 ≤ 𝛾0/2 , then the bound simplifies to E [ ︁⃦⃦ 𝒢𝛾 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 8𝛿0 𝛾𝑇 + 2E [ ︀ 𝐺0 ] ︀ 𝜃𝑇 ( ︃ 1 + 2 𝛾 √︃ 𝜃 𝛽̃︀𝐿2 ) ︃ . Corollary 17 . Let assumptions of Theorem 12 hold , 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = ( ︁ 𝐿 + 2̃︀𝐿√︀𝛽/𝜃 ) ︁−1 . Then , after 𝑇 iterations/communication rounds of EF21-Prox we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires # grad = 𝒪 ( ︃ ̃︀𝐿𝛿0 𝛼𝜀2 ) ︃ , where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝛿0 = Φ ( 𝑥0 ) − Φ𝑖𝑛𝑓 . Proof . The proof is the same as for Corollary 2 . I.2 CONVERGENCE UNDER POLYAK-ŁOJASIEWICZ CONDITION In order to extend the analysis of Polyak-Łojasiewicz functions to composite optimization , we use the following Assumption 5 from ( Li & Li , 2018 ; Wang et al. , 2018 ) . Assumption 5 ( Polyak-Łojasiewicz ) . There exists 𝜇 > 0 such that ‖𝒢𝛾 ( 𝑥 ) ‖2 ≥ 2𝜇 ( Φ ( 𝑥 ) − Φ ( 𝑥⋆ ) ) for all 𝑥 ∈ R𝑑 , where 𝑥⋆ = arg min𝑥 Φ ( 𝑥 ) . Theorem 13 . Let Assumptions 1 and 5 hold , 𝑟 ( · ) be convex and Φinf = inf𝑥∈R𝑑 Φ ( 𝑥 ) > −∞ . Set the stepsize in Algorithm 7 as 𝛾 ≤ min ⎧⎨⎩ ( ︃ 𝐿 + 2̃︀𝐿√︂2𝛽 𝜃 ) ︃−1 , 𝜃 𝜇 + 𝜃̃︀𝐿√︁ 2𝛽𝜃 ⎫⎬⎭ . ( 107 ) Let Ψ𝑡 def = Φ ( 𝑥𝑡 ) − Φ ( 𝑥⋆ ) + 1𝜃𝜆𝐺 𝑡 with 𝜆 = √︁ 2𝛽 𝜃 ̃︀𝐿 . Then for any 𝑇 ≥ 0 , we have E [ ︀ Ψ𝑇 ] ︀ ≤ ( ︁ 1 − 𝛾𝜇 2 ) ︁𝑇 E [ ︀ Ψ0 ] ︀ , ( 108 ) where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . We start as in the previous proof , but subtract Φ ( 𝑥⋆ ) from both sides of ( 101 ) and define 𝛿𝑡 def = Φ ( 𝑥𝑡 ) − Φ ( 𝑥⋆ ) . Recall that 𝐺𝑡 = 1𝑛 ∑︀𝑛 𝑖=1 ‖𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ‖ 2 , 𝑅𝑡 = ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . Then E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 1 2𝜆 E [ ︀ 𝐺𝑡 ] ︀ . ( 109 ) By Lemma 1 , we have E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ . ( 110 ) Then by adding ( 109 ) with a 1𝜃𝜆 multiple of ( 110 ) we obtain E [ ︀ 𝛿𝑡+1 ] ︀ + 1 𝜃𝜆 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 1 𝜃𝜆 ( ︂ 1 − 𝜃 + 𝜃 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 1 𝜃𝜆 𝛽̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ = E [ ︀ 𝛿𝑡 ] ︀ + 1 𝜃𝜆 ( ︂ 1 − 𝜃 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 − 𝛽 𝜃𝜆 ̃︀𝐿2 ) ︂E [ ︀𝑅𝑡 ] ︀ ( 𝑖 ) = E [ ︀ 𝛿𝑡 ] ︀ + 1 𝜃𝜆 ( ︂ 1 − 𝜃 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ − ( ︃ 1 𝛾 − 𝐿 2 − √︂ 2𝛽 𝜃 ̃︀𝐿 ) ︃E [ ︀𝑅𝑡 ] ︀ ( 𝑖𝑖 ) ≤ E [ ︀ 𝛿𝑡 ] ︀ + 1 𝜃𝜆 ( ︂ 1 − 𝜃 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ − 1 2𝛾 E [ ︀ 𝑅𝑡 ] ︀ , ( 111 ) where in ( 𝑖 ) we choose 𝜆 = √︁ 2𝛽 𝜃 ̃︀𝐿2 , ( 𝑖𝑖 ) is due to the stepsize choice ( the first term in minimum ) . Next , combining Assumption 5 with Lemma 13 , we have 2𝜇𝛿𝑡 = 2𝜇 ( ︀ Φ ( 𝑥𝑡 ) − Φ ( 𝑥⋆ ) ) ︀ ≤ ⃦⃦ 𝒢𝛾 ( 𝑥𝑡 ) ⃦⃦2 ≤ 2 𝛾2 𝑅𝑡 + 2𝐺𝑡 , and −𝑅𝑡 ≤ −𝜇𝛾2𝛿𝑡 + 𝛾2𝐺𝑡 . ( 112 ) Thus ( 111 ) can be further bounded as E [ Ψ ] = E [ ︂ 𝛿𝑡+1 + 1 𝜃𝜆 𝐺𝑡+1 ] ︂ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 1 𝜃𝜆 ( ︂ 1 − 𝜃 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ − 1 2𝛾 E [ ︀ 𝑅𝑡 ] ︀ ( 112 ) ≤ E [ ︀ 𝛿𝑡 ] ︀ + 1 𝜃𝜆 ( ︂ 1 − 𝜃 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ − 𝛾𝜇 2 E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ = ( ︁ 1 − 𝛾𝜇 2 ) ︁ E [ ︀ 𝛿𝑡 ] ︀ + 1 𝜃𝜆 ( ︂ 1 − 𝜃 2 + 𝛾𝜃𝜆 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ ≤ ( ︁ 1 − 𝛾𝜇 2 ) ︁ E [ ︂ 𝛿𝑡 + 1 𝜃𝜆 𝐺𝑡 ] ︂ , ( 113 ) where the last inequality follows by our assumption on the stepsize ( the second term in minimum ) . It remains to unroll the recurrence . Corollary 18 . Let assumptions of Theorem 13 hold , 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = min ⎧⎨⎩ ( ︃ 𝐿 + 2̃︀𝐿√︂2𝛽 𝜃 ) ︃−1 , 𝜃 𝜇 + 𝜃̃︀𝐿√︁ 2𝛽𝜃 ⎫⎬⎭ . Then , after 𝑇 iterations/communication rounds of EF21-Prox we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 ( 𝑥⋆ ) ] ︀ ≤ 𝜀 . It requires 𝑇 = # grad = 𝒪 ( ︃ 𝜇 + ̃︀𝐿 𝛼𝜇 log ( ︂ 𝛿0 𝜀 ) ︂ ) ︃ ( 114 ) iterations/communications rounds/gradint computations at each node , where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝛿0 = Φ ( 𝑥0 ) − Φ𝑖𝑛𝑓 . Proof . Note that by Lemma 17 we have 𝜇 𝜃 + ̃︀𝐿√︂2𝛽 𝜃 ≤ 4𝜇 𝛼 + ̃︀𝐿2√2 𝛼 ≤ 4 ( ︁ 𝜇 + ̃︀𝐿 ) ︁ 𝛼 . The remainder of the proof is the same as for Corollary 3 . J USEFUL AUXILIARY RESULTS J.1 BASIC FACTS For all 𝑎 , 𝑏 , 𝑥1 , . . . , 𝑥𝑛 ∈ R𝑑 , 𝑠 > 0 and 𝑝 ∈ ( 0,1 ] the following inequalities hold ⟨𝑎 , 𝑏⟩ ≤ ‖𝑎‖ 2 2𝑠 + 𝑠‖𝑏‖2 2 , ( 115 ) ⟨𝑎− 𝑏 , 𝑎 + 𝑏⟩ = ‖𝑎‖2 − ‖𝑏‖2 , ( 116 ) 1 2 ‖𝑎‖2 − ‖𝑏‖2 ≤ ‖𝑎 + 𝑏‖2 , ( 117 ) ‖𝑎 + 𝑏‖2 ≤ ( 1 + 𝑠 ) ‖𝑎‖2 + ( 1 + 1/𝑠 ) ‖𝑏‖2 , ( 118 ) ⃦⃦⃦⃦ ⃦ 1𝑛 𝑛∑︁ 𝑖=1 𝑥𝑖 ⃦⃦⃦⃦ ⃦ 2 ≤ 1 𝑛 𝑛∑︁ 𝑖=1 ‖𝑥𝑖‖2 , ( 119 ) ( ︁ 1 − 𝑝 2 ) ︁−1 ≤ 1 + 𝑝 , ( 120 ) ( ︁ 1 + 𝑝 2 ) ︁ ( 1 − 𝑝 ) ≤ 1 − 𝑝 2 , ( 121 ) log ( 1 − 𝑝 ) ≤ −𝑝 . ( 122 ) Bias-variance decomposition For a random vector 𝜉 ∈ R𝑑 and any deterministic vector 𝑥 ∈ R𝑑 , the variance of 𝜉 can be decomposed as E [ ︀ ‖𝜉 − E [ 𝜉 ] ‖2 ] ︀ = E [ ︀ ‖𝜉‖2 ] ︀ − ‖E [ 𝜉 ] ‖2 ( 123 ) Tower property of mathematical expectation . For random variables 𝜉 , 𝜂 ∈ R𝑑 we have E [ 𝜉 ] = E [ E [ 𝜉 | 𝜂 ] ] ( 124 ) under assumption that all expectations in the expression above are well-defined . J.2 USEFUL LEMMAS Lemma 15 ( Lemma 5 of ( Richtárik et al. , 2021 ) ) . If 0 ≤ 𝛾 ≤ 1√ 𝑎+𝑏 , then 𝑎𝛾2 + 𝑏𝛾 ≤ 1 . Moreover , the bound is tight up to the factor of 2 since 1√ 𝑎+𝑏 ≤ min { ︁ 1√ 𝑎 , 1𝑏 } ︁ ≤ 2√ 𝑎+𝑏 . Lemma 16 ( Lemma 2 of ( Li et al. , 2021 ) ) . Suppose that function 𝑓 is 𝐿-smooth and let 𝑥𝑡+1 def= 𝑥𝑡 − 𝛾𝑔𝑡 , where 𝑔𝑡 ∈ R𝑑 is any vector , and 𝛾 > 0 any scalar . Then we have 𝑓 ( 𝑥𝑡+1 ) ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 + 𝛾 2 ⃦⃦ 𝑔𝑡 −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 . ( 125 ) Lemma 17 ( Lemma 3 of ( Richtárik et al. , 2021 ) ) . Let 0 < 𝛼 < 1 and for 𝑠 > 0 let 𝜃 ( 𝑠 ) and 𝛽 ( 𝑠 ) be defined as 𝜃 ( 𝑠 ) def = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 ( 𝑠 ) def= ( 1 − 𝛼 ) ( 1 + 𝑠−1 ) . Then the solution of the optimization problem min 𝑠 { ︂ 𝛽 ( 𝑠 ) 𝜃 ( 𝑠 ) : 0 < 𝑠 < 𝛼 1 − 𝛼 } ︂ ( 126 ) is given by 𝑠 * = 1√ 1−𝛼 − 1 . Furthermore , 𝜃 ( 𝑠 * ) = 1 − √ 1 − 𝛼 , 𝛽 ( 𝑠 * ) = 1−𝛼 1− √ 1−𝛼 and√︃ 𝛽 ( 𝑠 * ) 𝜃 ( 𝑠 * ) = 1√ 1 − 𝛼 − 1 = 1 𝛼 + √ 1 − 𝛼 𝛼 − 1 ≤ 2 𝛼 − 1 . ( 127 ) In the trivial case 𝛼 = 1 , we have 𝛽 ( 𝑠 ) 𝜃 ( 𝑠 ) = 0 for any 𝑠 > 0 , and ( 127 ) is satisfied . Lemma 18 . Let ( arbitrary scalar ) non-negative sequences { 𝑠𝑡 } 𝑡≥0 , and { 𝑟𝑡 } 𝑡≥0 satisfy 𝑇−1∑︁ 𝑡=0 𝑠𝑡+1 ≤ ( 1 − 𝜃 ) 𝑇−1∑︁ 𝑡=0 𝑠𝑡 + 𝐶 𝑇−1∑︁ 𝑡=0 𝑟𝑡 for some parameters 𝜃 ∈ ( 0 , 1 ] , 𝐶 > 0 . Then for all 𝑇 ≥ 0 𝑇−1∑︁ 𝑡=0 𝑠𝑡 ≤ 𝑠 0 𝜃 + 𝐶 𝜃 𝑇−1∑︁ 𝑡=0 𝑟𝑡 . ( 128 ) Proof . We have 𝑇−1∑︁ 𝑡=0 𝑠𝑡 − 𝑠0 ≤ 𝑇−1∑︁ 𝑡=0 𝑠𝑡 + 𝑠𝑇 − 𝑠0 = 𝑇−1∑︁ 𝑡=0 𝑠𝑡+1 ≤ ( 1 − 𝜃 ) 𝑇−1∑︁ 𝑡=0 𝑠𝑡 + 𝐶 𝑇−1∑︁ 𝑡=0 𝑟𝑡 = 𝑇−1∑︁ 𝑡=0 𝑠𝑡 − 𝜃 𝑇−1∑︁ 𝑡=0 𝑠𝑡 + 𝐶 𝑇−1∑︁ 𝑡=0 𝑟𝑡 . Dividing both sides by 𝜃 > 0 and rearranging the terms , we get 𝑇−1∑︁ 𝑡=0 𝑠𝑡 ≤ 𝑠 0 𝜃 + 𝐶 𝜃 𝑇−1∑︁ 𝑡=0 𝑟𝑡 .
Error feedback (EF) is a technique for ensuring convergence of biased contractive compressor. However, it achieves suboptimal convergence rate when full gradient is used. Recently, EF21 was introduced to mitigate the theoretical deficiencies of EF. This paper studies several extensions of EF21 including EF21 with stochastic gradient, variance reduction, heavy momentum, partial participation, bidirectional compression, and proximal gradient. The paper establishes the convergence results for the six variants and conducts experiments on several small datasets.
SP:85960c4b263657c555864e5203386bba26f4f77d
EF21 with Bells & Whistles: Practical Algorithmic Extensions of Modern Error Feedback
1 INTRODUCTION In this paper , we consider the nonconvex distributed/federated optimization problem of the form min 𝑥∈R𝑑 { ︂ 𝑓 ( 𝑥 ) def = 1𝑛 𝑛∑︀ 𝑖=1 𝑓𝑖 ( 𝑥 ) } ︂ , ( 1 ) where 𝑛 denotes the number of clients/workers/devices/nodes connected with a server/master and client 𝑖 has an access to the local loss function 𝑓𝑖 only . The local loss of each client is allowed to have the online/expectation form 𝑓𝑖 ( 𝑥 ) = E𝜉𝑖∼𝒟𝑖 [ 𝑓𝜉𝑖 ( 𝑥 ) ] , ( 2 ) or the finite-sum form 𝑓𝑖 ( 𝑥 ) = 1 𝑚 𝑚∑︀ 𝑗=1 𝑓𝑖𝑗 ( 𝑥 ) . ( 3 ) Problems of this structure appear in federated learning ( Konečný et al. , 2016 ; Kairouz , 2019 ) , where training is performed directly on the clients ’ devices . In a quest for state-of-the-art performance , machine learning practitioners develop elaborate model architectures and train their models on enormous data sets . Naturally , for training at this scale to be possible , one needs to rely on distributed computing ( Goyal et al. , 2017 ; You et al. , 2020 ) . Since in recent years remarkable empirical successes were obtained with massively over-parameterized models ( Arora et al. , 2018 ) , which puts an extra strain on the communication links during training , recent research activity and practice focuses on developing distributed optimization methods and systems capitalizing on ( deterministic or randomized ) lossy communication compression techniques to reduce the amount of communication traffic . A compression mechanism is typically formalized as an operator 𝒞 : R𝑑 ↦→ R𝑑 mapping hard-tocommunicate ( e.g. , dense ) input messages into easy-to-communicate ( e.g. , sparse ) output messages . The operator is allowed to be randomized , and typically operates on models Khaled & Richtárik ( 2019 ) or on gradients Alistarh et al . ( 2017 ) ; Beznosikov et al . ( 2020 ) , both of which can be described as vectors in R𝑑 . Besides sparsification ( Alistarh et al. , 2018 ) , typical examples of useful compression mechanisms include quantization ( Alistarh et al. , 2017 ; Horváth et al. , 2019a ) and low-rank approximation ( Vogels et al. , 2019 ; Safaryan et al. , 2021 ) . There are two large classes of compression operators often studied in the literature : i ) unbiased compression operators 𝒞 , meaning that there exists 𝜔 ≥ 0 such that E [ 𝒞 ( 𝑥 ) ] = 𝑥 , E [ ︀ ‖𝒞 ( 𝑥 ) − 𝑥‖2 ] ︀ ≤ 𝜔‖𝑥‖2 , ∀𝑥 ∈ R𝑑 ; ( 4 ) and ii ) biased compression operators 𝒞 , meaning that there exists 0 < 𝛼 ≤ 1 such that E [ ︀ ‖𝒞 ( 𝑥 ) − 𝑥‖2 ] ︀ ≤ ( 1 − 𝛼 ) ‖𝑥‖2 , ∀𝑥 ∈ R𝑑 . ( 5 ) Note that the latter “ biased ” class contains the former one , i.e. , if 𝒞 satisfies ( 4 ) with 𝜔 , then a scaled version ( 1 + 𝜔 ) −1𝒞 satisfies ( 5 ) with 𝛼 = 1/ ( 1+𝜔 ) . While distributed optimization methods with unbiased compressors ( 4 ) are well understood ( Alistarh et al. , 2017 ; Khirirat et al. , 2018 ; Mishchenko et al. , 2019 ; Horváth et al. , 2019b ; Li et al. , 2020 ; Li & Richtárik , 2021a ; Li & Richtárik , 2020 ; Islamov et al. , 2021 ; Gorbunov et al. , 2021 ) , biased compressors ( 5 ) are significantly harder to analyze . One of the main reasons behind this is rooted in the observation that when deployed within distributed gradient descent in a naive way , biased compresors may lead to ( even exponential ) divergence ( Karimireddy et al. , 2019 ; Beznosikov et al. , 2020 ) . Error Feedback ( EF ) ( or Error Compensation ( EC ) ) —a technique originally proposed by Seide et al . ( 2014 ) —emerged as an empirical fix of this problem . However , this technique remained poorly understood until very recently . Although several theoretical results were obtained supporting the EF framework in recent years ( Stich et al. , 2018 ; Alistarh et al. , 2018 ; Beznosikov et al. , 2020 ; Gorbunov et al. , 2020 ; Qian et al. , 2020 ; Tang et al. , 2020 ; Koloskova et al. , 2020 ) , they use strong assumptions ( e.g. , convexity , bounded gradients , bounded dissimilarity ) , and do not get 𝒪 ( 1/𝛼𝑇 ) convergence rates in the smooth nonconvex regime . Very recently , Richtárik et al . ( 2021 ) proposed a new EF mechanism called EF21 , which uses standard smoothness assumptions only , and also enjoys the desirable 𝑂 ( 1/𝛼𝑇 ) convergence rate for the nonconvex case ( in terms of number of communication rounds 𝑇 this matches the best-known rate 𝒪 ( ( 1+𝜔/√𝑛 ) /𝑇 ) obtained by Gorbunov et al . ( 2021 ) using unbiased compressors ) , improving the previous 𝑂 ( 1/ ( 𝛼𝑇 ) 2/3 ) rate of the standard EF mechanism ( Koloskova et al. , 2020 ) . 2 OUR CONTRIBUTIONS While Richtárik et al . ( 2021 ) provide a new theoretical SOTA for error feedback based methods , the authors only study their EF21 mechanism in a pure form , without any additional “ bells and whistles ” which are of importance in practice . In this paper , we aim to push the EF21 framework beyond its pure form by extending it in several directions of high theoretical and practical importance . In particular , we further enhance the EF21 mechanism with the following six useful and practical algorithmic extensions : stochastic approximation , variance reduction , partial participation , bidirectional compression , momentum , and proximal ( regularization ) . We do not stop at merely proposing these algorithmic enhancements : we derive strong convergence results for all of these extensions . Several of these techniques were never analyzed in conjunction with the original EF mechanism before , and in cases where they were , our new results with EF21 are vastly superior . See Table 1 for an overview of our results . In summary , our results constitute the new algorithmic and theoretical state-of-the-art in the area of error feedback . We now briefly comment on each extension proposed in this paper : ◇ Stochastic approximation . The vanilla EF21 method requires all clients to compute the exact/full gradient in each round . While Richtárik et al . ( 2021 ) do consider a stochastic extension of EF21 , they do not formalize their result , and only consider the simplistic scenario of uniformly bounded variance , which does not in general hold for stochasticity coming from subsampling ( Khaled & Richtárik , 2020 ) . However , exact gradients are not available in the stochastic/online setting ( 2 ) , and in the finite-sum setting ( 3 ) it is more efficient in practice to use subsampling and work with stochastic gradients instead . In our paper , we extend EF21 to a more general stochastic approximation framework than the simplistic framework considered in the original paper . Our method is called EF21-SGD ( Algorithm 2 ) ; see Appendix D for more details . ◇ Variance reduction . As mentioned above , EF21 relies on full gradient computations at all clients . This incurs a high or unaffordable computation cost , especially when local clients hold large training sets , i.e. , if 𝑚 is very large in ( 3 ) . In the finite-sum setting ( 3 ) , we enhance EF21 with a variance reduction technique to reduce the computational complexity . In particular , we adopt the simple and efficient variance-reduced method PAGE ( Li et al. , 2021 ; Li , 2021b ) ( which is optimal for solving problems ( 3 ) ) into EF21 , and call the resulting method EF21-PAGE ( Algorithm 3 ) . See Appendix E for more details . ◇ Partial participation . The EF21 method proposed by Richtárik et al . ( 2021 ) requires full participation of clients for solving problem ( 1 ) , i.e. , in each round , the server needs to communicate with all 𝑛 clients . However , full participation is usually impractical or very hard to achieve in massively distributed ( e.g. , federated ) learning problems ( Konečný et al. , 2016 ; Cho et al. , 2020 ; Kairouz , 2019 ; Li & Richtárik , 2021b ; Zhao et al. , 2021 ) . To remedy this situation , we propose a partial participation ( PP ) variant of EF21 , which we call EF21-PP ( Algorithm 4 ) . See Appendix F for more details . ◇ Bidirectional compression . The vanilla EF21 method only considers upstream compression of the messages sent by the clients to the server . However , in some situations , downstream communication is also costly ( Horváth et al. , 2019a ; Tang et al. , 2020 ; Philippenko & Dieuleveut , 2020 ) . In order to cater to these situations , we modify EF21 so that the server can also optionally compresses messages before communication . Our master compression is intelligent in that it employs the Markov compressor proposed in EF21 to be used at the devices . The proposed method , based on bidirectional compression , is EF21-BC ( Algorithm 5 ) . See Appendix G for more details . ◇ Momentum . A very successful and popular technique for enhancing both optimization and generalization is momentum/acceleration ( Polyak , 1964 ; Nesterov , 1983 ; Lan & Zhou , 2015 ; AllenZhu , 2017 ; Lan et al. , 2019 ; Li , 2021a ) . For instance , momentum is a key building block behind the widely-used Adam method ( Kingma & Ba , 2014 ) . In this paper , we add the well-known ( Polyak ) heavy ball momentum ( Polyak , 1964 ; Loizou & Richtárik , 2020 ) to EF21 , and call the resulting method EF21-HB ( Algorithm 6 ) . See Appendix H for more details . ◇ Proximal setting . It is common practice to solve regularized versions of empirical risk minimization problems instead of their vanilla variants ( Shalev-Shwartz & Ben-David , 2014 ) . We thus consider the composite/regularized/proximal problem min 𝑥∈R𝑑 { ︂ Φ ( 𝑥 ) def = 1𝑛 𝑛∑︀ 𝑖=1 𝑓𝑖 ( 𝑥 ) + 𝑟 ( 𝑥 ) } ︂ , ( 6 ) where 𝑟 ( 𝑥 ) : R𝑑 → R ∪ { +∞ } is a regularizer , e.g. , ℓ1 regularizer ‖𝑥‖1 or ℓ2 regularizer ‖𝑥‖22 . To broaden the applicability of EF21 to such problems , we propose a proximal variant of EF21 to solve the more general composite problems ( 6 ) . We call this new method EF21-Prox ( Algorithm 7 ) . See Appendix I for more details . Our theoretical complexity results are summarized in Table 1 . In addition , we also analyze EF21SGD , EF21-PAGE , EF21-PP , EF21-BC under Polyak-Łojasiewicz ( PŁ ) condition ( Polyak , 1963 ; Lojasiewicz , 1963 ) and EF21-Prox under the generalized PŁ-condition ( Li & Li , 2018 ) for composite optimization problems . Due to space limitations , we defer all the details about the analysis under the PŁ-condition to the appendix and provide only simplified rates in Table 1 . We comment on some preliminary experimental results in Section 5 . More experiments including deep learning experiments are presented in Appendix A . 3 METHODS Since our methods are modifications of EF21 , they share many features , and are presented in a unified way in Table 2 . At each iteration of the proposed methods , worker 𝑖 computes the compressed vector 𝑐𝑡𝑖 and sends it to the master . The methods differ in the way of computing 𝑐 𝑡 𝑖 but have similar ( in case of EF21-SGD , EF21-PAGE , EF21-PP – exactly the same ) update rules to the one of EF21 : 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 , 𝑔𝑡+1𝑖 = 𝑔𝑡𝑖 + 𝑐𝑡𝑖 , 𝑔𝑡+1 = 1𝑛 𝑛∑︀ 𝑖=1 𝑔𝑡+1𝑖 = 𝑔 𝑡 + 1𝑛 𝑛∑︀ 𝑖=1 𝑐𝑡𝑖 . ( 7 ) The pseudocodes of the methods are given in the appendix . Below we briefly describe each method . ◇ EF21-SGD : Error feedback and SGD . EF21-SGD is essentially EF21 but instead of the full gradients ∇𝑓𝑖 ( 𝑥𝑡+1 ) , workers compute the stochastic gradients 𝑔𝑖 ( 𝑥𝑡+1 ) , and use them to compute 𝑐𝑡𝑖 = 𝒞 ( 𝑔𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ) . Despite the seeming simplicity of this extension , it is highly important for various applications of machine learning and statistics where exact gradients are either unavailable or prohibitively expensive to compute . ◇ EF21-PAGE : Error feedback and variance reduction . In the finite-sum regime ( 3 ) , variance reduced methods usually perform better than vanilla SGD in many situations ( Gower et al. , 2020 ) . Therefore , for this setup we modify EF21 and combine it with variance reduction . In particular , this time we replace ∇𝑓𝑖 ( 𝑥𝑡+1 ) in the formula for 𝑐𝑡𝑖 with the PAGE estimator ( Li et al. , 2021 ) 𝑣 𝑡+1 𝑖 . With ( typically small ) probability 𝑝 this estimator equals the full gradient 𝑣𝑡+1𝑖 = ∇𝑓𝑖 ( 𝑥𝑡+1 ) , and with probability 1 − 𝑝 it is set to 𝑣𝑡+1𝑖 = 𝑣 𝑡 𝑖 + 1 𝜏𝑖 ∑︀ 𝑗∈𝐼𝑡𝑖 ( ︀ ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) ︀ , where 𝐼𝑡𝑖 is a minibatch of size 𝜏𝑖 . Typically , the number of data points 𝑚 owned by each client is large , and 𝑝 ≤ 1/𝑚 when 𝜏𝑖 ≡ 1 . As a result , computation of full gradients rarely happens during the optimization procedure : on average , once in every 𝑚 iterations only . Although it is possible to use other variance-reduced estimators like in SVRG or SAGA , we use the PAGE-estimator : unlike SVRG or SAGA , PAGE is optimal for smooth nonconvex optimization , and therefore gives the best theoretical guarantees ( we have obtained results for both SVRG and SAGA and indeed , they are worse , and hence we do not include them ) . Notice that unlike VR-MARINA ( Gorbunov et al. , 2021 ) , which is a state-of-the-art distributed optimization method designed specifically for unbiased compressors and which also uses the PAGEestimator , EF21-PAGE does not require the communication of full ( non-compressed ) vectors at all . This is an important property of the algorithm since , in some distributed networks , and especially when 𝑑 is very large , as is the case in modern over-parameterized deep learning , full vector communication is prohibitive . However , unlike the rate of VR-MARINA , the rate of EF21-PAGE does not improve with increasing 𝑛 . This is not a flaw of our method , but rather an inevitable drawback of distributed methods that rely on biased compressors such as Top-𝑘 . ◇ EF21-PP : Error feedback and partial participation . The extension of EF21 to the case of partial participation of the clients is mathematically identical to EF21 up to the following change : 𝑐𝑡𝑖 = 0 for all clients 𝑖 ̸∈ 𝑆𝑡 ⊆ { 1 , . . . , 𝑛 } that are not selected for communication at iteration 𝑡 . In practice , 𝑐𝑡𝑖 = 0 means that client 𝑖 does not take part in the 𝑡-th communication round . Here the set 𝑆𝑡 ⊆ { 1 , . . . , 𝑛 } is formed randomly such that Prob ( 𝑖 ∈ 𝑆𝑡 ) = 𝑝𝑖 > 0 for all 𝑖 = 1 , . . . , 𝑛 . ◇ EF21-BC : Error feedback and bidirectional compression . The simplicity of the EF21 mechanism allows us to naturally extend it to the case when it is desirable to have efficient/compressed communication between the clients and the server in both directions . At each iteration of EF21-BC , clients compute and send to the master node 𝑐𝑡𝑖 = 𝒞𝑤 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) and update ̃︀𝑔𝑡+1𝑖 = ̃︀𝑔𝑡𝑖 + 𝑐𝑡𝑖 in the usual way , i.e. , workers apply the EF21 mechanism . The key difference between EF21 and EF21-BC is that the master node in EF21-BC also uses this mechanism : it computes and broadcasts to the workers the compressed vector 𝑏𝑡+1 = 𝒞𝑀 ( ̃︀𝑔𝑡+1 − 𝑔𝑡 ) and updates 𝑔𝑡+1 = 𝑔𝑡 + 𝑏𝑡+1 , wherẽ︀𝑔𝑡+1 = 1𝑛 ∑︀𝑛𝑖=1 ̃︀𝑔𝑡+1𝑖 . Vector 𝑔𝑡 is maintained by the master and workers . Therefore , the clients are able to update it via using 𝑔𝑡+1 = 𝑔𝑡 + 𝑏𝑡+1 and compute 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 once they receive 𝑏𝑡+1 . ◇ EF21-HB : Error feedback with momentum . We consider classical Heavy-ball method ( Polyak , 1964 ) with EF21 estimator 𝑔𝑡 : 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑣𝑡 , 𝑣𝑡+1 = 𝜂𝑣𝑡 + 𝑔𝑡+1 , 𝑔𝑡+1𝑖 = 𝑔𝑡𝑖 + 𝑐𝑡𝑖 , 𝑔𝑡+1 = 1𝑛 𝑛∑︀ 𝑖=1 𝑔𝑡+1𝑖 = 𝑔 𝑡 + 1𝑛 𝑛∑︀ 𝑖=1 𝑐𝑡𝑖 . The resulting method is not better than EF21 in terms of the complexity of finding 𝜀-stationary point , i.e. , momentum does not improve the theoretical convergence rate . Unfortunately , this is common issue for a wide range of results for momentum methods Loizou & Richtárik ( 2020 ) . However , it is important to theoretically analyze momentum-extensions such as EF21-HB due to their importance in practice and generalization behaviour . ◇ EF21-Prox : Error feedback for composite problems . Finally , we make EF21 applicable to the composite optimization problems ( 6 ) by simply taking the prox-operator from the right-hand side of the 𝑥𝑡+1 update rule ( 7 ) : 𝑥𝑡+1 = prox𝛾𝑟 ( 𝑥 𝑡 − 𝛾𝑔𝑡 ) = arg min𝑥∈R𝑑 { 𝛾𝑟 ( 𝑥 ) + ‖𝑥−𝑥 𝑡+𝛾𝑔𝑡‖2/2 } . This trick is simple , but , surprisingly , EF21-Prox is the first distributed method with error-feedback that provably converges for composite problems ( 6 ) . 4 THEORETICAL CONVERGENCE RESULTS In this section , we formulate a single corollary derived from the main convergence theorems for our six enhancements of EF21 , and formulate the assumptions that we use in the analysis . The complete statements of the theorems and their proofs are provided in the appendices . In Table 1 we compare our new results with existing results . 4.1 ASSUMPTIONS In this subsection , we list and discuss the assumptions that we use in the analysis . 4.1.1 GENERAL ASSUMPTIONS To derive our convergence results , we invoke the following standard smoothness assumption . Assumption 1 ( Smoothness and lower boundedness ) . Every 𝑓𝑖 has 𝐿𝑖-Lipschitz gradient , i.e. , ‖∇𝑓𝑖 ( 𝑥 ) −∇𝑓𝑖 ( 𝑦 ) ‖ ≤ 𝐿𝑖 ‖𝑥− 𝑦‖ for all 𝑖 ∈ [ 𝑛 ] , 𝑥 , 𝑦 ∈ R𝑑 , and 𝑓 inf def = inf𝑥∈R𝑑 𝑓 ( 𝑥 ) > −∞ . We also assume that the compression operators used by all algorithms satisfy the following property . Definition 1 ( Contractive compressors ) . We say that a ( possibly randomized ) map 𝒞 : R𝑑 → R𝑑 is a contractive compression operator , or simply contractive compressor , if there exists a constant 0 < 𝛼 ≤ 1 such that E [ ︀ ‖𝒞 ( 𝑥 ) − 𝑥‖2 ] ︀ ≤ ( 1 − 𝛼 ) ‖𝑥‖2 , ∀𝑥 ∈ R𝑑 . ( 8 ) We emphasize that we do not assume 𝒞 to be unbiased . Hence , our theory works with the Top-𝑘 ( Alistarh et al. , 2018 ) and the Rank-𝑟 ( Safaryan et al. , 2021 ) compressors , for example . 4.1.2 ADDTIONAL ASSUMPTIONS FOR EF21-SGD We analyze EF21-SGD under the assumption that local stochastic gradients ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) satisfy the following inequality ( see Assumption 2 of Khaled & Richtárik ( 2020 ) ) . Assumption 2 ( General assumption for stochastic gradients ) . We assume that for all 𝑖 = 1 , . . . , 𝑛 there exist parameters 𝐴𝑖 , 𝐶𝑖 ≥ 0 , 𝐵𝑖 ≥ 1 such that E [ ︁ ‖∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) ‖2 | 𝑥𝑡 ] ︁ ≤ 2𝐴𝑖 ( ︀ 𝑓𝑖 ( 𝑥 𝑡 ) − 𝑓 inf𝑖 ) ︀ + 𝐵𝑖‖∇𝑓𝑖 ( 𝑥𝑡 ) ‖2 + 𝐶𝑖 , ( 9 ) where1 𝑓 inf𝑖 = inf𝑥∈R𝑑 𝑓𝑖 ( 𝑥 ) > −∞ . Below we provide two examples of stochastic gradients fitting this assumption ( for more detail , see ( Khaled & Richtárik , 2020 ) ) . Example 1 . Consider ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) such that E [ ︁ ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) | 𝑥𝑡 ] ︁ = ∇𝑓𝑖 ( 𝑥𝑡 ) and E [ ︂⃦⃦⃦ ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦⃦2 | 𝑥𝑡 ] ︂ ≤ 𝜎2𝑖 for some 𝜎𝑖 ≥ 0 . Then , due to variance decomposition , ( 9 ) holds with 𝐴𝑖 = 0 , 𝐵𝑖 = 0 , 𝐶𝑖 = 𝜎2𝑖 . 1When 𝐴𝑖 = 0 one can ignore the first term in the right-hand side of ( 9 ) , i.e. , assumption inf𝑥∈R𝑑 𝑓𝑖 ( 𝑥 ) > −∞ is not required in this case . Example 2 . Let 𝑓𝑖 ( 𝑥 ) = 1𝑚𝑖 ∑︀𝑚𝑖 𝑗=1 𝑓𝑖𝑗 ( 𝑥 ) , 𝑓𝑖𝑗 be 𝐿𝑖𝑗-smooth and 𝑓 inf 𝑖𝑗 = inf𝑥∈R𝑑 𝑓𝑖𝑗 ( 𝑥 ) > −∞ . Following Gower et al . ( 2019 ) , we consider a stochastic reformulation 𝑓𝑖 ( 𝑥 ) = E𝑣𝑖∼𝒟𝑖 [ 𝑓𝑣𝑖 ( 𝑥 ) ] = E𝑣𝑖∼𝒟𝑖 [ ︃ 1 𝑚𝑖 𝑚𝑖∑︀ 𝑗=1 𝑓𝑣𝑖𝑗 ( 𝑥 ) ] ︃ , ( 10 ) where E𝑣𝑖∼𝒟𝑖 [ 𝑣𝑖𝑗 ] = 1 . One can show ( see Proposition 2 of Khaled & Richtárik ( 2020 ) ) that under the assumption that E𝑣𝑖∼𝒟𝑖 [ ︀ 𝑣2𝑖𝑗 ] ︀ is finite for all 𝑗 stochastic gradient ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) = ∇𝑓𝑣𝑡𝑖 ( 𝑥 𝑡 ) with 𝑣𝑡𝑖 sampled from 𝒟𝑖 satisfies ( 9 ) with 𝐴𝑖 = max𝑗 𝐿𝑖𝑗E𝑣𝑖∼𝒟𝑖 [ ︀ 𝑣2𝑖𝑗 ] ︀ , 𝐵𝑖 = 1 , 𝐶𝑖 = 2𝐴𝑖∆inf𝑖 , where ∆inf𝑖 = 1 𝑚𝑖 ∑︀𝑚𝑖 𝑗=1 ( 𝑓 inf 𝑖 − 𝑓 inf𝑖𝑗 ) . In particular , if Prob ( ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) = ∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) = 𝐿𝑖𝑗∑︀𝑚𝑖 𝑙=1 𝐿𝑖𝑙 , then 𝐴𝑖 = 𝐿𝑖 = 1 𝑚𝑖 ∑︀𝑚𝑖 𝑗=1 𝐿𝑖𝑗 , 𝐵𝑖 = 1 , and 𝐶𝑖 = 2𝐴𝑖∆ inf 𝑖 . Stochastic gradient 𝑔𝑖 ( 𝑥𝑡 ) is computed using a mini-batch of 𝜏𝑖 independent samples satisfying ( 9 ) : 𝑔𝑖 ( 𝑥 𝑡 ) def = 1𝜏𝑖 𝜏𝑖∑︀ 𝑗=1 ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) . 4.1.3 ADDITIONAL ASSUMPTIONS FOR EF21-PAGE In the analysis of EF21-PAGE , we rely on the following assumption . Assumption 3 ( Average ℒ-smoothness ) . Let every 𝑓𝑖 have the form ( 3 ) . Assume that for all 𝑡 ≥ 0 , 𝑖 = 1 , . . . , 𝑛 , and batch 𝐼𝑡𝑖 ( of size 𝜏𝑖 ) , the minibatch stochastic gradients difference ̃︀∆𝑡𝑖 def= 1 𝜏𝑖 ∑︀ 𝑗∈𝐼𝑡𝑖 ( ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) computed on the node 𝑖 , satisfies E [ ︁̃︀∆𝑡𝑖 | 𝑥𝑡 , 𝑥𝑡+1 ] ︁ = ∆𝑡𝑖 and E [ ︂⃦⃦⃦ ̃︀∆𝑡𝑖 − ∆𝑡𝑖 ⃦⃦⃦2 | 𝑥𝑡 , 𝑥𝑡+1 ] ︂ ≤ ℒ2𝑖𝜏𝑖 ‖𝑥𝑡+1 − 𝑥𝑡‖2 ( 11 ) with some ℒ𝑖 ≥ 0 , where ∆𝑡𝑖 def = ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) . We also define ̃︀ℒ def= 1𝑛 ∑︀𝑛𝑖=1 ( 1−𝑝𝑖 ) ℒ2𝑖𝜏𝑖 . This assumption is satisfied for many standard/popular sampling strategies . For example , if 𝐼𝑡𝑖 is a full batch , then ℒ𝑖 = 0 . Another example is uniform sampling on { 1 , . . . , 𝑚 } , and each 𝑓𝑖𝑗 is 𝐿𝑖𝑗-smooth . In this regime , one may verify that ℒ𝑖 ≤ max1≤𝑗≤𝑚 𝐿𝑖𝑗 . 4.2 MAIN RESULTS Below we formulate the corollary establishing the complexities for each method . The complete version of this result is formulated and rigorously derived for each method in the appendix . Corollary 1 . Suppose that Assumption 1 holds . Then , there exist appropriate choices of parameters for EF21-PP , EF21-BC , EF21-HB , EF21-Prox such that the number of communication rounds 𝑇 and the ( expected ) number of gradient computations at each node # grad for these methods to find an 𝜀-stationary point , i.e. , a point ? ̂ ? 𝑇 such that E [ ‖∇𝑓 ( ? ̂ ? 𝑇 ) ‖2 ] ≤ 𝜀2 for EF21-PP , EF21-BC , EF21-HB and E [ ‖𝒢𝛾 ( ? ̂ ? 𝑇 ) ‖2 ] ≤ 𝜀2 for EF21-Prox , where 𝒢𝛾 ( 𝑥 ) = 1/𝛾 ( ︀ 𝑥− prox𝛾𝑟 ( 𝑥− 𝛾∇𝑓 ( 𝑥 ) ) ) ︀ , are EF21-PP : 𝑇 = 𝒪 ( ︁ ̃︀𝐿𝛿0 𝑝𝛼𝜀2 ) ︁ , # grad = 𝒪 ( ︁ ̃︀𝐿𝛿0 𝛼𝜀2 ) ︁ EF21-BC : 𝑇 = # grad = 𝒪 ( ︁ ̃︀𝐿𝛿0 𝛼𝑤𝛼𝑀𝜀2 ) ︁ EF21-HB : 𝑇 = # grad = 𝒪 ( ︁ ̃︀𝐿𝛿0 𝜀2 ( ︁ 1 𝛼 + 1 1−𝜂 ) ︁ ) ︁ EF21-Prox : 𝑇 = # grad = 𝒪 ( ︁ ̃︀𝐿𝛿0 𝛼𝜀2 ) ︁ , where ̃︀𝐿 def= √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝛿0 def= 𝑓 ( 𝑥0 ) −𝑓 inf ( for EF21-Prox 𝛿0 = Φ ( 𝑥0 ) −Φ𝑖𝑛𝑓 ) , 𝑝 is the probability of sampling the client in EF21-PP , 𝛼𝑤 and 𝛼𝑀 are contraction factors for compressors applied on the workers ’ and the master ’ s sides respectively in EF21-BC , and 𝜂 ∈ [ 0,1 ) is the momentum parameter in EF21-HB . If Assumptions 1 and 2 in the setup from Example 1 hold , then there exist appropriate choices of parameters for EF21-SGD such that the corresponding 𝑇 and the averaged number of gradient computations at each node # grad are EF21-SGD : 𝑇 = 𝒪 ( ︁ ̃︀𝐿𝛿0 𝛼𝜀2 ) ︁ , # grad = 𝒪 ( ︁ ̃︀𝐿𝛿0 𝛼𝜀2 + ̃︀𝐿𝛿0𝜎2 𝛼3𝜀4 ) ︁ , where 𝜎 = 1𝑛 ∑︀𝑛 𝑖=1 𝜎 2 𝑖 . If Assumptions 1 and 3 hold , then there exist appropriate choices of parameters for EF21-PAGE such that the corresponding 𝑇 and # grad are EF21-PAGE : 𝑇 = 𝒪 ( ︁ ( ̃︀𝐿+ ̃︀ℒ ) 𝛿0 𝛼𝜀2 + √ 𝑚 ̃︀ℒ𝛿0 𝜀2 ) ︁ , # grad = 𝒪 ( ︁ 𝑚 + ( ̃︀𝐿+ ̃︀ℒ ) 𝛿0 𝛼𝜀2 + √ 𝑚 ̃︀ℒ𝛿0 𝜀2 ) ︁ , where ̃︀ℒ = √︁ 1−𝑝𝑛 ∑︀𝑛𝑖=1 ℒ2𝑖 , 𝜏𝑖 ≡ 𝜏 = 1 . Remark : We highlight some points for our results in Corollary 1 as follows : ∙ For EF21-PP and EF21-Prox , none of previous error feedback methods work on these two settings ( partial participation and proximal/composite case ) . Thus , we provide the first convergence results for them . Moreover , we show that the gradient ( computation ) complexity for both EF21-PP and EF21-Prox is 𝒪 ( 1/𝛼𝜀 ) , matching the original vanilla EF21 . It means that we extend EF21 to both settings for free . ∙ For EF21-BC , we show 𝒪 ( 1/𝛼𝑤𝛼𝑀𝜀2 ) complexity result . In particular , if one uses constant ratio of compression ( e.g. , 10 % ) , then 𝛼 ≈ 0.1 . Then the result will be 𝒪 ( 1/𝜀2 ) . However , previous result of DoubleSqueeze is 𝒪 ( Δ/𝜀3 ) and it also uses more strict assumption for the compressors ( E [ ‖𝒞 ( 𝑥 ) − 𝑥‖ ] ≤ ∆ ) . Even if we ignore this , our results for EF21-BC is better than the one for DoubleSqueeze by a large factor 1/𝜀 . ∙ Similarly , our result for EF21-HB is roughly 𝒪 ( 1/𝜀2 ) ( note that the momentum parameter 𝜂 is usually constant such as 0.2 , 0.4 , 0.9 used in our experiments ) . However , previous result of M-CSER is roughly 𝒪 ( 𝐺/𝜀3 ) and it is proven under an additional bounded gradient assumption . Similarly , our EF21-HB is better by a large factor 1/𝜀 . ∙ For EF21-SGD and EF21-PAGE , we want to reduce the gradient complexity by using ( variancereduced ) stochastic gradients instead of full gradient in the vanilla EF21 . Note that 𝜎2 and ∆inf in EF21-SGD could be much smaller than 𝐺 in Choco-SGD since 𝐺 always depends on the dimension ( and can be even infinite ) , while 𝜎2 and ∆inf are mostly dimension-free parameters ( particularly , they are very small if the functions/data samples are similar/close ) . Thus , for high dimensional problems ( e.g. , deep neural networks ) , EF21-SGD can be better than Choco-SGD . Besides , in the finite-sum case ( 3 ) , especially if the number of data samples 𝑚 on each client is not very large , then EF21-PAGE is much better since its complexity is roughly 𝒪 ( √ 𝑚/𝜀2 ) while EF21-SGD ones is roughly 𝒪 ( 𝜎2/𝜀4 ) . 5 EXPERIMENTS In this section , we consider a logistic regression problem with a non-convex regularizer min 𝑥∈R𝑑 { ︃ 𝑓 ( 𝑥 ) = 1𝑁 𝑁∑︀ 𝑖=1 log ( ︀ 1 + exp ( ︀ −𝑏𝑖𝑎⊤𝑖 𝑥 ) ︀ ) ︀ + 𝜆 𝑑∑︀ 𝑗=1 𝑥2𝑗 1+𝑥2𝑗 } ︃ , ( 12 ) where 𝑎𝑖 ∈ R𝑑 , 𝑏𝑖 ∈ { −1,1 } are the training data , and 𝜆 > 0 is the regularization parameter , which is set to 𝜆 = 0.1 in all experiments . For all methods the stepsizes are initially chosen as the largest stepsize predicted by theory for EF21 ( see Theorem 1 ) , then they are tuned individually for each parameter setting . We provide more details on the datasets , hardware , experimental setups , and additional experiments , including deep learning experiments in Appendix A . Experiment 1 : Fast convergence with variance reduction . In our first experiment , we showcase the computation and communication superiority of EF21-PAGE ( Alg . 3 ) over EF21-SGD . Figure 8 illustrates that , in all cases , EF21-PAGE perfectly reduces the accumulated variance and converges to the desired tolerance , whereas EF21-SGD is stuck at some accuracy level . Moreover , EF21-PAGE turns out to be surprisingly efficient with small bathsizes ( eg , 1.5 % of the local data ) both in terms of the number of epochs and the # bits sent to the server per client . Interestingly , for most datasets , a further increase of bathsize does not considerably improve the convergence . Experiment 2 : On the effect of partial participation of clients . This experiment shows that EF21-PP ( Alg . 4 ) can reduce communication costs and can be more practical than EF21 . For this comparison , we consider 𝑛 = 100 and , therefore , apply a different data partitioning , see Table 5 from Appendix A for more details . It is predicted by our theory ( Corollary 1 ) that , in terms of the number of iterations/communication rounds , partial participation slows down the convergence of EF21 by a fraction of participating clients . We observe this behavior in practice as well ( see Figure 2a ) . However , since for EF21-PP the communications are considerably cheaper it outperforms EF21 in terms of # number of bits sent to the server per client on average ( see Figure 2 ) . REFERENCES Dan Alistarh , Demjan Grubic , Jerry Li , Ryota Tomioka , and Milan Vojnovic . QSGD : Communicationefficient SGD via gradient quantization and encoding . In Advances in Neural Information Processing Systems ( NIPS ) , pp . 1709–1720 , 2017 . Dan Alistarh , Torsten Hoefler , Mikael Johansson , Sarit Khirirat , Nikola Konstantinov , and Cédric Renggli . The convergence of sparsified gradient methods . In Advances in Neural Information Processing Systems ( NeurIPS ) , 2018 . Zeyuan Allen-Zhu . Katyusha : The first direct acceleration of stochastic gradient methods . In Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing , pp . 1200– 1205 . ACM , 2017 . Yossi Arjevani , Yair Carmon , John C Duchi , Dylan J Foster , Nathan Srebro , and Blake Woodworth . Lower bounds for non-convex stochastic optimization . arXiv preprint arXiv:1912.02365 , 2019 . Sanjeev Arora , Nadav Cohen , and Elad Hazan . On the optimization of deep networks : Implicit acceleration by overparameterization . In Proceedings of the 35th International Conference on Machine Learning ( ICML ) , 2018 . Amir Beck . First-Order Methods in Optimization . Society for Industrial and Applied Mathematics , 2017 . Aleksandr Beznosikov , Samuel Horváth , Peter Richtárik , and Mher Safaryan . On biased compression for distributed learning . arXiv preprint arXiv:2002.12410 , 2020 . Léon Bottou . Curiously fast convergence of some stochastic gradient descent algorithms . In Proceedings of the symposium on learning and data science , Paris , volume 8 , pp . 2624–2633 , 2009 . Léon Bottou . Stochastic gradient descent tricks . In Neural networks : Tricks of the trade , pp . 421–436 . Springer , 2012 . Chih-Chung Chang and Chih-Jen Lin . LIBSVM : a library for support vector machines . ACM Transactions on Intelligent Systems and Technology ( TIST ) , 2 ( 3 ) :1–27 , 2011 . Yae Jee Cho , Jianyu Wang , and Gauri Joshi . Client selection in federated learning : Convergence analysis and power-of-choice selection strategies . arXiv preprint arXiv:2010.01243v1 , 2020 . Eduard Gorbunov , Dmitry Kovalev , Dmitry Makarenko , and Peter Richtárik . Linearly converging error compensated SGD . In 34th Conference on Neural Information Processing Systems ( NeurIPS ) , 2020 . Eduard Gorbunov , Konstantin Burlachenko , Zhize Li , and Peter Richtárik . MARINA : Faster nonconvex distributed learning with compression . In International Conference on Machine Learning , pp . 3788–3798 . PMLR , 2021. arXiv:2102.07845 . Robert M Gower , Mark Schmidt , Francis Bach , and Peter Richtárik . Variance-reduced methods for machine learning . Proceedings of the IEEE , 108 ( 11 ) :1968–1983 , 2020 . Robert Mansel Gower , Nicolas Loizou , Xun Qian , Alibek Sailanbayev , Egor Shulgin , and Peter Richtárik . SGD : General analysis and improved rates . In International Conference on Machine Learning , pp . 5200–5209 . PMLR , 2019 . Priya Goyal , Piotr Dollár , Ross Girshick , Pieter Noordhuis , Lukasz Wesolowski , Aapo Kyrola , Andrew Tulloch , Yangqing Jia , and Kaiming He . Accurate , large minibatch sgd : Training imagenet in 1 hour . arXiv preprint arXiv:1706.02677 , 2017 . Kaiming He , Xiangyu Zhang , Shaoqing Ren , and Jian Sun . Deep residual learning for image recognition . In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition ( CVPR ) , pp . 770–778 , 2016 . Samuel Horváth and Peter Richtárik . A better alternative to error feedback for communicationefficient distributed learning . In 9th International Conference on Learning Representations ( ICLR ) , 2021 . Samuel Horváth , Chen-Yu Ho , L ’ udovít Horváth , Atal Narayan Sahu , Marco Canini , and Peter Richtárik . Natural compression for distributed deep learning . arXiv preprint arXiv:1905.10988 , 2019a . Samuel Horváth , Dmitry Kovalev , Konstantin Mishchenko , Sebastian Stich , and Peter Richtárik . Stochastic distributed learning with gradient quantization and variance reduction . arXiv preprint arXiv:1904.05115 , 2019b . Rustem Islamov , Xun Qian , and Peter Richtárik . Distributed second order methods with fast rates and compressed communication . arXiv preprint arXiv:2102.07158 , 2021 . Peter et al Kairouz . Advances and open problems in federated learning . arXiv preprint arXiv:1912.04977 , 2019 . Sai Praneeth Karimireddy , Quentin Rebjock , Sebastian Stich , and Martin Jaggi . Error feedback fixes SignSGD and other gradient compression schemes . In 36th International Conference on Machine Learning ( ICML ) , 2019 . Sai Praneeth Karimireddy , Satyen Kale , Mehryar Mohri , Sashank Reddi , Sebastian Stich , and Ananda Theertha Suresh . SCAFFOLD : Stochastic controlled averaging for federated learning . In Proceedings of the 37th International Conference on Machine Learning , 2020 . Ahmed Khaled and Peter Richtárik . Gradient descent with compressed iterates . In NeurIPS Workshop on Federated Learning for Data Privacy and Confidentiality , 2019 . Ahmed Khaled and Peter Richtárik . Better theory for SGD in the nonconvex world . arXiv preprint arXiv:2002.03329 , 2020 . Sarit Khirirat , Hamid Reza Feyzmahdavian , and Mikael Johansson . Distributed learning with compressed gradients . arXiv preprint arXiv:1806.06573 , 2018 . Diederik P Kingma and Jimmy Ba . Adam : A method for stochastic optimization . arXiv preprint arXiv:1412.6980 , 2014 . Anastasia Koloskova , Tao Lin , S. Stich , and Martin Jaggi . Decentralized deep learning with arbitrary communication compression . In International Conference on Learning Representations ( ICLR ) , 2020 . Jakub Konečný , H. Brendan McMahan , Felix Yu , Peter Richtárik , Ananda Theertha Suresh , and Dave Bacon . Federated learning : strategies for improving communication efficiency . In NIPS Private Multi-Party Machine Learning Workshop , 2016 . Alex Krizhevsky , Geoffrey Hinton , et al . Learning multiple layers of features from tiny images . Technical report , University of Toronto , Toronto , 2009 . Guanghui Lan and Yi Zhou . An optimal randomized incremental gradient method . arXiv preprint arXiv:1507.02000 , 2015 . Guanghui Lan , Zhize Li , and Yi Zhou . A unified variance-reduced accelerated gradient method for convex optimization . In Advances in Neural Information Processing Systems , pp . 10462–10472 , 2019 . Zhize Li . ANITA : An optimal loopless accelerated variance-reduced gradient method . arXiv preprint arXiv:2103.11333 , 2021a . Zhize Li . A short note of page : Optimal convergence rates for nonconvex optimization . arXiv preprint arXiv:2106.09663 , 2021b . Zhize Li and Jian Li . A simple proximal stochastic gradient method for nonsmooth nonconvex optimization . In Advances in Neural Information Processing Systems ( NeurIPS ) , pp . 5569–5579 , 2018 . Zhize Li and Peter Richtárik . A unified analysis of stochastic gradient methods for nonconvex federated optimization . arXiv preprint arXiv:2006.07013 , 2020 . Zhize Li and Peter Richtárik . CANITA : Faster rates for distributed convex optimization with communication compression . arXiv preprint arXiv:2107.09461 , 2021a . Zhize Li and Peter Richtárik . ZeroSARAH : Efficient nonconvex finite-sum optimization with zero full gradient computation . arXiv preprint arXiv:2103.01447 , 2021b . Zhize Li , Dmitry Kovalev , Xun Qian , and Peter Richtárik . Acceleration for compressed gradient descent in distributed and federated optimization . In International Conference on Machine Learning ( ICML ) , pp . 5895–5904 . PMLR , 2020 . Zhize Li , Hongyan Bao , Xiangliang Zhang , and Peter Richtárik . PAGE : A simple and optimal probabilistic gradient estimator for nonconvex optimization . In International Conference on Machine Learning ( ICML ) , pp . 6286–6295 . PMLR , 2021. arXiv:2008.10898 . Nicolas Loizou and Peter Richtárik . Momentum and stochastic momentum for stochastic gradient , Newton , proximal point and subspace descent methods . Computational Optimization and Applications , 77:653–710 , 2020 . Stanislaw Lojasiewicz . A topological property of real analytic subsets . Coll . du CNRS , Les équations aux dérivées partielles , 117 ( 87-89 ) :2 , 1963 . Konstantin Mishchenko , Eduard Gorbunov , Martin Takáč , and Peter Richtárik . Distributed learning with compressed gradient differences . arXiv preprint arXiv:1901.09269 , 2019 . Konstantin Mishchenko , Ahmed Khaled , and Peter Richtarik . Random reshuffling : Simple analysis with vast improvements . In H. Larochelle , M. Ranzato , R. Hadsell , M. F. Balcan , and H. Lin ( eds . ) , Advances in Neural Information Processing Systems , volume 33 , pp . 17309–17320 . Curran Associates , Inc. , 2020 . URL https : //proceedings.neurips.cc/paper/2020/file/ c8cc6e90ccbff44c9cee23611711cdc4- [ ] Paper.pdf . Yurii Nesterov . A method for unconstrained convex minimization problem with the rate of convergence o ( 1/kˆ 2 ) . In Doklady AN USSR , volume 269 , pp . 543–547 , 1983 . Adam Paszke , Sam Gross , Francisco Massa , Adam Lerer , James Bradbury , Gregory Chanan , Trevor Killeen , Zeming Lin , Natalia Gimelshein , Luca Antiga , et al . Pytorch : An imperative style , high-performance deep learning library . In Advances in Neural Information Processing Systems ( NeurIPS ) , 2019 . Constantin Philippenko and Aymeric Dieuleveut . Bidirectional compression in heterogeneous settings for distributed or federated learning with partial participation : tight convergence guarantees . arXiv preprint arXiv:2006.14591 , 2020 . Boris T Polyak . Gradient methods for the minimisation of functionals . USSR Computational Mathematics and Mathematical Physics , 3 ( 4 ) :864–878 , 1963 . Boris T Polyak . Some methods of speeding up the convergence of iteration methods . Ussr computational mathematics and mathematical physics , 4 ( 5 ) :1–17 , 1964 . Xun Qian , Peter Richtárik , and Tong Zhang . Error compensated distributed SGD can be accelerated . arXiv preprint arXiv:2010.00091 , 2020 . Zheng Qu and Peter Richtárik . Coordinate descent with arbitrary sampling ii : Expected separable overapproximation . arXiv preprint arXiv:1412.8063 , 2014 . Peter Richtárik , Igor Sokolov , and Ilyas Fatkhullin . EF21 : A new , simpler , theoretically better , and practically faster error feedback . arXiv preprint arXiv:2106.05203 , 2021 . Mher Safaryan , Rustem Islamov , Xun Qian , and Peter Richtárik . FedNL : Making Newton-type methods applicable to federated learning . arXiv preprint arXiv:2106.02969 , 2021 . Frank Seide , Hao Fu , Jasha Droppo , Gang Li , and Dong Yu . 1-bit stochastic gradient descent and its application to data-parallel distributed training of speech DNNs . In Fifteenth Annual Conference of the International Speech Communication Association , 2014 . Shai Shalev-Shwartz and Shai Ben-David . Understanding machine learning : from theory to algorithms . Cambridge University Press , 2014 . Sebastian U. Stich , J.-B . Cordonnier , and Martin Jaggi . Sparsified SGD with memory . In Advances in Neural Information Processing Systems ( NeurIPS ) , 2018 . Hanlin Tang , Xiangru Lian , Chen Yu , Tong Zhang , and Ji Liu . DoubleSqueeze : Parallel stochastic gradient descent with double-pass error-compensated compression . In Proceedings of the 36th International Conference on Machine Learning ( ICML ) , 2020 . Thijs Vogels , Sai Praneeth Karimireddy , and Martin Jaggi . PowerSGD : Practical low-rank gradient compression for distributed optimization . In Neural Information Processing Systems , 2019 . Zhe Wang , Kaiyi Ji , Yi Zhou , Yingbin Liang , and Vahid Tarokh . Spiderboost and momentum : Faster stochastic variance reduction algorithms . arXiv preprint arXiv:1810.10690 , 2018 . Cong Xie , Shuai Zheng , Oluwasanmi Koyejo , Indranil Gupta , Mu Li , and Haibin Lin . CSER : Communication-efficient SGD with error reset . In Advances in Neural Information Processing Systems ( NeurIPS ) , pp . 12593–12603 , 2020 . Haibo Yang , Minghong Fang , and Jia Liu . Achieving linear speedup with partial worker participation in non-iid federated learning . arXiv preprint arXiv:2101.11203v3 , 2021 . Tianbao Yang , Qihang Lin , and Zhe Li . Unified convergence analysis of stochastic momentum methods for convex and non-convex optimization . arXiv preprint arXiv:1604.03257 , 2016 . Yang You , Jing Li , Sashank Reddi , Jonathan Hseu , Sanjiv Kumar , Srinadh Bhojanapalli , Xiaodan Song , James Demmel , Kurt Keutzer , and Cho-Jui Hsieh . Large batch optimization for deep learning : Training bert in 76 minutes . In International Conference on Learning Representations , 2020 . URL https : //openreview.net/forum ? id=Syx4wnEtvH . Haoyu Zhao , Zhize Li , and Peter Richtárik . FedPAGE : A fast local stochastic gradient method for communication-efficient federated learning . arXiv preprint arXiv:2108.04755 , 2021 . TABLE OF CONTENTS 1 Introduction 1 2 Our Contributions 2 3 Methods 4 4 Theoretical Convergence Results 6 4.1 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4.1.1 General Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4.1.2 Addtional Assumptions for EF21-SGD . . . . . . . . . . . . . . . . . . . 6 4.1.3 Additional Assumptions for EF21-PAGE . . . . . . . . . . . . . . . . . . . 7 4.2 Main Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 5 Experiments 8 A Extra Experiments 15 A.1 Non-Convex Logistic Regression : Additional Experiments and Details . . . . . . . 15 A.2 Experiments with Least Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 A.3 Deep Learning Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 B Notations and Assumptions 22 C EF21 23 C.1 Convergence for General Non-Convex Functions . . . . . . . . . . . . . . . . . . 23 C.2 Convergence under Polyak-Łojasiewicz Condition . . . . . . . . . . . . . . . . . . 25 D Stochastic Gradients 27 D.1 Convergence for General Non-Convex Functions . . . . . . . . . . . . . . . . . . 28 D.2 Convergence under Polyak-Łojasiewicz Condition . . . . . . . . . . . . . . . . . . 32 E Variance Reduction 35 E.1 Convergence for General Non-Convex Functions . . . . . . . . . . . . . . . . . . 37 E.2 Convergence under Polyak-Łojasiewicz Condition . . . . . . . . . . . . . . . . . . 41 F Partial Participation 44 F.1 Convergence for General Non-Convex Functions . . . . . . . . . . . . . . . . . . 47 F.2 Convergence under Polyak-Łojasiewicz Condition . . . . . . . . . . . . . . . . . . 48 G Bidirectional Compression 49 G.1 Convergence for General Non-Convex Functions . . . . . . . . . . . . . . . . . . 51 G.2 Convergence under Polyak-Łojasiewicz Condition . . . . . . . . . . . . . . . . . . 53 H Heavy Ball Momentum 55 H.1 Convergence for General Non-Convex Functions . . . . . . . . . . . . . . . . . . 57 I Composite Case 63 I.1 Convergence for General Non-Convex Functions . . . . . . . . . . . . . . . . . . 65 I.2 Convergence under Polyak-Łojasiewicz Condition . . . . . . . . . . . . . . . . . . 67 J Useful Auxiliary Results 70 J.1 Basic Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 J.2 Useful Lemmas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 A EXTRA EXPERIMENTS In this section , we give missing details on the experiments from Section 5 , and provide additional experiments . A.1 NON-CONVEX LOGISTIC REGRESSION : ADDITIONAL EXPERIMENTS AND DETAILS Datasets , hardware and implementation . We use standard LibSVM datasets ( Chang & Lin , 2011 ) , and split each dataset among 𝑛 clients . For experiments 1 , 3 , 4 and 5 , we chose 𝑛 = 20 whereas for the experiment 2 we consider 𝑛 = 100 . The first 𝑛−1 clients own equal parts , and the remaining part , of size 𝑁 − 𝑛 · ⌊𝑁/𝑛⌋ , is assigned to the last client . We consider the heterogeneous data distribution regime ( i.e . we do not make any additional assumptions on data similarity between workers ) . A summary of datasets and details of splitting data among workers can be found in Tables 3 and 5 . The algorithms are implemented in Python 3.8 ; we use 3 different CPU cluster node types in all experiments : 1 ) AMD EPYC 7702 64-Core ; 2 ) Intel ( R ) Xeon ( R ) Gold 6148 CPU @ 2.40GHz ; 3 ) Intel ( R ) Xeon ( R ) Gold 6248 CPU @ 2.50GHz . In all algorithms involving compression , we use Top-𝑘 ( Alistarh et al. , 2017 ) as a canonical example of contractive compressor 𝒞 , and fix the compression ratio 𝑘/𝑑 ≈ 0.01 , where 𝑑 is the number of features in the dataset . For all algorithms , at each iteration we compute the squared norm of the exact/full gradient for comparison of the methods performance . We terminate our algorithms either if they reach the certain number of iterations or the following stopping criterion is satisfied : ‖∇𝑓 ( 𝑥𝑡 ) ‖2 ≤ 10−7 . In all experiments , the stepsize is set to the largest stepsize predicted by theory for EF21 multiplied by some constant multiplier which was individually tuned in all cases . Experiment 1 : Fast convergence with variance reductions ( extra details ) . The parameters 𝑝𝑖 of the PAGE estimator are set to 𝑝𝑖 = 𝑝 def = 1𝑛 ∑︀𝑛 𝑖=1 𝜏𝑖 𝜏𝑖+𝑁𝑖 , where 𝜏𝑖 is the batchsize for clients 𝑖 = 1 , . . . , 𝑛 ( see Table 4 for details ) . In our experiments , we assume that the sampling of Bernoulli random variable is performed on server side ( which means that at each iteration for all clients 𝑏𝑡𝑖 = 1 or 𝑏𝑡𝑖 = 0 ) . And if 𝑏 𝑡 𝑖 = 0 , then in line 5 of Algorithm 3 𝐼 𝑡 𝑖 is sampled without replacement uniformly at random . Table 4 shows the selection of parameter 𝑝 for each experiment . For each batchsize from the set2 { 95 % , 50 % , 25 % ,12.5 % , 6.5 % ,3 % } , we tune the stepsize multiplier for EF21-PAGE within the set { 0.25 , 0.5 , 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , 256 , 512 , 1024 , 2048 } . The best pair ( batchsize , stepsize multiplier ) is chosen in such a way that it gives the best convergence in terms of # bits/𝑛 ( 𝐶 → 𝑆 ) . In the rest of the experiments , fine tuning is performed in a similar fashion . 2By 50 % , 25 % ( and so on ) we refer to a batchsize , which is equals to ⌊0.5𝑁𝑖⌋ , ⌊0.25𝑁𝑖⌋ ( and so on ) for all clients 𝑖 = 1 , . . . , 𝑛 . We tune the stepsize multiplier for EF21-PP within the following set : { 0.125,0.25 , 0.5 , 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , 256 , 512 , 1024 , 2048 , 4096 } . Experiment 3 : On the advantages of bidirectional biased compression . Our next experiment demonstrates that the application of the Server → Clients compression in EF21-BC ( Alg . 5 ) does not significantly slow down the convergence in terms of the communication rounds but requires much less bits to be transmitted . Indeed , Figure 3a illustrates that that it is sufficient to communicate only 5 % − 15 % of data to perform similarly to EF21 ( Alg . 1 ) .3 Note that EF21 communicates full vectors from the Server → Clients , and , therefore , may have slower communication at each round . In Figure 3b we take into account only the number of bits sent from clients to the server , and therefore we observe the same behavior as in Figure 3a . However , if we care about the total number of bits ( see Figure 3c ) , then EF21-BC considerably outperforms EF21 in all cases . 3The range 5 % − 15 % comes from the fractions 𝑘/𝑑 for each dataset . For each parameter 𝑘 in Server-Clients compression , we tune the stepsize multiplier for EF21-BC within the following set : { 0.125,0.25 , 0.5 , 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , 256 , 512 , 1024 , 2048 } . Experiment 4 : On the cheaper computations via EF21-SGD . The fourth experiment ( see Figure 4a ) illustrates that EF21-SGD ( Alg . 2 ) is the more preferable choice than EF21 for the cases when full gradient computations are costly . For each batchsize from the set4 { 95 % , 50 % , 25 % ,12.5 % , 6.5 % ,3 % } , we tune the stepsize multiplier for EF21-SGD within the following set : { 0.25 , 0.5 , 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , 256 , 512 , 1024 , 2048 } . Figure 4a illustrates that EF21-SGD is able to reach a moderate tolerance in 5 − 10 epochs . 4By 50 % , 25 % ( and so on ) we refer to a batchsize , which is equals to ⌊0.5𝑁𝑖⌋ , ⌊0.25𝑁𝑖⌋ ( and so on ) for all clients 𝑖 = 1 , . . . , 𝑛 . However , due to the accumulated variance introduced by SGD , estimator EF21-SGD is stuck at some accuracy level ( see Figure 4b ) , showing the usual behavior of the SGD observed in practice . Experiment 5 : On the effect of heavy ball momentum . In this experiment ( see Figure 5 ) , we show that for the majority of the considered datasets heavy ball acceleration used in EF21-HB ( Alg . 6 ) improves the convergence of EF21 method . For every dataset ( and correspondingly chosen parameter 𝑘 ) we tune momentum parameter 𝜂 in EF21-HB by making a grid search over all possible parameter values from 0.05 to 0.99 with the step 0.05 . Finally , for our plots we pick 𝜂 ∈ { 0.05 , 0.2 , 0.25 , 0.4 , 0.9 } since the first four values shows the best performance and 𝜂 = 0.9 is a popular choice in practice . For each parameter 𝜂 from the set { 0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,0.99 } . we perform a grid search of stepsize multiplier within the powers of 2 : { 0.125 , 0.25 , 0.5 , 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , 256 , 512 , 1024 , 2048 } . Experiments on a larger dataset . In these additional experiments , we test our methods on larger problem and dataset . The dimension of the dataset used in these experiments is 𝑑 = 20958 . Each method is run for 500 epochs . In this case , we observe a similar behavior as in our previous experiments . Comparison to non-compressed methods . In addition , we compare EF21-PAGE and EF21-SGD to the baseline methods without compression : PAGE ( Figure 8a ) and SGD ( Figure 9a ) . In these experiments , we observe that EF21-PAGE and EF21-SGD require much less information to transmit in order to achieve the same accuracy of the solution as the methods without compression ( PAGE , SGD ) . A.2 EXPERIMENTS WITH LEAST SQUARES In this section , we conduct the experiments on a function satisfying the PŁ-condition ( see Assumption 4 ) . In particular , we consider the least squares problem : min 𝑥∈R𝑑 { ︃ 𝑓 ( 𝑥 ) = 1 𝑛 𝑛∑︁ 𝑖=1 ( 𝑎⊤𝑖 𝑥− 𝑏𝑖 ) 2 } ︃ , where 𝑎𝑖 ∈ R𝑑 , 𝑏𝑖 ∈ { −1,1 } are the training data . We use the same datasets as for the logistic regression problem . Experiment : On the effect of heavy ball momentum in PŁ-setting . For PŁ-setting , EF21-HB also improves the convergence over EF21 for the majority of the datasets ( see Figure 10 ) . Stepsize and momentum parameter 𝜂 are chosen using the same strategy as for the logistic regression experiments ( see section A.1 ) . A.3 DEEP LEARNING EXPERIMENTS In this experiment , the exact/full gradient ∇𝑓𝑖 ( 𝑥𝑘+1 ) in the algorithm EF21-HB is replaced by its stochastic estimator ( we later refer to this method as EF21-SGD-HB ) . We compare the resulting method with some existing baselines on a deep learning multi-class image classification task . In particular , we compare our EF21-SGD-HB method to EF21+-SGD-HB5 , EF-SGD-HB6 , EF21-SGD 5EF21+-SGD-HB is the method obtained from EF21-SGD-HB via replacing EF21 by EF21+ compressor 6EF-SGD-HB is the method obtained from EF21-SGD-HB via replacing EF21 by EF compressor and EF-SGD on the problem of training ResNet18 ( He et al. , 2016 ) model on CIFAR-10 ( Krizhevsky et al. , 2009 ) dataset . For more details about the EF21+ and EF type methods and their applications in deep learning we refer reader to ( Richtárik et al. , 2021 ) . We implement the algorithms in PyTorch ( Paszke et al. , 2019 ) and run the experiments on a single GPU NVIDIA GeForce RTX 2080 Ti . The dataset is split into 𝑛 = 8 equal parts . Total train set size for CIFAR-10 is 50,000 . The test set for evaluation has 10,000 data points . The train set is split into batches of size 𝜏 = 32 . The first seven workers own an equal number of batches of data , while the last worker gets the rest . In our experiments , we fix 𝑘 ≈ 0.05𝑑 , 𝜏 = 32 and momentum parameter 𝜂 = 0.9.7 As it is usually done in deep learning applications , stochastic gradients are generated via so-called “ shuffle once ” strategy , i.e. , workers randomly shuffle their datasets and then select minibatches using the obtained order ( Bottou , 2009 ; 2012 ; Mishchenko et al. , 2020 ) . We tune the stepsize 𝛾 within the range { 0.0625 , 0.125 , 0.25 , 0.5 , 1 } and for each method we individually chose the one 𝛾 giving the highest accuracy score on test . For momentum methods , the best stepsize was 0.5 , whereas for the non-momentum ones it was 0.125 . The experiments show ( see Figure 11 ) that the train loss for momentum methods decreases slower than for the non-momentum ones , whereas for the test loss situation is the opposite . Finally , momentum methods show a considerable improvement in the accuracy score on the test set over the existing EF21-SGD and EF-SGD . 7Here , 𝑑 is the number of model parameters . For ResNet18 , 𝑑 = 11,511,784 . B NOTATIONS AND ASSUMPTIONS We now introduce an additional assumption , which enables us to obtain a faster linear convergence result in different settings . Assumption 4 ( Polyak-Łojasiewicz ) . There exists 𝜇 > 0 such that 𝑓 ( 𝑥 ) − 𝑓 ( 𝑥⋆ ) ≤ 12𝜇 ‖∇𝑓 ( 𝑥 ) ‖ 2 for all 𝑥 ∈ R𝑑 , where 𝑥⋆ = arg min𝑥∈R𝑑 𝑓 . Table 6 summarizes the most frequently used notations in our analysis . Additionally , we comment on the main quantities here . We define 𝛿𝑡 def= 𝑓 ( 𝑥𝑡 ) −𝑓 inf 8 , 𝑅𝑡 def= ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . In the analysis of EF21- HB , it is useful to adapt this notation to 𝑅𝑡 def= ( 1 − 𝜂 ) 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 , where { 𝑧𝑡 } 𝑡≥0 is the sequence of virtual iterates introduced in Section H. We denote 𝐺𝑡𝑖 def = ‖∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑔𝑡𝑖‖ 2 , 𝐺𝑡 def= 1𝑛 ∑︀𝑛 𝑖=1 𝐺 𝑡 𝑖 following Richtárik et al . ( 2021 ) , where 𝑔𝑡𝑖 is an EF21 estimator at a node 𝑖 . Throughout the paper̃︀𝐿2 def= 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , where 𝐿𝑖 is a smoothness constant for 𝑓𝑖 ( · ) , 𝑖 = 1 , . . . , 𝑛 ( see Assumption 1 ) . 8If , additionally , Assumption 4 holds , then 𝑓 inf can be replaced by 𝑓 ( 𝑥⋆ ) for 𝑥⋆ = argmin𝑥∈R𝑑 𝑓 ( 𝑥 ) . C EF21 For completeness , we provide here the detailed proofs for EF21 ( Richtárik et al. , 2021 ) . Algorithm 1 EF21 1 : Input : starting point 𝑥0 ∈ R𝑑 ; 𝑔0𝑖 ∈ R𝑑 for 𝑖 = 1 , . . . , 𝑛 ( known by nodes ) ; 𝑔0 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 0 𝑖 ( known by master ) ; learning rate 𝛾 > 0 2 : for 𝑡 = 0,1 , 2 , . . . , 𝑇 − 1 do 3 : Master computes 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 and broadcasts 𝑥𝑡+1 to all nodes 4 : for all nodes 𝑖 = 1 , . . . , 𝑛 in parallel do 5 : Compress 𝑐𝑡𝑖 = 𝒞 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ) and send 𝑐𝑡𝑖 to the master 6 : Update local state 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 + 𝑐 𝑡 𝑖 7 : end for 8 : Master computes 𝑔𝑡+1 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 𝑡+1 𝑖 via 𝑔 𝑡+1 = 𝑔𝑡 + 1𝑛 ∑︀𝑛 𝑖=1 𝑐 𝑡 𝑖 9 : end for Lemma 1 . Let 𝒞 be a contractive compressor , then for all 𝑖 = 1 , . . . , 𝑛 E [ ︀ 𝐺𝑡+1𝑖 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽𝐿2𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ , and ( 13 ) E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽̃︀𝐿2E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁ , ( 14 ) where 𝜃 def = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 def= ( 1 − 𝛼 ) ( ︀ 1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . Define 𝑊 𝑡 def= { 𝑔𝑡1 , . . . , 𝑔𝑡𝑛 , 𝑥𝑡 , 𝑥𝑡+1 } , then E [ ︀ 𝐺𝑡+1𝑖 ] ︀ = E [ ︀ E [ ︀ 𝐺𝑡+1𝑖 | 𝑊 𝑡 ] ︀ ] ︀ = E [ ︁ E [ ︁⃦⃦ 𝑔𝑡+1𝑖 −∇𝑓𝑖 ( 𝑥 𝑡+1 ) ⃦⃦2 | 𝑊 𝑡 ] ︁ ] ︁ = E [ ︁ E [ ︁⃦⃦ 𝑔𝑡𝑖 + 𝒞 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ) −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 | 𝑊 𝑡 ] ︁ ] ︁ ( 8 ) ≤ ( 1 − 𝛼 ) E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ⃦⃦2 ] ︁ ( 𝑖 ) ≤ ( 1 − 𝛼 ) ( 1 + 𝑠 ) E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑔𝑡𝑖 ⃦⃦2 ] ︁ + ( 1 − 𝛼 ) ( ︀ 1 + 𝑠−1 ) ︀ ⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ( 15 ) ( 𝑖𝑖 ) ≤ ( 1 − 𝛼 ) ( 1 + 𝑠 ) E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑔𝑡𝑖 ⃦⃦2 ] ︁ + ( 1 − 𝛼 ) ( ︀ 1 + 𝑠−1 ) ︀ 𝐿2𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ ( 𝑖𝑖𝑖 ) ≤ ( 1 − 𝜃 ) E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑔𝑡𝑖 ⃦⃦2 ] ︁ + 𝛽𝐿2𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ , where ( 𝑖 ) follows by Young ’ s inequality ( 118 ) , ( 𝑖𝑖 ) holds by Assumption 1 , and in ( 𝑖𝑖𝑖 ) we apply the definition of 𝜃 and 𝛽 . Averaging the above inequalities over 𝑖 = 1 , . . . , 𝑛 , we obtain ( 14 ) . C.1 CONVERGENCE FOR GENERAL NON-CONVEX FUNCTIONS Theorem 1 . Let Assumption 1 hold , and let the stepsize in Algorithm 1 be set as 0 < 𝛾 ≤ ( ︃ 𝐿 + ̃︀𝐿√︂𝛽 𝜃 ) ︃−1 . ( 16 ) Fix 𝑇 ≥ 1 and let ? ̂ ? 𝑇 be chosen from the iterates 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Then E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 2 ( ︀𝑓 ( 𝑥0 ) − 𝑓 inf ) ︀ 𝛾𝑇 + E [ ︀ 𝐺0 ] ︀ 𝜃𝑇 , ( 17 ) where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . According to our notation , for Algorithm 1 𝑅𝑡 = ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . By Lemma 1 , we have E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ . ( 18 ) Next , using Lemma 16 and Jensen ’ s inequality ( 119 ) , we obtain the bound 𝑓 ( 𝑥𝑡+1 ) ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 ⃦⃦⃦⃦ ⃦ 1𝑛 𝑛∑︁ 𝑖=1 ( ︀ 𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ) ︀⃦⃦⃦⃦⃦ 2 ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 1 𝑛 𝑛∑︁ 𝑖=1 ⃦⃦ 𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 = 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 𝐺𝑡 . ( 19 ) Subtracting 𝑓 inf from both sides of the above inequality , taking expectation and using the notation 𝛿𝑡 = 𝑓 ( 𝑥𝑡 ) − 𝑓 inf , we get E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ . ( 20 ) Then by adding ( 20 ) with a 𝛾2𝜃 multiple of ( 18 ) we obtain E [ ︀ 𝛿𝑡+1 ] ︀ + 𝛾 2𝜃 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ + 𝛾 2𝜃 ( ︁ 𝛽̃︀𝐿2E [ ︀𝑅𝑡 ] ︀+ ( 1 − 𝜃 ) E [ ︀𝐺𝑡 ] ︀ ) ︁ = E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 2𝜃 E [ ︀ 𝐺𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ − ( ︂ 1 2𝛾 − 𝐿 2 − 𝛾 2𝜃 𝛽̃︀𝐿2 ) ︂E [ ︀𝑅𝑡 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 2𝜃 E [ ︀ 𝐺𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ . The last inequality follows from the bound 𝛾2 𝛽 ̃︀𝐿2 𝜃 + 𝐿𝛾 ≤ 1 , which holds because of Lemma 15 and our assumption on the stepsize . By summing up inequalities for 𝑡 = 0 , . . . , 𝑇 − 1 , we get 0 ≤ E [ ︁ 𝛿𝑇 + 𝛾 2𝜃 𝐺𝑇 ] ︁ ≤ 𝛿0 + 𝛾 2𝜃 E [ ︀ 𝐺0 ] ︀ − 𝛾 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ . Multiplying both sides by 2𝛾𝑇 , after rearranging we get 𝑇−1∑︁ 𝑡=0 1 𝑇 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2𝛿0 𝛾𝑇 + E [ ︀ 𝐺0 ] ︀ 𝜃𝑇 . It remains to notice that the left hand side can be interpreted as E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ , where ? ̂ ? 𝑇 is chosen from 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Corollary 2 . Let assumptions of Theorem 1 hold , 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = ( ︁ 𝐿 + ̃︀𝐿√︀𝛽/𝜃 ) ︁−1 . Then , after 𝑇 iterations/communication rounds of EF21 we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = # grad = 𝒪 ( ︃ ̃︀𝐿𝛿0 𝛼𝜀2 ) ︃ iterations/communications rounds/gradint computations at each node , where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 𝑖𝑛𝑓 . Proof . Since 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , we have 𝐺0 = 0 and by Theorem 1 # grad = 𝑇 ( 𝑖 ) ≤ 2𝛿 0 𝛾𝜀2 ( 𝑖𝑖 ) ≤ 2𝛿 0 𝜀2 ( ︃ 𝐿 + ̃︀𝐿√︂𝛽 𝜃 ) ︃ ( 𝑖𝑖𝑖 ) ≤ 2𝛿 0 𝜀2 ( ︂ 𝐿 + ̃︀𝐿 ( ︂ 2 𝛼 − 1 ) ︂ ) ︂ ≤ 2𝛿 0 𝜀2 ( ︃ 𝐿 + 2̃︀𝐿 𝛼 ) ︃ ( 𝑖𝑣 ) ≤ 2𝛿 0 𝜀2 ( ︃ ̃︀𝐿 𝛼 + 2̃︀𝐿 𝛼 ) ︃ = 6̃︀𝐿𝛿0 𝛼𝜀2 , where in ( 𝑖 ) is due to the rate ( 17 ) given by Theorem 1 . In two ( 𝑖𝑖 ) we plug in the stepsize , in ( 𝑖𝑖𝑖 ) we use Lemma 17 , and ( 𝑖𝑣 ) follows by the inequalities 𝛼 ≤ 1 , and 𝐿 ≤ ̃︀𝐿 . C.2 CONVERGENCE UNDER POLYAK-ŁOJASIEWICZ CONDITION Theorem 2 . Let Assumptions 1 and 4 hold , and let the stepsize in Algorithm 1 be set as 0 < 𝛾 ≤ min ⎧⎨⎩ ( ︃ 𝐿 + ̃︀𝐿√︂2𝛽 𝜃 ) ︃−1 , 𝜃 2𝜇 ⎫⎬⎭ . ( 21 ) Let Ψ𝑡 def = 𝑓 ( 𝑥𝑡 ) − 𝑓 ( 𝑥⋆ ) + 𝛾𝜃𝐺 𝑡 . Then for any 𝑇 ≥ 0 , we have E [ ︀ Ψ𝑇 ] ︀ ≤ ( 1 − 𝛾𝜇 ) 𝑇E [ ︀ Ψ0 ] ︀ , ( 22 ) where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . We proceed as in the previous proof , but use the PL inequality , subtract 𝑓 ( 𝑥⋆ ) from both sides of ( 19 ) and utilize the notation 𝛿𝑡 = 𝑓 ( 𝑥𝑡 ) − 𝑓 ( 𝑥⋆ ) 𝛿𝑡+1 ≤ 𝛿𝑡 − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 𝐺𝑡 ≤ 𝛿𝑡 − 𝛾𝜇 ( ︀ 𝑓 ( 𝑥𝑡 ) − 𝑓 ( 𝑥⋆ ) ) ︀ − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 𝐺𝑡 . = ( 1 − 𝛾𝜇 ) 𝛿𝑡 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 𝐺𝑡 . Take expectation on both sides of the above inequality and add it with a 𝛾𝜃 multiple of ( 18 ) , then E [ ︀ 𝛿𝑡+1 ] ︀ + E [ ︁𝛾 𝜃 𝐺𝑡+1 ] ︁ ≤ ( 1 − 𝛾𝜇 ) E [ ︀ 𝛿𝑡 ] ︀ − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ + 𝛾 𝜃 ( ︁ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ ) ︁ = ( 1 − 𝛾𝜇 ) E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 𝜃 ( ︂ 1 − 𝜃 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ − ( ︃ 1 2𝛾 − 𝐿 2 − 𝛽 ̃︀𝐿2𝛾 𝜃 ) ︃ E [ ︀ 𝑅𝑡 ] ︀ . Note that our assumption on the stepsize implies that 1 − 𝜃2 ≤ 1 − 𝛾𝜇 and 1 2𝛾 − 𝐿 2 − 𝛽̃︀𝐿2𝛾 𝜃 ≥ 0 . The last inequality follows from the bound 𝛾2 2𝛽 ̃︀𝐿2 𝜃 + 𝛾𝐿 ≤ 1 , which holds because of Lemma 15 and our assumption on the stepsize . Thus , E [ ︁ 𝛿𝑡+1 + 𝛾 𝜃 𝐺𝑡+1 ] ︁ ≤ ( 1 − 𝛾𝜇 ) E [ ︁ 𝛿𝑡 + 𝛾 𝜃 𝐺𝑡 ] ︁ . It remains to unroll the recurrence . Corollary 3 . Let assumptions of Theorem 2 hold , 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = min ⎧⎨⎩ ( ︃ 𝐿 + ̃︀𝐿√︂2𝛽 𝜃 ) ︃−1 , 𝜃 2𝜇 ⎫⎬⎭ . Then , after 𝑇 iterations/communication rounds of EF21 we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 ( 𝑥⋆ ) ] ︀ ≤ 𝜀 . It requires 𝑇 = # grad = 𝒪 ( ︃ ̃︀𝐿 𝛼𝜇 log ( ︂ 𝛿0 𝜀 ) ︂ ) ︃ ( 23 ) iterations/communications rounds/gradint computations at each node , where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 𝑖𝑛𝑓 . Proof . Notice that min ⎧⎨⎩ ( ︃ 𝐿 + ̃︀𝐿√︂2𝛽 𝜃 ) ︃−1 , 𝜃 2𝜇 ⎫⎬⎭𝜇 ( 𝑖 ) ≥ min { ︃ 𝜇 ( ︂ 𝐿 + ̃︀𝐿√2 ( ︂ 2 𝛼 − 1 ) ︂ ) ︂−1 , 1 − √ 1 − 𝛼 2 } ︃ ( 𝑖𝑖 ) ≥ min ⎧⎨⎩𝜇 ( ︃ 𝐿 + 2 √ 2̃︀𝐿 𝛼 ) ︃−1 , 𝛼 4 ⎫⎬⎭ ( 𝑖𝑖𝑖 ) ≥ min ⎧⎨⎩𝜇 ( ︃ ( 1 + 2 √ 2 ) ̃︀𝐿 𝛼 ) ︃−1 , 𝛼 4 ⎫⎬⎭ = min { ︃ 𝛼𝜇 ( 1 + 2 √ 2 ) ̃︀𝐿 , 𝛼4 } ︃ ≥ min { ︂ 𝛼𝜇 4̃︀𝐿 , 𝛼4 } ︂ = 𝛼𝜇 4̃︀𝐿 , where in ( 𝑖 ) we apply Lemma 17 , and plug in 𝜃 = 1 − √ 1 − 𝛼 according to Lemma 17 , ( 𝑖𝑖 ) follows by √ 1 − 𝛼 ≤ 1 − 𝛼/2 , ( 𝑖𝑖𝑖 ) follows by the inequalities 𝛼 ≤ 1 , and 𝐿 ≤ ̃︀𝐿 . Let 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , then 𝐺0 = 0 . Thus using ( 22 ) and the above computations , we arrive at # grad = 𝑇≤ log ( ︁ 𝛿0 𝜀 ) ︁ log ( 1 − 𝛾𝜇 ) −1 ( 𝑖 ) ≤ 1 𝛾𝜇 log ( ︂ 𝛿0 𝜀 ) ︂ ≤ 4 ̃︀𝐿 𝛼𝜇 log ( ︂ 𝛿0 𝜀 ) ︂ , where ( 𝑖 ) is due to ( 122 ) . D STOCHASTIC GRADIENTS In this section , we study the extension of EF21 to the case when stochastic gradients are used instead of full gradients . Algorithm 2 EF21-SGD 1 : Input : starting point 𝑥0 ∈ R𝑑 ; 𝑔0𝑖 ∈ R𝑑 ( known by nodes ) ; 𝑔0 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 0 𝑖 ( known by master ) ; learning rate 𝛾 > 0 2 : for 𝑡 = 0,1 , 2 , . . . , 𝑇 − 1 do 3 : Master computes 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 and broadcasts 𝑥𝑡+1 to all nodes 4 : for all nodes 𝑖 = 1 , . . . , 𝑛 in parallel do 5 : Compute a stochastic gradient 𝑔𝑖 ( 𝑥𝑡+1 ) = 1𝜏 ∑︀𝜏 𝑗=1 ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡+1 ) 6 : Compress 𝑐𝑡𝑖 = 𝒞 ( 𝑔𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ) and send 𝑐𝑡𝑖 to the master 7 : Update local state 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 + 𝑐 𝑡 𝑖 8 : end for 9 : Master computes 𝑔𝑡+1 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 𝑡+1 𝑖 via 𝑔 𝑡+1 = 𝑔𝑡 + 1𝑛 ∑︀𝑛 𝑖=1 𝑐 𝑡 𝑖 10 : end for Lemma 2 . Let Assumptions 1 and 2 hold . Then for all 𝑡 ≥ 0 and all constants 𝜌 , 𝜈 > 0 EF21-SGD satisfies E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽1̃︀𝐿2E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁ + ̃︀𝐴𝛽2E [ ︀𝑓 ( 𝑥𝑡+1 ) − 𝑓 inf ] ︀+ ̃︀𝐶𝛽2 , ( 24 ) where 𝜃 def = 1 − ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( 1 + 𝜈 ) , 𝛽1 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ , 𝛽2 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ + ( ︁ 1 + 1𝜌 ) ︁ , ̃︀𝐴 = max𝑖=1 , ... , 𝑛 2 ( 𝐴𝑖+𝐿𝑖 ( 𝐵𝑖−1 ) ) 𝜏𝑖 , ̃︀𝐶 = 1𝑛 𝑛∑︀ 𝑖=1 ( ︁ 2 ( 𝐴𝑖+𝐿𝑖 ( 𝐵𝑖−1 ) ) 𝜏𝑖 ( ︀ 𝑓 inf − 𝑓 inf𝑖 ) ︀ + 𝐶𝑖𝜏𝑖 ) ︁ . Proof . For all 𝜌 , 𝜈 > 0 we have E [ ︀ 𝐺𝑡+1𝑖 ] ︀ = E [ ︁⃦⃦ 𝑔𝑡+1𝑖 −∇𝑓𝑖 ( 𝑥 𝑡+1 ) ⃦⃦2 ] ︁ ≤ ( 1 + 𝜌 ) E [ ︁⃦⃦ 𝒞 ( ︀ 𝑔𝑖 ( 𝑥 𝑡+1 ) − 𝑔𝑡𝑖 ) ︀ − ( ︀ 𝑔𝑖 ( 𝑥 𝑡+1 ) − 𝑔𝑡𝑖 ) ︀⃦⃦2 ] ︁ + ( ︂ 1 + 1 𝜌 ) ︂ E [ ︁⃦⃦ 𝑔𝑖 ( 𝑥 𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ ≤ ( 1 − 𝛼 ) ( 1 + 𝜌 ) E [ ︁⃦⃦ 𝑔𝑡𝑖 − 𝑔𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ + ( ︂ 1 + 1 𝜌 ) ︂ E [ ︁⃦⃦ 𝑔𝑖 ( 𝑥 𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ ≤ ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( 1 + 𝜈 ) E [ ︁⃦⃦ 𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ +2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︂ 1 + 1 𝜈 ) ︂ E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ +2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︂ 1 + 1 𝜈 ) ︂ E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ + ( ︂ 1 + 1 𝜌 ) ︂ E [ ︁⃦⃦ 𝑔𝑖 ( 𝑥 𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽1𝐿 2 𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ +𝛽2E [ ︁⃦⃦ 𝑔𝑖 ( 𝑥 𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ , where we introduced 𝜃 def= 1 − ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( 1 + 𝜈 ) , 𝛽1 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ , 𝛽2 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ + ( ︁ 1 + 1𝜌 ) ︁ . Next we use independence of ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡 ) , variance decomposition , and ( 9 ) to estimate the last term : E [ ︀ 𝐺𝑡+1𝑖 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽1𝐿 2 𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 𝛽2 𝜏2𝑖 𝜏𝑖∑︁ 𝑗=1 E [ ︂⃦⃦⃦ ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦⃦2 ] ︂ = ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽1𝐿 2 𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 𝛽2 𝜏2𝑖 𝜏𝑖∑︁ 𝑗=1 ( ︂ E [ ︂⃦⃦⃦ ∇𝑓𝜉𝑡𝑖𝑗 ( 𝑥 𝑡+1 ) ⃦⃦⃦2 ] ︂ − E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ ) ︂ ( 9 ) ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽1𝐿 2 𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 2𝐴𝑖𝛽2 𝜏𝑖 E [ ︀ 𝑓𝑖 ( 𝑥 𝑡+1 ) − 𝑓 inf𝑖 ] ︀ + 𝛽2 ( 𝐵𝑖 − 1 ) 𝜏𝑖 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ + 𝐶𝑖𝛽2 𝜏𝑖 ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽1𝐿 2 𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 2 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝛽2 𝜏𝑖 E [ ︀ 𝑓𝑖 ( 𝑥 𝑡+1 ) − 𝑓 inf𝑖 ] ︀ + 𝐶𝑖𝛽2 𝜏𝑖 Averaging the obtained inequality for 𝑖 = 1 , . . . , 𝑛 we get E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽1̃︀𝐿2E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁ + 1 𝑛 𝑛∑︁ 𝑖=1 ( ︃ 2 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝛽2 𝜏𝑖 E [ ︀ 𝑓𝑖 ( 𝑥 𝑡+1 ) − 𝑓 inf𝑖 ] ︀ + 𝐶𝑖𝛽2 𝜏𝑖 ) ︃ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽1̃︀𝐿2E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁ + 1 𝑛 𝑛∑︁ 𝑖=1 ( ︃ 2 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝛽2 𝜏𝑖 E [ ︀ 𝑓𝑖 ( 𝑥 𝑡+1 ) − 𝑓 inf ] ︀ ) ︃ + 𝛽2 𝑛 𝑛∑︁ 𝑖=1 ( ︂ 2 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝜏𝑖 ( ︀ 𝑓 inf − 𝑓 inf𝑖 ) ︀ + 𝐶𝑖 𝜏𝑖 ) ︂ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽1̃︀𝐿2E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁+ ̃︀𝐴𝛽2E [ ︀𝑓 ( 𝑥𝑡+1 ) − 𝑓 inf ] ︀+ ̃︀𝐶𝛽2 D.1 CONVERGENCE FOR GENERAL NON-CONVEX FUNCTIONS Theorem 3 . Let Assumptions 1 and 2 hold , and let the stepsize in Algorithm 2 be set as 0 < 𝛾 ≤ ⎛⎝𝐿 + ̃︀𝐿 √︃ 𝛽1 𝜃 ⎞⎠−1 , ( 25 ) where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 def= 1 − ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( 1 + 𝜈 ) , 𝛽1 def= 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀1 + 1𝜈 ) ︀ , and 𝜌 , 𝜈 > 0 are some positive numbers . Assume that batchsizes 𝜏1 , . . . , 𝜏𝑖 are such that 𝛾 ̃︀𝐴𝛽2 2𝜃 < 1 , wherẽ︀𝐴 = max𝑖=1 , ... , 𝑛 2 ( 𝐴𝑖+𝐿𝑖 ( 𝐵𝑖−1 ) ) 𝜏𝑖 and 𝛽2 def= 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀1 + 1𝜈 ) ︀+ ( ︁1 + 1𝜌 ) ︁ . Fix 𝑇 ≥ 1 and let ? ̂ ? 𝑇 be chosen from the iterates 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 with following probabilities : Prob { ︀ ? ̂ ? 𝑇 = 𝑥𝑡 } ︀ = 𝑤𝑡 𝑊𝑇 , 𝑤𝑡 = ( ︃ 1 − 𝛾 ̃︀𝐴𝛽2 2𝜃 ) ︃𝑡 , 𝑊𝑇 = 𝑇∑︁ 𝑡=0 𝑤𝑡 . Then E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 2 ( 𝑓 ( 𝑥0 ) − 𝑓 inf ) 𝛾𝑇 ( ︁ 1 − 𝛾 ̃︀𝐴𝛽2 2𝜃 ) ︁𝑇 + E [ ︀ 𝐺0 ] ︀ 𝜃𝑇 ( ︁ 1 − 𝛾 ̃︀𝐴𝛽2 2𝜃 ) ︁𝑇 + ̃︀𝐶𝛽2𝜃 , ( 26 ) where ̃︀𝐶 = 1𝑛 𝑛∑︀ 𝑖=1 ( ︁ 2 ( 𝐴𝑖+𝐿𝑖 ( 𝐵𝑖−1 ) ) 𝜏𝑖 ( ︀ 𝑓 inf − 𝑓 inf𝑖 ) ︀ + 𝐶𝑖𝜏𝑖 ) ︁ . Proof . We notice that inequality ( 20 ) holds for EF21-SGD as well , i.e. , we have E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ . Summing up the above inequality with a 𝛾 2𝜃 multiple of ( 24 ) , we derive E [ ︂ 𝛿𝑡+1 + 𝛾 2𝜃 𝐺𝑡+1 ] ︂ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ + 𝛾 2𝜃 ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛾 2𝜃 𝛽1̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ + 𝛾 2𝜃 ̃︀𝐴𝛽2E [ ︀𝛿𝑡+1 ] ︀+ 𝛾 2𝜃 ̃︀𝐶𝛽2 ≤ 𝛾 ̃︀𝐴𝛽2 2𝜃 E [ ︀ 𝛿𝑡+1 ] ︀ + E [ ︂ 𝛿𝑡 + 𝛾 2𝜃 𝐺𝑡 ] ︂ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ + 𝛾 2𝜃 ̃︀𝐶𝛽2 − ( ︃ 1 2𝛾 − 𝐿 2 − 𝛾𝛽1 ̃︀𝐿2 2𝜃 ) ︃ E [ ︀ 𝑅𝑡 ] ︀ ( 25 ) ≤ 𝛾 ̃︀𝐴𝛽2 2𝜃 E [ ︀ 𝛿𝑡+1 ] ︀ + E [ ︂ 𝛿𝑡 + 𝛾 2𝜃 𝐺𝑡 ] ︂ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ + 𝛾 2𝜃 ̃︀𝐶𝛽2 , where 𝜃 def= 1 − ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( 1 + 𝜈 ) , 𝛽1 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ , 𝛽2 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ + ( ︁ 1 + 1𝜌 ) ︁ , and 𝜌 , 𝜈 > 0 are some positive numbers . Next , we rearrange the terms E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2 𝛾 ( ︃ E [ ︂ 𝛿𝑡 + 𝛾 2𝜃 𝐺𝑡 ] ︂ − ( ︃ 1 − 𝛾 ̃︀𝐴𝛽2 2𝜃 ) ︃ E [ ︀ 𝛿𝑡+1 ] ︀ − 𝛾 2𝜃 E [ ︀ 𝐺𝑡+1 ] ︀ ) ︃ + ̃︀𝐶𝛽2 𝜃 ≤ 2 𝛾 ( ︃ E [ ︂ 𝛿𝑡 + 𝛾 2𝜃 𝐺𝑡 ] ︂ − ( ︃ 1 − 𝛾 ̃︀𝐴𝛽2 2𝜃 ) ︃ E [ ︂ 𝛿𝑡+1 + 𝛾 2𝜃 E [ ︀ 𝐺𝑡+1 ] ︀ ] ︂ ) ︃ + ̃︀𝐶𝛽2 𝜃 , sum up the obtained inequalities for 𝑡 = 0,1 , . . . , 𝑇 with weights 𝑤𝑡/𝑊𝑇 , and use the definition of ? ̂ ? 𝑇 E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ = 1 𝑊𝐾 𝑇∑︁ 𝑡=0 𝑤𝑡E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2 𝛾𝑊𝑇 𝑇∑︁ 𝑡=0 ( ︂ 𝑤𝑡E [ ︂ 𝛿𝑡 + 𝛾 2𝜃 𝐺𝑡 ] ︂ − 𝑤𝑡+1E [ ︂ 𝛿𝑡+1 + 𝛾 2𝜃 E [ ︀ 𝐺𝑡+1 ] ︀ ] ︂ ) ︂ + ̃︀𝐶𝛽2 𝜃 ≤ 2𝛿 0 𝛾𝑊𝑇 + E [ ︀ 𝐺0 ] ︀ 𝜃𝑊𝑇 + ̃︀𝐶𝛽2 𝜃 . Finally , we notice 𝑊𝑇 = 𝑇∑︁ 𝑡=0 𝑤𝑡 ≥ ( 𝑇 + 1 ) min 𝑡=0,1 , ... , 𝑇 𝑤𝑡 > 𝑇 ( ︃ 1 − 𝛾 ̃︀𝐴𝛽2 2𝜃 ) ︃𝑇 that finishes the proof . Corollary 4 . Let assumptions of Theorem 3 hold , 𝜌 = 𝛼/2 , 𝜈 = 𝛼/4 , 𝛾 = 1 𝐿 + ̃︀𝐿√︁𝛽1 𝜃 , 𝜏𝑖 = ⌈︃ max { ︃ 1 , 2𝑇𝛾 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝛽2 𝜃 , 8 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝛽2 𝜃𝜀2 𝛿inf𝑖 , 4𝐶𝑖𝛽2 𝜃𝜀2 } ︃⌉︃ , 𝑇 = ⌈︃ max { ︃ 16𝛿0 𝛾𝜀2 , 8E [ ︀ 𝐺0 ] ︀ 𝜃𝜀2 } ︃⌉︃ , where 𝛿inf𝑖 = 𝑓 inf − 𝑓 inf𝑖 , 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 inf . Then , after 𝑇 iterations of EF21-SGD we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = 𝒪 ( ︃ ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 ) ︃ iterations/communications rounds , # grad𝑖 = 𝜏𝑖𝑇 = 𝒪 ( ︃ ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 + ( ︁̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) ︁ ( ︁𝐴𝑖 ( 𝛿0 + 𝛿inf𝑖 ) + 𝐶𝑖 ) ︁ 𝛼3𝜀4 + ( ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) 𝐴𝑖E [ ︀𝐺0 ] ︀ 𝛼2 ( 𝛼𝐿 + ̃︀𝐿 ) 𝜀4 ) ︃ stochastic oracle calls for worker 𝑖 , and # grad = 1 𝑛 𝑛∑︁ 𝑖=1 𝜏𝑖𝑇 = 𝒪 ( ︃ ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 + 1 𝑛 𝑛∑︁ 𝑖=1 ( ︁̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) ︁ ( ︁𝐴𝑖 ( 𝛿0 + 𝛿inf𝑖 ) + 𝐶𝑖 ) ︁ 𝛼3𝜀4 + 1 𝑛 𝑛∑︁ 𝑖=1 ( ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) 𝐴𝑖E [ ︀𝐺0 ] ︀ 𝛼2 ( 𝛼𝐿 + ̃︀𝐿 ) 𝜀4 ) ︃ stochastic oracle calls per worker on average , where 𝐴𝑖 = 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) . Proof . The given choice of 𝜏𝑖 ensures that ( ︁ 1 − 𝛾 ̃︀𝐴𝛽2 2𝜃 ) ︁𝑇 = 𝒪 ( 1 ) and ̃︀𝐶𝛽2/𝜃 ≤ 𝜀/2 . Next , the choice of 𝑇 ensures that the right-hand side of ( 26 ) is smaller than 𝜀 . Finally , after simple computation we get the expression for 𝜏𝑖𝑇 . Corollary 5 . Consider the setting described in Example 1 . Let assumptions of Theorem 3 hold , 𝜌 = 𝛼/2 , 𝜈 = 𝛼/4 , 𝛾 = 1 𝐿 + ̃︀𝐿√︁𝛽1 𝜃 , 𝜏𝑖 = ⌈︃ max { ︃ 1 , 4𝜎2𝑖 𝛽2 𝜃𝜀2 } ︃⌉︃ , 𝑇 = ⌈︃ max { ︃ 16𝛿0 𝛾𝜀2 , 8E [ ︀ 𝐺0 ] ︀ 𝜃𝜀2 } ︃⌉︃ , where 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 inf . Then , after 𝑇 iterations of EF21-SGD we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = 𝒪 ( ︃ ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 ) ︃ iterations/communications rounds , # grad𝑖 = 𝜏𝑖𝑇 = 𝒪 ⎛⎝̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 + ( ︁̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) ︁𝜎2𝑖 𝛼3𝜀4 ⎞⎠ stochastic oracle calls for worker 𝑖 , and # grad = 1 𝑛 𝑛∑︁ 𝑖=1 𝜏𝑖𝑇 = 𝒪 ⎛⎝̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 + ( ︁̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) ︁𝜎2 𝛼3𝜀4 ⎞⎠ stochastic oracle calls per worker on average , where 𝜎2 = 1𝑛 ∑︀𝑛 𝑖=1 𝜎 2 𝑖 . Corollary 6 . Consider the setting described in Example 2 . Let assumptions of Theorem 3 hold , 𝜌 = 𝛼/2 , 𝜈 = 𝛼/4 , 𝛾 = 1 𝐿 + ̃︀𝐿√︁𝛽1 𝜃 , 𝜏𝑖 = ⌈︃ max { ︃ 1 , 2𝑇𝛾𝐿𝑖𝛽2 𝜃 , 8𝐿𝑖𝛽2 𝜃𝜀2 𝛿inf𝑖 , 8𝐿𝑖∆ inf 𝑖 𝛽2 𝜃𝜀2 } ︃⌉︃ , 𝑇 = ⌈︃ max { ︃ 16𝛿0 𝛾𝜀2 , 8E [ ︀ 𝐺0 ] ︀ 𝜃𝜀2 } ︃⌉︃ , where 𝛿inf𝑖 = 𝑓 inf − 𝑓 inf𝑖 , 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 inf , 𝐿𝑖 = 1𝑚𝑖 ∑︀𝑚𝑖 𝑗=1 𝐿𝑖𝑗 , ∆ inf 𝑖 = 1 𝑚𝑖 ∑︀𝑚𝑖 𝑗=1 ( 𝑓 inf 𝑖 − 𝑓 inf𝑖𝑗 ) . Then , after 𝑇 iterations of EF21-SGD we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = 𝒪 ( ︃ ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 ) ︃ iterations/communications rounds , # grad𝑖 = 𝜏𝑖𝑇 = 𝒪 ( ︃ ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 + ( ︁̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) ︁ ( ︀𝐿𝑖 ( 𝛿0 + 𝛿inf𝑖 ) + 𝐿𝑖∆inf𝑖 ) ︀ 𝛼3𝜀4 + ( ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) 𝐿𝑖E [ ︀𝐺0 ] ︀ 𝛼2 ( 𝛼𝐿 + ̃︀𝐿 ) 𝜀4 ) ︃ stochastic oracle calls for worker 𝑖 , and # grad = 1 𝑛 𝑛∑︁ 𝑖=1 𝜏𝑖𝑇 = 𝒪 ( ︃ ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ 𝛼𝜀2 + 1 𝑛 𝑛∑︁ 𝑖=1 ( ︁̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) ︁ ( ︀𝐿𝑖 ( 𝛿0 + 𝛿inf𝑖 ) + 𝐿𝑖∆inf𝑖 ) ︀ 𝛼3𝜀4 + 1 𝑛 𝑛∑︁ 𝑖=1 ( ̃︀𝐿𝛿0 + E [ ︀𝐺0 ] ︀ ) 𝐿𝑖E [ ︀𝐺0 ] ︀ 𝛼2 ( 𝛼𝐿 + ̃︀𝐿 ) 𝜀4 ) ︃ stochastic oracle calls per worker on average . D.2 CONVERGENCE UNDER POLYAK-ŁOJASIEWICZ CONDITION Theorem 4 . Let Assumptions 1 , 2 , and 4 hold , and let the stepsize in Algorithm 2 be set as 0 < 𝛾 ≤ min ⎧⎪⎨⎪⎩ ⎛⎝𝐿 + ̃︀𝐿 √︃ 2𝛽1 𝜃 ⎞⎠−1 , 𝜃 2𝜇 ⎫⎪⎬⎪⎭ , ( 27 ) where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 def= 1 − ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( 1 + 𝜈 ) , 𝛽1 def= 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀1 + 1𝜈 ) ︀ , and 𝜌 , 𝜈 > 0 are some positive numbers . Assume that batchsizes 𝜏1 , . . . , 𝜏𝑖 are such that 2 ̃︀𝐴𝛽2 𝜃 ≤ 𝜇2 , where ̃︀𝐴 = max𝑖=1 , ... , 𝑛 2 ( 𝐴𝑖+𝐿𝑖 ( 𝐵𝑖−1 ) ) 𝜏𝑖 and 𝛽2 def= 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀1 + 1𝜈 ) ︀+ ( ︁1 + 1𝜌 ) ︁ . Then for all 𝑇 ≥ 1 E [ ︂ 𝛿𝑇 + 𝛾 𝜃 𝐺𝑇 ] ︂ ≤ ( ︁ 1 − 𝛾𝜇 2 ) ︁𝑇 E [ ︂ 𝛿0 + 𝛾 𝜃 𝐺0 ] ︂ + 4 𝜇𝜃 ̃︀𝐶𝛽2 , ( 28 ) where ̃︀𝐶 = 1𝑛 𝑛∑︀ 𝑖=1 ( ︁ 2 ( 𝐴𝑖+𝐿𝑖 ( 𝐵𝑖−1 ) ) 𝜏𝑖 ( ︀ 𝑓 inf − 𝑓 inf𝑖 ) ︀ + 𝐶𝑖𝜏𝑖 ) ︁ . Proof . We notice that inequality ( 20 ) holds for EF21-SGD as well , i.e. , we have E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ PŁ ≤ ( 1 − 𝛾𝜇 ) E [ ︀ 𝛿𝑡 ] ︀ − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ . Summing up the above inequality with a 𝛾 𝜃 multiple of ( 24 ) , we derive E [ ︂ 𝛿𝑡+1 + 𝛾 𝜃 𝐺𝑡+1 ] ︂ ≤ ( 1 − 𝛾𝜇 ) E [ ︀ 𝛿𝑡 ] ︀ − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ + 𝛾 𝜃 ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛾 𝜃 𝛽1̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ + 𝛾 𝜃 ̃︀𝐴𝛽2E [ ︀𝛿𝑡+1 ] ︀+ 𝛾 𝜃 ̃︀𝐶𝛽2 ≤ 𝛾 ̃︀𝐴𝛽2 𝜃 E [ ︀ 𝛿𝑡+1 ] ︀ + ( 1 − 𝛾𝜇 ) E [ ︀ 𝛿𝑡 ] ︀ + ( ︃ 1 − 𝜃 2 ) ︃ E [ ︂ 𝛾 𝜃 𝐺𝑡 ] ︂ + 𝛾 𝜃 ̃︀𝐶𝛽2 − ( ︃ 1 2𝛾 − 𝐿 2 − 𝛾𝛽1 ̃︀𝐿2 𝜃 ) ︃ E [ ︀ 𝑅𝑡 ] ︀ ( 27 ) ≤ 𝛾 ̃︀𝐴𝛽2 𝜃 E [ ︀ 𝛿𝑡+1 ] ︀ + ( 1 − 𝛾𝜇 ) E [ ︂ 𝛿𝑡 + 𝛾 𝜃 𝐺𝑡 ] ︂ + 𝛾 𝜃 ̃︀𝐶𝛽2 , where 𝜃 def= 1 − ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( 1 + 𝜈 ) , 𝛽1 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ , 𝛽2 def = 2 ( 1 − 𝛼 ) ( 1 + 𝜌 ) ( ︀ 1 + 1𝜈 ) ︀ + ( ︁ 1 + 1𝜌 ) ︁ , and 𝜌 , 𝜈 > 0 are some positive numbers . Next , we rearrange the terms ( ︃ 1 − 𝛾 ̃︀𝐴𝛽2 𝜃 ) ︃ E [ ︂ 𝛿𝑡+1 + 𝛾 𝜃 𝐺𝑡+1 ] ︂ ≤ E [ ︃ ( ︃ 1 − 𝛾 ̃︀𝐴𝛽2 𝜃 ) ︃ 𝛿𝑡+1 + 𝛾 𝜃 𝐺𝑡+1 ] ︃ ≤ ( 1 − 𝛾𝜇 ) E [ ︂ 𝛿𝑡 + 𝛾 𝜃 𝐺𝑡 ] ︂ + 𝛾 𝜃 ̃︀𝐶𝛽2 and divide both sides of the inequality by ( ︁ 1 − 𝛾 ̃︀𝐴𝛽2 𝜃 ) ︁ : E [ ︂ 𝛿𝑡+1 + 𝛾 𝜃 𝐺𝑡+1 ] ︂ ≤ 1 − 𝛾𝜇 1 − 𝛾 ̃︀𝐴𝛽2 𝜃 E [ ︂ 𝛿𝑡 + 𝛾 𝜃 𝐺𝑡 ] ︂ + 𝛾 𝜃 ( ︁ 1 − 𝛾 ̃︀𝐴𝛽2 𝜃 ) ︁ ̃︀𝐶𝛽2 ( 120 ) ≤ ( 1 − 𝛾𝜇 ) ( ︃ 1 + 2𝛾 ̃︀𝐴𝛽2 𝜃 ) ︃ E [ ︂ 𝛿𝑡 + 𝛾 𝜃 𝐺𝑡 ] ︂ + ( ︃ 1 + 2𝛾 ̃︀𝐴𝛽2 𝜃 ) ︃ 𝛾 𝜃 ̃︀𝐶𝛽2 . Since 2 ̃︀𝐴𝛽2 𝜃 ≤ 𝜇2 and 𝛾 ≤ 2 𝜇 , we have E [ ︂ 𝛿𝑡+1 + 𝛾 𝜃 𝐺𝑡+1 ] ︂ ≤ ( 1 − 𝛾𝜇 ) ( ︁ 1 + 𝛾𝜇 2 ) ︁ E [ ︂ 𝛿𝑡 + 𝛾 𝜃 𝐺𝑡 ] ︂ + 2𝛾 𝜃 ̃︀𝐶𝛽2 ( 121 ) ≤ ( ︁ 1 − 𝛾𝜇 2 ) ︁ E [ ︂ 𝛿𝑡 + 𝛾 𝜃 𝐺𝑡 ] ︂ + 2𝛾 𝜃 ̃︀𝐶𝛽2 . Unrolling the recurrence , we get E [ ︂ 𝛿𝑇 + 𝛾 𝜃 𝐺𝑇 ] ︂ ≤ ( ︁ 1 − 𝛾𝜇 2 ) ︁𝑇 E [ ︂ 𝛿0 + 𝛾 𝜃 𝐺0 ] ︂ + 2𝛾 𝜃 ̃︀𝐶𝛽2 𝑇−1∑︁ 𝑡=0 ( ︁ 1 − 𝛾𝜇 2 ) ︁𝑡 ≤ ( ︁ 1 − 𝛾𝜇 2 ) ︁𝑇 E [ ︂ 𝛿0 + 𝛾 𝜃 𝐺0 ] ︂ + 2𝛾 𝜃 ̃︀𝐶𝛽2 ∞∑︁ 𝑡=0 ( ︁ 1 − 𝛾𝜇 2 ) ︁𝑡 = ( ︁ 1 − 𝛾𝜇 2 ) ︁𝑇 E [ ︂ 𝛿0 + 𝛾 𝜃 𝐺0 ] ︂ + 4 𝜇𝜃 ̃︀𝐶𝛽2 that finishes the proof . Corollary 7 . Let assumptions of Theorem 4 hold , 𝜌 = 𝛼/2 , 𝜈 = 𝛼/4 , 𝛾 = min ⎧⎨⎩ 1 𝐿 + ̃︀𝐿√︁𝛽1 𝜃 , 𝜃 2𝜇 ⎫⎬⎭ , 𝜏𝑖 = ⌈︃ max { ︃ 1 , 8 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝛽2 𝜇𝜃 , 64 ( 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) ) 𝛽2 𝜃𝜀𝜇 𝛿inf𝑖 , 32𝐶𝑖𝛽2 𝜃𝜀𝜇 } ︃⌉︃ , 𝑇 = ⌈︂ 2 𝛾𝜇 ln ( ︂ 2𝛿0 𝜀 + E [ ︂ 2𝛾𝐺0 𝜃𝜀 ] ︂ ) ︂⌉︂ , where 𝛿inf𝑖 = 𝑓 inf − 𝑓 inf𝑖 , 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 inf . Then , after 𝑇 iterations of EF21-SGD we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 inf ] ︀ ≤ 𝜀 . It requires 𝑇 = 𝒪 ( ︃ ̃︀𝐿 𝜇𝛼 ln ( ︂ 𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂ ) ︃ iterations/communications rounds , # grad𝑖 = 𝜏𝑖𝑇 = 𝒪 ⎛⎝⎛⎝ ̃︀𝐿 𝜇𝛼 + ̃︀𝐿 ( ︁𝐴𝑖 ( 𝜀 + 𝛿inf𝑖 ) + 𝐶𝑖 ) ︁ 𝜇2𝛼3𝜀 ⎞⎠ ln ( ︂𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂⎞⎠ stochastic oracle calls for worker 𝑖 , and # grad = 1 𝑛 𝑛∑︁ 𝑖=1 𝜏𝑖𝑇 = 𝒪 ⎛⎝⎛⎝ ̃︀𝐿 𝜇𝛼 + 1 𝑛 𝑛∑︁ 𝑖=1 ̃︀𝐿 ( ︁𝐴𝑖 ( 𝜀 + 𝛿inf𝑖 ) + 𝐶𝑖 ) ︁ 𝜇2𝛼3𝜀 ⎞⎠ ln ( ︂𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂⎞⎠ stochastic oracle calls per worker on average , where 𝐴𝑖 = 𝐴𝑖 + 𝐿𝑖 ( 𝐵𝑖 − 1 ) . Proof . The given choice of 𝜏𝑖 ensures that 2 ̃︀𝐴𝛽2 𝜃 ≤ 𝜇2 and 4 ̃︀𝐶𝛽2/𝜇𝜃 ≤ 𝜀/2 . Next , the choice of 𝑇 ensures that the right-hand side of ( 28 ) is smaller than 𝜀 . Finally , after simple computation we get the expression for 𝜏𝑖𝑇 . Corollary 8 . Consider the setting described in Example 1 . Let assumptions of Theorem 4 hold , 𝜌 = 𝛼/2 , 𝜈 = 𝛼/4 , 𝛾 = min ⎧⎨⎩ 1 𝐿 + ̃︀𝐿√︁𝛽1 𝜃 , 𝜃 2𝜇 ⎫⎬⎭ , 𝜏𝑖 = ⌈︃ max { ︃ 1 , 32𝐶𝑖𝛽2 𝜃𝜀𝜇 } ︃⌉︃ , 𝑇 = ⌈︂ 2 𝛾𝜇 ln ( ︂ 2𝛿0 𝜀 + E [ ︂ 2𝛾𝐺0 𝜃𝜀 ] ︂ ) ︂⌉︂ , where 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 inf . Then , after 𝑇 iterations of EF21-SGD we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 inf ] ︀ ≤ 𝜀 . It requires 𝑇 = 𝒪 ( ︃ ̃︀𝐿 𝜇𝛼 ln ( ︂ 𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂ ) ︃ iterations/communications rounds , # grad𝑖 = 𝜏𝑖𝑇 = 𝒪 ( ︃ ( ︃ ̃︀𝐿 𝜇𝛼 + ̃︀𝐿𝜎2𝑖 𝜇2𝛼3𝜀 ) ︃ ln ( ︂ 𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂ ) ︃ stochastic oracle calls for worker 𝑖 , and # grad = 1 𝑛 𝑛∑︁ 𝑖=1 𝜏𝑖𝑇 = 𝒪 ( ︃ ( ︃ ̃︀𝐿 𝜇𝛼 + ̃︀𝐿𝜎2 𝜇2𝛼3𝜀 ) ︃ ln ( ︂ 𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂ ) ︃ stochastic oracle calls per worker on average , where 𝜎2 = 1𝑛 ∑︀𝑛 𝑖=1 𝜎 2 𝑖 . Corollary 9 . Consider the setting described in Example 2 . Let assumptions of Theorem 4 hold , 𝜌 = 𝛼/2 , 𝜈 = 𝛼/4 , 𝛾 = min ⎧⎨⎩ 1 𝐿 + ̃︀𝐿√︁𝛽1 𝜃 , 𝜃 2𝜇 ⎫⎬⎭ , 𝜏𝑖 = ⌈︃ max { ︃ 1 , 8𝐿𝑖𝛽2 𝜇𝜃 , 64𝐿𝑖𝛽2 𝜃𝜀𝜇 𝛿inf𝑖 , 64𝐿𝑖∆ inf 𝑖 𝛽2 𝜃𝜀𝜇 } ︃⌉︃ , 𝑇 = ⌈︂ 2 𝛾𝜇 ln ( ︂ 2𝛿0 𝜀 + E [ ︂ 2𝛾𝐺0 𝜃𝜀 ] ︂ ) ︂⌉︂ , where 𝛿inf𝑖 = 𝑓 inf − 𝑓 inf𝑖 , 𝛿0 = 𝑓 ( 𝑥0 ) − 𝑓 inf , 𝐿𝑖 = 1𝑚𝑖 ∑︀𝑚𝑖 𝑗=1 𝐿𝑖𝑗 , ∆ inf 𝑖 = 1 𝑚𝑖 ∑︀𝑚𝑖 𝑗=1 ( 𝑓 inf 𝑖 − 𝑓 inf𝑖𝑗 ) . Then , after 𝑇 iterations of EF21-SGD we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 inf ] ︀ ≤ 𝜀 . It requires 𝑇 = 𝒪 ( ︃ ̃︀𝐿 𝜇𝛼 ln ( ︂ 𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂ ) ︃ iterations/communications rounds , # grad𝑖 = 𝜏𝑖𝑇 = 𝒪 ( ︃ ( ︃ ̃︀𝐿 𝜇𝛼 + ̃︀𝐿𝐿𝑖 ( ︀𝜀 + 𝛿inf𝑖 + ∆inf𝑖 ) ︀ 𝜇2𝛼3𝜀 ) ︃ ln ( ︂ 𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂ ) ︃ stochastic oracle calls for worker 𝑖 , and # grad = 1 𝑛 𝑛∑︁ 𝑖=1 𝜏𝑖𝑇 = 𝒪 ( ︃ ( ︃ ̃︀𝐿 𝜇𝛼 + 1 𝑛 𝑛∑︁ 𝑖=1 ̃︀𝐿𝐿𝑖 ( ︀𝜀 + 𝛿inf𝑖 + ∆inf𝑖 ) ︀ 𝜇2𝛼3𝜀 ) ︃ ln ( ︂ 𝛿0 𝜀 + E [ ︂ 2𝐺0̃︀𝐿𝜀 ] ︂ ) ︂ ) ︃ stochastic oracle calls per worker on average . E VARIANCE REDUCTION In this part , we modify the EF21 framework to better handle finite-sum problems with smooth summands . Unlike the online/streaming case where SGD has the optimal complexity ( without additional assumption on the smoothness of stochastic trajectories ) ( Arjevani et al. , 2019 ) , in the finite sum regime , it is well-known that one can hope for convergence to the exact stationary point rather than its neighborhood . To achieve this , variance reduction techniques are instrumental . One approach is to apply a PAGE-estimator ( Li et al. , 2021 ) instead of a random minibatch applied in SGD . Note that PAGE has optimal complexity for nonconvex problems of the form ( 3 ) . With Corollary 10 , we illustrate that this 𝑂 ( 𝑚 + √ 𝑚/𝜀2 ) complexity is recovered for our Algorithm 3 when no compression is applied and 𝑛 = 1 . We show how to combine PAGE estimator with EF21 mechanism and call the new method EF21PAGE . At each step of EF21-PAGE , clients ( nodes ) either compute ( with probability 𝑝 ) full gradients or use a recursive estimator 𝑣𝑡𝑖 + 1 𝜏𝑖 ∑︀ 𝑗∈𝐼𝑡𝑖 ( ︀ ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) ︀ ( with probability 1− 𝑝 ) . Then each client applies a Markov compressor/EF21-estimator and sends the result to the master node . Typically the number of data points 𝑚 is large , and 𝑝 < 1/𝑚 . As a result , computation of full gradients rarely happens during optimization procedure , on average , only once in every 𝑚 iterations . Notice that unlike VR-MARINA ( Gorbunov et al. , 2021 ) , which is a state-of-the-art distributed optimization method designed specifically for unbiased compressors and which also uses PAGEestimator , EF21-PAGE does not require the communication of full ( not compressed ) vectors at all . This is an important property of the algorithm since , in some distributed networks , and especially when 𝑑 is very large , as is the case in modern over-parameterized deep learning , full vector communication is prohibitive . However , unlike the rate of VR-MARINA , the rate of EF21-PAGE does not improve with the growth of 𝑛 . This is not a flaw of our method , but rather an inevitable drawback of the distributed methods that use biased compressions only . Notations for this section . In this section , we use the following additional notations 𝑃 𝑡𝑖 def = ‖∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑣𝑡𝑖‖ 2 , 𝑃 𝑡 def= 1𝑛 ∑︀𝑛 𝑖=1 𝑃 𝑡 𝑖 , 𝑉 𝑡 𝑖 def = ‖𝑣𝑡𝑖 − 𝑔𝑡𝑖‖ 2 , 𝑉 𝑡 def= 1𝑛 ∑︀𝑛 𝑖=1 𝑉 𝑡 𝑖 , where 𝑣 𝑡 𝑖 is a PAGE estimator . Recall that 𝐺𝑡 def= 1𝑛 ∑︀𝑛 𝑖=1 𝐺 𝑡 𝑖 , 𝐺 𝑡 𝑖 def = ‖∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑔𝑡𝑖‖ 2 . The main idea of the analysis in this section is to split the error in two parts 𝐺𝑡𝑖 ≤ 2𝑃 𝑡𝑖 + 2𝑉 𝑡𝑖 , and bound them separetely . Algorithm 3 EF21-PAGE 1 : Input : starting point 𝑥0 ∈ R𝑑 ; 𝑔0𝑖 , 𝑣0𝑖 ∈ R𝑑 for 𝑖 = 1 , . . . , 𝑛 ( known by nodes ) ; 𝑔0 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 0 𝑖 ( known by master ) ; learning rate 𝛾 > 0 ; probabilities 𝑝𝑖 ∈ ( 0,1 ] ; batch-sizes 1 ≤ 𝜏𝑖 ≤ 𝑚𝑖 2 : for 𝑡 = 0,1 , 2 , . . . , 𝑇 − 1 do 3 : Master computes 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 4 : for all nodes 𝑖 = 1 , . . . , 𝑛 in parallel do 5 : Sample 𝑏𝑡𝑖 ∼ Be ( 𝑝𝑖 ) 6 : If 𝑏𝑡𝑖 = 0 , sample a minibatch of data samples 𝐼 𝑡 𝑖 with |𝐼𝑡𝑖 | = 𝜏𝑖 7 : 𝑣𝑡+1𝑖 = ⎧⎨⎩∇𝑓𝑖 ( 𝑥 𝑡+1 ) if 𝑏𝑡𝑖 = 1 , 𝑣𝑡𝑖 + 1 𝜏𝑖 ∑︀ 𝑗∈𝐼𝑡𝑖 ( ︀ ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) ︀ if 𝑏𝑡𝑖 = 0 8 : Compress 𝑐𝑡𝑖 = 𝒞 ( 𝑣 𝑡+1 𝑖 − 𝑔𝑡𝑖 ) and send 𝑐𝑡𝑖 to the master 9 : Update local state 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 + 𝑐 𝑡 𝑖 10 : end for 11 : Master computes 𝑔𝑡+1 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 𝑡+1 𝑖 via 𝑔 𝑡+1 = 𝑔𝑡 + 1𝑛 ∑︀𝑛 𝑖=1 𝑐 𝑡 𝑖 12 : end for 13 : Output : ? ̂ ? 𝑇 chosen uniformly from { 𝑥𝑡 } 𝑡∈ [ 𝑇 ] Lemma 3 . Let Assumption 3 hold , and let 𝑣𝑡+1𝑖 be a PAGE estimator , i. e. for 𝑏𝑡𝑖 ∼ Be ( 𝑝𝑖 ) 𝑣𝑡+1𝑖 = ⎧⎨⎩∇𝑓𝑖 ( 𝑥 𝑡+1 ) if 𝑏𝑡𝑖 = 1 , 𝑣𝑡𝑖 + 1 𝜏𝑖 ∑︀ 𝑗∈𝐼𝑡𝑖 ( ︀ ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) ︀ if 𝑏𝑡𝑖 = 0 , ( 29 ) for all 𝑖 = 1 , . . . , 𝑛 , 𝑡 ≥ 0 . Then E [ ︀ 𝑃 𝑡+1 ] ︀ ≤ ( 1 − 𝑝min ) E [ ︀ 𝑃 𝑡 ] ︀ + ̃︀ℒ2E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁ , ( 30 ) where ̃︀ℒ = 1𝑛 ∑︀𝑛𝑖=1 ( 1−𝑝𝑖 ) ℒ2𝑖𝜏𝑖 , 𝑝min = min𝑖=1 , ... , 𝑛 𝑝𝑖 . Proof . E [ ︀ 𝑃 𝑡+1𝑖 ] ︀ = E [ ︁⃦⃦ 𝑣𝑡+1𝑖 −∇𝑓𝑖 ( 𝑥 𝑡+1 ) ⃦⃦2 ] ︁ = ( 1 − 𝑝𝑖 ) E ⎡⎢⎣ ⃦⃦⃦⃦ ⃦⃦𝑣𝑡𝑖 + 1𝜏𝑖 ∑︁ 𝑗∈𝐼𝑡𝑖 ( ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦⃦⃦ ⃦⃦ 2 ⎤⎥⎦ = ( 1 − 𝑝𝑖 ) E [ ︂⃦⃦⃦ 𝑣𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) + ̃︀∆𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡+1 ) + ∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦⃦2 ] ︂ = ( 1 − 𝑝𝑖 ) E [ ︂⃦⃦⃦ 𝑣𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) + ̃︀∆𝑡𝑖 − ∆𝑡𝑖 ⃦⃦⃦2 ] ︂ ( 𝑖 ) = ( 1 − 𝑝𝑖 ) E [ ︁⃦⃦ 𝑣𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ + ( 1 − 𝑝𝑖 ) E [ ︂⃦⃦⃦ ̃︀∆𝑡𝑖 − ∆𝑡𝑖 ⃦⃦⃦2 ] ︂ ( 𝑖𝑖 ) ≤ ( 1 − 𝑝𝑖 ) E [ ︀ 𝑃 𝑡𝑖 ] ︀ + ( 1 − 𝑝𝑖 ) ℒ2𝑖 𝜏𝑖 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ ≤ ( 1 − 𝑝min ) E [ ︀ 𝑃 𝑡𝑖 ] ︀ + ( 1 − 𝑝𝑖 ) ℒ2𝑖 𝜏𝑖 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ , ( 31 ) where equality ( 𝑖 ) holds because E [ ︁̃︀∆𝑡𝑖 − ∆𝑡𝑖 | 𝑥𝑡 , 𝑥𝑡+1 , 𝑣𝑡𝑖 ] ︁ = 0 , and ( 𝑖𝑖 ) holds by Assumption 3 . It remains to average the above inequality over 𝑖 = 1 , . . . , 𝑛. Lemma 4 . Let Assumptions 1 and 3 hold , let 𝑣𝑡+1𝑖 be a PAGE estimator , i. e. for 𝑏𝑡𝑖 ∼ Be ( 𝑝𝑖 ) and for all 𝑖 = 1 , . . . , 𝑛 , 𝑡 ≥ 0 𝑣𝑡+1𝑖 = ⎧⎨⎩∇𝑓𝑖 ( 𝑥 𝑡+1 ) if 𝑏𝑡𝑖 = 1 , 𝑣𝑡𝑖 + 1 𝜏𝑖 ∑︀ 𝑗∈𝐼𝑡𝑖 ( ︀ ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) ︀ if 𝑏𝑡𝑖 = 0 , ( 32 ) and let 𝑔𝑡+1𝑖 be an EF21 estimator , i. e. 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 + 𝒞 ( 𝑣𝑡+1𝑖 − 𝑔 𝑡 𝑖 ) , 𝑔 0 𝑖 = 𝒞 ( ︀ 𝑣0𝑖 ) ︀ ( 33 ) for all 𝑖 = 1 , . . . , 𝑛 , 𝑡 ≥ 0 . Then E [ ︀ 𝑉 𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡 ] ︀ + 2𝛽𝑝maxE [ ︀ 𝑃 𝑡 ] ︀ + 𝛽 ( ︁ 2̃︀𝐿2 + ̃︀ℒ2 ) ︁E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁ , ( 34 ) where ̃︀ℒ = 1𝑛 ∑︀𝑛𝑖=1 ( 1−𝑝𝑖 ) ℒ2𝑖𝜏𝑖 , 𝑝max = max𝑖=1 , ... , 𝑛 𝑝𝑖 , 𝜃 = 1− ( 1−𝛼 ) ( 1+𝑠 ) , 𝛽 = ( 1−𝛼 ) ( ︀1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . Following the steps in proof of Lemma 1 , but with ∇𝑓𝑖 ( 𝑥𝑡+1 ) and ∇𝑓𝑖 ( 𝑥𝑡 ) being substituted by their estimators 𝑣𝑡+1𝑖 and 𝑣 𝑡 𝑖 , we end up with an analogue of ( 15 ) E [ ︁⃦⃦ 𝑔𝑡+1𝑖 − 𝑣 𝑡+1 𝑖 ⃦⃦2 ] ︁ ≤ ( 1 − 𝜃 ) E [ ︁⃦⃦𝑔𝑡𝑖 − 𝑣𝑡𝑖 ⃦⃦2 ] ︁+ 𝛽E [ ︁⃦⃦𝑣𝑡+1𝑖 − 𝑣𝑡𝑖 ⃦⃦2 ] ︁ , ( 35 ) where 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀ 1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Then E [ ︀ 𝑉 𝑡𝑖 ] ︀ = E [ ︁⃦⃦ 𝑔𝑡+1𝑖 − 𝑣 𝑡+1 𝑖 ⃦⃦2 ] ︁ ( 35 ) ≤ ( 1 − 𝜃 ) E [ ︁⃦⃦ 𝑔𝑡𝑖 − 𝑣𝑡𝑖 ⃦⃦2 ] ︁ + 𝛽E [ ︁⃦⃦ 𝑣𝑡+1𝑖 − 𝑣 𝑡 𝑖 ⃦⃦2 ] ︁ = ( 1 − 𝜃 ) E [ ︁⃦⃦ 𝑔𝑡𝑖 − 𝑣𝑡𝑖 ⃦⃦2 ] ︁ + 𝛽E [ ︁ E [ ︁⃦⃦ 𝑣𝑡+1𝑖 − 𝑣 𝑡 𝑖 ⃦⃦2 | 𝑣𝑡𝑖 , 𝑥𝑡 , 𝑥𝑡+1 ] ︁ ] ︁ ( 𝑖 ) = ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡𝑖 ] ︀ + 𝛽𝑝𝑖E [ ︁⃦⃦ 𝑣𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ +𝛽 ( 1 − 𝑝𝑖 ) E ⎡⎢⎣ ⃦⃦⃦⃦ ⃦⃦ 1𝜏𝑖 ∑︁ 𝑗∈𝐼𝑡𝑖 ( ︀ ∇𝑓𝑖𝑗 ( 𝑥𝑡+1 ) −∇𝑓𝑖𝑗 ( 𝑥𝑡 ) ) ︀⃦⃦⃦⃦⃦⃦ 2 ⎤⎥⎦ = ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡𝑖 ] ︀ + 𝛽𝑝𝑖E [ ︁⃦⃦ 𝑣𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡+1 ) ⃦⃦2 ] ︁ + 𝛽 ( 1 − 𝑝𝑖 ) E [ ︂⃦⃦⃦ ̃︀∆𝑡𝑖 ⃦⃦⃦2 ] ︂ ( 𝑖𝑖 ) = ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡𝑖 ] ︀ + 2𝛽𝑝𝑖E [ ︁⃦⃦ 𝑣𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ +2𝛽𝑝𝑖E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ + 𝛽 ( 1 − 𝑝𝑖 ) E [ ︂⃦⃦⃦ ̃︀∆𝑡𝑖 ⃦⃦⃦2 ] ︂ = ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡𝑖 ] ︀ + 2𝛽𝑝𝑖E [ ︀ 𝑃 𝑡𝑖 ] ︀ + 2𝛽𝑝𝑖E [ ︁⃦⃦ ∆𝑡𝑖 ⃦⃦2 ] ︁ + 𝛽 ( 1 − 𝑝𝑖 ) E [ ︂⃦⃦⃦ ̃︀∆𝑡𝑖 ⃦⃦⃦2 ] ︂ ( 𝑖𝑖𝑖 ) = ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡𝑖 ] ︀ + 2𝛽𝑝𝑖E [ ︀ 𝑃 𝑡𝑖 ] ︀ + 𝛽 ( 2𝑝𝑖 + 1 − 𝑝𝑖 ) E [ ︁⃦⃦ ∆𝑡𝑖 ⃦⃦2 ] ︁ +𝛽 ( 1 − 𝑝𝑖 ) E [ ︂⃦⃦⃦ ̃︀∆𝑡𝑖 − ∆𝑡𝑖 ⃦⃦⃦2 ] ︂ ( 𝑖𝑣 ) ≤ ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡𝑖 ] ︀ + 2𝛽𝑝𝑖E [ ︀ 𝑃 𝑡𝑖 ] ︀ + 𝛽 ( 1 + 𝑝𝑖 ) 𝐿 2 𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ +𝛽 ( 1 − 𝑝𝑖 ) ℒ2𝑖 𝜏𝑖 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ ≤ ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡𝑖 ] ︀ + 2𝛽𝑝maxE [ ︀ 𝑃 𝑡𝑖 ] ︀ + 𝛽 ( ︂ 2𝐿2𝑖 + ( 1 − 𝑝𝑖 ) ℒ2𝑖 𝜏𝑖 ) ︂ E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ , where in ( 𝑖 ) we use the definition of PAGE estimator ( 32 ) , ( 𝑖𝑖 ) applies ( 119 ) with 𝑠 = 1 , ( 𝑖𝑖𝑖 ) is due to bias-variance decomposition ( 123 ) , ( 𝑖𝑣 ) makes use of Assumptions 1 and 3 , and the last step is due to 𝑝𝑖 ≤ 1 , 𝑝𝑖 ≤ 𝑝max . It remains to average the above inequality over 𝑖 = 1 , . . . , 𝑛. E.1 CONVERGENCE FOR GENERAL NON-CONVEX FUNCTIONS Theorem 5 . Let Assumptions 1 and 3 hold , and let the stepsize in Algorithm 3 be set as 0 < 𝛾 ≤ ( ︃ 𝐿 + √︃ 4𝛽 𝜃 ̃︀𝐿2 + 2 ( ︂3𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 ) ︃−1 . ( 36 ) Fix 𝑇 ≥ 1 and let ? ̂ ? 𝑇 be chosen from the iterates 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Then E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 2Ψ0 𝛾𝑇 , ( 37 ) where Ψ𝑡 def = 𝑓 ( 𝑥𝑡 ) − 𝑓 inf + 𝛾𝜃𝑉 𝑡 + 𝛾𝑝min ( ︁ 1 + 2𝛽𝑝min𝜃 ) ︁ 𝑃 𝑡 , 𝑝max = max𝑖=1 , ... , 𝑛 𝑝𝑖 , 𝑝min = min𝑖=1 , ... , 𝑛 𝑝𝑖 , ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . We apply Lemma 16 and split the error ‖𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ‖ 2 in two parts 𝑓 ( 𝑥𝑡+1 ) ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 ⃦⃦ 𝑔𝑡 −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 +𝛾 ⃦⃦ 𝑔𝑡 − 𝑣𝑡 ⃦⃦2 + 𝛾E [ ︁⃦⃦ 𝑣𝑡 −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 +𝛾 1 𝑛 𝑛∑︁ 𝑖=1 ⃦⃦ 𝑔𝑡𝑖 − 𝑣𝑡𝑖 ⃦⃦2 + 𝛾 1 𝑛 𝑛∑︁ 𝑖=1 ⃦⃦ 𝑣𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 = 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾𝑉 𝑡 + 𝛾𝑃 𝑡 , ( 38 ) where we used notation 𝑅𝑡 = ‖𝛾𝑔𝑡‖2 = ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 , and applied ( 118 ) and ( 119 ) . Subtracting 𝑓 inf from both sides of the above inequality , taking expectation and using the notation 𝛿𝑡 = 𝑓 ( 𝑥𝑡+1 ) − 𝑓 inf , we get E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾E [ ︀ 𝑉 𝑡 ] ︀ + 𝛾E [ ︀ 𝑃 𝑡 ] ︀ . ( 39 ) Further , Lemma 3 and 4 provide the recursive bounds for the last two terms of ( 39 ) E [ ︀ 𝑃 𝑡+1 ] ︀ ≤ ( 1 − 𝑝min ) E [ ︀ 𝑃 𝑡 ] ︀ + ̃︀ℒ2E [ 𝑅𝑡 ] , ( 40 ) E [ ︀ 𝑉 𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡 ] ︀ + 𝛽 ( ︁ 2̃︀𝐿2 + ̃︀ℒ2 ) ︁E [ 𝑅𝑡 ] + 2𝛽𝑝maxE [ ︀𝑃 𝑡 ] ︀ . ( 41 ) Adding ( 39 ) with a 𝛾𝜃 multiple of ( 41 ) we obtain E [ ︀ 𝛿𝑡+1 ] ︀ + 𝛾 𝜃 E [ ︀ 𝑉 𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾E [ ︀ 𝑉 𝑡 ] ︀ +𝛾E [ ︀ 𝑃 𝑡 ] ︀ + 𝛾 𝜃 ( ︀ ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡 ] ︀ + 𝐴𝑟𝑡 + 𝐶E [ ︀ 𝑃 𝑡 ] ︀ ) ︀ ≤ 𝛿𝑡 + 𝛾 𝜃 E [ ︀ 𝑉 𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 − 𝛾𝐴 𝜃 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ +𝛾 ( ︂ 1 + 𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ , where we denote 𝐴 def= 𝛽 ( ︁ 2̃︀𝐿2 + ̃︀ℒ2 ) ︁ , 𝐶 def= 2𝛽𝑝max . Then adding the above inequality with a 𝛾𝑝min ( ︀ 1 + 𝐶𝜃 ) ︀ multiple of ( 40 ) , we get E [ ︀ Φ𝑡+1 ] ︀ = E [ ︀ 𝛿𝑡+1 ] ︀ + 𝛾 𝜃 E [ ︀ 𝑉 𝑡+1 ] ︀ + 𝛾 𝑝min ( ︂ 1 + 𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡+1 ] ︀ ≤ 𝛿𝑡 + 𝛾 𝜃 E [ ︀ 𝑉 𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 − 𝛾𝐴 𝜃 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ +𝛾 ( ︂ 1 + 𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ + 𝛾 𝑝min ( ︂ 1 + 𝐶 𝜃 ) ︂ ( ︁ ( 1 − 𝑝min ) E [ ︀ 𝑃 𝑡 ] ︀ + ̃︀ℒ2E [ ︀𝑅𝑡 ] ︀ ) ︁ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 𝜃 E [ ︀ 𝑉 𝑡 ] ︀ + 𝛾 𝑝min ( ︂ 1 + 𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ − ( ︂ 1 2𝛾 − 𝐿 2 − 𝛾𝐴 𝜃 − 𝛾 𝑝min ( ︂ 1 + 𝐶 𝜃 ) ︂ ̃︀ℒ2 ) ︂E [ ︀𝑅𝑡 ] ︀ = E [ ︀ Φ𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ − ( ︂ 1 2𝛾 − 𝐿 2 − 𝛾𝐴 𝜃 − 𝛾 𝑝min ( ︂ 1 + 𝐶 𝜃 ) ︂ ̃︀ℒ2 ) ︂E [ ︀𝑅𝑡 ] ︀ . ( 42 ) The coefficient in front of E [ 𝑅𝑡 ] simplifies after substitution by 𝐴 and 𝐶 𝛾𝐴 𝜃 + 𝛾 𝑝min ( ︂ 1 + 𝐶 𝜃 ) ︂ ̃︀ℒ2 ≤ 2𝛽 𝜃 ̃︀𝐿2 + ( ︂3𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 . Thus by Lemma 15 and the stepsize choice 0 < 𝛾 ≤ ( ︃ 𝐿 + √︃ 4𝛽 𝜃 ̃︀𝐿2 + 2 ( ︂3𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 ) ︃−1 ( 43 ) the last term in ( 42 ) is not positive . By summing up inequalities for 𝑡 = 0 , . . . , 𝑇 − 1 , we get 0 ≤ E [ ︀ Φ𝑇 ] ︀ ≤ E [ ︀ Φ0 ] ︀ − 𝛾 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ . Multiplying both sides by 2𝛾𝑇 and rearranging we get 𝑇−1∑︁ 𝑡=0 1 𝑇 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2E [ ︀Φ0 ] ︀ 𝛾𝑇 . It remains to notice that the left hand side can be interpreted as E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ , where ? ̂ ? 𝑇 is chosen from 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Corollary 10 . Let assumptions of Theorem 5 hold , 𝑣0𝑖 = 𝑔 0 𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = ( ︃ 𝐿 + √︃ 4𝛽 𝜃 ̃︀𝐿2 + 2 ( ︂3𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 ) ︃−1 , 𝑝𝑖 = 𝜏𝑖 𝜏𝑖 + 𝑚𝑖 , 𝑖 = 1 , . . . , 𝑛 . Then , after 𝑇 iterations/communication rounds of EF21-PAGE we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = 𝒪 ( ︃ ( ̃︀𝐿 + ̃︀ℒ ) 𝛿0 𝛼𝜀2 √︂ 𝑝max 𝑝min + √ 𝑚max ̃︀ℒ𝛿0 𝜀2 ) ︃ iterations/communications rounds , # grad𝑖 = 𝒪 ( ︃ 𝑚𝑖 + 𝜏𝑖 ( ̃︀𝐿 + ̃︀ℒ ) 𝛿0 𝛼𝜀2 √︂ 𝑝max 𝑝min + 𝜏𝑖 √ 𝑚max ̃︀ℒ𝛿0 𝜀2 ) ︃ stochastic oracle calls for worker 𝑖 , and # grad = 𝒪 ( ︃ 𝑚 + 𝜏 ( ̃︀𝐿 + ̃︀ℒ ) 𝛿0 𝛼𝜀2 √︂ 𝑝max 𝑝min + 𝜏 √ 𝑚max ̃︀ℒ𝛿0 𝜀2 ) ︃ stochastic oracle calls per worker on average , where 𝜏 = 1𝑛 ∑︀𝑛 𝑖=1 𝜏𝑖 , 𝑚 = 1 𝑛 ∑︀𝑛 𝑖=1 𝑚𝑖 , 𝑚max = max𝑖=1 , ... , 𝑛 𝑚𝑖 , 𝑝max = max𝑖=1 , ... , 𝑛 𝑝𝑖 , 𝑝min = min𝑖=1 , ... , 𝑛 𝑝𝑖 . Proof . Notice that by Lemma 17 we have 𝐿 + √︃ 4𝛽 𝜃 ̃︀𝐿2 + 2 ( ︂3𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 ≤ 𝐿 +√︃ 16 𝛼2 ̃︀𝐿2 + 2 ( ︂ 12 𝛼2 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 ≤ 𝐿 + 4 𝛼 ̃︀𝐿 +√︂ 24 𝛼2 𝑝max 𝑝min + 2 𝑝min ̃︀ℒ ≤ 𝐿 + 4 𝛼 ̃︀𝐿 + √24 𝛼 √︂ 𝑝max 𝑝min ̃︀ℒ + √2√ 𝑝min ̃︀ℒ ≤ 5 𝛼 ̃︀𝐿 + √24 𝛼 √︂ 𝑝max 𝑝min ̃︀ℒ + √2√ 𝑝min ̃︀ℒ ≤ 5 𝛼 √︂ 𝑝max 𝑝min ( ︁̃︀𝐿 + ̃︀ℒ ) ︁+ √2√ 𝑝min ̃︀ℒ ≤ 5 𝛼 √︂ 𝑝max 𝑝min ( ︁̃︀𝐿 + ̃︀ℒ ) ︁+ 2√𝑚max ̃︀ℒ , where we used 𝐿 ≤ ̃︀𝐿 , 𝑝min ≤ 𝑝max , and the fact that √𝑎 + 𝑏 ≤ √𝑎 + √𝑏 for 𝑎 , 𝑏 ≥ 0 . Then the number of communication rounds 𝑇 ≤ 2𝛿 0 𝛾𝜀2 ≤ 2𝛿 0 𝜀2 ( ︂ 5 𝛼 √︂ 𝑝max 𝑝min ( ︁̃︀𝐿 + ̃︀ℒ ) ︁+ 2√𝑚max ̃︀ℒ ) ︂ = 𝒪 ( ︃ ( ̃︀𝐿 + ̃︀ℒ ) 𝛿0 𝛼𝜀2 √︂ 𝑝max 𝑝min + √ 𝑚max ̃︀ℒ𝛿0 𝜀2 ) ︃ . At each worker , we have # grad𝑖 = 𝑚𝑖 + 𝑇 ( 𝑝𝑖𝑚𝑖 + ( 1 − 𝑝𝑖 ) 𝜏𝑖 ) = 𝑚𝑖 + 2𝑚𝑖𝜏𝑖 𝜏𝑖 + 𝑚𝑖 𝑇 ≤ 𝑚𝑖 + 2𝜏𝑖𝑇 . Averaging over 𝑖 = 1 , . . . , 𝑛 , we get # grad ≤ 𝑚 + 2𝜏𝑇 = 𝒪 ( ︃ 𝑚 + 𝜏 ( ̃︀𝐿 + ̃︀ℒ ) 𝛿0 𝛼𝜀2 √︂ 𝑝max 𝑝min + 𝜏 √ 𝑚max ̃︀ℒ𝛿0 𝜀2 ) ︃ . E.2 CONVERGENCE UNDER POLYAK-ŁOJASIEWICZ CONDITION Theorem 6 . Let Assumptions 1 and 4 hold , and let the stepsize in Algorithm 3 be set as 0 < 𝛾 ≤ min { ︂ 𝛾0 , 𝜃 2𝜇 , 𝑝min 2𝜇 } ︂ , ( 44 ) where 𝛾0 def = 0 < 𝛾 ≤ ( ︂ 𝐿 + √︂ 8𝛽 𝜃 ̃︀𝐿2 + 4 ( ︁ 5𝛽𝜃 𝑝max𝑝min + 1𝑝min ) ︁ ̃︀ℒ2 ) ︂−1 , ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀ 1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Let Ψ𝑡 def = 𝑓 ( 𝑥𝑡 ) − 𝑓 ( 𝑥⋆ ) + 2𝛾𝜃 𝑉 𝑡 + 2𝛾𝑝min ( ︁ 1 + 4𝛽𝑝max𝜃 ) ︁ 𝑃 𝑡 . Then for any 𝑇 ≥ 0 , we have E [ ︀ Ψ𝑇 ] ︀ ≤ ( 1 − 𝛾𝜇 ) 𝑇E [ ︀ Ψ0 ] ︀ . ( 45 ) Proof . Similarly to the proof of Theorem 5 the inequalities ( 39 ) , ( 40 ) , ( 41 ) hold with 𝛿𝑡 = 𝑓 ( 𝑥𝑡 ) − 𝑓 ( 𝑥⋆ ) . Adding ( 39 ) with a 2𝛾𝜃 multiple of ( 41 ) we obtain E [ ︀ 𝛿𝑡+1 ] ︀ + 2𝛾 𝜃 E [ ︀ 𝑉 𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾E [ ︀ 𝑉 𝑡 ] ︀ +𝛾E [ ︀ 𝑃 𝑡 ] ︀ + 2𝛾 𝜃 ( ︀ ( 1 − 𝜃 ) E [ ︀ 𝑉 𝑡 ] ︀ + 𝐴𝑟𝑡 + 𝐶E [ ︀ 𝑃 𝑡 ] ︀ ) ︀ ≤ 𝛿𝑡 + 2𝛾 𝜃 E [ ︀ 𝑉 𝑡 ] ︀ ( ︂ 1 − 𝜃 2 ) ︂ −𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 − 2𝛾𝐴 𝜃 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ +𝛾 ( ︂ 1 + 2𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ , where 𝐴 def= 𝛽 ( ︁ 2̃︀𝐿2 + ̃︀ℒ2 ) ︁ , 𝐶 def= 2𝛽𝑝max . Then adding the above inequality with a 2𝛾𝑝min ( ︀ 1 + 2𝐶𝜃 ) ︀ multiple of ( 40 ) , we get E [ ︀ Ψ𝑡+1 ] ︀ = E [ ︀ 𝛿𝑡+1 ] ︀ + 2𝛾 𝜃 E [ ︀ 𝑉 𝑡+1 ] ︀ + 2𝛾 𝑝min ( ︂ 1 + 2𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡+1 ] ︀ ≤ 𝛿𝑡 + 𝛾 𝜃 E [ ︀ 𝑉 𝑡 ] ︀ ( ︂ 1 − 𝜃 2 ) ︂ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 − 2𝛾𝐴 𝜃 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ +𝛾 ( ︂ 1 + 2𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ + 2𝛾 𝑝min ( ︂ 1 + 2𝐶 𝜃 ) ︂ ( ︁ ( 1 − 𝑝min ) E [ ︀ 𝑃 𝑡 ] ︀ + ̃︀ℒ2E [ ︀𝑅𝑡 ] ︀ ) ︁ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 2𝛾 𝜃 E [ ︀ 𝑉 𝑡 ] ︀ ( ︂ 1 − 𝜃 2 ) ︂ + 2𝛾 𝑝min ( ︂ 1 + 2𝐶 𝜃 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ ( ︁ 1 − 𝑝min 2 ) ︁ −𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 − 2𝛾𝐴 𝜃 − 2𝛾 𝑝min ( ︂ 1 + 2𝐶 𝜃 ) ︂ ̃︀ℒ2 ) ︂E [ ︀𝑅𝑡 ] ︀ . ( 46 ) PL inequality implies that 𝛿𝑡 − 𝛾2 ‖∇𝑓 ( 𝑥 𝑡 ) ‖2 ≤ ( 1 − 𝛾𝜇 ) 𝛿𝑡 . In view of the above inequality and our assumption on the stepsize ( 𝛾 ≤ 𝜃2𝜇 , 𝛾 ≤ 𝑝min 2𝜇 ) , we get E [ ︀ Ψ𝑡+1 ] ︀ ≤ ( 1 − 𝛾𝜇 ) E [ ︀ Ψ𝑡 ] ︀ − ( ︂ 1 2𝛾 − 𝐿 2 − 2𝛾𝐴 𝜃 − 2𝛾 𝑝min ( ︂ 1 + 2𝐶 𝜃 ) ︂ ̃︀ℒ2 ) ︂E [ ︀𝑅𝑡 ] ︀ . The coefficient in front of E [ 𝑅𝑡 ] simplifies after substitution by 𝐴 and 𝐶 2𝛾𝐴 𝜃 + 2𝛾 𝑝min ( ︂ 1 + 2𝐶 𝜃 ) ︂ ̃︀ℒ2 = 4𝛽 𝜃 ̃︀𝐿2 + ( ︂2𝛽 𝜃 + 2 𝑝min + 8𝛽 𝜃 𝑝max 𝑝min ) ︂ ̃︀ℒ2 ≤ 4𝛽 𝜃 ̃︀𝐿2 + 2 ( ︂5𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 . Thus by Lemma 15 and the stepsize choice 0 < 𝛾 ≤ ( ︃ 𝐿 + √︃ 8𝛽 𝜃 ̃︀𝐿2 + 4 ( ︂5𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 ) ︃−1 ( 47 ) the last term in ( 46 ) is not positive . E [ ︀ Ψ𝑡+1 ] ︀ ≤ ( 1 − 𝛾𝜇 ) E [ ︀ Ψ𝑡 ] ︀ . It remains to unroll the recurrence . Corollary 11 . Let assumptions of Theorem 6 hold , 𝑣0𝑖 = 𝑔 0 𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = min { ︂ 𝛾0 , 𝜃 2𝜇 , 𝑝min 2𝜇 } ︂ , 𝛾0 = ( ︃ 𝐿 + √︃ 8𝛽 𝜃 ̃︀𝐿2 + 4 ( ︂5𝛽 𝜃 𝑝max 𝑝min + 1 𝑝min ) ︂ ̃︀ℒ2 ) ︃−1 , 𝑝𝑖 = 𝜏𝑖 𝜏𝑖 + 𝑚𝑖 , 𝑖 = 1 , . . . , 𝑛 . Then , after 𝑇 iterations of EF21-PAGE we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 inf ] ︀ ≤ 𝜀 . It requires 𝑇 = 𝒪 ( ︃ 1 𝜇 ( ︃ ̃︀𝐿 + ̃︀ℒ 𝛼 √︂ 𝑝max 𝑝min + √ 𝑚max ̃︀ℒ ) ︃ ln ( ︂𝛿0 𝜀 ) ︂ ) ︃ iterations/communications rounds , # grad𝑖 = 𝒪 ( ︃ 𝑚𝑖 + 𝜏𝑖 𝜇 ( ︃ ̃︀𝐿 + ̃︀ℒ 𝛼 √︂ 𝑝max 𝑝min + √ 𝑚max ̃︀ℒ ) ︃ ln ( ︂𝛿0 𝜀 ) ︂ ) ︃ stochastic oracle calls for worker 𝑖 , and # grad = 𝒪 ( ︃ 𝑚 + 𝜏 𝜇 ( ︃ ̃︀𝐿 + ̃︀ℒ 𝛼 √︂ 𝑝max 𝑝min + √ 𝑚max ̃︀ℒ ) ︃ ln ( ︂𝛿0 𝜀 ) ︂ ) ︃ stochastic oracle calls per worker on average , where 𝜏 = 1𝑛 ∑︀𝑛 𝑖=1 𝜏𝑖 , 𝑚 = 1 𝑛 ∑︀𝑛 𝑖=1 𝑚𝑖 , 𝑚max = max𝑖=1 , ... , 𝑛 𝑚𝑖 , 𝑝max = max𝑖=1 , ... , 𝑛 𝑝𝑖 , 𝑝min = min𝑖=1 , ... , 𝑛 𝑝𝑖 . F PARTIAL PARTICIPATION In this section , we provide an option for partial participation of the clients – a feature important in federated learning . Most of the works in compressed distributed optimization deal with full worker participation , i.e. , the case when all clients are involved in computation and communication at every iteration . However , in the practice of federated learning , only a subset of clients are allowed to participate at each training round . This limitation comes mainly due to the following two reasons . First , clients ( e.g. , mobile devices ) may wish to join or leave the network randomly . Second , it is often prohibitive to wait for all available clients since stragglers can significantly slow down the training process . Although many existing works ( Gorbunov et al. , 2021 ; Horváth & Richtárik , 2021 ; Philippenko & Dieuleveut , 2020 ; Karimireddy et al. , 2020 ; Yang et al. , 2021 ; Cho et al. , 2020 ) allow for partial participation , they assume either unbiased compressors or no compression at all . We provide a simple analysis of partial participation , which works with biased compressors and builds upon the EF21 mechanism . The modified method ( Algorithm 4 ) is called EF21-PP . At each iteration of EF21-PP , the master samples a subset 𝑆𝑡 of clients ( nodes ) , which are required to perform computation . Note , that all other clients ( nodes ) 𝑖 /∈ 𝑆𝑡 participate neither in the computation nor in communication at iteration 𝑡 . We allow for an arbitrary sampling strategy of a subset 𝑆𝑡 at the master node . The only requirement is that Prob ( 𝑖 ∈ 𝑆𝑡 ) = 𝑝𝑖 > 0 for all 𝑖 = 1 , . . . , 𝑛 , which is often referred to as a proper arbitrary sampling.9 Clearly , many poplular sampling procedures fell into this setting , for instance , independent sampling with/without replacement , 𝜏 -nice sampling . We do not discuss particular sampling strategies here , more on samplings can be found in ( Qu & Richtárik , 2014 ) . Algorithm 4 EF21-PP ( EF21 with partial participation ) 1 : Input : starting point 𝑥0 ∈ R𝑑 ; 𝑔0𝑖 ∈ R𝑑 for 𝑖 = 1 , . . . , 𝑛 ( known by nodes ) ; 𝑔0 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 0 𝑖 ( known by master ) ; learning rate 𝛾 > 0 2 : for 𝑡 = 0,1 , 2 , . . . , 𝑇 − 1 do 3 : Master computes 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 4 : Master samples a subset 𝑆𝑡 of nodes ( |𝑆𝑡| ≤ 𝑛 ) such that Prob ( 𝑖 ∈ 𝑆𝑡 ) = 𝑝𝑖 5 : Master broadcasts 𝑥𝑡+1 to the nodes with 𝑖 ∈ 𝑆𝑡 6 : for all nodes 𝑖 = 1 , . . . , 𝑛 in parallel do 7 : if 𝑖 ∈ 𝑆𝑡 then 8 : Compress 𝑐𝑡𝑖 = 𝒞 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ) and send 𝑐𝑡𝑖 to the master 9 : Update local state 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 + 𝑐 𝑡 𝑖 10 : end if 11 : if 𝑖 /∈ 𝑆𝑡 then 12 : Do not change local state 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 13 : end if 14 : end for 15 : Master updates 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 , 𝑐 𝑡 𝑖 = 0 for 𝑖 /∈ 𝑆𝑡 16 : Master computes 𝑔𝑡+1 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 𝑡+1 𝑖 via 𝑔 𝑡+1 = 𝑔𝑡 + 1𝑛 ∑︀𝑛 𝑖=1 𝑐 𝑡 𝑖 17 : end for Lemma 5 . Then for Algorithm 4 holds E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃𝑝 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝐵E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ ( 48 ) with 𝜃𝑝 def = 𝜌𝑝𝑚𝑖𝑛 + 𝜃𝑝𝑚𝑎𝑥 − 𝜌− ( 𝑝𝑚𝑎𝑥 − 𝑝𝑚𝑖𝑛 ) , 𝐵 def = 1𝑛 ∑︀𝑛 𝑖=1 ( ︀ 𝛽𝑝𝑖 + ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝𝑖 ) ) ︀ 𝐿2𝑖 , 𝑝𝑚𝑎𝑥 def = max1≤𝑖≤𝑛 𝑝𝑖 , 𝑝𝑚𝑖𝑛 def = min1≤𝑖≤𝑛 𝑝𝑖 , 𝜃 = 1 − ( 1 + 𝑠 ) ( 1 − 𝛼 ) , 𝛽 = ( ︀ 1 + 1𝑠 ) ︀ ( 1 − 𝛼 ) and small enough 𝜌 , 𝑠 > 0 . Proof . By ( 13 ) in Lemma 1 , we have for all 𝑖 ∈ 𝑆𝑡 E [ ︀ 𝐺𝑡+1𝑖 | 𝑖 ∈ 𝑆𝑡 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽𝐿2𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 | 𝑖 ∈ 𝑆𝑡 ] ︁ ( 49 ) 9It is natural to focus on proper samplings only since otherwise there is a node 𝑖 , which never communicaties . This would be a critical issue when trying to minimize ( 1 ) as we do not assume any similarity between 𝑓𝑖 ( · ) . with 𝜃 = 1 − ( 1 + 𝑠 ) ( 1 − 𝛼 ) , 𝛽 = ( ︀ 1 + 1𝑠 ) ︀ ( 1 − 𝛼 ) and arbitrary 𝑠 > 0 . Define 𝑊 𝑡 def= { 𝑔𝑡1 , . . . , 𝑔𝑡𝑛 , 𝑥𝑡 , 𝑥𝑡+1 } and let 𝑖 /∈ 𝑆𝑡 , then E [ ︀ 𝐺𝑡+1𝑖 | 𝑖 /∈ 𝑆𝑡 ] ︀ = E [ ︀ E [ ︀ 𝐺𝑡+1𝑖 | 𝑊 𝑡 ] ︀ | 𝑖 /∈ 𝑆𝑡 ] ︀ = E [ ︁ E [ ︁⃦⃦ 𝑔𝑡+1𝑖 −∇𝑓𝑖 ( 𝑥 𝑡+1 ) ⃦⃦2 | 𝑊 𝑡 ] ︁ | 𝑖 /∈ 𝑆𝑡 ] ︁ ≤ ( 1 + 𝜌 ) E [ ︁ E [ ︁⃦⃦ 𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 | 𝑊 𝑡 ] ︁ | 𝑖 /∈ 𝑆𝑡 ] ︁ + ( ︀ 1 + 𝜌−1 ) ︀ E [ ︁ E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 | 𝑊 𝑡 ] ︁ | 𝑖 /∈ 𝑆𝑡 ] ︁ ≤ ( 1 + 𝜌 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + ( ︀ 1 + 𝜌−1 ) ︀ E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 | 𝑖 /∈ 𝑆𝑡 ] ︁ ≤ ( 1 + 𝜌 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + ( ︀ 1 + 𝜌−1 ) ︀ 𝐿2𝑖E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ . ( 50 ) Combining ( 49 ) and ( 50 ) , we get E [ ︀ 𝐺𝑡+1 ] ︀ = 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︀ 𝐺𝑡+1𝑖 ] ︀ = 1 𝑛 𝑛∑︁ 𝑖=1 𝑝𝑖E [ ︀ 𝐺𝑡+1𝑖 | 𝑖 ∈ 𝑆𝑡 ] ︀ + 1 𝑛 𝑛∑︁ 𝑖=1 ( 1 − 𝑝𝑖 ) E [ ︀ 𝐺𝑡+1𝑖 | 𝑖 /∈ 𝑆𝑡 ] ︀ ( 49 ) , ( 50 ) ≤ ( 1 − 𝜃 ) 1 𝑛 𝑛∑︁ 𝑖=1 𝑝𝑖E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽 ( ︃ 1 𝑛 𝑛∑︁ 𝑖=1 𝑝𝑖𝐿 2 𝑖 ) ︃ E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + ( 1 + 𝜌 ) 1 𝑛 𝑛∑︁ 𝑖=1 ( 1 − 𝑝𝑖 ) E [ ︀ 𝐺𝑡𝑖 ] ︀ + ( ︀ 1 + 𝜌−1 ) ︀ ( ︃ 1 𝑛 𝑛∑︁ 𝑖=1 ( 1 − 𝑝𝑖 ) 𝐿2𝑖 ) ︃ E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ ( 𝑖 ) ≤ ( 1 − 𝜃 ) 𝑝𝑚𝑎𝑥 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︀ 𝐺𝑡𝑖 ] ︀ + 𝛽 ( ︃ 1 𝑛 𝑛∑︁ 𝑖=1 𝑝𝑖𝐿 2 𝑖 ) ︃ E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + ( 1 + 𝜌 ) ( 1 − 𝑝𝑚𝑖𝑛 ) 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︀ 𝐺𝑡𝑖 ] ︀ + ( ︀ 1 + 𝜌−1 ) ︀ ( ︃ 1 𝑛 𝑛∑︁ 𝑖=1 ( 1 − 𝑝𝑖 ) 𝐿2𝑖 ) ︃ E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ = ( ︂ ( 1 − 𝜃 ) 𝑝𝑚𝑎𝑥 + ( 1 + 𝜌 ) ( 1 − 𝑝𝑚𝑖𝑛 ) ) ︂ E [ ︀ 𝐺𝑡 ] ︀ + ( ︃ 1 𝑛 𝑛∑︁ 𝑖=1 ( ︀ 𝛽𝑝𝑖 + ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝𝑖 ) ) ︀ 𝐿2𝑖 ) ︃ E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ = ( ︂ 1 − ( 𝜌𝑝𝑚𝑖𝑛 + 𝜃𝑝𝑚𝑎𝑥 − 𝜌− ( 𝑝𝑚𝑎𝑥 − 𝑝𝑚𝑖𝑛 ) ) ) ︂ E [ ︀ 𝐺𝑡 ] ︀ + ( ︃ 1 𝑛 𝑛∑︁ 𝑖=1 ( ︀ 𝛽𝑝𝑖 + ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝𝑖 ) ) ︀ 𝐿2𝑖 ) ︃ E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ . = ( 1 − 𝜃𝑝 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝐵E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ , Lemma 6 . [ To simplify the rates for partial participation ] Let 𝐵 and 𝜃𝑝 be defined as in Theorems 7 and Theorems 8 , and let 𝑝𝑖 = 𝑝 > 0 for all 𝑖 = 1 , . . . , 𝑛 . Then there exist 𝜌 , 𝑠 > 0 such that 𝜃𝑝 ≥ 𝑝𝛼 2 , ( 51 ) 0 < 𝐵 𝜃𝑝 ≤ ( ︃ 4̃︀𝐿 𝑝𝛼 ) ︃2 . ( 52 ) Proof . Under the assumption that 𝑝𝑖 = 𝑝 for all 𝑖 = 1 , . . . , 𝑛 , the constants simplify to 𝜃𝑝 = 𝜌𝑝 + 𝜃𝑝− 𝜌 , 𝐵 = ( ︀ 𝛽𝑝 + ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝 ) ) ︀ ̃︀𝐿2 , 𝑝𝑚𝑎𝑥 = 𝑝𝑚𝑖𝑛 = 𝑝 . Case I : let 𝛼 = 1 , 𝑝 = 1 , then the result holds trivially . Case II : let 0 < 𝛼 < 1 , 𝑝 = 1 , then 𝐵 = 𝛽̃︀𝐿2 , 𝜃𝑝 = 𝜃 = 1 − √1 − 𝛼 ≥ 𝛼2 and ( 52 ) follows by Lemma 17 . Case III : let 𝛼 = 1 , and 0 < 𝑝 < 1 , then 𝜃 = 1 , 𝛽 = 0 , 𝐵 = ( ︀ 1 + 𝜌−1 ) ︀ ( 1−𝑝 ) ̃︀𝐿2 , 𝜃𝑝 = 𝑝−𝜌 ( 1−𝑝 ) . Then the choice 𝜌 = 𝑝𝛼2 ( 1−𝑝 ) simplifies 𝜃𝑝 = 𝑝 2 , 𝐵 𝜃𝑝 = ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝 ) ̃︀𝐿2 𝑝− 𝜌 ( 1 − 𝑝 ) = 2 ( 1 − 𝑝 ) ̃︀𝐿2 𝑝 ( ︂ 2 𝑝 − 1 ) ︂ ≤ 4 ̃︀𝐿2 𝑝2 . Case IV : let 0 < 𝛼 < 1 , and 0 < 𝑝 < 1.Then the choice of constants 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀ 1 + 1𝑠 ) ︀ , 𝜌 = 𝑝𝛼4 ( 1−𝑝 ) , 𝑠 = 𝛼 4 ( 1−𝛼 ) yields 𝑝𝜌 + 𝜃𝑝− 𝜌 = 𝑝 ( 𝜌 + 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) ) − 𝜌 = 𝑝𝛼− 𝑝 ( 1 − 𝛼 ) 𝑠− ( 1 − 𝑝 ) 𝜌 = 1 2 𝑝𝛼 . ( 53 ) Also 1 + 1 𝑠 = 4 − 3𝛼 𝛼 ≤ 4 𝛼 , 1 + 1 𝜌 = 4 ( 1 − 𝑝 ) + 𝛼𝑝 𝑝𝛼 = 4 − 𝑝 ( 4 − 𝛼 ) 𝑝𝛼 ≤ 4 𝑝𝛼 . Thus 𝐵 𝜃𝑝 = 𝑝𝛽 + ( 1 − 𝑝 ) ( ︁ 1 + 1𝜌 ) ︁ 𝑝 ( 𝜌 + 𝜃 ) − 𝜌 ̃︀𝐿2 = 𝑝 ( 1 − 𝛼 ) ( ︀1 + 1𝑠 ) ︀+ ( 1 − 𝑝 ) ( ︁ 1 + 1𝜌 ) ︁ 1 2𝑝𝛼 ̃︀𝐿2 ≤ 𝑝 ( 1 − 𝛼 ) 4𝛼 + ( 1 − 𝑝 ) 4 𝑝𝛼 1 2𝑝𝛼 ̃︀𝐿2 ≤ 4 𝛼 + 4 𝑝𝛼 1 2𝑝𝛼 ̃︀𝐿2 ≤ 8 𝑝𝛼 1 2𝑝𝛼 ̃︀𝐿2 ≤ 16 ̃︀𝐿2 𝑝2𝛼2 . ( 54 ) F.1 CONVERGENCE FOR GENERAL NON-CONVEX FUNCTIONS Theorem 7 . Let Assumption 1 hold , and let the stepsize in Algorithm 4 be set as 0 < 𝛾 ≤ ( ︃ 𝐿 + √︃ 𝐵 𝜃𝑝 ) ︃−1 . ( 55 ) Fix 𝑇 ≥ 1 and let ? ̂ ? 𝑇 be chosen from the iterates 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Then E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 2 ( ︀𝑓 ( 𝑥0 ) − 𝑓 inf ) ︀ 𝛾𝑇 + E [ ︀ 𝐺0 ] ︀ 𝜃𝑝𝑇 ( 56 ) with 𝜃𝑝 = 𝜌𝑝𝑚𝑖𝑛 + 𝜃𝑝𝑚𝑎𝑥 − 𝜌− ( 𝑝𝑚𝑎𝑥 − 𝑝𝑚𝑖𝑛 ) , 𝐵 = 1𝑛 ∑︀𝑛 𝑖=1 ( ︀ 𝛽𝑝𝑖 + ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝𝑖 ) ) ︀ 𝐿2𝑖 , 𝑝𝑚𝑎𝑥 = max1≤𝑖≤𝑛 𝑝𝑖 , 𝑝𝑚𝑖𝑛 = min1≤𝑖≤𝑛 𝑝𝑖 , 𝜃 = 1 − ( 1 + 𝑠 ) ( 1 − 𝛼 ) , 𝛽 = ( ︀ 1 + 1𝑠 ) ︀ ( 1 − 𝛼 ) and 𝜌 , 𝑠 > 0 . Proof . By ( 20 ) , we have E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ . ( 57 ) Lemma 5 states that E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃𝑝 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝐵E [ ︀ 𝑅𝑡 ] ︀ ( 58 ) with 𝜃𝑝 = 𝜌𝑝𝑚𝑖𝑛 + 𝜃𝑝𝑚𝑎𝑥 − 𝜌− ( 𝑝𝑚𝑎𝑥 − 𝑝𝑚𝑖𝑛 ) , 𝐵 = 1𝑛 ∑︀𝑛 𝑖=1 ( ︀ 𝛽𝑝𝑖 + ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝𝑖 ) ) ︀ 𝐿2𝑖 , 𝑝𝑚𝑎𝑥 = max1≤𝑖≤𝑛 𝑝𝑖 , 𝑝𝑚𝑖𝑛 = min1≤𝑖≤𝑛 𝑝𝑖 , 𝜃 = 1 − ( 1 + 𝑠 ) ( 1 − 𝛼 ) , 𝛽 = ( ︀ 1 + 1𝑠 ) ︀ ( 1 − 𝛼 ) and small enough 𝜌 , 𝑠 > 0 . Adding ( 57 ) with a 𝛾2𝜃2 multiple of ( 58 ) and rearranging terms in the right hand side , we have E [ ︀ 𝛿𝑡+1 ] ︀ + 𝛾 2𝜃𝑝 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 2𝜃𝑝 E [ ︀ 𝐺𝑡 ] ︀ −𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 − 𝛾𝐵 2𝜃 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 2𝜃𝑝 E [ ︀ 𝐺𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ . The last inequality follows from the bound 𝛾2 𝐵𝜃𝑝 + 𝐿𝛾 ≤ 1 , which holds because of Lemma 15 and our assumption on the stepsize . By summing up inequalities for 𝑡 = 0 , . . . , 𝑇 − 1 , we get 0 ≤ E [ ︁ 𝛿𝑇 + 𝛾 2𝜃 𝐺𝑇 ] ︁ ≤ 𝛿0 + 𝛾 2𝜃 E [ ︀ 𝐺0 ] ︀ − 𝛾 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ . Multiplying both sides by 2𝛾𝑇 , after rearranging we get 𝑇−1∑︁ 𝑡=0 1 𝑇 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2𝛿0 𝛾𝑇 + E [ ︀ 𝐺0 ] ︀ 𝜃𝑇 . It remains to notice that the left hand side can be interpreted as E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ , where ? ̂ ? 𝑇 is chosen from 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Corollary 12 . Let assumptions of Theorem 7 hold , 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = ( ︃ 𝐿 + √︃ 𝐵 𝜃𝑝 ) ︃−1 , 𝑝𝑖 = 𝑝 , 𝑖 = 1 , . . . , 𝑛 , where 𝐵 and 𝜃𝑝 are given in Theorem 7 . Then , after 𝑇 iterations/communication rounds of EF21-PP we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = # grad = 𝒪 ( ︃ ̃︀𝐿𝛿0 𝑝𝛼𝜀2 ) ︃ ( 59 ) iterations/communications rounds/gradint computations at each node . Proof . Let 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , then 𝐺0 = 0 and by Theorem 7 # grad = 𝑇 ( 𝑖 ) ≤ 2𝛿 0 𝛾𝜀2 ( 𝑖𝑖 ) ≤ 2𝛿 0 𝜀2 ( ︃ 𝐿 + ̃︀𝐿√︃𝐵 𝜃𝑝 ) ︃ ( 𝑖𝑖𝑖 ) ≤ 2𝛿 0 𝜀2 ( ︃ 𝐿 + 4̃︀𝐿 𝑝𝛼 ) ︃ ≤ 2𝛿 0 𝜀2 ( ︃ 𝐿 + 4̃︀𝐿 𝑝𝛼 ) ︃ ( 𝑖𝑣 ) ≤ 2𝛿 0 𝜀2 ( ︃ ̃︀𝐿 𝑝𝛼 + 4̃︀𝐿 𝑝𝛼 ) ︃ = 5̃︀𝐿𝛿0 𝑝𝛼𝜀2 , where ( 𝑖 ) is due to the rate ( 56 ) given by Theorem 7 . In two ( 𝑖𝑖 ) we use the largest possible stepsize ( 55 ) , in ( 𝑖𝑖𝑖 ) we utilize Lemma 6 , and ( 𝑖𝑣 ) follows by the inequalities 𝛼 ≤ 1 , 𝑝 ≤ 1 and 𝐿 ≤ ̃︀𝐿 . F.2 CONVERGENCE UNDER POLYAK-ŁOJASIEWICZ CONDITION Theorem 8 . Let Assumptions 1 and 4 hold , and let the stepsize in Algorithm 4 be set as 0 < 𝛾 ≤ min ⎧⎨⎩ ( ︃ 𝐿 + √︃ 2𝐵 𝜃𝑝 ) ︃−1 , 𝜃𝑝 2𝜇 ⎫⎬⎭ . ( 60 ) Let Ψ𝑡 def = 𝑓 ( 𝑥𝑡 ) − 𝑓 ( 𝑥⋆ ) + 𝛾𝜃𝑝𝐺 𝑡 . Then for any 𝑇 ≥ 0 , we have E [ ︀ Ψ𝑇 ] ︀ ≤ ( 1 − 𝛾𝜇 ) 𝑇E [ ︀ Ψ0 ] ︀ ( 61 ) with 𝜃𝑝 = 𝜌𝑝𝑚𝑖𝑛 + 𝜃𝑝𝑚𝑎𝑥 − 𝜌− ( 𝑝𝑚𝑎𝑥 − 𝑝𝑚𝑖𝑛 ) , 𝐵 = 1𝑛 ∑︀𝑛 𝑖=1 ( ︀ 𝛽𝑝𝑖 + ( ︀ 1 + 𝜌−1 ) ︀ ( 1 − 𝑝𝑖 ) ) ︀ 𝐿2𝑖 , 𝑝𝑚𝑎𝑥 = max1≤𝑖≤𝑛 𝑝𝑖 , 𝑝𝑚𝑖𝑛 = min1≤𝑖≤𝑛 𝑝𝑖 , 𝜃 = 1 − ( 1 + 𝑠 ) ( 1 − 𝛼 ) , 𝛽 = ( ︀ 1 + 1𝑠 ) ︀ ( 1 − 𝛼 ) and 𝜌 , 𝑠 > 0 . Proof . Following the same steps as in the proof of Theorem 2 , but using ( 58 ) , and assumption on the stepsize ( 60 ) , we obtain the result . Corollary 13 . Let assumptions of Theorem 8 hold , 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = min ⎧⎨⎩ ( ︃ 𝐿 + √︃ 2𝐵 𝜃𝑝 ) ︃−1 , 𝜃𝑝 2𝜇 ⎫⎬⎭ , 𝑝𝑖 = 𝑝 , 𝑖 = 1 , . . . , 𝑛 , where 𝐵 and 𝜃𝑝 are given in Theorem 8 . Then , after 𝑇 iterations/communication rounds of EF21-PP we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 ( 𝑥⋆ ) ] ︀ ≤ 𝜀 . It requires 𝑇 = # grad = 𝒪 ( ︃ ̃︀𝐿 𝑝𝛼𝜇 log ( ︂ 𝛿0 𝜀 ) ︂ ) ︃ ( 62 ) iterations/communications rounds/gradint computations at each node . Proof . The proof is the same as for Corollary 3 . The only difference is that Lemma 6 is needed to upper bound the quantities 1/𝜃𝑝 and 𝐵/𝜃𝑝 , which appear in Theorem 8 . G BIDIRECTIONAL COMPRESSION In the majority of applications , the uplink ( Client → Server ) communication is the bottleneck . However , in some settings the downlink ( Server → Client ) communication can also slowdown training . Tang et al . ( 2020 ) construct a mechanism which allows bidirectional biased compression . Their method builds upon the original EF meachanism and they prove 𝒪 ( ︁ 1 𝑇 2/3 ) ︁ rate for general nonconvex objectives . However , the main defficiency of this approach is that it requires an additional assumption of bounded magnitude of error ( there exists ∆ > 0 such that E [ ︁ ‖𝒞 ( 𝑥 ) − 𝑥‖2 ] ︁ ≤ ∆ for all 𝑥 ) . In this section , we lift this limitation and propose a new method EF21-BC ( Algorithm 5 ) , which enjoys the desirable 𝒪 ( ︀ 1 𝑇 ) ︀ , and does not rely on additional assumptions . Algorithm 5 EF21-BC ( EF21 with bidirectional biased compression ) 1 : Input : starting point 𝑥0 ∈ R𝑑 ; 𝑔0 , 𝑏0 , ̃︀𝑔0𝑖 ∈ R𝑑 for 𝑖 = 1 , . . . , 𝑛 ( known by nodes ) ; ̃︀𝑔0 = 1 𝑛 ∑︀𝑛 𝑖=1 ̃︀𝑔0𝑖 ( known by master ) ; learning rate 𝛾 > 0 2 : for 𝑡 = 0,1 , 2 , . . . , 𝑇 − 1 do 3 : Master updates 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 4 : for all nodes 𝑖 = 1 , . . . , 𝑛 in parallel do 5 : Update 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 , 𝑔𝑡+1 = 𝑔𝑡 + 𝑏𝑡 , 6 : compress 𝑐𝑡𝑖 = 𝒞𝑤 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) , send 𝑐𝑡𝑖 to the master , and 7 : update local state ̃︀𝑔𝑡+1𝑖 = ̃︀𝑔𝑡𝑖 + 𝑐𝑡𝑖 8 : end for 9 : Master computes ̃︀𝑔𝑡+1 = 1𝑛 ∑︀𝑛𝑖=1 ̃︀𝑔𝑡+1𝑖 via ̃︀𝑔𝑡+1 = ̃︀𝑔𝑡 + 1𝑛 ∑︀𝑛𝑖=1 𝑐𝑡𝑖 , 10 : compreses 𝑏𝑡+1 = 𝒞𝑀 ( ̃︀𝑔𝑡+1 − 𝑔𝑡 ) , broadcast 𝑏𝑡+1 to workers , 11 : and updates 𝑔𝑡+1 = 𝑔𝑡 + 𝑏𝑡+1 12 : end for Note that 𝒞𝑀 and 𝒞𝑤 stand for contractive compressors of the type 1 of master and workers respectively . In general , different 𝛼𝑀 and 𝛼𝑤 are accepted . Notations for this section : 𝑃 𝑡𝑖 def = ‖̃︀𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ‖2 , 𝑃 𝑡 def= 1𝑛 ∑︀𝑛𝑖=1 𝑃 𝑡𝑖 . Lemma 7 . Let Assumption 1 hold , 𝒞𝑤 be a contractive compressor , and ̃︀𝑔𝑡+1𝑖 be an EF21 estimator of ∇𝑓𝑖 ( 𝑥𝑡+1 ) , i. e. ̃︀𝑔𝑡+1𝑖 = ̃︀𝑔𝑡𝑖 + 𝒞𝑤 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) ( 63 ) for arbitrary ̃︀𝑔0𝑖 and all all 𝑖 = 1 , . . . , 𝑛 , 𝑡 ≥ 0 . Then E [ ︀ 𝑃 𝑡+1 ] ︀ ≤ ( 1 − 𝜃𝑤 ) E [ ︀ 𝑃 𝑡 ] ︀ + 𝛽𝑤̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ , ( 64 ) where 𝜃𝑤 def = 1 − ( 1 − 𝛼𝑤 ) ( 1 + 𝑠 ) , 𝛽𝑤 def = ( 1 − 𝛼𝑤 ) ( ︀ 1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . The proof is the same as for Lemma 1 . Lemma 8 . Let Assumption 1 hold , 𝒞𝑀 , 𝒞𝑤 be contractive compressors . Let ̃︀𝑔𝑡+1𝑖 be an EF21 estimator of ∇𝑓𝑖 ( 𝑥𝑡+1 ) , i. e. ̃︀𝑔𝑡+1𝑖 = ̃︀𝑔𝑡𝑖 + 𝒞𝑤 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) , ( 65 ) and let 𝑔𝑡+1 be an EF21 estimator of ̃︀𝑔𝑡+1 = 1𝑛 ∑︀𝑛𝑖=1 ̃︀𝑔𝑡+1𝑖 , i. e. 𝑔𝑡+1 = 𝑔𝑡 + 𝒞𝑀 ( ̃︀𝑔𝑡+1 − 𝑔𝑡 ) ( 66 ) for arbitrary 𝑔0 , ̃︀𝑔0𝑖 and all 𝑖 = 1 , . . . , 𝑛 , 𝑡 ≥ 0 . Then E [ ︁⃦⃦ 𝑔𝑡+1 − ̃︀𝑔𝑡+1⃦⃦2 ] ︁ ≤ ( 1 − 𝜃𝑀 ) E [ ︁⃦⃦𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁+ 8𝛽𝑀E [ ︀𝑃 𝑡 ] ︀+ 8𝛽𝑀 ̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ , ( 67 ) where 𝑔𝑡 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 𝑡 𝑖 , ̃︀𝑔𝑡 = 1𝑛 ∑︀𝑛𝑖=1 ̃︀𝑔𝑡𝑖 , 𝜃𝑀 = 1 − ( 1 − 𝛼𝑀 ) ( 1 + 𝜌 ) , 𝛽𝑀 = ( 1 − 𝛼𝑀 ) ( ︀1 + 𝜌−1 ) ︀ for any 𝜌 > 0 . Proof . Similarly to the proof of Lemma 1 , define 𝑊 𝑡 def= { 𝑔𝑡1 , . . . , 𝑔𝑡𝑛 , 𝑥𝑡 , 𝑥𝑡+1 } and E [ ︁⃦⃦ 𝑔𝑡+1 − ̃︀𝑔𝑡+1⃦⃦2 ] ︁ = E [ ︁E [ ︁⃦⃦𝑔𝑡+1 − ̃︀𝑔𝑡+1⃦⃦2 | 𝑊 𝑡 ] ︁ ] ︁ = E [ ︁ E [ ︁⃦⃦ 𝑔𝑡 + 𝒞𝑀 ( ̃︀𝑔𝑡+1 − 𝑔𝑡 ) − ̃︀𝑔𝑡+1⃦⃦2 | 𝑊 𝑡 ] ︁ ] ︁ ( 8 ) ≤ ( 1 − 𝛼𝑀 ) E [ ︁⃦⃦̃︀𝑔𝑡+1 − 𝑔𝑡⃦⃦2 ] ︁ ( 𝑖 ) ≤ ( 1 − 𝛼𝑀 ) ( 1 + 𝜌 ) E [ ︁⃦⃦̃︀𝑔𝑡 − 𝑔𝑡⃦⃦2 ] ︁ + ( 1 − 𝛼𝑀 ) ( ︀ 1 + 𝜌−1 ) ︀ ⃦⃦̃︀𝑔𝑡+1 − ̃︀𝑔𝑡⃦⃦2 = ( 1 − 𝜃𝑀 ) E [ ︁⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁+ 𝛽𝑀 ⃦⃦̃︀𝑔𝑡+1 − ̃︀𝑔𝑡⃦⃦2 , ( 68 ) where ( 𝑖 ) follows by Young ’ s inequality ( 118 ) , and in ( 𝑖𝑖 ) we use the definition of 𝜃𝑀 and 𝛽𝑀 . Further we bound the last term in ( 68 ) . Recall that ̃︀𝑔𝑡+1 = ̃︀𝑔𝑡 + 1 𝑛 𝑛∑︁ 𝑖=1 𝑐𝑡𝑖 . ( 69 ) where 𝑐𝑡𝑖 = 𝒞𝑤 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) and ̃︀𝑔𝑡 = 1𝑛 ∑︀𝑛𝑖=1 ̃︀𝑔𝑡𝑖 . Then E [ ︁⃦⃦̃︀𝑔𝑡+1 − ̃︀𝑔𝑡⃦⃦2 ] ︁ ( 69 ) = E ⎡⎣⃦⃦⃦⃦⃦̃︀𝑔𝑡 + 1𝑛 𝑛∑︁ 𝑖=1 𝑐𝑡𝑖 − ̃︀𝑔𝑡 ⃦⃦⃦⃦ ⃦ 2 ⎤⎦ = E ⎡⎣⃦⃦⃦⃦⃦ 1𝑛 𝑛∑︁ 𝑖=1 𝑐𝑡𝑖 ⃦⃦⃦⃦ ⃦ 2 ⎤⎦ ( 𝑖 ) ≤ 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ 𝑐𝑡𝑖 ⃦⃦2 ] ︁ = 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ 𝑐𝑡𝑖 − ( ︀ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) ︀+ ( ︀∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) ︀⃦⃦2 ] ︁ ( 118 ) ≤ 2 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁ E [ ︁⃦⃦ 𝒞𝑤 ( ︀ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) ︀− ( ︀∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ) ︀⃦⃦2 | 𝑊 𝑡 ] ︁ ] ︁ +2 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ⃦⃦2 ] ︁ ( 8 ) ≤ 2 ( 1 − 𝛼𝑤 ) 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ⃦⃦2 ] ︁+ 2 1𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ⃦⃦2 ] ︁ = 2 ( 2 − 𝛼𝑤 ) 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ⃦⃦2 ] ︁ ( 𝑖𝑖 ) < 4 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) − ̃︀𝑔𝑡𝑖 ⃦⃦2 ] ︁ = 4 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) − ( ︀̃︀𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ) ︀⃦⃦2 ] ︁ ( 118 ) ≤ 8 1 𝑛 𝑛∑︁ 𝑖=1 ⃦⃦̃︀𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 + 8 1𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡+1 ) −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ( 𝑖𝑖𝑖 ) ≤ 8 1 𝑛 𝑛∑︁ 𝑖=1 E [ ︁⃦⃦̃︀𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 ] ︁+ 8̃︀𝐿2E [ ︁⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 ] ︁ = 8E [ ︀ 𝑃 𝑡 ] ︀ + 8̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ , ( 70 ) where in ( 𝑖 ) we use ( 119 ) , ( 𝑖𝑖 ) is due to 𝛼𝑤 > 0 , ( 𝑖𝑖𝑖 ) holds by Assumption 1 . In the last step we apply the definition of 𝑃 𝑡 = 1𝑛 ∑︀𝑛 𝑖=1 ‖̃︀𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ‖2 , and 𝑅𝑡 = ⃦⃦𝑥𝑡+1 − 𝑥𝑡⃦⃦2 Finally , plugging ( 70 ) into ( 68 ) , we conclude the proof . G.1 CONVERGENCE FOR GENERAL NON-CONVEX FUNCTIONS Theorem 9 . Let Assumption 1 hold , and let the stepsize in Algorithm 5 be set as 0 < 𝛾 ≤ ( ︃ 𝐿 + ̃︀𝐿√︃16𝛽𝑀 𝜃𝑀 + 2𝛽𝑤 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ ) ︃−1 ( 71 ) Fix 𝑇 ≥ 1 and let ? ̂ ? 𝑇 be chosen from the iterates 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Then E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 2E [ ︀Ψ0 ] ︀ 𝛾𝑇 , ( 72 ) where Ψ𝑡 def = 𝑓 ( 𝑥𝑡 ) −𝑓 inf + 𝛾𝜃𝑀 ‖𝑔 𝑡 − ̃︀𝑔𝑡‖2 + 𝛾𝜃𝑤 ( ︁1 + 8𝛽𝑀𝜃𝑀 ) ︁𝑃 𝑡 , ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃𝑤 def= 1− ( 1− 𝛼𝑤 ) ( 1 + 𝑠 ) , 𝛽𝑤 def = ( 1−𝛼𝑤 ) ( ︀ 1 + 𝑠−1 ) ︀ , 𝜃𝑀 def = 1− ( 1−𝛼𝑀 ) ( 1 +𝜌 ) , 𝛽𝑀 def = ( 1−𝛼𝑀 ) ( ︀ 1 + 𝜌−1 ) ︀ for any 𝜌 , 𝑠 > 0 . Proof . We apply Lemma 16 and split the error ‖𝑔𝑡 −∇𝑓 ( 𝑥𝑡 ) ‖2 in two parts 𝑓 ( 𝑥𝑡+1 ) ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 2 ⃦⃦ 𝑔𝑡 −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 +𝛾 ⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 + 𝛾 ⃦⃦̃︀𝑔𝑡 −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 +𝛾 1 𝑛 𝑛∑︁ 𝑖=1 ⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 + 𝛾 1 𝑛 𝑛∑︁ 𝑖=1 ⃦⃦̃︀𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ⃦⃦2 = 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ 𝑅𝑡 + 𝛾 ⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 + 𝛾𝑃 𝑡 , ( 73 ) where we used notation 𝑅𝑡 = ‖𝛾𝑔𝑡‖2 = ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 , 𝑃 𝑡 = 1𝑛 ∑︀𝑛 𝑖=1 ‖̃︀𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ‖2 and applied ( 118 ) and ( 119 ) . Subtracting 𝑓 inf from both sides of the above inequality , taking expectation and using the notation 𝛿𝑡 = 𝑓 ( 𝑥𝑡+1 ) − 𝑓 inf , we get E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 𝛾E [ ︁⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁+ 𝛾E [ ︀𝑃 𝑡 ] ︀ . ( 74 ) Further , Lemma 7 and 8 provide the recursive bounds for the last two terms of ( 74 ) E [ ︀ 𝑃 𝑡+1 ] ︀ ≤ ( 1 − 𝜃𝑤 ) E [ ︀ 𝑃 𝑡 ] ︀ + 𝛽𝑤̃︀𝐿2E [ 𝑅𝑡 ] , ( 75 ) E [ ︁⃦⃦ 𝑔𝑡+1 − ̃︀𝑔𝑡+1⃦⃦2 ] ︁ ≤ ( 1 − 𝜃𝑀 ) E [ ︁⃦⃦𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁+ 8𝛽𝑀 ̃︀𝐿2E [ 𝑅𝑡 ] + 8𝛽𝑀E [ ︀𝑃 𝑡 ] ︀ . ( 76 ) Summing up ( 74 ) with a 𝛾𝜃𝑀 multiple of ( 76 ) we obtain E [ ︀ 𝛿𝑡+1 ] ︀ + 𝛾 𝜃𝑀 E [ ︁⃦⃦ 𝑔𝑡+1 − ̃︀𝑔𝑡+1⃦⃦2 ] ︁ ≤ E [ ︀𝛿𝑡 ] ︀− 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ +𝛾E [ ︁⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁+ 𝛾E [ ︀𝑃 𝑡 ] ︀ + 𝛾 𝜃𝑀 ( ︁ ( 1 − 𝜃𝑀 ) E [ ︁⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁ ) ︁ + 𝛾 𝜃𝑀 ( ︁ 8𝛽𝑀 ̃︀𝐿2E [ ︀𝑅𝑡 ] ︀+ 8𝛽𝑀E [ ︀𝑃 𝑡 ] ︀ ) ︁ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 𝜃𝑀 E [ ︁⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁− 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ − ( ︃ 1 2𝛾 − 𝐿 2 − 8𝛾𝛽𝑀 ̃︀𝐿2 𝜃𝑀 ) ︃ E [ ︀ 𝑅𝑡 ] ︀ +𝛾 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ . Then adding the above inequality with a 𝛾𝜃𝑤 ( ︁ 1 + 8𝛽𝑀𝜃𝑀 ) ︁ multiple of ( 75 ) , we get E [ ︀ Ψ𝑡+1 ] ︀ = E [ ︀ 𝛿𝑡+1 ] ︀ + 𝛾 𝜃𝑀 E [ ︁⃦⃦ 𝑔𝑡+1 − ̃︀𝑔𝑡+1⃦⃦2 ] ︁+ 𝛾 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ E [ ︀ 𝑃 𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 𝜃𝑀 E [ ︁⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁− 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁− ( ︃ 1 2𝛾 − 𝐿 2 − 8𝛾𝛽𝑀 ̃︀𝐿2 𝜃𝑀 ) ︃ E [ ︀ 𝑅𝑡 ] ︀ +𝛾 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ + 𝛾 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ ( ︁ ( 1 − 𝜃𝑤 ) E [ ︀ 𝑃 𝑡 ] ︀ + 𝛽𝑤̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ ) ︁ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 𝜃𝑀 E [ ︁⃦⃦ 𝑔𝑡 − ̃︀𝑔𝑡⃦⃦2 ] ︁+ 𝛾 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ E [ ︀ 𝑃 𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ − ( ︃ 1 2𝛾 − 𝐿 2 − 8𝛾𝛽𝑀 ̃︀𝐿2 𝜃𝑀 − 𝛾 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ 𝛽𝑤̃︀𝐿2 ) ︃E [ ︀𝑅𝑡 ] ︀ = E [ ︀ Ψ𝑡 ] ︀ − 𝛾 2 E [ ︁⃦⃦ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ − ( ︃ 1 2𝛾 − 𝐿 2 − 8𝛾𝛽𝑀 ̃︀𝐿2 𝜃𝑀 − 𝛾𝛽𝑤 ̃︀𝐿2 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ ) ︃ E [ ︀ 𝑅𝑡 ] ︀ . ( 77 ) Thus by Lemma 15 and the stepsize choice 0 < 𝛾 ≤ ( ︃ 𝐿 + ̃︀𝐿√︃16𝛽𝑀 𝜃𝑀 + 2𝛽𝑤 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ ) ︃−1 ( 78 ) the last term in ( 77 ) is not positive . By summing up inequalities for 𝑡 = 0 , . . . , 𝑇 − 1 , we get 0 ≤ E [ ︀ Ψ𝑇 ] ︀ ≤ E [ ︀ Ψ0 ] ︀ − 𝛾 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ . Multiplying both sides by 2𝛾𝑇 and rearranging we get 𝑇−1∑︁ 𝑡=0 1 𝑇 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2E [ ︀Ψ0 ] ︀ 𝛾𝑇 . It remains to notice that the left hand side can be interpreted as E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ , where ? ̂ ? 𝑇 is chosen from 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Corollary 14 . Let assumption of Theorem 9 hold , 𝑔0 = ∇𝑓 ( 𝑥0 ) , ̃︀𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = ( ︃ 𝐿 + ̃︀𝐿√︃16𝛽𝑀 𝜃𝑀 + 2𝛽𝑤 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ ) ︃−1 , Then , after 𝑇 iterations/communication rounds of EF21-BC we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = # grad = 𝒪 ( ︃ ̃︀𝐿𝛿0 𝛼𝑤𝛼𝑀𝜀2 ) ︃ ( 79 ) iterations/communications rounds/gradint computations at each node . Proof . Note that by Lemma 17 and 𝛼𝑀 , 𝛼𝑤 ≤ 1 , we have 16𝛽𝑀 𝜃𝑀 + 2𝛽𝑤 𝜃𝑤 ( ︂ 1 + 8𝛽𝑀 𝜃𝑀 ) ︂ ≤ 16 4 𝛼2𝑀 + 2 4 𝛼2𝑤 ( ︂ 1 + 8 4 𝛼2𝑀 ) ︂ ≤ 64 𝛼2𝑀 + 8 𝛼2𝑤 33 𝛼2𝑀 ≤ 64 + 8 · 33 𝛼2𝑤𝛼 2 𝑀 . It remains to apply the steps similar to those in the proof of Corollary 2 . G.2 CONVERGENCE UNDER POLYAK-ŁOJASIEWICZ CONDITION Theorem 10 . Let Assumptions 1 and 4 hold , and let the stepsize in Algorithm 3 be set as 0 < 𝛾 ≤ min { ︂ 𝛾0 , 𝜃𝑀 2𝜇 , 𝜃𝑤 2𝜇 } ︂ , ( 80 ) where 𝛾0 def = ( ︂ 𝐿 + ̃︀𝐿√︂ 32𝛽𝑀𝜃𝑀 + 4𝛽𝑤̃︀𝐿2𝜃𝑤 ( ︁1 + 16𝛽𝑀𝜃𝑀 ) ︁ ) ︂−1 , ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃𝑤 def= 1− ( 1−𝛼𝑤 ) ( 1+ 𝑠 ) , 𝛽𝑤 def = ( 1 − 𝛼𝑤 ) ( ︀ 1 + 𝑠−1 ) ︀ , 𝜃𝑀 def = 1 − ( 1 − 𝛼𝑀 ) ( 1 + 𝜌 ) , 𝛽𝑀 def = ( 1 − 𝛼𝑀 ) ( ︀ 1 + 𝜌−1 ) ︀ for any 𝜌 , 𝑠 > 0 . Let Ψ𝑡 def = 𝑓 ( 𝑥𝑡 ) − 𝑓 inf + 𝛾𝜃𝑀 ‖𝑔 𝑡 − ̃︀𝑔𝑡‖2 + 𝛾𝜃𝑤 ( ︁1 + 8𝛽𝑀𝜃𝑀 ) ︁𝑃 𝑡 . Then for any 𝑇 ≥ 0 , we have E [ ︀ Ψ𝑇 ] ︀ ≤ ( 1 − 𝛾𝜇 ) 𝑇E [ ︀ Ψ0 ] ︀ . ( 81 ) Proof . Similarly to the proof of Theorem 9 the inequalities ( 74 ) , ( 75 ) , ( 76 ) hold with 𝛿𝑡 = 𝑓 ( 𝑥𝑡 ) − 𝑓 ( 𝑥⋆ ) . It remains to apply the steps similar to those in the proof of Theorem 6 . Corollary 15 . Let assumption of Theorem 10 hold , 𝑔0 = ∇𝑓 ( 𝑥0 ) , ̃︀𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = min { ︂ 𝛾0 , 𝜃𝑀 2𝜇 , 𝜃𝑤 2𝜇 } ︂ , 𝛾0 = ⎛⎝𝐿 + ̃︀𝐿 √︃ 32𝛽𝑀 𝜃𝑀 + 4𝛽𝑤̃︀𝐿2 𝜃𝑤 ( ︂ 1 + 16𝛽𝑀 𝜃𝑀 ) ︂⎞⎠−1 , Then , after 𝑇 iterations of EF21-PAGE we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 inf ] ︀ ≤ 𝜀 . It requires 𝑇 = # grad = 𝒪 ( ︃ ̃︀𝐿 𝜇𝛼𝑤𝛼𝑀 ln ( ︂ 𝛿0 𝜀 ) ︂ ) ︃ iterations/communications rounds/gradint computations at each node . H HEAVY BALL MOMENTUM Notations for this section : 𝑅𝑡 = ‖𝛾𝑔𝑡‖2 = ( 1 − 𝜂 ) 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 . In this section , we study the momentum version of EF21 . In particular , we focus on Polyak style momentum ( Polyak , 1964 ; Yang et al. , 2016 ) . Let 𝑔𝑡 be a gradient estimator at iteration 𝑡 , then the update rule of heavy ball ( HB ) is given by 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑔𝑡 + 𝜂 ( ︀ 𝑥𝑡 − 𝑥𝑡−1 ) ︀ , where 𝑥−1 = 𝑥0 , 𝜂 ∈ [ 0 , 1 ) is called the momentum parameter , and 𝛾 > 0 is the stepsize . The above update rule can be viewed as a combination of the classical gradient step 𝑦𝑡 = 𝑥𝑡 − 𝛾𝑔𝑡 followed by additional momentum step 𝑥𝑡+1 = 𝑦𝑡 + 𝜂 ( ︀ 𝑥𝑡 − 𝑥𝑡−1 ) ︀ . Here the momentum term is added to accelerate the convergence and make the trajectory look like a smooth descent to the bottom of the ravine , rather than zigzag . Equivalently , the update of HB can be implemented by the following two steps ( Yang et al. , 2016 ) : { ︂ 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑣𝑡 𝑣𝑡+1 = 𝜂𝑣𝑡 + 𝑔𝑡+1 . We are now ready to present the distributed variant of heavy ball method enhanced with a contractive compressor 𝒞 , and EF21 mechanism , which we call EF21-HB ( Algorithm 6 ) . We present the complexity results in Theorem 11 and Corollary 16 . Algorithm 6 EF21-HB 1 : Input : starting point 𝑥0 ∈ R𝑑 ; 𝑔0𝑖 ∈ R𝑑 for 𝑖 = 1 , . . . , 𝑛 ( known by nodes ) ; 𝑣0 = 𝑔0 = 1 𝑛 ∑︀𝑛 𝑖=1 𝑔 0 𝑖 ( known by master ) ; learning rate 𝛾 > 0 ; momentum parameter 0 ≤ 𝜂 < 1 2 : for 𝑡 = 0,1 , 2 , . . . , 𝑇 − 1 do 3 : Master computes 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑣𝑡 and broadcasts 𝑥𝑡+1 to all nodes 4 : for all nodes 𝑖 = 1 , . . . , 𝑛 in parallel do 5 : Compress 𝑐𝑡𝑖 = 𝒞 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ) and send 𝑐𝑡𝑖 to the master 6 : Update local state 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 + 𝑐 𝑡 𝑖 7 : end for 8 : Master computes 𝑔𝑡+1 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 𝑡+1 𝑖 via 𝑔 𝑡+1 = 𝑔𝑡 + 1𝑛 ∑︀𝑛 𝑖=1 𝑐 𝑡 𝑖 , and 𝑣 𝑡+1 = 𝜂𝑣𝑡 + 𝑔𝑡+1 9 : end for In the analysis of EF21-HB , we assume by default that 𝑣−1 = 0 . Lemma 9 . Let sequences { 𝑥𝑡 } 𝑡≥0 , and { 𝑣𝑡 } 𝑡≥0 be generated by Algorithm 6 and let the sequence { 𝑧𝑡 } 𝑡≥0 be defined as 𝑧𝑡+1 def = 𝑥𝑡+1 − 𝛾𝜂1−𝜂𝑣 𝑡 with 0 ≤ 𝜂 < 1 . Then for all 𝑡 ≥ 0 𝑧𝑡+1 = 𝑧𝑡 − 𝛾 1 − 𝜂 𝑔𝑡 . Proof . 𝑧𝑡+1 ( 𝑖 ) = 𝑥𝑡+1 − 𝛾𝜂 1 − 𝜂 𝑣𝑡 ( 𝑖𝑖 ) = 𝑥𝑡 − 𝛾𝑣𝑡 − 𝛾𝜂 1 − 𝜂 𝑣𝑡 ( 𝑖𝑖𝑖 ) = 𝑧𝑡 + 𝛾𝜂 1 − 𝜂 𝑣𝑡−1 − 𝛾 1 − 𝜂 𝑣𝑡 = 𝑧𝑡 − 𝛾 1 − 𝜂 ( ︀ 𝑣𝑡 − 𝜂𝑣𝑡−1 ) ︀ = 𝑧𝑡 − 𝛾 1 − 𝜂 𝑔𝑡 , where in ( 𝑖 ) and ( 𝑖𝑖𝑖 ) we use the definition of 𝑧𝑡+1 and 𝑧𝑡 , in ( 𝑖𝑖 ) we use the step 𝑥𝑡+1 = 𝑥𝑡 − 𝛾𝑣𝑡 ( line 3 of Algorithm 6 ) . Finally , the last equality follows by the update 𝑣𝑡+1 = 𝜂𝑣𝑡 + 𝑔𝑡+1 ( line 8 of Algorithm 6 ) . Lemma 10 . Let the sequence { 𝑣𝑡 } 𝑡≥0 be defined as 𝑣𝑡+1 = 𝜂𝑣𝑡 + 𝑔𝑡+1 with 0 ≤ 𝜂 < 1 . Then 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑣𝑡 ⃦⃦2 ≤ 1 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑔𝑡 ⃦⃦2 . Proof . Unrolling the given recurrence and noticing that 𝑣−1 = 0 , we have 𝑣𝑡 = ∑︀𝑡 𝑙=0 𝜂 𝑡−𝑙𝑔𝑙 . Define 𝐻 def = ∑︀𝑡 𝑙=0 𝜂 𝑙 ≤ 11−𝜂 . Then by Jensen ’ s inequality 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑣𝑡 ⃦⃦2 = 𝐻2 𝑇−1∑︁ 𝑡=0 ⃦⃦⃦⃦ ⃦ 𝑡∑︁ 𝑙=0 𝜂𝑡−𝑙 𝐻 𝑔𝑙 ⃦⃦⃦⃦ ⃦ 2 ≤ 𝐻2 𝑇−1∑︁ 𝑡=0 𝑡∑︁ 𝑙=0 𝜂𝑡−𝑙 𝐻 ⃦⃦ 𝑔𝑙 ⃦⃦2 = 𝐻 𝑇−1∑︁ 𝑡=0 𝑡∑︁ 𝑙=0 𝜂𝑡−𝑙 ⃦⃦ 𝑔𝑙 ⃦⃦2 ≤ 1 1 − 𝜂 𝑇−1∑︁ 𝑡=0 𝑡∑︁ 𝑙=0 𝜂𝑡−𝑙 ⃦⃦ 𝑔𝑙 ⃦⃦2 = 1 1 − 𝜂 𝑇−1∑︁ 𝑙=0 ⃦⃦ 𝑔𝑙 ⃦⃦2 𝑇−1∑︁ 𝑡=𝑙 𝜂𝑡−𝑙 ≤ 1 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑔𝑡 ⃦⃦2 . Lemma 11 . Let the sequence { 𝑧𝑡 } 𝑡≥0 be defined as 𝑧𝑡+1 def = 𝑥𝑡+1 − 𝛾𝜂1−𝜂𝑣 𝑡 with 0 ≤ 𝜂 < 1 . Then 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + 2𝛽̃︀𝐿2 ( 1 + 4𝜂2 ) 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ , where 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀ 1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . Summing up the inequality in Lemma 1 ( for EF21 estimator ) for 𝑡 = 0 , . . . , 𝑇 − 1 , we have 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + 𝛽̃︀𝐿2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ . ( 82 ) It remains to bound ∑︀𝑇−1 𝑡=0 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ . Notice that by definition of { 𝑧𝑡 } 𝑡≥0 , we have 𝑥𝑡+1 − 𝑥𝑡 = 𝑧𝑡+1 − 𝑧𝑡 + 𝛾𝜂 1 − 𝜂 ( ︀ 𝑣𝑡 − 𝑣𝑡−1 ) ︀ . Thus 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ ≤ 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ + 2𝛾2𝜂2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑣𝑡 − 𝑣𝑡−1 ⃦⃦2 ] ︁ = 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ + 2𝛾2𝜂2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑔𝑡 − ( 1 − 𝜂 ) 𝑣𝑡−1 ⃦⃦2 ] ︁ ≤ 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ + 4𝛾2𝜂2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑔𝑡 ⃦⃦2 ] ︁ + 4𝛾2𝜂2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 ( 1 − 𝜂 ) 2E [ ︀ ‖𝑣𝑡−1‖2 ] ︀ ( 𝑖 ) ≤ 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ + 4𝛾2𝜂2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑔𝑡 ⃦⃦2 ] ︁ + 4𝛾2𝜂2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑔𝑡 ⃦⃦2 ] ︁ = 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ + 8𝛾2𝜂2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑔𝑡 ⃦⃦2 ] ︁ ( 𝑖𝑖 ) = 2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ + 8𝜂2 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ = 2 ( 1 + 4𝜂2 ) 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ] ︁ , where in ( 𝑖 ) we apply Lemma 10 , and in ( 𝑖𝑖 ) Lemma 9 is utilized . It remains to plug in the above inequality into ( 82 ) Lemma 12 . Let the sequence { 𝑧𝑡 } 𝑡≥0 be generated as in Lemma 9 , i.e. , 𝑧𝑡+1 = 𝑧𝑡 − 𝛾 1−𝜂 𝑔 𝑡 , then for all 𝑡 ≥ 0 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ≤ 2𝐺𝑡 + 2 ( 1 − 𝜂 ) 2 𝛾2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 with 𝐺𝑡 = 1𝑛 ∑︀𝑛 𝑖=1 ‖∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑔𝑡𝑖‖ 2 . Proof . Notice that for 𝛾 > 0 we have ∇𝑓 ( 𝑥𝑡 ) = ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 − 1−𝜂𝛾 ( 𝑧 𝑡+1 − 𝑧𝑡 ) . Then ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ≤ 2 ⃦⃦∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡⃦⃦2 + 2 ( 1 − 𝜂 ) 2 𝛾2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ≤ 2 𝑛 𝑛∑︁ 𝑖=1 ⃦⃦ ∇𝑓𝑖 ( 𝑥𝑡 ) − 𝑔𝑡𝑖 ⃦⃦2 + 2 ( 1 − 𝜂 ) 2 𝛾2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 , where the inequalities hold due to ( 118 ) with 𝑠 = 1 , and ( 119 ) . H.1 CONVERGENCE FOR GENERAL NON-CONVEX FUNCTIONS Theorem 11 . Let Assumption 1 hold , and let the stepsize in Algorithm 6 be set as 0 < 𝛾 < ( ︃ ( 1 + 𝜂 ) 𝐿 2 ( 1 − 𝜂 ) 2 + ̃︀𝐿 1 − 𝜂 √︂ 2𝛽 𝜃 ( 1 + 4𝜂2 ) ) ︃−1 def = 𝛾0 , ( 83 ) where 0 ≤ 𝜂 < 1 , 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀ 1 + 𝑠−1 ) ︀ , and 𝑠 > 0 . Fix 𝑇 ≥ 1 and let ? ̂ ? 𝑇 be chosen from the iterates 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Then 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 3𝛿0 ( 1 − 𝜂 ) 𝑇𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ + E [ ︀𝐺0 ] ︀ 𝜃𝑇 ⎛⎝2 + 1 2𝜆1 3 ( 1 − 𝜂 ) 𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ ⎞⎠ , ( 84 ) where 𝜆1 def = ̃︀𝐿√︁ 2𝛽𝜃 ( 1 + 4𝜂2 ) . If the stepsize is set to 0 < 𝛾 ≤ 𝛾0/2 , then 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 6𝛿0 ( 1 − 𝜂 ) 𝛾𝑇 + E [ ︀ 𝐺0 ] ︀ 𝑇𝜃 ⎛⎝2 + 3 ( 1 − 𝜂 ) 𝛾̃︀𝐿√︁ 2𝛽𝜃 ( 1 + 4𝜂2 ) ⎞⎠ . ( 85 ) Proof . Consider the sequence 𝑧𝑡+1 def= 𝑥𝑡+1 − 𝛾𝜂1−𝜂𝑣 𝑡 with 0 ≤ 𝜂 < 1 . Then Lemma 9 states that 𝑧𝑡+1 = 𝑧𝑡 − 𝛾1−𝜂 𝑔 𝑡 . By 𝐿-smoothness of 𝑓 ( · ) 𝑓 ( 𝑧𝑡+1 ) − 𝑓 ( 𝑧𝑡 ) ≤ ⟨∇𝑓 ( 𝑧𝑡 ) , 𝑧𝑡+1 − 𝑧𝑡⟩ + 𝐿 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 = ⟨∇𝑓 ( 𝑧𝑡 ) − 𝑔𝑡 , 𝑧𝑡+1 − 𝑧𝑡⟩ + ⟨𝑔𝑡 , 𝑧𝑡+1 − 𝑧𝑡⟩ + 𝐿 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ( 𝑖 ) = ⟨∇𝑓 ( 𝑧𝑡 ) − 𝑔𝑡 , 𝑧𝑡+1 − 𝑧𝑡⟩ − 1 − 𝜂 𝛾 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 + 𝐿 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 = ⟨∇𝑓 ( 𝑧𝑡 ) − 𝑔𝑡 , 𝑧𝑡+1 − 𝑧𝑡⟩ − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 ) ︂ ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 = ⟨∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 , 𝑧𝑡+1 − 𝑧𝑡⟩ + ⟨∇𝑓 ( 𝑧𝑡 ) −∇𝑓 ( 𝑥𝑡 ) , 𝑧𝑡+1 − 𝑧𝑡⟩ − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 ) ︂ ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ( 𝑖𝑖 ) ≤ 1 2𝜆1 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 + 𝜆1 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 + 1 2𝜆2 ⃦⃦ ∇𝑓 ( 𝑧𝑡 ) −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 + 𝜆2 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 − ( ︂1 − 𝜂 𝛾 − 𝐿 2 ) ︂ ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 = 1 2𝜆1 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 + 1 2𝜆2 ⃦⃦ ∇𝑓 ( 𝑧𝑡 ) −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 ) ︂ ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ( 𝑖𝑖𝑖 ) ≤ 1 2𝜆1 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 + 𝐿2 2𝜆2 ⃦⃦ 𝑧𝑡 − 𝑥𝑡 ⃦⃦2 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 ) ︂ ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ( 𝑖𝑣 ) ≤ 1 2𝜆1 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 + 𝛾2𝜂2𝐿2 2𝜆2 ( 1 − 𝜂 ) 2 ⃦⃦ 𝑣𝑡−1 ⃦⃦2 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 ) ︂ ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 , where in ( 𝑖 ) Lemma 9 is applied , in ( 𝑖𝑖 ) the inequality ( 115 ) is applied twice for 𝜆1 , 𝜆2 > 0 , ( 𝑖𝑖𝑖 ) holds due to Assumption 1 , and ( 𝑖𝑣 ) holds by definition of 𝑧𝑡 = 𝑥𝑡 − 𝛾𝜂1−𝜂𝑣 𝑡−1 . Summing up the above inequalities for 𝑡 = 0 , . . . , 𝑇 − 1 ( assuming 𝑣−1 = 0 ) , we have 𝑓 ( 𝑧𝑇 ) ≤ 𝑓 ( 𝑧0 ) + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 + 𝛾2𝜂2𝐿2 2𝜆2 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑣𝑡 ⃦⃦2 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 ) ︂ 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ( 𝑖 ) ≤ 𝑓 ( 𝑧0 ) + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 + 𝛾2𝜂2𝐿2 2𝜆2 ( 1 − 𝜂 ) 4 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑔𝑡 ⃦⃦2 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 ) ︂ 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ( 𝑖𝑖 ) = 𝑓 ( 𝑧0 ) + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 + 𝛾2𝜂2𝐿2 2𝜆2 ( 1 − 𝜂 ) 4 𝑇−1∑︁ 𝑡=0 ( 1 − 𝜂 ) 2 𝛾2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 ) ︂ 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 = 𝑓 ( 𝑧0 ) + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡 ⃦⃦2 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 − 𝜂 2𝐿2 2𝜆2 ( 1 − 𝜂 ) 2 ) ︂ 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 ( 𝑖𝑖𝑖 ) ≤ 𝑓 ( 𝑧0 ) + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 𝐺𝑡 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜆2 2 − 𝜂 2𝐿2 2𝜆2 ( 1 − 𝜂 ) 2 ) ︂ 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 = 𝑓 ( 𝑧0 ) + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 𝐺𝑡 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜂𝐿 ( 1 − 𝜂 ) ) ︂ 𝑇−1∑︁ 𝑡=0 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 = 𝑓 ( 𝑧0 ) + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 𝐺𝑡 − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜂𝐿 ( 1 − 𝜂 ) ) ︂ 1 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 𝑅𝑡 , where ( 𝑖 ) holds due to Lemma 10 , in ( 𝑖𝑖 ) Lemma 9 is applied , in ( 𝑖𝑖𝑖 ) we apply ‖∇𝑓 ( 𝑥𝑡 ) − 𝑔𝑡‖2 ≤ 𝐺𝑡 . Finally , in the last two steps we choose 𝜆2 = 𝜂𝐿1−𝜂 , and recall the definition 𝑅 𝑡 = ‖𝛾𝑔𝑡‖2 = ( 1 − 𝜂 ) 2 ⃦⃦ 𝑧𝑡+1 − 𝑧𝑡 ⃦⃦2 . Subtracting 𝑓 inf from both sides of the above inequality , taking expectation and using the notation 𝛿𝑡 = 𝑓 ( 𝑧𝑡 ) − 𝑓 inf , we get E [ ︀ 𝛿𝑇 ] ︀ ≤ E [ ︀ 𝛿0 ] ︀ + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ − ( ︂ 1 − 𝜂 𝛾 − 𝐿 2 − 𝜆1 2 − 𝜂𝐿 ( 1 − 𝜂 ) ) ︂ 1 ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ . ( 86 ) By Lemma 11 , we have 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + 2𝛽̃︀𝐿2 ( 1 + 4𝜂2 ) ( 1 − 𝜂 ) 2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ . ( 87 ) Next , we are going to add ( 86 ) with a 12𝜃𝜆1 multiple of ( 87 ) . First , let us `` forget '' , for a moment , about all the terms involving 𝑅𝑡 and denote their sum appearing on the right hand side by ℛ , then E [ ︀ 𝛿𝑇 ] ︀ + 1 2𝜃𝜆1 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ E [ ︀ 𝛿0 ] ︀ + 1 2𝜆1 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + ( 1 − 𝜃 ) 1 2𝜆1 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + ℛ = E [ ︀ 𝛿0 ] ︀ + 1 2𝜃𝜆1 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + ℛ. Canceling out the same terms in both sides of the above inequality , we get E [ ︀ 𝛿𝑇 ] ︀ + 1 2𝜃𝜆1 E [ ︀ 𝐺𝑇 ] ︀ ≤ E [ ︀ 𝛿0 ] ︀ + 1 2𝜃𝜆1 E [ ︀ 𝐺0 ] ︀ + ℛ , where ℛ def= − ( ︁ 1−𝜂 𝛾 − 𝐿 2 ( ︁ 1 + 2𝜂1−𝜂 ) ︁ − 𝜆12 − 𝛽̃︀𝐿2 ( 1+4𝜂2 ) 𝜃𝜆1 ) ︁ 1 ( 1−𝜂 ) 2 ∑︀𝑇−1 𝑡=0 E [ 𝑅𝑡 ] . Now choosing 𝜆1 = ̃︀𝐿√︁ 2𝛽𝜃 ( 1 + 4𝜂2 ) and using the definition of 𝛾0 given by ( 83 ) , i.e. , 𝛾0 def= ( ︂ ( 1+𝜂 ) 𝐿 2 ( 1−𝜂 ) 2 + ̃︀𝐿 1−𝜂 √︁ 2𝛽 𝜃 ( 1 + 4𝜂 2 ) ) ︂−1 , we have ( ︃ 1 − 𝜂 𝛾 − 𝐿 2 ( ︂ 1 + 2𝜂 1 − 𝜂 ) ︂ − 𝜆1 2 − 𝛽 ̃︀𝐿2 ( 1 + 4𝜂2 ) 𝜃𝜆1 ) ︃ 1 ( 1 − 𝜂 ) 2 = ( ︃ 1 − 𝜂 𝛾 − 𝐿 2 ( ︂ 1 + 2𝜂 1 − 𝜂 ) ︂ − ̃︀𝐿√︂2𝛽 𝜃 ( 1 + 4𝜂2 ) ) ︃ 1 ( 1 − 𝜂 ) 2 = ( ︃ 1 𝛾 − 𝐿 2 1 + 𝜂 ( 1 − 𝜂 ) 2 − ̃︀𝐿 1 − 𝜂 √︂ 2𝛽 𝜃 ( 1 + 4𝜂2 ) ) ︃ 1 1 − 𝜂 = ( ︂ 1 𝛾 − 1 𝛾0 ) ︂ 1 1 − 𝜂 . Then 0 ≤ E [ ︀ Φ𝑇 ] ︀ def = E [ ︂ 𝛿𝑇 + 1 2𝜃𝜆1 𝐺𝑇 ] ︂ ≤ E [ ︂ 𝛿0 + 1 2𝜃𝜆1 𝐺0 ] ︂ − ( ︂ 1 𝛾 − 1 𝛾0 ) ︂ 1 1 − 𝜂 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ = E [ ︀ Φ0 ] ︀ − ( ︂ 1 𝛾 − 1 𝛾0 ) ︂ 1 1 − 𝜂 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ . After rearranging , we get 1 𝛾2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ ≤ E [ ︀ Φ0 ] ︀ ( 1 − 𝜂 ) 𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ . Summing the result of Lemma 12 over 𝑡 = 0 , . . . , 𝑇 − 1 and applying expectation , we get 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + 2 𝛾2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ . Due to Lemma 11 , the conditions of Lemma 18 hold with 𝐶 def= 2𝛽̃︀𝐿2 1+4𝜂2 ( 1−𝜂 ) 2 , 𝑠𝑡 = E [ 𝐺𝑡 ] , 𝑟𝑡 = E [ 𝑅𝑡 ] , thus 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ ≤ E [ ︀ 𝐺0 ] ︀ 𝜃 + 𝐶 𝜃 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ . Combining the above inequalities , we can continue with 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ + 2 𝛾2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ ≤ 2E [ ︀ 𝐺0 ] ︀ 𝜃 + ( ︂ 2 + 𝛾2𝐶 𝜃 ) ︂ 1 𝛾2 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ ≤ 2E [ ︀ 𝐺0 ] ︀ 𝜃 + ( ︂ 2 + 𝛾2𝐶 𝜃 ) ︂ E [ ︀ Φ0 ] ︀ ( 1 − 𝜂 ) 𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ . Note that for 𝛾 < 𝛾0 = ( ︁ ( 1+𝜂 ) 𝐿 2 ( 1−𝜂 ) 2 + √︁ 𝐶 𝜃 ) ︁−1 , we have 𝛾2𝐶 𝜃 < 𝐶 𝜃 ( ︁ ( 1+𝜂 ) 𝐿 2 ( 1−𝜂 ) 2 + √︁ 𝐶 𝜃 ) ︁2 ≤ 1 . ( 88 ) Thus 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ ≤ 2E [ ︀𝐺0 ] ︀ 𝜃 + 3E [ ︀ Φ0 ] ︀ ( 1 − 𝜂 ) 𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ = 3𝛿0 ( 1 − 𝜂 ) 𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ + E [ ︀𝐺0 ] ︀ 𝜃 ⎛⎝2 + 1 2𝜆1 3 ( 1 − 𝜂 ) 𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ ⎞⎠ , where 𝜆1 = ̃︀𝐿√︁ 2𝛽𝜃 ( 1 + 4𝜂2 ) . Corollary 16 . Let assumptions of Theorem 11 hold , 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = ( ︃ ( 1 + 𝜂 ) 𝐿 2 ( 1 − 𝜂 ) 2 + ̃︀𝐿 1 − 𝜂 √︂ 2𝛽 𝜃 ( 1 + 4𝜂2 ) ) ︃−1 . Then , after 𝑇 iterations/communication rounds of EF21-HB we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires 𝑇 = # grad = 𝒪 ( ︃ ̃︀𝐿𝛿0 𝜀2 ( ︂ 1 𝛼 + 1 1 − 𝜂 ) ︂ ) ︃ ( 89 ) iterations/communications rounds/gradint computations at each node . Proof . Notice that by using 𝐿 ≤ ̃︀𝐿 , 𝜂 < 1 and Lemma 17 , we have ( 1 + 𝜂 ) 𝐿 2 ( 1 − 𝜂 ) 2 + ̃︀𝐿 1 − 𝜂 √︂ 2𝛽 𝜃 ( 1 + 4𝜂2 ) ≤ ̃︀𝐿 ( 1 − 𝜂 ) 2 + ̃︀𝐿 1 − 𝜂 √︂ 10𝛽 𝜃 ≤ ̃︀𝐿 1 − 𝜂 ( ︃ 1 1 − 𝜂 + 2 √ 10 𝛼 ) ︃ . Using the above inequality , ( 85 ) , and ( 83 ) , we get # grad = 𝑇≤6𝛿 0 ( 1 − 𝜂 ) 𝛾𝜀2 ≤6𝛿 0 ( 1 − 𝜂 ) 𝜀2 ̃︀𝐿 1 − 𝜂 ( ︃ 1 1 − 𝜂 + 2 √ 10 𝛼 ) ︃ ≤ 6 ̃︀𝐿𝛿0 𝜀2 ( ︃ 1 1 − 𝜂 + 2 √ 10 𝛼 ) ︃ . I COMPOSITE CASE Now we focus on solving a composite optimization problem min 𝑥∈R𝑑 Φ ( 𝑥 ) def = 1 𝑛 𝑛∑︁ 𝑖=1 𝑓𝑖 ( 𝑥 ) + 𝑟 ( 𝑥 ) , ( 90 ) where each 𝑓𝑖 ( · ) is 𝐿𝑖-smooth ( possibly non-convex ) , 𝑟 ( · ) is convex , and Φinf = inf𝑥∈R𝑑 Φ ( 𝑥 ) > −∞ . This is a standard and important generalization of setting ( 1 ) . Namely , it includes three special cases . • Smooth unconstrained optimization . Set 𝑟 ≡ 0 , then we recover the initially stated problem formulation ( 1 ) . • Smooth optimization over convex set . Let 𝑟 = 𝛿𝑄 ( indicator function of the set 𝑄 ) , where 𝑄 is a nonempty closed convex set . Then ( 90 ) reduces to the problem of minimizing finite a sum of smooth ( possibly non-convex ) functions over a nonempty closed convex set min 𝑥∈𝑄 { ︃ 1 𝑛 𝑛∑︁ 𝑖=1 𝑓𝑖 ( 𝑥 ) } ︃ . • 𝑙1-regularized optimization . Choose 𝑟 ( 𝑥 ) = 𝜆‖𝑥‖1 with 𝜆 > 0 , then ( 90 ) amounts to the 𝑙1-regularized ( also known as LASSO ) problem min 𝑥∈R𝑑 { ︃ 1 𝑛 𝑛∑︁ 𝑖=1 𝑓𝑖 ( 𝑥 ) + 𝜆‖𝑥‖1 } ︃ . For any 𝛾 > 0 , 𝑥 ∈ R𝑑 , define a proximal mapping of function 𝑟 ( · ) ( prox-operator ) as prox𝛾𝑟 ( 𝑥 ) def = arg min 𝑦∈R𝑑 { ︂ 𝑟 ( 𝑦 ) + 1 2𝛾 ‖𝑦 − 𝑥‖2 } ︂ . ( 91 ) Throughout this section , we assume that the master node can efficiently compute prox-operator at every iteration . This is a reasonable assumption , and in many cases ( choices of 𝑟 ( · ) ) appearing in applications , there exists an analytical solution of ( 91 ) , or its computation is cheap compared to the aggregation step . To evaluate convergence in composite case , we define the generalized gradient mapping at a point 𝑥 ∈ R𝑑 with a parameter 𝛾 𝒢𝛾 ( 𝑥 ) def = 1 𝛾 ( ︀ 𝑥− prox𝛾𝑟 ( 𝑥− 𝛾∇𝑓 ( 𝑥 ) ) ) ︀ . ( 92 ) One can verify that the above quantity is a well-defined evaluation metric ( Beck , 2017 ) . Namely , for any 𝑥 * ∈ R𝑑 , it holds that 𝒢𝛾 ( 𝑥 ) = 0 if and only if 𝑥 * is a stationary point of ( 90 ) , and in a special case when 𝑟 ≡ 0 , we have 𝒢𝛾 ( 𝑥 ) = ∇𝑓 ( 𝑥 ) . Notations for this section : in this section we re-define 𝛿𝑡 def= Φ ( 𝑥𝑡 ) − Φinf Lemma 13 ( Gradient mapping bound ) . Let 𝑥𝑡+1 def= prox𝛾𝑟 ( 𝑥𝑡 − 𝛾𝑣𝑡 ) , then E [ ︁⃦⃦ 𝒢𝛾 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ ≤ 2 𝛾2 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 2E [ ︁⃦⃦ 𝑣𝑡 −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 ] ︁ . ( 93 ) Proof . E [ ︁⃦⃦ 𝒢𝛾 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ = 1 𝛾2 E [ ︁⃦⃦ 𝑥𝑡 − prox𝛾𝑟 ( 𝑥𝑡 − 𝛾∇𝑓 ( 𝑥𝑡 ) ) ⃦⃦2 ] ︁ ≤ 2 𝛾2 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 2 𝛾2 E [ ︁⃦⃦ 𝑥𝑡+1 − prox𝛾𝑟 ( 𝑥𝑡 − 𝛾∇𝑓 ( 𝑥𝑡 ) ) ⃦⃦2 ] ︁ = 2 𝛾2 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 2 𝛾2 E [ ︁⃦⃦ prox𝛾𝑟 ( 𝑥 𝑡 − 𝛾𝑣𝑡 ) − prox𝛾𝑟 ( 𝑥𝑡 − 𝛾∇𝑓 ( 𝑥𝑡 ) ) ⃦⃦2 ] ︁ ≤ 2 𝛾2 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 2 𝛾2 E [ ︁⃦⃦ ( 𝑥𝑡 − 𝛾𝑣𝑡 ) − ( 𝑥𝑡 − 𝛾∇𝑓 ( 𝑥𝑡 ) ) ⃦⃦2 ] ︁ = 2 𝛾2 E [ ︁⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ] ︁ + 2E [ ︁⃦⃦ 𝑣𝑡 −∇𝑓 ( 𝑥𝑡 ) ) ⃦⃦2 ] ︁ , ( 94 ) where in the last inequality we apply non-expansiveness of prox-operator . Lemma 14 . Let 𝑥𝑡+1 def= prox𝛾𝑟 ( 𝑥𝑡 − 𝛾𝑣𝑡 ) , then for any 𝜆 > 0 , Φ ( ︀ 𝑥𝑡+1 ) ︀ ≤ Φ ( ︀ 𝑥𝑡 ) ︀ + 1 2𝜆 ⃦⃦ 𝑣𝑡 −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 ) ︂ ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . ( 95 ) Proof . Define 𝑟 ( 𝑥 ) def= 𝑟 ( 𝑥 ) + 12𝛾 ‖𝑥− 𝑥 𝑡 + 𝛾𝑣𝑡‖2 , and note that 𝑥𝑡+1 = arg min𝑥∈R𝑑 { 𝑟 ( 𝑥 ) } . Since 𝑟 ( · ) is 1/𝛾 - strongly convex , we have 𝑟 ( 𝑥𝑡 ) ≥ 𝑟 ( 𝑥𝑡+1 ) + 1 2𝛾 ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 , 𝑟 ( 𝑥𝑡 ) + 1 2𝛾 ⃦⃦ 𝛾𝑣𝑡 ⃦⃦2 ≥ 𝑟 ( 𝑥𝑡+1 ) + 1 2𝛾 ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 + 𝛾𝑣𝑡 ⃦⃦2 + 1 2𝛾 ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . Thus 𝑟 ( 𝑥𝑡+1 ) − 𝑟 ( 𝑥𝑡 ) ≤ − 1 𝛾 ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 − ⟨𝑣𝑡 , 𝑥𝑡+1 − 𝑥𝑡⟩ . ( 96 ) By 𝐿 smoothness of 𝑓 ( · ) , 𝑓 ( ︀ 𝑥𝑡+1 ) ︀ − 𝑓 ( ︀ 𝑥𝑡 ) ︀ ≤ ⟨︀ ∇𝑓 ( ︀ 𝑥𝑡 ) ︀ , 𝑥𝑡+1 − 𝑥𝑡 ⟩︀ + 𝐿 2 ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . ( 97 ) Summing up ( 97 ) with ( 96 ) we obtain Φ ( ︀ 𝑥𝑡+1 ) ︀ − Φ ( ︀ 𝑥𝑡 ) ︀ ≤ ⟨∇𝑓 ( 𝑥𝑡 ) − 𝑣𝑡 , 𝑥𝑡+1 − 𝑥𝑡⟩ − ( ︂ 1 𝛾 − 𝐿 2 ) ︂ ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 ≤ 1 2𝜆 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) − 𝑣𝑡 ⃦⃦2 − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 ) ︂ ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . We are now ready to present EF21-Prox and provide its convergence guarantees in general non-convex case . I.1 CONVERGENCE FOR GENERAL NON-CONVEX FUNCTIONS Algorithm 7 EF21-Prox 1 : Input : starting point 𝑥0 ∈ R𝑑 ; 𝑔0𝑖 ∈ R𝑑 for 𝑖 = 1 , . . . , 𝑛 ( known by nodes ) ; 𝑔0 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 0 𝑖 ( known by master ) ; learning rate 𝛾 > 0 2 : for 𝑡 = 0,1 , 2 , . . . , 𝑇 − 1 do 3 : Master computes 𝑥𝑡+1 = prox𝛾𝑟 ( 𝑥 𝑡 − 𝛾𝑔𝑡 ) 4 : for all nodes 𝑖 = 1 , . . . , 𝑛 in parallel do 5 : Compress 𝑐𝑡𝑖 = 𝒞 ( ∇𝑓𝑖 ( 𝑥𝑡+1 ) − 𝑔𝑡𝑖 ) and send 𝑐𝑡𝑖 to the master 6 : Update local state 𝑔𝑡+1𝑖 = 𝑔 𝑡 𝑖 + 𝑐 𝑡 𝑖 7 : end for 8 : Master computes 𝑔𝑡+1 = 1𝑛 ∑︀𝑛 𝑖=1 𝑔 𝑡+1 𝑖 via 𝑔 𝑡+1 = 𝑔𝑡 + 1𝑛 ∑︀𝑛 𝑖=1 𝑐 𝑡 𝑖 9 : end for 10 : Output : ? ̂ ? 𝑇 chosen uniformly from { 𝑥𝑡 } 𝑡∈ [ 𝑇 ] Theorem 12 . Let Assumption 1 hold , 𝑟 ( · ) be convex and Φinf = inf𝑥∈R𝑑 Φ ( 𝑥 ) > −∞ . Set the stepsize in Algorithm 7 as 0 < 𝛾 < ( ︃ 𝐿 2 + ̃︀𝐿√︂𝛽 𝜃 ) ︃−1 def = 𝛾0 , ( 98 ) where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Fix 𝑇 ≥ 1 and let ? ̂ ? 𝑇 be chosen from the iterates 𝑥0 , 𝑥1 , . . . , 𝑥𝑇−1 uniformly at random . Then E [ ︁⃦⃦ 𝒢𝛾 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 4 ( ︀Φ0 − Φinf ) ︀ 𝑇𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ + 2E [ ︀𝐺0 ] ︀ 𝜃𝑇 ⎛⎝1 + 1 𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ 1̃︀𝐿 √︃ 𝜃 𝛽 ⎞⎠ . ( 99 ) If the stepsize is set to 0 < 𝛾 ≤ 𝛾0/2 , then E [ ︁⃦⃦ 𝒢𝛾 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 8 ( ︀Φ0 − Φinf ) ︀ 𝛾𝑇 + 2E [ ︀ 𝐺0 ] ︀ 𝜃𝑇 ( ︃ 1 + 2 𝛾̃︀𝐿 √︃ 𝜃 𝛽 ) ︃ . ( 100 ) Proof . First , let us apply Lemma 14 with 𝑣𝑡 = 𝑔𝑡 , 𝜆 > 0 Φ ( ︀ 𝑥𝑡+1 ) ︀ ≤ Φ ( ︀ 𝑥𝑡 ) ︀ + 1 2𝜆 ⃦⃦ 𝑔𝑡 −∇𝑓 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 ) ︂ ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . ( 101 ) Subtract Φinf from both sides , take expectation , and define 𝛿𝑡 = Φ ( 𝑥𝑡 ) − Φinf , 𝐺𝑡 = 1 𝑛 ∑︀𝑛 𝑖=1 ‖𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ‖ 2 , 𝑅𝑡 = ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 , then E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 1 2𝜆 E [ ︀ 𝐺𝑡 ] ︀ . ( 102 ) Note that the proof of Lemma 1 does not rely on the update rule for 𝑥𝑡+1 , but only on the way the estimator 𝑔𝑡+1𝑖 is constructed . Therefore , ( 14 ) also holds for the composite case E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ . ( 103 ) Adding ( 102 ) with a 12𝜃𝜆 multiple of ( 103 ) , we obtain E [ ︀ 𝛿𝑡+1 ] ︀ + 1 2𝜃𝜆 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 1 2𝜆 E [ ︀ 𝐺𝑡 ] ︀ + 1 − 𝜃 2𝜃𝜆 E [ ︀ 𝐺𝑡 ] ︀ − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 1 2𝜃𝜆 𝛽̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ = E [ ︀ 𝛿𝑡 ] ︀ + 1 2𝜃𝜆 E [ ︀ 𝐺𝑡 ] ︀ − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 − 𝛽 2𝜃𝜆 ̃︀𝐿2 ) ︂E [ ︀𝑅𝑡 ] ︀ . By summing up inequalities for 𝑡 = 0 , . . . , 𝑇 − 1 , we arrive at 0 ≤ E [ ︀ 𝛿𝑇 ] ︀ + 1 2𝜃𝜆 E [ ︀ 𝐺𝑇 ] ︀ ≤ 𝛿0 + 1 2𝜃𝜆 E [ ︀ 𝐺0 ] ︀ − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 − 𝛽 2𝜃𝜆 ̃︀𝐿2 ) ︂ 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ . Thus 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ ≤ ( ︂ 𝛿0 + 1 2𝜃𝜆 E [ ︀ 𝐺0 ] ︀ ) ︂ ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 − 𝛽 2𝜃𝜆 ̃︀𝐿2 ) ︂−1 = ( ︃ 𝛿0 + 1 2𝜃 √︃ 𝜃 𝛽̃︀𝐿2E [ ︀𝐺0 ] ︀ ) ︃ ( ︃ 1 𝛾 − 𝐿 2 − √︂ 𝛽 𝜃 ̃︀𝐿2 ) ︃−1 = 𝛾2𝐹 0𝐵 . ( 104 ) where in the first equality we choose 𝜆 = √︁ 𝛽 𝜃 ̃︀𝐿2 , and in the second we define 𝐹 0 def= 𝛿0 + 1 2𝜃 √︁ 𝜃 𝛽̃︀𝐿2E [ ︀ 𝐺0 ] ︀ , 𝐵 def= ( ︂ 𝛾 − 𝐿𝛾 2 2 − √︁ 𝛽 𝜃 ̃︀𝐿2𝛾2 ) ︂−1 = ( ︁𝛾 − 𝛾2𝛾0 ) ︁−1 . By Lemma 13 with 𝑣𝑡 = 𝑔𝑡 we have E [ ︁⃦⃦ 𝒢𝛾 ( ︀ ? ̂ ? 𝑇 ) ︀⃦⃦2 ] ︁ = 1 𝑇 𝑇−1∑︁ 𝑡=0 E [ ︁⃦⃦ 𝒢𝛾 ( ︀ 𝑥𝑡 ) ︀⃦⃦2 ] ︁ ≤ 2 𝛾2𝑇 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ + 2 𝑇 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝐺𝑡 ] ︀ ( 𝑖 ) ≤ 2 𝛾2𝑇 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ + 2 𝑇 E [ ︀ 𝐺0 ] ︀ 𝜃 + 2 𝑇 𝛽̃︀𝐿2 𝜃 𝑇−1∑︁ 𝑡=0 E [ ︀ 𝑅𝑡 ] ︀ ( 𝑖𝑖 ) ≤ 2𝐹 0𝐵 𝑇 + 2 𝑇 E [ ︀ 𝐺0 ] ︀ 𝜃 + 2 𝑇 𝛽̃︀𝐿2 𝜃 𝛾2𝐹 0𝐵 = 2𝐹 0𝐵 𝑇 ( ︃ 1 + 𝛾2𝛽̃︀𝐿2 𝜃 ) ︃ + 2 𝑇 E [ ︀ 𝐺0 ] ︀ 𝜃 = 2𝐹 0 𝑇𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ ( ︃1 + 𝛾2𝛽̃︀𝐿2 𝜃 ) ︃ + 2 𝑇 E [ ︀ 𝐺0 ] ︀ 𝜃 , where in ( 𝑖 ) we apply Lemma 18 with 𝐶 def= 𝛽̃︀𝐿2 , 𝑠𝑡 def= E [ 𝐺𝑡 ] , 𝑟𝑡 def= E [ 𝑅𝑡 ] . ( 𝑖𝑖 ) is due to ( 104 ) . Note that for 𝛾 < ( ︂ 𝐿 2 + √︁ 𝛽 𝜃 ̃︀𝐿 ) ︂−1 , we have 𝛾2𝛽̃︀𝐿2 𝜃 < 𝛽 𝜃 ̃︀𝐿2 ( ︂ 𝐿 2 + √︁ 𝛽 𝜃 ̃︀𝐿 ) ︂2 ≤ 1 . ( 105 ) Thus E [ ︁⃦⃦ 𝒢𝛾 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 4𝐹 0 𝑇𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ + 2 𝑇 E [ ︀ 𝐺0 ] ︀ 𝜃 = 4𝛿0 𝑇𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ + 2E [ ︀𝐺0 ] ︀ 𝜃𝑇 + 2E [ ︀ 𝐺0 ] ︀ 𝑇𝛾 ( ︁ 1 − 𝛾𝛾0 ) ︁ 1 𝜃 √︃ 𝜃 𝛽̃︀𝐿2 . ( 106 ) Set 𝛾 ≤ 𝛾0/2 , then the bound simplifies to E [ ︁⃦⃦ 𝒢𝛾 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 8𝛿0 𝛾𝑇 + 2E [ ︀ 𝐺0 ] ︀ 𝜃𝑇 ( ︃ 1 + 2 𝛾 √︃ 𝜃 𝛽̃︀𝐿2 ) ︃ . Corollary 17 . Let assumptions of Theorem 12 hold , 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = ( ︁ 𝐿 + 2̃︀𝐿√︀𝛽/𝜃 ) ︁−1 . Then , after 𝑇 iterations/communication rounds of EF21-Prox we have E [ ︁⃦⃦ ∇𝑓 ( ? ̂ ? 𝑇 ) ⃦⃦2 ] ︁ ≤ 𝜀2 . It requires # grad = 𝒪 ( ︃ ̃︀𝐿𝛿0 𝛼𝜀2 ) ︃ , where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝛿0 = Φ ( 𝑥0 ) − Φ𝑖𝑛𝑓 . Proof . The proof is the same as for Corollary 2 . I.2 CONVERGENCE UNDER POLYAK-ŁOJASIEWICZ CONDITION In order to extend the analysis of Polyak-Łojasiewicz functions to composite optimization , we use the following Assumption 5 from ( Li & Li , 2018 ; Wang et al. , 2018 ) . Assumption 5 ( Polyak-Łojasiewicz ) . There exists 𝜇 > 0 such that ‖𝒢𝛾 ( 𝑥 ) ‖2 ≥ 2𝜇 ( Φ ( 𝑥 ) − Φ ( 𝑥⋆ ) ) for all 𝑥 ∈ R𝑑 , where 𝑥⋆ = arg min𝑥 Φ ( 𝑥 ) . Theorem 13 . Let Assumptions 1 and 5 hold , 𝑟 ( · ) be convex and Φinf = inf𝑥∈R𝑑 Φ ( 𝑥 ) > −∞ . Set the stepsize in Algorithm 7 as 𝛾 ≤ min ⎧⎨⎩ ( ︃ 𝐿 + 2̃︀𝐿√︂2𝛽 𝜃 ) ︃−1 , 𝜃 𝜇 + 𝜃̃︀𝐿√︁ 2𝛽𝜃 ⎫⎬⎭ . ( 107 ) Let Ψ𝑡 def = Φ ( 𝑥𝑡 ) − Φ ( 𝑥⋆ ) + 1𝜃𝜆𝐺 𝑡 with 𝜆 = √︁ 2𝛽 𝜃 ̃︀𝐿 . Then for any 𝑇 ≥ 0 , we have E [ ︀ Ψ𝑇 ] ︀ ≤ ( ︁ 1 − 𝛾𝜇 2 ) ︁𝑇 E [ ︀ Ψ0 ] ︀ , ( 108 ) where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝜃 = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 = ( 1 − 𝛼 ) ( ︀1 + 𝑠−1 ) ︀ for any 𝑠 > 0 . Proof . We start as in the previous proof , but subtract Φ ( 𝑥⋆ ) from both sides of ( 101 ) and define 𝛿𝑡 def = Φ ( 𝑥𝑡 ) − Φ ( 𝑥⋆ ) . Recall that 𝐺𝑡 = 1𝑛 ∑︀𝑛 𝑖=1 ‖𝑔𝑡𝑖 −∇𝑓𝑖 ( 𝑥𝑡 ) ‖ 2 , 𝑅𝑡 = ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 . Then E [ ︀ 𝛿𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 1 2𝜆 E [ ︀ 𝐺𝑡 ] ︀ . ( 109 ) By Lemma 1 , we have E [ ︀ 𝐺𝑡+1 ] ︀ ≤ ( 1 − 𝜃 ) E [ ︀ 𝐺𝑡 ] ︀ + 𝛽̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ . ( 110 ) Then by adding ( 109 ) with a 1𝜃𝜆 multiple of ( 110 ) we obtain E [ ︀ 𝛿𝑡+1 ] ︀ + 1 𝜃𝜆 E [ ︀ 𝐺𝑡+1 ] ︀ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 1 𝜃𝜆 ( ︂ 1 − 𝜃 + 𝜃 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 ) ︂ E [ ︀ 𝑅𝑡 ] ︀ + 1 𝜃𝜆 𝛽̃︀𝐿2E [ ︀𝑅𝑡 ] ︀ = E [ ︀ 𝛿𝑡 ] ︀ + 1 𝜃𝜆 ( ︂ 1 − 𝜃 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ − ( ︂ 1 𝛾 − 𝐿 2 − 𝜆 2 − 𝛽 𝜃𝜆 ̃︀𝐿2 ) ︂E [ ︀𝑅𝑡 ] ︀ ( 𝑖 ) = E [ ︀ 𝛿𝑡 ] ︀ + 1 𝜃𝜆 ( ︂ 1 − 𝜃 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ − ( ︃ 1 𝛾 − 𝐿 2 − √︂ 2𝛽 𝜃 ̃︀𝐿 ) ︃E [ ︀𝑅𝑡 ] ︀ ( 𝑖𝑖 ) ≤ E [ ︀ 𝛿𝑡 ] ︀ + 1 𝜃𝜆 ( ︂ 1 − 𝜃 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ − 1 2𝛾 E [ ︀ 𝑅𝑡 ] ︀ , ( 111 ) where in ( 𝑖 ) we choose 𝜆 = √︁ 2𝛽 𝜃 ̃︀𝐿2 , ( 𝑖𝑖 ) is due to the stepsize choice ( the first term in minimum ) . Next , combining Assumption 5 with Lemma 13 , we have 2𝜇𝛿𝑡 = 2𝜇 ( ︀ Φ ( 𝑥𝑡 ) − Φ ( 𝑥⋆ ) ) ︀ ≤ ⃦⃦ 𝒢𝛾 ( 𝑥𝑡 ) ⃦⃦2 ≤ 2 𝛾2 𝑅𝑡 + 2𝐺𝑡 , and −𝑅𝑡 ≤ −𝜇𝛾2𝛿𝑡 + 𝛾2𝐺𝑡 . ( 112 ) Thus ( 111 ) can be further bounded as E [ Ψ ] = E [ ︂ 𝛿𝑡+1 + 1 𝜃𝜆 𝐺𝑡+1 ] ︂ ≤ E [ ︀ 𝛿𝑡 ] ︀ + 1 𝜃𝜆 ( ︂ 1 − 𝜃 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ − 1 2𝛾 E [ ︀ 𝑅𝑡 ] ︀ ( 112 ) ≤ E [ ︀ 𝛿𝑡 ] ︀ + 1 𝜃𝜆 ( ︂ 1 − 𝜃 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ − 𝛾𝜇 2 E [ ︀ 𝛿𝑡 ] ︀ + 𝛾 2 E [ ︀ 𝐺𝑡 ] ︀ = ( ︁ 1 − 𝛾𝜇 2 ) ︁ E [ ︀ 𝛿𝑡 ] ︀ + 1 𝜃𝜆 ( ︂ 1 − 𝜃 2 + 𝛾𝜃𝜆 2 ) ︂ E [ ︀ 𝐺𝑡 ] ︀ ≤ ( ︁ 1 − 𝛾𝜇 2 ) ︁ E [ ︂ 𝛿𝑡 + 1 𝜃𝜆 𝐺𝑡 ] ︂ , ( 113 ) where the last inequality follows by our assumption on the stepsize ( the second term in minimum ) . It remains to unroll the recurrence . Corollary 18 . Let assumptions of Theorem 13 hold , 𝑔0𝑖 = ∇𝑓𝑖 ( 𝑥0 ) , 𝑖 = 1 , . . . , 𝑛 , 𝛾 = min ⎧⎨⎩ ( ︃ 𝐿 + 2̃︀𝐿√︂2𝛽 𝜃 ) ︃−1 , 𝜃 𝜇 + 𝜃̃︀𝐿√︁ 2𝛽𝜃 ⎫⎬⎭ . Then , after 𝑇 iterations/communication rounds of EF21-Prox we have E [ ︀ 𝑓 ( 𝑥𝑇 ) − 𝑓 ( 𝑥⋆ ) ] ︀ ≤ 𝜀 . It requires 𝑇 = # grad = 𝒪 ( ︃ 𝜇 + ̃︀𝐿 𝛼𝜇 log ( ︂ 𝛿0 𝜀 ) ︂ ) ︃ ( 114 ) iterations/communications rounds/gradint computations at each node , where ̃︀𝐿 = √︁ 1𝑛 ∑︀𝑛𝑖=1 𝐿2𝑖 , 𝛿0 = Φ ( 𝑥0 ) − Φ𝑖𝑛𝑓 . Proof . Note that by Lemma 17 we have 𝜇 𝜃 + ̃︀𝐿√︂2𝛽 𝜃 ≤ 4𝜇 𝛼 + ̃︀𝐿2√2 𝛼 ≤ 4 ( ︁ 𝜇 + ̃︀𝐿 ) ︁ 𝛼 . The remainder of the proof is the same as for Corollary 3 . J USEFUL AUXILIARY RESULTS J.1 BASIC FACTS For all 𝑎 , 𝑏 , 𝑥1 , . . . , 𝑥𝑛 ∈ R𝑑 , 𝑠 > 0 and 𝑝 ∈ ( 0,1 ] the following inequalities hold ⟨𝑎 , 𝑏⟩ ≤ ‖𝑎‖ 2 2𝑠 + 𝑠‖𝑏‖2 2 , ( 115 ) ⟨𝑎− 𝑏 , 𝑎 + 𝑏⟩ = ‖𝑎‖2 − ‖𝑏‖2 , ( 116 ) 1 2 ‖𝑎‖2 − ‖𝑏‖2 ≤ ‖𝑎 + 𝑏‖2 , ( 117 ) ‖𝑎 + 𝑏‖2 ≤ ( 1 + 𝑠 ) ‖𝑎‖2 + ( 1 + 1/𝑠 ) ‖𝑏‖2 , ( 118 ) ⃦⃦⃦⃦ ⃦ 1𝑛 𝑛∑︁ 𝑖=1 𝑥𝑖 ⃦⃦⃦⃦ ⃦ 2 ≤ 1 𝑛 𝑛∑︁ 𝑖=1 ‖𝑥𝑖‖2 , ( 119 ) ( ︁ 1 − 𝑝 2 ) ︁−1 ≤ 1 + 𝑝 , ( 120 ) ( ︁ 1 + 𝑝 2 ) ︁ ( 1 − 𝑝 ) ≤ 1 − 𝑝 2 , ( 121 ) log ( 1 − 𝑝 ) ≤ −𝑝 . ( 122 ) Bias-variance decomposition For a random vector 𝜉 ∈ R𝑑 and any deterministic vector 𝑥 ∈ R𝑑 , the variance of 𝜉 can be decomposed as E [ ︀ ‖𝜉 − E [ 𝜉 ] ‖2 ] ︀ = E [ ︀ ‖𝜉‖2 ] ︀ − ‖E [ 𝜉 ] ‖2 ( 123 ) Tower property of mathematical expectation . For random variables 𝜉 , 𝜂 ∈ R𝑑 we have E [ 𝜉 ] = E [ E [ 𝜉 | 𝜂 ] ] ( 124 ) under assumption that all expectations in the expression above are well-defined . J.2 USEFUL LEMMAS Lemma 15 ( Lemma 5 of ( Richtárik et al. , 2021 ) ) . If 0 ≤ 𝛾 ≤ 1√ 𝑎+𝑏 , then 𝑎𝛾2 + 𝑏𝛾 ≤ 1 . Moreover , the bound is tight up to the factor of 2 since 1√ 𝑎+𝑏 ≤ min { ︁ 1√ 𝑎 , 1𝑏 } ︁ ≤ 2√ 𝑎+𝑏 . Lemma 16 ( Lemma 2 of ( Li et al. , 2021 ) ) . Suppose that function 𝑓 is 𝐿-smooth and let 𝑥𝑡+1 def= 𝑥𝑡 − 𝛾𝑔𝑡 , where 𝑔𝑡 ∈ R𝑑 is any vector , and 𝛾 > 0 any scalar . Then we have 𝑓 ( 𝑥𝑡+1 ) ≤ 𝑓 ( 𝑥𝑡 ) − 𝛾 2 ⃦⃦ ∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 − ( ︂ 1 2𝛾 − 𝐿 2 ) ︂ ⃦⃦ 𝑥𝑡+1 − 𝑥𝑡 ⃦⃦2 + 𝛾 2 ⃦⃦ 𝑔𝑡 −∇𝑓 ( 𝑥𝑡 ) ⃦⃦2 . ( 125 ) Lemma 17 ( Lemma 3 of ( Richtárik et al. , 2021 ) ) . Let 0 < 𝛼 < 1 and for 𝑠 > 0 let 𝜃 ( 𝑠 ) and 𝛽 ( 𝑠 ) be defined as 𝜃 ( 𝑠 ) def = 1 − ( 1 − 𝛼 ) ( 1 + 𝑠 ) , 𝛽 ( 𝑠 ) def= ( 1 − 𝛼 ) ( 1 + 𝑠−1 ) . Then the solution of the optimization problem min 𝑠 { ︂ 𝛽 ( 𝑠 ) 𝜃 ( 𝑠 ) : 0 < 𝑠 < 𝛼 1 − 𝛼 } ︂ ( 126 ) is given by 𝑠 * = 1√ 1−𝛼 − 1 . Furthermore , 𝜃 ( 𝑠 * ) = 1 − √ 1 − 𝛼 , 𝛽 ( 𝑠 * ) = 1−𝛼 1− √ 1−𝛼 and√︃ 𝛽 ( 𝑠 * ) 𝜃 ( 𝑠 * ) = 1√ 1 − 𝛼 − 1 = 1 𝛼 + √ 1 − 𝛼 𝛼 − 1 ≤ 2 𝛼 − 1 . ( 127 ) In the trivial case 𝛼 = 1 , we have 𝛽 ( 𝑠 ) 𝜃 ( 𝑠 ) = 0 for any 𝑠 > 0 , and ( 127 ) is satisfied . Lemma 18 . Let ( arbitrary scalar ) non-negative sequences { 𝑠𝑡 } 𝑡≥0 , and { 𝑟𝑡 } 𝑡≥0 satisfy 𝑇−1∑︁ 𝑡=0 𝑠𝑡+1 ≤ ( 1 − 𝜃 ) 𝑇−1∑︁ 𝑡=0 𝑠𝑡 + 𝐶 𝑇−1∑︁ 𝑡=0 𝑟𝑡 for some parameters 𝜃 ∈ ( 0 , 1 ] , 𝐶 > 0 . Then for all 𝑇 ≥ 0 𝑇−1∑︁ 𝑡=0 𝑠𝑡 ≤ 𝑠 0 𝜃 + 𝐶 𝜃 𝑇−1∑︁ 𝑡=0 𝑟𝑡 . ( 128 ) Proof . We have 𝑇−1∑︁ 𝑡=0 𝑠𝑡 − 𝑠0 ≤ 𝑇−1∑︁ 𝑡=0 𝑠𝑡 + 𝑠𝑇 − 𝑠0 = 𝑇−1∑︁ 𝑡=0 𝑠𝑡+1 ≤ ( 1 − 𝜃 ) 𝑇−1∑︁ 𝑡=0 𝑠𝑡 + 𝐶 𝑇−1∑︁ 𝑡=0 𝑟𝑡 = 𝑇−1∑︁ 𝑡=0 𝑠𝑡 − 𝜃 𝑇−1∑︁ 𝑡=0 𝑠𝑡 + 𝐶 𝑇−1∑︁ 𝑡=0 𝑟𝑡 . Dividing both sides by 𝜃 > 0 and rearranging the terms , we get 𝑇−1∑︁ 𝑡=0 𝑠𝑡 ≤ 𝑠 0 𝜃 + 𝐶 𝜃 𝑇−1∑︁ 𝑡=0 𝑟𝑡 .
This paper studies the extended versions of a previously proposed algorithm called EF21. The paper includes several variants of EF21 such as stochastic optimization, partial participation, variance reduction, momentum, etc. The theoretical analysis for each extension is given and experiments on real world datasets are conducted.
SP:85960c4b263657c555864e5203386bba26f4f77d
3D Meta-Registration: Meta-learning 3D Point Cloud Registration Functions
1 INTRODUCTION . The point cloud registration is defined as a process to determine the spatial geometric transformations ( i.e . rigid and non-rigid transformation ) that can optimally register the source point cloud towards the target one . In comparison to classical registration methods Besl & McKay ( 1992 ) ; Yang et al . ( 2015 ) ; Myronenko et al . ( 2007 ) , learning-based registration methods Liu et al . ( 2019 ) ; Balakrishnan et al . ( 2018 ) usually leverage a neural network-based structure to directly predict the desired transformation for a given pair of source and target point clouds . Recently based on the PointNet Qi et al . ( 2017a ) structure , Liu et al . proposed FlowNet3D Liu et al . ( 2019 ) to learn the points flow field to register two point clouds together . Balakrishnan et al . proposed VoxelMorph Balakrishnan et al . ( 2018 ) for aligning two volumetric 3D shapes . These methods achieved impressive performance for the registration task of 3D shapes/scenes . In comparison to iterative registration methods , learning-based methods have advantages in dealing with a large number of datasets since learning-based methods can transfer the registration pattern from one dataset to another one . However , there are two main challenges for the learning-based methods . Firstly , learning-based networks often require a large volume of data and a long learning period to acquire the ability to predict the desired geometric transformation to register 3D point clouds . Secondly , The generalization capacity can be greatly degraded if the distribution of the dataset in practice differs from the training dataset . As shown in Figure 1 , previous learning-based methods tend to learn a single 3D registration function ( learner ) for any pair of source and target point clouds . In this way , the 3D registration learner performs well from extensive training on a large number of labeled data . In contrast , we proposed to formalize the learning of a 3D registration function space as a meta-learning problem . More specifically , we define each task as learning a unique 3D registration function ( learner ) for each given 3D object . Besides , we design an auxiliary deep neural network as a meta-learner that can predict the prior over the respective 3D registration function space . The meta-learner is responsible for providing the optimal initialization of a 3D registration learner . In general , our meta-learning-based approach gains competitive advantages over existing generalization methods that our method can uniquely parameterize the 3D registration function for each pair of shapes to provide 3D point cloud registration . As shown in Figure 2 , our model includes two modules : 3D registration learner and 3D registration meta-learner . We observe that different regions of a 3D shape vary in their geometric structures which makes it more sense that we have a region-conditioned transformation instead of the shapeconditioned one . In this way , the proposed 3D registration learner includes shape embedding and region aware flow regression which uses multiple non-linear multi-layer perceptron ( MLP ) -based function to predict the transforms and weights for different regions respectively . The 3D registration meta-learner includes two parts . The first part is a variational auto-encoder that maps shape representations to a distribution over 3D registration tasks , which gives the priors over the 3D registration function space and the second part is to sample from the 3D registration function space to predict optimal initialization for the parameters of the 3D shape registration function . Our contributions are listed as below : • In this paper , to the best of our knowledge , it is the first time to formalize learning of a 3D point cloud registration function space as a meta-learning problem 3D computer vision . Under this circumstance , the 3D registration model can be quickly adapted to new point clouds with no or limited labeled training data . • In this paper , we propose a novel variational encoder that maps shape representations to a distribution over 3D registration tasks , contributing to robust learning of priors over the 3D registration function space . • In this paper , we observe that different regions of a 3D shape vary in their geometric structures which enables us to propose a region-aware flow regression module instead of the shape-conditioned one . • In this paper , we compared our 3D Meta-Registration to other state-of-the-art ones on widely used benchmark datasets and demonstrated superior registration performance over both seen and unseen data . 2 RELATED WORKS . 2.1 POINT CLOUD REGISTRATION . In comparison to classical methods Besl & McKay ( 1992 ) ; Yang et al . ( 2015 ) ; Myronenko et al . ( 2007 ) , learning-based methods have significant advantages in dealing with a large number of datasets by transferring the “ knowledge ” from registering training pairs to testing pairs . Based on the feature learning structure proposed by PointNet Qi et al . ( 2017a ) , Aoki et al . Aoki et al . ( 2019 ) proposed PointNetLK for rigid point cloud registration by leveraging Lucas & Kanade algorithm . Based on DGCNN Wang et al . ( 2019 ) , Wang et al . proposed Deep Closest Point Wang & Solomon ( 2019a ) for learning rigid point cloud registration and PR-Net Wang & Solomon ( 2019b ) for learning partial shapes registration . For non-rigid point cloud registration , Liu et al . proposed FlowNet3D Liu et al . ( 2019 ) to learn the points flow field for non-rigid point cloud registration . Wang et al . proposed FlowNet3D++ Wang et al . ( 2020 ) on top of FlowNet3D by adding geometric constraints and angular alignment to dramatically improve the alignment performance . 2.2 META-LEARNING METHODS . Meta-learning Andrychowicz et al . ( 2016 ) ; Schmidhuber ( 1992 ) ; Hospedales et al . ( 2020 ) refers to a subfield of machine learning that learning new concepts and skills much faster and more efficiently given only a small amount of dataset . Parameters prediction Finn et al . ( 2017 ; 2018 ) ; Lee & Choi ( 2018 ) is one of the strategies in meta-learning , which refers to a network trained to predict the parameters of another network so that the first network can encode the related information to the second network which makes the overall network more flexible and adaptive to a particular task . Recently , meta-learning approaches are widely used in computer vision tasks . MANN was proposed by Santoro et al . Santoro et al . ( 2016 ) to use an explicit storage buffer which is easier for the network to rapidly incorporate new information and not to forget in the future . Ravi et al . Ravi & Larochelle ( 2016 ) use the LSTM to learn an update rule for training a neural network in few-shot learning . Snell et al . Snell et al . ( 2017 ) proposed Prototypical networks for few-shot classification task which map the sample data of each class into a metric space by calculating the euclidean distance of prototype representations of each class . In the field of 3D computer vision , Littwin et al . Littwin & Wolf ( 2019 ) firstly use a deep neural network to map the input point cloud to the parameters of another network for the 3D shape representation task . Yang et al . Yang et al . ( 2020 ) proposed Meta3D which an external memory is used to store image features and their corresponding volumes . In this paper , we first propose a meta-learning based method with a 3D registration meta-learner , which can learn to learn the registration pattern more efficiently . 3 METHODS . We introduce our approach in the following sections . In section 3.1 , we state the problem of learningbased registration . Section 3.2 illustrates the 3D registration learner . The 3D registration metalearner is explained in section 3.3 . The definition of the loss function is discussed in section 3.4 . 3.1 PROBLEM STATEMENT . We need to define the optimization task firstly . For a given training dataset D = { ( Si , Gi ) } , where Si , Gi ⊂ R3 , Si is the source point cloud and Gi is the target point cloud . We assume the existence of a parametric function gθ ( Si , Gi ) = φ using a neural network structure , where φ is the transformation function ( point flow in this paper ) which deforms source point cloud towards the target point cloud . We call gθ 3D registration learner in this paper and θ is the set of weights in the 3D registration learner . For previous learning-based network structure , the θ is optimized using stochastic gradient descent based algorithm for a given dataset : θoptimal = argmin θ [ E ( Si , Gi ) ∼D [ L ( Si , Gi , gθ ( Si , Gi ) ) ] ] ( 1 ) where L represents a similarity measure . In comparison , we assume that the 3D registration learner g includes two sets of parameters : θt and θm . θt is pre-trained from training dataset , but θm is predicted by another parametric function fσ which is called 3D registration meta-learner in this paper . Similarly , we have the desired transformation function φ = g ( θt , θm ) ( Si , Gi ) and we have θm = fσ ( Si , Gi ) . For a given training data set , we have : θoptimalt , σ optimal = argmin θt , σ [ E ( Si , Gi ) ∼D [ L ( Si , Gi , g ( θt , fσ ( Si , Gi ) ) ( Si , Gi ) ) ] ] ( 2 ) 3.2 3D REGISTRATION LEARNER . The 3D registration learner includes two modules : shape embedding ( 3.2.1 ) and region aware flow regression ( 3.2.2 ) . We discuss them in the following subsections . 3.2.1 SHAPE EMBEDDING . For a given pair of input point clouds , we firstly learn to extract the shape features that captures representative and deformation-insensitive geometric information . Let ( Si , Gi ) denotes the source and target point clouds and Si , Gi ⊂ R3 . ∀x ∈ Si , we denote the feature of x as lx ∈ Rc . Following the recent architecture from PointNet++ Qi et al . ( 2017b ) and FlowNet3D Liu et al . ( 2019 ) , the first set convolution g1 : R3 → Rc is a non-linear MLP-based function g1 : lx = Maxpool { g1 ( xj ) } ||xj−x||≤r∧xj∈Si ( 3 ) where r is a predefined distance and Maxpool is an element-wise max pooling function . ∀x ∈ Si , we further concatenate the coordinates x with the learned feature lx and we denote it as [ x , lx ] ∈ R ( c+3 ) . Similarly , we can learn the feature of each point in the target point cloud Gi . The shape descriptor for source point cloud Si is : { [ x , lx ] } x∈Si and the shape descriptor for target point cloud Gi is : { [ x , lx ] } x∈Gi . 3.2.2 REGION AWARE FLOW REGRESSION . Based on the learned shape descriptors for both source point cloud { [ x , lx ] } x∈Si and target point cloud { [ x , lx ] } x∈Gi from previous section , in this section we introduce two more set convolution structures for point flow regression . We define the second set convolution g2 : R ( 2c+9 ) → R ( c+3 ) to learn the relation information between descriptors of source and target point clouds . g2 is a non-linear MLP-based function . ∀x ∈ Si , we denote relation tensor px as : px = Maxpool { g2 ( [ x , lx , yj , lyj , x− yj ] ) } ||yj−x||≤r∧yj∈Gi ( 4 ) where [ , ] denotes concatenation . Based on the learned relation feature { [ x , px ] } x∈Si from source and target descriptors , we define a set of region aware decoders { g3 , k } k=1,2 , .. , K , where K is the pre-defined region numbers in dataset D and g3 , k : R ( c+3 ) → R3 is a non-learn MLP-based function . We note the pre-trained weights in g3 as θt and the meta-learned weights in g3 as θm . The weights for g3 is the element-wise summation of θt and θm . ∀x ∈ Si , we have the estimated region probability score px , k and flow vx , k for each region . Notice that we use a softmax function to normalize the output to the estimated region probability score px , k . We have : px , k , vx , k = g3 , k ( [ x , px ] ) ( 5 ) Then we use the estimated region probability score px , k as the weight to further balance among the point flow vx , k for each region . We define the final point flow vx as : vx = K∑ k=1 px , kvx , k ( 6 ) Therefore , the transformed source shape S′i = { x+ vx } x∈Si .
This paper addresses point cloud registration from a meta-learning perspective to quickly adapt with limited training data. The main idea is using a meta-learner is to initialise a 3D registration learner. The meta-learner predicts a prior registration that can rapidly adapt to new registration problems. Experimental results on several datasets (ModelNet, FlyingThings3D, and KITTI) showed superior performance over FlowNet3D.
SP:b796596921ad17276bd65df6b8fc9195db76a574
3D Meta-Registration: Meta-learning 3D Point Cloud Registration Functions
1 INTRODUCTION . The point cloud registration is defined as a process to determine the spatial geometric transformations ( i.e . rigid and non-rigid transformation ) that can optimally register the source point cloud towards the target one . In comparison to classical registration methods Besl & McKay ( 1992 ) ; Yang et al . ( 2015 ) ; Myronenko et al . ( 2007 ) , learning-based registration methods Liu et al . ( 2019 ) ; Balakrishnan et al . ( 2018 ) usually leverage a neural network-based structure to directly predict the desired transformation for a given pair of source and target point clouds . Recently based on the PointNet Qi et al . ( 2017a ) structure , Liu et al . proposed FlowNet3D Liu et al . ( 2019 ) to learn the points flow field to register two point clouds together . Balakrishnan et al . proposed VoxelMorph Balakrishnan et al . ( 2018 ) for aligning two volumetric 3D shapes . These methods achieved impressive performance for the registration task of 3D shapes/scenes . In comparison to iterative registration methods , learning-based methods have advantages in dealing with a large number of datasets since learning-based methods can transfer the registration pattern from one dataset to another one . However , there are two main challenges for the learning-based methods . Firstly , learning-based networks often require a large volume of data and a long learning period to acquire the ability to predict the desired geometric transformation to register 3D point clouds . Secondly , The generalization capacity can be greatly degraded if the distribution of the dataset in practice differs from the training dataset . As shown in Figure 1 , previous learning-based methods tend to learn a single 3D registration function ( learner ) for any pair of source and target point clouds . In this way , the 3D registration learner performs well from extensive training on a large number of labeled data . In contrast , we proposed to formalize the learning of a 3D registration function space as a meta-learning problem . More specifically , we define each task as learning a unique 3D registration function ( learner ) for each given 3D object . Besides , we design an auxiliary deep neural network as a meta-learner that can predict the prior over the respective 3D registration function space . The meta-learner is responsible for providing the optimal initialization of a 3D registration learner . In general , our meta-learning-based approach gains competitive advantages over existing generalization methods that our method can uniquely parameterize the 3D registration function for each pair of shapes to provide 3D point cloud registration . As shown in Figure 2 , our model includes two modules : 3D registration learner and 3D registration meta-learner . We observe that different regions of a 3D shape vary in their geometric structures which makes it more sense that we have a region-conditioned transformation instead of the shapeconditioned one . In this way , the proposed 3D registration learner includes shape embedding and region aware flow regression which uses multiple non-linear multi-layer perceptron ( MLP ) -based function to predict the transforms and weights for different regions respectively . The 3D registration meta-learner includes two parts . The first part is a variational auto-encoder that maps shape representations to a distribution over 3D registration tasks , which gives the priors over the 3D registration function space and the second part is to sample from the 3D registration function space to predict optimal initialization for the parameters of the 3D shape registration function . Our contributions are listed as below : • In this paper , to the best of our knowledge , it is the first time to formalize learning of a 3D point cloud registration function space as a meta-learning problem 3D computer vision . Under this circumstance , the 3D registration model can be quickly adapted to new point clouds with no or limited labeled training data . • In this paper , we propose a novel variational encoder that maps shape representations to a distribution over 3D registration tasks , contributing to robust learning of priors over the 3D registration function space . • In this paper , we observe that different regions of a 3D shape vary in their geometric structures which enables us to propose a region-aware flow regression module instead of the shape-conditioned one . • In this paper , we compared our 3D Meta-Registration to other state-of-the-art ones on widely used benchmark datasets and demonstrated superior registration performance over both seen and unseen data . 2 RELATED WORKS . 2.1 POINT CLOUD REGISTRATION . In comparison to classical methods Besl & McKay ( 1992 ) ; Yang et al . ( 2015 ) ; Myronenko et al . ( 2007 ) , learning-based methods have significant advantages in dealing with a large number of datasets by transferring the “ knowledge ” from registering training pairs to testing pairs . Based on the feature learning structure proposed by PointNet Qi et al . ( 2017a ) , Aoki et al . Aoki et al . ( 2019 ) proposed PointNetLK for rigid point cloud registration by leveraging Lucas & Kanade algorithm . Based on DGCNN Wang et al . ( 2019 ) , Wang et al . proposed Deep Closest Point Wang & Solomon ( 2019a ) for learning rigid point cloud registration and PR-Net Wang & Solomon ( 2019b ) for learning partial shapes registration . For non-rigid point cloud registration , Liu et al . proposed FlowNet3D Liu et al . ( 2019 ) to learn the points flow field for non-rigid point cloud registration . Wang et al . proposed FlowNet3D++ Wang et al . ( 2020 ) on top of FlowNet3D by adding geometric constraints and angular alignment to dramatically improve the alignment performance . 2.2 META-LEARNING METHODS . Meta-learning Andrychowicz et al . ( 2016 ) ; Schmidhuber ( 1992 ) ; Hospedales et al . ( 2020 ) refers to a subfield of machine learning that learning new concepts and skills much faster and more efficiently given only a small amount of dataset . Parameters prediction Finn et al . ( 2017 ; 2018 ) ; Lee & Choi ( 2018 ) is one of the strategies in meta-learning , which refers to a network trained to predict the parameters of another network so that the first network can encode the related information to the second network which makes the overall network more flexible and adaptive to a particular task . Recently , meta-learning approaches are widely used in computer vision tasks . MANN was proposed by Santoro et al . Santoro et al . ( 2016 ) to use an explicit storage buffer which is easier for the network to rapidly incorporate new information and not to forget in the future . Ravi et al . Ravi & Larochelle ( 2016 ) use the LSTM to learn an update rule for training a neural network in few-shot learning . Snell et al . Snell et al . ( 2017 ) proposed Prototypical networks for few-shot classification task which map the sample data of each class into a metric space by calculating the euclidean distance of prototype representations of each class . In the field of 3D computer vision , Littwin et al . Littwin & Wolf ( 2019 ) firstly use a deep neural network to map the input point cloud to the parameters of another network for the 3D shape representation task . Yang et al . Yang et al . ( 2020 ) proposed Meta3D which an external memory is used to store image features and their corresponding volumes . In this paper , we first propose a meta-learning based method with a 3D registration meta-learner , which can learn to learn the registration pattern more efficiently . 3 METHODS . We introduce our approach in the following sections . In section 3.1 , we state the problem of learningbased registration . Section 3.2 illustrates the 3D registration learner . The 3D registration metalearner is explained in section 3.3 . The definition of the loss function is discussed in section 3.4 . 3.1 PROBLEM STATEMENT . We need to define the optimization task firstly . For a given training dataset D = { ( Si , Gi ) } , where Si , Gi ⊂ R3 , Si is the source point cloud and Gi is the target point cloud . We assume the existence of a parametric function gθ ( Si , Gi ) = φ using a neural network structure , where φ is the transformation function ( point flow in this paper ) which deforms source point cloud towards the target point cloud . We call gθ 3D registration learner in this paper and θ is the set of weights in the 3D registration learner . For previous learning-based network structure , the θ is optimized using stochastic gradient descent based algorithm for a given dataset : θoptimal = argmin θ [ E ( Si , Gi ) ∼D [ L ( Si , Gi , gθ ( Si , Gi ) ) ] ] ( 1 ) where L represents a similarity measure . In comparison , we assume that the 3D registration learner g includes two sets of parameters : θt and θm . θt is pre-trained from training dataset , but θm is predicted by another parametric function fσ which is called 3D registration meta-learner in this paper . Similarly , we have the desired transformation function φ = g ( θt , θm ) ( Si , Gi ) and we have θm = fσ ( Si , Gi ) . For a given training data set , we have : θoptimalt , σ optimal = argmin θt , σ [ E ( Si , Gi ) ∼D [ L ( Si , Gi , g ( θt , fσ ( Si , Gi ) ) ( Si , Gi ) ) ] ] ( 2 ) 3.2 3D REGISTRATION LEARNER . The 3D registration learner includes two modules : shape embedding ( 3.2.1 ) and region aware flow regression ( 3.2.2 ) . We discuss them in the following subsections . 3.2.1 SHAPE EMBEDDING . For a given pair of input point clouds , we firstly learn to extract the shape features that captures representative and deformation-insensitive geometric information . Let ( Si , Gi ) denotes the source and target point clouds and Si , Gi ⊂ R3 . ∀x ∈ Si , we denote the feature of x as lx ∈ Rc . Following the recent architecture from PointNet++ Qi et al . ( 2017b ) and FlowNet3D Liu et al . ( 2019 ) , the first set convolution g1 : R3 → Rc is a non-linear MLP-based function g1 : lx = Maxpool { g1 ( xj ) } ||xj−x||≤r∧xj∈Si ( 3 ) where r is a predefined distance and Maxpool is an element-wise max pooling function . ∀x ∈ Si , we further concatenate the coordinates x with the learned feature lx and we denote it as [ x , lx ] ∈ R ( c+3 ) . Similarly , we can learn the feature of each point in the target point cloud Gi . The shape descriptor for source point cloud Si is : { [ x , lx ] } x∈Si and the shape descriptor for target point cloud Gi is : { [ x , lx ] } x∈Gi . 3.2.2 REGION AWARE FLOW REGRESSION . Based on the learned shape descriptors for both source point cloud { [ x , lx ] } x∈Si and target point cloud { [ x , lx ] } x∈Gi from previous section , in this section we introduce two more set convolution structures for point flow regression . We define the second set convolution g2 : R ( 2c+9 ) → R ( c+3 ) to learn the relation information between descriptors of source and target point clouds . g2 is a non-linear MLP-based function . ∀x ∈ Si , we denote relation tensor px as : px = Maxpool { g2 ( [ x , lx , yj , lyj , x− yj ] ) } ||yj−x||≤r∧yj∈Gi ( 4 ) where [ , ] denotes concatenation . Based on the learned relation feature { [ x , px ] } x∈Si from source and target descriptors , we define a set of region aware decoders { g3 , k } k=1,2 , .. , K , where K is the pre-defined region numbers in dataset D and g3 , k : R ( c+3 ) → R3 is a non-learn MLP-based function . We note the pre-trained weights in g3 as θt and the meta-learned weights in g3 as θm . The weights for g3 is the element-wise summation of θt and θm . ∀x ∈ Si , we have the estimated region probability score px , k and flow vx , k for each region . Notice that we use a softmax function to normalize the output to the estimated region probability score px , k . We have : px , k , vx , k = g3 , k ( [ x , px ] ) ( 5 ) Then we use the estimated region probability score px , k as the weight to further balance among the point flow vx , k for each region . We define the final point flow vx as : vx = K∑ k=1 px , kvx , k ( 6 ) Therefore , the transformed source shape S′i = { x+ vx } x∈Si .
This paper presents a new architecture for point cloud registration. Different from existing methods, the proposed architecture consists of two stages. The first one is called meta learner, which is used to predict a task distribution and sample the key parameters for the second stage - 3D registration learner. By separating the network into two different parts, the learned model may be better at generalization. Experiments were conducted on ModelNet40, FlyingThings3D, and KITTI datasets. The results show the proposed method outperforms some existing methods, including FlowNet3D, FlowNet3D++, and HPLFlowNet.
SP:b796596921ad17276bd65df6b8fc9195db76a574
Layer-wise Adaptive Model Aggregation for Scalable Federated Learning
1 INTRODUCTION . In Federated Learning , periodic full model aggregation is the most common approach for aggregating local models across clients . Many Federated Learning algorithms , such as FedAvg ( McMahan et al . ( 2017 ) ) , FedProx ( Li et al . ( 2018 ) ) , FedNova ( Wang et al . ( 2020 ) ) , and SCAFFOLD ( Karimireddy et al . ( 2020 ) ) , assume the underlying periodic full aggregation scheme . However , it has been observed that the magnitude of gradients can be significantly different across the layers of neural networks ( You et al . ( 2019 ) ) . That is , all the layers can have a different degree of model discrepancy . The periodic full aggregation scheme does not consider such a difference and synchronizes the entire model parameters at once . Aggregating the parameters that are similar across all the clients does not make meaningful training progress while increasing the communication cost . Considering the limited network bandwidth in usual Federated Learning environments , such an inefficient network bandwidth consumption can significantly harm the scalability of Federated Learning applications . Many researchers have put much effort into addressing the expensive communication issue . Adaptive model aggregation methods adjust the aggregation interval to reduce the total communication cost ( Wang & Joshi ( 2018 ) ; Haddadpour et al . ( 2019 ) ) . Gradient ( model ) compression ( Alistarh et al . ( 2018 ) ; Albasyoni et al . ( 2020 ) ) , sparsification ( Wangni et al . ( 2017 ) ; Wang et al . ( 2018 ) ) , low-rank approximation ( Vogels et al . ( 2020 ) ; Wang et al . ( 2021 ) ) , and quantization ( Alistarh et al . ( 2017 ) ; Wen et al . ( 2017 ) ; Reisizadeh et al . ( 2020 ) ) techniques directly reduce the local data size . Employing heterogeneous model architectures across clients is also a communication-efficient approach ( Diao et al . ( 2020 ) ) . While all these works effectively tackle the expensive communication issue from different angles , they commonly assume the underlying periodic full model aggregation . To break such a convention of periodic full model aggregation , we propose FedLAMA , a novel layerwise adaptive model aggregation scheme for scalable and accurate Federated Learning . FedLAMA first prioritizes all the layers based on their contributions to the total model discrepancy . We present a metric for estimating the layer-wise degree of model discrepancy at run-time . The aggregation intervals are adjusted based on the layer-wise model discrepancy such that the layers with a smaller degree of model discrepancy is assigned with a longer aggregation interval than the other layers . The above steps are repeatedly performed once the entire model is synchronized once . Our focus is on how to relax the model aggregation frequency at each layer , jointly considering the communication efficiency and the impact on the convergence properties of federated optimization . By adjusting the aggregation interval based on the layer-wise model discrepancy , the local models can be effectively synchronized while reducing the number of communications at each layer . The model accuracy is marginally affected since the intervals are increased only at the layers that have the smallest contribution to the total model discrepancy . Our empirical study demonstrates that FedLAMA automatically finds the interval settings that make a practical trade-off between the communication cost and the model accuracy . We also provide a theoretical convergence analysis of FedLAMA for smooth and non-convex problems under non-IID data settings . We evaluate the performance of FedLAMA across three representative image classification benchmark datasets : CIFAR-10 ( Krizhevsky et al . ( 2009 ) ) , CIFAR-100 , and Federated Extended MNIST ( Cohen et al . ( 2017 ) ) . Our experimental results deliver novel insights on how to aggregate the local models efficiently consuming the network bandwidth . Given a fixed number of training iterations , as the aggregation interval increases , FedLAMA reduces the communication cost by up to 60 % under IID data settings and 70 % under non-IID data settings , while having only a marginal accuracy drop . 2 RELATED WORKS . Compression Methods – The communication-efficient global model update methods can be categorized into two groups : structured update and sketched update ( Konečnỳ et al . ( 2016 ) ) . The structured update indicates the methods that enforce a pre-defined fixed structure of the local updates , such as low-rank approximation and random mask methods . The sketched update indicates the methods that post-process the local updates via compression , sparsification , or quantization . Both directions are well studied and have shown successful results ( Alistarh et al . ( 2018 ) ; Albasyoni et al . ( 2020 ) ; Wangni et al . ( 2017 ) ; Wang et al . ( 2018 ) ; Vogels et al . ( 2020 ) ; Wang et al . ( 2021 ) ; Alistarh et al . ( 2017 ) ; Wen et al . ( 2017 ) ; Reisizadeh et al . ( 2020 ) ) . The common principle behind these methods is that the local updates can be replaced with a different data representation with a smaller size . These compression methods can be independently applied to our layer-wise aggregation scheme such that the each layer ’ s local update is compressed before being aggregated . Since our focus is on adjusting the aggregation frequency rather than changing the data representation , we do not directly compare the performance between these two approaches . We leave harmonizing the layer-wise aggregation scheme and a variety of compression methods as a promising future work . Similarity Scores – Canonical Correlation Analysis ( CCA ) methods are proposed to estimate the representational similarity across different models ( Raghu et al . ( 2017 ) ; Morcos et al . ( 2018 ) ) . Centered Kernel Alignment ( CKA ) is an improved extension of CCA ( Kornblith et al . ( 2019 ) ) . While these methods effectively quantify the degree of similarity , they commonly require expensive computations . For example , SVCCA performs singular vector decomposition of the model and CKA computes Hilbert-Schmidt Independence Criterion multiple times ( Gretton et al . ( 2005 ) ) . In addition , the representational similarity does not deliver any information regarding the gradient difference that is strongly related to the convergence property . We will propose a practical metric for estimating the layer-wise model discrepancy , which is cheap enough to be used at run-time . Layer-wise Model Freezing – Layer freezing ( dropping ) is the representative layer-wise technique for neural network training ( Brock et al . ( 2017 ) ; Kumar et al . ( 2019 ) ; Zhang & He ( 2020 ) ; Goutam et al . ( 2020 ) ) . All these methods commonly stop updating the parameters of the layers in a bottomup direction . These empirical techniques are supported by the analysis presented in ( Raghu et al . ( 2017 ) ) . Since the layers converge from the input-side sequentially , the layer-wise freezing can reduce the training time without strongly affecting the accuracy . These previous works clearly demonstrate the advantages of processing individual layers separately . 3 BACKGROUND . Federated Optimization – We consider federated optimization problems as follows . min x∈Rd [ F ( x ) : = m∑ i=1 piFi ( x ) ] , ( 1 ) Algorithm 1 : FedLAMA : Federated Layer-wise Adaptive Model Aggregation . Input : τ ′ : base aggregation interval , φ : interval increasing factor , pi , i ∈ { 1 , · · · , m } . 1 τl ← τ ′ , ∀l ∈ { 1 , · · · , L } ; 2 for k = 1 to K do 3 SGD step : xik = x i k−1 − η∇f ( wik−1 , ξk ) ; 4 for l = 1 to L do 5 if k mod τl is 0 then 6 Synchronize layer l : u ( l , k ) ← ∑m i=1 pix i ( l , k ) ; 7 dl ← ∑m i=1 ( pi‖u ( l , k ) − xi ( l , k ) ‖ 2 ) / ( τl ( dim ( u ( l , k ) ) ) ; 8 if k mod φτ ′ is 0 then 9 Adjust aggregation interval at all L layers ( Algorithm 2 ) . ; 10 Output : uK ; where pi = ni/n is the ratio of local data to the total dataset , and Fi ( x ) = 1ni ∑ ξ∈D fi ( x , ξ ) is the local objective function of client i. n is the global dataset size and ni is the local dataset size . FedAvg is a basic algorithm that solves the above minimization problem . As the degree of data heterogeneity increases , FedAvg converges more slowly . Several variants of FedAvg , such as FedProx , FedNova , and SCAFFOLD , tackle the data heterogeneity issue . All these algorithms commonly aggregate the local solutions using the periodic full aggregation scheme . Model Discrepancy – All local SGD-based algorithms allow the clients to independently train their local models within each communication round . The variance of stochastic gradients and heterogeneous data distribution can lead the local models to different directions on parameter space during the local update steps . We formally define such a discrepancy among the models as follows . m∑ i=1 pi‖u− xi‖2 , where m is the number of clients , u is the synchronized model , and xi is client i ’ s local model . This quantity bounds the difference between the local gradients and the global gradients under a smoothness assumption on objective functions . 4 LAYER-WISE ADAPTIVE MODEL AGGREGATION . Layer Prioritization – In theoretical analysis , it is common to assume the smoothness of objective functions such that the difference between local gradients and global gradients is bounded by a scaled difference of the corresponding sets of parameters . Motivated by this convention , we define ‘ layer-wise unit model discrepancy ’ , a useful metric for prioritizing the layers as follows . dl = ∑m i=1 pi‖ul − xil‖2 τl ( dim ( ul ) ) , l ∈ { 1 , · · · , L } ( 2 ) where L is the number of layers , l is the layer index , u is the global parameters , xi is the client i ’ s local parameters , τ is the aggregation interval , and dim ( · ) is the number of parameters . This metric quantifies how much each parameter contributes to the model discrepancy at each iteration . The communication cost is proportional to the number of parameters . Thus , ∑m i=1 pi‖ul − xil‖2/dim ( ul ) shows how much model discrepancy can be eliminated by synchronizing the layer at a unit communication cost . This metric allows prioritizing the layers such that the layers with a smaller dl value has a lower priority than the others . Adaptive Model Aggregation Algorithm – We propose FedLAMA , a layer-wise adaptive model aggregation scheme . Algorithm 1 shows FedLAMA algorithm . There are two input parameters : τ ′ is the base aggregation interval and φ is the interval increase factor . First , the parameters at layer l are synchronized across the clients after every τl iterations ( line 6 ) . Then , the proposed metric Algorithm 2 : Layer-wise Adaptive Interval Adjustment . Input : d : the observed model discrepancy at all L layers , τ ′ : the base aggregation interval , φ : the interval increasing factor . 1 Sorted model discrepancy : d̂← sort ( d ) ; 2 Sorted index of the layers : î← argsort ( d ) ; 3 Total model size : λ← ∑L l=1 dim ( ul ) ; 4 Total model discrepancy : δ ← ∑L l=1 dl ∗ dim ( ul ) ; 5 for l = 1 to L do 6 δl ← ( ∑l i=1 d̂i ∗ dim ( ui ) ) /δ ; 7 λl ← ( ∑l i=1 dim ( ui ) ) /λ ; 8 Find the layer index : i← îl ; 9 if δl < λl then 10 τi ← φτ ′ ; 11 else 12 τi ← τ ′ ; 13 Output : τ : the adjusted aggregation intervals at all L layers . ; dl is calculated using the synchronized parameters ul ( line 7 ) . At the end of every φτ ′ iterations , FedLAMA adjusts the model aggregation interval at all the L layers . ( line 9 ) . Algorithm 2 finds the layers that can be less frequently aggregated making a minimal impact on the total model discrepancy . First , the layer-wise degree of model discrepancy is estimated as follows . δl = ∑l i=1 d̂i ∗ dim ( ui ) ∑L i=1 d̂i ∗ dim ( ui ) , ( 3 ) where d̂i is the ith smallest element in the sorted list of the proposed metric d. Given l layers with the smallest dl values , δl quantifies their contribution to the total model discrepancy . Second , the communication cost impact is estimated as follows . λl = ∑l i=1 dim ( ui ) ∑L i=1 dim ( ui ) ( 4 ) λl is the ratio of the parameters at the l layers with the smallest dl values . Thus , 1 − λl estimates the number of parameters that will be more frequently synchronized than the others . As l increases , δl increases while 1− λl decreases monotonically . Algorithm 2 loops over the L layers finding the l value that makes δl and 1 − λl similar . In this way , it finds the aggregation interval setting that slightly sacrifices the model discrepancy while remarkably reducing the communication cost . Figure 1 shows the δl and 1 − λl curves collected from a ) CIFAR-10 ( ResNet20 ) training and b ) CIFAR-100 ( Wide-ResNet28-10 ) training . The x-axis is the number of layers to increase the aggregation interval and the y-axis is the δl and 1− λl values . The cross point of the two curves is much lower than 0.5 on y-axis in both charts . For instance , in Figure 1.a ) , the two curves are crossed when x value is 9 , and the corresponding y value is near 0.2 . That is , when the aggregation interval is increased at those 9 layers , 20 % of the total model discrepancy will increase by a factor of φ while 80 % of the total communication cost will decrease by the same factor . Note that the cross points are below 0.5 since the δl and 1− λl are calculated using the dl values sorted in an increasing order . It is worth noting that FedLAMA can be easily extended to improve the convergence rate at the cost of having minor extra communications . In this work , we do not consider finding such interval settings because it can increase the latency cost , which is not desired in Federated Learning . However , in the environments where the latency cost can be ignored , such as high-performance computing platforms , FedLAMA can accelerate the convergence by adjusting the intervals based on the cross point of 1− δl and λl calculated using the list of dl values sorted in a decreasing order . Impact of Aggregation Interval Increasing Factor φ – In Federated Learning , the communication latency cost is usually not negligible , and the total number of communications strongly affects the scalability . When increasing the aggregation interval , Algorithm 2 multiplies a pre-defined small constant φ to the fixed base interval τ ′ ( line 10 ) . This approach ensures that the communication latency cost is not increased while the network bandwidth consumption is reduced by a factor of φ. FedAvg can be considered as a special case of FedLAMA where φ is set to 1 . When φ > 1 , FedLAMA less frequently synchronize a subset of layers , and it results in reducing their communication costs . When increasing the aggregation interval , FedLAMA multiplies φ to the base interval τ ′ . So , it is guaranteed that the whole model parameters are fully synchronized after φτ ′ iterations . Because of the layers with the base aggregation interval τ ′ , the total model discrepancy of FedLAMA after φτ ′ iterations is always smaller than that of FedAvg with an aggregation interval of φτ ′ .
This paper developed an adaptive aggregation method for federated learning. The theoretical analysis shows how the interval affects the convergence rate. The experiments show that it can reduce the communication cost.
SP:cf5a5f9660d0aab430057bbe11ed925e0b9419d6
Layer-wise Adaptive Model Aggregation for Scalable Federated Learning
1 INTRODUCTION . In Federated Learning , periodic full model aggregation is the most common approach for aggregating local models across clients . Many Federated Learning algorithms , such as FedAvg ( McMahan et al . ( 2017 ) ) , FedProx ( Li et al . ( 2018 ) ) , FedNova ( Wang et al . ( 2020 ) ) , and SCAFFOLD ( Karimireddy et al . ( 2020 ) ) , assume the underlying periodic full aggregation scheme . However , it has been observed that the magnitude of gradients can be significantly different across the layers of neural networks ( You et al . ( 2019 ) ) . That is , all the layers can have a different degree of model discrepancy . The periodic full aggregation scheme does not consider such a difference and synchronizes the entire model parameters at once . Aggregating the parameters that are similar across all the clients does not make meaningful training progress while increasing the communication cost . Considering the limited network bandwidth in usual Federated Learning environments , such an inefficient network bandwidth consumption can significantly harm the scalability of Federated Learning applications . Many researchers have put much effort into addressing the expensive communication issue . Adaptive model aggregation methods adjust the aggregation interval to reduce the total communication cost ( Wang & Joshi ( 2018 ) ; Haddadpour et al . ( 2019 ) ) . Gradient ( model ) compression ( Alistarh et al . ( 2018 ) ; Albasyoni et al . ( 2020 ) ) , sparsification ( Wangni et al . ( 2017 ) ; Wang et al . ( 2018 ) ) , low-rank approximation ( Vogels et al . ( 2020 ) ; Wang et al . ( 2021 ) ) , and quantization ( Alistarh et al . ( 2017 ) ; Wen et al . ( 2017 ) ; Reisizadeh et al . ( 2020 ) ) techniques directly reduce the local data size . Employing heterogeneous model architectures across clients is also a communication-efficient approach ( Diao et al . ( 2020 ) ) . While all these works effectively tackle the expensive communication issue from different angles , they commonly assume the underlying periodic full model aggregation . To break such a convention of periodic full model aggregation , we propose FedLAMA , a novel layerwise adaptive model aggregation scheme for scalable and accurate Federated Learning . FedLAMA first prioritizes all the layers based on their contributions to the total model discrepancy . We present a metric for estimating the layer-wise degree of model discrepancy at run-time . The aggregation intervals are adjusted based on the layer-wise model discrepancy such that the layers with a smaller degree of model discrepancy is assigned with a longer aggregation interval than the other layers . The above steps are repeatedly performed once the entire model is synchronized once . Our focus is on how to relax the model aggregation frequency at each layer , jointly considering the communication efficiency and the impact on the convergence properties of federated optimization . By adjusting the aggregation interval based on the layer-wise model discrepancy , the local models can be effectively synchronized while reducing the number of communications at each layer . The model accuracy is marginally affected since the intervals are increased only at the layers that have the smallest contribution to the total model discrepancy . Our empirical study demonstrates that FedLAMA automatically finds the interval settings that make a practical trade-off between the communication cost and the model accuracy . We also provide a theoretical convergence analysis of FedLAMA for smooth and non-convex problems under non-IID data settings . We evaluate the performance of FedLAMA across three representative image classification benchmark datasets : CIFAR-10 ( Krizhevsky et al . ( 2009 ) ) , CIFAR-100 , and Federated Extended MNIST ( Cohen et al . ( 2017 ) ) . Our experimental results deliver novel insights on how to aggregate the local models efficiently consuming the network bandwidth . Given a fixed number of training iterations , as the aggregation interval increases , FedLAMA reduces the communication cost by up to 60 % under IID data settings and 70 % under non-IID data settings , while having only a marginal accuracy drop . 2 RELATED WORKS . Compression Methods – The communication-efficient global model update methods can be categorized into two groups : structured update and sketched update ( Konečnỳ et al . ( 2016 ) ) . The structured update indicates the methods that enforce a pre-defined fixed structure of the local updates , such as low-rank approximation and random mask methods . The sketched update indicates the methods that post-process the local updates via compression , sparsification , or quantization . Both directions are well studied and have shown successful results ( Alistarh et al . ( 2018 ) ; Albasyoni et al . ( 2020 ) ; Wangni et al . ( 2017 ) ; Wang et al . ( 2018 ) ; Vogels et al . ( 2020 ) ; Wang et al . ( 2021 ) ; Alistarh et al . ( 2017 ) ; Wen et al . ( 2017 ) ; Reisizadeh et al . ( 2020 ) ) . The common principle behind these methods is that the local updates can be replaced with a different data representation with a smaller size . These compression methods can be independently applied to our layer-wise aggregation scheme such that the each layer ’ s local update is compressed before being aggregated . Since our focus is on adjusting the aggregation frequency rather than changing the data representation , we do not directly compare the performance between these two approaches . We leave harmonizing the layer-wise aggregation scheme and a variety of compression methods as a promising future work . Similarity Scores – Canonical Correlation Analysis ( CCA ) methods are proposed to estimate the representational similarity across different models ( Raghu et al . ( 2017 ) ; Morcos et al . ( 2018 ) ) . Centered Kernel Alignment ( CKA ) is an improved extension of CCA ( Kornblith et al . ( 2019 ) ) . While these methods effectively quantify the degree of similarity , they commonly require expensive computations . For example , SVCCA performs singular vector decomposition of the model and CKA computes Hilbert-Schmidt Independence Criterion multiple times ( Gretton et al . ( 2005 ) ) . In addition , the representational similarity does not deliver any information regarding the gradient difference that is strongly related to the convergence property . We will propose a practical metric for estimating the layer-wise model discrepancy , which is cheap enough to be used at run-time . Layer-wise Model Freezing – Layer freezing ( dropping ) is the representative layer-wise technique for neural network training ( Brock et al . ( 2017 ) ; Kumar et al . ( 2019 ) ; Zhang & He ( 2020 ) ; Goutam et al . ( 2020 ) ) . All these methods commonly stop updating the parameters of the layers in a bottomup direction . These empirical techniques are supported by the analysis presented in ( Raghu et al . ( 2017 ) ) . Since the layers converge from the input-side sequentially , the layer-wise freezing can reduce the training time without strongly affecting the accuracy . These previous works clearly demonstrate the advantages of processing individual layers separately . 3 BACKGROUND . Federated Optimization – We consider federated optimization problems as follows . min x∈Rd [ F ( x ) : = m∑ i=1 piFi ( x ) ] , ( 1 ) Algorithm 1 : FedLAMA : Federated Layer-wise Adaptive Model Aggregation . Input : τ ′ : base aggregation interval , φ : interval increasing factor , pi , i ∈ { 1 , · · · , m } . 1 τl ← τ ′ , ∀l ∈ { 1 , · · · , L } ; 2 for k = 1 to K do 3 SGD step : xik = x i k−1 − η∇f ( wik−1 , ξk ) ; 4 for l = 1 to L do 5 if k mod τl is 0 then 6 Synchronize layer l : u ( l , k ) ← ∑m i=1 pix i ( l , k ) ; 7 dl ← ∑m i=1 ( pi‖u ( l , k ) − xi ( l , k ) ‖ 2 ) / ( τl ( dim ( u ( l , k ) ) ) ; 8 if k mod φτ ′ is 0 then 9 Adjust aggregation interval at all L layers ( Algorithm 2 ) . ; 10 Output : uK ; where pi = ni/n is the ratio of local data to the total dataset , and Fi ( x ) = 1ni ∑ ξ∈D fi ( x , ξ ) is the local objective function of client i. n is the global dataset size and ni is the local dataset size . FedAvg is a basic algorithm that solves the above minimization problem . As the degree of data heterogeneity increases , FedAvg converges more slowly . Several variants of FedAvg , such as FedProx , FedNova , and SCAFFOLD , tackle the data heterogeneity issue . All these algorithms commonly aggregate the local solutions using the periodic full aggregation scheme . Model Discrepancy – All local SGD-based algorithms allow the clients to independently train their local models within each communication round . The variance of stochastic gradients and heterogeneous data distribution can lead the local models to different directions on parameter space during the local update steps . We formally define such a discrepancy among the models as follows . m∑ i=1 pi‖u− xi‖2 , where m is the number of clients , u is the synchronized model , and xi is client i ’ s local model . This quantity bounds the difference between the local gradients and the global gradients under a smoothness assumption on objective functions . 4 LAYER-WISE ADAPTIVE MODEL AGGREGATION . Layer Prioritization – In theoretical analysis , it is common to assume the smoothness of objective functions such that the difference between local gradients and global gradients is bounded by a scaled difference of the corresponding sets of parameters . Motivated by this convention , we define ‘ layer-wise unit model discrepancy ’ , a useful metric for prioritizing the layers as follows . dl = ∑m i=1 pi‖ul − xil‖2 τl ( dim ( ul ) ) , l ∈ { 1 , · · · , L } ( 2 ) where L is the number of layers , l is the layer index , u is the global parameters , xi is the client i ’ s local parameters , τ is the aggregation interval , and dim ( · ) is the number of parameters . This metric quantifies how much each parameter contributes to the model discrepancy at each iteration . The communication cost is proportional to the number of parameters . Thus , ∑m i=1 pi‖ul − xil‖2/dim ( ul ) shows how much model discrepancy can be eliminated by synchronizing the layer at a unit communication cost . This metric allows prioritizing the layers such that the layers with a smaller dl value has a lower priority than the others . Adaptive Model Aggregation Algorithm – We propose FedLAMA , a layer-wise adaptive model aggregation scheme . Algorithm 1 shows FedLAMA algorithm . There are two input parameters : τ ′ is the base aggregation interval and φ is the interval increase factor . First , the parameters at layer l are synchronized across the clients after every τl iterations ( line 6 ) . Then , the proposed metric Algorithm 2 : Layer-wise Adaptive Interval Adjustment . Input : d : the observed model discrepancy at all L layers , τ ′ : the base aggregation interval , φ : the interval increasing factor . 1 Sorted model discrepancy : d̂← sort ( d ) ; 2 Sorted index of the layers : î← argsort ( d ) ; 3 Total model size : λ← ∑L l=1 dim ( ul ) ; 4 Total model discrepancy : δ ← ∑L l=1 dl ∗ dim ( ul ) ; 5 for l = 1 to L do 6 δl ← ( ∑l i=1 d̂i ∗ dim ( ui ) ) /δ ; 7 λl ← ( ∑l i=1 dim ( ui ) ) /λ ; 8 Find the layer index : i← îl ; 9 if δl < λl then 10 τi ← φτ ′ ; 11 else 12 τi ← τ ′ ; 13 Output : τ : the adjusted aggregation intervals at all L layers . ; dl is calculated using the synchronized parameters ul ( line 7 ) . At the end of every φτ ′ iterations , FedLAMA adjusts the model aggregation interval at all the L layers . ( line 9 ) . Algorithm 2 finds the layers that can be less frequently aggregated making a minimal impact on the total model discrepancy . First , the layer-wise degree of model discrepancy is estimated as follows . δl = ∑l i=1 d̂i ∗ dim ( ui ) ∑L i=1 d̂i ∗ dim ( ui ) , ( 3 ) where d̂i is the ith smallest element in the sorted list of the proposed metric d. Given l layers with the smallest dl values , δl quantifies their contribution to the total model discrepancy . Second , the communication cost impact is estimated as follows . λl = ∑l i=1 dim ( ui ) ∑L i=1 dim ( ui ) ( 4 ) λl is the ratio of the parameters at the l layers with the smallest dl values . Thus , 1 − λl estimates the number of parameters that will be more frequently synchronized than the others . As l increases , δl increases while 1− λl decreases monotonically . Algorithm 2 loops over the L layers finding the l value that makes δl and 1 − λl similar . In this way , it finds the aggregation interval setting that slightly sacrifices the model discrepancy while remarkably reducing the communication cost . Figure 1 shows the δl and 1 − λl curves collected from a ) CIFAR-10 ( ResNet20 ) training and b ) CIFAR-100 ( Wide-ResNet28-10 ) training . The x-axis is the number of layers to increase the aggregation interval and the y-axis is the δl and 1− λl values . The cross point of the two curves is much lower than 0.5 on y-axis in both charts . For instance , in Figure 1.a ) , the two curves are crossed when x value is 9 , and the corresponding y value is near 0.2 . That is , when the aggregation interval is increased at those 9 layers , 20 % of the total model discrepancy will increase by a factor of φ while 80 % of the total communication cost will decrease by the same factor . Note that the cross points are below 0.5 since the δl and 1− λl are calculated using the dl values sorted in an increasing order . It is worth noting that FedLAMA can be easily extended to improve the convergence rate at the cost of having minor extra communications . In this work , we do not consider finding such interval settings because it can increase the latency cost , which is not desired in Federated Learning . However , in the environments where the latency cost can be ignored , such as high-performance computing platforms , FedLAMA can accelerate the convergence by adjusting the intervals based on the cross point of 1− δl and λl calculated using the list of dl values sorted in a decreasing order . Impact of Aggregation Interval Increasing Factor φ – In Federated Learning , the communication latency cost is usually not negligible , and the total number of communications strongly affects the scalability . When increasing the aggregation interval , Algorithm 2 multiplies a pre-defined small constant φ to the fixed base interval τ ′ ( line 10 ) . This approach ensures that the communication latency cost is not increased while the network bandwidth consumption is reduced by a factor of φ. FedAvg can be considered as a special case of FedLAMA where φ is set to 1 . When φ > 1 , FedLAMA less frequently synchronize a subset of layers , and it results in reducing their communication costs . When increasing the aggregation interval , FedLAMA multiplies φ to the base interval τ ′ . So , it is guaranteed that the whole model parameters are fully synchronized after φτ ′ iterations . Because of the layers with the base aggregation interval τ ′ , the total model discrepancy of FedLAMA after φτ ′ iterations is always smaller than that of FedAvg with an aggregation interval of φτ ′ .
In this paper, the authors propose a layer-wise model aggregation scheme in federated learning cases to reduce the communication cost. Specifically, they quantified the model discrepancy between local models and global models and adaptively adjusted the aggregation interval in a layer-wise manner. By increasing the aggregation intervals and relaxing the aggregation frequency, the method can reduce the communication cost in federated learning cases. The experimental results show it can reduce the communication cost for IID data and non-IID data compared to FedAvg.
SP:cf5a5f9660d0aab430057bbe11ed925e0b9419d6
TIME-LAPSE: Learning to say “I don't know” through spatio-temporal uncertainty scoring
1 INTRODUCTION . Modern machine learning ( ML ) has seen tremendous success in various tasks across multiple domains ( Bojarski et al. , 2016 ; Hinton , 2018 ; Kreinovich & Kosheleva , 2020 ; van den Oord et al. , 2016 ) , surpassing human performance in many benchmarks ( Esteva et al. , 2017 ; Yala et al. , 2019 ; Krizhevsky et al. , 2012 ) . However , deep learning models have been known to fail silently and catastrophically with highly confident predictions ( Nguyen et al. , 2015 ; Goodfellow et al. , 2015 ; Guo et al. , 2017 ) . Such models assume a closed world scenario , i.e. , they assume that variability encountered when deployed in the real-world would be similar to the variability present in their training data . In practice , they encounter an open world where incoming samples can come from shifted distributions or completely new distributions ( Liu et al. , 2020 ) . This behaviour can have severe consequences in mission-critical domains such as healthcare and autonomous driving , where errors can be costly , resulting in injury or even death ( Amodei et al. , 2016 ) . Most widely cited models do not come with an uncertainty scoring mechanism to say “ I don ’ t know ” or to abstain from prediction ( Kompa et al. , 2021 ) . As deployed ML models are used to inform real-world decisions , it is important that they have the ability to understand when they ought to be “ unsure ” . A good uncertainty scoring framework must assign higher uncertainty estimates when the network is faced with distributional shifts or new semantic content , i.e. , out-of-distribution ( OOD ) data but must be certain ( low uncertainty ) and generalize well on learnt distributions yet unseen data ( in-distribution or InD data ) . The task of identifying when incoming inputs are drawn far from the training distribution is called out-of-distribution ( OOD ) detection . At its core , it is a binary classification problem , evaluated using measures such as area under the receiver operating curve ( AUROC ) , area under the precision recall curve ( AUPR ) and false positive rate at 80 % true positive rate ( FPR80 ) . Current OOD evaluation schemes hold different datasets to be OOD sources , without considering if the distinctions are semantic in nature ( Ahmed & Courville , 2020 ) leading to methods that are insensitive to semantic overlap and biased to dataset statistics . Closely related is the task of dataset shift detection ( MorenoTorres et al. , 2012 ) , crucial for deployed systems . Dataset shift can occur due to sample selection bias , non-stationary environments , missing values , new concepts evolving over time , etc . Most ML systems do not evaluate their ability to detect such shifts , presenting a huge gap between models performing well on test sets and models capable of being deployed in the wild . In this paper , we propose TIME-LAPSE , a predictive uncertainty quantification framework using latent space embeddings over time , evaluated through downstream tasks of OOD detection and dataset shift detection . A key insight in our approach is that most real-world scenarios ( such as electroencephalogram ( EEG ) seizure analysis , healthcare decision making , autonomous driving , etc . ) involve consecutive inputs to the model that are likely to be correlated over time . For example , an obstacle detector deployed in a self-driving car will see images correlated over time . A seizure detector installed in a neurology clinic will process hours of time-correlated EEG signals . Even low-risk image classification models deployed in search engines over the cloud will see correlated inputs over time when grouped by user ID or location . Thus , sequentially occurring samples share meaningful semantic correlations . In TIME-LAPSE ( Fig . 1 ) , we compute spatial uncertainty scores based on the following hypotheses : an encoder with enough inductive bias likely ( a ) maps OOD inputs “ far '' from other InD samples in the latent space under the Mahalanobis distance metric ( Lee et al. , 2018 ) and ( b ) produces dissimilarities between their representations under the cosine similarity metric ( Jones & Furnas , 1987 ) . We compute temporal uncertainty scores by exploiting correlations between lower dimensional representations of consecutive samples over time when examined as a sequence . A sequence of InD inputs will show more correlation than a sequence with both InD and OOD inputs or a sequence with just OOD inputs . Recent works limit themselves to OOD detection tasks with evaluations purely on highly curated image benchmarks , but do not extend their tests to more diverse and realistic scenarios required for practical applications ( Ren et al. , 2019 ; Ahmed & Courville , 2020 ) . Such OOD image benchmarks consider different datasets to be OOD sources , neglecting any semantic overlap between their OOD test sets and InD train sets , leading to narrow model capabilities ( Yang et al. , 2021 ) . We show that TIME-LAPSE is more driven by semantic content compared to other techniques , i.e . it is more robust to dataset statistics . Moreover , current evaluation schemes do not consider different dataset drift settings that could occur in the real-world . We put forth an additional sequential evaluation framework to evaluate methods under realistic conditions of data drifts and show that TIME-LAPSE outperforms other methods significantly . We demonstrate the efficacy of our proposed method by comparing against multiple baselines over different domains ( vision , audio and clinical EEGs ) . We achieve state-of-the-art ( SOTA ) on both audio and EEG datasets while improving performance on semantically corrected image benchmarks . To the best of our knowledge , we are the first to use temporal sequences of latent space embeddings for uncertainty quantification . We are also the first to use deep-learning based uncertainty scoring techniques for EEG analyses . To summarize , our key contributions are : • We propose TIME-LAPSE , an uncertainty scoring framework that uses samples ’ similarity in the latent space and their temporal similarity amongst sequential inputs to determine their predictive uncertainty . • We show that scores from TIME-LAPSE are driven by semantic content and are more robust to dataset statistics whereas popular baselines , benchmarked on standard image datasets , are susceptible to dataset statistics and overlook semantic overlap for OOD detection . • We benchmark TIME-LAPSE on diverse domains : audio speech classification , seizure detection using clinical EEGs and image classification . TIME-LAPSE achieves state-of-the-art ( SOTA ) in audio tasks , the EEG domain and semantically corrected image benchmarks . • We propose a sequential evaluation framework for dataset shift detection to evaluate methods under realistic conditions of data drifts and show that TIME-LAPSE outperforms other methods . We hope this evaluation scheme will be adopted for routinely characterizing ML system performance in the wild . 2 RELATED WORK . Uncertainty estimation is a rich field with a long history . Classical techniques include density estimation ( Breunig et al. , 2000 ) , one-class SVMs ( Schölkopf et al. , 1999 ) , tree-isolation forests ( Liu et al. , 2008 ) , etc for one-dimensional data such as time-series However , such techniques scale badly with input dimensionality ( Rabanser et al. , 2019 ) . Calibration is a frequentist notion of uncertainty , measured by proper scoring rules like log-loss or Brier scoring ( Guo et al. , 2017 ; DeGroot & Fienberg , 1983 ; Dawid , 1982 ) . Uncertainty estimation for deep neural networks ( NNs ) ( Lakshminarayanan et al. , 2017 ) typically use a Bayesian formalism to learn distributions over model weights ( Blundell et al. , 2015 ; Malinin & Gales , 2018 ; Chen et al. , 2019 ; Graves , 2011 ; Neal , 1996 ; Welling & Teh , 2011 ) . However , most Bayesian methods are difficult to train and computationally expensive . Gal & Ghahramani ( 2016 ) use Monte-Carlo dropout at test-time with an approximate Bayesian interpretation to derive uncertainty estimates.It is also computationally expensive , requiring k forward passes for each instance during inference . Quality of uncertainty estimates are commonly evaluated using OOD detection . Moreno-Torres et al . ( 2012 ) give a complete overview of closely related topics of distributional shift detection including covariate shift , label shift and concept drift ( Gama et al. , 2014 ) . Several works consider semi-supervised techniques for OOD such as outlier exposure methods ( Hendrycks et al. , 2019a ; Ruff et al. , 2020 ) , while many assume the supervised setting where the target OOD distribution is known and propose alternative training strategies and auxillary OOD tasks ( DeVries & Taylor , 2018 ; Hendrycks et al. , 2019b ; Mohseni et al. , 2020 ; Shalev et al. , 2018 ) in a multi-task setting . In this paper , we consider the more general setting of unsupervised OOD detection where no OOD examples are labelled as such and the encoder has access to only InD training labels . Other methods use representations from NNs to infer OOD inputs . Hendrycks & Gimpel ( 2017 ) use maximum softmax probabilites ( MSP ) to detect OOD data . Liang et al . ( 2018 ) improve this by introducing a temperature parameter to the softmax equation . Lee et al . ( 2018 ) fit class-conditional Gaussians to intermediate activations and use the Mahalanobis distance to identify OOD samples . Recently , some works use self-supervision to get better representations to improve OOD detection ( Tack et al. , 2020 ; Winkens et al. , 2020 ; Sehwag et al. , 2021 ) . Several methods directly use input likelihoods as the OOD detection score . However , studies have shown that generative techniques may be overconfident on complex inputs ( Nalisnick et al. , 2019 ) . Modified likelihood scores have been proposed since then ( Serrà et al. , 2020 ; Xiao et al. , 2020 ; Choi et al. , 2019 ) including energy-based models ( Liu et al. , 2020 ; Du & Mordatch , 2019 ; Grathwohl et al. , 2020 ) and likelihood ratios ( Ren et al. , 2019 ) . Reconstruction-based OOD methods use reconstruction loss as the uncertainty score and primarily use auto-encoders ( Zong et al. , 2018 ; Pidhorskyi et al. , 2018 ) or GANs ( Schlegl et al. , 2017 ; Deecke et al. , 2019 ; Perera et al. , 2019 ) . Our temporal uncertainty scores builds upon and shares similarity to change point detection methods in time-series data ( Aminikhanghahi & Cook , 2017 ; Kifer et al. , 2004 ) along with signal processing techniques such as Particle and Kalman filtering ( van der Merwe et al. , 2001 ; Kalman , 1960 ) . 3 TIME-LAPSE : OUR UNCERTAINTY SCORING FRAMEWORK . We propose TIME-LAPSE , an uncertainty scoring framework using latent-space embeddings over time . We consider a multi-class classification setting here , though our framework can be extended to other scenarios such as regression , segmentation , etc . 3.1 PROBLEM SETUP . Let X represent our high-dimensional input space , X ⊆ Rn . Let Y = { 0 , 1 , 2 , ... , C − 1 } denote the label space where C is the number of classes . In standard multi-class classification , we learn a classifier f : X 7→ Y using a dataset Dtrain ( assumed to be sampled from an underlying distribution p∗ ) such that f ( x ) = p ( Y = yi|x ) , where x ∈ X and yi ∈ Y ∀ i . The final prediction for an unseen input x is given by ŷ = arg maxyi p ( yi|x ) . Given a sequence of unseen inputs , xt ( where t denotes time ) to a classifier during inference , our goal is to output a score s ( xt ) and a selective function g ( xt ) with threshold th ∀ xt such that ( g , s ) ( xt ) : = { ŷ = arg maxyi p ( yi|xt ) , if s ( xt ) ≤ th ABSTAIN or FLAG AS OOD , else We call the score s ( xt ) the associated uncertainty score of input sample xt
This paper was fundamentally about out of distribution detection. The authors tried to use the changing confidence around prediction values to predict changing distributions. They did so specifically for high dimensional, unstructured data, where distributions are often difficult to understand or quantify and compared their results to a number of current methods in the area on a wide variety of high dimensional data.
SP:f76ec36462a44eabd6c76768a6fe8b0b8146b75e
TIME-LAPSE: Learning to say “I don't know” through spatio-temporal uncertainty scoring
1 INTRODUCTION . Modern machine learning ( ML ) has seen tremendous success in various tasks across multiple domains ( Bojarski et al. , 2016 ; Hinton , 2018 ; Kreinovich & Kosheleva , 2020 ; van den Oord et al. , 2016 ) , surpassing human performance in many benchmarks ( Esteva et al. , 2017 ; Yala et al. , 2019 ; Krizhevsky et al. , 2012 ) . However , deep learning models have been known to fail silently and catastrophically with highly confident predictions ( Nguyen et al. , 2015 ; Goodfellow et al. , 2015 ; Guo et al. , 2017 ) . Such models assume a closed world scenario , i.e. , they assume that variability encountered when deployed in the real-world would be similar to the variability present in their training data . In practice , they encounter an open world where incoming samples can come from shifted distributions or completely new distributions ( Liu et al. , 2020 ) . This behaviour can have severe consequences in mission-critical domains such as healthcare and autonomous driving , where errors can be costly , resulting in injury or even death ( Amodei et al. , 2016 ) . Most widely cited models do not come with an uncertainty scoring mechanism to say “ I don ’ t know ” or to abstain from prediction ( Kompa et al. , 2021 ) . As deployed ML models are used to inform real-world decisions , it is important that they have the ability to understand when they ought to be “ unsure ” . A good uncertainty scoring framework must assign higher uncertainty estimates when the network is faced with distributional shifts or new semantic content , i.e. , out-of-distribution ( OOD ) data but must be certain ( low uncertainty ) and generalize well on learnt distributions yet unseen data ( in-distribution or InD data ) . The task of identifying when incoming inputs are drawn far from the training distribution is called out-of-distribution ( OOD ) detection . At its core , it is a binary classification problem , evaluated using measures such as area under the receiver operating curve ( AUROC ) , area under the precision recall curve ( AUPR ) and false positive rate at 80 % true positive rate ( FPR80 ) . Current OOD evaluation schemes hold different datasets to be OOD sources , without considering if the distinctions are semantic in nature ( Ahmed & Courville , 2020 ) leading to methods that are insensitive to semantic overlap and biased to dataset statistics . Closely related is the task of dataset shift detection ( MorenoTorres et al. , 2012 ) , crucial for deployed systems . Dataset shift can occur due to sample selection bias , non-stationary environments , missing values , new concepts evolving over time , etc . Most ML systems do not evaluate their ability to detect such shifts , presenting a huge gap between models performing well on test sets and models capable of being deployed in the wild . In this paper , we propose TIME-LAPSE , a predictive uncertainty quantification framework using latent space embeddings over time , evaluated through downstream tasks of OOD detection and dataset shift detection . A key insight in our approach is that most real-world scenarios ( such as electroencephalogram ( EEG ) seizure analysis , healthcare decision making , autonomous driving , etc . ) involve consecutive inputs to the model that are likely to be correlated over time . For example , an obstacle detector deployed in a self-driving car will see images correlated over time . A seizure detector installed in a neurology clinic will process hours of time-correlated EEG signals . Even low-risk image classification models deployed in search engines over the cloud will see correlated inputs over time when grouped by user ID or location . Thus , sequentially occurring samples share meaningful semantic correlations . In TIME-LAPSE ( Fig . 1 ) , we compute spatial uncertainty scores based on the following hypotheses : an encoder with enough inductive bias likely ( a ) maps OOD inputs “ far '' from other InD samples in the latent space under the Mahalanobis distance metric ( Lee et al. , 2018 ) and ( b ) produces dissimilarities between their representations under the cosine similarity metric ( Jones & Furnas , 1987 ) . We compute temporal uncertainty scores by exploiting correlations between lower dimensional representations of consecutive samples over time when examined as a sequence . A sequence of InD inputs will show more correlation than a sequence with both InD and OOD inputs or a sequence with just OOD inputs . Recent works limit themselves to OOD detection tasks with evaluations purely on highly curated image benchmarks , but do not extend their tests to more diverse and realistic scenarios required for practical applications ( Ren et al. , 2019 ; Ahmed & Courville , 2020 ) . Such OOD image benchmarks consider different datasets to be OOD sources , neglecting any semantic overlap between their OOD test sets and InD train sets , leading to narrow model capabilities ( Yang et al. , 2021 ) . We show that TIME-LAPSE is more driven by semantic content compared to other techniques , i.e . it is more robust to dataset statistics . Moreover , current evaluation schemes do not consider different dataset drift settings that could occur in the real-world . We put forth an additional sequential evaluation framework to evaluate methods under realistic conditions of data drifts and show that TIME-LAPSE outperforms other methods significantly . We demonstrate the efficacy of our proposed method by comparing against multiple baselines over different domains ( vision , audio and clinical EEGs ) . We achieve state-of-the-art ( SOTA ) on both audio and EEG datasets while improving performance on semantically corrected image benchmarks . To the best of our knowledge , we are the first to use temporal sequences of latent space embeddings for uncertainty quantification . We are also the first to use deep-learning based uncertainty scoring techniques for EEG analyses . To summarize , our key contributions are : • We propose TIME-LAPSE , an uncertainty scoring framework that uses samples ’ similarity in the latent space and their temporal similarity amongst sequential inputs to determine their predictive uncertainty . • We show that scores from TIME-LAPSE are driven by semantic content and are more robust to dataset statistics whereas popular baselines , benchmarked on standard image datasets , are susceptible to dataset statistics and overlook semantic overlap for OOD detection . • We benchmark TIME-LAPSE on diverse domains : audio speech classification , seizure detection using clinical EEGs and image classification . TIME-LAPSE achieves state-of-the-art ( SOTA ) in audio tasks , the EEG domain and semantically corrected image benchmarks . • We propose a sequential evaluation framework for dataset shift detection to evaluate methods under realistic conditions of data drifts and show that TIME-LAPSE outperforms other methods . We hope this evaluation scheme will be adopted for routinely characterizing ML system performance in the wild . 2 RELATED WORK . Uncertainty estimation is a rich field with a long history . Classical techniques include density estimation ( Breunig et al. , 2000 ) , one-class SVMs ( Schölkopf et al. , 1999 ) , tree-isolation forests ( Liu et al. , 2008 ) , etc for one-dimensional data such as time-series However , such techniques scale badly with input dimensionality ( Rabanser et al. , 2019 ) . Calibration is a frequentist notion of uncertainty , measured by proper scoring rules like log-loss or Brier scoring ( Guo et al. , 2017 ; DeGroot & Fienberg , 1983 ; Dawid , 1982 ) . Uncertainty estimation for deep neural networks ( NNs ) ( Lakshminarayanan et al. , 2017 ) typically use a Bayesian formalism to learn distributions over model weights ( Blundell et al. , 2015 ; Malinin & Gales , 2018 ; Chen et al. , 2019 ; Graves , 2011 ; Neal , 1996 ; Welling & Teh , 2011 ) . However , most Bayesian methods are difficult to train and computationally expensive . Gal & Ghahramani ( 2016 ) use Monte-Carlo dropout at test-time with an approximate Bayesian interpretation to derive uncertainty estimates.It is also computationally expensive , requiring k forward passes for each instance during inference . Quality of uncertainty estimates are commonly evaluated using OOD detection . Moreno-Torres et al . ( 2012 ) give a complete overview of closely related topics of distributional shift detection including covariate shift , label shift and concept drift ( Gama et al. , 2014 ) . Several works consider semi-supervised techniques for OOD such as outlier exposure methods ( Hendrycks et al. , 2019a ; Ruff et al. , 2020 ) , while many assume the supervised setting where the target OOD distribution is known and propose alternative training strategies and auxillary OOD tasks ( DeVries & Taylor , 2018 ; Hendrycks et al. , 2019b ; Mohseni et al. , 2020 ; Shalev et al. , 2018 ) in a multi-task setting . In this paper , we consider the more general setting of unsupervised OOD detection where no OOD examples are labelled as such and the encoder has access to only InD training labels . Other methods use representations from NNs to infer OOD inputs . Hendrycks & Gimpel ( 2017 ) use maximum softmax probabilites ( MSP ) to detect OOD data . Liang et al . ( 2018 ) improve this by introducing a temperature parameter to the softmax equation . Lee et al . ( 2018 ) fit class-conditional Gaussians to intermediate activations and use the Mahalanobis distance to identify OOD samples . Recently , some works use self-supervision to get better representations to improve OOD detection ( Tack et al. , 2020 ; Winkens et al. , 2020 ; Sehwag et al. , 2021 ) . Several methods directly use input likelihoods as the OOD detection score . However , studies have shown that generative techniques may be overconfident on complex inputs ( Nalisnick et al. , 2019 ) . Modified likelihood scores have been proposed since then ( Serrà et al. , 2020 ; Xiao et al. , 2020 ; Choi et al. , 2019 ) including energy-based models ( Liu et al. , 2020 ; Du & Mordatch , 2019 ; Grathwohl et al. , 2020 ) and likelihood ratios ( Ren et al. , 2019 ) . Reconstruction-based OOD methods use reconstruction loss as the uncertainty score and primarily use auto-encoders ( Zong et al. , 2018 ; Pidhorskyi et al. , 2018 ) or GANs ( Schlegl et al. , 2017 ; Deecke et al. , 2019 ; Perera et al. , 2019 ) . Our temporal uncertainty scores builds upon and shares similarity to change point detection methods in time-series data ( Aminikhanghahi & Cook , 2017 ; Kifer et al. , 2004 ) along with signal processing techniques such as Particle and Kalman filtering ( van der Merwe et al. , 2001 ; Kalman , 1960 ) . 3 TIME-LAPSE : OUR UNCERTAINTY SCORING FRAMEWORK . We propose TIME-LAPSE , an uncertainty scoring framework using latent-space embeddings over time . We consider a multi-class classification setting here , though our framework can be extended to other scenarios such as regression , segmentation , etc . 3.1 PROBLEM SETUP . Let X represent our high-dimensional input space , X ⊆ Rn . Let Y = { 0 , 1 , 2 , ... , C − 1 } denote the label space where C is the number of classes . In standard multi-class classification , we learn a classifier f : X 7→ Y using a dataset Dtrain ( assumed to be sampled from an underlying distribution p∗ ) such that f ( x ) = p ( Y = yi|x ) , where x ∈ X and yi ∈ Y ∀ i . The final prediction for an unseen input x is given by ŷ = arg maxyi p ( yi|x ) . Given a sequence of unseen inputs , xt ( where t denotes time ) to a classifier during inference , our goal is to output a score s ( xt ) and a selective function g ( xt ) with threshold th ∀ xt such that ( g , s ) ( xt ) : = { ŷ = arg maxyi p ( yi|xt ) , if s ( xt ) ≤ th ABSTAIN or FLAG AS OOD , else We call the score s ( xt ) the associated uncertainty score of input sample xt
The paper proposes a spatio-temporal approach for unsupervised out-of-distribution detection. In particular, it suggests a 'hierarchical' evaluation method based on computation of existing distance/similarity scores on hidden embeddings of high-dimensional data succeeded by a temporal component, that is also based on existing work, that treats chunks of scores, computed by the first step, of input data as a stream. The suggested pipeline achieves state-of-the-art results on datasets coming from different domains ( image, audio, clinical data). More importantly, it demonstrates the importance of semantic context when deciding whether a sample is ood exhibiting better performance than existing baselines when semantic overlap should be taken into consideration.
SP:f76ec36462a44eabd6c76768a6fe8b0b8146b75e
A Deep Variational Approach to Clustering Survival Data
1 INTRODUCTION Survival analysis ( Rodrı́guez , 2007 ; D. G. Altman , 2020 ) has been extensively used in a variety of medical applications to infer a relationship between explanatory variables and a potentially censored survival outcome . The latter indicates the time to a certain event , such as death or cancer recurrence , and is censored when its value is only partially known , e.g . due to withdrawal from the study ( see Appendix A ) . Classical approaches include the Cox proportional hazards ( PH ; Cox ( 1972 ) ) and accelerated failure time ( AFT ) models ( Buckley & James , 1979 ) . Recently , many machine learning techniques have been proposed to learn nonlinear relationships from unstructured data ( Faraggi & Simon , 1995 ; Ranganath et al. , 2016 ; Katzman et al. , 2018 ; Kvamme et al. , 2019 ) . Clustering , on the other hand , serves as a valuable tool in data-driven discovery and subtyping of diseases . Yet a fully unsupervised clustering algorithm does not use , by definition , the survival outcomes to identify clusters . Therefore , there is no guarantee that the discovered subgroups are correlated with patient survival ( Bair & Tibshirani , 2004 ) . For this reason , we focus on a semi-supervised learning approach to cluster survival data that jointly considers explanatory variables and censored outcome as indicators for patient ’ s state . This problem is particularly relevant for precision medicine ( Collins & Varmus , 2015 ) . The identification of such patient subpopulations could , for example , facilitate a better understanding of a disease and a more personalised disease management ( Fenstermacher et al. , 2011 ) . Figure 1 schematically depicts this clustering problem : here , the overall patient population consists of three groups characterised by different associations between the covariates and survival , resulting in disparate clinical conditions . The survival distributions do not need to differ between clusters : compare groups 1 ( ) and 3 ( ) . Clustering of survival data , however , remains an under-explored problem . Only few methods have been proposed in this context and they either have limited scalability in high-dimensional , unstructured data ( Liverani et al. , 2020 ) , or they focus on the discovery of purely outcome-driven clusters ( Chapfuwa et al. , 2020 ; Nagpal et al. , 2021a ) , that is clusters characterised entirely by survival time . The latter might fail in applications where the survival distribution alone is not sufficiently informative to stratify the population ( see Figure 1 ) . For instance , groups of patients characterised by similar survival outcomes might respond very differently to the same treatment ( Tanniou et al. , 2016 ) . To address the issues above , we present a novel method for clustering survival data — variational deep survival clustering ( VaDeSC ) that discovers groups of patients characterised by different generative mechanisms of survival outcome . It extends previous variational approaches for unsupervised deep clustering ( Dilokthanakul et al. , 2016 ; Jiang et al. , 2017 ) by incorporating cluster-specific survival models in the generative process . Instead of only focusing on survival , our approach models the heterogeneity in the relationships between the covariates and survival outcome . Our main contributions are as follows : ( i ) We propose a novel , deep probabilistic approach to survival cluster analysis that jointly models the distribution of explanatory variables and censored survival outcomes . ( ii ) We comprehensively compare the clustering and time-to-event prediction performance of VaDeSC to the related work on clustering and mixture models for survival data on a range of synthetic and real-world datasets . In particular , we show that VaDeSC outperforms considered baseline methods in terms of identifying clusters and is comparable in terms of time-to-event predictions . ( iii ) We apply the proposed model to computed tomography imaging data acquired from non-small cell lung cancer patients and assess obtained clustering qualitatively . We demonstrate that VaDeSC discovers clusters associated with well-known clinical patient characteristics , in agreement with previous medical findings . 2 RELATED WORK . Clustering of survival data has been first explored by Bair & Tibshirani ( 2004 ) ( semi-supervised clustering ; SSC ) . The authors propose pre-selecting variables based on univariate Cox regression hazard scores and subsequently performing k-means clustering on the subset of features to discover patient subpopulations . More recently , Ahlqvist et al . ( 2018 ) use Cox regression to explore differences across subgroups of diabetic patients discovered by k-means and hierarchical clustering . In the spirit of the early work by Farewell ( 1982 ) on mixtures of Cox regression models , Mouli et al . ( 2018 ) propose a deep clustering approach to differentiate between long- and short-term survivors based on a modified Kuiper statistic in the absence of end-of-life signals . Xia et al . ( 2019 ) adopt a multitask learning approach for the outcome-driven clustering of acute coronary syndrome patients . Chapfuwa et al . ( 2020 ) propose a survival cluster analysis ( SCA ) based on a truncated Dirichlet process and neural networks for the encoder and time-to-event prediction model . Somewhat similar techniques have been explored by Nagpal et al . ( 2021a ) who introduce finite Weibull , named deep survival machines ( DSM ) . DSM fits a mixture of survival regression models on the representations learnt by an encoder neural network . From the modelling perspective , the above approaches focus on outcome-driven clustering , i.e . they recover clusters entirely characterised by different survival distributions . On the contrary , we aim to model cluster-specific associations between covariates and survival times to discover clusters characterised not only by disparate risk but also by different survival generative mechanisms ( see Figure 1 ) . In the concurrent work , Nagpal et al . ( 2021b ) introduce deep Cox mixtures ( DCM ) jointly fitting a VAE and a mixture of Cox regressions . As opposed to our approach , DCM does not specify a generative model and its loss is derived empirically combining the VAE loss with the likelihood of survival times . As a result , DCM does not formally maximise the joint likelihood of the data . On the contrary , we focus on a probabilistic method with an interpretable generative process from which an ELBO of the joint likelihood can be derived formally . The approach by Liverani et al . ( 2020 ) is , on the other hand , the most closely related to ours . The authors propose a clustering method for collinear survival data based on the profile regression ( PR ; Molitor et al . ( 2010 ) ) . In particular , they introduce a Dirichlet process mixture model with clusterspecific parameters for the Weibull distribution . However , their method is unable to tackle highdimensional unstructured data , since none of its components are parameterised by neural networks . This prevents its usage on real-world complex datasets , such as medical imaging ( Haarburger et al. , 2019 ; Bello et al. , 2019 ) . Table 1 compares our and related methods w.r.t . a range of properties . For an overview of other lines of work and a detailed comparison see Appendices B and C. 3 METHOD In this section , we present VaDeSC — a novel variational deep survival clustering model . Figure 2 provides a schematic summary of the proposed approach : the input vector x is mapped to a latent representation z using a VAE regularised by a Gaussian mixture prior . The survival density function is given by a mixture of Weibull distributions with cluster-specific parameters β . The parameters of the Gaussian mixture and the Weibull distributions are then optimised jointly using both the explanatory input variables and survival outcomes . Preliminaries We consider the following setting : let D = { ( xi , δi , ti ) } Ni=1 be a dataset consisting ofN threetuples , one for each patient . Herein , xi denotes the explanatory variables , or features . δi is the censoring indicator : δi = 0 if the survival time of the i-th patient was censored , and δi = 1 otherwise . Finally , ti is the potentially censored survival time . A maximum likelihood approach to survival analysis seeks to model the survival distribution S ( t|x ) = P ( T > t|x ) ( Cox , 1972 ) . Two key challenges of survival analysis are ( i ) the censoring of observed survival times and ( ii ) a potentially complex nonlinear relationship between x and t. When clustering survival data ( Liverani et al. , 2020 ) , we additionally consider a latent cluster assignment variable ci ∈ { 1 , ... , K } unobserved at training time . Here , K is the total number of clusters . The problem then is twofold : ( i ) to infer unobserved cluster assignments and ( ii ) model the survival distribution given xi and ci . c z π µ Σ β γ xtδ k N K time . Figure 3 summarises the random process graphically . Survival Model Above , p ( t|z , c ) refers to the cluster-specific survival model . We follow an approach similar to Ranganath et al . ( 2016 ) and Liverani et al . ( 2020 ) ; in particular , we as- sume that given z and c , the uncensored survival time follows the Weibull distribution given by Weibull ( softplus ( z > βc ) , k ) , where softplus ( x ) = log ( 1 + exp ( x ) ) ; k is the shape parameter ; and βc are cluster-specific survival parameters . Note that we omitted the bias term βc,0 for the sake of brevity . Observe that softplus ( z > βc ) corresponds to the scale parameter of the Weibull distribution . We assume that the shape parameter k is global ; however , an adaptation to cluster-specific parameters , as proposed by Liverani et al . ( 2020 ) , is straightforward . The Weibull distribution with scale λ and shape k has the probability density function given by f ( x ; λ , k ) = kλ ( x λ ) k−1 exp ( − ( x λ ) k ) , for x ≥ 0 . Consequently , adjusting for right-censoring yields the following distribution : p ( t|z , c ; β , k ) = f ( t ; λzc , k ) δS ( t|z , c ) 1−δ = [ k λzc ( t λzc ) k−1 exp ( − ( t λzc ) k ) ] δ [ exp ( − ( t λzc ) k ) ] 1−δ , ( 1 ) where β = { β1 , . . . , βK } ; λzc = softplus ( z > βc ) ; and S ( t|z , c ) = ∫∞ t=t f ( t ; λzc , k ) is the survival function . Henceforth , we will use p ( t|z , c ) as a shorthand notation for p ( t|z , c ; β , k ) . In this paper , we only consider right-censoring ; however , the proposed model can be extended to tackle other forms of censoring . Joint Probability Distribution Assuming the generative process described above , the joint probability of x and t can be written as p ( x , t ) = ∫ z ∑K c=1 p ( x , t , z , c ) = ∫ z ∑K c=1 p ( x|t , z , c ) p ( t , z , c ) . It is important to note that x and t are independent given z , so are x and c. Hence , we can rewrite the joint probability of the data , also referred to as the likelihood function , given the parameters π , µ , Σ , γ , β , k as p ( x , t ; π , µ , Σ , γ , β , k ) = ∫ z K∑ c=1 p ( x|z ; γ ) p ( t|z , c ; β , k ) p ( z|c ; µ , Σ ) p ( c ; π ) , ( 2 ) where µ = { µ1 , ... , µK } , Σ = { Σ1 , ... , ΣK } , and β = { β1 , ... , βK } . Evidence Lower Bound Given the data generating assumptions stated before , the objective is to infer the parameters π , µ , Σ , γ , and β which better explain the covariates and survival outcomes { xi , ti } Ni=1 . Since the likelihood function in Equation 2 is intractable , we maximise a lower bound of the log marginal probability of the data : log p ( x , t ; π , µ , Σ , γ , β , k ) ≥ Eq ( z , c|x , t ) log [ p ( x|z ; γ ) p ( t|z , c ; β , k ) p ( z|c ; µ , Σ ) p ( c ; π ) q ( z , c|x , t ) ] . ( 3 ) We approximate the probability of the latent variables z and c given the observations with a variational distribution q ( z , c|x , t ) = q ( z|x ) q ( c|z , t ) , where the first term is the encoder parameterised by a neural network . The second term is equal to the true probability p ( c|z , t ) : q ( c|z , t ) = p ( c|z , t ) = p ( z , t|c ) p ( c ) ∑K c=1 p ( z , t|c ) p ( c ) = p ( t|z , c ) p ( z|c ) p ( c ) ∑K c=1 p ( t|z , c ) p ( z|c ) p ( c ) . ( 4 ) Thus , the evidence lower bound ( ELBO ) can be written as L ( x , t ) = Eq ( z|x ) p ( c|z , t ) log p ( x|z ; γ ) + Eq ( z|x ) p ( c|z , t ) log p ( t|z , c ; β , k ) −DKL ( q ( z , c|x , t ) ‖ p ( z , c ; µ , Σ , π ) ) . ( 5 ) Of particular interest is the second term which encourages the model to maximise the probability of observing the given survival outcome t under the variational distribution of the latent embeddings and cluster assignments q ( z , c|x , t ) . It can be then seen as a mixture of survival distributions , each one assigned to one cluster . The ELBO can be approximated using the stochastic gradient variational Bayes ( SGVB ) estimator ( Kingma & Welling , 2014 ) to be maximised efficiently using stochastic gradient descent . For the complete derivation we refer to Appendix D. Missing Survival Time The hard cluster assignments can be computed from the distribution p ( c|z , t ) of Equation 4 . However , the survival times may not be observable at test-time ; whereas our derivation of the distribution p ( c|z , t ) depends on p ( t|z , c ) . Therefore , when the survival time of an individual is unknown , using the Bayes ’ rule we instead compute p ( c|z ) = p ( z|c ) p ( c ) ∑K c=1 p ( z|c ) p ( c ) .
This work tackles the problem of clustering in the context of survival data using a generative model. A variational autoencoder is used for modelling the data, while the latent representation is leveraged to model the survival outcome conditionned on the assigned cluster following a Weibull distribution. This approach allows to leverage both the survival outcome and the covariates for clustering. Moreover, the latent state associated to each cluster is then used for interpretability of the observed cluster. Synthetic and real world datasets demonstrate the competitiveness of the method on both discriminative and clustering performances.
SP:5948c59cae322efd1b6fef76d3cbddfe9771c102
A Deep Variational Approach to Clustering Survival Data
1 INTRODUCTION Survival analysis ( Rodrı́guez , 2007 ; D. G. Altman , 2020 ) has been extensively used in a variety of medical applications to infer a relationship between explanatory variables and a potentially censored survival outcome . The latter indicates the time to a certain event , such as death or cancer recurrence , and is censored when its value is only partially known , e.g . due to withdrawal from the study ( see Appendix A ) . Classical approaches include the Cox proportional hazards ( PH ; Cox ( 1972 ) ) and accelerated failure time ( AFT ) models ( Buckley & James , 1979 ) . Recently , many machine learning techniques have been proposed to learn nonlinear relationships from unstructured data ( Faraggi & Simon , 1995 ; Ranganath et al. , 2016 ; Katzman et al. , 2018 ; Kvamme et al. , 2019 ) . Clustering , on the other hand , serves as a valuable tool in data-driven discovery and subtyping of diseases . Yet a fully unsupervised clustering algorithm does not use , by definition , the survival outcomes to identify clusters . Therefore , there is no guarantee that the discovered subgroups are correlated with patient survival ( Bair & Tibshirani , 2004 ) . For this reason , we focus on a semi-supervised learning approach to cluster survival data that jointly considers explanatory variables and censored outcome as indicators for patient ’ s state . This problem is particularly relevant for precision medicine ( Collins & Varmus , 2015 ) . The identification of such patient subpopulations could , for example , facilitate a better understanding of a disease and a more personalised disease management ( Fenstermacher et al. , 2011 ) . Figure 1 schematically depicts this clustering problem : here , the overall patient population consists of three groups characterised by different associations between the covariates and survival , resulting in disparate clinical conditions . The survival distributions do not need to differ between clusters : compare groups 1 ( ) and 3 ( ) . Clustering of survival data , however , remains an under-explored problem . Only few methods have been proposed in this context and they either have limited scalability in high-dimensional , unstructured data ( Liverani et al. , 2020 ) , or they focus on the discovery of purely outcome-driven clusters ( Chapfuwa et al. , 2020 ; Nagpal et al. , 2021a ) , that is clusters characterised entirely by survival time . The latter might fail in applications where the survival distribution alone is not sufficiently informative to stratify the population ( see Figure 1 ) . For instance , groups of patients characterised by similar survival outcomes might respond very differently to the same treatment ( Tanniou et al. , 2016 ) . To address the issues above , we present a novel method for clustering survival data — variational deep survival clustering ( VaDeSC ) that discovers groups of patients characterised by different generative mechanisms of survival outcome . It extends previous variational approaches for unsupervised deep clustering ( Dilokthanakul et al. , 2016 ; Jiang et al. , 2017 ) by incorporating cluster-specific survival models in the generative process . Instead of only focusing on survival , our approach models the heterogeneity in the relationships between the covariates and survival outcome . Our main contributions are as follows : ( i ) We propose a novel , deep probabilistic approach to survival cluster analysis that jointly models the distribution of explanatory variables and censored survival outcomes . ( ii ) We comprehensively compare the clustering and time-to-event prediction performance of VaDeSC to the related work on clustering and mixture models for survival data on a range of synthetic and real-world datasets . In particular , we show that VaDeSC outperforms considered baseline methods in terms of identifying clusters and is comparable in terms of time-to-event predictions . ( iii ) We apply the proposed model to computed tomography imaging data acquired from non-small cell lung cancer patients and assess obtained clustering qualitatively . We demonstrate that VaDeSC discovers clusters associated with well-known clinical patient characteristics , in agreement with previous medical findings . 2 RELATED WORK . Clustering of survival data has been first explored by Bair & Tibshirani ( 2004 ) ( semi-supervised clustering ; SSC ) . The authors propose pre-selecting variables based on univariate Cox regression hazard scores and subsequently performing k-means clustering on the subset of features to discover patient subpopulations . More recently , Ahlqvist et al . ( 2018 ) use Cox regression to explore differences across subgroups of diabetic patients discovered by k-means and hierarchical clustering . In the spirit of the early work by Farewell ( 1982 ) on mixtures of Cox regression models , Mouli et al . ( 2018 ) propose a deep clustering approach to differentiate between long- and short-term survivors based on a modified Kuiper statistic in the absence of end-of-life signals . Xia et al . ( 2019 ) adopt a multitask learning approach for the outcome-driven clustering of acute coronary syndrome patients . Chapfuwa et al . ( 2020 ) propose a survival cluster analysis ( SCA ) based on a truncated Dirichlet process and neural networks for the encoder and time-to-event prediction model . Somewhat similar techniques have been explored by Nagpal et al . ( 2021a ) who introduce finite Weibull , named deep survival machines ( DSM ) . DSM fits a mixture of survival regression models on the representations learnt by an encoder neural network . From the modelling perspective , the above approaches focus on outcome-driven clustering , i.e . they recover clusters entirely characterised by different survival distributions . On the contrary , we aim to model cluster-specific associations between covariates and survival times to discover clusters characterised not only by disparate risk but also by different survival generative mechanisms ( see Figure 1 ) . In the concurrent work , Nagpal et al . ( 2021b ) introduce deep Cox mixtures ( DCM ) jointly fitting a VAE and a mixture of Cox regressions . As opposed to our approach , DCM does not specify a generative model and its loss is derived empirically combining the VAE loss with the likelihood of survival times . As a result , DCM does not formally maximise the joint likelihood of the data . On the contrary , we focus on a probabilistic method with an interpretable generative process from which an ELBO of the joint likelihood can be derived formally . The approach by Liverani et al . ( 2020 ) is , on the other hand , the most closely related to ours . The authors propose a clustering method for collinear survival data based on the profile regression ( PR ; Molitor et al . ( 2010 ) ) . In particular , they introduce a Dirichlet process mixture model with clusterspecific parameters for the Weibull distribution . However , their method is unable to tackle highdimensional unstructured data , since none of its components are parameterised by neural networks . This prevents its usage on real-world complex datasets , such as medical imaging ( Haarburger et al. , 2019 ; Bello et al. , 2019 ) . Table 1 compares our and related methods w.r.t . a range of properties . For an overview of other lines of work and a detailed comparison see Appendices B and C. 3 METHOD In this section , we present VaDeSC — a novel variational deep survival clustering model . Figure 2 provides a schematic summary of the proposed approach : the input vector x is mapped to a latent representation z using a VAE regularised by a Gaussian mixture prior . The survival density function is given by a mixture of Weibull distributions with cluster-specific parameters β . The parameters of the Gaussian mixture and the Weibull distributions are then optimised jointly using both the explanatory input variables and survival outcomes . Preliminaries We consider the following setting : let D = { ( xi , δi , ti ) } Ni=1 be a dataset consisting ofN threetuples , one for each patient . Herein , xi denotes the explanatory variables , or features . δi is the censoring indicator : δi = 0 if the survival time of the i-th patient was censored , and δi = 1 otherwise . Finally , ti is the potentially censored survival time . A maximum likelihood approach to survival analysis seeks to model the survival distribution S ( t|x ) = P ( T > t|x ) ( Cox , 1972 ) . Two key challenges of survival analysis are ( i ) the censoring of observed survival times and ( ii ) a potentially complex nonlinear relationship between x and t. When clustering survival data ( Liverani et al. , 2020 ) , we additionally consider a latent cluster assignment variable ci ∈ { 1 , ... , K } unobserved at training time . Here , K is the total number of clusters . The problem then is twofold : ( i ) to infer unobserved cluster assignments and ( ii ) model the survival distribution given xi and ci . c z π µ Σ β γ xtδ k N K time . Figure 3 summarises the random process graphically . Survival Model Above , p ( t|z , c ) refers to the cluster-specific survival model . We follow an approach similar to Ranganath et al . ( 2016 ) and Liverani et al . ( 2020 ) ; in particular , we as- sume that given z and c , the uncensored survival time follows the Weibull distribution given by Weibull ( softplus ( z > βc ) , k ) , where softplus ( x ) = log ( 1 + exp ( x ) ) ; k is the shape parameter ; and βc are cluster-specific survival parameters . Note that we omitted the bias term βc,0 for the sake of brevity . Observe that softplus ( z > βc ) corresponds to the scale parameter of the Weibull distribution . We assume that the shape parameter k is global ; however , an adaptation to cluster-specific parameters , as proposed by Liverani et al . ( 2020 ) , is straightforward . The Weibull distribution with scale λ and shape k has the probability density function given by f ( x ; λ , k ) = kλ ( x λ ) k−1 exp ( − ( x λ ) k ) , for x ≥ 0 . Consequently , adjusting for right-censoring yields the following distribution : p ( t|z , c ; β , k ) = f ( t ; λzc , k ) δS ( t|z , c ) 1−δ = [ k λzc ( t λzc ) k−1 exp ( − ( t λzc ) k ) ] δ [ exp ( − ( t λzc ) k ) ] 1−δ , ( 1 ) where β = { β1 , . . . , βK } ; λzc = softplus ( z > βc ) ; and S ( t|z , c ) = ∫∞ t=t f ( t ; λzc , k ) is the survival function . Henceforth , we will use p ( t|z , c ) as a shorthand notation for p ( t|z , c ; β , k ) . In this paper , we only consider right-censoring ; however , the proposed model can be extended to tackle other forms of censoring . Joint Probability Distribution Assuming the generative process described above , the joint probability of x and t can be written as p ( x , t ) = ∫ z ∑K c=1 p ( x , t , z , c ) = ∫ z ∑K c=1 p ( x|t , z , c ) p ( t , z , c ) . It is important to note that x and t are independent given z , so are x and c. Hence , we can rewrite the joint probability of the data , also referred to as the likelihood function , given the parameters π , µ , Σ , γ , β , k as p ( x , t ; π , µ , Σ , γ , β , k ) = ∫ z K∑ c=1 p ( x|z ; γ ) p ( t|z , c ; β , k ) p ( z|c ; µ , Σ ) p ( c ; π ) , ( 2 ) where µ = { µ1 , ... , µK } , Σ = { Σ1 , ... , ΣK } , and β = { β1 , ... , βK } . Evidence Lower Bound Given the data generating assumptions stated before , the objective is to infer the parameters π , µ , Σ , γ , and β which better explain the covariates and survival outcomes { xi , ti } Ni=1 . Since the likelihood function in Equation 2 is intractable , we maximise a lower bound of the log marginal probability of the data : log p ( x , t ; π , µ , Σ , γ , β , k ) ≥ Eq ( z , c|x , t ) log [ p ( x|z ; γ ) p ( t|z , c ; β , k ) p ( z|c ; µ , Σ ) p ( c ; π ) q ( z , c|x , t ) ] . ( 3 ) We approximate the probability of the latent variables z and c given the observations with a variational distribution q ( z , c|x , t ) = q ( z|x ) q ( c|z , t ) , where the first term is the encoder parameterised by a neural network . The second term is equal to the true probability p ( c|z , t ) : q ( c|z , t ) = p ( c|z , t ) = p ( z , t|c ) p ( c ) ∑K c=1 p ( z , t|c ) p ( c ) = p ( t|z , c ) p ( z|c ) p ( c ) ∑K c=1 p ( t|z , c ) p ( z|c ) p ( c ) . ( 4 ) Thus , the evidence lower bound ( ELBO ) can be written as L ( x , t ) = Eq ( z|x ) p ( c|z , t ) log p ( x|z ; γ ) + Eq ( z|x ) p ( c|z , t ) log p ( t|z , c ; β , k ) −DKL ( q ( z , c|x , t ) ‖ p ( z , c ; µ , Σ , π ) ) . ( 5 ) Of particular interest is the second term which encourages the model to maximise the probability of observing the given survival outcome t under the variational distribution of the latent embeddings and cluster assignments q ( z , c|x , t ) . It can be then seen as a mixture of survival distributions , each one assigned to one cluster . The ELBO can be approximated using the stochastic gradient variational Bayes ( SGVB ) estimator ( Kingma & Welling , 2014 ) to be maximised efficiently using stochastic gradient descent . For the complete derivation we refer to Appendix D. Missing Survival Time The hard cluster assignments can be computed from the distribution p ( c|z , t ) of Equation 4 . However , the survival times may not be observable at test-time ; whereas our derivation of the distribution p ( c|z , t ) depends on p ( t|z , c ) . Therefore , when the survival time of an individual is unknown , using the Bayes ’ rule we instead compute p ( c|z ) = p ( z|c ) p ( c ) ∑K c=1 p ( z|c ) p ( c ) .
In this work, the authors propose a model for clustering survival data which accounts for both survival time as well as covariates, such as patient demographics. The model is similar to previous approaches, though it incorporates a neural network encoder to handle unstructured data types as input. A modest set of experiments suggest that the proposed approach identifies more meaningful clusters than similar approaches. Also, while not the focus of the proposed approach, empirical evaluation shows that the proposed method performs similarly to existing approaches on time-to-event predictions.
SP:5948c59cae322efd1b6fef76d3cbddfe9771c102
Nonparametric Learning of Two-Layer ReLU Residual Units
[ ( A∗x ) + + x ] , where ground-truth network parametersA∗ ∈ Rd×d represent a nonnegative full-rank matrix andB∗ ∈ Rm×d is full-rank with m ≥ d and for c ∈ Rd , [ c+ ] i = max { 0 , ci } . We design layer-wise objectives as functionals whose analytic minimizers express the exact ground-truth network in terms of its parameters and nonlinearities . Following this objective landscape , learning residual units from finite samples can be formulated using convex optimization of a nonparametric function : for each layer , we first formulate the corresponding empirical risk minimization ( ERM ) as a positive semi-definite quadratic program ( QP ) , then we show the solution space of the QP can be equivalently determined by a set of linear inequalities , which can then be efficiently solved by linear programming ( LP ) . We further prove the statistical strong consistency of our algorithm , and demonstrate its robustness and sample efficiency through experimental results . 1 INTRODUCTION . Neural networks have achieved remarkable success in various fields such as computer vision ( LeCun et al. , 1998 ; Krizhevsky et al. , 2012 ; He et al. , 2016a ) and natural language processing ( Kim , 2014 ; Sutskever et al. , 2014 ) . This success is largely due to the strong expressive power of neural networks ( Bengio & Delalleau , 2011 ) , where nonlinear activation units , such as rectified linear units ( ReLU ) ( Nair & Hinton , 2010 ) and hyperbolic tangents ( tanh ) play a vital role to ensure the large learning capacity of the networks ( Maas et al. , 2013 ) . However , the nonlinearity of neural networks makes them significantly more difficult to train than linear models ( Livni et al. , 2014 ) . Therefore , with the development of neural network applications , finding efficient algorithms with provable properties to train such nontrivial neural networks has become an important and a relatively new goal . A ReLU B Residual networks , or ResNets ( He et al. , 2016a ) , are a class of deep neural networks that adopt skip connections to feed values between nonadjacent layers , where skipped layers may contain nonlinearities in between . Without loss of expressivity , ResNets avoid the vanishing gradient problem by directly passing gradient information from previous layers to current layers where otherwise gradients might vanish without skipping . In practice , ResNets have shown strong learning efficiency in several tasks , e.g . achieving at least 93 % test accuracy on CIFAR-10 classification , lowering single-crop error to 20.1 % on the 1000-class ImageNet dataset ( Russakovsky et al. , 2015 ; He et al. , 2016b ) . Common ResNets are often aggregated by many repeated shallow networks , where each network acts as a minimal unit with this kind of skip propagation , named a residual unit ( He et al. , 2016b ) . Given the flexibility and simplicity of residual units , much theoretical work has been devoted to study them and develop training algorithms for them in a way that sidesteps from the standard backpropagation regime and provides guarantees on the quality of estimation ( see subsection 1.1 ) . In this paper , we propose algorithms that can learn a general class of single-skip twolayer residual units with ReLU activation as shown on the right by the equation : y = B [ ( Ax ) + + x ] , where for a scalar c , c+ = max { 0 , c } ( for a vector , this maximization is applied coordinate-wise ) , x is a random vector as the network input with support space Rd , andA ∈ Rd×d andB ∈ Rm×d are weight matrices of layer 1 and layer 2 , respectively . Compared to previous work ( Ge et al. , 2018 ; 2017 ; Zhang et al. , 2018 ; Wu et al. , 2019 ; Tian , 2017 ; Du et al. , 2017 ; Brutzkus & Globerson , 2017 ; Soltanolkotabi , 2017 ; Li & Yuan , 2017 ; Zhong et al. , 2017 ) , the introduction of residual connections simplifies the recovery of the network parameters by removing the permutation and scaling invariance . However , the naive mean square error minimization used in estimating the parameters remains nonconvex . Unlike most previous work , we do not assume a specific input distribution nor that the distribution is symmetric ( Ge et al. , 2018 ; Du & Goel , 2018 ) . We show that under regularity conditions on the weights of the residual unit , the problem of learning the unit can be formulated through quadratic programming ( QP ) . We use nonparametric estimation ( Guntuboyina et al. , 2018 ) to estimate the ReLU function values in the networks . We further rewrite our constructed quadratic programs to linear programs ( LPs ) . The LP formulation is simpler to optimize and has the same solution space as the QP for the network parameters . 1.1 RELATED WORK . Provable learning of neural networks has become an important topic of research . Arora et al . ( 2014 ) recover a multi-layer generative network with sparse connections and Livni et al . ( 2014 ) study the learning of multi-layer neural networks with polynomial activation . Goel et al . ( 2018 ) learns a one-layer convolution network with a perceptron-like rule . They prove the correctness of an iterative algorithm for exact recovery of the target network . Rabusseau et al . ( 2019 ) describe a spectral algorithm for two-layer linear networks . Recent work has connected optimization and two-layer network learning ( Ergen & Pilanci , 2021 ; Sahiner et al. , 2020 ; Ergen & Pilanci , 2020 ; Pilanci & Ergen , 2020 ) and has showed how to optimize networks layer by layer ( Belilovsky et al. , 2019 ) . For learning a one-layer ReLU network , Wu et al . ( 2019 ) optimize the norm and direction of neural network weight vectors separately , and Zhang et al . ( 2018 ) use gradient descent with a specific initialization . For learning a two-layer ReLU network , Ge et al . ( 2017 ) redesign the optimization landscape such that it is more amenable to theoretical analysis and Ge et al . ( 2018 ) use a momentbased method for estimating a neural network Janzamin et al . ( 2015 ) . Many others have studied ReLU networks in various settings ( Tian , 2017 ; Du et al. , 2017 ; Brutzkus & Globerson , 2017 ; Soltanolkotabi , 2017 ; Li & Yuan , 2017 ; Zhong et al. , 2017 ; Goel & Klivans , 2017 ) . The study of ReLU networks with two hidden layers has also been gaining attention ( Goel & Klivans , 2017 ; Allen-Zhu et al. , 2019 ) , with a focus on PAC learning ( Valiant , 1984 ) . In relation to our work , Allen-Zhu & Li ( 2019 ) examined the PAC-learnable function of a specific three-layer neural network with residual connections . Their work differs from ours in two aspects . First , their learnable functions include a smaller ( in comparison to the student network ) three-layer residual network . Second , the assumptions they make on their three-layer model are rather different than ours . In relation to nonparametric estimation , Guntuboyina et al . ( 2018 ) treat the final output of a shaperestricted regressor as a parameter , placing some restrictions on the type of function that can be estimated ( such as convexity ) . They provide solutions for estimation with isotonic regression ( Brunk , 1955 ; Ayer et al. , 1955 ; van Eeden , 1956 ) , convex regression ( Seijo et al. , 2011 ) , shape-restricted additive models ( Meyer , 2013 ; Chen & Samworth , 2016 ) and shape-restricted single index models ( Kakade et al. , 2011 ; Kuchibhotla et al. , 2017 ) . 1.2 MAIN RESULTS . We design quadratic objective functionals with a linear bounded feasible domain that take network parameters and functions as variables to estimate the ground-truth network parameters and nonlinearities . The values of the objectives are moments over the input distribution . Thm . 1.1 summarizes the landscapes of the objectives . Theorem 1.1 ( objective landscape , informal ) . Suppose a ground-truth residual unit has nondegenerate weights in both layers and nonnegative weights in layer 1 . Then there exist quadratic functionals defined in linear-constrained domains whose minimizers a ) are unique , and are the exact ground-truth , or b ) are not unique , but can be adjusted to the exact ground-truth . In practice , the exact moments over unobserved variables are not available . We can only construct the empirical risk minimization ( ERM ) of the moment-valued objectives by generated samples . With functions as variables in moment-valued objectives being optimized nonparametrically , the empirical objectives become quadratic functions with linear constraints ( QP ) . We further show the convexity of our QP which guarantees its solution in polynomial time w.r.t . sample size and dimension . With the solution to the QP available , the strong consistency of our network learner is guaranteed : Theorem 1.2 ( strong consistency , informal ) . Suppose samples are generated by a ground-truth residual unit that has nondegenerate weights in both layers and nonnegative weights in layer 1 . Then there exists an algorithm that learns a network a.s.−−→ the exact ground-truth as sample size grows . Roadmap : AssumeA andB are student network weights of layer 1 and 2 . We first give a warm-up vanilla linear regression approach only knowing A is in Rd×d and B is in Rm×d ( section 3 ) . We then move to the details of our nonparametric learning for layer 2 ( section 4 ) , and similarly , layer 1 ( section 5 ) . We formalize Thm . 1.1 , showing how nonparametric learning allows us to select the values of A and B from reduced spaces that are seeded by A∗ and B∗ , under which LR is faster than vanilla LR . In section 6 , we describe the strong consistency of our methods for respective layers , formalizing Thm . 1.2 using the continuous mapping theorem ( Mann & Wald , 1943 ) . 2 PRELIMINARIES . We describe the notations used in this paper , introduce the model and its underlying assumptions , and state conditions which simplify the problem but which can be removed without loss of learnability . Notation The ReLU residual units we use take a vector x ∈ Rd as input and return a vector y ∈ Rm . We use A∗ ∈ Rd×d and B∗ ∈ Rm×d to denote the ground-truth network parameters for layer 1 and 2 , respectively . We use circumflex to denote predicted terms ( e.g . an empirical objective function f̂ , estimated layer 1 weights  ) . We use n to denote the number of i.i.d . samples available for the training algorithm , { x ( i ) , y ( i ) } to denote the i-th sample drawn . For an integer k , We define [ k ] to be { 1 , 2 , . . . , k } , and e ( j ) as the standard basis vector with a 1 at position j . All scalar-based operators are element wise in the case of vectors or matrices unless specified otherwise . We use x and y to refer to the input and output vectors , respectively , as random variables . Linear Regression : Linear regression ( LR ) in this paper refers to the problem of estimating L for unbiased model y = Lx . In this case , estimation is done by minimizing the empirical risk R̂ ( L ) = 12n ∑ i∈ [ n ] ∥∥Lx ( i ) − y ( i ) ∥∥2 – using linear least squares ( LLS ) . Its solution has a closed form which we use as given . We refer the reader to Hamilton ( 1994 ) for more information . Models , Assumptions and Conditions Following previous work ( Livni et al. , 2014 ) , we assume a given neural network structure specifies a hypothesis class that contains all the networks conforming to this structure . Learning such a class means using training samples to find a set of weights such that the neural networks predictions generalize well to unseen samples , where both the training and the unseen samples are drawn from an unobserved ground-truth distribution . In this paper , the hypothesis class is given by ReLU residual units and we assume it has sufficient expressive power to fit the ground-truth model . More specifically , we discuss the realizable case of learning , in which the ground-truth model is set to be a residual unit taken from the hypothesis class with the form : y = B∗ [ ( A∗x ) + + x ] , ( 1 ) and is used to draw samples for learning . Unlike other multi-layer ReLU-affine models which do not apply skip connections , we can not permute the weight matrices of the residual unit and retain the same function because of skip-adding x ( it breaks symmetry ) . This helps us circumvent issues of identifiability1 , and allows us to precisely estimate the ground-truth weight matricesA∗ andB∗ . Our general approach for residual unit layer 2 learns a scaled ground-truth weight matrix that also minimizes the layer 2 objective . The existence of such scaled equivalence of our layer 2 approach comes from what is defined below . 1Here , we are referring to the ability to identify the true model parameters using infinite samples . Definition 2.1 ( component-wise scale transformation ) . A matrix A ∈ Rd×d is said to be a scale transformation w.r.t . the j-th component if ( Aj , : ) > = Aj , j · e ( j ) . Additionally , estimation is more complex when the layer 2 weightsB∗ is nonsquare . For simplicity of our algorithm presentation for layer 2 , we stick to Cond . 2.1 in the following sections2 . Condition 2.1 ( layer 2 objective minimizer unique ) . A∗ is not a scale transformation w.r.t . any components andB∗ is a square matrix , i.e . m = d .
This paper gives an algorithm for learning two-layer neural networks with ReLU activation (realizable case). The network also consists of skip connections to avoid the problems of identifiability. As a warm up, the authors first give a simple algorithms based on linear regression, whenever enough samples could be observed with all-positive and all-negative entries. They start with an algorithm for recovering the layer two parameters. For this step, they use the $\ell_2$ loss and show that its minimizer is unique and matches with the ground truth parameters under certain condition. Subsequently, the authors replace the expectation in the objective with an average over the samples (based on the empirical risk minimization principle), which they could write as a convex quadratic program without making any parametric assumption. Finally, they show that the quadratic program can be equivalently written as a linear program, which lets them recover the parameters of the second layer (in fact the inverse matrix of this weight matrix). Once layer 2 is learnt, the original problem reduces to that of learning the single layer non-linearity. They write the objective as a sum of weight estimator and a function estimator. They show that the minimizer of this loss is achieved when the estimated weight matrix is a diagonal matrix times the ground truth and the function measures the difference between the true nonlinear function and the scaled wright matrix. Again, they learn the function non-parametrically using a quadratic program, which they equivalently write as a linear program to get the scaled weight matrix. The scaling factors in the diagonal matrix can then be learnt using a linear regression. Finally, the authors conduct extensive experimentation to validate that their algorithms performs superior to the vanilla SGD-based algorithm. They also show that their algorithm, especially the QP algorithm is robust to noise.
SP:6feb07f0db5f1efc2395d906e1c645fc8b512cae
Nonparametric Learning of Two-Layer ReLU Residual Units
[ ( A∗x ) + + x ] , where ground-truth network parametersA∗ ∈ Rd×d represent a nonnegative full-rank matrix andB∗ ∈ Rm×d is full-rank with m ≥ d and for c ∈ Rd , [ c+ ] i = max { 0 , ci } . We design layer-wise objectives as functionals whose analytic minimizers express the exact ground-truth network in terms of its parameters and nonlinearities . Following this objective landscape , learning residual units from finite samples can be formulated using convex optimization of a nonparametric function : for each layer , we first formulate the corresponding empirical risk minimization ( ERM ) as a positive semi-definite quadratic program ( QP ) , then we show the solution space of the QP can be equivalently determined by a set of linear inequalities , which can then be efficiently solved by linear programming ( LP ) . We further prove the statistical strong consistency of our algorithm , and demonstrate its robustness and sample efficiency through experimental results . 1 INTRODUCTION . Neural networks have achieved remarkable success in various fields such as computer vision ( LeCun et al. , 1998 ; Krizhevsky et al. , 2012 ; He et al. , 2016a ) and natural language processing ( Kim , 2014 ; Sutskever et al. , 2014 ) . This success is largely due to the strong expressive power of neural networks ( Bengio & Delalleau , 2011 ) , where nonlinear activation units , such as rectified linear units ( ReLU ) ( Nair & Hinton , 2010 ) and hyperbolic tangents ( tanh ) play a vital role to ensure the large learning capacity of the networks ( Maas et al. , 2013 ) . However , the nonlinearity of neural networks makes them significantly more difficult to train than linear models ( Livni et al. , 2014 ) . Therefore , with the development of neural network applications , finding efficient algorithms with provable properties to train such nontrivial neural networks has become an important and a relatively new goal . A ReLU B Residual networks , or ResNets ( He et al. , 2016a ) , are a class of deep neural networks that adopt skip connections to feed values between nonadjacent layers , where skipped layers may contain nonlinearities in between . Without loss of expressivity , ResNets avoid the vanishing gradient problem by directly passing gradient information from previous layers to current layers where otherwise gradients might vanish without skipping . In practice , ResNets have shown strong learning efficiency in several tasks , e.g . achieving at least 93 % test accuracy on CIFAR-10 classification , lowering single-crop error to 20.1 % on the 1000-class ImageNet dataset ( Russakovsky et al. , 2015 ; He et al. , 2016b ) . Common ResNets are often aggregated by many repeated shallow networks , where each network acts as a minimal unit with this kind of skip propagation , named a residual unit ( He et al. , 2016b ) . Given the flexibility and simplicity of residual units , much theoretical work has been devoted to study them and develop training algorithms for them in a way that sidesteps from the standard backpropagation regime and provides guarantees on the quality of estimation ( see subsection 1.1 ) . In this paper , we propose algorithms that can learn a general class of single-skip twolayer residual units with ReLU activation as shown on the right by the equation : y = B [ ( Ax ) + + x ] , where for a scalar c , c+ = max { 0 , c } ( for a vector , this maximization is applied coordinate-wise ) , x is a random vector as the network input with support space Rd , andA ∈ Rd×d andB ∈ Rm×d are weight matrices of layer 1 and layer 2 , respectively . Compared to previous work ( Ge et al. , 2018 ; 2017 ; Zhang et al. , 2018 ; Wu et al. , 2019 ; Tian , 2017 ; Du et al. , 2017 ; Brutzkus & Globerson , 2017 ; Soltanolkotabi , 2017 ; Li & Yuan , 2017 ; Zhong et al. , 2017 ) , the introduction of residual connections simplifies the recovery of the network parameters by removing the permutation and scaling invariance . However , the naive mean square error minimization used in estimating the parameters remains nonconvex . Unlike most previous work , we do not assume a specific input distribution nor that the distribution is symmetric ( Ge et al. , 2018 ; Du & Goel , 2018 ) . We show that under regularity conditions on the weights of the residual unit , the problem of learning the unit can be formulated through quadratic programming ( QP ) . We use nonparametric estimation ( Guntuboyina et al. , 2018 ) to estimate the ReLU function values in the networks . We further rewrite our constructed quadratic programs to linear programs ( LPs ) . The LP formulation is simpler to optimize and has the same solution space as the QP for the network parameters . 1.1 RELATED WORK . Provable learning of neural networks has become an important topic of research . Arora et al . ( 2014 ) recover a multi-layer generative network with sparse connections and Livni et al . ( 2014 ) study the learning of multi-layer neural networks with polynomial activation . Goel et al . ( 2018 ) learns a one-layer convolution network with a perceptron-like rule . They prove the correctness of an iterative algorithm for exact recovery of the target network . Rabusseau et al . ( 2019 ) describe a spectral algorithm for two-layer linear networks . Recent work has connected optimization and two-layer network learning ( Ergen & Pilanci , 2021 ; Sahiner et al. , 2020 ; Ergen & Pilanci , 2020 ; Pilanci & Ergen , 2020 ) and has showed how to optimize networks layer by layer ( Belilovsky et al. , 2019 ) . For learning a one-layer ReLU network , Wu et al . ( 2019 ) optimize the norm and direction of neural network weight vectors separately , and Zhang et al . ( 2018 ) use gradient descent with a specific initialization . For learning a two-layer ReLU network , Ge et al . ( 2017 ) redesign the optimization landscape such that it is more amenable to theoretical analysis and Ge et al . ( 2018 ) use a momentbased method for estimating a neural network Janzamin et al . ( 2015 ) . Many others have studied ReLU networks in various settings ( Tian , 2017 ; Du et al. , 2017 ; Brutzkus & Globerson , 2017 ; Soltanolkotabi , 2017 ; Li & Yuan , 2017 ; Zhong et al. , 2017 ; Goel & Klivans , 2017 ) . The study of ReLU networks with two hidden layers has also been gaining attention ( Goel & Klivans , 2017 ; Allen-Zhu et al. , 2019 ) , with a focus on PAC learning ( Valiant , 1984 ) . In relation to our work , Allen-Zhu & Li ( 2019 ) examined the PAC-learnable function of a specific three-layer neural network with residual connections . Their work differs from ours in two aspects . First , their learnable functions include a smaller ( in comparison to the student network ) three-layer residual network . Second , the assumptions they make on their three-layer model are rather different than ours . In relation to nonparametric estimation , Guntuboyina et al . ( 2018 ) treat the final output of a shaperestricted regressor as a parameter , placing some restrictions on the type of function that can be estimated ( such as convexity ) . They provide solutions for estimation with isotonic regression ( Brunk , 1955 ; Ayer et al. , 1955 ; van Eeden , 1956 ) , convex regression ( Seijo et al. , 2011 ) , shape-restricted additive models ( Meyer , 2013 ; Chen & Samworth , 2016 ) and shape-restricted single index models ( Kakade et al. , 2011 ; Kuchibhotla et al. , 2017 ) . 1.2 MAIN RESULTS . We design quadratic objective functionals with a linear bounded feasible domain that take network parameters and functions as variables to estimate the ground-truth network parameters and nonlinearities . The values of the objectives are moments over the input distribution . Thm . 1.1 summarizes the landscapes of the objectives . Theorem 1.1 ( objective landscape , informal ) . Suppose a ground-truth residual unit has nondegenerate weights in both layers and nonnegative weights in layer 1 . Then there exist quadratic functionals defined in linear-constrained domains whose minimizers a ) are unique , and are the exact ground-truth , or b ) are not unique , but can be adjusted to the exact ground-truth . In practice , the exact moments over unobserved variables are not available . We can only construct the empirical risk minimization ( ERM ) of the moment-valued objectives by generated samples . With functions as variables in moment-valued objectives being optimized nonparametrically , the empirical objectives become quadratic functions with linear constraints ( QP ) . We further show the convexity of our QP which guarantees its solution in polynomial time w.r.t . sample size and dimension . With the solution to the QP available , the strong consistency of our network learner is guaranteed : Theorem 1.2 ( strong consistency , informal ) . Suppose samples are generated by a ground-truth residual unit that has nondegenerate weights in both layers and nonnegative weights in layer 1 . Then there exists an algorithm that learns a network a.s.−−→ the exact ground-truth as sample size grows . Roadmap : AssumeA andB are student network weights of layer 1 and 2 . We first give a warm-up vanilla linear regression approach only knowing A is in Rd×d and B is in Rm×d ( section 3 ) . We then move to the details of our nonparametric learning for layer 2 ( section 4 ) , and similarly , layer 1 ( section 5 ) . We formalize Thm . 1.1 , showing how nonparametric learning allows us to select the values of A and B from reduced spaces that are seeded by A∗ and B∗ , under which LR is faster than vanilla LR . In section 6 , we describe the strong consistency of our methods for respective layers , formalizing Thm . 1.2 using the continuous mapping theorem ( Mann & Wald , 1943 ) . 2 PRELIMINARIES . We describe the notations used in this paper , introduce the model and its underlying assumptions , and state conditions which simplify the problem but which can be removed without loss of learnability . Notation The ReLU residual units we use take a vector x ∈ Rd as input and return a vector y ∈ Rm . We use A∗ ∈ Rd×d and B∗ ∈ Rm×d to denote the ground-truth network parameters for layer 1 and 2 , respectively . We use circumflex to denote predicted terms ( e.g . an empirical objective function f̂ , estimated layer 1 weights  ) . We use n to denote the number of i.i.d . samples available for the training algorithm , { x ( i ) , y ( i ) } to denote the i-th sample drawn . For an integer k , We define [ k ] to be { 1 , 2 , . . . , k } , and e ( j ) as the standard basis vector with a 1 at position j . All scalar-based operators are element wise in the case of vectors or matrices unless specified otherwise . We use x and y to refer to the input and output vectors , respectively , as random variables . Linear Regression : Linear regression ( LR ) in this paper refers to the problem of estimating L for unbiased model y = Lx . In this case , estimation is done by minimizing the empirical risk R̂ ( L ) = 12n ∑ i∈ [ n ] ∥∥Lx ( i ) − y ( i ) ∥∥2 – using linear least squares ( LLS ) . Its solution has a closed form which we use as given . We refer the reader to Hamilton ( 1994 ) for more information . Models , Assumptions and Conditions Following previous work ( Livni et al. , 2014 ) , we assume a given neural network structure specifies a hypothesis class that contains all the networks conforming to this structure . Learning such a class means using training samples to find a set of weights such that the neural networks predictions generalize well to unseen samples , where both the training and the unseen samples are drawn from an unobserved ground-truth distribution . In this paper , the hypothesis class is given by ReLU residual units and we assume it has sufficient expressive power to fit the ground-truth model . More specifically , we discuss the realizable case of learning , in which the ground-truth model is set to be a residual unit taken from the hypothesis class with the form : y = B∗ [ ( A∗x ) + + x ] , ( 1 ) and is used to draw samples for learning . Unlike other multi-layer ReLU-affine models which do not apply skip connections , we can not permute the weight matrices of the residual unit and retain the same function because of skip-adding x ( it breaks symmetry ) . This helps us circumvent issues of identifiability1 , and allows us to precisely estimate the ground-truth weight matricesA∗ andB∗ . Our general approach for residual unit layer 2 learns a scaled ground-truth weight matrix that also minimizes the layer 2 objective . The existence of such scaled equivalence of our layer 2 approach comes from what is defined below . 1Here , we are referring to the ability to identify the true model parameters using infinite samples . Definition 2.1 ( component-wise scale transformation ) . A matrix A ∈ Rd×d is said to be a scale transformation w.r.t . the j-th component if ( Aj , : ) > = Aj , j · e ( j ) . Additionally , estimation is more complex when the layer 2 weightsB∗ is nonsquare . For simplicity of our algorithm presentation for layer 2 , we stick to Cond . 2.1 in the following sections2 . Condition 2.1 ( layer 2 objective minimizer unique ) . A∗ is not a scale transformation w.r.t . any components andB∗ is a square matrix , i.e . m = d .
This paper considers the problem of learning the parameters of a two-layer ReLU network with a residual unit: given samples of the form $(x_i, y_i)$, with $y_i = B^*[(A^* x_i)^+ + x_i]$, the authors provide an algorithm that provably learns $A^*$ and $B^*$, as the sample size grows. It is crucially assumed that the entries of $A^*$ are non-negative and, by exploiting this fact, the learning problem is formulated via quadratic programming (QP): the authors show that there exist quadratic functionals whose minimisers can be used to deduce the ground-truth parameters. Furthermore, the QPs are re-written as linear programs (LPs), which are simpler to optimise and have the same solution space. Numerical results demonstrate the superiority of the proposed approach with respect to gradient descent methods.
SP:6feb07f0db5f1efc2395d906e1c645fc8b512cae
Counterfactual Plans under Distributional Ambiguity
Counterfactual explanations are attracting significant attention due to the flourishing applications of machine learning models in consequential domains . A counterfactual plan consists of multiple possibilities to modify a given instance so that the model ’ s prediction will be altered . As the predictive model can be updated subject to the future arrival of new data , a counterfactual plan may become ineffective , or infeasible , with respect to the future values of the model parameters . In this work , we study the counterfactual plans under model uncertainty , in which the distribution of the model parameters is partially prescribed using only the first- and second-moment information . First , we propose an uncertainty quantification tool to compute the lower and upper bounds of the probability of validity for any given counterfactual plan . We then provide corrective methods to adjust the counterfactual plan to improve the validity measure . The numerical experiments validate our bounds and demonstrate that our correction increases the robustness of the counterfactual plans in different real-world datasets . 1 INTRODUCTION . Machine learning models , thanks to their superior predictive performance , are blooming with increasing applications in consequential decision-making tasks . Along with the potential to help making better decisions , current machine learning models are also raising concerns about their explainability and transparency , especially in domains where humans are at stake . These domains span from loan approvals ( Siddiqi , 2012 ) , university admission ( Waters & Miikkulainen , 2014 ) to job hiring ( Ajunwa et al. , 2016 ) . In these applications , it is instructive to understand why a particular algorithmic decision is made , and counterfactual explanations act as a useful toolkit to comprehend ( black-box ) machine learning models ( Wachter et al. , 2017 ) . Counterfactual explanation is also known in the field of interpretable machine learning as contrastive explanation ( Miller , 2018 ; Karimi et al. , 2020b ) or recourse ( Ustun et al. , 2019 ) . A counterfactual explanation suggests how an instance should be modified so as to receive an alternate algorithmic outcome . As such , it could be used as a suggestion for improvement purposes . For example , a student is rejected from graduate study , and the university can provide one or multiple counterfactuals to guide the applicant for admission in the following year . A concrete example may be of the form “ get a GRE score of at least 325 ” or “ get a 6-month research experience ” . In practice , providing a counterfactual plan consisting of multiple examples is highly desirable because a single counterfactual to every applicant with the same covariates may be unsatisfactory in practice ( Wachter et al. , 2017 ) . Indeed , the covariates can barely capture the intrinsic behaviors , constraints and unrevealed preferences of the person they represent so that the users with the same features may have different preferences to modify their input . As a consequence , a pre-emptive design choice is to provide a “ menu ” of possible recourses , and let the applicant choose the recourse that fits them best . Viewed in this way , a counterfactual plan has the potential to increase satisfaction and build trust among the stakeholders of any machine learning applications . Constructing a counterfactual plan , however , is not a straightforward task because of the many competing criteria in the design process . By definition , the plan should be valid : by committing to any counterfactual in the plan , the application should be able to flip his current unfavorable outcome to a favorable one . However , each possibility in the plan should be in the proximity of the covariates of the applicant so that the modification is actionable . Further , the plan should consist of a diverse range of recourses to accommodate the different tastes and preferences of the population . Russell ( 2019 ) propose a mixed integer programming method to generate a counterfactual plan for a linear classifier , in which the diversity is imposed using a rule-based approach . In Dandl et al . ( 2020 ) , the authors propose a model-agnostic approach using a multi-objective evolutionary algorithm to construct a diverse counterfactual plan . More recently , Mothilal et al . ( 2020 ) use the determinantal point process to measure the diversity of a plan . The authors then formulate an optimization problem to find the counterfactual plan that minimizes the weighted sum of three terms representing validity , proximity , and diversity . A critical drawback of the existing works is the assumption of an invariant predictive model , which often fails to hold in practical settings . In fact , during a turbulent pandemic time , it is difficult to assume that the demographic population of students applying for postgraduate studies remain unchanged . And even in the case that the demography remains unchanged , special pandemic conditions such as hybrid learning mode or travel bans may affect the applicants ’ package , which in turn leads to fluctuations of the covariate distribution in the applicant pool . These shifts in the data are channeled to the shift in the parameters of the predictive model : when the machine learning models are re-trained or re-calibrated with new data , their parameters also change accordingly ( Venkatasubramanian & Alfano , 2020 ) . This raises an emerging concern because the counterfactual plan is usually designed to be valid to only the current model , but that is not enough to guarantee any validity on the future models . Thus , the counterfactual plan carries a promise of a favorable future outcome , nevertheless , this promise is fragile . It is hence reasonable to demand the counterfactual plan to be robust with respect to the shift of the parameters . Pawelczyk et al . ( 2020 ) study the sparsity of counterfactuals and its non-robustness under different fixed models ( predictive multiplicity ) . Rawal et al . ( 2020 ) consider the counterfactual plan problem and describe several types of model shift related to the correction , temporal , and geospatial shift from data . They also study the trade-off between the recourse proximity and its validity regarding to the model updates . Most recently , Upadhyay et al . ( 2021 ) leverage robust optimization to generate a counterfactual that is robust to some constrained perturbations of the model ’ s parameters . However , both works consider only the single counterfactual settings . Contributions . We study the many facets of the counterfactual plans with respect to random future model parameters . We focus on a linear classification setting and we prescribe the random model parameters only through the first- and second-moment information . We contribute concretely 1. a diagnostic tool to assess the validity of a counterfactual plan . It provides a lower and upper bound on the probability of joint validity of a given plan subject to uncertain model parameters . 2. a correction tool to improve the validity of a counterfactual plan , while keeping the modifications to each counterfactual at a minimal level . The corrections are intuitive and admit closed-form expression . 3. a COunterfactual Plan under Ambiguity ( COPA ) framework to construct a counterfactual plan which explicitly takes the model uncertainty into consideration . It minimizes the weighted sum of validity , proximity and diversity terms , and can be solved efficiently using gradient descents . Each of our above contributions is exposed in Section 2 , 3 and 4 , respectively . In Section 5 , we conduct experiments on both synthetic and real-world datasets to demonstrate the efficiency of our corrections and of our COPA framework . All proofs can be found in the appendix . General setup . Consider a covariate space Rd and a linear binary classification setting . Each linear classifier can be parametrized by θ ∈ Rd with decision output Cθ ( x ) = 1 if θ > x ≥ 0 , and 0 otherwise , where 0 represents an unfavorable outcome . Note that we omit the bias term to avoid clutter , taking the bias term into account can be achieved by extending the dimension of x and θ by an extra dimension . A counterfactual plan is a set of J counterfactual explanations { xj } j=1 , ... , J , and we denote { xj } for short . When J = 1 , we have a single counterfactual explanation problem , which is the subject of recent works ( Ustun et al. , 2019 ; Karimi et al. , 2020a ; Upadhyay et al. , 2021 ) . Next , we define the joint validity of a counterfactual plan . Definition 1.1 ( Joint validity ) . A counterfactual plan { xj } is valid with respect to a realization θ if Cθ ( xj ) = 1 for all j = 1 , . . . , J . Notations . We use Sd++ ( Sd+ ) to denote the space of symmetric positive ( semi ) definite matrices . For any A ∈ Rm×m , the trace operator is Tr [ A ] = ∑d i=1Aii . For any integer J , [ J ] , { 1 , . . . , J } . 2 VALIDITY BOUNDS OF COUNTERFACTUAL PLANS . In this section , we propose a diagnostic tool to benchmark the validity of a pre-computed counterfactual plan { xj } . We model the random model parameters θ̃ with a nominal distribution P̂ . Instead of making a strong assumption on a specific parametric form of P̂ such as Gaussian distribution , we only assume that P̂ is known only up to the second moment . More specifically , we assume that under P̂ , θ̃ has a nominal mean vector µ̂ and nominal covariance matrix Σ̂ ∈ Sd++ . Definition 2.1 ( Gelbrich distance ) . The Gelbrich distance between two pairs ( µ1 , Σ1 ) ∈ Rd × Sd+ and ( µ2 , Σ2 ) ∈ Rd × Sd+ is defined as G ( ( µ1 , Σ1 ) , ( µ2 , Σ2 ) ) , √ ‖µ1 − µ2‖22 + Tr [ Σ1 + Σ2 − 2 ( Σ 1 2 2 Σ1Σ 1 2 2 ) 1 2 ] . The Gelbrich distance is closely related to the optimal transport distance between Gaussian distributions . Indeed , G ( ( µ1 , Σ1 ) , ( µ2 , Σ2 ) ) is equal to the type-2 Wasserstein distance between two Gaussian distributions N ( µ1 , Σ1 ) and N ( µ2 , Σ2 ) ( Gelbrich , 1990 ) . It is thus trivial that G is a distance on Rd×Sd+ , and as a consequence , it is symmetric andG ( ( µ1 , Σ1 ) , ( µ2 , Σ2 ) ) = 0 if and only if ( µ1 , Σ1 ) = ( µ2 , Σ2 ) . Using the Gelbrich distance to design the moment ambiguity set for distributionally robust optimization leads to many desirable properties such as computational tractability and performance guarantees ( Kuhn et al. , 2019 ) . Motivated by this idea , we first construct the following uncertainty set U , { ( µ , Σ ) ∈ Rd × Sd+ : G ( ( µ , Σ ) , ( µ̂ , Σ̂ ) ) ≤ ρ } , which is formally a ρ-neighborhood in the mean vector-covariance matrix space around the nominal moment ( µ̂ , Σ̂ ) . The ambiguity set for the distributions of θ̃ is obtained by lifting U to generate a family of probability measures that satisfy the moment conditions B , { Q ∈ P : ∃ ( µ , Σ ) ∈ U such that Q ∼ ( µ , Σ ) } , . where P is a set of all probability measures supported on Rd and Q ∼ ( µ , Σ ) indicates that Q has mean vector µ and covariance matrix Σ . The central question of this section is : If the distribution of θ̃ belongs to B , what is the probability that a given plan { xj } is valid ? To answer this question , we define the event set Θ ( { xj } ) that contains all model parameter values that renders { xj } jointly valid . Under the definition of a linear model , Θ ( { xj } ) is an intersection of J open hyperplanes of the form Θ ( { xj } ) , { θ ∈ Rd : x > j θ ≥ 0 ∀j ∈ [ J ] } . ( 1 ) We name Θ ( { xj } ) the set of favorable parameters . The probability of validity for a plan under a measure Q is Q ( θ̃ ∈ Θ ( { xj } ) ) . We are interested in evaluating the lower and the upper bound probability that the plan { xj } is valid uniformly over all distributions Q ∈ B . This is equivalent to quantifying the following quantities inf Q∈B Q ( θ̃ ∈ Θ ( { xj } ) ) and sup Q∈B Q ( θ̃ ∈ Θ ( { xj } ) ) . In the remainder of this section , we discuss how to evaluate the bounds for these terms . Lower bound . We denote by Θ◦ the interior of the set Θ , that is , Θ◦ ( { xj } ) , { θ ∈ Rd : x > j θ > 0 ∀j } . Note that all the inequalities defining Θ◦ ( { xj } ) are strict inequalities . By definition , we have Θ◦ ( { xj } ) ⊂ Θ ( { xj } ) , and hence infQ∈B Q ( θ̃ ∈ Θ◦ ( { xj } ) ) ≤ infQ∈B Q ( θ̃ ∈ Θ ( { xj } ) ) . Because Θ◦ ( { xj } ) is an open set , we can leverage the generalized Chebyshev lower bound to evaluate the minimum quantity of Q ( θ̃ ∈ Θ◦ ( { xj } ) ) over all distributions with a given mean and covariance matrix ( Vandenberghe et al. , 2007 ) . Adding moment uncertainty via the set U is obtained by rejoining two minimization layers . The next theorem presents this result . Theorem 2.2 ( Lower bound ) . For any ρ ∈ R+ , µ̂ ∈ Rd and Σ̂ ∈ Sd+ , let L ? be the optimal value of the following semidefinite program L ? = inf 1− ∑ j∈ [ J ] λj s. t. µ ∈ Rd , Σ ∈ Sd+ , C ∈ Rd×d , M ∈ Sd+ λj ∈ R , zj ∈ Rd , Zj ∈ Sd ∀j ∈ [ J ] −x > j zj ≥ 0 , [ Zj zj z > j λj ] 0 ∀j ∈ [ J ] ∑ j∈ [ J ] [ Zj zj z > j λj ] [ M µ µ > 1 ] , [ Σ C C > Σ̂ ] 0 , [ M − Σ µ µ > 1 ] 0 ‖µ̂‖2 − 2µ̂ > µ+ Tr [ M + Σ̂− 2C ] ≤ ρ2 . ( 2 ) Then we have L ? = inf Q∈B Q ( θ̃ ∈ Θ◦ ( { xj } ) ) ≤ inf Q∈B Q ( θ̃ ∈ Θ ( { xj } ) ) . Upper bound . Because Θ ( { xj } ) is a closed set , we can leverage a duality result to evaluate the maximum quantity of Q ( θ̃ ∈ Θ ( { xj } ) ) over all distributions with a given mean and covariance matrix ( Isii , 1960 ) . Adding moment uncertainty via the set U is obtained by invoking the support function of the moment set . This result is presented in the next theorem Theorem 2.3 ( Upper bound ) . For any ρ ∈ R+ , µ̂ ∈ Rd and Σ̂ ∈ Sd+ , let U ? be the optimal value of the following semidefinite program U ? = inf z0 + γ ( ρ 2 − ‖µ̂‖22 − Tr [ Σ̂ ] ) + q + Tr [ Q ] s. t. γ ∈ R+ , z0 ∈ R , z ∈ Rd , Z ∈ Sd+ , q ∈ R+ , Q ∈ Sd+ , λ ∈ RJ+ [ γI − Z γΣ̂ 12 γΣ̂ 1 2 Q ] 0 , [ γI − Z γµ̂+ z γµ̂ > + z > q ] 0 [ Z z z > z0 ] 0 , [ Z z z > z0 − 1 ] ∑ j∈ [ J ] λj [ 0 12xj 1 2x > j 0 ] . Then we have supQ∈B Q ( θ̃ ∈ Θ ( { xj } ) ) ≤ U ? . Thanks to the choice of the Gelbrich distanceG , both optimization problems in Theorems 2.2 and 2.3 are linear semidefinite programs , and they can be solved efficiently by standard , off-the-shelf solvers such as MOSEK to high dimensions ( MOSEK ApS , 2019 ) . Other choices of distance ( divergence ) are also available : for example , one may opt for the Kullback-Leibler ( KL ) type divergence between Gaussian distribution to prescribe U as in Taskesen et al . ( 2021 ) . Unfortunately , the KL divergence will entail a log-determinant term , and the resulting optimization problems are no longer linear programs and are no longer solvable using MOSEK . Equipped with L ? and U ? , we have the bounds L ? ≤ Q ( { xj } is a valid plan ) ≤ U ? ∀Q ∈ B on the validity of the counterfactual plans { xj } under the distributional ambiguity set B. Complementary information . The previous results show that we can compute the lower bound L ? and upper bound U ? for the probability of validity by solving semidefinite programs . We now show that the two quantities L ? and U ? are complementary to each other in a specific sense . Proposition 2.4 ( Complementary information ) . For any instance , either L ? = 0 or U ? = 1 . More specifically , we have : ( i ) If µ̂ ∈ Θ ( { xj } ) , then U ? = 1 , and ( ii ) If µ̂ 6∈ Θ ( { xj } ) , then L ? = 0 . Because L ? and U ? are bounds for a probability quantity , they are only informative when they are different from 0 and 1 . Proposition 2.4 asserts that the upper bound U ? is trivial when µ̂ ∈ Θ ( { xj } ) , while the lower bound L ? becomes trival if µ̂ 6∈ Θ ( { xj } ) . Next , we leverage these insights to improve the validity of a given counterfactual plan .
This paper studies the effect of uncertainly in the parameters of an ML model used for consequential decision making on the validity, proximity, and diversity of sets of counterfactual explanations (CFE), namely counterfactual plans. In particular, the paper assumes the model parameters are sampled from a distribution would known mean and covariance, and studies the aforementioned metrics of counterfactual plans when the parameter distribution changes in a bounded manner (according to the Gelbrich distance). Beyond a diagnostic tool (providing bounds on how much the parametere distribution can change), the paper presents a method for counterfactual plan correction after having generated a plan (ex-post), and an approach to generate robust counterfactual plans before the fact (ex-ante). Experiments are presented for the proposed methods.
SP:650494d831e1b4a0bb8f51b21574f233b1e18986
Counterfactual Plans under Distributional Ambiguity
Counterfactual explanations are attracting significant attention due to the flourishing applications of machine learning models in consequential domains . A counterfactual plan consists of multiple possibilities to modify a given instance so that the model ’ s prediction will be altered . As the predictive model can be updated subject to the future arrival of new data , a counterfactual plan may become ineffective , or infeasible , with respect to the future values of the model parameters . In this work , we study the counterfactual plans under model uncertainty , in which the distribution of the model parameters is partially prescribed using only the first- and second-moment information . First , we propose an uncertainty quantification tool to compute the lower and upper bounds of the probability of validity for any given counterfactual plan . We then provide corrective methods to adjust the counterfactual plan to improve the validity measure . The numerical experiments validate our bounds and demonstrate that our correction increases the robustness of the counterfactual plans in different real-world datasets . 1 INTRODUCTION . Machine learning models , thanks to their superior predictive performance , are blooming with increasing applications in consequential decision-making tasks . Along with the potential to help making better decisions , current machine learning models are also raising concerns about their explainability and transparency , especially in domains where humans are at stake . These domains span from loan approvals ( Siddiqi , 2012 ) , university admission ( Waters & Miikkulainen , 2014 ) to job hiring ( Ajunwa et al. , 2016 ) . In these applications , it is instructive to understand why a particular algorithmic decision is made , and counterfactual explanations act as a useful toolkit to comprehend ( black-box ) machine learning models ( Wachter et al. , 2017 ) . Counterfactual explanation is also known in the field of interpretable machine learning as contrastive explanation ( Miller , 2018 ; Karimi et al. , 2020b ) or recourse ( Ustun et al. , 2019 ) . A counterfactual explanation suggests how an instance should be modified so as to receive an alternate algorithmic outcome . As such , it could be used as a suggestion for improvement purposes . For example , a student is rejected from graduate study , and the university can provide one or multiple counterfactuals to guide the applicant for admission in the following year . A concrete example may be of the form “ get a GRE score of at least 325 ” or “ get a 6-month research experience ” . In practice , providing a counterfactual plan consisting of multiple examples is highly desirable because a single counterfactual to every applicant with the same covariates may be unsatisfactory in practice ( Wachter et al. , 2017 ) . Indeed , the covariates can barely capture the intrinsic behaviors , constraints and unrevealed preferences of the person they represent so that the users with the same features may have different preferences to modify their input . As a consequence , a pre-emptive design choice is to provide a “ menu ” of possible recourses , and let the applicant choose the recourse that fits them best . Viewed in this way , a counterfactual plan has the potential to increase satisfaction and build trust among the stakeholders of any machine learning applications . Constructing a counterfactual plan , however , is not a straightforward task because of the many competing criteria in the design process . By definition , the plan should be valid : by committing to any counterfactual in the plan , the application should be able to flip his current unfavorable outcome to a favorable one . However , each possibility in the plan should be in the proximity of the covariates of the applicant so that the modification is actionable . Further , the plan should consist of a diverse range of recourses to accommodate the different tastes and preferences of the population . Russell ( 2019 ) propose a mixed integer programming method to generate a counterfactual plan for a linear classifier , in which the diversity is imposed using a rule-based approach . In Dandl et al . ( 2020 ) , the authors propose a model-agnostic approach using a multi-objective evolutionary algorithm to construct a diverse counterfactual plan . More recently , Mothilal et al . ( 2020 ) use the determinantal point process to measure the diversity of a plan . The authors then formulate an optimization problem to find the counterfactual plan that minimizes the weighted sum of three terms representing validity , proximity , and diversity . A critical drawback of the existing works is the assumption of an invariant predictive model , which often fails to hold in practical settings . In fact , during a turbulent pandemic time , it is difficult to assume that the demographic population of students applying for postgraduate studies remain unchanged . And even in the case that the demography remains unchanged , special pandemic conditions such as hybrid learning mode or travel bans may affect the applicants ’ package , which in turn leads to fluctuations of the covariate distribution in the applicant pool . These shifts in the data are channeled to the shift in the parameters of the predictive model : when the machine learning models are re-trained or re-calibrated with new data , their parameters also change accordingly ( Venkatasubramanian & Alfano , 2020 ) . This raises an emerging concern because the counterfactual plan is usually designed to be valid to only the current model , but that is not enough to guarantee any validity on the future models . Thus , the counterfactual plan carries a promise of a favorable future outcome , nevertheless , this promise is fragile . It is hence reasonable to demand the counterfactual plan to be robust with respect to the shift of the parameters . Pawelczyk et al . ( 2020 ) study the sparsity of counterfactuals and its non-robustness under different fixed models ( predictive multiplicity ) . Rawal et al . ( 2020 ) consider the counterfactual plan problem and describe several types of model shift related to the correction , temporal , and geospatial shift from data . They also study the trade-off between the recourse proximity and its validity regarding to the model updates . Most recently , Upadhyay et al . ( 2021 ) leverage robust optimization to generate a counterfactual that is robust to some constrained perturbations of the model ’ s parameters . However , both works consider only the single counterfactual settings . Contributions . We study the many facets of the counterfactual plans with respect to random future model parameters . We focus on a linear classification setting and we prescribe the random model parameters only through the first- and second-moment information . We contribute concretely 1. a diagnostic tool to assess the validity of a counterfactual plan . It provides a lower and upper bound on the probability of joint validity of a given plan subject to uncertain model parameters . 2. a correction tool to improve the validity of a counterfactual plan , while keeping the modifications to each counterfactual at a minimal level . The corrections are intuitive and admit closed-form expression . 3. a COunterfactual Plan under Ambiguity ( COPA ) framework to construct a counterfactual plan which explicitly takes the model uncertainty into consideration . It minimizes the weighted sum of validity , proximity and diversity terms , and can be solved efficiently using gradient descents . Each of our above contributions is exposed in Section 2 , 3 and 4 , respectively . In Section 5 , we conduct experiments on both synthetic and real-world datasets to demonstrate the efficiency of our corrections and of our COPA framework . All proofs can be found in the appendix . General setup . Consider a covariate space Rd and a linear binary classification setting . Each linear classifier can be parametrized by θ ∈ Rd with decision output Cθ ( x ) = 1 if θ > x ≥ 0 , and 0 otherwise , where 0 represents an unfavorable outcome . Note that we omit the bias term to avoid clutter , taking the bias term into account can be achieved by extending the dimension of x and θ by an extra dimension . A counterfactual plan is a set of J counterfactual explanations { xj } j=1 , ... , J , and we denote { xj } for short . When J = 1 , we have a single counterfactual explanation problem , which is the subject of recent works ( Ustun et al. , 2019 ; Karimi et al. , 2020a ; Upadhyay et al. , 2021 ) . Next , we define the joint validity of a counterfactual plan . Definition 1.1 ( Joint validity ) . A counterfactual plan { xj } is valid with respect to a realization θ if Cθ ( xj ) = 1 for all j = 1 , . . . , J . Notations . We use Sd++ ( Sd+ ) to denote the space of symmetric positive ( semi ) definite matrices . For any A ∈ Rm×m , the trace operator is Tr [ A ] = ∑d i=1Aii . For any integer J , [ J ] , { 1 , . . . , J } . 2 VALIDITY BOUNDS OF COUNTERFACTUAL PLANS . In this section , we propose a diagnostic tool to benchmark the validity of a pre-computed counterfactual plan { xj } . We model the random model parameters θ̃ with a nominal distribution P̂ . Instead of making a strong assumption on a specific parametric form of P̂ such as Gaussian distribution , we only assume that P̂ is known only up to the second moment . More specifically , we assume that under P̂ , θ̃ has a nominal mean vector µ̂ and nominal covariance matrix Σ̂ ∈ Sd++ . Definition 2.1 ( Gelbrich distance ) . The Gelbrich distance between two pairs ( µ1 , Σ1 ) ∈ Rd × Sd+ and ( µ2 , Σ2 ) ∈ Rd × Sd+ is defined as G ( ( µ1 , Σ1 ) , ( µ2 , Σ2 ) ) , √ ‖µ1 − µ2‖22 + Tr [ Σ1 + Σ2 − 2 ( Σ 1 2 2 Σ1Σ 1 2 2 ) 1 2 ] . The Gelbrich distance is closely related to the optimal transport distance between Gaussian distributions . Indeed , G ( ( µ1 , Σ1 ) , ( µ2 , Σ2 ) ) is equal to the type-2 Wasserstein distance between two Gaussian distributions N ( µ1 , Σ1 ) and N ( µ2 , Σ2 ) ( Gelbrich , 1990 ) . It is thus trivial that G is a distance on Rd×Sd+ , and as a consequence , it is symmetric andG ( ( µ1 , Σ1 ) , ( µ2 , Σ2 ) ) = 0 if and only if ( µ1 , Σ1 ) = ( µ2 , Σ2 ) . Using the Gelbrich distance to design the moment ambiguity set for distributionally robust optimization leads to many desirable properties such as computational tractability and performance guarantees ( Kuhn et al. , 2019 ) . Motivated by this idea , we first construct the following uncertainty set U , { ( µ , Σ ) ∈ Rd × Sd+ : G ( ( µ , Σ ) , ( µ̂ , Σ̂ ) ) ≤ ρ } , which is formally a ρ-neighborhood in the mean vector-covariance matrix space around the nominal moment ( µ̂ , Σ̂ ) . The ambiguity set for the distributions of θ̃ is obtained by lifting U to generate a family of probability measures that satisfy the moment conditions B , { Q ∈ P : ∃ ( µ , Σ ) ∈ U such that Q ∼ ( µ , Σ ) } , . where P is a set of all probability measures supported on Rd and Q ∼ ( µ , Σ ) indicates that Q has mean vector µ and covariance matrix Σ . The central question of this section is : If the distribution of θ̃ belongs to B , what is the probability that a given plan { xj } is valid ? To answer this question , we define the event set Θ ( { xj } ) that contains all model parameter values that renders { xj } jointly valid . Under the definition of a linear model , Θ ( { xj } ) is an intersection of J open hyperplanes of the form Θ ( { xj } ) , { θ ∈ Rd : x > j θ ≥ 0 ∀j ∈ [ J ] } . ( 1 ) We name Θ ( { xj } ) the set of favorable parameters . The probability of validity for a plan under a measure Q is Q ( θ̃ ∈ Θ ( { xj } ) ) . We are interested in evaluating the lower and the upper bound probability that the plan { xj } is valid uniformly over all distributions Q ∈ B . This is equivalent to quantifying the following quantities inf Q∈B Q ( θ̃ ∈ Θ ( { xj } ) ) and sup Q∈B Q ( θ̃ ∈ Θ ( { xj } ) ) . In the remainder of this section , we discuss how to evaluate the bounds for these terms . Lower bound . We denote by Θ◦ the interior of the set Θ , that is , Θ◦ ( { xj } ) , { θ ∈ Rd : x > j θ > 0 ∀j } . Note that all the inequalities defining Θ◦ ( { xj } ) are strict inequalities . By definition , we have Θ◦ ( { xj } ) ⊂ Θ ( { xj } ) , and hence infQ∈B Q ( θ̃ ∈ Θ◦ ( { xj } ) ) ≤ infQ∈B Q ( θ̃ ∈ Θ ( { xj } ) ) . Because Θ◦ ( { xj } ) is an open set , we can leverage the generalized Chebyshev lower bound to evaluate the minimum quantity of Q ( θ̃ ∈ Θ◦ ( { xj } ) ) over all distributions with a given mean and covariance matrix ( Vandenberghe et al. , 2007 ) . Adding moment uncertainty via the set U is obtained by rejoining two minimization layers . The next theorem presents this result . Theorem 2.2 ( Lower bound ) . For any ρ ∈ R+ , µ̂ ∈ Rd and Σ̂ ∈ Sd+ , let L ? be the optimal value of the following semidefinite program L ? = inf 1− ∑ j∈ [ J ] λj s. t. µ ∈ Rd , Σ ∈ Sd+ , C ∈ Rd×d , M ∈ Sd+ λj ∈ R , zj ∈ Rd , Zj ∈ Sd ∀j ∈ [ J ] −x > j zj ≥ 0 , [ Zj zj z > j λj ] 0 ∀j ∈ [ J ] ∑ j∈ [ J ] [ Zj zj z > j λj ] [ M µ µ > 1 ] , [ Σ C C > Σ̂ ] 0 , [ M − Σ µ µ > 1 ] 0 ‖µ̂‖2 − 2µ̂ > µ+ Tr [ M + Σ̂− 2C ] ≤ ρ2 . ( 2 ) Then we have L ? = inf Q∈B Q ( θ̃ ∈ Θ◦ ( { xj } ) ) ≤ inf Q∈B Q ( θ̃ ∈ Θ ( { xj } ) ) . Upper bound . Because Θ ( { xj } ) is a closed set , we can leverage a duality result to evaluate the maximum quantity of Q ( θ̃ ∈ Θ ( { xj } ) ) over all distributions with a given mean and covariance matrix ( Isii , 1960 ) . Adding moment uncertainty via the set U is obtained by invoking the support function of the moment set . This result is presented in the next theorem Theorem 2.3 ( Upper bound ) . For any ρ ∈ R+ , µ̂ ∈ Rd and Σ̂ ∈ Sd+ , let U ? be the optimal value of the following semidefinite program U ? = inf z0 + γ ( ρ 2 − ‖µ̂‖22 − Tr [ Σ̂ ] ) + q + Tr [ Q ] s. t. γ ∈ R+ , z0 ∈ R , z ∈ Rd , Z ∈ Sd+ , q ∈ R+ , Q ∈ Sd+ , λ ∈ RJ+ [ γI − Z γΣ̂ 12 γΣ̂ 1 2 Q ] 0 , [ γI − Z γµ̂+ z γµ̂ > + z > q ] 0 [ Z z z > z0 ] 0 , [ Z z z > z0 − 1 ] ∑ j∈ [ J ] λj [ 0 12xj 1 2x > j 0 ] . Then we have supQ∈B Q ( θ̃ ∈ Θ ( { xj } ) ) ≤ U ? . Thanks to the choice of the Gelbrich distanceG , both optimization problems in Theorems 2.2 and 2.3 are linear semidefinite programs , and they can be solved efficiently by standard , off-the-shelf solvers such as MOSEK to high dimensions ( MOSEK ApS , 2019 ) . Other choices of distance ( divergence ) are also available : for example , one may opt for the Kullback-Leibler ( KL ) type divergence between Gaussian distribution to prescribe U as in Taskesen et al . ( 2021 ) . Unfortunately , the KL divergence will entail a log-determinant term , and the resulting optimization problems are no longer linear programs and are no longer solvable using MOSEK . Equipped with L ? and U ? , we have the bounds L ? ≤ Q ( { xj } is a valid plan ) ≤ U ? ∀Q ∈ B on the validity of the counterfactual plans { xj } under the distributional ambiguity set B. Complementary information . The previous results show that we can compute the lower bound L ? and upper bound U ? for the probability of validity by solving semidefinite programs . We now show that the two quantities L ? and U ? are complementary to each other in a specific sense . Proposition 2.4 ( Complementary information ) . For any instance , either L ? = 0 or U ? = 1 . More specifically , we have : ( i ) If µ̂ ∈ Θ ( { xj } ) , then U ? = 1 , and ( ii ) If µ̂ 6∈ Θ ( { xj } ) , then L ? = 0 . Because L ? and U ? are bounds for a probability quantity , they are only informative when they are different from 0 and 1 . Proposition 2.4 asserts that the upper bound U ? is trivial when µ̂ ∈ Θ ( { xj } ) , while the lower bound L ? becomes trival if µ̂ 6∈ Θ ( { xj } ) . Next , we leverage these insights to improve the validity of a given counterfactual plan .
The paper considers the problem of how to provide a collection of counterfactual explanations for a binary linear classifier such that an informed choice can be made on how best to actualise a new input based on individual preferences such that a different classification is likely to be made, even under potentially changing model parameters. It introduces the Counterfactual Plan under Ambiguity (COPA) framework, consisting of a probabilistic validity assessment of a predetermined plan under a given parameter distribution of the classifier, followed by a correction of the predetermined plan to improve validity under that distribution. These are combined in the COPA framework to produce a plan that optimises a weighted combination of the desiderata ‘proximity’, ‘diversity’ and ‘validity’. Experiments show the resulting output satisfies the derived upper and lower bounds on the validity, with good performance on the desiderata.
SP:650494d831e1b4a0bb8f51b21574f233b1e18986
Neural Energy Minimization for Molecular Conformation Optimization
1 INTRODUCTION . The 3D molecular conformation is one of the most important features in determining many physicochemical and biological properties of a molecule . The molecule ’ s 3D charge distribution and physical shape are crucial when considering the steric constraints or electronic effects for chemical reactions and interaction . Therefore , molecular conformers are widely adopted in quantitative structure-activity relationships ( QSAR ) prediction ( Verma et al. , 2010 ) and drug discovery ( Hawkins , 2017 ) . With a growing interest in virtual drug screening ( Zhavoronkov et al. , 2019 ; McCloskey et al. , 2020 ; Stokes et al. , 2020 ) and de novo drug design ( De Cao & Kipf , 2018 ; Gómez-Bombarelli et al. , 2018 ; Jin et al. , 2018 ; Zhou et al. , 2019 ; Mercado et al. , 2020 ) , it becomes more desirable to predict the molecular conformations both quickly and accurately such that 3D geometry features can be considered . Deep learning techniques have recently been introduced to address this problem and demonstrated promising results . For instance , generative models ( Hoffmann & Noé , 2019 ; Simm & HernandezLobato , 2020 ; Xu et al. , 2020 ) are proposed to first generate pairwise distances for atom pairs , and then infer the conformer from such matrix.Since the 3D structures are generated indirectly , the second step can be sensitive towards the error in estimated distances , and extra model capacity could be required to encode the redundancy ( Hoffmann & Noé , 2019 ) . In the meantime , many SE ( 3 ) -equivariant networks emerge to work with 3D roto-translation symmetrical inputs enabling direct manipulation of the 3D Cartesian coordinates . One of the most recent successful applications ∗Equal Contributions . of such models is the AlphaFold system for protein structure prediction ( Jumper et al. , 2021 ) . Despite the many benefits , however , existing SE ( 3 ) -equivariant networks are either derived from complicated mathematical theory involving expensive coefficient calculations ( Thomas et al. , 2018 ; Anderson et al. , 2019 ; Finzi et al. , 2020 ; Fuchs et al. , 2020 ) , or heuristically designed ( Satorras et al. , 2021 ) based on the intuition of message passing ( Gilmer et al. , 2017 ) . This work presents a new formulation that unrolls the molecular conformer prediction into a fixed number of optimization steps , where a neural network is parametrized to learn gradient fields of the implicit conformational energy landscape . Under such formulation , the model can refine a given conformer toward a more stable and energetically preferred state . Instead of relying on complex mathematical tools or designing the model heuristically , we propose a novel energy-inspired framework that explicitly connects an underlying enregy function with an SE ( 3 ) -equivariant model . We are able to not only provide new interpretations for some existing models but also derive new variants of SE ( 3 ) -equivariant model from the assumption of a conformational energy function , aligning a model ’ s architecture with its physical assumptions . Through extensive experiments , these new variants show superior performance in conformer optimization comparing to other SE ( 3 ) equivariant models . Moreover , the proposed optimization method is also suitable for conformer generation and capable of generating diverse and accurate conformers . In conclusion , the main contributions of this work include : • Formulating the conformer prediction problem as a multi-step unrolled optimization where a model learns the gradient field of the conformational energy landscape . • Proposing a novel framework that explicitly connects an underlying energy function with an SE ( 3 ) -equivariant neural network such that one can derive new models that align with a physical assumption , or interpret some of the existing models from an energy perspective . • Demonstrating competitive empirical performance for molecular conformation prediction in both the optimization and generation settings . 2 RELATED WORK . 2.1 MOLECUALR CONFORMATION GENERATION . In conventional computational approaches for conformer generation , we observe an accuracy and efficiency trade-off where highly accurate ab initio methods are very time-consuming while efficient methods leveraging empirical force fields are not accurate enough ( Unke et al. , 2021 ) . To efficiently and accurately estimates molecular conformations , many learning-based methods have been proposed . For instance , models , such as VAE ( Simm & Hernandez-Lobato , 2020 ) , GAN ( Hoffmann & Noé , 2019 ) , and continuous normalizing flow ( Xu et al. , 2020 ) , have all been developed to predict molecular conformers by first generating an intermediate pairwise atom distance matrix . However , the postprocessing step for 3D structure construction can be susceptible to the error , and model capacity could be wasted to encode the redundancy in such low-rank matrix ( Hoffmann & Noé , 2019 ) . Despite the many drawbacks of such methods , the distance matrix is difficult to circumvent because the models can not capture the 3D roto-translation symmetry nature of a conformer . Besides modeling the atom distances , another solution for conformer generation is to estimate the force field with machine learning methods . For instance , sGDML ( Chmiela et al. , 2019 ) is capable of reproducing the molecular potential energy surface given a few reference conformations and generating compelling results with MD simulation . Although such a model scales well with the molecule size , it requires retraining for every new molecules ( Unke et al. , 2021 ) . Similarly but more generally , methods including Behler & Parrinello ( 2007 ) ; Bartók et al . ( 2010 ; 2013 ) ; Smith et al . ( 2017 ) ; Schütt et al . ( 2017 ) ; Faber et al . ( 2018 ) can also be used to generate molecular conformers with their learned force fields . Recently , ConfGF ( Shi et al. , 2021 ) specifically tackled the conformer generation problem by estimating the gradient fields of inter-atomic distances ( similar to force fields ) , where the 3D coordinates of the conformer can be generated through steps of Langevin dynamics achieving state-of-the-art performance . While our model also tries to estimate the gradient field , we instead employ an unrolled optimization architecture ( Domke , 2012 ; Liu et al. , 2018 ) aiming to model the entire optimization process instead of a single force field optimization step . Such one-pass end-to-end design is proved to be more effective empirically as shown in the experiment section . In addition , our approach also enjoys a much faster run time . 2.2 SE ( 3 ) -EQUIVARIANT NEURAL NETWORKS . Since 3D roto-translation symmetry is a common property for many physical systems , various methods have been proposed to model such symmetry in problems like quantum mechanics ( Ramakrishnan et al. , 2014 ) , molecular design ( Simm et al. , 2020 ) , particle simulations ( Thomas et al. , 2018 ) , and point clouds ( Uy et al. , 2019 ) . The ability to capture the spatial symmetry makes these models quite suitable for conformer optimization . In general , there are two ways to introduce the equivariance into a model . One thread of research relies on building models with irreducible representations and spherical harmonics ( Thomas et al. , 2018 ; Anderson et al. , 2019 ; Finzi et al. , 2020 ; Fuchs et al. , 2020 ; Batzner et al. , 2021 ) . Different from this line of work , our approach aims to avoid the complexity of such mathematical tools , considering the higher-order features in these more theoretical framework might not be practical for our purpose . The other line of research relies on vector-based methods , where equivariant filters are constructed by taking the gradient of invariant filters ( Schütt et al. , 2021 ) or designed ( Satorras et al. , 2021 ) based on the intuition of message passing ( Gilmer et al. , 2017 ) . By explicitly connecting an underlying energy function with an SE ( 3 ) -equivariant neural network in our framework , we can not only reinterpret some of the existing models but also derive new variants that aligns the model parametrization with an underlying physical assumption as shown in Section 3.3 . 3 METHODS . 3.1 PROBLEM DEFINITION . We represent each molecule as a graph Gmol and use a set of 3D coordinates X to denote the conformer . The molecular graph is defined as Gmol = 〈V , E〉 where V = { vi } is the set of nodes representing atom features , and E = { ei } is the set of edges representing the relationship between atoms : including covalent interactions and distance of their shortest path . X consists of the 3D coordinate { xi|xi ∈ R3 } of each atom . Given a molecular graph Gmol and an initial conformer X0 , we want to learn an optimization model φ that refines the initial conformation towards an energetically preferred state X∗ as X∗ = arg minX E ( X|Gmol ) where E is some energy surface of nature . 3.2 CONFORMATIONAL ENERGY MINIMIZATION WITH A NEURAL NETWORK . Molecular conformation represents a 3D arrangement of the atoms and shares a close relationship with the conformational energy , as each equilibrium of a molecular conformation can be considered as a local minimum of the potential energy surface ( Axelrod & Gomez-Bombarelli , 2020 ) . One could therefore find these stable conformations through gradient descent as a process of energy minimization . Specifically , given a particular energy function E , we can optimize the conformation X by updating the 3D Cartesian coordinates with gradient descent such that E can be minimized : Xt+1 = Xt − γ∇XE ( Xt|Gmol ) ( 1 ) where γ is the learning rate , and we will observe X∗ = X∗− γ∇XE ( X∗|Gmol ) for an energetically stable conformer . Therefore , we can easily find a stable molecular conformation from an initial conformation by applying the gradient descent update iteratively if the energy function E ( X|Gmol ) is fully characterized and differentiable with respect to X . Unfortunately , this is often not the case . Instead of hand-designing the energy function and its gradient , we can take advantage of the approximation power of a neural network and use it to learn the gradient field from the data directly . Once the network is trained , we can then unroll the optimization ( Domke , 2012 ; Liu et al. , 2018 ) with the model and perform a neural version of the above optimization where the gradient term ∇E in Equation 1 is not derived from an explicit energy function but estimated by a neural network . More concretely , we parameterize the energy surface as a function of the molecular graph G = 〈V , E〉 and the 3D conformer X . We can consider X as an external 3-dimensional representation of the molecule , while V and E represent an internal high dimensional representation of the molecule . These internal embeddings V and E not only encode the initial atom/bond information but also embed information about their neighborhood related to the evolving conformation X . For each step , we want to minimize E ( X , V , E ) with the following gradient updates : xt+1i = x t i + φx ( Gt , Et ) vt+1i = v t i + φv ( Gt , Et ) et+1ij = e t ij + φe ( Gt , Et ) for all xi ∈ X , vi ∈ V , and eij ∈ E , where φ are neural networks estimating their respective gradient field , and the exact parametrization of the neural network will depend on the energy function as described in the following section . In this work , we view eij as a constant representation for simplicity , and therefore , it is not updated in our models .
This paper proposes a new method to generate molecular conformations (i.e., the spatial arrangements of atoms belonging to a given molecule). The method works by updating initial atom positions (which can be initialized either randomly or using an alternative conformer generation method) through an iterative process. Each iteration involves predicting the gradients associated with atoms' positions and then changing their coordinates by taking a step in this direction (Eqn. 1 & Fig. 1b). The authors: 1. show how the parameterization of the gradients relates to how one models the conformational energy (Section 3.3); 2. demonstrate competitive performance on optimization (finding a single best conformer; Section 4.1) and generation (finding a set of relatively stable conformers; Section 4.2) tasks compared to previous benchmarks. This is judged in terms of (a) how well the generated conformers match up to ground truth conformers (e.g., Table 1) as well as (b) how well the generated conformers enable the prediction of molecular properties (Table 2).
SP:a5afbc98268d9495590e593abed021add38e5c1c
Neural Energy Minimization for Molecular Conformation Optimization
1 INTRODUCTION . The 3D molecular conformation is one of the most important features in determining many physicochemical and biological properties of a molecule . The molecule ’ s 3D charge distribution and physical shape are crucial when considering the steric constraints or electronic effects for chemical reactions and interaction . Therefore , molecular conformers are widely adopted in quantitative structure-activity relationships ( QSAR ) prediction ( Verma et al. , 2010 ) and drug discovery ( Hawkins , 2017 ) . With a growing interest in virtual drug screening ( Zhavoronkov et al. , 2019 ; McCloskey et al. , 2020 ; Stokes et al. , 2020 ) and de novo drug design ( De Cao & Kipf , 2018 ; Gómez-Bombarelli et al. , 2018 ; Jin et al. , 2018 ; Zhou et al. , 2019 ; Mercado et al. , 2020 ) , it becomes more desirable to predict the molecular conformations both quickly and accurately such that 3D geometry features can be considered . Deep learning techniques have recently been introduced to address this problem and demonstrated promising results . For instance , generative models ( Hoffmann & Noé , 2019 ; Simm & HernandezLobato , 2020 ; Xu et al. , 2020 ) are proposed to first generate pairwise distances for atom pairs , and then infer the conformer from such matrix.Since the 3D structures are generated indirectly , the second step can be sensitive towards the error in estimated distances , and extra model capacity could be required to encode the redundancy ( Hoffmann & Noé , 2019 ) . In the meantime , many SE ( 3 ) -equivariant networks emerge to work with 3D roto-translation symmetrical inputs enabling direct manipulation of the 3D Cartesian coordinates . One of the most recent successful applications ∗Equal Contributions . of such models is the AlphaFold system for protein structure prediction ( Jumper et al. , 2021 ) . Despite the many benefits , however , existing SE ( 3 ) -equivariant networks are either derived from complicated mathematical theory involving expensive coefficient calculations ( Thomas et al. , 2018 ; Anderson et al. , 2019 ; Finzi et al. , 2020 ; Fuchs et al. , 2020 ) , or heuristically designed ( Satorras et al. , 2021 ) based on the intuition of message passing ( Gilmer et al. , 2017 ) . This work presents a new formulation that unrolls the molecular conformer prediction into a fixed number of optimization steps , where a neural network is parametrized to learn gradient fields of the implicit conformational energy landscape . Under such formulation , the model can refine a given conformer toward a more stable and energetically preferred state . Instead of relying on complex mathematical tools or designing the model heuristically , we propose a novel energy-inspired framework that explicitly connects an underlying enregy function with an SE ( 3 ) -equivariant model . We are able to not only provide new interpretations for some existing models but also derive new variants of SE ( 3 ) -equivariant model from the assumption of a conformational energy function , aligning a model ’ s architecture with its physical assumptions . Through extensive experiments , these new variants show superior performance in conformer optimization comparing to other SE ( 3 ) equivariant models . Moreover , the proposed optimization method is also suitable for conformer generation and capable of generating diverse and accurate conformers . In conclusion , the main contributions of this work include : • Formulating the conformer prediction problem as a multi-step unrolled optimization where a model learns the gradient field of the conformational energy landscape . • Proposing a novel framework that explicitly connects an underlying energy function with an SE ( 3 ) -equivariant neural network such that one can derive new models that align with a physical assumption , or interpret some of the existing models from an energy perspective . • Demonstrating competitive empirical performance for molecular conformation prediction in both the optimization and generation settings . 2 RELATED WORK . 2.1 MOLECUALR CONFORMATION GENERATION . In conventional computational approaches for conformer generation , we observe an accuracy and efficiency trade-off where highly accurate ab initio methods are very time-consuming while efficient methods leveraging empirical force fields are not accurate enough ( Unke et al. , 2021 ) . To efficiently and accurately estimates molecular conformations , many learning-based methods have been proposed . For instance , models , such as VAE ( Simm & Hernandez-Lobato , 2020 ) , GAN ( Hoffmann & Noé , 2019 ) , and continuous normalizing flow ( Xu et al. , 2020 ) , have all been developed to predict molecular conformers by first generating an intermediate pairwise atom distance matrix . However , the postprocessing step for 3D structure construction can be susceptible to the error , and model capacity could be wasted to encode the redundancy in such low-rank matrix ( Hoffmann & Noé , 2019 ) . Despite the many drawbacks of such methods , the distance matrix is difficult to circumvent because the models can not capture the 3D roto-translation symmetry nature of a conformer . Besides modeling the atom distances , another solution for conformer generation is to estimate the force field with machine learning methods . For instance , sGDML ( Chmiela et al. , 2019 ) is capable of reproducing the molecular potential energy surface given a few reference conformations and generating compelling results with MD simulation . Although such a model scales well with the molecule size , it requires retraining for every new molecules ( Unke et al. , 2021 ) . Similarly but more generally , methods including Behler & Parrinello ( 2007 ) ; Bartók et al . ( 2010 ; 2013 ) ; Smith et al . ( 2017 ) ; Schütt et al . ( 2017 ) ; Faber et al . ( 2018 ) can also be used to generate molecular conformers with their learned force fields . Recently , ConfGF ( Shi et al. , 2021 ) specifically tackled the conformer generation problem by estimating the gradient fields of inter-atomic distances ( similar to force fields ) , where the 3D coordinates of the conformer can be generated through steps of Langevin dynamics achieving state-of-the-art performance . While our model also tries to estimate the gradient field , we instead employ an unrolled optimization architecture ( Domke , 2012 ; Liu et al. , 2018 ) aiming to model the entire optimization process instead of a single force field optimization step . Such one-pass end-to-end design is proved to be more effective empirically as shown in the experiment section . In addition , our approach also enjoys a much faster run time . 2.2 SE ( 3 ) -EQUIVARIANT NEURAL NETWORKS . Since 3D roto-translation symmetry is a common property for many physical systems , various methods have been proposed to model such symmetry in problems like quantum mechanics ( Ramakrishnan et al. , 2014 ) , molecular design ( Simm et al. , 2020 ) , particle simulations ( Thomas et al. , 2018 ) , and point clouds ( Uy et al. , 2019 ) . The ability to capture the spatial symmetry makes these models quite suitable for conformer optimization . In general , there are two ways to introduce the equivariance into a model . One thread of research relies on building models with irreducible representations and spherical harmonics ( Thomas et al. , 2018 ; Anderson et al. , 2019 ; Finzi et al. , 2020 ; Fuchs et al. , 2020 ; Batzner et al. , 2021 ) . Different from this line of work , our approach aims to avoid the complexity of such mathematical tools , considering the higher-order features in these more theoretical framework might not be practical for our purpose . The other line of research relies on vector-based methods , where equivariant filters are constructed by taking the gradient of invariant filters ( Schütt et al. , 2021 ) or designed ( Satorras et al. , 2021 ) based on the intuition of message passing ( Gilmer et al. , 2017 ) . By explicitly connecting an underlying energy function with an SE ( 3 ) -equivariant neural network in our framework , we can not only reinterpret some of the existing models but also derive new variants that aligns the model parametrization with an underlying physical assumption as shown in Section 3.3 . 3 METHODS . 3.1 PROBLEM DEFINITION . We represent each molecule as a graph Gmol and use a set of 3D coordinates X to denote the conformer . The molecular graph is defined as Gmol = 〈V , E〉 where V = { vi } is the set of nodes representing atom features , and E = { ei } is the set of edges representing the relationship between atoms : including covalent interactions and distance of their shortest path . X consists of the 3D coordinate { xi|xi ∈ R3 } of each atom . Given a molecular graph Gmol and an initial conformer X0 , we want to learn an optimization model φ that refines the initial conformation towards an energetically preferred state X∗ as X∗ = arg minX E ( X|Gmol ) where E is some energy surface of nature . 3.2 CONFORMATIONAL ENERGY MINIMIZATION WITH A NEURAL NETWORK . Molecular conformation represents a 3D arrangement of the atoms and shares a close relationship with the conformational energy , as each equilibrium of a molecular conformation can be considered as a local minimum of the potential energy surface ( Axelrod & Gomez-Bombarelli , 2020 ) . One could therefore find these stable conformations through gradient descent as a process of energy minimization . Specifically , given a particular energy function E , we can optimize the conformation X by updating the 3D Cartesian coordinates with gradient descent such that E can be minimized : Xt+1 = Xt − γ∇XE ( Xt|Gmol ) ( 1 ) where γ is the learning rate , and we will observe X∗ = X∗− γ∇XE ( X∗|Gmol ) for an energetically stable conformer . Therefore , we can easily find a stable molecular conformation from an initial conformation by applying the gradient descent update iteratively if the energy function E ( X|Gmol ) is fully characterized and differentiable with respect to X . Unfortunately , this is often not the case . Instead of hand-designing the energy function and its gradient , we can take advantage of the approximation power of a neural network and use it to learn the gradient field from the data directly . Once the network is trained , we can then unroll the optimization ( Domke , 2012 ; Liu et al. , 2018 ) with the model and perform a neural version of the above optimization where the gradient term ∇E in Equation 1 is not derived from an explicit energy function but estimated by a neural network . More concretely , we parameterize the energy surface as a function of the molecular graph G = 〈V , E〉 and the 3D conformer X . We can consider X as an external 3-dimensional representation of the molecule , while V and E represent an internal high dimensional representation of the molecule . These internal embeddings V and E not only encode the initial atom/bond information but also embed information about their neighborhood related to the evolving conformation X . For each step , we want to minimize E ( X , V , E ) with the following gradient updates : xt+1i = x t i + φx ( Gt , Et ) vt+1i = v t i + φv ( Gt , Et ) et+1ij = e t ij + φe ( Gt , Et ) for all xi ∈ X , vi ∈ V , and eij ∈ E , where φ are neural networks estimating their respective gradient field , and the exact parametrization of the neural network will depend on the energy function as described in the following section . In this work , we view eij as a constant representation for simplicity , and therefore , it is not updated in our models .
This paper proposes a new deep neural network (DNN) architecture to generate molecular 3D conformation. It derives its architecture starting from gradient-based updates for minimization of the molecule's energy function. Then the architecture becomes a repetition of vertex-wise aggregation layer of SE(3)-equivariant Transformer-based DNN. The architecture takes a molecule and 3D conformation pre-calculated from RDkit as input. The authors show how the proposed architecture generalize existing DNN architectures for molecular conformation generation. Empirical results demonstrate superiority of the proposed method.
SP:a5afbc98268d9495590e593abed021add38e5c1c
Koopman Q-learning: Offline Reinforcement Learning via Symmetries of Dynamics
1 INTRODUCTION . The recent impressive advances in reinforcement learning ( RL ) range from robotics , to strategy games and recommendation systems ( Kalashnikov et al. , 2018 ; Li et al. , 2010 ) . Reinforcement learning is canonically regarded as an active learning process - also referred to as online RL - where the agent interacts with the environment at each training run . In contrast , offline RL algorithms learn from large , previously collected static datasets , and thus do not rely on environment interactions ( Agarwal et al. , 2020a ; Ernst et al. , 2005 ; Fujimoto et al. , 2019 ) . Online data collection is performed by simulations or by means of real world interactions e.g . robotics and in either scenario interactions maybe costly and/or dangerous . In principle offline datasets only need to be collected once which alleviates the before-mentioned short-comings of costly online interactions . Offline datasets are typically collected using behavioral policies for the specific task ranging from , random policies , or near-optimal policies to human demonstrations . In particular , being able to leverage the latter is a major advantage of offline RL over online approaches , and then the learned policies can be deployed or finetuned on the desired environment . Offline RL has successfully been applied to learn agents that outperform the behavioral policy used to collect the data ( Kumar et al. , 2020 ; Wu et al. , 2019 ; Agarwal et al. , 2020b ; Ernst et al. , 2005 ) . However algorithms admit major shortcomings in regard to over-fitting and overestimating the true state-action values of the distribution . One solution was recently propsed by Sinha et al . ( 2021 ) , where they tested several data augmentation schemes to improve the performance and generalization capabilities of the learned policies . However , despite the recent progress , learning from offline demonstrations is a tedious endeavour as the dataset typically does not cover the full state-action space . Moreover , offline RL algorithms per definition do not admit the possibility for further environment exploration to refine their distributions towards an optimal policy . It was argued previously that is basically impossible for an offline RL agent to learn an optimal policy as the generalization to near data generically leads to compounding errors such as overestimation bias ( Kumar et al. , 2020 ) . In this paper , we look at offline RL through the lens of Koopman spectral theory in which nonlinear dynamics are represented in terms of a linear operator acting on the space of measurement functions of the system . Through which the representation the symmetries of the dynamics may be inferred directly , and can then be used to guide data augmentation strategies see Figure 1 . We further provide theoretical results on the existence on nature of symmetries relevant for control systems such as reinforcement learning . More specifically , we apply Koopman spectral theory by : first learning symmetries of the system ’ s underlying dynamic in a self-supervised fashion from the static dataset , and second employing the latter to extend the offline dataset at training time by out-of-distribution values . As this reflects the system ’ s dynamics the additional data is to be interpreted as an exploration of the environment ’ s phase space . Some prior works have explored symmetry of the state-action space in the context of Markov Decision Processes ( MDP ’ s ) ( Higgins et al. , 2018 ; Balaraman & Andrew , 2004 ; van der Pol et al. , 2020 ) since many control tasks exhibit apparent symmetries e.g . the classic cart-pole task which is symmetric across y-axis . However , the paradigm we introduce in this work is of a different nature entirely . The distinction is twofold : first , the symmetries are learned in a self-supervised way and are in general not apparent to the developer ; second : we concern with symmetry transformation from state tuples ( st , st+1 ) → ( s̃t , s̃t+1 ) which leave the action invariant inferred from the dynamics inherited by the behavioral policy of the underlying offline data . In other words we seek to derive a neighbourhood around a MDP tuple in the offline dataset in which the behavioral policy is likely to choose the same action based on its dynamics in the environment . In practice the Koopman latent space representation is learned in a self-supervised manner by training to predict the next state using a VAE model ( Kingma & Welling , 2013 ) . To summarize , in this paper , we propose Koopman Forward ( Conservative ) Q-learning ( KFC ) : a model-free Q-learning algorithm which uses the symmetries in the dynamics of the environment to guide data augmentation strategies . We also provide thorough theoretical justifications for KFC . Finally , we empirically test our approach on several challenging benchmark datasets from D4RL ( Fu et al. , 2021 ) , MetaWorld ( Yu et al. , 2019 ) and Robosuite ( Zhu et al. , 2020 ) and find that by using KFC we can improve the state-of-the-art on most benchmark offline reinforcement learning tasks . 2 PRELIMINARIES AND BACKGROUND . 2.1 OFFLINE RL & CONSERVATIVE Q-LEARNING . Reinforcement learning algorithms train policies to maximize the cumulative reward received by an agent who interacts with an environment . Formally the setting is given by a Markov decision process ( S , A , ρ , r , γ ) , with state space S , action space A , and ρ ( st+1|st , at ) the transition density function from the current state and action to the next state . Moreover , γ is the discount factor and r ( St ) the reward function . At any discrete time the agent chooses an action at ∈ A according to its underlying policy πθ ( at|st ) based on the information of the current state st ∈ S where the policy is parametrized by θ . We focus on the Actor-Critic methods for continuous control tasks in the following . In deep RL the parameters θ are the weights in a deep neural network function approximation of the policy or Actor as well as the state-action value function Q or Critic , respectively , and are optimized by gradient decent . The agent i.e . the Actor-Critic is trained to maximize the expected γ-discounted cumulative reward Eπ [ ∑T t=0 γ t rπ ( st , at ) ] , with respect to the policy network i.e . its parameters θ . For notational simplicity we omit the explicit dependency of the latter in the remainder of this work . Furthermore the state-action value function Q ( st , at ) , returns the value of performing a given action at while being in the state st . The Q-function is trained by minimizing the so called Bellman error as Q̂i+1 ← argmin Q E [ ( rt + γ Q̂i ( st+1 , at+1 ) −Qi ( st , at ) ) 2 ] , ( 1 ) This is commonly referred to as the ith policy evaluation step where the hat denotes the target Q-function . In offline RL one aims to learn an optimal policy for the given the dataset D =⋃ k=1 , ... , # data-points ( st , at , rt , st+1 ) k as the option for exploration of the MDP is not available . The policy is optimized to maximize the state-action value function via the policy improvement πi+1 ← argmax π Est∼D [ Q̂ ( st , πi ( at|st ) ) ] . ( 2 ) Note that behavioural policies including sub-optimal or randomized ones may be used to generate the static dataset D. In that case offline RL algorithms face difficulties in the learning process . CQL algorithm : CQL is built on top of a Soft-Actor Critic algorithm ( SAC ) ( Haarnoja et al. , 2018 ) , which employs soft-policy iteration of a stochastic policy ( Haarnoja et al. , 2017 ) . A policy entropy regularization term is added to the policy improvement step in Eq . ( 2 ) as πi+1 ← argmax π Est∼D [ Q̂ ( st , πi ( at|st ) ) − α log πi ( at|st ) ] . ( 3 ) where α either is a fixed hyperparameter or may be chosen to be trainable . CQL reduces the overestimation of state-values - in particular those out-of distribution from D. It achieves this by regularizing the Q-function in Eq . ( 1 ) by a term minimizing its values over out of distribution randomly sampled action . In the following at+1 is given by the prediction of the policy πi ( at+1|st+1 ) and α̃ is a hyperparameter balancing the regulizer term . The policy optimisation step is given by Q̂i+1 ← argmin Q ( E st , at , st+1∼D [ ( rt + γ Q̂i ( st+1 , at+1 ) −Qi ( st , at ) ) 2 ] ( 4 ) + α̃ E st∼D [ log ∑ a exp ( Qi ( st , a ) ) − E a∼π ( st ) [ Qi ( st , a ) ] ] ) 2.2 KOOPMAN THEORY . Historically , the Koopman theoretic perspective of dynamical systems was introduced to describe the evolution of measurements of Hamiltonian systems ( Koopman , 1931 ; Mezić , 2005 ) . The underlying dynamic of most modern reinforcement learning tasks is of nonlinear nature , i.e . the agents actions lead to changes of it state described by a complex non-linear dynamical system . In contrast to linear systems which are completely characterized by their spectral decomposition non-linear systems lack such a unified characterisation . The Koopman operator theoretic framework describes nonlinear dynamics via a linear infinite-dimensional Koopman operator and thus inherits certain tools applicable to linear control systems ( Mauroy et al. , 2020 ; Kaiser et al. , 2021 ) . In practice one aims to find a finite-dimensional representation of the Koopman operator which is equivalent to obtaining a coordinate transformations in which the nonlinear dynamics are approximately linear . A general non-affine control system is governed by the system of non-linear ordinary differential equations ( ODEs ) as ṡ = f ( s , a ) ( 5 ) where s , is the n-dimensional state vector , a the m-dimensional action vector with ( s , a ) ∈ S ×A the state-action-space . Moreover , ṡ = ∂ts is the time derivative , and f is some general non-linear - at least C1-differentiable - vector valued function . For a discrete time system , Eq . ( 5 ) takes the form st+1 = F ( st , at ) ( 6 ) where st denotes the state at time t where F is at least C1-differentiable vector valued function . Definition 1 ( Koopman operator ) Let K ( S ×A ) be the ( Banach ) space of all measurement functions ( observables ) . Then the Koopman operator K : K ( S ×A ) → K ( S ×A ) is defined by Kg ( st , at ) = g ( F ( st , at ) , at+1 ) = g ( st+1 , at+1 ) , ∀g ∈ K ( S ×A ) ( 7 ) where g : S ×A → R. Many systems can be modeled by a bilinearisation where the action enters the controlling equations 5 linearly as f ( s , a ) = f0 ( s ) + ∑m i fi ( s ) ai for fi , i = 0 , . . . , m i.e . C1-differentiable-vector valued functions . In that case the action of the Koopman operator takes the simple form g ( st+1 ) = K ( a ) g ( st ) = ( K0 + m∑ i Kiai ) g ( st ) , ∀g ∈ K ( S ) , ( 8 ) where K ( S ) is a ( Banach ) space of measurement functions K0 , Ki decompose the Koopman operator in a the free and forcing-term , respectively . Details on the existence of a representation as in equation 8 are discussed in Goswami & Paley ( 2017 ) . Associated with a Koopman operator is its eigenspectrum , that is , the eigenvalues λ , and the corresponding eigenfunctions φλ ( s , a ) , such that [ Kφλ ] ( s , a ) = λφλ ( s , a ) . In practice one derives a finite set of observable g⃗ = ( g1 , . . . , gN ) in which case the approximation to the Koopman operator admits a finite-dimensional matrix representation . The N ×N matrix representing the Koopman operator may be diagonalized by a matrix U containing the eigen-vectors of K as columns . In which case the eigen-functions are derived by φ⃗ = Ug⃗ and one infers from Eq . ( 5 ) that φ̇i = λiφi , for i = 1 , . . . , N with eigenvalues λi=1 , ... , N . These ODEs admit simple solutions for their time-evolution namely the exponential functions exp ( λit ) ..
This paper develops a new method (Koopman Forward (Conservative) Q-learning, KFC in short) for offline reinforcement learning by extending the static dataset to include new states that are computed by learning an action-invariant Koopman latent representation of the system. The Koopman transformation to obtain the transformed state transitions is build using a variational auto-encoder. Experimental results are provided on D4RL, RoboSuite and MetaWorld benchmarks. This is a well-written paper (there are some minor typos which the authors should rectify). The method developed here shows improved performance over current methods in a number of benchmark problems.
SP:b0ddaded23d30a4f36ea93c27971167644ac43f1
Koopman Q-learning: Offline Reinforcement Learning via Symmetries of Dynamics
1 INTRODUCTION . The recent impressive advances in reinforcement learning ( RL ) range from robotics , to strategy games and recommendation systems ( Kalashnikov et al. , 2018 ; Li et al. , 2010 ) . Reinforcement learning is canonically regarded as an active learning process - also referred to as online RL - where the agent interacts with the environment at each training run . In contrast , offline RL algorithms learn from large , previously collected static datasets , and thus do not rely on environment interactions ( Agarwal et al. , 2020a ; Ernst et al. , 2005 ; Fujimoto et al. , 2019 ) . Online data collection is performed by simulations or by means of real world interactions e.g . robotics and in either scenario interactions maybe costly and/or dangerous . In principle offline datasets only need to be collected once which alleviates the before-mentioned short-comings of costly online interactions . Offline datasets are typically collected using behavioral policies for the specific task ranging from , random policies , or near-optimal policies to human demonstrations . In particular , being able to leverage the latter is a major advantage of offline RL over online approaches , and then the learned policies can be deployed or finetuned on the desired environment . Offline RL has successfully been applied to learn agents that outperform the behavioral policy used to collect the data ( Kumar et al. , 2020 ; Wu et al. , 2019 ; Agarwal et al. , 2020b ; Ernst et al. , 2005 ) . However algorithms admit major shortcomings in regard to over-fitting and overestimating the true state-action values of the distribution . One solution was recently propsed by Sinha et al . ( 2021 ) , where they tested several data augmentation schemes to improve the performance and generalization capabilities of the learned policies . However , despite the recent progress , learning from offline demonstrations is a tedious endeavour as the dataset typically does not cover the full state-action space . Moreover , offline RL algorithms per definition do not admit the possibility for further environment exploration to refine their distributions towards an optimal policy . It was argued previously that is basically impossible for an offline RL agent to learn an optimal policy as the generalization to near data generically leads to compounding errors such as overestimation bias ( Kumar et al. , 2020 ) . In this paper , we look at offline RL through the lens of Koopman spectral theory in which nonlinear dynamics are represented in terms of a linear operator acting on the space of measurement functions of the system . Through which the representation the symmetries of the dynamics may be inferred directly , and can then be used to guide data augmentation strategies see Figure 1 . We further provide theoretical results on the existence on nature of symmetries relevant for control systems such as reinforcement learning . More specifically , we apply Koopman spectral theory by : first learning symmetries of the system ’ s underlying dynamic in a self-supervised fashion from the static dataset , and second employing the latter to extend the offline dataset at training time by out-of-distribution values . As this reflects the system ’ s dynamics the additional data is to be interpreted as an exploration of the environment ’ s phase space . Some prior works have explored symmetry of the state-action space in the context of Markov Decision Processes ( MDP ’ s ) ( Higgins et al. , 2018 ; Balaraman & Andrew , 2004 ; van der Pol et al. , 2020 ) since many control tasks exhibit apparent symmetries e.g . the classic cart-pole task which is symmetric across y-axis . However , the paradigm we introduce in this work is of a different nature entirely . The distinction is twofold : first , the symmetries are learned in a self-supervised way and are in general not apparent to the developer ; second : we concern with symmetry transformation from state tuples ( st , st+1 ) → ( s̃t , s̃t+1 ) which leave the action invariant inferred from the dynamics inherited by the behavioral policy of the underlying offline data . In other words we seek to derive a neighbourhood around a MDP tuple in the offline dataset in which the behavioral policy is likely to choose the same action based on its dynamics in the environment . In practice the Koopman latent space representation is learned in a self-supervised manner by training to predict the next state using a VAE model ( Kingma & Welling , 2013 ) . To summarize , in this paper , we propose Koopman Forward ( Conservative ) Q-learning ( KFC ) : a model-free Q-learning algorithm which uses the symmetries in the dynamics of the environment to guide data augmentation strategies . We also provide thorough theoretical justifications for KFC . Finally , we empirically test our approach on several challenging benchmark datasets from D4RL ( Fu et al. , 2021 ) , MetaWorld ( Yu et al. , 2019 ) and Robosuite ( Zhu et al. , 2020 ) and find that by using KFC we can improve the state-of-the-art on most benchmark offline reinforcement learning tasks . 2 PRELIMINARIES AND BACKGROUND . 2.1 OFFLINE RL & CONSERVATIVE Q-LEARNING . Reinforcement learning algorithms train policies to maximize the cumulative reward received by an agent who interacts with an environment . Formally the setting is given by a Markov decision process ( S , A , ρ , r , γ ) , with state space S , action space A , and ρ ( st+1|st , at ) the transition density function from the current state and action to the next state . Moreover , γ is the discount factor and r ( St ) the reward function . At any discrete time the agent chooses an action at ∈ A according to its underlying policy πθ ( at|st ) based on the information of the current state st ∈ S where the policy is parametrized by θ . We focus on the Actor-Critic methods for continuous control tasks in the following . In deep RL the parameters θ are the weights in a deep neural network function approximation of the policy or Actor as well as the state-action value function Q or Critic , respectively , and are optimized by gradient decent . The agent i.e . the Actor-Critic is trained to maximize the expected γ-discounted cumulative reward Eπ [ ∑T t=0 γ t rπ ( st , at ) ] , with respect to the policy network i.e . its parameters θ . For notational simplicity we omit the explicit dependency of the latter in the remainder of this work . Furthermore the state-action value function Q ( st , at ) , returns the value of performing a given action at while being in the state st . The Q-function is trained by minimizing the so called Bellman error as Q̂i+1 ← argmin Q E [ ( rt + γ Q̂i ( st+1 , at+1 ) −Qi ( st , at ) ) 2 ] , ( 1 ) This is commonly referred to as the ith policy evaluation step where the hat denotes the target Q-function . In offline RL one aims to learn an optimal policy for the given the dataset D =⋃ k=1 , ... , # data-points ( st , at , rt , st+1 ) k as the option for exploration of the MDP is not available . The policy is optimized to maximize the state-action value function via the policy improvement πi+1 ← argmax π Est∼D [ Q̂ ( st , πi ( at|st ) ) ] . ( 2 ) Note that behavioural policies including sub-optimal or randomized ones may be used to generate the static dataset D. In that case offline RL algorithms face difficulties in the learning process . CQL algorithm : CQL is built on top of a Soft-Actor Critic algorithm ( SAC ) ( Haarnoja et al. , 2018 ) , which employs soft-policy iteration of a stochastic policy ( Haarnoja et al. , 2017 ) . A policy entropy regularization term is added to the policy improvement step in Eq . ( 2 ) as πi+1 ← argmax π Est∼D [ Q̂ ( st , πi ( at|st ) ) − α log πi ( at|st ) ] . ( 3 ) where α either is a fixed hyperparameter or may be chosen to be trainable . CQL reduces the overestimation of state-values - in particular those out-of distribution from D. It achieves this by regularizing the Q-function in Eq . ( 1 ) by a term minimizing its values over out of distribution randomly sampled action . In the following at+1 is given by the prediction of the policy πi ( at+1|st+1 ) and α̃ is a hyperparameter balancing the regulizer term . The policy optimisation step is given by Q̂i+1 ← argmin Q ( E st , at , st+1∼D [ ( rt + γ Q̂i ( st+1 , at+1 ) −Qi ( st , at ) ) 2 ] ( 4 ) + α̃ E st∼D [ log ∑ a exp ( Qi ( st , a ) ) − E a∼π ( st ) [ Qi ( st , a ) ] ] ) 2.2 KOOPMAN THEORY . Historically , the Koopman theoretic perspective of dynamical systems was introduced to describe the evolution of measurements of Hamiltonian systems ( Koopman , 1931 ; Mezić , 2005 ) . The underlying dynamic of most modern reinforcement learning tasks is of nonlinear nature , i.e . the agents actions lead to changes of it state described by a complex non-linear dynamical system . In contrast to linear systems which are completely characterized by their spectral decomposition non-linear systems lack such a unified characterisation . The Koopman operator theoretic framework describes nonlinear dynamics via a linear infinite-dimensional Koopman operator and thus inherits certain tools applicable to linear control systems ( Mauroy et al. , 2020 ; Kaiser et al. , 2021 ) . In practice one aims to find a finite-dimensional representation of the Koopman operator which is equivalent to obtaining a coordinate transformations in which the nonlinear dynamics are approximately linear . A general non-affine control system is governed by the system of non-linear ordinary differential equations ( ODEs ) as ṡ = f ( s , a ) ( 5 ) where s , is the n-dimensional state vector , a the m-dimensional action vector with ( s , a ) ∈ S ×A the state-action-space . Moreover , ṡ = ∂ts is the time derivative , and f is some general non-linear - at least C1-differentiable - vector valued function . For a discrete time system , Eq . ( 5 ) takes the form st+1 = F ( st , at ) ( 6 ) where st denotes the state at time t where F is at least C1-differentiable vector valued function . Definition 1 ( Koopman operator ) Let K ( S ×A ) be the ( Banach ) space of all measurement functions ( observables ) . Then the Koopman operator K : K ( S ×A ) → K ( S ×A ) is defined by Kg ( st , at ) = g ( F ( st , at ) , at+1 ) = g ( st+1 , at+1 ) , ∀g ∈ K ( S ×A ) ( 7 ) where g : S ×A → R. Many systems can be modeled by a bilinearisation where the action enters the controlling equations 5 linearly as f ( s , a ) = f0 ( s ) + ∑m i fi ( s ) ai for fi , i = 0 , . . . , m i.e . C1-differentiable-vector valued functions . In that case the action of the Koopman operator takes the simple form g ( st+1 ) = K ( a ) g ( st ) = ( K0 + m∑ i Kiai ) g ( st ) , ∀g ∈ K ( S ) , ( 8 ) where K ( S ) is a ( Banach ) space of measurement functions K0 , Ki decompose the Koopman operator in a the free and forcing-term , respectively . Details on the existence of a representation as in equation 8 are discussed in Goswami & Paley ( 2017 ) . Associated with a Koopman operator is its eigenspectrum , that is , the eigenvalues λ , and the corresponding eigenfunctions φλ ( s , a ) , such that [ Kφλ ] ( s , a ) = λφλ ( s , a ) . In practice one derives a finite set of observable g⃗ = ( g1 , . . . , gN ) in which case the approximation to the Koopman operator admits a finite-dimensional matrix representation . The N ×N matrix representing the Koopman operator may be diagonalized by a matrix U containing the eigen-vectors of K as columns . In which case the eigen-functions are derived by φ⃗ = Ug⃗ and one infers from Eq . ( 5 ) that φ̇i = λiφi , for i = 1 , . . . , N with eigenvalues λi=1 , ... , N . These ODEs admit simple solutions for their time-evolution namely the exponential functions exp ( λit ) ..
The paper uses koopman theory to design principled data augmentation method for offline reinforcement learning. They learn a VAE style encoder-decoder model such that $D(E(s))=s$ and a forward model such that $F(s_t, a_t) = D((K_0 + \sum_{i=1}^m K_i, a_{t,i})E(s_t)) = s_{t+1}$. The koopman operator $K$ is then used to generate symmetries which are applied to both $s_t$ and $s_{t+1}$ as data augmentation during bellman error minimization. The resulting algorithm KFC and KFC++ leads to overall better data augmentation and improves for S4RL and CQL.
SP:b0ddaded23d30a4f36ea93c27971167644ac43f1
Exploring the Limits of Large Scale Pre-training
1 INTRODUCTION . Recent impressive progress on transfer and few-shot learning ( Brown et al. , 2020 ; Goyal et al. , 2021 ; Kolesnikov et al. , 2019 ; Pham et al. , 2020 ; Dosovitskiy et al. , 2020 ; Dumoulin et al. , 2021 ; Radford et al. , 2021 ) suggests an emerging direction that scaling up models and training them on a huge corpus of data is the main obstacle towards better performance on downstream tasks with less or no data . These developments implicitly encourage two consistent views : 1 ) scaling up the model and data size improves the performance significantly ; 2 ) the performance improvement transfers to downstream tasks in a desirable way . In a more focused empirical study in support of the first view , Kaplan et al . ( 2020 ) show that scaling up the model size , data , and compute appropriately in the language modeling task results in a non-saturating return in performance . Bello et al . ( 2021 ) , Tan & Le ( 2019 ) show that favorable scaling can be achieved in image recognition tasks as well . The second view has also been a subject of recent focused studies . Hernandez et al . ( 2021 ) show that favorable scaling laws similar to that of ( Kaplan et al. , 2020 ; Tay et al. , 2021b ) hold in transfer and few-shot settings in NLP tasks . In perhaps closest prior work to ours , Kornblith et al . ( 2019 ) observe a linear relationship1 between the performances on ImageNet ( Russakovsky et al. , 2015 ) and downstream image recognition tasks . Adopting the above views has major implications moving forward . These views suggest that spending compute and research effort on improving the performance on one massive corpus would pay off because that would enable us to solve many downstream tasks almost for free . It also means while improving our upstream performance , we do not need to be worried about downstream tasks as their improvement is predictable based on a linear trend . While the aforementioned studies provide a compelling story , they suffer from a major shortcoming : due to compute limitations , performance for different choices of hyper-parameter values are not reported . Scaling plots seem more favorable if the hyper-parameter chosen for each scale is fixed or determined by a simple scaling function . 1The linear relationship in ( Kornblith et al. , 2019 ) is achieved after proper logit scaling of accuracy values . We show that with logit or linear scaling , the relationship is not linear . Moreover , often the goal is improving state-of-the-art results , hence naturally most of the efforts in hyper-parameter selection is focused on higher scales , which significantly biases the scaling plots . However , when studying scaling , we are concerned about the best downstream performance of models given all possible values for the hyper-parameters . Additionally , most scaling studies report the behavior within a limited range , and simply extrapolating that scaling without further understanding of the dynamics of scaling can be detrimental as there is no reason , a priori , for the scaling to hold outside of the studied range . In this paper , we systematically investigate the transferability of improvements on a large-scale upstream task to a wide range of downstream tasks in both few-shot and transfer learning scenarios . To address the above shortcomings , part of our work is a meta-study of more than 4800 Vision Transformer ( Dosovitskiy et al. , 2020 ) , MLP-Mixer ( Tolstikhin et al. , 2021 ) and ResNet ( Dosovitskiy et al. , 2020 ) models . The models are pre-trained on either JFT ( Sun et al. , 2017 ) with 303M images and 18K classes or ImageNet21K ( Deng et al. , 2009 ) with 14M images and 21K classes and evaluated on a variety of downstream datasets for few-shot and transfer learning settings . Our 25 downstream tasks cover a wide range of standard datasets that are included in benchmarks like VTAB ( Zhai et al. , 2019 ) , MetaDataset ( Triantafillou et al. , 2019 ) , Wilds ( Koh et al. , 2020 ) and medical imaging . We provide strong empirical evidence that scaling ( and hyper-parameter tuning ) does not lead to a one-model-fits-all solution . There are still many unresolved challenges remaining and at the center is the problem of data diversity for downstream tasks . We provide the first large scale and systematic investigation of this phenomena and discuss the reasons behind it . In Figure 1 , we present downstream ( DS ) vs upstream ( US ) performance plot on variety of models and downstream tasks . We observe that , as we increase US accuracy , for most cases DS accuracy saturates to a value considerably below 100 % . Also , saturating behavior is not an exception but rather the common trend and it is robust to the choice of number of shots and US tasks ( see Figure F.1 ) . We establish that this gap is not due to noise or any other factor that solely depends on DS task ; rather , it depends on the relationship between US , DS tasks . Moreover , given a set of models with similar US accuracy , the best model for different DS tasks varies . Contributions Our main contributions in this paper are as follows : • We establish through extensive study that as we improve the performance of the upstream ( US ) task either by scaling up or hyper-parameter and architectural choices , the performance of downstream ( DS ) tasks shows a saturating behaviour . In our experiments , several DS tasks reach full saturation within the studied range ( Section 2 ) . • We demonstrate that given a set of models with similar US accuracy , the best model for a DS task TDS1 might have much worse performance on another DS task TDS2 compared to the best model for TDS2 ( Figure 5 ) . • Given the scale of experiments , it is crucial for the proposed model to not be impacted by the density of the points in the DS-vs-US plot . We argue and demonstrate that fitting the power law to the convex hull of experiments would circumvent the effect of sampling biases on prediction of downstream accuracy and show the robustness of our model to sample size variations ( Section 2.2 ) . • Having observed the nonlinear relationship between upstream and downstream accuracy , in order to predict downstream performance for a given upstream accuracy , we model their relationship with a power law curve and establish that it captures the behavior well even with small number of samples ( Section 2.2 ) . • We study how scaling up model size , data size , and compute affects DS performance and show that these parameters impact DS performance mainly through the US performance ( Section 3 ) . • We investigate reasons behind the DS performance saturation and show that this behavior can be captured by the usefulness of feature representation in higher layers of the pre-trained model ( Section 4 ) . • We further explore the discrepancy between US and DS performances and show that for some choices of hyper-parameters , they might be at odds with each other . In particular , we showcase how the optimal hyper-parameters for the head used in pre-training ( upstream task ) are different for US and DS . We then uncover the reason behind this discrepancy ( Appendix C , D ) . • Finally , we show our observations are robust to several choices such as size of US data , common scalings of accuracy , number of shots , transfer vs few-shot setting and architecture ( Appendix E ) . Related Work . The closest work to ours is that of Kornblith et al . ( 2019 ) . They investigate the effect of ImageNet ( Russakovsky et al. , 2015 ) pre-training on image classification performance across 12 datasets for few-shot , transfer and random initialization scenarios . They show that performance on ImageNet translates linearly ( in logit scaling ) to performance on DS tasks . However , they do not consider extrapolation of the values . While both works investigate the effect of pre-training via various experiments , there are two main differences in our responses to the question of “ better upstream performance transfer to better downstream performance ? ” . First , we establish that clear “ saturation ” phenomena exists when looking into DS-vs-US performance . In Figure 1 , we see there are various cases when comparing two models , A , B . Where model A has a much higher US accuracy but lower DS accuracy and these are not exceptions to a rule , rather the majority of cases . Essentially , for each DS-vs-US plot two points where one is on the right but lower than the other are instances of such a case . Second , we also establish that , for each DS task you can see best performing models scale with power law as in Equation 1 but for each architecture best performing models are different across DS tasks and this depends on training hyper-parameters , See Figure 5 . In other words , when considering two DS tasks , TDS1 , TDS2 , we have numerous cases where model A has better performance on US and TDS1 but one can not conclude better performance on DS2 . We suspect the difference in conclusion is due to the earlier work being limited in the range of accuracy values they consider . In addition to this difference in conclusions , we investigate the reasons behind this saturation behavior . Moreover , ( in Appendix C ) we consider cases where US and DS performance are at odds with each other , specifically , the scenarios where worse performance on US , leads to performance improvement on DS . Inspired by ( Zhai et al. , 2021 ) who noted that increasing head weight decay during pre-training leads to worse performance on US while improving DS performance ; we investigate head hyper-parameters ( both weight decay and learning rate ) further and show that it can be explained by noting that these manipulations push the information stored in the head down to lower layers . Additional related work are covered in Appendix A . 1.1 EXPERIMENTAL SETUP . The analysis in this paper is based on a study on an exhaustive number of large-scale experiments on image recognition tasks , as well as a set of controlled experiments we conducted to ablate our setup and deepen our understanding of the studied phenomena . We investigate more than 4800 experiments with Vision Transformers , MLP-Mixers and ResNets with different configurations when pre-trained on a large amount of data in a supervised fashion and evaluated on several downstream image recognition tasks through few-shot learning and fine-tuning . For more details , see Appendix G. We emphasize that the large set of experiments we investigate are not trained for the purpose of this paper , rather , we have aggregated models trained by different researchers for different purposes to perform a meta-study on them . This , in fact , positions this meta-study in a unique spot . First , it may not be feasible to run such a number of large-scale trials for the purpose of studying particular phenomena.Second , no implicit or explicit assumption was made in these experiments with respect to the type of analysis we conducted on them afterwards , hence minimizing the systematic biases of the analysis process in the findings . We note that , there might potentially be other biases . For example , researchers usually focus on hyper-parameter tuning to improve SOTA on a specific downstream task ( usually ImageNet ) and this may lead to not do a grid search on high dimensional space of all possible hyper-parameters and possibly affecting the plots . In Section 3 , we investigate this and discuss that in this case the observed trend is similar to performing a grid search . In the main body of the paper , we report the results over eight downstream tasks and provide results for more than 20 downstream tasks in Appendix F. Moreover , the plots corresponding to pre-training on JFT , ImageNet21K are in the main part and Appendix F , respectively .
### What is the Problem / Question? There is a ongoing trend in ML right now of exploring larger and larger pre-trained (PT) models. In general, increasing the scale of these PT models has yielded better performance on downstream tasks, though this is not universally the case. This work analyzes the limits of this trend in the computer vision space, investigating how downstream task performance is impacted by scale of the PT model among other factors. ### Why is it impactful? Pre-training large models is very expensive. This study has the potential to clarify when such large-scale PT is well-motivated, and when it isn't, which could yield significant benefits for future research. ### Why is it hard? Why have previous approaches failed? Previous approaches have examined this question at a dramatically smaller scale than this study does. For example, Kornblith et al., 2019 examined on the order of 10s of models, as opposed to thousands of models as examined here, and the results found here are correspondingly more detailed than those found in the Kornblith et al. study. _Most critically, the authors here present data that strongly suggests that rather than a linear relationship between downstream and upstream task performance, we should instead expect a saturating, non-linear trend_, which suggests that continually training larger and larger models may not be as worthwhile as was traditionally assumed. The fact that this counters an established result in the literature is an important distinction, because my native assumption would've actually been consistent with the author's finding, so without the literature bias already existing, this finding would in my opinion be less impactful. However, because it is updating a held belief in the published results, it is much more important. ### How do they solve / answer it? The authors profile a variety of models across different architectural choices, hyperparameter settings, etc. and compare upstream vs. downstream accuracy across various downstream tasks. They further examine a variety of additional angles within this study, including: 1) Quantifying the extent to which downstream performance is consistent across downstream tasks at a given level of upstream task performance, 2) How the internal representational space of these models can inform the extent of the saturation of the downstream task. 3) They examine in which cases upstream and downstream task performance may be at odds with one another 4) They profile their analyses under various dataset sizes, few-shot settings, and architectures.
SP:95f32813140f9e12b9d0d6f3ecad90c1ad00b0a0