paper_name stringlengths 11 170 | text stringlengths 8.07k 307k | summary stringlengths 152 6.16k | paper_id stringlengths 43 43 |
|---|---|---|---|
Generating Antimicrobial Peptides from Latent Secondary Structure Space | 1 INTRODUCTION . Developing neural networks for drug discovery has attracted increasing attention recently . It can facilitate the discovery of potential therapies and reduce the time and cost of drug development ( Stokes et al. , 2020 ) . Plenty of works have been done to employ deep generative models in searching for drug-like molecules with desired properties and achieved great success ( Jin et al. , 2018 ; Shi et al. , 2019 ; Schwalbe-Koda & Gómez-Bombarelli , 2020 ; Xie et al. , 2020 ) . However , these works mainly focus on small molecules , and more complicated biochemicals , such as proteins , are still rarely explored . Antimicrobial peptides ( AMPs ) , defined as short proteins of less than 50 amino acids with potent antimicrobial activity , are an emerging category of therapeutic agents . AMPs exist widely in the natural immune system for all species and kill bacteria in a physical way ( Aronica et al. , 2021 ; Cardoso et al. , 2020 ) . They attach to the bacterial membrane and insert into the membrane to form pores , which leads to the death of bacteria by allowing cytoplasmic leakage . This mechanism makes them more promising for handling extensively drug-resistant bacteria than traditional antibiotics ( Mahlapuu et al. , 2016 ) . However , the theoretical chemical space of peptides is enormous and the sequence number grows exponentially as the length increases . Thus , it is challenging to search for valid peptides with antimicrobial properties from such a huge sequence space . Several factors can affect the antimicrobial activity of peptides ( Boman , 2003 ) . Amino acids with positive charges are more likely to bind with bacterial membrane as most bacterial surfaces are anionic , while those with high hydrophobicities tend to move from the solution environment to the bacterial membrane . However , the mechanisms of antibacterial peptides need not only a reasonable sequence but also an appropriate structure . For example , by forming the helix structure , a peptide can gather the hydrophobic amino acids on one side and hydrophilic ones on the other . This ability , named amphipathy , helps it insert into the membrane and maintain a stable hole with other peptide molecules in the membrane , as shown in Figure 1 . The hole will drain the cytoplasm and finally kill the bacteria . This mechanism of killing the bacteria is called ‘ barrel stave ’ . Amphipathy plays an important role in deciding the antibacterial activity of peptides and is closely related to the secondary structure of the peptide ( Aronica et al. , 2021 ) . According to the antimicrobial mechanism , a new AMP should meet the following criteria . C1 : It possesses several ideal physical attributes ( e.g . positive charge and high hydrophobicity ) . C2 : It has appropriate secondary structures ( e.g . alpha-helix ) . C3 : It differs from existing AMPs to some extent . The existing works mainly focus on sequential features of amino acids and ignore the secondary structure . The traditional methods replace subsequences with patterns from the pattern database in a given template ( Porto et al. , 2018 ) . Inspired by success in deep neural networks , many researchers apply neural generative models to AMP discovery . They often use the physical attributes as the extra input to control the generation phase ( Das et al. , 2018 ; Van Oort et al. , 2021 ) , or train classifiers on each attribute to filter the peptides after the generation ( Capecchi et al. , 2021 ; Das et al. , 2021 ) . The former ones usually generate peptides that have low correlation with the input attributes and the filter phase of the latter ones make the sampling inefficient . As described above , the antimicrobial activity is determined by both the amino acid composition and secondary structure of the peptide . Thus , we propose LSSAMP to generate antimicrobial peptides from the latent semantic and structure space . Taking the peptide sequence as the time series , we assign a latent variable on each position . Since it is computationally intractable to sum continuous latent variables over all positions , we employ the vector quantized-variational autoencoder ( VQ-VAE ) ( van den Oord et al. , 2017 ) to learn the discrete distribution for each position and further design a multi-scale codebooks strategy to capture different local patterns to fit various length ranges for amino acid and structure sequences . During the generation process , LSSAMP will sample a backbone from the secondary structure latent space and generate the amino acid sequence simultaneously . We evaluate LSSAMP and several baselines through physical properties that are closely related to the antibacterial mechanism . Besides , we use some public AMP prediction models to predict generated sequences being AMPs as previous works did ( Das et al. , 2020 ; Van Oort et al. , 2021 ) . To conclude , our contributions are as follows : • We propose LSSAMP , a generative model which samples peptides from the latent secondary structure space to control the peptide properties . • We develop a multi-scale VQ-VAE to learn positional latent spaces from different aspects and model semantic sequences and structural sequences in the same space . • Experimental results show that LSSAMP can generate peptides with multiple ideal features such as positive charge , better hydrophobicity , and better amphipathicity . The results of public AMP classifiers also verify that our model can generate peptides with high AMP probability . 2 RELATED WORK . Antimicrobial Peptides Generation Traditional methods for AMP design can be divided into three approaches ( Torres & de la Fuente-Nunez , 2019 ) : ( i ) The pattern recognition algorithms build a sequential pattern database from existing AMPs , and then pick a template peptide and replace local sequence with patterns ( Loose et al. , 2006 ; Porto et al. , 2018 ) . ( ii ) The genetic algorithms analyze the AMP database and design some antibiotic activity functions ( Maccari et al. , 2013 ) . ( iii ) The molecular modeling and molecular dynamics methods build 3D models of peptides and analyze activity ( Matyus et al. , 2007 ; Bolintineanu & Kaznessis , 2011 ) . Deep generative models take a rapid growth in recent years . Dean & Walper ( 2020 ) encodes the peptide into the latent space and interpolates across a predictive vector between a known AMP and its scrambled version to generate novel peptides . The PepCVAE ( Das et al. , 2018 ) and CLaSS ( Das et al. , 2021 ) employ the variational auto-encoder model to generate sequences . The AMPGAN ( Van Oort et al. , 2021 ) uses the generative adversarial network to generate new peptide sequences with conditions . To our knowledge , this is the first study to take secondary structure information into consideration during the generative phase , which is conducive to effectively generate well-structured sequences with desired properties . Sequence Generation via VQ-VAE The variational auto-encoders ( VAEs ) were first proposed by Kingma & Welling ( 2014 ) for image generation , and then widely applied to sequence generation tasks such as language modeling ( Bowman et al. , 2016 ) , paraphrase generation ( Gupta et al. , 2018 ) , machine translation ( Bao et al. , 2019 ) and so on . Instead of mapping the input to a continuous latent space in VAE , the vector quantized-variational autoencoder ( VQ-VAE ) ( van den Oord et al. , 2017 ) learns the codebook to obtain a discrete latent representation . It can avoid issues of posterior collapse while has comparable performance with VAEs . Based on it , Razavi et al . ( 2019 ) uses a multi-scale hierarchical organization to capture global and local features for image generation . Bao et al . ( 2021 ) learns implicit categorical information of target words with VQ-VAE and models the categorical sequence with conditional random fields in non-autoregressive machine translation . In this paper , we employ the multi-scale vector quantized technique to obtain the discrete representation for each position of the peptide . 3 METHOD . Given a peptide sequence x = { a1 , a2 , · · · , aL } , where a belongs to the 20 common amino acids and L is the sequence length , the corresponding secondary structure can be denoted as y = { y1 , y2 , · · · , yL } . Following the definition in Kabsch & Sander ( 1983 ) , there are 8 secondary structure types , including one unknown label , so yi ∈ { H , B , E , G , I , T , S , − } 1 . We first employ VQ-VAE for the sequence reconstruction task to learn the sequential latent space ( Section 3.1 ) . Then , we enforce the latent space to model the structure information by the secondary structure task ( Section 3.2 ) . Besides , we design the multi-scale codebooks to capture different local patterns ( Sec- 1H , G , I denote the alpha , 3-10 , and pi helix . E , T are the strand and turn . The others are coil structures . tion 3.3 ) . Finally , we describe the training and inference phase in Section 3.4 . The overview of our model is shown in Figure 2 . 3.1 MODELING PEPTIDE SEQUENCES . For sequential information , we embed the input peptide x = { a1 , a2 , · · · , aL } to the latent space via the encoder and use the generator to reconstruct x . We assume that each ai is determined by a latent variable zi , and the input sequences x = a1 : L will be assigned to a latent sequence z = z1 : L. Since it is computationally intractable to sum continuous latent variables over the sequence , we use VQ-VAE ( van den Oord et al. , 2017 ) to lookup the discrete embedding vector zq = { zq ( a1 ) , · · · , zq ( aL ) } for each position by vector quantization . Specifically , the encoder output ze ( ai ) ∈ Rd will be replaced by the codebook embedding zq ( ai ) ∈ Rd via a nearest neighbors lookup from the codebook B ∈ RK×d : zq ( ai ) = ek , and k = argminj∈ { 1 , ··· , K } ‖ze ( ai ) − ej‖2 . ( 1 ) Here , K is the size of the codebook and d is the dimension of the codebook entry e. Then , the generator will take zq ( ai ) as its input and reconstruct x . The training objective Lr is defined as : Lr = log p ( ai|zq ( ai ) ) + ‖sg [ ze ( ai ) ] − zq ( ai ) ‖22 + β ‖ze ( ai ) − sg [ zq ( ai ) ] ‖ 2 2 . ( 2 ) Here , sg ( · ) is the stop gradient operator , which becomes 0 at the backward pass . β is the commit coefficient to control the codebook loss . 3.2 MODELING SECONDARY STRUCTURES . In order to model the categorical information of the secondary structure , we define an 8-category sequence labeling task on the latent space , which takes x as the input and the structure label sequence y as the target . Similar with sequence reconstruction , we use the same encoder to get ze ( ai ) and employ VQ-VAE to obtain discrete representation . Then , z′q ( ai ) is fed to a separate classifier for the secondary structure prediction : Ls = log p ( yi|z′q ( ai ) ) + ∥∥sg [ ze ( ai ) ] − z′q ( ai ) ∥∥22 + β ∥∥ze ( ai ) − sg [ z′q ( ai ) ] ∥∥22 . ( 3 ) Peptide sequences and structures have distinctive local features , which are often utilized in traditional design algorithms . The patterns of amino acids are often used for template-based design and feature-based recognition . For structure motifs such as α-helix with at least 3.6 consecutive amino acids , they will determine the position of amino acids in the 3D space and affect the function of peptides . However , the structure motifs are often much longer than sequence patterns . Therefore , we establish codebooks of multiple scales to learn latent spaces for different local patterns . | This manuscript addresses the problem of generating novel antimicrobial peptides (AMPs). The approach uses a deep learning framework, and the primary novelty is to include in the model information about peptide secondary structure. The hypothesis that such information could improve the ability to capture valuable information about AMP function is plausible a priori. | SP:4792a7e63071f10dc5dd549471b613b292089ef1 |
A Distributional Robustness Perspective on Adversarial Training with the $\infty$-Wasserstein Distance | 1 INTRODUCTION . We call adversarial example an input which is a human-imperceptible -perturbation1 compared to a real example that results in an incorrect classification from a classifier [ Goodfellow et al. , 2014 ; Sun et al. , 2018 ; Athalye et al. , 2018 ; Santurkar et al. , 2019 ; Nguyen et al. , 2015a ; Kurakin et al. , 2016 ; Moosavi-Dezfooli et al. , 2016 ] . The particularity of these examples , which justifies their study , is the fact that most of the so-called adversarial examples are misclassified by a large majority of state-of-the-art neural networks . Long seen as bugs , Santurkar et al . [ 2019 ] asserts that the existence of adversarial examples is explained by the presence of easy-to-perturb patterns within the data distribution that are not perceptible by humans but useful for the classification task . In response to this discovery , different methods have been developed to train robust classifiers and to craft adversarial attacks by determining optimal perturbations [ Nguyen et al. , 2015b ; Papernot et al. , 2016a ; Goodfellow et al. , 2014 ; Papernot et al. , 2016b ; Tramèr et al. , 2017 ; Madry et al. , 2017 ] . Among these training methods , adversarial training [ Goodfellow et al. , 2014 ; Tramer et al. , 2017 ; Madry et al. , 2018 ] has settled as one of the strongest baselines to train robust classifiers . This method is relatively simple : it consists of training the classifier directly on batches of adversarial examples , leading to the following optimization problem [ Madry et al. , 2018 ] : min θ∈Rd E ( x , y ) ∼pdata [ max‖x̃−x‖∞≤ ` ( fθ ( x̃ , y ) ) ] ( 1 ) where ` is usually the cross-entropy loss and pdata is the dataset distribution . Our goal is to rigorously connect adversarial training and robustness by providing a distributional robustness 1Adversarial example can be defined with respect to any notion of distance that captures the fact that an -perturbation is imperceptible by a human . In this work , for the sake of simplicity , we focus on the ` ∞ norm , which is the most common one . perspective [ Delage and Ye , 2010 ; Ben-Tal and Nemirovski , 1998 ; Sinha et al. , 2018 ] for adversarial training . Distributional robustness is a framework to study predictive models that aim at being robust against distribution shift . Given a set of possible distribution P that a given predictive model fθ could encounter the distributionally robust classification task is : min θ∈Rd max padv∈P Ex̃∼padv [ ` ( fθ ( x̃ , y ) ) ] ( 2 ) Note that while standard adversarial training aims to use the point-wise optimal adversarial x̃j examples ( i.e . for each natural input xi ) , our perspective considers the optimal adversarial distribution . Working at the scale of distributions leads us to draw inspiration from the Kantorovich relaxation in Optimal Transport theory . To do so , we will define the set P using coupling measures between natural and adversarial distributions with the help of∞-∞-Wasserstein distance . Contributions . Our contributions are three-fold : First , we provide a strong connection between adversarial training and adversarial robustness and distributional robustness by using some tools from optimal transport , we call this formulation adversarial transport . Our second contribution is to show that , in this specific setting , there exists , against any given classifier fθ , an optimal distribution of adversarial examples and to provide a closed-form solution for this distribution . Our third contribution is to use these theoretical insights to come up with a practical training method using Langevin Monte-Carlo sampling to jointly find the optimal classifier and the optimal distribution of adversarial examples . By using this new technique for adversarial training we obtain robust classifiers outperforming the standard baseline [ Madry et al. , 2018 ] in terms of robustness and clean accuracy . Moreover , this training technique provides a speed-up of respectively ×200 for MNIST and ×8 for CIFAR in terms of training time . Related Work . Among the various works about defenses and attacks in the context of adversarial examples , Adversarial Training [ Madry et al. , 2018 ] is the most common baseline . However , in this procedure , adversarial examples are generated independently of the others by searching for the optimal perturbation for each one . Thus , AT seeks point-wise optimality and not global optimality . Here , the goal is to make our classifier robust to any unknown adversarial example distribution . It justifies the consideration of the DRO framework . DRO enables a mathematical formulation for dealing with uncertainty in complex systems [ Delage and Ye , 2010 ; Lam , 2018 ; Rahimian and Mehrotra , 2019 ] . In ML , DRO tries to minimize the loss over the worst-case distribution in a neighborhood of the observed training data distribution [ Duchi and Namkoong , 2016 ; 2018 ; Chouzenoux et al. , 2019 ; Duchi et al. , 2016 ] . Thus , DRO is pertinent in the case of adversarial examples and allows to bring a principled distributional perspective on AT . Within the DRO framework , one crucial point is to properly define the uncertainty set which contains the underlying data distribution . The importance of this set lies in the fact that it allows to reduce the computation time and the search area of the underlying distribution [ Delage and Ye , 2010 ; Ben-Tal and Nemirovski , 1998 ; Lam , 2018 ] . Different methods have been proposed to construct uncertainty sets . Among them , one considers the help of OT operators and defines the set with all the probability measures such as the p-Wasserstein distance from the observed distribution is less than a given constant ( p-Wasserstein ball ) [ Blanchet and Murthy , 2019 ] . Some works have started to study p-Wasserstein DRO in the case of adversarial examples . Zheng et al . [ 2019 ] defines Distributionally Adversarial Attacks ( DAA ) which is a generalization of PGD attacks on the space of probability measures with W2-DRO and [ Staib and Jegelka , 2017 ] did the Wp-DRO generalization of AT . E.Wong et al . [ 2019 ] also considers the Wp ball using an explicit formulation of the uncertainty set with coupling matrices . However , while the previous works modified the AT problem—the Wp constraint on the adversarial distribution does not correspond to the distribution of adversarial examples computed in AT—our work aims at overcoming that . The original AT problem stays a the scale of the example and considers OT to deal with the displacement of pixels . This perspective leads to the discovery that the standard AT problem corresponds to an∞-Wasserstein DRO problem with the ` ∞ underlying geometry . In the meantime , as in our paper , entropic regularization is used to find closed forms of the coupling matrix . To extend this understanding of adversarial examples in the case of distributions we generalize this uncertainty set with the ∞-∞-Wasserstein distance and add entropic regularization . 2-∞- Wasserstein DRO has already started to receive consideration in the case of AT [ Gao et al. , 2017 ] . Nevertheless , the use of the ` ∞ within the∞-Wasserstein distance allows both to consider the DRO problem at the dataset scale but also to ensure that the adversarial condition is respected for each element of the adversarial distribution . Together with the use of coupling matrices in our formulation , we found a concave and tractable formulation of our problem which results in a different technique to sample from this distribution ( namely Langevin Monte Carlo ) . Finally , we propose to keep them in memory to reuse the past samples for the update of the robust classifier . Notations . In this work , we will consider a measurable finite dimensional input space X ⊂ Rd . We will note B ( X ) the Borel σ-algebra of X andM ( X ) 1+ the set of all probability measures on X . If not precised , a map T : X → X is considered measurable . We , recall that given a separable metric space X s.t . any probability measure on X is a Radon measure , for T : X → X , the push-forward measure of β = T ] α ∈ M ( X ) 1+ of some α ∈ M ( X ) 1+ satisfies : ∀h ∈ C ( X ) , ∫ X h ( x̃ ) dβ ( x̃ ) =∫ X h ( T ( x ) ) dα ( x ) . 2 ADVERSARIAL TRAINING , TRANSPORT , AND DISTRIBUTIONAL ROBUSTNESS . In this work , we say that x̃ ∈ X is an adversarial example of f at the data point ( x , y ) if ‖x̃−x‖∞ ≤ [ Goodfellow et al. , 2014 ] . Given a loss function ` , an optimal adversarial example x̃ aims at maximizing the following optimization problem : x̃ ∈ arg max ‖x̃−x‖∞≤ ` ( fθ ( x̃ ) , y ) . ( 3 ) In practice , a large value for ` ( fθ ( x̃ ) , y ) will yield a misclassification of the example y . By considering the adversarial training problem ( 1 ) , one can notice that the distribution of input-output pairs seen by the classifier fθ depends on the value of its own parameters . We will call this distribution padv . Such a distribution can be described as the pushforward of a transport map T that respect the adversarial example constraint ‖T ( x ) − x‖∞ ≤ , ∀x ∈ X . In other words we have , padv = T ] pdata : ( x̃ , y ) ∼ padv ⇔ ∃ ( x , y ) ∼ pdata s.t . x̃ = T ( x ) and ‖x̃− x‖∞ ≤ . ( 4 ) This remark leads us to our first proposition that explicitly proposes a distributional robust optimization ( DRO ) formulation of the adversarial training problem . Proposition 2.1 ( DRO formulation of adversarial training ) . The adversarial training problem ( 1 ) can be formulated as a DRO problem ( 2 ) where : P = { padv : ∃T : X → X , padv = T ] pdata and ‖T ( x ) − x‖∞ ≤ , ∀x ∈ X } ( 5 ) Interestingly , one can draw parallels with Monge ’ s formulation of optimal transport ( OT ) , were given an initial measure µ and a target measure ν , the task is to solve the following problem inf T ∫ X c ( x , T ( x ) ) dµ ( x ) subject to ν = T ] µ . ( 6 ) On the one hand , ( 6 ) and the DRO problem defined in Proposition 2.1 are drastically different problems in essence . It can be explained by the difference between the constraints on the transportation map and the fact that while Equation 6 aims at minimizing a function of the transportation map T , Equation 2 aims at maximizing a function of the transported distribution padv . On the other hand , it is insightful to notice how both problems depend on a set of transportation maps to connect the initial and the target distributions . The limitations of Monge ’ s problem are well known in the OT community : due to its non-linear constraint , the problem is often intractable and may not have a solution ( i.e . the infimum may not be achieved ) . That is why Kantorovich [ 1940 ] , proposed to relax ( 6 ) into a problem with linear constraints by considering coupling measures ( an approach that allows a mass splitting from a natural example xi to different locations x̃j ) . Such a relaxation had the advantage to provide a better understanding of the original problem leading to novel theoretical guarantees ( e.g. , the existence of solutions for Kantorovich ’ s problem , duality , and in some situations equality between Monge ’ s problem and Kantorovich ’ s problem ) as well as tractable algorithms [ Sinkhorn , 1964 ; Cuturi , 2013b ] . In a similar vein , we believe our perspective on adversarial examples that combine ideas from distributional robustness and adversarial transport leads to a better understanding of the problem of adversarial training . Thus , we will use that insight to consider coupling measures to relax the adversarial training problem ( 1 ) . It will lead to a new DRO formulation for adversarial training that we call adversarial transport . | The authors present a connection between adversarial robustness and distributional robustness. A duality result is given linking the $\infinity$-Wasserstein distance to an entropy regularisation problem. The problem is then solved using a Langevan-sampling based algorithm. | SP:b6ec707ce6c9e1e71fc7454d9101a76fdf69b555 |
A Distributional Robustness Perspective on Adversarial Training with the $\infty$-Wasserstein Distance | 1 INTRODUCTION . We call adversarial example an input which is a human-imperceptible -perturbation1 compared to a real example that results in an incorrect classification from a classifier [ Goodfellow et al. , 2014 ; Sun et al. , 2018 ; Athalye et al. , 2018 ; Santurkar et al. , 2019 ; Nguyen et al. , 2015a ; Kurakin et al. , 2016 ; Moosavi-Dezfooli et al. , 2016 ] . The particularity of these examples , which justifies their study , is the fact that most of the so-called adversarial examples are misclassified by a large majority of state-of-the-art neural networks . Long seen as bugs , Santurkar et al . [ 2019 ] asserts that the existence of adversarial examples is explained by the presence of easy-to-perturb patterns within the data distribution that are not perceptible by humans but useful for the classification task . In response to this discovery , different methods have been developed to train robust classifiers and to craft adversarial attacks by determining optimal perturbations [ Nguyen et al. , 2015b ; Papernot et al. , 2016a ; Goodfellow et al. , 2014 ; Papernot et al. , 2016b ; Tramèr et al. , 2017 ; Madry et al. , 2017 ] . Among these training methods , adversarial training [ Goodfellow et al. , 2014 ; Tramer et al. , 2017 ; Madry et al. , 2018 ] has settled as one of the strongest baselines to train robust classifiers . This method is relatively simple : it consists of training the classifier directly on batches of adversarial examples , leading to the following optimization problem [ Madry et al. , 2018 ] : min θ∈Rd E ( x , y ) ∼pdata [ max‖x̃−x‖∞≤ ` ( fθ ( x̃ , y ) ) ] ( 1 ) where ` is usually the cross-entropy loss and pdata is the dataset distribution . Our goal is to rigorously connect adversarial training and robustness by providing a distributional robustness 1Adversarial example can be defined with respect to any notion of distance that captures the fact that an -perturbation is imperceptible by a human . In this work , for the sake of simplicity , we focus on the ` ∞ norm , which is the most common one . perspective [ Delage and Ye , 2010 ; Ben-Tal and Nemirovski , 1998 ; Sinha et al. , 2018 ] for adversarial training . Distributional robustness is a framework to study predictive models that aim at being robust against distribution shift . Given a set of possible distribution P that a given predictive model fθ could encounter the distributionally robust classification task is : min θ∈Rd max padv∈P Ex̃∼padv [ ` ( fθ ( x̃ , y ) ) ] ( 2 ) Note that while standard adversarial training aims to use the point-wise optimal adversarial x̃j examples ( i.e . for each natural input xi ) , our perspective considers the optimal adversarial distribution . Working at the scale of distributions leads us to draw inspiration from the Kantorovich relaxation in Optimal Transport theory . To do so , we will define the set P using coupling measures between natural and adversarial distributions with the help of∞-∞-Wasserstein distance . Contributions . Our contributions are three-fold : First , we provide a strong connection between adversarial training and adversarial robustness and distributional robustness by using some tools from optimal transport , we call this formulation adversarial transport . Our second contribution is to show that , in this specific setting , there exists , against any given classifier fθ , an optimal distribution of adversarial examples and to provide a closed-form solution for this distribution . Our third contribution is to use these theoretical insights to come up with a practical training method using Langevin Monte-Carlo sampling to jointly find the optimal classifier and the optimal distribution of adversarial examples . By using this new technique for adversarial training we obtain robust classifiers outperforming the standard baseline [ Madry et al. , 2018 ] in terms of robustness and clean accuracy . Moreover , this training technique provides a speed-up of respectively ×200 for MNIST and ×8 for CIFAR in terms of training time . Related Work . Among the various works about defenses and attacks in the context of adversarial examples , Adversarial Training [ Madry et al. , 2018 ] is the most common baseline . However , in this procedure , adversarial examples are generated independently of the others by searching for the optimal perturbation for each one . Thus , AT seeks point-wise optimality and not global optimality . Here , the goal is to make our classifier robust to any unknown adversarial example distribution . It justifies the consideration of the DRO framework . DRO enables a mathematical formulation for dealing with uncertainty in complex systems [ Delage and Ye , 2010 ; Lam , 2018 ; Rahimian and Mehrotra , 2019 ] . In ML , DRO tries to minimize the loss over the worst-case distribution in a neighborhood of the observed training data distribution [ Duchi and Namkoong , 2016 ; 2018 ; Chouzenoux et al. , 2019 ; Duchi et al. , 2016 ] . Thus , DRO is pertinent in the case of adversarial examples and allows to bring a principled distributional perspective on AT . Within the DRO framework , one crucial point is to properly define the uncertainty set which contains the underlying data distribution . The importance of this set lies in the fact that it allows to reduce the computation time and the search area of the underlying distribution [ Delage and Ye , 2010 ; Ben-Tal and Nemirovski , 1998 ; Lam , 2018 ] . Different methods have been proposed to construct uncertainty sets . Among them , one considers the help of OT operators and defines the set with all the probability measures such as the p-Wasserstein distance from the observed distribution is less than a given constant ( p-Wasserstein ball ) [ Blanchet and Murthy , 2019 ] . Some works have started to study p-Wasserstein DRO in the case of adversarial examples . Zheng et al . [ 2019 ] defines Distributionally Adversarial Attacks ( DAA ) which is a generalization of PGD attacks on the space of probability measures with W2-DRO and [ Staib and Jegelka , 2017 ] did the Wp-DRO generalization of AT . E.Wong et al . [ 2019 ] also considers the Wp ball using an explicit formulation of the uncertainty set with coupling matrices . However , while the previous works modified the AT problem—the Wp constraint on the adversarial distribution does not correspond to the distribution of adversarial examples computed in AT—our work aims at overcoming that . The original AT problem stays a the scale of the example and considers OT to deal with the displacement of pixels . This perspective leads to the discovery that the standard AT problem corresponds to an∞-Wasserstein DRO problem with the ` ∞ underlying geometry . In the meantime , as in our paper , entropic regularization is used to find closed forms of the coupling matrix . To extend this understanding of adversarial examples in the case of distributions we generalize this uncertainty set with the ∞-∞-Wasserstein distance and add entropic regularization . 2-∞- Wasserstein DRO has already started to receive consideration in the case of AT [ Gao et al. , 2017 ] . Nevertheless , the use of the ` ∞ within the∞-Wasserstein distance allows both to consider the DRO problem at the dataset scale but also to ensure that the adversarial condition is respected for each element of the adversarial distribution . Together with the use of coupling matrices in our formulation , we found a concave and tractable formulation of our problem which results in a different technique to sample from this distribution ( namely Langevin Monte Carlo ) . Finally , we propose to keep them in memory to reuse the past samples for the update of the robust classifier . Notations . In this work , we will consider a measurable finite dimensional input space X ⊂ Rd . We will note B ( X ) the Borel σ-algebra of X andM ( X ) 1+ the set of all probability measures on X . If not precised , a map T : X → X is considered measurable . We , recall that given a separable metric space X s.t . any probability measure on X is a Radon measure , for T : X → X , the push-forward measure of β = T ] α ∈ M ( X ) 1+ of some α ∈ M ( X ) 1+ satisfies : ∀h ∈ C ( X ) , ∫ X h ( x̃ ) dβ ( x̃ ) =∫ X h ( T ( x ) ) dα ( x ) . 2 ADVERSARIAL TRAINING , TRANSPORT , AND DISTRIBUTIONAL ROBUSTNESS . In this work , we say that x̃ ∈ X is an adversarial example of f at the data point ( x , y ) if ‖x̃−x‖∞ ≤ [ Goodfellow et al. , 2014 ] . Given a loss function ` , an optimal adversarial example x̃ aims at maximizing the following optimization problem : x̃ ∈ arg max ‖x̃−x‖∞≤ ` ( fθ ( x̃ ) , y ) . ( 3 ) In practice , a large value for ` ( fθ ( x̃ ) , y ) will yield a misclassification of the example y . By considering the adversarial training problem ( 1 ) , one can notice that the distribution of input-output pairs seen by the classifier fθ depends on the value of its own parameters . We will call this distribution padv . Such a distribution can be described as the pushforward of a transport map T that respect the adversarial example constraint ‖T ( x ) − x‖∞ ≤ , ∀x ∈ X . In other words we have , padv = T ] pdata : ( x̃ , y ) ∼ padv ⇔ ∃ ( x , y ) ∼ pdata s.t . x̃ = T ( x ) and ‖x̃− x‖∞ ≤ . ( 4 ) This remark leads us to our first proposition that explicitly proposes a distributional robust optimization ( DRO ) formulation of the adversarial training problem . Proposition 2.1 ( DRO formulation of adversarial training ) . The adversarial training problem ( 1 ) can be formulated as a DRO problem ( 2 ) where : P = { padv : ∃T : X → X , padv = T ] pdata and ‖T ( x ) − x‖∞ ≤ , ∀x ∈ X } ( 5 ) Interestingly , one can draw parallels with Monge ’ s formulation of optimal transport ( OT ) , were given an initial measure µ and a target measure ν , the task is to solve the following problem inf T ∫ X c ( x , T ( x ) ) dµ ( x ) subject to ν = T ] µ . ( 6 ) On the one hand , ( 6 ) and the DRO problem defined in Proposition 2.1 are drastically different problems in essence . It can be explained by the difference between the constraints on the transportation map and the fact that while Equation 6 aims at minimizing a function of the transportation map T , Equation 2 aims at maximizing a function of the transported distribution padv . On the other hand , it is insightful to notice how both problems depend on a set of transportation maps to connect the initial and the target distributions . The limitations of Monge ’ s problem are well known in the OT community : due to its non-linear constraint , the problem is often intractable and may not have a solution ( i.e . the infimum may not be achieved ) . That is why Kantorovich [ 1940 ] , proposed to relax ( 6 ) into a problem with linear constraints by considering coupling measures ( an approach that allows a mass splitting from a natural example xi to different locations x̃j ) . Such a relaxation had the advantage to provide a better understanding of the original problem leading to novel theoretical guarantees ( e.g. , the existence of solutions for Kantorovich ’ s problem , duality , and in some situations equality between Monge ’ s problem and Kantorovich ’ s problem ) as well as tractable algorithms [ Sinkhorn , 1964 ; Cuturi , 2013b ] . In a similar vein , we believe our perspective on adversarial examples that combine ideas from distributional robustness and adversarial transport leads to a better understanding of the problem of adversarial training . Thus , we will use that insight to consider coupling measures to relax the adversarial training problem ( 1 ) . It will lead to a new DRO formulation for adversarial training that we call adversarial transport . | - This paper proposes using $\infty$-Wasserstein distributional robustness for improving model robustness. Specifically, to obtain a tractable solution, it adds an entropic regularization term to the primal form of $\infty$-Wasserstein distributional robustness. The Langevin algorithm is used to sample adversarial examples for adversarial training. - Although the experimental results show the merit of the proposed method, the experiments are still humble with a lack of experiments on more impactful architectures such as WideResNet and comparison to other SOTA adversarial training methods. | SP:b6ec707ce6c9e1e71fc7454d9101a76fdf69b555 |
A Distributional Robustness Perspective on Adversarial Training with the $\infty$-Wasserstein Distance | 1 INTRODUCTION . We call adversarial example an input which is a human-imperceptible -perturbation1 compared to a real example that results in an incorrect classification from a classifier [ Goodfellow et al. , 2014 ; Sun et al. , 2018 ; Athalye et al. , 2018 ; Santurkar et al. , 2019 ; Nguyen et al. , 2015a ; Kurakin et al. , 2016 ; Moosavi-Dezfooli et al. , 2016 ] . The particularity of these examples , which justifies their study , is the fact that most of the so-called adversarial examples are misclassified by a large majority of state-of-the-art neural networks . Long seen as bugs , Santurkar et al . [ 2019 ] asserts that the existence of adversarial examples is explained by the presence of easy-to-perturb patterns within the data distribution that are not perceptible by humans but useful for the classification task . In response to this discovery , different methods have been developed to train robust classifiers and to craft adversarial attacks by determining optimal perturbations [ Nguyen et al. , 2015b ; Papernot et al. , 2016a ; Goodfellow et al. , 2014 ; Papernot et al. , 2016b ; Tramèr et al. , 2017 ; Madry et al. , 2017 ] . Among these training methods , adversarial training [ Goodfellow et al. , 2014 ; Tramer et al. , 2017 ; Madry et al. , 2018 ] has settled as one of the strongest baselines to train robust classifiers . This method is relatively simple : it consists of training the classifier directly on batches of adversarial examples , leading to the following optimization problem [ Madry et al. , 2018 ] : min θ∈Rd E ( x , y ) ∼pdata [ max‖x̃−x‖∞≤ ` ( fθ ( x̃ , y ) ) ] ( 1 ) where ` is usually the cross-entropy loss and pdata is the dataset distribution . Our goal is to rigorously connect adversarial training and robustness by providing a distributional robustness 1Adversarial example can be defined with respect to any notion of distance that captures the fact that an -perturbation is imperceptible by a human . In this work , for the sake of simplicity , we focus on the ` ∞ norm , which is the most common one . perspective [ Delage and Ye , 2010 ; Ben-Tal and Nemirovski , 1998 ; Sinha et al. , 2018 ] for adversarial training . Distributional robustness is a framework to study predictive models that aim at being robust against distribution shift . Given a set of possible distribution P that a given predictive model fθ could encounter the distributionally robust classification task is : min θ∈Rd max padv∈P Ex̃∼padv [ ` ( fθ ( x̃ , y ) ) ] ( 2 ) Note that while standard adversarial training aims to use the point-wise optimal adversarial x̃j examples ( i.e . for each natural input xi ) , our perspective considers the optimal adversarial distribution . Working at the scale of distributions leads us to draw inspiration from the Kantorovich relaxation in Optimal Transport theory . To do so , we will define the set P using coupling measures between natural and adversarial distributions with the help of∞-∞-Wasserstein distance . Contributions . Our contributions are three-fold : First , we provide a strong connection between adversarial training and adversarial robustness and distributional robustness by using some tools from optimal transport , we call this formulation adversarial transport . Our second contribution is to show that , in this specific setting , there exists , against any given classifier fθ , an optimal distribution of adversarial examples and to provide a closed-form solution for this distribution . Our third contribution is to use these theoretical insights to come up with a practical training method using Langevin Monte-Carlo sampling to jointly find the optimal classifier and the optimal distribution of adversarial examples . By using this new technique for adversarial training we obtain robust classifiers outperforming the standard baseline [ Madry et al. , 2018 ] in terms of robustness and clean accuracy . Moreover , this training technique provides a speed-up of respectively ×200 for MNIST and ×8 for CIFAR in terms of training time . Related Work . Among the various works about defenses and attacks in the context of adversarial examples , Adversarial Training [ Madry et al. , 2018 ] is the most common baseline . However , in this procedure , adversarial examples are generated independently of the others by searching for the optimal perturbation for each one . Thus , AT seeks point-wise optimality and not global optimality . Here , the goal is to make our classifier robust to any unknown adversarial example distribution . It justifies the consideration of the DRO framework . DRO enables a mathematical formulation for dealing with uncertainty in complex systems [ Delage and Ye , 2010 ; Lam , 2018 ; Rahimian and Mehrotra , 2019 ] . In ML , DRO tries to minimize the loss over the worst-case distribution in a neighborhood of the observed training data distribution [ Duchi and Namkoong , 2016 ; 2018 ; Chouzenoux et al. , 2019 ; Duchi et al. , 2016 ] . Thus , DRO is pertinent in the case of adversarial examples and allows to bring a principled distributional perspective on AT . Within the DRO framework , one crucial point is to properly define the uncertainty set which contains the underlying data distribution . The importance of this set lies in the fact that it allows to reduce the computation time and the search area of the underlying distribution [ Delage and Ye , 2010 ; Ben-Tal and Nemirovski , 1998 ; Lam , 2018 ] . Different methods have been proposed to construct uncertainty sets . Among them , one considers the help of OT operators and defines the set with all the probability measures such as the p-Wasserstein distance from the observed distribution is less than a given constant ( p-Wasserstein ball ) [ Blanchet and Murthy , 2019 ] . Some works have started to study p-Wasserstein DRO in the case of adversarial examples . Zheng et al . [ 2019 ] defines Distributionally Adversarial Attacks ( DAA ) which is a generalization of PGD attacks on the space of probability measures with W2-DRO and [ Staib and Jegelka , 2017 ] did the Wp-DRO generalization of AT . E.Wong et al . [ 2019 ] also considers the Wp ball using an explicit formulation of the uncertainty set with coupling matrices . However , while the previous works modified the AT problem—the Wp constraint on the adversarial distribution does not correspond to the distribution of adversarial examples computed in AT—our work aims at overcoming that . The original AT problem stays a the scale of the example and considers OT to deal with the displacement of pixels . This perspective leads to the discovery that the standard AT problem corresponds to an∞-Wasserstein DRO problem with the ` ∞ underlying geometry . In the meantime , as in our paper , entropic regularization is used to find closed forms of the coupling matrix . To extend this understanding of adversarial examples in the case of distributions we generalize this uncertainty set with the ∞-∞-Wasserstein distance and add entropic regularization . 2-∞- Wasserstein DRO has already started to receive consideration in the case of AT [ Gao et al. , 2017 ] . Nevertheless , the use of the ` ∞ within the∞-Wasserstein distance allows both to consider the DRO problem at the dataset scale but also to ensure that the adversarial condition is respected for each element of the adversarial distribution . Together with the use of coupling matrices in our formulation , we found a concave and tractable formulation of our problem which results in a different technique to sample from this distribution ( namely Langevin Monte Carlo ) . Finally , we propose to keep them in memory to reuse the past samples for the update of the robust classifier . Notations . In this work , we will consider a measurable finite dimensional input space X ⊂ Rd . We will note B ( X ) the Borel σ-algebra of X andM ( X ) 1+ the set of all probability measures on X . If not precised , a map T : X → X is considered measurable . We , recall that given a separable metric space X s.t . any probability measure on X is a Radon measure , for T : X → X , the push-forward measure of β = T ] α ∈ M ( X ) 1+ of some α ∈ M ( X ) 1+ satisfies : ∀h ∈ C ( X ) , ∫ X h ( x̃ ) dβ ( x̃ ) =∫ X h ( T ( x ) ) dα ( x ) . 2 ADVERSARIAL TRAINING , TRANSPORT , AND DISTRIBUTIONAL ROBUSTNESS . In this work , we say that x̃ ∈ X is an adversarial example of f at the data point ( x , y ) if ‖x̃−x‖∞ ≤ [ Goodfellow et al. , 2014 ] . Given a loss function ` , an optimal adversarial example x̃ aims at maximizing the following optimization problem : x̃ ∈ arg max ‖x̃−x‖∞≤ ` ( fθ ( x̃ ) , y ) . ( 3 ) In practice , a large value for ` ( fθ ( x̃ ) , y ) will yield a misclassification of the example y . By considering the adversarial training problem ( 1 ) , one can notice that the distribution of input-output pairs seen by the classifier fθ depends on the value of its own parameters . We will call this distribution padv . Such a distribution can be described as the pushforward of a transport map T that respect the adversarial example constraint ‖T ( x ) − x‖∞ ≤ , ∀x ∈ X . In other words we have , padv = T ] pdata : ( x̃ , y ) ∼ padv ⇔ ∃ ( x , y ) ∼ pdata s.t . x̃ = T ( x ) and ‖x̃− x‖∞ ≤ . ( 4 ) This remark leads us to our first proposition that explicitly proposes a distributional robust optimization ( DRO ) formulation of the adversarial training problem . Proposition 2.1 ( DRO formulation of adversarial training ) . The adversarial training problem ( 1 ) can be formulated as a DRO problem ( 2 ) where : P = { padv : ∃T : X → X , padv = T ] pdata and ‖T ( x ) − x‖∞ ≤ , ∀x ∈ X } ( 5 ) Interestingly , one can draw parallels with Monge ’ s formulation of optimal transport ( OT ) , were given an initial measure µ and a target measure ν , the task is to solve the following problem inf T ∫ X c ( x , T ( x ) ) dµ ( x ) subject to ν = T ] µ . ( 6 ) On the one hand , ( 6 ) and the DRO problem defined in Proposition 2.1 are drastically different problems in essence . It can be explained by the difference between the constraints on the transportation map and the fact that while Equation 6 aims at minimizing a function of the transportation map T , Equation 2 aims at maximizing a function of the transported distribution padv . On the other hand , it is insightful to notice how both problems depend on a set of transportation maps to connect the initial and the target distributions . The limitations of Monge ’ s problem are well known in the OT community : due to its non-linear constraint , the problem is often intractable and may not have a solution ( i.e . the infimum may not be achieved ) . That is why Kantorovich [ 1940 ] , proposed to relax ( 6 ) into a problem with linear constraints by considering coupling measures ( an approach that allows a mass splitting from a natural example xi to different locations x̃j ) . Such a relaxation had the advantage to provide a better understanding of the original problem leading to novel theoretical guarantees ( e.g. , the existence of solutions for Kantorovich ’ s problem , duality , and in some situations equality between Monge ’ s problem and Kantorovich ’ s problem ) as well as tractable algorithms [ Sinkhorn , 1964 ; Cuturi , 2013b ] . In a similar vein , we believe our perspective on adversarial examples that combine ideas from distributional robustness and adversarial transport leads to a better understanding of the problem of adversarial training . Thus , we will use that insight to consider coupling measures to relax the adversarial training problem ( 1 ) . It will lead to a new DRO formulation for adversarial training that we call adversarial transport . | This paper establishes the equivalence between the adversarial training problem (under infinity-norm) and the Distributionally robust optimization (DRO) problem with \infty-\infty-Wasserstein distance. Then they propose to use an entropic regularizer to find the regularized optimal adversarial distribution more efficiently. Numerical results on MNIST and CIFAR-10 validate the performance of the proposed method. | SP:b6ec707ce6c9e1e71fc7454d9101a76fdf69b555 |
ProtoRes: Proto-Residual Network for Pose Authoring via Learned Inverse Kinematics | 1 INTRODUCTION . Modeling human pose and learning pose representations have received increasing attention recently due to their prominence in applications , such as computer graphics and animation ( Harvey et al. , 2020 ; Xu et al. , 2020 ) ; immersive augmented reality ( Facebook Reality Labs , 2021 ; Capece et al. , 2018 ; Lin , 2019 ; Yang et al. , 2021 ) ; entertainment ( McDonald , 2018 ; Xpire , 2019 ) ; sports and wellness ( Rosenhahn et al. , 2008 ; Kim et al. , 2021 ) as well as human machine interaction ( Heindl et al. , 2019 ; Casillas-Perez et al. , 2016 ; Schwarz et al. , 2014 ) and autonomous driving ( Kumar et al. , 2021 ) . In the gaming industry , state-of-the-art real-time pose manipulation tools , such as CCD ( Kenwright , 2012 ) , FABRIK ( Aristidou & Lasenby , 2011 ) or FinalIK ( RootMotion , 2020 ) , are popular for rapid execution and rely on forward and inverse kinematics models defined via non-learnable kinematic equations . Inverse kinematics ( IK ) is the process of computing the internal geometric parameters of a kinematic system resulting in the desired configuration ( e.g . global positions ) of system ’ s joints ( Paul , 1992 ) . Forward kinematics ( FK ) refers to the use of the kinematic equations to compute the positions of joints from specified values of internal geometric parameters . While being mathematically accurate , non-learnable IK models do not attempt reconstructing plausible human poses from underconstrained solutions derived from sparse constraints ( e.g . positions of a small subset of joints ) . In this paper we develop a neural modeling approach to reconstruct full human pose from a sparse set of constraints supplied by a user , in the context of pose authoring and game development . We bridge the gap between skeleton-aware human pose representation based on IK/FK ideas and the neural embedding of human pose . Our approach effectively implements a learnable model for skeleton IK , mapping desired joint configuration into predictions of skeleton internal parameters ( local rotations ) , learning the statistics of natural poses using datasets derived from high-quality motion capture ( MOCAP ) sequences . The approach , which we call ProtoRes , models the semantics of joints and their interactions using a novel prototypical residual neural network architecture . Inspired by prototypical networks , which showed that one semantic class can be represented by the prototype ( mean ) of a few examples ( Snell et al. , 2017 ) , we extend it using a multi-block residual approach : the final pose embedding is a mean across embeddings of sparse constraints and across partial pose predictions produced in each block . We show that in terms of the pose reconstruction accuracy , ProtoRes outperforms existing gaming industry tools such as FinalIK , as well as out-of-the-box machine-learning solution based on Transformer ( Vaswani et al. , 2017 ) , which also happens to be 10 times less effective in terms of training speed than the proposed architecture . ∗All authors are with Unity Labs ; correspondence to : B.N . Oreshkin , boris.oreshkin @ gmail.com Finally , we develop user-facing tools that integrate learned ProtoRes pose representation in the Unity game engine ( see Fig . 1 ) . This provides convincing qualitative examples of solutions to the problem of the AI assisted human pose authoring . At the qualitative level , getting traditional workflows to behave the way ProtoRes does would require one to use many techniques in tandem , including IK , FK , layered animation pose libraries , along with procedural rigs encoding explicit heuristics . The process would be highly labor-intensive even for an experienced user while the results would still be of variable fidelity depending on their skill . This is because traditional rigs have no bias towards realistic poses and only allow exploring a limited linear latent space defined by uniform interpolation of a heuristic constraint system . ProtoRes forms a foundation that allows any junior or indie/studio user to bypass these existing complexities and create entirely new workflows for meaningfully exploring learned latent space using a familiar yet far more powerful way . We believe that our model and tools will help speed up the animation process , simplify and democratize game development . 1.1 BACKGROUND Figure 1 : ProtoRes completes full human pose using an arbitrary combination of 3D coordinates , look-at targets and world-space rotations specified by a user . The animation is best viewed in Adobe Reader . We consider the full-body pose authoring animation task depicted in Fig . 1 . The animator provides a few inputs , which we call effectors , that the target pose has to respect . For example , the look-at effector specifies that the head should be facing a specific direction , the positional effectors pin some joints to specific locations in global space and rotational effectors constrain the world-space rotations of certain joints . We assume that the animator can generate arbitrary number of such effectors placed on any skeletal joint ( one joint can be driven by more than one effector ) . The task of the model is to combine all the information provided via effectors and gen- erate a plausible full-body pose respecting provided effector constraints . We define the full-body pose as the set of all kinematic parameters necessary to recreate the appearance of the body in 3D . We assume that each effector can be represented in the space Rdeff , where deff is taken to be maximum over all effector types . Suppose we have 3D position and 6D rotation effectors : deff is 6 . In position effectors , 3 extra values are 0 . We formulate the pose authoring problem as learning the mapping ϒθ : RN×deff → Rdkin with learnable parameters θ ∈Θ . ϒθ maps the input space RN×deff of variable dimensionality N ( the number of effectors is not known apriori ) to the space Rdkin , containing all kinematic parameters to reconstruct full-body pose . A body with J joints can be fully defined using a tree model with 6D local rotation per joint and 3D coordinate for the root joint , in which case dkin = 6J+3 , assuming fixed bone lengths . Given a dataset D= { xi , yi } Mi=1 of poses containing pairs of inputs xi ∈ RN×deff and outputs yi ∈ Rdkin , ϒθ can be learned by minimizing empirical risk : ϒθ = argmin θ∈Θ 1 M ∑xi , yi∈D L ( ϒθ ( xi ) , yi ) ( 1 ) 1.2 RELATED WORK . Joint representations . Representing pose via 3D joint coordinates ( Cheng et al. , 2021 ; Cai et al. , 2019 ; Khapugin & Grishanin , 2019 ) is sub-optimal as it does not enforce fixed-length bones , nor specifies joint rotations . Predicting joint rotations automatically satisfies bone length constraints and adequately models rotations ( Pavllo et al. , 2018 ) , which is crucial in downstream applications , such as deforming a 3D mesh on top of the skeleton , to avoid unrealistic twisting . This is viable via skeleton representations based on Euler angles ( Han et al. , 2017 ) , rotation matrices ( Zhang et al. , 2018 ) and quaternions ( Pavllo et al. , 2018 ) . In this work , we use the two-row 6D rotation matrix representation that addresses the continuity issues reminiscent of the other representations ( Zhou et al. , 2019 ) . Pose modeling architectures . Multi-Layer Perceptrons ( MLPs ) ( Cho & Chen , 2014 ; Khapugin & Grishanin , 2019 ; Mirzaei et al. , 2020 ) and kernel methods ( Grochow et al. , 2004 ; Holden et al. , 2015 ) have been used to learn single pose representations . Beyond single pose , skeleton moving through time can be modeled as a spatio-temporal graph ( Jain et al. , 2016 ) or as a graph convolution ( Yan et al. , 2018 ; Mirzaei et al. , 2020 ) . A common limitation of these approaches is their reliance on a fixed set of inputs , whereas our architecture is specifically designed to handle sparse variable inputs . Pose prediction from sparse constraints . Real-time methods based on nearest-neighbor search , local dynamics and motion matching have been used on sparse marker position and accelerometer data ( Tautges et al. , 2011 ; Riaz et al. , 2015 ; Chai & Hodgins , 2005 ; Büttner & Clavet , 2015 ) . MLPs and RNNs have been used for real-time processing of sparse signals such as accelerometers ( Huang et al. , 2018 ; Holden et al. , 2017 ; Starke et al. , 2020 ; Lee et al. , 2018 ) and VR constraints ( Lin , 2019 ; Yang et al. , 2021 ) . These approaches rely on the past pose information to disambiguate next frame prediction and as such are not applicable to our problem , in which only current pose constraints are available . Iterative IK algorithms such as FinalIK ( RootMotion , 2020 ) have been popular in real-time applications . FinalIK works by setting up multiple IK chains for each limb of the body of a predefined human skeleton and for a fixed set of effectors . Several iterations are executed to solve each of these chains using a conventional bone chain IK method , e.g . CCD . In FinalIK , the end effector ( hands and feet ) can be positioned and rotated , while mid-effectors ( shoulders and thighs ) can only be positioned . Effectors can have a widespread effect on the body via a hand-crafted pulling mechanism that gives a different weight to each chain . This and similar tools suffer from limited realism when used for human full-body IK , as they are not data-driven . Learning-based methods strive to alleviate this by providing learned model of human pose . Grochow et al . ( 2004 ) proposed a kernel based method for learning a pose latent space in order to produce the most likely pose satisfying sparse effector constraints via online constrained optimization . The more recent commercial tool Cascadeur uses a cascade of several MLPs ( each dealing with fixed set of positional effectors : 6 , 16 , 28 ) to progressively produce all joint positions without respecting bone constraints ( Khapugin & Grishanin , 2019 ; Cascadeur , 2019 ) . Unlike our approach , Cascadeur can not handle arbitrary effector combinations , rotation or look-at constraints and requires post processing to respect bone constraints . Permutation invariant architectures . Models for encoding unstructured variable inputs have been proposed in various contexts . Attention models ( Bahdanau et al. , 2015 ) and Transformer ( Vaswani et al. , 2017 ) have been proposed in the context of natural language processing . Prototypical networks ( Snell et al. , 2017 ) used average pooled embedding to encode semantic classes via a few support images in the context of few-shot image classification . Maxpool representations over variable input dimension were proposed by Qi et al . ( 2017 ) as PointNet and Zaheer et al . ( 2017 ) as DeepSets for segmentation and classification of 3D point clouds , image tagging , set anomaly detection and text concept retrieval . Niemeyer et al . ( 2019 ) further generalized the PointNet by chaining the basic maxpool/concat PointNet blocks resulting in ResPointNet architecture . 1.3 SUMMARY OF CONTRIBUTIONS . The contributions of our paper can be summarized as follows . • We define the 3D character posing task and publicly release two associated benchmarks . • We show that a learned inverse kinematics solution can construct better poses , qualitatively and quantitatively , compared to a non-learned approach . • We extend existing architectures with ( i ) semantic conditioning of joint ID and type at the input , ( ii ) novel residual scheme involving prototype subtraction and accumulation across blocks , as opposed to maxpool/concat daisy chain of ResPointNet , ( iii ) two-stage architecture with computationally efficient residual decoder that improves accuracy at smaller computational cost , as opposed to the naive final linear projection approach of PointNet and ResPointNet , and ( iv ) two-stage decoder design . • We propose a novel look-at loss function and a novel randomized weighting scheme combining randomly generated effector tolerance levels and effector noise to increase the effectiveness of multi-task training . | This paper develops a system to generate a complete and realistic human pose based on a sparse set of inputs such as look-at direction and end-effector positions. It proposes a prototypical residual network dubbed " ProtoRes" to handle variable input length based on the user-specified parameters. A look-at-loss, randomized weighting scheme, and two datasets based on MoCap are proposed to learn the designed system, and a usable system for authoring realistic human poses is built. Experiments show that the network design and loss outperform baselines such as Transformer and existing Inverse Kinematics methods. The graphical demo built inside Unity also showcases the utility of the learned pose networks. | SP:e656b8532b9fd990c498b986f8ec39254bee1680 |
ProtoRes: Proto-Residual Network for Pose Authoring via Learned Inverse Kinematics | 1 INTRODUCTION . Modeling human pose and learning pose representations have received increasing attention recently due to their prominence in applications , such as computer graphics and animation ( Harvey et al. , 2020 ; Xu et al. , 2020 ) ; immersive augmented reality ( Facebook Reality Labs , 2021 ; Capece et al. , 2018 ; Lin , 2019 ; Yang et al. , 2021 ) ; entertainment ( McDonald , 2018 ; Xpire , 2019 ) ; sports and wellness ( Rosenhahn et al. , 2008 ; Kim et al. , 2021 ) as well as human machine interaction ( Heindl et al. , 2019 ; Casillas-Perez et al. , 2016 ; Schwarz et al. , 2014 ) and autonomous driving ( Kumar et al. , 2021 ) . In the gaming industry , state-of-the-art real-time pose manipulation tools , such as CCD ( Kenwright , 2012 ) , FABRIK ( Aristidou & Lasenby , 2011 ) or FinalIK ( RootMotion , 2020 ) , are popular for rapid execution and rely on forward and inverse kinematics models defined via non-learnable kinematic equations . Inverse kinematics ( IK ) is the process of computing the internal geometric parameters of a kinematic system resulting in the desired configuration ( e.g . global positions ) of system ’ s joints ( Paul , 1992 ) . Forward kinematics ( FK ) refers to the use of the kinematic equations to compute the positions of joints from specified values of internal geometric parameters . While being mathematically accurate , non-learnable IK models do not attempt reconstructing plausible human poses from underconstrained solutions derived from sparse constraints ( e.g . positions of a small subset of joints ) . In this paper we develop a neural modeling approach to reconstruct full human pose from a sparse set of constraints supplied by a user , in the context of pose authoring and game development . We bridge the gap between skeleton-aware human pose representation based on IK/FK ideas and the neural embedding of human pose . Our approach effectively implements a learnable model for skeleton IK , mapping desired joint configuration into predictions of skeleton internal parameters ( local rotations ) , learning the statistics of natural poses using datasets derived from high-quality motion capture ( MOCAP ) sequences . The approach , which we call ProtoRes , models the semantics of joints and their interactions using a novel prototypical residual neural network architecture . Inspired by prototypical networks , which showed that one semantic class can be represented by the prototype ( mean ) of a few examples ( Snell et al. , 2017 ) , we extend it using a multi-block residual approach : the final pose embedding is a mean across embeddings of sparse constraints and across partial pose predictions produced in each block . We show that in terms of the pose reconstruction accuracy , ProtoRes outperforms existing gaming industry tools such as FinalIK , as well as out-of-the-box machine-learning solution based on Transformer ( Vaswani et al. , 2017 ) , which also happens to be 10 times less effective in terms of training speed than the proposed architecture . ∗All authors are with Unity Labs ; correspondence to : B.N . Oreshkin , boris.oreshkin @ gmail.com Finally , we develop user-facing tools that integrate learned ProtoRes pose representation in the Unity game engine ( see Fig . 1 ) . This provides convincing qualitative examples of solutions to the problem of the AI assisted human pose authoring . At the qualitative level , getting traditional workflows to behave the way ProtoRes does would require one to use many techniques in tandem , including IK , FK , layered animation pose libraries , along with procedural rigs encoding explicit heuristics . The process would be highly labor-intensive even for an experienced user while the results would still be of variable fidelity depending on their skill . This is because traditional rigs have no bias towards realistic poses and only allow exploring a limited linear latent space defined by uniform interpolation of a heuristic constraint system . ProtoRes forms a foundation that allows any junior or indie/studio user to bypass these existing complexities and create entirely new workflows for meaningfully exploring learned latent space using a familiar yet far more powerful way . We believe that our model and tools will help speed up the animation process , simplify and democratize game development . 1.1 BACKGROUND Figure 1 : ProtoRes completes full human pose using an arbitrary combination of 3D coordinates , look-at targets and world-space rotations specified by a user . The animation is best viewed in Adobe Reader . We consider the full-body pose authoring animation task depicted in Fig . 1 . The animator provides a few inputs , which we call effectors , that the target pose has to respect . For example , the look-at effector specifies that the head should be facing a specific direction , the positional effectors pin some joints to specific locations in global space and rotational effectors constrain the world-space rotations of certain joints . We assume that the animator can generate arbitrary number of such effectors placed on any skeletal joint ( one joint can be driven by more than one effector ) . The task of the model is to combine all the information provided via effectors and gen- erate a plausible full-body pose respecting provided effector constraints . We define the full-body pose as the set of all kinematic parameters necessary to recreate the appearance of the body in 3D . We assume that each effector can be represented in the space Rdeff , where deff is taken to be maximum over all effector types . Suppose we have 3D position and 6D rotation effectors : deff is 6 . In position effectors , 3 extra values are 0 . We formulate the pose authoring problem as learning the mapping ϒθ : RN×deff → Rdkin with learnable parameters θ ∈Θ . ϒθ maps the input space RN×deff of variable dimensionality N ( the number of effectors is not known apriori ) to the space Rdkin , containing all kinematic parameters to reconstruct full-body pose . A body with J joints can be fully defined using a tree model with 6D local rotation per joint and 3D coordinate for the root joint , in which case dkin = 6J+3 , assuming fixed bone lengths . Given a dataset D= { xi , yi } Mi=1 of poses containing pairs of inputs xi ∈ RN×deff and outputs yi ∈ Rdkin , ϒθ can be learned by minimizing empirical risk : ϒθ = argmin θ∈Θ 1 M ∑xi , yi∈D L ( ϒθ ( xi ) , yi ) ( 1 ) 1.2 RELATED WORK . Joint representations . Representing pose via 3D joint coordinates ( Cheng et al. , 2021 ; Cai et al. , 2019 ; Khapugin & Grishanin , 2019 ) is sub-optimal as it does not enforce fixed-length bones , nor specifies joint rotations . Predicting joint rotations automatically satisfies bone length constraints and adequately models rotations ( Pavllo et al. , 2018 ) , which is crucial in downstream applications , such as deforming a 3D mesh on top of the skeleton , to avoid unrealistic twisting . This is viable via skeleton representations based on Euler angles ( Han et al. , 2017 ) , rotation matrices ( Zhang et al. , 2018 ) and quaternions ( Pavllo et al. , 2018 ) . In this work , we use the two-row 6D rotation matrix representation that addresses the continuity issues reminiscent of the other representations ( Zhou et al. , 2019 ) . Pose modeling architectures . Multi-Layer Perceptrons ( MLPs ) ( Cho & Chen , 2014 ; Khapugin & Grishanin , 2019 ; Mirzaei et al. , 2020 ) and kernel methods ( Grochow et al. , 2004 ; Holden et al. , 2015 ) have been used to learn single pose representations . Beyond single pose , skeleton moving through time can be modeled as a spatio-temporal graph ( Jain et al. , 2016 ) or as a graph convolution ( Yan et al. , 2018 ; Mirzaei et al. , 2020 ) . A common limitation of these approaches is their reliance on a fixed set of inputs , whereas our architecture is specifically designed to handle sparse variable inputs . Pose prediction from sparse constraints . Real-time methods based on nearest-neighbor search , local dynamics and motion matching have been used on sparse marker position and accelerometer data ( Tautges et al. , 2011 ; Riaz et al. , 2015 ; Chai & Hodgins , 2005 ; Büttner & Clavet , 2015 ) . MLPs and RNNs have been used for real-time processing of sparse signals such as accelerometers ( Huang et al. , 2018 ; Holden et al. , 2017 ; Starke et al. , 2020 ; Lee et al. , 2018 ) and VR constraints ( Lin , 2019 ; Yang et al. , 2021 ) . These approaches rely on the past pose information to disambiguate next frame prediction and as such are not applicable to our problem , in which only current pose constraints are available . Iterative IK algorithms such as FinalIK ( RootMotion , 2020 ) have been popular in real-time applications . FinalIK works by setting up multiple IK chains for each limb of the body of a predefined human skeleton and for a fixed set of effectors . Several iterations are executed to solve each of these chains using a conventional bone chain IK method , e.g . CCD . In FinalIK , the end effector ( hands and feet ) can be positioned and rotated , while mid-effectors ( shoulders and thighs ) can only be positioned . Effectors can have a widespread effect on the body via a hand-crafted pulling mechanism that gives a different weight to each chain . This and similar tools suffer from limited realism when used for human full-body IK , as they are not data-driven . Learning-based methods strive to alleviate this by providing learned model of human pose . Grochow et al . ( 2004 ) proposed a kernel based method for learning a pose latent space in order to produce the most likely pose satisfying sparse effector constraints via online constrained optimization . The more recent commercial tool Cascadeur uses a cascade of several MLPs ( each dealing with fixed set of positional effectors : 6 , 16 , 28 ) to progressively produce all joint positions without respecting bone constraints ( Khapugin & Grishanin , 2019 ; Cascadeur , 2019 ) . Unlike our approach , Cascadeur can not handle arbitrary effector combinations , rotation or look-at constraints and requires post processing to respect bone constraints . Permutation invariant architectures . Models for encoding unstructured variable inputs have been proposed in various contexts . Attention models ( Bahdanau et al. , 2015 ) and Transformer ( Vaswani et al. , 2017 ) have been proposed in the context of natural language processing . Prototypical networks ( Snell et al. , 2017 ) used average pooled embedding to encode semantic classes via a few support images in the context of few-shot image classification . Maxpool representations over variable input dimension were proposed by Qi et al . ( 2017 ) as PointNet and Zaheer et al . ( 2017 ) as DeepSets for segmentation and classification of 3D point clouds , image tagging , set anomaly detection and text concept retrieval . Niemeyer et al . ( 2019 ) further generalized the PointNet by chaining the basic maxpool/concat PointNet blocks resulting in ResPointNet architecture . 1.3 SUMMARY OF CONTRIBUTIONS . The contributions of our paper can be summarized as follows . • We define the 3D character posing task and publicly release two associated benchmarks . • We show that a learned inverse kinematics solution can construct better poses , qualitatively and quantitatively , compared to a non-learned approach . • We extend existing architectures with ( i ) semantic conditioning of joint ID and type at the input , ( ii ) novel residual scheme involving prototype subtraction and accumulation across blocks , as opposed to maxpool/concat daisy chain of ResPointNet , ( iii ) two-stage architecture with computationally efficient residual decoder that improves accuracy at smaller computational cost , as opposed to the naive final linear projection approach of PointNet and ResPointNet , and ( iv ) two-stage decoder design . • We propose a novel look-at loss function and a novel randomized weighting scheme combining randomly generated effector tolerance levels and effector noise to increase the effectiveness of multi-task training . | This paper focuses on the learnable neural representation of the 3D human pose. A proto-residual network is proposed to construct a full human pose from sparse body part constraints. Several modifications are performed to improve the accuracy of the proposed model, such as look-at loss, two-stage decoder, residual scheme, etc. In the experiment, two new datasets for the static human pose modeling task are conducted and will be released publicly. The experimental results prove the effectiveness of the proposed methods. | SP:e656b8532b9fd990c498b986f8ec39254bee1680 |
ProtoRes: Proto-Residual Network for Pose Authoring via Learned Inverse Kinematics | 1 INTRODUCTION . Modeling human pose and learning pose representations have received increasing attention recently due to their prominence in applications , such as computer graphics and animation ( Harvey et al. , 2020 ; Xu et al. , 2020 ) ; immersive augmented reality ( Facebook Reality Labs , 2021 ; Capece et al. , 2018 ; Lin , 2019 ; Yang et al. , 2021 ) ; entertainment ( McDonald , 2018 ; Xpire , 2019 ) ; sports and wellness ( Rosenhahn et al. , 2008 ; Kim et al. , 2021 ) as well as human machine interaction ( Heindl et al. , 2019 ; Casillas-Perez et al. , 2016 ; Schwarz et al. , 2014 ) and autonomous driving ( Kumar et al. , 2021 ) . In the gaming industry , state-of-the-art real-time pose manipulation tools , such as CCD ( Kenwright , 2012 ) , FABRIK ( Aristidou & Lasenby , 2011 ) or FinalIK ( RootMotion , 2020 ) , are popular for rapid execution and rely on forward and inverse kinematics models defined via non-learnable kinematic equations . Inverse kinematics ( IK ) is the process of computing the internal geometric parameters of a kinematic system resulting in the desired configuration ( e.g . global positions ) of system ’ s joints ( Paul , 1992 ) . Forward kinematics ( FK ) refers to the use of the kinematic equations to compute the positions of joints from specified values of internal geometric parameters . While being mathematically accurate , non-learnable IK models do not attempt reconstructing plausible human poses from underconstrained solutions derived from sparse constraints ( e.g . positions of a small subset of joints ) . In this paper we develop a neural modeling approach to reconstruct full human pose from a sparse set of constraints supplied by a user , in the context of pose authoring and game development . We bridge the gap between skeleton-aware human pose representation based on IK/FK ideas and the neural embedding of human pose . Our approach effectively implements a learnable model for skeleton IK , mapping desired joint configuration into predictions of skeleton internal parameters ( local rotations ) , learning the statistics of natural poses using datasets derived from high-quality motion capture ( MOCAP ) sequences . The approach , which we call ProtoRes , models the semantics of joints and their interactions using a novel prototypical residual neural network architecture . Inspired by prototypical networks , which showed that one semantic class can be represented by the prototype ( mean ) of a few examples ( Snell et al. , 2017 ) , we extend it using a multi-block residual approach : the final pose embedding is a mean across embeddings of sparse constraints and across partial pose predictions produced in each block . We show that in terms of the pose reconstruction accuracy , ProtoRes outperforms existing gaming industry tools such as FinalIK , as well as out-of-the-box machine-learning solution based on Transformer ( Vaswani et al. , 2017 ) , which also happens to be 10 times less effective in terms of training speed than the proposed architecture . ∗All authors are with Unity Labs ; correspondence to : B.N . Oreshkin , boris.oreshkin @ gmail.com Finally , we develop user-facing tools that integrate learned ProtoRes pose representation in the Unity game engine ( see Fig . 1 ) . This provides convincing qualitative examples of solutions to the problem of the AI assisted human pose authoring . At the qualitative level , getting traditional workflows to behave the way ProtoRes does would require one to use many techniques in tandem , including IK , FK , layered animation pose libraries , along with procedural rigs encoding explicit heuristics . The process would be highly labor-intensive even for an experienced user while the results would still be of variable fidelity depending on their skill . This is because traditional rigs have no bias towards realistic poses and only allow exploring a limited linear latent space defined by uniform interpolation of a heuristic constraint system . ProtoRes forms a foundation that allows any junior or indie/studio user to bypass these existing complexities and create entirely new workflows for meaningfully exploring learned latent space using a familiar yet far more powerful way . We believe that our model and tools will help speed up the animation process , simplify and democratize game development . 1.1 BACKGROUND Figure 1 : ProtoRes completes full human pose using an arbitrary combination of 3D coordinates , look-at targets and world-space rotations specified by a user . The animation is best viewed in Adobe Reader . We consider the full-body pose authoring animation task depicted in Fig . 1 . The animator provides a few inputs , which we call effectors , that the target pose has to respect . For example , the look-at effector specifies that the head should be facing a specific direction , the positional effectors pin some joints to specific locations in global space and rotational effectors constrain the world-space rotations of certain joints . We assume that the animator can generate arbitrary number of such effectors placed on any skeletal joint ( one joint can be driven by more than one effector ) . The task of the model is to combine all the information provided via effectors and gen- erate a plausible full-body pose respecting provided effector constraints . We define the full-body pose as the set of all kinematic parameters necessary to recreate the appearance of the body in 3D . We assume that each effector can be represented in the space Rdeff , where deff is taken to be maximum over all effector types . Suppose we have 3D position and 6D rotation effectors : deff is 6 . In position effectors , 3 extra values are 0 . We formulate the pose authoring problem as learning the mapping ϒθ : RN×deff → Rdkin with learnable parameters θ ∈Θ . ϒθ maps the input space RN×deff of variable dimensionality N ( the number of effectors is not known apriori ) to the space Rdkin , containing all kinematic parameters to reconstruct full-body pose . A body with J joints can be fully defined using a tree model with 6D local rotation per joint and 3D coordinate for the root joint , in which case dkin = 6J+3 , assuming fixed bone lengths . Given a dataset D= { xi , yi } Mi=1 of poses containing pairs of inputs xi ∈ RN×deff and outputs yi ∈ Rdkin , ϒθ can be learned by minimizing empirical risk : ϒθ = argmin θ∈Θ 1 M ∑xi , yi∈D L ( ϒθ ( xi ) , yi ) ( 1 ) 1.2 RELATED WORK . Joint representations . Representing pose via 3D joint coordinates ( Cheng et al. , 2021 ; Cai et al. , 2019 ; Khapugin & Grishanin , 2019 ) is sub-optimal as it does not enforce fixed-length bones , nor specifies joint rotations . Predicting joint rotations automatically satisfies bone length constraints and adequately models rotations ( Pavllo et al. , 2018 ) , which is crucial in downstream applications , such as deforming a 3D mesh on top of the skeleton , to avoid unrealistic twisting . This is viable via skeleton representations based on Euler angles ( Han et al. , 2017 ) , rotation matrices ( Zhang et al. , 2018 ) and quaternions ( Pavllo et al. , 2018 ) . In this work , we use the two-row 6D rotation matrix representation that addresses the continuity issues reminiscent of the other representations ( Zhou et al. , 2019 ) . Pose modeling architectures . Multi-Layer Perceptrons ( MLPs ) ( Cho & Chen , 2014 ; Khapugin & Grishanin , 2019 ; Mirzaei et al. , 2020 ) and kernel methods ( Grochow et al. , 2004 ; Holden et al. , 2015 ) have been used to learn single pose representations . Beyond single pose , skeleton moving through time can be modeled as a spatio-temporal graph ( Jain et al. , 2016 ) or as a graph convolution ( Yan et al. , 2018 ; Mirzaei et al. , 2020 ) . A common limitation of these approaches is their reliance on a fixed set of inputs , whereas our architecture is specifically designed to handle sparse variable inputs . Pose prediction from sparse constraints . Real-time methods based on nearest-neighbor search , local dynamics and motion matching have been used on sparse marker position and accelerometer data ( Tautges et al. , 2011 ; Riaz et al. , 2015 ; Chai & Hodgins , 2005 ; Büttner & Clavet , 2015 ) . MLPs and RNNs have been used for real-time processing of sparse signals such as accelerometers ( Huang et al. , 2018 ; Holden et al. , 2017 ; Starke et al. , 2020 ; Lee et al. , 2018 ) and VR constraints ( Lin , 2019 ; Yang et al. , 2021 ) . These approaches rely on the past pose information to disambiguate next frame prediction and as such are not applicable to our problem , in which only current pose constraints are available . Iterative IK algorithms such as FinalIK ( RootMotion , 2020 ) have been popular in real-time applications . FinalIK works by setting up multiple IK chains for each limb of the body of a predefined human skeleton and for a fixed set of effectors . Several iterations are executed to solve each of these chains using a conventional bone chain IK method , e.g . CCD . In FinalIK , the end effector ( hands and feet ) can be positioned and rotated , while mid-effectors ( shoulders and thighs ) can only be positioned . Effectors can have a widespread effect on the body via a hand-crafted pulling mechanism that gives a different weight to each chain . This and similar tools suffer from limited realism when used for human full-body IK , as they are not data-driven . Learning-based methods strive to alleviate this by providing learned model of human pose . Grochow et al . ( 2004 ) proposed a kernel based method for learning a pose latent space in order to produce the most likely pose satisfying sparse effector constraints via online constrained optimization . The more recent commercial tool Cascadeur uses a cascade of several MLPs ( each dealing with fixed set of positional effectors : 6 , 16 , 28 ) to progressively produce all joint positions without respecting bone constraints ( Khapugin & Grishanin , 2019 ; Cascadeur , 2019 ) . Unlike our approach , Cascadeur can not handle arbitrary effector combinations , rotation or look-at constraints and requires post processing to respect bone constraints . Permutation invariant architectures . Models for encoding unstructured variable inputs have been proposed in various contexts . Attention models ( Bahdanau et al. , 2015 ) and Transformer ( Vaswani et al. , 2017 ) have been proposed in the context of natural language processing . Prototypical networks ( Snell et al. , 2017 ) used average pooled embedding to encode semantic classes via a few support images in the context of few-shot image classification . Maxpool representations over variable input dimension were proposed by Qi et al . ( 2017 ) as PointNet and Zaheer et al . ( 2017 ) as DeepSets for segmentation and classification of 3D point clouds , image tagging , set anomaly detection and text concept retrieval . Niemeyer et al . ( 2019 ) further generalized the PointNet by chaining the basic maxpool/concat PointNet blocks resulting in ResPointNet architecture . 1.3 SUMMARY OF CONTRIBUTIONS . The contributions of our paper can be summarized as follows . • We define the 3D character posing task and publicly release two associated benchmarks . • We show that a learned inverse kinematics solution can construct better poses , qualitatively and quantitatively , compared to a non-learned approach . • We extend existing architectures with ( i ) semantic conditioning of joint ID and type at the input , ( ii ) novel residual scheme involving prototype subtraction and accumulation across blocks , as opposed to maxpool/concat daisy chain of ResPointNet , ( iii ) two-stage architecture with computationally efficient residual decoder that improves accuracy at smaller computational cost , as opposed to the naive final linear projection approach of PointNet and ResPointNet , and ( iv ) two-stage decoder design . • We propose a novel look-at loss function and a novel randomized weighting scheme combining randomly generated effector tolerance levels and effector noise to increase the effectiveness of multi-task training . | This paper proposes a DNN-based framework to handle the challenging task of recovering 3D human poses (joint positions and local rotations) from sparse and variable user inputs (joint positions, orientations of a subset of whole body joints). The paper proposes a neural-network architecture with an encoder to extract pose encodings from partial user inputs and a decoder to generate complete poses from the encoded features. The paper further proposes two new datasets to train and evaluate the proposed models. Experimental results demonstrate the superiority of the proposed framework over previous methods. | SP:e656b8532b9fd990c498b986f8ec39254bee1680 |
Toward Efficient Low-Precision Training: Data Format Optimization and Hysteresis Quantization | 1 INTRODUCTION . Deep neural networks have been used in various fields such as vision , audio , natural language processing , and reinforcement learning . As larger and more complex neural networks are adopted , the energy and time consumed for training have become a critical issue in hardware implementation . Using low-bit representations in training significantly reduces hardware overhead and memory footprint ; hence , neural network training with limited precision has been extensively studied recently . For instance , 16-bit formats are already adopted in commercial devices such as FP16 ( IEEE , 2019 ) in NVidia GPU and bfloat16 ( Kalamkar et al. , 2019 ) in Google TPU ( Wang et al. , 2019 ) . Also , Köster et al . ( 2017 ) suggested a new data format using a shared exponent suitable for low-precision training . Recently , it has been demonstrated that even 8-bit formats could be adopted in deep neural network training with reasonable accuracy ( Sun et al. , 2019 ; Fox et al. , 2020 ) . However , there are various issues in realizing low-precision training in practical applications as detailed below . Optimal data format for low-precision training : Training performance is susceptible to the data format we use to represent variables in the network . When a value is represented using a floatingpoint format with a fixed number of bits , there is a trade-off between dynamic range and precision . For instance , allocating more bits to the exponent part in a floating-point format enlarges the dynamic range but lowers precision due to fewer bits in the mantissa part . Recent studies on 8-bit training suggest various ways to reduce the dynamic range required for number representation to enhance representation precision . Early work on 8-bit training ( Wang et al. , 2018 ) adopts a 5-bit exponent to represent different variables using a single format , but Sun et al . ( 2019 ) examine the statistics of each variable and optimize the numeric formats separately . Specifically , the values used in the forward path ( weight and activation ) have a relatively narrow dynamic range , and only 4 bits are allocated to the exponent . Fox et al . ( 2020 ) propose to divide data into smaller blocks and assign a shared exponent bias to each block . Since the values in a block tend to exhibit similar statistics , the forward ( weight and activation ) and backward ( error ) paths could be represented using only 2-bit and 4-bit exponents , respectively . Note that the shared exponent bias is effectively identical to the scaling factor . If a variable has a value of m · 2e and a shared exponent bias of b , then its actual value is m · 2e+bias , which is identical to the scaling factor of 2bias . However , these approaches are difficult to generalize since we should empirically decide numeric formats for each task , neural network structure , and quantization scheme ( Fig . 1 ) . Furthermore , analyzing the statistics of each variable is not enough to determine an optimal format . Their distributions often have a long tail , and hence the dynamic range of the numeric format should be experimentally selected through many trial-and-errors in actual training . Performance degradation in from-scratch training : Previous studies on quantized models show that a model could achieve comparable accuracy to full-precision models even using 1- or 2-bit weights ( Choi et al. , 2019 ; Martinez et al. , 2020 ) through fine-tuning a pre-trained model . However , in low-precision training where a neural network is trained from scratch using low-precision values and computations , the trained model typically shows a noticeable accuracy drop ( Elhoushi et al. , 2021 ) . Fig . 1 ( b ) shows the Top-1 validation accuracy of ResNet-18 ( He et al. , 2016 ) trained on ImageNet ( Deng et al. , 2009 ) for different training schemes . The weights are quantized into a 4- bit base-2 logarithmic format . From-scratch training of the model with quantized weights results in a 2.1 % accuracy drop , whereas only 1.0 % degradation is observed if we fine-tune a pre-trained model . This suggests that even though a better solution exists for a given format , it can not be reached through from-scratch training . To formalize the issues above , here we divide quantization in low-precision training into two types : network quantization and data flow quantization . Network quantization refers to the quantization of the neural network model . An example of this type of quantization is weight quantization . In network quantization , we need to reduce the performance difference between from-scratch training and fine-tuning ( Yang et al. , 2019b ) . On the other hand , data flow quantization refers to the on-the-fly quantization that occurs when data propagate through the network in low-precision training . Examples include activation , error , and weight gradient quantizations . Additional errors are introduced in weight update computation due to this type of quantization , which leads to performance degradation . Hence , we need to find an optimal format to minimize accuracy drop due to computation errors in data flow quantization . In this paper , we present a systematic approach to implementing low-precision training on various models and tasks . First , we present a method to efficiently find an optimal format for data flow quantization . In addition , we introduce a hysteresis quantization technique , a new quantization method for network quantization that can mitigate the issues of from-scratch training . Our main contributions are : • We present a method that can predict the training performance of various numeric formats for data flow quantization . This method allows us to determine an appropriate data format for different neural network structures , datasets , and tasks efficiently . • Using the method above , we propose an optimal 8-bit format suitable for low-precision training of various models , which enables quantization of BatchNorm layer input and improves hardware efficiency with minimal performance degradation . • We propose a new quantization scheme that utilizes the hysteresis effect to improve the performance of from-scratch training . This scheme enables ultra-low-precision training using 4-bit logarithmic weights . 2 DATA FLOW QUANTIZATION . 2.1 NUMERIC FORMATS . There are many numeric formats that can be constructed with n bits depending on how much dynamic range is required and how many valid bits are used for representing a value . For example , using 8 bits we could implement 8-bit fixed point integer format , 8-bit floating-point formats such as FP152 , FP143 , and FP125 ( FP1xy represents 1 sign bit , x exponent bits , y mantissa bits ) , 8-bit posit format ( Gustafson & Yonemoto , 2017 ) , and 8-bit float-fix format ( Han et al. , 2019 ) . Since the diversity of formats that could be formulated using n bits is nearly unlimited , here we assume some constraints to limit candidates while still including widely used formats such as fixed-point and floating-point formats as below : • The MSB ( Most Significant Bit ) is used as a sign bit and other bits represent magnitude . Accordingly , only symmetric formats that have identical representable ranges for positive and negative numbers are considered . Two ’ s complement representation is slightly asymmetric since it can represent one more negative value , but it does not incur a significant difference . • The number of valid bits of a larger value is greater than or equal to the number of valid bits of a smaller value . The valid bits stand for significant digits in binary representation . • The ratio between consecutive representable values does not exceed 2 . For example , the base-4 logarithmic format is excluded . We could obtain 166 8-bit formats that meet these constraints . Then , we reduce 1 and 2 valid bits in each format to obtain 7- and 6-bit formats , resulting in 498 formats in total . More information on the numeric formats considered in our experiments is provided in Appendix A.1 . 2.2 ACTIVATION AND ERROR QUANTIZATION . In a neural network consisting of n layers , the training process is described by Al+1 = fl ( W t l , Al ) ( 1 ) El = gl ( W t l , El+1 ) ( 2 ) Gwl = hl ( Al , El+1 ) ( 3 ) W t+1l = o ( Gwl , W t l ) ( 4 ) where A , E , W , and Gw are activation , error , weight , and weight gradient , respectively . f , g , h , and o are forward , backward , gradient , and update functions . l and t represent the layer number and time step . We follow the quantized training scheme suggested by Fox et al . ( 2020 ) , but with the following modifications to reduce hardware implementation costs . A and E are quantized not only for the GEMM input but also for the BatchNorm layer input . BatchNorm layer normalizes input using the mean and variance of each channel , but these values are obtained only after observing all the inputs from the previous layer , necessitating that all input values are temporarily stored in memory . Therefore , quantizing the BatchNorm layer ’ s input significantly reduces memory footprint and memory access overhead . Additionally , the scope of sharing exponent bias is extended to a layer ( Al and El ) to avoid the overhead of aligning partial sums from different blocks in block-wise exponent sharing . Finally , instead of determining the shared exponent bias by analyzing all values in the layer , we conservatively update it by detecting overflow and underutilization that occurred in the previous mini-batch . 2.3 INDICATORS OF TRAINING PERFORMANCE . Effect of quantized error : Quantizing the error E in the backward path is independent of how the forward path behaves since the loss surface of the model does not change . Therefore , the optimalW that the network needs to reach through training remains the same regardless of the error quantization scheme . However , when the error is quantized , a quantization error ∆E is introduced in E , which incurs a noiseN∆E inGw through the gradient function in Eq . 3 and potentially updates each weight in the wrong direction . While some amount of noise may improve the training performance through regularization , using low-precision formats already introduces a large noise in the network , incurring performance degradation ( see Appendix A.8 ) . Therefore , we suggest that the weight gradient error N∆E could be a good indicator of degradation in training performance . One way to implement this is predicting performance using the magnitude ofN∆E ; however , if the noise is in the same direction as Gw , it would only change the amount of each update and result in a less severe effect . Instead , we could measure the misalignment between Gw + N∆E and Gw for performance prediction . The misalignment between two vectors is estimated by ∠ ( A , B ) = cos−1 { A ·B ‖A‖2 · ‖B‖2 } ( 5 ) Then , the change in the update direction due to N∆E is ∠ ( Gw , Gw +N∆E ) . We can expect that the smaller ∠ ( Gw , Gw +N∆E ) , the better the training performance . Effect of quantized activation : Contrary to error quantization , activation quantization affects the way the forward path operates , and the loss surface of the model changes . Hence , the global optima of weight parameters shift , where the amount of shift would be proportional to the quantization noise . The displacement of global optima can be indirectly estimated using the direction of the weight gradients Gw . If the angle ∠ ( Gw , Gw + N∆A ) is small , the deviation of the global optima is expected to be small as well , suggesting a better training performance . In the discussions above , we assumed that the angles ∠ ( Gw , Gw +N∆E ) and ∠ ( Gw , Gw +N∆A ) could be used to predict training performance . We experimentally prove this by comparing the training performance of different numeric formats . For 498 numeric formats in 6 to 8 bits , we compare the loss obtained from training with the proposed performance indicators ( Fig . 2 ) . Training loss is obtained by training ResNet-18 on CIFAR-10 dataset using SGD with a momentum of 0.9 for 60 epochs . The batch size is 128 images and the initial learning rate is 0.1 , which is decayed by a cosine scheduler . We average angles from 100 mini-batches after quantizing a pre-trained model . Note that we use Gw of the first layer since it can reflect quantization errors that occur in the activations and errors of all the layers in the network . The weight gradients from the full-precision network , the network with quantized activations , and the network with quantized errors are Gw , Gw +N∆A , and GW +N∆E , respectively . Fig . 2 shows that using the misalignment angle results in not only a higher Spearman ’ s correlation but also a more distinct shape for low training losses , making it a better metric for data format selection . For instance , using the error magnitude would predict the best format for transformer incorrectly ( see Fig . 7 ( e ) in Appendix A.3 ) . While obtaining the misalignment angle requires additional computations , its overhead is negligible since the part that requires the most time and computation is to obtain Gw , Gw + ∆E , and Gw + N∆A , which is still significantly lower than actual training . Using this method , we could determine the optimal format for a specific neural network model , dataset , and task very efficiently as we only need to measure the misalignment angle without time-consuming network training . For experiments in Fig . 2 , the amount of computation is reduced by 99.6 % , and the reduction will be even larger for larger datasets and complex networks that need more epochs for training . | This paper proposes a method to find an optimal quantization format based on error angle estimation and hardware overhead. The authors also present an hysteresis-based quantization method to reduce fluctuation of exponent values such that training (from the scratch) using only 4-bit weights can result in negligible amount of accuracy degradation for ResNet-18 on ImageNet. Experimental results are provided for ResNet-18, MobileNetv2, 2-layer LSTM, Transformer, and MobileNetV2+SSDLite. For 8-bit quantization, FP134 is chosen and such quantization is also applied to BatchNorm layers to reduce memory consumption. | SP:8414a02496a42c03ca8ffd5f1f40cfaffc8d8292 |
Toward Efficient Low-Precision Training: Data Format Optimization and Hysteresis Quantization | 1 INTRODUCTION . Deep neural networks have been used in various fields such as vision , audio , natural language processing , and reinforcement learning . As larger and more complex neural networks are adopted , the energy and time consumed for training have become a critical issue in hardware implementation . Using low-bit representations in training significantly reduces hardware overhead and memory footprint ; hence , neural network training with limited precision has been extensively studied recently . For instance , 16-bit formats are already adopted in commercial devices such as FP16 ( IEEE , 2019 ) in NVidia GPU and bfloat16 ( Kalamkar et al. , 2019 ) in Google TPU ( Wang et al. , 2019 ) . Also , Köster et al . ( 2017 ) suggested a new data format using a shared exponent suitable for low-precision training . Recently , it has been demonstrated that even 8-bit formats could be adopted in deep neural network training with reasonable accuracy ( Sun et al. , 2019 ; Fox et al. , 2020 ) . However , there are various issues in realizing low-precision training in practical applications as detailed below . Optimal data format for low-precision training : Training performance is susceptible to the data format we use to represent variables in the network . When a value is represented using a floatingpoint format with a fixed number of bits , there is a trade-off between dynamic range and precision . For instance , allocating more bits to the exponent part in a floating-point format enlarges the dynamic range but lowers precision due to fewer bits in the mantissa part . Recent studies on 8-bit training suggest various ways to reduce the dynamic range required for number representation to enhance representation precision . Early work on 8-bit training ( Wang et al. , 2018 ) adopts a 5-bit exponent to represent different variables using a single format , but Sun et al . ( 2019 ) examine the statistics of each variable and optimize the numeric formats separately . Specifically , the values used in the forward path ( weight and activation ) have a relatively narrow dynamic range , and only 4 bits are allocated to the exponent . Fox et al . ( 2020 ) propose to divide data into smaller blocks and assign a shared exponent bias to each block . Since the values in a block tend to exhibit similar statistics , the forward ( weight and activation ) and backward ( error ) paths could be represented using only 2-bit and 4-bit exponents , respectively . Note that the shared exponent bias is effectively identical to the scaling factor . If a variable has a value of m · 2e and a shared exponent bias of b , then its actual value is m · 2e+bias , which is identical to the scaling factor of 2bias . However , these approaches are difficult to generalize since we should empirically decide numeric formats for each task , neural network structure , and quantization scheme ( Fig . 1 ) . Furthermore , analyzing the statistics of each variable is not enough to determine an optimal format . Their distributions often have a long tail , and hence the dynamic range of the numeric format should be experimentally selected through many trial-and-errors in actual training . Performance degradation in from-scratch training : Previous studies on quantized models show that a model could achieve comparable accuracy to full-precision models even using 1- or 2-bit weights ( Choi et al. , 2019 ; Martinez et al. , 2020 ) through fine-tuning a pre-trained model . However , in low-precision training where a neural network is trained from scratch using low-precision values and computations , the trained model typically shows a noticeable accuracy drop ( Elhoushi et al. , 2021 ) . Fig . 1 ( b ) shows the Top-1 validation accuracy of ResNet-18 ( He et al. , 2016 ) trained on ImageNet ( Deng et al. , 2009 ) for different training schemes . The weights are quantized into a 4- bit base-2 logarithmic format . From-scratch training of the model with quantized weights results in a 2.1 % accuracy drop , whereas only 1.0 % degradation is observed if we fine-tune a pre-trained model . This suggests that even though a better solution exists for a given format , it can not be reached through from-scratch training . To formalize the issues above , here we divide quantization in low-precision training into two types : network quantization and data flow quantization . Network quantization refers to the quantization of the neural network model . An example of this type of quantization is weight quantization . In network quantization , we need to reduce the performance difference between from-scratch training and fine-tuning ( Yang et al. , 2019b ) . On the other hand , data flow quantization refers to the on-the-fly quantization that occurs when data propagate through the network in low-precision training . Examples include activation , error , and weight gradient quantizations . Additional errors are introduced in weight update computation due to this type of quantization , which leads to performance degradation . Hence , we need to find an optimal format to minimize accuracy drop due to computation errors in data flow quantization . In this paper , we present a systematic approach to implementing low-precision training on various models and tasks . First , we present a method to efficiently find an optimal format for data flow quantization . In addition , we introduce a hysteresis quantization technique , a new quantization method for network quantization that can mitigate the issues of from-scratch training . Our main contributions are : • We present a method that can predict the training performance of various numeric formats for data flow quantization . This method allows us to determine an appropriate data format for different neural network structures , datasets , and tasks efficiently . • Using the method above , we propose an optimal 8-bit format suitable for low-precision training of various models , which enables quantization of BatchNorm layer input and improves hardware efficiency with minimal performance degradation . • We propose a new quantization scheme that utilizes the hysteresis effect to improve the performance of from-scratch training . This scheme enables ultra-low-precision training using 4-bit logarithmic weights . 2 DATA FLOW QUANTIZATION . 2.1 NUMERIC FORMATS . There are many numeric formats that can be constructed with n bits depending on how much dynamic range is required and how many valid bits are used for representing a value . For example , using 8 bits we could implement 8-bit fixed point integer format , 8-bit floating-point formats such as FP152 , FP143 , and FP125 ( FP1xy represents 1 sign bit , x exponent bits , y mantissa bits ) , 8-bit posit format ( Gustafson & Yonemoto , 2017 ) , and 8-bit float-fix format ( Han et al. , 2019 ) . Since the diversity of formats that could be formulated using n bits is nearly unlimited , here we assume some constraints to limit candidates while still including widely used formats such as fixed-point and floating-point formats as below : • The MSB ( Most Significant Bit ) is used as a sign bit and other bits represent magnitude . Accordingly , only symmetric formats that have identical representable ranges for positive and negative numbers are considered . Two ’ s complement representation is slightly asymmetric since it can represent one more negative value , but it does not incur a significant difference . • The number of valid bits of a larger value is greater than or equal to the number of valid bits of a smaller value . The valid bits stand for significant digits in binary representation . • The ratio between consecutive representable values does not exceed 2 . For example , the base-4 logarithmic format is excluded . We could obtain 166 8-bit formats that meet these constraints . Then , we reduce 1 and 2 valid bits in each format to obtain 7- and 6-bit formats , resulting in 498 formats in total . More information on the numeric formats considered in our experiments is provided in Appendix A.1 . 2.2 ACTIVATION AND ERROR QUANTIZATION . In a neural network consisting of n layers , the training process is described by Al+1 = fl ( W t l , Al ) ( 1 ) El = gl ( W t l , El+1 ) ( 2 ) Gwl = hl ( Al , El+1 ) ( 3 ) W t+1l = o ( Gwl , W t l ) ( 4 ) where A , E , W , and Gw are activation , error , weight , and weight gradient , respectively . f , g , h , and o are forward , backward , gradient , and update functions . l and t represent the layer number and time step . We follow the quantized training scheme suggested by Fox et al . ( 2020 ) , but with the following modifications to reduce hardware implementation costs . A and E are quantized not only for the GEMM input but also for the BatchNorm layer input . BatchNorm layer normalizes input using the mean and variance of each channel , but these values are obtained only after observing all the inputs from the previous layer , necessitating that all input values are temporarily stored in memory . Therefore , quantizing the BatchNorm layer ’ s input significantly reduces memory footprint and memory access overhead . Additionally , the scope of sharing exponent bias is extended to a layer ( Al and El ) to avoid the overhead of aligning partial sums from different blocks in block-wise exponent sharing . Finally , instead of determining the shared exponent bias by analyzing all values in the layer , we conservatively update it by detecting overflow and underutilization that occurred in the previous mini-batch . 2.3 INDICATORS OF TRAINING PERFORMANCE . Effect of quantized error : Quantizing the error E in the backward path is independent of how the forward path behaves since the loss surface of the model does not change . Therefore , the optimalW that the network needs to reach through training remains the same regardless of the error quantization scheme . However , when the error is quantized , a quantization error ∆E is introduced in E , which incurs a noiseN∆E inGw through the gradient function in Eq . 3 and potentially updates each weight in the wrong direction . While some amount of noise may improve the training performance through regularization , using low-precision formats already introduces a large noise in the network , incurring performance degradation ( see Appendix A.8 ) . Therefore , we suggest that the weight gradient error N∆E could be a good indicator of degradation in training performance . One way to implement this is predicting performance using the magnitude ofN∆E ; however , if the noise is in the same direction as Gw , it would only change the amount of each update and result in a less severe effect . Instead , we could measure the misalignment between Gw + N∆E and Gw for performance prediction . The misalignment between two vectors is estimated by ∠ ( A , B ) = cos−1 { A ·B ‖A‖2 · ‖B‖2 } ( 5 ) Then , the change in the update direction due to N∆E is ∠ ( Gw , Gw +N∆E ) . We can expect that the smaller ∠ ( Gw , Gw +N∆E ) , the better the training performance . Effect of quantized activation : Contrary to error quantization , activation quantization affects the way the forward path operates , and the loss surface of the model changes . Hence , the global optima of weight parameters shift , where the amount of shift would be proportional to the quantization noise . The displacement of global optima can be indirectly estimated using the direction of the weight gradients Gw . If the angle ∠ ( Gw , Gw + N∆A ) is small , the deviation of the global optima is expected to be small as well , suggesting a better training performance . In the discussions above , we assumed that the angles ∠ ( Gw , Gw +N∆E ) and ∠ ( Gw , Gw +N∆A ) could be used to predict training performance . We experimentally prove this by comparing the training performance of different numeric formats . For 498 numeric formats in 6 to 8 bits , we compare the loss obtained from training with the proposed performance indicators ( Fig . 2 ) . Training loss is obtained by training ResNet-18 on CIFAR-10 dataset using SGD with a momentum of 0.9 for 60 epochs . The batch size is 128 images and the initial learning rate is 0.1 , which is decayed by a cosine scheduler . We average angles from 100 mini-batches after quantizing a pre-trained model . Note that we use Gw of the first layer since it can reflect quantization errors that occur in the activations and errors of all the layers in the network . The weight gradients from the full-precision network , the network with quantized activations , and the network with quantized errors are Gw , Gw +N∆A , and GW +N∆E , respectively . Fig . 2 shows that using the misalignment angle results in not only a higher Spearman ’ s correlation but also a more distinct shape for low training losses , making it a better metric for data format selection . For instance , using the error magnitude would predict the best format for transformer incorrectly ( see Fig . 7 ( e ) in Appendix A.3 ) . While obtaining the misalignment angle requires additional computations , its overhead is negligible since the part that requires the most time and computation is to obtain Gw , Gw + ∆E , and Gw + N∆A , which is still significantly lower than actual training . Using this method , we could determine the optimal format for a specific neural network model , dataset , and task very efficiently as we only need to measure the misalignment angle without time-consuming network training . For experiments in Fig . 2 , the amount of computation is reduced by 99.6 % , and the reduction will be even larger for larger datasets and complex networks that need more epochs for training . | The authors propose a method to predict the performance of different numeric formats, which allows determining the optimal data format for various neural network architectures, datasets, and tasks efficiently. By comparing 498 formats in total, the authors find an optimal 8-bit format suitable for various models. To improve the performance of from-scratch training, the authors further propose hysteresis quantization to mitigate the fluctuation issue. Experiments on 8-bit and 4-bit training demonstrate the effectiveness of the proposed method. | SP:8414a02496a42c03ca8ffd5f1f40cfaffc8d8292 |
Toward Efficient Low-Precision Training: Data Format Optimization and Hysteresis Quantization | 1 INTRODUCTION . Deep neural networks have been used in various fields such as vision , audio , natural language processing , and reinforcement learning . As larger and more complex neural networks are adopted , the energy and time consumed for training have become a critical issue in hardware implementation . Using low-bit representations in training significantly reduces hardware overhead and memory footprint ; hence , neural network training with limited precision has been extensively studied recently . For instance , 16-bit formats are already adopted in commercial devices such as FP16 ( IEEE , 2019 ) in NVidia GPU and bfloat16 ( Kalamkar et al. , 2019 ) in Google TPU ( Wang et al. , 2019 ) . Also , Köster et al . ( 2017 ) suggested a new data format using a shared exponent suitable for low-precision training . Recently , it has been demonstrated that even 8-bit formats could be adopted in deep neural network training with reasonable accuracy ( Sun et al. , 2019 ; Fox et al. , 2020 ) . However , there are various issues in realizing low-precision training in practical applications as detailed below . Optimal data format for low-precision training : Training performance is susceptible to the data format we use to represent variables in the network . When a value is represented using a floatingpoint format with a fixed number of bits , there is a trade-off between dynamic range and precision . For instance , allocating more bits to the exponent part in a floating-point format enlarges the dynamic range but lowers precision due to fewer bits in the mantissa part . Recent studies on 8-bit training suggest various ways to reduce the dynamic range required for number representation to enhance representation precision . Early work on 8-bit training ( Wang et al. , 2018 ) adopts a 5-bit exponent to represent different variables using a single format , but Sun et al . ( 2019 ) examine the statistics of each variable and optimize the numeric formats separately . Specifically , the values used in the forward path ( weight and activation ) have a relatively narrow dynamic range , and only 4 bits are allocated to the exponent . Fox et al . ( 2020 ) propose to divide data into smaller blocks and assign a shared exponent bias to each block . Since the values in a block tend to exhibit similar statistics , the forward ( weight and activation ) and backward ( error ) paths could be represented using only 2-bit and 4-bit exponents , respectively . Note that the shared exponent bias is effectively identical to the scaling factor . If a variable has a value of m · 2e and a shared exponent bias of b , then its actual value is m · 2e+bias , which is identical to the scaling factor of 2bias . However , these approaches are difficult to generalize since we should empirically decide numeric formats for each task , neural network structure , and quantization scheme ( Fig . 1 ) . Furthermore , analyzing the statistics of each variable is not enough to determine an optimal format . Their distributions often have a long tail , and hence the dynamic range of the numeric format should be experimentally selected through many trial-and-errors in actual training . Performance degradation in from-scratch training : Previous studies on quantized models show that a model could achieve comparable accuracy to full-precision models even using 1- or 2-bit weights ( Choi et al. , 2019 ; Martinez et al. , 2020 ) through fine-tuning a pre-trained model . However , in low-precision training where a neural network is trained from scratch using low-precision values and computations , the trained model typically shows a noticeable accuracy drop ( Elhoushi et al. , 2021 ) . Fig . 1 ( b ) shows the Top-1 validation accuracy of ResNet-18 ( He et al. , 2016 ) trained on ImageNet ( Deng et al. , 2009 ) for different training schemes . The weights are quantized into a 4- bit base-2 logarithmic format . From-scratch training of the model with quantized weights results in a 2.1 % accuracy drop , whereas only 1.0 % degradation is observed if we fine-tune a pre-trained model . This suggests that even though a better solution exists for a given format , it can not be reached through from-scratch training . To formalize the issues above , here we divide quantization in low-precision training into two types : network quantization and data flow quantization . Network quantization refers to the quantization of the neural network model . An example of this type of quantization is weight quantization . In network quantization , we need to reduce the performance difference between from-scratch training and fine-tuning ( Yang et al. , 2019b ) . On the other hand , data flow quantization refers to the on-the-fly quantization that occurs when data propagate through the network in low-precision training . Examples include activation , error , and weight gradient quantizations . Additional errors are introduced in weight update computation due to this type of quantization , which leads to performance degradation . Hence , we need to find an optimal format to minimize accuracy drop due to computation errors in data flow quantization . In this paper , we present a systematic approach to implementing low-precision training on various models and tasks . First , we present a method to efficiently find an optimal format for data flow quantization . In addition , we introduce a hysteresis quantization technique , a new quantization method for network quantization that can mitigate the issues of from-scratch training . Our main contributions are : • We present a method that can predict the training performance of various numeric formats for data flow quantization . This method allows us to determine an appropriate data format for different neural network structures , datasets , and tasks efficiently . • Using the method above , we propose an optimal 8-bit format suitable for low-precision training of various models , which enables quantization of BatchNorm layer input and improves hardware efficiency with minimal performance degradation . • We propose a new quantization scheme that utilizes the hysteresis effect to improve the performance of from-scratch training . This scheme enables ultra-low-precision training using 4-bit logarithmic weights . 2 DATA FLOW QUANTIZATION . 2.1 NUMERIC FORMATS . There are many numeric formats that can be constructed with n bits depending on how much dynamic range is required and how many valid bits are used for representing a value . For example , using 8 bits we could implement 8-bit fixed point integer format , 8-bit floating-point formats such as FP152 , FP143 , and FP125 ( FP1xy represents 1 sign bit , x exponent bits , y mantissa bits ) , 8-bit posit format ( Gustafson & Yonemoto , 2017 ) , and 8-bit float-fix format ( Han et al. , 2019 ) . Since the diversity of formats that could be formulated using n bits is nearly unlimited , here we assume some constraints to limit candidates while still including widely used formats such as fixed-point and floating-point formats as below : • The MSB ( Most Significant Bit ) is used as a sign bit and other bits represent magnitude . Accordingly , only symmetric formats that have identical representable ranges for positive and negative numbers are considered . Two ’ s complement representation is slightly asymmetric since it can represent one more negative value , but it does not incur a significant difference . • The number of valid bits of a larger value is greater than or equal to the number of valid bits of a smaller value . The valid bits stand for significant digits in binary representation . • The ratio between consecutive representable values does not exceed 2 . For example , the base-4 logarithmic format is excluded . We could obtain 166 8-bit formats that meet these constraints . Then , we reduce 1 and 2 valid bits in each format to obtain 7- and 6-bit formats , resulting in 498 formats in total . More information on the numeric formats considered in our experiments is provided in Appendix A.1 . 2.2 ACTIVATION AND ERROR QUANTIZATION . In a neural network consisting of n layers , the training process is described by Al+1 = fl ( W t l , Al ) ( 1 ) El = gl ( W t l , El+1 ) ( 2 ) Gwl = hl ( Al , El+1 ) ( 3 ) W t+1l = o ( Gwl , W t l ) ( 4 ) where A , E , W , and Gw are activation , error , weight , and weight gradient , respectively . f , g , h , and o are forward , backward , gradient , and update functions . l and t represent the layer number and time step . We follow the quantized training scheme suggested by Fox et al . ( 2020 ) , but with the following modifications to reduce hardware implementation costs . A and E are quantized not only for the GEMM input but also for the BatchNorm layer input . BatchNorm layer normalizes input using the mean and variance of each channel , but these values are obtained only after observing all the inputs from the previous layer , necessitating that all input values are temporarily stored in memory . Therefore , quantizing the BatchNorm layer ’ s input significantly reduces memory footprint and memory access overhead . Additionally , the scope of sharing exponent bias is extended to a layer ( Al and El ) to avoid the overhead of aligning partial sums from different blocks in block-wise exponent sharing . Finally , instead of determining the shared exponent bias by analyzing all values in the layer , we conservatively update it by detecting overflow and underutilization that occurred in the previous mini-batch . 2.3 INDICATORS OF TRAINING PERFORMANCE . Effect of quantized error : Quantizing the error E in the backward path is independent of how the forward path behaves since the loss surface of the model does not change . Therefore , the optimalW that the network needs to reach through training remains the same regardless of the error quantization scheme . However , when the error is quantized , a quantization error ∆E is introduced in E , which incurs a noiseN∆E inGw through the gradient function in Eq . 3 and potentially updates each weight in the wrong direction . While some amount of noise may improve the training performance through regularization , using low-precision formats already introduces a large noise in the network , incurring performance degradation ( see Appendix A.8 ) . Therefore , we suggest that the weight gradient error N∆E could be a good indicator of degradation in training performance . One way to implement this is predicting performance using the magnitude ofN∆E ; however , if the noise is in the same direction as Gw , it would only change the amount of each update and result in a less severe effect . Instead , we could measure the misalignment between Gw + N∆E and Gw for performance prediction . The misalignment between two vectors is estimated by ∠ ( A , B ) = cos−1 { A ·B ‖A‖2 · ‖B‖2 } ( 5 ) Then , the change in the update direction due to N∆E is ∠ ( Gw , Gw +N∆E ) . We can expect that the smaller ∠ ( Gw , Gw +N∆E ) , the better the training performance . Effect of quantized activation : Contrary to error quantization , activation quantization affects the way the forward path operates , and the loss surface of the model changes . Hence , the global optima of weight parameters shift , where the amount of shift would be proportional to the quantization noise . The displacement of global optima can be indirectly estimated using the direction of the weight gradients Gw . If the angle ∠ ( Gw , Gw + N∆A ) is small , the deviation of the global optima is expected to be small as well , suggesting a better training performance . In the discussions above , we assumed that the angles ∠ ( Gw , Gw +N∆E ) and ∠ ( Gw , Gw +N∆A ) could be used to predict training performance . We experimentally prove this by comparing the training performance of different numeric formats . For 498 numeric formats in 6 to 8 bits , we compare the loss obtained from training with the proposed performance indicators ( Fig . 2 ) . Training loss is obtained by training ResNet-18 on CIFAR-10 dataset using SGD with a momentum of 0.9 for 60 epochs . The batch size is 128 images and the initial learning rate is 0.1 , which is decayed by a cosine scheduler . We average angles from 100 mini-batches after quantizing a pre-trained model . Note that we use Gw of the first layer since it can reflect quantization errors that occur in the activations and errors of all the layers in the network . The weight gradients from the full-precision network , the network with quantized activations , and the network with quantized errors are Gw , Gw +N∆A , and GW +N∆E , respectively . Fig . 2 shows that using the misalignment angle results in not only a higher Spearman ’ s correlation but also a more distinct shape for low training losses , making it a better metric for data format selection . For instance , using the error magnitude would predict the best format for transformer incorrectly ( see Fig . 7 ( e ) in Appendix A.3 ) . While obtaining the misalignment angle requires additional computations , its overhead is negligible since the part that requires the most time and computation is to obtain Gw , Gw + ∆E , and Gw + N∆A , which is still significantly lower than actual training . Using this method , we could determine the optimal format for a specific neural network model , dataset , and task very efficiently as we only need to measure the misalignment angle without time-consuming network training . For experiments in Fig . 2 , the amount of computation is reduced by 99.6 % , and the reduction will be even larger for larger datasets and complex networks that need more epochs for training . | The submission starts from an interesting point that various quantized training environments may require different formats for training accurate deep neural networks. They present a metric based on the misalignment between $\frac{\partial \ell}{\partial w}+noise$ and $\frac{\partial \ell}{\partial w}$ to determine the optimal format. To mitigate the fluctuation issue caused by network quantization, they propose a hysteresis quantization scheme to avoid frequent changes of quantized points. The experiment results fully support the effectiveness of the proposed methods. | SP:8414a02496a42c03ca8ffd5f1f40cfaffc8d8292 |
Characterizing and Measuring the Similarity of Neural Networks with Persistent Homology | 1 INTRODUCTION . Machine learning practitioners can train different neural networks for the same task . Even for the same neural architecture , there are many hyperparameters , such as the number of neurons per layer or the number of layers . Moreover , the final weights for the same architecture and hyperparameters can vary depending on the initialization and the optimization process itself , which is stochastic . Thus , there is no direct way of comparing neural networks accounting for the fact that neural networks solving the same task should be measured as being similar , regardless of the specific weights . This also prevents one from finding and comparing modules inside neural networks ( e.g. , determining if a given sub-network does the same function as other sub-network in another model ) . Moreover , there are no well-known methods for effectively characterizing neural networks . This work aims to characterize neural networks such that they can be measured to be similar once trained for the same task , with independence of the particular architecture , initialization , or optimization process . To characterize neural networks and measuring their similarity , we assume two different similarities that should be related if the characterization is correct , namely , 1. similarity between the tasks a model is trained on , and 2. similarity between neural networks themselves considered as mathematical objects .. We do not provide a mathematical definition for the first one , rather an intuitive one , and understand is as qualitative similarity between semantically close tasks . For instance , we think that MNIST ( 10 labels ) is closer to MNIST restricted to 2 labels than to language identification , and that MNIST is closer to MNIST restricted to 8 labels than to MNIST restricted to 2 labels . For the second one , in this work we propose a similarity measure . Ideally , this similarity measure should then capture 1. the semantic similarity between the underlying tasks neural networks have been trained on ( understanding that networks performing similar tasks should be similar , regardless of their specific weights and architectures ) , and 2. intrinsic properties of the neural network should also be captured to some degree . Thus , we consider two scenarios , that is , comparing NNs trained for similar tasks , using the mentioned task similarity , and comparing neural networks trained on identical tasks but with different architectures . We focus on Multi-Layer Perceptrons ( MLPs ) for the sake of simplicity . We start by observing that we can represent a neural network as a directed weighted graph to which we can associate certain topological concepts.1 Considering it as a simplicial complex , we obtain its associated Persistent Diagram . Then , we can compute distances between Persistent Diagrams of different neural networks . 1See Jonsson ( 2007 ) for a complete reference on graph topology . The proposed experiments aim to show that the selected structural feature , Persistent Homology , serves to relate neural networks trained for similar problems and that such a comparison can be performed by means of a predefined measure between the associated Persistent Homology diagrams . To test the hypothesis , we study different classical problems ( MNIST , Fashion MNIST , CIFAR-10 , and language identification and text classification datasets ) , different architectures ( number and size of layers ) as well as a control experiment ( input order , to which neural network similarity should be invariant ) . The code and results are fully open source in the Supplementary Material under a MIT license . In summary , the main contributions of this work are the following : 1 . We propose an effective graph characterization strategy of neural networks based on Persistent Homology . 2 . Based on this characterization , we suggest a similarity measure of neural networks . 3 . We provide empirical evidence that this Persistent Homology framework captures valuable information from neural networks and that the proposed similarity measure is meaningful . The remainder of this paper is organized as follows . In Section 2 , we go through the related work . Then , in Section 3 we describe our proposal and the experimental framework to validate it . Finally , in sections 4 and 5 we report and discuss the results and arrive to conclusions , respectively . 2 RELATED WORK . One of the fundamental papers of Topological Data Analysis ( TDA ) is presented in Carlsson ( 2009 ) and suggests the use of Algebraic Topology to obtain qualitative information and deal with metrics for large amounts of data . For an extensive overview of simplicial topology on graphs , see Giblin ( 1977 ) ; Jonsson ( 2007 ) . Aktas et al . ( 2019 ) provide a thorough analysis of PH methods . More recently , a number of publications have dealt with the study of the capacity of neural networks using PH . Guss & Salakhutdinov ( 2018 ) characterize learnability of different neural architectures by computable measures of data complexity . Donier ( 2019 ) propose the concept of spatial capacity allocation analysis . Konuk & Smith ( 2019 ) propose an empirical study of how NNs handle changes in topological complexity of the input data . Rieck et al . ( 2019b ) introduce the neural persistence metric , a complexity measure based on TDA on weighted stratified graphs . This work suggests a representation of the neural network as a multipartite graph . They perform the filtering of the Persistent Homology diagrams independently for each layer . As the filtration contains at most 1-simplices ( edges ) , they only capture zero-dimensional topological information , i.e . connectivity information . When consecutive layer analysis is used , the global topology of the network is not taken into account making the strong assumption that the NNs encode the learned information layer pairwise exclusively . Additionally , there are trivial global transformations of a NN that are not captured by analyzing pairs of layers : • Superfluous cycle insertions : for example , add two neurons and connect their input to a single neuron in a lower layer and their two outputs to a single output neuron in an upper layer with opposite weights . • Identity layer insertions : for instance , insert an intermediate identity layer with neurons and trivially connect to the next layer . • Non-planar neural networks analysis : the analysis of neural networks that use multiple connections between non-consecutive layers require higher order topological analysis . In terms of pure neural network analysis , there are relevant works , like Hofer et al . ( 2020 ) , that study topological regularization . Clough et al . ( 2020 ) introduce a method for training neural networks for image segmentation with prior topology knowledge , specifically via Betti numbers . Corneanu et al . ( 2020 ) try to estimate ( with limited success ) the performance gap between training and testing via neuron activations and linear regression of the Betti numbers . This type of representation depend on the input data and not only on the NN function under study . Instead , we are interested in characterising and comparing NNs as functions , independently of the data to which they are applied . On the other hand , topological analysis of decision boundaries has been a very prolific area . Ramamurthy et al . ( 2019 ) propose a labeled Vietoris-Rips complex to perform PH inference of decision boundaries for quantification of the complexity of neural networks . Naitzat et al . ( 2020 ) experiment on the PH of a wide range of point cloud input datasets for a binary classification problems to see that NNs transform a topologically rich dataset ( in terms of Betti numbers ) into a topologically simpler one as it passes through the layers . They also verify that the reduction in Betti numbers is significantly faster for ReLU activations than hyperbolic tangent activations . Regarding neural network representations , one of the most related works to ours , Gebhart et al . ( 2019 ) , focuses on topological representations of neural networks . They introduce a method for computing PH over the graphical activation structure of neural networks , which provides access to the task-relevant substructures activated throughout the network for a given input . Interestingly , in Watanabe & Yamana ( 2020 ) , authors work on neural network representations through simplicial complexes based on deep Taylor decomposition and they calculate the PH of neural networks in this representation . In Chowdhury et al . ( 2019 ) , they use directed homology to represent MLPs . They show that the path homology of these networks is non-trivial in higher dimensions and depends on the number and size of the network layers . They investigate homological differences between distinct neural network architectures . As far as neural network similarity measures are concerned , the literature is not especially prolific . In Kornblith et al . ( 2019 ) , authors examine similarity measures for representations ( meaning , outputs of different layers ) of neural networks based on canonical correlation analysis . However , note that this method compares neural network representations ( intermediate outputs ) , not the neural networks themselves . Remarkably , in Ashmore & Gashler ( 2015 ) , authors do deal with the intrinsic similarity of neural networks themselves based on Forward Bipartite Alignment . Specifically , they propose an algorithm for aligning the topological structures of two neural networks . Their algorithm finds optimal bipartite matches between the nodes of the two MLPs by solving the well-known graph cutting problem . The alignment enables applications such as visualizations or improving ensembles . However , the methods only works under very restrictive assumptions,2 and this line of work does not appear to have been followed up . Finally , we note that there has been a considerable growth of interest in applied topology in the recent years . This popularity increase and the development of new software libraries,3 along with the growth of computational capabilities , have empowered new works . Some of the most remarkable libraries are Ripser Tralie et al . ( 2018 ) ; Bauer ( 2021 ) , and Flagser Lütgehetmann et al . ( 2019 ) . They are focused on the efficient computation of PH . For GPU-Accelerated computation of Vietoris-Rips PH , Ripser++ Zhang et al . ( 2020 ) offers an important speedup . The Python library we are using , Giotto-TDA Tauzin et al . ( 2020 ) , makes use of both above libraries underneath . We have seen that there is a trend towards the use of algebraic topology methods for having a better understanding of phenomena of neural networks and having more principled deep learning algorithms . Nevertheless , little to no works have proposed neural network characterizations or similarity measures based on intrinsic properties of the networks , which is what we intend to do . 3 METHODOLOGY . In this section , we propose our method , which is heavily based on concepts from algebraic topology . We refer the reader to the Supplementary Material for the mathematical definitions . In this section , we also describe the conducted experiments . Intrinsically characterizing and comparing neural networks is a difficult , unsolved problem . First , the network should be represented in an object that captures as much information as possible and then it should be compared with a measure depending on the latent structure . Due to the stochasticity of both the initialization and training procedure , networks are parameterized differently . For the same task , different functions that effectively solve it can be obtained . Being able to compare the trained networks can be helpful to detect similar neural structures . We want to obtain topological characterizations associated to neural networks trained on a given task . For doing so , we use the Persistence Homology ( from now on , PH ) of the graph associated to a 2For example , the two neural networks `` must have the same number of units in each of their corresponding layers '' , and the match is done layer by layer . 3https : //www.math.colostate.edu/~adams/advising/appliedTopologySoftware/ neural network . We compute the PH for various neural networks learned on different tasks . We then compare all the diagrams for each one of the task . More specifically , for each of the studied tasks ( image classification on MNIST , Fashion MNIST and CIFAR-10 ; language identification , and text classification on the Reuters dataset ) ,4 we proceed as follows : 1 . We train several neural network models on the particular problem . 2 . We create a directed graph from the weights of the trained neural networks ( after changing the direction of the negative edges and normalising the weights of the edges ) . 3 . We consider the directed graph as a simplicial complex and calculate its PH , using the weight of the edges as the filtering parameter , which range from 0 to 1 . This way we obtain the so-called Persistence Diagram . 4 . We compute the distances between the Persistence Diagrams ( prior discretization of the Persistence Diagram so that it can be computed ) of the different networks . 5 . Finally , we analyze the similarity between different neural networks trained for the same task , for a similar task , and for a completely different task , independently of the concrete architecture , to see whether there is topological similarity . As baselines , we set two standard matrix comparison methods that are the 1-Norm and the Frobenius norm . Having adjacency matrix A and B , we compute the difference as norm ( A−B ) . However , these methods only work for matrices of similar size and thus , they are not general enough . We could also have used the Fast Approximate Quadratic assignment algorithm suggested in Vogelstein et al . ( 2015 ) , but for large networks this method becomes unfeasible to compute . | In this paper, the authors give a method to evaluate the closeness of a task considered by a neural network. They represent a trained NN as a weighted graph and extract features of the NN by calculating persistent homology from the graph. The distance between NNs is calculated by calculating the distance between persistent homologies, and it is experimentally shown that the corresponding tasks of each NN can be determined whether they are similar or different. | SP:4994c49875f7fee6fb47c3b590cef3f5615301a4 |
Characterizing and Measuring the Similarity of Neural Networks with Persistent Homology | 1 INTRODUCTION . Machine learning practitioners can train different neural networks for the same task . Even for the same neural architecture , there are many hyperparameters , such as the number of neurons per layer or the number of layers . Moreover , the final weights for the same architecture and hyperparameters can vary depending on the initialization and the optimization process itself , which is stochastic . Thus , there is no direct way of comparing neural networks accounting for the fact that neural networks solving the same task should be measured as being similar , regardless of the specific weights . This also prevents one from finding and comparing modules inside neural networks ( e.g. , determining if a given sub-network does the same function as other sub-network in another model ) . Moreover , there are no well-known methods for effectively characterizing neural networks . This work aims to characterize neural networks such that they can be measured to be similar once trained for the same task , with independence of the particular architecture , initialization , or optimization process . To characterize neural networks and measuring their similarity , we assume two different similarities that should be related if the characterization is correct , namely , 1. similarity between the tasks a model is trained on , and 2. similarity between neural networks themselves considered as mathematical objects .. We do not provide a mathematical definition for the first one , rather an intuitive one , and understand is as qualitative similarity between semantically close tasks . For instance , we think that MNIST ( 10 labels ) is closer to MNIST restricted to 2 labels than to language identification , and that MNIST is closer to MNIST restricted to 8 labels than to MNIST restricted to 2 labels . For the second one , in this work we propose a similarity measure . Ideally , this similarity measure should then capture 1. the semantic similarity between the underlying tasks neural networks have been trained on ( understanding that networks performing similar tasks should be similar , regardless of their specific weights and architectures ) , and 2. intrinsic properties of the neural network should also be captured to some degree . Thus , we consider two scenarios , that is , comparing NNs trained for similar tasks , using the mentioned task similarity , and comparing neural networks trained on identical tasks but with different architectures . We focus on Multi-Layer Perceptrons ( MLPs ) for the sake of simplicity . We start by observing that we can represent a neural network as a directed weighted graph to which we can associate certain topological concepts.1 Considering it as a simplicial complex , we obtain its associated Persistent Diagram . Then , we can compute distances between Persistent Diagrams of different neural networks . 1See Jonsson ( 2007 ) for a complete reference on graph topology . The proposed experiments aim to show that the selected structural feature , Persistent Homology , serves to relate neural networks trained for similar problems and that such a comparison can be performed by means of a predefined measure between the associated Persistent Homology diagrams . To test the hypothesis , we study different classical problems ( MNIST , Fashion MNIST , CIFAR-10 , and language identification and text classification datasets ) , different architectures ( number and size of layers ) as well as a control experiment ( input order , to which neural network similarity should be invariant ) . The code and results are fully open source in the Supplementary Material under a MIT license . In summary , the main contributions of this work are the following : 1 . We propose an effective graph characterization strategy of neural networks based on Persistent Homology . 2 . Based on this characterization , we suggest a similarity measure of neural networks . 3 . We provide empirical evidence that this Persistent Homology framework captures valuable information from neural networks and that the proposed similarity measure is meaningful . The remainder of this paper is organized as follows . In Section 2 , we go through the related work . Then , in Section 3 we describe our proposal and the experimental framework to validate it . Finally , in sections 4 and 5 we report and discuss the results and arrive to conclusions , respectively . 2 RELATED WORK . One of the fundamental papers of Topological Data Analysis ( TDA ) is presented in Carlsson ( 2009 ) and suggests the use of Algebraic Topology to obtain qualitative information and deal with metrics for large amounts of data . For an extensive overview of simplicial topology on graphs , see Giblin ( 1977 ) ; Jonsson ( 2007 ) . Aktas et al . ( 2019 ) provide a thorough analysis of PH methods . More recently , a number of publications have dealt with the study of the capacity of neural networks using PH . Guss & Salakhutdinov ( 2018 ) characterize learnability of different neural architectures by computable measures of data complexity . Donier ( 2019 ) propose the concept of spatial capacity allocation analysis . Konuk & Smith ( 2019 ) propose an empirical study of how NNs handle changes in topological complexity of the input data . Rieck et al . ( 2019b ) introduce the neural persistence metric , a complexity measure based on TDA on weighted stratified graphs . This work suggests a representation of the neural network as a multipartite graph . They perform the filtering of the Persistent Homology diagrams independently for each layer . As the filtration contains at most 1-simplices ( edges ) , they only capture zero-dimensional topological information , i.e . connectivity information . When consecutive layer analysis is used , the global topology of the network is not taken into account making the strong assumption that the NNs encode the learned information layer pairwise exclusively . Additionally , there are trivial global transformations of a NN that are not captured by analyzing pairs of layers : • Superfluous cycle insertions : for example , add two neurons and connect their input to a single neuron in a lower layer and their two outputs to a single output neuron in an upper layer with opposite weights . • Identity layer insertions : for instance , insert an intermediate identity layer with neurons and trivially connect to the next layer . • Non-planar neural networks analysis : the analysis of neural networks that use multiple connections between non-consecutive layers require higher order topological analysis . In terms of pure neural network analysis , there are relevant works , like Hofer et al . ( 2020 ) , that study topological regularization . Clough et al . ( 2020 ) introduce a method for training neural networks for image segmentation with prior topology knowledge , specifically via Betti numbers . Corneanu et al . ( 2020 ) try to estimate ( with limited success ) the performance gap between training and testing via neuron activations and linear regression of the Betti numbers . This type of representation depend on the input data and not only on the NN function under study . Instead , we are interested in characterising and comparing NNs as functions , independently of the data to which they are applied . On the other hand , topological analysis of decision boundaries has been a very prolific area . Ramamurthy et al . ( 2019 ) propose a labeled Vietoris-Rips complex to perform PH inference of decision boundaries for quantification of the complexity of neural networks . Naitzat et al . ( 2020 ) experiment on the PH of a wide range of point cloud input datasets for a binary classification problems to see that NNs transform a topologically rich dataset ( in terms of Betti numbers ) into a topologically simpler one as it passes through the layers . They also verify that the reduction in Betti numbers is significantly faster for ReLU activations than hyperbolic tangent activations . Regarding neural network representations , one of the most related works to ours , Gebhart et al . ( 2019 ) , focuses on topological representations of neural networks . They introduce a method for computing PH over the graphical activation structure of neural networks , which provides access to the task-relevant substructures activated throughout the network for a given input . Interestingly , in Watanabe & Yamana ( 2020 ) , authors work on neural network representations through simplicial complexes based on deep Taylor decomposition and they calculate the PH of neural networks in this representation . In Chowdhury et al . ( 2019 ) , they use directed homology to represent MLPs . They show that the path homology of these networks is non-trivial in higher dimensions and depends on the number and size of the network layers . They investigate homological differences between distinct neural network architectures . As far as neural network similarity measures are concerned , the literature is not especially prolific . In Kornblith et al . ( 2019 ) , authors examine similarity measures for representations ( meaning , outputs of different layers ) of neural networks based on canonical correlation analysis . However , note that this method compares neural network representations ( intermediate outputs ) , not the neural networks themselves . Remarkably , in Ashmore & Gashler ( 2015 ) , authors do deal with the intrinsic similarity of neural networks themselves based on Forward Bipartite Alignment . Specifically , they propose an algorithm for aligning the topological structures of two neural networks . Their algorithm finds optimal bipartite matches between the nodes of the two MLPs by solving the well-known graph cutting problem . The alignment enables applications such as visualizations or improving ensembles . However , the methods only works under very restrictive assumptions,2 and this line of work does not appear to have been followed up . Finally , we note that there has been a considerable growth of interest in applied topology in the recent years . This popularity increase and the development of new software libraries,3 along with the growth of computational capabilities , have empowered new works . Some of the most remarkable libraries are Ripser Tralie et al . ( 2018 ) ; Bauer ( 2021 ) , and Flagser Lütgehetmann et al . ( 2019 ) . They are focused on the efficient computation of PH . For GPU-Accelerated computation of Vietoris-Rips PH , Ripser++ Zhang et al . ( 2020 ) offers an important speedup . The Python library we are using , Giotto-TDA Tauzin et al . ( 2020 ) , makes use of both above libraries underneath . We have seen that there is a trend towards the use of algebraic topology methods for having a better understanding of phenomena of neural networks and having more principled deep learning algorithms . Nevertheless , little to no works have proposed neural network characterizations or similarity measures based on intrinsic properties of the networks , which is what we intend to do . 3 METHODOLOGY . In this section , we propose our method , which is heavily based on concepts from algebraic topology . We refer the reader to the Supplementary Material for the mathematical definitions . In this section , we also describe the conducted experiments . Intrinsically characterizing and comparing neural networks is a difficult , unsolved problem . First , the network should be represented in an object that captures as much information as possible and then it should be compared with a measure depending on the latent structure . Due to the stochasticity of both the initialization and training procedure , networks are parameterized differently . For the same task , different functions that effectively solve it can be obtained . Being able to compare the trained networks can be helpful to detect similar neural structures . We want to obtain topological characterizations associated to neural networks trained on a given task . For doing so , we use the Persistence Homology ( from now on , PH ) of the graph associated to a 2For example , the two neural networks `` must have the same number of units in each of their corresponding layers '' , and the match is done layer by layer . 3https : //www.math.colostate.edu/~adams/advising/appliedTopologySoftware/ neural network . We compute the PH for various neural networks learned on different tasks . We then compare all the diagrams for each one of the task . More specifically , for each of the studied tasks ( image classification on MNIST , Fashion MNIST and CIFAR-10 ; language identification , and text classification on the Reuters dataset ) ,4 we proceed as follows : 1 . We train several neural network models on the particular problem . 2 . We create a directed graph from the weights of the trained neural networks ( after changing the direction of the negative edges and normalising the weights of the edges ) . 3 . We consider the directed graph as a simplicial complex and calculate its PH , using the weight of the edges as the filtering parameter , which range from 0 to 1 . This way we obtain the so-called Persistence Diagram . 4 . We compute the distances between the Persistence Diagrams ( prior discretization of the Persistence Diagram so that it can be computed ) of the different networks . 5 . Finally , we analyze the similarity between different neural networks trained for the same task , for a similar task , and for a completely different task , independently of the concrete architecture , to see whether there is topological similarity . As baselines , we set two standard matrix comparison methods that are the 1-Norm and the Frobenius norm . Having adjacency matrix A and B , we compute the difference as norm ( A−B ) . However , these methods only work for matrices of similar size and thus , they are not general enough . We could also have used the Fast Approximate Quadratic assignment algorithm suggested in Vogelstein et al . ( 2015 ) , but for large networks this method becomes unfeasible to compute . | In this work, the authors propose to characterize neural networks with Topological Data Analysis, more precisely with its main descriptor, the so-called persistence diagram, in order to be able to compare neural networks with different numbers of layers, different numbers of neurons, or trained on different data sets. More specifically, they show that the computational graphs corresponding to the neural networks can be filtered using the edge weights that are learnt during training, in order to produce filtered flag complexes, from which persistent homology can be computed. Then, the authors interpreted the distances between the persistence diagrams obtained from networks with varying parameters (number of layers, neurons, labels), and showed that, often, the distances have intuitive correlation with the complexity of the networks. | SP:4994c49875f7fee6fb47c3b590cef3f5615301a4 |
Characterizing and Measuring the Similarity of Neural Networks with Persistent Homology | 1 INTRODUCTION . Machine learning practitioners can train different neural networks for the same task . Even for the same neural architecture , there are many hyperparameters , such as the number of neurons per layer or the number of layers . Moreover , the final weights for the same architecture and hyperparameters can vary depending on the initialization and the optimization process itself , which is stochastic . Thus , there is no direct way of comparing neural networks accounting for the fact that neural networks solving the same task should be measured as being similar , regardless of the specific weights . This also prevents one from finding and comparing modules inside neural networks ( e.g. , determining if a given sub-network does the same function as other sub-network in another model ) . Moreover , there are no well-known methods for effectively characterizing neural networks . This work aims to characterize neural networks such that they can be measured to be similar once trained for the same task , with independence of the particular architecture , initialization , or optimization process . To characterize neural networks and measuring their similarity , we assume two different similarities that should be related if the characterization is correct , namely , 1. similarity between the tasks a model is trained on , and 2. similarity between neural networks themselves considered as mathematical objects .. We do not provide a mathematical definition for the first one , rather an intuitive one , and understand is as qualitative similarity between semantically close tasks . For instance , we think that MNIST ( 10 labels ) is closer to MNIST restricted to 2 labels than to language identification , and that MNIST is closer to MNIST restricted to 8 labels than to MNIST restricted to 2 labels . For the second one , in this work we propose a similarity measure . Ideally , this similarity measure should then capture 1. the semantic similarity between the underlying tasks neural networks have been trained on ( understanding that networks performing similar tasks should be similar , regardless of their specific weights and architectures ) , and 2. intrinsic properties of the neural network should also be captured to some degree . Thus , we consider two scenarios , that is , comparing NNs trained for similar tasks , using the mentioned task similarity , and comparing neural networks trained on identical tasks but with different architectures . We focus on Multi-Layer Perceptrons ( MLPs ) for the sake of simplicity . We start by observing that we can represent a neural network as a directed weighted graph to which we can associate certain topological concepts.1 Considering it as a simplicial complex , we obtain its associated Persistent Diagram . Then , we can compute distances between Persistent Diagrams of different neural networks . 1See Jonsson ( 2007 ) for a complete reference on graph topology . The proposed experiments aim to show that the selected structural feature , Persistent Homology , serves to relate neural networks trained for similar problems and that such a comparison can be performed by means of a predefined measure between the associated Persistent Homology diagrams . To test the hypothesis , we study different classical problems ( MNIST , Fashion MNIST , CIFAR-10 , and language identification and text classification datasets ) , different architectures ( number and size of layers ) as well as a control experiment ( input order , to which neural network similarity should be invariant ) . The code and results are fully open source in the Supplementary Material under a MIT license . In summary , the main contributions of this work are the following : 1 . We propose an effective graph characterization strategy of neural networks based on Persistent Homology . 2 . Based on this characterization , we suggest a similarity measure of neural networks . 3 . We provide empirical evidence that this Persistent Homology framework captures valuable information from neural networks and that the proposed similarity measure is meaningful . The remainder of this paper is organized as follows . In Section 2 , we go through the related work . Then , in Section 3 we describe our proposal and the experimental framework to validate it . Finally , in sections 4 and 5 we report and discuss the results and arrive to conclusions , respectively . 2 RELATED WORK . One of the fundamental papers of Topological Data Analysis ( TDA ) is presented in Carlsson ( 2009 ) and suggests the use of Algebraic Topology to obtain qualitative information and deal with metrics for large amounts of data . For an extensive overview of simplicial topology on graphs , see Giblin ( 1977 ) ; Jonsson ( 2007 ) . Aktas et al . ( 2019 ) provide a thorough analysis of PH methods . More recently , a number of publications have dealt with the study of the capacity of neural networks using PH . Guss & Salakhutdinov ( 2018 ) characterize learnability of different neural architectures by computable measures of data complexity . Donier ( 2019 ) propose the concept of spatial capacity allocation analysis . Konuk & Smith ( 2019 ) propose an empirical study of how NNs handle changes in topological complexity of the input data . Rieck et al . ( 2019b ) introduce the neural persistence metric , a complexity measure based on TDA on weighted stratified graphs . This work suggests a representation of the neural network as a multipartite graph . They perform the filtering of the Persistent Homology diagrams independently for each layer . As the filtration contains at most 1-simplices ( edges ) , they only capture zero-dimensional topological information , i.e . connectivity information . When consecutive layer analysis is used , the global topology of the network is not taken into account making the strong assumption that the NNs encode the learned information layer pairwise exclusively . Additionally , there are trivial global transformations of a NN that are not captured by analyzing pairs of layers : • Superfluous cycle insertions : for example , add two neurons and connect their input to a single neuron in a lower layer and their two outputs to a single output neuron in an upper layer with opposite weights . • Identity layer insertions : for instance , insert an intermediate identity layer with neurons and trivially connect to the next layer . • Non-planar neural networks analysis : the analysis of neural networks that use multiple connections between non-consecutive layers require higher order topological analysis . In terms of pure neural network analysis , there are relevant works , like Hofer et al . ( 2020 ) , that study topological regularization . Clough et al . ( 2020 ) introduce a method for training neural networks for image segmentation with prior topology knowledge , specifically via Betti numbers . Corneanu et al . ( 2020 ) try to estimate ( with limited success ) the performance gap between training and testing via neuron activations and linear regression of the Betti numbers . This type of representation depend on the input data and not only on the NN function under study . Instead , we are interested in characterising and comparing NNs as functions , independently of the data to which they are applied . On the other hand , topological analysis of decision boundaries has been a very prolific area . Ramamurthy et al . ( 2019 ) propose a labeled Vietoris-Rips complex to perform PH inference of decision boundaries for quantification of the complexity of neural networks . Naitzat et al . ( 2020 ) experiment on the PH of a wide range of point cloud input datasets for a binary classification problems to see that NNs transform a topologically rich dataset ( in terms of Betti numbers ) into a topologically simpler one as it passes through the layers . They also verify that the reduction in Betti numbers is significantly faster for ReLU activations than hyperbolic tangent activations . Regarding neural network representations , one of the most related works to ours , Gebhart et al . ( 2019 ) , focuses on topological representations of neural networks . They introduce a method for computing PH over the graphical activation structure of neural networks , which provides access to the task-relevant substructures activated throughout the network for a given input . Interestingly , in Watanabe & Yamana ( 2020 ) , authors work on neural network representations through simplicial complexes based on deep Taylor decomposition and they calculate the PH of neural networks in this representation . In Chowdhury et al . ( 2019 ) , they use directed homology to represent MLPs . They show that the path homology of these networks is non-trivial in higher dimensions and depends on the number and size of the network layers . They investigate homological differences between distinct neural network architectures . As far as neural network similarity measures are concerned , the literature is not especially prolific . In Kornblith et al . ( 2019 ) , authors examine similarity measures for representations ( meaning , outputs of different layers ) of neural networks based on canonical correlation analysis . However , note that this method compares neural network representations ( intermediate outputs ) , not the neural networks themselves . Remarkably , in Ashmore & Gashler ( 2015 ) , authors do deal with the intrinsic similarity of neural networks themselves based on Forward Bipartite Alignment . Specifically , they propose an algorithm for aligning the topological structures of two neural networks . Their algorithm finds optimal bipartite matches between the nodes of the two MLPs by solving the well-known graph cutting problem . The alignment enables applications such as visualizations or improving ensembles . However , the methods only works under very restrictive assumptions,2 and this line of work does not appear to have been followed up . Finally , we note that there has been a considerable growth of interest in applied topology in the recent years . This popularity increase and the development of new software libraries,3 along with the growth of computational capabilities , have empowered new works . Some of the most remarkable libraries are Ripser Tralie et al . ( 2018 ) ; Bauer ( 2021 ) , and Flagser Lütgehetmann et al . ( 2019 ) . They are focused on the efficient computation of PH . For GPU-Accelerated computation of Vietoris-Rips PH , Ripser++ Zhang et al . ( 2020 ) offers an important speedup . The Python library we are using , Giotto-TDA Tauzin et al . ( 2020 ) , makes use of both above libraries underneath . We have seen that there is a trend towards the use of algebraic topology methods for having a better understanding of phenomena of neural networks and having more principled deep learning algorithms . Nevertheless , little to no works have proposed neural network characterizations or similarity measures based on intrinsic properties of the networks , which is what we intend to do . 3 METHODOLOGY . In this section , we propose our method , which is heavily based on concepts from algebraic topology . We refer the reader to the Supplementary Material for the mathematical definitions . In this section , we also describe the conducted experiments . Intrinsically characterizing and comparing neural networks is a difficult , unsolved problem . First , the network should be represented in an object that captures as much information as possible and then it should be compared with a measure depending on the latent structure . Due to the stochasticity of both the initialization and training procedure , networks are parameterized differently . For the same task , different functions that effectively solve it can be obtained . Being able to compare the trained networks can be helpful to detect similar neural structures . We want to obtain topological characterizations associated to neural networks trained on a given task . For doing so , we use the Persistence Homology ( from now on , PH ) of the graph associated to a 2For example , the two neural networks `` must have the same number of units in each of their corresponding layers '' , and the match is done layer by layer . 3https : //www.math.colostate.edu/~adams/advising/appliedTopologySoftware/ neural network . We compute the PH for various neural networks learned on different tasks . We then compare all the diagrams for each one of the task . More specifically , for each of the studied tasks ( image classification on MNIST , Fashion MNIST and CIFAR-10 ; language identification , and text classification on the Reuters dataset ) ,4 we proceed as follows : 1 . We train several neural network models on the particular problem . 2 . We create a directed graph from the weights of the trained neural networks ( after changing the direction of the negative edges and normalising the weights of the edges ) . 3 . We consider the directed graph as a simplicial complex and calculate its PH , using the weight of the edges as the filtering parameter , which range from 0 to 1 . This way we obtain the so-called Persistence Diagram . 4 . We compute the distances between the Persistence Diagrams ( prior discretization of the Persistence Diagram so that it can be computed ) of the different networks . 5 . Finally , we analyze the similarity between different neural networks trained for the same task , for a similar task , and for a completely different task , independently of the concrete architecture , to see whether there is topological similarity . As baselines , we set two standard matrix comparison methods that are the 1-Norm and the Frobenius norm . Having adjacency matrix A and B , we compute the difference as norm ( A−B ) . However , these methods only work for matrices of similar size and thus , they are not general enough . We could also have used the Fast Approximate Quadratic assignment algorithm suggested in Vogelstein et al . ( 2015 ) , but for large networks this method becomes unfeasible to compute . | In order to characterize and measure the similarity of two neural networks, this paper uses abstract simplicial complex to represent neural networks. The Persistent Homology of the constructed graph associated to a neural network is computed to obtain the corresponding Persistence Diagram. To calculate and quantify the similarity, the authors use supported vectorized persistence summaries: Persistence landscape, Weighted silhouette, and Heat vectorizations respectively and compare their ability to measure the similarities between neural networks. Detailed and complete experiments are conducted on different kinds of datasets. Each experiment only contains one modification on hyperparameter. Results show that the PH-based representation did characterize and capture latent information from the networks. | SP:4994c49875f7fee6fb47c3b590cef3f5615301a4 |
Why Should I Trust You, Bellman? Evaluating the Bellman Objective with Off-Policy Data | 1 INTRODUCTION . In reinforcement learning ( RL ) , value functions are a measure of performance of a target policy . Value functions are an important quantity in RL as they can be used to inform decision-making . Consequently , many modern reinforcement learning algorithms rely on a value function in some capacity ( Gu et al. , 2016 ; Schulman et al. , 2017 ; Fujimoto et al. , 2018 ; Badia et al. , 2020 ) . The Bellman equation is a fundamental relationship in RL which relates the value of a state-action pair to the state-action pair that follows , and is uniquely satisfied over all state-action pairs by the true value function . The existence of the Bellman equation suggests a straightforward approach for approximate value function learning , where a function is trained to minimize the Bellman error ( the difference of both sides of the equation ) . The Bellman equation has played a prominent role in many historically significant approaches ( Schweitzer & Seidmann , 1985 ; Baird , 1995 ; Bradtke & Barto , 1996 ; Antos et al. , 2008 ; Sutton et al. , 2009 ) , as well as the more modern family of deep RL algorithms ( Mnih et al. , 2015 ; Lillicrap et al. , 2015 ; Gu et al. , 2016 ; Hessel et al. , 2017 ) . In this work , we examine the relationship between the Bellman equation and the accuracy of value functions . We do so through off-policy evaluation ( OPE ) , which presents the task of learning the value function of a target policy with data gathered from a separate and possibly unknown behavior policy . OPE , which is a subcomponent of virtually any off-policy RL algorithm , is an ideal setting for evaluating value functions as it provides a clear metric of performance ( value prediction error ) and provides consistency across trials ( fixed dataset and target policy ) . Our main thesis is that since the Bellman equation is meant to consider the entire MDP and all possible state-action pairs , when it is instead estimated over a finite dataset , there is likely to be some breakdown in its relationship to value prediction . This work aims to better understand that breakdown through theoretical analysis and empirical study . Our key discoveries are under offpolicy , function approximations , and finite data assumptions : Bellman error is a poor metric for value error . We find that given two arbitrary value functions , comparing their Bellman error is insufficient to determine which value function is more accurate . This problem is highlighted by experiments which show that value functions trained to minimize Bellman error directly ( Baird , 1995 ) have lower Bellman error but higher value error , than value functions trained by iterative methods ( Ernst et al. , 2005 ) . We find that this non-correspondence in relative ordering over error terms holds even when evaluated over on-policy data ( Figure 2 ) , and only worsens further with off-policy datasets ( Figure 3 ) . Bellman error is a poor objective for learning off-policy . A natural consequence of the Bellman error being a weak metric for value error , is that the Bellman error makes for a poor off-policy objective . Our experiments show that value functions trained by different algorithms exhibit different behaviors . As such , Bellman error can not be used as a metric for arbitrary value functions . However , we find that when comparing value functions trained by the same algorithm , Bellman error can be used as an accurate measure for value error , but only if the error terms are evaluated with on-policy data ( Table 1 ) . This means that Bellman error is only a meaningful objective when used on-policy . Iterative methods rely on generalization for successful training . Iterative methods , such as many deep RL algorithms ( Mnih et al. , 2015 ; Lillicrap et al. , 2015 ) , use a slightly different objective than Bellman error , where the target is assumed to be fixed . This means the objective is non-stationary and evolves during learning . Similar to the Bellman error objective , we find that examining the FQE loss alone is insufficient to determine the accuracy of the value function . However , we remark that we can compare two functions if we take the loss with respect to the same fixed target . This means that if the frozen target is accurate , then the distance to that target is a good proxy for value error . This exposes the reliance of iterative methods to generalization which occurs during training . Our work highlights problems with using Bellman error as a signal , or objective , in the off-policy setting , and aims to provide practitioners a better understanding of Bellman equation-based loss functions , the role of generalization in RL , and the learning dynamics of value functions . Our findings point to an underappreciation of the importance of finite data in widely used objectives and we encourage the community to place a higher emphasis on practical settings . 2 BACKGROUND . Reinforcement learning ( RL ) is an optimization framework for tasks of sequential nature ( Sutton & Barto , 1998 ) . Typically , tasks are defined as a Markov decision process ( S , A , R , p , d0 , γ ) , with state space S , action spaceA , reward functionR , transition dynamics p , initial state distribution d0 , and discount factor γ ∈ [ 0 , 1 ) . Actions are selected according to a policy π . The performance of a policy is measured by its discounted return Eπ [ ∑∞ t γ tr ( st , at ) ] . Offpolicy evaluation ( OPE ) is the task of approximating the value function Qπ ( s , a ) = Eπ [ ∑∞ t γ tr ( st , at ) |s0 = s , a0 = a ] of a target policy , given samples from an arbitrary dataset . A fundamental relationship regarding value functions is the Bellman equation ( Bellman , 1957 ) : Qπ ( s , a ) = Er , s′∼p , a′∼π [ r + γQπ ( s′ , a′ ) ] , ( 1 ) which relates the value of the current state-action pair to an expectation over the next state-action pair . Given an approximate value function Q ( distinguished from the true value function Qπ by dropping the π superscript ) of a target policy π , we denote the Bellman error ( s , a ) : ( s , a ) : = Q ( s , a ) − Er , s′∼p , a′∼π [ r + γQ ( s′ , a′ ) ] . ( 2 ) In policy evaluation , the main objective of interest is value error of a state-action pair ∆ ( s , a ) : ∆ ( s , a ) : = Q ( s , a ) −Qπ ( s , a ) , ( 3 ) where Qπ , the true value function , is intractable without access to the underlying MDP . A standard result is if the Bellman equation converges to the fixed point then the value function must be the true value function . We can re-frame this result in terms of Bellman errors and value errors . Proposition 1 If the Bellman error ( s , a ) = 0 for all state-action pairs ( s , a ) ∈ S × A , then the value error ∆ ( s , a ) = 0 for all state-action pairs ( s , a ) ∈ S ×A . In instances where we can not compute the Bellman error exactly , such as from samples in a nondeterministic environment , we can instead use temporal difference ( TD ) learning , where the TD error δ ( i ) is a sample-based approximation to Bellman error which can be computed over a transition i : = ( s , a , r , s′ ) , δ ( i ) : = Q ( s , a ) − ( r + γQ ( s′ , a′ ) ) , where a′ is sampled from the policy π . Note that the expected TD error is simply the Bellman error ( s , a ) = Er , s′ , a′ [ δ ( i ) ] , where the two values are identical if the environment and policy are deterministic . In this work we focus on two algorithms based on the Bellman equation , which will update an approximate value function Q , using samples from a finite dataset D. Bellman residual minimization ( BRM ) ( Baird , 1995 ) directly minimizes the Bellman error over samples from the dataset D : LBRM ( Q ) : = 1 |D| ∑ ( s , a , r , s′ ) ∼D , a′∼π ( Q ( s , a ) − ( r + γQ ( s′ , a′ ) ) ) 2 . ( 4 ) Fitted Q-Evaluation ( FQE ) ( Ernst et al. , 2005 ; Le et al. , 2019 ) is an iterative method for minimizing Bellman error : LFQE ( Q ) : = 1 |D| ∑ ( s , a , r , s′ ) ∼D , a′∼π ( Q ( s , a ) − ( r + γQ̄ ( s′ , a′ ) ) ) 2 . ( 5 ) The key distinction between the two algorithms is that BRM directly updates both Q ( s , a ) and Q ( s′ , a′ ) , while FQE only considers Q ( s , a ) . This is because FQE uses Q̄ ( s′ , a′ ) , a target value function which is updated Q̄← Q after a fixed number of time steps ( possibly including every time step ) , meaning that only the left side of the Bellman equation is directly updated . 3 EXPERIMENTAL DESIGN . Our goal is to thoroughly evaluate the relationship between Bellman error ( a measurable proxy ) and value error ( an unmeasurable true objective ) in the case of off-policy evaluation with finite samples . In this section we outline the experimental choices used in our empirical evaluation . Comprehensive experimental details ( i.e . hyperparameters , architecture , etc . ) can be found in the Appendix E. Setting . We consider the setting of off-policy evaluation ( OPE ) , as it allows to directly compare value functions over a clear metric , value error . Our experiments consider a variety of continuousaction tasks through the MuJoCo simulator ( Todorov et al. , 2012 ; Brockman et al. , 2016 ) , as it is deterministic and high-dimensional . Determinism in the dynamics is desirable as it , alongside a deterministic policy , makes the Bellman error and TD error identical . This allows us to compute the Bellman error exactly and ignore the double sampling issue for residual gradient methods ( Baird , 1995 ) . Value functions are trained to evaluate an expert deterministic target policy from a fully trained TD3 agent ( Fujimoto et al. , 2018 ) , using a standard discount factor γ = 0.99 . Algorithms . Our experiments are based on Bellman residual minimization ( BRM ) ( Baird , 1995 ) and Fitted Q-Evaluation ( FQE ) ( Ernst et al. , 2005 ; Le et al. , 2019 ) . We use these algorithms due to their popularity in the literature , and to highlight differences in methods which minimize Bellman error directly or indirectly . Network architecture and hyperparameters are the same between algorithms and are selected to match state-of-the-art deep RL methods ( Fujimoto et al. , 2018 ; Haarnoja et al. , 2018a ) for the MuJoCo domain . FQE is implemented using a target network updated with Polyak averaging . In every experiment , algorithms are trained for 1 million time steps and 10 seeds . Training Datasets . Each dataset is collected by using noisy versions of the target policy . This allows us to rank the distribution shift of each dataset . Each noise level corresponds to both the probability of selecting a uniformly random action , as well as the standard deviation of Gaussian noise added to the actions ( noting that actions are in the range [ −1 , 1 ] ) . We use uniformly random actions to ensure that not all actions are centered around the target policy , and Gaussian noise to ensure that every action is distinct from actions selected by the target policy . Metrics . We use the mean squared Bellman error , as it is the most common objective on the Bellman error ( Baird , 1995 ; Sutton & Barto , 1998 ) . For better interpretability , we use the absolute value error , normalized by dividing by a constant term equal to the average true value function Qπ sampled onpolicy . As an example , this means that 0.1 value error roughly corresponds to a percent difference of 10 % . Some experiments are repeated in Appendix D with variations of these metrics . | This paper examines the role of Bellman error as an objective function in offline reinforcement learning. The Bellman error measures how “closely” the estimated value function $Q$ satisfies the Bellman equation, while the value error measures how close the estimated value function $Q$ is to the true value function $Q^\pi$. In offline RL and OPE, we’re interested in value error, but since the true value function is unknown, common practice is to look at Bellman error. The paper provides both theoretical analysis, and empirical experiments using two algorithms related to Bellman error (BRM and FQE). The main takeaways are: (i) zero Bellman error implies zero value error, but (ii) low Bellman error doesn’t imply low value error, making it a poor objective to optimize and a poor metric to compare using, (iii) the success of practical iterative value-based methods like FQE that optimizes Bellman error-like losses relies on generalization during training to reliably predict values for unseen state-action pairs. | SP:40fb3bb55d670c1958050c5fb5c2ea9ddd12660c |
Why Should I Trust You, Bellman? Evaluating the Bellman Objective with Off-Policy Data | 1 INTRODUCTION . In reinforcement learning ( RL ) , value functions are a measure of performance of a target policy . Value functions are an important quantity in RL as they can be used to inform decision-making . Consequently , many modern reinforcement learning algorithms rely on a value function in some capacity ( Gu et al. , 2016 ; Schulman et al. , 2017 ; Fujimoto et al. , 2018 ; Badia et al. , 2020 ) . The Bellman equation is a fundamental relationship in RL which relates the value of a state-action pair to the state-action pair that follows , and is uniquely satisfied over all state-action pairs by the true value function . The existence of the Bellman equation suggests a straightforward approach for approximate value function learning , where a function is trained to minimize the Bellman error ( the difference of both sides of the equation ) . The Bellman equation has played a prominent role in many historically significant approaches ( Schweitzer & Seidmann , 1985 ; Baird , 1995 ; Bradtke & Barto , 1996 ; Antos et al. , 2008 ; Sutton et al. , 2009 ) , as well as the more modern family of deep RL algorithms ( Mnih et al. , 2015 ; Lillicrap et al. , 2015 ; Gu et al. , 2016 ; Hessel et al. , 2017 ) . In this work , we examine the relationship between the Bellman equation and the accuracy of value functions . We do so through off-policy evaluation ( OPE ) , which presents the task of learning the value function of a target policy with data gathered from a separate and possibly unknown behavior policy . OPE , which is a subcomponent of virtually any off-policy RL algorithm , is an ideal setting for evaluating value functions as it provides a clear metric of performance ( value prediction error ) and provides consistency across trials ( fixed dataset and target policy ) . Our main thesis is that since the Bellman equation is meant to consider the entire MDP and all possible state-action pairs , when it is instead estimated over a finite dataset , there is likely to be some breakdown in its relationship to value prediction . This work aims to better understand that breakdown through theoretical analysis and empirical study . Our key discoveries are under offpolicy , function approximations , and finite data assumptions : Bellman error is a poor metric for value error . We find that given two arbitrary value functions , comparing their Bellman error is insufficient to determine which value function is more accurate . This problem is highlighted by experiments which show that value functions trained to minimize Bellman error directly ( Baird , 1995 ) have lower Bellman error but higher value error , than value functions trained by iterative methods ( Ernst et al. , 2005 ) . We find that this non-correspondence in relative ordering over error terms holds even when evaluated over on-policy data ( Figure 2 ) , and only worsens further with off-policy datasets ( Figure 3 ) . Bellman error is a poor objective for learning off-policy . A natural consequence of the Bellman error being a weak metric for value error , is that the Bellman error makes for a poor off-policy objective . Our experiments show that value functions trained by different algorithms exhibit different behaviors . As such , Bellman error can not be used as a metric for arbitrary value functions . However , we find that when comparing value functions trained by the same algorithm , Bellman error can be used as an accurate measure for value error , but only if the error terms are evaluated with on-policy data ( Table 1 ) . This means that Bellman error is only a meaningful objective when used on-policy . Iterative methods rely on generalization for successful training . Iterative methods , such as many deep RL algorithms ( Mnih et al. , 2015 ; Lillicrap et al. , 2015 ) , use a slightly different objective than Bellman error , where the target is assumed to be fixed . This means the objective is non-stationary and evolves during learning . Similar to the Bellman error objective , we find that examining the FQE loss alone is insufficient to determine the accuracy of the value function . However , we remark that we can compare two functions if we take the loss with respect to the same fixed target . This means that if the frozen target is accurate , then the distance to that target is a good proxy for value error . This exposes the reliance of iterative methods to generalization which occurs during training . Our work highlights problems with using Bellman error as a signal , or objective , in the off-policy setting , and aims to provide practitioners a better understanding of Bellman equation-based loss functions , the role of generalization in RL , and the learning dynamics of value functions . Our findings point to an underappreciation of the importance of finite data in widely used objectives and we encourage the community to place a higher emphasis on practical settings . 2 BACKGROUND . Reinforcement learning ( RL ) is an optimization framework for tasks of sequential nature ( Sutton & Barto , 1998 ) . Typically , tasks are defined as a Markov decision process ( S , A , R , p , d0 , γ ) , with state space S , action spaceA , reward functionR , transition dynamics p , initial state distribution d0 , and discount factor γ ∈ [ 0 , 1 ) . Actions are selected according to a policy π . The performance of a policy is measured by its discounted return Eπ [ ∑∞ t γ tr ( st , at ) ] . Offpolicy evaluation ( OPE ) is the task of approximating the value function Qπ ( s , a ) = Eπ [ ∑∞ t γ tr ( st , at ) |s0 = s , a0 = a ] of a target policy , given samples from an arbitrary dataset . A fundamental relationship regarding value functions is the Bellman equation ( Bellman , 1957 ) : Qπ ( s , a ) = Er , s′∼p , a′∼π [ r + γQπ ( s′ , a′ ) ] , ( 1 ) which relates the value of the current state-action pair to an expectation over the next state-action pair . Given an approximate value function Q ( distinguished from the true value function Qπ by dropping the π superscript ) of a target policy π , we denote the Bellman error ( s , a ) : ( s , a ) : = Q ( s , a ) − Er , s′∼p , a′∼π [ r + γQ ( s′ , a′ ) ] . ( 2 ) In policy evaluation , the main objective of interest is value error of a state-action pair ∆ ( s , a ) : ∆ ( s , a ) : = Q ( s , a ) −Qπ ( s , a ) , ( 3 ) where Qπ , the true value function , is intractable without access to the underlying MDP . A standard result is if the Bellman equation converges to the fixed point then the value function must be the true value function . We can re-frame this result in terms of Bellman errors and value errors . Proposition 1 If the Bellman error ( s , a ) = 0 for all state-action pairs ( s , a ) ∈ S × A , then the value error ∆ ( s , a ) = 0 for all state-action pairs ( s , a ) ∈ S ×A . In instances where we can not compute the Bellman error exactly , such as from samples in a nondeterministic environment , we can instead use temporal difference ( TD ) learning , where the TD error δ ( i ) is a sample-based approximation to Bellman error which can be computed over a transition i : = ( s , a , r , s′ ) , δ ( i ) : = Q ( s , a ) − ( r + γQ ( s′ , a′ ) ) , where a′ is sampled from the policy π . Note that the expected TD error is simply the Bellman error ( s , a ) = Er , s′ , a′ [ δ ( i ) ] , where the two values are identical if the environment and policy are deterministic . In this work we focus on two algorithms based on the Bellman equation , which will update an approximate value function Q , using samples from a finite dataset D. Bellman residual minimization ( BRM ) ( Baird , 1995 ) directly minimizes the Bellman error over samples from the dataset D : LBRM ( Q ) : = 1 |D| ∑ ( s , a , r , s′ ) ∼D , a′∼π ( Q ( s , a ) − ( r + γQ ( s′ , a′ ) ) ) 2 . ( 4 ) Fitted Q-Evaluation ( FQE ) ( Ernst et al. , 2005 ; Le et al. , 2019 ) is an iterative method for minimizing Bellman error : LFQE ( Q ) : = 1 |D| ∑ ( s , a , r , s′ ) ∼D , a′∼π ( Q ( s , a ) − ( r + γQ̄ ( s′ , a′ ) ) ) 2 . ( 5 ) The key distinction between the two algorithms is that BRM directly updates both Q ( s , a ) and Q ( s′ , a′ ) , while FQE only considers Q ( s , a ) . This is because FQE uses Q̄ ( s′ , a′ ) , a target value function which is updated Q̄← Q after a fixed number of time steps ( possibly including every time step ) , meaning that only the left side of the Bellman equation is directly updated . 3 EXPERIMENTAL DESIGN . Our goal is to thoroughly evaluate the relationship between Bellman error ( a measurable proxy ) and value error ( an unmeasurable true objective ) in the case of off-policy evaluation with finite samples . In this section we outline the experimental choices used in our empirical evaluation . Comprehensive experimental details ( i.e . hyperparameters , architecture , etc . ) can be found in the Appendix E. Setting . We consider the setting of off-policy evaluation ( OPE ) , as it allows to directly compare value functions over a clear metric , value error . Our experiments consider a variety of continuousaction tasks through the MuJoCo simulator ( Todorov et al. , 2012 ; Brockman et al. , 2016 ) , as it is deterministic and high-dimensional . Determinism in the dynamics is desirable as it , alongside a deterministic policy , makes the Bellman error and TD error identical . This allows us to compute the Bellman error exactly and ignore the double sampling issue for residual gradient methods ( Baird , 1995 ) . Value functions are trained to evaluate an expert deterministic target policy from a fully trained TD3 agent ( Fujimoto et al. , 2018 ) , using a standard discount factor γ = 0.99 . Algorithms . Our experiments are based on Bellman residual minimization ( BRM ) ( Baird , 1995 ) and Fitted Q-Evaluation ( FQE ) ( Ernst et al. , 2005 ; Le et al. , 2019 ) . We use these algorithms due to their popularity in the literature , and to highlight differences in methods which minimize Bellman error directly or indirectly . Network architecture and hyperparameters are the same between algorithms and are selected to match state-of-the-art deep RL methods ( Fujimoto et al. , 2018 ; Haarnoja et al. , 2018a ) for the MuJoCo domain . FQE is implemented using a target network updated with Polyak averaging . In every experiment , algorithms are trained for 1 million time steps and 10 seeds . Training Datasets . Each dataset is collected by using noisy versions of the target policy . This allows us to rank the distribution shift of each dataset . Each noise level corresponds to both the probability of selecting a uniformly random action , as well as the standard deviation of Gaussian noise added to the actions ( noting that actions are in the range [ −1 , 1 ] ) . We use uniformly random actions to ensure that not all actions are centered around the target policy , and Gaussian noise to ensure that every action is distinct from actions selected by the target policy . Metrics . We use the mean squared Bellman error , as it is the most common objective on the Bellman error ( Baird , 1995 ; Sutton & Barto , 1998 ) . For better interpretability , we use the absolute value error , normalized by dividing by a constant term equal to the average true value function Qπ sampled onpolicy . As an example , this means that 0.1 value error roughly corresponds to a percent difference of 10 % . Some experiments are repeated in Appendix D with variations of these metrics . | The paper tries to argue that the Bellman error cannot be trusted as a good metric or objective for off-policy evaluation. To support the argument, the paper provides theoretical analysis as well as extensive empirical analysis. Theoretical analysis gives a few example on the relation between the true value error and the Bellman error, which could be arbitrary especially under finite sample cases. Empirical results show that even when the Bellman residual is minimized well, the value error could be large in various of settings, in comparison, FQE consistently outperform BRM even when the Bellman error is much larger. | SP:40fb3bb55d670c1958050c5fb5c2ea9ddd12660c |
Why Should I Trust You, Bellman? Evaluating the Bellman Objective with Off-Policy Data | 1 INTRODUCTION . In reinforcement learning ( RL ) , value functions are a measure of performance of a target policy . Value functions are an important quantity in RL as they can be used to inform decision-making . Consequently , many modern reinforcement learning algorithms rely on a value function in some capacity ( Gu et al. , 2016 ; Schulman et al. , 2017 ; Fujimoto et al. , 2018 ; Badia et al. , 2020 ) . The Bellman equation is a fundamental relationship in RL which relates the value of a state-action pair to the state-action pair that follows , and is uniquely satisfied over all state-action pairs by the true value function . The existence of the Bellman equation suggests a straightforward approach for approximate value function learning , where a function is trained to minimize the Bellman error ( the difference of both sides of the equation ) . The Bellman equation has played a prominent role in many historically significant approaches ( Schweitzer & Seidmann , 1985 ; Baird , 1995 ; Bradtke & Barto , 1996 ; Antos et al. , 2008 ; Sutton et al. , 2009 ) , as well as the more modern family of deep RL algorithms ( Mnih et al. , 2015 ; Lillicrap et al. , 2015 ; Gu et al. , 2016 ; Hessel et al. , 2017 ) . In this work , we examine the relationship between the Bellman equation and the accuracy of value functions . We do so through off-policy evaluation ( OPE ) , which presents the task of learning the value function of a target policy with data gathered from a separate and possibly unknown behavior policy . OPE , which is a subcomponent of virtually any off-policy RL algorithm , is an ideal setting for evaluating value functions as it provides a clear metric of performance ( value prediction error ) and provides consistency across trials ( fixed dataset and target policy ) . Our main thesis is that since the Bellman equation is meant to consider the entire MDP and all possible state-action pairs , when it is instead estimated over a finite dataset , there is likely to be some breakdown in its relationship to value prediction . This work aims to better understand that breakdown through theoretical analysis and empirical study . Our key discoveries are under offpolicy , function approximations , and finite data assumptions : Bellman error is a poor metric for value error . We find that given two arbitrary value functions , comparing their Bellman error is insufficient to determine which value function is more accurate . This problem is highlighted by experiments which show that value functions trained to minimize Bellman error directly ( Baird , 1995 ) have lower Bellman error but higher value error , than value functions trained by iterative methods ( Ernst et al. , 2005 ) . We find that this non-correspondence in relative ordering over error terms holds even when evaluated over on-policy data ( Figure 2 ) , and only worsens further with off-policy datasets ( Figure 3 ) . Bellman error is a poor objective for learning off-policy . A natural consequence of the Bellman error being a weak metric for value error , is that the Bellman error makes for a poor off-policy objective . Our experiments show that value functions trained by different algorithms exhibit different behaviors . As such , Bellman error can not be used as a metric for arbitrary value functions . However , we find that when comparing value functions trained by the same algorithm , Bellman error can be used as an accurate measure for value error , but only if the error terms are evaluated with on-policy data ( Table 1 ) . This means that Bellman error is only a meaningful objective when used on-policy . Iterative methods rely on generalization for successful training . Iterative methods , such as many deep RL algorithms ( Mnih et al. , 2015 ; Lillicrap et al. , 2015 ) , use a slightly different objective than Bellman error , where the target is assumed to be fixed . This means the objective is non-stationary and evolves during learning . Similar to the Bellman error objective , we find that examining the FQE loss alone is insufficient to determine the accuracy of the value function . However , we remark that we can compare two functions if we take the loss with respect to the same fixed target . This means that if the frozen target is accurate , then the distance to that target is a good proxy for value error . This exposes the reliance of iterative methods to generalization which occurs during training . Our work highlights problems with using Bellman error as a signal , or objective , in the off-policy setting , and aims to provide practitioners a better understanding of Bellman equation-based loss functions , the role of generalization in RL , and the learning dynamics of value functions . Our findings point to an underappreciation of the importance of finite data in widely used objectives and we encourage the community to place a higher emphasis on practical settings . 2 BACKGROUND . Reinforcement learning ( RL ) is an optimization framework for tasks of sequential nature ( Sutton & Barto , 1998 ) . Typically , tasks are defined as a Markov decision process ( S , A , R , p , d0 , γ ) , with state space S , action spaceA , reward functionR , transition dynamics p , initial state distribution d0 , and discount factor γ ∈ [ 0 , 1 ) . Actions are selected according to a policy π . The performance of a policy is measured by its discounted return Eπ [ ∑∞ t γ tr ( st , at ) ] . Offpolicy evaluation ( OPE ) is the task of approximating the value function Qπ ( s , a ) = Eπ [ ∑∞ t γ tr ( st , at ) |s0 = s , a0 = a ] of a target policy , given samples from an arbitrary dataset . A fundamental relationship regarding value functions is the Bellman equation ( Bellman , 1957 ) : Qπ ( s , a ) = Er , s′∼p , a′∼π [ r + γQπ ( s′ , a′ ) ] , ( 1 ) which relates the value of the current state-action pair to an expectation over the next state-action pair . Given an approximate value function Q ( distinguished from the true value function Qπ by dropping the π superscript ) of a target policy π , we denote the Bellman error ( s , a ) : ( s , a ) : = Q ( s , a ) − Er , s′∼p , a′∼π [ r + γQ ( s′ , a′ ) ] . ( 2 ) In policy evaluation , the main objective of interest is value error of a state-action pair ∆ ( s , a ) : ∆ ( s , a ) : = Q ( s , a ) −Qπ ( s , a ) , ( 3 ) where Qπ , the true value function , is intractable without access to the underlying MDP . A standard result is if the Bellman equation converges to the fixed point then the value function must be the true value function . We can re-frame this result in terms of Bellman errors and value errors . Proposition 1 If the Bellman error ( s , a ) = 0 for all state-action pairs ( s , a ) ∈ S × A , then the value error ∆ ( s , a ) = 0 for all state-action pairs ( s , a ) ∈ S ×A . In instances where we can not compute the Bellman error exactly , such as from samples in a nondeterministic environment , we can instead use temporal difference ( TD ) learning , where the TD error δ ( i ) is a sample-based approximation to Bellman error which can be computed over a transition i : = ( s , a , r , s′ ) , δ ( i ) : = Q ( s , a ) − ( r + γQ ( s′ , a′ ) ) , where a′ is sampled from the policy π . Note that the expected TD error is simply the Bellman error ( s , a ) = Er , s′ , a′ [ δ ( i ) ] , where the two values are identical if the environment and policy are deterministic . In this work we focus on two algorithms based on the Bellman equation , which will update an approximate value function Q , using samples from a finite dataset D. Bellman residual minimization ( BRM ) ( Baird , 1995 ) directly minimizes the Bellman error over samples from the dataset D : LBRM ( Q ) : = 1 |D| ∑ ( s , a , r , s′ ) ∼D , a′∼π ( Q ( s , a ) − ( r + γQ ( s′ , a′ ) ) ) 2 . ( 4 ) Fitted Q-Evaluation ( FQE ) ( Ernst et al. , 2005 ; Le et al. , 2019 ) is an iterative method for minimizing Bellman error : LFQE ( Q ) : = 1 |D| ∑ ( s , a , r , s′ ) ∼D , a′∼π ( Q ( s , a ) − ( r + γQ̄ ( s′ , a′ ) ) ) 2 . ( 5 ) The key distinction between the two algorithms is that BRM directly updates both Q ( s , a ) and Q ( s′ , a′ ) , while FQE only considers Q ( s , a ) . This is because FQE uses Q̄ ( s′ , a′ ) , a target value function which is updated Q̄← Q after a fixed number of time steps ( possibly including every time step ) , meaning that only the left side of the Bellman equation is directly updated . 3 EXPERIMENTAL DESIGN . Our goal is to thoroughly evaluate the relationship between Bellman error ( a measurable proxy ) and value error ( an unmeasurable true objective ) in the case of off-policy evaluation with finite samples . In this section we outline the experimental choices used in our empirical evaluation . Comprehensive experimental details ( i.e . hyperparameters , architecture , etc . ) can be found in the Appendix E. Setting . We consider the setting of off-policy evaluation ( OPE ) , as it allows to directly compare value functions over a clear metric , value error . Our experiments consider a variety of continuousaction tasks through the MuJoCo simulator ( Todorov et al. , 2012 ; Brockman et al. , 2016 ) , as it is deterministic and high-dimensional . Determinism in the dynamics is desirable as it , alongside a deterministic policy , makes the Bellman error and TD error identical . This allows us to compute the Bellman error exactly and ignore the double sampling issue for residual gradient methods ( Baird , 1995 ) . Value functions are trained to evaluate an expert deterministic target policy from a fully trained TD3 agent ( Fujimoto et al. , 2018 ) , using a standard discount factor γ = 0.99 . Algorithms . Our experiments are based on Bellman residual minimization ( BRM ) ( Baird , 1995 ) and Fitted Q-Evaluation ( FQE ) ( Ernst et al. , 2005 ; Le et al. , 2019 ) . We use these algorithms due to their popularity in the literature , and to highlight differences in methods which minimize Bellman error directly or indirectly . Network architecture and hyperparameters are the same between algorithms and are selected to match state-of-the-art deep RL methods ( Fujimoto et al. , 2018 ; Haarnoja et al. , 2018a ) for the MuJoCo domain . FQE is implemented using a target network updated with Polyak averaging . In every experiment , algorithms are trained for 1 million time steps and 10 seeds . Training Datasets . Each dataset is collected by using noisy versions of the target policy . This allows us to rank the distribution shift of each dataset . Each noise level corresponds to both the probability of selecting a uniformly random action , as well as the standard deviation of Gaussian noise added to the actions ( noting that actions are in the range [ −1 , 1 ] ) . We use uniformly random actions to ensure that not all actions are centered around the target policy , and Gaussian noise to ensure that every action is distinct from actions selected by the target policy . Metrics . We use the mean squared Bellman error , as it is the most common objective on the Bellman error ( Baird , 1995 ; Sutton & Barto , 1998 ) . For better interpretability , we use the absolute value error , normalized by dividing by a constant term equal to the average true value function Qπ sampled onpolicy . As an example , this means that 0.1 value error roughly corresponds to a percent difference of 10 % . Some experiments are repeated in Appendix D with variations of these metrics . | This paper studies the Bellman equation commonly used in reinforcement learning (RL) algorithms. The typical motivation behind using the Bellman equation to design RL objectives is that uniformly driving the Bellman error to 0 implies that the true value function has been learned, i.e., the value error is 0. However, as this paper demonstrates both theoretically and empirically, a number of issues may arise before this point in practical regimes. For example, Bellman error and value error may not be well correlated, as shown via experiments evaluating minimizing the Bellman error directly versus fitted Q-evaluation. Furthermore, when evaluated using off-policy data, Bellman error may not even be well correlated with value error for different runs of the same algorithm. These findings may be useful for a more complete understanding of when and why RL algorithms break down, especially in paradigms such as offline RL. | SP:40fb3bb55d670c1958050c5fb5c2ea9ddd12660c |
Neural Network Approximation based on Hausdorff distance of Zonotopes | In this work we theoretically contribute to neural network approximation by providing a novel tropical geometrical viewpoint to structured neural network compression . In particular , we show that the approximation error between two neural networks with ReLU activations and one hidden layer depends on the Hausdorff distance of the tropical zonotopes of the networks . This theorem comes as a first step towards a purely geometrical interpretation of neural network approximation . Based on this theoretical contribution , we propose geometrical methods that employ the K-means algorithm to compress the fully connected parts of ReLU activated deep neural networks . We analyze the error bounds of our algorithms theoretically based on our approximation theorem and evaluate them empirically on neural network compression . Our experiments follow a proof-of-concept strategy and indicate that our geometrical tools achieve improved performance over relevant tropical geometry techniques and can be competitive against non-tropical methods . 1 INTRODUCTION . Tropical geometry ( Maclagan & Sturmfels , 2015 ) is a mathematical field based on algebraic geometry and strongly linked to polyhedral and combinatorial geometry . It is built upon the tropical semiring which originally refers to the min-plus semiring ( Rmin , ∧ , + ) , but may also refer to the max-plus semiring ( Cuninghame-Green , 2012 ; Butkovič , 2010 ) . In our work , we follow the convention of the max-plus semiring ( Rmax , ∨ , + ) which replaces the classical operations of addition and multiplication by max and sum respectively . These operations turn polynomials into piecewise linear functions and , thus , having direct applications in neural networks . Tropical mathematics have a wide range of applications including game theory ( Akian et al. , 2012 ) , dynamical systems on weighted lattices ( Maragos , 2017 ) , finite state transducers ( Theodosis & Maragos , 2018 ; 2019 ) and convex regression ( Maragos & Theodosis , 2020 ; Tsilivis et al. , 2021 ) . Recently , there has been remarkable theoretical impact of tropical geometry in the study of neural networks and machine learning ( Maragos et al. , 2021 ) . Zhang et al . ( 2018 ) prove the equivalence of ReLU activated neural networks with tropical rational mappings . Furthermore , they show that zonotopes may serve as a computational mean for applications such as computing the bound shown in ( Montúfar et al. , 2014 ) regarding the number of the network ’ s linear regions . In a similar context , Charisopoulos & Maragos ( 2018 ) compute an upper bound to the number of linear regions of convolutional and MaxOut layers and propose a randomized algorithm for linear region counting . Moreover , Charisopoulos & Maragos ( 2017 ) study the morphological perceptron tropically and propose a training algorithm using the convex-concave procedure . Also , Dimitriadis & Maragos ( 2021 ) examine the training , pruning and shape properties of Morphological neural networks . Pruning ( Blalock et al. , 2020 ) or , generally , compressing neural networks gained interest in recent years due to the surprising capability of reducing the size of a neural network without compromising performance . As tropical geometry explains the mathematical structure of neural networks , pruning may be revisited tropically . Indeed , Alfarra et al . ( 2020 ) study the lottery ticket hypothesis ( Frankle & Carbin , 2018 ) from the tropical geometrical perspective and propose an unstructured compression algorithm based sparsifying the zonotope matrices of the network . Further , Smyrnis et al . ( 2020 ) propose a novel tropical division algorithm that applies to neural network minimization . A generalization of this method applies to multiclass networks ( Smyrnis & Maragos , 2020 ) . Contributions In our work , we contribute to structured neural network approximation from the mathematical viewpoint of tropical geometry : • We establish a novel bound on the approximation error between two neural networks with ReLU activations and one hidden layer . To prove this we bound the difference of the networks ’ tropical polynomials via the Hausdorff distance of their respective zonotopes . • Motivated by the geometrical bound , we derive two geometrical neural network compression methods that are based on zonotope reduction and employ K-means algorithm for clustering . Our algorithms are applied on the fully connected layers of ReLU activated neural networks . • Our geometrical algorithms are analyzed both theoretically and experimentally . The theoretical evaluation is based on the bounding theorem of neural network approximation error by the Hausdorff distance of the zonotopes . On the experimental part , we examine the performance of our algorithms on retaining the accuracy of convolutional neural networks when applying compression on their fully connected layers . Proofs , illustrations and experimental specifications are included in the supplementary material . 2 BACKGROUND ON TROPICAL GEOMETRY . We study tropical geometry from the viewpoint of the max-plus semiring ( Rmax , ∨ , + ) which is defined as the set Rmax = R ∪ { −∞ } equipped with two operations ( ∨ , + ) . Operation ∨ stands for max and + stands for sum . In max-plus algebra we define polynomials in the following way . Tropical polynomials A tropical polynomial f in d variables x = ( x1 , x2 , ... , xd ) T is defined as the function f ( x ) = max a∈A { aTx+ ca } ( 1 ) where A is a finite collection of vectors in Rd and ca is the corresponding monomial coefficient in Rmax = R ∪ { −∞ } . The set of such polynomials constitutes the semiring Rmax [ x ] of tropical polynomials . Note that each term aTx + ca corresponds to a hyperplane in Rd . We thus call the vectors a ∈ A the slopes of the tropical polynomial , and ca the respective bias . We allow slopes to be vectors with real coefficients rather than integer ones , as it is normally the case for regular polynomials . These polynomials are also referred to as signomials ( Duffin & Peterson , 1973 ) in the literature . Polytopes Polytopes have been studied extensively ( Ziegler , 2012 ; Grünbaum , 2013 ) and occur as a geometric tool for fields such as linear programming and optimization . They also have an important role in the analysis of neural networks . For instance , Zhang et al . ( 2018 ) ; Charisopoulos & Maragos ( 2018 ) show that linear regions of neural networks correspond to vertices of polytopes . Thus , the counting of linear regions reduces to a combinatorial geometry problem . In what follows , we explore this connection of tropical geometry with polytopes . Consider the tropical polynomial defined in ( 1 ) . The Newton Polytope associated to f ( x ) is defined as the convex hull of the slopes of the polynomial Newt ( f ) : = conv { a : a ∈ A } Furthermore , the Extended Newton Polytope of f ( x ) is defined as the convex hull of the slopes of the polynomial extended in the last dimension by the corresponding bias coefficient . ENewt ( f ) : = conv { ( aT , ca ) : a ∈ A } The following proposition computes the Extended Newton Polytope that occurs when a tropical operation is applied between two tropical polynomials . It will allow us to compute the polytope representation corresponding to a neural network ’ s hidden layer . Proposition 1 . ( Zhang et al. , 2018 ; Charisopoulos & Maragos , 2018 ) Let f , g ∈ Rmax [ x ] be two tropical polynomials . Then for the Extended Newton Polytopes it is true that ENewt ( f ∨ g ) = conv { ENewt ( f ) ∪ ENewt ( g ) } ENewt ( f + g ) = ENewt ( f ) ⊕ ENewt ( g ) Here ⊕ denotes Minkowski addition . In particular , for two sets A , B ⊆ Rd it is defined as A⊕B : = { a+ b |a ∈ A , b ∈ B } Corollary 1 . This result can be generalized to any finite set of polynomials using induction . Example 1 . Let f , g be two tropical polynomials in 2 variables , such that f ( x , y ) = max ( 2x+ y + 1 , 0 ) , g ( x , y ) = max ( x , y , 1 ) The tropical operations applied to these polynomials give f ∨ g = max ( 2x+ y + 1 , 0 , x , y , 1 ) f + g = max ( 3x+ y + 1 , x , 2x+ 2y + 1 , y , 2x+ y + 2 , 1 ) Fig . 1 illustrates the Extended Newton Polytopes of the original and the computed polynomials . The Extended Newton Polytope provides a geometrical representation of a tropical polynomial . In addition , it may be used to compute the values that the polynomial attains , as Proposition 2 indicates . Proposition 2 . ( Charisopoulos & Maragos , 2018 ) Let f ∈ Rmax [ x ] be a tropical polynomial in d variables . Let UF ( ENewt ( f ) ) be the points in the upper envelope of ENewt ( f ) , where upward direction is taken regarding the last dimension of Rd+1 . Then for each a ∈ A there exists a linear region of f on which f ( x ) = aTx+ ca if and only if ( aT , ca ) is a vertex of UF ( ENewt ( f ) ) . Example 2 . Using the polynomials from Example 1 we compute a reduced representation for f ∨ g. f ∨ g = max ( 2x+ y + 1 , 0 , x , y , 1 ) = max ( 2x+ y + 1 , x , y , 1 ) Indeed , the remaining terms correspond to the vertices of UF ( ENewt ( f ∨ g ) ) shown in Fig . 1 . 2.1 TROPICAL GEOMETRY OF NEURAL NETWORKS . Tropical geometry has the capability of expressing the mathematical structure of ReLU activated neural networks . We review some of the basic properties governing neural networks and introduce notation that will be used in our analysis . For this purpose , consider the ReLU activated neural network of Fig . 2 with one hidden layer . Network tropical equations The network consists of an input layer x = ( x1 , ... , xd ) , a hidden layer f = ( f1 , ... , fn ) with ReLU activations , an output layer v = ( v1 , ... , vm ) and two linear layers defined by the matrices A , C respectively . As illustrated in Fig . 2 we have Ai , : = ( aTi , bi ) for the first linear layer and Cj , : = ( cj1 , cj2 , ... , cjn ) for the second linear layer , as we ignore its biases . Furthermore , the output of the i−th component of the hidden layer f is computed as fi ( x ) = max ( d∑ k=1 aikxk + bi , 0 ) = max ( aTi x+ bi , 0 ) ( 2 ) We deduce that each fi is a tropical polynomial with two terms . It therefore follows that ENewt ( fi ) is a linear segment in Rd+1 . The components of the output layer may be computed as vj ( x ) = n∑ i=1 cjifi ( x ) = ∑ cji > 0 |cji|fi ( x ) − ∑ cji < 0 |cji|fi ( x ) = pj ( x ) − qj ( x ) ( 3 ) Tropical rational functions Functions pj , qj are both linear combinations of { fi } with positive coefficients , which implies that they are tropical polynomials . We conclude that every output node vi can be written as a difference of two tropical polynomials , which is defined as a tropical rational function . This indicates that the output layer of the neural network of Fig . 2 is equivalent to a tropical rational mapping . In fact , this result holds for deeper networks , in general , as demonstrated by Theorem 1 . Theorem 1 . ( Zhang et al. , 2018 ) Consider a ReLU activated deep neural network as a mapping F : Rd → Rm . Then F is equivalent to a tropical rational mapping . It is not known whether a tropical rational function r ( x ) admits an efficient geometric representation that determines its values { r ( x ) } for x ∈ Rd , as it holds for tropical polynomials with their polytopes in Proposition 2 . For this reason , we choose to work separately on the polytopes of the tropical polynomials pj , qj . Zonotopes Zonotopes are defined as the Minkowski sum of a finite set of line segments . They are a special case of polytopes that occur as a building block for our network . These geometrical structures provide a representation of the polynomials pj , qj in ( 3 ) that further allows us to build our compression algorithms . We use the notation Pj , Qj for the Extended Newton Polytopes of tropical polynomials pj , qj , respectively . Notice from ( 3 ) that for each component vj of the output pj , qj are written as linear combinations of tropical polynomials that correspond to linear segments . Thus Pj and Qj are zonotopes . We call Pj the positive zonotope , corresponding to the positive polynomial pj and Qj the negative one . Zonotope Generators Each neuron of the hidden layer represents geometrically a line segment contributing to the positive or negative zonotope . We thus call these line segments generators of the zonotope . The generators further receive the characterization positive or negative depending on the zonotope they contribute to . It is intuitive to expect that a zonotope gets more complex as its number of generators increases . In fact , each vertex of the zonotope can be computed as the sum of vertices of the generators , where we choose a vertex from each generating line segment , either 0 or cji ( aTi , bi ) . We summarize the above with the following extension of ( Charisopoulos & Maragos , 2018 ) . Proposition 3 . Pj , Qj are zonotopes in Rd+1 . For each vertex v of Pj there exists a subset of indices I+ of { 1 , 2 , ... , n } with cji > 0 , ∀i ∈ I+ such that v = ∑ i∈I+ cji ( aTi , bi ) . Similarly , a vertex u of Qj can be written as u = ∑ i∈I− cji ( aTi , bi ) where I− corresponds to cji < 0 , ∀i ∈ I− . | ***This is a educated guess review as the paper is outside my domain expertise. This paper proposes a compression method using a framework based on geometrical zonotope reduction. The authors further analyze the error bounds of the proposed methods and compare its performance with modern pruning techniques. I think the main contribution of the work would be novelty of the proposed method. | SP:ae9a58c633542148cbd26cf8dadd616eb15a272d |
Neural Network Approximation based on Hausdorff distance of Zonotopes | In this work we theoretically contribute to neural network approximation by providing a novel tropical geometrical viewpoint to structured neural network compression . In particular , we show that the approximation error between two neural networks with ReLU activations and one hidden layer depends on the Hausdorff distance of the tropical zonotopes of the networks . This theorem comes as a first step towards a purely geometrical interpretation of neural network approximation . Based on this theoretical contribution , we propose geometrical methods that employ the K-means algorithm to compress the fully connected parts of ReLU activated deep neural networks . We analyze the error bounds of our algorithms theoretically based on our approximation theorem and evaluate them empirically on neural network compression . Our experiments follow a proof-of-concept strategy and indicate that our geometrical tools achieve improved performance over relevant tropical geometry techniques and can be competitive against non-tropical methods . 1 INTRODUCTION . Tropical geometry ( Maclagan & Sturmfels , 2015 ) is a mathematical field based on algebraic geometry and strongly linked to polyhedral and combinatorial geometry . It is built upon the tropical semiring which originally refers to the min-plus semiring ( Rmin , ∧ , + ) , but may also refer to the max-plus semiring ( Cuninghame-Green , 2012 ; Butkovič , 2010 ) . In our work , we follow the convention of the max-plus semiring ( Rmax , ∨ , + ) which replaces the classical operations of addition and multiplication by max and sum respectively . These operations turn polynomials into piecewise linear functions and , thus , having direct applications in neural networks . Tropical mathematics have a wide range of applications including game theory ( Akian et al. , 2012 ) , dynamical systems on weighted lattices ( Maragos , 2017 ) , finite state transducers ( Theodosis & Maragos , 2018 ; 2019 ) and convex regression ( Maragos & Theodosis , 2020 ; Tsilivis et al. , 2021 ) . Recently , there has been remarkable theoretical impact of tropical geometry in the study of neural networks and machine learning ( Maragos et al. , 2021 ) . Zhang et al . ( 2018 ) prove the equivalence of ReLU activated neural networks with tropical rational mappings . Furthermore , they show that zonotopes may serve as a computational mean for applications such as computing the bound shown in ( Montúfar et al. , 2014 ) regarding the number of the network ’ s linear regions . In a similar context , Charisopoulos & Maragos ( 2018 ) compute an upper bound to the number of linear regions of convolutional and MaxOut layers and propose a randomized algorithm for linear region counting . Moreover , Charisopoulos & Maragos ( 2017 ) study the morphological perceptron tropically and propose a training algorithm using the convex-concave procedure . Also , Dimitriadis & Maragos ( 2021 ) examine the training , pruning and shape properties of Morphological neural networks . Pruning ( Blalock et al. , 2020 ) or , generally , compressing neural networks gained interest in recent years due to the surprising capability of reducing the size of a neural network without compromising performance . As tropical geometry explains the mathematical structure of neural networks , pruning may be revisited tropically . Indeed , Alfarra et al . ( 2020 ) study the lottery ticket hypothesis ( Frankle & Carbin , 2018 ) from the tropical geometrical perspective and propose an unstructured compression algorithm based sparsifying the zonotope matrices of the network . Further , Smyrnis et al . ( 2020 ) propose a novel tropical division algorithm that applies to neural network minimization . A generalization of this method applies to multiclass networks ( Smyrnis & Maragos , 2020 ) . Contributions In our work , we contribute to structured neural network approximation from the mathematical viewpoint of tropical geometry : • We establish a novel bound on the approximation error between two neural networks with ReLU activations and one hidden layer . To prove this we bound the difference of the networks ’ tropical polynomials via the Hausdorff distance of their respective zonotopes . • Motivated by the geometrical bound , we derive two geometrical neural network compression methods that are based on zonotope reduction and employ K-means algorithm for clustering . Our algorithms are applied on the fully connected layers of ReLU activated neural networks . • Our geometrical algorithms are analyzed both theoretically and experimentally . The theoretical evaluation is based on the bounding theorem of neural network approximation error by the Hausdorff distance of the zonotopes . On the experimental part , we examine the performance of our algorithms on retaining the accuracy of convolutional neural networks when applying compression on their fully connected layers . Proofs , illustrations and experimental specifications are included in the supplementary material . 2 BACKGROUND ON TROPICAL GEOMETRY . We study tropical geometry from the viewpoint of the max-plus semiring ( Rmax , ∨ , + ) which is defined as the set Rmax = R ∪ { −∞ } equipped with two operations ( ∨ , + ) . Operation ∨ stands for max and + stands for sum . In max-plus algebra we define polynomials in the following way . Tropical polynomials A tropical polynomial f in d variables x = ( x1 , x2 , ... , xd ) T is defined as the function f ( x ) = max a∈A { aTx+ ca } ( 1 ) where A is a finite collection of vectors in Rd and ca is the corresponding monomial coefficient in Rmax = R ∪ { −∞ } . The set of such polynomials constitutes the semiring Rmax [ x ] of tropical polynomials . Note that each term aTx + ca corresponds to a hyperplane in Rd . We thus call the vectors a ∈ A the slopes of the tropical polynomial , and ca the respective bias . We allow slopes to be vectors with real coefficients rather than integer ones , as it is normally the case for regular polynomials . These polynomials are also referred to as signomials ( Duffin & Peterson , 1973 ) in the literature . Polytopes Polytopes have been studied extensively ( Ziegler , 2012 ; Grünbaum , 2013 ) and occur as a geometric tool for fields such as linear programming and optimization . They also have an important role in the analysis of neural networks . For instance , Zhang et al . ( 2018 ) ; Charisopoulos & Maragos ( 2018 ) show that linear regions of neural networks correspond to vertices of polytopes . Thus , the counting of linear regions reduces to a combinatorial geometry problem . In what follows , we explore this connection of tropical geometry with polytopes . Consider the tropical polynomial defined in ( 1 ) . The Newton Polytope associated to f ( x ) is defined as the convex hull of the slopes of the polynomial Newt ( f ) : = conv { a : a ∈ A } Furthermore , the Extended Newton Polytope of f ( x ) is defined as the convex hull of the slopes of the polynomial extended in the last dimension by the corresponding bias coefficient . ENewt ( f ) : = conv { ( aT , ca ) : a ∈ A } The following proposition computes the Extended Newton Polytope that occurs when a tropical operation is applied between two tropical polynomials . It will allow us to compute the polytope representation corresponding to a neural network ’ s hidden layer . Proposition 1 . ( Zhang et al. , 2018 ; Charisopoulos & Maragos , 2018 ) Let f , g ∈ Rmax [ x ] be two tropical polynomials . Then for the Extended Newton Polytopes it is true that ENewt ( f ∨ g ) = conv { ENewt ( f ) ∪ ENewt ( g ) } ENewt ( f + g ) = ENewt ( f ) ⊕ ENewt ( g ) Here ⊕ denotes Minkowski addition . In particular , for two sets A , B ⊆ Rd it is defined as A⊕B : = { a+ b |a ∈ A , b ∈ B } Corollary 1 . This result can be generalized to any finite set of polynomials using induction . Example 1 . Let f , g be two tropical polynomials in 2 variables , such that f ( x , y ) = max ( 2x+ y + 1 , 0 ) , g ( x , y ) = max ( x , y , 1 ) The tropical operations applied to these polynomials give f ∨ g = max ( 2x+ y + 1 , 0 , x , y , 1 ) f + g = max ( 3x+ y + 1 , x , 2x+ 2y + 1 , y , 2x+ y + 2 , 1 ) Fig . 1 illustrates the Extended Newton Polytopes of the original and the computed polynomials . The Extended Newton Polytope provides a geometrical representation of a tropical polynomial . In addition , it may be used to compute the values that the polynomial attains , as Proposition 2 indicates . Proposition 2 . ( Charisopoulos & Maragos , 2018 ) Let f ∈ Rmax [ x ] be a tropical polynomial in d variables . Let UF ( ENewt ( f ) ) be the points in the upper envelope of ENewt ( f ) , where upward direction is taken regarding the last dimension of Rd+1 . Then for each a ∈ A there exists a linear region of f on which f ( x ) = aTx+ ca if and only if ( aT , ca ) is a vertex of UF ( ENewt ( f ) ) . Example 2 . Using the polynomials from Example 1 we compute a reduced representation for f ∨ g. f ∨ g = max ( 2x+ y + 1 , 0 , x , y , 1 ) = max ( 2x+ y + 1 , x , y , 1 ) Indeed , the remaining terms correspond to the vertices of UF ( ENewt ( f ∨ g ) ) shown in Fig . 1 . 2.1 TROPICAL GEOMETRY OF NEURAL NETWORKS . Tropical geometry has the capability of expressing the mathematical structure of ReLU activated neural networks . We review some of the basic properties governing neural networks and introduce notation that will be used in our analysis . For this purpose , consider the ReLU activated neural network of Fig . 2 with one hidden layer . Network tropical equations The network consists of an input layer x = ( x1 , ... , xd ) , a hidden layer f = ( f1 , ... , fn ) with ReLU activations , an output layer v = ( v1 , ... , vm ) and two linear layers defined by the matrices A , C respectively . As illustrated in Fig . 2 we have Ai , : = ( aTi , bi ) for the first linear layer and Cj , : = ( cj1 , cj2 , ... , cjn ) for the second linear layer , as we ignore its biases . Furthermore , the output of the i−th component of the hidden layer f is computed as fi ( x ) = max ( d∑ k=1 aikxk + bi , 0 ) = max ( aTi x+ bi , 0 ) ( 2 ) We deduce that each fi is a tropical polynomial with two terms . It therefore follows that ENewt ( fi ) is a linear segment in Rd+1 . The components of the output layer may be computed as vj ( x ) = n∑ i=1 cjifi ( x ) = ∑ cji > 0 |cji|fi ( x ) − ∑ cji < 0 |cji|fi ( x ) = pj ( x ) − qj ( x ) ( 3 ) Tropical rational functions Functions pj , qj are both linear combinations of { fi } with positive coefficients , which implies that they are tropical polynomials . We conclude that every output node vi can be written as a difference of two tropical polynomials , which is defined as a tropical rational function . This indicates that the output layer of the neural network of Fig . 2 is equivalent to a tropical rational mapping . In fact , this result holds for deeper networks , in general , as demonstrated by Theorem 1 . Theorem 1 . ( Zhang et al. , 2018 ) Consider a ReLU activated deep neural network as a mapping F : Rd → Rm . Then F is equivalent to a tropical rational mapping . It is not known whether a tropical rational function r ( x ) admits an efficient geometric representation that determines its values { r ( x ) } for x ∈ Rd , as it holds for tropical polynomials with their polytopes in Proposition 2 . For this reason , we choose to work separately on the polytopes of the tropical polynomials pj , qj . Zonotopes Zonotopes are defined as the Minkowski sum of a finite set of line segments . They are a special case of polytopes that occur as a building block for our network . These geometrical structures provide a representation of the polynomials pj , qj in ( 3 ) that further allows us to build our compression algorithms . We use the notation Pj , Qj for the Extended Newton Polytopes of tropical polynomials pj , qj , respectively . Notice from ( 3 ) that for each component vj of the output pj , qj are written as linear combinations of tropical polynomials that correspond to linear segments . Thus Pj and Qj are zonotopes . We call Pj the positive zonotope , corresponding to the positive polynomial pj and Qj the negative one . Zonotope Generators Each neuron of the hidden layer represents geometrically a line segment contributing to the positive or negative zonotope . We thus call these line segments generators of the zonotope . The generators further receive the characterization positive or negative depending on the zonotope they contribute to . It is intuitive to expect that a zonotope gets more complex as its number of generators increases . In fact , each vertex of the zonotope can be computed as the sum of vertices of the generators , where we choose a vertex from each generating line segment , either 0 or cji ( aTi , bi ) . We summarize the above with the following extension of ( Charisopoulos & Maragos , 2018 ) . Proposition 3 . Pj , Qj are zonotopes in Rd+1 . For each vertex v of Pj there exists a subset of indices I+ of { 1 , 2 , ... , n } with cji > 0 , ∀i ∈ I+ such that v = ∑ i∈I+ cji ( aTi , bi ) . Similarly , a vertex u of Qj can be written as u = ∑ i∈I− cji ( aTi , bi ) where I− corresponds to cji < 0 , ∀i ∈ I− . | This paper proposes to study neural network compression through the lens of zonotope reduction. They present approximation bounds for tropical polynomials based on Hausdorff distance and use this to motivate the development of two neural network compression methods. These methods are evaluated on the MNIST, Fashion-MNIST, CIFAR-10, and CIFAR-100 datasets. | SP:ae9a58c633542148cbd26cf8dadd616eb15a272d |
Neural Network Approximation based on Hausdorff distance of Zonotopes | In this work we theoretically contribute to neural network approximation by providing a novel tropical geometrical viewpoint to structured neural network compression . In particular , we show that the approximation error between two neural networks with ReLU activations and one hidden layer depends on the Hausdorff distance of the tropical zonotopes of the networks . This theorem comes as a first step towards a purely geometrical interpretation of neural network approximation . Based on this theoretical contribution , we propose geometrical methods that employ the K-means algorithm to compress the fully connected parts of ReLU activated deep neural networks . We analyze the error bounds of our algorithms theoretically based on our approximation theorem and evaluate them empirically on neural network compression . Our experiments follow a proof-of-concept strategy and indicate that our geometrical tools achieve improved performance over relevant tropical geometry techniques and can be competitive against non-tropical methods . 1 INTRODUCTION . Tropical geometry ( Maclagan & Sturmfels , 2015 ) is a mathematical field based on algebraic geometry and strongly linked to polyhedral and combinatorial geometry . It is built upon the tropical semiring which originally refers to the min-plus semiring ( Rmin , ∧ , + ) , but may also refer to the max-plus semiring ( Cuninghame-Green , 2012 ; Butkovič , 2010 ) . In our work , we follow the convention of the max-plus semiring ( Rmax , ∨ , + ) which replaces the classical operations of addition and multiplication by max and sum respectively . These operations turn polynomials into piecewise linear functions and , thus , having direct applications in neural networks . Tropical mathematics have a wide range of applications including game theory ( Akian et al. , 2012 ) , dynamical systems on weighted lattices ( Maragos , 2017 ) , finite state transducers ( Theodosis & Maragos , 2018 ; 2019 ) and convex regression ( Maragos & Theodosis , 2020 ; Tsilivis et al. , 2021 ) . Recently , there has been remarkable theoretical impact of tropical geometry in the study of neural networks and machine learning ( Maragos et al. , 2021 ) . Zhang et al . ( 2018 ) prove the equivalence of ReLU activated neural networks with tropical rational mappings . Furthermore , they show that zonotopes may serve as a computational mean for applications such as computing the bound shown in ( Montúfar et al. , 2014 ) regarding the number of the network ’ s linear regions . In a similar context , Charisopoulos & Maragos ( 2018 ) compute an upper bound to the number of linear regions of convolutional and MaxOut layers and propose a randomized algorithm for linear region counting . Moreover , Charisopoulos & Maragos ( 2017 ) study the morphological perceptron tropically and propose a training algorithm using the convex-concave procedure . Also , Dimitriadis & Maragos ( 2021 ) examine the training , pruning and shape properties of Morphological neural networks . Pruning ( Blalock et al. , 2020 ) or , generally , compressing neural networks gained interest in recent years due to the surprising capability of reducing the size of a neural network without compromising performance . As tropical geometry explains the mathematical structure of neural networks , pruning may be revisited tropically . Indeed , Alfarra et al . ( 2020 ) study the lottery ticket hypothesis ( Frankle & Carbin , 2018 ) from the tropical geometrical perspective and propose an unstructured compression algorithm based sparsifying the zonotope matrices of the network . Further , Smyrnis et al . ( 2020 ) propose a novel tropical division algorithm that applies to neural network minimization . A generalization of this method applies to multiclass networks ( Smyrnis & Maragos , 2020 ) . Contributions In our work , we contribute to structured neural network approximation from the mathematical viewpoint of tropical geometry : • We establish a novel bound on the approximation error between two neural networks with ReLU activations and one hidden layer . To prove this we bound the difference of the networks ’ tropical polynomials via the Hausdorff distance of their respective zonotopes . • Motivated by the geometrical bound , we derive two geometrical neural network compression methods that are based on zonotope reduction and employ K-means algorithm for clustering . Our algorithms are applied on the fully connected layers of ReLU activated neural networks . • Our geometrical algorithms are analyzed both theoretically and experimentally . The theoretical evaluation is based on the bounding theorem of neural network approximation error by the Hausdorff distance of the zonotopes . On the experimental part , we examine the performance of our algorithms on retaining the accuracy of convolutional neural networks when applying compression on their fully connected layers . Proofs , illustrations and experimental specifications are included in the supplementary material . 2 BACKGROUND ON TROPICAL GEOMETRY . We study tropical geometry from the viewpoint of the max-plus semiring ( Rmax , ∨ , + ) which is defined as the set Rmax = R ∪ { −∞ } equipped with two operations ( ∨ , + ) . Operation ∨ stands for max and + stands for sum . In max-plus algebra we define polynomials in the following way . Tropical polynomials A tropical polynomial f in d variables x = ( x1 , x2 , ... , xd ) T is defined as the function f ( x ) = max a∈A { aTx+ ca } ( 1 ) where A is a finite collection of vectors in Rd and ca is the corresponding monomial coefficient in Rmax = R ∪ { −∞ } . The set of such polynomials constitutes the semiring Rmax [ x ] of tropical polynomials . Note that each term aTx + ca corresponds to a hyperplane in Rd . We thus call the vectors a ∈ A the slopes of the tropical polynomial , and ca the respective bias . We allow slopes to be vectors with real coefficients rather than integer ones , as it is normally the case for regular polynomials . These polynomials are also referred to as signomials ( Duffin & Peterson , 1973 ) in the literature . Polytopes Polytopes have been studied extensively ( Ziegler , 2012 ; Grünbaum , 2013 ) and occur as a geometric tool for fields such as linear programming and optimization . They also have an important role in the analysis of neural networks . For instance , Zhang et al . ( 2018 ) ; Charisopoulos & Maragos ( 2018 ) show that linear regions of neural networks correspond to vertices of polytopes . Thus , the counting of linear regions reduces to a combinatorial geometry problem . In what follows , we explore this connection of tropical geometry with polytopes . Consider the tropical polynomial defined in ( 1 ) . The Newton Polytope associated to f ( x ) is defined as the convex hull of the slopes of the polynomial Newt ( f ) : = conv { a : a ∈ A } Furthermore , the Extended Newton Polytope of f ( x ) is defined as the convex hull of the slopes of the polynomial extended in the last dimension by the corresponding bias coefficient . ENewt ( f ) : = conv { ( aT , ca ) : a ∈ A } The following proposition computes the Extended Newton Polytope that occurs when a tropical operation is applied between two tropical polynomials . It will allow us to compute the polytope representation corresponding to a neural network ’ s hidden layer . Proposition 1 . ( Zhang et al. , 2018 ; Charisopoulos & Maragos , 2018 ) Let f , g ∈ Rmax [ x ] be two tropical polynomials . Then for the Extended Newton Polytopes it is true that ENewt ( f ∨ g ) = conv { ENewt ( f ) ∪ ENewt ( g ) } ENewt ( f + g ) = ENewt ( f ) ⊕ ENewt ( g ) Here ⊕ denotes Minkowski addition . In particular , for two sets A , B ⊆ Rd it is defined as A⊕B : = { a+ b |a ∈ A , b ∈ B } Corollary 1 . This result can be generalized to any finite set of polynomials using induction . Example 1 . Let f , g be two tropical polynomials in 2 variables , such that f ( x , y ) = max ( 2x+ y + 1 , 0 ) , g ( x , y ) = max ( x , y , 1 ) The tropical operations applied to these polynomials give f ∨ g = max ( 2x+ y + 1 , 0 , x , y , 1 ) f + g = max ( 3x+ y + 1 , x , 2x+ 2y + 1 , y , 2x+ y + 2 , 1 ) Fig . 1 illustrates the Extended Newton Polytopes of the original and the computed polynomials . The Extended Newton Polytope provides a geometrical representation of a tropical polynomial . In addition , it may be used to compute the values that the polynomial attains , as Proposition 2 indicates . Proposition 2 . ( Charisopoulos & Maragos , 2018 ) Let f ∈ Rmax [ x ] be a tropical polynomial in d variables . Let UF ( ENewt ( f ) ) be the points in the upper envelope of ENewt ( f ) , where upward direction is taken regarding the last dimension of Rd+1 . Then for each a ∈ A there exists a linear region of f on which f ( x ) = aTx+ ca if and only if ( aT , ca ) is a vertex of UF ( ENewt ( f ) ) . Example 2 . Using the polynomials from Example 1 we compute a reduced representation for f ∨ g. f ∨ g = max ( 2x+ y + 1 , 0 , x , y , 1 ) = max ( 2x+ y + 1 , x , y , 1 ) Indeed , the remaining terms correspond to the vertices of UF ( ENewt ( f ∨ g ) ) shown in Fig . 1 . 2.1 TROPICAL GEOMETRY OF NEURAL NETWORKS . Tropical geometry has the capability of expressing the mathematical structure of ReLU activated neural networks . We review some of the basic properties governing neural networks and introduce notation that will be used in our analysis . For this purpose , consider the ReLU activated neural network of Fig . 2 with one hidden layer . Network tropical equations The network consists of an input layer x = ( x1 , ... , xd ) , a hidden layer f = ( f1 , ... , fn ) with ReLU activations , an output layer v = ( v1 , ... , vm ) and two linear layers defined by the matrices A , C respectively . As illustrated in Fig . 2 we have Ai , : = ( aTi , bi ) for the first linear layer and Cj , : = ( cj1 , cj2 , ... , cjn ) for the second linear layer , as we ignore its biases . Furthermore , the output of the i−th component of the hidden layer f is computed as fi ( x ) = max ( d∑ k=1 aikxk + bi , 0 ) = max ( aTi x+ bi , 0 ) ( 2 ) We deduce that each fi is a tropical polynomial with two terms . It therefore follows that ENewt ( fi ) is a linear segment in Rd+1 . The components of the output layer may be computed as vj ( x ) = n∑ i=1 cjifi ( x ) = ∑ cji > 0 |cji|fi ( x ) − ∑ cji < 0 |cji|fi ( x ) = pj ( x ) − qj ( x ) ( 3 ) Tropical rational functions Functions pj , qj are both linear combinations of { fi } with positive coefficients , which implies that they are tropical polynomials . We conclude that every output node vi can be written as a difference of two tropical polynomials , which is defined as a tropical rational function . This indicates that the output layer of the neural network of Fig . 2 is equivalent to a tropical rational mapping . In fact , this result holds for deeper networks , in general , as demonstrated by Theorem 1 . Theorem 1 . ( Zhang et al. , 2018 ) Consider a ReLU activated deep neural network as a mapping F : Rd → Rm . Then F is equivalent to a tropical rational mapping . It is not known whether a tropical rational function r ( x ) admits an efficient geometric representation that determines its values { r ( x ) } for x ∈ Rd , as it holds for tropical polynomials with their polytopes in Proposition 2 . For this reason , we choose to work separately on the polytopes of the tropical polynomials pj , qj . Zonotopes Zonotopes are defined as the Minkowski sum of a finite set of line segments . They are a special case of polytopes that occur as a building block for our network . These geometrical structures provide a representation of the polynomials pj , qj in ( 3 ) that further allows us to build our compression algorithms . We use the notation Pj , Qj for the Extended Newton Polytopes of tropical polynomials pj , qj , respectively . Notice from ( 3 ) that for each component vj of the output pj , qj are written as linear combinations of tropical polynomials that correspond to linear segments . Thus Pj and Qj are zonotopes . We call Pj the positive zonotope , corresponding to the positive polynomial pj and Qj the negative one . Zonotope Generators Each neuron of the hidden layer represents geometrically a line segment contributing to the positive or negative zonotope . We thus call these line segments generators of the zonotope . The generators further receive the characterization positive or negative depending on the zonotope they contribute to . It is intuitive to expect that a zonotope gets more complex as its number of generators increases . In fact , each vertex of the zonotope can be computed as the sum of vertices of the generators , where we choose a vertex from each generating line segment , either 0 or cji ( aTi , bi ) . We summarize the above with the following extension of ( Charisopoulos & Maragos , 2018 ) . Proposition 3 . Pj , Qj are zonotopes in Rd+1 . For each vertex v of Pj there exists a subset of indices I+ of { 1 , 2 , ... , n } with cji > 0 , ∀i ∈ I+ such that v = ∑ i∈I+ cji ( aTi , bi ) . Similarly , a vertex u of Qj can be written as u = ∑ i∈I− cji ( aTi , bi ) where I− corresponds to cji < 0 , ∀i ∈ I− . | In this paper, a novel method of structured pruning of neural networks using tropical geometry has been proposed. The core idea is to use the tools from tropical geometry to represent a neural network as tropical polynomials and then apply k-means clustering using some distance metrics that work on such representation. The paper contains background information on tropical geometry and related tools. Experiments have been performed on linear layers of a binary classification network trained on MNIST (3/5 and 4/9) and LeNet5 and VGG trained on MNIST and Fashion-MNIST. The proposed method is compared with $L1$ structured pruning, Smyrnis & Maragos (2020), and ThiNet (Luo et al., 2017). | SP:ae9a58c633542148cbd26cf8dadd616eb15a272d |
Learning Pseudometric-based Action Representations for Offline Reinforcement Learning | 1 INTRODUCTION . Reinforcement learning ( RL ) approaches have been applied successfully in many decision-making tasks . In a conventional setting , RL agents learn policies through an online fashion , where they collect trial-and-error experiences directly from the environment to improve the current policy . This can be done when the environment can be easily established , and the cost of deploying new policies online is low ( e.g. , computer games ) . However , many real-world scenarios allow only offline access to the environment due to cost or safety concerns ( Thomas , 2015 ) , meaning that the algorithm can not access the environment during the training phase . This setting is known as offline RL , or batch RL ( Levine et al. , 2020 ) . Despite the success that offline RL has achieved in robotic control tasks ( Fujimoto et al. , 2019b ) and some Atari games ( Gulcehre et al. , 2021 ) , the applicability of offline RL is still limited in many practical scenarios where the action space is large and discrete , including recommender systems and dialogue systems . Prior works on offline RL mainly focus on the setting that the action space is continuous or only consists of a few discrete actions . To address the issue of overestimating the values of o.o.d . actions , they usually constrain the learned policy to stay close to the data-generating policies ( Fujimoto et al. , 2019b ; Kumar et al. , 2019 ; Wu et al. , 2019 ; Kumar et al. , 2020 ; Kostrikov et al. , 2021 ; Zhou et al. , 2020 ) . However , this family of algorithms might suffer from poor performance when there are a large number of discrete actions . Firstly , the value function hardly generalizes over the entire action space without proper action representations because the actions are isolated in nature . By contrast , actions can be naturally represented in continuous control tasks by their physical semantics ( e.g. , directions , forces ) ; thus , the value functions could generalize well . Secondly , with the size of the action space increasing , the state-action pairs are more sparse to the entire state-action space , resulting in a large proportion of o.o.d . actions . Consequently , the learned policies would be overly restrictive – they are constrained to only select actions within the support of in-distribution actions , without considering a large number of other o.o.d . actions that might contain the optimal action ( Zhou et al. , 2020 ; Kumar et al. , 2019 ) . In this paper , we propose a novel framework for learning Behavioral Metric of Actions ( BMA ) to accelerate the offline RL tasks with large discrete action spaces . In BMA , the policy of an agent is trained with a latent , state-conditional action space , where the action representations are learned under a pseudometric that reflects their behavioral and data-distributional similarities . The behavioral metric , inspired by the bisimulation metric defined on states ( Zhang et al. , 2021 ) , aiming to explicitly quantify how similar that two actions ’ effects are on the environment . We also define a data-distributional metric , aiming to quantify how an action deviates from those actions in the dataset . Then , we propose an architecture of action encoder to learn action representations in a self-supervised way , where ` 1 distances between representations correspond to the defined metric . The learned action representations can be combined with any offline RL algorithms and improve them in two ways . On the one hand , benefiting from the behavioral similarity between actions , the Q-function would be more smooth on the action space and , therefore , easier to converge . On the other hand , the quantified distributional distance enables the algorithm to balance between penalizing and exploring the o.o.d . actions . We theoretically prove the continuity and the bound of the Q-values using our proposed action representations . We also empirically evaluate our methods on two simulated tasks and two real-world applications with large action sets . Experimental results show that policies trained under the BMA framework significantly outperform those trained using original actions . Our pseudometric-based action representations are substantially more effective to offline RL tasks when compared to prior action representations widely used in online RL tasks . 2 RELATED WORKS . Offline RL Offline RL aims to learn policies from logged transition data without any active data collection ( Levine et al. , 2020 ) . Recently , many works have been proposed in this area ( Kumar et al. , 2019 ; Wu et al. , 2019 ; Kumar et al. , 2020 ; Kostrikov et al. , 2021 ; Fujimoto et al. , 2019b ) . They empirically and theoretically reveal that the critical issue in offline RL is the overestimation error induced by o.o.d . actions . As a result , they propose a variety of behavioral regularizations in RL training that compel the learned policy to stay close to the offline data . These regularizations consist of incorporating some divergence regularization into the critic ( Kumar et al. , 2020 ; Nachum et al. , 2019 ) , policy divergence penalties ( Kumar et al. , 2019 ; Wu et al. , 2019 ) , and appropriate network initializations ( Matsushima et al. , 2021 ) . These works show effective results in simulated tasks , like Mujoco ( Todorov et al. , 2012 ) and Atari games ( Gulcehre et al. , 2021 ) . However , we empirically show that they fail in the real-world applications with large discrete actions , likely due to the difficulty of generalization over large action sets or the excessive restriction induced by a large proportion of o.o.d . actions . Action representations in RL In online RL , continuous action representations are usually used to exploit underlying structures of large discrete action spaces , thereby accelerating policy optimization in large-scale real-world tasks , like recommender systems ( Ie et al. , 2019 ) and dialogue systems ( Lee et al. , 2019 ) . In prior works , Lee et al . ( 2018 ) uses predefined action embeddings to represent discrete actions and utilize continuous policy gradients for policy optimization . Chandak et al . ( 2019 ) avoid predefined embeddings by linking action representations to state transitions . Tennenholtz and Mannor ( 2019 ) regard action trajectories as natural languages and thus learn action representations from trajectories of expert demonstrations . Wang et al . ( 2021 ) learn action representations that focus on accurate reconstruction of rewards and next observations . Though these works show good results in online RL tasks , we empirically show that their performance is extremely unstable when combined with offline RL algorithms . The reason might be that they build statistical-based representations from raw data and thus struggle in the data-poor problem in the offline settings , especially when the action spaces are large . Furthermore , they lack an explicit scheme to regularize distances between action representations , which we find are important to the behavioral regularizations of offline RL algorithms . Our method utilizes a relation network ( Santoro et al. , 2017 ) to enforce the distances between action representations to reflect their behavioral and data-distributional relations . This provides extra information for building action representations when the offline data is sparse in the entire state-action space and helps offline RL algorithms to derive more proper behavioral regularizations . Some other works use action representations as pre-training behavioral priors or primitives ( Zhou et al. , 2020 ; Ajay et al. , 2021 ; Singh et al. , 2021 ) . They train policies on latent action spaces which are learned from past successful trials and thus avoid a serious distributional shift in offline RL . However , these works seriously rely on the offline dataset ’ s quality ; experience data with poor performance heavily limits the policy improvement . On the other hand , they focus on continuous control tasks without any specific design to address large discrete action spaces . Metrics in RL A crucial principle to generalization in reinforcement learning is to assign similar predictions to similar states . A standard implementation is to use the similarity in an adaptive fashion and group states into clusters while preserving some desired properties . The fundamental assumption behind it is the existence of a metric characterizing the real-valued distance between states ( Le Lan et al. , 2021 ) . A related concept is bisimulation metrics that measure how “ behaviorally similar '' states are Ferns et al . ( 2004 ) . Recently , Zhang et al . ( 2021 ) extend this concept by proposing a gradient-based method for learning a representation space with the properties of bisimulation metrics . In the field of offline RL , Dadashi et al . ( 2021 ) propose a pseudometric to measure the closeness of state-action pairs to the support of logged transitions , but does so directly , without learning a representation . These works mainly focus on metrics on states or state-action pairs but ignore relations between actions . We believe that our work is the first to define a behavioral and data-distributional metric on actions and show that action representations based on this metric are beneficial to offline policy improvements . 3 PRELIMINARIES . We start by introducing notation in this work . We consider the underlying environment as a Markov decision process ( MDP ) with a discrete action space , represented by the tupleM = ( S , A , P , R , γ ) . Here , S is the state space . A is a finite set of actions , called the action set , and |A| denotes the size of the action set . P andR are the transition function and the reward function , respectively , indicating that when the agent takes the action a ∈ A under the state s ∈ S , the probability of transitioning from state s to state s′ ∈ S is P ( s′|s , a ) , and there is a environmental rewardR ( s , a ) ∈ R. The goal of the agent is to learn a good policy a ∼ π ( s ) that maximizes the expected cumulative discounted rewards : EP [ ∑∞ t=1 [ γ tR ( st , π ( st ) ] ] . In online RL , the agent usually learns policy from its interacting experience with the current environment . By contrast , our work focus on the offline setting , in which the agent can not collect new experience data and learns policy from a static dataset D = { ( s , a , s′ , r ) } generated by some other policy . We call the policy that generates D the behavioral policy and denote it as πβ ( a|s ) . 4 OFFLINE RL WITH BMA . In this section , we elaborate on BMA , our proposed method for leveraging pseudometric-based action representations to address offline RL tasks with large discrete action spaces . We begin by describing the paradigm of how to train and execute policies according to the learned action representations . Next , we discuss which properties of action representations are crucial to the performance of this framework and define a pseudometric function to measure these properties . Then , we propose an action encoder structure to learn action representations complying with the desired properties from the offline dataset . Finally , we give a theoretical analysis of the generalization ability and the bound of the value function based on the learned action representation space . Overview . We first introduce a two-phase paradigm for solving such tasks . It first learns an action representation space from the experience dataset by a self-supervised learning framework , and then , train an internal policy πi on the action representation space . This internal policy can build upon arbitrary offline RL algorithms with continuous control . In detail , we first train an action eocoder φ for generating action representations and then convert the original dataset to a new datasetDe = { ( s , e , s′ , r ) } , where e = φ ( a ; s ) is the state-conditional action representation and e ∈ E . Note that we introduce how to train φ in next subsections . Then , the applied offline RL algorithm would learn an interal policy πi ( ê|s ) from De . It provides a latent action ê ∈ E for a given state , but ê would likely not be a valid action , i.e. , it does not equal any action representation e of a ∈ A . Therefore , we need to map from ê to an element in A . Here , we adopt a simple nearest neighbor lookup g ( ê ) introduced in Lee et al . ( 2018 ) : g ( ê ) = argmin a∈A ‖ê− φ ( a ; s ) ‖1 ( 1 ) where g is a mapping function from the continuous representation space to the discrete action set . It returns the original action whose representation is the closest to ê by ` 1 distance . Therefore , the overall policy πo = g ( πi ( e|s ) ) . Its scheme is also described by Fig.1 ( a ) and Alg.1 in the appendix . | This paper proposed a pseudo-metric between actions, called Behavioral Metric of Actions (BMA), for offline RL in environments with large discrete action spaces. This metric considers both the data-distributional relation and the behavior relation. The distance between two actions drawn from similar distributions with similar rewards and transition probabilities is small. This paper also provides theorems about the continuity and generalization of Q-function using the proposed pseudo-metric. The experimental results show that training a policy in the proposed action representation space has significantly improved performance for offline RL algorithms in environments with large discrete action spaces. | SP:41edf5e2c4d66ce3e2427c56078b81ca3e3bb5f0 |
Learning Pseudometric-based Action Representations for Offline Reinforcement Learning | 1 INTRODUCTION . Reinforcement learning ( RL ) approaches have been applied successfully in many decision-making tasks . In a conventional setting , RL agents learn policies through an online fashion , where they collect trial-and-error experiences directly from the environment to improve the current policy . This can be done when the environment can be easily established , and the cost of deploying new policies online is low ( e.g. , computer games ) . However , many real-world scenarios allow only offline access to the environment due to cost or safety concerns ( Thomas , 2015 ) , meaning that the algorithm can not access the environment during the training phase . This setting is known as offline RL , or batch RL ( Levine et al. , 2020 ) . Despite the success that offline RL has achieved in robotic control tasks ( Fujimoto et al. , 2019b ) and some Atari games ( Gulcehre et al. , 2021 ) , the applicability of offline RL is still limited in many practical scenarios where the action space is large and discrete , including recommender systems and dialogue systems . Prior works on offline RL mainly focus on the setting that the action space is continuous or only consists of a few discrete actions . To address the issue of overestimating the values of o.o.d . actions , they usually constrain the learned policy to stay close to the data-generating policies ( Fujimoto et al. , 2019b ; Kumar et al. , 2019 ; Wu et al. , 2019 ; Kumar et al. , 2020 ; Kostrikov et al. , 2021 ; Zhou et al. , 2020 ) . However , this family of algorithms might suffer from poor performance when there are a large number of discrete actions . Firstly , the value function hardly generalizes over the entire action space without proper action representations because the actions are isolated in nature . By contrast , actions can be naturally represented in continuous control tasks by their physical semantics ( e.g. , directions , forces ) ; thus , the value functions could generalize well . Secondly , with the size of the action space increasing , the state-action pairs are more sparse to the entire state-action space , resulting in a large proportion of o.o.d . actions . Consequently , the learned policies would be overly restrictive – they are constrained to only select actions within the support of in-distribution actions , without considering a large number of other o.o.d . actions that might contain the optimal action ( Zhou et al. , 2020 ; Kumar et al. , 2019 ) . In this paper , we propose a novel framework for learning Behavioral Metric of Actions ( BMA ) to accelerate the offline RL tasks with large discrete action spaces . In BMA , the policy of an agent is trained with a latent , state-conditional action space , where the action representations are learned under a pseudometric that reflects their behavioral and data-distributional similarities . The behavioral metric , inspired by the bisimulation metric defined on states ( Zhang et al. , 2021 ) , aiming to explicitly quantify how similar that two actions ’ effects are on the environment . We also define a data-distributional metric , aiming to quantify how an action deviates from those actions in the dataset . Then , we propose an architecture of action encoder to learn action representations in a self-supervised way , where ` 1 distances between representations correspond to the defined metric . The learned action representations can be combined with any offline RL algorithms and improve them in two ways . On the one hand , benefiting from the behavioral similarity between actions , the Q-function would be more smooth on the action space and , therefore , easier to converge . On the other hand , the quantified distributional distance enables the algorithm to balance between penalizing and exploring the o.o.d . actions . We theoretically prove the continuity and the bound of the Q-values using our proposed action representations . We also empirically evaluate our methods on two simulated tasks and two real-world applications with large action sets . Experimental results show that policies trained under the BMA framework significantly outperform those trained using original actions . Our pseudometric-based action representations are substantially more effective to offline RL tasks when compared to prior action representations widely used in online RL tasks . 2 RELATED WORKS . Offline RL Offline RL aims to learn policies from logged transition data without any active data collection ( Levine et al. , 2020 ) . Recently , many works have been proposed in this area ( Kumar et al. , 2019 ; Wu et al. , 2019 ; Kumar et al. , 2020 ; Kostrikov et al. , 2021 ; Fujimoto et al. , 2019b ) . They empirically and theoretically reveal that the critical issue in offline RL is the overestimation error induced by o.o.d . actions . As a result , they propose a variety of behavioral regularizations in RL training that compel the learned policy to stay close to the offline data . These regularizations consist of incorporating some divergence regularization into the critic ( Kumar et al. , 2020 ; Nachum et al. , 2019 ) , policy divergence penalties ( Kumar et al. , 2019 ; Wu et al. , 2019 ) , and appropriate network initializations ( Matsushima et al. , 2021 ) . These works show effective results in simulated tasks , like Mujoco ( Todorov et al. , 2012 ) and Atari games ( Gulcehre et al. , 2021 ) . However , we empirically show that they fail in the real-world applications with large discrete actions , likely due to the difficulty of generalization over large action sets or the excessive restriction induced by a large proportion of o.o.d . actions . Action representations in RL In online RL , continuous action representations are usually used to exploit underlying structures of large discrete action spaces , thereby accelerating policy optimization in large-scale real-world tasks , like recommender systems ( Ie et al. , 2019 ) and dialogue systems ( Lee et al. , 2019 ) . In prior works , Lee et al . ( 2018 ) uses predefined action embeddings to represent discrete actions and utilize continuous policy gradients for policy optimization . Chandak et al . ( 2019 ) avoid predefined embeddings by linking action representations to state transitions . Tennenholtz and Mannor ( 2019 ) regard action trajectories as natural languages and thus learn action representations from trajectories of expert demonstrations . Wang et al . ( 2021 ) learn action representations that focus on accurate reconstruction of rewards and next observations . Though these works show good results in online RL tasks , we empirically show that their performance is extremely unstable when combined with offline RL algorithms . The reason might be that they build statistical-based representations from raw data and thus struggle in the data-poor problem in the offline settings , especially when the action spaces are large . Furthermore , they lack an explicit scheme to regularize distances between action representations , which we find are important to the behavioral regularizations of offline RL algorithms . Our method utilizes a relation network ( Santoro et al. , 2017 ) to enforce the distances between action representations to reflect their behavioral and data-distributional relations . This provides extra information for building action representations when the offline data is sparse in the entire state-action space and helps offline RL algorithms to derive more proper behavioral regularizations . Some other works use action representations as pre-training behavioral priors or primitives ( Zhou et al. , 2020 ; Ajay et al. , 2021 ; Singh et al. , 2021 ) . They train policies on latent action spaces which are learned from past successful trials and thus avoid a serious distributional shift in offline RL . However , these works seriously rely on the offline dataset ’ s quality ; experience data with poor performance heavily limits the policy improvement . On the other hand , they focus on continuous control tasks without any specific design to address large discrete action spaces . Metrics in RL A crucial principle to generalization in reinforcement learning is to assign similar predictions to similar states . A standard implementation is to use the similarity in an adaptive fashion and group states into clusters while preserving some desired properties . The fundamental assumption behind it is the existence of a metric characterizing the real-valued distance between states ( Le Lan et al. , 2021 ) . A related concept is bisimulation metrics that measure how “ behaviorally similar '' states are Ferns et al . ( 2004 ) . Recently , Zhang et al . ( 2021 ) extend this concept by proposing a gradient-based method for learning a representation space with the properties of bisimulation metrics . In the field of offline RL , Dadashi et al . ( 2021 ) propose a pseudometric to measure the closeness of state-action pairs to the support of logged transitions , but does so directly , without learning a representation . These works mainly focus on metrics on states or state-action pairs but ignore relations between actions . We believe that our work is the first to define a behavioral and data-distributional metric on actions and show that action representations based on this metric are beneficial to offline policy improvements . 3 PRELIMINARIES . We start by introducing notation in this work . We consider the underlying environment as a Markov decision process ( MDP ) with a discrete action space , represented by the tupleM = ( S , A , P , R , γ ) . Here , S is the state space . A is a finite set of actions , called the action set , and |A| denotes the size of the action set . P andR are the transition function and the reward function , respectively , indicating that when the agent takes the action a ∈ A under the state s ∈ S , the probability of transitioning from state s to state s′ ∈ S is P ( s′|s , a ) , and there is a environmental rewardR ( s , a ) ∈ R. The goal of the agent is to learn a good policy a ∼ π ( s ) that maximizes the expected cumulative discounted rewards : EP [ ∑∞ t=1 [ γ tR ( st , π ( st ) ] ] . In online RL , the agent usually learns policy from its interacting experience with the current environment . By contrast , our work focus on the offline setting , in which the agent can not collect new experience data and learns policy from a static dataset D = { ( s , a , s′ , r ) } generated by some other policy . We call the policy that generates D the behavioral policy and denote it as πβ ( a|s ) . 4 OFFLINE RL WITH BMA . In this section , we elaborate on BMA , our proposed method for leveraging pseudometric-based action representations to address offline RL tasks with large discrete action spaces . We begin by describing the paradigm of how to train and execute policies according to the learned action representations . Next , we discuss which properties of action representations are crucial to the performance of this framework and define a pseudometric function to measure these properties . Then , we propose an action encoder structure to learn action representations complying with the desired properties from the offline dataset . Finally , we give a theoretical analysis of the generalization ability and the bound of the value function based on the learned action representation space . Overview . We first introduce a two-phase paradigm for solving such tasks . It first learns an action representation space from the experience dataset by a self-supervised learning framework , and then , train an internal policy πi on the action representation space . This internal policy can build upon arbitrary offline RL algorithms with continuous control . In detail , we first train an action eocoder φ for generating action representations and then convert the original dataset to a new datasetDe = { ( s , e , s′ , r ) } , where e = φ ( a ; s ) is the state-conditional action representation and e ∈ E . Note that we introduce how to train φ in next subsections . Then , the applied offline RL algorithm would learn an interal policy πi ( ê|s ) from De . It provides a latent action ê ∈ E for a given state , but ê would likely not be a valid action , i.e. , it does not equal any action representation e of a ∈ A . Therefore , we need to map from ê to an element in A . Here , we adopt a simple nearest neighbor lookup g ( ê ) introduced in Lee et al . ( 2018 ) : g ( ê ) = argmin a∈A ‖ê− φ ( a ; s ) ‖1 ( 1 ) where g is a mapping function from the continuous representation space to the discrete action set . It returns the original action whose representation is the closest to ê by ` 1 distance . Therefore , the overall policy πo = g ( πi ( e|s ) ) . Its scheme is also described by Fig.1 ( a ) and Alg.1 in the appendix . | This paper presents a novel framework for learning action metrics from offline data called Behavioral Metric of Actions (BMA). The goal of this metric is to position the actions in a latent space that is pertinent relative to the task being learned. This is particularly useful in environments with a large number of actions where exhaustive exploration is unfeasible, and therefore generalization over actions is necessary. BMA has two design principles: behavioral similarity between actions, and data-distributional. Behavioral reflects the fact that two actions that have a similar induced transition with a similar reward should be considered relatively equivalent. The data-distributional relationship separates actions that appear within the offline dataset from ones that are absent (or at least absent for a particular state). The authors show that by learning an embedding with these principles they are able to train off-the-shelf algorithms on offline RL tasks in cases where learning would be impossible without an action representation. They also show that compared to other action representations their approach performs better. | SP:41edf5e2c4d66ce3e2427c56078b81ca3e3bb5f0 |
Learning Pseudometric-based Action Representations for Offline Reinforcement Learning | 1 INTRODUCTION . Reinforcement learning ( RL ) approaches have been applied successfully in many decision-making tasks . In a conventional setting , RL agents learn policies through an online fashion , where they collect trial-and-error experiences directly from the environment to improve the current policy . This can be done when the environment can be easily established , and the cost of deploying new policies online is low ( e.g. , computer games ) . However , many real-world scenarios allow only offline access to the environment due to cost or safety concerns ( Thomas , 2015 ) , meaning that the algorithm can not access the environment during the training phase . This setting is known as offline RL , or batch RL ( Levine et al. , 2020 ) . Despite the success that offline RL has achieved in robotic control tasks ( Fujimoto et al. , 2019b ) and some Atari games ( Gulcehre et al. , 2021 ) , the applicability of offline RL is still limited in many practical scenarios where the action space is large and discrete , including recommender systems and dialogue systems . Prior works on offline RL mainly focus on the setting that the action space is continuous or only consists of a few discrete actions . To address the issue of overestimating the values of o.o.d . actions , they usually constrain the learned policy to stay close to the data-generating policies ( Fujimoto et al. , 2019b ; Kumar et al. , 2019 ; Wu et al. , 2019 ; Kumar et al. , 2020 ; Kostrikov et al. , 2021 ; Zhou et al. , 2020 ) . However , this family of algorithms might suffer from poor performance when there are a large number of discrete actions . Firstly , the value function hardly generalizes over the entire action space without proper action representations because the actions are isolated in nature . By contrast , actions can be naturally represented in continuous control tasks by their physical semantics ( e.g. , directions , forces ) ; thus , the value functions could generalize well . Secondly , with the size of the action space increasing , the state-action pairs are more sparse to the entire state-action space , resulting in a large proportion of o.o.d . actions . Consequently , the learned policies would be overly restrictive – they are constrained to only select actions within the support of in-distribution actions , without considering a large number of other o.o.d . actions that might contain the optimal action ( Zhou et al. , 2020 ; Kumar et al. , 2019 ) . In this paper , we propose a novel framework for learning Behavioral Metric of Actions ( BMA ) to accelerate the offline RL tasks with large discrete action spaces . In BMA , the policy of an agent is trained with a latent , state-conditional action space , where the action representations are learned under a pseudometric that reflects their behavioral and data-distributional similarities . The behavioral metric , inspired by the bisimulation metric defined on states ( Zhang et al. , 2021 ) , aiming to explicitly quantify how similar that two actions ’ effects are on the environment . We also define a data-distributional metric , aiming to quantify how an action deviates from those actions in the dataset . Then , we propose an architecture of action encoder to learn action representations in a self-supervised way , where ` 1 distances between representations correspond to the defined metric . The learned action representations can be combined with any offline RL algorithms and improve them in two ways . On the one hand , benefiting from the behavioral similarity between actions , the Q-function would be more smooth on the action space and , therefore , easier to converge . On the other hand , the quantified distributional distance enables the algorithm to balance between penalizing and exploring the o.o.d . actions . We theoretically prove the continuity and the bound of the Q-values using our proposed action representations . We also empirically evaluate our methods on two simulated tasks and two real-world applications with large action sets . Experimental results show that policies trained under the BMA framework significantly outperform those trained using original actions . Our pseudometric-based action representations are substantially more effective to offline RL tasks when compared to prior action representations widely used in online RL tasks . 2 RELATED WORKS . Offline RL Offline RL aims to learn policies from logged transition data without any active data collection ( Levine et al. , 2020 ) . Recently , many works have been proposed in this area ( Kumar et al. , 2019 ; Wu et al. , 2019 ; Kumar et al. , 2020 ; Kostrikov et al. , 2021 ; Fujimoto et al. , 2019b ) . They empirically and theoretically reveal that the critical issue in offline RL is the overestimation error induced by o.o.d . actions . As a result , they propose a variety of behavioral regularizations in RL training that compel the learned policy to stay close to the offline data . These regularizations consist of incorporating some divergence regularization into the critic ( Kumar et al. , 2020 ; Nachum et al. , 2019 ) , policy divergence penalties ( Kumar et al. , 2019 ; Wu et al. , 2019 ) , and appropriate network initializations ( Matsushima et al. , 2021 ) . These works show effective results in simulated tasks , like Mujoco ( Todorov et al. , 2012 ) and Atari games ( Gulcehre et al. , 2021 ) . However , we empirically show that they fail in the real-world applications with large discrete actions , likely due to the difficulty of generalization over large action sets or the excessive restriction induced by a large proportion of o.o.d . actions . Action representations in RL In online RL , continuous action representations are usually used to exploit underlying structures of large discrete action spaces , thereby accelerating policy optimization in large-scale real-world tasks , like recommender systems ( Ie et al. , 2019 ) and dialogue systems ( Lee et al. , 2019 ) . In prior works , Lee et al . ( 2018 ) uses predefined action embeddings to represent discrete actions and utilize continuous policy gradients for policy optimization . Chandak et al . ( 2019 ) avoid predefined embeddings by linking action representations to state transitions . Tennenholtz and Mannor ( 2019 ) regard action trajectories as natural languages and thus learn action representations from trajectories of expert demonstrations . Wang et al . ( 2021 ) learn action representations that focus on accurate reconstruction of rewards and next observations . Though these works show good results in online RL tasks , we empirically show that their performance is extremely unstable when combined with offline RL algorithms . The reason might be that they build statistical-based representations from raw data and thus struggle in the data-poor problem in the offline settings , especially when the action spaces are large . Furthermore , they lack an explicit scheme to regularize distances between action representations , which we find are important to the behavioral regularizations of offline RL algorithms . Our method utilizes a relation network ( Santoro et al. , 2017 ) to enforce the distances between action representations to reflect their behavioral and data-distributional relations . This provides extra information for building action representations when the offline data is sparse in the entire state-action space and helps offline RL algorithms to derive more proper behavioral regularizations . Some other works use action representations as pre-training behavioral priors or primitives ( Zhou et al. , 2020 ; Ajay et al. , 2021 ; Singh et al. , 2021 ) . They train policies on latent action spaces which are learned from past successful trials and thus avoid a serious distributional shift in offline RL . However , these works seriously rely on the offline dataset ’ s quality ; experience data with poor performance heavily limits the policy improvement . On the other hand , they focus on continuous control tasks without any specific design to address large discrete action spaces . Metrics in RL A crucial principle to generalization in reinforcement learning is to assign similar predictions to similar states . A standard implementation is to use the similarity in an adaptive fashion and group states into clusters while preserving some desired properties . The fundamental assumption behind it is the existence of a metric characterizing the real-valued distance between states ( Le Lan et al. , 2021 ) . A related concept is bisimulation metrics that measure how “ behaviorally similar '' states are Ferns et al . ( 2004 ) . Recently , Zhang et al . ( 2021 ) extend this concept by proposing a gradient-based method for learning a representation space with the properties of bisimulation metrics . In the field of offline RL , Dadashi et al . ( 2021 ) propose a pseudometric to measure the closeness of state-action pairs to the support of logged transitions , but does so directly , without learning a representation . These works mainly focus on metrics on states or state-action pairs but ignore relations between actions . We believe that our work is the first to define a behavioral and data-distributional metric on actions and show that action representations based on this metric are beneficial to offline policy improvements . 3 PRELIMINARIES . We start by introducing notation in this work . We consider the underlying environment as a Markov decision process ( MDP ) with a discrete action space , represented by the tupleM = ( S , A , P , R , γ ) . Here , S is the state space . A is a finite set of actions , called the action set , and |A| denotes the size of the action set . P andR are the transition function and the reward function , respectively , indicating that when the agent takes the action a ∈ A under the state s ∈ S , the probability of transitioning from state s to state s′ ∈ S is P ( s′|s , a ) , and there is a environmental rewardR ( s , a ) ∈ R. The goal of the agent is to learn a good policy a ∼ π ( s ) that maximizes the expected cumulative discounted rewards : EP [ ∑∞ t=1 [ γ tR ( st , π ( st ) ] ] . In online RL , the agent usually learns policy from its interacting experience with the current environment . By contrast , our work focus on the offline setting , in which the agent can not collect new experience data and learns policy from a static dataset D = { ( s , a , s′ , r ) } generated by some other policy . We call the policy that generates D the behavioral policy and denote it as πβ ( a|s ) . 4 OFFLINE RL WITH BMA . In this section , we elaborate on BMA , our proposed method for leveraging pseudometric-based action representations to address offline RL tasks with large discrete action spaces . We begin by describing the paradigm of how to train and execute policies according to the learned action representations . Next , we discuss which properties of action representations are crucial to the performance of this framework and define a pseudometric function to measure these properties . Then , we propose an action encoder structure to learn action representations complying with the desired properties from the offline dataset . Finally , we give a theoretical analysis of the generalization ability and the bound of the value function based on the learned action representation space . Overview . We first introduce a two-phase paradigm for solving such tasks . It first learns an action representation space from the experience dataset by a self-supervised learning framework , and then , train an internal policy πi on the action representation space . This internal policy can build upon arbitrary offline RL algorithms with continuous control . In detail , we first train an action eocoder φ for generating action representations and then convert the original dataset to a new datasetDe = { ( s , e , s′ , r ) } , where e = φ ( a ; s ) is the state-conditional action representation and e ∈ E . Note that we introduce how to train φ in next subsections . Then , the applied offline RL algorithm would learn an interal policy πi ( ê|s ) from De . It provides a latent action ê ∈ E for a given state , but ê would likely not be a valid action , i.e. , it does not equal any action representation e of a ∈ A . Therefore , we need to map from ê to an element in A . Here , we adopt a simple nearest neighbor lookup g ( ê ) introduced in Lee et al . ( 2018 ) : g ( ê ) = argmin a∈A ‖ê− φ ( a ; s ) ‖1 ( 1 ) where g is a mapping function from the continuous representation space to the discrete action set . It returns the original action whose representation is the closest to ê by ` 1 distance . Therefore , the overall policy πo = g ( πi ( e|s ) ) . Its scheme is also described by Fig.1 ( a ) and Alg.1 in the appendix . | This paper studies the action representation learning for offline RL with large discrete action spaces. It proposes a new metric to capture the similarity between actions, called Behavioral Metrics of Actions. The new metric has two components, one is a behavioral metric that groups actions that share the similar MDP property (i.e., reward and transition model), and the other offline specific one is distributional metric, which uses a binary variable to capture whether the two actions coming from the same data distribution. Empirical studies show superior performance over the baselines, and the ablation study demonstrates the necessity of all of the components in the metric. RL with large discrete action spaces is of interest in some real-world applications, such as recommender systems and dialogue systems, this paper gives a way to do the action abstraction to further reduce the action space and hence increase the effective sample size in any downstream learning task. | SP:41edf5e2c4d66ce3e2427c56078b81ca3e3bb5f0 |
S$^3$ADNet: Sequential Anomaly Detection with Pessimistic Contrastive Learning | Anomalies are commonly found in sequential data generated by real-world applications , such as cyberattacks in network traffic , human activity changes in wearable sensors . Thanks to the development of computing technology , many impressive results have been obtained from deep learning-based anomaly detection approaches in recent years . This paper proposes a simple neural network framework for detecting anomalies on sequential data , called Self-Supervised Sequential Anomaly Detection Network ( S3ADNet ) . S3ADNet first extracts the representations from each data point by performing feature augmentation for contrastive learning ; then captures the contextual information from the sequential data points for estimating anomaly probabilities by optimizing the context-adaptive objective . Here , we design a novel loss function based on a pessimistic policy , considering that only anomalies can affect the contextual relationships in sequences . Our proposed method outperformed other state-of-the-art approaches on the benchmark datasets by F1-score with a more straightforward architecture . 1 INTRODUCTION . Sequential anomaly detection ( SAD ) , a subtask of anomaly detection ( AD ) , focuses on detecting outliers or change points for sequential data . Sequential data are produced at a sub-millisecond rate by multifarious real-world applications , usually being of high dimensionality and high noise . Besides the complex nature of data , the sequential data points can have shifting distributions and relationships in different contexts , resulting in the concept drift problem ( Žliobaitė , 2010 ; Gama et al. , 2014 ) . Because anomalies can imply certain occurrences that endanger public safety , life , and property , such as intrusions in network connections ( Jyothsna et al. , 2011 ; Samrin & Vasumathi , 2017 ; Moustafa et al. , 2019 ) , activity changes and health irregularities in human sensing ( Nweke et al. , 2018 ; 2019 ; Serhani et al. , 2020 ) , abnormal events in video surveillance systems ( Popoola & Wang , 2012 ; Mabrouk & Zagrouba , 2018 ) , and risky signals in space technology ( Hundman et al. , 2018 ; Tariq et al. , 2019 ; Yairi et al. , 2017 ; Shin et al. , 2020 ) , SAD is a challenging but crucial task ( Pang et al. , 2021 ; Ruff et al. , 2021 ) . Learning meaningful representations from the data and capturing the contextual relationships is the key to solving SAD tasks . Generally , AD methods are in the unsupervised scheme because anomalies are considered to be much less than normal instances and hard to model . The approaches that train the models exclusively on the normal samples to identify the anomalies are one-class classification methods , such as one-class support vector machine ( OC-SVM ) ( Schölkopf et al. , 1999 ) . Since deep neural networks are expert at extracting representative features from high-dimensional and high-noise data , more and more methods leverage deep learning to handle AD tasks . Especially , autoencoders ( AEs ) ( Hinton & Zemel , 1994 ; Kingma & Welling , 2013 ) and generative adversarial networks ( GANs ) ( Goodfellow et al. , 2020 ) are frequently used as they are suitable for unsupervised learning , such as deep autoencoding Gaussian mixture model ( DAGMM ) ( Zong et al. , 2018 ) , and AnoGAN ( Schlegl et al. , 2017 ) . However , these methods could be weak in capturing the contextual information from sequences , so that some other approaches introduce recurrent neural networks ( RNNs ) ( Rumelhart et al. , 1986 ) to learn the sequential relationships . For example , the multi-scale convolutional recurrent encoder-decoder ( MSCRED ) ( Zhang et al. , 2019 ) , OmniAnomaly ( Su et al. , 2019 ) , and the temporal hierarchical one-class network ( THON ) ( Shen et al. , 2020 ) apply RNNs for time-series data modeling . Nevertheless , most of these methods still require picking out the normal data from the mess to train the one-class classifiers or generative models in practice . This paper proposes a self-supervised sequential anomaly detection network ( S3ADNet ) to learn the representations of sequential data points and extract the contextual relationships for anomaly detection . Inspired by the simple framework for contrastive learning of visual representations ( SimCLR ) ( Chen et al. , 2020 ) , we make the network generate two similar embeddings for input data points with feature augmentation , and the feature extraction layers capture the essential identities of the data points by minimizing the contrastive loss . By optimizing the contextual contrastive loss based on a pessimistic assumption system , the multi-conceptual context ( MCC ) layer estimates anomaly probabilities with the sequential relationships modeled by the learned representations for each data point . We can use arbitrary parameter-shared neural networks for the representative feature extraction . Additionally , we employ the MCC layer rather than RNN structures for a more intuitive context learning . The proposed model does not require any label information or even selecting the normal data for training one-class classifiers , yet makes the data points compare with each other to recognize anomalies . In the experiment , we compared our model ’ s estimation results to the state-of-the-art approaches using a widely used network traffic dataset and a human activity sensing dataset . Our proposed S3ADNet obtained competitive F1-score results to those methods with a simpler network architecture . 2 RELATED WORK . In this section , we review existing research endeavors related to our work . We first overview the approaches for AD and SAD tasks . Then , we outline recent contrastive learning methods for representation learning . 2.1 ANOMALY DETECTION . In a narrow sense , AD indicates outlier detection ( OD ) , where the target is the data points with extraordinary properties from most of the rest . Other than outliers , people are more concerned with change point detection ( CPD ) on sequential data since the abrupt characteristic shifts can intimate valuable and crucial information for the temporal trends . OD methods can be grouped into three categories based on the main principle of modeling : 1 ) boundary-based , 2 ) density-based , and 3 ) reconstruction-based approaches . Boundary-based methods use certain distance indexes in the model optimization or the anomaly score calculation . OCSVM is a typical boundary-based method that learns a kernel-based boundary surrounding normal data points on a hyperplane ( Schölkopf et al. , 1999 ) . Isolation Forest ( IF ) , another widely used approach , constructs trees by randomly splitting branches throughout randomly selected features and considers that the average feature path length of an anomaly to the root is larger than that of a normal instance ( Liu et al. , 2008 ) . The main idea of classic density-based methods is performing probability density estimation to maximize the likelihood for normal samples , such as using Gaussian mixture model ( GMM ) for parametric estimation or kernel density estimation ( KDE ) for nonparametric estimation ( Laxhammar et al. , 2009 ; Kim & Scott , 2012 ) . The online algorithm employed a discounting strategy to update the density for sequences ( Yamanishi et al. , 2004 ) . With the development of deep learning , deep structured energy-based models ( DSEBMs ) were proposed to model the distribution of normal data points by using deep architectures ( Zhai et al. , 2016 ) . Another deep method , DAGMM , applies autoencoder to learning data ’ s representations and predict the likelihood based on GMM ( Zong et al. , 2018 ) . Reconstruction-based methods aim to well restore data from compressed feature space for normal data points but not anomalies . Principal component analysis ( PCA ) and its variants are traditional ways for data reconstruction ( Hawkins , 1974 ; Schölkopf et al. , 1997 ; Tharrault et al. , 2008 ) , while variational AE is of deep style without handcrafted features for the sake ( An & Cho , 2015 ) . Methods using GANs can be considered to be hybrid approaches , for they model the distribution by regenerating data points in the zero-sum-game scheme , such as AnoGAN ( Schlegl et al. , 2017 ) , adversarially learned anomaly detection ( ADLD ) ( Zenati et al. , 2018 ) , Mahalanobis distance-based adversarial network ( MDAN ) ( Hou et al. , 2020 ) . For CPD , there is a similar taxonomy to OD . Fast low-cost online semantic segmentation ( FLOSS ) calculates the contextual boundaries based on the shapes of sequential patterns to eject change points ( Gharghabi et al. , 2019 ) . The autoregressive model updates the parametric probability density function across sequential data points ( Yamanishi & Takeuchi , 2002 ) . Relative unconstrained leastsquares importance fitting ( RuLSIF ) identifies whether two contiguous subsequences are from different distributions using the nonparametric divergence estimation ( Liu et al. , 2013 ) . KL-CPD gives the distribution discrepancy by using a learnable deep kernel function and reconstructing samples from two sequential segments with RNNs ( Chang et al. , 2019 ) . Entropy and shape aware time-series segmentation ( ESPRESSO ) is a hybrid approach that combines the temporal density and distance to detect changes and obtained better performance than employing one principle ( Deldari et al. , 2020 ) . Another self-supervised contrastive learning method TS-CP2 takes the subsequences which are not contiguous with the current subsequence as the negative samples for the training and then predicts whether the two subsequences are from the same distribution ( Deldari et al. , 2021 ) . TS-CP2 employs temporal convolutional networks ( TCNs ) ( Bai et al. , 2018 ) to learn contextual representations , while ours introduces the MCC layer to capture the contextual information and allows using arbitrary feature extraction networks for each data point . 2.2 CONTRASTIVE LEARNING . Recently , contrastive learning ( CL ) has grabbed much attention due to the benefit of avoiding the high cost of labeling large-scale datasets for deep representation learning in an unsupervised/selfsupervised manner ( Jaiswal et al. , 2021 ) . CL has been used for various data formats , including images ( Chen et al. , 2020 ; He et al. , 2020 ) , time series ( van den Oord et al. , 2018 ; Franceschi et al. , 2019 ) , videos ( Sermanet et al. , 2018 ; Qian et al. , 2021 ) , texts ( van den Oord et al. , 2018 ; Gao et al. , 2021 ) , and graphs ( You et al. , 2020 ; Zhu et al. , 2020 ) . The basic strategy of CL is to train a model that makes the feature distances between similar instances closer but the ones between diverse instances as far as possible . For this sake , CL methods design pretext tasks to optimize the distances and use contrastive loss or triplet loss as the learning objective ( Chen et al. , 2020 ) . Recently , data augmentation has been commonly introduced into the pretext tasks to help the feature extraction . While image data are relatively easy to augment by using conventional computer vision techniques ( Shorten & Khoshgoftaar , 2019 ) , there are several word-level ( Wei & Zou , 2019 ) and sentence-level ( Kobayashi , 2018 ) approaches for textual data augmentation . For other data formats , some domain-agnostic methods were proposed , such as adding Gaussian noise ( GN ) to embeddings ( DeVries & Taylor , 2019 ) or dropout noise ( DN ) in representation layers ( Gao et al. , 2021 ; Liang et al. , 2021 ) . GN and DN are not only easy to implement but also have low computational costs for CL tasks . In SimCLR , given a cluster of augmentation Λ and an input x , two augmentation operator λa ∼ Λ and λb ∼ Λ generate two similar instances xa = λa ( x ) and xb = λb ( x ) . Then , the feature extraction network f encodes xa and xb into two representations ha = f ( xa ) and hb = f ( xb ) . Next , the head network g projects ha and hb into two embeddings za = g ( ha ) and zb = g ( hb ) , whose similarity is maximized by minimizing a contrastive loss , the NT-Xent loss : ` NTX ( a , b ) = − log exp ( sim ( za , zb ) /T ) ∑2N n=1 exp ( sim ( za , zn ) /T ) [ n 6= a ] ( 1 ) sim ( u , v ) = u > v ‖u‖‖v‖ , ( 2 ) where T is temperature , and N denotes the minibatch size . Since the value range of Equation 2 is [ −1 , 1 ] , it is usual to set 0 < T < 1 for an efficient learning . Here , we can regard the similarity as state energy E. According to the Boltzmann distribution , the probability of a state ρ satisfies ρ ∝ exp ( −E/kT ) , where the right hand side is called the Boltzmann factor , and k is a constant ( Kittel , 2004 ) . If we use similarity to represent a sequential relationship , we can model the probability of the relationships . Also , we can adapt the temperature to control the sensitivity of the relationship ’ s strength to the probability . This finding motivated the objective function design in our method , which we will describe in Section 3.2.2 . | The paper tackles the anomaly detection of time series data. The main idea is to exploit both the sequential relation between data and the normality of the data itself. The model is learned with two stages. First, the model is learned with the sequential contrastive loss to learn data representations. Then the model is learned by minimizing the distribution between normality and exceptional relationship probability. The learning process is a self-supervised way without any supervision. The model is validated with KDDCup99 and HASC datasets. | SP:d3e9edb364a14eea4b05c0d764e78fb1d976e6d3 |
S$^3$ADNet: Sequential Anomaly Detection with Pessimistic Contrastive Learning | Anomalies are commonly found in sequential data generated by real-world applications , such as cyberattacks in network traffic , human activity changes in wearable sensors . Thanks to the development of computing technology , many impressive results have been obtained from deep learning-based anomaly detection approaches in recent years . This paper proposes a simple neural network framework for detecting anomalies on sequential data , called Self-Supervised Sequential Anomaly Detection Network ( S3ADNet ) . S3ADNet first extracts the representations from each data point by performing feature augmentation for contrastive learning ; then captures the contextual information from the sequential data points for estimating anomaly probabilities by optimizing the context-adaptive objective . Here , we design a novel loss function based on a pessimistic policy , considering that only anomalies can affect the contextual relationships in sequences . Our proposed method outperformed other state-of-the-art approaches on the benchmark datasets by F1-score with a more straightforward architecture . 1 INTRODUCTION . Sequential anomaly detection ( SAD ) , a subtask of anomaly detection ( AD ) , focuses on detecting outliers or change points for sequential data . Sequential data are produced at a sub-millisecond rate by multifarious real-world applications , usually being of high dimensionality and high noise . Besides the complex nature of data , the sequential data points can have shifting distributions and relationships in different contexts , resulting in the concept drift problem ( Žliobaitė , 2010 ; Gama et al. , 2014 ) . Because anomalies can imply certain occurrences that endanger public safety , life , and property , such as intrusions in network connections ( Jyothsna et al. , 2011 ; Samrin & Vasumathi , 2017 ; Moustafa et al. , 2019 ) , activity changes and health irregularities in human sensing ( Nweke et al. , 2018 ; 2019 ; Serhani et al. , 2020 ) , abnormal events in video surveillance systems ( Popoola & Wang , 2012 ; Mabrouk & Zagrouba , 2018 ) , and risky signals in space technology ( Hundman et al. , 2018 ; Tariq et al. , 2019 ; Yairi et al. , 2017 ; Shin et al. , 2020 ) , SAD is a challenging but crucial task ( Pang et al. , 2021 ; Ruff et al. , 2021 ) . Learning meaningful representations from the data and capturing the contextual relationships is the key to solving SAD tasks . Generally , AD methods are in the unsupervised scheme because anomalies are considered to be much less than normal instances and hard to model . The approaches that train the models exclusively on the normal samples to identify the anomalies are one-class classification methods , such as one-class support vector machine ( OC-SVM ) ( Schölkopf et al. , 1999 ) . Since deep neural networks are expert at extracting representative features from high-dimensional and high-noise data , more and more methods leverage deep learning to handle AD tasks . Especially , autoencoders ( AEs ) ( Hinton & Zemel , 1994 ; Kingma & Welling , 2013 ) and generative adversarial networks ( GANs ) ( Goodfellow et al. , 2020 ) are frequently used as they are suitable for unsupervised learning , such as deep autoencoding Gaussian mixture model ( DAGMM ) ( Zong et al. , 2018 ) , and AnoGAN ( Schlegl et al. , 2017 ) . However , these methods could be weak in capturing the contextual information from sequences , so that some other approaches introduce recurrent neural networks ( RNNs ) ( Rumelhart et al. , 1986 ) to learn the sequential relationships . For example , the multi-scale convolutional recurrent encoder-decoder ( MSCRED ) ( Zhang et al. , 2019 ) , OmniAnomaly ( Su et al. , 2019 ) , and the temporal hierarchical one-class network ( THON ) ( Shen et al. , 2020 ) apply RNNs for time-series data modeling . Nevertheless , most of these methods still require picking out the normal data from the mess to train the one-class classifiers or generative models in practice . This paper proposes a self-supervised sequential anomaly detection network ( S3ADNet ) to learn the representations of sequential data points and extract the contextual relationships for anomaly detection . Inspired by the simple framework for contrastive learning of visual representations ( SimCLR ) ( Chen et al. , 2020 ) , we make the network generate two similar embeddings for input data points with feature augmentation , and the feature extraction layers capture the essential identities of the data points by minimizing the contrastive loss . By optimizing the contextual contrastive loss based on a pessimistic assumption system , the multi-conceptual context ( MCC ) layer estimates anomaly probabilities with the sequential relationships modeled by the learned representations for each data point . We can use arbitrary parameter-shared neural networks for the representative feature extraction . Additionally , we employ the MCC layer rather than RNN structures for a more intuitive context learning . The proposed model does not require any label information or even selecting the normal data for training one-class classifiers , yet makes the data points compare with each other to recognize anomalies . In the experiment , we compared our model ’ s estimation results to the state-of-the-art approaches using a widely used network traffic dataset and a human activity sensing dataset . Our proposed S3ADNet obtained competitive F1-score results to those methods with a simpler network architecture . 2 RELATED WORK . In this section , we review existing research endeavors related to our work . We first overview the approaches for AD and SAD tasks . Then , we outline recent contrastive learning methods for representation learning . 2.1 ANOMALY DETECTION . In a narrow sense , AD indicates outlier detection ( OD ) , where the target is the data points with extraordinary properties from most of the rest . Other than outliers , people are more concerned with change point detection ( CPD ) on sequential data since the abrupt characteristic shifts can intimate valuable and crucial information for the temporal trends . OD methods can be grouped into three categories based on the main principle of modeling : 1 ) boundary-based , 2 ) density-based , and 3 ) reconstruction-based approaches . Boundary-based methods use certain distance indexes in the model optimization or the anomaly score calculation . OCSVM is a typical boundary-based method that learns a kernel-based boundary surrounding normal data points on a hyperplane ( Schölkopf et al. , 1999 ) . Isolation Forest ( IF ) , another widely used approach , constructs trees by randomly splitting branches throughout randomly selected features and considers that the average feature path length of an anomaly to the root is larger than that of a normal instance ( Liu et al. , 2008 ) . The main idea of classic density-based methods is performing probability density estimation to maximize the likelihood for normal samples , such as using Gaussian mixture model ( GMM ) for parametric estimation or kernel density estimation ( KDE ) for nonparametric estimation ( Laxhammar et al. , 2009 ; Kim & Scott , 2012 ) . The online algorithm employed a discounting strategy to update the density for sequences ( Yamanishi et al. , 2004 ) . With the development of deep learning , deep structured energy-based models ( DSEBMs ) were proposed to model the distribution of normal data points by using deep architectures ( Zhai et al. , 2016 ) . Another deep method , DAGMM , applies autoencoder to learning data ’ s representations and predict the likelihood based on GMM ( Zong et al. , 2018 ) . Reconstruction-based methods aim to well restore data from compressed feature space for normal data points but not anomalies . Principal component analysis ( PCA ) and its variants are traditional ways for data reconstruction ( Hawkins , 1974 ; Schölkopf et al. , 1997 ; Tharrault et al. , 2008 ) , while variational AE is of deep style without handcrafted features for the sake ( An & Cho , 2015 ) . Methods using GANs can be considered to be hybrid approaches , for they model the distribution by regenerating data points in the zero-sum-game scheme , such as AnoGAN ( Schlegl et al. , 2017 ) , adversarially learned anomaly detection ( ADLD ) ( Zenati et al. , 2018 ) , Mahalanobis distance-based adversarial network ( MDAN ) ( Hou et al. , 2020 ) . For CPD , there is a similar taxonomy to OD . Fast low-cost online semantic segmentation ( FLOSS ) calculates the contextual boundaries based on the shapes of sequential patterns to eject change points ( Gharghabi et al. , 2019 ) . The autoregressive model updates the parametric probability density function across sequential data points ( Yamanishi & Takeuchi , 2002 ) . Relative unconstrained leastsquares importance fitting ( RuLSIF ) identifies whether two contiguous subsequences are from different distributions using the nonparametric divergence estimation ( Liu et al. , 2013 ) . KL-CPD gives the distribution discrepancy by using a learnable deep kernel function and reconstructing samples from two sequential segments with RNNs ( Chang et al. , 2019 ) . Entropy and shape aware time-series segmentation ( ESPRESSO ) is a hybrid approach that combines the temporal density and distance to detect changes and obtained better performance than employing one principle ( Deldari et al. , 2020 ) . Another self-supervised contrastive learning method TS-CP2 takes the subsequences which are not contiguous with the current subsequence as the negative samples for the training and then predicts whether the two subsequences are from the same distribution ( Deldari et al. , 2021 ) . TS-CP2 employs temporal convolutional networks ( TCNs ) ( Bai et al. , 2018 ) to learn contextual representations , while ours introduces the MCC layer to capture the contextual information and allows using arbitrary feature extraction networks for each data point . 2.2 CONTRASTIVE LEARNING . Recently , contrastive learning ( CL ) has grabbed much attention due to the benefit of avoiding the high cost of labeling large-scale datasets for deep representation learning in an unsupervised/selfsupervised manner ( Jaiswal et al. , 2021 ) . CL has been used for various data formats , including images ( Chen et al. , 2020 ; He et al. , 2020 ) , time series ( van den Oord et al. , 2018 ; Franceschi et al. , 2019 ) , videos ( Sermanet et al. , 2018 ; Qian et al. , 2021 ) , texts ( van den Oord et al. , 2018 ; Gao et al. , 2021 ) , and graphs ( You et al. , 2020 ; Zhu et al. , 2020 ) . The basic strategy of CL is to train a model that makes the feature distances between similar instances closer but the ones between diverse instances as far as possible . For this sake , CL methods design pretext tasks to optimize the distances and use contrastive loss or triplet loss as the learning objective ( Chen et al. , 2020 ) . Recently , data augmentation has been commonly introduced into the pretext tasks to help the feature extraction . While image data are relatively easy to augment by using conventional computer vision techniques ( Shorten & Khoshgoftaar , 2019 ) , there are several word-level ( Wei & Zou , 2019 ) and sentence-level ( Kobayashi , 2018 ) approaches for textual data augmentation . For other data formats , some domain-agnostic methods were proposed , such as adding Gaussian noise ( GN ) to embeddings ( DeVries & Taylor , 2019 ) or dropout noise ( DN ) in representation layers ( Gao et al. , 2021 ; Liang et al. , 2021 ) . GN and DN are not only easy to implement but also have low computational costs for CL tasks . In SimCLR , given a cluster of augmentation Λ and an input x , two augmentation operator λa ∼ Λ and λb ∼ Λ generate two similar instances xa = λa ( x ) and xb = λb ( x ) . Then , the feature extraction network f encodes xa and xb into two representations ha = f ( xa ) and hb = f ( xb ) . Next , the head network g projects ha and hb into two embeddings za = g ( ha ) and zb = g ( hb ) , whose similarity is maximized by minimizing a contrastive loss , the NT-Xent loss : ` NTX ( a , b ) = − log exp ( sim ( za , zb ) /T ) ∑2N n=1 exp ( sim ( za , zn ) /T ) [ n 6= a ] ( 1 ) sim ( u , v ) = u > v ‖u‖‖v‖ , ( 2 ) where T is temperature , and N denotes the minibatch size . Since the value range of Equation 2 is [ −1 , 1 ] , it is usual to set 0 < T < 1 for an efficient learning . Here , we can regard the similarity as state energy E. According to the Boltzmann distribution , the probability of a state ρ satisfies ρ ∝ exp ( −E/kT ) , where the right hand side is called the Boltzmann factor , and k is a constant ( Kittel , 2004 ) . If we use similarity to represent a sequential relationship , we can model the probability of the relationships . Also , we can adapt the temperature to control the sensitivity of the relationship ’ s strength to the probability . This finding motivated the objective function design in our method , which we will describe in Section 3.2.2 . | In this paper the authors present a method for deep anomaly detection. They being by stating a few assumptions their method is based on. Then then develop two loss terms. The first loss term is based on contrastive learning with an additional term. Their second term is used for determining the anomaly score and is based on how well each "data point" fits to concept. They validate their method on a couple of datasets and their method works pretty well. | SP:d3e9edb364a14eea4b05c0d764e78fb1d976e6d3 |
S$^3$ADNet: Sequential Anomaly Detection with Pessimistic Contrastive Learning | Anomalies are commonly found in sequential data generated by real-world applications , such as cyberattacks in network traffic , human activity changes in wearable sensors . Thanks to the development of computing technology , many impressive results have been obtained from deep learning-based anomaly detection approaches in recent years . This paper proposes a simple neural network framework for detecting anomalies on sequential data , called Self-Supervised Sequential Anomaly Detection Network ( S3ADNet ) . S3ADNet first extracts the representations from each data point by performing feature augmentation for contrastive learning ; then captures the contextual information from the sequential data points for estimating anomaly probabilities by optimizing the context-adaptive objective . Here , we design a novel loss function based on a pessimistic policy , considering that only anomalies can affect the contextual relationships in sequences . Our proposed method outperformed other state-of-the-art approaches on the benchmark datasets by F1-score with a more straightforward architecture . 1 INTRODUCTION . Sequential anomaly detection ( SAD ) , a subtask of anomaly detection ( AD ) , focuses on detecting outliers or change points for sequential data . Sequential data are produced at a sub-millisecond rate by multifarious real-world applications , usually being of high dimensionality and high noise . Besides the complex nature of data , the sequential data points can have shifting distributions and relationships in different contexts , resulting in the concept drift problem ( Žliobaitė , 2010 ; Gama et al. , 2014 ) . Because anomalies can imply certain occurrences that endanger public safety , life , and property , such as intrusions in network connections ( Jyothsna et al. , 2011 ; Samrin & Vasumathi , 2017 ; Moustafa et al. , 2019 ) , activity changes and health irregularities in human sensing ( Nweke et al. , 2018 ; 2019 ; Serhani et al. , 2020 ) , abnormal events in video surveillance systems ( Popoola & Wang , 2012 ; Mabrouk & Zagrouba , 2018 ) , and risky signals in space technology ( Hundman et al. , 2018 ; Tariq et al. , 2019 ; Yairi et al. , 2017 ; Shin et al. , 2020 ) , SAD is a challenging but crucial task ( Pang et al. , 2021 ; Ruff et al. , 2021 ) . Learning meaningful representations from the data and capturing the contextual relationships is the key to solving SAD tasks . Generally , AD methods are in the unsupervised scheme because anomalies are considered to be much less than normal instances and hard to model . The approaches that train the models exclusively on the normal samples to identify the anomalies are one-class classification methods , such as one-class support vector machine ( OC-SVM ) ( Schölkopf et al. , 1999 ) . Since deep neural networks are expert at extracting representative features from high-dimensional and high-noise data , more and more methods leverage deep learning to handle AD tasks . Especially , autoencoders ( AEs ) ( Hinton & Zemel , 1994 ; Kingma & Welling , 2013 ) and generative adversarial networks ( GANs ) ( Goodfellow et al. , 2020 ) are frequently used as they are suitable for unsupervised learning , such as deep autoencoding Gaussian mixture model ( DAGMM ) ( Zong et al. , 2018 ) , and AnoGAN ( Schlegl et al. , 2017 ) . However , these methods could be weak in capturing the contextual information from sequences , so that some other approaches introduce recurrent neural networks ( RNNs ) ( Rumelhart et al. , 1986 ) to learn the sequential relationships . For example , the multi-scale convolutional recurrent encoder-decoder ( MSCRED ) ( Zhang et al. , 2019 ) , OmniAnomaly ( Su et al. , 2019 ) , and the temporal hierarchical one-class network ( THON ) ( Shen et al. , 2020 ) apply RNNs for time-series data modeling . Nevertheless , most of these methods still require picking out the normal data from the mess to train the one-class classifiers or generative models in practice . This paper proposes a self-supervised sequential anomaly detection network ( S3ADNet ) to learn the representations of sequential data points and extract the contextual relationships for anomaly detection . Inspired by the simple framework for contrastive learning of visual representations ( SimCLR ) ( Chen et al. , 2020 ) , we make the network generate two similar embeddings for input data points with feature augmentation , and the feature extraction layers capture the essential identities of the data points by minimizing the contrastive loss . By optimizing the contextual contrastive loss based on a pessimistic assumption system , the multi-conceptual context ( MCC ) layer estimates anomaly probabilities with the sequential relationships modeled by the learned representations for each data point . We can use arbitrary parameter-shared neural networks for the representative feature extraction . Additionally , we employ the MCC layer rather than RNN structures for a more intuitive context learning . The proposed model does not require any label information or even selecting the normal data for training one-class classifiers , yet makes the data points compare with each other to recognize anomalies . In the experiment , we compared our model ’ s estimation results to the state-of-the-art approaches using a widely used network traffic dataset and a human activity sensing dataset . Our proposed S3ADNet obtained competitive F1-score results to those methods with a simpler network architecture . 2 RELATED WORK . In this section , we review existing research endeavors related to our work . We first overview the approaches for AD and SAD tasks . Then , we outline recent contrastive learning methods for representation learning . 2.1 ANOMALY DETECTION . In a narrow sense , AD indicates outlier detection ( OD ) , where the target is the data points with extraordinary properties from most of the rest . Other than outliers , people are more concerned with change point detection ( CPD ) on sequential data since the abrupt characteristic shifts can intimate valuable and crucial information for the temporal trends . OD methods can be grouped into three categories based on the main principle of modeling : 1 ) boundary-based , 2 ) density-based , and 3 ) reconstruction-based approaches . Boundary-based methods use certain distance indexes in the model optimization or the anomaly score calculation . OCSVM is a typical boundary-based method that learns a kernel-based boundary surrounding normal data points on a hyperplane ( Schölkopf et al. , 1999 ) . Isolation Forest ( IF ) , another widely used approach , constructs trees by randomly splitting branches throughout randomly selected features and considers that the average feature path length of an anomaly to the root is larger than that of a normal instance ( Liu et al. , 2008 ) . The main idea of classic density-based methods is performing probability density estimation to maximize the likelihood for normal samples , such as using Gaussian mixture model ( GMM ) for parametric estimation or kernel density estimation ( KDE ) for nonparametric estimation ( Laxhammar et al. , 2009 ; Kim & Scott , 2012 ) . The online algorithm employed a discounting strategy to update the density for sequences ( Yamanishi et al. , 2004 ) . With the development of deep learning , deep structured energy-based models ( DSEBMs ) were proposed to model the distribution of normal data points by using deep architectures ( Zhai et al. , 2016 ) . Another deep method , DAGMM , applies autoencoder to learning data ’ s representations and predict the likelihood based on GMM ( Zong et al. , 2018 ) . Reconstruction-based methods aim to well restore data from compressed feature space for normal data points but not anomalies . Principal component analysis ( PCA ) and its variants are traditional ways for data reconstruction ( Hawkins , 1974 ; Schölkopf et al. , 1997 ; Tharrault et al. , 2008 ) , while variational AE is of deep style without handcrafted features for the sake ( An & Cho , 2015 ) . Methods using GANs can be considered to be hybrid approaches , for they model the distribution by regenerating data points in the zero-sum-game scheme , such as AnoGAN ( Schlegl et al. , 2017 ) , adversarially learned anomaly detection ( ADLD ) ( Zenati et al. , 2018 ) , Mahalanobis distance-based adversarial network ( MDAN ) ( Hou et al. , 2020 ) . For CPD , there is a similar taxonomy to OD . Fast low-cost online semantic segmentation ( FLOSS ) calculates the contextual boundaries based on the shapes of sequential patterns to eject change points ( Gharghabi et al. , 2019 ) . The autoregressive model updates the parametric probability density function across sequential data points ( Yamanishi & Takeuchi , 2002 ) . Relative unconstrained leastsquares importance fitting ( RuLSIF ) identifies whether two contiguous subsequences are from different distributions using the nonparametric divergence estimation ( Liu et al. , 2013 ) . KL-CPD gives the distribution discrepancy by using a learnable deep kernel function and reconstructing samples from two sequential segments with RNNs ( Chang et al. , 2019 ) . Entropy and shape aware time-series segmentation ( ESPRESSO ) is a hybrid approach that combines the temporal density and distance to detect changes and obtained better performance than employing one principle ( Deldari et al. , 2020 ) . Another self-supervised contrastive learning method TS-CP2 takes the subsequences which are not contiguous with the current subsequence as the negative samples for the training and then predicts whether the two subsequences are from the same distribution ( Deldari et al. , 2021 ) . TS-CP2 employs temporal convolutional networks ( TCNs ) ( Bai et al. , 2018 ) to learn contextual representations , while ours introduces the MCC layer to capture the contextual information and allows using arbitrary feature extraction networks for each data point . 2.2 CONTRASTIVE LEARNING . Recently , contrastive learning ( CL ) has grabbed much attention due to the benefit of avoiding the high cost of labeling large-scale datasets for deep representation learning in an unsupervised/selfsupervised manner ( Jaiswal et al. , 2021 ) . CL has been used for various data formats , including images ( Chen et al. , 2020 ; He et al. , 2020 ) , time series ( van den Oord et al. , 2018 ; Franceschi et al. , 2019 ) , videos ( Sermanet et al. , 2018 ; Qian et al. , 2021 ) , texts ( van den Oord et al. , 2018 ; Gao et al. , 2021 ) , and graphs ( You et al. , 2020 ; Zhu et al. , 2020 ) . The basic strategy of CL is to train a model that makes the feature distances between similar instances closer but the ones between diverse instances as far as possible . For this sake , CL methods design pretext tasks to optimize the distances and use contrastive loss or triplet loss as the learning objective ( Chen et al. , 2020 ) . Recently , data augmentation has been commonly introduced into the pretext tasks to help the feature extraction . While image data are relatively easy to augment by using conventional computer vision techniques ( Shorten & Khoshgoftaar , 2019 ) , there are several word-level ( Wei & Zou , 2019 ) and sentence-level ( Kobayashi , 2018 ) approaches for textual data augmentation . For other data formats , some domain-agnostic methods were proposed , such as adding Gaussian noise ( GN ) to embeddings ( DeVries & Taylor , 2019 ) or dropout noise ( DN ) in representation layers ( Gao et al. , 2021 ; Liang et al. , 2021 ) . GN and DN are not only easy to implement but also have low computational costs for CL tasks . In SimCLR , given a cluster of augmentation Λ and an input x , two augmentation operator λa ∼ Λ and λb ∼ Λ generate two similar instances xa = λa ( x ) and xb = λb ( x ) . Then , the feature extraction network f encodes xa and xb into two representations ha = f ( xa ) and hb = f ( xb ) . Next , the head network g projects ha and hb into two embeddings za = g ( ha ) and zb = g ( hb ) , whose similarity is maximized by minimizing a contrastive loss , the NT-Xent loss : ` NTX ( a , b ) = − log exp ( sim ( za , zb ) /T ) ∑2N n=1 exp ( sim ( za , zn ) /T ) [ n 6= a ] ( 1 ) sim ( u , v ) = u > v ‖u‖‖v‖ , ( 2 ) where T is temperature , and N denotes the minibatch size . Since the value range of Equation 2 is [ −1 , 1 ] , it is usual to set 0 < T < 1 for an efficient learning . Here , we can regard the similarity as state energy E. According to the Boltzmann distribution , the probability of a state ρ satisfies ρ ∝ exp ( −E/kT ) , where the right hand side is called the Boltzmann factor , and k is a constant ( Kittel , 2004 ) . If we use similarity to represent a sequential relationship , we can model the probability of the relationships . Also , we can adapt the temperature to control the sensitivity of the relationship ’ s strength to the probability . This finding motivated the objective function design in our method , which we will describe in Section 3.2.2 . | · The author propose a contrastive learning framework for sequential outlier detection. · The author extract sequential feature representation for individual data points by applying dropout and Gaussian noise to SimCLR. · The author propose a contextual contrastive loss via developing a multi-conceptual pooling layer to minimize the distance between the probability distribution of anomalies and whole datasets. | SP:d3e9edb364a14eea4b05c0d764e78fb1d976e6d3 |
On the regularization landscape for the linear recommendation models | 1 INTRODUCTION . Research progress on algorithms for recommendation has escalated in recent years , partially fueled by the adoption of deep learning ( DL ) techniques . However , recent studies have found that many new deep learning recommendation models have shown sub-par performance against simpler linear recommendation models ( Dacrema et al. , 2019 ; Rendle et al. , 2019 ) . Although some studies are available to analyze linear vs non-linear models ( Dacrema et al. , 2019 ) , it remains puzzling why these seemingly different techniques all result in models with similar performance or even similar cost functions . In the latest study , Jin et al . ( 2021 ) examine the relationship between the widely used matrix factorization ( MF ) , such as ALS ( Hu et al. , 2008 ) , and the linear autoencoder ( LAE ) which encompasses the recent performance leaders , such as EASE ( Steck , 2019 ) and EDLAE ( Steck , 2020 ) . They considered two basic regularization forms ( see Eqs . ( 1 ) and ( 6 ) ) and found that the optimal ( closed-form ) solutions of both models recover the directions of principal components , while shrinking the corresponding singular values differently . They suggest that the difference may enable LAE to utilize a larger number of latent dimensions to improve recommendation accuracy . This finding highlights the similarity and difference between LAE and MF . In this paper , we go much beyond the two basic models studied in ( Jin et al. , 2021 ) , to analyze a large number of recent performance leaders of ( linear ) recommendation algorithms , and aim to provide an in-depth understanding of various regularized objective functions and towards unifying them through their closed-form solutions . In return , the closed-forms serve as the barebones engine to help reveal what drives the performance improvement for the recent recommendation algorithms . We examine three open and closely related questions : ( i ) Characterization of models : Recent recommendation models are built upon a diverse set of techniques , including dropouts ( Srivastava et al. , 2014 ) , variational methods ( Kingma & Welling , 2014 ) , and matrix denoising ( Tipping & Bishop , 1999b ) . We aim to identify a unified regularization framework to ( re ) -interpret different models and understand how they are related . We are specifically interested in how models based on variational autoencoder ( VAE , a natural generalization of recent approaches ) relate to other models ( Liang et al. , 2018 ) . ( ii ) Weighted generalization of regularizers : A key idea in a recent performance leader EDLAE ( Steck , 2020 ) is to utilize of weighted/non-uniform regularizers on the parameters ’ Frobenius norm . Applying dropouts ( Cavazza et al. , 2018 ) is shown to be equivalent to re-weighting the exponents in the regularizers , such as designing the weighted sum of regularizers based on other norms or tuning the exponent weights . We are also interested in determining what circumstance closed-form solutions still exist . ( iii ) Low-rank closed-form solutions for EDLAE . While most linear recommendation models are shown to have closed-form solutions , the low-rank version of recent performance leader EDLAE ( Steck , 2020 ) remains an exception . Fitting this model requires using ADMM ( Steck , 2020 ) . Although its performance may not be better than its full-rank counterpart , low-rank solutions are easier to interpret , use less storage , and can be more scalable with respect to the number of items . In addition , a closed-form solution disentangles key performance drivers from nuances ( e.g. , need to tune learning rate or deal with local optimal ) , and can help reveal the key driven factors comparing with other closed-form solutions . More importantly , such solutions are significantly easier to implement and be tested using a generic matrix computation platform ( without specialized recommendation library ) . Can we approximate low-rank EDLAE with closed-form solutions ? Our investigation led to the following discovery and resolves the above questions : Regularizer dichotomy ( Section 2 ) : We found that all of the leading ( linear ) recommendation models can be categorized into those that implement possibly weighted nuclear-norm regularizers , or those that implement Frobenius-norm regularizers . Specifically , we characterize the Variational Linear Autoencoders ( VLAE ) as a form of the weighted nuclear-norm regularization problem , in which the weights possess a specific combinatorial structure . We observe that it is not matrix factorization or LAE that determines the shrinkage structure ( as Jin et al . ( 2021 ) suggested ) , but instead it is the form of regularization . Thus , our paper provides a more complete and accurate characterization of a linear recommendation model ’ s performance under different regularizations . Rigidity of nuclear-norm regularizers ( Section 3 ) : With the dichotomy result , we next aim to understand whether the weighted sum idea for Frobenius-norm regularizers ( Steck , 2020 ; Jin et al. , 2021 ) can be generalized to nuclear-norm regularizers , and whether tuning exponent weights can be beneficial . First , while VLAE is equivalent to nuclear-norm regularization and is easier to optimize ( weighted nuclear norms are non-smooth but VLAE ’ s objectives are smooth ) , its closedform solution possesses a ( surprisingly ) rigid structure , i.e. , the weighted regularization will lead to an auto-sorting singular value reduction and the larger single values tend to receive smaller reduction ( non-ascending reduction ) . Second , it has been shown that the solution structure for a model with a squared nuclear-norm regularizer ∥W∥2∗ ( i.e. , dropout ’ s equivalence ) is strikingly similar to that for using ∥W∥∗-regularizer ( Gu et al. , 2014 ) . We generalize the result to show that the solution structures for ∥W∥p∗ are highly similar for all p ≥ 1 ( Regularization invariant/rigidity with respect to p ) . But when p = 1 , 2 , the solution and hyperparameters possess favorable properties which make hyperparameter searches easier . This also partially explains why only p = 1 , 2 have been extensively considered . These rigidity properties severely limit the search space and explains why models that use only nuclear-norm regularizers share the same performance ceiling even when hyperparameters are extensively searched . Closed-form solution for low-rank EDLAE ( Section 4 ) : The ( weighted ) Frobenius-norm regularizers ∥ΛW∥2F ( Λ is the hyperparameter diagonal matrix ) are implemented in EASE ( Steck , 2019 ) and EDLAE ( Steck , 2020 ) . These models produce closed-form full-rank estimators ; and if the zero-diagonal constraint on W is enforced , their singular vectors will no longer coincide with those of the data , and will deliver ( slightly ) better performance . However , no closed-form solution for the low-rank estimator is known and existing approaches rely on ADMM or Alternating Least Square ( Steck , 2020 ) . In this paper , we propose two low-rank , closed-form estimators that deliver comparable results to the full-rank models ( EASE and full-rank EDLAE ) as well as the ADMM-based solutions ( Steck , 2020 ) , and thus resolve the aforementioned third open question . 2 BACKGROUND AND REGULARIZER DICHOTOMY . This section first explains the background , and then give an overview of the dichotomy results . Some key theorems are deferred to Section 3 and Appendices . Background . Recommendation algorithms can be categorized into explicit ones that aim to predict unseen ratings between a user and an item and implicit ones that aim to predict actions , such as user click or add-cart ( Steck , 2019 ; Dacrema et al. , 2019 ; Zhang et al. , 2019 ) . We focus on the implicit Table 1 : Investigating the closed/analytic solutions of linear models . dMat ( · ) denotes a diagonal matrix , diag ( X ) is the vector on the diagonal of X . Λ is the ( hyperparameter ) diagonal matrix as a coefficient of the regularization term . W ∗ ( or P ∗ , Q∗ , etc ) is the optimal solution for corresponding case , except for cases 9-12 , where Ŵ is the low-rank closed-form solution . Model Regularization Solution Nuclear norm 1 . Regularized PCA ( Zheng et al. , 2018 ) min P , Q ||X − PQ||2F + λ · ( ||P ||2F + ||Q||2F ) X SVD = UΣV T Ω = √ ( σi − λ ) + P ∗ = Uk Q ∗ = ΩV Tk 2 . MF dropout ( Cavazza et al. , 2018 ) min P , Q , d ||X − PQ||2F + d 1− p p · d∑ k=1 ||Pk||22 · ||QTk ||22 min Y ||X − Y ||2F + 1− p p ||Y ||2∗ X SVD = UΣV T Y ∗ = P ∗ ·Q∗ = U · Sµ ( Σ ) · V T 3 . WLAE ( Bao et al. , 2020 ) min W1 , W2 ∥X −XW1W2∥2F + ∥W1Λ 1 2 ∥2F + ∥Λ 1 2W2∥2F , W ∗1 = V ( I − ΛS−2 ) 1 2PT W ∗2 = P ( I − ΛS−2 ) 1 2V T 4 . VLAE ( this paper ) min P , Q ||X − PQ||2F + ||Λ1/2Q||2F + ||PΛ1/2||2F min A , B ||X −XAB||2F + ||ΛB||2F + ||XA||2F min rank ( W ) ≤k ||X −W ||2F + 2||W ||w , ∗ X SVD = UΣV T P ∗ = Uk · diag ( √ σ1 − λ ( k ) , . . . , √ σk − λ ( 1 ) ) · Ω Q∗ = ΩT · diag ( √ σ1 − λ ( k ) , . . . , √ σk − λ ( 1 ) ) · V Tk A∗ = X†P ∗Λ 1 2 B∗ = Λ− 1 2Q∗ Frobenius norm 5 . EASE ( full rank ) ( Steck , 2019 ) min W ||X −XW ||2F + λ · ||W ||2F s.t . diag ( W ) = 0 C = ( XTX + λI ) −1 W ∗ = I − C · dMat ( diag ( 1⊘ C ) ) 6 . DLAE ( full rank ) ( Steck , 2020 ) min W ||X −XW ||2F + ||Λ1/2 ·W ||2F Λ = p 1− p dMat ( diag ( XTX ) ) W ∗ = ( XTX + Λ ) −1XTX 7 . EDLAE ( full rank ) ( Steck , 2020 ) min W ||X −XW ||2F + ||Λ1/2 ·W ||2F Λ = p 1− p dMat ( diag ( XTX ) ) s.t . diag ( W ) = 0 C = ( XTX + Λ ) −1 W ∗ = I − C · dMat ( diag ( 1⊘ C ) ) 8 . LRR ( Jin et al. , 2021 ) min rank ( W ) ≤k ||X −XW ||2F + ||ΓW ||2F Y ∗ = XW ∗ SVD = UΣV Ŵ = ( XTX + ΓTΓ ) −1XTX ( VkV T k ) 9 . EDLAE-ADMM ( Steck , 2020 ) min A , B ||X −X ( AB − dMat ( diag ( AB ) ) ) ||2F +||Λ1/2 · ( AB − dMat ( diag ( AB ) ) ||2F ADMM update A , B 10 . LR-DLAE ( this paper ) min rank ( W ) ≤k ||X −XW ||2F + ||Λ1/2 ·W ||2F Λ = p 1− p dMat ( diag ( XTX ) ) W ∗ = ( XTX + Λ ) −1XTX Y ∗ = XW ∗ SVD = UΣV T Ŵ = W ∗ ( VkV T k ) 11 . LR-EDLAE-1 ( this paper ) min rank ( W ′ ) ≤k ||X −XW ||2F + ||Λ1/2 ·W ||2F W = W ′ − dMat ( diag ( W ′ ) ) Λ = p 1− p dMat ( diag ( XTX ) ) C = ( XTX + Λ ) −1 W ∗ = I − C · dMat ( diag ( 1⊘ C ) ) Y ∗ = XW ∗ SVD = UΣV T Ŵ = W ∗ ( VkV T k ) 12 . LR-EDLAE-2 ( this paper ) min rank ( W ′ ) ≤k ||X −XW ||2F + ||Λ1/2 ·W ||2F W = W ′ − dMat ( diag ( W ′ ) ) Λ = p 1− p dMat ( diag ( XTX ) ) C = ( XTX + Λ ) −1 W ∗ = I − C · dMat ( diag ( 1⊘ C ) ) W ∗ SVD = UΣV T Ŵ = UkΣkV T k problem because it is more economically relevant . Here , let n be the number of items and m be the number of users . We are given a binary matrix X ∈ { 0 , 1 } m×n that represents the interaction between users and items so far , i.e. , Xi , j = 1 iff user i has purchased or made a rating on item j . Our goal is to produce a real-valued matrix X̂ , which we evaluate against future interactions using information retrieval ( Top-k ) metrics such as Recall or nDCG . The problem is closely related to matrix completion ( MC ) because Xi , j = 0 can be viewed as “ missing a data point ” . But MC ’ s evaluation metric is mean-squared error and is different from ours ( Candès & Tao , 2010 ) . The connection between two problems results in models with similar objectives ( Zheng et al. , 2018 ) . A technique developed for one problem often finds its counterpart for the other . Nevertheless , because of the difference in evaluation , efficacy of an algorithm for one problem does not imply its performance guarantee for the other . Thus , the non-overlapping component between two problems remains substantial . We also remark that our structural results on weighted nuclear-norm is new and applicable to MC . | This paper unifies under one theoretical framework the different state-of-the-art regularization approaches for linear collaborative-filtering recommendation models which leverage the user-item interaction data matrix. The authors classify these algorithms among two families: 1) the nuclear-norm-based regularizers and 2) the Frobenius-norm-based regularizers. Both have their advantages and drawbacks. While nuclear-norm-based regularizer's solutions are low-rank (and therefore more scalable) and have a closed form, their performance is limited. On the other hand, Frobenius-norm-based regularizer's solutions are full-rank or difficult to train. Hence, focusing on generalizing Frobenius-norm-based regularizers, the authors bridge the gap between the two families by providing two new low-rank, closed-forms solutions - LR-EDLAE-1 and LR-EDLAE-2 - peforming similarly to full-rank EASE and EDLAE state-of-the-art models. To that purpose, the authors start from the analysis work from Jin et al. (2021) about the relationship between Matrix Factorization approaches and linear autoencoders-based ones. Besides EASE and EDLAE algorithms, they also analyze VLAE, DLAE and LRR. They show that VLAE solves a weighted nuclear-norm regularixation problem. They also generalize the result on the equivalence between dropout technique and the adding of a squared nuclear-norm regularizer to show that solution structures for ||W||^p_* are similar for all p>= 1. | SP:1abc8731d94f1f06bbf4ac89728edaa9bda39313 |
On the regularization landscape for the linear recommendation models | 1 INTRODUCTION . Research progress on algorithms for recommendation has escalated in recent years , partially fueled by the adoption of deep learning ( DL ) techniques . However , recent studies have found that many new deep learning recommendation models have shown sub-par performance against simpler linear recommendation models ( Dacrema et al. , 2019 ; Rendle et al. , 2019 ) . Although some studies are available to analyze linear vs non-linear models ( Dacrema et al. , 2019 ) , it remains puzzling why these seemingly different techniques all result in models with similar performance or even similar cost functions . In the latest study , Jin et al . ( 2021 ) examine the relationship between the widely used matrix factorization ( MF ) , such as ALS ( Hu et al. , 2008 ) , and the linear autoencoder ( LAE ) which encompasses the recent performance leaders , such as EASE ( Steck , 2019 ) and EDLAE ( Steck , 2020 ) . They considered two basic regularization forms ( see Eqs . ( 1 ) and ( 6 ) ) and found that the optimal ( closed-form ) solutions of both models recover the directions of principal components , while shrinking the corresponding singular values differently . They suggest that the difference may enable LAE to utilize a larger number of latent dimensions to improve recommendation accuracy . This finding highlights the similarity and difference between LAE and MF . In this paper , we go much beyond the two basic models studied in ( Jin et al. , 2021 ) , to analyze a large number of recent performance leaders of ( linear ) recommendation algorithms , and aim to provide an in-depth understanding of various regularized objective functions and towards unifying them through their closed-form solutions . In return , the closed-forms serve as the barebones engine to help reveal what drives the performance improvement for the recent recommendation algorithms . We examine three open and closely related questions : ( i ) Characterization of models : Recent recommendation models are built upon a diverse set of techniques , including dropouts ( Srivastava et al. , 2014 ) , variational methods ( Kingma & Welling , 2014 ) , and matrix denoising ( Tipping & Bishop , 1999b ) . We aim to identify a unified regularization framework to ( re ) -interpret different models and understand how they are related . We are specifically interested in how models based on variational autoencoder ( VAE , a natural generalization of recent approaches ) relate to other models ( Liang et al. , 2018 ) . ( ii ) Weighted generalization of regularizers : A key idea in a recent performance leader EDLAE ( Steck , 2020 ) is to utilize of weighted/non-uniform regularizers on the parameters ’ Frobenius norm . Applying dropouts ( Cavazza et al. , 2018 ) is shown to be equivalent to re-weighting the exponents in the regularizers , such as designing the weighted sum of regularizers based on other norms or tuning the exponent weights . We are also interested in determining what circumstance closed-form solutions still exist . ( iii ) Low-rank closed-form solutions for EDLAE . While most linear recommendation models are shown to have closed-form solutions , the low-rank version of recent performance leader EDLAE ( Steck , 2020 ) remains an exception . Fitting this model requires using ADMM ( Steck , 2020 ) . Although its performance may not be better than its full-rank counterpart , low-rank solutions are easier to interpret , use less storage , and can be more scalable with respect to the number of items . In addition , a closed-form solution disentangles key performance drivers from nuances ( e.g. , need to tune learning rate or deal with local optimal ) , and can help reveal the key driven factors comparing with other closed-form solutions . More importantly , such solutions are significantly easier to implement and be tested using a generic matrix computation platform ( without specialized recommendation library ) . Can we approximate low-rank EDLAE with closed-form solutions ? Our investigation led to the following discovery and resolves the above questions : Regularizer dichotomy ( Section 2 ) : We found that all of the leading ( linear ) recommendation models can be categorized into those that implement possibly weighted nuclear-norm regularizers , or those that implement Frobenius-norm regularizers . Specifically , we characterize the Variational Linear Autoencoders ( VLAE ) as a form of the weighted nuclear-norm regularization problem , in which the weights possess a specific combinatorial structure . We observe that it is not matrix factorization or LAE that determines the shrinkage structure ( as Jin et al . ( 2021 ) suggested ) , but instead it is the form of regularization . Thus , our paper provides a more complete and accurate characterization of a linear recommendation model ’ s performance under different regularizations . Rigidity of nuclear-norm regularizers ( Section 3 ) : With the dichotomy result , we next aim to understand whether the weighted sum idea for Frobenius-norm regularizers ( Steck , 2020 ; Jin et al. , 2021 ) can be generalized to nuclear-norm regularizers , and whether tuning exponent weights can be beneficial . First , while VLAE is equivalent to nuclear-norm regularization and is easier to optimize ( weighted nuclear norms are non-smooth but VLAE ’ s objectives are smooth ) , its closedform solution possesses a ( surprisingly ) rigid structure , i.e. , the weighted regularization will lead to an auto-sorting singular value reduction and the larger single values tend to receive smaller reduction ( non-ascending reduction ) . Second , it has been shown that the solution structure for a model with a squared nuclear-norm regularizer ∥W∥2∗ ( i.e. , dropout ’ s equivalence ) is strikingly similar to that for using ∥W∥∗-regularizer ( Gu et al. , 2014 ) . We generalize the result to show that the solution structures for ∥W∥p∗ are highly similar for all p ≥ 1 ( Regularization invariant/rigidity with respect to p ) . But when p = 1 , 2 , the solution and hyperparameters possess favorable properties which make hyperparameter searches easier . This also partially explains why only p = 1 , 2 have been extensively considered . These rigidity properties severely limit the search space and explains why models that use only nuclear-norm regularizers share the same performance ceiling even when hyperparameters are extensively searched . Closed-form solution for low-rank EDLAE ( Section 4 ) : The ( weighted ) Frobenius-norm regularizers ∥ΛW∥2F ( Λ is the hyperparameter diagonal matrix ) are implemented in EASE ( Steck , 2019 ) and EDLAE ( Steck , 2020 ) . These models produce closed-form full-rank estimators ; and if the zero-diagonal constraint on W is enforced , their singular vectors will no longer coincide with those of the data , and will deliver ( slightly ) better performance . However , no closed-form solution for the low-rank estimator is known and existing approaches rely on ADMM or Alternating Least Square ( Steck , 2020 ) . In this paper , we propose two low-rank , closed-form estimators that deliver comparable results to the full-rank models ( EASE and full-rank EDLAE ) as well as the ADMM-based solutions ( Steck , 2020 ) , and thus resolve the aforementioned third open question . 2 BACKGROUND AND REGULARIZER DICHOTOMY . This section first explains the background , and then give an overview of the dichotomy results . Some key theorems are deferred to Section 3 and Appendices . Background . Recommendation algorithms can be categorized into explicit ones that aim to predict unseen ratings between a user and an item and implicit ones that aim to predict actions , such as user click or add-cart ( Steck , 2019 ; Dacrema et al. , 2019 ; Zhang et al. , 2019 ) . We focus on the implicit Table 1 : Investigating the closed/analytic solutions of linear models . dMat ( · ) denotes a diagonal matrix , diag ( X ) is the vector on the diagonal of X . Λ is the ( hyperparameter ) diagonal matrix as a coefficient of the regularization term . W ∗ ( or P ∗ , Q∗ , etc ) is the optimal solution for corresponding case , except for cases 9-12 , where Ŵ is the low-rank closed-form solution . Model Regularization Solution Nuclear norm 1 . Regularized PCA ( Zheng et al. , 2018 ) min P , Q ||X − PQ||2F + λ · ( ||P ||2F + ||Q||2F ) X SVD = UΣV T Ω = √ ( σi − λ ) + P ∗ = Uk Q ∗ = ΩV Tk 2 . MF dropout ( Cavazza et al. , 2018 ) min P , Q , d ||X − PQ||2F + d 1− p p · d∑ k=1 ||Pk||22 · ||QTk ||22 min Y ||X − Y ||2F + 1− p p ||Y ||2∗ X SVD = UΣV T Y ∗ = P ∗ ·Q∗ = U · Sµ ( Σ ) · V T 3 . WLAE ( Bao et al. , 2020 ) min W1 , W2 ∥X −XW1W2∥2F + ∥W1Λ 1 2 ∥2F + ∥Λ 1 2W2∥2F , W ∗1 = V ( I − ΛS−2 ) 1 2PT W ∗2 = P ( I − ΛS−2 ) 1 2V T 4 . VLAE ( this paper ) min P , Q ||X − PQ||2F + ||Λ1/2Q||2F + ||PΛ1/2||2F min A , B ||X −XAB||2F + ||ΛB||2F + ||XA||2F min rank ( W ) ≤k ||X −W ||2F + 2||W ||w , ∗ X SVD = UΣV T P ∗ = Uk · diag ( √ σ1 − λ ( k ) , . . . , √ σk − λ ( 1 ) ) · Ω Q∗ = ΩT · diag ( √ σ1 − λ ( k ) , . . . , √ σk − λ ( 1 ) ) · V Tk A∗ = X†P ∗Λ 1 2 B∗ = Λ− 1 2Q∗ Frobenius norm 5 . EASE ( full rank ) ( Steck , 2019 ) min W ||X −XW ||2F + λ · ||W ||2F s.t . diag ( W ) = 0 C = ( XTX + λI ) −1 W ∗ = I − C · dMat ( diag ( 1⊘ C ) ) 6 . DLAE ( full rank ) ( Steck , 2020 ) min W ||X −XW ||2F + ||Λ1/2 ·W ||2F Λ = p 1− p dMat ( diag ( XTX ) ) W ∗ = ( XTX + Λ ) −1XTX 7 . EDLAE ( full rank ) ( Steck , 2020 ) min W ||X −XW ||2F + ||Λ1/2 ·W ||2F Λ = p 1− p dMat ( diag ( XTX ) ) s.t . diag ( W ) = 0 C = ( XTX + Λ ) −1 W ∗ = I − C · dMat ( diag ( 1⊘ C ) ) 8 . LRR ( Jin et al. , 2021 ) min rank ( W ) ≤k ||X −XW ||2F + ||ΓW ||2F Y ∗ = XW ∗ SVD = UΣV Ŵ = ( XTX + ΓTΓ ) −1XTX ( VkV T k ) 9 . EDLAE-ADMM ( Steck , 2020 ) min A , B ||X −X ( AB − dMat ( diag ( AB ) ) ) ||2F +||Λ1/2 · ( AB − dMat ( diag ( AB ) ) ||2F ADMM update A , B 10 . LR-DLAE ( this paper ) min rank ( W ) ≤k ||X −XW ||2F + ||Λ1/2 ·W ||2F Λ = p 1− p dMat ( diag ( XTX ) ) W ∗ = ( XTX + Λ ) −1XTX Y ∗ = XW ∗ SVD = UΣV T Ŵ = W ∗ ( VkV T k ) 11 . LR-EDLAE-1 ( this paper ) min rank ( W ′ ) ≤k ||X −XW ||2F + ||Λ1/2 ·W ||2F W = W ′ − dMat ( diag ( W ′ ) ) Λ = p 1− p dMat ( diag ( XTX ) ) C = ( XTX + Λ ) −1 W ∗ = I − C · dMat ( diag ( 1⊘ C ) ) Y ∗ = XW ∗ SVD = UΣV T Ŵ = W ∗ ( VkV T k ) 12 . LR-EDLAE-2 ( this paper ) min rank ( W ′ ) ≤k ||X −XW ||2F + ||Λ1/2 ·W ||2F W = W ′ − dMat ( diag ( W ′ ) ) Λ = p 1− p dMat ( diag ( XTX ) ) C = ( XTX + Λ ) −1 W ∗ = I − C · dMat ( diag ( 1⊘ C ) ) W ∗ SVD = UΣV T Ŵ = UkΣkV T k problem because it is more economically relevant . Here , let n be the number of items and m be the number of users . We are given a binary matrix X ∈ { 0 , 1 } m×n that represents the interaction between users and items so far , i.e. , Xi , j = 1 iff user i has purchased or made a rating on item j . Our goal is to produce a real-valued matrix X̂ , which we evaluate against future interactions using information retrieval ( Top-k ) metrics such as Recall or nDCG . The problem is closely related to matrix completion ( MC ) because Xi , j = 0 can be viewed as “ missing a data point ” . But MC ’ s evaluation metric is mean-squared error and is different from ours ( Candès & Tao , 2010 ) . The connection between two problems results in models with similar objectives ( Zheng et al. , 2018 ) . A technique developed for one problem often finds its counterpart for the other . Nevertheless , because of the difference in evaluation , efficacy of an algorithm for one problem does not imply its performance guarantee for the other . Thus , the non-overlapping component between two problems remains substantial . We also remark that our structural results on weighted nuclear-norm is new and applicable to MC . | This paper categorizes various linear models based on the applied regularization: nuclear norm vs Frobenius norm regularization. It is claimed that this categorization is key to understanding the prediction accuracies of the various linear model-classes. The paper also makes connections between nuclear norm regularization and Frobenius-norm regularization, and also discusses L_p norm regularization of the singular values. The paper also describes 2 methods that yield a closed-form solution of a low-rank model with Frobenius norm regularization: while it is not motivated/explained why these methods should work from a conceptual/theoretical perspective, the experiments show that they indeed work surprisingly well. | SP:1abc8731d94f1f06bbf4ac89728edaa9bda39313 |
On the regularization landscape for the linear recommendation models | 1 INTRODUCTION . Research progress on algorithms for recommendation has escalated in recent years , partially fueled by the adoption of deep learning ( DL ) techniques . However , recent studies have found that many new deep learning recommendation models have shown sub-par performance against simpler linear recommendation models ( Dacrema et al. , 2019 ; Rendle et al. , 2019 ) . Although some studies are available to analyze linear vs non-linear models ( Dacrema et al. , 2019 ) , it remains puzzling why these seemingly different techniques all result in models with similar performance or even similar cost functions . In the latest study , Jin et al . ( 2021 ) examine the relationship between the widely used matrix factorization ( MF ) , such as ALS ( Hu et al. , 2008 ) , and the linear autoencoder ( LAE ) which encompasses the recent performance leaders , such as EASE ( Steck , 2019 ) and EDLAE ( Steck , 2020 ) . They considered two basic regularization forms ( see Eqs . ( 1 ) and ( 6 ) ) and found that the optimal ( closed-form ) solutions of both models recover the directions of principal components , while shrinking the corresponding singular values differently . They suggest that the difference may enable LAE to utilize a larger number of latent dimensions to improve recommendation accuracy . This finding highlights the similarity and difference between LAE and MF . In this paper , we go much beyond the two basic models studied in ( Jin et al. , 2021 ) , to analyze a large number of recent performance leaders of ( linear ) recommendation algorithms , and aim to provide an in-depth understanding of various regularized objective functions and towards unifying them through their closed-form solutions . In return , the closed-forms serve as the barebones engine to help reveal what drives the performance improvement for the recent recommendation algorithms . We examine three open and closely related questions : ( i ) Characterization of models : Recent recommendation models are built upon a diverse set of techniques , including dropouts ( Srivastava et al. , 2014 ) , variational methods ( Kingma & Welling , 2014 ) , and matrix denoising ( Tipping & Bishop , 1999b ) . We aim to identify a unified regularization framework to ( re ) -interpret different models and understand how they are related . We are specifically interested in how models based on variational autoencoder ( VAE , a natural generalization of recent approaches ) relate to other models ( Liang et al. , 2018 ) . ( ii ) Weighted generalization of regularizers : A key idea in a recent performance leader EDLAE ( Steck , 2020 ) is to utilize of weighted/non-uniform regularizers on the parameters ’ Frobenius norm . Applying dropouts ( Cavazza et al. , 2018 ) is shown to be equivalent to re-weighting the exponents in the regularizers , such as designing the weighted sum of regularizers based on other norms or tuning the exponent weights . We are also interested in determining what circumstance closed-form solutions still exist . ( iii ) Low-rank closed-form solutions for EDLAE . While most linear recommendation models are shown to have closed-form solutions , the low-rank version of recent performance leader EDLAE ( Steck , 2020 ) remains an exception . Fitting this model requires using ADMM ( Steck , 2020 ) . Although its performance may not be better than its full-rank counterpart , low-rank solutions are easier to interpret , use less storage , and can be more scalable with respect to the number of items . In addition , a closed-form solution disentangles key performance drivers from nuances ( e.g. , need to tune learning rate or deal with local optimal ) , and can help reveal the key driven factors comparing with other closed-form solutions . More importantly , such solutions are significantly easier to implement and be tested using a generic matrix computation platform ( without specialized recommendation library ) . Can we approximate low-rank EDLAE with closed-form solutions ? Our investigation led to the following discovery and resolves the above questions : Regularizer dichotomy ( Section 2 ) : We found that all of the leading ( linear ) recommendation models can be categorized into those that implement possibly weighted nuclear-norm regularizers , or those that implement Frobenius-norm regularizers . Specifically , we characterize the Variational Linear Autoencoders ( VLAE ) as a form of the weighted nuclear-norm regularization problem , in which the weights possess a specific combinatorial structure . We observe that it is not matrix factorization or LAE that determines the shrinkage structure ( as Jin et al . ( 2021 ) suggested ) , but instead it is the form of regularization . Thus , our paper provides a more complete and accurate characterization of a linear recommendation model ’ s performance under different regularizations . Rigidity of nuclear-norm regularizers ( Section 3 ) : With the dichotomy result , we next aim to understand whether the weighted sum idea for Frobenius-norm regularizers ( Steck , 2020 ; Jin et al. , 2021 ) can be generalized to nuclear-norm regularizers , and whether tuning exponent weights can be beneficial . First , while VLAE is equivalent to nuclear-norm regularization and is easier to optimize ( weighted nuclear norms are non-smooth but VLAE ’ s objectives are smooth ) , its closedform solution possesses a ( surprisingly ) rigid structure , i.e. , the weighted regularization will lead to an auto-sorting singular value reduction and the larger single values tend to receive smaller reduction ( non-ascending reduction ) . Second , it has been shown that the solution structure for a model with a squared nuclear-norm regularizer ∥W∥2∗ ( i.e. , dropout ’ s equivalence ) is strikingly similar to that for using ∥W∥∗-regularizer ( Gu et al. , 2014 ) . We generalize the result to show that the solution structures for ∥W∥p∗ are highly similar for all p ≥ 1 ( Regularization invariant/rigidity with respect to p ) . But when p = 1 , 2 , the solution and hyperparameters possess favorable properties which make hyperparameter searches easier . This also partially explains why only p = 1 , 2 have been extensively considered . These rigidity properties severely limit the search space and explains why models that use only nuclear-norm regularizers share the same performance ceiling even when hyperparameters are extensively searched . Closed-form solution for low-rank EDLAE ( Section 4 ) : The ( weighted ) Frobenius-norm regularizers ∥ΛW∥2F ( Λ is the hyperparameter diagonal matrix ) are implemented in EASE ( Steck , 2019 ) and EDLAE ( Steck , 2020 ) . These models produce closed-form full-rank estimators ; and if the zero-diagonal constraint on W is enforced , their singular vectors will no longer coincide with those of the data , and will deliver ( slightly ) better performance . However , no closed-form solution for the low-rank estimator is known and existing approaches rely on ADMM or Alternating Least Square ( Steck , 2020 ) . In this paper , we propose two low-rank , closed-form estimators that deliver comparable results to the full-rank models ( EASE and full-rank EDLAE ) as well as the ADMM-based solutions ( Steck , 2020 ) , and thus resolve the aforementioned third open question . 2 BACKGROUND AND REGULARIZER DICHOTOMY . This section first explains the background , and then give an overview of the dichotomy results . Some key theorems are deferred to Section 3 and Appendices . Background . Recommendation algorithms can be categorized into explicit ones that aim to predict unseen ratings between a user and an item and implicit ones that aim to predict actions , such as user click or add-cart ( Steck , 2019 ; Dacrema et al. , 2019 ; Zhang et al. , 2019 ) . We focus on the implicit Table 1 : Investigating the closed/analytic solutions of linear models . dMat ( · ) denotes a diagonal matrix , diag ( X ) is the vector on the diagonal of X . Λ is the ( hyperparameter ) diagonal matrix as a coefficient of the regularization term . W ∗ ( or P ∗ , Q∗ , etc ) is the optimal solution for corresponding case , except for cases 9-12 , where Ŵ is the low-rank closed-form solution . Model Regularization Solution Nuclear norm 1 . Regularized PCA ( Zheng et al. , 2018 ) min P , Q ||X − PQ||2F + λ · ( ||P ||2F + ||Q||2F ) X SVD = UΣV T Ω = √ ( σi − λ ) + P ∗ = Uk Q ∗ = ΩV Tk 2 . MF dropout ( Cavazza et al. , 2018 ) min P , Q , d ||X − PQ||2F + d 1− p p · d∑ k=1 ||Pk||22 · ||QTk ||22 min Y ||X − Y ||2F + 1− p p ||Y ||2∗ X SVD = UΣV T Y ∗ = P ∗ ·Q∗ = U · Sµ ( Σ ) · V T 3 . WLAE ( Bao et al. , 2020 ) min W1 , W2 ∥X −XW1W2∥2F + ∥W1Λ 1 2 ∥2F + ∥Λ 1 2W2∥2F , W ∗1 = V ( I − ΛS−2 ) 1 2PT W ∗2 = P ( I − ΛS−2 ) 1 2V T 4 . VLAE ( this paper ) min P , Q ||X − PQ||2F + ||Λ1/2Q||2F + ||PΛ1/2||2F min A , B ||X −XAB||2F + ||ΛB||2F + ||XA||2F min rank ( W ) ≤k ||X −W ||2F + 2||W ||w , ∗ X SVD = UΣV T P ∗ = Uk · diag ( √ σ1 − λ ( k ) , . . . , √ σk − λ ( 1 ) ) · Ω Q∗ = ΩT · diag ( √ σ1 − λ ( k ) , . . . , √ σk − λ ( 1 ) ) · V Tk A∗ = X†P ∗Λ 1 2 B∗ = Λ− 1 2Q∗ Frobenius norm 5 . EASE ( full rank ) ( Steck , 2019 ) min W ||X −XW ||2F + λ · ||W ||2F s.t . diag ( W ) = 0 C = ( XTX + λI ) −1 W ∗ = I − C · dMat ( diag ( 1⊘ C ) ) 6 . DLAE ( full rank ) ( Steck , 2020 ) min W ||X −XW ||2F + ||Λ1/2 ·W ||2F Λ = p 1− p dMat ( diag ( XTX ) ) W ∗ = ( XTX + Λ ) −1XTX 7 . EDLAE ( full rank ) ( Steck , 2020 ) min W ||X −XW ||2F + ||Λ1/2 ·W ||2F Λ = p 1− p dMat ( diag ( XTX ) ) s.t . diag ( W ) = 0 C = ( XTX + Λ ) −1 W ∗ = I − C · dMat ( diag ( 1⊘ C ) ) 8 . LRR ( Jin et al. , 2021 ) min rank ( W ) ≤k ||X −XW ||2F + ||ΓW ||2F Y ∗ = XW ∗ SVD = UΣV Ŵ = ( XTX + ΓTΓ ) −1XTX ( VkV T k ) 9 . EDLAE-ADMM ( Steck , 2020 ) min A , B ||X −X ( AB − dMat ( diag ( AB ) ) ) ||2F +||Λ1/2 · ( AB − dMat ( diag ( AB ) ) ||2F ADMM update A , B 10 . LR-DLAE ( this paper ) min rank ( W ) ≤k ||X −XW ||2F + ||Λ1/2 ·W ||2F Λ = p 1− p dMat ( diag ( XTX ) ) W ∗ = ( XTX + Λ ) −1XTX Y ∗ = XW ∗ SVD = UΣV T Ŵ = W ∗ ( VkV T k ) 11 . LR-EDLAE-1 ( this paper ) min rank ( W ′ ) ≤k ||X −XW ||2F + ||Λ1/2 ·W ||2F W = W ′ − dMat ( diag ( W ′ ) ) Λ = p 1− p dMat ( diag ( XTX ) ) C = ( XTX + Λ ) −1 W ∗ = I − C · dMat ( diag ( 1⊘ C ) ) Y ∗ = XW ∗ SVD = UΣV T Ŵ = W ∗ ( VkV T k ) 12 . LR-EDLAE-2 ( this paper ) min rank ( W ′ ) ≤k ||X −XW ||2F + ||Λ1/2 ·W ||2F W = W ′ − dMat ( diag ( W ′ ) ) Λ = p 1− p dMat ( diag ( XTX ) ) C = ( XTX + Λ ) −1 W ∗ = I − C · dMat ( diag ( 1⊘ C ) ) W ∗ SVD = UΣV T Ŵ = UkΣkV T k problem because it is more economically relevant . Here , let n be the number of items and m be the number of users . We are given a binary matrix X ∈ { 0 , 1 } m×n that represents the interaction between users and items so far , i.e. , Xi , j = 1 iff user i has purchased or made a rating on item j . Our goal is to produce a real-valued matrix X̂ , which we evaluate against future interactions using information retrieval ( Top-k ) metrics such as Recall or nDCG . The problem is closely related to matrix completion ( MC ) because Xi , j = 0 can be viewed as “ missing a data point ” . But MC ’ s evaluation metric is mean-squared error and is different from ours ( Candès & Tao , 2010 ) . The connection between two problems results in models with similar objectives ( Zheng et al. , 2018 ) . A technique developed for one problem often finds its counterpart for the other . Nevertheless , because of the difference in evaluation , efficacy of an algorithm for one problem does not imply its performance guarantee for the other . Thus , the non-overlapping component between two problems remains substantial . We also remark that our structural results on weighted nuclear-norm is new and applicable to MC . | This paper analyzed the linear models for recommendation from their regularization terms, more specifically, via nuclear norm and Frobenius norm. Based on the analyzes, this paper proposed two alternatives for linear recommendation models with closed form solutions. Experiments on three large scale datasets showed that the proposed alternatives are comparable to the state-of-the-art baseline methods. | SP:1abc8731d94f1f06bbf4ac89728edaa9bda39313 |
CSQ: Centered Symmetric Quantization for Extremely Low Bit Neural Networks | 1 INTRODUCTION . Quantized neural networks ( QNNs ) ( Krishnamoorthi , 2018 ; Esser et al. , 2019 ; Lee et al. , 2021 ; Li et al. , 2021 ; Nagel et al. , 2020 ) can reduce both computational complexity and memory requirement quite effectively over the full-precision ( i.e. , floating-point ) version , and hence are commonly used for deployment . Recent state-of-the-art QNNs ( Esser et al. , 2019 ; Lee et al. , 2021 ; Li et al. , 2019 ) can achieve near-full-precision accuracy even at 3-bit for ImageNet classification . However , most of the existing quantization method target 3-bit or higher . At 2-bit there is not much room for optimization , even with non-uniform step-size quantization ( Li et al. , 2019 ) . While some previous work , e.g . ( Li et al. , 2019 ) , treats 2-bit as ternary ( { −1 , 0 , 1 } ) , it wastes one quantization level . But to make the most of the 2-bit precision , the conventional 2-bit quantizer allocates two vs. one quantization levels to the negative side , causing a severe imbalance . As an alternative to the conventional quantizer , we propose ( zero- ) centered symmetric quantizer ( CSQ ) , which is most effective at low precision ( 2∼3-bit ) though the method itself is applicable to any precision . Through a set of analyses and experiments we show that CSQ improves QNN performance over the conventional linear quantizer ( CLQ ) in quantization-aware training ( QAT ) .1 We note that the particular quantizer function we propose has been used in some previous work ( Choi et al. , 2018a ; Boo et al. , 2021 ; Gong et al. , 2019 ; Lee et al. , 2021 ; Chen et al. , 2021 ) . However , no previous work has proposed it explicitly nor provided any analysis on the effectiveness of such a scheme ( see Section 2.3 ) . Moreover , while low-precision CLQ can be efficiently implemented in hardware via multiple invocations of XNOR-popcount such as on BNN ( Binarized Neural Network ) hardware , doing the same for CSQ poses new challenges that have never been addressed . In this paper we make the following contributions . • We propose CSQ that uses perfectly symmetrical quantization levels with uniform step size . We provide analytical and empirical evidence showing that using CSQ for weight instead of CLQ improves performance of low-bit QNNs ( 2∼3-bit ) . 1We use CSQ ( and CLQ ) to refer to both a quantizer and a quantization method . • We propose a binary coding scheme and a mapping method for CSQ , which allows for an efficient hardware implementation of QNNs using bitwise operations on BNN hardware . 2 BACKGROUND AND RELATED WORK . 2.1 QUANTIZATION PRIMER . A quantizer is a function from a real number x to a discrete value or an integer xQ . To train a network while simulating the effect of quantizer , one often maps the discrete value xQ back to a real value x̃ . Instead of quantizing the entire range of inputs , clipping off the extreme values and only mapping the mid-range values uniformly is often more efficient . A generalized version of a quantizer used in Neural Networks can be defined as : x̃ = clip ( ⌊x s ⌉ , L , U ) · s ( 1 ) where L and U ( the lower and upper bound ) are the minimum and maximum integer values that xQ can take , and clip ( x , a , b ) = min ( max ( x , a ) , b ) . Quantization using the above quantizer in ( 1 ) is called uniform step-size quantization , also called linear quantization . We do not consider nonuniform step-size quantization in this paper . Based on the input range ( i.e. , whether input is signed vs. un-signed ) , quantizers are classified as symmetric vs. asymmetric quantizers . For the linear quantizer in ( 1 ) , symmetric and asymmetric quantizers can be defined as follows , where b is the number of bits used for representation . Symmetric quantizer ( for signed input ) : L = −2b−1 , U = 2b−1 − 1 ( 2 ) Asymmetric quantizer ( for un-signed input ) : L = 0 , U = 2b − 1 ( 3 ) From here on we will refer to quantization method defined by ( 1 ) and ( 2 ) as the Conventional Linear Quantizer ( CLQ ) . 2.2 PREVIOUS WORK ON DNN QUANTIZATION . Most of the previous works on DNN quantization ( Jung et al. , 2019 ; Choi et al. , 2018b ; Esser et al. , 2019 ) use essentially the same linear quantizer , but each work proposes a slightly different way to optimize quantizer functions . Often the differences come from different formulations of the quantizer function . For instance , QIL ( Jung et al. , 2019 ) optimizes quantization boundary , PACT ( Choi et al. , 2018b ) optimizes a clipping parameter to train the quantized activations , and LSQ ( Esser et al. , 2019 ) optimizes the step size.We are not aware of any previous work explicitly proposing a new set of quantization levels for uniform quantization . Though the formulation of a quantizer function varies , in the end they all assume the same integer hardware that expects 2 ’ s complement number representation . 2.3 SIMILAR APPROACHES . The idea of using a zero centered quantizer is also seen in ( Choi et al. , 2018a ; Boo et al. , 2021 ; Gong et al. , 2019 ; Lee et al. , 2021 ; Chen et al. , 2021 ) . All of these works present a novel training method for their quantizer . However , none of these works analyze zero-centered quantization or present it as a source of performance gain . Furthermore , to the best of our knowledge , no previous work has attempted to address the realization of zero-centered quantization on hardware . Realizing zerocentered quantization on hardware can be a challenging task , because it introduces new quantization points which can not be represented using 2 ’ s complement number representation . 3 CENTERED SYMMETRIC QUANTIZATION ( CSQ ) . 3.1 EXACT ZERO REPRESENTATION VS . PERFECT SYMMETRY . Any linear quantization to b-bit precision results in 2b quantization levels . Therefore , inclusion of zero among the quantization points , naturally results in an asymmetry in the number of positive and negative quantization levels . While exact representation of zero may be important due to common operations like zero padding ( Krishnamoorthi , 2018 ) , it is also true that the asymmetry among positive and negative quantization levels grows large as precision becomes low . Thus one of our aims in this paper is to explore the trade-off between exact zero representation and perfect symmetry in the context of weight quantization of neural networks . 3.2 ALTERNATIVES . From the perspective of quantization levels , one can consider the following quantization schemes ( see Table 1 ) . Conventional Linear Quantization ( CLQ ) uses the quantization levels represented by 2 ’ s complement , which is also used by most of the previous uniform step-size quantizers , e.g . ( 1 ) . Alternatively , the asymmetry between the positive and negative sides can be reversed ; i.e. , by setting L = −2b−1 + 1 and U = 2b−1 . Reduced Symmetric Quantization ( RSQ ) uses one less quantization level , thereby achieving both exact zero representation and perfect symmetry ; i.e. , L = −2b−1 +1 and U = 2b−1−1 . This scheme wastes one quantization level and is expected to result in inferior performance . Extended Symmetric Quantization ( ESQ ) , on the other hand , uses one more quantization level to achieve zero representation and symmetry ; i.e. , L = −2b−1 and U = 2b−1 . However , since ESQ requires more than b-bit precision , it is not feasible for practical deployment , but included here for comparison . Non-uniform Symmetric Quantization ( NSQ ) achieves both exact zero representation and perfect symmetry with exactly 2b quantization levels , but the step size is not uniform , leading to a completely different quantizer function and QAT methods . Since NSQ is non-uniform quantization , we do not consider it for the scope of this paper . Centered Symmetric Quantization ( CSQ ) stipulates uniform step size and perfect symmetry between the positive and negative sides , while compromising on the exact representation of zero . It can also be represented using integers only by scaling all quantization levels by 2 as shown in the last row of the table . For the remainder of the paper we focus on CSQ and CLQ , as they are the most practical . 3.3 QUANTIZER FUNCTION FOR CSQ . We define the quantizer for CSQ as follows : v̇ = ⌊v s + 0.5 ⌉ − 0.5 ( 4 ) v̄ = clip ( v̇ , −Q , Q ) ( 5 ) v̂ = v̄ × s ( 6 ) where v is any input value , s is the step size , and Q = 2b−1 − 0.5 with b being the quantization precision ( i.e. , the number of bits ) . As usual , b·e is the round operation , and clip ( x , a , b ) = min ( max ( x , a ) , b ) . Here v̄ is not an integer . Nevertheless , it is an exact value that can be represented by the b-bit CSQ format . Moreover , our proposed CSQ format permits efficient hardware and software realizations ( see Section 5 ) . Therefore v̄ represents the value that is computed by b-bit hardware . Finally , v̂ is the scaled-back version of v̄ , defined and used for the purpose of training . The proposed quantizer provides equal representation for the positive and negative sides of the input distribution . Figure 1a shows the 2-bit quantizer functions for conventional linear quantization and our CSQ . Figure 1b shares the gradient for step size which is a quantization parameter . Detailed training method is described in Appendix A . 4 ANALYSIS OF CSQ . 4.1 IMPROVED REPRESENTATIONAL CAPACITY OF CSQ . Even though both CSQ and CLQ have the same number of quantization levels , and therefore the same representational capacity on the operand level , multiplication result , or the product of weight and activation , may have different representational capacity depending on the choice of quantizer . We compare the representational capacity of the product of weight and activation , when using CSQ vs. CLQ for weight . For activation quantization we consider unsigned CLQ ( denoted by CLQu ) for unsigned activation , and either CSQ or signed CLQ ( denoted by CLQs ) for signed activation . We start by defining the range of quantization levels of each scheme : CLQu ∼ { 0 , 1 , · · · , 2b − 1 } ( 7 ) CLQs ∼ { −2b−1 , −2b−1 + 1 , · · · , 2b−1 − 1 } ( 8 ) CSQ ∼ { −2b−1 + 0.5 , −2b−1 + 1.5 , · · · , 2b−1 − 0.5 } ( 9 ) where b is the precision . It should be noted that CSQ can only be signed . Table 2 shows the range of weights , activations and their product for 2-bit precision using different quantization methods . Table 3 shows that using CSQ for weight quantization almost always increases the representational capacity of quantized multiplication . The only exception is 2-bit precision for signed activation where it remains the same . Given that improving representational capacity is crucial for increasing the overall performance of QNNs ( Liu et al. , 2018 ) , our analysis suggests that CSQ has a definite advantage over CLQ for quantizing weights . Furthermore , the distribution of product resembles non-uniform quantization which provides higher accuracy . For more details refer to Appendix C. In the case of signed activation , our result in Table 3 suggests that using CLQs for activation and CSQ for weight provides the highest representational capacity . | This paper presents a centered symmetric quantizer (CSQ) that can map floating point tensors into zero-centered quantized integer values. The CSQ method works well for ultra-low bit quantization such as 2-bit. The authors also propose a binary coding method to run efficiently on hardware. | SP:268d47581c6f07f416ea9a059461865becca6d86 |
CSQ: Centered Symmetric Quantization for Extremely Low Bit Neural Networks | 1 INTRODUCTION . Quantized neural networks ( QNNs ) ( Krishnamoorthi , 2018 ; Esser et al. , 2019 ; Lee et al. , 2021 ; Li et al. , 2021 ; Nagel et al. , 2020 ) can reduce both computational complexity and memory requirement quite effectively over the full-precision ( i.e. , floating-point ) version , and hence are commonly used for deployment . Recent state-of-the-art QNNs ( Esser et al. , 2019 ; Lee et al. , 2021 ; Li et al. , 2019 ) can achieve near-full-precision accuracy even at 3-bit for ImageNet classification . However , most of the existing quantization method target 3-bit or higher . At 2-bit there is not much room for optimization , even with non-uniform step-size quantization ( Li et al. , 2019 ) . While some previous work , e.g . ( Li et al. , 2019 ) , treats 2-bit as ternary ( { −1 , 0 , 1 } ) , it wastes one quantization level . But to make the most of the 2-bit precision , the conventional 2-bit quantizer allocates two vs. one quantization levels to the negative side , causing a severe imbalance . As an alternative to the conventional quantizer , we propose ( zero- ) centered symmetric quantizer ( CSQ ) , which is most effective at low precision ( 2∼3-bit ) though the method itself is applicable to any precision . Through a set of analyses and experiments we show that CSQ improves QNN performance over the conventional linear quantizer ( CLQ ) in quantization-aware training ( QAT ) .1 We note that the particular quantizer function we propose has been used in some previous work ( Choi et al. , 2018a ; Boo et al. , 2021 ; Gong et al. , 2019 ; Lee et al. , 2021 ; Chen et al. , 2021 ) . However , no previous work has proposed it explicitly nor provided any analysis on the effectiveness of such a scheme ( see Section 2.3 ) . Moreover , while low-precision CLQ can be efficiently implemented in hardware via multiple invocations of XNOR-popcount such as on BNN ( Binarized Neural Network ) hardware , doing the same for CSQ poses new challenges that have never been addressed . In this paper we make the following contributions . • We propose CSQ that uses perfectly symmetrical quantization levels with uniform step size . We provide analytical and empirical evidence showing that using CSQ for weight instead of CLQ improves performance of low-bit QNNs ( 2∼3-bit ) . 1We use CSQ ( and CLQ ) to refer to both a quantizer and a quantization method . • We propose a binary coding scheme and a mapping method for CSQ , which allows for an efficient hardware implementation of QNNs using bitwise operations on BNN hardware . 2 BACKGROUND AND RELATED WORK . 2.1 QUANTIZATION PRIMER . A quantizer is a function from a real number x to a discrete value or an integer xQ . To train a network while simulating the effect of quantizer , one often maps the discrete value xQ back to a real value x̃ . Instead of quantizing the entire range of inputs , clipping off the extreme values and only mapping the mid-range values uniformly is often more efficient . A generalized version of a quantizer used in Neural Networks can be defined as : x̃ = clip ( ⌊x s ⌉ , L , U ) · s ( 1 ) where L and U ( the lower and upper bound ) are the minimum and maximum integer values that xQ can take , and clip ( x , a , b ) = min ( max ( x , a ) , b ) . Quantization using the above quantizer in ( 1 ) is called uniform step-size quantization , also called linear quantization . We do not consider nonuniform step-size quantization in this paper . Based on the input range ( i.e. , whether input is signed vs. un-signed ) , quantizers are classified as symmetric vs. asymmetric quantizers . For the linear quantizer in ( 1 ) , symmetric and asymmetric quantizers can be defined as follows , where b is the number of bits used for representation . Symmetric quantizer ( for signed input ) : L = −2b−1 , U = 2b−1 − 1 ( 2 ) Asymmetric quantizer ( for un-signed input ) : L = 0 , U = 2b − 1 ( 3 ) From here on we will refer to quantization method defined by ( 1 ) and ( 2 ) as the Conventional Linear Quantizer ( CLQ ) . 2.2 PREVIOUS WORK ON DNN QUANTIZATION . Most of the previous works on DNN quantization ( Jung et al. , 2019 ; Choi et al. , 2018b ; Esser et al. , 2019 ) use essentially the same linear quantizer , but each work proposes a slightly different way to optimize quantizer functions . Often the differences come from different formulations of the quantizer function . For instance , QIL ( Jung et al. , 2019 ) optimizes quantization boundary , PACT ( Choi et al. , 2018b ) optimizes a clipping parameter to train the quantized activations , and LSQ ( Esser et al. , 2019 ) optimizes the step size.We are not aware of any previous work explicitly proposing a new set of quantization levels for uniform quantization . Though the formulation of a quantizer function varies , in the end they all assume the same integer hardware that expects 2 ’ s complement number representation . 2.3 SIMILAR APPROACHES . The idea of using a zero centered quantizer is also seen in ( Choi et al. , 2018a ; Boo et al. , 2021 ; Gong et al. , 2019 ; Lee et al. , 2021 ; Chen et al. , 2021 ) . All of these works present a novel training method for their quantizer . However , none of these works analyze zero-centered quantization or present it as a source of performance gain . Furthermore , to the best of our knowledge , no previous work has attempted to address the realization of zero-centered quantization on hardware . Realizing zerocentered quantization on hardware can be a challenging task , because it introduces new quantization points which can not be represented using 2 ’ s complement number representation . 3 CENTERED SYMMETRIC QUANTIZATION ( CSQ ) . 3.1 EXACT ZERO REPRESENTATION VS . PERFECT SYMMETRY . Any linear quantization to b-bit precision results in 2b quantization levels . Therefore , inclusion of zero among the quantization points , naturally results in an asymmetry in the number of positive and negative quantization levels . While exact representation of zero may be important due to common operations like zero padding ( Krishnamoorthi , 2018 ) , it is also true that the asymmetry among positive and negative quantization levels grows large as precision becomes low . Thus one of our aims in this paper is to explore the trade-off between exact zero representation and perfect symmetry in the context of weight quantization of neural networks . 3.2 ALTERNATIVES . From the perspective of quantization levels , one can consider the following quantization schemes ( see Table 1 ) . Conventional Linear Quantization ( CLQ ) uses the quantization levels represented by 2 ’ s complement , which is also used by most of the previous uniform step-size quantizers , e.g . ( 1 ) . Alternatively , the asymmetry between the positive and negative sides can be reversed ; i.e. , by setting L = −2b−1 + 1 and U = 2b−1 . Reduced Symmetric Quantization ( RSQ ) uses one less quantization level , thereby achieving both exact zero representation and perfect symmetry ; i.e. , L = −2b−1 +1 and U = 2b−1−1 . This scheme wastes one quantization level and is expected to result in inferior performance . Extended Symmetric Quantization ( ESQ ) , on the other hand , uses one more quantization level to achieve zero representation and symmetry ; i.e. , L = −2b−1 and U = 2b−1 . However , since ESQ requires more than b-bit precision , it is not feasible for practical deployment , but included here for comparison . Non-uniform Symmetric Quantization ( NSQ ) achieves both exact zero representation and perfect symmetry with exactly 2b quantization levels , but the step size is not uniform , leading to a completely different quantizer function and QAT methods . Since NSQ is non-uniform quantization , we do not consider it for the scope of this paper . Centered Symmetric Quantization ( CSQ ) stipulates uniform step size and perfect symmetry between the positive and negative sides , while compromising on the exact representation of zero . It can also be represented using integers only by scaling all quantization levels by 2 as shown in the last row of the table . For the remainder of the paper we focus on CSQ and CLQ , as they are the most practical . 3.3 QUANTIZER FUNCTION FOR CSQ . We define the quantizer for CSQ as follows : v̇ = ⌊v s + 0.5 ⌉ − 0.5 ( 4 ) v̄ = clip ( v̇ , −Q , Q ) ( 5 ) v̂ = v̄ × s ( 6 ) where v is any input value , s is the step size , and Q = 2b−1 − 0.5 with b being the quantization precision ( i.e. , the number of bits ) . As usual , b·e is the round operation , and clip ( x , a , b ) = min ( max ( x , a ) , b ) . Here v̄ is not an integer . Nevertheless , it is an exact value that can be represented by the b-bit CSQ format . Moreover , our proposed CSQ format permits efficient hardware and software realizations ( see Section 5 ) . Therefore v̄ represents the value that is computed by b-bit hardware . Finally , v̂ is the scaled-back version of v̄ , defined and used for the purpose of training . The proposed quantizer provides equal representation for the positive and negative sides of the input distribution . Figure 1a shows the 2-bit quantizer functions for conventional linear quantization and our CSQ . Figure 1b shares the gradient for step size which is a quantization parameter . Detailed training method is described in Appendix A . 4 ANALYSIS OF CSQ . 4.1 IMPROVED REPRESENTATIONAL CAPACITY OF CSQ . Even though both CSQ and CLQ have the same number of quantization levels , and therefore the same representational capacity on the operand level , multiplication result , or the product of weight and activation , may have different representational capacity depending on the choice of quantizer . We compare the representational capacity of the product of weight and activation , when using CSQ vs. CLQ for weight . For activation quantization we consider unsigned CLQ ( denoted by CLQu ) for unsigned activation , and either CSQ or signed CLQ ( denoted by CLQs ) for signed activation . We start by defining the range of quantization levels of each scheme : CLQu ∼ { 0 , 1 , · · · , 2b − 1 } ( 7 ) CLQs ∼ { −2b−1 , −2b−1 + 1 , · · · , 2b−1 − 1 } ( 8 ) CSQ ∼ { −2b−1 + 0.5 , −2b−1 + 1.5 , · · · , 2b−1 − 0.5 } ( 9 ) where b is the precision . It should be noted that CSQ can only be signed . Table 2 shows the range of weights , activations and their product for 2-bit precision using different quantization methods . Table 3 shows that using CSQ for weight quantization almost always increases the representational capacity of quantized multiplication . The only exception is 2-bit precision for signed activation where it remains the same . Given that improving representational capacity is crucial for increasing the overall performance of QNNs ( Liu et al. , 2018 ) , our analysis suggests that CSQ has a definite advantage over CLQ for quantizing weights . Furthermore , the distribution of product resembles non-uniform quantization which provides higher accuracy . For more details refer to Appendix C. In the case of signed activation , our result in Table 3 suggests that using CLQs for activation and CSQ for weight provides the highest representational capacity . | This paper analyzed the difference in quantization methods between the conventional linear quantizer (CLQ) and centered symmetric quantization (CSQ). The authors explained that CSQ might exploit the limited quantization states better to represent the data than CLQ, with supporting analysis on representation capacity. The authors further proposed a bitwise implementation of CLQ and CSQ. The evaluation in terms of the quantization accuracy and GPU implementation speed is given for their analysis. | SP:268d47581c6f07f416ea9a059461865becca6d86 |
CSQ: Centered Symmetric Quantization for Extremely Low Bit Neural Networks | 1 INTRODUCTION . Quantized neural networks ( QNNs ) ( Krishnamoorthi , 2018 ; Esser et al. , 2019 ; Lee et al. , 2021 ; Li et al. , 2021 ; Nagel et al. , 2020 ) can reduce both computational complexity and memory requirement quite effectively over the full-precision ( i.e. , floating-point ) version , and hence are commonly used for deployment . Recent state-of-the-art QNNs ( Esser et al. , 2019 ; Lee et al. , 2021 ; Li et al. , 2019 ) can achieve near-full-precision accuracy even at 3-bit for ImageNet classification . However , most of the existing quantization method target 3-bit or higher . At 2-bit there is not much room for optimization , even with non-uniform step-size quantization ( Li et al. , 2019 ) . While some previous work , e.g . ( Li et al. , 2019 ) , treats 2-bit as ternary ( { −1 , 0 , 1 } ) , it wastes one quantization level . But to make the most of the 2-bit precision , the conventional 2-bit quantizer allocates two vs. one quantization levels to the negative side , causing a severe imbalance . As an alternative to the conventional quantizer , we propose ( zero- ) centered symmetric quantizer ( CSQ ) , which is most effective at low precision ( 2∼3-bit ) though the method itself is applicable to any precision . Through a set of analyses and experiments we show that CSQ improves QNN performance over the conventional linear quantizer ( CLQ ) in quantization-aware training ( QAT ) .1 We note that the particular quantizer function we propose has been used in some previous work ( Choi et al. , 2018a ; Boo et al. , 2021 ; Gong et al. , 2019 ; Lee et al. , 2021 ; Chen et al. , 2021 ) . However , no previous work has proposed it explicitly nor provided any analysis on the effectiveness of such a scheme ( see Section 2.3 ) . Moreover , while low-precision CLQ can be efficiently implemented in hardware via multiple invocations of XNOR-popcount such as on BNN ( Binarized Neural Network ) hardware , doing the same for CSQ poses new challenges that have never been addressed . In this paper we make the following contributions . • We propose CSQ that uses perfectly symmetrical quantization levels with uniform step size . We provide analytical and empirical evidence showing that using CSQ for weight instead of CLQ improves performance of low-bit QNNs ( 2∼3-bit ) . 1We use CSQ ( and CLQ ) to refer to both a quantizer and a quantization method . • We propose a binary coding scheme and a mapping method for CSQ , which allows for an efficient hardware implementation of QNNs using bitwise operations on BNN hardware . 2 BACKGROUND AND RELATED WORK . 2.1 QUANTIZATION PRIMER . A quantizer is a function from a real number x to a discrete value or an integer xQ . To train a network while simulating the effect of quantizer , one often maps the discrete value xQ back to a real value x̃ . Instead of quantizing the entire range of inputs , clipping off the extreme values and only mapping the mid-range values uniformly is often more efficient . A generalized version of a quantizer used in Neural Networks can be defined as : x̃ = clip ( ⌊x s ⌉ , L , U ) · s ( 1 ) where L and U ( the lower and upper bound ) are the minimum and maximum integer values that xQ can take , and clip ( x , a , b ) = min ( max ( x , a ) , b ) . Quantization using the above quantizer in ( 1 ) is called uniform step-size quantization , also called linear quantization . We do not consider nonuniform step-size quantization in this paper . Based on the input range ( i.e. , whether input is signed vs. un-signed ) , quantizers are classified as symmetric vs. asymmetric quantizers . For the linear quantizer in ( 1 ) , symmetric and asymmetric quantizers can be defined as follows , where b is the number of bits used for representation . Symmetric quantizer ( for signed input ) : L = −2b−1 , U = 2b−1 − 1 ( 2 ) Asymmetric quantizer ( for un-signed input ) : L = 0 , U = 2b − 1 ( 3 ) From here on we will refer to quantization method defined by ( 1 ) and ( 2 ) as the Conventional Linear Quantizer ( CLQ ) . 2.2 PREVIOUS WORK ON DNN QUANTIZATION . Most of the previous works on DNN quantization ( Jung et al. , 2019 ; Choi et al. , 2018b ; Esser et al. , 2019 ) use essentially the same linear quantizer , but each work proposes a slightly different way to optimize quantizer functions . Often the differences come from different formulations of the quantizer function . For instance , QIL ( Jung et al. , 2019 ) optimizes quantization boundary , PACT ( Choi et al. , 2018b ) optimizes a clipping parameter to train the quantized activations , and LSQ ( Esser et al. , 2019 ) optimizes the step size.We are not aware of any previous work explicitly proposing a new set of quantization levels for uniform quantization . Though the formulation of a quantizer function varies , in the end they all assume the same integer hardware that expects 2 ’ s complement number representation . 2.3 SIMILAR APPROACHES . The idea of using a zero centered quantizer is also seen in ( Choi et al. , 2018a ; Boo et al. , 2021 ; Gong et al. , 2019 ; Lee et al. , 2021 ; Chen et al. , 2021 ) . All of these works present a novel training method for their quantizer . However , none of these works analyze zero-centered quantization or present it as a source of performance gain . Furthermore , to the best of our knowledge , no previous work has attempted to address the realization of zero-centered quantization on hardware . Realizing zerocentered quantization on hardware can be a challenging task , because it introduces new quantization points which can not be represented using 2 ’ s complement number representation . 3 CENTERED SYMMETRIC QUANTIZATION ( CSQ ) . 3.1 EXACT ZERO REPRESENTATION VS . PERFECT SYMMETRY . Any linear quantization to b-bit precision results in 2b quantization levels . Therefore , inclusion of zero among the quantization points , naturally results in an asymmetry in the number of positive and negative quantization levels . While exact representation of zero may be important due to common operations like zero padding ( Krishnamoorthi , 2018 ) , it is also true that the asymmetry among positive and negative quantization levels grows large as precision becomes low . Thus one of our aims in this paper is to explore the trade-off between exact zero representation and perfect symmetry in the context of weight quantization of neural networks . 3.2 ALTERNATIVES . From the perspective of quantization levels , one can consider the following quantization schemes ( see Table 1 ) . Conventional Linear Quantization ( CLQ ) uses the quantization levels represented by 2 ’ s complement , which is also used by most of the previous uniform step-size quantizers , e.g . ( 1 ) . Alternatively , the asymmetry between the positive and negative sides can be reversed ; i.e. , by setting L = −2b−1 + 1 and U = 2b−1 . Reduced Symmetric Quantization ( RSQ ) uses one less quantization level , thereby achieving both exact zero representation and perfect symmetry ; i.e. , L = −2b−1 +1 and U = 2b−1−1 . This scheme wastes one quantization level and is expected to result in inferior performance . Extended Symmetric Quantization ( ESQ ) , on the other hand , uses one more quantization level to achieve zero representation and symmetry ; i.e. , L = −2b−1 and U = 2b−1 . However , since ESQ requires more than b-bit precision , it is not feasible for practical deployment , but included here for comparison . Non-uniform Symmetric Quantization ( NSQ ) achieves both exact zero representation and perfect symmetry with exactly 2b quantization levels , but the step size is not uniform , leading to a completely different quantizer function and QAT methods . Since NSQ is non-uniform quantization , we do not consider it for the scope of this paper . Centered Symmetric Quantization ( CSQ ) stipulates uniform step size and perfect symmetry between the positive and negative sides , while compromising on the exact representation of zero . It can also be represented using integers only by scaling all quantization levels by 2 as shown in the last row of the table . For the remainder of the paper we focus on CSQ and CLQ , as they are the most practical . 3.3 QUANTIZER FUNCTION FOR CSQ . We define the quantizer for CSQ as follows : v̇ = ⌊v s + 0.5 ⌉ − 0.5 ( 4 ) v̄ = clip ( v̇ , −Q , Q ) ( 5 ) v̂ = v̄ × s ( 6 ) where v is any input value , s is the step size , and Q = 2b−1 − 0.5 with b being the quantization precision ( i.e. , the number of bits ) . As usual , b·e is the round operation , and clip ( x , a , b ) = min ( max ( x , a ) , b ) . Here v̄ is not an integer . Nevertheless , it is an exact value that can be represented by the b-bit CSQ format . Moreover , our proposed CSQ format permits efficient hardware and software realizations ( see Section 5 ) . Therefore v̄ represents the value that is computed by b-bit hardware . Finally , v̂ is the scaled-back version of v̄ , defined and used for the purpose of training . The proposed quantizer provides equal representation for the positive and negative sides of the input distribution . Figure 1a shows the 2-bit quantizer functions for conventional linear quantization and our CSQ . Figure 1b shares the gradient for step size which is a quantization parameter . Detailed training method is described in Appendix A . 4 ANALYSIS OF CSQ . 4.1 IMPROVED REPRESENTATIONAL CAPACITY OF CSQ . Even though both CSQ and CLQ have the same number of quantization levels , and therefore the same representational capacity on the operand level , multiplication result , or the product of weight and activation , may have different representational capacity depending on the choice of quantizer . We compare the representational capacity of the product of weight and activation , when using CSQ vs. CLQ for weight . For activation quantization we consider unsigned CLQ ( denoted by CLQu ) for unsigned activation , and either CSQ or signed CLQ ( denoted by CLQs ) for signed activation . We start by defining the range of quantization levels of each scheme : CLQu ∼ { 0 , 1 , · · · , 2b − 1 } ( 7 ) CLQs ∼ { −2b−1 , −2b−1 + 1 , · · · , 2b−1 − 1 } ( 8 ) CSQ ∼ { −2b−1 + 0.5 , −2b−1 + 1.5 , · · · , 2b−1 − 0.5 } ( 9 ) where b is the precision . It should be noted that CSQ can only be signed . Table 2 shows the range of weights , activations and their product for 2-bit precision using different quantization methods . Table 3 shows that using CSQ for weight quantization almost always increases the representational capacity of quantized multiplication . The only exception is 2-bit precision for signed activation where it remains the same . Given that improving representational capacity is crucial for increasing the overall performance of QNNs ( Liu et al. , 2018 ) , our analysis suggests that CSQ has a definite advantage over CLQ for quantizing weights . Furthermore , the distribution of product resembles non-uniform quantization which provides higher accuracy . For more details refer to Appendix C. In the case of signed activation , our result in Table 3 suggests that using CLQs for activation and CSQ for weight provides the highest representational capacity . | This paper points out that conventional uniform quantization methods do not allocate the same quantization level in the positive and negative areas and proposes Centered Symmetric Quantizer (CSQ), a zero-centered symmetric quantizer, to address the resulting degradation at very low precision. It also presents a method of mapping the proposed CSQ to BNN hardware through bit-wise operations. This paper claims that no specific analysis of CSQ has been made in previous studies and that low-precision quantization results in poor performance due to the allocation of asymmetric quantization levels in the positive and negative sides of the distribution. | SP:268d47581c6f07f416ea9a059461865becca6d86 |
MetaShift: A Dataset of Datasets for Evaluating Contextual Distribution Shifts and Training Conflicts | 1 INTRODUCTION . A major challenge in machine learning ( ML ) is that a model can have very different performances and behaviors when it ’ s applied to different types of natural data ( Koh et al. , 2020 ; Izzo et al. , 2021 ; 2022 ) . For example , if the user data have different contexts compared to the model ’ s training data ( e.g . users have outdoor dog photos and the model ’ s training was mostly on indoor images ) , then the model ’ s accuracy can greatly suffer ( Yao et al. , 2022 ) . A model can have disparate performances even within different subsets within its training and evaluation data ( Daneshjou et al. , 2021 ; Eyuboglu et al. , 2022 ) . In order to assess the reliability and fairness of a model , we therefore need to evaluate its performance and training behavior across heterogeneous types of data . However , the lack of well-structured datasets representing diverse data distributions makes systematic evaluation difficult . In this paper , we present MetaShift to tackle this challenge . MetaShift is a collection of 12,868 sets of natural images from 410 classes . Each set corresponds to images in a similar context and represents a coherent real-world data distribution , as shown in Figure 1 . The construction of MetaShift is different from and complementary to other efforts to curate benchmarks for data shifts by pulling together data across different experiments or sources . MetaShift leverages heterogeneity within the large sets of images from the Visual Genome project ( Krishna et al. , 2017 ) by clustering the images using metadata that describes the context of each image . The advantage of this approach is that MetaShift contains many more coherent sets of data compared to other benchmarks . Importantly , we have explicit annotations of what makes each subset unique ( e.g . cats with cars or dogs next to a bench ) as 1Dataset and code available at : https : //metashift.readthedocs.io/ well as a score that measures the distance between any two subsets , which is not available in previous benchmarks of natural data . We demonstrate the utility of MetaShift in two applications . First , MetaShift supports evaluation on both domain generalization and subpopulation shifts settings . Using the score between subsets provided by MetaShift , we study ML models ’ behavior under different carefully modulated amounts of distribution shift . Second , MetaShift can also shed light on the training dynamics of ML models . Since we have the subset membership information for each training datum , we could attribute the contribution of each gradient step back to the training subsets , and then analyze how different data subsets provide conflicting training signals . Our contributions : We present MetaShift as an important resource for studying the behavior of ML algorithms and training dynamics across data with heterogeneous contexts . Our methodology for constructing MetaShift can also be applied to other domains where metadata is available . We empirically evaluate the performance of different robust learning algorithms , showing that ERM performs well for modest shifts while no method is the clear winner for larger shifts . This finding suggests that domain generalization is an important and challenging task and that there ’ s still a lot of room for new methods . 2 RELATED WORK . Existing Benchmarks for Distribution Shift Distribution shifts have been a longstanding challenge in machine learning . Early benchmarks focus on distribution shifts induced by synthetic pixel transformations . Examples include rotated and translated versions of MNIST and CIFAR ( Worrall et al. , 2017 ) ; surface variations such as texture , color , and corruptions like blur in Colored MNIST ( Gulrajani & Lopez-Paz , 2020 ) , ImageNet-C ( Hendrycks & Dietterich , 2019 ) . Although the synthetic pixel transformations are well-defined , they generally do not represent realistic shifts in real-world images that we capture in MetaShift . Other benchmarks do not rely on transformations but instead pull together data across different experiments or sources . Office-31 ( Saenko et al. , 2010 ) and Office-home ( Venkateswara et al. , 2017 ) contain images collected from different domains like Amazon , clipart . These benchmarks typically have only a handful of data distributions . The benchmarks collected in WILDS ( Koh et al. , 2020 ) combine data from different sources ( e.g. , medical images from different hospitals , animal images from different camera traps ) . Similarly , some meta-learning benchmarks ( Triantafillou et al. , 2019 ; Guo et al. , 2020 ) focuses on dataset-level shift by combining different existing datasets like ImageNet , Omniglot . While valuable , they lack systematic annotation about what is different across different shifts . Santurkar et al . ( 2020 ) ; Ren et al . ( 2018 ) utilize the hierarchical structure of ImageNet to construct training and test sets with disjoint subclasses . For example , the “ tableware ” class uses “ beer glass ” and “ plate ” for training and testing respectively . Different from their work , we study the shifts where the core object remains the same while the context changes . NICO ( He et al. , 2020 ) query different manually-curated phrases on search engines to collect images of objects in different contexts . A key difference is the scale of MetaShift : NICO contains 190 sets of images across 19 classes while MetaShift has 12,868 sets of natural images across 410 classes . To sum up , the advantages of our MetaShift are : • Existing benchmark datasets for distribution shifts typically have only a handful of data distributions . In contrast , our MetaShift has over 12,868 data distributions , thus enabling a much more comprehensive assessment of distribution shifts . • Distribution shifts in existing benchmarks are not annotated ( i.e . we don ’ t know what drives the shift ) and are not well-controlled ( i.e . we can ’ t easily adjust the magnitude of the shift ) . The MetaShift provides explicit annotations of the differences between any two sub-datasets , and it quantifies the distance of the shift . Evaluating conflicts on training data Recent work has shown that different training data points play a heterogeneous role in training . To quantify this , Data Shapley ( Ghorbani & Zou , 2019 ; Kwon & Zou , 2022 ) provides a mathematical framework for quantifying the contribution of each training datum . Data Cartography ( Swayamdipta et al. , 2020 ) leverages a model ’ s training confidence to discover hard-to-learn training data points . Such understanding has provided actionable insights that benefit the ML workflow . For example , removing noisy low-contribution training data points improves the model ’ s final performance ( Liang et al. , 2020a ; 2021 ) . Furthermore , active learning identifies the most informative data points for humans to annotate ( Liang et al. , 2020b ) . Complementary to their work , our analysis sheds light on not only which but also why a certain portion of the training data are hard-to-learn—because different subsets are providing conflicting training signals . 3 THE METASHIFT CONSTRUCTION METHODOLOGY . What is MetaShift ? The MetaShift is a collection of subsets of data together with an annotation graph that explains the similarity/distance between two subsets ( edge weight ) as well as what is unique about each subset ( node metadata ) . For each class , say “ cat ” , we have many subsets of cats , and we can think of each subset as a node in the graph , as shown in Figure 2 . Each subset corresponds to “ cat ” in a different context : e.g . “ cat with sink ” or “ cat with fence ” . The context of each subset is the node metadata . The “ cat with sink ” subset is more similar to “ cat with faucet ” subset because there are many images that contain both sink and faucet . This similarity is the weight of the edge ; a higher weight means the contexts of the two nodes tend to co-occur in the same data . How can we use MetaShift ? It is a flexible framework to generate a large number of real-world distribution shifts that are well-annotated and controlled . For each class of interest , say “ cats ” , we can use the meta-graph of cats to identify a collection of cats nodes for training ( e.g . cats with bathroom-related contexts ) and a collection of cats nodes for out-of-domain evaluation ( e.g . cats in outdoor contexts ) . Our meta-graph tells us exactly what is different between the train and test domains ( e.g . bathroom vs. outdoor contexts ) , and it also specifies the similarity between the two contexts via graph distance . That makes it easy to carefully modulate the amount of distribution shift . For example , if we use cats-in-living-room as the test set , then this is a smaller distribution shift . Base Dataset : Visual Genome We leverage the natural heterogeneity of Visual Genome and its annotations to construct MetaShift . Visual Genome contains over 100k images across 1,702 object classes . For each image , Visual Genome annotates the class labels of all objects that occur in the image . Formally , for each image x ( i ) , we have a list of meta-data tags m ( i ) = { t ( i ) 1 , t ( i ) 2 , . . . , t ( i ) nm } , each indicating the presence of an object in the context . We denote the vocabulary of the meta-data tags as M = { m0 , . . . , m|M| } . MetaShift is constructed on a class-by-class basis : For each class , say “ cat ” , we pull out all cat images and proceed with the following steps . Step 1 : Generate Candidate Subsets We first generate candidate subsets by enumerating all possible meta-data tags . We construct |M| candidate subsets where the ith subset contains all images of the class of interest ( i.e. , “ cat ” ) that has a meta-tag mi . We then remove subsets whose sizes are less than a threshold ( e.g. , 25 ) . Step 2 : Construct Meta-graphs Since the meta-data are not necessarily disentangled , the candidate subsets might contain significant overlaps ( e.g. , “ cat with sink ” and “ cat with faucet ” ) . To capture this phenomenon , we construct a meta-graph to model the relationships among all subsets of each class . Specifically , for each class j ∈ Y , we construct meta-graph , a weighted undirected graph G = ( V , E ) where each node v ∈ V denotes a candidate subset , and the weight of each edge is the overlap coefficient between two subsets : overlap ( X , Y ) = |X ∩ Y | min ( |X| , |Y | ) , ( 1 ) We remove the edges whose weights are less than a threshold ( e.g. , 0.1 ) to sparsify the graph . As shown in Figure 2 , the meta-graph G captures meaningful semantics of the multi-modal data distribution of the class of interest . Step 3 : Quantify Distances of Distribution Shifts The geometry of meta-graphs provides a natural and systematic way to quantify the distances of shifts across different data distributions : Intuitively , if two subsets are far away from each other in the MetaGraph , then the shift between them tend to be large . Following this intuition , we leverage spectral embeddings ( Belkin & Niyogi , 2003 ; Chung & Graham , 1997 ) to assign an embedding for each node based on the graph geometry . Spectral embedding minimizes the expected square distance between nodes that are connected : min X : XT 1=0 , XTX=IK ∑ i , j∈V Aij ∥Xi −Xj∥2 ( 2 ) where Xi is the embedding for node i ∈ V and K is the dimension of the embedding , and A is the adjacency matrix . We denote by X the matrix of dimension n×K whose i-th row Xi corresponds to the embedding of node i . The constraint XT 1 = 0 forces the embedding to be centered and XTX = IK ensures that we do not get trivial solution like all node embeddings located at the origin ( i.e. , X = 0 ) . Denoting by L = D −A the Laplacian matrix of the graph , we have : tr ( XTLX ) = 1 2 ∑ i , j∈V Aij ∥Xi −Xj∥2 ( 3 ) min X : XT 1=0 , XTX=IK tr ( XTLX ) = K+1∑ k=2 λk ( 4 ) The minimum is reached for X equal to the matrix of eigenvectors of the Laplacian matrix associated with the eigenvalues λ2 , ... , λK+1 . After calculating the spectral embeddings , we use the euclidean distance between the embeddings of two nodes as their distance . Other off-the-shelf node embedding methods like Node2Vec ( Grover & Leskovec , 2016 ) can be readily plugged into MetaShift . We delay exploring them as future work . Although the subset overlap ( i.e. , edge weight ) can also be used as a similarity metric , it does not incorporate the structural information from neighboring nodes . Our node embedding-based distance captures not only such overlap , but also broader similarities . Step 4 : Simulating Distribution Shifts MetaShifts allows users to benchmark both ( 1 ) domain generalization and ( 2 ) subpopulation shifts in a well-annotated ( explicit annotation of what drives the shift ) and well-controlled ( easy control of the amount of distribution shift ) fashion . • In domain generalization , the train and test distributions comprise data from related but distinct domains . This arises in many real-world scenarios since it is often infeasible to construct a comprehensive training set that spans all domains . To simulate this setting , we can sample two distinct collections of subsets as the train domains and the test domains respectively ( e.g . bathroom vs. outdoor contexts ) . To adjust the magnitude of the shift , we can fix the test domains and change the train domains with different distances . For example , if we use cats-in-living-room as the test set , then this is a smaller distribution shift . • In subpopulation shifts , the train and test distributions are mixtures of the same domains , but the mixture weights change between train and test . It is also an important setting since ML models are often reported to perform poorly on under-represented groups . To simulate this setting , we can sample the training set and test set from the same subsets but with different mixture weights . To adjust the magnitude of the shift , we can use different mixture weights for the training set while keeping the test set unchanged . We demonstrate both settings in the experiment section . It is also worth noting that different subsets may share common images—e.g . a dog image can have both grass and frisbee would occur in both dog with grass and dog with frisbee . Therefore , a post-processing step is needed to remove the training images that also occur in the test set to ensure no data leakage . MetaShift Statistics Figure 3 shows the statistics of MetaShift across all tasks . We start from the pre-processed and cleaned version of Visual Genome ( Hudson & Manning , 2019 ) , which contains 113,018 distinct images across 1,702 object classes . After the dataset construction , we have 12,868 sets of natural images from 410 classes . Concretely , each class has 31.4 subsets , and each subset has 200.4 images on average . The subsets are characterized by a diverse vocabulary of 1,853 distinct contexts . Beyond 1,702 contexts defined by object presence , MetaShift also leverages the 37 distinct general contexts and 114 object attributes from Visual Genome . The general contexts typically describe locations ( i.e. , indoor , outdoor ) , weather ( e.g. , rainy , cloudless ) , and places ( e.g. , bathroom , ocean ) . The object attributes include color ( e.g. , white , red ) , material ( e.g. , wood , plastic ) , shape ( e.g. , round , square ) , and other object-specific properties ( e.g. , empty/full for plates ) . See Appendix A for examples and more information . Generalizability : Case Study on COCO The MetaShift construction methodology is quite simple , and can be extended to any dataset with metadata tags ( i.e. , multilabel ) . To demonstrate this , we apply the construction methodology on MS-COCO dataset ( Lin et al. , 2014 ) , which provides object detection labels for each image . Applying our construction methodology , we are able to construct 1321 subsets , with an average size of 389 and a median size of 124 , along with 80 meta-graphs that help to quantify the amount of distribution shift among MS-COCO subsets . Experiments on MetaShift from COCO can be found in Appendix D. Even though the data that we used here ( e.g . Visual Genome , COCO ) is not new , the idea of turning one dataset into a structured collection of datasets for assessing distribution shift is less explored . COCO ( Lin et al. , 2014 ) and many other datasets provide meta-data that could be naturally used for generating candidate subsets . The main contribution of our methodology is that after generating the candidate subsets , our method provides a meta-graph that could be used to determine the train and test domains , and also specifies the similarity between the two subsets via graph distance . MetaShift opens up a new window for systematically evaluating domain shifts . | This work proposes a collection called MetaShift to study the impact of dataset distribution. The major advantage of MetaShift is that it provides annotation/information to measure the amount of distribution shift between any two of its data sets. In the experiment, this work constructs two applications, 1) evaluating distribution shifts, assessing training conflicts. | SP:20ef2352687861920f629c47a62a519c9f5ebbd5 |
MetaShift: A Dataset of Datasets for Evaluating Contextual Distribution Shifts and Training Conflicts | 1 INTRODUCTION . A major challenge in machine learning ( ML ) is that a model can have very different performances and behaviors when it ’ s applied to different types of natural data ( Koh et al. , 2020 ; Izzo et al. , 2021 ; 2022 ) . For example , if the user data have different contexts compared to the model ’ s training data ( e.g . users have outdoor dog photos and the model ’ s training was mostly on indoor images ) , then the model ’ s accuracy can greatly suffer ( Yao et al. , 2022 ) . A model can have disparate performances even within different subsets within its training and evaluation data ( Daneshjou et al. , 2021 ; Eyuboglu et al. , 2022 ) . In order to assess the reliability and fairness of a model , we therefore need to evaluate its performance and training behavior across heterogeneous types of data . However , the lack of well-structured datasets representing diverse data distributions makes systematic evaluation difficult . In this paper , we present MetaShift to tackle this challenge . MetaShift is a collection of 12,868 sets of natural images from 410 classes . Each set corresponds to images in a similar context and represents a coherent real-world data distribution , as shown in Figure 1 . The construction of MetaShift is different from and complementary to other efforts to curate benchmarks for data shifts by pulling together data across different experiments or sources . MetaShift leverages heterogeneity within the large sets of images from the Visual Genome project ( Krishna et al. , 2017 ) by clustering the images using metadata that describes the context of each image . The advantage of this approach is that MetaShift contains many more coherent sets of data compared to other benchmarks . Importantly , we have explicit annotations of what makes each subset unique ( e.g . cats with cars or dogs next to a bench ) as 1Dataset and code available at : https : //metashift.readthedocs.io/ well as a score that measures the distance between any two subsets , which is not available in previous benchmarks of natural data . We demonstrate the utility of MetaShift in two applications . First , MetaShift supports evaluation on both domain generalization and subpopulation shifts settings . Using the score between subsets provided by MetaShift , we study ML models ’ behavior under different carefully modulated amounts of distribution shift . Second , MetaShift can also shed light on the training dynamics of ML models . Since we have the subset membership information for each training datum , we could attribute the contribution of each gradient step back to the training subsets , and then analyze how different data subsets provide conflicting training signals . Our contributions : We present MetaShift as an important resource for studying the behavior of ML algorithms and training dynamics across data with heterogeneous contexts . Our methodology for constructing MetaShift can also be applied to other domains where metadata is available . We empirically evaluate the performance of different robust learning algorithms , showing that ERM performs well for modest shifts while no method is the clear winner for larger shifts . This finding suggests that domain generalization is an important and challenging task and that there ’ s still a lot of room for new methods . 2 RELATED WORK . Existing Benchmarks for Distribution Shift Distribution shifts have been a longstanding challenge in machine learning . Early benchmarks focus on distribution shifts induced by synthetic pixel transformations . Examples include rotated and translated versions of MNIST and CIFAR ( Worrall et al. , 2017 ) ; surface variations such as texture , color , and corruptions like blur in Colored MNIST ( Gulrajani & Lopez-Paz , 2020 ) , ImageNet-C ( Hendrycks & Dietterich , 2019 ) . Although the synthetic pixel transformations are well-defined , they generally do not represent realistic shifts in real-world images that we capture in MetaShift . Other benchmarks do not rely on transformations but instead pull together data across different experiments or sources . Office-31 ( Saenko et al. , 2010 ) and Office-home ( Venkateswara et al. , 2017 ) contain images collected from different domains like Amazon , clipart . These benchmarks typically have only a handful of data distributions . The benchmarks collected in WILDS ( Koh et al. , 2020 ) combine data from different sources ( e.g. , medical images from different hospitals , animal images from different camera traps ) . Similarly , some meta-learning benchmarks ( Triantafillou et al. , 2019 ; Guo et al. , 2020 ) focuses on dataset-level shift by combining different existing datasets like ImageNet , Omniglot . While valuable , they lack systematic annotation about what is different across different shifts . Santurkar et al . ( 2020 ) ; Ren et al . ( 2018 ) utilize the hierarchical structure of ImageNet to construct training and test sets with disjoint subclasses . For example , the “ tableware ” class uses “ beer glass ” and “ plate ” for training and testing respectively . Different from their work , we study the shifts where the core object remains the same while the context changes . NICO ( He et al. , 2020 ) query different manually-curated phrases on search engines to collect images of objects in different contexts . A key difference is the scale of MetaShift : NICO contains 190 sets of images across 19 classes while MetaShift has 12,868 sets of natural images across 410 classes . To sum up , the advantages of our MetaShift are : • Existing benchmark datasets for distribution shifts typically have only a handful of data distributions . In contrast , our MetaShift has over 12,868 data distributions , thus enabling a much more comprehensive assessment of distribution shifts . • Distribution shifts in existing benchmarks are not annotated ( i.e . we don ’ t know what drives the shift ) and are not well-controlled ( i.e . we can ’ t easily adjust the magnitude of the shift ) . The MetaShift provides explicit annotations of the differences between any two sub-datasets , and it quantifies the distance of the shift . Evaluating conflicts on training data Recent work has shown that different training data points play a heterogeneous role in training . To quantify this , Data Shapley ( Ghorbani & Zou , 2019 ; Kwon & Zou , 2022 ) provides a mathematical framework for quantifying the contribution of each training datum . Data Cartography ( Swayamdipta et al. , 2020 ) leverages a model ’ s training confidence to discover hard-to-learn training data points . Such understanding has provided actionable insights that benefit the ML workflow . For example , removing noisy low-contribution training data points improves the model ’ s final performance ( Liang et al. , 2020a ; 2021 ) . Furthermore , active learning identifies the most informative data points for humans to annotate ( Liang et al. , 2020b ) . Complementary to their work , our analysis sheds light on not only which but also why a certain portion of the training data are hard-to-learn—because different subsets are providing conflicting training signals . 3 THE METASHIFT CONSTRUCTION METHODOLOGY . What is MetaShift ? The MetaShift is a collection of subsets of data together with an annotation graph that explains the similarity/distance between two subsets ( edge weight ) as well as what is unique about each subset ( node metadata ) . For each class , say “ cat ” , we have many subsets of cats , and we can think of each subset as a node in the graph , as shown in Figure 2 . Each subset corresponds to “ cat ” in a different context : e.g . “ cat with sink ” or “ cat with fence ” . The context of each subset is the node metadata . The “ cat with sink ” subset is more similar to “ cat with faucet ” subset because there are many images that contain both sink and faucet . This similarity is the weight of the edge ; a higher weight means the contexts of the two nodes tend to co-occur in the same data . How can we use MetaShift ? It is a flexible framework to generate a large number of real-world distribution shifts that are well-annotated and controlled . For each class of interest , say “ cats ” , we can use the meta-graph of cats to identify a collection of cats nodes for training ( e.g . cats with bathroom-related contexts ) and a collection of cats nodes for out-of-domain evaluation ( e.g . cats in outdoor contexts ) . Our meta-graph tells us exactly what is different between the train and test domains ( e.g . bathroom vs. outdoor contexts ) , and it also specifies the similarity between the two contexts via graph distance . That makes it easy to carefully modulate the amount of distribution shift . For example , if we use cats-in-living-room as the test set , then this is a smaller distribution shift . Base Dataset : Visual Genome We leverage the natural heterogeneity of Visual Genome and its annotations to construct MetaShift . Visual Genome contains over 100k images across 1,702 object classes . For each image , Visual Genome annotates the class labels of all objects that occur in the image . Formally , for each image x ( i ) , we have a list of meta-data tags m ( i ) = { t ( i ) 1 , t ( i ) 2 , . . . , t ( i ) nm } , each indicating the presence of an object in the context . We denote the vocabulary of the meta-data tags as M = { m0 , . . . , m|M| } . MetaShift is constructed on a class-by-class basis : For each class , say “ cat ” , we pull out all cat images and proceed with the following steps . Step 1 : Generate Candidate Subsets We first generate candidate subsets by enumerating all possible meta-data tags . We construct |M| candidate subsets where the ith subset contains all images of the class of interest ( i.e. , “ cat ” ) that has a meta-tag mi . We then remove subsets whose sizes are less than a threshold ( e.g. , 25 ) . Step 2 : Construct Meta-graphs Since the meta-data are not necessarily disentangled , the candidate subsets might contain significant overlaps ( e.g. , “ cat with sink ” and “ cat with faucet ” ) . To capture this phenomenon , we construct a meta-graph to model the relationships among all subsets of each class . Specifically , for each class j ∈ Y , we construct meta-graph , a weighted undirected graph G = ( V , E ) where each node v ∈ V denotes a candidate subset , and the weight of each edge is the overlap coefficient between two subsets : overlap ( X , Y ) = |X ∩ Y | min ( |X| , |Y | ) , ( 1 ) We remove the edges whose weights are less than a threshold ( e.g. , 0.1 ) to sparsify the graph . As shown in Figure 2 , the meta-graph G captures meaningful semantics of the multi-modal data distribution of the class of interest . Step 3 : Quantify Distances of Distribution Shifts The geometry of meta-graphs provides a natural and systematic way to quantify the distances of shifts across different data distributions : Intuitively , if two subsets are far away from each other in the MetaGraph , then the shift between them tend to be large . Following this intuition , we leverage spectral embeddings ( Belkin & Niyogi , 2003 ; Chung & Graham , 1997 ) to assign an embedding for each node based on the graph geometry . Spectral embedding minimizes the expected square distance between nodes that are connected : min X : XT 1=0 , XTX=IK ∑ i , j∈V Aij ∥Xi −Xj∥2 ( 2 ) where Xi is the embedding for node i ∈ V and K is the dimension of the embedding , and A is the adjacency matrix . We denote by X the matrix of dimension n×K whose i-th row Xi corresponds to the embedding of node i . The constraint XT 1 = 0 forces the embedding to be centered and XTX = IK ensures that we do not get trivial solution like all node embeddings located at the origin ( i.e. , X = 0 ) . Denoting by L = D −A the Laplacian matrix of the graph , we have : tr ( XTLX ) = 1 2 ∑ i , j∈V Aij ∥Xi −Xj∥2 ( 3 ) min X : XT 1=0 , XTX=IK tr ( XTLX ) = K+1∑ k=2 λk ( 4 ) The minimum is reached for X equal to the matrix of eigenvectors of the Laplacian matrix associated with the eigenvalues λ2 , ... , λK+1 . After calculating the spectral embeddings , we use the euclidean distance between the embeddings of two nodes as their distance . Other off-the-shelf node embedding methods like Node2Vec ( Grover & Leskovec , 2016 ) can be readily plugged into MetaShift . We delay exploring them as future work . Although the subset overlap ( i.e. , edge weight ) can also be used as a similarity metric , it does not incorporate the structural information from neighboring nodes . Our node embedding-based distance captures not only such overlap , but also broader similarities . Step 4 : Simulating Distribution Shifts MetaShifts allows users to benchmark both ( 1 ) domain generalization and ( 2 ) subpopulation shifts in a well-annotated ( explicit annotation of what drives the shift ) and well-controlled ( easy control of the amount of distribution shift ) fashion . • In domain generalization , the train and test distributions comprise data from related but distinct domains . This arises in many real-world scenarios since it is often infeasible to construct a comprehensive training set that spans all domains . To simulate this setting , we can sample two distinct collections of subsets as the train domains and the test domains respectively ( e.g . bathroom vs. outdoor contexts ) . To adjust the magnitude of the shift , we can fix the test domains and change the train domains with different distances . For example , if we use cats-in-living-room as the test set , then this is a smaller distribution shift . • In subpopulation shifts , the train and test distributions are mixtures of the same domains , but the mixture weights change between train and test . It is also an important setting since ML models are often reported to perform poorly on under-represented groups . To simulate this setting , we can sample the training set and test set from the same subsets but with different mixture weights . To adjust the magnitude of the shift , we can use different mixture weights for the training set while keeping the test set unchanged . We demonstrate both settings in the experiment section . It is also worth noting that different subsets may share common images—e.g . a dog image can have both grass and frisbee would occur in both dog with grass and dog with frisbee . Therefore , a post-processing step is needed to remove the training images that also occur in the test set to ensure no data leakage . MetaShift Statistics Figure 3 shows the statistics of MetaShift across all tasks . We start from the pre-processed and cleaned version of Visual Genome ( Hudson & Manning , 2019 ) , which contains 113,018 distinct images across 1,702 object classes . After the dataset construction , we have 12,868 sets of natural images from 410 classes . Concretely , each class has 31.4 subsets , and each subset has 200.4 images on average . The subsets are characterized by a diverse vocabulary of 1,853 distinct contexts . Beyond 1,702 contexts defined by object presence , MetaShift also leverages the 37 distinct general contexts and 114 object attributes from Visual Genome . The general contexts typically describe locations ( i.e. , indoor , outdoor ) , weather ( e.g. , rainy , cloudless ) , and places ( e.g. , bathroom , ocean ) . The object attributes include color ( e.g. , white , red ) , material ( e.g. , wood , plastic ) , shape ( e.g. , round , square ) , and other object-specific properties ( e.g. , empty/full for plates ) . See Appendix A for examples and more information . Generalizability : Case Study on COCO The MetaShift construction methodology is quite simple , and can be extended to any dataset with metadata tags ( i.e. , multilabel ) . To demonstrate this , we apply the construction methodology on MS-COCO dataset ( Lin et al. , 2014 ) , which provides object detection labels for each image . Applying our construction methodology , we are able to construct 1321 subsets , with an average size of 389 and a median size of 124 , along with 80 meta-graphs that help to quantify the amount of distribution shift among MS-COCO subsets . Experiments on MetaShift from COCO can be found in Appendix D. Even though the data that we used here ( e.g . Visual Genome , COCO ) is not new , the idea of turning one dataset into a structured collection of datasets for assessing distribution shift is less explored . COCO ( Lin et al. , 2014 ) and many other datasets provide meta-data that could be naturally used for generating candidate subsets . The main contribution of our methodology is that after generating the candidate subsets , our method provides a meta-graph that could be used to determine the train and test domains , and also specifies the similarity between the two subsets via graph distance . MetaShift opens up a new window for systematically evaluating domain shifts . | The paper provides a benchmark dataset that can be used for training & evaluation of Machine Learning models. Their contribution is that they have a large collection of 12,868 sets of natural images across 410 classes obtained from visual genome data and its metadata for annotations. This helps in accounting for large natural shifts in the data. They also provide a way to measure distance between two subsets to quantize the distribution shift between any two of its data sets. The paper provides a good justification for the need of such a dataset for computer vision tasks and motivate the idea well. It also talks in detail about the steps taken to generate MetaShift from Visual Genome, it also provides a generalization of their 4-step process of dataset creation on any dataset with multilabel, results presented for COCO dataset. The paper further discusses the use of this dataset for two major cases- Evaluating distribution shifts & Assessing training conflicts. They provide the impact of shift distance on the domain generalization by keeping test set same and varying training subsets randomly. Further, it talks about subpopulation shifts where the train and test distribution of same domain with different mixture weights. They show that no algorithm consistently performs better than other algorithms for larger shifts. It provides a detailed understanding of training conflict by analyzing the contribution of each training subset to the change of the validation loss of each validation set during the training process. Overall, it’s a well written paper about the motivation, use cases, applicability, and generalizability of their proposed data set. | SP:20ef2352687861920f629c47a62a519c9f5ebbd5 |
MetaShift: A Dataset of Datasets for Evaluating Contextual Distribution Shifts and Training Conflicts | 1 INTRODUCTION . A major challenge in machine learning ( ML ) is that a model can have very different performances and behaviors when it ’ s applied to different types of natural data ( Koh et al. , 2020 ; Izzo et al. , 2021 ; 2022 ) . For example , if the user data have different contexts compared to the model ’ s training data ( e.g . users have outdoor dog photos and the model ’ s training was mostly on indoor images ) , then the model ’ s accuracy can greatly suffer ( Yao et al. , 2022 ) . A model can have disparate performances even within different subsets within its training and evaluation data ( Daneshjou et al. , 2021 ; Eyuboglu et al. , 2022 ) . In order to assess the reliability and fairness of a model , we therefore need to evaluate its performance and training behavior across heterogeneous types of data . However , the lack of well-structured datasets representing diverse data distributions makes systematic evaluation difficult . In this paper , we present MetaShift to tackle this challenge . MetaShift is a collection of 12,868 sets of natural images from 410 classes . Each set corresponds to images in a similar context and represents a coherent real-world data distribution , as shown in Figure 1 . The construction of MetaShift is different from and complementary to other efforts to curate benchmarks for data shifts by pulling together data across different experiments or sources . MetaShift leverages heterogeneity within the large sets of images from the Visual Genome project ( Krishna et al. , 2017 ) by clustering the images using metadata that describes the context of each image . The advantage of this approach is that MetaShift contains many more coherent sets of data compared to other benchmarks . Importantly , we have explicit annotations of what makes each subset unique ( e.g . cats with cars or dogs next to a bench ) as 1Dataset and code available at : https : //metashift.readthedocs.io/ well as a score that measures the distance between any two subsets , which is not available in previous benchmarks of natural data . We demonstrate the utility of MetaShift in two applications . First , MetaShift supports evaluation on both domain generalization and subpopulation shifts settings . Using the score between subsets provided by MetaShift , we study ML models ’ behavior under different carefully modulated amounts of distribution shift . Second , MetaShift can also shed light on the training dynamics of ML models . Since we have the subset membership information for each training datum , we could attribute the contribution of each gradient step back to the training subsets , and then analyze how different data subsets provide conflicting training signals . Our contributions : We present MetaShift as an important resource for studying the behavior of ML algorithms and training dynamics across data with heterogeneous contexts . Our methodology for constructing MetaShift can also be applied to other domains where metadata is available . We empirically evaluate the performance of different robust learning algorithms , showing that ERM performs well for modest shifts while no method is the clear winner for larger shifts . This finding suggests that domain generalization is an important and challenging task and that there ’ s still a lot of room for new methods . 2 RELATED WORK . Existing Benchmarks for Distribution Shift Distribution shifts have been a longstanding challenge in machine learning . Early benchmarks focus on distribution shifts induced by synthetic pixel transformations . Examples include rotated and translated versions of MNIST and CIFAR ( Worrall et al. , 2017 ) ; surface variations such as texture , color , and corruptions like blur in Colored MNIST ( Gulrajani & Lopez-Paz , 2020 ) , ImageNet-C ( Hendrycks & Dietterich , 2019 ) . Although the synthetic pixel transformations are well-defined , they generally do not represent realistic shifts in real-world images that we capture in MetaShift . Other benchmarks do not rely on transformations but instead pull together data across different experiments or sources . Office-31 ( Saenko et al. , 2010 ) and Office-home ( Venkateswara et al. , 2017 ) contain images collected from different domains like Amazon , clipart . These benchmarks typically have only a handful of data distributions . The benchmarks collected in WILDS ( Koh et al. , 2020 ) combine data from different sources ( e.g. , medical images from different hospitals , animal images from different camera traps ) . Similarly , some meta-learning benchmarks ( Triantafillou et al. , 2019 ; Guo et al. , 2020 ) focuses on dataset-level shift by combining different existing datasets like ImageNet , Omniglot . While valuable , they lack systematic annotation about what is different across different shifts . Santurkar et al . ( 2020 ) ; Ren et al . ( 2018 ) utilize the hierarchical structure of ImageNet to construct training and test sets with disjoint subclasses . For example , the “ tableware ” class uses “ beer glass ” and “ plate ” for training and testing respectively . Different from their work , we study the shifts where the core object remains the same while the context changes . NICO ( He et al. , 2020 ) query different manually-curated phrases on search engines to collect images of objects in different contexts . A key difference is the scale of MetaShift : NICO contains 190 sets of images across 19 classes while MetaShift has 12,868 sets of natural images across 410 classes . To sum up , the advantages of our MetaShift are : • Existing benchmark datasets for distribution shifts typically have only a handful of data distributions . In contrast , our MetaShift has over 12,868 data distributions , thus enabling a much more comprehensive assessment of distribution shifts . • Distribution shifts in existing benchmarks are not annotated ( i.e . we don ’ t know what drives the shift ) and are not well-controlled ( i.e . we can ’ t easily adjust the magnitude of the shift ) . The MetaShift provides explicit annotations of the differences between any two sub-datasets , and it quantifies the distance of the shift . Evaluating conflicts on training data Recent work has shown that different training data points play a heterogeneous role in training . To quantify this , Data Shapley ( Ghorbani & Zou , 2019 ; Kwon & Zou , 2022 ) provides a mathematical framework for quantifying the contribution of each training datum . Data Cartography ( Swayamdipta et al. , 2020 ) leverages a model ’ s training confidence to discover hard-to-learn training data points . Such understanding has provided actionable insights that benefit the ML workflow . For example , removing noisy low-contribution training data points improves the model ’ s final performance ( Liang et al. , 2020a ; 2021 ) . Furthermore , active learning identifies the most informative data points for humans to annotate ( Liang et al. , 2020b ) . Complementary to their work , our analysis sheds light on not only which but also why a certain portion of the training data are hard-to-learn—because different subsets are providing conflicting training signals . 3 THE METASHIFT CONSTRUCTION METHODOLOGY . What is MetaShift ? The MetaShift is a collection of subsets of data together with an annotation graph that explains the similarity/distance between two subsets ( edge weight ) as well as what is unique about each subset ( node metadata ) . For each class , say “ cat ” , we have many subsets of cats , and we can think of each subset as a node in the graph , as shown in Figure 2 . Each subset corresponds to “ cat ” in a different context : e.g . “ cat with sink ” or “ cat with fence ” . The context of each subset is the node metadata . The “ cat with sink ” subset is more similar to “ cat with faucet ” subset because there are many images that contain both sink and faucet . This similarity is the weight of the edge ; a higher weight means the contexts of the two nodes tend to co-occur in the same data . How can we use MetaShift ? It is a flexible framework to generate a large number of real-world distribution shifts that are well-annotated and controlled . For each class of interest , say “ cats ” , we can use the meta-graph of cats to identify a collection of cats nodes for training ( e.g . cats with bathroom-related contexts ) and a collection of cats nodes for out-of-domain evaluation ( e.g . cats in outdoor contexts ) . Our meta-graph tells us exactly what is different between the train and test domains ( e.g . bathroom vs. outdoor contexts ) , and it also specifies the similarity between the two contexts via graph distance . That makes it easy to carefully modulate the amount of distribution shift . For example , if we use cats-in-living-room as the test set , then this is a smaller distribution shift . Base Dataset : Visual Genome We leverage the natural heterogeneity of Visual Genome and its annotations to construct MetaShift . Visual Genome contains over 100k images across 1,702 object classes . For each image , Visual Genome annotates the class labels of all objects that occur in the image . Formally , for each image x ( i ) , we have a list of meta-data tags m ( i ) = { t ( i ) 1 , t ( i ) 2 , . . . , t ( i ) nm } , each indicating the presence of an object in the context . We denote the vocabulary of the meta-data tags as M = { m0 , . . . , m|M| } . MetaShift is constructed on a class-by-class basis : For each class , say “ cat ” , we pull out all cat images and proceed with the following steps . Step 1 : Generate Candidate Subsets We first generate candidate subsets by enumerating all possible meta-data tags . We construct |M| candidate subsets where the ith subset contains all images of the class of interest ( i.e. , “ cat ” ) that has a meta-tag mi . We then remove subsets whose sizes are less than a threshold ( e.g. , 25 ) . Step 2 : Construct Meta-graphs Since the meta-data are not necessarily disentangled , the candidate subsets might contain significant overlaps ( e.g. , “ cat with sink ” and “ cat with faucet ” ) . To capture this phenomenon , we construct a meta-graph to model the relationships among all subsets of each class . Specifically , for each class j ∈ Y , we construct meta-graph , a weighted undirected graph G = ( V , E ) where each node v ∈ V denotes a candidate subset , and the weight of each edge is the overlap coefficient between two subsets : overlap ( X , Y ) = |X ∩ Y | min ( |X| , |Y | ) , ( 1 ) We remove the edges whose weights are less than a threshold ( e.g. , 0.1 ) to sparsify the graph . As shown in Figure 2 , the meta-graph G captures meaningful semantics of the multi-modal data distribution of the class of interest . Step 3 : Quantify Distances of Distribution Shifts The geometry of meta-graphs provides a natural and systematic way to quantify the distances of shifts across different data distributions : Intuitively , if two subsets are far away from each other in the MetaGraph , then the shift between them tend to be large . Following this intuition , we leverage spectral embeddings ( Belkin & Niyogi , 2003 ; Chung & Graham , 1997 ) to assign an embedding for each node based on the graph geometry . Spectral embedding minimizes the expected square distance between nodes that are connected : min X : XT 1=0 , XTX=IK ∑ i , j∈V Aij ∥Xi −Xj∥2 ( 2 ) where Xi is the embedding for node i ∈ V and K is the dimension of the embedding , and A is the adjacency matrix . We denote by X the matrix of dimension n×K whose i-th row Xi corresponds to the embedding of node i . The constraint XT 1 = 0 forces the embedding to be centered and XTX = IK ensures that we do not get trivial solution like all node embeddings located at the origin ( i.e. , X = 0 ) . Denoting by L = D −A the Laplacian matrix of the graph , we have : tr ( XTLX ) = 1 2 ∑ i , j∈V Aij ∥Xi −Xj∥2 ( 3 ) min X : XT 1=0 , XTX=IK tr ( XTLX ) = K+1∑ k=2 λk ( 4 ) The minimum is reached for X equal to the matrix of eigenvectors of the Laplacian matrix associated with the eigenvalues λ2 , ... , λK+1 . After calculating the spectral embeddings , we use the euclidean distance between the embeddings of two nodes as their distance . Other off-the-shelf node embedding methods like Node2Vec ( Grover & Leskovec , 2016 ) can be readily plugged into MetaShift . We delay exploring them as future work . Although the subset overlap ( i.e. , edge weight ) can also be used as a similarity metric , it does not incorporate the structural information from neighboring nodes . Our node embedding-based distance captures not only such overlap , but also broader similarities . Step 4 : Simulating Distribution Shifts MetaShifts allows users to benchmark both ( 1 ) domain generalization and ( 2 ) subpopulation shifts in a well-annotated ( explicit annotation of what drives the shift ) and well-controlled ( easy control of the amount of distribution shift ) fashion . • In domain generalization , the train and test distributions comprise data from related but distinct domains . This arises in many real-world scenarios since it is often infeasible to construct a comprehensive training set that spans all domains . To simulate this setting , we can sample two distinct collections of subsets as the train domains and the test domains respectively ( e.g . bathroom vs. outdoor contexts ) . To adjust the magnitude of the shift , we can fix the test domains and change the train domains with different distances . For example , if we use cats-in-living-room as the test set , then this is a smaller distribution shift . • In subpopulation shifts , the train and test distributions are mixtures of the same domains , but the mixture weights change between train and test . It is also an important setting since ML models are often reported to perform poorly on under-represented groups . To simulate this setting , we can sample the training set and test set from the same subsets but with different mixture weights . To adjust the magnitude of the shift , we can use different mixture weights for the training set while keeping the test set unchanged . We demonstrate both settings in the experiment section . It is also worth noting that different subsets may share common images—e.g . a dog image can have both grass and frisbee would occur in both dog with grass and dog with frisbee . Therefore , a post-processing step is needed to remove the training images that also occur in the test set to ensure no data leakage . MetaShift Statistics Figure 3 shows the statistics of MetaShift across all tasks . We start from the pre-processed and cleaned version of Visual Genome ( Hudson & Manning , 2019 ) , which contains 113,018 distinct images across 1,702 object classes . After the dataset construction , we have 12,868 sets of natural images from 410 classes . Concretely , each class has 31.4 subsets , and each subset has 200.4 images on average . The subsets are characterized by a diverse vocabulary of 1,853 distinct contexts . Beyond 1,702 contexts defined by object presence , MetaShift also leverages the 37 distinct general contexts and 114 object attributes from Visual Genome . The general contexts typically describe locations ( i.e. , indoor , outdoor ) , weather ( e.g. , rainy , cloudless ) , and places ( e.g. , bathroom , ocean ) . The object attributes include color ( e.g. , white , red ) , material ( e.g. , wood , plastic ) , shape ( e.g. , round , square ) , and other object-specific properties ( e.g. , empty/full for plates ) . See Appendix A for examples and more information . Generalizability : Case Study on COCO The MetaShift construction methodology is quite simple , and can be extended to any dataset with metadata tags ( i.e. , multilabel ) . To demonstrate this , we apply the construction methodology on MS-COCO dataset ( Lin et al. , 2014 ) , which provides object detection labels for each image . Applying our construction methodology , we are able to construct 1321 subsets , with an average size of 389 and a median size of 124 , along with 80 meta-graphs that help to quantify the amount of distribution shift among MS-COCO subsets . Experiments on MetaShift from COCO can be found in Appendix D. Even though the data that we used here ( e.g . Visual Genome , COCO ) is not new , the idea of turning one dataset into a structured collection of datasets for assessing distribution shift is less explored . COCO ( Lin et al. , 2014 ) and many other datasets provide meta-data that could be naturally used for generating candidate subsets . The main contribution of our methodology is that after generating the candidate subsets , our method provides a meta-graph that could be used to determine the train and test domains , and also specifies the similarity between the two subsets via graph distance . MetaShift opens up a new window for systematically evaluating domain shifts . | In this paper, the authors introduce a new dataset (actully, a collection of datasets) called MetaShift. MetaShift is built on top of Visual Genome and leverages its metadata to cluster images, thus providing a context for each image (labels are of the form class+context, eg, ‘cat in grass’, ‘dog in bathroom’). This context is then used to generate dataset shifts. Besides been much larger than similar (openly available) datasets, MetaShift explicitly provides the context, which can be used to compute a “distance score” pf distribution shift between any two datasets. | SP:20ef2352687861920f629c47a62a519c9f5ebbd5 |
The Rich Get Richer: Disparate Impact of Semi-Supervised Learning | 1 INTRODUCTION . The success of deep neural networks benefits from large-size datasets with high-quality supervisions , while the collection of them may be difficult due to the high cost of data labeling process e.g. , medical diagnosis ( Agarwal et al. , 2016 ) . Practically , a much cheaper and easier solution is to obtain a small labeled dataset and a large unlabeled dataset , and apply semi-supervised learning ( SSL ) . Although the global model performance for the entire population of data is almost always improved by SSL , it is unclear how the improvements fare for different sub-populations . Similar to the goal of multiaccuracy ( Kim et al. , 2019 ) , the improvement of SSL should not only on the entire population , but also on different sub-populations . Analyzing and understanding the above question will have substantial fairness implications especially when these sub-populations are defined by the demographic groups e.g. , race and gender . Motivating Example Figure 1 shows the change of test accuracy for each class during SSL . Each class denotes one sub-population and representative sub-populations are highlighted . Figure 1 shows two important messages : in SSL , even with some state-of-the-art algorithms , 1 ) the “ rich getting richer ” is common and 2 ) the “ poor getting poorer ” possibly happens . Specifically , the “ rich ” subpopulation , such as automobile that has a high baseline accuracy at the beginning of SSL , tends to be consistently benefiting during SSL . But the “ poor ” sub-population , such as dog that has a low baseline accuracy , will remain a low-level performance as Figure 1 ( a ) or even get worse performance as Figure 1 ( b ) . This example shows disparate impact of accuracies for different sub-populations are common in SSL . In extreme cases such as Figure 1 ( b ) , we observe the Matthew effect : the rich get richer and the poor get poorer . See more discussions in Appendix B . In this paper , we aim to understand the disparate impact of SSL from both theoretical and empirical aspects , and propose to evaluate SSL from a different dimension . Specifically , based on classifications tasks , we study the disparate impact of model accuracies with respect to different sub-populations ( such as label classes , feature groups and demographic groups ) after applying SSL . Different from traditional group fairness ( Zafar et al. , 2017 ; Bellamy et al. , 2018 ) defined over one model , our study focuses on comparing the gap between two models ( before and after SSL ) . To this end , we first theoretically analyze why and how disparate impact are generated . The theoretical results motivate us to further propose a new metric , benefit ratio , which evaluates the normalized improvement of model accuracy using SSL methods for different sub-populations . The benefit ratio helps us uncover the “ Matthew effect ” of SSL : a high baseline accuracy tends to reach a high benefit ratio that may even be larger than 1 ( the rich get richer ) , and a sufficiently low baseline accuracy may return a negative benefit ratio ( the poor get poorer ) . Following the intuitions of Equal Odds ( Hardt et al. , 2016 ) , a fair SSL algorithm should be with Equal Benefit Ratio . We then numerically demonstrate using benefit ratios to evaluate SSL and discuss how two possible treatments , i.e. , balancing the data and collecting more labeled data , might mitigate the disparate impact . We hope our analyses and discussions could encourage future contributions to promote the fairness of SSL . Our main contributions and findings are summarized as follows : 1 ) We propose an analytical framework that unifies a broad family of SSL algorithms , which either explicitly or implicitly use an auxiliary “ pseudo-label ” . The framework provides a novel perspective for analyzing SSL by connecting consistency regularization to the problem of learning with noisy labels . 2 ) Based on our framework , we further prove an upper bound for the generalization error of SSL and theoretically show the heterogeneous error of learning with the smaller scale supervised dataset is one primary reason for disparate impacts . This observation reveals a “ Matthew effect ” of SSL . 3 ) We contribute a novel metric called benefit ratio to measure the disparate impact in SSL , the effectiveness of which is theoretically guaranteed by our proved generalization bounds . 4 ) We conduct experiments on both image and text classification tasks to demonstrate the ubiquitous disparate impacts in SSL . 5 ) We also discuss how the disparate impact could be mitigated . 1.1 RELATED WORKS . Semi-supervised learning SSL is popular in both computer vision and natural language processing communities ( Dai & Le , 2015 ; Howard & Ruder , 2018 ; Clark et al. , 2018 ; Yang et al. , 2019 ; Sachan et al. , 2019 ; Guo et al. , 2020 ; Wang et al. , 2021b ; Luo et al. , 2021 ) . We briefly review recent advances in SSL . See comprehensive overviews by ( Chapelle et al. , 2006 ; Zhu et al. , 2003 ) for traditional SSL methods . A major line of recent works focus on assigning pseudo-labels generated by the supervised model to unlabeled dataset ( Lee et al. , 2013 ; Iscen et al. , 2019 ; Berthelot et al. , 2019b ; a ) , where the pseudo-labels are often confident or with low-entropy ( Sohn et al. , 2020 ; Zhou , 2018 ; Meng et al. , 2018 ) . There are also many works on minimizing entropy of predictions on unsupervised data ( Grandvalet et al. , 2005 ) or regularizing the model consistency on the same feature with different data augmentations ( Tarvainen & Valpola , 2017 ; Miyato et al. , 2018 ; Sajjadi et al. , 2016 ; Clark et al. , 2018 ) , including mixup ( Zhang et al. , 2018 ) , adversarial noise ( Miyato et al. , 2016 ) , and other advanced augmentations ( Xie et al. , 2019 ) . In addition to network inputs , augmentations can also be applied on some hidden layers ( Chen et al. , 2020 ) . Besides , some works conduct pre-training on the unlabeled dataset first and then fine-tune the model on the labeled dataset ( Peters et al. , 2018 ; Devlin et al. , 2018 ; Gururangan et al. , 2019 ; Chen et al. , 2019 ; Yang et al. , 2017 ) , or use ladder networks to combine unsupervised learning with supervised learning ( Rasmus et al. , 2015 ) . Disparate impact Over the past few years , the fairness in machine learning has been extensively studied . Even models developed with the best intentions may introduce discriminatory biases . Re- searchers in various fields have found the unfairness issues , e.g. , model compression ( Bagdasaryan et al. , 2019 ) , differential privacy ( Hooker et al. , 2019 ; 2020 ) , recommendation system ( Gómez et al. , 2021 ) , information retrieval ( Gao & Shah , 2021 ) , machine translation ( Khan et al. , 2021 ) , and learning with noisy labels ( Liu , 2021 ) . There also some treatments considering fairness without demographics ( Lahoti et al. , 2020 ; Diana et al. , 2021 ; Hashimoto et al. , 2018 ) , minimax Pareto fairness ( Martinez et al. , 2020 ) , multiaccuracy boosting ( Kim et al. , 2019 ) , and fair classification with label noise ( Wang et al. , 2021a ) . Most of these works focus on supervised learning . To our best knowledge , the unfairness issue in SSL methods has not been sufficiently explored . 2 PRELIMINARIES . We summarize the key concepts and notations as follows . 2.1 SUPERVISED CLASSIFICATION TASKS . Consider aK-class classification task given a set ofNL labeled training examples denoted byDL : = { ( xn , yn ) } n∈ [ NL ] , where [ NL ] : = { 1 , 2 , · · · , NL } is the set of indices , xn is a high-dimension feature , yn ∈ [ K ] stands for a particular label class . The corresponding clean data distribution with full supervision is denoted by D. Examples ( xn , yn ) are drawn according to random variables ( X , Y ) ∼ D. The classification task aims to identify a classifier f that maps X to Y accurately . Let 1 { · } be the indicator function taking value 1 when the specified condition is satisfied and 0 otherwise . Define the 0-1 loss as 1 ( f ( X ) , Y ) : = 1 { f ( X ) 6= Y } . The optimal f is denoted by the Bayes classifier f∗ = arg minf ED [ 1 ( f ( X ) , Y ) ] . One common choice is training a deep neural network ( DNN ) by minimizing the empirical risk : f̂ = arg minf 1 N ∑N n=1 ` ( f ( xn ) , yn ) . Notation ` ( · ) stands for the cross-entropy ( CE ) loss ` ( f ( x ) , y ) : = − ln ( fx [ y ] ) , y ∈ [ K ] , where fx [ y ] denotes the y-th component of f ( x ) . Notations f and f stand for the same model but different outputs . Specifically , vector f ( x ) denotes the probability of each class that model f predicts given feature x . The predicted label f ( x ) is the class with maximal probability , i.e. , f ( x ) : = arg maxi∈ [ K ] fx [ i ] . We use notation f if we only refer to a model . 2.2 SEMI-SUPERVISED CLASSIFICATION TASKS . In the semi-supervised learning ( SSL ) task , there is also an unlabeled ( a.k.a . unsupervised ) dataset DU : = { ( xn+NL , · ) } n∈ [ NU ] drawn from D , while the labels are missing or unobservable . Let N : = NL + NU . Denote the corresponding unobservable supervised dataset by D : = { ( xn , yn ) } n∈ [ N ] . Compared with the supervised learning tasks , it is critical to leverage the unsupervised information in semi-supervised learning . To improve the model generalization ability , many recent SSL methods rely on building consistency regularization terms with unlabeled data to ensure that the model output remains unchanged with randomly augmented inputs ( Berthelot et al. , 2019b ; Xie et al. , 2019 ; Berthelot et al. , 2019a ; Sohn et al. , 2020 ; Xu et al. , 2021 ) . To better formulate the consistency regularization in these popular methods , we introduce soft/pseudo-labels y as follows . Soft-labels To motivate the definitions , we first consider a special case yn , i.e. , the one-hot encoding of yn , where each element writes as yn [ i ] = 1 { i = yn } . More generally , we can extend the one-hot encoding to soft labels by requiring each element y [ i ] ∈ [ 0 , 1 ] and ∑ i∈ [ K ] y [ i ] = 1 . The CE loss with soft y writes as ` ( f ( x ) , y ) : = − ∑ i∈ [ K ] y [ i ] ln ( fx [ i ] ) . If we interpret y [ i ] = P ( Y = i ) as a probability and denote by Dy the corresponding label distribution , the above CE loss with soft labels can be interpreted as the expected loss with respect to a stochastic label Ỹ , i.e. , ` ( f ( x ) , y ) : = ∑ i∈ [ K ] P ( Ỹ = i ) ` ( f ( x ) , i ) = EỸ∼Dy [ ` ( f ( x ) , Ỹ ) ] . ( 1 ) Pseudo-labels In consistency regularization , by using model predictions , the unlabeled data will be assigned pseudo-labels either explicitly ( Berthelot et al. , 2019b ) or implicitly ( Xie et al. , 2019 ) , where the pseudo-labels can be modeled as soft-labels . In the following , we review both the explicit and the implicit approaches and unify them in our analytical framework . Consistency regularization with explicit pseudo-labels For each unlabeled feature xn , pseudolabels can be explicitly generated based on model predictions ( Berthelot et al. , 2019b ) . The pseudolabel is later used to evaluate the model predictions . To avoid trivial solutions where model predictions and pseudo-labels are always identical , independent data augmentations of feature xn are often generated for M rounds . The augmented feature is denoted by x′n , m : = Augment ( xn ) , m ∈ [ M ] . Then the pseudo-label yn in epoch-t can be determined based on M model predictions as y ( t ) n = Sharpen ( 1 M ∑M m=1 f̄ ( t ) ( x′n , m ) ) , where model f̄ ( t ) is a copy of the DNN at the beginning of epoch-t but without gradients . The function Sharpen ( · ) reduces the entropy of a pseudo-label , e.g. , setting to one-hot encoding ej , j = arg maxi∈ [ K ] y ( t ) n ( Sohn et al. , 2020 ) . In epoch-t , with some consistency regularization loss ` CR ( · ) , the empirical risk using pseudo-labels is : L1 ( f , DL , DU ) = 1 NL NL∑ n=1 ` ( f ( xn ) , yn ) + 1 NU NL+NU∑ n=NL+1 ` CR ( f ( xn ) , y ( t ) n ) . Consistency regularization with implicit pseudo-labels Consistency regularization can also be applied without specifying particular pseudo-labels , where a divergence metric between predictions on the original feature and the augmented feature is minimized to make predictions consistent . For example , the KL-divergence could be applied and the data augmentation could be domain-specific ( Xie et al. , 2019 ) or adversarial ( Miyato et al. , 2018 ) . In epoch-t , the total loss is : L2 ( f , DL , DU ) = 1 NL NL∑ n=1 ` ( f ( xn ) , yn ) + λ · 1 NU NL+NU∑ n=NL+1 ` CR ( f ( xn ) , f̄ ( t ) ( x′n ) ) , where λ balances the supervised loss and the unsupervised loss , x′n : = Augment ( xn ) stands for oneround data augmentation ( m = 1 following the previous notation x′n , m ) . Without loss of generality , we use λ = 1 in our analytical framework . Consistency regularization loss ` CR ( · ) In the above two lines of works , there are different choices of ` CR ( · ) , such as mean-squared error ` CR ( f ( x ) , y ) : = ‖f ( x ) − y‖22/K ( Berthelot et al. , 2019b ; Laine & Aila , 2016 ) or CE loss ( Miyato et al. , 2018 ; Xie et al. , 2019 ) defined in Eq . ( 1 ) . For a clean analytical framework , we consider the case when both supervised loss and unsupervised loss are the same , i.e. , ` CR ( f ( x ) , y ) = ` ( f ( x ) , y ) . Note L2 implies the entropy minimization ( Grandvalet et al. , 2005 ) when both loss functions are CE and there is no augmentation , i.e. , x′n = xn . | The paper claims semi-supervised learning (SSL) does not uniformly improve performance on all the constituent (latent) sub-population of the group. More alarmingly, they claim that the SSL improves the performance most on the groups that already fare well (before SSL) with deteriorates on groups that are already worse. They argue intuitively and theoretically for the likely cause. With text, image datasets and three SSL algorithms, they provide empirical evidence that can support their main claim. Finally, they briefly discuss strategies that could avoid such disparate impact of SSL. | SP:6b1481a74583761ddf09ddf5adb18880685d5db0 |
The Rich Get Richer: Disparate Impact of Semi-Supervised Learning | 1 INTRODUCTION . The success of deep neural networks benefits from large-size datasets with high-quality supervisions , while the collection of them may be difficult due to the high cost of data labeling process e.g. , medical diagnosis ( Agarwal et al. , 2016 ) . Practically , a much cheaper and easier solution is to obtain a small labeled dataset and a large unlabeled dataset , and apply semi-supervised learning ( SSL ) . Although the global model performance for the entire population of data is almost always improved by SSL , it is unclear how the improvements fare for different sub-populations . Similar to the goal of multiaccuracy ( Kim et al. , 2019 ) , the improvement of SSL should not only on the entire population , but also on different sub-populations . Analyzing and understanding the above question will have substantial fairness implications especially when these sub-populations are defined by the demographic groups e.g. , race and gender . Motivating Example Figure 1 shows the change of test accuracy for each class during SSL . Each class denotes one sub-population and representative sub-populations are highlighted . Figure 1 shows two important messages : in SSL , even with some state-of-the-art algorithms , 1 ) the “ rich getting richer ” is common and 2 ) the “ poor getting poorer ” possibly happens . Specifically , the “ rich ” subpopulation , such as automobile that has a high baseline accuracy at the beginning of SSL , tends to be consistently benefiting during SSL . But the “ poor ” sub-population , such as dog that has a low baseline accuracy , will remain a low-level performance as Figure 1 ( a ) or even get worse performance as Figure 1 ( b ) . This example shows disparate impact of accuracies for different sub-populations are common in SSL . In extreme cases such as Figure 1 ( b ) , we observe the Matthew effect : the rich get richer and the poor get poorer . See more discussions in Appendix B . In this paper , we aim to understand the disparate impact of SSL from both theoretical and empirical aspects , and propose to evaluate SSL from a different dimension . Specifically , based on classifications tasks , we study the disparate impact of model accuracies with respect to different sub-populations ( such as label classes , feature groups and demographic groups ) after applying SSL . Different from traditional group fairness ( Zafar et al. , 2017 ; Bellamy et al. , 2018 ) defined over one model , our study focuses on comparing the gap between two models ( before and after SSL ) . To this end , we first theoretically analyze why and how disparate impact are generated . The theoretical results motivate us to further propose a new metric , benefit ratio , which evaluates the normalized improvement of model accuracy using SSL methods for different sub-populations . The benefit ratio helps us uncover the “ Matthew effect ” of SSL : a high baseline accuracy tends to reach a high benefit ratio that may even be larger than 1 ( the rich get richer ) , and a sufficiently low baseline accuracy may return a negative benefit ratio ( the poor get poorer ) . Following the intuitions of Equal Odds ( Hardt et al. , 2016 ) , a fair SSL algorithm should be with Equal Benefit Ratio . We then numerically demonstrate using benefit ratios to evaluate SSL and discuss how two possible treatments , i.e. , balancing the data and collecting more labeled data , might mitigate the disparate impact . We hope our analyses and discussions could encourage future contributions to promote the fairness of SSL . Our main contributions and findings are summarized as follows : 1 ) We propose an analytical framework that unifies a broad family of SSL algorithms , which either explicitly or implicitly use an auxiliary “ pseudo-label ” . The framework provides a novel perspective for analyzing SSL by connecting consistency regularization to the problem of learning with noisy labels . 2 ) Based on our framework , we further prove an upper bound for the generalization error of SSL and theoretically show the heterogeneous error of learning with the smaller scale supervised dataset is one primary reason for disparate impacts . This observation reveals a “ Matthew effect ” of SSL . 3 ) We contribute a novel metric called benefit ratio to measure the disparate impact in SSL , the effectiveness of which is theoretically guaranteed by our proved generalization bounds . 4 ) We conduct experiments on both image and text classification tasks to demonstrate the ubiquitous disparate impacts in SSL . 5 ) We also discuss how the disparate impact could be mitigated . 1.1 RELATED WORKS . Semi-supervised learning SSL is popular in both computer vision and natural language processing communities ( Dai & Le , 2015 ; Howard & Ruder , 2018 ; Clark et al. , 2018 ; Yang et al. , 2019 ; Sachan et al. , 2019 ; Guo et al. , 2020 ; Wang et al. , 2021b ; Luo et al. , 2021 ) . We briefly review recent advances in SSL . See comprehensive overviews by ( Chapelle et al. , 2006 ; Zhu et al. , 2003 ) for traditional SSL methods . A major line of recent works focus on assigning pseudo-labels generated by the supervised model to unlabeled dataset ( Lee et al. , 2013 ; Iscen et al. , 2019 ; Berthelot et al. , 2019b ; a ) , where the pseudo-labels are often confident or with low-entropy ( Sohn et al. , 2020 ; Zhou , 2018 ; Meng et al. , 2018 ) . There are also many works on minimizing entropy of predictions on unsupervised data ( Grandvalet et al. , 2005 ) or regularizing the model consistency on the same feature with different data augmentations ( Tarvainen & Valpola , 2017 ; Miyato et al. , 2018 ; Sajjadi et al. , 2016 ; Clark et al. , 2018 ) , including mixup ( Zhang et al. , 2018 ) , adversarial noise ( Miyato et al. , 2016 ) , and other advanced augmentations ( Xie et al. , 2019 ) . In addition to network inputs , augmentations can also be applied on some hidden layers ( Chen et al. , 2020 ) . Besides , some works conduct pre-training on the unlabeled dataset first and then fine-tune the model on the labeled dataset ( Peters et al. , 2018 ; Devlin et al. , 2018 ; Gururangan et al. , 2019 ; Chen et al. , 2019 ; Yang et al. , 2017 ) , or use ladder networks to combine unsupervised learning with supervised learning ( Rasmus et al. , 2015 ) . Disparate impact Over the past few years , the fairness in machine learning has been extensively studied . Even models developed with the best intentions may introduce discriminatory biases . Re- searchers in various fields have found the unfairness issues , e.g. , model compression ( Bagdasaryan et al. , 2019 ) , differential privacy ( Hooker et al. , 2019 ; 2020 ) , recommendation system ( Gómez et al. , 2021 ) , information retrieval ( Gao & Shah , 2021 ) , machine translation ( Khan et al. , 2021 ) , and learning with noisy labels ( Liu , 2021 ) . There also some treatments considering fairness without demographics ( Lahoti et al. , 2020 ; Diana et al. , 2021 ; Hashimoto et al. , 2018 ) , minimax Pareto fairness ( Martinez et al. , 2020 ) , multiaccuracy boosting ( Kim et al. , 2019 ) , and fair classification with label noise ( Wang et al. , 2021a ) . Most of these works focus on supervised learning . To our best knowledge , the unfairness issue in SSL methods has not been sufficiently explored . 2 PRELIMINARIES . We summarize the key concepts and notations as follows . 2.1 SUPERVISED CLASSIFICATION TASKS . Consider aK-class classification task given a set ofNL labeled training examples denoted byDL : = { ( xn , yn ) } n∈ [ NL ] , where [ NL ] : = { 1 , 2 , · · · , NL } is the set of indices , xn is a high-dimension feature , yn ∈ [ K ] stands for a particular label class . The corresponding clean data distribution with full supervision is denoted by D. Examples ( xn , yn ) are drawn according to random variables ( X , Y ) ∼ D. The classification task aims to identify a classifier f that maps X to Y accurately . Let 1 { · } be the indicator function taking value 1 when the specified condition is satisfied and 0 otherwise . Define the 0-1 loss as 1 ( f ( X ) , Y ) : = 1 { f ( X ) 6= Y } . The optimal f is denoted by the Bayes classifier f∗ = arg minf ED [ 1 ( f ( X ) , Y ) ] . One common choice is training a deep neural network ( DNN ) by minimizing the empirical risk : f̂ = arg minf 1 N ∑N n=1 ` ( f ( xn ) , yn ) . Notation ` ( · ) stands for the cross-entropy ( CE ) loss ` ( f ( x ) , y ) : = − ln ( fx [ y ] ) , y ∈ [ K ] , where fx [ y ] denotes the y-th component of f ( x ) . Notations f and f stand for the same model but different outputs . Specifically , vector f ( x ) denotes the probability of each class that model f predicts given feature x . The predicted label f ( x ) is the class with maximal probability , i.e. , f ( x ) : = arg maxi∈ [ K ] fx [ i ] . We use notation f if we only refer to a model . 2.2 SEMI-SUPERVISED CLASSIFICATION TASKS . In the semi-supervised learning ( SSL ) task , there is also an unlabeled ( a.k.a . unsupervised ) dataset DU : = { ( xn+NL , · ) } n∈ [ NU ] drawn from D , while the labels are missing or unobservable . Let N : = NL + NU . Denote the corresponding unobservable supervised dataset by D : = { ( xn , yn ) } n∈ [ N ] . Compared with the supervised learning tasks , it is critical to leverage the unsupervised information in semi-supervised learning . To improve the model generalization ability , many recent SSL methods rely on building consistency regularization terms with unlabeled data to ensure that the model output remains unchanged with randomly augmented inputs ( Berthelot et al. , 2019b ; Xie et al. , 2019 ; Berthelot et al. , 2019a ; Sohn et al. , 2020 ; Xu et al. , 2021 ) . To better formulate the consistency regularization in these popular methods , we introduce soft/pseudo-labels y as follows . Soft-labels To motivate the definitions , we first consider a special case yn , i.e. , the one-hot encoding of yn , where each element writes as yn [ i ] = 1 { i = yn } . More generally , we can extend the one-hot encoding to soft labels by requiring each element y [ i ] ∈ [ 0 , 1 ] and ∑ i∈ [ K ] y [ i ] = 1 . The CE loss with soft y writes as ` ( f ( x ) , y ) : = − ∑ i∈ [ K ] y [ i ] ln ( fx [ i ] ) . If we interpret y [ i ] = P ( Y = i ) as a probability and denote by Dy the corresponding label distribution , the above CE loss with soft labels can be interpreted as the expected loss with respect to a stochastic label Ỹ , i.e. , ` ( f ( x ) , y ) : = ∑ i∈ [ K ] P ( Ỹ = i ) ` ( f ( x ) , i ) = EỸ∼Dy [ ` ( f ( x ) , Ỹ ) ] . ( 1 ) Pseudo-labels In consistency regularization , by using model predictions , the unlabeled data will be assigned pseudo-labels either explicitly ( Berthelot et al. , 2019b ) or implicitly ( Xie et al. , 2019 ) , where the pseudo-labels can be modeled as soft-labels . In the following , we review both the explicit and the implicit approaches and unify them in our analytical framework . Consistency regularization with explicit pseudo-labels For each unlabeled feature xn , pseudolabels can be explicitly generated based on model predictions ( Berthelot et al. , 2019b ) . The pseudolabel is later used to evaluate the model predictions . To avoid trivial solutions where model predictions and pseudo-labels are always identical , independent data augmentations of feature xn are often generated for M rounds . The augmented feature is denoted by x′n , m : = Augment ( xn ) , m ∈ [ M ] . Then the pseudo-label yn in epoch-t can be determined based on M model predictions as y ( t ) n = Sharpen ( 1 M ∑M m=1 f̄ ( t ) ( x′n , m ) ) , where model f̄ ( t ) is a copy of the DNN at the beginning of epoch-t but without gradients . The function Sharpen ( · ) reduces the entropy of a pseudo-label , e.g. , setting to one-hot encoding ej , j = arg maxi∈ [ K ] y ( t ) n ( Sohn et al. , 2020 ) . In epoch-t , with some consistency regularization loss ` CR ( · ) , the empirical risk using pseudo-labels is : L1 ( f , DL , DU ) = 1 NL NL∑ n=1 ` ( f ( xn ) , yn ) + 1 NU NL+NU∑ n=NL+1 ` CR ( f ( xn ) , y ( t ) n ) . Consistency regularization with implicit pseudo-labels Consistency regularization can also be applied without specifying particular pseudo-labels , where a divergence metric between predictions on the original feature and the augmented feature is minimized to make predictions consistent . For example , the KL-divergence could be applied and the data augmentation could be domain-specific ( Xie et al. , 2019 ) or adversarial ( Miyato et al. , 2018 ) . In epoch-t , the total loss is : L2 ( f , DL , DU ) = 1 NL NL∑ n=1 ` ( f ( xn ) , yn ) + λ · 1 NU NL+NU∑ n=NL+1 ` CR ( f ( xn ) , f̄ ( t ) ( x′n ) ) , where λ balances the supervised loss and the unsupervised loss , x′n : = Augment ( xn ) stands for oneround data augmentation ( m = 1 following the previous notation x′n , m ) . Without loss of generality , we use λ = 1 in our analytical framework . Consistency regularization loss ` CR ( · ) In the above two lines of works , there are different choices of ` CR ( · ) , such as mean-squared error ` CR ( f ( x ) , y ) : = ‖f ( x ) − y‖22/K ( Berthelot et al. , 2019b ; Laine & Aila , 2016 ) or CE loss ( Miyato et al. , 2018 ; Xie et al. , 2019 ) defined in Eq . ( 1 ) . For a clean analytical framework , we consider the case when both supervised loss and unsupervised loss are the same , i.e. , ` CR ( f ( x ) , y ) = ` ( f ( x ) , y ) . Note L2 implies the entropy minimization ( Grandvalet et al. , 2005 ) when both loss functions are CE and there is no augmentation , i.e. , x′n = xn . | This paper presents the disparate impact on semi-supervised learning, where the sub-population that has a higher baseline accuracy tends to benefit more from SSL. The paper targets an important problem to ensure the fairness of machine learning algorithms. The authors also proposed a new metric benefit ratio to facilitate the evaluation of SSL. They also suggested two methods to mitigate the disparate, balancing the labeled data or collecting more labeled data. | SP:6b1481a74583761ddf09ddf5adb18880685d5db0 |
The Rich Get Richer: Disparate Impact of Semi-Supervised Learning | 1 INTRODUCTION . The success of deep neural networks benefits from large-size datasets with high-quality supervisions , while the collection of them may be difficult due to the high cost of data labeling process e.g. , medical diagnosis ( Agarwal et al. , 2016 ) . Practically , a much cheaper and easier solution is to obtain a small labeled dataset and a large unlabeled dataset , and apply semi-supervised learning ( SSL ) . Although the global model performance for the entire population of data is almost always improved by SSL , it is unclear how the improvements fare for different sub-populations . Similar to the goal of multiaccuracy ( Kim et al. , 2019 ) , the improvement of SSL should not only on the entire population , but also on different sub-populations . Analyzing and understanding the above question will have substantial fairness implications especially when these sub-populations are defined by the demographic groups e.g. , race and gender . Motivating Example Figure 1 shows the change of test accuracy for each class during SSL . Each class denotes one sub-population and representative sub-populations are highlighted . Figure 1 shows two important messages : in SSL , even with some state-of-the-art algorithms , 1 ) the “ rich getting richer ” is common and 2 ) the “ poor getting poorer ” possibly happens . Specifically , the “ rich ” subpopulation , such as automobile that has a high baseline accuracy at the beginning of SSL , tends to be consistently benefiting during SSL . But the “ poor ” sub-population , such as dog that has a low baseline accuracy , will remain a low-level performance as Figure 1 ( a ) or even get worse performance as Figure 1 ( b ) . This example shows disparate impact of accuracies for different sub-populations are common in SSL . In extreme cases such as Figure 1 ( b ) , we observe the Matthew effect : the rich get richer and the poor get poorer . See more discussions in Appendix B . In this paper , we aim to understand the disparate impact of SSL from both theoretical and empirical aspects , and propose to evaluate SSL from a different dimension . Specifically , based on classifications tasks , we study the disparate impact of model accuracies with respect to different sub-populations ( such as label classes , feature groups and demographic groups ) after applying SSL . Different from traditional group fairness ( Zafar et al. , 2017 ; Bellamy et al. , 2018 ) defined over one model , our study focuses on comparing the gap between two models ( before and after SSL ) . To this end , we first theoretically analyze why and how disparate impact are generated . The theoretical results motivate us to further propose a new metric , benefit ratio , which evaluates the normalized improvement of model accuracy using SSL methods for different sub-populations . The benefit ratio helps us uncover the “ Matthew effect ” of SSL : a high baseline accuracy tends to reach a high benefit ratio that may even be larger than 1 ( the rich get richer ) , and a sufficiently low baseline accuracy may return a negative benefit ratio ( the poor get poorer ) . Following the intuitions of Equal Odds ( Hardt et al. , 2016 ) , a fair SSL algorithm should be with Equal Benefit Ratio . We then numerically demonstrate using benefit ratios to evaluate SSL and discuss how two possible treatments , i.e. , balancing the data and collecting more labeled data , might mitigate the disparate impact . We hope our analyses and discussions could encourage future contributions to promote the fairness of SSL . Our main contributions and findings are summarized as follows : 1 ) We propose an analytical framework that unifies a broad family of SSL algorithms , which either explicitly or implicitly use an auxiliary “ pseudo-label ” . The framework provides a novel perspective for analyzing SSL by connecting consistency regularization to the problem of learning with noisy labels . 2 ) Based on our framework , we further prove an upper bound for the generalization error of SSL and theoretically show the heterogeneous error of learning with the smaller scale supervised dataset is one primary reason for disparate impacts . This observation reveals a “ Matthew effect ” of SSL . 3 ) We contribute a novel metric called benefit ratio to measure the disparate impact in SSL , the effectiveness of which is theoretically guaranteed by our proved generalization bounds . 4 ) We conduct experiments on both image and text classification tasks to demonstrate the ubiquitous disparate impacts in SSL . 5 ) We also discuss how the disparate impact could be mitigated . 1.1 RELATED WORKS . Semi-supervised learning SSL is popular in both computer vision and natural language processing communities ( Dai & Le , 2015 ; Howard & Ruder , 2018 ; Clark et al. , 2018 ; Yang et al. , 2019 ; Sachan et al. , 2019 ; Guo et al. , 2020 ; Wang et al. , 2021b ; Luo et al. , 2021 ) . We briefly review recent advances in SSL . See comprehensive overviews by ( Chapelle et al. , 2006 ; Zhu et al. , 2003 ) for traditional SSL methods . A major line of recent works focus on assigning pseudo-labels generated by the supervised model to unlabeled dataset ( Lee et al. , 2013 ; Iscen et al. , 2019 ; Berthelot et al. , 2019b ; a ) , where the pseudo-labels are often confident or with low-entropy ( Sohn et al. , 2020 ; Zhou , 2018 ; Meng et al. , 2018 ) . There are also many works on minimizing entropy of predictions on unsupervised data ( Grandvalet et al. , 2005 ) or regularizing the model consistency on the same feature with different data augmentations ( Tarvainen & Valpola , 2017 ; Miyato et al. , 2018 ; Sajjadi et al. , 2016 ; Clark et al. , 2018 ) , including mixup ( Zhang et al. , 2018 ) , adversarial noise ( Miyato et al. , 2016 ) , and other advanced augmentations ( Xie et al. , 2019 ) . In addition to network inputs , augmentations can also be applied on some hidden layers ( Chen et al. , 2020 ) . Besides , some works conduct pre-training on the unlabeled dataset first and then fine-tune the model on the labeled dataset ( Peters et al. , 2018 ; Devlin et al. , 2018 ; Gururangan et al. , 2019 ; Chen et al. , 2019 ; Yang et al. , 2017 ) , or use ladder networks to combine unsupervised learning with supervised learning ( Rasmus et al. , 2015 ) . Disparate impact Over the past few years , the fairness in machine learning has been extensively studied . Even models developed with the best intentions may introduce discriminatory biases . Re- searchers in various fields have found the unfairness issues , e.g. , model compression ( Bagdasaryan et al. , 2019 ) , differential privacy ( Hooker et al. , 2019 ; 2020 ) , recommendation system ( Gómez et al. , 2021 ) , information retrieval ( Gao & Shah , 2021 ) , machine translation ( Khan et al. , 2021 ) , and learning with noisy labels ( Liu , 2021 ) . There also some treatments considering fairness without demographics ( Lahoti et al. , 2020 ; Diana et al. , 2021 ; Hashimoto et al. , 2018 ) , minimax Pareto fairness ( Martinez et al. , 2020 ) , multiaccuracy boosting ( Kim et al. , 2019 ) , and fair classification with label noise ( Wang et al. , 2021a ) . Most of these works focus on supervised learning . To our best knowledge , the unfairness issue in SSL methods has not been sufficiently explored . 2 PRELIMINARIES . We summarize the key concepts and notations as follows . 2.1 SUPERVISED CLASSIFICATION TASKS . Consider aK-class classification task given a set ofNL labeled training examples denoted byDL : = { ( xn , yn ) } n∈ [ NL ] , where [ NL ] : = { 1 , 2 , · · · , NL } is the set of indices , xn is a high-dimension feature , yn ∈ [ K ] stands for a particular label class . The corresponding clean data distribution with full supervision is denoted by D. Examples ( xn , yn ) are drawn according to random variables ( X , Y ) ∼ D. The classification task aims to identify a classifier f that maps X to Y accurately . Let 1 { · } be the indicator function taking value 1 when the specified condition is satisfied and 0 otherwise . Define the 0-1 loss as 1 ( f ( X ) , Y ) : = 1 { f ( X ) 6= Y } . The optimal f is denoted by the Bayes classifier f∗ = arg minf ED [ 1 ( f ( X ) , Y ) ] . One common choice is training a deep neural network ( DNN ) by minimizing the empirical risk : f̂ = arg minf 1 N ∑N n=1 ` ( f ( xn ) , yn ) . Notation ` ( · ) stands for the cross-entropy ( CE ) loss ` ( f ( x ) , y ) : = − ln ( fx [ y ] ) , y ∈ [ K ] , where fx [ y ] denotes the y-th component of f ( x ) . Notations f and f stand for the same model but different outputs . Specifically , vector f ( x ) denotes the probability of each class that model f predicts given feature x . The predicted label f ( x ) is the class with maximal probability , i.e. , f ( x ) : = arg maxi∈ [ K ] fx [ i ] . We use notation f if we only refer to a model . 2.2 SEMI-SUPERVISED CLASSIFICATION TASKS . In the semi-supervised learning ( SSL ) task , there is also an unlabeled ( a.k.a . unsupervised ) dataset DU : = { ( xn+NL , · ) } n∈ [ NU ] drawn from D , while the labels are missing or unobservable . Let N : = NL + NU . Denote the corresponding unobservable supervised dataset by D : = { ( xn , yn ) } n∈ [ N ] . Compared with the supervised learning tasks , it is critical to leverage the unsupervised information in semi-supervised learning . To improve the model generalization ability , many recent SSL methods rely on building consistency regularization terms with unlabeled data to ensure that the model output remains unchanged with randomly augmented inputs ( Berthelot et al. , 2019b ; Xie et al. , 2019 ; Berthelot et al. , 2019a ; Sohn et al. , 2020 ; Xu et al. , 2021 ) . To better formulate the consistency regularization in these popular methods , we introduce soft/pseudo-labels y as follows . Soft-labels To motivate the definitions , we first consider a special case yn , i.e. , the one-hot encoding of yn , where each element writes as yn [ i ] = 1 { i = yn } . More generally , we can extend the one-hot encoding to soft labels by requiring each element y [ i ] ∈ [ 0 , 1 ] and ∑ i∈ [ K ] y [ i ] = 1 . The CE loss with soft y writes as ` ( f ( x ) , y ) : = − ∑ i∈ [ K ] y [ i ] ln ( fx [ i ] ) . If we interpret y [ i ] = P ( Y = i ) as a probability and denote by Dy the corresponding label distribution , the above CE loss with soft labels can be interpreted as the expected loss with respect to a stochastic label Ỹ , i.e. , ` ( f ( x ) , y ) : = ∑ i∈ [ K ] P ( Ỹ = i ) ` ( f ( x ) , i ) = EỸ∼Dy [ ` ( f ( x ) , Ỹ ) ] . ( 1 ) Pseudo-labels In consistency regularization , by using model predictions , the unlabeled data will be assigned pseudo-labels either explicitly ( Berthelot et al. , 2019b ) or implicitly ( Xie et al. , 2019 ) , where the pseudo-labels can be modeled as soft-labels . In the following , we review both the explicit and the implicit approaches and unify them in our analytical framework . Consistency regularization with explicit pseudo-labels For each unlabeled feature xn , pseudolabels can be explicitly generated based on model predictions ( Berthelot et al. , 2019b ) . The pseudolabel is later used to evaluate the model predictions . To avoid trivial solutions where model predictions and pseudo-labels are always identical , independent data augmentations of feature xn are often generated for M rounds . The augmented feature is denoted by x′n , m : = Augment ( xn ) , m ∈ [ M ] . Then the pseudo-label yn in epoch-t can be determined based on M model predictions as y ( t ) n = Sharpen ( 1 M ∑M m=1 f̄ ( t ) ( x′n , m ) ) , where model f̄ ( t ) is a copy of the DNN at the beginning of epoch-t but without gradients . The function Sharpen ( · ) reduces the entropy of a pseudo-label , e.g. , setting to one-hot encoding ej , j = arg maxi∈ [ K ] y ( t ) n ( Sohn et al. , 2020 ) . In epoch-t , with some consistency regularization loss ` CR ( · ) , the empirical risk using pseudo-labels is : L1 ( f , DL , DU ) = 1 NL NL∑ n=1 ` ( f ( xn ) , yn ) + 1 NU NL+NU∑ n=NL+1 ` CR ( f ( xn ) , y ( t ) n ) . Consistency regularization with implicit pseudo-labels Consistency regularization can also be applied without specifying particular pseudo-labels , where a divergence metric between predictions on the original feature and the augmented feature is minimized to make predictions consistent . For example , the KL-divergence could be applied and the data augmentation could be domain-specific ( Xie et al. , 2019 ) or adversarial ( Miyato et al. , 2018 ) . In epoch-t , the total loss is : L2 ( f , DL , DU ) = 1 NL NL∑ n=1 ` ( f ( xn ) , yn ) + λ · 1 NU NL+NU∑ n=NL+1 ` CR ( f ( xn ) , f̄ ( t ) ( x′n ) ) , where λ balances the supervised loss and the unsupervised loss , x′n : = Augment ( xn ) stands for oneround data augmentation ( m = 1 following the previous notation x′n , m ) . Without loss of generality , we use λ = 1 in our analytical framework . Consistency regularization loss ` CR ( · ) In the above two lines of works , there are different choices of ` CR ( · ) , such as mean-squared error ` CR ( f ( x ) , y ) : = ‖f ( x ) − y‖22/K ( Berthelot et al. , 2019b ; Laine & Aila , 2016 ) or CE loss ( Miyato et al. , 2018 ; Xie et al. , 2019 ) defined in Eq . ( 1 ) . For a clean analytical framework , we consider the case when both supervised loss and unsupervised loss are the same , i.e. , ` CR ( f ( x ) , y ) = ` ( f ( x ) , y ) . Note L2 implies the entropy minimization ( Grandvalet et al. , 2005 ) when both loss functions are CE and there is no augmentation , i.e. , x′n = xn . | This paper analyzes the discriminative performances of semi-supervised learning (SSL) on different subgroups, based on the key message that the already accurate group gets more benefits from the SSL. The paper first proposes a unified loss for analyzing the SSL frameworks. Then, the theoretical analyses show how the SSL produces discriminative performances on the different groups. In addition, a metric called benefit ratio is suggested to measure how much the learning benefits a certain subgroup. Experiments show overall consistent results with the main message from the theory. | SP:6b1481a74583761ddf09ddf5adb18880685d5db0 |
Minimax Optimization with Smooth Algorithmic Adversaries | 1 INTRODUCTION . This paper considers minimax optimization minx maxy f ( x , y ) in the context of two-player zero-sum games , where the min-player ( controlling x ) tries to minimize objective f assuming a worst-case opponent ( controlling y ) that acts so as to maximize it . Minimax optimization naturally arises in a variety of important machine learning paradigms , with the most prominent examples being the training of generative adversarial networks ( GANs ) ( Goodfellow et al. , 2014 ) and adversarially robust models ( Madry et al. , 2018 ) . These applications commonly engage deep neural networks with various techniques such as convolution , recurrent layers , and batch normalization . As a result , the objective function f is highly nonconvex in x and nonconcave in y. Theoretically , minimax optimization has been extensively studied starting from the seminal work of von Neumann ( Neumann , 1928 ) , with many efficient algorithms proposed for solving it ( Robinson , 1951 ; Korpelevich , 1976 ; Nemirovski , 2004 ) . A majority of these classical results have been focused on convex-concave functions , and heavily rely on the minimax theorem , i.e. , minx maxy f ( x , y ) = maxy minx f ( x , y ) , which no longer holds beyond the convex-concave setting . Recent line of works ( Lin et al. , 2020a ; Nouiehed et al. , 2019 ; Thekumparampil et al. , 2019 ; Lin et al. , 2020b ; Ostrovskii et al. , 2020 ) address the nonconvex-concave setting where f is nonconvex in x but concave in y by proposing meaningful optimality notions and designing algorithms to find such points . A key property heavily exploited in this setting is that the inner maximization over y given a fixed x can be computed efficiently , which unfortunately does not extend to the nonconvex-nonconcave setting . Consequently , nonconvex-nonconcave optimization remains challenging , and two of the most fundamental theoretical issues are still unresolved : ( i ) what is an appropriate notion of optimality that can be computed efficiently ? and ( ii ) can we design algorithms that do not suffer from cycling or diverging behavior ? Practitioners often use simple and popular algorithms such as gradient descent ascent ( GDA ) and other variants for solving these challenging optimization problems . While these algorithms seem to perform well in terms of producing high quality images in GANs and robust models in adversarial training , they are also highly unstable , particularly in training GANs . Indeed the instability of GDA and other empirically popular methods is not surprising since they are known to not converge even in very simple settings ( Daskalakis & Panageas , 2018a ; Bailey et al. , 2020 ) . This current state of affairs strongly motivates the need to develop a strong theoretical foundation for nonconvex-nonconcave minimax optimization and to design better algorithms for solving them . This work considers the challenging nonconvex-nonconcave setting . Our framework sprouts from the practical consideration that under a computational budget , the max-player can not fully maximize f ( x , · ) since nonconcave maximization is NP-hard in general . In fact , in both the settings of GAN and adversarial training , in practice , the max-player employs simple gradient based algorithms such as gradient ascent , run for a few steps – on the order of 5 for GAN training and 40 for adversarial training ( see , e.g. , Arjovsky et al . 2017 ; Madry et al . 2018 ) – to estimate argmaxy f ( x , y ) . To capture this aspect , we assume that the max-player has a toolkit of multiple ( potentially randomized ) algorithmsA1 , A2 , · · · , Ak in an attempt to solve the maximization problem given fixed x , and picks the best solution among these algorithms . This motivates us to study the surrogate of the minimax optimization problem as minx maxi∈ [ k ] f ( x , Ai ( x ) ) = minx maxλ∈∆k ∑k i=1 λif ( x , Ai ( x ) ) , ( 1 ) where ∆k denotes the k-dimensional simplex , and Ai ( x ) denotes the output of algorithm Ai for a given x . When both the objective function f and the algorithms { Ai } ki=1 are smooth ( defined formally in Section 3 ) , we can show that ( 1 ) becomes a smooth nonconvex-concave minimax optimization problem , where recent advances can be leveraged in solving such problems . In particular , given the smooth algorithms deployed by the adversary ( i.e . the max-player ) , this paper proposes two algorithms for solving problems in ( 1 ) . The first algorithm is based on stochastic gradient descent ( SGD ) , which is guaranteed to find an appropriate notion of “ -approximate stationary point ” in O ( −4 ) gradient computations . The second algorithm is based on proximal algorithm , in the case of deterministic adversarial algorithms { Ai } ki=1 , this algorithm has an improved gradient complexity O ( −3 ) or Õ ( poly ( k ) / 2 ) depending on the choice of subroutine within the algorithm . All our algorithms are guaranteed to make monotonic progress , thus having no limit cycles . Our second set of results show that , many popular algorithms deployed by the adversary such as multi-step stochastic gradient ascent , and multi-step stochastic Nesterov ’ s accelerated gradient ascent are in fact smooth . Therefore , our framework readily applies to those settings in practice . We also present complementing experimental results showing that our theoretical framework and algorithm succeed on simple , conceptual examples of GAN and adversarial training . While more work is needed to scale our approach to large scale benchmarks in GAN and adversarial training , our experimental results serve as a proof of concept demonstration that our algorithm converges to desirable points in practice , at least on simple conceptual examples . 2 RELATED WORK . Due to lack of space , we focus our discussion here on directly related works and present a more detailed overview of related work in Appendix A . Many existing works that propose local optimality notions in nonconvex-nonconcave minimax optimization suffer from nonexistence of such points in general ( Ratliff et al. , 2013 ; Ratliff et al. , 2016 ; Jin et al. , 2020 ; Fiez et al. , 2020 ; Zhang et al. , 2020a ; Farnia & Ozdaglar , 2020 ) . To the best of our knowledge , the only works that propose a relaxed local optimality notion that is shown to exist and be computable in polynomial time is due to Keswani et al . ( 2020 ) ; Mangoubi & Vishnoi ( 2021 ) . The aforementioned works are similar to this paper in the sense that the min-player faces the max-player with computational restrictions , but are different from ours in terms of the model of the max-player and the algorithms to solve the problem . Concretely , Keswani et al . ( 2020 ) ; Mangoubi & Vishnoi ( 2021 ) consider the stationary points of a “ smoothed '' greedy-max function , which is computed by maximizing along a locally ascending path when fixing the min-player . In contrast , our paper considers the stationary points of a “ max '' function computed by particular smooth algorithms given their initializations , which is a more faithful surrogate to the objective that the min-player wishes to minimize . Depending on the choice of smooth algorithms and their initializations , the optimal points of Keswani et al . ( 2020 ) ; Mangoubi & Vishnoi ( 2021 ) and the optimal points in our paper can be very different , making them incomparable . 3 PRELIMINARIES . In this section , we present problem formulation and preliminaries . We consider function f satisfying Assumption 1 . We denote w = ( x , y ) , and assume f : Rd1 × Rd2 → R is : ( a ) B-bounded i.e. , |f ( w ) | ≤ B , ( b ) G-Lipschitz i.e. , |f ( w1 ) − f ( w2 ) | ≤ G‖w1 − w2‖ , ( c ) L-gradient Lipschitz i.e. , ‖∇f ( w1 ) −∇f ( w2 ) ‖ ≤ L‖w1 − w2‖ , ( d ) ρ-Hessian Lipschitz i.e. , ‖∇2f ( w1 ) −∇2f ( w2 ) ‖ ≤ ρ‖w1 − w2‖ . where ‖·‖ denotes Euclidean norm for vectors and operator norm for matrices . We aim to solve minx∈Rd1 maxy∈Rd2 f ( x , y ) . Since maxy∈Rd2 f ( x , y ) involves non-concave maximization and hence is NP-hard in the worst case , we intend to play against algorithm ( s ) that y-player uses to compute her strategy . Concretely , given x ∈ Rd1 , we assume that the y-player chooses her ( potentially random ) strategy ŷz ( x ) = Ai∗ ( x ) ( x , zi∗ ( x ) ) , where we use shorthand z : = ( z1 , · · · , zk ) , as i∗ ( x ) = argmaxi∈ [ k ] f ( x , Ai ( x , zi ) ) , where A1 , · · · , Ak are k deterministic algorithms that take as input x and a random seed zi ∈ R ` , where zi are all independent . Note that the framework captures randomized algorithms e.g. , A could be stochastic gradient ascent on f ( x , · ) , with initialization , minibatching etc . determined by the random seed z . This also incorporates running the same algorithm multiple times , with different seeds and then choosing the best strategy . We now reformulate the minimax objective function to : minx∈Rd1 g ( x ) where g ( x ) : = Ez [ f ( x , ŷz ( x ) ) ] . ( 2 ) For general algorithms Ai , the functions f ( x , Ai ( x , zi ) ) need not be continuous even when f satisfies Assumption 1 . However , if the algorithms Ai are smooth as defined below , the functions f ( x , Ai ( x , zi ) ) behave much more nicely . Definition 1 ( Algorithm Smoothness ) . A randomized algorithm A : Rd1 × R ` → Rd2 is : ( a ) G-Lipschitz , if ‖A ( x1 , z ) −A ( x2 , z ) ‖ ≤ G‖x1 − x2‖ for any z . ( b ) L-gradient Lipschitz , if ‖DA ( x1 , z ) −DA ( x2 , z ) ‖ ≤ L‖x1 − x2‖ for any z . Here DA ( x , z ) ∈ Rd1 × Rd2 is the Jacobian of the function A ( · , z ) for a fixed z . The following lemma tells us that f ( x , A ( x , z ) ) behaves nicely whenever A is a Lipschitz and gradient Lipschitz algorithm . For deterministic algorithms , we also use the shortened notation A ( x ) and DA ( x ) . Lemma 1 . Suppose A is G′-Lipschitz and L′-gradient Lipschitz and f satisfies Assumption 1 . Then , for a fixed z , function f ( · , A ( · , z ) ) is G ( 1 +G′ ) -Lipschitz and L ( 1 +G′ ) 2 +GL′-gradient Lipschitz . While g ( x ) defined in ( 2 ) is not necessarily gradient Lipschitz , it can be shown to be weakly-convex as defined below . Note that an L-gradient Lipschitz function is L-weakly convex . Definition 2 . A function g : Rd1 → R is L-weakly convex if ∀ x , there exists a vector ux satisfying : g ( x′ ) ≥ g ( x ) + 〈ux , x′ − x〉 − L2 ‖x ′ − x‖2 ∀ x′ . ( 3 ) Any vector ux satisfying this property is called the subgradient of g at x and is denoted by ∇g ( x ) . An important property of weakly convex function is that the maximum over a finite number of weakly convex function is still a weakly convex function . Lemma 2 . Given L-weakly convex functions g1 , · · · , gk : Rd → R , the maximum function g ( · ) : = maxi∈ [ k ] gi ( · ) is also L-weakly convex and the set of subgradients of g ( · ) at x is given by : ∂g ( x ) = { ∑ j∈S ( x ) λj∇gj ( x ) : λj ≥ 0 , ∑ j∈S ( x ) λj = 1 } , where S ( x ) : = argmaxi∈ [ k ] gi ( x ) . Thus , under Assumption 1 and the assumptions Ai are all G′-Lipschitz and L′-gradient Lipschitz , then g ( · ) defined in ( 2 ) is L ( 1 + G′ ) 2 + GL′-weakly convex . The usual optimality notion for weakly-convex functions is approximate first order stationary points ( Davis & Drusvyatskiy , 2018 ) . Approximate first-order stationary point for weakly convex functions : In order to define approximate stationary points , we also need the notion of Moreau envelope . Definition 3 . The Moreau envelope of a function g : Rd1 → R and parameter λ is : gλ ( x ) = minx′∈Rd1 g ( x ′ ) + ( 2λ ) −1 ‖x− x′‖2 . ( 4 ) The following lemma provides useful properties of the Moreau envelope . Lemma 3 . For an L-weakly convex function g : Rd1 → R and λ < 1/L , we have : ( a ) The minimizer x̂λ ( x ) = arg minx′∈Rd1 g ( x′ ) + ( 2λ ) −1‖x−x′‖2 is unique and g ( x̂λ ( x ) ) ≤ gλ ( x ) ≤ g ( x ) . Furthermore , arg minx g ( x ) = arg minx gλ ( x ) . ( b ) gλ is λ−1 ( 1 + ( 1− λL ) −1 ) -smooth and thus differentiable , and ( c ) minu∈∂g ( x̂λ ( x ) ) ‖u‖ ≤ λ−1‖x̂λ ( x ) − x‖ = ‖∇gλ ( x ) ‖ . First order stationary points ( FOSP ) of a non-smooth nonconvex function are well-defined , i.e. , x∗ is a FOSP of a function g ( x ) if , 0 ∈ ∂f ( x∗ ) . However , unlike smooth functions , it is nontrivial to define an approximate FOSP . For example , if we define an ε-FOSP as the point x with minu∈∂g ( x ) ‖u‖ ≤ ε , where ∂g ( x ) denotes the subgradients of g at x , there may never exist such a point for sufficiently small ε , unless x is exactly a FOSP . In contrast , by using above properties of the Moreau envelope of a weakly convex function , it ’ s approximate FOSP can be defined as ( Davis & Drusvyatskiy , 2018 ) : Definition 4 . Given an L-weakly convex function g , we say that x∗ is an ε-first order stationary point ( ε-FOSP ) if , ‖∇g1/2L ( x∗ ) ‖ ≤ ε , where g1/2L is the Moreau envelope with parameter 1/2L . Using Lemma 3 , we can show that for any ε-FOSP x∗ , there exists x̂ such that ‖x̂− x∗‖ ≤ ε/2L and minu∈∂g ( x̂ ) ‖u‖ ≤ ε . In other words , an ε-FOSP is O ( ε ) close to a point x̂ which has a subgradient smaller than ε . Other notions of FOSP proposed recently such as in Nouiehed et al . ( 2019 ) can be shown to be a strict generalization of the above definition . | The paper considers a min-max optimization of general nonconvex functions. The paper proposes methods to approximately find stationary points by "smoothing" the max part. Experimental results show the superiority of the proposed approach to previous work. | SP:f079866b2901d73b562cf1765bbd1c8505f3c69d |
Minimax Optimization with Smooth Algorithmic Adversaries | 1 INTRODUCTION . This paper considers minimax optimization minx maxy f ( x , y ) in the context of two-player zero-sum games , where the min-player ( controlling x ) tries to minimize objective f assuming a worst-case opponent ( controlling y ) that acts so as to maximize it . Minimax optimization naturally arises in a variety of important machine learning paradigms , with the most prominent examples being the training of generative adversarial networks ( GANs ) ( Goodfellow et al. , 2014 ) and adversarially robust models ( Madry et al. , 2018 ) . These applications commonly engage deep neural networks with various techniques such as convolution , recurrent layers , and batch normalization . As a result , the objective function f is highly nonconvex in x and nonconcave in y. Theoretically , minimax optimization has been extensively studied starting from the seminal work of von Neumann ( Neumann , 1928 ) , with many efficient algorithms proposed for solving it ( Robinson , 1951 ; Korpelevich , 1976 ; Nemirovski , 2004 ) . A majority of these classical results have been focused on convex-concave functions , and heavily rely on the minimax theorem , i.e. , minx maxy f ( x , y ) = maxy minx f ( x , y ) , which no longer holds beyond the convex-concave setting . Recent line of works ( Lin et al. , 2020a ; Nouiehed et al. , 2019 ; Thekumparampil et al. , 2019 ; Lin et al. , 2020b ; Ostrovskii et al. , 2020 ) address the nonconvex-concave setting where f is nonconvex in x but concave in y by proposing meaningful optimality notions and designing algorithms to find such points . A key property heavily exploited in this setting is that the inner maximization over y given a fixed x can be computed efficiently , which unfortunately does not extend to the nonconvex-nonconcave setting . Consequently , nonconvex-nonconcave optimization remains challenging , and two of the most fundamental theoretical issues are still unresolved : ( i ) what is an appropriate notion of optimality that can be computed efficiently ? and ( ii ) can we design algorithms that do not suffer from cycling or diverging behavior ? Practitioners often use simple and popular algorithms such as gradient descent ascent ( GDA ) and other variants for solving these challenging optimization problems . While these algorithms seem to perform well in terms of producing high quality images in GANs and robust models in adversarial training , they are also highly unstable , particularly in training GANs . Indeed the instability of GDA and other empirically popular methods is not surprising since they are known to not converge even in very simple settings ( Daskalakis & Panageas , 2018a ; Bailey et al. , 2020 ) . This current state of affairs strongly motivates the need to develop a strong theoretical foundation for nonconvex-nonconcave minimax optimization and to design better algorithms for solving them . This work considers the challenging nonconvex-nonconcave setting . Our framework sprouts from the practical consideration that under a computational budget , the max-player can not fully maximize f ( x , · ) since nonconcave maximization is NP-hard in general . In fact , in both the settings of GAN and adversarial training , in practice , the max-player employs simple gradient based algorithms such as gradient ascent , run for a few steps – on the order of 5 for GAN training and 40 for adversarial training ( see , e.g. , Arjovsky et al . 2017 ; Madry et al . 2018 ) – to estimate argmaxy f ( x , y ) . To capture this aspect , we assume that the max-player has a toolkit of multiple ( potentially randomized ) algorithmsA1 , A2 , · · · , Ak in an attempt to solve the maximization problem given fixed x , and picks the best solution among these algorithms . This motivates us to study the surrogate of the minimax optimization problem as minx maxi∈ [ k ] f ( x , Ai ( x ) ) = minx maxλ∈∆k ∑k i=1 λif ( x , Ai ( x ) ) , ( 1 ) where ∆k denotes the k-dimensional simplex , and Ai ( x ) denotes the output of algorithm Ai for a given x . When both the objective function f and the algorithms { Ai } ki=1 are smooth ( defined formally in Section 3 ) , we can show that ( 1 ) becomes a smooth nonconvex-concave minimax optimization problem , where recent advances can be leveraged in solving such problems . In particular , given the smooth algorithms deployed by the adversary ( i.e . the max-player ) , this paper proposes two algorithms for solving problems in ( 1 ) . The first algorithm is based on stochastic gradient descent ( SGD ) , which is guaranteed to find an appropriate notion of “ -approximate stationary point ” in O ( −4 ) gradient computations . The second algorithm is based on proximal algorithm , in the case of deterministic adversarial algorithms { Ai } ki=1 , this algorithm has an improved gradient complexity O ( −3 ) or Õ ( poly ( k ) / 2 ) depending on the choice of subroutine within the algorithm . All our algorithms are guaranteed to make monotonic progress , thus having no limit cycles . Our second set of results show that , many popular algorithms deployed by the adversary such as multi-step stochastic gradient ascent , and multi-step stochastic Nesterov ’ s accelerated gradient ascent are in fact smooth . Therefore , our framework readily applies to those settings in practice . We also present complementing experimental results showing that our theoretical framework and algorithm succeed on simple , conceptual examples of GAN and adversarial training . While more work is needed to scale our approach to large scale benchmarks in GAN and adversarial training , our experimental results serve as a proof of concept demonstration that our algorithm converges to desirable points in practice , at least on simple conceptual examples . 2 RELATED WORK . Due to lack of space , we focus our discussion here on directly related works and present a more detailed overview of related work in Appendix A . Many existing works that propose local optimality notions in nonconvex-nonconcave minimax optimization suffer from nonexistence of such points in general ( Ratliff et al. , 2013 ; Ratliff et al. , 2016 ; Jin et al. , 2020 ; Fiez et al. , 2020 ; Zhang et al. , 2020a ; Farnia & Ozdaglar , 2020 ) . To the best of our knowledge , the only works that propose a relaxed local optimality notion that is shown to exist and be computable in polynomial time is due to Keswani et al . ( 2020 ) ; Mangoubi & Vishnoi ( 2021 ) . The aforementioned works are similar to this paper in the sense that the min-player faces the max-player with computational restrictions , but are different from ours in terms of the model of the max-player and the algorithms to solve the problem . Concretely , Keswani et al . ( 2020 ) ; Mangoubi & Vishnoi ( 2021 ) consider the stationary points of a “ smoothed '' greedy-max function , which is computed by maximizing along a locally ascending path when fixing the min-player . In contrast , our paper considers the stationary points of a “ max '' function computed by particular smooth algorithms given their initializations , which is a more faithful surrogate to the objective that the min-player wishes to minimize . Depending on the choice of smooth algorithms and their initializations , the optimal points of Keswani et al . ( 2020 ) ; Mangoubi & Vishnoi ( 2021 ) and the optimal points in our paper can be very different , making them incomparable . 3 PRELIMINARIES . In this section , we present problem formulation and preliminaries . We consider function f satisfying Assumption 1 . We denote w = ( x , y ) , and assume f : Rd1 × Rd2 → R is : ( a ) B-bounded i.e. , |f ( w ) | ≤ B , ( b ) G-Lipschitz i.e. , |f ( w1 ) − f ( w2 ) | ≤ G‖w1 − w2‖ , ( c ) L-gradient Lipschitz i.e. , ‖∇f ( w1 ) −∇f ( w2 ) ‖ ≤ L‖w1 − w2‖ , ( d ) ρ-Hessian Lipschitz i.e. , ‖∇2f ( w1 ) −∇2f ( w2 ) ‖ ≤ ρ‖w1 − w2‖ . where ‖·‖ denotes Euclidean norm for vectors and operator norm for matrices . We aim to solve minx∈Rd1 maxy∈Rd2 f ( x , y ) . Since maxy∈Rd2 f ( x , y ) involves non-concave maximization and hence is NP-hard in the worst case , we intend to play against algorithm ( s ) that y-player uses to compute her strategy . Concretely , given x ∈ Rd1 , we assume that the y-player chooses her ( potentially random ) strategy ŷz ( x ) = Ai∗ ( x ) ( x , zi∗ ( x ) ) , where we use shorthand z : = ( z1 , · · · , zk ) , as i∗ ( x ) = argmaxi∈ [ k ] f ( x , Ai ( x , zi ) ) , where A1 , · · · , Ak are k deterministic algorithms that take as input x and a random seed zi ∈ R ` , where zi are all independent . Note that the framework captures randomized algorithms e.g. , A could be stochastic gradient ascent on f ( x , · ) , with initialization , minibatching etc . determined by the random seed z . This also incorporates running the same algorithm multiple times , with different seeds and then choosing the best strategy . We now reformulate the minimax objective function to : minx∈Rd1 g ( x ) where g ( x ) : = Ez [ f ( x , ŷz ( x ) ) ] . ( 2 ) For general algorithms Ai , the functions f ( x , Ai ( x , zi ) ) need not be continuous even when f satisfies Assumption 1 . However , if the algorithms Ai are smooth as defined below , the functions f ( x , Ai ( x , zi ) ) behave much more nicely . Definition 1 ( Algorithm Smoothness ) . A randomized algorithm A : Rd1 × R ` → Rd2 is : ( a ) G-Lipschitz , if ‖A ( x1 , z ) −A ( x2 , z ) ‖ ≤ G‖x1 − x2‖ for any z . ( b ) L-gradient Lipschitz , if ‖DA ( x1 , z ) −DA ( x2 , z ) ‖ ≤ L‖x1 − x2‖ for any z . Here DA ( x , z ) ∈ Rd1 × Rd2 is the Jacobian of the function A ( · , z ) for a fixed z . The following lemma tells us that f ( x , A ( x , z ) ) behaves nicely whenever A is a Lipschitz and gradient Lipschitz algorithm . For deterministic algorithms , we also use the shortened notation A ( x ) and DA ( x ) . Lemma 1 . Suppose A is G′-Lipschitz and L′-gradient Lipschitz and f satisfies Assumption 1 . Then , for a fixed z , function f ( · , A ( · , z ) ) is G ( 1 +G′ ) -Lipschitz and L ( 1 +G′ ) 2 +GL′-gradient Lipschitz . While g ( x ) defined in ( 2 ) is not necessarily gradient Lipschitz , it can be shown to be weakly-convex as defined below . Note that an L-gradient Lipschitz function is L-weakly convex . Definition 2 . A function g : Rd1 → R is L-weakly convex if ∀ x , there exists a vector ux satisfying : g ( x′ ) ≥ g ( x ) + 〈ux , x′ − x〉 − L2 ‖x ′ − x‖2 ∀ x′ . ( 3 ) Any vector ux satisfying this property is called the subgradient of g at x and is denoted by ∇g ( x ) . An important property of weakly convex function is that the maximum over a finite number of weakly convex function is still a weakly convex function . Lemma 2 . Given L-weakly convex functions g1 , · · · , gk : Rd → R , the maximum function g ( · ) : = maxi∈ [ k ] gi ( · ) is also L-weakly convex and the set of subgradients of g ( · ) at x is given by : ∂g ( x ) = { ∑ j∈S ( x ) λj∇gj ( x ) : λj ≥ 0 , ∑ j∈S ( x ) λj = 1 } , where S ( x ) : = argmaxi∈ [ k ] gi ( x ) . Thus , under Assumption 1 and the assumptions Ai are all G′-Lipschitz and L′-gradient Lipschitz , then g ( · ) defined in ( 2 ) is L ( 1 + G′ ) 2 + GL′-weakly convex . The usual optimality notion for weakly-convex functions is approximate first order stationary points ( Davis & Drusvyatskiy , 2018 ) . Approximate first-order stationary point for weakly convex functions : In order to define approximate stationary points , we also need the notion of Moreau envelope . Definition 3 . The Moreau envelope of a function g : Rd1 → R and parameter λ is : gλ ( x ) = minx′∈Rd1 g ( x ′ ) + ( 2λ ) −1 ‖x− x′‖2 . ( 4 ) The following lemma provides useful properties of the Moreau envelope . Lemma 3 . For an L-weakly convex function g : Rd1 → R and λ < 1/L , we have : ( a ) The minimizer x̂λ ( x ) = arg minx′∈Rd1 g ( x′ ) + ( 2λ ) −1‖x−x′‖2 is unique and g ( x̂λ ( x ) ) ≤ gλ ( x ) ≤ g ( x ) . Furthermore , arg minx g ( x ) = arg minx gλ ( x ) . ( b ) gλ is λ−1 ( 1 + ( 1− λL ) −1 ) -smooth and thus differentiable , and ( c ) minu∈∂g ( x̂λ ( x ) ) ‖u‖ ≤ λ−1‖x̂λ ( x ) − x‖ = ‖∇gλ ( x ) ‖ . First order stationary points ( FOSP ) of a non-smooth nonconvex function are well-defined , i.e. , x∗ is a FOSP of a function g ( x ) if , 0 ∈ ∂f ( x∗ ) . However , unlike smooth functions , it is nontrivial to define an approximate FOSP . For example , if we define an ε-FOSP as the point x with minu∈∂g ( x ) ‖u‖ ≤ ε , where ∂g ( x ) denotes the subgradients of g at x , there may never exist such a point for sufficiently small ε , unless x is exactly a FOSP . In contrast , by using above properties of the Moreau envelope of a weakly convex function , it ’ s approximate FOSP can be defined as ( Davis & Drusvyatskiy , 2018 ) : Definition 4 . Given an L-weakly convex function g , we say that x∗ is an ε-first order stationary point ( ε-FOSP ) if , ‖∇g1/2L ( x∗ ) ‖ ≤ ε , where g1/2L is the Moreau envelope with parameter 1/2L . Using Lemma 3 , we can show that for any ε-FOSP x∗ , there exists x̂ such that ‖x̂− x∗‖ ≤ ε/2L and minu∈∂g ( x̂ ) ‖u‖ ≤ ε . In other words , an ε-FOSP is O ( ε ) close to a point x̂ which has a subgradient smaller than ε . Other notions of FOSP proposed recently such as in Nouiehed et al . ( 2019 ) can be shown to be a strict generalization of the above definition . | This paper provides a new perspective to solve the nonconvex-nonconcave minimax problems. Specifically, the proposed method turns the nonconvex-nonconcave minimax problem to a nonconvex-concave minimax problem by using a toolkit of multiple smooth algorithms to find a solution of the maximization problem given fixed $x$. Moreover, it studies the convergence properties of the proposed algorithms. Some experimental results on generative gdversarial networks and adversarial training demonstrate the efficiency of the proposed algorithms. | SP:f079866b2901d73b562cf1765bbd1c8505f3c69d |
Minimax Optimization with Smooth Algorithmic Adversaries | 1 INTRODUCTION . This paper considers minimax optimization minx maxy f ( x , y ) in the context of two-player zero-sum games , where the min-player ( controlling x ) tries to minimize objective f assuming a worst-case opponent ( controlling y ) that acts so as to maximize it . Minimax optimization naturally arises in a variety of important machine learning paradigms , with the most prominent examples being the training of generative adversarial networks ( GANs ) ( Goodfellow et al. , 2014 ) and adversarially robust models ( Madry et al. , 2018 ) . These applications commonly engage deep neural networks with various techniques such as convolution , recurrent layers , and batch normalization . As a result , the objective function f is highly nonconvex in x and nonconcave in y. Theoretically , minimax optimization has been extensively studied starting from the seminal work of von Neumann ( Neumann , 1928 ) , with many efficient algorithms proposed for solving it ( Robinson , 1951 ; Korpelevich , 1976 ; Nemirovski , 2004 ) . A majority of these classical results have been focused on convex-concave functions , and heavily rely on the minimax theorem , i.e. , minx maxy f ( x , y ) = maxy minx f ( x , y ) , which no longer holds beyond the convex-concave setting . Recent line of works ( Lin et al. , 2020a ; Nouiehed et al. , 2019 ; Thekumparampil et al. , 2019 ; Lin et al. , 2020b ; Ostrovskii et al. , 2020 ) address the nonconvex-concave setting where f is nonconvex in x but concave in y by proposing meaningful optimality notions and designing algorithms to find such points . A key property heavily exploited in this setting is that the inner maximization over y given a fixed x can be computed efficiently , which unfortunately does not extend to the nonconvex-nonconcave setting . Consequently , nonconvex-nonconcave optimization remains challenging , and two of the most fundamental theoretical issues are still unresolved : ( i ) what is an appropriate notion of optimality that can be computed efficiently ? and ( ii ) can we design algorithms that do not suffer from cycling or diverging behavior ? Practitioners often use simple and popular algorithms such as gradient descent ascent ( GDA ) and other variants for solving these challenging optimization problems . While these algorithms seem to perform well in terms of producing high quality images in GANs and robust models in adversarial training , they are also highly unstable , particularly in training GANs . Indeed the instability of GDA and other empirically popular methods is not surprising since they are known to not converge even in very simple settings ( Daskalakis & Panageas , 2018a ; Bailey et al. , 2020 ) . This current state of affairs strongly motivates the need to develop a strong theoretical foundation for nonconvex-nonconcave minimax optimization and to design better algorithms for solving them . This work considers the challenging nonconvex-nonconcave setting . Our framework sprouts from the practical consideration that under a computational budget , the max-player can not fully maximize f ( x , · ) since nonconcave maximization is NP-hard in general . In fact , in both the settings of GAN and adversarial training , in practice , the max-player employs simple gradient based algorithms such as gradient ascent , run for a few steps – on the order of 5 for GAN training and 40 for adversarial training ( see , e.g. , Arjovsky et al . 2017 ; Madry et al . 2018 ) – to estimate argmaxy f ( x , y ) . To capture this aspect , we assume that the max-player has a toolkit of multiple ( potentially randomized ) algorithmsA1 , A2 , · · · , Ak in an attempt to solve the maximization problem given fixed x , and picks the best solution among these algorithms . This motivates us to study the surrogate of the minimax optimization problem as minx maxi∈ [ k ] f ( x , Ai ( x ) ) = minx maxλ∈∆k ∑k i=1 λif ( x , Ai ( x ) ) , ( 1 ) where ∆k denotes the k-dimensional simplex , and Ai ( x ) denotes the output of algorithm Ai for a given x . When both the objective function f and the algorithms { Ai } ki=1 are smooth ( defined formally in Section 3 ) , we can show that ( 1 ) becomes a smooth nonconvex-concave minimax optimization problem , where recent advances can be leveraged in solving such problems . In particular , given the smooth algorithms deployed by the adversary ( i.e . the max-player ) , this paper proposes two algorithms for solving problems in ( 1 ) . The first algorithm is based on stochastic gradient descent ( SGD ) , which is guaranteed to find an appropriate notion of “ -approximate stationary point ” in O ( −4 ) gradient computations . The second algorithm is based on proximal algorithm , in the case of deterministic adversarial algorithms { Ai } ki=1 , this algorithm has an improved gradient complexity O ( −3 ) or Õ ( poly ( k ) / 2 ) depending on the choice of subroutine within the algorithm . All our algorithms are guaranteed to make monotonic progress , thus having no limit cycles . Our second set of results show that , many popular algorithms deployed by the adversary such as multi-step stochastic gradient ascent , and multi-step stochastic Nesterov ’ s accelerated gradient ascent are in fact smooth . Therefore , our framework readily applies to those settings in practice . We also present complementing experimental results showing that our theoretical framework and algorithm succeed on simple , conceptual examples of GAN and adversarial training . While more work is needed to scale our approach to large scale benchmarks in GAN and adversarial training , our experimental results serve as a proof of concept demonstration that our algorithm converges to desirable points in practice , at least on simple conceptual examples . 2 RELATED WORK . Due to lack of space , we focus our discussion here on directly related works and present a more detailed overview of related work in Appendix A . Many existing works that propose local optimality notions in nonconvex-nonconcave minimax optimization suffer from nonexistence of such points in general ( Ratliff et al. , 2013 ; Ratliff et al. , 2016 ; Jin et al. , 2020 ; Fiez et al. , 2020 ; Zhang et al. , 2020a ; Farnia & Ozdaglar , 2020 ) . To the best of our knowledge , the only works that propose a relaxed local optimality notion that is shown to exist and be computable in polynomial time is due to Keswani et al . ( 2020 ) ; Mangoubi & Vishnoi ( 2021 ) . The aforementioned works are similar to this paper in the sense that the min-player faces the max-player with computational restrictions , but are different from ours in terms of the model of the max-player and the algorithms to solve the problem . Concretely , Keswani et al . ( 2020 ) ; Mangoubi & Vishnoi ( 2021 ) consider the stationary points of a “ smoothed '' greedy-max function , which is computed by maximizing along a locally ascending path when fixing the min-player . In contrast , our paper considers the stationary points of a “ max '' function computed by particular smooth algorithms given their initializations , which is a more faithful surrogate to the objective that the min-player wishes to minimize . Depending on the choice of smooth algorithms and their initializations , the optimal points of Keswani et al . ( 2020 ) ; Mangoubi & Vishnoi ( 2021 ) and the optimal points in our paper can be very different , making them incomparable . 3 PRELIMINARIES . In this section , we present problem formulation and preliminaries . We consider function f satisfying Assumption 1 . We denote w = ( x , y ) , and assume f : Rd1 × Rd2 → R is : ( a ) B-bounded i.e. , |f ( w ) | ≤ B , ( b ) G-Lipschitz i.e. , |f ( w1 ) − f ( w2 ) | ≤ G‖w1 − w2‖ , ( c ) L-gradient Lipschitz i.e. , ‖∇f ( w1 ) −∇f ( w2 ) ‖ ≤ L‖w1 − w2‖ , ( d ) ρ-Hessian Lipschitz i.e. , ‖∇2f ( w1 ) −∇2f ( w2 ) ‖ ≤ ρ‖w1 − w2‖ . where ‖·‖ denotes Euclidean norm for vectors and operator norm for matrices . We aim to solve minx∈Rd1 maxy∈Rd2 f ( x , y ) . Since maxy∈Rd2 f ( x , y ) involves non-concave maximization and hence is NP-hard in the worst case , we intend to play against algorithm ( s ) that y-player uses to compute her strategy . Concretely , given x ∈ Rd1 , we assume that the y-player chooses her ( potentially random ) strategy ŷz ( x ) = Ai∗ ( x ) ( x , zi∗ ( x ) ) , where we use shorthand z : = ( z1 , · · · , zk ) , as i∗ ( x ) = argmaxi∈ [ k ] f ( x , Ai ( x , zi ) ) , where A1 , · · · , Ak are k deterministic algorithms that take as input x and a random seed zi ∈ R ` , where zi are all independent . Note that the framework captures randomized algorithms e.g. , A could be stochastic gradient ascent on f ( x , · ) , with initialization , minibatching etc . determined by the random seed z . This also incorporates running the same algorithm multiple times , with different seeds and then choosing the best strategy . We now reformulate the minimax objective function to : minx∈Rd1 g ( x ) where g ( x ) : = Ez [ f ( x , ŷz ( x ) ) ] . ( 2 ) For general algorithms Ai , the functions f ( x , Ai ( x , zi ) ) need not be continuous even when f satisfies Assumption 1 . However , if the algorithms Ai are smooth as defined below , the functions f ( x , Ai ( x , zi ) ) behave much more nicely . Definition 1 ( Algorithm Smoothness ) . A randomized algorithm A : Rd1 × R ` → Rd2 is : ( a ) G-Lipschitz , if ‖A ( x1 , z ) −A ( x2 , z ) ‖ ≤ G‖x1 − x2‖ for any z . ( b ) L-gradient Lipschitz , if ‖DA ( x1 , z ) −DA ( x2 , z ) ‖ ≤ L‖x1 − x2‖ for any z . Here DA ( x , z ) ∈ Rd1 × Rd2 is the Jacobian of the function A ( · , z ) for a fixed z . The following lemma tells us that f ( x , A ( x , z ) ) behaves nicely whenever A is a Lipschitz and gradient Lipschitz algorithm . For deterministic algorithms , we also use the shortened notation A ( x ) and DA ( x ) . Lemma 1 . Suppose A is G′-Lipschitz and L′-gradient Lipschitz and f satisfies Assumption 1 . Then , for a fixed z , function f ( · , A ( · , z ) ) is G ( 1 +G′ ) -Lipschitz and L ( 1 +G′ ) 2 +GL′-gradient Lipschitz . While g ( x ) defined in ( 2 ) is not necessarily gradient Lipschitz , it can be shown to be weakly-convex as defined below . Note that an L-gradient Lipschitz function is L-weakly convex . Definition 2 . A function g : Rd1 → R is L-weakly convex if ∀ x , there exists a vector ux satisfying : g ( x′ ) ≥ g ( x ) + 〈ux , x′ − x〉 − L2 ‖x ′ − x‖2 ∀ x′ . ( 3 ) Any vector ux satisfying this property is called the subgradient of g at x and is denoted by ∇g ( x ) . An important property of weakly convex function is that the maximum over a finite number of weakly convex function is still a weakly convex function . Lemma 2 . Given L-weakly convex functions g1 , · · · , gk : Rd → R , the maximum function g ( · ) : = maxi∈ [ k ] gi ( · ) is also L-weakly convex and the set of subgradients of g ( · ) at x is given by : ∂g ( x ) = { ∑ j∈S ( x ) λj∇gj ( x ) : λj ≥ 0 , ∑ j∈S ( x ) λj = 1 } , where S ( x ) : = argmaxi∈ [ k ] gi ( x ) . Thus , under Assumption 1 and the assumptions Ai are all G′-Lipschitz and L′-gradient Lipschitz , then g ( · ) defined in ( 2 ) is L ( 1 + G′ ) 2 + GL′-weakly convex . The usual optimality notion for weakly-convex functions is approximate first order stationary points ( Davis & Drusvyatskiy , 2018 ) . Approximate first-order stationary point for weakly convex functions : In order to define approximate stationary points , we also need the notion of Moreau envelope . Definition 3 . The Moreau envelope of a function g : Rd1 → R and parameter λ is : gλ ( x ) = minx′∈Rd1 g ( x ′ ) + ( 2λ ) −1 ‖x− x′‖2 . ( 4 ) The following lemma provides useful properties of the Moreau envelope . Lemma 3 . For an L-weakly convex function g : Rd1 → R and λ < 1/L , we have : ( a ) The minimizer x̂λ ( x ) = arg minx′∈Rd1 g ( x′ ) + ( 2λ ) −1‖x−x′‖2 is unique and g ( x̂λ ( x ) ) ≤ gλ ( x ) ≤ g ( x ) . Furthermore , arg minx g ( x ) = arg minx gλ ( x ) . ( b ) gλ is λ−1 ( 1 + ( 1− λL ) −1 ) -smooth and thus differentiable , and ( c ) minu∈∂g ( x̂λ ( x ) ) ‖u‖ ≤ λ−1‖x̂λ ( x ) − x‖ = ‖∇gλ ( x ) ‖ . First order stationary points ( FOSP ) of a non-smooth nonconvex function are well-defined , i.e. , x∗ is a FOSP of a function g ( x ) if , 0 ∈ ∂f ( x∗ ) . However , unlike smooth functions , it is nontrivial to define an approximate FOSP . For example , if we define an ε-FOSP as the point x with minu∈∂g ( x ) ‖u‖ ≤ ε , where ∂g ( x ) denotes the subgradients of g at x , there may never exist such a point for sufficiently small ε , unless x is exactly a FOSP . In contrast , by using above properties of the Moreau envelope of a weakly convex function , it ’ s approximate FOSP can be defined as ( Davis & Drusvyatskiy , 2018 ) : Definition 4 . Given an L-weakly convex function g , we say that x∗ is an ε-first order stationary point ( ε-FOSP ) if , ‖∇g1/2L ( x∗ ) ‖ ≤ ε , where g1/2L is the Moreau envelope with parameter 1/2L . Using Lemma 3 , we can show that for any ε-FOSP x∗ , there exists x̂ such that ‖x̂− x∗‖ ≤ ε/2L and minu∈∂g ( x̂ ) ‖u‖ ≤ ε . In other words , an ε-FOSP is O ( ε ) close to a point x̂ which has a subgradient smaller than ε . Other notions of FOSP proposed recently such as in Nouiehed et al . ( 2019 ) can be shown to be a strict generalization of the above definition . | The paper is trying to address the problem of non-convex non-concave min-max optimization under the perspective of application of smoothed algorithms between the two opponents. More precisely, the paper examine a model where the max-player applied a zero-memory smooth (from differential perspective) algorithm and min-player SGD/SNAG or proximal methods providing results similar with the state of art. The convergence is reassured by "potential" arguments but the fixed point is not an equally game-theoretic notion like Nash Equilibrium. | SP:f079866b2901d73b562cf1765bbd1c8505f3c69d |
Blessing of Class Diversity in Pre-training | This paper presents a new statistical analysis aiming to explain the recent superior achievements of the pre-training techniques in natural language processing ( NLP ) . We prove that when the classes of the pre-training task ( e.g. , different words in masked language model task ) are sufficiently diverse , in the sense that the least singular value of the last linear layer in pre-training is large , then pre-training can significantly improve the sample efficiency of downstream tasks . Inspired by our theory , we propose a new regularization technique that targets the multi-class pretraining : a diversity regularizer only to the last linear layer in the pre-training phase . Our empirical results show that this technique consistently boosts the performance of the pre-trained BERT model on different downstream tasks . 1 INTRODUCTION . Pre-training refers to training a model on a few or many tasks to help it learn parameters that can be used in other tasks . For example , in natural language processing ( NLP ) , one first pre-trains a complex neural network model to predict masked words ( masked language modeling ) , and then fine-tunes the model on downstream tasks , e.g. , sentiment analysis ( Devlin et al. , 2019 ) . Recently , pre-training technique has revolutionized natural language processing ( NLP ) . Models based on this technique have dramatically improve the performance for a wide range of downstream tasks ( Devlin et al. , 2019 ; Radford et al. , 2018 ; Yang et al. , 2019 ; Clark et al. , 2020 ; Lan et al. , 2020 ; Liu et al. , 2020 ) . Despite the large body of empirical work on pre-training , satisfactory theories are still lacking , especially theories that can explain the success of pre-training in NLP . Existing theories often rely on strong distributional assumptions ( Lee et al. , 2020 ) , smoothness conditions ( Robinson et al. , 2020 ) or noise-robustness conditions ( Bansal et al. , 2021 ) to relate the pre-training task ( s ) to downstream tasks . These assumptions are often hard to verify . A line of work studied multi-task pre-training ( Caruana , 1997 ; Baxter , 2000 ; Maurer et al. , 2016 ; Du et al. , 2021 ; Tripuraneni et al. , 2020a ; b ; Thekumparampil et al. , 2021 ) . In particular , recently , researchers have identified a new condition , the diversity of pre-training tasks , which has been shown to be crucial to allow pre-trained models to be useful for downstream tasks . See Section 2 for more detailed discussions on related work . Unfortunately , this line of theory can not be used to explain the success of pre-training in NLP . The theory of multi-task pre-training requires a large number of diverse tasks , e.g. , the number of tasks needs to be larger than the last layer ’ s input dimension ( a.k.a . embedding dimension ) , which is typically 768 , 1024 or 2048 ( Devlin et al. , 2019 ) . However , in NLP pre-training , there are only a few , if not one , pre-training tasks . Therefore , we need a new theory that is applicable to this setting . Furthermore , while existing theories are able to explain certain empirical phenomena , it remains unclear how to utilize the theory in practice . Ideally , we would like the theory to be useful to guide our training procedure or inspire new techniques to improve the performance of real-world models . Since in NLP pre-training , we do not have multiple tasks , we propose to study the blessing of multiple classes . Concretely , consider the Masked Language Model ( MLM ) pre-training task in NLP . In such a pre-training task , we have a large collection of sentences ( e.g . from Wikipedia ) . During the pre-training phase , we randomly mask a few words in each sentence , and predict the masked words using the remaining words in this sentence . This pre-training task is a multi-class classification problem where the number of classes is about 30K when using byte-pair-encoding ( BPE ) sub-word units.1 Note that this number is much larger than the embedding dimension ( 768 , 1024 or 2048 ) . In this paper , we develop a new statistical analysis aiming to explain the success of pre-training for NLP . The key notion of our theory is the diversity of classes , which serves as a similar role as the diversity of tasks in multi-task pre-training theory ( Du et al. , 2021 ; Tripuraneni et al. , 2020a ) . Our theory is not only applicable to the real-world NLP pre-training setting , but also inspires new techniques to improve the practical performance . We summarize our contributions below . 1.1 OUR CONTRIBUTIONS . First , we define a new notion , diversity of classes , which is the least singular value of the last linear layer in pre-training . We prove finite-sample bounds to show that for the cross-entropy loss , if the diversity of classes is large , then pre-training on a single task provably improves the statistical efficiency of the downstream tasks . To our knowledge , this is the first set of theoretical results that demonstrates the statistical gain of the standard practice of NLP pre-training , without strong distributional or smoothness conditions . Second , from a technical point of view , previous theoretical work on multi-task ( Du et al. , 2021 ; Tripuraneni et al. , 2020b ) builds on scalar output , and thus could not apply to multiclass tasks ( e.g. , cross entropy loss ) . We introduce a vector-form Radamacher complexity chain rule for disassembling composite function classes based on vector-form Rademacher contraction property ( Maurer , 2016 ) . This generalizes the scalar-form chain rule in Tripuraneni et al . ( 2020b ) . Furthermore , we adopt the modified self-concordance condition to show that the least singular value of the last linear layer serves as a diversity parameter for cross-entropy loss . We believe our techniques can be useful in other problems . Third , inspired by our theory , we develop a new regularization technique to promote class diversity for multi-class pre-training . We apply the negative log determinant regularizer only to the last linear layer of the pre-training model in masked language modeling . Our empirical results on BERT-base show this technique can boost the performance of downstream tasks . Organization This paper is organized as follows . In Section 2 , we review the related work . In Section 3 , we formally describe the problem setup and introduce the necessary definitions . In Section 4 , we state our main Theorem 1 then instantiate it with several applications . In Section 5 , we describe our new regularization technique and present the empirical results . We conclude in Section 6 and defer the proofs to Appendix . 2 RELATED WORK . Here we mostly focus on the theoretical aspects of pre-training . While there is a long list of work demonstrating the empirical success of self-supervised learning , there are only a few papers that study its theoretical aspects . One line of work studied the theoretical properties of contrastive learning ( Saunshi et al. , 2019 ; Tosh et al. , 2020 ) , which is a different setting considered in this paper . The most relevant one is by Lee et al . ( 2020 ) which showed that if the input data and pre-training labels were independent ( conditional on the downstream labels ) , then pre-training provably improved statistical efficiency . However , this conditional independence assumption rarely holds in practice . For example , in question-answering task , this assumption implies that given the answer , the question sentence and the masked word are independent . Robinson et al . ( 2020 ) assumed the Central Condition and a smoothness condition that related the pretraining task and the downstream task . Bansal et al . ( 2021 ) related generalization error of self-supervised learning to the noise-stability and rationality . However , it is difficult to verify the assumptions in these papers . A recent line of work studied multitask pre-training ( Du et al. , 2021 ; Tripuraneni et al. , 2020a ; b ; Thekumparampil et al. , 2021 ) in which the notion , diversity , has been identified to be the key that enables pre-training to improve statistical efficiency . These works generally require a large number 1This is a standard setting in the BERT model ( Devlin et al. , 2019 ) and is widely adopted as a common practice . By breaking down English words into BPE sub-word units , it could drastically increase the coverage of English language by using a relatively small ( 32768 ) vocabulary . of diverse tasks thus are not applicable to NLP , as we have mentioned . In comparison , we study single-task multi-class pre-training which is different from theirs . Du et al . ( 2021 ) noted that their results allowed an easy adaptation to multi-class settings in ( Remark 6.2 ) . However , they only focused on quadratic loss with one-hot labels for multi-class classification . Instead , we study the commonly used cross-entropy loss . While their analyses do not imply results in our setting , our theoretical analyses are inspired by this line of work . Our paper uses a diversity regularizer proposed in Zou & Adams ( 2012 ) to improve the performance of pre-training . We note that there are other diversity regularizers ( Xie et al. , 2017 ; Mariet & Sra , 2015 ; Cogswell et al. , 2015 ) . These may also improve the performance as the one in Zou & Adams ( 2012 ) . We leave it as a future work to investigate these regularizers . 3 PRELIMINARIES . In this section , we introduce the necessary notations , the problem setup , and several model-dependent quantities of pre-training . 3.1 NOTATION AND SETUP . Notations . Let [ n ] = { 1 , 2 , · · · , n } . We use ‖ · ‖ or ‖ · ‖2 to denote the ` 2 norm of a vector . Let N ( µ , σ2 ) be the one-dimensional Gaussian distribution . For a matrix W ∈ Rm×n , let ‖W‖1 , ∞ = maxq ( ∑ p |Wq , p| ) and ‖W‖∞→2 be the induced ∞-to-2 operator norm . We use the standard O ( · ) , Ω ( · ) and Θ ( · ) notation to hide universal constant factors , and use Õ ( · ) to hide logarithmic factors . We also use a . b to indicate a = O ( b ) . Problem Setup . The procedure is divided into two stages : pre-training stage to find a representation function and the downstream training stage to obtain a predictor for the downstream task . In both stages , we use R̂ to represent empirical risk and use R to represent expected loss . In the first stage , we have one pre-training task with n samples , { xprei , y pre i } ni=1 , where x pre i ∈ X pre ⊂ Rd is the input and yprei ∈ { 0 , 1 } k−1 is the one-hot label for k-class classification ( if y pre i is all-zero then it represents the k-th class ) .2 For instance , in masked language modeling , the input of each sample is a sentence with one word masked out , and the label is the masked word.3 k in this example is the size of the vocabulary ( ≈ 30K ) . We aim to obtain a good representation function ĥ within a function classH ⊂ { Rd → Rr } where r is the embedding dimension ( often equals to 768 , 1024 , 2048 in NLP pre-training ) . For example , one popular choice of the representation function ĥ in NLP applications is the Transformer model and its variants ( Vaswani et al. , 2017 ; Devlin et al. , 2019 ) . On top of the representation , we predict the labels using function fpre within function class Fpre ⊂ { Rr → Rk−1 } . To train the representation function and predictor in pre-training stage , we consider the Empirical Risk Minimization ( ERM ) procedure ĥ = arg min h∈H min fpre∈Fpre R̂pre ( f pre , h ) , arg min h∈H min fpre∈Fpre 1 n n∑ i=1 ` ( fpre ◦ h ( xprei ) , y pre i ) ( 1 ) where ` is the loss function . We overload the notation for both the pre-training task and the downstream task , i.e. , for pre-training , ` : Rk−1 × { 0 , 1 } k−1 → R and for the downstream task , ` : Rk′−1 × { 0 , 1 } k′−1 → R . e.g. , cross-entropy : ` ( ŷ ; y ) = −y > ŷ + log ( 1 + ∑k−1 s=1 exp ( ŷs ) ) . Now for the downstream task , we assume there arem samples { xdowni , ydowni } mi=1 . Note that xdowni ∈ X down ⊂ Rd is the input and ydowni ∈ { 0 , 1 } k ′−1 is the one-hot label for k′-class classification.4 2We assume only one pre-training task for the ease of presentation . It is straightforward to generalize our results to multiple pre-training tasks . 3Here we say only one word being masked only for the ease of presentation . It is straightforward to generalize our results to the case where multiple words are masked out . 4For simplicity , we assume we only have one downstream task . Our theoretical results still apply if we have multiple downstream tasks . Note that in most real-world applications , we have n m and k k′ . For example , in sentiment analysis , k′ = 2 ( “ positive ” or “ negative ” ) . A widely studied task SST-2 ( Wang et al. , 2019 ) has m ≈ 67K , which is also generally much smaller than the pre-training corpus ( e.g. , n > 100M samples ) . To train the classifier for the downstream task , we fix the representation function learned from the pretraining task and train the task-dependent predictor within function class Fdown ⊂ { Rr → Rk′−1 } : f̂down = arg min fdown∈Fdown R̂down ( f down , ĥ ) = arg min fdown∈Fdown 1 m m∑ i=1 ` ( fdown ◦ ĥ ( xdowni ) , ydowni ) . ( 2 ) Therefore , our predictor for the downstream task consists a pair ( f̂down , ĥ ) . We use the Transfer Learning Risk defined below to measure the performance Transfer Learning Risk , Rdown ( f̂down , ĥ ) − Exdown , ydown [ ` ( gdown ( xdown ) , ydown ) ] where Rdown ( f̂down , ĥ ) , Exdown , ydown [ ` ( f̂down ◦ ĥ ( xdown ) , ydown ) ] is the expected loss ( the expectation is over the distribution of the downstream task ) , and gdown = arg ming∈ { Rd→Rk′−1 } Exdown , ydown [ ` ( g ( xdown ) , ydown ) ] is the optimal predictor for the downstream task . In our analysis , we also need to use the following term to characterize the quality of pre-training Pre-training Risk = Rpre ( f̂pre , ĥ ) − Expre , ypre [ ` ( gpre ( xpre ) , ypre ) ] where Rpre ( f̂pre , ĥ ) , Expre , ypre [ ` ( f̂pre ◦ ĥ ( xpre ) , ypre ) ] is the expected loss , and gpre = arg ming∈ { Rd→Rk−1 } Expre , ypre [ ` ( g ( xpre ) , ypre ) ] is the optimal predictor for the pre-training task . Following the existing work on representation learning ( Maurer et al. , 2016 ; Du et al. , 2021 ; Tripuraneni et al. , 2020b ) , throughout the paper we make the following realizability assumption . Assumption 1 ( Realizability ) . There exist h ∈ H , fpre ∈ Fpre , fdown ∈ Fdown such that gpre = fpre ◦ h and gdown = fdown ◦ h. This assumption posits that the representation class and the task-dependent prediction classes are sufficiently expressive to contain the optimal functions . Importantly , the pre-training and downstream tasks share a common optimal representation function h. This assumption formalizes the intuition that pre-training learns a good representation that is also useful for downstream tasks . | The authors present a new statistical analysis aiming to explain the success of (masked) language model pretraining for NLP. Specifically, they focus on the *diversity of classes*, which they claim is similar to the *diversity of tasks* for multi-task pretraining (e.g., Tripuraneni et al. (2020)). Based on their theory, the authors then propose a *diversity regularizer* to improve model performance. | SP:9b2cdae7d6c6b43d26b82b01e9faf747e83a9114 |
Blessing of Class Diversity in Pre-training | This paper presents a new statistical analysis aiming to explain the recent superior achievements of the pre-training techniques in natural language processing ( NLP ) . We prove that when the classes of the pre-training task ( e.g. , different words in masked language model task ) are sufficiently diverse , in the sense that the least singular value of the last linear layer in pre-training is large , then pre-training can significantly improve the sample efficiency of downstream tasks . Inspired by our theory , we propose a new regularization technique that targets the multi-class pretraining : a diversity regularizer only to the last linear layer in the pre-training phase . Our empirical results show that this technique consistently boosts the performance of the pre-trained BERT model on different downstream tasks . 1 INTRODUCTION . Pre-training refers to training a model on a few or many tasks to help it learn parameters that can be used in other tasks . For example , in natural language processing ( NLP ) , one first pre-trains a complex neural network model to predict masked words ( masked language modeling ) , and then fine-tunes the model on downstream tasks , e.g. , sentiment analysis ( Devlin et al. , 2019 ) . Recently , pre-training technique has revolutionized natural language processing ( NLP ) . Models based on this technique have dramatically improve the performance for a wide range of downstream tasks ( Devlin et al. , 2019 ; Radford et al. , 2018 ; Yang et al. , 2019 ; Clark et al. , 2020 ; Lan et al. , 2020 ; Liu et al. , 2020 ) . Despite the large body of empirical work on pre-training , satisfactory theories are still lacking , especially theories that can explain the success of pre-training in NLP . Existing theories often rely on strong distributional assumptions ( Lee et al. , 2020 ) , smoothness conditions ( Robinson et al. , 2020 ) or noise-robustness conditions ( Bansal et al. , 2021 ) to relate the pre-training task ( s ) to downstream tasks . These assumptions are often hard to verify . A line of work studied multi-task pre-training ( Caruana , 1997 ; Baxter , 2000 ; Maurer et al. , 2016 ; Du et al. , 2021 ; Tripuraneni et al. , 2020a ; b ; Thekumparampil et al. , 2021 ) . In particular , recently , researchers have identified a new condition , the diversity of pre-training tasks , which has been shown to be crucial to allow pre-trained models to be useful for downstream tasks . See Section 2 for more detailed discussions on related work . Unfortunately , this line of theory can not be used to explain the success of pre-training in NLP . The theory of multi-task pre-training requires a large number of diverse tasks , e.g. , the number of tasks needs to be larger than the last layer ’ s input dimension ( a.k.a . embedding dimension ) , which is typically 768 , 1024 or 2048 ( Devlin et al. , 2019 ) . However , in NLP pre-training , there are only a few , if not one , pre-training tasks . Therefore , we need a new theory that is applicable to this setting . Furthermore , while existing theories are able to explain certain empirical phenomena , it remains unclear how to utilize the theory in practice . Ideally , we would like the theory to be useful to guide our training procedure or inspire new techniques to improve the performance of real-world models . Since in NLP pre-training , we do not have multiple tasks , we propose to study the blessing of multiple classes . Concretely , consider the Masked Language Model ( MLM ) pre-training task in NLP . In such a pre-training task , we have a large collection of sentences ( e.g . from Wikipedia ) . During the pre-training phase , we randomly mask a few words in each sentence , and predict the masked words using the remaining words in this sentence . This pre-training task is a multi-class classification problem where the number of classes is about 30K when using byte-pair-encoding ( BPE ) sub-word units.1 Note that this number is much larger than the embedding dimension ( 768 , 1024 or 2048 ) . In this paper , we develop a new statistical analysis aiming to explain the success of pre-training for NLP . The key notion of our theory is the diversity of classes , which serves as a similar role as the diversity of tasks in multi-task pre-training theory ( Du et al. , 2021 ; Tripuraneni et al. , 2020a ) . Our theory is not only applicable to the real-world NLP pre-training setting , but also inspires new techniques to improve the practical performance . We summarize our contributions below . 1.1 OUR CONTRIBUTIONS . First , we define a new notion , diversity of classes , which is the least singular value of the last linear layer in pre-training . We prove finite-sample bounds to show that for the cross-entropy loss , if the diversity of classes is large , then pre-training on a single task provably improves the statistical efficiency of the downstream tasks . To our knowledge , this is the first set of theoretical results that demonstrates the statistical gain of the standard practice of NLP pre-training , without strong distributional or smoothness conditions . Second , from a technical point of view , previous theoretical work on multi-task ( Du et al. , 2021 ; Tripuraneni et al. , 2020b ) builds on scalar output , and thus could not apply to multiclass tasks ( e.g. , cross entropy loss ) . We introduce a vector-form Radamacher complexity chain rule for disassembling composite function classes based on vector-form Rademacher contraction property ( Maurer , 2016 ) . This generalizes the scalar-form chain rule in Tripuraneni et al . ( 2020b ) . Furthermore , we adopt the modified self-concordance condition to show that the least singular value of the last linear layer serves as a diversity parameter for cross-entropy loss . We believe our techniques can be useful in other problems . Third , inspired by our theory , we develop a new regularization technique to promote class diversity for multi-class pre-training . We apply the negative log determinant regularizer only to the last linear layer of the pre-training model in masked language modeling . Our empirical results on BERT-base show this technique can boost the performance of downstream tasks . Organization This paper is organized as follows . In Section 2 , we review the related work . In Section 3 , we formally describe the problem setup and introduce the necessary definitions . In Section 4 , we state our main Theorem 1 then instantiate it with several applications . In Section 5 , we describe our new regularization technique and present the empirical results . We conclude in Section 6 and defer the proofs to Appendix . 2 RELATED WORK . Here we mostly focus on the theoretical aspects of pre-training . While there is a long list of work demonstrating the empirical success of self-supervised learning , there are only a few papers that study its theoretical aspects . One line of work studied the theoretical properties of contrastive learning ( Saunshi et al. , 2019 ; Tosh et al. , 2020 ) , which is a different setting considered in this paper . The most relevant one is by Lee et al . ( 2020 ) which showed that if the input data and pre-training labels were independent ( conditional on the downstream labels ) , then pre-training provably improved statistical efficiency . However , this conditional independence assumption rarely holds in practice . For example , in question-answering task , this assumption implies that given the answer , the question sentence and the masked word are independent . Robinson et al . ( 2020 ) assumed the Central Condition and a smoothness condition that related the pretraining task and the downstream task . Bansal et al . ( 2021 ) related generalization error of self-supervised learning to the noise-stability and rationality . However , it is difficult to verify the assumptions in these papers . A recent line of work studied multitask pre-training ( Du et al. , 2021 ; Tripuraneni et al. , 2020a ; b ; Thekumparampil et al. , 2021 ) in which the notion , diversity , has been identified to be the key that enables pre-training to improve statistical efficiency . These works generally require a large number 1This is a standard setting in the BERT model ( Devlin et al. , 2019 ) and is widely adopted as a common practice . By breaking down English words into BPE sub-word units , it could drastically increase the coverage of English language by using a relatively small ( 32768 ) vocabulary . of diverse tasks thus are not applicable to NLP , as we have mentioned . In comparison , we study single-task multi-class pre-training which is different from theirs . Du et al . ( 2021 ) noted that their results allowed an easy adaptation to multi-class settings in ( Remark 6.2 ) . However , they only focused on quadratic loss with one-hot labels for multi-class classification . Instead , we study the commonly used cross-entropy loss . While their analyses do not imply results in our setting , our theoretical analyses are inspired by this line of work . Our paper uses a diversity regularizer proposed in Zou & Adams ( 2012 ) to improve the performance of pre-training . We note that there are other diversity regularizers ( Xie et al. , 2017 ; Mariet & Sra , 2015 ; Cogswell et al. , 2015 ) . These may also improve the performance as the one in Zou & Adams ( 2012 ) . We leave it as a future work to investigate these regularizers . 3 PRELIMINARIES . In this section , we introduce the necessary notations , the problem setup , and several model-dependent quantities of pre-training . 3.1 NOTATION AND SETUP . Notations . Let [ n ] = { 1 , 2 , · · · , n } . We use ‖ · ‖ or ‖ · ‖2 to denote the ` 2 norm of a vector . Let N ( µ , σ2 ) be the one-dimensional Gaussian distribution . For a matrix W ∈ Rm×n , let ‖W‖1 , ∞ = maxq ( ∑ p |Wq , p| ) and ‖W‖∞→2 be the induced ∞-to-2 operator norm . We use the standard O ( · ) , Ω ( · ) and Θ ( · ) notation to hide universal constant factors , and use Õ ( · ) to hide logarithmic factors . We also use a . b to indicate a = O ( b ) . Problem Setup . The procedure is divided into two stages : pre-training stage to find a representation function and the downstream training stage to obtain a predictor for the downstream task . In both stages , we use R̂ to represent empirical risk and use R to represent expected loss . In the first stage , we have one pre-training task with n samples , { xprei , y pre i } ni=1 , where x pre i ∈ X pre ⊂ Rd is the input and yprei ∈ { 0 , 1 } k−1 is the one-hot label for k-class classification ( if y pre i is all-zero then it represents the k-th class ) .2 For instance , in masked language modeling , the input of each sample is a sentence with one word masked out , and the label is the masked word.3 k in this example is the size of the vocabulary ( ≈ 30K ) . We aim to obtain a good representation function ĥ within a function classH ⊂ { Rd → Rr } where r is the embedding dimension ( often equals to 768 , 1024 , 2048 in NLP pre-training ) . For example , one popular choice of the representation function ĥ in NLP applications is the Transformer model and its variants ( Vaswani et al. , 2017 ; Devlin et al. , 2019 ) . On top of the representation , we predict the labels using function fpre within function class Fpre ⊂ { Rr → Rk−1 } . To train the representation function and predictor in pre-training stage , we consider the Empirical Risk Minimization ( ERM ) procedure ĥ = arg min h∈H min fpre∈Fpre R̂pre ( f pre , h ) , arg min h∈H min fpre∈Fpre 1 n n∑ i=1 ` ( fpre ◦ h ( xprei ) , y pre i ) ( 1 ) where ` is the loss function . We overload the notation for both the pre-training task and the downstream task , i.e. , for pre-training , ` : Rk−1 × { 0 , 1 } k−1 → R and for the downstream task , ` : Rk′−1 × { 0 , 1 } k′−1 → R . e.g. , cross-entropy : ` ( ŷ ; y ) = −y > ŷ + log ( 1 + ∑k−1 s=1 exp ( ŷs ) ) . Now for the downstream task , we assume there arem samples { xdowni , ydowni } mi=1 . Note that xdowni ∈ X down ⊂ Rd is the input and ydowni ∈ { 0 , 1 } k ′−1 is the one-hot label for k′-class classification.4 2We assume only one pre-training task for the ease of presentation . It is straightforward to generalize our results to multiple pre-training tasks . 3Here we say only one word being masked only for the ease of presentation . It is straightforward to generalize our results to the case where multiple words are masked out . 4For simplicity , we assume we only have one downstream task . Our theoretical results still apply if we have multiple downstream tasks . Note that in most real-world applications , we have n m and k k′ . For example , in sentiment analysis , k′ = 2 ( “ positive ” or “ negative ” ) . A widely studied task SST-2 ( Wang et al. , 2019 ) has m ≈ 67K , which is also generally much smaller than the pre-training corpus ( e.g. , n > 100M samples ) . To train the classifier for the downstream task , we fix the representation function learned from the pretraining task and train the task-dependent predictor within function class Fdown ⊂ { Rr → Rk′−1 } : f̂down = arg min fdown∈Fdown R̂down ( f down , ĥ ) = arg min fdown∈Fdown 1 m m∑ i=1 ` ( fdown ◦ ĥ ( xdowni ) , ydowni ) . ( 2 ) Therefore , our predictor for the downstream task consists a pair ( f̂down , ĥ ) . We use the Transfer Learning Risk defined below to measure the performance Transfer Learning Risk , Rdown ( f̂down , ĥ ) − Exdown , ydown [ ` ( gdown ( xdown ) , ydown ) ] where Rdown ( f̂down , ĥ ) , Exdown , ydown [ ` ( f̂down ◦ ĥ ( xdown ) , ydown ) ] is the expected loss ( the expectation is over the distribution of the downstream task ) , and gdown = arg ming∈ { Rd→Rk′−1 } Exdown , ydown [ ` ( g ( xdown ) , ydown ) ] is the optimal predictor for the downstream task . In our analysis , we also need to use the following term to characterize the quality of pre-training Pre-training Risk = Rpre ( f̂pre , ĥ ) − Expre , ypre [ ` ( gpre ( xpre ) , ypre ) ] where Rpre ( f̂pre , ĥ ) , Expre , ypre [ ` ( f̂pre ◦ ĥ ( xpre ) , ypre ) ] is the expected loss , and gpre = arg ming∈ { Rd→Rk−1 } Expre , ypre [ ` ( g ( xpre ) , ypre ) ] is the optimal predictor for the pre-training task . Following the existing work on representation learning ( Maurer et al. , 2016 ; Du et al. , 2021 ; Tripuraneni et al. , 2020b ) , throughout the paper we make the following realizability assumption . Assumption 1 ( Realizability ) . There exist h ∈ H , fpre ∈ Fpre , fdown ∈ Fdown such that gpre = fpre ◦ h and gdown = fdown ◦ h. This assumption posits that the representation class and the task-dependent prediction classes are sufficiently expressive to contain the optimal functions . Importantly , the pre-training and downstream tasks share a common optimal representation function h. This assumption formalizes the intuition that pre-training learns a good representation that is also useful for downstream tasks . | This paper analyzes the effectiveness of pre-trained models on downstream classification task, showing that the "class diversity" (characterized by the least singular value of the last linear) in pre-training is important for the target classification tasks after fine-tuning. The paper also suggest a diversity regularizer for improving the downstream task efficiency. The paper is mainly concerned with the formal analysis of the effects of class diversity (in practically relevant settings). However, a demonstration of the effects of proposed diversity regularizer is also demonstrated empirically on a well-known benchmark database for 7 multi-class NLP classification tasks. | SP:9b2cdae7d6c6b43d26b82b01e9faf747e83a9114 |
Blessing of Class Diversity in Pre-training | This paper presents a new statistical analysis aiming to explain the recent superior achievements of the pre-training techniques in natural language processing ( NLP ) . We prove that when the classes of the pre-training task ( e.g. , different words in masked language model task ) are sufficiently diverse , in the sense that the least singular value of the last linear layer in pre-training is large , then pre-training can significantly improve the sample efficiency of downstream tasks . Inspired by our theory , we propose a new regularization technique that targets the multi-class pretraining : a diversity regularizer only to the last linear layer in the pre-training phase . Our empirical results show that this technique consistently boosts the performance of the pre-trained BERT model on different downstream tasks . 1 INTRODUCTION . Pre-training refers to training a model on a few or many tasks to help it learn parameters that can be used in other tasks . For example , in natural language processing ( NLP ) , one first pre-trains a complex neural network model to predict masked words ( masked language modeling ) , and then fine-tunes the model on downstream tasks , e.g. , sentiment analysis ( Devlin et al. , 2019 ) . Recently , pre-training technique has revolutionized natural language processing ( NLP ) . Models based on this technique have dramatically improve the performance for a wide range of downstream tasks ( Devlin et al. , 2019 ; Radford et al. , 2018 ; Yang et al. , 2019 ; Clark et al. , 2020 ; Lan et al. , 2020 ; Liu et al. , 2020 ) . Despite the large body of empirical work on pre-training , satisfactory theories are still lacking , especially theories that can explain the success of pre-training in NLP . Existing theories often rely on strong distributional assumptions ( Lee et al. , 2020 ) , smoothness conditions ( Robinson et al. , 2020 ) or noise-robustness conditions ( Bansal et al. , 2021 ) to relate the pre-training task ( s ) to downstream tasks . These assumptions are often hard to verify . A line of work studied multi-task pre-training ( Caruana , 1997 ; Baxter , 2000 ; Maurer et al. , 2016 ; Du et al. , 2021 ; Tripuraneni et al. , 2020a ; b ; Thekumparampil et al. , 2021 ) . In particular , recently , researchers have identified a new condition , the diversity of pre-training tasks , which has been shown to be crucial to allow pre-trained models to be useful for downstream tasks . See Section 2 for more detailed discussions on related work . Unfortunately , this line of theory can not be used to explain the success of pre-training in NLP . The theory of multi-task pre-training requires a large number of diverse tasks , e.g. , the number of tasks needs to be larger than the last layer ’ s input dimension ( a.k.a . embedding dimension ) , which is typically 768 , 1024 or 2048 ( Devlin et al. , 2019 ) . However , in NLP pre-training , there are only a few , if not one , pre-training tasks . Therefore , we need a new theory that is applicable to this setting . Furthermore , while existing theories are able to explain certain empirical phenomena , it remains unclear how to utilize the theory in practice . Ideally , we would like the theory to be useful to guide our training procedure or inspire new techniques to improve the performance of real-world models . Since in NLP pre-training , we do not have multiple tasks , we propose to study the blessing of multiple classes . Concretely , consider the Masked Language Model ( MLM ) pre-training task in NLP . In such a pre-training task , we have a large collection of sentences ( e.g . from Wikipedia ) . During the pre-training phase , we randomly mask a few words in each sentence , and predict the masked words using the remaining words in this sentence . This pre-training task is a multi-class classification problem where the number of classes is about 30K when using byte-pair-encoding ( BPE ) sub-word units.1 Note that this number is much larger than the embedding dimension ( 768 , 1024 or 2048 ) . In this paper , we develop a new statistical analysis aiming to explain the success of pre-training for NLP . The key notion of our theory is the diversity of classes , which serves as a similar role as the diversity of tasks in multi-task pre-training theory ( Du et al. , 2021 ; Tripuraneni et al. , 2020a ) . Our theory is not only applicable to the real-world NLP pre-training setting , but also inspires new techniques to improve the practical performance . We summarize our contributions below . 1.1 OUR CONTRIBUTIONS . First , we define a new notion , diversity of classes , which is the least singular value of the last linear layer in pre-training . We prove finite-sample bounds to show that for the cross-entropy loss , if the diversity of classes is large , then pre-training on a single task provably improves the statistical efficiency of the downstream tasks . To our knowledge , this is the first set of theoretical results that demonstrates the statistical gain of the standard practice of NLP pre-training , without strong distributional or smoothness conditions . Second , from a technical point of view , previous theoretical work on multi-task ( Du et al. , 2021 ; Tripuraneni et al. , 2020b ) builds on scalar output , and thus could not apply to multiclass tasks ( e.g. , cross entropy loss ) . We introduce a vector-form Radamacher complexity chain rule for disassembling composite function classes based on vector-form Rademacher contraction property ( Maurer , 2016 ) . This generalizes the scalar-form chain rule in Tripuraneni et al . ( 2020b ) . Furthermore , we adopt the modified self-concordance condition to show that the least singular value of the last linear layer serves as a diversity parameter for cross-entropy loss . We believe our techniques can be useful in other problems . Third , inspired by our theory , we develop a new regularization technique to promote class diversity for multi-class pre-training . We apply the negative log determinant regularizer only to the last linear layer of the pre-training model in masked language modeling . Our empirical results on BERT-base show this technique can boost the performance of downstream tasks . Organization This paper is organized as follows . In Section 2 , we review the related work . In Section 3 , we formally describe the problem setup and introduce the necessary definitions . In Section 4 , we state our main Theorem 1 then instantiate it with several applications . In Section 5 , we describe our new regularization technique and present the empirical results . We conclude in Section 6 and defer the proofs to Appendix . 2 RELATED WORK . Here we mostly focus on the theoretical aspects of pre-training . While there is a long list of work demonstrating the empirical success of self-supervised learning , there are only a few papers that study its theoretical aspects . One line of work studied the theoretical properties of contrastive learning ( Saunshi et al. , 2019 ; Tosh et al. , 2020 ) , which is a different setting considered in this paper . The most relevant one is by Lee et al . ( 2020 ) which showed that if the input data and pre-training labels were independent ( conditional on the downstream labels ) , then pre-training provably improved statistical efficiency . However , this conditional independence assumption rarely holds in practice . For example , in question-answering task , this assumption implies that given the answer , the question sentence and the masked word are independent . Robinson et al . ( 2020 ) assumed the Central Condition and a smoothness condition that related the pretraining task and the downstream task . Bansal et al . ( 2021 ) related generalization error of self-supervised learning to the noise-stability and rationality . However , it is difficult to verify the assumptions in these papers . A recent line of work studied multitask pre-training ( Du et al. , 2021 ; Tripuraneni et al. , 2020a ; b ; Thekumparampil et al. , 2021 ) in which the notion , diversity , has been identified to be the key that enables pre-training to improve statistical efficiency . These works generally require a large number 1This is a standard setting in the BERT model ( Devlin et al. , 2019 ) and is widely adopted as a common practice . By breaking down English words into BPE sub-word units , it could drastically increase the coverage of English language by using a relatively small ( 32768 ) vocabulary . of diverse tasks thus are not applicable to NLP , as we have mentioned . In comparison , we study single-task multi-class pre-training which is different from theirs . Du et al . ( 2021 ) noted that their results allowed an easy adaptation to multi-class settings in ( Remark 6.2 ) . However , they only focused on quadratic loss with one-hot labels for multi-class classification . Instead , we study the commonly used cross-entropy loss . While their analyses do not imply results in our setting , our theoretical analyses are inspired by this line of work . Our paper uses a diversity regularizer proposed in Zou & Adams ( 2012 ) to improve the performance of pre-training . We note that there are other diversity regularizers ( Xie et al. , 2017 ; Mariet & Sra , 2015 ; Cogswell et al. , 2015 ) . These may also improve the performance as the one in Zou & Adams ( 2012 ) . We leave it as a future work to investigate these regularizers . 3 PRELIMINARIES . In this section , we introduce the necessary notations , the problem setup , and several model-dependent quantities of pre-training . 3.1 NOTATION AND SETUP . Notations . Let [ n ] = { 1 , 2 , · · · , n } . We use ‖ · ‖ or ‖ · ‖2 to denote the ` 2 norm of a vector . Let N ( µ , σ2 ) be the one-dimensional Gaussian distribution . For a matrix W ∈ Rm×n , let ‖W‖1 , ∞ = maxq ( ∑ p |Wq , p| ) and ‖W‖∞→2 be the induced ∞-to-2 operator norm . We use the standard O ( · ) , Ω ( · ) and Θ ( · ) notation to hide universal constant factors , and use Õ ( · ) to hide logarithmic factors . We also use a . b to indicate a = O ( b ) . Problem Setup . The procedure is divided into two stages : pre-training stage to find a representation function and the downstream training stage to obtain a predictor for the downstream task . In both stages , we use R̂ to represent empirical risk and use R to represent expected loss . In the first stage , we have one pre-training task with n samples , { xprei , y pre i } ni=1 , where x pre i ∈ X pre ⊂ Rd is the input and yprei ∈ { 0 , 1 } k−1 is the one-hot label for k-class classification ( if y pre i is all-zero then it represents the k-th class ) .2 For instance , in masked language modeling , the input of each sample is a sentence with one word masked out , and the label is the masked word.3 k in this example is the size of the vocabulary ( ≈ 30K ) . We aim to obtain a good representation function ĥ within a function classH ⊂ { Rd → Rr } where r is the embedding dimension ( often equals to 768 , 1024 , 2048 in NLP pre-training ) . For example , one popular choice of the representation function ĥ in NLP applications is the Transformer model and its variants ( Vaswani et al. , 2017 ; Devlin et al. , 2019 ) . On top of the representation , we predict the labels using function fpre within function class Fpre ⊂ { Rr → Rk−1 } . To train the representation function and predictor in pre-training stage , we consider the Empirical Risk Minimization ( ERM ) procedure ĥ = arg min h∈H min fpre∈Fpre R̂pre ( f pre , h ) , arg min h∈H min fpre∈Fpre 1 n n∑ i=1 ` ( fpre ◦ h ( xprei ) , y pre i ) ( 1 ) where ` is the loss function . We overload the notation for both the pre-training task and the downstream task , i.e. , for pre-training , ` : Rk−1 × { 0 , 1 } k−1 → R and for the downstream task , ` : Rk′−1 × { 0 , 1 } k′−1 → R . e.g. , cross-entropy : ` ( ŷ ; y ) = −y > ŷ + log ( 1 + ∑k−1 s=1 exp ( ŷs ) ) . Now for the downstream task , we assume there arem samples { xdowni , ydowni } mi=1 . Note that xdowni ∈ X down ⊂ Rd is the input and ydowni ∈ { 0 , 1 } k ′−1 is the one-hot label for k′-class classification.4 2We assume only one pre-training task for the ease of presentation . It is straightforward to generalize our results to multiple pre-training tasks . 3Here we say only one word being masked only for the ease of presentation . It is straightforward to generalize our results to the case where multiple words are masked out . 4For simplicity , we assume we only have one downstream task . Our theoretical results still apply if we have multiple downstream tasks . Note that in most real-world applications , we have n m and k k′ . For example , in sentiment analysis , k′ = 2 ( “ positive ” or “ negative ” ) . A widely studied task SST-2 ( Wang et al. , 2019 ) has m ≈ 67K , which is also generally much smaller than the pre-training corpus ( e.g. , n > 100M samples ) . To train the classifier for the downstream task , we fix the representation function learned from the pretraining task and train the task-dependent predictor within function class Fdown ⊂ { Rr → Rk′−1 } : f̂down = arg min fdown∈Fdown R̂down ( f down , ĥ ) = arg min fdown∈Fdown 1 m m∑ i=1 ` ( fdown ◦ ĥ ( xdowni ) , ydowni ) . ( 2 ) Therefore , our predictor for the downstream task consists a pair ( f̂down , ĥ ) . We use the Transfer Learning Risk defined below to measure the performance Transfer Learning Risk , Rdown ( f̂down , ĥ ) − Exdown , ydown [ ` ( gdown ( xdown ) , ydown ) ] where Rdown ( f̂down , ĥ ) , Exdown , ydown [ ` ( f̂down ◦ ĥ ( xdown ) , ydown ) ] is the expected loss ( the expectation is over the distribution of the downstream task ) , and gdown = arg ming∈ { Rd→Rk′−1 } Exdown , ydown [ ` ( g ( xdown ) , ydown ) ] is the optimal predictor for the downstream task . In our analysis , we also need to use the following term to characterize the quality of pre-training Pre-training Risk = Rpre ( f̂pre , ĥ ) − Expre , ypre [ ` ( gpre ( xpre ) , ypre ) ] where Rpre ( f̂pre , ĥ ) , Expre , ypre [ ` ( f̂pre ◦ ĥ ( xpre ) , ypre ) ] is the expected loss , and gpre = arg ming∈ { Rd→Rk−1 } Expre , ypre [ ` ( g ( xpre ) , ypre ) ] is the optimal predictor for the pre-training task . Following the existing work on representation learning ( Maurer et al. , 2016 ; Du et al. , 2021 ; Tripuraneni et al. , 2020b ) , throughout the paper we make the following realizability assumption . Assumption 1 ( Realizability ) . There exist h ∈ H , fpre ∈ Fpre , fdown ∈ Fdown such that gpre = fpre ◦ h and gdown = fdown ◦ h. This assumption posits that the representation class and the task-dependent prediction classes are sufficiently expressive to contain the optimal functions . Importantly , the pre-training and downstream tasks share a common optimal representation function h. This assumption formalizes the intuition that pre-training learns a good representation that is also useful for downstream tasks . | This paper studies the question of why the pre-trained language model is effective on downstream NLP tasks. Through mathematical analysis, the authors conclude that the diversity of the model parameter matrix at the linear output layer in pre-training has a significant impact on the transfer capability in the sense that the larger the diversity parameter, the smaller the risk. Therefore, the authors explicitly add a diversity regularizer to the linear output layer to increase diversity to improve the effect of pre-training. | SP:9b2cdae7d6c6b43d26b82b01e9faf747e83a9114 |
The hidden label-marginal biases of segmentation losses | 1 INTRODUCTION . Semantic segmentation is one of the most investigated problems in computer vision , and has been impacting a breadth of applications , from natural-scene understanding ( Cordts et al. , 2016 ; Kirillov et al. , 2019 ) to medical image analysis ( Litjens et al. , 2017 ; Dolz et al. , 2018 ) . In the recent years , deep learning methods have dominated the field , as a result of the great capacity of Convolutional Neural Networks ( CNN ) ( He et al. , 2016 ) to automatically learn representations from large-scale data sets ( Long et al. , 2015 ; Ronneberger et al. , 2015 ; Zhao et al. , 2017 ; Chen et al. , 2018 ; Yuan et al. , 2020 ) . Semantic segmentation is often stated as a pixel-wise classification task , following the optimization of a loss function expressed with summations over the ground-truth regions , as in the standard Cross-Entropy ( CE ) loss . A relevant aspect of segmentation problems is class imbalance , i.e. , unequal proportions of the segmentation regions , which may cause large-region terms in the objective to completely dominate small-region ones . A representative example is the popular Cityscapes dataset ( Cordts et al. , 2016 ) , where the average proportions of some classes , such as motorcycle or bicycle , are below 1 % . In these scenarios , besides specifically designed CNN architectures or training schemes ( Tao et al. , 2020 ; Bao et al. , 2021 ) , the loss function to be minimized during learning plays a critical role , and has triggered a large body of research works in the last years ( Lin et al. , 2017 ; Wong et al. , 2018 ; Kervadec et al. , 2021b ; Milletari et al. , 2016 ; Sudre et al. , 2017 ; Kervadec et al. , 2021a ) . There exists a great diversity of loss functions for image segmentation , which can be categorized into two main families , and are arguably variants of CE , the Dice loss ( Ma et al. , 2021 ; Yeung et al. , 2021 ) , or combinations of both ( Wong et al. , 2018 ; Taghanaki et al. , 2019 ) . The first family is mo- tivated by distribution measures , i.e. , CE and its variants , and is directly adapted from classification tasks . To deal with class imbalance , various extensions of CE have been investigated , such as increasing the relative weights for minority classes ( Ronneberger et al. , 2015 ) , or modifying the loss so as to account for performance indicators during training , as in the popular Focal loss ( Lin et al. , 2017 ) or TopK loss ( Wu et al. , 2016 ) . The second main family of losses is inspired by geometrical metrics . In this category , the most popular losses are linear Dice ( Milletari et al. , 2016 ) and its extensions , such as the logarithmic ( Wong et al. , 2018 ) or generalized ( Sudre et al. , 2017 ) Dice loss . Borrowing the idea of the weighted CE , the latter introduces class weights to increase the contributions of the minority classes . These loss functions are motivated by the geometric Dice coefficient , which measures the overlap between the ground-truth and predicted segmentation regions . In the literature , to our knowledge , there is no clear consensus as to which category of losses is better , with the performances of each varying across data sets and applications . It has been empirically argued that the Dice loss and its variants are more appropriate for extreme class imbalance , and such empirical observations are the main motivation behind the wide use and popularity of Dice in medical-imaging applications ( Milletari et al. , 2016 ; Jha et al. , 2020 ) . CE , however , dominates most recent models in the context of natural images ( Chen et al. , 2018 ; Zhao et al. , 2017 ; 2018 ; Yuan et al. , 2020 ) . Therefore , beyond experimental evidence , there is a need for a theoretical analysis that clarifies which segmentation loss to adopt for a given task , a decision that affects performance significantly . On the surface , these two categories of losses ( i.e. , geometry-based vs. distribution-based ) seem unrelated . Furthermore , an important body of work in the literature suggests that CE and Dice are complementary , which has motivated composite losses integrating both , e.g. , ( Wong et al. , 2018 ; Taghanaki et al. , 2019 ) . Such composite losses perform very competitively in extremely imbalanced segmentation , as shown by ( Wong et al. , 2018 ; Taghanaki et al. , 2019 ) , among several other recent works ( Isensee et al. , 2018 ; Ma et al. , 2021 ) . In this paper , we provide a constrained-optimization perspective showing that , in fact , CE and Dice share a much deeper connection than previously thought : They both decompose into label-marginal penalties and closely related ground-truth matching penalties . Our theoretical analysis highlights encoded hidden label-marginal biases in Dice and CE , and shows that the main difference between the two types of losses lies essentially in those label-marginal biases : Dice has an intrinsic bias preferring very small regions , while CE implicitly encourages the right ( ground-truth ) region proportions . Our results explain the wide experimental evidence in the medical-imaging literature , whereby using or adding Dice losses brings improvements for imbalanced segmentation with extremely small regions . It also explains why CE dominates natural-image problems with diverse class proportions , in which case Dice might have difficulty adapting to different label-marginal distributions ( see Table 3 and the examples depicted in Fig . 1 ) . Based on our theoretical analysis , we propose principled and simple loss functions , which enable to control explicitly the label-marginal bias . Our solution integrates the benefits of both categories of losses , mitigating class imbalance but without losing generality , as shown in the examples in Fig . 1 . Our contributions are summarized as follows : • Showing through an explicit bound relationship ( Proposition 1 ) that the Dice loss has a hidden label-marginal bias towards specific extremely imbalanced solutions , preferring small structures , while losing the flexibility to deal effectively with arbitrary class proportions . • Providing an information-theoretic perspective of CE , via Monte-Carlo approximation of the entropy of the learned features ( Proposition 2 ) . This highlights a hidden label-marginal bias of CE , which encourages the proportions of the predicted segmentation regions to match the ground-truth proportions . • Introducing new loss functions to control label-marginal biases : Our losses integrate CE with explicit regularization terms based on L1 or the KL divergence , which encourage label marginals to match target class proportions . • Comprehensive experiments and ablation studies over different losses and applications , including natural and medical-imaging data , validate our theoretical analysis , as well as the effectiveness of our explicit label-marginal regularizers . 2 FORMULATION . Semantic segmentation is often stated as a pixel-wise classification task , following the optimization of a loss function for training a deep network . In Table 1 , we present the notations , formulations and approximations used in our subsequent discussions . Besides the basic notations of the task ( such as networks predictions ) , we explicitly include the loss functions , label-marginal regularizers and information-theoretic quantities that will be discussed in the following sections . We note that , to facilitate the reading of our analysis , we write the CE and Dice losses in a non-standard way using summations over the ground-truth segmentation regions , rather than as functions of the labels . Also , while we provide the CE loss for all segmentation regions , we give Dice for a single region . This is to accommodate two variants of the Dice loss in the literature : in the binary case , Dice is typically used for the foreground region only ( Milletari et al. , 2016 ) ; in the multi-region case , it is commonly used over all the regions ( Wong et al. , 2018 ) . Finally , to simplify notation , we give all the loss functions for a single training image , without summations over all training samples ( as this does not lead to any ambiguity , neither does it alter the analysis hereafter ) . In the training iterations , we use the mean values across all the training samples via standard mini-batch optimization . 2.1 DEFINITION OF LABEL-MARGINAL BIASES AND PENALTY FUNCTIONS . In the following , we analyse the label-marginal biases inherent to CE and Dice losses , and show that the main difference between the two types of losses lies essentially in those label-marginal biases . To do so , we provide a constrained-optimization perspective of the losses : We define a label-marginal bias as a soft penalty function for the hard equality constraint p = t , where t is a given ( fixed ) target distribution . Such a penalty encourages the predicted label-marginal p to match a given target distribution t. In the general context of constrained optimization , penalty functions are widely used ( Bertsekas , 1995 ) . In general , penalty methods replace equality constraints of the form p = t by adding a term g ( p ) to the main objective being minimized . Such a penalty function g increases when p deviates from target t. By definition , for the constraint p = t , with the domain of p being probability simplex ∆K , a penalty g ( p ) is a continuous and differentiable function , which reaches its global minimum when the constraint is satisfied , i.e. , it verifies : g ( t ) ≤ g ( p ) ∀p ∈ ∆K . 2.2 THE LINK BETWEEN CROSS ENTROPY AND DICE . To ease the discussion in what follows , we will start by analyzing the link between CE and the logarithmic Dice , along with the label-marginal bias of the latter ( Proposition 1 ) . Then , we discuss a bounding relationship between the different Dice variants . Finally , we will provide an informationtheoretic analysis , which highlights the hidden label-marginal bias of CE ( Proposition 2 ) . Let us consider the logarithmic Dice loss in the multi-class case . This loss decomposes ( up to a constant ) into two terms , a ground-truth matching term and a label-marginal bias : − K∑ k=1 log ( Dicek ) c = − K∑ k=1 log 1 |Ωk| ∑ i∈Ωk pik ︸ ︷︷ ︸ Ground-truth matching : DF + K∑ k=1 log ( p̂k + ŷk ) ︸ ︷︷ ︸ Label-marginal bias : DB ( 1 ) where c= stands for equality up to an additive and/or non-negative multiplicative constant . The ground-truth matching term in Eq . ( 1 ) is a lower bound on the cross-entropy loss ( CE ) due to Jensen ’ s inequality and the convexity of function − log ( x ) : DF ≤ CE . Therefore , minimizing CE could be viewed as a proxy for minimizing term DF that appears in the logarithmic Dice . In fact , from a constrained-optimization perspective , DF and CE are very closely related and could be viewed as two different penalty functions enforcing the same equality constraints : pik = 1 , ∀i ∈ Ωk , ∀k . Both DF and CE are monotonically decreasing functions of each softmax and reach their global minimum when these equality constraints are satisfied . Therefore , they encourage softmax predictions pik for each region Ωk to reach their target ground-truth values of 1 . Of course , this does not mean that penalties CE and DF yield exactly the same results . The difference in the results that they may yield is due to the optimization technique ( e.g. , different gradient dynamics in the standard training of deep networks as the penalty functions have different forms ) . | The paper presents an analysis of the cross-entropy (CE) and dice loss (DSC) for segmentation tasks, in terms of the label-marginal bias. According to the analysis, DSC prefers small regions, while CE encourages a prediction that has a similar proportion to the ground truth. Considering this analysis, the work proposes an alternative loss function consisting of the cross-entropy augmented with a regularization term (L1 or KL divergence) that operates on the prediction of the network. Different experiments compare the presented loss function of previous proposals. | SP:130edf4baadc68f66563e4f62d48075e1944b3af |
The hidden label-marginal biases of segmentation losses | 1 INTRODUCTION . Semantic segmentation is one of the most investigated problems in computer vision , and has been impacting a breadth of applications , from natural-scene understanding ( Cordts et al. , 2016 ; Kirillov et al. , 2019 ) to medical image analysis ( Litjens et al. , 2017 ; Dolz et al. , 2018 ) . In the recent years , deep learning methods have dominated the field , as a result of the great capacity of Convolutional Neural Networks ( CNN ) ( He et al. , 2016 ) to automatically learn representations from large-scale data sets ( Long et al. , 2015 ; Ronneberger et al. , 2015 ; Zhao et al. , 2017 ; Chen et al. , 2018 ; Yuan et al. , 2020 ) . Semantic segmentation is often stated as a pixel-wise classification task , following the optimization of a loss function expressed with summations over the ground-truth regions , as in the standard Cross-Entropy ( CE ) loss . A relevant aspect of segmentation problems is class imbalance , i.e. , unequal proportions of the segmentation regions , which may cause large-region terms in the objective to completely dominate small-region ones . A representative example is the popular Cityscapes dataset ( Cordts et al. , 2016 ) , where the average proportions of some classes , such as motorcycle or bicycle , are below 1 % . In these scenarios , besides specifically designed CNN architectures or training schemes ( Tao et al. , 2020 ; Bao et al. , 2021 ) , the loss function to be minimized during learning plays a critical role , and has triggered a large body of research works in the last years ( Lin et al. , 2017 ; Wong et al. , 2018 ; Kervadec et al. , 2021b ; Milletari et al. , 2016 ; Sudre et al. , 2017 ; Kervadec et al. , 2021a ) . There exists a great diversity of loss functions for image segmentation , which can be categorized into two main families , and are arguably variants of CE , the Dice loss ( Ma et al. , 2021 ; Yeung et al. , 2021 ) , or combinations of both ( Wong et al. , 2018 ; Taghanaki et al. , 2019 ) . The first family is mo- tivated by distribution measures , i.e. , CE and its variants , and is directly adapted from classification tasks . To deal with class imbalance , various extensions of CE have been investigated , such as increasing the relative weights for minority classes ( Ronneberger et al. , 2015 ) , or modifying the loss so as to account for performance indicators during training , as in the popular Focal loss ( Lin et al. , 2017 ) or TopK loss ( Wu et al. , 2016 ) . The second main family of losses is inspired by geometrical metrics . In this category , the most popular losses are linear Dice ( Milletari et al. , 2016 ) and its extensions , such as the logarithmic ( Wong et al. , 2018 ) or generalized ( Sudre et al. , 2017 ) Dice loss . Borrowing the idea of the weighted CE , the latter introduces class weights to increase the contributions of the minority classes . These loss functions are motivated by the geometric Dice coefficient , which measures the overlap between the ground-truth and predicted segmentation regions . In the literature , to our knowledge , there is no clear consensus as to which category of losses is better , with the performances of each varying across data sets and applications . It has been empirically argued that the Dice loss and its variants are more appropriate for extreme class imbalance , and such empirical observations are the main motivation behind the wide use and popularity of Dice in medical-imaging applications ( Milletari et al. , 2016 ; Jha et al. , 2020 ) . CE , however , dominates most recent models in the context of natural images ( Chen et al. , 2018 ; Zhao et al. , 2017 ; 2018 ; Yuan et al. , 2020 ) . Therefore , beyond experimental evidence , there is a need for a theoretical analysis that clarifies which segmentation loss to adopt for a given task , a decision that affects performance significantly . On the surface , these two categories of losses ( i.e. , geometry-based vs. distribution-based ) seem unrelated . Furthermore , an important body of work in the literature suggests that CE and Dice are complementary , which has motivated composite losses integrating both , e.g. , ( Wong et al. , 2018 ; Taghanaki et al. , 2019 ) . Such composite losses perform very competitively in extremely imbalanced segmentation , as shown by ( Wong et al. , 2018 ; Taghanaki et al. , 2019 ) , among several other recent works ( Isensee et al. , 2018 ; Ma et al. , 2021 ) . In this paper , we provide a constrained-optimization perspective showing that , in fact , CE and Dice share a much deeper connection than previously thought : They both decompose into label-marginal penalties and closely related ground-truth matching penalties . Our theoretical analysis highlights encoded hidden label-marginal biases in Dice and CE , and shows that the main difference between the two types of losses lies essentially in those label-marginal biases : Dice has an intrinsic bias preferring very small regions , while CE implicitly encourages the right ( ground-truth ) region proportions . Our results explain the wide experimental evidence in the medical-imaging literature , whereby using or adding Dice losses brings improvements for imbalanced segmentation with extremely small regions . It also explains why CE dominates natural-image problems with diverse class proportions , in which case Dice might have difficulty adapting to different label-marginal distributions ( see Table 3 and the examples depicted in Fig . 1 ) . Based on our theoretical analysis , we propose principled and simple loss functions , which enable to control explicitly the label-marginal bias . Our solution integrates the benefits of both categories of losses , mitigating class imbalance but without losing generality , as shown in the examples in Fig . 1 . Our contributions are summarized as follows : • Showing through an explicit bound relationship ( Proposition 1 ) that the Dice loss has a hidden label-marginal bias towards specific extremely imbalanced solutions , preferring small structures , while losing the flexibility to deal effectively with arbitrary class proportions . • Providing an information-theoretic perspective of CE , via Monte-Carlo approximation of the entropy of the learned features ( Proposition 2 ) . This highlights a hidden label-marginal bias of CE , which encourages the proportions of the predicted segmentation regions to match the ground-truth proportions . • Introducing new loss functions to control label-marginal biases : Our losses integrate CE with explicit regularization terms based on L1 or the KL divergence , which encourage label marginals to match target class proportions . • Comprehensive experiments and ablation studies over different losses and applications , including natural and medical-imaging data , validate our theoretical analysis , as well as the effectiveness of our explicit label-marginal regularizers . 2 FORMULATION . Semantic segmentation is often stated as a pixel-wise classification task , following the optimization of a loss function for training a deep network . In Table 1 , we present the notations , formulations and approximations used in our subsequent discussions . Besides the basic notations of the task ( such as networks predictions ) , we explicitly include the loss functions , label-marginal regularizers and information-theoretic quantities that will be discussed in the following sections . We note that , to facilitate the reading of our analysis , we write the CE and Dice losses in a non-standard way using summations over the ground-truth segmentation regions , rather than as functions of the labels . Also , while we provide the CE loss for all segmentation regions , we give Dice for a single region . This is to accommodate two variants of the Dice loss in the literature : in the binary case , Dice is typically used for the foreground region only ( Milletari et al. , 2016 ) ; in the multi-region case , it is commonly used over all the regions ( Wong et al. , 2018 ) . Finally , to simplify notation , we give all the loss functions for a single training image , without summations over all training samples ( as this does not lead to any ambiguity , neither does it alter the analysis hereafter ) . In the training iterations , we use the mean values across all the training samples via standard mini-batch optimization . 2.1 DEFINITION OF LABEL-MARGINAL BIASES AND PENALTY FUNCTIONS . In the following , we analyse the label-marginal biases inherent to CE and Dice losses , and show that the main difference between the two types of losses lies essentially in those label-marginal biases . To do so , we provide a constrained-optimization perspective of the losses : We define a label-marginal bias as a soft penalty function for the hard equality constraint p = t , where t is a given ( fixed ) target distribution . Such a penalty encourages the predicted label-marginal p to match a given target distribution t. In the general context of constrained optimization , penalty functions are widely used ( Bertsekas , 1995 ) . In general , penalty methods replace equality constraints of the form p = t by adding a term g ( p ) to the main objective being minimized . Such a penalty function g increases when p deviates from target t. By definition , for the constraint p = t , with the domain of p being probability simplex ∆K , a penalty g ( p ) is a continuous and differentiable function , which reaches its global minimum when the constraint is satisfied , i.e. , it verifies : g ( t ) ≤ g ( p ) ∀p ∈ ∆K . 2.2 THE LINK BETWEEN CROSS ENTROPY AND DICE . To ease the discussion in what follows , we will start by analyzing the link between CE and the logarithmic Dice , along with the label-marginal bias of the latter ( Proposition 1 ) . Then , we discuss a bounding relationship between the different Dice variants . Finally , we will provide an informationtheoretic analysis , which highlights the hidden label-marginal bias of CE ( Proposition 2 ) . Let us consider the logarithmic Dice loss in the multi-class case . This loss decomposes ( up to a constant ) into two terms , a ground-truth matching term and a label-marginal bias : − K∑ k=1 log ( Dicek ) c = − K∑ k=1 log 1 |Ωk| ∑ i∈Ωk pik ︸ ︷︷ ︸ Ground-truth matching : DF + K∑ k=1 log ( p̂k + ŷk ) ︸ ︷︷ ︸ Label-marginal bias : DB ( 1 ) where c= stands for equality up to an additive and/or non-negative multiplicative constant . The ground-truth matching term in Eq . ( 1 ) is a lower bound on the cross-entropy loss ( CE ) due to Jensen ’ s inequality and the convexity of function − log ( x ) : DF ≤ CE . Therefore , minimizing CE could be viewed as a proxy for minimizing term DF that appears in the logarithmic Dice . In fact , from a constrained-optimization perspective , DF and CE are very closely related and could be viewed as two different penalty functions enforcing the same equality constraints : pik = 1 , ∀i ∈ Ωk , ∀k . Both DF and CE are monotonically decreasing functions of each softmax and reach their global minimum when these equality constraints are satisfied . Therefore , they encourage softmax predictions pik for each region Ωk to reach their target ground-truth values of 1 . Of course , this does not mean that penalties CE and DF yield exactly the same results . The difference in the results that they may yield is due to the optimization technique ( e.g. , different gradient dynamics in the standard training of deep networks as the penalty functions have different forms ) . | This work presents a decomposition of two commonly used segmentation losses (cross entropy/CE and Dice losses) into two competing components. The two components are interpreted as ground truth matching and label-marginal penalties. This work argues that the label-marginal penalties in Dice loss favour extreme class imbalances, and hence their widespread use in medical imaging segmentation tasks which encounter class imbalance more commonly. The label marginal terms in CE is argued to be better as this term matches the label marginals to the ground truth distributions. The scaling between the two terms in CE is presented as the problem and this work proposes an L1 regularization to overcome the label bias problem in CE. Experiments on two segmentation tasks show interesting influence of these regularizations. | SP:130edf4baadc68f66563e4f62d48075e1944b3af |
The hidden label-marginal biases of segmentation losses | 1 INTRODUCTION . Semantic segmentation is one of the most investigated problems in computer vision , and has been impacting a breadth of applications , from natural-scene understanding ( Cordts et al. , 2016 ; Kirillov et al. , 2019 ) to medical image analysis ( Litjens et al. , 2017 ; Dolz et al. , 2018 ) . In the recent years , deep learning methods have dominated the field , as a result of the great capacity of Convolutional Neural Networks ( CNN ) ( He et al. , 2016 ) to automatically learn representations from large-scale data sets ( Long et al. , 2015 ; Ronneberger et al. , 2015 ; Zhao et al. , 2017 ; Chen et al. , 2018 ; Yuan et al. , 2020 ) . Semantic segmentation is often stated as a pixel-wise classification task , following the optimization of a loss function expressed with summations over the ground-truth regions , as in the standard Cross-Entropy ( CE ) loss . A relevant aspect of segmentation problems is class imbalance , i.e. , unequal proportions of the segmentation regions , which may cause large-region terms in the objective to completely dominate small-region ones . A representative example is the popular Cityscapes dataset ( Cordts et al. , 2016 ) , where the average proportions of some classes , such as motorcycle or bicycle , are below 1 % . In these scenarios , besides specifically designed CNN architectures or training schemes ( Tao et al. , 2020 ; Bao et al. , 2021 ) , the loss function to be minimized during learning plays a critical role , and has triggered a large body of research works in the last years ( Lin et al. , 2017 ; Wong et al. , 2018 ; Kervadec et al. , 2021b ; Milletari et al. , 2016 ; Sudre et al. , 2017 ; Kervadec et al. , 2021a ) . There exists a great diversity of loss functions for image segmentation , which can be categorized into two main families , and are arguably variants of CE , the Dice loss ( Ma et al. , 2021 ; Yeung et al. , 2021 ) , or combinations of both ( Wong et al. , 2018 ; Taghanaki et al. , 2019 ) . The first family is mo- tivated by distribution measures , i.e. , CE and its variants , and is directly adapted from classification tasks . To deal with class imbalance , various extensions of CE have been investigated , such as increasing the relative weights for minority classes ( Ronneberger et al. , 2015 ) , or modifying the loss so as to account for performance indicators during training , as in the popular Focal loss ( Lin et al. , 2017 ) or TopK loss ( Wu et al. , 2016 ) . The second main family of losses is inspired by geometrical metrics . In this category , the most popular losses are linear Dice ( Milletari et al. , 2016 ) and its extensions , such as the logarithmic ( Wong et al. , 2018 ) or generalized ( Sudre et al. , 2017 ) Dice loss . Borrowing the idea of the weighted CE , the latter introduces class weights to increase the contributions of the minority classes . These loss functions are motivated by the geometric Dice coefficient , which measures the overlap between the ground-truth and predicted segmentation regions . In the literature , to our knowledge , there is no clear consensus as to which category of losses is better , with the performances of each varying across data sets and applications . It has been empirically argued that the Dice loss and its variants are more appropriate for extreme class imbalance , and such empirical observations are the main motivation behind the wide use and popularity of Dice in medical-imaging applications ( Milletari et al. , 2016 ; Jha et al. , 2020 ) . CE , however , dominates most recent models in the context of natural images ( Chen et al. , 2018 ; Zhao et al. , 2017 ; 2018 ; Yuan et al. , 2020 ) . Therefore , beyond experimental evidence , there is a need for a theoretical analysis that clarifies which segmentation loss to adopt for a given task , a decision that affects performance significantly . On the surface , these two categories of losses ( i.e. , geometry-based vs. distribution-based ) seem unrelated . Furthermore , an important body of work in the literature suggests that CE and Dice are complementary , which has motivated composite losses integrating both , e.g. , ( Wong et al. , 2018 ; Taghanaki et al. , 2019 ) . Such composite losses perform very competitively in extremely imbalanced segmentation , as shown by ( Wong et al. , 2018 ; Taghanaki et al. , 2019 ) , among several other recent works ( Isensee et al. , 2018 ; Ma et al. , 2021 ) . In this paper , we provide a constrained-optimization perspective showing that , in fact , CE and Dice share a much deeper connection than previously thought : They both decompose into label-marginal penalties and closely related ground-truth matching penalties . Our theoretical analysis highlights encoded hidden label-marginal biases in Dice and CE , and shows that the main difference between the two types of losses lies essentially in those label-marginal biases : Dice has an intrinsic bias preferring very small regions , while CE implicitly encourages the right ( ground-truth ) region proportions . Our results explain the wide experimental evidence in the medical-imaging literature , whereby using or adding Dice losses brings improvements for imbalanced segmentation with extremely small regions . It also explains why CE dominates natural-image problems with diverse class proportions , in which case Dice might have difficulty adapting to different label-marginal distributions ( see Table 3 and the examples depicted in Fig . 1 ) . Based on our theoretical analysis , we propose principled and simple loss functions , which enable to control explicitly the label-marginal bias . Our solution integrates the benefits of both categories of losses , mitigating class imbalance but without losing generality , as shown in the examples in Fig . 1 . Our contributions are summarized as follows : • Showing through an explicit bound relationship ( Proposition 1 ) that the Dice loss has a hidden label-marginal bias towards specific extremely imbalanced solutions , preferring small structures , while losing the flexibility to deal effectively with arbitrary class proportions . • Providing an information-theoretic perspective of CE , via Monte-Carlo approximation of the entropy of the learned features ( Proposition 2 ) . This highlights a hidden label-marginal bias of CE , which encourages the proportions of the predicted segmentation regions to match the ground-truth proportions . • Introducing new loss functions to control label-marginal biases : Our losses integrate CE with explicit regularization terms based on L1 or the KL divergence , which encourage label marginals to match target class proportions . • Comprehensive experiments and ablation studies over different losses and applications , including natural and medical-imaging data , validate our theoretical analysis , as well as the effectiveness of our explicit label-marginal regularizers . 2 FORMULATION . Semantic segmentation is often stated as a pixel-wise classification task , following the optimization of a loss function for training a deep network . In Table 1 , we present the notations , formulations and approximations used in our subsequent discussions . Besides the basic notations of the task ( such as networks predictions ) , we explicitly include the loss functions , label-marginal regularizers and information-theoretic quantities that will be discussed in the following sections . We note that , to facilitate the reading of our analysis , we write the CE and Dice losses in a non-standard way using summations over the ground-truth segmentation regions , rather than as functions of the labels . Also , while we provide the CE loss for all segmentation regions , we give Dice for a single region . This is to accommodate two variants of the Dice loss in the literature : in the binary case , Dice is typically used for the foreground region only ( Milletari et al. , 2016 ) ; in the multi-region case , it is commonly used over all the regions ( Wong et al. , 2018 ) . Finally , to simplify notation , we give all the loss functions for a single training image , without summations over all training samples ( as this does not lead to any ambiguity , neither does it alter the analysis hereafter ) . In the training iterations , we use the mean values across all the training samples via standard mini-batch optimization . 2.1 DEFINITION OF LABEL-MARGINAL BIASES AND PENALTY FUNCTIONS . In the following , we analyse the label-marginal biases inherent to CE and Dice losses , and show that the main difference between the two types of losses lies essentially in those label-marginal biases . To do so , we provide a constrained-optimization perspective of the losses : We define a label-marginal bias as a soft penalty function for the hard equality constraint p = t , where t is a given ( fixed ) target distribution . Such a penalty encourages the predicted label-marginal p to match a given target distribution t. In the general context of constrained optimization , penalty functions are widely used ( Bertsekas , 1995 ) . In general , penalty methods replace equality constraints of the form p = t by adding a term g ( p ) to the main objective being minimized . Such a penalty function g increases when p deviates from target t. By definition , for the constraint p = t , with the domain of p being probability simplex ∆K , a penalty g ( p ) is a continuous and differentiable function , which reaches its global minimum when the constraint is satisfied , i.e. , it verifies : g ( t ) ≤ g ( p ) ∀p ∈ ∆K . 2.2 THE LINK BETWEEN CROSS ENTROPY AND DICE . To ease the discussion in what follows , we will start by analyzing the link between CE and the logarithmic Dice , along with the label-marginal bias of the latter ( Proposition 1 ) . Then , we discuss a bounding relationship between the different Dice variants . Finally , we will provide an informationtheoretic analysis , which highlights the hidden label-marginal bias of CE ( Proposition 2 ) . Let us consider the logarithmic Dice loss in the multi-class case . This loss decomposes ( up to a constant ) into two terms , a ground-truth matching term and a label-marginal bias : − K∑ k=1 log ( Dicek ) c = − K∑ k=1 log 1 |Ωk| ∑ i∈Ωk pik ︸ ︷︷ ︸ Ground-truth matching : DF + K∑ k=1 log ( p̂k + ŷk ) ︸ ︷︷ ︸ Label-marginal bias : DB ( 1 ) where c= stands for equality up to an additive and/or non-negative multiplicative constant . The ground-truth matching term in Eq . ( 1 ) is a lower bound on the cross-entropy loss ( CE ) due to Jensen ’ s inequality and the convexity of function − log ( x ) : DF ≤ CE . Therefore , minimizing CE could be viewed as a proxy for minimizing term DF that appears in the logarithmic Dice . In fact , from a constrained-optimization perspective , DF and CE are very closely related and could be viewed as two different penalty functions enforcing the same equality constraints : pik = 1 , ∀i ∈ Ωk , ∀k . Both DF and CE are monotonically decreasing functions of each softmax and reach their global minimum when these equality constraints are satisfied . Therefore , they encourage softmax predictions pik for each region Ωk to reach their target ground-truth values of 1 . Of course , this does not mean that penalties CE and DF yield exactly the same results . The difference in the results that they may yield is due to the optimization technique ( e.g. , different gradient dynamics in the standard training of deep networks as the penalty functions have different forms ) . | This paper proposed theoretical analysis showing Dice loss has a bias preferring small structures, while losing flexibility of dealing with arbitrary class proportions. On the hand hand, the cross-entropy loss encourages proportions of the predicted segmentation to match the ground-truth proportions. A new loss function to control the label-marginal biases was proposed as sum of CE and weighted L1/KL divergence regularization. | SP:130edf4baadc68f66563e4f62d48075e1944b3af |
BWCP: Probabilistic Learning-to-Prune Channels for ConvNets via Batch Whitening | This work presents a probabilistic channel pruning method to accelerate Convolutional Neural Networks ( CNNs ) . Previous pruning methods often zero out unimportant channels in training in a deterministic manner , which reduces CNN ’ s learning capacity and results in suboptimal performance . To address this problem , we develop a probability-based pruning algorithm , called batch whitening channel pruning ( BWCP ) , which can stochastically discard unimportant channels by modeling the probability of a channel being activated . BWCP has several merits . ( 1 ) It simultaneously trains and prunes CNNs from scratch in a probabilistic way , exploring larger network space than deterministic methods . ( 2 ) BWCP is empowered by the proposed batch whitening tool , which is able to empirically and theoretically increase the activation probability of useful channels while keeping unimportant channels unchanged without adding any extra parameters and computational cost in inference . ( 3 ) Extensive experiments on CIFAR-10 , CIFAR-100 , and ImageNet with various network architectures show that BWCP outperforms its counterparts by achieving better accuracy given limited computational budgets . For example , ResNet50 pruned by BWCP has only 0.58 % Top-1 accuracy drop on ImageNet , while reducing 42.9 % FLOPs of the plain ResNet50 . 1 INTRODUCTION . Deep convolutional neural networks ( CNNs ) have achieved superior performance in a variety of computer vision tasks such as image recognition ( He et al. , 2016 ) , object detection ( Ren et al. , 2017 ) , and semantic segmentation ( Chen et al. , 2018 ) . However , despite their great success , deep CNN models often have massive demand on storage , memory bandwidth , and computational power ( Han & Dally , 2018 ) , making them difficult to be plugged onto resource-limited platforms , such as portable and mobile devices ( Deng et al. , 2020 ) . Therefore , proposing efficient and effective model compression methods has become a hot research topic in the deep learning community . Model pruning , as one of the vital model compression techniques , has been extensively investigated . It reduces model size and computational cost by removing unnecessary or unimportant weights or channels in a CNN ( Han et al. , 2016 ) . For example , many recent works ( Wen et al. , 2016 ; Guo et al. , 2016 ) prune fine-grained weights of filters . Han et al . ( 2015 ) proposes to discard the weights that have magnitude less than a predefined threshold . Guo et al . ( 2016 ) further utilizes a sparse mask on a weight basis to achieve pruning . Although these unstructured pruning methods achieve optimal pruning schedule , they do not take the structure of CNNs into account , preventing them from being accelerated on hardware such as GPU for parallel computations ( Liu et al. , 2018 ) . To achieve efficient model storage and computations , we focus on structured channel pruning ( Wen et al. , 2016 ; Yang et al. , 2019a ; Liu et al. , 2017 ) , which removes entire structures in a CNN such as filter or channel . A typical structured channel pruning approach commonly contains three stages , including pre-training a full model , pruning unimportant channels by the predefined criteria such as ` p norm , and fine-tuning the pruned model ( Liu et al. , 2017 ; Luo et al. , 2017 ) , as shown in Fig.1 ( a ) . However , it is usually hard to find a global pruning threshold to select unimportant channels , because the norm deviation between channels is often too small ( He et al. , 2019 ) . More importantly , as some channels are permanently zeroed out in the pruning stage , such a multi-stage procedure usually not only relies on hand-crafted heuristics but also limits the learning capacity ( He et al. , 2018a ; 2019 ) . To tackle the above issues , we propose a simple but effective probability-based channel pruning framework , named batch-whitening channel pruning ( BWCP ) , where unimportant channels are pruned in a stochastic manner , thus preserving the channel space of CNNs in training ( i.e . the diversity of CNN architectures is preserved ) . To be specific , as shown in Fig.1 ( b ) , we assign each channel with an activation probability ( i.e . the probability of a channel being activated ) , by exploring the properties of the batch normalization layer ( Ioffe & Szegedy , 2015 ; Arpit et al. , 2016 ) . A larger activation probability indicates that the corresponding channel is more likely to be preserved . We also introduce a capable tool , termed batch whitening ( BW ) , which can increase the activation probability of useful channels , while keeping the unnecessary channels unchanged . By doing so , the deviation of the activation probability between channels is explicitly enlarged , enabling BWCP to identify unimportant channels during training easily . Such an appealing property is justified by theoretical analysis and experiments . Furthermore , we exploit activation probability adjusted by BW to generate a set of differentiable masks by a soft sampling procedure with Gumbel-Softmax technique , allowing us to train BWCP in an online “ pruning-from-scratch ” fashion stably . After training , we obtain the final compact model by directly discarding the channels with zero masks . The main contributions of this work are three-fold . ( 1 ) We propose a probability-based channel pruning framework BWCP , which explores a larger network space than deterministic methods . ( 2 ) BWCP can easily identify unimportant channels by adjusting their activation probabilities without adding any extra model parameters and computational cost in inference . ( 3 ) Extensive experiments on CIFAR-10 , CIFAR-100 and ImageNet datasets with various network architectures show that BWCP can achieve better recognition performance given the comparable amount of resources compared to existing approaches . For example , BWCP can reduce 68.08 % Flops by compressing 93.12 % parameters of VGG-16 with merely accuracy drop and ResNet-50 pruned by BWCP has only 0.58 % top-1 accuracy drop on ImageNet while reducing 42.9 % FLOPs . 2 RELATED WORK . Weight Pruning . Early network pruning methods mainly remove the unimportant weights in the network . For instance , Optimal Brain Damage ( LeCun et al. , 1990 ) measures the importance of weights by evaluating the impact of weight on the loss function and prunes less important ones . However , it is not applicable in modern network structure due to the heavy computation of the Hessian matrix . Recent work assesses the importance of the weights through the magnitude of the weights itself . Specifically , ( Guo et al. , 2016 ) prune the network by encouraging weights to become exactly zero . The computation involves weights with zero can be discarded . However , a major drawback of weight pruning techniques is that they do not take the structure of CNNs into account , thus failing to help scale pruned models on commodity hardware such as GPUs ( Liu et al. , 2018 ; Wen et al. , 2016 ) . Channel Pruning . Channel pruning approaches directly prune feature maps or filters of CNNs , making it easy for hardware-friendly implementation . For instance , relaxed ` 0 regularization ( Louizos et al. , 2017 ) and group regularizer ( Yang et al. , 2019a ) impose channel-level sparsity , and filters with small value are selected to be pruned . Some recent work also propose to rank the importance of filters by different criteria including ` 1 norm ( Liu et al. , 2017 ; Li et al. , 2017 ) , ` 2 norm ( Frankle & Carbin , 2018 ) and High Rank channels ( Lin et al. , 2020 ) . For example , ( Liu et al. , 2017 ) explores the importance of filters through scale parameter γ in batch normalization . Although these approaches introduce minimum overhead to the training process , they are not trained in an end-to-end manner and usually either apply on a pre-trained model or require an extra fine-tuning procedure . Recent works tackle this issue by pruning CNNs from scratch . For example , FPGM ( He et al. , 2019 ) zeros in unimportant channels and continues training them after each training epoch . Furthermore , both SSS and DSA learn a differentiable binary mask that is generated by channel importance and does not require any additional fine-tuning . Our proposed BWCP is most related to variational pruning ( Zhao et al. , 2019 ) and SCP ( Kang & Han , 2020 ) as they also employ the property of normalization layer and associate the importance of channel with probability . The main difference is that our method adopts the idea of whitening to perform channel pruning . We will show that the proposed batch whitening ( BW ) technique can adjusts the activation probability of different channels according to their importance , making it easy to identify unimportant channels . Although previous work SPP ( Wang et al. , 2017 ) and DynamicCP ( Gao et al. , 2018 ) also attempt to boost salient channels and skip unimportant ones , they fail to consider the natural property inside normalization layer and deign the activation probability empirically . 3 PRELIMINARY . Notation . We use regular letters , bold letters , and capital letters to denote scalars such as ‘ x ’ , and vectors ( e.g.vector , matrix , and tensor ) such as ‘ x ’ and random variables such as ‘ X ’ , respectively . We begin with introducing a building layer in recent deep neural nets which typically consists of a convolution layer , a batch normalization ( BN ) layer , and a rectified linear unit ( ReLU ) ( Ioffe & Szegedy , 2015 ; He et al. , 2016 ) . Formally , it can be written by xc = wc ∗ z , x̃c = γcx̄c + βc , yc = max { 0 , x̃c } ( 1 ) where c ∈ [ C ] denotes channel index and C is channel size . In Eqn . ( 1 ) , ‘ ∗ ’ indicates convolution operation and wc is filter weight corresponding to the c-th output channel , i.e . xc ∈ RN×H×W . To perform normalization , xc is firstly standardized to x̄c through x̄c = ( xc − E [ xc ] ) / √ D [ xc ] where E [ · ] and D [ · ] indicate calculating mean and variance over a batch of samples , and then is re-scaled to x̃c by scale parameter γc and bias βc . Moreover , the output feature yc is obtained by ReLU activation that discards the negative part of x̃c . Criterion-based channel pruning . For channel pruning , previous methods usually employ a ‘ smallnorm-less-important ’ criterion to measure the importance of channels . For example , BN layer can be applied in channel pruning ( Liu et al. , 2017 ) , where a channel with a small value of γc would be removed . The reason is that the c-th output channel x̃c contributes little to the learned feature representation when γc is small . Hence , the convolution in Eqn . ( 1 ) can be discarded safely , and filter wc can thus be pruned . Unlike these criterion-based methods that deterministically prune unimportant filters and rely on a heuristic pruning procedure as shown in Fig.1 ( a ) , we explore a probability-based channel pruning framework where less important channels are pruned in a stochastic manner . Activation probability . To this end , we define an activation probability of a channel by exploring the property of the BN layer . Those channels with a larger activation probability could be preserved with a higher probability . To be specific , since x̄c is acquired by subtracting the sample mean and being divided by the sample variance , we can treat each channel feature as a random variable following standard Normal distribution ( Arpit et al. , 2016 ) , denoted as X̄c . Note that only positive parts can be activated by ReLU function . Proposition 1 gives the activation probability of the c-th channel , i.e.P ( X̃c ) > 0 . Proposition 1 Let a random variable X̄c ∼ N ( 0 , 1 ) and Yc = max { 0 , γcX̄c + βc } . Then we have ( 1 ) P ( Yc > 0 ) = P ( X̃c > 0 ) = ( 1 + Erf ( βc/ ( √ 2|γc| ) ) /2 where Erf ( x ) = ∫ x 0 2/ √ π · exp−t2dt , and ( 2 ) P ( X̃c > 0 ) = 0⇔ βc ≤ 0 and γc → 0 . Note that a pruned channel can be modelled by P ( X̃c > 0 ) = 0 . With Proposition 1 ( see proof in Appendix A.2 ) , we know that the unnecessary channels satisfy that γc approaches 0 and βc is negative . To achieve channel pruning , previous compression techniques ( Li et al. , 2017 ; Zhao et al. , 2019 ) merely impose a regularization on γc , which would deteriorate the representation power of unpruned channels ( Perez et al. , 2018 ; Wang et al. , 2020 ) . Instead , we adopt the idea of whitening to build a probabilistic channel pruning framework where unnecessary channels are stochastically disgarded with a small activation probability while important channels are preserved with a large activation probability . | This paper presents a probabilistic channel pruning method (BWCP) for accelerating CNNs. The key newly proposed technique is “batch whitening”. They evaluate their method on CIFAR-10/100 and ImageNet compared to other recent filter pruning methods. | SP:24dea93ae1c868dd368e7c642b6664666d01004d |
BWCP: Probabilistic Learning-to-Prune Channels for ConvNets via Batch Whitening | This work presents a probabilistic channel pruning method to accelerate Convolutional Neural Networks ( CNNs ) . Previous pruning methods often zero out unimportant channels in training in a deterministic manner , which reduces CNN ’ s learning capacity and results in suboptimal performance . To address this problem , we develop a probability-based pruning algorithm , called batch whitening channel pruning ( BWCP ) , which can stochastically discard unimportant channels by modeling the probability of a channel being activated . BWCP has several merits . ( 1 ) It simultaneously trains and prunes CNNs from scratch in a probabilistic way , exploring larger network space than deterministic methods . ( 2 ) BWCP is empowered by the proposed batch whitening tool , which is able to empirically and theoretically increase the activation probability of useful channels while keeping unimportant channels unchanged without adding any extra parameters and computational cost in inference . ( 3 ) Extensive experiments on CIFAR-10 , CIFAR-100 , and ImageNet with various network architectures show that BWCP outperforms its counterparts by achieving better accuracy given limited computational budgets . For example , ResNet50 pruned by BWCP has only 0.58 % Top-1 accuracy drop on ImageNet , while reducing 42.9 % FLOPs of the plain ResNet50 . 1 INTRODUCTION . Deep convolutional neural networks ( CNNs ) have achieved superior performance in a variety of computer vision tasks such as image recognition ( He et al. , 2016 ) , object detection ( Ren et al. , 2017 ) , and semantic segmentation ( Chen et al. , 2018 ) . However , despite their great success , deep CNN models often have massive demand on storage , memory bandwidth , and computational power ( Han & Dally , 2018 ) , making them difficult to be plugged onto resource-limited platforms , such as portable and mobile devices ( Deng et al. , 2020 ) . Therefore , proposing efficient and effective model compression methods has become a hot research topic in the deep learning community . Model pruning , as one of the vital model compression techniques , has been extensively investigated . It reduces model size and computational cost by removing unnecessary or unimportant weights or channels in a CNN ( Han et al. , 2016 ) . For example , many recent works ( Wen et al. , 2016 ; Guo et al. , 2016 ) prune fine-grained weights of filters . Han et al . ( 2015 ) proposes to discard the weights that have magnitude less than a predefined threshold . Guo et al . ( 2016 ) further utilizes a sparse mask on a weight basis to achieve pruning . Although these unstructured pruning methods achieve optimal pruning schedule , they do not take the structure of CNNs into account , preventing them from being accelerated on hardware such as GPU for parallel computations ( Liu et al. , 2018 ) . To achieve efficient model storage and computations , we focus on structured channel pruning ( Wen et al. , 2016 ; Yang et al. , 2019a ; Liu et al. , 2017 ) , which removes entire structures in a CNN such as filter or channel . A typical structured channel pruning approach commonly contains three stages , including pre-training a full model , pruning unimportant channels by the predefined criteria such as ` p norm , and fine-tuning the pruned model ( Liu et al. , 2017 ; Luo et al. , 2017 ) , as shown in Fig.1 ( a ) . However , it is usually hard to find a global pruning threshold to select unimportant channels , because the norm deviation between channels is often too small ( He et al. , 2019 ) . More importantly , as some channels are permanently zeroed out in the pruning stage , such a multi-stage procedure usually not only relies on hand-crafted heuristics but also limits the learning capacity ( He et al. , 2018a ; 2019 ) . To tackle the above issues , we propose a simple but effective probability-based channel pruning framework , named batch-whitening channel pruning ( BWCP ) , where unimportant channels are pruned in a stochastic manner , thus preserving the channel space of CNNs in training ( i.e . the diversity of CNN architectures is preserved ) . To be specific , as shown in Fig.1 ( b ) , we assign each channel with an activation probability ( i.e . the probability of a channel being activated ) , by exploring the properties of the batch normalization layer ( Ioffe & Szegedy , 2015 ; Arpit et al. , 2016 ) . A larger activation probability indicates that the corresponding channel is more likely to be preserved . We also introduce a capable tool , termed batch whitening ( BW ) , which can increase the activation probability of useful channels , while keeping the unnecessary channels unchanged . By doing so , the deviation of the activation probability between channels is explicitly enlarged , enabling BWCP to identify unimportant channels during training easily . Such an appealing property is justified by theoretical analysis and experiments . Furthermore , we exploit activation probability adjusted by BW to generate a set of differentiable masks by a soft sampling procedure with Gumbel-Softmax technique , allowing us to train BWCP in an online “ pruning-from-scratch ” fashion stably . After training , we obtain the final compact model by directly discarding the channels with zero masks . The main contributions of this work are three-fold . ( 1 ) We propose a probability-based channel pruning framework BWCP , which explores a larger network space than deterministic methods . ( 2 ) BWCP can easily identify unimportant channels by adjusting their activation probabilities without adding any extra model parameters and computational cost in inference . ( 3 ) Extensive experiments on CIFAR-10 , CIFAR-100 and ImageNet datasets with various network architectures show that BWCP can achieve better recognition performance given the comparable amount of resources compared to existing approaches . For example , BWCP can reduce 68.08 % Flops by compressing 93.12 % parameters of VGG-16 with merely accuracy drop and ResNet-50 pruned by BWCP has only 0.58 % top-1 accuracy drop on ImageNet while reducing 42.9 % FLOPs . 2 RELATED WORK . Weight Pruning . Early network pruning methods mainly remove the unimportant weights in the network . For instance , Optimal Brain Damage ( LeCun et al. , 1990 ) measures the importance of weights by evaluating the impact of weight on the loss function and prunes less important ones . However , it is not applicable in modern network structure due to the heavy computation of the Hessian matrix . Recent work assesses the importance of the weights through the magnitude of the weights itself . Specifically , ( Guo et al. , 2016 ) prune the network by encouraging weights to become exactly zero . The computation involves weights with zero can be discarded . However , a major drawback of weight pruning techniques is that they do not take the structure of CNNs into account , thus failing to help scale pruned models on commodity hardware such as GPUs ( Liu et al. , 2018 ; Wen et al. , 2016 ) . Channel Pruning . Channel pruning approaches directly prune feature maps or filters of CNNs , making it easy for hardware-friendly implementation . For instance , relaxed ` 0 regularization ( Louizos et al. , 2017 ) and group regularizer ( Yang et al. , 2019a ) impose channel-level sparsity , and filters with small value are selected to be pruned . Some recent work also propose to rank the importance of filters by different criteria including ` 1 norm ( Liu et al. , 2017 ; Li et al. , 2017 ) , ` 2 norm ( Frankle & Carbin , 2018 ) and High Rank channels ( Lin et al. , 2020 ) . For example , ( Liu et al. , 2017 ) explores the importance of filters through scale parameter γ in batch normalization . Although these approaches introduce minimum overhead to the training process , they are not trained in an end-to-end manner and usually either apply on a pre-trained model or require an extra fine-tuning procedure . Recent works tackle this issue by pruning CNNs from scratch . For example , FPGM ( He et al. , 2019 ) zeros in unimportant channels and continues training them after each training epoch . Furthermore , both SSS and DSA learn a differentiable binary mask that is generated by channel importance and does not require any additional fine-tuning . Our proposed BWCP is most related to variational pruning ( Zhao et al. , 2019 ) and SCP ( Kang & Han , 2020 ) as they also employ the property of normalization layer and associate the importance of channel with probability . The main difference is that our method adopts the idea of whitening to perform channel pruning . We will show that the proposed batch whitening ( BW ) technique can adjusts the activation probability of different channels according to their importance , making it easy to identify unimportant channels . Although previous work SPP ( Wang et al. , 2017 ) and DynamicCP ( Gao et al. , 2018 ) also attempt to boost salient channels and skip unimportant ones , they fail to consider the natural property inside normalization layer and deign the activation probability empirically . 3 PRELIMINARY . Notation . We use regular letters , bold letters , and capital letters to denote scalars such as ‘ x ’ , and vectors ( e.g.vector , matrix , and tensor ) such as ‘ x ’ and random variables such as ‘ X ’ , respectively . We begin with introducing a building layer in recent deep neural nets which typically consists of a convolution layer , a batch normalization ( BN ) layer , and a rectified linear unit ( ReLU ) ( Ioffe & Szegedy , 2015 ; He et al. , 2016 ) . Formally , it can be written by xc = wc ∗ z , x̃c = γcx̄c + βc , yc = max { 0 , x̃c } ( 1 ) where c ∈ [ C ] denotes channel index and C is channel size . In Eqn . ( 1 ) , ‘ ∗ ’ indicates convolution operation and wc is filter weight corresponding to the c-th output channel , i.e . xc ∈ RN×H×W . To perform normalization , xc is firstly standardized to x̄c through x̄c = ( xc − E [ xc ] ) / √ D [ xc ] where E [ · ] and D [ · ] indicate calculating mean and variance over a batch of samples , and then is re-scaled to x̃c by scale parameter γc and bias βc . Moreover , the output feature yc is obtained by ReLU activation that discards the negative part of x̃c . Criterion-based channel pruning . For channel pruning , previous methods usually employ a ‘ smallnorm-less-important ’ criterion to measure the importance of channels . For example , BN layer can be applied in channel pruning ( Liu et al. , 2017 ) , where a channel with a small value of γc would be removed . The reason is that the c-th output channel x̃c contributes little to the learned feature representation when γc is small . Hence , the convolution in Eqn . ( 1 ) can be discarded safely , and filter wc can thus be pruned . Unlike these criterion-based methods that deterministically prune unimportant filters and rely on a heuristic pruning procedure as shown in Fig.1 ( a ) , we explore a probability-based channel pruning framework where less important channels are pruned in a stochastic manner . Activation probability . To this end , we define an activation probability of a channel by exploring the property of the BN layer . Those channels with a larger activation probability could be preserved with a higher probability . To be specific , since x̄c is acquired by subtracting the sample mean and being divided by the sample variance , we can treat each channel feature as a random variable following standard Normal distribution ( Arpit et al. , 2016 ) , denoted as X̄c . Note that only positive parts can be activated by ReLU function . Proposition 1 gives the activation probability of the c-th channel , i.e.P ( X̃c ) > 0 . Proposition 1 Let a random variable X̄c ∼ N ( 0 , 1 ) and Yc = max { 0 , γcX̄c + βc } . Then we have ( 1 ) P ( Yc > 0 ) = P ( X̃c > 0 ) = ( 1 + Erf ( βc/ ( √ 2|γc| ) ) /2 where Erf ( x ) = ∫ x 0 2/ √ π · exp−t2dt , and ( 2 ) P ( X̃c > 0 ) = 0⇔ βc ≤ 0 and γc → 0 . Note that a pruned channel can be modelled by P ( X̃c > 0 ) = 0 . With Proposition 1 ( see proof in Appendix A.2 ) , we know that the unnecessary channels satisfy that γc approaches 0 and βc is negative . To achieve channel pruning , previous compression techniques ( Li et al. , 2017 ; Zhao et al. , 2019 ) merely impose a regularization on γc , which would deteriorate the representation power of unpruned channels ( Perez et al. , 2018 ; Wang et al. , 2020 ) . Instead , we adopt the idea of whitening to build a probabilistic channel pruning framework where unnecessary channels are stochastically disgarded with a small activation probability while important channels are preserved with a large activation probability . | In this paper, authors propose to compress convolutional layers via batch whitening channel pruning (BWCP). By apply batch whitening on incoming feature maps, unimportant channels are automatically identified and stochastically discarded during the training process. A sigmoid-like transformation is used to push activation probabilities to either 0 or 1, so that additional fine-tuning is not needed, unlike many other channel pruning methods. | SP:24dea93ae1c868dd368e7c642b6664666d01004d |
BWCP: Probabilistic Learning-to-Prune Channels for ConvNets via Batch Whitening | This work presents a probabilistic channel pruning method to accelerate Convolutional Neural Networks ( CNNs ) . Previous pruning methods often zero out unimportant channels in training in a deterministic manner , which reduces CNN ’ s learning capacity and results in suboptimal performance . To address this problem , we develop a probability-based pruning algorithm , called batch whitening channel pruning ( BWCP ) , which can stochastically discard unimportant channels by modeling the probability of a channel being activated . BWCP has several merits . ( 1 ) It simultaneously trains and prunes CNNs from scratch in a probabilistic way , exploring larger network space than deterministic methods . ( 2 ) BWCP is empowered by the proposed batch whitening tool , which is able to empirically and theoretically increase the activation probability of useful channels while keeping unimportant channels unchanged without adding any extra parameters and computational cost in inference . ( 3 ) Extensive experiments on CIFAR-10 , CIFAR-100 , and ImageNet with various network architectures show that BWCP outperforms its counterparts by achieving better accuracy given limited computational budgets . For example , ResNet50 pruned by BWCP has only 0.58 % Top-1 accuracy drop on ImageNet , while reducing 42.9 % FLOPs of the plain ResNet50 . 1 INTRODUCTION . Deep convolutional neural networks ( CNNs ) have achieved superior performance in a variety of computer vision tasks such as image recognition ( He et al. , 2016 ) , object detection ( Ren et al. , 2017 ) , and semantic segmentation ( Chen et al. , 2018 ) . However , despite their great success , deep CNN models often have massive demand on storage , memory bandwidth , and computational power ( Han & Dally , 2018 ) , making them difficult to be plugged onto resource-limited platforms , such as portable and mobile devices ( Deng et al. , 2020 ) . Therefore , proposing efficient and effective model compression methods has become a hot research topic in the deep learning community . Model pruning , as one of the vital model compression techniques , has been extensively investigated . It reduces model size and computational cost by removing unnecessary or unimportant weights or channels in a CNN ( Han et al. , 2016 ) . For example , many recent works ( Wen et al. , 2016 ; Guo et al. , 2016 ) prune fine-grained weights of filters . Han et al . ( 2015 ) proposes to discard the weights that have magnitude less than a predefined threshold . Guo et al . ( 2016 ) further utilizes a sparse mask on a weight basis to achieve pruning . Although these unstructured pruning methods achieve optimal pruning schedule , they do not take the structure of CNNs into account , preventing them from being accelerated on hardware such as GPU for parallel computations ( Liu et al. , 2018 ) . To achieve efficient model storage and computations , we focus on structured channel pruning ( Wen et al. , 2016 ; Yang et al. , 2019a ; Liu et al. , 2017 ) , which removes entire structures in a CNN such as filter or channel . A typical structured channel pruning approach commonly contains three stages , including pre-training a full model , pruning unimportant channels by the predefined criteria such as ` p norm , and fine-tuning the pruned model ( Liu et al. , 2017 ; Luo et al. , 2017 ) , as shown in Fig.1 ( a ) . However , it is usually hard to find a global pruning threshold to select unimportant channels , because the norm deviation between channels is often too small ( He et al. , 2019 ) . More importantly , as some channels are permanently zeroed out in the pruning stage , such a multi-stage procedure usually not only relies on hand-crafted heuristics but also limits the learning capacity ( He et al. , 2018a ; 2019 ) . To tackle the above issues , we propose a simple but effective probability-based channel pruning framework , named batch-whitening channel pruning ( BWCP ) , where unimportant channels are pruned in a stochastic manner , thus preserving the channel space of CNNs in training ( i.e . the diversity of CNN architectures is preserved ) . To be specific , as shown in Fig.1 ( b ) , we assign each channel with an activation probability ( i.e . the probability of a channel being activated ) , by exploring the properties of the batch normalization layer ( Ioffe & Szegedy , 2015 ; Arpit et al. , 2016 ) . A larger activation probability indicates that the corresponding channel is more likely to be preserved . We also introduce a capable tool , termed batch whitening ( BW ) , which can increase the activation probability of useful channels , while keeping the unnecessary channels unchanged . By doing so , the deviation of the activation probability between channels is explicitly enlarged , enabling BWCP to identify unimportant channels during training easily . Such an appealing property is justified by theoretical analysis and experiments . Furthermore , we exploit activation probability adjusted by BW to generate a set of differentiable masks by a soft sampling procedure with Gumbel-Softmax technique , allowing us to train BWCP in an online “ pruning-from-scratch ” fashion stably . After training , we obtain the final compact model by directly discarding the channels with zero masks . The main contributions of this work are three-fold . ( 1 ) We propose a probability-based channel pruning framework BWCP , which explores a larger network space than deterministic methods . ( 2 ) BWCP can easily identify unimportant channels by adjusting their activation probabilities without adding any extra model parameters and computational cost in inference . ( 3 ) Extensive experiments on CIFAR-10 , CIFAR-100 and ImageNet datasets with various network architectures show that BWCP can achieve better recognition performance given the comparable amount of resources compared to existing approaches . For example , BWCP can reduce 68.08 % Flops by compressing 93.12 % parameters of VGG-16 with merely accuracy drop and ResNet-50 pruned by BWCP has only 0.58 % top-1 accuracy drop on ImageNet while reducing 42.9 % FLOPs . 2 RELATED WORK . Weight Pruning . Early network pruning methods mainly remove the unimportant weights in the network . For instance , Optimal Brain Damage ( LeCun et al. , 1990 ) measures the importance of weights by evaluating the impact of weight on the loss function and prunes less important ones . However , it is not applicable in modern network structure due to the heavy computation of the Hessian matrix . Recent work assesses the importance of the weights through the magnitude of the weights itself . Specifically , ( Guo et al. , 2016 ) prune the network by encouraging weights to become exactly zero . The computation involves weights with zero can be discarded . However , a major drawback of weight pruning techniques is that they do not take the structure of CNNs into account , thus failing to help scale pruned models on commodity hardware such as GPUs ( Liu et al. , 2018 ; Wen et al. , 2016 ) . Channel Pruning . Channel pruning approaches directly prune feature maps or filters of CNNs , making it easy for hardware-friendly implementation . For instance , relaxed ` 0 regularization ( Louizos et al. , 2017 ) and group regularizer ( Yang et al. , 2019a ) impose channel-level sparsity , and filters with small value are selected to be pruned . Some recent work also propose to rank the importance of filters by different criteria including ` 1 norm ( Liu et al. , 2017 ; Li et al. , 2017 ) , ` 2 norm ( Frankle & Carbin , 2018 ) and High Rank channels ( Lin et al. , 2020 ) . For example , ( Liu et al. , 2017 ) explores the importance of filters through scale parameter γ in batch normalization . Although these approaches introduce minimum overhead to the training process , they are not trained in an end-to-end manner and usually either apply on a pre-trained model or require an extra fine-tuning procedure . Recent works tackle this issue by pruning CNNs from scratch . For example , FPGM ( He et al. , 2019 ) zeros in unimportant channels and continues training them after each training epoch . Furthermore , both SSS and DSA learn a differentiable binary mask that is generated by channel importance and does not require any additional fine-tuning . Our proposed BWCP is most related to variational pruning ( Zhao et al. , 2019 ) and SCP ( Kang & Han , 2020 ) as they also employ the property of normalization layer and associate the importance of channel with probability . The main difference is that our method adopts the idea of whitening to perform channel pruning . We will show that the proposed batch whitening ( BW ) technique can adjusts the activation probability of different channels according to their importance , making it easy to identify unimportant channels . Although previous work SPP ( Wang et al. , 2017 ) and DynamicCP ( Gao et al. , 2018 ) also attempt to boost salient channels and skip unimportant ones , they fail to consider the natural property inside normalization layer and deign the activation probability empirically . 3 PRELIMINARY . Notation . We use regular letters , bold letters , and capital letters to denote scalars such as ‘ x ’ , and vectors ( e.g.vector , matrix , and tensor ) such as ‘ x ’ and random variables such as ‘ X ’ , respectively . We begin with introducing a building layer in recent deep neural nets which typically consists of a convolution layer , a batch normalization ( BN ) layer , and a rectified linear unit ( ReLU ) ( Ioffe & Szegedy , 2015 ; He et al. , 2016 ) . Formally , it can be written by xc = wc ∗ z , x̃c = γcx̄c + βc , yc = max { 0 , x̃c } ( 1 ) where c ∈ [ C ] denotes channel index and C is channel size . In Eqn . ( 1 ) , ‘ ∗ ’ indicates convolution operation and wc is filter weight corresponding to the c-th output channel , i.e . xc ∈ RN×H×W . To perform normalization , xc is firstly standardized to x̄c through x̄c = ( xc − E [ xc ] ) / √ D [ xc ] where E [ · ] and D [ · ] indicate calculating mean and variance over a batch of samples , and then is re-scaled to x̃c by scale parameter γc and bias βc . Moreover , the output feature yc is obtained by ReLU activation that discards the negative part of x̃c . Criterion-based channel pruning . For channel pruning , previous methods usually employ a ‘ smallnorm-less-important ’ criterion to measure the importance of channels . For example , BN layer can be applied in channel pruning ( Liu et al. , 2017 ) , where a channel with a small value of γc would be removed . The reason is that the c-th output channel x̃c contributes little to the learned feature representation when γc is small . Hence , the convolution in Eqn . ( 1 ) can be discarded safely , and filter wc can thus be pruned . Unlike these criterion-based methods that deterministically prune unimportant filters and rely on a heuristic pruning procedure as shown in Fig.1 ( a ) , we explore a probability-based channel pruning framework where less important channels are pruned in a stochastic manner . Activation probability . To this end , we define an activation probability of a channel by exploring the property of the BN layer . Those channels with a larger activation probability could be preserved with a higher probability . To be specific , since x̄c is acquired by subtracting the sample mean and being divided by the sample variance , we can treat each channel feature as a random variable following standard Normal distribution ( Arpit et al. , 2016 ) , denoted as X̄c . Note that only positive parts can be activated by ReLU function . Proposition 1 gives the activation probability of the c-th channel , i.e.P ( X̃c ) > 0 . Proposition 1 Let a random variable X̄c ∼ N ( 0 , 1 ) and Yc = max { 0 , γcX̄c + βc } . Then we have ( 1 ) P ( Yc > 0 ) = P ( X̃c > 0 ) = ( 1 + Erf ( βc/ ( √ 2|γc| ) ) /2 where Erf ( x ) = ∫ x 0 2/ √ π · exp−t2dt , and ( 2 ) P ( X̃c > 0 ) = 0⇔ βc ≤ 0 and γc → 0 . Note that a pruned channel can be modelled by P ( X̃c > 0 ) = 0 . With Proposition 1 ( see proof in Appendix A.2 ) , we know that the unnecessary channels satisfy that γc approaches 0 and βc is negative . To achieve channel pruning , previous compression techniques ( Li et al. , 2017 ; Zhao et al. , 2019 ) merely impose a regularization on γc , which would deteriorate the representation power of unpruned channels ( Perez et al. , 2018 ; Wang et al. , 2020 ) . Instead , we adopt the idea of whitening to build a probabilistic channel pruning framework where unnecessary channels are stochastically disgarded with a small activation probability while important channels are preserved with a large activation probability . | This paper proposes a way to train compact neural networks. The feature channels are whitened, then combined with a sampling method. At the testing time, this sampling is discarded and replaced with a deterministic selection. The benefits of whitening in improving the convergence of NNs is widely explored. This paper explores another useful property of whitening, the sparsity in the whitened results. Since the representation is sparser, one might use fewer weights to reach similar performance. This paper presents such a solution. | SP:24dea93ae1c868dd368e7c642b6664666d01004d |
Message Passing Neural PDE Solvers | 1 INTRODUCTION . In the sciences , years of work have yielded extremely detailed mathematical models of physical phenomena . Many of these models are expressed naturally in differential equation form ( Olver , 2014 ) , most of the time as temporal partial differential equations ( PDE ) . Solving these differential equations is of huge importance for problems in all numerate disciplines such as weather forecasting ( Lynch , 2008 ) , astronomical simulations ( Courant et al. , 1967 ) , molecular modeling ( Lelièvre & Stoltz , 2016 ) , or jet engine design ( Athanasopoulos et al. , 2009 ) . Solving most equations of importance is analytically intractable and necessitates falling back on numerical approximation schemes . Obtaining accurate solutions of bounded error with minimal computational overhead requires the need for handcrafted solvers , always tailored to the equation at hand ( Hairer et al. , 1993 ) . The design of “ good ” PDE solvers is no mean feat . The perfect solver should satisfy an almost endless list of conditions . There are user requirements , such as being fast , using minimal computational overhead , being accurate , providing uncertainty estimates , generalizing across PDEs , and being easy to use . Then there are structural requirements of the problem , such as spatial resolution and timescale , domain sampling regularity , domain topology and geometry , boundary conditions , dimensionality , and solution space smoothness . And then there are implementational requirements , such as maintaining stability over long rollouts and preserving invariants . It is precisely because of this considerable list of requirements that the field of numerical methods is a splitter field ( Bartels , 2016 ) , tending to build handcrafted solvers for each sub-problem , rather than a lumper field , where a mentality of “ one method to rule them all ” reigns . This tendency is commonly justified with reference to no free lunch theorems . In this paper , we propose to numerically solve PDEs with an end-to-end , neural solver . Our contributions can be broken down into three main parts : • An end-to-end fully neural PDE solver , based on neural message passing , which offers flexibility to satisfy all structural requirements of a typical PDE problem . This design is motivated by the insight that some classical solvers ( finite differences , finite volumes , and WENO scheme ) can be posed as special cases of message passing . • Temporal bundling and the pushforward trick , which are methods to encourage zerostability in training autoregressive models . • Generalization across multiple PDEs within a given class . At test time , new PDE coefficients can be input to the solver . 2 BACKGROUND AND RELATED WORK . Here in Section 2.1 we briefly outline definitions and notation . We then outline some classical solving techniques in Section 2.2 . Lastly , in Section 2.3 , we list some recent neural solvers and split them into the two main neural solving paradigms for temporal PDEs . 2.1 PARTIAL DIFFERENTIAL EQUATIONS . We focus on PDEs in one time dimension t = [ 0 , T ] and possibly multiple spatial dimensions x = [ x1 , x2 , . . . , xD ] > ∈ X . These can be written down in the form ∂tu = F ( t , x , u , ∂xu , ∂xxu , ... ) ( t , x ) ∈ [ 0 , T ] × X ( 1 ) u ( 0 , x ) = u0 ( x ) , B [ u ] ( t , x ) = 0 x ∈ X , ( t , x ) ∈ [ 0 , T ] × ∂X ( 2 ) where u : [ 0 , T ] × X → Rn is the solution , with initial condition u0 ( x ) at time t = 0 and boundary conditions B [ u ] ( t , x ) = 0 when x is on the boundary ∂X of the domain X . The notation ∂xu , ∂xxu , . . . is shorthand for partial derivatives ∂u/∂x , ∂2u/∂x2 , and so forth . Most notably , ∂u/∂x represents a gradient vector . The boundary operator B we consider in this paper are Dirichlet boundary conditions , where BD [ u ] = u − bD for fixed function bD and Neumann boundary conditions BN [ u ] = n > ∂xu− bN , for scalar-valued u where n is an outward facing normal on ∂X . Conservation form Among all PDEs , we hone in on solving those that can be written down in conservation form , because there is already precedent in the field for having studied these ( Bar-Sinai et al. , 2019 ; Li et al. , 2020a ) . Conservation form PDEs are written as ∂tu +∇ · J ( u ) = 0 , ( 3 ) where∇·J is the divergence of J . The quantity J : Rn → Rn is the flux , which has the interpretation of a quantity that appears to flow . Consequently , u is a conserved quantity within a volume , only changing through the net flux J ( u ) through its boundaries . 2.2 CLASSICAL SOLVERS . Grids and cells Numerical solvers partition X into a finite grid X = { ci } Ni=1 of N small nonoverlapping volumes called cells ci ⊂ X . In this work , we focus on grids of rectangular cells . Each cell has a center at xi . uki is used to denote the discretized solution in cell ci and time tk . There are two main ways to compute uki : sampling u k i = u ( tk , xi ) and averaging u k i = ∫ ci u ( tk , x ) dx . In our notation , omitting an index implies that we use the entire slice , so uk = ( uk1 , u k 2 , ... , u k N ) . Method of lines A common technique to solve temporal PDEs is the method of lines ( Schiesser , 2012 ) . The domain X is discretized into a grid X and the solution as a vector uk . We then solve ∂tu t ∣∣ tk = f ( t , uk ) t ∈ [ 0 , T ] , ( 4 ) where f is the form of F acting on the vectorized ut instead of the function u ( t , x ) . The only derivative operator is now in time , making it an ordinary differential equation ( ODE ) . This ODE can be solved with off-the-shelf ODE solvers ( Butcher , 1987 ; Everhart , 1985 ) . f can be formed in different ways by approximating spatial derivatives on the grid . Below are three classical techniques . Finite difference method ( FDM ) In FDM , spatial derivative operators ( e.g. , ∂x ) are replaced with difference operators , called stencils . For instance , ∂xuk|xi might become ( uki+1− uki ) / ( xi+1− xi ) . Principled ways to derive stencils can be found in Appendix A. FDM is simple and efficient , but suffers poor stability unless the spatial and temporal discretizations are carefully controlled . Finite volume method ( FVM ) FVM works for equations in conservation form . It can be shown using the divergence theorem that the integral of u over cell i increases only by the net flux into the cell . In 1D , this leads to f ( t , uki ) = 1 ∆xi ( Jki−1/2 − J k i+1/2 ) , ( 5 ) where ∆xi is the cell width , and Jki−1/2 , J k i+1/2 the flux at the left and right cell boundary at time tk , respectively . The problem thus boils down to estimating the flux at cell boundaries xi±1/2 . The beauty of this technique is that the integral of u is exactly conserved . FVM is generally more stable and accurate than FDM , but can only be applied to conservation form equations . Pseudospectral method ( PSM ) PSM computes derivatives in Fourier space . In practical terms , the mth derivative is computed as IFFT { ( ιω ) mFFT ( u ) } for ι = √ −1 . These derivatives obtain exponential accuracy ( Tadmor , 1986 ) , for smooth solutions on periodic domains and regular grids . For non-periodic domains , analogues using other polynomial transforms exist , but for non-smooth solution this technique can not be applied . 2.3 NEURAL SOLVERS . We build on recent exciting developments in the field to learn PDE solvers . These neural PDE solvers , as we refer to them , are laying the foundations of what is becoming both a rapidly growing and impactful area of research . Neural PDE solvers for temporal PDEs fall into two broad categories , autoregressive methods and neural operator methods , ( see Figure 1a ) . Neural operator methods Neural operator methods treat the mapping from initial conditions to solutions at time t as an input–output mapping learnable via supervised learning . For a given PDE and given initial conditions u0 , a neural operator M : [ 0 , T ] × F → F , where F is a ( possibly infinite-dimensional ) function space , is trained to satisfy M ( t , u0 ) = u ( t ) . ( 6 ) Finite-dimensional operator methods ( Raissi , 2018 ; Sirignano & Spiliopoulos , 2018 ; Bhatnagar et al. , 2019 ; Guo et al. , 2016 ; Zhu & Zabaras , 2018 ; Khoo et al. , 2020 ) , where dim ( F ) < ∞ are grid-dependent , so can not generalize over geometry and sampling . Infinite-dimensional operator methods ( Li et al. , 2020c ; a ; Bhattacharya et al. , 2021 ; Patel et al. , 2021 ) by contrast resolve this issue . Each network is be trained on example solutions of the equation of interest and is therefore locked to that equation . These models are not designed to generalize to dynamics for out-of-distribution t. Autogressive methods An orthogonal approach , which we take , is autoregressive methods . These solve the PDE iteratively . For time-independent PDEs , the solution at time t+ ∆t is computed as u ( t+ ∆t ) = A ( ∆t , u ( t ) ) , ( 7 ) where A : R > 0 × RN → RN is the temporal update . In this work , since ∆t is fixed , we just write A ( u ( t ) ) . Three important works in this area are Bar-Sinai et al . ( 2019 ) , Greenfeld et al . ( 2019 ) , and Hsieh et al . ( 2019 ) . Each paper focuses on a different class of PDE solver : finite volumes , multigrid , and iterative finite elements , respectively . Crucially , they all use a hybrid approach ( Garcia Satorras et al. , 2019 ) , where the solver computational graph is preserved and heuristically-chosen parameters are predicted with a neural network . Hsieh et al . ( 2019 ) even have convergence guarantees for their method , something rare in deep learning . Hybrid methods are desirable for sharing structure with classical solvers . So far in the literature , however , it appears that autoregressive methods are more the exception than the norm , and for those methods published , it is reported that they are hard to train . In Section 3 we explore why this is and seek to remedy it . | This paper proposes a message passing neural network to solve PDEs. As a graph neural network for solving PDEs, it proposes a few notable features, e.g. embedding in the encoder for equation-wise representation, a difference of inputs in the message function, and so on. The proposed method also adopts notable training methods to reduce error propagation. | SP:72fc874eff7bd30d6b2d05f05c1f3281b2e2cf27 |
Message Passing Neural PDE Solvers | 1 INTRODUCTION . In the sciences , years of work have yielded extremely detailed mathematical models of physical phenomena . Many of these models are expressed naturally in differential equation form ( Olver , 2014 ) , most of the time as temporal partial differential equations ( PDE ) . Solving these differential equations is of huge importance for problems in all numerate disciplines such as weather forecasting ( Lynch , 2008 ) , astronomical simulations ( Courant et al. , 1967 ) , molecular modeling ( Lelièvre & Stoltz , 2016 ) , or jet engine design ( Athanasopoulos et al. , 2009 ) . Solving most equations of importance is analytically intractable and necessitates falling back on numerical approximation schemes . Obtaining accurate solutions of bounded error with minimal computational overhead requires the need for handcrafted solvers , always tailored to the equation at hand ( Hairer et al. , 1993 ) . The design of “ good ” PDE solvers is no mean feat . The perfect solver should satisfy an almost endless list of conditions . There are user requirements , such as being fast , using minimal computational overhead , being accurate , providing uncertainty estimates , generalizing across PDEs , and being easy to use . Then there are structural requirements of the problem , such as spatial resolution and timescale , domain sampling regularity , domain topology and geometry , boundary conditions , dimensionality , and solution space smoothness . And then there are implementational requirements , such as maintaining stability over long rollouts and preserving invariants . It is precisely because of this considerable list of requirements that the field of numerical methods is a splitter field ( Bartels , 2016 ) , tending to build handcrafted solvers for each sub-problem , rather than a lumper field , where a mentality of “ one method to rule them all ” reigns . This tendency is commonly justified with reference to no free lunch theorems . In this paper , we propose to numerically solve PDEs with an end-to-end , neural solver . Our contributions can be broken down into three main parts : • An end-to-end fully neural PDE solver , based on neural message passing , which offers flexibility to satisfy all structural requirements of a typical PDE problem . This design is motivated by the insight that some classical solvers ( finite differences , finite volumes , and WENO scheme ) can be posed as special cases of message passing . • Temporal bundling and the pushforward trick , which are methods to encourage zerostability in training autoregressive models . • Generalization across multiple PDEs within a given class . At test time , new PDE coefficients can be input to the solver . 2 BACKGROUND AND RELATED WORK . Here in Section 2.1 we briefly outline definitions and notation . We then outline some classical solving techniques in Section 2.2 . Lastly , in Section 2.3 , we list some recent neural solvers and split them into the two main neural solving paradigms for temporal PDEs . 2.1 PARTIAL DIFFERENTIAL EQUATIONS . We focus on PDEs in one time dimension t = [ 0 , T ] and possibly multiple spatial dimensions x = [ x1 , x2 , . . . , xD ] > ∈ X . These can be written down in the form ∂tu = F ( t , x , u , ∂xu , ∂xxu , ... ) ( t , x ) ∈ [ 0 , T ] × X ( 1 ) u ( 0 , x ) = u0 ( x ) , B [ u ] ( t , x ) = 0 x ∈ X , ( t , x ) ∈ [ 0 , T ] × ∂X ( 2 ) where u : [ 0 , T ] × X → Rn is the solution , with initial condition u0 ( x ) at time t = 0 and boundary conditions B [ u ] ( t , x ) = 0 when x is on the boundary ∂X of the domain X . The notation ∂xu , ∂xxu , . . . is shorthand for partial derivatives ∂u/∂x , ∂2u/∂x2 , and so forth . Most notably , ∂u/∂x represents a gradient vector . The boundary operator B we consider in this paper are Dirichlet boundary conditions , where BD [ u ] = u − bD for fixed function bD and Neumann boundary conditions BN [ u ] = n > ∂xu− bN , for scalar-valued u where n is an outward facing normal on ∂X . Conservation form Among all PDEs , we hone in on solving those that can be written down in conservation form , because there is already precedent in the field for having studied these ( Bar-Sinai et al. , 2019 ; Li et al. , 2020a ) . Conservation form PDEs are written as ∂tu +∇ · J ( u ) = 0 , ( 3 ) where∇·J is the divergence of J . The quantity J : Rn → Rn is the flux , which has the interpretation of a quantity that appears to flow . Consequently , u is a conserved quantity within a volume , only changing through the net flux J ( u ) through its boundaries . 2.2 CLASSICAL SOLVERS . Grids and cells Numerical solvers partition X into a finite grid X = { ci } Ni=1 of N small nonoverlapping volumes called cells ci ⊂ X . In this work , we focus on grids of rectangular cells . Each cell has a center at xi . uki is used to denote the discretized solution in cell ci and time tk . There are two main ways to compute uki : sampling u k i = u ( tk , xi ) and averaging u k i = ∫ ci u ( tk , x ) dx . In our notation , omitting an index implies that we use the entire slice , so uk = ( uk1 , u k 2 , ... , u k N ) . Method of lines A common technique to solve temporal PDEs is the method of lines ( Schiesser , 2012 ) . The domain X is discretized into a grid X and the solution as a vector uk . We then solve ∂tu t ∣∣ tk = f ( t , uk ) t ∈ [ 0 , T ] , ( 4 ) where f is the form of F acting on the vectorized ut instead of the function u ( t , x ) . The only derivative operator is now in time , making it an ordinary differential equation ( ODE ) . This ODE can be solved with off-the-shelf ODE solvers ( Butcher , 1987 ; Everhart , 1985 ) . f can be formed in different ways by approximating spatial derivatives on the grid . Below are three classical techniques . Finite difference method ( FDM ) In FDM , spatial derivative operators ( e.g. , ∂x ) are replaced with difference operators , called stencils . For instance , ∂xuk|xi might become ( uki+1− uki ) / ( xi+1− xi ) . Principled ways to derive stencils can be found in Appendix A. FDM is simple and efficient , but suffers poor stability unless the spatial and temporal discretizations are carefully controlled . Finite volume method ( FVM ) FVM works for equations in conservation form . It can be shown using the divergence theorem that the integral of u over cell i increases only by the net flux into the cell . In 1D , this leads to f ( t , uki ) = 1 ∆xi ( Jki−1/2 − J k i+1/2 ) , ( 5 ) where ∆xi is the cell width , and Jki−1/2 , J k i+1/2 the flux at the left and right cell boundary at time tk , respectively . The problem thus boils down to estimating the flux at cell boundaries xi±1/2 . The beauty of this technique is that the integral of u is exactly conserved . FVM is generally more stable and accurate than FDM , but can only be applied to conservation form equations . Pseudospectral method ( PSM ) PSM computes derivatives in Fourier space . In practical terms , the mth derivative is computed as IFFT { ( ιω ) mFFT ( u ) } for ι = √ −1 . These derivatives obtain exponential accuracy ( Tadmor , 1986 ) , for smooth solutions on periodic domains and regular grids . For non-periodic domains , analogues using other polynomial transforms exist , but for non-smooth solution this technique can not be applied . 2.3 NEURAL SOLVERS . We build on recent exciting developments in the field to learn PDE solvers . These neural PDE solvers , as we refer to them , are laying the foundations of what is becoming both a rapidly growing and impactful area of research . Neural PDE solvers for temporal PDEs fall into two broad categories , autoregressive methods and neural operator methods , ( see Figure 1a ) . Neural operator methods Neural operator methods treat the mapping from initial conditions to solutions at time t as an input–output mapping learnable via supervised learning . For a given PDE and given initial conditions u0 , a neural operator M : [ 0 , T ] × F → F , where F is a ( possibly infinite-dimensional ) function space , is trained to satisfy M ( t , u0 ) = u ( t ) . ( 6 ) Finite-dimensional operator methods ( Raissi , 2018 ; Sirignano & Spiliopoulos , 2018 ; Bhatnagar et al. , 2019 ; Guo et al. , 2016 ; Zhu & Zabaras , 2018 ; Khoo et al. , 2020 ) , where dim ( F ) < ∞ are grid-dependent , so can not generalize over geometry and sampling . Infinite-dimensional operator methods ( Li et al. , 2020c ; a ; Bhattacharya et al. , 2021 ; Patel et al. , 2021 ) by contrast resolve this issue . Each network is be trained on example solutions of the equation of interest and is therefore locked to that equation . These models are not designed to generalize to dynamics for out-of-distribution t. Autogressive methods An orthogonal approach , which we take , is autoregressive methods . These solve the PDE iteratively . For time-independent PDEs , the solution at time t+ ∆t is computed as u ( t+ ∆t ) = A ( ∆t , u ( t ) ) , ( 7 ) where A : R > 0 × RN → RN is the temporal update . In this work , since ∆t is fixed , we just write A ( u ( t ) ) . Three important works in this area are Bar-Sinai et al . ( 2019 ) , Greenfeld et al . ( 2019 ) , and Hsieh et al . ( 2019 ) . Each paper focuses on a different class of PDE solver : finite volumes , multigrid , and iterative finite elements , respectively . Crucially , they all use a hybrid approach ( Garcia Satorras et al. , 2019 ) , where the solver computational graph is preserved and heuristically-chosen parameters are predicted with a neural network . Hsieh et al . ( 2019 ) even have convergence guarantees for their method , something rare in deep learning . Hybrid methods are desirable for sharing structure with classical solvers . So far in the literature , however , it appears that autoregressive methods are more the exception than the norm , and for those methods published , it is reported that they are hard to train . In Section 3 we explore why this is and seek to remedy it . | The paper addresses the stability of training neural PDE solvers. It uses the "pushforward trick": the adversarial-style loss is used by perturbing the input at step $k$ by a certain noise (note, that this idea looks similar to denoising autoencoders). Another trick is to predict K steps simulaneously in time. The architecture itself is graph-based: the nodes are distributed through the domain, and it is an encoder-processsor-decoder architecture. This helps to be closer to classical numerical solvers. The experiments show that the pushforward trick helps to increase "survival time" (which is defined as a time when a certain error exceed the threshold) clearly helps. | SP:72fc874eff7bd30d6b2d05f05c1f3281b2e2cf27 |
Message Passing Neural PDE Solvers | 1 INTRODUCTION . In the sciences , years of work have yielded extremely detailed mathematical models of physical phenomena . Many of these models are expressed naturally in differential equation form ( Olver , 2014 ) , most of the time as temporal partial differential equations ( PDE ) . Solving these differential equations is of huge importance for problems in all numerate disciplines such as weather forecasting ( Lynch , 2008 ) , astronomical simulations ( Courant et al. , 1967 ) , molecular modeling ( Lelièvre & Stoltz , 2016 ) , or jet engine design ( Athanasopoulos et al. , 2009 ) . Solving most equations of importance is analytically intractable and necessitates falling back on numerical approximation schemes . Obtaining accurate solutions of bounded error with minimal computational overhead requires the need for handcrafted solvers , always tailored to the equation at hand ( Hairer et al. , 1993 ) . The design of “ good ” PDE solvers is no mean feat . The perfect solver should satisfy an almost endless list of conditions . There are user requirements , such as being fast , using minimal computational overhead , being accurate , providing uncertainty estimates , generalizing across PDEs , and being easy to use . Then there are structural requirements of the problem , such as spatial resolution and timescale , domain sampling regularity , domain topology and geometry , boundary conditions , dimensionality , and solution space smoothness . And then there are implementational requirements , such as maintaining stability over long rollouts and preserving invariants . It is precisely because of this considerable list of requirements that the field of numerical methods is a splitter field ( Bartels , 2016 ) , tending to build handcrafted solvers for each sub-problem , rather than a lumper field , where a mentality of “ one method to rule them all ” reigns . This tendency is commonly justified with reference to no free lunch theorems . In this paper , we propose to numerically solve PDEs with an end-to-end , neural solver . Our contributions can be broken down into three main parts : • An end-to-end fully neural PDE solver , based on neural message passing , which offers flexibility to satisfy all structural requirements of a typical PDE problem . This design is motivated by the insight that some classical solvers ( finite differences , finite volumes , and WENO scheme ) can be posed as special cases of message passing . • Temporal bundling and the pushforward trick , which are methods to encourage zerostability in training autoregressive models . • Generalization across multiple PDEs within a given class . At test time , new PDE coefficients can be input to the solver . 2 BACKGROUND AND RELATED WORK . Here in Section 2.1 we briefly outline definitions and notation . We then outline some classical solving techniques in Section 2.2 . Lastly , in Section 2.3 , we list some recent neural solvers and split them into the two main neural solving paradigms for temporal PDEs . 2.1 PARTIAL DIFFERENTIAL EQUATIONS . We focus on PDEs in one time dimension t = [ 0 , T ] and possibly multiple spatial dimensions x = [ x1 , x2 , . . . , xD ] > ∈ X . These can be written down in the form ∂tu = F ( t , x , u , ∂xu , ∂xxu , ... ) ( t , x ) ∈ [ 0 , T ] × X ( 1 ) u ( 0 , x ) = u0 ( x ) , B [ u ] ( t , x ) = 0 x ∈ X , ( t , x ) ∈ [ 0 , T ] × ∂X ( 2 ) where u : [ 0 , T ] × X → Rn is the solution , with initial condition u0 ( x ) at time t = 0 and boundary conditions B [ u ] ( t , x ) = 0 when x is on the boundary ∂X of the domain X . The notation ∂xu , ∂xxu , . . . is shorthand for partial derivatives ∂u/∂x , ∂2u/∂x2 , and so forth . Most notably , ∂u/∂x represents a gradient vector . The boundary operator B we consider in this paper are Dirichlet boundary conditions , where BD [ u ] = u − bD for fixed function bD and Neumann boundary conditions BN [ u ] = n > ∂xu− bN , for scalar-valued u where n is an outward facing normal on ∂X . Conservation form Among all PDEs , we hone in on solving those that can be written down in conservation form , because there is already precedent in the field for having studied these ( Bar-Sinai et al. , 2019 ; Li et al. , 2020a ) . Conservation form PDEs are written as ∂tu +∇ · J ( u ) = 0 , ( 3 ) where∇·J is the divergence of J . The quantity J : Rn → Rn is the flux , which has the interpretation of a quantity that appears to flow . Consequently , u is a conserved quantity within a volume , only changing through the net flux J ( u ) through its boundaries . 2.2 CLASSICAL SOLVERS . Grids and cells Numerical solvers partition X into a finite grid X = { ci } Ni=1 of N small nonoverlapping volumes called cells ci ⊂ X . In this work , we focus on grids of rectangular cells . Each cell has a center at xi . uki is used to denote the discretized solution in cell ci and time tk . There are two main ways to compute uki : sampling u k i = u ( tk , xi ) and averaging u k i = ∫ ci u ( tk , x ) dx . In our notation , omitting an index implies that we use the entire slice , so uk = ( uk1 , u k 2 , ... , u k N ) . Method of lines A common technique to solve temporal PDEs is the method of lines ( Schiesser , 2012 ) . The domain X is discretized into a grid X and the solution as a vector uk . We then solve ∂tu t ∣∣ tk = f ( t , uk ) t ∈ [ 0 , T ] , ( 4 ) where f is the form of F acting on the vectorized ut instead of the function u ( t , x ) . The only derivative operator is now in time , making it an ordinary differential equation ( ODE ) . This ODE can be solved with off-the-shelf ODE solvers ( Butcher , 1987 ; Everhart , 1985 ) . f can be formed in different ways by approximating spatial derivatives on the grid . Below are three classical techniques . Finite difference method ( FDM ) In FDM , spatial derivative operators ( e.g. , ∂x ) are replaced with difference operators , called stencils . For instance , ∂xuk|xi might become ( uki+1− uki ) / ( xi+1− xi ) . Principled ways to derive stencils can be found in Appendix A. FDM is simple and efficient , but suffers poor stability unless the spatial and temporal discretizations are carefully controlled . Finite volume method ( FVM ) FVM works for equations in conservation form . It can be shown using the divergence theorem that the integral of u over cell i increases only by the net flux into the cell . In 1D , this leads to f ( t , uki ) = 1 ∆xi ( Jki−1/2 − J k i+1/2 ) , ( 5 ) where ∆xi is the cell width , and Jki−1/2 , J k i+1/2 the flux at the left and right cell boundary at time tk , respectively . The problem thus boils down to estimating the flux at cell boundaries xi±1/2 . The beauty of this technique is that the integral of u is exactly conserved . FVM is generally more stable and accurate than FDM , but can only be applied to conservation form equations . Pseudospectral method ( PSM ) PSM computes derivatives in Fourier space . In practical terms , the mth derivative is computed as IFFT { ( ιω ) mFFT ( u ) } for ι = √ −1 . These derivatives obtain exponential accuracy ( Tadmor , 1986 ) , for smooth solutions on periodic domains and regular grids . For non-periodic domains , analogues using other polynomial transforms exist , but for non-smooth solution this technique can not be applied . 2.3 NEURAL SOLVERS . We build on recent exciting developments in the field to learn PDE solvers . These neural PDE solvers , as we refer to them , are laying the foundations of what is becoming both a rapidly growing and impactful area of research . Neural PDE solvers for temporal PDEs fall into two broad categories , autoregressive methods and neural operator methods , ( see Figure 1a ) . Neural operator methods Neural operator methods treat the mapping from initial conditions to solutions at time t as an input–output mapping learnable via supervised learning . For a given PDE and given initial conditions u0 , a neural operator M : [ 0 , T ] × F → F , where F is a ( possibly infinite-dimensional ) function space , is trained to satisfy M ( t , u0 ) = u ( t ) . ( 6 ) Finite-dimensional operator methods ( Raissi , 2018 ; Sirignano & Spiliopoulos , 2018 ; Bhatnagar et al. , 2019 ; Guo et al. , 2016 ; Zhu & Zabaras , 2018 ; Khoo et al. , 2020 ) , where dim ( F ) < ∞ are grid-dependent , so can not generalize over geometry and sampling . Infinite-dimensional operator methods ( Li et al. , 2020c ; a ; Bhattacharya et al. , 2021 ; Patel et al. , 2021 ) by contrast resolve this issue . Each network is be trained on example solutions of the equation of interest and is therefore locked to that equation . These models are not designed to generalize to dynamics for out-of-distribution t. Autogressive methods An orthogonal approach , which we take , is autoregressive methods . These solve the PDE iteratively . For time-independent PDEs , the solution at time t+ ∆t is computed as u ( t+ ∆t ) = A ( ∆t , u ( t ) ) , ( 7 ) where A : R > 0 × RN → RN is the temporal update . In this work , since ∆t is fixed , we just write A ( u ( t ) ) . Three important works in this area are Bar-Sinai et al . ( 2019 ) , Greenfeld et al . ( 2019 ) , and Hsieh et al . ( 2019 ) . Each paper focuses on a different class of PDE solver : finite volumes , multigrid , and iterative finite elements , respectively . Crucially , they all use a hybrid approach ( Garcia Satorras et al. , 2019 ) , where the solver computational graph is preserved and heuristically-chosen parameters are predicted with a neural network . Hsieh et al . ( 2019 ) even have convergence guarantees for their method , something rare in deep learning . Hybrid methods are desirable for sharing structure with classical solvers . So far in the literature , however , it appears that autoregressive methods are more the exception than the norm , and for those methods published , it is reported that they are hard to train . In Section 3 we explore why this is and seek to remedy it . | The paper proposes a framework to solve generic PDEs written in conservation form, in an autoregressive fashion. The grid domain is considered as a graph, whose nodes contain information about solutions to the PDE until a given times steps, node positions, time steps, and hyperparameters information about the PDE. The node’s labels are first embedded in a latent space. Then message passing is applied and the output is decoded to predict the next n time steps solutions together. The network is trained with an additional loss which promotes zero stability of the solver, by constraining the network to be invariant to small perturbations in the input solutions of previous time steps. The approach is validated on a parameterized family of 1d and 2d PDEs, showing accuracy and generalization results that are above the state of the art of neural solvers and classical solver schemes. In addition, the paper show promising results dealing with irregular domains with different types of boundary conditions. | SP:72fc874eff7bd30d6b2d05f05c1f3281b2e2cf27 |
Neuron-Enhanced Autoencoder based Collaborative filtering: Theory and Practice | 1 INTRODUCTION . Recommendation system aims to provide personalized recommendation based on various information such as user purchase records , social networks , user features , and item ( or product ) features . With the fast growth of E-commence , social media , and content provider , recommendation systems play more and more important roles in our daily life and have changed our life both explicitly and implicitly . In general , recommendation systems can be organized into three categories ( Adomavicius & Tuzhilin , 2005 ; Zhang et al. , 2019 ) : content based method , collaborative filtering , and hybrid methods . The content based methods recommend similar items to a user or recommend one item to similar users , where the similarity is usually obtained from side information such as genre , occupation , and age . Collaborative filtering ( CF ) assumes that there exist potential correlations within both users and items , which can be implicitly used to predict unknown ratings . Hybrid methods are combinations of content based methods and CF methods ( Adomavicius & Tuzhilin , 2005 ; Zhang et al. , 2019 ; Su & Khoshgoftaar , 2009 ) . CF is at the cores of many recommendation systems . Early CF methods ( Resnick et al. , 1994 ) compute the similarity between users or items directly from the ratings to make prediction . This kind of method is also called memory based CF , which is easy to implement and has high interpretability . One limitation is that the similarity computed from the ratings is not informative owing to the high sparsity of the rating . Another line of CF is model based method ( Ungar & Foster , 1998 ; Shani et al. , 2002 ) that utilizes historical data to train a machine learning model such as Bayesian network ( Breese et al. , 1998 ; Miyahara et al. , 2000 ) for recommendation . Model based methods are more effective than content based methods in learning complex hidden preference and handling the sparsity problem . Note that both content based and model based methods do not work when there are new items or users without ratings , which is known as the cold start problem . A popular strategy for solving the problem is to incorporate side information into CF methods ( Adams et al. , 2010 ; Welling et al. , 2012 ; Zhang et al. , 2017 ) . In the past decades , matrix factorization ( Billsus & Pazzani , 1998 ; Mnih & Salakhutdinov , 2008 ; Koren et al. , 2009 ) and matrix completion ( Candès & Recht , 2009 ; Shamir & Shalev-Shwartz , 2014 ; Sun & Luo , 2015 ; Chen et al. , 2016 ; Fan et al. , 2019 ) have been extensively studied and used in CF . These methods usually exploit the potential low-rank structure of the incomplete rating matrix via embedding items and users into a latent space of reduced dimension , where the observed ratings are approximated by the inner products of the user feature vectors and item feature vectors . The low-rankness is usually obtained by low-rank factorization ( Koren et al. , 2009 ) , nuclear norm minimization ( Candès & Recht , 2009 ) , or Schatten-p quasi norm minimization ( Fan et al. , 2019 ) . Particularly , Lee et al . ( 2016 ) proposed a local low-rank matrix approximation ( LLORMA ) that approximates the rating matrix as a weighted sum of a few low-rank matrices . LLORMA outperformed vanilla low-rank matrix completion methods in collaborative filtering , which indicates that the rating matrices in real applications may have more complicated structures rather than a single low-rank structure . The success of neural networks and deep learning in computer vision and natural language processing inspired researchers to design neural networks for CF ( Salakhutdinov et al. , 2007 ; Dziugaite & Roy , 2015 ; Sedhain et al. , 2015 ; Wu et al. , 2016 ; Zheng et al. , 2016 ; He et al. , 2017 ; van den Berg et al. , 2017 ; Fan & Cheng , 2018 ; Yi et al. , 2020 ) . For instance , Salakhutdinov et al . ( 2007 ) proposed a restricted Boltzmann machines ( Hinton et al. , 2006 ) based CF method called RBM-CF , which showed high performance in the Netflix challenge ( Bennett & Lanning , 2007 ) . Sedhain et al . ( 2015 ) proposed AutoRec , an autoencoder ( Hinton & Salakhutdinov , 2006 ; Bengio et al. , 2007 ) based CF method , which predicts unknown ratings by an encoder-decoder model x̂ = W2σ ( W1x ) , where x denotes the incomplete ratings on one item or of one user and W1 , W2 are weight matrices to optimize . Unlike RBM-CF , which is probabilistic and generative , AutoRec provides a discriminative approach . AutoRec outperformed LLORMA slightly on several benchmark datasets ( Sedhain et al. , 2015 ) . In addition , adding depth is able to improve the performance of AutoRec ( Sedhain et al. , 2015 ) . Inspried by Neural Autoregressive Distribution Estimator ( NADE ) ( Larochelle & Murray , 2011 ) and RBM-CF ( Salakhutdinov et al. , 2007 ) , Zheng et al . ( 2016 ) proposed a method called CF-NADE , in which parameters are shared between different ratings and achieved promising performance in several benchmarks . Muller et al . ( 2018 ) proposed a kernel based reparametrized neural network , in which the weight between two units is set to be a weighted kernel-function of the location vectors . The method works well in data visualization and recommendation systems . Interestingly , Yi et al . ( 2020 ) found that the expected value of the output layer of a neural network depends on the sparsity of the input data . They proposed a simple yet effective method called sparsity normalization to improve the performance of neural networks with sparse input data such as the highly incomplete rating matrices in CF . It is worth mentioning that existing autoencoder based CF methods such as ( Sedhain et al. , 2015 ; Wu et al. , 2016 ; Muller et al. , 2018 ; Yi et al. , 2020 ) use linear activation function in the output of the decoder , i.e. , x̂ = WLhL−1 , where WL denotes the weights of the output layer and hL−1 denotes the features given by the last hidden layer . Thus , these methods are under the assumption that the ratings are linear interactions between user features and item features , though the features can be nonlinear . Such an assumption may not be true or not optimal in real problems , especially when the data are bounded ( e.g . images ) or are collected by sensors ( e.g . medical and chemical sensors ) with nonlinear response functions . We suspect that the rating values given by users on items are from some nonlinear response functions because humans have complex emotion or decision curves ( LeDoux , 2000 ; Baker , 2001 ) . A naive method to incorporate nonlinear interaction is using nonlinear activation functions such as sigmoid function ( with rescaling ) in the output layer of the decoder , which however has much lower performance than using a linear activation function . That ’ s why existing autoencoder based CF methods use only linear activation function . Note that a pre-specified activation function for the output layer of the decoder may work on specific data but may be far away from the possible optimal choice . On the other hand , the theoretical analysis for autoencoder and deep learning based CF is very limited , while there have been many works on the theory of low-rank matrix completion based CF ( Srebro & Shraibman , 2005 ; Candès & Recht , 2009 ; Shamir & Shalev-Shwartz , 2014 ; Fan et al. , 2019 ) . Contribution . In this paper , we present a novel neural network CF method named NE-AECF , an enhanced autoencoder approach for recommendation system . NE-AECF is composed of two different neural networks , one is an autoencoder to reconstruct the incomplete rating matrix , while the other is an element-wise neural network to learn an activation function adaptively for the output layer of the autoencoder . We provide theoretical analysis for NE-AECF , which explains the superiority of our method . Specifically , we prove that the element-wise neural network can reduce the upper bound of the prediction error for the unknown ratings . We also prove that the data sparsity is not problematic but useful and the prediction performance is closely related to the difference between the number of users and the number of items . Further , we demonstrate empirically our NE-AECF on benchmarks : MovieLen-100k and MovieLen-1M , achieving state-of-the-art results . Notation . We use x ( or X ) , x , and X to denote scalar , vector , and matrix respectively . We use ‖x‖ to denote the Euclidean norm of vector x , use ‖X‖F and ‖X‖2 to denote the Frobenius norm and spectral norm of matrix X respectively . The ` 21 norm of matrix is denoted by ‖X‖2,1 : =∑ i ‖xi‖ , where xi denotes the i-th column ofX . The ` ∞ norm of matrix is denoted by ‖X‖∞ : = maxij |Xij | . We use |S| to denote the cardinality of set S. The symbol ′ ′ denotes the Hadamard product between vectors or matrices . The symbol ′◦′ denotes function composition . 2 NEURON-ENHANCED AECF . Suppose we have an incomplete rating matrix X̃ = ( x̃1 , x̃2 , . . . , x̃n ) ∈ Rm×n , where m is the number of users and n is the number of items ( without loss of generality ) . X̃ij ≥ 0 denotes the rating given by user i on item j and X̃ij = 0 indicates an unobserved rating . S denotes the set of observed ratings . We have X̃ij = Xij for all ( i , j ) ∈ S. Our goal is to predict the unobserved ratings Xij , ( i , j ) ∈ [ m ] × [ n ] \S , from X̃ . We want to learn a nonlinear function f : Rm 7→ Rm such that n∑ i=1 ∥∥si ( x̃i − f ( x̃i ) ) ∥∥2 ( 1 ) is as small as possible , where si is a binary vector denoting whether the the corresponding element in xi is zero ( unknown ) or not . The motivation is predicting the missing entries of xi using its observed entries , though the missing entries of xi are filled by zeros before performing f . More formally , we consider the following problem minimize f∈F ∥∥∥S ( X̃ − f ( X̃ ) ) ∥∥∥2 F ( 2 ) where S = ( s1 , s2 , . . . , sn ) , f is performed on each column of X̃ separately , and F denotes a hypothesis set of m to m functions . We have infinite choices for F . For example , F can be a set of functions in the form of neural network with some parameters W ∈ W , whereW denotes a set of matrices under some constraints . In this case , problem ( 2 ) defines a denoising autoencoder or stacked denoising autoencoders ( Vincent et al. , 2010 ) , where the noises are introduced by filling the missing ratings with zeros . Let f be an autoencoder with linear activation function in the output layer . Then ( 2 ) becomes minimize W1 , W2 ∥∥∥S ( X̃ −W2σ ( W1X̃ ) ) ∥∥∥2 F + λ ( ‖W1‖2F + ‖W2‖2F ) , ( 3 ) whereW1 ∈ Rd×m andW2 ∈ Rm×d are weights matrices to learn and λ is a nonnegative constant to control the strength of weight decay . We have omitted the bia terms for simplicity . σ denotes an activation function such as ReLU σ ( x ) = max ( x , 0 ) and Sigmoid σ ( x ) = 1/ ( 1 + exp ( −x ) ) . Note that ( 3 ) is exactly the basic model considered by Sedhain et al . ( 2015 ) , Wu et al . ( 2016 ) , Muller et al . ( 2018 ) , and Yi et al . ( 2020 ) . Once ( 3 ) is used , the following assumption is made implicitly . Assumption 1 . There exist two matricesA ∈ Rm×d andB ∈ Rd×n such that ‖S ( X −AB ) ‖F is small enough . The assumption indicates that if d is much smaller than min ( m , n ) , X can be well approximated by a low-rank matrix , which however may not always hold in real applications . Consider the following data generating model X = h ( A′B′ ) , ( 4 ) where h : R1 7→ R1 is an element-wise nonlinear function and A′ ∈ Rm×d , B′ ∈ Rd×n may be generated by some nonlinear functions . If the nonlinearity of h is high , X can not be well approximated by a rank-d matrix . These analysis indicates that if the element-wise nonlinearity in generatingX is strong , ( 3 ) should use a large d to ensure a small enough training error . The element-wise nonlinearity widely exists in real data . For example , in imaging science , the intensity of pixels are nonlinear responses of photoelectric element to spectrum . In chemical engineering , many sensors have nonlinear responses . In biomedical engineering , the dose-responses are often nonlinear curves . Hence , in collaborative filtering , the ratings may be nonlinear responses to some latent values , according to the studies on response curve in neuroscience and psychology ( LeDoux , 2000 ; Baker , 2001 ) . Therefore , instead of ( 3 ) , one may consider the following problem minimize W1 , W2 ∥∥∥S ( X̃ − h ( W2σ ( W1X̃ ) ) ) ∥∥∥2 F + λ ( ‖W1‖2F + ‖W2‖2F ) , ( 5 ) where h should be determined beforehand . A naive approach to determining h is choosing a bounded or partially bounded nonlinear function according to the range of the data . For example , if the data are image pixels within [ 0 , 1 ] , one may use Sigmoid function . If the data are nonnegative , one may use ReLU . However , such choices only considered the range of the data , which is just a small portion of the nonlinearity . Within the range , the true response functions are not necessarily linear ( ReLU ) or related to exponential ( Sigmoid ) , and can be much more complicated . As it is difficult to choose a suitable nonlinear function h in advance , we propose to learn h from the data adaptively , i.e. , minimize W1 , W2 , h∈H ∥∥∥S ( X̃ − h ( W2σ ( W1X̃ ) ) ) ∥∥∥2 F + λ ( ‖W1‖2F + ‖W2‖2F ) , ( 6 ) where H denotes a hypothesis set of nonlinear functions from R1 to R1 . We have different approaches to learning h. The first approach is combining various activation functions , i.e. , hθ ( z ) = k∑ i θiσi ( z ) , ( 7 ) where σi ( · ) are different activation functions and θ = ( θ1 , . . . , θk ) > are parameters to estimate . However , it is not clear whether ( 7 ) is able to approximate a wide range of nonlinear functions . The second approach is using polynomial functions , i.e. , hθ ( z ) = k∑ i θzk . ( 8 ) It is a k-order polynomial function and can well approximate any smooth functions provided that k is sufficiently large . Another approach is using a neural network , i.e. , hΘ ( z ) = ΘLΘ ( σΘ ( ΘLΘ−1σΘ ( · · ·σΘ ( Θ1z ) · · · ) ) ) , ( 9 ) where Θ1 and ΘLΘ are vectors , Θ2 , . . . , ΘLΘ−1 are matrices , and σΘ is a fixed activation function . According to the universal approximation theorems ( Pinkus , 1999 ; Sonoda & Murata , 2017 ; Lu et al. , 2017 ) , ( 9 ) is able to approximate any continuous functions provided that the network is wide enough or deep enough . Since ( 9 ) is more flexible than ( 7 ) and ( 8 ) in function approximation , we propose to solve the following problem minimize W , Θ ∥∥∥S ( X̃ − hΘ ( gW ( X̃ ) ) ) ∥∥∥2 F + λW LW∑ l=1 ‖Wl‖2F + λΘ LΘ∑ l=1 ‖Θl‖2F , ( 10 ) where W = { W1 , . . . , WLW } , Θ = { Θ1 , . . . , ΘLΘ } , and gW ( X̃ ) = WLW ( σW ( WLW−1σW ( · · ·σW ( W1X̃ ) · · · ) ) ) . ( 11 ) In addition , we assume Wl ∈ Rdl×dl−1 , l ∈ [ LW ] , and Θl ∈ Rpl×pl−1 , l ∈ [ LΘ ] . Note that d0 = dLW = m and p0 = pLΘ = 1 . Comparing ( 10 ) with ( 2 ) , we see that we have replaced f by hW ◦ gΘ with Frobenius-norm constrained weight matrices . Model ( 10 ) is exactly our neuronenhanced autoencoder based collaborative filtering ( NE-AECF ) method . There are two different neural networks . The first one is an autoencoder defined by hΘ◦gW , which is to learn an contraction map from the incomplete rating matrix X̃ to itself or its observed entries more precisely . The second neural network is performed in an element-wise manner to learn an activation function h adaptively for the output layer of the autoencoder or stancked autoencoders . Figure 1 shows an example schematic of NE-AECF , where LW = LΘ = 2 and Z = gW ( X̃ ) . | In this paper, the authors study a traditional collaborative filtering problem with users' ratings, where the goal is to predict ratings that are unobserved. Specifically, the authors propose an enhanced autoencoder-based method called NE-AECF. The main idea of NE-AECF as shown in Eq(10) and Figure 1 is that it contains an additional module for each predicted rating by an autoencoder, i.e., h_\theta(g_w) in Eq(10) and the most right part near the output layer in Figure 1. | SP:38c6673b36201dc75827d66e450e02dd13a124f6 |
Neuron-Enhanced Autoencoder based Collaborative filtering: Theory and Practice | 1 INTRODUCTION . Recommendation system aims to provide personalized recommendation based on various information such as user purchase records , social networks , user features , and item ( or product ) features . With the fast growth of E-commence , social media , and content provider , recommendation systems play more and more important roles in our daily life and have changed our life both explicitly and implicitly . In general , recommendation systems can be organized into three categories ( Adomavicius & Tuzhilin , 2005 ; Zhang et al. , 2019 ) : content based method , collaborative filtering , and hybrid methods . The content based methods recommend similar items to a user or recommend one item to similar users , where the similarity is usually obtained from side information such as genre , occupation , and age . Collaborative filtering ( CF ) assumes that there exist potential correlations within both users and items , which can be implicitly used to predict unknown ratings . Hybrid methods are combinations of content based methods and CF methods ( Adomavicius & Tuzhilin , 2005 ; Zhang et al. , 2019 ; Su & Khoshgoftaar , 2009 ) . CF is at the cores of many recommendation systems . Early CF methods ( Resnick et al. , 1994 ) compute the similarity between users or items directly from the ratings to make prediction . This kind of method is also called memory based CF , which is easy to implement and has high interpretability . One limitation is that the similarity computed from the ratings is not informative owing to the high sparsity of the rating . Another line of CF is model based method ( Ungar & Foster , 1998 ; Shani et al. , 2002 ) that utilizes historical data to train a machine learning model such as Bayesian network ( Breese et al. , 1998 ; Miyahara et al. , 2000 ) for recommendation . Model based methods are more effective than content based methods in learning complex hidden preference and handling the sparsity problem . Note that both content based and model based methods do not work when there are new items or users without ratings , which is known as the cold start problem . A popular strategy for solving the problem is to incorporate side information into CF methods ( Adams et al. , 2010 ; Welling et al. , 2012 ; Zhang et al. , 2017 ) . In the past decades , matrix factorization ( Billsus & Pazzani , 1998 ; Mnih & Salakhutdinov , 2008 ; Koren et al. , 2009 ) and matrix completion ( Candès & Recht , 2009 ; Shamir & Shalev-Shwartz , 2014 ; Sun & Luo , 2015 ; Chen et al. , 2016 ; Fan et al. , 2019 ) have been extensively studied and used in CF . These methods usually exploit the potential low-rank structure of the incomplete rating matrix via embedding items and users into a latent space of reduced dimension , where the observed ratings are approximated by the inner products of the user feature vectors and item feature vectors . The low-rankness is usually obtained by low-rank factorization ( Koren et al. , 2009 ) , nuclear norm minimization ( Candès & Recht , 2009 ) , or Schatten-p quasi norm minimization ( Fan et al. , 2019 ) . Particularly , Lee et al . ( 2016 ) proposed a local low-rank matrix approximation ( LLORMA ) that approximates the rating matrix as a weighted sum of a few low-rank matrices . LLORMA outperformed vanilla low-rank matrix completion methods in collaborative filtering , which indicates that the rating matrices in real applications may have more complicated structures rather than a single low-rank structure . The success of neural networks and deep learning in computer vision and natural language processing inspired researchers to design neural networks for CF ( Salakhutdinov et al. , 2007 ; Dziugaite & Roy , 2015 ; Sedhain et al. , 2015 ; Wu et al. , 2016 ; Zheng et al. , 2016 ; He et al. , 2017 ; van den Berg et al. , 2017 ; Fan & Cheng , 2018 ; Yi et al. , 2020 ) . For instance , Salakhutdinov et al . ( 2007 ) proposed a restricted Boltzmann machines ( Hinton et al. , 2006 ) based CF method called RBM-CF , which showed high performance in the Netflix challenge ( Bennett & Lanning , 2007 ) . Sedhain et al . ( 2015 ) proposed AutoRec , an autoencoder ( Hinton & Salakhutdinov , 2006 ; Bengio et al. , 2007 ) based CF method , which predicts unknown ratings by an encoder-decoder model x̂ = W2σ ( W1x ) , where x denotes the incomplete ratings on one item or of one user and W1 , W2 are weight matrices to optimize . Unlike RBM-CF , which is probabilistic and generative , AutoRec provides a discriminative approach . AutoRec outperformed LLORMA slightly on several benchmark datasets ( Sedhain et al. , 2015 ) . In addition , adding depth is able to improve the performance of AutoRec ( Sedhain et al. , 2015 ) . Inspried by Neural Autoregressive Distribution Estimator ( NADE ) ( Larochelle & Murray , 2011 ) and RBM-CF ( Salakhutdinov et al. , 2007 ) , Zheng et al . ( 2016 ) proposed a method called CF-NADE , in which parameters are shared between different ratings and achieved promising performance in several benchmarks . Muller et al . ( 2018 ) proposed a kernel based reparametrized neural network , in which the weight between two units is set to be a weighted kernel-function of the location vectors . The method works well in data visualization and recommendation systems . Interestingly , Yi et al . ( 2020 ) found that the expected value of the output layer of a neural network depends on the sparsity of the input data . They proposed a simple yet effective method called sparsity normalization to improve the performance of neural networks with sparse input data such as the highly incomplete rating matrices in CF . It is worth mentioning that existing autoencoder based CF methods such as ( Sedhain et al. , 2015 ; Wu et al. , 2016 ; Muller et al. , 2018 ; Yi et al. , 2020 ) use linear activation function in the output of the decoder , i.e. , x̂ = WLhL−1 , where WL denotes the weights of the output layer and hL−1 denotes the features given by the last hidden layer . Thus , these methods are under the assumption that the ratings are linear interactions between user features and item features , though the features can be nonlinear . Such an assumption may not be true or not optimal in real problems , especially when the data are bounded ( e.g . images ) or are collected by sensors ( e.g . medical and chemical sensors ) with nonlinear response functions . We suspect that the rating values given by users on items are from some nonlinear response functions because humans have complex emotion or decision curves ( LeDoux , 2000 ; Baker , 2001 ) . A naive method to incorporate nonlinear interaction is using nonlinear activation functions such as sigmoid function ( with rescaling ) in the output layer of the decoder , which however has much lower performance than using a linear activation function . That ’ s why existing autoencoder based CF methods use only linear activation function . Note that a pre-specified activation function for the output layer of the decoder may work on specific data but may be far away from the possible optimal choice . On the other hand , the theoretical analysis for autoencoder and deep learning based CF is very limited , while there have been many works on the theory of low-rank matrix completion based CF ( Srebro & Shraibman , 2005 ; Candès & Recht , 2009 ; Shamir & Shalev-Shwartz , 2014 ; Fan et al. , 2019 ) . Contribution . In this paper , we present a novel neural network CF method named NE-AECF , an enhanced autoencoder approach for recommendation system . NE-AECF is composed of two different neural networks , one is an autoencoder to reconstruct the incomplete rating matrix , while the other is an element-wise neural network to learn an activation function adaptively for the output layer of the autoencoder . We provide theoretical analysis for NE-AECF , which explains the superiority of our method . Specifically , we prove that the element-wise neural network can reduce the upper bound of the prediction error for the unknown ratings . We also prove that the data sparsity is not problematic but useful and the prediction performance is closely related to the difference between the number of users and the number of items . Further , we demonstrate empirically our NE-AECF on benchmarks : MovieLen-100k and MovieLen-1M , achieving state-of-the-art results . Notation . We use x ( or X ) , x , and X to denote scalar , vector , and matrix respectively . We use ‖x‖ to denote the Euclidean norm of vector x , use ‖X‖F and ‖X‖2 to denote the Frobenius norm and spectral norm of matrix X respectively . The ` 21 norm of matrix is denoted by ‖X‖2,1 : =∑ i ‖xi‖ , where xi denotes the i-th column ofX . The ` ∞ norm of matrix is denoted by ‖X‖∞ : = maxij |Xij | . We use |S| to denote the cardinality of set S. The symbol ′ ′ denotes the Hadamard product between vectors or matrices . The symbol ′◦′ denotes function composition . 2 NEURON-ENHANCED AECF . Suppose we have an incomplete rating matrix X̃ = ( x̃1 , x̃2 , . . . , x̃n ) ∈ Rm×n , where m is the number of users and n is the number of items ( without loss of generality ) . X̃ij ≥ 0 denotes the rating given by user i on item j and X̃ij = 0 indicates an unobserved rating . S denotes the set of observed ratings . We have X̃ij = Xij for all ( i , j ) ∈ S. Our goal is to predict the unobserved ratings Xij , ( i , j ) ∈ [ m ] × [ n ] \S , from X̃ . We want to learn a nonlinear function f : Rm 7→ Rm such that n∑ i=1 ∥∥si ( x̃i − f ( x̃i ) ) ∥∥2 ( 1 ) is as small as possible , where si is a binary vector denoting whether the the corresponding element in xi is zero ( unknown ) or not . The motivation is predicting the missing entries of xi using its observed entries , though the missing entries of xi are filled by zeros before performing f . More formally , we consider the following problem minimize f∈F ∥∥∥S ( X̃ − f ( X̃ ) ) ∥∥∥2 F ( 2 ) where S = ( s1 , s2 , . . . , sn ) , f is performed on each column of X̃ separately , and F denotes a hypothesis set of m to m functions . We have infinite choices for F . For example , F can be a set of functions in the form of neural network with some parameters W ∈ W , whereW denotes a set of matrices under some constraints . In this case , problem ( 2 ) defines a denoising autoencoder or stacked denoising autoencoders ( Vincent et al. , 2010 ) , where the noises are introduced by filling the missing ratings with zeros . Let f be an autoencoder with linear activation function in the output layer . Then ( 2 ) becomes minimize W1 , W2 ∥∥∥S ( X̃ −W2σ ( W1X̃ ) ) ∥∥∥2 F + λ ( ‖W1‖2F + ‖W2‖2F ) , ( 3 ) whereW1 ∈ Rd×m andW2 ∈ Rm×d are weights matrices to learn and λ is a nonnegative constant to control the strength of weight decay . We have omitted the bia terms for simplicity . σ denotes an activation function such as ReLU σ ( x ) = max ( x , 0 ) and Sigmoid σ ( x ) = 1/ ( 1 + exp ( −x ) ) . Note that ( 3 ) is exactly the basic model considered by Sedhain et al . ( 2015 ) , Wu et al . ( 2016 ) , Muller et al . ( 2018 ) , and Yi et al . ( 2020 ) . Once ( 3 ) is used , the following assumption is made implicitly . Assumption 1 . There exist two matricesA ∈ Rm×d andB ∈ Rd×n such that ‖S ( X −AB ) ‖F is small enough . The assumption indicates that if d is much smaller than min ( m , n ) , X can be well approximated by a low-rank matrix , which however may not always hold in real applications . Consider the following data generating model X = h ( A′B′ ) , ( 4 ) where h : R1 7→ R1 is an element-wise nonlinear function and A′ ∈ Rm×d , B′ ∈ Rd×n may be generated by some nonlinear functions . If the nonlinearity of h is high , X can not be well approximated by a rank-d matrix . These analysis indicates that if the element-wise nonlinearity in generatingX is strong , ( 3 ) should use a large d to ensure a small enough training error . The element-wise nonlinearity widely exists in real data . For example , in imaging science , the intensity of pixels are nonlinear responses of photoelectric element to spectrum . In chemical engineering , many sensors have nonlinear responses . In biomedical engineering , the dose-responses are often nonlinear curves . Hence , in collaborative filtering , the ratings may be nonlinear responses to some latent values , according to the studies on response curve in neuroscience and psychology ( LeDoux , 2000 ; Baker , 2001 ) . Therefore , instead of ( 3 ) , one may consider the following problem minimize W1 , W2 ∥∥∥S ( X̃ − h ( W2σ ( W1X̃ ) ) ) ∥∥∥2 F + λ ( ‖W1‖2F + ‖W2‖2F ) , ( 5 ) where h should be determined beforehand . A naive approach to determining h is choosing a bounded or partially bounded nonlinear function according to the range of the data . For example , if the data are image pixels within [ 0 , 1 ] , one may use Sigmoid function . If the data are nonnegative , one may use ReLU . However , such choices only considered the range of the data , which is just a small portion of the nonlinearity . Within the range , the true response functions are not necessarily linear ( ReLU ) or related to exponential ( Sigmoid ) , and can be much more complicated . As it is difficult to choose a suitable nonlinear function h in advance , we propose to learn h from the data adaptively , i.e. , minimize W1 , W2 , h∈H ∥∥∥S ( X̃ − h ( W2σ ( W1X̃ ) ) ) ∥∥∥2 F + λ ( ‖W1‖2F + ‖W2‖2F ) , ( 6 ) where H denotes a hypothesis set of nonlinear functions from R1 to R1 . We have different approaches to learning h. The first approach is combining various activation functions , i.e. , hθ ( z ) = k∑ i θiσi ( z ) , ( 7 ) where σi ( · ) are different activation functions and θ = ( θ1 , . . . , θk ) > are parameters to estimate . However , it is not clear whether ( 7 ) is able to approximate a wide range of nonlinear functions . The second approach is using polynomial functions , i.e. , hθ ( z ) = k∑ i θzk . ( 8 ) It is a k-order polynomial function and can well approximate any smooth functions provided that k is sufficiently large . Another approach is using a neural network , i.e. , hΘ ( z ) = ΘLΘ ( σΘ ( ΘLΘ−1σΘ ( · · ·σΘ ( Θ1z ) · · · ) ) ) , ( 9 ) where Θ1 and ΘLΘ are vectors , Θ2 , . . . , ΘLΘ−1 are matrices , and σΘ is a fixed activation function . According to the universal approximation theorems ( Pinkus , 1999 ; Sonoda & Murata , 2017 ; Lu et al. , 2017 ) , ( 9 ) is able to approximate any continuous functions provided that the network is wide enough or deep enough . Since ( 9 ) is more flexible than ( 7 ) and ( 8 ) in function approximation , we propose to solve the following problem minimize W , Θ ∥∥∥S ( X̃ − hΘ ( gW ( X̃ ) ) ) ∥∥∥2 F + λW LW∑ l=1 ‖Wl‖2F + λΘ LΘ∑ l=1 ‖Θl‖2F , ( 10 ) where W = { W1 , . . . , WLW } , Θ = { Θ1 , . . . , ΘLΘ } , and gW ( X̃ ) = WLW ( σW ( WLW−1σW ( · · ·σW ( W1X̃ ) · · · ) ) ) . ( 11 ) In addition , we assume Wl ∈ Rdl×dl−1 , l ∈ [ LW ] , and Θl ∈ Rpl×pl−1 , l ∈ [ LΘ ] . Note that d0 = dLW = m and p0 = pLΘ = 1 . Comparing ( 10 ) with ( 2 ) , we see that we have replaced f by hW ◦ gΘ with Frobenius-norm constrained weight matrices . Model ( 10 ) is exactly our neuronenhanced autoencoder based collaborative filtering ( NE-AECF ) method . There are two different neural networks . The first one is an autoencoder defined by hΘ◦gW , which is to learn an contraction map from the incomplete rating matrix X̃ to itself or its observed entries more precisely . The second neural network is performed in an element-wise manner to learn an activation function h adaptively for the output layer of the autoencoder or stancked autoencoders . Figure 1 shows an example schematic of NE-AECF , where LW = LΘ = 2 and Z = gW ( X̃ ) . | This paper proposes an imputation method that consists of two networks. One network is AE, and one network is element-wise non-linear transformation. The authors proved the proposed method has a better generalization bound for unknown ratings. Furthermore, the authors demonstrated the proposed method achieved promising results in a few datasets. | SP:38c6673b36201dc75827d66e450e02dd13a124f6 |
Neuron-Enhanced Autoencoder based Collaborative filtering: Theory and Practice | 1 INTRODUCTION . Recommendation system aims to provide personalized recommendation based on various information such as user purchase records , social networks , user features , and item ( or product ) features . With the fast growth of E-commence , social media , and content provider , recommendation systems play more and more important roles in our daily life and have changed our life both explicitly and implicitly . In general , recommendation systems can be organized into three categories ( Adomavicius & Tuzhilin , 2005 ; Zhang et al. , 2019 ) : content based method , collaborative filtering , and hybrid methods . The content based methods recommend similar items to a user or recommend one item to similar users , where the similarity is usually obtained from side information such as genre , occupation , and age . Collaborative filtering ( CF ) assumes that there exist potential correlations within both users and items , which can be implicitly used to predict unknown ratings . Hybrid methods are combinations of content based methods and CF methods ( Adomavicius & Tuzhilin , 2005 ; Zhang et al. , 2019 ; Su & Khoshgoftaar , 2009 ) . CF is at the cores of many recommendation systems . Early CF methods ( Resnick et al. , 1994 ) compute the similarity between users or items directly from the ratings to make prediction . This kind of method is also called memory based CF , which is easy to implement and has high interpretability . One limitation is that the similarity computed from the ratings is not informative owing to the high sparsity of the rating . Another line of CF is model based method ( Ungar & Foster , 1998 ; Shani et al. , 2002 ) that utilizes historical data to train a machine learning model such as Bayesian network ( Breese et al. , 1998 ; Miyahara et al. , 2000 ) for recommendation . Model based methods are more effective than content based methods in learning complex hidden preference and handling the sparsity problem . Note that both content based and model based methods do not work when there are new items or users without ratings , which is known as the cold start problem . A popular strategy for solving the problem is to incorporate side information into CF methods ( Adams et al. , 2010 ; Welling et al. , 2012 ; Zhang et al. , 2017 ) . In the past decades , matrix factorization ( Billsus & Pazzani , 1998 ; Mnih & Salakhutdinov , 2008 ; Koren et al. , 2009 ) and matrix completion ( Candès & Recht , 2009 ; Shamir & Shalev-Shwartz , 2014 ; Sun & Luo , 2015 ; Chen et al. , 2016 ; Fan et al. , 2019 ) have been extensively studied and used in CF . These methods usually exploit the potential low-rank structure of the incomplete rating matrix via embedding items and users into a latent space of reduced dimension , where the observed ratings are approximated by the inner products of the user feature vectors and item feature vectors . The low-rankness is usually obtained by low-rank factorization ( Koren et al. , 2009 ) , nuclear norm minimization ( Candès & Recht , 2009 ) , or Schatten-p quasi norm minimization ( Fan et al. , 2019 ) . Particularly , Lee et al . ( 2016 ) proposed a local low-rank matrix approximation ( LLORMA ) that approximates the rating matrix as a weighted sum of a few low-rank matrices . LLORMA outperformed vanilla low-rank matrix completion methods in collaborative filtering , which indicates that the rating matrices in real applications may have more complicated structures rather than a single low-rank structure . The success of neural networks and deep learning in computer vision and natural language processing inspired researchers to design neural networks for CF ( Salakhutdinov et al. , 2007 ; Dziugaite & Roy , 2015 ; Sedhain et al. , 2015 ; Wu et al. , 2016 ; Zheng et al. , 2016 ; He et al. , 2017 ; van den Berg et al. , 2017 ; Fan & Cheng , 2018 ; Yi et al. , 2020 ) . For instance , Salakhutdinov et al . ( 2007 ) proposed a restricted Boltzmann machines ( Hinton et al. , 2006 ) based CF method called RBM-CF , which showed high performance in the Netflix challenge ( Bennett & Lanning , 2007 ) . Sedhain et al . ( 2015 ) proposed AutoRec , an autoencoder ( Hinton & Salakhutdinov , 2006 ; Bengio et al. , 2007 ) based CF method , which predicts unknown ratings by an encoder-decoder model x̂ = W2σ ( W1x ) , where x denotes the incomplete ratings on one item or of one user and W1 , W2 are weight matrices to optimize . Unlike RBM-CF , which is probabilistic and generative , AutoRec provides a discriminative approach . AutoRec outperformed LLORMA slightly on several benchmark datasets ( Sedhain et al. , 2015 ) . In addition , adding depth is able to improve the performance of AutoRec ( Sedhain et al. , 2015 ) . Inspried by Neural Autoregressive Distribution Estimator ( NADE ) ( Larochelle & Murray , 2011 ) and RBM-CF ( Salakhutdinov et al. , 2007 ) , Zheng et al . ( 2016 ) proposed a method called CF-NADE , in which parameters are shared between different ratings and achieved promising performance in several benchmarks . Muller et al . ( 2018 ) proposed a kernel based reparametrized neural network , in which the weight between two units is set to be a weighted kernel-function of the location vectors . The method works well in data visualization and recommendation systems . Interestingly , Yi et al . ( 2020 ) found that the expected value of the output layer of a neural network depends on the sparsity of the input data . They proposed a simple yet effective method called sparsity normalization to improve the performance of neural networks with sparse input data such as the highly incomplete rating matrices in CF . It is worth mentioning that existing autoencoder based CF methods such as ( Sedhain et al. , 2015 ; Wu et al. , 2016 ; Muller et al. , 2018 ; Yi et al. , 2020 ) use linear activation function in the output of the decoder , i.e. , x̂ = WLhL−1 , where WL denotes the weights of the output layer and hL−1 denotes the features given by the last hidden layer . Thus , these methods are under the assumption that the ratings are linear interactions between user features and item features , though the features can be nonlinear . Such an assumption may not be true or not optimal in real problems , especially when the data are bounded ( e.g . images ) or are collected by sensors ( e.g . medical and chemical sensors ) with nonlinear response functions . We suspect that the rating values given by users on items are from some nonlinear response functions because humans have complex emotion or decision curves ( LeDoux , 2000 ; Baker , 2001 ) . A naive method to incorporate nonlinear interaction is using nonlinear activation functions such as sigmoid function ( with rescaling ) in the output layer of the decoder , which however has much lower performance than using a linear activation function . That ’ s why existing autoencoder based CF methods use only linear activation function . Note that a pre-specified activation function for the output layer of the decoder may work on specific data but may be far away from the possible optimal choice . On the other hand , the theoretical analysis for autoencoder and deep learning based CF is very limited , while there have been many works on the theory of low-rank matrix completion based CF ( Srebro & Shraibman , 2005 ; Candès & Recht , 2009 ; Shamir & Shalev-Shwartz , 2014 ; Fan et al. , 2019 ) . Contribution . In this paper , we present a novel neural network CF method named NE-AECF , an enhanced autoencoder approach for recommendation system . NE-AECF is composed of two different neural networks , one is an autoencoder to reconstruct the incomplete rating matrix , while the other is an element-wise neural network to learn an activation function adaptively for the output layer of the autoencoder . We provide theoretical analysis for NE-AECF , which explains the superiority of our method . Specifically , we prove that the element-wise neural network can reduce the upper bound of the prediction error for the unknown ratings . We also prove that the data sparsity is not problematic but useful and the prediction performance is closely related to the difference between the number of users and the number of items . Further , we demonstrate empirically our NE-AECF on benchmarks : MovieLen-100k and MovieLen-1M , achieving state-of-the-art results . Notation . We use x ( or X ) , x , and X to denote scalar , vector , and matrix respectively . We use ‖x‖ to denote the Euclidean norm of vector x , use ‖X‖F and ‖X‖2 to denote the Frobenius norm and spectral norm of matrix X respectively . The ` 21 norm of matrix is denoted by ‖X‖2,1 : =∑ i ‖xi‖ , where xi denotes the i-th column ofX . The ` ∞ norm of matrix is denoted by ‖X‖∞ : = maxij |Xij | . We use |S| to denote the cardinality of set S. The symbol ′ ′ denotes the Hadamard product between vectors or matrices . The symbol ′◦′ denotes function composition . 2 NEURON-ENHANCED AECF . Suppose we have an incomplete rating matrix X̃ = ( x̃1 , x̃2 , . . . , x̃n ) ∈ Rm×n , where m is the number of users and n is the number of items ( without loss of generality ) . X̃ij ≥ 0 denotes the rating given by user i on item j and X̃ij = 0 indicates an unobserved rating . S denotes the set of observed ratings . We have X̃ij = Xij for all ( i , j ) ∈ S. Our goal is to predict the unobserved ratings Xij , ( i , j ) ∈ [ m ] × [ n ] \S , from X̃ . We want to learn a nonlinear function f : Rm 7→ Rm such that n∑ i=1 ∥∥si ( x̃i − f ( x̃i ) ) ∥∥2 ( 1 ) is as small as possible , where si is a binary vector denoting whether the the corresponding element in xi is zero ( unknown ) or not . The motivation is predicting the missing entries of xi using its observed entries , though the missing entries of xi are filled by zeros before performing f . More formally , we consider the following problem minimize f∈F ∥∥∥S ( X̃ − f ( X̃ ) ) ∥∥∥2 F ( 2 ) where S = ( s1 , s2 , . . . , sn ) , f is performed on each column of X̃ separately , and F denotes a hypothesis set of m to m functions . We have infinite choices for F . For example , F can be a set of functions in the form of neural network with some parameters W ∈ W , whereW denotes a set of matrices under some constraints . In this case , problem ( 2 ) defines a denoising autoencoder or stacked denoising autoencoders ( Vincent et al. , 2010 ) , where the noises are introduced by filling the missing ratings with zeros . Let f be an autoencoder with linear activation function in the output layer . Then ( 2 ) becomes minimize W1 , W2 ∥∥∥S ( X̃ −W2σ ( W1X̃ ) ) ∥∥∥2 F + λ ( ‖W1‖2F + ‖W2‖2F ) , ( 3 ) whereW1 ∈ Rd×m andW2 ∈ Rm×d are weights matrices to learn and λ is a nonnegative constant to control the strength of weight decay . We have omitted the bia terms for simplicity . σ denotes an activation function such as ReLU σ ( x ) = max ( x , 0 ) and Sigmoid σ ( x ) = 1/ ( 1 + exp ( −x ) ) . Note that ( 3 ) is exactly the basic model considered by Sedhain et al . ( 2015 ) , Wu et al . ( 2016 ) , Muller et al . ( 2018 ) , and Yi et al . ( 2020 ) . Once ( 3 ) is used , the following assumption is made implicitly . Assumption 1 . There exist two matricesA ∈ Rm×d andB ∈ Rd×n such that ‖S ( X −AB ) ‖F is small enough . The assumption indicates that if d is much smaller than min ( m , n ) , X can be well approximated by a low-rank matrix , which however may not always hold in real applications . Consider the following data generating model X = h ( A′B′ ) , ( 4 ) where h : R1 7→ R1 is an element-wise nonlinear function and A′ ∈ Rm×d , B′ ∈ Rd×n may be generated by some nonlinear functions . If the nonlinearity of h is high , X can not be well approximated by a rank-d matrix . These analysis indicates that if the element-wise nonlinearity in generatingX is strong , ( 3 ) should use a large d to ensure a small enough training error . The element-wise nonlinearity widely exists in real data . For example , in imaging science , the intensity of pixels are nonlinear responses of photoelectric element to spectrum . In chemical engineering , many sensors have nonlinear responses . In biomedical engineering , the dose-responses are often nonlinear curves . Hence , in collaborative filtering , the ratings may be nonlinear responses to some latent values , according to the studies on response curve in neuroscience and psychology ( LeDoux , 2000 ; Baker , 2001 ) . Therefore , instead of ( 3 ) , one may consider the following problem minimize W1 , W2 ∥∥∥S ( X̃ − h ( W2σ ( W1X̃ ) ) ) ∥∥∥2 F + λ ( ‖W1‖2F + ‖W2‖2F ) , ( 5 ) where h should be determined beforehand . A naive approach to determining h is choosing a bounded or partially bounded nonlinear function according to the range of the data . For example , if the data are image pixels within [ 0 , 1 ] , one may use Sigmoid function . If the data are nonnegative , one may use ReLU . However , such choices only considered the range of the data , which is just a small portion of the nonlinearity . Within the range , the true response functions are not necessarily linear ( ReLU ) or related to exponential ( Sigmoid ) , and can be much more complicated . As it is difficult to choose a suitable nonlinear function h in advance , we propose to learn h from the data adaptively , i.e. , minimize W1 , W2 , h∈H ∥∥∥S ( X̃ − h ( W2σ ( W1X̃ ) ) ) ∥∥∥2 F + λ ( ‖W1‖2F + ‖W2‖2F ) , ( 6 ) where H denotes a hypothesis set of nonlinear functions from R1 to R1 . We have different approaches to learning h. The first approach is combining various activation functions , i.e. , hθ ( z ) = k∑ i θiσi ( z ) , ( 7 ) where σi ( · ) are different activation functions and θ = ( θ1 , . . . , θk ) > are parameters to estimate . However , it is not clear whether ( 7 ) is able to approximate a wide range of nonlinear functions . The second approach is using polynomial functions , i.e. , hθ ( z ) = k∑ i θzk . ( 8 ) It is a k-order polynomial function and can well approximate any smooth functions provided that k is sufficiently large . Another approach is using a neural network , i.e. , hΘ ( z ) = ΘLΘ ( σΘ ( ΘLΘ−1σΘ ( · · ·σΘ ( Θ1z ) · · · ) ) ) , ( 9 ) where Θ1 and ΘLΘ are vectors , Θ2 , . . . , ΘLΘ−1 are matrices , and σΘ is a fixed activation function . According to the universal approximation theorems ( Pinkus , 1999 ; Sonoda & Murata , 2017 ; Lu et al. , 2017 ) , ( 9 ) is able to approximate any continuous functions provided that the network is wide enough or deep enough . Since ( 9 ) is more flexible than ( 7 ) and ( 8 ) in function approximation , we propose to solve the following problem minimize W , Θ ∥∥∥S ( X̃ − hΘ ( gW ( X̃ ) ) ) ∥∥∥2 F + λW LW∑ l=1 ‖Wl‖2F + λΘ LΘ∑ l=1 ‖Θl‖2F , ( 10 ) where W = { W1 , . . . , WLW } , Θ = { Θ1 , . . . , ΘLΘ } , and gW ( X̃ ) = WLW ( σW ( WLW−1σW ( · · ·σW ( W1X̃ ) · · · ) ) ) . ( 11 ) In addition , we assume Wl ∈ Rdl×dl−1 , l ∈ [ LW ] , and Θl ∈ Rpl×pl−1 , l ∈ [ LΘ ] . Note that d0 = dLW = m and p0 = pLΘ = 1 . Comparing ( 10 ) with ( 2 ) , we see that we have replaced f by hW ◦ gΘ with Frobenius-norm constrained weight matrices . Model ( 10 ) is exactly our neuronenhanced autoencoder based collaborative filtering ( NE-AECF ) method . There are two different neural networks . The first one is an autoencoder defined by hΘ◦gW , which is to learn an contraction map from the incomplete rating matrix X̃ to itself or its observed entries more precisely . The second neural network is performed in an element-wise manner to learn an activation function h adaptively for the output layer of the autoencoder or stancked autoencoders . Figure 1 shows an example schematic of NE-AECF , where LW = LΘ = 2 and Z = gW ( X̃ ) . | This paper considers an autoencoder with one hidden layer. While the output layer uses a linear activation function in several papers in the literature, this paper proposes to use a nonlinear activation function in the output layer. Moreover, instead of using a fixed function (e.g., sigmoid), this non-linear activation function is learned in this paper, using a parametrized form. Generalization bounds are derived, and experiments are conducted. | SP:38c6673b36201dc75827d66e450e02dd13a124f6 |
Task Affinity with Maximum Bipartite Matching in Few-Shot Learning | 1 INTRODUCTION . Leveraging the knowledge of one task in training the other related tasks is an effective approach to training deep neural networks with limited data . In fact , transfer learning , multi-task learning ( Standley et al. , 2020 ) , and meta-learning ( Finn et al. , 2017 ) are examples of training a new task using the knowledge of others . In fact , a strong piece of work ( Standley et al. , 2020 ) has shown that training similar tasks together in multi-task learning often achieves higher accuracy on average . However , characterizing the similarity between tasks remains a challenging problem . In this paper , we present a task similarity measure representing the complexity of utilizing the knowledge of one task for learning another one . Our measure , called Task Affinity Score ( TAS ) , is non-commutative and is defined as a function of the Fisher Information matrix , which is based on the second-derivative of the loss function with respect to the parameters of the model under consideration . By definition , the TAS between two tasks is always greater or equal to 0 , where the equality holds if and only if both tasks are identical . For the classification tasks , the TAS is invariant to the permutation of the data labels . In other words , modifying the numeric order of the data labels does not affect the affinity score between tasks . Additionally , TAS is mathematically well-defined , as we will prove in the sequel . Following the introduction of TAS , we propose a few-shot learning method based on the similarity between tasks . The lack of sufficient data in the few-shot learning problem has motivated us to use the knowledge of similar tasks for our few-shot learning method . In particular , our approach is capable of finding the relevant training labels to the ones in the given few-shot target tasks , and utilizing the corresponding data samples for episodically fine-tuning the few-shot model . Similar to recent few-shot approaches ( Chen et al. , 2021 ; Tian et al. , 2020 ) , we first use the entire training dataset to train a Whole-Classification network . Next , this trained model is used for extraction of the feature vectors for a set of constructed source task ( s ) generated from the training dataset . The purpose of the sources task ( s ) is to establish the most related task ( s ) to the target task defined according to the test data . In our framework , TAS with a graph matching algorithm is applied to find the affinity scores and the identification of the most related source task ( s ) to the target task . Lastly , we follow the standard few-shot meta-learning in which a set of base tasks are first constructed , and a few-shot model is fine-tuned according to the query set of these base tasks . Our approach has a unique distinguishing property from the common meta-learning approaches : our base tasks are constructed only based on the previously discovered related source tasks to episodically finetune the few-shot model . Specifically , the feature vectors of the query data from the base tasks are extracted by the encoder of the Whole-Classification network , and a k-nearest neighbors ( k-NN ) is applied to classify the features into the correct classes by updating the weights in the encoder . Using extensive simulations , we demonstrate that our approach of utilizing only the related training data is an effective method for boosting the performance of the few-shot model with less number of parameters in both 5-way 1-shot and 5-way 5-shot settings for various benchmark datasets . Experimental results on miniImageNet ( Vinyals et al. , 2016 ) , tieredImageNet ( Ren et al. , 2018 ) , CIFARFS ( Bertinetto et al. , 2018 ) , and FC-100 ( Oreshkin et al. , 2018 ) datasets are provided demonstrating the efficacy of the proposed approach compared to other state-of-the-art few-shot learning methods . 2 RELATED WORK . The similarity between tasks has been mainly studied in the transfer learning literature . Many approaches in transfer learning ( Silver & Bennett , 2008 ; Finn et al. , 2016 ; Mihalkova et al. , 2007 ; Niculescu-Mizil & Caruana , 2007 ; Luo et al. , 2017 ; Razavian et al. , 2014 ; Pan & Yang , 2010 ; Mallya & Lazebnik , 2018 ; Fernando et al. , 2017 ; Rusu et al. , 2016 ; Zamir et al. , 2018 ; Kirkpatrick et al. , 2017 ; Chen et al. , 2018 ) are based on the assumption that similar tasks often share similar architectures . However , these works mainly focus on transferring the trained weights from the previous tasks to an incoming task , and do not seek to define the measurement that can identify the related tasks . Though the relationship between visual tasks has been recently investigated by various papers ( Zamir et al. , 2018 ; Pal & Balasubramanian , 2019 ; Dwivedi & Roig , 2019 ; Achille et al. , 2019 ; Wang et al. , 2019 ; Standley et al. , 2020 ) , these works only focus on the weight-transferring and do not use task similarity for discovering the closest tasks for improving the overall performance . Additionally , the measures of task similarity from these papers are often assumed to be symmetric , which is not typically a realistic assumption . For example , it is easier to utilize the knowledge of a comprehensive task for learning a simpler task than the other way around . In the context of the few-shot learning ( FSL ) , the task affinity ( similarity ) has not been explicitly considered . Most of the recent few-shot learning approaches are based on the meta-learning frameworks ( Santoro et al. , 2016 ; Finn et al. , 2017 ; Vinyals et al. , 2016 ; Snell et al. , 2017 ) . In these approaches , episodic learning is often used in the training phase , in which the FSL models are exposed to data episodes . Each episode , consisting of the support and query sets , is characterized by the number of classes , the number of samples per class in the support set , and the number of samples per class in the query set . During the training phase , the loss over these training episodes is minimized . Generally , these episodic learning approaches can be divided into three main categories : metric-based method , optimization-based method , and memory-based method . In metricbased methods ( Vinyals et al. , 2016 ; Snell et al. , 2017 ; Koch et al. , 2015 ; Sung et al. , 2018 ) , a kernel function learns to measure the distance between data samples in the support sets , then classifies the data in the query set according to the closest data samples in the support set . On the other hand , the goal of optimization-based methods ( Finn et al. , 2017 ; Grant et al. , 2018 ; Rusu et al. , 2018 ; Lee et al. , 2019 ; Nichol et al. , 2018 ) is to find the models with faster adaption and convergence . Lastly , the memory-based methods ( Santoro et al. , 2016 ; Ravi & Larochelle , 2017 ; Munkhdalai et al. , 2018 ) use the network architectures with memory as the meta-learner for the few-shot learning . Overall , episodic learning in FSL has achieved great success on various few-shot meta-datasets . Recently , several methods with a pre-trained Whole-Classification network have achieved state-ofthe-art performance on multiple FSL benchmarks ( Chen et al. , 2021 ; Tian et al. , 2020 ; Rodrı́guez et al. , 2020 ; Rizve et al. , 2021 ) . Instead of initializing the FSL model from scratches , these methods focus on leveraging the entire training labels for pre-training a powerful and robust classifier . The pre-trained model , by itself , outperforms several meta-learning approaches in numerous FSL datasets ( e.g. , miniImageNet , tieredImageNet , CIFAR-FS , etc. ) . Next , the Whole-Classification network is used as a feature extractor for a simple base learner ( e.g. , logistic regression , K-nearest neighbor , etc . ) and is often fine-tuned using episodic learning . Various efforts have been investigated to improve the Whole-Classification network for the few-shot learning , including manifold mixup as self-supervised loss ( Mangla et al. , 2020 ) , knowledge distillation on the pre-trained classifier ( Verma et al. , 2019 ; Tian et al. , 2020 ) , and data-augmentation with combined loss functions ( Rodrı́guez et al. , 2020 ; Rizve et al. , 2021 ) . However , none of these approaches consider the task affinity in their training procedure . Here , we propose a task affinity measure that can identify the related tasks to a target task , given only a few data samples . Then we utilize the data samples in the related tasks for episodically fine-tuning the final few-shot classifier . 3 PRELIMINARIES . In this section , we present the definition of the task affinity score . First , we need to define some notations and definitions used throughout this paper . We denote the matrix infinity-norm by ||B||∞ = maxi , j |Bij | . We also denote a task T and its dataset X jointly by a pair ( T , X ) . To be consistent with the few-shot terminologies , a dataset X is shown by the union of the support set , Xsupport and the query set , Xquery , i.e. , X = Xsupport ∪ Xquery . Let PNθ ( T , Xquery ) ∈ [ 0 , 1 ] be a function that measures the performance of a given model Nθ , parameterized by θ ∈ Rd on the query setXquery of the task T . We define an ε-approximation network , representing the task-dataset pair ( T , X ) as follows : Definition 1 ( ε-approximation Network ) . A model Nθ is called an ε-approximation network for a pair task-dataset ( T , X ) if it is trained using the support dataXsupport such thatPNθ ( T , Xquery ) ≥ 1− ε , for a given 0 < ε < 1 . In practice , the architectures for the ε-approximation networks for a given task T are selected from a pool of well-known hand-designed architectures , such as ResNet , VGG , DenseNet , etc . We also need to recall the definition of the Fisher Information matrix for a neural network . Definition 2 ( Fisher Information Matrix ) . For a neural network Nθ with weights θ , data X , and the negative log-likelihood loss function L ( θ ) : = L ( θ , X ) , the Fisher Information matrix is defined as : F ( θ ) = E [ ∇θL ( θ ) ∇θL ( θ ) T ] = −E [ H ( L ( θ ) ) ] , ( 1 ) where H is the Hessian matrix , i.e. , H ( L ( θ ) ) = ∇2θL ( θ ) , and expectation is taken w.r.t the data . In practice , we use the empirical Fisher Information matrix computed as follows : F̂ ( θ ) = 1 |X| ∑ i∈X ∇θLi ( θ ) ∇θLi ( θ ) T , ( 2 ) where Li ( θ ) is the loss value for the ith data point in X . Next , we define the task affinity score , which measures the similarity from a source task , Ta to a target task , Tb . Definition 3 ( Task Affinity Score ( TAS ) ) . Let ( Ta , Xa ) be the source task-dataset pair with Nθa denotes its corresponding ε-approximation network . Let Fa , a be the Fisher Information matrix of Nθa with the query data X query a from the task Ta . For the target task-dataset pair ( Tb , Xb ) , let Fa , b be the Fisher Information matrix of Nθa with the support data X support b from the task Tb . We define the TAS from the source task Ta to the target task Tb based on Fréchet distance as follows : s [ a , b ] : = 1√ 2 Trace ( Fa , a + Fa , b − 2 ( Fa , aFa , b ) 1/2 ) 1/2 . ( 3 ) Here , we use the diagonal approximation of the Fisher Information matrix since computing the full Fisher matrix is prohibitive in the huge space of neural network parameters . We also normalize these matrices to have unit trace . As a result , the TAS in equation ( 3 ) can be simplified by the following formula : s [ a , b ] = 1√ 2 ∥∥∥F 1/2a , a − F 1/2a , b ∥∥∥ F = 1√ 2 [ ∑ i ( ( F iia , a ) 1/2 − ( F iia , b ) 1/2 ) 2 ] 1/2 , ( 4 ) where F ii denotes the ith diagonal entry of the Fisher Information matrix . The TAS ranges from 0 to 1 , with the score s = 0 denotes a perfect similarity and the score s = 1 indicates a perfect dissimilarity . In the next section , we present our few-shot approach based on the above TAS . | The authors propose a task affinity score based on maximum bipartite matching algorithm and Fisher information matrix. And then utilize this score to find the closest training data labels to the test data and leverage the discovered relevant data for episodically fine-tuning the few-shot model. Experimental results on few-shot learning setting achieve the state-of-the-art performance on four widely-used benchmarks. | SP:8ac962ba488c992435442b5a0d5a22bb4b500c86 |
Task Affinity with Maximum Bipartite Matching in Few-Shot Learning | 1 INTRODUCTION . Leveraging the knowledge of one task in training the other related tasks is an effective approach to training deep neural networks with limited data . In fact , transfer learning , multi-task learning ( Standley et al. , 2020 ) , and meta-learning ( Finn et al. , 2017 ) are examples of training a new task using the knowledge of others . In fact , a strong piece of work ( Standley et al. , 2020 ) has shown that training similar tasks together in multi-task learning often achieves higher accuracy on average . However , characterizing the similarity between tasks remains a challenging problem . In this paper , we present a task similarity measure representing the complexity of utilizing the knowledge of one task for learning another one . Our measure , called Task Affinity Score ( TAS ) , is non-commutative and is defined as a function of the Fisher Information matrix , which is based on the second-derivative of the loss function with respect to the parameters of the model under consideration . By definition , the TAS between two tasks is always greater or equal to 0 , where the equality holds if and only if both tasks are identical . For the classification tasks , the TAS is invariant to the permutation of the data labels . In other words , modifying the numeric order of the data labels does not affect the affinity score between tasks . Additionally , TAS is mathematically well-defined , as we will prove in the sequel . Following the introduction of TAS , we propose a few-shot learning method based on the similarity between tasks . The lack of sufficient data in the few-shot learning problem has motivated us to use the knowledge of similar tasks for our few-shot learning method . In particular , our approach is capable of finding the relevant training labels to the ones in the given few-shot target tasks , and utilizing the corresponding data samples for episodically fine-tuning the few-shot model . Similar to recent few-shot approaches ( Chen et al. , 2021 ; Tian et al. , 2020 ) , we first use the entire training dataset to train a Whole-Classification network . Next , this trained model is used for extraction of the feature vectors for a set of constructed source task ( s ) generated from the training dataset . The purpose of the sources task ( s ) is to establish the most related task ( s ) to the target task defined according to the test data . In our framework , TAS with a graph matching algorithm is applied to find the affinity scores and the identification of the most related source task ( s ) to the target task . Lastly , we follow the standard few-shot meta-learning in which a set of base tasks are first constructed , and a few-shot model is fine-tuned according to the query set of these base tasks . Our approach has a unique distinguishing property from the common meta-learning approaches : our base tasks are constructed only based on the previously discovered related source tasks to episodically finetune the few-shot model . Specifically , the feature vectors of the query data from the base tasks are extracted by the encoder of the Whole-Classification network , and a k-nearest neighbors ( k-NN ) is applied to classify the features into the correct classes by updating the weights in the encoder . Using extensive simulations , we demonstrate that our approach of utilizing only the related training data is an effective method for boosting the performance of the few-shot model with less number of parameters in both 5-way 1-shot and 5-way 5-shot settings for various benchmark datasets . Experimental results on miniImageNet ( Vinyals et al. , 2016 ) , tieredImageNet ( Ren et al. , 2018 ) , CIFARFS ( Bertinetto et al. , 2018 ) , and FC-100 ( Oreshkin et al. , 2018 ) datasets are provided demonstrating the efficacy of the proposed approach compared to other state-of-the-art few-shot learning methods . 2 RELATED WORK . The similarity between tasks has been mainly studied in the transfer learning literature . Many approaches in transfer learning ( Silver & Bennett , 2008 ; Finn et al. , 2016 ; Mihalkova et al. , 2007 ; Niculescu-Mizil & Caruana , 2007 ; Luo et al. , 2017 ; Razavian et al. , 2014 ; Pan & Yang , 2010 ; Mallya & Lazebnik , 2018 ; Fernando et al. , 2017 ; Rusu et al. , 2016 ; Zamir et al. , 2018 ; Kirkpatrick et al. , 2017 ; Chen et al. , 2018 ) are based on the assumption that similar tasks often share similar architectures . However , these works mainly focus on transferring the trained weights from the previous tasks to an incoming task , and do not seek to define the measurement that can identify the related tasks . Though the relationship between visual tasks has been recently investigated by various papers ( Zamir et al. , 2018 ; Pal & Balasubramanian , 2019 ; Dwivedi & Roig , 2019 ; Achille et al. , 2019 ; Wang et al. , 2019 ; Standley et al. , 2020 ) , these works only focus on the weight-transferring and do not use task similarity for discovering the closest tasks for improving the overall performance . Additionally , the measures of task similarity from these papers are often assumed to be symmetric , which is not typically a realistic assumption . For example , it is easier to utilize the knowledge of a comprehensive task for learning a simpler task than the other way around . In the context of the few-shot learning ( FSL ) , the task affinity ( similarity ) has not been explicitly considered . Most of the recent few-shot learning approaches are based on the meta-learning frameworks ( Santoro et al. , 2016 ; Finn et al. , 2017 ; Vinyals et al. , 2016 ; Snell et al. , 2017 ) . In these approaches , episodic learning is often used in the training phase , in which the FSL models are exposed to data episodes . Each episode , consisting of the support and query sets , is characterized by the number of classes , the number of samples per class in the support set , and the number of samples per class in the query set . During the training phase , the loss over these training episodes is minimized . Generally , these episodic learning approaches can be divided into three main categories : metric-based method , optimization-based method , and memory-based method . In metricbased methods ( Vinyals et al. , 2016 ; Snell et al. , 2017 ; Koch et al. , 2015 ; Sung et al. , 2018 ) , a kernel function learns to measure the distance between data samples in the support sets , then classifies the data in the query set according to the closest data samples in the support set . On the other hand , the goal of optimization-based methods ( Finn et al. , 2017 ; Grant et al. , 2018 ; Rusu et al. , 2018 ; Lee et al. , 2019 ; Nichol et al. , 2018 ) is to find the models with faster adaption and convergence . Lastly , the memory-based methods ( Santoro et al. , 2016 ; Ravi & Larochelle , 2017 ; Munkhdalai et al. , 2018 ) use the network architectures with memory as the meta-learner for the few-shot learning . Overall , episodic learning in FSL has achieved great success on various few-shot meta-datasets . Recently , several methods with a pre-trained Whole-Classification network have achieved state-ofthe-art performance on multiple FSL benchmarks ( Chen et al. , 2021 ; Tian et al. , 2020 ; Rodrı́guez et al. , 2020 ; Rizve et al. , 2021 ) . Instead of initializing the FSL model from scratches , these methods focus on leveraging the entire training labels for pre-training a powerful and robust classifier . The pre-trained model , by itself , outperforms several meta-learning approaches in numerous FSL datasets ( e.g. , miniImageNet , tieredImageNet , CIFAR-FS , etc. ) . Next , the Whole-Classification network is used as a feature extractor for a simple base learner ( e.g. , logistic regression , K-nearest neighbor , etc . ) and is often fine-tuned using episodic learning . Various efforts have been investigated to improve the Whole-Classification network for the few-shot learning , including manifold mixup as self-supervised loss ( Mangla et al. , 2020 ) , knowledge distillation on the pre-trained classifier ( Verma et al. , 2019 ; Tian et al. , 2020 ) , and data-augmentation with combined loss functions ( Rodrı́guez et al. , 2020 ; Rizve et al. , 2021 ) . However , none of these approaches consider the task affinity in their training procedure . Here , we propose a task affinity measure that can identify the related tasks to a target task , given only a few data samples . Then we utilize the data samples in the related tasks for episodically fine-tuning the final few-shot classifier . 3 PRELIMINARIES . In this section , we present the definition of the task affinity score . First , we need to define some notations and definitions used throughout this paper . We denote the matrix infinity-norm by ||B||∞ = maxi , j |Bij | . We also denote a task T and its dataset X jointly by a pair ( T , X ) . To be consistent with the few-shot terminologies , a dataset X is shown by the union of the support set , Xsupport and the query set , Xquery , i.e. , X = Xsupport ∪ Xquery . Let PNθ ( T , Xquery ) ∈ [ 0 , 1 ] be a function that measures the performance of a given model Nθ , parameterized by θ ∈ Rd on the query setXquery of the task T . We define an ε-approximation network , representing the task-dataset pair ( T , X ) as follows : Definition 1 ( ε-approximation Network ) . A model Nθ is called an ε-approximation network for a pair task-dataset ( T , X ) if it is trained using the support dataXsupport such thatPNθ ( T , Xquery ) ≥ 1− ε , for a given 0 < ε < 1 . In practice , the architectures for the ε-approximation networks for a given task T are selected from a pool of well-known hand-designed architectures , such as ResNet , VGG , DenseNet , etc . We also need to recall the definition of the Fisher Information matrix for a neural network . Definition 2 ( Fisher Information Matrix ) . For a neural network Nθ with weights θ , data X , and the negative log-likelihood loss function L ( θ ) : = L ( θ , X ) , the Fisher Information matrix is defined as : F ( θ ) = E [ ∇θL ( θ ) ∇θL ( θ ) T ] = −E [ H ( L ( θ ) ) ] , ( 1 ) where H is the Hessian matrix , i.e. , H ( L ( θ ) ) = ∇2θL ( θ ) , and expectation is taken w.r.t the data . In practice , we use the empirical Fisher Information matrix computed as follows : F̂ ( θ ) = 1 |X| ∑ i∈X ∇θLi ( θ ) ∇θLi ( θ ) T , ( 2 ) where Li ( θ ) is the loss value for the ith data point in X . Next , we define the task affinity score , which measures the similarity from a source task , Ta to a target task , Tb . Definition 3 ( Task Affinity Score ( TAS ) ) . Let ( Ta , Xa ) be the source task-dataset pair with Nθa denotes its corresponding ε-approximation network . Let Fa , a be the Fisher Information matrix of Nθa with the query data X query a from the task Ta . For the target task-dataset pair ( Tb , Xb ) , let Fa , b be the Fisher Information matrix of Nθa with the support data X support b from the task Tb . We define the TAS from the source task Ta to the target task Tb based on Fréchet distance as follows : s [ a , b ] : = 1√ 2 Trace ( Fa , a + Fa , b − 2 ( Fa , aFa , b ) 1/2 ) 1/2 . ( 3 ) Here , we use the diagonal approximation of the Fisher Information matrix since computing the full Fisher matrix is prohibitive in the huge space of neural network parameters . We also normalize these matrices to have unit trace . As a result , the TAS in equation ( 3 ) can be simplified by the following formula : s [ a , b ] = 1√ 2 ∥∥∥F 1/2a , a − F 1/2a , b ∥∥∥ F = 1√ 2 [ ∑ i ( ( F iia , a ) 1/2 − ( F iia , b ) 1/2 ) 2 ] 1/2 , ( 4 ) where F ii denotes the ith diagonal entry of the Fisher Information matrix . The TAS ranges from 0 to 1 , with the score s = 0 denotes a perfect similarity and the score s = 1 indicates a perfect dissimilarity . In the next section , we present our few-shot approach based on the above TAS . | This paper presents a new affinity score based on the Fisher Information matrix from a source to a target task. The authors also develop a few-shot learning procedure based on a pre-trained Whole-Classification network approach. In this procedure, training labels are matched via a maximum matching algorithm, and the target task for training is selected using the proposed affinity score. The effectiveness of the proposed score is demonstrated using benchmark datasets in the problem of few-shot learning. | SP:8ac962ba488c992435442b5a0d5a22bb4b500c86 |
Task Affinity with Maximum Bipartite Matching in Few-Shot Learning | 1 INTRODUCTION . Leveraging the knowledge of one task in training the other related tasks is an effective approach to training deep neural networks with limited data . In fact , transfer learning , multi-task learning ( Standley et al. , 2020 ) , and meta-learning ( Finn et al. , 2017 ) are examples of training a new task using the knowledge of others . In fact , a strong piece of work ( Standley et al. , 2020 ) has shown that training similar tasks together in multi-task learning often achieves higher accuracy on average . However , characterizing the similarity between tasks remains a challenging problem . In this paper , we present a task similarity measure representing the complexity of utilizing the knowledge of one task for learning another one . Our measure , called Task Affinity Score ( TAS ) , is non-commutative and is defined as a function of the Fisher Information matrix , which is based on the second-derivative of the loss function with respect to the parameters of the model under consideration . By definition , the TAS between two tasks is always greater or equal to 0 , where the equality holds if and only if both tasks are identical . For the classification tasks , the TAS is invariant to the permutation of the data labels . In other words , modifying the numeric order of the data labels does not affect the affinity score between tasks . Additionally , TAS is mathematically well-defined , as we will prove in the sequel . Following the introduction of TAS , we propose a few-shot learning method based on the similarity between tasks . The lack of sufficient data in the few-shot learning problem has motivated us to use the knowledge of similar tasks for our few-shot learning method . In particular , our approach is capable of finding the relevant training labels to the ones in the given few-shot target tasks , and utilizing the corresponding data samples for episodically fine-tuning the few-shot model . Similar to recent few-shot approaches ( Chen et al. , 2021 ; Tian et al. , 2020 ) , we first use the entire training dataset to train a Whole-Classification network . Next , this trained model is used for extraction of the feature vectors for a set of constructed source task ( s ) generated from the training dataset . The purpose of the sources task ( s ) is to establish the most related task ( s ) to the target task defined according to the test data . In our framework , TAS with a graph matching algorithm is applied to find the affinity scores and the identification of the most related source task ( s ) to the target task . Lastly , we follow the standard few-shot meta-learning in which a set of base tasks are first constructed , and a few-shot model is fine-tuned according to the query set of these base tasks . Our approach has a unique distinguishing property from the common meta-learning approaches : our base tasks are constructed only based on the previously discovered related source tasks to episodically finetune the few-shot model . Specifically , the feature vectors of the query data from the base tasks are extracted by the encoder of the Whole-Classification network , and a k-nearest neighbors ( k-NN ) is applied to classify the features into the correct classes by updating the weights in the encoder . Using extensive simulations , we demonstrate that our approach of utilizing only the related training data is an effective method for boosting the performance of the few-shot model with less number of parameters in both 5-way 1-shot and 5-way 5-shot settings for various benchmark datasets . Experimental results on miniImageNet ( Vinyals et al. , 2016 ) , tieredImageNet ( Ren et al. , 2018 ) , CIFARFS ( Bertinetto et al. , 2018 ) , and FC-100 ( Oreshkin et al. , 2018 ) datasets are provided demonstrating the efficacy of the proposed approach compared to other state-of-the-art few-shot learning methods . 2 RELATED WORK . The similarity between tasks has been mainly studied in the transfer learning literature . Many approaches in transfer learning ( Silver & Bennett , 2008 ; Finn et al. , 2016 ; Mihalkova et al. , 2007 ; Niculescu-Mizil & Caruana , 2007 ; Luo et al. , 2017 ; Razavian et al. , 2014 ; Pan & Yang , 2010 ; Mallya & Lazebnik , 2018 ; Fernando et al. , 2017 ; Rusu et al. , 2016 ; Zamir et al. , 2018 ; Kirkpatrick et al. , 2017 ; Chen et al. , 2018 ) are based on the assumption that similar tasks often share similar architectures . However , these works mainly focus on transferring the trained weights from the previous tasks to an incoming task , and do not seek to define the measurement that can identify the related tasks . Though the relationship between visual tasks has been recently investigated by various papers ( Zamir et al. , 2018 ; Pal & Balasubramanian , 2019 ; Dwivedi & Roig , 2019 ; Achille et al. , 2019 ; Wang et al. , 2019 ; Standley et al. , 2020 ) , these works only focus on the weight-transferring and do not use task similarity for discovering the closest tasks for improving the overall performance . Additionally , the measures of task similarity from these papers are often assumed to be symmetric , which is not typically a realistic assumption . For example , it is easier to utilize the knowledge of a comprehensive task for learning a simpler task than the other way around . In the context of the few-shot learning ( FSL ) , the task affinity ( similarity ) has not been explicitly considered . Most of the recent few-shot learning approaches are based on the meta-learning frameworks ( Santoro et al. , 2016 ; Finn et al. , 2017 ; Vinyals et al. , 2016 ; Snell et al. , 2017 ) . In these approaches , episodic learning is often used in the training phase , in which the FSL models are exposed to data episodes . Each episode , consisting of the support and query sets , is characterized by the number of classes , the number of samples per class in the support set , and the number of samples per class in the query set . During the training phase , the loss over these training episodes is minimized . Generally , these episodic learning approaches can be divided into three main categories : metric-based method , optimization-based method , and memory-based method . In metricbased methods ( Vinyals et al. , 2016 ; Snell et al. , 2017 ; Koch et al. , 2015 ; Sung et al. , 2018 ) , a kernel function learns to measure the distance between data samples in the support sets , then classifies the data in the query set according to the closest data samples in the support set . On the other hand , the goal of optimization-based methods ( Finn et al. , 2017 ; Grant et al. , 2018 ; Rusu et al. , 2018 ; Lee et al. , 2019 ; Nichol et al. , 2018 ) is to find the models with faster adaption and convergence . Lastly , the memory-based methods ( Santoro et al. , 2016 ; Ravi & Larochelle , 2017 ; Munkhdalai et al. , 2018 ) use the network architectures with memory as the meta-learner for the few-shot learning . Overall , episodic learning in FSL has achieved great success on various few-shot meta-datasets . Recently , several methods with a pre-trained Whole-Classification network have achieved state-ofthe-art performance on multiple FSL benchmarks ( Chen et al. , 2021 ; Tian et al. , 2020 ; Rodrı́guez et al. , 2020 ; Rizve et al. , 2021 ) . Instead of initializing the FSL model from scratches , these methods focus on leveraging the entire training labels for pre-training a powerful and robust classifier . The pre-trained model , by itself , outperforms several meta-learning approaches in numerous FSL datasets ( e.g. , miniImageNet , tieredImageNet , CIFAR-FS , etc. ) . Next , the Whole-Classification network is used as a feature extractor for a simple base learner ( e.g. , logistic regression , K-nearest neighbor , etc . ) and is often fine-tuned using episodic learning . Various efforts have been investigated to improve the Whole-Classification network for the few-shot learning , including manifold mixup as self-supervised loss ( Mangla et al. , 2020 ) , knowledge distillation on the pre-trained classifier ( Verma et al. , 2019 ; Tian et al. , 2020 ) , and data-augmentation with combined loss functions ( Rodrı́guez et al. , 2020 ; Rizve et al. , 2021 ) . However , none of these approaches consider the task affinity in their training procedure . Here , we propose a task affinity measure that can identify the related tasks to a target task , given only a few data samples . Then we utilize the data samples in the related tasks for episodically fine-tuning the final few-shot classifier . 3 PRELIMINARIES . In this section , we present the definition of the task affinity score . First , we need to define some notations and definitions used throughout this paper . We denote the matrix infinity-norm by ||B||∞ = maxi , j |Bij | . We also denote a task T and its dataset X jointly by a pair ( T , X ) . To be consistent with the few-shot terminologies , a dataset X is shown by the union of the support set , Xsupport and the query set , Xquery , i.e. , X = Xsupport ∪ Xquery . Let PNθ ( T , Xquery ) ∈ [ 0 , 1 ] be a function that measures the performance of a given model Nθ , parameterized by θ ∈ Rd on the query setXquery of the task T . We define an ε-approximation network , representing the task-dataset pair ( T , X ) as follows : Definition 1 ( ε-approximation Network ) . A model Nθ is called an ε-approximation network for a pair task-dataset ( T , X ) if it is trained using the support dataXsupport such thatPNθ ( T , Xquery ) ≥ 1− ε , for a given 0 < ε < 1 . In practice , the architectures for the ε-approximation networks for a given task T are selected from a pool of well-known hand-designed architectures , such as ResNet , VGG , DenseNet , etc . We also need to recall the definition of the Fisher Information matrix for a neural network . Definition 2 ( Fisher Information Matrix ) . For a neural network Nθ with weights θ , data X , and the negative log-likelihood loss function L ( θ ) : = L ( θ , X ) , the Fisher Information matrix is defined as : F ( θ ) = E [ ∇θL ( θ ) ∇θL ( θ ) T ] = −E [ H ( L ( θ ) ) ] , ( 1 ) where H is the Hessian matrix , i.e. , H ( L ( θ ) ) = ∇2θL ( θ ) , and expectation is taken w.r.t the data . In practice , we use the empirical Fisher Information matrix computed as follows : F̂ ( θ ) = 1 |X| ∑ i∈X ∇θLi ( θ ) ∇θLi ( θ ) T , ( 2 ) where Li ( θ ) is the loss value for the ith data point in X . Next , we define the task affinity score , which measures the similarity from a source task , Ta to a target task , Tb . Definition 3 ( Task Affinity Score ( TAS ) ) . Let ( Ta , Xa ) be the source task-dataset pair with Nθa denotes its corresponding ε-approximation network . Let Fa , a be the Fisher Information matrix of Nθa with the query data X query a from the task Ta . For the target task-dataset pair ( Tb , Xb ) , let Fa , b be the Fisher Information matrix of Nθa with the support data X support b from the task Tb . We define the TAS from the source task Ta to the target task Tb based on Fréchet distance as follows : s [ a , b ] : = 1√ 2 Trace ( Fa , a + Fa , b − 2 ( Fa , aFa , b ) 1/2 ) 1/2 . ( 3 ) Here , we use the diagonal approximation of the Fisher Information matrix since computing the full Fisher matrix is prohibitive in the huge space of neural network parameters . We also normalize these matrices to have unit trace . As a result , the TAS in equation ( 3 ) can be simplified by the following formula : s [ a , b ] = 1√ 2 ∥∥∥F 1/2a , a − F 1/2a , b ∥∥∥ F = 1√ 2 [ ∑ i ( ( F iia , a ) 1/2 − ( F iia , b ) 1/2 ) 2 ] 1/2 , ( 4 ) where F ii denotes the ith diagonal entry of the Fisher Information matrix . The TAS ranges from 0 to 1 , with the score s = 0 denotes a perfect similarity and the score s = 1 indicates a perfect dissimilarity . In the next section , we present our few-shot approach based on the above TAS . | This paper proposes a few shot learning method, which tries to measure the affinity degree between different tasks. Based on the affinity score, the relevant tasks are exploited for training to boost the performance of target tasks. The Task Affinity Score (TSA) is proposed, which is novel to measure the dependency between different tasks. The reasonability of TSA is also validated with mathematical proof. | SP:8ac962ba488c992435442b5a0d5a22bb4b500c86 |
Distributional Perturbation for Efficient Exploration in Distributional Reinforcement Learning | 1 INTRODUCTION . Distributional reinforcement learning ( DRL ) learns the stochasticity of returns in the reinforcement learning environments and has shown remarkable performance in several benchmark tasks . Its model generates the approximated distribution of returns , where the mean value implies the traditional Qvalue ( Bellemare et al. , 2017 ; Dabney et al. , 2018b ; Choi et al. , 2019 ) . Learning procedure with stochasticity through return distribution is represented by parametric ( epistemic ) uncertainty , which is due to insufficient or inaccurate data , and intrinsic ( aleatoric ) uncertainty , which is inherently possessed randomness in the environment . ( Chow et al. , 2015 ; Dabney et al. , 2018a ) The learned stochasticity gives rise to the notion of risk-sensitivity , and some distributional reinforcement learning algorithms distort the learned distribution to create a risk-averse or risk-seeking policy . Another way to employ the uncertainty is to design an efficient exploration method which is essential to find an optimal behavior with a few number of trials . Optimism in the face of uncertainty ( OFU ) is one of the fundamental exploration principles that employs parametric uncertainty to promote exploring less understood behaviors and to construct confidence set . Most OFU algorithms select an action with the highest upper-confidence bound ( UCB ) of uncertainty which can be considered as the optimistic decision at the moment ( Chen et al. , 2017 ; Ciosek et al. , 2019 ) . In deep RL , several OFU studies often model the uncertainty explicitly through the Bayesian posterior , which is estimated by using neural networks . However , learning the representation of high-dimensional state-action space and Bellman update simultaneously leads to unstable propagation ( Yang et al. , 2021 ) . On the other hand , DRL can provide more statistical information during control such as mode , median , or variance by addressing full characteristics of the return distribution . Despite the richness of information for return distribution , only a few DRL methods have tried to employ the benefits of distributional perspective for exploration ( Tang & Agrawal , 2018 ; Mavrin et al. , 2019 ; Clements et al. , 2019 ) . To estimate the uncertainty from distributional outputs , descriptive statistics that is composed of a mixture of intrinsic and parametric uncertainty can be utilized . Unfortunately , sepa- rating these two types of uncertainty during learning is not a trivial task . Mavrin et al . ( 2019 ) propose a distribution-based OFU exploration that schedules a decaying bonus rate to suppress the effect of intrinsic uncertainty , which unintentionally induces a risk-seeking policy . Although OFU based approaches try to reduce parametric uncertainty by revisiting the state with high uncertainty , there exists the side effect that the criteria unfortunately forces the agent to chase the intrinsic uncertainty ( risk ) simultaneously during updates . Relying on a specific criteria causes an one-sided tendency on risk and makes an agent consistently select certain actions during exploration as degrading performance . We call this phenomenon as stuckness . In this paper , we introduce perturbed quantile regression ( PQR ) which perturbs the criterion on uncertainty by randomizing the risk criterion in action selection . First , the distributional perturbation on return distribution is to re-evaluate the estimate of return by distorting the learned distribution with perturbation weight . Unlike the typical worst-case approach in risk-sensitive settings or OFU based approaches , we instead randomly sample a risk measure from an ambiguity set , which represents that the risk setting is ambiguous when the characteristics of a given environment are unknown . We empirically demonstrate on the stochastic variant of N-Chain environment ( Osband et al. , 2016 ) that a randomized scheme is more effective than OFU to alleviate the sub-optimality problem of tendency to obtain risk-seeking policies . Second , any risk-measure with some time-varying perturbation constraint allows us to average over all possible risk-sensitive behaviors to achieve the optimal policy . We provide a sufficient condition for the convergence of return distribution in the weaker contraction property . Our method covers the full elements of the reinforcement learning with distributional perspective from the novel exploration method with distributional perturbation to the theoretically guaranteed convergence of return distribution , which has the same fixed-point with the standard Bellman optimality operator . The proposed algorithm is based on QR-DQN , which is a baseline of DRL architecture to learn a return distribution , and we show that PQR outperforms QR-DQN and other DRL baselines in several benchmark environments , LunarLander-v2 and Atari games . 2 BACKGROUNDS & RELATED WORKS . 2.1 DISTRIBUTIONAL REINFORCEMENT LEARNING . We consider a Markov decision process ( MDP ) which is defined as a tuple ( S , A , P , R , γ ) where S is a finite state space , A is a finite action space , P : S×A×S → [ 0 , 1 ] is the transition probability , R is the random variable of rewards in [ −Rmax , Rmax ] , and γ ∈ [ 0 , 1 ) is the discount factor . We define a stochastic policy π ( ·|s ) which is a conditional distribution overA given state s. For a fixed policy π , we denote Zπ ( s , a ) as a random variable of return distribution of state-action pair ( s , a ) following the policy π . We attain Zπ ( s , a ) = ∑∞ t=0 γ tR ( St , At ) , where St+1 ∼ P ( ·|St , At ) , At ∼ π ( ·|St ) and S0 = s , A0 = a . Then , we define an action-value function as Qπ ( s , a ) = E [ Zπ ( s , a ) ] in [ −Vmax , Vmax ] where Vmax = Rmax/ ( 1−γ ) . For regularity , we further notice that the space of actionvalue distributions Z has the first moment bounded by Vmax : Z = { Z : S ×A →P ( R ) ∣∣ E [ |Z ( s , a ) | ] ≤ Vmax , ∀ ( s , a ) } . In distributional RL , the return distribution for the fixed π can be computed via dynamic programming with the distributional Bellman operator defined as ( Bellemare et al. , 2017 ) , τ πZ ( s , a ) D= R ( s , a ) + γZ ( S′ , A′ ) , S′ ∼ P ( ·|s , a ) , A′ ∼ π ( ·|S′ ) where D= denotes that both random variables share the same probability distribution . We can compute the optimal return distribution by using the distributional Bellman optimality operator defined as , τZ ( s , a ) D= R ( s , a ) + γZ ( S′ , a∗ ) , S′ ∼ P ( ·|s , a ) , a∗ = argmax a′ EZ [ Z ( S′ , a′ ) ] . Bellemare et al . ( 2017 ) have shown that τ π is a contraction in a maximal form of the Wasserstein metric but τ is not a contraction in any metric . Combining with the expectation operator , Eτ is a contraction so that we can guarantee that the expectation of Z converges to the optimal state-action value , while the convergence of a return distribution itself is not guaranteed . 2.2 EXPLORATION ON DISTRIBUTIONAL REINFORCEMENT LEARNING . In this section , we will briefly describe the main practical algorithm for DRL with a deep neural network , and explain the derived exploration method . To combine with deep RL , a parametric distribution Zθ is used to learn a return distribution by using τ . Dabney et al . ( 2018b ) have employed a quantile regression to approximate the full distribution by letting Zθ ( s , a ) = 1N ∑N i=1 δθi ( s , a ) where the parameter θ represents the locations of a mixture of N Dirac delta functions . Each θi represents the value where the cumulative probability is τi = iN . Then , by using the quantile representation with the distributional Bellman optimality operator , the problem can be formulated as a minimization problem as , θ = argmin θ′ D ( Zθ′ ( st , at ) , τ Zθ− ( st , at ) ) : = N∑ i=1 N∑ j=1 1 N [ ρκτ̂i ( rt + γθ − j ( st+1 , a ′ ) − θ′i ( st , at ) ) ] where ( st , at , rt , st+1 ) is a given transition pair , τ̂i = τi−1+τi 2 , a ′ : = argmaxa′ EZ [ Zθ ( st+1 , a′ ) ] , ρκτ̂i ( x ) : = |τ̂i−δ { x < 0 } |Lκ ( x ) , andLκ ( x ) : = x 2/2 for |x| ≤ κ andLκ ( x ) : = κ ( |x|− 12κ ) , otherwise . Based on the quantile regression , Dabney et al . ( 2018b ) have proposed a quantile regression deep Q network ( QR-DQN ) that shows better empirical performance than the categorical approach ( Bellemare et al. , 2017 ) since the quantile regression does not restrict the bounds for return . As deep RL typically did , QR-DQN adjusts ϵ-greedy schedule , which selects the greedy action with probability 1− ϵ and otherwise selects random available actions uniformly . The majority of QR-DQN variants ( Dabney et al. , 2018a ; Yang et al. , 2019 ) rely on the same exploration method . However , such approaches do not put aside inferior actions from the selection list and thus suffers from a loss ( Osband et al. , 2019 ) . Hence , selecting a statistically plausible action is crucial for efficient exploration . In recent studies , Mavrin et al . ( 2019 ) modifies the criterion of selecting an action for efficient exploration in the face of uncertainty . Using left truncated variance as a bonus term to estimate optimistic way and decaying ratio ct to suppress the intrinsic uncertainty , DLTV was proposed as an uncertainty-based exploration in DRL without using ϵ-greedy exploration . At timestep t , the action selection of DLTV can be described as : a∗ = argmax a′ ( EP [ Z ( s′ , a′ ) ] + ct √ σ2+ ( s ′ , a′ ) ) , ct = c √ log t t , σ2+ = 1 2N N∑ i=N2 ( θN 2 − θi ) 2 , where θi ’ s are the values of quantile level τi . DLTV shows that a constant schedule degrades the performance significantly compared to a decaying schedule . 2.3 RISK IN DISTRIBUTIONAL REINFORCEMENT LEARNING . Instead of an expected value , risk-sensitive RL tries to maximize a risk measure such as MeanVariance ( Zhang et al. , 2020 ) , Value-at-Risk ( VaR ) ( Chow et al. , 2017 ) , or Conditional Value-at-Risk ( CVaR ) ( Rockafellar et al. , 2000 ; Rigter et al. , 2021 ) , which result in different classes of optimal policy . Especially , Dabney et al . ( 2018a ) interprets risk measures as the expected utility function of the return , i.e. , EZ [ U ( Z ( s , a ) ) ] . Under this interpretation , risk-sensitive RL can be formulated as the maximization problem with various types of utility functions . If the utility function U is linear , the policy obtained under such risk measure is called risk-neutral . If U is concave or convex , the resulting policy is termed as risk-averse or risk-seeking , respectively . In general , a distortion risk measure is a generalized expression of risk measure generated from the distortion function . Definition 1 . Let h : [ 0 , 1 ] → [ 0 , 1 ] be a distortion function such that h ( 0 ) = 0 , h ( 1 ) = 1 and nondecreasing . Given a probability space ( Ω , F , P ) and a random variable Z : Ω → R , a distortion risk measure ρh corresponding to a distortion function h is defined by : ρh ( Z ) : = Eh ( P ) [ Z ] = ∫ ∞ −∞ z ∂ ∂z ( h ◦ FZ ) ( z ) dz , where FZ is the cumulative distribution function of Z . In fact , non-decreasing property of h makes it possible to distort the distribution of Z while satisfying the fundamental property of CDF . Note that the concavity and the convexity of distortion function also imply risk-averse or risk-seeking behavior , respectively . Dhaene et al . ( 2012 ) showed that any distorted expectation can be expressed as weighted averages of quantiles . In other words , generating a distortion risk measure is equivalent to choosing a reweighting distribution . Fortunately , distributional RL has a suitable configuration to apply those uncertainty-based approaches that could naturally expand the class of policies . Chow et al . ( 2015 ) and Stanko & Macek ( 2019 ) considered risk-sensitive RL with a CVaR objective , where risk is related to robust decision making . Dabney et al . ( 2018a ) expanded the class of policies on arbitrary distortion risk measures and investigated the effects of a distinct distortion risk measures by changing the sampling distribution for quantile targets τ . Unlike the usual risk-sensitive RL , DLTV applied the risk measure only on action selection , while it keeps the standard objective to obtain a risk-neutral optimal policy . Our analysis shows that risk-based exploration can utilize risk measures in two different ways : ( 1 ) selecting action and ( 2 ) evaluating the value function by using distorted ( perturbed ) expectation . | The paper proposes a novel distributional RL algorithm that is neither risk-seeking (exploratory) or risk-averse (exploitatory) -- but rather risk-neutral. The paper motivates the need for risk neutrality from the family of works applying OFU (optimism in the face of uncertainty) to distributional RL -- it states that prior works in this space induce a one-sided risk tendency (risk-seeking or risk-averse) which is undesirable as it leads to “biased exploration”. An N-chain environment is initially studied where it is shown that prior works (DLTV, QRDQN) are not able to identify the optimal action as fast as the proposed method (PQR) -- the prior works are misled by the low probability high reward side of the N-chain environment as opposed to the optimal side which provides maximum averaged reward. The paper then proposes a method for perturbing the risk-measure in risk-sensitive RL such that the resulting perturbed distributional bellman operator (PDBOO) converges to the same fixed point as the standard bellman operator (with some weak assumptions) and hence, produces a risk-neutral policy. The paper presented results in the LunarLander-v2 and Atari domain (4 Atari games selected), demonstrating that prior works with one-sided risk tendencies do not perform as well as the proposed risk-neutral method (PQR). | SP:dc612fcfbb4d4a84f5827bb9362c82326955f2b4 |
Distributional Perturbation for Efficient Exploration in Distributional Reinforcement Learning | 1 INTRODUCTION . Distributional reinforcement learning ( DRL ) learns the stochasticity of returns in the reinforcement learning environments and has shown remarkable performance in several benchmark tasks . Its model generates the approximated distribution of returns , where the mean value implies the traditional Qvalue ( Bellemare et al. , 2017 ; Dabney et al. , 2018b ; Choi et al. , 2019 ) . Learning procedure with stochasticity through return distribution is represented by parametric ( epistemic ) uncertainty , which is due to insufficient or inaccurate data , and intrinsic ( aleatoric ) uncertainty , which is inherently possessed randomness in the environment . ( Chow et al. , 2015 ; Dabney et al. , 2018a ) The learned stochasticity gives rise to the notion of risk-sensitivity , and some distributional reinforcement learning algorithms distort the learned distribution to create a risk-averse or risk-seeking policy . Another way to employ the uncertainty is to design an efficient exploration method which is essential to find an optimal behavior with a few number of trials . Optimism in the face of uncertainty ( OFU ) is one of the fundamental exploration principles that employs parametric uncertainty to promote exploring less understood behaviors and to construct confidence set . Most OFU algorithms select an action with the highest upper-confidence bound ( UCB ) of uncertainty which can be considered as the optimistic decision at the moment ( Chen et al. , 2017 ; Ciosek et al. , 2019 ) . In deep RL , several OFU studies often model the uncertainty explicitly through the Bayesian posterior , which is estimated by using neural networks . However , learning the representation of high-dimensional state-action space and Bellman update simultaneously leads to unstable propagation ( Yang et al. , 2021 ) . On the other hand , DRL can provide more statistical information during control such as mode , median , or variance by addressing full characteristics of the return distribution . Despite the richness of information for return distribution , only a few DRL methods have tried to employ the benefits of distributional perspective for exploration ( Tang & Agrawal , 2018 ; Mavrin et al. , 2019 ; Clements et al. , 2019 ) . To estimate the uncertainty from distributional outputs , descriptive statistics that is composed of a mixture of intrinsic and parametric uncertainty can be utilized . Unfortunately , sepa- rating these two types of uncertainty during learning is not a trivial task . Mavrin et al . ( 2019 ) propose a distribution-based OFU exploration that schedules a decaying bonus rate to suppress the effect of intrinsic uncertainty , which unintentionally induces a risk-seeking policy . Although OFU based approaches try to reduce parametric uncertainty by revisiting the state with high uncertainty , there exists the side effect that the criteria unfortunately forces the agent to chase the intrinsic uncertainty ( risk ) simultaneously during updates . Relying on a specific criteria causes an one-sided tendency on risk and makes an agent consistently select certain actions during exploration as degrading performance . We call this phenomenon as stuckness . In this paper , we introduce perturbed quantile regression ( PQR ) which perturbs the criterion on uncertainty by randomizing the risk criterion in action selection . First , the distributional perturbation on return distribution is to re-evaluate the estimate of return by distorting the learned distribution with perturbation weight . Unlike the typical worst-case approach in risk-sensitive settings or OFU based approaches , we instead randomly sample a risk measure from an ambiguity set , which represents that the risk setting is ambiguous when the characteristics of a given environment are unknown . We empirically demonstrate on the stochastic variant of N-Chain environment ( Osband et al. , 2016 ) that a randomized scheme is more effective than OFU to alleviate the sub-optimality problem of tendency to obtain risk-seeking policies . Second , any risk-measure with some time-varying perturbation constraint allows us to average over all possible risk-sensitive behaviors to achieve the optimal policy . We provide a sufficient condition for the convergence of return distribution in the weaker contraction property . Our method covers the full elements of the reinforcement learning with distributional perspective from the novel exploration method with distributional perturbation to the theoretically guaranteed convergence of return distribution , which has the same fixed-point with the standard Bellman optimality operator . The proposed algorithm is based on QR-DQN , which is a baseline of DRL architecture to learn a return distribution , and we show that PQR outperforms QR-DQN and other DRL baselines in several benchmark environments , LunarLander-v2 and Atari games . 2 BACKGROUNDS & RELATED WORKS . 2.1 DISTRIBUTIONAL REINFORCEMENT LEARNING . We consider a Markov decision process ( MDP ) which is defined as a tuple ( S , A , P , R , γ ) where S is a finite state space , A is a finite action space , P : S×A×S → [ 0 , 1 ] is the transition probability , R is the random variable of rewards in [ −Rmax , Rmax ] , and γ ∈ [ 0 , 1 ) is the discount factor . We define a stochastic policy π ( ·|s ) which is a conditional distribution overA given state s. For a fixed policy π , we denote Zπ ( s , a ) as a random variable of return distribution of state-action pair ( s , a ) following the policy π . We attain Zπ ( s , a ) = ∑∞ t=0 γ tR ( St , At ) , where St+1 ∼ P ( ·|St , At ) , At ∼ π ( ·|St ) and S0 = s , A0 = a . Then , we define an action-value function as Qπ ( s , a ) = E [ Zπ ( s , a ) ] in [ −Vmax , Vmax ] where Vmax = Rmax/ ( 1−γ ) . For regularity , we further notice that the space of actionvalue distributions Z has the first moment bounded by Vmax : Z = { Z : S ×A →P ( R ) ∣∣ E [ |Z ( s , a ) | ] ≤ Vmax , ∀ ( s , a ) } . In distributional RL , the return distribution for the fixed π can be computed via dynamic programming with the distributional Bellman operator defined as ( Bellemare et al. , 2017 ) , τ πZ ( s , a ) D= R ( s , a ) + γZ ( S′ , A′ ) , S′ ∼ P ( ·|s , a ) , A′ ∼ π ( ·|S′ ) where D= denotes that both random variables share the same probability distribution . We can compute the optimal return distribution by using the distributional Bellman optimality operator defined as , τZ ( s , a ) D= R ( s , a ) + γZ ( S′ , a∗ ) , S′ ∼ P ( ·|s , a ) , a∗ = argmax a′ EZ [ Z ( S′ , a′ ) ] . Bellemare et al . ( 2017 ) have shown that τ π is a contraction in a maximal form of the Wasserstein metric but τ is not a contraction in any metric . Combining with the expectation operator , Eτ is a contraction so that we can guarantee that the expectation of Z converges to the optimal state-action value , while the convergence of a return distribution itself is not guaranteed . 2.2 EXPLORATION ON DISTRIBUTIONAL REINFORCEMENT LEARNING . In this section , we will briefly describe the main practical algorithm for DRL with a deep neural network , and explain the derived exploration method . To combine with deep RL , a parametric distribution Zθ is used to learn a return distribution by using τ . Dabney et al . ( 2018b ) have employed a quantile regression to approximate the full distribution by letting Zθ ( s , a ) = 1N ∑N i=1 δθi ( s , a ) where the parameter θ represents the locations of a mixture of N Dirac delta functions . Each θi represents the value where the cumulative probability is τi = iN . Then , by using the quantile representation with the distributional Bellman optimality operator , the problem can be formulated as a minimization problem as , θ = argmin θ′ D ( Zθ′ ( st , at ) , τ Zθ− ( st , at ) ) : = N∑ i=1 N∑ j=1 1 N [ ρκτ̂i ( rt + γθ − j ( st+1 , a ′ ) − θ′i ( st , at ) ) ] where ( st , at , rt , st+1 ) is a given transition pair , τ̂i = τi−1+τi 2 , a ′ : = argmaxa′ EZ [ Zθ ( st+1 , a′ ) ] , ρκτ̂i ( x ) : = |τ̂i−δ { x < 0 } |Lκ ( x ) , andLκ ( x ) : = x 2/2 for |x| ≤ κ andLκ ( x ) : = κ ( |x|− 12κ ) , otherwise . Based on the quantile regression , Dabney et al . ( 2018b ) have proposed a quantile regression deep Q network ( QR-DQN ) that shows better empirical performance than the categorical approach ( Bellemare et al. , 2017 ) since the quantile regression does not restrict the bounds for return . As deep RL typically did , QR-DQN adjusts ϵ-greedy schedule , which selects the greedy action with probability 1− ϵ and otherwise selects random available actions uniformly . The majority of QR-DQN variants ( Dabney et al. , 2018a ; Yang et al. , 2019 ) rely on the same exploration method . However , such approaches do not put aside inferior actions from the selection list and thus suffers from a loss ( Osband et al. , 2019 ) . Hence , selecting a statistically plausible action is crucial for efficient exploration . In recent studies , Mavrin et al . ( 2019 ) modifies the criterion of selecting an action for efficient exploration in the face of uncertainty . Using left truncated variance as a bonus term to estimate optimistic way and decaying ratio ct to suppress the intrinsic uncertainty , DLTV was proposed as an uncertainty-based exploration in DRL without using ϵ-greedy exploration . At timestep t , the action selection of DLTV can be described as : a∗ = argmax a′ ( EP [ Z ( s′ , a′ ) ] + ct √ σ2+ ( s ′ , a′ ) ) , ct = c √ log t t , σ2+ = 1 2N N∑ i=N2 ( θN 2 − θi ) 2 , where θi ’ s are the values of quantile level τi . DLTV shows that a constant schedule degrades the performance significantly compared to a decaying schedule . 2.3 RISK IN DISTRIBUTIONAL REINFORCEMENT LEARNING . Instead of an expected value , risk-sensitive RL tries to maximize a risk measure such as MeanVariance ( Zhang et al. , 2020 ) , Value-at-Risk ( VaR ) ( Chow et al. , 2017 ) , or Conditional Value-at-Risk ( CVaR ) ( Rockafellar et al. , 2000 ; Rigter et al. , 2021 ) , which result in different classes of optimal policy . Especially , Dabney et al . ( 2018a ) interprets risk measures as the expected utility function of the return , i.e. , EZ [ U ( Z ( s , a ) ) ] . Under this interpretation , risk-sensitive RL can be formulated as the maximization problem with various types of utility functions . If the utility function U is linear , the policy obtained under such risk measure is called risk-neutral . If U is concave or convex , the resulting policy is termed as risk-averse or risk-seeking , respectively . In general , a distortion risk measure is a generalized expression of risk measure generated from the distortion function . Definition 1 . Let h : [ 0 , 1 ] → [ 0 , 1 ] be a distortion function such that h ( 0 ) = 0 , h ( 1 ) = 1 and nondecreasing . Given a probability space ( Ω , F , P ) and a random variable Z : Ω → R , a distortion risk measure ρh corresponding to a distortion function h is defined by : ρh ( Z ) : = Eh ( P ) [ Z ] = ∫ ∞ −∞ z ∂ ∂z ( h ◦ FZ ) ( z ) dz , where FZ is the cumulative distribution function of Z . In fact , non-decreasing property of h makes it possible to distort the distribution of Z while satisfying the fundamental property of CDF . Note that the concavity and the convexity of distortion function also imply risk-averse or risk-seeking behavior , respectively . Dhaene et al . ( 2012 ) showed that any distorted expectation can be expressed as weighted averages of quantiles . In other words , generating a distortion risk measure is equivalent to choosing a reweighting distribution . Fortunately , distributional RL has a suitable configuration to apply those uncertainty-based approaches that could naturally expand the class of policies . Chow et al . ( 2015 ) and Stanko & Macek ( 2019 ) considered risk-sensitive RL with a CVaR objective , where risk is related to robust decision making . Dabney et al . ( 2018a ) expanded the class of policies on arbitrary distortion risk measures and investigated the effects of a distinct distortion risk measures by changing the sampling distribution for quantile targets τ . Unlike the usual risk-sensitive RL , DLTV applied the risk measure only on action selection , while it keeps the standard objective to obtain a risk-neutral optimal policy . Our analysis shows that risk-based exploration can utilize risk measures in two different ways : ( 1 ) selecting action and ( 2 ) evaluating the value function by using distorted ( perturbed ) expectation . | This paper proposes a novel strategy for performing exploration based on distributional reinforcement learning. They highlight the fact that existing approaches cannot distinguish between epistemic and aleatoric uncertainty. Then, they propose an alternative approach that leverages a random perturbation to the distribution, but then takes this perturbation to zero. They prove that this approach converges. Finally, they validate their approach in their experiments. | SP:dc612fcfbb4d4a84f5827bb9362c82326955f2b4 |
Distributional Perturbation for Efficient Exploration in Distributional Reinforcement Learning | 1 INTRODUCTION . Distributional reinforcement learning ( DRL ) learns the stochasticity of returns in the reinforcement learning environments and has shown remarkable performance in several benchmark tasks . Its model generates the approximated distribution of returns , where the mean value implies the traditional Qvalue ( Bellemare et al. , 2017 ; Dabney et al. , 2018b ; Choi et al. , 2019 ) . Learning procedure with stochasticity through return distribution is represented by parametric ( epistemic ) uncertainty , which is due to insufficient or inaccurate data , and intrinsic ( aleatoric ) uncertainty , which is inherently possessed randomness in the environment . ( Chow et al. , 2015 ; Dabney et al. , 2018a ) The learned stochasticity gives rise to the notion of risk-sensitivity , and some distributional reinforcement learning algorithms distort the learned distribution to create a risk-averse or risk-seeking policy . Another way to employ the uncertainty is to design an efficient exploration method which is essential to find an optimal behavior with a few number of trials . Optimism in the face of uncertainty ( OFU ) is one of the fundamental exploration principles that employs parametric uncertainty to promote exploring less understood behaviors and to construct confidence set . Most OFU algorithms select an action with the highest upper-confidence bound ( UCB ) of uncertainty which can be considered as the optimistic decision at the moment ( Chen et al. , 2017 ; Ciosek et al. , 2019 ) . In deep RL , several OFU studies often model the uncertainty explicitly through the Bayesian posterior , which is estimated by using neural networks . However , learning the representation of high-dimensional state-action space and Bellman update simultaneously leads to unstable propagation ( Yang et al. , 2021 ) . On the other hand , DRL can provide more statistical information during control such as mode , median , or variance by addressing full characteristics of the return distribution . Despite the richness of information for return distribution , only a few DRL methods have tried to employ the benefits of distributional perspective for exploration ( Tang & Agrawal , 2018 ; Mavrin et al. , 2019 ; Clements et al. , 2019 ) . To estimate the uncertainty from distributional outputs , descriptive statistics that is composed of a mixture of intrinsic and parametric uncertainty can be utilized . Unfortunately , sepa- rating these two types of uncertainty during learning is not a trivial task . Mavrin et al . ( 2019 ) propose a distribution-based OFU exploration that schedules a decaying bonus rate to suppress the effect of intrinsic uncertainty , which unintentionally induces a risk-seeking policy . Although OFU based approaches try to reduce parametric uncertainty by revisiting the state with high uncertainty , there exists the side effect that the criteria unfortunately forces the agent to chase the intrinsic uncertainty ( risk ) simultaneously during updates . Relying on a specific criteria causes an one-sided tendency on risk and makes an agent consistently select certain actions during exploration as degrading performance . We call this phenomenon as stuckness . In this paper , we introduce perturbed quantile regression ( PQR ) which perturbs the criterion on uncertainty by randomizing the risk criterion in action selection . First , the distributional perturbation on return distribution is to re-evaluate the estimate of return by distorting the learned distribution with perturbation weight . Unlike the typical worst-case approach in risk-sensitive settings or OFU based approaches , we instead randomly sample a risk measure from an ambiguity set , which represents that the risk setting is ambiguous when the characteristics of a given environment are unknown . We empirically demonstrate on the stochastic variant of N-Chain environment ( Osband et al. , 2016 ) that a randomized scheme is more effective than OFU to alleviate the sub-optimality problem of tendency to obtain risk-seeking policies . Second , any risk-measure with some time-varying perturbation constraint allows us to average over all possible risk-sensitive behaviors to achieve the optimal policy . We provide a sufficient condition for the convergence of return distribution in the weaker contraction property . Our method covers the full elements of the reinforcement learning with distributional perspective from the novel exploration method with distributional perturbation to the theoretically guaranteed convergence of return distribution , which has the same fixed-point with the standard Bellman optimality operator . The proposed algorithm is based on QR-DQN , which is a baseline of DRL architecture to learn a return distribution , and we show that PQR outperforms QR-DQN and other DRL baselines in several benchmark environments , LunarLander-v2 and Atari games . 2 BACKGROUNDS & RELATED WORKS . 2.1 DISTRIBUTIONAL REINFORCEMENT LEARNING . We consider a Markov decision process ( MDP ) which is defined as a tuple ( S , A , P , R , γ ) where S is a finite state space , A is a finite action space , P : S×A×S → [ 0 , 1 ] is the transition probability , R is the random variable of rewards in [ −Rmax , Rmax ] , and γ ∈ [ 0 , 1 ) is the discount factor . We define a stochastic policy π ( ·|s ) which is a conditional distribution overA given state s. For a fixed policy π , we denote Zπ ( s , a ) as a random variable of return distribution of state-action pair ( s , a ) following the policy π . We attain Zπ ( s , a ) = ∑∞ t=0 γ tR ( St , At ) , where St+1 ∼ P ( ·|St , At ) , At ∼ π ( ·|St ) and S0 = s , A0 = a . Then , we define an action-value function as Qπ ( s , a ) = E [ Zπ ( s , a ) ] in [ −Vmax , Vmax ] where Vmax = Rmax/ ( 1−γ ) . For regularity , we further notice that the space of actionvalue distributions Z has the first moment bounded by Vmax : Z = { Z : S ×A →P ( R ) ∣∣ E [ |Z ( s , a ) | ] ≤ Vmax , ∀ ( s , a ) } . In distributional RL , the return distribution for the fixed π can be computed via dynamic programming with the distributional Bellman operator defined as ( Bellemare et al. , 2017 ) , τ πZ ( s , a ) D= R ( s , a ) + γZ ( S′ , A′ ) , S′ ∼ P ( ·|s , a ) , A′ ∼ π ( ·|S′ ) where D= denotes that both random variables share the same probability distribution . We can compute the optimal return distribution by using the distributional Bellman optimality operator defined as , τZ ( s , a ) D= R ( s , a ) + γZ ( S′ , a∗ ) , S′ ∼ P ( ·|s , a ) , a∗ = argmax a′ EZ [ Z ( S′ , a′ ) ] . Bellemare et al . ( 2017 ) have shown that τ π is a contraction in a maximal form of the Wasserstein metric but τ is not a contraction in any metric . Combining with the expectation operator , Eτ is a contraction so that we can guarantee that the expectation of Z converges to the optimal state-action value , while the convergence of a return distribution itself is not guaranteed . 2.2 EXPLORATION ON DISTRIBUTIONAL REINFORCEMENT LEARNING . In this section , we will briefly describe the main practical algorithm for DRL with a deep neural network , and explain the derived exploration method . To combine with deep RL , a parametric distribution Zθ is used to learn a return distribution by using τ . Dabney et al . ( 2018b ) have employed a quantile regression to approximate the full distribution by letting Zθ ( s , a ) = 1N ∑N i=1 δθi ( s , a ) where the parameter θ represents the locations of a mixture of N Dirac delta functions . Each θi represents the value where the cumulative probability is τi = iN . Then , by using the quantile representation with the distributional Bellman optimality operator , the problem can be formulated as a minimization problem as , θ = argmin θ′ D ( Zθ′ ( st , at ) , τ Zθ− ( st , at ) ) : = N∑ i=1 N∑ j=1 1 N [ ρκτ̂i ( rt + γθ − j ( st+1 , a ′ ) − θ′i ( st , at ) ) ] where ( st , at , rt , st+1 ) is a given transition pair , τ̂i = τi−1+τi 2 , a ′ : = argmaxa′ EZ [ Zθ ( st+1 , a′ ) ] , ρκτ̂i ( x ) : = |τ̂i−δ { x < 0 } |Lκ ( x ) , andLκ ( x ) : = x 2/2 for |x| ≤ κ andLκ ( x ) : = κ ( |x|− 12κ ) , otherwise . Based on the quantile regression , Dabney et al . ( 2018b ) have proposed a quantile regression deep Q network ( QR-DQN ) that shows better empirical performance than the categorical approach ( Bellemare et al. , 2017 ) since the quantile regression does not restrict the bounds for return . As deep RL typically did , QR-DQN adjusts ϵ-greedy schedule , which selects the greedy action with probability 1− ϵ and otherwise selects random available actions uniformly . The majority of QR-DQN variants ( Dabney et al. , 2018a ; Yang et al. , 2019 ) rely on the same exploration method . However , such approaches do not put aside inferior actions from the selection list and thus suffers from a loss ( Osband et al. , 2019 ) . Hence , selecting a statistically plausible action is crucial for efficient exploration . In recent studies , Mavrin et al . ( 2019 ) modifies the criterion of selecting an action for efficient exploration in the face of uncertainty . Using left truncated variance as a bonus term to estimate optimistic way and decaying ratio ct to suppress the intrinsic uncertainty , DLTV was proposed as an uncertainty-based exploration in DRL without using ϵ-greedy exploration . At timestep t , the action selection of DLTV can be described as : a∗ = argmax a′ ( EP [ Z ( s′ , a′ ) ] + ct √ σ2+ ( s ′ , a′ ) ) , ct = c √ log t t , σ2+ = 1 2N N∑ i=N2 ( θN 2 − θi ) 2 , where θi ’ s are the values of quantile level τi . DLTV shows that a constant schedule degrades the performance significantly compared to a decaying schedule . 2.3 RISK IN DISTRIBUTIONAL REINFORCEMENT LEARNING . Instead of an expected value , risk-sensitive RL tries to maximize a risk measure such as MeanVariance ( Zhang et al. , 2020 ) , Value-at-Risk ( VaR ) ( Chow et al. , 2017 ) , or Conditional Value-at-Risk ( CVaR ) ( Rockafellar et al. , 2000 ; Rigter et al. , 2021 ) , which result in different classes of optimal policy . Especially , Dabney et al . ( 2018a ) interprets risk measures as the expected utility function of the return , i.e. , EZ [ U ( Z ( s , a ) ) ] . Under this interpretation , risk-sensitive RL can be formulated as the maximization problem with various types of utility functions . If the utility function U is linear , the policy obtained under such risk measure is called risk-neutral . If U is concave or convex , the resulting policy is termed as risk-averse or risk-seeking , respectively . In general , a distortion risk measure is a generalized expression of risk measure generated from the distortion function . Definition 1 . Let h : [ 0 , 1 ] → [ 0 , 1 ] be a distortion function such that h ( 0 ) = 0 , h ( 1 ) = 1 and nondecreasing . Given a probability space ( Ω , F , P ) and a random variable Z : Ω → R , a distortion risk measure ρh corresponding to a distortion function h is defined by : ρh ( Z ) : = Eh ( P ) [ Z ] = ∫ ∞ −∞ z ∂ ∂z ( h ◦ FZ ) ( z ) dz , where FZ is the cumulative distribution function of Z . In fact , non-decreasing property of h makes it possible to distort the distribution of Z while satisfying the fundamental property of CDF . Note that the concavity and the convexity of distortion function also imply risk-averse or risk-seeking behavior , respectively . Dhaene et al . ( 2012 ) showed that any distorted expectation can be expressed as weighted averages of quantiles . In other words , generating a distortion risk measure is equivalent to choosing a reweighting distribution . Fortunately , distributional RL has a suitable configuration to apply those uncertainty-based approaches that could naturally expand the class of policies . Chow et al . ( 2015 ) and Stanko & Macek ( 2019 ) considered risk-sensitive RL with a CVaR objective , where risk is related to robust decision making . Dabney et al . ( 2018a ) expanded the class of policies on arbitrary distortion risk measures and investigated the effects of a distinct distortion risk measures by changing the sampling distribution for quantile targets τ . Unlike the usual risk-sensitive RL , DLTV applied the risk measure only on action selection , while it keeps the standard objective to obtain a risk-neutral optimal policy . Our analysis shows that risk-based exploration can utilize risk measures in two different ways : ( 1 ) selecting action and ( 2 ) evaluating the value function by using distorted ( perturbed ) expectation . | This paper considers distributional reinforcement learning with the goal of seeking risk-neutral optimal policy. Prior approaches often have a convergence issue due to either being just risk-seeking or risk-averse. Towards resolving the problem, the authors propose a simple, yet effective approach by randomizing the risk criterion during the training process. On the theoretical front, the authors prove that the method converges to an optimal return distribution under certain conditions. Several experimental results also confirm the validity of the method. | SP:dc612fcfbb4d4a84f5827bb9362c82326955f2b4 |
Hybrid Local SGD for Federated Learning with Heterogeneous Communications | 1 INTRODUCTION Federated learning ( FL ) is a distributed machine learning paradigm in which multiple edge devices or clients cooperate to learn a machine learning model under the orchestration of a central server , and enables a wide range of applications such as autonomous driving , extended reality , and smart manufacturing ( Kairouz et al. , 2019 ) . Communication is a critical bottleneck in FL as the clients are typically connected to the central server over bandwidth-limited networks . Standard optimization methods such as distributed SGD are often not suitable in FL and can cause high communication costs due to the frequent exchange of large-size model parameters or gradients . To tackle this issue , local SGD , in which clients update their models by running multiple SGD iterations on their local datasets before communicating with the server , has emerged as the de facto optimization method in FL and can largely reduce the number of communication rounds required to train a model ( McMahan et al. , 2017 ; Stich , 2019 ) . However , the communication benefit of local SGD is highly sensitive to non-iid data distribution as observed in prior work ( Rothchild et al. , 2020 ; Karimireddy et al. , 2020 ) . Intuitively , taking many local iterations of SGD on local dataset that is not representative of the overall data distribution will lead to local over-fitting , which will hinder convergence . In particular , it is shown in ( Zhao et al. , 2018 ) that the convergence of local SGD on non-iid data could slow down as much as proportionally to the number of local iteration steps taken . Therefore , local SGD with a large aggregation period can converge very slow on non-iid data distribution , and this may nullify its communication benefit ( Rothchild et al. , 2020 ) . Local SGD assumes a star network topology where each device connects to the central server for model aggregation . In modern communication networks , rather than only communicating with the server over slow communication links , devices are increasingly connected to others over fast communication links . For instance , in 5G-and-beyond mobile networks , mobile devices can directly communicate with their nearby devices via device-to-device links of high data rate ( Asadi et al. , 2014 ) . Also , edge devices within the same local-area network ( LAN ) domain can communicate with each other rapidly without traversing through slow wide-area network ( WAN ) ( Yuan et al. , 2020 ) . This gives the potential to accelerate the FL convergence under non-iid data distribution by leveraging fast D2D cooperation so that the total training time can be reduced in FL over bandwidthlimited networks . Motivated by the above observation , this paper proposes hybrid local SGD ( HL-SGD ) , a new distributed learning algorithm for FL with heterogeneous communications , to speed up the learning process and reduce the training time . HL-SGD extends local SGD with fast gossip-style D2D communication after local iterations to mitigate the local over-fitting issue under non-iid data distribution and accelerate convergence . A hybrid model aggregation scheme is designed in HL-SGD to integrate both fast device-to-device ( D2D ) and slow device-to-server ( D2S ) cooperations . We analyze the convergence of HL-SGD in the presence of heterogeneous data for general nonconvex settings , and characterize the relationship between the optimality error bound and algorithm parameters . Our algorithm and analysis are general enough and subsume previously proposed SGD variations such as distributed SGD , local SGD and gossip SGD . Specifically , we consider the FL setting in which all devices are partitioned into disjoint clusters , each of which includes a group of connected devices capable of communicating with each other using fast D2D links . The clustering can be a natural result of devices belonging to different LAN domains so that those devices connected to the same LAN domain are considered as one cluster . In another example , clustering is based on the geographic locations of mobile devices so that devices in a cluster are connected to each other through D2D communication links . In summary , the paper makes the following main contributions : • We propose a novel distributed learning algorithm for FL called HL-SGD to address the communication challenge of FL over bandwidth-limited networks by leveraging the availability of fast D2D links to accelerate convergence under non-iid data distribution and reduce training time . • We provide the convergence analysis of HL-SGD under general assumptions about the loss function , data distribution , and network topology , generalizing previous results on distributed SGD , local SGD , and gossip SGD . • We conduct extensive empirical experiments on two common benchmarks under realistic network settings to validate the established theoretical results of HL-SGD . Our experimental results show that HL-SGD can largely accelerate the learning process and speed up the runtime . 2 BACKGROUND AND RELATED WORK Large-scale machine learning based on distributed SGD has been well studied in the past decade , but often suffers from large network delays and bandwidth limits ( Bottou et al. , 2018 ) . Considering that communication is a major bottleneck in federated settings , local SGD has been proposed recently to reduce the communication frequency by running SGD independently in parallel on different devices and averaging the sequences only once in a while ( Stich , 2019 ; Lin et al. , 2019 ; Haddadpour et al. , 2019 ; Yu et al. , 2018 ; Wang et al. , 2021 ) . However , they all assume the client-server architecture and do not leverage the fast D2D communication capability in modern communication networks . Some studies ( Liu et al. , 2020 ; Abad et al. , 2020 ; Castiglia et al. , 2020 ) develop hierarchical FL algorithms that first aggregate client models at local edge servers before aggregating them at the cloud server or with neighboring edge servers , but they still rely on D2S communication links only and suffer from the scalability and fault-tolerance issues of centralized setting . On the other hand , while existing works on decentralized or gossip SGD consider D2D communications ( Tsitsiklis , 1984 ; Boyd et al. , 2006 ) , they assume a connected cluster with homogeneous communication links and will converge very slow on the large and sparse network topology that is typically found in FL settings . Unlike previous works , HL-SGD leverages both D2S and D2D communications in the system . Some recent studies aim to encapsulate variants of SGD under a unified framework . Specifically , a cooperative SGD framework is introduced in ( Wang & Joshi , 2018 ) that includes communication reduction through local SGD steps and decentralized mixing between clients under iid data distribution . A general framework for topology-changing gossip SGD under both iid and non-iid data distributions is proposed in ( Koloskova et al. , 2020 ) . Note that all of the above works assume undirected network topology for communications in every iteration . In comparison , our proposed HL-SGD is different : the D2S communication is asymmetric due to the use of device sampling and model broadcasting in each global aggregation round and can not be modeled in an undirected graph . Therefore , the convergence analysis of HL-SGD does not fit into the prior frameworks and is much more challenging . Moreover , our major focus is on the runtime of the algorithm rather than its convergence speed in iterations . 3 SYSTEM MODEL In this section , we introduce the FL system model , problem formulation , and assumptions we made . Notation . All vectors in this paper are column vectors by default . For convenience , we use 1 to denote the all-ones vector of appropriate dimension , 0 to denote the all-zeros vector of appropriate dimension , and [ n ] to denote the set of integers { 1 , 2 , . . . , n } with any positive integer n. Let ‖·‖ denote the ` 2 vector norm and Frobenius matrix norm and ‖·‖2 denote the spectral norm of a matrix . We consider a FL system consisting of a central server and K disjoint clusters of edge devices . Devices in each cluster k ∈ [ K ] can communicate with others across an undirected and connected graph Gk = ( V , Ek ) , where Vk denotes the set of edge devices in the cluster , and edge ( i , j ) ∈ Ek denotes that the pair of devices i , j ∈ Vk can communicate directly using D2D as determined by the communication range of D2D links . Besides , each device can directly communicate with the central server using D2S links . Denote the set of all devices in the system as V : = ⋃ k∈ [ K ] Vk , the number of devices in each cluster k ∈ [ K ] as n : = |Vk| , and the total number of devices in the system as N : = ∑ k∈ [ K ] n 1 . The FL goal of the system is to solve an optimization problem of the form : min x∈Rd f ( x ) : = 1 N ∑ i∈V fi ( x ) : = 1 K ∑ k∈ [ K ] f̄k ( x ) , ( 1 ) where fi ( x ) : = Ez∼Di [ ` i ( x ; z ) ] is the local objective function of device i , f̄k ( x ) : = ( 1/n ) ∑ i∈Vk fi ( x ) is the local objective function of cluster k , and Di is the data distribution of device i . Here ` i is the ( non-convex ) loss function defined by the learning model and z represents a data sample from data distribution Di . When applying local SGD to ( 1 ) in FL with heterogeneous communications , the communications between the server and devices in FL are all through D2S links that are bandwidth-limited , particularly for the uplink transmissions . Therefore , the incurred communication delay is high . Due to the existing of high-bandwidth D2D links that are much more efficient than low-bandwidth D2S links , it would be highly beneficial if we can leverage D2D links to reduce the usage of D2S links such that the total training time can be reduced . This motivates us to design a new learning algorithm for FL with heterogeneous communications . 4 HYBRID LOCAL SGD In this section , we present our HL-SGD algorithm suitable for the FL setting with heterogeneous communications . Algorithm 1 provides pseudo-code for our algorithm . At the beginning of r-th global communication round , the server broadcasts the current global model xr to all devices in the system via cellular links ( Line 4 ) . Note that in typical FL systems , the downlink communication is much more efficient than uplink communication due to the larger bandwidth allocation and higher data rate . Therefore , devices only consume a smaller amount of energy when receiving data from the server compared with transmitting data to the server . After that , devices in each cluster initialize their local models to be the received global model and run τ iterations of gossip-based SGD via D2D links to update their local models in parallel ( lines 5– 9 ) . Let xr , si denote the local model of device i at the r-th local iteration of s-th round . Here 1For presentation simplicity , we assume each cluster contains the same number of devices here . The results of this paper can be extended to the case of clusters with different device numbers as well . Algorithm 1 HL-SGD : Hybrid Local SGD Input : initial global model x0 , learning rate η , communication graph Gk and mixing matrix Wk for all clusters k ∈ [ K ] , and fraction of sampled devices in each cluster p. Output : final global model xR 1 : for each round r = 0 , . . . , R− 1 do 2 : for each cluster k ∈ [ K ] in parallel do 3 : for each device i ∈ Vk in parallel do 4 : xr,0i = x r 5 : for s = 0 , . . . , τ − 1 do 6 : Compute a stochastic gradient gi over a mini-batch ξi sampled from Di 7 : x r , s+ 12 i = x r , s i − ηgi ( x r , s i ) . local update 8 : xr , s+1i = ∑ j∈Nki ( Wk ) i , jx r , s+ 12 j . gossip averaging 9 : end for 10 : end for 11 : end for 12 : for each cluster k ∈ [ K ] do 13 : m← max ( p · n , 1 ) 14 : Srk ← ( random set of m clients in Vk ) . device sampling 15 : end for 16 : xr+1 = 1K ∑ k∈ [ K ] 1 m ∑ i∈Srk xr , τi . global aggregation 17 : end for 18 : return xR each gossip-based SGD iteration consists of two steps : ( i ) SGD update , performed locally on each device ( lines 6–7 ) , followed by a ( ii ) gossip averaging , where devices average their models with their neighbors ( line 8 ) . In the gossip averaging protocol , N ki denotes the neighbors of device i , including itself , on the D2D communication graph Gk of cluster k , and Wk ∈ [ 0 , 1 ] n×n denotes the mixing matrix of cluster k with each element ( Wk ) i , j being the weight assigned by device i to device j . Note that ( Wk ) i , j > 0 only if devices i and j are directly connected via D2D links . Next , a set Srk of m devices are sampled uniformly at random ( u.a.r . ) with probability p without replacement from each cluster k ∈ [ K ] by the server ( lines 13–14 ) , and their final updated local models { xr , τi , ∀i ∈ Srk } are sent to the server via D2S links . After that , the server updates the global model xr+1 by averaging the received local models from all sampled devices ( line 16 ) . Note that only m devices per cluster will upload their models to the server in each round to save the usage of expensive D2S uplink transmissions . The intuition is that after multiple iterations of gossip-based SGD , devices have already reached approximate consensus within each cluster , and the sampled average can well represent the true average . By trading D2D local aggregation for D2S global aggregation , the total communication cost can be reduced . We will empirically validate such benefits later in the experiments . It is worth noting that HL-SGD inherits the privacy benefits of classic FL schemes by keeping the raw data on device and sharing only model parameters . Moreover , HL-SGD is compatible with existing privacy-preserving techniques in FL such as secure aggregation ( Bonawitz et al. , 2017 ) , differential privacy ( McMahan et al. , 2018 ) , and shuffling ( Girgis et al. , 2021 ) since only the sum rather than individual values is needed for the local and global model aggregation steps . 4.1 RUNTIME ANALYSIS OF HL-SGD We now present a runtime analysis of HL-SGD . Here we ignore the communication time of downloading models from the server by each device since the download bandwidth is often much larger than upload bandwidth for the D2S communication in practice ( Kairouz et al. , 2019 ) . In each round of HL-SGD , we denote the average time taken by a device to compute a local update , perform one round of D2D communication and one round of D2S communication as ccp , cd2d and cd2s , respectively . Assume the uplink bandwidth between the server and devices is fixed and evenly shared among the sampled devices in each round , then cd2s is linearly proportional to the sampling ratio p. Similarly , ccp depends on the D2D network topology Gk and typically increases with the maximum node degree ∆ ( Gk ) . The total runtime of HL-SGD after R communication rounds is R× [ τ × ( ccp + cd2d ) + cd2s ] . ( 2 ) The specific values of ccp , cd2d and cd2s depend on the system configurations and applications . In comparison , the total runtime of local SGD after R communication rounds is R× [ τ × ccp + cd2s ] . 4.2 PREVIOUS ALGORITHMS AS SPECIAL CASES When devices do not communicate with each other , i.e. , Wk = I , ∀k ∈ [ K ] , and sampling ratio p = 1 , HL-SGD reduces to distributed SGD ( when τ = 1 ) or local SGD ( when τ > 1 ) where each device only directly communicates with the server with D2S links . Also , when τ → ∞ , HLSGD reduces to gossip SGD where devices only cooperate with their neighboring devices through a gossip-based communication protocol with D2D links to update their models without relying on the server . Therefore , HL-SGD subsumes existing algorithms and enables us to strike the best balance between runtime and model accuracy by tuning τ , Wk , and p. However , due to the generality of HL-SGD , there exist significantly new challenges in its convergence analysis , which constitutes one of the main contributions of this paper as elaborated in the following section . 5 CONVERGENCE ANALYSIS OF HL-SGD In this section , we analyze the convergence of HL-SGD with respect to the gradient norm of the objective function f ( · ) , specifically highlighting the effects of τ and p. Before stating our results , we make the following assumptions : Assumption 1 ( Smoothness ) . Each local objective function fi : Rd → R is L-smooth for all i ∈ V , i.e. , for all x , y ∈ Rd , ‖∇fi ( x ) −∇fi ( y ) ‖ ≤ L‖x− y‖ , ∀i ∈ V. Assumption 2 ( Unbiased Gradient and Bounded Variance ) . The local mini-batch stochastic gradient in Algorithm 1 is unbiased , i.e. , Eξi [ gi ( x ) ] = ∇fi ( x ) , and has bounded variance , i.e. , Eξi‖gi ( x ) − ∇fi ( x ) ‖2 ≤ σ2 , ∀x ∈ Rd , i ∈ V , where the expectation is over all the local minibatches . Assumption 3 ( Mixing Matrix ) . For any cluster k ∈ [ K ] , the D2D network is strongly connected and the mixing matrix Wk ∈ [ 0 , 1 ] n×n satisfies Wk1 = 1 , 1 > Wk = 1 > , null ( I −Wk ) = span ( 1 ) . We also assume ||Wk − ( 1/n ) 11 > ||2 ≤ ρk for some ρk ∈ [ 0 , 1 ) . Assumption 4 ( Bounded Intra-Cluster Dissimilarity ) . There exists a constant k ≥ 0 such that ( 1/n ) ∑ i∈Vk ‖∇fi ( x ) − ∇f̄k ( x ) ‖ 2 ≤ 2k for any x ∈ Rd and k ∈ [ K ] . If local functions are identical to each other within a cluster , then we have k = 0 . Assumption 5 ( Bounded Inter-Cluster Dissimilarity ) . There exist constants α ≥ 1 , ≥ 0 such that ( 1/K ) ∑ k∈ [ K ] ‖∇f̄k ( x ) ‖2 ≤ α2 ‖∇f ( x ) ‖ 2 + 2g for any x ∈ Rd . If local functions are identical to each other across all clusters , then we have α = 1 , g = 0 . Assumptions 1–3 are standard in the analysis of SGD and decentralized optimization ( Bottou et al. , 2018 ; Koloskova et al. , 2019 ) . Assumptions 4–5 are commonly used in the federated optimization literature to capture the dissimilarities of local objectives ( Koloskova et al. , 2020 ; Wang et al. , 2020 ) . 5.1 MAIN RESULTS We now provide the main theoretical results of the paper in Theorem 1 and Theorem 2 . The detailed proofs are provided in the appendices . Define the following constants : ρmax = max k∈ [ K ] ρk , Dτ , ρ = min { 1 1− ρmax , τ } , ̄2L = 1 K K∑ k=1 2k ( 3 ) and let r0 = 8 ( f ( x 0 ) − f ( x ? ) ) , r1 = 16L ( σ2 N ) , r2 = 16C1L 2τ2 2g + 16C1L 2 ( τρ2maxDτ , ρ̄ 2 L + τσ 2 ( 1 n + ρ2max ) ) . ( 4 ) Theorem 1 ( Full device participation ) . Let Assumptions 1–5 hold , and let L , σ , ̄L , g , Dτ , ρ , ρmax , r0 , r1 , and r2 be as defined therein . If the learning rate η satisfies η = min { 1 4C1α · 1 τL , ( r0 r1τR ) 1 2 , ( r0 r2τR ) 1 3 } , ( 5 ) then for any R > 0 , the iterates of Algorithm 1 with full device participation for HL-SGD satisfy min r∈ [ R ] min s=0 , ... , τ−1 E‖∇f ( x̄r , s ) ‖2 =O σ√ NτR + ( τ2 2g + τρ 2 maxDτ , ρ̄ 2 L + τ ( 1 n + ρ2max ) σ2 ) 1 3 ( τR ) 2 3 + 1 R , ( 6 ) where x̄r , s = 1N ∑N i=1 x r , s i . In the following , we analyze the iteration complexity of HL-SGD and compare it with those of some classic and state-of-the-art algorithms relevant to our setting in Table 1 . First , we consider two extreme cases of HL-SGD where ρmax = 0 and ρk = 1 , ∀k ∈ [ K ] , and show that our analysis recovers the best known rate of local SGD . Fully Connected D2D networks . In this case , ρmax = 0 , and each cluster can be viewed as a single device , and thus HL-SGD reduces to local SGD with K devices . Substuting ρmax = 0 into ( 6 ) , the iteration complexity of HL-SGD reduces to O ( σ/ √ NτR+ ( τ2 2g + τ · ( σ2/n ) ) 1/3 / ( τR ) 2/3 + 1/R ) . This coincides with the complexity of local SGD provided in Table 1 with device number K and stochastic gradient variance σ2/n thanks to the fully intra-cluster averaging . Disconnected D2D networks . In this case , HL-SGD reduces to local SGD with N devices . Substituting ρmax = 1 into ( 6 ) , the iteration complexity of HL-SGD becomes O ( σ/ √ NτR + ( τ2 ( 2g + ̄ 2 L ) + τσ 2 ) 1/3 / ( τR ) 2/3 + 1/R ) . This coincides with the complexity of local SGD with N devices , stochastic gradient variance σ2 , and gradient heterogeneity of order 2g + ̄ 2 L. Table 1 : Comparison of Iteration Complexity . 2 Local SGD O ( σ√ NτR + ( τ2 2+τσ2 ) 1 3 ( τR ) 2 3 + ττR ) Gossip SGD O ( σ√ NτR + ρ 2 3 2 3 ( τR ) 2 3 ( 1−ρ ) 2 3 + ρ 2 3 σ 2 3 ( τR ) 2 3 ( 1−ρ ) 1 3 + ρ ( 1−ρ ) τR ) Gossip PGA ( Chen et al. , 2021a ) O ( σ√ NτR + C 1 3 τ , ρD 1 3 τ , ρ′ρ 2 3 2 3 ( τR ) 2 3 + C 1 3 τ , ρρ 2 3 σ 2 3 ( τR ) 2 3 + ρDτ , ρ′ τR ) HL-SGD ( this work ) O ( σ√ NτR + ( τ2 2g+τρ 2 maxDτ , ρ̄ 2 L ) 1 3 ( τR ) 2 3 + ( τ ( 1n+ρ 2 max ) σ 2 ) 1 3 ( τR ) 2 3 + ττR ) Next , we compare the complexities of HL-SGD , local SGD , gossip SGD and gossip PGA . Comparison to Local SGD . Comparing ( 6 ) and the complexity of local SGD , we can see the intracluster D2D communication provably improves the iteration complexity by reducing the transient iterations . This is reflected in the smaller coefficient associated with the O ( ( τR ) −2/3 ) term . In particular , improving D2D communication connectivity will lead to a smaller ρmax and consequently , mitigate the impact of both local data heterogeneity and stochastic noise on the convergence rate . Comparison to Gossip SGD . Under the condition that ρ = ρmax , i.e. , the connectivity of D2D network in gossip SGD is the same as that of HL-SGD , Table 1 shows HL-SGD outperforms gossip SGD when τ/n ≤ ρ2/ ( 1−ρ ) . In other words , HL-SGD is beneficial for weakly connected networks , which is the case in FL settings where a large number of devices are often loosely connected or disconnected into several disjoint clusters via D2D communications only . 1The convergence rates for gossip SGD and local SGD are from ( Koloskova et al . ( 2020 ) ) . The parameters in the table are given by the following : σ2 : stochastic gradient variance ; ρ : network connectivity ; 2 : data heterogeneity of order 2g + ̄2L ; Cτ , ρ , ∑τ−1 k=0 ρ k , Dτ , ρ′ = min { 1/ ( 1− ρ ) , τ } . Note that Dτ , ρ 6= Dτ , ρ′ . Comparison to Gossip PGA . Gossip PGA improves local SGD by integrating gossiping among all devices in one round using a connected network . Compared to gossip SGD , gossip PGA has one extra full averaging step with period τ . The complexity of gossip PGA improves both by reducing the transient iterations . HL-SGD ( full participation ) differs from gossip PGA in the sense that gossiping is performed within multiple clusters instead of a single one . The benefit comes from the fact that for many commonly used D2D network topologies , the spectral gap 1− ρ decreases as the network size decreases , see Table 2 . Therefore , when employing the same D2D network topology , HL-SGD enjoys a smaller connectivity number ρmax than ρ . Considering the scenario where τ and n are fixed while the cluster number K grows , the total device number N = nK grows and hence ρ → 1 for gossip PGA . In the case when τ = Dτ , ρ′ ≈ Cτ , ρ , the fastest decaying O ( 1/τR ) terms are comparable for both algorithms . However , the O ( ( τR ) −2/3 ) term of gossip GPA can be larger than that of HL-SGD since ρ increases with N . This observation shows for large-scale networks , it is advantageous to use HL-SGD with multiple connected clusters instead of gossip GPA with a single cluster under the D2D network topology . Our next result shows the iteration complexity of HL-SGD with partial device participation . We assume the devices participate in synchronizing their models at the end of each FL round following the sampling rule given by Assumption 6 . Assumption 6 ( Sampling strategy ) . Each Srk contains a subset ofm indices uniformly sampled from { 1 , . . . , n } without replacement . Furthermore , Srk is independent of Sr ′ k′ for all ( k , r ) 6= ( k′ , r′ ) . Theorem 2 ( Partial device participation ) . Let Assumptions 1–6 hold , and let L , σ , ̄L , g , Dτ , ρ , ρmax , r0 , r1 , and r2 be as defined therein . If the network connectivity satisfies ρmax ≤ 1− 1/τ , ( 7 ) then for suitably chosen learning rate η , the iterates of Algorithm 1 with partial device participation for HL-SGD satisfy min r∈ [ R ] min s=0 , ... , τ−1 E‖∇f ( x̄r , s ) ‖2 =O σ + E ( g , ̄L , σ , ρmax ) √ NτR + ( τ2 2g + τρ 2 maxDτ , ρ̄ 2 L + τ ( 1 n + ρ2max ) σ2 ) 1 3 ( τR ) 2 3 + 1 R , ( 8 ) where x̄r , s = 1N ∑N i=1 x r , s i , E2 ( g , ̄L , σ , ρmax ) = ( 2gDτ , ρ + ρmaxDτ , ρ̄2L + σ2 ) ·G′pDτ , ρρmaxN + n m · 1 τ ρ2maxσ 2 . ( 9 ) and G′p = n−m m ( n− 1 ) + 1 τ2 . ( 10 ) Compared to Theorem 1 , Theorem 2 shows partial device participation deteriorates the rate by O ( E ( g , ̄L , σ , ρmax ) / √ NτR ) . From the expression of E , we observe that as ρmax → 0 , E ( g , ̄L , σ , ρmax ) vanishes , which indicates that the loss caused by device sampling can be compensated by increasing network connectivity uniformly for all clusters . The next corollary finds the critial ρmax so that E2 = O ( 1 ) , and the order of convergence rate of partial device participation matches that of the full participation case . Corollary 1 . Under the same assumptions as Theorem 2 , if the network connectivity satisfies ρmax ≤ 1 4N min { m , τ − 1 } , ( 11 ) then min r∈ [ R ] min s=0 , ... , τ−1 E‖∇f ( x̄r , s ) ‖2 =O σ + g + ̄L√ NτR + ( τ2 2g + τρ 2 maxDτ , ρ̄ 2 L + τ ( 1 n + ρ2max ) σ2 ) 1 3 ( τR ) 2 3 + 1 R . ( 12 ) Corollary 1 reveals the tradeoff between sampling intensity and network connectivity . More connected D2D networks result in smaller ρmax , and thus ( 11 ) can be satisfied by a smaller m. This means we can sample fewer devices at the end of each round and reduce the D2S communication delay when the D2D network is more connected . 6 EXPERIMENTAL EVALUATION 6.1 EXPERIMENTAL SETTINGS We use two common datasets in FL literature ( McMahan et al. , 2017 ; Reddi et al. , 2020 ; Wang et al. , 2020 ) : Federated Extended MNIST ( Caldas et al. , 2018 ) ( FEMNIST ) and CIFAR-10 ( Krizhevsky et al. , 2009 ) . The 62-class FEMNIST is built by partitioning the data in Extended MNIST ( Cohen et al. , 2017 ) based on the writer of the digit/character and has a naturally-arising device partitioning . CIFAR-10 is partitioned across all devices using a Dirichlet distribution Dir ( 0.1 ) as done in ( Hsu et al. , 2019 ; Yurochkin et al. , 2019 ; Reddi et al. , 2020 ; Wang et al. , 2020 ) . We evaluate our algorithms by training CNNs on both datasets , and the CNN models for FEMNIST and CIFAR-10 were taken from ( Caldas et al. , 2018 ) and ( McMahan et al. , 2017 ) with around 6.5 and 1 million parameters , respectively . For each dataset , the original testing set ( without partitioning ) is used to evaluate the generalization performances of the trained global model . We consider a FL system consisting of a central server and 32 devices . The devices are evenly divided into four clusters , and each cluster has a ring topology by default , which provides a conservative estimation for the cluster connectivity and convergence speed . In our experiments , the mixing matrix of each cluster Wk is set according to the Metropolis-Hastings weights ( Nedić et al. , 2018 ) . According to the real-world measurements in ( Yuan et al. , 2020 ; Yang et al. , 2021 ) , we set the average time for a device to perform a local update , a round of D2D communication under ring topology , and a round of D2S communication with one device sampled per cluster to be ccp = 0.01h , cd2d ( ∆ = 2 ) = 0.005h and cd2s ( p = 1/8 ) = 0.05h , respectively , in the runtime model ( 2 ) . For arbitrary device sampling ratio and D2D network topology , we consider a linear-scaling rule ( Wang et al. , 2019 ) and let cd2d ( ∆ ) = ( ∆/2 ) × 0.005h and cd2s ( p ) = 8p× 0.05h . We compare HL-SGD with local SGD in the experiments . For local SGD , devices will only communicate with the central server periodically . In all experiments , we let the local iteration period τ to be the same for both local SGD and HL-SGD to have a fair comparison . On the FEMNIST dataset , we fix the batch size as 30 and tune the learning rate η from { 0.005 , 0.01 , 0.02 , 0.05 , 0.08 } for each algorithm separately . On the CIFAR-10 dataset , we fix the batch size as 50 and tune η from { 0.01 , 0.02 , 0.05 , 0.08 , 0.1 } for each algorithm separately . We run each experiment with 3 random seeds and report the average . All experiments in this paper are conducted on a Linux server with 4 NVIDIA RTX 8000 GPUs . The algorithms are implemented by PyTorch . More details are provided in Appendix F. 6.2 EXPERIMENTAL RESULTS We first compare the convergence speed and runtime of HL-SGD and local SGD while fixing τ = 50 and p = 1 . We measure the test accuracy of the global model on the server in every FL round . Figure 1 shows the convergence process . From the figure , we can observe that HL-SGD can largely accelerate the model convergence while improving model accuracy in FL . On FEMNIST , the best accuracy of HL-SGD achieved over 100 rounds is 4.78 % higher than that of local SGD ( i.e. , 83.76 % vs. 79.94 % ) , and its runtime necessary to achieve a target test-set accuracy of 75 % is only 17.64 % of that of the baseline ( i.e. , 5.67× speedup ) . On CIFAR-10 , the best accuracy of HL-SGD achieved over 100 rounds is 9.32 % higher than that of local SGD ( i.e. , 70.13 % vs. 64.15 % ) , and its runtime necessary to achieve a target test-set accuracy of 60 % is 18.36 % less than that of local SGD ( i.e. , 1.225× speedup ) . Next , we investigate the effect of D2D network speed on the runtime benefit of HL-SGD . We consider the same FL setting as before and choose cd2d from { 0.003 , 0.005 , 0.02 } h. As illustrated in Figure 2 , the training speed of HL-SGD can be further improved by using faster D2D links . For instance , it takes HL-SGD 4.2 hours to reach 75 % test accuracy on FEMNIST with cd2d = 0.003h , which is 1.5× faster than HL-SGD with cd2d = 0.01h . On CIFAR-10 , to reach a target level of 60 % test accuracy , HL-SGD with cd2d = 0.003h needs 21 hours , which is 1.14× faster than HL-SGD with cd2d = 0.005 . Note that the runtime can not proportionally decrease with the increase of D2D network speed because local update also takes substantial computation time . Also , when cd2d is relatively large compared with cd2s , the convergence acceleration benefit of gossip averaging could be offset by the increased communication time in each round of HL-SGD , leading to an inferior total runtime as shown in Figure 2b . Finally , we investigate how the sampling ratio p affects the performance of HL-SGD . We select p from { 0.125 , 0.25 , 0.5 , 1 } , corresponding to sampling { 1 , 2 , 4 , 8 } devices from each cluster to upload models to the server . Figure 3 depicts the best value of test-set accuracy achieved over all prior rounds . As can be observed from the figures , sampling one device per cluster only results in slightly lower model accuracy , e.g. , 1.92 % drop compared to full participation on CIFAR-10 . This matches the theoretical result in Corollary 1 that device sampling does not affect the order of convergence rate under certain conditions . However , decreasing p can lead to faster training speed due to its shorter D2S communication delay as observed in Figure 3d . In practice , the optimal value of p needs to be tuned to strike a good balance between model accuracy and runtime . 7 CONCLUSION In this paper , we have proposed a new optimization algorithm called HL-SGD for FL with heterogeneous communications . Our algorithm leverages the D2D communication capabilities among edge device to accelerate the model convergence while improving model accuracy in FL . We have provided the theoretical convergence analysis of HL-SGD and conducted experiments to demonstrate the benefits of HL-SGD . In the future , we plan to extend HL-SGD to handle straggler issues under device heterogeneity and provide rigorous privacy protection for HL-SGD . REFERENCES Mehdi Salehi Heydar Abad , Emre Ozfatura , Deniz Gunduz , and Ozgur Ercetin . Hierarchical federated learning across heterogeneous cellular networks . In ICASSP 2020-2020 IEEE International Conference on Acoustics , Speech and Signal Processing ( ICASSP ) , pp . 8866–8870 . IEEE , 2020 . Arash Asadi , Qing Wang , and Vincenzo Mancuso . A survey on device-to-device communication in cellular networks . IEEE Communications Surveys & Tutorials , 16 ( 4 ) :1801–1819 , 2014 . Keith Bonawitz , Vladimir Ivanov , Ben Kreuter , Antonio Marcedone , H Brendan McMahan , Sarvar Patel , Daniel Ramage , Aaron Segal , and Karn Seth . Practical secure aggregation for privacypreserving machine learning . In proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security , pp . 1175–1191 , 2017 . Léon Bottou , Frank E Curtis , and Jorge Nocedal . Optimization methods for large-scale machine learning . Siam Review , 60 ( 2 ) :223–311 , 2018 . Stephen Boyd , Arpita Ghosh , Balaji Prabhakar , and Devavrat Shah . Randomized gossip algorithms . IEEE transactions on information theory , 52 ( 6 ) :2508–2530 , 2006 . Sebastian Caldas , Sai Meher Karthik Duddu , Peter Wu , Tian Li , Jakub Konečnỳ , H Brendan McMahan , Virginia Smith , and Ameet Talwalkar . Leaf : A benchmark for federated settings . arXiv preprint arXiv:1812.01097 , 2018 . Timothy Castiglia , Anirban Das , and Stacy Patterson . Multi-level local sgd for heterogeneous hierarchical networks . arXiv preprint arXiv:2007.13819 , 2020 . Yiming Chen , Kun Yuan , Yingya Zhang , Pan Pan , Yinghui Xu , and Wotao Yin . Accelerating gossip sgd with periodic global averaging . In International Conference on Machine Learning . PMLR , 2021a . Yiming Chen , Kun Yuan , Yingya Zhang , Pan Pan , Yinghui Xu , and Wotao Yin . Accelerating gossip sgd with periodic global averaging . In Marina Meila and Tong Zhang ( eds . ) , Proceedings of the 38th International Conference on Machine Learning , volume 139 of Proceedings of Machine Learning Research , pp . 1791–1802 . PMLR , 18–24 Jul 2021b . Gregory Cohen , Saeed Afshar , Jonathan Tapson , and Andre Van Schaik . Emnist : Extending mnist to handwritten letters . In 2017 International Joint Conference on Neural Networks ( IJCNN ) , pp . 2921–2926 . IEEE , 2017 . Antonious Girgis , Deepesh Data , Suhas Diggavi , Peter Kairouz , and Ananda Theertha Suresh . Shuffled model of differential privacy in federated learning . In International Conference on Artificial Intelligence and Statistics , pp . 2521–2529 . PMLR , 2021 . Farzin Haddadpour , Mohammad Mahdi Kamani , Mehrdad Mahdavi , and Viveck Cadambe . Local sgd with periodic averaging : Tighter analysis and adaptive synchronization . In Advances in Neural Information Processing Systems , pp . 11082–11094 , 2019 . Tzu-Ming Harry Hsu , Hang Qi , and Matthew Brown . Measuring the effects of non-identical data distribution for federated visual classification . arXiv preprint arXiv:1909.06335 , 2019 . Peter Kairouz , H Brendan McMahan , Brendan Avent , Aurélien Bellet , Mehdi Bennis , Arjun Nitin Bhagoji , Keith Bonawitz , Zachary Charles , Graham Cormode , Rachel Cummings , et al . Advances and open problems in federated learning . arXiv preprint arXiv:1912.04977 , 2019 . Sai Praneeth Karimireddy , Satyen Kale , Mehryar Mohri , Sashank Reddi , Sebastian Stich , and Ananda Theertha Suresh . Scaffold : Stochastic controlled averaging for federated learning . In International Conference on Machine Learning , pp . 5132–5143 . PMLR , 2020 . Anastasia Koloskova , Sebastian Stich , and Martin Jaggi . Decentralized stochastic optimization and gossip algorithms with compressed communication . In International Conference on Machine Learning , pp . 3478–3487 , 2019 . Anastasia Koloskova , Nicolas Loizou , Sadra Boreiri , Martin Jaggi , and Sebastian U Stich . A unified theory of decentralized sgd with changing topology and local updates . arXiv preprint arXiv:2003.10422 , 2020 . Alex Krizhevsky , Geoffrey Hinton , et al . Learning multiple layers of features from tiny images . 2009 . Tao Lin , Sebastian U Stich , Kumar Kshitij Patel , and Martin Jaggi . Don ’ t use large mini-batches , use local sgd . In International Conference on Learning Representations , 2019 . Lumin Liu , Jun Zhang , SH Song , and Khaled B Letaief . Client-edge-cloud hierarchical federated learning . In ICC 2020-2020 IEEE International Conference on Communications ( ICC ) , pp . 1–6 . IEEE , 2020 . Brendan McMahan , Eider Moore , Daniel Ramage , Seth Hampson , and Blaise Aguera y Arcas . Communication-efficient learning of deep networks from decentralized data . In Artificial Intelligence and Statistics , pp . 1273–1282 , 2017 . H Brendan McMahan , Daniel Ramage , Kunal Talwar , and Li Zhang . Learning differentially private recurrent language models . In International Conference on Learning Representations , 2018 . Angelia Nedić , Alex Olshevsky , and Michael G Rabbat . Network topology and communicationcomputation tradeoffs in decentralized optimization . Proceedings of the IEEE , 106 ( 5 ) :953–976 , 2018 . Sashank Reddi , Zachary Charles , Manzil Zaheer , Zachary Garrett , Keith Rush , Jakub Konečnỳ , Sanjiv Kumar , and H Brendan McMahan . Adaptive federated optimization . arXiv preprint arXiv:2003.00295 , 2020 . Daniel Rothchild , Ashwinee Panda , Enayat Ullah , Nikita Ivkin , Ion Stoica , Vladimir Braverman , Joseph Gonzalez , and Raman Arora . Fetchsgd : Communication-efficient federated learning with sketching . In International Conference on Machine Learning , pp . 8253–8265 . PMLR , 2020 . Sebastian Urban Stich . Local sgd converges fast and communicates little . In International Conference on Learning Representations ( ICLR ) , 2019 . John Nikolas Tsitsiklis . Problems in decentralized decision making and computation . Technical report , Massachusetts Inst of Tech Cambridge Lab for Information and Decision Systems , 1984 . Jianyu Wang and Gauri Joshi . Cooperative sgd : A unified framework for the design and analysis of communication-efficient sgd algorithms . arXiv preprint arXiv:1808.07576 , 2018 . Jianyu Wang , Anit Kumar Sahu , Zhouyi Yang , Gauri Joshi , and Soummya Kar . Matcha : Speeding up decentralized sgd via matching decomposition sampling . arXiv preprint arXiv:1905.09435 , 2019 . Jianyu Wang , Qinghua Liu , Hao Liang , Gauri Joshi , and H Vincent Poor . Tackling the objective inconsistency problem in heterogeneous federated optimization . Advances in neural information processing systems , 2020 . Jianyu Wang , Zachary Charles , Zheng Xu , Gauri Joshi , H Brendan McMahan , Maruan Al-Shedivat , Galen Andrew , Salman Avestimehr , Katharine Daly , Deepesh Data , et al . A field guide to federated optimization . arXiv preprint arXiv:2107.06917 , 2021 . Chengxu Yang , Qipeng Wang , Mengwei Xu , Zhenpeng Chen , Kaigui Bian , Yunxin Liu , and Xuanzhe Liu . Characterizing impacts of heterogeneity in federated learning upon large-scale smartphone data . In Proceedings of the Web Conference 2021 , pp . 935–946 , 2021 . Bicheng Ying , Kun Yuan , Yiming Chen , Hanbin Hu , Pan Pan , and Wotao Yin . Exponential graph is provably efficient for decentralized deep training . arXiv preprint arXiv:2110.13363 , 2021 . Hao Yu , Sen Yang , and Shenghuo Zhu . Parallel restarted sgd with faster convergence and less communication : Demystifying why model averaging works for deep learning , 2018 . Jinliang Yuan , Mengwei Xu , Xiao Ma , Ao Zhou , Xuanzhe Liu , and Shangguang Wang . Hierarchical federated learning through lan-wan orchestration . arXiv preprint arXiv:2010.11612 , 2020 . Mikhail Yurochkin , Mayank Agarwal , Soumya Ghosh , Kristjan Greenewald , Nghia Hoang , and Yasaman Khazaeni . Bayesian nonparametric federated learning of neural networks . In International Conference on Machine Learning , pp . 7252–7261 . PMLR , 2019 . Yue Zhao , Meng Li , Liangzhen Lai , Naveen Suda , Damon Civin , and Vikas Chandra . Federated learning with non-iid data . arXiv preprint arXiv:1806.00582 , 2018 . A PRELIMINARIES Intra-cluster dynamics . To facilitate the analysis , we introduce matrices Xk ∈ Rn×d and Gk ∈ Rn×d constructed by stacking respectively xi and gi for i ∈ Vk row-wise . Similarly , we define the pseudo-gradient ∇Fk ( Xk ) ∈ Rn×d associated to cluster k by stacking ∇fi ( xi ) for i ∈ Vk row-wise . In addition , define the following intra-cluster averages for each cluster k : x̄k , 1 n ∑ i∈Vk xi and ḡk , 1 n ∑ i∈Vk gi . ( 13 ) The update within each cluster then can be written compactly in matrix form as Xr , s+1k = Wk ( X r , s k − ηG r , s k ) , ∀k = 1 , . . . , K. ( 14 ) Since each Wk is bi-stochastic , we obtain the following update of the intra-cluster average x̄r , s+1k = x̄ r , s k − η · ḡ r , s k . ( 15 ) We proceed to derive the update of the intra-cluster consensus error . Define the averaging matrix J = 1 n 1 · 1 > with 1 = [ 1 , . . . , 1︸ ︷︷ ︸ n ] . ( 16 ) Multiplying both sides of ( 14 ) from the left by ( I−J ) leads to the following update of the consensus error : ( I − J ) Xr , s+1k︸ ︷︷ ︸ Xr , s+1k , ⊥ = ( I − J ) Wk ( Xr , sk − ηG r , s k ) = ( Wk − J ) ( Xr , sk − ηG r , s k ) = ( Wk − J ) ( Xr , sk , ⊥ − ηG r , s k ) . ( 17 ) Global average dynamics . Define the global average among all xi ’ s as x̄ , 1 N N∑ i=1 xi . ( 18 ) Then accordingly to ( 15 ) we have the following update of x̄ for all s = 0 , . . . , τ − 1 : x̄r , s+1 = 1 N K∑ k=1 nx̄r , s+1k = 1 N K∑ k=1 n ( x̄r , sk − ηḡ r , s k ) = 1 N N∑ i=1 ( xr , si − ηg r , s i ) = x̄ r , s − η 1 N N∑ i=1 gr , si . ( 19 ) Filtration . Let G = [ G1 ; . . . ; GK ] ∈ RN×d be the matrix constructed by stacking all the stochastic gradients . We introduce the following filtration Fr , s = σ ( G0,0 , . . . , G0 , τ−1 , S0 , G 1,0 , . . . , G1 , τ−1 , . . . , Sr−1 , G r,0 , . . . , Gr , s ) Fr = σ ( G0,0 , . . . , G0 , τ−1 , S0 , G 1,0 , . . . , G1 , τ−1 , . . . , Sr−1 ) . ( 20 ) Therefore we have xr,0i = x r ∈ Fr for r ≥ 1 , and xr , si ∈ Fr , s−1 for 1 ≤ s ≤ τ . For simplicity the conditional expectation E ( · |Fr , s ) is denoted as Er , s , and we define the noise in the stochastic gradient as ξr , si , g r , s i −∇fi ( x r , s i ) . ( 21 ) Since at the end of round r all nodes are picked with equal probability , the sampling procedure preserves average in expectation : Er , τ−2xr+1 = E ( E ( xr+1|Fr , τ−1 ) |Fr , τ−2 ) = E E 1 K K∑ k=1 1 m ∑ i∈Srk xr , τi |Fr , τ−1 |Fr , τ−2 = E ( E ( 1 K K∑ k=1 1 m ∑ i∈Vk I ( i ∈ Srk ) x r , τ i |Fr , τ−1 ) |Fr , τ−2 ) = Er , τ−2 ( x̄r , τ ) ( 22 ) where the last equality holds since P ( i ∈ Srk|i ∈ Vk ) = mn . B CONVERGENCE ANALYSIS To prove the convergence we first establish in Sec . B.1 that the objective value Ef ( xr ) is descending at each round r , up to some consensus error terms . Subsequently , bounds on the error terms are provided in Sec . B.2-B.4 . Based on these results , the proof of convergence of Algorithm 1 with full and partial device participation are given in Sec . B.5 and B.6 , respectively . The proofs of the main propositions are given in Sec . C and that of the supporting lemmas are deferred to Sec . D. B.1 OBJECTIVE DESCENT Lemma 1 . Let { xr , si } be the sequence generated by Algorithm 1 under Assumptions 1-6 . If η > 0 , then the following inequality holds for all r ∈ N+ : Ef ( xr+1 ) ≤ Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + τ−2∑ s=0 E ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) + E ( L 2 ‖xr+1 − x̄r , τ−1‖2 ) . ( 23 ) Proof . The proof is a standard application of the descent lemma and the sampling rule applied at iteration τ to obtain xr+1 . See Appendix D.1 . Lemma 1 shows the objective value f ( xr ) is descending in expectation up to the following error terms : T1 = E ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 , T2 = E∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 T3 = E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 T4 = E‖x̄r , s+1 − x̄r , s‖2 , T5 = E‖xr+1 − x̄r , τ−1‖2 . ( 24 ) In the sequel , we will show these quantities can be bounded by the optimality gap measured in terms of the gradient norms ‖∇f ( x̄r , s ) ‖2 , ‖ ( 1/K ) ∑K k=1∇f̄k ( x̄ r , s k ) ‖2 , and ‖ ( 1/N ) ∑N i=1∇fi ( x r , s i ) ‖2 . B.2 BOUNDING T1 , T2 AND T3 . Define ρmax = max k=1 , ... , K ρk . ( 25 ) Therefore it holds 0 ≤ ρmax ≤ 1 by Assumption 3 . Since each fi is L-smooth by Assumption 1 , we have f̄k and f are also L-smooth . Using this fact and the convexity of ‖ · ‖2 we can bound T1 , T2 and T3 as T1 = E ∥∥∥∇f ( x̄r , s ) ± 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 ≤ 2 1 K K∑ k=1 L2E‖x̄r , s − x̄r , sk ‖ 2 + 2 K∑ k=1 1 N ∑ i∈Vk L2E‖x̄r , sk − x r , s i ‖ 2 , T2 = E ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 ≤ 1 K K∑ k=1 L2E ∥∥∥x̄r , s − x̄r , sk ∥∥∥2 , T3 = E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 ≤ K∑ k=1 1 N ∑ i∈Vk L2E‖x̄r , sk − x r , s i ‖ 2 . ( 26 ) Clearly , in order to bound T1,2,3 we first need to bound the inter-cluster consensus error ‖x̄r , s−x̄r , sk ‖ and the intra-cluster consensus error ‖x̄r , sk − x r , s i ‖ . Lemma 2 ( Inter-Cluster Consensus Error Bound ) . Let { xr , si } be the sequence generated by Algorithm 1 under Assumptions 1 , 2 , 3 , and 5 . If the learning rate η > 0 satisfies η2 ≤ 1 24τ ( 4τ − 1 ) L2 , ( 27 ) then for all s = 0 , . . . , τ − 1 it holds 1 K K∑ k=1 E‖x̄r , s+1 − x̄r , s+1k ‖ 2 ≤ Cτ 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + 12τη2L2 ( 1 N K∑ K=1 E ∥∥∥Xr , sk , ⊥∥∥∥2 ) + 12τη2 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 K − 1 N σ2 ( 28 ) where Cτ , 1 + 3 2 · 1 4τ − 1 . ( 29 ) Proof . See Appendix D.2 . Lemma 3 ( Intra-Cluster Consensus Error Bound ) . Let { xr , si } be the sequence generated by Algorithm 1 under Assumptions 1-5 . If η > 0 , then for all s = 0 , . . . , τ − 1 it holds 1 N K∑ k=1 E‖Xr , s+1k , ⊥ ‖ 2 ≤ ( max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + η 2ρL · 4L2 ) 1 N K∑ k=1 E‖Xr , sk , ⊥‖ 2 + 4η2ρLL 2 1 K K∑ k=1 E‖x̄r , sk − x̄ r , s‖2 + 4η2ρL ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2ρL̄2L + η2σ2ρ2max , ( 30 ) where ρmax is defined in ( 25 ) and ρL , max k=1 , ... , K { ρ2k ( 1 + ζk ) } , ̄2L , 1 K K∑ k=1 2k ( 31 ) with ζk > 0 being a free parameter to be chosen properly for all k = 1 , . . . , K. Proof . See Appendix D.3 . Combining Lemma 2 and 3 we can obtain the following bound on the sum of intra- and interconsensus errors using gradient ‖∇f ( x̄r , s ) ‖2 . Proposition 1 . Let { xr , si } be the sequence generated by Algorithm 1 under Assumptions 1-5 . If the learning rate η > 0 satisfies η2 ≤ 1 24τ ( 4τ − 1 ) L2 , ( 32 ) then for all s = 0 , . . . , τ − 1 it holds 1 K K∑ k=1 E‖x̄r , s+1 − x̄r , s+1k ‖ 2 + K∑ k=1 1 N ‖Xr , s+1k , ⊥ ‖ 2 ≤ s∑ ` =0 C1η 2 ( τ + ρ2maxDτ , ρ ) ( α2E‖∇f ( x̄r , ` ) ‖2 + 2g ) + C1η2τρ2maxDτ , ρ̄2L + C1τη 2ρ2maxσ 2 + C1 ( τ +D 2 τ , ρτ −1ρ2max ) η 2 1 n σ2 ( 33 ) where Dτ , ρ , min { τ , 1 1− ρmax } ( 34 ) and C1 > 0 is some universal constant . Proof . See Appendix C.1 . Notice that according to ( 26 ) the gradient difference terms in Lemma 1 can be bounded as η 4 E ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 + η 4 E ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 ≤η 4 ( 2 K K∑ k=1 L2E‖x̄r , s − x̄r , sk ‖ 2 + K∑ k=1 2 N ∑ i∈Vk L2E‖x̄r , sk − x r , s i ‖ 2 ) + η 4 ( 1 K K∑ k=1 L2E ∥∥∥x̄r , s − x̄r , sk ∥∥∥2 + K∑ k=1 1 N ∑ i∈Vk L2E‖x̄r , sk − x r , s i ‖ 2 ) ≤ηL2 ( 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + K∑ k=1 1 N ‖Xr , sk , ⊥‖ 2 ) ( 35 ) for all s = 1 , . . . , τ . Therefore Proposition 1 immediately leads to the following result . Corollary 2 . Under the same setting as Proposition 1 , it holds τ∑ s=0 η 4 E ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 + τ∑ s=0 η 4 E ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + τ∑ s=0 η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 ≤ τ−1∑ s=0 C1L 2η3 ( τ2 + τρ2maxDτ , ρ ) ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + C1L2η3τ2ρ2maxDτ , ρ̄2L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n . ( 36 ) We conclude this section by providing a separate bound on the consensus error 1 N ∑K k=1 Er‖X r , τ−1 k , ⊥ ‖2 that will be useful in bounding T5 . Proposition 2 . Under the same setting as Proposition 1 , if ρmax ≤ 1− 1τ , then we have 1 N E K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 ≤ 2C2 τ−2∑ s=0 D2τ , ρρmaxη 2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C2D 2 τ , ρτρ 2 maxη 2̄2L + C2 ( 1 n + ρmax ) ρmaxτDτ , ρη 2σ2 . ( 37 ) for some universal constant C2 > 0 . Proof . See Appendix C.2 . Proposition 2 shows that the average intra-cluster consensus error 1N ∑K k=1 ‖X r , τ−1 k , ⊥ ‖2 decreases as the network connectivity improves , and vanishes if ρmax goes to zero . B.3 BOUNDING T4 Proposition 3 . Under the same setting as Lemma 1 , we have E‖x̄r , s+1 − x̄r , s‖2 = η2E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + η2 σ2 N ( 38 ) for s = 0 , . . . , τ − 1 and r ∈ N+ . Proof . Recall the algorithmic update at iteration s for all s = 0 , . . . , τ − 1 : Xr , s+1k = WkX r , s k − ηWkG r , s k x̄r , s+1k = x̄ r , s k − ηḡ r , s k . ( 39 ) Therefore , it holds under Assumption 2 that E‖x̄r , s+1 − x̄r , s‖2 =E ∥∥∥∥∥ ηN N∑ i=1 ( gr , si ±∇fi ( x r , s i ) ∥∥∥∥∥ 2 = E ∥∥∥∥∥ ηN N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + η2 σ2 N . ( 40 ) B.4 BOUNDING T5 We provide the bound on T5 separately for the full device participation and partial participation cases . Full participation . When the sampling probability p = 1 , we have xr+1 = 1 N N∑ i=1 xr , τi = x̄ r , τ . In this case , it follows from Proposition 3 that E‖xr+1 − x̄r , τ−1‖2 = η2E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , τ−1i ) ∥∥∥∥∥ 2 + η2 σ2 N . ( 41 ) Partial participation . We proceed to bound T5 for 1 ≤ m ≤ n− 1 . ( 42 ) Define p = m/n . Recall the algorithmic update at iteration τ − 1 : Xr , τk = WkX r , τ−1 k − ηWkG r , τ−1 k ( 43 ) and xr+1 = 1 K K∑ k=1 1 m ∑ i∈Srk xr , τi = 1 Np K∑ k=1 ∑ i∈Srk xr , τi . ( 44 ) Therefore , with ( Wk ) i , j being the ij-th element of matrix Wk we have under Assumption 2 : E‖xr+1 − x̄r , τ−1‖2 =E ∥∥∥∥∥∥ 1Np K∑ k=1 ∑ i∈Srk xr , τi − x̄ r , τ−1 ∥∥∥∥∥∥ 2 =E ∥∥∥∥∥∥ 1Np K∑ k=1 ∑ i∈Srk ( ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − ηg r , τ−1 j ) ) − x̄r , τ−1 ∥∥∥∥∥∥ 2 =E ∥∥∥∥∥∥ 1Np K∑ k=1 ∑ i∈Vk I ( i ∈ Srk ) ( ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − η∇fj ( x r , τ−1 j ) ) − x̄r , τ−1 ∥∥∥∥∥∥ 2 ︸ ︷︷ ︸ A2,1 + η2 E ∥∥∥∥∥∥ 1Np K∑ k=1 ∑ i∈Vk I ( i ∈ Srk ) ( ∑ j∈Vk ( Wk ) i , j ( ∇fj ( xr , τ−1j ) − g r , τ−1 j ) ) ∥∥∥∥∥∥ 2 ︸ ︷︷ ︸ A2,2 . ( 45 ) Proposition 4 . Let { xr , si } be the sequence generated by Algorithm 1 under Assumptions 1-6 . If the learning rate η > 0 satisfies η2 ≤ 1 24τ ( 4τ − 1 ) L2 , ( 46 ) then we have the following bounds on A2,1 : A2,1 ≤2η2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 8 ( Gp + 1 τ2 ) ( 1 N K∑ k=1 E‖Xr , τ−1k , ⊥ ‖ 2 ) ; ( 47 ) where Gp , n−m m ( n− 1 ) . ( 48 ) Proof . See Appendix C.3 . Proposition 5 . Under the same setting as Proposition 4 , A2,2 can be bounded as A2,2 ≤ σ2 N ( 2 + n m · ρ2max ) . ( 49 ) Proof . See Appendix C.4 B.5 PROOF OF THEOREM 1 ( FULL PARTICIPATION ) We first prove the descent of the objective value under suitable choice of η . Proposition 6 . If the learning rate satisfies η ≤ 1 4C1α · 1 τL , ( 50 ) then we have Ef ( xr+1 ) ≤ Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 +Rfull ( η ) , ( 51 ) where Rfull ( η ) =C1L2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + 2C1L 2η3 ( τ2ρ2maxDτ , ρ̄ 2 L + τ 2σ2 ( 1 n + ρ2max ) ) + η2Lτ σ2 N . ( 52 ) C1 > 0 is some universal constant . Proof . See Appendix C.5 . To attain the expression of the convergence rate , we sum ( 51 ) over r = 0 , . . . , R : min r∈ [ R ] min s=0 , ... , τ−1 E‖∇f ( x̄r , s ) ‖2 ≤8 ( f ( x 0 ) − f ( x ? ) ) ητ ( R+ 1 ) + 8Rfull ( η ) ητ = 8 ( f ( x0 ) − f ( x ? ) ) ητ ( R+ 1 ) + 16ηL σ2 N︸ ︷︷ ︸ centralized SGD + 16C1L 2τ2η2 2g + 16C1L 2η2 ( τρ2maxDτ , ρ̄ 2 L + τσ 2 ( 1 n + ρ2max ) ) ︸ ︷︷ ︸ network effect . ( 53 ) The first two terms of ( 53 ) corresponds to the impact of stochastic noise and is of the same order as the centralized SGD algorithm . The last term is of order η2 and corresponds to the deterioration of convergence rate due to the fact that we are not computing the average gradients of all devices at each iteration . Denote r0 = 8 ( f ( x 0 ) − f ( x ? ) ) , r1 = 16L ( σ2 N ) , r2 = 16C1L 2τ2 2g + 16C1L 2 ( τρ2maxDτ , ρ̄ 2 L + τσ 2 ( 1 n + ρ2max ) ) . ( 54 ) The rest of the proof follows the same argument as ( Chen et al. , 2021b , Appendix B.5 ) and thus we omit the details . B.6 PROOF OF THEOREM 2 AND COROLLARY 1 ( PARTIAL PARTICIPATION ) Proposition 7 . Let { xr , si } be the sequence generated by Algorithm 1 under Assumption 1-5 . If the learning rate η and the network connectivity satisfies η ≤ 1 C3α2 · 1 τL and ρmax ≤ 1− 1 τ , ( 55 ) then Ef ( xr+1 ) ≤ Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 +R ( 1 ) part ( η ) +R ( 2 ) part ( η ) ( 56 ) with R ( 1 ) part ( η ) =C1L2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + 2C1L 2η3 ( τ2ρ2maxDτ , ρ̄ 2 L + τ 2σ2 ( 1 n + ρ2max ) ) + Lτη2 σ2 N , ( 57 ) R ( 2 ) part ( η ) = ( 8C2G ′ pLD 2 τ , ρτρmax ) η2 2g + 4C2LG ′ pη 2 ( D2τ , ρτρ 2 max̄ 2 L + ( 1 n + ρmax ) ρmaxτDτ , ρσ 2 ) + L 2 ( n m ρ2max ) η2 σ2 N . C1 , C3 > 0 are some universal constants , and G′p = Gp + 1 τ2 , with Gp = n−m m ( n− 1 ) . ( 58 ) Proof . See Appendix C.6 Comparing ( 56 ) to ( 51 ) we can see thatR ( 1 ) part ( η ) is of the same order asR ( 1 ) full ( η ) , whileR ( 2 ) part ( η ) is an extra loss term introduced by sampling . Following the same steps as the proof of Theorem 1 gives min r∈ [ R ] min s=0 , ... , τ−1 E‖∇f ( x̄r , s ) ‖2 =O σ + E ( g , ̄L , σ , ρmax ) √ NτR + ( τ2 2g + τρ 2 maxDτ , ρ̄ 2 L + τ ( 1 n + ρ 2 max ) σ2 ) 1 3 ( τR ) 2 3 + 1 R , ( 59 ) where E2 ( g , ̄L , σ , ρmax ) = ( 2gDτ , ρ + ρmaxDτ , ρ̄2L + σ2 ) ·G′pDτ , ρρmaxN + n m · 1 τ ρ2maxσ 2 . ( 60 ) Our last step simplifies the overall conditions on ρmax so that E2 ( g , ̄L , σ , ρmax ) = O ( 1 ) : ρmax ≤ 1− 1 τ , G′pD 2 τ , ρρmax ≤ 1 N , ρmax ≤ m n · τ . ( 61 ) We claim to fulfill ( 61 ) it suffices to require ρmax ≤ 1 4N min { m , τ − 1 } . ( 62 ) When τ = 1 , the condition trivially requires ρmax = 0 . We then consider the case for τ ≥ 2 . By definition , it can be verified that G′p ≤ 1 m + 1 τ2 . ( 63 ) First notice that m 4N ≤ 1 4 ≤ 1− 1 τ and τ 4N ≤ m n · τ . ( 64 ) Therefore , it remains to prove ( 62 ) implies G′pD 2 τ , ρρmax ≤ 1 N . ( 65 ) Using the fact that under ( 62 ) ρmax ≤ 1/4 we have G′pD 2 τ , ρρmax = G ′ pρmax · 1 ( 1− ρmax ) 2 ≤16 9 ρmax ( 1 m + 1 τ2 ) ≤ 16 9 ( 1 m + 1 τ2 ) 1 4N min { m , τ } ≤ 1 N . ( 66 ) This proves the claim . C PROOF OF MAIN PROPOSITIONS C.1 PROOF OF PROPOSITION 1 Denote for short Mr , s , 1 N K∑ k=1 E‖Xr , sk , ⊥‖ 2 1 K K∑ k=1 E‖x̄r , sk − x̄ r , s‖2 . ( 67 ) Invoking Lemma 2 and Lemma 3 we obtain that under the condition that the learning rate η > 0 satisfies η2 ≤ 1 24τ ( 4τ − 1 ) L2 , ( 68 ) the following inequality is satisfied for all s = 0 , . . . , τ − 1 : Mr , s+1 ≤ G ·Mr , s +Br , s , ( 69 ) where G = ( maxk∈ [ K ] ρ 2 k ( 1 + ζ −1 k ) + η 2ρL · 4L2 η2ρL · 4L2 12τη2L2 Cτ ) ( 70 ) Br , s = ( 4ρLη 2 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2ρL̄2L + η2ρ2maxσ2 12τη2 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 σ 2 n . ) ( 71 ) The inequality in ( 69 ) is defined elementwise . Unrolling ( 69 ) yields Mr , s+1 ≤ s∑ ` =0 G ` Br , s− ` , ( 72 ) where we have used the fact that Mr,0 = 0 due to full synchronization of the xi ’ s at the beginning of each round r. We first provide a bound on the sum of the two elements of G ` Br , s− ` . For simplicity we omit the round index r in the superscript for the rest of this section . Lemma 4 . Let bs− ` 1 and b s− ` 2 be the first and second element of B s− ` , respectively . Suppose the learning rate η > 0 then ( 1 , 1 ) G ` Bs− ` ≤ λ ` 2 ( bs− ` 1 + b s− ` 2 ) + λ ` 2 − λ ` 1 λ2 − λ1 η2 · ( 12τL2bs− ` 1 + 4ρLL 2bs− ` 2 ) ( 73 ) where λ1 ≤ λ2 are the eigenvalues of G ; and ρL is defined in ( 31 ) . Proof . See Appendix D.4 . From Lemma 4 we immediately get s∑ ` =0 ( 1 , 1 ) ·G ` Bs− ` ≤ s∑ ` =0 ( λ ` 2 ( b s− ` 1 + b s− ` 2 ) + λ ` 2 − λ ` 1 λ2 − λ1 η2 · ( 12τL2bs− ` 1 + 4ρLL 2bs− ` 2 ) ) . ( 74 ) Since λ2 ≥ Cτ > 1 , we have λ ` 2 − λ ` 1 λ2 − λ1 = λ ` −12 ` −1∑ s=0 ( λ1 λ2 ) s ≤ λ ` −12 min { λ2 λ2 − λ1 , ` } ≤ λ ` 2 min { 1 λ2 − λ1 , ` } ( 75 ) and thus s∑ ` =0 ( 1 , 1 ) ·G ` Bs− ` ≤ s∑ ` =0 λ ` 2 ( b s− ` 1 + b s− ` 2 ) + s∑ ` =0 ( λ ` 2 min { 1 λ2 − λ1 , ` } ) η2 · ( 12τL2bs− ` 1 + 4ρLL 2bs− ` 2 ) . ( 76 ) Recall the definition of ρL given by ( 31 ) : ρL = max k=1 , ... , K ρ2k ( 1 + ζk ) . ( 77 ) By the Gershgorin ’ s theorem , since η > 0 , we can upperbound λ2 as λ2 ≤ max { max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + η 2ρL · 8L2 , Cτ + 12τη2L2 } ≤ max { max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + ρL ( 4τ − 1 ) 3τ , 1 + 2 4τ − 1 } , ( 78 ) where the last inequality is due to the bound on η : η2 ≤ 1 24τ ( 4τ − 1 ) L2 . ( 79 ) Define constant Dτ , ρ = min { τ , 1 1− ρmax } . ( 80 ) We consider two cases . • Case 1 : ρmax ≤ 1− 1 τ ⇒ 1 1− ρmax ≤ τ . ( 81 ) Thus Dτ , ρ = 1/ ( 1− ρmax ) . We let ζk = ρk/ ( 1− ρk ) and it gives max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) = ρmax , ρL = max k=1 , ... , K { ρ2k 1− ρk } = ρ2max 1− ρmax = ρ2maxDτ , ρ . ( 82 ) Substituting into the bound of λ2 [ cf . ( 78 ) ] gives λ2 ≤ max { ρmax + ρ2max ( 1− ρmax ) 3τ ( 4τ − 1 ) , 1 + 2 4τ − 1 } ≤ max 1− 1τ + ( 1− 1τ ) 2 3 ( 4τ − 1 ) , 1 + 2 4τ − 1 < 1 + 34τ − 1 , ( 83 ) where in the second inequality we used the condition ( 81 ) . Since s ≤ τ and λ2 ≥ 1 , we obtain the following bound s∑ ` =0 λ ` 2b s− ` 1 ≤ ( ( 1 + 3 4τ − 1 ) τ ) · ( s∑ ` =0 b ` 1 ) ≤ 3 · ( s∑ ` =0 b ` 1 ) . ( 84 ) Moreover , since ρmax + η 2ρL · 4L2 ≤ ρmax + ρ2max ( 1− ρmax ) ( 4τ − 1 ) 6τ ( 81 ) ≤ 1− 1 τ + ( 1− 1τ ) 2 6 ( 4τ − 1 ) ≤ Cτ , ( 85 ) we can bound λ2 − λ1 as λ2 − λ1 ≥ Cτ − ρmax − η2ρL · 4L2 ≥ Cτ − ( ρmax + ρ2max ( 1− ρmax ) ( 4τ − 1 ) 6τ ) ( 81 ) ≥ Cτ − ( ρmax + ρmax · 1− 1τ 6 ( 4τ − 1 ) ) ≥ 1 + 1 4τ − 1 − ( ρmax + ρmax · 1 4τ − 1 ) = ( 1− ρmax ) ( 1 + 1 4τ − 1 ) ≥ 1− ρmax . ( 86 ) Collecting ( 84 ) and ( 86 ) we can bound ( 76 ) as s∑ ` =0 ( 1 , 1 ) ·G ` Bs− ` ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 η2 · ( 12τL2b ` 1 + 4ρLL 2b ` 2 ) · 3 ( min { 1 λ2 − λ1 , τ } ) ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 η2 · ( 12τL2b ` 1 +Dτ , ρρ 2 max4L 2b ` 2 ) · 3Dτ , ρ ( 79 ) ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 ( 12τb ` 1 +Dτ , ρρ 2 max4b ` 2 ) · 3Dτ , ρ 1 ( 4τ − 1 ) 24τ ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 ( 12τb ` 1 +Dτ , ρρ 2 max4b ` 2 ) · 1 8 Dτ , ρ τ2 = s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 ( 12τb ` 1 +Dτ , ρρ 2 max4b ` 2 ) · 1 8 Dτ , ρ τ2 . ( 87 ) Substituting the expression of b ` 1 and b ` 2 gives s∑ ` =0 ( 1 , 1 ) ·G ` Bs− ` ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 5 + s∑ ` =0 D2τ , ρ τ2 · ρ2maxb ` 2 = s∑ ` =0 5 ( 4η2 ( ρL + 3τ ) ( α 2E‖∇f ( x̄r , ` ) ‖2 + 2g ) + 4η2ρL̄2L + η2ρ2maxσ2 + η2 1 n σ2 ) + s∑ ` =0 D2τ , ρ τ2 · ρ2max ( 12τη2 ( α2E‖∇f ( x̄r , ` ) ‖2 + 2g ) + η2 1 n σ2 ) ≤ s∑ ` =0 C1 2 η2 ( ρL + τ + ρ 2 maxD 2 τ , ρτ −1 ) ( α2E‖∇f ( x̄r , ` ) ‖2 + 2g ) + C1 2 η2τρL̄ 2 L + C1 2 τη2ρ2maxσ 2 + C1 2 ( τ +D2τ , ρτ −1ρ2max ) η 2 1 n σ2 ≤ s∑ ` =0 C1η 2 ( τ + ρ2maxDτ , ρ ) ( α2E‖∇f ( x̄r , ` ) ‖2 + 2g ) + C1η2τρ2maxDτ , ρ̄2L + C1τη 2ρ2maxσ 2 + C1 ( τ +D 2 τ , ρτ −1ρ2max ) η 2 1 n σ2 ( 88 ) where C1 is some universal constant . The last inequality holds since ρL = ρ2maxDτ , ρ and Dτ , ρ ≤ τ . • Case 2 : ρmax > 1− 1 τ ⇒ Dτ , ρ = τ . ( 89 ) In such a case , we let ζk = ( 4τ − 1 ) and thus max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) = ρ 2 max ( 1 + ( 4τ − 1 ) −1 ) , ρL = 4τρ2max = 4ρ2maxDτ , ρ . ( 90 ) Substituting into the bound of λ2 given in ( 78 ) , applying again the learning rate condition ( 79 ) and using the fact that Dτ , ρ = τ : λ2 ≤ max { ρ2max ( 1 + ( 4τ − 1 ) −1 ) + 4ρ2max 3 ( 4τ − 1 ) , 1 + 2 ( 4τ − 1 ) } ≤ 1 + 3 4τ − 1 . ( 91 ) Therefore by ( 76 ) , ( 79 ) , ( 84 ) , and the fact that min { 1 λ2 − λ1 , ` } ≤ τ = Dτ , ρ ( 92 ) we obtain s∑ ` =0 ( 1 , 1 ) ·G ` Bs− ` ≤ s∑ s=0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 η2 · ( 12τL2b ` 1 + 16ρ 2 maxDτ , ρL 2b ` 2 ) · 3Dτ , ρ ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 ( 12τb ` 1 + 16ρ 2 maxDτ , ρb ` 2 ) 1 8 Dτ , ρ τ2 ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 5 + s∑ ` =0 2 D2τ , ρ τ2 ρ2maxb ` 2 . ( 93 ) Substituting the expression of b1 and b2 and using the fact that ρL = 4τρ 2 max = 4ρ 2 maxDτ , ρ we arrive at the same bound as in Case 1 , possibly with a different constant C1 . C.2 PROOF OF PROPOSITION 2 We are in Case 1 described in the proof of Proposition 1 . By letting ζk = ρk/ ( 1− ρk ) we have G = ( ρmax + ρ2max 1−ρmax · η 2 · 4L2 ρ 2 max 1−ρmax · η 2 · 4L2 12τη2L2 Cτ ) ( 94 ) and the following bound on the difference of the eigenvalues of G : λ2 − λ1 ≥ 1− ρmax . ( 95 ) Notice that according to ( 72 ) and ( 149 ) 1 N K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 = 1 det ( T ) τ−2∑ ` =0 tτ−2− ` 1 . Therefore 1 N K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 = 1 12τη2L2 ( λ2 − λ1 ) τ−2∑ ` =0 ( ( Cτ − λ1 ) ( λ ` 112τη 2L2bτ−2− ` 1 − λ ` 1 ( λ2 − Cτ ) b τ−2− ` 2 ) ) + 1 12τη2L2 ( λ2 − λ1 ) τ−2∑ ` =0 ( ( λ2 − Cτ ) ( λ ` 212τη 2L2bτ−2− ` 1 + λ ` 2 ( Cτ − λ1 ) bτ−2− ` 2 ) ) ≤ 1 12η2L2τ ( 1− ρmax ) τ−2∑ ` =0 ( ( Cτ − λ1 ) λ ` 1 ( 12τη2L2bτ−2− ` 1 − ( λ2 − Cτ ) b τ−2− ` 2 ) ) + 1 12η2L2τ ( 1− ρmax ) τ−2∑ ` =0 ( ( λ2 − Cτ ) λ ` 2 ( 12τη2L2bτ−2− ` 1 + ( Cτ − λ1 ) b τ−2− ` 2 ) ) . ( 96 ) In the following , we bound λ1 and λ2 − Cτ as a function of ρmax . For notation simplicity we omit the subscript of ρmax in the rest of the proof . Further , we introduce the following shorthand notation for the elements of G : f ( ρ ) = ρ+ ρ2 1− ρ · η2 · 4L2 , g ( ρ ) = ρ 2 1− ρ · η2 · 4L2 , and h ( τ ) = 12τη2L2 . ( 97 ) The eigenvalues of G then can be written in closed form as λ1,2 = f ( ρ ) + Cτ ± √ ( Cτ − f ( ρ ) ) 2 + 4g ( ρ ) h ( τ ) 2 . ( 98 ) Since we have proved in Proposition 1 that Cτ ≥ f ( ρ ) [ cf . ( 85 ) ] , this gives us the following upperbounds on λ2 as : Cτ ≤ λ2 = f ( ρ ) + Cτ + √ ( Cτ − f ( ρ ) ) 2 + 4g ( ρ ) h ( τ ) 2 ≤ Cτ + √ g ( ρ ) h ( τ ) . ( 99 ) Furthermore , applying the Gershgorin ’ s theorem we obtain λ1 ≥ min { ρ , Cτ − 12τη2L2 } ≥ ρ ≥ 0 . ( 100 ) under the learning rate condition ( 79 ) . Substituting the bounds into ( 96 ) gives 1 N K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 ≤ 1 12η2L2τ ( 1− ρ ) τ−2∑ ` =0 ( Cτλ ` 1 ( 12τη2L2bτ−2− ` 1 − ( λ2 − Cτ ) b τ−2− ` 2 ) ) + 1 12η2L2τ ( 1− ρ ) τ−2∑ ` =0 ( ( λ2 − Cτ ) λ ` 2 ( 12τη2L2bτ−2− ` 1 + Cτ b τ−2− ` 2 ) ) ≤ 1 12η2L2τ ( 1− ρ ) τ−2∑ ` =0 ( Cτf ( ρ ) ` ( 12τη2L2bτ−2− ` 1 ) ) + 1 12η2L2τ ( 1− ρ ) τ−2∑ ` =0 ( √ g ( ρ ) h ( τ ) λ ` 2 ( 12τη2L2bτ−2− ` 1 + Cτ b τ−2− ` 2 ) ) ≤ 1 1− ρ Cτ ( τ−2∑ ` =0 b ` 1 ) + 1 1− ρ √ g ( ρ ) h ( τ ) λτ2 ( τ−2∑ ` =0 b ` 1 ) + Cτ 12η2L2τ ( 1− ρ ) √ g ( ρ ) h ( τ ) λτ2 ( τ−2∑ ` =0 b ` 2 ) ≤Dτ , ρCτ ( τ−2∑ ` =0 b ` 1 ) + 3Dτ , ρη 2L2ρ √ Dτ , ρ · 48τ ( τ−2∑ ` =0 b ` 1 ) + Dτ , ρCτ 12τ ρ √ Dτ , ρ · 48τ ( τ−2∑ ` =0 b ` 2 ) . ( 101 ) where we have used the bound λ1 ≤ f ( ρ ) < 1 , λ2 > 1 and λτ2 < 3 . Plug in the expression of b1 and b2 and using the fact that Cτ < 2 , ρL = ρ2Dτ , ρ gives 1 N K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 ≤ ( 2Dτ , ρ + 3Dτ , ρη 2L2ρ √ Dτ , ρ · 48τ ) ρ2 τ−2∑ s=0 ( 4η2Dτ , ρ ( α 2‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2Dτ , ρ̄2L + η2σ2 ) + Dτ , ρCτ 12τ ρ √ Dτ , ρ · 48τ τ−2∑ s=0 ( 12τη2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 σ2 n ) ≤ ( 2Dτ , ρ + Dτ , ρ τ ρ ) τ−2∑ s=0 ρ2 ( 4η2Dτ , ρ ( α 2‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2Dτ , ρ̄2L + η2σ2 ) + 2 Dτ , ρ τ ρ √ Dτ , ρ · τ τ−2∑ s=0 ( 12τη2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 1 n σ2 ) ≤3Dτ , ρρ2 τ−2∑ s=0 ( 4η2Dτ , ρ ( α 2‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2Dτ , ρ̄2L + η2σ2 ) + 2Dτ , ρρ √ Dτ , ρτ−1 τ−2∑ s=0 ( 12τη2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 1 n σ2 ) , ( 102 ) where the second inequality holds since 3τ2η2L2 ≤ 3τ2L2 · 1 24τ ( 4τ − 1 ) L2 ≤ 3τ2L2 · 1 24τ ( 2τ ) L2 < 1 8 ( 103 ) ⇒3Dτ , ρη2L2ρ √ Dτ , ρ · 48τ ≤ Dτ , ρ 8τ2 √ Dτ , ρ · 48τρ ≤ Dτ , ρ τ ρ ( 104 ) and the last inequality holds since Dτ , ρ ≤ τ . Tidy up the expression gives 1 N K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 ≤ τ−2∑ s=0 3Dτ , ρρ 2 ( 4η2Dτ , ρ ( α 2‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2Dτ , ρ̄2L + η2σ2 ) + τ−2∑ s=0 2Dτ , ρρ √ Dτ , ρτ−1 ( 12τη 2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 1 n σ2 ) ≤ C2 τ−2∑ s=0 ( D2τ , ρρ 2 + ( Dτ , ρ ) 1.5τ−0.5ρ ) η2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C2 ( Dτ , ρ ) 2τρ2η2̄2L + C2τDτ , ρρ 2η2σ2 + C2τ · ( Dτ , ρ ) 1.5τ−0.5ρη2 1 n σ2 ≤ 2C2 τ−2∑ s=0 D2τ , ρρη 2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C2 ( Dτ , ρ ) 2τρ2η2̄2L + C2 ( 1 n + ρ ) ρτDτ , ρη 2σ2 ( 105 ) for some C2 > 0 . The last inequality holds since ( Dτ , ρ ) 1.5τ−0.5 ≤ Dτ , ρ . ( 106 ) C.3 PROOF OF PROPOSITION 4 We prove ( 47 ) by splitting the terms A2,1 follows : A2,1 ( a ) =E ∥∥∥∥∥∥ 1Np K∑ k=1 ∑ i∈Vk I ( i ∈ Srk ) ( ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − η∇fj ( x r , τ−1 j ) − x̄ r , τ−1 k ) ∥∥∥∥∥∥ 2 ≤2E ∥∥∥∥∥ 1Np K∑ k=1 p · nη∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2E ∥∥∥ 1 Np K∑ k=1 ∑ i∈Vk I ( i ∈ Srk ) rik ∥∥∥2 , ( 107 ) where rik , ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − x̄ r , τ−1 k − η ( ∇fj ( x r , τ−1 j ) −∇f̄k ( x̄ r , τ−1 k ) ) . ( 108 ) Equality ( a ) holds since K∑ k=1 ∑ i∈Srk ∑ j∈Vk ( Wk ) i , j x̄ r , τ−1 k = K∑ k=1 ∑ i∈Srk x̄r , τ−1k = K∑ k=1 m · x̄r , τ−1k = K∑ k=1 p ∑ i∈Vk xr , τ−1i = Npx̄ r , τ−1 , ( 109 ) and similarly , ∑ i∈Srk ∑ j∈Vk ( Wk ) i , j∇f̄k ( x̄r , τ−1k ) = np∇f̄k ( x̄ r , τ−1 k ) . ( 110 ) Since samples are taken according to the rule specified by Assumption 6 , the following probabilities hold : P ( i ∈ Srk | i ∈ Vk ) = p , P ( i , j ∈ Srk | , i , j ∈ Vk ) = p · np− 1 n− 1 , ( 111 ) P ( i ∈ Srk , j ∈ Sr ` | i ∈ Vk , j ∈ V ` , k 6= ` ) = p2 . ( 112 ) Consequently , we can evaluate the second term in ( 107 ) and obtain A2,1 =2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 E p K∑ k=1 ∑ i∈Vk ‖rik‖2 + p · np− 1 n− 1 K∑ k=1 ∑ i , j∈Vk r > ikrjk + 2 ( Np ) 2 · p2 ∑ k 6= ` ∑ i∈Vk ∑ j∈V ` E ( r > ikrj ` ) =2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 E ( p · np− 1 n− 1 ∥∥∥ K∑ k=1 ∑ i∈Vk rik ∥∥∥2 + p ( 1− p ) n n− 1 K∑ k=1 ∑ i∈Vk ‖rik‖2 ) + 2 ( Np ) 2 p ( 1− p ) n− 1 E ∑ k 6= ` ∑ i∈Vk ∑ j∈V ` r > ikrj ` ≤2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 E ( p · np− 1 n− 1 ∥∥∥ K∑ k=1 ∑ i∈Vk rik ∥∥∥2 + p ( 1− p ) n n− 1 K∑ k=1 ∑ i∈Vk ‖rik‖2 ) + 2 ( Np ) 2 p ( 1− p ) n− 1 E ∑ k 6= ` ∑ i∈Vk ∑ j∈V ` 1 2 ‖rik‖2 + 1 2 ‖rj ` ‖2 ≤2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 E ( p · np− 1 n− 1 ∥∥∥ K∑ k=1 ∑ i∈Vk rik ∥∥∥2 + p ( 1− p ) n n− 1 K∑ k=1 ∑ i∈Vk ‖rik‖2 ) + 2 ( Np ) 2 p ( 1− p ) n− 1 ( K − 1 ) n K∑ k=1 ∑ i∈Vk E‖rik‖2 . ( 113 ) By substituting the expression of rik we can bound terms ‖ ∑K k=1 ∑ i∈Vk rik‖ 2 and∑K k=1 ∑ i∈Vk ‖rik‖ 2 as ∥∥∥ K∑ k=1 ∑ i∈Vk rik ∥∥∥2 = ∥∥∥ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − x̄ r , τ−1 k − η ( ∇fj ( x r , τ−1 j ) −∇f̄k ( x̄ r , τ−1 k ) ) ∥∥∥2 = η2 ∥∥∥∥∥∥ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , j ( ∇fj ( xr , τ−1j ) −∇f̄k ( x̄ r , τ−1 k ) ) ∥∥∥∥∥∥ 2 = η2 ∥∥∥∥∥∥ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , j ( ∇fj ( xr , τ−1j ) −∇fj ( x̄ r , τ−1 k ) ) ∥∥∥∥∥∥ 2 ≤ η2N K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , jL 2‖xr , τ−1j − x̄ r , τ−1 k ‖ 2 ≤ η2N K∑ k=1 ∑ i∈Vk L2‖xr , τ−1i − x̄ r , τ−1 k ‖ 2 = η2 ·NL2 K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 ( 114 ) and K∑ k=1 ∑ i∈Vk ‖rik‖2 = K∑ k=1 ∑ i∈Vk ∥∥∥∥∥∥ ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − x̄ r , τ−1 k − η ( ∇fj ( x r , τ−1 j ) −∇f̄k ( x̄ r , τ−1 k ) ) ∥∥∥∥∥∥ 2 ≤ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , j ∥∥∥xr , τ−1j − x̄r , τ−1k − η ( ∇fj ( xr , τ−1j ) −∇fj ( x̄r , τ−1k ) ) ∥∥∥2 ≤ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , j ( 2 ∥∥∥xr , τ−1j − x̄r , τ−1k ∥∥∥2 + 2η2 ∥∥∥∇fj ( xr , τ−1j ) −∇fj ( x̄r , τ−1k ) ∥∥∥2 ) ≤ K∑ k=1 ∑ i∈Vk 2 ∥∥∥xr , τ−1i − x̄r , τ−1k ∥∥∥2 + 2η2L2 K∑ k=1 ∑ i∈Vk ‖xr , τ−1i − x̄ r , τ−1 k ‖ 2 = K∑ k=1 2 ( 1 + η2L2 ) ‖Xr , τ−1k , ⊥ ‖ 2 . ( 115 ) Tidy up the expression leads to the following bound of A2,1 : A2,1 ≤2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 ( p · np− 1 n− 1 E ∥∥∥ K∑ k=1 ∑ i∈Vk rik ∥∥∥2 ) + 2 ( Np ) 2 p ( 1− p ) N n− 1 K∑ k=1 ∑ i∈Vk E‖rik‖2 ≤2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 ( p · np− 1 n− 1 η2 ·NL2 K∑ k=1 E‖Xr , τ−1k , ⊥ ‖ 2 ) + 2 ( Np ) 2 p ( 1− p ) N n− 1 ( K∑ k=1 2 ( 1 + η2L2 ) E‖Xr , τ−1k , ⊥ ‖ 2 ) ≤2η2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 N η2L2 K∑ k=1 E‖Xr , τ−1k , ⊥ ‖ 2 + 4 N 1− p p ( n− 1 ) ( K∑ k=1 ( 1 + η2L2 ) E‖Xr , τ−1k , ⊥ ‖ 2 ) ≤2η2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 8 N ( 1− p p ( n− 1 ) + 1 τ2 ) ( K∑ k=1 E‖Xr , τ−1k , ⊥ ‖ 2 ) , ( 116 ) where the last inequality holds under the learning rate condition η2 ≤ 1 24τ ( 4τ − 1 ) L2 . ( 117 ) This completes the proof of ( 47 ) . C.4 PROOF OF PROPOSITION 5 We bound A2,2 in following the same rationale as Proposition 4 . A2,2 =E ∥∥∥ 1 Np K∑ k=1 ∑ i∈Vk I ( i ∈ Srk ) ( ∑ j∈Vk ( Wk ) i , j ( ∇fj ( xr , sj ) − g r , s j ) ) ︸ ︷︷ ︸ eik ∥∥∥2 = 1 ( Np ) 2 ( p · np− 1 n− 1 E ∥∥∥ K∑ k=1 ∑ i∈Vk eik ∥∥∥2 + p ( 1− p ) n n− 1 K∑ k=1 ∑ i∈Vk E‖eik‖2 ) + 2 ( Np ) 2 p ( 1− p ) n− 1 E ∑ k 6= ` ∑ i∈Vk ∑ j∈V ` e > ikej ` = 1 ( Np ) 2 ( p · np− 1 n− 1 E ∥∥∥ K∑ k=1 ∑ i∈Vk eik ∥∥∥2 + p ( 1− p ) n n− 1 K∑ k=1 ∑ i∈Vk E‖eik‖2 ) , ( 118 ) where the last equality is due to fact that the inter-cluster stochastic noise is zero mean and independent . Recall the definition ξr , si , g r , s i −∇fi ( x r , s i ) . Using again the independence of the ξi ’ s we get E ∥∥∥ K∑ k=1 ∑ i∈Vk eik ∥∥∥2 = E∥∥∥ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , jξ r , s j ∥∥∥2 = E∥∥∥ N∑ i=1 ξr , si ∥∥∥2 = Nσ2 , ( 119 ) and K∑ k=1 ∑ i∈Vk E‖eik‖2 = K∑ k=1 ∑ i∈Vk E ∥∥∥ ∑ j∈Vk ( Wk ) i , jξ r , s j ∥∥∥2 = K∑ k=1 ‖Wk‖2σ2 = K∑ k=1 σ2 n∑ j=1 d2j ≤ K∑ k=1 σ2 ( 1 + ( n− 1 ) ρ2k ) ≤ Kσ2 + ( n− 1 ) Kρ2maxσ2 = ( 1 + ( n− 1 ) ρ2max ) Kσ2 . ( 120 ) where d1 ≤ d2 ≤ · · · ≤ dn = 1 are the singular values of Wk . Therefore , A2,2 ≤ 1 ( Np ) 2 ( p · np− 1 n− 1 ·Nσ2 + p ( 1− p ) n n− 1 ( 1 + ( n− 1 ) ρ2max ) Kσ2 ) = 1 Np ( np− 1 n− 1 σ2 ) + 1 Np ( 1− p n− 1 ( 1 + ( n− 1 ) ρ2max ) σ2 ) ≤ σ 2 N + σ2 N p−1 − 1 n− 1 ( 1 + ( n− 1 ) ρ2max ) ≤ σ 2 N ( 2 + p−1ρ2max ) . ( 121 ) The last inequality is due to p ≥ 1/n . C.5 PROOF OF PROPOSITION 6 Invoking the descent inequality Lemma 1 and the error bound for T1-T5 given by Corollary 2 , Proposition 3 and Eq . ( 41 ) : Ef ( xr+1 ) ≤Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + C1L 2η3τ ( τ + ρ2maxDτ , ρ ) τ−1∑ s=0 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C1L2η3τ2ρ2maxDτ , ρ̄2L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n + η2L 2 τ−1∑ s=0 E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + η2L 2 τ σ2 N ≤Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 + C1L 2η3τ ( τ + ρ2maxDτ , ρ ) τ−1∑ s=0 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + C1L2η3τ2ρ2maxDτ , ρ̄2L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n + η2Lτ σ2 N . ( 122 ) The last inequality holds under the condition that η ≤ 1 2L . ( 123 ) If we further enforce C1L 2η3τ ( τ + ρ2maxDτ , ρ ) α2 ≤ η 8 ⇔ η2 ≤ 1 8C1L2τ ( τ + ρ2maxDτ , ρ ) α 2 , ( 124 ) then Ef ( xr+1 ) ≤Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 + C1L 2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + C1L 2η3τ2ρ2maxDτ , ρ̄ 2 L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n + η2Lτ σ2 N =Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 + C1L2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + C1L 2η3 ( τ2ρ2max ( Dτ , ρ̄ 2 L + σ 2 ) + ( τ2 +D2τ , ρρ 2 max ) σ2 n ) + η2Lτ σ2 N ≤Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 + η2Lτ σ 2 N + C1L 2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + 2C1L 2η3 ( τ2ρ2maxDτ , ρ̄ 2 L + τ 2σ2 ( 1 n + ρ2max ) ) , ( 125 ) the last inequality is due to Dτ , ρ ≤ τ and ρmax ≤ 1 . C.6 PROOF OF PROPOSITION 7 Invoking the descent inequality Lemma 1 and the error bound for T1-T5 given by Corollary 2 , Proposition 3 , and 4 : Ef ( xr+1 ) ≤ Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + τ−2∑ s=0 E ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) + E ( L 2 ‖xr+1 − x̄r , τ−1‖2 ) ≤Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + C1L 2η3τ ( τ + ρ2maxDτ , ρ ) τ−1∑ s=0 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C1L2η3τ2ρ2maxDτ , ρ̄2L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n + L 2 η2 τ−2∑ s=0 E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + L 2 η2 ( τ − 1 ) σ 2 N + Lη2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + L 2 ( Gp + 1 τ2 ) ( 8 N K∑ k=1 E‖Xr , τ−1k , ⊥ ‖ 2 ) + L 2 η2 σ2 N ( 2 + n m ρ2max ) . ( 126 ) Denote for short G′p , Gp + 1 τ2 . ( 127 ) Further applying the bounds on the consensus error derived in Proposition 2 : Ef ( xr+1 ) ≤Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + C1L 2η3τ ( τ + ρ2maxDτ , ρ ) τ−1∑ s=0 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C1L2η3τ2ρ2maxDτ , ρ̄2L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n + L 2 η2 τ−2∑ s=0 E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + L 2 η2 ( τ − 1 ) σ 2 N + Lη2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 4LG′p ( 2C2 τ−2∑ s=0 D2τ , ρρmaxη 2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) ) + 4LG′p ( C2D 2 τ , ρτρ 2 maxη 2̄2L + C2 ( 1 n + ρmax ) ρmaxτDτ , ρη 2σ2 ) + L 2 η2 σ2 N ( 2 + n m ρ2max ) ( 128 ) Rearranging terms and tidy up the expression we have Ef ( xr+1 ) ≤Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + L 2 η2 τ−2∑ s=0 E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + Lη2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + C1L 2η3τ ( τ + ρ2maxDτ , ρ ) τ−1∑ s=0 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) ( 129 ) + 8C2G ′ pLD 2 τ , ρρmaxη 2 ( τ−2∑ s=0 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) ) + C1L 2η3 ( τ2Dτ , ρρ 2 max̄ 2 L + τ 2ρ2maxσ 2 + ( τ2 +D2τ , ρρ 2 max ) σ2 n ) + L 2 ( τ − 1 ) η2σ 2 N + L 2 ( 2 + n m ρ2max ) η2 σ2 N + 4C2LG ′ pη 2 ( D2τ , ρτρ 2 max̄ 2 L + ( 1 n + ρmax ) ρmaxτDτ , ρσ 2 ) . Notice that if the following conditions on the learning rate are satisfied η 4 ≥ η2L , η 8 ≥ C1L2η3τ ( τ + ρ2maxDτ , ρ ) α2 + 8C2G ′ pLD 2 τ , ρρmaxη 2α2 , ( 130 ) then the terms associated to the gradients will be negative and Ef ( xr+1 ) ≤Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 + C1L 2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + 2C1L 2η3 ( τ2ρ2maxDτ , ρ̄ 2 L + τ 2σ2 ( 1 n + ρ2max ) ) + Lτη2 σ2 N + ( 8C2G ′ pLD 2 τ , ρτρmax ) η2 2g + 4C2LG ′ pη 2 ( D2τ , ρτρ 2 max̄ 2 L + ( 1 n + ρmax ) ρmaxτDτ , ρσ 2 ) + L 2 ( n m ρ2max ) η2 σ2 N . In the last step we clean the condition on the learning rate η . Collecting all the conditions on η : η2 ≤ 1 24L2τ ( 4τ − 1 ) , ( 131 ) η 4 ≥ η2L , ( 132 ) η 8 ≥ C1L2η3τ ( τ + ρ2maxDτ , ρ ) α2 + 8C2G ′ pLD 2 τ , ρρmaxη 2α2 . ( 133 ) Clearly , ( 131 ) implies ( 132 ) . To ensure ( 133 ) it suffices to require η 16 ≥ C1L2η3τ ( τ + ρ2maxDτ , ρ ) α2 η 16 ≥ 8C2G′pLD2τ , ρρmaxη2α2 . ( 134 ) Recall the definition of G′p : G′p = Gp + 1 τ2 , and Gp = n−m m ( n− 1 ) . ( 135 ) It can be verified that G′p ≤ Gp + 1 τ2 ≤ 1 m + 1 ≤ 2 . ( 136 ) Using the fact that Dτ , ρ ≤ τ and ρmax ≤ 1 we can see that it suffices to require η ≤ 1 C3α2τL . ( 137 ) for some C3 > 0 large enough to satisfy both ( 131 ) and ( 133 ) . D SUPPORTING LEMMAS D.1 PROOF OF LEMMA 1 Since the global average of the local copies follows the update [ cf . ( 19 ) ] : x̄r , s+1 = x̄r , s − η 1 N N∑ i=1 gr , si , ∀s = 0 , . . . , τ − 1 . ( 138 ) Under Assumption 1 , we can apply the descent lemma at points x̄r , s+1 and x̄r , s for s = 0 , . . . , τ−2 , conditioned on Fr , s−1 : Er , s−1f ( x̄r , s+1 ) ≤ f ( x̄r , s ) +∇f ( x̄r , s ) > Er , s−1 ( x̄r , s+1 − x̄r , s ) + Er , s−1 ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) ( a ) =f ( x̄r , s ) − η∇f ( x̄r , s ) > ( 1 N N∑ i=1 ∇fi ( xr , si ) ) + Er , s−1 ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) =f ( x̄r , s ) − 1 2 η∇f ( x̄r , s ) > ( 1 N N∑ i=1 ∇fi ( xr , si ) ) − 1 2 η∇f ( x̄r , s ) > ( 1 N N∑ i=1 ∇fi ( xr , si ) ± 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ) + Er , s−1 ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) ( b ) ≤f ( x̄r , s ) − η 2 ( 1 2 ‖∇f ( x̄r , s ) ‖2 + 1 2 ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − 1 2 ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 ) − η 2 ( 1 2 ‖∇f ( x̄r , s ) ‖2 + 1 2 ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 − 1 2 ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 ) + η 2 ‖∇f ( x̄r , s ) ‖ ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥ + Er , s−1 ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) ( c ) ≤f ( x̄r , s ) − η 4 ‖∇f ( x̄r , s ) ‖2 − η 4 ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 + η 4 ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + Er , s−1 ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) , where ( a ) is due to Assumption 2 , ( b ) is due to 2ab = ‖a‖2 + ‖b‖2 − ‖a − b‖2 and ab ≤ ‖a‖‖b‖ , and ( c ) is due to ‖a‖‖b‖ ≤ 12‖a‖ 2 + 12‖b‖ 2 . Notation a ± b stands for adding and subtracting , i.e. , a± b = a+ b− b . For the pair ( x̄r , τ−1 , xr+1 ) we have according to ( 19 ) and ( 22 ) : Er , τ−2xr+1 = Er , τ−2 ( x̄r , τ ) = Er , τ−2 ( x̄r , τ−1 − η 1 N N∑ i=1 gr , τ−1i ) . Applying the descent lemma in the same way as before yields Er , τ−2f ( xr+1 ) ≤f ( x̄r , τ−1 ) +∇f ( x̄r , τ−1 ) > Er , τ−2 ( xr+1 − x̄r , τ−1 ) + L 2 Er , τ−2‖xr+1 − x̄r , τ−1‖2 ≤f ( x̄r , τ−1 ) − η 4 ‖∇f ( x̄r , τ−1 ) ‖2 − η 4 ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , τ−1i ) ∥∥∥2 − η 4 ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥2 + η 4 ∥∥∥∇f ( x̄r , τ−1 ) − 1 N N∑ i=1 ∇fi ( xr , τ−1i ) ∥∥∥2 + η 4 ∥∥∥∇f ( x̄r , τ−1 ) − 1 K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥2 + η 4 ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , τ−1i ) − 1 K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥2 + Er , τ−2 ( L 2 ‖xr+1 − x̄r , τ−1‖2 ) . Taking expectation , summing over the iterations in round r over s = 0 , . . . , τ − 1 and using the fact that xr = x̄r,0 completes the proof . D.2 PROOF OF LEMMA 2 Recall the average update of the k-th cluster and that of the global average given by ( 15 ) and ( 19 ) , respectively , for s = 0 , . . . , τ − 1 : x̄r , s+1k = x̄ r , s k − η · ḡ r , s k ( 139 ) x̄r , s+1 = x̄r , s − η · 1 N N∑ i=1 gr , si . ( 140 ) Taking the difference gives E‖x̄r , s+1 − x̄r , s+1k ‖ 2 =E ∥∥∥∥∥ ( x̄r , s − x̄r , sk ) − η ( 1 n ∑ i∈Vk ∇fi ( xr , si ) − 1 N N∑ i=1 ∇fi ( xr , si ) ) ∥∥∥∥∥ 2 + η2E ∥∥∥∥∥ 1n ∑ i∈Vk ξr , si − 1 N N∑ i=1 ξr , si ∥∥∥∥∥ 2 ≤ ( 1 + ) E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2E ∥∥∥∥∥ 1n ∑ i∈Vk ∇fi ( xr , si ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + η2E ∥∥∥∥∥ 1n ∑ i∈Vk ξr , si − 1 N N∑ i=1 ξr , si ∥∥∥∥∥ 2 , ( 141 ) where > 0 is some constant to be chosen . Averaging over k = 1 , . . . , K : 1 K K∑ k=1 E‖x̄r , s+1 − x̄r , s+1k ‖ 2 ≤ ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 1 K K∑ k=1 E ∥∥∥∥∥ 1n ∑ i∈Vk ∇fi ( xr , si ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + η2 1 K K∑ k=1 E ∥∥∥∥∥ 1n ∑ i∈Vk ξr , si − 1 N N∑ i=1 ξr , si ∥∥∥∥∥ 2 ( a ) = ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 1 K K∑ k=1 E ∥∥∥ 1 n ∑ i∈Vk ∇fi ( xr , si ) ∥∥∥2 − E∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 ) + η2 ( 1 K K∑ k=1 E ∥∥∥ 1 n ∑ i∈Vk ξr , si ∥∥∥2 − E∥∥∥ 1 N N∑ i=1 ξr , si ∥∥∥2 ) ≤ ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 1 K K∑ k=1 E ∥∥∥ 1 n ∑ i∈Vk ∇fi ( xr , si ) ∥∥∥2 ) + η2K − 1 N σ2 = ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 1 K K∑ k=1 E ∥∥∥ 1 n ∑ i∈Vk ( ∇fi ( xr , si ) ±∇f̄k ( x̄ r , s k ) ±∇f̄k ( x̄ r , s ) ) ∥∥∥2 ) + η2K − 1 N σ2 ≤ ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 3 K K∑ k=1 E ∥∥∥ 1 n ∑ i∈Vk ( ∇fi ( xr , si ) −∇f̄k ( x̄ r , s k ) ) ∥∥∥2 ) + ( 1 + −1 ) η2 3 K K∑ k=1 E ∥∥∥∇f̄k ( x̄r , sk ) −∇f̄k ( x̄r , s ) ∥∥∥2 + ( 1 + −1 ) η2 3K K∑ k=1 E‖∇f̄k ( x̄r , s ) ‖2 + η2 K − 1 N σ2 ( b ) ≤ ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 3 N K∑ K=1 L2E ∥∥∥Xr , sk , ⊥∥∥∥2 ) + ( 1 + −1 ) η2 3 K K∑ k=1 L2E ∥∥∥x̄r , sk − x̄r , s∥∥∥2 + ( 1 + −1 ) η2 3K K∑ k=1 E ∥∥∥∇f̄k ( x̄r , s ) ∥∥∥2 + η2K − 1 N σ2 = ( 1 + + 3L2η2 ( 1 + −1 ) ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 3 N K∑ K=1 L2E ∥∥∥Xr , sk , ⊥∥∥∥2 ) + ( 1 + −1 ) η2 3 K K∑ k=1 E ∥∥∥∇f̄k ( x̄r , s ) ∥∥∥2 + η2K − 1 N σ2 . ( 142 ) In ( a ) we used the fact that 1 K K∑ k=1 1 n ∑ i∈Vk ∇fi ( xr , si ) = 1 N N∑ i=1 ∇fi ( xr , si ) , 1 K K∑ k=1 1 n ∑ i∈Vk ξr , si = 1 N N∑ i=1 ξr , si . ( 143 ) and K∑ i=1 ‖xi − x̄‖2 = K∑ i=1 ‖xi‖2 −K‖x̄‖2 with x̄ = 1 K K∑ k=1 xi . ( 144 ) In ( b ) we applied the L-smoothness of fi and f̄k . Choosing = 14τ−1 and using the condition that η2 ≤ 1 24τ ( 4τ − 1 ) L2 we have 1 K K∑ k=1 E‖x̄r , s+1 − x̄r , s+1k ‖ 2 ≤ ( 1 + 1 4τ − 1 + 1 2 ( 4τ − 1 ) ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + 12τη2L2 ( 1 N K∑ K=1 E ∥∥∥Xr , sk , ⊥∥∥∥2 ) + 12τη2 1 K K∑ k=1 E ∥∥∥∇f̄k ( x̄r , s ) ∥∥∥2 + η2K − 1 N σ2 ≤Cτ 1 K K∑ k=1 E‖x̄r , s+1 − x̄r , s+1k ‖ 2 + 12τη2L2 ( 1 N K∑ K=1 E ∥∥∥Xr , sk , ⊥∥∥∥2 ) + 12τη2 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 K − 1 N σ2 . In the last inequality we applied Assumption 5 on the inter-cluster heterogeneity . D.3 PROOF OF LEMMA 3 We follow the perturbed average consensus analysis . Recall the update equation of the consensus error given in ( 17 ) : Xr , s+1k , ⊥ = ( Wk − J ) ( X r , s k , ⊥ − ηG r , s k ) . ( 145 ) Squaring both sides and conditioning : E‖Xr , s+1k , ⊥ ‖ 2 = E ( E ( ‖ ( Wk − J ) ( Xr , sk , ⊥ ± η∇Fk ( X r , s k ) − ηG r , s k ) ‖ 2|Fr , s−1 ) ) ≤ E‖ ( Wk − J ) ( Xr , sk , ⊥ − η∇Fk ( X r , s k ) ) ‖ 2 + η2ρ2knσ 2 ≤ ρ2k ( 1 + ζ−1k ) · E‖X r , s k , ⊥‖ 2 + ρ2k ( 1 + ζk ) η 2E‖∇Fk ( Xr , sk ) ‖ 2 + η2ρ2knσ 2 , where ζk > 0 is some free parameter to be properly chosen . Next , we bound the norm of the pseudo-gradient ∇Fk ( Xr , sk ) . ‖∇Fk ( Xr , sk ) ‖ 2 = ∑ i∈Vk ‖∇fi ( xr , si ) ‖ 2 = ∑ i∈Vk ‖∇fi ( xr , si ) ±∇fi ( x̄ r , s k ) ±∇f̄k ( x̄ r , s k ) ±∇f̄k ( x̄ r , s ) ‖2 ≤ ∑ i∈Vk ( 4‖∇fi ( xr , si ) −∇fi ( x̄ r , s k ) ‖ 2 + 4‖∇fi ( x̄r , sk ) −∇f̄k ( x̄ r , s k ) ‖ 2 + 4‖∇f̄k ( x̄r , sk ) −∇f̄k ( x̄ r , s ) ‖2 ) + ∑ i∈Vk 4‖∇f̄k ( x̄r , s ) ‖2 ( 146 ) ≤ ∑ i∈Vk ( 4‖∇fi ( x̄r , sk ) −∇f̄k ( x̄ r , s k ) ‖ 2 + 4L2‖xr , si − x̄ r , s k ‖ 2 + 4L2‖x̄r , sk − x̄ r , s‖2 + 4‖∇f̄k ( x̄r , s ) ‖2 ) ≤ 4L2‖Xr , sk , ⊥‖ 2 + 4L2n‖x̄r , sk − x̄ r , s‖2 + 4n‖∇f̄k ( x̄r , s ) ‖2 + 4n 2k . The last inequality is due to Assumption 4 on the intra-cluster heterogeneity . Averaging over k = 1 , . . . , K clusters : 1 N K∑ k=1 E‖Xr , s+1k , ⊥ ‖ 2 ≤ 1 N K∑ k=1 ρ2k ( 1 + ζ −1 k ) E‖X r , s k , ⊥‖ 2 + 1 N K∑ k=1 ρ2k ( 1 + ζk ) η 2E‖∇Fk ( Xr , sk ) ‖ 2 + η2 ( 1 K K∑ k=1 ρ2k ) σ2 ≤ 1 N K∑ k=1 ρ2k ( 1 + ζ −1 k ) E‖X r , s k , ⊥‖ 2 + η2 1 N K∑ k=1 ρ2k ( 1 + ζk ) · 4L2E‖X r , s k , ⊥‖ 2 + η2 1 K K∑ k=1 ρ2k ( 1 + ζk ) 4L 2E‖x̄r , sk − x̄ r , s‖2 + η2 1 K K∑ k=1 ρ2k ( 1 + ζk ) 4E‖∇f̄k ( x̄r , s ) ‖2 + η2 1 K K∑ k=1 ρ2k ( 1 + ζk ) 4 2 k + η 2ρ2maxσ 2 ( 147 ) ≤ ( max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + η 2 · 4L2 max k∈ [ K ] { ρ2k ( 1 + ζk ) } ︸ ︷︷ ︸ ρL ) 1 N K∑ k=1 E‖Xr , sk , ⊥‖ 2 + η2 max k∈ [ K ] { ρ2k ( 1 + ζk ) } · 4L2 1 K K∑ k=1 E‖x̄r , sk − x̄ r , s‖2 + η2 max k∈ [ K ] { ρ2k ( 1 + ζk ) } · 4 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 1 K K∑ k=1 ρ2k ( 1 + ζk ) 4 2 k + η 2ρ2maxσ 2 . D.4 PROOF OF LEMMA 4 To simplify the notation we omit the superscript in Br , s− ` in this section . Let Λ = diag ( λ1 , λ2 ) and the eigendecomposition of G = TΛT−1 , we can obtain the closed form expression of T as T = ( λ1 − Cτ λ2 − Cτ 12τη2L2 12τη2L2 ) and T−1 = 1 det ( T ) ( 12τη2L2 −λ2 + Cτ −12τη2L2 λ1 − Cτ ) , where det ( T ) = 12τη2L2 ( λ1 − λ2 ) . ( 148 ) Consequently det ( T ) ·G ` B = det ( T ) · TΛ ` T−1B = ( λ1 − Cτ λ2 − Cτ 12τη2L2 12τη2L2 ) ( λ ` 1 0 0 λ ` 2 ) ( 12τη2L2 −λ2 + Cτ −12τη2L2 λ1 − Cτ ) ( b1 b2 ) = ( λ1 − Cτ λ2 − Cτ 12τη2L2 12τη2L2 ) ( λ ` 1 0 0 λ ` 2 ) ( 12τη2L2b1 + ( −λ2 + Cτ ) b2 −12τη2L2b1 + ( λ1 − Cτ ) b2 ) = ( λ1 − Cτ λ2 − Cτ 12τη2L2 12τη2L2 ) ( λ ` 112τη 2L2b1 + λ ` 1 ( −λ2 + Cτ ) b2 −λ ` 212τη2L2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) = ( t1 t2 ) ( 149 ) with t1 = ( λ1 − Cτ ) ( λ ` 112τη 2L2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + ( λ2 − Cτ ) ( −λ ` 212τη2L2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) , ( 150 ) t2 = 12τη 2L2 ( λ ` 112τη 2L2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + 12τη2L2 ( −λ ` 212τη2L2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) . ( 151 ) Therefore det ( T ) ( 1 , 1 ) TΛ ` T−1B = t1 + t2 = ( λ1 − Cτ ) ( λ ` 1L 212τη2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + ( λ2 − Cτ ) ( −λ ` 2L212τη2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) + L212τη2 ( λ ` 1L 212τη2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + L212τη2 ( −λ ` 2L212τη2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) . ( 152 ) Substituting the expression of det ( T ) and dividing both sides of the equality by 12τη2 ( λ1−λ2 ) we have L2 ( 1 , 1 ) TΛ ` T−1B = 1 12τη2 ( λ1 − λ2 ) ( λ1 − Cτ ) ( λ ` 1L 212τη2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + 1 12τη2 ( λ1 − λ2 ) ( λ2 − Cτ ) ( −λ ` 2L212τη2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) + 1 ( λ1 − λ2 ) L2 ( λ ` 1L 212τη2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + 1 ( λ1 − λ2 ) L2 ( −λ ` 2L212τη2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) = 1 ( λ1 − λ2 ) ( λ1 − Cτ ) λ ` 1L2b1 + −1 ( λ1 − λ2 ) ( λ2 − Cτ ) λ ` 2L2b1 + 1 ( λ1 − λ2 ) L4λ ` 112τη 2b1 − 1 ( λ1 − λ2 ) L4λ ` 212τη 2b1 + 1 12τη2 ( λ1 − λ2 ) ( λ1 − Cτ ) λ ` 1 ( −λ2 + Cτ ) b2 + 1 12τη2 ( λ1 − λ2 ) ( λ2 − Cτ ) λ ` 2 ( λ1 − Cτ ) b2 + 1 ( λ1 − λ2 ) L2λ ` 1 ( −λ2 + Cτ ) b2 + 1 ( λ1 − λ2 ) L2λ ` 2 ( λ1 − Cτ ) b2 = 1 ( λ1 − λ2 ) ( −λ ` 2 ( λ2 − Cτ ) − λ ` 1 ( Cτ − λ1 ) ) L2b1 + 1 ( λ1 − λ2 ) 12τη2 ( λ ` 1 − λ ` 2 ) L4b1 + 1 12τη2 ( λ1 − λ2 ) ( λ1 − Cτ ) λ ` 1 ( −λ2 + Cτ ) b2 + 1 12τη2 ( λ1 − λ2 ) ( λ2 − Cτ ) λ ` 2 ( λ1 − Cτ ) b2 + 1 ( λ1 − λ2 ) L2λ ` 1 ( −λ2 + Cτ ) b2 + 1 ( λ1 − λ2 ) L2λ ` 2 ( λ1 − Cτ ) b2 ≤λ ` 2L2b1 + λ ` 2 − λ ` 1 λ2 − λ1 · 12τη2L4b1 + λ ` 2 − λ ` 1 λ2 − λ1 ( λ2 − Cτ ) ( Cτ − λ1 ) 1 12τη2 b2 + λ ` 2L 2b2 , ( 153 ) where in the last inequality we used the fact that λ1 ≤ Cτ ≤ λ2 . Note that ( λ2 − Cτ ) ( Cτ − λ1 ) =− C2τ − λ1λ2 + ( λ1 + λ2 ) Cτ =− C2τ − det ( G ) + Tr ( G ) Cτ =− C2τ − ( Cτ ( max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + η 2ρL · 4L2 ) − 48ρLτη4L4 ) + Cτ ( max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + η 2ρL · 4L2 + Cτ ) = 48ρLτη 4L4 . ( 154 ) Therefore , we further obtain L2 ( 1 , 1 ) TΛ ` T−1B ≤λ ` 2L2 ( b1 + b2 ) + λ ` 2 − λ ` 1 λ2 − λ1 η2 · ( 12τL4b1 + 4ρLL 4b2 ) ( 155 ) Dividing both sides by L2 completes the proof . E NETWORK CONNECTIVITY CONDITIONS IN THEOREMS AND COROLLARY Both Theorem 2 and Corollary 1 impose some sufficient conditions on the network connectivity ρmax for convergence . This can be satisfied in practice as follows . For Theorem 2 , as long as ρmax < 1 , we can choose τ large enough so that ( 7 ) is fulfilled . Corollary 1 strengthens the result of Theorem 2 by requiring no loss in the order of convergence rate compared to full device participation . This naturally leads to a more stringent condition on ρmax given by ( 11 ) . For any given D2D network topology , this can be satisfied by running multiple D2D gossip averaging steps per SGD update in Algorithm 1 . Since the right hand side of ( 11 ) depends only on the algorithmic parameters , we can choose the suitable gossip averaging steps to fulfill this condition before launching the algorithm . F MORE EXPERIMENTS DETAILS In this section , we provide additional experimental results on CIFAR-10 dataset . We follow the same CNN model and non-iid data partition strategy as before and run each experiments for 3 times with different random seeds to report the mean values of best test accuracy . Instead of using a constant learning rate , we decay the local learning rate η by half after finishing 50 % and 75 % of the communication rounds and tune the initial learning rate from { 0.01 , 0.02 , 0.05 , 0.08 , 0.1 } for each algorithm . First , we evaluate the convergence processes of HL-SGD and local SGD under varying D2D network topologies in Figure 4 . We generate random network topologies by Erdős-Rényi model with edge probability from { 0.2 , 0 , 5 , 0.8 , 1 } and use Metropolis-Hastings weights to setWk , corresponding to spectral norm ρmax = { 0.9394 , 0.844 , 0.5357 , 0 } . As observed in Figure 4a , a more connected D2D network topology ( i.e. , a smaller value of ρmax ) generally accelerates the convergence and leads to a higher model accuracy achieved over 100 communication rounds in HL-SGD . However , in terms of runtime , a more connected D2D network topology corresponds to a larger D2D communication delay cd2d per round , and hence the total runtime is larger as well , which can be clearly observed in Figure 4b . Therefore , to achieve a target level of model accuracy within the shortest time in HLSGD , a sparse D2D network topology could work better than the fully connected one in practice . Second , to give a more comprehensive analysis on the runtime benefits of HL-SGD , we vary τ from { 5 , 10 , 20 , 50 } and compare the performances of HL-SGD and local SGD in Figure 5 . From the figure , we can observe that HL-SGD can consistently outperform local SGD across a wide range of τ . In particular , on CIFAR-10 , the best accuracy of HL-SGD achieved over 100 rounds is 2.49 % , 3.99 % , 4.05 % , and 7 % higher than that of local SGD , respectively , as τ increases from 5 to 50 . At the same time , the runtime of HL-SGD needed to achieve a target test-set accuracy of 60 % is 9.66 % , 19.76 % , 33.46 % , and 45.88 % less than that of local SGD , respectively . Third , we consider an extension of HL-SGD by allowing each device to perform multiple SGD updates before the gossip averaging step in Algorithm 1 and empirically evaluate its performance . Specifically , each device performs l = { 1 , 5 , 10 } steps of SGD update before aggregating models with their neighbors in the same cluster . Note that l = 1 corresponds to the original version of HLSGD in Algorithm 1 . As observed in Figure 6a , when communicating and aggregating models with neighbors more frequently , HL-SGD with l = 1 has the best convergence speed and will converge to the highest level of test accuracy . In terms of runtime , choosing a value of l > 1 might be favorable in some cases due to the reduced D2D communication delay per round . For instance , to achieve a target level of 60 % test accuracy , HL-SGD with l = 5 needs 5.22 % less amount of time than l = 1 . It is an interesting direction to rigorously analyze the convergence properties of HL- SGD with arbitrary l and find the best hyperparameter tuning method for minimizing the runtime to achieve a target level of model accuracy in the future . | The paper proposes a new method to address the heterogeneous communication setting in a hierarchical distributed system. The system consists of a central server and several disjoint clusters, and each cluster is a local network connection between multiple edge devices. The communications are heterogeneous in the sense that in cluster device to device (D2D) communication are much faster than the device to server (D2S) communication. The proposes algorithm is a hybrid method where decentralized method is applied within clusters (on edge devices) and federated average is applied between cluster and server. Convergence analysis is provided showing the benefit of variance reduction using decentralization within cluster. Empirical studies are conducted to demonstrate the improvement under synthetic federated learning environment. | SP:742ea30fbadad7899104c22b3da891f5f6d3df4b |
Hybrid Local SGD for Federated Learning with Heterogeneous Communications | 1 INTRODUCTION Federated learning ( FL ) is a distributed machine learning paradigm in which multiple edge devices or clients cooperate to learn a machine learning model under the orchestration of a central server , and enables a wide range of applications such as autonomous driving , extended reality , and smart manufacturing ( Kairouz et al. , 2019 ) . Communication is a critical bottleneck in FL as the clients are typically connected to the central server over bandwidth-limited networks . Standard optimization methods such as distributed SGD are often not suitable in FL and can cause high communication costs due to the frequent exchange of large-size model parameters or gradients . To tackle this issue , local SGD , in which clients update their models by running multiple SGD iterations on their local datasets before communicating with the server , has emerged as the de facto optimization method in FL and can largely reduce the number of communication rounds required to train a model ( McMahan et al. , 2017 ; Stich , 2019 ) . However , the communication benefit of local SGD is highly sensitive to non-iid data distribution as observed in prior work ( Rothchild et al. , 2020 ; Karimireddy et al. , 2020 ) . Intuitively , taking many local iterations of SGD on local dataset that is not representative of the overall data distribution will lead to local over-fitting , which will hinder convergence . In particular , it is shown in ( Zhao et al. , 2018 ) that the convergence of local SGD on non-iid data could slow down as much as proportionally to the number of local iteration steps taken . Therefore , local SGD with a large aggregation period can converge very slow on non-iid data distribution , and this may nullify its communication benefit ( Rothchild et al. , 2020 ) . Local SGD assumes a star network topology where each device connects to the central server for model aggregation . In modern communication networks , rather than only communicating with the server over slow communication links , devices are increasingly connected to others over fast communication links . For instance , in 5G-and-beyond mobile networks , mobile devices can directly communicate with their nearby devices via device-to-device links of high data rate ( Asadi et al. , 2014 ) . Also , edge devices within the same local-area network ( LAN ) domain can communicate with each other rapidly without traversing through slow wide-area network ( WAN ) ( Yuan et al. , 2020 ) . This gives the potential to accelerate the FL convergence under non-iid data distribution by leveraging fast D2D cooperation so that the total training time can be reduced in FL over bandwidthlimited networks . Motivated by the above observation , this paper proposes hybrid local SGD ( HL-SGD ) , a new distributed learning algorithm for FL with heterogeneous communications , to speed up the learning process and reduce the training time . HL-SGD extends local SGD with fast gossip-style D2D communication after local iterations to mitigate the local over-fitting issue under non-iid data distribution and accelerate convergence . A hybrid model aggregation scheme is designed in HL-SGD to integrate both fast device-to-device ( D2D ) and slow device-to-server ( D2S ) cooperations . We analyze the convergence of HL-SGD in the presence of heterogeneous data for general nonconvex settings , and characterize the relationship between the optimality error bound and algorithm parameters . Our algorithm and analysis are general enough and subsume previously proposed SGD variations such as distributed SGD , local SGD and gossip SGD . Specifically , we consider the FL setting in which all devices are partitioned into disjoint clusters , each of which includes a group of connected devices capable of communicating with each other using fast D2D links . The clustering can be a natural result of devices belonging to different LAN domains so that those devices connected to the same LAN domain are considered as one cluster . In another example , clustering is based on the geographic locations of mobile devices so that devices in a cluster are connected to each other through D2D communication links . In summary , the paper makes the following main contributions : • We propose a novel distributed learning algorithm for FL called HL-SGD to address the communication challenge of FL over bandwidth-limited networks by leveraging the availability of fast D2D links to accelerate convergence under non-iid data distribution and reduce training time . • We provide the convergence analysis of HL-SGD under general assumptions about the loss function , data distribution , and network topology , generalizing previous results on distributed SGD , local SGD , and gossip SGD . • We conduct extensive empirical experiments on two common benchmarks under realistic network settings to validate the established theoretical results of HL-SGD . Our experimental results show that HL-SGD can largely accelerate the learning process and speed up the runtime . 2 BACKGROUND AND RELATED WORK Large-scale machine learning based on distributed SGD has been well studied in the past decade , but often suffers from large network delays and bandwidth limits ( Bottou et al. , 2018 ) . Considering that communication is a major bottleneck in federated settings , local SGD has been proposed recently to reduce the communication frequency by running SGD independently in parallel on different devices and averaging the sequences only once in a while ( Stich , 2019 ; Lin et al. , 2019 ; Haddadpour et al. , 2019 ; Yu et al. , 2018 ; Wang et al. , 2021 ) . However , they all assume the client-server architecture and do not leverage the fast D2D communication capability in modern communication networks . Some studies ( Liu et al. , 2020 ; Abad et al. , 2020 ; Castiglia et al. , 2020 ) develop hierarchical FL algorithms that first aggregate client models at local edge servers before aggregating them at the cloud server or with neighboring edge servers , but they still rely on D2S communication links only and suffer from the scalability and fault-tolerance issues of centralized setting . On the other hand , while existing works on decentralized or gossip SGD consider D2D communications ( Tsitsiklis , 1984 ; Boyd et al. , 2006 ) , they assume a connected cluster with homogeneous communication links and will converge very slow on the large and sparse network topology that is typically found in FL settings . Unlike previous works , HL-SGD leverages both D2S and D2D communications in the system . Some recent studies aim to encapsulate variants of SGD under a unified framework . Specifically , a cooperative SGD framework is introduced in ( Wang & Joshi , 2018 ) that includes communication reduction through local SGD steps and decentralized mixing between clients under iid data distribution . A general framework for topology-changing gossip SGD under both iid and non-iid data distributions is proposed in ( Koloskova et al. , 2020 ) . Note that all of the above works assume undirected network topology for communications in every iteration . In comparison , our proposed HL-SGD is different : the D2S communication is asymmetric due to the use of device sampling and model broadcasting in each global aggregation round and can not be modeled in an undirected graph . Therefore , the convergence analysis of HL-SGD does not fit into the prior frameworks and is much more challenging . Moreover , our major focus is on the runtime of the algorithm rather than its convergence speed in iterations . 3 SYSTEM MODEL In this section , we introduce the FL system model , problem formulation , and assumptions we made . Notation . All vectors in this paper are column vectors by default . For convenience , we use 1 to denote the all-ones vector of appropriate dimension , 0 to denote the all-zeros vector of appropriate dimension , and [ n ] to denote the set of integers { 1 , 2 , . . . , n } with any positive integer n. Let ‖·‖ denote the ` 2 vector norm and Frobenius matrix norm and ‖·‖2 denote the spectral norm of a matrix . We consider a FL system consisting of a central server and K disjoint clusters of edge devices . Devices in each cluster k ∈ [ K ] can communicate with others across an undirected and connected graph Gk = ( V , Ek ) , where Vk denotes the set of edge devices in the cluster , and edge ( i , j ) ∈ Ek denotes that the pair of devices i , j ∈ Vk can communicate directly using D2D as determined by the communication range of D2D links . Besides , each device can directly communicate with the central server using D2S links . Denote the set of all devices in the system as V : = ⋃ k∈ [ K ] Vk , the number of devices in each cluster k ∈ [ K ] as n : = |Vk| , and the total number of devices in the system as N : = ∑ k∈ [ K ] n 1 . The FL goal of the system is to solve an optimization problem of the form : min x∈Rd f ( x ) : = 1 N ∑ i∈V fi ( x ) : = 1 K ∑ k∈ [ K ] f̄k ( x ) , ( 1 ) where fi ( x ) : = Ez∼Di [ ` i ( x ; z ) ] is the local objective function of device i , f̄k ( x ) : = ( 1/n ) ∑ i∈Vk fi ( x ) is the local objective function of cluster k , and Di is the data distribution of device i . Here ` i is the ( non-convex ) loss function defined by the learning model and z represents a data sample from data distribution Di . When applying local SGD to ( 1 ) in FL with heterogeneous communications , the communications between the server and devices in FL are all through D2S links that are bandwidth-limited , particularly for the uplink transmissions . Therefore , the incurred communication delay is high . Due to the existing of high-bandwidth D2D links that are much more efficient than low-bandwidth D2S links , it would be highly beneficial if we can leverage D2D links to reduce the usage of D2S links such that the total training time can be reduced . This motivates us to design a new learning algorithm for FL with heterogeneous communications . 4 HYBRID LOCAL SGD In this section , we present our HL-SGD algorithm suitable for the FL setting with heterogeneous communications . Algorithm 1 provides pseudo-code for our algorithm . At the beginning of r-th global communication round , the server broadcasts the current global model xr to all devices in the system via cellular links ( Line 4 ) . Note that in typical FL systems , the downlink communication is much more efficient than uplink communication due to the larger bandwidth allocation and higher data rate . Therefore , devices only consume a smaller amount of energy when receiving data from the server compared with transmitting data to the server . After that , devices in each cluster initialize their local models to be the received global model and run τ iterations of gossip-based SGD via D2D links to update their local models in parallel ( lines 5– 9 ) . Let xr , si denote the local model of device i at the r-th local iteration of s-th round . Here 1For presentation simplicity , we assume each cluster contains the same number of devices here . The results of this paper can be extended to the case of clusters with different device numbers as well . Algorithm 1 HL-SGD : Hybrid Local SGD Input : initial global model x0 , learning rate η , communication graph Gk and mixing matrix Wk for all clusters k ∈ [ K ] , and fraction of sampled devices in each cluster p. Output : final global model xR 1 : for each round r = 0 , . . . , R− 1 do 2 : for each cluster k ∈ [ K ] in parallel do 3 : for each device i ∈ Vk in parallel do 4 : xr,0i = x r 5 : for s = 0 , . . . , τ − 1 do 6 : Compute a stochastic gradient gi over a mini-batch ξi sampled from Di 7 : x r , s+ 12 i = x r , s i − ηgi ( x r , s i ) . local update 8 : xr , s+1i = ∑ j∈Nki ( Wk ) i , jx r , s+ 12 j . gossip averaging 9 : end for 10 : end for 11 : end for 12 : for each cluster k ∈ [ K ] do 13 : m← max ( p · n , 1 ) 14 : Srk ← ( random set of m clients in Vk ) . device sampling 15 : end for 16 : xr+1 = 1K ∑ k∈ [ K ] 1 m ∑ i∈Srk xr , τi . global aggregation 17 : end for 18 : return xR each gossip-based SGD iteration consists of two steps : ( i ) SGD update , performed locally on each device ( lines 6–7 ) , followed by a ( ii ) gossip averaging , where devices average their models with their neighbors ( line 8 ) . In the gossip averaging protocol , N ki denotes the neighbors of device i , including itself , on the D2D communication graph Gk of cluster k , and Wk ∈ [ 0 , 1 ] n×n denotes the mixing matrix of cluster k with each element ( Wk ) i , j being the weight assigned by device i to device j . Note that ( Wk ) i , j > 0 only if devices i and j are directly connected via D2D links . Next , a set Srk of m devices are sampled uniformly at random ( u.a.r . ) with probability p without replacement from each cluster k ∈ [ K ] by the server ( lines 13–14 ) , and their final updated local models { xr , τi , ∀i ∈ Srk } are sent to the server via D2S links . After that , the server updates the global model xr+1 by averaging the received local models from all sampled devices ( line 16 ) . Note that only m devices per cluster will upload their models to the server in each round to save the usage of expensive D2S uplink transmissions . The intuition is that after multiple iterations of gossip-based SGD , devices have already reached approximate consensus within each cluster , and the sampled average can well represent the true average . By trading D2D local aggregation for D2S global aggregation , the total communication cost can be reduced . We will empirically validate such benefits later in the experiments . It is worth noting that HL-SGD inherits the privacy benefits of classic FL schemes by keeping the raw data on device and sharing only model parameters . Moreover , HL-SGD is compatible with existing privacy-preserving techniques in FL such as secure aggregation ( Bonawitz et al. , 2017 ) , differential privacy ( McMahan et al. , 2018 ) , and shuffling ( Girgis et al. , 2021 ) since only the sum rather than individual values is needed for the local and global model aggregation steps . 4.1 RUNTIME ANALYSIS OF HL-SGD We now present a runtime analysis of HL-SGD . Here we ignore the communication time of downloading models from the server by each device since the download bandwidth is often much larger than upload bandwidth for the D2S communication in practice ( Kairouz et al. , 2019 ) . In each round of HL-SGD , we denote the average time taken by a device to compute a local update , perform one round of D2D communication and one round of D2S communication as ccp , cd2d and cd2s , respectively . Assume the uplink bandwidth between the server and devices is fixed and evenly shared among the sampled devices in each round , then cd2s is linearly proportional to the sampling ratio p. Similarly , ccp depends on the D2D network topology Gk and typically increases with the maximum node degree ∆ ( Gk ) . The total runtime of HL-SGD after R communication rounds is R× [ τ × ( ccp + cd2d ) + cd2s ] . ( 2 ) The specific values of ccp , cd2d and cd2s depend on the system configurations and applications . In comparison , the total runtime of local SGD after R communication rounds is R× [ τ × ccp + cd2s ] . 4.2 PREVIOUS ALGORITHMS AS SPECIAL CASES When devices do not communicate with each other , i.e. , Wk = I , ∀k ∈ [ K ] , and sampling ratio p = 1 , HL-SGD reduces to distributed SGD ( when τ = 1 ) or local SGD ( when τ > 1 ) where each device only directly communicates with the server with D2S links . Also , when τ → ∞ , HLSGD reduces to gossip SGD where devices only cooperate with their neighboring devices through a gossip-based communication protocol with D2D links to update their models without relying on the server . Therefore , HL-SGD subsumes existing algorithms and enables us to strike the best balance between runtime and model accuracy by tuning τ , Wk , and p. However , due to the generality of HL-SGD , there exist significantly new challenges in its convergence analysis , which constitutes one of the main contributions of this paper as elaborated in the following section . 5 CONVERGENCE ANALYSIS OF HL-SGD In this section , we analyze the convergence of HL-SGD with respect to the gradient norm of the objective function f ( · ) , specifically highlighting the effects of τ and p. Before stating our results , we make the following assumptions : Assumption 1 ( Smoothness ) . Each local objective function fi : Rd → R is L-smooth for all i ∈ V , i.e. , for all x , y ∈ Rd , ‖∇fi ( x ) −∇fi ( y ) ‖ ≤ L‖x− y‖ , ∀i ∈ V. Assumption 2 ( Unbiased Gradient and Bounded Variance ) . The local mini-batch stochastic gradient in Algorithm 1 is unbiased , i.e. , Eξi [ gi ( x ) ] = ∇fi ( x ) , and has bounded variance , i.e. , Eξi‖gi ( x ) − ∇fi ( x ) ‖2 ≤ σ2 , ∀x ∈ Rd , i ∈ V , where the expectation is over all the local minibatches . Assumption 3 ( Mixing Matrix ) . For any cluster k ∈ [ K ] , the D2D network is strongly connected and the mixing matrix Wk ∈ [ 0 , 1 ] n×n satisfies Wk1 = 1 , 1 > Wk = 1 > , null ( I −Wk ) = span ( 1 ) . We also assume ||Wk − ( 1/n ) 11 > ||2 ≤ ρk for some ρk ∈ [ 0 , 1 ) . Assumption 4 ( Bounded Intra-Cluster Dissimilarity ) . There exists a constant k ≥ 0 such that ( 1/n ) ∑ i∈Vk ‖∇fi ( x ) − ∇f̄k ( x ) ‖ 2 ≤ 2k for any x ∈ Rd and k ∈ [ K ] . If local functions are identical to each other within a cluster , then we have k = 0 . Assumption 5 ( Bounded Inter-Cluster Dissimilarity ) . There exist constants α ≥ 1 , ≥ 0 such that ( 1/K ) ∑ k∈ [ K ] ‖∇f̄k ( x ) ‖2 ≤ α2 ‖∇f ( x ) ‖ 2 + 2g for any x ∈ Rd . If local functions are identical to each other across all clusters , then we have α = 1 , g = 0 . Assumptions 1–3 are standard in the analysis of SGD and decentralized optimization ( Bottou et al. , 2018 ; Koloskova et al. , 2019 ) . Assumptions 4–5 are commonly used in the federated optimization literature to capture the dissimilarities of local objectives ( Koloskova et al. , 2020 ; Wang et al. , 2020 ) . 5.1 MAIN RESULTS We now provide the main theoretical results of the paper in Theorem 1 and Theorem 2 . The detailed proofs are provided in the appendices . Define the following constants : ρmax = max k∈ [ K ] ρk , Dτ , ρ = min { 1 1− ρmax , τ } , ̄2L = 1 K K∑ k=1 2k ( 3 ) and let r0 = 8 ( f ( x 0 ) − f ( x ? ) ) , r1 = 16L ( σ2 N ) , r2 = 16C1L 2τ2 2g + 16C1L 2 ( τρ2maxDτ , ρ̄ 2 L + τσ 2 ( 1 n + ρ2max ) ) . ( 4 ) Theorem 1 ( Full device participation ) . Let Assumptions 1–5 hold , and let L , σ , ̄L , g , Dτ , ρ , ρmax , r0 , r1 , and r2 be as defined therein . If the learning rate η satisfies η = min { 1 4C1α · 1 τL , ( r0 r1τR ) 1 2 , ( r0 r2τR ) 1 3 } , ( 5 ) then for any R > 0 , the iterates of Algorithm 1 with full device participation for HL-SGD satisfy min r∈ [ R ] min s=0 , ... , τ−1 E‖∇f ( x̄r , s ) ‖2 =O σ√ NτR + ( τ2 2g + τρ 2 maxDτ , ρ̄ 2 L + τ ( 1 n + ρ2max ) σ2 ) 1 3 ( τR ) 2 3 + 1 R , ( 6 ) where x̄r , s = 1N ∑N i=1 x r , s i . In the following , we analyze the iteration complexity of HL-SGD and compare it with those of some classic and state-of-the-art algorithms relevant to our setting in Table 1 . First , we consider two extreme cases of HL-SGD where ρmax = 0 and ρk = 1 , ∀k ∈ [ K ] , and show that our analysis recovers the best known rate of local SGD . Fully Connected D2D networks . In this case , ρmax = 0 , and each cluster can be viewed as a single device , and thus HL-SGD reduces to local SGD with K devices . Substuting ρmax = 0 into ( 6 ) , the iteration complexity of HL-SGD reduces to O ( σ/ √ NτR+ ( τ2 2g + τ · ( σ2/n ) ) 1/3 / ( τR ) 2/3 + 1/R ) . This coincides with the complexity of local SGD provided in Table 1 with device number K and stochastic gradient variance σ2/n thanks to the fully intra-cluster averaging . Disconnected D2D networks . In this case , HL-SGD reduces to local SGD with N devices . Substituting ρmax = 1 into ( 6 ) , the iteration complexity of HL-SGD becomes O ( σ/ √ NτR + ( τ2 ( 2g + ̄ 2 L ) + τσ 2 ) 1/3 / ( τR ) 2/3 + 1/R ) . This coincides with the complexity of local SGD with N devices , stochastic gradient variance σ2 , and gradient heterogeneity of order 2g + ̄ 2 L. Table 1 : Comparison of Iteration Complexity . 2 Local SGD O ( σ√ NτR + ( τ2 2+τσ2 ) 1 3 ( τR ) 2 3 + ττR ) Gossip SGD O ( σ√ NτR + ρ 2 3 2 3 ( τR ) 2 3 ( 1−ρ ) 2 3 + ρ 2 3 σ 2 3 ( τR ) 2 3 ( 1−ρ ) 1 3 + ρ ( 1−ρ ) τR ) Gossip PGA ( Chen et al. , 2021a ) O ( σ√ NτR + C 1 3 τ , ρD 1 3 τ , ρ′ρ 2 3 2 3 ( τR ) 2 3 + C 1 3 τ , ρρ 2 3 σ 2 3 ( τR ) 2 3 + ρDτ , ρ′ τR ) HL-SGD ( this work ) O ( σ√ NτR + ( τ2 2g+τρ 2 maxDτ , ρ̄ 2 L ) 1 3 ( τR ) 2 3 + ( τ ( 1n+ρ 2 max ) σ 2 ) 1 3 ( τR ) 2 3 + ττR ) Next , we compare the complexities of HL-SGD , local SGD , gossip SGD and gossip PGA . Comparison to Local SGD . Comparing ( 6 ) and the complexity of local SGD , we can see the intracluster D2D communication provably improves the iteration complexity by reducing the transient iterations . This is reflected in the smaller coefficient associated with the O ( ( τR ) −2/3 ) term . In particular , improving D2D communication connectivity will lead to a smaller ρmax and consequently , mitigate the impact of both local data heterogeneity and stochastic noise on the convergence rate . Comparison to Gossip SGD . Under the condition that ρ = ρmax , i.e. , the connectivity of D2D network in gossip SGD is the same as that of HL-SGD , Table 1 shows HL-SGD outperforms gossip SGD when τ/n ≤ ρ2/ ( 1−ρ ) . In other words , HL-SGD is beneficial for weakly connected networks , which is the case in FL settings where a large number of devices are often loosely connected or disconnected into several disjoint clusters via D2D communications only . 1The convergence rates for gossip SGD and local SGD are from ( Koloskova et al . ( 2020 ) ) . The parameters in the table are given by the following : σ2 : stochastic gradient variance ; ρ : network connectivity ; 2 : data heterogeneity of order 2g + ̄2L ; Cτ , ρ , ∑τ−1 k=0 ρ k , Dτ , ρ′ = min { 1/ ( 1− ρ ) , τ } . Note that Dτ , ρ 6= Dτ , ρ′ . Comparison to Gossip PGA . Gossip PGA improves local SGD by integrating gossiping among all devices in one round using a connected network . Compared to gossip SGD , gossip PGA has one extra full averaging step with period τ . The complexity of gossip PGA improves both by reducing the transient iterations . HL-SGD ( full participation ) differs from gossip PGA in the sense that gossiping is performed within multiple clusters instead of a single one . The benefit comes from the fact that for many commonly used D2D network topologies , the spectral gap 1− ρ decreases as the network size decreases , see Table 2 . Therefore , when employing the same D2D network topology , HL-SGD enjoys a smaller connectivity number ρmax than ρ . Considering the scenario where τ and n are fixed while the cluster number K grows , the total device number N = nK grows and hence ρ → 1 for gossip PGA . In the case when τ = Dτ , ρ′ ≈ Cτ , ρ , the fastest decaying O ( 1/τR ) terms are comparable for both algorithms . However , the O ( ( τR ) −2/3 ) term of gossip GPA can be larger than that of HL-SGD since ρ increases with N . This observation shows for large-scale networks , it is advantageous to use HL-SGD with multiple connected clusters instead of gossip GPA with a single cluster under the D2D network topology . Our next result shows the iteration complexity of HL-SGD with partial device participation . We assume the devices participate in synchronizing their models at the end of each FL round following the sampling rule given by Assumption 6 . Assumption 6 ( Sampling strategy ) . Each Srk contains a subset ofm indices uniformly sampled from { 1 , . . . , n } without replacement . Furthermore , Srk is independent of Sr ′ k′ for all ( k , r ) 6= ( k′ , r′ ) . Theorem 2 ( Partial device participation ) . Let Assumptions 1–6 hold , and let L , σ , ̄L , g , Dτ , ρ , ρmax , r0 , r1 , and r2 be as defined therein . If the network connectivity satisfies ρmax ≤ 1− 1/τ , ( 7 ) then for suitably chosen learning rate η , the iterates of Algorithm 1 with partial device participation for HL-SGD satisfy min r∈ [ R ] min s=0 , ... , τ−1 E‖∇f ( x̄r , s ) ‖2 =O σ + E ( g , ̄L , σ , ρmax ) √ NτR + ( τ2 2g + τρ 2 maxDτ , ρ̄ 2 L + τ ( 1 n + ρ2max ) σ2 ) 1 3 ( τR ) 2 3 + 1 R , ( 8 ) where x̄r , s = 1N ∑N i=1 x r , s i , E2 ( g , ̄L , σ , ρmax ) = ( 2gDτ , ρ + ρmaxDτ , ρ̄2L + σ2 ) ·G′pDτ , ρρmaxN + n m · 1 τ ρ2maxσ 2 . ( 9 ) and G′p = n−m m ( n− 1 ) + 1 τ2 . ( 10 ) Compared to Theorem 1 , Theorem 2 shows partial device participation deteriorates the rate by O ( E ( g , ̄L , σ , ρmax ) / √ NτR ) . From the expression of E , we observe that as ρmax → 0 , E ( g , ̄L , σ , ρmax ) vanishes , which indicates that the loss caused by device sampling can be compensated by increasing network connectivity uniformly for all clusters . The next corollary finds the critial ρmax so that E2 = O ( 1 ) , and the order of convergence rate of partial device participation matches that of the full participation case . Corollary 1 . Under the same assumptions as Theorem 2 , if the network connectivity satisfies ρmax ≤ 1 4N min { m , τ − 1 } , ( 11 ) then min r∈ [ R ] min s=0 , ... , τ−1 E‖∇f ( x̄r , s ) ‖2 =O σ + g + ̄L√ NτR + ( τ2 2g + τρ 2 maxDτ , ρ̄ 2 L + τ ( 1 n + ρ2max ) σ2 ) 1 3 ( τR ) 2 3 + 1 R . ( 12 ) Corollary 1 reveals the tradeoff between sampling intensity and network connectivity . More connected D2D networks result in smaller ρmax , and thus ( 11 ) can be satisfied by a smaller m. This means we can sample fewer devices at the end of each round and reduce the D2S communication delay when the D2D network is more connected . 6 EXPERIMENTAL EVALUATION 6.1 EXPERIMENTAL SETTINGS We use two common datasets in FL literature ( McMahan et al. , 2017 ; Reddi et al. , 2020 ; Wang et al. , 2020 ) : Federated Extended MNIST ( Caldas et al. , 2018 ) ( FEMNIST ) and CIFAR-10 ( Krizhevsky et al. , 2009 ) . The 62-class FEMNIST is built by partitioning the data in Extended MNIST ( Cohen et al. , 2017 ) based on the writer of the digit/character and has a naturally-arising device partitioning . CIFAR-10 is partitioned across all devices using a Dirichlet distribution Dir ( 0.1 ) as done in ( Hsu et al. , 2019 ; Yurochkin et al. , 2019 ; Reddi et al. , 2020 ; Wang et al. , 2020 ) . We evaluate our algorithms by training CNNs on both datasets , and the CNN models for FEMNIST and CIFAR-10 were taken from ( Caldas et al. , 2018 ) and ( McMahan et al. , 2017 ) with around 6.5 and 1 million parameters , respectively . For each dataset , the original testing set ( without partitioning ) is used to evaluate the generalization performances of the trained global model . We consider a FL system consisting of a central server and 32 devices . The devices are evenly divided into four clusters , and each cluster has a ring topology by default , which provides a conservative estimation for the cluster connectivity and convergence speed . In our experiments , the mixing matrix of each cluster Wk is set according to the Metropolis-Hastings weights ( Nedić et al. , 2018 ) . According to the real-world measurements in ( Yuan et al. , 2020 ; Yang et al. , 2021 ) , we set the average time for a device to perform a local update , a round of D2D communication under ring topology , and a round of D2S communication with one device sampled per cluster to be ccp = 0.01h , cd2d ( ∆ = 2 ) = 0.005h and cd2s ( p = 1/8 ) = 0.05h , respectively , in the runtime model ( 2 ) . For arbitrary device sampling ratio and D2D network topology , we consider a linear-scaling rule ( Wang et al. , 2019 ) and let cd2d ( ∆ ) = ( ∆/2 ) × 0.005h and cd2s ( p ) = 8p× 0.05h . We compare HL-SGD with local SGD in the experiments . For local SGD , devices will only communicate with the central server periodically . In all experiments , we let the local iteration period τ to be the same for both local SGD and HL-SGD to have a fair comparison . On the FEMNIST dataset , we fix the batch size as 30 and tune the learning rate η from { 0.005 , 0.01 , 0.02 , 0.05 , 0.08 } for each algorithm separately . On the CIFAR-10 dataset , we fix the batch size as 50 and tune η from { 0.01 , 0.02 , 0.05 , 0.08 , 0.1 } for each algorithm separately . We run each experiment with 3 random seeds and report the average . All experiments in this paper are conducted on a Linux server with 4 NVIDIA RTX 8000 GPUs . The algorithms are implemented by PyTorch . More details are provided in Appendix F. 6.2 EXPERIMENTAL RESULTS We first compare the convergence speed and runtime of HL-SGD and local SGD while fixing τ = 50 and p = 1 . We measure the test accuracy of the global model on the server in every FL round . Figure 1 shows the convergence process . From the figure , we can observe that HL-SGD can largely accelerate the model convergence while improving model accuracy in FL . On FEMNIST , the best accuracy of HL-SGD achieved over 100 rounds is 4.78 % higher than that of local SGD ( i.e. , 83.76 % vs. 79.94 % ) , and its runtime necessary to achieve a target test-set accuracy of 75 % is only 17.64 % of that of the baseline ( i.e. , 5.67× speedup ) . On CIFAR-10 , the best accuracy of HL-SGD achieved over 100 rounds is 9.32 % higher than that of local SGD ( i.e. , 70.13 % vs. 64.15 % ) , and its runtime necessary to achieve a target test-set accuracy of 60 % is 18.36 % less than that of local SGD ( i.e. , 1.225× speedup ) . Next , we investigate the effect of D2D network speed on the runtime benefit of HL-SGD . We consider the same FL setting as before and choose cd2d from { 0.003 , 0.005 , 0.02 } h. As illustrated in Figure 2 , the training speed of HL-SGD can be further improved by using faster D2D links . For instance , it takes HL-SGD 4.2 hours to reach 75 % test accuracy on FEMNIST with cd2d = 0.003h , which is 1.5× faster than HL-SGD with cd2d = 0.01h . On CIFAR-10 , to reach a target level of 60 % test accuracy , HL-SGD with cd2d = 0.003h needs 21 hours , which is 1.14× faster than HL-SGD with cd2d = 0.005 . Note that the runtime can not proportionally decrease with the increase of D2D network speed because local update also takes substantial computation time . Also , when cd2d is relatively large compared with cd2s , the convergence acceleration benefit of gossip averaging could be offset by the increased communication time in each round of HL-SGD , leading to an inferior total runtime as shown in Figure 2b . Finally , we investigate how the sampling ratio p affects the performance of HL-SGD . We select p from { 0.125 , 0.25 , 0.5 , 1 } , corresponding to sampling { 1 , 2 , 4 , 8 } devices from each cluster to upload models to the server . Figure 3 depicts the best value of test-set accuracy achieved over all prior rounds . As can be observed from the figures , sampling one device per cluster only results in slightly lower model accuracy , e.g. , 1.92 % drop compared to full participation on CIFAR-10 . This matches the theoretical result in Corollary 1 that device sampling does not affect the order of convergence rate under certain conditions . However , decreasing p can lead to faster training speed due to its shorter D2S communication delay as observed in Figure 3d . In practice , the optimal value of p needs to be tuned to strike a good balance between model accuracy and runtime . 7 CONCLUSION In this paper , we have proposed a new optimization algorithm called HL-SGD for FL with heterogeneous communications . Our algorithm leverages the D2D communication capabilities among edge device to accelerate the model convergence while improving model accuracy in FL . We have provided the theoretical convergence analysis of HL-SGD and conducted experiments to demonstrate the benefits of HL-SGD . In the future , we plan to extend HL-SGD to handle straggler issues under device heterogeneity and provide rigorous privacy protection for HL-SGD . REFERENCES Mehdi Salehi Heydar Abad , Emre Ozfatura , Deniz Gunduz , and Ozgur Ercetin . Hierarchical federated learning across heterogeneous cellular networks . In ICASSP 2020-2020 IEEE International Conference on Acoustics , Speech and Signal Processing ( ICASSP ) , pp . 8866–8870 . IEEE , 2020 . Arash Asadi , Qing Wang , and Vincenzo Mancuso . A survey on device-to-device communication in cellular networks . IEEE Communications Surveys & Tutorials , 16 ( 4 ) :1801–1819 , 2014 . Keith Bonawitz , Vladimir Ivanov , Ben Kreuter , Antonio Marcedone , H Brendan McMahan , Sarvar Patel , Daniel Ramage , Aaron Segal , and Karn Seth . Practical secure aggregation for privacypreserving machine learning . In proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security , pp . 1175–1191 , 2017 . Léon Bottou , Frank E Curtis , and Jorge Nocedal . Optimization methods for large-scale machine learning . Siam Review , 60 ( 2 ) :223–311 , 2018 . Stephen Boyd , Arpita Ghosh , Balaji Prabhakar , and Devavrat Shah . Randomized gossip algorithms . IEEE transactions on information theory , 52 ( 6 ) :2508–2530 , 2006 . Sebastian Caldas , Sai Meher Karthik Duddu , Peter Wu , Tian Li , Jakub Konečnỳ , H Brendan McMahan , Virginia Smith , and Ameet Talwalkar . Leaf : A benchmark for federated settings . arXiv preprint arXiv:1812.01097 , 2018 . Timothy Castiglia , Anirban Das , and Stacy Patterson . Multi-level local sgd for heterogeneous hierarchical networks . arXiv preprint arXiv:2007.13819 , 2020 . Yiming Chen , Kun Yuan , Yingya Zhang , Pan Pan , Yinghui Xu , and Wotao Yin . Accelerating gossip sgd with periodic global averaging . In International Conference on Machine Learning . PMLR , 2021a . Yiming Chen , Kun Yuan , Yingya Zhang , Pan Pan , Yinghui Xu , and Wotao Yin . Accelerating gossip sgd with periodic global averaging . In Marina Meila and Tong Zhang ( eds . ) , Proceedings of the 38th International Conference on Machine Learning , volume 139 of Proceedings of Machine Learning Research , pp . 1791–1802 . PMLR , 18–24 Jul 2021b . Gregory Cohen , Saeed Afshar , Jonathan Tapson , and Andre Van Schaik . Emnist : Extending mnist to handwritten letters . In 2017 International Joint Conference on Neural Networks ( IJCNN ) , pp . 2921–2926 . IEEE , 2017 . Antonious Girgis , Deepesh Data , Suhas Diggavi , Peter Kairouz , and Ananda Theertha Suresh . Shuffled model of differential privacy in federated learning . In International Conference on Artificial Intelligence and Statistics , pp . 2521–2529 . PMLR , 2021 . Farzin Haddadpour , Mohammad Mahdi Kamani , Mehrdad Mahdavi , and Viveck Cadambe . Local sgd with periodic averaging : Tighter analysis and adaptive synchronization . In Advances in Neural Information Processing Systems , pp . 11082–11094 , 2019 . Tzu-Ming Harry Hsu , Hang Qi , and Matthew Brown . Measuring the effects of non-identical data distribution for federated visual classification . arXiv preprint arXiv:1909.06335 , 2019 . Peter Kairouz , H Brendan McMahan , Brendan Avent , Aurélien Bellet , Mehdi Bennis , Arjun Nitin Bhagoji , Keith Bonawitz , Zachary Charles , Graham Cormode , Rachel Cummings , et al . Advances and open problems in federated learning . arXiv preprint arXiv:1912.04977 , 2019 . Sai Praneeth Karimireddy , Satyen Kale , Mehryar Mohri , Sashank Reddi , Sebastian Stich , and Ananda Theertha Suresh . Scaffold : Stochastic controlled averaging for federated learning . In International Conference on Machine Learning , pp . 5132–5143 . PMLR , 2020 . Anastasia Koloskova , Sebastian Stich , and Martin Jaggi . Decentralized stochastic optimization and gossip algorithms with compressed communication . In International Conference on Machine Learning , pp . 3478–3487 , 2019 . Anastasia Koloskova , Nicolas Loizou , Sadra Boreiri , Martin Jaggi , and Sebastian U Stich . A unified theory of decentralized sgd with changing topology and local updates . arXiv preprint arXiv:2003.10422 , 2020 . Alex Krizhevsky , Geoffrey Hinton , et al . Learning multiple layers of features from tiny images . 2009 . Tao Lin , Sebastian U Stich , Kumar Kshitij Patel , and Martin Jaggi . Don ’ t use large mini-batches , use local sgd . In International Conference on Learning Representations , 2019 . Lumin Liu , Jun Zhang , SH Song , and Khaled B Letaief . Client-edge-cloud hierarchical federated learning . In ICC 2020-2020 IEEE International Conference on Communications ( ICC ) , pp . 1–6 . IEEE , 2020 . Brendan McMahan , Eider Moore , Daniel Ramage , Seth Hampson , and Blaise Aguera y Arcas . Communication-efficient learning of deep networks from decentralized data . In Artificial Intelligence and Statistics , pp . 1273–1282 , 2017 . H Brendan McMahan , Daniel Ramage , Kunal Talwar , and Li Zhang . Learning differentially private recurrent language models . In International Conference on Learning Representations , 2018 . Angelia Nedić , Alex Olshevsky , and Michael G Rabbat . Network topology and communicationcomputation tradeoffs in decentralized optimization . Proceedings of the IEEE , 106 ( 5 ) :953–976 , 2018 . Sashank Reddi , Zachary Charles , Manzil Zaheer , Zachary Garrett , Keith Rush , Jakub Konečnỳ , Sanjiv Kumar , and H Brendan McMahan . Adaptive federated optimization . arXiv preprint arXiv:2003.00295 , 2020 . Daniel Rothchild , Ashwinee Panda , Enayat Ullah , Nikita Ivkin , Ion Stoica , Vladimir Braverman , Joseph Gonzalez , and Raman Arora . Fetchsgd : Communication-efficient federated learning with sketching . In International Conference on Machine Learning , pp . 8253–8265 . PMLR , 2020 . Sebastian Urban Stich . Local sgd converges fast and communicates little . In International Conference on Learning Representations ( ICLR ) , 2019 . John Nikolas Tsitsiklis . Problems in decentralized decision making and computation . Technical report , Massachusetts Inst of Tech Cambridge Lab for Information and Decision Systems , 1984 . Jianyu Wang and Gauri Joshi . Cooperative sgd : A unified framework for the design and analysis of communication-efficient sgd algorithms . arXiv preprint arXiv:1808.07576 , 2018 . Jianyu Wang , Anit Kumar Sahu , Zhouyi Yang , Gauri Joshi , and Soummya Kar . Matcha : Speeding up decentralized sgd via matching decomposition sampling . arXiv preprint arXiv:1905.09435 , 2019 . Jianyu Wang , Qinghua Liu , Hao Liang , Gauri Joshi , and H Vincent Poor . Tackling the objective inconsistency problem in heterogeneous federated optimization . Advances in neural information processing systems , 2020 . Jianyu Wang , Zachary Charles , Zheng Xu , Gauri Joshi , H Brendan McMahan , Maruan Al-Shedivat , Galen Andrew , Salman Avestimehr , Katharine Daly , Deepesh Data , et al . A field guide to federated optimization . arXiv preprint arXiv:2107.06917 , 2021 . Chengxu Yang , Qipeng Wang , Mengwei Xu , Zhenpeng Chen , Kaigui Bian , Yunxin Liu , and Xuanzhe Liu . Characterizing impacts of heterogeneity in federated learning upon large-scale smartphone data . In Proceedings of the Web Conference 2021 , pp . 935–946 , 2021 . Bicheng Ying , Kun Yuan , Yiming Chen , Hanbin Hu , Pan Pan , and Wotao Yin . Exponential graph is provably efficient for decentralized deep training . arXiv preprint arXiv:2110.13363 , 2021 . Hao Yu , Sen Yang , and Shenghuo Zhu . Parallel restarted sgd with faster convergence and less communication : Demystifying why model averaging works for deep learning , 2018 . Jinliang Yuan , Mengwei Xu , Xiao Ma , Ao Zhou , Xuanzhe Liu , and Shangguang Wang . Hierarchical federated learning through lan-wan orchestration . arXiv preprint arXiv:2010.11612 , 2020 . Mikhail Yurochkin , Mayank Agarwal , Soumya Ghosh , Kristjan Greenewald , Nghia Hoang , and Yasaman Khazaeni . Bayesian nonparametric federated learning of neural networks . In International Conference on Machine Learning , pp . 7252–7261 . PMLR , 2019 . Yue Zhao , Meng Li , Liangzhen Lai , Naveen Suda , Damon Civin , and Vikas Chandra . Federated learning with non-iid data . arXiv preprint arXiv:1806.00582 , 2018 . A PRELIMINARIES Intra-cluster dynamics . To facilitate the analysis , we introduce matrices Xk ∈ Rn×d and Gk ∈ Rn×d constructed by stacking respectively xi and gi for i ∈ Vk row-wise . Similarly , we define the pseudo-gradient ∇Fk ( Xk ) ∈ Rn×d associated to cluster k by stacking ∇fi ( xi ) for i ∈ Vk row-wise . In addition , define the following intra-cluster averages for each cluster k : x̄k , 1 n ∑ i∈Vk xi and ḡk , 1 n ∑ i∈Vk gi . ( 13 ) The update within each cluster then can be written compactly in matrix form as Xr , s+1k = Wk ( X r , s k − ηG r , s k ) , ∀k = 1 , . . . , K. ( 14 ) Since each Wk is bi-stochastic , we obtain the following update of the intra-cluster average x̄r , s+1k = x̄ r , s k − η · ḡ r , s k . ( 15 ) We proceed to derive the update of the intra-cluster consensus error . Define the averaging matrix J = 1 n 1 · 1 > with 1 = [ 1 , . . . , 1︸ ︷︷ ︸ n ] . ( 16 ) Multiplying both sides of ( 14 ) from the left by ( I−J ) leads to the following update of the consensus error : ( I − J ) Xr , s+1k︸ ︷︷ ︸ Xr , s+1k , ⊥ = ( I − J ) Wk ( Xr , sk − ηG r , s k ) = ( Wk − J ) ( Xr , sk − ηG r , s k ) = ( Wk − J ) ( Xr , sk , ⊥ − ηG r , s k ) . ( 17 ) Global average dynamics . Define the global average among all xi ’ s as x̄ , 1 N N∑ i=1 xi . ( 18 ) Then accordingly to ( 15 ) we have the following update of x̄ for all s = 0 , . . . , τ − 1 : x̄r , s+1 = 1 N K∑ k=1 nx̄r , s+1k = 1 N K∑ k=1 n ( x̄r , sk − ηḡ r , s k ) = 1 N N∑ i=1 ( xr , si − ηg r , s i ) = x̄ r , s − η 1 N N∑ i=1 gr , si . ( 19 ) Filtration . Let G = [ G1 ; . . . ; GK ] ∈ RN×d be the matrix constructed by stacking all the stochastic gradients . We introduce the following filtration Fr , s = σ ( G0,0 , . . . , G0 , τ−1 , S0 , G 1,0 , . . . , G1 , τ−1 , . . . , Sr−1 , G r,0 , . . . , Gr , s ) Fr = σ ( G0,0 , . . . , G0 , τ−1 , S0 , G 1,0 , . . . , G1 , τ−1 , . . . , Sr−1 ) . ( 20 ) Therefore we have xr,0i = x r ∈ Fr for r ≥ 1 , and xr , si ∈ Fr , s−1 for 1 ≤ s ≤ τ . For simplicity the conditional expectation E ( · |Fr , s ) is denoted as Er , s , and we define the noise in the stochastic gradient as ξr , si , g r , s i −∇fi ( x r , s i ) . ( 21 ) Since at the end of round r all nodes are picked with equal probability , the sampling procedure preserves average in expectation : Er , τ−2xr+1 = E ( E ( xr+1|Fr , τ−1 ) |Fr , τ−2 ) = E E 1 K K∑ k=1 1 m ∑ i∈Srk xr , τi |Fr , τ−1 |Fr , τ−2 = E ( E ( 1 K K∑ k=1 1 m ∑ i∈Vk I ( i ∈ Srk ) x r , τ i |Fr , τ−1 ) |Fr , τ−2 ) = Er , τ−2 ( x̄r , τ ) ( 22 ) where the last equality holds since P ( i ∈ Srk|i ∈ Vk ) = mn . B CONVERGENCE ANALYSIS To prove the convergence we first establish in Sec . B.1 that the objective value Ef ( xr ) is descending at each round r , up to some consensus error terms . Subsequently , bounds on the error terms are provided in Sec . B.2-B.4 . Based on these results , the proof of convergence of Algorithm 1 with full and partial device participation are given in Sec . B.5 and B.6 , respectively . The proofs of the main propositions are given in Sec . C and that of the supporting lemmas are deferred to Sec . D. B.1 OBJECTIVE DESCENT Lemma 1 . Let { xr , si } be the sequence generated by Algorithm 1 under Assumptions 1-6 . If η > 0 , then the following inequality holds for all r ∈ N+ : Ef ( xr+1 ) ≤ Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + τ−2∑ s=0 E ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) + E ( L 2 ‖xr+1 − x̄r , τ−1‖2 ) . ( 23 ) Proof . The proof is a standard application of the descent lemma and the sampling rule applied at iteration τ to obtain xr+1 . See Appendix D.1 . Lemma 1 shows the objective value f ( xr ) is descending in expectation up to the following error terms : T1 = E ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 , T2 = E∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 T3 = E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 T4 = E‖x̄r , s+1 − x̄r , s‖2 , T5 = E‖xr+1 − x̄r , τ−1‖2 . ( 24 ) In the sequel , we will show these quantities can be bounded by the optimality gap measured in terms of the gradient norms ‖∇f ( x̄r , s ) ‖2 , ‖ ( 1/K ) ∑K k=1∇f̄k ( x̄ r , s k ) ‖2 , and ‖ ( 1/N ) ∑N i=1∇fi ( x r , s i ) ‖2 . B.2 BOUNDING T1 , T2 AND T3 . Define ρmax = max k=1 , ... , K ρk . ( 25 ) Therefore it holds 0 ≤ ρmax ≤ 1 by Assumption 3 . Since each fi is L-smooth by Assumption 1 , we have f̄k and f are also L-smooth . Using this fact and the convexity of ‖ · ‖2 we can bound T1 , T2 and T3 as T1 = E ∥∥∥∇f ( x̄r , s ) ± 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 ≤ 2 1 K K∑ k=1 L2E‖x̄r , s − x̄r , sk ‖ 2 + 2 K∑ k=1 1 N ∑ i∈Vk L2E‖x̄r , sk − x r , s i ‖ 2 , T2 = E ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 ≤ 1 K K∑ k=1 L2E ∥∥∥x̄r , s − x̄r , sk ∥∥∥2 , T3 = E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 ≤ K∑ k=1 1 N ∑ i∈Vk L2E‖x̄r , sk − x r , s i ‖ 2 . ( 26 ) Clearly , in order to bound T1,2,3 we first need to bound the inter-cluster consensus error ‖x̄r , s−x̄r , sk ‖ and the intra-cluster consensus error ‖x̄r , sk − x r , s i ‖ . Lemma 2 ( Inter-Cluster Consensus Error Bound ) . Let { xr , si } be the sequence generated by Algorithm 1 under Assumptions 1 , 2 , 3 , and 5 . If the learning rate η > 0 satisfies η2 ≤ 1 24τ ( 4τ − 1 ) L2 , ( 27 ) then for all s = 0 , . . . , τ − 1 it holds 1 K K∑ k=1 E‖x̄r , s+1 − x̄r , s+1k ‖ 2 ≤ Cτ 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + 12τη2L2 ( 1 N K∑ K=1 E ∥∥∥Xr , sk , ⊥∥∥∥2 ) + 12τη2 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 K − 1 N σ2 ( 28 ) where Cτ , 1 + 3 2 · 1 4τ − 1 . ( 29 ) Proof . See Appendix D.2 . Lemma 3 ( Intra-Cluster Consensus Error Bound ) . Let { xr , si } be the sequence generated by Algorithm 1 under Assumptions 1-5 . If η > 0 , then for all s = 0 , . . . , τ − 1 it holds 1 N K∑ k=1 E‖Xr , s+1k , ⊥ ‖ 2 ≤ ( max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + η 2ρL · 4L2 ) 1 N K∑ k=1 E‖Xr , sk , ⊥‖ 2 + 4η2ρLL 2 1 K K∑ k=1 E‖x̄r , sk − x̄ r , s‖2 + 4η2ρL ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2ρL̄2L + η2σ2ρ2max , ( 30 ) where ρmax is defined in ( 25 ) and ρL , max k=1 , ... , K { ρ2k ( 1 + ζk ) } , ̄2L , 1 K K∑ k=1 2k ( 31 ) with ζk > 0 being a free parameter to be chosen properly for all k = 1 , . . . , K. Proof . See Appendix D.3 . Combining Lemma 2 and 3 we can obtain the following bound on the sum of intra- and interconsensus errors using gradient ‖∇f ( x̄r , s ) ‖2 . Proposition 1 . Let { xr , si } be the sequence generated by Algorithm 1 under Assumptions 1-5 . If the learning rate η > 0 satisfies η2 ≤ 1 24τ ( 4τ − 1 ) L2 , ( 32 ) then for all s = 0 , . . . , τ − 1 it holds 1 K K∑ k=1 E‖x̄r , s+1 − x̄r , s+1k ‖ 2 + K∑ k=1 1 N ‖Xr , s+1k , ⊥ ‖ 2 ≤ s∑ ` =0 C1η 2 ( τ + ρ2maxDτ , ρ ) ( α2E‖∇f ( x̄r , ` ) ‖2 + 2g ) + C1η2τρ2maxDτ , ρ̄2L + C1τη 2ρ2maxσ 2 + C1 ( τ +D 2 τ , ρτ −1ρ2max ) η 2 1 n σ2 ( 33 ) where Dτ , ρ , min { τ , 1 1− ρmax } ( 34 ) and C1 > 0 is some universal constant . Proof . See Appendix C.1 . Notice that according to ( 26 ) the gradient difference terms in Lemma 1 can be bounded as η 4 E ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 + η 4 E ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 ≤η 4 ( 2 K K∑ k=1 L2E‖x̄r , s − x̄r , sk ‖ 2 + K∑ k=1 2 N ∑ i∈Vk L2E‖x̄r , sk − x r , s i ‖ 2 ) + η 4 ( 1 K K∑ k=1 L2E ∥∥∥x̄r , s − x̄r , sk ∥∥∥2 + K∑ k=1 1 N ∑ i∈Vk L2E‖x̄r , sk − x r , s i ‖ 2 ) ≤ηL2 ( 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + K∑ k=1 1 N ‖Xr , sk , ⊥‖ 2 ) ( 35 ) for all s = 1 , . . . , τ . Therefore Proposition 1 immediately leads to the following result . Corollary 2 . Under the same setting as Proposition 1 , it holds τ∑ s=0 η 4 E ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 + τ∑ s=0 η 4 E ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + τ∑ s=0 η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 ≤ τ−1∑ s=0 C1L 2η3 ( τ2 + τρ2maxDτ , ρ ) ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + C1L2η3τ2ρ2maxDτ , ρ̄2L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n . ( 36 ) We conclude this section by providing a separate bound on the consensus error 1 N ∑K k=1 Er‖X r , τ−1 k , ⊥ ‖2 that will be useful in bounding T5 . Proposition 2 . Under the same setting as Proposition 1 , if ρmax ≤ 1− 1τ , then we have 1 N E K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 ≤ 2C2 τ−2∑ s=0 D2τ , ρρmaxη 2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C2D 2 τ , ρτρ 2 maxη 2̄2L + C2 ( 1 n + ρmax ) ρmaxτDτ , ρη 2σ2 . ( 37 ) for some universal constant C2 > 0 . Proof . See Appendix C.2 . Proposition 2 shows that the average intra-cluster consensus error 1N ∑K k=1 ‖X r , τ−1 k , ⊥ ‖2 decreases as the network connectivity improves , and vanishes if ρmax goes to zero . B.3 BOUNDING T4 Proposition 3 . Under the same setting as Lemma 1 , we have E‖x̄r , s+1 − x̄r , s‖2 = η2E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + η2 σ2 N ( 38 ) for s = 0 , . . . , τ − 1 and r ∈ N+ . Proof . Recall the algorithmic update at iteration s for all s = 0 , . . . , τ − 1 : Xr , s+1k = WkX r , s k − ηWkG r , s k x̄r , s+1k = x̄ r , s k − ηḡ r , s k . ( 39 ) Therefore , it holds under Assumption 2 that E‖x̄r , s+1 − x̄r , s‖2 =E ∥∥∥∥∥ ηN N∑ i=1 ( gr , si ±∇fi ( x r , s i ) ∥∥∥∥∥ 2 = E ∥∥∥∥∥ ηN N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + η2 σ2 N . ( 40 ) B.4 BOUNDING T5 We provide the bound on T5 separately for the full device participation and partial participation cases . Full participation . When the sampling probability p = 1 , we have xr+1 = 1 N N∑ i=1 xr , τi = x̄ r , τ . In this case , it follows from Proposition 3 that E‖xr+1 − x̄r , τ−1‖2 = η2E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , τ−1i ) ∥∥∥∥∥ 2 + η2 σ2 N . ( 41 ) Partial participation . We proceed to bound T5 for 1 ≤ m ≤ n− 1 . ( 42 ) Define p = m/n . Recall the algorithmic update at iteration τ − 1 : Xr , τk = WkX r , τ−1 k − ηWkG r , τ−1 k ( 43 ) and xr+1 = 1 K K∑ k=1 1 m ∑ i∈Srk xr , τi = 1 Np K∑ k=1 ∑ i∈Srk xr , τi . ( 44 ) Therefore , with ( Wk ) i , j being the ij-th element of matrix Wk we have under Assumption 2 : E‖xr+1 − x̄r , τ−1‖2 =E ∥∥∥∥∥∥ 1Np K∑ k=1 ∑ i∈Srk xr , τi − x̄ r , τ−1 ∥∥∥∥∥∥ 2 =E ∥∥∥∥∥∥ 1Np K∑ k=1 ∑ i∈Srk ( ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − ηg r , τ−1 j ) ) − x̄r , τ−1 ∥∥∥∥∥∥ 2 =E ∥∥∥∥∥∥ 1Np K∑ k=1 ∑ i∈Vk I ( i ∈ Srk ) ( ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − η∇fj ( x r , τ−1 j ) ) − x̄r , τ−1 ∥∥∥∥∥∥ 2 ︸ ︷︷ ︸ A2,1 + η2 E ∥∥∥∥∥∥ 1Np K∑ k=1 ∑ i∈Vk I ( i ∈ Srk ) ( ∑ j∈Vk ( Wk ) i , j ( ∇fj ( xr , τ−1j ) − g r , τ−1 j ) ) ∥∥∥∥∥∥ 2 ︸ ︷︷ ︸ A2,2 . ( 45 ) Proposition 4 . Let { xr , si } be the sequence generated by Algorithm 1 under Assumptions 1-6 . If the learning rate η > 0 satisfies η2 ≤ 1 24τ ( 4τ − 1 ) L2 , ( 46 ) then we have the following bounds on A2,1 : A2,1 ≤2η2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 8 ( Gp + 1 τ2 ) ( 1 N K∑ k=1 E‖Xr , τ−1k , ⊥ ‖ 2 ) ; ( 47 ) where Gp , n−m m ( n− 1 ) . ( 48 ) Proof . See Appendix C.3 . Proposition 5 . Under the same setting as Proposition 4 , A2,2 can be bounded as A2,2 ≤ σ2 N ( 2 + n m · ρ2max ) . ( 49 ) Proof . See Appendix C.4 B.5 PROOF OF THEOREM 1 ( FULL PARTICIPATION ) We first prove the descent of the objective value under suitable choice of η . Proposition 6 . If the learning rate satisfies η ≤ 1 4C1α · 1 τL , ( 50 ) then we have Ef ( xr+1 ) ≤ Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 +Rfull ( η ) , ( 51 ) where Rfull ( η ) =C1L2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + 2C1L 2η3 ( τ2ρ2maxDτ , ρ̄ 2 L + τ 2σ2 ( 1 n + ρ2max ) ) + η2Lτ σ2 N . ( 52 ) C1 > 0 is some universal constant . Proof . See Appendix C.5 . To attain the expression of the convergence rate , we sum ( 51 ) over r = 0 , . . . , R : min r∈ [ R ] min s=0 , ... , τ−1 E‖∇f ( x̄r , s ) ‖2 ≤8 ( f ( x 0 ) − f ( x ? ) ) ητ ( R+ 1 ) + 8Rfull ( η ) ητ = 8 ( f ( x0 ) − f ( x ? ) ) ητ ( R+ 1 ) + 16ηL σ2 N︸ ︷︷ ︸ centralized SGD + 16C1L 2τ2η2 2g + 16C1L 2η2 ( τρ2maxDτ , ρ̄ 2 L + τσ 2 ( 1 n + ρ2max ) ) ︸ ︷︷ ︸ network effect . ( 53 ) The first two terms of ( 53 ) corresponds to the impact of stochastic noise and is of the same order as the centralized SGD algorithm . The last term is of order η2 and corresponds to the deterioration of convergence rate due to the fact that we are not computing the average gradients of all devices at each iteration . Denote r0 = 8 ( f ( x 0 ) − f ( x ? ) ) , r1 = 16L ( σ2 N ) , r2 = 16C1L 2τ2 2g + 16C1L 2 ( τρ2maxDτ , ρ̄ 2 L + τσ 2 ( 1 n + ρ2max ) ) . ( 54 ) The rest of the proof follows the same argument as ( Chen et al. , 2021b , Appendix B.5 ) and thus we omit the details . B.6 PROOF OF THEOREM 2 AND COROLLARY 1 ( PARTIAL PARTICIPATION ) Proposition 7 . Let { xr , si } be the sequence generated by Algorithm 1 under Assumption 1-5 . If the learning rate η and the network connectivity satisfies η ≤ 1 C3α2 · 1 τL and ρmax ≤ 1− 1 τ , ( 55 ) then Ef ( xr+1 ) ≤ Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 +R ( 1 ) part ( η ) +R ( 2 ) part ( η ) ( 56 ) with R ( 1 ) part ( η ) =C1L2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + 2C1L 2η3 ( τ2ρ2maxDτ , ρ̄ 2 L + τ 2σ2 ( 1 n + ρ2max ) ) + Lτη2 σ2 N , ( 57 ) R ( 2 ) part ( η ) = ( 8C2G ′ pLD 2 τ , ρτρmax ) η2 2g + 4C2LG ′ pη 2 ( D2τ , ρτρ 2 max̄ 2 L + ( 1 n + ρmax ) ρmaxτDτ , ρσ 2 ) + L 2 ( n m ρ2max ) η2 σ2 N . C1 , C3 > 0 are some universal constants , and G′p = Gp + 1 τ2 , with Gp = n−m m ( n− 1 ) . ( 58 ) Proof . See Appendix C.6 Comparing ( 56 ) to ( 51 ) we can see thatR ( 1 ) part ( η ) is of the same order asR ( 1 ) full ( η ) , whileR ( 2 ) part ( η ) is an extra loss term introduced by sampling . Following the same steps as the proof of Theorem 1 gives min r∈ [ R ] min s=0 , ... , τ−1 E‖∇f ( x̄r , s ) ‖2 =O σ + E ( g , ̄L , σ , ρmax ) √ NτR + ( τ2 2g + τρ 2 maxDτ , ρ̄ 2 L + τ ( 1 n + ρ 2 max ) σ2 ) 1 3 ( τR ) 2 3 + 1 R , ( 59 ) where E2 ( g , ̄L , σ , ρmax ) = ( 2gDτ , ρ + ρmaxDτ , ρ̄2L + σ2 ) ·G′pDτ , ρρmaxN + n m · 1 τ ρ2maxσ 2 . ( 60 ) Our last step simplifies the overall conditions on ρmax so that E2 ( g , ̄L , σ , ρmax ) = O ( 1 ) : ρmax ≤ 1− 1 τ , G′pD 2 τ , ρρmax ≤ 1 N , ρmax ≤ m n · τ . ( 61 ) We claim to fulfill ( 61 ) it suffices to require ρmax ≤ 1 4N min { m , τ − 1 } . ( 62 ) When τ = 1 , the condition trivially requires ρmax = 0 . We then consider the case for τ ≥ 2 . By definition , it can be verified that G′p ≤ 1 m + 1 τ2 . ( 63 ) First notice that m 4N ≤ 1 4 ≤ 1− 1 τ and τ 4N ≤ m n · τ . ( 64 ) Therefore , it remains to prove ( 62 ) implies G′pD 2 τ , ρρmax ≤ 1 N . ( 65 ) Using the fact that under ( 62 ) ρmax ≤ 1/4 we have G′pD 2 τ , ρρmax = G ′ pρmax · 1 ( 1− ρmax ) 2 ≤16 9 ρmax ( 1 m + 1 τ2 ) ≤ 16 9 ( 1 m + 1 τ2 ) 1 4N min { m , τ } ≤ 1 N . ( 66 ) This proves the claim . C PROOF OF MAIN PROPOSITIONS C.1 PROOF OF PROPOSITION 1 Denote for short Mr , s , 1 N K∑ k=1 E‖Xr , sk , ⊥‖ 2 1 K K∑ k=1 E‖x̄r , sk − x̄ r , s‖2 . ( 67 ) Invoking Lemma 2 and Lemma 3 we obtain that under the condition that the learning rate η > 0 satisfies η2 ≤ 1 24τ ( 4τ − 1 ) L2 , ( 68 ) the following inequality is satisfied for all s = 0 , . . . , τ − 1 : Mr , s+1 ≤ G ·Mr , s +Br , s , ( 69 ) where G = ( maxk∈ [ K ] ρ 2 k ( 1 + ζ −1 k ) + η 2ρL · 4L2 η2ρL · 4L2 12τη2L2 Cτ ) ( 70 ) Br , s = ( 4ρLη 2 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2ρL̄2L + η2ρ2maxσ2 12τη2 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 σ 2 n . ) ( 71 ) The inequality in ( 69 ) is defined elementwise . Unrolling ( 69 ) yields Mr , s+1 ≤ s∑ ` =0 G ` Br , s− ` , ( 72 ) where we have used the fact that Mr,0 = 0 due to full synchronization of the xi ’ s at the beginning of each round r. We first provide a bound on the sum of the two elements of G ` Br , s− ` . For simplicity we omit the round index r in the superscript for the rest of this section . Lemma 4 . Let bs− ` 1 and b s− ` 2 be the first and second element of B s− ` , respectively . Suppose the learning rate η > 0 then ( 1 , 1 ) G ` Bs− ` ≤ λ ` 2 ( bs− ` 1 + b s− ` 2 ) + λ ` 2 − λ ` 1 λ2 − λ1 η2 · ( 12τL2bs− ` 1 + 4ρLL 2bs− ` 2 ) ( 73 ) where λ1 ≤ λ2 are the eigenvalues of G ; and ρL is defined in ( 31 ) . Proof . See Appendix D.4 . From Lemma 4 we immediately get s∑ ` =0 ( 1 , 1 ) ·G ` Bs− ` ≤ s∑ ` =0 ( λ ` 2 ( b s− ` 1 + b s− ` 2 ) + λ ` 2 − λ ` 1 λ2 − λ1 η2 · ( 12τL2bs− ` 1 + 4ρLL 2bs− ` 2 ) ) . ( 74 ) Since λ2 ≥ Cτ > 1 , we have λ ` 2 − λ ` 1 λ2 − λ1 = λ ` −12 ` −1∑ s=0 ( λ1 λ2 ) s ≤ λ ` −12 min { λ2 λ2 − λ1 , ` } ≤ λ ` 2 min { 1 λ2 − λ1 , ` } ( 75 ) and thus s∑ ` =0 ( 1 , 1 ) ·G ` Bs− ` ≤ s∑ ` =0 λ ` 2 ( b s− ` 1 + b s− ` 2 ) + s∑ ` =0 ( λ ` 2 min { 1 λ2 − λ1 , ` } ) η2 · ( 12τL2bs− ` 1 + 4ρLL 2bs− ` 2 ) . ( 76 ) Recall the definition of ρL given by ( 31 ) : ρL = max k=1 , ... , K ρ2k ( 1 + ζk ) . ( 77 ) By the Gershgorin ’ s theorem , since η > 0 , we can upperbound λ2 as λ2 ≤ max { max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + η 2ρL · 8L2 , Cτ + 12τη2L2 } ≤ max { max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + ρL ( 4τ − 1 ) 3τ , 1 + 2 4τ − 1 } , ( 78 ) where the last inequality is due to the bound on η : η2 ≤ 1 24τ ( 4τ − 1 ) L2 . ( 79 ) Define constant Dτ , ρ = min { τ , 1 1− ρmax } . ( 80 ) We consider two cases . • Case 1 : ρmax ≤ 1− 1 τ ⇒ 1 1− ρmax ≤ τ . ( 81 ) Thus Dτ , ρ = 1/ ( 1− ρmax ) . We let ζk = ρk/ ( 1− ρk ) and it gives max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) = ρmax , ρL = max k=1 , ... , K { ρ2k 1− ρk } = ρ2max 1− ρmax = ρ2maxDτ , ρ . ( 82 ) Substituting into the bound of λ2 [ cf . ( 78 ) ] gives λ2 ≤ max { ρmax + ρ2max ( 1− ρmax ) 3τ ( 4τ − 1 ) , 1 + 2 4τ − 1 } ≤ max 1− 1τ + ( 1− 1τ ) 2 3 ( 4τ − 1 ) , 1 + 2 4τ − 1 < 1 + 34τ − 1 , ( 83 ) where in the second inequality we used the condition ( 81 ) . Since s ≤ τ and λ2 ≥ 1 , we obtain the following bound s∑ ` =0 λ ` 2b s− ` 1 ≤ ( ( 1 + 3 4τ − 1 ) τ ) · ( s∑ ` =0 b ` 1 ) ≤ 3 · ( s∑ ` =0 b ` 1 ) . ( 84 ) Moreover , since ρmax + η 2ρL · 4L2 ≤ ρmax + ρ2max ( 1− ρmax ) ( 4τ − 1 ) 6τ ( 81 ) ≤ 1− 1 τ + ( 1− 1τ ) 2 6 ( 4τ − 1 ) ≤ Cτ , ( 85 ) we can bound λ2 − λ1 as λ2 − λ1 ≥ Cτ − ρmax − η2ρL · 4L2 ≥ Cτ − ( ρmax + ρ2max ( 1− ρmax ) ( 4τ − 1 ) 6τ ) ( 81 ) ≥ Cτ − ( ρmax + ρmax · 1− 1τ 6 ( 4τ − 1 ) ) ≥ 1 + 1 4τ − 1 − ( ρmax + ρmax · 1 4τ − 1 ) = ( 1− ρmax ) ( 1 + 1 4τ − 1 ) ≥ 1− ρmax . ( 86 ) Collecting ( 84 ) and ( 86 ) we can bound ( 76 ) as s∑ ` =0 ( 1 , 1 ) ·G ` Bs− ` ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 η2 · ( 12τL2b ` 1 + 4ρLL 2b ` 2 ) · 3 ( min { 1 λ2 − λ1 , τ } ) ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 η2 · ( 12τL2b ` 1 +Dτ , ρρ 2 max4L 2b ` 2 ) · 3Dτ , ρ ( 79 ) ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 ( 12τb ` 1 +Dτ , ρρ 2 max4b ` 2 ) · 3Dτ , ρ 1 ( 4τ − 1 ) 24τ ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 ( 12τb ` 1 +Dτ , ρρ 2 max4b ` 2 ) · 1 8 Dτ , ρ τ2 = s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 ( 12τb ` 1 +Dτ , ρρ 2 max4b ` 2 ) · 1 8 Dτ , ρ τ2 . ( 87 ) Substituting the expression of b ` 1 and b ` 2 gives s∑ ` =0 ( 1 , 1 ) ·G ` Bs− ` ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 5 + s∑ ` =0 D2τ , ρ τ2 · ρ2maxb ` 2 = s∑ ` =0 5 ( 4η2 ( ρL + 3τ ) ( α 2E‖∇f ( x̄r , ` ) ‖2 + 2g ) + 4η2ρL̄2L + η2ρ2maxσ2 + η2 1 n σ2 ) + s∑ ` =0 D2τ , ρ τ2 · ρ2max ( 12τη2 ( α2E‖∇f ( x̄r , ` ) ‖2 + 2g ) + η2 1 n σ2 ) ≤ s∑ ` =0 C1 2 η2 ( ρL + τ + ρ 2 maxD 2 τ , ρτ −1 ) ( α2E‖∇f ( x̄r , ` ) ‖2 + 2g ) + C1 2 η2τρL̄ 2 L + C1 2 τη2ρ2maxσ 2 + C1 2 ( τ +D2τ , ρτ −1ρ2max ) η 2 1 n σ2 ≤ s∑ ` =0 C1η 2 ( τ + ρ2maxDτ , ρ ) ( α2E‖∇f ( x̄r , ` ) ‖2 + 2g ) + C1η2τρ2maxDτ , ρ̄2L + C1τη 2ρ2maxσ 2 + C1 ( τ +D 2 τ , ρτ −1ρ2max ) η 2 1 n σ2 ( 88 ) where C1 is some universal constant . The last inequality holds since ρL = ρ2maxDτ , ρ and Dτ , ρ ≤ τ . • Case 2 : ρmax > 1− 1 τ ⇒ Dτ , ρ = τ . ( 89 ) In such a case , we let ζk = ( 4τ − 1 ) and thus max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) = ρ 2 max ( 1 + ( 4τ − 1 ) −1 ) , ρL = 4τρ2max = 4ρ2maxDτ , ρ . ( 90 ) Substituting into the bound of λ2 given in ( 78 ) , applying again the learning rate condition ( 79 ) and using the fact that Dτ , ρ = τ : λ2 ≤ max { ρ2max ( 1 + ( 4τ − 1 ) −1 ) + 4ρ2max 3 ( 4τ − 1 ) , 1 + 2 ( 4τ − 1 ) } ≤ 1 + 3 4τ − 1 . ( 91 ) Therefore by ( 76 ) , ( 79 ) , ( 84 ) , and the fact that min { 1 λ2 − λ1 , ` } ≤ τ = Dτ , ρ ( 92 ) we obtain s∑ ` =0 ( 1 , 1 ) ·G ` Bs− ` ≤ s∑ s=0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 η2 · ( 12τL2b ` 1 + 16ρ 2 maxDτ , ρL 2b ` 2 ) · 3Dτ , ρ ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 ( 12τb ` 1 + 16ρ 2 maxDτ , ρb ` 2 ) 1 8 Dτ , ρ τ2 ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 5 + s∑ ` =0 2 D2τ , ρ τ2 ρ2maxb ` 2 . ( 93 ) Substituting the expression of b1 and b2 and using the fact that ρL = 4τρ 2 max = 4ρ 2 maxDτ , ρ we arrive at the same bound as in Case 1 , possibly with a different constant C1 . C.2 PROOF OF PROPOSITION 2 We are in Case 1 described in the proof of Proposition 1 . By letting ζk = ρk/ ( 1− ρk ) we have G = ( ρmax + ρ2max 1−ρmax · η 2 · 4L2 ρ 2 max 1−ρmax · η 2 · 4L2 12τη2L2 Cτ ) ( 94 ) and the following bound on the difference of the eigenvalues of G : λ2 − λ1 ≥ 1− ρmax . ( 95 ) Notice that according to ( 72 ) and ( 149 ) 1 N K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 = 1 det ( T ) τ−2∑ ` =0 tτ−2− ` 1 . Therefore 1 N K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 = 1 12τη2L2 ( λ2 − λ1 ) τ−2∑ ` =0 ( ( Cτ − λ1 ) ( λ ` 112τη 2L2bτ−2− ` 1 − λ ` 1 ( λ2 − Cτ ) b τ−2− ` 2 ) ) + 1 12τη2L2 ( λ2 − λ1 ) τ−2∑ ` =0 ( ( λ2 − Cτ ) ( λ ` 212τη 2L2bτ−2− ` 1 + λ ` 2 ( Cτ − λ1 ) bτ−2− ` 2 ) ) ≤ 1 12η2L2τ ( 1− ρmax ) τ−2∑ ` =0 ( ( Cτ − λ1 ) λ ` 1 ( 12τη2L2bτ−2− ` 1 − ( λ2 − Cτ ) b τ−2− ` 2 ) ) + 1 12η2L2τ ( 1− ρmax ) τ−2∑ ` =0 ( ( λ2 − Cτ ) λ ` 2 ( 12τη2L2bτ−2− ` 1 + ( Cτ − λ1 ) b τ−2− ` 2 ) ) . ( 96 ) In the following , we bound λ1 and λ2 − Cτ as a function of ρmax . For notation simplicity we omit the subscript of ρmax in the rest of the proof . Further , we introduce the following shorthand notation for the elements of G : f ( ρ ) = ρ+ ρ2 1− ρ · η2 · 4L2 , g ( ρ ) = ρ 2 1− ρ · η2 · 4L2 , and h ( τ ) = 12τη2L2 . ( 97 ) The eigenvalues of G then can be written in closed form as λ1,2 = f ( ρ ) + Cτ ± √ ( Cτ − f ( ρ ) ) 2 + 4g ( ρ ) h ( τ ) 2 . ( 98 ) Since we have proved in Proposition 1 that Cτ ≥ f ( ρ ) [ cf . ( 85 ) ] , this gives us the following upperbounds on λ2 as : Cτ ≤ λ2 = f ( ρ ) + Cτ + √ ( Cτ − f ( ρ ) ) 2 + 4g ( ρ ) h ( τ ) 2 ≤ Cτ + √ g ( ρ ) h ( τ ) . ( 99 ) Furthermore , applying the Gershgorin ’ s theorem we obtain λ1 ≥ min { ρ , Cτ − 12τη2L2 } ≥ ρ ≥ 0 . ( 100 ) under the learning rate condition ( 79 ) . Substituting the bounds into ( 96 ) gives 1 N K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 ≤ 1 12η2L2τ ( 1− ρ ) τ−2∑ ` =0 ( Cτλ ` 1 ( 12τη2L2bτ−2− ` 1 − ( λ2 − Cτ ) b τ−2− ` 2 ) ) + 1 12η2L2τ ( 1− ρ ) τ−2∑ ` =0 ( ( λ2 − Cτ ) λ ` 2 ( 12τη2L2bτ−2− ` 1 + Cτ b τ−2− ` 2 ) ) ≤ 1 12η2L2τ ( 1− ρ ) τ−2∑ ` =0 ( Cτf ( ρ ) ` ( 12τη2L2bτ−2− ` 1 ) ) + 1 12η2L2τ ( 1− ρ ) τ−2∑ ` =0 ( √ g ( ρ ) h ( τ ) λ ` 2 ( 12τη2L2bτ−2− ` 1 + Cτ b τ−2− ` 2 ) ) ≤ 1 1− ρ Cτ ( τ−2∑ ` =0 b ` 1 ) + 1 1− ρ √ g ( ρ ) h ( τ ) λτ2 ( τ−2∑ ` =0 b ` 1 ) + Cτ 12η2L2τ ( 1− ρ ) √ g ( ρ ) h ( τ ) λτ2 ( τ−2∑ ` =0 b ` 2 ) ≤Dτ , ρCτ ( τ−2∑ ` =0 b ` 1 ) + 3Dτ , ρη 2L2ρ √ Dτ , ρ · 48τ ( τ−2∑ ` =0 b ` 1 ) + Dτ , ρCτ 12τ ρ √ Dτ , ρ · 48τ ( τ−2∑ ` =0 b ` 2 ) . ( 101 ) where we have used the bound λ1 ≤ f ( ρ ) < 1 , λ2 > 1 and λτ2 < 3 . Plug in the expression of b1 and b2 and using the fact that Cτ < 2 , ρL = ρ2Dτ , ρ gives 1 N K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 ≤ ( 2Dτ , ρ + 3Dτ , ρη 2L2ρ √ Dτ , ρ · 48τ ) ρ2 τ−2∑ s=0 ( 4η2Dτ , ρ ( α 2‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2Dτ , ρ̄2L + η2σ2 ) + Dτ , ρCτ 12τ ρ √ Dτ , ρ · 48τ τ−2∑ s=0 ( 12τη2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 σ2 n ) ≤ ( 2Dτ , ρ + Dτ , ρ τ ρ ) τ−2∑ s=0 ρ2 ( 4η2Dτ , ρ ( α 2‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2Dτ , ρ̄2L + η2σ2 ) + 2 Dτ , ρ τ ρ √ Dτ , ρ · τ τ−2∑ s=0 ( 12τη2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 1 n σ2 ) ≤3Dτ , ρρ2 τ−2∑ s=0 ( 4η2Dτ , ρ ( α 2‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2Dτ , ρ̄2L + η2σ2 ) + 2Dτ , ρρ √ Dτ , ρτ−1 τ−2∑ s=0 ( 12τη2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 1 n σ2 ) , ( 102 ) where the second inequality holds since 3τ2η2L2 ≤ 3τ2L2 · 1 24τ ( 4τ − 1 ) L2 ≤ 3τ2L2 · 1 24τ ( 2τ ) L2 < 1 8 ( 103 ) ⇒3Dτ , ρη2L2ρ √ Dτ , ρ · 48τ ≤ Dτ , ρ 8τ2 √ Dτ , ρ · 48τρ ≤ Dτ , ρ τ ρ ( 104 ) and the last inequality holds since Dτ , ρ ≤ τ . Tidy up the expression gives 1 N K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 ≤ τ−2∑ s=0 3Dτ , ρρ 2 ( 4η2Dτ , ρ ( α 2‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2Dτ , ρ̄2L + η2σ2 ) + τ−2∑ s=0 2Dτ , ρρ √ Dτ , ρτ−1 ( 12τη 2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 1 n σ2 ) ≤ C2 τ−2∑ s=0 ( D2τ , ρρ 2 + ( Dτ , ρ ) 1.5τ−0.5ρ ) η2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C2 ( Dτ , ρ ) 2τρ2η2̄2L + C2τDτ , ρρ 2η2σ2 + C2τ · ( Dτ , ρ ) 1.5τ−0.5ρη2 1 n σ2 ≤ 2C2 τ−2∑ s=0 D2τ , ρρη 2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C2 ( Dτ , ρ ) 2τρ2η2̄2L + C2 ( 1 n + ρ ) ρτDτ , ρη 2σ2 ( 105 ) for some C2 > 0 . The last inequality holds since ( Dτ , ρ ) 1.5τ−0.5 ≤ Dτ , ρ . ( 106 ) C.3 PROOF OF PROPOSITION 4 We prove ( 47 ) by splitting the terms A2,1 follows : A2,1 ( a ) =E ∥∥∥∥∥∥ 1Np K∑ k=1 ∑ i∈Vk I ( i ∈ Srk ) ( ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − η∇fj ( x r , τ−1 j ) − x̄ r , τ−1 k ) ∥∥∥∥∥∥ 2 ≤2E ∥∥∥∥∥ 1Np K∑ k=1 p · nη∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2E ∥∥∥ 1 Np K∑ k=1 ∑ i∈Vk I ( i ∈ Srk ) rik ∥∥∥2 , ( 107 ) where rik , ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − x̄ r , τ−1 k − η ( ∇fj ( x r , τ−1 j ) −∇f̄k ( x̄ r , τ−1 k ) ) . ( 108 ) Equality ( a ) holds since K∑ k=1 ∑ i∈Srk ∑ j∈Vk ( Wk ) i , j x̄ r , τ−1 k = K∑ k=1 ∑ i∈Srk x̄r , τ−1k = K∑ k=1 m · x̄r , τ−1k = K∑ k=1 p ∑ i∈Vk xr , τ−1i = Npx̄ r , τ−1 , ( 109 ) and similarly , ∑ i∈Srk ∑ j∈Vk ( Wk ) i , j∇f̄k ( x̄r , τ−1k ) = np∇f̄k ( x̄ r , τ−1 k ) . ( 110 ) Since samples are taken according to the rule specified by Assumption 6 , the following probabilities hold : P ( i ∈ Srk | i ∈ Vk ) = p , P ( i , j ∈ Srk | , i , j ∈ Vk ) = p · np− 1 n− 1 , ( 111 ) P ( i ∈ Srk , j ∈ Sr ` | i ∈ Vk , j ∈ V ` , k 6= ` ) = p2 . ( 112 ) Consequently , we can evaluate the second term in ( 107 ) and obtain A2,1 =2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 E p K∑ k=1 ∑ i∈Vk ‖rik‖2 + p · np− 1 n− 1 K∑ k=1 ∑ i , j∈Vk r > ikrjk + 2 ( Np ) 2 · p2 ∑ k 6= ` ∑ i∈Vk ∑ j∈V ` E ( r > ikrj ` ) =2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 E ( p · np− 1 n− 1 ∥∥∥ K∑ k=1 ∑ i∈Vk rik ∥∥∥2 + p ( 1− p ) n n− 1 K∑ k=1 ∑ i∈Vk ‖rik‖2 ) + 2 ( Np ) 2 p ( 1− p ) n− 1 E ∑ k 6= ` ∑ i∈Vk ∑ j∈V ` r > ikrj ` ≤2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 E ( p · np− 1 n− 1 ∥∥∥ K∑ k=1 ∑ i∈Vk rik ∥∥∥2 + p ( 1− p ) n n− 1 K∑ k=1 ∑ i∈Vk ‖rik‖2 ) + 2 ( Np ) 2 p ( 1− p ) n− 1 E ∑ k 6= ` ∑ i∈Vk ∑ j∈V ` 1 2 ‖rik‖2 + 1 2 ‖rj ` ‖2 ≤2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 E ( p · np− 1 n− 1 ∥∥∥ K∑ k=1 ∑ i∈Vk rik ∥∥∥2 + p ( 1− p ) n n− 1 K∑ k=1 ∑ i∈Vk ‖rik‖2 ) + 2 ( Np ) 2 p ( 1− p ) n− 1 ( K − 1 ) n K∑ k=1 ∑ i∈Vk E‖rik‖2 . ( 113 ) By substituting the expression of rik we can bound terms ‖ ∑K k=1 ∑ i∈Vk rik‖ 2 and∑K k=1 ∑ i∈Vk ‖rik‖ 2 as ∥∥∥ K∑ k=1 ∑ i∈Vk rik ∥∥∥2 = ∥∥∥ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − x̄ r , τ−1 k − η ( ∇fj ( x r , τ−1 j ) −∇f̄k ( x̄ r , τ−1 k ) ) ∥∥∥2 = η2 ∥∥∥∥∥∥ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , j ( ∇fj ( xr , τ−1j ) −∇f̄k ( x̄ r , τ−1 k ) ) ∥∥∥∥∥∥ 2 = η2 ∥∥∥∥∥∥ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , j ( ∇fj ( xr , τ−1j ) −∇fj ( x̄ r , τ−1 k ) ) ∥∥∥∥∥∥ 2 ≤ η2N K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , jL 2‖xr , τ−1j − x̄ r , τ−1 k ‖ 2 ≤ η2N K∑ k=1 ∑ i∈Vk L2‖xr , τ−1i − x̄ r , τ−1 k ‖ 2 = η2 ·NL2 K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 ( 114 ) and K∑ k=1 ∑ i∈Vk ‖rik‖2 = K∑ k=1 ∑ i∈Vk ∥∥∥∥∥∥ ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − x̄ r , τ−1 k − η ( ∇fj ( x r , τ−1 j ) −∇f̄k ( x̄ r , τ−1 k ) ) ∥∥∥∥∥∥ 2 ≤ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , j ∥∥∥xr , τ−1j − x̄r , τ−1k − η ( ∇fj ( xr , τ−1j ) −∇fj ( x̄r , τ−1k ) ) ∥∥∥2 ≤ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , j ( 2 ∥∥∥xr , τ−1j − x̄r , τ−1k ∥∥∥2 + 2η2 ∥∥∥∇fj ( xr , τ−1j ) −∇fj ( x̄r , τ−1k ) ∥∥∥2 ) ≤ K∑ k=1 ∑ i∈Vk 2 ∥∥∥xr , τ−1i − x̄r , τ−1k ∥∥∥2 + 2η2L2 K∑ k=1 ∑ i∈Vk ‖xr , τ−1i − x̄ r , τ−1 k ‖ 2 = K∑ k=1 2 ( 1 + η2L2 ) ‖Xr , τ−1k , ⊥ ‖ 2 . ( 115 ) Tidy up the expression leads to the following bound of A2,1 : A2,1 ≤2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 ( p · np− 1 n− 1 E ∥∥∥ K∑ k=1 ∑ i∈Vk rik ∥∥∥2 ) + 2 ( Np ) 2 p ( 1− p ) N n− 1 K∑ k=1 ∑ i∈Vk E‖rik‖2 ≤2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 ( p · np− 1 n− 1 η2 ·NL2 K∑ k=1 E‖Xr , τ−1k , ⊥ ‖ 2 ) + 2 ( Np ) 2 p ( 1− p ) N n− 1 ( K∑ k=1 2 ( 1 + η2L2 ) E‖Xr , τ−1k , ⊥ ‖ 2 ) ≤2η2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 N η2L2 K∑ k=1 E‖Xr , τ−1k , ⊥ ‖ 2 + 4 N 1− p p ( n− 1 ) ( K∑ k=1 ( 1 + η2L2 ) E‖Xr , τ−1k , ⊥ ‖ 2 ) ≤2η2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 8 N ( 1− p p ( n− 1 ) + 1 τ2 ) ( K∑ k=1 E‖Xr , τ−1k , ⊥ ‖ 2 ) , ( 116 ) where the last inequality holds under the learning rate condition η2 ≤ 1 24τ ( 4τ − 1 ) L2 . ( 117 ) This completes the proof of ( 47 ) . C.4 PROOF OF PROPOSITION 5 We bound A2,2 in following the same rationale as Proposition 4 . A2,2 =E ∥∥∥ 1 Np K∑ k=1 ∑ i∈Vk I ( i ∈ Srk ) ( ∑ j∈Vk ( Wk ) i , j ( ∇fj ( xr , sj ) − g r , s j ) ) ︸ ︷︷ ︸ eik ∥∥∥2 = 1 ( Np ) 2 ( p · np− 1 n− 1 E ∥∥∥ K∑ k=1 ∑ i∈Vk eik ∥∥∥2 + p ( 1− p ) n n− 1 K∑ k=1 ∑ i∈Vk E‖eik‖2 ) + 2 ( Np ) 2 p ( 1− p ) n− 1 E ∑ k 6= ` ∑ i∈Vk ∑ j∈V ` e > ikej ` = 1 ( Np ) 2 ( p · np− 1 n− 1 E ∥∥∥ K∑ k=1 ∑ i∈Vk eik ∥∥∥2 + p ( 1− p ) n n− 1 K∑ k=1 ∑ i∈Vk E‖eik‖2 ) , ( 118 ) where the last equality is due to fact that the inter-cluster stochastic noise is zero mean and independent . Recall the definition ξr , si , g r , s i −∇fi ( x r , s i ) . Using again the independence of the ξi ’ s we get E ∥∥∥ K∑ k=1 ∑ i∈Vk eik ∥∥∥2 = E∥∥∥ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , jξ r , s j ∥∥∥2 = E∥∥∥ N∑ i=1 ξr , si ∥∥∥2 = Nσ2 , ( 119 ) and K∑ k=1 ∑ i∈Vk E‖eik‖2 = K∑ k=1 ∑ i∈Vk E ∥∥∥ ∑ j∈Vk ( Wk ) i , jξ r , s j ∥∥∥2 = K∑ k=1 ‖Wk‖2σ2 = K∑ k=1 σ2 n∑ j=1 d2j ≤ K∑ k=1 σ2 ( 1 + ( n− 1 ) ρ2k ) ≤ Kσ2 + ( n− 1 ) Kρ2maxσ2 = ( 1 + ( n− 1 ) ρ2max ) Kσ2 . ( 120 ) where d1 ≤ d2 ≤ · · · ≤ dn = 1 are the singular values of Wk . Therefore , A2,2 ≤ 1 ( Np ) 2 ( p · np− 1 n− 1 ·Nσ2 + p ( 1− p ) n n− 1 ( 1 + ( n− 1 ) ρ2max ) Kσ2 ) = 1 Np ( np− 1 n− 1 σ2 ) + 1 Np ( 1− p n− 1 ( 1 + ( n− 1 ) ρ2max ) σ2 ) ≤ σ 2 N + σ2 N p−1 − 1 n− 1 ( 1 + ( n− 1 ) ρ2max ) ≤ σ 2 N ( 2 + p−1ρ2max ) . ( 121 ) The last inequality is due to p ≥ 1/n . C.5 PROOF OF PROPOSITION 6 Invoking the descent inequality Lemma 1 and the error bound for T1-T5 given by Corollary 2 , Proposition 3 and Eq . ( 41 ) : Ef ( xr+1 ) ≤Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + C1L 2η3τ ( τ + ρ2maxDτ , ρ ) τ−1∑ s=0 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C1L2η3τ2ρ2maxDτ , ρ̄2L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n + η2L 2 τ−1∑ s=0 E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + η2L 2 τ σ2 N ≤Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 + C1L 2η3τ ( τ + ρ2maxDτ , ρ ) τ−1∑ s=0 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + C1L2η3τ2ρ2maxDτ , ρ̄2L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n + η2Lτ σ2 N . ( 122 ) The last inequality holds under the condition that η ≤ 1 2L . ( 123 ) If we further enforce C1L 2η3τ ( τ + ρ2maxDτ , ρ ) α2 ≤ η 8 ⇔ η2 ≤ 1 8C1L2τ ( τ + ρ2maxDτ , ρ ) α 2 , ( 124 ) then Ef ( xr+1 ) ≤Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 + C1L 2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + C1L 2η3τ2ρ2maxDτ , ρ̄ 2 L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n + η2Lτ σ2 N =Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 + C1L2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + C1L 2η3 ( τ2ρ2max ( Dτ , ρ̄ 2 L + σ 2 ) + ( τ2 +D2τ , ρρ 2 max ) σ2 n ) + η2Lτ σ2 N ≤Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 + η2Lτ σ 2 N + C1L 2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + 2C1L 2η3 ( τ2ρ2maxDτ , ρ̄ 2 L + τ 2σ2 ( 1 n + ρ2max ) ) , ( 125 ) the last inequality is due to Dτ , ρ ≤ τ and ρmax ≤ 1 . C.6 PROOF OF PROPOSITION 7 Invoking the descent inequality Lemma 1 and the error bound for T1-T5 given by Corollary 2 , Proposition 3 , and 4 : Ef ( xr+1 ) ≤ Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + τ−2∑ s=0 E ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) + E ( L 2 ‖xr+1 − x̄r , τ−1‖2 ) ≤Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + C1L 2η3τ ( τ + ρ2maxDτ , ρ ) τ−1∑ s=0 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C1L2η3τ2ρ2maxDτ , ρ̄2L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n + L 2 η2 τ−2∑ s=0 E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + L 2 η2 ( τ − 1 ) σ 2 N + Lη2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + L 2 ( Gp + 1 τ2 ) ( 8 N K∑ k=1 E‖Xr , τ−1k , ⊥ ‖ 2 ) + L 2 η2 σ2 N ( 2 + n m ρ2max ) . ( 126 ) Denote for short G′p , Gp + 1 τ2 . ( 127 ) Further applying the bounds on the consensus error derived in Proposition 2 : Ef ( xr+1 ) ≤Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + C1L 2η3τ ( τ + ρ2maxDτ , ρ ) τ−1∑ s=0 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C1L2η3τ2ρ2maxDτ , ρ̄2L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n + L 2 η2 τ−2∑ s=0 E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + L 2 η2 ( τ − 1 ) σ 2 N + Lη2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 4LG′p ( 2C2 τ−2∑ s=0 D2τ , ρρmaxη 2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) ) + 4LG′p ( C2D 2 τ , ρτρ 2 maxη 2̄2L + C2 ( 1 n + ρmax ) ρmaxτDτ , ρη 2σ2 ) + L 2 η2 σ2 N ( 2 + n m ρ2max ) ( 128 ) Rearranging terms and tidy up the expression we have Ef ( xr+1 ) ≤Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + L 2 η2 τ−2∑ s=0 E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + Lη2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + C1L 2η3τ ( τ + ρ2maxDτ , ρ ) τ−1∑ s=0 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) ( 129 ) + 8C2G ′ pLD 2 τ , ρρmaxη 2 ( τ−2∑ s=0 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) ) + C1L 2η3 ( τ2Dτ , ρρ 2 max̄ 2 L + τ 2ρ2maxσ 2 + ( τ2 +D2τ , ρρ 2 max ) σ2 n ) + L 2 ( τ − 1 ) η2σ 2 N + L 2 ( 2 + n m ρ2max ) η2 σ2 N + 4C2LG ′ pη 2 ( D2τ , ρτρ 2 max̄ 2 L + ( 1 n + ρmax ) ρmaxτDτ , ρσ 2 ) . Notice that if the following conditions on the learning rate are satisfied η 4 ≥ η2L , η 8 ≥ C1L2η3τ ( τ + ρ2maxDτ , ρ ) α2 + 8C2G ′ pLD 2 τ , ρρmaxη 2α2 , ( 130 ) then the terms associated to the gradients will be negative and Ef ( xr+1 ) ≤Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 + C1L 2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + 2C1L 2η3 ( τ2ρ2maxDτ , ρ̄ 2 L + τ 2σ2 ( 1 n + ρ2max ) ) + Lτη2 σ2 N + ( 8C2G ′ pLD 2 τ , ρτρmax ) η2 2g + 4C2LG ′ pη 2 ( D2τ , ρτρ 2 max̄ 2 L + ( 1 n + ρmax ) ρmaxτDτ , ρσ 2 ) + L 2 ( n m ρ2max ) η2 σ2 N . In the last step we clean the condition on the learning rate η . Collecting all the conditions on η : η2 ≤ 1 24L2τ ( 4τ − 1 ) , ( 131 ) η 4 ≥ η2L , ( 132 ) η 8 ≥ C1L2η3τ ( τ + ρ2maxDτ , ρ ) α2 + 8C2G ′ pLD 2 τ , ρρmaxη 2α2 . ( 133 ) Clearly , ( 131 ) implies ( 132 ) . To ensure ( 133 ) it suffices to require η 16 ≥ C1L2η3τ ( τ + ρ2maxDτ , ρ ) α2 η 16 ≥ 8C2G′pLD2τ , ρρmaxη2α2 . ( 134 ) Recall the definition of G′p : G′p = Gp + 1 τ2 , and Gp = n−m m ( n− 1 ) . ( 135 ) It can be verified that G′p ≤ Gp + 1 τ2 ≤ 1 m + 1 ≤ 2 . ( 136 ) Using the fact that Dτ , ρ ≤ τ and ρmax ≤ 1 we can see that it suffices to require η ≤ 1 C3α2τL . ( 137 ) for some C3 > 0 large enough to satisfy both ( 131 ) and ( 133 ) . D SUPPORTING LEMMAS D.1 PROOF OF LEMMA 1 Since the global average of the local copies follows the update [ cf . ( 19 ) ] : x̄r , s+1 = x̄r , s − η 1 N N∑ i=1 gr , si , ∀s = 0 , . . . , τ − 1 . ( 138 ) Under Assumption 1 , we can apply the descent lemma at points x̄r , s+1 and x̄r , s for s = 0 , . . . , τ−2 , conditioned on Fr , s−1 : Er , s−1f ( x̄r , s+1 ) ≤ f ( x̄r , s ) +∇f ( x̄r , s ) > Er , s−1 ( x̄r , s+1 − x̄r , s ) + Er , s−1 ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) ( a ) =f ( x̄r , s ) − η∇f ( x̄r , s ) > ( 1 N N∑ i=1 ∇fi ( xr , si ) ) + Er , s−1 ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) =f ( x̄r , s ) − 1 2 η∇f ( x̄r , s ) > ( 1 N N∑ i=1 ∇fi ( xr , si ) ) − 1 2 η∇f ( x̄r , s ) > ( 1 N N∑ i=1 ∇fi ( xr , si ) ± 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ) + Er , s−1 ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) ( b ) ≤f ( x̄r , s ) − η 2 ( 1 2 ‖∇f ( x̄r , s ) ‖2 + 1 2 ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − 1 2 ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 ) − η 2 ( 1 2 ‖∇f ( x̄r , s ) ‖2 + 1 2 ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 − 1 2 ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 ) + η 2 ‖∇f ( x̄r , s ) ‖ ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥ + Er , s−1 ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) ( c ) ≤f ( x̄r , s ) − η 4 ‖∇f ( x̄r , s ) ‖2 − η 4 ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 + η 4 ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + Er , s−1 ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) , where ( a ) is due to Assumption 2 , ( b ) is due to 2ab = ‖a‖2 + ‖b‖2 − ‖a − b‖2 and ab ≤ ‖a‖‖b‖ , and ( c ) is due to ‖a‖‖b‖ ≤ 12‖a‖ 2 + 12‖b‖ 2 . Notation a ± b stands for adding and subtracting , i.e. , a± b = a+ b− b . For the pair ( x̄r , τ−1 , xr+1 ) we have according to ( 19 ) and ( 22 ) : Er , τ−2xr+1 = Er , τ−2 ( x̄r , τ ) = Er , τ−2 ( x̄r , τ−1 − η 1 N N∑ i=1 gr , τ−1i ) . Applying the descent lemma in the same way as before yields Er , τ−2f ( xr+1 ) ≤f ( x̄r , τ−1 ) +∇f ( x̄r , τ−1 ) > Er , τ−2 ( xr+1 − x̄r , τ−1 ) + L 2 Er , τ−2‖xr+1 − x̄r , τ−1‖2 ≤f ( x̄r , τ−1 ) − η 4 ‖∇f ( x̄r , τ−1 ) ‖2 − η 4 ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , τ−1i ) ∥∥∥2 − η 4 ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥2 + η 4 ∥∥∥∇f ( x̄r , τ−1 ) − 1 N N∑ i=1 ∇fi ( xr , τ−1i ) ∥∥∥2 + η 4 ∥∥∥∇f ( x̄r , τ−1 ) − 1 K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥2 + η 4 ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , τ−1i ) − 1 K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥2 + Er , τ−2 ( L 2 ‖xr+1 − x̄r , τ−1‖2 ) . Taking expectation , summing over the iterations in round r over s = 0 , . . . , τ − 1 and using the fact that xr = x̄r,0 completes the proof . D.2 PROOF OF LEMMA 2 Recall the average update of the k-th cluster and that of the global average given by ( 15 ) and ( 19 ) , respectively , for s = 0 , . . . , τ − 1 : x̄r , s+1k = x̄ r , s k − η · ḡ r , s k ( 139 ) x̄r , s+1 = x̄r , s − η · 1 N N∑ i=1 gr , si . ( 140 ) Taking the difference gives E‖x̄r , s+1 − x̄r , s+1k ‖ 2 =E ∥∥∥∥∥ ( x̄r , s − x̄r , sk ) − η ( 1 n ∑ i∈Vk ∇fi ( xr , si ) − 1 N N∑ i=1 ∇fi ( xr , si ) ) ∥∥∥∥∥ 2 + η2E ∥∥∥∥∥ 1n ∑ i∈Vk ξr , si − 1 N N∑ i=1 ξr , si ∥∥∥∥∥ 2 ≤ ( 1 + ) E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2E ∥∥∥∥∥ 1n ∑ i∈Vk ∇fi ( xr , si ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + η2E ∥∥∥∥∥ 1n ∑ i∈Vk ξr , si − 1 N N∑ i=1 ξr , si ∥∥∥∥∥ 2 , ( 141 ) where > 0 is some constant to be chosen . Averaging over k = 1 , . . . , K : 1 K K∑ k=1 E‖x̄r , s+1 − x̄r , s+1k ‖ 2 ≤ ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 1 K K∑ k=1 E ∥∥∥∥∥ 1n ∑ i∈Vk ∇fi ( xr , si ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + η2 1 K K∑ k=1 E ∥∥∥∥∥ 1n ∑ i∈Vk ξr , si − 1 N N∑ i=1 ξr , si ∥∥∥∥∥ 2 ( a ) = ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 1 K K∑ k=1 E ∥∥∥ 1 n ∑ i∈Vk ∇fi ( xr , si ) ∥∥∥2 − E∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 ) + η2 ( 1 K K∑ k=1 E ∥∥∥ 1 n ∑ i∈Vk ξr , si ∥∥∥2 − E∥∥∥ 1 N N∑ i=1 ξr , si ∥∥∥2 ) ≤ ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 1 K K∑ k=1 E ∥∥∥ 1 n ∑ i∈Vk ∇fi ( xr , si ) ∥∥∥2 ) + η2K − 1 N σ2 = ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 1 K K∑ k=1 E ∥∥∥ 1 n ∑ i∈Vk ( ∇fi ( xr , si ) ±∇f̄k ( x̄ r , s k ) ±∇f̄k ( x̄ r , s ) ) ∥∥∥2 ) + η2K − 1 N σ2 ≤ ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 3 K K∑ k=1 E ∥∥∥ 1 n ∑ i∈Vk ( ∇fi ( xr , si ) −∇f̄k ( x̄ r , s k ) ) ∥∥∥2 ) + ( 1 + −1 ) η2 3 K K∑ k=1 E ∥∥∥∇f̄k ( x̄r , sk ) −∇f̄k ( x̄r , s ) ∥∥∥2 + ( 1 + −1 ) η2 3K K∑ k=1 E‖∇f̄k ( x̄r , s ) ‖2 + η2 K − 1 N σ2 ( b ) ≤ ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 3 N K∑ K=1 L2E ∥∥∥Xr , sk , ⊥∥∥∥2 ) + ( 1 + −1 ) η2 3 K K∑ k=1 L2E ∥∥∥x̄r , sk − x̄r , s∥∥∥2 + ( 1 + −1 ) η2 3K K∑ k=1 E ∥∥∥∇f̄k ( x̄r , s ) ∥∥∥2 + η2K − 1 N σ2 = ( 1 + + 3L2η2 ( 1 + −1 ) ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 3 N K∑ K=1 L2E ∥∥∥Xr , sk , ⊥∥∥∥2 ) + ( 1 + −1 ) η2 3 K K∑ k=1 E ∥∥∥∇f̄k ( x̄r , s ) ∥∥∥2 + η2K − 1 N σ2 . ( 142 ) In ( a ) we used the fact that 1 K K∑ k=1 1 n ∑ i∈Vk ∇fi ( xr , si ) = 1 N N∑ i=1 ∇fi ( xr , si ) , 1 K K∑ k=1 1 n ∑ i∈Vk ξr , si = 1 N N∑ i=1 ξr , si . ( 143 ) and K∑ i=1 ‖xi − x̄‖2 = K∑ i=1 ‖xi‖2 −K‖x̄‖2 with x̄ = 1 K K∑ k=1 xi . ( 144 ) In ( b ) we applied the L-smoothness of fi and f̄k . Choosing = 14τ−1 and using the condition that η2 ≤ 1 24τ ( 4τ − 1 ) L2 we have 1 K K∑ k=1 E‖x̄r , s+1 − x̄r , s+1k ‖ 2 ≤ ( 1 + 1 4τ − 1 + 1 2 ( 4τ − 1 ) ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + 12τη2L2 ( 1 N K∑ K=1 E ∥∥∥Xr , sk , ⊥∥∥∥2 ) + 12τη2 1 K K∑ k=1 E ∥∥∥∇f̄k ( x̄r , s ) ∥∥∥2 + η2K − 1 N σ2 ≤Cτ 1 K K∑ k=1 E‖x̄r , s+1 − x̄r , s+1k ‖ 2 + 12τη2L2 ( 1 N K∑ K=1 E ∥∥∥Xr , sk , ⊥∥∥∥2 ) + 12τη2 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 K − 1 N σ2 . In the last inequality we applied Assumption 5 on the inter-cluster heterogeneity . D.3 PROOF OF LEMMA 3 We follow the perturbed average consensus analysis . Recall the update equation of the consensus error given in ( 17 ) : Xr , s+1k , ⊥ = ( Wk − J ) ( X r , s k , ⊥ − ηG r , s k ) . ( 145 ) Squaring both sides and conditioning : E‖Xr , s+1k , ⊥ ‖ 2 = E ( E ( ‖ ( Wk − J ) ( Xr , sk , ⊥ ± η∇Fk ( X r , s k ) − ηG r , s k ) ‖ 2|Fr , s−1 ) ) ≤ E‖ ( Wk − J ) ( Xr , sk , ⊥ − η∇Fk ( X r , s k ) ) ‖ 2 + η2ρ2knσ 2 ≤ ρ2k ( 1 + ζ−1k ) · E‖X r , s k , ⊥‖ 2 + ρ2k ( 1 + ζk ) η 2E‖∇Fk ( Xr , sk ) ‖ 2 + η2ρ2knσ 2 , where ζk > 0 is some free parameter to be properly chosen . Next , we bound the norm of the pseudo-gradient ∇Fk ( Xr , sk ) . ‖∇Fk ( Xr , sk ) ‖ 2 = ∑ i∈Vk ‖∇fi ( xr , si ) ‖ 2 = ∑ i∈Vk ‖∇fi ( xr , si ) ±∇fi ( x̄ r , s k ) ±∇f̄k ( x̄ r , s k ) ±∇f̄k ( x̄ r , s ) ‖2 ≤ ∑ i∈Vk ( 4‖∇fi ( xr , si ) −∇fi ( x̄ r , s k ) ‖ 2 + 4‖∇fi ( x̄r , sk ) −∇f̄k ( x̄ r , s k ) ‖ 2 + 4‖∇f̄k ( x̄r , sk ) −∇f̄k ( x̄ r , s ) ‖2 ) + ∑ i∈Vk 4‖∇f̄k ( x̄r , s ) ‖2 ( 146 ) ≤ ∑ i∈Vk ( 4‖∇fi ( x̄r , sk ) −∇f̄k ( x̄ r , s k ) ‖ 2 + 4L2‖xr , si − x̄ r , s k ‖ 2 + 4L2‖x̄r , sk − x̄ r , s‖2 + 4‖∇f̄k ( x̄r , s ) ‖2 ) ≤ 4L2‖Xr , sk , ⊥‖ 2 + 4L2n‖x̄r , sk − x̄ r , s‖2 + 4n‖∇f̄k ( x̄r , s ) ‖2 + 4n 2k . The last inequality is due to Assumption 4 on the intra-cluster heterogeneity . Averaging over k = 1 , . . . , K clusters : 1 N K∑ k=1 E‖Xr , s+1k , ⊥ ‖ 2 ≤ 1 N K∑ k=1 ρ2k ( 1 + ζ −1 k ) E‖X r , s k , ⊥‖ 2 + 1 N K∑ k=1 ρ2k ( 1 + ζk ) η 2E‖∇Fk ( Xr , sk ) ‖ 2 + η2 ( 1 K K∑ k=1 ρ2k ) σ2 ≤ 1 N K∑ k=1 ρ2k ( 1 + ζ −1 k ) E‖X r , s k , ⊥‖ 2 + η2 1 N K∑ k=1 ρ2k ( 1 + ζk ) · 4L2E‖X r , s k , ⊥‖ 2 + η2 1 K K∑ k=1 ρ2k ( 1 + ζk ) 4L 2E‖x̄r , sk − x̄ r , s‖2 + η2 1 K K∑ k=1 ρ2k ( 1 + ζk ) 4E‖∇f̄k ( x̄r , s ) ‖2 + η2 1 K K∑ k=1 ρ2k ( 1 + ζk ) 4 2 k + η 2ρ2maxσ 2 ( 147 ) ≤ ( max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + η 2 · 4L2 max k∈ [ K ] { ρ2k ( 1 + ζk ) } ︸ ︷︷ ︸ ρL ) 1 N K∑ k=1 E‖Xr , sk , ⊥‖ 2 + η2 max k∈ [ K ] { ρ2k ( 1 + ζk ) } · 4L2 1 K K∑ k=1 E‖x̄r , sk − x̄ r , s‖2 + η2 max k∈ [ K ] { ρ2k ( 1 + ζk ) } · 4 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 1 K K∑ k=1 ρ2k ( 1 + ζk ) 4 2 k + η 2ρ2maxσ 2 . D.4 PROOF OF LEMMA 4 To simplify the notation we omit the superscript in Br , s− ` in this section . Let Λ = diag ( λ1 , λ2 ) and the eigendecomposition of G = TΛT−1 , we can obtain the closed form expression of T as T = ( λ1 − Cτ λ2 − Cτ 12τη2L2 12τη2L2 ) and T−1 = 1 det ( T ) ( 12τη2L2 −λ2 + Cτ −12τη2L2 λ1 − Cτ ) , where det ( T ) = 12τη2L2 ( λ1 − λ2 ) . ( 148 ) Consequently det ( T ) ·G ` B = det ( T ) · TΛ ` T−1B = ( λ1 − Cτ λ2 − Cτ 12τη2L2 12τη2L2 ) ( λ ` 1 0 0 λ ` 2 ) ( 12τη2L2 −λ2 + Cτ −12τη2L2 λ1 − Cτ ) ( b1 b2 ) = ( λ1 − Cτ λ2 − Cτ 12τη2L2 12τη2L2 ) ( λ ` 1 0 0 λ ` 2 ) ( 12τη2L2b1 + ( −λ2 + Cτ ) b2 −12τη2L2b1 + ( λ1 − Cτ ) b2 ) = ( λ1 − Cτ λ2 − Cτ 12τη2L2 12τη2L2 ) ( λ ` 112τη 2L2b1 + λ ` 1 ( −λ2 + Cτ ) b2 −λ ` 212τη2L2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) = ( t1 t2 ) ( 149 ) with t1 = ( λ1 − Cτ ) ( λ ` 112τη 2L2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + ( λ2 − Cτ ) ( −λ ` 212τη2L2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) , ( 150 ) t2 = 12τη 2L2 ( λ ` 112τη 2L2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + 12τη2L2 ( −λ ` 212τη2L2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) . ( 151 ) Therefore det ( T ) ( 1 , 1 ) TΛ ` T−1B = t1 + t2 = ( λ1 − Cτ ) ( λ ` 1L 212τη2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + ( λ2 − Cτ ) ( −λ ` 2L212τη2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) + L212τη2 ( λ ` 1L 212τη2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + L212τη2 ( −λ ` 2L212τη2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) . ( 152 ) Substituting the expression of det ( T ) and dividing both sides of the equality by 12τη2 ( λ1−λ2 ) we have L2 ( 1 , 1 ) TΛ ` T−1B = 1 12τη2 ( λ1 − λ2 ) ( λ1 − Cτ ) ( λ ` 1L 212τη2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + 1 12τη2 ( λ1 − λ2 ) ( λ2 − Cτ ) ( −λ ` 2L212τη2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) + 1 ( λ1 − λ2 ) L2 ( λ ` 1L 212τη2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + 1 ( λ1 − λ2 ) L2 ( −λ ` 2L212τη2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) = 1 ( λ1 − λ2 ) ( λ1 − Cτ ) λ ` 1L2b1 + −1 ( λ1 − λ2 ) ( λ2 − Cτ ) λ ` 2L2b1 + 1 ( λ1 − λ2 ) L4λ ` 112τη 2b1 − 1 ( λ1 − λ2 ) L4λ ` 212τη 2b1 + 1 12τη2 ( λ1 − λ2 ) ( λ1 − Cτ ) λ ` 1 ( −λ2 + Cτ ) b2 + 1 12τη2 ( λ1 − λ2 ) ( λ2 − Cτ ) λ ` 2 ( λ1 − Cτ ) b2 + 1 ( λ1 − λ2 ) L2λ ` 1 ( −λ2 + Cτ ) b2 + 1 ( λ1 − λ2 ) L2λ ` 2 ( λ1 − Cτ ) b2 = 1 ( λ1 − λ2 ) ( −λ ` 2 ( λ2 − Cτ ) − λ ` 1 ( Cτ − λ1 ) ) L2b1 + 1 ( λ1 − λ2 ) 12τη2 ( λ ` 1 − λ ` 2 ) L4b1 + 1 12τη2 ( λ1 − λ2 ) ( λ1 − Cτ ) λ ` 1 ( −λ2 + Cτ ) b2 + 1 12τη2 ( λ1 − λ2 ) ( λ2 − Cτ ) λ ` 2 ( λ1 − Cτ ) b2 + 1 ( λ1 − λ2 ) L2λ ` 1 ( −λ2 + Cτ ) b2 + 1 ( λ1 − λ2 ) L2λ ` 2 ( λ1 − Cτ ) b2 ≤λ ` 2L2b1 + λ ` 2 − λ ` 1 λ2 − λ1 · 12τη2L4b1 + λ ` 2 − λ ` 1 λ2 − λ1 ( λ2 − Cτ ) ( Cτ − λ1 ) 1 12τη2 b2 + λ ` 2L 2b2 , ( 153 ) where in the last inequality we used the fact that λ1 ≤ Cτ ≤ λ2 . Note that ( λ2 − Cτ ) ( Cτ − λ1 ) =− C2τ − λ1λ2 + ( λ1 + λ2 ) Cτ =− C2τ − det ( G ) + Tr ( G ) Cτ =− C2τ − ( Cτ ( max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + η 2ρL · 4L2 ) − 48ρLτη4L4 ) + Cτ ( max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + η 2ρL · 4L2 + Cτ ) = 48ρLτη 4L4 . ( 154 ) Therefore , we further obtain L2 ( 1 , 1 ) TΛ ` T−1B ≤λ ` 2L2 ( b1 + b2 ) + λ ` 2 − λ ` 1 λ2 − λ1 η2 · ( 12τL4b1 + 4ρLL 4b2 ) ( 155 ) Dividing both sides by L2 completes the proof . E NETWORK CONNECTIVITY CONDITIONS IN THEOREMS AND COROLLARY Both Theorem 2 and Corollary 1 impose some sufficient conditions on the network connectivity ρmax for convergence . This can be satisfied in practice as follows . For Theorem 2 , as long as ρmax < 1 , we can choose τ large enough so that ( 7 ) is fulfilled . Corollary 1 strengthens the result of Theorem 2 by requiring no loss in the order of convergence rate compared to full device participation . This naturally leads to a more stringent condition on ρmax given by ( 11 ) . For any given D2D network topology , this can be satisfied by running multiple D2D gossip averaging steps per SGD update in Algorithm 1 . Since the right hand side of ( 11 ) depends only on the algorithmic parameters , we can choose the suitable gossip averaging steps to fulfill this condition before launching the algorithm . F MORE EXPERIMENTS DETAILS In this section , we provide additional experimental results on CIFAR-10 dataset . We follow the same CNN model and non-iid data partition strategy as before and run each experiments for 3 times with different random seeds to report the mean values of best test accuracy . Instead of using a constant learning rate , we decay the local learning rate η by half after finishing 50 % and 75 % of the communication rounds and tune the initial learning rate from { 0.01 , 0.02 , 0.05 , 0.08 , 0.1 } for each algorithm . First , we evaluate the convergence processes of HL-SGD and local SGD under varying D2D network topologies in Figure 4 . We generate random network topologies by Erdős-Rényi model with edge probability from { 0.2 , 0 , 5 , 0.8 , 1 } and use Metropolis-Hastings weights to setWk , corresponding to spectral norm ρmax = { 0.9394 , 0.844 , 0.5357 , 0 } . As observed in Figure 4a , a more connected D2D network topology ( i.e. , a smaller value of ρmax ) generally accelerates the convergence and leads to a higher model accuracy achieved over 100 communication rounds in HL-SGD . However , in terms of runtime , a more connected D2D network topology corresponds to a larger D2D communication delay cd2d per round , and hence the total runtime is larger as well , which can be clearly observed in Figure 4b . Therefore , to achieve a target level of model accuracy within the shortest time in HLSGD , a sparse D2D network topology could work better than the fully connected one in practice . Second , to give a more comprehensive analysis on the runtime benefits of HL-SGD , we vary τ from { 5 , 10 , 20 , 50 } and compare the performances of HL-SGD and local SGD in Figure 5 . From the figure , we can observe that HL-SGD can consistently outperform local SGD across a wide range of τ . In particular , on CIFAR-10 , the best accuracy of HL-SGD achieved over 100 rounds is 2.49 % , 3.99 % , 4.05 % , and 7 % higher than that of local SGD , respectively , as τ increases from 5 to 50 . At the same time , the runtime of HL-SGD needed to achieve a target test-set accuracy of 60 % is 9.66 % , 19.76 % , 33.46 % , and 45.88 % less than that of local SGD , respectively . Third , we consider an extension of HL-SGD by allowing each device to perform multiple SGD updates before the gossip averaging step in Algorithm 1 and empirically evaluate its performance . Specifically , each device performs l = { 1 , 5 , 10 } steps of SGD update before aggregating models with their neighbors in the same cluster . Note that l = 1 corresponds to the original version of HLSGD in Algorithm 1 . As observed in Figure 6a , when communicating and aggregating models with neighbors more frequently , HL-SGD with l = 1 has the best convergence speed and will converge to the highest level of test accuracy . In terms of runtime , choosing a value of l > 1 might be favorable in some cases due to the reduced D2D communication delay per round . For instance , to achieve a target level of 60 % test accuracy , HL-SGD with l = 5 needs 5.22 % less amount of time than l = 1 . It is an interesting direction to rigorously analyze the convergence properties of HL- SGD with arbitrary l and find the best hyperparameter tuning method for minimizing the runtime to achieve a target level of model accuracy in the future . | The paper introduces a new hybrid scheme combining local and decentralized SGD by considering a network with one central node (server) and multiple worker nodes (devices) grouped into clusters with fast intra-cluster communication but slow device to server communication. The authors show that in such settings replacing local SGD with intra-cluster averaging of iterates after each SGD update can lead to faster convergence. Theoretical analysis explores the tradeoff between intra-cluster connectivity, device sampling rate, and convergence rate, while experiments on CIFAR10 and FEMNIST with non-iid splits shows that the proposed approach yields higher test accuracy than local SGD for a given runtime/number of rounds. | SP:742ea30fbadad7899104c22b3da891f5f6d3df4b |
Hybrid Local SGD for Federated Learning with Heterogeneous Communications | 1 INTRODUCTION Federated learning ( FL ) is a distributed machine learning paradigm in which multiple edge devices or clients cooperate to learn a machine learning model under the orchestration of a central server , and enables a wide range of applications such as autonomous driving , extended reality , and smart manufacturing ( Kairouz et al. , 2019 ) . Communication is a critical bottleneck in FL as the clients are typically connected to the central server over bandwidth-limited networks . Standard optimization methods such as distributed SGD are often not suitable in FL and can cause high communication costs due to the frequent exchange of large-size model parameters or gradients . To tackle this issue , local SGD , in which clients update their models by running multiple SGD iterations on their local datasets before communicating with the server , has emerged as the de facto optimization method in FL and can largely reduce the number of communication rounds required to train a model ( McMahan et al. , 2017 ; Stich , 2019 ) . However , the communication benefit of local SGD is highly sensitive to non-iid data distribution as observed in prior work ( Rothchild et al. , 2020 ; Karimireddy et al. , 2020 ) . Intuitively , taking many local iterations of SGD on local dataset that is not representative of the overall data distribution will lead to local over-fitting , which will hinder convergence . In particular , it is shown in ( Zhao et al. , 2018 ) that the convergence of local SGD on non-iid data could slow down as much as proportionally to the number of local iteration steps taken . Therefore , local SGD with a large aggregation period can converge very slow on non-iid data distribution , and this may nullify its communication benefit ( Rothchild et al. , 2020 ) . Local SGD assumes a star network topology where each device connects to the central server for model aggregation . In modern communication networks , rather than only communicating with the server over slow communication links , devices are increasingly connected to others over fast communication links . For instance , in 5G-and-beyond mobile networks , mobile devices can directly communicate with their nearby devices via device-to-device links of high data rate ( Asadi et al. , 2014 ) . Also , edge devices within the same local-area network ( LAN ) domain can communicate with each other rapidly without traversing through slow wide-area network ( WAN ) ( Yuan et al. , 2020 ) . This gives the potential to accelerate the FL convergence under non-iid data distribution by leveraging fast D2D cooperation so that the total training time can be reduced in FL over bandwidthlimited networks . Motivated by the above observation , this paper proposes hybrid local SGD ( HL-SGD ) , a new distributed learning algorithm for FL with heterogeneous communications , to speed up the learning process and reduce the training time . HL-SGD extends local SGD with fast gossip-style D2D communication after local iterations to mitigate the local over-fitting issue under non-iid data distribution and accelerate convergence . A hybrid model aggregation scheme is designed in HL-SGD to integrate both fast device-to-device ( D2D ) and slow device-to-server ( D2S ) cooperations . We analyze the convergence of HL-SGD in the presence of heterogeneous data for general nonconvex settings , and characterize the relationship between the optimality error bound and algorithm parameters . Our algorithm and analysis are general enough and subsume previously proposed SGD variations such as distributed SGD , local SGD and gossip SGD . Specifically , we consider the FL setting in which all devices are partitioned into disjoint clusters , each of which includes a group of connected devices capable of communicating with each other using fast D2D links . The clustering can be a natural result of devices belonging to different LAN domains so that those devices connected to the same LAN domain are considered as one cluster . In another example , clustering is based on the geographic locations of mobile devices so that devices in a cluster are connected to each other through D2D communication links . In summary , the paper makes the following main contributions : • We propose a novel distributed learning algorithm for FL called HL-SGD to address the communication challenge of FL over bandwidth-limited networks by leveraging the availability of fast D2D links to accelerate convergence under non-iid data distribution and reduce training time . • We provide the convergence analysis of HL-SGD under general assumptions about the loss function , data distribution , and network topology , generalizing previous results on distributed SGD , local SGD , and gossip SGD . • We conduct extensive empirical experiments on two common benchmarks under realistic network settings to validate the established theoretical results of HL-SGD . Our experimental results show that HL-SGD can largely accelerate the learning process and speed up the runtime . 2 BACKGROUND AND RELATED WORK Large-scale machine learning based on distributed SGD has been well studied in the past decade , but often suffers from large network delays and bandwidth limits ( Bottou et al. , 2018 ) . Considering that communication is a major bottleneck in federated settings , local SGD has been proposed recently to reduce the communication frequency by running SGD independently in parallel on different devices and averaging the sequences only once in a while ( Stich , 2019 ; Lin et al. , 2019 ; Haddadpour et al. , 2019 ; Yu et al. , 2018 ; Wang et al. , 2021 ) . However , they all assume the client-server architecture and do not leverage the fast D2D communication capability in modern communication networks . Some studies ( Liu et al. , 2020 ; Abad et al. , 2020 ; Castiglia et al. , 2020 ) develop hierarchical FL algorithms that first aggregate client models at local edge servers before aggregating them at the cloud server or with neighboring edge servers , but they still rely on D2S communication links only and suffer from the scalability and fault-tolerance issues of centralized setting . On the other hand , while existing works on decentralized or gossip SGD consider D2D communications ( Tsitsiklis , 1984 ; Boyd et al. , 2006 ) , they assume a connected cluster with homogeneous communication links and will converge very slow on the large and sparse network topology that is typically found in FL settings . Unlike previous works , HL-SGD leverages both D2S and D2D communications in the system . Some recent studies aim to encapsulate variants of SGD under a unified framework . Specifically , a cooperative SGD framework is introduced in ( Wang & Joshi , 2018 ) that includes communication reduction through local SGD steps and decentralized mixing between clients under iid data distribution . A general framework for topology-changing gossip SGD under both iid and non-iid data distributions is proposed in ( Koloskova et al. , 2020 ) . Note that all of the above works assume undirected network topology for communications in every iteration . In comparison , our proposed HL-SGD is different : the D2S communication is asymmetric due to the use of device sampling and model broadcasting in each global aggregation round and can not be modeled in an undirected graph . Therefore , the convergence analysis of HL-SGD does not fit into the prior frameworks and is much more challenging . Moreover , our major focus is on the runtime of the algorithm rather than its convergence speed in iterations . 3 SYSTEM MODEL In this section , we introduce the FL system model , problem formulation , and assumptions we made . Notation . All vectors in this paper are column vectors by default . For convenience , we use 1 to denote the all-ones vector of appropriate dimension , 0 to denote the all-zeros vector of appropriate dimension , and [ n ] to denote the set of integers { 1 , 2 , . . . , n } with any positive integer n. Let ‖·‖ denote the ` 2 vector norm and Frobenius matrix norm and ‖·‖2 denote the spectral norm of a matrix . We consider a FL system consisting of a central server and K disjoint clusters of edge devices . Devices in each cluster k ∈ [ K ] can communicate with others across an undirected and connected graph Gk = ( V , Ek ) , where Vk denotes the set of edge devices in the cluster , and edge ( i , j ) ∈ Ek denotes that the pair of devices i , j ∈ Vk can communicate directly using D2D as determined by the communication range of D2D links . Besides , each device can directly communicate with the central server using D2S links . Denote the set of all devices in the system as V : = ⋃ k∈ [ K ] Vk , the number of devices in each cluster k ∈ [ K ] as n : = |Vk| , and the total number of devices in the system as N : = ∑ k∈ [ K ] n 1 . The FL goal of the system is to solve an optimization problem of the form : min x∈Rd f ( x ) : = 1 N ∑ i∈V fi ( x ) : = 1 K ∑ k∈ [ K ] f̄k ( x ) , ( 1 ) where fi ( x ) : = Ez∼Di [ ` i ( x ; z ) ] is the local objective function of device i , f̄k ( x ) : = ( 1/n ) ∑ i∈Vk fi ( x ) is the local objective function of cluster k , and Di is the data distribution of device i . Here ` i is the ( non-convex ) loss function defined by the learning model and z represents a data sample from data distribution Di . When applying local SGD to ( 1 ) in FL with heterogeneous communications , the communications between the server and devices in FL are all through D2S links that are bandwidth-limited , particularly for the uplink transmissions . Therefore , the incurred communication delay is high . Due to the existing of high-bandwidth D2D links that are much more efficient than low-bandwidth D2S links , it would be highly beneficial if we can leverage D2D links to reduce the usage of D2S links such that the total training time can be reduced . This motivates us to design a new learning algorithm for FL with heterogeneous communications . 4 HYBRID LOCAL SGD In this section , we present our HL-SGD algorithm suitable for the FL setting with heterogeneous communications . Algorithm 1 provides pseudo-code for our algorithm . At the beginning of r-th global communication round , the server broadcasts the current global model xr to all devices in the system via cellular links ( Line 4 ) . Note that in typical FL systems , the downlink communication is much more efficient than uplink communication due to the larger bandwidth allocation and higher data rate . Therefore , devices only consume a smaller amount of energy when receiving data from the server compared with transmitting data to the server . After that , devices in each cluster initialize their local models to be the received global model and run τ iterations of gossip-based SGD via D2D links to update their local models in parallel ( lines 5– 9 ) . Let xr , si denote the local model of device i at the r-th local iteration of s-th round . Here 1For presentation simplicity , we assume each cluster contains the same number of devices here . The results of this paper can be extended to the case of clusters with different device numbers as well . Algorithm 1 HL-SGD : Hybrid Local SGD Input : initial global model x0 , learning rate η , communication graph Gk and mixing matrix Wk for all clusters k ∈ [ K ] , and fraction of sampled devices in each cluster p. Output : final global model xR 1 : for each round r = 0 , . . . , R− 1 do 2 : for each cluster k ∈ [ K ] in parallel do 3 : for each device i ∈ Vk in parallel do 4 : xr,0i = x r 5 : for s = 0 , . . . , τ − 1 do 6 : Compute a stochastic gradient gi over a mini-batch ξi sampled from Di 7 : x r , s+ 12 i = x r , s i − ηgi ( x r , s i ) . local update 8 : xr , s+1i = ∑ j∈Nki ( Wk ) i , jx r , s+ 12 j . gossip averaging 9 : end for 10 : end for 11 : end for 12 : for each cluster k ∈ [ K ] do 13 : m← max ( p · n , 1 ) 14 : Srk ← ( random set of m clients in Vk ) . device sampling 15 : end for 16 : xr+1 = 1K ∑ k∈ [ K ] 1 m ∑ i∈Srk xr , τi . global aggregation 17 : end for 18 : return xR each gossip-based SGD iteration consists of two steps : ( i ) SGD update , performed locally on each device ( lines 6–7 ) , followed by a ( ii ) gossip averaging , where devices average their models with their neighbors ( line 8 ) . In the gossip averaging protocol , N ki denotes the neighbors of device i , including itself , on the D2D communication graph Gk of cluster k , and Wk ∈ [ 0 , 1 ] n×n denotes the mixing matrix of cluster k with each element ( Wk ) i , j being the weight assigned by device i to device j . Note that ( Wk ) i , j > 0 only if devices i and j are directly connected via D2D links . Next , a set Srk of m devices are sampled uniformly at random ( u.a.r . ) with probability p without replacement from each cluster k ∈ [ K ] by the server ( lines 13–14 ) , and their final updated local models { xr , τi , ∀i ∈ Srk } are sent to the server via D2S links . After that , the server updates the global model xr+1 by averaging the received local models from all sampled devices ( line 16 ) . Note that only m devices per cluster will upload their models to the server in each round to save the usage of expensive D2S uplink transmissions . The intuition is that after multiple iterations of gossip-based SGD , devices have already reached approximate consensus within each cluster , and the sampled average can well represent the true average . By trading D2D local aggregation for D2S global aggregation , the total communication cost can be reduced . We will empirically validate such benefits later in the experiments . It is worth noting that HL-SGD inherits the privacy benefits of classic FL schemes by keeping the raw data on device and sharing only model parameters . Moreover , HL-SGD is compatible with existing privacy-preserving techniques in FL such as secure aggregation ( Bonawitz et al. , 2017 ) , differential privacy ( McMahan et al. , 2018 ) , and shuffling ( Girgis et al. , 2021 ) since only the sum rather than individual values is needed for the local and global model aggregation steps . 4.1 RUNTIME ANALYSIS OF HL-SGD We now present a runtime analysis of HL-SGD . Here we ignore the communication time of downloading models from the server by each device since the download bandwidth is often much larger than upload bandwidth for the D2S communication in practice ( Kairouz et al. , 2019 ) . In each round of HL-SGD , we denote the average time taken by a device to compute a local update , perform one round of D2D communication and one round of D2S communication as ccp , cd2d and cd2s , respectively . Assume the uplink bandwidth between the server and devices is fixed and evenly shared among the sampled devices in each round , then cd2s is linearly proportional to the sampling ratio p. Similarly , ccp depends on the D2D network topology Gk and typically increases with the maximum node degree ∆ ( Gk ) . The total runtime of HL-SGD after R communication rounds is R× [ τ × ( ccp + cd2d ) + cd2s ] . ( 2 ) The specific values of ccp , cd2d and cd2s depend on the system configurations and applications . In comparison , the total runtime of local SGD after R communication rounds is R× [ τ × ccp + cd2s ] . 4.2 PREVIOUS ALGORITHMS AS SPECIAL CASES When devices do not communicate with each other , i.e. , Wk = I , ∀k ∈ [ K ] , and sampling ratio p = 1 , HL-SGD reduces to distributed SGD ( when τ = 1 ) or local SGD ( when τ > 1 ) where each device only directly communicates with the server with D2S links . Also , when τ → ∞ , HLSGD reduces to gossip SGD where devices only cooperate with their neighboring devices through a gossip-based communication protocol with D2D links to update their models without relying on the server . Therefore , HL-SGD subsumes existing algorithms and enables us to strike the best balance between runtime and model accuracy by tuning τ , Wk , and p. However , due to the generality of HL-SGD , there exist significantly new challenges in its convergence analysis , which constitutes one of the main contributions of this paper as elaborated in the following section . 5 CONVERGENCE ANALYSIS OF HL-SGD In this section , we analyze the convergence of HL-SGD with respect to the gradient norm of the objective function f ( · ) , specifically highlighting the effects of τ and p. Before stating our results , we make the following assumptions : Assumption 1 ( Smoothness ) . Each local objective function fi : Rd → R is L-smooth for all i ∈ V , i.e. , for all x , y ∈ Rd , ‖∇fi ( x ) −∇fi ( y ) ‖ ≤ L‖x− y‖ , ∀i ∈ V. Assumption 2 ( Unbiased Gradient and Bounded Variance ) . The local mini-batch stochastic gradient in Algorithm 1 is unbiased , i.e. , Eξi [ gi ( x ) ] = ∇fi ( x ) , and has bounded variance , i.e. , Eξi‖gi ( x ) − ∇fi ( x ) ‖2 ≤ σ2 , ∀x ∈ Rd , i ∈ V , where the expectation is over all the local minibatches . Assumption 3 ( Mixing Matrix ) . For any cluster k ∈ [ K ] , the D2D network is strongly connected and the mixing matrix Wk ∈ [ 0 , 1 ] n×n satisfies Wk1 = 1 , 1 > Wk = 1 > , null ( I −Wk ) = span ( 1 ) . We also assume ||Wk − ( 1/n ) 11 > ||2 ≤ ρk for some ρk ∈ [ 0 , 1 ) . Assumption 4 ( Bounded Intra-Cluster Dissimilarity ) . There exists a constant k ≥ 0 such that ( 1/n ) ∑ i∈Vk ‖∇fi ( x ) − ∇f̄k ( x ) ‖ 2 ≤ 2k for any x ∈ Rd and k ∈ [ K ] . If local functions are identical to each other within a cluster , then we have k = 0 . Assumption 5 ( Bounded Inter-Cluster Dissimilarity ) . There exist constants α ≥ 1 , ≥ 0 such that ( 1/K ) ∑ k∈ [ K ] ‖∇f̄k ( x ) ‖2 ≤ α2 ‖∇f ( x ) ‖ 2 + 2g for any x ∈ Rd . If local functions are identical to each other across all clusters , then we have α = 1 , g = 0 . Assumptions 1–3 are standard in the analysis of SGD and decentralized optimization ( Bottou et al. , 2018 ; Koloskova et al. , 2019 ) . Assumptions 4–5 are commonly used in the federated optimization literature to capture the dissimilarities of local objectives ( Koloskova et al. , 2020 ; Wang et al. , 2020 ) . 5.1 MAIN RESULTS We now provide the main theoretical results of the paper in Theorem 1 and Theorem 2 . The detailed proofs are provided in the appendices . Define the following constants : ρmax = max k∈ [ K ] ρk , Dτ , ρ = min { 1 1− ρmax , τ } , ̄2L = 1 K K∑ k=1 2k ( 3 ) and let r0 = 8 ( f ( x 0 ) − f ( x ? ) ) , r1 = 16L ( σ2 N ) , r2 = 16C1L 2τ2 2g + 16C1L 2 ( τρ2maxDτ , ρ̄ 2 L + τσ 2 ( 1 n + ρ2max ) ) . ( 4 ) Theorem 1 ( Full device participation ) . Let Assumptions 1–5 hold , and let L , σ , ̄L , g , Dτ , ρ , ρmax , r0 , r1 , and r2 be as defined therein . If the learning rate η satisfies η = min { 1 4C1α · 1 τL , ( r0 r1τR ) 1 2 , ( r0 r2τR ) 1 3 } , ( 5 ) then for any R > 0 , the iterates of Algorithm 1 with full device participation for HL-SGD satisfy min r∈ [ R ] min s=0 , ... , τ−1 E‖∇f ( x̄r , s ) ‖2 =O σ√ NτR + ( τ2 2g + τρ 2 maxDτ , ρ̄ 2 L + τ ( 1 n + ρ2max ) σ2 ) 1 3 ( τR ) 2 3 + 1 R , ( 6 ) where x̄r , s = 1N ∑N i=1 x r , s i . In the following , we analyze the iteration complexity of HL-SGD and compare it with those of some classic and state-of-the-art algorithms relevant to our setting in Table 1 . First , we consider two extreme cases of HL-SGD where ρmax = 0 and ρk = 1 , ∀k ∈ [ K ] , and show that our analysis recovers the best known rate of local SGD . Fully Connected D2D networks . In this case , ρmax = 0 , and each cluster can be viewed as a single device , and thus HL-SGD reduces to local SGD with K devices . Substuting ρmax = 0 into ( 6 ) , the iteration complexity of HL-SGD reduces to O ( σ/ √ NτR+ ( τ2 2g + τ · ( σ2/n ) ) 1/3 / ( τR ) 2/3 + 1/R ) . This coincides with the complexity of local SGD provided in Table 1 with device number K and stochastic gradient variance σ2/n thanks to the fully intra-cluster averaging . Disconnected D2D networks . In this case , HL-SGD reduces to local SGD with N devices . Substituting ρmax = 1 into ( 6 ) , the iteration complexity of HL-SGD becomes O ( σ/ √ NτR + ( τ2 ( 2g + ̄ 2 L ) + τσ 2 ) 1/3 / ( τR ) 2/3 + 1/R ) . This coincides with the complexity of local SGD with N devices , stochastic gradient variance σ2 , and gradient heterogeneity of order 2g + ̄ 2 L. Table 1 : Comparison of Iteration Complexity . 2 Local SGD O ( σ√ NτR + ( τ2 2+τσ2 ) 1 3 ( τR ) 2 3 + ττR ) Gossip SGD O ( σ√ NτR + ρ 2 3 2 3 ( τR ) 2 3 ( 1−ρ ) 2 3 + ρ 2 3 σ 2 3 ( τR ) 2 3 ( 1−ρ ) 1 3 + ρ ( 1−ρ ) τR ) Gossip PGA ( Chen et al. , 2021a ) O ( σ√ NτR + C 1 3 τ , ρD 1 3 τ , ρ′ρ 2 3 2 3 ( τR ) 2 3 + C 1 3 τ , ρρ 2 3 σ 2 3 ( τR ) 2 3 + ρDτ , ρ′ τR ) HL-SGD ( this work ) O ( σ√ NτR + ( τ2 2g+τρ 2 maxDτ , ρ̄ 2 L ) 1 3 ( τR ) 2 3 + ( τ ( 1n+ρ 2 max ) σ 2 ) 1 3 ( τR ) 2 3 + ττR ) Next , we compare the complexities of HL-SGD , local SGD , gossip SGD and gossip PGA . Comparison to Local SGD . Comparing ( 6 ) and the complexity of local SGD , we can see the intracluster D2D communication provably improves the iteration complexity by reducing the transient iterations . This is reflected in the smaller coefficient associated with the O ( ( τR ) −2/3 ) term . In particular , improving D2D communication connectivity will lead to a smaller ρmax and consequently , mitigate the impact of both local data heterogeneity and stochastic noise on the convergence rate . Comparison to Gossip SGD . Under the condition that ρ = ρmax , i.e. , the connectivity of D2D network in gossip SGD is the same as that of HL-SGD , Table 1 shows HL-SGD outperforms gossip SGD when τ/n ≤ ρ2/ ( 1−ρ ) . In other words , HL-SGD is beneficial for weakly connected networks , which is the case in FL settings where a large number of devices are often loosely connected or disconnected into several disjoint clusters via D2D communications only . 1The convergence rates for gossip SGD and local SGD are from ( Koloskova et al . ( 2020 ) ) . The parameters in the table are given by the following : σ2 : stochastic gradient variance ; ρ : network connectivity ; 2 : data heterogeneity of order 2g + ̄2L ; Cτ , ρ , ∑τ−1 k=0 ρ k , Dτ , ρ′ = min { 1/ ( 1− ρ ) , τ } . Note that Dτ , ρ 6= Dτ , ρ′ . Comparison to Gossip PGA . Gossip PGA improves local SGD by integrating gossiping among all devices in one round using a connected network . Compared to gossip SGD , gossip PGA has one extra full averaging step with period τ . The complexity of gossip PGA improves both by reducing the transient iterations . HL-SGD ( full participation ) differs from gossip PGA in the sense that gossiping is performed within multiple clusters instead of a single one . The benefit comes from the fact that for many commonly used D2D network topologies , the spectral gap 1− ρ decreases as the network size decreases , see Table 2 . Therefore , when employing the same D2D network topology , HL-SGD enjoys a smaller connectivity number ρmax than ρ . Considering the scenario where τ and n are fixed while the cluster number K grows , the total device number N = nK grows and hence ρ → 1 for gossip PGA . In the case when τ = Dτ , ρ′ ≈ Cτ , ρ , the fastest decaying O ( 1/τR ) terms are comparable for both algorithms . However , the O ( ( τR ) −2/3 ) term of gossip GPA can be larger than that of HL-SGD since ρ increases with N . This observation shows for large-scale networks , it is advantageous to use HL-SGD with multiple connected clusters instead of gossip GPA with a single cluster under the D2D network topology . Our next result shows the iteration complexity of HL-SGD with partial device participation . We assume the devices participate in synchronizing their models at the end of each FL round following the sampling rule given by Assumption 6 . Assumption 6 ( Sampling strategy ) . Each Srk contains a subset ofm indices uniformly sampled from { 1 , . . . , n } without replacement . Furthermore , Srk is independent of Sr ′ k′ for all ( k , r ) 6= ( k′ , r′ ) . Theorem 2 ( Partial device participation ) . Let Assumptions 1–6 hold , and let L , σ , ̄L , g , Dτ , ρ , ρmax , r0 , r1 , and r2 be as defined therein . If the network connectivity satisfies ρmax ≤ 1− 1/τ , ( 7 ) then for suitably chosen learning rate η , the iterates of Algorithm 1 with partial device participation for HL-SGD satisfy min r∈ [ R ] min s=0 , ... , τ−1 E‖∇f ( x̄r , s ) ‖2 =O σ + E ( g , ̄L , σ , ρmax ) √ NτR + ( τ2 2g + τρ 2 maxDτ , ρ̄ 2 L + τ ( 1 n + ρ2max ) σ2 ) 1 3 ( τR ) 2 3 + 1 R , ( 8 ) where x̄r , s = 1N ∑N i=1 x r , s i , E2 ( g , ̄L , σ , ρmax ) = ( 2gDτ , ρ + ρmaxDτ , ρ̄2L + σ2 ) ·G′pDτ , ρρmaxN + n m · 1 τ ρ2maxσ 2 . ( 9 ) and G′p = n−m m ( n− 1 ) + 1 τ2 . ( 10 ) Compared to Theorem 1 , Theorem 2 shows partial device participation deteriorates the rate by O ( E ( g , ̄L , σ , ρmax ) / √ NτR ) . From the expression of E , we observe that as ρmax → 0 , E ( g , ̄L , σ , ρmax ) vanishes , which indicates that the loss caused by device sampling can be compensated by increasing network connectivity uniformly for all clusters . The next corollary finds the critial ρmax so that E2 = O ( 1 ) , and the order of convergence rate of partial device participation matches that of the full participation case . Corollary 1 . Under the same assumptions as Theorem 2 , if the network connectivity satisfies ρmax ≤ 1 4N min { m , τ − 1 } , ( 11 ) then min r∈ [ R ] min s=0 , ... , τ−1 E‖∇f ( x̄r , s ) ‖2 =O σ + g + ̄L√ NτR + ( τ2 2g + τρ 2 maxDτ , ρ̄ 2 L + τ ( 1 n + ρ2max ) σ2 ) 1 3 ( τR ) 2 3 + 1 R . ( 12 ) Corollary 1 reveals the tradeoff between sampling intensity and network connectivity . More connected D2D networks result in smaller ρmax , and thus ( 11 ) can be satisfied by a smaller m. This means we can sample fewer devices at the end of each round and reduce the D2S communication delay when the D2D network is more connected . 6 EXPERIMENTAL EVALUATION 6.1 EXPERIMENTAL SETTINGS We use two common datasets in FL literature ( McMahan et al. , 2017 ; Reddi et al. , 2020 ; Wang et al. , 2020 ) : Federated Extended MNIST ( Caldas et al. , 2018 ) ( FEMNIST ) and CIFAR-10 ( Krizhevsky et al. , 2009 ) . The 62-class FEMNIST is built by partitioning the data in Extended MNIST ( Cohen et al. , 2017 ) based on the writer of the digit/character and has a naturally-arising device partitioning . CIFAR-10 is partitioned across all devices using a Dirichlet distribution Dir ( 0.1 ) as done in ( Hsu et al. , 2019 ; Yurochkin et al. , 2019 ; Reddi et al. , 2020 ; Wang et al. , 2020 ) . We evaluate our algorithms by training CNNs on both datasets , and the CNN models for FEMNIST and CIFAR-10 were taken from ( Caldas et al. , 2018 ) and ( McMahan et al. , 2017 ) with around 6.5 and 1 million parameters , respectively . For each dataset , the original testing set ( without partitioning ) is used to evaluate the generalization performances of the trained global model . We consider a FL system consisting of a central server and 32 devices . The devices are evenly divided into four clusters , and each cluster has a ring topology by default , which provides a conservative estimation for the cluster connectivity and convergence speed . In our experiments , the mixing matrix of each cluster Wk is set according to the Metropolis-Hastings weights ( Nedić et al. , 2018 ) . According to the real-world measurements in ( Yuan et al. , 2020 ; Yang et al. , 2021 ) , we set the average time for a device to perform a local update , a round of D2D communication under ring topology , and a round of D2S communication with one device sampled per cluster to be ccp = 0.01h , cd2d ( ∆ = 2 ) = 0.005h and cd2s ( p = 1/8 ) = 0.05h , respectively , in the runtime model ( 2 ) . For arbitrary device sampling ratio and D2D network topology , we consider a linear-scaling rule ( Wang et al. , 2019 ) and let cd2d ( ∆ ) = ( ∆/2 ) × 0.005h and cd2s ( p ) = 8p× 0.05h . We compare HL-SGD with local SGD in the experiments . For local SGD , devices will only communicate with the central server periodically . In all experiments , we let the local iteration period τ to be the same for both local SGD and HL-SGD to have a fair comparison . On the FEMNIST dataset , we fix the batch size as 30 and tune the learning rate η from { 0.005 , 0.01 , 0.02 , 0.05 , 0.08 } for each algorithm separately . On the CIFAR-10 dataset , we fix the batch size as 50 and tune η from { 0.01 , 0.02 , 0.05 , 0.08 , 0.1 } for each algorithm separately . We run each experiment with 3 random seeds and report the average . All experiments in this paper are conducted on a Linux server with 4 NVIDIA RTX 8000 GPUs . The algorithms are implemented by PyTorch . More details are provided in Appendix F. 6.2 EXPERIMENTAL RESULTS We first compare the convergence speed and runtime of HL-SGD and local SGD while fixing τ = 50 and p = 1 . We measure the test accuracy of the global model on the server in every FL round . Figure 1 shows the convergence process . From the figure , we can observe that HL-SGD can largely accelerate the model convergence while improving model accuracy in FL . On FEMNIST , the best accuracy of HL-SGD achieved over 100 rounds is 4.78 % higher than that of local SGD ( i.e. , 83.76 % vs. 79.94 % ) , and its runtime necessary to achieve a target test-set accuracy of 75 % is only 17.64 % of that of the baseline ( i.e. , 5.67× speedup ) . On CIFAR-10 , the best accuracy of HL-SGD achieved over 100 rounds is 9.32 % higher than that of local SGD ( i.e. , 70.13 % vs. 64.15 % ) , and its runtime necessary to achieve a target test-set accuracy of 60 % is 18.36 % less than that of local SGD ( i.e. , 1.225× speedup ) . Next , we investigate the effect of D2D network speed on the runtime benefit of HL-SGD . We consider the same FL setting as before and choose cd2d from { 0.003 , 0.005 , 0.02 } h. As illustrated in Figure 2 , the training speed of HL-SGD can be further improved by using faster D2D links . For instance , it takes HL-SGD 4.2 hours to reach 75 % test accuracy on FEMNIST with cd2d = 0.003h , which is 1.5× faster than HL-SGD with cd2d = 0.01h . On CIFAR-10 , to reach a target level of 60 % test accuracy , HL-SGD with cd2d = 0.003h needs 21 hours , which is 1.14× faster than HL-SGD with cd2d = 0.005 . Note that the runtime can not proportionally decrease with the increase of D2D network speed because local update also takes substantial computation time . Also , when cd2d is relatively large compared with cd2s , the convergence acceleration benefit of gossip averaging could be offset by the increased communication time in each round of HL-SGD , leading to an inferior total runtime as shown in Figure 2b . Finally , we investigate how the sampling ratio p affects the performance of HL-SGD . We select p from { 0.125 , 0.25 , 0.5 , 1 } , corresponding to sampling { 1 , 2 , 4 , 8 } devices from each cluster to upload models to the server . Figure 3 depicts the best value of test-set accuracy achieved over all prior rounds . As can be observed from the figures , sampling one device per cluster only results in slightly lower model accuracy , e.g. , 1.92 % drop compared to full participation on CIFAR-10 . This matches the theoretical result in Corollary 1 that device sampling does not affect the order of convergence rate under certain conditions . However , decreasing p can lead to faster training speed due to its shorter D2S communication delay as observed in Figure 3d . In practice , the optimal value of p needs to be tuned to strike a good balance between model accuracy and runtime . 7 CONCLUSION In this paper , we have proposed a new optimization algorithm called HL-SGD for FL with heterogeneous communications . Our algorithm leverages the D2D communication capabilities among edge device to accelerate the model convergence while improving model accuracy in FL . We have provided the theoretical convergence analysis of HL-SGD and conducted experiments to demonstrate the benefits of HL-SGD . In the future , we plan to extend HL-SGD to handle straggler issues under device heterogeneity and provide rigorous privacy protection for HL-SGD . REFERENCES Mehdi Salehi Heydar Abad , Emre Ozfatura , Deniz Gunduz , and Ozgur Ercetin . Hierarchical federated learning across heterogeneous cellular networks . In ICASSP 2020-2020 IEEE International Conference on Acoustics , Speech and Signal Processing ( ICASSP ) , pp . 8866–8870 . IEEE , 2020 . Arash Asadi , Qing Wang , and Vincenzo Mancuso . A survey on device-to-device communication in cellular networks . IEEE Communications Surveys & Tutorials , 16 ( 4 ) :1801–1819 , 2014 . Keith Bonawitz , Vladimir Ivanov , Ben Kreuter , Antonio Marcedone , H Brendan McMahan , Sarvar Patel , Daniel Ramage , Aaron Segal , and Karn Seth . Practical secure aggregation for privacypreserving machine learning . In proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security , pp . 1175–1191 , 2017 . Léon Bottou , Frank E Curtis , and Jorge Nocedal . Optimization methods for large-scale machine learning . Siam Review , 60 ( 2 ) :223–311 , 2018 . Stephen Boyd , Arpita Ghosh , Balaji Prabhakar , and Devavrat Shah . Randomized gossip algorithms . IEEE transactions on information theory , 52 ( 6 ) :2508–2530 , 2006 . Sebastian Caldas , Sai Meher Karthik Duddu , Peter Wu , Tian Li , Jakub Konečnỳ , H Brendan McMahan , Virginia Smith , and Ameet Talwalkar . Leaf : A benchmark for federated settings . arXiv preprint arXiv:1812.01097 , 2018 . Timothy Castiglia , Anirban Das , and Stacy Patterson . Multi-level local sgd for heterogeneous hierarchical networks . arXiv preprint arXiv:2007.13819 , 2020 . Yiming Chen , Kun Yuan , Yingya Zhang , Pan Pan , Yinghui Xu , and Wotao Yin . Accelerating gossip sgd with periodic global averaging . In International Conference on Machine Learning . PMLR , 2021a . Yiming Chen , Kun Yuan , Yingya Zhang , Pan Pan , Yinghui Xu , and Wotao Yin . Accelerating gossip sgd with periodic global averaging . In Marina Meila and Tong Zhang ( eds . ) , Proceedings of the 38th International Conference on Machine Learning , volume 139 of Proceedings of Machine Learning Research , pp . 1791–1802 . PMLR , 18–24 Jul 2021b . Gregory Cohen , Saeed Afshar , Jonathan Tapson , and Andre Van Schaik . Emnist : Extending mnist to handwritten letters . In 2017 International Joint Conference on Neural Networks ( IJCNN ) , pp . 2921–2926 . IEEE , 2017 . Antonious Girgis , Deepesh Data , Suhas Diggavi , Peter Kairouz , and Ananda Theertha Suresh . Shuffled model of differential privacy in federated learning . In International Conference on Artificial Intelligence and Statistics , pp . 2521–2529 . PMLR , 2021 . Farzin Haddadpour , Mohammad Mahdi Kamani , Mehrdad Mahdavi , and Viveck Cadambe . Local sgd with periodic averaging : Tighter analysis and adaptive synchronization . In Advances in Neural Information Processing Systems , pp . 11082–11094 , 2019 . Tzu-Ming Harry Hsu , Hang Qi , and Matthew Brown . Measuring the effects of non-identical data distribution for federated visual classification . arXiv preprint arXiv:1909.06335 , 2019 . Peter Kairouz , H Brendan McMahan , Brendan Avent , Aurélien Bellet , Mehdi Bennis , Arjun Nitin Bhagoji , Keith Bonawitz , Zachary Charles , Graham Cormode , Rachel Cummings , et al . Advances and open problems in federated learning . arXiv preprint arXiv:1912.04977 , 2019 . Sai Praneeth Karimireddy , Satyen Kale , Mehryar Mohri , Sashank Reddi , Sebastian Stich , and Ananda Theertha Suresh . Scaffold : Stochastic controlled averaging for federated learning . In International Conference on Machine Learning , pp . 5132–5143 . PMLR , 2020 . Anastasia Koloskova , Sebastian Stich , and Martin Jaggi . Decentralized stochastic optimization and gossip algorithms with compressed communication . In International Conference on Machine Learning , pp . 3478–3487 , 2019 . Anastasia Koloskova , Nicolas Loizou , Sadra Boreiri , Martin Jaggi , and Sebastian U Stich . A unified theory of decentralized sgd with changing topology and local updates . arXiv preprint arXiv:2003.10422 , 2020 . Alex Krizhevsky , Geoffrey Hinton , et al . Learning multiple layers of features from tiny images . 2009 . Tao Lin , Sebastian U Stich , Kumar Kshitij Patel , and Martin Jaggi . Don ’ t use large mini-batches , use local sgd . In International Conference on Learning Representations , 2019 . Lumin Liu , Jun Zhang , SH Song , and Khaled B Letaief . Client-edge-cloud hierarchical federated learning . In ICC 2020-2020 IEEE International Conference on Communications ( ICC ) , pp . 1–6 . IEEE , 2020 . Brendan McMahan , Eider Moore , Daniel Ramage , Seth Hampson , and Blaise Aguera y Arcas . Communication-efficient learning of deep networks from decentralized data . In Artificial Intelligence and Statistics , pp . 1273–1282 , 2017 . H Brendan McMahan , Daniel Ramage , Kunal Talwar , and Li Zhang . Learning differentially private recurrent language models . In International Conference on Learning Representations , 2018 . Angelia Nedić , Alex Olshevsky , and Michael G Rabbat . Network topology and communicationcomputation tradeoffs in decentralized optimization . Proceedings of the IEEE , 106 ( 5 ) :953–976 , 2018 . Sashank Reddi , Zachary Charles , Manzil Zaheer , Zachary Garrett , Keith Rush , Jakub Konečnỳ , Sanjiv Kumar , and H Brendan McMahan . Adaptive federated optimization . arXiv preprint arXiv:2003.00295 , 2020 . Daniel Rothchild , Ashwinee Panda , Enayat Ullah , Nikita Ivkin , Ion Stoica , Vladimir Braverman , Joseph Gonzalez , and Raman Arora . Fetchsgd : Communication-efficient federated learning with sketching . In International Conference on Machine Learning , pp . 8253–8265 . PMLR , 2020 . Sebastian Urban Stich . Local sgd converges fast and communicates little . In International Conference on Learning Representations ( ICLR ) , 2019 . John Nikolas Tsitsiklis . Problems in decentralized decision making and computation . Technical report , Massachusetts Inst of Tech Cambridge Lab for Information and Decision Systems , 1984 . Jianyu Wang and Gauri Joshi . Cooperative sgd : A unified framework for the design and analysis of communication-efficient sgd algorithms . arXiv preprint arXiv:1808.07576 , 2018 . Jianyu Wang , Anit Kumar Sahu , Zhouyi Yang , Gauri Joshi , and Soummya Kar . Matcha : Speeding up decentralized sgd via matching decomposition sampling . arXiv preprint arXiv:1905.09435 , 2019 . Jianyu Wang , Qinghua Liu , Hao Liang , Gauri Joshi , and H Vincent Poor . Tackling the objective inconsistency problem in heterogeneous federated optimization . Advances in neural information processing systems , 2020 . Jianyu Wang , Zachary Charles , Zheng Xu , Gauri Joshi , H Brendan McMahan , Maruan Al-Shedivat , Galen Andrew , Salman Avestimehr , Katharine Daly , Deepesh Data , et al . A field guide to federated optimization . arXiv preprint arXiv:2107.06917 , 2021 . Chengxu Yang , Qipeng Wang , Mengwei Xu , Zhenpeng Chen , Kaigui Bian , Yunxin Liu , and Xuanzhe Liu . Characterizing impacts of heterogeneity in federated learning upon large-scale smartphone data . In Proceedings of the Web Conference 2021 , pp . 935–946 , 2021 . Bicheng Ying , Kun Yuan , Yiming Chen , Hanbin Hu , Pan Pan , and Wotao Yin . Exponential graph is provably efficient for decentralized deep training . arXiv preprint arXiv:2110.13363 , 2021 . Hao Yu , Sen Yang , and Shenghuo Zhu . Parallel restarted sgd with faster convergence and less communication : Demystifying why model averaging works for deep learning , 2018 . Jinliang Yuan , Mengwei Xu , Xiao Ma , Ao Zhou , Xuanzhe Liu , and Shangguang Wang . Hierarchical federated learning through lan-wan orchestration . arXiv preprint arXiv:2010.11612 , 2020 . Mikhail Yurochkin , Mayank Agarwal , Soumya Ghosh , Kristjan Greenewald , Nghia Hoang , and Yasaman Khazaeni . Bayesian nonparametric federated learning of neural networks . In International Conference on Machine Learning , pp . 7252–7261 . PMLR , 2019 . Yue Zhao , Meng Li , Liangzhen Lai , Naveen Suda , Damon Civin , and Vikas Chandra . Federated learning with non-iid data . arXiv preprint arXiv:1806.00582 , 2018 . A PRELIMINARIES Intra-cluster dynamics . To facilitate the analysis , we introduce matrices Xk ∈ Rn×d and Gk ∈ Rn×d constructed by stacking respectively xi and gi for i ∈ Vk row-wise . Similarly , we define the pseudo-gradient ∇Fk ( Xk ) ∈ Rn×d associated to cluster k by stacking ∇fi ( xi ) for i ∈ Vk row-wise . In addition , define the following intra-cluster averages for each cluster k : x̄k , 1 n ∑ i∈Vk xi and ḡk , 1 n ∑ i∈Vk gi . ( 13 ) The update within each cluster then can be written compactly in matrix form as Xr , s+1k = Wk ( X r , s k − ηG r , s k ) , ∀k = 1 , . . . , K. ( 14 ) Since each Wk is bi-stochastic , we obtain the following update of the intra-cluster average x̄r , s+1k = x̄ r , s k − η · ḡ r , s k . ( 15 ) We proceed to derive the update of the intra-cluster consensus error . Define the averaging matrix J = 1 n 1 · 1 > with 1 = [ 1 , . . . , 1︸ ︷︷ ︸ n ] . ( 16 ) Multiplying both sides of ( 14 ) from the left by ( I−J ) leads to the following update of the consensus error : ( I − J ) Xr , s+1k︸ ︷︷ ︸ Xr , s+1k , ⊥ = ( I − J ) Wk ( Xr , sk − ηG r , s k ) = ( Wk − J ) ( Xr , sk − ηG r , s k ) = ( Wk − J ) ( Xr , sk , ⊥ − ηG r , s k ) . ( 17 ) Global average dynamics . Define the global average among all xi ’ s as x̄ , 1 N N∑ i=1 xi . ( 18 ) Then accordingly to ( 15 ) we have the following update of x̄ for all s = 0 , . . . , τ − 1 : x̄r , s+1 = 1 N K∑ k=1 nx̄r , s+1k = 1 N K∑ k=1 n ( x̄r , sk − ηḡ r , s k ) = 1 N N∑ i=1 ( xr , si − ηg r , s i ) = x̄ r , s − η 1 N N∑ i=1 gr , si . ( 19 ) Filtration . Let G = [ G1 ; . . . ; GK ] ∈ RN×d be the matrix constructed by stacking all the stochastic gradients . We introduce the following filtration Fr , s = σ ( G0,0 , . . . , G0 , τ−1 , S0 , G 1,0 , . . . , G1 , τ−1 , . . . , Sr−1 , G r,0 , . . . , Gr , s ) Fr = σ ( G0,0 , . . . , G0 , τ−1 , S0 , G 1,0 , . . . , G1 , τ−1 , . . . , Sr−1 ) . ( 20 ) Therefore we have xr,0i = x r ∈ Fr for r ≥ 1 , and xr , si ∈ Fr , s−1 for 1 ≤ s ≤ τ . For simplicity the conditional expectation E ( · |Fr , s ) is denoted as Er , s , and we define the noise in the stochastic gradient as ξr , si , g r , s i −∇fi ( x r , s i ) . ( 21 ) Since at the end of round r all nodes are picked with equal probability , the sampling procedure preserves average in expectation : Er , τ−2xr+1 = E ( E ( xr+1|Fr , τ−1 ) |Fr , τ−2 ) = E E 1 K K∑ k=1 1 m ∑ i∈Srk xr , τi |Fr , τ−1 |Fr , τ−2 = E ( E ( 1 K K∑ k=1 1 m ∑ i∈Vk I ( i ∈ Srk ) x r , τ i |Fr , τ−1 ) |Fr , τ−2 ) = Er , τ−2 ( x̄r , τ ) ( 22 ) where the last equality holds since P ( i ∈ Srk|i ∈ Vk ) = mn . B CONVERGENCE ANALYSIS To prove the convergence we first establish in Sec . B.1 that the objective value Ef ( xr ) is descending at each round r , up to some consensus error terms . Subsequently , bounds on the error terms are provided in Sec . B.2-B.4 . Based on these results , the proof of convergence of Algorithm 1 with full and partial device participation are given in Sec . B.5 and B.6 , respectively . The proofs of the main propositions are given in Sec . C and that of the supporting lemmas are deferred to Sec . D. B.1 OBJECTIVE DESCENT Lemma 1 . Let { xr , si } be the sequence generated by Algorithm 1 under Assumptions 1-6 . If η > 0 , then the following inequality holds for all r ∈ N+ : Ef ( xr+1 ) ≤ Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + τ−2∑ s=0 E ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) + E ( L 2 ‖xr+1 − x̄r , τ−1‖2 ) . ( 23 ) Proof . The proof is a standard application of the descent lemma and the sampling rule applied at iteration τ to obtain xr+1 . See Appendix D.1 . Lemma 1 shows the objective value f ( xr ) is descending in expectation up to the following error terms : T1 = E ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 , T2 = E∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 T3 = E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 T4 = E‖x̄r , s+1 − x̄r , s‖2 , T5 = E‖xr+1 − x̄r , τ−1‖2 . ( 24 ) In the sequel , we will show these quantities can be bounded by the optimality gap measured in terms of the gradient norms ‖∇f ( x̄r , s ) ‖2 , ‖ ( 1/K ) ∑K k=1∇f̄k ( x̄ r , s k ) ‖2 , and ‖ ( 1/N ) ∑N i=1∇fi ( x r , s i ) ‖2 . B.2 BOUNDING T1 , T2 AND T3 . Define ρmax = max k=1 , ... , K ρk . ( 25 ) Therefore it holds 0 ≤ ρmax ≤ 1 by Assumption 3 . Since each fi is L-smooth by Assumption 1 , we have f̄k and f are also L-smooth . Using this fact and the convexity of ‖ · ‖2 we can bound T1 , T2 and T3 as T1 = E ∥∥∥∇f ( x̄r , s ) ± 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 ≤ 2 1 K K∑ k=1 L2E‖x̄r , s − x̄r , sk ‖ 2 + 2 K∑ k=1 1 N ∑ i∈Vk L2E‖x̄r , sk − x r , s i ‖ 2 , T2 = E ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 ≤ 1 K K∑ k=1 L2E ∥∥∥x̄r , s − x̄r , sk ∥∥∥2 , T3 = E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 ≤ K∑ k=1 1 N ∑ i∈Vk L2E‖x̄r , sk − x r , s i ‖ 2 . ( 26 ) Clearly , in order to bound T1,2,3 we first need to bound the inter-cluster consensus error ‖x̄r , s−x̄r , sk ‖ and the intra-cluster consensus error ‖x̄r , sk − x r , s i ‖ . Lemma 2 ( Inter-Cluster Consensus Error Bound ) . Let { xr , si } be the sequence generated by Algorithm 1 under Assumptions 1 , 2 , 3 , and 5 . If the learning rate η > 0 satisfies η2 ≤ 1 24τ ( 4τ − 1 ) L2 , ( 27 ) then for all s = 0 , . . . , τ − 1 it holds 1 K K∑ k=1 E‖x̄r , s+1 − x̄r , s+1k ‖ 2 ≤ Cτ 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + 12τη2L2 ( 1 N K∑ K=1 E ∥∥∥Xr , sk , ⊥∥∥∥2 ) + 12τη2 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 K − 1 N σ2 ( 28 ) where Cτ , 1 + 3 2 · 1 4τ − 1 . ( 29 ) Proof . See Appendix D.2 . Lemma 3 ( Intra-Cluster Consensus Error Bound ) . Let { xr , si } be the sequence generated by Algorithm 1 under Assumptions 1-5 . If η > 0 , then for all s = 0 , . . . , τ − 1 it holds 1 N K∑ k=1 E‖Xr , s+1k , ⊥ ‖ 2 ≤ ( max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + η 2ρL · 4L2 ) 1 N K∑ k=1 E‖Xr , sk , ⊥‖ 2 + 4η2ρLL 2 1 K K∑ k=1 E‖x̄r , sk − x̄ r , s‖2 + 4η2ρL ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2ρL̄2L + η2σ2ρ2max , ( 30 ) where ρmax is defined in ( 25 ) and ρL , max k=1 , ... , K { ρ2k ( 1 + ζk ) } , ̄2L , 1 K K∑ k=1 2k ( 31 ) with ζk > 0 being a free parameter to be chosen properly for all k = 1 , . . . , K. Proof . See Appendix D.3 . Combining Lemma 2 and 3 we can obtain the following bound on the sum of intra- and interconsensus errors using gradient ‖∇f ( x̄r , s ) ‖2 . Proposition 1 . Let { xr , si } be the sequence generated by Algorithm 1 under Assumptions 1-5 . If the learning rate η > 0 satisfies η2 ≤ 1 24τ ( 4τ − 1 ) L2 , ( 32 ) then for all s = 0 , . . . , τ − 1 it holds 1 K K∑ k=1 E‖x̄r , s+1 − x̄r , s+1k ‖ 2 + K∑ k=1 1 N ‖Xr , s+1k , ⊥ ‖ 2 ≤ s∑ ` =0 C1η 2 ( τ + ρ2maxDτ , ρ ) ( α2E‖∇f ( x̄r , ` ) ‖2 + 2g ) + C1η2τρ2maxDτ , ρ̄2L + C1τη 2ρ2maxσ 2 + C1 ( τ +D 2 τ , ρτ −1ρ2max ) η 2 1 n σ2 ( 33 ) where Dτ , ρ , min { τ , 1 1− ρmax } ( 34 ) and C1 > 0 is some universal constant . Proof . See Appendix C.1 . Notice that according to ( 26 ) the gradient difference terms in Lemma 1 can be bounded as η 4 E ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 + η 4 E ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 ≤η 4 ( 2 K K∑ k=1 L2E‖x̄r , s − x̄r , sk ‖ 2 + K∑ k=1 2 N ∑ i∈Vk L2E‖x̄r , sk − x r , s i ‖ 2 ) + η 4 ( 1 K K∑ k=1 L2E ∥∥∥x̄r , s − x̄r , sk ∥∥∥2 + K∑ k=1 1 N ∑ i∈Vk L2E‖x̄r , sk − x r , s i ‖ 2 ) ≤ηL2 ( 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + K∑ k=1 1 N ‖Xr , sk , ⊥‖ 2 ) ( 35 ) for all s = 1 , . . . , τ . Therefore Proposition 1 immediately leads to the following result . Corollary 2 . Under the same setting as Proposition 1 , it holds τ∑ s=0 η 4 E ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 + τ∑ s=0 η 4 E ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + τ∑ s=0 η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 ≤ τ−1∑ s=0 C1L 2η3 ( τ2 + τρ2maxDτ , ρ ) ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + C1L2η3τ2ρ2maxDτ , ρ̄2L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n . ( 36 ) We conclude this section by providing a separate bound on the consensus error 1 N ∑K k=1 Er‖X r , τ−1 k , ⊥ ‖2 that will be useful in bounding T5 . Proposition 2 . Under the same setting as Proposition 1 , if ρmax ≤ 1− 1τ , then we have 1 N E K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 ≤ 2C2 τ−2∑ s=0 D2τ , ρρmaxη 2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C2D 2 τ , ρτρ 2 maxη 2̄2L + C2 ( 1 n + ρmax ) ρmaxτDτ , ρη 2σ2 . ( 37 ) for some universal constant C2 > 0 . Proof . See Appendix C.2 . Proposition 2 shows that the average intra-cluster consensus error 1N ∑K k=1 ‖X r , τ−1 k , ⊥ ‖2 decreases as the network connectivity improves , and vanishes if ρmax goes to zero . B.3 BOUNDING T4 Proposition 3 . Under the same setting as Lemma 1 , we have E‖x̄r , s+1 − x̄r , s‖2 = η2E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + η2 σ2 N ( 38 ) for s = 0 , . . . , τ − 1 and r ∈ N+ . Proof . Recall the algorithmic update at iteration s for all s = 0 , . . . , τ − 1 : Xr , s+1k = WkX r , s k − ηWkG r , s k x̄r , s+1k = x̄ r , s k − ηḡ r , s k . ( 39 ) Therefore , it holds under Assumption 2 that E‖x̄r , s+1 − x̄r , s‖2 =E ∥∥∥∥∥ ηN N∑ i=1 ( gr , si ±∇fi ( x r , s i ) ∥∥∥∥∥ 2 = E ∥∥∥∥∥ ηN N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + η2 σ2 N . ( 40 ) B.4 BOUNDING T5 We provide the bound on T5 separately for the full device participation and partial participation cases . Full participation . When the sampling probability p = 1 , we have xr+1 = 1 N N∑ i=1 xr , τi = x̄ r , τ . In this case , it follows from Proposition 3 that E‖xr+1 − x̄r , τ−1‖2 = η2E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , τ−1i ) ∥∥∥∥∥ 2 + η2 σ2 N . ( 41 ) Partial participation . We proceed to bound T5 for 1 ≤ m ≤ n− 1 . ( 42 ) Define p = m/n . Recall the algorithmic update at iteration τ − 1 : Xr , τk = WkX r , τ−1 k − ηWkG r , τ−1 k ( 43 ) and xr+1 = 1 K K∑ k=1 1 m ∑ i∈Srk xr , τi = 1 Np K∑ k=1 ∑ i∈Srk xr , τi . ( 44 ) Therefore , with ( Wk ) i , j being the ij-th element of matrix Wk we have under Assumption 2 : E‖xr+1 − x̄r , τ−1‖2 =E ∥∥∥∥∥∥ 1Np K∑ k=1 ∑ i∈Srk xr , τi − x̄ r , τ−1 ∥∥∥∥∥∥ 2 =E ∥∥∥∥∥∥ 1Np K∑ k=1 ∑ i∈Srk ( ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − ηg r , τ−1 j ) ) − x̄r , τ−1 ∥∥∥∥∥∥ 2 =E ∥∥∥∥∥∥ 1Np K∑ k=1 ∑ i∈Vk I ( i ∈ Srk ) ( ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − η∇fj ( x r , τ−1 j ) ) − x̄r , τ−1 ∥∥∥∥∥∥ 2 ︸ ︷︷ ︸ A2,1 + η2 E ∥∥∥∥∥∥ 1Np K∑ k=1 ∑ i∈Vk I ( i ∈ Srk ) ( ∑ j∈Vk ( Wk ) i , j ( ∇fj ( xr , τ−1j ) − g r , τ−1 j ) ) ∥∥∥∥∥∥ 2 ︸ ︷︷ ︸ A2,2 . ( 45 ) Proposition 4 . Let { xr , si } be the sequence generated by Algorithm 1 under Assumptions 1-6 . If the learning rate η > 0 satisfies η2 ≤ 1 24τ ( 4τ − 1 ) L2 , ( 46 ) then we have the following bounds on A2,1 : A2,1 ≤2η2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 8 ( Gp + 1 τ2 ) ( 1 N K∑ k=1 E‖Xr , τ−1k , ⊥ ‖ 2 ) ; ( 47 ) where Gp , n−m m ( n− 1 ) . ( 48 ) Proof . See Appendix C.3 . Proposition 5 . Under the same setting as Proposition 4 , A2,2 can be bounded as A2,2 ≤ σ2 N ( 2 + n m · ρ2max ) . ( 49 ) Proof . See Appendix C.4 B.5 PROOF OF THEOREM 1 ( FULL PARTICIPATION ) We first prove the descent of the objective value under suitable choice of η . Proposition 6 . If the learning rate satisfies η ≤ 1 4C1α · 1 τL , ( 50 ) then we have Ef ( xr+1 ) ≤ Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 +Rfull ( η ) , ( 51 ) where Rfull ( η ) =C1L2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + 2C1L 2η3 ( τ2ρ2maxDτ , ρ̄ 2 L + τ 2σ2 ( 1 n + ρ2max ) ) + η2Lτ σ2 N . ( 52 ) C1 > 0 is some universal constant . Proof . See Appendix C.5 . To attain the expression of the convergence rate , we sum ( 51 ) over r = 0 , . . . , R : min r∈ [ R ] min s=0 , ... , τ−1 E‖∇f ( x̄r , s ) ‖2 ≤8 ( f ( x 0 ) − f ( x ? ) ) ητ ( R+ 1 ) + 8Rfull ( η ) ητ = 8 ( f ( x0 ) − f ( x ? ) ) ητ ( R+ 1 ) + 16ηL σ2 N︸ ︷︷ ︸ centralized SGD + 16C1L 2τ2η2 2g + 16C1L 2η2 ( τρ2maxDτ , ρ̄ 2 L + τσ 2 ( 1 n + ρ2max ) ) ︸ ︷︷ ︸ network effect . ( 53 ) The first two terms of ( 53 ) corresponds to the impact of stochastic noise and is of the same order as the centralized SGD algorithm . The last term is of order η2 and corresponds to the deterioration of convergence rate due to the fact that we are not computing the average gradients of all devices at each iteration . Denote r0 = 8 ( f ( x 0 ) − f ( x ? ) ) , r1 = 16L ( σ2 N ) , r2 = 16C1L 2τ2 2g + 16C1L 2 ( τρ2maxDτ , ρ̄ 2 L + τσ 2 ( 1 n + ρ2max ) ) . ( 54 ) The rest of the proof follows the same argument as ( Chen et al. , 2021b , Appendix B.5 ) and thus we omit the details . B.6 PROOF OF THEOREM 2 AND COROLLARY 1 ( PARTIAL PARTICIPATION ) Proposition 7 . Let { xr , si } be the sequence generated by Algorithm 1 under Assumption 1-5 . If the learning rate η and the network connectivity satisfies η ≤ 1 C3α2 · 1 τL and ρmax ≤ 1− 1 τ , ( 55 ) then Ef ( xr+1 ) ≤ Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 +R ( 1 ) part ( η ) +R ( 2 ) part ( η ) ( 56 ) with R ( 1 ) part ( η ) =C1L2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + 2C1L 2η3 ( τ2ρ2maxDτ , ρ̄ 2 L + τ 2σ2 ( 1 n + ρ2max ) ) + Lτη2 σ2 N , ( 57 ) R ( 2 ) part ( η ) = ( 8C2G ′ pLD 2 τ , ρτρmax ) η2 2g + 4C2LG ′ pη 2 ( D2τ , ρτρ 2 max̄ 2 L + ( 1 n + ρmax ) ρmaxτDτ , ρσ 2 ) + L 2 ( n m ρ2max ) η2 σ2 N . C1 , C3 > 0 are some universal constants , and G′p = Gp + 1 τ2 , with Gp = n−m m ( n− 1 ) . ( 58 ) Proof . See Appendix C.6 Comparing ( 56 ) to ( 51 ) we can see thatR ( 1 ) part ( η ) is of the same order asR ( 1 ) full ( η ) , whileR ( 2 ) part ( η ) is an extra loss term introduced by sampling . Following the same steps as the proof of Theorem 1 gives min r∈ [ R ] min s=0 , ... , τ−1 E‖∇f ( x̄r , s ) ‖2 =O σ + E ( g , ̄L , σ , ρmax ) √ NτR + ( τ2 2g + τρ 2 maxDτ , ρ̄ 2 L + τ ( 1 n + ρ 2 max ) σ2 ) 1 3 ( τR ) 2 3 + 1 R , ( 59 ) where E2 ( g , ̄L , σ , ρmax ) = ( 2gDτ , ρ + ρmaxDτ , ρ̄2L + σ2 ) ·G′pDτ , ρρmaxN + n m · 1 τ ρ2maxσ 2 . ( 60 ) Our last step simplifies the overall conditions on ρmax so that E2 ( g , ̄L , σ , ρmax ) = O ( 1 ) : ρmax ≤ 1− 1 τ , G′pD 2 τ , ρρmax ≤ 1 N , ρmax ≤ m n · τ . ( 61 ) We claim to fulfill ( 61 ) it suffices to require ρmax ≤ 1 4N min { m , τ − 1 } . ( 62 ) When τ = 1 , the condition trivially requires ρmax = 0 . We then consider the case for τ ≥ 2 . By definition , it can be verified that G′p ≤ 1 m + 1 τ2 . ( 63 ) First notice that m 4N ≤ 1 4 ≤ 1− 1 τ and τ 4N ≤ m n · τ . ( 64 ) Therefore , it remains to prove ( 62 ) implies G′pD 2 τ , ρρmax ≤ 1 N . ( 65 ) Using the fact that under ( 62 ) ρmax ≤ 1/4 we have G′pD 2 τ , ρρmax = G ′ pρmax · 1 ( 1− ρmax ) 2 ≤16 9 ρmax ( 1 m + 1 τ2 ) ≤ 16 9 ( 1 m + 1 τ2 ) 1 4N min { m , τ } ≤ 1 N . ( 66 ) This proves the claim . C PROOF OF MAIN PROPOSITIONS C.1 PROOF OF PROPOSITION 1 Denote for short Mr , s , 1 N K∑ k=1 E‖Xr , sk , ⊥‖ 2 1 K K∑ k=1 E‖x̄r , sk − x̄ r , s‖2 . ( 67 ) Invoking Lemma 2 and Lemma 3 we obtain that under the condition that the learning rate η > 0 satisfies η2 ≤ 1 24τ ( 4τ − 1 ) L2 , ( 68 ) the following inequality is satisfied for all s = 0 , . . . , τ − 1 : Mr , s+1 ≤ G ·Mr , s +Br , s , ( 69 ) where G = ( maxk∈ [ K ] ρ 2 k ( 1 + ζ −1 k ) + η 2ρL · 4L2 η2ρL · 4L2 12τη2L2 Cτ ) ( 70 ) Br , s = ( 4ρLη 2 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2ρL̄2L + η2ρ2maxσ2 12τη2 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 σ 2 n . ) ( 71 ) The inequality in ( 69 ) is defined elementwise . Unrolling ( 69 ) yields Mr , s+1 ≤ s∑ ` =0 G ` Br , s− ` , ( 72 ) where we have used the fact that Mr,0 = 0 due to full synchronization of the xi ’ s at the beginning of each round r. We first provide a bound on the sum of the two elements of G ` Br , s− ` . For simplicity we omit the round index r in the superscript for the rest of this section . Lemma 4 . Let bs− ` 1 and b s− ` 2 be the first and second element of B s− ` , respectively . Suppose the learning rate η > 0 then ( 1 , 1 ) G ` Bs− ` ≤ λ ` 2 ( bs− ` 1 + b s− ` 2 ) + λ ` 2 − λ ` 1 λ2 − λ1 η2 · ( 12τL2bs− ` 1 + 4ρLL 2bs− ` 2 ) ( 73 ) where λ1 ≤ λ2 are the eigenvalues of G ; and ρL is defined in ( 31 ) . Proof . See Appendix D.4 . From Lemma 4 we immediately get s∑ ` =0 ( 1 , 1 ) ·G ` Bs− ` ≤ s∑ ` =0 ( λ ` 2 ( b s− ` 1 + b s− ` 2 ) + λ ` 2 − λ ` 1 λ2 − λ1 η2 · ( 12τL2bs− ` 1 + 4ρLL 2bs− ` 2 ) ) . ( 74 ) Since λ2 ≥ Cτ > 1 , we have λ ` 2 − λ ` 1 λ2 − λ1 = λ ` −12 ` −1∑ s=0 ( λ1 λ2 ) s ≤ λ ` −12 min { λ2 λ2 − λ1 , ` } ≤ λ ` 2 min { 1 λ2 − λ1 , ` } ( 75 ) and thus s∑ ` =0 ( 1 , 1 ) ·G ` Bs− ` ≤ s∑ ` =0 λ ` 2 ( b s− ` 1 + b s− ` 2 ) + s∑ ` =0 ( λ ` 2 min { 1 λ2 − λ1 , ` } ) η2 · ( 12τL2bs− ` 1 + 4ρLL 2bs− ` 2 ) . ( 76 ) Recall the definition of ρL given by ( 31 ) : ρL = max k=1 , ... , K ρ2k ( 1 + ζk ) . ( 77 ) By the Gershgorin ’ s theorem , since η > 0 , we can upperbound λ2 as λ2 ≤ max { max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + η 2ρL · 8L2 , Cτ + 12τη2L2 } ≤ max { max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + ρL ( 4τ − 1 ) 3τ , 1 + 2 4τ − 1 } , ( 78 ) where the last inequality is due to the bound on η : η2 ≤ 1 24τ ( 4τ − 1 ) L2 . ( 79 ) Define constant Dτ , ρ = min { τ , 1 1− ρmax } . ( 80 ) We consider two cases . • Case 1 : ρmax ≤ 1− 1 τ ⇒ 1 1− ρmax ≤ τ . ( 81 ) Thus Dτ , ρ = 1/ ( 1− ρmax ) . We let ζk = ρk/ ( 1− ρk ) and it gives max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) = ρmax , ρL = max k=1 , ... , K { ρ2k 1− ρk } = ρ2max 1− ρmax = ρ2maxDτ , ρ . ( 82 ) Substituting into the bound of λ2 [ cf . ( 78 ) ] gives λ2 ≤ max { ρmax + ρ2max ( 1− ρmax ) 3τ ( 4τ − 1 ) , 1 + 2 4τ − 1 } ≤ max 1− 1τ + ( 1− 1τ ) 2 3 ( 4τ − 1 ) , 1 + 2 4τ − 1 < 1 + 34τ − 1 , ( 83 ) where in the second inequality we used the condition ( 81 ) . Since s ≤ τ and λ2 ≥ 1 , we obtain the following bound s∑ ` =0 λ ` 2b s− ` 1 ≤ ( ( 1 + 3 4τ − 1 ) τ ) · ( s∑ ` =0 b ` 1 ) ≤ 3 · ( s∑ ` =0 b ` 1 ) . ( 84 ) Moreover , since ρmax + η 2ρL · 4L2 ≤ ρmax + ρ2max ( 1− ρmax ) ( 4τ − 1 ) 6τ ( 81 ) ≤ 1− 1 τ + ( 1− 1τ ) 2 6 ( 4τ − 1 ) ≤ Cτ , ( 85 ) we can bound λ2 − λ1 as λ2 − λ1 ≥ Cτ − ρmax − η2ρL · 4L2 ≥ Cτ − ( ρmax + ρ2max ( 1− ρmax ) ( 4τ − 1 ) 6τ ) ( 81 ) ≥ Cτ − ( ρmax + ρmax · 1− 1τ 6 ( 4τ − 1 ) ) ≥ 1 + 1 4τ − 1 − ( ρmax + ρmax · 1 4τ − 1 ) = ( 1− ρmax ) ( 1 + 1 4τ − 1 ) ≥ 1− ρmax . ( 86 ) Collecting ( 84 ) and ( 86 ) we can bound ( 76 ) as s∑ ` =0 ( 1 , 1 ) ·G ` Bs− ` ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 η2 · ( 12τL2b ` 1 + 4ρLL 2b ` 2 ) · 3 ( min { 1 λ2 − λ1 , τ } ) ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 η2 · ( 12τL2b ` 1 +Dτ , ρρ 2 max4L 2b ` 2 ) · 3Dτ , ρ ( 79 ) ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 ( 12τb ` 1 +Dτ , ρρ 2 max4b ` 2 ) · 3Dτ , ρ 1 ( 4τ − 1 ) 24τ ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 ( 12τb ` 1 +Dτ , ρρ 2 max4b ` 2 ) · 1 8 Dτ , ρ τ2 = s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 ( 12τb ` 1 +Dτ , ρρ 2 max4b ` 2 ) · 1 8 Dτ , ρ τ2 . ( 87 ) Substituting the expression of b ` 1 and b ` 2 gives s∑ ` =0 ( 1 , 1 ) ·G ` Bs− ` ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 5 + s∑ ` =0 D2τ , ρ τ2 · ρ2maxb ` 2 = s∑ ` =0 5 ( 4η2 ( ρL + 3τ ) ( α 2E‖∇f ( x̄r , ` ) ‖2 + 2g ) + 4η2ρL̄2L + η2ρ2maxσ2 + η2 1 n σ2 ) + s∑ ` =0 D2τ , ρ τ2 · ρ2max ( 12τη2 ( α2E‖∇f ( x̄r , ` ) ‖2 + 2g ) + η2 1 n σ2 ) ≤ s∑ ` =0 C1 2 η2 ( ρL + τ + ρ 2 maxD 2 τ , ρτ −1 ) ( α2E‖∇f ( x̄r , ` ) ‖2 + 2g ) + C1 2 η2τρL̄ 2 L + C1 2 τη2ρ2maxσ 2 + C1 2 ( τ +D2τ , ρτ −1ρ2max ) η 2 1 n σ2 ≤ s∑ ` =0 C1η 2 ( τ + ρ2maxDτ , ρ ) ( α2E‖∇f ( x̄r , ` ) ‖2 + 2g ) + C1η2τρ2maxDτ , ρ̄2L + C1τη 2ρ2maxσ 2 + C1 ( τ +D 2 τ , ρτ −1ρ2max ) η 2 1 n σ2 ( 88 ) where C1 is some universal constant . The last inequality holds since ρL = ρ2maxDτ , ρ and Dτ , ρ ≤ τ . • Case 2 : ρmax > 1− 1 τ ⇒ Dτ , ρ = τ . ( 89 ) In such a case , we let ζk = ( 4τ − 1 ) and thus max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) = ρ 2 max ( 1 + ( 4τ − 1 ) −1 ) , ρL = 4τρ2max = 4ρ2maxDτ , ρ . ( 90 ) Substituting into the bound of λ2 given in ( 78 ) , applying again the learning rate condition ( 79 ) and using the fact that Dτ , ρ = τ : λ2 ≤ max { ρ2max ( 1 + ( 4τ − 1 ) −1 ) + 4ρ2max 3 ( 4τ − 1 ) , 1 + 2 ( 4τ − 1 ) } ≤ 1 + 3 4τ − 1 . ( 91 ) Therefore by ( 76 ) , ( 79 ) , ( 84 ) , and the fact that min { 1 λ2 − λ1 , ` } ≤ τ = Dτ , ρ ( 92 ) we obtain s∑ ` =0 ( 1 , 1 ) ·G ` Bs− ` ≤ s∑ s=0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 η2 · ( 12τL2b ` 1 + 16ρ 2 maxDτ , ρL 2b ` 2 ) · 3Dτ , ρ ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 3 + s∑ ` =0 ( 12τb ` 1 + 16ρ 2 maxDτ , ρb ` 2 ) 1 8 Dτ , ρ τ2 ≤ s∑ ` =0 ( b ` 1 + b ` 2 ) · 5 + s∑ ` =0 2 D2τ , ρ τ2 ρ2maxb ` 2 . ( 93 ) Substituting the expression of b1 and b2 and using the fact that ρL = 4τρ 2 max = 4ρ 2 maxDτ , ρ we arrive at the same bound as in Case 1 , possibly with a different constant C1 . C.2 PROOF OF PROPOSITION 2 We are in Case 1 described in the proof of Proposition 1 . By letting ζk = ρk/ ( 1− ρk ) we have G = ( ρmax + ρ2max 1−ρmax · η 2 · 4L2 ρ 2 max 1−ρmax · η 2 · 4L2 12τη2L2 Cτ ) ( 94 ) and the following bound on the difference of the eigenvalues of G : λ2 − λ1 ≥ 1− ρmax . ( 95 ) Notice that according to ( 72 ) and ( 149 ) 1 N K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 = 1 det ( T ) τ−2∑ ` =0 tτ−2− ` 1 . Therefore 1 N K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 = 1 12τη2L2 ( λ2 − λ1 ) τ−2∑ ` =0 ( ( Cτ − λ1 ) ( λ ` 112τη 2L2bτ−2− ` 1 − λ ` 1 ( λ2 − Cτ ) b τ−2− ` 2 ) ) + 1 12τη2L2 ( λ2 − λ1 ) τ−2∑ ` =0 ( ( λ2 − Cτ ) ( λ ` 212τη 2L2bτ−2− ` 1 + λ ` 2 ( Cτ − λ1 ) bτ−2− ` 2 ) ) ≤ 1 12η2L2τ ( 1− ρmax ) τ−2∑ ` =0 ( ( Cτ − λ1 ) λ ` 1 ( 12τη2L2bτ−2− ` 1 − ( λ2 − Cτ ) b τ−2− ` 2 ) ) + 1 12η2L2τ ( 1− ρmax ) τ−2∑ ` =0 ( ( λ2 − Cτ ) λ ` 2 ( 12τη2L2bτ−2− ` 1 + ( Cτ − λ1 ) b τ−2− ` 2 ) ) . ( 96 ) In the following , we bound λ1 and λ2 − Cτ as a function of ρmax . For notation simplicity we omit the subscript of ρmax in the rest of the proof . Further , we introduce the following shorthand notation for the elements of G : f ( ρ ) = ρ+ ρ2 1− ρ · η2 · 4L2 , g ( ρ ) = ρ 2 1− ρ · η2 · 4L2 , and h ( τ ) = 12τη2L2 . ( 97 ) The eigenvalues of G then can be written in closed form as λ1,2 = f ( ρ ) + Cτ ± √ ( Cτ − f ( ρ ) ) 2 + 4g ( ρ ) h ( τ ) 2 . ( 98 ) Since we have proved in Proposition 1 that Cτ ≥ f ( ρ ) [ cf . ( 85 ) ] , this gives us the following upperbounds on λ2 as : Cτ ≤ λ2 = f ( ρ ) + Cτ + √ ( Cτ − f ( ρ ) ) 2 + 4g ( ρ ) h ( τ ) 2 ≤ Cτ + √ g ( ρ ) h ( τ ) . ( 99 ) Furthermore , applying the Gershgorin ’ s theorem we obtain λ1 ≥ min { ρ , Cτ − 12τη2L2 } ≥ ρ ≥ 0 . ( 100 ) under the learning rate condition ( 79 ) . Substituting the bounds into ( 96 ) gives 1 N K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 ≤ 1 12η2L2τ ( 1− ρ ) τ−2∑ ` =0 ( Cτλ ` 1 ( 12τη2L2bτ−2− ` 1 − ( λ2 − Cτ ) b τ−2− ` 2 ) ) + 1 12η2L2τ ( 1− ρ ) τ−2∑ ` =0 ( ( λ2 − Cτ ) λ ` 2 ( 12τη2L2bτ−2− ` 1 + Cτ b τ−2− ` 2 ) ) ≤ 1 12η2L2τ ( 1− ρ ) τ−2∑ ` =0 ( Cτf ( ρ ) ` ( 12τη2L2bτ−2− ` 1 ) ) + 1 12η2L2τ ( 1− ρ ) τ−2∑ ` =0 ( √ g ( ρ ) h ( τ ) λ ` 2 ( 12τη2L2bτ−2− ` 1 + Cτ b τ−2− ` 2 ) ) ≤ 1 1− ρ Cτ ( τ−2∑ ` =0 b ` 1 ) + 1 1− ρ √ g ( ρ ) h ( τ ) λτ2 ( τ−2∑ ` =0 b ` 1 ) + Cτ 12η2L2τ ( 1− ρ ) √ g ( ρ ) h ( τ ) λτ2 ( τ−2∑ ` =0 b ` 2 ) ≤Dτ , ρCτ ( τ−2∑ ` =0 b ` 1 ) + 3Dτ , ρη 2L2ρ √ Dτ , ρ · 48τ ( τ−2∑ ` =0 b ` 1 ) + Dτ , ρCτ 12τ ρ √ Dτ , ρ · 48τ ( τ−2∑ ` =0 b ` 2 ) . ( 101 ) where we have used the bound λ1 ≤ f ( ρ ) < 1 , λ2 > 1 and λτ2 < 3 . Plug in the expression of b1 and b2 and using the fact that Cτ < 2 , ρL = ρ2Dτ , ρ gives 1 N K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 ≤ ( 2Dτ , ρ + 3Dτ , ρη 2L2ρ √ Dτ , ρ · 48τ ) ρ2 τ−2∑ s=0 ( 4η2Dτ , ρ ( α 2‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2Dτ , ρ̄2L + η2σ2 ) + Dτ , ρCτ 12τ ρ √ Dτ , ρ · 48τ τ−2∑ s=0 ( 12τη2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 σ2 n ) ≤ ( 2Dτ , ρ + Dτ , ρ τ ρ ) τ−2∑ s=0 ρ2 ( 4η2Dτ , ρ ( α 2‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2Dτ , ρ̄2L + η2σ2 ) + 2 Dτ , ρ τ ρ √ Dτ , ρ · τ τ−2∑ s=0 ( 12τη2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 1 n σ2 ) ≤3Dτ , ρρ2 τ−2∑ s=0 ( 4η2Dτ , ρ ( α 2‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2Dτ , ρ̄2L + η2σ2 ) + 2Dτ , ρρ √ Dτ , ρτ−1 τ−2∑ s=0 ( 12τη2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 1 n σ2 ) , ( 102 ) where the second inequality holds since 3τ2η2L2 ≤ 3τ2L2 · 1 24τ ( 4τ − 1 ) L2 ≤ 3τ2L2 · 1 24τ ( 2τ ) L2 < 1 8 ( 103 ) ⇒3Dτ , ρη2L2ρ √ Dτ , ρ · 48τ ≤ Dτ , ρ 8τ2 √ Dτ , ρ · 48τρ ≤ Dτ , ρ τ ρ ( 104 ) and the last inequality holds since Dτ , ρ ≤ τ . Tidy up the expression gives 1 N K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 ≤ τ−2∑ s=0 3Dτ , ρρ 2 ( 4η2Dτ , ρ ( α 2‖∇f ( x̄r , s ) ‖2 + 2g ) + 4η2Dτ , ρ̄2L + η2σ2 ) + τ−2∑ s=0 2Dτ , ρρ √ Dτ , ρτ−1 ( 12τη 2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 1 n σ2 ) ≤ C2 τ−2∑ s=0 ( D2τ , ρρ 2 + ( Dτ , ρ ) 1.5τ−0.5ρ ) η2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C2 ( Dτ , ρ ) 2τρ2η2̄2L + C2τDτ , ρρ 2η2σ2 + C2τ · ( Dτ , ρ ) 1.5τ−0.5ρη2 1 n σ2 ≤ 2C2 τ−2∑ s=0 D2τ , ρρη 2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C2 ( Dτ , ρ ) 2τρ2η2̄2L + C2 ( 1 n + ρ ) ρτDτ , ρη 2σ2 ( 105 ) for some C2 > 0 . The last inequality holds since ( Dτ , ρ ) 1.5τ−0.5 ≤ Dτ , ρ . ( 106 ) C.3 PROOF OF PROPOSITION 4 We prove ( 47 ) by splitting the terms A2,1 follows : A2,1 ( a ) =E ∥∥∥∥∥∥ 1Np K∑ k=1 ∑ i∈Vk I ( i ∈ Srk ) ( ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − η∇fj ( x r , τ−1 j ) − x̄ r , τ−1 k ) ∥∥∥∥∥∥ 2 ≤2E ∥∥∥∥∥ 1Np K∑ k=1 p · nη∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2E ∥∥∥ 1 Np K∑ k=1 ∑ i∈Vk I ( i ∈ Srk ) rik ∥∥∥2 , ( 107 ) where rik , ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − x̄ r , τ−1 k − η ( ∇fj ( x r , τ−1 j ) −∇f̄k ( x̄ r , τ−1 k ) ) . ( 108 ) Equality ( a ) holds since K∑ k=1 ∑ i∈Srk ∑ j∈Vk ( Wk ) i , j x̄ r , τ−1 k = K∑ k=1 ∑ i∈Srk x̄r , τ−1k = K∑ k=1 m · x̄r , τ−1k = K∑ k=1 p ∑ i∈Vk xr , τ−1i = Npx̄ r , τ−1 , ( 109 ) and similarly , ∑ i∈Srk ∑ j∈Vk ( Wk ) i , j∇f̄k ( x̄r , τ−1k ) = np∇f̄k ( x̄ r , τ−1 k ) . ( 110 ) Since samples are taken according to the rule specified by Assumption 6 , the following probabilities hold : P ( i ∈ Srk | i ∈ Vk ) = p , P ( i , j ∈ Srk | , i , j ∈ Vk ) = p · np− 1 n− 1 , ( 111 ) P ( i ∈ Srk , j ∈ Sr ` | i ∈ Vk , j ∈ V ` , k 6= ` ) = p2 . ( 112 ) Consequently , we can evaluate the second term in ( 107 ) and obtain A2,1 =2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 E p K∑ k=1 ∑ i∈Vk ‖rik‖2 + p · np− 1 n− 1 K∑ k=1 ∑ i , j∈Vk r > ikrjk + 2 ( Np ) 2 · p2 ∑ k 6= ` ∑ i∈Vk ∑ j∈V ` E ( r > ikrj ` ) =2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 E ( p · np− 1 n− 1 ∥∥∥ K∑ k=1 ∑ i∈Vk rik ∥∥∥2 + p ( 1− p ) n n− 1 K∑ k=1 ∑ i∈Vk ‖rik‖2 ) + 2 ( Np ) 2 p ( 1− p ) n− 1 E ∑ k 6= ` ∑ i∈Vk ∑ j∈V ` r > ikrj ` ≤2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 E ( p · np− 1 n− 1 ∥∥∥ K∑ k=1 ∑ i∈Vk rik ∥∥∥2 + p ( 1− p ) n n− 1 K∑ k=1 ∑ i∈Vk ‖rik‖2 ) + 2 ( Np ) 2 p ( 1− p ) n− 1 E ∑ k 6= ` ∑ i∈Vk ∑ j∈V ` 1 2 ‖rik‖2 + 1 2 ‖rj ` ‖2 ≤2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 E ( p · np− 1 n− 1 ∥∥∥ K∑ k=1 ∑ i∈Vk rik ∥∥∥2 + p ( 1− p ) n n− 1 K∑ k=1 ∑ i∈Vk ‖rik‖2 ) + 2 ( Np ) 2 p ( 1− p ) n− 1 ( K − 1 ) n K∑ k=1 ∑ i∈Vk E‖rik‖2 . ( 113 ) By substituting the expression of rik we can bound terms ‖ ∑K k=1 ∑ i∈Vk rik‖ 2 and∑K k=1 ∑ i∈Vk ‖rik‖ 2 as ∥∥∥ K∑ k=1 ∑ i∈Vk rik ∥∥∥2 = ∥∥∥ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − x̄ r , τ−1 k − η ( ∇fj ( x r , τ−1 j ) −∇f̄k ( x̄ r , τ−1 k ) ) ∥∥∥2 = η2 ∥∥∥∥∥∥ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , j ( ∇fj ( xr , τ−1j ) −∇f̄k ( x̄ r , τ−1 k ) ) ∥∥∥∥∥∥ 2 = η2 ∥∥∥∥∥∥ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , j ( ∇fj ( xr , τ−1j ) −∇fj ( x̄ r , τ−1 k ) ) ∥∥∥∥∥∥ 2 ≤ η2N K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , jL 2‖xr , τ−1j − x̄ r , τ−1 k ‖ 2 ≤ η2N K∑ k=1 ∑ i∈Vk L2‖xr , τ−1i − x̄ r , τ−1 k ‖ 2 = η2 ·NL2 K∑ k=1 ‖Xr , τ−1k , ⊥ ‖ 2 ( 114 ) and K∑ k=1 ∑ i∈Vk ‖rik‖2 = K∑ k=1 ∑ i∈Vk ∥∥∥∥∥∥ ∑ j∈Vk ( Wk ) i , j ( x r , τ−1 j − x̄ r , τ−1 k − η ( ∇fj ( x r , τ−1 j ) −∇f̄k ( x̄ r , τ−1 k ) ) ∥∥∥∥∥∥ 2 ≤ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , j ∥∥∥xr , τ−1j − x̄r , τ−1k − η ( ∇fj ( xr , τ−1j ) −∇fj ( x̄r , τ−1k ) ) ∥∥∥2 ≤ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , j ( 2 ∥∥∥xr , τ−1j − x̄r , τ−1k ∥∥∥2 + 2η2 ∥∥∥∇fj ( xr , τ−1j ) −∇fj ( x̄r , τ−1k ) ∥∥∥2 ) ≤ K∑ k=1 ∑ i∈Vk 2 ∥∥∥xr , τ−1i − x̄r , τ−1k ∥∥∥2 + 2η2L2 K∑ k=1 ∑ i∈Vk ‖xr , τ−1i − x̄ r , τ−1 k ‖ 2 = K∑ k=1 2 ( 1 + η2L2 ) ‖Xr , τ−1k , ⊥ ‖ 2 . ( 115 ) Tidy up the expression leads to the following bound of A2,1 : A2,1 ≤2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 ( p · np− 1 n− 1 E ∥∥∥ K∑ k=1 ∑ i∈Vk rik ∥∥∥2 ) + 2 ( Np ) 2 p ( 1− p ) N n− 1 K∑ k=1 ∑ i∈Vk E‖rik‖2 ≤2E ∥∥∥∥∥ 1K K∑ k=1 η∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 ( Np ) 2 ( p · np− 1 n− 1 η2 ·NL2 K∑ k=1 E‖Xr , τ−1k , ⊥ ‖ 2 ) + 2 ( Np ) 2 p ( 1− p ) N n− 1 ( K∑ k=1 2 ( 1 + η2L2 ) E‖Xr , τ−1k , ⊥ ‖ 2 ) ≤2η2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 2 N η2L2 K∑ k=1 E‖Xr , τ−1k , ⊥ ‖ 2 + 4 N 1− p p ( n− 1 ) ( K∑ k=1 ( 1 + η2L2 ) E‖Xr , τ−1k , ⊥ ‖ 2 ) ≤2η2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 8 N ( 1− p p ( n− 1 ) + 1 τ2 ) ( K∑ k=1 E‖Xr , τ−1k , ⊥ ‖ 2 ) , ( 116 ) where the last inequality holds under the learning rate condition η2 ≤ 1 24τ ( 4τ − 1 ) L2 . ( 117 ) This completes the proof of ( 47 ) . C.4 PROOF OF PROPOSITION 5 We bound A2,2 in following the same rationale as Proposition 4 . A2,2 =E ∥∥∥ 1 Np K∑ k=1 ∑ i∈Vk I ( i ∈ Srk ) ( ∑ j∈Vk ( Wk ) i , j ( ∇fj ( xr , sj ) − g r , s j ) ) ︸ ︷︷ ︸ eik ∥∥∥2 = 1 ( Np ) 2 ( p · np− 1 n− 1 E ∥∥∥ K∑ k=1 ∑ i∈Vk eik ∥∥∥2 + p ( 1− p ) n n− 1 K∑ k=1 ∑ i∈Vk E‖eik‖2 ) + 2 ( Np ) 2 p ( 1− p ) n− 1 E ∑ k 6= ` ∑ i∈Vk ∑ j∈V ` e > ikej ` = 1 ( Np ) 2 ( p · np− 1 n− 1 E ∥∥∥ K∑ k=1 ∑ i∈Vk eik ∥∥∥2 + p ( 1− p ) n n− 1 K∑ k=1 ∑ i∈Vk E‖eik‖2 ) , ( 118 ) where the last equality is due to fact that the inter-cluster stochastic noise is zero mean and independent . Recall the definition ξr , si , g r , s i −∇fi ( x r , s i ) . Using again the independence of the ξi ’ s we get E ∥∥∥ K∑ k=1 ∑ i∈Vk eik ∥∥∥2 = E∥∥∥ K∑ k=1 ∑ i∈Vk ∑ j∈Vk ( Wk ) i , jξ r , s j ∥∥∥2 = E∥∥∥ N∑ i=1 ξr , si ∥∥∥2 = Nσ2 , ( 119 ) and K∑ k=1 ∑ i∈Vk E‖eik‖2 = K∑ k=1 ∑ i∈Vk E ∥∥∥ ∑ j∈Vk ( Wk ) i , jξ r , s j ∥∥∥2 = K∑ k=1 ‖Wk‖2σ2 = K∑ k=1 σ2 n∑ j=1 d2j ≤ K∑ k=1 σ2 ( 1 + ( n− 1 ) ρ2k ) ≤ Kσ2 + ( n− 1 ) Kρ2maxσ2 = ( 1 + ( n− 1 ) ρ2max ) Kσ2 . ( 120 ) where d1 ≤ d2 ≤ · · · ≤ dn = 1 are the singular values of Wk . Therefore , A2,2 ≤ 1 ( Np ) 2 ( p · np− 1 n− 1 ·Nσ2 + p ( 1− p ) n n− 1 ( 1 + ( n− 1 ) ρ2max ) Kσ2 ) = 1 Np ( np− 1 n− 1 σ2 ) + 1 Np ( 1− p n− 1 ( 1 + ( n− 1 ) ρ2max ) σ2 ) ≤ σ 2 N + σ2 N p−1 − 1 n− 1 ( 1 + ( n− 1 ) ρ2max ) ≤ σ 2 N ( 2 + p−1ρ2max ) . ( 121 ) The last inequality is due to p ≥ 1/n . C.5 PROOF OF PROPOSITION 6 Invoking the descent inequality Lemma 1 and the error bound for T1-T5 given by Corollary 2 , Proposition 3 and Eq . ( 41 ) : Ef ( xr+1 ) ≤Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + C1L 2η3τ ( τ + ρ2maxDτ , ρ ) τ−1∑ s=0 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C1L2η3τ2ρ2maxDτ , ρ̄2L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n + η2L 2 τ−1∑ s=0 E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + η2L 2 τ σ2 N ≤Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 + C1L 2η3τ ( τ + ρ2maxDτ , ρ ) τ−1∑ s=0 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + C1L2η3τ2ρ2maxDτ , ρ̄2L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n + η2Lτ σ2 N . ( 122 ) The last inequality holds under the condition that η ≤ 1 2L . ( 123 ) If we further enforce C1L 2η3τ ( τ + ρ2maxDτ , ρ ) α2 ≤ η 8 ⇔ η2 ≤ 1 8C1L2τ ( τ + ρ2maxDτ , ρ ) α 2 , ( 124 ) then Ef ( xr+1 ) ≤Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 + C1L 2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + C1L 2η3τ2ρ2maxDτ , ρ̄ 2 L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n + η2Lτ σ2 N =Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 + C1L2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + C1L 2η3 ( τ2ρ2max ( Dτ , ρ̄ 2 L + σ 2 ) + ( τ2 +D2τ , ρρ 2 max ) σ2 n ) + η2Lτ σ2 N ≤Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 + η2Lτ σ 2 N + C1L 2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + 2C1L 2η3 ( τ2ρ2maxDτ , ρ̄ 2 L + τ 2σ2 ( 1 n + ρ2max ) ) , ( 125 ) the last inequality is due to Dτ , ρ ≤ τ and ρmax ≤ 1 . C.6 PROOF OF PROPOSITION 7 Invoking the descent inequality Lemma 1 and the error bound for T1-T5 given by Corollary 2 , Proposition 3 , and 4 : Ef ( xr+1 ) ≤ Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + τ−2∑ s=0 E ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) + E ( L 2 ‖xr+1 − x̄r , τ−1‖2 ) ≤Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + C1L 2η3τ ( τ + ρ2maxDτ , ρ ) τ−1∑ s=0 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C1L2η3τ2ρ2maxDτ , ρ̄2L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n + L 2 η2 τ−2∑ s=0 E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + L 2 η2 ( τ − 1 ) σ 2 N + Lη2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + L 2 ( Gp + 1 τ2 ) ( 8 N K∑ k=1 E‖Xr , τ−1k , ⊥ ‖ 2 ) + L 2 η2 σ2 N ( 2 + n m ρ2max ) . ( 126 ) Denote for short G′p , Gp + 1 τ2 . ( 127 ) Further applying the bounds on the consensus error derived in Proposition 2 : Ef ( xr+1 ) ≤Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + C1L 2η3τ ( τ + ρ2maxDτ , ρ ) τ−1∑ s=0 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) + C1L2η3τ2ρ2maxDτ , ρ̄2L + C1τ 2L2η3ρ2maxσ 2 + C1L 2 ( τ2 +D2τ , ρρ 2 max ) η 3σ 2 n + L 2 η2 τ−2∑ s=0 E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + L 2 η2 ( τ − 1 ) σ 2 N + Lη2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + 4LG′p ( 2C2 τ−2∑ s=0 D2τ , ρρmaxη 2 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) ) + 4LG′p ( C2D 2 τ , ρτρ 2 maxη 2̄2L + C2 ( 1 n + ρmax ) ρmaxτDτ , ρη 2σ2 ) + L 2 η2 σ2 N ( 2 + n m ρ2max ) ( 128 ) Rearranging terms and tidy up the expression we have Ef ( xr+1 ) ≤Ef ( xr ) − η 4 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 τ−1∑ s=0 E ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + L 2 η2 τ−2∑ s=0 E ∥∥∥∥∥ 1N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + Lη2E ∥∥∥∥∥ 1K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥∥∥ 2 + C1L 2η3τ ( τ + ρ2maxDτ , ρ ) τ−1∑ s=0 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) ( 129 ) + 8C2G ′ pLD 2 τ , ρρmaxη 2 ( τ−2∑ s=0 ( α2‖∇f ( x̄r , s ) ‖2 + 2g ) ) + C1L 2η3 ( τ2Dτ , ρρ 2 max̄ 2 L + τ 2ρ2maxσ 2 + ( τ2 +D2τ , ρρ 2 max ) σ2 n ) + L 2 ( τ − 1 ) η2σ 2 N + L 2 ( 2 + n m ρ2max ) η2 σ2 N + 4C2LG ′ pη 2 ( D2τ , ρτρ 2 max̄ 2 L + ( 1 n + ρmax ) ρmaxτDτ , ρσ 2 ) . Notice that if the following conditions on the learning rate are satisfied η 4 ≥ η2L , η 8 ≥ C1L2η3τ ( τ + ρ2maxDτ , ρ ) α2 + 8C2G ′ pLD 2 τ , ρρmaxη 2α2 , ( 130 ) then the terms associated to the gradients will be negative and Ef ( xr+1 ) ≤Ef ( xr ) − η 8 τ−1∑ s=0 E‖∇f ( x̄r , s ) ‖2 + C1L 2η3τ2 ( τ + ρ2maxDτ , ρ ) 2g + 2C1L 2η3 ( τ2ρ2maxDτ , ρ̄ 2 L + τ 2σ2 ( 1 n + ρ2max ) ) + Lτη2 σ2 N + ( 8C2G ′ pLD 2 τ , ρτρmax ) η2 2g + 4C2LG ′ pη 2 ( D2τ , ρτρ 2 max̄ 2 L + ( 1 n + ρmax ) ρmaxτDτ , ρσ 2 ) + L 2 ( n m ρ2max ) η2 σ2 N . In the last step we clean the condition on the learning rate η . Collecting all the conditions on η : η2 ≤ 1 24L2τ ( 4τ − 1 ) , ( 131 ) η 4 ≥ η2L , ( 132 ) η 8 ≥ C1L2η3τ ( τ + ρ2maxDτ , ρ ) α2 + 8C2G ′ pLD 2 τ , ρρmaxη 2α2 . ( 133 ) Clearly , ( 131 ) implies ( 132 ) . To ensure ( 133 ) it suffices to require η 16 ≥ C1L2η3τ ( τ + ρ2maxDτ , ρ ) α2 η 16 ≥ 8C2G′pLD2τ , ρρmaxη2α2 . ( 134 ) Recall the definition of G′p : G′p = Gp + 1 τ2 , and Gp = n−m m ( n− 1 ) . ( 135 ) It can be verified that G′p ≤ Gp + 1 τ2 ≤ 1 m + 1 ≤ 2 . ( 136 ) Using the fact that Dτ , ρ ≤ τ and ρmax ≤ 1 we can see that it suffices to require η ≤ 1 C3α2τL . ( 137 ) for some C3 > 0 large enough to satisfy both ( 131 ) and ( 133 ) . D SUPPORTING LEMMAS D.1 PROOF OF LEMMA 1 Since the global average of the local copies follows the update [ cf . ( 19 ) ] : x̄r , s+1 = x̄r , s − η 1 N N∑ i=1 gr , si , ∀s = 0 , . . . , τ − 1 . ( 138 ) Under Assumption 1 , we can apply the descent lemma at points x̄r , s+1 and x̄r , s for s = 0 , . . . , τ−2 , conditioned on Fr , s−1 : Er , s−1f ( x̄r , s+1 ) ≤ f ( x̄r , s ) +∇f ( x̄r , s ) > Er , s−1 ( x̄r , s+1 − x̄r , s ) + Er , s−1 ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) ( a ) =f ( x̄r , s ) − η∇f ( x̄r , s ) > ( 1 N N∑ i=1 ∇fi ( xr , si ) ) + Er , s−1 ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) =f ( x̄r , s ) − 1 2 η∇f ( x̄r , s ) > ( 1 N N∑ i=1 ∇fi ( xr , si ) ) − 1 2 η∇f ( x̄r , s ) > ( 1 N N∑ i=1 ∇fi ( xr , si ) ± 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ) + Er , s−1 ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) ( b ) ≤f ( x̄r , s ) − η 2 ( 1 2 ‖∇f ( x̄r , s ) ‖2 + 1 2 ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − 1 2 ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 ) − η 2 ( 1 2 ‖∇f ( x̄r , s ) ‖2 + 1 2 ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 − 1 2 ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 ) + η 2 ‖∇f ( x̄r , s ) ‖ ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥ + Er , s−1 ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) ( c ) ≤f ( x̄r , s ) − η 4 ‖∇f ( x̄r , s ) ‖2 − η 4 ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 − η 4 ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 ∥∥∥∇f ( x̄r , s ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 + η 4 ∥∥∥∇f ( x̄r , s ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + η 4 ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) − 1 K K∑ k=1 ∇f̄k ( x̄r , sk ) ∥∥∥2 + Er , s−1 ( L 2 ‖x̄r , s+1 − x̄r , s‖2 ) , where ( a ) is due to Assumption 2 , ( b ) is due to 2ab = ‖a‖2 + ‖b‖2 − ‖a − b‖2 and ab ≤ ‖a‖‖b‖ , and ( c ) is due to ‖a‖‖b‖ ≤ 12‖a‖ 2 + 12‖b‖ 2 . Notation a ± b stands for adding and subtracting , i.e. , a± b = a+ b− b . For the pair ( x̄r , τ−1 , xr+1 ) we have according to ( 19 ) and ( 22 ) : Er , τ−2xr+1 = Er , τ−2 ( x̄r , τ ) = Er , τ−2 ( x̄r , τ−1 − η 1 N N∑ i=1 gr , τ−1i ) . Applying the descent lemma in the same way as before yields Er , τ−2f ( xr+1 ) ≤f ( x̄r , τ−1 ) +∇f ( x̄r , τ−1 ) > Er , τ−2 ( xr+1 − x̄r , τ−1 ) + L 2 Er , τ−2‖xr+1 − x̄r , τ−1‖2 ≤f ( x̄r , τ−1 ) − η 4 ‖∇f ( x̄r , τ−1 ) ‖2 − η 4 ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , τ−1i ) ∥∥∥2 − η 4 ∥∥∥ 1 K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥2 + η 4 ∥∥∥∇f ( x̄r , τ−1 ) − 1 N N∑ i=1 ∇fi ( xr , τ−1i ) ∥∥∥2 + η 4 ∥∥∥∇f ( x̄r , τ−1 ) − 1 K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥2 + η 4 ∥∥∥ 1 N N∑ i=1 ∇fi ( xr , τ−1i ) − 1 K K∑ k=1 ∇f̄k ( x̄r , τ−1k ) ∥∥∥2 + Er , τ−2 ( L 2 ‖xr+1 − x̄r , τ−1‖2 ) . Taking expectation , summing over the iterations in round r over s = 0 , . . . , τ − 1 and using the fact that xr = x̄r,0 completes the proof . D.2 PROOF OF LEMMA 2 Recall the average update of the k-th cluster and that of the global average given by ( 15 ) and ( 19 ) , respectively , for s = 0 , . . . , τ − 1 : x̄r , s+1k = x̄ r , s k − η · ḡ r , s k ( 139 ) x̄r , s+1 = x̄r , s − η · 1 N N∑ i=1 gr , si . ( 140 ) Taking the difference gives E‖x̄r , s+1 − x̄r , s+1k ‖ 2 =E ∥∥∥∥∥ ( x̄r , s − x̄r , sk ) − η ( 1 n ∑ i∈Vk ∇fi ( xr , si ) − 1 N N∑ i=1 ∇fi ( xr , si ) ) ∥∥∥∥∥ 2 + η2E ∥∥∥∥∥ 1n ∑ i∈Vk ξr , si − 1 N N∑ i=1 ξr , si ∥∥∥∥∥ 2 ≤ ( 1 + ) E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2E ∥∥∥∥∥ 1n ∑ i∈Vk ∇fi ( xr , si ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + η2E ∥∥∥∥∥ 1n ∑ i∈Vk ξr , si − 1 N N∑ i=1 ξr , si ∥∥∥∥∥ 2 , ( 141 ) where > 0 is some constant to be chosen . Averaging over k = 1 , . . . , K : 1 K K∑ k=1 E‖x̄r , s+1 − x̄r , s+1k ‖ 2 ≤ ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 1 K K∑ k=1 E ∥∥∥∥∥ 1n ∑ i∈Vk ∇fi ( xr , si ) − 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥∥∥ 2 + η2 1 K K∑ k=1 E ∥∥∥∥∥ 1n ∑ i∈Vk ξr , si − 1 N N∑ i=1 ξr , si ∥∥∥∥∥ 2 ( a ) = ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 1 K K∑ k=1 E ∥∥∥ 1 n ∑ i∈Vk ∇fi ( xr , si ) ∥∥∥2 − E∥∥∥ 1 N N∑ i=1 ∇fi ( xr , si ) ∥∥∥2 ) + η2 ( 1 K K∑ k=1 E ∥∥∥ 1 n ∑ i∈Vk ξr , si ∥∥∥2 − E∥∥∥ 1 N N∑ i=1 ξr , si ∥∥∥2 ) ≤ ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 1 K K∑ k=1 E ∥∥∥ 1 n ∑ i∈Vk ∇fi ( xr , si ) ∥∥∥2 ) + η2K − 1 N σ2 = ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 1 K K∑ k=1 E ∥∥∥ 1 n ∑ i∈Vk ( ∇fi ( xr , si ) ±∇f̄k ( x̄ r , s k ) ±∇f̄k ( x̄ r , s ) ) ∥∥∥2 ) + η2K − 1 N σ2 ≤ ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 3 K K∑ k=1 E ∥∥∥ 1 n ∑ i∈Vk ( ∇fi ( xr , si ) −∇f̄k ( x̄ r , s k ) ) ∥∥∥2 ) + ( 1 + −1 ) η2 3 K K∑ k=1 E ∥∥∥∇f̄k ( x̄r , sk ) −∇f̄k ( x̄r , s ) ∥∥∥2 + ( 1 + −1 ) η2 3K K∑ k=1 E‖∇f̄k ( x̄r , s ) ‖2 + η2 K − 1 N σ2 ( b ) ≤ ( 1 + ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 3 N K∑ K=1 L2E ∥∥∥Xr , sk , ⊥∥∥∥2 ) + ( 1 + −1 ) η2 3 K K∑ k=1 L2E ∥∥∥x̄r , sk − x̄r , s∥∥∥2 + ( 1 + −1 ) η2 3K K∑ k=1 E ∥∥∥∇f̄k ( x̄r , s ) ∥∥∥2 + η2K − 1 N σ2 = ( 1 + + 3L2η2 ( 1 + −1 ) ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + ( 1 + −1 ) η2 ( 3 N K∑ K=1 L2E ∥∥∥Xr , sk , ⊥∥∥∥2 ) + ( 1 + −1 ) η2 3 K K∑ k=1 E ∥∥∥∇f̄k ( x̄r , s ) ∥∥∥2 + η2K − 1 N σ2 . ( 142 ) In ( a ) we used the fact that 1 K K∑ k=1 1 n ∑ i∈Vk ∇fi ( xr , si ) = 1 N N∑ i=1 ∇fi ( xr , si ) , 1 K K∑ k=1 1 n ∑ i∈Vk ξr , si = 1 N N∑ i=1 ξr , si . ( 143 ) and K∑ i=1 ‖xi − x̄‖2 = K∑ i=1 ‖xi‖2 −K‖x̄‖2 with x̄ = 1 K K∑ k=1 xi . ( 144 ) In ( b ) we applied the L-smoothness of fi and f̄k . Choosing = 14τ−1 and using the condition that η2 ≤ 1 24τ ( 4τ − 1 ) L2 we have 1 K K∑ k=1 E‖x̄r , s+1 − x̄r , s+1k ‖ 2 ≤ ( 1 + 1 4τ − 1 + 1 2 ( 4τ − 1 ) ) 1 K K∑ k=1 E‖x̄r , s − x̄r , sk ‖ 2 + 12τη2L2 ( 1 N K∑ K=1 E ∥∥∥Xr , sk , ⊥∥∥∥2 ) + 12τη2 1 K K∑ k=1 E ∥∥∥∇f̄k ( x̄r , s ) ∥∥∥2 + η2K − 1 N σ2 ≤Cτ 1 K K∑ k=1 E‖x̄r , s+1 − x̄r , s+1k ‖ 2 + 12τη2L2 ( 1 N K∑ K=1 E ∥∥∥Xr , sk , ⊥∥∥∥2 ) + 12τη2 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 K − 1 N σ2 . In the last inequality we applied Assumption 5 on the inter-cluster heterogeneity . D.3 PROOF OF LEMMA 3 We follow the perturbed average consensus analysis . Recall the update equation of the consensus error given in ( 17 ) : Xr , s+1k , ⊥ = ( Wk − J ) ( X r , s k , ⊥ − ηG r , s k ) . ( 145 ) Squaring both sides and conditioning : E‖Xr , s+1k , ⊥ ‖ 2 = E ( E ( ‖ ( Wk − J ) ( Xr , sk , ⊥ ± η∇Fk ( X r , s k ) − ηG r , s k ) ‖ 2|Fr , s−1 ) ) ≤ E‖ ( Wk − J ) ( Xr , sk , ⊥ − η∇Fk ( X r , s k ) ) ‖ 2 + η2ρ2knσ 2 ≤ ρ2k ( 1 + ζ−1k ) · E‖X r , s k , ⊥‖ 2 + ρ2k ( 1 + ζk ) η 2E‖∇Fk ( Xr , sk ) ‖ 2 + η2ρ2knσ 2 , where ζk > 0 is some free parameter to be properly chosen . Next , we bound the norm of the pseudo-gradient ∇Fk ( Xr , sk ) . ‖∇Fk ( Xr , sk ) ‖ 2 = ∑ i∈Vk ‖∇fi ( xr , si ) ‖ 2 = ∑ i∈Vk ‖∇fi ( xr , si ) ±∇fi ( x̄ r , s k ) ±∇f̄k ( x̄ r , s k ) ±∇f̄k ( x̄ r , s ) ‖2 ≤ ∑ i∈Vk ( 4‖∇fi ( xr , si ) −∇fi ( x̄ r , s k ) ‖ 2 + 4‖∇fi ( x̄r , sk ) −∇f̄k ( x̄ r , s k ) ‖ 2 + 4‖∇f̄k ( x̄r , sk ) −∇f̄k ( x̄ r , s ) ‖2 ) + ∑ i∈Vk 4‖∇f̄k ( x̄r , s ) ‖2 ( 146 ) ≤ ∑ i∈Vk ( 4‖∇fi ( x̄r , sk ) −∇f̄k ( x̄ r , s k ) ‖ 2 + 4L2‖xr , si − x̄ r , s k ‖ 2 + 4L2‖x̄r , sk − x̄ r , s‖2 + 4‖∇f̄k ( x̄r , s ) ‖2 ) ≤ 4L2‖Xr , sk , ⊥‖ 2 + 4L2n‖x̄r , sk − x̄ r , s‖2 + 4n‖∇f̄k ( x̄r , s ) ‖2 + 4n 2k . The last inequality is due to Assumption 4 on the intra-cluster heterogeneity . Averaging over k = 1 , . . . , K clusters : 1 N K∑ k=1 E‖Xr , s+1k , ⊥ ‖ 2 ≤ 1 N K∑ k=1 ρ2k ( 1 + ζ −1 k ) E‖X r , s k , ⊥‖ 2 + 1 N K∑ k=1 ρ2k ( 1 + ζk ) η 2E‖∇Fk ( Xr , sk ) ‖ 2 + η2 ( 1 K K∑ k=1 ρ2k ) σ2 ≤ 1 N K∑ k=1 ρ2k ( 1 + ζ −1 k ) E‖X r , s k , ⊥‖ 2 + η2 1 N K∑ k=1 ρ2k ( 1 + ζk ) · 4L2E‖X r , s k , ⊥‖ 2 + η2 1 K K∑ k=1 ρ2k ( 1 + ζk ) 4L 2E‖x̄r , sk − x̄ r , s‖2 + η2 1 K K∑ k=1 ρ2k ( 1 + ζk ) 4E‖∇f̄k ( x̄r , s ) ‖2 + η2 1 K K∑ k=1 ρ2k ( 1 + ζk ) 4 2 k + η 2ρ2maxσ 2 ( 147 ) ≤ ( max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + η 2 · 4L2 max k∈ [ K ] { ρ2k ( 1 + ζk ) } ︸ ︷︷ ︸ ρL ) 1 N K∑ k=1 E‖Xr , sk , ⊥‖ 2 + η2 max k∈ [ K ] { ρ2k ( 1 + ζk ) } · 4L2 1 K K∑ k=1 E‖x̄r , sk − x̄ r , s‖2 + η2 max k∈ [ K ] { ρ2k ( 1 + ζk ) } · 4 ( α2E‖∇f ( x̄r , s ) ‖2 + 2g ) + η2 1 K K∑ k=1 ρ2k ( 1 + ζk ) 4 2 k + η 2ρ2maxσ 2 . D.4 PROOF OF LEMMA 4 To simplify the notation we omit the superscript in Br , s− ` in this section . Let Λ = diag ( λ1 , λ2 ) and the eigendecomposition of G = TΛT−1 , we can obtain the closed form expression of T as T = ( λ1 − Cτ λ2 − Cτ 12τη2L2 12τη2L2 ) and T−1 = 1 det ( T ) ( 12τη2L2 −λ2 + Cτ −12τη2L2 λ1 − Cτ ) , where det ( T ) = 12τη2L2 ( λ1 − λ2 ) . ( 148 ) Consequently det ( T ) ·G ` B = det ( T ) · TΛ ` T−1B = ( λ1 − Cτ λ2 − Cτ 12τη2L2 12τη2L2 ) ( λ ` 1 0 0 λ ` 2 ) ( 12τη2L2 −λ2 + Cτ −12τη2L2 λ1 − Cτ ) ( b1 b2 ) = ( λ1 − Cτ λ2 − Cτ 12τη2L2 12τη2L2 ) ( λ ` 1 0 0 λ ` 2 ) ( 12τη2L2b1 + ( −λ2 + Cτ ) b2 −12τη2L2b1 + ( λ1 − Cτ ) b2 ) = ( λ1 − Cτ λ2 − Cτ 12τη2L2 12τη2L2 ) ( λ ` 112τη 2L2b1 + λ ` 1 ( −λ2 + Cτ ) b2 −λ ` 212τη2L2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) = ( t1 t2 ) ( 149 ) with t1 = ( λ1 − Cτ ) ( λ ` 112τη 2L2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + ( λ2 − Cτ ) ( −λ ` 212τη2L2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) , ( 150 ) t2 = 12τη 2L2 ( λ ` 112τη 2L2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + 12τη2L2 ( −λ ` 212τη2L2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) . ( 151 ) Therefore det ( T ) ( 1 , 1 ) TΛ ` T−1B = t1 + t2 = ( λ1 − Cτ ) ( λ ` 1L 212τη2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + ( λ2 − Cτ ) ( −λ ` 2L212τη2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) + L212τη2 ( λ ` 1L 212τη2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + L212τη2 ( −λ ` 2L212τη2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) . ( 152 ) Substituting the expression of det ( T ) and dividing both sides of the equality by 12τη2 ( λ1−λ2 ) we have L2 ( 1 , 1 ) TΛ ` T−1B = 1 12τη2 ( λ1 − λ2 ) ( λ1 − Cτ ) ( λ ` 1L 212τη2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + 1 12τη2 ( λ1 − λ2 ) ( λ2 − Cτ ) ( −λ ` 2L212τη2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) + 1 ( λ1 − λ2 ) L2 ( λ ` 1L 212τη2b1 + λ ` 1 ( −λ2 + Cτ ) b2 ) + 1 ( λ1 − λ2 ) L2 ( −λ ` 2L212τη2b1 + λ ` 2 ( λ1 − Cτ ) b2 ) = 1 ( λ1 − λ2 ) ( λ1 − Cτ ) λ ` 1L2b1 + −1 ( λ1 − λ2 ) ( λ2 − Cτ ) λ ` 2L2b1 + 1 ( λ1 − λ2 ) L4λ ` 112τη 2b1 − 1 ( λ1 − λ2 ) L4λ ` 212τη 2b1 + 1 12τη2 ( λ1 − λ2 ) ( λ1 − Cτ ) λ ` 1 ( −λ2 + Cτ ) b2 + 1 12τη2 ( λ1 − λ2 ) ( λ2 − Cτ ) λ ` 2 ( λ1 − Cτ ) b2 + 1 ( λ1 − λ2 ) L2λ ` 1 ( −λ2 + Cτ ) b2 + 1 ( λ1 − λ2 ) L2λ ` 2 ( λ1 − Cτ ) b2 = 1 ( λ1 − λ2 ) ( −λ ` 2 ( λ2 − Cτ ) − λ ` 1 ( Cτ − λ1 ) ) L2b1 + 1 ( λ1 − λ2 ) 12τη2 ( λ ` 1 − λ ` 2 ) L4b1 + 1 12τη2 ( λ1 − λ2 ) ( λ1 − Cτ ) λ ` 1 ( −λ2 + Cτ ) b2 + 1 12τη2 ( λ1 − λ2 ) ( λ2 − Cτ ) λ ` 2 ( λ1 − Cτ ) b2 + 1 ( λ1 − λ2 ) L2λ ` 1 ( −λ2 + Cτ ) b2 + 1 ( λ1 − λ2 ) L2λ ` 2 ( λ1 − Cτ ) b2 ≤λ ` 2L2b1 + λ ` 2 − λ ` 1 λ2 − λ1 · 12τη2L4b1 + λ ` 2 − λ ` 1 λ2 − λ1 ( λ2 − Cτ ) ( Cτ − λ1 ) 1 12τη2 b2 + λ ` 2L 2b2 , ( 153 ) where in the last inequality we used the fact that λ1 ≤ Cτ ≤ λ2 . Note that ( λ2 − Cτ ) ( Cτ − λ1 ) =− C2τ − λ1λ2 + ( λ1 + λ2 ) Cτ =− C2τ − det ( G ) + Tr ( G ) Cτ =− C2τ − ( Cτ ( max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + η 2ρL · 4L2 ) − 48ρLτη4L4 ) + Cτ ( max k∈ [ K ] ρ2k ( 1 + ζ −1 k ) + η 2ρL · 4L2 + Cτ ) = 48ρLτη 4L4 . ( 154 ) Therefore , we further obtain L2 ( 1 , 1 ) TΛ ` T−1B ≤λ ` 2L2 ( b1 + b2 ) + λ ` 2 − λ ` 1 λ2 − λ1 η2 · ( 12τL4b1 + 4ρLL 4b2 ) ( 155 ) Dividing both sides by L2 completes the proof . E NETWORK CONNECTIVITY CONDITIONS IN THEOREMS AND COROLLARY Both Theorem 2 and Corollary 1 impose some sufficient conditions on the network connectivity ρmax for convergence . This can be satisfied in practice as follows . For Theorem 2 , as long as ρmax < 1 , we can choose τ large enough so that ( 7 ) is fulfilled . Corollary 1 strengthens the result of Theorem 2 by requiring no loss in the order of convergence rate compared to full device participation . This naturally leads to a more stringent condition on ρmax given by ( 11 ) . For any given D2D network topology , this can be satisfied by running multiple D2D gossip averaging steps per SGD update in Algorithm 1 . Since the right hand side of ( 11 ) depends only on the algorithmic parameters , we can choose the suitable gossip averaging steps to fulfill this condition before launching the algorithm . F MORE EXPERIMENTS DETAILS In this section , we provide additional experimental results on CIFAR-10 dataset . We follow the same CNN model and non-iid data partition strategy as before and run each experiments for 3 times with different random seeds to report the mean values of best test accuracy . Instead of using a constant learning rate , we decay the local learning rate η by half after finishing 50 % and 75 % of the communication rounds and tune the initial learning rate from { 0.01 , 0.02 , 0.05 , 0.08 , 0.1 } for each algorithm . First , we evaluate the convergence processes of HL-SGD and local SGD under varying D2D network topologies in Figure 4 . We generate random network topologies by Erdős-Rényi model with edge probability from { 0.2 , 0 , 5 , 0.8 , 1 } and use Metropolis-Hastings weights to setWk , corresponding to spectral norm ρmax = { 0.9394 , 0.844 , 0.5357 , 0 } . As observed in Figure 4a , a more connected D2D network topology ( i.e. , a smaller value of ρmax ) generally accelerates the convergence and leads to a higher model accuracy achieved over 100 communication rounds in HL-SGD . However , in terms of runtime , a more connected D2D network topology corresponds to a larger D2D communication delay cd2d per round , and hence the total runtime is larger as well , which can be clearly observed in Figure 4b . Therefore , to achieve a target level of model accuracy within the shortest time in HLSGD , a sparse D2D network topology could work better than the fully connected one in practice . Second , to give a more comprehensive analysis on the runtime benefits of HL-SGD , we vary τ from { 5 , 10 , 20 , 50 } and compare the performances of HL-SGD and local SGD in Figure 5 . From the figure , we can observe that HL-SGD can consistently outperform local SGD across a wide range of τ . In particular , on CIFAR-10 , the best accuracy of HL-SGD achieved over 100 rounds is 2.49 % , 3.99 % , 4.05 % , and 7 % higher than that of local SGD , respectively , as τ increases from 5 to 50 . At the same time , the runtime of HL-SGD needed to achieve a target test-set accuracy of 60 % is 9.66 % , 19.76 % , 33.46 % , and 45.88 % less than that of local SGD , respectively . Third , we consider an extension of HL-SGD by allowing each device to perform multiple SGD updates before the gossip averaging step in Algorithm 1 and empirically evaluate its performance . Specifically , each device performs l = { 1 , 5 , 10 } steps of SGD update before aggregating models with their neighbors in the same cluster . Note that l = 1 corresponds to the original version of HLSGD in Algorithm 1 . As observed in Figure 6a , when communicating and aggregating models with neighbors more frequently , HL-SGD with l = 1 has the best convergence speed and will converge to the highest level of test accuracy . In terms of runtime , choosing a value of l > 1 might be favorable in some cases due to the reduced D2D communication delay per round . For instance , to achieve a target level of 60 % test accuracy , HL-SGD with l = 5 needs 5.22 % less amount of time than l = 1 . It is an interesting direction to rigorously analyze the convergence properties of HL- SGD with arbitrary l and find the best hyperparameter tuning method for minimizing the runtime to achieve a target level of model accuracy in the future . | This paper proposes a new Federated learning algorithm which can take advantage of the fast D2D (Device-to-Device) connections among the devices. In particular, it is shown that the proposed algorithm has better performance in terms of convergence rate and accuracy compared to the existing algorithms such as 'Local SGD'-based FL which rely only on the slow D2S connections for model updating. The convergence of the proposed algorithm is theoretically characterized in terms of the D2D connectivity (topology). Numerical results are provided to show the improved performance compared to the local sgd-based FL. | SP:742ea30fbadad7899104c22b3da891f5f6d3df4b |
Prototypical Contrastive Predictive Coding | 1 INTRODUCTION . In machine learning , knowledge distillation ( KD ) is a problem that aims to transfer the knowledge from one network ( a teacher ) to another one ( a student ) . The original method introduced by Hinton et al . ( 2015 ) ; Buciluǎ et al . ( 2006 ) minimizes the cross-entropy between the probabilistic outputs of teacher and student networks . Even though the simplicity of its implementation , many other distillation methods can not easily outperform KD . Therefore the concept of knowledge distillation has been expanded to various machine learning tasks other than supervised model compressions , such as self-supervised learning ( Caron et al. , 2020 ; 2021 ) or self-supervised model compression ( Fang et al. , 2021 ) . Those methods rely on minimizing the discrepancy of probabilistic outputs of teacher and student networks , thus require a function that maps a data or feature into a probability space . It is straightforward to use a linear mapping for it , which we refer to a prototypes . On the other hand , contrastive learning has its merits in capturing correlations and high-order dependencies over teacher representations as they are trained by pulling the positives and pushing over the negatives . Especially , contrastive objectives such as NCE ( Gutmann & Hyvärinen , 2010 ) or CPC ( as known as InfoNCE ) ( Oord et al. , 2018 ; Bachman et al. , 2019 ; Hjelm et al. , 2018 ) are proven to be a lower bound to the mutual information allowing student network to capture the information from the teacher representations . While many methods ( Chen et al. , 2020b ; c ) used those objectives for representation learning , Tian et al . ( 2019 ) proposed contrastive representation distillation ( CRD ) and demonstrated the effectiveness of contrastive learning in transferring knowledge from one network to another . However , the current contrastive learning requires large negative samples with careful sampling . To ameliorate , we combine the prototypical method and contrastive objective to inherit their advantages . To that end , we propose prototypical contrastive predictive coding ( ProtoCPC ) , which utilizes the prototypes to generate probability distribution and model the critic by the discrepancy between two probabilistic outputs . Furthermore , our ProtoCPC objective is a lower bound to the mutual information between teacher and student representations alike CPC . But unlike CPC , it does not require commodious negative samples or careful sampling policies . Given the ProtoCPC objective , we present efficient applications on three distillation tasks : supervised model compression , self-supervised model compression , and self-supervised learning via self-distillation . While ProtoCPC is simple in its implementation , we observe that it significantly boosts the performance of representation distillation . Our method outperforms KD , and partially outperform CRD on CIFAR-100 and ImageNet . Moreover , our method achieves state-of-the-art performance on transferring various self-supervised teacher representations to a small self-supervised model . Lastly , by construing self-supervised learning as a self-distillation , we validate the effectiveness of ProtoCPC in representation learning . Our contributions are following : • We propose a novel prototypical contrastive objective for transferring representational knowledge between models . • We apply the proposed objective to three distillation tasks : supervised model compression , self-supervised model compression , and self-supervised learning via self-distillation . • Experiments show the effectiveness of our method in various representation distillation benchmarks , especially achieving state-of-the-art performance in supervised/self-supervised model compression . 2 METHOD . 2.1 PROTOTYPICAL CONTRASTIVE PREDICTIVE CODING . Given data x with a random variable x ∼ X , let the teacher network fT and the student network fS , where they map x into RDT and RDS respectively . Also let T and S be random variables for representation fT ( X ) and fS ( X ) respectively . One can transfer the representational knowledge of T to S by maximizing the mutual information I ( T ; S ) , where it is defined by the KL-divergence between the joint distribution p ( T , S ) and the product of marginal distribution p ( T ) p ( S ) . However , as estimation and optimization of mutual information is challenging , many approaches count on maximizing variational lower bound to the mutual information ( Poole et al. , 2019 ) . The contrastive predictive coding ( Oord et al. , 2018 ) , or as known as InfoNCE is a guaranteed lower bound to the mutual information ( Oord et al. , 2018 ; Tian et al. , 2020 ; Bachman et al. , 2019 ; Song & Ermon , 2020 ) , and has shown its competency in both representation learning ( He et al. , 2020 ; Chen et al. , 2020b ; c ) and representation distillation ( Tian et al. , 2019 ) . Formally , given a zs ∼ S with a positive zt ≡ zt0 and N − 1 negatives { ztj } N−1j=1 sampled from T , i.e . ( zt , zs ) ∼ p ( T , S ) and { ( ztj , zs ) } N−1j=1 ∼ p ( T ) p ( S ) , the following inequality holds for any critic h : RDT × RDS → R+ : I ( T ; S ) ≥ E [ log h ( zt , zs ) 1 N ∑N−1 j=0 h ( ztj , zs ) ] ( 1 ) Previous works set the critic by the exponential of cosine similarity between two unit feature vectors , i.e . h ( zt , zs ) = exp ( −zt · zs ) where zt and zs are ` 2-normalized . Theoretically , the lower bound becomes tighter as N →∞ . In practice , the CPC objective requires using extremely large batch size or memory buffer that stores the negatives as it requires pairwise computation between zs and ztjs . On the other hand , we project feature vectors into a probability space . To do that , we append a linear prototypes WT ∈ RDT×K and WS ∈ RDS×K at the top of fT and fS so that they have same output dimension of K. For brevity , let z̄s = WSzs and z̄t = WT zt and T̄ , S̄ be random variables for z̄t and z̄s respectively . Then we set probability of student ps by K-categorical distribution defined by the softmax operator on z̄s = WSzs with temperature τs > 0 : p ( k ) s = exp ( z̄ ( k ) s /τs ) ∑K k′=1 exp ( z̄ ( k′ ) s /τs ) . ( 2 ) Similarly we define probability of teacher ptj with temperature τt > 0 . Then we define the critic between z̄t and z̄s by the negative exponential of cross-entropy between ps and pt , i.e. , h ( z̄t , z̄s ) = e −H ( pt , ps ) = e ∑K k=1 p ( k ) t log p ( k ) s . ( 3 ) Then h is a positive bounded function and is maximized when pt matches with ps . Then by plugging Eq . 3 into Eq . 1 , it follows that I ( T ; S ) ≥ I ( T̄ ; S̄ ) ≥ E [ log e−H ( pt , ps ) 1 N ∑N−1 j=0 e −H ( ptj , ps ) ] ( 4 ) = E [ log exp ( pt · z̄s/τs ) 1 N ∑N−1 j=0 exp ( ptj · z̄s/τs ) ] ( 5 ) ≥ E [ log exp ( pt · z̄s/τs ) 1 N ∑N−1 j=0 ∑K k=1 p ( k ) tj exp ( z̄ ( k ) s /τs ) ] ( 6 ) = E [ log exp ( pt · z̄s/τs ) ∑K k=1 q ( k ) exp ( z̄ ( k ) s /τs ) ] , IProtoCPC , ( 7 ) where q ( k ) = 1N ∑N−1 j=0 ptj is a mean of teachers ’ probability which we call a prior . The first inequality is from data processing inequality , the second equality is from crossing out the constant term , and third inequality is from Jensen ’ s inequality . We define Prototypical Contrastive Predictive Coding ( ProtoCPC ) objective IProtoCPC in Eq . 7 . In addition , we define ProtoCPC loss LProtoCPC by the negative of ProtoCPC objective , thus minimizing ProtoCPC loss is equivalent to a variational maximization of mutual information between student and teacher representations . Relationship with CPC While many lower bounds to the mutual information were proposed , Tschannen et al . ( 2019 ) observe that the tightness of bound does not necessarily imply a better representation learning performance . From then , many works focused on analyzing the components of contrastive objective itself which are responsible for the empirical success . Wang & Isola ( 2020 ) argued that the contrastive loss is composed of alignment and uniformity loss , where alignment loss accounts for the similarity of two positive features , and uniformity loss measures how the features are scattered in the unit hypersphere and show that both losses are important in contrastive learning . We draw an analogy on ProtoCPC by dissecting into alignment and uniformity losses . Since the alignment loss is straightforward , we focus on the uniformity loss . We show that one can interpret the uniformity loss LProtoCPC-Unif by the re-substitution entropy estimator of zs via a von-Mises Fisher kernel density estimation ( vMF-KDE ) ( Ahmad & Lin , 1976 ) : LProtoCPC-Unif = Ezs∼S [ log K∑ k=1 q ( k ) exp ( z̄ ( k ) s /τs ) ] = Ezs∼S [ log K∑ k=1 q ( k ) exp ( wk · zs/τs ) ] ( 8 ) = Ezs∼S [ log p̂vMF-KDE ( zs ) ] + logZvMF = −Ĥ ( zs ) + logZvMF , ( 9 ) where each wk is a k-th column of WS and acts as a mean direction of k-th vMF distribution and q ( k ) acts as a prior for each k-th vMF distribution . The p̂vMF-KDE is thus the mixture of K vMF distribution with prior q ( k ) and then the uniformity loss is a re-substitution entropy Ĥ ( zs ) . The ZvMF is a normalizing constant for vMF distribution . Remark that the uniformity loss of CPC objective is also a re-substitution entropy with vMF-KDE , but the mean directions are given by negative samples ztj and the prior is uniform . It shows that the ProtoCPC objective allows modeling of complex mixture of vMF distribution by exploiting prior term and using prototypes remove the dependency on negative samples . Prior momentum Since ProtoCPC is contrastive , it requires sufficient negatives to perform learning . However , unlike CPC , ProtoCPC only requires prior q that accounts for the negatives . Therefore , we use exponential moving average ( EMA ) on prior q for better estimation . At each iteration , we update q by following update rule : q ( k ) ← mpq ( k ) + ( 1−mp ) 1 N N∑ j=1 p ( k ) tj , ( 10 ) where mp > 0 is a momentum rate . The prior momentum allows better estimation of prior term regardless of the size of negative samples . Assignment of teacher probability While KD used softmax operator for both probabilities of teacher and student networks , many self-supervised methods ( Asano et al. , 2019 ; Caron et al. , 2020 ) reported that the softmax operator can lead to collapse , i.e . every representation fall into the same one . To compromise , many prototypical self-supervised methods resort on Sinkhorn-Knopp iterative algorithm by formulating the assignment of teacher probability as an optimal transport problem : argmax Pt 〈Pt , Zt〉+ τtH ( Pt ) , s.t . Pt ∈ RN×K+ , Pt1K = 1N , P > t 1N = N K 1K , ( 11 ) where Zt is a matrix whose rows are ztj , H ( Pt ) = ∑N−1 j=0 ∑K k=1−p ( k ) t log p ( k ) t is a entropy and τt > 0 is a temperature that controls the smoothness of distribution . Then the Eq . 11 can be solved by only few steps of Sinkhorn-Knopp iteration ( Cuturi , 2013 ; Altschuler et al. , 2017 ) which iteratively projects Pt into following form : p ( k ) tj = βke z ( k ) tj /τt∑K k′=1 βk′e z ( k′ ) tj /τt , ( 12 ) where βk is a normalizing constant . We refer this to Sinkhorn-Knopp ( SK ) operator . The SK operator allows each prototype to be non-zero , i.e . q ( k ) is non-zero for each k. In practice , we only conduct a few steps of SK iterations . | This paper studies a new contrastive loss function for knowledge distillation and self-supervised representation learning. The paper demostrates results on transferring knowledge from a teacher to student using both supervised and self-supervised objectives, and on representation learning based on self-distillation. As prior work has already applied contrastive learning to each of these problems the main novelty of the paper is the exact form of the contrastive loss. The loss is computed over projections of the embeddings into a k-dimensional simplex (probability space) where cross-entropy can be used as the similarity function. This allows for encoding "negatives" into a distribution over k prototypes that are updated with EMA over iterations of training rather than requiring a large batch of negatives during each iteration of training. The results appear to slightly outperform SOTA methods. | SP:6136d5162fa80ff08e09e30d47e0e50098f9b76b |
Prototypical Contrastive Predictive Coding | 1 INTRODUCTION . In machine learning , knowledge distillation ( KD ) is a problem that aims to transfer the knowledge from one network ( a teacher ) to another one ( a student ) . The original method introduced by Hinton et al . ( 2015 ) ; Buciluǎ et al . ( 2006 ) minimizes the cross-entropy between the probabilistic outputs of teacher and student networks . Even though the simplicity of its implementation , many other distillation methods can not easily outperform KD . Therefore the concept of knowledge distillation has been expanded to various machine learning tasks other than supervised model compressions , such as self-supervised learning ( Caron et al. , 2020 ; 2021 ) or self-supervised model compression ( Fang et al. , 2021 ) . Those methods rely on minimizing the discrepancy of probabilistic outputs of teacher and student networks , thus require a function that maps a data or feature into a probability space . It is straightforward to use a linear mapping for it , which we refer to a prototypes . On the other hand , contrastive learning has its merits in capturing correlations and high-order dependencies over teacher representations as they are trained by pulling the positives and pushing over the negatives . Especially , contrastive objectives such as NCE ( Gutmann & Hyvärinen , 2010 ) or CPC ( as known as InfoNCE ) ( Oord et al. , 2018 ; Bachman et al. , 2019 ; Hjelm et al. , 2018 ) are proven to be a lower bound to the mutual information allowing student network to capture the information from the teacher representations . While many methods ( Chen et al. , 2020b ; c ) used those objectives for representation learning , Tian et al . ( 2019 ) proposed contrastive representation distillation ( CRD ) and demonstrated the effectiveness of contrastive learning in transferring knowledge from one network to another . However , the current contrastive learning requires large negative samples with careful sampling . To ameliorate , we combine the prototypical method and contrastive objective to inherit their advantages . To that end , we propose prototypical contrastive predictive coding ( ProtoCPC ) , which utilizes the prototypes to generate probability distribution and model the critic by the discrepancy between two probabilistic outputs . Furthermore , our ProtoCPC objective is a lower bound to the mutual information between teacher and student representations alike CPC . But unlike CPC , it does not require commodious negative samples or careful sampling policies . Given the ProtoCPC objective , we present efficient applications on three distillation tasks : supervised model compression , self-supervised model compression , and self-supervised learning via self-distillation . While ProtoCPC is simple in its implementation , we observe that it significantly boosts the performance of representation distillation . Our method outperforms KD , and partially outperform CRD on CIFAR-100 and ImageNet . Moreover , our method achieves state-of-the-art performance on transferring various self-supervised teacher representations to a small self-supervised model . Lastly , by construing self-supervised learning as a self-distillation , we validate the effectiveness of ProtoCPC in representation learning . Our contributions are following : • We propose a novel prototypical contrastive objective for transferring representational knowledge between models . • We apply the proposed objective to three distillation tasks : supervised model compression , self-supervised model compression , and self-supervised learning via self-distillation . • Experiments show the effectiveness of our method in various representation distillation benchmarks , especially achieving state-of-the-art performance in supervised/self-supervised model compression . 2 METHOD . 2.1 PROTOTYPICAL CONTRASTIVE PREDICTIVE CODING . Given data x with a random variable x ∼ X , let the teacher network fT and the student network fS , where they map x into RDT and RDS respectively . Also let T and S be random variables for representation fT ( X ) and fS ( X ) respectively . One can transfer the representational knowledge of T to S by maximizing the mutual information I ( T ; S ) , where it is defined by the KL-divergence between the joint distribution p ( T , S ) and the product of marginal distribution p ( T ) p ( S ) . However , as estimation and optimization of mutual information is challenging , many approaches count on maximizing variational lower bound to the mutual information ( Poole et al. , 2019 ) . The contrastive predictive coding ( Oord et al. , 2018 ) , or as known as InfoNCE is a guaranteed lower bound to the mutual information ( Oord et al. , 2018 ; Tian et al. , 2020 ; Bachman et al. , 2019 ; Song & Ermon , 2020 ) , and has shown its competency in both representation learning ( He et al. , 2020 ; Chen et al. , 2020b ; c ) and representation distillation ( Tian et al. , 2019 ) . Formally , given a zs ∼ S with a positive zt ≡ zt0 and N − 1 negatives { ztj } N−1j=1 sampled from T , i.e . ( zt , zs ) ∼ p ( T , S ) and { ( ztj , zs ) } N−1j=1 ∼ p ( T ) p ( S ) , the following inequality holds for any critic h : RDT × RDS → R+ : I ( T ; S ) ≥ E [ log h ( zt , zs ) 1 N ∑N−1 j=0 h ( ztj , zs ) ] ( 1 ) Previous works set the critic by the exponential of cosine similarity between two unit feature vectors , i.e . h ( zt , zs ) = exp ( −zt · zs ) where zt and zs are ` 2-normalized . Theoretically , the lower bound becomes tighter as N →∞ . In practice , the CPC objective requires using extremely large batch size or memory buffer that stores the negatives as it requires pairwise computation between zs and ztjs . On the other hand , we project feature vectors into a probability space . To do that , we append a linear prototypes WT ∈ RDT×K and WS ∈ RDS×K at the top of fT and fS so that they have same output dimension of K. For brevity , let z̄s = WSzs and z̄t = WT zt and T̄ , S̄ be random variables for z̄t and z̄s respectively . Then we set probability of student ps by K-categorical distribution defined by the softmax operator on z̄s = WSzs with temperature τs > 0 : p ( k ) s = exp ( z̄ ( k ) s /τs ) ∑K k′=1 exp ( z̄ ( k′ ) s /τs ) . ( 2 ) Similarly we define probability of teacher ptj with temperature τt > 0 . Then we define the critic between z̄t and z̄s by the negative exponential of cross-entropy between ps and pt , i.e. , h ( z̄t , z̄s ) = e −H ( pt , ps ) = e ∑K k=1 p ( k ) t log p ( k ) s . ( 3 ) Then h is a positive bounded function and is maximized when pt matches with ps . Then by plugging Eq . 3 into Eq . 1 , it follows that I ( T ; S ) ≥ I ( T̄ ; S̄ ) ≥ E [ log e−H ( pt , ps ) 1 N ∑N−1 j=0 e −H ( ptj , ps ) ] ( 4 ) = E [ log exp ( pt · z̄s/τs ) 1 N ∑N−1 j=0 exp ( ptj · z̄s/τs ) ] ( 5 ) ≥ E [ log exp ( pt · z̄s/τs ) 1 N ∑N−1 j=0 ∑K k=1 p ( k ) tj exp ( z̄ ( k ) s /τs ) ] ( 6 ) = E [ log exp ( pt · z̄s/τs ) ∑K k=1 q ( k ) exp ( z̄ ( k ) s /τs ) ] , IProtoCPC , ( 7 ) where q ( k ) = 1N ∑N−1 j=0 ptj is a mean of teachers ’ probability which we call a prior . The first inequality is from data processing inequality , the second equality is from crossing out the constant term , and third inequality is from Jensen ’ s inequality . We define Prototypical Contrastive Predictive Coding ( ProtoCPC ) objective IProtoCPC in Eq . 7 . In addition , we define ProtoCPC loss LProtoCPC by the negative of ProtoCPC objective , thus minimizing ProtoCPC loss is equivalent to a variational maximization of mutual information between student and teacher representations . Relationship with CPC While many lower bounds to the mutual information were proposed , Tschannen et al . ( 2019 ) observe that the tightness of bound does not necessarily imply a better representation learning performance . From then , many works focused on analyzing the components of contrastive objective itself which are responsible for the empirical success . Wang & Isola ( 2020 ) argued that the contrastive loss is composed of alignment and uniformity loss , where alignment loss accounts for the similarity of two positive features , and uniformity loss measures how the features are scattered in the unit hypersphere and show that both losses are important in contrastive learning . We draw an analogy on ProtoCPC by dissecting into alignment and uniformity losses . Since the alignment loss is straightforward , we focus on the uniformity loss . We show that one can interpret the uniformity loss LProtoCPC-Unif by the re-substitution entropy estimator of zs via a von-Mises Fisher kernel density estimation ( vMF-KDE ) ( Ahmad & Lin , 1976 ) : LProtoCPC-Unif = Ezs∼S [ log K∑ k=1 q ( k ) exp ( z̄ ( k ) s /τs ) ] = Ezs∼S [ log K∑ k=1 q ( k ) exp ( wk · zs/τs ) ] ( 8 ) = Ezs∼S [ log p̂vMF-KDE ( zs ) ] + logZvMF = −Ĥ ( zs ) + logZvMF , ( 9 ) where each wk is a k-th column of WS and acts as a mean direction of k-th vMF distribution and q ( k ) acts as a prior for each k-th vMF distribution . The p̂vMF-KDE is thus the mixture of K vMF distribution with prior q ( k ) and then the uniformity loss is a re-substitution entropy Ĥ ( zs ) . The ZvMF is a normalizing constant for vMF distribution . Remark that the uniformity loss of CPC objective is also a re-substitution entropy with vMF-KDE , but the mean directions are given by negative samples ztj and the prior is uniform . It shows that the ProtoCPC objective allows modeling of complex mixture of vMF distribution by exploiting prior term and using prototypes remove the dependency on negative samples . Prior momentum Since ProtoCPC is contrastive , it requires sufficient negatives to perform learning . However , unlike CPC , ProtoCPC only requires prior q that accounts for the negatives . Therefore , we use exponential moving average ( EMA ) on prior q for better estimation . At each iteration , we update q by following update rule : q ( k ) ← mpq ( k ) + ( 1−mp ) 1 N N∑ j=1 p ( k ) tj , ( 10 ) where mp > 0 is a momentum rate . The prior momentum allows better estimation of prior term regardless of the size of negative samples . Assignment of teacher probability While KD used softmax operator for both probabilities of teacher and student networks , many self-supervised methods ( Asano et al. , 2019 ; Caron et al. , 2020 ) reported that the softmax operator can lead to collapse , i.e . every representation fall into the same one . To compromise , many prototypical self-supervised methods resort on Sinkhorn-Knopp iterative algorithm by formulating the assignment of teacher probability as an optimal transport problem : argmax Pt 〈Pt , Zt〉+ τtH ( Pt ) , s.t . Pt ∈ RN×K+ , Pt1K = 1N , P > t 1N = N K 1K , ( 11 ) where Zt is a matrix whose rows are ztj , H ( Pt ) = ∑N−1 j=0 ∑K k=1−p ( k ) t log p ( k ) t is a entropy and τt > 0 is a temperature that controls the smoothness of distribution . Then the Eq . 11 can be solved by only few steps of Sinkhorn-Knopp iteration ( Cuturi , 2013 ; Altschuler et al. , 2017 ) which iteratively projects Pt into following form : p ( k ) tj = βke z ( k ) tj /τt∑K k′=1 βk′e z ( k′ ) tj /τt , ( 12 ) where βk is a normalizing constant . We refer this to Sinkhorn-Knopp ( SK ) operator . The SK operator allows each prototype to be non-zero , i.e . q ( k ) is non-zero for each k. In practice , we only conduct a few steps of SK iterations . | This paper provides a method for combining contrastive learning and clustering (prototypical probabilities) for three knowledge distillation tasks - supervised model compression, self-supervised model compression, and self-supervised learning with self-distillation. Traditional contrastive learning methods rely on the similarity of feature vectors from the teacher and student networks using cosine similarity, log bilinear model (van den Oord et al), etc. This paper proposes to project the feature vectors into a probability space via linear prototypes (layer) of the same dimension (i.e, cluster the feature vectors). The proposed method overcomes the disadvantage of having large negative examples for contrastive learning by maintaining an EMA of prior that accounts for the negative examples. The main contribution of this paper is the ProtoCPC loss that combines the advantages of contrastive predictive coding loss using prototypes over the teacher and student representation. The authors empirically show that the proposed method is useful for various distillation tasks on image classification tasks on CIFAR-100 and Imagenet datasets. | SP:6136d5162fa80ff08e09e30d47e0e50098f9b76b |
Prototypical Contrastive Predictive Coding | 1 INTRODUCTION . In machine learning , knowledge distillation ( KD ) is a problem that aims to transfer the knowledge from one network ( a teacher ) to another one ( a student ) . The original method introduced by Hinton et al . ( 2015 ) ; Buciluǎ et al . ( 2006 ) minimizes the cross-entropy between the probabilistic outputs of teacher and student networks . Even though the simplicity of its implementation , many other distillation methods can not easily outperform KD . Therefore the concept of knowledge distillation has been expanded to various machine learning tasks other than supervised model compressions , such as self-supervised learning ( Caron et al. , 2020 ; 2021 ) or self-supervised model compression ( Fang et al. , 2021 ) . Those methods rely on minimizing the discrepancy of probabilistic outputs of teacher and student networks , thus require a function that maps a data or feature into a probability space . It is straightforward to use a linear mapping for it , which we refer to a prototypes . On the other hand , contrastive learning has its merits in capturing correlations and high-order dependencies over teacher representations as they are trained by pulling the positives and pushing over the negatives . Especially , contrastive objectives such as NCE ( Gutmann & Hyvärinen , 2010 ) or CPC ( as known as InfoNCE ) ( Oord et al. , 2018 ; Bachman et al. , 2019 ; Hjelm et al. , 2018 ) are proven to be a lower bound to the mutual information allowing student network to capture the information from the teacher representations . While many methods ( Chen et al. , 2020b ; c ) used those objectives for representation learning , Tian et al . ( 2019 ) proposed contrastive representation distillation ( CRD ) and demonstrated the effectiveness of contrastive learning in transferring knowledge from one network to another . However , the current contrastive learning requires large negative samples with careful sampling . To ameliorate , we combine the prototypical method and contrastive objective to inherit their advantages . To that end , we propose prototypical contrastive predictive coding ( ProtoCPC ) , which utilizes the prototypes to generate probability distribution and model the critic by the discrepancy between two probabilistic outputs . Furthermore , our ProtoCPC objective is a lower bound to the mutual information between teacher and student representations alike CPC . But unlike CPC , it does not require commodious negative samples or careful sampling policies . Given the ProtoCPC objective , we present efficient applications on three distillation tasks : supervised model compression , self-supervised model compression , and self-supervised learning via self-distillation . While ProtoCPC is simple in its implementation , we observe that it significantly boosts the performance of representation distillation . Our method outperforms KD , and partially outperform CRD on CIFAR-100 and ImageNet . Moreover , our method achieves state-of-the-art performance on transferring various self-supervised teacher representations to a small self-supervised model . Lastly , by construing self-supervised learning as a self-distillation , we validate the effectiveness of ProtoCPC in representation learning . Our contributions are following : • We propose a novel prototypical contrastive objective for transferring representational knowledge between models . • We apply the proposed objective to three distillation tasks : supervised model compression , self-supervised model compression , and self-supervised learning via self-distillation . • Experiments show the effectiveness of our method in various representation distillation benchmarks , especially achieving state-of-the-art performance in supervised/self-supervised model compression . 2 METHOD . 2.1 PROTOTYPICAL CONTRASTIVE PREDICTIVE CODING . Given data x with a random variable x ∼ X , let the teacher network fT and the student network fS , where they map x into RDT and RDS respectively . Also let T and S be random variables for representation fT ( X ) and fS ( X ) respectively . One can transfer the representational knowledge of T to S by maximizing the mutual information I ( T ; S ) , where it is defined by the KL-divergence between the joint distribution p ( T , S ) and the product of marginal distribution p ( T ) p ( S ) . However , as estimation and optimization of mutual information is challenging , many approaches count on maximizing variational lower bound to the mutual information ( Poole et al. , 2019 ) . The contrastive predictive coding ( Oord et al. , 2018 ) , or as known as InfoNCE is a guaranteed lower bound to the mutual information ( Oord et al. , 2018 ; Tian et al. , 2020 ; Bachman et al. , 2019 ; Song & Ermon , 2020 ) , and has shown its competency in both representation learning ( He et al. , 2020 ; Chen et al. , 2020b ; c ) and representation distillation ( Tian et al. , 2019 ) . Formally , given a zs ∼ S with a positive zt ≡ zt0 and N − 1 negatives { ztj } N−1j=1 sampled from T , i.e . ( zt , zs ) ∼ p ( T , S ) and { ( ztj , zs ) } N−1j=1 ∼ p ( T ) p ( S ) , the following inequality holds for any critic h : RDT × RDS → R+ : I ( T ; S ) ≥ E [ log h ( zt , zs ) 1 N ∑N−1 j=0 h ( ztj , zs ) ] ( 1 ) Previous works set the critic by the exponential of cosine similarity between two unit feature vectors , i.e . h ( zt , zs ) = exp ( −zt · zs ) where zt and zs are ` 2-normalized . Theoretically , the lower bound becomes tighter as N →∞ . In practice , the CPC objective requires using extremely large batch size or memory buffer that stores the negatives as it requires pairwise computation between zs and ztjs . On the other hand , we project feature vectors into a probability space . To do that , we append a linear prototypes WT ∈ RDT×K and WS ∈ RDS×K at the top of fT and fS so that they have same output dimension of K. For brevity , let z̄s = WSzs and z̄t = WT zt and T̄ , S̄ be random variables for z̄t and z̄s respectively . Then we set probability of student ps by K-categorical distribution defined by the softmax operator on z̄s = WSzs with temperature τs > 0 : p ( k ) s = exp ( z̄ ( k ) s /τs ) ∑K k′=1 exp ( z̄ ( k′ ) s /τs ) . ( 2 ) Similarly we define probability of teacher ptj with temperature τt > 0 . Then we define the critic between z̄t and z̄s by the negative exponential of cross-entropy between ps and pt , i.e. , h ( z̄t , z̄s ) = e −H ( pt , ps ) = e ∑K k=1 p ( k ) t log p ( k ) s . ( 3 ) Then h is a positive bounded function and is maximized when pt matches with ps . Then by plugging Eq . 3 into Eq . 1 , it follows that I ( T ; S ) ≥ I ( T̄ ; S̄ ) ≥ E [ log e−H ( pt , ps ) 1 N ∑N−1 j=0 e −H ( ptj , ps ) ] ( 4 ) = E [ log exp ( pt · z̄s/τs ) 1 N ∑N−1 j=0 exp ( ptj · z̄s/τs ) ] ( 5 ) ≥ E [ log exp ( pt · z̄s/τs ) 1 N ∑N−1 j=0 ∑K k=1 p ( k ) tj exp ( z̄ ( k ) s /τs ) ] ( 6 ) = E [ log exp ( pt · z̄s/τs ) ∑K k=1 q ( k ) exp ( z̄ ( k ) s /τs ) ] , IProtoCPC , ( 7 ) where q ( k ) = 1N ∑N−1 j=0 ptj is a mean of teachers ’ probability which we call a prior . The first inequality is from data processing inequality , the second equality is from crossing out the constant term , and third inequality is from Jensen ’ s inequality . We define Prototypical Contrastive Predictive Coding ( ProtoCPC ) objective IProtoCPC in Eq . 7 . In addition , we define ProtoCPC loss LProtoCPC by the negative of ProtoCPC objective , thus minimizing ProtoCPC loss is equivalent to a variational maximization of mutual information between student and teacher representations . Relationship with CPC While many lower bounds to the mutual information were proposed , Tschannen et al . ( 2019 ) observe that the tightness of bound does not necessarily imply a better representation learning performance . From then , many works focused on analyzing the components of contrastive objective itself which are responsible for the empirical success . Wang & Isola ( 2020 ) argued that the contrastive loss is composed of alignment and uniformity loss , where alignment loss accounts for the similarity of two positive features , and uniformity loss measures how the features are scattered in the unit hypersphere and show that both losses are important in contrastive learning . We draw an analogy on ProtoCPC by dissecting into alignment and uniformity losses . Since the alignment loss is straightforward , we focus on the uniformity loss . We show that one can interpret the uniformity loss LProtoCPC-Unif by the re-substitution entropy estimator of zs via a von-Mises Fisher kernel density estimation ( vMF-KDE ) ( Ahmad & Lin , 1976 ) : LProtoCPC-Unif = Ezs∼S [ log K∑ k=1 q ( k ) exp ( z̄ ( k ) s /τs ) ] = Ezs∼S [ log K∑ k=1 q ( k ) exp ( wk · zs/τs ) ] ( 8 ) = Ezs∼S [ log p̂vMF-KDE ( zs ) ] + logZvMF = −Ĥ ( zs ) + logZvMF , ( 9 ) where each wk is a k-th column of WS and acts as a mean direction of k-th vMF distribution and q ( k ) acts as a prior for each k-th vMF distribution . The p̂vMF-KDE is thus the mixture of K vMF distribution with prior q ( k ) and then the uniformity loss is a re-substitution entropy Ĥ ( zs ) . The ZvMF is a normalizing constant for vMF distribution . Remark that the uniformity loss of CPC objective is also a re-substitution entropy with vMF-KDE , but the mean directions are given by negative samples ztj and the prior is uniform . It shows that the ProtoCPC objective allows modeling of complex mixture of vMF distribution by exploiting prior term and using prototypes remove the dependency on negative samples . Prior momentum Since ProtoCPC is contrastive , it requires sufficient negatives to perform learning . However , unlike CPC , ProtoCPC only requires prior q that accounts for the negatives . Therefore , we use exponential moving average ( EMA ) on prior q for better estimation . At each iteration , we update q by following update rule : q ( k ) ← mpq ( k ) + ( 1−mp ) 1 N N∑ j=1 p ( k ) tj , ( 10 ) where mp > 0 is a momentum rate . The prior momentum allows better estimation of prior term regardless of the size of negative samples . Assignment of teacher probability While KD used softmax operator for both probabilities of teacher and student networks , many self-supervised methods ( Asano et al. , 2019 ; Caron et al. , 2020 ) reported that the softmax operator can lead to collapse , i.e . every representation fall into the same one . To compromise , many prototypical self-supervised methods resort on Sinkhorn-Knopp iterative algorithm by formulating the assignment of teacher probability as an optimal transport problem : argmax Pt 〈Pt , Zt〉+ τtH ( Pt ) , s.t . Pt ∈ RN×K+ , Pt1K = 1N , P > t 1N = N K 1K , ( 11 ) where Zt is a matrix whose rows are ztj , H ( Pt ) = ∑N−1 j=0 ∑K k=1−p ( k ) t log p ( k ) t is a entropy and τt > 0 is a temperature that controls the smoothness of distribution . Then the Eq . 11 can be solved by only few steps of Sinkhorn-Knopp iteration ( Cuturi , 2013 ; Altschuler et al. , 2017 ) which iteratively projects Pt into following form : p ( k ) tj = βke z ( k ) tj /τt∑K k′=1 βk′e z ( k′ ) tj /τt , ( 12 ) where βk is a normalizing constant . We refer this to Sinkhorn-Knopp ( SK ) operator . The SK operator allows each prototype to be non-zero , i.e . q ( k ) is non-zero for each k. In practice , we only conduct a few steps of SK iterations . | This paper proposes to combine knowledge distillation (KD) and contrastive learning for distillation tasks. Concretely, it models the critic of a contrastive objective by the prototypical probabilistic discrepancy between two features. The authors then carry out extensive experiments on supervised model compression, self-supervised model compression, and self-supervised learning through self-distillation. The empirical results show that the proposed method outperforms other strong baselines. | SP:6136d5162fa80ff08e09e30d47e0e50098f9b76b |
Fooling Adversarial Training with Induction Noise | 1 INTRODUCTION . In recent years , deep learning has achieved great success , while the existence of adversarial examples ( Szegedy et al. , 2014 ) alerts us that existing deep neural networks are very vulnerable to adversarial attack . Crafted by adding imperceptible perturbations to the input images , adversarial examples can dramatically degrade the performance of accurate deep models , raising huge concerns in both the academy and the industry ( Chakraborty et al. , 2018 ; Ma et al. , 2020 ) . Adversarial Training ( AT ) is currently the most effective approach against adversarial examples ( Madry et al. , 2017 ; Athalye et al. , 2018 ) . In practice , adversarially trained models have been shown good robustness under various attack , and the recent state-of-the-art defense algorithms ( Zhang et al. , 2019 ; Wang et al. , 2020 ) are all variants of adversarial training . Therefore , it is widely believed that we have already found the cure to adversarial attack , i.e. , adversarial training , based on which we can build trustworthy models to a certain degree . In this paper , we challenge this common belief by showing that AT could be ineffective when injecting some small and specific poisonings into the training data , which leads to a catastrophic drop for AT on CIFAR-10 dataset in the test accuracy ( from 85 % to 56 % on clean data ) and the test robustness ( from 51 % to 0.6 % on adversarial data ) . Previously , Huang et al . ( 2021 ) and Fowl et al . ( 2021b ) have shown that injecting some special noise into the training data can make Standard Training ( ST ) ineffective . However , these kinds of noise can be easily removed by AT , i.e. , AT is still effective . While in this work , we are the first to explore whether there exists a kind of special and irremovable poisoning of training data that could make AT ineffective . Specifically , we first dissect the failure of Huang et al . ( 2021 ) and Fowl et al . ( 2021b ) on fooling AT and find that they craft poisons on a standardly trained model . As pointed out by Ilyas et al . ( 2019 ) , ST can only extract non-robust features , which will be discarded in AT because it only extracts robust features . In view of this , we should craft poisons with robust features extracted from adversarially trained models , which may be more resistant to AT . However , only using robust features is not sufficient to break down AT because we find that AT itself still works well when taking robust-feature perturbations during training . The key point is that we need to utilize a consistent misclassified target label for each class , and only with this consistent bias can we induce AT to the desired misclassification . Based on this , we instantiate a kind of irremovable poisoning , ADVersarially Inducing Noise ( ADVIN ) , for the training-time data fooling . ADVIN can not only degrade standard training like previous methods but also successfully break down adversarial training for the first time . To summarize , our main contributions are : • We are the first to study how to make adversarial training ineffective by injecting irremovable poisoning . It is more challenging since all previous fooling methods designed for standard training fail to work under adversarial training . • We instantiate a kind of irremovable noise , called ADVersarially Inducing Noise ( ADVIN ) , to poison data . Extensive experiments show that ADVIN can successfully make adversarial training ineffective and outperform ST-oriented methods by a large margin . • We apply ADVIN to prevent unauthorized exploitation of personal data , where ADVIN is shown to be effective against both standard and adversarial training , making our privacypreserved data truly unlearnable . 2 RELATED WORK . Data poisoning . Data poisoning aims at fooling the model to have a poor performance on clean test data by manipulating the training data . For example , Biggio et al . ( 2012 ) aims at poisoning an SVM model . While previous works mainly focus on poisoning the most influential examples using adversarial noise ( Koh & Liang , 2017 ; Muñoz-González et al. , 2017 ) , these methods can only play a limited role in the destruction of the training process of DNNs . Recently , Huang et al . ( 2021 ) and Fowl et al . ( 2021b ) propose error-minimizing noise and adversarial example noise , respectively , which lead standardly trained DNNs on them to have a test accuracy close to or even lower than random prediction . Unfortunately , their poisons can be removed by adversarial training . Therefore , we focus on how to generate poisons that could not be removed by adversarial training and deconstruct the training process at the same time , i.e. , making adversarial training ineffective . Addition discussion about recentlt related work could be found in Appendix E Adversarial Attack . Szegedy et al . ( 2014 ) has demonstrated the vulnerability of deep neural networks , which could be easily distorted by imperceptible perturbations . Typically , adversarial attacks utilize the error-maximizing noise ( untargeted attack ) to fool the models at test time ( Goodfellow et al. , 2015 ) . Specifically , the adversarial examples can be divided into two categories , untargeted ( Goodfellow et al. , 2015 ; Madry et al. , 2017 ) and targeted attack . Compared to the untargeted manner , targeted attack generates adversarial examples such that they are misclassified to the target class ( different from the original label ) . While iterative untargeted attack ( Madry et al. , 2017 ) is more popular in solving the inner loop of adversarial training , some recent works find that targeted attack can achieve comparable , and sometimes better , performance ( Xie & Yuille , 2020 ; Kurakin et al. , 2017 ; Wang & Zhang , 2019 ) . 3 THE DIFFICULTY ON FOOLING ADVERSARIAL TRAINING . Considering a K-class image classification task , we denote the natural data as Dc = { ( xi , yi ) } , where xi ∈ Rd is a d-dimensional input , and yi ∈ { 1 , 2 , . . . , K } is the corresponding class label . To learn a classifier f with parameters θt , Standard Training ( ST ) minimizes the following objective on clean data , where ` CE ( · , · ) denotes the cross entropy loss : min θt LST ( Dc , θ ) = min θt E ( xi , yi ) ∼Dc ` CE ( fθt ( xi ) , yi ) . ( 1 ) Instead , Adversarial Training ( AT ) aims to improve robustness against adversarial attack by training on adversarially perturbed data , resulting in the following minimax objective , min θt LAT ( Dc , θ ) = min θt E ( xi , yi ) ∼Dc max‖δt‖p≤εt ` CE ( fθt ( xi + δ t ) , yi ) , ( 2 ) where the sample-wise perturbation δt is constrained in a ` p-norm ball with radius εt and the inner maximization is typically solved by PGD ( Madry et al. , 2017 ) . Fooling Standard Training ( FST ) . Intuitively , the goal of the poisoned data Dp is to induce standard training to learn a model on Dp with parameters θt that is ineffective for classifying natural images from Dc . However , their fooling can only work for standard training while being easily alleviated under adversarial training . In other words , their “ unlearnable examples ” are actually learnable . Specifically , Huang et al . ( 2021 ) adopt the error-minimizing noise generated with the following min-min optimization problem for fooling standard training : min θs E ( xi , yi ) ∼Dc min‖δp‖≤εp ` CE ( fθs ( xi + δ p ) , yi ) , ( 3 ) where θs is the source model that is used to generate poisons with perturbation radius εp . The inner loop seeks the Lp-norm bounded noise δ by minimizing the loss with PGD steps , and the outer loop further optimizes the parameters θ by minimizing the loss on the adversarial pair ( xi + δp , yi ) . To investigate how error-minimizing noise can fool standard training , we compare the training process of clean data and error-minimizing perturbed data in Figure 1 ( a ) ( b ) , where the training loss of error-minimizing data is significantly smaller . This indicates that error minimization is designed to minimize the loss of the perturbed pair ( xi + δ p i , yi ) to near zero such that the poisoned sample can not be used for model updating . While for adversarial training , as shown in Figure 1 ( c ) ( d ) , its inner maximization process can easily remove the error-minimizing noise by further lifting the loss of the perturbed pair ( xi + δ p i + δ t i , yi ) with the error-maximizing noise δ t i . In this way , the hidden information is uncovered and makes those unlearnable examples learnable again . Thus , to fool adversarial training , we need to go beyond the paradigm of unlearnable examples and design a stronger type of poisoning , for which we need it to be irremovable and resistant to error-maximizing perturbations . Below , we introduce our attempts to design this irremovable noise . 4 DESIGNING OF IRREMOVABLE NOISE . Based on the investigation in Section 3 , we can easily see that it is more challenging for fooling adversarial training than standard training . In the following , we will design effective irremovable noise from the aspects of features , labels , and training strategies . 4.1 THE NECESSITY OF ROBUST FEATURES . First , we notice that it is necessary to use robust features for fooling AT . Specifically , we compare poisons generated using Fowl et al . ( 2021b ) from two different pre-trained models , a standardly trained model and an adversarially trained model , both with εp = 32/255 . Note that although here we use a larger perturbation radius εp , this factor can only slightly fool AT by ∼ 10 % performance drop in Huang et al . ( 2021 ) and can not guarantee irremovability . We compare the poisons generated from robust and non-robust features . The results are shown in Figure 2a . We can see that even with a larger εp , poisons generated from the ST source model are almost useless ( orange lines ) . In contrast , the poisons generated from the robust source model can effectively bring down the final robustness from∼ 50 % to∼ 30 % ( blue lines ) . More details of experiments for poison generations and training process could be found in Appendix A.2 This observation indicates that robust features are necessary for fooling AT . According to Ilyas et al . ( 2019 ) , ST can only extract non-robust features , and thus the generated poisons only contain nonrobust features , which , however , will be discarded under AT since it only relies on robust features . Therefore , to fool AT effectively , the source model itself must contain robust features so that the generated poisons could contain robust features that are resistant to AT . To achieve this goal , we adopt the adversarially trained models to craft poisons . 4.2 THE NECESSITY OF CONSISTENT LABEL BIAS . As shown in Section 3 , the error-minimizing noise can be easily removed by the error-maximizing process of AT . Recalling that AT itself can learn good models with error-maximizing noise generated by itself using untargeted attack , we consider to use alternative target labels that are different from the error-maximizing objective . Formally , given a source model fθs and a natural pair ( xi , yi ) ∈ Dc , we pick a target class y′i and generate the poison δ p i by δpi = argmin ‖δpi ‖≤εp ` CE ( fθs ( xi + δ p i ) , y ′ i ) . ( 4 ) Specifically , we consider the following strategies for assigning fooling labels : • Random ( Xie & Yuille , 2020 ) : a randomly drawn label y′i u.a.r.∼ { 1 , 2 , . . . , K } ; • LL ( Kurakin et al. , 2017 ) : the Least Likely label y′i = argmaxy 6=yi ` CE ( fθs ( xi ) , y ) ; • MC ( Wang & Zhang , 2019 ) : the Most Confusing label y′i = argminy 6=yi ` CE ( fθs ( xi ) , y ) ; • NextCycle ( ours ) : the next label in a cyclic order y′i = ( yi + 1 mod K ) ; • NearSwap ( ours ) : label swapping with y′i = { yi + 1 mod K , if yi = 2k + 1 , yi − 1 mod K , if yi = 2k , k ∈ N. We list their performance against AT in Figure 2b . We can see that like error-minimizing and errormaximizing noise , both Random , LL , and MC methods also fail to poison AT ( blue , orange , and green lines ) . Instead , we can see that both NextCycle and NearSwap can effectively degrade robust accuracy to 30 % – 35 % ( red and purple lines ) . Comparing the five strategies , we can find a common and underlying rule for the effective ones , e.g. , NextCycle and NearSwap , that the label mapping g : yi → y′i is consistent among samples in the same class while being different for samples from different classes . As a result , they impose a consistent bias on the poisoned data such that all samples in the class A are induced to a specific class B . In this way , they can induce AT to learn a false mapping between features and labels , resulting in a low robust accuracy on test data . Details of noise generation for these five label mapping strategy can be seen in Appendix A.3 . | This paper proposes to reduce the adversarial robustness of adversarial training by perturbing the training data with large perturbation budget. Various strategies for assigning fooling labels are explored, which eventually leads to a strong poisoning attack named IAT. Extensive experiments show the effectiveness of the proposed poisoning algorithm. | SP:95a969c783086a8e046961d325bc5de3e2659cd2 |
Fooling Adversarial Training with Induction Noise | 1 INTRODUCTION . In recent years , deep learning has achieved great success , while the existence of adversarial examples ( Szegedy et al. , 2014 ) alerts us that existing deep neural networks are very vulnerable to adversarial attack . Crafted by adding imperceptible perturbations to the input images , adversarial examples can dramatically degrade the performance of accurate deep models , raising huge concerns in both the academy and the industry ( Chakraborty et al. , 2018 ; Ma et al. , 2020 ) . Adversarial Training ( AT ) is currently the most effective approach against adversarial examples ( Madry et al. , 2017 ; Athalye et al. , 2018 ) . In practice , adversarially trained models have been shown good robustness under various attack , and the recent state-of-the-art defense algorithms ( Zhang et al. , 2019 ; Wang et al. , 2020 ) are all variants of adversarial training . Therefore , it is widely believed that we have already found the cure to adversarial attack , i.e. , adversarial training , based on which we can build trustworthy models to a certain degree . In this paper , we challenge this common belief by showing that AT could be ineffective when injecting some small and specific poisonings into the training data , which leads to a catastrophic drop for AT on CIFAR-10 dataset in the test accuracy ( from 85 % to 56 % on clean data ) and the test robustness ( from 51 % to 0.6 % on adversarial data ) . Previously , Huang et al . ( 2021 ) and Fowl et al . ( 2021b ) have shown that injecting some special noise into the training data can make Standard Training ( ST ) ineffective . However , these kinds of noise can be easily removed by AT , i.e. , AT is still effective . While in this work , we are the first to explore whether there exists a kind of special and irremovable poisoning of training data that could make AT ineffective . Specifically , we first dissect the failure of Huang et al . ( 2021 ) and Fowl et al . ( 2021b ) on fooling AT and find that they craft poisons on a standardly trained model . As pointed out by Ilyas et al . ( 2019 ) , ST can only extract non-robust features , which will be discarded in AT because it only extracts robust features . In view of this , we should craft poisons with robust features extracted from adversarially trained models , which may be more resistant to AT . However , only using robust features is not sufficient to break down AT because we find that AT itself still works well when taking robust-feature perturbations during training . The key point is that we need to utilize a consistent misclassified target label for each class , and only with this consistent bias can we induce AT to the desired misclassification . Based on this , we instantiate a kind of irremovable poisoning , ADVersarially Inducing Noise ( ADVIN ) , for the training-time data fooling . ADVIN can not only degrade standard training like previous methods but also successfully break down adversarial training for the first time . To summarize , our main contributions are : • We are the first to study how to make adversarial training ineffective by injecting irremovable poisoning . It is more challenging since all previous fooling methods designed for standard training fail to work under adversarial training . • We instantiate a kind of irremovable noise , called ADVersarially Inducing Noise ( ADVIN ) , to poison data . Extensive experiments show that ADVIN can successfully make adversarial training ineffective and outperform ST-oriented methods by a large margin . • We apply ADVIN to prevent unauthorized exploitation of personal data , where ADVIN is shown to be effective against both standard and adversarial training , making our privacypreserved data truly unlearnable . 2 RELATED WORK . Data poisoning . Data poisoning aims at fooling the model to have a poor performance on clean test data by manipulating the training data . For example , Biggio et al . ( 2012 ) aims at poisoning an SVM model . While previous works mainly focus on poisoning the most influential examples using adversarial noise ( Koh & Liang , 2017 ; Muñoz-González et al. , 2017 ) , these methods can only play a limited role in the destruction of the training process of DNNs . Recently , Huang et al . ( 2021 ) and Fowl et al . ( 2021b ) propose error-minimizing noise and adversarial example noise , respectively , which lead standardly trained DNNs on them to have a test accuracy close to or even lower than random prediction . Unfortunately , their poisons can be removed by adversarial training . Therefore , we focus on how to generate poisons that could not be removed by adversarial training and deconstruct the training process at the same time , i.e. , making adversarial training ineffective . Addition discussion about recentlt related work could be found in Appendix E Adversarial Attack . Szegedy et al . ( 2014 ) has demonstrated the vulnerability of deep neural networks , which could be easily distorted by imperceptible perturbations . Typically , adversarial attacks utilize the error-maximizing noise ( untargeted attack ) to fool the models at test time ( Goodfellow et al. , 2015 ) . Specifically , the adversarial examples can be divided into two categories , untargeted ( Goodfellow et al. , 2015 ; Madry et al. , 2017 ) and targeted attack . Compared to the untargeted manner , targeted attack generates adversarial examples such that they are misclassified to the target class ( different from the original label ) . While iterative untargeted attack ( Madry et al. , 2017 ) is more popular in solving the inner loop of adversarial training , some recent works find that targeted attack can achieve comparable , and sometimes better , performance ( Xie & Yuille , 2020 ; Kurakin et al. , 2017 ; Wang & Zhang , 2019 ) . 3 THE DIFFICULTY ON FOOLING ADVERSARIAL TRAINING . Considering a K-class image classification task , we denote the natural data as Dc = { ( xi , yi ) } , where xi ∈ Rd is a d-dimensional input , and yi ∈ { 1 , 2 , . . . , K } is the corresponding class label . To learn a classifier f with parameters θt , Standard Training ( ST ) minimizes the following objective on clean data , where ` CE ( · , · ) denotes the cross entropy loss : min θt LST ( Dc , θ ) = min θt E ( xi , yi ) ∼Dc ` CE ( fθt ( xi ) , yi ) . ( 1 ) Instead , Adversarial Training ( AT ) aims to improve robustness against adversarial attack by training on adversarially perturbed data , resulting in the following minimax objective , min θt LAT ( Dc , θ ) = min θt E ( xi , yi ) ∼Dc max‖δt‖p≤εt ` CE ( fθt ( xi + δ t ) , yi ) , ( 2 ) where the sample-wise perturbation δt is constrained in a ` p-norm ball with radius εt and the inner maximization is typically solved by PGD ( Madry et al. , 2017 ) . Fooling Standard Training ( FST ) . Intuitively , the goal of the poisoned data Dp is to induce standard training to learn a model on Dp with parameters θt that is ineffective for classifying natural images from Dc . However , their fooling can only work for standard training while being easily alleviated under adversarial training . In other words , their “ unlearnable examples ” are actually learnable . Specifically , Huang et al . ( 2021 ) adopt the error-minimizing noise generated with the following min-min optimization problem for fooling standard training : min θs E ( xi , yi ) ∼Dc min‖δp‖≤εp ` CE ( fθs ( xi + δ p ) , yi ) , ( 3 ) where θs is the source model that is used to generate poisons with perturbation radius εp . The inner loop seeks the Lp-norm bounded noise δ by minimizing the loss with PGD steps , and the outer loop further optimizes the parameters θ by minimizing the loss on the adversarial pair ( xi + δp , yi ) . To investigate how error-minimizing noise can fool standard training , we compare the training process of clean data and error-minimizing perturbed data in Figure 1 ( a ) ( b ) , where the training loss of error-minimizing data is significantly smaller . This indicates that error minimization is designed to minimize the loss of the perturbed pair ( xi + δ p i , yi ) to near zero such that the poisoned sample can not be used for model updating . While for adversarial training , as shown in Figure 1 ( c ) ( d ) , its inner maximization process can easily remove the error-minimizing noise by further lifting the loss of the perturbed pair ( xi + δ p i + δ t i , yi ) with the error-maximizing noise δ t i . In this way , the hidden information is uncovered and makes those unlearnable examples learnable again . Thus , to fool adversarial training , we need to go beyond the paradigm of unlearnable examples and design a stronger type of poisoning , for which we need it to be irremovable and resistant to error-maximizing perturbations . Below , we introduce our attempts to design this irremovable noise . 4 DESIGNING OF IRREMOVABLE NOISE . Based on the investigation in Section 3 , we can easily see that it is more challenging for fooling adversarial training than standard training . In the following , we will design effective irremovable noise from the aspects of features , labels , and training strategies . 4.1 THE NECESSITY OF ROBUST FEATURES . First , we notice that it is necessary to use robust features for fooling AT . Specifically , we compare poisons generated using Fowl et al . ( 2021b ) from two different pre-trained models , a standardly trained model and an adversarially trained model , both with εp = 32/255 . Note that although here we use a larger perturbation radius εp , this factor can only slightly fool AT by ∼ 10 % performance drop in Huang et al . ( 2021 ) and can not guarantee irremovability . We compare the poisons generated from robust and non-robust features . The results are shown in Figure 2a . We can see that even with a larger εp , poisons generated from the ST source model are almost useless ( orange lines ) . In contrast , the poisons generated from the robust source model can effectively bring down the final robustness from∼ 50 % to∼ 30 % ( blue lines ) . More details of experiments for poison generations and training process could be found in Appendix A.2 This observation indicates that robust features are necessary for fooling AT . According to Ilyas et al . ( 2019 ) , ST can only extract non-robust features , and thus the generated poisons only contain nonrobust features , which , however , will be discarded under AT since it only relies on robust features . Therefore , to fool AT effectively , the source model itself must contain robust features so that the generated poisons could contain robust features that are resistant to AT . To achieve this goal , we adopt the adversarially trained models to craft poisons . 4.2 THE NECESSITY OF CONSISTENT LABEL BIAS . As shown in Section 3 , the error-minimizing noise can be easily removed by the error-maximizing process of AT . Recalling that AT itself can learn good models with error-maximizing noise generated by itself using untargeted attack , we consider to use alternative target labels that are different from the error-maximizing objective . Formally , given a source model fθs and a natural pair ( xi , yi ) ∈ Dc , we pick a target class y′i and generate the poison δ p i by δpi = argmin ‖δpi ‖≤εp ` CE ( fθs ( xi + δ p i ) , y ′ i ) . ( 4 ) Specifically , we consider the following strategies for assigning fooling labels : • Random ( Xie & Yuille , 2020 ) : a randomly drawn label y′i u.a.r.∼ { 1 , 2 , . . . , K } ; • LL ( Kurakin et al. , 2017 ) : the Least Likely label y′i = argmaxy 6=yi ` CE ( fθs ( xi ) , y ) ; • MC ( Wang & Zhang , 2019 ) : the Most Confusing label y′i = argminy 6=yi ` CE ( fθs ( xi ) , y ) ; • NextCycle ( ours ) : the next label in a cyclic order y′i = ( yi + 1 mod K ) ; • NearSwap ( ours ) : label swapping with y′i = { yi + 1 mod K , if yi = 2k + 1 , yi − 1 mod K , if yi = 2k , k ∈ N. We list their performance against AT in Figure 2b . We can see that like error-minimizing and errormaximizing noise , both Random , LL , and MC methods also fail to poison AT ( blue , orange , and green lines ) . Instead , we can see that both NextCycle and NearSwap can effectively degrade robust accuracy to 30 % – 35 % ( red and purple lines ) . Comparing the five strategies , we can find a common and underlying rule for the effective ones , e.g. , NextCycle and NearSwap , that the label mapping g : yi → y′i is consistent among samples in the same class while being different for samples from different classes . As a result , they impose a consistent bias on the poisoned data such that all samples in the class A are induced to a specific class B . In this way , they can induce AT to learn a false mapping between features and labels , resulting in a low robust accuracy on test data . Details of noise generation for these five label mapping strategy can be seen in Appendix A.3 . | This paper studies a data poisoning method for adversarial training. I like this paper in general: The derivations are clear and empirical results are clearly presented. However, this paper may suffer from unclear formulations of threat model, as I will discuss below in more detail. | SP:95a969c783086a8e046961d325bc5de3e2659cd2 |
Fooling Adversarial Training with Induction Noise | 1 INTRODUCTION . In recent years , deep learning has achieved great success , while the existence of adversarial examples ( Szegedy et al. , 2014 ) alerts us that existing deep neural networks are very vulnerable to adversarial attack . Crafted by adding imperceptible perturbations to the input images , adversarial examples can dramatically degrade the performance of accurate deep models , raising huge concerns in both the academy and the industry ( Chakraborty et al. , 2018 ; Ma et al. , 2020 ) . Adversarial Training ( AT ) is currently the most effective approach against adversarial examples ( Madry et al. , 2017 ; Athalye et al. , 2018 ) . In practice , adversarially trained models have been shown good robustness under various attack , and the recent state-of-the-art defense algorithms ( Zhang et al. , 2019 ; Wang et al. , 2020 ) are all variants of adversarial training . Therefore , it is widely believed that we have already found the cure to adversarial attack , i.e. , adversarial training , based on which we can build trustworthy models to a certain degree . In this paper , we challenge this common belief by showing that AT could be ineffective when injecting some small and specific poisonings into the training data , which leads to a catastrophic drop for AT on CIFAR-10 dataset in the test accuracy ( from 85 % to 56 % on clean data ) and the test robustness ( from 51 % to 0.6 % on adversarial data ) . Previously , Huang et al . ( 2021 ) and Fowl et al . ( 2021b ) have shown that injecting some special noise into the training data can make Standard Training ( ST ) ineffective . However , these kinds of noise can be easily removed by AT , i.e. , AT is still effective . While in this work , we are the first to explore whether there exists a kind of special and irremovable poisoning of training data that could make AT ineffective . Specifically , we first dissect the failure of Huang et al . ( 2021 ) and Fowl et al . ( 2021b ) on fooling AT and find that they craft poisons on a standardly trained model . As pointed out by Ilyas et al . ( 2019 ) , ST can only extract non-robust features , which will be discarded in AT because it only extracts robust features . In view of this , we should craft poisons with robust features extracted from adversarially trained models , which may be more resistant to AT . However , only using robust features is not sufficient to break down AT because we find that AT itself still works well when taking robust-feature perturbations during training . The key point is that we need to utilize a consistent misclassified target label for each class , and only with this consistent bias can we induce AT to the desired misclassification . Based on this , we instantiate a kind of irremovable poisoning , ADVersarially Inducing Noise ( ADVIN ) , for the training-time data fooling . ADVIN can not only degrade standard training like previous methods but also successfully break down adversarial training for the first time . To summarize , our main contributions are : • We are the first to study how to make adversarial training ineffective by injecting irremovable poisoning . It is more challenging since all previous fooling methods designed for standard training fail to work under adversarial training . • We instantiate a kind of irremovable noise , called ADVersarially Inducing Noise ( ADVIN ) , to poison data . Extensive experiments show that ADVIN can successfully make adversarial training ineffective and outperform ST-oriented methods by a large margin . • We apply ADVIN to prevent unauthorized exploitation of personal data , where ADVIN is shown to be effective against both standard and adversarial training , making our privacypreserved data truly unlearnable . 2 RELATED WORK . Data poisoning . Data poisoning aims at fooling the model to have a poor performance on clean test data by manipulating the training data . For example , Biggio et al . ( 2012 ) aims at poisoning an SVM model . While previous works mainly focus on poisoning the most influential examples using adversarial noise ( Koh & Liang , 2017 ; Muñoz-González et al. , 2017 ) , these methods can only play a limited role in the destruction of the training process of DNNs . Recently , Huang et al . ( 2021 ) and Fowl et al . ( 2021b ) propose error-minimizing noise and adversarial example noise , respectively , which lead standardly trained DNNs on them to have a test accuracy close to or even lower than random prediction . Unfortunately , their poisons can be removed by adversarial training . Therefore , we focus on how to generate poisons that could not be removed by adversarial training and deconstruct the training process at the same time , i.e. , making adversarial training ineffective . Addition discussion about recentlt related work could be found in Appendix E Adversarial Attack . Szegedy et al . ( 2014 ) has demonstrated the vulnerability of deep neural networks , which could be easily distorted by imperceptible perturbations . Typically , adversarial attacks utilize the error-maximizing noise ( untargeted attack ) to fool the models at test time ( Goodfellow et al. , 2015 ) . Specifically , the adversarial examples can be divided into two categories , untargeted ( Goodfellow et al. , 2015 ; Madry et al. , 2017 ) and targeted attack . Compared to the untargeted manner , targeted attack generates adversarial examples such that they are misclassified to the target class ( different from the original label ) . While iterative untargeted attack ( Madry et al. , 2017 ) is more popular in solving the inner loop of adversarial training , some recent works find that targeted attack can achieve comparable , and sometimes better , performance ( Xie & Yuille , 2020 ; Kurakin et al. , 2017 ; Wang & Zhang , 2019 ) . 3 THE DIFFICULTY ON FOOLING ADVERSARIAL TRAINING . Considering a K-class image classification task , we denote the natural data as Dc = { ( xi , yi ) } , where xi ∈ Rd is a d-dimensional input , and yi ∈ { 1 , 2 , . . . , K } is the corresponding class label . To learn a classifier f with parameters θt , Standard Training ( ST ) minimizes the following objective on clean data , where ` CE ( · , · ) denotes the cross entropy loss : min θt LST ( Dc , θ ) = min θt E ( xi , yi ) ∼Dc ` CE ( fθt ( xi ) , yi ) . ( 1 ) Instead , Adversarial Training ( AT ) aims to improve robustness against adversarial attack by training on adversarially perturbed data , resulting in the following minimax objective , min θt LAT ( Dc , θ ) = min θt E ( xi , yi ) ∼Dc max‖δt‖p≤εt ` CE ( fθt ( xi + δ t ) , yi ) , ( 2 ) where the sample-wise perturbation δt is constrained in a ` p-norm ball with radius εt and the inner maximization is typically solved by PGD ( Madry et al. , 2017 ) . Fooling Standard Training ( FST ) . Intuitively , the goal of the poisoned data Dp is to induce standard training to learn a model on Dp with parameters θt that is ineffective for classifying natural images from Dc . However , their fooling can only work for standard training while being easily alleviated under adversarial training . In other words , their “ unlearnable examples ” are actually learnable . Specifically , Huang et al . ( 2021 ) adopt the error-minimizing noise generated with the following min-min optimization problem for fooling standard training : min θs E ( xi , yi ) ∼Dc min‖δp‖≤εp ` CE ( fθs ( xi + δ p ) , yi ) , ( 3 ) where θs is the source model that is used to generate poisons with perturbation radius εp . The inner loop seeks the Lp-norm bounded noise δ by minimizing the loss with PGD steps , and the outer loop further optimizes the parameters θ by minimizing the loss on the adversarial pair ( xi + δp , yi ) . To investigate how error-minimizing noise can fool standard training , we compare the training process of clean data and error-minimizing perturbed data in Figure 1 ( a ) ( b ) , where the training loss of error-minimizing data is significantly smaller . This indicates that error minimization is designed to minimize the loss of the perturbed pair ( xi + δ p i , yi ) to near zero such that the poisoned sample can not be used for model updating . While for adversarial training , as shown in Figure 1 ( c ) ( d ) , its inner maximization process can easily remove the error-minimizing noise by further lifting the loss of the perturbed pair ( xi + δ p i + δ t i , yi ) with the error-maximizing noise δ t i . In this way , the hidden information is uncovered and makes those unlearnable examples learnable again . Thus , to fool adversarial training , we need to go beyond the paradigm of unlearnable examples and design a stronger type of poisoning , for which we need it to be irremovable and resistant to error-maximizing perturbations . Below , we introduce our attempts to design this irremovable noise . 4 DESIGNING OF IRREMOVABLE NOISE . Based on the investigation in Section 3 , we can easily see that it is more challenging for fooling adversarial training than standard training . In the following , we will design effective irremovable noise from the aspects of features , labels , and training strategies . 4.1 THE NECESSITY OF ROBUST FEATURES . First , we notice that it is necessary to use robust features for fooling AT . Specifically , we compare poisons generated using Fowl et al . ( 2021b ) from two different pre-trained models , a standardly trained model and an adversarially trained model , both with εp = 32/255 . Note that although here we use a larger perturbation radius εp , this factor can only slightly fool AT by ∼ 10 % performance drop in Huang et al . ( 2021 ) and can not guarantee irremovability . We compare the poisons generated from robust and non-robust features . The results are shown in Figure 2a . We can see that even with a larger εp , poisons generated from the ST source model are almost useless ( orange lines ) . In contrast , the poisons generated from the robust source model can effectively bring down the final robustness from∼ 50 % to∼ 30 % ( blue lines ) . More details of experiments for poison generations and training process could be found in Appendix A.2 This observation indicates that robust features are necessary for fooling AT . According to Ilyas et al . ( 2019 ) , ST can only extract non-robust features , and thus the generated poisons only contain nonrobust features , which , however , will be discarded under AT since it only relies on robust features . Therefore , to fool AT effectively , the source model itself must contain robust features so that the generated poisons could contain robust features that are resistant to AT . To achieve this goal , we adopt the adversarially trained models to craft poisons . 4.2 THE NECESSITY OF CONSISTENT LABEL BIAS . As shown in Section 3 , the error-minimizing noise can be easily removed by the error-maximizing process of AT . Recalling that AT itself can learn good models with error-maximizing noise generated by itself using untargeted attack , we consider to use alternative target labels that are different from the error-maximizing objective . Formally , given a source model fθs and a natural pair ( xi , yi ) ∈ Dc , we pick a target class y′i and generate the poison δ p i by δpi = argmin ‖δpi ‖≤εp ` CE ( fθs ( xi + δ p i ) , y ′ i ) . ( 4 ) Specifically , we consider the following strategies for assigning fooling labels : • Random ( Xie & Yuille , 2020 ) : a randomly drawn label y′i u.a.r.∼ { 1 , 2 , . . . , K } ; • LL ( Kurakin et al. , 2017 ) : the Least Likely label y′i = argmaxy 6=yi ` CE ( fθs ( xi ) , y ) ; • MC ( Wang & Zhang , 2019 ) : the Most Confusing label y′i = argminy 6=yi ` CE ( fθs ( xi ) , y ) ; • NextCycle ( ours ) : the next label in a cyclic order y′i = ( yi + 1 mod K ) ; • NearSwap ( ours ) : label swapping with y′i = { yi + 1 mod K , if yi = 2k + 1 , yi − 1 mod K , if yi = 2k , k ∈ N. We list their performance against AT in Figure 2b . We can see that like error-minimizing and errormaximizing noise , both Random , LL , and MC methods also fail to poison AT ( blue , orange , and green lines ) . Instead , we can see that both NextCycle and NearSwap can effectively degrade robust accuracy to 30 % – 35 % ( red and purple lines ) . Comparing the five strategies , we can find a common and underlying rule for the effective ones , e.g. , NextCycle and NearSwap , that the label mapping g : yi → y′i is consistent among samples in the same class while being different for samples from different classes . As a result , they impose a consistent bias on the poisoned data such that all samples in the class A are induced to a specific class B . In this way , they can induce AT to learn a false mapping between features and labels , resulting in a low robust accuracy on test data . Details of noise generation for these five label mapping strategy can be seen in Appendix A.3 . | This work tackles the problem of data poisoning adversarial training in the (image classification) setting where the adversary can add $\ell_p$ constrained perturbations to each training example. Others have previously studied this problem in the standard ERM setting by adding $\ell_p$ perturbations to examples that minimize loss on pretrained models: when the downstream learner tries to minimize risk on these perturbed examples, they can do well on the train set but not on a held-out set from the original distribution (this work is all performed in CIFAR). It turns out that adversarially trained models can largely circumvent this class of attacks, as they can modify the adversarial $\ell_p$ perturbations in the adversarial training process to make learning require appropriately generalizable features. The authors try a new attack that focusses on adding "robust" features to examples: in the most basic attack, for each (example, label) combination the authors perturb the example to maximize the probability of a different (label-consistent --- i.e. each image of a given label is perturbed towards the same class, one such mapping could be target_label = label + 1 % num_classes ) label. The authors specialize the attack further by performing an alternating optimization routine in which one repeatedly (starting from a pretrained adv-trained model $f$): (a) completes the perturbation above on the examples using $f$ and then (b) adversarially trains on $f$ using the new label scheme. Using this technique the authors can force the model to perform well on the train set, but not on a held-out set. Using only step (a) (i.e. no alternating optimization routine) the authors can fool the model in the same sense but to a lesser extent. | SP:95a969c783086a8e046961d325bc5de3e2659cd2 |
Measuring CLEVRness: Black-box Testing of Visual Reasoning Models | 1 INTRODUCTION . Are our artificial intelligence systems capable of reasoning ? Or like Clever Hans , they use various cues only tangentially related to the task and rely on rote memorization with poor generalization ? ( Pfungst , 1911 ; Johnson et al. , 2017a ) This work revisits such a question and proposes an interactive framework with the communication channel between two players . The first player , which reasoning capabilities we are about to test , performs visual reasoning tasks , we call it VisualQA Player . The second player , which we call the Adversarial Player , is manipulating the scene so that it fools the first player even though those changes still lead to correct reasoning steps among humans . Both players interact with each other only through questions , answers and the visual scene as shown in Figure 1 . If the Adversarial Player manipulating the scene causes the Visual-QA Player to change its answer even though the new scene is still valid for the same question and answer , it is then the reasoning failure . It is similar to the following situation . Imagine a box is placed between two spheres . If you ask a question , is there a box between two spheres ? , the answer should be positive . Now , if we move the box anywhere so it does not cross any of the spheres , and ask the same question , the response should remain unchanged . In other words , we postulate that reasoning outputs of agents need to be invariant under scene configurations that are consistent with the questions-answer pairs . Moreover , in the spirit of generic adversarial attacks , we seek configurations that also pose little if any reasoning challenges for humans . We propose an automatic and agnostic pipeline to benchmark the reasoning capabilities of various models , only assuming they can communicate by answering questions about the scene . Due to the recent stream of research in vision-and-language ( Zhang et al. , 2021 ; Jiang et al. , 2020 ; Guo et al. , 2019b ; Su et al. , 2020 ; Wang et al. , 2020 ; Kamath et al. , 2021 ; Tan & Bansal , 2019 ; Chen et al. , 2020 ) , we believe there will be an increasing number of vision models that operate through language . Moreover , we also consider the visual question answering framework set-up as a two-player system as an excellent benchmarking pipeline . We perform all tests by scene manipulations and observing how a tested model behaves under such changes . The pipeline does not require any knowledge of the internals of the tested model . It also does not manipulate the sensory information of such a model , e.g. , pixels in the images , and all the manipulations are physically meaningful . Even though our current pipeline uses synthetic scenes as only those can easily be automatically manipulated , our results have also real-world ramifications . If models are susceptible to semantically meaningless changes1 in scene configurations , in a synthetic setting , there are valid concerns that real-world robots could also be prone to manipulation of objects in a room . Finally , our work also questions the possibility of training and benchmarking networks in a purely data-driven and offline , static manner . Contributions . The main contributions of our work could be summarized in three points . First , we propose a strong black-box adversarial test , which makes no assumptions about the underlying mechanics of a tested model , formulated as a game between two players . Our test does not require any direct access to the tested model , even through its sensory information . In particular , it does not require gradients , output probabilities , or any access to the perceived image . Our work also deviates from bounded perturbations and instead focuses on global scene manipulations that are still consistent with the task constraints , and can change the behavior of a tested model . Second , we reformulate visual reasoning by integrating visual question answering with zero-sum two-player game frameworks . Under our novel formulation , a visual and adversary agents compete against each other through content manipulation . We believe that this is an initial step towards more sophisticated frameworks that integrate computer vision with multi-agent systems . Third , we explore the limits of the data-driven approaches in synthetic visual scenarios , and demonstrate that current CLEVR models are lacking the efficiency to learn robust reasoning steps . 2 RELATED WORK . Our work touches upon various research directions , which we briefly describe here . Visual QA . Introduced as a visual counter-part of the Turing Test ( Malinowski & Fritz , 2014 ; Geman et al. , 2015 ) , it became a computer vision task that requires a holistic visual understanding . Many other works have extended the task to larger datasets or videos or adversarial train-test splits ( Antol et al. , 2015 ; Agrawal et al. , 2018 ; Tapaswi et al. , 2016 ; Yu et al. , 2019 ) . More recently , we also observe the generalization of the task to become a part of the vision-plus-language suite of benchmarks ( Lu et al. , 2019 ; Chen et al. , 2019 ; Wang et al. , 2021 ) . Johnson et al . ( 2017a ) have introduced a synthetic variant of the Visual QA problem that is more focused on reasoning and the control of the experimentation . Although it was shown that traditional methods ( Yang et al. , 2016 ) are not enough to solve that dataset , newer methods can pass the human baseline on this task . These methods are trained to operate on pixels and text directly ( Santoro et al. , 2017 ; Perez et al. , 2018 ; Hudson & Manning , 2018 ; Malinowski et al. , 2018 ; Kamath et al. , 2021 ) or they induce programs as an intermediate representation ( Johnson et al. , 2017b ; Mascharka et al. , 2018 ; Yi et al. , 2018 ) . Hudson & Manning ( 2019 ) have shown that Visual QA models lack some reasoning robustness but their approach is mostly linguistic and still static . Some other works also observe issues with static evaluation and proposed more dynamic benchmarks , e.g. , with a human-in-the-loop ( Khashabi et al. , 2021 ; Nie et al. , 2020 ; Li et al. , 2021 ; Sheng et al. , 2021 ) . We extend the line of research on Visual QA by reformulating it as an interactive two-agents system , and show that CLEVR under such a new setting is still an unsolved problem . Our work also differs from previous works in that it focuses on visual reasoning , is interactive and fully automatic . Adversarial perturbations . Szegedy et al . ( 2014 ) ; Goodfellow et al . ( 2015 ) ; Kurakin et al . ( 2016 ) ; Carlini & Wagner ( 2016 ) have introduced early methods that can ‘ fool ’ networks by performing tiny , visually imperceptible , perturbations of the input image . Moosavi-Dezfooli et al . ( 2017 ) have also shown universal and untargeted adversarial perturbations that are more transferable than previous approaches . Most methods perform white-box attacks , where an adversarial model has access to the target model ’ s parameters or gradients . In black-box attacks such access is removed and , e.g. , only output probabilities are available ( Guo et al. , 2019a ) . Other black-box attacks involve the use 1Changes that are consistent with the task constraints . of surrogates to estimate gradients of the real target ( Papernot et al. , 2017 ; Cheng et al. , 2019 ) or gradient-free methods ( Alzantot et al. , 2018 ) . More related to our work , Cheng et al . ( 2018 ) describe a black-box system , which only assumes access to outputs of the network . However , all the perturbations described above are continuous-based where individual pixels are changed independently . This leads to improbable images and assumes access to the sensory inputs of the neural network . In contrary , semantic perturbations ( Joshi et al. , 2019 ; Zeng et al. , 2019 ) , operate on semantically meaningful chunks of the input , leading to more plausible and physically interpretable perturbations . However , they still assume direct access to either images or ideally differentiable renderers . We can interpret our work within the adversarial perturbations framework , where the adversarial model can change the original scene by its manipulations , with zero access to the target model , including its sensory information and not limited to tiny changes but instead to semantically and globally meaningless modifications . Reinforcement learning . The game between the Visual-QA Player and Adversarial Player is a zero-sum two-player game . Conneau et al . ( 2017 ) use a conceptually similar two-player game to find a better word alignment between two languages without parallel corpus . Inspired by such a problem formulation , we consider our two-player game as a tool to achieve better reasoning models . We optimize the Adversarial Player with Advantage Actor-Critic ( A2C ) algorithm ( Sutton & Barto , 2018 ; Degris et al. , 2012 ) . Probing and measuring intelligence . Turing Test ( Turing , 2009 ) is considered to be among the earliest works on measuring the intelligence of artificial systems . Crucially to us , it is also formulated as a two-player game with an interrogation protocol . Legg ( 2008 ) systematizes and relates the notion of intelligence from different fields with the main focus on ‘ universality ’ . Johnson et al . ( 2017a ) have transferred the notion of intelligence onto the visual ground and emphasized reasoning rather than universality . It seems there is no widely accepted dataset or definition that encompasses our intuitions about intelligence . However , there are a few recent directions showing the lack thereof , mainly highlighting bias amplification or absence of mathematical capabilities ( Hendricks et al. , 2018 ; Bhardwaj et al. , 2021 ; Piekos et al. , 2021 ) . 3 PRELIMINARIES . In this section , we explain briefly how the CLEVR dataset ( Johnson et al. , 2017a ) is constructed and introduce our notation and definitions . CLEVR is a synthetic visual question answering dataset introduced by Johnson et al . ( 2017a ) , which consists of about 700k training and 150k validation image-question-answer triplets . Images are artificially constructed and rendered from scene graphs – a special structure containing information about object attributes such as position or color . Such a scene graph is also used to synthesize the ground-truth question-answer pairs by expanding templates according to the depth-first-search ordering . Ambiguous scenes are rejected . Each image represents an isometric view of the scene containing from two to ten objects . There are three classes of objects , spheres , cubes and cylinders . Each object can also be either large or small and has one color out of four ( brown , purple , cyan , yellow ) . It can also be either metallic or rubber-made . Every object has x and y coordinates that are confined within the ( −3 , +3 ) range . We use the same generation process to render modified scenes . CLEVR models . Various models have been introduced to work with the CLEVR dataset , some even ‘ solving ’ the dataset by achieving near perfect performance . Despite the strong offline performance , we test if those models ’ performance perpetuates in the more interactive setting where configurations of the scene could be changed . Whenever possible , we use pre-trained CLEVR models . Otherwise , we train the remaining models from scratch by making sure we achieve results similar to published accuracy numbers on the validation set . We summarize all the models in Table 1 . We show the accuracy on the CLEVR dataset ( Accuracy ) , indicate if an architecture is trained from scratch ( Re-trained ) , briefly describe how multi-modal fusion and reasoning is conducted ( Reasoning Mechanism ) , and indicate any extra privileged information required during the training process ( Extra ) . For instance , some models require extra access to functional programs used during the dataset generation , use scene graphs as a supervisory signal ( states ) , or always operate on scene graphs ( input-states ) . Otherwise , the models were trained only from image-question-answer triples . Mini-games . We formulate our problem as a Game between two players , Visual-QA Player and Adversarial Player . The Visual-QA Player takes as input question-image pairs and provide answers to such questions . Some models use states ( scene-graphs ) that replace images or require programs ( Johnson et al. , 2017a ) . The whole game consists of all CLEVR data points . For our purpose , we extend the notion of the Game into Mini-games . The rules of Mini-games are identical to the whole Game . The only difference is that each Mini-game operates on a subset of the CLEVR dataset . We define the size of a Mini-game by the number of datapoints that are attached to that Minigame . We sample data points for each Mini-game randomly and mutually exclusively . Mini-games have analogies in the adversarial perturbations literature . Mini-games of size one resemble perimage adversarial perturbations ( Goodfellow et al. , 2015 ; Moosavi-Dezfooli et al. , 2016 ) whereas a Mini-game that has all data pointsis similar to universal adversarial perturbations ( Moosavi-Dezfooli et al. , 2017 ) . In this work , we investigate various Mini-game sizes but due to the sheer scale we were unable to use the whole game as the Mini-game . Larger Mini-games make the optimization process more difficult as the domain where the Adversarial Player needs to operate increases . The training is also much more time-consuming and a sequential process . Instead , we can train multiple players on different Mini-games independently and thus massively . We leave the arduous training of the universal Adversarial Player on the whole Game as a possible future direction . | The paper explores measuring VQA models under adversarial settings, by having two competing models, when reasoning over a CLEVR scene as usual, and the other seeks to make the scene more challenging to answer. These settings reveal the weaknesses of visual reasoning models, and demonstrate that their apparent almost perfect performance on the standard CLEVR dataset may give imprecise impression about their “true” reasoning capabilities, as the adversarial settings may better reveal. Update: Following the detailed and thorough response by the authors that addressed most of my concerns, I'm happy to increase my score. | SP:838a321f381bd3aa51c7e05897f4b0c0a3239196 |
Measuring CLEVRness: Black-box Testing of Visual Reasoning Models | 1 INTRODUCTION . Are our artificial intelligence systems capable of reasoning ? Or like Clever Hans , they use various cues only tangentially related to the task and rely on rote memorization with poor generalization ? ( Pfungst , 1911 ; Johnson et al. , 2017a ) This work revisits such a question and proposes an interactive framework with the communication channel between two players . The first player , which reasoning capabilities we are about to test , performs visual reasoning tasks , we call it VisualQA Player . The second player , which we call the Adversarial Player , is manipulating the scene so that it fools the first player even though those changes still lead to correct reasoning steps among humans . Both players interact with each other only through questions , answers and the visual scene as shown in Figure 1 . If the Adversarial Player manipulating the scene causes the Visual-QA Player to change its answer even though the new scene is still valid for the same question and answer , it is then the reasoning failure . It is similar to the following situation . Imagine a box is placed between two spheres . If you ask a question , is there a box between two spheres ? , the answer should be positive . Now , if we move the box anywhere so it does not cross any of the spheres , and ask the same question , the response should remain unchanged . In other words , we postulate that reasoning outputs of agents need to be invariant under scene configurations that are consistent with the questions-answer pairs . Moreover , in the spirit of generic adversarial attacks , we seek configurations that also pose little if any reasoning challenges for humans . We propose an automatic and agnostic pipeline to benchmark the reasoning capabilities of various models , only assuming they can communicate by answering questions about the scene . Due to the recent stream of research in vision-and-language ( Zhang et al. , 2021 ; Jiang et al. , 2020 ; Guo et al. , 2019b ; Su et al. , 2020 ; Wang et al. , 2020 ; Kamath et al. , 2021 ; Tan & Bansal , 2019 ; Chen et al. , 2020 ) , we believe there will be an increasing number of vision models that operate through language . Moreover , we also consider the visual question answering framework set-up as a two-player system as an excellent benchmarking pipeline . We perform all tests by scene manipulations and observing how a tested model behaves under such changes . The pipeline does not require any knowledge of the internals of the tested model . It also does not manipulate the sensory information of such a model , e.g. , pixels in the images , and all the manipulations are physically meaningful . Even though our current pipeline uses synthetic scenes as only those can easily be automatically manipulated , our results have also real-world ramifications . If models are susceptible to semantically meaningless changes1 in scene configurations , in a synthetic setting , there are valid concerns that real-world robots could also be prone to manipulation of objects in a room . Finally , our work also questions the possibility of training and benchmarking networks in a purely data-driven and offline , static manner . Contributions . The main contributions of our work could be summarized in three points . First , we propose a strong black-box adversarial test , which makes no assumptions about the underlying mechanics of a tested model , formulated as a game between two players . Our test does not require any direct access to the tested model , even through its sensory information . In particular , it does not require gradients , output probabilities , or any access to the perceived image . Our work also deviates from bounded perturbations and instead focuses on global scene manipulations that are still consistent with the task constraints , and can change the behavior of a tested model . Second , we reformulate visual reasoning by integrating visual question answering with zero-sum two-player game frameworks . Under our novel formulation , a visual and adversary agents compete against each other through content manipulation . We believe that this is an initial step towards more sophisticated frameworks that integrate computer vision with multi-agent systems . Third , we explore the limits of the data-driven approaches in synthetic visual scenarios , and demonstrate that current CLEVR models are lacking the efficiency to learn robust reasoning steps . 2 RELATED WORK . Our work touches upon various research directions , which we briefly describe here . Visual QA . Introduced as a visual counter-part of the Turing Test ( Malinowski & Fritz , 2014 ; Geman et al. , 2015 ) , it became a computer vision task that requires a holistic visual understanding . Many other works have extended the task to larger datasets or videos or adversarial train-test splits ( Antol et al. , 2015 ; Agrawal et al. , 2018 ; Tapaswi et al. , 2016 ; Yu et al. , 2019 ) . More recently , we also observe the generalization of the task to become a part of the vision-plus-language suite of benchmarks ( Lu et al. , 2019 ; Chen et al. , 2019 ; Wang et al. , 2021 ) . Johnson et al . ( 2017a ) have introduced a synthetic variant of the Visual QA problem that is more focused on reasoning and the control of the experimentation . Although it was shown that traditional methods ( Yang et al. , 2016 ) are not enough to solve that dataset , newer methods can pass the human baseline on this task . These methods are trained to operate on pixels and text directly ( Santoro et al. , 2017 ; Perez et al. , 2018 ; Hudson & Manning , 2018 ; Malinowski et al. , 2018 ; Kamath et al. , 2021 ) or they induce programs as an intermediate representation ( Johnson et al. , 2017b ; Mascharka et al. , 2018 ; Yi et al. , 2018 ) . Hudson & Manning ( 2019 ) have shown that Visual QA models lack some reasoning robustness but their approach is mostly linguistic and still static . Some other works also observe issues with static evaluation and proposed more dynamic benchmarks , e.g. , with a human-in-the-loop ( Khashabi et al. , 2021 ; Nie et al. , 2020 ; Li et al. , 2021 ; Sheng et al. , 2021 ) . We extend the line of research on Visual QA by reformulating it as an interactive two-agents system , and show that CLEVR under such a new setting is still an unsolved problem . Our work also differs from previous works in that it focuses on visual reasoning , is interactive and fully automatic . Adversarial perturbations . Szegedy et al . ( 2014 ) ; Goodfellow et al . ( 2015 ) ; Kurakin et al . ( 2016 ) ; Carlini & Wagner ( 2016 ) have introduced early methods that can ‘ fool ’ networks by performing tiny , visually imperceptible , perturbations of the input image . Moosavi-Dezfooli et al . ( 2017 ) have also shown universal and untargeted adversarial perturbations that are more transferable than previous approaches . Most methods perform white-box attacks , where an adversarial model has access to the target model ’ s parameters or gradients . In black-box attacks such access is removed and , e.g. , only output probabilities are available ( Guo et al. , 2019a ) . Other black-box attacks involve the use 1Changes that are consistent with the task constraints . of surrogates to estimate gradients of the real target ( Papernot et al. , 2017 ; Cheng et al. , 2019 ) or gradient-free methods ( Alzantot et al. , 2018 ) . More related to our work , Cheng et al . ( 2018 ) describe a black-box system , which only assumes access to outputs of the network . However , all the perturbations described above are continuous-based where individual pixels are changed independently . This leads to improbable images and assumes access to the sensory inputs of the neural network . In contrary , semantic perturbations ( Joshi et al. , 2019 ; Zeng et al. , 2019 ) , operate on semantically meaningful chunks of the input , leading to more plausible and physically interpretable perturbations . However , they still assume direct access to either images or ideally differentiable renderers . We can interpret our work within the adversarial perturbations framework , where the adversarial model can change the original scene by its manipulations , with zero access to the target model , including its sensory information and not limited to tiny changes but instead to semantically and globally meaningless modifications . Reinforcement learning . The game between the Visual-QA Player and Adversarial Player is a zero-sum two-player game . Conneau et al . ( 2017 ) use a conceptually similar two-player game to find a better word alignment between two languages without parallel corpus . Inspired by such a problem formulation , we consider our two-player game as a tool to achieve better reasoning models . We optimize the Adversarial Player with Advantage Actor-Critic ( A2C ) algorithm ( Sutton & Barto , 2018 ; Degris et al. , 2012 ) . Probing and measuring intelligence . Turing Test ( Turing , 2009 ) is considered to be among the earliest works on measuring the intelligence of artificial systems . Crucially to us , it is also formulated as a two-player game with an interrogation protocol . Legg ( 2008 ) systematizes and relates the notion of intelligence from different fields with the main focus on ‘ universality ’ . Johnson et al . ( 2017a ) have transferred the notion of intelligence onto the visual ground and emphasized reasoning rather than universality . It seems there is no widely accepted dataset or definition that encompasses our intuitions about intelligence . However , there are a few recent directions showing the lack thereof , mainly highlighting bias amplification or absence of mathematical capabilities ( Hendricks et al. , 2018 ; Bhardwaj et al. , 2021 ; Piekos et al. , 2021 ) . 3 PRELIMINARIES . In this section , we explain briefly how the CLEVR dataset ( Johnson et al. , 2017a ) is constructed and introduce our notation and definitions . CLEVR is a synthetic visual question answering dataset introduced by Johnson et al . ( 2017a ) , which consists of about 700k training and 150k validation image-question-answer triplets . Images are artificially constructed and rendered from scene graphs – a special structure containing information about object attributes such as position or color . Such a scene graph is also used to synthesize the ground-truth question-answer pairs by expanding templates according to the depth-first-search ordering . Ambiguous scenes are rejected . Each image represents an isometric view of the scene containing from two to ten objects . There are three classes of objects , spheres , cubes and cylinders . Each object can also be either large or small and has one color out of four ( brown , purple , cyan , yellow ) . It can also be either metallic or rubber-made . Every object has x and y coordinates that are confined within the ( −3 , +3 ) range . We use the same generation process to render modified scenes . CLEVR models . Various models have been introduced to work with the CLEVR dataset , some even ‘ solving ’ the dataset by achieving near perfect performance . Despite the strong offline performance , we test if those models ’ performance perpetuates in the more interactive setting where configurations of the scene could be changed . Whenever possible , we use pre-trained CLEVR models . Otherwise , we train the remaining models from scratch by making sure we achieve results similar to published accuracy numbers on the validation set . We summarize all the models in Table 1 . We show the accuracy on the CLEVR dataset ( Accuracy ) , indicate if an architecture is trained from scratch ( Re-trained ) , briefly describe how multi-modal fusion and reasoning is conducted ( Reasoning Mechanism ) , and indicate any extra privileged information required during the training process ( Extra ) . For instance , some models require extra access to functional programs used during the dataset generation , use scene graphs as a supervisory signal ( states ) , or always operate on scene graphs ( input-states ) . Otherwise , the models were trained only from image-question-answer triples . Mini-games . We formulate our problem as a Game between two players , Visual-QA Player and Adversarial Player . The Visual-QA Player takes as input question-image pairs and provide answers to such questions . Some models use states ( scene-graphs ) that replace images or require programs ( Johnson et al. , 2017a ) . The whole game consists of all CLEVR data points . For our purpose , we extend the notion of the Game into Mini-games . The rules of Mini-games are identical to the whole Game . The only difference is that each Mini-game operates on a subset of the CLEVR dataset . We define the size of a Mini-game by the number of datapoints that are attached to that Minigame . We sample data points for each Mini-game randomly and mutually exclusively . Mini-games have analogies in the adversarial perturbations literature . Mini-games of size one resemble perimage adversarial perturbations ( Goodfellow et al. , 2015 ; Moosavi-Dezfooli et al. , 2016 ) whereas a Mini-game that has all data pointsis similar to universal adversarial perturbations ( Moosavi-Dezfooli et al. , 2017 ) . In this work , we investigate various Mini-game sizes but due to the sheer scale we were unable to use the whole game as the Mini-game . Larger Mini-games make the optimization process more difficult as the domain where the Adversarial Player needs to operate increases . The training is also much more time-consuming and a sequential process . Instead , we can train multiple players on different Mini-games independently and thus massively . We leave the arduous training of the universal Adversarial Player on the whole Game as a possible future direction . | The paper proposes a black-box adversarial attack on models trained on the CLEVR dataset. CLEVR dataset is widely considered solved, especially with program synthesis-based models which seem to achieve near-perfect accuracy on CLEVR with a fairly small amount of training examples. Moreover, due to their synthetic and limited nature, it can be reasonably assumed that they would be able to answer *any* variation of CLEVR scenes within the bounds of the CLEVR-universe (Barring intentionally OOD test sets such as CoGENT). However, this paper shows that it is possible to fool all classes of the CLEVR model using an adversarial player that simply re-configures the scene (which should have the same answer as before). While the drops inaccuracy is not drastic, it is still an interesting finding, especially for program synthesis-driven methods. The paper also ends with an experiment about whether a purely data-driven approach can ever learn to be fully "robust". | SP:838a321f381bd3aa51c7e05897f4b0c0a3239196 |
Measuring CLEVRness: Black-box Testing of Visual Reasoning Models | 1 INTRODUCTION . Are our artificial intelligence systems capable of reasoning ? Or like Clever Hans , they use various cues only tangentially related to the task and rely on rote memorization with poor generalization ? ( Pfungst , 1911 ; Johnson et al. , 2017a ) This work revisits such a question and proposes an interactive framework with the communication channel between two players . The first player , which reasoning capabilities we are about to test , performs visual reasoning tasks , we call it VisualQA Player . The second player , which we call the Adversarial Player , is manipulating the scene so that it fools the first player even though those changes still lead to correct reasoning steps among humans . Both players interact with each other only through questions , answers and the visual scene as shown in Figure 1 . If the Adversarial Player manipulating the scene causes the Visual-QA Player to change its answer even though the new scene is still valid for the same question and answer , it is then the reasoning failure . It is similar to the following situation . Imagine a box is placed between two spheres . If you ask a question , is there a box between two spheres ? , the answer should be positive . Now , if we move the box anywhere so it does not cross any of the spheres , and ask the same question , the response should remain unchanged . In other words , we postulate that reasoning outputs of agents need to be invariant under scene configurations that are consistent with the questions-answer pairs . Moreover , in the spirit of generic adversarial attacks , we seek configurations that also pose little if any reasoning challenges for humans . We propose an automatic and agnostic pipeline to benchmark the reasoning capabilities of various models , only assuming they can communicate by answering questions about the scene . Due to the recent stream of research in vision-and-language ( Zhang et al. , 2021 ; Jiang et al. , 2020 ; Guo et al. , 2019b ; Su et al. , 2020 ; Wang et al. , 2020 ; Kamath et al. , 2021 ; Tan & Bansal , 2019 ; Chen et al. , 2020 ) , we believe there will be an increasing number of vision models that operate through language . Moreover , we also consider the visual question answering framework set-up as a two-player system as an excellent benchmarking pipeline . We perform all tests by scene manipulations and observing how a tested model behaves under such changes . The pipeline does not require any knowledge of the internals of the tested model . It also does not manipulate the sensory information of such a model , e.g. , pixels in the images , and all the manipulations are physically meaningful . Even though our current pipeline uses synthetic scenes as only those can easily be automatically manipulated , our results have also real-world ramifications . If models are susceptible to semantically meaningless changes1 in scene configurations , in a synthetic setting , there are valid concerns that real-world robots could also be prone to manipulation of objects in a room . Finally , our work also questions the possibility of training and benchmarking networks in a purely data-driven and offline , static manner . Contributions . The main contributions of our work could be summarized in three points . First , we propose a strong black-box adversarial test , which makes no assumptions about the underlying mechanics of a tested model , formulated as a game between two players . Our test does not require any direct access to the tested model , even through its sensory information . In particular , it does not require gradients , output probabilities , or any access to the perceived image . Our work also deviates from bounded perturbations and instead focuses on global scene manipulations that are still consistent with the task constraints , and can change the behavior of a tested model . Second , we reformulate visual reasoning by integrating visual question answering with zero-sum two-player game frameworks . Under our novel formulation , a visual and adversary agents compete against each other through content manipulation . We believe that this is an initial step towards more sophisticated frameworks that integrate computer vision with multi-agent systems . Third , we explore the limits of the data-driven approaches in synthetic visual scenarios , and demonstrate that current CLEVR models are lacking the efficiency to learn robust reasoning steps . 2 RELATED WORK . Our work touches upon various research directions , which we briefly describe here . Visual QA . Introduced as a visual counter-part of the Turing Test ( Malinowski & Fritz , 2014 ; Geman et al. , 2015 ) , it became a computer vision task that requires a holistic visual understanding . Many other works have extended the task to larger datasets or videos or adversarial train-test splits ( Antol et al. , 2015 ; Agrawal et al. , 2018 ; Tapaswi et al. , 2016 ; Yu et al. , 2019 ) . More recently , we also observe the generalization of the task to become a part of the vision-plus-language suite of benchmarks ( Lu et al. , 2019 ; Chen et al. , 2019 ; Wang et al. , 2021 ) . Johnson et al . ( 2017a ) have introduced a synthetic variant of the Visual QA problem that is more focused on reasoning and the control of the experimentation . Although it was shown that traditional methods ( Yang et al. , 2016 ) are not enough to solve that dataset , newer methods can pass the human baseline on this task . These methods are trained to operate on pixels and text directly ( Santoro et al. , 2017 ; Perez et al. , 2018 ; Hudson & Manning , 2018 ; Malinowski et al. , 2018 ; Kamath et al. , 2021 ) or they induce programs as an intermediate representation ( Johnson et al. , 2017b ; Mascharka et al. , 2018 ; Yi et al. , 2018 ) . Hudson & Manning ( 2019 ) have shown that Visual QA models lack some reasoning robustness but their approach is mostly linguistic and still static . Some other works also observe issues with static evaluation and proposed more dynamic benchmarks , e.g. , with a human-in-the-loop ( Khashabi et al. , 2021 ; Nie et al. , 2020 ; Li et al. , 2021 ; Sheng et al. , 2021 ) . We extend the line of research on Visual QA by reformulating it as an interactive two-agents system , and show that CLEVR under such a new setting is still an unsolved problem . Our work also differs from previous works in that it focuses on visual reasoning , is interactive and fully automatic . Adversarial perturbations . Szegedy et al . ( 2014 ) ; Goodfellow et al . ( 2015 ) ; Kurakin et al . ( 2016 ) ; Carlini & Wagner ( 2016 ) have introduced early methods that can ‘ fool ’ networks by performing tiny , visually imperceptible , perturbations of the input image . Moosavi-Dezfooli et al . ( 2017 ) have also shown universal and untargeted adversarial perturbations that are more transferable than previous approaches . Most methods perform white-box attacks , where an adversarial model has access to the target model ’ s parameters or gradients . In black-box attacks such access is removed and , e.g. , only output probabilities are available ( Guo et al. , 2019a ) . Other black-box attacks involve the use 1Changes that are consistent with the task constraints . of surrogates to estimate gradients of the real target ( Papernot et al. , 2017 ; Cheng et al. , 2019 ) or gradient-free methods ( Alzantot et al. , 2018 ) . More related to our work , Cheng et al . ( 2018 ) describe a black-box system , which only assumes access to outputs of the network . However , all the perturbations described above are continuous-based where individual pixels are changed independently . This leads to improbable images and assumes access to the sensory inputs of the neural network . In contrary , semantic perturbations ( Joshi et al. , 2019 ; Zeng et al. , 2019 ) , operate on semantically meaningful chunks of the input , leading to more plausible and physically interpretable perturbations . However , they still assume direct access to either images or ideally differentiable renderers . We can interpret our work within the adversarial perturbations framework , where the adversarial model can change the original scene by its manipulations , with zero access to the target model , including its sensory information and not limited to tiny changes but instead to semantically and globally meaningless modifications . Reinforcement learning . The game between the Visual-QA Player and Adversarial Player is a zero-sum two-player game . Conneau et al . ( 2017 ) use a conceptually similar two-player game to find a better word alignment between two languages without parallel corpus . Inspired by such a problem formulation , we consider our two-player game as a tool to achieve better reasoning models . We optimize the Adversarial Player with Advantage Actor-Critic ( A2C ) algorithm ( Sutton & Barto , 2018 ; Degris et al. , 2012 ) . Probing and measuring intelligence . Turing Test ( Turing , 2009 ) is considered to be among the earliest works on measuring the intelligence of artificial systems . Crucially to us , it is also formulated as a two-player game with an interrogation protocol . Legg ( 2008 ) systematizes and relates the notion of intelligence from different fields with the main focus on ‘ universality ’ . Johnson et al . ( 2017a ) have transferred the notion of intelligence onto the visual ground and emphasized reasoning rather than universality . It seems there is no widely accepted dataset or definition that encompasses our intuitions about intelligence . However , there are a few recent directions showing the lack thereof , mainly highlighting bias amplification or absence of mathematical capabilities ( Hendricks et al. , 2018 ; Bhardwaj et al. , 2021 ; Piekos et al. , 2021 ) . 3 PRELIMINARIES . In this section , we explain briefly how the CLEVR dataset ( Johnson et al. , 2017a ) is constructed and introduce our notation and definitions . CLEVR is a synthetic visual question answering dataset introduced by Johnson et al . ( 2017a ) , which consists of about 700k training and 150k validation image-question-answer triplets . Images are artificially constructed and rendered from scene graphs – a special structure containing information about object attributes such as position or color . Such a scene graph is also used to synthesize the ground-truth question-answer pairs by expanding templates according to the depth-first-search ordering . Ambiguous scenes are rejected . Each image represents an isometric view of the scene containing from two to ten objects . There are three classes of objects , spheres , cubes and cylinders . Each object can also be either large or small and has one color out of four ( brown , purple , cyan , yellow ) . It can also be either metallic or rubber-made . Every object has x and y coordinates that are confined within the ( −3 , +3 ) range . We use the same generation process to render modified scenes . CLEVR models . Various models have been introduced to work with the CLEVR dataset , some even ‘ solving ’ the dataset by achieving near perfect performance . Despite the strong offline performance , we test if those models ’ performance perpetuates in the more interactive setting where configurations of the scene could be changed . Whenever possible , we use pre-trained CLEVR models . Otherwise , we train the remaining models from scratch by making sure we achieve results similar to published accuracy numbers on the validation set . We summarize all the models in Table 1 . We show the accuracy on the CLEVR dataset ( Accuracy ) , indicate if an architecture is trained from scratch ( Re-trained ) , briefly describe how multi-modal fusion and reasoning is conducted ( Reasoning Mechanism ) , and indicate any extra privileged information required during the training process ( Extra ) . For instance , some models require extra access to functional programs used during the dataset generation , use scene graphs as a supervisory signal ( states ) , or always operate on scene graphs ( input-states ) . Otherwise , the models were trained only from image-question-answer triples . Mini-games . We formulate our problem as a Game between two players , Visual-QA Player and Adversarial Player . The Visual-QA Player takes as input question-image pairs and provide answers to such questions . Some models use states ( scene-graphs ) that replace images or require programs ( Johnson et al. , 2017a ) . The whole game consists of all CLEVR data points . For our purpose , we extend the notion of the Game into Mini-games . The rules of Mini-games are identical to the whole Game . The only difference is that each Mini-game operates on a subset of the CLEVR dataset . We define the size of a Mini-game by the number of datapoints that are attached to that Minigame . We sample data points for each Mini-game randomly and mutually exclusively . Mini-games have analogies in the adversarial perturbations literature . Mini-games of size one resemble perimage adversarial perturbations ( Goodfellow et al. , 2015 ; Moosavi-Dezfooli et al. , 2016 ) whereas a Mini-game that has all data pointsis similar to universal adversarial perturbations ( Moosavi-Dezfooli et al. , 2017 ) . In this work , we investigate various Mini-game sizes but due to the sheer scale we were unable to use the whole game as the Mini-game . Larger Mini-games make the optimization process more difficult as the domain where the Adversarial Player needs to operate increases . The training is also much more time-consuming and a sequential process . Instead , we can train multiple players on different Mini-games independently and thus massively . We leave the arduous training of the universal Adversarial Player on the whole Game as a possible future direction . | This paper proposes to measure the reasoning capabilities of VQA models by training an "adversary player" that can manipulate the image and fool the evaluated models. Given a sample, the "adversary player" moves objects such that the groundtruth answer remains valid and the scene is in-distribution. If the evaluated VQA model produces a different output, the "adversary player" receives a positive reward and is then optimized with a reinforcement learning algorithm. | SP:838a321f381bd3aa51c7e05897f4b0c0a3239196 |
Neural Solvers for Fast and Accurate Numerical Optimal Control | Synthesizing optimal controllers for dynamical systems often involves solving optimization problems with hard real–time constraints . These constraints restrict the class of numerical methods that can be applied : computationally expensive but accurate numerical routines often have to be replaced with fast and inaccurate methods , trading inference time for solution accuracy . This paper provides techniques to improve the quality of optimized control policies given a fixed computational budget . We achieve the above via a hypersolvers ( Poli et al. , 2020a ) approach , which hybridizes a differential equation solver and a neural network . The performance is evaluated in direct and receding–horizon optimal control tasks , where the proposed approach shows consistent Pareto improvements in solution accuracy and control performance . 1 INTRODUCTION . Optimal control of complex , high–dimensional systems requires the implementation of computationally expensive numerical methods for differential equations ( Pytlak , 2006 ; Rao , 2009 ) . Here , real–time and hardware constraints preclude the use of accurate and expensive methods , forcing instead the application of cheaper and less accurate algorithms . While the paradigm of optimal control has successfully been applied in various domains ( Vadali et al. , 1999 ; Lewis et al. , 2012 ; Zhang et al. , 2016 ) , improving accuracy while satisfying computational budget constraints is still a great challenge ( Ross & Fahroo , 2006 ; Baotić et al. , 2008 ) . To alleviate such computational limitations , we detail a procedure for offline optimization and subsequent online application of hypersolvers ( Poli et al. , 2020a ) to optimal control problems . These hybrid solvers aim to achieve the accuracy of higher–order methods by augmenting numerical results of a base solver with a learning component trained to approximate local truncation residuals . When the overhead of a single forward–pass of the learning component is kept sufficiently small , hypersolvers improve the computation–accuracy Pareto front of low–order explicit solvers ( Butcher , 1997 ) . However , direct application of hybrid solvers to controlled dynamical system involves learning truncation residuals on the higher–dimensional space of state and control inputs . To extend the range of applicability of hypersolvers to controlled dynamical systems , we propose two pretraining strategies designed to improve , in the set of admissible control inputs , on the average or worst–case hypersolver solution . With the proposed methodology , we empirically show that Pareto front improvements of hypersolvers hold even for optimal control tasks . In particular , we then carry out performance and generalization evaluations in direct and model predictive control tasks . Here , we confirm Pareto front improvements in terms of solution accuracy and subsequent control performance , leading to higher quality control policies and lower control losses . 2 NUMERICAL OPTIMAL CONTROL . We consider control of general nonlinear systems of the form ẋ ( t ) = f ( t , x ( t ) , uθ ( t ) ) x ( 0 ) = x0 ( 1 ) with state x ∈ X ⊂ Rnx , input uθ ∈ U ⊂ Rnu defined on a compact time domain T : = [ t0 , T ] where θ is a finite set of free parameters of the controller . Solutions of ( 1 ) are denoted with x ( t ) = Φ ( x ( s ) , s , t ) for all s , t ∈ T . Given some objective function J : X × U → R ; x0 , uθ 7→ J ( x0 , uθ ( t ) ) and a distribution ρ0 ( x0 ) of initial conditions with support in X , we consider the following nonlinear program , constrained to the system dynamics : min uθ ( t ) Ex0∼ρ0 ( x0 ) [ J ( x0 , uθ ( t ) ) ] subject to ẋ ( t ) = f ( t , x ( t ) , uθ ( t ) ) x ( 0 ) = x0 t ∈ T ( 2 ) where the controller parameters θ are optimized . We will henceforth omit the subscript θ and write u ( t ) = uθ ( t ) . Since analytic solutions of ( 2 ) exist only for limited classes of systems and objectives , numerical solvers are often applied to iteratively find a solution . For these reasons , problem 2 is often referred to as numerical optimal control . Direct optimal control If the problem ( 2 ) is solved offline by directly optimizing over complete trajectories , we call it direct optimal control . The infinite–dimensional optimal control problem is time–discretized and solved numerically : the obtained control policy is then applied to the real target system without further optimization . Model predictive control Also known in the literature as receding horizon control , Model Predictive Control ( MPC ) is a class of flexible control algorithms capable of taking into consideration constraints and nonlinearities ( Mayne & Michalska , 1988 ; Garcia et al. , 1989 ) . MPC considers finite time windows which are then shifted forward in a receding manner . The control problem is then solved for each window by iteratively forward–propagating trajectories with numerical solvers i.e . predicting the set of future trajectories with a candidate controller u ( t ) and then adjusting it iteratively to optimize the cost function J ( further details on the MPC formulation in Appendix B.2 ) . The optimization is reiterated online until the end of the control time horizon . 2.1 SOLVER RESIDUALS . Given nominal solutions Φ of ( 1 ) we can define the residual of a numerical ODE solver as the normalized error accumulated in a single step size of the method , i.e . Rk = R ( tk , x ( tk ) , u ( tk ) ) = 1 p+1 [ Φ ( x ( tk ) , tk , tk+1 ) − x ( tk ) − ψ ( tk , x ( tk ) , u ( tk ) ) ] ( 3 ) where is the step size and p is the order of the numerical solver corresponding to ψ . From the definition of residual in ( 3 ) , we can define the local truncation error ek : = ∥∥ p+1Rk∥∥2 which is the error accumulated in a single step ; while the global truncation error Ek = ‖x ( tk ) − xk‖2 represents the error accumulated in the first k steps of the numerical solution . Given a p–th order explicit solver , we have ek = O ( p+1 ) and Ek = O ( p ) ( Butcher , 1997 ) . 3 HYPERSOLVERS FOR OPTIMAL CONTROL . We extend the range of applicability of hypersolvers ( Poli et al. , 2020a ) to controlled dynamical systems . In this Section we discuss the proposed hypersolver architectures and pre–training strategies of the proposed hypersolver methodology for numerical optimal control of controlled dynamical systems . 3.1 HYPERSOLVERS . Given a p–order base solver update map ψ , the corresponding hypersolver is the discrete iteration xk+1 = xk + ψ ( tk , xk , uk ) ︸ ︷︷ ︸ base solver step + p+1 gω ( tk , xk , uk ) ︸ ︷︷ ︸ approximator ( 4 ) where gω ( tk , xk , uk ) is some o ( 1 ) parametric function with free parameters ω . The core idea is to select gω as some function with universal approximation properties and fit the higher-order terms of the base solver by explicitly minimizing the residuals over a set of state and control input samples . This procedure leads to a reduction of the overall local truncation error ek , i.e . we can improve the base solver accuracy with the only computational overhead of evaluating the function gω . It is also proven that , if gω is a δ–approximator of R , i.e . ∀k ∈ N≤K ‖R ( tk , x ( tk ) , u ( tk ) ) − gω ( tk , x ( tk ) , u ( tk ) ) ‖2 ≤ δ ( 5 ) then ek ≤ o ( δ p+1 ) , where δ > 0 depends on the hypersolver training results ( Poli et al. , 2020a , Theorem 1 ) . This result practically guarantees that if gω is a good approximator for R , i.e . δ 1 , then the overall local truncation error of the hypersolved ODE is significantly reduced with guaranteed upper bounds . 3.2 OPTIMAL CONTROL OPTIMIZATION WITH HYPERSOLVERS . Our approach relies on the pre–trained hypersolver model for obtaining solutions to the trajectories of the optimal control problem ( 2 ) . After the initial training stage , control policies are numerically optimized to minimize the cost function J ( see Appendix B.3 for further details ) . Figure 1 shows an overview of the proposed approach consisting in pre–training and system control . 4 HYPERSOLVER PRE–TRAINING AND ARCHITECTURES . We introduce in Section 4.1 loss functions which are used in the proposed pre–training methods of Section 4.2 and Section 4.3 . We also check the generalization properties of hypersolvers with different architectures in Section 4.4 . In Section 4.5 we introduce multi–stage hypersolvers in which an additional first–order learned term is employed for correcting errors in the vector field . 4.1 LOSS FUNCTIONS . Residual fitting Training the hypersolver on a single nominal trajectory { x ( tk ) } k results in a supervised learning problem where we minimize point–wise the Euclidean distance between the residual ( 3 ) and the output of gω , resulting in an optimization problem minimizing a loss function ` of the form ` ( t , x , u ) = 1 K K−1∑ k=0 ‖R ( tk , x ( tk ) , u ( tk ) ) − gω ( tk , x ( tk ) , u ( tk ) ) ‖2 ( 6 ) which is also called residual fitting since the target of gw is the residual R. Trajectory fitting The optimization can also be carried out via trajectory fitting as following ` ( t , x , u ) = 1 K K−1∑ k=0 ‖x ( tk+1 ) , xk+1‖2 ( 7 ) where x ( tk+1 ) corresponds to the exact one–step trajectory and xk+1 is its approximation , derived via ( 4 ) for standard hypersolvers or via ( 12 ) for their multi–stage counterparts . This method can also be used to contain the global truncation error in the T domain . We will refer to ` as a loss function of either residual or trajectory fitting types ; we note that these loss functions may also be combined depending on the application . The goal is to train the hypersolver network to explore the state–control spaces so that it can effectively minimize the truncation error . We propose two methods with different purposes : stochastic exploration aiming at minimizing the average truncation error and active error minimization whose goal is to reduce the maximum error i.e. , due to control inputs yielding high losses . 4.2 STOCHASTIC EXPLORATION . Stochastic exploration aims to minimize the average error of the visited state–controller space i.e. , to solve the following optimization problem min w E ( x , u ) ∼ξ ( x , u ) ` ( t , x , u ) ( 8 ) where ξ ( x , u ) is a distribution with support in X × U of the state and controller spaces and ` is the training loss function . In order to guarantee sufficient exploration of the state–controller space , we use Monte Carlo sampling ( Robert & Casella , 2013 ) from the given distribution . In particular , batches of initial conditions { xi0 } , { ui0 } are sampled from ξ and the loss function ` is calculated with the given system and step size . We then perform backpropagation for updating the parameters of the hypersolver using a stochastic gradient descent ( SGD ) algorithm e.g. , Adam ( Kingma & Ba , 2017 ) and repeat the procedure for every training epoch . Figure 2 shows pre–training results with stochastic exploration for different step sizes ( see Appendix C.2 ) . We notice how higher residual values correspond to higher absolute values of control inputs . Many systems in practice are subject to controls that are constrained in magnitude either due to physical limitations of the actuators or safety restraints of the workspace . This property allows us to design an exploration strategy that focuses on worst-case scenarios i.e . largest control inputs . | In this paper, the authors apply the idea of hypersolvers to numerical optimal control. The idea is to approximate the dynamics with a low-order ODE solver and learn the truncation residual dynamics using a neural net. They also propose a multi-stage hypersolvers method to both learn the system residual dynamics (due to erroneous system model) and truncation residual dynamics (due to ODE solver). The performance of the proposed approach is shown in simulation experiments with a pendulum, a cart-pole, and a quadcopter with comparisons to ODE solvers of different orders. | SP:ffca45ed1b7e838e71cce6cb1b264d44c847ab87 |
Neural Solvers for Fast and Accurate Numerical Optimal Control | Synthesizing optimal controllers for dynamical systems often involves solving optimization problems with hard real–time constraints . These constraints restrict the class of numerical methods that can be applied : computationally expensive but accurate numerical routines often have to be replaced with fast and inaccurate methods , trading inference time for solution accuracy . This paper provides techniques to improve the quality of optimized control policies given a fixed computational budget . We achieve the above via a hypersolvers ( Poli et al. , 2020a ) approach , which hybridizes a differential equation solver and a neural network . The performance is evaluated in direct and receding–horizon optimal control tasks , where the proposed approach shows consistent Pareto improvements in solution accuracy and control performance . 1 INTRODUCTION . Optimal control of complex , high–dimensional systems requires the implementation of computationally expensive numerical methods for differential equations ( Pytlak , 2006 ; Rao , 2009 ) . Here , real–time and hardware constraints preclude the use of accurate and expensive methods , forcing instead the application of cheaper and less accurate algorithms . While the paradigm of optimal control has successfully been applied in various domains ( Vadali et al. , 1999 ; Lewis et al. , 2012 ; Zhang et al. , 2016 ) , improving accuracy while satisfying computational budget constraints is still a great challenge ( Ross & Fahroo , 2006 ; Baotić et al. , 2008 ) . To alleviate such computational limitations , we detail a procedure for offline optimization and subsequent online application of hypersolvers ( Poli et al. , 2020a ) to optimal control problems . These hybrid solvers aim to achieve the accuracy of higher–order methods by augmenting numerical results of a base solver with a learning component trained to approximate local truncation residuals . When the overhead of a single forward–pass of the learning component is kept sufficiently small , hypersolvers improve the computation–accuracy Pareto front of low–order explicit solvers ( Butcher , 1997 ) . However , direct application of hybrid solvers to controlled dynamical system involves learning truncation residuals on the higher–dimensional space of state and control inputs . To extend the range of applicability of hypersolvers to controlled dynamical systems , we propose two pretraining strategies designed to improve , in the set of admissible control inputs , on the average or worst–case hypersolver solution . With the proposed methodology , we empirically show that Pareto front improvements of hypersolvers hold even for optimal control tasks . In particular , we then carry out performance and generalization evaluations in direct and model predictive control tasks . Here , we confirm Pareto front improvements in terms of solution accuracy and subsequent control performance , leading to higher quality control policies and lower control losses . 2 NUMERICAL OPTIMAL CONTROL . We consider control of general nonlinear systems of the form ẋ ( t ) = f ( t , x ( t ) , uθ ( t ) ) x ( 0 ) = x0 ( 1 ) with state x ∈ X ⊂ Rnx , input uθ ∈ U ⊂ Rnu defined on a compact time domain T : = [ t0 , T ] where θ is a finite set of free parameters of the controller . Solutions of ( 1 ) are denoted with x ( t ) = Φ ( x ( s ) , s , t ) for all s , t ∈ T . Given some objective function J : X × U → R ; x0 , uθ 7→ J ( x0 , uθ ( t ) ) and a distribution ρ0 ( x0 ) of initial conditions with support in X , we consider the following nonlinear program , constrained to the system dynamics : min uθ ( t ) Ex0∼ρ0 ( x0 ) [ J ( x0 , uθ ( t ) ) ] subject to ẋ ( t ) = f ( t , x ( t ) , uθ ( t ) ) x ( 0 ) = x0 t ∈ T ( 2 ) where the controller parameters θ are optimized . We will henceforth omit the subscript θ and write u ( t ) = uθ ( t ) . Since analytic solutions of ( 2 ) exist only for limited classes of systems and objectives , numerical solvers are often applied to iteratively find a solution . For these reasons , problem 2 is often referred to as numerical optimal control . Direct optimal control If the problem ( 2 ) is solved offline by directly optimizing over complete trajectories , we call it direct optimal control . The infinite–dimensional optimal control problem is time–discretized and solved numerically : the obtained control policy is then applied to the real target system without further optimization . Model predictive control Also known in the literature as receding horizon control , Model Predictive Control ( MPC ) is a class of flexible control algorithms capable of taking into consideration constraints and nonlinearities ( Mayne & Michalska , 1988 ; Garcia et al. , 1989 ) . MPC considers finite time windows which are then shifted forward in a receding manner . The control problem is then solved for each window by iteratively forward–propagating trajectories with numerical solvers i.e . predicting the set of future trajectories with a candidate controller u ( t ) and then adjusting it iteratively to optimize the cost function J ( further details on the MPC formulation in Appendix B.2 ) . The optimization is reiterated online until the end of the control time horizon . 2.1 SOLVER RESIDUALS . Given nominal solutions Φ of ( 1 ) we can define the residual of a numerical ODE solver as the normalized error accumulated in a single step size of the method , i.e . Rk = R ( tk , x ( tk ) , u ( tk ) ) = 1 p+1 [ Φ ( x ( tk ) , tk , tk+1 ) − x ( tk ) − ψ ( tk , x ( tk ) , u ( tk ) ) ] ( 3 ) where is the step size and p is the order of the numerical solver corresponding to ψ . From the definition of residual in ( 3 ) , we can define the local truncation error ek : = ∥∥ p+1Rk∥∥2 which is the error accumulated in a single step ; while the global truncation error Ek = ‖x ( tk ) − xk‖2 represents the error accumulated in the first k steps of the numerical solution . Given a p–th order explicit solver , we have ek = O ( p+1 ) and Ek = O ( p ) ( Butcher , 1997 ) . 3 HYPERSOLVERS FOR OPTIMAL CONTROL . We extend the range of applicability of hypersolvers ( Poli et al. , 2020a ) to controlled dynamical systems . In this Section we discuss the proposed hypersolver architectures and pre–training strategies of the proposed hypersolver methodology for numerical optimal control of controlled dynamical systems . 3.1 HYPERSOLVERS . Given a p–order base solver update map ψ , the corresponding hypersolver is the discrete iteration xk+1 = xk + ψ ( tk , xk , uk ) ︸ ︷︷ ︸ base solver step + p+1 gω ( tk , xk , uk ) ︸ ︷︷ ︸ approximator ( 4 ) where gω ( tk , xk , uk ) is some o ( 1 ) parametric function with free parameters ω . The core idea is to select gω as some function with universal approximation properties and fit the higher-order terms of the base solver by explicitly minimizing the residuals over a set of state and control input samples . This procedure leads to a reduction of the overall local truncation error ek , i.e . we can improve the base solver accuracy with the only computational overhead of evaluating the function gω . It is also proven that , if gω is a δ–approximator of R , i.e . ∀k ∈ N≤K ‖R ( tk , x ( tk ) , u ( tk ) ) − gω ( tk , x ( tk ) , u ( tk ) ) ‖2 ≤ δ ( 5 ) then ek ≤ o ( δ p+1 ) , where δ > 0 depends on the hypersolver training results ( Poli et al. , 2020a , Theorem 1 ) . This result practically guarantees that if gω is a good approximator for R , i.e . δ 1 , then the overall local truncation error of the hypersolved ODE is significantly reduced with guaranteed upper bounds . 3.2 OPTIMAL CONTROL OPTIMIZATION WITH HYPERSOLVERS . Our approach relies on the pre–trained hypersolver model for obtaining solutions to the trajectories of the optimal control problem ( 2 ) . After the initial training stage , control policies are numerically optimized to minimize the cost function J ( see Appendix B.3 for further details ) . Figure 1 shows an overview of the proposed approach consisting in pre–training and system control . 4 HYPERSOLVER PRE–TRAINING AND ARCHITECTURES . We introduce in Section 4.1 loss functions which are used in the proposed pre–training methods of Section 4.2 and Section 4.3 . We also check the generalization properties of hypersolvers with different architectures in Section 4.4 . In Section 4.5 we introduce multi–stage hypersolvers in which an additional first–order learned term is employed for correcting errors in the vector field . 4.1 LOSS FUNCTIONS . Residual fitting Training the hypersolver on a single nominal trajectory { x ( tk ) } k results in a supervised learning problem where we minimize point–wise the Euclidean distance between the residual ( 3 ) and the output of gω , resulting in an optimization problem minimizing a loss function ` of the form ` ( t , x , u ) = 1 K K−1∑ k=0 ‖R ( tk , x ( tk ) , u ( tk ) ) − gω ( tk , x ( tk ) , u ( tk ) ) ‖2 ( 6 ) which is also called residual fitting since the target of gw is the residual R. Trajectory fitting The optimization can also be carried out via trajectory fitting as following ` ( t , x , u ) = 1 K K−1∑ k=0 ‖x ( tk+1 ) , xk+1‖2 ( 7 ) where x ( tk+1 ) corresponds to the exact one–step trajectory and xk+1 is its approximation , derived via ( 4 ) for standard hypersolvers or via ( 12 ) for their multi–stage counterparts . This method can also be used to contain the global truncation error in the T domain . We will refer to ` as a loss function of either residual or trajectory fitting types ; we note that these loss functions may also be combined depending on the application . The goal is to train the hypersolver network to explore the state–control spaces so that it can effectively minimize the truncation error . We propose two methods with different purposes : stochastic exploration aiming at minimizing the average truncation error and active error minimization whose goal is to reduce the maximum error i.e. , due to control inputs yielding high losses . 4.2 STOCHASTIC EXPLORATION . Stochastic exploration aims to minimize the average error of the visited state–controller space i.e. , to solve the following optimization problem min w E ( x , u ) ∼ξ ( x , u ) ` ( t , x , u ) ( 8 ) where ξ ( x , u ) is a distribution with support in X × U of the state and controller spaces and ` is the training loss function . In order to guarantee sufficient exploration of the state–controller space , we use Monte Carlo sampling ( Robert & Casella , 2013 ) from the given distribution . In particular , batches of initial conditions { xi0 } , { ui0 } are sampled from ξ and the loss function ` is calculated with the given system and step size . We then perform backpropagation for updating the parameters of the hypersolver using a stochastic gradient descent ( SGD ) algorithm e.g. , Adam ( Kingma & Ba , 2017 ) and repeat the procedure for every training epoch . Figure 2 shows pre–training results with stochastic exploration for different step sizes ( see Appendix C.2 ) . We notice how higher residual values correspond to higher absolute values of control inputs . Many systems in practice are subject to controls that are constrained in magnitude either due to physical limitations of the actuators or safety restraints of the workspace . This property allows us to design an exploration strategy that focuses on worst-case scenarios i.e . largest control inputs . | This paper extends the hypersolvers framework (Poli et al., 2020a) to the setting of optimal control. The hypersolvers framework combines a cheap numerical dynamical system solver with a neural network trained to approximate the truncation error of this solver, which together yield a cheap and relatively accurate solver. This paper shows how to utilize the hypersolvers framework within a controlled dynamical system by exploring different choices of loss functions, training methods, and network architectures for hypersolver pre-training. The authors further provide an augmentation to this framework, called multi-stage hypersolvers, to further account for misspecifications of the dynamics. Via experiments, the authors then demonstrate the performance of optimal control strategies (direct optimal control and MPC) utilizing hypersolvers in different settings (notably the pendulum, cart-pole, and quadcopter settings). They show e.g. that even in cases where their method receives misspecified dynamics, they are able to achieve control performance that is comparable to that obtained in cases where the underlying solver had knowledge of the correct dynamics. | SP:ffca45ed1b7e838e71cce6cb1b264d44c847ab87 |
Neural Solvers for Fast and Accurate Numerical Optimal Control | Synthesizing optimal controllers for dynamical systems often involves solving optimization problems with hard real–time constraints . These constraints restrict the class of numerical methods that can be applied : computationally expensive but accurate numerical routines often have to be replaced with fast and inaccurate methods , trading inference time for solution accuracy . This paper provides techniques to improve the quality of optimized control policies given a fixed computational budget . We achieve the above via a hypersolvers ( Poli et al. , 2020a ) approach , which hybridizes a differential equation solver and a neural network . The performance is evaluated in direct and receding–horizon optimal control tasks , where the proposed approach shows consistent Pareto improvements in solution accuracy and control performance . 1 INTRODUCTION . Optimal control of complex , high–dimensional systems requires the implementation of computationally expensive numerical methods for differential equations ( Pytlak , 2006 ; Rao , 2009 ) . Here , real–time and hardware constraints preclude the use of accurate and expensive methods , forcing instead the application of cheaper and less accurate algorithms . While the paradigm of optimal control has successfully been applied in various domains ( Vadali et al. , 1999 ; Lewis et al. , 2012 ; Zhang et al. , 2016 ) , improving accuracy while satisfying computational budget constraints is still a great challenge ( Ross & Fahroo , 2006 ; Baotić et al. , 2008 ) . To alleviate such computational limitations , we detail a procedure for offline optimization and subsequent online application of hypersolvers ( Poli et al. , 2020a ) to optimal control problems . These hybrid solvers aim to achieve the accuracy of higher–order methods by augmenting numerical results of a base solver with a learning component trained to approximate local truncation residuals . When the overhead of a single forward–pass of the learning component is kept sufficiently small , hypersolvers improve the computation–accuracy Pareto front of low–order explicit solvers ( Butcher , 1997 ) . However , direct application of hybrid solvers to controlled dynamical system involves learning truncation residuals on the higher–dimensional space of state and control inputs . To extend the range of applicability of hypersolvers to controlled dynamical systems , we propose two pretraining strategies designed to improve , in the set of admissible control inputs , on the average or worst–case hypersolver solution . With the proposed methodology , we empirically show that Pareto front improvements of hypersolvers hold even for optimal control tasks . In particular , we then carry out performance and generalization evaluations in direct and model predictive control tasks . Here , we confirm Pareto front improvements in terms of solution accuracy and subsequent control performance , leading to higher quality control policies and lower control losses . 2 NUMERICAL OPTIMAL CONTROL . We consider control of general nonlinear systems of the form ẋ ( t ) = f ( t , x ( t ) , uθ ( t ) ) x ( 0 ) = x0 ( 1 ) with state x ∈ X ⊂ Rnx , input uθ ∈ U ⊂ Rnu defined on a compact time domain T : = [ t0 , T ] where θ is a finite set of free parameters of the controller . Solutions of ( 1 ) are denoted with x ( t ) = Φ ( x ( s ) , s , t ) for all s , t ∈ T . Given some objective function J : X × U → R ; x0 , uθ 7→ J ( x0 , uθ ( t ) ) and a distribution ρ0 ( x0 ) of initial conditions with support in X , we consider the following nonlinear program , constrained to the system dynamics : min uθ ( t ) Ex0∼ρ0 ( x0 ) [ J ( x0 , uθ ( t ) ) ] subject to ẋ ( t ) = f ( t , x ( t ) , uθ ( t ) ) x ( 0 ) = x0 t ∈ T ( 2 ) where the controller parameters θ are optimized . We will henceforth omit the subscript θ and write u ( t ) = uθ ( t ) . Since analytic solutions of ( 2 ) exist only for limited classes of systems and objectives , numerical solvers are often applied to iteratively find a solution . For these reasons , problem 2 is often referred to as numerical optimal control . Direct optimal control If the problem ( 2 ) is solved offline by directly optimizing over complete trajectories , we call it direct optimal control . The infinite–dimensional optimal control problem is time–discretized and solved numerically : the obtained control policy is then applied to the real target system without further optimization . Model predictive control Also known in the literature as receding horizon control , Model Predictive Control ( MPC ) is a class of flexible control algorithms capable of taking into consideration constraints and nonlinearities ( Mayne & Michalska , 1988 ; Garcia et al. , 1989 ) . MPC considers finite time windows which are then shifted forward in a receding manner . The control problem is then solved for each window by iteratively forward–propagating trajectories with numerical solvers i.e . predicting the set of future trajectories with a candidate controller u ( t ) and then adjusting it iteratively to optimize the cost function J ( further details on the MPC formulation in Appendix B.2 ) . The optimization is reiterated online until the end of the control time horizon . 2.1 SOLVER RESIDUALS . Given nominal solutions Φ of ( 1 ) we can define the residual of a numerical ODE solver as the normalized error accumulated in a single step size of the method , i.e . Rk = R ( tk , x ( tk ) , u ( tk ) ) = 1 p+1 [ Φ ( x ( tk ) , tk , tk+1 ) − x ( tk ) − ψ ( tk , x ( tk ) , u ( tk ) ) ] ( 3 ) where is the step size and p is the order of the numerical solver corresponding to ψ . From the definition of residual in ( 3 ) , we can define the local truncation error ek : = ∥∥ p+1Rk∥∥2 which is the error accumulated in a single step ; while the global truncation error Ek = ‖x ( tk ) − xk‖2 represents the error accumulated in the first k steps of the numerical solution . Given a p–th order explicit solver , we have ek = O ( p+1 ) and Ek = O ( p ) ( Butcher , 1997 ) . 3 HYPERSOLVERS FOR OPTIMAL CONTROL . We extend the range of applicability of hypersolvers ( Poli et al. , 2020a ) to controlled dynamical systems . In this Section we discuss the proposed hypersolver architectures and pre–training strategies of the proposed hypersolver methodology for numerical optimal control of controlled dynamical systems . 3.1 HYPERSOLVERS . Given a p–order base solver update map ψ , the corresponding hypersolver is the discrete iteration xk+1 = xk + ψ ( tk , xk , uk ) ︸ ︷︷ ︸ base solver step + p+1 gω ( tk , xk , uk ) ︸ ︷︷ ︸ approximator ( 4 ) where gω ( tk , xk , uk ) is some o ( 1 ) parametric function with free parameters ω . The core idea is to select gω as some function with universal approximation properties and fit the higher-order terms of the base solver by explicitly minimizing the residuals over a set of state and control input samples . This procedure leads to a reduction of the overall local truncation error ek , i.e . we can improve the base solver accuracy with the only computational overhead of evaluating the function gω . It is also proven that , if gω is a δ–approximator of R , i.e . ∀k ∈ N≤K ‖R ( tk , x ( tk ) , u ( tk ) ) − gω ( tk , x ( tk ) , u ( tk ) ) ‖2 ≤ δ ( 5 ) then ek ≤ o ( δ p+1 ) , where δ > 0 depends on the hypersolver training results ( Poli et al. , 2020a , Theorem 1 ) . This result practically guarantees that if gω is a good approximator for R , i.e . δ 1 , then the overall local truncation error of the hypersolved ODE is significantly reduced with guaranteed upper bounds . 3.2 OPTIMAL CONTROL OPTIMIZATION WITH HYPERSOLVERS . Our approach relies on the pre–trained hypersolver model for obtaining solutions to the trajectories of the optimal control problem ( 2 ) . After the initial training stage , control policies are numerically optimized to minimize the cost function J ( see Appendix B.3 for further details ) . Figure 1 shows an overview of the proposed approach consisting in pre–training and system control . 4 HYPERSOLVER PRE–TRAINING AND ARCHITECTURES . We introduce in Section 4.1 loss functions which are used in the proposed pre–training methods of Section 4.2 and Section 4.3 . We also check the generalization properties of hypersolvers with different architectures in Section 4.4 . In Section 4.5 we introduce multi–stage hypersolvers in which an additional first–order learned term is employed for correcting errors in the vector field . 4.1 LOSS FUNCTIONS . Residual fitting Training the hypersolver on a single nominal trajectory { x ( tk ) } k results in a supervised learning problem where we minimize point–wise the Euclidean distance between the residual ( 3 ) and the output of gω , resulting in an optimization problem minimizing a loss function ` of the form ` ( t , x , u ) = 1 K K−1∑ k=0 ‖R ( tk , x ( tk ) , u ( tk ) ) − gω ( tk , x ( tk ) , u ( tk ) ) ‖2 ( 6 ) which is also called residual fitting since the target of gw is the residual R. Trajectory fitting The optimization can also be carried out via trajectory fitting as following ` ( t , x , u ) = 1 K K−1∑ k=0 ‖x ( tk+1 ) , xk+1‖2 ( 7 ) where x ( tk+1 ) corresponds to the exact one–step trajectory and xk+1 is its approximation , derived via ( 4 ) for standard hypersolvers or via ( 12 ) for their multi–stage counterparts . This method can also be used to contain the global truncation error in the T domain . We will refer to ` as a loss function of either residual or trajectory fitting types ; we note that these loss functions may also be combined depending on the application . The goal is to train the hypersolver network to explore the state–control spaces so that it can effectively minimize the truncation error . We propose two methods with different purposes : stochastic exploration aiming at minimizing the average truncation error and active error minimization whose goal is to reduce the maximum error i.e. , due to control inputs yielding high losses . 4.2 STOCHASTIC EXPLORATION . Stochastic exploration aims to minimize the average error of the visited state–controller space i.e. , to solve the following optimization problem min w E ( x , u ) ∼ξ ( x , u ) ` ( t , x , u ) ( 8 ) where ξ ( x , u ) is a distribution with support in X × U of the state and controller spaces and ` is the training loss function . In order to guarantee sufficient exploration of the state–controller space , we use Monte Carlo sampling ( Robert & Casella , 2013 ) from the given distribution . In particular , batches of initial conditions { xi0 } , { ui0 } are sampled from ξ and the loss function ` is calculated with the given system and step size . We then perform backpropagation for updating the parameters of the hypersolver using a stochastic gradient descent ( SGD ) algorithm e.g. , Adam ( Kingma & Ba , 2017 ) and repeat the procedure for every training epoch . Figure 2 shows pre–training results with stochastic exploration for different step sizes ( see Appendix C.2 ) . We notice how higher residual values correspond to higher absolute values of control inputs . Many systems in practice are subject to controls that are constrained in magnitude either due to physical limitations of the actuators or safety restraints of the workspace . This property allows us to design an exploration strategy that focuses on worst-case scenarios i.e . largest control inputs . | The paper descibes the application of hypersolves, which warm-start ODE solvers with neural nets that have distilled many precomputed solutions, to optimal control ODEs. This warm-starting improves downstream accuracy when the computational budget is fixed. This method is applied for trajectory optimziation for pendulum swing-up and MPC for cartpole and quadcopter systems. | SP:ffca45ed1b7e838e71cce6cb1b264d44c847ab87 |
PMIC: Improving Multi-Agent Reinforcement Learning with Progressive Mutual Information Collaboration | 1 INTRODUCTION . With the potential to solve complex real-world problems , Multi-Agent Reinforcement Learning ( MARL ) has attracted much attention in recent years ( Rashid et al. , 2018 ; Iqbal & Sha , 2019 ; Wang et al. , 2019b ) and been applied to many practical domains like Game AI ( Peng et al. , 2017 ) , robotics control ( Matignon et al. , 2012 ) , transportation ( Li et al. , 2019 ) . However , efficiently achieving collaboration and learning optimal policies still remains challenging in MARL ( Liu et al. , 2020 ; Wen et al. , 2019 ) . Prior efforts on improving collaboration of MARL agents mainly rely on efficient communication ( Eccles et al. , 2019 ; Das et al. , 2019 ; Kim et al. , 2019 ; 2021 ) , or resort to value function factorisation ( Sunehag et al. , 2017 ; Rashid et al. , 2018 ; Son et al. , 2019 ) . A popular paradigm of cooperative MARL is Centralized Training , Decentralized Execution ( CTDE ) ( Rashid et al. , 2018 ; Sunehag et al. , 2017 ) . During centralized training , agents are granted access to other agents ’ information and possibly the global state , while during decentralized execution , agents make decisions independently based on their individual policies . However , although global information is incorporated during centralized training of CTDE , guiding the decentralized policies of multiple agents only by reward signals is often inefficient , especially when the reward signal is stochastic or sparse . This requires additional mechanisms to facilitate multi-agent collaboration ( Roy et al. , 2019 ; Kim et al. , 2020 ) . Later , another branch of works which is complementary to the above two branches focuses on leveraging the correlation or influence among agents for better collaboration ( Jaques et al. , 2018 ; 2019 ; Xie et al. , 2020 ; Liu et al. , 2020 ; Merhej & Chetouani , 2021 ) .The intuition behind this is that if agents make decisions with the awareness of the influence or behaviors of other agents , the non-stationary problem could be mitigated , thus agents are more likely to achieve collaboration . Motivated by this , recently , several works ( Chen et al. , 2019 ; Mahajan et al. , 2019 ; Kim et al. , 2020 ) propose to maximize the correlation of agents ’ behaviors to promote collaboration . The correlation is commonly quantified by the mutual information ( MI ) of agents ’ behaviors . Signal Instructed Coordination ( SIC ) ( Chen et al. , 2019 ) incorporates a shared latent variable z ( sampled from a predefined distribution ) into agents ’ policies as a signal of collaboration . During training , the MI between latent variable z and agents ’ joint policy is maximized . By taking z as input , the correlation of each agent ’ s decision to the joint policy is enhanced . Similarly , Multi-agent Variational Exploration ( Maven ) ( Mahajan et al. , 2019 ) establishes an encoder network to encode the initial global state into the latent variable z instead of sampling from a predefined distribution . Then Maven maximizes the MI between z and the resulting trajectory of all agents . However , one common drawback of both methods is , the shared variable z required during decentralized execution violates the CTDE paradigm . This makes algorithms fail in some real-world deployment scenarios where global communication is not available . Apart from the above methods , VM3-AC ( Kim et al. , 2020 ) measures the MI between any two agents ’ policies to capture the correlation of agents ’ behaviors , where z is also introduced to guarantee the MI of any two policies is positive . Through maximizing the MI of any two agents ’ policies , VM3-AC reduces the uncertainty of agents ’ policies and thus facilitates multi-agent collaboration . However , VM3-AC also violates the CTDE paradigm due to the requirement of the shared variable z . Furthermore , VM3-AC calculates the MI between any two agents , which can be computationally infeasible with the increase of the number of agents . Another critical thing which is neglected by previous works is that , although agents with high degree of collaboration usually generate highly correlated behaviors , this does not necessarily results in high rewards . Thus , simply maximizing the MI of agents ’ behaviors can not guarantee desired collaboration . Worse still , maximizing MI exacerbates the problem : the agent can easily overfit its strategy to the behaviours of other agents ( Zhang et al. , 2019 ; Lanctot et al. , 2017 ) . An example is shown in Figure 1 where agents are easily falling into sub-optimal collaboration . In this paper , we propose a new collaboration criterion to evaluate the collaboration of multiple agents in terms of the joint policy , individual policy , and other agents ’ policies . Based on the criterion , we propose a new form of MI between the global state and joint policy to facilitate collaboration which is free of the reliance of explicit additional input as introduced in previous works and addresses the scalability issue . Moreover , to avoid falling into sub-optimal collaboration , we propose a novel framework , called Progressive Mutual Information Collaboration ( PMIC ) , which contains two main components . The first component is Dual Progressive Collaboration Buffer ( DPCB ) which includes a positive and a negative buffer to dynamically keep the superior and inferior collaboration separately . The second component is Dual Mutual Information Estimator ( DMIE ) which has two MI neural estimators to estimate the MI of global state and joint action based on DPCB . Specifically , one estimator is trained on the positive buffer to provide the lower bound of MI , the other is trained on the negative buffer to provide the upper bound of MI . By maximizing the lower bound and minimizing the upper bound of MI , the agents could progressively break the current suboptimal collaboration and learn towards better performance which promotes an efficient and stable learning process . PMIC is general and can be easily combined with existing MARL algorithms . Our experiments show that PMIC significantly accelerates existing MARL algorithms , outperforms other related algorithms on a wide range of MARL benchmarks . 2 PRELIMINARIES . We consider a fully cooperative multi-agent task where a team of agents are situated in a stochastic , partially observable environment , it can be modeled as a decentralised partially observable Markov decision process ( Dec-POMDP ) ( Oliehoek & Amato , 2016 ) , defined by a tuple ⟨I , S , U , O , T , R , γ⟩ . Here I = { 1 , ... , N } denotes the set of N agents . In Dec-POMDP , the full state of the environment st ∈ S can not be observed by agents at each time step t. Each agent i ∈ I can only observe its individual observation oit determined by observation function O ( st , i ) , each agent i uses a stochastic policy πi to choose actions uit ∼ πi ( ·|oit ) , yielding the joint action ut = { uit } Ni=1 ∈ U . After executing ut in state st , the environment transits to the next state st+1 according to transition function T ( st , ut ) and agents receive a common reward rt from R ( st , ut ) , with a discount factor γ . In cooperative MARL , the collaborative team aims to find a joint pol- icy π ( ut|st ) = ∏N a=1 πi ( u i t|oit ) that maximizes the total expected discounted cumulative reward Eπ [ ∑∞ t=0 γ trt ] where y is the discount factor . 3 PROGRESSIVE MUTUAL INFORMATION COLLABORATION 3.1 MOTIVATION In this section , we show the motivation of our work to explain why blindly maximizing correlation of agents ‘ behaviors may make agents stuck into suboptimal collaboration . Firstly , we give a motivating example shown in ( a ) of Figure 1 where agents need cooperate to catch the targets A , B and C with different sparse rewards and punishments . Capturing A is more rewarding than B and C. Agents may receive penalties for capturing different targets . We denote the behaviors generated by the joint policy of achieving a certain target concurrently as collaboration pattern . In this setting , promoting collaboration with simply maximizing the MI of agents ’ behaviors can not guarantee a better collaboration . As shown in Figure 2 , the patterns joint distribution is composed of patterns which capture targets A , B and C. This distribution is chaotic and contains various collaboration patterns . In this case , maximizing MI on any patterns of the distribution may enhance the inferior collaboration patterns , for example maximizing MI on the pattern B or C may make agents converge to a sub-optimal collaboration pattern . In fact , this is a very common situation . In complex environments , there is a wide variety of collaboration , maximizing MI could only stimulate agents towards a certain collaboration , which may be sub-optimal and in turn prevents from discovering better collaborations . This happens because , as learning preceeds , a seemly good collaboration will become sub-optimal once a better one is discovered . However , if we excessively maximize the MI using sub-optimal samples , the agents may be accelerated to fall into sub-optimal policies . Thus the motivation of our method is to solve the limitation with the maximization-minimization MI . As shown in the right of Figure 2 , we divide the distribution into the superior and inferior distributions . then we maximize the MI associated with superior collaboration patterns and minimize the MI associated with inferior collaboration patterns . In this manner , the current patterns strengthen towards superior patterns and are away from inferior patterns . Next we conduct experiments with four methods on the environment : MADDPG ( Lowe et al. , 2017 ) , SIC-MADDPG ( Chen et al. , 2019 ) , VM3-MADDPG ( Kim et al. , 2020 ) and our method where VM3 and SIC both promote collaboration by maximizing MI . Results of the count of algorithms converging to different collaboration patterns and overall performance are shown in ( b ) and ( c ) of Figure 1 . We can see that both SIC and VM3 have a greater probability of falling into the sub- optimal patterns than that into the optimal one . This demonstrates that maximizing MI only can not guarantee the optimal collaboration , it may also stuck into sub-optimal collaboration . In addition , our method outperforms other methods in both the number of effective patterns and the optimal patterns , which demonstrates that our method is more effective in facilitating collaboration while avoiding falling into sub-optimal collaboration patterns than other methods . In addition to the above problem , VM3-AC ( Kim et al. , 2020 ) has scalability issue which need to compute the MI of policies between any two agents . Besides , all previous methods ( Kim et al. , 2020 ; Chen et al. , 2019 ; Mahajan et al. , 2019 ) need additional inputs , e.g. , latent variable z in ( Chen et al. , 2019 ; Kim et al. , 2020 ) or global initial state in ( Mahajan et al. , 2019 ) , during the decentralized execution phase , which violates the rule of CTDE paradigm . To this end , we propose a new collaboration criterion as well as a novel framework to solve the above problems . Specifically , we propose a new collaboration criterion to evaluate the collaboration of multiple agents in terms of the joint policy , individual policy , and other agents ’ policies . Based on the criterion , a new way that calculates the MI of the global state and joint policy is proposed to promote collaboration which does not require an additional latent variable as input and addresses the scalability issue . To solve the problem of easily falling into sub-optimal collaboration by maximizing MI only , we then propose PMIC framework which leverages two distinct mechanisms to guide agents in a progressive manner . Finally , to solve the inefficiency of being guided only by rewards ( e.g. , stochastic or sparse ) , we use the estimated values of the new MI which are provided by DMIE as intrinsic rewards . To the best of our knowledge , we are the first to propose a combination of maximizing the lower bound of MI and minimizing the upper bound of MI to promote collaboration in MARL . In the following section , we first introduce the new collaboration criterion , then we show the details of PMIC framework , finally we give an combination of our method with MADDPG . | This paper proposes a new exploration scheme for general multi-agent reinforcement learning called PMIC. PMIC maintains two separate buffers by keeping trajectories with high rewards and trajectories with less satisfying rewards. PMIC additionally computes a lower bound of mutual information between state and policy over the positive buffer and an upper bound of the negative buffer. Finally, an intrinsic reward in the form of the lower bound minus the upper bound is introduced as the exploration bonus, which improves a collection of different MARL algorithms on a few benchmark testbeds. | SP:68f2b8b485677a16853cb381100bb56214a9fbda |
PMIC: Improving Multi-Agent Reinforcement Learning with Progressive Mutual Information Collaboration | 1 INTRODUCTION . With the potential to solve complex real-world problems , Multi-Agent Reinforcement Learning ( MARL ) has attracted much attention in recent years ( Rashid et al. , 2018 ; Iqbal & Sha , 2019 ; Wang et al. , 2019b ) and been applied to many practical domains like Game AI ( Peng et al. , 2017 ) , robotics control ( Matignon et al. , 2012 ) , transportation ( Li et al. , 2019 ) . However , efficiently achieving collaboration and learning optimal policies still remains challenging in MARL ( Liu et al. , 2020 ; Wen et al. , 2019 ) . Prior efforts on improving collaboration of MARL agents mainly rely on efficient communication ( Eccles et al. , 2019 ; Das et al. , 2019 ; Kim et al. , 2019 ; 2021 ) , or resort to value function factorisation ( Sunehag et al. , 2017 ; Rashid et al. , 2018 ; Son et al. , 2019 ) . A popular paradigm of cooperative MARL is Centralized Training , Decentralized Execution ( CTDE ) ( Rashid et al. , 2018 ; Sunehag et al. , 2017 ) . During centralized training , agents are granted access to other agents ’ information and possibly the global state , while during decentralized execution , agents make decisions independently based on their individual policies . However , although global information is incorporated during centralized training of CTDE , guiding the decentralized policies of multiple agents only by reward signals is often inefficient , especially when the reward signal is stochastic or sparse . This requires additional mechanisms to facilitate multi-agent collaboration ( Roy et al. , 2019 ; Kim et al. , 2020 ) . Later , another branch of works which is complementary to the above two branches focuses on leveraging the correlation or influence among agents for better collaboration ( Jaques et al. , 2018 ; 2019 ; Xie et al. , 2020 ; Liu et al. , 2020 ; Merhej & Chetouani , 2021 ) .The intuition behind this is that if agents make decisions with the awareness of the influence or behaviors of other agents , the non-stationary problem could be mitigated , thus agents are more likely to achieve collaboration . Motivated by this , recently , several works ( Chen et al. , 2019 ; Mahajan et al. , 2019 ; Kim et al. , 2020 ) propose to maximize the correlation of agents ’ behaviors to promote collaboration . The correlation is commonly quantified by the mutual information ( MI ) of agents ’ behaviors . Signal Instructed Coordination ( SIC ) ( Chen et al. , 2019 ) incorporates a shared latent variable z ( sampled from a predefined distribution ) into agents ’ policies as a signal of collaboration . During training , the MI between latent variable z and agents ’ joint policy is maximized . By taking z as input , the correlation of each agent ’ s decision to the joint policy is enhanced . Similarly , Multi-agent Variational Exploration ( Maven ) ( Mahajan et al. , 2019 ) establishes an encoder network to encode the initial global state into the latent variable z instead of sampling from a predefined distribution . Then Maven maximizes the MI between z and the resulting trajectory of all agents . However , one common drawback of both methods is , the shared variable z required during decentralized execution violates the CTDE paradigm . This makes algorithms fail in some real-world deployment scenarios where global communication is not available . Apart from the above methods , VM3-AC ( Kim et al. , 2020 ) measures the MI between any two agents ’ policies to capture the correlation of agents ’ behaviors , where z is also introduced to guarantee the MI of any two policies is positive . Through maximizing the MI of any two agents ’ policies , VM3-AC reduces the uncertainty of agents ’ policies and thus facilitates multi-agent collaboration . However , VM3-AC also violates the CTDE paradigm due to the requirement of the shared variable z . Furthermore , VM3-AC calculates the MI between any two agents , which can be computationally infeasible with the increase of the number of agents . Another critical thing which is neglected by previous works is that , although agents with high degree of collaboration usually generate highly correlated behaviors , this does not necessarily results in high rewards . Thus , simply maximizing the MI of agents ’ behaviors can not guarantee desired collaboration . Worse still , maximizing MI exacerbates the problem : the agent can easily overfit its strategy to the behaviours of other agents ( Zhang et al. , 2019 ; Lanctot et al. , 2017 ) . An example is shown in Figure 1 where agents are easily falling into sub-optimal collaboration . In this paper , we propose a new collaboration criterion to evaluate the collaboration of multiple agents in terms of the joint policy , individual policy , and other agents ’ policies . Based on the criterion , we propose a new form of MI between the global state and joint policy to facilitate collaboration which is free of the reliance of explicit additional input as introduced in previous works and addresses the scalability issue . Moreover , to avoid falling into sub-optimal collaboration , we propose a novel framework , called Progressive Mutual Information Collaboration ( PMIC ) , which contains two main components . The first component is Dual Progressive Collaboration Buffer ( DPCB ) which includes a positive and a negative buffer to dynamically keep the superior and inferior collaboration separately . The second component is Dual Mutual Information Estimator ( DMIE ) which has two MI neural estimators to estimate the MI of global state and joint action based on DPCB . Specifically , one estimator is trained on the positive buffer to provide the lower bound of MI , the other is trained on the negative buffer to provide the upper bound of MI . By maximizing the lower bound and minimizing the upper bound of MI , the agents could progressively break the current suboptimal collaboration and learn towards better performance which promotes an efficient and stable learning process . PMIC is general and can be easily combined with existing MARL algorithms . Our experiments show that PMIC significantly accelerates existing MARL algorithms , outperforms other related algorithms on a wide range of MARL benchmarks . 2 PRELIMINARIES . We consider a fully cooperative multi-agent task where a team of agents are situated in a stochastic , partially observable environment , it can be modeled as a decentralised partially observable Markov decision process ( Dec-POMDP ) ( Oliehoek & Amato , 2016 ) , defined by a tuple ⟨I , S , U , O , T , R , γ⟩ . Here I = { 1 , ... , N } denotes the set of N agents . In Dec-POMDP , the full state of the environment st ∈ S can not be observed by agents at each time step t. Each agent i ∈ I can only observe its individual observation oit determined by observation function O ( st , i ) , each agent i uses a stochastic policy πi to choose actions uit ∼ πi ( ·|oit ) , yielding the joint action ut = { uit } Ni=1 ∈ U . After executing ut in state st , the environment transits to the next state st+1 according to transition function T ( st , ut ) and agents receive a common reward rt from R ( st , ut ) , with a discount factor γ . In cooperative MARL , the collaborative team aims to find a joint pol- icy π ( ut|st ) = ∏N a=1 πi ( u i t|oit ) that maximizes the total expected discounted cumulative reward Eπ [ ∑∞ t=0 γ trt ] where y is the discount factor . 3 PROGRESSIVE MUTUAL INFORMATION COLLABORATION 3.1 MOTIVATION In this section , we show the motivation of our work to explain why blindly maximizing correlation of agents ‘ behaviors may make agents stuck into suboptimal collaboration . Firstly , we give a motivating example shown in ( a ) of Figure 1 where agents need cooperate to catch the targets A , B and C with different sparse rewards and punishments . Capturing A is more rewarding than B and C. Agents may receive penalties for capturing different targets . We denote the behaviors generated by the joint policy of achieving a certain target concurrently as collaboration pattern . In this setting , promoting collaboration with simply maximizing the MI of agents ’ behaviors can not guarantee a better collaboration . As shown in Figure 2 , the patterns joint distribution is composed of patterns which capture targets A , B and C. This distribution is chaotic and contains various collaboration patterns . In this case , maximizing MI on any patterns of the distribution may enhance the inferior collaboration patterns , for example maximizing MI on the pattern B or C may make agents converge to a sub-optimal collaboration pattern . In fact , this is a very common situation . In complex environments , there is a wide variety of collaboration , maximizing MI could only stimulate agents towards a certain collaboration , which may be sub-optimal and in turn prevents from discovering better collaborations . This happens because , as learning preceeds , a seemly good collaboration will become sub-optimal once a better one is discovered . However , if we excessively maximize the MI using sub-optimal samples , the agents may be accelerated to fall into sub-optimal policies . Thus the motivation of our method is to solve the limitation with the maximization-minimization MI . As shown in the right of Figure 2 , we divide the distribution into the superior and inferior distributions . then we maximize the MI associated with superior collaboration patterns and minimize the MI associated with inferior collaboration patterns . In this manner , the current patterns strengthen towards superior patterns and are away from inferior patterns . Next we conduct experiments with four methods on the environment : MADDPG ( Lowe et al. , 2017 ) , SIC-MADDPG ( Chen et al. , 2019 ) , VM3-MADDPG ( Kim et al. , 2020 ) and our method where VM3 and SIC both promote collaboration by maximizing MI . Results of the count of algorithms converging to different collaboration patterns and overall performance are shown in ( b ) and ( c ) of Figure 1 . We can see that both SIC and VM3 have a greater probability of falling into the sub- optimal patterns than that into the optimal one . This demonstrates that maximizing MI only can not guarantee the optimal collaboration , it may also stuck into sub-optimal collaboration . In addition , our method outperforms other methods in both the number of effective patterns and the optimal patterns , which demonstrates that our method is more effective in facilitating collaboration while avoiding falling into sub-optimal collaboration patterns than other methods . In addition to the above problem , VM3-AC ( Kim et al. , 2020 ) has scalability issue which need to compute the MI of policies between any two agents . Besides , all previous methods ( Kim et al. , 2020 ; Chen et al. , 2019 ; Mahajan et al. , 2019 ) need additional inputs , e.g. , latent variable z in ( Chen et al. , 2019 ; Kim et al. , 2020 ) or global initial state in ( Mahajan et al. , 2019 ) , during the decentralized execution phase , which violates the rule of CTDE paradigm . To this end , we propose a new collaboration criterion as well as a novel framework to solve the above problems . Specifically , we propose a new collaboration criterion to evaluate the collaboration of multiple agents in terms of the joint policy , individual policy , and other agents ’ policies . Based on the criterion , a new way that calculates the MI of the global state and joint policy is proposed to promote collaboration which does not require an additional latent variable as input and addresses the scalability issue . To solve the problem of easily falling into sub-optimal collaboration by maximizing MI only , we then propose PMIC framework which leverages two distinct mechanisms to guide agents in a progressive manner . Finally , to solve the inefficiency of being guided only by rewards ( e.g. , stochastic or sparse ) , we use the estimated values of the new MI which are provided by DMIE as intrinsic rewards . To the best of our knowledge , we are the first to propose a combination of maximizing the lower bound of MI and minimizing the upper bound of MI to promote collaboration in MARL . In the following section , we first introduce the new collaboration criterion , then we show the details of PMIC framework , finally we give an combination of our method with MADDPG . | This paper aims to solve the collaboration among agents (that is usually called forced coordination in other literatures). The common method to enhance the correlations between agents by mutual information (MI) could lead to the sub-optimal collaboration. To address this issue, the author propose Progressive Mutual Information Collaboration (PMIC). This new MARL framework is composed of two components: (1) two replay buffers that respectively collect superior trajectories and inferior trajectories; (2) two mutual information estimators that respectively estimate the upper bound and the lower bound of MI that are trained with the data stored in the two replay buffers introduced above. These two estimators (MINE and CLUB) are from the prior works. The novelties of this work are applying these two estimators to collaboration problem for MARL and learning the mutual information that evaluates the correlation among agents constrained within these two bounds. In my view, the idea of appropriately modelling these MI bound estimators to the actual phenomenon in the MARL problem is novel. Seen from the algorithmic framework type, this algorithm add the learned MI term to the reward function that plays the role of auxiliary reward. From the perspective of optimization, this is a kind of implementation of Lagrangian method, to transform the constraints stated in Equation (2) and (3) to a unconstrained terms involved in the objective function. Similar to many prior works, the tuning of the multipliers could be a potential issue. The authors also conduct the ablation studies on these two multipliers and the results seem like it would not affect the performance in the case of Cooperation Navigation. | SP:68f2b8b485677a16853cb381100bb56214a9fbda |
PMIC: Improving Multi-Agent Reinforcement Learning with Progressive Mutual Information Collaboration | 1 INTRODUCTION . With the potential to solve complex real-world problems , Multi-Agent Reinforcement Learning ( MARL ) has attracted much attention in recent years ( Rashid et al. , 2018 ; Iqbal & Sha , 2019 ; Wang et al. , 2019b ) and been applied to many practical domains like Game AI ( Peng et al. , 2017 ) , robotics control ( Matignon et al. , 2012 ) , transportation ( Li et al. , 2019 ) . However , efficiently achieving collaboration and learning optimal policies still remains challenging in MARL ( Liu et al. , 2020 ; Wen et al. , 2019 ) . Prior efforts on improving collaboration of MARL agents mainly rely on efficient communication ( Eccles et al. , 2019 ; Das et al. , 2019 ; Kim et al. , 2019 ; 2021 ) , or resort to value function factorisation ( Sunehag et al. , 2017 ; Rashid et al. , 2018 ; Son et al. , 2019 ) . A popular paradigm of cooperative MARL is Centralized Training , Decentralized Execution ( CTDE ) ( Rashid et al. , 2018 ; Sunehag et al. , 2017 ) . During centralized training , agents are granted access to other agents ’ information and possibly the global state , while during decentralized execution , agents make decisions independently based on their individual policies . However , although global information is incorporated during centralized training of CTDE , guiding the decentralized policies of multiple agents only by reward signals is often inefficient , especially when the reward signal is stochastic or sparse . This requires additional mechanisms to facilitate multi-agent collaboration ( Roy et al. , 2019 ; Kim et al. , 2020 ) . Later , another branch of works which is complementary to the above two branches focuses on leveraging the correlation or influence among agents for better collaboration ( Jaques et al. , 2018 ; 2019 ; Xie et al. , 2020 ; Liu et al. , 2020 ; Merhej & Chetouani , 2021 ) .The intuition behind this is that if agents make decisions with the awareness of the influence or behaviors of other agents , the non-stationary problem could be mitigated , thus agents are more likely to achieve collaboration . Motivated by this , recently , several works ( Chen et al. , 2019 ; Mahajan et al. , 2019 ; Kim et al. , 2020 ) propose to maximize the correlation of agents ’ behaviors to promote collaboration . The correlation is commonly quantified by the mutual information ( MI ) of agents ’ behaviors . Signal Instructed Coordination ( SIC ) ( Chen et al. , 2019 ) incorporates a shared latent variable z ( sampled from a predefined distribution ) into agents ’ policies as a signal of collaboration . During training , the MI between latent variable z and agents ’ joint policy is maximized . By taking z as input , the correlation of each agent ’ s decision to the joint policy is enhanced . Similarly , Multi-agent Variational Exploration ( Maven ) ( Mahajan et al. , 2019 ) establishes an encoder network to encode the initial global state into the latent variable z instead of sampling from a predefined distribution . Then Maven maximizes the MI between z and the resulting trajectory of all agents . However , one common drawback of both methods is , the shared variable z required during decentralized execution violates the CTDE paradigm . This makes algorithms fail in some real-world deployment scenarios where global communication is not available . Apart from the above methods , VM3-AC ( Kim et al. , 2020 ) measures the MI between any two agents ’ policies to capture the correlation of agents ’ behaviors , where z is also introduced to guarantee the MI of any two policies is positive . Through maximizing the MI of any two agents ’ policies , VM3-AC reduces the uncertainty of agents ’ policies and thus facilitates multi-agent collaboration . However , VM3-AC also violates the CTDE paradigm due to the requirement of the shared variable z . Furthermore , VM3-AC calculates the MI between any two agents , which can be computationally infeasible with the increase of the number of agents . Another critical thing which is neglected by previous works is that , although agents with high degree of collaboration usually generate highly correlated behaviors , this does not necessarily results in high rewards . Thus , simply maximizing the MI of agents ’ behaviors can not guarantee desired collaboration . Worse still , maximizing MI exacerbates the problem : the agent can easily overfit its strategy to the behaviours of other agents ( Zhang et al. , 2019 ; Lanctot et al. , 2017 ) . An example is shown in Figure 1 where agents are easily falling into sub-optimal collaboration . In this paper , we propose a new collaboration criterion to evaluate the collaboration of multiple agents in terms of the joint policy , individual policy , and other agents ’ policies . Based on the criterion , we propose a new form of MI between the global state and joint policy to facilitate collaboration which is free of the reliance of explicit additional input as introduced in previous works and addresses the scalability issue . Moreover , to avoid falling into sub-optimal collaboration , we propose a novel framework , called Progressive Mutual Information Collaboration ( PMIC ) , which contains two main components . The first component is Dual Progressive Collaboration Buffer ( DPCB ) which includes a positive and a negative buffer to dynamically keep the superior and inferior collaboration separately . The second component is Dual Mutual Information Estimator ( DMIE ) which has two MI neural estimators to estimate the MI of global state and joint action based on DPCB . Specifically , one estimator is trained on the positive buffer to provide the lower bound of MI , the other is trained on the negative buffer to provide the upper bound of MI . By maximizing the lower bound and minimizing the upper bound of MI , the agents could progressively break the current suboptimal collaboration and learn towards better performance which promotes an efficient and stable learning process . PMIC is general and can be easily combined with existing MARL algorithms . Our experiments show that PMIC significantly accelerates existing MARL algorithms , outperforms other related algorithms on a wide range of MARL benchmarks . 2 PRELIMINARIES . We consider a fully cooperative multi-agent task where a team of agents are situated in a stochastic , partially observable environment , it can be modeled as a decentralised partially observable Markov decision process ( Dec-POMDP ) ( Oliehoek & Amato , 2016 ) , defined by a tuple ⟨I , S , U , O , T , R , γ⟩ . Here I = { 1 , ... , N } denotes the set of N agents . In Dec-POMDP , the full state of the environment st ∈ S can not be observed by agents at each time step t. Each agent i ∈ I can only observe its individual observation oit determined by observation function O ( st , i ) , each agent i uses a stochastic policy πi to choose actions uit ∼ πi ( ·|oit ) , yielding the joint action ut = { uit } Ni=1 ∈ U . After executing ut in state st , the environment transits to the next state st+1 according to transition function T ( st , ut ) and agents receive a common reward rt from R ( st , ut ) , with a discount factor γ . In cooperative MARL , the collaborative team aims to find a joint pol- icy π ( ut|st ) = ∏N a=1 πi ( u i t|oit ) that maximizes the total expected discounted cumulative reward Eπ [ ∑∞ t=0 γ trt ] where y is the discount factor . 3 PROGRESSIVE MUTUAL INFORMATION COLLABORATION 3.1 MOTIVATION In this section , we show the motivation of our work to explain why blindly maximizing correlation of agents ‘ behaviors may make agents stuck into suboptimal collaboration . Firstly , we give a motivating example shown in ( a ) of Figure 1 where agents need cooperate to catch the targets A , B and C with different sparse rewards and punishments . Capturing A is more rewarding than B and C. Agents may receive penalties for capturing different targets . We denote the behaviors generated by the joint policy of achieving a certain target concurrently as collaboration pattern . In this setting , promoting collaboration with simply maximizing the MI of agents ’ behaviors can not guarantee a better collaboration . As shown in Figure 2 , the patterns joint distribution is composed of patterns which capture targets A , B and C. This distribution is chaotic and contains various collaboration patterns . In this case , maximizing MI on any patterns of the distribution may enhance the inferior collaboration patterns , for example maximizing MI on the pattern B or C may make agents converge to a sub-optimal collaboration pattern . In fact , this is a very common situation . In complex environments , there is a wide variety of collaboration , maximizing MI could only stimulate agents towards a certain collaboration , which may be sub-optimal and in turn prevents from discovering better collaborations . This happens because , as learning preceeds , a seemly good collaboration will become sub-optimal once a better one is discovered . However , if we excessively maximize the MI using sub-optimal samples , the agents may be accelerated to fall into sub-optimal policies . Thus the motivation of our method is to solve the limitation with the maximization-minimization MI . As shown in the right of Figure 2 , we divide the distribution into the superior and inferior distributions . then we maximize the MI associated with superior collaboration patterns and minimize the MI associated with inferior collaboration patterns . In this manner , the current patterns strengthen towards superior patterns and are away from inferior patterns . Next we conduct experiments with four methods on the environment : MADDPG ( Lowe et al. , 2017 ) , SIC-MADDPG ( Chen et al. , 2019 ) , VM3-MADDPG ( Kim et al. , 2020 ) and our method where VM3 and SIC both promote collaboration by maximizing MI . Results of the count of algorithms converging to different collaboration patterns and overall performance are shown in ( b ) and ( c ) of Figure 1 . We can see that both SIC and VM3 have a greater probability of falling into the sub- optimal patterns than that into the optimal one . This demonstrates that maximizing MI only can not guarantee the optimal collaboration , it may also stuck into sub-optimal collaboration . In addition , our method outperforms other methods in both the number of effective patterns and the optimal patterns , which demonstrates that our method is more effective in facilitating collaboration while avoiding falling into sub-optimal collaboration patterns than other methods . In addition to the above problem , VM3-AC ( Kim et al. , 2020 ) has scalability issue which need to compute the MI of policies between any two agents . Besides , all previous methods ( Kim et al. , 2020 ; Chen et al. , 2019 ; Mahajan et al. , 2019 ) need additional inputs , e.g. , latent variable z in ( Chen et al. , 2019 ; Kim et al. , 2020 ) or global initial state in ( Mahajan et al. , 2019 ) , during the decentralized execution phase , which violates the rule of CTDE paradigm . To this end , we propose a new collaboration criterion as well as a novel framework to solve the above problems . Specifically , we propose a new collaboration criterion to evaluate the collaboration of multiple agents in terms of the joint policy , individual policy , and other agents ’ policies . Based on the criterion , a new way that calculates the MI of the global state and joint policy is proposed to promote collaboration which does not require an additional latent variable as input and addresses the scalability issue . To solve the problem of easily falling into sub-optimal collaboration by maximizing MI only , we then propose PMIC framework which leverages two distinct mechanisms to guide agents in a progressive manner . Finally , to solve the inefficiency of being guided only by rewards ( e.g. , stochastic or sparse ) , we use the estimated values of the new MI which are provided by DMIE as intrinsic rewards . To the best of our knowledge , we are the first to propose a combination of maximizing the lower bound of MI and minimizing the upper bound of MI to promote collaboration in MARL . In the following section , we first introduce the new collaboration criterion , then we show the details of PMIC framework , finally we give an combination of our method with MADDPG . | This paper proposes PMIC a MARL framework for improving multi-agent collaboration through mutual information. PMIC uses two separate buffers to store the superior and inferior trajectories, and uses them to train two estimators for the upper and lower bounds for the mutual information between global state and joint policy in two sets of trajectories. The estimated mutual information bounds are then used as additional rewards for training individual policies. The experiments presented in the paper show the advantage over several baselines on several benchmark environments. | SP:68f2b8b485677a16853cb381100bb56214a9fbda |
Adapting Stepsizes by Momentumized Gradients Improves Optimization and Generalization | 1 INTRODUCTION . Prevailing first-order optimization algorithms in modern machine learning can be classified into two categories . One is stochastic gradient descent ( SGD ) ( Robbins & Monro , 1951 ) , which is widely adopted due to its low memory cost and outstanding performance . SGDM ( Sutskever et al. , 2013 ) which incorporates the notion of momentum into SGD , has become the best choice for optimizer in computer vision . The drawback of SGD ( M ) is that it scales the gradient uniformly in all directions , making the training slow especially at the begining and fail to optimize complicated models well beyond Convolutional Neural Networks ( CNN ) . The other type is adaptive gradient methods . Unlike SGD , adaptive gradient optimizers adapt the stepsize ( a.k.a . learning rate ) elementwise according to the gradient values . Specifically , they scale the gradient by the square roots of some form of the running average of the squared values of the past gradients . Popular examples include AdaGrad ( Duchi et al. , 2011 ) , RMSprop ( Tijmen Tieleman , 2012 ) and Adam ( Kingma & Ba , 2015 ) etc . Adam , in particular , has become the default choice for many machine learning application areas owing to its rapid optimizing speed and outstanding ability to handle sophisticated loss curvatures . Despite their fast speed in the early training phase , adaptive gradient methods are found by studies ( Wilson et al. , 2017 ; Zhou et al. , 2020 ) to be more likely to exhibit poorer generalization ability than SGD . This is discouraging because the ultimate goal of training in many machine learning tasks is to exhibit high performance during testing phase . In recent years researchers have put many efforts to mitigate the deficiencies of adaptive gradient algorithms . AMSGrad ( Reddi et al. , 2019 ) corrects the errors in the convergence analysis of Adam and proposes a faster version . Yogi ( Reddi et al. , 2018 ) takes the effect of batch size into consideration . M-SVAG ( Balles & Hennig , 2018 ) transfers the variance adaptation mechanism from Adam to SGD . AdamW ( Loshchilov & Hutter , 2017b ) firsttime decouples weight decay from gradient descent for Adam-alike algorithms . SWATS ( Keskar & Socher , 2017 ) switches from Adam to SGD throughout the training process via a hard schedule and AdaBound ( Luo et al. , 2019 ) switches with a smooth transation by imposing dynamic bounds on stepsizes . RAdam ( Liu et al. , 2019 ) rectifies the variance of the adaptive learning rate through investigating the theory behind warmup heuristic ( Vaswani et al. , 2017 ; Popel & Bojar , 2018 ) . AdaBelief ( Zhuang et al. , 2020 ) adapts stepsizes by the belief in the observed gradients . Nevertheless , most of the above variants can only surpass ( as they claim ) Adam or SGD in limited tasks or under specifically and carefully defined scenarios . Till today , SGD and Adam are still the top options in machine learning , especially deep learning ( Schmidt et al. , 2021 ) . Conventional rules for choosing optimizers are : from task perspective , choose SGDM for vision , and Adam ( or AdamW ) for language and speech ; from model perspective , choose SGDM for Fully Connected Networks and CNNs , and Adam ( or AdamW ) for Recurrent Neural Networks ( RNN ) ( Cho et al. , 2014 ; Hochreiter & Schmidhuber , 1997b ) , Transformers ( Vaswani et al. , 2017 ) and Generative Adversarual Networks ( GAN ) ( Goodfellow et al. , 2014 ) . Based on the above observations , a natural question is : Is there a computationally efficient adaptive gradient algorithm that can converge fast and meanwhile generalize well ? . In this work , we are delighted to discover that simply replacing the gradient term in the second moment estimation term of Adam with its momentumized version can achieve this goal . Our idea comes from the origin of Adam optimizer , which is a combination of RMSprop and SGDM . RMSprop scales the current gradient by the square root of the exponential moving average ( EMA ) of the squared past gradients , and Adam replaces the raw gradient in the numerator of the update term of RMSprop with its EMA form , i.e. , with momentum . Since the momentumized gradient is a more accurate estimation of the appropriate direction to descent , we consider putting it in the second moment estimation term as well . We find such operation makes the optimizer more suitable for the general loss curvature and can theoretically converge to minima that generalize better . Extensive experiments on a broad range of tasks and models indicate that : without bells and whistles , our proposed optimizer can be as good as SGDM on vision problems and outperforms all the competitors in other tasks , meanwhile maintaining fast convergence speed . Our algorithm is efficient with no additional memory cost , and applicable to a wide range of scenarios in machine learning , especially deep learning . More importantly , AdaMomentum requires little effort in hyperparameter tuning and the default parameter setting for adaptive gradient method works well consistently in our algorithm . Notation We use t , T to symbolize the current and total iteration number in the optimization process . θ ∈ Rd denotes the model parameter and f ( θ ) ∈ R denotes the loss function . We further use θt to denote the parameter at step t and ft to denote the noisy realization of f at time t because of the mini-batch stochastic gradient mechanism . gt denotes the t-th time gradient and α denotes stepsize . mt , vt represent the EMA of the gradient and the second moment estimation term at time t of adaptive gradient methods respectively . is a small constant number added in adaptive gradient methods to refrain the denominator from being too close to zero . β1 , β2 are the decaying parameter in the EMA formulation of mt and vt correspondingly . For any vectors a , b ∈ Rd , we employ√ a , a2 , |a| , a/b , a ≥ b , a ≤ b for elementwise square root , square , absolute value , division , greater or equal to , less than or equal to respectively . For any 1 ≤ i ≤ d , θt , i denotes the i-th element of θt . Given a vector x ∈ Rd , we use ‖x‖2 to denote its l2-norm and ‖x‖∞ to denote its l∞-norm . 2 ALGORITHM Table 1 : Comparison of AdaMomentum and classic adaptive gradient methods in mt and vt in ( 1 ) . Optimizer mt vt SGD gt 1 Rprop gt g2t RMSprop gt ( 1− β2 ) ∑t i=1 β t−i 2 g 2 i Adam ( 1− β1 ) ∑t i=1 β t−i 1 gi ( 1− β2 ) ∑t i=1 β t−i 2 g 2 i Ours ( 1− β1 ) ∑t i=1 β t−i 1 gi ( 1− β2 ) ∑t i=1 β t−i 2 mi 2 Preliminaries & Motivation Omitting the debiasing operation and the damping term , the adaptive gradient methods can be generally written in the following form : θt+1 = θt − α mt√ vt . ( 1 ) Here mt , vt are called the first and second moment estimation terms . When mt = gt and vt = 1 , ( 1 ) degenerates to the vanilla SGD . Rprop ( Duchi et al. , 2011 ) is the pioneering work using the notion of adaptive learning rate , in which mt = gt and vt = g2t . Actually it is equivalent to only using the sign of gradients for different weight parameters . RMSprop ( Tijmen Tieleman , 2012 ) forces the number divided to be similar for adjacent mini-batches by incorporating momentum acceleration into vt. Adam ( Kingma & Ba , 2015 ) is built upon RMSprop in which it turns gt into momentumized version . Both RMSprop and Adam boost their performance thanks to the smoothing property of EMA using momentum . Due to the fact that momentumized gradient is a more accurate estimation than raw gradient , we deem that there is no reason to use gt in lieu of mt in second moment estimation term vt . Therefore we propose to replace the gis in vt of Adam with their momentumized versions mis , which further smooths the exponential moving average . Algorithm 1 AdaMomentum ( ours ) . All mathematical operations are element-wise . 1 : Initialization : Parameter initialization θ0 , step size α , damping term , m0 ← 0 , v0 ← 0 , t← 0 2 : while θt not converged do 3 : t← t+ 1 . Updating time step 4 : gt ← ∇θft ( θt−1 ) . Acquiring stochastic gradient at time t 5 : mt ← β1mt−1 + ( 1− β1 ) gt . EMA of gradients 6 : vt ← β2vt−1 + ( 1− β2 ) mt2 + . EMA of squared momentumized gradients 7 : m̂t ← mt/ ( 1− βt1 ) . Bias correction of first moment estimation 8 : v̂t ← vt/ ( 1− βt2 ) . Bias correction of second moment estimation 9 : θt ← θt−1 − α · m̂t/ √ v̂t . Updating parameters 10 : end while Detailed Algorithm The detailed procedure of our proposed optimizer is displayed in Algorithm 1 . There are two major modifications based on Adam , which are marked in red and blue respectively . One is that we replace the gt in vt of Adam with mt , which is the momentumized gradient . Hence we name our proposed optimzier as AdaMomentum . The other is the location of ( in Adam is added after √ · in line 10 of Alg.1 ) . We discover that moving the adding from outside the radical symbol to inside can consistently enhance performance . To the best of our knowledge , our method is the first attempt to put momentumized gradient in the second moment estimation term of adaptive gradient methods . Note that although the modifications seem simple to some degree , they can lead to siginificant changes in the performance of an adaptive gradient optimizer due to the iterative nature of optimization methods , which will also be elaborated in the following section . 3 WHY ADAMOMENTUM OVER ADAM ? . 3.1 ADAMOMENTUM IS MORE SUITABLE FOR GENERAL LOSS CURVATURE . In this section , we show that AdaMomentum can converge to ( global ) minima faster than Adam does via a 1-D example . The left part of Figure 1 is the process of optimization from a plateau to a basin area , where global optimum is assumed to exist . The right part is the zoomed-in version of the situation near the minimum , where we have some peaks and valleys . This phenomenon frequently takes place in optimization since there is only one global minimum with probably a great number of local minima surrounding ( Hochreiter & Schmidhuber , 1997a ; Keskar et al. , 2017 ) . Benefits of substituting gt with mt . We first explain how substituting mt for gt in the preconditioner vt can improve training via decomposing the trajectory of parameter point along the loss curve . 1 ) In area A , the parameter point starts to slide down the curve and |gt| begins to enlarge abruptly . So the actual stepsize α/ √ vt is small for Adam . However the absolute value of the momentumized gradient mt is small since it is the EMA of the past gradients , making α/ √ vt still large for AdaMomentum . Hence AdaMomentum can maintain higher training speed than Adam in this changing corner of the loss curve , which is what an optimal optimizer should do . 2 ) In area B , since the exponential moving average decays the impact of past gradients exponentially w.r.t . t , the magnitude of the elements of mt will gradually becomes as large as gt . 3 ) In area C , when the parameter approaches the basin , the magnitude of gt decreases , making the stepsizes of Adam increase immediately . In contrast , the stepsize of AdaMomentum is still comparatively small as |mt| is still much larger than |gt| , which is desired for an ideal optimizer . Small stepsize near optimum has benefits for convergence and stability . A more concrete illustration is given in the right part of Figure 1 . If the stepsize is too large ( e.g . in Adam ) , the weight parameter θt may rush to θ ( 2 ) t+1 and miss the global optimum . In contrast , small stepsize can guarantee the parameter to be close to the global minimum ( see θ ( 1 ) t+1 ) even if there may be tiny oscillations within the basin before the final convergence . Benefits of changing the location of . Next we elaborate why putting under the √ · is beneficial . We denote the debiased second moment estimation in AdaMomentum as v̂t and the second moment estimation term without as v̂′t . By simple calculation , we have v̂t = ( ( 1− β2 ) / ( 1− βt2 ) ) · t∑ i=1 βt−i2 m 2 i + 1− β2 , v̂′t = ( ( 1− β2 ) / ( 1− βt2 ) ) · t∑ i=1 βt−i2 m 2 i . Hence we have v̂t = v̂′t + / ( 1 − β2 ) . Then the actual stepsizes are α/ ( √ v̂′t + / ( 1− β2 ) ) and α/ ( √ v̂′t+ ) respectively . In the final stage of optimization , v̂ ′ t is very close to 0 ( because the values of gradients are near 0 ) and far less than hence the actual stepsizes can be approximately written as√ 1− β2α/ √ and α/ .As usually takes very tiny values ranging from 10−8 to 10−16 and β2 usu- ally take values that are extremely close to 1 ( usually 0.999 ) , we have √ 1− β2α/ √ α/ . Therefore we may reasonably come to the conclusion that after moving term into the radical symbol , AdaMomentum further reduces the stepsizes when the training is near minima , which contributes to enhancing convergence and stability as we have discussed above . | In this work, the authors proposed an improved version of Adam by using a momentumized version of the second moment. The authors justify the proposed modification and give some standard convergence analysis. The authors test the proposed methods in several deep learning tasks and show the improvement over some existing methods. | SP:f6c09a2f4bfdee9a4180a41c47f819a4ba833211 |
Adapting Stepsizes by Momentumized Gradients Improves Optimization and Generalization | 1 INTRODUCTION . Prevailing first-order optimization algorithms in modern machine learning can be classified into two categories . One is stochastic gradient descent ( SGD ) ( Robbins & Monro , 1951 ) , which is widely adopted due to its low memory cost and outstanding performance . SGDM ( Sutskever et al. , 2013 ) which incorporates the notion of momentum into SGD , has become the best choice for optimizer in computer vision . The drawback of SGD ( M ) is that it scales the gradient uniformly in all directions , making the training slow especially at the begining and fail to optimize complicated models well beyond Convolutional Neural Networks ( CNN ) . The other type is adaptive gradient methods . Unlike SGD , adaptive gradient optimizers adapt the stepsize ( a.k.a . learning rate ) elementwise according to the gradient values . Specifically , they scale the gradient by the square roots of some form of the running average of the squared values of the past gradients . Popular examples include AdaGrad ( Duchi et al. , 2011 ) , RMSprop ( Tijmen Tieleman , 2012 ) and Adam ( Kingma & Ba , 2015 ) etc . Adam , in particular , has become the default choice for many machine learning application areas owing to its rapid optimizing speed and outstanding ability to handle sophisticated loss curvatures . Despite their fast speed in the early training phase , adaptive gradient methods are found by studies ( Wilson et al. , 2017 ; Zhou et al. , 2020 ) to be more likely to exhibit poorer generalization ability than SGD . This is discouraging because the ultimate goal of training in many machine learning tasks is to exhibit high performance during testing phase . In recent years researchers have put many efforts to mitigate the deficiencies of adaptive gradient algorithms . AMSGrad ( Reddi et al. , 2019 ) corrects the errors in the convergence analysis of Adam and proposes a faster version . Yogi ( Reddi et al. , 2018 ) takes the effect of batch size into consideration . M-SVAG ( Balles & Hennig , 2018 ) transfers the variance adaptation mechanism from Adam to SGD . AdamW ( Loshchilov & Hutter , 2017b ) firsttime decouples weight decay from gradient descent for Adam-alike algorithms . SWATS ( Keskar & Socher , 2017 ) switches from Adam to SGD throughout the training process via a hard schedule and AdaBound ( Luo et al. , 2019 ) switches with a smooth transation by imposing dynamic bounds on stepsizes . RAdam ( Liu et al. , 2019 ) rectifies the variance of the adaptive learning rate through investigating the theory behind warmup heuristic ( Vaswani et al. , 2017 ; Popel & Bojar , 2018 ) . AdaBelief ( Zhuang et al. , 2020 ) adapts stepsizes by the belief in the observed gradients . Nevertheless , most of the above variants can only surpass ( as they claim ) Adam or SGD in limited tasks or under specifically and carefully defined scenarios . Till today , SGD and Adam are still the top options in machine learning , especially deep learning ( Schmidt et al. , 2021 ) . Conventional rules for choosing optimizers are : from task perspective , choose SGDM for vision , and Adam ( or AdamW ) for language and speech ; from model perspective , choose SGDM for Fully Connected Networks and CNNs , and Adam ( or AdamW ) for Recurrent Neural Networks ( RNN ) ( Cho et al. , 2014 ; Hochreiter & Schmidhuber , 1997b ) , Transformers ( Vaswani et al. , 2017 ) and Generative Adversarual Networks ( GAN ) ( Goodfellow et al. , 2014 ) . Based on the above observations , a natural question is : Is there a computationally efficient adaptive gradient algorithm that can converge fast and meanwhile generalize well ? . In this work , we are delighted to discover that simply replacing the gradient term in the second moment estimation term of Adam with its momentumized version can achieve this goal . Our idea comes from the origin of Adam optimizer , which is a combination of RMSprop and SGDM . RMSprop scales the current gradient by the square root of the exponential moving average ( EMA ) of the squared past gradients , and Adam replaces the raw gradient in the numerator of the update term of RMSprop with its EMA form , i.e. , with momentum . Since the momentumized gradient is a more accurate estimation of the appropriate direction to descent , we consider putting it in the second moment estimation term as well . We find such operation makes the optimizer more suitable for the general loss curvature and can theoretically converge to minima that generalize better . Extensive experiments on a broad range of tasks and models indicate that : without bells and whistles , our proposed optimizer can be as good as SGDM on vision problems and outperforms all the competitors in other tasks , meanwhile maintaining fast convergence speed . Our algorithm is efficient with no additional memory cost , and applicable to a wide range of scenarios in machine learning , especially deep learning . More importantly , AdaMomentum requires little effort in hyperparameter tuning and the default parameter setting for adaptive gradient method works well consistently in our algorithm . Notation We use t , T to symbolize the current and total iteration number in the optimization process . θ ∈ Rd denotes the model parameter and f ( θ ) ∈ R denotes the loss function . We further use θt to denote the parameter at step t and ft to denote the noisy realization of f at time t because of the mini-batch stochastic gradient mechanism . gt denotes the t-th time gradient and α denotes stepsize . mt , vt represent the EMA of the gradient and the second moment estimation term at time t of adaptive gradient methods respectively . is a small constant number added in adaptive gradient methods to refrain the denominator from being too close to zero . β1 , β2 are the decaying parameter in the EMA formulation of mt and vt correspondingly . For any vectors a , b ∈ Rd , we employ√ a , a2 , |a| , a/b , a ≥ b , a ≤ b for elementwise square root , square , absolute value , division , greater or equal to , less than or equal to respectively . For any 1 ≤ i ≤ d , θt , i denotes the i-th element of θt . Given a vector x ∈ Rd , we use ‖x‖2 to denote its l2-norm and ‖x‖∞ to denote its l∞-norm . 2 ALGORITHM Table 1 : Comparison of AdaMomentum and classic adaptive gradient methods in mt and vt in ( 1 ) . Optimizer mt vt SGD gt 1 Rprop gt g2t RMSprop gt ( 1− β2 ) ∑t i=1 β t−i 2 g 2 i Adam ( 1− β1 ) ∑t i=1 β t−i 1 gi ( 1− β2 ) ∑t i=1 β t−i 2 g 2 i Ours ( 1− β1 ) ∑t i=1 β t−i 1 gi ( 1− β2 ) ∑t i=1 β t−i 2 mi 2 Preliminaries & Motivation Omitting the debiasing operation and the damping term , the adaptive gradient methods can be generally written in the following form : θt+1 = θt − α mt√ vt . ( 1 ) Here mt , vt are called the first and second moment estimation terms . When mt = gt and vt = 1 , ( 1 ) degenerates to the vanilla SGD . Rprop ( Duchi et al. , 2011 ) is the pioneering work using the notion of adaptive learning rate , in which mt = gt and vt = g2t . Actually it is equivalent to only using the sign of gradients for different weight parameters . RMSprop ( Tijmen Tieleman , 2012 ) forces the number divided to be similar for adjacent mini-batches by incorporating momentum acceleration into vt. Adam ( Kingma & Ba , 2015 ) is built upon RMSprop in which it turns gt into momentumized version . Both RMSprop and Adam boost their performance thanks to the smoothing property of EMA using momentum . Due to the fact that momentumized gradient is a more accurate estimation than raw gradient , we deem that there is no reason to use gt in lieu of mt in second moment estimation term vt . Therefore we propose to replace the gis in vt of Adam with their momentumized versions mis , which further smooths the exponential moving average . Algorithm 1 AdaMomentum ( ours ) . All mathematical operations are element-wise . 1 : Initialization : Parameter initialization θ0 , step size α , damping term , m0 ← 0 , v0 ← 0 , t← 0 2 : while θt not converged do 3 : t← t+ 1 . Updating time step 4 : gt ← ∇θft ( θt−1 ) . Acquiring stochastic gradient at time t 5 : mt ← β1mt−1 + ( 1− β1 ) gt . EMA of gradients 6 : vt ← β2vt−1 + ( 1− β2 ) mt2 + . EMA of squared momentumized gradients 7 : m̂t ← mt/ ( 1− βt1 ) . Bias correction of first moment estimation 8 : v̂t ← vt/ ( 1− βt2 ) . Bias correction of second moment estimation 9 : θt ← θt−1 − α · m̂t/ √ v̂t . Updating parameters 10 : end while Detailed Algorithm The detailed procedure of our proposed optimizer is displayed in Algorithm 1 . There are two major modifications based on Adam , which are marked in red and blue respectively . One is that we replace the gt in vt of Adam with mt , which is the momentumized gradient . Hence we name our proposed optimzier as AdaMomentum . The other is the location of ( in Adam is added after √ · in line 10 of Alg.1 ) . We discover that moving the adding from outside the radical symbol to inside can consistently enhance performance . To the best of our knowledge , our method is the first attempt to put momentumized gradient in the second moment estimation term of adaptive gradient methods . Note that although the modifications seem simple to some degree , they can lead to siginificant changes in the performance of an adaptive gradient optimizer due to the iterative nature of optimization methods , which will also be elaborated in the following section . 3 WHY ADAMOMENTUM OVER ADAM ? . 3.1 ADAMOMENTUM IS MORE SUITABLE FOR GENERAL LOSS CURVATURE . In this section , we show that AdaMomentum can converge to ( global ) minima faster than Adam does via a 1-D example . The left part of Figure 1 is the process of optimization from a plateau to a basin area , where global optimum is assumed to exist . The right part is the zoomed-in version of the situation near the minimum , where we have some peaks and valleys . This phenomenon frequently takes place in optimization since there is only one global minimum with probably a great number of local minima surrounding ( Hochreiter & Schmidhuber , 1997a ; Keskar et al. , 2017 ) . Benefits of substituting gt with mt . We first explain how substituting mt for gt in the preconditioner vt can improve training via decomposing the trajectory of parameter point along the loss curve . 1 ) In area A , the parameter point starts to slide down the curve and |gt| begins to enlarge abruptly . So the actual stepsize α/ √ vt is small for Adam . However the absolute value of the momentumized gradient mt is small since it is the EMA of the past gradients , making α/ √ vt still large for AdaMomentum . Hence AdaMomentum can maintain higher training speed than Adam in this changing corner of the loss curve , which is what an optimal optimizer should do . 2 ) In area B , since the exponential moving average decays the impact of past gradients exponentially w.r.t . t , the magnitude of the elements of mt will gradually becomes as large as gt . 3 ) In area C , when the parameter approaches the basin , the magnitude of gt decreases , making the stepsizes of Adam increase immediately . In contrast , the stepsize of AdaMomentum is still comparatively small as |mt| is still much larger than |gt| , which is desired for an ideal optimizer . Small stepsize near optimum has benefits for convergence and stability . A more concrete illustration is given in the right part of Figure 1 . If the stepsize is too large ( e.g . in Adam ) , the weight parameter θt may rush to θ ( 2 ) t+1 and miss the global optimum . In contrast , small stepsize can guarantee the parameter to be close to the global minimum ( see θ ( 1 ) t+1 ) even if there may be tiny oscillations within the basin before the final convergence . Benefits of changing the location of . Next we elaborate why putting under the √ · is beneficial . We denote the debiased second moment estimation in AdaMomentum as v̂t and the second moment estimation term without as v̂′t . By simple calculation , we have v̂t = ( ( 1− β2 ) / ( 1− βt2 ) ) · t∑ i=1 βt−i2 m 2 i + 1− β2 , v̂′t = ( ( 1− β2 ) / ( 1− βt2 ) ) · t∑ i=1 βt−i2 m 2 i . Hence we have v̂t = v̂′t + / ( 1 − β2 ) . Then the actual stepsizes are α/ ( √ v̂′t + / ( 1− β2 ) ) and α/ ( √ v̂′t+ ) respectively . In the final stage of optimization , v̂ ′ t is very close to 0 ( because the values of gradients are near 0 ) and far less than hence the actual stepsizes can be approximately written as√ 1− β2α/ √ and α/ .As usually takes very tiny values ranging from 10−8 to 10−16 and β2 usu- ally take values that are extremely close to 1 ( usually 0.999 ) , we have √ 1− β2α/ √ α/ . Therefore we may reasonably come to the conclusion that after moving term into the radical symbol , AdaMomentum further reduces the stepsizes when the training is near minima , which contributes to enhancing convergence and stability as we have discussed above . | This paper proposed AdaMomentum, which uses the EMA (exponential moving average) of the square of EMA of gradient as sthe denominator, while Adam uses the EMA of the square of the gradient. The authors conducted experiments in CNN, Transformer, LSTM and GAN to show the superior performance of AdaMomentum. The authors also tried to provide theoretical analysis. | SP:f6c09a2f4bfdee9a4180a41c47f819a4ba833211 |
Adapting Stepsizes by Momentumized Gradients Improves Optimization and Generalization | 1 INTRODUCTION . Prevailing first-order optimization algorithms in modern machine learning can be classified into two categories . One is stochastic gradient descent ( SGD ) ( Robbins & Monro , 1951 ) , which is widely adopted due to its low memory cost and outstanding performance . SGDM ( Sutskever et al. , 2013 ) which incorporates the notion of momentum into SGD , has become the best choice for optimizer in computer vision . The drawback of SGD ( M ) is that it scales the gradient uniformly in all directions , making the training slow especially at the begining and fail to optimize complicated models well beyond Convolutional Neural Networks ( CNN ) . The other type is adaptive gradient methods . Unlike SGD , adaptive gradient optimizers adapt the stepsize ( a.k.a . learning rate ) elementwise according to the gradient values . Specifically , they scale the gradient by the square roots of some form of the running average of the squared values of the past gradients . Popular examples include AdaGrad ( Duchi et al. , 2011 ) , RMSprop ( Tijmen Tieleman , 2012 ) and Adam ( Kingma & Ba , 2015 ) etc . Adam , in particular , has become the default choice for many machine learning application areas owing to its rapid optimizing speed and outstanding ability to handle sophisticated loss curvatures . Despite their fast speed in the early training phase , adaptive gradient methods are found by studies ( Wilson et al. , 2017 ; Zhou et al. , 2020 ) to be more likely to exhibit poorer generalization ability than SGD . This is discouraging because the ultimate goal of training in many machine learning tasks is to exhibit high performance during testing phase . In recent years researchers have put many efforts to mitigate the deficiencies of adaptive gradient algorithms . AMSGrad ( Reddi et al. , 2019 ) corrects the errors in the convergence analysis of Adam and proposes a faster version . Yogi ( Reddi et al. , 2018 ) takes the effect of batch size into consideration . M-SVAG ( Balles & Hennig , 2018 ) transfers the variance adaptation mechanism from Adam to SGD . AdamW ( Loshchilov & Hutter , 2017b ) firsttime decouples weight decay from gradient descent for Adam-alike algorithms . SWATS ( Keskar & Socher , 2017 ) switches from Adam to SGD throughout the training process via a hard schedule and AdaBound ( Luo et al. , 2019 ) switches with a smooth transation by imposing dynamic bounds on stepsizes . RAdam ( Liu et al. , 2019 ) rectifies the variance of the adaptive learning rate through investigating the theory behind warmup heuristic ( Vaswani et al. , 2017 ; Popel & Bojar , 2018 ) . AdaBelief ( Zhuang et al. , 2020 ) adapts stepsizes by the belief in the observed gradients . Nevertheless , most of the above variants can only surpass ( as they claim ) Adam or SGD in limited tasks or under specifically and carefully defined scenarios . Till today , SGD and Adam are still the top options in machine learning , especially deep learning ( Schmidt et al. , 2021 ) . Conventional rules for choosing optimizers are : from task perspective , choose SGDM for vision , and Adam ( or AdamW ) for language and speech ; from model perspective , choose SGDM for Fully Connected Networks and CNNs , and Adam ( or AdamW ) for Recurrent Neural Networks ( RNN ) ( Cho et al. , 2014 ; Hochreiter & Schmidhuber , 1997b ) , Transformers ( Vaswani et al. , 2017 ) and Generative Adversarual Networks ( GAN ) ( Goodfellow et al. , 2014 ) . Based on the above observations , a natural question is : Is there a computationally efficient adaptive gradient algorithm that can converge fast and meanwhile generalize well ? . In this work , we are delighted to discover that simply replacing the gradient term in the second moment estimation term of Adam with its momentumized version can achieve this goal . Our idea comes from the origin of Adam optimizer , which is a combination of RMSprop and SGDM . RMSprop scales the current gradient by the square root of the exponential moving average ( EMA ) of the squared past gradients , and Adam replaces the raw gradient in the numerator of the update term of RMSprop with its EMA form , i.e. , with momentum . Since the momentumized gradient is a more accurate estimation of the appropriate direction to descent , we consider putting it in the second moment estimation term as well . We find such operation makes the optimizer more suitable for the general loss curvature and can theoretically converge to minima that generalize better . Extensive experiments on a broad range of tasks and models indicate that : without bells and whistles , our proposed optimizer can be as good as SGDM on vision problems and outperforms all the competitors in other tasks , meanwhile maintaining fast convergence speed . Our algorithm is efficient with no additional memory cost , and applicable to a wide range of scenarios in machine learning , especially deep learning . More importantly , AdaMomentum requires little effort in hyperparameter tuning and the default parameter setting for adaptive gradient method works well consistently in our algorithm . Notation We use t , T to symbolize the current and total iteration number in the optimization process . θ ∈ Rd denotes the model parameter and f ( θ ) ∈ R denotes the loss function . We further use θt to denote the parameter at step t and ft to denote the noisy realization of f at time t because of the mini-batch stochastic gradient mechanism . gt denotes the t-th time gradient and α denotes stepsize . mt , vt represent the EMA of the gradient and the second moment estimation term at time t of adaptive gradient methods respectively . is a small constant number added in adaptive gradient methods to refrain the denominator from being too close to zero . β1 , β2 are the decaying parameter in the EMA formulation of mt and vt correspondingly . For any vectors a , b ∈ Rd , we employ√ a , a2 , |a| , a/b , a ≥ b , a ≤ b for elementwise square root , square , absolute value , division , greater or equal to , less than or equal to respectively . For any 1 ≤ i ≤ d , θt , i denotes the i-th element of θt . Given a vector x ∈ Rd , we use ‖x‖2 to denote its l2-norm and ‖x‖∞ to denote its l∞-norm . 2 ALGORITHM Table 1 : Comparison of AdaMomentum and classic adaptive gradient methods in mt and vt in ( 1 ) . Optimizer mt vt SGD gt 1 Rprop gt g2t RMSprop gt ( 1− β2 ) ∑t i=1 β t−i 2 g 2 i Adam ( 1− β1 ) ∑t i=1 β t−i 1 gi ( 1− β2 ) ∑t i=1 β t−i 2 g 2 i Ours ( 1− β1 ) ∑t i=1 β t−i 1 gi ( 1− β2 ) ∑t i=1 β t−i 2 mi 2 Preliminaries & Motivation Omitting the debiasing operation and the damping term , the adaptive gradient methods can be generally written in the following form : θt+1 = θt − α mt√ vt . ( 1 ) Here mt , vt are called the first and second moment estimation terms . When mt = gt and vt = 1 , ( 1 ) degenerates to the vanilla SGD . Rprop ( Duchi et al. , 2011 ) is the pioneering work using the notion of adaptive learning rate , in which mt = gt and vt = g2t . Actually it is equivalent to only using the sign of gradients for different weight parameters . RMSprop ( Tijmen Tieleman , 2012 ) forces the number divided to be similar for adjacent mini-batches by incorporating momentum acceleration into vt. Adam ( Kingma & Ba , 2015 ) is built upon RMSprop in which it turns gt into momentumized version . Both RMSprop and Adam boost their performance thanks to the smoothing property of EMA using momentum . Due to the fact that momentumized gradient is a more accurate estimation than raw gradient , we deem that there is no reason to use gt in lieu of mt in second moment estimation term vt . Therefore we propose to replace the gis in vt of Adam with their momentumized versions mis , which further smooths the exponential moving average . Algorithm 1 AdaMomentum ( ours ) . All mathematical operations are element-wise . 1 : Initialization : Parameter initialization θ0 , step size α , damping term , m0 ← 0 , v0 ← 0 , t← 0 2 : while θt not converged do 3 : t← t+ 1 . Updating time step 4 : gt ← ∇θft ( θt−1 ) . Acquiring stochastic gradient at time t 5 : mt ← β1mt−1 + ( 1− β1 ) gt . EMA of gradients 6 : vt ← β2vt−1 + ( 1− β2 ) mt2 + . EMA of squared momentumized gradients 7 : m̂t ← mt/ ( 1− βt1 ) . Bias correction of first moment estimation 8 : v̂t ← vt/ ( 1− βt2 ) . Bias correction of second moment estimation 9 : θt ← θt−1 − α · m̂t/ √ v̂t . Updating parameters 10 : end while Detailed Algorithm The detailed procedure of our proposed optimizer is displayed in Algorithm 1 . There are two major modifications based on Adam , which are marked in red and blue respectively . One is that we replace the gt in vt of Adam with mt , which is the momentumized gradient . Hence we name our proposed optimzier as AdaMomentum . The other is the location of ( in Adam is added after √ · in line 10 of Alg.1 ) . We discover that moving the adding from outside the radical symbol to inside can consistently enhance performance . To the best of our knowledge , our method is the first attempt to put momentumized gradient in the second moment estimation term of adaptive gradient methods . Note that although the modifications seem simple to some degree , they can lead to siginificant changes in the performance of an adaptive gradient optimizer due to the iterative nature of optimization methods , which will also be elaborated in the following section . 3 WHY ADAMOMENTUM OVER ADAM ? . 3.1 ADAMOMENTUM IS MORE SUITABLE FOR GENERAL LOSS CURVATURE . In this section , we show that AdaMomentum can converge to ( global ) minima faster than Adam does via a 1-D example . The left part of Figure 1 is the process of optimization from a plateau to a basin area , where global optimum is assumed to exist . The right part is the zoomed-in version of the situation near the minimum , where we have some peaks and valleys . This phenomenon frequently takes place in optimization since there is only one global minimum with probably a great number of local minima surrounding ( Hochreiter & Schmidhuber , 1997a ; Keskar et al. , 2017 ) . Benefits of substituting gt with mt . We first explain how substituting mt for gt in the preconditioner vt can improve training via decomposing the trajectory of parameter point along the loss curve . 1 ) In area A , the parameter point starts to slide down the curve and |gt| begins to enlarge abruptly . So the actual stepsize α/ √ vt is small for Adam . However the absolute value of the momentumized gradient mt is small since it is the EMA of the past gradients , making α/ √ vt still large for AdaMomentum . Hence AdaMomentum can maintain higher training speed than Adam in this changing corner of the loss curve , which is what an optimal optimizer should do . 2 ) In area B , since the exponential moving average decays the impact of past gradients exponentially w.r.t . t , the magnitude of the elements of mt will gradually becomes as large as gt . 3 ) In area C , when the parameter approaches the basin , the magnitude of gt decreases , making the stepsizes of Adam increase immediately . In contrast , the stepsize of AdaMomentum is still comparatively small as |mt| is still much larger than |gt| , which is desired for an ideal optimizer . Small stepsize near optimum has benefits for convergence and stability . A more concrete illustration is given in the right part of Figure 1 . If the stepsize is too large ( e.g . in Adam ) , the weight parameter θt may rush to θ ( 2 ) t+1 and miss the global optimum . In contrast , small stepsize can guarantee the parameter to be close to the global minimum ( see θ ( 1 ) t+1 ) even if there may be tiny oscillations within the basin before the final convergence . Benefits of changing the location of . Next we elaborate why putting under the √ · is beneficial . We denote the debiased second moment estimation in AdaMomentum as v̂t and the second moment estimation term without as v̂′t . By simple calculation , we have v̂t = ( ( 1− β2 ) / ( 1− βt2 ) ) · t∑ i=1 βt−i2 m 2 i + 1− β2 , v̂′t = ( ( 1− β2 ) / ( 1− βt2 ) ) · t∑ i=1 βt−i2 m 2 i . Hence we have v̂t = v̂′t + / ( 1 − β2 ) . Then the actual stepsizes are α/ ( √ v̂′t + / ( 1− β2 ) ) and α/ ( √ v̂′t+ ) respectively . In the final stage of optimization , v̂ ′ t is very close to 0 ( because the values of gradients are near 0 ) and far less than hence the actual stepsizes can be approximately written as√ 1− β2α/ √ and α/ .As usually takes very tiny values ranging from 10−8 to 10−16 and β2 usu- ally take values that are extremely close to 1 ( usually 0.999 ) , we have √ 1− β2α/ √ α/ . Therefore we may reasonably come to the conclusion that after moving term into the radical symbol , AdaMomentum further reduces the stepsizes when the training is near minima , which contributes to enhancing convergence and stability as we have discussed above . | This paper study the adaptive type gradient methods, such as ADAM which scaling gradients by square roots of the running averages of squared past gradients. Nevertheless, they discover that substituting the gradient in the second moment estimation term with the momentumized version in ADAM can well solve the weaknesses of ADAM which generalize worse than stochastic gradient descent (SGD) and tend to be trapped in local minima at an early stage during training.Their intuition is that gradient with momentum contains more accurate directional information and therefore its second moment estimation is a better choice for scaling than that of the raw gradient. Thereby they propose ADAMOMENTUM as a new optimizer reaching the goal of training fast while generalizing better. Convergence guarantee is provided and extensive experiments on a wide range of tasks and models is also conducted. | SP:f6c09a2f4bfdee9a4180a41c47f819a4ba833211 |
Data-oriented Scene Recognition | 1 INTRODUCTION . Since the development of AlexNet ( Krizhevsky et al. , 2012 ) , a number of variations of deep Convolutional Neural Networks ( CNNs ) emerged . Motivated by the success of studies ( Simonyan & Zisserman , 2015 ; Szegedy et al. , 2016 ; He et al. , 2016a ) , the networks become deeper by adding more convolutional layers to improve performance for the targeted problems . On the other hand , arguments on the benefits of increasing network width gained support from researchers . Zagoruyko et al . ( Zagoruyko & Komodakis , 2016 ) presented wider deep residual networks that significantly improve the performance over ResNet ( He et al. , 2016a ) . The wider deep network achieved state-ofthe-art performance on ImageNet ( Deng et al. , 2009 ) and CIFAR ( Krizhevsky et al. , 2009 ) , showing consistently better accuracy than its ResNet counterparts . Xie et al . ( Xie et al. , 2017 ) proposed a multi-branch architecture called ResNeXt by widening the residual blocks and cooperating group convolution . In contrast to ResNet , ResNeXt ( Xie et al. , 2017 ) demonstrated a performance boost on a larger ImageNet-5K set and the COCO object detection dataset ( Lin et al. , 2014 ) . ResNeSt ( Zhang et al. , 2020 ) preserved the wider network layout and multi-branch strategy and introduced a modulated architecture to improve the feature learning process . The proposed ResNeSt networks further improved the performance on the ImageNet dataset . Despite the benefits brought by increased depth and width ( i.e. , number of channels ) , side effects such as vanishing gradient and requirement of large number of training examples make it difficult to employ a deep network for learning from complex scenery images . Is a deeper network more suitable for extracting features from scenery images for better understanding complex views ? Or shall we employ more channels to achieve improved performance ? To answer these questions , we need to have a better understanding of the functions of network layers and channels . A number of studies have been conducted in the past years . Lu et al . ( Lu et al. , 2017 ) argued that an integration of both depth and width provides a better understanding of the expressive power of neural networks . Tan and Le ( Tan & Le , 2019 ) showed that it is critical to balance the network depth and width by maintaining a constant depth/width ratio and demonstrated the effectiveness of their approach on ResNet and MobileNet . Besides manually designed networks , deep Neural Architecture Search were proposed to optimize the network depth and width ( Zoph & Le , 2017 ; Guo et al. , 2020 ) . However , most methods , if not all , were developed and evaluated using ImageNet ( Deng et al. , 2009 ) and CIFAR ( Krizhevsky et al. , 2009 ) . These data sets commonly depict an object near the center of the image , and the label tells what the object is . That is , such an image is mostly dominated by one object and , hence , is referred to as “ object-centric ” . On the other hand , a scene image presents a complex view consists of multiple objects and background clutters . This inadvertent data bias could potentially lead to the ignorance of the characteristics of different data . The features that are crucial for object recognition dominantly affect the design of the CNNs . Deep networks with more layers use a variety of receptive fields to extract distinctive scale features whereas networks with more channels capture fine-grained patterns ( Tan & Le , 2019 ) . However , in many applications , both types of information that are crucial for accurately recognizing an image , but the prominence difference between them is seldom explored . This paper attempts to bring out a new perspective on neural network design : the data itself has the preference . Learning the overall spatial layout is crucial to recognize the entire scene , thus scene recognition favors the networks that can better learn the spatial information . For the object-centric images , typical examples only consist of one single object , the spatial layout does not contribute much to the semantic meaning of the image . As the differences between certain object categories are subtle , the detailed patterns and textures of objects are likely to be more representative . The networks that emphasize learning various features can better fit the requirement of object recognition tasks . By considering the distinct characteristics of scene images , our hypothesis is that for scene recognition , learning spatial-wise information improves the performance of CNNs in a more effective manner compared to learning channel-wise information . To evaluate this hypothesis , we conducted comprehensive experiments and our results show scene images gain clear benefits from deepening the network , and the performance change caused by altering the width is marginal . We further proposed a Deep-Narrow Network , which increases the depth of the network as well as decreased the width of the network . We design a Lossless Pooling component and use it in our Deep-Narrow Network to extract spatial features . 2 RELATED WORK . Deep Networks Network depth has played an integral role in the success of CNNs . With the increase of depth , the network can better approximate the target function with richer feature hierarchies , which enables the boost of performance . The success of VGGNet ( Simonyan & Zisserman , 2015 ) and Inception ( Szegedy et al. , 2015 ; 2016 ; 2017 ) on ILSVRC competition further reinforced the significance of the depth . ResNet ( He et al. , 2016b ) , which is a continuance work of deeper networks , revolutionized the possible depth of deep networks by introducing the concept of residual learning and identity mapping into CNNs . ResNet ’ s effective methodology enables the network to be extremely deep and demonstrated improved performance in image recognition tasks . Wide Networks Network width has also been suggested as an essential parameter in the design of deep networks . Wide ResNet ( Zagoruyko & Komodakis , 2016 ) introduced an additional factor to control the width of the ResNet . The experimental results showed that the widening of the network might provide a more effective way to improve performance compared to making ResNet deeper . Xception ( Chollet , 2017 ) can be considered as an extreme Inception architecture , which exploits the idea of depth-wise separable convolution . Xception modified the original inception block by making it wider . This wider structure has also demonstrated improved performance . ResNeXt ( Xie et al. , 2017 ) introduced a new term : cardinality to increase the width of ResNet and won the 2016 ILSVRC classification task . With the success of ResNeXt , it is widely accepted that widen the deep network is an effective way to boost model performance . A most recent wider network : ResNeSt ( Zhang et al. , 2020 ) preserved the wide architecture of ResNeXt and achieved superior performance on image and object recognition tasks . Effects of Depth and Width Although depth and width are proven to be essential parameters in network architecture design , the effect of depth and width , i.e. , what do deep and wide networks learn remains seldom explored . Most of the existing literature focus on the effect of width and depth separately or the trade-off between depth and width in the network design ( Lu et al. , 2017 ) . Tan and Le ( Tan & Le , 2019 ) claimed that deep networks can make use of a larger receptive field while wide networks can better capture fine-grained features . Nguyen et al . ( Nguyen et al. , 2021 ) explored the effects of width and depth and found a characteristic structure named block structure . They demonstrated that for different models , the block structure is unique , but the representations outside the block structure trends to be similar despite the setting of depth and width . In our paper , we analyze the effect of depth and width in CNNs from the perspective of image characteristics . 3 EXPERIMENTAL STUDY . 3.1 DATA SETS AND EXPERIMENTAL SETTINGS . To understand the impact of network structure to the data set and ultimately the applications , we use ImageNet 2012 ( Deng et al. , 2009 ) and Places Standard dataset ( Zhou et al. , 2017 ) as our evaluation data sets . ImageNet 2012 is the benchmark object recognition data set that consists of 1,000 classes and 1.28 million training images . An image in ImageNet 2012 usually contains a single object that is highly distinctive from the background . Place365 Standard dataset is designed for scene recognition and contains 1.8 million training images of 365 classes . The images in Places365 Standard datasets present more complex scenery images . We train deep network models and compute the single-crop ( 224 × 224 pixels ) top-1 and top-5 accuracy based on the application of the models to the validation set . We train each model for 100 epochs on eight Tesla V100 GPUs with 32 images per GPU ( the batch size is 256 ) . All models are trained using synchronous SGD ( Stochastic Gradient Descent ) with a Nesterov momentum of 0.9 and a weight decay of 0.0001 . The learning rate is set to 0.1 and is reduced by a factor of 10 in every 30 epochs . In the training of ResNet and its variants , we follow the settings in ( He et al. , 2016b ) . 3.2 COMPARISON ON DIFFERENT DATA SETS . We conducted our comparison study using ResNet and its variants on Places365 and ImageNet data sets . The results are reported in Tables 1 ( varying network depth ) and 2 ( varying network width ) . By increasing the network depth from 50 to 101 , i.e. , ResNet-50 and ResNet-101 , we obtained a performance improvement of 1.40 % and 2.32 % on Place365 and ImageNet data sets in terms of Top-1 accuracy . Theoretically , if the widening of the network is more effective to improve the performance as stated in the previous literature , we should expect more accuracy increase when we double the width of the networks . However , doubling the width leads to a top-1 accuracy increase of 3.28 % on ImageNet , but only 0.94 % on Place365 . More surprisingly , for ResNeXt , which also doubled the network width , the relative performance increase on ImageNet is 2.34 % in terms of top-1 accuracy , but the number is only 0.14 % on Place365 . The trend that the model performance on ImageNet is more sensitive to width change compared with Place365 is also true when we decrease network depth or narrow down the width . When the network depth decreased from 50 to 18 , ImageNet suffered a 7.23 % relative top-1 accuracy decrease , and for Place365 it is 2.71 % . , that is , the top-1 performance drop on ImageNet is around 2.7 times of the top-1 performance drop on Places . But when we decreased the width of ResNet-50 to half of the original size , the number changed to 4.7 . The statement that widening of the network might provide a more effective way to improve performance is biased towards ImageNet ( object-centric data ) and ignores the characteristics of scenery images . 4 ANALYSIS OF THE IMPACT OF DEPTH AND WIDTH OF DEEP NETWORKS . 4.1 COMPLEXITY OF IMAGES . Our first hypothesis is the performance difference is caused by the complexity of scenery images . This hypothesis is aroused by the distinct complexity difference between scene images and object- centric images : object-centric images always only contain one major object which occupies a large portion of the view , scene images always consist of multiple objects and background clutters . Figure 1 shows two samples from benchmark object-centric data set ( ImageNet ) and benchmark scene data set ( Place365 ) , respectively . Figure 1 ( a ) is labeled as “ bald eagle ” , in which the eagle stands in the center of the view and occupies a large portion of the entire image ; figure 1 ( b ) is labeled as “ forest-broadleaf ” , the entire view consists of not only a bird but also tree branches and leaves . As the correct recognition of scenery images relies on multiple components , a scene image is typically considered more complex than an object-centric image . To evaluate this hypothesis , we introduced another data set that is also widely believed to be “ complex ” : the fine-grained image classification data set . Fine-grained classification is considered to be a more complex task as the classes in the data set can only be discriminated by local and subtle differences . CUB-200-2011 is a data set consists of 200 different species of birds , which serves as a benchmark data set for fine-grained classification tasks . Figure 1 shows two samples in the CUB200-2011 data set . In Figure 1 , black-footed albatross ( c ) and sooty albatross ( d ) are considered to be two different categories in classification . The two albatrosses are similar in appearance , and the differentiating of them is challenging due to the subtle traits that characterize the different species are not straightforward . We conducted comparison experiments on two “ complex ” data sets ( Places365 and CUB-200-2011 ) and one “ simple ” data set . The results are shown in Table 3 . Using the benchmark ResNet-50 as the backbones , we observed that on CUB-200-2011 , the relative top -1 accuracy increased by 1.81 % when doubling the width and dropped 4.28 % when we narrowed the width to half of the original . This performance change caused by altering the width is much acute compared to the result on Place365 ( 0.94 % and 1.11 % , doubling and halving the width respectively ) under the same settings , which demonstrated that a wider network is able to effectively enhance the recognition of “ complex ” fine-grained features . This result does not agree with our first hypothesis : if the performance difference is originated from the complexity of the data , we should observe a moderate performance change on CUB-200-2011 data set along with the changing of network width . The results proved that the performance variance on different data set is not the consequence of the complexity ( rich fine-grained details ) of the data . | The paper suggests that for certain kinds of data, width is much less important to a network's performance than depth. This assumption, the authors claim, is a result of overfitting or over-reliance on ImageNet as a benchmark. Experimental results show width being much more important to the task of object classification than scene recognition. To investigate this finding, the authors propose and evaluate two different hypotheses, and then propose a deep and narrow architecture based on the experimental results. | SP:5e3879dc0b7de7c22dae13eed23d42b6f2f192a3 |
Data-oriented Scene Recognition | 1 INTRODUCTION . Since the development of AlexNet ( Krizhevsky et al. , 2012 ) , a number of variations of deep Convolutional Neural Networks ( CNNs ) emerged . Motivated by the success of studies ( Simonyan & Zisserman , 2015 ; Szegedy et al. , 2016 ; He et al. , 2016a ) , the networks become deeper by adding more convolutional layers to improve performance for the targeted problems . On the other hand , arguments on the benefits of increasing network width gained support from researchers . Zagoruyko et al . ( Zagoruyko & Komodakis , 2016 ) presented wider deep residual networks that significantly improve the performance over ResNet ( He et al. , 2016a ) . The wider deep network achieved state-ofthe-art performance on ImageNet ( Deng et al. , 2009 ) and CIFAR ( Krizhevsky et al. , 2009 ) , showing consistently better accuracy than its ResNet counterparts . Xie et al . ( Xie et al. , 2017 ) proposed a multi-branch architecture called ResNeXt by widening the residual blocks and cooperating group convolution . In contrast to ResNet , ResNeXt ( Xie et al. , 2017 ) demonstrated a performance boost on a larger ImageNet-5K set and the COCO object detection dataset ( Lin et al. , 2014 ) . ResNeSt ( Zhang et al. , 2020 ) preserved the wider network layout and multi-branch strategy and introduced a modulated architecture to improve the feature learning process . The proposed ResNeSt networks further improved the performance on the ImageNet dataset . Despite the benefits brought by increased depth and width ( i.e. , number of channels ) , side effects such as vanishing gradient and requirement of large number of training examples make it difficult to employ a deep network for learning from complex scenery images . Is a deeper network more suitable for extracting features from scenery images for better understanding complex views ? Or shall we employ more channels to achieve improved performance ? To answer these questions , we need to have a better understanding of the functions of network layers and channels . A number of studies have been conducted in the past years . Lu et al . ( Lu et al. , 2017 ) argued that an integration of both depth and width provides a better understanding of the expressive power of neural networks . Tan and Le ( Tan & Le , 2019 ) showed that it is critical to balance the network depth and width by maintaining a constant depth/width ratio and demonstrated the effectiveness of their approach on ResNet and MobileNet . Besides manually designed networks , deep Neural Architecture Search were proposed to optimize the network depth and width ( Zoph & Le , 2017 ; Guo et al. , 2020 ) . However , most methods , if not all , were developed and evaluated using ImageNet ( Deng et al. , 2009 ) and CIFAR ( Krizhevsky et al. , 2009 ) . These data sets commonly depict an object near the center of the image , and the label tells what the object is . That is , such an image is mostly dominated by one object and , hence , is referred to as “ object-centric ” . On the other hand , a scene image presents a complex view consists of multiple objects and background clutters . This inadvertent data bias could potentially lead to the ignorance of the characteristics of different data . The features that are crucial for object recognition dominantly affect the design of the CNNs . Deep networks with more layers use a variety of receptive fields to extract distinctive scale features whereas networks with more channels capture fine-grained patterns ( Tan & Le , 2019 ) . However , in many applications , both types of information that are crucial for accurately recognizing an image , but the prominence difference between them is seldom explored . This paper attempts to bring out a new perspective on neural network design : the data itself has the preference . Learning the overall spatial layout is crucial to recognize the entire scene , thus scene recognition favors the networks that can better learn the spatial information . For the object-centric images , typical examples only consist of one single object , the spatial layout does not contribute much to the semantic meaning of the image . As the differences between certain object categories are subtle , the detailed patterns and textures of objects are likely to be more representative . The networks that emphasize learning various features can better fit the requirement of object recognition tasks . By considering the distinct characteristics of scene images , our hypothesis is that for scene recognition , learning spatial-wise information improves the performance of CNNs in a more effective manner compared to learning channel-wise information . To evaluate this hypothesis , we conducted comprehensive experiments and our results show scene images gain clear benefits from deepening the network , and the performance change caused by altering the width is marginal . We further proposed a Deep-Narrow Network , which increases the depth of the network as well as decreased the width of the network . We design a Lossless Pooling component and use it in our Deep-Narrow Network to extract spatial features . 2 RELATED WORK . Deep Networks Network depth has played an integral role in the success of CNNs . With the increase of depth , the network can better approximate the target function with richer feature hierarchies , which enables the boost of performance . The success of VGGNet ( Simonyan & Zisserman , 2015 ) and Inception ( Szegedy et al. , 2015 ; 2016 ; 2017 ) on ILSVRC competition further reinforced the significance of the depth . ResNet ( He et al. , 2016b ) , which is a continuance work of deeper networks , revolutionized the possible depth of deep networks by introducing the concept of residual learning and identity mapping into CNNs . ResNet ’ s effective methodology enables the network to be extremely deep and demonstrated improved performance in image recognition tasks . Wide Networks Network width has also been suggested as an essential parameter in the design of deep networks . Wide ResNet ( Zagoruyko & Komodakis , 2016 ) introduced an additional factor to control the width of the ResNet . The experimental results showed that the widening of the network might provide a more effective way to improve performance compared to making ResNet deeper . Xception ( Chollet , 2017 ) can be considered as an extreme Inception architecture , which exploits the idea of depth-wise separable convolution . Xception modified the original inception block by making it wider . This wider structure has also demonstrated improved performance . ResNeXt ( Xie et al. , 2017 ) introduced a new term : cardinality to increase the width of ResNet and won the 2016 ILSVRC classification task . With the success of ResNeXt , it is widely accepted that widen the deep network is an effective way to boost model performance . A most recent wider network : ResNeSt ( Zhang et al. , 2020 ) preserved the wide architecture of ResNeXt and achieved superior performance on image and object recognition tasks . Effects of Depth and Width Although depth and width are proven to be essential parameters in network architecture design , the effect of depth and width , i.e. , what do deep and wide networks learn remains seldom explored . Most of the existing literature focus on the effect of width and depth separately or the trade-off between depth and width in the network design ( Lu et al. , 2017 ) . Tan and Le ( Tan & Le , 2019 ) claimed that deep networks can make use of a larger receptive field while wide networks can better capture fine-grained features . Nguyen et al . ( Nguyen et al. , 2021 ) explored the effects of width and depth and found a characteristic structure named block structure . They demonstrated that for different models , the block structure is unique , but the representations outside the block structure trends to be similar despite the setting of depth and width . In our paper , we analyze the effect of depth and width in CNNs from the perspective of image characteristics . 3 EXPERIMENTAL STUDY . 3.1 DATA SETS AND EXPERIMENTAL SETTINGS . To understand the impact of network structure to the data set and ultimately the applications , we use ImageNet 2012 ( Deng et al. , 2009 ) and Places Standard dataset ( Zhou et al. , 2017 ) as our evaluation data sets . ImageNet 2012 is the benchmark object recognition data set that consists of 1,000 classes and 1.28 million training images . An image in ImageNet 2012 usually contains a single object that is highly distinctive from the background . Place365 Standard dataset is designed for scene recognition and contains 1.8 million training images of 365 classes . The images in Places365 Standard datasets present more complex scenery images . We train deep network models and compute the single-crop ( 224 × 224 pixels ) top-1 and top-5 accuracy based on the application of the models to the validation set . We train each model for 100 epochs on eight Tesla V100 GPUs with 32 images per GPU ( the batch size is 256 ) . All models are trained using synchronous SGD ( Stochastic Gradient Descent ) with a Nesterov momentum of 0.9 and a weight decay of 0.0001 . The learning rate is set to 0.1 and is reduced by a factor of 10 in every 30 epochs . In the training of ResNet and its variants , we follow the settings in ( He et al. , 2016b ) . 3.2 COMPARISON ON DIFFERENT DATA SETS . We conducted our comparison study using ResNet and its variants on Places365 and ImageNet data sets . The results are reported in Tables 1 ( varying network depth ) and 2 ( varying network width ) . By increasing the network depth from 50 to 101 , i.e. , ResNet-50 and ResNet-101 , we obtained a performance improvement of 1.40 % and 2.32 % on Place365 and ImageNet data sets in terms of Top-1 accuracy . Theoretically , if the widening of the network is more effective to improve the performance as stated in the previous literature , we should expect more accuracy increase when we double the width of the networks . However , doubling the width leads to a top-1 accuracy increase of 3.28 % on ImageNet , but only 0.94 % on Place365 . More surprisingly , for ResNeXt , which also doubled the network width , the relative performance increase on ImageNet is 2.34 % in terms of top-1 accuracy , but the number is only 0.14 % on Place365 . The trend that the model performance on ImageNet is more sensitive to width change compared with Place365 is also true when we decrease network depth or narrow down the width . When the network depth decreased from 50 to 18 , ImageNet suffered a 7.23 % relative top-1 accuracy decrease , and for Place365 it is 2.71 % . , that is , the top-1 performance drop on ImageNet is around 2.7 times of the top-1 performance drop on Places . But when we decreased the width of ResNet-50 to half of the original size , the number changed to 4.7 . The statement that widening of the network might provide a more effective way to improve performance is biased towards ImageNet ( object-centric data ) and ignores the characteristics of scenery images . 4 ANALYSIS OF THE IMPACT OF DEPTH AND WIDTH OF DEEP NETWORKS . 4.1 COMPLEXITY OF IMAGES . Our first hypothesis is the performance difference is caused by the complexity of scenery images . This hypothesis is aroused by the distinct complexity difference between scene images and object- centric images : object-centric images always only contain one major object which occupies a large portion of the view , scene images always consist of multiple objects and background clutters . Figure 1 shows two samples from benchmark object-centric data set ( ImageNet ) and benchmark scene data set ( Place365 ) , respectively . Figure 1 ( a ) is labeled as “ bald eagle ” , in which the eagle stands in the center of the view and occupies a large portion of the entire image ; figure 1 ( b ) is labeled as “ forest-broadleaf ” , the entire view consists of not only a bird but also tree branches and leaves . As the correct recognition of scenery images relies on multiple components , a scene image is typically considered more complex than an object-centric image . To evaluate this hypothesis , we introduced another data set that is also widely believed to be “ complex ” : the fine-grained image classification data set . Fine-grained classification is considered to be a more complex task as the classes in the data set can only be discriminated by local and subtle differences . CUB-200-2011 is a data set consists of 200 different species of birds , which serves as a benchmark data set for fine-grained classification tasks . Figure 1 shows two samples in the CUB200-2011 data set . In Figure 1 , black-footed albatross ( c ) and sooty albatross ( d ) are considered to be two different categories in classification . The two albatrosses are similar in appearance , and the differentiating of them is challenging due to the subtle traits that characterize the different species are not straightforward . We conducted comparison experiments on two “ complex ” data sets ( Places365 and CUB-200-2011 ) and one “ simple ” data set . The results are shown in Table 3 . Using the benchmark ResNet-50 as the backbones , we observed that on CUB-200-2011 , the relative top -1 accuracy increased by 1.81 % when doubling the width and dropped 4.28 % when we narrowed the width to half of the original . This performance change caused by altering the width is much acute compared to the result on Place365 ( 0.94 % and 1.11 % , doubling and halving the width respectively ) under the same settings , which demonstrated that a wider network is able to effectively enhance the recognition of “ complex ” fine-grained features . This result does not agree with our first hypothesis : if the performance difference is originated from the complexity of the data , we should observe a moderate performance change on CUB-200-2011 data set along with the changing of network width . The results proved that the performance variance on different data set is not the consequence of the complexity ( rich fine-grained details ) of the data . | This work raises an interesting concern about the data type used in the validation of CNN architectures being a critical component in the design decisions of these architectures. The authors perform and present a study to analyze if commonly used design strategies (deeper and wider CNNs bring benefits in performance) apply similarly regardless of the type of data used (in particular, the study is focused on object-centric image classification, validated with the ImageNet benchmark, vs scene image classification, i.e. scene recognition, validated with the Places365 benchmark). The presented study concludes the authors hypothesis that the scene-recognition task has different requirements. It needs more focus on spatial features than object-centric image classification, and the authors propose an alternative CNN architecture design, narrower and with a novel pooling strategy to preserve spatial information, which achieves similar performance than baseline networks with much less computational resources. | SP:5e3879dc0b7de7c22dae13eed23d42b6f2f192a3 |
Data-oriented Scene Recognition | 1 INTRODUCTION . Since the development of AlexNet ( Krizhevsky et al. , 2012 ) , a number of variations of deep Convolutional Neural Networks ( CNNs ) emerged . Motivated by the success of studies ( Simonyan & Zisserman , 2015 ; Szegedy et al. , 2016 ; He et al. , 2016a ) , the networks become deeper by adding more convolutional layers to improve performance for the targeted problems . On the other hand , arguments on the benefits of increasing network width gained support from researchers . Zagoruyko et al . ( Zagoruyko & Komodakis , 2016 ) presented wider deep residual networks that significantly improve the performance over ResNet ( He et al. , 2016a ) . The wider deep network achieved state-ofthe-art performance on ImageNet ( Deng et al. , 2009 ) and CIFAR ( Krizhevsky et al. , 2009 ) , showing consistently better accuracy than its ResNet counterparts . Xie et al . ( Xie et al. , 2017 ) proposed a multi-branch architecture called ResNeXt by widening the residual blocks and cooperating group convolution . In contrast to ResNet , ResNeXt ( Xie et al. , 2017 ) demonstrated a performance boost on a larger ImageNet-5K set and the COCO object detection dataset ( Lin et al. , 2014 ) . ResNeSt ( Zhang et al. , 2020 ) preserved the wider network layout and multi-branch strategy and introduced a modulated architecture to improve the feature learning process . The proposed ResNeSt networks further improved the performance on the ImageNet dataset . Despite the benefits brought by increased depth and width ( i.e. , number of channels ) , side effects such as vanishing gradient and requirement of large number of training examples make it difficult to employ a deep network for learning from complex scenery images . Is a deeper network more suitable for extracting features from scenery images for better understanding complex views ? Or shall we employ more channels to achieve improved performance ? To answer these questions , we need to have a better understanding of the functions of network layers and channels . A number of studies have been conducted in the past years . Lu et al . ( Lu et al. , 2017 ) argued that an integration of both depth and width provides a better understanding of the expressive power of neural networks . Tan and Le ( Tan & Le , 2019 ) showed that it is critical to balance the network depth and width by maintaining a constant depth/width ratio and demonstrated the effectiveness of their approach on ResNet and MobileNet . Besides manually designed networks , deep Neural Architecture Search were proposed to optimize the network depth and width ( Zoph & Le , 2017 ; Guo et al. , 2020 ) . However , most methods , if not all , were developed and evaluated using ImageNet ( Deng et al. , 2009 ) and CIFAR ( Krizhevsky et al. , 2009 ) . These data sets commonly depict an object near the center of the image , and the label tells what the object is . That is , such an image is mostly dominated by one object and , hence , is referred to as “ object-centric ” . On the other hand , a scene image presents a complex view consists of multiple objects and background clutters . This inadvertent data bias could potentially lead to the ignorance of the characteristics of different data . The features that are crucial for object recognition dominantly affect the design of the CNNs . Deep networks with more layers use a variety of receptive fields to extract distinctive scale features whereas networks with more channels capture fine-grained patterns ( Tan & Le , 2019 ) . However , in many applications , both types of information that are crucial for accurately recognizing an image , but the prominence difference between them is seldom explored . This paper attempts to bring out a new perspective on neural network design : the data itself has the preference . Learning the overall spatial layout is crucial to recognize the entire scene , thus scene recognition favors the networks that can better learn the spatial information . For the object-centric images , typical examples only consist of one single object , the spatial layout does not contribute much to the semantic meaning of the image . As the differences between certain object categories are subtle , the detailed patterns and textures of objects are likely to be more representative . The networks that emphasize learning various features can better fit the requirement of object recognition tasks . By considering the distinct characteristics of scene images , our hypothesis is that for scene recognition , learning spatial-wise information improves the performance of CNNs in a more effective manner compared to learning channel-wise information . To evaluate this hypothesis , we conducted comprehensive experiments and our results show scene images gain clear benefits from deepening the network , and the performance change caused by altering the width is marginal . We further proposed a Deep-Narrow Network , which increases the depth of the network as well as decreased the width of the network . We design a Lossless Pooling component and use it in our Deep-Narrow Network to extract spatial features . 2 RELATED WORK . Deep Networks Network depth has played an integral role in the success of CNNs . With the increase of depth , the network can better approximate the target function with richer feature hierarchies , which enables the boost of performance . The success of VGGNet ( Simonyan & Zisserman , 2015 ) and Inception ( Szegedy et al. , 2015 ; 2016 ; 2017 ) on ILSVRC competition further reinforced the significance of the depth . ResNet ( He et al. , 2016b ) , which is a continuance work of deeper networks , revolutionized the possible depth of deep networks by introducing the concept of residual learning and identity mapping into CNNs . ResNet ’ s effective methodology enables the network to be extremely deep and demonstrated improved performance in image recognition tasks . Wide Networks Network width has also been suggested as an essential parameter in the design of deep networks . Wide ResNet ( Zagoruyko & Komodakis , 2016 ) introduced an additional factor to control the width of the ResNet . The experimental results showed that the widening of the network might provide a more effective way to improve performance compared to making ResNet deeper . Xception ( Chollet , 2017 ) can be considered as an extreme Inception architecture , which exploits the idea of depth-wise separable convolution . Xception modified the original inception block by making it wider . This wider structure has also demonstrated improved performance . ResNeXt ( Xie et al. , 2017 ) introduced a new term : cardinality to increase the width of ResNet and won the 2016 ILSVRC classification task . With the success of ResNeXt , it is widely accepted that widen the deep network is an effective way to boost model performance . A most recent wider network : ResNeSt ( Zhang et al. , 2020 ) preserved the wide architecture of ResNeXt and achieved superior performance on image and object recognition tasks . Effects of Depth and Width Although depth and width are proven to be essential parameters in network architecture design , the effect of depth and width , i.e. , what do deep and wide networks learn remains seldom explored . Most of the existing literature focus on the effect of width and depth separately or the trade-off between depth and width in the network design ( Lu et al. , 2017 ) . Tan and Le ( Tan & Le , 2019 ) claimed that deep networks can make use of a larger receptive field while wide networks can better capture fine-grained features . Nguyen et al . ( Nguyen et al. , 2021 ) explored the effects of width and depth and found a characteristic structure named block structure . They demonstrated that for different models , the block structure is unique , but the representations outside the block structure trends to be similar despite the setting of depth and width . In our paper , we analyze the effect of depth and width in CNNs from the perspective of image characteristics . 3 EXPERIMENTAL STUDY . 3.1 DATA SETS AND EXPERIMENTAL SETTINGS . To understand the impact of network structure to the data set and ultimately the applications , we use ImageNet 2012 ( Deng et al. , 2009 ) and Places Standard dataset ( Zhou et al. , 2017 ) as our evaluation data sets . ImageNet 2012 is the benchmark object recognition data set that consists of 1,000 classes and 1.28 million training images . An image in ImageNet 2012 usually contains a single object that is highly distinctive from the background . Place365 Standard dataset is designed for scene recognition and contains 1.8 million training images of 365 classes . The images in Places365 Standard datasets present more complex scenery images . We train deep network models and compute the single-crop ( 224 × 224 pixels ) top-1 and top-5 accuracy based on the application of the models to the validation set . We train each model for 100 epochs on eight Tesla V100 GPUs with 32 images per GPU ( the batch size is 256 ) . All models are trained using synchronous SGD ( Stochastic Gradient Descent ) with a Nesterov momentum of 0.9 and a weight decay of 0.0001 . The learning rate is set to 0.1 and is reduced by a factor of 10 in every 30 epochs . In the training of ResNet and its variants , we follow the settings in ( He et al. , 2016b ) . 3.2 COMPARISON ON DIFFERENT DATA SETS . We conducted our comparison study using ResNet and its variants on Places365 and ImageNet data sets . The results are reported in Tables 1 ( varying network depth ) and 2 ( varying network width ) . By increasing the network depth from 50 to 101 , i.e. , ResNet-50 and ResNet-101 , we obtained a performance improvement of 1.40 % and 2.32 % on Place365 and ImageNet data sets in terms of Top-1 accuracy . Theoretically , if the widening of the network is more effective to improve the performance as stated in the previous literature , we should expect more accuracy increase when we double the width of the networks . However , doubling the width leads to a top-1 accuracy increase of 3.28 % on ImageNet , but only 0.94 % on Place365 . More surprisingly , for ResNeXt , which also doubled the network width , the relative performance increase on ImageNet is 2.34 % in terms of top-1 accuracy , but the number is only 0.14 % on Place365 . The trend that the model performance on ImageNet is more sensitive to width change compared with Place365 is also true when we decrease network depth or narrow down the width . When the network depth decreased from 50 to 18 , ImageNet suffered a 7.23 % relative top-1 accuracy decrease , and for Place365 it is 2.71 % . , that is , the top-1 performance drop on ImageNet is around 2.7 times of the top-1 performance drop on Places . But when we decreased the width of ResNet-50 to half of the original size , the number changed to 4.7 . The statement that widening of the network might provide a more effective way to improve performance is biased towards ImageNet ( object-centric data ) and ignores the characteristics of scenery images . 4 ANALYSIS OF THE IMPACT OF DEPTH AND WIDTH OF DEEP NETWORKS . 4.1 COMPLEXITY OF IMAGES . Our first hypothesis is the performance difference is caused by the complexity of scenery images . This hypothesis is aroused by the distinct complexity difference between scene images and object- centric images : object-centric images always only contain one major object which occupies a large portion of the view , scene images always consist of multiple objects and background clutters . Figure 1 shows two samples from benchmark object-centric data set ( ImageNet ) and benchmark scene data set ( Place365 ) , respectively . Figure 1 ( a ) is labeled as “ bald eagle ” , in which the eagle stands in the center of the view and occupies a large portion of the entire image ; figure 1 ( b ) is labeled as “ forest-broadleaf ” , the entire view consists of not only a bird but also tree branches and leaves . As the correct recognition of scenery images relies on multiple components , a scene image is typically considered more complex than an object-centric image . To evaluate this hypothesis , we introduced another data set that is also widely believed to be “ complex ” : the fine-grained image classification data set . Fine-grained classification is considered to be a more complex task as the classes in the data set can only be discriminated by local and subtle differences . CUB-200-2011 is a data set consists of 200 different species of birds , which serves as a benchmark data set for fine-grained classification tasks . Figure 1 shows two samples in the CUB200-2011 data set . In Figure 1 , black-footed albatross ( c ) and sooty albatross ( d ) are considered to be two different categories in classification . The two albatrosses are similar in appearance , and the differentiating of them is challenging due to the subtle traits that characterize the different species are not straightforward . We conducted comparison experiments on two “ complex ” data sets ( Places365 and CUB-200-2011 ) and one “ simple ” data set . The results are shown in Table 3 . Using the benchmark ResNet-50 as the backbones , we observed that on CUB-200-2011 , the relative top -1 accuracy increased by 1.81 % when doubling the width and dropped 4.28 % when we narrowed the width to half of the original . This performance change caused by altering the width is much acute compared to the result on Place365 ( 0.94 % and 1.11 % , doubling and halving the width respectively ) under the same settings , which demonstrated that a wider network is able to effectively enhance the recognition of “ complex ” fine-grained features . This result does not agree with our first hypothesis : if the performance difference is originated from the complexity of the data , we should observe a moderate performance change on CUB-200-2011 data set along with the changing of network width . The results proved that the performance variance on different data set is not the consequence of the complexity ( rich fine-grained details ) of the data . | The paper describes experiments with networks with different depth and width in object-centred datasets (ImageNet), scene datasets (Places), fine-grained (CUB). The authors claim to have found empirical evidence in favour of having deep and width adjusted to the dataset. Also, a lossless pooling module is presented. | SP:5e3879dc0b7de7c22dae13eed23d42b6f2f192a3 |
Decision boundary variability and generalization in neural networks | This paper discovers that the neural network with lower decision boundary ( DB ) variability has better generalizability . Two new notions , algorithm DB variability and ( , η ) -data DB variability , are proposed to measure the decision boundary variability from the algorithm and data perspectives . Extensive experiments show significant negative correlations between the decision boundary variability and the generalizability . From the theoretical view , two lower bounds based on algorithm DB variability are proposed and do not explicity depend on the sample size . By Chebyshev ’ s inequality , we also prove two upper bounds of O ( √ AV ( fQ , D ) /m ( k − 1 ) ) and O ( 1√ m + + η log 1η ) based on algorithm and data DB variability , respectively . The algorithm DB variability upper bound is easier to calculate in practice , while the data DB variability upper bound relies on less assumptions . Moreover , the bounds do not explicitly depend on the network size , which is usually prohibitively large in deep learning . 1 INTRODUCTION . Neural networks ( NNs ) have achieved significant success in vast applications ( Krizhevsky et al. , 2012 ; Vaswani et al. , 2017 ) . However , the advance of NNs is arduous to be characterized by canonical statistical hypothesis complexity , such as VC-dimension ( Vapnik et al. , 1994 ) or Rademacher complexity ( Bartlett & Mendelson , 2002 ) . Considering the intimate connection between low variance and significant performance in learning theory , we investigate decision boundaries ( DBs ) from the perspective of variability in this paper . For neural networks , the decision boundary variability is largely caused by ( 1 ) the randomness from the training algorithm , and ( 2 ) the training data . In this paper , they are measured by two new terms , algorithm DB variability and ( , η ) -data DB variability , and networks with lower DB variability are proved to possess better generalization performance . Algorithm DB variability measures the variability of DBs in different training repeats , and extensive experiments are conducted on CIFAR-10 , and CIFAR-100 ( Krizhevsky & Hinton , 2009 ) datasets to explore the factors influence algorithm DB variability . We visualize the trend of the algorithm DB variability with respect to ( w.r.t . ) different training strategies , training time , sample sizes , and label noise . The empirical results present the negative correlation between algorithm DB variability and the test accuracy in all scenarios , which suggests that the algorithm DB variability largely indicates the generalization of neural networks . From the theoretical view , two lower bounds and an upper bound of the generalization error are proved based on the algorithm DB variability . The upper bound has a rate of O ( √ AV ( fQ , D ) /m ( k − 1 ) ) , where AV ( fQ , D ) is the algorithm DB variability for fQ on data generating distribution D , m is the sample size , and k is the number of classes . To present how the training data influences the decision boundary variability , the ( , η ) -data DB variability is introduced by employing the η-subset to reconstruct decision boundaries with error ( see Definition 5.1 ) . If a decision boundary can be reconstructed by training on a smaller η-subset with a smaller reconstruction error , the decision boundary possesses smaller data DB variability . Moreover , an η- curve can be drawn by varying the value of η and numerically evaluating the label mismatch rate . The area under the η- curve could be a more elaborate indicator for the generalization of NNs because the curve contains richer information than the algorithm DB variability . An O ( 1√ m + + η log 1η ) generalization bound based on the ( , η ) -data DB variability is established theoretically to enhance the relationship between the generalization of NNs and DB variability . Compared to the algorithm DB variability upper bound , the data DB variability bound does not depend on additional Assumption 2 , while the algorithm DB variability is easier to calculate than data DB variability in practice . Moreover , in contrast to many existing generalization bounds based on hypothesis complexity ( Bartlett et al. , 2019 ; Golowich et al. , 2018 ; Bartlett et al. , 2017 ) that require access to the network weight , our generalization bounds based on DB variability only demand the network predictions and thus have advantages in empirically approximating the generalization bound in ( 1 ) black-model settings , where model parameters are unavailable ; and ( 2 ) over-parameterized settings , where calculating the weight norm is of prohibitively high computing burden . 2 RELATED WORKS . Deep learning theory . Due to the bias-variance trade-off , model complexity faces a dilemma in conventional wisdom ( Mohri et al. , 2018 ) . Recently , Zhang et al . ( 2021 ) reveal the surprising ability of neural networks in fitting noise , but the networks still have impressive generalization performance in practice . This gap between the well-known bias-variance trade-off and the universal approximation ability for NNs draws attention to numerous researchers ( Belkin et al. , 2019 ; Nakkiran et al. , 2019 ) . Many works attribute the success of NNs to the effectiveness of the stochastic gradient descent ( SGD ) algorithm ( Bottou , 2010 ; Hardt et al. , 2016 ; Jin et al. , 2017 ) . Some empirical studies also explain the decent performance of networks by uncovering their learning properties ( Nakkiran et al. , 2020 ; Jiang et al. , 2021 ; He et al. , 2021 ) . For instance , neural networks tend to fit the low-frequency information first ( Rahaman et al. , 2019 ; Xu et al. , 2019 ) and gradually learn a more complex function ( Kalimeris et al. , 2019 ) during the training procedure . Decision boundaries and generalization . Recent studies attempt to understand neural networks from the aspect of decision boundaries ( He et al. , 2018 ; Karimi et al. , 2019 ) . Guan & Loew ( 2020 ) empirically show the negative correlation between the complexity of decision boundary and generalization performance . Mickisch et al . ( 2020 ) reveal the phenomenon that the distance from data to decision boundaries continuously decreases during the training procedure . More recently , researchers find that NNs only rely on the most discriminative or simplest features to construct the DBs ( Ortiz-Jimenez et al. , 2020 ; Shah et al. , 2020 ) . Instead , our approach is different from these former methods by considering decision boundary variability , which is empirically and theoretically shown to closely correlate with the generalization in neural networks . Adversarial training and generalization . It has been shown that the adversarial examples , which are created by adding non-perceivable perturbation on the input data , can completely mislead the NNs ( Szegedy et al. , 2013 ; Goodfellow et al. , 2014 ) . To tackle this problem , adversarial training is proposed to improve the robustness of the NNs through continuous training on adversarial examples ( Madry et al. , 2017 ) . Nevertheless , Su et al . ( 2018 ) and Zhang et al . ( 2019 ) show a trade-off between the robustness and the generalization performance of NNs . 3 PRELIMINARIES . We denote the training set by S = { ( xi , yi ) , i = 1 , . . . , m } , where xi ∈ Rn , n is the dimension of input data , yi ∈ { 1 , . . . , k } , k is the number of classes , and m = |S| is the training sample size . We assume that ( xi , yi ) are independent and identically distributed ( i.i.d . ) random variables drawn from the data generating distribution D. Denote the classifier as fθ ( x ) : Rn → Rk , which is a neural network parameterized by θ . The output of fθ ( x ) is a k-dimensional vector and is assumed to be a discrete probability density function . Let f ( i ) θ ( x ) be the i-th component of fθ ( x ) , hence∑k i=1 f ( i ) θ ( x ) = 1 . We define T ( fθ , x ) = { i ∈ { 1 , · · · , k } |f ( i ) θ ( x ) = maxj f ( j ) θ ( x ) } to denote the set of predicted labels by fθ on x . Due to the randomness of the learning algorithm A , let Q ( θ ) = A ( S ) denote the posteriori distribution returned by the learning algorithm A leveraged on the training set S. Hence , we focus on the Gibbs classifier ( a.k.a . random classifier ) fQ = { fθ|θ ∼ Q } . 0− 1 loss is employed in this paper , and the expected risks in terms of θ and Q are defined as : RD ( θ ) = E ( x , y ) ∼D [ I ( y /∈ T ( fθ , x ) ) ] ( 1 ) and RD ( Q ) = E ( x , y ) ∼DEθ∼Q [ I ( y /∈ T ( fθ , x ) ) ] , ( 2 ) respectively . Here I ( · ) is the indicator function . Since the data generating distributionD is unknown , evaluating the expected risk RD is not practical . Therefore , it is a practical way to estimate the expected risk by the empirical riskRS , which is defined as : RS ( θ ) = E ( x , y ) ∼S [ I ( y /∈ T ( fθ , x ) ) ] = 1 m m∑ i=1 I ( yi /∈ T ( fθ , xi ) ) ( 3 ) RS ( Q ) = E ( x , y ) ∼SEθ∼Q [ I ( y /∈ T ( fθ , x ) ) ] = 1 m m∑ i=1 Eθ∼Q [ I ( yi /∈ T ( fθ , xi ) ) ] , ( 4 ) where ( xi , yi ) ∈ S and m = |S| . 3.1 DECISION BOUNDARY . If the output k-dimensional vector fθ ( x ) on the input example x has a tie , i.e. , the maximum value of the vector is not unique , then x is considered to locate on the decision boundary of fθ . With this idea , the decision boundary can be formally defined as below : Definition 3.1 ( decision boundary ) . Let fθ ( x ) : Rn → Rk be a classifier network parameterized by θ . Then the decision boundary of fθ is defined by { x ∈ Rn|∃i , j ∈ { 1 , · · · , k } , i 6= j , f ( i ) θ ( x ) = f ( j ) θ ( x ) = maxq f ( q ) θ ( x ) } ( 5 ) After defining the decision boundary , we have the following remark : Remark 1 . ( 1 ) If an input example ( x , y ) is not located on the decision boundary of fθ , T ( fθ , x ) is a singleton , and we have I ( y /∈ T ( fθ , x ) ) = I ( y 6= T ( fθ , x ) ) . ( 6 ) ( 2 ) If the input x is a boundary point , in practice , we randomly draw a label from the set T ( fθ , x ) as the prediction of fθ on x . | The authors introduce the notion of decision boundary (DB) variability and develop generalization bounds in terms of this. They consider two notions, that of 'algorithm DB variability' and 'epsilon-eta DB variability', the latter a generalization of the former. They show upper and lower bounds for the risk of classifiers in terms of DB variability under a variety of assumptions, as well as experimentally verify some of their claims. | SP:d3d5437e60981f716430ada218216cff260e60ad |
Decision boundary variability and generalization in neural networks | This paper discovers that the neural network with lower decision boundary ( DB ) variability has better generalizability . Two new notions , algorithm DB variability and ( , η ) -data DB variability , are proposed to measure the decision boundary variability from the algorithm and data perspectives . Extensive experiments show significant negative correlations between the decision boundary variability and the generalizability . From the theoretical view , two lower bounds based on algorithm DB variability are proposed and do not explicity depend on the sample size . By Chebyshev ’ s inequality , we also prove two upper bounds of O ( √ AV ( fQ , D ) /m ( k − 1 ) ) and O ( 1√ m + + η log 1η ) based on algorithm and data DB variability , respectively . The algorithm DB variability upper bound is easier to calculate in practice , while the data DB variability upper bound relies on less assumptions . Moreover , the bounds do not explicitly depend on the network size , which is usually prohibitively large in deep learning . 1 INTRODUCTION . Neural networks ( NNs ) have achieved significant success in vast applications ( Krizhevsky et al. , 2012 ; Vaswani et al. , 2017 ) . However , the advance of NNs is arduous to be characterized by canonical statistical hypothesis complexity , such as VC-dimension ( Vapnik et al. , 1994 ) or Rademacher complexity ( Bartlett & Mendelson , 2002 ) . Considering the intimate connection between low variance and significant performance in learning theory , we investigate decision boundaries ( DBs ) from the perspective of variability in this paper . For neural networks , the decision boundary variability is largely caused by ( 1 ) the randomness from the training algorithm , and ( 2 ) the training data . In this paper , they are measured by two new terms , algorithm DB variability and ( , η ) -data DB variability , and networks with lower DB variability are proved to possess better generalization performance . Algorithm DB variability measures the variability of DBs in different training repeats , and extensive experiments are conducted on CIFAR-10 , and CIFAR-100 ( Krizhevsky & Hinton , 2009 ) datasets to explore the factors influence algorithm DB variability . We visualize the trend of the algorithm DB variability with respect to ( w.r.t . ) different training strategies , training time , sample sizes , and label noise . The empirical results present the negative correlation between algorithm DB variability and the test accuracy in all scenarios , which suggests that the algorithm DB variability largely indicates the generalization of neural networks . From the theoretical view , two lower bounds and an upper bound of the generalization error are proved based on the algorithm DB variability . The upper bound has a rate of O ( √ AV ( fQ , D ) /m ( k − 1 ) ) , where AV ( fQ , D ) is the algorithm DB variability for fQ on data generating distribution D , m is the sample size , and k is the number of classes . To present how the training data influences the decision boundary variability , the ( , η ) -data DB variability is introduced by employing the η-subset to reconstruct decision boundaries with error ( see Definition 5.1 ) . If a decision boundary can be reconstructed by training on a smaller η-subset with a smaller reconstruction error , the decision boundary possesses smaller data DB variability . Moreover , an η- curve can be drawn by varying the value of η and numerically evaluating the label mismatch rate . The area under the η- curve could be a more elaborate indicator for the generalization of NNs because the curve contains richer information than the algorithm DB variability . An O ( 1√ m + + η log 1η ) generalization bound based on the ( , η ) -data DB variability is established theoretically to enhance the relationship between the generalization of NNs and DB variability . Compared to the algorithm DB variability upper bound , the data DB variability bound does not depend on additional Assumption 2 , while the algorithm DB variability is easier to calculate than data DB variability in practice . Moreover , in contrast to many existing generalization bounds based on hypothesis complexity ( Bartlett et al. , 2019 ; Golowich et al. , 2018 ; Bartlett et al. , 2017 ) that require access to the network weight , our generalization bounds based on DB variability only demand the network predictions and thus have advantages in empirically approximating the generalization bound in ( 1 ) black-model settings , where model parameters are unavailable ; and ( 2 ) over-parameterized settings , where calculating the weight norm is of prohibitively high computing burden . 2 RELATED WORKS . Deep learning theory . Due to the bias-variance trade-off , model complexity faces a dilemma in conventional wisdom ( Mohri et al. , 2018 ) . Recently , Zhang et al . ( 2021 ) reveal the surprising ability of neural networks in fitting noise , but the networks still have impressive generalization performance in practice . This gap between the well-known bias-variance trade-off and the universal approximation ability for NNs draws attention to numerous researchers ( Belkin et al. , 2019 ; Nakkiran et al. , 2019 ) . Many works attribute the success of NNs to the effectiveness of the stochastic gradient descent ( SGD ) algorithm ( Bottou , 2010 ; Hardt et al. , 2016 ; Jin et al. , 2017 ) . Some empirical studies also explain the decent performance of networks by uncovering their learning properties ( Nakkiran et al. , 2020 ; Jiang et al. , 2021 ; He et al. , 2021 ) . For instance , neural networks tend to fit the low-frequency information first ( Rahaman et al. , 2019 ; Xu et al. , 2019 ) and gradually learn a more complex function ( Kalimeris et al. , 2019 ) during the training procedure . Decision boundaries and generalization . Recent studies attempt to understand neural networks from the aspect of decision boundaries ( He et al. , 2018 ; Karimi et al. , 2019 ) . Guan & Loew ( 2020 ) empirically show the negative correlation between the complexity of decision boundary and generalization performance . Mickisch et al . ( 2020 ) reveal the phenomenon that the distance from data to decision boundaries continuously decreases during the training procedure . More recently , researchers find that NNs only rely on the most discriminative or simplest features to construct the DBs ( Ortiz-Jimenez et al. , 2020 ; Shah et al. , 2020 ) . Instead , our approach is different from these former methods by considering decision boundary variability , which is empirically and theoretically shown to closely correlate with the generalization in neural networks . Adversarial training and generalization . It has been shown that the adversarial examples , which are created by adding non-perceivable perturbation on the input data , can completely mislead the NNs ( Szegedy et al. , 2013 ; Goodfellow et al. , 2014 ) . To tackle this problem , adversarial training is proposed to improve the robustness of the NNs through continuous training on adversarial examples ( Madry et al. , 2017 ) . Nevertheless , Su et al . ( 2018 ) and Zhang et al . ( 2019 ) show a trade-off between the robustness and the generalization performance of NNs . 3 PRELIMINARIES . We denote the training set by S = { ( xi , yi ) , i = 1 , . . . , m } , where xi ∈ Rn , n is the dimension of input data , yi ∈ { 1 , . . . , k } , k is the number of classes , and m = |S| is the training sample size . We assume that ( xi , yi ) are independent and identically distributed ( i.i.d . ) random variables drawn from the data generating distribution D. Denote the classifier as fθ ( x ) : Rn → Rk , which is a neural network parameterized by θ . The output of fθ ( x ) is a k-dimensional vector and is assumed to be a discrete probability density function . Let f ( i ) θ ( x ) be the i-th component of fθ ( x ) , hence∑k i=1 f ( i ) θ ( x ) = 1 . We define T ( fθ , x ) = { i ∈ { 1 , · · · , k } |f ( i ) θ ( x ) = maxj f ( j ) θ ( x ) } to denote the set of predicted labels by fθ on x . Due to the randomness of the learning algorithm A , let Q ( θ ) = A ( S ) denote the posteriori distribution returned by the learning algorithm A leveraged on the training set S. Hence , we focus on the Gibbs classifier ( a.k.a . random classifier ) fQ = { fθ|θ ∼ Q } . 0− 1 loss is employed in this paper , and the expected risks in terms of θ and Q are defined as : RD ( θ ) = E ( x , y ) ∼D [ I ( y /∈ T ( fθ , x ) ) ] ( 1 ) and RD ( Q ) = E ( x , y ) ∼DEθ∼Q [ I ( y /∈ T ( fθ , x ) ) ] , ( 2 ) respectively . Here I ( · ) is the indicator function . Since the data generating distributionD is unknown , evaluating the expected risk RD is not practical . Therefore , it is a practical way to estimate the expected risk by the empirical riskRS , which is defined as : RS ( θ ) = E ( x , y ) ∼S [ I ( y /∈ T ( fθ , x ) ) ] = 1 m m∑ i=1 I ( yi /∈ T ( fθ , xi ) ) ( 3 ) RS ( Q ) = E ( x , y ) ∼SEθ∼Q [ I ( y /∈ T ( fθ , x ) ) ] = 1 m m∑ i=1 Eθ∼Q [ I ( yi /∈ T ( fθ , xi ) ) ] , ( 4 ) where ( xi , yi ) ∈ S and m = |S| . 3.1 DECISION BOUNDARY . If the output k-dimensional vector fθ ( x ) on the input example x has a tie , i.e. , the maximum value of the vector is not unique , then x is considered to locate on the decision boundary of fθ . With this idea , the decision boundary can be formally defined as below : Definition 3.1 ( decision boundary ) . Let fθ ( x ) : Rn → Rk be a classifier network parameterized by θ . Then the decision boundary of fθ is defined by { x ∈ Rn|∃i , j ∈ { 1 , · · · , k } , i 6= j , f ( i ) θ ( x ) = f ( j ) θ ( x ) = maxq f ( q ) θ ( x ) } ( 5 ) After defining the decision boundary , we have the following remark : Remark 1 . ( 1 ) If an input example ( x , y ) is not located on the decision boundary of fθ , T ( fθ , x ) is a singleton , and we have I ( y /∈ T ( fθ , x ) ) = I ( y 6= T ( fθ , x ) ) . ( 6 ) ( 2 ) If the input x is a boundary point , in practice , we randomly draw a label from the set T ( fθ , x ) as the prediction of fθ on x . | This paper studies that the smaller variability of prediction can provide a better generalization in empirical and theoretical foundations. Considered examples and theories are solid, and the intensive studies reveal the relationship (correlation not causation) between the variability of prediction and generalization. The paper considers two types of variability with respect to algorithm and training data. In any case, lower variability ensures higher performance in generalization. | SP:d3d5437e60981f716430ada218216cff260e60ad |
Decision boundary variability and generalization in neural networks | This paper discovers that the neural network with lower decision boundary ( DB ) variability has better generalizability . Two new notions , algorithm DB variability and ( , η ) -data DB variability , are proposed to measure the decision boundary variability from the algorithm and data perspectives . Extensive experiments show significant negative correlations between the decision boundary variability and the generalizability . From the theoretical view , two lower bounds based on algorithm DB variability are proposed and do not explicity depend on the sample size . By Chebyshev ’ s inequality , we also prove two upper bounds of O ( √ AV ( fQ , D ) /m ( k − 1 ) ) and O ( 1√ m + + η log 1η ) based on algorithm and data DB variability , respectively . The algorithm DB variability upper bound is easier to calculate in practice , while the data DB variability upper bound relies on less assumptions . Moreover , the bounds do not explicitly depend on the network size , which is usually prohibitively large in deep learning . 1 INTRODUCTION . Neural networks ( NNs ) have achieved significant success in vast applications ( Krizhevsky et al. , 2012 ; Vaswani et al. , 2017 ) . However , the advance of NNs is arduous to be characterized by canonical statistical hypothesis complexity , such as VC-dimension ( Vapnik et al. , 1994 ) or Rademacher complexity ( Bartlett & Mendelson , 2002 ) . Considering the intimate connection between low variance and significant performance in learning theory , we investigate decision boundaries ( DBs ) from the perspective of variability in this paper . For neural networks , the decision boundary variability is largely caused by ( 1 ) the randomness from the training algorithm , and ( 2 ) the training data . In this paper , they are measured by two new terms , algorithm DB variability and ( , η ) -data DB variability , and networks with lower DB variability are proved to possess better generalization performance . Algorithm DB variability measures the variability of DBs in different training repeats , and extensive experiments are conducted on CIFAR-10 , and CIFAR-100 ( Krizhevsky & Hinton , 2009 ) datasets to explore the factors influence algorithm DB variability . We visualize the trend of the algorithm DB variability with respect to ( w.r.t . ) different training strategies , training time , sample sizes , and label noise . The empirical results present the negative correlation between algorithm DB variability and the test accuracy in all scenarios , which suggests that the algorithm DB variability largely indicates the generalization of neural networks . From the theoretical view , two lower bounds and an upper bound of the generalization error are proved based on the algorithm DB variability . The upper bound has a rate of O ( √ AV ( fQ , D ) /m ( k − 1 ) ) , where AV ( fQ , D ) is the algorithm DB variability for fQ on data generating distribution D , m is the sample size , and k is the number of classes . To present how the training data influences the decision boundary variability , the ( , η ) -data DB variability is introduced by employing the η-subset to reconstruct decision boundaries with error ( see Definition 5.1 ) . If a decision boundary can be reconstructed by training on a smaller η-subset with a smaller reconstruction error , the decision boundary possesses smaller data DB variability . Moreover , an η- curve can be drawn by varying the value of η and numerically evaluating the label mismatch rate . The area under the η- curve could be a more elaborate indicator for the generalization of NNs because the curve contains richer information than the algorithm DB variability . An O ( 1√ m + + η log 1η ) generalization bound based on the ( , η ) -data DB variability is established theoretically to enhance the relationship between the generalization of NNs and DB variability . Compared to the algorithm DB variability upper bound , the data DB variability bound does not depend on additional Assumption 2 , while the algorithm DB variability is easier to calculate than data DB variability in practice . Moreover , in contrast to many existing generalization bounds based on hypothesis complexity ( Bartlett et al. , 2019 ; Golowich et al. , 2018 ; Bartlett et al. , 2017 ) that require access to the network weight , our generalization bounds based on DB variability only demand the network predictions and thus have advantages in empirically approximating the generalization bound in ( 1 ) black-model settings , where model parameters are unavailable ; and ( 2 ) over-parameterized settings , where calculating the weight norm is of prohibitively high computing burden . 2 RELATED WORKS . Deep learning theory . Due to the bias-variance trade-off , model complexity faces a dilemma in conventional wisdom ( Mohri et al. , 2018 ) . Recently , Zhang et al . ( 2021 ) reveal the surprising ability of neural networks in fitting noise , but the networks still have impressive generalization performance in practice . This gap between the well-known bias-variance trade-off and the universal approximation ability for NNs draws attention to numerous researchers ( Belkin et al. , 2019 ; Nakkiran et al. , 2019 ) . Many works attribute the success of NNs to the effectiveness of the stochastic gradient descent ( SGD ) algorithm ( Bottou , 2010 ; Hardt et al. , 2016 ; Jin et al. , 2017 ) . Some empirical studies also explain the decent performance of networks by uncovering their learning properties ( Nakkiran et al. , 2020 ; Jiang et al. , 2021 ; He et al. , 2021 ) . For instance , neural networks tend to fit the low-frequency information first ( Rahaman et al. , 2019 ; Xu et al. , 2019 ) and gradually learn a more complex function ( Kalimeris et al. , 2019 ) during the training procedure . Decision boundaries and generalization . Recent studies attempt to understand neural networks from the aspect of decision boundaries ( He et al. , 2018 ; Karimi et al. , 2019 ) . Guan & Loew ( 2020 ) empirically show the negative correlation between the complexity of decision boundary and generalization performance . Mickisch et al . ( 2020 ) reveal the phenomenon that the distance from data to decision boundaries continuously decreases during the training procedure . More recently , researchers find that NNs only rely on the most discriminative or simplest features to construct the DBs ( Ortiz-Jimenez et al. , 2020 ; Shah et al. , 2020 ) . Instead , our approach is different from these former methods by considering decision boundary variability , which is empirically and theoretically shown to closely correlate with the generalization in neural networks . Adversarial training and generalization . It has been shown that the adversarial examples , which are created by adding non-perceivable perturbation on the input data , can completely mislead the NNs ( Szegedy et al. , 2013 ; Goodfellow et al. , 2014 ) . To tackle this problem , adversarial training is proposed to improve the robustness of the NNs through continuous training on adversarial examples ( Madry et al. , 2017 ) . Nevertheless , Su et al . ( 2018 ) and Zhang et al . ( 2019 ) show a trade-off between the robustness and the generalization performance of NNs . 3 PRELIMINARIES . We denote the training set by S = { ( xi , yi ) , i = 1 , . . . , m } , where xi ∈ Rn , n is the dimension of input data , yi ∈ { 1 , . . . , k } , k is the number of classes , and m = |S| is the training sample size . We assume that ( xi , yi ) are independent and identically distributed ( i.i.d . ) random variables drawn from the data generating distribution D. Denote the classifier as fθ ( x ) : Rn → Rk , which is a neural network parameterized by θ . The output of fθ ( x ) is a k-dimensional vector and is assumed to be a discrete probability density function . Let f ( i ) θ ( x ) be the i-th component of fθ ( x ) , hence∑k i=1 f ( i ) θ ( x ) = 1 . We define T ( fθ , x ) = { i ∈ { 1 , · · · , k } |f ( i ) θ ( x ) = maxj f ( j ) θ ( x ) } to denote the set of predicted labels by fθ on x . Due to the randomness of the learning algorithm A , let Q ( θ ) = A ( S ) denote the posteriori distribution returned by the learning algorithm A leveraged on the training set S. Hence , we focus on the Gibbs classifier ( a.k.a . random classifier ) fQ = { fθ|θ ∼ Q } . 0− 1 loss is employed in this paper , and the expected risks in terms of θ and Q are defined as : RD ( θ ) = E ( x , y ) ∼D [ I ( y /∈ T ( fθ , x ) ) ] ( 1 ) and RD ( Q ) = E ( x , y ) ∼DEθ∼Q [ I ( y /∈ T ( fθ , x ) ) ] , ( 2 ) respectively . Here I ( · ) is the indicator function . Since the data generating distributionD is unknown , evaluating the expected risk RD is not practical . Therefore , it is a practical way to estimate the expected risk by the empirical riskRS , which is defined as : RS ( θ ) = E ( x , y ) ∼S [ I ( y /∈ T ( fθ , x ) ) ] = 1 m m∑ i=1 I ( yi /∈ T ( fθ , xi ) ) ( 3 ) RS ( Q ) = E ( x , y ) ∼SEθ∼Q [ I ( y /∈ T ( fθ , x ) ) ] = 1 m m∑ i=1 Eθ∼Q [ I ( yi /∈ T ( fθ , xi ) ) ] , ( 4 ) where ( xi , yi ) ∈ S and m = |S| . 3.1 DECISION BOUNDARY . If the output k-dimensional vector fθ ( x ) on the input example x has a tie , i.e. , the maximum value of the vector is not unique , then x is considered to locate on the decision boundary of fθ . With this idea , the decision boundary can be formally defined as below : Definition 3.1 ( decision boundary ) . Let fθ ( x ) : Rn → Rk be a classifier network parameterized by θ . Then the decision boundary of fθ is defined by { x ∈ Rn|∃i , j ∈ { 1 , · · · , k } , i 6= j , f ( i ) θ ( x ) = f ( j ) θ ( x ) = maxq f ( q ) θ ( x ) } ( 5 ) After defining the decision boundary , we have the following remark : Remark 1 . ( 1 ) If an input example ( x , y ) is not located on the decision boundary of fθ , T ( fθ , x ) is a singleton , and we have I ( y /∈ T ( fθ , x ) ) = I ( y 6= T ( fθ , x ) ) . ( 6 ) ( 2 ) If the input x is a boundary point , in practice , we randomly draw a label from the set T ( fθ , x ) as the prediction of fθ on x . | Decision boundary variability is measured in two ways. One method depends on the algorithm, or the random seed and reflects how much the boundaries change wen retraining the same network on the same data. The other technique reflects the variability across different amounts of training data. Generalization bounds derived from these two quantities are presented. | SP:d3d5437e60981f716430ada218216cff260e60ad |
Steerable Partial Differential Operators for Equivariant Neural Networks | Recent work in equivariant deep learning bears strong similarities to physics . Fields over a base space are fundamental entities in both subjects , as are equivariant maps between these fields . In deep learning , however , these maps are usually defined by convolutions with a kernel , whereas they are partial differential operators ( PDOs ) in physics . Developing the theory of equivariant PDOs in the context of deep learning could bring these subjects even closer together and lead to a stronger flow of ideas . In this work , we derive a G-steerability constraint that completely characterizes when a PDO between feature vector fields is equivariant , for arbitrary symmetry groups G. We then fully solve this constraint for several important groups . We use our solutions as equivariant drop-in replacements for convolutional layers and benchmark them in that role . Finally , we develop a framework for equivariant maps based on Schwartz distributions that unifies classical convolutions and differential operators and gives insight about the relation between the two . 1 INTRODUCTION . In many machine learning tasks , the data exhibits certain symmetries , such as translation- and sometimes rotation-invariance in image classification . To exploit those symmetries , equivariant neural networks have been widely studied and successfully applied in the past years , beginning with Group convolutional neural networks ( Cohen & Welling , 2016 ; Weiler et al. , 2018b ) . A significant generalization of Group convolutional networks is given by steerable CNNs ( Cohen & Welling , 2017 ; Weiler et al. , 2018a ; Weiler & Cesa , 2019 ) , which unify many different pre-existing equivariant models ( Weiler & Cesa , 2019 ) . They do this by representing features as fields of feature vectors over a base space , such as R2 in the case of two-dimensional images . Layers are then linear equivariant maps between these fields . This is very reminiscent of physics . There , fields are used to model particles and their interactions , with physical space or spacetime as the base space . The maps between these fields are also equivariant , with the symmetries being part of fundamental physical laws . It is also noteworthy that these symmetries are largely ones that appear the most often in deep learning , such as translation and rotation equivariance . These similarities have already led to ideas from physics being applied in equivariant deep learning ( Lang & Weiler , 2021 ) . However , one remaining difference is that physics uses equivariant partial differential operators ( PDOs ) to define maps between fields , such as the gradient or Laplacian . Therefore , using PDOs instead of convolutions in deep learning would complete the analogy to physics and could lead to even more transfer of ideas between subjects . Equivariant PDO-based networks have already been designed in prior work ( Shen et al. , 2020 ; Smets et al. , 2020 ; Sharp et al. , 2020 ) . Most relevant for our work are PDO-eConvs ( Shen et al. , 2020 ) , which can be seen as the PDO-analogon of group convolutions . However , PDO-eConvs are only one instance of equivariant PDOs and do not cover the most common PDOs from physics , such as the gradient , divergence , etc . Very similarly to how steerable CNNs ( Cohen & Welling , 2017 ; Weiler et al. , 2018a ; Weiler & Cesa , 2019 ) generalize group convolutions , we generalize PDO-eConvs by characterizing the set of all translation equivariant PDOs between feature fields over Euclidean spaces . Because of this analogy , we dub these equivariant differential operators steerable PDOs . These steerable PDOs and their similarity to steerable CNNs also raise the question of how equivariant PDOs and kernels relate to each other , and whether they can be unified . We present a framework for equivariant maps that contains both steerable PDOs and convolutions with steerable kernels as special cases . We then prove that this framework defines the most general set of translation equivariant , linear , continuous maps between feature fields , complementing recent work ( Aronsson , 2021 ) that describes when equivariant maps are convolutions . Since formally developing this framework requires the theory of Schwartz distributions , we cover it mainly in Appendix E , and the main paper can be read without any knowledge of distributions . However , we reference the main results from this framework in the paper where appropriate . In order to make steerable PDOs practically applicable , we describe an approach to find complete bases for vector spaces of equivariant PDOs and then apply this method to the most important cases . We have also implemented steerable PDOs for all subgroups of O ( 2 ) ( see supplementary material for the code ) . Our code extends the E2CNN library1 ( Weiler & Cesa , 2019 ) , which will allow practitioners to easily use both steerable kernels and steerable PDOs within the same library , and even to combine both inside the same network . Finally , we test our approach empirically by comparing steerable PDOs to steerable CNNs . In particular , we benchmark different discretization methods for the numerical implementation . In summary , our main contributions are as follows : • We develop the theory of equivariant PDOs on Euclidean spaces , giving a practical characterization of precisely when a PDO is equivariant under any given symmetry . • We unify equivariant PDOs and kernels into one framework that provably contains all translation equivariant , linear , continuous maps between feature spaces . • We describe a method for finding bases of the vector spaces of equivariant PDOs , and provide explicit bases for many important cases . • We benchmark steerable PDOs using different discretization procedures and provide an implementation of steerable PDOs as an extension of the E2CNN library . 1.1 RELATED WORK . Equivariant convolutional networks Our approach to equivariance follows the one taken by steerable CNNs ( Cohen & Welling , 2017 ; Weiler et al. , 2018a ; Weiler & Cesa , 2019 ; Brandstetter et al. , 2021 ) . They represent each feature as a map from the base space , such as Rd , to a fiber Rc that is equipped with a representation ρ of the point group G. Compared to vanilla CNNs , which have fiber R , steerable CNNs thus extend the codomain of feature maps . A different approach is taken by group convolutional networks ( Cohen & Welling , 2016 ; Hoogeboom et al. , 2018 ; Weiler et al. , 2018b ) . They represent each feature as a map from a group H acting on the input space to R. Because the input to the network usually does not lie in H , this requires a lifting map from the input space to H . Compared to vanilla CNNs , group convolutional networks can thus be understood as extending the domain of feature maps . When H = Rd oG is the semidirect product of the translation group and a pointwise group G , then group convolutions on H are equivalent to G-steerable convolutions with regular representations . For finite G , the group convolution over G simply becomes a finite sum . LieConvs ( Finzi et al. , 2020 ) describe a way of implementing group convolutions even for infinite groups by using a Monte Carlo approximation for the convolution integral . Steerable CNNs with regular representations would have to use similar approximations for infinite groups , but they can instead also use ( non-regular ) finite-dimensional representations . Both the group convolutional and the steerable approach can be applied to non-Euclidean input spaces—LieConvs define group convolutions on arbitrary Lie groups and steerable convolutions can be defined on Riemannian manifolds ( Cohen et al. , 2019b ; Weiler et al. , 2021 ) and homogeneous spaces ( Cohen et al. , 2019a ) . One practical advantage of the group convolutional approach employed by LieConvs is that it doesn ’ t require solving any equivariance constraints , which tends to make implementation of new groups easier . They also require somewhat less heavy theoretical machinery . On the other hand , steerable 1https : //quva-lab.github.io/e2cnn/ CNNs are much more general . This makes them interesting from a theoretical angle and also has more practical advantages ; for example , they can naturally represent the symmetries of vector field input or output . Since our focus is developing the theory of equivariant PDOs and the connection to physics , where vector fields are ubiquitous , we are taking the steerable perspective in this paper . Equivariant PDO-based networks The work most closely related to ours are PDO-eConvs ( Shen et al. , 2020 ) , which apply the group convolutional perspective to PDOs . Unlike LieConvs , they are not designed to work with infinite groups . The steerable PDOs we introduce generalizes PDO-eConvs , which are obtained as a special case by using regular representations . A different approach to equivariant PDO-based networks was taken by Smets et al . ( 2020 ) . Instead of applying a differential operator to input features , they use layers that map an initial condition for a PDE to its solution at a fixed later time . The PDE has a fixed form but several learnable parameters and constraints on these parameters—combined with the form of the PDE—guarantee equivariance . Sharp et al . ( 2020 ) also use a PDE , namely the diffusion equation , as part of their DiffusionNet model , which can learn on 3D surfaces . But instead of exploiting the connection between PDOs and convolutions , they solve the PDE in the spectral domain . Interestingly , the time evolution operator for the diffusion equation is exp ( t∆ ) , which can be interpreted as an infinite power series in the Laplacian , very reminiscent of the finite Laplacian polynomials that naturally appear throughout this paper . Studying the equivariance of such infinite series of PDOs might be an interesting direction for future work . 2 STEERABLE PDOS In this section , we develop the theory of equivariant PDOs . We will represent all features as smooth fields f : Rd → Rc that associate a feature vector f ( x ) ∈ Rc , called the fiber at x , to each point x ∈ Rd . We write Fi = C∞ ( Rd , Rci ) for the space of these fields f in layer i. Additionally , we have a group of transformations acting on the input space Rd , which describes under which symmetries we want the PDOs to be equivariant . We will always use a group of the form H = ( Rd , + ) oG , for some G ≤ GL ( d , R ) . Here , ( Rd , + ) refers to the group of translations of Rd , while G is some group of linear invertible transformations . The full group of symmetries H is the semidi- rect product of these two , meaning that each element h ∈ H can be uniquely written as h = tg , where t ∈ Rd is a translation and g ∈ G a linear transformation . For example , if G = { e } is the trivial group , we consider only equivariance under translations , as in classical CNNs , while for G = SO ( d ) we additionally consider rotational equivariance . Each feature space Fi has an associated group representation ρi : G→ GL ( ci , R ) , which determines how each fiber Rci transforms under transformations of the input space . Briefly , ρi associates an invertible matrix ρi ( g ) to each group element g , such that ρi ( g ) ρi ( g′ ) = ρi ( gg′ ) ; more details on representation theory can be found in Appendix B . To see why these representations are necessary , consider the feature space F = C∞ ( R2 , R2 ) and the group G = SO ( 2 ) . The two channels could simply be two independent scalar fields , meaning that rotations of the input move each fiber but do not transform the fibers themselves . Formally , this would mean using trivial representations ρ ( g ) = 1 for both channels . On the other hand , the two channels could together form a vector field , which means that each fiber would need to itself be rotated in addition to being moved . This would correspond to the representation ρ ( g ) = g. These two cases are visualized in Fig . 1 . In general , the transformation of a feature f ∈ Fi under an input transformation tg with t ∈ Rd and g ∈ G is given by ( ( tg ) Bi f ) ( x ) : = ρi ( g ) f ( g −1 ( x− t ) ) . ( 1 ) The g−1 ( x− t ) term moves each fiber spatially , whereas the ρi ( g ) is responsible for the individual transformation of each fiber . For a network , we will need maps between adjacent feature spaces Fi and Fi+1 . Since during this theory section , we only consider single layers in isolation , we will drop the index i and simply denote the layer map as Φ : Fin → Fout . We are particularly interested in equivariant maps Φ , i.e . maps that commute with the action of H on the feature spaces : Φ ( hBin f ) = hBout Φ ( f ) ∀h ∈ H , f ∈ Fin . ( 2 ) We call Φ translation-equivariant if Eq . ( 2 ) holds for h ∈ ( Rd , + ) , i.e . for pure translations . Analogously , Φ is G-equivariant if it holds for linear transformations h ∈ G. Because H is the semidirect product of Rd and G , a map is H-equivariant if and only if it is both translation- and G-equivariant . | The paper develops the theory of equivariant partial differential operators -- a steerable PDO which is equivariant under any given symmetry. Interestingly, this work reveals the relation between convolution and PDO by unifying them into a single framework. The work also provides the rigorous theoretical analysis and proof. The paper also provides experimental results to validate its theoretical analysis. | SP:b5fb302c70ee53f2cab27dbf5716a72f00850e35 |
Steerable Partial Differential Operators for Equivariant Neural Networks | Recent work in equivariant deep learning bears strong similarities to physics . Fields over a base space are fundamental entities in both subjects , as are equivariant maps between these fields . In deep learning , however , these maps are usually defined by convolutions with a kernel , whereas they are partial differential operators ( PDOs ) in physics . Developing the theory of equivariant PDOs in the context of deep learning could bring these subjects even closer together and lead to a stronger flow of ideas . In this work , we derive a G-steerability constraint that completely characterizes when a PDO between feature vector fields is equivariant , for arbitrary symmetry groups G. We then fully solve this constraint for several important groups . We use our solutions as equivariant drop-in replacements for convolutional layers and benchmark them in that role . Finally , we develop a framework for equivariant maps based on Schwartz distributions that unifies classical convolutions and differential operators and gives insight about the relation between the two . 1 INTRODUCTION . In many machine learning tasks , the data exhibits certain symmetries , such as translation- and sometimes rotation-invariance in image classification . To exploit those symmetries , equivariant neural networks have been widely studied and successfully applied in the past years , beginning with Group convolutional neural networks ( Cohen & Welling , 2016 ; Weiler et al. , 2018b ) . A significant generalization of Group convolutional networks is given by steerable CNNs ( Cohen & Welling , 2017 ; Weiler et al. , 2018a ; Weiler & Cesa , 2019 ) , which unify many different pre-existing equivariant models ( Weiler & Cesa , 2019 ) . They do this by representing features as fields of feature vectors over a base space , such as R2 in the case of two-dimensional images . Layers are then linear equivariant maps between these fields . This is very reminiscent of physics . There , fields are used to model particles and their interactions , with physical space or spacetime as the base space . The maps between these fields are also equivariant , with the symmetries being part of fundamental physical laws . It is also noteworthy that these symmetries are largely ones that appear the most often in deep learning , such as translation and rotation equivariance . These similarities have already led to ideas from physics being applied in equivariant deep learning ( Lang & Weiler , 2021 ) . However , one remaining difference is that physics uses equivariant partial differential operators ( PDOs ) to define maps between fields , such as the gradient or Laplacian . Therefore , using PDOs instead of convolutions in deep learning would complete the analogy to physics and could lead to even more transfer of ideas between subjects . Equivariant PDO-based networks have already been designed in prior work ( Shen et al. , 2020 ; Smets et al. , 2020 ; Sharp et al. , 2020 ) . Most relevant for our work are PDO-eConvs ( Shen et al. , 2020 ) , which can be seen as the PDO-analogon of group convolutions . However , PDO-eConvs are only one instance of equivariant PDOs and do not cover the most common PDOs from physics , such as the gradient , divergence , etc . Very similarly to how steerable CNNs ( Cohen & Welling , 2017 ; Weiler et al. , 2018a ; Weiler & Cesa , 2019 ) generalize group convolutions , we generalize PDO-eConvs by characterizing the set of all translation equivariant PDOs between feature fields over Euclidean spaces . Because of this analogy , we dub these equivariant differential operators steerable PDOs . These steerable PDOs and their similarity to steerable CNNs also raise the question of how equivariant PDOs and kernels relate to each other , and whether they can be unified . We present a framework for equivariant maps that contains both steerable PDOs and convolutions with steerable kernels as special cases . We then prove that this framework defines the most general set of translation equivariant , linear , continuous maps between feature fields , complementing recent work ( Aronsson , 2021 ) that describes when equivariant maps are convolutions . Since formally developing this framework requires the theory of Schwartz distributions , we cover it mainly in Appendix E , and the main paper can be read without any knowledge of distributions . However , we reference the main results from this framework in the paper where appropriate . In order to make steerable PDOs practically applicable , we describe an approach to find complete bases for vector spaces of equivariant PDOs and then apply this method to the most important cases . We have also implemented steerable PDOs for all subgroups of O ( 2 ) ( see supplementary material for the code ) . Our code extends the E2CNN library1 ( Weiler & Cesa , 2019 ) , which will allow practitioners to easily use both steerable kernels and steerable PDOs within the same library , and even to combine both inside the same network . Finally , we test our approach empirically by comparing steerable PDOs to steerable CNNs . In particular , we benchmark different discretization methods for the numerical implementation . In summary , our main contributions are as follows : • We develop the theory of equivariant PDOs on Euclidean spaces , giving a practical characterization of precisely when a PDO is equivariant under any given symmetry . • We unify equivariant PDOs and kernels into one framework that provably contains all translation equivariant , linear , continuous maps between feature spaces . • We describe a method for finding bases of the vector spaces of equivariant PDOs , and provide explicit bases for many important cases . • We benchmark steerable PDOs using different discretization procedures and provide an implementation of steerable PDOs as an extension of the E2CNN library . 1.1 RELATED WORK . Equivariant convolutional networks Our approach to equivariance follows the one taken by steerable CNNs ( Cohen & Welling , 2017 ; Weiler et al. , 2018a ; Weiler & Cesa , 2019 ; Brandstetter et al. , 2021 ) . They represent each feature as a map from the base space , such as Rd , to a fiber Rc that is equipped with a representation ρ of the point group G. Compared to vanilla CNNs , which have fiber R , steerable CNNs thus extend the codomain of feature maps . A different approach is taken by group convolutional networks ( Cohen & Welling , 2016 ; Hoogeboom et al. , 2018 ; Weiler et al. , 2018b ) . They represent each feature as a map from a group H acting on the input space to R. Because the input to the network usually does not lie in H , this requires a lifting map from the input space to H . Compared to vanilla CNNs , group convolutional networks can thus be understood as extending the domain of feature maps . When H = Rd oG is the semidirect product of the translation group and a pointwise group G , then group convolutions on H are equivalent to G-steerable convolutions with regular representations . For finite G , the group convolution over G simply becomes a finite sum . LieConvs ( Finzi et al. , 2020 ) describe a way of implementing group convolutions even for infinite groups by using a Monte Carlo approximation for the convolution integral . Steerable CNNs with regular representations would have to use similar approximations for infinite groups , but they can instead also use ( non-regular ) finite-dimensional representations . Both the group convolutional and the steerable approach can be applied to non-Euclidean input spaces—LieConvs define group convolutions on arbitrary Lie groups and steerable convolutions can be defined on Riemannian manifolds ( Cohen et al. , 2019b ; Weiler et al. , 2021 ) and homogeneous spaces ( Cohen et al. , 2019a ) . One practical advantage of the group convolutional approach employed by LieConvs is that it doesn ’ t require solving any equivariance constraints , which tends to make implementation of new groups easier . They also require somewhat less heavy theoretical machinery . On the other hand , steerable 1https : //quva-lab.github.io/e2cnn/ CNNs are much more general . This makes them interesting from a theoretical angle and also has more practical advantages ; for example , they can naturally represent the symmetries of vector field input or output . Since our focus is developing the theory of equivariant PDOs and the connection to physics , where vector fields are ubiquitous , we are taking the steerable perspective in this paper . Equivariant PDO-based networks The work most closely related to ours are PDO-eConvs ( Shen et al. , 2020 ) , which apply the group convolutional perspective to PDOs . Unlike LieConvs , they are not designed to work with infinite groups . The steerable PDOs we introduce generalizes PDO-eConvs , which are obtained as a special case by using regular representations . A different approach to equivariant PDO-based networks was taken by Smets et al . ( 2020 ) . Instead of applying a differential operator to input features , they use layers that map an initial condition for a PDE to its solution at a fixed later time . The PDE has a fixed form but several learnable parameters and constraints on these parameters—combined with the form of the PDE—guarantee equivariance . Sharp et al . ( 2020 ) also use a PDE , namely the diffusion equation , as part of their DiffusionNet model , which can learn on 3D surfaces . But instead of exploiting the connection between PDOs and convolutions , they solve the PDE in the spectral domain . Interestingly , the time evolution operator for the diffusion equation is exp ( t∆ ) , which can be interpreted as an infinite power series in the Laplacian , very reminiscent of the finite Laplacian polynomials that naturally appear throughout this paper . Studying the equivariance of such infinite series of PDOs might be an interesting direction for future work . 2 STEERABLE PDOS In this section , we develop the theory of equivariant PDOs . We will represent all features as smooth fields f : Rd → Rc that associate a feature vector f ( x ) ∈ Rc , called the fiber at x , to each point x ∈ Rd . We write Fi = C∞ ( Rd , Rci ) for the space of these fields f in layer i. Additionally , we have a group of transformations acting on the input space Rd , which describes under which symmetries we want the PDOs to be equivariant . We will always use a group of the form H = ( Rd , + ) oG , for some G ≤ GL ( d , R ) . Here , ( Rd , + ) refers to the group of translations of Rd , while G is some group of linear invertible transformations . The full group of symmetries H is the semidi- rect product of these two , meaning that each element h ∈ H can be uniquely written as h = tg , where t ∈ Rd is a translation and g ∈ G a linear transformation . For example , if G = { e } is the trivial group , we consider only equivariance under translations , as in classical CNNs , while for G = SO ( d ) we additionally consider rotational equivariance . Each feature space Fi has an associated group representation ρi : G→ GL ( ci , R ) , which determines how each fiber Rci transforms under transformations of the input space . Briefly , ρi associates an invertible matrix ρi ( g ) to each group element g , such that ρi ( g ) ρi ( g′ ) = ρi ( gg′ ) ; more details on representation theory can be found in Appendix B . To see why these representations are necessary , consider the feature space F = C∞ ( R2 , R2 ) and the group G = SO ( 2 ) . The two channels could simply be two independent scalar fields , meaning that rotations of the input move each fiber but do not transform the fibers themselves . Formally , this would mean using trivial representations ρ ( g ) = 1 for both channels . On the other hand , the two channels could together form a vector field , which means that each fiber would need to itself be rotated in addition to being moved . This would correspond to the representation ρ ( g ) = g. These two cases are visualized in Fig . 1 . In general , the transformation of a feature f ∈ Fi under an input transformation tg with t ∈ Rd and g ∈ G is given by ( ( tg ) Bi f ) ( x ) : = ρi ( g ) f ( g −1 ( x− t ) ) . ( 1 ) The g−1 ( x− t ) term moves each fiber spatially , whereas the ρi ( g ) is responsible for the individual transformation of each fiber . For a network , we will need maps between adjacent feature spaces Fi and Fi+1 . Since during this theory section , we only consider single layers in isolation , we will drop the index i and simply denote the layer map as Φ : Fin → Fout . We are particularly interested in equivariant maps Φ , i.e . maps that commute with the action of H on the feature spaces : Φ ( hBin f ) = hBout Φ ( f ) ∀h ∈ H , f ∈ Fin . ( 2 ) We call Φ translation-equivariant if Eq . ( 2 ) holds for h ∈ ( Rd , + ) , i.e . for pure translations . Analogously , Φ is G-equivariant if it holds for linear transformations h ∈ G. Because H is the semidirect product of Rd and G , a map is H-equivariant if and only if it is both translation- and G-equivariant . | This paper introduces equivariant Partial Differential Operators as a drop in replacement for equivariant kernels in $G$-steerable networks. The paper provides a thorough treatment on the subject matter and gives the necessary equivariant constraints for PDO's in a similar flavor to $G$-steerable kernels. In addition, explicit solutions to these constraints are provided for subgroups of $O(2)$, $O(3)$ and $SO(3)$. Finally, the paper also empirically validates equivariant PDO's on rotation MNIST and STL-10 highlighting important discussion points on the discretization error. | SP:b5fb302c70ee53f2cab27dbf5716a72f00850e35 |
Steerable Partial Differential Operators for Equivariant Neural Networks | Recent work in equivariant deep learning bears strong similarities to physics . Fields over a base space are fundamental entities in both subjects , as are equivariant maps between these fields . In deep learning , however , these maps are usually defined by convolutions with a kernel , whereas they are partial differential operators ( PDOs ) in physics . Developing the theory of equivariant PDOs in the context of deep learning could bring these subjects even closer together and lead to a stronger flow of ideas . In this work , we derive a G-steerability constraint that completely characterizes when a PDO between feature vector fields is equivariant , for arbitrary symmetry groups G. We then fully solve this constraint for several important groups . We use our solutions as equivariant drop-in replacements for convolutional layers and benchmark them in that role . Finally , we develop a framework for equivariant maps based on Schwartz distributions that unifies classical convolutions and differential operators and gives insight about the relation between the two . 1 INTRODUCTION . In many machine learning tasks , the data exhibits certain symmetries , such as translation- and sometimes rotation-invariance in image classification . To exploit those symmetries , equivariant neural networks have been widely studied and successfully applied in the past years , beginning with Group convolutional neural networks ( Cohen & Welling , 2016 ; Weiler et al. , 2018b ) . A significant generalization of Group convolutional networks is given by steerable CNNs ( Cohen & Welling , 2017 ; Weiler et al. , 2018a ; Weiler & Cesa , 2019 ) , which unify many different pre-existing equivariant models ( Weiler & Cesa , 2019 ) . They do this by representing features as fields of feature vectors over a base space , such as R2 in the case of two-dimensional images . Layers are then linear equivariant maps between these fields . This is very reminiscent of physics . There , fields are used to model particles and their interactions , with physical space or spacetime as the base space . The maps between these fields are also equivariant , with the symmetries being part of fundamental physical laws . It is also noteworthy that these symmetries are largely ones that appear the most often in deep learning , such as translation and rotation equivariance . These similarities have already led to ideas from physics being applied in equivariant deep learning ( Lang & Weiler , 2021 ) . However , one remaining difference is that physics uses equivariant partial differential operators ( PDOs ) to define maps between fields , such as the gradient or Laplacian . Therefore , using PDOs instead of convolutions in deep learning would complete the analogy to physics and could lead to even more transfer of ideas between subjects . Equivariant PDO-based networks have already been designed in prior work ( Shen et al. , 2020 ; Smets et al. , 2020 ; Sharp et al. , 2020 ) . Most relevant for our work are PDO-eConvs ( Shen et al. , 2020 ) , which can be seen as the PDO-analogon of group convolutions . However , PDO-eConvs are only one instance of equivariant PDOs and do not cover the most common PDOs from physics , such as the gradient , divergence , etc . Very similarly to how steerable CNNs ( Cohen & Welling , 2017 ; Weiler et al. , 2018a ; Weiler & Cesa , 2019 ) generalize group convolutions , we generalize PDO-eConvs by characterizing the set of all translation equivariant PDOs between feature fields over Euclidean spaces . Because of this analogy , we dub these equivariant differential operators steerable PDOs . These steerable PDOs and their similarity to steerable CNNs also raise the question of how equivariant PDOs and kernels relate to each other , and whether they can be unified . We present a framework for equivariant maps that contains both steerable PDOs and convolutions with steerable kernels as special cases . We then prove that this framework defines the most general set of translation equivariant , linear , continuous maps between feature fields , complementing recent work ( Aronsson , 2021 ) that describes when equivariant maps are convolutions . Since formally developing this framework requires the theory of Schwartz distributions , we cover it mainly in Appendix E , and the main paper can be read without any knowledge of distributions . However , we reference the main results from this framework in the paper where appropriate . In order to make steerable PDOs practically applicable , we describe an approach to find complete bases for vector spaces of equivariant PDOs and then apply this method to the most important cases . We have also implemented steerable PDOs for all subgroups of O ( 2 ) ( see supplementary material for the code ) . Our code extends the E2CNN library1 ( Weiler & Cesa , 2019 ) , which will allow practitioners to easily use both steerable kernels and steerable PDOs within the same library , and even to combine both inside the same network . Finally , we test our approach empirically by comparing steerable PDOs to steerable CNNs . In particular , we benchmark different discretization methods for the numerical implementation . In summary , our main contributions are as follows : • We develop the theory of equivariant PDOs on Euclidean spaces , giving a practical characterization of precisely when a PDO is equivariant under any given symmetry . • We unify equivariant PDOs and kernels into one framework that provably contains all translation equivariant , linear , continuous maps between feature spaces . • We describe a method for finding bases of the vector spaces of equivariant PDOs , and provide explicit bases for many important cases . • We benchmark steerable PDOs using different discretization procedures and provide an implementation of steerable PDOs as an extension of the E2CNN library . 1.1 RELATED WORK . Equivariant convolutional networks Our approach to equivariance follows the one taken by steerable CNNs ( Cohen & Welling , 2017 ; Weiler et al. , 2018a ; Weiler & Cesa , 2019 ; Brandstetter et al. , 2021 ) . They represent each feature as a map from the base space , such as Rd , to a fiber Rc that is equipped with a representation ρ of the point group G. Compared to vanilla CNNs , which have fiber R , steerable CNNs thus extend the codomain of feature maps . A different approach is taken by group convolutional networks ( Cohen & Welling , 2016 ; Hoogeboom et al. , 2018 ; Weiler et al. , 2018b ) . They represent each feature as a map from a group H acting on the input space to R. Because the input to the network usually does not lie in H , this requires a lifting map from the input space to H . Compared to vanilla CNNs , group convolutional networks can thus be understood as extending the domain of feature maps . When H = Rd oG is the semidirect product of the translation group and a pointwise group G , then group convolutions on H are equivalent to G-steerable convolutions with regular representations . For finite G , the group convolution over G simply becomes a finite sum . LieConvs ( Finzi et al. , 2020 ) describe a way of implementing group convolutions even for infinite groups by using a Monte Carlo approximation for the convolution integral . Steerable CNNs with regular representations would have to use similar approximations for infinite groups , but they can instead also use ( non-regular ) finite-dimensional representations . Both the group convolutional and the steerable approach can be applied to non-Euclidean input spaces—LieConvs define group convolutions on arbitrary Lie groups and steerable convolutions can be defined on Riemannian manifolds ( Cohen et al. , 2019b ; Weiler et al. , 2021 ) and homogeneous spaces ( Cohen et al. , 2019a ) . One practical advantage of the group convolutional approach employed by LieConvs is that it doesn ’ t require solving any equivariance constraints , which tends to make implementation of new groups easier . They also require somewhat less heavy theoretical machinery . On the other hand , steerable 1https : //quva-lab.github.io/e2cnn/ CNNs are much more general . This makes them interesting from a theoretical angle and also has more practical advantages ; for example , they can naturally represent the symmetries of vector field input or output . Since our focus is developing the theory of equivariant PDOs and the connection to physics , where vector fields are ubiquitous , we are taking the steerable perspective in this paper . Equivariant PDO-based networks The work most closely related to ours are PDO-eConvs ( Shen et al. , 2020 ) , which apply the group convolutional perspective to PDOs . Unlike LieConvs , they are not designed to work with infinite groups . The steerable PDOs we introduce generalizes PDO-eConvs , which are obtained as a special case by using regular representations . A different approach to equivariant PDO-based networks was taken by Smets et al . ( 2020 ) . Instead of applying a differential operator to input features , they use layers that map an initial condition for a PDE to its solution at a fixed later time . The PDE has a fixed form but several learnable parameters and constraints on these parameters—combined with the form of the PDE—guarantee equivariance . Sharp et al . ( 2020 ) also use a PDE , namely the diffusion equation , as part of their DiffusionNet model , which can learn on 3D surfaces . But instead of exploiting the connection between PDOs and convolutions , they solve the PDE in the spectral domain . Interestingly , the time evolution operator for the diffusion equation is exp ( t∆ ) , which can be interpreted as an infinite power series in the Laplacian , very reminiscent of the finite Laplacian polynomials that naturally appear throughout this paper . Studying the equivariance of such infinite series of PDOs might be an interesting direction for future work . 2 STEERABLE PDOS In this section , we develop the theory of equivariant PDOs . We will represent all features as smooth fields f : Rd → Rc that associate a feature vector f ( x ) ∈ Rc , called the fiber at x , to each point x ∈ Rd . We write Fi = C∞ ( Rd , Rci ) for the space of these fields f in layer i. Additionally , we have a group of transformations acting on the input space Rd , which describes under which symmetries we want the PDOs to be equivariant . We will always use a group of the form H = ( Rd , + ) oG , for some G ≤ GL ( d , R ) . Here , ( Rd , + ) refers to the group of translations of Rd , while G is some group of linear invertible transformations . The full group of symmetries H is the semidi- rect product of these two , meaning that each element h ∈ H can be uniquely written as h = tg , where t ∈ Rd is a translation and g ∈ G a linear transformation . For example , if G = { e } is the trivial group , we consider only equivariance under translations , as in classical CNNs , while for G = SO ( d ) we additionally consider rotational equivariance . Each feature space Fi has an associated group representation ρi : G→ GL ( ci , R ) , which determines how each fiber Rci transforms under transformations of the input space . Briefly , ρi associates an invertible matrix ρi ( g ) to each group element g , such that ρi ( g ) ρi ( g′ ) = ρi ( gg′ ) ; more details on representation theory can be found in Appendix B . To see why these representations are necessary , consider the feature space F = C∞ ( R2 , R2 ) and the group G = SO ( 2 ) . The two channels could simply be two independent scalar fields , meaning that rotations of the input move each fiber but do not transform the fibers themselves . Formally , this would mean using trivial representations ρ ( g ) = 1 for both channels . On the other hand , the two channels could together form a vector field , which means that each fiber would need to itself be rotated in addition to being moved . This would correspond to the representation ρ ( g ) = g. These two cases are visualized in Fig . 1 . In general , the transformation of a feature f ∈ Fi under an input transformation tg with t ∈ Rd and g ∈ G is given by ( ( tg ) Bi f ) ( x ) : = ρi ( g ) f ( g −1 ( x− t ) ) . ( 1 ) The g−1 ( x− t ) term moves each fiber spatially , whereas the ρi ( g ) is responsible for the individual transformation of each fiber . For a network , we will need maps between adjacent feature spaces Fi and Fi+1 . Since during this theory section , we only consider single layers in isolation , we will drop the index i and simply denote the layer map as Φ : Fin → Fout . We are particularly interested in equivariant maps Φ , i.e . maps that commute with the action of H on the feature spaces : Φ ( hBin f ) = hBout Φ ( f ) ∀h ∈ H , f ∈ Fin . ( 2 ) We call Φ translation-equivariant if Eq . ( 2 ) holds for h ∈ ( Rd , + ) , i.e . for pure translations . Analogously , Φ is G-equivariant if it holds for linear transformations h ∈ G. Because H is the semidirect product of Rd and G , a map is H-equivariant if and only if it is both translation- and G-equivariant . | The authors developed the general theory of equivariant partial differential operators (PDOs) between feature fields on the Euclidean space. Given an arbitrary group G, the G-steerability constraint is derived that fully characterized when a PDO is equivariant between vector fields for given representations. Experiments on the rotated-MNIST and STL-10 datasets have been conducted to compare the performance of equivariant-PDOs and equivariant steerable kernels. | SP:b5fb302c70ee53f2cab27dbf5716a72f00850e35 |
FlexConv: Continuous Kernel Convolutions With Differentiable Kernel Sizes | 1 INTRODUCTION . The kernel size of a convolutional layer defines the region from which features are computed , and is a crucial choice in their design . Commonly , small kernels ( up to 7px ) are used almost exclusively and are combined with pooling to model long term dependencies ( Simonyan & Zisserman , 2014 ; Szegedy et al. , 2015 ; He et al. , 2016 ; Tan & Le , 2019 ) . Recent works indicate , however , that CNNs benefit from using convolutional kernels ( i ) of varying size at different layers ( Pintea et al. , 2021 ; Tomen et al. , 2021 ) , and ( ii ) at the same resolution of the data ( Peng et al. , 2017 ; Cordonnier et al. , 2019 ; Romero et al. , 2021 ) . Unfortunately , most CNNs represent convolutional kernels as tensors of discrete weights and their size must be fixed prior to training . This makes exploring different kernel sizes at different layers difficult and time-consuming due to ( i ) the large search space , and ( ii ) the large number of weights required to construct large kernels . A more efficient way to tune different kernel sizes at different layers is to learn them during training . Existing methods define a discrete weighted set of basis functions , e.g. , shifted Delta-Diracs ( Fig . 2b , Dai et al . ( 2017 ) ) or Gaussian functions ( Fig . 2c , Jacobsen et al . ( 2016 ) ; Shelhamer et al . ( 2019 ) ; Pintea et al . ( 2021 ) ) . During training they learn dilation factors over the basis functions to increase the kernel size , which crucially limits the bandwidth of the resulting kernels . In this work , we present the Flexible Size Continuous Kernel Convolution ( FlexConv ) , a convolutional layer able to learn high bandwidth convolutional kernels of varying size during training ( Fig . 1 ) . Instead of using discrete weights , we provide a continuous parameterization of convolutional kernels via a small neural network ( Romero et al. , 2021 ) . This parameterization allows us to model continuous functions of arbitrary size with a fixed number of parameters . By multiplying the response of the neural network with a Gaussian mask , the size of the kernel can be learned during training ( Fig . 2a ) . This allows us to produce detailed kernels of small sizes ( Fig . 3 ) , and tune kernel sizes efficiently . FlexConvs can be deployed at higher resolutions than those observed during training , simply by using a more densely sampled grid of kernel indices . However , the high bandwidth of the kernel can lead FlexConv to learn kernels that show aliasing at higher resolutions , if the kernel bandwidth exceeds the Nyquist frequency . To solve this problem , we propose to parameterize convolutional kernels as Multiplicative Anisotropic Gabor Networks ( MAGNets ) . MAGNets are a new class of Multiplicative Filter Networks ( Fathony et al. , 2021 ) that allows us to analyze and control the frequency spectrum of the generated kernels . We use this analysis to regularize FlexConv against aliasing . With this regularization , FlexConvs can be directly deployed at higher resolutions with minimal accuracy loss . Furthermore , MAGNets provide higher descriptive power and faster convergence speed than existing continuous kernel parameterizations ( Schütt et al. , 2017 ; Finzi et al. , 2020 ; Romero et al. , 2021 ) . This leads to important improvements in classification accuracy ( Sec . 4 ) . Our experiments show that CNNs with FlexConvs , coined FlexNets , achieve state-of-the-art across several sequential datasets , match performance of recent works with learnable kernel sizes with less compute , and are competitive with much deeper ResNets ( He et al. , 2016 ) when applied on image benchmark datasets . Thanks to the ability of FlexConvs to generalize across resolutions , FlexNets can be efficiently trained at low-resolution to save compute , e.g. , 16 × 16 CIFAR images , and be deployed on the original data resolution with marginal accuracy loss , e.g. , 32 × 32 CIFAR images . In summary , our contributions are : • We introduce the Flexible Size Continuous Kernel Convolution ( FlexConv ) , a convolution operation able to learn high bandwidth convolutional kernels of varying size end-to-end . • Our proposed Multiplicative Anisotropic Gabor Networks ( MAGNets ) allow for analytic control of the properties of the generated kernels . This property allows us to construct analytic alias-free convolutional kernels that generalize to higher resolutions , and to train FlexNets at low resolution and deploy them at higher resolutions . Moreover , MAGNets show higher descriptive power and faster convergence speed than existing kernel parameterizations . • CNN architectures with FlexConvs ( FlexNets ) obtain state-of-the-art across several sequential datasets , and match recent works with learnable kernel size on CIFAR-10 with less compute . 2 RELATED WORK . Adaptive kernel sizes . Adaptive kernel sizes have been proposed via learnable pixel-wise offsets ( Dai et al. , 2017 ) , learnable padding operations ( Han et al. , 2018 ) , learnable dilated Gaussian functions ( Shelhamer et al. , 2019 ; Xiong et al. , 2020 ; Tabernik et al. , 2020 ; Nguyen , 2020 ) and scalable Gaussian derivative filters ( Pintea et al. , 2021 ; Tomen et al. , 2021 ; Lindeberg , 2021 ) . These approaches either dilate discrete kernels ( Fig . 2b ) , or use discrete weights on dilated basis functions ( Fig . 2c ) . The ability of these methods to learn the kernel size depends on dilation , which crucially limits the bandwidth of the resulting kernels . In contrast , FlexConvs are able to construct high bandwidth convolutional kernels of varying size , and with a fixed parameter count . Larger kernels are obtained simply by passing a larger vector of positions to the neural network parameterizing the kernel ( Fig . 1 ) . Continuous kernel convolutions . Discrete convolutional kernel parameterizations assign an independent weight to each specific position in the kernel . Continuous convolutional kernels , on the other hand , view convolutional kernels as continuous functions parameterized via a small neural network MLPψ ∶ RD → RNout×Nin , with D the data dimensionality . This defines a convolutional kernel for which arbitrary input positions can be queried . Continuous kernels have primarily been used to handle irregularly-sampled data locally , e.g. , molecular data ( Simonovsky & Komodakis , 2017 ; Schütt et al. , 2017 ) and point-clouds ( Thomas et al. , 2018 ; Wang et al. , 2018 ; Shi et al. , 2019 ) . Recently , Romero et al . ( 2021 ) introduced the Continuous Kernel Convolution ( CKConv ) as a tool to model long-term dependencies . CKConv uses a continuous kernel parameterization to construct convolutional kernels as big as the input signal with a constant parameter cost . Contrarily , FlexConvs jointly learn the convolutional kernel as well as its size . This leads to important advantages in terms of expressivity ( Fig . 3 ) , convergence speed and compute costs of the operation . Implicit neural representations . Parameterizing a convolutional kernel via a neural network can be seen as learning an implicit neural representation of the underlying convolutional kernel ( Romero et al. , 2021 ) . Implicit neural representations construct continuous data representations by encoding data in the weights of a neural network ( Park et al. , 2019 ; Sitzmann et al. , 2020 ; Fathony et al. , 2021 ) . We replace the SIREN ( Sitzmann et al. , 2020 ) kernel parameterization used in Romero et al . ( 2021 ) by our Multiplicative Anisotropic Gabor Networks : a new class of Multiplicative Filter Networks ( Fathony et al. , 2021 ) . MFNs allow for analytic control of the resulting representations , and allow us to construct analytic alias-free convolutional kernels . The higher expressivity and convergence speed of MAGNets lead to accuracy improvements in CNNs using them as kernel parameterization . 3 METHOD . In this section , we introduce our approach . First , we introduce FlexConv and the Gaussian mask . Next , we introduce our Multiplicative Anisotropic Gabor Networks ( MAGNets ) and provide a description of our regularization technique used to control the spectral components of the generated kernel . 3.1 FLEXIBLE SIZE CONTINUOUS KERNEL CONVOLUTION ( FLEXCONV ) . To learn the kernel size during training , FlexConvs define their convolutional kernels ψ as the product of the output of a neural network MLPψ with a Gaussian mask of local support . The neural network MLPψ parameterizes the kernel , and the Gaussian mask parameterizes its size ( Fig . 1 ) . Anisotropic Gaussian mask . Let G ( x ; µX , σ2X ) ∶= exp { − 12σ −2 X ( x − µX ) 2 } be a Gaussian function parameterized by a mean-variance tuple ( µX , σ2X ) . The anisotropic Gaussian mask is defined as : wgauss ( x , y ; { µX , σ2X , µY , σ2Y } ) = G ( x ; µX , σ2X ) G ( y ; µY , σ2Y ) . ( 1 ) By learning ( µX , σ2X ) and ( µY , σ2Y ) independently , anisotropic non-centered windows can be learned . 3.2 MULTIPLICATIVE ANISOTROPIC GABOR NETWORKS ( MAGNETS ) . In this section , we formalize our proposed parameterization for the kernel MLPψ . We start by introducing Multiplicative Filter Networks ( Fathony et al. , 2021 ) , and present our MAGNets next . Multiplicative Filter Networks ( MFNs ) . Recently , Fathony et al . ( 2021 ) proposed to construct implicit neural representations as the linear combination of exponentially many basis functions g : h ( 1 ) = g ( [ x , y ] ; θ ( 1 ) ) g ∶ R2 → RNhid ( 2 ) h ( l ) = ( W ( l ) h ( l−1 ) + b ( l ) ) ⋅ g ( [ x , y ] ; θ ( l ) ) W ( l ) ∈ RNhid×Nhid , b ( l ) ∈ RNhid ( 3 ) ψ ( x , y ) =W ( L ) h ( L−1 ) + b ( L ) W ( L ) ∈ RN×Nhid , b ( L ) ∈ RN ( 4 ) where { θ ( l ) , W ( l ) , b ( l ) } depict the learnable parameters of the bases and the affine transformations , and N , Nhid depict the number of output and hidden channels , respectively . Depending on the selection of g , MFNs obtain approximations comparable to those of SIRENs ( Sitzmann et al. , 2020 ) with faster convergence rate . The most successful instantiation of MNFs are the Multiplicative Gabor Network ( MGN ) : MFNs constructed with isotropic Gabor functions as basis g ( in Eq . 2 ) : g ( [ x , y ] ; θ ( l ) ) = exp ( − γ ( l ) 2 [ ( x −µ ( l ) ) 2 + ( y −µ ( l ) ) 2 ] ) Sin ( W ( l ) g ⋅ [ x , y ] + b ( l ) g ) , ( 5 ) θ ( l ) = { γ ( l ) ∈ RNhid , µ ( l ) ∈ RNhid , W ( l ) g ∈ RNhid×2 , b ( l ) g ∈ RNhid } . ( 6 ) Note that , by setting N=Nout×Nin , an MFN can parameterize a convolutional kernel with Nin input and Nout output channels . Fathony et al . ( 2021 ) show that MFNs are equivalent to a linear combination of exponentially many basis functions g. This allows us to analytically derive properties of MFN representations , and plays a crucial role in the derivation of alias-free MAGNets ( Sec . 3.3 ) . Multiplicative Anisotropic Gabor Networks ( MAGNets ) . Our MAGNet formulation is based on the observation that isotropic Gabor functions , i.e. , with equal γ for the horizontal and vertical directions , are undesirable as basis for the construction of MFNs . Whenever a frequency is required along a certain direction , an isotropic Gabor function automatically introduces that frequency in both directions . As a result , other bases must counteract this frequency in the direction where the frequency is not required , and thus the capacity of the MFN is not used optimally ( Daugman , 1988 ) . Following the original formulation of the 2D Gabor functions ( Daugman , 1988 ) , we alleviate this limitation by using anisotropic Gabor functions instead : g ( [ x , y ] ; θ ( l ) ) = exp ( − 1 2 [ ( γ ( l ) X ( x −µ ( l ) X ) ) 2 + ( γ ( l ) Y ( y −µ ( l ) Y ) ) 2 ] ) Sin ( W ( l ) g [ x , y ] + b ( l ) g ) ( 7 ) θ ( l ) = { γ ( l ) X ∈ R Nhid , γ ( l ) Y ∈ R Nhid , µ ( l ) X ∈ R Nhid , µ ( l ) Y ∈ R Nhid , W ( l ) g ∈ RNhid×2 , b ( l ) g ∈ RNhid } . ( 8 ) The resulting Multiplicative Anisotropic Gabor Network ( MAGNet ) obtains better control upon frequency components introduced to the approximation , and demonstrates important improvements in terms of descriptive power and convergence speed ( Sec . 4 ) . MAGNet initialization . Fathony et al . ( 2021 ) proposes to initialize MGNs by drawing the size of the Gaussian envelopes , i.e. , the γ ( l ) term , from a Gamma ( α ⋅ L−1 , β ) distribution at every layer l ∈ [ 1 , .. , L − 1 ] . We observe however that this initialization does not provide much variability on the initial extension of the Gaussian envelopes and in fact , most of them cover a large portion of the space at initialization . To stimulate diversity , we initialize the { γ ( l ) X , γ ( l ) Y } terms by a Gamma ( αl −1 , β ) distribution at the l-th layer . We observe that our proposed initialization consistently leads to better accuracy than the initialization of Fathony et al . ( 2021 ) across all tasks considered . ( Sec . 4 ) . | This paper presents a novel convolutional operation named FlexConv, to produce high bandwidth convolutional kernels with learnable kernel size at a fixed parameter cost. It is able to generate kernels with large kernel size and model long-term dependencies among elements in a sequence or an image. State-of-the-art performance on both sequential datasets and image datasets demonstrates the effectiveness of the proposed method. In addition, a novel kernel parameterization method is proposed to control the frequency of the generated kernels and avoid aliasing, and hence can well generalize to higher resolution cases which are never seen during training. | SP:c382410754ee56e795576439683f70b070c022ae |
FlexConv: Continuous Kernel Convolutions With Differentiable Kernel Sizes | 1 INTRODUCTION . The kernel size of a convolutional layer defines the region from which features are computed , and is a crucial choice in their design . Commonly , small kernels ( up to 7px ) are used almost exclusively and are combined with pooling to model long term dependencies ( Simonyan & Zisserman , 2014 ; Szegedy et al. , 2015 ; He et al. , 2016 ; Tan & Le , 2019 ) . Recent works indicate , however , that CNNs benefit from using convolutional kernels ( i ) of varying size at different layers ( Pintea et al. , 2021 ; Tomen et al. , 2021 ) , and ( ii ) at the same resolution of the data ( Peng et al. , 2017 ; Cordonnier et al. , 2019 ; Romero et al. , 2021 ) . Unfortunately , most CNNs represent convolutional kernels as tensors of discrete weights and their size must be fixed prior to training . This makes exploring different kernel sizes at different layers difficult and time-consuming due to ( i ) the large search space , and ( ii ) the large number of weights required to construct large kernels . A more efficient way to tune different kernel sizes at different layers is to learn them during training . Existing methods define a discrete weighted set of basis functions , e.g. , shifted Delta-Diracs ( Fig . 2b , Dai et al . ( 2017 ) ) or Gaussian functions ( Fig . 2c , Jacobsen et al . ( 2016 ) ; Shelhamer et al . ( 2019 ) ; Pintea et al . ( 2021 ) ) . During training they learn dilation factors over the basis functions to increase the kernel size , which crucially limits the bandwidth of the resulting kernels . In this work , we present the Flexible Size Continuous Kernel Convolution ( FlexConv ) , a convolutional layer able to learn high bandwidth convolutional kernels of varying size during training ( Fig . 1 ) . Instead of using discrete weights , we provide a continuous parameterization of convolutional kernels via a small neural network ( Romero et al. , 2021 ) . This parameterization allows us to model continuous functions of arbitrary size with a fixed number of parameters . By multiplying the response of the neural network with a Gaussian mask , the size of the kernel can be learned during training ( Fig . 2a ) . This allows us to produce detailed kernels of small sizes ( Fig . 3 ) , and tune kernel sizes efficiently . FlexConvs can be deployed at higher resolutions than those observed during training , simply by using a more densely sampled grid of kernel indices . However , the high bandwidth of the kernel can lead FlexConv to learn kernels that show aliasing at higher resolutions , if the kernel bandwidth exceeds the Nyquist frequency . To solve this problem , we propose to parameterize convolutional kernels as Multiplicative Anisotropic Gabor Networks ( MAGNets ) . MAGNets are a new class of Multiplicative Filter Networks ( Fathony et al. , 2021 ) that allows us to analyze and control the frequency spectrum of the generated kernels . We use this analysis to regularize FlexConv against aliasing . With this regularization , FlexConvs can be directly deployed at higher resolutions with minimal accuracy loss . Furthermore , MAGNets provide higher descriptive power and faster convergence speed than existing continuous kernel parameterizations ( Schütt et al. , 2017 ; Finzi et al. , 2020 ; Romero et al. , 2021 ) . This leads to important improvements in classification accuracy ( Sec . 4 ) . Our experiments show that CNNs with FlexConvs , coined FlexNets , achieve state-of-the-art across several sequential datasets , match performance of recent works with learnable kernel sizes with less compute , and are competitive with much deeper ResNets ( He et al. , 2016 ) when applied on image benchmark datasets . Thanks to the ability of FlexConvs to generalize across resolutions , FlexNets can be efficiently trained at low-resolution to save compute , e.g. , 16 × 16 CIFAR images , and be deployed on the original data resolution with marginal accuracy loss , e.g. , 32 × 32 CIFAR images . In summary , our contributions are : • We introduce the Flexible Size Continuous Kernel Convolution ( FlexConv ) , a convolution operation able to learn high bandwidth convolutional kernels of varying size end-to-end . • Our proposed Multiplicative Anisotropic Gabor Networks ( MAGNets ) allow for analytic control of the properties of the generated kernels . This property allows us to construct analytic alias-free convolutional kernels that generalize to higher resolutions , and to train FlexNets at low resolution and deploy them at higher resolutions . Moreover , MAGNets show higher descriptive power and faster convergence speed than existing kernel parameterizations . • CNN architectures with FlexConvs ( FlexNets ) obtain state-of-the-art across several sequential datasets , and match recent works with learnable kernel size on CIFAR-10 with less compute . 2 RELATED WORK . Adaptive kernel sizes . Adaptive kernel sizes have been proposed via learnable pixel-wise offsets ( Dai et al. , 2017 ) , learnable padding operations ( Han et al. , 2018 ) , learnable dilated Gaussian functions ( Shelhamer et al. , 2019 ; Xiong et al. , 2020 ; Tabernik et al. , 2020 ; Nguyen , 2020 ) and scalable Gaussian derivative filters ( Pintea et al. , 2021 ; Tomen et al. , 2021 ; Lindeberg , 2021 ) . These approaches either dilate discrete kernels ( Fig . 2b ) , or use discrete weights on dilated basis functions ( Fig . 2c ) . The ability of these methods to learn the kernel size depends on dilation , which crucially limits the bandwidth of the resulting kernels . In contrast , FlexConvs are able to construct high bandwidth convolutional kernels of varying size , and with a fixed parameter count . Larger kernels are obtained simply by passing a larger vector of positions to the neural network parameterizing the kernel ( Fig . 1 ) . Continuous kernel convolutions . Discrete convolutional kernel parameterizations assign an independent weight to each specific position in the kernel . Continuous convolutional kernels , on the other hand , view convolutional kernels as continuous functions parameterized via a small neural network MLPψ ∶ RD → RNout×Nin , with D the data dimensionality . This defines a convolutional kernel for which arbitrary input positions can be queried . Continuous kernels have primarily been used to handle irregularly-sampled data locally , e.g. , molecular data ( Simonovsky & Komodakis , 2017 ; Schütt et al. , 2017 ) and point-clouds ( Thomas et al. , 2018 ; Wang et al. , 2018 ; Shi et al. , 2019 ) . Recently , Romero et al . ( 2021 ) introduced the Continuous Kernel Convolution ( CKConv ) as a tool to model long-term dependencies . CKConv uses a continuous kernel parameterization to construct convolutional kernels as big as the input signal with a constant parameter cost . Contrarily , FlexConvs jointly learn the convolutional kernel as well as its size . This leads to important advantages in terms of expressivity ( Fig . 3 ) , convergence speed and compute costs of the operation . Implicit neural representations . Parameterizing a convolutional kernel via a neural network can be seen as learning an implicit neural representation of the underlying convolutional kernel ( Romero et al. , 2021 ) . Implicit neural representations construct continuous data representations by encoding data in the weights of a neural network ( Park et al. , 2019 ; Sitzmann et al. , 2020 ; Fathony et al. , 2021 ) . We replace the SIREN ( Sitzmann et al. , 2020 ) kernel parameterization used in Romero et al . ( 2021 ) by our Multiplicative Anisotropic Gabor Networks : a new class of Multiplicative Filter Networks ( Fathony et al. , 2021 ) . MFNs allow for analytic control of the resulting representations , and allow us to construct analytic alias-free convolutional kernels . The higher expressivity and convergence speed of MAGNets lead to accuracy improvements in CNNs using them as kernel parameterization . 3 METHOD . In this section , we introduce our approach . First , we introduce FlexConv and the Gaussian mask . Next , we introduce our Multiplicative Anisotropic Gabor Networks ( MAGNets ) and provide a description of our regularization technique used to control the spectral components of the generated kernel . 3.1 FLEXIBLE SIZE CONTINUOUS KERNEL CONVOLUTION ( FLEXCONV ) . To learn the kernel size during training , FlexConvs define their convolutional kernels ψ as the product of the output of a neural network MLPψ with a Gaussian mask of local support . The neural network MLPψ parameterizes the kernel , and the Gaussian mask parameterizes its size ( Fig . 1 ) . Anisotropic Gaussian mask . Let G ( x ; µX , σ2X ) ∶= exp { − 12σ −2 X ( x − µX ) 2 } be a Gaussian function parameterized by a mean-variance tuple ( µX , σ2X ) . The anisotropic Gaussian mask is defined as : wgauss ( x , y ; { µX , σ2X , µY , σ2Y } ) = G ( x ; µX , σ2X ) G ( y ; µY , σ2Y ) . ( 1 ) By learning ( µX , σ2X ) and ( µY , σ2Y ) independently , anisotropic non-centered windows can be learned . 3.2 MULTIPLICATIVE ANISOTROPIC GABOR NETWORKS ( MAGNETS ) . In this section , we formalize our proposed parameterization for the kernel MLPψ . We start by introducing Multiplicative Filter Networks ( Fathony et al. , 2021 ) , and present our MAGNets next . Multiplicative Filter Networks ( MFNs ) . Recently , Fathony et al . ( 2021 ) proposed to construct implicit neural representations as the linear combination of exponentially many basis functions g : h ( 1 ) = g ( [ x , y ] ; θ ( 1 ) ) g ∶ R2 → RNhid ( 2 ) h ( l ) = ( W ( l ) h ( l−1 ) + b ( l ) ) ⋅ g ( [ x , y ] ; θ ( l ) ) W ( l ) ∈ RNhid×Nhid , b ( l ) ∈ RNhid ( 3 ) ψ ( x , y ) =W ( L ) h ( L−1 ) + b ( L ) W ( L ) ∈ RN×Nhid , b ( L ) ∈ RN ( 4 ) where { θ ( l ) , W ( l ) , b ( l ) } depict the learnable parameters of the bases and the affine transformations , and N , Nhid depict the number of output and hidden channels , respectively . Depending on the selection of g , MFNs obtain approximations comparable to those of SIRENs ( Sitzmann et al. , 2020 ) with faster convergence rate . The most successful instantiation of MNFs are the Multiplicative Gabor Network ( MGN ) : MFNs constructed with isotropic Gabor functions as basis g ( in Eq . 2 ) : g ( [ x , y ] ; θ ( l ) ) = exp ( − γ ( l ) 2 [ ( x −µ ( l ) ) 2 + ( y −µ ( l ) ) 2 ] ) Sin ( W ( l ) g ⋅ [ x , y ] + b ( l ) g ) , ( 5 ) θ ( l ) = { γ ( l ) ∈ RNhid , µ ( l ) ∈ RNhid , W ( l ) g ∈ RNhid×2 , b ( l ) g ∈ RNhid } . ( 6 ) Note that , by setting N=Nout×Nin , an MFN can parameterize a convolutional kernel with Nin input and Nout output channels . Fathony et al . ( 2021 ) show that MFNs are equivalent to a linear combination of exponentially many basis functions g. This allows us to analytically derive properties of MFN representations , and plays a crucial role in the derivation of alias-free MAGNets ( Sec . 3.3 ) . Multiplicative Anisotropic Gabor Networks ( MAGNets ) . Our MAGNet formulation is based on the observation that isotropic Gabor functions , i.e. , with equal γ for the horizontal and vertical directions , are undesirable as basis for the construction of MFNs . Whenever a frequency is required along a certain direction , an isotropic Gabor function automatically introduces that frequency in both directions . As a result , other bases must counteract this frequency in the direction where the frequency is not required , and thus the capacity of the MFN is not used optimally ( Daugman , 1988 ) . Following the original formulation of the 2D Gabor functions ( Daugman , 1988 ) , we alleviate this limitation by using anisotropic Gabor functions instead : g ( [ x , y ] ; θ ( l ) ) = exp ( − 1 2 [ ( γ ( l ) X ( x −µ ( l ) X ) ) 2 + ( γ ( l ) Y ( y −µ ( l ) Y ) ) 2 ] ) Sin ( W ( l ) g [ x , y ] + b ( l ) g ) ( 7 ) θ ( l ) = { γ ( l ) X ∈ R Nhid , γ ( l ) Y ∈ R Nhid , µ ( l ) X ∈ R Nhid , µ ( l ) Y ∈ R Nhid , W ( l ) g ∈ RNhid×2 , b ( l ) g ∈ RNhid } . ( 8 ) The resulting Multiplicative Anisotropic Gabor Network ( MAGNet ) obtains better control upon frequency components introduced to the approximation , and demonstrates important improvements in terms of descriptive power and convergence speed ( Sec . 4 ) . MAGNet initialization . Fathony et al . ( 2021 ) proposes to initialize MGNs by drawing the size of the Gaussian envelopes , i.e. , the γ ( l ) term , from a Gamma ( α ⋅ L−1 , β ) distribution at every layer l ∈ [ 1 , .. , L − 1 ] . We observe however that this initialization does not provide much variability on the initial extension of the Gaussian envelopes and in fact , most of them cover a large portion of the space at initialization . To stimulate diversity , we initialize the { γ ( l ) X , γ ( l ) Y } terms by a Gamma ( αl −1 , β ) distribution at the l-th layer . We observe that our proposed initialization consistently leads to better accuracy than the initialization of Fathony et al . ( 2021 ) across all tasks considered . ( Sec . 4 ) . | The paper proposes a method for learning convolutional filters with trainable size, that builds on top of multiplicative filter networks. The learnable convolutions are called FlexConv, and a network that deploys them is called FlexNet. In order to control the aliasing eventually introduced when learning the convolutional filters, anisotropic Gabor kernels are used within the multiplicative filter networks. | SP:c382410754ee56e795576439683f70b070c022ae |
FlexConv: Continuous Kernel Convolutions With Differentiable Kernel Sizes | 1 INTRODUCTION . The kernel size of a convolutional layer defines the region from which features are computed , and is a crucial choice in their design . Commonly , small kernels ( up to 7px ) are used almost exclusively and are combined with pooling to model long term dependencies ( Simonyan & Zisserman , 2014 ; Szegedy et al. , 2015 ; He et al. , 2016 ; Tan & Le , 2019 ) . Recent works indicate , however , that CNNs benefit from using convolutional kernels ( i ) of varying size at different layers ( Pintea et al. , 2021 ; Tomen et al. , 2021 ) , and ( ii ) at the same resolution of the data ( Peng et al. , 2017 ; Cordonnier et al. , 2019 ; Romero et al. , 2021 ) . Unfortunately , most CNNs represent convolutional kernels as tensors of discrete weights and their size must be fixed prior to training . This makes exploring different kernel sizes at different layers difficult and time-consuming due to ( i ) the large search space , and ( ii ) the large number of weights required to construct large kernels . A more efficient way to tune different kernel sizes at different layers is to learn them during training . Existing methods define a discrete weighted set of basis functions , e.g. , shifted Delta-Diracs ( Fig . 2b , Dai et al . ( 2017 ) ) or Gaussian functions ( Fig . 2c , Jacobsen et al . ( 2016 ) ; Shelhamer et al . ( 2019 ) ; Pintea et al . ( 2021 ) ) . During training they learn dilation factors over the basis functions to increase the kernel size , which crucially limits the bandwidth of the resulting kernels . In this work , we present the Flexible Size Continuous Kernel Convolution ( FlexConv ) , a convolutional layer able to learn high bandwidth convolutional kernels of varying size during training ( Fig . 1 ) . Instead of using discrete weights , we provide a continuous parameterization of convolutional kernels via a small neural network ( Romero et al. , 2021 ) . This parameterization allows us to model continuous functions of arbitrary size with a fixed number of parameters . By multiplying the response of the neural network with a Gaussian mask , the size of the kernel can be learned during training ( Fig . 2a ) . This allows us to produce detailed kernels of small sizes ( Fig . 3 ) , and tune kernel sizes efficiently . FlexConvs can be deployed at higher resolutions than those observed during training , simply by using a more densely sampled grid of kernel indices . However , the high bandwidth of the kernel can lead FlexConv to learn kernels that show aliasing at higher resolutions , if the kernel bandwidth exceeds the Nyquist frequency . To solve this problem , we propose to parameterize convolutional kernels as Multiplicative Anisotropic Gabor Networks ( MAGNets ) . MAGNets are a new class of Multiplicative Filter Networks ( Fathony et al. , 2021 ) that allows us to analyze and control the frequency spectrum of the generated kernels . We use this analysis to regularize FlexConv against aliasing . With this regularization , FlexConvs can be directly deployed at higher resolutions with minimal accuracy loss . Furthermore , MAGNets provide higher descriptive power and faster convergence speed than existing continuous kernel parameterizations ( Schütt et al. , 2017 ; Finzi et al. , 2020 ; Romero et al. , 2021 ) . This leads to important improvements in classification accuracy ( Sec . 4 ) . Our experiments show that CNNs with FlexConvs , coined FlexNets , achieve state-of-the-art across several sequential datasets , match performance of recent works with learnable kernel sizes with less compute , and are competitive with much deeper ResNets ( He et al. , 2016 ) when applied on image benchmark datasets . Thanks to the ability of FlexConvs to generalize across resolutions , FlexNets can be efficiently trained at low-resolution to save compute , e.g. , 16 × 16 CIFAR images , and be deployed on the original data resolution with marginal accuracy loss , e.g. , 32 × 32 CIFAR images . In summary , our contributions are : • We introduce the Flexible Size Continuous Kernel Convolution ( FlexConv ) , a convolution operation able to learn high bandwidth convolutional kernels of varying size end-to-end . • Our proposed Multiplicative Anisotropic Gabor Networks ( MAGNets ) allow for analytic control of the properties of the generated kernels . This property allows us to construct analytic alias-free convolutional kernels that generalize to higher resolutions , and to train FlexNets at low resolution and deploy them at higher resolutions . Moreover , MAGNets show higher descriptive power and faster convergence speed than existing kernel parameterizations . • CNN architectures with FlexConvs ( FlexNets ) obtain state-of-the-art across several sequential datasets , and match recent works with learnable kernel size on CIFAR-10 with less compute . 2 RELATED WORK . Adaptive kernel sizes . Adaptive kernel sizes have been proposed via learnable pixel-wise offsets ( Dai et al. , 2017 ) , learnable padding operations ( Han et al. , 2018 ) , learnable dilated Gaussian functions ( Shelhamer et al. , 2019 ; Xiong et al. , 2020 ; Tabernik et al. , 2020 ; Nguyen , 2020 ) and scalable Gaussian derivative filters ( Pintea et al. , 2021 ; Tomen et al. , 2021 ; Lindeberg , 2021 ) . These approaches either dilate discrete kernels ( Fig . 2b ) , or use discrete weights on dilated basis functions ( Fig . 2c ) . The ability of these methods to learn the kernel size depends on dilation , which crucially limits the bandwidth of the resulting kernels . In contrast , FlexConvs are able to construct high bandwidth convolutional kernels of varying size , and with a fixed parameter count . Larger kernels are obtained simply by passing a larger vector of positions to the neural network parameterizing the kernel ( Fig . 1 ) . Continuous kernel convolutions . Discrete convolutional kernel parameterizations assign an independent weight to each specific position in the kernel . Continuous convolutional kernels , on the other hand , view convolutional kernels as continuous functions parameterized via a small neural network MLPψ ∶ RD → RNout×Nin , with D the data dimensionality . This defines a convolutional kernel for which arbitrary input positions can be queried . Continuous kernels have primarily been used to handle irregularly-sampled data locally , e.g. , molecular data ( Simonovsky & Komodakis , 2017 ; Schütt et al. , 2017 ) and point-clouds ( Thomas et al. , 2018 ; Wang et al. , 2018 ; Shi et al. , 2019 ) . Recently , Romero et al . ( 2021 ) introduced the Continuous Kernel Convolution ( CKConv ) as a tool to model long-term dependencies . CKConv uses a continuous kernel parameterization to construct convolutional kernels as big as the input signal with a constant parameter cost . Contrarily , FlexConvs jointly learn the convolutional kernel as well as its size . This leads to important advantages in terms of expressivity ( Fig . 3 ) , convergence speed and compute costs of the operation . Implicit neural representations . Parameterizing a convolutional kernel via a neural network can be seen as learning an implicit neural representation of the underlying convolutional kernel ( Romero et al. , 2021 ) . Implicit neural representations construct continuous data representations by encoding data in the weights of a neural network ( Park et al. , 2019 ; Sitzmann et al. , 2020 ; Fathony et al. , 2021 ) . We replace the SIREN ( Sitzmann et al. , 2020 ) kernel parameterization used in Romero et al . ( 2021 ) by our Multiplicative Anisotropic Gabor Networks : a new class of Multiplicative Filter Networks ( Fathony et al. , 2021 ) . MFNs allow for analytic control of the resulting representations , and allow us to construct analytic alias-free convolutional kernels . The higher expressivity and convergence speed of MAGNets lead to accuracy improvements in CNNs using them as kernel parameterization . 3 METHOD . In this section , we introduce our approach . First , we introduce FlexConv and the Gaussian mask . Next , we introduce our Multiplicative Anisotropic Gabor Networks ( MAGNets ) and provide a description of our regularization technique used to control the spectral components of the generated kernel . 3.1 FLEXIBLE SIZE CONTINUOUS KERNEL CONVOLUTION ( FLEXCONV ) . To learn the kernel size during training , FlexConvs define their convolutional kernels ψ as the product of the output of a neural network MLPψ with a Gaussian mask of local support . The neural network MLPψ parameterizes the kernel , and the Gaussian mask parameterizes its size ( Fig . 1 ) . Anisotropic Gaussian mask . Let G ( x ; µX , σ2X ) ∶= exp { − 12σ −2 X ( x − µX ) 2 } be a Gaussian function parameterized by a mean-variance tuple ( µX , σ2X ) . The anisotropic Gaussian mask is defined as : wgauss ( x , y ; { µX , σ2X , µY , σ2Y } ) = G ( x ; µX , σ2X ) G ( y ; µY , σ2Y ) . ( 1 ) By learning ( µX , σ2X ) and ( µY , σ2Y ) independently , anisotropic non-centered windows can be learned . 3.2 MULTIPLICATIVE ANISOTROPIC GABOR NETWORKS ( MAGNETS ) . In this section , we formalize our proposed parameterization for the kernel MLPψ . We start by introducing Multiplicative Filter Networks ( Fathony et al. , 2021 ) , and present our MAGNets next . Multiplicative Filter Networks ( MFNs ) . Recently , Fathony et al . ( 2021 ) proposed to construct implicit neural representations as the linear combination of exponentially many basis functions g : h ( 1 ) = g ( [ x , y ] ; θ ( 1 ) ) g ∶ R2 → RNhid ( 2 ) h ( l ) = ( W ( l ) h ( l−1 ) + b ( l ) ) ⋅ g ( [ x , y ] ; θ ( l ) ) W ( l ) ∈ RNhid×Nhid , b ( l ) ∈ RNhid ( 3 ) ψ ( x , y ) =W ( L ) h ( L−1 ) + b ( L ) W ( L ) ∈ RN×Nhid , b ( L ) ∈ RN ( 4 ) where { θ ( l ) , W ( l ) , b ( l ) } depict the learnable parameters of the bases and the affine transformations , and N , Nhid depict the number of output and hidden channels , respectively . Depending on the selection of g , MFNs obtain approximations comparable to those of SIRENs ( Sitzmann et al. , 2020 ) with faster convergence rate . The most successful instantiation of MNFs are the Multiplicative Gabor Network ( MGN ) : MFNs constructed with isotropic Gabor functions as basis g ( in Eq . 2 ) : g ( [ x , y ] ; θ ( l ) ) = exp ( − γ ( l ) 2 [ ( x −µ ( l ) ) 2 + ( y −µ ( l ) ) 2 ] ) Sin ( W ( l ) g ⋅ [ x , y ] + b ( l ) g ) , ( 5 ) θ ( l ) = { γ ( l ) ∈ RNhid , µ ( l ) ∈ RNhid , W ( l ) g ∈ RNhid×2 , b ( l ) g ∈ RNhid } . ( 6 ) Note that , by setting N=Nout×Nin , an MFN can parameterize a convolutional kernel with Nin input and Nout output channels . Fathony et al . ( 2021 ) show that MFNs are equivalent to a linear combination of exponentially many basis functions g. This allows us to analytically derive properties of MFN representations , and plays a crucial role in the derivation of alias-free MAGNets ( Sec . 3.3 ) . Multiplicative Anisotropic Gabor Networks ( MAGNets ) . Our MAGNet formulation is based on the observation that isotropic Gabor functions , i.e. , with equal γ for the horizontal and vertical directions , are undesirable as basis for the construction of MFNs . Whenever a frequency is required along a certain direction , an isotropic Gabor function automatically introduces that frequency in both directions . As a result , other bases must counteract this frequency in the direction where the frequency is not required , and thus the capacity of the MFN is not used optimally ( Daugman , 1988 ) . Following the original formulation of the 2D Gabor functions ( Daugman , 1988 ) , we alleviate this limitation by using anisotropic Gabor functions instead : g ( [ x , y ] ; θ ( l ) ) = exp ( − 1 2 [ ( γ ( l ) X ( x −µ ( l ) X ) ) 2 + ( γ ( l ) Y ( y −µ ( l ) Y ) ) 2 ] ) Sin ( W ( l ) g [ x , y ] + b ( l ) g ) ( 7 ) θ ( l ) = { γ ( l ) X ∈ R Nhid , γ ( l ) Y ∈ R Nhid , µ ( l ) X ∈ R Nhid , µ ( l ) Y ∈ R Nhid , W ( l ) g ∈ RNhid×2 , b ( l ) g ∈ RNhid } . ( 8 ) The resulting Multiplicative Anisotropic Gabor Network ( MAGNet ) obtains better control upon frequency components introduced to the approximation , and demonstrates important improvements in terms of descriptive power and convergence speed ( Sec . 4 ) . MAGNet initialization . Fathony et al . ( 2021 ) proposes to initialize MGNs by drawing the size of the Gaussian envelopes , i.e. , the γ ( l ) term , from a Gamma ( α ⋅ L−1 , β ) distribution at every layer l ∈ [ 1 , .. , L − 1 ] . We observe however that this initialization does not provide much variability on the initial extension of the Gaussian envelopes and in fact , most of them cover a large portion of the space at initialization . To stimulate diversity , we initialize the { γ ( l ) X , γ ( l ) Y } terms by a Gamma ( αl −1 , β ) distribution at the l-th layer . We observe that our proposed initialization consistently leads to better accuracy than the initialization of Fathony et al . ( 2021 ) across all tasks considered . ( Sec . 4 ) . | This paper proposed a new convolutional operation with varying-sized kernels. Flexconv constructs their convolutional kernels with the product between the CKConv and Gaussian masks so that the size of the kernels can be learned during training. Also, in the network of Flexconv, MAGNets allow the Flexconv to be used at higher resolutions without aliasing which are unseen resolution. The experiment on several sequential datasets showed that the classification performances from both TCN and ResNet based on FlexConv outperform that of state-of-the-art networks. | SP:c382410754ee56e795576439683f70b070c022ae |
BIGRoC: Boosting Image Generation via a Robust Classifier | The interest of the machine learning community in image synthesis has grown significantly in recent years , with the introduction of a wide range of deep generative models and means for training them . Such machines ’ ultimate goal is to match the distributions of the given training images and the synthesized ones . In this work , we propose a general model-agnostic technique for improving the image quality and the distribution fidelity of generated images , obtained by any generative model . Our method , termed BIGRoC ( boosting image generation via a robust classifier ) , is based on a post-processing procedure via the guidance of a given robust classifier and without a need for additional training of the generative model . Given a synthesized image , we propose to update it through projected gradient steps over the robust classifier , in an attempt to refine its recognition . We demonstrate this post-processing algorithm on various image synthesis methods and show a significant improvement of the generated images , both quantitatively and qualitatively . 1 INTRODUCTION . Deep generative models ( DGMs ) are a class of deep neural networks trained to model complicated high-dimensional data ( Bond-Taylor et al. , 2021 ) . Such models receive a large number of samples that follow a certain data distribution , x ∼ PD ( x ) , and aim to produce samples from the same statistics . One of the most fascinating generative tasks is image synthesis , which is notoriously hard , due to the complexity of the natural images ’ manifold . Nevertheless , deep generative models for image synthesis have gained tremendous popularity in recent years , revolutionized the field and became state-of-the-art in various tasks ( Brock et al. , 2019 ; Karras et al. , 2020b ; Zhu et al. , 2017 ) . Energybased models , variational autoencoders , generative adversarial networks ( GANs ) , autoregressive likelihood models , normalization flows , diffusion-based algorithms and more , all aim to synthesize natural-looking images , ranging from relatively simple to extremely complicated generators , often containing millions of parameters ( Kingma & Welling , 2014 ; Goodfellow et al. , 2014 ; Oord et al. , 2016 ; Rezende & Mohamed , 2015 ; Ho et al. , 2020 ) . When operating on a multiclass labeled dataset , as considered in this paper , image synthesis can be either conditional or unconditional . In the unconditional setup , the generative model aims to produce samples from the target data distribution without receiving any information regarding the target class of the synthesized images , i.e. , sample from PD ( x ) . In contrast , in the conditional setup , the generator goal is to synthesize images from a designated class , i.e. , sample from PD ( x|y ) where y is the label . As such , conditional generative models receive additional class-related information . Most of the work in the deep generative models ’ field has been focusing on improving the quality and the variety of the images produced by such models , tackled by seeking novel architectures and training procedures . In this work , while still aiming to improve the performance of trained generative models , we place a different emphasis than in most of these studies and propose a method for boosting generative models without any re-training or fine-tuning . More specifically , our method improves the perceptual quality of the images synthesized by any given model via an iterative postprocessing procedure driven by a robust classifier . With the introduction of learning-based machines into “ real-world ” applications , the interest in the robustness of such models has become a central concern . While there are abundant of definitions for robustness , the most common and studied is the adversarial one . This definition upholds if a classifier is robust to a small perturbation of its input , made by an adversary in order to fool it . Previous work ( Szegedy et al. , 2014 ) has demonstrated that deep neural networks are not robust at all and can be easily fooled by an adversary . In light of this observation , many robustification methods were proposed , but the most popular among these is adversarial training ( Goodfellow et al. , 2015 ) . According to this method , in order to train a robust classifier , one should generate adversarial examples and incorporate them into the training process . While examining the properties of such classifiers , researchers have revealed a fascinating phenomenon , called perceptually aligned gradients ( Tsipras et al. , 2019 ) . According to this tendency , a modification of an image that sharpens such a classifier ’ s decision yields visual features that are perceptually aligned with the target class . In other words , when drifting an image content to be better classified , the changes obtained are visually pleasing and faithful to natural image content . In this work we harness and utilize the above described phenomenon – we propose to iteratively modify the images created by a trained generative model , so as to maximize the conditional probability of a certain target class , approximated by a given robust classifier . This modification can potentially improve the quality of the synthesized images , since it emphasizes visual features that are aligned with images of the target class , thus boosting the generation process both in terms of perceptual quality and distribution faithfulness . We hypothesize that given an image dataset , the supervised training of a robust classifier is much simpler and effective than the unsupervised training of a generative model , thus enabling an indirect yet powerful improvement of generative models . We term this method “ BIGRoC ” – Boosting Image Generation via a Robust Classifier . The method presented in this article is general and model-agnostic , and it can be applied to any image generator , both conditional or unconditional . In the unconditional case , since we do not have a target class to guide the boosting process , we propose to estimate it via the trained robust classifier . The marked performance improvement achieved by our proposed method is demonstrated in a series of experiments on a wide range of image generators . We show that this approach enables us to significantly improve the quality of images synthesized by relatively simple models , boosting them to a level of more sophisticated and complex generators . Furthermore , we demonstrate the ability of our method to enhance the performance of higher-quality generative architectures , both qualitatively and quantitatively . In addition to our contribution on enhancing image generation performance , we leverage the same robust classifier and its perceptually aligned gradient property for proposing an adversarial technique for image interpolation . Our approach is inspired by two main works : Santurkar et al . ( 2019 ) and Turner et al . ( 2019 ) . Santurkar et al . ( 2019 ) have shown that a single robust classifier is capable of tackling various computer vision problems , such as generation , inpainting and image-to-image translation , all achieved by utilizing the perceptually aligned gradients phenomenon . Turner et al . ( 2019 ) aims at improving the generation quality of GANs , by discarding low quality images , identified by the GAN ’ s discriminator . While our work is related to the above two papers , it differs substantially in the following main characteristics : ( i ) While our boosting technique relies on the perceptually aligned gradient property as in Santurkar et al . ( 2019 ) , it builds on the outcome of pre-trained generative models , thus getting much higher quality images ; ( ii ) Our proposed boosting can operate on any image synthesizer ; and ( iii ) All images produced by the generator are taken into account , none being discarded . 2 BACKGROUND . 2.1 ADVERSARIAL EXAMPLES . Adversarial examples are instances that are intentionally designed by an attacker to cause a false prediction by a machine learning-based classifier ( Szegedy et al. , 2014 ) . The generation procedure of such examples is based on applying modifications to given training examples , while restricting the allowed perturbations ∆ . Ideally , the “ threat model ” ∆ should include all the possible perturbations that are unnoticeable to a human observer . As it is impossible to rigorously define such a set , in practice a simple subset of the ideal threat model is used , where the most common choices are the ` 2 and the ` ∞ balls : ∆ = { δ : ‖δ‖2/∞ ≤ } . Given ∆ , the attacker receives an instance x and generates x̂ = x + δ s.t . δ ∈ ∆ , while aiming to fool the classifier . Adversarial attacks can be both untargeted or targeted : An untargeted attack perturbs the input in a way that minimizes p ( y|x̂ ) with respect to δ . In contrast , a targeted attack receives in addition the target class ŷ , and perturbs x to maximize p ( ŷ|x̂ ) . There are diverse techniques for generating adversarial examples , yet , in this work , we focus on targeted attacks using the Projected Gradient Descent ( PGD ) method ( Madry et al. , 2018 ) – an iterative method for creating adversarial examples that operates as shown in Algorithm 1 . Algorithm 1 : Targeted Projected Gradient Descent ( PGD ) for adversarial targeted attacks Input : classifier fθ , input x , target class ŷ , , step size α , number of iterations T δ0 ← 0 for t from 0 to T do δt+1 = Π ( δt − α∇δ ` ( fθ ( x+ δt ) , ŷ ) ) ; end xadv = x+ δT Output : xadv The operation Π stands for a projection operator onto ∆ , and ` ( · ) is the classification loss . 2.2 ADVERSARIAL ROBUSTNESS . Adversarial robustness is a property of classifiers , according to which , applying small perturbation on a classifier ’ s input in order to fool it does not affect its prediction ( Goodfellow et al. , 2015 ) . To attain such classifiers , one should solve the following optimization problem : min θ ∑ x , y∈D max δ∈∆ ` ( fθ ( x+ δ ) , y ) ( 1 ) Namely , train the classifier to accurately predict the class labels of the ” toughest ” perturbed images , allowed by the threat model ∆ . In practice , solving this optimization problem is challenging , and there are several ways to attain an approximated solution . The most simple yet effective method is based on approximating the solution of the inner-maximization via adversarial attacks , such as PGD . According to this strategy , the above optimization is performed iteratively , fixing the classifier ’ s parameters θ and optimizing the attacks δ for each example via PGD , and then fixing these and updating θ . Repeating these steps results in a robust classifier , as we use in this work . 2.3 PERCEPTUALLY ALIGNED GRADIENTS . Perceptually aligned gradients is a phenomenon that occurs in adversarially trained models when modifying an image to maximize the probability assigned to a target class . Tsipras et al . ( 2019 ) show that performing the above PGD process on such models yields meaningful visual features that are perceptually aligned to the target class . It is important to note that this phenomenon does not occur in non-robust models . The perceptually aligned gradients property indicates that the features learned by robust models are more aligned with human perception . Figure 2 presents a visual demonstration of this fascinating phenomenon . | This paper presents a post-processing method to improve the GAN results. The post-processing consists of a projected gradient descent step to update the generated image to fit its target class, which works with both conditional/unconditional generative models. For the unconditional generative model, the authors design a de-bias method to force the model to uniformly generate images in each class. The results show this model can significantly improve the FID and IS scores on CIFAR-10 dataset. Additionally, the authors show this post-processing also works for image interpolation. | SP:5a9fa43a1c33676aa5f2c8391594ef036aa48403 |
BIGRoC: Boosting Image Generation via a Robust Classifier | The interest of the machine learning community in image synthesis has grown significantly in recent years , with the introduction of a wide range of deep generative models and means for training them . Such machines ’ ultimate goal is to match the distributions of the given training images and the synthesized ones . In this work , we propose a general model-agnostic technique for improving the image quality and the distribution fidelity of generated images , obtained by any generative model . Our method , termed BIGRoC ( boosting image generation via a robust classifier ) , is based on a post-processing procedure via the guidance of a given robust classifier and without a need for additional training of the generative model . Given a synthesized image , we propose to update it through projected gradient steps over the robust classifier , in an attempt to refine its recognition . We demonstrate this post-processing algorithm on various image synthesis methods and show a significant improvement of the generated images , both quantitatively and qualitatively . 1 INTRODUCTION . Deep generative models ( DGMs ) are a class of deep neural networks trained to model complicated high-dimensional data ( Bond-Taylor et al. , 2021 ) . Such models receive a large number of samples that follow a certain data distribution , x ∼ PD ( x ) , and aim to produce samples from the same statistics . One of the most fascinating generative tasks is image synthesis , which is notoriously hard , due to the complexity of the natural images ’ manifold . Nevertheless , deep generative models for image synthesis have gained tremendous popularity in recent years , revolutionized the field and became state-of-the-art in various tasks ( Brock et al. , 2019 ; Karras et al. , 2020b ; Zhu et al. , 2017 ) . Energybased models , variational autoencoders , generative adversarial networks ( GANs ) , autoregressive likelihood models , normalization flows , diffusion-based algorithms and more , all aim to synthesize natural-looking images , ranging from relatively simple to extremely complicated generators , often containing millions of parameters ( Kingma & Welling , 2014 ; Goodfellow et al. , 2014 ; Oord et al. , 2016 ; Rezende & Mohamed , 2015 ; Ho et al. , 2020 ) . When operating on a multiclass labeled dataset , as considered in this paper , image synthesis can be either conditional or unconditional . In the unconditional setup , the generative model aims to produce samples from the target data distribution without receiving any information regarding the target class of the synthesized images , i.e. , sample from PD ( x ) . In contrast , in the conditional setup , the generator goal is to synthesize images from a designated class , i.e. , sample from PD ( x|y ) where y is the label . As such , conditional generative models receive additional class-related information . Most of the work in the deep generative models ’ field has been focusing on improving the quality and the variety of the images produced by such models , tackled by seeking novel architectures and training procedures . In this work , while still aiming to improve the performance of trained generative models , we place a different emphasis than in most of these studies and propose a method for boosting generative models without any re-training or fine-tuning . More specifically , our method improves the perceptual quality of the images synthesized by any given model via an iterative postprocessing procedure driven by a robust classifier . With the introduction of learning-based machines into “ real-world ” applications , the interest in the robustness of such models has become a central concern . While there are abundant of definitions for robustness , the most common and studied is the adversarial one . This definition upholds if a classifier is robust to a small perturbation of its input , made by an adversary in order to fool it . Previous work ( Szegedy et al. , 2014 ) has demonstrated that deep neural networks are not robust at all and can be easily fooled by an adversary . In light of this observation , many robustification methods were proposed , but the most popular among these is adversarial training ( Goodfellow et al. , 2015 ) . According to this method , in order to train a robust classifier , one should generate adversarial examples and incorporate them into the training process . While examining the properties of such classifiers , researchers have revealed a fascinating phenomenon , called perceptually aligned gradients ( Tsipras et al. , 2019 ) . According to this tendency , a modification of an image that sharpens such a classifier ’ s decision yields visual features that are perceptually aligned with the target class . In other words , when drifting an image content to be better classified , the changes obtained are visually pleasing and faithful to natural image content . In this work we harness and utilize the above described phenomenon – we propose to iteratively modify the images created by a trained generative model , so as to maximize the conditional probability of a certain target class , approximated by a given robust classifier . This modification can potentially improve the quality of the synthesized images , since it emphasizes visual features that are aligned with images of the target class , thus boosting the generation process both in terms of perceptual quality and distribution faithfulness . We hypothesize that given an image dataset , the supervised training of a robust classifier is much simpler and effective than the unsupervised training of a generative model , thus enabling an indirect yet powerful improvement of generative models . We term this method “ BIGRoC ” – Boosting Image Generation via a Robust Classifier . The method presented in this article is general and model-agnostic , and it can be applied to any image generator , both conditional or unconditional . In the unconditional case , since we do not have a target class to guide the boosting process , we propose to estimate it via the trained robust classifier . The marked performance improvement achieved by our proposed method is demonstrated in a series of experiments on a wide range of image generators . We show that this approach enables us to significantly improve the quality of images synthesized by relatively simple models , boosting them to a level of more sophisticated and complex generators . Furthermore , we demonstrate the ability of our method to enhance the performance of higher-quality generative architectures , both qualitatively and quantitatively . In addition to our contribution on enhancing image generation performance , we leverage the same robust classifier and its perceptually aligned gradient property for proposing an adversarial technique for image interpolation . Our approach is inspired by two main works : Santurkar et al . ( 2019 ) and Turner et al . ( 2019 ) . Santurkar et al . ( 2019 ) have shown that a single robust classifier is capable of tackling various computer vision problems , such as generation , inpainting and image-to-image translation , all achieved by utilizing the perceptually aligned gradients phenomenon . Turner et al . ( 2019 ) aims at improving the generation quality of GANs , by discarding low quality images , identified by the GAN ’ s discriminator . While our work is related to the above two papers , it differs substantially in the following main characteristics : ( i ) While our boosting technique relies on the perceptually aligned gradient property as in Santurkar et al . ( 2019 ) , it builds on the outcome of pre-trained generative models , thus getting much higher quality images ; ( ii ) Our proposed boosting can operate on any image synthesizer ; and ( iii ) All images produced by the generator are taken into account , none being discarded . 2 BACKGROUND . 2.1 ADVERSARIAL EXAMPLES . Adversarial examples are instances that are intentionally designed by an attacker to cause a false prediction by a machine learning-based classifier ( Szegedy et al. , 2014 ) . The generation procedure of such examples is based on applying modifications to given training examples , while restricting the allowed perturbations ∆ . Ideally , the “ threat model ” ∆ should include all the possible perturbations that are unnoticeable to a human observer . As it is impossible to rigorously define such a set , in practice a simple subset of the ideal threat model is used , where the most common choices are the ` 2 and the ` ∞ balls : ∆ = { δ : ‖δ‖2/∞ ≤ } . Given ∆ , the attacker receives an instance x and generates x̂ = x + δ s.t . δ ∈ ∆ , while aiming to fool the classifier . Adversarial attacks can be both untargeted or targeted : An untargeted attack perturbs the input in a way that minimizes p ( y|x̂ ) with respect to δ . In contrast , a targeted attack receives in addition the target class ŷ , and perturbs x to maximize p ( ŷ|x̂ ) . There are diverse techniques for generating adversarial examples , yet , in this work , we focus on targeted attacks using the Projected Gradient Descent ( PGD ) method ( Madry et al. , 2018 ) – an iterative method for creating adversarial examples that operates as shown in Algorithm 1 . Algorithm 1 : Targeted Projected Gradient Descent ( PGD ) for adversarial targeted attacks Input : classifier fθ , input x , target class ŷ , , step size α , number of iterations T δ0 ← 0 for t from 0 to T do δt+1 = Π ( δt − α∇δ ` ( fθ ( x+ δt ) , ŷ ) ) ; end xadv = x+ δT Output : xadv The operation Π stands for a projection operator onto ∆ , and ` ( · ) is the classification loss . 2.2 ADVERSARIAL ROBUSTNESS . Adversarial robustness is a property of classifiers , according to which , applying small perturbation on a classifier ’ s input in order to fool it does not affect its prediction ( Goodfellow et al. , 2015 ) . To attain such classifiers , one should solve the following optimization problem : min θ ∑ x , y∈D max δ∈∆ ` ( fθ ( x+ δ ) , y ) ( 1 ) Namely , train the classifier to accurately predict the class labels of the ” toughest ” perturbed images , allowed by the threat model ∆ . In practice , solving this optimization problem is challenging , and there are several ways to attain an approximated solution . The most simple yet effective method is based on approximating the solution of the inner-maximization via adversarial attacks , such as PGD . According to this strategy , the above optimization is performed iteratively , fixing the classifier ’ s parameters θ and optimizing the attacks δ for each example via PGD , and then fixing these and updating θ . Repeating these steps results in a robust classifier , as we use in this work . 2.3 PERCEPTUALLY ALIGNED GRADIENTS . Perceptually aligned gradients is a phenomenon that occurs in adversarially trained models when modifying an image to maximize the probability assigned to a target class . Tsipras et al . ( 2019 ) show that performing the above PGD process on such models yields meaningful visual features that are perceptually aligned to the target class . It is important to note that this phenomenon does not occur in non-robust models . The perceptually aligned gradients property indicates that the features learned by robust models are more aligned with human perception . Figure 2 presents a visual demonstration of this fascinating phenomenon . | The paper proposes BIGRoC (Boosting Image Generation via a Robust Classifier), a method to refine samples from a base generative model using a robust classifier. In this context, a robust classifier means one that has been trained to be robust to adversarial samples. Given a robust classifier and a base generative model (both trained on the same dataset), the key idea involves using the gradients of the robust classifier to update samples generated from the base generative model in the direction that maximizes the conditional probability of the samples' class. Experiments on the CIFAR-10 dataset have been presented that demonstrate that BIGRoC improves the sample quality from several base generative models in terms of the FID and IS metrics. | SP:5a9fa43a1c33676aa5f2c8391594ef036aa48403 |
BIGRoC: Boosting Image Generation via a Robust Classifier | The interest of the machine learning community in image synthesis has grown significantly in recent years , with the introduction of a wide range of deep generative models and means for training them . Such machines ’ ultimate goal is to match the distributions of the given training images and the synthesized ones . In this work , we propose a general model-agnostic technique for improving the image quality and the distribution fidelity of generated images , obtained by any generative model . Our method , termed BIGRoC ( boosting image generation via a robust classifier ) , is based on a post-processing procedure via the guidance of a given robust classifier and without a need for additional training of the generative model . Given a synthesized image , we propose to update it through projected gradient steps over the robust classifier , in an attempt to refine its recognition . We demonstrate this post-processing algorithm on various image synthesis methods and show a significant improvement of the generated images , both quantitatively and qualitatively . 1 INTRODUCTION . Deep generative models ( DGMs ) are a class of deep neural networks trained to model complicated high-dimensional data ( Bond-Taylor et al. , 2021 ) . Such models receive a large number of samples that follow a certain data distribution , x ∼ PD ( x ) , and aim to produce samples from the same statistics . One of the most fascinating generative tasks is image synthesis , which is notoriously hard , due to the complexity of the natural images ’ manifold . Nevertheless , deep generative models for image synthesis have gained tremendous popularity in recent years , revolutionized the field and became state-of-the-art in various tasks ( Brock et al. , 2019 ; Karras et al. , 2020b ; Zhu et al. , 2017 ) . Energybased models , variational autoencoders , generative adversarial networks ( GANs ) , autoregressive likelihood models , normalization flows , diffusion-based algorithms and more , all aim to synthesize natural-looking images , ranging from relatively simple to extremely complicated generators , often containing millions of parameters ( Kingma & Welling , 2014 ; Goodfellow et al. , 2014 ; Oord et al. , 2016 ; Rezende & Mohamed , 2015 ; Ho et al. , 2020 ) . When operating on a multiclass labeled dataset , as considered in this paper , image synthesis can be either conditional or unconditional . In the unconditional setup , the generative model aims to produce samples from the target data distribution without receiving any information regarding the target class of the synthesized images , i.e. , sample from PD ( x ) . In contrast , in the conditional setup , the generator goal is to synthesize images from a designated class , i.e. , sample from PD ( x|y ) where y is the label . As such , conditional generative models receive additional class-related information . Most of the work in the deep generative models ’ field has been focusing on improving the quality and the variety of the images produced by such models , tackled by seeking novel architectures and training procedures . In this work , while still aiming to improve the performance of trained generative models , we place a different emphasis than in most of these studies and propose a method for boosting generative models without any re-training or fine-tuning . More specifically , our method improves the perceptual quality of the images synthesized by any given model via an iterative postprocessing procedure driven by a robust classifier . With the introduction of learning-based machines into “ real-world ” applications , the interest in the robustness of such models has become a central concern . While there are abundant of definitions for robustness , the most common and studied is the adversarial one . This definition upholds if a classifier is robust to a small perturbation of its input , made by an adversary in order to fool it . Previous work ( Szegedy et al. , 2014 ) has demonstrated that deep neural networks are not robust at all and can be easily fooled by an adversary . In light of this observation , many robustification methods were proposed , but the most popular among these is adversarial training ( Goodfellow et al. , 2015 ) . According to this method , in order to train a robust classifier , one should generate adversarial examples and incorporate them into the training process . While examining the properties of such classifiers , researchers have revealed a fascinating phenomenon , called perceptually aligned gradients ( Tsipras et al. , 2019 ) . According to this tendency , a modification of an image that sharpens such a classifier ’ s decision yields visual features that are perceptually aligned with the target class . In other words , when drifting an image content to be better classified , the changes obtained are visually pleasing and faithful to natural image content . In this work we harness and utilize the above described phenomenon – we propose to iteratively modify the images created by a trained generative model , so as to maximize the conditional probability of a certain target class , approximated by a given robust classifier . This modification can potentially improve the quality of the synthesized images , since it emphasizes visual features that are aligned with images of the target class , thus boosting the generation process both in terms of perceptual quality and distribution faithfulness . We hypothesize that given an image dataset , the supervised training of a robust classifier is much simpler and effective than the unsupervised training of a generative model , thus enabling an indirect yet powerful improvement of generative models . We term this method “ BIGRoC ” – Boosting Image Generation via a Robust Classifier . The method presented in this article is general and model-agnostic , and it can be applied to any image generator , both conditional or unconditional . In the unconditional case , since we do not have a target class to guide the boosting process , we propose to estimate it via the trained robust classifier . The marked performance improvement achieved by our proposed method is demonstrated in a series of experiments on a wide range of image generators . We show that this approach enables us to significantly improve the quality of images synthesized by relatively simple models , boosting them to a level of more sophisticated and complex generators . Furthermore , we demonstrate the ability of our method to enhance the performance of higher-quality generative architectures , both qualitatively and quantitatively . In addition to our contribution on enhancing image generation performance , we leverage the same robust classifier and its perceptually aligned gradient property for proposing an adversarial technique for image interpolation . Our approach is inspired by two main works : Santurkar et al . ( 2019 ) and Turner et al . ( 2019 ) . Santurkar et al . ( 2019 ) have shown that a single robust classifier is capable of tackling various computer vision problems , such as generation , inpainting and image-to-image translation , all achieved by utilizing the perceptually aligned gradients phenomenon . Turner et al . ( 2019 ) aims at improving the generation quality of GANs , by discarding low quality images , identified by the GAN ’ s discriminator . While our work is related to the above two papers , it differs substantially in the following main characteristics : ( i ) While our boosting technique relies on the perceptually aligned gradient property as in Santurkar et al . ( 2019 ) , it builds on the outcome of pre-trained generative models , thus getting much higher quality images ; ( ii ) Our proposed boosting can operate on any image synthesizer ; and ( iii ) All images produced by the generator are taken into account , none being discarded . 2 BACKGROUND . 2.1 ADVERSARIAL EXAMPLES . Adversarial examples are instances that are intentionally designed by an attacker to cause a false prediction by a machine learning-based classifier ( Szegedy et al. , 2014 ) . The generation procedure of such examples is based on applying modifications to given training examples , while restricting the allowed perturbations ∆ . Ideally , the “ threat model ” ∆ should include all the possible perturbations that are unnoticeable to a human observer . As it is impossible to rigorously define such a set , in practice a simple subset of the ideal threat model is used , where the most common choices are the ` 2 and the ` ∞ balls : ∆ = { δ : ‖δ‖2/∞ ≤ } . Given ∆ , the attacker receives an instance x and generates x̂ = x + δ s.t . δ ∈ ∆ , while aiming to fool the classifier . Adversarial attacks can be both untargeted or targeted : An untargeted attack perturbs the input in a way that minimizes p ( y|x̂ ) with respect to δ . In contrast , a targeted attack receives in addition the target class ŷ , and perturbs x to maximize p ( ŷ|x̂ ) . There are diverse techniques for generating adversarial examples , yet , in this work , we focus on targeted attacks using the Projected Gradient Descent ( PGD ) method ( Madry et al. , 2018 ) – an iterative method for creating adversarial examples that operates as shown in Algorithm 1 . Algorithm 1 : Targeted Projected Gradient Descent ( PGD ) for adversarial targeted attacks Input : classifier fθ , input x , target class ŷ , , step size α , number of iterations T δ0 ← 0 for t from 0 to T do δt+1 = Π ( δt − α∇δ ` ( fθ ( x+ δt ) , ŷ ) ) ; end xadv = x+ δT Output : xadv The operation Π stands for a projection operator onto ∆ , and ` ( · ) is the classification loss . 2.2 ADVERSARIAL ROBUSTNESS . Adversarial robustness is a property of classifiers , according to which , applying small perturbation on a classifier ’ s input in order to fool it does not affect its prediction ( Goodfellow et al. , 2015 ) . To attain such classifiers , one should solve the following optimization problem : min θ ∑ x , y∈D max δ∈∆ ` ( fθ ( x+ δ ) , y ) ( 1 ) Namely , train the classifier to accurately predict the class labels of the ” toughest ” perturbed images , allowed by the threat model ∆ . In practice , solving this optimization problem is challenging , and there are several ways to attain an approximated solution . The most simple yet effective method is based on approximating the solution of the inner-maximization via adversarial attacks , such as PGD . According to this strategy , the above optimization is performed iteratively , fixing the classifier ’ s parameters θ and optimizing the attacks δ for each example via PGD , and then fixing these and updating θ . Repeating these steps results in a robust classifier , as we use in this work . 2.3 PERCEPTUALLY ALIGNED GRADIENTS . Perceptually aligned gradients is a phenomenon that occurs in adversarially trained models when modifying an image to maximize the probability assigned to a target class . Tsipras et al . ( 2019 ) show that performing the above PGD process on such models yields meaningful visual features that are perceptually aligned to the target class . It is important to note that this phenomenon does not occur in non-robust models . The perceptually aligned gradients property indicates that the features learned by robust models are more aligned with human perception . Figure 2 presents a visual demonstration of this fascinating phenomenon . | This paper proposes a model-agnostic method for improving the quality of images produced by generative models. The method requires a robust classifier trained on the same data source as the generative models. Based on the perceptually aligned gradients phenomenon, the proposed method improves the quality of a generated image by the targeted projected gradient descent method with the help of the robust classifier. Experiments on CIFAR-10 show that the proposed method does improve several generative models both quantitively and qualitatively. | SP:5a9fa43a1c33676aa5f2c8391594ef036aa48403 |
Towards Uncertainties in Deep Learning that Are Accurate and Calibrated | 1 INTRODUCTION . Probabilistic forecasts can be characterized by two properties—calibration and sharpness ( Gneiting et al. , 2007 ) . Intuitively , calibration means that a 90 % confidence interval contains the true outcome 90 % of the time . Sharpness means that these confidence intervals are narrow . These qualities are grounded in the statistics literature on proper scoring rules , and are widely used to evaluate forecasts ( Gneiting and Raftery , 2005 ; 2007 ) in domains such as medicine ( Saria , 2018 ) , robotic control ( Malik et al. , 2019 ) , and human-in-the-loop learning ( Werling et al. , 2015 ) . This paper introduces algorithms that ensure the calibration of any predictive machine learning model while maintaining sharpness . They apply to both classification and regression tasks and guarantee the strong property of distribution calibration ( which generalizes standard quantile and classification-based calibration ; Song et al . ( 2019 ) ) in any model , including deep learning models , which are often miscalibrated ( Guo et al. , 2017 ) . Unlike existing methods for distribution calibration ( Song et al. , 2019 ) , ours can be used with any model ( not just ones that output Gaussians ) , are very simple to implement in differentiable programming frameworks , and have theoretical guarantees . Importantly , our algorithms achieve for the first time a long-standing statistical principle that forecasts should “ maximize sharpness subject to being calibrated ” proposed by Gneiting et al . ( 2007 ) . We prove that under some assumptions this principle is achievable in modern machine learning models in a black-box manner and without sacrificing overall performance . This lends strong support for this principle as a way of reasoning about uncertainty in machine learning . In a sense , calibration is a rare free lunch in machine learning , and we argue that it should be enforced in predictive models and taken advantage of in downstream applications . Empirically , we find that our method consistently outputs well-calibrated predictions across a wide range of experiments , while improving performance on downstream tasks with minimal implementation overhead . Contributions . In summary , we make three contributions . We propose a new recalibration technique that ( a ) is among the only to guarantee distribution calibration besides Song et al . ( 2019 ) . Unlike Song et al . ( 2019 ) we can ( b ) recalibrate any parametric distribution ( not just Gaussians ) and ( c ) our method is simpler . While theirs is based on variational inference in Gaussian processes , ours uses a neural network that can be implemented in a few lines of code , which encourages adoption . Our method ( d ) applies to both classification and regression and ( e ) outperforms methods by Song et al . ( 2019 ) and Kuleshov et al . ( 2018 ) as well as Platt and temperature scaling . We also formally prove that our technique produces asymptotically distributionally calibrated forecasts while minimizing regret . Most methods ( e.g. , Platt , Kuleshov scaling , Song et al. , etc . ) do not have a correctness proof , except for conformal prediction , which is significantly more complex . Finally , our analysis formalizes the well-known paradigm of Gneiting et al . ( 2007 ) and provides the first method that provably achieves it . This lends strong support for this principle and influences how one should reason about uncertainty in machine learning . An important takeaway is that calibration can be achieved in most applications of machine learning with very little cost . As such , calibration can be a rare free lunch that we believe should be leveraged throughout machine learning . 2 BACKGROUND . 2.1 PREDICTIVE UNCERTAINTY IN MACHINE LEARNING . Supervised machine learning models commonly predict a probability distribution over the output variables — e.g . class membership probabilities or the parameters of an exponential family distribution . These predictive uncertainties are useful for interpretability , safety , and downstream decisionmaking . Aleatoric uncertainty captures the inherent noise in the data , while epistemic uncertainty arises from not having a large enough dataset to estimate model parameters ( Kendall and Gal , 2017 ) . Notation . Formally , we say that a machine learning forecaster H : X → ∆ ( Y ) outputs a probability distribution F ( y ) : Y → [ 0 , 1 ] in the space ∆ ( Y ) of distributions over y . We use f to denote the probability density or probability mass function associated with F . The model H is trained on a labeled dataset xt , yt ∈ X ×Y for t = 1 , 2 , ... , T of i.i.d . realizations of random variablesX , Y ∼ P , where P is the data distribution . 2.2 WHAT DEFINES GOOD PREDICTIVE UNCERTAINTIES ? . The standard tool in statistics for evaluating the quality of predictive uncertainties is a proper scoring rule ( Gneiting and Raftery , 2007 ) . Formally , a scoring rule S : ∆ ( Y ) × Y → R assigns a “ score ” to a probabilistic forecast F ∈ ∆ ( Y ) and a realized outcome y ∈ Y . Given a true distribution G ∈ ∆ ( Y ) for y , we use the notation S ( F , G ) for the expected score S ( F , G ) = Ey∼GS ( F , y ) . We say that a score S is proper if it is minimized by G when G is the true distribution for y : S ( F , G ) ≥ S ( G , G ) for all F . When S is proper , we also refer to it as a proper loss . An example of a proper loss is the log-likelihood S ( F , y ) = log f ( y ) , where f is the probability density or probability mass function of F . Another common loss is the check score ρτ ( y , f ) = τ ( y − f ) if y ≥ f and ( 1 − τ ) ( f − y ) otherwise ; it can be used to estimate the τ -th quantile of a distribution . See Table 1 for additional examples . What are the qualities of a good probabilistic prediction , as measured by a proper scoring rule ? It can be shown that every proper score is a sum of the following terms ( Gneiting et al. , 2007 ) : proper loss = calibration−sharpness + irreducible term︸ ︷︷ ︸ refinement term . Thus , there are precisely two qualities that define an ideal forecast : calibration and sharpness . We examine each of them next . 2.3 CALIBRATION AND SHARPNESS — TWO QUALITIES OF AN IDEAL PREDICTION . Formally , calibration can be defined by the equation P ( Y = y | FX = F ) = f ( y ) for all y ∈ Y , F ∈ ∆ ( Y ) , ( 1 ) where X , Y ∼ P are random variables corresponding to the input features and targets , and FX = H ( X ) is the forecast at X , itself a random variable that takes values in ∆ ( Y ) . We use f to denote the probability density or probability mass function associated with F . When Y = { 0 , 1 } and FX is a Bernoulli distribution with parameter p , we can write ( 1 ) as P ( Y = 1 | FX = p ) = p. This has a simple intuition : the true probability of Y = 1 is p conditioned on predicting it as p. Equation 1 extends beyond binary classification to arbitrary distributions . For example , if F is a Gaussian with variance σ2 , this definition asks that the data distribution conditioned on predicting F also has variance σ2 . This recently proposed definition is called distribution calibration ( Song et al. , 2019 ) . A closely related , but weaker concept is quantile calibration ( Kuleshov et al. , 2018 ) , which asks that a 90 % confidence interval contains the true value 90 % of the time . Formally , it can be written as : P ( Y ≤ CDF−1FX ( p ) ) = p for all p ∈ [ 0 , 1 ] , Quantile calibration is implied by distributional calibration ( Song et al. , 2019 ) . Calibration by itself is not sufficient to produce a useful forecast . For example , it is easy to see that a binary classifier that always outputs P ( Y = 1 ) as the probability that Y = 1 is calibrated ; however it does not even use the features X and thus can not be accurate . In order to be useful , forecasts must also be sharp . Intuitively , this means that predicted confidence intervals should be as tight as possible around a single value . This is captured by proper scoring rules as part of a refinement term ( see Table 1 ) , which equals an irreducible term minus a sharpness term ( Murphy , 1973 ; Brocker , 2009 ) . The latter is maximized when we minimize the scoring rule . Are Modern Machine Learning Models Calibrated And Sharp ? Most machine learning models are not calibrated out-of-the-box ( Niculescu-Mizil and Caruana , 2005 ; Guo et al. , 2017 ) . Two reason for this are the limited expressivity of the model H—we can not perfectly fit the entirety of the level curves of the data distribution—and computational approximations—computing extract predictive uncertainties may be intractable , and approximations are not entirely accurate . A final reason stems from how models are trained—since we can not fit a perfect H , standard objective functions induce a tradeoff between sharp and calibrated forecasts . Next , we will show that by training models differently , we can achieve calibration without sacrificing performance . 3 ENSURING DISTRIBUTION CALIBRATION IN ANY MODEL . This section introduces algorithms that ensure the distirbutional calibration of any predictive machine learning model while maintaining sharpness . Unlike existing methods for distribution calibration , ours can be used with any model ( not just ones that output Gaussians ) , are very simple to implement in differentiable programming frameworks , and have theoretical guarantees . We first assume there exists a parameterization Φ1 of the probabilities returned by forecaster H : for each p ∈ ∆ ( Y ) returned by H , there exist parameters φ ∈ Φ1 that describe p. The φ can be the natural parameters of an exponential family distribution , such as ( µ , σ2 ) describing a Gaussian . We consider a class of algorithms based on a classic approach called recalibration . First , we train a base forecaster H to minimize a proper loss L. Then , we train an auxiliary model R : Φ1 → Φ2 ( called the recalibrator ) over the outputs of H that outputs the parameters φ2 ∈ Φ2 of another distribution such that L is minimized . Here Φ2 is a second parameterization of ∆ ( Y ) ( possibly the same ) . As a result , the forecasts ( R ◦H ) ( X ) will be calibrated . We provide details in Algorithm 1 . Algorithm 1 Calibrated Learning of Probabilistic Models . Input : Model H : X → Φ1 , recalibrator R : Φ1 → Φ2 , training set D , recalibration set C Output : Recalibrated model R ◦H : X → Φ2 . 1 . Fit the base model on D : minH ∑ ( x , y ) ∈D L ( H ( x ) , y ) 2 . Fit the recalibration model R on the output of H on C : minR ∑ ( x , y ) ∈C L ( ( R ◦H ) ( x ) , y ) Implementing this approach requires choosing parameterizations of probabilities Φ1 , Φ2 , a recalibration model R , and an objective L. We discuss these choices below ; then we clarify how 1 differs from existing recalibration algorithms . Parameterizing Probability Distributions . When fitting a classification model , each distribution ∆ ( Y ) is a categorical and can be parameterized via its K ≥ 2 class membership probabilities . In regression , most widely used models such as neural networks already output parameterized probabilities , in which the φ are usually the natural parameters of an exponential family model . In the most general case , if we only have black-box access to a density function or a cumulative distribution function , we may form a d-dimensional representation by evaluating the distribution at a grid of d points . For example , if we have black-box access to a quantile function F−1 , we may featurize F via its sequence of quantiles φ ( F ) = ( F−1 ( αi ) ) di=1 for some sequence of d levels αi , possibly chosen uniformly in [ 0 , 1 ] . In addition to the above techniques , the representation of output probabilities in Φ2 coming from R can leverage flexible invertible models of the CDF , following methods developed in the normalizing flow literature , including monotonic neural networks , sum-of-squares polynomials ( Wehenkel and Louppe , 2019 ; Jaini et al. , 2019 ) spline functions ( Muller et al. , 2019 ; Durkan et al. , 2019 ) , piecewise separable models ( Wehenkel and Louppe , 2019 ) , and others . Choosing a Recalibrator . Ideal recalibrators are highly effective at optimizing the proper loss L ( see Section 4 ) . In a simple setting like binary classification , our task reduces to one-dimensional density estimation ; in such cases we can provably achieve calibration asymptotically by using kernel density estimation for the recalibrator R , while controlling the kernel width as a function of the dataset size to trade off overfitting and underfitting ( Wasserman , 2006 ) . In regression settings , we may rely on other non-parametric techniques such as Gaussian processes . An alternative approach is to rely on expressive neural networks ; although their optimization is a non-convex , they are very effective at fitting proper losses L , feature mature regularization techniques , and can be implemented easily within deep learning frameworks , possibly within the same computation graph as a neural forecaster H , which can simplify deployment . In the classification setting , a natural architecture for R is a sequence of dense layers mapping the simplex ∆K into ∆K . In regression settings , R needs to output a density function : a natural architecture for this is a mixture density network ( MDN ; Bishop ( 1994 ) ) . Choosing a Proper Loss A natural choice of proper loss is the log-loss . It applies in both calibration and regression ; optimizing it is a standard supervised learning problem . In regression settings , we found that using the quantile loss L = Eτ∈U [ 0,1 ] Ey∼Gρτ ( y − F−1 ( τ ) ) ( see Table 1 ) was numerically stable and produced the best performance . This objective fits a model Rθ ( τ ; φ ) to estimate the τ -th conditional quantile F−1 ( τ ) at φ . When Rθ ( τ ; φ ) is a neural network that takes in τ and x , we minimize the quantile loss Eτ∈U [ 0,1 ] Ey∼Gρτ ( y − F−1 ( τ ) ) using gradient descent , approximating both expectations using Monte Carlo ( details are in the experiments section ) . Comparing Against Song et al . Interestingly , the method of Song et al . ( 2019 ) is a special case of ours when Φ1 consists of Gaussian natural parameters , Φ2 consists of parameters for the Beta link function , R is a Gaussian process , and L is the log-likelihood . However , the resulting problem can only be solved using variational inference , which is slow and complex to implement . Our framework instead admits simple solutions based on gradient descent . Comparing Against Other Approaches . Algorithm 1 performs recalibration like many previous methods ( e.g. , Platt , Kuleshov et al. , Song et al. , etc . ) ; it may thus appear to be the same as these methods . However , that is not the case . First , existing recalibration approaches operate over the space of probabilities ( class probabilities or CDF values ) ; ours operates over functional parameters . This is what enables it to achieve distribution rather than quantile calibration ( Kuleshov et al. , 2018 ) . Our approach also involves novel recalibration objectives ( e.g. , the quantile divergence in regression ) which differ from the calibration error of Kuleshov et al . ( 2018 ) . We also use different types of models ( small neural networks instead of isotonic regression ) and different optimization procedures used ( stochastic gradient descent instead of variational inference ) . Thus , our recalibration strategy is distinct from previous work . | This paper proposes to re-calibrate the probabilistic predictions of machine learning models by learning a secondary function that maps from their output parameters to a new set of calibrated distribution parameters. The secondary function is learnt on a held out set. The paper argues for the use of flexible recalibration methods, appealing to their asymptotic optimality. Experiments are performed on 8 UCI regression datasets, MNIST, SVHN and CIFAR10. NNs are used as both primary and recalibration models. Superior results are obtained compared to some recent baselines. | SP:c1e4bc9820c82128dea440b475f137ac49c96963 |
Towards Uncertainties in Deep Learning that Are Accurate and Calibrated | 1 INTRODUCTION . Probabilistic forecasts can be characterized by two properties—calibration and sharpness ( Gneiting et al. , 2007 ) . Intuitively , calibration means that a 90 % confidence interval contains the true outcome 90 % of the time . Sharpness means that these confidence intervals are narrow . These qualities are grounded in the statistics literature on proper scoring rules , and are widely used to evaluate forecasts ( Gneiting and Raftery , 2005 ; 2007 ) in domains such as medicine ( Saria , 2018 ) , robotic control ( Malik et al. , 2019 ) , and human-in-the-loop learning ( Werling et al. , 2015 ) . This paper introduces algorithms that ensure the calibration of any predictive machine learning model while maintaining sharpness . They apply to both classification and regression tasks and guarantee the strong property of distribution calibration ( which generalizes standard quantile and classification-based calibration ; Song et al . ( 2019 ) ) in any model , including deep learning models , which are often miscalibrated ( Guo et al. , 2017 ) . Unlike existing methods for distribution calibration ( Song et al. , 2019 ) , ours can be used with any model ( not just ones that output Gaussians ) , are very simple to implement in differentiable programming frameworks , and have theoretical guarantees . Importantly , our algorithms achieve for the first time a long-standing statistical principle that forecasts should “ maximize sharpness subject to being calibrated ” proposed by Gneiting et al . ( 2007 ) . We prove that under some assumptions this principle is achievable in modern machine learning models in a black-box manner and without sacrificing overall performance . This lends strong support for this principle as a way of reasoning about uncertainty in machine learning . In a sense , calibration is a rare free lunch in machine learning , and we argue that it should be enforced in predictive models and taken advantage of in downstream applications . Empirically , we find that our method consistently outputs well-calibrated predictions across a wide range of experiments , while improving performance on downstream tasks with minimal implementation overhead . Contributions . In summary , we make three contributions . We propose a new recalibration technique that ( a ) is among the only to guarantee distribution calibration besides Song et al . ( 2019 ) . Unlike Song et al . ( 2019 ) we can ( b ) recalibrate any parametric distribution ( not just Gaussians ) and ( c ) our method is simpler . While theirs is based on variational inference in Gaussian processes , ours uses a neural network that can be implemented in a few lines of code , which encourages adoption . Our method ( d ) applies to both classification and regression and ( e ) outperforms methods by Song et al . ( 2019 ) and Kuleshov et al . ( 2018 ) as well as Platt and temperature scaling . We also formally prove that our technique produces asymptotically distributionally calibrated forecasts while minimizing regret . Most methods ( e.g. , Platt , Kuleshov scaling , Song et al. , etc . ) do not have a correctness proof , except for conformal prediction , which is significantly more complex . Finally , our analysis formalizes the well-known paradigm of Gneiting et al . ( 2007 ) and provides the first method that provably achieves it . This lends strong support for this principle and influences how one should reason about uncertainty in machine learning . An important takeaway is that calibration can be achieved in most applications of machine learning with very little cost . As such , calibration can be a rare free lunch that we believe should be leveraged throughout machine learning . 2 BACKGROUND . 2.1 PREDICTIVE UNCERTAINTY IN MACHINE LEARNING . Supervised machine learning models commonly predict a probability distribution over the output variables — e.g . class membership probabilities or the parameters of an exponential family distribution . These predictive uncertainties are useful for interpretability , safety , and downstream decisionmaking . Aleatoric uncertainty captures the inherent noise in the data , while epistemic uncertainty arises from not having a large enough dataset to estimate model parameters ( Kendall and Gal , 2017 ) . Notation . Formally , we say that a machine learning forecaster H : X → ∆ ( Y ) outputs a probability distribution F ( y ) : Y → [ 0 , 1 ] in the space ∆ ( Y ) of distributions over y . We use f to denote the probability density or probability mass function associated with F . The model H is trained on a labeled dataset xt , yt ∈ X ×Y for t = 1 , 2 , ... , T of i.i.d . realizations of random variablesX , Y ∼ P , where P is the data distribution . 2.2 WHAT DEFINES GOOD PREDICTIVE UNCERTAINTIES ? . The standard tool in statistics for evaluating the quality of predictive uncertainties is a proper scoring rule ( Gneiting and Raftery , 2007 ) . Formally , a scoring rule S : ∆ ( Y ) × Y → R assigns a “ score ” to a probabilistic forecast F ∈ ∆ ( Y ) and a realized outcome y ∈ Y . Given a true distribution G ∈ ∆ ( Y ) for y , we use the notation S ( F , G ) for the expected score S ( F , G ) = Ey∼GS ( F , y ) . We say that a score S is proper if it is minimized by G when G is the true distribution for y : S ( F , G ) ≥ S ( G , G ) for all F . When S is proper , we also refer to it as a proper loss . An example of a proper loss is the log-likelihood S ( F , y ) = log f ( y ) , where f is the probability density or probability mass function of F . Another common loss is the check score ρτ ( y , f ) = τ ( y − f ) if y ≥ f and ( 1 − τ ) ( f − y ) otherwise ; it can be used to estimate the τ -th quantile of a distribution . See Table 1 for additional examples . What are the qualities of a good probabilistic prediction , as measured by a proper scoring rule ? It can be shown that every proper score is a sum of the following terms ( Gneiting et al. , 2007 ) : proper loss = calibration−sharpness + irreducible term︸ ︷︷ ︸ refinement term . Thus , there are precisely two qualities that define an ideal forecast : calibration and sharpness . We examine each of them next . 2.3 CALIBRATION AND SHARPNESS — TWO QUALITIES OF AN IDEAL PREDICTION . Formally , calibration can be defined by the equation P ( Y = y | FX = F ) = f ( y ) for all y ∈ Y , F ∈ ∆ ( Y ) , ( 1 ) where X , Y ∼ P are random variables corresponding to the input features and targets , and FX = H ( X ) is the forecast at X , itself a random variable that takes values in ∆ ( Y ) . We use f to denote the probability density or probability mass function associated with F . When Y = { 0 , 1 } and FX is a Bernoulli distribution with parameter p , we can write ( 1 ) as P ( Y = 1 | FX = p ) = p. This has a simple intuition : the true probability of Y = 1 is p conditioned on predicting it as p. Equation 1 extends beyond binary classification to arbitrary distributions . For example , if F is a Gaussian with variance σ2 , this definition asks that the data distribution conditioned on predicting F also has variance σ2 . This recently proposed definition is called distribution calibration ( Song et al. , 2019 ) . A closely related , but weaker concept is quantile calibration ( Kuleshov et al. , 2018 ) , which asks that a 90 % confidence interval contains the true value 90 % of the time . Formally , it can be written as : P ( Y ≤ CDF−1FX ( p ) ) = p for all p ∈ [ 0 , 1 ] , Quantile calibration is implied by distributional calibration ( Song et al. , 2019 ) . Calibration by itself is not sufficient to produce a useful forecast . For example , it is easy to see that a binary classifier that always outputs P ( Y = 1 ) as the probability that Y = 1 is calibrated ; however it does not even use the features X and thus can not be accurate . In order to be useful , forecasts must also be sharp . Intuitively , this means that predicted confidence intervals should be as tight as possible around a single value . This is captured by proper scoring rules as part of a refinement term ( see Table 1 ) , which equals an irreducible term minus a sharpness term ( Murphy , 1973 ; Brocker , 2009 ) . The latter is maximized when we minimize the scoring rule . Are Modern Machine Learning Models Calibrated And Sharp ? Most machine learning models are not calibrated out-of-the-box ( Niculescu-Mizil and Caruana , 2005 ; Guo et al. , 2017 ) . Two reason for this are the limited expressivity of the model H—we can not perfectly fit the entirety of the level curves of the data distribution—and computational approximations—computing extract predictive uncertainties may be intractable , and approximations are not entirely accurate . A final reason stems from how models are trained—since we can not fit a perfect H , standard objective functions induce a tradeoff between sharp and calibrated forecasts . Next , we will show that by training models differently , we can achieve calibration without sacrificing performance . 3 ENSURING DISTRIBUTION CALIBRATION IN ANY MODEL . This section introduces algorithms that ensure the distirbutional calibration of any predictive machine learning model while maintaining sharpness . Unlike existing methods for distribution calibration , ours can be used with any model ( not just ones that output Gaussians ) , are very simple to implement in differentiable programming frameworks , and have theoretical guarantees . We first assume there exists a parameterization Φ1 of the probabilities returned by forecaster H : for each p ∈ ∆ ( Y ) returned by H , there exist parameters φ ∈ Φ1 that describe p. The φ can be the natural parameters of an exponential family distribution , such as ( µ , σ2 ) describing a Gaussian . We consider a class of algorithms based on a classic approach called recalibration . First , we train a base forecaster H to minimize a proper loss L. Then , we train an auxiliary model R : Φ1 → Φ2 ( called the recalibrator ) over the outputs of H that outputs the parameters φ2 ∈ Φ2 of another distribution such that L is minimized . Here Φ2 is a second parameterization of ∆ ( Y ) ( possibly the same ) . As a result , the forecasts ( R ◦H ) ( X ) will be calibrated . We provide details in Algorithm 1 . Algorithm 1 Calibrated Learning of Probabilistic Models . Input : Model H : X → Φ1 , recalibrator R : Φ1 → Φ2 , training set D , recalibration set C Output : Recalibrated model R ◦H : X → Φ2 . 1 . Fit the base model on D : minH ∑ ( x , y ) ∈D L ( H ( x ) , y ) 2 . Fit the recalibration model R on the output of H on C : minR ∑ ( x , y ) ∈C L ( ( R ◦H ) ( x ) , y ) Implementing this approach requires choosing parameterizations of probabilities Φ1 , Φ2 , a recalibration model R , and an objective L. We discuss these choices below ; then we clarify how 1 differs from existing recalibration algorithms . Parameterizing Probability Distributions . When fitting a classification model , each distribution ∆ ( Y ) is a categorical and can be parameterized via its K ≥ 2 class membership probabilities . In regression , most widely used models such as neural networks already output parameterized probabilities , in which the φ are usually the natural parameters of an exponential family model . In the most general case , if we only have black-box access to a density function or a cumulative distribution function , we may form a d-dimensional representation by evaluating the distribution at a grid of d points . For example , if we have black-box access to a quantile function F−1 , we may featurize F via its sequence of quantiles φ ( F ) = ( F−1 ( αi ) ) di=1 for some sequence of d levels αi , possibly chosen uniformly in [ 0 , 1 ] . In addition to the above techniques , the representation of output probabilities in Φ2 coming from R can leverage flexible invertible models of the CDF , following methods developed in the normalizing flow literature , including monotonic neural networks , sum-of-squares polynomials ( Wehenkel and Louppe , 2019 ; Jaini et al. , 2019 ) spline functions ( Muller et al. , 2019 ; Durkan et al. , 2019 ) , piecewise separable models ( Wehenkel and Louppe , 2019 ) , and others . Choosing a Recalibrator . Ideal recalibrators are highly effective at optimizing the proper loss L ( see Section 4 ) . In a simple setting like binary classification , our task reduces to one-dimensional density estimation ; in such cases we can provably achieve calibration asymptotically by using kernel density estimation for the recalibrator R , while controlling the kernel width as a function of the dataset size to trade off overfitting and underfitting ( Wasserman , 2006 ) . In regression settings , we may rely on other non-parametric techniques such as Gaussian processes . An alternative approach is to rely on expressive neural networks ; although their optimization is a non-convex , they are very effective at fitting proper losses L , feature mature regularization techniques , and can be implemented easily within deep learning frameworks , possibly within the same computation graph as a neural forecaster H , which can simplify deployment . In the classification setting , a natural architecture for R is a sequence of dense layers mapping the simplex ∆K into ∆K . In regression settings , R needs to output a density function : a natural architecture for this is a mixture density network ( MDN ; Bishop ( 1994 ) ) . Choosing a Proper Loss A natural choice of proper loss is the log-loss . It applies in both calibration and regression ; optimizing it is a standard supervised learning problem . In regression settings , we found that using the quantile loss L = Eτ∈U [ 0,1 ] Ey∼Gρτ ( y − F−1 ( τ ) ) ( see Table 1 ) was numerically stable and produced the best performance . This objective fits a model Rθ ( τ ; φ ) to estimate the τ -th conditional quantile F−1 ( τ ) at φ . When Rθ ( τ ; φ ) is a neural network that takes in τ and x , we minimize the quantile loss Eτ∈U [ 0,1 ] Ey∼Gρτ ( y − F−1 ( τ ) ) using gradient descent , approximating both expectations using Monte Carlo ( details are in the experiments section ) . Comparing Against Song et al . Interestingly , the method of Song et al . ( 2019 ) is a special case of ours when Φ1 consists of Gaussian natural parameters , Φ2 consists of parameters for the Beta link function , R is a Gaussian process , and L is the log-likelihood . However , the resulting problem can only be solved using variational inference , which is slow and complex to implement . Our framework instead admits simple solutions based on gradient descent . Comparing Against Other Approaches . Algorithm 1 performs recalibration like many previous methods ( e.g. , Platt , Kuleshov et al. , Song et al. , etc . ) ; it may thus appear to be the same as these methods . However , that is not the case . First , existing recalibration approaches operate over the space of probabilities ( class probabilities or CDF values ) ; ours operates over functional parameters . This is what enables it to achieve distribution rather than quantile calibration ( Kuleshov et al. , 2018 ) . Our approach also involves novel recalibration objectives ( e.g. , the quantile divergence in regression ) which differ from the calibration error of Kuleshov et al . ( 2018 ) . We also use different types of models ( small neural networks instead of isotonic regression ) and different optimization procedures used ( stochastic gradient descent instead of variational inference ) . Thus , our recalibration strategy is distinct from previous work . | The paper proposes a new method for calibrating the uncertainty estimates of supervised machine learning models, i.e., ensuring that they match the probabilities of the data distribution. After regular model training, a calibrator model is trained to transform the model output, using the same loss but a separate dataset. Theoretical analysis and empirical experiments are conducted to support the claim that this is a way to calibrate "any model" at "almost no cost". | SP:c1e4bc9820c82128dea440b475f137ac49c96963 |
Towards Uncertainties in Deep Learning that Are Accurate and Calibrated | 1 INTRODUCTION . Probabilistic forecasts can be characterized by two properties—calibration and sharpness ( Gneiting et al. , 2007 ) . Intuitively , calibration means that a 90 % confidence interval contains the true outcome 90 % of the time . Sharpness means that these confidence intervals are narrow . These qualities are grounded in the statistics literature on proper scoring rules , and are widely used to evaluate forecasts ( Gneiting and Raftery , 2005 ; 2007 ) in domains such as medicine ( Saria , 2018 ) , robotic control ( Malik et al. , 2019 ) , and human-in-the-loop learning ( Werling et al. , 2015 ) . This paper introduces algorithms that ensure the calibration of any predictive machine learning model while maintaining sharpness . They apply to both classification and regression tasks and guarantee the strong property of distribution calibration ( which generalizes standard quantile and classification-based calibration ; Song et al . ( 2019 ) ) in any model , including deep learning models , which are often miscalibrated ( Guo et al. , 2017 ) . Unlike existing methods for distribution calibration ( Song et al. , 2019 ) , ours can be used with any model ( not just ones that output Gaussians ) , are very simple to implement in differentiable programming frameworks , and have theoretical guarantees . Importantly , our algorithms achieve for the first time a long-standing statistical principle that forecasts should “ maximize sharpness subject to being calibrated ” proposed by Gneiting et al . ( 2007 ) . We prove that under some assumptions this principle is achievable in modern machine learning models in a black-box manner and without sacrificing overall performance . This lends strong support for this principle as a way of reasoning about uncertainty in machine learning . In a sense , calibration is a rare free lunch in machine learning , and we argue that it should be enforced in predictive models and taken advantage of in downstream applications . Empirically , we find that our method consistently outputs well-calibrated predictions across a wide range of experiments , while improving performance on downstream tasks with minimal implementation overhead . Contributions . In summary , we make three contributions . We propose a new recalibration technique that ( a ) is among the only to guarantee distribution calibration besides Song et al . ( 2019 ) . Unlike Song et al . ( 2019 ) we can ( b ) recalibrate any parametric distribution ( not just Gaussians ) and ( c ) our method is simpler . While theirs is based on variational inference in Gaussian processes , ours uses a neural network that can be implemented in a few lines of code , which encourages adoption . Our method ( d ) applies to both classification and regression and ( e ) outperforms methods by Song et al . ( 2019 ) and Kuleshov et al . ( 2018 ) as well as Platt and temperature scaling . We also formally prove that our technique produces asymptotically distributionally calibrated forecasts while minimizing regret . Most methods ( e.g. , Platt , Kuleshov scaling , Song et al. , etc . ) do not have a correctness proof , except for conformal prediction , which is significantly more complex . Finally , our analysis formalizes the well-known paradigm of Gneiting et al . ( 2007 ) and provides the first method that provably achieves it . This lends strong support for this principle and influences how one should reason about uncertainty in machine learning . An important takeaway is that calibration can be achieved in most applications of machine learning with very little cost . As such , calibration can be a rare free lunch that we believe should be leveraged throughout machine learning . 2 BACKGROUND . 2.1 PREDICTIVE UNCERTAINTY IN MACHINE LEARNING . Supervised machine learning models commonly predict a probability distribution over the output variables — e.g . class membership probabilities or the parameters of an exponential family distribution . These predictive uncertainties are useful for interpretability , safety , and downstream decisionmaking . Aleatoric uncertainty captures the inherent noise in the data , while epistemic uncertainty arises from not having a large enough dataset to estimate model parameters ( Kendall and Gal , 2017 ) . Notation . Formally , we say that a machine learning forecaster H : X → ∆ ( Y ) outputs a probability distribution F ( y ) : Y → [ 0 , 1 ] in the space ∆ ( Y ) of distributions over y . We use f to denote the probability density or probability mass function associated with F . The model H is trained on a labeled dataset xt , yt ∈ X ×Y for t = 1 , 2 , ... , T of i.i.d . realizations of random variablesX , Y ∼ P , where P is the data distribution . 2.2 WHAT DEFINES GOOD PREDICTIVE UNCERTAINTIES ? . The standard tool in statistics for evaluating the quality of predictive uncertainties is a proper scoring rule ( Gneiting and Raftery , 2007 ) . Formally , a scoring rule S : ∆ ( Y ) × Y → R assigns a “ score ” to a probabilistic forecast F ∈ ∆ ( Y ) and a realized outcome y ∈ Y . Given a true distribution G ∈ ∆ ( Y ) for y , we use the notation S ( F , G ) for the expected score S ( F , G ) = Ey∼GS ( F , y ) . We say that a score S is proper if it is minimized by G when G is the true distribution for y : S ( F , G ) ≥ S ( G , G ) for all F . When S is proper , we also refer to it as a proper loss . An example of a proper loss is the log-likelihood S ( F , y ) = log f ( y ) , where f is the probability density or probability mass function of F . Another common loss is the check score ρτ ( y , f ) = τ ( y − f ) if y ≥ f and ( 1 − τ ) ( f − y ) otherwise ; it can be used to estimate the τ -th quantile of a distribution . See Table 1 for additional examples . What are the qualities of a good probabilistic prediction , as measured by a proper scoring rule ? It can be shown that every proper score is a sum of the following terms ( Gneiting et al. , 2007 ) : proper loss = calibration−sharpness + irreducible term︸ ︷︷ ︸ refinement term . Thus , there are precisely two qualities that define an ideal forecast : calibration and sharpness . We examine each of them next . 2.3 CALIBRATION AND SHARPNESS — TWO QUALITIES OF AN IDEAL PREDICTION . Formally , calibration can be defined by the equation P ( Y = y | FX = F ) = f ( y ) for all y ∈ Y , F ∈ ∆ ( Y ) , ( 1 ) where X , Y ∼ P are random variables corresponding to the input features and targets , and FX = H ( X ) is the forecast at X , itself a random variable that takes values in ∆ ( Y ) . We use f to denote the probability density or probability mass function associated with F . When Y = { 0 , 1 } and FX is a Bernoulli distribution with parameter p , we can write ( 1 ) as P ( Y = 1 | FX = p ) = p. This has a simple intuition : the true probability of Y = 1 is p conditioned on predicting it as p. Equation 1 extends beyond binary classification to arbitrary distributions . For example , if F is a Gaussian with variance σ2 , this definition asks that the data distribution conditioned on predicting F also has variance σ2 . This recently proposed definition is called distribution calibration ( Song et al. , 2019 ) . A closely related , but weaker concept is quantile calibration ( Kuleshov et al. , 2018 ) , which asks that a 90 % confidence interval contains the true value 90 % of the time . Formally , it can be written as : P ( Y ≤ CDF−1FX ( p ) ) = p for all p ∈ [ 0 , 1 ] , Quantile calibration is implied by distributional calibration ( Song et al. , 2019 ) . Calibration by itself is not sufficient to produce a useful forecast . For example , it is easy to see that a binary classifier that always outputs P ( Y = 1 ) as the probability that Y = 1 is calibrated ; however it does not even use the features X and thus can not be accurate . In order to be useful , forecasts must also be sharp . Intuitively , this means that predicted confidence intervals should be as tight as possible around a single value . This is captured by proper scoring rules as part of a refinement term ( see Table 1 ) , which equals an irreducible term minus a sharpness term ( Murphy , 1973 ; Brocker , 2009 ) . The latter is maximized when we minimize the scoring rule . Are Modern Machine Learning Models Calibrated And Sharp ? Most machine learning models are not calibrated out-of-the-box ( Niculescu-Mizil and Caruana , 2005 ; Guo et al. , 2017 ) . Two reason for this are the limited expressivity of the model H—we can not perfectly fit the entirety of the level curves of the data distribution—and computational approximations—computing extract predictive uncertainties may be intractable , and approximations are not entirely accurate . A final reason stems from how models are trained—since we can not fit a perfect H , standard objective functions induce a tradeoff between sharp and calibrated forecasts . Next , we will show that by training models differently , we can achieve calibration without sacrificing performance . 3 ENSURING DISTRIBUTION CALIBRATION IN ANY MODEL . This section introduces algorithms that ensure the distirbutional calibration of any predictive machine learning model while maintaining sharpness . Unlike existing methods for distribution calibration , ours can be used with any model ( not just ones that output Gaussians ) , are very simple to implement in differentiable programming frameworks , and have theoretical guarantees . We first assume there exists a parameterization Φ1 of the probabilities returned by forecaster H : for each p ∈ ∆ ( Y ) returned by H , there exist parameters φ ∈ Φ1 that describe p. The φ can be the natural parameters of an exponential family distribution , such as ( µ , σ2 ) describing a Gaussian . We consider a class of algorithms based on a classic approach called recalibration . First , we train a base forecaster H to minimize a proper loss L. Then , we train an auxiliary model R : Φ1 → Φ2 ( called the recalibrator ) over the outputs of H that outputs the parameters φ2 ∈ Φ2 of another distribution such that L is minimized . Here Φ2 is a second parameterization of ∆ ( Y ) ( possibly the same ) . As a result , the forecasts ( R ◦H ) ( X ) will be calibrated . We provide details in Algorithm 1 . Algorithm 1 Calibrated Learning of Probabilistic Models . Input : Model H : X → Φ1 , recalibrator R : Φ1 → Φ2 , training set D , recalibration set C Output : Recalibrated model R ◦H : X → Φ2 . 1 . Fit the base model on D : minH ∑ ( x , y ) ∈D L ( H ( x ) , y ) 2 . Fit the recalibration model R on the output of H on C : minR ∑ ( x , y ) ∈C L ( ( R ◦H ) ( x ) , y ) Implementing this approach requires choosing parameterizations of probabilities Φ1 , Φ2 , a recalibration model R , and an objective L. We discuss these choices below ; then we clarify how 1 differs from existing recalibration algorithms . Parameterizing Probability Distributions . When fitting a classification model , each distribution ∆ ( Y ) is a categorical and can be parameterized via its K ≥ 2 class membership probabilities . In regression , most widely used models such as neural networks already output parameterized probabilities , in which the φ are usually the natural parameters of an exponential family model . In the most general case , if we only have black-box access to a density function or a cumulative distribution function , we may form a d-dimensional representation by evaluating the distribution at a grid of d points . For example , if we have black-box access to a quantile function F−1 , we may featurize F via its sequence of quantiles φ ( F ) = ( F−1 ( αi ) ) di=1 for some sequence of d levels αi , possibly chosen uniformly in [ 0 , 1 ] . In addition to the above techniques , the representation of output probabilities in Φ2 coming from R can leverage flexible invertible models of the CDF , following methods developed in the normalizing flow literature , including monotonic neural networks , sum-of-squares polynomials ( Wehenkel and Louppe , 2019 ; Jaini et al. , 2019 ) spline functions ( Muller et al. , 2019 ; Durkan et al. , 2019 ) , piecewise separable models ( Wehenkel and Louppe , 2019 ) , and others . Choosing a Recalibrator . Ideal recalibrators are highly effective at optimizing the proper loss L ( see Section 4 ) . In a simple setting like binary classification , our task reduces to one-dimensional density estimation ; in such cases we can provably achieve calibration asymptotically by using kernel density estimation for the recalibrator R , while controlling the kernel width as a function of the dataset size to trade off overfitting and underfitting ( Wasserman , 2006 ) . In regression settings , we may rely on other non-parametric techniques such as Gaussian processes . An alternative approach is to rely on expressive neural networks ; although their optimization is a non-convex , they are very effective at fitting proper losses L , feature mature regularization techniques , and can be implemented easily within deep learning frameworks , possibly within the same computation graph as a neural forecaster H , which can simplify deployment . In the classification setting , a natural architecture for R is a sequence of dense layers mapping the simplex ∆K into ∆K . In regression settings , R needs to output a density function : a natural architecture for this is a mixture density network ( MDN ; Bishop ( 1994 ) ) . Choosing a Proper Loss A natural choice of proper loss is the log-loss . It applies in both calibration and regression ; optimizing it is a standard supervised learning problem . In regression settings , we found that using the quantile loss L = Eτ∈U [ 0,1 ] Ey∼Gρτ ( y − F−1 ( τ ) ) ( see Table 1 ) was numerically stable and produced the best performance . This objective fits a model Rθ ( τ ; φ ) to estimate the τ -th conditional quantile F−1 ( τ ) at φ . When Rθ ( τ ; φ ) is a neural network that takes in τ and x , we minimize the quantile loss Eτ∈U [ 0,1 ] Ey∼Gρτ ( y − F−1 ( τ ) ) using gradient descent , approximating both expectations using Monte Carlo ( details are in the experiments section ) . Comparing Against Song et al . Interestingly , the method of Song et al . ( 2019 ) is a special case of ours when Φ1 consists of Gaussian natural parameters , Φ2 consists of parameters for the Beta link function , R is a Gaussian process , and L is the log-likelihood . However , the resulting problem can only be solved using variational inference , which is slow and complex to implement . Our framework instead admits simple solutions based on gradient descent . Comparing Against Other Approaches . Algorithm 1 performs recalibration like many previous methods ( e.g. , Platt , Kuleshov et al. , Song et al. , etc . ) ; it may thus appear to be the same as these methods . However , that is not the case . First , existing recalibration approaches operate over the space of probabilities ( class probabilities or CDF values ) ; ours operates over functional parameters . This is what enables it to achieve distribution rather than quantile calibration ( Kuleshov et al. , 2018 ) . Our approach also involves novel recalibration objectives ( e.g. , the quantile divergence in regression ) which differ from the calibration error of Kuleshov et al . ( 2018 ) . We also use different types of models ( small neural networks instead of isotonic regression ) and different optimization procedures used ( stochastic gradient descent instead of variational inference ) . Thus , our recalibration strategy is distinct from previous work . | The authors propose an algorithm scheme that they prove provides probabilisitic asymptotic guarantees of `distribution' calibration for models. The algorithm provided by the authors fits a primary model, H, on a training dataset, D, as well as a recalibrator, R, which takes H(x) as an input, using a calibration dataset, C. H is fit using (x,y) pairs from D and a proper loss. R is then fit using (H(x), y) pairs from C and a proper loss. The resulting model ought to be calibrated on C while also being (asymptotically) as sharp as the original model. The authors also introduce the idea of calibrated risk minimization, which is a constrained optimization alternative to empirical risk minimization. | SP:c1e4bc9820c82128dea440b475f137ac49c96963 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.