paper_name stringlengths 11 170 | text stringlengths 8.07k 307k | summary stringlengths 152 6.16k | paper_id stringlengths 43 43 |
|---|---|---|---|
Permutation Compressors for Provably Faster Distributed Nonconvex Optimization | √ n ) ( resp . O ( 1 + d/ √ n ) ) improvement in the theoretical communication complexity of MARINA in the low Hessian variance regime when d ≥ n ( resp . d ≤ n ) , where n is the number of workers and d is the number of parameters describing the model we are learning . We corroborate our theoretical results with carefully engineered synthetic experiments with minimizing the average of nonconvex quadratics , and on autoencoder training with the MNIST dataset . 1 INTRODUCTION The practice of modern supervised learning relies on highly sophisticated , high dimensional and data hungry deep neural network models ( Vaswani et al. , 2017 ; Brown et al. , 2020 ) which need to be trained on specialized hardware providing fast distributed and parallel processing . Training of such models is typically performed using elaborate systems relying on specialized distributed stochastic gradient methods ( Gorbunov et al. , 2021 ) . In distributed learning , communication among the compute nodes is typically a key bottleneck of the training system , and for this reason it is necessary to employ strategies alleviating the communication burden . 1.1 THE PROBLEM AND ASSUMPTIONS Motivated by the need to design provably communication efficient distributed stochastic gradient methods in the nonconvex regime , in this paper we consider the optimization problem min x∈Rd [ f ( x ) : = 1n n∑ i=1 fi ( x ) ] , ( 1 ) where n is the number of workers/machines/nodes/devices working in parallel , and fi : Rd → R is a ( potentially nonconvex ) function representing the loss of the model parameterized by weights x ∈ Rd on training data stored on machine i . While we do not assume the functions { fi } to be convex , we rely on their differentiability , and on the well-posedness of problem ( 1 ) : Assumption 1 . The functions f1 , . . . , fn : Rd → R are differentiable . Moreover , f is lower bounded , i.e. , there exists f inf ∈ R such that f ( x ) ≥ f inf for all x ∈ Rd . We are interested in finding an approximately stationary point of the nonconvex problem ( 1 ) . That is , we wish to identify a ( random ) vector x̂ ∈ Rd such that E [ ‖∇f ( x̂ ) ‖2 ] ≤ ε ( 2 ) while ensuring that the volume of communication between the n workers and the server is as small as possible . Without the lower boundedness assumption there might not be a point with a small gradient ( e.g. , think of f being linear ) , which would render problem ( 2 ) unsolvable . However , lower boundedness ensures that the problem is well posed . Besides Assumption 1 , we rely on the following smoothness assumption : Assumption 2 . There exists a constant L+ > 0 such that 1n ∑n i=1 ‖∇fi ( x ) −∇fi ( y ) ‖ 2 ≤ L2+ ‖x− y‖ 2 for all x , y ∈ Rd . To avoid ambiguity , let L+ be the smallest such number . While this is a somewhat stronger assumption than mere L−-Lipschitz continuity of the gradient of f ( the latter follows from the former by Jensen ’ s inequality and we have L− ≤ L+ ) , it is weaker than Li-Lipschitz continuity of the gradient of the functions fi ( the former follows from the latter with L2+ ≤ 1n ∑ i L 2 i ) . So , this is still a reasonably weak assumption . 1.2 A BRIEF OVERVIEW OF THE STATE OF THE ART To the best of our knowledge , the state-of-the-art distributed method for finding a point x̂ satisfying ( 2 ) for the nonconvex problem ( 1 ) in terms of the theoretical communication complexity1 is the MARINA method of Gorbunov et al . ( 2021 ) . MARINA relies on worker-to-server communication compression , and its power resides in the construction of a carefully designed sequence of biased gradient estimators which help the method obtain its superior communication complexity . The method uses randomized compression operators Ci : Rd → Rd to compress messages ( gradient differences ) at the workers i ∈ { 1 , 2 , . . . , n } before they are communicated to the server . It is assumed that these operators are unbiased , i.e. , E [ Ci ( a ) ] = a for all a ∈ Rd , and that their variance is bounded as E ‖Ci ( a ) − a‖2 ≤ ω ‖a‖2 for all a ∈ Rd and some ω ≥ 0 . For convenience , let U ( ω ) be the class of such compressors . A key assumption in the analysis of MARINA is the independence of the compressors { Ci } ni=1 . In particular , MARINA solves the problem ( 1 ) – ( 2 ) in T = 2∆0ε−1 ( L− + L+ √ ( p−1 − 1 ) ω/n ) communication rounds2 , where ∆0 : = f ( x0 ) − f inf , x0 ∈ Rd is the initial iterate , p ∈ ( 0 , 1 ] is a parameter defining the probability with which full gradients of the local functions { fi } are communicated to the server , L− > 0 is the Lipschitz constant of the gradient of f , and L+ ≥ L− is a certain smoothness constant associated with the functions { fi } . In each iteration of MARINA , all workers send ( at most ) pd + ( 1 − p ) ζ floats to the server in expectation , where ζ : = maxi supv∈Rd size ( Ci ( v ) ) , where size ( Ci ( v ) ) is the size of the message v compressed by compressor Ci . For an uncompressed vector v we have size ( v ) = d in the worst case , and if Ci is the RandK sparsifier , then size ( Ci ( v ) ) = K. Putting the above together , the communication complexity of MARINA is T ( pd+ ( 1−p ) ζ ) , i.e. , the product of the number of communication rounds and the communication cost of each round . See Section B for more details on the method and its theoretical properties . An alternative to the application of unbiased compressors is the practice of applying contractive compressors , such as TopK ( Alistarh et al. , 2018 ) , together with an error feedback mechanism ( Seide et al. , 2014 ; Stich et al. , 2018 ; Beznosikov et al. , 2020 ) . However , this approach is not competitive in theoretical communication complexity with MARINA ; see Appendix G for details . 1For the purposes of this paper , by communication complexity we mean the product of the number of communication rounds sufficient to find x̂ satisfying ( 2 ) , and a suitably defined measure of the volume of communication performed in each round . As standard in the literature , we assume that the workers-to-server communication is the key bottleneck , and hence we do not count server-to-worker communication . For more details about this highly adopted and studied setup , see Appendix F. 2Gorbunov et al . ( 2021 ) present their result with L− replaced by the larger quantity L+ . However , after inspecting their proof , it is clear that they proved the improved rate we attribute to them here , and merely used the bound L− ≤ L+ at the end for convenience of presentation only . 1.3 SUMMARY OF CONTRIBUTIONS ( a ) Correlated and permutation compressors . We generalize the analysis of MARINA beyond independence by supporting arbitrary unbiased compressors , including compressors that are correlated . In particular , we construct new compressors based on the idea of a random permutation ( we called them PermK ) which provably reduce the variance caused by compression beyond what independent compressors can achieve . The properties of our compressors are captured by two quantities , A ≥ B ≥ 0 , through a new inequality ( which we call “ AB inequality '' ) bounding the variance of the aggregated ( as opposed to individual ) compressed message . ( b ) Refined analysis through the new notion of Hessian variance . We refine the analysis of MARINA by identifying a new quantity , for which we coin the name Hessian variance , which plays an important role in our sharper analysis . To the best of our knowledge , Hessian variance is a new quantity proposed in this work and not used in optimization before . This quantity is well defined under the same assumptions as those used in the analysis of MARINA by Gorbunov et al . ( 2021 ) . ( c ) Improved communication complexity results . We prove iteration complexity and communication complexity results for MARINA , for smooth nonconvex ( Theorem 4 ) and smooth PolyakŁojasiewicz3 ( Theorem 5 ) functions . Our results hold for all unbiased compression operators , including the standard independent but also all correlated compressors . Most importantly , we show that in the low Hessian variance regime , and by using our PermK compressors , we can improve upon the current state-of-the-art communication complexity of MARINA due to Gorbunov et al . ( 2021 ) by up to the factor √ n in the d ≥ n case , and up to the factor 1 + d/ √ n in the d ≤ n case . The improvement factors degrade gracefully as Hessian variance grows , and in the worst case we recover the same complexity as those established by Gorbunov et al . ( 2021 ) . ( d ) Experiments agree with our theory . Our theoretical results lead to predictions which are corroborated through computational experiments . In particular , we perform proof-of-concept testing with carefully engineered synthetic experiments with minimizing the average of nonconvex quadratics , and also test on autoencoder training with the MNIST dataset . 2 BEYOND INDEPENDENCE : THE POWER OF CORRELATED COMPRESSORS As mentioned in the introduction , MARINA was designed and analyzed to be used with compressors Ci ∈ U ( ω ) that are sampled independently by the workers . For example , if the RandK sparsification operator is used by all workers , then each worker chooses the K random coordinates to be communicated independently from the other workers . This independence assumption is crucial for MARINA to achieve its superior theoretical properties . Indeed , without independence , the rate would depend on ω instead4 of ω/n , which would mean no improvement as the number n of workers grows , which is problematic because ω is typically very large5 . For this reason , independence is assumed in the analysis of virtually all distributed methods that use unbiased communication compression , including methods designed for convex or strongly convex problems ( Khirirat et al. , 2018 ; Mishchenko et al. , 2019 ; Li et al. , 2020 ; Philippenko & Dieuleveut , 2020 ) . In our work we first generalize the analysis of MARINA beyond independence , which provably extends its use to a much wider array of ( still unbiased ) compressors , some of which have interesting theoretical properties and are useful in practice . 2.1 AB INEQUALITY : A TOOL FOR A MORE PRECISE CONTROL OF COMPRESSION VARIANCE We assume that all compressors { Ci } ni=1 are unbiased , and that there exist constants A , B ≥ 0 for which the compressors satisfy a certain inequality , which we call “ AB inequality ” , bounding the variance of 1n ∑ i Ci ( ai ) as a stochastic estimator of 1 n ∑ i ai . 3The PŁ analysis is included in Appendix D. 4This is a consequence of the more general analysis from our paper ; Gorbunov et al . ( 2021 ) do not consider the case of unbiased compressors without the independence assumption . 5For example , in the case of the RandK sparsification operator , ω = d/K − 1 . Since K is typically chosen to be a constant , or a small percentage of d , we have ω = O ( d ) , which is very large , and particularly so for overparameterized models . Assumption 3 ( Unbiasedness ) . The random operators C1 , . . . , Cn : Rd → Rd are unbiased , i.e. , E [ Ci ( a ) ] = a for all i ∈ { 1 , 2 , . . . , n } and all a ∈ Rd . If these conditions are satisfied , we will write { Ci } ni=1 ∈ U . Assumption 4 ( AB inequality ) . There exist constants A , B ≥ 0 such that the random operators C1 , . . . , Cn : Rd → Rd satisfy the inequality E [ ∥∥∥∥ 1n n∑ i=1 Ci ( ai ) − 1n n∑ i=1 ai ∥∥∥∥2 ] ≤ A ( 1 n n∑ i=1 ‖ai‖2 ) −B ∥∥∥∥ 1n n∑ i=1 ai ∥∥∥∥2 ( 3 ) for all a1 , . . . , an ∈ Rd . If these conditions are satisfied , we will write { Ci } ni=1 ∈ U ( A , B ) . It is easy to observe that whenever the AB inequality holds , it must necessarily be the case that A ≥ B . Indeed , if we fix nonzero a ∈ Rd and choose ai = a for all i , then the right hand side of the AB inequality is equal to A−B while the left hand side is nonnegative . Our next observation is that whenever Ci ∈ U ( ωi ) for all i ∈ { 1 , 2 , . . . , n } , the AB inequality holds without any assumption on the independence of the compressors . Furthermore , if independence is assumed , the A constant is substantially improved . Lemma 1 . If Ci ∈ U ( ωi ) for i ∈ { 1 , 2 , . . . , n } , then { Ci } ni=1 ∈ U ( maxi ωi , 0 ) . If we further assume that the compressors are independent , then { Ci } ni=1 ∈ U ( 1n maxi ωi , 0 ) . In Table 1 we provide a list of several compressors that belong to the class U ( A , B ) , and give values of the associated constants A and B . 2.2 WHY CORRELATION MAY HELP While in the two examples captured by Lemma 1 we hadB = 0 , with a carefully crafted dependence between the compressors it is possible for B to be positive , and even as large as A . Intuitively , other things equal ( e.g. , fixing A ) , we should want B to be positive , and as large as possible , as the AB inequality says that in such a case the variance of 1n ∑ i Ci ( ai ) as a stochastic estimator of 1 n ∑ i ai is reduced more dramatically . This is a key intuition behind the usefulness of ( appropriately ) correlated compressors . We now provide an alternative point of view . Note that A ( 1 n n∑ i=1 ‖ai‖2 ) −B ∥∥∥∥ 1n n∑ i=1 ai ∥∥∥∥2 = A [ ( 1− BA ) ( 1n n∑ i=1 ‖ai‖2 ) + BAVar ( a1 , . . . , an ) ] , ( 4 ) where Var ( a1 , . . . , an ) : = 1n ∑n i=1 ‖ai − ā‖ 2 is the variance of the vectors { ai } ni=1 and ā : = 1 n ∑n i=1 ai is their average . So , the AB inequality upper bounds the variance of 1 n ∑ i Ci ( ai ) as A times a particular convex combination of two quantities . Since the latter quantity is always smaller or equal to the former , and can be much smaller , we should prefer compressors which put as much weight on Var ( a1 , . . . , an ) as possible . 2.3 INPUT VARIANCE COMPRESSORS Due to the above considerations , compressors for which A = B are special , and their construction and theoretical properties are a key contribution of our work . Moreover , as we shall see in Section 4 , such compressors have favorable communication complexity properties . This leads to the following definition : Definition 1 ( Input variance compressors ) . We say that a collection { Ci } ni=1 of unbiased operators form an input variance compressor system if the variance of 1n ∑ i Ci ( ai ) is controlled by a multiple of the variance of the input vectors { ai } ni=1 . That is , if there exists a constant C ≥ 0 such that E [ ∥∥∥∥ 1n n∑ i=1 Ci ( ai ) − 1n n∑ i=1 ai ∥∥∥∥2 ] ≤ CVar ( a1 , . . . , an ) ( 5 ) for all a1 , . . . , an ∈ Rd . If these conditions are satisfied , we will write { Ci } ni=1 ∈ IV ( C ) . In view of ( 4 ) , if { Ci } ni=1 ∈ U ( A , B ) and A = B , then { Ci } ni=1 ∈ IV ( A ) . We now define two input variance compressors based on a random permutation construction.6 The first compressor handles the d ≥ n case , and the second handles the d ≤ n case . For simplicity of exposition , we assume that d is divisible by n in the first case , and that n is divisible by d in the second case.7 Since both these new compressors are sparsification operators , in an analogy with the established notation RandK and TopK for sparsification , we will write PermK for our permutationbased sparsifiers . To keep the notation simple , we chose to include simple variants which do not offer freedom in choosing K. Having said that , these simple compressors lead to state-of-the-art communication complexity results for MARINA , and hence not much is lost by focusing on these examples . Let ei be the ith standard unit basis vector in Rd . That is , for any x = ( x1 , . . . , xd ) ∈ Rd we have x = ∑ i xiei . Definition 2 ( PermK for d ≥ n ) . Assume that d ≥ n and d = qn , where q ≥ 1 is an integer . Let π = ( π1 , . . . , πd ) be a random permutation of { 1 , . . . , d } . Then for all x ∈ Rd and each i ∈ { 1 , 2 , . . . , n } we define Ci ( x ) : = n · qi∑ j=q ( i−1 ) +1 xπjeπj . ( 6 ) Note that Ci is a sparsifier : we have ( Ci ( x ) ) l = nxl if l ∈ { πj : q ( i − 1 ) + 1 ≤ j ≤ qi } and ( Ci ( x ) ) l = 0 otherwise . So , ‖Ci ( x ) ‖0 ≤ q : = K , which means that Ci offers compression by the factor n. Note that we do not have flexibility to choose K ; we have K = q = d/n . See Appendix J for implementation details . Theorem 1 . The PermK compressors from Definition 2 are unbiased and belong to IV ( 1 ) . In contrast with the collection of independent RandK sparsifiers , which satisfy the AB inequality with A = d/K−1n and B = 0 ( this follows from Lemma 1 since ωi = d/K − 1 for all i ) , PermK satisfies the AB inequality with A = B = 1 . While both are sparsifiers , the permutation construction behind PermK introduces a favorable correlation among the compressors : we have 〈Ci ( ai ) , Cj ( aj ) 〉 = 0 for all i 6= j . Definition 3 ( PermK for n ≥ d ) . Assume that n ≥ d , n > 1 and n = qd , where q ≥ 1 is an integer . Define the multiset S : = { 1 , . . . , 1 , 2 , . . . , 2 , . . . , d , . . . , d } , where each number occurs precisely q times . Let π = ( π1 , . . . , πn ) be a random permutation of S. Then for all x ∈ Rd and each i ∈ { 1 , 2 , . . . , n } we define Ci ( x ) : = dxπieπi . ( 7 ) Note that for each i , Ci from Definition 3 is the Rand1 sparsifier , offering compression factor d. However , the sparsifiers { Ci } ni=1 are not mutually independent . Note that , again , we do not have a choice8 of K in Definition 3 : we have K = 1 . Theorem 2 . The PermK compressors from Definition 3 are unbiased and belong to IV ( A ) with A = 1− n−dn−1 . 6More examples of input variance compressors are given in the appendix . 7The general situation is handled in Appendix I . 8It is possible to provide a more general definition of PermK in the n ≥ d case , allowing for more freedom in choosing K. However , such compressors would lead to a worse communication complexity for MARINA than the simple K = 1 variant considered here . Combining PermK with quantization . It is easy to show that if { Ci } ni=1 ∈ U ( A , B ) , and Qi ∈ U ( ωi ) are chosen independently of { Ci } ni=1 ( we do not require mutual independence of { Qi } ) , then { Ci ◦Qi } ni=1 ∈ U ( ( maxi ωi + 1 ) A , B ) ( see Lemma 9 ) . This allows us to combine our compression techniques with quantization ( Alistarh et al. , 2017 ; Horváth et al. , 2019 ) . 3 HESSIAN VARIANCE Working under the same assumptions on the problem ( 1 ) – ( 2 ) as Gorbunov et al . ( 2021 ) ( i.e. , Assumptions 1 and 2 ) , in this paper we study the complexity of MARINA under the influence of a new quantity , which we call Hessian variance . Definition 4 ( Hessian variance ) . Let L± ≥ 0 be the smallest quantity such that 1 n n∑ i=1 ‖∇fi ( x ) −∇fi ( y ) ‖2 − ‖∇f ( x ) −∇f ( y ) ‖2 ≤ L2± ‖x− y‖ 2 , ∀x , y ∈ Rd . ( 8 ) We refer to the quantity L2± by the name Hessian variance . Recall that in this paper we have so far mentioned four “ smoothness ” constants : Li ( Lipschitz constant of∇fi ) , L− ( Lipschitz constant of∇f ) , L+ ( see Assumption 2 ) and L± ( Definition 4 ) . To avoid ambiguity , let all be defined as the smallest constants for which the defining in equalities hold . In case the defining inequality does not hold , the value is set to +∞ . This convention allows us to formulate the following result summarize the relationships between these quantities . Lemma 2 . L− ≤ L+ , L− ≤ 1n n∑ i=1 Li , L2+ ≤ 1n n∑ i=1 L2i , and L 2 + − L2− ≤ L2± ≤ L2+ . It follows that if Li is finite for all i , then L− , L+ and L± are all finite as well . Similarly , if L+ is finite ( i.e. , if Assumption 2 holds ) , then L− and L± are finite , and L± ≤ L+ . We are not aware of any prior use of this quantity in the analysis of any optimization methods . Importantly , there are situations when L− is large , and yet the Hessian variance L2± is small , or even zero . This is important as the improvements we obtain in our analysis of MARINA are most pronounced in the regime when Hessian variance is small . 3.1 HESSIAN VARIANCE CAN BE ZERO We now illustrate on a few examples that there are situations when the values of L− and Li are are large , Hessian variance can be zero . The simplest example is the identical functions regime . Example 1 ( Identical functions ) . Assume that f1 = f2 = · · · = fn . Then L± = 0 . This follows by observing that the left hand side in ( 8 ) is zero . Note that while L± = 0 , it is possible for L− and L+ to be arbitrarily large ! Note that methods based on the TopK compressor ( including all error feedback methods ) suffer in this regime . Indeed , EF21 in this simple scenario is the same method for any value of n , and hence can ’ t possibly improve as n grows . This is because when ai = aj for all i , j , 1n ∑ i TopK ( ai ) = TopK ( ai ) . As the next example shows , Hessian variance is zero even if we we perturb the local functions via arbitrary linear functions . Example 2 ( Identical functions + arbitrary linear perturbation ) . Assume that fi ( x ) = φ ( x ) + b > i x+ ci , for some differentiable function φ : Rd → R and arbitrary bi ∈ Rd and ci ∈ R. Then L± = 0 . This follows by observing that the left hand side in ( 8 ) is zero in this case as well . Note that in this example it is possible for the functions { fi } to have arbitrarily different minimizers . So , this example does not correspond to the overparameterized machine learning regime , and is in general challenging for standard methods . 3.2 SECOND ORDER CHARACTERIZATION To get an insight into when Hessian variance may be small but not necessarily zero , we establish a useful second order characterization . Theorem 3 . Assume that for each i ∈ { 1 , 2 , . . . , n } , the function fi is twice continuously differentiable . Fix any x , y ∈ Rd and define9 Hi ( x , y ) : = ∫ 1 0 ∇2fi ( x+ t ( y − x ) ) dt , H ( x , y ) : = 1n n∑ i=1 Hi ( x , y ) . ( 9 ) Then the matrices Li ( x , y ) : = H2i ( x , y ) , L− ( x , y ) : = H 2 ( x , y ) , L+ ( x , y ) : = 1n ∑n i=1 H 2 i ( x , y ) and L± ( x , y ) : = L+ ( x , y ) −L− ( x , y ) are symmetric and positive semidefinite . Moreover , L2i = sup x , y∈Rd , x 6=y ( x−y ) > Li ( x , y ) ( x−y ) ‖x−y‖2 , L 2 − = sup x , y∈Rd , x 6=y ( x−y ) > L− ( x , y ) ( x−y ) ‖x−y‖2 , L2+ = sup x , y∈Rd , x 6=y ( x−y ) > L+ ( x , y ) ( x−y ) ‖x−y‖2 , L 2 ± = sup x , y∈Rd , x 6=y ( x−y ) > L± ( x , y ) ( x−y ) ‖x−y‖2 . While L2± is obviously well defined through Definition 4 even when the functions { fi } are not twice differentiable , the term “ Hessian variance ” comes from the interpretation of L2± in the case of quadratic functions . Example 3 ( Quadratic functions ) . Let fi ( x ) = 12x > Aix + b > i x + ci , where Ai ∈ Rd×d are symmetric . Then L2± = λmax ( 1 n ∑n i=1 A 2 i − ( 1 n ∑n i=1 Ai ) 2 ) , where λmax ( · ) denotes the largest eigenvalue . Indeed , note that the matrix 1n ∑n i=1 A 2 i − ( 1 n ∑n i=1 Ai ) 2 can be interpreted as a matrix-valued variance of the Hessians A1 , . . . , An , and L2± measures the size of this matrix in terms of its largest eigenvalue . See Table 2 for a summary of the examples mentioned above . As we shall explain in Section 4 , the data/problem regime when the Hessian variance is small is key to the contributions of this paper . 4 IMPROVED ITERATION AND COMMUNICATION COMPLEXITY The key contribution of our paper is a more general and more refined analysis of MARINA . In particular , we i ) extend the reach of MARINA to the general class of unbiased and possibly correlated compressors { Ci } ni=1 ∈ U ( A , B ) , while ii ) providing a more refined analysis in that we take the Hessian variance L2± into account . Theorem 4 . Let Assumptions 1 , 2 , 3 and 4 be satisfied . Let the stepsize in MARINA be chosen as 0 < γ ≤ 1M , where M = L− + √ 1−p p ( ( A−B ) L2+ +BL2± ) . Then after T iterations , MARINA finds point x̂T for which E [ ∥∥∇f ( x̂T ) ∥∥2 ] ≤ 2∆0γT . In particular , by choosing the maximum stepsize allowed by Theorem 4 , MARINA converges in T communication rounds , where T is shown in the first row Table 3 . If in this result we replace L2± by the coarse estimate L2± ≤ L2+ , and further specialize to independent compressors satisfying 9Note that Hi ( x , y ) is the average of the Hessians of fi on the line segment connecting x and y . Table 3 : The number of communication rounds for solving ( 1 ) – ( 2 ) by MARINA and EF21 . Method + Compressors T = # Communication Rounds MARINA ⋂ { Ci } ni=1 ∈ U ( A , B ) ( this paper , 2021 ) O ( ∆0 ε ( L− + √ 1−p p ( ( A−B ) L2+ +BL2± ) ) ) MARINA ⋂ Ci ∈ U ( ω ) and independent ( Gorbunov et al. , 2021 ) O ( ∆0 ε ( L− + √ 1−p p ω n L+ ) ) EF21 ⋂ Ci are α-contractive ( Richtárik et al. , 2021 ) O ( ∆0 ε ( L− + ( 1+ √ 1−α α − 1 ) L+ ) ) Ci ∈ U ( ω ) for all i ∈ { 1 , 2 , . . . , n } , then since { Ci } ni=1 ∈ U ( ω/n , 0 ) ( recall Lemma 1 ) , our general rate specializes to the result of Gorbunov et al . ( 2021 ) , which we show in the second row of Table 3 . However , and this is a key finding of our work , in the regime when the Hessian variance L2± is very small , the original result of Gorbunov et al . ( 2021 ) can be vastly suboptimal ! To show this , in Table 4 we compare the communication complexity , i.e. , the # of communication rounds multiplied by the maximum # of floats transmitted by a worker to the sever in a single communication round . We compare the communication complexity of MARINA with the RandK and PermK compressors , and the state-of-the-art error-feedback method EF21 of Richtárik et al . ( 2021 ) with the TopK compressor . In all optimization methods , we do not consider the communication complexity of initial steps equal to O ( d ) . In each case we optimized over the parameters of the methods ( e.g. , p for MARINA and K in all cases ; for details see Appendix L ) . Our results for MARINA with PermK are better than the competing methods ( recall Lemma 2 ) . 4.1 IMPROVEMENTS IN THE IDEAL ZERO-HESSIAN-VARIANCE REGIME To better understand the improvements our analysis provides , let us consider the ideal regime characterized by zero Hessian variance : L2± = 0 . If we now use compressors { Ci } ni=1 ∈ U ( A , B ) for which A = B , which is the case for PermK , then the dependence on the potentially very large quantity L2+ is eliminated completely . Big model case ( d ≥ n ) . In this case , and using the PermK compressor , MARINA has communication complexity O ( L−∆0ε−1d/n ) , while using the RandK compressor , the communication complexity of MARINA is no better than O ( L−∆0ε−1d/√n ) . Hence , we get an improvement by at least the factor √ n. Moreover , note that this is an n× improvement over gradient descent ( GD ) ( Khaled & Richtárik , 2020 ) and EF21 , both of which have communication complexity O ( L−∆0ε−1d ) . In Appendix M , we discuss how we can get the same theoretical improvement even if L2± > 0 . Big data case ( d ≤ n ) . In this case , and using the PermK compressor , MARINA achieves communication complexity O ( L−∆0ε−1 ) , while using the RandK compressor , the communication complexity of MARINA is no better than O ( L−∆0ε−1 ( 1 + d/√n ) ) . Hence , we get an improvement by at least the factor 1 + d/ √ n. Moreover , note that this is a d× improvement over gradient descent ( GD ) and EF21 , both of which have communication complexity O ( L−∆0ε−1d ) . 5 EXPERIMENTS We compare MARINA using RandK and PermK , and EF21 with TopK , in two experiments . In the first experiment , we construct quadratic optimization tasks with different L± to capture the dependencies that our theory predicts . In the second experiment , we consider practical machine learning task MNIST ( LeCun et al. , 2010 ) to support our assertions . Each plot represents the dependence between the norm of gradient ( or function value ) and the total number of transmitted bits by a node . 5.1 TESTING THEORETICAL PREDICTIONS ON A SYNTHETIC QUADRATIC PROBLEM To test the predictive power of our theory in a controlled environment , we first consider a synthetic ( strongly convex ) quadratic function f = 1n ∑ fi composed of nonconvex quadratics fi ( x ) : = 1 2x > Aix − x > bi , where bi ∈ Rd , Ai ∈ Rd×d , and Ai = A > i . We enforced that f is λ–strongly convex , i.e. , 1n ∑n i=1 Ai < λI for λ > 0 . We fix λ = 1e−6 , and dimension d = 1000 ( see Figure 1 ) . We then generated optimization tasks with the number of nodes n ∈ { 10 , 1000 , 10000 } and L± ∈ { 0 , 0.05 , 0.1 , 0.21 , 0.91 } . We take MARINA ’ s and EF21 ’ s parameters prescribed by the theory and performed a grid search for the step sizes for each compressor by multiplying the theoretical ones with powers of two . For simplicity , we provide one plot for each compressor with the best convergence rate . First , we see that PermK outperforms RandK , and their differences in the plots reproduce dependencies from Table 4 . Moreover , when n ∈ { 1000 , 10000 } and L± ≤ 0.21 , EF21 with TopK has worse performance than MARINA with PermK , while in heterogeneous regime , when L± = 0.91 , TopK is superior except when n = 10000 . See Appendix A for detailed experiments . 5.2 TRAINING AN AUTOENCODER WITH MNIST Now we compare compressors from Section 5.1 on the MNIST dataset ( LeCun et al. , 2010 ) . Our current goal is to learn the linear autoencoder , min D∈Rdf×de , E∈Rde×df [ f ( D , E ) : = 1N N∑ i=1 ‖DEai − ai‖2 ] , where ai ∈ Rdf are MNIST images , df = 784 is the number of features , de = 16 is the size of encoding space . Thus the dimension of the problem d = 25088 , and compressors send at most 26 floats in each communication round since we take n = 1000 . We use parameter p̂ to control the homogeneity of MNIST split among n nodes : if p̂ = 1 , then all nodes store the same data , and if p̂ = 0 , then nodes store different splits ( see Appendix A.5 ) . In Figure 2 , one plot for each compressor with the best convergence rate is provided for p̂ ∈ { 0 , 0.5 , 0.75 , 0.9 , 1.0 } . We choose parameters of algorithms prescribed by the theory except for the step sizes , where we performed a grid search as before . In all experiments , PermK outperforms RandK . Moreover , we see that in the more homogeneous regimes , when p̂ ∈ { 0.9 , 1.0 } , PermK converges faster than TopK . When p̂ = 0.75 , both compressors have almost the same performance . In the heterogenous regime , when p̂ ∈ { 0 , 0.5 } , TopK is faster than PermK ; however , the difference between them is tiny compared to RandK . REFERENCES Dan Alistarh , Demjan Grubic , Jerry Li , Ryota Tomioka , and Milan Vojnovic . QSGD : Communication-efficient SGD via gradient quantization and encoding . In Advances in Neural Information Processing Systems ( NIPS ) , pp . 1709–1720 , 2017 . Dan Alistarh , Torsten Hoefler , Mikael Johansson , Sarit Khirirat , Nikola Konstantinov , and Cédric Renggli . The convergence of sparsified gradient methods . In Advances in Neural Information Processing Systems ( NeurIPS ) , 2018 . Aleksandr Beznosikov , Samuel Horváth , Peter Richtárik , and Mher Safaryan . On biased compression for distributed learning . arXiv preprint arXiv:2002.12410 , 2020 . Tom Brown , Benjamin Mann , Nick Ryder , Melanie Subbiah , Jared D Kaplan , Prafulla Dhariwal , Arvind Neelakantan , Pranav Shyam , Girish Sastry , Amanda Askell , Sandhini Agarwal , Ariel Herbert-Voss , Gretchen Krueger , Tom Henighan , Rewon Child , Aditya Ramesh , Daniel Ziegler , Jeffrey Wu , Clemens Winter , Chris Hesse , Mark Chen , Eric Sigler , Mateusz Litwin , Scott Gray , Benjamin Chess , Jack Clark , Christopher Berner , Sam McCandlish , Alec Radford , Ilya Sutskever , and Dario Amodei . Language models are few-shot learners . In H. Larochelle , M. Ranzato , R. Hadsell , M. F. Balcan , and H. Lin ( eds . ) , Advances in Neural Information Processing Systems , volume 33 , pp . 1877–1901 . Curran Associates , Inc. , 2020 . URL https : //proceedings.neurips.cc/paper/2020/file/ 1457c0d6bfcb4967418bfb8ac142f64a-Paper.pdf . Cong Fang , Chris Junchi Li , Zhouchen Lin , and Tong Zhang . SPIDER : Near-optimal non-convex optimization via stochastic path integrated differential estimator . In NeurIPS Information Processing Systems , 2018 . Ronald A Fisher and Frank Yates . Statistical tables for biological , agricultural aad medical research . 1938 . Eduard Gorbunov , Dmitry Kovalev , Dmitry Makarenko , and Peter Richtárik . Linearly converging error compensated SGD . In 34th Conference on Neural Information Processing Systems ( NeurIPS 2020 ) , 2020 . Eduard Gorbunov , Konstantin Burlachenko , Zhize Li , and Peter Richtárik . MARINA : Faster nonconvex distributed learning with compression . In 38th International Conference on Machine Learning , 2021 . Samuel Horváth , Chen-Yu Ho , L ’ udovít Horváth , Atal Narayan Sahu , Marco Canini , and Peter Richtárik . Natural compression for distributed deep learning . arXiv preprint arXiv:1905.10988 , 2019 . Sai Praneeth Karimireddy , Quentin Rebjock , Sebastian Stich , and Martin Jaggi . Error feedback fixes SignSGD and other gradient compression schemes . In 36th International Conference on Machine Learning ( ICML ) , 2019 . Ahmed Khaled and Peter Richtárik . Better theory for SGD in the nonconvex world . arXiv preprint arXiv:2002.03329 , 2020 . Sarit Khirirat , Hamid Reza Feyzmahdavian , and Mikael Johansson . Distributed learning with compressed gradients . arXiv preprint arXiv:1806.06573 , 2018 . Donald E. Knuth . The Art of Computer Programming , Volume 2 ( 3rd Ed . ) : Seminumerical Algorithms . Addison-Wesley Longman Publishing Co. , Inc. , USA , 1997 . ISBN 0201896842 . Anastasia Koloskova , Sebastian U Stich , and Martin Jaggi . Decentralized stochastic optimization and gossip algorithms with compressed communication . In International Conference on Machine Learning , 2019 . Yann LeCun , Corinna Cortes , and CJ Burges . Mnist handwritten digit database . ATT Labs [ Online ] . Available : http : //yann.lecun.com/exdb/mnist , 2 , 2010 . Zhize Li , Dmitry Kovalev , Xun Qian , and Peter Richtárik . Acceleration for compressed gradient descent in distributed and federated optimization . In International Conference on Machine Learning , 2020 . Zhize Li , Hongyan Bao , Xiangliang Zhang , and Peter Richtárik . Page : A simple and optimal probabilistic gradient estimator for nonconvex optimization . In International Conference on Machine Learning , pp . 6286–6295 . PMLR , 2021 . Konstantin Mishchenko , Eduard Gorbunov , Martin Takáč , and Peter Richtárik . Distributed learning with compressed gradient differences . arXiv preprint arXiv:1901.09269 , 2019 . Lam Nguyen , Jie Liu , Katya Scheinberg , and Martin Takáč . SARAH : A novel method for machine learning problems using stochastic recursive gradient . In The 34th International Conference on Machine Learning , 2017 . Constantin Philippenko and Aymeric Dieuleveut . Bidirectional compression in heterogeneous settings for distributed or federated learning with partial participation : tight convergence guarantees . arXiv preprint arXiv:2006.14591 , 2020 . Xun Qian , Hanze Dong , Peter Richtárik , and Tong Zhang . Error compensated loopless SVRG for distributed optimization . OPT2020 : 12th Annual Workshop on Optimization for Machine Learning ( NeurIPS 2020 Workshop ) , 2020 . Peter Richtárik , Igor Sokolov , and Ilyas Fatkhullin . EF21 : A new , simpler , theoretically better , and practically faster error feedback . arXiv preprint arXiv:2106.05203 , 2021 . Mher Safaryan , Rustem Islamov , Xun Qian , and Peter Richtárik . FedNL : Making Newton-type methods applicable to federated learning . arXiv preprint arXiv:2106.02969 , 2021 . Frank Seide , Hao Fu , Jasha Droppo , Gang Li , and Dong Yu . 1-bit stochastic gradient descent and its application to data-parallel distributed training of speech DNNs . In Fifteenth Annual Conference of the International Speech Communication Association , 2014 . Sebastian Stich and Sai Praneeth Karimireddy . The error-feedback framework : Better rates for SGD with delayed gradients and compressed communication . arXiv preprint arXiv:1909.05350 , 2019 . Sebastian U. Stich , J.-B . Cordonnier , and Martin Jaggi . Sparsified SGD with memory . In Advances in Neural Information Processing Systems ( NeurIPS ) , 2018 . Hanlin Tang , Chen Yu , Xiangru Lian , Tong Zhang , and Ji Liu . Doublesqueeze : Parallel stochastic gradient descent with double-pass error-compensated compression . In Kamalika Chaudhuri and Ruslan Salakhutdinov ( eds . ) , Proceedings of the 36th International Conference on Machine Learning , volume 97 of Proceedings of Machine Learning Research , pp . 6155–6165 , Long Beach , California , USA , 09–15 Jun 2019 . PMLR . URL http : //proceedings.mlr.press/ v97/tang19d.html . Ashish Vaswani , Noam Shazeer , Niki Parmar , Jakob Uszkoreit , Llion Jones , Aidan N Gomez , Ł ukasz Kaiser , and Illia Polosukhin . Attention is all you need . In I. Guyon , U. V. Luxburg , S. Bengio , H. Wallach , R. Fergus , S. Vishwanathan , and R. Garnett ( eds . ) , Advances in Neural Information Processing Systems , volume 30 . Curran Associates , Inc. , 2017 . URL https : //proceedings.neurips.cc/paper/2017/file/ 3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf . Thijs Vogels , Sai Praneeth Karimireddy , and Martin Jaggi . PowerSGD : Practical low-rank gradient compression for distributed optimization . In Neural Information Processing Systems , 2019 . Jiaxiang Wu , Weidong Huang , Junzhou Huang , and Tong Zhang . Error compensated quantized SGD and its applications to large-scale distributed optimization . In Jennifer Dy and Andreas Krause ( eds . ) , Proceedings of the 35th International Conference on Machine Learning , volume 80 of Proceedings of Machine Learning Research , pp . 5325–5333 , Stockholmsmässan , Stockholm Sweden , 10–15 Jul 2018 . PMLR . Appendix CONTENTS 1 Introduction 1 1.1 The problem and assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 A brief overview of the state of the art . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Summary of contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Beyond Independence : The Power of Correlated Compressors 3 2.1 AB inequality : a tool for a more precise control of compression variance . . . . . . 3 2.2 Why correlation may help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.3 Input variance compressors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.4 PermK : permutation based sparsifiers . . . . . . . . . . . . . . . . . . . . . . . . 5 3 Hessian Variance 6 3.1 Hessian variance can be zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.2 Second order characterization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4 Improved Iteration and Communication Complexity 7 4.1 Improvements in the ideal zero-Hessian-variance regime . . . . . . . . . . . . . . 8 5 Experiments 8 5.1 Testing theoretical predictions on a synthetic quadratic problem . . . . . . . . . . 9 5.2 Training an autoencoder with MNIST . . . . . . . . . . . . . . . . . . . . . . . . 9 A Extra Experiments 14 A.1 Experiments setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 A.2 Experiment with quadratic optimization tasks : full description . . . . . . . . . . . 14 A.3 Comparison of MARINA with RandK and MARINA with PermK on quadratic optimization problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 A.4 Comparison of EF21 with TopK and MARINA with PermK on quadratic optimization problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 A.5 Experiment with MNIST : full description . . . . . . . . . . . . . . . . . . . . . . 18 A.6 Comparison of MARINA with RandK and MARINA with PermK on MNIST dataset 18 A.7 Comparison of EF21 with TopK and MARINA with PermK on MNIST dataset . . 19 B MARINA Algorithm 20 C Missing Proofs 22 C.1 Proof of Lemma 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 C.2 Proof of Lemma 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 C.3 Proof of Theorem 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 C.4 Proof of Theorem 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 C.5 Proof of Theorem 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 C.6 Proof of Theorem 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 D Polyak-Łojasiewicz Analysis 29 D.1 Proof of Lemma 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 D.2 Proof of Theorem 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 E EF21 Analysis 31 E.1 EF21 rate in the non-convex regime . . . . . . . . . . . . . . . . . . . . . . . . . 31 E.2 EF21 in PŁ regime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 F Communication Model 34 G On Contractive Compressors and Error Feedback 34 G.1 On Contractive Compressors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 G.2 On Error Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 H Composition of Compressors with AB Assumption and Unbiased Compressors 36 I General Examples of PermK 37 I.1 Case d ≥ n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 I.2 Case n ≥ d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 J Implementation Details of PermK 39 K More Examples of Permutation-Based Compressors 39 K.1 Block permutation compressor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 K.2 Permutation of mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 L Analysis of Complexity Bounds 43 L.1 Nonconvex optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 L.1.1 Case n ≤ d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 L.1.2 Case n ≥ d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 L.2 PŁ assumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 L.2.1 Case n ≤ d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 L.2.2 Case n ≥ d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 M Group Hessian Variance 49 A EXTRA EXPERIMENTS In this section , we provide more detailed experiments and explanations . A.1 EXPERIMENTS SETUP All methods are implemented in Python 3.6 and run on a machine with 24 Intel ( R ) Xeon ( R ) Gold 6146 CPU @ 3.20GHz cores with 32-bit precision . Communication between master and nodes is emulated in one machine . In all experiments , we compare MARINA algorithm with RandK compressor and PermK compressor and EF21 with TopK side-by-side . In RandK and TopK , we take K = dd/ne ; we show in Lemma 13 that K = dd/ne is optimal for RandK . For TopK , the optimal rate predicted by the current state-of-the-art theory is obtained when K = d ( however , in practice , TopK works much better when K d ) . Lastly , we have the pessimistic assumption that L2± and L2+ are equal to their upper bound 1n ∑n i=1 L 2 i . A.2 EXPERIMENT WITH QUADRATIC OPTIMIZATION TASKS : FULL DESCRIPTION First , we present Algorithm 1 which is used in the experiments of Section 5.1 . The algorithm is designed to generate sparse quadratic optimization tasks where we can control L± using the noise scale . Furthermore , it can be seen that the procedure generates strongly convex quadratic optimization tasks ; thus , all assumptions from this paper are fulfilled to use theoretical results . Algorithm 1 Quadratic optimization task generation 1 : Parameters : number nodes n , dimension d , regularizer λ , and noise scale s. 2 : for i = 1 , . . . , n do 3 : Generate random noises νsi = 1 + sξ s i and ν b i = sξ b i , i.i.d . ξ s i , ξ b i ∼ N ( 0 , 1 ) 4 : Take vector bi = νsi 4 ( −1 + ν b i , 0 , · · · , 0 ) ∈ Rd 5 : Take the initial tridiagonal matrix Ai = νsi 4 2 −1 0 −1 . . . . . . . . . . . . −1 0 −1 2 ∈ Rd×d 6 : end for 7 : Take the mean of matrices A = 1n ∑n i=1 Ai 8 : Find the minimum eigenvalue λmin ( A ) 9 : for i = 1 , . . . , n do 10 : Update matrix Ai = Ai + ( λ− λmin ( A ) ) I 11 : end for 12 : Take starting point x0 = ( √ d , 0 , · · · , 0 ) 13 : Output : matrices A1 , · · · , An , vectors b1 , · · · , bn , starting point x0 Homogeneity of optimizations tasks is controlled by noise scale s ; indeed , with noise scale equal to zero , all matrices are equal , and , by increasing noise scale , functions become less “ similar ” and L2± grows . In Section 5.1 , we take noise scales s ∈ { 0 , 0.05 , 0.1 , 0.2 , 0.8 } . In Figure 3 , we provide the same experiments as in Section 5.1 but with λ = 0.0001 to capture dependencies under PŁ condition . Here , we also see that PermK has better performance when the number of nodes n ≥ 1000 and L± ≤ 0.21 . A.3 COMPARISON OF MARINA WITH RANDK AND MARINA WITH PERMK ON QUADRATIC OPTIMIZATION PROBLEMS In this section , we provide detailed experiments from Section 5.1 and comparisons of RandK and PermK with different step sizes ( see Figure 4 and Figure 5 ) . We omitted plots where algorithms diverged . We can see that in all experiments , PermK behaves better than RandK and tolerates larger step sizes . The improvement becomes more significant when n increases . A.4 COMPARISON OF EF21 WITH TOPK AND MARINA WITH PERMK ON QUADRATIC OPTIMIZATION PROBLEMS In this section , we provide detailed experiments from Section 5.1 and comparisons of EF21 with TopK and MARINA with PermK with different step sizes ( see Figure 6 and Figure 7 ) . We omitted plots where algorithms diverged . As we can see , when L± ≤ 0.21 and n ≥ 10000 , PermK converges faster than TopK . While in heterogeneous regimes , when L± is large , TopK has better performance except when n = 10000 . When n > d , we see that PermK converges faster in all experiments . A.5 EXPERIMENT WITH MNIST : FULL DESCRIPTION We introduce parameter p̂ . Initially , we randomly split MNIST into n + 1 parts : D0 , D1 , · · · , Dn , where n = 1000 is the number of nodes . Then , for all i ∈ { 1 , . . . , n } , the ith node takes split D0 with probability p̂ , or split Di with probability 1 − p̂ . We define the chosen split as D̂i . Using probability p̂ , we control the homogeneity of our distribution optimization task . Note that if p̂ = 1 , all nodes store the same data D0 , and if p̂ = 0 , nodes store different splits Di . Let us consider the more general optimization problem than in Section 5.2 . We optimize the following non-convex loss with regularization : min D∈Rdf×de , E∈Rde×df [ f ( D , E ) : = 1N N∑ i=1 ‖DEai − ai‖2 + λ2 ‖DE − I‖ 2 F ] , where ai ∈ Rdf are MNIST images , df = 784 is the number of features , de = 16 is the size of encoding space . regularizer λ ≥ 0 . Each node stores function fi ( D , E ) : = 1 |D̂i| ∑ j∈D̂i ‖DEaj − aj‖2 + λ 2 ‖DE − I‖2F , ∀i ∈ { 1 , . . . , n } . In Figure 8 , one plot for each compressor with the best convergence rate is provided for λ = { 0 , 0.00001 , 0.001 } and p̂ = { 0 , 0.5 , 0.75 , 0.9 , 1.0 } . We see that in homogeneous regimes , when p̂ ∈ { 0.9 , 1.0 } , PermK outperforms other compressors for any λ . And the larger the regularization parameter λ , the faster PermK convergences compared to rivals . A.6 COMPARISON OF MARINA WITH RANDK AND MARINA WITH PERMK ON MNIST DATASET In this section , we provide detailed experiments from Section 5.2 and comparisons of RandK and PermK with different step sizes ( see Figure 9 ) . We omitted plots where algorithms diverged . We see that in all experiments , PermK is better than RandK . Practical experiments on MNIST fully reproduce dependencies from our theory and experiments with synthetic quadratic optimization tasks from Section 5.1 . A.7 COMPARISON OF EF21 WITH TOPK AND MARINA WITH PERMK ON MNIST DATASET In this section , we provide detailed experiments from Section 5.2 and comparisons of RandK and PermK with different step sizes ( see Figure 10 ) . We omitted plots where algorithms diverged . We see that , when p̂ ∈ { 0.9 , 1.0 } , PermK tolerates larger step sizes and convergences faster than TopK . When a probability p̂ ∈ { 0 , 0.5 } , both compressors approximately tolerate the same step sizes , but TopK has a better performance when λ ∈ { 0 , 0.00001 } . B MARINA ALGORITHM To the best of our knowledge , the state-of-the-art method for solving the nonconvex problem ( 1 ) in terms of the theoretical communication efficiency is MARINA ( Gorbunov et al. , 2021 ) . In its simplest variant , MARINA performs iterations of the form xk+1 = xk − γgk , gk = 1 n n∑ i=1 gki , ( 10 ) where gki is a carefully designed biased estimator of the gradient ∇fi ( xk ) , and γ > 0 is a learning rate . The gradient estimators used in MARINA are initialized to the full gradients , i.e. , g0i = ∇fi ( x0 ) , for i ∈ { 1 , . . . , n } , and subsequently updated as gk+1i = { ∇fi ( xk+1 ) if θk = 1 gk + Cki ( ∇fi ( xk+1 ) −∇fi ( xk ) ) if θk = 0 , where θk is a Bernoulli random variable sampled at iteration k ( equal to 1 with probability p ∈ ( 0 , 1 ] , and equal to 0 with probability 1 − p ) , and Ci : Rd → Rd is a randomized compression operator sampled at iteration k on node i independently from other nodes . In particular , Gorbunov et al . ( 2021 ) assume that the compression operators Ci are unbiased , and that their variance is proportional to squared norm of the input vector : E [ Ci ( x ) ] = x , E [ ‖Ci ( x ) − x‖2 ] ≤ ωi ‖x‖2 , ∀x ∈ Rd . In each iteration of MARINA , the gradient estimator is reset to the true gradient with ( small ) probability p. Otherwise , each worker i compresses the difference of the last two local gradients , and communicates the compressed message mki = Cki ( ∇fi ( xk+1 ) −∇fi ( xk ) ) to the server . These messages are then aggregated by the server to form the new gradient estimator via gk+1 = gk + 1 n n∑ i=1 mki . Note that i ) this preserves the second relation in ( 10 ) , ii ) the server can compute gk+1 since it has access to gk , which is the case ( via a recursive argument ) if g0 is known by the server at the start of the iterative process10 . Algorithm 2 MARINA 1 : Input : starting point x0 , stepsize γ , probability p ∈ ( 0 , 1 ] , number of iterations T 2 : Initialize g0 = ∇f ( x0 ) 3 : for k = 0 , 1 , . . . , T − 1 do 4 : Sample θt ∼ Be ( p ) 5 : Broadcast gt to all workers 6 : for i = 1 , . . . , n in parallel do 7 : xt+1 = xt − γgt 8 : Set gt+1i = ∇fi ( xt+1 ) if θt = 1 , and g t+1 i = g t + Ci ( ∇fi ( xt+1 ) −∇fi ( xt ) ) otherwise 9 : end for 10 : gt+1 = 1n ∑n i=1 g t+1 i 11 : end for 12 : Output : x̂T chosen uniformly at random from { xt } T−1k=0 Further , note that the expected communication cost in each iteration of MARINA is equal to Comm = pd+ ( 1− p ) ζ , ζ = max i ζi , 10This is done by each worker sending the full gradient g0i = ∇fi ( x0 ) to the server at initialization . where d is the cost of communicating a ( possibly dense ) vector in Rd , and ζi ≤ d is the expected cost of communicating a vector compressed by Ci . MARINA one of the very few examples in stochastic optimization where the use of a biased estimator leads to a better theoretical complexity than the use of an unbiased estimator , with the other example being optimal SGD methods for single-node problems SARAH ( Nguyen et al. , 2017 ) , SPIDER ( Fang et al. , 2018 ) , PAGE ( Li et al. , 2021 ) . C MISSING PROOFS C.1 PROOF OF LEMMA 1 Lemma 1 . If Ci ∈ U ( ωi ) for i ∈ { 1 , 2 , . . . , n } , then { Ci } ni=1 ∈ U ( maxi ωi , 0 ) . If we further assume that the compressors are independent , then { Ci } ni=1 ∈ U ( 1n maxi ωi , 0 ) . Proof . Let us first assume unbiasedness only . By Jensen ’ s inequality , ∥∥∥∥∥ 1n n∑ i=1 Ci ( ai ) − 1 n n∑ i=1 ai ∥∥∥∥∥ 2 ≤ 1 n n∑ i=1 ‖Ci ( ai ) − ai‖2 . It remains to apply expectation on both sides and then use inequality E [ ‖Ci ( ai ) − ai‖2 ] ≤ ωi ‖ai‖2 , ∀i ∈ { 1 , . . . , n } , to conclude that { Ci } ni=1 ∈ U ( maxi ωi , 0 ) . Let us now add the assumption of independence . E ∥∥∥∥∥ 1n n∑ i=1 Ci ( ai ) − 1 n n∑ i=1 ai ∥∥∥∥∥ 2 = E ∥∥∥∥∥ 1n n∑ i=1 ( Ci ( ai ) − ai ) ∥∥∥∥∥ 2 = 1 n2 n∑ i=1 E [ ‖Ci ( ai ) − ai‖2 ] + 1 n2 ∑ i 6=j E [ 〈Ci ( ai ) − ai , Cj ( aj ) − aj〉 ] ≤ maxi ωi n2 n∑ i=1 ‖ai‖2 , by independence , thus , A = maxi ωi/n , B = 0 . C.2 PROOF OF LEMMA 2 Lemma 2 . L− ≤ L+ , L− ≤ 1n n∑ i=1 Li , L2+ ≤ 1n n∑ i=1 L2i , and L 2 + − L2− ≤ L2± ≤ L2+ . Proof . Let us define L− ( x , y ) : = ‖∇f ( x ) −∇f ( y ) ‖2 , L+ ( x , y ) : = 1 n n∑ i=1 ‖∇fi ( x ) −∇fi ( y ) ‖2 , L± ( x , y ) : = L+ ( x , y ) − L− ( x , y ) . The inequalities are now established as follows : 1 . By Jensen ’ s inequality and the definition of L+ , L− ( x , y ) ≤ L+ ( x , y ) ≤ L2+ ‖x− y‖ 2 , thus , L− is at most L+ . 2 . By the triangle inequality , we have ‖∇f ( x ) −∇f ( y ) ‖ ≤ 1 n n∑ i=1 ‖∇fi ( x ) −∇fi ( y ) ‖ ≤ 1 n n∑ i=1 Li ‖x− y‖ , thus L− is at most 1n ∑n i=1 Li . 3 . From the definition of Li , we have L+ ( x , y ) = 1 n n∑ i=1 ‖∇fi ( x ) −∇fi ( y ) ‖2 ≤ 1 n n∑ i=1 L2i ‖x− y‖ 2 , and L2+ is at most 1 n ∑n i=1 L 2 i . 4 . The right inequality follows from L− ( x , y ) ≥ 0 and L± ( x , y ) ≤ L+ ( x , y ) ≤ L2+ ‖x− y‖ 2 . Now , we prove the left inequality . From the definition of L± , we have L± ( x , y ) ≤ L2± ‖x− y‖ 2 , and L± ( x , y ) = L+ ( x , y ) − L− ( x , y ) , hence , L+ ( x , y ) ≤ L2± ‖x− y‖ 2 + L− ( x , y ) ≤ ( L2− + L2± ) ‖x− y‖ 2 , thus L2+ ≤ L2− + L2± . C.3 PROOF OF THEOREM 1 Theorem 1 . The PermK compressors from Definition 2 are unbiased and belong to IV ( 1 ) . Proof . We fix any x ∈ Rd and prove unbiasedness : E [ Ci ( x ) ] = n qi∑ j=q ( i−1 ) +1 E [ xπjeπj ] = n qi∑ j=q ( i−1 ) +1 1 d d∑ i=1 xiei = nq d x = x . Next , we find the second moment : E [ ‖Ci ( x ) ‖2 ] = n2 qi∑ j=q ( i−1 ) +1 E [ |xπj |2 ] = n2 qi∑ j=q ( i−1 ) +1 1 d d∑ i=1 |xi|2 = n2 q d ‖x‖2 = n ‖x‖2 . For all a1 , . . . , an ∈ Rd , the following inequality holds : E ∥∥∥∥∥ 1n∑ i=1 Ci ( ai ) ∥∥∥∥∥ 2 = 1 n2 n∑ i=1 E [ ‖Ci ( ai ) ‖2 ] + ∑ i6=j E [ 〈Ci ( ai ) , Cj ( aj ) 〉 ] = 1 n2 n∑ i=1 E [ ‖Ci ( ai ) ‖2 ] = 1 n n∑ i=1 ‖ai‖2 . Hence , Assumption 4 is fulfilled with A = B = 1 . C.4 PROOF OF THEOREM 2 Theorem 2 . The PermK compressors from Definition 3 are unbiased and belong to IV ( A ) with A = 1− n−dn−1 . Proof . We fix any x ∈ Rd and prove unbiasedness : E [ Ci ( x ) ] = dE [ xπieπi ] = d 1 d d∑ i=1 xiei = x . Next , we find the second moment : E [ ‖Ci ( x ) ‖2 ] = 1 d d∑ i=1 d2|xi|2 = d ‖x‖2 . For all i 6= j ∈ { 1 , 2 , . . . , n } , x , y ∈ Rd , we have E [ 〈Ci ( x ) , Cj ( y ) 〉 ] = E [ 〈Ci ( x ) , Cj ( y ) 〉|πi = πj ] Prob ( πi = πj ) = ( q − 1 ) ( n− 1 ) d d∑ q=1 E [ 〈Ci ( x ) , Cj ( y ) 〉|πi = d , πj = d ] = ( q − 1 ) ( n− 1 ) d d∑ q=1 d2xqyq = ( q − 1 ) d n− 1 〈x , y〉 . For all a1 , . . . , an ∈ Rd , the following inequality holds : E ∥∥∥∥∥ 1n n∑ i=1 Ci ( ai ) ∥∥∥∥∥ 2 = 1 n2 n∑ i=1 E [ ‖Ci ( ai ) ‖2 ] + 1 n2 ∑ i6=j E [ 〈Ci ( ai ) , Cj ( aj ) 〉 ] = d n2 n∑ i=1 ‖ai‖2 + 1 n2 ∑ i6=j E [ 〈Ci ( ai ) , Cj ( aj ) 〉 ] = d n2 n∑ i=1 ‖ai‖2 + ( q − 1 ) d n2 ( n− 1 ) ∑ i 6=j 〈ai , aj〉 = ( d n − ( q − 1 ) d n ( n− 1 ) ) 1 n n∑ i=1 ‖ai‖2 + ( q − 1 ) d n− 1 ∥∥∥∥∥ 1n n∑ i=1 ai ∥∥∥∥∥ = ( 1− n− d n− 1 ) 1 n n∑ i=1 ‖ai‖2 + n− d n− 1 ∥∥∥∥∥ 1n n∑ i=1 ai ∥∥∥∥∥ . Hence , Assumption 4 is fulfilled with A = B = 1− n−dn−1 . C.5 PROOF OF THEOREM 3 Theorem 3 . Assume that for each i ∈ { 1 , 2 , . . . , n } , the function fi is twice continuously differentiable . Fix any x , y ∈ Rd and define11 Hi ( x , y ) : = ∫ 1 0 ∇2fi ( x+ t ( y − x ) ) dt , H ( x , y ) : = 1n n∑ i=1 Hi ( x , y ) . ( 9 ) 11Note that Hi ( x , y ) is the average of the Hessians of fi on the line segment connecting x and y . Then the matrices Li ( x , y ) : = H2i ( x , y ) , L− ( x , y ) : = H 2 ( x , y ) , L+ ( x , y ) : = 1n ∑n i=1 H 2 i ( x , y ) and L± ( x , y ) : = L+ ( x , y ) −L− ( x , y ) are symmetric and positive semidefinite . Moreover , L2i = sup x , y∈Rd , x 6=y ( x−y ) > Li ( x , y ) ( x−y ) ‖x−y‖2 , L 2 − = sup x , y∈Rd , x 6=y ( x−y ) > L− ( x , y ) ( x−y ) ‖x−y‖2 , L2+ = sup x , y∈Rd , x 6=y ( x−y ) > L+ ( x , y ) ( x−y ) ‖x−y‖2 , L 2 ± = sup x , y∈Rd , x 6=y ( x−y ) > L± ( x , y ) ( x−y ) ‖x−y‖2 . Proof . The fundamental theorem of calculus says that for any continuously differentiable function ψ : R→ R we have ψ ( 1 ) − ψ ( 0 ) = ∫ 1 0 ψ′ ( t ) dt . Choose i ∈ { 1 , 2 , . . . , n } , j ∈ { 1 , 2 , . . . , d } , distinct vectors x , y ∈ Rd , and let ψij ( t ) : = 〈∇fi ( x+ t ( y − x ) ) , ej〉 , where ej ∈ Rd is the jth standard unit basis vector . Since fi is twice continuously differentiable , ψij is continuously differentiable , and by the chain rule , ψ′ij ( t ) = 〈∇2fi ( x+ t ( y − x ) ) ( y − x ) , ej〉 . Applying the fundamental theorem of calculus , we get ψij ( 1 ) − ψij ( 0 ) = ∫ 1 0 〈∇2fi ( x+ t ( y − x ) ) ( y − x ) , ej〉dt . ( 11 ) Let ψi : R → Rd be defined by ψi ( t ) : = ∇fi ( x + t ( y − x ) ) = ( ψi1 ( t ) , . . . , ψid ( t ) ) . Combining equations 11 for j = 1 , 2 , . . . , d into a vector form using the fact that∫ 1 0 〈∇2fi ( x+ t ( y − x ) ) ( y − x ) , ej〉dt = 〈 ( ∫ 1 0 ∇2fi ( x+ t ( y − x ) ) dt ) ( y − x ) , ej 〉 we arrive at the identity ∇fi ( y ) −∇fi ( x ) = ψi ( 1 ) − ψi ( 0 ) ( 11 ) = ( ∫ 1 0 ∇2fi ( x+ t ( y − x ) ) dt ) ( y − x ) ( 9 ) = Hi ( x , y ) ( y − x ) . ( 12 ) Next , since ∇2fi ( x + t ( y − x ) ) is symmetric for all t , so is Hi ( x , y ) , and hence Li ( x , y ) : = H2i ( x , y ) = H > i ( x , y ) Hi ( x , y ) , which also means that Li ( x , y ) is symmetric and positive semidefinite . Combining these observations , we obtain ‖∇fi ( x ) −∇fi ( y ) ‖2 ( 12 ) = ( x− y ) > Li ( x , y ) ( x− y ) . ( 13 ) Clearly , L2i = sup x , y∈Rd , x6=y ‖∇fi ( x ) −∇fi ( y ) ‖2 ‖x− y‖2 ( 13 ) = sup x , y∈Rd , x 6=y ( x− y ) > Li ( x , y ) ( x− y ) ‖x− y‖2 . Using the same reasoning , we have∇f ( y ) −∇f ( x ) = H ( x , y ) ( y − x ) , and L2− = sup x , y∈Rd , x 6=y ‖∇f ( x ) −∇f ( y ) ‖2 ‖x− y‖2 = sup x , y∈Rd , x 6=y ( x− y ) > L− ( x , y ) ( x− y ) ‖x− y‖2 , where L ( x , y ) : = H2 ( x , y ) = H > ( x , y ) H ( x , y ) is symmetric and positive semidefinite , since Hi ( x , y ) are symmetric and positive semidefinite . Finally , L2+ = sup x , y∈Rd , x 6=y 1 n ∑n i=1 ‖∇fi ( x ) −∇fi ( y ) ‖ 2 ‖x− y‖2 = sup x , y∈Rd , x 6=y ( x− y ) > ( 1 n ∑n i=1 H 2 i ( x , y ) ) ( x− y ) ‖x− y‖2 = sup x , y∈Rd , x 6=y ( x− y ) > L+ ( x , y ) ( x− y ) ‖x− y‖2 , and L2± = sup x , y∈Rd , x6=y 1 n ∑n i=1 ‖∇fi ( x ) −∇fi ( y ) ‖ 2 − ‖∇f ( x ) −∇f ( y ) ‖2 ‖x− y‖2 = sup x , y∈Rd , x 6=y ( x− y ) > ( 1 n ∑n i=1 H 2 i ( x , y ) −H2 ( x , y ) ) ( x− y ) ‖x− y‖2 = sup x , y∈Rd , x 6=y ( x− y ) > L± ( x , y ) ( x− y ) ‖x− y‖2 . Note , that L+ ( x , y ) inherits symmetry and positive semidefiniteness from H2i ( x , y ) . Symmetry of L± ( x , y ) is trivial . To prove positive semidefiniteness of L± ( x , y ) , note that L± ( x , y ) = 1 n n∑ i=1 H2i ( x , y ) −H2 ( x , y ) = 1 n n∑ i=1 ( Hi ( x , y ) −H ( x , y ) + H ( x , y ) ) 2 −H2 ( x , y ) = 1 n n∑ i=1 ( Hi ( x , y ) −H ( x , y ) ) 2 + 1 n H ( x , y ) n∑ i=1 ( Hi ( x , y ) −H ( x , y ) ) + 1 n n∑ i=1 ( Hi ( x , y ) −H ( x , y ) ) H ( x , y ) = 1 n n∑ i=1 ( Hi ( x , y ) −H ( x , y ) ) 2 , which is positive semidefinite . C.6 PROOF OF THEOREM 4 Theorem 4 . Let Assumptions 1 , 2 , 3 and 4 be satisfied . Let the stepsize in MARINA be chosen as 0 < γ ≤ 1M , where M = L− + √ 1−p p ( ( A−B ) L2+ +BL2± ) . Then after T iterations , MARINA finds point x̂T for which E [ ∥∥∇f ( x̂T ) ∥∥2 ] ≤ 2∆0γT . Proof . In the proof , we follow closely the analysis of Gorbunov et al . ( 2021 ) and adapt it to utilize the power of Hessian variance ( Definition 4 ) and AB assumption ( Assumption 4 ) . We bound the term E [ ∥∥gt+1 −∇f ( xt+1 ) ∥∥2 ] in a similar fashion to Gorbunov et al . ( 2021 ) , but make use of the AB assumption . Other steps are essentially identical , but refine the existing analysis through Hessian variance . First , we recall the following lemmas . Lemma 3 ( Li et al . ( 2021 ) ) . Suppose that L− is finite and let xt+1 = xt − γgt . Then for any gt ∈ Rd and γ > 0 , we have f ( xt+1 ) ≤ f ( xt ) − γ 2 ∥∥∇f ( xt ) ∥∥2 − ( 1 2γ − L− 2 ) ∥∥xt+1 − xt∥∥2 + γ 2 ∥∥gt − xt∥∥2 . ( 14 ) Lemma 4 ( Richtárik et al . ( 2021 ) ) . Let a , b > 0 . If 0 ≤ γ ≤ 1√ a+b , then aγ2 + bγ ≤ 1 . Moreover , the bound is tight up to the factor of 2 since 1√ a+b ≤ min { 1√ a , 1b } ≤ 2√ a+b Next , we get an upper bound of E [ ∥∥gt+1 −∇f ( xt+1 ) ∥∥2∣∣∣xt+1 ] . Lemma 5 . Let us consider gt+1 from Line 8 of Algorithm 2 and assume , that Assumptions 2 , 3 and 4 hold , then E [ ∥∥gt+1 −∇f ( xt+1 ) ∥∥2∣∣∣xt+1 ] ≤ ( 1− p ) ( ( A−B ) L2+ +BL2± ) ∥∥xt+1 − xt∥∥2 + ( 1− p ) ∥∥gt −∇f ( xt ) ∥∥2 . ( 15 ) Proof . In the view of definition of gt+1 , we get E [ ∥∥gt+1 −∇f ( xt+1 ) ∥∥2∣∣∣xt+1 ] = ( 1− p ) E ∥∥∥∥∥gt + 1n n∑ i=1 Ci ( ∇fi ( xt+1 ) −∇fi ( xt ) ) −∇f ( xt+1 ) ∥∥∥∥∥ 2 ∣∣∣∣∣∣xt+1 = ( 1− p ) E ∥∥∥∥∥ 1n n∑ i=1 Ci ( ∇fi ( xt+1 ) −∇fi ( xt ) ) −∇f ( xt+1 ) +∇f ( xt ) ∥∥∥∥∥ 2 ∣∣∣∣∣∣xt+1 + ( 1− p ) ∥∥gt −∇f ( xt ) ∥∥2 . In the last inequality we used unbiasedness of Ci . Next , from AB inequality , we have E [ ∥∥gt+1 −∇f ( xt+1 ) ∥∥2∣∣∣xt+1 ] ≤ ( 1− p ) E ∥∥∥∥∥ 1n n∑ i=1 Ci ( ∇fi ( xt+1 ) −∇fi ( xt ) ) −∇f ( xt+1 ) +∇f ( xt ) ∥∥∥∥∥ 2 ∣∣∣∣∣∣xt+1 + ( 1− p ) ∥∥gt −∇f ( xt ) ∥∥2 . ≤ ( 1− p ) ( A ( 1 n n∑ i=1 ∥∥∇fi ( xt+1 ) −∇fi ( xt ) ∥∥2 ) −B ∥∥∇f ( xt+1 ) −∇f ( xt ) ∥∥2 ) + ( 1− p ) ∥∥gt −∇f ( xt ) ∥∥2 = ( 1− p ) ( ( A−B ) ( 1 n n∑ i=1 ∥∥∇fi ( xt+1 ) −∇fi ( xt ) ∥∥2 ) +B ( 1 n n∑ i=1 ∥∥∇fi ( xt+1 ) −∇fi ( xt ) ∥∥2 − ∥∥∇f ( xt+1 ) −∇f ( xt ) ∥∥2 ) ) + ( 1− p ) ∥∥gt −∇f ( xt ) ∥∥2 . Using Assumption 2 and Definition 4 , we obtain ( 15 ) . We are ready to prove Theorem 4 . Defining Φt : = f ( xt ) − f inf + γ 2p ∥∥gt −∇f ( xt ) ∥∥2 , L̂2 : = ( A−B ) L2+ +BL2± , and using inequalities ( 14 ) and ( 15 ) , we get E [ Φt+1 ] ≤ E [ f ( xt ) − f inf − γ 2 ∥∥∇f ( xt ) ∥∥2 − ( 1 2γ − L− 2 ) ∥∥xt+1 − xt∥∥2 + γ 2 ∥∥gt −∇f ( xt ) ∥∥2 ] + γ 2p E [ ( 1− p ) L̂2 ∥∥xt+1 − xt∥∥2 + ( 1− p ) ∥∥gt −∇f ( xt ) ∥∥2 ] = E [ Φt ] − γ 2 E [ ∥∥∇f ( xt ) ∥∥2 ] + ( γ ( 1− p ) L̂2 2p − 1 2γ + L− 2 ) E [ ∥∥xt+1 − xt∥∥2 ] ≤ E [ Φt ] − γ 2 E [ ∥∥∇f ( xt ) ∥∥2 ] where in the last inequality we use γ ( 1− p ) L̂2 2p − 1 2γ + L 2 ≤ 0 following from the stepsize choice and Lemma 4 . Summing up inequalities E [ Φt+1 ] ≤ E [ Φt ] − γ2 E [ ‖∇f ( xt ) ‖2 ] for t = 0 , 1 , . . . , T − 1 and rearranging the terms , we get 1 T T−1∑ t=0 E [ ∥∥∇f ( xt ) ∥∥2 ] ≤ 2 γT T−1∑ t=0 ( E [ Φt ] − E [ Φt+1 ] ) = 2 ( E [ Φ0 ] − E [ ΦT ] ) γT ≤ 2∆0 γT , since g0 = ∇f ( x0 ) and ΦT ≥ 0 . Finally , using the tower property and the definition of x̂T ( see Section B ) , we obtain the desired result . D POLYAK-ŁOJASIEWICZ ANALYSIS In this section , we analyze the algorithm under Polyak-Łojasiewicz ( PŁ ) condition . We show that MARINA algorithm with Assumption 5 enjoys a linear convergence rate . Now , we state the assumption and the convergence rate theorem . Assumption 5 ( PŁ condition ) . Function f satisfies Polyak-Łojasiewicz ( PŁ ) condition , i.e. , ‖∇f ( x ) ‖2 ≥ 2µ ( f ( x ) − f ? ) , ∀x ∈ Rd , ( 16 ) where µ > 0 and f ? : = infx f ( x ) . Lemma 6 . For L− > 0 and µ from Assumption 5 holds that L− ≥ µ. Theorem 5 . Let Assumptions 1 , 2 , 3 , 4 and 5 be satisfied and γ ≤ min ( L− + √ 2 ( 1− p ) p ( ( A−B ) L2+ +BL2± ) ) −1 , p 2µ , ( 17 ) then for xT from MARINA algorithm the following inequality holds : E [ f ( xT ) − f ? ] ≤ ( 1− γµ ) T ∆0 . We provide the proof to Theorem 5 in Section D.2 . In Table 5 , we provide communication complexity of MARINA with PermK and RandK , and EF21 with TopK , optimized w.r.t . parameters of the methods . As in Section 4 , we see that MARINA with PermK is not worse than MARINA with RandK ( recall Lemma 2 ) . Let us consider zero Hessian variance regime : L± = 0 . When d ≥ n , PermK compressor has communication complexity O ( max { dL−/nµ , d } ) , while RandK compressor has communication complexity O ( max { dL−/√nµ , d } ) . And the communication complexity of PermK is strictly better when dL−/√nµ > d. Moreover , if d ≤ n and ( 1 + d/√n ) L−/µ > d , then we get the strict improvement of the communication complexity fromO ( max { ( 1 + d/√n ) L−/µ , d } ) toO ( max { L−/µ , d } ) over MARINA with RandK . D.2 PROOF OF THEOREM 5 Theorem 5 . Let Assumptions 1 , 2 , 3 , 4 and 5 be satisfied and γ ≤ min ( L− + √ 2 ( 1− p ) p ( ( A−B ) L2+ +BL2± ) ) −1 , p 2µ , ( 17 ) then for xT from MARINA algorithm the following inequality holds : E [ f ( xT ) − f ? ] ≤ ( 1− γµ ) T ∆0 . Proof . The analysis is almost the same as in Gorbunov et al . ( 2021 ) , but we include it for completeness . Let us define Φt : = f ( xt ) − f inf + γ p ∥∥gt −∇f ( xt ) ∥∥2 , L̂2 : = ( ( A−B ) L2+ +BL2± ) . As in Appendix C.6 , we use ( 14 ) and ( 15 ) to get that E [ Φt+1 ] ≤ E [ f ( xt ) − f inf − γ 2 ∥∥∇f ( xt ) ∥∥2 − ( 1 2γ − L− 2 ) ∥∥xt+1 − xt∥∥2 + γ 2 ∥∥gt −∇f ( xt ) ∥∥2 ] + γ p E [ ( 1− p ) L̂2 ∥∥xt+1 − xt∥∥2 + ( 1− p ) ∥∥gt −∇f ( xt ) ∥∥2 ] ( 16 ) ≤ E [ ( 1− γµ ) ( f ( xt ) − f inf ) − ( 1 2γ − L− 2 ) ∥∥xt+1 − xt∥∥2 + γ 2 ∥∥gt −∇f ( xt ) ∥∥2 ] + γ p E [ ( 1− p ) L̂2 ∥∥xt+1 − xt∥∥2 + ( 1− p ) ∥∥gt −∇f ( xt ) ∥∥2 ] = E [ ( 1− γµ ) ( f ( xt ) − f inf ) + ( γ 2 + γ p ( 1− p ) ) ∥∥gt −∇f ( xt ) ∥∥2 ] + E [ ( γ p ( 1− p ) L̂2 − 1 2γ + L− 2 ) ∥∥xt+1 − xt∥∥2 ] ≤ ( 1− γµ ) E [ Φt ] . In the last inequality , we used γp ( 1 − p ) L̂ 2 − 12γ + L− 2 ≤ 0 and γ 2 + γ p ( 1 − p ) ≤ ( 1 − γµ ) γ p , that follow from ( 17 ) and Lemma 4 . Unrolling E [ Φt+1 ] ≤ ( 1− γµ ) E [ Φt ] and using g0 = ∇f ( x0 ) , we have E [ f ( xT ) − f inf ] ≤ E [ ΦT ] ≤ ( 1− γµ ) TΦ0 = ( 1− γµ ) T ( f ( x0 ) − f inf ) . This concludes the proof . E EF21 ANALYSIS We provide convergence proofs of EF21 algorithm from Richtárik et al . ( 2021 ) for non-convex and PŁ regimes . They will be almost identical to the one by Richtárik et al . ( 2021 ) ( indeed , the only change is the constant L+ instead of L̃ ) , but we have decided to include it for the sake of clarity . E.1 EF21 RATE IN THE NON-CONVEX REGIME We will be using the following lemmas , the proofs of which are in their corresponding papers . Lemma 7 ( Richtárik et al . ( 2021 ) ) . Let C to be α-contractive for 0 < α ≤ 1 . Define Gti : = ‖gti −∇fi ( xt ) ‖ 2 and W t : = { gt1 , . . . , gtn , xt , xt+1 } . For any s > 0 we have E [ Gt+1i |W t ] ≤ ( 1− θ ( s ) ) Gti + β ( s ) ∥∥∇fi ( xt+1 ) −∇fi ( xt ) ∥∥2 , ( 18 ) where θ ( s ) : = 1− ( 1− α ) ( 1 + s ) , and β ( s ) : = ( 1− α ) ( 1 + s−1 ) . ( 19 ) Lemma 8 ( Richtárik et al . ( 2021 ) ) . Let 0 < α ≤ 1 and for s > 0 let θ ( s ) and β ( s ) be as in equation 19 . Then the solution of the optimization problem min s { β ( s ) θ ( s ) : 0 < s < α 1− α } ( 20 ) is given by s∗ = 1√ 1−α − 1 . Furthermore , θ ( s ∗ ) = 1− √ 1− α , β ( s∗ ) = 1−α 1− √ 1−α and√ β ( s∗ ) θ ( s∗ ) = 1√ 1− α − 1 = 1 α + √ 1− α α − 1 ≤ 2 α − 1 . ( 21 ) We are now ready to conduct the proof . Theorem 6 . Let Assumptions 1 and 2 hold , and let the stepsize be set as 0 < γ ≤ ( L− + L+ √ β θ ) −1 . ( 22 ) Fix T ≥ 1 and let x̂T be chosen from the iterates x0 , x1 , . . . , xT−1 uniformly at random . Then E [ ∥∥∇f ( x̂T ) ∥∥2 ] ≤ 2 ( f ( x0 ) − f inf ) γT + E [ G0 ] θT . ( 23 ) Proof . STEP 1 . Recall that Lemma 7 says that E [ ∥∥gt+1i −∇fi ( xt+1 ) ∥∥2 |W t ] ≤ ( 1−θ ) ∥∥gti −∇fi ( xt ) ∥∥2 +β ∥∥∇fi ( xt+1 ) −∇fi ( xt ) ∥∥2 , ( 24 ) where θ = θ ( s∗ ) and β = β ( s∗ ) are given by Lemma 8 . Averaging inequalities equation 24 over i ∈ { 1 , 2 , . . . , n } gives E [ Gt+1 |W t ] = 1 n n∑ i=1 E [ ∥∥gt+1i −∇fi ( xt+1 ) ∥∥2 |W t ] ≤ ( 1− θ ) 1 n n∑ i=1 ∥∥gti −∇fi ( xt ) ∥∥2 + β 1n n∑ i=1 ∥∥∇fi ( xt+1 ) −∇fi ( xt ) ∥∥2 = ( 1− θ ) Gt + β 1 n n∑ i=1 ∥∥∇fi ( xt+1 ) −∇fi ( xt ) ∥∥2 ≤ ( 1− θ ) Gt + βL+ ∥∥xt+1 − xt∥∥2 . ( 25 ) Using Tower property and L-smoothness in equation 25 , we proceed to E [ Gt+1 ] = E [ E [ Gt+1 |W t ] ] ≤ ( 1− θ ) E [ Gt ] + βL2+E [ ∥∥xt+1 − xt∥∥2 ] . ( 26 ) STEP 2 . Next , using Lemma 3 and Jensen ’ s inequality applied to the function x 7→ ‖x‖2 , we obtain the bound f ( xt+1 ) ≤ f ( xt ) − γ 2 ∥∥∇f ( xt ) ∥∥2 − ( 1 2γ − L− 2 ) ∥∥xt+1 − xt∥∥2 + γ 2 ∥∥∥∥∥ 1n n∑ i=1 ( gti −∇fi ( xt ) ) ∥∥∥∥∥ 2 ≤ f ( xt ) − γ 2 ∥∥∇f ( xt ) ∥∥2 − ( 1 2γ − L− 2 ) ∥∥xt+1 − xt∥∥2 + γ 2 Gt . ( 27 ) Subtracting f inf from both sides of equation 27 and taking expectation , we get E [ f ( xt+1 ) − f inf ] ≤ E [ f ( xt ) − f inf ] − γ 2 E [ ∥∥∇f ( xt ) ∥∥2 ] − ( 1 2γ − L− 2 ) E [ ∥∥xt+1 − xt∥∥2 ] + γ 2 E [ Gt ] . ( 28 ) COMBINING STEP 1 AND STEP 2 . Let δt : = E [ f ( xt ) − f inf ] , st : = E [ Gt ] and rt : = E [ ∥∥xt+1 − xt∥∥2 ] . Then by adding equation 28 with a γ2θ multiple of equation 26 we obtain δt+1 + γ 2θ st+1 ≤ δt − γ 2 ∥∥∇f ( xt ) ∥∥2 − ( 1 2γ − L− 2 ) rt + γ 2 st + γ 2θ ( βL2+r t + ( 1− θ ) st ) = δt + γ 2θ st − γ 2 ∥∥∇f ( xt ) ∥∥2 − ( 1 2γ − L− 2 − γ 2θ βL2+ ) rt ≤ δt + γ 2θ st − γ 2 ∥∥∇f ( xt ) ∥∥2 . The last inequality follows from the bound γ2 βL 2 + θ + L−γ ≤ 1 , which holds from our assumption on the stepsize and Lemma 4 . By summing up inequalities for t = 0 , . . . , T − 1 , we get 0 ≤ δT + γ 2θ sT ≤ δ0 + γ 2θ s0 − γ 2 T−1∑ t=0 E [ ∥∥∇f ( xt ) ∥∥2 ] . Multiplying both sides by 2γT , after rearranging we get T−1∑ t=0 1 T E [ ∥∥∇f ( xt ) ∥∥2 ] ≤ 2δ0 γT + s0 θT . It remains to notice that the left hand side can be interpreted as E [ ∥∥∇f ( x̂T ) ∥∥2 ] , where x̂T is chosen from x0 , x1 , . . . , xT−1 uniformly at random . E.2 EF21 IN PŁ REGIME Theorem 7 . Let Assumptions 1 , 2 and 5 hold , and let the stepsize in EF21 be set as 0 < γ ≤ min ( L− + L+ √ 2β θ ) −1 , θ 2µ . ( 29 ) Let Ψt : = f ( xt ) − f inf + γθG t. Then for any T ≥ 0 , we have E [ ΨT ] ≤ ( 1− γµ ) TE [ Ψ0 ] . ( 30 ) Proof . Again , this follows Richtárik et al . ( 2021 ) almost verbatim . We proceed as in the previous proof , but use the PŁ inequality and subtract f inf from both sides of equation 27 to get E [ f ( xt+1 ) − f inf ] ≤ E [ f ( xt ) − f inf ] − γ 2 ∥∥∇f ( xt ) ∥∥2 − ( 1 2γ − L− 2 ) ∥∥xt+1 − xt∥∥2 + γ 2 Gt ≤ ( 1− γµ ) E [ f ( xt ) − f inf ] − ( 1 2γ − L− 2 ) ∥∥xt+1 − xt∥∥2 + γ 2 Gt . Let δt : = E [ f ( xt ) − f inf ] , st : = E [ Gt ] and rt : = E [ ∥∥xt+1 − xt∥∥2 ] . Then by adding the above inequality with a γθ multiple of equation 26 , we obtain δt+1 + γ θ st+1 ≤ ( 1− γµ ) δt − ( 1 2γ − L− 2 ) rt + γ 2 st + γ θ ( ( 1− θ ) st + βL2+rt ) = ( 1− γµ ) δt + γ θ ( 1− θ 2 ) st − ( 1 2γ − L− 2 − βL2+γ θ ) rt . Note that our assumption on the stepsize implies that 1 − θ2 ≤ 1 − γµ and 1 2γ − L− 2 − βL2+γ θ ≥ 0 . The last inequality follows from the bound γ2 2βL 2 + θ + γL− ≤ 1 , which holds because of Lemma 4 and our assumption on the stepsize . Thus , δt+1 + γ θ st+1 ≤ ( 1− γµ ) ( δt + γ θ st ) . It remains to unroll the recurrence . F COMMUNICATION MODEL As mentioned in the introduction , we consider the regime where the worker-to-server communication is the bottleneck of the system so that the server-to-workers communication can be neglected . While this is a standard model used in many prior works , we include a brief explanation of why and when this regime is useful . 1 . Peer-to-peer communication . First , this regime makes sense when the server is merely an abstraction , and does not exist physically . Indeed , from the point of view of each worker , the server may merely represent “ all other nodes ” combined . In this model , “ a worker sending a message to the server ” should be interpreted as this worker sending the message to all other workers . Clearly , in this model there is no need for the “ server ” to communicate the aggregated message back to the workers since aggregation is performed on all workers independently , and the aggregated message is immediately available to all workers without the need for any additional communication . 2 . Fast broadcast . Second , the above regime makes sense in situations where the server exists physically , but is able to broadcast to the workers at a much higher speed compared to the worker-to-server communication . This happens in several distributed systems , e.g. , on certain supercomputers ( Mishchenko et al. , 2019 ) . Virtually all theoretical works on communication efficient distributed algorithms assume that the server-to-worker communication is cheap , and in this work we follow in their footsteps . Having said that , our work can be extended to the more difficult regime where the server-to-worker communication is also costly ( Horváth et al. , 2019 ; Tang et al. , 2019 ; Philippenko & Dieuleveut , 2020 ; Gorbunov et al. , 2020 ) . However , for simplicity , we do not explore this extension in this work . G ON CONTRACTIVE COMPRESSORS AND ERROR FEEDBACK G.1 ON CONTRACTIVE COMPRESSORS The most successful algorithmic solutions to solving the nonconvex distributed optimization problem ( 1 ) in a communication-efficient manner under the communication model described in Appendix F involve stochastic gradient descent ( SGD ) methods with communication compression . There are two large classes of such methods , depending on the type of compression operator involved : ( i ) methods that work with contractive ( and possibly biased stochastic ) compression operators , such as TopK or RankK , and ( ii ) methods that work with unbiased and independent ( across the workers ) stochastic compression operators , such as RandK . A ( randomized ) compression operator C : Rd → Rd is α-contractive ( we write C ∈ C ( α ) ) , where 0 < α ≤ 1 , if E [ ‖C ( x ) − x‖2 ] ≤ ( 1− α ) ‖x‖2 , x ∈ Rd . ( 31 ) A canonical example is the ( deterministic ) TopK compressor , which outputs the K largest ( in absolute value ) entries of the input vector x , and zeroes out the rest . TopK is α-contractive with α = K/d . Another example is the RankK compressor based on the best rank-K approximation of x represented as an a×b = dmatrix . It can be shown that RankK is α-contractive with α = K/min { a , b } ( Safaryan et al. , 2021 , Section A.3.2 ) . We refer to the work of Vogels et al . ( 2019 ) for a practical communication-efficient method PowerSGD based on low-rank approximations . Of special importance are α-compressors arising from unbiased compressors via appropriate scaling . LetQ : Rd → Rd be an unbiased operator with variance proportional to the square norm of the input vector . That is , assume that E [ Q ( x ) ] = x for all x ∈ Rd and that there exists ω ≥ 0 such that E [ ‖Q ( x ) − x‖2 ] ≤ ω ‖x‖2 , ∀x ∈ Rd . ( 32 ) We will write Q ∈ U ( ω ) for brevity . It is well known that the operator C = ( ω + 1 ) −1Q is α-contractive with α = ( ω + 1 ) −1 . An example of a contractive compressor arising this way is ( ω + 1 ) −1RandK , which keeps a subset of K entries of the input vector x chosen uniformly at random , and zeroes out the rest . As TopK , ( ω + 1 ) −1RandK is α-contractive , with α = K/d . Distributed SGD methods relying on general contractive compressors , i.e. , on contractive which do not arise from unbiased compressors from scaling , need to rely on the error-feedback / errorcompensation mechanism to avoid divergence . G.2 ON ERROR FEEDBACK An alternative approach to the one represented by MARINA is to seek more aggressive compression , even at the cost of abandoning unbiasedness , in the hope that this will lead to better communication complexity in practice . This is the idea behind the class of contractive compressors , defined in ( 31 ) , which have studied at least since the work of Seide et al . ( 2014 ) . Example of such compressors are the TopK ( Alistarh et al. , 2018 ) and RankK ( Vogels et al. , 2019 ; Safaryan et al. , 2021 ) compressors . While such compressors are indeed often very successful in practice , their theoretical impact on the methods using them is dramatically less understood than is the case with unbiased compressors . One of the key reasons for this that a naive use of biased compressors may lead to ( exponential ) divergence , even in simple problems ( Beznosikov et al. , 2020 ) . Because of this , Seide et al . ( 2014 ) proposed the error feedback framework for controlling the error introduced by compression , and thus taming the method to convergence . While it has been successfully used by practitioners for many years , error feedback yielded the first convergence results only relatively recently ( Stich et al. , 2018 ; Stich & Karimireddy , 2019 ; Wu et al. , 2018 ; Koloskova et al. , 2019 ; Tang et al. , 2019 ; Karimireddy et al. , 2019 ; Qian et al. , 2020 ; Beznosikov et al. , 2020 ; Gorbunov et al. , 2020 ) . The current best theoretical communication complexity results for error feedback belong to the EF21 method of Richtárik et al . ( 2021 ) who achieved their improvements by redesigning the original error feedback mechanism using the construction of a Markov compressor . However , even EF21 currently enjoys substantially weaker iteration and communication complexity than MARINA . For instance , we show in Appendix L that EF21 with TopK is only proved to have the communication complexity of the gradient descent without any compression . H COMPOSITION OF COMPRESSORS WITH AB ASSUMPTION AND UNBIASED COMPRESSORS Lemma 9 . If { Ci } ni=1 ∈ U ( A , B ) and Qi ∈ U ( ωi ) for i ∈ { 1 , 2 , . . . , n } , then { Ci ◦ Qi } ni=1 ∈ U ( ( maxi ωi + 1 ) A , B ) . Proof . By the tower property , for all a1 , . . . , an ∈ Rd , we have E ∥∥∥∥∥ 1n n∑ i=1 Ci ( Qi ( ai ) ) − 1 n n∑ i=1 Qi ( ai ) ∥∥∥∥∥ 2 = E E ∥∥∥∥∥ 1n n∑ i=1 Ci ( Qi ( ai ) ) − 1 n n∑ i=1 Qi ( ai ) ∥∥∥∥∥ 2 ∣∣∣∣∣∣Q1 ( a1 ) , · · · , Qn ( an ) ≤ E A 1 n n∑ i=1 ‖Qi ( ai ) ‖2 −B ∥∥∥∥∥ 1n n∑ i=1 Qi ( ai ) ∥∥∥∥∥ 2 . Since Qi ∈ U ( ωi ) for i ∈ { 1 , 2 , . . . , n } , we get E ∥∥∥∥∥ 1n n∑ i=1 Ci ( Qi ( ai ) ) − 1 n n∑ i=1 Qi ( ai ) ∥∥∥∥∥ 2 ≤ ( max i ωi + 1 ) A 1 n n∑ i=1 ‖ai‖2 −BE ∥∥∥∥∥ 1n n∑ i=1 Qi ( ai ) ∥∥∥∥∥ 2 . Using Jensen ’ s inequality , we derive inequalities : E ∥∥∥∥∥ 1n n∑ i=1 Qi ( ai ) ∥∥∥∥∥ 2 ≥ ∥∥∥∥∥ 1n n∑ i=1 E [ Qi ( ai ) ] ∥∥∥∥∥ 2 = ∥∥∥∥∥ 1n n∑ i=1 ai ∥∥∥∥∥ 2 , and E ∥∥∥∥∥ 1n n∑ i=1 Ci ( Qi ( ai ) ) − 1 n n∑ i=1 Qi ( ai ) ∥∥∥∥∥ 2 ≤ ( max i ωi + 1 ) A 1 n n∑ i=1 ‖ai‖2 −B ∥∥∥∥∥ 1n n∑ i=1 ai ∥∥∥∥∥ 2 . The last inequality completes the proof . I GENERAL EXAMPLES OF PERMK For the sake of clarity , in the main part of our paper , we assumed that n | d or d | n , and provided corresponding examples of PermK ( see Definition 2 and Definition 3 ) . Now , we provide two examples of PermK that work with any n and d and generalize the previous examples . I.1 CASE d ≥ n The following example generalizes for the case when n does not divide d. Let us assume that d = kn + r and 0 ≤ r < n. As in Definition 2 , we permute coordinates and split them into the blocks of sizes { k , . . . , k , r } . The first n block of size k we assign to nodes . Next , we take the last block of size r and randomly assign each coordinate from this block to one node . As the size of the last block of size r is less than n , some nodes will send one coordinate less . Definition 5 ( PermK ( d ≥ n ) ) . Let us assume that d ≥ n , d = kn + r , 0 ≤ r < n , πd = ( πd1 , . . . , πdd ) is a random permutation of { 1 , · · · , d } , and πn = ( πn1 , . . . , π n n ) is a random permutation of { 1 , · · · , n } . We define the tuple of vectors S ( x ) = ( xπdkn+1eπdkn+1 , . . . , xπdkn+reπdkn+r , 0 , . . . , 0 ) of size n. Then , Ci ( x ) : = n ki∑ j=k ( i−1 ) +1 xπdj eπdj + ( S ( x ) ) πni . Theorem 8 . Compressors { Ci } ni=1 from Definition 5 belong to IV ( 1 ) . Proof . We fix any x ∈ Rd and prove unbiasedness : E [ Ci ( x ) ] = n ki∑ j=k ( i−1 ) +1 E [ xπdj eπdj ] + E [ ( S ( x ) ) πni ] = n ( k d x+ ( 1− r n ) 0 + r n 1 d x ) = n ( kn+ r nd ) x = x , for all i ∈ { 1 , . . . , n } . Next , we derive the second moment : E [ ‖Ci ( x ) ‖2 ] = n2 ki∑ j=k ( i−1 ) +1 E [ ∥∥∥xπdj eπdj ∥∥∥2 ] + E [ ∥∥∥ ( S ( x ) ) πni ∥∥∥2 ] = n2 ( k d ‖x‖2 + ( 1− r n ) ‖0‖2 + r n 1 d ‖x‖2 ) = n2 ( kn+ r nd ) ‖x‖2 = n ‖x‖2 , We fix x , y ∈ Rd . For all i 6= l ∈ { 1 , . . . , n } , we have E [ 〈Ci ( x ) , Cl ( y ) 〉 ] = n2 〈 ki∑ j=k ( i−1 ) +1 xπdj eπdj + ( S ( x ) ) πni , kl∑ j=k ( l−1 ) +1 yπdj eπdj + ( S ( y ) ) πnl 〉 = 0 , due to orthogonality of vectors ep , for all p ∈ { 1 , . . . , d } , and the fact that i 6= l. Thus , for all a1 , . . . , an ∈ Rd , the following equality holds : E ∥∥∥∥∥ 1n n∑ i=1 Ci ( ai ) ∥∥∥∥∥ 2 = 1 n2 n∑ i=1 E [ ‖Ci ( ai ) ‖2 ] + 1 n2 ∑ i 6=j E [ 〈Ci ( ai ) , Cj ( aj ) 〉 ] = 1 n n∑ i=1 ‖ai‖2 . Hence , Assumption 4 is fulfilled with A = B = 1 . I.2 CASE n ≥ d The following definition generalizes Definition 3 for the case when d does not divide n. Let us assume that n = qd + r and 0 ≤ r < d. As in Definition 3 , we permute the multiset , where each coordinate occures q times . Then , we randomly assign each element from the multiset of size qd to one node . Note that r randomly chosen nodes are idle . Definition 6 ( PermK , ( n ≥ d ) ) . Let us assume that n ≥ d , n = qd + r , 0 ≤ r < d. Let us fix point x ∈ Rd , that we want to compress . Define the tuple of vectors Ŝ ( x ) = ( x1e1 , . . . , x1e1 , x2e2 , . . . , x2e2 , . . . , xded , . . . , xded ) , where each vector occurs q times . Concat r zero vectors to Ŝ ( x ) : S ( x ) = Ŝ ( x ) ⊕ ( 0 , . . . , 0 ) . Let π = ( π1 , . . . , πn ) be a random permutation of { 1 , . . . , n } . Define Ci ( x ) : = n q ( S ( x ) ) πi . Theorem 9 . Compressors { Ci } ni=1 from Definition 6 belong to IV ( A ) with A = 1− n ( q−1 ) ( n−1 ) q . Proof . We start with proving the unbiasedness : E [ Ci ( x ) ] = n q d∑ j=1 xjejProb ( πi = j ) = n q d∑ j=1 xjej q n = x , for all i ∈ { 1 , . . . , n } , x ∈ Rd . Next , we find the second moment : E [ ‖Ci ( x ) ‖2 ] = n2 q2 d∑ i=1 x2iProb ( πi = j ) = n q ‖x‖2 , for all i ∈ { 1 , . . . , n } , x ∈ Rd . For all i 6= j ∈ { 1 , . . . , n } and x , y ∈ Rd , we have E [ 〈Ci ( x ) , Cj ( y ) 〉 ] = n2 q2 d∑ k=1 xkykProb ( πi = k , πj = k ) = n2 q2 d∑ k=1 xkyk q ( q − 1 ) n ( n− 1 ) = n ( q − 1 ) ( n− 1 ) q 〈x , y〉 . Thus , for all a1 , . . . , an ∈ Rd , the following equality holds : E ∥∥∥∥∥ 1n n∑ i=1 Ci ( ai ) ∥∥∥∥∥ 2 = 1 n2 n∑ i=1 E [ ‖Ci ( ai ) ‖2 ] + 1 n2 ∑ i 6=j E [ 〈Ci ( ai ) , Cj ( aj ) 〉 ] = 1 nq n∑ i=1 ‖ai‖2 + n ( q − 1 ) ( n− 1 ) q 1 n2 ∑ i6=j 〈ai , aj〉 = ( 1 q − ( q − 1 ) ( n− 1 ) q ) 1 n n∑ i=1 ‖ai‖2 + n ( q − 1 ) ( n− 1 ) q ∥∥∥∥∥ 1n n∑ i=1 ai ∥∥∥∥∥ 2 . Hence , Assumption 4 is fulfilled with A = B = 1− n ( q−1 ) ( n−1 ) q . J IMPLEMENTATION DETAILS OF PERMK Now , we discuss the implementation details of PermK from Definition 2 . Unlike RandK and TopK compressors , PermK compressors are statistically dependent . We provide a simple idea of how to manage dependence between nodes . First of all , note that the samples of random permutation π are the only source of randomness . By Definition 2 , they are shared between nodes and generated in each communication round . However , instead of sharing the samples , we can generate these samples in each node regardless of other nodes . Almost all random generation libraries and frameworks are deterministic ( or pseudorandom ) and only depend on the initial random seed . Thus , at the beginning of the optimization procedure , all nodes should set the same initial random seed and then call the same function that generates samples of a random permutation . The computation complexity of generating a sample from a random permutation π = ( π1 , . . . , πd ) is O ( d ) using the Fisher-Yates shuffle algorithm ( Fisher & Yates , 1938 ; Knuth , 1997 ) . All other examples of compressors can be implemented in the same fashion . K MORE EXAMPLES OF PERMUTATION-BASED COMPRESSORS K.1 BLOCK PERMUTATION COMPRESSOR In block permutation compressor , we partition the set { 1 , . . . , d } into m ≤ n disjoint blocks . For each block Pi , ⌊ n m ⌋ devices sparsify their vectors to coordinates with indices in Pi only . Definition 7 . Let P to be a partition of the set { 1 , . . . , d } into m ≤ n non-empty subsets , and n = mq+ r , where 0 ≤ r < m. Define matrices A1 , . . . , An as follows : put Ai : = 0 if i > mq . Denote the subsets in P as P1 , · · · , Pm . Next , for any Pi ∈ P , we set A ( i−1 ) q+1 , A ( i−1 ) q+2 , · · · , Aiq to n q Diag ( Pi ) . Here by Diag ( S ) we mean the diagonal matrix where each i th diagonal entry is equal to 1 if i ∈ S and 0 otherwise . Let π = ( π1 , . . . , πn ) be a random permutation of set { 1 , . . . , n } . We define Ci ( x ) : = Aπix . We call the set { Ci } ni=1 the block permutation compressor . Lemma 10 . Compressors { Ci } ni=1 belong to IV ( A ) with A = 1− n ( q−1 ) ( n−1 ) q . Proof . We start with the proof of unbiasedness : E [ Ci ( x ) ] = 1 n n∑ i=1 Aπix = ( 1 n · n q m∑ i=1 qDiag ( Pi ) ) x = Ix = x , for all i ∈ { 1 , . . . , n } , x ∈ Rd . Next , we establish the second moment : E [ ‖Ci ( x ) ‖2 ] = r n · 0 + m∑ l=1 q n ∑ j∈Pl ∣∣∣∣nq xj ∣∣∣∣2 = qn d∑ j=1 ∣∣∣∣nq xj ∣∣∣∣2 = nq ‖x‖2 , for all i ∈ { 1 , . . . , n } , x ∈ Rd . The following equality will be useful for the AB assumption : E [ 〈Ci ( x ) , Cj ( y ) 〉 ] = E [ 〈 Aπix , Aπjy 〉 ] = m∑ k=1 ( ∑ l∈Pk n2 q2 xlyl ) Prob ( πi ∈ Pk , πj ∈ Pk ) = m∑ k=1 ( ∑ l∈Pk n2 q2 xlyl ) q ( q − 1 ) n ( n− 1 ) = n ( q − 1 ) q ( n− 1 ) 〈x , y〉 , for all i 6= j ∈ { 1 , . . . , n } , x , y ∈ Rd . Thus , E ∥∥∥∥∥ 1n n∑ i=1 Ci ( ai ) ∥∥∥∥∥ 2 = 1 qn n∑ i=1 ‖ai‖2 + n ( q − 1 ) ( n− 1 ) qn2 ∑ i 6=j 〈ai , aj〉 = ( 1 qn − n ( q − 1 ) ( n− 1 ) qn2 ) n∑ i=1 ‖ai‖2 + n ( q − 1 ) ( n− 1 ) q ∥∥∥∥∥ 1n n∑ i=1 ai ∥∥∥∥∥ 2 = ( ( n− 1 ) − q + 1 ( n− 1 ) q ) 1 n n∑ i=1 ‖ai‖2 + n ( q − 1 ) ( n− 1 ) q ∥∥∥∥∥ 1n n∑ i=1 ai ∥∥∥∥∥ 2 = n− q ( n− 1 ) q · 1 n n∑ i=1 ‖ai‖2 + n ( q − 1 ) ( n− 1 ) q ∥∥∥∥∥ 1n n∑ i=1 ai ∥∥∥∥∥ 2 = ( 1− n ( q − 1 ) ( n− 1 ) q ) 1 n n∑ i=1 ‖ai‖2 + n ( q − 1 ) ( n− 1 ) q ∥∥∥∥∥ 1n n∑ i=1 ai ∥∥∥∥∥ 2 , for all a1 , . . . , an ∈ Rd . Hence , Assumption 4 is fulfilled with A = B = 1− n ( q−1 ) ( n−1 ) q . K.2 PERMUTATION OF MAPPINGS Definition 8 . Let Q1 , . . . , Qn : Rd → Rd be a collection of deterministic mappings Rd → Rd . Let π = ( π1 , . . . , πn ) be a random permutation of set { 1 , . . . , n } , where n > 1 . Define Ci : = Qπi . Assume that the following conditions hold : 1 . There exists ω ≥ 0 such that E [ ‖Ci ( x ) ‖2 ] ≤ ( ω + 1 ) ‖x‖2 for all i ∈ { 1 , . . . , n } , x , y ∈ Rd . 2 . There exists θ ∈ R such that n∑ i=1 〈Qi ( x ) , Qi ( y ) 〉 = θ 〈x , y〉 for all x , y ∈ Rd . 3 . 1n n∑ i=1 Qi ( x ) = x for all x ∈ Rd . We call the collection { Ci } ni=1 the permutation of mappings . Lemma 11 . Permutation of mappings belongs to U ( A , B ) with A = ω+1n − 1 n−1 ( 1− θn2 ) and B = 1− nn−1 ( 1− θn2 ) . Proof . Unbiasedness follows directly from Condition 3 . Let us fix a1 , . . . , an ∈ Rd . We shall now establish the AB assumption . E ∥∥∥∥∥ 1n n∑ i=1 Ci ( ai ) − 1 n n∑ i=1 ai ∥∥∥∥∥ 2 = E ∥∥∥∥∥ 1n n∑ i=1 ( Qπi ( ai ) − ai ) ∥∥∥∥∥ 2 = 1 n2 E n∑ i=1 ‖Qπi ( ai ) − ai‖ 2 + ∑ i 6=j 〈 Qπi ( ai ) − ai , Qπj ( aj ) − aj 〉 ≤ 1 n2 E ω n∑ i=1 ‖ai‖2 + ∑ i 6=j 〈 Qπi ( ai ) − ai , Qπj ( aj ) − aj 〉 = 1 n2 ω n∑ i=1 ‖ai‖2 + E ∑ i 6=j 〈 Qπi ( ai ) , Qπj ( aj ) 〉−∑ i 6=j 〈ai , aj〉 = 1 n2 ω n∑ i=1 ‖ai‖2 − ∥∥∥∥∥ n∑ i=1 ai ∥∥∥∥∥ 2 + n∑ i=1 ‖ai‖2 + ∑ i 6=j E [ 〈 Qπi ( ai ) , Qπj ( aj ) 〉 ] = ( ω + 1 ) n 1 n n∑ i=1 ‖ai‖2 − ∥∥∥∥∥ 1n n∑ i=1 ai ∥∥∥∥∥ 2 + 1 n2 ∑ i 6=j E [ 〈 Qπi ( ai ) , Qπj ( aj ) 〉 ] Let us now compute 1n2 ∑ i 6=j E [ 〈 Qπi ( ai ) , Qπj ( aj ) 〉 ] . 1 n2 ∑ i6=j E [ 〈 Qπi ( ai ) , Qπj ( aj ) 〉 ] = 1 n2 ∑ i 6=j 1 n ( n− 1 ) ∑ u 6=v 〈Qu ( ai ) , Qv ( aj ) 〉 = 1 n ( n− 1 ) ∑ i6=j 1 n2 ∑ u 6=v 〈Qu ( ai ) , Qv ( aj ) 〉 . Now , 1 n2 ∑ u6=v 〈Qu ( x ) , Qv ( y ) 〉 = 1 n2 n∑ u=1 n∑ v=1 〈Qu ( x ) , Qv ( y ) 〉 − 1 n2 n∑ u=1 〈Qu ( x ) , Qv ( y ) 〉 Condition 3 = 〈x , y〉 − 1 n2 n∑ u=1 〈Qu ( x ) , Qu ( y ) 〉 Condition 2 = ( 1− θ n2 ) 〈x , y〉 , ∀x , y ∈ Rd . Hence , 1 n2 ∑ i 6=j E [ 〈 Qπi ( ai ) , Qπj ( aj ) 〉 ] = 1 n ( n− 1 ) ( 1− θ n2 ) ∑ i 6=j 〈ai , aj〉 . Finally , E ∥∥∥∥∥ 1n n∑ i=1 Ci ( ai ) − 1 n n∑ i=1 ai ∥∥∥∥∥ 2 ≤ ( ω + 1 ) n 1 n n∑ i=1 ‖ai‖2 − ∥∥∥∥∥ 1n n∑ i=1 ai ∥∥∥∥∥ 2 + 1 n ( n− 1 ) ( 1− θ n2 ) ∑ i 6=j 〈ai , aj〉 = ( ω + 1 n − 1 n− 1 ( 1− θ n2 ) ) 1 n n∑ i=1 ‖ai‖2 − ( 1− n n− 1 ( 1− θ n2 ) ) ∥∥∥∥∥ 1n n∑ i=1 ai ∥∥∥∥∥ 2 . Hence , Assumption 4 is fulfilled with A = ω+1n − 1 n−1 ( 1− θn2 ) , B = 1− nn−1 ( 1− θ 2 n ) . L ANALYSIS OF COMPLEXITY BOUNDS In this section , we analyze the complexities bounds of optimization methods , and typically these bounds have a structure of a function that we analyze in the following lemma . Lemma 12 . Let us consider function f ( x , y ) = ( x+ ( 1− x ) y ) ( a+ b √ ( 1 x − 1 ) ( 1 y − 1 ) ) , where x ∈ ( 0 , 1 ] , y ∈ [ ymin , 1 ] , ymin ∈ ( 0 , 1/2 ] , a ≥ 0 , and b ≥ 0 , then f ( x , y ) ≥ 1 2 min { a , aymin + b } , ∀x , y ∈ ( 0 , 1 ] . Proof . First , let us assume that x ≥ 1/2 . Then , f ( x , y ) ≥ a 2 . Second , let us assume that y ≥ 1/2 . Then , f ( x , y ) ≥ a ( x+ 1 2 ( 1− x ) ) ≥ a 2 . Finally , let us assume , that y ≤ 1/2 and x ≤ 1/2 . Then , f ( x , y ) = ( x+ ( 1− x ) y ) ( a+ b √ ( 1 x − 1 ) ( 1 y − 1 ) ) ≥ a ( 1− x ) y + b ( x+ ( 1− x ) y ) √ ( 1 x − 1 ) ( 1 y − 1 ) ≥ a ( 1− x ) y + b ( x ( 1− y ) + ( 1− x ) y ) √ ( 1 x − 1 ) ( 1 y − 1 ) ≥ a ( 1− x ) y + bxy ( ( 1 y − 1 ) + ( 1 x − 1 ) ) √ ( 1 x − 1 ) ( 1 y − 1 ) ≥ a ( 1− x ) y + 2bxy ( 1 x − 1 ) ( 1 y − 1 ) ≥ a ( 1− x ) y + 2b ( 1− x ) ( 1− y ) ≥ aymin 2 + b 2 . L.1 NONCONVEX OPTIMIZATION L.1.1 CASE n ≤ d We analyze case , when n ≤ d. For simplicity , we assume that n | d , n > 1 , and d > 1 . For PermK from Definition 2 , constantsA = B = 1 in AB inequality ( see Lemma 1 ) . We define communication complexity of MARINA with PermK asNPermK ( p ) , where p is a parameter of MARINA , and MARINA with RandK as NRandK ( p , k ) , where k is a parameter of RandK . From Theorem 4 , we have that oracle complexity of MARINA with PermK is equal to O ( ∆0 ε ( L− + √ 1− p p L± ) ) . During each iteration of MARINA , on average , each node sends the number of bits equal to O ( pd+ ( 1− p ) d n ) , thus , the communication complexity predicted by theory is NPermK ( p ) : = ∆0 ε ( pd+ ( 1− p ) d n ) ( L− + √ 1− p p L± ) ( 33 ) up to a constant factor . Analogously , for RandK , the communication complexity predicted by theory is NRandK ( p , k ) : = ∆0 ε ( pd+ ( 1− p ) k ) L− + √ 1− p p d k − 1 n L+ ( 34 ) up to a constant factor . To the best of our knowledge , this is the state-of-the-art theoretical communication complexity bound for the RandK compressor in the non-convex regime . Finally , for TopK , by Theorem 6 , the theoretical communication complexity is NTopK ( k ) : = ∆0 ε k ( L− + L+ d− k + √ d2 − dk k ) ( 35 ) up to a constant factor . We consider the variant of EF21 , where g0i are initialized with gradients ∇fi ( x0 ) , for all i ∈ { 1 , . . . , n } , thus E [ G0 ] = 0 in Theorem 6 . The following lemma will help us to choose the optimal parameters of NPermK ( p ) , NRandK ( p , k ) , and NTopK ( k ) . Lemma 13 . For communication complexity NPermK ( p ) of MARINA with PermK , communication complexityNRandK ( p , k ) of MARINA with RandK and communication complexityNTopK ( k ) of EF21 with TopK defined in ( 33 ) , ( 34 ) and ( 35 ) the following inequalities hold : 1 . Lower bounds : NPermK ( p ) ≥ ∆0 2ε min { dL− , d n L− + dL±√ n } , ∀p ∈ ( 0 , 1 ] . Upper bounds : NPermK ( 1 n ) ≤ 2∆0 ε ( d n L− + dL±√ n ) , ( 36 ) NPermK ( 1 ) = ∆0dL− ε . ( 37 ) 2 . Lower bounds : NRandK ( p , k ) ≥ ∆0 2ε min { dL− , dL+√ n } , ∀p ∈ ( 0 , 1 ] , ∀k ∈ { 1 , . . . , d } , Upper bounds : For all k ∈ { 1 , . . . , d/ √ n } , p = k/d , NRandK ( p , k ) ≤ 4∆0dL+ ε √ n . ( 38 ) Moreover , for all k ∈ { 1 , . . . , d } , p = 1 , NRandK ( 1 , k ) = ∆0dL− ε . ( 39 ) 3. min k∈ { 1 , ... , d } NTopK ( k ) = NTopK ( d ) = ∆0dL− ε ( 40 ) Proof . 1 . We start with the first inequality : NPermK ( p ) = ∆0 ε ( pd+ ( 1− p ) d n ) ( L− + √ 1− p p L± ) = ∆0 ε ( p+ ( 1− p ) 1 n ) ( dL− + dL± √ 1− p p ) = ∆0 ε ( p+ ( 1− p ) 1 n ) ( dL− + dL± √ n n √ 1− p p ) ≥ ∆0 ε ( p+ ( 1− p ) 1 n ) ( dL− + dL±√ n √ ( 1 p − 1 ) ( n− 1 ) ) . Using Lemma 12 with a = dL− , b = dL±√ n , and ymin = 1/n , we get NPermK ( p ) = ∆0 ε ( pd+ ( 1− p ) d n ) ( L− + √ 1− p p L± ) ≥ ∆0 2ε min { dL− , d n L− + dL±√ n } . for all p ∈ ( 0 , 1 ] . We can obtain the bound 36 if we take p = 1/n : NPermK ( 1 n ) = ∆0 ε ( d n + ( 1− 1 n ) d n ) ( L− + √ n− 1L± ) ≤ 2∆0 ε ( d n L− + d√ n L± ) . We obtain the equality 37 by taking p = 1 . 2 . NRandK ( p , k ) = ∆0 ε ( pd+ ( 1− p ) k ) L− + √ 1− p p d k − 1 n L+ = ∆0 ε ( p+ ( 1− p ) k d ) ( dL− + dL+√ n √ ( 1 p − 1 ) ( d k − 1 ) ) . Using Lemma 12 with a = dL− , b = dL±√ n , and ymin = 1/d , we get NRandK ( p , k ) ≥ ∆0 2ε min { dL− , L− + dL+√ n } ≥ ∆0 2ε min { dL− , dL+√ n } , for all p ∈ ( 0 , 1 ] , k ∈ { 1 , . . . , d } . We can obtain the bound 38 if we take k ∈ { 1 , . . . , d/ √ n } and p = k/d : NRandK ( p , k ) ≤ 2∆0 ε ( kL− + k ( d k − 1 ) L+√ n ) ≤ 2∆0 ε ( dL−√ n + dL+√ n ) ≤ 4∆0dL+ ε √ n . The equality 39 is obtained by taking p = 1 . 3 . This part is easily proved , using L− ≤ L+ from Lemma 2 , and directly minimizing ( 40 ) . In Table 4 , we summarize bounds ( 36 ) , ( 37 ) , ( 38 ) , ( 39 ) , and ( 40 ) . L.1.2 CASE n ≥ d Now , we analyze case , when n ≥ d. For simplicity , without losing the generality , we assume that d | n , n > 1 , and d > 1 . Then , PermK from Definition 3 satisfies the AB inequality with A = B = d−1 n−1 . In each iteration of MARINA , on average , PermK sends O ( pd+ ( 1− p ) ) bits , thus the theoretical communication complexity is NPermK ( p ) : = ∆0 ε ( pd+ ( 1− p ) ) ( L− + √ 1− p p d− 1 n− 1 L± ) ( 41 ) up to a constant factor . Lemma 14 . For communication complexity NPermK ( p ) of MARINA with PermK , communication complexityNRandK ( p , k ) of MARINA with RandK and communication complexityNTopK ( k ) of EF21 with TopK defined in ( 41 ) , ( 34 ) and ( 35 ) the following inequalities hold : 1 . Lower bounds : NPermK ( p ) ≥ ∆0 2ε min { dL− , L− + dL±√ n } , ∀p ∈ ( 0 , 1 ] . Upper bounds : NPermK ( 1 d ) ≤ 4∆0 ε ( L− + dL±√ n ) , ( 42 ) NPermK ( 1 ) = ∆0dL− ε . ( 43 ) 2 . Lower bounds : NRandK ( p , k ) ≥ ∆0 2ε min { dL− , L− + dL+√ n } , ∀p ∈ ( 0 , 1 ] , ∀k ∈ { 1 , . . . , d } , Upper bounds : NRandK ( 1 d , 1 ) ≤ 2∆0 ε ( L− + dL+√ n ) , ( 44 ) Moreover , for all k ∈ { 1 , . . . , d } , p = 1 , NRandK ( 1 , k ) = ∆0dL− ε . ( 45 ) 3. min k∈ { 1 , ... , d } NTopK ( k ) = NTopK ( d ) = ∆0dL− ε ( 46 ) Proof . 1 . NPermK ( p ) = ∆0 ε ( pd+ ( 1− p ) ) ( L− + √ 1−p p d−1 n−1L± ) ≥ ∆0ε ( p+ ( 1− p ) 1d ) ( dL− + dL±√ n √ ( 1 p − 1 ) ( d− 1 ) ) Using Lemma 12 with a = dL− , b = dL±√ n , and ymin = 1/d , we get NPermK ( p ) ≥ ∆0 2ε min { dL− , L− + dL±√ n } for all p ∈ ( 0 , 1 ] . We can show the bound 42 if we take p = 1/d : NPermK ( 1 d ) = ∆0 ε ( 1 + ( 1− 1 d ) 1 ) ( L− + d− 1√ n− 1 L± ) ≤ 4∆0 ε ( L− + dL±√ n ) The bound 43 is obtained by taking p = 1 . 2 . As in Lemma 13 we can get , that NRandK ( p , k ) ≥ ∆0 2ε min { dL− , L− + dL+√ n } , for all p ∈ ( 0 , 1 ] , k ∈ { 1 , . . . , d } . Moreover , if we take p = 1/d and k = 1 , we have NRandK ( 1 d , 1 ) ≤ 2∆0 ε ( L− + dL+√ n ) . The bound 45 is obtained by taking p = 1 . 3 . For TopK , the reasoning the same as in Lemma 13 . In Table 4 , we summarize bounds ( 42 ) , ( 43 ) , ( 44 ) , ( 45 ) , and ( 46 ) . L.2 PŁ ASSUMPTION L.2.1 CASE n ≤ d Using the same reasoning as in Appendix L.1 , Theorem 5 and Theorem 7 , we can show that communication complexities predicted by theory are equal to NPermK ( p ) : = log ∆0 ε ( pd+ ( 1− p ) d n ) max { ( L− µ + √ 2 ( 1− p ) p L± µ ) , 1 p } , ( 47 ) NRandK ( p , k ) : = log ∆0 ε ( pd+ ( 1− p ) k ) max L− µ + √ 2 ( 1− p ) p d k − 1 n L+ µ , 1 p , ( 48 ) NTopK ( k ) : = log ∆0 ε kmax ( L− µ + L+ µ d− k + √ d2 − dk k ) , 1 1− √ 1− kd . ( 49 ) up to a constant factor . Lemma 15 . For communication complexity NPermK ( p ) of MARINA with PermK , communication complexityNRandK ( p , k ) of MARINA with RandK and communication complexityNTopK ( k ) of EF21 with TopK defined in ( 47 ) , ( 48 ) and ( 49 ) the following inequalities hold12 : 1. inf p∈ ( 0,1 ] NPermK ( p ) = Θ ( max { 1 µ min { dL− , d n L− + d√ n L± } , d } ) , 2. inf p∈ ( 0,1 ] , k∈ { 1 , ... , d } NRandK ( p , k ) = Θ ( max { 1 µ min { dL− , d√ n L+ } , d } ) , 12In the lemma , we use “ Big Theta ” notation , which means , that if f ( x ) = Θ ( g ( x ) ) , then f is bounded both above and below by g asymptotically up to a logarithmic factor . 3. min k∈ { 1 , ... , d } NTopK ( k ) = Θ ( dL− µ ) . Proof . Rearranging ( 47 ) , ( 48 ) and ( 49 ) , we get NPermK ( p ) = log ∆0 ε max { ( pd+ ( 1− p ) d n ) ( L− µ + √ 2 ( 1− p ) p L± µ ) , d+ ( 1− p ) d pn } , NRandK ( p , k ) = log ∆0 ε max ( pd+ ( 1− p ) k ) L− µ + √ 2 ( 1− p ) p d k − 1 n L+ µ , d+ ( 1− p ) k p , NTopK ( k ) = log ∆0 ε max k ( L− µ + L+ µ d− k + √ d2 − dk k ) , k 1− √ 1− kd . Note , that k 1− √ 1− kd ≥ d , ∀k ∈ { 1 , . . . , d } , thus in all complexities , the second terms inside the max brackets are at least d. Analysis of first terms inside the max brackets is the same as in Lemma 13 . In Table 5 , we provide complexity bounds with optimal parameters of algorithms . L.2.2 CASE n ≥ d The only difference here is that the communication complexity of PermK predicted by our theory is the following : NPermK ( p ) : = log ∆0 ε ( pd+ ( 1− p ) ) max { ( L− µ + √ 2 ( 1− p ) p d− 1 n− 1 L± µ ) , 1 p } . ( 50 ) Lemma 16 . For communication complexity NPermK ( p ) of MARINA with PermK , communication complexityNRandK ( p , k ) of MARINA with RandK and communication complexityNTopK ( k ) of EF21 with TopK defined in ( 50 ) , ( 48 ) and ( 49 ) the following inequalities hold : 1. inf p∈ ( 0,1 ] NPermK ( p ) = Θ ( max { 1 µ min { dL− , L− + d√ n L± } , d } ) , 2. inf p∈ ( 0,1 ] , k∈ { 1 , ... , d } NRandK ( p , k ) = Θ ( max { 1 µ min { dL− , L− + d√ n L+ } , d } ) , 3. min k∈ { 1 , ... , d } NTopK ( k ) = Θ ( dL− µ ) . The proof of Lemma 16 is the same as in Lemma 15 . Using the same reasoning as before , we provide complexity bounds in Table 5 . M GROUP HESSIAN VARIANCE We showed the communication complexity improvement of MARINA algorithm with PermK under the assumption that L± L− . In general , L± can be large ; however , we can still use the notion of L± but in a different way , by splitting the functions into several groups where L± is small . We split a set { 1 , · · · , n } into nonempty sets { Gk } gk=1 , ⋃g k=1 Gk = { 1 , · · · , n } , Gi ⋂ Gj = ∅ , for all i 6= j ∈ { 1 , · · · , g } , and |Gk| > 0 , for all k ∈ { 1 , · · · , g } . Let us fix some set Gk and define functions LGk− ( x , y ) : = ∥∥∥∥∥∥ 1|Gk| ∑ i∈|Gk| ( ∇fi ( x ) −∇fi ( y ) ) ∥∥∥∥∥∥ 2 , LGk+ ( x , y ) : = 1 |Gk| ∑ i∈|Gk| ‖∇fi ( x ) −∇fi ( y ) ‖2 , LGk± ( x , y ) : = L Gk + ( x , y ) − L Gk − ( x , y ) and the smallest constants LGk− , L Gk + , L Gk ± for functions L Gk − ( x , y ) , L Gk + ( x , y ) , and L Gk ± ( x , y ) , such that LGk− ( x , y ) ≤ ( LGk− ) 2 ‖x− y‖2 , LGk+ ( x , y ) ≤ ( LGk+ ) 2 ‖x− y‖2 , LGk± ( x , y ) ≤ ( LGk± ) 2 ‖x− y‖2 , for all k ∈ { 1 , · · · , g } , x , y ∈ Rd . In this section , we have the following assumption about groups . Assumption 6 . Compressors between groups are independent , i.e . Ci and Cj are independent , for all i ∈ Gk , j ∈ Gp , k 6= p. And Assumption 4 is satisfied with constants AGk and BGk inside each group Gk , for k ∈ { 1 , · · · , g } . Now , we prove group AB inequality . Lemma 17 ( Group AB inequality ) . Let us assume that Assumptions 3 and 6 hold , then E ∥∥∥∥∥ 1n n∑ i=1 Ci ( ai ) − 1 n n∑ i=1 ai ∥∥∥∥∥ 2 ≤ g∑ k=1 AGk |Gk|2 n2 1 |Gk| ∑ i∈Gk ‖ai‖2 − g∑ k=1 BGk |Gk|2 n2 ∥∥∥∥∥ 1|Gk| ∑ i∈Gk ai ∥∥∥∥∥ 2 . ( 51 ) Proof . E ∥∥∥∥∥ 1n n∑ i=1 Ci ( ai ) − 1 n n∑ i=1 ai ∥∥∥∥∥ 2 = 1 n2 g∑ k=1 E ∥∥∥∥∥∑ i∈Gk Ci ( ai ) − ∑ i∈Gk ai ∥∥∥∥∥ 2 + 1 n2 ∑ k 6=p E 〈∑ i∈Gk Ci ( ai ) − ∑ i∈Gk ai , ∑ i∈Gp Ci ( ai ) − ∑ i∈Gp ai 〉 . Due to independence and unbiasedness , the last term vanishes , and , using AB inequality , we get E ∥∥∥∥∥ 1n n∑ i=1 Ci ( ai ) − 1 n n∑ i=1 ai ∥∥∥∥∥ 2 = 1 n2 g∑ k=1 E ∥∥∥∥∥∑ i∈Gk Ci ( ai ) − ∑ i∈Gk ai ∥∥∥∥∥ 2 = g∑ k=1 |Gk|2 n2 E ∥∥∥∥∥ 1|Gk| ∑ i∈Gk Ci ( ai ) − 1 |Gk| ∑ i∈Gk ai ∥∥∥∥∥ 2 ≤ g∑ k=1 |Gk|2 n2 AGk ( 1 |Gk| ∑ i∈Gk ‖ai‖2 ) −BGk ∥∥∥∥∥ 1|Gk| ∑ i∈Gk ai ∥∥∥∥∥ 2 . From this we can get the result . Next , we prove analogous lemma to Lemma 5 . Lemma 18 . Let us consider gt+1 from Line 8 of Algorithm 2 and assume , that Assumptions 3 and 6 hold . Moreover , if Assumption 2 holds for every group Gk , for k ∈ { 1 , · · · , g } , then E [ ∥∥gt+1 −∇f ( xt+1 ) ∥∥2∣∣∣xt+1 ] ≤ ( 1− p ) ( g∑ k=1 ( AGk −BGk ) |Gk|2 n2 ( LGk+ ) 2 + g∑ k=1 BGk |Gk|2 n2 ( LGk± ) 2 ) ∥∥xt+1 − xt∥∥2 + ( 1− p ) ∥∥gt −∇f ( xt ) ∥∥2 . ( 52 ) Proof . In the view of definition of gt+1 , we get E [ ∥∥gt+1 −∇f ( xt+1 ) ∥∥2∣∣∣xt+1 ] = ( 1− p ) E ∥∥∥∥∥gt + 1n n∑ i=1 Ci ( ∇fi ( xt+1 ) −∇fi ( xt ) ) −∇f ( xt+1 ) ∥∥∥∥∥ 2 ∣∣∣∣∣∣xt+1 = ( 1− p ) E ∥∥∥∥∥ 1n n∑ i=1 Ci ( ∇fi ( xt+1 ) −∇fi ( xt ) ) −∇f ( xt+1 ) +∇f ( xt ) ∥∥∥∥∥ 2 ∣∣∣∣∣∣xt+1 + ( 1− p ) ∥∥gt −∇f ( xt ) ∥∥2 . In the last inequality we used unbiasedness of Ci . Using ( 51 ) , we get E [ ∥∥gt+1 −∇f ( xt+1 ) ∥∥2∣∣∣xt+1 ] ≤ ( 1− p ) E ∥∥∥∥∥ 1n n∑ i=1 Ci ( ∇fi ( xt+1 ) −∇fi ( xt ) ) −∇f ( xt+1 ) +∇f ( xt ) ∥∥∥∥∥ 2 ∣∣∣∣∣∣xt+1 + ( 1− p ) ∥∥gt −∇f ( xt ) ∥∥2 . ≤ ( 1− p ) ( g∑ k=1 AGk |Gk|2 n2 1 |Gk| ∑ i∈Gk ∥∥∇fi ( xt+1 ) −∇fi ( xt ) ∥∥2 − g∑ k=1 BGk |Gk|2 n2 ∥∥∥∥∥ 1|Gk| ∑ i∈Gk ∇fi ( xt+1 ) −∇fi ( xt ) ∥∥∥∥∥ 2 ) + ( 1− p ) ∥∥gt −∇f ( xt ) ∥∥2 = ( 1− p ) ( g∑ k=1 ( AGk −BGk ) |Gk|2 n2 LGk+ ( xt+1 , xt ) + g∑ k=1 BGk |Gk|2 n2 LGk± ( xt+1 , xt ) ) + ( 1− p ) ∥∥gt −∇f ( xt ) ∥∥2 ≤ ( 1− p ) ( g∑ k=1 ( AGk −BGk ) |Gk|2 n2 ( LGk+ ) 2 + g∑ k=1 BGk |Gk|2 n2 ( LGk± ) 2 ) ∥∥xt+1 − xt∥∥2 + ( 1− p ) ∥∥gt −∇f ( xt ) ∥∥2 . Let us define L̂2G : = ( g∑ k=1 ( AGk −BGk ) |Gk|2 n2 ( LGk+ ) 2 + g∑ k=1 BGk |Gk|2 n2 ( LGk± ) 2 ) . Theorem 10 . Let Assumptions 1 , 2 , 3 and 6 be satisfied . Let the stepsize in MARINA be chosen as γ ≤ ( L− + √ 1− p p L̂2G ) −1 , then after T iterations , MARINA finds point x̂T for which E [ ∥∥∇f ( x̂T ) ∥∥2 ] ≤ 2∆0γT . Theorem 11 . Let Assumptions 1 , 2 , 3 , 5 and 6 be satisfied and γ ≤ min ( L− + √ 2 ( 1− p ) p L̂2G ) −1 , p 2µ , then for xT from MARINA algorithm the following inequality holds : E [ f ( xT ) − f ? ] ≤ ( 1− γµ ) T ∆0 . We omit proofs of this theorems as they repeat proofs from Appendix C.6 and D.2 ; the only difference is that we have to take L̂2 = L̂2G . Let us assume that n ≤ d , all groups have equal sizes |Gk| = G and constants LGk± = LG± , for all k ∈ { 1 , . . . , g } , and in each group we use PermK compressor from Definition 2 , thus communication complexity predicted by our theory is the following : NGPermK ( p ) : = ∆0 ε ( pd+ ( 1− p ) d G ) ( L− + √ ( 1− p ) G pn LG± ) . Using the same reasoning as in Lemma 13 , we can take p = 1 or p = 1/G to get that inf p∈ ( 0,1 ] NGPermK ( p ) = O ( 2∆0 ε min { dL− , d G L− + d√ n LG± } ) . ( 53 ) For the case when we have one group , we restore the communication complexity from Lemma 13 . Comparing ( 36 ) with ( 53 ) , we see that dL−/n from ( 36 ) is always better than dL−/G from ( 53 ) ; however ; if dL±/ √ n is a bottleneck and LG± is small , then communication complexity ( 53 ) can be better . Let us consider an example of a quadratic optimization task with two groups , wherein one group , all matrices are equal to A , and in another one , all matrices are equal to B , A 6= B , A = A > < 0 and B = B > < 0 , then G = n/2 , LG± = 0 , and L± > 0 ( see Example 3 ) . Hence , we get that inf p∈ ( 0,1 ] NGPermK ( p ) = O ( ∆0d εn L− ) . This bound is better than ( 36 ) by at least the factor 1 + √ nL±/L− . | This paper investigates a permutation based sparsification technique for distributed optimization, and prove that, under a mildly tighter condition than L-smoothness, it can achieve better communication complexity than the existing random sparsification technique. The method is largely under the larger construct of MARINA, a distributed optimization scheme by Gorbunov. A (1+d/sqrt(n)) factor improvement is shown with the permutation vs randomization technique when the Hessian variance is small, and several promising numerical results are given. | SP:718e14c8917bcbc7ad2fd8af376d220a77886e92 |
An evaluation of quality and robustness of smoothed explanations | 1 INTRODUCTION . Explanation methods attribute a numerical value to each data feature in order to quantify its relative importance towards the model ’ s prediction . Such attributions help to better understand and trust complex models like deep neural networks ( DNNs ) . In safety-critical tasks , such an understanding is a prerequisite to the deployment of DNNs , because a domain expert will never make important decisions based on a model ’ s prediction unless that model is trustworthy . Moreover , explanations can help to understand the reasons behind the decision of a model , and when it comes to model debugging , they can reveal the presence of any spurious data correlations that may lead to faulty predictions during inference ( Ribeiro et al. , 2016 ) . In the context of image classification with deep neural networks , several explanation methods have been proposed based on the gradient with respect to input , also called gradient-based explanations ( Baehrens et al. , 2010 ; Bach et al. , 2015 ; Selvaraju et al. , 2017 ; Sundararajan et al. , 2017 ; Springenberg et al. , 2015 ) . The explanation generated by these methods , a saliency map , highlights the parts of the image that contributed to the prediction . Recent work has shown that gradient-based explanations of neural networks can be fragile and can be easily manipulated via adversarially perturbed inputs ( Ghorbani et al. , 2019 ; Dombrowski et al. , 2019 ; Heo et al. , 2019 ; Viering et al. , 2019 ; Kindermans et al. , 2019 ) . That is , one can find a small-norm perturbation to be added to an input ( often imperceptible ) , such that the focus of the explanation changes towards irrelevant features while the model ’ s output remains unchanged . This , in turn , can make explanations inappropriate to help end-users gain trust in a model ’ s prediction . The large curvature of the decision surface of neural networks has been identified as one of the causes of fragility for gradient-based explanations ( Ghorbani et al. , 2019 ; Dombrowski et al. , 2019 ; Wang et al. , 2020 ) . To make explanations more robust , a class of approaches proposed smoothing the explanation or making the decision surface of neural networks more smooth ( Wang et al. , 2020 ; Dombrowski et al. , 2019 ; Ivankay et al. , 2020 ) . We refer to these approaches as smoothing approaches . It is worth mentioning that similar methods have been proposed in the context of adversarial robustness , with the aim of flattening the decision surface of neural networks in order to reach more robust predictions ( Moosavi-Dezfooli et al. , 2019 ; Qin et al. , 2019 ) . Here , we provide a thorough investigation of the explanations derived by smoothing approaches in terms of explanation quality and robustness . We employ various tests to assess the quality of these explanations . Each test evaluates a desirable property for explanations , such as : sensitivity to changes in the model , fidelity to the predictor function , etc . In terms of robustness , we show that explanations derived by smoothing approaches only provide robustness against additive ` p norm attacks . Specifically , in this work , we show that compared to additive attacks , attacks based on the combination of spatial transformation ( Xiao et al. , 2018 ) and/or color transformation ( Laidlaw & Feizi , 2019 ) together with additive perturbations are more effective in manipulating these explanations . Our contributions can be summarized as follows : • We study the effectiveness of smoothing approaches to achieve robust explanations . We present results on evaluating both the quality and robustness properties of smoothed explanations . • We assess the quality of smoothed explanations via presenting the results of various quality tests . Our results demonstrate the pros and cons of smoothed explanations with respect to the following quality aspects : sensitivity to model parameters , class discriminativeness , Infidelity , and sparseness . • We present results for different combination of additive and non-additive attacks , and show that they are able to manipulate explanations derived by smoothing approaches more successfully . Combining different types of perturbations to achieve stronger attacks has been a topic of investigation in the context of adversarial examples ( Jordan et al. , 2019 ) . To the best of our knowledge , this is the first time such attacks have been used in the context of explanations . Related works . There have been several works aiming to make explanations more robust . These works mostly focused on either modifying the explanation method itself or modifying the predictor model to achieve robust explanations . Wang et al . ( 2020 ) introduced Uniform Gradient , which is similar to Smooth Gradient unless it uses Uniform noise , and showed that it can hardly be manipulated by additive attacks . Dombrowski et al . ( 2019 ) proved that a network with soft-plus activations has a more robust Gradient explanation compared to a ReLU network , given that the parameter β of the soft-plus function is chosen to be sufficiently small . Consequently , they proposed the β-smoothing approach in which they substitute the ReLU activations of a trained network by softplus functions with a small β parameter . Wang et al . ( 2020 ) introduced a regularization term called Smooth Surface Regularization ( SSR ) to the training objective of a DNN . This training objective penalizes the large curvature of a DNN by regularizing the eigenvalue of the input hessian with the maximum absolute value . Moreover , they showed that adversarial training ( Madry et al. , 2018 ) also leads to more robust explanations . This fact can also be deduced from the results of ( MoosaviDezfooli et al. , 2019 ) as they showed that adversarial training leads to a significant decrease in the curvature of the loss surface with respect to inputs . Anders et al . ( 2020 ) proposed an attack in which they adversarially manipulate the model instead of the input in order to manipulate the explanation . Then they propose a modification to the existing explanation methods to make them more robust against such manipulated models . Lakkaraju et al . ( 2020 ) proposed a framework for generating robust and stable black box explanations based on adversarial training . Chen et al . ( 2019 ) introduced a regularization term to the training objective of neural networks to achieve robust Integrated Gradient explanations . Finally , Dombrowski et al . ( 2020 ) developed a theoretical framework to derive bounds on the maximum manipubality of explanations and proposed three different techniques to boost the robustness of explanations . In this work , we show that the robustness of smoothed explanations can be affected by employing a combination of additive and non-additive attacks . Furthermore , we present a through evaluation of the different quality aspects of smoothed explanations . 2 BACKGROUND . First , we provide the definition of an explanation map and then briefly describe the explanation methods we used in this paper . Then we continue with introducing the attacks to explanations and the smoothing approaches we are going to study in this paper . Consider a model f : Rd → RK which classifies an input x ∈ Rd into one of the K classes . An explanation map , denoted by hf ( x ) : Rd → Rd , associates a score to each feature of the input indicating the relevance of that feature towards the model ’ s prediction . For instance , in the context of image classification , saliency maps associate a score to each pixel of the input image resulting in a heatmap that highlights important regions of the image leading to the model prediction . In this work , we focus on the gradient-based explanations and mainly on the Gradient method . Given a model f and an input x , the Gradient explanation is defined as∇xf ( x ) . Since other gradient-based explanation methods make use of the gradients with respect to input , we argue that our results could be extended to those explanation methods as well . We will also consider two smoothed variants , namely Smooth ( Smilkov et al. , 2017 ) and Uniform Gradient ( Wang et al. , 2020 ) methods . 2.1 ATTACKS TO MANIPULATE EXPLANATIONS . Similarly to common adversarial attacks ( Goodfellow et al. , 2015 ; Moosavi-Dezfooli et al. , 2016 ; Szegedy et al. , 2014 ) , recent work has shown that explanations can also be manipulated by adding a small and almost imperceptible perturbation to the input ( Ghorbani et al. , 2019 ; Dombrowski et al. , 2019 ) . We refer to this class of attacks as explanation attacks . There have been various formulations for explanation attacks ( Ghorbani et al. , 2019 ; Dombrowski et al. , 2019 ) . In this work , we will use the formulation introduced by Dombrowski et al . ( 2019 ) . In this attack , the attacker tries to find a perturbed input for which the explanation is manipulated to be very similar to a given target explanation map while the output of the model remains approximately unchanged . Note that the target map could be any heatmap in general ; however , we used the explanation of a target image as a target map in this work . Below , we will give a formal definition of this attack . Definition 1 ( Targeted manipulation attack ) . An explanation hf ( x ) for model f ( x ) is vulnerable to attack at input x if there exist a perturbed input xadv , such that hf ( xadv ) is similar to a given target map ht but the model ’ s output remains unchanged . An attacker finds xadv by minimizing the following objective function : L = ∥∥hf ( xadv ) − ht∥∥2 + γ1 ‖f ( xadv ) − f ( x ) ‖2 + γ2Lreg ( x , xadv ) ( 1 ) The first term in ( 1 ) ensures the similarity of the manipulated explanation to the target map , the second term ensures the similarity between the model output for the original and perturbed inputs , and the third term regularizes the perturbation to ensure perceptual similarity between the original and perturbed images . Note that Lreg is defined by the attacker according to the type of the perturbation . The relative weighting of the terms in ( 1 ) is controlled by the hyper-parameters γ1 and γ2 . 2.2 TOWARDS ROBUST EXPLANATIONS . Recent works have tried to define the robustness of explanations in terms of the sensitivity of input gradients to changes in the input data ( Wang et al. , 2020 ; Dombrowski et al. , 2019 ) . Wang et al . ( 2020 ) define the robustness of explanations by the Lipschitz continuity coefficient of the input gradients ; a smaller coefficient means that the explanation is less sensitive to the changes in the input and hence more robust . In this regard , a class of approaches to generate robust explanations have been proposed in the recent works , which are either based on smoothing out the explanation maps or flattening the decision boundary of the model itself . Broadly , these approaches can be classified into two categories : ( 1 ) Post-hoc approaches do not require retraining of the network and can be applied as a post-processing step . ( 2 ) Ad-hoc approaches to robust explanations require retraining of the network and hence are more costly . In this work , we consider Smooth Gradient ( Smilkov et al. , 2017 ) , Uniform Gradient ( Wang et al. , 2020 ) , and β-smoothing ( Dombrowski et al. , 2019 ) as post-hoc approaches . The first two methods involve smoothing the explanation map , while the third one smooths the decision surface of the model . All three approaches act on pre-trained models , and hence are characterized as post-hoc . Among the ad-hoc methods , we study the explanations generated by adversarially trained networks , and networks trained with curvature regularization ( CURE ) ( Moosavi-Dezfooli et al. , 2019 ) , which is a similar approach to SSR ( Wang et al. , 2020 ) 1 . 1We experiment only with CURE , because with the publicly available code of SSR we were not able to reproduce the results in ( Wang et al. , 2020 ) . | This paper evaluates the quality and robustness of explanations of three post-hoc smoothing approaches (Smooth Gradient, Uniform Gradient, B-smoothing), and two ad-hoc smoothing approaches (CURE, Adv). It evaluates the quality of explanations based on the model parameter sensitivity, class sensitivity, sparseness, infidelity. It also evaluates the robustness of explanations to combinations of additive, spatial transformation, and recoloring attacks by comparing similarities between target and explanation maps. All evaluation is performed on publicly available benchmark datasets such as ImageNet and MS COCO. Based on their experimental results, the authors made several claims about the quality and robustness compared to the vanilla gradient method. For example, the authors claim that most of the smoothing methods are less sensitive to perturbation of model parameters so they may not be helpful to debug a model, and they may not be "robust" to non-additive types of attacks. | SP:a05f50fa43df843af97048eda07c97447deda6ed |
Encoding Weights of Irregular Sparsity for Fixed-to-Fixed Model Compression | 1 INTRODUCTION . As one of the efficient compression methods , pruning reduces the number of parameters by replacing model parameters of low importance with zeros ( LeCun et al. , 1990 ) . Since magnitude-based pruning has shown that pruning can be conducted with low computational complexity ( Han et al. , 2015 ) , various practical pruning methods have been studied to achieve higher compression ratio ( Zhu and Gupta , 2017 ; Molchanov et al. , 2017 ; Louizos et al. , 2018 ; Gale et al. , 2019 ) . Recently , pruning has been extended to a deeper understanding of weight initialization . Based on the Lottery Winning Ticket hypothesis ( Frankle and Carbin , 2018 ) , ( Renda et al. , 2020 ) suggests a weight-rewinding method to explore sub-networks from full-trained models . Furthermore , pruning methods at initialization steps without pre-trained models have also been proposed ( Lee et al. , 2019b ; Wang et al. , 2020 ) . Despite a high compression ratio , fine-grained pruning that eliminates each parameter individually has practical issues to be employed in parallel computing platforms . One of the popular formats to represent sparse matrices after pruning is the Compressed Sparse Row ( CSR ) whose structures are irregular . For parallel computing , such irregular formats degrade inference performance that is dominated by matrix multiplications ( Gale et al. , 2020 ) . Algorithm 1 presents a conventional sparse matrix-vector multiplication ( SpMV ) algorithm using CSR format which involves irregular and data-dependent memory accesses . Correspondingly , performance gain using a sparse matrix multiplication ( based on CSR ) is a lot smaller than the compression ratio of pruning ( Yu et al. , 2017 ) . Structured pruning methods ( e.g , block-based pruning ( Narang et al. , 2017 ; Zhou et al. , 2021 ) , filter-based pruning ( Li et al. , 2017 ) , and channel-based pruning ( He et al. , 2017 ; Liu et al. , 2017 ) ) have been suggested to enhance parallelism by restricting the locations of pruned weights . Those methods , however , induce degraded accuracy and/or lower pruning rate than fine-grained pruning . In this paper , as an efficient method to compress sparse NNs pruned by fine-grained pruning , we consider weight encoding techniques . As shown in Algorithm 2 , encoded weights are multiplied by a fixed binary matrix M⊕ to reconstruct the original weights . We propose an encoding method and M⊕ design methodology to compress sparse weights in a regular format . It should be noted that a sparse matrix multiplication can be even slower than a dense matrix multiplication unless pruning rate is high enough ( Yu et al. , 2017 ; Gale et al. , 2020 ) that does not happen with Algorithm ∗Equal contribution . 2 for memory-intensive workloads . We study the maximum compression ratio of such encoding-based compression using entropy and propose a sequential fixed-to-fixed scheme that keeps high parallelism after fine-grained pruning . We show that by our proposed fixed-to-fixed scheme , a compression ratio can approach the maximum ( estimated by entropy ) even under the variation of the unpruned weights in a block . Algorithm 1 : SpMV ( CSR format ) In : Dense vector x , CSR vectors dat , row , col Out : Dense vector y for i← 1 to n do for j ← rowi to rowi+1 do yi ← yi + dat [ j ] × x [ col [ j ] ] / * Irregular , data-dependent access * / Algorithm 2 : Proposed SpMV ( using encoded weights ) In : Dense vector x∈Rm , Encoded vectors we1 .. n∈Rk Fixed matrix M⊕ ∈ { 0 , 1 } k×m , Mask * * ( k m ) Out : Dense vector y for i← 1 to n do Wi ← wei ×M⊕ over GF ( 2 ) yi = Wi · x with Mask ( for zero skipping ) / * Decoding m elements using wei ( Regular access ) * / 2 FIXED-TO-FIXED SPARSITY ENCODING . Data compression is a process of encoding original data into a smaller size . If a fixed number of original bits are encoded into a fixed number of ( smaller ) bits , such a case is categorized into a “ fixed-to-fixed ” compression scheme . Similarly , “ fixed-to-variable ” , “ variable-to-fixed ” , and “ variableto-variable ” categories are available while variable lengths of original and/or encoded bits allow higher compression ratio than fixed ones ( e.g. , Huffman codes ( Huffman , 1952 ) as fixed-to-variable scheme , Lempel-Ziv ( LZ ) -based coding ( Ziv and Lempel , 2006 ) as variable-to-fixed scheme , and Golomb codes ( Golomb , 1966 ) as variable-to-variable scheme ) . Among those 4 categories , “ fixed-to-fixed ” compression is the best for NNs that rely on parallel computing systems . Fixed-to-fixed compression schemes are , however , challenging when fine-grained pruning is employed in NNs because the number of unpruned weights in a fixed-size block varies . Accordingly , most previous sparsity representations ( such as CSR format ) translate a fixed-size weight block into a variable-size block while such a translation would demand non-uniform memory accesses that lead to significantly degraded memory bandwidth utilization as shown in Figure 1 . Specifically , in the case of fixed-to-variable sparsity format ( e.g. , CSR ) in Figure 1 , we observe that memory bandwidth is low because fine-grained pruning induces a variable number of pruned weights for a certain block or row while memory is designed to access a fixed amount of consecutive data . Since higher sparsity leads to higher relative standard deviation ( i.e. , coefficient of variation ) on pruned weights in a block , low memory bandwidth is a significant issue even though the amount of data to be stored is reduced ( see Appendix A ) . As a result , for fixed-to-variable sparsity format , it is difficult to implement fine-grained pruning with parallel computing systems that require high memory bandwidth ( Yu et al. , 2017 ) . On the other hand , fixed-to-fixed compression schemes in Figure 1 can maintain the same memory bandwidth regardless of sparsity . In this work , we propose a “ fixed-to-fixed ” compression scheme as shown in Figure 2 when the number of pruned weights in a block can vary . A successful fixed-to-fixed compression of sparse NNs should consider the followings : • ( High compression ratio ) The maximum compression ratio is limited by the minimum entropy ( that can be obtained by a fixed-to-variable scheme as we discuss in Appendix D ) . Suppose that a block to be encoded contains ( fixed ) nb bits among which ( fixed ) nu bits are unpruned . A fixed-to-fixed encoding scheme is required to support high compression close to ( nb/nu ) ( estimated by entropy ) . Fixed-to-fixed decoding , then , accepts ( fixed ) Nin bits as an input and produces Nout bits as an output while Nout/Nin = nb/nu . • ( Variation tolerance ) For a fine-grained pruning , nu is given as a random variable whose distribution is affected by pruning rate , nb size , a particular pruning method , and so on . Our goal is to maintain a fixed-to-fixed scheme with a high compression ratio even under Var [ nu ] 6= 0 . In Figure 2 , for example , 5 blocks of original data have various nu values while the size of an encoded block is fixed to be 4 ( =E [ nu ] ) . We will discuss how to design a variation tolerant encoding . 3 RANDOM NUMBER GENERATOR . Before we discuss compression schemes , let us assume that a binary masking matrix is given to represent which weights are pruned or not ( note such a binary masking matrix can be compressed significantly ( Lee et al. , 2019a ) ) . Then , a pruned weight can be described as a don ’ t care value ( 5 ) that is to be masked . We also assume that 1 ) pruning each weight is performed independently with pruning rate S and 2 ) unpruned weight is assigned to 0 or 1 with equal probability ( such assumptions are not necessary when we demonstrate our experimental results in Section 5 ) . To obtain both “ high compression ratio ” and “ variation tolerance ” while a fixed-to-fixed compression scheme is considered , we adopt random number generator schemes that enable encoding/decoding of weights . A random number generator accepts a fixed number of inputs and produces nb bits so as to implement a fixed-to-fixed compression scheme . As shown in Figure 3 , a weight block is compared with every output of a random number generator . If there is an output vector matching original ( partially masked ) weights , then a corresponding input vector of a random number generator can be an encoded input vector . As an effort to increase the Hamming distance between any two outputs ( i.e. , the number of bit positions in which two bits are different ) , 2nu outputs out of 2nb possible candidates need to be randomly selected . Note that random encoding has already been suggested by Claude Shannon to introduce channel capacity that is the fundamental theory in digital communication ( Morelos-Zaragoza , 2006 ) . Since then , practical error correction coding techniques have been proposed to implement random-like coding by taking into account efficient decoding ( instead of using a large look-up table ) . Similar to error correction coding that usually depends on linear operations over Galois Field with two elements , or GF ( 2 ) ( Morelos-Zaragoza , 2006 ) , for simple encoding of original data , recently , two compression techniques for sparse NNs have been proposed . An XOR-gate decoder produces ( a large number of ) binary outputs using ( a relatively much smaller number of ) binary inputs while outputs are quantized weights ( Kwon et al. , 2020 ) . Another example is to adopt a Viterbi encoding/decoding scheme ( Forney , 1973 ) to generate multiple bits using a single bit as an input ( Ahn et al. , 2019 ) . For a block that can not be encoded into a compressed one by a random number generator , we can attach patch data to fix unmatched bits ( Kwon et al. , 2020 ) or re-train the model to improve the accuracy ( Ahn et al. , 2019 ) . To compare the random number generation capability of various block-level compression schemes , we introduce ‘ encoding efficiency ’ given as a percentage . E ( Encoding Efficiency ) = # of correctly matched bits # of unpruned bits × 100 ( % ) ( 1 ) Let S be pruning rate ( 0 ≤ S ≤ 1 ) . To measure encoding efficiency ( E ) , we assume that the compression ratio of a random number generator ( =the number of output bits / the number of input bits ) is 1/ ( 1 − S ) . We generate numerous randomly pruned ( binary ) weight blocks , and for each block , we investigate all of the possible outputs that a random number generator can produce . If there is a block missing a matching output of a generator , then the maximum number of correctly matched bits is recorded for each block . We repeat such an experiment for all of the blocks . Note that E can not be higher than 100 % for any generators . 3.1 FIXED PRUNING RATE IN A BLOCK . For simplicity , we assume that nu in a block is a fixed number . Let us study E when nu is fixed using an XOR-gate decoder introduced in ( Kwon et al. , 2020 ) . For an XOR-gate decoder , when Nout is the number of output bits and Nin is the number of input bits , a matrix M⊕ ∈ { 0 , 1 } Nout×Nin presents connectivity information between an input vector wx ( ∈ { 0 , 1 } Nin ) and an output vector wy ( ∈ { 0 , 1 } Nout ) such that we have wy = M⊕ ·wx over GF ( 2 ) . For example , if the second row of M⊕ ( with Nin = 4 and Nout = 8 ) is given as [ 1 0 1 1 ] , then w y 2 = w x 1 ⊕wx3 ⊕wx4 ( ‘ ⊕ ’ indicates a binary XOR operation or an addition over GF ( 2 ) equivalently ) . An element of M⊕ is randomly filled with 0 or 1 as a simple random number generator design technique ( Kwon et al. , 2020 ) . To measure E , let Nin/Nout ≈ 1− S such that Nout = bNin · ( 1/ ( 1−S ) ) c. Correspondingly , for a certain S , a block size ( =Nout ) increases as Nin increases . When nb = Nout and nu = Nin , Figure 4a describes statistics of E when random M⊕ matrices are associated with random blocks . From Figure 4a , it is clear that increasing Nin is the key to improving encoding efficiency . Note that , however , increasing Nin and Nout complicates the decoding complexity ( due to large M⊕ ) and the encoding complexity as well ( due to an exponentially large search space ) . | This paper tackles an interesting and important question which is how can we make the pruned network regular such that it can run quickly on GPU / common hardwares. The problem essentially originates from the fact that typical computational hardware can be slow when accessing in-contiguous memory address. This paper proposes a sequential encoding-decoding shemes and can compress irregular pruned weights to a regular (block-wise) structure stored in memory and shows experimental results in large-scale models / datasets. | SP:121b487452295880fb4ad01ea6236b79d79e6282 |
Unit Ball Model for Embedding Hierarchical Structures in the Complex Hyperbolic Space | 1 INTRODUCTION . Representation learning of data with hierarchical structures is an important machine learning task with many applications , such as taxonomy induction ( Fu et al. , 2014 ) and hypernymy detection ( Shwartz et al. , 2016 ) . In recent years , the hyperbolic embeddings ( Nickel and Kiela , 2017 ; 2018 ) have been proposed to improve the traditional Euclidean embedding models . The constant negative curvature of the hyperbolic space produces a manifestation that the hyperbolic space can be regarded as a continuous approximation to trees ( Krioukov et al. , 2010 ) . The hyperbolic space is capable of embedding any finite tree while preserving the distances approximately ( Gromov , 1987 ) . However , most real-world hierarchical data do not belong to tree structures since they can have varying local structures while being tree-like globally . For example , the taxonomies such as WordNet ( Miller , 1995 ) and YAGO ( Suchanek et al. , 2007 ) contain many 1-N ( 1 child links to multiple parents ) cases and multitree structures ( Griggs et al. , 2012 ) , which are much more complicated than the tree structure . In consequence , the hyperbolic space which resembles tree metrics has limitations on capturing the general hierarchically structured data . To address the challenge , in this paper , we propose a new approach to learning the embeddings of hierarchically structured data . Specifically , we embed the hierarchical data into the unit ball model of the complex hyperbolic space . The unit ball model is a projective geometry based model to identify the complex hyperbolic space . One of the main differences between the complex and the real hyperbolic space is that the curvature is non-constant in the complex hyperbolic space . In practice , the variable negative curvature makes the complex hyperbolic space more flexible in handling varying structures while the tree-like properties are still retained . For empirical evaluation , we evaluate different geometrical embedding models on various hierarchically structured data , including synthetic graphs and real-world data . The experimental results demonstrate the advantages of our approach . In addition , we investigate two specific structures in which complex hyperbolic geometry shows outstanding performances , namely the multitree structure and 1-N structure , which are highly common and typical in real-world data . To summarize , our work has the following main contributions : 1 . We present a novel embedding approach based on the complex hyperbolic geometry to handle data with complicated and various hierarchical structures . To the best of our knowledge , our work is the first to propose complex hyperbolic embeddings . 2 . We introduce the embedding algorithm in the unit ball model of the complex hyperbolic space . We formulate the learning and Riemannian optimization in the unit ball model . 3 . We evaluate our approach with experiments on an extensive range of synthetic and real-world data and show the remarkable improvements of our approach . 2 RELATED WORK . Hyperbolic embeddings . Hyperbolic embedding methods have become the leading approach for representation learning of hierarchical structures . Nickel and Kiela ( 2017 ) learned the representations of hierarchical graphs in the Poincaré ball model of the hyperbolic space and outperformed the Euclidean embedding methods for taxonomies . The Poincaré embedding model was then improved by follow-up works on hyperbolic emebddings ( Ganea et al. , 2018a ; Nickel and Kiela , 2018 ) . These methods learned the hyperbolic embeddings by Riemannian optimization ( Bonnabel , 2013 ) , which was further improved by the Riemannian adaptive optimization ( Bécigneul and Ganea , 2019 ) . Another branch of study ( Sala et al. , 2018 ; Sonthalia and Gilbert , 2020 ) learned the hyperbolic embeddings through combinatorial construction . Instead of optimizing the soft-ranking loss by Riemannian optimization as in ( Nickel and Kiela , 2017 ; 2018 ) , the construction-based methods minimize the reconstruction distortion by combinatorial construction . However , both the optimizationbased and construction-based hyperbolic embeddings suffer from the limitation in hierarchical graphs with varying local structures . To tackle the challenge , Gu et al . ( 2019 ) extended the construction-based method by jointly learning the curvature and the embeddings of data in a product manifold . Although it can provide a better representation than a single space with constant curvature , it is impractical to search for the best manifold combination among enormous combinations for each new structure . Motivated by the promising results of previous works , extensions to the multi-relational graph hyperbolic embeddings ( Balazevic et al. , 2019 ; Chami et al. , 2020 ; Sun et al. , 2020 ) and hyperbolic neural networks ( Ganea et al. , 2018b ; Gülçehre et al. , 2019 ; Liu et al. , 2019 ; Chami et al. , 2019 ; Zhu et al. , 2020 ; Dai et al. , 2021a ; Shimizu et al. , 2021 ) were explored . Notably , ( Chami et al. , 2019 ; 2020 ) leverages the trainable curvature to compensate for the disparity between the actual data structures and the constant-curvature hyperbolic space , where each layer in the graph neural network or each relation in the multi-relational graph has its own curvature parameterization . Since we only focus on the single-relation graph embeddings and taxonomy embeddings in this work , we do not evaluate the multi-relational knowledge graph embedding models or the neural networks in our tasks . The hyperbolic learning also inspired other research tasks and applications , such as classification ( Cho et al. , 2019 ) , image reconstruction ( Skopek et al. , 2020 ) , text generation ( Dai et al. , 2021b ) , etc . Complex embeddings . The traditional knowledge graph embeddings were learned in the real Euclidean space ( Nickel et al. , 2011 ; Bordes et al. , 2013 ; Yang et al. , 2015 ) and were used for knowledge graph inference and reasoning . In recent years , several works suggested utilizing the complex Euclidean space for inferring more relation patterns , such as ComplEx ( Trouillon et al. , 2016 ) and RotatE ( Sun et al. , 2019 ) . These models have been demonstrated to be effective in knowledge graph embeddings . The success of the complex embeddings reveals the potential of the complex space and inspires us to explore the complex hyperbolic space . 3 PRELIMINARIES . 3.1 HYPERBOLIC GEOMETRY . Hyperbolic space1 is a homogeneous space with constant negative curvature.2 In the hyperbolic space HnR ( K ) of dimension n and curvature K , the volume of a ball grows exponentially with its radius ρ : vol ( BHnR ( K ) ( ρ ) ) ∼ e √ −K ( n−1 ) ρ . ( 1 ) 1In this paper , we use hyperbolic space to refer to real hyperbolic space and hyperbolic embeddings to refer to real hyperbolic embeddings for avoiding wordiness . 2In this paper , curvature refers to the sectional curvature . Please see Appendix A.1 for definition . Contrastively , in the Euclidean space En , the curvature is 0 and the volume of a ball grows polynomially with its radius : vol ( BEn ( ρ ) ) = πn/2 Γ ( n/2 ) ρn ∼ ρn . ( 2 ) The exponential volume growth rate enables the hyperbolic space to have powerful representation capability for tree structures since the number of nodes grows exponentially with the depth in a tree , while the Euclidean space is too flat and narrow to embed trees . 3.2 COMPLEX HYPERBOLIC GEOMETRY . Complex hyperbolic space is a homogeneous space of variable negative curvature . Its ambient Hermitian vector space Cn,1 is the complex Euclidean space Cn+1 endowed with some Hermitian form 〈〈z , w〉〉 , where z , w ∈ Cn+1 . Then the Hermitian space Cn,1 can be divided into three subsets : V− = { z ∈ Cn,1|〈〈z , z〉〉 < 0 } , V0 = { z ∈ Cn,1 − { 0 } |〈〈z , z〉〉 = 0 } , and V+ = { z ∈ Cn,1|〈〈z , z〉〉 > 0 } . Let P be a projection map P : Cn,1 − { zn+1 = 0 } → Cn , i.e. , P : z1 ... zn+1 7→ z1/zn+1 ... zn/zn+1 , where zn+1 6= 0 . ( 3 ) Then the complex hyperbolic space HnC and its boundary ∂HnC are defined using the projectivization : HnC = PV− , ∂HnC = PV0 . ( 4 ) The curvature of the complex hyperbolic space is summarized by ( Goldman , 1999 ) as follows : Theorem 1 . The curvature is not constant in HnC . It is pinched between −1 ( in the directions of complex projective lines ) and −1/4 ( in the directions of totally real planes ) . We leave the full proof in Appendix B . The non-constant curvature , which we expect to be favorable for embedding various hierarchical structures , is one of the main differences between HnC and HnR . The complex hyperbolic space also has the tree-like exponential volume growth property . The volume of a ball with radius ρ in HnC is given by vol ( BHnC ( ρ ) ) = 8nσ2n−1 2n sinh2n ( ρ/2 ) ∼ enρ , ( 5 ) where σ2n−1 = 2πn/n ! is the Euclidean volume of the unit sphere S2n−1 ∈ Cn . From the properties of the complex hyperbolic geometry , we expect that the complex hyperbolic space can naturally handle data with diverse local structures in virtue of the variable curvature as presented in Theorem 1 while preserving the tree-like properties as shown in Eq . ( 5 ) . From this section , we see that complex hyperbolic geometry and hyperbolic geometry are typically of different characteristics . The n-dimensional ( n-d ) complex hyperbolic space is not simply the 2n-d hyperbolic space or the product of two n-d hyperbolic spaces . This implies that our complex hyperbolic embedding model is intrinsically different from the hyperbolic embedding methods ( Nickel and Kiela , 2017 ; 2018 ) or the product manifold embeddings ( Gu et al. , 2019 ) . 4 UNIT BALL EMBEDDINGS . We propose to embed the hierarchically structured data into the unit ball model of the complex hyperbolic space . In this section , we introduce our approach in detail . 4.1 THE UNIT BALL MODEL . The unit ball model is one model used to identify the complex hyperbolic space , which can be derived via the projective geometry ( Goldman , 1999 ) . We now provide the necessary derivation . Take the Hermitian form of Cn,1 in Section 3.2 to be a standard Hermitian form : 〈〈z , w〉〉 = z1w1 + · · ·+ znwn − zn+1wn+1 , ( 6 ) where w is the conjugate of w. Take zn+1 = 1 in the projection map P in Eq . ( 3 ) . Then from Eq . ( 4 ) , we can derive the formula of the unit ball model : BnC = P ( { z ∈ Cn,1|〈〈z , z〉〉 < 0 } ) = { ( z1 , · · · , zn , 1 ) ||z1|2 + · · ·+ |zn|2 < 1 } . ( 7 ) The metric on BnC is Bergman metric , which takes the formula below in 2-d case : ds2 = −4 〈〈z , z〉〉2 det [ 〈〈z , z〉〉 〈〈dz , z〉〉 〈〈z , dz〉〉 〈〈dz , dz〉〉 ] . ( 8 ) The distance function on BnC is given by dBnC ( z , w ) = arcosh ( 2 〈〈z , w〉〉〈〈w , z〉〉 〈〈z , z〉〉〈〈w , w〉〉 − 1 ) , ( 9 ) Note that there are other choices of the Hermitian form 〈〈z , w〉〉 , which corresponds to other models of complex hyperbolic geometry , such as the Siegel domain model . We choose the unit ball model for the relatively simple formula as well as convenient computations of the metric and distance function . | The paper introduces an extension of real hyperbolic embeddings to the complex hyperbolic space [A]. The exploited geometry is an extension of the Poincaré ball that contains complex vectors (instead of real vectors) whose norm is smaller than 1. The resulting manifold is of nonconstant negative curvature, which the authors expect to be favorable for embedding various hierarchical structures. Following the optimization framework of [B] and since the complex hyperbolic space is a Riemannian manifold, Section 4.3 presents a standard Riemannian optimization framework to learn nonparametric embeddings. The proposed manifold shows (slightly) superior results compared to real hyperbolic embeddings proposed in [B,C] in the graph reconstruction and link prediction tasks. | SP:54f48b0f37ee22d8027ab01da5ea6801520d9dc3 |
iPrune: A Magnitude Based Unstructured Pruning Method for Efficient Binary Networks in Hardware | 1 INTRODUCTION . AI has become ubiquitous in our daily lives , be it the use of search engines to find information or automatically tagging photos on social media . While the predictive accuracy of these models have grown , the size and computation requirements have grown by several orders of magnitude or more , making AI a niche field where only few can participate . This practice is also proving to be environmentally unfriendly with Strubell et al . ( 2019 ) estimating the footprint of training an NLP model to be 626,000 pounds of carbon dioxide equivalent . To counter this growing computation need , it is important to develop hardware accelerators which are easily re-configurable . A Field Programmable Gate Array ( FPGA ) is an integrated circuit designed to be reconfigured by the user and acts as a blank canvas for implementing custom circuits ( in our case custom models ) . FPGAs embed millions of lookup tables ( LUTs ) that ” compute ” ( actually fetch ) the output given the values of their binary inputs . The problem is that these LUTs are limited in size ( typically 6-12 inputs ) and using multiple LUTs per neuron is less efficient . This raises the need for both binarizing our weights ( and/or activation ) and reducing the number of inputs per neuron . In Sections 2 and 3 we go through existing works on binarization and pruning of fully connected , full precision networks . In Section 4 , we introduce iPrune , an effective way to prune the weights of binary networks . In Section 5 , we compare the accuracy , memory and computation requirements of these network implementations against their full precision , fully connected equivalents . In Section 6 , we report some intriguing results about a-priori pruning versus post-training pruning . Section 7 concludes this work . 2 BINARIZATION TECHNIQUES . Binarization is the process of converting the weights and/or activations to a 1-bit representation ( ±1 ) instead of the classic N-bit representation ( typically 8-bit , 16-bit or 32-bit ) . This gives us a direct memory saving of up to 32x . There are several approaches in literature on binarization . Throughout our experiments , we worked with BinaryConnect whose details are given in the next subsection . 2.1 BINARYCONNECT . Courbariaux et al . ( 2015 ) introduced BinaryConnect , the first paper of its kind , with details on binarization of both convolutional and dense weights . There are two sub-types based on how the binarization is performed . • Deterministic : The weights are binarized deterministically ; specifically , using the sign function on the hard-sigmoid of the weight . • Stochastic : The weights are set to -1 with probability ( 1-σ ( Wi ) ) and 1 with probability σ ( Wi ) where σ is the hard-sigmoid function . The hard-sigmoid function mentioned above is given by : σ ( x ) = clip ( x+ 1 2 , 0 , 1 ) ( 1 ) During the back-propagation , the full precision weights are updated based on the gradient with respect to the binary weights . The pseudocode for BinaryConnect is given in Algorithm 1 Algorithm 1 Algorithm for BinaryConnect 1 . Forward propagation : wb ← binarize ( wt−1 ) for k = 1 : L do compute ak knowing ak−1 , wb and bt−1 end for 2 . Backward propagation . for k = L : 2 : −1 do Compute ∂C∂ak−1 knowing ∂C ∂ak and wb end for 3 . Parameter update . Compute ∂C∂wb and ∂C ∂bt−1 knowing ∂C∂ak and ak−1 wt ← clip ( wt−1 − η ∂C∂wb ) bt ← bt−1 − η ∂C∂bt−1 3 PRUNING TECHNIQUES . Hoefler et al . ( 2021 ) discusses in detail different approaches to pruning and was used as a reference for our methods . The different types of pruning techniques are given in Figure 1 . A few approaches are described in detail in Sections 3.1 and 3.2 3.1 STRUCTURE VS UNSTRUCTURED PRUNING . Structured pruning is the removal of neurons or weights in a structured fashion i.e . based on a fixed pattern . Common methods for structured pruning are neuron pruning ( since this is just a row/column removed from the weight matrix ) and filter/transformer head removal . Similarly , strided removal of weights after an offset is also an example of structured pruning . On the other hand , unstructured pruning refers to the pruning method where there are no patterns in how the weights are removed . While this does not help with easier matrix calculation , it tends to provide higher baselines than structured pruning and can often be converted to structured pruning through a minor set of modifications . 3.2 MAGNITUDE PRUNING . It is a simple and effective selection scheme where the magnitude of the weights is used as a metric to determine which weights to drop and which weights to keep . After sparsifying the network this way , retraining is done to get high accuracies again . There are three ways to perform magnitude pruning ; globally , layer-wise or neuron-wise . Global magnitude pruning takes all weights from all layers and keeps the top-k weights among them . This often has the problem of vanishing gradients or even vanishing layers ( because most weights have been removed from the layer ) . Figure 2 gives the distribution of weights before and after applying global magnitude pruning . Layer-wise magnitude pruning ( used in Guerra et al . ( 2020 ) ) keeps the top-k weights across all neurons per layer and overcomes the issue of vanishing layers . This is still difficult to implement in LUTs , because some neurons will have a large number of connections while others will have very few after pruning . Lastly , neuron-wise magnitude pruning keeps the top-k weights for each neuron . This overcomes both the issues of vanishing layers/gradients and LUT implementation , but often comes at the cost of low initial accuracy which can be solved by retraining the network . In all our experiments , we use neuron-wise magnitude pruning . 3.3 LOTTERY TICKET HYPOTHESIS . The Lottery Ticket Hypothesis initially introduced in Frankle & Carbin ( 2018 ) , and extended to quantized networks in Diffenderfer & Kailkhura ( 2021 ) theorizes that there exists optimal subnetworks in the initialization of an overparameterized network . The authors prove theoretically and validate practically this claim in their papers . They introduce a learnable parameter ” score ” which decide the weights to retain and the ones to drop . Diffenderfer & Kailkhura ( 2021 ) claims to reduce network sizes by 50 % with negligible reduction or sometimes even increase in accuracy compared to the fully connected counterparts . 4 IPRUNE . iPrune is a magnitude based unstructured pruning technique to reduce the number of inputs to each neuron of a particular layer in a neural network . For dense layers , the magnitude is computed and the top-k weights are chosen for each neuron of the current layers ( top-k columns for each row in the weight matrix of shape ( out features , in features ) ) . For convolutions , the L1 norm across the kernel dimensions ( kx , ky ) is computed to reduce it to an ( out channels , in channels ) representation . This is then followed by pruning using top-k weights similar to the dense case . Disconnecting neurons from previous layers can be easily accomplished in most deep-learning frameworks with the use of a mask . Neurons which remain connected have a mask value 1 and the others have 0 . In Figure 3 , for a given example mask and weight , the computation of the masked weight is shown . The figure also highlights the structure of the mask . Algorithm 2 provides pseudocode for iPrune . Note that the update step , performed on the full precision weights uses the gradients with respect to the binary masked weights ( ∂C ∂wm ) . 5 EXPERIMENTAL RESULTS . We performed tests on MNIST ( LeCun et al . ( 1998 ) ) and CIFAR-10 ( Krizhevsky & Hinton ( 2009 ) ) datasets . For all the results given below , the network architecture used for MNIST was ( 1024D - 1024D - 10D ) and for CIFAR-10 a modified version of VGGSmall , specifically : ( 128C3 - 128C3 - MP2 - 256C3 - 256C3 - MP2 - 512C3 - 512C3 - MP2 - 1024D - 1024D - 10D ) . For MNIST , no preprocessing was performed . We skipped the last layer while pruning . For CIFAR10 we applied ZCA preprocessing as was suggested in Courbariaux et al . ( 2015 ) for gains of around 2-3 % in accuracy . We applied weight-decay ( 5e-2 ) on the last layer ( dense ) of the network and used the square hinge loss as the loss function . This together behaves like an L2-SVM block . We use the Adam optimizer with initial learning rate of 3e-3 with no learning rate scheduler . While pruning , we skipped the first two convolution layers and the last dense layer . Figure 4 shows the effect of iPrune on the weight values for the models we trained . Notice how the number of neurons with weight magnitude close to zero reduces in both cases . At the same time the Algorithm 2 Algorithm for iPrune 0 . Train a fully connected model 1 . Compute the mask - Done only once w.mask = find mask ( w ) 2 . Forward propagation : wb ← binarize ( w ) wm = wb ∗ w.mask for k = 1 : L do compute ak knowing ak−1 , wm and b end for 3 . Backward propagation . for k = L : 2 : −1 do Compute ∂C∂ak−1 knowing ∂C ∂ak and wm end for 4 . Parameter update . Compute ∂C∂wm and ∂C ∂b knowing ∂C ∂ak , ak−1 and w.mask w ← clip ( w − η ∂C∂wm ) b← b− η ∂C∂b number of these weights is not zero as we are applying neuron wise pruning , not global pruning . Also note that in the BinaryConnect case , the original distribution is a mixture of three Gaussians centered at -1 , +1 and 0 while in the FP case , there is only one Gaussian centered at 0 . Table 1 gives the results after applying iPrune on MNIST . There is less than 2.3 % difference between the fully connected , full precision network and pruned BinaryConnect deterministic model with 7/8 inputs . The memory gain is around 2200x and computation gain is around 70x . Table 2 gives the accuracy memory and computation requirement for different percentages of weights remaining per neuron . It is clear that we can reduce the memory by 1.9x-4.7x ( remaining weights 50 % -20 % ) and computation by 1.9x-4.4x , compared to the fully connected BinaryConnect deterministic network , with negligible loss in accuracy ( less than 1 % ) . Since we observed in our early experiments with MNIST that dense layers can be pruned further , we performed a gridsearch with different percentages/number of weights remaining in convolution and dense layers . The results are given in Table 3 . The baseline accuracy for these models is 87.64 % . The results mostly show a trend of increasing accuracy with increasing number of dense/percentage of convolution weights per neuron apart from a few anomalies . We can also observe that the computation and memory requirements are highly skewed towards reduction in convolution parameters than dense parameters . Also note , based on Table 2 , Table 3 , and our baseline accuracy for fully connected , full precision model ( 88.21 % ) , that with less than 3 % reduction in accuracy , we were able to save up to 180x in memory and up to 4.4x in computation . Previous work on this topic ( Guerra et al . ( 2020 ) ) , which used layer wise unstructured pruning , was able to prune BinaryConnect models to 750 KB size with 1.4x reduction in computation while our models with 1 % higher accuracy can be pruned to as low as 526 KB with upto 3.1x reduction in computation . Compared to pruning full precision models from Li et al . ( 2016 ) we reduce memory by upto 41x ( 526KB vs 21.6 MB ) with 6 % reduction in accuracy ( Note that the comparisons have been done with results of closest equivalent VGG models reported by the authors ) . | This paper combines two existing methods (i.e., binarization and pruning) to reduce both computational complexity and memory requirements of deep neural networks (DNNs). Binarryconnect method was exploited to binarize DNNs whereas neuron-wise magnitude pruning was used to remove unnecessary input activations. It was then shown that the combination of these two methods can significantly reduce both memory and computation on CIFAR-10 and MNIST datasets. | SP:b3f80afc622b0491c582756b39d9497dd95df96c |
The Convex Geometry of Backpropagation: Neural Network Gradient Flows Converge to Extreme Points of the Dual Convex Program | 1 INTRODUCTION . Neural networks ( NNs ) exhibit remarkable empirical performance in various machine learning tasks . However , a full characterization of the optimization and generalization properties of NNs is far from complete . Non-linear operations inherent to the structure of NNs , over-parameterization and the associated highly nonconvex training problem makes their theoretical analysis quite challenging . In over-parameterized models such as NNs , one natural question arises : Which particular solution does gradient descent/gradient flow find in unregularized NN training problems ? Suppose that X ∈ RN×d is the training data matrix and y ∈ { 1 , −1 } N is the label vector . For linear classification problems such as logistic regression , it is known that gradient descent ( GD ) exhibits implicit regularization properties , see , e.g. , ( Soudry et al. , 2018 ; Gunasekar et al. , 2018 ) . To be precise , under certain assumptions , GD converges to the following solution which maximizes the margin : arg min w∈Rd 1 2 ‖w‖22 , s.t . ynwTxn ≥ 1 , n ∈ [ N ] . ( 1 ) Here we denote [ N ] = { 1 , . . . , N } . Recently , there are several results on the implicit regularization of the ( stochastic ) gradient descent method for NNs . In ( Lyu & Li , 2019 ) , for the multi-layer homogeneous network with exponential or cross-entropy loss , with separable training data , it is shown that the gradient flow ( GF ) and GD finds a stationary point of the following non-convex max-margin problem : arg min θ 1 2 ‖θ‖22 , s.t . ynf ( θ ; xn ) ≥ 1 , n ∈ [ N ] , ( 2 ) where f ( θ ; x ) represents the output of the neural network with parameter θ given input x . In ( Phuong & Lampert , 2021 ) , by further assuming the orthogonal separability of the training data , it is shown that all neurons converge to one of the two max-margin classifiers . One corresponds to the data with positive labels , while the other corresponds to the data with negative labels . However , as the max-margin problem of the neural network ( 2 ) is a non-convex optimization problem , the existing results only guarantee that it is a stationary point of ( 2 ) , which can be a local minimizer or even a saddle point . In other words , the global optimality is not guaranteed . In a different line of work ( Pilanci & Ergen , 2020 ; Ergen & Pilanci , 2020b ; a ) , exact convex optimization formulations of two and three-layer ReLU NNs are developed , which have global optimality guarantees in polynomial-time when the data has a polynomial number of hyperplane arrangements , e.g. , in any fixed dimension or with convolutional networks of fixed filter size . In this work , we first derive an equivalent convex program corresponding to the maximal margin problem ( 2 ) . We then consider non-convex subgradient flow for unregularized logistic loss . We show that the limit points of non-convex subgradient flow can be identified via primal-dual correspondence in the convex optimization problem . We then present a sufficient condition on the dual variable to ensure that all stationary points of the non-convex max-margin problem are KKT points of the convex max-margin problem . For certain regular datasets including orthogonal separable data , we show that this sufficient condition on the dual variable holds , thus implies the convergence of gradient flow on the unregularized problem to the global optimum of the non-convex maximalo margin problem ( 2 ) . Consequently , this enables us to fully characterize the implicit regularization of unregularized gradient flow or gradient descent as convex regularization applied to a convex model . 1.1 RELATED WORK . There are several works studying the property of two-layer ReLU networks trained by gradient descent/gradient flow dynamics . The following papers study the gradient descent like dynamics in training two-layer ReLU networks for regression problems . Ma et al . ( 2020 ) show that for two-layer ReLU networks , only a group of a few activated neurons dominate the dynamics of gradient descent . In ( Mei et al. , 2018 ) , the limiting dynamics of stochastic gradient descent ( SGD ) is captured by the distributional dynamics from a mean-field perspective and they utlize this to prove a general convergence result for noisy SGD . Li et al . ( 2020 ) focus on the case where the weights of the second layer are non-negative and they show that the over-parameterized neural network can learn the ground-truth network in polynomial time with polynomial samples . In ( Zhou et al. , 2021 ) , it is shown that mildly over-parameterized student network can learn the teacher network and all student neurons converge to one of the teacher neurons . Beyond ( Lyu & Li , 2019 ) and ( Phuong & Lampert , 2021 ) , the following papers study the classification problems . In ( Chizat & Bach , 2018 ) , under certain assumptions on the training problem , with overparameterized model , the gradient flow can converge to the global optimum of the training problem . For linear separable data , utilizing the hinge loss for classification , Wang et al . ( 2019 ) introduce a perturbed stochastic gradient method and show that it can attain the global optimum of the training problem . Similarly , for linear separable data , Yang et al . ( 2021 ) introduce a modified loss based on the hinge loss to enable ( stochastic ) gradient descent find the global minimum of the training problem , which is also globally optimal for the training problem with the hinge loss . 1.2 PROBLEM SETTING . We focus on two-layer neural networks with ReLU activation , i.e. , f ( θ , X ) = ( XW1 ) +w2 , ( 3 ) where W1 ∈ Rd×m , w2 ∈ Rm and θ = ( W1 , w2 ) represents the parameter . Due to the ReLU activation , this neural network is homogeneous , i.e. , for any scalar c > 0 , we have f ( cθ ; X ) = c2f ( θ ; X ) . The training problem is given by min θ N∑ n=1 ` ( ynf ( θ ; xn ) ) , ( 4 ) where ` ( q ) : R → R+ is the loss function . We focus on the logistic , i.e , cross-entropy loss , i.e. , ` ( q ) = log ( 1 + exp ( −q ) ) . Then , we briefly review gradient descent and gradient flow . The gradient descent takes the update rule θ ( t+ 1 ) = θ ( t ) − η ( t ) g ( t ) , where g ( t ) ∈ ∂◦L ( θ ( t ) ) and ∂◦ represents the Clarke ’ s subdifferential . The gradient flow can be viewed as the gradient descent with infinitesimal step size . The trajectory of the parameter θ during training is an arc θ : [ 0 , +∞ ) → Θ , where Θ = { θ = ( W1 , w2 ) |W1 ∈ Rd×m , W2 ∈ Rm } . More precisely , the gradient flow is given by the differential inclusion d dt θ ( t ) ∈ −∂◦L ( θ ( t ) ) , for t ≥ 0 , a.e .. 2 MAIN RESULTS . In this section , we present our main results and defer the detailed analysis to the following sections . Consider the more general multi-class version of the problem withK classes . Suppose that ȳ ∈ [ K ] N is the label vector . Let Y = ( yn , k ) n∈ [ N ] , k∈ [ K ] ∈ RN×K be the encoded label matrix such that yn , k = { 1 , if ȳn = k , − 1 , otherwise . Similarly , we consider the following two-layer vector-output neural networks with ReLU activation : F ( Θ , X ) = f1 ( θ1 , X ) ... fK ( θK , X ) = ( XW ( 1 ) 1 ) +w ( 1 ) 2 ... ( XW ( K ) 1 ) +w ( K ) 2 , where we write Θ = ( θ1 , . . . , θK ) . For k = 1 , . . . , K , we have θk = ( W ( k ) 1 , w ( k ) 2 ) where W ( k ) 1 ∈ RN×m and w ( k ) 2 ∈ Rm . One can view each of the K outputs of F ( Θ , X ) as the output of a two-layer scalar-output neural network . Consider the following training problem : min Θ K∑ k=1 N∑ n=1 ` ( yn , kfk ( θk , xn ) ) . ( 5 ) According to ( Lyu & Li , 2019 ) , the gradient flow and the gradient descent finds a stationary point of the following non-convex max-margin problem : arg min Θ K∑ k=1 1 2 ‖θk‖22 , s.t . yn , kf ( θk ; xn ) ≥ 1 , n ∈ [ N ] , k ∈ [ K ] . ( 6 ) Denote the set of all possible hyperplane arrangement as P = { diag ( I ( Xw ≥ 0 ) ) |w ∈ Rd } , ( 7 ) and let p = |P| . We can also write P = { D1 , . . . , Dp } . From ( Cover , 1965 ) , we have an upper bound p ≤ 2r ( e ( N−1 ) r ) r where r = rank ( X ) . We first reformulate ( 6 ) as convex optimization . Proposition 1 The non-convex problem ( 6 ) is equivalent to the following convex program min K∑ k=1 p∑ j=1 ( ‖uj , k‖2 + ‖u′j , k‖2 ) , s.t . diag ( yk ) p∑ j=1 DjX ( uj , k − u′j , k ) ≥ 1 , ( 2Dj − I ) Xuj , k ≥ 0 , ( 2Dj − I ) Xu′j , k ≥ 0 , j ∈ [ p ] , k ∈ [ K ] . ( 8 ) where yk is the k-th column of Y . The dual problem of ( 8 ) is given by max tr ( ΛTY ) , s.t . diag ( yk ) λk 0 , max ‖w‖2≤1 |λTk ( XTw ) +| ≤ 1 , k ∈ [ K ] . ( 9 ) where λk is the k-th column of Λ . We present the detailed derivation of the convex formulation ( 8 ) and its dual problem ( 9 ) in the appendix . Given u ∈ Rd , we define D ( u ) = diag ( I ( Xu > 0 ) ) . ( 10 ) For two vectors u , v ∈ Rd , we define the cosine angle between u and v by cos∠ ( u , v ) = uTv ‖u‖2‖v‖2 . 2.1 OUR CONTRIBUTIONS . The following theorem illustrate that for neurons satisfying sign ( yTk ( Xw ( k ) 1 , i ) + ) = sign ( w ( k ) 2 , i ) at initialization , w ( k ) 1 , i align to the direction of ±XTD ( w ( k ) 1 , i ) yk at a certain time T , depending on sign ( w ( k ) 2 , ik , + ) at initialization . In Section 2.3 , we show that these are dual extreme points of ( 8 ) . Theorem 1 Consider the K-class classification training problem ( 5 ) for any dataset . Suppose that the neural network is scaled at initialization such that ‖w ( k ) 1 , i ‖2 = |w ( k ) 2 , i | for i ∈ [ m ] and k ∈ [ K ] . Assume that at initialization , for k ∈ [ K ] , there exists neurons ( w ( k ) 1 , ik , w ( k ) 2 , ik ) such that sign ( yTk ( Xw ( k ) 1 , ik ) + ) = sign ( w ( k ) 2 , ik ) = s , ( 11 ) where s ∈ { 1 , −1 } . Consider the subgradient flow applied to the non-convex problem ( 5 ) . Let δ ∈ ( 0 , 1 ) . Suppose that the initialization is sufficiently close to the origin . Then , for k ∈ [ K ] , there exist T = T ( δ , k ) such that cos∠ ( w ( k ) 1 , ik ( T ) , sXTD ( w ( k ) 1 , ik ( T ) ) yk ) ≥ 1− δ . Next , we impose conditions on the dataset to prove a stronger global convergence results on the flow . We say that the dataset ( X , ȳ ) is orthogonal separable among multiple classes if for all n , n′ ∈ [ N ] , xTnxn′ > 0 , if ȳn = ȳn′ , xTnxn′ ≤ 0 , if ȳn 6= ȳn′ . For orthogonal separable dataset among multiple classes , the subgradient flow for the non-convex problem ( 5 ) can find the global optimum of ( 6 ) up to a scaling constant . Theorem 2 Suppose that ( X , ȳ ) ∈ RN×d × [ K ] N is orthogonal separable among multiple classes . Consider the non-convex subgradient flow applied to the non-convex problem ( 5 ) . Suppose that the initialization is sufficiently close to the origin and scaled as in Theorem 1 . Then , the non-convex subgradient flow converges to the global optimum of the convex program ( 8 ) and hence the non-convex objective ( 6 ) up to scaling . Therefore , the above result characterizes the implicit regularization of unregularized gradient flow as convex regularization , i.e. , group ` 1 norm , in the convex formulation ( 8 ) . It is remarkable that group sparsity is enforced by small initialization magnitude with no explicit form of regularization . | The paper studies the subgradient flows when training a two-layer ReLU neural network. To this end, the non-convex max-margin problem is reformulated as a convex optimization problem. The authors then analyze the dual extreme points of the convex formulation and show the implicit regularization of unregularized gradient flow as convex regularization. Then, for the binary classification problem, it is proven that the KKT points of the non-convex max-margin problem correspond to the KKT points of the convex max-margin problem if the direction is dual feasible. The paper then demonstrates that this is the case under some conditions on spike-free matrices and orthogonal separable data. Finally it is shown that if the dataset is orthogonal separable and initialized sufficiently close to zero, the limiting point of the gradient flow is the global minimizer of the max-margin problem. | SP:4213ada856e1c6bfe4d1b85ca187db8a5d6aadfd |
Quasi-potential theory for escape problem: Quantitative sharpness effect on SGD's escape from local minima | 1 INTRODUCTION . In recent years , the successes of deep learning have been a major driving force of machine learning development ( LeCun , 2019 ) . Owing to its strong generalization capability , deep learning has diverged into a wide range of domains , such as computer vision ( Krizhevsky et al. , 2012 ) , speech recognition ( Mikolov et al. , 2011 ) , and natural language processing ( Collobert et al. , 2011 ) . The high performance of deep learning is underpinned by gradient-based learning algorithms , including stochastic gradient descent ( SGD ) and its variations ( Kingma & Ba , 2014 ; Schmidt et al. , 2021 ) . However , at the same time , those unprecedented successes raise a question : Why does SGD learn parameters of neural networks with high generalization performance ? Although the optimization problems of neural networks were thought to be difficult to solve ( Blum & Rivest , 1992 ) , SGD can find nearly optimal solutions empirically , and further , the obtained solutions generalize well ( Keskar et al. , 2016 ; Brutzkus et al. , 2017 ) . Analyzing SGD ’ s role on deep learning is an area of research that is currently attracting strong interest ( Masters & Luschi , 2018 ; Jastrzebski et al. , 2021 ) . One of the promising directions for this question is to study the geometric properties of a training loss landscape . Many empirical studies have found that minima obtained by SGD have distinctive geometric properties . Keskar et al . ( 2016 ) have shown that the shape of the minima obtained by SGD tends to be flat . He et al . ( 2019b ) have deepened the investigation by picturing that SGD settles on the flatter side of asymmetric loss surface , which they named “ asymmetric valley . '' Draxler et al . ( 2018 ) and Garipov et al . ( 2018 ) have shown that separate minima obtained by independent training processes are internally connected through pathways . Li et al . ( 2017 ) have proposed a dimension reduction technique to visualize the geometry of loss surfaces , visually confirming flat minima . Most significantly , Jiang et al . ( 2019 ) conducted large-scale experiments and verified that minima in flat and wide regions have the strongest correlations with generalization capabilities . To attain a theoretical understanding of SGD , it is key to quantitatively analyze the connection between SGD and the geometric properties of loss surfaces . An escape problem is a scheme to analyze the dynamic of SGD escaping from local minima ( Zhu et al. , 2019 ; Jastrzębski et al. , 2017 ; Hu et al. , 2019 ; Nguyen et al. , 2019 ; Xie et al. , 2020 ) . This scheme allows us to investigate why SGD avoids ( potentially ) bad local minima and settles on good minima . Zhu et al . ( 2019 ) first investigated the SGD ’ s escape phenomenon and showed that SGD ’ s escape is enhanced by its unique noise structure , called the “ anisotropic noise structure . '' Invoked by their analysis , many studies have been attempting to theoretically quantify this phenomenon . Hu et al . ( 2019 ) rigorously identified the role of learning rate in escaping . Nguyen et al . ( 2019 ) used the Levy process to provide the precise description of SGD as well as its escaping phenomena . Jastrzębski et al . ( 2017 ) developed a theory of stochastic differential equation and quantified how the anisotropic noise affects its fast escape from sharp minima . Xie et al . ( 2020 ) refined the mathematical aspect and showed that the SGD ’ s noise structure exponentially enhances escaping under a setup of diffusion theory . In this paper , we introduce a quasi-potential theory to the escape problem , and investigate a mean exit time , which formally quantifies escaping . The notion of quasi-potential is defined in a fundamental theory of stochastic dynamical systems , named a Large Deviation Theory ( Freidlin & Wentzell , 2012 ; Dembo & Zeitouni , 2010 ) . Quasi-potential can formulate the distribution of trajectories that a stochastic dynamical system takes . To illustrate quasi-potential for SGD ’ s escaping problem , we introduce an intuitive notion , steepness of a trajectory ( Fig . 1 and Definition 3 ) , and show that it is an effective tool to analyze the SGD ’ s escaping . To the best of our knowledge , this is the first work that applies the quasi-potential to formalize the relationship between SGD ’ s escape and sharpness . Our main findings and contributions are as follows : • We develop a novel quasi-potential theory that rigorously describes the escape of SGD with no auxiliary variables . Our theory can concisely incorporate the effect of essential factors , i.e. , a batch size ( B ) , a learning rate ( η ) , and geometric parameters of loss surfaces ( r and λ ) • Our theory can be flexibly applied to several practical setups : SGD with discrete update and state-dependent gradient noise , while those were sometimes omitted in previous works for mathematical convenience . • We find that a loss surface with sharp minima slows down the escape of SGD , which seems to contradict the common knowledge , i.e. , SGD escapes efficiently from sharp minima . We show that our result does not contradict the common knowledge but is a generalization of existing results , such as ( Jastrzębski et al. , 2017 ) and ( Xie et al. , 2020 ) . 1.1 COMPARISON WITH EXISTING STUDIES ON ESCAPE PROBLEM . In Table 1 , we compare the escape time derived with the results of other studies that analyze the escape problem . There are two main points of focus . The first is the time to escape that we derive . Our theory provides a unified analysis of exit time incorporating all the essential parameters , batch size , learning rate , a radius of the region around a minimum , and sharpness of a minimum . As a consequence , we show that the eigenvalues of the Hesse matrix increase the time to escape , which has not been found in other studies . Such effect was less apparent in previous studies such as ( Jastrzębski et al. , 2017 ) and ( Xie et al. , 2020 ) because part of the sharpness dependency is hidden in ∆L . Provided that ∆L = r2λ under Assumption 1 , one can see that our results are consistent with previous studies . The second is our theory ’ s flexibility . Different from Jastrzębski et al . ( 2017 ) and Xie et al . ( 2020 ) , our theory does not require that SGD reaches the stationary distribution before escaping , which is known to take exponentially many iterations ( Xu et al. , 2017 ; Raginsky et al. , 2017 ) . Additionally , our theory can evaluate the correspondence with the practical SGD , which has a discrete update rule and state-dependent noise . Notations : For a k × k matrix A , λj ( A ) is the j-th largest eigenvalue of A , and λmax ( A ) = λ1 ( A ) and λmin ( A ) = λk ( A ) denote the largest and the smallest eigenvalue of a square matrix . O ( · ) denotes Landau ’ s Big-O notation . ‖·‖ denotes the Euclidean norm . Given a time-dependent function θt , θ̇t denotes the differentiation of θt with respect to t. N ( µ , Σ ) denotes the multivariate Gaussian distribution with the mean µ , and the covariance Σ . 2 SETTING AND PROBLEM . 2.1 STOCHASTIC GRADIENT DESCENT AND DYNAMICAL SYSTEM . Consider a learning model parameterized by θ ∈ Rd . Given training examples { xi } Ni=1 and a loss function ℓ ( θ , xi ) , we consider a training loss L ( θ ) : = 1N ∑N i=1 ℓ ( θ , xi ) and a mini-batch loss LB ( θ ) : = 1B ∑ xi∈B ℓ ( θ , xi ) , where B is a randomly sampled subset of the training data such that |B| = B . We assume that L ( θ ) is differentiable and its derivative ∇L ( θ ) is Lipschitz continuous . We mainly consider two types of SGD : a discrete SGD and a continuous SGD . Although a discrete SGD is used in practice , we study continuous SGD as a starting point of our analysis because of its mathematical convenience . This is a widely used approach in general SGD analyses ( Ali et al. , 2019 ; Advani et al. , 2020 ) as well as in the escaping analyses ( Jastrzębski et al. , 2017 ; Xie et al. , 2020 ) . Discrete SGD : First , we give the usual discrete formulation of SGD . Given an initial parameter θ0 ∈ Rd , SGD generates a sequence of parameters { θk } k∈N by the following update rule : θk+1 = θk − η∇LB ( θk ) , ( 1 ) for k ∈ N , where η > 0 is a learning rate . In particular , we focus on SGD whose noise on gradients has a Gaussian distribution . We decompose −∇LB ( θk ) in ( 1 ) into a gradient term −∇L ( θk ) and a noise term ∇L ( θk ) −∇LB ( θk ) , and consider a case that the noise is Gaussian . With this setting , the update rule in ( 1 ) is rewritten as θk+1 = θk − η∇L ( θk ) + √ η B Wk , ( 2 ) where Wk ∼ N ( 0 , ηC ( θk ) ) is a parameter-dependent Gaussian noise with its covariance C ( θ ) : = Ei∼Uni ( { 1 , ... , N } ) [ ( ∇L ( θ ) −∇ℓ ( θ , xi ) ) ⊤ ( ∇L ( θ ) −∇ℓ ( θ , xi ) ) ] .We assume that C ( θ ) is Lipschitz continuous . The Gaussianity of the noise on gradients is justified by the following reasons : ( i ) if the batch sizeB is sufficiently large , the central limit theorem ensures the noise term becomes Gaussian noise , and ( ii ) several empirical studies show that the noise term becomes Gaussian noise ( Mandt et al. , 2016 ; Jastrzębski et al. , 2017 ; He et al. , 2019a ) , although different findings have been obtained in other settings ( Simsekli et al. , 2019 ) . Continuous SGD : We also give a continuous SGD , which is exactly discretized to ( 2 ) by a classic Euler scheme ( Definition 5.1.1 of Gobet ( 2016 ) ) . With a time index t ≥ 0 and the given initial parameter θ0 ∈ Rd , the continuous dynamic of SGD is written as follows : θ̇t = −∇L ( θt ) + √ η B C ( θt ) 1/2 wt ( 3 ) where wt is a d-dimensional Wiener process , i.e . an Rd-valued stochastic process with t such that w0 = 0 and wt+u−wt ∼ N ( 0 , uI ) for any t , u > 0 . We note this system can be seen as a Gaussian perturbed dynamical system with a noise magnitude √ η B because η and B do not evolve by time . | This paper uses the quasi potential theory to formalize the escape behavior of SGD happening while training a deep neural network. The quasi potential is defined based on the steepness of a trajectory and is the smallest steepness to go from the minimizer to another point. Utilizing this they analyze both continuous and discrete SGD and show that the average exit time for a trajectory of SGD to move out of the neighborhood of minima depends exponentially on the mini-batch size, the sharpness of the minima, the radius of the neighborhood, and the inverse of learning rate. | SP:49228d3db309a75dcfb9973e0ee4795e75f49a3f |
AQUILA: Communication Efficient Federated Learning with Adaptive Quantization of Lazily-Aggregated Gradients | 1 INTRODUCTION . With the deployment of ubiquitous sensing and computing devices , the Internet of things ( IoT ) as well as many other distributed systems have gradually grown from concept to reality , bringing dramatic convenience to people ’ s daily life ( Du et al. , 2020 ; Liu et al. , 2020a ; Hard et al. , 2018 ) . To fully utilize such distributed computing resources , distributed learning provides a promising framework that can achieve comparable performance with the traditional centralized learning scheme . However , the privacy and security of sensitive data during the updating and transmitting processes in distributed learning have been a growing concern . In this context , federated learning ( FL ) ( McMahan et al. , 2017 ; Yang et al. , 2019 ) has been developed , enabling distributed devices to collaboratively learn a global model without privacy leakage by keeping private data sets isolated and masking transmitted information with secure approaches like differential privacy ( Abadi et al. , 2016 ) , secret sharing techniques ( Bonawitz et al. , 2017 ) and homomorphic encryption ( Liu et al. , 2020b ) . Due to its privacy and security preserving property and great potentials in some distributed but privacysensitive fields like finance and health , FL has attracted tremendous attentions from both academia and industry in recent years . Unfortunately , in many FL applications like image classification and objective recognition , the models to be trained tend to be high-dimensional , which lead to heavy communication overheads , for example , a Resnet-152 network has over 58 million parameters ( He et al. , 2016 ) . Hence , communication efficiency has become one of the key bottlenecks of FL . To this end , recent researches have tried to reduce the communication frequency , for example , Sun et al . ( 2020 ) proposes the lazily-aggregated quantization ( LAQ ) method to reduce communication rounds by skipping some unnecessary parameter uploads . To further reduce transmitted bits per communication , LAQ can be used jointly with gradient compression techniques , e.g . quantization and sparsification ( Strom , 2015 ; Wangni et al. , 2018 ; Lin et al. , 2018 ; Han et al. , 2020 ) . Moreover , Mao et al . ( 2021 ) develops the Adaptive Quantized Gradient ( AQG ) for LAQ to adjust the quantization bit among multiple given levels during training . However , the AQG is not sufficiently adaptive , for example , in the two-level AQG with 4 bit and 2 bit , the situation of 3 bit and 1 bit is not covered at all . In a separate line of work , Jhunjhunwala et al . ( 2021 ) develops an adaptive quantization rule ( AdaQuantFL ) for FL which can search in a given range for an optimal quantization level and achieve a better error-communication tradeoff . Previous work has investigated how to optimize communication frequency or adjust quantization levels in a highly adaptive fashion , but not both . Intuitively , we ask the question , can we adaptively adjust the quantization level in LAQ to further reduce communication rounds and transmitted bits simultaneously ? A straightforward approach is to train LAQ jointly with state-of-the-art adaptive quantization methods like AdaQuantFL . However , quantization level and communication frequency are mutually dependent in establishing the model convergence and must be adjusted together . For example , lazy aggregation leads to the skip of some gradients that no longer require quantization , while the choice of quantization levels directly affects the quality of a gradient update and thus whether it is selected for transmission and aggregation . Therefore , the key question of our work is how to jointly leverage these two complementary yet mutually-dependent degrees of freedom for further optimizing communication efficiency in FL . The key idea of this paper is to select the optimal quantization bits for each communication round in LAQ by optimizing the gradient loss caused by skipping quantized updates , which gives a novel quantization criterion that can cooperate with LAQ strategy to further reduce overall transmitted bits while maintaining the desired convergence properties of LAQ . The contributions of this paper are trifold and summarized as follows . 1 ) We propose a FL framework with adaptive quantization of lazily-aggregated gradients termed AQUILA , which simultaneously adjusts the communication frequency and quantization level in a synergistic fashion . 2 ) We formulate AQUILA as an optimization problem and develop an upperbound for the gradient loss caused by communication skipping , which gives a novel adaptive quantization criterion which is theoretically proven to be more efficient compared to AdaQuantFL while maintaining the same convergence properties . 3 ) We experimentally evaluate the performance of AQUILA in a number of non-homogeneous FL settings , including Non-IID data distribution and various heterogeneous model architecture . The experimental results show that AQUILA can significantly mitigate the communication overhead over a number of baselines including fixed-bit LAQ and the naive combination of LAQ and AdaQuantFL . Our approach is highly adaptive and compatible to existing FL settings . 2 BACKGROUND AND RELATED WORK . Consider a FL system with one central server and a clients set M of M distributed clients to collaboratively train a global model parameterized by θ∗ . At iteration k , each client m ∈ M first trains the global model θk on its local data Dkm , and sends the local gradient g k m = ∇fm ( Dkm ; θ k ) to the central server . Then the server aggregates the parameters and updates the global parameter by : θk+1 = θk − α M ∑ m∈M gkm . ( 1 ) To reduce communication overheads with gradient quantization , the stochastic uniform quantizer ( Alistarh et al. , 2017 ) is usually adopted . For any local gradient g ∈ Rd , the quantized value of its i-th dimension with quantization level b is defined as : Qb ( gi ) = ∥g∥2 · sign ( gi ) · ξi ( g , b ) , ( 2 ) where ξi ( g , b ) is a random variable defined as follows . Let l ∈ { 0 , 1 , 2 , ... , b−1 } be an integer satisfying |gi| /∥g∥2 ∈ [ l/b , ( l + 1 ) /b ) , then : ξi ( g , b ) = { ( ℓ+ 1 ) /b with probability ( b · ∥gi∥ ) /∥g∥2 − l ℓ/b otherwise . ( 3 ) It is clear that with quantization level b , the number of bits for transmitting a quantized gradient from a client to the central server is Cb = d ⌈log2 ( b+ 1 ) ⌉+ d+ 32 , with 32 bits for ∥g∥2 , 1 bit for each sign ( gi ) , and log2 ( b+ 1 ) bits for each ξi ( g , b ) . For communication rounds reduction , the LAQ proposes to let the client m ∈ M upload its newlyquantized local gradient Qb ( gkm ) at iteration k only when the change in local gradient is sufficiently large , i.e. , ∥∥∥Qb ( gkm ) −Qb ( ĝk−1m ) ∥∥∥2 2 ≥ ∑D d=1 ξd ∥∥∥θk+1−d − θk−d∥∥∥2 2 α2M2 + 3 ( ∥εb ( ĝk−1m ) ∥22 + ∥∥εb ( gkm ) ∥∥22 ) , ( 4 ) where Qb ( ĝ k−1 m ) is the last quantized upload from client m , εb ( ĝ k−1 m ) and εb ( g k m ) denote quantization errors , and { ξd } Dd=1 are some predetermined constant weights . Notice here a fixed quantization level b is used . In LAQ , if the difference between client m ’ s newly-quantized local gradient Qb ( gkm ) and the last upload is smaller than a threshold involving quantization errors and global model ’ s innovation , client m will skip the upload of Qb ( gkm ) at iteration k and the central server will reuses Qb ( ĝ k−1 m ) for such lazy aggregation : θ̂ k+1 = θk − α M ∑ m∈M Qb ( ĝ k m ) = θ k − α M ∑ m∈M\Mk0 Qb ( g k m ) − α M ∑ m∈Mk0 Qb ( ĝ k−1 m ) , ( 5 ) where Mk0 denotes the subset of clients that skip the new gradient update and reuse the old quantized gradient at iteration k. Besides , ĝkm represents the actual gradient for aggregation from client m , which is gkm for m ∈ M \Mk0 , while ĝ k−1 m for m ∈ Mk0 . Recently , AdaQuantFL is proposed to achieve a better error-communication tradeoff by adaptively adjusting the quantization levels during FL training ( Jhunjhunwala et al. , 2021 ) . Specifically , AdaQuantFL computes iteration k ’ s optimal quantization level b∗k based on the following criterion involving training loss and initial quantization level b0 : b∗k = √ f ( θ0 ) /f ( θk ) · b0 , ( 6 ) where f ( θ0 ) and f ( θk ) are the global training loss at iteration 0 and k , respectively . However , AdaQuantFL transmits quantized gradients at every iteration . In order to skip unnecessary communication rounds and adaptively adjust quantization level for each communication jointly , an naive approach is to quantize lazily aggregated gradients with AdaQuantFL . Nevertheless , it fails to achieve efficient communication due to a number of reasons . Firstly , given the descending trend of training loss , AdaQuantFL ’ s criterion ( 6 ) may lead to high quantization bit number even exceeding 32 late in the training process , which is too much for cases where the global convergence is already approaching . Secondly , higher quantization level results in smaller quantization error , which will lead to lower communication threshold in LAQ ’ s criterion ( 4 ) and thus higher frequency of transmission . Therefore it is desirable to develop more efficient adaptive quantization method in the lazily-aggregated setting to systematically improve communication efficiency in FL . 3 METHOD . 3.1 ADAPTIVE QUANTIZATION OF LAZILY-AGGREGATED GRADIENTS ( AQUILA ) . Given the above limitations of the naive joint use of existing adaptive quantization criterion and lazy aggregation strategy , this paper aims to design a unifying framework for communication efficiency optimization where the quantization level and communication frequency are adjusted in a synergistic and interactive way . Based on a careful investigation on LAQ , we design a novel quantization criterion where the optimal quantization level is selected by minimizing the expected gradient loss caused by skipping quantized updates . The rationale behind such strategy is , by formulating the adaptive quantization problem of lazily-aggregated gradients as optimizing the expected gradient loss with respect to the number of quantization bits , we can get an adaptive quantization criterion based on local gradient updates while maintaining or even improving the convergence property of LAQ . To get the optimization target , we first derive an upperbound for the expected gradient loss in terms of quantization bits as elaborated in Section 3.2 , which gives a novel adaptive quantization criterion ( 7 ) that selects the quantization level for client m at iteration k based on initial quantization level b0 and the change between client m ’ s newly computed gradient gkm and the last uploaded gradient ĝk−1m : ( bkm ) ∗ = b0 · √∥∥g1m − ĝ0m∥∥22/∥∥gkm − ĝk−1m ∥∥22 . ( 7 ) The superiority of ( 7 ) comes from the following two aspects . Firstly , the gradient updates tend to fluctuate along with the training process instead of keeping descending like the loss value , and thus prevent the quantization level from increasing tremendously compared with the initial level . Secondly , with lazy aggregation criterion based on gradient updates like ( 4 ) , the transmitted bits in AQUILA is further controlled , since the gradient update for actual transmission in ( 7 ) is lower bounded by the lazy aggregation criterion , and therefore high-bit transmission for small update is more likely to be skipped . To better fit the larger quantization errors induced by fewer quantization bits in ( 7 ) , we modify the communication criterion as follows to avoid the potential expansion of clients group to be skipped : ∥∥∥Qbkm ( gkm ) −Qb̂k−1m ( ĝk−1m ) ∥∥∥22≥ ∑D d=1ξd ∥∥∥θk+1−d−θk−d∥∥∥2 2 α2M2 +2 ∥∥∥εbkm ( gkm ) −εb̂k−1m ( ĝk−1m ) ∥∥∥22 , ( 8 ) where all the notations are the same as in ( 4 ) except the heterogeneous quantization level bkm and b̂k−1m for each client . For detailed development of ( 8 ) , please refer to the Appendix . The cooperation of the novel adaptive quantization criterion ( 7 ) and the modified lazy aggregation strategy ( 8 ) is illustrated in Fig . 1a . Compared to the naive combination of AdaQuantFL and LAQ where the mutual influence between adaptive quantization and lazy aggregation has not been considered as shown in Fig . 1b , our AQUILA framework adaptively optimizes the allocation of quantization bits throughout training to promote the convergence of lazy aggregation , and at the same time utilizes the lazy aggregation strategy to improve the efficiency of adaptive quantization by skipping high-bit transmission . The proposed AQUILA ’ s effect of suppressing the transmission of high quantization bits has been verified in our experiments , as shown in Fig . 20 in the Appendix . Besides , with the adjusted lazy aggregation strategy ( 8 ) , AQUILA well addresses the problem of high communication frequency in the late training process of naive combination of AdaQuantFL and LAQ , as indicated by Fig . 2 . The proposed AQUILA is summarized as follows in Algorithm 1 . At iteration k = 0 , all clients are forced to transmit local gradients quantized with the initial level b0 . At iteration k ∈ { 1 , 2 , ... , K } , the server first broadcasts the global model θk to all clients . Each client m computes gkm with local training data , and then uses it to select an optimal quantization level by ( 7 ) . Then , each client computes its gradient update after quantization and determines whether to upload the update or not based on the communication criterion ( 8 ) . Finally , the server updates the new global model θk+1 with up-to-date quantized gradients Qbkm ( g k m ) for those clients who send the uploads at iteration k , while reusing the old quantized gradients Qb̂k−1m ( ĝ k−1 m ) for those who skip the uploads . Algorithm 1 Communication Efficient FL with AQUILA Input : the number of communication rounds K , the learning rate α , the maximum communication level bmax Initialize : the initial global model parameter θ0 and the initial quantization level b0 . 1 : Server broadcasts θ0 to all clients . 2 : for each client m ∈ M in parallel do 3 : Calculates local gradient g0m and sends the quantized gradient Qb0 ( g 0 m ) . 4 : Set ĝ0m = g 0 m and b̂ 0 m = b0 on both sides . 5 : end for 6 : for k = 1 , 2 , ... , K do 7 : Server broadcasts θk to all clients . 8 : for each client m ∈ M in parallel do 9 : Calculates local gradient gkm . 10 : Computes the optimal local quantization level bkm by ( 7 ) . 11 : if bkm ≥ bmax then 12 : bkm = bmax . 13 : end if 14 : if ( 8 ) holds for client m then 15 : Client m computes and sends the quantized gradient Qbkm ( g k m ) . 16 : Set ĝkm = g k m and b̂ k m = b k m on both sides . 17 : else 18 : Client m sends nothing . 19 : Set ĝkm = ĝ k−1 m and b̂ k m = b̂ k−1 m on both sides . 20 : end if 21 : end for 22 : Server updates θk+1 by θk − α ∑M m=1 Qb̂km ( ĝkm ) . 23 : end for | The paper proposes combining two orthogonal algorithms -- the lazily aggregated gradient(LAQ)method and adaptive quantization (AdaQuantFL)-- to reduce communication complexity in federated learning. In particular, while LAQ focuses on the frequency of gradient updates in each iteration, AdaQuantFL focuses on the adaptive allocation of bits across iterations. This paper proposes to combine both of these approaches for better communication complexity in federated learning. At the heart of the combining strategy is Eq. 7, which allocates the bits used in each iteration. This equation is intern based on minimizing the upper bound on the expected deviation in the path of the iterate due to gradient skipping. The authors theoretically show that such a bit allocation strategy leads to reduced communication compared to the bit allocation strategy of AdaQuantFl. | SP:64968c4bea37e7f03d94c474aef30bd767312015 |
When Complexity Is Good: Do We Need Recurrent Deep Learning For Time Series Outlier Detection? | 1 INTRODUCTION . Outlier detection is the process of identifying unusual data points , or collections of data points within a dataset . Within different contexts , these outliers can take various forms , for example : • Credit card fraud detection : Unusual spending . • Internet traffic monitoring : Unusual surges in traffic or security monitoring . • Dementia care : Unusual patterns of activity , unusual sleep/wake patterns at night . This paper will focus specifically on time series outliers . These are outliers that appear in sequential data , which Blázquez-Garcı́a et al . ( 2021 ) argued could take three main forms : • Point outliers : These are single data points in time that are unusual from the rest of the dataset when considering other values in the time series or points locally . Point outliers could have global unusual values , or contextually ( in our case , temporally ) unusual values . • Subsequence/Collective outliers : These are consecutive points whose behaviour as a collective is unusual , but not necessarily if considered separately . • Outlier time series : These are instances in which an entire time series ( for example , a variable in a multivariate dataset ) can be considered unusual . In this paper , we focus on point and subsequence outliers and discuss when and how recurrent deep learning techniques could be used for this type of outliers compared to non-recurrent techniques . This involves testing several algorithms on multiple datasets containing different outlier types . We also introduce two new outlier detection methods by modifying the Long Short Term Memory Recurrent Neural Network ( LSTM-RNN ) ( Hochreiter & Schmidhuber , 1997 ) outlier detection technique presented in Bontemps et al . ( 2016 ) ; Singh ( 2017 ) . We change the underlying forecasting model and instead of an LSTM-RNN , we train a transformer model ( Vaswani et al. , 2017 ) and similarly , use its prediction loss as the basis for the outlier score calculation . We also removed the focus on collective outliers ( as is in the LSTM-RNN outlier detection model ) , so that our model was applicable to both point and collective outliers . We continue this paper by introducing some of the preliminary concepts that will be required to design the outlier detection settings , as well as explaining the difference between recurrent and non-recurrent based outlier detection algorithms . Next , this paper discusses the related works and describes how our study extends the existing work . We introduce the methods and models that will be used to answer the questions of this paper , followed by the results and discussion on their significance . This paper ’ s aim is to answer the following question : “ When detecting outliers in time series data , is it appropriate to use recurrent neural networks and how do we design models for this purpose ? ” Our motivation for answering this question is to enable a better understanding of which outlier detection techniques would be most usefully applied to our healthcare monitoring ” real-world ” time series dataset , containing movement information collected form the homes of people living with dementia ( more information on Section 2.1 ) . We also wish to understand how useful recurrent based algorithms are when points in the dataset contain complex temporal relationships with each other . For example , we wish to find outliers that are not only locally and globally unusual in their values , but where they are also unusual given some sequence that they exist in . 1.1 PRELIMINARY CONCEPTS . WHAT IS A RECURRENT NEURAL NETWORK ? Within this paper , we will refer to two different types of outlier detection methods . Those that use non-recurrent techniques and those that rely on recurrent deep learning models . Recurrent neural network approaches are characterised by their use of sequences in the time series data to detect outliers . Classical non-recurrent algorithms assume no temporal relationship between data points and calculate outlier scores on a point-by-point basis , whilst recurrent neural network algorithms use temporal relationships when detecting outliers . In theory , this difference should make recurrent neural network models superior to non-recurrent models when detecting outliers in complicated time series data . This is not necessarily the case however , since many outliers will hold unusual enough values such that they can be detected by non-recurrent techniques . In addition , extra capacity for learning complicated relationships in the data brings larger numbers of hyperparameters to tune , which can cause difficulty in training robust models . This hyper-parameter tuning becomes an issue when applying complex techniques to new datasets for which there is no outlier ground truth to measure model performance . OUTLIERS IN A DATASET As discussed in Section 1 , outliers take three main forms when viewed in the context of time series data . The number of outliers in a dataset is defined as a proportion of the whole dataset and is called the contamination . To contaminate a dataset is to add outliers to that dataset . When measuring the performance of outlier detection techniques , we will use a harmonic mean of precision and recall , defined as the F1 score ( see Appendix A.1 ) . 1.2 RELATED WORK . There has been a long history of developing outlier detection methods and exploring different algorithms for time series outlier detection ( Lai et al. , 2021b ; Blázquez-Garcı́a et al. , 2021 ) . The existing works propose various methods to identify different types of outliers that are present in time series datasets . Lai et al . ( 2021b ) show comparisons between different algorithms for outlier detection and evaluate their performance on both synthetic and real-world datasets . However , Lai et al . ( 2021b ) do not directly compare recurrent and non-recurrent based outlier detection algorithms . Elsayed et al . ( 2021 ) aimed to address a similar question in relation to time series forecasting , in which they argued that a carefully configured Gradient Boosted Regression Trees ( GBRT ) model ( Friedman , 2001 ) could compete and even sometimes out-perform many complex deep learning models for time series forecasting . Pang et al . ( 2021 ) studied the role of deep learning in outlier detection , in which they acknowledge that complex models would be useful for complex anomalies ( those with complicated spatial or temporal dependencies ) , although it is not as widely explored as evaluating the performance of complex models for detecting point anomalies . Both of these studies , however , do not directly compare recurrent and non-recurrent based algorithms . We aim to extend the scope of Lai et al . ( 2021b ) ’ s work by specifically investigating whether recurrent neural networks are useful for outlier detection compared to non-recurrent methods . An answer to this question would guide us in our search for a reliable outlier detection method for application on our remote monitoring time series dataset , related to dementia care ( described in Section 2.1 ) . We are aware that our dataset will contain complex temporal relationships between data points and we wish for an outlier detection algorithm to be proficient at finding all of these types of outliers . 2 METHODS AND MODELS . In this section , we discuss different datasets used in our experiments and describe how the datasets are generated or collected . Next , we discuss which existing recurrent and non-recurrent outlier detection models we have chosen . We also introduce two new outlier detection methods that rely on transformer models ( Vaswani et al. , 2017 ) . 2.1 DATASET . To evaluate the models , we have used the TODS python package 1 and benchmarks ( Lai et al. , 2021a ) , which contain several synthetic and real-world datasets for time series outlier detection . The synthetic datasets were generated using sinusoidal waves with various frequencies and amplitudes . These datasets are multivariate and always consist of 5 variables . Contamination functions are used to contaminate this dataset with 5 different objectives as outlined in Lai et al . ( 2021b ) . These contamination objectives are aimed at producing point outliers or collective outliers . We test the algorithms in this paper on 15 different datasets , with different combinations of types of contamination . A more thorough explanation of the way that these datasets are generated is given in Lai et al . ( 2021b ) . The TODS package also readily makes available two real-world datasets ( see Appendix A.2.1 for more information ) , labelled with outliers relating to the context . Those two datasets are : • SWAN-SF : SWAN-SF was collected by the Harvard Dataverse and contains space weather data ( Angryk et al. , 2020a ) . This dataset has a contamination factor of 23.8 % . • GECCO : This is a dataset collected by SPOTSeven Lab 2 for a data challenge in 2018 and contains water quality information . This dataset has a contamination factor of 1.2 % . These datasets were processed by Lai et al . ( 2021b ) before being made available for outlier detection . The code that processes the data is readily available in the TODS package ( see Section 6 for information on reproducibility ) . Alongside these datasets , we also tested different models on our dementia care dataset ( referred to in this paper as the Movement dataset ) . This data contains movement information , collected from over 140 people living with dementia in their real home settings for a period of over 2 years ( from February 2019 to June 2021 ) . Each feature in this dataset represents the number of times a sensor was triggered in a 3 hour period in a location of the home . To simplify this , we will think of the sensor triggers as a visit to a room containing the sensor . The dataset contains 5 of these locations , which represent the hallway , living room , bedroom , bathroom and kitchen . These 3 hour time windows were then concatenated to form points that cover 24 hour periods and contain 40 features . This means that each of these features represents a frequency of visits to a location in a particular 3 hour window . The outliers were labelled as points in the data in which the person living with dementia was admitted to hospital or had an infection . The labelling is done by a clinical 1https : //github.com/datamllab/tods/tree/benchmark 2https : //www.spotseven.de/ monitoring team who have been part of the study and interact with the participants based on the observations and measurements collected by the in-home monitoring technologies integrated into a clinical dashboard . Only the people living with dementia who had at least one labelled outlier , were included in the final dataset . The data was labelled as an outlier 4 days preceding and proceeding the infection and hospital admission episodes . Data points in which all of the feature values were 0 and there was no hospital admission or infection were then removed . This leaves the contamination factor of the dataset at 2.3 % . Graphs showing the distributions of values in the dataset can be viewed in Appendix A.2.2 . After applying the methods to the dataset , we split the data by each source ( a household containing a person living with dementia ) and tested the algorithms on each of these . We removed any sources in which there were less than 5 outliers labelled . We will refer to this dataset as the separated Movement data . The datasets chosen span a wide range of contamination values , allowing the algorithms to be evaluated over a range of scenarios . They also contain a mix of ratios of point outliers to collective outliers . See Appendix A.2 for more information . We assumed that all of the datasets either have point outliers or collective outliers . Point outliers are defined by a single outlier on its own , whilst collective outliers are defined by consecutive outlier points in a time window . | This paper studies time series outlier detection. The authors propose to compare recurrent and static outlier detection methodologies on multiple synthetic and real-world temporal datasets. Additionally, they present an extension to the LSTM outlier detection using an attention-based approach. The analysis suggests that non-recurrent methodologies should be prefered as they perform marginally better while requiring fewer parameters and training. Only in the context of complex temporal relations, recurrent approaches should be used. | SP:50baa34c330b54a80693307a90da72de6bccfa68 |
What classifiers know what they don't know? | 1 INTRODUCTION I don ’ t think I ’ ve ever seen anything quite like this before —HAL 9000 in 2001 : A Space Odyssey Deep image classifiers exceed at discriminating the set of in-domain classes observed during training . However , when confronting test examples from unseen out-domain classes , these classifiers can only predict in terms of known categories , leading to wrong and overly-confident decisions ( Hein et al. , 2019 ; Ulmer & Cinà , 2020 ) . In short , machine learning systems are unaware of their own limits , since “ they do not know what they do not know ” . Since out-domain data can not be safely identified and treated accordingly , it is reasonable to fear that , when deployed in-the-wild , the safety and performance of these classifiers crumbles by leaps and bounds ( Ovadia et al. , 2019 ) . The inability of machine learning systems to estimate their uncertainty and abstaining to classify outdomain classes roadblocks their use in critical applications . These include self-driving ( Michelmore et al. , 2018 ) , medicine ( Begoli et al. , 2019 ) , and the analysis of satellite imagery ( Wadoux , 2019 ) . Good uncertainty estimates are also a key ingredient in anomaly detection ( Chalapathy & Chawla , 2019 ) , active learning ( Settles , 2009 ) , safe reinforcement learning ( Henaff et al. , 2019 ) , defending against adversarial examples ( Goodfellow et al. , 2014 ) , and model interpretability ( Alvarez-Melis & Jaakkola , 2017 ) . For an extensive literature review on uncertainty estimation and its applications , we refer the curious reader to the surveys of Abdar et al . ( 2020 ) and Ruff et al . ( 2021 ) . Despite a research effort spanning multiple decades , machine learning systems still lack trustworthy estimates of their predictive uncertainty . In our view , one hindrance to this research program is the absence of realistic benchmarking and evaluation protocols . More specifically , prior attempts are limited in two fundamental ways . First , these experiment on small datasets such as SVHN and CIFAR-10 ( van Amersfoort et al. , 2021 ) . Second , these do not provide a challenging set of out-domain data . Instead , they construct out-domain classes by using a second dataset ( e.g. , using MNIST in-domain versus FashionMNIST out-domain , cf . Van Amersfoort et al . ( 2020 ) ) or by perturbing the in-domain classes using handcrafted transformations ( such as Gaussian noise or blur , see ImageNet-C Hendrycks & Dietterich ( 2019 ) ) . Both approaches result in simplistic benchmarking , and little is learned about uncertainty estimation for the real world . One exception is the ImageNet-O dataset ( Hendrycks et al. , 2021 ) , where out-domain data is selected from ImageNet-22k classes not contained in ImageNet1k . However , the images in ImageNet-O are collected adversarially as to maximize the prediction confidence of ResNet50 ImageNet-1k classifiers , creating what ’ s possibly an unnecessarily difficult benchmark . The purpose of this work is to introduce an end-to-end benchmark and evaluation protocol as realistic as possible . At the time of writing , UIMNET is the most exhaustive benchmark for uncertainty estimation in the literature . Formal setup We learn classifiers f using in-domain data from some distribution Pin ( X , Y ) . After training , we endow the classifier with a real-valued uncertainty measure u ( f , x† ) . Given a test example ( x† , y† ) ⇠ P with unobserved label y† , we declare x† in-domain ( hypothesizing P = Pin ) if u ( f , x† ) is small , whereas we declare x† out-domain ( hypothesizing P 6= Pin ) if u ( f , x† ) is large . Using these tools , our goal is to abstain from classifying out-domain test examples , and to classify with calibrated probabilities in-domain test examples . The sequel assumes that the difference between in- and out-domain resides in that the two groups of data concern disjoint classes . Contributions We introduce UIMNET , a test-bed for large-scale , realistic evaluation of uncertainty estimates in deep image classifiers . We build UIMNET as follows ( see also Table 1 ) . ( Sec . 2 ) We construct ImageNot , a perceptual partition of ImageNet into in-domain and outdomain classes . Unlike most prior work focusing on small datasets like SVHN and CIFAR-10 , ImageNot provides a benchmark for uncertainty estimators at a much larger scale . Moreover , both in-domain and out-domain categories in ImageNot originate from the original ImageNet dataset . This provides realistic out-domain data , as opposed to prior work relying on a second dataset ( e.g. , MNIST as in-domain versus SVHN as out-domain ) , or handcrafted perturbations of in-domain classes ( Gaussian noise or blur as out-domain ) . ( Sec . 3 ) We re-implement eight state-of-the-art algorithms from scratch , listed in Table 1 . This allows a fair comparison under the exact same experimental conditions ( training/validation splits , hyper-parameter search , neural network architectures and random initializations ) . Furthermore , we also study ensembles of multiple training instances for each algorithm . ( Sec . 4 ) Each algorithm can be endowed with one out of six possible uncertainty measures , allowing an exhaustive study of what algorithms play well with what measures . Listed in Table 1 , these are the largest softmax score , the gap between the two largest softmax scores , the softmax entropy , the norm of the Jacobian , a per-class Gaussian density model , and ( for those available ) an algorithm-specific measure . ( Sec . 5 ) For each classifier-measure pair , we study four in-domain metrics ( top-1 and top-5 classification accuracy , log-likelihood , expected calibration error ) and three out-domain metrics ( the AUC at classifying in-domain versus out-domain samples using the selected uncertainty measure , as well as the confusion matrix at a fixed uncertainty threshold computed over an in-domain validation set ) . ( Sec . 6 ) We explore three popular ablations to understand the impact of model calibration by temperature scaling , model size , and the use of spectral normalization . ( Sec . 7 ) UIMNET is entirely hands-off , since the pipeline from zero to LATEX tables is fully automated : this includes hyper-parameter search , model calibration , model ensembling , and the production of all the tables included in our experimental results . ( Sec . 8 ) Our experimental results reveal that , in order to obtain the best possible uncertainty estimates in large-scale image classification , the practitioner should favor large , calibrated models . We recommend the use of single ERM models , single MIMO models , or ensembles of ERM models , in order of increasing performance and required computational budget . UIMNET is open sourced at https : //github.com/ANONYMOUS . All of the tables presented in this paper are reproducible by running the main script in the repository at commit 0xANON . 2 CONSTRUCTING THE IMAGENOT BENCHMARK . The ImageNet dataset ( Russakovsky et al. , 2015 ) is a gold standard to conduct research in computer vision pertaining image data of 1000 different classes . Here we use the ImageNet dataset to derive ImageNot , a large-scale and realistic benchmark for uncertainty estimation . ImageNot partitions the 1000 classes of the original ImageNet dataset into in-domain classes ( used to train and evaluate algorithms in-distribution ) and out-domain classes ( used to evaluate algorithms out-of-distribution ) . To partition ImageNet into in-domain and out-domain , we featurize the entire dataset to understand the perceptual similarity between classes . To this end , we use a pre-trained ResNet-18 ( He et al. , 2016 ) to compute the average last-layer representation for each of the classes . Next , we use agglomerative hierarchical clustering Ward Jr ( 1963 ) to construct a tree describing the perceptual similarities between the 1000 average feature vectors . Such perceptual tree has 1000 leafs , each of them being a cluster containing one of the classes . During each step of the iterative agglomerative clustering algorithm the two closest clusters are merged , where the distance between two clusters is computed using the criterion of Ward Jr ( 1963 ) . The algorithm halts when there are only two clusters left to merge , forming the root node of the tree . At this point , we declare the 266 classes to the left of the root as in-domain , and the first 266 classes to the right of the root as out-domain . In the sequel , we call “ training set ” and “ validation set ” to a 90/10 random split from the original ImageNet “ train ” set . We call “ testing set ” to the original ImageNet “ val ” split . The exact in-/out-domain class partition as well as the considered train/validation splits are specified in Appendix D. Our agglomerative clustering procedure ended-up congregating different types of objects as in-domain classes , while grouping animals as out-domain classes . While inspired by the BREEDS ImageNet splits ( Santurkar et al. , 2020 ) , our benchmark ImageNot is conceived to tackle a different problem . The aim of the BREEDS dataset is to classify ImageNet into a small number of super-classes , each of them containing a number of perceptually-similar sub-classes . The BREEDS training and testing distributions differ on the sub-class proportions contributing to their super-classes . Since the BREEDS task is to classify super-classes , the set of labels remains constant from training to testing conditions . This is in contrast to ImageNot , where the algorithm observes only in-domain classes during training , but both in-domain and out-domain classes during evaluation . While BREEDS studies the important problem of domain generalization ( Gulrajani & Lopez-Paz , 2020 ) , where there is always a right prediction to make within the in-domain classes during evaluation , here we focus on measuring uncertainty and abstaining from predicting about those out-domain classes unavailable during training . ImageNot is also similar to the ImageNet-O dataset of ( Hendrycks et al. , 2021 ) . However , their outdomain images are collected adversarially , that is , to maximize the prediction confidence of ResNet50 classifiers . We believe that this drastic change in selection bias from ImageNet to ImageNet-O may result in an unnecessarily difficult uncertainty estimation benchmark . Thus , here we favor using only the original ImageNet data , as described above . In contrast , the starting point for both in-domain and out-domain classes of our ImageNot is the ImageNet dataset , and thus should maximally overlap in terms of image statistics , leading to a challenging and realistic benchmark . 3 ALGORITHMS . We benchmark ten supervised learning algorithms commonly applied to tasks involving uncertainty estimation . Each algorithm consumes one in-domain training set of image-label pairs { ( xi , yi ) } ni=1 and returns a predictor f ( x ) = w ( ( x ) ) , composed by a featurizer : R3⇥224⇥224 ! Rk and a classifier w : Rk ! RC . We consider predictors implemented using deep convolutional neural networks ( LeCun et al. , 2015 ) . Given an input image x† , all predictors return a softmax vector f ( x† ) = ( f ( x† ) c ) Cc=1 over C classes . The considered algorithms are : • Empirical Risk Minimization , or ERM ( Vapnik , 1992 ) , or vanilla training . • Mixup ( Zhang et al. , 2017 ) chooses a predictor minimizing the empirical risk on mixed examples ( · xi + ( 1 ) · xj , · yi + ( 1 ) · yj ) , where ⇠ Beta ( ↵ , ↵ ) , ↵ is a mixing parameter , and ( ( xi , yi ) , ( xj , yj ) ) is a random pair of training examples . Mixup improves generalization performance ( Zhang et al. , 2017 ) and calibration ( Thulasidasan et al. , 2019 ) . • Random Network Distillation , or RND ( Burda et al. , 2018 ) , finds an ERM predictor f ( x ) = w ( ( x ) ) , but simultaneously trains an auxiliary classifier wstudent to minimize kwstudent ( ( x ) ) wteacher ( ( x ) ) k22 , where wteacher is a fixed classifier with random weights . RND has shown good performance as a tool for exploration in reinforcement learning . • Orthogonal Certificates , or OC ( Tagasovska & Lopez-Paz , 2018 ) , is analogous to RND for wteacher ( ( x ) ) = ~0k for all x . That is , the goal of wstudent is to map all the in-domain training examples to zero in k different ways ( or certificates ) . To ensure diverse and non-trivial certificates , we regularize each weight matrix W of wstudent to be orthogonal by adding a regularization term kW > W Ik22 . OCs have shown good performance at the task of estimating uncertainty across a variety of classification tasks . • Autoencoder , or DeepAE ( Vincent et al. , 2010 ) , is analogous to RND for wteacher ( ( x ) ) = ( x ) and a wstudent with a bottleneck . • MC-Dropout ( Gal & Ghahramani , 2016 ) trains ERMs with one or more dropout layers ( Srivastava et al. , 2014 ) . These stochastic dropout layers remain active at test time , allowing the predictor to produce multiple softmax vectors { f ( x† , dropoutt ) } Tt=1 for each test example x† . Here , dropoutt is a random dropout mask sampled anew . MCDropout is one of the most popular baselines to estimate uncertainty . • MIMO ( Havasi et al. , 2021 ) is a variant of ERM over predictors accepting T images and producing T softmax vectors . For example , MIMO with T = 3 is trained to predict jointly the label vector ( yi , yj , yk ) using a predictor h ( xi , xj , xk ) , where ( ( xt , yt ) ) 3i=1 is a random triplet of training examples . Given a test point x† , we form predictions by replicating and averaging , that is f ( x† ) = 13 P3 t=1 h ( x † , x † , x † ) t. • Radial Basis Function , or RBF ( Broomhead & Lowe , 1988 ) , is a variant of ERM where we transform the logit vector z 7 ! e z2 before passing them to the final softmax layer . In such a way , as the logit norm kzk ! 1 , the predicted softmax vector tends to the maximum entropy solution ( 1C ) C c=1 , signaling high uncertainty far away from the training data . RBFs have been proposed as defense to adversarial examples ( Goodfellow et al. , 2014 ) , but they remain under-explored given the difficulties involved in their training . • Soft labeler ( Hinton et al. , 2015 ; Szegedy et al. , 2016 ) is a variant of ERM where the one-hot vector labels yi are smoothed such that every zero becomes ` min > 0 and the solitary one becomes ` max < 1 . Using soft labels , we can identify softmax vectors with entries exceeding ` max as “ over-shoots ” , and regard them as uncertain predictions . • DUE ( van Amersfoort et al. , 2021 ) enforces the smoothness of the featurizer using spectral normalization ( Miyato et al. , 2018 ) , implements the classifier w as a sparse Gaussian Process ( Quinonero-Candela & Rasmussen , 2005 ) , and trains the resulting predictor using variational inference ( Titsias , 2009 ) . Gaussian processes are considered one of the main tools to estimate predictive uncertainty in machine learning systems . Ensembles of predictors We also consider ensembles of predictors trained by each of the algorithms above . Ensembles are commonly regarded as the state-of-the-art in uncertainty estimation ( Lakshminarayanan et al. , 2016 ) . In particular , and for each algorithm , we construct bagging ensembles by ( i ) selecting the best K 2 { 1 , 5 } predictors { fk } Kk=1 from all considered random initializations and hyper-parameters , and ( ii ) returning the average function f ( x† ) : = 1K PM k=1 f k ( x† ) . | This paper proposes the UIMNET benchmark for uncertainty estimation. This benchmark includes (1) "ImageNot", a remix of ImageNet using hierarchical clustering of pairwise distances between features (2) framework for evaluating uncertainty estimation, including a suite of algorithms, metrics, and ablations studies. The authors report empirical results on their dataset using their suite, and make a number of recommendations based on these findings. Reproducible software is also provided. | SP:9d80245615b9fce3b978ffbdbafa6a33e9edee4a |
Generating Realistic 3D Molecules with an Equivariant Conditional Likelihood Model | 1 INTRODUCTION . Identifying molecules with desirable characteristics is of fundamental importance in many fields , including drug discovery . The astronomically large number of possible drug-like compounds , however , makes an exhaustive experimental or virtual screening intractable ( Polishchuk et al. , 2013 ) . As a result , a large body of work has used machine learning to explore chemical space and propose molecules with specific characteristics . Organic molecules can be represented as graphs in which nodes are individual atoms , and edges are covalent bonds through which atoms share electrons . Each node in a molecular graph is labelled with the atomic number of its corresponding atom , and edges are labelled with the number of electrons shared in that covalent bond . Because each atom has a predetermined number of electrons with which to form bonds , only a subset of the possible edge labels result in chemically valid molecules . The connectivity-based description of a molecule provided by molecular graphs is important for many applications , including chemical synthesis , virtual screening , and molecular dynamics simulation , and has thus motivated extensive research into generative models for molecular graphs ( Gómez-Bombarelli et al. , 2018 ; Maragakis et al. , 2020 ; Liu et al. , 2018 ; Shi et al. , 2020 ; Jin et al. , 2018 ; 2020 ) . The functional characteristics of a given molecule , however , arise not only from its connectivity , but from its configuration in 3D space . Physical limitations on the lengths and angles of covalent bonds among specific types of atoms impose constraints on the set of geometric configurations that are compatible with a given molecular graph . Because most organic molecules contain rotatable bonds , however , these constraints are generally not sufficient to unambiguously reconstruct the 3D coordinates of all atoms in the molecule . The probability of observing a particular 3D geometry for a given molecule is in general a function of the quantum mechanical energy of that geometry , with low-energy geometries being more likely . Graph-based generative models are capable of producing a wide range of molecules whose atoms have the correct number and type of bonds , but their outputs do not contain any geometric information , and may include molecular graphs for which stable 3D geometries ( i.e. , low-energy geometries with physically realistic inter-atomic distances and bond angles ) do not exist . Although it is possible that a model could learn to assess the geometric feasibility of a molecular graph without training on any geometric data , a model that is trained explicitly on 3D molecules would likely be better at generating molecular graphs with corresponding low-energy 3D geometries . The lack of geometric information is also problematic because many downstream applications require 3D information . For instance , many drug discovery efforts screen for molecules with high predicted affinity for a target protein pocket using a computational docking process to score molecule poses . It would be extremely valuable if a machine learning model could directly generate such molecules , as this would expedite the screening process . A model that is explicitly trained to recreate the geometric poses of bound molecules , rather than just molecular graphs , has the potential to produce molecules and geometries that are more conducive to binding . To address the above shortcomings , we created GEN3D—a graph-generative model that proposes molecules with 3D coordinates . The model is rotationally and translationally equivariant , providing an inductive bias that exploits the symmetries of chemical space . GEN3D creates molecular graphs through a sequential sampling process , like other graph-based generative models ( Shi et al. , 2020 ; Liu et al. , 2018 ) , but at each step GEN3D also calculates a likelihood function over positions in 3D space , and uses that function to sample coordinates for each new atom . We show that GEN3D generates novel , chemically valid molecular graphs that have realistic low-energy geometries . In particular , we found that our model outperforms existing graph generators in its ability to create chemically valid molecular graphs , and outperforms existing 3D-generative models in the ability to create realistic geometries . In Appendix E , we also show that our pre-trained model can be tuned to generate novel molecules in geometries that score well in a virtual screening tool , which illustrates the potential application of our method in drug discovery . Finally , we demonstrate the geometric accuracy of our model by using it to sample geometries for fixed molecular graphs , and show that it achieves state-of-the-art results on the previously established benchmark of Xu et al . ( 2021b ) . 2 RELATED WORK . Different models construct molecular graphs using Graph Neural Networks ( GNNs ) in a number of different ways . CGVAE , for example , uses a GNN to create VAE latent representations for each node in a molecular graph ( Liu et al. , 2018 ) . The nodes and edges of the graph are then reconstructed in a sequential decision process , guided by another GNN , in which atoms are connected one at a time to a growing molecular graph . Another model , GraphAF , also generates molecular graphs one atom at a time , but it samples molecules using a Gaussian Autoregressive Flow ( Shi et al. , 2020 ) . Other models , like JT-VAE ( Jin et al. , 2018 ) and HierVAE ( Jin et al. , 2020 ) , generate molecules by sequentially adding multi-atom motifs rather than individual atoms . Because of their importance in classification tasks on point clouds and 3D molecules , there has been a great deal of interest in machine learning problems involving 3D structured data . When working with such data , it is often desirable that models be invariant or equivariant to rotations or translations of the input data , as these transformations are only an arbitrary change of coordinate systems . Approaches like SchNet ( Schütt et al. , 2017 ) and EGNN ( Satorras et al. , 2021b ) achieve equivariance by using invariant features like pairwise distances as inputs to the model . These approaches have proven effective in many domains , but they are reflection-invariant , so they can not distinguish between mirror-image isomers . Other approaches , like DimeNet ( Klicpera et al. , 2020 ) and SphereNet ( Liu et al. , 2021 ) , achieve equivariance through message-passing schemes that encode distance and angular information , while Tensor Field Networks ( Thomas et al. , 2018 ) and SE ( 3 ) -Transformers ( Fuchs et al. , 2020 ) process data using a basis of equivariant spherical harmonic functions . There are several prior works on generative models for 3D molecular data . Two models from the same group generate 3D molecules by outputting a voxelized grid of atomic densities , which is then converted to a set of atoms and bonds in a secondary optimization step ( Ragoza et al. , 2020 ; Masuda et al. , 2020 ) . While efficient to implement using convolutions , the voxelized grid approach imposes a practical limit on the size of generated molecules , and is not equivariant . The process of reconstructing a molecule from a density field also suffers from relatively high rates of chemical and geometric invalidity , and the one-shot nature of the generative process does not allow for valence constraints to be enforced . Another pair of recent papers aims to generate stable 3D molecules using reinforcement learning ( Simm et al. , 2019a ; b ) . These models , however , are only capable of generating molecules by placing atoms from a set corresponding to a pre-determined stoichiometry , have only been demonstrated on very small molecules , and do not generate bonding information . Two other 3D-generative models are closely related to GEN3D : E-NF ( Satorras et al. , 2021a ) and G-SchNet ( Gebauer et al. , 2019 ) . E-NF uses an equivariant , EGNN-based normalizing flow to convert random initial atom positions into realistic molecular geometries . This model , however , has only been demonstrated on relatively small molecules , is very expensive to train , and produces molecules with low rates of chemical validity . G-SchNet is an equivariant model that autoregressively generates 3D molecules , and has recently been extended to conditionally generate molecules with desired electronic properties and molecular fingerprints ( Gebauer et al. , 2021 ) . G-SchNet , however , exclusively generates atomic positions , and does not generate molecular graphs that provide the chemical bonding information required by many downstream applications . In addition , without explicitly generating bonds , one can not use simple rules to constrain chemical properties , like atomic valences and ring sizes , during the generative process . There are also machine learning methods that predict molecular geometries for a given molecular graph . A number of works have approached this problem by predicting inter-atomic distances from the molecular graph , and then using the predictions to generate a 3D geometry in a secondary optimization step ( Xu et al. , 2021a ; Simm & Hernández-Lobato , 2019 ) . Most recently , Xu et al . ( 2021b ) proposed the ConfVAE architecture , which estimates inter-atomic distances and then optimizes molecular geometry using an end-to-end differentiable optimization procedure . 3 PROBABILISTIC MODEL . We will represent a molecule as a 3D-dimensional graph G = ( V , A , X ) . For a molecule with n atoms , V ∈ Rn×d is a list of d-dimensional atom features , A ∈ Rn×n×b is an adjacency matrix with b-dimensional edge features , and X ∈ Rn×3 is a list of 3D atomic coordinates for each atom . In practice , V simply encodes the atomic number of each atom , and A encodes the number of shared electrons in each covalent bond . To model a chemical space of interest , we consider the distribution p ( V , A , X ) . Previous works have aimed at calculating various marginal and conditional densities with respect to this joint distribution . For example , graph-based generative models learn the marginal distribution p ( V , A ) = ∫ X p ( V , A , X ) dX , molecular geometry prediction amounts to learning the conditional distribution p ( X|V , A ) , and 3D generative models like G-SchNet learn the distribution p ( V , X ) = ∫ A p ( V , A , X ) dA . To learn the joint distribution p ( V , A , X ) , it is necessary to factorize the density . We choose to use the following factorization : p ( V , A , X ) = n∏ i=1 p ( V : i , X : i , A : i|V : i−1 , A : i−1 , X : i−1 ) · p ( stop|V , A , X ) = n∏ i=1 p ( X : i|V : i , A : i , X : i−1 ) p ( A : i|V : i , A : i−1 , X : i−1 ) p ( V : i|V : i−1 , A : i−1 , X : i−1 ) · p ( stop|V , A , X ) Here , n is the number of atoms in the input graph , and V : i , A : i and X : i indicate the graph ( V , A , X ) restricted to the first i atoms . Computing p ( V : i|V : i−1 , A : i−1 , X : i−1 ) is relatively simple because it amounts to predicting a single atom type based on a 3D graph ( V : i−1 , A : i−1 , X : i−1 ) . Calculating p ( A : i|V : i , A : i−1 , X : i−1 ) is more complex because it involves a prediction over a new row of the adjacency matrix . More concretely , computing the conditional density of A : i ∈ Ri×i×b amounts to computing a joint density over the new entries of the adjacency matrix Ai,1 , . . . , Ai , i−1 ∈ Rb . To solve this problem , we further decompose this distribution : p ( A : i|V : i , A : i−1 , X : i−1 ) = p ( Ai,1 , . . . , Ai , i−1|V : i , A : i−1 , X : i−1 ) = i−1∏ j=1 p ( Ai , j |Ai , :j−1 , V : i , A : i−1 , X : i−1 ) Intuitively , Ai,1 , . . . , Ai , i−1 represent the edges from atom i to atoms 1 . . . i− 1 . Finally , estimating the density p ( X : i|V : i , A : i , X : i−1 ) involves modeling a continuous distribution over positions Xi ∈ R3 for atom i . To accomplish this , we assume Xi belongs to a finite set of points X , and model its probability mass as a product of distributions over angles and distances : p ( Xi|V : i , A : i , X : i−1 ) = 1 C i−1∏ j=1 p ( ||Xi −Xj || | V : i , A : i , X : i−1 ) · ∏ ( j , k ) ∈I p ( Angle ( Xi −Xk , Xj −Xk ) | V : i , A : i , X : i−1 ) Intuitively , p ( ||Xi−Xj || | V : i , A : i , X : i−1 ) predicts the distances from each existing atom to the new atom , and p ( Angle ( Xi − Xk , Xj − Xk ) | V : i , A : i , X : i−1 ) predicts the bond angles of connected triplets of atoms involving atom i. I is a set of pairs ( j , k ) where atom k is connected to atom i , and atom j is connected to atom k. “ Angle ” denotes the angle between two vectors . C is a normalizing constant derived from summing this density over all of X . To increase the computational tractability of estimating this factorized density , we assume that the nodes in the molecular graph ( V , A , X ) are listed in the order of a breadth-first traversal over the molecular graph . | This paper proposes a generative model to sample a new molecule with its 3d coordinates. The generative process is divided into three different steps: 1) the atom network generates a new atom 2) the edge network connects the new atom to the existing atoms 3) the distance and angle network generates the pairwise distances and angles from existing atoms to the new atoms. EGNN is used for each of these sub-networks to impose the equivariance to translations and rotations. Experiments with QM9 datasets show the geometric correctness of the proposed generative process. | SP:0fe019136bdbcb8818039e156c3ef54c50420e72 |
Path-specific Causal Fair Prediction via Auxiliary Graph Structure Learning | 1 INTRODUCTION . With the ubiquitous adoption of machine learning algorithms to facilitate decision making , algorithm fairness has attracted increasingly more attentions , in the areas such as recommendation system Ge et al . ( 2021 ) ; Zhu et al . ( 2018 ) ; Burke ( 2017 ) ; Yao & Huang ( 2017 ) , natural language processing Bolukbasi et al . ( 2016 ) ; Zhao et al . ( 2017 ) ; Gonen & Goldberg ( 2019 ) ; De-Arteaga et al . ( 2019 ) ; Blodgett et al . ( 2020 ) , computer vision Shankar et al . ( 2017 ) ; Nagpal et al . ( 2019 ) ; Raji et al . ( 2020 ) ; Stock & Cisse ( 2018 ) , hiring Hoffman et al . ( 2018 ) , education Brunori et al . ( 2012 ) , banking Mukerjee et al . ( 2002 ) , and crime risk assessment Brennan et al . ( 2009 ) ; Dieterich et al . ( 2016 ) ; Zhang & Bareinboim ( 2018b ) . Algorithm fairness aims to reduce or even eliminate unjustified distinctions of individuals based on their sensitive attributes ( e.g. , gender and race ) during the prediction Zhang & Wu ( 2017 ) . Unfortunately , machine learning models constructed from the raw data are vulnerable to the unfairness risk due to the historical prejudices in the data . It is crucial for model designers to take algorithm fairness into consideration for long-term social welfare . In recent years , researchers have developed a variety of causal fairness definitions to help machine learning models make fair predictions Zhang et al . ( 2017 ) ; Huang et al . ( 2020 ) ; Nabi & Shpitser ( 2018 ) ; Kusner et al . ( 2017 ) ; Russell et al . ( 2017 ) ; Wu et al . ( 2019a ) ; Zhang & Bareinboim ( 2018a ; b ) ; Hu et al . ( 2020 ) ; Xu et al . ( 2019 ) ; Wu et al . ( 2018 ) ; Zhang et al . ( 2016 ) , and one of them , pathspecific causal fairness Chiappa ( 2019 ) ; Nabi & Shpitser ( 2018 ) ; Wu et al . ( 2019b ) , is adopted in this paper . Under the definition of path-specific causal fairness , unfairness is viewed as the presence of unfair causal effect through the disallowed causal pathway that the sensitive attributes exert on predictions . In other words , a fair prediction satisfies path-specific causal fairness if it eliminates the causal effect that the sensitive attributes assert on the prediction through disallowed causal pathways . Such a definition provides the flexibility of tracing the unfairness , because in some scenarios , the sensitive attributes affect the decision along multiple pathways , and not all pathways are unfair . For example , in the loan application Zhang et al . ( 2017 ) shown in Figure 1 , race ( a sensitive attribute R ) is only allowed to affect the loan application results through the income , since it is reasonable to reject a loan application due to the low income . Under this fairness rule , paths R → Y and R → Z → Y are unfair paths and path R → Q → Y is a fair path . R Y Q Race Loan Z ZipCode Income unfair unfair fair Figure 1 : Loan Application Example . To fulfill path-specific causal fairness , some existing works directly calculate the path-specific causal effect ( PSE ) Avin et al . ( 2005 ) ; Pearl ( 2001 ) along the unfair pathways , and minimize the effect simultaneously when maximizing prediction accuracy Wu et al . ( 2019b ) ; Nabi & Shpitser ( 2018 ) . Some other works correct the variables located on the unfair pathway by a latent inference-projection method Chiappa ( 2019 ) . However , these existing works still face the following challenges : ( 1 ) Most of them require a pre-defined graph as the prior knowledge to calculate PSE . ( 2 ) The calculation of the path-specific effect is complex , requiring the sequential ignorability assumption Imai et al . ( 2010 ) to ensure the identification . ( 3 ) They all assume the sensitive attributes are root nodes in the causal graph . Namely , there are no other variables that affect the sensitive attributes . Few of them consider the case when the sensitive attributes are non-root nodes , which can be widely observed in real-world applications . For example , in the recommendation system , the item popularity is a sensitive attribute Ge et al . ( 2021 ) ; Zhu et al . ( 2018 ) , while this variable is a non-root node as it is affected by the item ’ s characteristics . In light of the above challenges , we propose a Causal Graph based Fairness Framework , shortened as CGF . To tackle the first challenge about the lack of causal graph information , CGF integrates the causal graph structure learning and fair prediction , which reveals the causal relationships among the observed variables . To simplify the sophisticated PSE calculation , CGF imposes the fairness regularization at the graph level by restricting the existence of unfair edges in the learned causal structure . In this way , fair decisions are made based on the corrected observations reconstructed from the learned graph structure . Furthermore , the proposed CGF framework can straightforwardly generalize to the case where sensitive attributes are non-root nodes by introducing the latent variables to divide the fair and unfair effect flow . To the best of our knowledge , the proposed framework CGF is the first work considering such non-root node case . 2 RELATED WORK . Most of the existing works of path-specific causal fairness restrict the unfair pathways by reducing their path-specific effect . In Nabi & Shpitser ( 2018 ) ; Nabi et al . ( 2019 ) , the prediction accuracy and the path-specific effect along with unfair causal pathways are jointly minimized . The work proposed in Zhang et al . ( 2017 ) designs a two-step algorithm , by first learning the graph structure and then minimizing the prediction error with PSE regularization . In Wu et al . ( 2019b ) , the authors adopt the response-function variable to bound the path-specific causal fairness . Instead of directly minimizing the path-specific effect , a latent inference-projection based method is proposed in Chiappa ( 2019 ) to correct the variables that are the descent nodes of sensitive attributes . In Helwegen et al . ( 2020 ) , the CEVAE framework Louizos et al . ( 2017 ) is adopted to infer the causal mechanism based on the pre-defined causal graph , and then the auxiliary prediction model is constructed based on the selected causal relation along with the fairness requirement . Relations to Existing Work . Most of the above existing works require the prior knowledge about causal graph to calculate the PSE or to correct sensitive variables ’ descent variables , which is hard to be satisfied in real-world applications . Compared with the work in Zhang et al . ( 2017 ) that has a separated time-consuming causal structure learning step , our work applies the fairness constraint on the continuous-optimization based graph structure learning , which can efficiently obtain the causal graph and simplify the PSE calculation . Furthermore , it is worth mentioning that all the above existing works assume that the sensitive attributes are root nodes . The proposed framework is the first work that generalizes to the case when sensitive attributes are non-root nodes under path-specific causal fairness . Additionally , our proposed framework is motivated by the work of utilizing the causal graph discovery to enhance the machine learning generalization ability Kyono et al . ( 2020 ) . Compared with Kyono et al . ( 2020 ) , the proposed CGF framework contains the cascade reconstruction step , which is the major difference . With the cascade reconstruction step , the unfairness contained in the original data can be corrected . Besides , CGF also has the fairness regularization in our proposed method , which reduces the unfair paths in the causal graph and meanwhile assures that the data correction follows the fair graph . 3 BACKGROUND . Causal Graph . A causal graph is a directed acyclic graph ( DAG ) reflecting the causal relationships between variables . Let G denote a causal graph , and G = 〈V , E〉 , where V is the set of nodes representing all the variables , and E is the set of edges with each edge Vi → Vj describing the causal relation between variable Vi and Vj . The parents nodes of node Vi , denoted as Π ( Vi ) , and Vj ∈ Π ( Vi ) if Vj → Vi . A node is a root node if it has no parent nodes . A path , also named as causal pathway , is defined as a sequence of unique nodes with edges between each consecutive node . The depth of a node in the graph is the number of arrows in the longest path to the root nodes . In the rest of the paper , we use the term “ node ” , “ variable ” , and “ attribute ” interchangeably . Path-specific Causal Fairness . Path-specific causal fairness ensures that the sensitive attributes are not allowed to affect the prediction along the unfair causal pathway . From the definition , path-specific causal fairness distinguishes the causal pathways that start from sensitive variables to predicted variables into fair paths and unfair paths , and the goal of fair prediction is to reduce the unfair paths . Relations to Other Fairness Definition . Path-specific causal fairness is closely related to other definitions of fairness . It is equivalent to removing the direct and indirect discrimination Zhang et al . ( 2017 ) . When all paths starting from the sensitive variables are unfair , achieving path-specific causal fairness is equal to demographic parity ( i.e. , removing disparate impact ) Zafar et al . ( 2015 ) . Structure Causal Model ( SCM ) . In Structure Causal Model ( SCM ) , each node in G is associated with a causal mechanism representing the relation between the current node and its parent nodes . It is defined as : F = { fi : Vi = fi ( Π ( Vi ) ) + i } , where Vi ∈ V is the i-th node in the graph , Π ( Vi ) is the set of parent nodes of Vi , and i is the random noise . Definition 3.1 . ( Observed Graph ) . Observed graph is the causal graph of the observed data . Definition 3.2 . ( Fair Graph ) . The causal graph satisfying the fairness criterion , and meanwhile , preserving the remaining structure of the observation graph , is the fair graph . Definition 3.3 . ( Model Graph ) . Model graph is the causal graph that the decision model relies on . Figure 2 shows the observational graph , fair graph and model graph of the loan example in Section 1 . Figure 2a is the observational graph , which is the causal graph of the observed data . In the graph , the fair path R → Q → Y represents that it is acceptable , in terms of income , that some people with certain race have a lower loan approval rate because they tend to be underpaid . While , the paths R → Y and R → Z → Y are unfair , indicating that it is disallowed that the race affects the loan approval directly or indirectly through ZipCode . Figure 2b is the fair graph , which describes the ideal causal relations . Compared with the observational graph , it eliminates the unfair paths . By removing the unfair paths , the fair graph reflects that the difference of loan application results across different race groups is explained by the different income levels among those groups . The rightmost sub-figure is the model graph , which is the graph that the model relies on to predict . As shown in Figure 2c , the model takes R , Z , and Q as input , therefore , they all have directed arrows pointing to prediction Y . ZipCode Income ZipCode Income ZipCode Income From the above triple-graph perspective , under path-specific causal fairness , the model graph should be consistent with the fair graph , but it is not . Therefore , our objective is to exclude the unfair path ( the red dashed arrow in Figure 2c ) for the decision , and retain the remaining causal pathways . | This paper aims to improve path-specific causal fairness by removing unfair causal pathways. Basically, the framework leverages the existing work by Kyono et al. and adds additional regularization terms. A big advantage of the proposed method is that it can handle the case where sensitive attribute is not root node. Based on experimental results, it seems CGF achieves a good trade-off in fairness and quality. | SP:6c884b1082787c96858a266006b2f3c59f0e1e14 |
Coarformer: Transformer for large graph via graph coarsening | 1 INTRODUCTION . In recent years , the Transformer architecture ( Vaswani et al. , 2017 ) has been derived into several variants , e.g. , BERT ( Devlin et al. , 2019 ) and ViT ( Dosovitskiy et al. , 2021 ) , which achieve unprecedented successes in natural language processing ( NLP ) and computer vision ( CV ) , respectively . Some recent works ( Kreuzer et al. , 2021 ; Ye & Ji , 2021 ; Ying et al. , 2021a ) attempt to generalize Transformer for graph data by treating each node as a token and designing dedicated positional encoding for the nodes . These works ’ performance has surpassed that of graph neural networks ( GNN ) on an increasing number of graph-related tasks , particularly molecular property prediction ( Ying et al. , 2021b ) . These works , however , demonstrate their superiority on small graphs , such as molecules with tens of atoms ( i.e. , nodes ) . When applied to a large graph , these Transformer-based methods ( Dwivedi & Bresson , 2021 ; Zhang et al. , 2020 ) explicitly or implicitly restrict each node ’ s receptive field to its neighbors . Nevertheless , large graphs , such as Arxiv and Products in OGBN ( Hu et al. , 2020 ) , also demand the global receptive field and the powerful expressiveness of the Transformer architecture . These graphs have more than hundreds of thousands of nodes and graph diameters larger than twenty , where the needed receptive field should be large , and the correlations among the nodes ’ features are complex . So , what limits the applicability of Transformer on large graphs ? Here , we identify two main obstacles : ( 1 ) Transformer is built on a node-to-node attention mechanism . When applied to a large graph with numerous nodes , the massive distant nodes can divert a significant portion of the attention no matter whether they are indeed related . As a result , the target node can neglect its local neighborhood , which is indispensable for learning generalizable node representations . Hence , Transformer is prone to causing over-fitting on large graphs , which will be exacerbated for the semi-supervised node-level tasks where the number of labeled nodes is limited . We will provide some empirical evidences for this point in Sec . 5.1.1 and Appendix A.1 . ( 2 ) The global receptive field of Transformer is costly , where the pairwise interactions among tokens lead to quadratic computational complexity regarding the number of nodes . Although some Sparse Transformer methods ( Roy et al. , 2021 ; Kitaev et al. , 2019 ; Ren et al. , 2021 ) can improve the efficiency of the original Transformer , they have not exploited the unique characteristics of graph data and require a quadratic or at least sub-quadratic space complexity , which is still unaffordable in most practical cases . We argue that both local and global information is useful for encoding each node in a large graph . Meanwhile , we notice that GNN and Transformer are proficient at capturing the local and global information , respectively , but neither of them can easily extract both kinds of information . Thus , a straightforward strategy is to employ them together to play to their strengths simultaneously . To this end , we propose to wipe out the discussed obstacles of applying Transformer by letting it work on a down-sampled graph that preserves both the sketch of global graph structure and the aggregated node features yet has much fewer nodes . And the similar idea is used in graph pooling ( Ying et al. , 2018 ; Baek et al. , 2020 ) and hierarchical GNN ( Fang et al. , 2020 ; Sobolevsky , 2021 ) . In this way , we essentially trade some fine-grained long-range information for the efficiency of Transformer . To encode both local and global information for each node , we propose a two-view architecture Coarformer consisting of a fine-grained local view and a coarse global view . In the local view , we can apply a GNN-based module to the original input graph to encode each node by its local topological structures and the node features . In the global view , we apply a Transformer-based module to a coarse graph produced by an adopted graph coarsening algorithm . Such kinds of algorithms mimic a down-sampling to the original graph via grouping the nodes into a less number of super-nodes . The Transformer-based module makes pairwise interactions among these super-nodes , capturing the coarse but long-range dependencies of the original graph . Additionally , we design a cross-view propagation strategy for these two views in order to facilitate their interaction . As a result , Coarformer encodes each node by both its local and global information , combining GNN and Transformer ’ s merits . It is worth noting that the number of super-nodes balances the efficiency of the Transformer-based module and how coarse the global view is . In practice , a small number that reduces the computational complexity from quadratic to linear w.r.t . the number of original nodes can still provide helpful global information , making Coarformer applicable for large graphs . We conduct extensive experiments on real-world datasets to study the proposed Coarformer . At first , the combinations of a GNN model with various Transformer-based methods consistently surpass a single GNN model , which supports our idea of encoding nodes by local and global information . More importantly , Coarformer achieves the best performances with the least running time and GPU memory consumption , compared to the related Sparse Transformer-based methods . Meanwhile , we empirically show that the local and global information is complementary , and our coarse global view can boost the performances of various kinds of GNNs . 2 BACKGROUND AND MOTIVATIONS . In this section , we summarize GNN , Transformer for graphs , and graph coarsening , along with a discussion on their connections to motivate our method . Before that , we firstly present notations for graph data . Let G = ( V , E ) be a undirected unweighted graph , where V is the node set , E is the edge set . We denote the number of nodes ( i.e. , |V| ) by n and use X ∈ Rn×k0 to denote the feature matrix whose i-th row Xi , : is the feature vector of node vi . We use A ∈ { 0 , 1 } n×n to denote the adjacency matrix of G , where Aij = 1 if and only if ( vi , vj ) ∈ E . The degree of a node vi is denoted by di = ∑n j=1 Aij , and the degree matrix D is a diagonal matrix with di being its i-th diagonal entry . GNN . To represent nodes based on their features ( i.e. , X ) and topological structures ( i.e. , A ) , most GNN models stack the message passing layers to calculate node representations H ( l ) by recursively aggregating the representations of its neighbors . Taking GCN ( Kipf & Welling , 2017 ) for example , it defines this procedure as H ( 0 ) = X , H ( l ) = D̃− 1 2 ÃD̃ 1 2H ( l−1 ) W ( l ) , where D̃ = D + In , Ã = A + In , and W ( l ) ∈ Rk ( l−1 ) ×kl is a learnable parameter . In such a way , an L-layer GNN model calculates H ( L ) to represent the nodes , where the receptive field for each node is its L-hop neighborhood . To capture long-range information , we need to increase L , where a large depth L is prone to causing over-smoothing ( Li et al. , 2018 ) and bottleneck ( Alon & Yahav , 2021 ) issues . Transformer for graphs . Therefore , some recent works apply the Transformer architecture to capture useful long-range information in the graph , which relies solely on the attention mechanism , dispensing with the message passing used in GNN . Taking the scaled dot-product attention for example , the node representations are updated as the weighted sums of themselves : H ( l ) = Softmax ( QKT√ m ) V = Softmax ( ( H ( l−1 ) W ( l ) Q ) ( H ( l−1 ) W ( l ) K ) T √ m ) H ( l−1 ) W ( l ) , ( 1 ) where WQ , WK ∈ Rk ( l−1 ) ×m , and W ∈ Rk ( l−1 ) ×kl are learnable parameters . Comparing Eq . 1 with the updating equation used in GCN , Softmax ( QKT√ m ) is usually allowed to be a dense n × n matrix , while the ( i , j ) -th entry of D̃− 1 2 ÃD̃ 1 2 is non-zero only if Ãij 6= 0 . Thus , one attention layer is sufficient for each h ( l−1 ) j to attend to any h ( l ) i , no matter how far away vj is to vi . Although these pairwise interactions provide the global receptive field for Transformer to capture long-range information , they often distract the necessary attention of each node from its neighborhood , especially when n is large . Besides , these pairwise interactions requireO ( n2 ) computational complexity , which further hinders the application of Transformer to large graphs . Graph coarsening . To simplify a given graph ( mainly reducing the number of nodes ) while preserving its global information as much as possible , graph coarsening ( Ron et al. , 2011 ; Loukas , 2019 ) produces a partition P = { C1 , . . . , Cn′ } of V and regards each cluster Ci as a super-node . Consequently , we get a coarse graph G′ = ( V ′ , E ′ ) , where |V ′| = n′ and ( Ci , Cj ) ∈ E ′ if and only if ∃vk ∈ Ci , vl ∈ Cj , s.t . ( vk , vl ) ∈ E . Meanwhile , this partition can be characterized by a matrix P̂ ∈ { 0 , 1 } n×n′ , with P̂ij = 1 if and only if vi ∈ Cj . Then its normalized version can be defined by P = P̂C− 1 2 , where C is a n′×n′ diagonal matrix with |Ci| as its i-th diagonal entry . We can define the feature matrix and weighted adjacency matrix for G′ by X ′ = P TX and A′ = P TAP , which characterize a coarse global view of the original graph . We define the coarsening rate as c = n ′ n . 3 METHODOLOGY . In this section , we introduce a two-view architecture Coarformer composed of a fine-grained local view and a coarse global view . We present the overview of Coarformer in Figure 1 . At first , we preprocess an input graph G via graph coarsening to generate a coarse graph G′ . Then a GNN-based module and a Transformer-based module work on G and G′ , respectively , which can be interpreted as encoding the nodes from the fine-grained local view and the coarse yet global view . We further design a scheme for Coarformer to enable neural messages to propagate across these two views , so the resulting node representations synthesize both the local and the global information . In the fine-grained local view , any GNN model ( e.g. , GCN ) can be adopted , which recursively calculates the node representations H ( l ) , l = 1 , . . . , L. As for the coarse global view , the details about the Transformer-based module are presented in Sec . 3.1 . Then we elaborate on how to enhance the communication between these two views in Sec . 3.2 . Lastly , we present how Coarformer makes inference and how to optimize Coarformer in Sec . 3.3 . | This paper proposes to use the transformer architecture on the coarse graph obtained from the graph coarsening algorithm. To be more specific, * Since directly using the transformer architecture to the large-scale graph is computationally prohibitive, the authors use the existing graph coarsening algorithms to the large graphs, and then use the transformer on the coarse graphs, which can capture the global information of the given graph in contrast to the GNNs capturing local information. * To simultaneously use both local and global structures of the graph, the authors first separately capture the local and global information of the given graph with GNNs on the original graph and transformers on the coarse graph, respectively, and then propagate information of local and global to each other with the cross-view propagation scheme. * The authors show that the proposed Coarformer outperforms baselines on node classification tasks, and also show that the proposed model is highly efficient against the global transformer models for graphs. | SP:34963abebc7bff45ac1b8fae499ceea8900c2852 |
Self-supervised Learning for Sequential Recommendation with Model Augmentation | The sequential recommendation aims at predicting the next items in user behaviors , which can be solved by characterizing item relationships in sequences . Due to the data sparsity and noise issues in sequences , a new self-supervised learning ( SSL ) paradigm is proposed to improve the performance , which employs contrastive learning between positive and negative views of sequences . However , existing methods all construct views by adopting augmentation from data perspectives , while we argue that 1 ) optimal data augmentation methods are hard to devise , 2 ) data augmentation methods destroy sequential correlations , and 3 ) data augmentation fails to incorporate comprehensive self-supervised signals . Therefore , we investigate the possibility of model augmentation to construct view pairs . We propose three levels of model augmentation methods : neuron masking , layer dropping , and encoder complementing . This work opens up a novel direction in constructing views for contrastive SSL . Experiments verify the efficacy of model augmentation for the SSL in the sequential recommendation . 1 INTRODUCTION . The sequential recommendation ( Fan et al. , 2021 ; Liu et al. , 2021c ; Chen et al. , 2018 ; Tang & Wang , 2018 ; Zheng et al. , 2019 ) aims at predicting future items in sequences , where the crucial part is to characterize item relationships in sequences . Recent developments in sequence modeling ( Fan et al. , 2021 ; Liu et al. , 2021c ) verify the superiority of Transform ( Vaswani et al. , 2017 ) , i.e . the selfattention mechanism , in revealing item correlations in sequences . A Transformer ( Kang & McAuley , 2018 ) is able to infer the sequence embedding at specified positions by weighted aggregation of item embeddings , where the weights are learned via self-attention . Existing works ( Fan et al. , 2021 ; Wu et al. , 2020 ) further improve Transformer by incorporating additional complex signals . However , the data sparsity issue ( Liu et al. , 2021c ) and noise in sequences undermine the performance of a model in sequential recommendation . The former hinders performance due to insufficient training since the complex structure of a sequential model requires a dense corpus to be adequately trained . The latter also impedes the recommendation ability of a model because noisy item sequences are unable to reveal actual item correlations . To overcome both , a new contrastive self-supervised learning ( SSL ) paradigm ( Liu et al. , 2021b ; Xie et al. , 2020 ; Zhou et al. , 2020 ) is proposed recently . This paradigm enhances the capacity of encoders by leveraging additional self-supervised signals . Specifically , the SSL paradigm constructs positive view pairs as two data augmentations from the same sequences ( Xie et al. , 2020 ) , while negative pairs are augmentations from distinct sequences . Incorporating augmentations during training increases the amount of training data , thus alleviating the sparsity issue . And the contrastive loss ( Chen et al. , 2020 ) improves the robustness of the model , which endows a model with the ability to against noise . Though being effective in enhancing sequential modeling , the data augmentation methods adopted in the existing SSL paradigm suffer from the following weaknesses : • Optimal data augmentation methods are hard to devise . Current sequence augmentation methods adopts random sequence perturbations ( Liu et al. , 2021b ; Xie et al. , 2020 ) , which includes crop , mask , reorder , substitute and insert operations . Though a random combination of those augmenting operations improves the performance , it is rather time-consuming to search the optimal augmentation methods from a large number of potential combinations for different datasets ( Liu et al. , 2021b ) . • Data augmentation methods destroy sequential correlations , leading to less confident positive pairs . The existing SSL paradigm requires injecting perturbations into the augmented views of sequences for contrastive learning . However , because the view construction process is not optimized to characterize sequential correlations , two views of one sequence may reveal distinct item relationships , which should not be recognized as positive pairs . • Data augmentation fails to incorporate comprehensive self-supervised signals . Current data augmentation methods are designed based on heuristics , which already requires additional prior knowledge . Moreover , since the view construction process is not optimized with the encoder , data augmentation may only reveal partial self-supervised signals from data perspectives . Hence , we should consider other types of views besides data augmentation . Therefore , we investigate the possibility of model augmentation to construct view pairs for contrastive learning , which functions as a complement to the data augmentation methods . We hypothesis that injecting perturbations into the encoder should enhance the self-supervised learning ability to existing paradigms . The reasons are threefold : Firstly , model augmentation is jointly trained with the optimization process , thus endows the end-to-end training fashion . As such , it is easy to discover the optimal view pairs for contrastive learning . Secondly , model augmentation constructs views without manipulation to the original data , which leads to high confidence of positive pairs . Last but not least , injecting perturbation into the encoder has distinct characteristics to data augmentation , which should be an important complement in constructing view pairs for existing self-supervised learning scheme ( Liu et al. , 2021b ; Zhou et al. , 2020 ) . This work studies the model augmentation for a self-supervised sequential recommendation from three levels : 1 ) neuron masking ( dropout ) , which adopts the dropout layer to randomly mask partial neurons in a layer . By operating the dropout twice to one sequence , we can perturb the output of the embedding from this layer , which thus constructs two views from model augmentation perspective ( Gao et al. , 2021 ) . 2 ) layer dropping . Compared with neuron masks , we randomly drop a complete layer in the encoder to inject more perturbations . By randomly dropping layers in an encoder twice , we construct two distinct views . Intuitively , layer-drop augmentation enforces the contrast between deep features and shallows features of the encoder . 3 ) encoder complementing , which leverages other encoders to generate sequence embeddings . Encoder complementing augmentation is able to fuse distinct sequential correlations revealed by different types of encoders . For example , RNN-based sequence encoder ( Hidasi et al. , 2015 ) can better characterize direct item transition relationships , while Transformer-based sequence encoder models position-wise sequential correlations . Though only investigating SSL for a sequential recommendation , we remark that model augmentation methods can also be applied in other SSL scenarios . The contributions are as follows : • We propose a new contrastive SSL paradigm for sequential recommendation by constructing views from model augmentation , which is named as SRMA . • We introduce three levels of model augmentation methods for constructing view pairs . • We discuss the effectiveness and conduct a comprehensive study of model augmentations for the sequential recommendation . • We investigate the efficacy of different variants of model augmentation . 2 RELATED WORK . 2.1 SEQUENTIAL RECOMMENDATION . Sequential recommendation predicts future items in user sequences by encoding sequences while modeling item transition correlations ( Rendle et al. , 2010 ; Hidasi et al. , 2015 ) . Previously , Recurrent Neural Network ( RNN ) have been adapted to sequential recommendation ( Hidasi et al. , 2015 ; Wu et al. , 2017 ) , ostensibly modeling sequence-level item transitions . Hierarchical RNNs ( Quadrana et al. , 2017 ) incorporate personalization information . Moreover , both long-term and short-term item transition correlations are modelled in LSTM ( Wu et al. , 2017 ) . Recently , the success of selfattention models ( Vaswani et al. , 2017 ; Devlin et al. , 2018 ) promotes the prosperity of Transformerbased sequential recommendation models . SASRec ( Kang & McAuley , 2018 ) is a pioneering work adapting Transformer to characterize complex item transition correlations . BERT4Rec ( Sun et al. , 2019 ) adopts the bidirectional Transformer layer to encode sequence . ASReP ( Liu et al. , 2021c ) reversely pre-training a Transformer to augment short sequences and fine-tune it to predict the nextitem in sequences . TGSRec ( Fan et al. , 2021 ) models temporal collaborative signals in sequences to recognize item relationships . 2.2 SELF-SUPERVISED LEARNING . Self-supervised learning ( SSL ) is proposed recently to describe “ the machine predicts any parts of its input for any observed part ” ( Bengio et al. , 2021 ) , which stays within the narrow scope of unsupervised learning . To achieve the self-prediction , endeavors from various domains have developed different SSL schemes from either generative or contrastive perspectives ( Liu et al. , 2021a ) . For generative SSL , the masked language model is adopted in BERT ( Devlin et al. , 2018 ) to generate masked words in sentences . GPT-GNN ( Hu et al. , 2020 ) also generates masked edges to realize SSL . Other generative SSL paradigms in computer vision ( Oord et al. , 2016 ) are proposed . Compared with generative SSL , contrastive SSL schemes have demonstrated more promising performance . SimCLR ( Chen et al. , 2020 ) proposes simple contrastive learning between augmented views for images , which is rather effective in achieving SSL . GCC ( Qiu et al. , 2020 ) and GraphCL ( You et al. , 2020 ) adopts contrastive learning between views from corrupted graph structures . CL4SRec ( Xie et al. , 2020 ) and CoSeRec ( Liu et al. , 2021b ) devise the sequence augmentation methods for SSL on sequential recommendation . This paper also investigates the contrastive SSL for a sequential recommendation . Instead of adopting the data augmentation for constructing views to contrast , we propose the model augmentation to generate contrastive views . 3 PRELIMINARY . 3.1 PROBLEM FORMULATION . We denote user and item sets as U and V respectively . Each user u ∈ U is associated with a sequence of items in chronological order su = [ v1 , . . . , vt , . . . , v|su| ] , where vt ∈ V denotes the item that u has interacted with at time t and |su| is the total number of items . Sequential recommendation is formulated as follows : argmax vi∈V P ( v|su|+1 = vi |su ) , ( 1 ) where v|su|+1 denotes the next item in sequence . Intuitively , we calculate the probability of all candidate items and recommend items with high probability scores . 3.2 SEQUENTIAL RECOMMENDATION FRAMEWORK . The core of a generic sequential recommendation framework is a sequence encoder SeqEnc ( · ) , which transforms item sequences to embeddings for scoring . We formulate the encoding step as : hu = SeqEnc ( su ) , ( 2 ) where hu denotes the sequence embedding of su . To be specific , if we adopt a Transformer ( Kang & McAuley , 2018 ; Vaswani et al. , 2017 ) as the encoder , hu is a bag of embeddings , where at each position t , htu , represents a predicted next-item . We adopt the log-likelihood loss function to optimize the encoder for next-item prediction as follows : Lrec ( u , t ) = − log ( σ ( htu · evt+1 ) ) − ∑ vj 6∈su log ( 1− σ ( htu · evj ) ) , ( 3 ) where Lrec ( u , t ) denotes the loss score for the prediction at position t in sequence su , σ is the nonlinear activation function , evt+1 denotes the embedding for item vt+1 , and vj is the sampled negative item for su . The embeddings of items are retrieved from the embedding layer in SeqEnc ( · ) , which is jointly optimized with other layers . | This paper a new self-supervised learning (SSL) paradigm for sequence recommendation by contrastive learning between positive and negative views of sequences based on model augmentation. The model augmentation methods includes neuron masking, layer dropping and encoder complementing. The proposed algorithm is evaluated with several real-world datasets, showing the efficacy of the proposed methods. | SP:3bee8aa34c433357c9487dc3ec37837d18f0c143 |
On the Practicality of Deterministic Epistemic Uncertainty | 1 INTRODUCTION . Despite the dramatic enhancement of predictive performance of deep learning ( DL ) , its adoption remains limited due to unpredictable failure on out-of-distribution ( OOD ) samples ( 1 ; 2 ) and adversarial attacks ( 3 ) . Uncertainty estimation techniques aim at bridging this gap by providing accurate confidence levels on a model ’ s output , allowing for a safe deployment of neural networks ( NNs ) in safety-critical tasks , e.g . autonomous driving or medical applications . While Bayesian Neural Networks ( BNNs ) represent the predominant holistic solution for quantifying uncertainty ( 4 ; 5 ) , exactly modelling their full posterior is often intractable , and scalable versions usually require expensive variational approximations ( 6 ; 7 ; 8 ; 9 ; 10 ) . Moreover , it has recently been shown that true Bayes posterior can also lead to poor uncertainty ( 11 ) . Thus , efficient approaches to uncertainty estimation largely remain an open problem , limiting the adoption within real-time applications under strict memory , time and safety requirements . Recently , a promising line of work emerged estimating epistemic uncertainty in deterministic NNs with a single forward pass . By regularizing the hidden representations of a model , these methods represent an efficient and scalable solution to epistemic uncertainty estimation and to the related OOD detection problem . Compared to traditional uncertainty estimation techniques , Deterministic Uncertainty Methods ( DUMs ) quantify epistemic uncertainty by measuring distances ( 12 ; 13 ) or estimating the distribution of latent representations ( 14 ; 15 ; 16 ; 17 ; 18 ; 19 ; 20 ; 21 ) . While OOD detection is a prerequisite for a safe deployment of DL in previously unseen scenarios , the calibration - i.e . how well uncertainty correlates with model performance - of such methods under continuous distributional shifts is equally important . Measuring the calibration of an epistemic uncertainty estimate on shifted data investigates whether it entails information about the predictive performance of the model . This an essential requirement for uncertainty and , unlike OOD detection , and evaluation that is not model-agnostic - i.e . one can not perform well without taking the predictive model into account . Nonetheless , previous work falls short of investigating calibration , and solely focuses on OOD detection ( 12 ; 13 ; 16 ; 18 ; 19 ) . Further , DUMs have thus far only been evaluated on toy datasets for binary classification , small-scale image classification tasks ( 13 ; 19 ) and toy prediction problems in natural language processing ( 15 ) . Despite claiming to solve practical issues of traditional uncertainty estimation approaches , the practicality of DUMs remains to be assessed on more challenging tasks . This work investigates the most crucial questions on the safety of DUMs in practical applications and addresses their shortcomings . In particular : ( i ) we provide the first analysis of the calibration of DUMs under continuous distributional shifts ; ( ii ) we evaluate the sensitivity of DUMs to their regularization strength ; ( iii ) we scale DUMs to dense prediction tasks , e.g . semantic segmentation , and evaluate them under synthetic and realistic continuous distributional shift ; ( iv ) we find that the practicality of many DUMs is undermined by their poor calibration under both synthetic and realistic distributional shifts . 2 RELATED WORK . Sources of Uncertainty . Uncertainty in a model ’ s predictions can arise from two different sources ( 22 ; 23 ) . While aleatoric uncertainty encompasses the noise inherent in the data and is consequently irreducible ( 22 ) , epistemic uncertainty quantifies the uncertainty associated with choosing the model parameters based on limited information , and vanishes - in principle - in the limit of infinite data . This work distinguishes two properties of epistemic uncertainty - its performance on detecting OOD samples and its calibration ( i.e . its correlation with model performance under distributional shifts ) . While the latter has been explored in the case of probabilistic approaches to uncertainty estimation ( 24 ) we are the first to investigate the behaviour of DUMs in this scenario . Notably , ( 25 ) evaluates prominent scalable epistemic uncertainty estimates on semantic segmentation . However , they investigate calibration only on in-distribution data . Further , although ( 15 ) evaluates the calibration of their approach , they do so exclusively on in-distribution data . BNNs ( 26 ; 5 ) represent a principled way of measuring uncertainty . However , their intractable posterior distribution requires approximate inference methods , such as Markov Chain Monte-Carlo ( 26 ) or Variational Inference ( VI ) ( 4 ) . While these methods traditionally struggle with large datasets and architectures , a variety of scalable approaches - often based on VI - have recently emerged . Deep Ensembles , which typically consist of identical models trained from different initializations , have been introduced to the deep learning community by Lakshminarayanan et al . ( 27 ) and extended by ( 28 ; 29 ) . While deep ensembles are widely regarded as a strong baseline for estimating epistemic uncertainty , they come with high computational as well as memory costs . Efficient Approaches . Recently , approaches based on stochastic regularization have been developed ( 6 ; 7 ; 8 ; 30 ; 31 ) . By keeping stochasticity at inference time , they estimate uncertainty using multiple forward passes . Another line of work estimates the posterior using the Laplaceapproximation ( 32 ; 33 ; 34 ) Moreover , efficient ensemble methods were proposed producing predictions using a single model ( 35 ; 29 ; 28 ; 36 ; 37 ) . Despite promising results on large-scale tasks while being parameter-efficient , these methods still require sampling through the model , which can render them impractical given limited compute . To estimate uncertainty in real-time and resource-demanding tasks , recent work has focused on providing uncertainty estimates with a single forward pass . One line of work proposes a principled approach for variance propagation in NNs ( 9 ; 38 ; 10 ) . Notably , another line of work proposes efficient approaches to estimate aleatoric uncertainty ( 39 ; 40 ; 41 ) . Recently , DUMs showed promising results on OOD detection . By leveraging distances and densities in the feature space of a NN , these methods provide confidence estimates while adding negligible computational cost . Since they are united in their deterministic treatment of the weights , we term them Deterministic Uncertainty Methods ( DUMs ) . The next section provides a taxonomy of DUMs . 3 TAXONOMY FOR DETERMINISTIC UNCERTAINTY QUANTIFICATION . This section categorizes existing DUMs . To quantify epistemic uncertainty deterministically , the distribution of the hidden representations of a NN needs to be sensitive to the input distribution . However , discriminative models suffer from the fundamental problem of feature collapse ( 13 ; 19 ) . Thus , we firstly categorize DUMs according to the regularization method used to counteract feature collapse ( Sec . 3.1 ) . Moreover , we cluster DUMs according to the method used for uncertainty estimation ( Sec . 3.2 ) . Tab . 1 shows an overview of the resulting taxonomy . Feature Collapse . Discriminative models can learn to discard large part of their input information , as exploiting spurious correlations may lead to better performance on the training data distribution ( 46 ; 47 ) . Such invariant representations learned may be blind to distributional shifts , resulting in a collapse of OOD embeddings to in-distribution features This problem is known as feature collapse ( 13 ) , and it makes OOD detection based on high-level representations impossible . 3.1 REGULARIZATION OF HIDDEN REPRESENTATIONS . We group DUMs according to how feature collapse is tackled . We identify two main paradigms - distance awareness and informative representations - which we discuss in Sec . 3.1.1 and Sec . 3.1.2 . 3.1.1 DISTANCE AWARENESS . Essentially , distance-aware hidden representations avoid feature collapse by relating distances between latent representations to distances in the input space . Therefore , one constrains the bi-Lipschitz constant , as it enforces a lower and an upper bound to expansion and contraction performed by a model . A lower bound enforces that different inputs are mapped to distinct representations and , thus , provides a solution to feature collapse . The upper bound enforces smoothness , i.e . small changes in the input do not result in large changes in the latent space . While there exist other approaches , e.g . ( 48 ) , recent proposals have primarily adopted two methods to impose the bi-Lipschitz constraint . The two-sided Gradient Penalty relates changes in the input to changes in feature space by directly constraining the gradient of the input ( 13 ) . Spectral Normalization ( SN ) ( 49 ) is a less computationally-demanding alternative . SN is applicable to residual layers and normalizes the weights W of each layer using their spectral norm sn ( W ) to constrain the bi-Lipschitz constant . Various DUMs - SNGP ( 15 ) , DUE ( 18 ) and DDU ( 19 ) - rely on SN to enforce distance-awareness of hidden representations . More details on gradient penalty and SN can be found in the supplement . Note that the Lipschitz constraint is defined with respect to a fix distance measure , which can be difficult to choose for many high-dimensional data distributions . A popular choice , e.g . ( 13 ; 15 ; 18 ) , is the L2 distance . Moreover , principled approaches to provide exact singular values in convolutional layers ( 50 ) result in prohibitive computational complexity ; the spectral normalization approximations typically adopted by the methods previously described have been found to be sub-optimal ( 51 ) , and its interaction with losses , architecture and optimization is yet to be fully understood ( 52 ) . 3.1.2 INFORMATIVE REPRESENTATIONS . While distance-awareness achieves remarkable performance on OOD detection , it does not explicitly preserve sample-specific information . Thus , depending on the underlying distance metric it may discard useful information about the input or act overly sensitive . An alternative line of work avoids feature collapse by learning informative representations ( 14 ; 16 ; 20 ; 44 ; 43 ; 45 ) , thus forcing discriminative models to preserve information in its hidden representations beyond what is required to solve a task independent of the choice of an underlying distance metric . Notably , while representations that are aware of distances in the input space are also informative , both categories remain fundamentally different in their approach to feature collapse . While distance-awareness is based on the choice of a specific distance metric tying together input and latent space , informative representations incentivize a NN to store more information about the input using an auxiliary task ( 20 ; 16 ) or forbid information loss by construction ( 43 ; 44 ; 45 ) . We identify three distinct families of approaches . Contrastive learning ( 53 ) has emerged as an approach for learning representations that are both informative and discriminative . This is utilized by Wu et al . ( 16 ) and Winkens et al . ( 42 ) , who apply SimCLR ( 54 ) to regularize hidden representations for a discriminative task by using a contrastive loss for pretraining and fine-tuning to force representations to discriminate between individual instances . Reconstruction regularization ( 20 ) instead forces the intermediate activations to fully represent the input . This is achieved by adding a decoder branch fed with the activations of a given layer to reconstruct the input . We term it MIR ( Maximally Informative Representations ) . Entropy regularization . PostNet ( 17 ) learns the class-conditional distribution of hidden representations end-to-end using a Normalizing Flow ( NF ) parameterizing a Dirichlet distribution . This allows them to enforce informative representations by implicitly encouraging large entropy of the NF during training . We refer to the supplement for details . Invertible Neural Networkss ( INNs ) ( 55 ; 43 ; 44 ; 45 ) , built via a cascade of homeomorphic layers , can not discard information except at the final classification stage . Consequently , the mutual information between input and hidden representation is maximized by construction . Interestingly , Behrmann et al . ( 56 ) showed that a ResNet is invertible if its Lipschitz constant is lower than 1 , meaning that invertible ResNets both possess highly-informative representations and satisfy distance-awareness . However , note that this is not a necessary condition for invertibility , and thus information preservation . | This paper mainly summarizes and evaluates the existing methods for estimating epistemic uncertainty through a single pass of the neural networks. The authors categorize deterministic uncertainty methods (DUMs) based on how latent representation is learned under regularization and how uncertainty is quantified. For evaluating DUMs, they provide some analyses on the uncertainty calibration performance under different-level distribution shifts for image classification and semantic segmentation. Specifically, they demonstrate that DUMs cannot generate well-calibrated uncertainty under distribution shifts compared to the MC-dropout and Ensemble methods. | SP:67f90b5a1664683ab391a395416d4fd1f8b5599e |
Convergence of Generalized Belief Propagation Algorithm on Graphs with Motifs | 1 INTRODUCTION . Undirected graphical models , also known as Markov Random Fields ( MRF ) , provide a framework for modeling high dimensional distributions with dependent variables . Ising models are a special class of discrete pairwise graphical models originated from statistical physics . Ising models have numerous applications in computer vision Ravikumar et al . ( 2010 ) , bio-informatics Marbach et al . ( 2012 ) , and social networks Eagle et al . ( 2009 ) . Explicitly , the joint distribution of Ising model is given by P ( X ) = 1 Z exp ( β ( ∑ i hiXi + ∑ ( i , j ) JijXiXj ) ) , ( 1 ) where { Xi } i ∈ { ±1 } n are random variables valued in a binary alphabet ( also known as `` spins '' ) , Jij represents the pairwise interactions between spin i and spin j , hi represents the external field for spin i , β = 1/T is the reciprocal temperature , and Z is a normalization constant called partition function . Historically , Ising models are proposed to study ferromagnetism . However , researchers find the computational complexity is the main challenge of performing sampling and inference on Ising models . In the literature , there are multiple ways to tackle the computational complexity . One of the ways are Markov-Chain Monte Carlo ( MCMC ) algorithms . A well-known example is Gibbs sampling , which is a special case of the Metropolis–Hastings algorithm . Basically Gibbs sampling samples a random variable conditioned on the distribution based on the previous samples . It can be shown that Gibbs sampling generates a reversible Markov chain of samples . Thus , the stationary distribution of the Markov chain is the desired joint distribution over the random variables , and it can be reached after the burn-in period . However , it is also well-known that Gibbs sampling will become trapped on multi-modal distribution . For example , Smith and Roberts ( 1993 ) and Mengersen ( 1996 ) show that when the joint distribution is bi-modal , the Gibbs sampling iterations may be trapped in one of the modes , reducing the probability of convergence . Another popular way to go around the computational complexity is variational methods , which makes some approximation to the joint distribution . These methods usually turn the inference problem with respect to the approximate joint distribution into some non-convex optimization problem , and solve it either by the standard optimization methods , e.g , gradient descent , or by specialized algorithms like belief propagation . However , due to the non-convexity , those methods usually do not have theoretical guarantees that the solution converges to the global optimum . Belief propagation ( BP ) is an effective numerical method for solving inference problems on graphical models . It was originally proposed by Pearl ( 2014 ) for tree-like graphs . Ever since it plays a fundamental role in numerous applications including coding theory Frey et al . ( 1998 ) ; Richardson and Urbanke ( 2001 ) , constraint satisfaction problems Achlioptas and Moore ( 2006 ) , and community detection in the stochastic block model Decelle et al . ( 2011 ) . It is well-known that belief propagation is only exact for a model on a graph with locally tree-like structures . The long haunting question is , theoretically how does belief propagation perform on loopy graphs . We now describe the related work and our contributions . Related work and our contribution In a classic work , Yedidia et al . ( 2003 ) establishes the connection between belief propagation and the Bethe free energy . He shows that there is one-to-one correspondence between the fixed points of belief propagation and stationary points of the Bethe free energy . Following his work , it is known that the Bethe free energy at the critical points can be represented in terms of fixed point messages of belief propagation Montanari ( 2013 ) . In a recent work , Koehler ( 2019 ) further studies the properties of Bethe free energy at the critical points , and shows for ferromagnetic Ising models , initialized with all one messages , belief propagation converges to the fixed point corresponds to the global maximum of the Bethe free energy . However , those theories consider either asymptotic locally tree-like graphs , or loopy graphs with simple edges . Real technological , social and biological networks have numerous short and large loops and other complex motifs , which lead to non-tree-like structures and essentially loopy graphs with hyper edges . Newman Newman ( 2009 ) ; Karrer and Newman ( 2010 ) and Miller ( 2009 ) independently propose a model of random graphs with arbitrary distributions of motifs . And Yoon et al . ( 2011 ) generalizes the Belief Propagation to graphs with motifs . Our work builds on generalized belief propagation on graphs with motifs Yoon et al . ( 2011 ) and the convergence of belief propagation on ferromagnetic Ising models on loopy graphs with simple edges Koehler ( 2019 ) . In this paper , we show for ferromagnetic Ising models on graphs with motifs , with all messages initialized to one , generalized belief propagation converges to the fixed point corresponds to the global maximum of the Bethe free energy . 2 ISING MODELS ON GRAPHS WITH MOTIFS . Let us introduce the concept of graphs with motifs . In graphs with motifs , each vertex belongs to a given set of motifs . As shown in Fig.1a , different motifs can be attached to vertex i : a simple edge ( i , j ) , a triangle , a square , a pentagon , and other non-clique motifs . Graphs with motifs can be viewed as hyper-graphs where motifs play a role of hyper-edges . And the number of specific motifs attached to a vertex is equal to hyper-degree with respect to the specific motifs . In this paper , for simplicity , we only consider simple motifs such as simple edges , and cliques . Consider the Ising model with arbitrary order of interactions among vertices in each motif on a hyper-graph . Let Ml ( i ) denote a cluster of size l attached to vertex i , where vertices j1 , j2 , . . . , jl−1 together with i form the motif . And let X denote the random variable of spin configurations , the Hamiltonian of the model is E ( X ) = − ∑ i hiXi − ∑ ( i , j ) JijXiXj − ∑ ( i , j , k ) JijkXiXjXk − ∑ ( i , j , k , l ) JijklXiXjXkXl − · · · ( 2 ) where the first sum corresponds to the external fields at each vertex , the second sum corresponds to the pairwise interactions on simple edges , the third sum corresponds to the higher order interactions among spins in triangles , the fourth sum corresponds to the higher order interactions among spins in squares , and so on . As discussed in the previous section , most previous works focus on Ising models with pairwise interactions . In this paper , we are interested in Ising models with higher order interactions . For simplicity , we consider Ising models with only external fields and higher order interactions in triangles . Our derivation can be extended to more general cases . Consider Ising models with only external fields and higher order interactions in triangles , the Hamiltonian of the model is E ( X ) = − ∑ i hiXi − ∑ ( i , j , k ) JijkXiXjXk , ( 3 ) where ( i , j , k ) is a triangle , which can also be denoted as M3 ( i ) , M3 ( j ) , or M3 ( k ) . By Boltzmann ’ s law , the joint distribution is defined by P ( X ) = 1 Z e−βE ( X ) , ( 4 ) where Z is the partition function . Throughout this paper , we focus on ferromagnetic Ising models , which is defined below Definition 1 . An Ising model is ferromagnetic if Jijk ≥ 0 for all triangle motifs ( i , j , k ) and hi ≥ 0 for all i . We introduce a intermediate message µM3 ( i ) from a motif M3 ( i ) to spin i. µM3 ( i ) ( Xi ) = eβλM3 ( i ) Xi 2 coshβλM3 ( i ) . ( 5 ) In the literature , different works have different definitions of messages . µM3 ( i ) is not the message definition we eventually work with in this paper , but it helps to understand the connections between different works . So , abusing the terminology a little bit , we call it ‘ intermediate message ’ . By the definition of generalized Belief Propagation , the probability that spin i is in a state Xi is determined by the normalized product of incoming intermediate messages from motifs attached to spin i and the external field factor eβhiXi , Pi ( Xi ) = 1 A eβhiXi ∏ { M3 ( i ) } µM3 ( i ) ( Xi ) , ( 6 ) where A is a normalization constant . And the belief update rule is given by : µM3 ( i ) ( Xi ) = B ∑ { Xj=±1 } e−βE ( M3 ( i ) ) ∏ j ∏ { M3 ( j ) 6=M3 ( i ) } µM3 ( j ) ( Xj ) , ( 7 ) where E ( M3 ( i ) ) is an energy of the interaction among spins in the triangle M3 ( i ) , and B is a normalization constant . Multiplying Equation ( 7 ) by Xi and summing over all spin configurations , we obtain an equation for the effective field λM3 ( i ) , tanh ( βλM3 ( i ) ) = 1 Z ( M3 ( i ) ) ∑ { Xi , Xj1 , ... =±1 } Xie −βẼ ( M3 ( i ) ) , ( 8 ) where Ẽ ( M3 ( i ) ) = − 2∑ n=1 Λt ( jn ) Xjn − Jij1j2XiXj1Xj2 , ( 9 ) Λt ( j ) = hj + ∑ { M3 ( j ) 6=M3 ( i ) } λM3 ( j ) , ( 10 ) Z ( M3 ( i ) ) = ∑ { Xi , Xj1 , ... =±1 } e−βẼ ( M3 ( i ) ) . ( 11 ) For more detailed explanations of Equations ( 7 ) to ( 11 ) , please refer to Yoon et al . ( 2011 ) . Now , define a message from a spin i to motif M3 ( i ) as νi→M3 ( i ) = tanh ( λM3 ( i ) ) . More specifically , if the motif M3 ( i ) is a triangle ( i , j , k ) , the message can be alternatively represented as νi→M3 ( i ) = νi→jk = tanh ( λM3 ( i ) ) . From now on , let the reciprocal temperature β = 1 , we can further simplify Equation ( 8 ) as νi→jk = tanh ( hi + ∑ { m , n } ∈∂i\ { j , k } tanh−1 ( tanh ( Jimn ) νm→inνn→im ) ) , ( 12 ) where ∂i denotes the motifs attached to spin i . Equation ( 12 ) is the consistency equation for fixed point hyper-edge messages ν∗i→jk of the generalized belief propagation . Alternatively , we denote Equation ( 12 ) as νi→jk = φ ( ν ) i→jk . | The author considers a special class of attractive models and extends the convergence results of [Koehler]. In general, the convergence behavior of belief propagation algorithm is hard to be understood, however, attractive models are special class of models known to have simple optimization loss landscape. Therefore, the result of the paper is unlikely to be generalized to non-attractive models, limiting the application of the paper. | SP:d8bf2a93ae4915034af540e2c8ee69e3495f2419 |
Quantifying the Controllability of Coarsely Characterized Networked Dynamical Systems | 1 INTRODUCTION . In this paper we study controllability for networked dynamical systems when our knowledge of system structure is limited to coarse summaries . We are motivated by myriad real-world settings where system identification must be performed based upon measurements taken by low-resolution instruments unable to probe fine-scale structure . Our motivating example is the human brain . While efforts are under way to produce a canonical human brain map , our knowledge of the brain as an interconnected , network system is not yet to the level of the whole-brain individual neuron ( Betzel and Bassett , 2017 ) . And yet , motivated by emerging medical technologies , there are important control tasks we would like to tackle . For example , novel brain implants designed for epilepsy patients aim to “ steer ” the brain away from states that correspond to seizures ( Heck et al. , 2014 ; Muldoon et al. , 2016 ) . Our goal is to quantify the controllability of a fine-scale networked dynamical system given access only to coarse knowledge of network structure . Generally , without parametric structure , this is impossible . But real networks do have structure and so in our model we assume the fine-scale network has a connectivity induced by an underlying stochastic block model ( SBM ) . Approximation of high-dimensional ( fine-scale ) dynamical systems by lower-dimensional ( coarsescale ) ones is known as “ model order reduction ” ( MOR ) in the controls literature . There is a key difference in assumptions that differentiate our setting from that literature . In MOR the starting point is a complete description of the high-dimensional system . The task is to formulate a lower-dimension system , the dynamics of which well-approximate those of the full system . In contrast , we start from coarse summaries of the fine-scale system . We do not have access to the fine-scale dynamics and must exploit parametric knowledge ( via the assumption of a generative SBM ) . One might think of the distinction as akin to “ active ” versus “ passive ” MOR . Traditional MOR is active in that it actively decides how to coarsen the system to yield the best reduction . But for us , our knowledge is limited by the precision of our instrumental observations , so passively collected data is our starting point . Controllability is a function both of system dynamics and how we actuate the system ( Pasqualetti et al. , 2014 ; Yuan et al. , 2013 ) . Herein we assume that we both measure and actuate a system only coarsely . A control question we study is which coarse-level actuations are most “ influential ” in controlling the underlying fine-scale system . Such knowledge can assist with actuation selection ; e.g. , in our motivating epilepsy application , where best to position devices to be able to collapse the unstable brain-state oscillations that lead to seizures . ( O ’ Leary et al. , 2018 ; Pazhouhandeh et al. , 2019 ; Kassiri et al. , 2017 ; Shulyzki et al. , 2015 ) To accomplish our goal we characterize the average controllability of a vector of systems , each corresponding to a different coarse-scale actuation input . By comparing these vectors , and because these vectors well approximate the corresponding vectors for the fine-scale system , we aim ( in the long term ) to produce clinically-usable information for the neurologist . Contribution : Our work is the first of its kind that proposes a learning-based framework for inferring the controllability of fine networks from coarse measurements , and characterizes the mismatch between the controllability of the coarse and fine-scale networks . We study two approaches . 1 . In Section 5 , we build from MOR . We define an auxiliary , fictitious , reduced-order system based on the coarse data , and use the average controllability vector of this system to approximate that of the fine-scale system . We derive a tight upper bound on the “ approximationerror ” which is the sum of two terms . One term goes to zero as the coarse network size increases and the network becomes dense . The second term is a function of the synchronization between the coarse summary data and the underlying community structure . If synchronization is not sufficiently high , this term may not approach zero even as the network size increases . 2 . In Section 6 we learn the fine-scale system ’ s average controllability vector directly from the coarse data . This learning-based algorithm builds on the mixed-membership algorithm of Mao et al . ( 2017 ) for unsupervised learning of the parameters and the community structure of a SBM . We derive a tight upper bound on estimation error and characterize its convergence . Although the error bound implicitly depends on synchronization , unlike in the MOR-based approach , the error of this approach converges to zero as the coarse network size and its density increases . 2 BACKGROUND / RELATED WORK . Coarsened SBM as a generative process : The study of extracting community structure from coarse summaries is recent . The authors in ( Ghoroghchian et al. , 2021 ) used the stochastic block model ( SBM ) , developed in the community detection literature ( Abbe , 2017 ) , to lay out a framework for a coarsened and weighted variant of the SBM . We build off those results in this paper . The structure of many real-world networks , including brain networks is , at least empirically , known to have community structure across various spatial scales ( Sporns and Betzel , 2016 ; Pavlović et al. , 2020 ) . The SBM and its variants provide a powerful modeling framework to facilitate fundamental understanding of graph community organization and have found applications in many domains , including social and power networks . ( Dulac et al. , 2020 ; Funke and Becker , 2019 ; Abbe , 2017 ) . Complex networks controllability : The development of control methods for complex networks is a major effort in network science ( Scheid et al. , 2020 ) . Coupling traditional notions of controllability with graph theory reveals several insights into the role of network structure ( e.g. , presence of communities , diameter , and sparsity ) , size , and edge weight strength in controlling large-scale networks ( Wu-Yan et al. , 2018 ; Kim et al. , 2018 ; Constantino et al. , 2019 ; Sun , 2015 ) . Further one may want to understand which group of nodes , when actuated as inputs , can be used to steer the network to an arbitrary target state , and at what cost ( Cortesi et al. , 2014 ; Gu et al. , 2015 ) . Recent works in network neuroscience Gu et al . ( 2015 ) have popularized the notion of average controllability . This scalar metric associate a measure the relative control influence of a group of nodes . In this paper we consider a vector of such scalar measures to study the comparative influence of different sets of nodes . To the best of our knowledge ours is the first work that characterizes this type of error bounds for the controllability of coarse graphs . 3 PRELIMINARY NOTIONS . Notation : We denote vectors and matrices using bold faced small and upper case letters . The n dimensional all-ones and -zero vectors are denoted by 1n and 0n . For M = [ Muv ] ∈ Rn×m , define ‖M‖∞ = max1≤u≤n ∑m v=1 |Muv| ; ‖M‖max = maxu , v |Muv| ; and ‖M‖2 = √ λmax ( MTM ) . Let m = n , then define the spectral radius by ρ ( M ) = maxi { |λi| } ; diag ( M ) = [ M11 , . . . , Mnn ] T ∈ Rn ; and Diag ( M ) sets the off-diagonal entries of M to zero . For matrices M′is with arbitrary dimensions , BlkDiag ( M1 , . . . , Md ) denotes the block diagonal matrix . The inequality M1 ≤M2 implies element wise inequality . We write f ( n ) = O ( h ( n ) ) iff there exist positive reals c0 and n0 such that |f ( n ) | ≤ c0h ( n ) for all n ≥ n0 . The support of a vector , supp ( m ) , is the set of indices i such that mi 6= 0 . The cardinality of a set V is denoted by |V| . For a positive integer m , we denote [ m ] , { 1 , . . . , m } . 1 ( m ) returns a vector of same size with non-zero replaced by 1 . Networks : A network is defined by an un-directed graph G , ( V , E ) , where the node set V , { 1 , . . . , n } and edge set E ⊆ V × V . For an edge ( u , v ) ∈ E , assign the weight Auv = Avu ∈ R , and define the weighted symmetric adjacency matrix of G as A , [ Auv ] , where Auv = Auv = 0 whenever Auv /∈ E . A random network is an un-directed graph with a random adjacency matrix . 3.1 LINEAR DYNAMICAL SYSTEM ON RANDOM NETWORK . For a network G with n nodes and the symmetric adjacency matrix A , associate a state xi [ k ] ∈ R to the i-th node , and let the nodes evolve with the linear and time-invariant ( LTI ) dynamics 1 : x [ t+ 1 ] = 1 c · tr ( A ) Ax [ t ] + Bu [ t ] , ∀ t = 0 , 1 , . . . . ( 1 ) The state x [ t ] = [ x1 [ t ] , . . . , xn [ t ] ] T is steered to an arbitrary value by an input u [ t ] ∈ Rn . Here , the input matrix B = Diag ( b ) ∈ Rn×n , where b ∈ { 0 , 1 } n determines which components of u [ t ] enters the network2 . For e.g. , for B = Diag ( 1n1 ,0n−n1 ) , the input enters the network through control nodes set K = { 1 , . . . , n1 } . The normalization c · tr ( A ) factor , with appropriately chosen constant c > 0 , ensures that system in Eq . 1 is asymptotically stable . Finally , we define Anom , 1c·tr ( A ) A for the normalized matrix , and use this convention throughout the paper . For fixed system matrix Anom , a necessary and sufficient condition for the asymptotic stability3 of Eq . 1 is that ρ ( Anom ) ≤ 1 . For random Anom , we consider the probabilistic stability : P [ ρ ( Anom ) ≤ 1 ] —the greater the value , the greater the chance that Anom is stable . For SBM generated random symmetric matrices , we provide sharp non-asymptotic lower bounds on P [ ρ ( Anom ) ≤ 1 ] . The networked LTI system in Eq . 1 is T-step controllable if x [ 0 ] = 0 can be steered to any target state x ∈ Rn for some inputs : u [ 0 ] , . . . , u [ T − 1 ] . The T -step controllability Gramian of Eq . 1 given below , among other things , allows us to study if Eq . 1 is controllable or not . CT ( Anom , B ) = ∑T−1 t=0 ( Anom ) tBBT ( Anom ) t. ( 2 ) By definition CT ( Anom , B ) 0 , and it is well known that G with n nodes is T -step controllable if n-step controllable ; or equivalently , CT ( Anom , B ) 0 . For other interesting properties of Eq . 2 we refer to ( Chen , 1999 ) . For the simplicity of exposition , we let T →∞ and consider the infinite time horizon Gramian : C ( Anom , B ) = limT→∞ CT ( Anom , B ) , which exists with 1 − P [ ρ ( Anom ) ≥ 1 ] ; see also Pasqualetti et al . ( 2014 ) . We drop the notation ( Anom , B ) in C when the context is clear . Average energy : A widely used metric to measure how hard or easy it is to control the network is average energy : ∫ ‖x‖2=1 x TC†x dx/ ∫ ‖x‖2=1 dx , which evaluates to n −1tr ( C† ) ( Cortesi et al. , 2014 ) . Here , where C† is the pseudo inverse , and xTC†x is the minimum control energy needed to steer x [ 0 ] = 0 to an arbitrary target state x ∈ Rn . Thus , average energy measures the minimum control energy required to steer x [ 0 ] = 0 to an arbitrary state uniformly distributed over the unit sphere . 1 One may think our LTI model as the linearized system of an underlying non-linear system . Controllability of non-linear systems require a case by case analysis and we leave this topic for future research . 2Alternatively , Bu [ t ] = BKuK [ t ] , where BK is the sub-matrix of B whose columns are indexed byK ⊂ [ n ] . However , we stick with notation in Eq . 1 to make our analysis less cumbersome . 3The LTI system Eq . 1 is asymptotically stable if ‖x [ t ] ‖2 → 0 as t→∞ , for u [ t ] = 0 and x [ 0 ] 6= 0 . Average controllability : Numerical computation of C† for large-scale networks is demanding . Owing to the fact that tr ( C† ) ≥ 1/tr ( C ) , one uses tr ( C ) —called the average controllability—as a proxy for average energy Gu et al . ( 2015 ) . The higher the average controllability is for a given set of control nodes defined by B , the smaller their average energy , thus higher their influence on the network . | The paper studies the problem of controlling the dynamics of a networked dynamical system, under partial observations. Such systems arise in a number of applications, and therefore the control problem is important and well motivated. The authors consider a reduced order system from coarse data, and derive bounds on the convergence and approximation error for the original dynamical systems model. These are evaluated empirically on a small synthetic dataset | SP:64d7728c0dc05f53fa69d32459083559d839f017 |
Design and Evaluation for Robust Continual Learning | 1 INTRODUCTION . Continual learning is the ability to learn from new non-stationary data without catastrophic forgetting ( McCloskey & Cohen , 1989 ; Goodfellow et al. , 2013 ; Kemker et al. , 2018 ) previously learned experiences ( Thrun & Mitchell , 1995 ; Hsu et al. , 2018 ; Parisi et al. , 2019 ) . Unlike transfer learning approaches which are focused on one-directional transfer from a source to a target task ( Bengio , 2012 ; Yosinski et al. , 2014 ) and are not concerned with forgetting the source task , continual learning requires the model to maintain acceptable performance for the source task while learning the new target task . Various techniques have been developed to tackle catastrophic forgetting ; however , the majority of the methods require a task oracle ( identifier ) to identify which task each input example belongs to ( Kirkpatrick et al. , 2017 ; Shin et al. , 2017 ; Sener & Koltun , 2018 ) . Often in experimental evaluations , a human plays the role of the oracle , with no intrinsic justification for the choice of tasks . Typical evaluations of continual learning methods generate synthetic tasks by splitting or permuting the input data and presenting the resulting tasks in sequence ( van de Ven & Tolias , 2019 ; Aljundi et al. , 2019a ) . For example , in SplitMNIST , a common dataset sequence used in continual learning , the ten digits are partitioned into chunks composed of two or more digits . Often , the data is split into five chunks , and each chunk has only two digits to classify . A task oracle ( identifier ) may label the chunks of the incoming data sequence as tasks . Specifically , we use chunk to avoid implicitly assuming these matches with task labels as this may provide unintentional information for performance boost . We may still choose a task oracle to have the same sequence but will need to be cognizant of the assumption . In Section 2 , we propose six rules to help design experiments to test and understand these assumptions . In general , a task oracle is not available , and a clear separation of tasks is unlikely to be defined or known ( Caccia et al. , 2020 ) . Real-world applications are unlikely to exhibit strict sequencing of tasks ; instead , they may exhibit mixing and transitioning between input distributions . It is important to be careful with assuming having a task oracle as the extra information provided will unfairly bias the evaluation of continual learning methods . Hence , in this work , we consider a variety of input sequences that may occur in a continual learning problem . We demonstrate the more difficult scenario , which we called unrestricted scenario , where only limited task information is supplied to the methods during training . Farquhar & Gal ( 2018 ) and van de Ven & Tolias ( 2019 ) suggest that continual learning research should shift away from task oracle-based methods . Although we share this sentiment , we do believe that a task oracle may still play a role in continual learning research , despite limiting real-world applications . However , researchers must apply robust experimental design to surface assumptions about learning scenarios . In this work , we investigate the effects of task identification and experimental protocols in continual learning . Firstly , we propose six rules for robust evaluation of continual learning methods . Secondly , we extend published continual learning methods to support non-sequential tasks and evaluate the methods with a more extensive range of input arrival sequences and task partitionings to demonstrate the shortcoming of existing assumptions and protocols . We show a sequential split input sequence is most prone to catastrophic forgetting and current experimental protocols may not be evaluating the continual learning methods fairly . Finally , we discuss the application of the six rules on experimental design and interpretation of new experiments . We suggest the continual learning researchers should consider three different sequences : data , task identifier and evaluation identifier when designing experiments . 2 EXPERIMENTAL DESIGN FOR CONTINUAL LEARNING . Experimental and implementation choices have a significant effect on the performance of continual learning methods . While it is infeasible to consider all choices and their effects , it is still desirable to be able to fairly compare different methods and interpret the results . We propose six rules to aid in the design of robust experiments for continual learning . 2.1 RULE 1 : TEST EXTREMES . Although it is infeasible to test all possible setups , experiments should cover extreme settings that can test the continual learning method to give a more expository understanding of the methods . When we allow different ordering of experimental sequences , there is an exponential number of possible sequences of data . In particular , the effects of the methods should compare to extreme settings . Continual learning experiments consider the sequential setting where the data are split into different sequences where each chunk of the split contains only a subset of classes . For example , splitting should be randomized rather than following some chosen order . In this case , we consider the extreme of the composition of the sequence , that is , grouping classes and their order of arrival to be random rather than alphabetical , numerical , or human categorization ( cognitive or artificial ) . Typical experimental settings for continual learning consist of data splitting into clearly defined chunks where each contains only certain classes . The extreme in this case is the separation of tasks . Most continual learning experiments only consider the case where tasks are perfectly separated into chunks . Other separations in different extremes should also be considered , such as where the data is random , and all tasks may be present in every batch ( i.e . the normal supervised learning setting ) . This extreme provides a baseline and ensures that the method does not rely on certain signals from the sequence ’ s setup . Rule 1 : Identify and test extreme settings in experimental setup and parameters . 2.2 RULE 2 : USE CLEAR BASELINES . Results derived from experiments with a dependency on the data sequence can vary depending on how the data sequence is presented . Implementation or experimentation choices that seem arbitrary may , in fact , have a significant effect that is difficult to predict . Even when an analytical derivation may be possible , the work may be tedious and ad hoc . Hence , we propose including a clearly identified baseline equivalent to a ’ random guess ’ for each experimental scenario . In experimental protocols for continual learning , extra information may be provided to the methods such that random guess baseline performance with the same extra information may not match our intuition . This means that providing a random guess classifier conforming to the experimental protocol is important to demonstrate the performance improvement attributable to the method . A concrete example of this can be seen in the multi-head task scenario experiment used in many studies ( von Oswald et al. , 2020 ; Lopez-Paz et al. , 2017 ; van de Ven & Tolias , 2019 ; Mirzadeh et al. , 2020 ) . For example , when splitting CIFAR100 into 10 tasks where each task has 10 classes , a task label is provided that limits the number of classes available to the classifier . One might naively think that random guess is 1 % ( 1 out 100 classes ) , but due to experimental setup , the baseline is 10 % ( 1 out 10 classes ) . Predicting random guess performance is difficult in more complicated experimental setups . Hence , providing a random guess classifier helps to identify the baseline of an experimental setup with ease . Rule 2 : Provide random guess implementations that conform to experimental setup for clear identification of baselines of the setting . 2.3 RULE 3 : TEST SIMPLE METHODS . Due to the extra information that naturally arises from the experimental setup in continual learning literature , it is important to provide simple methods that utilize this information . Many continual learning methods inherently uses task information which is usually not obvious . There is an attempt to move away from this paradigm towards a task-agnostic approach ( Lee et al. , 2020 ; Zeno et al. , 2018 ; Aljundi et al. , 2019a ) . However , regardless of the fairness or applicability of providing task information , when they are provided , other simple methods which also use this information should be compared to . Naive multi-model , where each model is assigned a task , is a possible simple method to consider when task information is given . Each individual model is independent and there is no sharing between the models . The experiment supplies a task label for each input example , hence we can pick the model associated with the right task . This method uses the same information given to the continual learning methods to which we want to compare . Naive multi-model may also be used in a task-agnostic setting such as using entropy from prediction as a proxy of task label or task change . All models will give an output for each example . The model with the lowest entropy output is used for classification for the example . Some continual learning researchers consider naive multi-model as the upper bound result that can not be outperformed ( Mirzadeh et al. , 2020 ; Schwarz et al. , 2018 ; Chaudhry et al. , 2019 ; He et al. , 2019 ; Titsias et al. , 2020 ) . However , we believe that this simply demonstrates that continual learning literature needs better experimental protocols . Naive multi-model uses the same information as task oracle based methods but is simpler and can not make use of sharing to help combat forgetting and improve the learning of new data von Oswald et al . ( 2020 ) , hence it should not be considered an upper bound . Some multi-task learning where tasks are considered as different objective functions ( rather than as splitting data ) do exhibit improvement through sharing Kendall et al . ( 2018 ) . In this case , each input has multiple different objectives and using a shared model is better than multiple individual models . Rule 3 : Evaluate naive or simple methods for the experimental setting . 2.4 RULE 4 : RE-EVALUATE EXISTING BEHAVIOR . Often we assume that once some behavior of a model is established , it will continue to hold in further training and testing . However , this assumption is far from the empirical results . A clear example of this is continual learning itself where forgetting happens greatly ( Kirkpatrick et al. , 2017 ) . The same data with the same training length and setup but with slightly different ordering can greatly affect the results of the models . This rule when applied to continual learning considers re-evaluating whether the previous task is learned . Continual learning experiments rarely test learning behavior by revisiting the same task . Hence , we propose to consider an experimental setup where task is recapitulated during training and how this may affect the proposed methods . One consequence of this rule is to require that methods can correctly identify data that they have previously seen , rather than considering all new data as a new task . In methods that rely on task labels , this is not an issue since task labels will be provided for the recapitulating data . However , for task-agnostic methods that must provide their own means to separate data , this becomes important . This test is useful in detecting whether task-agnostic methods can reuse their previously learned components for new data of the same task or even previously seen data . Reusing existing components is essential , since the efficiency of training is better when we use generalized features that are already learned by the model . It also impacts the evaluation process , as in the task-agnostic setting , methods are greatly affected by the choice of task . For example , if there is a task-agnostic naive multi-model method then selecting the right model will significantly improve the prediction accuracy . Model size and memory usage will continuously grow if the method is unable to detect previously seen tasks . In the extreme , every new data may be considered a new task and the method may simply remember every example . This is a problem for many continual learning methods that rely on task boundary changes ( Rebuffi et al. , 2017 ; Kirkpatrick et al. , 2017 ; von Oswald et al. , 2020 ) . Rule 4 : Perform experiments with settings that recapitulate incoming data . | This work proposes 6 rules for continual learning experiments. Specifically, they propose to - 1) test for extreme continual learning settings, - 2) report random guess performance - 3) evaluate naive/simple methods - 4) revisit old data - 5) test for different task orders and - 6) define performance that derive from the data. Then, pan empirical study on different scenarios that emerge from the combinations of those rules is provided. | SP:0d39f7f68ef4bedb277b036022a3cd95eb4f4d5d |
TAMP-S2GCNets: Coupling Time-Aware Multipersistence Knowledge Representation with Spatio-Supra Graph Convolutional Networks for Time-Series Forecasting | Graph Neural Networks ( GNNs ) are proven to be a powerful machinery for learning complex dependencies in multivariate spatio-temporal processes . However , most existing GNNs have inherently static architectures , and as a result , do not explicitly account for time dependencies of the encoded knowledge and are limited in their ability to simultaneously infer latent time-conditioned relations among entities . We postulate that such hidden time-conditioned properties may be captured by the tools of multipersistence , i.e , a emerging machinery in topological data analysis which allows us to quantify dynamics of the data shape along multiple geometric dimensions . We make the first step toward integrating the two rising research directions , that is , time-aware deep learning and multipersistence , and propose a new model , Time-Aware Multipersistence Spatio-Supra Graph Convolutional Network ( TAMP-S2GCNets ) . We summarize inherent time-conditioned topological properties of the data as time-aware multipersistence Euler-Poincaré surface and prove its stability . We then construct a supragraph convolution module which simultaneously accounts for the extracted intra- and inter-dependencies in the data . Our extensive experiments on highway traffic flow , Ethereum token prices , and COVID-19 hospitalizations demonstrate that TAMP-S2GCNets outperforms the state-of-the-art tools in multivariate time series forecasting tasks . 1 INTRODUCTION . Multivariate time series forecasting plays an integral role in virtually every aspect of societal functioning , from biosurveillance to financial analytics to intelligent transportation solutions . In the last few years , Graph Convolutional Networks ( GCNs ) have emerged as a powerful alternative to more conventional time series predictive models . Despite their proven success , GCNs tend to be limited in their ability to simultaneously infer latent temporal relations among entities ( such as correlations both within a time series and in-between time series or the joint spatio-temporal dependencies ) . More generally , most existing GCNs architectures are inherently static and as such , do not explicitly account for time-conditioned properties of the encoded knowledge about the complex dynamic phenomena . At the same time , recent studies on integrating shape properties of the complex data into deep learning ( DL ) models indicate that topological representations , obtained using the tools of single parameter persistence , can bring an invaluable insight into the system organization and enhance the resulting graph learning mechanisms ( Hofer et al. , 2019 ; Carrière et al. , 2020 ; Carlsson & Gabrielsson , 2020 ; Horn et al. , 2021 ) . ( By shape here we broadly understand data properties which are invariant under continuous deformations , e.g. , stretching , bending , and twisting ) . However , in many applications , particularly , involving spatio-temporal processes , the data exhibit richer structures which can not be well encoded with a single parameter persistence . We postulate that many critical hidden time-conditioned interrelations which are inaccessible with other methods can be captured by the emerging machinery of multipersistence . Multipersistence , or multiparameter persistence ( MP ) generalizes the notion of single parameter persistence to a case when dynamics of the inherent data shape is discerned along multiple geometric dimensions ( Carlsson & Zomorodian , 2009 ) . Despite its premise , applications of MP in any discipline remain nascent at best ( Riess & Hansen , 2020 ; Kerber , 2020 ) . We make the first step on a path of bridging the two emerging directions , namely , time-aware DL with time-conditioned MP representations of complex dynamic phenomena . By time-conditioned MP representations , we mean the most salient topological properties of the data that manifest themselves over time . To summarize such time-conditioned topological properties , we first introduce a dynamic Euler-Poincaré surface as a new MP summary . We then propose a directed multilayer supra graph abstraction to represent a sequence of time-varying objects and develop a supragraph convolution module which allows us to simultaneously learn co-evolving intra- and inter-dependencies ( i.e. , spatial and temporal correlations ) in the complex high-dimensional data . The key novelty of this paper are summarized as follows : • This is the first work to bridge the concepts of MP with the time-aware learning paradigm . Applications of MP in any field of study are currently nascent . • We introduce a new time-aware multipersistence invariant , a dynamic Euler-Poincaré surface . We prove its stability and show its substantial computational gains and high utility for encoding the time-conditioned knowledge . • We propose a mathematical abstraction of directed multilayer supra graph for time-conditioned knowledge representation and construct a new Time-Aware Multipersistence Spatio-Supra Graph Convolutional Network ( TAMP-S2GCNets ) which simultaneously learns latent temporal interand intra-relations among entities in the complex high-dimensional data . • We perform expansive forecasting experiments , in application to highway traffic flow , Ethereum token prices , and COVID-19 hospitalizations . Our findings demonstrate superior predictive performance , versatility and computational efficiency of TAMP-S2GCNets , compared to the stateof-the-art methods in multivariate time series forecasting . 2 RELATED WORKS . Multipersistence Despite that MP demonstrates very promising results in terms of improving accuracy , tractability and robustness , applications of MP in ML are virtually non-existent ( Wright & Zheng , 2020 ; Riess & Hansen , 2020 ; Kerber , 2020 ) . Some notable efforts in the direction to develop MP summaries which are suitable for integration with ML models include Multiparameter Persistence Kernel of Corbet et al . ( 2019 ) , Multiparameter Persistence Landscapes ( MP-L ) of Vipond ( 2020 ) , and Multiparameter Persistence Images ( MP-I ) of Carrière & Blumberg ( 2020 ) which are based on the concept of slicing , that is , restricting the MP module to an affine line ( or single parameter persistence ) ( Cerri et al. , 2013 ; Landi , 2014 ) . Such slicing methods enjoy a number of important stability guarantees but tend to be computationally expensive even in static scenarios , which makes them infeasible for time series forecasting tasks . In turn , the most recent results of Beltramo et al . ( 2021 ) ( i.e. , Euler Characteristic Surfaces ) and Coskunuzer et al . ( 2021 ) ( i.e. , Multiparameter Persistence Grids ) introduce pointwise MP representations , in application to static point clouds and graphs . Such pointwise representations are weaker invariants but are substantially more computationally efficient . Integration of pointwise representation with ML models has not been yet investigated . Here we propose the first time-aware pointwise MP representation , a dynamic Euler-Poincaré surface , derive its theoretical properties and integrate it with GCN in time series forecasting tasks . Spatial-Temporal Graph Models and Forecasting Recent studies ( Li et al. , 2018 ; Yu et al. , 2018 ; Yao et al. , 2018 ) introduce graph convolution methods into spatio-temporal networks for multivariate time series forecasting which , as a result , allows for better modeling of dependencies among entities ( Wu et al. , 2019 ; Bai et al. , 2020 ; Cao et al. , 2020 ) and handling data heterogeneity . Despite the GCN successes , designs of the existing spatial-temporal GCNs largely rely on the pre-defined graph structures . As such , GCNs are restricted in their ability to explicitly integrate time dimension into the knowledge representation and learning mechanisms , thereby , limiting model adaptivity to the dynamic environments and requiring more frequent retraining . Most recently , Chen et al . ( 2021 ) propose a time-aware GCN , Z-GCNETs , for time series forecasting which integrates zigzag persistence images based on a single filtration , as the primary time-conditioned topological representation . In general , the zigzag concept can be combined with MP , but it requires more fundamental advances in the theory of algebraic topology . As such , our time-aware MP learning approach may be viewed as complementary to zigzag persistence , while considering time-changing connections of graph structures in dynamic networks . 3 TIME-AWARE MULTIPERSISTENCE EULER CHARACTERISTIC SURFACES . Spatio-Temporal Graph Construction We define a spatial network at time step t as Gt = ( Vt , Et , At , Xt ) , where Vt is a set of nodes and Et is a set of edges . We let |Vt| = N and |Et| = Mt . The adjacency matrix At ∈ RN×N , and Xt = { xt,1 , xt,2 , . . . , xt , N } > ∈ RN×FN is the node feature matrix with feature dimension FN . To construct the spatial network Gt , we can build the adjacency matrix At based on ( i ) the prior knowledge of graph structure : first-order neighbours , i.e. , At , uv = 1 if the node u and node v have a connection in the dynamic graph at the time step t ; and ( ii ) the Radial Basis Function ( RBF ) : degrees of similarity between instances ( i.e. , nodes ) in Xt , i.e. , At , uv = 1exp ( −||xt , u−xt , v||2/γ ) ≤ , where γ denotes the length scale parameter and denotes the threshold parameter filters noisy edges . Let T be the total number of time steps . Given a sequence of observations on a multivariate variable , X = { X1 , X2 , . . . , XT } ∈ RN×FN×T with T timestamps and FN node attributes , we construct spatio-temporal networks G = { G1 , G2 , . . . , GT } via either prior knowledge of network structure or applying RBF to the node feature matrix . Single Parameter Persistence Persistent homology ( PH ) based on one parameter discerns shape of the complex data along a single geometric dimension . The goal is to select some suitable parameter of interest and then to study a graph Gt not as a single object , but as a sequence of nested subgraphs , or a graph filtration G1t ⊆ G2t . . . ⊆ Gmt = Gt , induced by this evolving scale parameter . Armed with such filtration , we can then assess which structural patterns ( e.g. , loops and cavities ) appear/disappear and record their lifespans . To make the counting process more efficient and systematic , we build a simplicial complex Cit from each subgraph Git , resulting in a filtration C1t ⊆ C2t . . . ⊆ Cmt ( e.g. , clique complexes ) . For example , to construct such filtration , a common method is to consider a filtering function f : Vt 7→ R and the corresponding increasing set of thresholds { αi } m1 such that Cit = { ∆ ∈ Ct : maxv∈∆ f ( v ) ≤ αi } . The resulting construction is called a sublevel set filtration of f , and f can be selected , for instance , as degree , centrality , or eccentricity function ( Hofer et al. , 2020 ; Cai & Wang , 2020 ) . Similarly , f can be defined on the set of edges Et . More details on a single filtration PH can be found in Appendix B. Time-Aware Multiparameter Persistence ( TAMP ) Data in many applications , particularly , involving spatio-temporal modeling , might be naturally indexed by multiple parameters , e.g. , real time traffic flow and optimal route in urban transportation analytics . Alternatively , the primary focus might be on discerning shape properties of the complex data along multiple dimensions . For instance , to better predict cryptocurrency prices and manage cryptomarket investment performance , we may need to evaluate structural patterns in cryptoasset dynamics not along one dimension but simultaneously along the volume of transactions and transaction graph betweenness , as a measure of joint perception of the cryptomarket volatility among the key investors . Such multidimensional analysis of topological and geometric properties can be addressed using generalization of PH based on a single filtration to a multifiltration case . That is , the MP idea is to simultaneously assess shape characteristics of Gt based on a multivariate filtering function F : Vt 7→ Rd . As a result , e.g. , for d = 2 and a set of nondecreasing thresholds { αi } m1 and { βj } n1 , instead of a single filtration of complexes , we get a bifiltration of complexes { Cαi , βjt | 1 ≤ i ≤ m , 1 ≤ j ≤ n } such that if βk < βl , then C αi , βk t ↪→ C αi , βl t and if αi < αj , then C αi , βk t ↪→ C αj , βk t . Finally , this bifiltration induces a bigraded MP module { Hk ( Cαi , βkt ) } , where Hk is the kth homology group . Inspired by Beltramo et al . ( 2021 ) ; Coskunuzer et al . ( 2021 ) , we propose a new time-aware MP summary , namely , a Dynamic Euler-Poincaré Surface . Definition 3.1 ( Dynamic Euler-Poincaré Surface ) . Let { Gt } Tt=1 be a series of time-varying graphs . Let F = ( f , g ) be a multivariate filtering function F : Vt 7→ R2 with thresholds I = { ( αi , βj ) | 1 ≤ i ≤ m , 1 ≤ j ≤ n } . Let Cαi , βjt be the clique complex of the induced subgraph G αi , βj t = F−1 ( ( −∞ , αi ] × ( −∞ , βj ] ) , t = 1 , 2 , . . . , T and χ be the Euler–Poincaré characteristic . Then , a sequence of time-evolving m × n-matrices { Et } Tt=1 such that Etij = χ ( C αi , βj t ) for 1 ≤ i ≤ m , 1 ≤ j ≤ n is called Dynamic Euler-Poincaré Surface ( DEPS ) . ( Figure 2 in Appendix C shows a toy example how DEPS is computed . ) Theoretical Guarantees of DEPS Consider two graphs G+ and G− , where time index t is suppressed for brevity . Let F : V± 7→ R2 be a multivariate filtering function with thresholds I = { ( αi , βj ) | 1 ≤ i ≤ m , 1 ≤ j ≤ n } . Let C± be the clique complexes of G± , and let Ĉ± = { C+ij } be the bifiltration induced by ( C± , F , I ) as before . Let E± be the corresponding Euler-Poincaré Surfaces ( i.e. , m×n matrices ) . Then , set ‖E+−E−‖1,1 = ∑m i=1 ∑n j=1 |E + ij −E − ij | as the distance between E+ and E− , where ‖ · ‖1,1 is the vectorized L1 matrix norm . We now introduce an L1-based MP metric instead of using L∞-based metrics like , e.g. , matching or interleaving , due to the nature of our summaries E± ( see Remark C.1 in Appendix C ) . Let Dfk ( C± ) and Dgk ( C± ) be the kth single parameter persistence diagrams ( PDs ) of C± for filtrations induced by functions f , g : V± 7→ R , respectively ( see Appendix B ) . Let C±i∗ and C ± ∗j be clique complexes corresponding to G±i∗ = f−1 ( ( −∞ , αi ] ) and G ± ∗j = g −1 ( ( −∞ , βj ] ) . Define the ith column distance for the kth PDs as Dki∗ ( Ĉ + , Ĉ− ) =W1 ( Dgk ( C + i∗ ) , D g k ( C − i∗ ) ) , whereW1 is the Wasserstein-1 distance . Similarly , the jth row distance for kth PDs is Dk∗j ( Ĉ + , Ĉ− ) =W1 ( Dfk ( C + ∗j ) , D f k ( C − ∗j ) ) . Definition 3.2 ( Weak L1-metric for Multipersistence ) . The weak L1-metric between Ĉ± is D ( Ĉ+ , Ĉ− ) = max { Dc ( Ĉ + , Ĉ− ) , Dr ( Ĉ + , Ĉ− ) } , s.t . Dc ( Ĉ+ , Ĉ− ) = ∑M k=0 ∑m i=1 D k i∗ ( Ĉ + , Ĉ− ) and Dr ( Ĉ+ , Ĉ− ) = ∑M k=0 ∑n j=1 D k ∗j ( Ĉ + , Ĉ− ) . Now , we can state our stability result for Euler-Poincaré Surfaces . Theorem 3.1 . Let G± , F , Ĉ± , E± be as defined above . Then , the Euler-Poincaré Surfaces are stable with respect to the weak L1-metric , i.e. , ‖E+ − E−‖1,1 ≤ C ·D ( Ĉ+ , Ĉ− ) for some C > 0 . The proof of the theorem is given in Appendix C. This stability result implies that the distances between multiparameter PDs control the distance between the resulting Euler-Poincaré Surfaces . By combining with the stability result for PDs ( Cohen-Steiner et al. , 2007 ) , one can conclude that the small changes in the MP filtering function F : Vt 7→ Rd or the small changes in the input data can result only in a small change in DEPS surfaces . For further discussion on implications of the stability result , please refer to Remark C.2 . | This paper proposes the use of multi-parameter persistence (an emergent research topic in topological data analysis) to capture latent time-conditioned relations among nodes in a GNN. To do so, the authors introduce a dynamic Euler-Poincaré surface as a new multi-parameter persistence summary, and prove its stability and empirically show its computational efficiency. A "supra" graph convolution module is then proposed in order to allow for simultaneously learning co-evolving spatial and temporal correlations in the complex multivariate time-series data. The superior predictive performance of the proposed approach is shown empirically based on 3 different multi-variate time-series datasets from 3 different domains: highway traffic flow, Ethereum token prices, and COVID-19 hospitalizations. | SP:40cc8c0b50b53496cf272ac1f65794c41396a69c |
MANDERA: Malicious Node Detection in Federated Learning via Ranking | 1 INTRODUCTION . Federated learning ( FL ) has observed a steady rise in use across a plethora of applications . FL departs from conventional centralized learning by allowing multiple participating nodes to learn on a local collection of training data , before each respective node ’ s updates are sent to a global coordinator for aggregation . The global model collectively learns from each of these individual nodes before relaying the updated global update back to the participating nodes . With an aggregation of multiple nodes , the resulting model observes greater performance than if each node was to learn on their local subset only . FL presents two key advantages , increased privacy for the contributing node as local data is not communicated to the global coordinator , and a reduction in computation by the global node as the computation is offloaded to contributing nodes . However , the presence of malicious actors in the collaborative process may seek to poison the performance of the global model , to reduce the output performance of the model ( Chen et al. , 2017 ; Fang et al. , 2020 ; Tolpegin et al. , 2020b ) , or to embed hidden back-doors within the model ( Bagdasaryan et al. , 2020 ) . Byzantine attack aims to devastate the performance of the global model by manipulating the gradient values of malicious nodes in a certain fashion . As these attacks emerged , researchers seek to defend FL from the negative impacts of these attacks . In the literature , there are two typical defense strategies : malicious node detection and robust learning . Malicious node detection defenses by detecting malicious nodes and removing them from the aggregation ( Blanchard et al. , 2017 ; Guerraoui et al. , 2018 ; Li et al. , 2020 ; So et al. , 2021 ) . Robust learning ( Blanchard et al. , 2017 ; Yin et al. , 2018 ; Guerraoui et al. , 2018 ; Fang et al. , 2020 ; Cao et al. , 2020 ) , however , withstands a proportion of malicious nodes and defenses by reducing the negative impacts of the malicious nodes via various robust learning methods ( Wu et al. , 2020b ; Xie et al. , 2019 ; 2020 ; Cao et al. , 2021 ) . In this paper , we focus on defensing Byzantine attacks via malicious node detection . In the literature , there have been a collection of efforts along this research line . Blanchard et al . ( 2017 ) propose a defense referred to as Krum that treats local nodes whose update vector is too far away from the aggregated barycenter as malicious nodes and precludes them from the downstream aggregation . Guerraoui et al . ( 2018 ) propose Bulyan , a process that performs aggregation on subsets of node updates ( by iteratively leaving each node out ) to find a set of nodes with the most aligned updates given an aggregation rule . Xie et al . ( 2019 ) compute a Stochastic Descendant Score ( SDS ) based on the estimated descendant of the loss function , and the magnitude of the update submitted to the global node , and only include a predefined number of nodes with the highest SDS in the aggregation . On the other hand , Chen et al . ( 2021 ) propose a zero-knowledge approach to detect and remove malicious nodes by solving a weighted clustering problem . The resulting clusters update the model individually and accuracy against a validation set are checked . All nodes in a cluster with significant negative accuracy impact are rejected and removed from the aggregation step . Although the aforementioned methods try to detect malicious nodes in different ways , they all share a common nature : the detection is based on the gradient updates directly . However , it is usually the case that different dimensions of the gradients remain quite different in the range of values and follow very different distributions . This phenomena makes it very challenging to precisely detect malicious nodes directly based on the node updates , as a few dimensions often dominate the final result . Although the weighted clustering method proposed by Chen et al . ( 2021 ) could avoid this problem partially by re-weighting different update dimensions , it is often not trivial to determine the weights in a principled way . In this paper , we propose to resolve this critical problem from a novel perspective . Instead of working on the node updates directly , we propose to extract information about malicious nodes indirectly by transforming the node updates from numeric gradient values to the rank domain . Compared to the original numeric gradient values , whose distribution is difficult to model , the ranks are much easier to handle both theoretically and practically . Moreover , as ranks are scale-free , we no longer need to worry about the scale difference across different dimensions . We proved under mild conditions that the first two moments of the transformed rank vectors carry key information to detect the malicious nodes under a wide range of Byzantine attacks . Based on these theoretical results , a highly efficient method called MANDERA is proposed to separate the malicious nodes from the benign ones by clustering all local nodes into two groups based on the moments of their rank vectors . With the assumption that malicious nodes are the minority in the node pool , we can simply treat all nodes in the smaller cluster as malicious nodes and remove them from the aggregation . The contributions of this work are as follows . ( 1 ) We propose the first algorithm leveraging the rank domain of model updates to detect malicious nodes ( Figure 1 ) . ( 2 ) We provide theoretical guarantee for the detection of malicious nodes based on the rank domain under Byzantine attacks . ( 3 ) Our method does not assume knowledge on the number of malicious nodes , which is required in the learning process of prior methods . ( 4 ) We experimentally demonstrate the effectiveness and robustness of our defense on Byzantine attacks , including Gaussian attack , Sign Flipping attack and Zero Gradient attack , in addition to a more subtle Label Flipping data poisoning attack . ( 5 ) An experimental comparison between MANDERA and a collection of robust aggregation techniques are provided . The computation times are also compared , demonstrating gains of MANDERA by operating in the rank domain . 2 DEFENSE FORMALIZATION . 2.1 NOTATIONS . Suppose there are n local nodes in the federated learning framework , where n1 nodes are benign nodes whose indices are denoted by Ib and the other n0 = n − n1 nodes are malicious nodes whose indices are denoted by Im . The training model is denoted by f ( θ , D ) , where θ ∈ Rp×1 is a p-dimensional parameter vector and D is a data matrix . Denote the message matrix received from all local nodes by the central server as M ∈ Rn×p , where Mi , : denotes the message received from node i . For a benign node i , let Di be the data matrix on it with Ni as the sample size , we have Mi , : = ∂f ( θ , Di ) ∂θ . A malicious node j ∈ Im , however , tends to attack the learning system by manipulating Mj , : in some way . Hereinafter , we denote N∗ = min ( { Ni } i∈Ib ) to be the minimal sample size of the benign nodes . Given a vector of real numbers a ∈ Rp×1 , define its ranking vector as b = Rank ( a ) ∈ perm { 1 , · · · , p } , where the ranking operator Rank maps the vector a to its permutation space perm { 1 , · · · , p } which is the set of all the permutations of { 1 , · · · , p } . For example , Rank ( 1.1 , −2 , 3.2 ) = ( 2 , 3 , 1 ) . We adopt average ranking , when there are ties . With the Rank operator , we can transfer the message matrix M to a ranking matrix R by replacing its column M : ,j by the corresponding ranking vectorR : ,j = Rank ( M : ,j ) . Further define ei , 1 p p∑ j=1 Ri , j and vi , 1 p p∑ j=1 ( Ri , j − ei ) 2 to be the mean and variance of Ri , : , respectively . As it is shown in later subsections , we can judge whether node i is a malicious node based on ( ei , vi ) under various attack types . In the following , we will highlight the behaviour of the benign nodes first , and then discuss the behaviour of malicious nodes and their interactions with the benign nodes under various Byzantine attacks respectively . 2.2 BEHAVIOUR OF BENIGN NODES . As the behaviour of benign nodes does not depend on the type of Byzantine attack , we can study the statistical properties of ( ei , vi ) for a benign node i ∈ Ib before the specification of a concrete attack type . For any benign node i , the message generated for jth parameter is Mi , j = 1 Ni Ni∑ l=1 ∂f ( θ , Di , l ) ∂θj , ( 1 ) where Di , l denotes the lth sample on it . Throughout this paper , we always assume that Di , ls are independent and identically distributed ( IID ) samples drawn from a data distribution D. Under the independent data assumption , since Equation 1 tells us thatMi , j is the sample mean of IID random variables , i.e. , { ∂f ( θ , Di , l ) ∂θj } Ni l=1 , directly applying the Strong Law of Large Numbers ( SLLN ) and Central Limit Theorem ( CLT ) leads to the lemma below immediately . Lemma 1 . Under the independent data assumption , further denote µj = E ( ∂f ( θ , Di , l ) ∂θj ) and σ 2 j = Var ( ∂f ( θ , Di , l ) ∂θj ) < ∞ , with Ni going to infinity we have for ∀ j ∈ { 1 , · · · , p } Mi , j → µj a.s. and Mi , j →d N ( µj , σ 2 j /Ni ) . ( 2 ) 2.3 BEHAVIOUR OF MALICIOUS NODE UNDER THE GAUSSIAN ATTACK . Definition 1 ( Gaussian attack ) . In a Gaussian attack , the attacker manipulates malicious nodes to send Gaussian random messages to the global coordinator , i.e. , { Mi , : } i∈Im are independent random samples from Gaussian distributionMVN ( mb , : , Σ ) , where mb , : = 1n1 ∑ i∈Ib Mi , : and Σ is the covariance matrix determined by the attacker . Considering that Mi , j → µj almost surely ( a.s. ) with Ni going to infinity for all i ∈ Ib based on Lemma 1 , it is straightforward to see that limN∗→∞mb , j = µj a.s. , and the distribution ofMi , j for each i ∈ Im converges to the Gaussian distribution centered at µj . Lemma 2 provides the details . Lemma 2 . Under the same assumption as in Lemma 1 , with N∗ going to infinity , we have for each malicious node i ∈ Im under the Gaussian attack that Mi , j →d N ( µj , Σj , j ) , 1 ≤ j ≤ p. ( 3 ) Lemma 1 and Lemma 2 tell us that for each parameter dimension j , { Mi , j } ni=1 are independent Gaussian random variables with the same mean ( i.e , µj ) but different variances ( i.e. , σ2j /Ni or Σj , j ) under the Gaussian attack . Due to the symmetry of Gaussian distribution , it is straightforward to see E ( Ri , j ) = n+ 1 2 , 1 ≤ i ≤ n , 1 ≤ j ≤ p. Moreover , the exchangeability of benign nodes and the exchangeability of malicious nodes when N∗ is reasonably large tell us : for each parameter dimension j , there exist two positive constants s2b , j and s 2 m , j such that Var ( Ri , j ) = s 2 b , j , ∀ i ∈ Ib , and Var ( Ri , j ) = s2m , j , ∀ i ∈ Im , where both s2b , j and s 2 m , j are complex functions of σ 2 j , Σj , j and { Ni } i∈Ib . Further assume that Ri , j ’ s are independent of each other , thus ei = 1p ∑p j=1Ri , j is the sum of independent random variables with a common mean . Thus , according to the Kolmogorov Strong Law of Large Numbers ( KSLLN ) , we know that ei converges to a constant almost surely , which in turn indicates that vi also converge some constant almost surely . The Theorem 1 summarizes the results formally , with the detailed proof provided in Appendix C. Theorem 1 . Assuming { R : ,j } 1≤j≤p are independent of each other , under the Gaussian attack , we have for each local node i that lim N∗→∞ lim p→∞ ei = n+ 1 2 a.s. , ( 4 ) lim N∗→∞ lim p→∞ ( vi − s̄2b · I ( i ∈ Ib ) − s̄2m · I ( i ∈ Im ) ) = 0 a.s. , ( 5 ) where I ( · ) stands for the indicator function , s̄2b , 1p ∑p j=1 s 2 b , j and s̄ 2 m , 1 p ∑p j=1 s 2 m , j . Considering that s̄2b = s̄ 2 m if and only if Σj , j ’ s fall into a lower dimensional manifold whose measurement is zero under the Lebesgue measure , we have P ( s̄2b = s̄ 2 m ) = 0 if the attacker specifies the Gaussian variance Σj , j ’ s arbitrarily in the Gaussian attack . Thus , Theorem 1 in fact suggests that the benign nodes and the malicious nodes are different on the value of vi , and therefore provides a guideline to detect the malicious nodes . Although the we do need N∗ and p to go to infinity for getting the theoretical results in Theorem 1 , in practice the malicious node detection algorithm based on the theorem typically works very well when N∗ and p are reasonably large and Ni ’ s are not dramatically far away from each other . The independent rank assumption in Theorem 1 , which assumes that { R : ,j } 1≤j≤p are independent of each other , may look restrictive . However , in fact it is a mild condition that can be easily satisfied in practice due to the following reasons . First , for a benign node i ∈ Ib , Mi , j and Mi , k are often nearly independent , as the correlation between two model parameters θj and θk is often very weak in a larger deep neural network with a huge number of parameters . To verify the statement , we implemented independence tests for 100,000 column pairs randomly chosen from the message matrix M generated from the FASHION-MNIST data . Distribution of the p-values of these tests are demonstrated in Figure 2 via a histogram , which is very close to a uniform distribution , indicating that Mi , j and Mi , k are indeed nearly independent in practice . Second , even some M : ,j and M : ,k shows strong correlation , magnitude of the correlation would be reduced greatly during the transformation from M to R , as the final ranking Ri , j also depends on many other factors . Actually , the independent rank assumption could be relaxed to be uncorrelated rank assumption which assumes the ranks are uncorrelated with each other . Adopting the weaker assumption will result in a change of convergence type of our theorems from the “ almost surely convergence ” to “ convergence in probability ” , but with no essential influence to the our algorithm below . | The paper focuses on Byzantine defense through malicious node detection in a Federated Learning setting. Namely, by ranking the gradients and then computing the mean/SD, the paper shows that the malicious and benign clients will cluster separately. Assuming that the number of malicious clients is fewer than the number of benign clients, and the clusters correctly separate the malicious from benign, the smaller cluster is removed, and training is done on the gradients in the larger cluster. Appropriate experiments are done to show the ability of the model in malicious node detection along with analysis of performance and computational requirements. | SP:8f93bbdf09dfedfb72be6bee9d42932c66fb8535 |
Near-optimal Offline Reinforcement Learning with Linear Representation: Leveraging Variance Information with Pessimism | Offline reinforcement learning , which seeks to utilize offline/historical data to optimize sequential decision-making strategies , has gained surging prominence in recent studies . Due to the advantage that appropriate function approximators can help mitigate the sample complexity burden in modern reinforcement learning problems , existing endeavors usually enforce powerful function representation models ( e.g . neural networks ) to learn the optimal policies . However , a precise understanding of the statistical limits with function representations , remains elusive , even when such a representation is linear . Towards this goal , we study the statistical limits of offline reinforcement learning with linear model representations . To derive the tight offline learning bound , we design the variance-aware pessimistic value iteration ( VAPVI ) , which adopts the conditional variance information of the value function for time-inhomogeneous episodic linear Markov decision processes ( MDPs ) . VAPVI uses the estimated variances of the value functions to reweight the Bellman residuals in the least-square pessimistic value iteration and provides improved offline learning bounds over the existing best-known results ( whereas the Bellman residuals are equally weighted ) . More importantly , our learning bounds are expressed in terms of system quantities , which provide natural instance-dependent characterizations that previous results are short of . We hope our results draw a clearer picture of what offline learning should look like when linear representations are provided . 1 INTRODUCTION . Offline reinforcement learning ( offline RL or batch RL Lange et al . ( 2012 ) ; Levine et al . ( 2020 ) ) is the framework for learning a reward-maximizing policy in an unknown environment ( Markov Decision Process or MDP ) 1 using the logged data coming from some behavior policy µ . Function approximations , on the other hand , are well-known for generalization in standard supervised learning . Offline RL with function representation/approximation , as a result , provides generalization across large state-action spaces for the challenging sequential decision-making problems when no iteration is allowed ( as opposed to online learning ) . This paradigm is crucial to the success of modern RL problems as many deep RL algorithms find their prototypes in the literature of offline RL . For example , Xie and Jiang ( 2020 ) provides a view that Fitted Q-Iteration Gordon ( 1999 ) ; Ernst et al . ( 2005 ) can be considered as the theoretical prototype of the deep Q-networks algorithm ( DQN ) Mnih et al . ( 2015 ) with neural networks being the function representors . On the empirical side , there are a huge body of deep RL-based algorithms Mnih et al . ( 2015 ) ; Silver et al . ( 2017 ) ; Fujimoto et al . ( 2019 ) ; Kumar et al . ( 2019 ) ; Wu et al . ( 2019 ) ; Kidambi et al . ( 2020 ) ; Yu et al . ( 2020 ) ; Kumar et al . ( 2020 ) ; Janner et al . ( 2021 ) ; Chen et al . ( 2021a ) that utilize function approximations to achieve respective successes in the offline regime . However , it is also realized that practical function approximation schemes can be quite sample inefficient ( e.g . millions of samples are needed for deep Q-network to solve certain Atari games Mnih et al . ( 2015 ) ) . 1The environment could have other forms as well , e.g . partially-observed MDP ( POMDP ) or non-markovian decision process ( NMDP ) . To understand this phenomenon , there are numerous studies consider how to achieve sample efficiency with function approximation from the theoretical side , as researchers find sample efficient algorithms are possible with particular model representations , in either online RL ( e.g . Yang and Wang ( 2019 ; 2020 ) ; Modi et al . ( 2020 ) ; Jin et al . ( 2020 ) ; Ayoub et al . ( 2020 ) ; Jiang et al . ( 2017 ) ; Du et al . ( 2019 ) ; Sun et al . ( 2019 ) ; Zanette et al . ( 2020 ) ; Zhou et al . ( 2021 ) ; Jin et al . ( 2021a ) ; Du et al . ( 2021 ) ) or offline RL ( e.g . Munos ( 2003 ) ; Chen and Jiang ( 2019 ) ; Xie and Jiang ( 2020 ) ; Jin et al . ( 2021b ) ; Xie et al . ( 2021a ) ; Duan et al . ( 2021 ) ; Nguyen-Tang et al . ( 2021 ) ; Zanette et al . ( 2021 ) ) . Among them , the linear MDP model ( Yang and Wang , 2020 ; Jin et al. , 2020 ) , where the transition is represented as a linear combinations of the given d-dimensional feature , is ( arguably ) the most studied setting in function approximation and there are plenty of extensions based upon it ( e.g . generalized linear model ( Wang et al. , 2021b ) , reward-free RL ( Wang et al. , 2020 ) , gap-dependent analysis ( He et al. , 2021 ) or generative adversarial learning ( Liu et al. , 2021 ) ) . Given its prosperity , however , there are still unknowns for understanding function representations in RL , especially in the offline case . • While there are surging researches in showing provable sample efficiency ( polynomial sample complexity is possible ) under a variety of function approximation schemes , how to improve the sample efficiency for a given class of function representations remains understudied . For instance , given a neural network approximation class , an algorithm that learns the optimal policy with complexity O ( H10 ) is far worse than the one that can learn in O ( H3 ) sample complexity , despite that both algorithms are considered sample efficient . Therefore , how to achieve the “ optimal ” /tight sample complexity when function approximation is provided is a valuable question to consider . On the other hand , it is known that tight sample complexity , due to the limit of the existing statistical analysis tools , can be very tough to obtain when function representation has a very complicated form . However , does this mean tight analysis is not hopeful even when the representation is linear ? • Second , in the existing analysis of offline RL ( with function approximation or simply the tabular MDPs ) , the learning bounds depend either explicitly on the data-coverage quantities ( e.g . uniform concentrability coefficients Chen and Jiang ( 2019 ) ; Xie and Jiang ( 2020 ) , uniform visitation measure Yin et al . ( 2021 ) ; Yin and Wang ( 2021a ) and single concentrability Rashidinejad et al . ( 2021 ) ; Xie et al . ( 2021b ) ) or the horizon length H ( Jin et al. , 2021b ; Uehara and Sun , 2021 ) . While those results are valuable as they do not depend on the structure of the particular problem ( therefore , remain valid even for pathological MDPs ) , in practice , the empirical performances of offline reinforcement learning are often far better than those non-adaptive bounds would indicate . Can the learning bounds reflect the nature of individual MDP instances when the MDP model has a certain function representation ? In this work , we think about offline RL from the above two aspects . In particular , we consider the fundamental linear model representations and ask the following question of interest : Can we achieve the statistical limits for offline RL when models have linear representations ? 1.1 RELATED THEORETICAL WORK . Offline RL with general function representations . The finite sample analysis of offline RL with function approximation is initially conducted by Fitted Q-Iteration ( FQI ) type algorithms and can be dated back to ( Munos , 2003 ; Szepesvári and Munos , 2005 ; Antos et al. , 2008a ; b ) . Later , Chen and Jiang ( 2019 ) ; Le et al . ( 2019 ) ; Xie and Jiang ( 2020 ) follow this line of research and derive the improved learning results . However , owing to the aim for tackling general function approximation , those learning bounds are expressed in terms of the stringent concentrability coefficients ( therefore , are less adaptive to individual instances ) and are usually only information-theoretical , due to the computational intractability of the optimization procedure over the general function classes . Other works impose weaker assumptions ( e.g . partial coverage ( Liu et al. , 2020 ; Kidambi et al. , 2020 ; Uehara and Sun , 2021 ) ) , and their finite sample analysis are generally suboptimal in terms of H or the effective horizon ( 1− γ ) −1 . Offline RL with tabular models . For tabular MDPs , tight learning bounds can be achieved under several data-coverage assumptions . For the class of problems with uniform data-visitation measure dm , the near-optimal sample complexity bound has the rate O ( H3/dm 2 ) for time-inhomogeneous MDPs ( Yin et al. , 2021 ) and O ( H2/dm ) for time-homogeneous MDPs ( Yin and Wang , 2021a ; Ren et al. , 2021 ) . Under the single concentrability assumption , the tight rate O ( H3SC ? / 2 ) is obtained by Xie et al . ( 2021b ) . In particular , the recent study Yin and Wang ( 2021b ) introduces the intrinsic offline learning bound that is not only instance-dependent but also subsumes previous optimal results . Offline RL with linear model representations . Recently , there is more focus on studying the provable efficient offline RL under the linear model representations . Jin et al . ( 2021b ) first shows offline RL with linear MDP is provably efficient by the pessimistic value iteration . Their analysis deviates from their lower bound by a factor of d ·H ( check their Theorem 4.4 and 4.6 ) . Later , Xie et al . ( 2021a ) considers function approximation under the Bellman-consistent assumptions , and , when realized to linear MDP setting , improve the sample complexity guarantee of Jin et al . ( 2021b ) by an order O ( d ) ( Theorem 3.2 ) .2 However , their improvement only holds for finite action space ( due to the dependence log |A| ) and by the direct reduction ( from Theorem 3.1 ) their result does not imply a computationally tractable algorithm . Concurrently , Zanette et al . ( 2021 ) considers the Linear Bellman Complete model and designs the actor-critic style algorithm that achieves tight result under the assumption that the value function is bounded by 1 . While their algorithm is efficient ( which is based on solving a sequence of second-order cone programs ) , the resulting learning bound requires the action space to be finite due to the mirror descent updates in the Actor procedure ( Agarwal et al. , 2021 ) . Besides , assuming the value function to be less than 1 simplifies the challenges in dealing with horizon H since when rescaling their result to [ 0 , H ] , there is a H factor blow-up , which makes no horizon improvement comparing to Jin et al . ( 2021b ) . On the other hand , Wang et al . ( 2021a ) ; Zanette ( 2021 ) study the statistical hardness of offline RL with linear representations by proofing the exponential lower bounds . As a result , none of the existing algorithms can achieve the statistical limit for the well-structured linear MDP model with the general ( infinite or continuous ) state-action spaces . Variance-aware studies . Talebi and Maillard ( 2018 ) first incorporate the variance structure in online tabular MDPs and Zanette and Brunskill ( 2019 ) tighten the result . For linear MDPs , Zhou et al . ( 2021 ) first uses variance structure to achieve the near-optimal result and the Weighted OFUL incorporates the variance structure explicitly in the regret bound . Recently , Variance-awareness is also considered in Zhang et al . ( 2021 ) for horizon-free setting and for OPE problem ( Min et al. , 2021 ) . | This paper proposes a re-weighting of the Bellman update for offline RL, using the variance term, that leads to an improved bound for offline RL. The paper is well written and easy to follow, with the key improvement (theoretically) easy to see. The core idea of the algorithm is a simple trick to re-weight the update and the analysis follows as in other offline RL works examining the statistical significance for offline value estimation. | SP:22e879b356b61d0358a66e9275ac841c4ec3e52c |
Deep convolutional recurrent neural network for short-interval EEG motor imagery classification | 1 INTRODUCTION . The use of Deep Neural Networks ( DNN ) for the challenging task of interpreting and classifying the noisy and idiosyncratic signals produced by electroencephalography ( EEG ) is beginning to show promising results . Some of the best performing models , such as EEGNet ( Lawhern et al. , 2018 ) and ShallowFBCSP net ( Schirrmeister et al. , 2017 ) , have been used in end-to-end solutions that require little or no signal pre-processing . In this article , we propose an architecture for the classification of Motor Imagery ( MI ) signals ; viz. , the EEG signals elicited when participants imagine ( rather than physically perform ) a motor action , a topic of interest due to its potential as an interface modality , particularly for those with motor impairments . Traditional approaches to EEG signal classification , such as Common Spatial Pattern ( CSP ) ( Pfurtscheller & Neuper , 2001 ) and Filter Bank Common Spatial Patterns ( FBCSP ) ( Ang et al. , 2008 ) , have the advantage that they can interpret the EEG signals elicited by each MI event in terms of their spatial correlations ( e.g. , by decomposing eigenvalues by channel ( Pfurtscheller & Neuper , 2001 ) ) . Unfortunately , although these approaches yield high performance in two-class MI classification ( e.g. , left vs right ) , achieving good performance in four-class classification has been elusive , and it therefore seems unlikely that they can underpin more sophisticated BCI systems . Furthermore , CSP-based approaches are not end-to-end solutions , requiring a number of intermediate stages to achieve high performances . For instance , CSP approaches are sensitive to noise ( Devlaminck et al. , 2011 ) and require a priori feature selection , either automatically or through careful analysis to identify critical features ( such as optimal frequency bands ) . Furthermore , potentially useful information ( in terms of increasing classification accuracy ) could be lost when the signal is decomposed into covariance matrices and eigenvectors that other approaches may be able to capitalize upon . Approaches using the Discrete Wavelet Transform ( DWT ) ( Naeem et al. , 2006 ; Yusoff et al. , 2018 ) also typically require pre-processing steps for the interpretation of MI events in the frequency domain to improve signal-to-noise ratio ( SNR ) , such as spatial/temporal filtering and artefact removal . However , combining DWT with other approaches has the potential to enable more sophisticated analyses to be performed , and may help elucidate the association between observed EEG signals and the specific events , such as MI actions , that generated them . Nevertheless , DWT still requires a careful selection of the mother wavelet . A dimensionality reduction process is also commonly used , or features are calculated as metrics of the decomposition coefficients , implying a loss of potentially useful information and representing an obstacle to the construction of an end-to-end solution . Furthermore , the DWT features that would lead to the highest classification performance are best detected using longer trial windows , representing a challenge for their use in real-time systems . DNN interpretability is an emerging field that enables researchers to examine network decisions . Techniques to accomplish this include gradient-weighted Class Activation Mapping ( grad-CAM ) ( Selvaraju et al. , 2017 ) and attention mechanisms , used previously in computer vision and natural language processing domains ( Vaswani et al. , 2017 ; Bahdanau et al. , 2014 ) . At the time of writing , grad-CAM has not been used for DNN-mediated MI classification , but has been used successfully in a small number of EGG signal classification studies using wavelet transformation features ( Andreotti et al. , 2018 ) . Furthermore , only a handful of studies have employed attention mechanisms for MI classification : for instance , Zhang and colleagues ( Zhang et al. , 2019 ) achieved classification accuracy comparable with state-of-art methods using a Convolutional Recurrent Attention Model ( CRAM ) that uses time domain signals and incorporates an attention mechanism . Data augmentation is a commonly used technique that aims to improve the accuracy of a trained model and reduce model overfitting by expanding the volume of training data . Most often , new training data are generated in the image domain by cropping , flipping , rotating , adding noise , or modifying color properties of already existing training data ( Cireşan et al. , 2010 ; Zeiler & Fergus , 2014 ) . In this article , we develop a similar approach to expand EEG training data and observe increased classification accuracy . We also experimentally determine the minimum time interval and optimal time window needed to confer state-of-the-art classification accuracy . 2 METHODS . 2.1 DATASET . The public BCI Competition IV 2A EEG dataset ( Brunner et al. , 2008 ) was used . These data were collected from 9 participants and have four-classes ( i.e. , four MI movements : left hand , right hand , feet , tongue ) . Participants completed 250 trials ( thus there were 2250 signals captured in all ) . Each trial was about 9s in duration . At the start of each trial , a fixation cross was presented ( t = 0 ) . After 2s , an arrow was presented to instruct participant which of the four imagined movements to perform ( arrow pointing left for left hand , right for right hand , down for feet , and up for tongue ) . Participants were instructed to maintain the imagined movement until the arrow disappeared ( 4s later , at t = 6 ) . Next , a random inter-trial break between 2s and 4s occurred , during which a blank screen was shown . Data were collected from 22 silver chloride ( Ag/AgCl ) electrodes , positioned in the international 10-20 system ( Klem et al. , 1961 ) . Electrodes were sampled at 250 Hz . Data were band-pass filtered from 0.5 Hz to 100 Hz and notch filtered at 50 Hz to eliminate noise generated from electrical interference . The 4s portion of each signal in which MI was performed was extracted for use here , giving 1000 samples per trial at the sample rate of 250 Hz . From here onwards , when using the term trial , we refer to the 4s period in which the movement was imagined only . The dataset was divided into a training ( 80 ) and validation ( 20 ) sets . A testing set , provided separately by the BCI competition organizers , was used to evaluate the generalizability of the model since it was unseen during training and validation . 2.2 APPARATUS . An NVIDIA GeForce GTX 1050 GPU was used for calculating model parameters ( stochastic gradient descent and model updating , see later ) . CUDA 8 and PyTorch ( Paszke et al. , 2019 ) were used for model implementations . 2.3 DATA REPRESENTATION . The proposed models were evaluated using the four-class BCI IV 2A Competition dataset ( described above ) . For each participant , raw EEG data were stored in three-dimensional tensor , X . The first dimension was trial t ∈ [ 1 .. T ] ( where T represents the total number of trials per participant , here 250 ) , the second dimension was electrode number e ∈ [ 1 .. E ] ( where E represents the total number of electrodes , here 22 ) , and the third dimension was sample s ∈ [ 1 .. Smax ] , where Smax represents the number of samples in the longest trial for that participant , up to 4×250 . A label vector y contained the true class for each trial , j ∈ [ 1 .. T ] , wherein each value was a member of set C = { 0 , 1 , 2 , 3 } corresponding to the four classes , left hand ( 0 ) , right hand ( 1 ) , feet ( 2 ) and tongue ( 3 ) , thus |C| = 4 . 2.4 AUGMENTATION BY SHUFFLING CROPS AND SLIDING WINDOWS . An augmentation technique that appears to be novel in BCI research was used . New trials were generated by taking two non-overlapping intervals of 500 samples ( 2s ) from each 1000 sample ( 4s ) trial for each participant and grafting them together in reverse order . This had the effect of doubling the volume of data available for training , validation , and testing . Furthermore , for the runs using two seconds samples ( Smax = 500 ) , the four seconds samples ( Smax = 1000 ) were divided into two-two seconds introducing double the number of trials . To simulate real-time signals , overlapped cropped intervals were generated from both the original and augmented 4s data signals . Two window sizes were tested , ω ∈ { 200 , 400 } samples . One forward jump ( stride ) of σ = 50 samples ( 0.2s ) was used . Intervals ( sub-vectors ) from within each trial for each participant were generated for the sequence of sample indices [ r .. r+w ] , where r starts at 1 and was increased by σ until no further complete intervals could be collected . These sub-vectors are referred to later as time-slices . For each configuration , P time slices were created ( Eq . 1 ) . P = [ Smax − ω σ ] ( 1 ) 2.5 CONVOLUTIONAL RECURRENT NEURAL NETWORK WITH TEMPORAL ATTENTION . ( CRNN-TA ) 2.5.1 CONVOLUTIONAL NEURAL NETWORK ( CNN ) BLOCKS . CNN Block 1 : First , a standard convolution layer that operates simultaneously on the samples at each time index from all electrodes was used . Its purpose is to find correlations between electrodes . A kernel size ofE×1 was used . After convolution , batch normalization was applied with momentum set to 0.993 . A Leaky ReLU activation function ( Maas et al. , 2013 ) was then used , a variant of ReLU that can deal with negative values ( with gradient constant , α , set to 0.01 ) . Next , an average pool with kernel size 1×3 and stride size 1×3 was added to reduce feature dimensionality . CNN Block 2 : Two replicas of the second block type were added to deepen the model , such that each block comprised separable convolutional layers ( Chollet , 2017 ) to reduce the number of trainable parameters . Batch normalization and Leaky ReLU were again added . Following the nonlinear activation function , an average pool layer with kernel size 1×3 and stride 1×3 was used . Finally a dropout layer with dropout probability p = 0.5 was added . This generated encoded features ( feature maps ) , which are to be denoted M . The CNN blocks operated as a time-invariant system , wherein different time-slice positions were treated in the same way . In other words , the features in each time slice were stacked on top of each other ; e.g. , the 4D input tensor ( of order T ×E × P × S ) was transformed to a 3D matrix ( of order TP × E × S ) . The encoded features are then transformed back for the RNN block ( see below ) to learn time-slices dependencies . 2.5.2 RECURRENT NEURAL NETWORK ( RNN ) GRU BLOCK . Two stacked Gated Recurrent Unit ( GRU ) layers with 64 hidden units were used after the CNN blocks described above , operating on the time-slices , such that the recurrent operation is applied between each second on the encoded features obtained from the CNN blocks . The 2D latent feature matrix ( of order P ×H ) is defined as F ∈ RPH where P is the number of time slices , and H is the number of units in each hidden latent representation . The output of the GRU contains the output for each time slice ( rows , P ) for each of the hidden units ( columns , H ) . | The authors introduce a deep learning approach for short-time motor imagery classification using EEG data. Conventional CNN and RNN - GRU layers are used. Remarkably, a data augmentation strategy and a class-activation mapping approach are presented. Overall, the idea is interesting, but the paper presentation, the mathematical foundation, and the experiments provided are poor. Therefore, more details about the model and other experiments should be carried out to validate the proposal. Besides, the authors claim that short time interval EEG classification is achieved; however, 0.8s windows size does not seem to be a "short interval" compared to other state-of-the-art methods. | SP:063eee21dbfecedd3d8d0319f1a40d8debcb3c28 |
Improving State-of-the-Art in One-Class Classification by Leveraging Unlabeled Data | 1 INTRODUCTION . An input of a supervised binary classifier consists of two sets of examples : positive and negative . However , the access to clean samples from both classes can be obstructed in many realistic scenarios . A particularly well-studied restriction is the absence of clean negative examples . One of the approaches to deal with this restriction is One-Class ( OC ) classification ( Moya et al. , 1993 ) . Typically , OC algorithms treat available positive examples as normal data and try to separate it from previously unseen data , referred to as anomalies or outliers ( Grubbs , 1969 ; Hodge and Austin , 2004 ; Chandola et al. , 2009 ; Chalapathy et al. , 2018 ; Chalapathy and Chawla , 2019 ) . As noted in other studies ( Scott and Blanchard , 2009 ; Ruff et al. , 2020a ; b ) , OC algorithms necessarily make prior assumptions about negative distribution . For example , some methods assume negative distribution to be uniform ( Vert et al. , 2006 ; Scott and Nowak , 2006 ) or concentrated where positive data are rare ( Tax and Duin , 2004 ; Ruff et al. , 2018 ) , model negative distribution as a Gaussian ( Oza and Patel , 2018 ) , or separate positive data from the origin ( Schölkopf et al. , 2000 ) . Another approach to classification in the absence of negative data is Positive-Unlabeled ( PU ) learning ( Denis , 1998 ; Denis et al. , 2005 ; Li and Liu , 2005 ) . In addition to a clean positive sample , PU algorithms leverage an unlabeled set of mixed positive and negative examples . In contrast to OC methods , PU methods approximate negative distribution ( Elkan and Noto , 2008 ; Ivanov , 2019 ) , its statistics ( Du Plessis et al. , 2014 ; 2015 ; Kiryo et al. , 2017 ) , or samples from it ( Yu et al. , 2002 ; Liu et al. , 2002 ; Li and Liu , 2003 ; Xu et al. , 2019 ) , by comparing positive and unlabeled data . This approach can even outperform supervised classification , given a sufficient amount of unlabeled data ( Niu et al. , 2016 ; Kiryo et al. , 2017 ) . Because PU methods make fewer assumptions and have access to more data , they might seem favorable to OC methods whenever unlabeled data are at hand . However , our experiments show that dependence on unlabeled data may hinder PU methods in particularly extreme cases , which we refer to as cases of unreliable unlabeled data . We identify several such cases , including distributional shifts in unlabeled data , scarcity of unlabeled data , and scarcity of latent negative examples in unlabeled data . We present a motivational example of a possible effect of distributional shifts on PU models in Figure 1 . In subplots ( a , b ) a PU model approximates the separating line more accurately than an OC model . Conversely , in subplots ( c , d ) a shift of negative distribution causes the PU model to misclassify all negative examples , whereas the OC model is unaffected by the shift . One possible conclusion is to opt for using OC methods when unlabeled data is unreliable , but we aim to find a principled way to construct robust PU methods that can learn even from unreliable unlabeled data . To this end , we propose modifications of several modern OC algorithms that leverage unlabeled data . These modifications either are based on risk estimation techniques where the negative risk is approximated using positive and unlabeled data ( Kiryo et al. , 2017 ) , or simply replace positive data with unlabeled in algorithm-specific routines ( see Sections 3.2.4 , 3.2.5 ) . We find that all modifications benefit from reliable unlabeled data , but only modifications from the second group are safe to apply to unreliable unlabeled data ( i.e . either improve upon or perform on par with the original OC methods ) . We pinpoint this result to a crucial property that only the modifications from the second group possess : in the absence of latent negative examples , the PU modification becomes equivalent to the original OC algorithm . Our main practical recommendation is to use state-of-the-art PU algorithms when reliable unlabeled data is available and to use modifications of state-of-the-art OC algorithms that satisfy the property when robustness is a concern . A question remains how to identify the cases of unreliable unlabeled data . We find that scarcity of latent negatives can be statistically tested by comparing predictions of OC or PU models for positive and unlabeled samples . Similarly , a shift of negative distribution can be tested by comparing predictions for unlabeled data from training and testing distributions , providing the latter is available . Related Work There is a line of work in the OC literature that investigates ways to augment OC methods with additional data . Several studies find that exposure to a small and possibly biased sample of outliers can improve the performance of OC classifiers ( Hendrycks et al. , 2018 ; Ruff et al. , 2019 ; 2020b ) . Scott and Blanchard ( 2009 ) show both theoretically and empirically that unlabeled data help a classic machine learning algorithm to detect novelties . Nevertheless , there is a lack of modern literature that views OC and PU learning as different solutions to the same problem and gives practical recommendations for different scenarios . Our study attempts to fill this gap . The problem of unreliable unlabeled data is also underexplored in PU literature . One existing direction is concerned with robustness to class prior shift ( Charoenphakdee and Sugiyama , 2019 ) . While this is a useful property , we study a more severe case of arbitrary negative distribution shifts . Furthermore , an increase in proportions of positive class can be seen as a special case of negative distribution shift . We implement the latest PU method robust to class prior shifts as a baseline ( Nakajima and Sugiyama , 2021 ) . Other papers are concerned with arbitrary positive shifts ( Hammoudeh and Lowd , 2020 ) and covariate shifts ( Sakai and Shimizu , 2019 ) , but unlike us , they assume access to unbiased unlabeled data from the testing distribution . To the best of our knowledge , we address the problem of PU learning with shifted or scarce latent negatives for the first time . Our study is conceptually similar to the field of safe semi-supervised learning where the focus is on making unlabeled data never hurt while retaining performance ( Li and Zhou , 2014 ; Li and Liang , 2019 ; Guo et al. , 2020 ) . The difference is that we do not assume access to labeled negative data . 2 PROBLEM SETUP . Let x ∈ Rd be a data point and let y ∈ { 0 , 1 } be a binary label . Let s = 1 if the data point is labeled and 0 otherwise . We assume that only positive data can be labeled , i.e . p ( s = 1|y = 0 ) = 0 . We view x , y , s as random variables with some joint distribution f ( x , y , s ) . The probability density functions of positive or negative distributions are given by : fp ( x ) : = f ( x | y = 1 , s = 0 ) ( 1a ) fn ( x ) : = f ( x | y = 0 , s = 0 ) ( 1b ) Let fu ( x ) be the probability density function of unlabeled distribution , i.e . a mixture of positive and negative distributions , and α = p ( y = 1|s = 0 ) be the mixture proportion . We assume that the probability of being labeled p ( s = 1 | y = 1 ) is constant and independent of x , which is known as Selected Completely At Random ( SCAR ) setting ( Elkan and Noto , 2008 ) . In this case : fu ( x ) : = f ( x|s = 0 ) = αfp ( x ) + ( 1− α ) fn ( x ) ( 2 ) In OC methods we assume that only a sample Xp from fp ( x ) is available . In PU methods we assume the case-control scenario ( Bekker and Davis , 2020 ) : two sets of data Xp and Xu are sampled independently from fp ( x ) and fu ( x ) . Both OC and PU methods output some score function proportional to p ( x ) : = f ( y = 1|x , s = 0 ) that separates positive and negative data . PU methods often additionally estimate α . Since α is generally unidentifiable ( Blanchard et al. , 2010 ) , we will focus on estimation of its upper bound α∗ , as proposed in ( Jain et al. , 2016 ) . 3 METHODS . In this section , we first describe PU methods used in this study . We begin by describing Risk Estimation approach , which some of our PU modifications of OC algorithms are based on . Then , we describe DRPU and PAN , which we use for comparison as the most recent and state-of-the-art PU algorithms . In Appendix A.5 , we elaborate on this choice as state-of-the-art by comparing these algorithms with other existing PU algorithms . Finally , we describe OC methods used in this study and propose their PU modifications . Additional details are reported in Appendix B . 3.1 POSITIVE-UNLABELED METHODS . 3.1.1 RISK ESTIMATION . Let h ( x ) be an arbitrary decision function that estimates y , l ( t , y ) be loss function , i.e . the loss incurred for predicting t when the ground truth is y . Define R+p ( h ) = Ex∼fp ( l ( h ( x ) , 1 ) ) and R−n ( h ) = Ex∼fn ( l ( h ( x ) , 0 ) ) as positive and negative risks . If both positive and negative data are available , the risk of the decision function can be estimated as a weighted sum of positive and negative risks ( eq . 3a ) . In PU case , R−n ( h ) is unavailable but can be estimated as a difference between risks on positive and unlabeled data ( eq . 3b ) , as shown in ( Du Plessis et al. , 2014 ; 2015 ) . Rpn ( h ) = αR + p ( h ) + ( 1−α ) R−n ( h ) ( 3a ) Rpu ( h ) = αR+p ( h ) − αR−p ( h ) +R−u ( h ) ( 3b ) Estimator ( 3b ) can be improved by introducing a non-negativity constraint to reduce overfitting ( Kiryo et al. , 2017 ) : Rnn ( h ) = αR + p ( h ) + max ( 0 , −αR−p ( h ) +R−u ( h ) ) ( 4 ) Estimator ( 4 ) is called non-negative risk estimator . In practice , the decision function h is parameterized by θ , which can represent weights of a neural network or some other model . The parameters are trained to minimize Rnn ( h ( x | θ ) ) for some loss function like double hinge ( Du Plessis et al. , 2015 ) or sigmoid ( Kiryo et al. , 2017 ) . We use the latter . Notice that α is assumed to be identified in this method , so in experiments , we additionally estimate it with TIcE ( Bekker and Davis , 2018 ) . Risk estimation can be applied to modify any OC model to leverage unlabeled data , providing this OC model is based on or can be generalized to the supervised ( PN ) setting . This can be done by first replacing the OC objective with the PN objective , and then applying risk estimation to the PN objective , i.e . evaluating negative risk using positive and unlabeled samples . | This work empirically investigates using the PU loss in Positive-Unlabeled learning in the one-class classification task. The authors propose several PU modifications of the original classification algorithms that can leverage the unlabeled data. Experiments show improvements after the modifications. | SP:a12475329ccc3658d968469809564333113684dd |
Degradation Attacks on Certifiably Robust Neural Networks | 1 INTRODUCTION . An adversarial example for a neural classifier is the result of applying small modifications to a correctly classified valid input such that the modified input is classified incorrectly . For neural classifiers trained in a standard manner , it has been shown that adversarial examples are rampant ( Szegedy et al. , 2014 ; Carlini & Wagner , 2017 ) . While training models in an adversarially-aware manner helps mitigate the issue to an extent , it does not solve the problem , as evidenced by the large gaps between the clean accuracy and verified robust accuracy1 of models . Certifiably robust classifiers ( Weng et al. , 2018 ; Wong et al. , 2018 ; Cohen et al. , 2019 ; Leino et al. , 2021 ) offer the most rigorous solution to the problem and provably protect models against adversarial attacks . These classifiers are constructed by composing a standard classifier with a certified run-time defense . The defenses aim to detect adversarial examples during model evaluation , by checking if the model is -locally robust at the evaluated input . If the check fails , the input is flagged as ( potentially ) adversarial and the model rejects the input . However , a rejection is not free of cost . Every time the model rejects an input , a user of the model has to resort to some other process other than their presumed first choice ( the defended model ) to make a prediction , reducing model utility . We show that existing certified run-time defenses are overly cautious and susceptible to erroneously flagging non-adversarial inputs as adversarial . This over-cautiousness is inherent in the design of such defenses , and it is manifested even when the -local robustness check is exact ( i.e. , the defense is complete ) . Not only does this lead to a degradation in model utility because of unnecessary rejections , but it also exposes models to a new line of attack that we refer to as degradation attacks . We develop new attacks that are aimed at causing certifiably robust classifiers to reject inputs frequently , and we show that this is a significant problem in practice . For state-of-the-art certifiably robust models , such as GloRo Nets ( Leino et al. , 2021 ) and randomized smoothed models ( Cohen et al. , 2019 ) , our attacks succeed on as many as 56 % of the inputs where the model is already known to be robust . This is particularly distressing given the already considerable computational costs of training and defending certifiably robust models . As a concrete scenario , consider an autonomous driving system that uses a neural classifier for labeling road signs . It is unsafe for the classifier to misclassify adversarially perturbed road signs , and we want to prevent this at all costs . One simple strategy is for the classifier to always reject inputs and hand over decision-making to the human driver . This is perfectly safe behavior , but this model has zero utility . Ideally , we want the model to hand over control ( i.e. , the run-time defense should raise a flag ) only when the perturbed example is actually going to cause misclassification . Our result implies that an adversary can cause the model to hand over control to the human driver even when a perturbed input would not have 1 % of test inputs where the model is accurate and also locally robust been misclassified . Although this does not happen for all the inputs ( as in our simple example ) , it happens often enough that the adversary can cause a drastic and unnecessary reduction in model utility . Degradation attacks are successful because certified run-time defenses do not account for the data manifold . An adversarial example is obtained by applying modifications to valid inputs . We formalize valid inputs by means of a set M which is the support set of the underlying input distribution that characterizes the learning problem . Although the exact description ofM is unknown , we know that both the training and test data used are inM . In order for a model to be free of adversarial examples , it only needs to be locally robust at every point in M . Certified defenses , however , try to enforce local robustness at all evaluated inputs , irrespective of whether the input belongs to M . An incorrectly flagged non-adversarial input is then an input at which the local robustness check fails but if the model were not to reject the input , it would be classified consistently with all valid inputs within an distance . While a norm-bounded adversary can not change the classification of an input in the presence of a certified run-time defense , it can apply norm-bounded modifications to existing valid inputs ( i.e. , inputs in M ) and force the model to reject otherwise correctly classifiable inputs , thereby degrading the model ’ s utility . As we discuss in Section 4 , defenders against degradation attacks have two options : they can use existing methods for constructing certifiably robust models but trained and validated with double the radius that the adversary is allowed for perturbations , or they can develop new defense techniques that account for the fact that models only need to be locally robust at points in M . We evaluate the ramifications of the former option and leave the latter for future work . To summarize , the main contributions of our work are as follows : ( 1 ) we describe new attacks , referred to as degradation attacks , that can force certifiably robust models ( with either deterministic or stochastic defense mechanisms ) to frequently and unnecessarily reject inputs ; ( 2 ) we empirically demonstrate the severity of the problem for models using state-of-the-art certified defense mechanisms like GloRo Nets and Randomized Smoothing ; ( 3 ) we make explicit the set , M , from which valid inputs are drawn , and this helps us explain that certified run-time defenses , based on checking -local robustness , are susceptible to degradation attacks , as they enforce local robustness at all inputs and not just inputs inM ; and ( 4 ) we discuss two possible defenses against degradation attacks , and evaluate the one based on doubling the radius enforced by certifiably robust models . The rest of this paper is organized as follows . In Section 2 , we revisit definitions of adversarial robustness and sketch a general approach for certified defenses . In Section 3 , we demonstrate how a certified defense can unnecessarily reject inputs ; we present degradation attack algorithms to this end , and evaluate their efficacy . In Section 4 , we sketch two defenses against degradation attacks , and concretely evaluate one of these proposals . In Section 5 , we describe the related work . Finally , we conclude in Section 6 . 2 REVISITING DEFINITIONS OF ADVERSARIAL ROBUSTNESS . A neural classifier f∈Rd→L is a function from a d-dimensional real vector space , Rd , to a finite set of labels , L. The inputs to the classifier are drawn from some distribution with support setM⊆Rd . In other words , the training and test sets are comprised of elements fromM and their corresponding labels . Though the description of M is not available to us , it plays a key role in formalizing the notion of adversarial examples . An adversarial example for a neural classifier is the result of applying small modifications to a correctly classified valid input such that the modified input is classified incorrectly . Formally , an input is valid if it belongs toM . Definition 1 below , proposed by Szegedy et al . ( 2014 ) , formalizes the notion of a targeted adversarial example . Definition 1 ( Targeted Adversarial Example ) . Given a neural classifier f∈Rd→L and an input x∈Rd , an input x′ : =x+r is an adversarial example with respect to a target label l∈L , ` p metric , and a fixed constant ∈R if the solution r to the following optimization problem is such that ||r||p≤ : Minimize ||r||p subject to f ( x+r ) =l and x+r∈ [ 0,1 ] d Untargeted adversarial examples , or simply adversarial examples , are defined similarly except that the constraint f ( x+r ) =l is replaced with f ( x+r ) 6=f ( x ) . As stated informally in ( Carlini & Wagner , 2017 ; Szegedy et al. , 2014 ) x needs to be a valid input , i.e. , x∈M , for x′ to be an adversarial example . Making this requirement explicit and formal ( via set M ) is a key step in the design of our degradation attacks . Algorithm 2.1 : Prediction with a certified run-time defense Inputs : A model f∈Rd→L , an input x′∈Rd , an attack bound ∈R , and a distance metric ` p Output : A prediction l∈L ∪ { ⊥ } 1 PredictWithDefense ( f , x′ , , ` p ) : 2 if f is ( , ` p ) −locally robust at x′ then 3 return f ( x′ ) 4 else 5 return⊥ A classifier is protected from adversarial examples with respect to a valid input x if it is locally robust at x . As stated in Definition 2 , a classifier is locally robust at x , if its prediction does not change in an -ball centered at x . Definition 2 ( Local Robustness ) . A neural classifier f∈Rd→L is ( , ` p ) -locally robust at x∈Rd if , ∀x′∈Rd . ||x−x′||p≤ =⇒ f ( x ) =f ( x′ ) The formal notions of validity and local robustness enable us to make the following key observation . Observation 3 . A classifier is protected from all adversarial examples if it is locally robust at all points inM . Certified run-time defenses . Classifiers , when composed with certified run-time defenses , are guaranteed protection from adversarial examples . These defenses , briefly surveyed in Section 5 , detect adversarial examples during model evaluation ( or run-time ) by checking if the model is locally robust at the input being evaluated . Algorithm 2.1 describes the manner in which certified run-time defenses are deployed for protection . The common assumption is that an adversary has white-box access to f as well as to valid inputs ( denoted x ) , and that the adversary may or may not succeed in building adversarial examples ( denoted x′ ) that are -close to x under the ` p metric . Given input x′ , a certified run-time defense helps decide whether x′ is an adversarial example or not . As described by PredictWithDefense ( lines 1-5 ) , the defense mechanism is first used to check if the model f is locally robust at x′ ( line 2 ) . If the check passes , then x′ is guaranteed to not be an adversarial example and the model prediction at x′ is returned as the label ( line 3 ) . However , if the check fails , then x′ maybe an adversarial example , though it not guaranteed to be one . The model conservatively rejects the input , indicated here as returning the⊥ label ( line 5 ) . 3 DEGRADATION ATTACKS . In this section , we describe our degradation attack algorithms and demonstrate their efficacy empirically . First , in Section 3.1 , by means of an example , we demonstrate how certified defenses can lead to unnecessary rejections . Next , in Section 3.2 , we describe our degradation attack algorithms against deterministic and stochastic certified defenses . Finally , in Section 3.3 , we evaluate our attacks empirically . | This paper proposes a degradation attack on certifiable defenses GloRo and randomized smoothing aiming to find correct inputs within robustness region but hard to certify, causing rejections. The proposed attack is simple which is just a smoothed variance of PGD attack. Experimental results show that the two evaluated certification methods are susceptible to this attack. | SP:d962a80354f15ca16911902e946a774d85f8b8d8 |
On the Existence of Universal Lottery Tickets | 1 INTRODUCTION . Deep learning has achieved major breakthroughs in a variety of tasks ( LeCun et al. , 1990 ; Schmidhuber , 2015 ) , yet , it comes at a considerable computational cost ( Sharir et al. , 2020 ) , which is exaggerated by the recent trend towards ever wider and deeper neural network architectures . Reducing the size of the networks before training could therefore significantly broaden the applicability of deep learning , lower its environmental impact , and increase access ( Dhar , 2020 ) . However , such sparse representations are often difficult to learn , as they may not enjoy the benefits associated with over-parameterization ( Belkin et al. , 2019 ) . Frankle & Carbin ( 2019 ) provided a proof of concept that sparse neural network architectures are well trainable if initialized appropriately . Their lottery ticket hypothesis states that a randomlyinitialized network contains a small subnetwork that can compete with the performance of the original network when trained in isolation . Further , Ramanujan et al . ( 2020 ) conjectured the existence of strong lottery tickets , which do not need any further training and achieve competitive performance at their initial parameters . These tickets could thus be obtained by pruning a large randomly initialized deep neural network . Unfortunately , existing pruning algorithms that search for ( strong ) lottery tickets have high computational demands , which are often comparable to or higher than training the original large network . However , Morcos et al . ( 2019 ) posited the existence of so-called universal lottery tickets that , once identified , can be effectively reused across a variety of settings . Contributions .. • In this paper , we formalize the notion of universality , and prove a strong version of the original universal lottery ticket conjecture . Namely , we show that a sufficiently overparameterized , randomly initialized neural network contains a subnetwork that qualifies as a universal lottery ticket without further training of its parameters . Furthermore , it is adapted to a new task only by a linear transformation of its output . This view can explain some empirical observations regarding the required size of universal lottery tickets . • Our proof relies on the explicit construction of basis functions , for which we find sparse neural network representations that benefit from parameter sharing , as it is realized by convolutional neural networks . The fact that these representations are sparse and universal is the most remarkable insight . • To show that they can also be obtained by pruning a larger randomly initialized neural network , we extend existing subset sum results ( Lueker , 1998 ) and develop a proof strategy , which might be of independent interest , as it improves current bounds on pruning for general architectures by making the bounds depth dependent . Accordingly , the width of the large random network can scale as n0 ≥ O ( ntLt/L0 log ( ntL0/ ( Ltϵ ) ) ) to achieve a maximum error ϵ , where Lt denotes the depth and nt the width of the target network , and L0 the depth of the large network . • In support of our existence proofs , we adapt standard parameter initialization techniques to a specific non-zero bias initialization and show in experiments that pruning is feasible in the proposed setting under realistic conditions and for different tasks . Related work . The lottery ticket hypothesis ( Frankle & Carbin , 2019 ) and its strong version ( Ramanujan et al. , 2020 ) have inspired the proposal of a number of pruning algorithms that either prune before ( Wang et al. , 2020 ; Lee et al. , 2019 ; Tanaka et al. , 2020 ) or during and after training ( Frankle & Carbin , 2019 ; Savarese et al. , 2020 ) . Usually , they try to find lottery tickets in the weak sense , with the exception of the edge-popup algorithm ( Ramanujan et al. , 2020 ) that identifies strong lottery tickets , albeit at less extreme sparsity . In general , network compression is a problem that has been studied for a long time and for good reasons , see , e.g. , Lin et al . ( 2020 ) for a recent literature discussion . Here we focus specifically on lottery tickets , whose existence has been proven in the strong sense , thus , they can be derived from sufficiently large , randomly initialized deep neural networks by pruning alone . To obtain these results , recent work has also provided lower bounds for the required width of the large randomly initialized neural network ( Malach et al. , 2020 ; Pensia et al. , 2020 ; Orseau et al. , 2020 ; Fischer & Burkholz , 2021a ; b ) . In addition , it was shown that multiple candidate tickets exist that are also robust to parameter quantization ( Diffenderfer & Kailkhura , 2021 ) . The significant computational cost associated with finding good lottery tickets has motivated the quest for universal tickets that can be transferred to different tasks ( Morcos et al. , 2019 ; Chen et al. , 2020 ) . We prove here their existence . 1.1 NOTATION . For any d-dimensional input x = ( x1 , . . . , xd ) T , let f ( x ) be a fully connected deep neural network with architecture n̄ = [ n0 , n1 , ... , nL ] , i.e. , depth L and widths nl for layers l = 0 , ... , L , with ReLU activation function ϕ ( x ) : = max ( x , 0 ) . An input vector x ( 0 ) is mapped to neurons x ( l ) i as : x ( l ) = ϕ ( h ( l ) ) , h ( l ) = W ( l ) x ( l−1 ) + b ( l ) , W ( l ) ∈ Rnl−1×nl , b ( l ) ∈ Rnl , ( 1 ) where h ( l ) i is called the pre-activation of neuron i , W ( l ) the weight matrix , and b ( l ) the bias vector of layer l. We also write θ for the collection of all parameters θ : = ( ( W ( l ) , b ( l ) ) ) L l=1 and indicate a dependence of f on the parameters by f ( x|θ ) . We also use 1-dimensional convolutional layers , for which the width nl refers to the number of channels in architecture n̄ . For simplicity , we only consider 1-dimensional kernels with stride 1 . Larger kernels could simply be pruned to that size and higher strides could be supported as they are defined so that filters overlap . The purpose of such convolutional layers is to represent a univariate function , which is applied to each input component . Typically , we distinguish three different networks : 1 ) a large ( usually untrained ) deep neural network f0 , which we also call the mother network , 2 ) a smaller target network f , and 3 ) a close approximation , our lottery ticket ( LT ) fϵ , which will correspond to a subnetwork of f0 . fϵ is obtained by pruning f0 , as indicated by a binary mask B = ( bi ) i∈ { 0,1 } |θ0| that specifies for each parameter θi = biθi,0 whether it is set to zero ( bi = 0 ) or inherits the parameter of f0 by θi = θi,0 ( for bi = 1 ) . We usually provide approximation results with respect to the l1-norm ∥x∥ : =∑i |xi| but they hold for any p-norm with p ≥ 1 . C generally stands for a universal constant that can change its value from equation to equation . Its precise value can be determined based on the proofs . Furthermore , we make use of the notation [ n ] : = { 0 , ... , n } for n ∈ N , and [ n ] k for a k-dimensional multi-index with range in [ n ] . 2 UNIVERSAL LOTTERY TICKETS . Before we can prove the existence of strong universal LTs , we have to formalize our notion of what makes a strong LT universal . First of all , a universal LT can not exist in the same way as a strong LT , which is hidden in a randomly initialized deep neural network and is identified by pruning , i.e. , setting a large amount of its parameters to zero while the rest keep their initial value . For a ticket to be universal and thus applicable to a variety of tasks , some of its parameters , if not all , need to be trained . So which parameters should that be ? In deep transfer learning , it is common practice to only train the top layers ( close to the output ) of a large deep neural network . The bottom layers ( close to the input ) are reused and copied from a network that has been already trained successfully to perform a related task . This approach saves significant computational resources and often leads to improved training results . It is therefore reasonable to transfer it to LTs ( Morcos et al. , 2019 ) . Independently from LTs , we discuss conditions when this is a promising approach , i.e. , when the bottom layers of the deep neural network represent multivariate ( basis ) functions , whose linear combination can represent a large class of multivariate functions . The independence of the functions is not required and could be replaced by dictionaries , but the independence aids the compression of the bottom layers and thus our objective to find sparse LTs . This view also provides an explanation of the empirically observed phenomenon that universal tickets achieve good performance across a number of tasks only at moderate sparsity levels and become more universal when trained on larger datasets ( Morcos et al. , 2019 ; Chen et al. , 2020 ) . Including a higher number of basis functions naturally reduces the sparsity of a LT but also makes it adaptable to richer function families . 2.1 HOW UNIVERSAL CAN A LOTTERY TICKET BE ? . A trivial universal ticket . A trivial solution of our problem would be to encode the identity function by the first layers , which would only require 2d or d neurons per layer or even 1-2 neurons per convolutional layer . This would be an extremely sparse ticket , yet , pointless as the ticket does not reduce the hardness of our learning task . In contrast , it can not leverage the full depth of the neural network and needs to rely on shallow function representations . How could we improve the learning task ? The next idea that comes to our mind is to reduce the complexity of the function that has to be learned by the upper layers . For instance , we could restrict it to learn univariate functions . To explore this option , our best chance of success might be to utilize the following theorem . The Kolmogorov-Arnold representation theorem states that every multivariate function can be written as the composition and linear combination of univariate functions . In particular , recent results based on Cantor sets C promise potential for efficient representations . Thm . 2 in ( SchmidtHieber , 2021 ) shows the existence of only two univariate functions g : C → R and ψ : [ 0 , 1 ] → C so that any continuous function f : [ 0 , 1 ] d → R can be written as f ( x ) = g ( ∑d i=1 3 1−iψ ( xi ) ) . Furthermore , only g depends on the function f , while ψ is shared by all functions f and is hence universal . Could ∑d i=1 3 1−iψ ( xi ) be our universal LT ? Unfortunately , it seems to be numerically infeasible to compute for higher input dimensions d > 10 . In addition , the resulting representation of f seems to be sensitive to approximation errors . On top of this , the outer function g is relatively rough even though it inherits some smoothness properties of the function f ( cf . Schmidt-Hieber , 2021 ) and is difficult to learn . Thus , even restricting ourselves to learning an univariate function g in the last layers does not adequately simplify our learning problem . To make meaningful progress in deriving a notion of universal LTs , we therefore need a stronger simplification . | This paper proves that large enough randomly initialized ReLU networks can contain subnetworks, which can act as universal lottery tickets, that is, only by tuning the last layer of these subnetworks, they can approximate any (reasonably well-behaved) function. The paper does this by showing that large enough randomly initialized ReLU networks contain subnetworks such that their last hidden layer can act as the basis for a class of functions, and hence the output layer can simply take a linear combination of the neurons of the last hidden layer to approximate any function in that class. The paper proves this for polynomial and Fourier basis. Another key contribution of this paper is that it demonstrates that large depth can be leveraged to reduce the width needed for the strong lottery ticket hypothesis to hold. | SP:7280861bf3704c3cc2fbecb601956c716dae3eaf |
LatTe Flows: Latent Temporal Flows for Multivariate Sequence Analysis | 1 INTRODUCTION . One of the core objectives in machine learning research is to build models that accurately capture and explain complex structures in real-world systems . Much of unsupervised learning is driven by probabilistic generative modeling , which is notoriously difficult in high dimensions as a consequence of “ the curse of dimensionality. ” For example , biomarker observations ( e.g . heart rate and respiratory rate ) collected from wrist-worn devices are naturally collected sequentially from a large number of correlated features . Patterns and complex interactions in sensor signals have been shown to be associated with changes in physiology ( Goodale et al. , 2019 ) . Recorded time-series from different sensors can form multivariate time-series data . Joint probability modeling of these multivariate sensors across time allows for analysis of expected or abnormal patterns in physiological vital signs . Expressive time-series generative models can be used to perform sequential data analysis and forecasting . Specifically , these models allow for long-term predictions with uncertainty estimation ( Futoma et al. , 2016 ) , time-series data augmentation ( Wen et al. , 2020 ) , out-of-distribution detection ( Serrà et al. , 2019 ) , missing data imputation ( Luo et al. , 2018 ) , and improved model interpretability analyses ( Ismail et al. , 2020 ; Rooke et al. ) . Such information can be integrated into health monitoring systems ( Dunn et al. , 2021 ) . Given a sequence of data of dimensionality N , with N often large , a multivariate time-series forecasting model aims to effectively predict the future outcomes of each variable n ∈ { 1 , . . . , N } , given their past values . Typically , this process requires an accurate estimate of a multivariate conditional distribution of temporal transitions , making the task challenging in the high-dimensional setting . This task is challenging in terms of computational complexity and expressiveness due to the number of parameters required to be estimated for the multivariate parameterization . Thus , directly estimating the full predictive distribution of the future values in the high-dimensional observation space is sample-inefficient and may require a large amount of training data . The intractability of estimating such models for large systems , due to the growth in the number of parameters with di- mension , has limited existing methods to handle at most a few dimensions or requires restrictive assumptions such as tractable distribution classes ( Chung et al. , 2015 ) or low-rank approximations ( Salinas et al. , 2019a ) . An alternative way to tackle time-series generative modeling is to view the collection of data as N separate time sequences and fit a separate model for each of the dimensions . However , univariate techniques ( Zhang et al. , 2017 ; Oreshkin et al. , 2019 ; Montero-Manso et al. , 2020 ) , do not benefit from joint leaning of temporal dependencies between features and are thus limited in forecasting accuracy . Since many multivariate time-series in practical applications are highly correlated , it is crucial to learn both intra-series and inter-series patterns . Modeling dependency relationships among the variables between the individual time-series , including indirect relationships through shared latent causes ( Wang et al. , 2019 ) , shows promise in enhancing the performance of forecasting . Data dependencies may be hidden in high dimensions due to noise and high variance , and thus can be missed when conducting direct data analysis in the higher dimensional space . In such cases , we aim to learn dynamics in a compact latent space to enable faster forecasting , and potentially reveal latent trends . We assume that the observed , possibly high-dimensional , random vector representing the data of interest , is generated from an unobserved low-dimensional latent vector through a timevarying probabilistic process ( Zhang et al. , 2019 ) , ( Laumer et al. , 2020 ) , ( Louis et al. , 2019 ) , ( Chung et al. , 2015 ) , ( Yoon et al. , 2019 ) , ( Nguyen & Quanz , 2021 ) . By modeling a lower-dimensional latent vector by a ( stationary ) reversible embedding mapping , LatTe-Flows increases parsimony , while reducing computational complexity . These mappings are trained to favor latent representations that uncover latent dynamics over future latent states . Under LatTe-Flows , forecasts are generated by estimating the latent state evolution , along with recovery functions . Nonlinear mappings are trained via deep auto-encoder networks , while latent transition dynamics are learned using a combined structure of Normalizing Flows ( Rasul et al. , 2020 ; Dinh et al. , 2016 ; Papamakarios et al. , 2017 ) and a multivariate Recurrent neural network ( RNN ) ( Graves , 2013 ; Sutskever et al. , 2014 ) . Our extensive experiments on real-world datasets illustrate LatTe-Flows ’ state-of-the-art performance and computational tractability on the majority of the datasets considered . To demonstrate the ability of the proposed model to match the ground truth trajectory distribution , we apply LatTe-Flows on the Apple Heart and Movement Study ( AH & MS ) dataset for a challenging vital sensor-signal forecasting task . We visualize the 2-dimensional and 3-dimensional learned latent representations from our model to showcase the interpretable low-dimensional embeddings . These emebeddings show that LatTe-Flows is able to easily identify participants ’ V O2max , a main indicator and summary of cardiorespiratory fitness , while only being trained on relatively lower-level vital signals like resting heart rate and heart rate variability . 2 RELATED WORK AND OUR CONTRIBUTIONS . The literature on time-series forecasting has a long history—in this work , we mainly focus on recent developments in the deep learning context . Simple models for multivariate data , such as general State-Space Models ( SSMs ) ( Hamilton , 2020 ; Liu et al. , 2016 ) , N-BEATS ( Oreshkin et al. , 2019 ) , Gaussian Processes ( Rasmussen , 2003 ) , DeepAR ( Salinas et al. , 2020 ; Zhang et al. , 2017 ) learn one model per time-series ( univariate methods ) . As a consequence , they can not effectively capture complex structure and interdependencies between multiple time-series . Although multivariate probabilistic time-series forecasting models estimate the full predictive distribution , the number of parameters in these models grows quickly with the number of variables , which results in large computational cost and a high risk of overfitting in high dimensional settings . Methods such as Variational Recurrent Neural Networks ( VRNNs ) ( Chung et al. , 2015 ) or TimeGAN ( Yoon et al. , 2019 ) , either assume pre-selected tractable distribution classes or another type of structural approximation ( Salinas et al. , 2019a ) . In the low-rank Gaussian copula model , for instance ( Salinas et al. , 2019a ) , a multitask univariate LSTM ( Hochreiter & Schmidhuber , 1997b ) is used to output transformed time-series and diagonal and low-rank factors of a Gaussian covariance matrix . These assumptions can limit the distributional expressiveness of low-rank Gaussian copula models . Recently , more flexible models such as Temporal Conditioned Normalizing Flows ( Rasul et al. , 2020 ) have been proposed . This method uses a multivariate RNN to learn temporal dynamics with the state translated to the output joint distribution via a Normalizing Flow ( Dinh et al. , 2016 ) . However , during forecasting , an invertible flow is applied on the same number of latent dimensions as input dimensions , thus it does not scale to large numbers of time-series ( since RNNs have quadratic complexity in N ) . The work most closely related to ours is TLAE ( Nguyen & Quanz , 2021 ) , where the temporal model is applied across a low dimensional space . This method combines an RNN-based model with auto-encoders to learn a temporal deep learning latent space forecast model . TLAE focuses on the encoder/decoder modeling capabilities and assumes simplistic probabilistic structure on the latent vector ( multivariate Gaussian with diagonal covariance matrix ) , which can be restrictive . We stress that the encoder mapping for TLAE is time-dependent , along with the probabilistic model . Our key contributions in this work can be summarized as follows : • LatTe-Flows can model cross-series dependencies across time while scaling to large dimensions . We capture the joint temporal cross-series dynamics , by pairing non-linear dimensionality reduction with latent temporal distribution estimation , while scaling to a large number of time-series in RN as a consequence of reduced dimensionality of the ( joint model ) learning space . • Forecasting in LatTe-Flows is performed across a low dimensional space , enabling faster sequence generation . Instead of applying the temporal model across all series , multivariate forecasts in LatTe-Flows are generated across a low dimensional space , and then mapped back to the observation space . • We allow flexibly and expressive probabilistic models in the latent space . To increase model flexibility , we introduce explicit learning of the latent conditional distribution of temporal transitions without strong assumptions of traditional multivariate models . • We introduce a flexible end-to-end training process . We are able to harness stochastic gradient descent by combining the objectives for sequence reconstruction and latent probabilistic prediction . 3 PROBLEM STATEMENT AND PROPOSED APPROACH . Consider a collection of high dimensional multivariate time-series yn , t ∈ R , where n ∈ { 1 , 2 , . . . , N } indexes the individual univariate component time-series , and t indexes time . Consequently , the multivariate observation vector at time t is given by yt ∈ RN . Given a sequence of Ttotal vector realizations of yt , a multivariate time-series can be represented as a matrix Y , Y ∈ RN×Ttotal . We focus on the task of multivariate time-series multi-step forecasting . More formally , let us assume that we are given an observed history ( y1 , . . . , yT ) , sampled from the complete time-series history of the training data , where each instance consists of N temporal features ( that occur over time , e.g . vital sensor signals ) . Our goal is to learn future values of the series over a length-τ , τ > 0 , forecast horizon and predict a set of plausible future trajectories ( ŷT+1 , . . . , ŷT+τ ) by learning the conditional distribution p ( yT+1 : T+τ |y1 : T ) of temporal transitions . We refer to time-series yn,1 : T+τ as the target time-series , which for training is split according to a time range ( 1 , 2 , . . . , T ) referred to as context window , and to time ( T + 1 , T + 2 , . . . , T + τ ) as prediction horizon . The temporal dynamics of complex systems are often driven by fewer and lower-dimensional factors of variation ( Laumer et al. , 2020 ) , ( Louis et al. , 2019 ) , ( Chung et al. , 2015 ) , ( Yoon et al. , 2019 ) , ( Nguyen & Quanz , 2021 ) , ( Amiridi et al. , 2021 ) . We assume that the observed , possibly high-dimensional , random vector yt ∈ RN representing the data of interest is generated from an unobserved low-dimensional latent vector xt ∈ RD with D N through a time varying probabilistic process p ( xt|x1 : t−1 ) . To reduce the computational burden while at the same time improving distribution modeling , we propose incorporating representation learning in the generative learning problem to explicitly learn the temporal distribution of compact representations of input sequences . Specifically , LatTe-Flows consists of three key components : an embedding function g : RN → RD , a latent conditional distribution p ( xt|x1 : t−1 ) of temporal transitions , and a recovery function q : RD → RN . During training , the model simultaneously learns to produce sequence representations that will push a latent temporal generative model to predict plausible latent future sequences , recover them back into the observed space , and iterate across time . Given a model for p ( yT+1 : T+τ |y1 : T ) , one can estimate the conditional expectation , which can be expressed as a function of past observations : E [ yT+1 : T+τ |y1 : T ] = f ( y1 , . . . , yT ) . An indirect estimate of this function can be accomplished using the following strategy : during testing , future trajectories ( ŷT+1 , . . . , ŷT+τ ) are generated by embedding the past history via g : ( x1 = g ( y1 ) , . . . , xT = g ( yT ) ) , sampling from the latent future distribution ( x̂T+1 , . . . , x̂T+τ ) ∼ p ( ·|x1 : T ) , followed by applying a non-linear recovery function q : ( ŷT+1 = q ( x̂T+1 ) , . . . , ŷT+τ } = q ( x̂T+τ ) ) . Next , we describe each building block of our approach and the combined training strategy . | The authors propose a novel approach that scales well for multivariate sequence forecasting tasks. They offer to use conditional normalizing flow to capture the sequence dynamics in the latent space and then use auto-regressive architecture to decode the signal in the original space. The authors clearly explain why they prefer latent forecasting and experimentally verify the benefits of the proposed method on both widely used public datasets and the AH&MS dataset. | SP:13234b1c2a77b736e7f6187261c93815d2153663 |
Neural Spectral Marked Point Processes | 1 INTRODUCTION . Event sequence data are ubiquitous in our daily life , ranging from traffic incidents , 911 calls , social media posts , earthquake catalog data , and COVID-19 data ( see , e.g. , Bertozzi et al . ( 2020 ) ) . Such data consist of a sequence of events indicating when and where each event occurred , with additional descriptive information ( called marks ) about the event ( such as category , volume , or free-text ) . The distribution of events is of scientific and practical interest , both for prediction purposes and for inferring events ’ underlying generative mechanism . A popular framework for modeling events is point processes ( Daley & Vere-Jones , 2008 ) , which can be continuous over time and the space of marks . An important aspect of this model is capturing the event ’ s triggering effect on its subsequent events . Since the distribution of point processes is completely specified by the conditional intensity function ( the occurrence rate of events conditioning on the history ) , such triggering effect has been captured by an influence kernel function embedded in the conditional intensity . In statistical literature , the kernel function usually assumes a parametric form . For example , the original work by Hawkes ( Hawkes , 1971 ) considers an exponential decaying influence function over time , and the seminal work ( Ogata , 1998 ) introduces epidemic-type aftershock sequence ( ETAS ) model , which considers an influence function that exponentially decays over space and time . With the increasing complexity of modern applications , there has been much recent effort in developing recurrent neural network ( RNN ) -based point processes , leveraging the rich representation power of RNNs ( Du et al. , 2016 ; Mei & Eisner , 2017 ; Xiao et al. , 2017b ) . However , there are several limitations of existing RNN-based models . First , such models typically do not consider the kernel function ( Du et al. , 2016 ; Li et al. , 2018 ; Mei & Eisner , 2017 ; Upadhyay et al. , 2018 ; Xiao et al. , 2017a ; b ) ; thus , the RNN approach does not enjoy the interpretability of the kernel function based models . Second , the popular RNN models such as Long Short-Term Memory ( LSTM ) ( Hochreiter & Schmidhuber , 1997 ) still implicitly discounts the influence of events over time ( due to their recursive structure ) ( Vaswani et al. , 2017 ; Zhu et al. , 2021d ) . Such assumptions may not hold in many real-world applications . Take the earthquake catalog as an example , which is a typical type of discrete event data ; most aftershocks occur along the fault plane or other faults within the volume affected by the mainshock ’ s strain ( Zhu et al. , 2021b ) . This means that different regions may be correlated to their surrounding area differently according to their geological structure , which creates a complex non-stationary spatial profile that we would like to capture through the model . Third , a majority of the existing works mainly focus on one-dimensional temporal point processes . Although there are works on marked point processes ( Du et al. , 2016 ; Mei & Eisner , 2017 ; Reinhart , 2018 ) , they are primarily based on simplifying assumptions that the marks are conditionally independent of the event ’ s time and location , which is equivalent to assuming the kernel is separable ; these assumptions may fail to capture some complex non-stationary , time- and location-dependent triggering effects for various types of events , as observed for many real-world applications ( see , e.g. , ( Bertozzi et al. , 2020 ) ) . Contribution . In this paper , we present a novel general non-stationary point process model based on neural networks , referred to as the neural spectral marked point process ( NSMPP ) . The key component is a new powerful representation of the kernel function using neural networks , which enables us to go beyond stationarity ( and thus go beyond standard Hawkes processes ) and has the capacity to model high-dimensional marks . Figure 1 gives an example of non-stationary influence kernel that measures the influence of the past events to the future time t. The premise of the model design is that the conditional intensity function uniquely specifies the distribution of the point process , and the most important component in the intensity function is the influence kernel . In summary , the novelty of our approach includes the following : • The kernel function is represented by a spectral decomposition of the influence kernel with a finite-rank truncation in practice . Such a kernel representation will enable us to capture the most general non-stationary process as well as high-dimensional marks . The model also allows the distribution of marks to depend on time , which is drastically different from the separable kernels considered in the existing literature ( Reinhart , 2018 ) . • The spectral decomposition of asymmetric influence kernel consists of a sum of the product of feature maps , which can be parameterized by neural networks . This enable us to harvest the powerful expressiveness and scalability to high-dimensional input of neural networks for complicated tasks involving discrete events data . • We establish theoretical guarantees of the maximum likelihood estimate for the true kernel function based on functional variational analysis and finite-dimensional asymptotic analysis , which shed light on theoretical understanding of neural network-based kernel functions . • Using synthetic and real data ( seismic and police data ) , we demonstrate the superior performance of our proposed method in complex situations ; the performance gain is particularly outstanding for cases involving non-stationary point processes . Related work . Seminal works in point processes modeling ( Ogata , 1988 ; 1998 ) assume parametric forms of the intensity functions . Such methods enjoy good interpretability and are efficient to estimate . However , classical parametric models are not expressive enough to capture the events ’ dynamics in modern applications . Recent research interests aim to improve the expressive power of point process models , where a recurrent neural networks ( RNNs ) -based structure is introduced to represent the conditional intensity function ( Du et al. , 2016 ; Mei & Eisner , 2017 ; Xiao et al. , 2017b ) . However , most of these works either explicitly or implicitly specify the inter-event dependence in a limited form with restrained representative power . For example , Du et al . ( 2016 ) expresses the influence of two consecutive events in a form of exp { w ( ti+1 − ti ) } , which is an exponential function with respect to the length of the time interval ti+1 − ti with weights w ; Mei & Eisner ( 2017 ) enhances the expressiveness of the model and represents the entire history using the hidden state of an LSTM , which still implicitly assumes the influence of the history decays over time due to the recurrent structure of LSTM . Another line of research uses neural networks to directly model dependence of sequential events without specifying the conditional intensity function explicitly ( Li et al. , 2018 ; Xiao et al. , 2017a ) . Some studies consider non-stationary influence kernel using neural networks in spatio-temporal point processes ( Zhu et al. , 2021b ; a ) . Recent work ( Omi et al. , 2019 ) also uses a neural network to parameterize the hazard function , the derivative of which gives the conditional intensity function . However , the above approaches either capture the temporal dependence or assume the temporal and mark dependence are separable rather than jointly accounting for marked-temporal dependence . Recently , attention models have become popular in computer vision and sequential data modeling ( Britz et al. , 2017 ; Luong et al. , 2015 ; Vaswani et al. , 2017 ) . This motivates works including Zhang et al . ( 2019 ) ; Zhu et al . ( 2021c ; d ) ; Zuo et al . ( 2020 ) to model the conditional intensity of point processes using the attention mechanism and characterize the inter-event dependence by a score function . The attention mechanism has proven to be more flexible in capturing long-range dependence regardless of how far apart two events are separated and greatly enhances the performance in practice . However , the main limitation of Zhang et al . ( 2019 ) ; Zuo et al . ( 2020 ) is that they rely on a conventional score function – dot-product between linear mappings of events , which is still limited in representing non-linear dependence between events for some applications . Zhu et al . ( 2019 ; 2021c ; d ) used a more flexible and general Fourier kernel as a substitution for the dot-product score ; however , the expressive power of the proposed Fourier kernel is still limited , and the spectrum of the Fourier basis is represented by a generative neural network , which is difficult to learn in some cases ( Arjovsky & Bottou , 2017 ) . There are also works considering point processes with non-stationary intensities . Chen & Hall ( 2013 ) proposed time-varying background intensity for point process , while we focus on the non-stationary triggering kernel depicting complex events dependency . Remes et al . ( 2017 ; 2018 ) studied nonstationary kernels combined with Gaussian processes , assuming specific structures of the kernels in the Fourier domain . Such kernels are more restricted than ours since the nature of Gaussian processes requires that the kernel is positive semidefinite . 2 METHOD . 2.1 BACKGROUND : MARKED TEMPORAL POINT PROCESS . Marked temporal point processes ( MTPPs ) ( Reinhart , 2018 ) consist of a sequence of events over time . Each event is associated with a ( possibly multi-dimensional ) mark that contains detailed information of the event , such as location , nodal information ( if the observations are over networks , such as sensor or social networks ) categorical data , and contextual information ( such as token , image , and text descriptions ) . Let T > 0 be a fixed time-horizon , andM⊆ Rd be the space of marks . We denote the space of observation as X = [ 0 , T ) ×M and a data point in the discrete event sequence as x = ( t , m ) , t ∈ [ 0 , T ) , m ∈M , ( 1 ) where t is the event time and m represents the mark . Let Nt be the number of events up to time t < T ( which is random ) , and Ht : = { x1 , x2 , . . . , xNt } denote historical events . Let N be the counting measure on X , i.e. , for any measurable S ⊆ X , N ( S ) = |HT ∩ S| . For any function f : X → R , the integral with respect to the counting measure is defined as∫ S f ( x ) dN ( x ) = ∑ xi∈HT∩S f ( xi ) . The events ’ distribution in MTPPs can be characterized via the conditional intensity function λ ( x ) , which is defined to be the conditional probability of observing an event in the marked temporal space X given the events ’ historyHt ( x ) , that is , E ( dN ( x ) |Ht ( x ) ) = λ ( x ) dx . ( 2 ) Above , t ( x ) extracts the occurrence time of event x , and we omit the dependence on Ht ( x ) in the notation of λ ( x ) for simplicity . As self- and mutual-exciting point processes , Hawkes processes ( Hawkes , 1971 ) have been widely used to capture the mutual excitation dynamics among temporal events . The model assumes that influences from past events are linearly additive towards the current event . The conditional intensity function for a self-exciting point process takes the form of λ [ k ] ( x ) = µ+ ∑ x′∈Ht ( x ) k ( x′ , x ) , ( 3 ) where µ > 0 stands for the background intensity , and the so-called “ influence kernel ” k : X ×X → R is crucial in capturing the influence of past events on the likelihood of event occurrence at the current time . Here we use the notation [ k ] to stress the dependence of the conditional intensity function on the kernel function k ( x′ , x ) . Written in the form of the integral over counting measure , we have that λ [ k ] ( x ) = µ+ ∫ x′∈Xt ( x ) k ( x′ , x ) dN ( x′ ) , ( 4 ) where Xt is the subset of X with the first component smaller than t. The most commonly made assumption in the literature is that the process is stationary , where the influence of the past events is shift-invariant , such that k ( x′ , x ) = f ( x− x′ ) for a influence function f : Rd → R+ ; a common influence function in one-dimensional cases is f ( t ) = α exp { −βt } , where β controls the decay rate and α > 0 controls the magnitude of the influence of an event . The current work aims at going beyond stationary point processes , which enables us to better capture the heterogeneity in the events ’ influence across the spatial-temporal space , which naturally arises in many applications . | This paper propose a point process with a non-stationary kernel to model complex event data. The kernel represented by its finite rank decomposition and the basis functions (feature functions) are models using a neural network architecture. To learn the model parameters they used stochastic gradient to maximize the resulting likelihood function. Moreover, they give a theoretical guarantee by showing that under some assumptions, true kernel function is identifiable by solving the MLE problem. They also compared their method against state-of-the-art and baseline on synthetic and real datasets. | SP:85d7fc981d3c7f1ca215a976c476cc92c1be1e4e |
Momentum Doesn't Change The Implicit Bias | 1 INTRODUCTION . It is widely believed that the optimizers have implicit bias in terms of selecting output parameters among all the local minima on the landscape ( Neyshabur et al. , 2015 ; Keskar et al. , 2017 ; Wilson et al. , 2017 ) . It is shown in the analysis of Adaboost that the coordinate descent would converge to the L1 max-margin solution for the linear classification task with exponetial-tailed loss ( ( Schapire & Freund , 2013 ; Telgarsky , 2013 ) ) . Latter , Soudry et al . ( 2018 ) shows that gradient descent would converge to the L2 max-margin solution under the same setting , which mirrors its good generalization property in practice . Since then , many efforts have been taken on analyzing the implicit bias of various local-search optimizers , including stochastic gradient descent ( Nacson et al. , 2019 ) , steepest descent ( Gunasekar et al. , 2018a ) , AdaGrad ( Qian & Qian , 2019 ) and optimizers for homogeneous neural networks ( Lyu & Li , 2019 ; Ji & Telgarsky , 2020 ; Wang et al. , 2021 ) . However , though the momentum acceleration technique is widely adopted in the optimization algorithms in both convex and non-convex learning tasks ( Sutskever et al. , 2013 ; Vaswani et al. , 2017 ; Tan & Le , 2019 ) , the understanding on how the momentum would affect generalization performance of the optimization algorithms is still unclear . A natural question is : Can we theoretically analyze the implicit bias of momentum-based optimizers ? In this paper , we take the first step to analyze the convergence of momentum based optimizers and unveil their implicit bias . Specifically , we study the classification problem with linear model and exponential-tailed loss using Stochastic Gradient Descent with Momentum ( SGDM ) and Adam optimizers . We consider the optimizers with constant learning rate and constant momentum hyperparameters , which are widely adopted in practice , e.g. , the default setting in popular machine learning frameworks ( Paszke et al. , 2019 ) and in experiments ( Xie et al. , 2017 ) . We note that Gradient Descent with Momentum ( GDM ) can be viewed as a special case of SGDM , and naturally share the properties for SGDM . Our main results are summarized in Theorem 1 . Theorem 1 ( informal ) . With linear separable dataset S , for SGDM and Adam ( without stochasticity , abbreviated as w/s latter ) , the loss converges to 0 with rate O ( 1t ) where t is the number of iterations , the parameter norm diverges to infinity , and direction of parameters converges to the direction of the L2 max-margin solution . Theorem 1 states SGDM converges to the L2 max-margin solution , which is the same as SGD , indicating that momentum does not affect the convergent direction . The good generalization behavior of the output parameters of SGDM is well validated as the margin of a classifier is positively correlated with its generalization error ( Jiang et al. , 2019 ) . This is supported by existing experimental observations ( c.f . Figure 1 , ( Soudry et al. , 2018 ) and Figure 2 , ( Nacson et al. , 2019 ) ) . Similar claims hold for Adam ( w/s ) , which is also well supported by empirical results in Wang et al . ( 2021 ) . Our contributions are significant in terms of the following aspects : • We establish the implicit bias of the momentum based optimizers , an open problem since the initial work Soudry et al . ( 2018 ) . The momentum based optimizers are widely used in practice and our theoretical characterization deepens the understanding on their generalization property , which is important by its own . • Technically , we propose a new Lyapunov function to analyze the convergence of SGDM , which helps to bound the sum of squared gradients along the training trajectory . Compared to the usual one , the new Lyapunov function depends on a middle variable of an alternative update rule of SGDM , which helps to capture the historical dependence in the momentum update . To our knowledge , such a technique has not been exploited ever before and can be of independent interest for convergence analysis of momentum-based optimizers . We then construct a new Lyapunov function to bound the difference of learned parameters and the scaled max-margin solution , which finally leads to the direction convergence . This Lyapunov function provides a direct way to establish the convergence to the desired direction . Organization of This Paper . Section 2 collects further related works on the implicit bias of first order optimizers and convergence of momentum-based optimizers . Section 3 shows basic settings and assumptions which will be used throughout this paper . Section 4 studies the implicit bias of GDM as a warm up , while Section 5 and Section 6 explore respectively the implicit bias of SGDM and Adam ( w/s ) . Discussions of these results are put in Section 7 . 2 FURTHER RELATED WORKS . Implicit Bias of First-order Optimization Methods . Soudry et al . ( 2018 ) prove that gradient descent on linear classification problem with exponential-tailed loss converges to the direction of the max L2 margin solution of the corresponding hard-margin Support Vector Machine . Nacson et al . ( 2019 ) extend the results in ( Soudry et al. , 2018 ) to the stochastic case , proving that the convergent direction of SGD is the same as GD almost surely . Qian & Qian ( 2019 ) go beyond the vanilla gradient descent methods and consider the AdaGrad optimizer instead . They prove that the convergent direction of AdaGrad has a dependency on the optimizing trajectory , which varies according to the initialization . Ji & Telgarsky ( 2021 ) propose a primal-dual analysis framework for the linear classification models , and prove a faster convergent rate of the margin by increasing the learning rate according to the loss . Based on ( Ji & Telgarsky , 2021 ) , ( Ji et al. , 2021 ) design another algorithm with an even faster convergent rate of margin by applying the Nesterov ’ s Acceleration Method on the dual space . However , the corresponding form of the algorithm on the primal space is no longer a Nesterov ’ s Acceleration Method nor GDM , which is significantly different from our settings . On the other hand , there is another line of work trying to extend the result in the linear case to deep neural networks . Ji & Telgarsky ( 2018 ) ; Gunasekar et al . ( 2018b ) study the deep linear network and Soudry et al . ( 2018 ) study the two-layer neural network with ReLU activation . Lyu & Li ( 2019 ) propose a framework to analyze the asymptotic direction of GD on homogeneous neural networks , proving that given there exists a time the network achieves 100 % training accuracy , GD will converge to some KKT point of the L2 max-margin problem . Wang et al . ( 2021 ) extend the framework of Lyu & Li ( 2019 ) to adaptive optimizers , and prove RMSProp and Adam without momentum have the same convergent direction as GD , while AdaGrad doesn ’ t . The results ( Lyu & Li , 2019 ; Wang et al. , 2021 ) indicate that results in the linear model can be extended to deep homogeneous neural networks , and suggest that the linear model is a proper start point to study the implicit bias . There are also works on the implicit bias of regression problems with bounded optimal points and interesting readers can refer to ( Rosasco & Villa , 2015 ; Lin & Rosasco , 2017 ; Ali et al. , 2020 ) etc . for details . Convergence of Momentum-Based Optimization Methods . For convex optimization problems , the convergence rate of Nesterov ’ s Acceleration Method has been proved in Nesterov ( 1983 ) . In contrast , although GDM ( Polyak ’ s Heavy-Ball Method ) was proposed in ( Polyak , 1964 ) prior to the Nesterov ’ s Acceleration Method , the convergence of GDM on convex loss with Lipschitz gradient was not solved until Ghadimi et al . ( 2015 ) provides an ergodic convergent result for GDM , i.e. , the convergent result for the running average of the iterates . However , the ergodic result is undesired under many learning scenarios , e.g. , in classification tasks , the optimization algorithms usually output the parameters of the last step . To the best of our knowledge , there is only two works on the non-ergodic analysis of ( S ) GDM : Sun et al . ( 2019 ) and Tao et al . ( 2021 ) . Sun et al . ( 2019 ) prove that if the training loss is coercive ( the training loss goes to infinity whenever parameter norm goes to infinity ) , convex , and globally smooth , then , with constant momentum hyper-parameter , the training loss converges to minima with rateO ( t−1 ) . Tao et al . ( 2021 ) analyze a case when momentum coefficient increases to 1 and the gradient is bounded all over the parameter space , showing SGDM can improve the convergence rate of SGD by a factor log ( t ) . There are also works on the gradient norm convergence of SGDM under various settings ( Yan et al. , 2018 ; Yu et al. , 2019 ; Liu et al. , 2020 ) and on the investigation of momentum-based method from the view point of dynamics ( Sarao Mannelli & Urbani , 2021 ) . However , there is no existing work on the implicit bias of momentum-based optimizers for the classification problem , which is first analyzed by this paper . 3 PRELIMINARIES . In this paper , we focus on the linear model with exponential-tailed loss . We first derive the results for binary classification , then we show that the methodology can be easily extended to the multi-class classification problem . Problem setting . The dataset used for training is defined as S = ( xi , yi ) Ni=1 , where xi ∈ Rd is the i-th feature , and yi ∈ R is the i-th label ( i = 1 , 2 , · · · , N ) . We will use the linear model to fit the label : for any feature x ∈ Rd and parameter w ∈ Rd , the prediction is given by 〈w , x〉 . For binary classification , given any data zi = ( xi , yi ) ∈ S , the individual loss for parameter w is given as ` ( yi〈w , xi〉 ) . A common setting is to ensemble the feature and label together as x̃i = yixi ( there is a mapping T : ( x , y ) → yx , and x̃i is T ( ( xi , yi ) ) ) . The individual loss can be rewritten as ˜̀ ( w , ( xi , yi ) ) = ` ( yi〈w , xi〉 ) = ` ( 〈w , x̃i〉 ) . The optimization target is defined as the averaged loss : L ( w ) = ∑N i=1 ˜̀ ( w , ( xi , yi ) ) N . Without loss of generality , we consider the case with normalized data1 , that is , ‖x̃i‖ ≤ 1 , ∀i ∈ [ N ] . Optimizer . Here we will introduce the update rules of SGDM and Adam ( w/s ) . SGDM can be viewed as a stochastic version of GDM by randomly choosing a subset of the dataset to update . Specifically , the update rule of SGDM is given as ( SGDM ) : w ( t+ 1 ) −w ( t ) = −η∇LB ( t ) ( w ( t ) ) + β ( w ( t ) −w ( t− 1 ) ) , ∀t ≥ 1 , ( 1 ) where B ( t ) is a subset of S with size b which is sampled independently and uniformly with replacement , and LB ( t ) is defined as LB ( t ) ( w ) = ∑ z∈B ( t ) ˜̀ ( w , z ) b . We also define Ft as the sub-sigma field such that { w ( t ) } ∞t=1 is adapted with respect to Filtration { Ft } ∞t=1 . 1The proof can be naturally applied to unnormalized data by letting ` ( x ) = ` ( maxx̃∈T ( S ) ‖x̃‖ · x ) and x̃i = x̃i maxx̃∈T ( S ) ‖x̃‖ . The Adam ( w/s ) can be viewed as a variant of GDM in which the preconditioner is adopted , whose form is characterized as follows : m ( 0 ) = 0 , m ( t ) = β1m ( t− 1 ) + ( 1− β1 ) ∇L ( w ( t ) ) , m̂ ( t ) = 1 1− βt1 m ( t ) , ∀t ≥ 1 , ν ( 0 ) = 0 , ν ( t ) = β2ν ( t− 1 ) + ( 1− β2 ) ( ∇L ( w ( t ) ) ) 2 , ν̂ ( t ) = 1 1− βt2 ν ( t ) , ∀t ≥ 1 , ( Adam ( w/s ) ) : w ( t ) = w ( t− 1 ) − η m̂ ( t− 1 ) √ ν̂ ( t− 1 ) + ε1d , ∀t ≥ 1 , ( 2 ) where 1√ ν̂ ( t−1 ) +ε1d ) is called the preconditioner at step t. Assumptions : The analysis of this paper are based on three common assumptions in existing literature ( first proposed by ( Soudry et al. , 2018 ) ) , respectively on the separability of the dataset , the individual loss behaviour at the tail , and the smoothness of the individual loss . We list them as follows : Assumption 1 ( Linearly Separable Dataset ) . There exists one parameter w ∈ Rd , such that 〈w , x̃i〉 > 0 , ∀i ∈ [ N ] . Assumption 2 ( Exponential-tailed Loss ) . The individual loss ` is exponential-tailed , i.e. , • Differentiable and monotonically decreasing to zero , with its derivative also converging to zero , i.e. , limx→∞ ` ( x ) = limx→∞ ` ′ ( x ) = 0 , and ` ′ ( x ) < 0 ∀x ; • Close to exponential loss when x is large enough , i.e. , there exist positive constants c , a , K , µ+ , µ− , x+ , x− and x0 , such that , ∀x > x+ : − ` ′ ( x ) ≤ c ( 1 + e−µ+x ) e−ax , ( 3 ) ∀x > x− : − ` ′ ( x ) ≥ c ( 1− e−µ−x ) e−ax . ( 4 ) Assumption 3 ( Smooth Loss ) . Either of the following assumptions holds regarding the case : ( D ) : ( Deterministic Case ) The individual loss ` is locally smooth , i.e. , for any s0 ∈ R , there exists a positive real Hs0 , such that ∀x , y ≥ s0 , | ` ′ ( x ) − ` ′ ( y ) | ≤ Hs0 |x− y| . ( S ) : ( Stochastic Case ) The individual loss ` is globally smooth , i.e. , there exists a positive real H , such that ∀x , y ∈ R , | ` ′ ( x ) − ` ′ ( y ) | ≤ H|x− y| . We provide explanations of these three assumptions respectively . Based on Assumption 1 , we can formally define the margin and the maximum margin solution of an optimization problem , which is introduced in Definition 1 Definition 1 . Let the margin γ ( w ) of parameter w defined as the lowest score of the prediction of w over the dataset S , i.e. , γ ( w ) = minx̃i∈T ( S ) 〈w , x̃i〉 . By Assumption 1 and the positive homogeneous of γ , γ ( ŵγ ( ŵ ) ) = 1 , and thus we define the maximum margin solution ŵ and the L 2 max margin γ of the dataset S as follows : ŵ 4 = arg min γ ( w ) ≥1 ‖w‖2 , γ 4= 1 ‖ŵ‖ Since ‖ · ‖2 is strongly convex and set { w : γ ( w ) ≥ 1 } is convex , ŵ is uniquely defined . Assumption 2 constraints the loss to be exponential-tailed , which is satisfied by many popular choices of ` , including the ( ` exp ( x ) = e−x ) and the logistic loss ( ` log ( x ) = log ( 1 + e−x ) ) . Also , as c and a can be respectively absorbed by resetting the learning rate and data as η = cη and xi = axi , without loss of generality , in this paper we only analyze the case that c = a = 1 . The globally smooth assumption ( Assumption 3 . ( S ) ) is strictly stronger than the locally smooth assumption ( Assumption 3 . ( D ) ) . One can easily verify that both the exponential loss and the logistic loss meet Assumption 3 . ( D ) , and the logistic loss also meets Assumption 3 . ( S ) . | The authors study the convergence of stochastic gradient descent momentum (SGDM) in a problem with of binary classification with separable data. Interestingly, the authors observed that SGDM and GD converge to the same solution (i.e. the max margin solution) with the same convergence rate O(1/t). The paper proposed a variation of [Soudry et al. 2018] solution, that allows for the analysis of the more complex SGDM. | SP:067d1acf136e163bf7a3f43bb8b945c73feef657 |
A Branch and Bound Framework for Stronger Adversarial Attacks of ReLU Networks | 1 INTRODUCTION . Adversarial attacks aim to find adversarial examples ( Szegedy et al. , 2013 ) , which are close to benign inputs in certain distance metrics yet trigger wrong behavior of neural networks ( Carlini & Wagner , 2017 ; Madry et al. , 2018 ; Athalye et al. , 2018 ; Croce & Hein , 2020b ) . Adversarial attacks are important tools to gauge the empirical robustness of deep neural networks . Finding an adversarial example can be generally formulated as a constrained optimization problem : xadv = arg min x∈C f ( x ) ( 1 ) where C is often an ` ∞ or ` 2 norm ball around the original input x0 , and f ( x ) is an attack success criterion involving a neural network ( such as the margin between the groundtruth class and another class ) : f ( x ) < 0 indicates a successful attack . A straightforward way of solving Eq . ( 1 ) is via firstorder constrained optimization methods , such as projected gradient descent ( PGD ) ( Madry et al. , 2018 ) and its variants ( Croce & Hein , 2020b ; Tashiro et al. , 2020 ; Croce & Hein , 2020a ; Xie et al. , 2019 ; Dong et al. , 2018 ; Zheng et al. , 2019 ) . Additionally , some gradient-free attacks were proposed ( Brendel et al. , 2018 ; Cheng et al. , 2018 ; Alzantot et al. , 2019 ; Andriushchenko et al. , 2020 ) , mostly based on certain heuristic search on the input space x . Limitations of existing attacks . As f ( x ) usually consists of a highly non-convex neural network , solving Eq . ( 1 ) to its global minimum is challenging . This leads to failures in adversarial attacks : an adversarial example may exist but no attacks can find it , giving a false sense of security ( Athalye et al. , 2018 ) . Especially , gradient based attacks can be easily trapped into a local minimum or misguided by masked gradients ( Papernot et al. , 2016 ; Tramèr et al. , 2017 ) . Even if we give the attacker an infinite amount of time ( e.g. , run a very large number of PGD steps , or allowing a large number of samples on input space ) , it is still hard to guarantee to find the adversarial example , since it is extremely difficult to systematically search the high dimensional and continuous input space . Models concluded robust under existing attacks might still have security vulnerability in practice , leading to an urgent request for stronger attacks that can possibly approach ground-truth robustness . The mixed-integer approach . This paper seeks stronger adversarial attacks from a different angle : instead of searching for adversarial examples in the input space , we look for adversarial examples in the activation space . The main intuition is that neural networks with piece-wise linear activation functions ( e.g. , ReLU ) can be seen as a piece-wise linear function and each piece is uniquely defined by a specific setting of activation function status . For ReLU networks , each neuron can either be active ( its input is positive ) or inactive ( its input is negative so the output is 0 ) , which can be encoded by discrete 0-1 variables . This leads to a mixed integer programming ( MIP ) formulation ( Ehlers , 2017 ) , and Tjeng et al . ( 2019 ) conducted attacks using a MIP solver . Benefits of the MIP formulation . The MIP formulation with the 0-1 encoding of ReLU neurons allows us to systematically search all the linear pieces in the input space , theoretically guarantee to enumerate the entire input space and obtain the global minimum of Eq . ( 1 ) given sufficient time . Practically , MIP-based attacks can often find adversarial examples that are missed by existing attacks and identify true weaknesses of a model . It also helps to close the gap between the upper and lower bounds of robust accuracy ( i.e. , attack accuracy vs. verified accuracy ) . Existing works aimed to reducing this gap by tightening the lower bound with stronger verifiers ( Raghunathan et al. , 2018b ; Wang et al. , 2021 ) , while our work aims to tighten the upper bound by a systematic search of adversarial examples . Closing this gap is difficult even on small models ( Dathathri et al. , 2020 ) . Generic MIP solvers are inefficient for adversarial attacks . Despite its strengths , a MIP-based attack are often a few orders of magnitudes slower than existing attacks due to the high cost of running an off-the-shelf solver such as Gurobi ( Tjeng et al. , 2019 ) . There are three root causes for its inefficiency . First , an off-the-shelf solver is not aware of the underlying optimization problem corresponds to a neural network , and has to apply generic solving techniques ( e.g. , using Simplex algorithm with relaxations ) which can be expensive or ineffective . Second , it can not utilize solutions obtained cheaply from gradient based attacks to accelerate its search . Third , generic MIP solvers are mostly restricted to CPUs and can hardly utilize GPU acceleration , which is crucial for efficiency . Contributions of this paper . We address the above weaknesses in MIP solvers for adversarial attacks , by developing a GPU-accelerated branch and bound procedure to systematically search adversarial examples in the activation space , which is more efficient than generic MIP solvers . We focus on solving hard instances , where none of existing adversarial attacks based on searching the input space are successful but no verifier can prove their robustness . Our contributions includes : • We apply the GPU-accelerated bound propagation based methods ( Wang et al. , 2021 ; Xu et al. , 2020 ; Zhang et al. , 2018 ; Wong & Kolter , 2018 ) , which were originally developed for neural network verification , to the adversarial attack setting . These specialized methods can quickly examine thousands of regions in activation space in parallel and rule out the regions with no adversarial examples , which is difficult in off-the-shelf MIP solvers with a generic solving procedure . • We employ a top-down beam-search to explore the activation space . Unlike the best-first search scheme used in many neural network verifiers , we can quickly go deep in the search tree and identify the most promising regions with adversarial examples . A smaller sub-MIP can then be created onthe-fly to search adversarial examples in the reduced regions with much fewer integer variables . • We collect adversarial examples generated by cheap attacks in a candidate pool and utilize them in two ways . First , we conduct a bottom-up search on examples close to decision boundary by applying large neighborhood search ( LNS ) . Second , when conducting the top-down search , we adopt diving by fixing integer variables according to adversarial examples in the pool to reduce the search space . • Our new attack framework , BaB-Attack , is designed to tackle hard instances where existing strong adversarial attacks ( such as AutoAttack ) can not succeed . Despite being more expensive than attacks on the input space , BaB-Attack is about an order of magnitude faster than using an MIP solver on hard instances , and can find adversarial examples that can not be discovered by any existing attacks . 2 BACKGROUND . Notations . We define a L layer feed-forward ReLU network as f : Rn0 → R and f ( x ) : = z ( L ) ( x ) , where z ( i ) ( x ) = W ( i ) ẑ ( i−1 ) ( x ) + b ( i ) with i-th layer weight matrix W ( i ) and bias b ( i ) , ẑ ( i ) ( x ) = ReLU ( z ( i ) ( x ) ) , and input ẑ ( 0 ) ( x ) = x. Layer i has dimension ni , and N is the total number of neurons . We denote the j-th neuron in layer i as z ( i ) j . For a simpler presentation , we assume f ( x ) is a binary classifier and benign input x0 has f ( x0 ) > 0 . An attacker seeks to minimize f ( x ) within a ` ∞ norm perturbation set C to make f ( x ) < 0 . We can attack a multi-class classifier by considering each pair of target and ground-truth label individually where f is defined as the margin between them , similarly to ( Gowal et al. , 2019b ) . We use [ N ] to represent the set { 1 , · · · , N } . The MIP formulation for adversarial attack . Tjeng et al . ( 2019 ) formulated the adversarial attack and verification of ReLU network into a mixed integer programming ( MIP ) problem , solved by existing MIP solvers ( refer to as the “ MIP attack ” ) . It has binary variables s ( i ) j for each ReLU : min f ( x ) s.t . z ( i ) ( x ) = W ( i ) ẑ ( i−1 ) ( x ) + b ( i ) ; f ( x ) = z ( L ) ( x ) ; x ∈ C ; ẑ ( i ) j ( x ) ≥ z ( i ) j ( x ) ; ẑ ( i ) j ( x ) ≤ u ( i ) j s ( i ) j ; ẑ ( i ) j ( x ) ≤ z ( i ) j ( x ) − l ( i ) j ( 1− s ( i ) j ) ; ẑ ( i ) j ( x ) ≥ 0 ; z ( i ) j ( x ) ∈ [ l ( i ) j , u ( i ) j ] ; s ( i ) j ∈ { 0 , 1 } ; i ∈ [ L ] , j ∈ [ ni ] ( 2 ) where s ( i ) j indicating the two status of a ReLU neuron : ( 1 ) inactive : when s ( i ) j = 0 , constraints on ẑ ( i ) j simplifies to ẑ ( i ) j = 0 ; or ( 2 ) active : when s ( i ) j = 1 we have ẑ ( i ) j = z ( i ) j . Here l ( i ) j , u ( i ) j are precomputed intermediate lower and upper bounds on pre-activation z ( i ) j such that l ( i ) j ≤ z ( i ) j ( x ) ≤ u ( i ) j for any x ∈ C. The complexity of this problem can increase exponentially with the number of ReLU neurons , so it can take hours to run even on a small network , unless the network is trained with a strong regularization such as a certified dense ( Wong & Kolter , 2018 ; Xiao et al. , 2019 ) . Searching in the Activation Space via Branch and Bound .. Given the formulation in Eq . ( 2 ) , we can view a neural network in the activation spaceA = [ 0 , 1 ] N whereN is the total number of neurons , and each dimension corresponds to the setting of a s ( i ) j ∈ { 0 , 1 } variable . To determine s ( i ) j corresponding to a known adversarial example xadv , we can propagate xadv through the network and check the sign of each neuron z ( i ) j , so s ( i ) j = 1 ( z ( i ) j ≥ 0 ) . This uniquely locates the linear piece of f ( x ) where xadv lies , because Eq . ( 2 ) becomes a set of linear inequalities when all s ( i ) j are fixed . Intuitively , we can search adversarial examples by fixing all s ( i ) j to one of the 2N possible combinations inA , and then solve Eq . ( 2 ) exactly using linear programming ; an adversarial example is found when the solution is negative . To avoid clutter , we flatten the ordering of s ( i ) j for i ∈ [ L ] , j ∈ [ ni ] and use a single subscript s1 , · · · , sN to denote all binary variables . To effectively and systematically search in the activation space , instead of fixing all si ( i ∈ [ N ] ) , we can first fix a subset of them and bound the objective f ( x ) to guide the search , leading to the branch and bound ( BaB ) method . In BaB , we solve Eq . ( 2 ) by creating subproblems constraining some binary variables , for example , s1 = 0 or s1 = 1 ( since we can branch on the neurons in any fixed order , without loss of generality , we branch the neurons chronologically ) . We define a set S containing all the branching constraints ( e.g. , S = { s1 = 0 , s2 = 1 } ) , which corresponds to a subdomain of the original problem Eq . ( 2 ) . BaB requires the LB primitive on S , which relaxes the remaining binary variables to obtain a lower bound of Eq . ( 2 ) : Lower bound in subdomain : LB ( S ) ≤ min f ( x ) s.t . s ∈ S and all other constraints in Eq . ( 2 ) Here s ∈ S means setting binary variables s ( i ) j according to the constraints in S . Typically , more constraints in S lead to tighter bounds . LB ( S ) > 0 indicates that no adversarial example exist within this subdomain , otherwise adversarial examples may exist in this subdomain . We illustrate a BaB search tree in Fig . 1 . Initially , Sroot = ∅ , where x ∈ C without any extra constraints in activation space and a lower bound of Eq . ( 2 ) is obtained . When LB ( ∅ ) < 0 , an adversarial example may exist , and we branch Sroot into two subdomains : S1− = Sroot ∪ { s1 = 0 } ; S1+ = Sroot ∪ { s1 = 1 } Then we bound each subdomain . Since more constraints are added , LB ( S1− ) and LB ( S1+ ) are usually improved . The branching procedure continues recursively , and if any LB ( S ) > 0 , no further branching is needed since no adversarial examples are in that subdomain . Each branching increases the cardinality of S by 1 , and eventually we reach leaf nodes with |Sleaf| = N , each leaf locating a linear piece of f ( x ) . In that case , LB ( Sleaf ) is an exact solution since no binary variables are left , and if LB ( Sleaf ) < 0 , a concrete adversarial example is the minimizer x∗ of Eq . ( 2 ) with s ∈ Sleaf . Since N can be quite large and adversarial examples lie in the leaf level , we must guide the search to reach there quickly . Although BaB is used in existing neural network verifiers ( Bunel et al. , 2018 ; De Palma et al. , 2021a ) , they do not aim to reach the leaf level and typically branch the node with the worst bound first , generally leading to a wide but shallow search tree and unsuitable for detecting adversarial examples . We will discuss our search algorithm in Sec . 3 . Bounding in Branch and Bound of Neural Networks . The LB ( S ) primitive is crucial in the BaB process : it needs to provide a tight lower bound efficiently . A simple way to lower bound the objective of Eq . ( 2 ) is via relaxation of integer variables and linear programming ( LP ) ( Bunel et al. , 2018 ; Lu & Kumar , 2020 ) ; but an LP solver is needed which restricts its efficiency . Recently , a popular choice in neural network verifiers is the specialized bound propagation methods ( Zhang et al. , 2018 ; Wong & Kolter , 2018 ) which exploit the structure of the optimization problem ( which a generic LP/MIP solver can not ) and give LB ( S ) efficiently on GPUs without an LP solver . Essentially , they relax each ReLU neuron into convex domains ( Salman et al. , 2019 ) and propagate them layer by layer through the network while maintaining sound bounds . A BaB and bound propagation based verifier α , β-CROWN ( Zhang et al. , 2018 ; Xu et al. , 2021 ; Wang et al. , 2021 ) , achieves the state-of-the-art verification performance ( Bak et al. , 2021 ) , and we utilize its bounding subprocedure to produce LB ( S ) . Importantly , we will show that how we use LB ( S ) to guide adversarial attacks , while existing works mostly use them for verification . 3 METHOD Beam SearchVerifier , -CROWN Adversarial Candidates Pool Sub-MIP SolverLocal Search Diving Input : s.t . PGD attack with random starts Output - adversarial example detected : Common adversarial patterns Promising subdomains Promising adversarial candidates Disagreed adversarial patterns upper bounds subdomain lower bounds K subdomains Top-Down thread on GPUs Bottom-Up thread on CPUs Solutions Sub-MIPs Sub-MIPs Figure 2 : Overview of BaB attack . Overview of BaB attack . To systematically search adversarial examples in activation space , we must explore the search tree and enumerate as more leaf nodes as possible . Although the worst case search time complexity is exponential in the numbers of ReLU neurons ( visiting every leaf node of the tree ) , practically , if a right search procedure is chosen , only a small fraction of nodes need to be visited to find an adversarial example . In this paper , we propose BaB attack , specializing the BaB searching strategy over the activation space for the purpose of adversarial attacks . The search is well guided by ( 1 ) a top-down beam-search thread accelerated on GPUs which quickly goes deep into the search tree , and ( 2 ) a bottom-up search thread on CPUs for large neighborhood search . The top-down and bottom-up searches run in parallel threads and they both benefit from the adversarial candidates pool P , which contains examples P = { xc1 , · · · , xcM } where M is the pool capacity . f ( xci ) is still positive but small ; the pool keeps the M best ( ranked by f ( xci ) ; smaller is better ) examples it receives . The activation space representations of these candidates are used as extra information to guide the search towards adversarial examples . We detail each part of BaB attack in next sub-sections . | This paper proposes a branch-and-bound attack (BaB-Attack) to solve hard instances efficiently, where none of the existing adversarial attacks can succeed. Specifically, the BaB-Attack utilizes the bound propagation-based neural network verifiers on GPUs to rapidly evaluate a large number of searching regions, builds an adversarial candidates pool to guide the search, and refines candidates adversarially examples using a bottom-up large neighborhood search. Experimental results show that BaB-Attack outperforms the existing attacks in both attack success rates and efficiency. | SP:ab9546306ff0171715cc15c1003afd07b76e3d15 |
Self Reward Design with Fine-grained Interpretability | 1 INTRODUCTION . Reinforcement Learning ( RL ) and Deep Neural Network ( DNN ) have recently been integrated to solve problems with remarkable performance . The deep reinforcement learning greatly improves the state-of-the-art of control and , in the words of Sutton & Barto ( 2018 ) , learning from interaction . Among the well-known successes are ( 1 ) the Deep Q-Network ( Mnih et al . ( 2015 ) ) which enabled machine to play Atari Games with incredible performance , and ( 2 ) AlphaGo which is capable of playing notoriously complex game of Go ( Silver et al . ( 2016 ) ) , which has also been further developed and popularized as being capable of defeating human at pro level . Although DNN has proven to possess great potentials , it is a blackbox that is difficult to interpret . To address this difficulty , various works have emerged , thus we have a host of different approaches to eXplainable Artificial Intelligence ( XAI ) ; see surveys Arrieta et al . ( 2020 ) ; Gilpin et al . ( 2018 ) ; Tjoa & Guan ( 2020 ) . They have shed some lights into the inner working of a DNN , but there may still be large gaps to fill . Note that there is no guarantee that interpretability is even attainable , especially when context-dependent interpretability can be subjective . In this paper , we propose the Self Reward Design , a non-traditional RL solution that combines highly interpretable human-centric design and the power of DNN . Our robot ( representing any artificial agent ) rewards itself through purposeful design of DNN architecture , enabling it to solve problem without training . The solution might be sub-optimal , but the use of trainable DNN modules ( we use pytorch , specifically ) addresses the problem . We show that performance is improved while interpretability is retained . This paper is arranged as the following . We start with clarifications . Then we briefly go through related works that inspire this paper . Then our interpretable design and SRD training idea are demonstrated with a 1D toy example , RobotFish . Following that , we introduce SRD on the main robot navigation problem on the 2D lavaland with a large focus on interpretable design , followed by SRD training and unknown avoidance . Its experimental results will be discussed in the section after , and finally , we conclude with limitations and future works . 2 THIS PAPER FOCUSES HEAVILY ON INTERPRETABLE HUMAN DESIGN . What exactly is this paper about ? Demonstrations of how two reinforcement learning problems are solved in an interpretable manner through self-reward mechanism . Readers will find how we design different components taylored to different problem components . See appendix A.1 for more remarks : the paper has been heavily reorganized to direct readers ’ focus on interpretable design . But what is interpretability ? While there may be many ways to talk about interpretability , interpretability in the context of this paper is fine-grained , i.e . we go all the way down to directly manipulating weights and biases of DNN modules . DNN modules are usually optimized using gradient descent from random initialization , thus the resulting weights are hard to interpret . In our SRD model , the meaning and purpose of each neural network component can be explicitly stated with respect to the environmental and model settings . How do we compare our interpretability with existing explainable deep RL methods ? Since we directly manipulate the weights and biases , our interpretability is at a very low level of abstraction , unlike post-hoc analysis e.g . saliency ( Greydanus et al . ( 2018 ) ) or semantically meaningful high level specification such as reward decomposition ( Juozapaitis et al . ( 2019 ) ) . In other words , we aim to be as transparent as possible , allowing users to understand the model from the most basic unit . Baseline . Our main result on 2D robot lavaland example achieves a high performance of approximately 90 % accuracy with 10 % randomness to allow for exploration . Hence , we believe comparing accuracy performance with other RL methods is irrelevant , and , most importantly , distracting from our focus of interpretability . If possible , we want to compare the level of interpretability . Quantitative comparison is tricky , then how do we compare ? What baseline to use ? We have in fact answered this question in the previous paragraph : our interpretability is fine-grained as we directly manipulate weights and biases . Different design for different contexts . There is probably no cookie-cutter framework for SRD . Solution design that is interpretable according to the above definition necessarily and heavily depends on the context , i.e . the shape of the system , thus we might need different formula of losses . This paper demonstrates how purposeful and deliberate designs work on two RL problems . In our robot fish example , the task is simply to survive , hence the model rewards actions that encourages survival e.g . “ eat when hungry ” . In 2D robot lavaland example , each tile is considered as a potential checkpoint to reach before reaching the final target , thus the model uses tile-based module that rewards the tile relative to other tiles : the preferred tile is scored higher . 2.1 RELATED WORKS : FROM RL TO DEEP RL TO SRD . RL imperfect human design . RL system can be set up by human manually specifying the rewards . Unfortunately , human design can easily be imperfect since the designers might not necessarily grasp the full extent of complex problem . For RL agents , designers ’ manual specification of rewards are fallible , subject to errors and problems such as negative side effect of a misspecified reward ( Clark & Amodei ( 2016 ) ) and reward hacking ( Russell & Norvig ( 2010 ) ) . Dylan ’ s inverse reward design ( IRD ) paper ( Hadfield-Menell et al . ( 2017 ) ) addresses this problem directly : it allows a model to learn beyond what imperfect designers specify . An important component of our solution to imperfect designer problem is the implementation of unknown avoidance , particularly wunknown in our 2D robot . Also see appendix A.2 for Reward Design Problem ( RDP ) . From RL to Deep RL . Not only is human design fallible , it might be very difficult , especially for complex problems . In the introduction , we mention that Deep RL ( DRL ) solves this by combining RL and the power of DNN . However , DRL rewards have been produced by the black-box : they become difficult to understand and thus explainable DRL emerges to address that problem . RL papers that address explainability/interptretability problems have been compiled in survey papers ( eg . Heuillet et al . ( 2021 ) ; Puiutta & Veith ( 2020 ) ) . Saliency , a common XAI method , has been applied to visualize deep RL ’ s mechanism ( Greydanus et al . ( 2018 ) ) . Relational deep RL uses a relational module that not only improves the agent ’ s performance on StarCraft II and Box-World , but also provides visualization on the attention heads useful for interpretability ( Zambaldi et al . ( 2019 ) ) . Other methods to improve interpretability include reward decomposition , in which each part of the decomposable reward is semantically meaningful ( Juozapaitis et al . ( 2019 ) ) ; do refer to the survey papers for several other ingenious designs and investigations into the interpretability of deep RL . From DRL to SRD . Our model is called self reward design because our robot computes its own reward , similar to DRL computation of Q-values . However , human design is necessary to put con- straints on how self-rewarding is performed so that interpretability is maintained . Human designer has the responsibility of understanding the problems , dividing the problems into smaller chunks and then finding the relevant modules to plug into the design in a fully interpretable way ( see for example how we use convolution layer to create the food location detector , section 2.1 ) . Computational Efficiency of SRD . The models only use modules from standard DNN modules such as convolution ( conv ) , deconvolution ( deconv ) and fully-connected ( FC ) layers with few trainable parameters ( e.g . only 180 parameters in Robot2NN ) . With proper choice of initial parameters , we can skip the long , arduous training and optimization processes that are usually required for deep learning to learn unseen concepts . We trade off the time spent on training algorithm with the time spent on human design , thus addressing what Kahn et al . ( 2018 ) called sample inefficiency ( the need for large dataset hence long training time ) in a human-centric way . 2.2 OTHER RELEVANT CONCEPTS . Self-supervised Learning . DRL like Value Prediction Network ( VPN , Oh et al . ( 2017 ) ) is selfsupervised . Exploration-based RL algorithm is applied so that data are gathered real-time for training : the model thus optimizes its reward function . Our model is similar in this aspect . Unlike VPN , however , our interpretable design avoids all the abstraction of DNN . Our SRD training is also selfsupervised in the sense that we do not require datasets with ground-truth labels . Instead , we induce semantic bias via interpretable components to achieve the correct solutions . Also see appendix A.2 . Imagination component . Our pipeline includes several rollouts of possible future trajectories similar to existing RL papers that use imagination components , with differences as the following . Compared to Kalweit & Boedecker ( 2017 ) which optimizes towards target value ŷi = ri+γQ′i+1 ( heavily abbreviated ) , SRD ( 1 ) is similar because agent updates on every imaginary sample available , but ( 2 ) has different , context-dependent loss computation . Also see appendix A.2 for more references . 3 ROBOT FISH : 1D TOY EXAMPLE . Problem setting . To broadly illustrate the idea , we use a one-dimensional model Fish1D with Fish Neural Network ( FishNN ) deliberately designed to survive the simple environment . Robot Fish1D has energy which is represented by a neuron labelled F . Energy diminishes over time . If the energy reaches 0 , it dies . The environment is env = [ e1 , e2 , e3 ] where ei = 0.5 indicates there is a food at position i and no food if ei = 0 . The fish is always located in the first block of env , fig . 1 ( A ) . In this problem , ‘ food here ’ scenario is env = [ 0.5 , 0 , 0 ] which means the food is near the fish . Similarly , ‘ food there ’ scenario is env = [ 0 , 0.5 , 0 ] or env = [ 0 , 0 , 0.5 ] , which means the food is somewhere ahead and visible . ‘ No food ’ scenario is env = [ 0 , 0 , 0 ] . Fish1D ’ s Actions . ( 1 ) ‘ eat ’ : recover energy F when there is food in its current position . ( 2 ) ‘ move ’ : movement to the right . In our implementation , ‘ move ’ causes env to be rolled left . If we treat the environment as an infinite roll tape and env as fish vision ’ s on the 3 immediately visible blocks , then the food is available every 5 block . How to design an interpretable component of neural network ? First , we want the fish to be able to distinguish 3 scenarios previously defined : food here , food there and no food . Suppose we want a neuron that strongly activates when there is food nearby ( name it food here neuron , fh ) , another neuron that strongly activates when there is a food nearby ( name it food there neuron , ft ) , and we want to represent the no-food scenario as ‘ neither fh and ft respond ’ . How do we design a layer with two neurons with the above properties ? We use 1D convolution layer and selective activation function as σsa ( x ) = ϵ/ ( ||x||2 + ϵ ) , as the following . The fh and ft neurons . Define the activation of fh neuron as afh = σsa [ convfh ( env ) ] where convfh , a Conv1D with weight array wfh = [ 1 , 0 , 0 ] and bias bfh = 0.5 . When there is food near the fish , we get yfh = convfh ( env ) = [ 1 , 0 , 0 ] ∗ [ 0.5 , 0 , 0 ] − 0.5 = 0 where ∗ denotes the convolution operator , so afh = σsa ( yfh ) = 1 . This is a strong activation of neuron , because , by design , the maximum value of selective activation function is 1 . We are not done yet . Similar to afh above , define aft . The important task is to make sure that when ‘ there is food there but NOT HERE ’ , aft activates strongly but afh does not . They are wft = [ 0 , 1 , 1 ] , bft = −0.5 . Together , they form the first layer called the Food Location Detector ( FLD ) . Generally , we have used aη = σsa [ convη ( env ) ] ( 1 ) Interpretable FishNN . To construct the neural network responsible for the fish ’ s actions ( eat or move ) , we need one last step : connecting the neurons plus fish ’ s internal state ( energy ) ( altogether [ afh , aft , F ] ) to the action output vector [ eat , move ] ≡ [ e , m ] through FC layer , as shown in fig . 2 blue dotted box . The FC weights are chosen meaningfully e.g . ‘ eat when hungry and there is food ’ and to avoid scenarios like ‘ eat when there is no food ’ . This is interpretable through manual weight and bias setting . Is FishNN ’ s decision correct ? The prefrontal cortex ( PFC ) decides whether FishNN ’ s decision is correct or not . PFC is seen in fig . 2 green dotted box . The name ‘ PFC ’ is only borrowed from the neuroscience to reflect our idea that this part of FishNN is associated with internal goals and decisions , similar to real brain ( Miller et al . ( 2002 ) ) . How do we construct PFC ? First , define threshold activation as τ ( x ) = Tanh ( LeakyReLU ( x ) ) . Then PFC is constructed deliberately in the same way FishNN is constructed in an interpretable way as the following . First , aggregate states from FishNN into a vector v0 = [ afh , aft , F , e , m ] . This will be the input to PFC . Then , v0 is processed using convPFC followed by softmax and threshold activation . The choice of weights and biases can be seen in table 2 in appendix B . With this design , we achieve meaningful activations v1 = [ e1 , m1 , ex ] as before . For example , e1 is activated when “ there is food and the fish eats it when it is hungry ” , i.e . fh = 1 , F < 1 and e is activated relative to m1 . The output of PFC is binary vector [ True , False ] = [ T , F ] obtained from passing v1 through a FC layer FCPFC . In this implementation , we have designed the model such that the activation of any v1 neuron is considered a True response ; otherwise it is considered false . This is how PFC judges whether FishNN ’ s action decision is correct . Self reward optimization . As seen above , fish robot has FishNN that decides on an action to take and the PFC that determines whether the action is correct . Is this system already optimal ? Yes , if we are only concerned with the fish ’ s survival , since the fish will not die from hunger . However , it is not optimal with respect to average energy . We optimize the system through standard DNN backpropagation with the following self reward loss loss = CEL ( z , argmax ( z ) ) ( 2 ) where CEL is the Cross Entropy Loss and z = Σmemi=1 [ T , F ] i is the accumulated decision over mem = 8 iterations to consider past actions ( pytorch notation is used ) . The ground-truth used in the loss is argmax ( z ) , computed by the fish itself : hence , self-reward design . Results . Human design ensures survival i.e . problem is solved correctly . Initially , fish robot decides to move rather than eat food when F ≈ 0.5 , but after SRD training , it will prefer to eat whenever food is available , as shown in fig . 3 . New equilibrium is attained : it does not affect the robot ’ s survivability , but fish robot will now survive with higher average energy . | This paper proposes using individually designed, interpretable neural networks to solve a given task. Each neuron in the network is hand-designed to serve a specific task-dependent purpose. These hand-designed solutions are then optimized using environment interactions. The neuron level design of the network is used to provide human interpretability, as the behavior of the network can be understood based on the activations during environment interactions. The neural network structure of the policy can then be optimized via gradient descent to provide a performance improvement over the hand-designed solution. | SP:a435b0f719cd07f80beba1772966918c6114b201 |
NUQ: Nonparametric Uncertainty Quantification for Deterministic Neural Networks | 1 INTRODUCTION . It is crucial in many applications of modern machine learning methods to complement the prediction with some sort of a “ confidence ” score . In particular , deep neural network models , which usually achieve state-of-the-art results in various tasks , are notorious for providing overconfident predictions on data they did not see during training ( Nguyen et al. , 2015 ) . This issue restricts their wide usage in the fields with high costs of wrong predictions , such as medicine ( Miotto et al. , 2016 ) , autonomous driving ( Levinson et al. , 2011 ; Filos et al. , 2020 ) , finance ( Brando et al. , 2018 ) and others . Thus , developing a reliable method of quantifying uncertainty is of great interest to researchers and especially practitioners . The community in recent years made tremendous efforts to develop different uncertainty estimation methods and approaches , including calibration Guo et al . ( 2017 ) , ensembling ( Lakshminarayanan et al. , 2017 ) , Bayesian methods ( Gal & Ghahramani , 2016 ) , and many others ( Ovadia et al. , 2019 ; Wang et al. , 2019 ) . Recently , a series of methods of uncertainty estimation based on the single deterministic neural network model was developed ( Van Amersfoort et al. , 2020 ; Liu et al. , 2020 ; van Amersfoort et al. , 2021 ) . Their primary focus is on ensuring that embeddings of the data obtained on some layer of a network capture the geometrical relationships between the data samples in the input space , which is done via different regularization strategies . Given this property , one can apply a certain approach to capture uncertainty in the embedding space . The crucial property of these methods is the relatively mild required change in architectures and training procedures , which allows the application of the majority of existing deep learning models . In practice it is usually important to distinguish two types of uncertainty : aleatoric and epistemic ( Der Kiureghian & Ditlevsen , 2009 ; Kendall & Gal , 2017 ) . The aleatoric uncertainty reflects the internal noise in the data due to class overlap , data markup errors , or other reasons . This type of uncertainty can not be reduced by providing more data . The epistemic uncertainty reflects the model ’ s ignorance of data . We can reduce the uncertainty of this type once we get more data . Epistemic uncertainty , thus , may be used to identify out-of-distribution OOD data . If the model can quantify this type of uncertainty , it may abstain from prediction and address it to a human expert . Also , the ability to quantify epistemic uncertainty helps in active learning ( Gal et al. , 2017 ) , where lack of “ knowledge ” naturally indicates in which areas we should label samples . Importantly , there is no single definition of uncertainty , and diverse , often heuristic treatments are usually used in practice . Summary of the contributions . In this paper , we develop a new and theoretically grounded method of uncertainty quantification applicable to any deterministic neural network model . More specifically , our contributions are as follows . 1 . We rigorously define the uncertainty of the model prediction at a particular data point . This is done by direct consideration of the probability of the wrong prediction . 2 . We provide corresponding uncertainty estimate by computing the variance of the kernel estimate of conditional density with the appropriately chosen bandwidth . 3 . We apply the resulting method of uncertainty estimation in the neural network ’ s embedding space . Our approach complements recent works in uncertainty estimation for deterministic neural networks , which suffered from a lack of a principled method to quantify the uncertainty . 4 . We implement the method in a scalable manner , which allows it to be used on large datasets such as ImageNet . The experimental results in misclassification detection and OOD detection tasks show the significant potential of the proposed approach . The rest of the work is organised as follows . Section 2 describes the theoretical background and the resulting uncertainty estimation method . Section 3 reviews the related works . In Section 4 we describe the experimental evaluation of the proposed method . Section 5 concludes the study . 2 NONPARAMETRIC UNCERTAINTY QUANTIFICATION . 2.1 ESTIMATION UNDER COVARIATE SHIFT . Let ’ s consider the standard binary classification setup ( X , Y ) ∈ Rd × { 0 , 1 } with ( X , Y ) ∼ Ptr . We assume that we observe the dataset D = { ( Xi , Yi ) } ni=1 of i.i.d . points from Ptr . The classical problem in statistics and machine learning is to find a rule ĝ based on the dataset D which approximates the optimal one : g∗ = argmin g P ( g ( X ) 6= Y ) . Here g : Rd → { 0 , 1 } is any classifier and the probability of wrong classificationRg = P ( g ( X ) 6= Y ) is usually called risk . The rule g∗ is given by the Bayes optimal classifier : g∗ ( x ) = { 1 , η ( x ) ≥ 12 , 0 , η ( x ) < 12 , where η ( x ) = p ( Y = 1 | X = x ) which is the conditional distribution of Y given X = x under the distribution P. In this work , we consider a situation when the distribution of the test samples Ptest is different from the one for the training dataset Ptr , i.e . Ptest 6= Ptr . Obviously , the rule g∗ obtained for P = Ptr might no longer be optimal if the aim is to minimize the error on the test data Ptest ( g ( X ) 6= Y ) . In order to formulate a meaningful estimation problem , some additional assumptions are needed . First of all , we assume that the distribution Ptest is unknown at the model construction moment , and only the dataset D is available . Also , we will assume that the conditional label distribution p ( y | x ) is the same under both Ptr and Ptest . The latter assumption has two important consequences : 1 . All the difference between Ptr and Ptest is due to the difference between marginal distributions of X : ptrain ( X ) and ptest ( X ) . The situation when ptest ( X ) 6= ptrain ( X ) is known as covariate shift . 2 . The Bayes rule is still valid , i.e. , optimal even under Ptest . However , while Bayes rule g∗ is still optimal , its approximation ĝ might be arbitrary bad under the covariate shift . The reason for that is that we can ’ t expect ĝ to approximate g∗ well in the areas where we have few samples from the training set or don ’ t have them at all . Thus , some special treatment of covariate shift is required . We will discuss the particular problem statement in the next section . 2.2 PROBLEM STATEMENT . We consider a classification rule ĝ ( x ) = ĝD ( x ) constructed solely based on the dataset D. Let us start from defining pointwise risk of estimation : R ( x ) = P ( ĝ ( X ) 6= Y | X = x ) , where P ( ĝ ( X ) 6= Y | X = x ) ≡ Ptr ( ĝ ( X ) 6= Y | X = x ) ≡ Ptest ( ĝ ( X ) 6= Y | X = x ) under the assumptions above . The valueR ( x ) is independent of covariate distribution ptest ( X ) and essentially allows to define a meaningful target of estimation which is based solely on the quantities known for the training distribution . Let us note that the total risk valueR ( x ) admits the following decomposition : R ( x ) = R̃ ( x ) +R∗ ( x ) , where R∗ ( x ) = P ( g∗ ( X ) 6= Y | X = x ) is Bayes risk and R̃ ( x ) = P ( ĝ ( X ) 6= Y | X = x ) − P ( g∗ ( X ) 6= Y | X = x ) is an excess risk . HereR∗ ( x ) corresponds to aleatoric uncertainty as it completely depends on the data distribution . Excess risk R̃ ( x ) directly measures imperfectness of the model ĝ and thus can be seen as a measure of epistemic uncertainty . To proceed , we first assume that the classifier ĝ has the standard form : ĝ ( x ) = { 1 , η̂ ( x ) ≥ 12 , 0 , η̂ ( x ) < 12 , where η̂ ( x ) = p̂ ( Y = 1 | X = x ) is an estimate of the conditional density η ( x ) . For such an estimate we can efficiently bound the excess risk via the following classical inequality Devroye et al . ( 2013 ) : R̃ ( x ) = P ( ĝ ( X ) 6= Y | X = x ) − P ( g∗ ( X ) 6= Y | X = x ) ≤ 2|η̂ ( x ) − η ( x ) | . It allows us to obtain an upper bound for the risk : R ( x ) ≤ L ( x ) = R∗ ( x ) + 2|η̂ ( x ) − η ( x ) | , where R∗ ( x ) = min { η ( x ) , 1 − η ( x ) } is just the Bayes risk . While the upper bound still depends on the unknown quantity η ( x ) , we will see in the next section that L ( x ) allows for an efficient approximation under mild assumptions . 2.3 NONPARAMETRIC UNCERTAINTY QUANTIFICATION . 2.3.1 KERNEL DENSITY ESTIMATE AND ITS ASYMPTOTIC DISTRIBUTION . To execute the approach above we need to consider some particular type of estimator for ĝ . In this work , we suggest to consider classical kernel-based estimator of the conditional density as it allows for simple description of its asymptotic properties . For an arbitrary class label c , the conditional probability estimate can be expressed as : p̂ ( Y = c | X = x ) = ∑N i=1Kh ( xi − x ) [ yi = c ] ∑N j=1Kh ( xj − x ) . ( 1 ) Note that in case of c = 1 the equation above gives us η̂ ( x ) . In our experiments , we consider one dimensional kernel function K : R → R+ and construct the resulting kernel in Rd of the following form : Kh ( x− y ) = d∏ j=1 K ( xj − yj h ) . Different choices of kernels are possible , see Supplementary Material , Section A.4.1 ) . A well-known fact ( see , e.g . Powell ( 2010 ) ) is that the difference between η̂ ( x ) −η ( x ) for properly chosen bandwidth h converges in distribution as follows : η̂ ( x ) − η ( x ) → N ( 0 , 1 Nhd σ2 ( x ) p ( x ) { ∫ [ K ( u ) ] 2du } d ) , ( 2 ) where n is the number of data points in the training set , K ( · ) is the kernel used for kernel density estimate ( KDE ) , h is the bandwidth of the kernel ; d is the dimensionality of the problem and σ2 ( x ) is the standard deviation of the data label at point x . Note that we can efficiently approximate the variance term in ( 2 ) . To start with , the integral∫ [ K ( u ) ] 2du can be computed in the closed form for various standard kernels , see Supplementary Material , Table 3 . Second , we approximate the marginal density of objects p ( x ) . The density can be again obtained via KDE : p̂ ( x ) = 1 Nhd ∑N i=1Kh ( x− xi ) . However , one can choose the other estimates of the density , not necessarily related to the considered kernel estimate . For example , Gaussian Mixture Model ( GMM ) can be used similarly to Mukhoti et al . ( 2021 ) . The only thing left is the variance which can be estimated as σ̂2 ( x ) = σ̂2 ( y | x ) = η̂ ( x ) ( 1− η̂ ( x ) ) . Now we are equipped with an estimate of the distribution for η̂ ( x ) − η ( x ) . Let us denote by τ ( x ) the standard deviation of a Gaussian from equation ( 2 ) : τ2 ( x ) = 1 Nhd σ2 ( x ) p ( x ) { ∫ [ K ( u ) ] 2du } d . Based on the obtained approximation of the distribution for L ( x ) , one can construct an abstention procedure that takes into account properties of this distribution and study the theoretical properties of the resulting method similarly to ( Zaoui et al. , 2020 ) . We defer these studies to future work and focus on the practical approach for obtaining uncertainty estimates which directly follows from the derivations above . | This paper proposes a nonparametric uncertainty quantification method for deep neural networks. Using a kernel-based estimator of the conditional density (i.e., the predictive distribution $p(y|x)$) in the feature space of a pre-trained neural network, the epistemic and the aleatoric uncertainty can be obtained separately from an upper bound of the excess risk and Bayes risk. For practical feasibility, several subproblems are approached with existing methods, such as kernel density estimation/GMM for $p(x)$, Improved Sheather-Jones algorithm for kernel bandwidth selection, HMSW for fast nearest neighbors retrieval. Finally, good OOD detection performance is demonstrated on several image datasets including MNIST, CIFAR, and ImageNet. | SP:df1f6865ae290546a4d51d40f6ad3b2bfc900d7e |
Automated Channel Pruning with Learned Importance | Neural network pruning allows for significant reduction of model size and latency . How-1 ever , most of the current network pruning methods do not consider channel interdepen-2 dencies and a lot of manual adjustments are required before they can be applied to new3 network architectures . Moreover , these algorithms are often based on hand-picked , some-4 times complicated heuristics and can require thousands of GPU computation hours . In5 this paper , we introduce a simple neural network pruning and fine-tuning framework that6 requires no manual heuristics , is highly efficient to train ( 2-6 times speed up compared to7 NAS-based competitors ) and produces comparable performance . The framework contains8 1 ) an automatic channel detection algorithm that groups the interdependent blocks of9 channels ; 2 ) a non-iterative pruning algorithm that learns channel importance directly from10 feature maps while masking the coupled computational blocks using Gumbel-Softmax11 sampling and 3 ) a hierarchical knowledge distillation approach to fine-tune the pruned12 neural networks . We validate our pipeline on ImageNet classification , human segmentation13 and image denoising , creating lightweight and low latency models , easy to deploy on14 mobile devices . Using our pruning algorithm and hierarchical knowledge distillation for15 fine-tuning we are able to prune EfficientNet B0 , EfficientNetV2 B0 and MobileNetV216 to 75 % of their original FLOPs with no loss of accuracy on ImageNet . We release a set17 pruned backbones as Keras models - all of them proved beneficial when deployed in other18 projects.19 1 INTRODUCTION20 Efforts directed towards deployment of neural networks on low-performance devices such as mobile phones21 or TVs , created a demand for smaller and faster models . This has led to advances in neural network22 compression techniques , which allow us to minimize existing large-scale architectures and adjust them to23 fit specific hardware requirements . Some techniques have been especially successful in this area . Neural24 network quantization approaches ( Nagel et al. , 2021 ) not only decreased the size of the models , but also25 enabled us to utilize specialized computing accelerators like DSPs . Unfortunately , other techniques , such as26 network pruning ( Liu et al. , 2020 ) , are not equally effective in low-resource environments.27 Early attempts of naive weight pruning introduced sparse computations , which render them inefficient in28 practical scenarios ( Han et al. , 2015 ; Guo et al. , 2016 ) . Channel pruning ( Li et al. , 2016 ; Liu et al. , 2017 ; 29 2021a ; Herrmann et al. , 2020 ; Liu et al. , 2019b ) delivers significant improvements in terms of both memory30 consumption and execution speed , and is the preferred approach if we want to deploy our models on mobile31 devices.32 However , the majority of existing approaches to channel pruning share several drawbacks:33 1 . Little effort has been made to address channel interdependencies that occur in the majority of the34 architectures , with Liu et al . ( 2021a ) being a notable exception . Many popular network architectures35 contain residual connections inspired by ResNet ( He et al. , 2015 ) . Feature maps added in residual36 connections must hold the same shapes , which is likely to be violated when channels are removed37 independently . We refer to channels involved in this kind of dependency as coupled . Automating38 the process of adding pruning logic to the network in consideration of channel interdependencies is39 extremely important in practical considerations.40 2 . Most methods require an expensive and time-consuming fine-tuning process after channels are41 removed . Some authors use an iterative approach , where channels are removed in a number of steps,42 and fine-tuning is performed between these steps . Either way , the fine-tuning process often requires43 a significant number of GPU hours to complete.44 3 . Channels in any given convolution are being considered independently . However , some target45 platforms , e.g . SNPE ( Qualcomm ) , are optimized for specific numbers of input and output channels46 and pruning channels independently can give little to no speed-up.47 In order to overcome these issues we introduce an end-to-end channel pruning pipeline which can be48 deployed on a wide array of neural networks in an automated way . Our main insights are that : ( 1 ) Channel49 Similar , but a more affordable approach , is to periodically prune channels throughout a single training90 procedure ( Liu et al. , 2021a ; Guo et al. , 2020 ; Chen et al. , 2020 ) . Ye et al . ( 2020 ) and Hou et al . ( 2021 ) 91 point out flaws in the idea of greedy channel removal and propose to selectively restore channels in the92 pruned network . Liu et al . ( 2019b ) trains an auxiliary neural network to quickly evaluate pruned networks93 and select the best one using an evolutionary algorithm . Other methods jointly train a neural network and94 learn importance scores for its channels using channel gating mechanism . In ( Chen et al. , 2020 ) , this is95 achieved by randomly enable and disable channels during each iteration of the training . Gradient descent96 was used to update the importance scores in Herrmann et al . ( 2020 ) ; Lin et al . ( 2020 ) ; Ye et al . ( 2020 ) and is97 based on the idea for optimizing hyperparameters in neural architecture search in Liu et al . ( 2019a ) and Xie98 et al . ( 2018 ) . These gradient-based methods rely on Gumbel-Softmax reparametrization trick ( Jang et al.,99 2016 ) to enable back-propagating through the gates distribution . Herrmann et al . ( 2020 ) proposes a variant100 of such a method where the logits of the channel gates are trainable parameters , as well as a variant where101 the logits are produced by an auxiliary neural network that accepts a feature map . Selecting channels based102 network input introduces an overhead that is unacceptable on resource-limited devices . Our solution contains103 a similar idea , but we ensured that the auxiliary networks can be safely removed after the training.104 Channel coupling . The channel coupling pattern occurs in many modern architectures inspired by ResNet105 ( He et al. , 2015 ) , such as MobileNet ( Sandler et al. , 2018 ) , EfficientNet ( Tan & Le , 2019 ; 2021 ) or FBNet106 ( Wan et al. , 2020 ) . Many studies seem to ignore this issue ( Herrmann et al. , 2020 ; Lin et al. , 2020 ; Ye et al.,107 2020 ) ; other resolve this issue by manually grouping interdependent layers or providing model-specific108 heuristics ( Shao et al. , 2021 ; Hou et al. , 2021 ; Guo et al. , 2020 ; Liu et al. , 2021b ) . Independently to our109 efforts , an automated solution for grouping channels has been proposed in Liu et al . ( 2021a ) . We propose a110 similar algorithm ( see section 4 ) , and additionally offer an extension for handling concatenations.111 Measuring speed-up . Many pruning methods are parametrised by a fraction of channels to prune , either112 globally or per-layer ( Lin et al. , 2020 ; Ye et al. , 2020 ; Herrmann et al. , 2020 ) . Overall network FLOPs1113 better corresponds to the usual business requirements . In Chen et al . ( 2020 ) and Liu et al . ( 2021a ) , the114 maximal FLOPs parameter is included in their stopping criteria and importance scores of channels are115 adjusted according to their computation cost . Similarly to Guo et al . ( 2020 ) , we construct a loss function that116 introduce a penalty for exceeding the provided FLOPs budget and use it as a part differentiable importance117 optimization.118 Knowledge distillation . It has been noted that Knowledge distillation can perform poorly when there is119 a large discrepancy in complexity between student and teacher networks ( Cho & Hariharan , 2019 ) . Cho120 & Hariharan ( 2019 ) evaluate a step-wise approach , in which the intermediate teacher networks are trained121 by distilling knowledge from the original large teacher and then find it ineffective . Mirzadeh et al . ( 2020 ) 122 propose using a teacher assistant to bridge the complexity gap . Hou et al . ( 2021 ) apply knowledge distillation123 to fine-tune pruned network , but do not address aforementioned issues . We propose an inverted version of124 the step-wise approach from Cho & Hariharan ( 2019 ) , and train train our pruned network with increasingly125 larger teachers . Such chains can be naturally formed for model families like EfficientNet ( Tan & Le , 2019 ) 126 and EfficientNetV2 ( Tan & Le , 2021 ) . We also observe that in case of generic knowledge distillation , the127 final results can be improved by ( even slightly ) disturbing the student model with channel pruning before128 starting the distillation.129 3 PRUNING METHOD130 The basic idea behind our channel pruning algorithm is to set up a scheme in which the importance of131 channels is being learned from the feature maps generated by convolutions in neural networks . We assign132 each channel a score corresponding to its importance that is updated at each training step and used to133 approximate behavior of the pruned network by appropriate masking ( Liu et al. , 2017 ; Herrmann et al.,134 2020 ) . Similarly to Herrmann et al . ( 2020 ) we apply a probabilistic approach where channels in feature135 maps are masked with samples from random variables with values in ( 0 , 1 ) . This is a continuous relaxation136 approach to solving a discrete problem . The distributions of these random variables depend on the values of137 corresponding logits ( which can be though of as proxies for channel scores and have values in R ) . These138 logits are learned during the pruning stage . More precisely , given a feature map of size ( B , H , W , C ) ( B139 is batch size , H and W are spatial dimension and C is the number of channels ) and a logits variable , for140 each channel separately we sample — using Gumbel-Softmax ( Jang et al. , 2016 ) — the random variable141 parametrized by the corresponding logit in logits . We mask the feature map by multiplying it by the142 sampled values.143 We do not consider each feature map individually — instead , we extend our understanding of channels from144 a single feature map to a series of operations occurring within a network . The intuition is that element-wise145 operations , like activation functions , propagate channels forward throughout the network , while convolutional146 layers consume their input channels and create new ones . Pruning sequential models is trivial but in more147 complicated cases , like models with residual connections , there exist additional couplings between channels,148 introduced by operations that accept multiple inputs , e.g . element-wise sum , multiplication ( Fig . 2 ) . Because149 1a number of floating-point operations coupled channels must be pruned jointly to ensure valid shapes , we use a single random variable to mask150 each set of coupled channels ( see Section 4 for details about automatic detection of coupled channels ) .151 Although logits can be treated as standalone trainable variables , we choose to learn them from the feature152 maps in a feedback-loop mechanism . This is because the latter approach is faster to train , results in logits153 which ( once converted to probabilities ) have lower entropy and produces better results . Once we decide on154 the feature maps from which we will learn the optimal logits values , we place simple neural networks called155 logit predictor modules that take these feature maps as inputs . These modules are build of 3x3 depthwise156 convolution followed by 1x1 convolution and global mean pooling along spatial dimensions . The output157 output vector of each such module is later used to update the value of the corresponding logits variable158 ( using exponential moving average ) as in Figure 2.159 The masking operations should always be placed just before the convolution operations that absorb the160 channels ( see Figure 2 ) . The placement of logit predictors is more involved and in cases more complicated161 than the relatively simple one presented in Figure 2 , we choose to follow a simple heuristic to place them162 after convolutions with largest kernel sizes.163 During the pruning phase we augment the task-specific loss with an auxiliary latency-based loss . It is based164 on the expected number of FLOPs in the pruned network , which is computed by using all the logits we have165 attached to the network . We train network weights and logit predictor modules jointly so that the network166 can adjust to channels being phased out.167 3.1 PRUNING LARGER BLOCKS OF CHANNELS168 We allow for blocks of channels ( instead of just individual channels ) to be treated jointly , so that blocks169 of a predefined size will be chosen or discarded together . This is especially important for platforms where170 convolutions are optimized with a specific block size o channels in mind , e.g. , for SNPE ( Qualcomm ) this171 number is 32 and pruning individual channels often makes little sense.172 4 LAYER GROUPING ALGORITHM173 Although channel coupling has been observed in the literature , relevant groups of operations seem to be174 usually established via network-specific heuristics or manual annotation . A notable exception is Liu et al.175 ( 2021a ) where the problem is described at length and an algorithm for finding the groups is derived . The176 algorithm is then tested on architectures based on ResNet . However , unlike our solution , it does not support177 concatenation operations . For clarity , we focus on convolutional neural networks , but the proposed strategy178 can be extended to other kinds of architectures.179 4.1 SOLUTION180 To overcome the issues delineated in Section 3 and make channel pruning available for most off-the-181 shelf architectures we have developed an algorithm that is capable of automatically detecting channel182 interdependencies between feature maps generated by operations in the network.183 To keep track of all the places where channels have to be considered in a synchronised way , we introduce the184 concept of an orbit . An orbit can be thought as subset of operations that are interdependent from the point of185 view of channel pruning . Operations in the same orbit need to be considered jointly when removing channels.186 Naively removing channels without taking into account these interdependencies may result in an invalid187 network . For example , if we remove an output channel from one of the convolutions on the left in Figure 2,188 the number of channels will no longer match for the Sum operation . A typical network has multiple orbits.189 It is easiest to understand this concept by seeing how orbits are build , which we delineate in Algorithm 1190 below.191 First , we fix some notation to make matters more intuitive . All the operations in a typical convolutional192 neural network can be described as being of the following types:193 1. sources are the operation where new channels are being created , namely regular convolution layers194 ( not depthwise ! ) and dense layers ; 195 2. sinks are the operation where channels are being absorbed , namely regular convolution layers ( not196 depthwise ! ) and dense layers ; 197 3. continuators are all the operations with a single input tensor that simply pass on the channels198 forward , e.g. , batch normalization , mean pooling , resize , activations ; 199 4. joiners are operations with multiple input tensors of the same shape which join these tensors200 without altering the shape , namely element-wise addition and multiplication ; 201 Typically , continuator operations are not problematic since they do not alter the channels structure and have202 a single predecessor and a single output . It is the joiner operations that introduce interdependencies between203 channels . For brevity , from now on we will only speak of convolutions as sources and sinks , but everything204 applies just as well to dense layers.205 Note that some sources can be sinks at the same time and vice versa . We refer to operations that are either206 sinks or sources as source-sinks . To identify all the subgraphs in the network where channels have to be207 considered jointly we run an exhaustive-search type algorithm which has two distinct phases:208 In the fist phase we search for extended orbits , where the coupled operations are brought together . In209 Algorithm 1 we describe how extended orbits are created . The input is a neural network directed acyclic210 graph ( DAG ) . The algorithm amounts to removing all inbound edges from convolution nodes and finding all211 weakly connected components in the resulting graph . The extended orbits are then these weakly connected212 components once we restore the inbound edges in convolution nodes.213 The second phase is similar to the first one . For all extended orbits found in phase one we do the following:214 take the extended orbit and then mark concatenation nodes ( which play a special role , since they group215 channels from separate sources ) inside as sinks and repeat the process . Most notably , we discard extended216 orbits in which there are concatenation nodes followed by joiner nodes , as it makes the whole process much217 more difficult to implement . We do not prune channels within such orbits . In Figure 3 we give an example of218 an extended orbit and how is broken up into final orbits.219 Algorithm 1 Searching for extended orbits Input : network DAG with layers represented as nodes 1 : P : = { p : p is a path starting and ending with a convolution with no convolutions inside the path } 2 : for each path p in P remove the last node 3 : for every distinct node ni on paths in P , create an empty color set for the node Cni = { } 4 : X : = { x : x is the initial node of a path in P } 5 : for x in X do 6 : pick an unused color c 7 : add color c to color sets of all the nodes on all the paths in P starting in x 8 : end for 9 : while there exist nodes with multiple colors do 10 : pick a node with multiple colors { c1 , c2 , . . . , ck } at random 11 : if any node in the DAG has a color in { c2 , . . . , ck } switch the color to c1 12 : end while 5 PRUNING , FINE-TUNING AND HIERARCHICAL KNOWLEDGE DISTILLATION220 5.1 PRUNING STAGE221 The pruning workflow is the same for all types of tasks . We first find all final orbits in the network and attach222 logit predictors . Final orbits determine both : which parts of the network are being pruned and which of them223 are pruned jointly . The FLOPs per pixel can be automatically computed ( and are differentiable with respect224 to the channel logits as in ( Fig . 2 ) . We can compute FLOPs for the original network and then set some225 FLOPs target . In practice we compute kFPP ( FLOPs per pixel of the input tensor divided by 1000 ) , to have226 a value that is independent of the input size . The latency loss is then given by ReLU ( kFPP/target_kFPP−1 ) .227 We add this loss to the quality loss related to the task , e.g. , cross entropy in classification . To avoid an228 overly aggressive reduction of kFPP , we anneal the loss using exponential decay so that at the beginning of229 training the annealing multiplier is 0. and approaches 1. as the training progresses.230 Once the pruning phase is over we retain or discard output channels in convolutions based on channel231 interdependence discovered by applying Algorithm 1 and the values of logits variables learned by logit232 predictors.233 5.2 FINE-TUNING AND HIERARCHICAL KNOWLEDGE DISTILLATION234 We propose to fine-tune pruned models with a method we call hierarchical knowledge distillation . This235 approach relies on increasing the complexity of the teacher network in discrete steps . Given a fine-tuning236 budget of K GPU hours , and N teacher networks we train the network for K/N GPU hours with each of237 these teacher networks , starting with the smallest one . Our loss is Lce + 5Lkd where Lce is the standard238 cross entropy loss and Lkd is the distillation loss . Using higher weight term for the Lkd is crucial to prevent239 overfitting and produce better results.240 Hierarchical knowledge distillation consistently performs much better than just using the original model as241 the teacher . The comparisons can be seen in Section 6.2 . Given an array of models with increasing FLOPs242 requirements , like EfficientNet Tan & Le ( 2019 ) and EfficientNetV2 Tan & Le ( 2021 ) , it is possible to cheaply243 train new models for missing FLOPs values . This may produce better results in terms of FLOPs/accuracy244 trade-off and require less computational resources.245 It is perplexing that trying to use hierarchical knowledge distillation on an unpruned network does not work246 anywhere near as well . Our intuition is that pruning provides some kind of initial perturbation to network247 weights and architecture which prove beneficial from the point of view of gradient descent optimization.248 Are there any other types of model perturbations which boost the effectiveness of this type of knowledge249 distillation ? These are the questions we could try to address as our future research . It would be also250 interesting to see how this approach performs when applied to recent state-of-the-art methods based on251 neural architecture search Wang et al . ( 2021 ) .252 6 EXPERIMENTS253 All the experiments we perform adhere to the same schedule : ( 1 ) We first run the pruning algorithm with254 additional latency losses ( usually 1-10 epochs , depending on the task ) . ( 2 ) We then fine-tune the pruned255 model ( without resetting its weights ) . The experiments for classification on ImageNet are presented in256 Section 6.2 . Experiments for image denoising and human segmentation are presented in Sections A.2.1 and257 A.2.2 , respectively.258 6.1 HYPERPARAMETERS FOR THE PRUNING PHASE259 For the pruning phase , during which channels to be removed are being chosen , the setup is roughly the same260 for each task . The logits predictor is always a two layer network with 3× 3 depthwise convolution followed261 by 1× 1 convolution and global mean pooling . We set the batch size to 16 and run the training updating the262 channel gates distributions as described in section 3 . The initial value of channel logits is set to 3.0 so that263 initially there little to no masking . There is an additional loss that penalizes the entropy of all the logits so264 that at the end of the pruning phase the channel enabling probabilities ( which we get by applying softmax to265 logits ) are far away from 0.5 . The temperature for Gumbel-Softmax is constant - 0.5.266 6.2 CLASSIFICATION ON IMAGENET267 We prune EfficientNet B0 , EfficientNet B1 ( Tan & Le , 2019 ) , MobileNetV2 ( Sandler et al. , 2018 ) , and268 EfficientNetV2 ( Tan & Le , 2021 ) . We choose these since they are already highly optimized for mobile devices269 and relatively small . EfficientNetV2 is a recent state-of-the-art architecture optimized for mobile GPUs and270 DSPs . All the models are taken from their official Keras implementations2 except for EfficientNetV2 . Larger271 2https : //www.tensorflow.org/api_docs/python/tf/keras/applications networks like the VGG19 or the ResNet family has been predominant in channel pruning literature , but are272 rarely suitable for resource-limited devices , where the need for optimization is biggest . The phase where273 channels are chosen usually lasts a little more than a single epoch on ImageNet . We split the ImageNet train274 data into two parts , leaving about 5 % of the data for early-stopping.275 Following Section 5.2 we use multiple teacher networks . The details are as follows:276 • EfficientNet B0 : fine-tune the models for 40 epochs with B0 as teacher and then we further277 fine-tune with a B1 for another 40 epochs ; 278 • EfficientNet B1 : fine-tune the models for 25 epochs with B1 as teacher and then we further279 fine-tune with a B2 for another 25 epochs.280 • MobileNetV2 : fine-tune the models for 40 epochs with MobileNetV2 as teacher and then we281 further fine-tune with a EfficientNet B0 for another 40 epochs.282 • EfficientNetV2 B0 : fine-tune the models for 16 epochs with B0V2 as , then fine-tune the models283 for 16 epochs with B1V2 as teacher and finally fine-tune the models for 16 epochs with B2V2 as284 teacher.285 The interesting thing we noticed is that using knowledge distillation without pruning does not help at all.286 For example we tried fine-tuning MobileNetV2 with EfficientNet B0 teacher right away and top 1 Imagenet287 accuracy fell from 71.52 % to 71.12 % . We conjecture that some kind of initial perturbation is needed for288 knowledge distillation to work . In our case this perturbation is channel pruning.289 Batch size is set to 192 for B0 and MobileNetV2 fine-tuning . For B1 and EfficientNetV2 B0 batch size is290 128 . The input image resolution is ( 224 , 224 ) . We use only random crop and flip as augmentations . For291 training we use one NVidia RTX3090 GPU . For the pruning phase we set the batch size to 16 and , quite292 importantly , we freeze all batch normalization layers . We use Adam optimizer for all the training runs.293 During mask-learning phase the learning rate is set to 0.0001 . For fine-tuning we use exponential decay with294 learning rate initially set to 0.0001 and the decay rate set to 0.001.295 6.2.1 COMPARISONS AND DISCUSSION296 Few authors have attempted to prune EfficientNet ( Tan & Le , 2019 ) . We can compare our results with Hou297 et al . ( 2021 ) , where only one model is presented , which was also fine-tuned with knowledge distillation . We298 provide a much wider FLOPs spectrum for B0 and prune B1 as well . It is interesting to see that B1 pruned to299 the FLOPs level of B0 outperforms B0 by a wide margin . The results are in Table 1.300 Comparisons for MobileNetV2 are quite difficult due the inconsistencies between different versions of the301 model taken by different authors as their baseline . For instance in Hou et al . ( 2021 ) the authors first take an302 over-pruned backbone which they proceed to prune . In Liu et al . ( 2019b ) the largest version of MobileNetV2303 is taken ( 585M FLOPs ) and then pruned . Some of the authors run the fine-tuning for much longer than we do.304 Notably , in Ye et al . ( 2020 ) the fine-tuning is run on 4 GPUs with batch size 512 and for 250 epochs which is305 considerably more expensive than our approach . Detailed results are in Table 2 and Figure 5a . Again using306 hierarchical knowledge distillation we are able to fine-tune the model pruned to 75 % of original FLOPs so307 that it has 0.7 % higher accuracy than the original.308 When it comes to EfficientNetV2 , we are able to outperform the original model ’ s results on ImageNet with309 the help of hierarchical EKD , inasmuch as the pruned version of B0 ( 70 % of the FLOPs of the original310 model ) has higher top 1 accuracy than the original . See Table 3 and Figure 5b.311 7 CONCLUSION312 Using an automated solution to process coupled channels in neural network architectures and a simple313 scheme to learn channel importance , we are able to prune models with varying architectures for different314 underlying tasks . For fine-tuning pruned classification networks we use hierarchical knowledge distillation315 which produces much better results than just using the original model as a teacher . The whole pruning316 pipeline requires much less computational resources than some of the state-of-the-art NAS based solutions317 for finding efficient FLOPs / accuracy trade-offs like Wang et al . ( 2021 ) .318 REFERENCES319 Zhiqiang Chen , Ting-Bing Xu , Changde Du , Cheng-Lin Liu , and Huiguang He . Dynamical channel pruning320 by conditional accuracy change for deep neural networks . IEEE transactions on neural networks and321 learning systems , 32 ( 2 ) :799–813 , 2020.322 J. Cho and B. Hariharan . On the efficacy of knowledge distillation . pp . 4793–4801 , nov 2019. doi : 10.323 1109/ICCV.2019.00489 . URL https : //doi.ieeecomputersociety.org/10.1109/ICCV.324 2019.00489.325 Ke Gong , Xiaodan Liang , Dongyu Zhang , Xiaohui Shen , and Liang Lin . Look into person : Self-supervised326 structure-sensitive learning and a new benchmark for human parsing . In Proceedings of the IEEE327 Conference on Computer Vision and Pattern Recognition ( CVPR ) , July 2017.328 Shaopeng Guo , Yujie Wang , Quanquan Li , and Junjie Yan . Dmcp : Differentiable markov channel pruning329 for neural networks . In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern330 Recognition , pp . 1539–1547 , 2020.331 Yiwen Guo , Anbang Yao , and Yurong Chen . Dynamic network surgery for efficient dnns . arXiv preprint332 arXiv:1608.04493 , 2016.333 Song Han , Jeff Pool , John Tran , and William J Dally . Learning both weights and connections for efficient334 neural networks . arXiv preprint arXiv:1506.02626 , 2015.335 Kaiming He , Xiangyu Zhang , Shaoqing Ren , and Jian Sun . Deep residual learning for image recognition,336 2015.337 Yihui He , Xiangyu Zhang , and Jian Sun . Channel pruning for accelerating very deep neural networks . In338 Proceedings of the IEEE international conference on computer vision , pp . 1389–1397 , 2017.339 Charles Herrmann , Richard Strong Bowen , and Ramin Zabih . Channel selection using gumbel softmax . In340 European Conference on Computer Vision , pp . 241–257 . Springer , 2020.341 Yuenan Hou , Zheng Ma , Chunxiao Liu , Zhe Wang , and Chen Change Loy . Network pruning via resource342 reallocation . CoRR , abs/2103.01847 , 2021 . URL https : //arxiv.org/abs/2103.01847.343 Eric Jang , Shixiang Gu , and Ben Poole . Categorical reparameterization with gumbel-softmax . arXiv preprint344 arXiv:1611.01144 , 2016.345 Hao Li , Asim Kadav , Igor Durdanovic , Hanan Samet , and Hans Peter Graf . Pruning filters for efficient346 convnets . arXiv preprint arXiv:1608.08710 , 2016.347 Mingbao Lin , Rongrong Ji , Yan Wang , Yichen Zhang , Baochang Zhang , Yonghong Tian , and Ling Shao.348 Hrank : Filter pruning using high-rank feature map . CoRR , abs/2002.10179 , 2020 . URL https:349 //arxiv.org/abs/2002.10179.350 Baoyuan Liu , Min Wang , Hassan Foroosh , Marshall Tappen , and Marianna Pensky . Sparse convolutional351 neural networks . In Proceedings of the IEEE conference on computer vision and pattern recognition , pp.352 806–814 , 2015.353 Hanxiao Liu , Karen Simonyan , and Yiming Yang . Darts : Differentiable architecture search , 2019a.354 Jiayi Liu , Samarth Tripathi , Unmesh Kurup , and Mohak Shah . Pruning algorithms to accelerate convolutional355 neural networks for edge applications : A survey . arXiv preprint arXiv:2005.04275 , 2020.356 Liyang Liu , Shilong Zhang , Zhanghui Kuang , Aojun Zhou , Jing-Hao Xue , Xinjiang Wang , Yimin Chen,357 Wenming Yang , Qingmin Liao , and Wayne Zhang . Group fisher pruning for practical network compression.358 In Marina Meila and Tong Zhang ( eds . ) , Proceedings of the 38th International Conference on Machine359 Learning , volume 139 of Proceedings of Machine Learning Research , pp . 7021–7032 . PMLR , 18–24 Jul360 2021a . URL https : //proceedings.mlr.press/v139/liu21ab.html.361 Xiangcheng Liu , Jian Cao , Hongyi Yao , Wenyu Sun , and Yuan Zhang . Adapruner : Adaptive channel pruning362 and effective weights inheritance . arXiv preprint arXiv:2109.06397 , 2021b.363 Zechun Liu , Haoyuan Mu , X. Zhang , Zichao Guo , X. Yang , K. Cheng , and Jian Sun . Metapruning : Meta364 learning for automatic neural network channel pruning . 2019 IEEE/CVF International Conference on365 Computer Vision ( ICCV ) , pp . 3295–3304 , 2019b.366 Zhuang Liu , Jianguo Li , Zhiqiang Shen , Gao Huang , Shoumeng Yan , and Changshui Zhang . Learning367 efficient convolutional networks through network slimming . In Proceedings of the IEEE international368 conference on computer vision , pp . 2736–2744 , 2017.369 Jian-Hao Luo , Hao Zhang , Hong-Yu Zhou , Chen-Wei Xie , Jianxin Wu , and Weiyao Lin . Thinet : pruning370 cnn filters for a thinner net . IEEE transactions on pattern analysis and machine intelligence , 41 ( 10 ) :371 2525–2538 , 2018.372 Seyed Mirzadeh , Mehrdad Farajtabar , Ang Li , Nir Levine , Akihiro Matsukawa , and Hassan Ghasemzadeh.373 Improved knowledge distillation via teacher assistant . Proceedings of the AAAI Conference on Artificial374 Intelligence , 34:5191–5198 , 04 2020. doi : 10.1609/aaai.v34i04.5963.375 Markus Nagel , Marios Fournarakis , Rana Ali Amjad , Yelysei Bondarenko , Mart van Baalen , and Tijmen376 Blankevoort . A white paper on neural network quantization . arXiv preprint arXiv:2106.08295 , 2021.377 Qualcomm . Snpe : Snapdragon neural processing engine . https : //developer.qualcomm.com/378 sites/default/files/docs/snpe/.379 Mark Sandler , Andrew G. Howard , Menglong Zhu , Andrey Zhmoginov , and Liang-Chieh Chen . Inverted380 residuals and linear bottlenecks : Mobile networks for classification , detection and segmentation . CoRR,381 abs/1801.04381 , 2018 . URL http : //arxiv.org/abs/1801.04381.382 Wenqi Shao , Hang Yu , Zhaoyang Zhang , Hang Xu , Zhenguo Li , and Ping Luo . Bwcp : Probabilistic383 learning-to-prune channels for convnets via batch whitening . arXiv preprint arXiv:2105.06423 , 2021.384 Mennatullah Siam , Heba Mahgoub , Mohamed Zahran , Senthil Yogamani , Martin Jagersand , and Ahmad El-385 Sallab . Modnet : Motion and appearance based moving object detection network for autonomous driving.386 In 2018 21st International Conference on Intelligent Transportation Systems ( ITSC ) , pp . 2859–2864 , 2018.387 doi : 10.1109/ITSC.2018.8569744.388 Mingxing Tan and Quoc V. Le . Efficientnet : Rethinking model scaling for convolutional neural networks.389 CoRR , abs/1905.11946 , 2019 . URL http : //arxiv.org/abs/1905.11946.390 Mingxing Tan and Quoc V. Le . Efficientnetv2 : Smaller models and faster training . CoRR , abs/2104.00298,391 2021 . URL https : //arxiv.org/abs/2104.00298.392 Mingxing Tan , Ruoming Pang , and Quoc V. Le . Efficientdet : Scalable and efficient object detection . CoRR,393 abs/1911.09070 , 2019 . URL http : //arxiv.org/abs/1911.09070.394 Alvin Wan , Xiaoliang Dai , Peizhao Zhang , Zijian He , Yuandong Tian , Saining Xie , Bichen Wu , Matthew395 Yu , Tao Xu , Kan Chen , Peter Vajda , and Joseph E. Gonzalez . Fbnetv2 : Differentiable neural architecture396 search for spatial and channel dimensions . In Proceedings of the IEEE/CVF Conference on Computer397 Vision and Pattern Recognition ( CVPR ) , June 2020.398 Dilin Wang , Chengyue Gong , Meng Li , Qiang Liu , and Vikas Chandra . Alphanet : Improved training of399 supernet with alpha-divergence . arXiv preprint arXiv:2102.07954 , 2021.400 Yuzhi Wang , Haibin Huang , Qin Xu , Jiaming Liu , Yiqun Liu , and Jue Wang . Practical deep raw image401 denoising on mobile devices , 2020.402 Sirui Xie , Hehui Zheng , Chunxiao Liu , and Liang Lin . Snas : stochastic neural architecture search . arXiv403 preprint arXiv:1812.09926 , 2018.404 Mao Ye , Chengyue Gong , Lizhen Nie , Denny Zhou , Adam Klivans , and Qiang Liu . Good subnetworks405 provably exist : Pruning via greedy forward selection . CoRR , abs/2003.01794 , 2020 . URL https:406 //arxiv.org/abs/2003.01794.407 A APPENDIX408 A.1 LAYER WIDTHS VISUALIZATION409 It is quite interesting to see how layer width looks like after pruning . The pattern that emerge are quite410 telling . EfficientNets are build of a series of meta-blocks , .e.g , 2 , 3 , . . . , 7 in EfficientNet B0 , where each411 meta-block consists of a number of MBCONV blocks at the same spatial resolution . It appears that in each412 such meta-block the most important block is usually the first one , and block importance decays proportionally413 to the depth of the block inside the meta-block . See Figure 6 in the Appendix.414 A.2 FURTHER RESULTS415 A.2.1 RAWRGB IMAGE DENOISING416 We prune a recent state-of-the-art network for RawRGB image denoising on mobile devices introduced417 in Wang et al . ( 2020 ) . We train the models on SIDD Medium dataset https : //www.eecs.yorku.418 ca/~kamel/sidd/dataset.php . We first extract 256x256 patches for training and validation and419 then test the networks on SIDD validation dataset https : //www.eecs.yorku.ca/~kamel/sidd/420 benchmark.php . The batch size is set to 16 , learning rate is 0.0001 and we use Adam optimizer . The421 loss is mean absolute error . We train the original model for 150 epochs , prune it and then train the original422 model for another 150 epochs . The pruned models are fine-tuned for 150 epochs as well . For comparison we423 also train from scratch smaller ( linearly scaled down ) versions of the original model . The results can be seen424 in Table 4 and Figure 7.425 A.2.2 HUMAN SEGMENTATION426 For semantic segmentation we use a private dataset for training human segmentation models for real time427 prediction in video bokeh task . This is dictated by the need to have superior edge quality which is missing428 in publicly available data for segmentation . The dataset consists of 120k real image/mask pair and 50k429 synthetic ones . Apart from IoU we also compute edge IoU , which pays attention only to the edges of the430 masks and can be thought of as a proxy for edge quality . The baseline architecture consists of an EfficientNet431 B0 ( Tan & Le , 2019 ) backbone , EfficientDet ( Tan et al. , 2019 ) ( modified slightly to allow for easier channel432 pruning ) fusion block and a detail branch ( Siam et al. , 2018 ) to preserve edge quality . The backbone network433 is pretrained on ImageNet . We train the original model for 70 epochs , prune and then fine-tune the pruned434 models for 50 epochs . The validation results are presented in Table 4 . The validation dataset is a split of a435 modified version of LIP dataset ( Gong et al. , 2017 ) , where objects belonging to people ( such as handbags,436 etc . ) are also considered part of these people . This is done , so that we can train models for video bokeh437 effect . The results are in Table 4b and are visualized in Figures 8a and 8b.438 Notice that the smallest pruned model is compressed to around 10 % of the size of the original one . Even in439 these extreme compression scenario our approach produces a model with IoU higher than 90 % . IoU starts440 dropping only after we have removed more than 60 % of the original FLOPs . This is an observation which , in441 our experience , is true for many more architectures for segmentation , the one being presented here is just442 one example . Edge IoU starts falling much more quickly , perhaps beacause we employ no edge-specific loss.443 | This paper proposes a neural network pruning and fine-tuning framework for model compression. It can automatically prune the channels by learning the channel importance. The contributions are: 1) A new pruning scheme is proposed by learning the channel importance; 2) The pruning logic is introduced in the pruning scheme. Thus, some grouping operations are pruned jointly. The pruning problems of residual connections in ResNet can be solved; 3) Hierarchical knowledge distillation is added in the fine-tuning phase to speed up training. Experimental results show effectiveness of the proposed method. | SP:ef83c8218b8940bfb37409d1e4ed2264f131afd2 |
Compressing Transformer-Based Sequence to Sequence Models With Pre-trained Autoencoders for Text Summarization | 1 INTRODUCTION . It is safe to say that the combination of Transformer ( Vaswani et al. , 2017 ) architecture , and transfer learning concept dramatically modified the landscape of Natural Language Processing ( NLP ) . Introduction of large-scale pre-trained language models like BERT ( Devlin et al. , 2018 ) , GPT-2 ( Radford et al. , 2019 ) , MegatronLM ( Shoeybi et al. , 2019 ) , BART ( Lewis et al. , 2019 ) , and GPT-3 ( Brown et al. , 2020 ) keeps on improving state-of-the-art results by fine-tuning them for downstream tasks such as Sentiment Analysis , Question Answering , and Summarization . However , the upward trend of the network size in mentioned models raises serious environmental ( Strubell et al. , 2019 ) and usability issues . The number of parameters in Transformers-based models is constantly rising . As a result , the hardware requirement for fine-tuning or inference drastically increased in the past couple of years . It is challenging for both researchers and developers to use these models and build on top of them without sufficient resources . To put it in perspective , the earliest and smallest BERT had 110M parameters ( Devlin et al. , 2018 ) , and the latest and largest Switch Transformer ( Fedus et al. , 2021 ) model was introduced with 1.5 trillion parameters which makes it accessible only using high-end servers . This issue is even more consequential for tasks such as automatic text summarization and machine translation that incorporate sequence-to-sequence architecture . This architecture consists of an encoder ( encoding the input sequences ) paired with a decoder ( generates tokens conditioned on the encoder ’ s representation ) . It means even more parameters will be added to the model for these tasks which is the min focus of this paper . It is important to discover techniques to reduce the overall network parameters while maintaining the quality of the generated text . In this paper , autoencoders ’ ( AE ) ( Liu et al. , 2019 ) property of dimensionality reduction is evaluated in a setting with sequence-to-sequence architecture and pretrained encoders . The autoencoder will act as an intermediate model to compress the encoder ’ s final representation and decoder will use this compressed latent representation to generate summaries with minimal information loss . The idea is to find the ideal trade-off between the compression ratio and model ’ s text generation capability . 2 BACKGROUND . Multiple different approaches have already been explored to tackle the problem of neural network models growing size . Quantization ( Gupta et al. , 2015 ) is one of the first experiments which apply to any deep learning model by using a half-precision ( 16-bit ) floating point to greatly reduce the network size and memory usage . Micikevicius et al . proposed a mixed precision algorithm in ( Micikevicius et al. , 2017 ) to further close the gap in evaluation results . Recent works experimented the effect of knowledge distillation ( Bucila et al. , 2006 ) method to transfer information from a larger network to a smaller one without significant loss in accuracy . There are multiple papers that present different combinations of fine-tuning and distillation on top of BERT . ( Chatterjee , 2019 ; Turc et al. , 2019 ) However , DistilBERT ( Sanh et al. , 2019 ) obtained the best results with training the smaller student model on BERT and then fine-tuning it for downstream tasks that resulted in a more generalized pre-trained model . Their approach led to similar implementations on other classic transformer models such as DistilGPT2 with 33 % less parameters ( two times faster ) which resulted in 21.1 perplexity score comparing to the GPT-2 ’ s 16.3 , and a 35 % smaller RoBERTa ( Liu et al. , 2019 ) model while maintaining 95 % of the accuracy on GLUE , named DistilRoBERTa.1 The pruning ( LeCun et al. , 1990 ) method ’ s influence on transfer learning have recently gained attention from researchers . It refers to determining the parts in the network that have the weaker effect on the model accuracy and removing them without compromising the model ’ s accuracy on downstream tasks . The main ideas are to either focus on finding the less important weights ( Gordon et al. , 2020 ) , or components such as number of self-attention heads ( Michel et al. , 2019 ) and layers ( Sajjad et al. , 2020 ) . This technique was also used in the Lottery Ticket hypothesis ( Frankle & Carbin , 2018 ; Prasanna et al. , 2020 ) to uncover subnetworks performing on par with the full model . The latest research area focuses on rethinking the self-attention mechanism to eliminate its quadratic memory usage connection with respect to the input sequence length . The goal is to find the best trade-off between performance and memory usage . Big Bird ( Zaheer et al. , 2020 ) and Longformer ( Beltagy et al. , 2020 ) papers experiment on different attention patterns to reduce connections and result in fewer computations . Wang et al . presented the Linformer ( Wang et al. , 2020 ) network that projects the self-attention vectors to lower dimensions . Reformer ( Kitaev et al. , 2020 ) paper studies the idea of grouping key and query vectors based on the locality sensitive hashing ( LSH ) to reduce the computations needed to find similar vectors . It is worth noting several studies that combined two or more methods to build even smaller models without significantly compromising the accuracy . Several such experiments are present in the literature , namely , a combination of distillation with pruning ( Hou et al. , 2020 ) , or quantization ( Sun et al. , 2020 ) . Also , Tabmbe et al . made the EdgeBERT ( Tambe et al. , 2020 ) model by leveraging both pruning and quantization along with other methods . These techniques are not exclusive , and it is possible to study them independently without testing all possible combinations . This is why we can focus our study only on one reduction method and only a few important models . 3 PROPOSED METHOD . Our proposed architecture is a sequence-to-sequence Transformer ( T ) model that includes a pretrained autoencoder ( AE ) connecting the network ’ s encoder ( Tenc ) to its decoder ( Tdec ) . ( Fig . 1 ) The mentioned approach will result in a smaller Tdec and reduce the overall number of trainable parameters . The modules are described in the sub-sections . 3.1 TRANSFORMER ENCODER ( Tenc ) The encoder ( Tenc ) part of the proposed architecture is a pre-trained transformer-based model . We have selected a set of models that include some of the best models for text summarization ; BERT , 1The results related to DistilRoBERTa model is available at https : //github.com/huggingface/ transformers/tree/master/examples/research_projects/distillation DistilBERT , BART ’ s encoder ( all base versions ) , and a custom transformer model . The custom transformer model is used to evaluate the effectiveness of our approach on a small pre-trained model with only 6 encoder layers and subsequently its scores are used as baseline and not supposed to be competitive with the ones of the other approaches . These models are frozen during the training processes to reduce the number of influential factors . 3.2 AUTOENCODER ( AE ) . The AE ( Fig . 1 ) purpose is to reduce the Tenc ’ s output size to a smaller latent space using the following equation : X ′AE = AEdec ( AEenc ( XAE ) ) Z = AEenc ( XAE ) Where XS×DAE is the input , AEenc indicates the encoder responsible for compressing the input to latent space ZS×C and a decoder AEdec generating the output X ′ S×D AE trying to reconstruct the input XS×DAE during the training process . Variables S and D denote the sequence length and input ’ s embedding dimension respectively . The values are dependent to the chosen pre-trained Tenc model ’ s configuration and are set to 512 and 768 in this paper . However , C that represents the compressed latent space size , will vary to find out the optimal latent space size . A 6-layer linear AE ( 3 for encoder and 3 for decoder ) was selected after comparing its reconstruction ability to the same architecture with Long Short-Term Memory ( LSTM ) ( Hochreiter & Schmidhuber , 1997 ) , or Convolutional Neural Network ( CNN ) ( LeCun et al. , 1998 ) building blocks . The final AE architecture with 6 linear layers was independently trained for each selected pre-trained encoder Tenc . It attempts to reconstruct the output of Tenc using a smaller representation Z . The frozen AEenc is then used in our summarizer architectures to pass a compressed representation to the decoder Tdec . ( From size D to C ) Refer to appendix A.1 for more information about the hidden layers ’ sizes . 3.3 TRANSFORMER DECODER ( Tdec ) The decoder component of the architecture ( Tenc ) is an original transformer decoder with 3-layers and a linear head on top in all the experiments . It is the only piece of the network that is not frozen after the AE has been trained . Its embedding dimension ties to the AE ’ s latent space size ( C ) that can drastically alter the architecture overall number of trainable parameters . 3.4 DATASETS . A combination of the CNN/Dailymail ( 300K samples ) ( Hermann et al. , 2015 ) and the Newsroom ( 1.3M samples ) ( Grusky et al. , 2018 ) datasets used for training all the summarizer models ; and the pre-defined test set of CNN/Dailymail dataset utilized to evaluate them . However , we randomly selected only 60 % of these combinations to train each autoencoder models to hold on unseen data to evaluate the generalization ability of the summarizer model . 3.5 EXPERIMENTS . We performed several experiments to evaluate the effectiveness of the proposed method . First ( AE ) , we combined different pre-trained encoders with several autoencoder compressed latent space sizes paired with a 3-layers decoder component in each instance . Second ( AE-S ) , we used the same autoencoders ( without the pre-training step ) and trained them jointly with the decoder from scratch to measure the effect of the pre-training step on the autoencoder . Third ( LL ) , using a small 1-layer learnable linear model to lower the encoder ’ s output dimensionality from D to C. Lastly ( PCA ) , we used the classical dimensionality reduction algorithm , incremental PCA ( Ross et al. , 2008 ) trained to project the outputs of the encoder to the 458 first principal components to preserve more than 90 % of variances and used them as the decoder input . All these models are trained with fixed hyperparameters to make them comparable . They are trained using the 1cycle ( Smith & Topin , 2019 ) training policy that increases the learning rate from 2e-5 to a maximum of 5e-4 while decreasing the momentum beta from 0.95 to 0.85 for faster convergence . We also used the Adam optimizer and the label smoothing CrossEntropy ( Pereyra et al. , 2017 ) loss function . The decoder ’ s feedforward layers and the eight attention heads ’ inner dimensions are 1024 and 32 , respectively , and their input sizes are dependent on the dimensionality reduction rate . 4 RESULTS The summaries are generated using three different decoding strategies . The fastest and easiest method to develop is picking the most probable output at each timestep , known as the Greedy algorithm . A more extensive approach is to use the Beam Search algorithm that develops K paths in parallel using the top K tokens with the highest scores . Finally , we used the Weighted Random Sampling algorithm that randomly chose a token from the top K probable outputs proportionally to their respective probabilities . In this paper , we used K value equals 5 and 2 for the beam search and weighted random sampling , respectively , based on the previous experiments . We experimented with different AE layer types and numbers . Linear , Long Short-Term Memory ( LSTM ) , and Convolutional Neural Network ( CNN ) AE architectures were trained with the Mean Square Error ( MSE ) loss for seven epochs to measure their performance . A latent space representation of size 64 was selected for this comparison benchmark ( Table 1 ) . The linear autoencoder outperforms both LSTM and CNN in all experiments . ( Refer to Appendix A.1 , Table 6 for the full list of all compression rates ) Also , the 6-layer design choice results in a better score in all experiments . The model size comparisons ( number of parameters ) are presented in Table 2 . The first step is to calculate the decoder ’ s size without using the dimensionality reduction method . As previously mentioned , based on the choice of the pre-trained encoder models , the default encoder ’ s representation dimension is 768 which results in a decoder with either 48M ( for BART encoder ) or 33M ( other options ) parameters . We use this value as the reference number to measure the reduction percentage . It is important to keep in mind that even though there are parameters being added to the model from the autoencoder that affects the percentage , the number of trainable parameters in all the experiments is equal to the decoder size since the rest of the components ( encoder , and autoencoder ) are frozen during the tests . The reason why we have decoders with different parameter counts while using the same hyper-parameters is because we use each model ’ s pre-trained tokenizers which have different vocabulary size , which affects the decoder ’ s last layer output dimension . BERT , DistilBERT , and Transformer models use the BERT ’ s pre-trained tokenizer , and BART uses its own . The proposed method results on the text summarization task are shown in Table 3 where the classic ROUGE ( R-1 , R-2 , R-3 , R-L , and R-W ) metric is reported using the greedy , weighted random sampling , and beam search decoding strategies . Autoencoders are trained with four ( 32 , 128 , 384 , 512 ) different latent space dimensions ( C ) to analyze the effect of these dimensionality reductions . The models are also evaluated using the BERTScore ( Zhang et al. , 2019 ) metric and the results follow the same direction . ( Refer to Appendix A.4 ) Our configurations not only reduce the number of parameters in the network by reducing the decoder size , but also shows the ability to increase the model ’ s summarization ability with a higher score compared to the original setup for the Transformer and DistilBERT models . The experiments show that adding an AE with C = 512 outperforms the same vanilla encoder-decoder network . Both BART and BERT experiments with the same AE size outperformed their vanilla model in several metrics only using the beam search method ; however , the rest of the scores with a smaller decoder are still competitive . An even more surprising result is that a smaller dedicated Transformer with the proposed method and C = 384 performed better than BART and BERT in all the summarization benchmarks . It also worth noting that the greedy inference method constantly results in better scores , with the weighted random sampling method following closely . The fact that beam search algorithm leans towards shorter sequences ( Wu et al. , 2016 ) reduces the ROUGE scores since there are fewer matching N-grams in the generated and target summaries . It does not mean that the sentences structure/quality are flawless using greedy/weighted random sampling , or poor using beam search , the results just reflect what the ROUGE score is measuring : an N-gram overlap between the generated and the target sequences . Our ablation results show ( Table 4 ) the impact of autoencoder pre-training step on the final score . It surpasses both training the AEenc jointly with the network from scratch ( AE S ) and using a simple learnable linear layer for projecting ( LL ) . Lastly , the PCA dimensionality reduction technique does not produce desirable results . The results also show that using an autoencoder with a latent space size of 384 ( C = 384 ) generates ROUGE score close to the vanilla model . It reduces the decoder size by 46 % from 48M to 24M for the BART model and 44 % from 33M to 16M parameters for the other models . The critical point is that the combination of this configuration associated with greedy decoding algorithm shows no noticeable degrading quality in the generated summary . ( Table 5 ) | The paper proposes a new autoencoder-based seq2seq model for text summarization tasks. The paper tries to find the best trade-off between compression ratio and model performance. The paper conducts extensive experiments by evaluating the loss of accuracy with ROUGE. | SP:d2640ee89bae300f4dc4c6e3225698dc2077b5f4 |
Invariant Learning with Partial Group Labels | 1 INTRODUCTION . Neural networks being overly biased to certain groups of the data is an increasing concern within the machine learning community [ 1 ] . A primary cause for bias against specific groups is the presence of extraneous attributes in the datasets that wrongly direct the model responses [ 38 ] . Such extraneous attributes are features that need to be controlled for . For example , in computer vision tasks such as image classification or object detection , an extraneous attribute could correspond to the background in an image or a co-occurring object irrelevant to the task , e.g . a person making a speech in a football field could be predicted as playing football [ 6 ] . The presence of such extraneous attributes warrant a model to derive the predictions by making spurious correlations to extraneous features in an image rather than an actual object of interest . An inevitable consequence of such correlations to extraneous attributes is disparities in performance across different groups within the dataset . Specifically , if certain groups form a minority , a model can simply cheat by having a high overall aggregate accuracy but poor minority group accuracy [ 24 ] . Existing works for this problem [ 2 , 30 ] operate in the regime where the number of groups , likely to be adversely impacted through spurious correlations , are known apriori . Further , they assume a complete knowledge of the group membership of individual samples in the training dataset . While these methods have been proven effective , it is not realistic to assume access to the group labels for every sample . Consider the scenario where the minority / majority groups could be defined by demographic information such as gender or race . An individual can simply choose not to reveal this information due to privacy considerations [ 16 ] . Alternatively , in medical image settings a label class could contain unrecognized subgroups that demand significant burden on the data labelling efforts [ 33 ] . An example of such unrecognized subgroups could be a lung cancer detection problem , where the class label could comprise of groups such as solid/subsolid tumors and central/peripheral neoplasms [ 24 ] , with many of these groups naturally forming a minority in the dataset . In this work , we consider a setting where a significant portion of the training data is devoid of group labels . We choose to fill a missing gap in the literature where several works bifurcate into methods that either are fully supervised or fully unsupervised in terms of the groups labels . Knowledge on the number of groups in the data makes it convenient to obtain group labels for a tiny portion of the data or take advantage of an existing labelled samples if available . Hence , we address the following research question : Can we train a model that is invariant to group membership using partially labelled data ? We answer the question using a framework of distributionally robust optimization ( DRO ) [ 23 , 32 ] . DRO allows for a training routine that optimizes for the worst-case training loss over predefined set of groups closely connected to the Rawlsian fairness measure [ 27 ] . When the group membership is fully known , the method simply upweights/downweights average training loss of different groups through the course of training [ 30 ] . The application of DRO to the partial group label setting poses significant challenges : ( 1 ) the lack of group label makes it infeasible to compute the worst-off group loss ; and ( 2 ) optimizing only for the high-loss samples , by considering them as a worst-off group , discards considerable portion of the training data adversely impacting the overall accuracy . In light of these challenges , we make the following contributions in this paper . We construct a constraint set that can with high probability encompass the group labels of the unlabeled portion of the data . We optimize for the a worst-off soft group assignment from the constraint set which upper bounds the DRO objective with true group membership . Approximately , high loss samples are assigned to groups with a higher weight and lower marginal probability improving the worstoff group accuracies . Further , the low loss samples are not discarded thus preserving the aggregate accuracy across groups . We show experiments on two images datasets and one tabular datasets and contrast the performance against several baselines . 2 RELATED WORK . Distributionally robust optimization [ 4 , 11 , 23 ] has been studied as a way to train robust ML models across multiple groups and environments . Group Robust Optimization . When group information is known at train time , Group DRO [ 15 , 22 , 25 , 30 , 40 ] or Invariant Risk Minimization ( IRM ) [ 2 ] could be employed to improve the performance over multiple groups . Specifically , Group DRO proceeds by minimizing the loss of the group with the largest loss , while IRM enforces a shared predictor across multiple environments to be optimal in the form of a Lagrangian multiplier . Robust Optimization without Demographics . As the group information may not be always available reliably , several studies have been focusing on developing methods that remove or reduce their dependence on the group information . [ 14 ] has developed a method based on the distributionally robust optimization that minimizes the loss of the samples with losses larger than a certain threshold . [ 18 ] has proposed to reweight the samples in an adversarial way so that the high loss sample could receive more attention over the course of training . Moreover , [ 20 ] has proposed a simple yet effective two-stage approach called Just-Train-Twice that trains a model by upweighting samples with high losses from the initial ERM model . While above methods are based on optimizing high loss samples based on sample reweighting , GEORGE [ 33 ] and EIIL [ 7 ] are two-stage optimization methods , where in the first stage the group or environment labels are inferred and in the second stage Group DRO or IRM optimization are employed with inferred group labels from the first stage . Our method shares a similar idea to GEORGE or EIIL in that we infer group labels for unlabeled data and apply a ( variant of ) Group DRO for optimization . However , we infer group labels in a way that the objective becomes the lower bound of that of Group DRO with true group labels with high probability . Such theoretical guarantee is important for safety-critical ML applications . 3 METHODOLOGY . We introduce our robust optimization framework , Worst-off DRO , with partial group information . We revisit the GroupDRO in Section 3.1 and detail our method in Section 3.2 and 3.3 . In Section 3.4 , we describe a practical method for optimization . 3.1 PRELIMINARY : GROUPDRO . Let x∈X ⊂Rd be data descriptors , y ∈Y ⊂ { 0 , 1 } be target labels , and g ∈G ⊂ { 1 , ... , M } be group labels.We assume training a neural network parameterized by the weights w that corresponds to a per-sample loss l ( x , y ; w ) . Given data triplets { ( xi , yi , gi ) } Ni=1 , we seek to optimize w for the Rawlsian criterion [ 14 , 27 , 39 ] , which minimizes the loss of the worst-off group , as follows : min w max g∈G E [ l ( x , y ; w ) |g ] . ( 1 ) [ 30 ] proposed a practical algorithm to optimize Equation 1 , called Group DRO . This method optimizes a weighted expected loss across all groups . These weights over the groups , denoted by q , are drawn from a simplex ∆M . The objective function is as described below , LGDRO = min w max q∈∆M M∑ j=1 qj [ ∑N i=1 1 { gi = j } l ( xi , yi , w ) ∑N i=1 1 { gi = j } ] ( 2 ) 3.2 WORST-OFF DRO . In this work , we are interested in training a distributionally robust neural network when group labels are only partially available in the entire dataset . That is , our training dataset constitutes of the fullylabeled dataset { ( xi , yi , g ? i ) } Ki=1 and the task-labeled dataset { ( xi , yi , − ) } Ni=K+1 , where− indicates the missing group labels . As noted in Equation 2 , the Group DRO requires group labels of entire dataset . When some of them are missing , we propose to optimize for the following objective : : LWDRO ( C ) = min w max q∈∆M max { ĝ } ∈C M∑ j=1 qj [ ∑N i=1 1 { ĝi = j } l ( xi , yi , w ) ∑N i=1 1 { ĝi = j } ] ( 3 ) where C is a set of group assignments { ĝi } Ni=1 satisfying ĝi = g ? i , ∀i ≤ K. We call the objective in Equation 3 a Worst-off DRO as it optimizes neural network parameters with respect to the worst-off group assignment in some constraint set C. Observe that the Worst-off DRO objective forms an upper bound to the Group DRO objective when evaluated at the ground-truth group labels . This is rather a straightforward consequence from the fact that the ground-truth group assignment { g ? i } Ni=1 falls within the constraint set C. However , for safety-critical applications , such as learning a fair classifier , it is important that the optimal objective ( i.e. , Group DRO with a ground-truth group assignment ) is bounded by the learning objective used in optimization . This is simply because optimizing the proposed learning objective guarantees that the corresponding lower bound ground-truth Group DRO is also optimized ( assuming same parameters for both the methods ) . Conversely , objectives of methods such as EIIL [ 7 ] or GEORGE [ 33 ] , which optimize the Group DRO or IRM objectives using pseudo group labels , would be difficult to compare with LGDRO as it depends on a heuristic to obtain a single set of pseudo group labels . 3.3 REDUCING CONSTRAINT SET WITH MARGINAL DISTRIBUTION CONSTRAINT . It is clear that the constraint set C plays an important role that connects Worst-off DRO to Group DRO . Specifically , the Worst-off DRO objective can be made a tighter bound to that of Group DRO by further constraining C so long as it contains the ground-truth group assignment { g ? i } Ni=1 . In the subsequent paragraph , we describe how we reduce the constraint set while retaining the ground-truth group assignment using a marginal distribution constraint . These constraints may be given as a side information or could be estimated from the small set of partial group labels under certain conditions . Let Cp , ⊂C is a subset of C whose elements { gi } Ni=1 satisfy the following condition : gi = g ? i , ∀i ≤ K , ( 4 ) | 1 N ∑N i=1 1 { gi = j } − pj | ≤ , ∀j ≤M , ( 5 ) where Equation 4 implies that the true group labels are assigned whenever available , and Equation 5 implies that the data marginal distribution should be close to the marginal distribution p. Then , for any marginal distribution p and > 0 , it is easy to show LWDRO ( Cp , ) ≤LWDRO ( C ) as Cp , ⊂C . Moreover , we will see in Lemma 1 that , with high probability , the constraint set Cp ? , with the true marginal distribution p ? contains the true group assignment { g ? } . Lemma 1 . The constraint set Cp ? , contains the true group labels { g ? i } Ni=1 with high probability : P ( { g ? i } Ni=1 ∈Cp ? , ) ≥ 1− 2e−2N 2 ( 6 ) The proof is in Appendix A.1 . As in Equation 6 , the probability of the constraint set containing the true group labels gets closer to 1 by allowing a larger variance ( ) from the true marginal distribution . For fixed > 0 , the probability gets closer to 1 as we increase the number of unlabeled data ( N ) . Finally , this implies that LWDRO ( Cp ? , ) is an upper bound to that of Group DRO : LGDRO ≤ w.h.p LWDRO ( Cp ? , ) ≤ LWDRO ( C ) In practice , however , the true marginal distribution p ? may not be available . For our setting where group labels are partially available , with an assumption that group labels are missing completely at random ( MCAR ) [ 29 ] , the true marginal distribution could be estimated from the subset of data with group labels . This again allows us to formulate a constraint set that contains the ground-truth group assignment with high probability . To be more specific , let p̄ be the estimate of the marginal distribution from { ( xi , yi , g ? i ) } Ki=1 . Lemma 2 . The constraint set Cp̄ , δ+ contains the true group labels { g ? i } Ni=1 with high probability : P ( { g ? i } Ni=1 ∈Cp̄ , δ+ ) ≥ 1− 2e−2N 2 − 2e−2Kδ 2 ( 7 ) We provide a proof in Appendix A.1 . Here , δ is introduced to take into account the estimation error of the true marginal distribution p ? . When K , the number of labeled data , is large , the bound in Equation 7 is close to 1 . Assuming MCAR , for large K : LGDRO ≤ w.h.p LWDRO ( Cp̄ , δ+ ) | The paper proposes a new variant of DRO, called Worst-Off DRO, to address a ubiquitous real-world setting where group labels are only partially available over the training set. The core idea is to introduce a nested optimization to maximize the worst-off group assignment over the entire training set, given some sensible constraints, hence enabling to alternate the standard DRO optimization. Empirical results are reported to support the proposed methods. | SP:2455a45bf2ad92e7ccbc2e5eaf0482bcfafab7c2 |
Deep banach space kernels | 1 INTRODUCTION . In recent years , promising new variants of kernel learning methods , namely deep ker-nel learning and multi-layer-MKL ( MLMKL ) algorithms have been developed . These concatenated kernel learning approach includes , see e.g . Cho & Saul ( 2009 ) ; Damianou & Lawrence ( 2013 ) ; Zhuang et al . ( 2011 ) . Although they have proven to be very successful in regression and classification tasks . we are still only utilizing kernel from Hilbert Space . There has be a recent interest in studying a space which is similar to RKHS but contains alot more functions i.e , reproducing kernel Banach space ( RKBS ) . In this paper , we will define a general framework of concatenated RKBSs as well as provide a concatenated representer theorem which can be used to develop a generalized variant of all the concatenated kernel learning ( Bohn et al . ( 2019 ) ) methods described earlier . We will now give a brief overview of our paper . In Section 2 , we briefly review the interpolation problem in RKBS and discuss how we can recast this to RKHS . In Section 3 , we introduce the optimal concatenated approximation problem for arbitrary loss function and regularizers . We first present a general framework to construct a deep/concatenated RKBS and then propose a representer theorem for this problem in multi-layer case . we then examine the concrete example of a two-layer RKBS kernel . Furthermore , we discuss the relation of our method to classical concatenated kernel learning in RKHSs which describe the connect with multiple array of methods such as DeepGP , DKL , MLMKL etc . In section 4 we look at a simple experiment and compare our Deep RKBS kernels with Deep RKHS ones . we also briefly talk about our library we have built to easily perform experimentation with Deep RKBS Kernels . Finally , we conclude with some related works and a summary of our paper . 2 REPRODUCING KERNEL BANACH SPACES . In this section , we briefly define RKBS and its reproducing kernel then we will present the representer theorem for minimal norm interpolation problem . for more comprehensive overview we refer the readers to Lin et al . ( 2019b ) . A reproducing kernel Banach space B on a prescribed nonempty set X is a Banach space of certain functions on X such that every point evaluation functional δx , x ∈ X on B is continuous , that is , there exists a positive constant Cx such that |δx ( f ) | = |f ( x ) | ≤ Cx‖f‖B for all f ∈ B. this definition is the natural generalization of the classical definition of RKHS . Now before moving forward , we will present another definition as well as general framework of construction for RKBS which we will be using throughout this paper . ( Construction of RKBS using feature maps ) Let W ( 1 ) , W ( 2 ) be two Banach spaces , and 〈· , ·〉W ( 1 ) ×W ( 2 ) be a continuous bilinear form onW ( 1 ) ×W ( 2 ) . Suppose there exist two nonempty sets Ω ( 1 ) and Ω ( 2 ) , and mappings Φ ( 1 ) : Ω ( 1 ) → W ( 1 ) , Φ ( 2 ) : Ω ( 2 ) → W ( 2 ) such that with respect to the bilinear form span Φ ( 1 ) ( Ω ( 1 ) ) is dense inW ( 1 ) , span Φ ( 2 ) ( Ω ( 2 ) ) is dense inW ( 2 ) .We construct B ( 1 ) : = { fv ( x ) : = 〈Φ ( 1 ) ( x ) , v〉W ( 1 ) ×W ( 2 ) : v ∈ W ( 2 ) , x ∈ Ω ( 1 ) } ( 2.1 ) and B ( 2 ) : = { gu ( y ) : = 〈u , Φ ( 2 ) ( y ) 〉W ( 1 ) ×W ( 2 ) : u ∈ W ( 1 ) , y ∈ Ω ( 2 ) } ( 2.2 ) with norm ‖fv‖B ( 1 ) : = ‖v‖W ( 2 ) and ‖gu‖B ( 2 ) : = ‖u‖W ( 1 ) respectively . Theorem 2.1 Let B ( 1 ) and B ( 2 ) be constructed as above . Then with the bilinear form on B ( 1 ) ×B ( 2 ) 〈fv , gu〉B ( 1 ) ×B ( 2 ) : = 〈u , v〉W ( 1 ) ×W ( 2 ) for all fv ∈ B ( 1 ) and all gu ∈ B ( 2 ) , ( 2.3 ) B ( 1 ) is an RKBS on Ω ( 1 ) with the adjoint RKBS B ( 2 ) on Ω ( 2 ) . Moreover , K ( x , y ) : = 〈Φ ( 1 ) ( x ) , Φ ( 2 ) ( y ) 〉W ( 1 ) ×W ( 2 ) , x ∈ Ω ( 1 ) , y ∈ Ω ( 2 ) , ( 2.4 ) is a reproducing kernel for B ( 1 ) . Using the reproducing property we can rewrite f ∈ B ( 1 ) as : f ( x ) = 〈f , K ( x , · ) 〉B1×B2 for all x ∈ Ω ( 1 ) and all f ∈ B1 , ( 2.5 ) where , K ( x , · ) ∈ B ( 2 ) . 2.1 INTERPOLATION PROBLEM IN RKBS . The minimal norm interpolation problem looks for the minimizer finf : = arg inf f∈Sx , t ‖f‖B ( 1 ) where Sx , t = { f ∈ B ( 1 ) : f ( xj ) = tj , j ∈ Nm } ( 2.6 ) vinf : = arg inf v∈Vx , t ‖v‖W ( 2 ) ( 2.7 ) with Vx , t : = { v ∈ W ( 2 ) : 〈Φ ( 1 ) ( xj ) , v〉W ( 1 ) ×W ( 2 ) = tj , j ∈ Nm } . ( 2.8 ) Theorem 2.2 ( Representer Theorem ) Assume the same assumptions as in Theorem 2.1 . In addition , suppose that W ( 2 ) is reflexive , strictly convex and Gâteaux differentiable , and the set { Φ ( 1 ) ( xj ) : j ∈ Nm } is linearly independent inW ( 1 ) . Then the minimal norm interpolation problem ( 2.7 ) has a unique solution vinf ∈ W ( 2 ) and it satisfies G ( vinf ) ∈ ( ( Φ ( 1 ) ( x ) ) ` ) ⊥ . ( 2.9 ) If Ω ( 1 ) = Ω ( 2 ) , W ( 2 ) ∗ = W ( 1 ) and W ( 2 ) is reduced to a Hilbert Space then we can recover the classical representer theorem ( Schölkopf et al . ( 2002 ) ) for minimal norm interpolation in RKHS . 3 A REPRESENTER THEOREM FOR CONCATENATED KERNEL LEARNING IN BANACH SPACE . In this section , we will be deriving a concatenated RKBS representer theorem for an arbitrary numberL ∈ N of concatenations of vector-valued RKBS spaces . For more comprehensive treatment of vector-valued RKBS we refer the readers to Chen et al . ( 2019 ) , Zhang & Zhang ( 2013 ) and Lin et al . ( 2019a ) respectively . LetB1 , ... , BL be reproducing kernel Banach Spaces with finite dimensional domain Ω ( 1 ) l and ranges Rl ⊆ Rdl with dl ∈ N for l = 1 , ... , L such that Rl ⊆ Ω ( 1 ) l−1 for l = 2 , ... , L , Ω ( 1 ) L = Ω and R1 ⊆ C. We consider learning a function from a prescribed set of finite sampling data z : = { ( xi , ti ) : i ∈ N } ⊆ Ω× C Let furthermore L : R2 → [ 0 , ∞ ] be an arbitrary continuous and convex loss function and let Θ1 , ... , ΘL : [ 0 , ∞ ) be continuous , convex and strictly monotonically increasing functions . For each arbitrary function fl ∈ Bl : ∀l = 1 , ... L , we set J ( f1 , ... , fL ) : = N∑ i=1 L ( ti , f1 ◦ ... ◦ fL ( xi ) ) + L∑ l=1 Θl ( ‖fl‖Bl ) ( 3.10 ) and our objective is : inff1◦ ... ◦fL∈B1× ... ×BL J ( f1 ◦ ... ◦ fL ) ( 3.11 ) Since , ∀l = 1 , ... , L fl ( x ( l ) ) : = fvl ( x ( l ) ) = 〈Ω ( 1 ) l ( x ( l ) ) , vl〉W ( 1 ) l ×W ( 2 ) l , x ( l ) ∈ Ω ( 1 ) l , vl ∈ ¯span { Φ ( 2 ) l ( y ( l ) ) : y ( l ) ∈ Ω ( 2 ) l } Thus 3.11 reduces to v1 , ... vLinf : = arg infv1 , ... , vL∈W ( 2 ) 1 , ... , W ( 2 ) L L ( ti , 〈Φ ( 1 ) 1 , v1〉W ( 1 ) 1 ×W ( 2 ) 1 ◦ ... ◦ 〈Φ ( 1 ) L ( xi ) , vL〉W ( 1 ) L ×W ( 2 ) L ) + L∑ l=1 Θl ( ‖vl‖W ( 2 ) l ) ( 3.12 ) Even if L is a convex loss function ( 3.11 ) is still a highly non-linear optimization problem . we therefore assume that , there are w ∈ N optimal composite functions which minimizes J . We Let F ∗l = f l∗ 1 , ... , f l∗ w be a set of all the optimal functions in Bl for all l = 1 , ... , L . Theorem 3.1 In addition to above assumption , suppose that W ( 2 ) l is reflexive , strictly convex and Gâteaux differentiable for all l = 1 , ... L , and the set Φ ( 1 ) l ( xj ) : xj ∈ Dl , ∀j ∈ N is linearly independent in W ( 1 ) l . Provided that F ∗ l is non-empty for all l = 1 , ... , L then , there exist a set of w minimizers where each vlinf ∈W ( 2 ) l : ∀l = 1 , ... L satisfies G ( vlinf ) ∈ ( Vlx,0 ) ⊥ where , Vlx,0 : = { vl ∈W ( 2 ) l : 〈Φ ( 1 ) l ( x ( l ) j ) , vl〉W ( 1 ) l ×W ( 2 ) l = 0 : x ( l ) j ∈ Ω ( 1 ) l , j ∈ N } Proof : Suppose there exist a minimizer f∗l ∈ F ∗l ∈ Bl then we create a data set Dl : Dl : = ( xj , f ∗ l ( xj ) ) : j ∈ Nm By theorem 2.2 there exists a unique solution vinf ∈ W2 for the min norm interpolation problem with the samples Dl and it satisfy that G ( vlinf ) ∈ ( Vlx,0 ) ⊥ It follows that flv inf = 〈Φ ( 1 ) l ( · ) , vlinf〉W ( 1 ) l ×W ( 2 ) l interpolates the sample data Dl and for all vl ∈W ( 2 ) l : ||vlinf ||W ( 2 ) l ≤ ||vl||W ( 2 ) l Thus , fv inf ( x ) = fv∗ ( x ) . We can extend this result for all l = 1 , ... , L such that : G ( v̂linf ) ∈ ( Vlx,0 ) ⊥ as long as F ∗l ∈ Bl is non-empty . The proof is complete . | The paper presents a means of constructing deep (concatenated) reproducing kernel Banach space kernels. The main contribution appears to be a representor theory for concatenated Banach space kernels. Some experimental results are provided to accompany this result. | SP:e61b82a7bc8c843fe38c6524f60214f39dc1b014 |
Coherence-based Label Propagation over Time Series for Accelerated Active Learning | 1 INTRODUCTION . A time series is a sequence of data points at successive timestamps . Supervised learning ( e.g. , classification ) with a time series requires the label of every data point , but unfortunately labels are often missing and hard to obtain due to lack of domain-specific knowledge ( Shen et al. , 2018 ; Malhotra et al. , 2019 ; Li et al. , 2020 ) . It is worse for a time series collected for an extended length of time , as manually labeling so many data points is labor-intensive and time-consuming ( Perslev et al. , 2019 ; Tonekaboni et al. , 2021 ) . Active learning ( Settles , 2009 ) , a method that iteratively selects the most informative data point and queries a user for its label , can mitigate the high labeling cost . However , most active learning methods are not geared for time-series data , as they assume that data points are independent of one other ( Sener & Savarese , 2018 ; Yoo & Kweon , 2019 ; Ash et al. , 2020 ) , which is obviously not true in time-series data . Time-series data typically has the characteristic of temporal coherence ; that is , temporally consecutive data points tend to have the same label ( Wang et al. , 2020 ; Barrow et al. , 2020 ; Ishikawa et al. , 2021 ) . Let us refer to a sub-sequence of temporally coherent data points as a segment . For example , in motion-sensing time-series data , a segment consists of data points with the same motion status ( e.g. , walking , running ) . This temporal coherence of a segment can be exploited in time-series active learning . Specifically , when the label of a certain data point is obtained from a user , the same label can be propagated to other data points in the same segment . One challenge here is that the segment length is not known but needs to be estimated . If it is too short , unnecessarily frequent queries are issued ; if too long , data points on the fringe of the segment are labeled incorrectly , consequently damaging the learning performance ( e.g. , classification accuracy ) . Thus , accurate estimation of the segments is important to enable the label propagation to achieve the maximum learning performance with the minimum number of queries . This paper addresses the label propagation segment estimation problem in time-series active learning through a novel framework called Temporal Coherence-based Label Propagation ( TCLP ) . Figure 1 illustrates the overall workflow in the time-series active learning centered on TCLP . TCLP receives the class probabilities ( i.e. , softmax output ) for the label of each data point from a classifier model and estimates the extent of the segment to propagate the label . This estimation is challenging in a real time series , as the classifier model output is uncertain and the time-series segments are unknown . TCLP meets this challenge by taking advantage of the temporal coherence via a quadratic plateau model ( Moltisanti et al. , 2019 ) , by fitting it to the classifier model output to smooth out the fluctuations of class probabilities across consecutive data points . To the best of our knowledge , TCLP is the first that performs label propagation for time-series active learning . The previous work closest to ours is pseudo-labeling in single-timestamp supervised learning , where labels are known for at least one data point in each segment ( Moltisanti et al. , 2019 ; Ma et al. , 2020 ; Li et al. , 2021 ) . The approximate location and true class of a segment must be known in their work , which is often impractical in the real world . Moreover , the known labels are relatively dense in single-timestamp supervised learning , but they are very sparse in active learning—typically , no more than 5 % of segments in our experiments . Thus , finding the boundaries between segments is more challenging in active learning than in single-timestamp supervised learning . To cope with the sparsity of labeled data points , TCLP performs sparsity-aware label propagation by exploiting temperature scaling ( Guo et al. , 2017 ) and plateau regularization . Contributions of this paper are summarized as follows : • It proposes a novel time-series active learning framework equipped with a sparsity-aware label propagation within an accurately estimated segment . • It verifies the merit of TCLP through extensive experiments . The classification accuracy is improved by up to 7.1 times with TCLP compared to without label propagation . Moreover , TCLP works with any query selection strategy including core-set sampling ( Sener & Savarese , 2018 ) and BADGE ( Ash et al. , 2020 ) , boosting the effect of individual labeling . 2 RELATED WORK . 2.1 ACTIVE LEARNING . Active learning is a special case of machine learning that ‘ actively ’ queries a user for the labels of data points , to the effect of using fewer labels to achieve the same learning performance . Recent studies have focused on developing such query strategies for machine learning based on deep neural networks ( Settles , 2009 ; Ren et al. , 2020 ) . These approaches exploit prediction probabilities ( Beluch et al. , 2018 ) , embeddings ( Sener & Savarese , 2018 ) , gradients ( Ash et al. , 2020 ) , and losses ( Yoo & Kweon , 2019 ) from deep neural networks to estimate the impact of each unlabeled data point if it were to be labeled . However , these methods are not suitable for time-series data , because they assume that data points are independent . Several methods have been developed for time-series or sequence data , but most of them are applicable to only segmented time-series data under the assumption that a time series is already divided into labeled and unlabeled segments . Treating these segments as independent and identically distributed , these methods simply apply existing active learning frameworks to the segments . For example , He et al . ( 2015 ) select unlabeled segments that are far from labeled segments to maximize diversity ; Peng et al . ( 2017 ) select unlabeled segments with distinctive patterns to maximize diversity ; and Zhang et al . ( 2017 ) select unlabeled segments with high gradients to consider uncertainty for sentence classification . In addition , new neural network architectures or measures have been developed for sequence-data applications such as named entity recognition ( Shen et al. , 2018 ) , video action recognition ( Wang et al. , 2018 ) , and speech recognition ( Malhotra et al. , 2019 ) . None of these methods is applicable to our problem , which handles unsegmented time-series data . 2.2 PSEUDO-LABELING . Pseudo-labeling has been actively studied for label-deficient learning environments , such as semisupervised learning , to exploit unlabeled data points in training a classifier ( Lee et al. , 2013 ; Liu et al. , 2019 ) . In general , a pseudo-label is given to an unlabeled data point based on the predictions from a classifier trained with labeled data points . Confidence-based methods create a pseudo-label if it is confidently predicted by a classifier ( Lee et al. , 2013 ) . Consistency-based methods create a pseudo-label if it is consistently predicted for the original and augmented data points ( Sajjadi et al. , 2016 ; Rizve et al. , 2021 ) . Graph-based methods propagate pseudo-labels from labeled data points ( nodes ) to unlabeled data points based on a similarity graph constructed from the features of all data points ( Shi et al. , 2018 ; Liu et al. , 2019 ; Wagner et al. , 2018 ) . However , these methods are not designed for time-series data , and therefore are not directly applicable to our problem . Coherence-based methods are developed for single-timestamp supervised learning for unsegmented time-series data ; they assume that at least one data point in each segment is given a true class label through weak-supervision . Ma et al . ( 2020 ) propose probability thresholding propagation ( PTP ) , which propagates known labels bidirectionally unless the predicted class probability for each data point is decreased by more than a threshold . Deldari et al . ( 2021 ) propose embedding similarity propagation ( ESP ) , which propagates known labels bidirectionally unless the embedding of each data point changes rapidly . Recently , Moltisanti et al . ( 2019 ) adopt a plateau model that represents class probabilities across consecutive data points , where a plateau model is constructed for each labeled data point and fitted to the classifier output ; a known label is propagated as long as the value of a plateau model is higher than a threshold . While this work shares the idea of using a plateau model with our work , using the plateau model as it is for active learning results in performance degradation owing to the difference in the density of known labels , as will be shown in Section 4 . 3 TCLP : TEMPORAL COHERENCE-BASED LABEL PROPAGATION . 3.1 PRELIMINARIES AND PROBLEM SETTING . Active learning : LetD = { ( xt , yt ) , t ∈ T } be a time series where T is the index set of timestamps ; xt is a multi-dimensional data point at timestamp t , and yt is one of the class labels if xt is labeled or null otherwise . Let DL ⊆ D be a labeled set , i.e. , a set of labeled data points , and DU ⊆ D be an unlabeled set , i.e. , a set of unlabeled data points , where DU ∪ DL = D. At each round of active learning , b data points are selected from DU by a query selection strategy , such as entropy sampling ( Wang & Shang , 2014 ) , core-set selection ( Sener & Savarese , 2018 ) , and BADGE ( Ash et al. , 2020 ) , and their ground-truth labels are obtained from a user ; these newly-labeled b data points are then removed from DU and added to DL . After DL is updated , a classifier model fθ is re-trained using the updated labeled set . Label propagation : Given a data point at timestamp tq and its label , ( xtq , ytq ) , obtained from a user in response to a query , TCLP assigns the label ytq to nearby data points in the timestamp range [ ts : te ] ( ts ≤ tq ≤ te ) estimated according to its temporal coherence property criteria . We call the sub-sequence of data points in [ ts : te ] an estimated segment at tq . There are two properties : ( i ) accuracy , which indicates that as many data points in the segment as possible should have the same ground-truth label ytq ; and ( ii ) coverage , which indicates that the length of the segment ( te − ts ) should be as long as possible . More formally , we estimate the segment for tq by ts , te = arg min t′s , t ′ e 1 t′e − t′s t′e∑ t=t′s ( 1− fθ ( xt ) [ ytq ] ) , ( 1 ) where t′s ≤ tq ≤ t′e holds , fθ ( xt ) is the softmax output vector of the classifier model at timestamp t , and fθ ( xt ) [ ytq ] is the estimated probability of the label ytq . In Equation ( 1 ) , the accuracy is achieved by minimizing the sum of errors in the numerator , and the coverage is achieved by maximizing the candidate segment length in the denominator . Note that estimated probabilities are used to calculate the errors , since the true probabilities are not known . Once segment estimation is done , all data points in the estimated segment ( i.e. , in [ ts : te ] ) are removed fromDU and added toDL with the label ytq , thus doing coherence-based label propagation . At each round of active learning , the segment estimation repeats for each of the b queried data points ; as a result , the size of DL is increased by b times the average length of estimated segments . Besides , we allow the data points in [ ts : te ] , except tq , to be queried again in subsequent rounds so that the propagated labels can be refined subsequently . | The goal of the paper is to improve active learning for time-series. The goal is to learn a function from x to y, with data coming from a time series (x_t) and (y_t). It is assumed that (y_t) is piecewise constant. At the beginning no (y_t) are known, but query can be made in a active learning framework. This paper tries to find the pieces where (y_t) is constant based on the features (x_t). It is done using the labeled timestamps (y_t_q) at (t_q) and the current learnt model f from X to Y with a thresholding rule based on f(x_t) around the (t_q). This gives segments on which (y_t) is supposed constant egal to the (y_t_q). Those labels are added as if they were true labels. Then the model for f is updated, and some active query are made based on any model. The loop is repeated for a given number of rounds. | SP:3a65cc77a884203b73add6419e8a5ee63a906b7f |
A Variance Principle Explains why Dropout Finds Flatter Minima | 1 INTRODUCTION . Dropout is used with gradient-descent-based algorithms for training DNNs ( Hinton et al. , 2012 ; Srivastava et al. , 2014 ) . During training , the output of each neuron is multiplied with a random variable with probability p as one and 1−p as zero . Note that p is called dropout rate , and every time for computing concerned quantity , the variable is randomly sampled at each feedforward operation . Dropout has been an indispensable trick in the training of deep neural networks ( DNNs ) , however , with very little understanding . Similar to SGD , training with dropout is equivalent to that with some specific noise . To understand what kind of noise benefits the generalization of training , we proposes a variance principle of a noise , that is , Variance Principle : the variance of a noise is larger at the sharper direction of the loss landscape . If a noise satisfies the variance principle , it can help the training select flatter minima and leads the training to better generalization . As shown in Zhu et al . ( 2018 ) ; Feng & Tu ( 2021 ) , the noise in SGD satisfies the variance principle and SGD can find flatter minima and obtain better generalization ( Keskar et al. , 2016 ; Neyshabur et al. , 2017 ) . In this work , we study the characteristic of minima learned with dropout . We show that compared with the standard gradient descent ( GD ) , the GD with dropout selects flatter minima . As suggested by many existing works ( Keskar et al. , 2016 ; Neyshabur et al. , 2017 ; Zhu et al. , 2018 ) , flatter minima are more likely to have better generalization and stability . We then put efforts to show that the noise induced by the dropout satisfies the variance principle , which explains why dropout finds flatter minima . To examine the variance principle , we explore the relation between the flatness of the loss landscape and the noise structure induced by dropout at minima through three methods and obtain a consistent result that the noise is larger at the sharper direction of the loss landscape to help the training select flatter minima . Our experiments are conducted over synthetic data and fully-connected neural networks as well as modern datasets and models such as , MNIST , CIFAR10 and CIFAR-100 and ResNet-20 , thus our conclusion is a rather general result . First , we examine the inverse variance-flatness relation , similar to Feng & Tu ( 2021 ) . We define the flatness of a minimum at one direction by the length of the largest interval in the considered direction , which covers the minimum and no point in the interval has loss larger than twice of the loss of the minimum , denoted by Fp for the direction p. We then consider two definitions of the noise structure , i.e. , random trajectory covariance Σt and random gradient covariance Σg . For the random trajectory covariance , we train the network to an “ exploration phase ” ( Shwartz-Ziv & Tishby , 2017 ) , where the loss decreases with a very slow speed and then sample parameter sets { θi } Ni=1 from N consecutive training steps to compute the covariance , where θi is the network parameter set at step i . For the gradient covariance , we train the network until the loss is very small and then freeze the training . We sample N gradients { gi } Ni=1 with different dropout variables to compute the covariance . In each sample , the dropout rate is fixed . For both random trajectory covariance and random gradient covariance , we perform principal component analysis ( PCA ) and obtain similar results . We find that at the direction of larger variance ( larger eigen-value ) , the loss landscape of the minimum is sharper , i.e. , inverse variance-flatness relation . Second , we study the relation between the Hessian and the noise structure induced by dropout . The eigenvalues of the Hessian of the loss at a minimum are also often used to indicate the flatness . The landscape at an eigen-direction is claimed sharper if the corresponding eigen-value is larger . For each eigen-direction vj , we project the parameter trajectory { θi } Ni=1 or gradients { gi } Ni=1 to the direction of vj and compute the variance . We find that the noise variance is larger at the direction with a larger eigen-value . Third , we show that the Hessian matrix aligns well with the random gradient covariance of gradients { gi } Ni=1 , i.e. , their eigen directions of large eigen-values are close , similar to Zhu et al . ( 2018 ) . These empirical works show that the noise structure induced by the dropout tends to have larger variance in order to escape the sharper direction , i.e. , variance principle , thus , leading to flatter minima . These characteristics of dropout are very similar to SGD ( Keskar et al. , 2016 ; Zhu et al. , 2018 ; Feng & Tu , 2021 ) . The similarity between dropout and SGD suggests that modelling their similarity may be a key to understanding how and what stochasticity benefits the training . 2 RELATED WORKS . Dropout was proposed as a simple way to prevent neural networks from overfitting , and thus improving the generalization of the network , to a certain extent ( Hinton et al. , 2012 ; Srivastava et al. , 2014 ) . Many works aim to find an explicit regularization form of dropout . Wager et al . ( 2013 ) studies the explicit form of dropout on linear regression and logistic problem , but for studying non-linear neural network , it is still unclear how to characterize the effect of dropout by an explicit regularization term . McAllester ( 2013 ) presents PAC-Bayesian bounds , and Wan et al . ( 2013 ) , Mou et al . ( 2018 ) derives Rademacher generalization bounds . These results show that the reduction of complexity brought by dropout is O ( p ) , where p is the probability of keeping an element in dropout . Mianjy & Arora ( 2020 ) show that dropout training with logistic loss achieves -suboptimality in test error in O ( 1/ ) iterations . All of the above works need specific settings , such as norm assumptions and logistic loss , and they only give a rough estimate of the generalization error bound , which usually consider the worst case . However , it is not clear what is the characteristic of the dropout training process and how to bridge the training with the generalization . In this work , we show that dropout noise has a special structure , which closely relates with the loss landscape . The structure of the effective noise induced by the dropout may be a key reason why dropout can find solutions with better generalization . Many researches have empirically shown that SGD can improve the generalization performance of neural networks through finding a flatter solution ( Li et al. , 2017 ; Jastrzebski et al. , 2017 ; 2018 ) . This work utilizes the current understanding of SGD to study dropout and shows that much similarity is shared between SGD and dropout . The flatness of the solution is an important aspect of understanding the generalization of neural networks ( Keskar et al. , 2016 ; Neyshabur et al. , 2017 ; Zhu et al. , 2018 ) . A number of works suggested that the learning rate and batch size determine the flatness of the solutions ( Jastrzebski et al. , 2017 ; 2018 ; Wu et al. , 2018 ) . Li et al . ( 2017 ) propose a visualization method of the loss landscape at 1-d cross-section to visualize the flatness . Feng & Tu ( 2021 ) investigate the connection between SGD learning dynamics and the loss landscape through the principal component analysis ( PCA ) , and show that SGD dynamics follow a lowdimensional drift-diffusion motion in the weight space . Through characterizing the loss landscape by its flatness in each PCA direction around the solution found by SGD , they also reveal a robust inverse relation between the weight variance and the landscape flatness in PCA directions , thus finding that SGD serves as a landscape dependent annealing algorithm to search for flat minima . Zhu et al . ( 2018 ) study a general form of gradient based optimization dynamics with unbiased noise to analyze the behavior of SGD on escaping from minima and its regularization effects . They also introduce an indicator to characterize the efficiency of escaping from minima through measuring the alignment of noise covariance and the curvature of loss function and thus revealing the anisotropic noise of SGD . 3 PRELIMINARY . 3.1 DROPOUT . Consider an L-layer neural network fθ ( x ) . With dropout ( Srivastava et al. , 2014 ) , the feedforward operation in a network fθ ( x ) is f [ 0 ] θ ( x ) = x , ( 1 ) rj ∼ Bernoulli ( p ) , ( 2 ) f [ l ] θ ( x ) = r [ l ] ◦ σ ◦ ( W [ l−1 ] f [ l−1 ] θ ( x ) + b [ l−1 ] ) 1 ≤ l ≤ L− 1 , ( 3 ) fθ ( x ) = f [ L ] θ ( x ) = W [ L−1 ] f [ L−1 ] θ ( x ) + b [ L−1 ] , ( 4 ) where p is the dropout rate , W [ l ] ∈ Rml+1×ml , b [ l ] = Rml+1 , m0 = din = d , mL = do , σ is a scalar function and “ ◦ ” means entry-wise operation . We denote the set of parameters by θ = ( W [ 0 ] , W [ 1 ] , . . . , W [ L−1 ] , b [ 0 ] , b [ 1 ] , . . . , b [ L−1 ] ) , 3.2 INTERVAL FLATNESS . We use the definition of flatness in Feng & Tu ( 2021 ) . For convenience , we call it interval flatness Around a specific solution θ∗0 , we compute the loss function profile Lv along the direction v : Lv ( δθ ) ≡ L ( θ∗0 + δθv ) . The interval flatness Fv is defined as the width of the region within which Lv ( δθ ) ≤ 2Lv ( 0 ) . We determine Fv by finding two closest points θlv < 0 and θ r v > 0 on each side of the minimum that satisfy Lv ( θlv ) = Lv ( θ r v ) = 2Lv ( 0 ) . The scale factor 2 is used in Feng & Tu ( 2021 ) , and after our test , the result is not sensitive to the selection of this factor . In this work , we follow their experimental scheme to show the similarity between dropout and SGD . The interval flatness is defined as : Fv ≡ θrv − θlv . ( 5 ) A larger value of Fv means a flatter landscape in the direction v . 3.3 RANDOMNESS INDUCED BY DROPOUT . 3.3.1 RANDOM TRAJECTORY DATA . The training process of neural networks are usually divided into two phases , fast convergence and exploration phase ( Shwartz-Ziv & Tishby , 2017 ) . Feng & Tu ( 2021 ) ’ s work focuses on the behavior of networks in the exploration phase . In this work , we follow the experimental scheme in Feng & Tu ( 2021 ) to show the similarity between dropout and SGD . This can be understood by frequency principle ( Xu et al. , 2019 ; 2020 ) , which states that DNNs fast learn low-frequency components but slowly learn high-frequency ones . We collect parameter sets Spara = { θi } Ni=1 from N consecutive training steps in the exploration phase , where θi is the network parameter set at step i . | This paper provides an empirical study on how the dropout can lead to minima within a flatter landscape (hence a better generalization performance). Based on the definition of minimizer flatness (i.e., eq. 5) and random trajectory data (parameters from a optimization path and gradients when loss is stably small), the authors first show that dropout can help to find flatter minima, and also find a inverse relation between the flatness (the length $F_v$) and the algorithmic variance (i.e., in area with sharper direction, algorithm with dropout has a larger variance), and further find that for areas with larger eigenvalues (i.e., with sharper landscape), the variances of the algorithm along the directions of their eigenvectors are also large. Such empirical results together demonstrate that the dropout can play a good role in improving the generalization of existing algorithms by introducing certain level of noise. | SP:07fcfaa31ed0de5c83b75145f6648a7b0dffe90a |
NASPY: Automated Extraction of Automated Machine Learning Models | 1 INTRODUCTION . Recently Automated Machine Learning ( AutoML ) has attracted lots of attention from the machine learning community , as it can significantly simplify the development of machine learning pipelines with high efficiency and automation . One of the most popular AutoML techniques is Neural Architecture Search ( NAS ) ( Zoph & Le , 2016 ; Elsken et al. , 2019 ) , which can automatically generate high-quality Deep Neural Networks ( DNNs ) for a specified task . It enables non-experts to produce machine learning architectures and models which can outperform hand-designed solutions . From the adversarial perspective , this paper aims to design new attacks to steal the architectures of black-box NAS models . This is known as model extraction attacks , which could cause severe consequences : ( 1 ) searching a good architecture with NAS is an energy- and time-consuming process . Hence the produced architecture is naturally considered as an important intellectual property , and stealing it can lead to copyright violation and financial loss ( Hong et al. , 2020 ) . ( 2 ) Extracting the model architecture can facilitate other black-box attacks , e.g. , data poisoning ( Demontis et al. , 2019 ) , adversarial examples ( Ilyas et al. , 2018 ) , membership inference ( Shokri et al. , 2017 ) . One solution of model extraction is to remotely query the target model and recover the architecture based on the responses ( Oh et al. , 2019 ) . However , such attack requires large computation cost and can only be applied to simple neural networks1 . Then we turn to a more promising solution : hardware attacks ( e.g. , cache side-channel , bus snooping ) . Essentially , when a DNN model executes the inference task on a computer , it leaves architecture-dependent footprints on the low-level hardware components , which could be captured by an adversary to analyze and recover the high-level architecture details . These techniques can give very fine-grained information , and have been utilized by prior works ( Yan et al. , 2020 ; Hua et al. , 2018 ; Naghibijouybari et al. , 2018 ; Hu et al. , 2020 ) to extract the architectures of conventional DNN models . However , there are several challenges when we apply such attack techniques to extract NAS architectures . ( 1 ) These works can only handle simple operations in conventional models , while failing to analyze new operations introduced by NAS ( e.g. , separable convolution , dilated convolution ) . ( 2 ) Some works need complicated manual analysis with prior knowledge of the victim model . For instance , ( Yan et al. , 2020 ) requires the information of the victim model family , and can only extract variants of generic architectures . ( Naghibijouybari et al. , 2018 ) needs to know the layer type ahead . 1It takes 40 GPU-days to recover a 7-layer architecture with a simple chained topology ( Oh et al. , 2019 ) . To the best of our knowledge , there is only one work ( Hong et al. , 2020 ) focusing on the extraction of NAS models , which is not very practical or general . ( 1 ) This work mainly monitors the API traces in the high-level deep learning library , which requires the attacker and victim to share the same library with exactly the same version . This is not practical since users may use different libraries , especially their customized ones . ( 2 ) It needs the accurate dimension estimation to predict the layer type and model topology , which is hard to obtain in the real world . ( 3 ) The NAS model considered in this work is too small and simple , which can not well represent state-of-the-art NAS techniques . We propose NASPY , a learning-based framework for automated extraction of NAS architectures with high efficiency and fidelity . We make several contributions to overcome the above limitations . First , we exploit cache side-channel techniques to monitor the low-level BLAS library . Hence , the framework can be applied to different platforms regardless of the high-level deep learning libraries ( Tensorflow , Pytorch , or other customized libraries ) . This can not be achieved in ( Hong et al. , 2020 ) . Second , we model the extraction attack as a sequence-to-sequence problem , and design new deep learning models to predict the model operation sequence automatically . This does not require the tedious manual analysis , as conducted in ( Yan et al. , 2020 ) . Meanwhile , the models are able to predict new sophisticated operations in NAS , which are missing in ( Yan et al. , 2020 ; Hu et al. , 2020 ) . Third , we propose a new analysis method to precisely recover the exact hyper-parameters without any prior knowledge . In contrast , previous works can only estimate a possible range of hyperparameter values ( Yan et al. , 2020 ; Hu et al. , 2020 ) . Finally , we design strategies to reconstruct the model topology and extract the complete architecture for different scenarios and adversarial goals . We perform extensive experiments to demonstrate the effectiveness of NASPY . Our identification model can predict the operation sequences of different NAS methods ( DARTS ( Liu et al. , 2018 ) , GDAS ( Dong & Yang , 2019 ) and TE-NAS ( Chen et al. , 2021 ) ) with an error rate of 3.2 % . Our hyper-parameter prediction can achieve more than 98 % accuracy . The framework also demonstrates high robustness against random noise introduced by the complex and dynamic hardware systems . To engage the community , we will release the source code of our framework . 2 BACKGROUND . Neural Architecture Search ( NAS ) . This promising autoML technology can systematically generate a good network architecture for a given task and dataset ( Zoph & Le , 2016 ; Elsken et al. , 2019 ) . It defines a search space as the scope of neural networks in consideration , from which it finds the best architecture with different types of search strategies ( Zoph & Le , 2016 ; Real et al. , 2019 ; Liu et al. , 2018 ) . To reduce the search complexity and cost , a neural network is decomposed into multiple cells ( Chen et al. , 2021 ) . A cell can be represented as a Directed Acyclic Graph , where each edge represents a connection between two neural nodes that is associated with an operation selected from a predefined operation set ( Dong & Yang , 2020 ) . A NAS architecture normally has two types of cells : a normal cell computes the feature maps and a reduction cell reduces the spatial size . Multiple normal cells construct a block , and multiple blocks are interconnected by reduction cells to form the final model . Compared to traditional neural networks , NAS adopts some sophisticated operations among the neural nodes , like dilated convolutions and separable convolutions . Hardware attacks . Following the previous works ( Yan et al. , 2020 ; Hong et al. , 2020 ; Hu et al. , 2020 ) , we aim to exploit some hardware attacks to perform the extraction of NAS models . Specifically , we consider the following two attacks . Cache side-channel attacks : CPU caches are introduced between the CPU cores and main memory to accelerate the memory access . Since the attacker can share the same cache with the victim , he can reveal the behavior pattern of the victim from the contention on the usage of cache lines . In this paper , we adopt FLUSH-RELOAD , which is also used in ( Yan et al. , 2020 ; Hong et al. , 2020 ) for model extraction . The adversary leverages the shared low-level BLAS library to infer the victim model , and is able to obtain the sequence of its critical operations , e.g. , the matrix multiplication . Bus snooping attack : data traffic between the processor and memory system is achieved through a bus , which sends data to or loads data from specific addresses . Hence , by observing the memory traffic through the bus , the attacker can obtain the memory address traces of the victim model , which further reveals the connections between model layers . In this paper , we use the bus snooping technique ( Huang et al. , 2014 ) to monitor the read/write addresses of each model layer , which is also adopted in ( Hu et al. , 2020 ) . The adversary can only observe the data addresses and can not access the data passing through buses , which allows NASPY to work even when the model is encrypted . Sequence-to-sequence learning . Seq2seq learning is raising increased attention in the machine learning community , and becomes quite popular for different tasks like speech recognition ( Amodei et al. , 2016 ) , machine translation ( Neubig , 2017 ) , image captioning ( Islam et al. , 2019 ) , question answering ( Palasundram et al. , 2020 ) , etc . Three models are mostly used for seq2seq learning : Recurrent Neural Network ( RNN ) , Connectionist Temporal Classification ( CTC ) , and attention models ( Transformer ) . In this paper , we aim to use seq2seq learning for automated model extraction from the monitored memory activities . We design an RNN-CTC model and a Transformer model to recover the structure operations of NAS models . 3 FRAMEWORK OVERVIEW . 3.1 THREAT MODEL . Adversary ’ s goal . Given a victim model M constructed from NAS , the adversary aims to recover a similar network architecture as M , without searching it with large cost and the original dataset . We consider two types of goals following ( Jagielski et al. , 2020 ) : ( 1 ) accuracy extraction : the adversary aims to reproduce a network architecture , which can give similar model accuracy as the victim model ; ( 2 ) fidelity extraction : the adversary wishes to recover the same architecture and hyper-parameters as the victim one . Adversary ’ s capability . We consider two practical scenarios for extracting model architectures . For each scenario , we assume the attacker only knows the target model is from NAS , without any other prior knowledge , e.g. , the model family , layer type , NAS method , high-level deep learning library . • Remote attack : model extraction in this scenario is adopted in ( Yan et al. , 2020 ; Hong et al. , 2020 ) . The attacker can launch his malicious program on the same machine with the victim model . Although these programs are isolated by the OS or hypervisor , the attacker can still exploit the cache side-channel technique to monitor the victim ’ s low-level executions , e.g. , the sequence of matrix multiplication events . Based on the side-channel sequence , the attacker is able to perform accuracy extraction of the victim model . • Local attack : this scenario is considered in ( Hu et al. , 2020 ) , where the attacker can physically access the machine running the victim model . In addition to launching the cache side-channel attack to retrieve the operation sequence , the attacker can also launch the bus snooping attack to monitor the memory bus and PCIe events . With such memory address traces , the attacker can achieve fidelity extraction of the victim model and recover the exact model topology . 3.2 ATTACK OVERVIEW . Before describing our NASPY framework , we need to understand the workflow of the model inference process . As shown in the left diagram of Figure 1 , given a DNN model , a deep learning library ( e.g. , Tensorflow , Pytorch ) is used to process the computational graph of the model , and convert the model architecture into sequences of connected layer operations . Then these operation sequences are sent to low-level computation libraries for acceleration , such as the BLAS library ( e.g. , OpenBLAS ) for GEneral Matrix Multiplication ( GEMM ) , and the mathematical library ( e.g. , libm ) for activation functions . Those computations will be executed on the hardware platform . By monitoring the hardware activities using cache side-channel and bus snooping techniques , the attacker can observe the event sequences and memory address traces for the model inference process . Overview of NASPY . The adversary ’ s task is to automatically and precisely recover the NAS model architecture from the captured sequences of hardware activities . Figure 1 shows the workflow of our NASPY framework . It consists of three steps , as described below . First , it translates the event sequences from cache side-channel attacks to the operation sequences ( i.e. , input of the low-level computation library ) . We model this as a seq2seq problem , and design two deep learning models ( RNN-CTC and Transformer ) to achieve this prediction . Second , it identifies the values of hyper-parameters in the layer operations recovered from the first step . Previous works ( Hu et al. , 2020 ) can only estimate a range of these values based on the dimension size of layer input and output . In contrast , NASPY can precisely reveal the exact values of the hyper-parameters from the translated operation sequence . Third , NASPY reconstructs the model topology and obtains the complete architecture . For the accuracy extraction attack , the attacker can randomly select a model topology , and assign the recovered operations with the hyper-parameters to it . Our experiment results show that the corresponding model can give similar accuracy as the victim one . For the fidelity extraction attack , the attacker needs to recover the exact model topology . He can leverage the information in the memory address trace from the bus snooping attack to construct the architecture . | This paper presents an end-to-end adversarial framework to extract the network architecture obtained from Neural Architecture Search (NAS), named NASPY. Previous works focus on extracting conventional ConvNets with simple operations, while requiring heavy human analysis. In contrast, NASPY introduces a seq2seq network to automatically identify complicated operations from the hardware event sequence. In addition, both the value of hyper-parameters and the exact model topology can be obtained with NASPY. Extensive experiments based on DARTS, GDAS, and TE-NAS demonstrate the effectiveness of NASPY. | SP:9083f2ca2c43a7037bbc444f730e48c190e1c8c0 |
Causal Contextual Bandits with Targeted Interventions | 1 INTRODUCTION . Contextual bandits have been used as natural frameworks to model interactive decision making scenarios such as recommendation systems ( Liu et al. , 2018 ) , marketing campaign allocation ( Sawant et al. , 2018 ) and more ( Bouneffouf & Rish , 2019 ) . In this framework , the learning agent repeatedly interacts with an environment with the aim of learning a near-optimal decision policy that maps a context space to a set of actions ( also referred to as arms or interventions1 ) . In the standard stochastic variant , in each round of interaction , the agent observes a context from the environment and , once the agent chooses an action , the environment returns a sampled reward that is a function of the current context and chosen action ( Lattimore & Szepesvári , 2020 ) . The agent ’ s objective is to minimize some meaningful measure of closeness of the policy to optimality ( see Lattimore & Szepesvári ( 2020 ) for some standard definitions ) . One of the key issues in the wide application of contextual bandits ( and reinforcement learning , in general ( Dulac-Arnold et al. , 2021 ) ) is their need for a large number of samples that are costly to actualize in practice . For example , each arm might correspond to performing a product experiment on users or to conducting a specific medical intervention . However , we show that there are nuances in real-world situations which – though not fully captured by the standard formulations of contextual bandits – if modeled and leveraged , allow us to build methods that can improve the rate at which good policies can be identified . A motivating example Consider the example of a sales-assistance software agent that is learning to suggest a campaign that is optimal for a given sales lead ( defined by a set of features ) . With software products , there is often an opportunity to conduct experiments with variants of the software on defined subsets of the population of users ( each specified by a set of characteristics , or context variables ) to learn about resulting metrics ; see Google ( 2021 ) for an example . We can think of these experiments as constituting a training phase . More specifically , the agent , for example , can conduct a campaign ( which is the intervention ) on a specific subset of users ( for example , the context value os=iOS could define a subset ) and observe the outcome . Thus , instead of necessarily performing an intervention on a randomly sampled user coming from the natural population distribution , the agent 1We use the term intervention here because actions or arms in a ( contextual ) bandit setting can be interpreted as Pearl do ( ) interventions on a causal model ( Zhang & Bareinboim , 2017 ; Lattimore et al. , 2016 ) . See Pearl ( 2009 ; 2019 ) for more discussion on the do ( ) operation . can instead choose to target the intervention on a randomly selected user with specific characteristics ( as defined by an assignment of context variable values ) . We call this special type of interventions targeted interventions , and they fundamentally change the set of options that the agent has in every training round . In addition , the training phase often happens in a more lenient environment where the agent might have access to auxiliary context variables ( such as IT-spend ) that are unavailable in the evaluation phase . Further , there is also causal side-information sometimes available . For instance , we might know that emailsubject causes openemail , and not the other way around . Encoding this qualitative side-information as a causal graph can help the agent make use of this structure . Lattimore et al . ( 2016 ) and Yabe et al . ( 2018 ) demonstrate this in the best-arm identification case . After training , there is an evaluation phase ( e.g. , when the agent is deployed ) , where the agent observes the main context variables and decides an action ; its regret performance is measured at this point . Our framework Our framework captures the above intricacies ( which are not restricted to software product experimentation ) . The formal treatment is in Section 2 ; we present an overview here . The agent has T rounds of interaction that act as the training phase , followed by a ( T + 1 ) ’ th round on which it is evaluated . In each of the T training rounds , it has the choice to perform either a targeted intervention or a standard interaction . Further , in addition to the main context variables , the agent can observe a ( possibly empty ) set of additional auxiliary context variables during training ; these auxiliary context variables are not observable during evaluation . All variables are made available to the agent at the end of every training round ( this is similar to Lattimore et al . ( 2016 ) ) . The agent also has access to a causal graph that models the qualitative causal relationships between the variables ; there are very few assumptions made on this graph ( discussed in Section 2.1 ) . The causal graph allows a factorized representation of the joint distribution of the variables , and as a result , enables information leakage – i.e. , updating beliefs about several interventions after every single intervention . Also , importantly , we allow context variables to be categorical , and therefore the usual assumptions that enable generalization of the learned policy across contexts , such as linearity ( e.g. , in Dimakopoulou et al . ( 2019 ) ) , become invalid . The agent ’ s problem is one of sample allocation – how to allocate samples across the T training rounds so as to learn a policy that minimizes regret in the ( T + 1 ) ’ th round that represents the evaluation phase . In the evaluation phase , the agent observes the main context variables from the environment , against which it chooses an action and receives a reward – much like in a standard contextual bandit setting . Since targeted interventions are restricted to the training phase , it introduces a difference between the training and evaluation phases . The agent ’ s challenge , therefore , is to learn policies that minimize regret in the evaluation phase using samples it collects in the training phase ( from a combination of standard interactions and targeted interventions ) . The algorithm we propose utilizes a novel entropy-like measure called Unc that guides this sample allocation in a way that also exploits the information leakage . 1.1 CONTRIBUTIONS . In this paper , we formalize this modified setting , which we call “ causal contextual bandits with targeted interventions ” , provide a novel algorithm and show both theoretical and experimental results . Specifically , our contributions are : • We formalize the more nuanced contextual bandit setting described above ( Sec . 2 ) . This is the first work that we know of that formulates a contextual bandit setting with causal side-information . This is also the first paper we are aware of that introduces targeted interventions in a contextual bandit setting . • We propose a new algorithm based on minimizing a novel entropy-like measure ( Sec . 3.1 ) • We prove a bound on its regret , providing a theoretical guard on its performance ( Sec . 3.2 ) • We show results of experiments that use purely synthetic data ( Sec . 4.1 ) . The results demonstrate that our algorithm performs better than baselines . • We also run experiments that are inspired by proprietary data from a CRM software com- pany ( Sec . 4.2 ) .2 This provides evidence of our algorithm ’ s performance in more realistic scenarios as well . 2Identity of the company withheld here to ensure anonymity of submission . Our motivation comes from real world settings where experiments are costly ; therefore , we are interested in empirical behavior when the training budget T is relatively small . 1.2 RELATED WORK . Causal bandits have been studied in literature recently ( Lattimore et al. , 2016 ; Sen et al. , 2017 ; Yabe et al. , 2018 ; Lu et al. , 2020 ) and they leverage causal side-information to transfer knowledge across interventions . They , however , have been studied only in a best arm identification setting , with each arm modeled as an intervention on a set of variables ; the objective is to learn a single best arm . Our setting differs significantly since the agent attempts to learn a policy ( by which we mean a mapping from contexts to arms ) instead of a single best arm . Therefore , while the agent can perform targeted interventions that specify both the context and action , it is still attempting to learn an optimal context-action mapping . The contextual bandit literature is well-studied ( see Zhou ( 2016 ) and Lattimore & Szepesvári ( 2020 ) for surveys ) , and has taken various approaches to enable knowledge transfer across contexts . For example , Dimakopoulou et al . ( 2019 ) assume expected reward is a linear function of context , while Agarwal et al . ( 2014 ) make assumptions about the existence of a certain oracle . However , there has not been work that has looked at contextual bandits which utilize causal side-information as a way to transfer knowledge across contexts , or considered targeted interventions in the space of options for the agent . Our method utilizes the information leakage that the causal graph provides to not just learn about other interventions after every intervention , but also to be smarter about the choice of targeted interventions to conduct . Another related area is active learning ( Settles , 2009 ) . In active learning , a supervised learning agent gets the option to query an oracle actively to obtain the true labels for certain data points . However , it is in the supervised learning setting where the agent receives true label feedback , whereas in our setting the agent only receives bandit feedback ( that is , only for the action that was taken ) . Nevertheless , our work can be thought of as infusing some elements of the active learning problem into the contextual bandits setting by providing the agent the ability to perform targeted interventions . There has been some work investigating the intersection of causality and bandits with the aim of transfer learning . Zhang & Bareinboim ( 2017 ) study transfer of knowledge from offline data in the presence of unobserved confounders , in a non-contextual setting . As can be seen , this differs significantly from our setting . 2 FORMALISM . We assume that the underlying environment is modeled as a causal model M , which is defined by a directed acyclic graph G over all variables – i.e. , the variable to be intervened ( X ) , the reward variable ( Y ) , and the set of context variables ( C ) – and a joint probability distribution P that factorizes over G ( Pearl , 2009 ; Koller & Friedman , 2009 ) . C is partitioned into the set of main context variables ( Ctar ) and the set of auxiliary context variables ( Cother ) . G is sometimes called the causal graph or causal diagram ofM . Each variable takes on a finite , known set of values ; note that this is quite generic , and allows for categorical variables . An intervention do ( X = x ) onM involves removing all arrows from the parents ofX intoX , and settingX = x ( Pearl , 2009 ) . The agent has access only to G and not toM ; therefore , the agent is not given any knowledge a priori about the underlying conditional probability distributions ( CPDs ) of the variables . We specify a targeted intervention X = x conditioned on context Ctar = ctar succinctly by ( x , ctar ) . While standard interventions ( Pearl , 2009 ) result in a distribution of the form P ( . | do ( x ) ) , targeted interventions result in P ( . | do ( x ) , Ctar = ctar ) . Table 1 summarizes the key notation used in this paper . The agent is allowed T training rounds of interaction with the environment , at the end of which it aims to have learned a policy ϕ̂ : val ( Ctar ) → val ( X ) . Specifically , in each of the T training rounds , the agent can choose to either • ( Standard interaction ) Observe context ctar ∼ P ( Ctar ) , choose intervention x , and observe ( y , cother ) ∼ P ( Y , Cother | do ( x ) , ctar ) , ( or ) where , when there is no ambiguity , we use P interchangeably to mean either the joint distribution or a marginal distribution . Note that in both modes of interaction above , the intervention is only on X ; they differ , however , in whether the agent observes the context values from the environment or whether it chooses the context values on which to condition the intervention . After training , the agent is evaluated in the ( T + 1 ) ’ th round . Here , the agent is presented a query context ctar ∼ P ( Ctar ) to which it responds with an action x = ϕ̂ ( ctar ) using the learned policy , and receives a reward y ∼ P ( Y | do ( x ) , ctar ) from the environment . The objective of the agent is to learn a policy ϕ̂ that minimizes simple-regret , which is defined as : Regret ≜ ∑ ctar [ µ∗ctar − µ̂ctar ] · P ( ctar ) = ∑ ctar Regret ( ctar ) · P ( ctar ) where ϕ∗ is an optimal policy , µ∗ctar ≜ E [ Y |do ( ϕ∗ ( ctar ) ) , ctar ] and µ̂ctar ≜ E [ Y |do ( ϕ̂ ( ctar ) ) , ctar ] . | The paper studies a contextual bandit setting with two unique features: (1) the learning agent has ability to perform targeted interventions during the learning phase (ability to select target sub-populations or context) and (2) it also has access to and integrates casual information in the setting. The key motivation is that this setting captures real-world scenarios such as software product experimentation. One key contribution of the work is a new algorithm that achieves better sample efficiency. The algorithm is evaluated using synthetic experiments and real-world-inspired synthetic experiments. | SP:deb40959d914e612a47c564c011dae2771964dce |
Ensemble Kalman Filter (EnKF) for Reinforcement Learning (RL) | 1 INTRODUCTION . This paper is concerned with the problem of reinforcement learning ( RL ) in continuous-time and continuous ( Euclidean ) state-space settings . A special case is the linear quadratic Gaussian ( LQG ) problem where the dynamic model is a linear system , the cost terms are quadratic , and the distributions – of the random initial condition and the noise – are Gaussian . The LQG problem has a rich and storied history in modern control theory going back to the very origin of the subject ( Kalman , 1960 ) . To obtain the optimal control , the bottleneck is to solve the Riccati equation – the differential Riccati equation ( DRE ) in finite-horizon settings or the algebraic Riccati equation ( ARE ) in the infinite-horizon settings of the problem . There is a body of literature devoted to the study of these equations ( Bittanti et al. , 2012 ; Lancaster & Rodman , 1995 ) with specialized numerical techniques to compute the solution ( Laub , 1991 ; Benner & Bujanović , 2016 ) . There are two issues which makes the LQG and related problems a topic of recent research interest : ( i ) In high-dimensions , the matrix-valued nature of the DRE or ARE means that any algorithm is O ( d2 ) in the dimension d of the state-space ; and ( ii ) the model parameters may not be explicitly available to write down the DRE ( or the ARE ) let alone solve it . The latter is a concern , e.g. , when the model exists only in the form of a black-box numerical simulator . These two issues have motivated the recent research on the infinite-horizon linear quadratic regulator ( LQR ) problem ( Fazel et al. , 2018 ; Mohammadi et al. , 2021b ; Tu & Recht , 2019 ) . In LQR , the bottleneck is to solve an ARE . The algorithms studied in the recent papers seek to bypass solving an ARE by directly searching over the space of stabilizing gain matrices . Global convergence rate estimates are established for both discrete-time ( Fazel et al. , 2018 ; Dean et al. , 2020 ; Malik et al. , 2020 ; Mohammadi et al. , 2021a ) and continuous-time ( Mohammadi et al. , 2020a ; b ; 2019 ; 2021b ) settings of the LQR problem . Extensions to the H∞ regularized LQR ( Zhang et al. , 2020 ) and Markov jump linear systems ( Jansch-Porto et al. , 2020 ) have also been carried out . The motivation and goals of the present work are related to these recent papers , albeit the proposed solution approach is very different . Our inspiration comes from data assimilation ( Reich & Cotter , 2015 ) , where in practical applications , e.g. , in weather prediction , ( i ) only simulation-based models are available , and ( ii ) these are very high-dimensional . The ensemble Kalman filter ( EnKF ) is an efficient simulation-based algorithm to assimilate sensor data in these applications without the need to explicitly solve a DRE ( Evensen , 1994 ; 2006 ; Houtekamer & Mitchell , 2001 ) . Our contribution : A novel extension of the EnKF algorithm is proposed to learn the optimal control law for the general ( stochastic and partially observed ) setting of the LQG optimal control problem . The proposed algorithm is simulation-based ( using particles ) and , in particular , avoids the need to solve the DRE . Assuming full-state feedback ( e.g , setting of the LQR problem ) , the optimal control law is directly obtained . For the partially observed case , the proposed EnKF is combined with a standard EnKF ( for the estimation problem ) to obtain the optimal control input , based on the use of the separation principle . The algorithm is shown to be exact in its mean-field ( when the number of particles N = ∞ ) limit ( Prop . 2 ) . For the finite-N approximation , an error bound is obtained ( Eq . ( 14 ) ) . An extensive discussion is included to provide an intuitive explanation of the algorithm , situate the algorithm in the RL landscape ( see discussion after Eq . ( 12 ) in Sec . 2.2 ) , and to compare and contrast the algorithm with the state-of-the-art ( Sec . 2.5 ) . For this purpose , numerical comparisons with competing algorithms are also included ( Fig . 2 ( c ) ) . The outline of the remainder of this paper is as follows . The LQG optimal control problem and its simulation-based solution is described in Sec . 2 . The algorithms are illustrated with numerical examples in Sec . 3 where comparisons with the state-of-the-art algorithms are also described . 2 LINEAR QUADRATIC GAUSSIAN ( LQG ) PROBLEM . Problem : The partially observed linear Gaussian model is expressed using the Itô-stochastic differential equations ( SDE ) as dXt = AXt dt+BUt dt+ dξt , X0 ∼ N ( m0 , Σ0 ) ( 1a ) dZt = HXt dt+ dζt , Z0 = 0 ( 1b ) where X = { Xt ∈ Rd : t ≥ 0 } is the hidden state process , U = { Ut ∈ Rm : t ≥ 0 } is the control input , and Z = { Zt ∈ Rp : t ≥ 0 } is the observation process . The model parameters A , B , H are matrices of appropriate dimensions , the process noise ξ = { ξt ∈ Rd : t ≥ 0 } and the observation noise ζ = { ζt ∈ Rp : t ≥ 0 } are Wiener processes ( w.p . ) with covariance Q and R , respectively . It is assumed that X0 , ξ and ζ are mutually independent andR 0 . The LQG optimal control objective is to minimize J ( U ) = E ( ∫ T 0 1 2 |CXt|2 + 12U > t RUt dt+ 12X > T PTXT ) ( 2 ) It is assumed that ( A , B ) is controllable , ( A , C ) and ( A , H ) are observable , and the matrices PT 0 and R 0 . In the fully observed settings , Ut is allowed to be a function of Xt . In the partially observed settings , Ut is a function of the past observations { Zs : 0 ≤ s ≤ t } . For this purpose , it is convenient to denote Zt : = σ ( { Zs : 0 ≤ s ≤ t } ) as the sigma-field generated by the observations , and consider control inputs U which are adapted to the filtration Z : = { Zt : t ≥ 0 } . Classical solution : Using the seperation principle1 the LQG controller is obtained in three steps : Step 1 . Filter design : The objective of the filter design step is to compute the causal estimate X̂t : = E ( Xt|Zt ) for t ≥ 0 . The evolution equation for { X̂t : t ≥ 0 } is the Kalman-Bucy filter . Notably , the optimal gain matrix for the filter is obtained by solving a forward ( in time ) DRE . Step 2 . Control design : The objective of the control design step is to compute the optimal feedback control law { ut ( x ) : 0 ≤ t ≤ T , x ∈ Rd } for the fully observed LQG problem . It is well known to be of the linear form ut ( x ) = Ktx , 0 ≤ t ≤ T where the optimal gain matrix Kt is obtained by solving a backward ( in time ) DRE . 1The separation principle hinges on the assumption that the control input Ut does not change the observation sigma-field Zt . This is valid under very mild assumptions on the control policy , e.g. , Lipschitz with respect to estimate X̂t ( Van Handel , 2007 , Sec . 7.3 ) , ( Georgiou & Lindquist , 2013 ) . Step 3 . Certainty equivalence : The optimal control input is obtained by combining the results from steps 1 and 2 : Ut = ut ( X̂t ) = KtX̂t , 0 ≤ t ≤ T The bottleneck is to solve the DREs – the forward DRE for the optimal filter gain and the backward DRE for the optimal control gain2 . In the following three sections , we describe a simulation-based algorithm for these three steps which avoids the need to explicitly solve the DREs . 2.1 STEP 1 . FILTER DESIGN USING ENKF . The filter design objective is to compute the causal estimate X̂t = E ( Xt|Zt ) . In the linear Gaussian settings , the conditional distribution of the Xt is Gaussian whose mean and variance are denoted as mt and Σt , respectively . These evolve according to the Kalman-Bucy filter : dmt = Amt dt+BUt dt+ Lt ( dZt −Hmt dt ) , m0 = E ( X0 ) ( 3a ) d dt Σt = AΣt + ΣtA > +Q− ΣtH > R−1HΣt , Σ0 = var ( X0 ) ( 3b ) where Lt = ΣtH > R−1 is the Kalman gain . Note that ( 3b ) is a forward ( in time ) DRE and its solution Σt is used to compute the optimal Kalman gain Lt . The EnKF is a simulation-based algorithm to approximate the Kalman filter , that does not require an explicit solution of the DRE ( 3b ) . The design of an EnKF proceeds in two steps : 1 . Construct a stochastic process , denoted by X̄ : = { X̄t ∈ Rd : t ≥ 0 } , such that the conditional distribution ( given Zt ) of X̄t is equal to the conditional distribution of Xt ; 2 . Simulate N stochastic processes , denoted by { Xit : t ≥ 0 , 1 ≤ i ≤ N } , to empirically approximate the distribution of X̄t . The process X̄ is referred to as the mean-field process . The N processes in the step 2 are referred to as particles . The construction ensures that the EnKF is exact in the mean-field ( N =∞ ) limit . That is , for any bounded and continuous function f , E [ f ( Xt ) |Zt ] Step 1 = E [ f ( X̄t ) |Zt ] ︸ ︷︷ ︸ exactness condition Step 2≈ 1 N N∑ i=1 f ( Xit ) The details of the two steps are as follows : Mean-field process : The mean-field process is constructed as dX̄t = AX̄t dt+BUt dt+ dξ̄t + L̄t ( dZt − HX̄t +Hm̄t 2 dt ) , X̄0 ∼ N ( m0 , Σ0 ) ( 4 ) where ξ̄ : = { ξ̄t : t ≥ 0 } is an independent copy of the process noise ξ , L̄t : = Σ̄tH > R−1 is the Kalman gain and m̄t : = E [ X̄t|Zt ] , Σ̄t : = E [ ( X̄t − m̄t ) ( X̄t − m̄t ) > |Zt ] are the conditional mean and the conditional covariance , respectively , of X̄t . The right-hand side of ( 4 ) depends upon both the process ( X̄t ) as well as the statistics of the process ( m̄t , Σ̄t ) . Such an SDE is an example of a McKean-Vlasov SDE . The proof of the following proposition is included in the Appendix A ( see also Taghvaei & Mehta ( 2020 , Theorem 1 ) ) . Proposition 1 ( Exactness of EnKF ) . Consider the mean-field EnKF ( 4 ) initialized with a Gaussian initial condition X̄0 ∼ N ( m0 , Σ0 ) . Suppose the control input U is a Z-adapted stochastic process . Then its solution X̄t is a Gaussian random variable whose conditional mean and variance m̄t = mt , Σ̄t = Σt , a.s. , t > 0 evolve the same as the Kalman filter ( 3 ) . 2In the steady-state or infinite horizon settings ( as T → ∞ ) , one may replace the optimal filter gain and the optimal control gain by their steady-state values . These are directly obtained by solving the respective AREs . Finite-N approximation : The mean-field process is simulated as an interacting particle system : dXit = AX i t dt+BUt dt+ dξ i t︸ ︷︷ ︸ i-th copy of model ( 1a ) +L ( N ) t ( dZt − HXit +HX̂ ( N ) t 2 dt ) ︸ ︷︷ ︸ data assimilation step , Xi0 i.i.d∼ N ( m0 , Σ0 ) ( 5 ) where X̂ ( N ) t : = 1 N ∑N i=1X i t is the empirical mean and L ( N ) t = 1 N − 1 N∑ i=1 ( Xit ) ( HX i t −HX̂ ( N ) t ) > R−1 ( 6 ) is the empirical approximation of the optimal Kalman gain matrix . The system ( 5 ) is referred to as the square root form of the EnKF ( Bergemann & Reich , 2012 , Eq ( 3.3 ) ) . Note that the gain is approximated entirely in terms of particles without solving the DRE ( 3b ) . The EnKF ( 5 ) is an example of a simulation-based algorithm in the sense that N copies of the model ( 1a ) are simulated in parallel . The simulations are coupled through a term which is referred to as the data assimilation step . This term has a gain times error feedback control structure . | The paper is about designing a simulation-based ensemble Kalman filter algorithm for learning the optimal control policy for the Linear Quadratic Gaussian (LQG) control problem. The main contribution is that the paper extends the existing ensemble Kalman filter algorithm for filter (state estimation) design to the optimal control policy learning for the LQG control setting. And it is shown to be exact in its mean-field limit (N=infinity). | SP:ebc788d6c2ddc10749aac5fc1a5353d68d36fbeb |
Cluster-based Feature Importance Learning for Electronic Health Record Time-series | 1 INTRODUCTION . Chronic conditions such as Chronic Obstructive Pulmonary Disease ( COPD ) and Cardiovascular Disease ( CVD ) describe a broad spectrum of medical ailments , and affect a significant percentage of the overall population ( Adeloye et al. , 2015 ) . Such diseases are characterized by the existence of multiple distinct patient subgroups , largely distinguished by differences in pathology and in the response to different treatments and medical interventions Turner et al . ( 2015 ) ; Vogelmeier et al . ( 2018 ) . Exacerbation of COPD , a condition of respiratory failure , can result in emergency hospital admission and mortality if it is not well treated and managed . Early identification of COPD patients ’ subgroups is therefore of high medical importance and relevance . EHR time-series data are typically used to determine clinically relevant COPD inpatient subgroups , and have been applied to detect risk of deterioration ( Pikoula et al. , 2019 ) . However , modelling disease progression and risk prediction is challenging due to the extreme data heterogeneity nature of EHRs . Firstly , EHR data contains a mixture of demographic or static variables ( i.e . time independent such as age and sex ) , and multi-dimensional time-series ( e.g Heart Rate , HR , and laboratory measurements , such as blood tests ) . Secondly , EHR time-series are multi-modal as different features are collected from different devices , representing distinct clinical properties of relevance . Similarly , time-series features are sampled at different times and have low and distinct sampling rates , as well as different missing value properties . Furthermore , each feature is associated with different noise and evolution patterns . Recent advances in deep learning ( DL ) approaches have shown promising results in EHR modelling due to their capacity to handle complex data ( Rajkomar et al. , 2018 ) . Nonetheless , DL approaches lack relevant interpretability frameworks to be scaled and applied in hospital settings . Several such models have since been proposed to tackle this issue ( Mayhew et al. , 2018 ) , however , most of them focus on a subset of EHR features ( usually vital signs only ) and fail to provide a clinically-focused phenotypic analysis of learnt patient sub-groups ( via clustering ) . This work builds on previous research in literature to introduce a cluster-based feature-time attention mechanism to predict patient outcomes based on EHR data . Our method also leverages phenotypic information to aid in clinical interpretability , not only making use of demographics and vital-signs information but also of relevant laboratory measurements ( all present in the EHR ) to provide a more complete patient physiological status . Our contributions include the following : • An end-to-end DL supervised model to cluster EHR patient data based on the identification of clinically understandable cluster phenotypes with regard to both outcome prediction and patient trajectory in a multi-class setting ; • A weighted loss to address data imbalance for both tasks of clustering and prediction , a common issue in the medical domain ; • The incorporation of a novel loss mechanism in the model , to address the issue of cluster collapse and promote sample assignment to all available clusters ; • Finally , the inclusion of a novel interpretability framework , derived from a cluster-based feature-time attention layer , aiming to identify relevant timestamps and feature variables to represent the patient physiology , cluster assignment and , ultimately , outcome prediction . This paper is structured as follows . In Section 2 , we describe previous research in EHR time-series modelling , clustering and attention methods . Section 3 introduces the dataset used for analysis and provides description of the proposed model . The experimental setup and results of our analysis are presented in Section 4 and discussion takes place in Section 5 . Finally , concluding remarks and future work are available in Section 6 . 2 RELATED WORK . EHR data comprise complex time-series data , being high-dimensional , multi-modal and heterogeneous , and thus presenting challenges when used in machine learning models ( Keogh & Kasetty ( 2003 ) ; Rani & Sikka ( 2012 ) ) . An important goal in a medical setting is to identify phenotypically separable clusters with distinct phenotypic profiles ( which we denote as phenotypic clustering hereafter ) . For the purpose of this work , cluster phenotypes result from the combination of two distinct components : a ) the evolution profile of patient trajectories ’ within the cluster , and b ) the characterisation of the cluster with regards to clinical variables of interest . The latter may include features not used for clustering and may provide information about the underlying or future health status . Traditional clustering models such as K-Means or hierarchical clustering have been shown to fail to capture the existing time-dependent feature relationships . As such , variants have been proposed to mitigate this problem . A temporal version of the K-Means algorithm , Time-Series K-Means ( TSKM , Tavenard et al . ( 2020 ) ) , models the distance between time-series of different datapoints , using the Euclidean distance ( which is equivalent to considering all temporal observations as an independent feature value for the corresponding patient admission ) , or time-series alignment strategies such as Dynamic-Time Warping ( DTW , Berndt & Clifford ( 1994 ) ) and soft-DTW ( Cuturi & Blondel ( 2017 ) ) . Recent DL architectures , ranging from Auto-Encoders ( AE , Ma et al . ( 2019 ) ) , Convolutional Neural Networks ( CNN , Munir et al . ( 2018 ) ) and others , have shown great promise when applied to timeseries data across a variety of domains . Fortuin et al . ( 2019 ) proposed a Self-Organising Map - Variational Auto-Encoder ( SOM-VAE ) , is a state-of-the-art , unsupervised , DL clustering algorithm which extends a variational auto-encoder architecture ( Kingma & Welling , 2013 ) for observation learning and representation , through the addition of a Markov model ( Gagniuc , 2017 ) , to infer temporal evolution within the latent space . Clustering is performed in the low dimensional latent space through the use of self-organising maps ( Kohonen , 1982 ) to obtain a discrete , topologically-interpretable latent representation of the learnt clusters . In a supervised setting , AC-TPC ( Lee & Van Der Schaar , 2020 ) serves as the current state-of-the-art for identifying phenotypically separable clusters in patient trajectories in EHR data . AC-TPC maps EHR data into a latent space via an encoder , and uses an actor-critic network ( Konda & Tsitsiklis , 2000 ) which leverages clinical outcomes to aid in cluster formation and obtaining cluster phenotypes . Neither SOM-VAE and AC-TPC provide clinically meaningful interpretation of feature-time importance or outcome of interest . Attention mechanisms have recently been proposed to provide greater interpretability to Recurrent Neural Networks ( RNN ) and to aid in dealing with long-term dependencies ( Vaswani et al. , 2017 ; Xu et al. , 2015 ) , and have also been used in modelling EHR time-series ( Schwab et al. , 2017 ; Shashikumar et al. , 2018 ) . RETAIN ( Choi et al. , 2016 ) proposes a two-level reverse attention mechanism to mimic physician ’ s decision process and predict a future diagnosis . In other recent works , attention mechanisms based on bi-directional RNN and CNN outperformed standard classification models in predicting high risk vascular diseases with the addition of medication information as input data ( Kim et al. , 2017 ) . A drawback of such attention mechanisms is the focus on temporal interpretability only , and inability to look at individual features , which is key in a medical setting . To solve this issue , Shamout et al . ( 2019 ) considered independent RNN per feature , with a concatenation of the resulting latent vectors . However , the latter does not allow the joint modelling across both feature and time dimensions . Alternatively , Kaji et al . ( 2019 ) ; Gandin et al . ( 2021 ) proposed learning attention weights directly on the original inputs , prior to being transformed by a RNN , which does not allow modelling of the resulting latent representations . To the best of our knowledge , no existing models have been proposed that jointly leverage both feature and time dimensions ( feature-time ) to determine clinical observation relevance on clustered EHR data . 3 METHODS . 3.1 DATASET AND PRE-PROCESSING . Our dataset was retrieved from a retrospective database of routinely collected observations from concluded hospital admissions between March 2014 and March 2018 ( the HAVEN project , REC reference : 16/SC/0264 and Confidential Advisory Group reference 08/02/1394 ) . The database includes EHR measurements of adult patients admitted to four hospitals from the Oxford University Hospitals NHS Foundation Trust . Note that the HAVEN dataset does not include data from Intensive Care Units ( ICU ) , and we have excluded observations taken in the Emergency Department . Key characteristics of HAVEN cohort data include a ) heterogeneity , b ) multi-modality , and difference in : c ) noise distributions , d ) sampling rates , e ) missing values , etc . Such properties are common across EHR settings , and are challenging with respect to learning useful representations and predictions . We used the protocol defined in Pimentel et al . ( 2019 ) to subset the cohort to those patients at risk of developing Type-II Respiratory Failure ( T2RF ) in hospital ( a diagram of the data selection steps can be found in Figure A.1 in the Appendix ) . Four patient outcomes were considered in our analysis : i ) no event during hospital stay , leading to successful discharge from the hospital , or the first instance of one of three possible events , ii ) unplanned entry to ICU , iii ) cardiac arrest ( also named ” Cardiac ” hereafter ) and iv ) death . Outcome groups are not clearly separable ( see Tables A.2 , A.3 in the Appendix ) , so patient clusters will naturally contain a mix of different admission outcomes . In this setting , the clinically relevant component of a cluster phenotype ( henceforth denoted as cluster outcome propensity or cluster outcome ) is represented as a categorical distribution indicating the corresponding propensity for cluster-assigned patients to each corresponding outcome . For each admission , observations were grouped according to mean window observation value into 4 hour blocks based on the time to outcome ( discharge in the case of no event during stay ) - only observations within 24 and 72 hours before the outcome were considered . This time window was selected based on those traditionally used for validating Early Warning Score ( EWS ) systems ( baseline models used by UK NHS staff to track inpatient physiology , ( Royal College of Physicians , 2017 ) and clinical input , such that the target phenotype represents the patient status in the subsequent 24 hours . Features were transformed according to min-max normalization due to skewness and heterogeneity in their distributions . Patient admissions were randomly split into train , validation and test sets . Missing values were imputed based on the previously observed time block - all remaining missing observations were imputed according to the feature median from the aggregated validation and test data ( see Section 4 for description of train-test data split ) . Imputed values were flagged in a three-dimensional mask matrix . After processing , input data contained over 100,000 unique patient trajectories corresponding to 4,266 unique patient admissions ( only last patients admissions were considered in our analysis ) . Original trajectories for the patient cohort are shown in the Appendix in Figures A.4 , A.5 , A.6 for different variables/features . A lack of clear outcome group separability can be observed across temporal and static variables . Furthermore , we note the high degree of imbalance in the data - admissions with no event account for over 86.8 % of the total number of admissions , while event classes correspond to 10.3 % Death , 1.8 % ICU and 1.1 % Cardiac . | The paper presents a way to predict outcomes of patients using EHR records. The authors propose a phenotyping model which clusters similar patients based on their outcome distribution. They also introduce feature-time relevance map which helps explain for a particular patient the feature-time combinations which are important for their prediction. | SP:4ecd135494e61651f82e86e1adac4ce2b2f79a1c |
Coresets for Kernel Clustering | 1 INTRODUCTION . We design the first coresets , and consequently new efficient algorithms , for kernel k-MEANS and related problems , like its generalization kernel ( k , z ) -CLUSTERING , under general kernels . The kMEANS problem has proved to be fundamental for unsupervised learning in numerous application domains . Vanilla k-MEANS fails to capture sophisticated cluster structures , e.g. , when the clusters are separable non-linearly , but this can be tackled by applying kernel methods ( Schölkopf et al. , 1998 ; Girolami , 2002 ) . This has led to kernel k-MEANS , where data points are first mapped to a high-dimensional feature space ( possibly implicitly via a kernel function ) , and then clustered in this richer space using a classical k-MEANS . Formally , a kernel for a dataset X is a function K : X ×X → R+ ( intended to measure similarity between elements in X ) that can be realized by inner products , i.e. , there exist a Hilbert space H and a map ϕ : X → H ( called feature space and feature map ) such that ∀x , y ∈ X , 〈ϕ ( x ) , ϕ ( y ) 〉 = K ( x , y ) . ( 1 ) In kernel k-MEANS , the input is a dataset X with weight function wX : X → R+ and a kernel function K : X × X → R+ as above , and the goal is to find a k-point center set C ⊆ H that minimizes the objective costϕ ( X , C ) = ∑ x∈X wX ( x ) ·min c∈C ‖ϕ ( x ) − c‖2 . ( 2 ) ( An equivalent formulation asks for a k-partitioning of X , keeping C implicit . ) This kernel version has superior clustering capability compared to classical k-MEANS ( Zhang & Rudnicky , 2002 ; Kim et al. , 2005 ) , and has proved useful in different application domains , such as pattern recognition ( Shawe-Taylor & Cristianini , 2004 ) , natural language processing ( Andrews & Fox , 2007 ) , biology ( Gönen & Margolin , 2014 ) and social networks ( van Laarhoven & Marchiori , 2016 ) . In fact , kernel k-MEANS is useful also for solving other clustering problems , such as normalized cut and spectral clustering ( Dhillon et al. , 2004 ; Ding et al. , 2005 ) . Computational challenges . As observed in previous work ( Girolami , 2002 ; Dhillon et al. , 2004 ) , the kernel trick can be applied to rewrite kernel k-MEANS using access only to the kernel K ( · , · ) and without computing the very high-dimensional map ϕ explicitly . However , this approach has outstanding computational challenges ( compared to classical k-MEANS ) , essentially because of the kernel trick . Consider the special case where k = 1 and the input is n unweighted points ( i.e. , 1-MEAN clustering ) . It is well known that the optimal center c ? has a closed form c ? : = 1n ∑ x∈X ϕ ( x ) . But the kernel trick requires Ω ( n2 ) accesses to K to evaluate costϕ ( X , c ? ) ,1 while in the classical setting such evaluation needs only O ( n ) distance computations . This Ω ( n2 ) barrier can be bypassed by allowing ( 1 + ) -approximation . In particular , let S be a uniform sample of poly ( −1 ) points from X , and let ĉ : = 1|S| ∑ x∈S ϕ ( x ) be its 1-MEAN ; then with high probability , costϕ ( X , ĉ ) ≤ ( 1 + ) costϕ ( X , c ? ) and evaluating costϕ ( X , ĉ ) takes only poly ( −1 ) n time . However , this uniform-sampling approach does not generally work for k ≥ 2 , because if the optimal clustering is highly imbalanced , a uniform sample is unlikely to include any point from a small cluster . Alternative approaches , such as dimension reduction , were also proposed to obtain efficient algorithms for kernel k-MEANS , but they too do not fully resolve the computational issue . We elaborate on these approaches in Section 1.2 . Our approach . To tackle this computational challenge , we adapt the notion of a coreset ( HarPeled & Mazumdar , 2004 ) to kernel k-MEANS . Informally , a coreset is a tiny reweighted subset of the original dataset on which the clustering cost is preserved within ( 1 ± ) factor for all candidate centers C ⊆ H. This notion has proved very successful for classical k-MEANS , e.g. , to design efficient near-linear algorithms . In our context of kernel k-MEANS , a coreset of size s for an input of size n = |X| has a huge advantage that its k optimal center points can all be represented as linear combinations of only s points in the feature space . Given these k optimal centers ( as linear combinations ) , evaluating the distance between a point ϕ ( x ) and such a center takes merely O ( s2 ) time , instead ofO ( n2 ) , and consequently the objective can be ( 1+ ) -approximated in timeO ( s2kn ) . Moreover , it suffices to use k centers ( again as linear combinations ) that are ( 1 + ) -approximately optimal for the coreset S. In addition , coresets are very useful in dealing with massive datasets , since an offline construction of coresets usually generalizes to the streaming setting ( Har-Peled & Mazumdar , 2004 ) , distributed computing ( Balcan et al. , 2013 ) and dynamic algorithms ( Henzinger & Kale , 2020 ) via the merge-and-reduce method ( Har-Peled & Mazumdar , 2004 ) , and existing ( offline ) algorithms can be efficiently applied to the coreset , instead of to the original dataset , with minor or no modifications . 1.1 OUR RESULTS . Our main result is the first coreset for kernel k-MEANS with a general kernel , that has size independent of the input size n = |X| ; moreover , our coreset can be constructed in near-linear time for small k. ( In fact , it generalizes to kernel ( k , z ) -CLUSTERING , see Section 2 for definitions . ) Formally , an -coreset for kernel k-MEANS with respect to weighted dataset X and kernel function K : X × X → R+ is a weighted subset S ⊆ X , such that for every feature space H and feature map ϕ that realize K , as defined in ( 1 ) , ∀C ⊆ H , |C| = k , costϕ ( S , C ) ∈ ( 1± ) · costϕ ( X , C ) . ( 3 ) Previously , only a weak coreset was known for kernel k-MEANS ( Feldman et al. , 2007 ) , meaning that the objective is preserved only for certain candidate centers ( whereas ( 3 ) guarantees this for all centers ) , and that coreset works only for certain kernels ( finite-dimensional ) . While we employ a similar approach , the technical differences make our bottom-line result much stronger . Throughout , we assume an oracle access to K takes unit time , and therefore our stated running times also bound the number of accesses to K. We denote Õ ( f ) = O ( f · polylog f ) to suppress logarithmic factors . Theorem 1.1 ( Informal version of Theorem 3.1 ) . Given n-point weighted dataset X , oracle access to a kernel K : X ×X → R+ , integer k ≥ 1 and 0 < < 1 , one can construct in time Õ ( nk ) , a 1In fact , evaluating ‖c ? − ϕ ( u ) ‖2 for a single point u ∈ X already requires Θ ( n2 ) accesses , since ‖c ? − ϕ ( u ) ‖2 = K ( u , u ) − 2 n ∑ x∈X K ( x , u ) + 1 n2 ∑ x , y∈X K ( x , y ) . reweighted subset S ⊆ X of size |S| = poly ( k −1 ) , that with high probability is an -coreset for kernel k-MEANS with respect to X and K. We can employ our coreset to devise a ( 1 + ) -approximation algorithm for kernel k-MEANS , that runs in time that is near-linear in n and parameterized by k. This is stated in Corollary 1.2 , whose proof follows by solving k-MEANS on S optimally , using straightforward enumeration over all kpartitions of S. To the best of our knowledge , such a fast ( 1+ ) -approximation for kernel k-MEANS was not known even for k = 2 ; for example , uniform sampling would fail in cases where the optimal clustering is very imbalanced , as mentioned earlier . Corollary 1.2 ( FPT-PTAS ) . Given n-point weighted dataset X , oracle access to a kernel K : X × X → R+ , integer k ≥ 1 and 0 < < 1 , one can compute in time O ( nk + kpoly ( k −1 ) ) , a center set C of k points , each represented as a linear combination of at most poly ( k −1 ) points from ϕ ( X ) , such that with high probability C is a ( 1 + ) -approximation for kernel k-MEANS on X and K. In particular , given such C , one can find for each x ∈ X its closest center in C in time poly ( k −1 ) . In fact , for the purpose of finding near-optimal solutions , it already suffices to preserve the cost for centers coming from span ( ϕ ( X ) ) ( see Fact 2.1 ) which is an n-dimensional subspace . However , our definition of coreset in ( 3 ) is much stronger , in that the objective is preserved even for centers coming from a possibly infinite-dimensional feature space . This stronger guarantee ensures that the coreset is composable , and thus the standard merge-and-reduce method can be applied . In particular , our coreset implies the first streaming algorithm for kernel k-MEANS . Corollary 1.3 ( Streaming kernel k-MEANS ) . There is a streaming algorithm that given a dataset X presented as a stream of n points , and oracle access to a kernel K : X ×X → R+ , constructs a reweighted subset S ⊆ X of poly ( k −1 ) points using poly ( k −1 log n ) words of space and update time , such that with high probability S is an -coreset for k-MEANS with respect to X and K. Experiments and other applications . We validate the efficiency and accuracy of our coresets on various data sets with polynomial and Gaussian kernels , which are frequently-used kernels . For every dataset , kernel , and coreset-size that we test , our coreset performs consistently better than uniform sampling which serves as a baseline . In fact , our coreset achieves less than 10 % error using only about 1000 points for every dataset . We also showcase significant speedup to several applications that can be obtained using our coresets . Specifically , we adapt the widely used k-MEANS++ ( Arthur & Vassilvitskii , 2007 ) to the kernel setting , and we compare the running time and accuracy of this kernelized k-MEANS++ with and without coresets . On a dataset of size 105 , we observe more than 1000x speedup of k-MEANS++ when using coresets , while achieving a very similar error . Furthermore , this new efficient version of kernelized k-MEANS++ ( based on coresets ) is applied to solve spectral clustering , using the connection discoverd by Dhillon et al . ( 2004 ) . Compared to the implementation provided by Scikitlearn ( Pedregosa et al. , 2011 ) , our algorithm often achieves a better result and uses significantly less time . Hence , our coreset-based approach can potentially become the leading method for solving spectral clustering in practice . | The paper claims to present the first coreset for kernel k-means and other (k,z) kernel clusterings given oracle access to the kernel. The size of coreset is independent of the number of points and construction time is near linear in k. The authors use the coreset to get a (1+\epsilon) approximation for the kernel k-means. The theory is supported with experimental results. | SP:e859add2ee645d7c124b0924f9a7d978ee98d8d8 |
Towards Understanding Distributional Reinforcement Learning: Regularization, Optimization, Acceleration and Sinkhorn Algorithm | 1 INTRODUCTION . The intrinsic characteristics of classical reinforcement learning ( RL ) algorithms , such as temporaldifference ( TD ) learning ( Sutton & Barto , 2018 ) and Q-learning ( Watkins & Dayan , 1992 ) , are based on the expectation of discounted cumulative rewards that an agent observes while interacting with the environment . In stark contrast to the classical expectation-based RL , a new branch of algorithms called distributional RL estimates the full distribution of total returns and has demonstrated stateof-the-art performance in a wide range of environments ( Bellemare et al. , 2017a ; Dabney et al. , 2018b ; b ; Yang et al. , 2019 ; Zhou et al. , 2020 ; Nguyen et al. , 2020 ) . Meanwhile , distributional RL has also enjoyed further benefits in risk-sensitive control , policy exploration settings ( Mavrin et al. , 2019 ; Rowland et al. , 2019 ) and robsutness ( Sun et al. , 2021 ) . Despite the existence of numerous algorithmic variants of distributional RL with remarkable empirical success , theoretical studies of advantages of distributional RL over expectation-based RL are less established . Existing works include ( Lyle et al. , 2019 ) that proved in many tabular and linear approximation settings , distributional RL behaves exactly the same as expectation-based RL . Lyle et al . ( 2021 ) investigated the impact of distributional RL from the perspective of representation dynamics . Martin et al . ( 2020 ) recently mapped distributional RL problems to a Wasserstein gradient flow problem , treating the distributional Bellman residual as a potential energy functional . Offline distributional RL ( Ma et al. , 2021 ) has also been proposed to investigate the efficacy of distributional RL in both risk-neutral and risk-averse domains . Recent works have tended towards closing the gap between theory and practice in distributional RL . From an algorithmic perspective , the Sinkhorn loss ( Sinkhorn , 1967 ) can be used to tractably approximate the Wasserstein distance and has been successfully applied in numerous crucial machine learning developments , including the Sinkhorn-GAN ( Genevay et al. , 2018 ) and Sinkhorn-based adversarial training ( Wong et al. , 2019 ) . Inspired by the distributional RL literature , Martin et al . ( 2020 ) argues for the use of a second-order stochastic dominance relation to select among a multiplicity of competing solutions via Sinkhorn iteration ( Sinkhorn , 1967 ) , which can be useful to manage stochastic uncertainty in RL paradigms . However , a Sinkhorn-based distributional RL algorithm has not yet to be formally proposed and investigated . In this paper , we theoretically illuminate the superiority of distributional RL over expectation-based RL from the perspectives of regularization , optimization , acceleration , and representation . Specifically , we simplify distributional RL as a neural Z-fitted iteration , within which we establish an equivalence between distributional RL and a form of entropy-regularized maximum likelihood estimation ( MLE ) . We also demonstrate that the resulting novel cross entropy regularization correlates strongly with the behavior of maximum entropy RL . By incorporating a histogram distributional loss , we further achieve stable optimization and guaranteed generalization of distributional RL , attributable to desirable smoothness properties of the distribution loss . We further characterize the effect of acceleration on distributional RL and discuss when distributional RL algorithms are effective in various environments . After gaining insights from the theoretical advantages of distributional RL , we further propose a novel distributional RL algorithm based on Sinkhorn loss that interpolates between the Wasserstein distance and maximum mean discrepancy ( MMD ) . Our approach allows us to find a trade-off that simultaneously leverages the geometry of the Wasserstein distance and the favorable high-dimensional sample complexity and unbiased gradient estimates of MMD . In summary , our analysis opens the door to a deeper understanding of theoretical advantage of distributional RL . 2 PRELIMINARY KNOWLEDGE . In the standard RL setting , an agent interacts with an environment via a Markov decision process ( MDP ) , a 5-tuple ( S , A , R , P , γ ) , where S and A are the state and action spaces , respectively . P is the environment transition dynamics , R is the reward function and γ ∈ ( 0 , 1 ) is the discount factor . State-value function vs. state-value distribution . Given a policy π , the discounted sum of future rewards is a random variable Zπ ( s , a ) = ∑∞ t=0 γ tR ( st , at ) , where s0 = s , a0 = a , st+1 ∼ P ( ·|st , at ) , and at ∼ π ( ·|st ) . In the control setting , expectation-based RL focuses on the state-value function Qπ ( s , a ) , which is the expectation of Zπ ( s , a ) , i.e. , Qπ ( s , a ) = E [ Zπ ( s , a ) ] . Distributional RL , on the other hand , focuses on the state-value distribution , the full distribution of Zπ ( s , a ) . Leveraging knowledge on the entire distribution can better capture the uncertainty of returns in the MDP beyond the expectation of return ( Dabney et al. , 2018a ; Mavrin et al. , 2019 ) . Bellman operators vs. distributional Bellman operators . For the policy evaluation in expectation-based RL , the value function is updated via the Bellman operator T πQ ( s , a ) = E [ R ( s , a ) ] + γEs′∼p , π [ Q ( s′ , a′ ) ] . In distributional RL , the state-value distribution of Zπ ( s , a ) is updated via the distributional Bellman operator Tπ TπZ ( s , a ) = R ( s , a ) + γZ ( s′ , a′ ) , ( 1 ) where s′ ∼ P ( ·|s , a ) and a′ ∼ π ( ·|s′ ) . From a theoretical perspective , both the Bellman operator T π in the policy evaluation setting and the Bellman optimality operator T in the control setting are contractive in the stationary policy case . In contrast , the distributional Bellman operator Tπ is contractive under certain distribution divergence metrics , but the distributional Bellman optimality operator T can only converge to a set of optimal non-stationary value distributions in a weak sense ( Elie & Arthur , 2020 ) . 3 EFFECT OF REGULARIZATION ON DISTRIBUTIONAL RL . Although the theoretical framework of distributional RL in the tabular setting has been basically established mentioned in Section 2 , the theoretical understanding of its advantages over expectationbased RL has been less studied . In this section , we attribute the superiority of distributional RL into its regularization effect . 3.1 DISTRIBUTIONAL RL : NEURAL Z-FITTED ITERATION . Neural Q-Fitted Iteration . In the function approximation setting , Deep Q Learning ( Mnih et al. , 2015 ) can be simplified into Neural Q-Fitted Iteration ( Fan et al. , 2020 ) under tricks of experience replay and the target network Qθ∗ , where we update parameterized Qθ ( s , a ) in each iteration k : Qk+1θ = argmin Qθ 1 n n∑ i=1 [ yi −Qkθ ( si , ai ) ] 2 , ( 2 ) where the target yi = r ( si , ai ) + γmaxa∈AQkθ∗ ( s ′ i , a ) is fixed within every Ttarget steps to update target network Qθ∗ by letting θ∗ = θ and the experience buffer induces independent samples { ( si , ai , ri , s′i ) } i∈ [ n ] . In an ideal case that neglects the non-convexity and TD approximation errors , we have Qk+1θ = T Qkθ , which is exactly the updating under Bellman optimality operator . Under the two conditions , the optimization problem in Eq . 2 can be viewed as Least Square Estimation ( LSE ) in a neural network parametric regression problem between the updating of target network Qθ∗ . Neural Z-Fitted Iteration . Analogous to neural Q-fitted iteration , we can also simplify value-based distributional RL methods based on a parameterized Zθ into a Neural Z-fitted Iteration as Zk+1θ = argmin Zθ 1 n n∑ i=1 dp ( Yi , Z k θ ( si , ai ) ) , ( 3 ) where the target Yi = R ( si , ai ) + γZkθ∗ ( s ′ i , πZ ( s ′ ) ) with πZ ( s′ ) = argmaxa′ E [ Zkθ∗ ( s ′ , a′ ) ] is fixed within every Ttarget steps to update target network Zθ∗ , and dp is a divergence metric between two distributions . Notably , the options of representation manner on Zθ and the metric dp are pivotal for the empirical success of distributional RL algorithms . For instance , QR-DQN ( Dabney et al. , 2018b ) approximates Wasserstein distance Wp , which leverages quantiles to represent the distribution of Zθ . C51 ( Bellemare et al. , 2017a ) represents Zθ via a categorical distribution under the convergence of Cramér distance ( Bellemare et al. , 2017b ; Rowland et al. , 2018 ) , a special case with p = 2 of the ` p distance ( Elie & Arthur , 2020 ) , while Moment Matching ( Nguyen et al. , 2020 ) learns deterministic samples to represent the distribution of Zθ based on Maximum Mean Discrepancy ( MMD ) . Contractive properties under typical metrics dp can be summarized as follows • T π is γ-contractive under the supreme form of Wassertein distance Wp . • T π is γ1/p-contractive under the supreme form of ` p distance . • T π is γα/2-contractive under MMD∞ with the kernel kα ( x , y ) = −‖x− y‖α , ∀α ∈ R. For the completeness , the definition of mentioned distances and the proof of contraction are provided in Appendix A . Although the widely used Kullback–Leibler ( KL ) divergence is not a contraction ( Morimura et al. , 2012 ) , we show in Proposition 1 that the KL divergence still enjoys desirable properties in distributional RL context , which can be reasonable for the theoretical analysis . We assume Zθ is absolutely continuous and has joint supports , under which the KL divergence is welldefined . Proof of Proposition 1 and the definition of supreme DKL are provided in Appendix B . Proposition 1 . Denote the supreme of DKL as D∞KL , we have : ( 1 ) Tπ is a non-expansive operator underD∞KL , i.e. , D ∞ KL ( T πZ1 , T πZ2 ) ≤ D∞KL ( Z1 , Z2 ) , ( 2 ) D∞KL ( Zn , Z ) → 0 impliesWp ( Zn , Z ) → 0 , ( 3 ) the expectation of Zπ is still γ-contractive , i.e. , ‖ETπZ1 − ETπZ2‖∞ ≤ γ ‖EZ1 − EZ2‖∞ . 3.2 DISTRIBUTIONAL RL : A NOVEL ENTROPY-REGULARIZED MLE . The reasonable properties of KL divergence in Proposition 1 allows us to leverage it to conduct the theoretical analysis . To separate the impact of additional distribution information from the expectation of Zπ , we leverage the variant technique of gross error model from robust statistics ( Huber , 2004 ) , similar to the technique to analyze Label Smoothing ( Müller et al. , 2019 ) and Knowledge Distillation ( Hinton et al. , 2015 ) . Specifically , we denote the one-dimensional full distribution of Zπ as F , and the distribution on the remaining support getting rid of E [ Zπ ] as Fµ . Hence , we can obtain the distribution decomposition for Zπ ( s , a ) as F s , a ( x ) = ( 1− ) 1 { x≥E [ Zπ ( s , a ) ] } ( x ) + F s , aµ ( x ) , ( 4 ) where controls the proportion of F s , aµ ( x ) and the indicator function 1 { x≥E [ Zπ ( s , a ) ] } = 1 if x ≥ E [ Zπ ( s , a ) ] , otherwise 0 . After taking derivatives on both sides , we attain the relationship of their density functions as ps , a ( x ) = ( 1 − ) δ { x=E [ Zπ ( s , a ) ] } ( x ) + µs , a ( x ) , where µs , a ( x ) is the density function related to Zπ ( s , a ) on remaining supports removing E [ Zπ ( s , a ) ] . It is worth noting that the existence of µs , a ( x ) can be simply guaranteed by directly computing µs , a ( x ) = ps , a ( x ) / − ( 1 − ) δ { x=E [ Zπ ( s , a ) ] } / as long as ps , a ( x ) and the expectation of Zπ ( s , a ) exist . Next , we use ps , a ( x ) and qs , aθ ( x ) to denote the density distributions behind { Yi } i∈ [ n ] and Zkθ ( s , a ) in neural Zfitted iteration via Eq . 3 , respectively . Therefore , we can derive the following result in Proposition 2 . Proposition 2 . Let H ( P , Q ) as the cross entropy , i.e. , H ( P , Q ) = − ∫ x∈X P ( x ) logQ ( x ) dx . Let α be a positive constant , and based on the decomposition in Eq . 4 and DKL as dp , Neural Z-fitted iteration in Eq . 3 can be reformulated as Zk+1θ = argmin Zθ 1 n n∑ i=1 H ( δ { x=E [ Zπ ( si , ai ) ] } , q si , ai θ ) + αH ( µ si , ai , qsi , aiθ ) . ( 5 ) We provide the proof in Appendix C. For the uniformity of notation , we still use s , a in the following analysis instead of si , ai in Eq . 5 . Importantly , the first term in Eq . 5 can be further simplified as − ∫ x∈X log q s , a θ ( E [ Z ( s , a ) ] ) . Minimizing this first term can be viewed as a variant of Maximum Likelihood Estimation ( MLE ) on the expectation E [ Z ( s , a ) ] rather than the traditional MLE directly on observed samples . The cross entropy regularization in the second term pushes qs , aθ to approximate the distribution µs , a in order to fully utilize the additional distributional information while learning , serving as the key to the superiority of distributional RL . This novel cross entropy regularization regarding µs , a and qs , aθ is different from the classical entropy regularization used in RL , which we further analyze their connection and discrepancy in Section 3.3 . In summary , distributional RL can be simplified as a novel entropy-regularized MLE within neural Z-fitted iteration framework in stark contrast to the Least-Square estimation of expectation-based RL in the neural Q-fitted iteration . | Distributional reinforcement learning (DRL) is a family of RL algorithms that estimates distributions of the value function rather than the expectation. The first part of the paper interprets distributional RL as adding a cross-entropy regularizer to the traditional objective. The second part discusses several advantages of DRL over expectation-based RL, including more stable optimization, better sample efficiency, and better state representations. The last part proposes a new distributional RL algorithm based on Sinkhorn loss, aiming to leverage the nice geometric interpretation of Wasserstein distance and sample complexity of Maximum Mean Discrepancy. | SP:2b070b11752ea3815dc7e4edec978b8de9d9e85e |
DEEP GRAPH TREE NETWORKS | 1 INTRODUCTION . Graph Neural Networks ( GNNs ) , a class of neural networks for learning on graph structured data , have been successfully applied in many areas to solve real world problems , such as link predictions in social networks ( Fan et al. , 2019 ) , pattern recognition ( Ju et al. , 2020 ; Shi & Rajkumar , 2020 ) , product recommendation and personalized search in E-commerce ( Zhu et al. , 2019 ) , fraud detection ( Wang et al. , 2019a ; Dou et al. , 2020 ) , protein interface predictions ( Fout et al. , 2017 ) , power estimation and tier design in the semiconductor industry ( Zhang et al. , 2020 ; Lu et al. , 2020 ) , traffic forecasting ( Yu et al. , 2017 ) , and natural language processing ( Yao et al. , 2019 ; Vashishth et al. , 2020 ; Wu et al. , 2021 ) . Among many different graph learning approaches , the class of spatial graph convolution based models , which adopts a message passing scheme to update node features , has gained particular attention due to its simplicity yet good performance . The most representative work among this class is the Graph Convolutional Network ( GCN ) ( Kipf & Welling , 2017 ) which limits the ChebNet ( Defferrard et al. , 2016 ) up to the 1st order polynomial , and together with some further approximation leading to a direct neighbor aggregation . The success of the GCN model ( Ying et al. , 2018 ; Hu et al. , 2020b ) has led to the rapid development in spatial convolution based models , such as the Graph Attention Network ( GAT ) ( Velickovic et al. , 2018 ) , GraphSage ( Hamilton et al. , 2017 ) , APPNP ( Klicpera et al. , 2018 ) , DAGNN ( Liu et al. , 2020 ) , and etc . Today the vanilla GCN and GAT are the two most popular baseline models . One GCN or GAT layer aggregates only the direct neighbor nodes . Although they work well in many test cases , their performance degrades as stacking multiple propagation layers to achieve larger receptive fields . Xu et al . ( 2018 ) and Li et al . ( 2018 ) attribute such degradation in performance to over-smoothing effect that nodes from different classes become indistinguishable , while Liu et al . ( 2020 ) attributes that to the intertwined propagation and transformation . A small neighborhood may not provide enough information especially when nodes are sparsely labeled ( Klicpera et al. , 2018 ; Liu et al. , 2020 ) . Many recent work has been devoted to extending the size of neighborhood utilized in graph learning . APPNP ( Klicpera et al. , 2018 ) and DAGNN ( Liu et al. , 2020 ) are two most recent deep graph models with state-of-the-art performance on several popular benchmark datasets . APPNP ( Klicpera et al. , 2018 ) is developed based on personalized PageRank to preserve local information which requires fine tuning of a teleport probability . DAGNN ( Liu et al. , 2020 ) aggregates neighbors from different hops in parallel ( in one layer ) to utilize information from a larger receptive field as compared to GCN . Although DAGNN has achieved state-of-the-art performance , it may only be applicable to adopt simple aggregation function as the one used in GCN . It could be computationally challenging to combine such multi-hop aggregation scheme with attention-based GNN models ( such as GAT , and graph transformer ( Dwivedi & Bresson , 2020 ; Hu et al. , 2020c ) ) ; because this aggregation scheme requires computation of the attention weight for each pair of a node and its k-hop neighbor , which could be a too large number . In the aggregation of k-hop neighborhood , the number of attention weights is the total number of non-zero entries in the kth power of the graph adjacency matrix A . Although the adjacency matrix is usually sparse , its kth power could be non-sparse especially for undirected graphs . For example , in the Cora dataset ( Wang et al. , 2019b ) A5 has ∼2.2 million non-zero entries while A has only ∼10k non-zero entries . Furthermore , aggregating multi-hop neighborhood in one step neglects path information which is usually important for heterogeneous graphs with rich metapath information ( Fu et al. , 2020 ; Wang et al. , 2019c ) . We propose Graph Tree Networks ( GTreeNets ) , a self-interpretive deep graph neural network architecture which originates from the tree representation of graphs . In the tree representation , each node forms its own tree where the node itself is the root node and all its neighbors up to k-hop are the subnodes . Under the tree representation , message propagates upward from the leaf nodes to the root node naturally to update the root node ’ s hidden features . This message passing scheme , which has better interpretability , is essentially different from that in the vanilla Graph Convolution Network ( GCN ) , Graph Attention Network ( GAT ) and many of their derivatives . Two scalable graph learning models are proposed within this GTreeNet architecture - Graph Tree Convolution Network ( GTCN ) and Graph Tree Attention Network ( GTAN ) , with experimentally demonstrated state-ofthe-art performance on several benchmark datasets and the capability of going deep by stacking multiple propagation layers . Our models do not require finely-tuned hyperparameter in the propagation scheme . This work is structured as follows . Section 2 illustrates the architecture of our Graph Tree Networks ( GTreeNets ) and two derivative graph learning models - Graph Tree Convolution Network ( GTCN ) and Graph Tree Attention Network ( GTAN ) , along with the analysis of model complexity . Section 3 presents the experimental results including three parts : Section 3.1 shows the performance test of our GTCN and GTAN models as compared to several popular and state-of-the-art GNN models on five benchmark datasets . Section 3.2 shows the performance test for our GTCN and GTAN models at different depths as compared to the vanilla GCN and GAT models . Section 3.3 discusses the effect of adding transformation in propagation layers in our GTCN and GTAN models . We conclude our work in Section 4 and discuss insights for future work . 2 OUR APPROACH : GRAPH TREE NETWORKS . We first introduce notations used throughout this paper . We follow the general convention to use bold uppercase and lowercase to represent matrices and vectors , respectively . The topology of a graph G = ( V , E ) with nodes V and edges E can be fully described by its adjacency matrix A and degree matrix D. |V | = N and |E| = M are the number of nodes and edges , respectively . Nu denotes the set of direct neighbors ( 1-hop neighbors ) of node u. X ∈ RN×D represents the feature map for all nodes , where each row xu ∈ RD represents the feature vector of node u with dimension of D. Y ∈ RN×C represents the class matrix for all nodes , where each row yu represents the class vector of node u with C classes . 2.1 TREE REPRESENTATION AND NETWORK STRUCTURE . Tree is a straightforward representation for the graph topology , where each node and its neighborhood form one tree with the node itself being the root node and its neighbors being the subnodes . Figure 1 illustrates the tree representation for node 1 with up to 3-hop neighbors in the sample graph . We use a directed graph just for illustration , the tree representation also works for undirected graphs . In Figure 1 , hku ∈ RF is the vector of node u ’ s output hidden features at k-hop away from the root node 1 . The final output of the root node 1 is denoted as h01 . Messages propagate upward from subnodes to the root node hop by hop in the tree . Nodes may occur multiple times at the same level in the tree ( like node 5 occurring twice at 2-hop as shown in Figure 1 ) , each of them is from a different k-hop path that may pass different messages to the root node . We assume a node u at any k-hop preserves its initial information prior to receiving information from its child nodes . With this assumption , a node ’ s features are updated by aggregating its child nodes and its own initial features in the tree representation . This tree representation of graphs leads to a new graph learning architecture - Graph Tree Networks ( GTreeNets ) as shown in Appendix A.1 , with the general message passing rule formulated as Equation 1 : hku = fk ( aggregate ( ϕ ( xu ) , { hk+1v , ∀v ∈ Nu } ) ) ( 1 ) where k = L−1 , . . . , 0 . L is the tree depth ( number of propagation layers ) . xu is the vector of input features of node u. zu = ϕ ( xu ) is the transformation of input features of node u , i.e . the initial hidden features for the propagation layer . hku is the vector of hidden features of node u at k-hop , and hLu = zu . fk ( · ) is a hop-wise ( layer-wise ) transformation function such as MLP . Combination of different aggregation function and transformation function in Equation 1 derives various graph learning models under the GTreeNet architecture . We propose two graph tree models in Section 2.2 and 2.3 : Graph Tree Convolution Network ( GTCN ) and Graph Tree Attention Network ( GTAN ) . 2.1.1 RELATION TO PROPAGATION SCHEME IN GCN-LIKE MODELS . The general message passing rule in GCN-like models such as GCN ( Kipf & Welling , 2017 ) , GAT ( Velickovic et al. , 2018 ) , and GraphSage ( Hamilton et al. , 2017 ) is hnu = fn−1 ( aggregate ( hn−1u , { hn−1v , ∀v ∈ Nu } ) ) ( 2 ) Comparing to Equation 1 , it is notable that the message passing scheme in our proposed GTreeNet is essentially different from the one adopted by the GCN-like models . In GTreeNet , we update a node ’ s hidden features by aggregating its neighbor ’ s hidden features and its own initial features . While in GCN-like models , a node ’ s hidden features are updated by aggregating its neighbor ’ s hidden features and its own hidden features from the last propagation layer . Our propagation scheme preserves the local information when stacking multiple propagation layers while the propagation scheme in GCNlike models does not . Note that we use n to denote the propagation layer number in Equation 2 to avoid ambiguities . 2.2 GRAPH TREE CONVOLUTION NETWORK . The propagation rule of our proposed Graph Tree Convolution Network is hku = ∑ v∈Nu Âuvh k+1 v + Âuuzu ( 3 ) where  = D̃− 1 2 ÃD̃− 1 2 is the symmetric normalized adjacency matrix1 . à = ( A+ I ) is the adjacency matrix with added self-loops . D̃ is the degree matrix with self-loops where D̃uu =∑ v Ãuv . zu = MLP ( xu ) . 1We find that using  = D̃−1à yields similar performance . As compared to the general propagation rule in GTreeNet shown in Equation 1 , our GTCN model uses an MLP as the transformation function ϕ ( · ) , an identity function as fk ( · ) , and a weighted sum function as the aggregation function with weights being the elements of the normalized adjacency matrix . The mathematical description of our GTCN model is then formulated as Z = MLP ( X ) HL = Z Hk = A1H k+1 +A2Z , k = L− 1 , L− 2 , . . . , 0 Yout = softmax ( H0W ) ( 4 ) where Z ∈ RN×F is the initial hidden feature map obtained by applying an MLP to the input feature map X . Hk ∈ RN×F is the hidden feature map at the kth hop . A1 and A2 are the non-diagonal and diagonal component of the normalized adjacency matrix , respectively . W ∈ RF×C is the trainable weight matrix . Note that our model separates the transformation from propagation with no trainable parameters required in the propagation layers . By aggregating a node ’ s neighbor information with its own initial information , we always preserve the local information of a node . These two characteristics make our model capable of going deep without comprising performance as demonstrated in Section 3.2 . | The paper studies the task of network embedding. The authors propose a Graph Tree Networks (GTree), a deep graph neural network architecture that originates from the tree representation of the graphs. In particular, the proposed approach conduct message passing upward from the leaf nodes to the root node to update the root node’s hidden features. Experiment validates the effectiveness of the proposed model, | SP:273f61a567b01deba29b28d377925fc9968ea69b |
Graph Attention Multi-layer Perceptron | 1 INTRODUCTION . Graph Neural Networks ( GNNs ) generalize convolutional neural networks to graph-structured data and have achieved great success in a wide range of tasks , including node classification , link prediction , and recommendation . ( Kipf & Welling , 2016 ; Hamilton et al. , 2017 ; Bo et al. , 2020 ; Cui et al. , 2020 ; Fan et al. , 2019 ) . Through stacking K graph convolution layers , GNNs learn node representations by utilizing information from the K-hop neighborhood and thus enhance the performance by getting more unlabeled nodes involved in the training process . In such a GNN model , the nodes within the K-hop neighborhood of a specific node are called this node ’ s Receptive Field ( RF ) . As the size of RF grows exponentially to the number of GNN layers , the rapidly expanding RF incurs high computation and memory costs in a single machine . Besides , even in a distributed environment , GNN has to pull a great number of neighboring node features to compute the representation of each node , leading to high communication cost ( Zheng et al. , 2020 ) . Many recent advancements towards scalable GNNs are based on model simplification . For example , Simplified GCN ( SGC ) ( Wu et al. , 2019 ) decouples the feature propagation and the non-linear transformation process , and the former is executed during pre-processing . Unlike the sampling-based methods ( Hamilton et al. , 2017 ) , which still need feature propagation during each training epoch , this time-consuming process in SGC is only executed once , and only the nodes of the training set are involved in the training process . As a result , SGC is computation and memory-efficient in a single machine and scalable in distributed settings since it does not require each machine to fetch neighboring node features during the model training process . Despite the high efficiency and scalability , SGC simply preserves a fixed RF for all the nodes by assigning them the same feature propagation depth . Such a fixed propagation mechanism in SGC disables its ability to exploit knowledge within neighborhoods of different sizes . Lines of other simplified models have been proposed to learn better node representations exploiting multi-scale knowledge . SIGN ( Frasca et al. , 2020 ) proposes to concatenate all the propagated features without information loss , while S2GC ( Zhu & Koniusz , 2021 ) averages all these propagated features to generate the combined feature . Although multi-scale knowledge is considered , the importance and correlations between multiple scales are ignored . Being the first attempt to explore the correlations between different scales of knowledge , GBP ( Chen et al. , 2020b ) adopts a heuristic constant decay factor for the weighted average for propagated features at different propagation steps . Motivated by Personalized PageRank , the large-scale features has a higher risk of over-smoothing , and they will contribute less to the combination in GBP . Unfortunately , the coarse-grained , layer-wise combination prevents these methods from unleashing their full potential . As shown in Figure 1 ( a ) , different nodes require different propagation steps to achieve optimal predictive accuracy . Besides , assigning the same weight distribution to propagated features along with propagation depth to all the nodes may be unsuitable due to the inconsistent RF expansion speed shown in Figure 1 ( b ) . However , nodes in most existing GNNs are restricted to a fixed-hop neighborhood and insensitive to the actual demands of different nodes . This imperfection either makes that long-range dependencies can not be fully leveraged due to limited hops/layers or loses local information by introducing many irrelevant nodes into the receptive fields for many nodes when increasing the number of propagation depth ( Chen et al. , 2020a ; Li et al. , 2018 ; Xu et al. , 2018 ) . The above observations motivate us to explicitly learn the importance and correlation of multiscale knowledge in a node-adaptive manner . To this end , we develop a new architecture – Graph Attention Multi-Layer Perceptron ( GAMLP ) – that could automatically exploit the knowledge over different neighborhoods at the granularity of nodes . GAMLP achieves this by introducing two novel attention mechanisms : Recursive attention and Jumping Knowledge ( JK ) attention . These two attention mechanisms can capture the complex correlations between propagated features at different propagation depths in a node-adaptive manner . Consequently , our architecture has the same benefits as the existing simplified and scalable GNN models while providing much better performance derived from its ability to utilizes a node-adaptive receptive field . Moreover , the proposed attention mechanisms can be applied to both node features and labels over neighborhoods with different sizes . By combining these two categories of information together , GAMLP could achieve the best of both worlds in terms of accuracy . Our contributions are as follows : ( 1 ) New perspective . To the best of our knowledge , we are the first to explore both node-adaptive feature and label propagation schemes for scalable GNNs . ( 2 ) Novel method . We propose GAMLP , a scalable , efficient , and deep graph model . ( 3 ) State-of-the-art performance . Experimental results demonstrate that GAMLP achieves state-of-theart performance on 12 benchmark datasets while maintains high scalability and efficiency . In particular , GAMLP outperforms the competitive baseline GraphSAINT ( Zeng et al. , 2020 ) in terms of accuracy by a margin of 0.42 % , 3.02 % and 0.44 % on PPI , Flickr , and Reddit datasets under the inductive setting , while achieving up to 45× training speedups in the large ogbn-products dataset . Remarkably , under the transductive setting in large OGB datasets , the accuracy of GAMLP exceeds the current state-of-the-art method by 1.03 % and 1.32 % on the ogbn-products and ogbn-papers100M datasets , respectively . 2 PRELIMINARIES . 2.1 PROBLEM FORMULATION . We consider an undirected graph G = ( V , E ) with |V| = n nodes , |E| = m edges , and c different node classes . We denote by A the adjacency matrix of G , weighted or not . Nodes can possibly have features vector of size f , stacked up in an n × f matrix X . D = diag ( d1 , d2 , · · · , dN ) ∈ Rn×n denotes the degree matrix of A , where di = ∑ vj∈V Aij is the degree of node vi . Suppose Vl is the labeled set , and our goal is to predict the labels for nodes in the unlabeled set Vu with the supervision of Vl . 2.2 SCALABLE GNNS . Sampling . A commonly used method to tackle the scalability issue ( i.e. , the recursive neighborhood expansion ) in GNN is sampling . As a node-wise sampling method , GraphSAGE ( Hamilton et al. , 2017 ) randomly samples a fixed-size set of neighbors for computation in each mini-batch . VRGCN ( Chen et al. , 2018a ) analyzes the variance reduction , and it reduces the size of samples with additional memory cost . For the layer-wise sampling , Fast-GCN ( Chen et al. , 2018b ) samples a fixed number of nodes at each layer , and ASGCN ( Huang et al. , 2018 ) proposes the adaptive layer-wise sampling with better variance control . In the graph level , Cluster-GCN ( Chiang et al. , 2019 ) firstly clusters the nodes and then samples the nodes in the clusters , and GraphSAINT ( Zeng et al. , 2020 ) directly samples a subgraph for mini-batch training . Orthogonal to model simplification , sampling has already been widely used in many GNNs and GNN systems ( Zheng et al. , 2020 ; Zhu et al. , 2019 ; Fey & Lenssen , 2019 ) . However , these sampling-based GNNs are imperfect because they still face high communication costs , and the sampling quality highly influences the model performance . Graph-wise Propagation . Recently studies have observed that non-linear feature transformation contributes little to the performance of the GNNs as compared to feature propagation . Thus , a new direction recently emerging for scalable GNN is based on the simplified GCN ( SGC ) ( Wu et al. , 2019 ) , which successively removes nonlinearities and collapsing weight matrices between consecutive layers . This reduces GNNs into a linear model operating on K-layers propagated features : X ( K ) = ÂKX ( 0 ) , Y = softmax ( ΘX ( K ) ) , ( 1 ) where X ( 0 ) = X , X ( K ) is the K-layers propagated feature , and  = D̃r−1ÃD̃−r . By setting r = 0.5 , 1 and 0 ,  represents the symmetric normalization adjacency matrix D̃−1/2ÃD̃−1/2 ( Klicpera et al. , 2019 ) , the transition probability matrix ÃD̃−1 ( Zeng et al. , 2020 ) , or the reverse transition probability matrix D̃−1à ( Xu et al. , 2018 ) , respectively . As the propagated features X ( K ) can be precomputed , SGC is more scalable and efficient for the large graph . However , such graph-wise propagation restricts the same propagation steps and a fixed RF for each node . Therefore , some nodes ’ features may be over-smoothed or under-smoothed due to the inconsistent RF expansion speed , leading to non-optimal performance . Layer-wise Propagation . Following SGC , some recent methods adopt layer-wise propagation to combine the features with different propagation layers . SIGN ( Frasca et al. , 2020 ) proposes to concatenate the propagated features at different propagation depth after simple linear transformation : [ X ( 0 ) W0 , X ( 1 ) W1 , ... , X ( K ) WK ] . S2GC ( Zhu & Koniusz , 2021 ) proposes the simple spectral graph convolution to average the propagated features in different iterations as X ( K ) = K∑ l=0 ÂlX ( 0 ) . In addition , GBP ( Chen et al. , 2020b ) further improves the combination process by weighted averaging as X ( K ) = K∑ l=0 wl lX ( 0 ) with the layer weight wl = β ( 1− β ) l. Similar to these works , we also use a linear model for higher training scalability . The difference lies in that we consider the propagation process from a node-wise perspective and each node in GAMLP has a personalized combination of different steps of the propagated features . 2.3 LABEL UTILIZATION ON GNNS .. Labels of training nodes are conventionally only used as supervision signals in loss functions in most graph learning methods . However , there also exist some graph learning methods that directly exploit the labels of training nodes . Among them , the label propagation algorithm ( Zhu & Ghahramani , 2002 ) is the most well-known one . It simply regards the partially observed label matrix Y ∈ RN×C as input features for nodes in the graph and propagates the input features through the graph structure , where C is the number of candidate classes . UniMP ( Shi et al. , 2020 ) proposes to map the partially observed label matrix Y to the dimension of the node feature matrix X and add these two matrices together as the new input feature . To fight against the label leakage problem , UniMP further randomly masks the training nodes during every training epoch . Instead of using only the hard training labels , Correct & Smooth ( Huang et al. , 2020 ) first trains a simple model such as an MLP and gets this model ’ s predicted soft labels for unlabeled nodes . Then , it propagates the learning errors on the labeled nodes to connected nodes and smooths the output in a Personalized PageRank manner like APPNP ( Klicpera et al. , 2019 ) . Besides , SLE ( Sun & Wu , 2021 ) decouples the label utilization procedure in UniMP , and executes the propagation in advance . Unlike UniMP , “ label reuse ” ( Wang et al. , 2021 ) concatenates the partially observed label matrix Y with the node feature matrix X to form the new input matrix . Concretely , it fills the missing elements in the partially observed label matrix Y with the soft label predicted by the model , and this newly generated Y′ is again concatenated with X and then fed into the model to generate new predictions . | The paper proposed the Graph Attention Multi-Layer Perceptron (GAMLP) model that combines features extracted from two streams: 1) node-adaptive features that are obtained via "Graph-wise / layer-wise propagation" (Section 2.2), 2) features obtained from label propagation. The author also proposed two ways for performing the node-adaptive attention: JK attention, and Recursive attention (Section 3.3). Extensive experiments are conducted on 9 transductive datasets and 3 inductive datasets. The results show that the proposed GAMLP(JK) and GAMLP(R) can outperform the baselines. | SP:63893c44301c897bc9fc5b539ad2ab3f478b015e |
Intervention Adversarial Auto-Encoder | In this paper we propose a new method to stabilize the training process of the latent variables of adversarial auto-encoders , which we name Intervention Adversarial auto-encoder ( IVAAE ) . The main idea is to introduce a sequence of distributions that bridge the distribution of the learned latent variable and its prior distribution . We theoretically and heuristically demonstrate that such bridge-like distributions , realized by a multi-output discriminator , have an effect on guiding the initial latent distribution towards the target one and hence stabilizing the training process . Several different types of the bridge distributions are proposed . We also apply a novel use of Stein variational gradient descent ( SVGD ) ( Liu & Wang , 2016 ) , by which point assemble develops in a smooth and gradual fashion . We conduct experiments on multiple real-world datasets . It shows that IVAAE enjoys a more stable training process and achieves a better generating performance compared to the vanilla Adversarial auto-encoder ( AAE ) ( Makhzani & Shlens , 2015 ) . 1 INTRODUCTION . Generative models are widely used for image and texture production . Among them there are two base models which are most appealing to scholars for their elegant theoretical foundation and close combination with neural network , namely Variational Auto-encoders ( VAE ) ( Kingma & Welling , 2013 ) and Generative adversarial network ( GAN ) ( Goodfellow et al. , 2014 ) . VAE maximizes a lower bound of the log-likelihood called ELBO which decomposes to a reconstruction loss term and a regularization term within an auto-encoder structure . GAN , however , goes beyond the likelihood concern , trying to generate data directly using a learned map from the latent space that is trained in an adversarial manner . Both models have some weakness . For example , GAN ’ s training is quite unstable and sometimes may have mode collapse problem . VAE usually produces less sharp pictures . The regularity of the latent space is also an important concern for VAE that affects the quality of the generated images . There ’ re many attempts to alleviate the above drawbacks . Adversarial Auto-encoders ( AAE ) combines the techniques of both VAE and GAN network . It imposes a discriminator on the latent space of an auto-encoder to classify the latent distribution p ( z ) and q ( z ) , where the adversarial term serves as the regularizer . Such choice improves the regularization effect of the latent variable and alleviates the mode collapse problem due to an auto-encoder structure . Wasserstein Auto-Encoders ( WAE ) ( Tolstikhin et al. , 2017 ) generalize different regularization approaches on latent space , proposing adversarial method ( WAE-GAN ) and kernel based method ( WAE-MMD ) . It provides AAE with theoretical support as well . Intervention Generative Adversarial Network ( IVGAN ) ( Liang et al. , 2020 ) , another attempt to combine GAN with the encoder structure , stabilizes GAN ’ s training process by intervening on the latent distribution so that the reconstructed data distribution could approach the target more robustly . In this work , we will propose this novel regularization method on AAE models . As basically an autoencoder structure , the key question is how to let the original distribution in latent space approach the prior distribution . We intervened on the encoded data , which inherently brings intervened distribution . We will show that a loss term in our model can be transformed to a certain measure of the overlap among multiple distributions . When minimizing the loss in terms of these constructed variables , we expect not only the original distribution to approach the target one , but the distribution of the intervened data ( we call bridge distribution ) to serve as a guidance to have such approaching process more fast and robust as well . 2 METHODOLOGY . Training a GAN model has always been a challenge ( e.g. , the process is known to be unstable and prone to mode collapse ) . AAE ’ s auto-encoder structure alleviates the problem with a reconstruction term . It first updates the auto-encoder upon the reconstruction loss , then use the discriminator to distinguish the encoded latent variables and generated ones following Gaussian distribution , updating the discriminator and encoder in an adversarial manner . However , such architecture doesn ’ t completely solve GAN ’ s problem . Decreasing the JS divergence has a relatively low approaching efficiency between two distributions . Adversarial training on latent space doesn ’ t avoid this problem at all . Therefore there ’ s a desire to apply a more powerful regularization term to have the approaching process more efficiently and stable . We consider to construct a series of “ bridge distributions ” by certain transformations so that they in a sense lie between the encoded distribution and target one . We let the discriminator to classify these multiple distributions , and update the encoder to let them approach each other . Intuitively such bridge distributions would serve as a guidance to help the latent variables follow the target distribution more quickly and robustly , but we need more theoretical arguments first . Before we expound on further details , we want to turn our attention to how to construct the transformations mentioned above . We first explain the meaning of intervention . It is similar to what is exhibited in IVGAN ( Liang et al. , 2020 ) . For completeness we show it here in our context . Definition 1 Let X be the set of all random variables in Rd on the probability space ( Ω , X , P ) . T is the set of all mappings from Rd to Rd . For a distribution function with support in Rd , we call T ∈ T “ P-intervention ” if X ∼ P ⇒ T ( X ) ∼ P , for all X ∈ X . If S ∈ T satisfies that T ( X ) ∼ P , ∀T ∈ S ⇒ X ∼ P , we denote S “ Complete Intervention Group ” . A rough understanding of the above definition is that complete intervention group let the meet of subsequent multiple distributions embed their final distributing pattern , i.e . P ( x ) . Combining the idea in our model , the intervention can be performed on our encoded data . We hope when these originally different distributions approach each other , they all approach the prior distribution , which is exactly the feature of the transformation proposed above . Therefore the complete intervention group can serve to ensure the identifiability of our method . To be more concrete , we set the P to be standard Gaussian and propose several intervention patterns that possess the above feature . A simplest example of P-intervention is to replace some of the dimension with normal distributed one . Therefore we have our Blockwise substitution : Rd space is divided equally by t parts , where t|d . , For 0 ≤ k ≤ t , let Tk be the transformation that substitute the first k blocks with random variables following standard normal distribution independent with the original variable . Then we get a complete intervention group { Tk } . There ’ s other ways to create intervention groups . For example , we let x be replaced by xcos ( kπ2t ) + zsin ( kπ2t ) , for k = 0 , 1 , ... , t , where z follows standard normal distribution independent with x . We call such construction pattern Radial substitution . Except for the two substitution method , we also apply Stein variational gradient descent ( SVGD ) ( Liu & Wang , 2016 ) to construct the bridge distribution by iteratively updating points . By setting the target distribution P the updated particles will approximately approach P. More details will be specified in the next section . Now we propose our model called Intervention Adversarial Auto-Encoder ( IVAAE ) . [ Figure 1 ] shows its specific structure , which contains an encoder E , decoder G and a discriminator D. Images x is fed into the E to get the encoded latent code z , which is decoded by G to obtain the reconstructed images x . The encoded z is transformed by a complete intervention group Tk ( T0 represent the identical mapping ) to get zk which is discriminated by D with output of size t + 1 . Through maximizing and minimizing alternatively a cross entropy loss , D and E is both updated . Intervention Loss The key distinction of our model from AAE is the intervention loss . More specifically , when encoded latent z = E ( x ) is obtained , for every k , 0 ≤ k ≤ t , we intervene z by Tk to get zk . Then we feed zk into the discriminator to obtain a t + 1 size output d , and compute the cross entropy between d and labels ek , averaging on k , finally to update discriminator by gradient flow . The encoder update in the same manner . Therefore the intervention loss is an unbiased estimator of its theoretical form as follow : LIV ( E , D ) = −Ek∼U [ t ] Ex∼pdata [ log ( Dk ( Tk ( E ( x ) ) ) ) ] = −Ek∼U [ t ] Ez∼pk [ log ( Dk ( z ) ) ] ( 1 ) where Dk , pk represent the ( k + 1 ) th digit of D output , the distribution of zk = Tk ( E ( x ) ) , respectively . Then we give theoretical results that evidence the rationality of our proposed models . Theorem 2 Given t + 1 latent variables { zk } tk=0 with density function support in Rd , and their probabilistic density function { pk } tk=0 , the classifier D is trained to minimize the cross entropy loss as equation 1 under the constraint that ∑t i=0Dj ( z ) = 1 . Then the optimal classifier satisfies : D∗i ( z ) = pi ( z ) ∑t j=0 pj ( z ) And the corresponding optimal intervention loss can be expressed as follows : LIV ( E , D ) = −JS ( p0 , p2 , ... , pt ) + log ( t+ 1 ) where JS ( q1 , q2 , ... , qk ) = 1k ∑k j=1 ( KL ( qj ||q ) ) , q = 1 k ∑k j=1 qj . Proof : See Appendix . Theorem 2 tells us that when the discriminator reaches optimal , the intervention loss can be regarded as a certain distance among multiple distributions . We know when t = 1 , the loss becomes the original JS divergence which conforms with GAN . However , it is known that JS divergence isn ’ t a perfect measure because the gradient would be zero if two variables have distributions with disjoint support . According to the theorem , situation for multiple distributions will suffer less from such problem , for bridge distributions provide greater chances for intersection which consequently produces gradient . Therefore it would be more stable to update the encoder . We now further illustrate the advantage of the multi-object adversarial training . Although GAN ’ s convergence has been theoretically proved ( Goodfellow et al. , 2014 ) , the training process , is wellknown delicate and unstable . One important reason is that the optimal discriminator can always achieve too perfect no matter how close it is between the generated data manifold and the real data manifold ( Arjovsky & Bottou , 2017 ) . One cause for this is that two manifolds is disjoint with probability 1 due to their low dimension ( Arjovsky & Bottou , 2017 ) on the data space . Algorithm 1 Intervention Adversarial Auto-Encoder ( IVAAE ) Input : learning rate : α , dimension of the space : d , number of bridge distributions : t Interventions : Tk , 0 ≤ k ≤ t , hyperparameters : λ , µ1 , µ2 , minibatch size : m. Output : θD , θE , θG 1 : for number of training iterations do 2 : Sample { xj } mj=1 from the training set 3 : Sample { zj } mj=1 from the prior P ( z ) 4 : Compute ẑj = E ( xj ) , j = 1 , ... , m 5 : Compute x̂j = G ( ẑj ) , j = 1 , ... , m 6 : for k = 0 , ... , t do 7 : Compute the intervened latent variables 8 : ẑjk = Tk ( ẑj ) , j = 1 , ... , m 9 : end for 10 : Update the parameters of D by : 11 : θD ← θD + αmtµ1∇θD ∑m j=1 ∑t k=0 logDk ( ẑjk ) 12 : Calculate L̂recon , L̂IV 13 : Update the parameters of G by : 14 : θG ← θG + αm∇θGλL̂recon 15 : Update the parameters of E by : 16 : θE ← θE + αm∇θG { λL̂recon + µ2L̂IV } 17 : end for 18 : return θD , θE , θG Different from GAN , AAE applies discriminator on the latent distribution , therefore what it learns isn ’ t a low-rank manifold , but a continuous distribution with full dimension . But the problem doesn ’ t get solved in AAE setting . We address it in a heuristic way . We run AAE on real-world dataset for 50 epochs , then fix the encoder and decoder and update the discriminator alone . We observe how perfect the discriminator will develop . Figure 2 records the changing curve of adversarial loss every iteration . According to Figrue 2 , the adversarial loss still decreases remarkably toward 0 , especially when latent dimension goes high . That ’ s because of the limit batch size . IVAAE could alleviate this problem by boosting the difficulty for discriminator to classify more than two distributions and equivalently introducing more particles . We apply our models IVAAE . We choose t = 4 , blockwise substitution , with the rest of structure all the same as the AAE model . The loss is recorded with fixed encoder and decoder after 50 epochs , too . We note that although the adversarial loss is decreasing as well , the drop is much more moderate than AAE . We also examine the consequence of such loss decline . We choose the adversarial loss for encoder : −Epdata [ log ( D ( E ( x ) ) ) ] , and record the gradient norm of the encoder after the encoder and decoder fixed . According to Figure 3 , AAE is less stable compared to IVAAE . | This paper presents Intervention Adversarial auto-encoder to stabilize the training process of the latent variables of adversarial auto-encoders. Intervention Adversarial auto-encoder adopts a sequence of distributions to bridge the distribution of the learned latent variable and its prior distribution. The bridge distributions are implemented by a multi-output discriminator, which guides the initial latent distribution to the target distribution with a stable training process. The paper discusses several different types of the bridge distributions and applies Stein variational gradient descent. Experiments on multiple real-world datasets are conducted. | SP:033d1dbd758aecb992c0cb3ae49cd06335f2d2a4 |
Graph Piece: Efficiently Generating High-Quality Molecular Graphs with Substructures | Molecule generation , which requires generating valid molecules with desired properties , is a fundamental but challenging task . Recent years have witnessed the rapid development of atom-level auto-regressive models , which usually construct graphs following sequential actions of adding atom-level nodes and edges . However , these atom-level models ignore high-frequency substructures , which not only capture the regularities of atomic combination in molecules but are also often related to desired chemical properties , and therefore may be sub-optimal for generating high-quality molecules . In this paper , we propose a method to automatically discover such common substructures , which we call graph pieces , from given molecular graphs . We also present a graph piece variational autoencoder ( GPVAE ) for generating molecular graphs based on graph pieces . Experiments show that our GP-VAE models not only achieve better performance than the state-ofthe-art baseline for distribution-learning , property optimization , and constrained property optimization tasks but are also computationally efficient . 1 INTRODUCTION . Molecule generation is a task that aims to produce chemically valid molecules with optimized properties . It is important for a variety of applications , such as drug discovery and material science . Graph-based molecule generation models , which are robust to molecule substructures ( You et al. , 2018 ; Kwon et al. , 2019 ) , have gained increasing attention recently ( Jin et al. , 2018 ; Li et al. , 2018a ; You et al. , 2018 ; Kwon et al. , 2019 ; De Cao & Kipf , 2018 ; Shi et al. , 2020 ; Jin et al. , 2020b ) . Graph-based molecule generation models typically decompose molecular graphs into sequential actions of generating atoms and bonds autoregressively ( Li et al. , 2018b ; You et al. , 2018 ; Li et al. , 2018a ; Jin et al. , 2020b ) . While this decomposition is natural and straightforward , it inevitably ignores the existence of common substructures in molecular graphs , as illustrated in Figure 1 . Compared with using atoms for generating molecules , using graph substructures for generating molecules have three potential benefits . First , using substructures can capture the regularities of atomic combination in molecules , and therefore is more capable of generating realistic molecules . Second , using substructures can better capture chemical properties , as there is a correlation between substructures and chemical properties ( Murray & Rees , 2009 ; Jin et al. , 2020b ) . Third , using substructures enables efficient training and inference . It is evident that using substructures to represent molecular graphs can result in much shorter sequences , therefore the training and inference process can be accelerated . As a result , we believe that models using substructures to represent molecular graphs can generate more realistic molecules with better-optimized properties efficiently . 83.9 % 60.5 % 41.3 % 32.6 % 27.5 % . In this paper , we present an iterative algorithm to automatically discover common substructures in molecules , which we call graph pieces . Initially , graph pieces correspond to single atoms that appear in graphs of a given dataset . Then for each iteration , we count the occurrence of neighboring pieces in graphs and merge the most frequent neighboring pieces into a new graph piece . Since substructures can be seen as small molecules , we use SMILES ( Weininger , 1988 ) , a text-based representation for molecules , to efficiently judge whether two graph pieces are identical . To effectively utilize these substructures , we also propose a graph piece variational autoencoder ( GP-VAE ) . Our model consists of a graph neural network ( GNN , Scarselli et al. , 2008 ) encoder and a two-step decoder . The two-step decoder first generates graph pieces auto-regressively and then predicts atom-level bonds between graph pieces in parallel . As a result , our GP-VAE decouples the alternated generation of nodes and edges , achieving significant computational efficiency for both training and generation . We conduct extensive experiments on ZINC250K ( Irwin et al. , 2012 ) and QM9 ( Blum & Reymond , 2009 ; Rupp et al. , 2012 ) datasets . Results demonstrate that our GP-VAE models outperform state-of-the-art models on distribution-learning , property optimization , and constrained property optimization tasks , and are about six times faster than the fastest baseline . 2 RELATED WORK . Molecule Generation Based on different representations for molecules , molecule generation models can be divided into two categories : text-based and graph-based . Text-based models ( GómezBombarelli et al. , 2018 ; Kusner et al. , 2017 ; Bjerrum & Threlfall , 2017 ) , which usually adopt the Simplified Molecular-Input Line-entry System ( SMILES ) ( Weininger , 1988 ) representation , are simple and efficient methods for generating molecules . However , these models are not robust because a single perturbation in the text molecule representation can result in significant changes in molecule structure ( You et al. , 2018 ; Kwon et al. , 2019 ) . Graph-based models ( De Cao & Kipf , 2018 ; Shi et al. , 2020 ; Jin et al. , 2020b ) , therefore , have gained increasing attention recently . Li et al . ( 2018b ) proposed a generation model of graphs and demonstrated it performed better than text-based generation models on molecule generation . You et al . ( 2018 ) used reinforcement learning to fuse rewards of chemical validity and property scores into each step of generating a molecule . Popova et al . ( 2019 ) proposed an MRNN to autoregressively generate nodes and edges based on the generated graph . Shi et al . ( 2020 ) proposed a flow-based autoregressive model and use reinforcement learning for the goal-directed molecular graph generation . However , these models use atomlevel graph representation , which results in very long sequences , and therefore the training process is typically time-consuming . Our method is graph-based and uses substructure-level representation for graphs , which not only captures chemical properties but also is computationally efficient . Substructure-level Graph Representation Jin et al . ( 2018 ) proposed to generate molecules in the form of junction trees where each node is a ring or edge . Jin et al . ( 2020a ) decomposed molecules into substructures by breaking all the bridge bonds . It used a complex hierarchical model for polymer generation and graph-to-graph translation . Jin et al . ( 2020b ) proposed to extract the smallest substructure which maintains the original chemical property . The extracted substructures usually include most atoms of the original molecules , which are too coarse-grained and exert limitations on the search space . The models proposed by Jin et al . ( 2020a ) and Jin et al . ( 2020b ) are not suitable for the experiments in this paper since they either need graph-to-graph supervised data or are incompatible with continuous properties . There exists various methods to discover frequent subgraphs ( Inokuchi et al. , 2000 ; Yan & Han , 2002 ; Nijssen & Kok , 2004 ) . However , they have difficulty decomposing graphs into frequent subgraphs ( Jazayeri & Yang , 2021 ) since they mainly aim to discover frequent subgraphs as additional features for downstream network analysis . Therefore they can hardly be applied to substructure-level molecular graph representation . Different from Jin et al . ( 2018 ; 2020a ) which use manual rules to extract substructures , we automatically extract common substructures which better capture the regularities in molecules for substructure-level decomposition . 3 APPROACH . We first give the definition of graph pieces and algorithms for graph piece extraction in Section 3.1 . Then we describe the encoder of our graph piece variational autoencoder ( GP-VAE ) model in Section 3.2 . Finally , we descibe the two-step decoder of GP-VAE in Section 3.3 . Algorithm 1 : Graph Piece Extraction Input : A set of graphs D and the desired number N of graph pieces to learn . Result : A set of graph pieces S and the counter F of graph pieces . 1 begin 2 S ← { GraphToSMILES ( 〈 { a } , ∅〉 ) } ; . Initially , S corresponds to all atoms a that appear in D. 3 N ′ ← max ( N , |S| ) ; 4 while |S| < N ′ do 5 F ← EmptyMap ( ) ; . Initialize a counter . 6 foreach G in D do 7 forall 〈Pi , Pj , Ẽij〉 in G do 8 P ← Merge ( 〈Pi , Pj , Ẽij〉 ) ; . Merge neighboring graph pieces into a new graph piece . 9 s← GraphToSMILES ( P ) ; . Convert a graph to SMILES representation . 10 F [ s ] = F [ s ] + 1 ; . Update the counter , the default value for a new s is 0 . 11 end 12 end 13 s = TopElem ( counter ) ; . Find the most frequent merged graph piece . 14 P ← SMILESToGraph ( s ) ; . Convert the SMILES string to graph representation . 15 S ← S ∪ { s } ; D′ ← { } ; 16 foreach G in D do 17 G′ ← MergeSubGraph ( G , P ) ; . Update the graph representation if possible . 18 D′ ← D′ ∪ { G′ } ; 19 end 20 D ← D′ 21 end 22 end 3.1 GRAPH PIECE A molecule can be represented as a graph G = 〈V , E〉 , where V is a set of nodes that correspond to atoms and E is a set of edges that correspond to chemical bonds . Instead of using atoms , we use substructures , which we call graph pieces , as building blocks . We define a graph pieceP as a subgraph 〈Ṽ , Ẽ〉 that appears in a graph G , where Ṽ ⊆ V and Ẽ ⊆ E . It should be noted that either a single atom or a whole graph is a valid graph piece . Given a set of graph pieces S , suppose the graph G can be decomposed into n graph pieces in S , then G can be alternatively represented as 〈 { Pi } , { Ẽij } 〉 , where Ẽij denotes the set of edges between two neighboring graph pieces Pi and Pj . The decomposition of a graph G into graph pieces satisfies the following constraints : ( 1 ) the union of all atoms in the graph pieces equals to all atoms in the molecule , namely ⋃ i Vi = V ; ( 2 ) there is no intersection between any two graph pieces , namely ∀i 6= j , Vi ∩Vj = ∅ , and Ẽi ∩ Ẽj = ∅ ; ( 3 ) the union of all connections within and between graph pieces equals to all bonds in the molecule , namely ⋃ i , j ( Ẽi ∪ Ẽij ) = E , where i range from 1 to n and j range from i+ 1 to n. Figure 2 shows an decomposed molecule . The algorithm for extracting graph pieces from a given set of graphs D is given in Algorithm 1 . Our algorithm draws inspiration from Byte Pair Encoding ( Gage , 1994 , BPE ) . Initially , a graph G inD is decomposed into atom-level graph pieces and the vocabulary S of graph pieces is composed of all unique atom-level graph pieces that appear in D. Given the number N of graph pieces to learn , at each iteration , our algorithm enumerates all neighboring graph pieces and edges that connect the two graph pieces in G , namely 〈Pi , Pj , Ẽij〉 . As 〈Pi , Pj , Ẽij〉 is also a valid subgraph , we merge it into a graph piece and count its occurrence . We find the most frequent merged graph pieceP and add it into the vocabulary S. After that , we also update graphs G in D that contain P by merging 〈Pi , Pj , Ẽij〉 into P . The algorithm terminates when the vocabulary size exceeds the predefined number N . Note that we use SMILES ( Weininger , 1988 ) to represent a graph piece in our algorithm1 , therefore we ensure the uniqueness of a graph piece . A running example of our graph piece extraction algorithm is illustrated in Figure 3 . At test time , we first decompose a molecular graph into atom-level graph pieces , then apply the learned operations to merge the graph pieces into larger ones . This process ensures there is a piece-level decomposition for an arbitrary molecule . We provide the pseudo code for the piece-level decomposition in Appendix A for better understanding . We provide the complexity analysis for both algorithms in Appendix B . 1We use RDKit ( www.rdkit.org ) to perform the conversion between molecular graph and SMILES . | This paper proposes a new molecular graph generation method and empirically shows its effectiveness. The proposed method first decomposes molecular graphs into smaller parts (called graph pieces), followed by training a variational autoencoder so that it can generate the collected graph pieces. The trained model is expected to generate a variety of graphs with desirable properties. | SP:7231ca0a1ddceb9d867a4355b1207c6b7ce43e99 |
InstaHide’s Sample Complexity When Mixing Two Private Images | n O ( kpriv ) priv + poly ( npub ) time for any integer kpriv , where npriv and npub denote the number of images used in the private and the public dataset to generate a mixed image sample . Under the current setup for the InstaHide challenge of mixing two private images ( kpriv = 2 ) , this means n 4/3 priv samples are sufficient to recover a private image . In this work , we show that npriv log ( npriv ) samples are sufficient ( information-theoretically ) for recovering all the private images . 1 Introduction . Collaboratively training neural networks based on sensitive data is appealing in many AI applications , such as healthcare , fraud detection , and virtual assistants . How to train neural networks without compromising data confidentiality and prediction accuracy has become an important and common research goal Shokri & Shmatikov ( 2015 ) ; Ryffel et al . ( 2018 ) ; Phong et al . ( 2018 ) ; McMahan et al . ( 2017 ) ; Konečnỳ et al . ( 2016 ) in both academia and industry . Huang et al . ( 2020b ) recently proposed an approach called InstaHide for image classification . The key idea is to train the model on a dataset where ( 1 ) each image is a mix of kpriv private images and kpub public images , and ( 2 ) each pixel is independently sign-flipped after the mixing . Instahide shows promising prediction accuracy on MNIST Deng ( 2012 ) , CIFAR10 Krizhevsky ( 2012 ) , CIFAR-100 , and ImageNet datasets Deng et al . ( 2009 ) . TextHide Huang et al . ( 2020a ) applies InstaHide ’ s idea to text datasets and achieves promising results on natural language processing tasks . To understand the security aspect of InstaHide in realistic deployment scenarios , InstaHide authors present an InstaHide challenge Challenge ( 2020 ) that involves npriv = 100 private images , ImageNet dataset as the public images , m = 5000 sample images ( each image is a combination of kpriv = 2 private images and kpub = 4 public images and the sign of each pixel is randomly flipped ) . The challenge is to recover a private image given the set of sample images . Chen et al . ( 2021 ) is a theoretical work that formulates the InstaHide attack problem as a recovery problem . It also provides an algorithm to recover a private image assuming each private and public image is a random Gaussian image ( i.e. , each pixel is an i.i.d . draw from N ( 0 , 1 ) ) . The algorithm shows that O ( nkpriv−2/ ( kpriv+1 ) priv ) sample images are sufficient to recover one private image . Carlini et al . ( 2020 ) provides the first heuristic-based practical attack for the InstaHide challenge ( kpriv = 2 ) , and it can generate images that are visually similar to the private images in the InstaHide challenge dataset . Luo et al . ( 2021 ) provides the first heuristic-based practical attack for the InstaHide challenge ( kpriv = 2 ) when data augmentation is enabled . Although the InstaHide challenge is considered broken by several researchers , the current InstaHide challenge is itself too simple , and it is unclear whether the existing attacks Carlini et al . ( 2020 ) ; Luo et al . ( 2021 ) can still work when we use InstaHide to protect large numbers of private images ( large n ) Arora ( 2020 ) . This raises an important question : What ’ s the minimal number of InstaHide images needed to recover a private image ? This question is worthwhile to consider because it is a quantitative measure for how secure InstaHide is . With the same formulation in Chen et al . ( 2021 ) , we achieve a better upper bound on the number of samples needed to recover private images when kpriv = 2 . Our new algorithm can recover all the private images using only Ω ( npriv log ( npriv ) ) samples.1 This significantly improves the state-of-the-art theoretical results Chen et al . ( 2021 ) that requires n 4/3 priv samples to recover a single private image . However , our running time is exponential in the number of private images ( npriv ) and polynomial in the number of public images ( npub ) , where the running time of the algorithm in Chen et al . ( 2021 ) is polynomial in npriv and npub . In addition , we provide a four-step framework to compare our attacks with the attacks presented in Carlini et al . ( 2020 ) and Chen et al . ( 2021 ) . We hope our framework can inspire more efficient attacks on InstaHide-like approaches and can guide the design of future-generation deep learning algorithms on sensitive data . 1.1 Our result . Chen et al . ( 2021 ) formulates the InstaHide attack problem as a recovery problem that given sample access to an oracle that can generate as much as InstaHide images you want , there are two goals : 1 ) sample complexity , minimize the number InstaHide images being used , 2 ) running time , use those InstaHide images to recover the original images as fast as possible . Similar to Chen et al . ( 2021 ) , we consider the case where private and public data vectors are Gaussians . Let Spub denote the set of public images with |Spub| = npub , let Spriv denote the set of private images with |Spriv| = npriv . The model that produces InstaHide image can be described as follows : • Pick kpub vectors from public data set and kpriv vectors from private data set . • Normalize kpub vectors by 1/ √ kpub and normalize kpriv vectors by 1/ √ kpriv . • Add kpub + kpriv vectors together to obtain a new vector , then flip each coordinate of that new vector independently with probability 1/2 . We state our result as follows : Theorem 1.1 ( Informal version of Theorem 3.1 ) . Let kpriv = 2 . If there are npriv private vectors and npub public vectors , each of which is an i.i.d . draw from N ( 0 , Idd ) , then as long as d = Ω ( poly ( kpub ) log ( npub + npriv ) ) , there is some m = O ( npriv log npriv ) such that , given a sample of m random synthetic vectors independently generated as above , one can exactly recover all the private vectors in time O ( dm2 + dn2pub + n 2ω+1 pub +mn 2 pub ) + d2 O ( m ) with high probability . Notations . For any positive integer n , we use [ n ] to denote the set { 1 , 2 , · · · , n } . For a set S , we use supp ( S ) to denote the support of S , i.e. , the indices of its elements . We also use supp ( w ) to denote the support of vector w ∈ Rn , i.e . the indices of its non-zero coordinates . For a vector x , we use ‖x‖2 to denotes entry-wise ` 2 norm . For two vectors a and b , we use a ◦ b to denote a vector where i-th entry is aibi . For a vector a , we use |a| to denote a vector where the i-th entry is |ai| . Given a vector v ∈ Rn and a subset S ⊂ [ n ] we use [ v ] S ∈ R|S| to denote the restriction of v to the coordinates indexed by S. 1For the worst case distribution , Ω ( npriv ) is a trivial sample complexity lower bound . Contributions . Our contributions can be summarized into the following folds . • We propose an algorithm that recover all the private images using only Ω ( npriv log ( npriv ) ) samples in the recent theoretical framework of attacking InstaHide Huang et al . ( 2020b ) when mixing two private image , improving the state-of-art result of Chen et al . ( 2021 ) . • We summarize existing methods of attacking InstaHide into a unifying framework . By examining the functionality of each steps we identify the connection of a key step with problems in graph isomorphism . We also reveal the vulnerability of existing method to recover all private images by showing hardness to recover all images . Organizations . In Section 2 we formulate our attack problem . In Section 3 we present our algorithm and main results . In Section 4 we conclude our paper and discuss future directions . 2 Preliminaries . We use the same setup as Chen et al . ( 2021 ) . Definition 2.1 ( Image matrix notation , Definition 2.2 in Chen et al . ( 2021 ) ) . Let image matrix X ∈ Rd×n be a matrix whose columns consist of vectors x1 , . . . , xn ∈ Rd corresponding to n images each with d pixels taking values in R. It will also be convenient to refer to the rows of X as p1 , . . . , pd ∈ Rn . We define public set , private set and synthetic images following the setup in Huang et al . ( 2020b ) . Definition 2.2 ( Public/private notation , Definition 2.3 in Chen et al . ( 2021 ) ) . We will refer to Spub ⊂ [ n ] and Spriv = [ n ] \Spub as the set of public and private images respectively , and given a vector w ∈ Rn , we will refer to supp ( w ) ∩ Spub and supp ( w ) ∩ Spriv as the public and private coordinates of w respectively . Definition 2.3 ( Synthetic images , Definition 2.4 in Chen et al . ( 2021 ) ) . Given sparsity levels kpub ≤ |Spub| , kpriv ≤ |Spriv| , image matrix X ∈ Rd×n and a selection vector w ∈ Rn for which [ w ] Spub and [ w ] Spriv are kpub- and kpriv-sparse respectively , the corresponding synthetic image is the vector yX , w = |Xw| ∈ Rd where | · | denotes entrywise absolute value . We say that X ∈ Rd×n and a sequence of selection vectors w1 , . . . , wm ∈ Rn give rise to a synthetic dataset Y ∈ Rm×d consisting of the images ( yX , w1 , . . . , yX , wm ) > . We consider Gaussian image which is a common setting in phase retrieval Candes et al . ( 2013 ) ; Netrapalli et al . ( 2017 ) ; Candes et al . ( 2015 ) . Definition 2.4 ( Gaussian images , Definition 2.5 in Chen et al . ( 2021 ) ) . We say that X is a random Gaussian image matrix if its entries are sampled i.i.d . from N ( 0 , 1 ) . Distribution over selection vectors follows from variants of Mixup Zhang et al . ( 2017 ) . Here we ` 2 normalize all vectors for convenience of analysis . Since kpriv is a small constant , our analysis can be easily generalized to other normalizations . Definition 2.5 ( Distribution over selection vectors , Definition 2.6 in Chen et al . ( 2021 ) ) . Let D be the distribution over selection vectors defined as follows . To sample once from D , draw random subset T1 ⊂ Spub , T2 ⊆ Spriv of size kpub and kpriv and output the unit vector whose i-th entry is 1/ √ kpub if i ∈ T1 , 1/ √ kpriv if i ∈ T2 , and zero otherwise.2 For convenience we will define pub and priv operators as follows , Definition 2.6 ( Public/private operators ) . We define function pub ( · ) and priv ( · ) such that for vector w ∈ Rn , pub ( w ) ∈ Rnpub will be the vector which only contains the coordinates of w corresponding to the public subset Spub , and priv ( w ) ∈ Rnpriv will be the vector which only contains the coordinates of w corresponding to the private subset Spriv . 2Note that any such vector does not specify a convex combination , but this choice of normalization is just to make some of the analysis later on somewhat cleaner , and our results would still hold if we chose the vectors in the support of D to have entries summing to 1 . Algorithm 1 Recovering All Private Images when kpriv = 2 1 : procedure RecoverAll ( Y ) . Theorem 3.1 , Theorem 1.1 2 : . InstaHide dataset Y = ( yX , w1 , . . . , yX , wm ) > ∈ Rm×d 3 : . Step 1 . Retrieve Gram matrix 4 : M← 1 kpriv+kpub ·GramExtract ( Y , 1 2 ( kpub+kpriv ) ) . Algorithm 1 in Chen et al . ( 2021 ) 5 : . Step 2 . Subtract Public images from Gram matrix 6 : for i ∈ [ m ] do 7 : Si ← LearnPublic ( { ( pj ) Spub , y X , wi j ) } j∈ [ d ] ) . Algorithm 2 in Chen et al . ( 2021 ) 8 : end for 9 : Wpub ← ( pub ( vec ( S1 ) ) , . . . , pub ( vec ( Sm ) ) ) > . Wpub ∈ { 0 , 1 } m×npub 10 : Mpriv ← kpriv · ( M− 1kpubWpubW > pub ) 11 : . Step 3 . Assign original images 12 : Wpriv ← AssigningOriginalImages ( Mpriv , npriv ) . Algorithm 2 13 : . Step 4 . Solving system of equations . 14 : Ypub = 1√ kpub WpubX > pub . Xpub ∈ Rd×npub , Ypub ∈ Rm×d , Wpub ∈ { 0 , 1 } m×npub 15 : X̃ ← SolvingSystemofEquations ( Wpriv , √ kprivYpub , √ kprivY ) . Algorithm 3 16 : return X̃ 17 : end procedure For subset S̃ ⊂ S we will refer to vec ( S̃ ) ∈ Rn as the vector that vec ( S̃ ) i = 1 if i ∈ S̃ and vec ( S̃ ) i = 0 otherwise . We define the public and private components of W and Y for convenience . Definition 2.7 ( Public and private components of image matrix and selection vectors ) . For a sequence of selection vectors w1 , . . . , wm ∈ Rn we will refer to W = ( w1 , . . . , wm ) > ∈ Rm×n as the mixup matrix . Specifically , we will refer to Wpub ∈ { 0 , 1 } m×npub as the public component of mixup matrix and Wpriv ∈ { 0 , 1 } m×npriv as the private component of mixup matrix , i.e. , Wpub = √ kpub · pub ( W1 , ∗ ) ... pub ( Wm , ∗ ) ∈ { 0 , 1 } m×npub , Wpriv = √ kpriv · priv ( W1 , ∗ ) ... priv ( Wm , ∗ ) ∈ { 0 , 1 } m×npriv . We will refer to Xpub ∈ Rd×npub as public component of image matrix which only contains the columns of X ∈ Rd×n corresponding to the public subset Spub , and Xpriv ∈ Rd×npriv as private component of image matrix which only contains the columns of X ∈ Rd×n corresponding to the private subset Spriv . Furthermore we define Ypub ∈ Rm×d as public contribution to InstaHide images and Ypriv ∈ Rm×d as private contribution to InstaHide images : Ypub = 1√ kpub WpubX > pub , Ypriv = 1√ kpriv WprivX > priv . Instead of considering only one private image recovery as Chen et al . ( 2021 ) , here we consider a harder question which requires to recover all the private images . Problem 1 ( Exact Private image recovery ) . Let X ∈ Rd×n be a Gaussian image matrix . Given access to the public images { xs } s∈Spub and the synthetic dataset ( yX , w1 , . . . , yX , wm ) , where w1 , . . . , wm ∼ D are unknown selection vectors , output a set of vectors { x̃s } s∈Spriv for which there exists a one-to-one mapping φ from { x̃s } s∈Spriv to { xs } s∈Spriv satisfying φ ( x̃s ) j = ( xs ) j , ∀j ∈ [ d ] . 3 Recovering All Private Images when kpriv = 2 In this section , we prove our main algorithmic result . Our algorithm follows the high-level procedure introduced in section A . The details are elaborated in following subsections . Theorem 3.1 ( Main result ) . Let Spub ⊂ [ n ] , and let npub = |Spub| and npriv = |Spriv| . Let kpriv = 2 . Let k = kpriv + kpub . If d ≥ Ω ( poly ( kpub , kpriv ) log ( npub + npriv ) ) and m ≥ Ω ( kpoly ( kpriv ) npriv log npriv ) , then with high probability over X and the sequence of randomly chosen selection vectors w1 , . . . , wm ∼ D , there is an algorithm which takes as input the synthetic dataset Y > = ( yX , w1 , . . . , yX , wm ) ∈ Rd×m and the columns of X indexed by Spub , and outputs npriv images { x̃s } s∈Spriv for which there exists one-to-one mapping φ from { x̃s } s∈Spriv to { xs } s∈Spriv satisfying φ ( x̃s ) j = ( xs ) j for all j ∈ [ d ] . Furthermore , the algorithm runs in time O ( m2d+ dn2pub + n 2ω+1 pub +mn 2 priv + 2 m ·mn2privd ) . Remark 3.2 . Our result improves on Chen et al . ( 2021 ) on two aspects . First , we reduce the sample complexity from nkpriv−2/ ( kpriv+1 ) priv to npriv log npriv when kpriv = 2 . Note that our sample complexity is optimal up to logarithmic factors since finding unique solutions of linear system requires at least npriv sample complexity . Second , we can recover all private images exactly rather than recovering a single image , which is highly desirable for real-world practitioners . Furthermore notice that fixing all public images , multiplying any private image by −1 might not keep InstaHide images unchanged . Thus information theoretically , we are able to recover all private images precisely ( not only absolute values ) as long as we have access to sufficient synthetic images . In fact , from the proof of Lemma 3.7 our sample complexity suffices to achieve exact recovery . | The paper studies the sample complexity of InstaHide challenge in an idealized setting, where it is assumed that each public and private image is generated using a standard Gaussian distribution. Further, similar to previous attacks, the paper assumes that each image is a combination of 2 private images. The main contribution of the paper is to show that using O(n polylog ) images one can recover all private images in the InstaHide challenge. This is an improvement over previous works in two ways: 1) The paper shows how to recover all images rather than few (or 1) images. 2) The previous best sample complexity for this case was n^4/3. However, on the downside, the running time of the algorithm is exponential in the number of private images. | SP:d8ddd2bef5bca3680e6602681fecf78f4d5c541d |
A Principled Permutation Invariant Approach to Mean-Field Multi-Agent Reinforcement Learning | 1 INTRODUCTION . Multi-Agent Reinforcement Learning ( Littman , 1994 ; Zhang et al. , 2019 ) generalizes Reinforcement Learning ( Sutton and Barto , 2018 ) to address the sequential decision-making problem of multiple agents maximizing their individual long term rewards while interacting with each other in a common environment . With breakthroughs in deep learning , MARL algorithms equipped with deep neural networks have seen significant empirical successes in various domains , including simulated autonomous driving ( Shalev-Shwartz et al. , 2016 ) , multi-agent robotic control ( Matarić , 1997 ; Kober et al. , 2013 ) , and E-sports ( Vinyals et al. , 2019 ) . Despite tremendous successes , MARL is notoriously hard to scale to the many-agent setting , as the size of the state-action space grows exponentially with respect to the number of agents . This phenomenon is recently described as the curse of many agents ( Menda et al. , 2018 ) . To tackle this challenge , we focus on cooperative MARL , where agents work together to maximize their team reward ( Panait and Luke , 2005 ) . We identify and exploit a key property of cooperative MARL with homogeneous agents , namely the invariance with respect to the permutation of agents . Such permutation invariance can be found in many real-world scenarios with homogeneous agents , such as distributed control of multiple autonomous vehicles and team sports ( Cao et al. , 2013 ; Kalyanakrishnan et al. , 2006 ) , but also in scenarios with heterogeneous agent groups , where invariance holds within each group ( Liu et al. , 2019b ) . More importantly , we find that permutation invariance has significant practical implications , as the optimal value functions remain invariant when permuting the joint state-action pairs . Such an observation strongly advocates a permutation invariant design for learning , which helps reduce the effective search space of the policy/value functions from exponential dependence on the number of agents to polynomial dependence . Several empirical methods have been proposed to incorporate permutation invariance into solving MARL problems . Liu et al . ( 2019b ) implement a permutation invariant critic based on Graph Convolutional Network ( GCN ) ( Kipf and Welling , 2017 ) . Sunehag et al . ( 2017 ) propose value decomposition , which together with parameter sharing , leads to a joint critic network that is permutation invariant over agents . While these methods are based on heuristics , we are the first to provide theoretical principles for introducing permutation invariance as an inductive bias for learning value functions and policies in homogeneous systems . In addition , we adopt the DeepSet ( Zaheer et al. , 2017 ) architecture , which is well suited for handling homogeneity of agents , with much simpler operations to induce permutation invariance and greater parameter efficiency . To scale MARL algorithms in the presence of a large number , even infinitely many , agents , mean-field approximation has been explored to directly model the population behavior of the agents . Mean-field game considers large populations of rational agents that play a noncooperative game . Yang et al . ( 2017 ) consider a mean-field game with deterministic linear state transitions , and show that it can be reformulated as a mean-field MDP , where the mean-field state lies in finite-dimensional probability simplex . Yang et al . ( 2018 ) take a mean-field approximation over actions , such that the interaction for any given agent and the population is approximated by the interaction between the agent ’ s action and the averaged actions of its neighboring agents . However , the motivation for averaging over local actions remains unclear , and it generally requires a sparse graph over agents . In practice , properly identifying such structure also demands extensive prior knowledge . Mean-field control instead considers a central controller who aims to compute strategy to optimize the average payoff across the population . Carmona et al . ( 2019 ) motivate a mean-field MDP from the perspective of mean-field control . The mean-field state therein lies in a probability simplex and is thus continuous in nature . To enable the ensuing Q-learning algorithm , discretization of the joint state-action space is necessary . In addition , the dynamic programming principles of such mean-field control problem has been studied in ( Gu et al. , 2019 ) . Gu et al . ( 2020 ) also propose a Q-learning type algorithm , where the state-action space is first discretized into an epsilon-net . The kernel regression operator is used to construct an estimate of the unknown Q-function from samples . Gu et al . ( 2021 ) propose a localized training , decentralized execution framework by locally grouping homogenous agents using their states . Wang et al . ( 2020 ) motivate a mean-field MDP from permutation invariance , but assume a central controller coordinating the actions of all the agents , and hence is restricted to handling the curse of many agents from the exponential blowup of the joint state space . Our formulation of mean-field approximation allows agents to make their own local actions without resorting to a centralized controller . We propose a mean-field Markov decision process motivated from the permutation invariance structure of cooperative MARL , which can be viewed as a natural limit of finite-agent MDP by taking the number of agents to infinity . Such a mean-field MDP generalizes traditional MDP , with each state representing a distribution over the state space of a single agent . The mean-field MDP provides us a tractable formulation to model MDP with many agents , including an infinite number of agents . We further propose the Mean-Field Proximal Policy Optimization ( MF-PPO ) algorithm , at the core of which is a pair of permutation invariant actor and critic neural networks . These networks are implemented based on DeepSet ( Zaheer et al. , 2017 ) , which uses convolutional type operations to induce permutation invariance over the set of inputs . We show that with sufficiently many agents , MF-PPO converges to the optimal policy of the mean-field MDP with a sublinear sample complexity independent of the number of agents . To support our theory , we conduct numerical experiments on the benchmark multi-agent particle environment ( MPE ) and show that our proposed method requires a smaller number of model parameters and attains better performance than multiple baselines . Notations . W denote P ( X ) as the set of distribution on set X . δx denotes the Dirac measure supported at x . For s = ( s1 , . . . , sN ) , we use s i.i.d.∼ p to denote that each si is independently sampled from distribution p. For f : X → R and a distribution π ∈ P ( X ) , we write 〈f , π〉 = Ea∼πf ( a ) . We write [ m ] in short for { 1 , . . . , m } , and ∆d for the standard probability simplex in Rd . 2 PROBLEM SETUP . We focus on studying multi-agent systems with cooperative , homogeneous agents , where the agents within the system are of similar nature and hence can not be distinguished from each other . Specifically , we consider a discrete time control problem with N agents , formulated as a Markov decision process ( SN , AN , P , r ) . We define the joint state space SN to be the Cartesian product of the finite state space S for each agent , and similarly define the joint action space AN . The homogeneous nature of the system is reflected in the transition kernel P and the shared reward r , which satisfies : r ( st , at ) = r ( κ ( st ) , κ ( at ) ) , P ( st+1|st , at ) = P ( κ ( st+1 ) |κ ( st ) , κ ( at ) ) ( 2.1 ) for all ( st , at ) ∈ SN × AN and the permutation mapping κ ( · ) ∈ SN , where SN is the set of all one-to-one mapping from [ N ] to itself . In other words , it is the configuration , rather than individual identities , that affects the team reward , and the transition to the next configuration solely depends on the current configuration . See Figure 1 for detailed illustration . Such permutation invariance finds applications in many real-world scenarios , including distributed control of autonomous vehicles , and social economic systems ( Zheng et al. , 2020 ; Cao et al. , 2013 ; Kalyanakrishnan et al. , 2006 ) . Our goal is to find the optimal policy ν , where ν ( s ) ∈ ∆|AN | for all s ∈ SN , and maximize the expected discounted reward V ν ( s ) = ( 1 − γ ) E { ∑∞t=0 γtr ( st , at ) |s0 =s , at∼ν ( st ) , ∀t≥0 } . Our first result shows that learning with permutation invariance advocates invariant network design . Proposition 2.1 . For cooperative MARL satisfying ( 2.1 ) , there exists an optimal policy ν∗ that is permutation invariant , i.e. , ν∗ ( s , a ) = ν∗ ( κ ( s ) , κ ( a ) ) for any permutation mapping κ ( · ) . In addition , for any permutation invariant policy ν , the value function V ( · ) and the state-action value function Q ( · ) is also permutation invariant , i.e. , V ν ( s ) = V ν ( κ ( s ) ) , Qν ( s , a ) = Qν ( κ ( s ) , κ ( a ) ) , where Qν ( s , a ) = Es′ { r ( s , a ) + γV ν ( s′ ) } . Proposition 2.1 has an important implication for architecture design , as it states that it suffices to search within the permutation invariant policy and value function classes . To the best of our knowledge , this is the first theoretical justification of permutation invariant network design for learning with homogeneous agents . We focus on the factorized policy class with a parameter sharing scheme , where each agent makes its own decision without consolidating with others . Specifically , the joint policy ν can be factorized as ν ( a|s ) =∏N i=1 µ ( ai|oi ) , where µ ( · ) denotes the shared local mapping and oi denotes the local observation . Such a policy class is widely adopted in the celebrated centralized training – decentralized execution paradigm ( Lowe et al. , 2017 ) , due to its light overhead in the deployment phase and favorable performances . However , directly learning such factorized policy remains challenging , as each agent needs to estimate its state-action value function , denoted as Qν ( s , a ) . The search space during learning is ( |S| × |A| ) N , scaling exponentially with respect to the number of agents . The large search space poses as a significant roadblock for efficient learning , and is coined as the curse of many agents . To address the curse of many agents , we exploit the homogeneity of the system and take the mean-field approximation . We begin by taking the perspective of agent i , which is arbitrarily chosen from the N agents . We denote its state as s and the states of the rest of the agents by sr. One can verify that when permuting the state of all the other agents , the value function remains unchanged ; additionally , we can further characterize the value function as a function of the local state and the empirical state distribution over the rest of agents . Proposition 2.2 . For any permutation mapping κ ( · ) , the value function satisfies V ν ( s , sr ) = V ν ( s , κ ( sr ) ) . Additionally , there exists gν such that : V ν ( s , sr ) = gν ( s , p̂sr ) , where p̂sr = 1 N ∑ s∈sr δs is the empirical distribution over the states of rest of the agents sr. For a system with a large number of agents ( e.g. , financial markets , social networks ) , the empirical state distribution can be seen as the concrete realization of the underlying population distribution of the agents . Motivated from this observation and Proposition 2.2 , we formulate the following mean-field MDP that can be seen as the limit of finite-agent MDP in the presence of infinitely many homogeneous agents . Definition 2.1 ( mean-field MDP ) . The mean-field MDP consists of elements of the following : state ( s , dS ) ∈ S × P ( S ) ; action a ∈ A ⊆ AS ; reward r ( s , dS , a ) ; transition kernel P ( s′ , d′S |s , dS , a ) . The mean-field MDP has an intimate connection with our previously discussed finite-agent MDP . Since the the agents are homogeneous , the system is the same from any agent ’ s perspective . We choose any agent ( referred to as representative agent ) , the state information of such an agent includes the local state s , and the mean-field state dS . With state information , the agent selects a meta action a ∈ A ∈ AS , and uses such a meta action to make local decision a = a ( s ) ∈ A . We remark that such a modeling of decision process allows the agent to make decision on both its local information ( local state s ) and the global information ( mean-field state dS ) . From homogeneity we assume all the rest of the agents uses the same meta action a to make their local actions . Note that different agents can still make different local actions due to their different local states , i.e. , a ( z ) 6= a ( z′ ) in general for z 6= z′ ∈ S . The joint state at the next timestep ( s′ , d′S ) naturally depends on the current global state ( s , dS ) and the meta action a ( since all the other agents use a to generate their local actions ) , and is specified by the transition kernel P ( s′ , d′S |s , dS , a ) . In addition , the representative agents receives a reward r ( s , dS , a ) , which depends on the local state and mean-field sate , and the meta action a . Our goal is to learn efficiently a policy π , where π ( ·|s , dS ) ∈ ∆|A| for all ( s , dS ) ∈ S × P ( S ) , for maximized expected discounted reward . To facilitate discussions , we define the value function V π ( s , dS ) = ( 1−γ ) E { ∑∞ t=0 γ tr ( st , dS , t , at ) } , where ( s0 , dS,0 ) = ( s , dS ) , at ∼ π ( st , dS , t ) , ∀t ≥ 0 ; and Q-function Qπ ( s , dS , a ) = ( 1 − γ ) E { ∑∞ t=0 γ tr ( st , dS , t , at ) } , where ( s0 , dS,0 ) = ( s , dS ) , a0 = a , at ∼ π ( st , dS , t ) . The optimal policy is denoted by π∗ ∈ argmaxV π ( s , dS ) . Despite the intuitive analogy to finite-agent MDP , solving the mean-field MDP poses some unique challenges . In addition to having an unknown transition kernel and reward , the mean-field MDP takes a distribution as its state , which we do not have complete information of during training . In the following section , we propose our mean-field Neural Proximal Policy Optimization ( MF-PPO ) algorithm that , with a careful architecture design , can solve such mean-field MDP in a model-free fashion efficiently . | This paper deals with a class of cooperative MARL problems with permutation invariance. It first shows that, for such problems, there exists an optimal policy that is permutation invariant, and the value function can be characterized as a function of the local state of one agent and the empirical state distribution over the rest of agents. Based on these observations, the authors introduce the mean-field MDP as the limit of the MARL problem with infinitely many homogeneous agents and design a mean-field proximal policy optimization (MF-PPO) algorithm to solve it. It shows with permutation invariance, the search space of the actor/critic network polynomially depends on the number of agents $N$ and establishes the global convergence of MF-PPO. Some numerical results show better performance compared with some existing algorithms. | SP:b86072dda30da18ae4f5395e4a38ebd369f71f66 |
The Evolution of Out-of-Distribution Robustness Throughout Fine-Tuning | 1 INTRODUCTION . The ability to generalize to data not seen during training is essential for the widespread trust and adoption of machine learning models . In practical applications of machine learning , we typically train and fine-tune on a dataset which are in-distribution ( ID ) with each other , but when deployed the model will face shifts from this distribution , and empirically the vast majority of models show a significant drop in performance from ID data to out-of-distribution ( OOD ) data ( Quiñonero-Candela et al. , 2009 ; Recht et al. , 2019 ; Biggio & Roli , 2018 ; Szegedy et al. , 2013 ; Hendrycks & Dietterich , 2019 ; Azulay & Weiss , 2018 ; Shankar et al. , 2019 ; Gu et al. , 2019 ; Torralba & Efros , 2011 ) . Common examples include data captured in a different environment , like time of day or geographical location ( Koh et al. , 2020 ) ; noise or small corruptions of the input data ( Hendrycks & Dietterich , 2019 ; Geirhos et al. , 2018 ) ; or adversarial examples created to explicitly fool neural networks into making incorrect predictions ( Szegedy et al. , 2013 ; Biggio & Roli , 2018 ) . Although the performance gap on OOD shifts is pervasive , it follows an intriguing pattern : there is a clear linear relationship between a model ’ s final performance on ID and OOD data ( Taori et al. , 2020 ; Recht et al. , 2019 ; Yadav & Bottou , 2019 ; Miller et al. , 2020 ) . In other words , given a model ’ s performance on an ID test set , a linear fit can accurately predict what the performance drop will be on the OOD test set . This also implies that a certain amount of improvement on OOD accuracy can be explained by an improvement on ID accuracy . The linear relationship holds across a wide range of models and is well-established for several robustness benchmarks , including image classification on both synthetic and natural distribution shifts ( Recht et al. , 2018 ; Yadav & Bottou , 2019 ; Recht et al. , 2019 ; Taori et al. , 2020 ) , 2D object detection ( Shankar et al. , 2019 ) , and question-answer models in NLP ( Miller et al. , 2020 ) . Since even the highest-performing models will still have a gap between ID and OOD accuracy , the linear relationship reveals that our current methods are insufficient for addressing OOD shift . Models which lie above the linear fit are said to exhibit effective robustness ( ER ) ( Taori et al. , 2020 ) , which measures the model ’ s OOD accuracy relative to the fit ( see Figure 1 ( a ) for an illustration ) . Models with nonzero ER deviate in their OOD behavior in a manner that is qualitatively and quantitatively different from what we can currently achieve . We seek to thoroughly investigate when the pre-training and fine-tuning paradigm gives rise to models with nonzero ER , and understand factors that control this behaviour . Models with high ER ( > 1 % ) are exceedingly rare . First , the most notable example is the recently proposed zero-shot CLIP model ( Radford et al. , 2021b ) , and subsequent work ( Wortsman et al. , 2021 ) has found that weight-space ensembling of zero-shot and fine-tuned CLIP-style models can improve both ID and OOD accuracy and produce models with high ER . Second , only a handful of the 204 ImageNet models evaluated in Taori et al . ( 2020 ) were found to have non-zero ER . Though most of these effectively robust models identified so far were pre-trained on large datasets , the majority of models pre-trained this way exhibit no ER , and we currently do not know when additional data helps ; what effect the choice of architecture has ; as well as the effects of dataset and distribution shift on these findings . In this work , we present an empirical study of the evolution of ER throughout fine-tuning . By studying the evolution , we find intriguing properties that are missed by focusing only on models at convergence : pre-trained models exhibit ER , while randomly-initialized models do not ( see Figure 1 ) . Summary of Contributions : . • ( Section 5.1 , 5.3 ) We identify pre-trained , fine-tuned models as an entire class of effectively robust models ( that match the ER of CLIP ( Radford et al. , 2021a ) ) and investigate how details such as model size , dataset size , and example difficulty influence ER . We find that the vanishing of ER at convergence depends on the distribution shift , and on some datasets pre-trained , fine-tuned models may still exhibit non-zero ER at convergence . • ( Section 5.4 ) We analyze properties of pre-trained models at the peak of their ER , including particular metrics defined in previous theoretical work ( Mania & Sra , 2020 ) . We find that effectively robust models make remarkably dissimilar predictions compared to standard models , and are able to correctly classify 10 % of the examples that no other model gets correct . • ( Section 5.5 ) We find that pre-trained models gradually lose their ER throughout fine-tuning , even as both the ID and OOD accuracies of the model simultaneously increase . We discuss several potential solutions to mitigate this problem , but find that none of them are able to maintain high ER at high ID accuracy . 2 RELATED WORK . Here we review some prior findings that are key for understanding the context of our results . Linear trends under distribution shift . In recent replication efforts , researchers carefully recreated new test sets for the CIFAR-10 and ImageNet classification benchmarks ( Recht et al. , 2018 ; 2019 ) . Despite following the original collection procedures as closely as possible , some shift was introduced . Evaluating an extensive testbed of trained models on the original and new tests revealed a clear relationship between accuracy on the original and new tests that is well-captured by a linear fit with positive slope . Follow-up work also found linear trends for new test sets on MNIST ( Yadav & Bottou , 2019 ) and the SQUAD question-answer dataset ( Miller et al. , 2020 ) , geographic distribution shifts for 3D Object Detection in self-driving cars ( Sun et al. , 2019 ) , and synthetic distribution shifts ( Taori et al. , 2020 ) . We find that models pre-trained on larger and more diverse datasets can break the linear trend of accuracy under distribution shift in the middle of the fine-tuning process , and we investigate factors that affect this . Examples of effectively robust models . Models that lie off the linear trend ( effectively robust models ) are historically extremely rare . In a recent extensive empirical study , researchers evaluated 204 trained ImageNet models spanning a wide range of architectures and training techniques on several popular natural and synthetic robustness benchmarks for ImageNet ( Taori et al. , 2020 ) . Across several natural robustness benchmarks , the main outliers with positive ER and high accuracy on ImageNet were all models that were pre-trained on larger and more diverse data than the ImageNet training set . They included a ResNet152 model trained on 11,000 ImageNet classes ( Wu , 2016 ) , several ResNeXt models trained on 1 billion images from Instagram ( Mahajan et al. , 2018 ) , and the EfficientNet-L2 ( NoisyStudent ) model trained on a Google-internal JFT-300M dataset of 300 million images ( Xie et al. , 2020 ) . However , not all models that were pre-trained on larger datasets showed effective robustness . Another recent work , ( Radford et al. , 2021a ) , observed that zero-shot CLIP classifiers have larger ER than CLIP models that had been fine-tuned to the downstream task . While the CLIP model was pre-trained with a contrastive loss that combined components from natural language processing and image classification , our results show that pre-trained ImageNet models that are evaluated in a zero-shot manner also have high ER , and , similar to the CLIP model , these image classification models lose their ER once they are fine-tuned to the downstream task . Since the completion of this paper , subsequent work ( Wortsman et al. , 2021 ) has proposed weight-space ensembles for fine-tuning ( WiSE-FT ) that interpolates between zero-shot and fine-tuned weights to find models with high ER as well as high ID and OOD accuracy . This method is currently limited to CLIP-style models , and in this work we mostly focus on traditional supervised image classification models . Model similarity . Recent work offers a theoretical explanation , relying on an assumption of model similarity ( Mania & Sra , 2020 ) , for why classifier accuracies follow a linear trend under distribution shift . Empirically , Mania et al . ( 2019 ) observed that the labeling assignments across a wide range of ImageNet models are significantly more similar to each other than would be expected by chance , which suggests that the size of the class of function approximators that neural networks learn is smaller than what may be expected a priori . Under the assumption of model similarity , Mania et al . ( 2019 ) proves that models ’ accuracies , when evaluated on two distributions , must be approximately collinear , unless the size of the distribution shift is large in a certain sense . In our work , we identify and analyze models that are not collinear with other models when evaluated on two distributions , and we find that such models break the assumption of model similarity sufficient to prove the existence of the linear fit . 3 EFFECTIVE ROBUSTNESS . The linear fit to testbed model accuracies on ID and OOD data provides a baseline for how improvements in OOD accuracy are tied to improvements in ID accuracy based on current methods . Effective robustness ( ER ) , a metric for robustness proposed in Taori et al . ( 2020 ) , measures the difference between a model ’ s OOD accuracy and that predicted from the baseline . ( See Figure 1 ( a ) for an illustration . ) 10 30 40 50 60 70 80 90 95 99 CIFAR-10 test acc ( % ) 10 20 30 40 50 60 70 80 90 95 C IF A R -1 0 . 1 te st ac c ( % ) Same Accuracy ( y=x ) Fit to Testbed Models Testbed Models 20 40 60 80 100 . CIFAR-10 test acc ( % ) 20 40 60 80 100 C IF A R -1 0 . 1 te st ac c ( % ) Same Accuracy ( y=x ) Fit to Testbed Models Testbed Models Figure 2 : Testbed model accuracies ( Recht et al . ( 2018 ) ) show a linear relationship in a rescaled logit-space Taori et al . ( 2020 ) . ( a ) shows the linear fit in logit-space , and ( b ) shows the same fit transformed back to linear-space . To define ER , we fix an ID and OOD test set and let β ( x ) be the baseline predicted OOD test set accuracy for a given accuracy x on the ID test set . Given a set of models evaluated on both the ID and OOD test sets , β can be computed by performing a log-linear fit between the models ’ accuracies on the two test sets . Similar to Taori et al . ( 2020 ) , we empirically find that the best linear fit comes from rescaling the accuracies using the logit function , logit ( α ) = log ( α 1−α ) , before performing the linear fit . In Figure 2 we show the log-linear fit for CIFAR-10 vs. CIFAR-10.1 in logit-space as well as transformed back to linear-space . See Appendix A for more details . The effective robustness of a model f is then defined as ρ ( f ) = accout ( f ) − β ( accin ( f ) ) , ( 1 ) where accin ( f ) and accout ( f ) represent the model ’ s accuracies on the ID and OOD test sets , respectively . Graphically , ER represents the distance above the testbed line to a model ’ s OOD accuracy , as shown in Figure 1 ( a ) . We note that ER is distinct from the absolute accuracy a model can achieve on the OOD data . For instance , the effectively robust model ( green point ) in Figure 1 ( a ) still has low absolute OOD accuracy relative to other models . An ideal model achieves both high ER and high absolute OOD accuracy . | This paper highlights important variables impacting the effective robustness (ER) of a pre-trained, fine-tuned model. The authors identify that increasing model size, dataset size, and example difficulty improves the ER of a pre-trained, fine-tuned model. The experiments suggest that the zero-shot component of CLIP plays a significant role in the high value of ER CLIP achieves. The investigation of ER on dominance probability shows that models with high ER have high dominance probability. The authors also present a negative result showing that several reasonable approaches to maintaining high ER while fine-tuning fail. | SP:bebf3b45f6f5f483a9ed421a219464eb126894b7 |
FEDERATED LEARNING FRAMEWORK BASED ON TRIMMED MEAN AGGREGATION RULES | 1 INTRODUCTION . As one special case of distributed machine learning , federated learning ( FL ) draws increasing research attention recently . FL has become one promising approach to enable clients collaboratively to learn a shared model with the decentralized and private data on each client node . Thus it is of central importance to keep the node information secured in FL . Unfortunately , FL is very vulnerable to software/hardware errors and adversarial attacks ; especially Byzantine attack from distributed systems has arose to be a key node attack sample for federated learning . To ensure the FL model resistance to Byzantine attack , research focuses are made on how to introduce aggregation rules into the gradient information iteration process , and how to ensure that this aggregation rule can make the data robust . In particular , classical approaches to avoid the Byzantine failures would employ the state machine replication strategy ( Alistarh et al. , 2018 ) , which can be roughly categorized into two ways in distributed machine learning : ( 1 ) the processes agree on a sample of data based on which the clients update their local parameter vectors ; ( 2 ) the clients agree on how the parameter vector should be updated ( Blanchard et al. , 2017 ) . The former ones demand transmitting data samples to each individual node , resulting in high costs . The latter ways are not reliable neither , as we can not detect whether clients are trustworthy or not , from the mixed Byzantine vectors . The attacker can know any information about the process of FL , and can use any vectors to initiate the attack during the node ’ s information transmission ( Yin et al. , 2018 ) . More specifically , the data between machines can be replaced by any value . This problem is not fully addressed in previous works . When facing the attacks from Byzantine nodes , the FL models have to rely on robust aggregation rules to minimize the influence of the Byzantine attack on the data model ( Bottou , 2010 ) . For instance , Krum ( · ) is a strong aggregation rule designed to identify an honest node such that it can effectively prevent Byzantine attacks in most cases ( Blanchard et al. , 2017 ) . However , if the Byzantine node attack is changed from the original single miner node attack to multiple server attacks , Krum ( · ) is not able to ensure the learning process robustness to noisy data . As another class of aggregation rules , simple mean-based aggregation rules can maintain learning robustness if it is not attacked by Byzantine nodes . However , the Byzantine attack will make the update direction of node gradient information largely deviate from the original function by using simple mean-based aggregation rules . Some variants of mean-based aggregation rules , such as geometric median ( Blanchard et al. , 2017 ) , marginal median ( Alistarh et al. , 2018 ) , are the classical methods to solve the Byzantine node attack problem . But they are not much more robust than simple mean-based aggregation rules in the case of some large deviation Byzantine attacks . The main difficulty that prevents mean-based aggregation rules from robust is the unstable distribution of data ( Jin et al. , 2020 ) . We find that the difficulty can be tackled , if the data is averaged by trimming a part of the data and then imported into the aggregation rules . This motivates our work in this paper . Most of FL approaches are built upon the Stochastic Gradient Descent ( SGD ) algorithm ( Castro et al. , 1999 ) or its variants , and the statistical properties of SGD such as convergence are well developed . Our approach also employs the SGD ; and the typical iterative process of SGD algorithm in distributed system is represented by Figure 1 . First , a client , known as a miner node , estimates the gradient of the node , makes an estimate of the deviation between the estimated information and the ideal gradient information ( El-Mhamdi et al. , 2020 ) , then passes this information to the server node in the network , and finally update the gradient there . So the miner node network transmits the information to the master server , and the master server then passes the gradient update information through a series of aggregation operations . When the aggregation conditions are met , the server transmits the information to the distribution network , and then transmitted to the miner nodes . This is a cyclic process , such that the gradient information is continuously updated in the entire network ( Li et al. , 2014 ) . In this paper , we mainly propose new aggregation rules , Tmean ( · ) , by trimming part of the data before the average operation . We provide theoretical understandings of our aggregation rules , especially , why they are robust to the Byzantine attack . Through attack experiments and mathematical proofs , we have concluded that appropriately trimming the original data and averaging can make the model more robust from the decentralized data . Specifically , in section 3 we introduce the federated learning Byzantine distributed system model , briefly describes the working principle of SGD , and summarizes the update iteration rules based on aggregation rules . Then , we present the concept of Byzantine resilience , and the conditions to satisfy the aggregation rules of Byzantine resilience . We provide concept of trimmed mean and the rigorous theoretical proof and understanding of Tmean ( · ) based aggregation rules in section 4 . Then , we prove the convergence of the proposed federated learning aggregation rules in section 5 . In section 6 , we conduct experiments by Gaussian attack , omniscient attack and multiple servers attack . Under these attacks , Tmean ( · ) -based FL aggregation rules can still maintain robustness . These experiments thus validate the effectiveness of our approaches . Contributions : ( 1 ) We present new aggregation rules , Tmean ( · ) , to the Byzantine resilient federated learning algorithm , and propose federated learning frameworks based on aggregation algorithm . Our proposed approaches are shown to be robust to Byzantine attacks . ( 2 ) We provide rigorous theoretical proof and understanding of our approaches and aggregation rules . To the best of our knowledge , these theorems and theoretical understandings are for the first time contributed to the community . Critically , we make convergence certificates and prove that Tmean ( · ) can converge in the general convex optimization setting . ( 3 ) Empirically , we demonstrate that the effectiveness of our approaches can make the FL model robust to Byzantine attack . 2 RELATED WORK . Federated Learning . Federated learning has become a prominent distributed learning paradigm . In ( Jin et al. , 2020 ) , the authors proposed Stochastic-Sign SGD , a parameter estimation method with convergence guarantees . It uses a gradient compressor based on random symbols to unify that the gradient is updated in the framework . The FedAvg algorithm was first proposed by ( Konečnỳ et al. , 2016 ) , and many scholars subsequently improved it based on this algorithm . ( Karimireddy et al. , 2020 ) pointed out that FedAvg can be improved by adding one additional parameters control variables to correct the client drift , and proved that FedAvg may be seriously affected by the gradient difference of different clients , and may even be slower than SGD . Byzantine attack in FL . To make the secure transmission of the master server node , the FL models have to deal with the Byzantine attack . ( Yin et al. , 2018 ) showed that certain aggregation rules in the master server node can ensure the robustness of the data . ( Blanchard et al. , 2017 ) pointed out that Krum ( · ) can be used to make the robustness of data by computing the local sum of squared Euclidean distance to the other candidates , and outputting the one with minimal sum . When the gradient is updated to the saddle point , there is no guarantee that the SGD algorithm converges to the global optimum . Some scholars have proposed ByzantinePGD ( Yin et al. , 2019 ) , which can escape saddle points and false local minimums , and can converge to an approximate true local minimum with low iteration complexity . Later , in the strong anti-Byzantine model , some scholars carried out poisoning attacks on Byzantine robust data , from the original data collection process to the subsequent information exchange process , and at the same time , these attacks were defended accordingly , in ( Zhao et al. , 2021 ) . The research on the Byzantine structure model of federated learning has been expanded once again ( Zhao et al. , 2021 ) . Attack and Defence . In the framework of federated learning , miner nodes are usually attacked , such as Byzantine node attacks , poisoning attacks ( Zhao et al. , 2021 ) , gradient leakage ( Wei et al. , 2020 ) , etc . There exist various defense methods also , such as robust aggregation , secure aggregation , encryption , etc . Our paper mainly studies Byzantine node attacks . Byzantine node attacks can usually be summarized into two types : ( 1 ) To update gradient information of nodes , nodes are replaced by Byzantine nodes , and normal worker nodes can not make judgments so that the gradient estimates deviate from the actual gradient update direction . ( 2 ) During the gradient process , the local node suffering from the interference of the Byzantine node , can not reach a consensus with the master node , making the entire process unable to proceed normally ( Lamport et al. , 2019 ) . Krum ( · ) is a popular aggregation rule to deal with these node attacks . We shall propose Tmean ( · ) as alternative aggregation rules . 3 PRELIMINARY AND PROBLEM SETUP . 3.1 FEDERATED LEARNING SETTING . Federated learning was first proposed in ( Konečnỳ et al. , 2016 ) , where the prevalent asynchronous SGD is used to update a global model in a distributed fashion . A pioneering work in this field proposed the currently most widely used algorithm , FedAvg ( McMahan et al. , 2017 ) , which is also the first synchronous algorithm dedicated to federated setting . Recent studies attempt to expand federated learning with the aim of providing learning in more diverse and practical environments Server : Initialize x0 ← rand ( ) ; for t = 0 , 1 , . . . , T do Broadcast x ( t ) to all the workers ; Wait until all the gradients ṽ ( t ) 1 , ṽ ( t ) 2 , . . . , ṽ ( t ) m arrive ; Compute G ( t ) = Aggr ( ṽ ( t ) 1 , ṽ ( t ) 2 , . . . , ṽ ( t ) m ) ; Update the parameter x ( t+1 ) ← x ( t ) − γ ( t ) G ( t ) ; end Worker : for t = 0 , 1 , . . . , T do Receive x ( t ) from the server ; Compute and send the local randomized gradient v ( t ) = ∇F ( x ( t ) , ξk ) to the server ; end Algorithm 1 : Distributed synchronous SGD with robust aggregation server . such as multi-task learning , generative models , continual learning , and data with noisy labels . However , these algorithms may obtain suboptimal performance when miners participating in FL have non-independently and identical distributions ( non-i.i.d . ) ( Zhao et al. , 2018 ) . While the convergence of FedAvg on such settings was initially shown by experiments in ( McMahan et al. , 2017 ) , it does not guarantee performance as good as that in an i.i.d . setting . These algorithms pointed out the issue have major limitations , such as privacy violation by partial global sharing of local data ( Zhao et al. , 2018 ) or no indication of improvement over baseline algorithms such as FedAvg ( Hsieh et al. , 2020 ) . Our paper focuses on a general federated setting . In order to better study the problem of aggregation in federated learning , we consider the following optimization problem : min x∈Rd F ( x ) , ( 1 ) where F ( x ) = Eξ∼D [ f ( x ; ξ ) ] is a smooth convex function , ξ is sampled from some unknown distribution D. Ideally , the problem ( 1 ) can be solved by the gradient descent method as x ( t+1 ) ← x ( t ) − γ ( t ) ∇F ( x ( t ) ) , ( 2 ) where γ ( t ) is the learning rate at t-th round . We assume that there exists at least one minimizer of F ( x ) , denoted by x∗ , that satisfies∇F ( x∗ ) = 0 . The problem ( 1 ) is solved in a distributed manner with m miner nodes , and up to q of them may be Byzantine nodes . The detailed algorithm of distributed synchronous SGD with aggregation rule Aggr ( · ) is shown in Algorithm 1 . In each iteration , each miner samples n i.i.d . data points from the distribution D , and computes the gradient of the local empirical loss . Using a certain aggregation rule Aggr ( · ) , the server collects and aggregates the gradients sent by the miners , and estimate the gradient through ∇F ( x ( t ) ) ≈ Aggr ( v1 , v2 , . . . , vm ) . Without Byzantine failures , the k-th worker calculates v ( t ) k ∼ G ( t ) , where G ( t ) = ∇f ( x ( t ) , ξ ) . When there exist Byzantine faults , v ( t ) k can be replaced by any arbitrary value ṽ ( t ) k , and hence ∇F ( x ( t ) ) ≈ Aggr ( ṽ1 , ṽ2 , . . . , ṽm ) . ( 3 ) | This paper considers the trimmed mean function as the aggregation rule for the byzantine resilient distributed learning. The authors provide a theoretical convergence for strongly convex objectives. Besides, the authors empirically compare trimmed mean with krum and average. | SP:3749845c5e03850aef1476d5310628a4a1fd6c8e |
Orthogonalising gradients to speedup neural network optimisation | 1 INTRODUCTION Neural network layers are made up of several identical , but differently parametrised , components , e.g . filters in a convolutional layer , or heads in a multi-headed attention layer . Layers consist of several components so that they can provide a diverse set of intermediary representations to the next layer , however , there is no constraint or bias , other than the implicit bias from the cost function , to learning different parametrisations . We introduce this diversification bias in the form of orthogonalised gradients and find a resultant speed-up in learning and sometimes improved performance , see fig . 1 . Our novel contributions include this new optimisation method , thorough testing on CIFAR10 and ImageNet , additional testing on a semi-supervised learning method , and experiments to support our hypothesis . In section 2 we detail the method and results to give an understanding of how this method works and its capabilities . Then , in section 3 , we provide experimental justifications and supporting experiments for this method along with finer details of the implementation and limitations . 2 OVERVIEW OF NEW METHOD AND RESULTS . 2.1 RELATED WORKS . Gradient orthogonalisation has been explored in the domain of multi-task learning ( Yu et al. , 2020 ) to keep the different tasks separate and relevant . However in this work we focus on orthogonalisation for improving single task performance . Weight orthogonalisation has been extensively explored with both empirical ( Bansal et al. , 2018 ; Jia et al. , 2017 ) and theoretical ( Jia et al. , 2019 ) justifications . However , modifying the weights during training is unstable , and , in addition , it limits the weights to a tiny subspace . Deep learning is know to work well despite the immense size of the weight space , and as such we do not view this as an advantage . Xie et al . ( 2017 ) obtain improved performance over Stochastic Gradient Descent ( SGD ) via weight orthogonalisation and allows them to train very deep networks , we aim to achieve the same thing while being more flexible with model and optimisation method choice . We do this by orthogonalising the gradients before they are used by an optimisation method rather than modifying the weights themselves . 2.2 ORTHOGONALISING GRADIENTS . Given a neural network , f , with L layers made from components , c , f = ◦Li=1 ( fi ) , ( 1 ) fl ( x ) = [ cl1 ( x ) , cl2 ( x ) , . . . , clNl ( x ) ] , ( 2 ) where ◦ is the composition operator , Nl is the number of components in layer l , cl : RSl−1×Nl−1 → RSl is a parametrised function and cli denotes cl parametrised with θli ∈ RPl giving fl : RSl−1×Nl−1 → RSl×Nl parametrised by θl ∈ RPl×Nl . Let Gl = [ ∇cl1 , ∇cl2 , . . . , ∇clNl ] , ( 3 ) be the Pl ×Nl matrix of the components ’ gradients . Then the nearest orthonormal matrix , i.e . the orthonormal matrix , Ol , that minimises the Frobenius norm of its difference from Gl min Ol ‖Ol −Gl‖ subject to ∀i , j : 〈 Oli , Olj 〉 = δij , where δij is the Kronecker delta function , is the product of the left and right singular vector matricies from the Singular Value Decomposition ( SVD ) of Gl ( Trefethen & Bau III , 1997 ) , Gl = UlΣlV T l , ( 4 ) Ol = UlV T l . ( 5 ) Thus , we can adjust a first-order gradient descent method , such as Stochastic Gradient Descent with Momentum ( SGDM ) ( Polyak , 1964 ) , to make steps where the components are pushed in orthogonal directions , v ( t+1 ) l = γv ( t ) l + ηO ( t ) l , and ( 6 ) θ ( t+1 ) l = θ ( t ) l − v ( t+1 ) l , ( 7 ) where vl is the velocity matrix , t ∈ Z0+ is the time , γ is the momentum decay term , and η is the step size . We call this method Orthogonal Stochastic Gradient Descent with Momentum ( OrthogonalSGDM ) . This modification can clearly be applied to any first-order optimisation algorithm by replacing the gradients with O ( t ) l before the calculation of the next iterate . Code for creating orthogonal optimisers in PyTorch is provided at https : //anonymous . 4open.science/r/Orthogonal-Optimisers . And code for the experiments in this work is provided at https : //anonymous.4open.science/r/ Orthogonalised-Gradients 2.3 RESULTS . 2.3.1 CIFAR-10 . We trained a suite of models on the CIFAR-10 ( Krizhevsky et al. , 2009 ) data set with a mini-batch size of 1024 , learning rate of 10−2 , momentum of 0.9 , and a weight decay of 5 × 10−4 for 100 epochs . We then repeated this using Orthogonal-SGDM instead of SGDM and plot the results in figs . 2 and 3 and table 1 . Orthogonal-SGDM is more efficient and achieves better test accuracy than SGDM for every model we trained on CIFAR-10 without hyper-parameter tuning . The validation curves follow the training curves , figs . 4 and 5 , and have the same patterns , this means that Orthogonal-SGDM exhibits the same generalisation performance as SGDM . More importantly though , we can see that the model 1As described in appendix B.1 2Model same as in He et al . ( 2015 ) 3From https : //pytorch.org/vision/0.9/models.html learns much faster at the beginning of training , as shown by fig . 2 , this means that we do not need as many epochs to get to a well-performing network . This is especially good in light of the large data sets that new models are being trained on , where they are trained for only a few epochs , or even less ( Brown et al. , 2020 ) . For SGDM the performance of the residual networks designed for ImageNet ( Deng et al. , 2009 ) ( 18 , 34 , 50 ) get worse as the models get bigger . The original ResNet authors , He et al . ( 2015 ) , note that unnecessarily large networks may over-fit on a small data set such as CIFAR-10 . However , when trained with Orthogonal-SGDM , these models do not suffer from this over-parametrisation problem and even slightly improve in performance as the models get bigger , in clear contrast to SGDM . This agnosticism to over-parametrisation helps alleviate the need for the practitioner to tune a model ’ s architecture to the task at hand to achieve a reasonable performance . 2.3.2 MATCHING RESNET ’ S PERFORMANCE . Having shown that Orthogonal-SGDM speeds up learning with non-optimised hyper-parameters , we now aim to show that it can achieve state-of-the-art results . To do this we use the same hyperparameters as the original ResNet paper ( He et al. , 2015 ) , which have been painstakingly tuned to benefit SGDM , to train using Orthogonal-SGDM . This also tests the efficacy of Orthogonal-SGDM as a drop-in replacement for SGDM . OrthogonalSGDM gets close to the original results , table 2 , even though the hyper-parameters are perfected for SGDM . It is the authors ’ belief that with enough hyper-parameter tuning SGD or SGDM will be the best optimisation method ; however , this experiment shows that Orthogonal-SGDM is robust to hyper-parameter choice and can easily replace SGDM in existing projects . Unfortunately , the authors do not have the compute-power to extensively hyper-parameter tune a residual network for Orthogonal-SGDM , however , it is exceedingly likely that better results would be achieved by doing so . 2.3.3 IMAGENET . Orthogonal-SGDM also works on a large data set such as ImageNet ( Deng et al. , 2009 ) — fig . 6 . Using a resnet34 , mini-batch size of 1024 , learning rate of 10−2 , momentum of 0.9 , and a weight decay of 5×10−4 , for 100 epochs . SGDM achieves a test accuracy of 61.9 % and a test loss of 1.565 while Orthogonal-SGDM achieves 67.5 % and 1.383 respectively . While these results are a way off the capabilities of the model they still demonstrate a significant speed-up and improvement from using Orthogonal-SGDM , especially at the start of learning , and further reinforces how a dearth of hyper-parameter tuning impedes performance . 2.3.4 BARLOW TWINS . Barlow Twins ( Zbontar et al. , 2021 ) is a semi-supervised method that uses “ the cross-correlation matrix between the outputs of two identical networks fed with distorted versions of a sample ” to avoid collapsing to trivial solutions . While the authors do provide code , we could not replicate their results by running it . To train within our compute limitations we used a mini-batch size of 1024 instead of 2048 however this should not affect the results since “ Barlow Twins does not require large batches ” ( Zbontar et al. , 2021 ) . Additionally , Barlow Twins uses the Layer-wise Adaptive Rate Scaling ( LARS ) algorithm ( You et al. , 2017 ) , which is designed to adjust the learning rate based on the ratio between the magnitudes of the gradients and weights , there should be no significant slowdown , or speed-up , in learning due to the mini-batch size . We do not orthogonalise the gradients for the dense layers ( see section 3.5 ) . Comparing our own runs , we establish that orthogonalising the gradients before the LARS algorithm does speed up learning as shown in fig . 7 , in agreement with previous experiments . This is evidence that orthogonalising gradients is also beneficial for semi-supervised learning and , moreover , that optimisation algorithms other than SGDM can be improved in this way . 2.3.5 IN COMPARISON TO ADAM . We compare our method to the Adam optimiser ( Kingma & Ba , 2014 ) . Adam has found its place as a reliable optimiser that works over a wide variety of hyper-parameter sets , yielding consistent performance with little fine-tuning needed . We see our optimisation method occupying the same space as Adam . Our method outperforms Adam on all but one hyper-parameter set — table 3 . In addition since we can apply our method to any previous optimisation method , we also test Orthogonal-Adam and find that it outperforms Adam too including at high learning rates where Adam suffers from blow-ups . See figs . 13 and 14 for the training plots . 3 DISCUSSION OF PROBLEM AND METHOD . 3.1 NORMALISATION . When we perform SVD on the reshaped gradient tensor , we obtain an orthonormal matrix , since this changes the magnitude of the gradient we look at the effect of this normalisation . Normalised SGDM ( N-SGDM ) ( Nesterov , 2003 ) provides an improvement in non-convex optimisation since it is difficult to get stuck in a local minimum as the step size is not dependent on the gradient magnitude . However , it hinders convergence to a global minimum since there is no way of shortening the step size ; deep learning is highly non-convex and is unlikely to be optimised to a global minimum . Therefore , it stands to reason that normalising the gradient would speed up the optimisation of deep networks . We compare N-SGDM to normalising the gradients per component — i.e . normalising the columns of Gl , eq . ( 3 ) , instead of orthognormalising it — Component Normalised SGDM ( CN-SGDM ) , as well as to SGDM and Orthogonal-SGDM . N-SGDM improves over SGDM , and CN-SGDM improves over N-SGDM except from the oft case where it diverges . Finally , Orthogonal-SGDM obtains the best solutions while remaining stable on all the models . | This paper proposes to orthogonalize the gradients of each neuron (within a layer) in order to improve training dynamics. They build on the assumption that neurons in a layer tend to learn similar features early in the training, and thus pushing them in orthogonal directions would yield to better results. The method requires calculating SVD on gradients at every iteration, thus unlikely to be practical (no FLOPs/run-time discussion). Training curves on Cifar10 and Imagenet shows faster convergence and better generalization. | SP:a1ddf78410fb02d91305db84d2423308a600eb0e |
The MultiBERTs: BERT Reproductions for Robustness Analysis | Experiments with pre-trained models such as BERT are often based on a single checkpoint . While the conclusions drawn apply to the artifact tested in the experiment ( i.e. , the particular instance of the model ) , it is not always clear whether they hold for the more general procedure which includes the architecture , training data , initialization scheme , and loss function . Recent work has shown that repeating the pre-training process can lead to substantially different performance , suggesting that an alternative strategy is needed to make principled statements about procedures . To enable researchers to draw more robust conclusions , we introduce MultiBERTs , a set of 25 BERT-Base checkpoints , trained with similar hyper-parameters as the original BERT model but differing in random weight initialization and shuffling of training data . We also define the Multi-Bootstrap , a non-parametric bootstrap method for statistical inference designed for settings where there are multiple pre-trained models and limited test data . To illustrate our approach , we present a case study of gender bias in coreference resolution , in which the Multi-Bootstrap lets us measure effects that may not be detected with a single checkpoint . The models and statistical library are available online,1 along with an additional set of 140 intermediate checkpoints captured during pretraining to facilitate research on learning dynamics . 1 INTRODUCTION . Contemporary natural language processing ( NLP ) relies heavily on pretrained language models , which are trained using large-scale unlabeled data ( Bommasani et al. , 2021 ) . BERT ( Devlin et al. , 2019 ) is a particularly popular choice : it has been widely adopted in academia and industry , and aspects of its performance have been reported on in thousands of research papers ( see , e.g. , Rogers et al. , 2020 , for an overview ) . Because pre-training large language models is computationally expensive ( Strubell et al. , 2019 ) , researchers often rely on the release of model checkpoints through libraries such as HuggingFace Transformers ( Wolf et al. , 2020 ) , which enable them to use large-scale language models without repeating the pre-training work . Consequently , most published results are based on a small number of publicly released model checkpoints . While this reuse of model checkpoints has lowered the cost of research and facilitated head-to-head comparisons , it limits our ability to draw general scientific conclusions about the performance of a particular class of models ( Dror et al. , 2019 ; D ’ Amour et al. , 2020 ; Zhong et al. , 2021 ) . The key issue is that reusing model checkpoints makes it hard to generalize observations about the behavior of a single model artifact to statements about the underlying pre-training procedure which created it . Pre-training such models is an inherently stochastic process which depends on the initialization of the model ’ s parameters and the ordering of training examples ; for example , D ’ Amour et al . ( 2020 ) report substantial quantitative differences across multiple checkpoints of the same model architecture on several “ stress tests ” ( Naik et al. , 2018 ; McCoy et al. , 2019 ) . It is therefore difficult to know how much of the success of a model based on the original BERT checkpoint is due to BERT ’ s design , and how much is due to idiosyncracies of a particular artifact . Understanding this difference is critical if we are to generate reusable insights about deep learning for NLP , and improve the state-of-the-art going forward ( Zhou et al. , 2020 ; Dodge et al. , 2020 ; Aribandi et al. , 2021 ) . 1http : // [ anonymized ] This paper describes MultiBERTs , an effort to facilitate more robust research on the BERT model . Our primary contributions are : • We release MultiBERTs , a set of 25 BERT-Base checkpoints to facilitate studies of robustness to parameter initialization and order of training examples ( §2 ) . Releasing these models preserves the benefits to the community of a single checkpoint release ( i.e. , low cost of experiments , apples-to-apples comparisons between studies based on these checkpoints ) , while enabling researchers to draw more general conclusions about the BERT pre-training procedure . • We present the Multi-Bootstrap , a non-parametric method to quantify the uncertainty of experimental results based on multiple pre-training seeds ( §3 ) , and provide recommendations for how to use the Multi-Bootstrap and MultiBERTs in typical experimental scenarios . We implement these recommendations in a software library . • We illustrate the approach with a practical use case : we investigate the impact of counterfactual data augmentation on gender bias , in a BERT-based coreference resolution systems ( Webster et al. , 2020 ) ( §4 ) . Additional examples are provided in Appendix E , where we document challenges with reproducing the widely-used original BERT checkpoint . The release also includes an additional 140 intermediate checkpoints , captured during training for 5 of the runs ( 28 checkpoints per run ) , to facilitate studies of learning dynamics . Our checkpoints and statistical libraries are available at : http : // [ anonymized ] . Additional Related Work . The MultiBERTs release builds on top of a large body of work that seeks to analyze the behavior of BERT ( Rogers et al. , 2020 ) . In addition to the studies of robustness cited above , several authors have introduced methods to reduce BERT ’ s variability during finetuning ( Zhang et al. , 2021 ; Mosbach et al. , 2021 ; Dodge et al. , 2020 ; Lee et al. , 2020 ; Phang et al. , 2018 ) . Other authors have also studied the time dimension , which motivates our release of intermediate checkpoints ( Liu et al. , 2021 ; Hao et al. , 2020 ; Saphra & Lopez , 2019 ; Chiang et al. , 2020 ; Dodge et al. , 2020 ) . Similarly to §3 , authors in the NLP literature have recommended best practices for statistical testing ( Koehn , 2004 ; Dror et al. , 2018 ; Berg-Kirkpatrick et al. , 2012 ; Card et al. , 2020 ; Søgaard et al. , 2014 ; Peyrard et al. , 2021 ) , many of which are based on existing tests to estimate the uncertainty of test sample . In concurrent work , Deutsch et al . ( 2021 ) considered bootstrapping methods similar to the Multi-Bootstrap , in the context of summarization metrics evaluation . Also in concurrent work , the Mistral ( Karamcheti et al. , 2021 ) project released a set of 10 GPT-2 models with intermediate checkpoints at different stages of pre-training . Our work is complementary , focusing on BERT , introducing a larger number of pre-training seeds , and presenting a methodology to draw robust conclusions about model performance . 2 RELEASE DESCRIPTION . We first describe the MultiBERTs release : how the checkpoints were trained and how their performance compares to the original BERT on two common language understanding benchmarks . 2.1 TRAINING . Overview . The MultiBERTs checkpoints are trained following the code and procedure of Devlin et al . ( 2019 ) , with minor hyperparameter modifications necessary to obtain comparable results on GLUE ( Wang et al. , 2019 ) ; a detailed discussion of these differences is provided in Appendix E. We use the BERT-Base , Uncased architecture with 12 layers and embedding size 768 . We trained the models on a combination of BooksCorpus ( Zhu et al. , 2015 ) and English Wikipedia . Since the exact dataset used to train the original BERT is not available , we used a more recent version that was collected by Turc et al . ( 2019 ) with the same methodology . Checkpoints . We release 25 models trained for two million steps each , each training step involving a batch of 256 sequences . For five of these models , we release 28 additional checkpoints captured over the course of pre-training ( every 20,000 training steps up to 200,000 , then every 100,000 steps ) . In total , we release 165 checkpoints , about 68 GB of data . Training Details . As in the original BERT paper , we used batch size 256 and the Adam optimizer ( Kingma & Ba , 2014 ) with learning rate 1e-4 and 10,000 warm-up steps . We used the default values for all the other parameters , except the number of steps , which we set to two million , and sequence length , which we set to 512 from the beginning with up to 80 masked tokens per sequence.2 We follow the BERT code and initialize the layer parameters from a truncated Normal distribution , using mean 0 and standard deviation 0.02 . We train using the same configuration as Devlin et al . ( 2019 ) 3 , with each run taking about 4.5 days on 16 Cloud TPU v2 chips . Environmental Impact Statement . We estimate compute costs at around 1728 TPU-hours for each pre-training run , and around 208 GPU-hours plus 8 TPU-hours for associated fine-tuning experiments ( §2.2 , including hyperparameter search and 5x replication ) . Using the calculations of Lacoste et al . ( 2019 ) 4 , we estimate this as about 250 kg CO2e for each of our 25 models . Counting the 25 runs each of CDA-incr and CDA-full from §4 , associated coreference models ( 20 GPU-hours per pretraining model ) , and additional experiments of Appendix E , this gives a total of about 12.0 metric tons CO2e before accounting for offsets or clean energy . Based on the report by Patterson et al . ( 2021 ) of 78 % carbon-free energy in Google Iowa ( us-central1 ) , we estimate that reproducing these experiments would emit closer to 2.6 tons CO2e , or slightly more than two passengers on a round-trip flight between San Francisco and New York . By releasing the trained checkpoints publicly , we aim to enable many research efforts on reproducibility and robustness without requiring this cost to be incurred for every subsequent study . 2.2 PERFORMANCE BENCHMARKS GLUE Setup . We report results on the development sets of the GLUE tasks : CoLA ( Warstadt et al. , 2019 ) , MNLI ( matched ) ( Williams et al. , 2018 ) , MRPC ( Dolan & Brockett , 2005 ) , QNLI ( v2 ) ( Rajpurkar et al. , 2016 ; Wang et al. , 2019 ) , QQP ( Chen et al. , 2018 ) , RTE ( Bentivogli et al. , 2009 ) , SST2 ( Socher et al. , 2013 ) , and SST-B ( Cer et al. , 2017 ) . In all cases we follow the same approach as Devlin et al . ( 2019 ) . For each task , we fine-tune BERT for 3 epochs using a batch size of 32 . We run a parameter sweep on learning rates [ 5e-5 , 4e-5 , 3e-5 , 2e-5 ] and report the best score . We run the procedure five times for each of the 25 models and average the results . 2Specifically , we keep the sequence length constant ( the paper uses 128 tokens for 90 % of the training then 512 for the remaining 10 % ) to expose the model to more tokens and simplify the implementation . As we were not able to reproduce original BERT exactly using either 1M or 2M steps ( see Appendix E for discussion ) , we release MultiBERTs trained with 2M steps under the assumption that higher-performing models are more interesting objects of study . 3We train with TensorFlow ( Abadi et al. , 2015 ) version 2.5 in v1 compatibility mode . 4https : //mlco2.github.io/impact/ SQuAD Setup . We report results on the development sets of SQuAD versions 1.1 and 2.0 ( Rajpurkar et al. , 2016 ; 2018 ) , using a setup similar to that of Devlin et al . ( 2019 ) . For both sets of experiments , we use batch size 48 , learning rate 5e-5 , and train for 2 epochs . Results . Figures 1 and 2 show the distribution of the MultiBERTs models ’ performance on the development sets of GLUE and SQuAD , in comparison to the original BERT checkpoint.5 On most tasks , original BERT ’ s performance falls within the same range as MultiBERTs ( i.e. , original BERT is between the minimum and maximum of the MultiBERTs ’ scores ) . However , original BERT outperforms all MultiBERTs models on QQP , and under-performs them on SQuAD . The discrepancies may be explained by both randomness and differences in training setups , as investigated further in Appendix E. To further illustrate the performance variability inherent to pre-training and fine-tuning , we analyze the instance-level agreement between the models in Appendix C . | Many tasks in contemporary NLP begin by building off of a large language model. This can cast the downstream task as a sort of fine-tuning experiment, whereby the results are heavily influenced by conditioning on the starting point of a single pre-trained version of an LLM. In this work, the authors take BERT as an example, and ask how much a specific artifact as a draw from the distribution over (model weights, initialization scheme, training data, loss function) affects downstream tasks built upon it. The authors provide a wide variety of BERT models that are varied in their training and initalization. They define a bootstrap procedure for the scenario where multiple instantiations of base models are available, and tie their findings together in a case study of gender bias in coreference resolution. | SP:7c5d3b908b218663706b12dddbfb60a57afb7077 |
Text Generation with Efficient (Soft) $Q$-Learning | 1 INTRODUCTION . Recent natural language generation systems have made remarkable progress in producing wellformed coherent text , especially with the massive pretrained language models ( LMs ) ( Radford et al. , 2019 ; Brown et al. , 2020 ; Lewis et al. , 2020 ; Raffel et al. , 2019 ) . Those models are typically trained using maximum likelihood estimation ( MLE ) with a large amount of data supervisions . Despite its successful outcomes , the standard training method suffers from limited applicability to many emerging text generation problems , where little or no supervised data is available . Prominent examples of such low-data problems include generating prompts to control the massive LMs ( Yin et al. , 2019 ; Shin et al. , 2020 ; Zhong et al. , 2021 ) , learning text generation from noisy or even negative data , generating adversarial text attacks for robustness study ( Wallace et al. , 2019 ; Atanasova et al. , 2020 ) , and others ( Figure 1 , right ) . Due to the failure of standard MLE , people have had to devise specialized algorithms for those problems respectively . On the other hand , reinforcement learning ( RL ) ( Sutton & Barto , 2018 ) offers an alternative principled framework for learning from arbitrary reward functions , and has achieved great advances in robotic and game control . However , RL by far has made limited success for training text generation , primarily due to the key challenges of sparse reward ( i.e. , a single reward signal is received only after the whole text sequence is generated ) and large action space ( i.e. , a vocabulary of millions of words ) . For instance , a popular family of RL algorithms studied extensively for text generation is the policy-based ( Williams , 1992 ) or actor-critic based ( Bahdanau et al. , 2016 ; Rennie et al. , 2017 ) algorithms , with policy gradient ( PG ) being the most prevalent example ( Ranzato et al. , 2016 ; Li et al. , 2016 ; Rennie et al. , 2017 ; Tan et al. , 2018 ; Pasunuru & Bansal , 2018 ; Paulus et al. , 2018 ) . Those algorithms train the model with on-policy updates , i.e. , the text samples used for estimating policy gradients are from the target model itself . Due to the exponentially large space of sequences , onpolicy updates often suffer from extremely high variance and low data efficiency ( e.g. , most model samples are not useful for learning ) . Thus directly training with PG from scratch is usually impossible . In practice , the model has to be initialized by MLE training , followed by PG as finetuning , which often leads to limited improvement ( Choshen et al. , 2020 ; Wu et al. , 2018 ) . Another set of work has resorted to off-policy RL . The key advantage is that samples from other sources , e.g. , human-written text , can be used , making them more data efficient than on-policy methods . Previous work has used either importance weighted PG ( Pang & He , 2021 ; Zhou et al. , 2017 ; Kandasamy et al. , 2017 ) or Q-learning based algorithms ( Guo , 2015 ; Jaques et al. , 2020 ; Narasimhan et al. , 2015 ) . However , off-policy methods have been considered to be less stable . For example , theQ-learning performance relies heavily on how accurate the learnedQ-function assesses the quality of intermediate subsequences – a challenging task due to the sparse reward signals . In this paper , we develop a new RL formulation for text generation that tackles the above issues ( Figure 1 , left ) . We reframe the text generation problem from the soft Q-learning perspective originally developed in robotics ( Haarnoja et al. , 2017 ; Schulman et al. , 2017 ) . The resulting connection allows us to seamlessly take advantage of the latest successful techniques from the RL literature . In particular , we introduce and adapt the principled path consistency learning ( Nachum et al. , 2017 ) to text generation , that ( 1 ) offers a natural way to train the model with both on- and off-policy updates , hence combining the best of the two strategies , ( 2 ) bridges the sparse reward signal to directly supervise the Q function learning , leading to more accurate Q estimation and credit assignment , and ( 3 ) makes efficient updates to Q-values by considering all candidate actions together . The generality and efficiency of the proposed method allows us to train text generation in a wide range of applications : ( 1 ) With noisy and negative training examples , our approach learns to generate accurate entailment text that greatly improves upon the data itself as well as other various training methods ; ( 2 ) Our approach also manages to train an effective adversarial text generator for robustness test for classifiers ; ( 3 ) We train a prompt generator with our algorithm to achieve controllable generation of pretrained LMs in terms of topics . On all the three tasks , our approach consistently improves over not only previous RL algorithms for text generation , but also diverse task-specialized methods designed specifically for each of the problems , respectively . In the appendix ( §A.1.4 ) , we also show that on standard supervised tasks where MLE prevails , our approach is competitive to train text generation models from scratch , which was usually impossible for previous RL algorithms . 2 BACKGROUND AND CHALLENGES . The goal of text generation is to produce coherent text y = ( y0 , ... , yT ) of certain properties for a given task , where yt is a token from a vocabulary V , and T is the text length . The generation can condition on arbitrary input context , which we omit for simplicity of notations . We aim to learn a generation model pθ ( y ) which is typically decomposed autoregressively as pθ ( y ) = ∏T t=0 pθ ( yt | y < t ) , where y < t = ( y0 , ... , yt−1 ) is the prefix , and the distribution at each step t is obtained by applying the softmax function on the output logits : pθ ( yt | y < t ) = exp fθ ( yt | y < t ) ∑ y′∈V exp fθ ( y ′ | y < t ) . ( 1 ) Here fθ ( y | y < t ) is the logit of token y computed by the generation model . Given a training example y∗ , maximum likelihood training ( MLE ) updates the model with the gradient ∇θLMLE ( θ ) = ∑T t=0∇θ log pθ ( y∗t | y∗ < t ) . Despite its popularity , MLE-based training only applies when clean supervised data y∗ is available , and can not be used to optimize arbitrary task metrics ( e.g. , BLEU , entailment score ) which are typically the goal in many text generation tasks . 2.1 REINFORCEMENT LEARNING ( RL ) FORMULATIONS FOR TEXT GENERATION . Notations . Previous research has formulated text generation as an RL problem by considering the following finite-time Markov Decision Process ( MDP ) . At each time step t , let the “ state ” be st = y < t , namely the partial sequence generated so far . The model , also known as the “ agent ” , takes as input the current state st and outputs a token , also called “ action ” , at ∈ V according to a policy π ( at | st ) . The agent then receives a reward rt = r ( st , at ) and deterministically transitions to next state st+1 ( i.e. , the concatenation of the tokens in st and the new token at ) . Following the notation convention in RL , let τ be the trajectory ( i.e. , text sample ) generated by the policy . The agent ’ s objective is to maximize the accumulative reward , J ( π ) = Eτ∼π [ ∑T t=0 γ trt ] , where γ ∈ ( 0 , 1 ] is the discount factor . A central concept in RL is the Q-function of policy π , defined as Qπ ( st , at ) = Eπ [ ∑T t′=t γ t′rt′ | st , at ] , which is the expected future reward of taking action at ( i.e. , generating token at ) in state st and continuing with the policy π . Challenges . Text generation poses significant challenges to RL , particularly because ( 1 ) the reward signal is usually sparse , i.e. , rt = 0 , ∀t < T and the agent receives a non-zero reward rT only after it generates the full sequence , ( 2 ) the action space ( i.e. , the vocabulary V ) is extremely large , often containing millions of words . The challenges have led to difficulties of the two major families of RL approaches applied to text generation problems , as detailed below . Policy-based RL techniques directly parameterize the policy πθ with parameters θ . Thus the policy πθ ( at | st ) exactly corresponds to the above generation model pθ ( yt | y < t ) . Policy gradient ( PG ) is one of the most widely used algorithms for text generation ( Ranzato et al. , 2016 ) . It optimizes the cumulative reward with the policy gradient : ∇θJ ( πθ ) = −Eτ∼πθ [ ∑T t=0 Q̂ ( st , at ) ∇θ log πθ ( at | st ) ] , ( 2 ) where Q̂ ( st , at ) is the estimated Qπθ value with sample τ . Notice that the expectation is taken w.r.t . the policy πθ , which makes PG an on-policy algorithm , meaning that the sample τ needs to come from the the current policy πθ itself . In practice , however , optimizing this objective alone from scratch is unlikely going to work because most samples τ ∼ πθ are just gibberish with zero reward , failing to provide meaningful training signals for updating the policy . Previous literature either initializes the policy πθ with MLE training , and/or use a combination of MLE and PG updates , which often leads to marginal gains in practice ( Wu et al. , 2018 ; Choshen et al. , 2020 ) . Value-based RL techniques , such as Q-learning , implicitly learn the policy π by approximating the value Qπ ( s , a ) directly . Specifically , let Q∗ ( s , a ) = maxπ Qπ ( s , a ) denote the optimal value over policies . Thus the optimal policy π∗ is simply taking the action of maximal Q∗ value at each state . The approximation of Q∗ is based on the well-known Bellman temporal consistency : Q∗ ( st , at ) = rt + γmaxat+1 Q ∗ ( st+1 , at+1 ) . ( 3 ) Deep Q-learning ( Mnih et al. , 2013 ) parameterizes the Q-function as Qθ ( x , a ) ( e.g. , a neural network ) , and train the parameters by minimizing the following regression objective : L ( θ ) = Eπ′ [ 0.5 · ( rt + γmaxat+1 Qθ̄ ( st+1 , at+1 ) −Qθ ( st , at ) ) 2 ] , ( 4 ) Single-Step PCL Training Multi-Step PCL Training . . . sequence reward . . . sequence reward Figure 2 : SoftQ-Learning with path consistency learning ( PCL ) objectives , where we illustrate with a vocabulary of size 3 . Left : Single-step objective ( Eq.9 ) , where for each ( st , at ) , the computation involves step t and t+1 . Dashed boxes in dark green and gray indicate the regression target , where the intermediate reward rt is often 0 due to sparsity . The gradient is applied to parameters θ at step t ( indicated by orange color ) . Right : Multi-step objective ( Eq.11 ) which aggregates from step t all the way to T . In this way , the final-step non-zero reward rT is used as the regression target . where θ̄ is the parameters of the target Q-network , which is a slow copy of θ and considered as constant for gradient computation of θ . Here π′ is an behavior policy which can be an arbitrary distribution over text , such as the data distribution or replay buffer ( Mnih et al. , 2013 ) . This makes Q-learning an off-policy algorithm because of its ability to use samples coming from other policies . After learning Qθ , one can induce a policy π from it that takes arg maxaQθ ( s , a ) at each state s. Jaques et al . ( 2017 ) instead sample tokens from the softmax function applied to Qθ . However , the training can be unstable and inefficient due to several challenges : ( 1 ) The bootstrapping nature of the above regression problem can make the training unstable . That is , the regression target rt + γmaxat+1 Qθ̄ ( st+1 , at+1 ) itself is derived from the Q-function to be learned ( Kumar et al. , 2019 ) . The problem is exacerbated in the presence of sparse reward in text generation , where the real observed signal rt is zero for all intermediate t < T ; ( 2 ) The large action space ( e.g. , 104 ) in text generation results in slow updates . In particular , notice that Eq . ( 4 ) applies the gradient update to the Qθ-value of the only one particular token at ( out of the 104 candidate tokens in the vocabulary ) , making the training inefficient ; ( 3 ) Besides , pure off-policy updates could be highly sensitive to the quality of training data , and miss the opportunity of on-policy exploration that maximizes the reward of interest in a more direct way . 3 THE SOFT Q-LEARNING FRAMEWORK In this section , we combat the difficulties of previous RL methods by introducing the softQ-learning ( SQL ) formulation of text generation . We show that the formulation is seamlessly compatible with the common architecture of text generation model ( Eq.1 ) , permitting easy implementation ( §3.1 ) . The formulation further allows us to integrate the latest advances in RL , notably path consistency learning ( Nachum et al. , 2017 ) that makes the RL training efficient and stable in practice ( §3.2 ) . Figure 2 and Algorithm 1 summarizes the resulting SQL framework for efficient training . 3.1 SOFT Q-LEARNING FORMULATION FOR TEXT GENERATION SoftQ-learning ( Haarnoja et al. , 2017 ; Schulman et al. , 2017 ; Nachum et al. , 2017 ) is an maximumentropy ( MaxEnt ) extension to the standard ( hard ) Q-learning ( Mnih et al. , 2015 ; Sutton & Barto , 2018 ) . Under this framework , the agent is encouraged to optimize the reward while staying as stochastic as possible , with the objective JMaxEnt ( π ) = Eτ∼π [ ∑T t=0 γ trt + αH ( π ( · | st ) ) ] , which augments the vanilla J ( π ) with the additional Shannon entropy term H with coefficient α.1 This is appealing because it seamlessly connects the Q-values to the familiar output logits of a text generation model , which enables straightforward implementation of the SQL formulation . Q-values as Generation Model Logits . We show the connection of the Q-values with the logits , i.e. , the model outputs right before the softmax layer . Concretely , with the SQL objective , the following relationship between optimal policy π∗ and action-value Q∗ holds ( Haarnoja et al. , 2017 ; Schulman et al. , 2017 ) : π∗ ( a | s ) = expQ ∗ ( s , a ) ∑ a′ expQ ∗ ( s , a′ ) . ( 5 ) 1WLOG , we can assume α=1 , as it can be folded into the reward function by scaling the latter with 1/α . This form is highly reminiscent of the softmax layer of the generation model in Eq. ( 1 ) . The connection suggests that we can naturally parameterize the Q-function in SQL as the generation model logit function , i.e. , Qθ ( s , a ) ≡ fθ ( a | s ) . In other words , the model output fθ ( a | s ) , originally interpretted as the “ logit ” of token a given the preceding tokens s , is now re-interpretted as the Qvalue of action a in state s. When achieving optimality , fθ∗ ( a | s ) , namely Q∗ ( s , a ) , represents the best possible future reward achievable by generating token a in state s. Similarly , the full generation model pθ ( a | s ) in Eq . ( 1 ) that applies softmax to fθ now precisely corresponds to the policy πθ induced from Qθ ( s , a ) . That is , πθ ( a | s ) = expQθ ( s , a ) ∑ a′ expQθ ( s , a ′ ) ≡ exp fθ ( a | s ) ∑ a′ exp fθ ( a ′ | s ) = pθ ( a | s ) . ( 6 ) We could further gain even more intuitive interpretation of the above generation policy π∗ from the lens of advantage function ( Sutton & Barto , 2018 ) . Specifically , in SQL , the optimal state-value function is the log-normalizer of the optimalQ-values ( Haarnoja et al. , 2017 ; Schulman et al. , 2017 ) . This allows us to rewrite Eq . ( 5 ) into a more concise form : V ∗ ( s ) = log ∑ a′ expQ∗ ( s , a′ ) , π∗ ( a | s ) = exp ( Q∗ ( s , a ) −V ∗ ( s ) ) = expA∗ ( s , a ) , ( 7 ) where A∗ is the optimal advantage function . The equation says that , in the proposed text generation SQL formulation , the optimal policy generates token a in state s according to the token ’ s advantage . | This paper considers the problem of learning text generation models using reinforcement learning. The problem is challenging in that RL algorithm becomes inefficient or unstable when dealing with large action space and the sparse reward situations in text generation. To address these problems, this paper adapts the path consistency learning approach to the text generation setting. It allows to train the model with both on- and off-policy samples, bridge the sparse reward signal to directly supervise the Q-function learning, and makes efficient updates to Q-values by considering all candidate actions together. Experiments result show that the proposed approach are effective in solving a wide range of applications where MLE are not applicable, where it achieves better performance than previous RL-based methods as well as task-specific methods. In addition, on standard MLE-based tasks, the proposed approach could also achieve competitive performance when training the models from scratch. | SP:541930751a63c710868146722f960e68c1d86212 |
The guide and the explorer: smart agents for resource-limited iterated batch reinforcement learning | 1 INTRODUCTION . John is a telecommunication engineer . His day job is to operate a mobile antenna . He has about forty knobs to turn , in principle every five minutes , based on about a hundred external and internal system observables . His goal is to keep some performance indicators within operational limits while optimizing some others . In the evenings John dreams about using reinforcement learning ( RL ) to help him with his job . He knows that he can not put an untrusted model-free agent on the antenna control ( failures are very costly ) , but he manages to convince his boss to run live tests a couple of days every month . John ’ s case is arguably on the R & D table of a lot of engineering companies today . AI adoption is slow , partly because these companies have little experience with AI , but partly also because the algorithms we develop fail to address the constraints and operational requirements of these systems . What are the common attributes of these systems ? • They are physical , not getting faster with time , producing tiny data compared to what model-free RL ( MFRL ) algorithms require for training . • System access is limited to a small number of relatively short live tests , each producing logs that can be used to evaluate the current policy and can be fed into the training of the next . • They are relatively small-dimensional , and system observables were designed to support human control decisions , so there is no need to filter them or to learn representations ( with the exception when the engineer uses complex images , e.g. , a driver ) . • Rewards are non-sparse , performance indicators come continually . Delays are possible but usually not long . • Safe operation even during live tests is crucial . Simulators and digital twins are more and more available , but some systems are too complex to simulate from first principles . The RL setup that fits this scenario is neither pure batch ( offline ; Levine et al . ( 2020 ) ) as interacting with the system is possible during short periods of time nor pure online as the policy can only be updated offline between two interaction periods . We refer to it as iterated batch RL ( Lange et al . ( 2012 ) call it growing batch ) . Furthermore , we are interested in model-based RL ( Deisenroth & Rasmussen , 2011 ; Chua et al. , 2018 ; Moerland et al. , 2021 ) because i ) it is sample efficient ( Chua et al. , 2018 ; Wang et al. , 2019 ) , ii ) it works well on small-dimensional systems with dense rewards , and iii ) the system model ( data-driven simulator ) itself is an object of interest because it can ease the adoption of data-driven algorithms by systems engineers . Given a robust system model , simple model predictive control ( MPC ) agents using random shooting ( RS ; Richards ( 2005 ) ; Rao ( 2010 ) ) or the cross entropy method ( CEM ; de Boer et al . ( 2004 ) ) have been shown to perform remarkably well on many benchmark systems ( Nagabandi et al. , 2018 ; Chua et al. , 2018 ; Wang et al. , 2019 ; Hafner et al. , 2019 ; Kégl et al. , 2021 ) and real-life domains such as robotics ( Yang et al. , 2020 ) . On the other hand , implementing successfully the seemingly elegant Dyna-style approach ( Sutton , 1991 ; Kurutach et al. , 2018 ; Clavera et al. , 2018 ; Luo et al. , 2019 ) , when we learn model-free agents on the system model and apply them on the real system , remains challenging especially on systems that require planning with long horizon . Our main finding is that the Dyna-style approach can be an excellent choice for iterated batch RL by adding to it a decisiontime planning guided by the model-free policy and a dynamically self-tuning exploration . The key is that exploration and bootstrapping with a value function estimate affords us shorter rollouts so we can reduce the accumulation of errors that plagues the Dyna-style approach with long horizons ( Janner et al. , 2019 ) . We also innovate on the experimental framework ( metrics , statistically rigorous measurements ) , so we can profit from the modularity of the Dyna-style approach , tuning ingredients ( model , the MFRL guide policy , exploration , planning , bootstrapping ) independently . This modular approach makes engineering easier ( as opposed to monolithic approaches like AlphaZero ( Silver et al. , 2017 ) ) , which is an important aspect if we want to give the methodology to non-expert systems engineers . We demonstrate our GUIDE & EXPLORE approach on the small-dimensional but difficult Acrobot system which is known to be especially tough for Dyna-style techniques ( Wang et al. , 2019 ) . We show in a rigorous ablation study how each ingredient adds a small but significant improvement , achieving a 10 % total margin over the current state of the art ( Wang et al. , 2019 ; Wang & Ba , 2020 ; Kégl et al. , 2021 ) . DYNAZERO ( pure Dyna-style with an AlphaZero guide ) also matches the asymptotic performance with a larger sample complexity ( 3x ) and computational ( 5x ) price tag . 1.1 SUMMARY OF CONTRIBUTIONS . 2 RELATED WORK . The MBRL subfield has seen a proliferation of powerful methods , but most of them miss the specific requirements ( solving problems irrelevant in this scenario like representation learning or sparse rewards ) and missing others ( limited and costly system access ; data taking and experimentation through campaigns , live tests ; safety ) ( Hamrick , 2019 ) . The Dyna framework developed by Sutton ( 1991 ) consists in training an agent from both real experience and from simulations from a system model learned from the real data . Its efficient use of system access makes it a natural candidate for iterated batch RL . The well-known limitation of this approach is the agent overfitting the imperfect system model ( Grill et al. , 2020 ) . A first solution is to use short rollouts on the model to reduce error accumulation as done in Model-Based Policy Optimization ( MBPO ; Janner et al . ( 2019 ) ) . Another solution is to rely on ensembling techniques for the model . Kurutach et al . ( 2018 ) ’ s ME-TRPO is based on an ensemble of models and Trust Region Policy Optimization ( TRPO ; Schulman et al . ( 2015 ) ) . At each TRPO step a transition is sampled from a randomly picked model of the ensemble , preventing the policy from overfitting one model . An ensemble is also used in Model-Based Meta-Policy Optimization ( MP-MPO ; Clavera et al . ( 2018 ) ) where each model of the ensemble is seen as a different task used to meta-learn a policy . The meta-policy is then able to quickly adapt to any of the dynamics model and is more robust to model inaccuracies . Instead of learning the model and then the policy from the model , Stochastic Lower Bound Optimization ( SLBO ; Luo et al . ( 2019 ) ) alternates between model and policy updates . In our ITERATEDMBRL skeleton ( Fig 1 ) , this strategy would couple the LEARN and MFRL steps , which we do not study in this paper . We note that according to the results shown in Fig 1 . ( a ) and Table 1 in Wang et al . ( 2019 ) , ME-TRPO , SLBO and MB-MPO alone ( pure Dyna , without planning ) are clearly suboptimal on the Acrobot system1 , similar to the performance obtained by our pure Dyna DQN ( Section 4 ) . Finally , Yu et al . ( 2020 ) and Kidambi et al . ( 2020 ) use a Dyna-style approach in the context of pure batch RL where no further data collection and therefore no further model updates are assumed . The idea of using a guide and a value function when planning is not novel ( Silver et al. , 2017 ; Schrittwieser et al. , 2020 ; Wang & Ba , 2020 ; Argenson & Dulac-Arnold , 2020 ) . We were greatly inspired by these elements in our objective of building smarter agents as they can make the search more efficient and thus lead to a better performance . POPLIN-A ( Wang & Ba , 2020 ) relies on behavior cloning ( using only real experience , unlike our Dyna-style approach that mainly uses the model ) , but their guide is similar to our approach . During the planning , they add random noise to the actions recommended by a deterministic policy network and update the noise distribution using a CEM strategy . In a similar way our GUIDE & EXPLORE strategy also adds a carefully controled amount of noise to the recommended actions . Our results highlight the importance of a well-calibrated exploration , which also contributes to the understanding of POPLIN-A . Argenson & Dulac-Arnold ( 2020 ) and Lowrey et al . ( 2019 ) both found that bootstrapping with a value estimate improves the performance of simple guided MPC strategies . The popular AlphaZero ( Silver et al. , 2017 ) and MuZero ( Schrittwieser et al. , 2020 ) algorithms also rely on a guide and a value function for their Monte Carlo Tree Search ( MCTS ) . We implement a Dyna-style version of AlphaZero , which we call DYNAZERO . The principal issue of MuZero ( Schrittwieser et al. , 2020 ) in our micro-data iterated batch RL context is that it does not control the number of system access steps : it needs to simulate a lot from the real environment to establish the targets for the value function . In these two algorithms the guide is updated from the results obtained during the search that it guided , a procedure known as Dual Policy Iteration ( Sun et al. , 2018 ) . We prefer experiencing with Dyna-style approaches first to leverage popular MFRL algorithms and defer the study of Dual Policy Iteration to future work . Our results show that planning is an important ingredient , a claim already made by Hamrick et al . ( 2021 ) . They use MuZero to run their ablation study while we prefer using an explicit model for practical reasons explained in the introduction . Besides planning we also study the importance of exploration . 1The conversion from Wang et al . ( 2019 ) : our mean reward per episode of 200 steps = their return/200+1 . 3 THE FRAMEWORK FOR RESOURCE-LIMITED ITERATIVE BATCH RL . 3.1 THE FORMAL SETUP . Let TT = ( ( s1 , a1 ) , . . . , ( sT , aT ) ) be a system trace consisting of T steps of observable-action pairs ( st , at ) : given an observable st of the system state at time t , an action at was taken , leading to a new system state observed as st+1 . The observable vector st = ( s1t , . . . , s ds t ) contains ds numerical or categorical variables , measured on the system at time t. The action vector at contains da numerical or categorical action variables , typically set by a control function at = π ( st ) of the current observable st ( or by a stochastic policy at ∼ π ( st ) ; we will also use the notation π : st ; at ) . The performance of the policy is measured by the reward rt which we assume to be a function of the observables st . Given a trace TT and a reward rt obtained at each step t , we define the mean reward as R ( TT ) = 1T ∑T t=1 rt . 2 The system model p : ( st , at ) ; st+1 can be a deterministic point predictor or a probabilistic ( generative ) model that , besides the point prediction E { p ( st+1| ( st , at ) ) } , also provides information on the uncertainty of the prediction and/or to model the randomness of the system ( Deisenroth & Rasmussen , 2011 ; Chua et al. , 2018 ) . | The authors study model-based reinforcement learning applied in the scenario of iterated batch reinforcement learning. There exist other namings of the studied in the paper scenario of iterated batch reinforcement learning, I found out that there exist several other synonymous names of such setting: growing batch RL/ micro-data RL / micro-data model-based RL. The authors motivate the problem informally using several bullet points listed in the introduction. The main finding claimed by the authors is that the Dyna-style MBRL approach is an appropriate choice for the studied setting by enhancing it with decision-time planning based on a model-free policy and dynamically tuning exploration. The algorithms are tested in the problem of resource-limited Acrobot; a detailed ablation study is provided for algorithm features (called here interchangeable algorithmic bricks for iterative batch RL. The performed ablation study helped to find the combination of a neural model, a bootstrapping DQN guide, and a heating explorer, which led to a 10% jump in state-of-the-art on the resource-limited Acrobot system. | SP:5b5f025ee45876731eb9bcb91225b47aa9ea88a3 |
ScaLA: Speeding-Up Fine-tuning of Pre-trained Transformer Networks via Efficient and Scalable Adversarial Perturbation | The size of transformer networks is growing at an unprecedented rate and has increased by three orders of magnitude in recent years , approaching the trillions . To train models of increasing sizes , researchers and practitioners have employed large-batch optimization to leverage massive distributed deep learning systems and resources . However , increasing the batch size changes the training dynamics , often leading to generalization gap and training instability issues that require extensive hyperparameter turning to maintain the same level of accuracy . In this paper , we explore the steepness of the loss landscape of large-batch optimization and find that it tends to be highly complex and irregular , posing challenges to generalization . To address this challenge , we propose ScaLA , a scalable and robust method for largebatch optimization of transformer networks via adversarial perturbation . Moreover , we perform several optimizations to reduce the computational cost of performing the adversarial perturbation , thereby improving its performance and scalability in the distributed training environment . We provide a theoretical convergence rate analysis for ScaLA using techniques for analyzing non-convex saddle-point problems . Finally , we perform an extensive evaluation of our method using BERT and RoBERTa on GLUE datasets . Our results show that our method attains up to 18 × fine-tuning speedups on 2 DGX-2 nodes , while achieving comparable and sometimes higher accuracy than the state-of-the-art large-batch optimization methods . When using the same number of hardware resources , ScaLA is 2.7–9.8× faster than the baselines . 1 INTRODUCTION . We have seen exponential growth in DL model size since the debut of the transformer network ( Vaswani et al. , 2017 ) . For example , while BERTbase has around 100M parameters , the model size has increased to multi-billion parameters such as Megatron-LM ( 8B ) ( Shoeybi et al. , 2019 ) , T5 ( 11B ) ( Raffel et al. , 2019 ) , Turing-NLG ( 17B ) ( tur ) , and with GPT-3 hitting a new staggering record of 175B parameters . With the three orders of magnitude growth , these large models also have powered accuracy breakthroughs in many challenging Natural Language Processing ( NLP ) tasks such as the General Language Understanding Evaluation ( GLUE ) benchmark ( Wang et al. , 2019a ) . Recent studies show that the performance of these models continues to scale with their sizes ( Kaplan et al. , 2020 ) . As a result , we expect that the model size would continue to grow in the future . To accelerate the training speed of large models , the most common way is to increase the batch size in the optimization algorithm in order to leverage multi-GPU training ( Li et al. , 2020 ; Liu et al. , 2019 ; Huang et al. , 2019 ; Shazeer et al. , 2018 ; Shoeybi et al. , 2019 ; Rajbhandari et al. , 2019 ) . By increasing the batch size , a mini-batch of sizeB can be divided across more workers ( GPUs ) , where the gradients are computed locally on each worker using back-propagation and then aggregated . Furthermore , most of the operations used in transformer networks are highly optimized in modern linear algebra frameworks on GPUs and can scale to larger batch sizes without significantly increasing the time per step ( Wang et al. , 2019c ; Kaplan et al. , 2020 ) . If researchers can train each neural network with more GPUs and increased throughput , then it makes it possible for them to achieve better results by training even larger models , using larger datasets and exploring new ideas more rapidly . However , changing the batch size is not always straightforward , as it often impacts the training dynamics . You et al . propose LAMB ( You et al. , 2019a ) to exploit large-batch optimization for transformer networks . LAMB is a variant of Adam ( Kingma & Ba , 2015 ) that applies layer-wise normalization before applying each gradient update , which has been used to successfully train BERT on 1024 TPU chips in 76 minutes . Despite showing promising results , prior work ( You et al. , 2019a ) primarily focuses on pre-training . On the other hand , the fine-tuning stage starts to become a bottleneck ( e.g. , it takes tens of hours to fine-tune RoBERTa-large on MNLI ( Wang et al. , 2019a ) ) and becomes more expensive as model size increases . If we can speed-up pre-training by increasing batch sizes , why do we not also increase the batch size during fine-tuning in the interest of making fine-tuning more efficient as well ? Contemporary experience is that fine-tuning with large batch sizes is harder to train , often reaching lower accuracy than the baseline accuracy using small batch sizes . To address these challenges , we develop new approaches to improving the scalability and generalizability in fine-tuning pre-trained transformer networks by making the following contributions : ( 1 ) We present an adversarial perturbation based large batch optimization algorithm ScaLA ( Scalable Large-batch Adversarial Perturbation ) for training transformer networks , in the distributed training setting . We show how adversarial perturbation helps improve the generalization and more importantly how we reduce the cost of injecting adversarial perturbations to improve computational efficiency . ( 2 ) We also present a theoretical convergence rate analysis using techniques for analyzing non-convex saddle-point problems . ( 3 ) We conduct evaluation on a wide range of natural language understanding ( NLU ) tasks and assess the impact of adversarial perturbations on both the scalability and the generalizability in large batch task-specific fine-tuning . ( 4 ) We evaluate our approach against BERT ( Devlin et al. , 2019 ) and RoBERTa ( Liu et al. , 2019 ) and show that ScaLA obtains significant improvements over the state-of-the-art algorithms , such as LAMB , for the large batch optimization of fine-tuning tasks . Concretely , while LAMB leads to 1 point accuracy drop on average ( e.g. , GLUE ) as we increase the batch size , our approach achieves the same and sometimes higher accuracy ( up to 0.9 points ) after drastically increasing the batch size . Furthermore , with our cost-efficient optimizations , ScaLA achieves up to 18× speedups on 2 NVIDIA DGX-2 nodes over the baseline fine-tuning time and is up to 9.8× faster than the baseline when using the same number of GPUs . 2 BACKGROUND AND RELATED WORK . Despite the great success of pre-trained transformer networks such as BERT ( Devlin et al. , 2019 ) , a big challenge , in general , comes from the training efficiency – even with self-attention and parallelizable recurrence ( Vaswani et al. , 2017 ) , and high-performance hardware ( Jouppi et al. , 2017 ) , training transformer networks can still take a significant amount of time . One effective approach to reducing training time is through data parallelism ( Devlin et al. , 2019 ; Liu et al. , 2019 ; Shoeybi et al. , 2019 ) , which motivates studies on large-batch stochastic non-convex optimizations for transformer networks ( You et al. , 2019a ) . These studies have raised concerns with respect to its convergence , generalizability , and training stability by observing that training with a large batch could be difficult ( Keskar et al. , 2017 ; Hoffer et al. , 2017 ; Nado et al. , 2021 ) . Furthermore , prior works mostly focus on reducing the pre-training time ( You et al. , 2019a ; Zhang & He , 2020 ; Gong et al. , 2019 ; Clark et al. , 2020 ) instead of the adaptation time at the fine-tuning stage . While many researchers and practitioners focus on how to reduce the pre-training time , few attention has been paid to accelerate the fine-tuning stage , which gradually becomes a bottleneck as model sizes increase ( e.g. , it takes tens of hours to fine-tune MNLI on RoBERTa-large ) . Therefore , in contrast to previous works , our goal in this paper is to speed-up task-specific fine-tuning without hurting model accuracy . Different from pre-training , the fine-tuning stage often employs a much smaller batch size ( e.g. , log2B = { 4 , 5 } ) than pre-training ( e.g. , log2B ≥ 10 ) ( Devlin et al. , 2019 ; Liu et al. , 2019 ) . The small batch size results in inefficient data parallelism ( i.e. , sub-optimal computation-communication ratio ) , making it difficult for fine-tuning to benefit from multi-GPU training . Moreover , a common understanding is that small-batch sizes provide implicit regularization effects ( e.g. , from gradient noise ) that help improve generalization of downstream tasks . In contrast , our goal is to speed-up the fine-tuning process with large batch sizes while preserving model accuracy . On a separate line of research , adversarial training was first proposed in the computer vision literature to improve a model ’ s robustness against adversarial attacks ( Goodfellow et al. , 2015 ; Madry et al. , 2018 ) . Recently , there has been some work that shows that adversarial training helps improve model generalizability ( Cheng et al. , 2019 ; Wang et al. , 2019b ; Jiang et al. , 2020 ; Liu et al. , 2020 ; Yao et al. , 2018a ; Zhu et al. , 2020 ) . However , very few works examine large-batch optimization of transformer networks and NLP tasks with adversarial perturbations from a computational efficiency and scalability perspective . The work most similar to ours is Zhu et al . ( 2020 ) , who study adversarial training for NLP tasks by accumulating the gradient of the parameters from each of the ascent steps and updates the parameters only once after K inner ascent steps with the accumulated gradients . Unlike Zhu et al . ( 2020 ) , we consider accelerating the fine-tuning speed by parallel adversarial training and by adjusting the number of inner maximization steps , which offers much higher speedups . 3 THE PROPOSED METHOD . In this section , we present a principled method for large batch optimization that is highly scalable while maintaining the quality of the solutions as measured by task-appropriate accuracy metrics . 3.1 A SEQUENTIAL GAME-THEORETIC METHOD VIA ADVERSARIAL PERTURBATION ORACLE . Formulation : Let X denote the parameter space and Y denote the data ( mini-batch/sample ) space and Q denote a distribution supported on Y . To improve the generalizability of transformer fine-tuning while retaining the scalability , we augment the usual stochastic optimization objective by constructing an adversarial ( Keskar et al. , 2017 ; Madry et al. , 2018 ) regularization . In particular , we solve the following robust optimization problem , which is a stochastic minimax ( Lin et al. , 2020 ) optimization problem augmented with a regularization term involving a deterministic adversarial perturbation , instead of vanilla risk minimization : min x∈X Eξ∼Q [ g ( x , ξ ) ] = min x∈X Eξ∼Q [ f ( x , ξ ) + λr ( x ) ] = min x∈X max y∈Y Eξ∼Q [ f ( x , ξ ) + λr ( x , y ) ] : = min x∈X max y∈Y Eξ∼Q [ f ( x , y , ξ ) ] ( 1 ) where g : X× Y→ R denotes the robust training objective , f : X× Y→ R denotes the standard training objective , f : X × Y × Y → R denotes the augmented objective , r : X → R denotes a deterministic regularization term on the parameters controlled by a strength factor λ ∈ ( 0 , ∞ ) , r : X→ R denotes the augmented regularization and ξ denotes samples drawn fromQ ( for simplicity , we slightly abuse the notation in using ξ to denote the random variable , e.g . Eξ [ g ( x , ξ ) ] , or its empirical realizations , e.g . 1K ∑K k=1 g ( x , ξk ) for any K ; the meaning is clear from the context ) . The overall ( outer ) training objective involves a minimization problem in the parameter space while being stochastic with respect to the data space . The adversarial regularization ( inner ) term is a deterministic maximization problem operating in the data space conditioned on a fixed parameter configuration . We wish to emphasize that this formulation is a two-player sequential ( Jin et al. , 2020 ) , not simultaneous , game wherein the goal is to optimize a transformer network that is robust to adversarial perturbation . In a given round , the first player ( associated with the outer minimization ) proposes a parameter configuration , and the second player ( associated with the inner maximization ) responds with a penalty to capture the effect of label errors due to perturbations in a large data batch size to undermine the performance of the transformer parameter configuration chosen by the first player . Practical Considerations : Language expressions are quite sensitive to individual words or clauses , where perturbations against those would likely generate incorrect or biased training data with wrong labels ( Zhang & Yang , 2018 ) . Following prior success in applying adversarial training to NLP models ( Miyato et al. , 2017 ; Zhu et al. , 2020 ) , we apply perturbations to the continuous word embeddings instead of directly to discrete words or tokens . The term r captures the prediction deviation from the perturbation . In a given round of the game , with respect to the first player ’ s proposal , let Φ denote the transformer network under consideration ( specifically , Φ is BERT in this paper ) and ξ be a large batch of data sampled from Q . We construct a label for the second player as γ : = Φ ( x , ξ ) . Next , for classification tasks , we choose r to be the symmetric KL divergence ( Jiang et al. , 2020 ) , i.e. , r ( x , y ) : = KLsym ( γ , Φ ( x , y ) ) . We use symmetric KL divergence to measure the distributional divergence to generate adversarial perturbation . For regression tasks , we choose r to be the squared loss , i.e. , r ( x , y ) : = ( γ − Φ ( x , y ) ) 2 . In practice , we add an ` ∞ constraint on y , which is achieved by simple clipping with a radius of ω ( projection ) . Intuitively , a large r corresponds to a situation wherein the transformer is highly sensitive to a given perturbation in the input , suggesting that the model parameters are close to a sharp minimum . Augmenting the original training objective with r makes the first player incur an additional penalty if the outer minimization solution veers closer to sharp minima , thereby encouraging flatter solutions and better generalizability . Lexicon encoder + sentence inputs Input embeddings Adv . noise Transformer encoder Context embeddings Output layer Minimize loss Maximize prediction deviation ( Delayed PGA-1 ) Noise generator Figure 1 : The architecture of the proposed method . Figure 2 : Time breakdown with and with PGA-1 . Figure 3 : Impact of perturbation steps . Inner Maximization : For any given outer step t , let xt denote the parameter proposed by the first player . Since the exact inner maximization in Equation equation 1 is intractable for non-convex models such as transformers , we adopt truncated methods as in prior works . Specifically , we use Projected Gradient Ascent ( PGA ) ( Madry et al. , 2018 ; Jiang et al. , 2020 ) to solve this problem , i.e. , yτ+1 = Πω ( yτ + ρτ∇yr ( xt , y ) ) where ρτ for τ ∈ [ T ] is the step size sequence and Π projects the result of the gradient ascent update into an ` ∞ ball of diameter 2ω around the original input embeddings , ξ , considered by the first player . Outer Minimization via Groupwise Adaptive Learning Rates : Inspired by prior works that stabilize large-batch training and improve its convergence quality , we employ algorithms with groupwise adaptive learning rates ( You et al. , 2019a ) to solve the outer minimization . Specifically , we solve the minimization problem in Equation equation 1 by xit+1 = x i t−ηtν ( ‖xit‖ ) ∇̂ixg ( x ) /‖∇̂ixg ( x ) ‖ , ∀i ∈ [ h ] where i denotes the ith-layer of the transformer . The normalized gradient descent mitigates issues due to exploding gradients . The learning rate sequence ηt , ∀t ∈ [ T ] is scaled by a clipping function ν ( c ) : = max ( L , min ( c , U ) ) where L < U ( e.g. , L = 0 and U = 10 ) , which ensures the norm of the update is of the same order as that of the weights . Note that we use gradient averaging on ξ , i.e. , gradient accumulation and all-reduce , over a batch size B distributed across P workers in order to obtain a noisy gradient estimate ∇̂ixg ( x ) at epoch t. Computational Cost : Given that the primary interest of using a large batch size is to improve hardware efficiency , we are motivated to look carefully into the computational cost of adversarial perturbation . Adversarial perturbation requires an extra PGA inner loop that standard training does not have . Figure 2 provides the time breakdown of adversarial training using PGA with T = 1 ( denoted as PGA-1 ) . PGA-1 performs the perturbation and takes approximately the same time as making three forward passes ( Fwd ) through the network . This is because one step of PGA requires to make one forward and backward pass ( Bwd ) over the entire network . The backward pass of adversarial training takes roughly twice the amount of time as the standard backward step because the back-propagation is triggered twice to calculate the perturbation noise and the gradients . The time spent on the optimizer step function ( step ) remains the same . In total , adversarial training slows down training by at least 2 times , even with T =1 . This motivates us to look at the effectiveness of different perturbation steps as well as the usefulness of perturbation from the initial epochs in practice . Impact of Perturbation Steps , T : Prior works often do multiple gradient computation steps ( T > 1 ) and take several times longer training time to produce adversaries ( Madry et al. , 2018 ; Zhu et al. , 2020 ) , because their focus is not on computational efficiency . Subsequently , researchers presented Curriculum Adversarial Training ( CAT ) ( Cai et al. , 2018 ) and Annealing-based Adversarial Training ( Amata ) ( Ye et al. , 2020 ) , which progressively increase the perturbation with various strengths , cutting the adversarial training cost while maintaining good accuracy . To investigate how CAT and similar methods affect large-scale NLP problems involving transformers , we evaluate the final fine-tuning accuracy and training cost of QNLI , varying the number of perturbation steps T and report the results in Figure 3 . Interestingly , although using a large T helps to produce stronger adversaries , we find that this does not lead to improved fine-tuning accuracy , despite the fact that the training overhead still increases almost linearly . In fact , the best accuracy is achieved with T = 1 . Our hypothesis to this phenomenon is below . The model has two components , namely , the parameter space and data space . First , unlike the minimization in the parameter space , which is stochastic , the maximization in the data space is deterministic . Second , with respect to the testing phase , the numerical convergence in the model ’ s parameter space is of primary importance rather than the numerical convergence in the data space , i.e. , the maximization is an auxiliary procedure that augments the training phase to make the parameter space ” aware ” of effects of the batch size across epochs . Due to these two points , at a certain epoch , for a given batch , the marginal utility of an additional PGA step is low , and we are able to get away with inexact deterministic maximization . Therefore , we apply PGA-1 in our large-batch optimization scheme , given that it produces sufficiently good solutions while being much more computationally efficient . Delayed Perturbation Injection : Given that even PGA-1 still adds an overhead factor of 2 , we are motivated to investigate how useful adversarial perturbations are in the initial phase of largebatch optimization . We conduct additional experiments to measure the final accuracy corresponding to starting from a regular fine-tuning and then enabling PGA-1 for t ≥ ts where ts ∈ [ T ] . Our observation is that enabling PGA-1 from the beginning does not offer much improvement in accuracy , whereas adversarial perturbation becomes more potent as the model begins to stabilize towards the end of training . Intuitively , this makes sense because generally , at initialization , the model ’ s parameters are relatively far from their final values and are less likely to get stuck at local minima . Therefore the adversarial perturbations generated in the initial training iterations are quite different from the perturbations towards the end of training because they would not maximize the adversarial loss in Equation 1 . We remark that a similar phenomenon has been observed in computer vision tasks ( Cai et al. , 2018 ; Ye et al. , 2020 ; Gupta et al. , 2020 ) . We show that it is possible to delay the injection of adversarial perturbations for large-batch optimization of transformers for NLP tasks . The Algorithm , ScaLA : Combining the formulation with the above investigations , we construct our distributed large-batch transformer fine-tuning algorithm , named ScaLA ( Algorithm 1 ) , whose convergence rate is characterized in Theorem 1 . Algorithm 1 , ScaLA , Scalable Large-batch Adversarial Perturbation 1 : Input : Epochs T , delay ts , perturbation ( inner ) step size ρ , clipping radius ω , regularization strength λ , ( outer ) learning rate η 2 : Output : h-layer transformer model Φ with converged robust parameters x : = xT 3 : for t ∈ [ T ] do . Loop through epochs 4 : for worker p ∈ [ P ] do . In parallel across homogeneous workers 5 : for mini-batch ξp ∼ Q do . Subsample BP data instances on each worker 6 : r ( xt ) ← 0 , γ ← Φ ( x , ξp ) , select y0 . Initialize regularization and label 7 : if t ≥ ts then . Check delay condition 8 : y1 ← Πω ( y0 + ρ∇yr ( xt , y ) ) . Perform adversarial perturbation with PGA-1 9 : r ( xt ) ← KLsym ( γ , Φ ( xt−1 , y1 ) ) . Calculate the adversarial regularization 10 : g ( xt , ξp ) ← f ( xt−1 , ξp ) + λr ( xt ) . Calculate the augmented loss 11 : ∇xg ( xt , ξp ) ← Backward pass on Φ . Compute local gradients using accumulation 12 : ∇̂xg ( xt ) ← 1B ∑P p=1∇xg ( xt , ξp ) . Gradient averaging using all-reduce 13 : xit ← xit−1 − ηtν ( ‖xit‖ ) ∇̂ixg ( xt ) ‖∇̂ixg ( xt ) ‖ , ∀i ∈ [ h ] . Update model parameters Theorem 1 ( Complexity of Algorithm 1 ; Informal – Details in Appendix D ) . Consider the problem in Equation 1 . Let ts = 0 . Setting the outer learning rate as η = O ( 1/ √ T ) and scaling batch size as b = O ( T ) , for Algorithm 1 , we have E [ ‖∇g1/2α ( x ) ‖2 ] ≤ O ( + κα/ √ T ) where x is the estimator obtained from running T steps of Algorithm 1 and picking xt uniformly at random for t ∈ [ T ] . Here , is the error due to the approximate inner maximization oracle , α characterizes the smoothness of f ( x , . ) , g1/2α is the Moreau-envelope of g and κα = maxi αi/mini αi . | In this paper, the authors propose ScaLA to speed up the fine-tuning of large pre-trained transformer language models. Specifically, ScaLA employs adversarial training to solve the worse convergence in large-batch training. Several techniques are proposed to reduce the computational overhead. Experiments on the GLUE benchmark show faster convergence compared to existing methods. | SP:fe59178f5c1e3ee525853ee6a3963f54e3cb34ef |
Eigenspace Restructuring: a Principle of Space and Frequency in Neural Networks | 1 INTRODUCTION . Learning in high dimensions is commonly believed to suffer from the curse of dimensionality , in which the number of samples required to solve the problem grows rapidly ( often polynomially ) with the dimensionality of the input . Nevertheless , modern neural networks often exhibit an astonishing power to tackle a wide range of highly complex and high-dimensional real-world problems , many of which were thought to be out-of-scope of known methods ( Krizhevsky et al. , 2012 ; Vaswani et al. , 2017 ; Devlin et al. , 2018 ; Silver et al. , 2016 ; Senior et al. , 2020 ; Kaplan et al. , 2020 ) . What are the mathematical principles that govern the astonishing power of neural networks ? This question perhaps is the most crucial research question in the theory of deep learning because such principles are also the keys to resolve fundamental questions in the practice of machine learning such as ( outof-distribution ) generalization ( Zhang et al. , 2021 ) , calibration ( Ovadia et al. , 2019 ) , interpretability ( Montavon et al. , 2018 ) , robustness ( Goodfellow et al. , 2014 ) . Unarguably , there can be more than one of such principles . They are related to one or more of the three basic ingredients of machine learning methods : the data , the model and the inference algorithm . Among them , the models , a.k.a . architectures of neural networks are the most crucial innovation in deep learning that set it apart from classical machine learning methods . More importantly , the current revolution in machine learning is initialized by the ( re- ) introduction of convolution-based architectures ( Krizhevsky et al. , 2012 ; Lecun , 1989 ) , and subsequent breakthroughs are often driven by the discovery or application of novel architectures ( Vaswani et al . ( 2017 ) ; Devlin et al . ( 2018 ) ) . As such , identifying and understanding fundamental roles of architectures are of great importance . In this paper , we take a step forwards by leveraging recent developments in overparameterized networks ( Poole et al . ( 2016 ) ; Daniely et al . ( 2016 ) ; Schoenholz et al . ( 2017 ) ; Lee et al . ( 2018 ) ; Matthews et al . ( 2018 ) ; Xiao et al . ( 2018 ) ; Jacot et al . ( 2018 ) ; Du et al . ( 2018 ) ; Novak et al . ( 2019a ) ; Lee et al . ( 2019 ) and many others . ) These developments have discovered an important connection between neural networks and kernel machines : the Neural Network Gaussian Process ( NNGP ) kernels and the neural tangent kernels ( NTKs ) . Under certain scaling limits , the former describes the distribution of the outputs of a randomly initialized network ( a.k.a . prior ) , and the latter can describe the network ’ s gradient descent dynamics . Although recent work ( Ghorbani et al. , 2019 ; Yang & Hu , 2020 ) has identified several limitations of using them in studying the feature learning dynamics of practical networks , we show that they do capture several crucial aspects of the architectural inductive biases . Our main contribution is an eigenspace restructuring theorem . It characterizes a mathematical connection between a network ’ s architecture and its learnability through a trade-off between space and frequency , providing novel insights behind the mystery power of deep CNNs ( more generally , hierarchical locality ( Deza et al. , 2020 ; Vasilescu et al. , 2021 ) . ) By frequency , we mean the degree ( order ) of the eigenfunction and by space , we mean the spatial distance among the eigenfunction ’ s interaction terms . We summarize our main contribution below ; see Fig . 1 . 1 . The learning order ( see Green Arrow in Fig . 1 ) of eigen-functions is governed by the learning index ( LI ) , the sum of the frequency index ( FI ) and the spatial index ( SI ) , which can be characterized precisely by the network ’ s topology . 2 . There is a trade-off between space and frequency : within a fixed ( compute/data ) budget , it is impossible to model generic Long-Range-High-Frequency interactions . MLPs can model Long-Range-Low-Frequency ( LRHF ) interactions but fail to model Short-Range-HighFrequency ( SRHF ) , while shallow CNNs ( S-CNNs ) are the opposite . Remarkably , deep CNNs ( D-CNNs ) can simultaneously model both and various interpolating interactions between them ( e.g. , Median-Range-Median-Frequency ( MRMF ) . ) 3 . In addition , high-resolution CNNs ( HS-CNNs , EfficientNet-type of model scaling ) further broaden the class of learnable functions to contain ( 1 ) extrapolation : Ultra-Long-RangeUltra-Low-Frequency and the dual interactions and ( 2 ) finer interpolations interactions . 4 . Finally , we verify the above claims empirically for neural kernel methods and finite-width networks using SGD + Momentum for dataset and networks of practical sizes . 2 LINEAR AND LINEARIZED MODELS . As a warm up exercise , we briefly go through the training dynamics of linear models . Let ( X , Y ) denote the inputs and labels , where X ⊆ Rd and Y ⊆ R. Assume J : Rd → Rn is a feature map and the task is to learn a linear function f ( x , θ ) = J ( x ) θ to minimize the MSE objective 1 2 ∑ ( x , y ) ∈ ( X , Y ) |f ( x , θ ) − y|2 . Let ℛ ( X , θ ) = f ( X , θ ) −Y be the residual of the predictions of X . Then the gradient flow dynamics can be written as d dt ℛ ( X , θ ) = −J ( X ) JT ( X ) ℛ ( X , θ ) ≡ −K ( X , X ) ℛ ( X , θ ) ( 1 ) Since the feature kernel K ( X , X ) = J ( X ) JT ( X ) is constant in time , the above ODE can be solved in closed form . Let m = |X | the cardinality of X and K̂ ( j ) /uj be the j-th eigenvalue/eigenvector of K ( X , X ) in descending order . By initializing θ = 0 at time t = 0 and denoting the projection by ηj = u T j ℛ ( X , 0 ) , the dynamics of the residual and the loss can be reduced to ℛ ( X , θt ) = ∑ j∈ [ m ] e−K̂ ( j ) tηjuj , L ( θt ) = 1 2 ∑ j∈ [ m ] e−2K̂ ( j ) tη2j ( 2 ) Therefore , to make the residual in uj smaller than some > 0 , the amount of time needed is t ≥ K̂ ( j ) −1 log 2 η2j /2 . The larger K̂ ( j ) is , the shorter amount of time it takes to learn uj . Although simple , linear models provide us with the most useful intuition behind the relation between “ eigenstructures '' and learning dynamics . 2.1 LINEARIZED NEURAL NETWORKS : NNGP KERNELS AND NT KERNELS . Let f ( θ , x ) be a general function , e.g . f is neural network parameterized by θ . Similarly , d dt ℛ ( X , θ ) = −J ( X ; θ ) JT ( X ; θ ) ℛ ( X , θ ) ≡ −K ( X , X ; θ ) ℛ ( X , θ ) . ( 3 ) However , the kernelK ( X , X ; θ ) depends on θ via the Jacobian J ( X ; θ ) of f ( X ; θ ) and evolves with time . The above system is unsolvable in general . However , under certain parameterization methods ( e.g . Sohl-Dickstein et al . ( 2020 ) ) and when the network is sufficient wide , this kernel does not change much during training and converges to a deterministic kernel called the NTK ( Jacot et al. , 2018 ) , K ( X , X ; θ ) → Θ ( X , X ) as width→∞ . ( 4 ) The residual dynamics becomes a constant coefficient ODE again ℛ̇ ( X , θ ) = −Θ ( X , X ) ℛ ( X , θ ) . To solve this system , we need the initial value of ℛ ( X , θ ) . Since the parameters θ are often initialized using iid standard Gaussian variables , as the width approach infinity , the logits f ( X ; θ ) converge to a Gaussian process ( GP ) , known as the neural network Gaussian process ( NNGP ) . Specifically , f ( X ; θ ) ∼ N ( 0 ; K ( X , X ) ) , where K is the NNGP kernel . Note that one can also treat infinite-width networks as Bayesian models , a.k.a . Bayesian Neural Networks , and apply Bayesian inference to compute the posteriors . This approach is equivalent to training only the network ’ s classification layer ( Lee et al. , 2019 ) and the gradient descent dynamics is described by the kernel K. As such , there are two natural kernels , the NTK Θ and the NNGP kernel K , associated to infinitewidth networks , whose training dynamics are governed by constant coefficient ODEs . To make progress , it is tempting to apply Mercer ’ s Theorem to eigendecompose Θ and K , e.g. , K ( x , x̄ ) = ∑ K̂ ( j ) φj ( x ) φj ( x̄ ) and Θ ( x , x̄ ) = ∑ Θ̂ ( j ) ψj ( x ) ψj ( x̄ ) ( 5 ) One advantage of applying this decomposition is that it has almost no constraint on the kernels and the inputs . However , this decomposition is too coarse to be useful since it can hardly provide fine-grained information about the eigenstructures . E.g , it is not clear what are the corrections to Eq . ( 5 ) when changing the architecture from a 2-layer CNN to a 4-layer CNNs . For this reason , we choose to work on the product space of hyperspheres , which has richer mathematical structures . Our primary goal is to characterize the analytical dependence of the decomposition Eq . ( 5 ) on the network ’ s topology in the high-dimensional limit . 3 NEURAL COMPUTATIONS ON DAGS . Notations will become heavier starting from this section . In particular , we rely crucially on the directed acyclic graphs ( DAGs ) and minimal spanning trees ( MSTs ) to define the spatial complexity of eigenfunctions . In Sec . B , we provide a toy example to help understand the motivation . For a positive integer p , let Sp−1 denote the unit sphere in Rp and Sp−1 = √ pSp−1 , the sphere of radius √ p in Rp . We introduce the normalized sum ( integral ) x∈X f ( x ) ≡ |X|−1 ∑ x∈X f ( x ) ( x∈X f ( x ) ≡ µ ( X ) −1 ˆ x∈X f ( x ) µ ( dx ) ) ( 6 ) where X is a finite set ( a measurable set with a finite positive measure µ ) . We find it more convenient to express the computations in neural networks , and in neural kernels via DAGs ( Daniely et al. , 2016 ) , as both computations are of recursive nature . The associated DAG of a network can be thought of as the same network by setting all its widths ( or the number of channels for CNNs ) to 1 . Let G = ( N , E ) denote a DAG , where N and E are the nodes and edges , resp . We always assume the graph to have a unique output node oG and is an ancestor of all other nodes . Denote N0 ⊆ N the set of input nodes ( leaves ) of G , i.e. , the collection nodes without a child . Each node u ∈ N is associated with a pointwise function φu : R → R , which is normalized in the sense Ez∈N ( 0,1 ) φ2u ( z ) = 1 . It induces a function φ∗u : I ≡ [ −1 , 1 ] → I defined to be φ∗u ( t ) = E ( z1 , z2 ) ∈Ntφu ( z1 ) φu ( z2 ) . Here Nt denotes a pair of standard Gaussians with correlation t. We associate each u ∈ N a finite-dimensional Hilbert space Hu , and each uv ∈ E a bounded linear operator Luv : Hv → Hu . Let X ≡ ∏ u∈N0 X u ≡ ∏ u∈N0 Sdim ( Hu ) −1 ⊆ ∏ u∈N0 Hu and I = I |N0| be the input tensors and the input correlations to the graph G , resp . We associate two types of computations to a DAG : finite-width neural network computation and kernel computation , NG : X → HoG and KG : I → I , ( 7 ) resp . They are defined recursively as follows Nu ( x ) = φu ( ∑ v : uv∈E Luv ( Nv ( x ) ) ) if u /∈ N0 else Nu ( x ) = xu ( 8 ) Ku ( t ) = φ∗u ( v : uv∈E Kv ( t ) ) if u /∈ N0 else Ku ( t ) = tu ( 9 ) where x ∈ X and t ∈ I . The outputs of the computations are NG ( x ) = NoG ( x ) and KG ( t ) = KoG ( t ) . Note that KG is indeed the NNGP kernel . The NTK can also be written recursively as Θu ( t ) = φ̇ ∗ u ( v : uv∈E Kv ( t ) ) v : uv∈E ( Kv ( t ) + Θv ( t ) ) with ΘG = ΘoG . ( 10 ) Here , Θu = 0 if u ∈ N0 and φ̇∗u is the derivative of φ∗u . | The paper categorizes architectural biases from a frequency point of view through the lens of NTKs and NNGPs. The two main quantities are the frequency index (FI) and the spatial index (SI) which are calculated from the DAGs. The authors claim that these two quantities capture what type of functions (in terms of frequency and space) can be learned by specific architectures: i.e., MLPs learn LRLF functions, s-CNNs learn SRHF functions, and so on. The main theoretical contribution is Theorem 1: the authors give an architecture-dependent spectral decomposition formula for the NTK and NNGP Kernels using DAGs. | SP:de75a12ebc83164b716c42e0cad6d65747dcbbd2 |
Closed-Loop Data Transcription to an LDR via Minimaxing Rate Reduction | 1 INTRODUCTION AND RELATED WORK . One of the most fundamental tasks in machine learning is to learn and model complex distributions ( or structures ) of real-world data , such as images or texts , from a set of observed samples . By “ learn and model ” , one typically means that we want to establish a ( parameteric ) mapping between the distribution of the real data , say x ∈ RD , and a more compact random variable , say z ∈ Rd : f ( · , θ ) : x ∈ RD 7→ z ∈ Rd or the inverse g ( · , η ) : z ∈ Rd 7→ x ∈ RD , ( 1 ) where z has certain standard structure or distribution ( e.g . normal distributions ) . The so-learned representation or feature z would be much easier to use for either generative or discriminative purposes . Be aware that the support of the distribution of x ( and that of z ) can be low-dimensional hence the above map ( s ) may not be so well defined off the support in the space RD ( or Rd ) . 1.1 LEARNING GENERATIVE MODELS VIA AUTO-ENCODING OR GAN . Auto-Encoding . In the machine learning literature , roughly speaking , there have been two representative approaches to such a distribution-learning task . One is the classic “ Auto Encoding ” ( AE ) approach ( Kramer , 1991 ; Hinton & Zemel , 1993 ) that aims to simultaneously learn an encoding mapping f from x to z and an ( inverse ) decoding mapping g from z back to x : X f ( x , θ ) −−−−−−→ Z g ( z , η ) −−−−−−→ X̂ . ( 2 ) Here we use bold capital letters to indicate a matrix of finite samples X = [ x1 , . . . , xn ] ∈ RD×n of x and their mapped features Z = [ z1 , . . . , zn ] ⊂ Rd×n , respectively . Typically , one wishes for two properties : firstly , the ( empirical ) distribution of the mapped samples Z , denoted as p̂ ( z |X , θ ) , is close to certain desired distribution p ( z ) , say some much lower-dimensional disentangled multivariate Gaussian ; 1 and , secondly , the decoded samples X̂ are “ similar ” or close to the original X . In the feature space z , to enforce the learned distribution p̂ ( z ) to be close to a target p ( z ) , one normally minimizes a certain “ distance ” between the two distributions , say the KL-divergence : minDKL ( p̂ , p ) . However , it is very difficult , often computationally intractable , to precisely compute or minimize such a distance D between two arbitrary degenerate distributions in high-dimensional 1The classical PCA can be viewed as a special case of this task . In fact , the original auto-encoding is precisely justified as nonlinear PCA ( Kramer , 1991 ) . spaces . So in practice , one typically chooses to minimize instead certain approximate bounds ( surrogates ) of the distance , such as a variational bound in variational auto-encoding ( VAE ) ( Kingma & Welling , 2013 ; Zhao et al. , 2017 ) and the earth mover ’ s ( Wasserstein ) distance . In this work , we will show that if we impose specific requirements on the ( distribution of ) learned feature z ( e.g . being subspace-like Gaussians ) , natural distances can be given in closed-form . GAN . Compared to measuring distribution distance in the ( often controlled ) feature space z , a much more challenging issue is how to effectively measure the distance between the decoded samples X̂ and the original X in the data space x . For instance , for visual data such as images , despite extensive studies in the computer vision and image processing literature ( Wang et al. , 2004 ) , it remains elusive to find a good measure for similarity of real images that is both efficient to compute and effective in capturing visual quality and semantic information of the images equally well . Generative Adversarial Nets ( GAN ) ( Goodfellow et al. , 2014 ) offers an ingenious idea to resolve this difficulty by utilizing a powerful discriminator d , usually modeled and learned by a deep network , to discern differences between the generated samples X̂ and the real ones X : Z g ( z , η ) −−−−−−→ X̂ , X d ( x , θ ) −−−−−−→ Y ∈ 0,1 } . ( 3 ) Such a discriminator minimizes the Jensen-Shannon divergence , between the data X and X̂ . But as shown in ( Arjovsky et al. , 2017 ) , the JS-divergence can be highly ill-conditioned to optimize when the distributions are low-dim . So in practice , one may choose to replace the JS-divergence with the earth mover ’ s distance or other variants . The original GAN aims to directly learn a mapping g , called a generator , from a standard distribution ( say a low-dim Gaussian random field ) to the real ( visual ) data distribution in a high-dim space . However , distributions of real-world data can be rather sophisticated and often contain multiple classes and multiple factors in each class ( Bengio et al. , 2013 ) . That makes learning the mapping g rather challenging in practice , suffering difficulties such as mode-collapse ( Srivastava et al. , 2017 ) . As a result , many variants of GAN have been subsequently developed in order to improve the stability and performance in learning multiple modes and disentangling different factors in the data distribution , such as Conditional GAN ( Mirza & Osindero , 2014 ; Sohn et al. , 2015 ; Mathieu et al. , 2016 ; Van den Oord et al. , 2016 ; Wang et al. , 2018 ) , InfoGAN ( Chen et al. , 2016 ; Tang et al. , 2021 ) , or Implicit Maximum Likelihood Estimation ( IMLE ) ( Li & Malik , 2018 ; Li et al. , 2020 ) In particular , to learn a generator for multi-class data , prevalent conditional GAN literature requires label information as inputs during training ( Mirza & Osindero , 2014 ; Odena et al. , 2017 ; Dumoulin et al. , 2016 ; Brock et al. , 2018 ) . Recently Wu et al . ( 2019b ; a ) has proposed to train a k-class GAN by generalizing the two-class cross entropy to a ( k + 1 ) -class cross entropy . In this work , we will introduce a more refined 2k-class measure for the k real and k generated classes . In addition , to avoid features for each class to collapse to a singleton , we will use the so-called rate reduction measure that promotes multi-dimension in the learned features ( Yu et al. , 2020 ) . Another line of research is about how to stablize the training of GAN . SN-GAN ( Miyato et al. , 2018 ) has shown spectral normalization on the discriminator is rather effective , which we will adopt in our work . PacGAN ( Lin et al. , 2018 ) shows that the training stability can be significantly improved by packing a pair of real and fake images together for the discriminator . In this work , we show how to naturally generalize this idea to discriminating an arbitrary number of pairs of real and decoded samples . Also , Wu et al . ( 2019a ) has shown that optimizing the latent features leads to state of the art visual quality . There are strong reasons to believe that their method essentially utilizes the Compressed Sensing principle to implicitly exploit low-dimensionality of the feature distribution . Our framework will explicitly impose and exploits such low-dimensional structures of the learned feature distribution . Combination of AE and GAN . Although AE ( VAE ) and GAN have started with somewhat different motivations , they have evolved into popular and effective frameworks for learning and modeling complex distributions of many real-world data such as images . Many recent efforts tend to combine both Auto-Encoding and GAN to generate more powerful generative frameworks for more diverse data sets , such as Larsen et al . ( 2015 ) ; Rosca et al . ( 2017 ) ; Srivastava et al . ( 2017 ) ; Bao et al . ( 2017 ) ; Huang et al . ( 2018 ) ; Ulyanov et al . ( 2018 ) ; Vahdat & Kautz ( 2020 ) . As we will see , in our framework , AE and GAN can be naturally interpreted as two segments of a closed-loop data transcription process . But unlike GAN or VAE , the distribution of the feature z is learned from the data x and its low-dim support in Rd is explicitly modeled as a union of discriminative subspaces . 1.2 LEARNING LINEAR DISCRIMINATIVE REPRESENTATION VIA RATE REDUCTION . Recently , Chan et al . ( 2021 ) has proposed a new objective for deep learning that aims to learn a linear discriminative representation ( LDR ) for multi-class data . The basic idea is to map distributions of real data , potentially on multiple nonlinear submanifolds , to a family of canonical models consisting of multiple incoherent ( or orthogonal ) linear subspaces . To some extent , this generalizes nonlinear PCA ( Kramer , 1991 ) to the more general/realistic settings where we simultaneously apply multiple nonlinear PCAs to data on multiple nonlinear submanifolds . Unlike conventional discriminative methods that only aim to predict class labels , the LDR aims to learn the likely multi-dimensional distribution of the data hence is potentially suitable for both discriminative and generative purposes . It has been shown that this can be achieved via maximizing the so-called “ rate reduction ” objective . MCR2 . More precisely , consider a set of data samples X = [ x1 , . . . , xn ] ∈ RD×n from k different classes and we use Πj , j = 1 , . . . , k to denote the memberships of the samples in k classes X = ∪kj=1Xj . One seeks a continuous mapping f ( · , θ ) : x 7→ z from X to an optimal representation Z = [ z1 , . . . , zn ] ⊂ Rd×n that maximizes the following coding rate reduction objective , known as the MCR2 principle ( Yu et al. , 2020 ) : max Z ∆R ( Z , Π , ) . = 1 2 log det ( I + αZZ∗ ) ︸ ︷︷ ︸ R ( Z , ) − k∑ j=1 γj 2 log det ( I + αjZΠ jZ∗ ) ︸ ︷︷ ︸ Rc ( Z , |Π ) , ( 4 ) where α = dn 2 , αj = d tr ( Πj ) 2 , γj = tr ( Πj ) n for j = 1 , . . . , k. In this paper , for simplicity we denote ∆R ( Z , Π , ) as ∆R ( Z ) assuming Π , are known and fixed . The first term R ( Z | ) is the coding rate of the whole feature set Z ( coded as a Gaussian source ) with a prescribed precision ; the second term Rc ( Z |Π , ) is the average coding rate of the k subsets of features Zj = f ( Xj ) ( each coded as a Gaussian ) . As it has been shown by Yu et al . ( 2020 ) , maximizing the difference between the two terms will “ expand ” the whole feature set while “ compressing and linearizing ” features of each of the k classes . If the mapping f maximizes the rate reduction , it maps the features of different classes into independent ( orthogonal ) subspaces in Rd . Figure 1 illustrates a simple example of data with k = 2 classes ( on two submanifolds ) mapped to two incoherent subspaces ( solid black lines ) . | The paper "Closed-Loop Data Transcription To An LDR via Minimaxing Rate Reduction" introduces a two-player minimax game between an encoder and a decoder to yield a linear discriminative representation (LDR). It achieves this by building on top of the recently proposed MCR2 rate reduction principle, and then motivates a contractive and contrastive measure to yield a minimax game. The paper shows generative empirical results on MNIST, CIFAR-10 and ImageNet, as well as discriminative classification accuracies on MNIST. | SP:0566be78283de283efd68c0a1062e1fcc6c7bad5 |
Neural Methods for Logical Reasoning over Knowledge Graphs | 1 INTRODUCTION . Knowledge graphs ( KGs ) are a type of data structure that can capture many kinds of relationships between entities ( e.g . : Moscow cityIn−−−→ Russia ) and have been popularized since the creation of the semantic web or its introduction into Google ’ s search engine . They can contain many kinds of different information , and they can be widely used in question-answering systems , search engines , and recommender systems ( Palumbo et al. , 2017 ; Xiong et al. , 2017a ) . Reasoning is a fundamental skill of human brains . For example , we can infer new knowledge based on known facts and logic rules , and discern patterns/relationships to make sense of seemingly unrelated information . It is a multidisciplinary topic and is being studied in psychology , neuroscience , and artificial intelligence ( Fagin et al. , 2003 ) . The ability to reason about the relations between objects is central to generally intelligent behavior . We can define reasoning as the process of inferring new knowledge based on known facts and logic rules . Knowledge graphs are a structure used for storing many kinds of information , therefore the ability to answer complex queries and extract answers that are not directly encoded in the graph are of high interest to the AI community . To answer complex queries , the model receives a query divided in logical statements . A full FirstOrder Logic ( FOL ) is necessary to process a wider range of queries , which includes negative queries . FOL includes the following logical operators : Existential ( ∃ ) , Conjunction ( ∧ ) , Disjunction ( ∨ ) , and Negation ( ¬ ) . The power of representation of our logical framework is the key to process complex queries . However , most frameworks have only been able to process Existential Positive First-Order Logic ( EPFO ) , which means that negative queries can not be processed . For example , One could ask a knowledge graph containing drugs and side effects the following question : “ What drug can be used to treat pneumonia and does not cause drowsiness ? ” . The first step to answer such a query is to translate it into logical statements : q = V ? · ∃V : Treat ( Pneumonia , V ? ) ∧ ¬ Cause ( Drowsiness , V ? ) . Once the query is divided into logical statements , we obtain the computation graph , a directed acyclic graph ( DAG ) which defines the order of operations . Afterwards , we can start traversing the graph . However , many real-world graphs are incomplete and therefore traversing them becomes very hard and even computationally impossible . There are many possible answer entities , and it requires modeling sets of entities . As such , embedding methods become a good solution to answer these queries . Previous works ( Hamilton et al. , 2018 ; Ren et al. , 2020 ; Ren & Leskovec , 2020 ) have created methods for embedding the query and the graph into a vector space . The idea of graph embeddings reduces the problem to simply using nearest-neighbor search to find the answers , without paying attention to the intermediate results . The embedding approach solves many of the problems of query-answering in knowledge graphs . In theory , we could answer the queries just by traversing the graph . In practice , graphs are large and incomplete , and answering arbitrary logical queries becomes a complicated task . The graph incompleteness means that traversing its edges would not provide the correct answers . This work aims to create some models that allow complex queries and extract the correct answers from large incomplete knowledge graphs . To this end , we present a set of models based on Neural Networks that embed the query and the entities into a one-point vector space . Then , it computes the distance between the query and the entities to rank the answers according to the likelihood to answer the query . We use the versatility of Neural Networks to create the operators needed to process FOL queries . We conduct experiments using well-known datasets for KG Reasoning : FB15k , FB15-237 , and NELL . The experiments show that our models can effectively answer FOL and provide a noticeable improvement when compared with the state-of-the-art baselines . Our models provide a relative improvement of 5 % to 10 % to the latest state-of-art method and about 30 % to 40 % when compared with the method that uses the same idea of one-point vector space embeddings ( Hamilton et al. , 2018 ) . The main contributions of this work are summarized as : ( 1 ) . New embedding-based methods for logical reasoning over knowledge graphs : two new models , plus variants , for KG Reasoning . These methods embed the query and the entities in the same vector space with single-point vectors . Implementing the logical operators with neural networks provides versatility to create any operator with virtually the same architecture . ( 2 ) . Improved performance over the current state of the art . Experimental results show that the models presented in this paper outperform the selected baselines : Graph Query Embeddings ( GQE ) ( Hamilton et al. , 2018 ) , Query2Box ( Q2B ) ( Ren et al. , 2020 ) , and BetaE ( Ren & Leskovec , 2020 ) . ( 3 ) . Handling of negative queries . Modelling queries with negation has been an open question in KG Reasoning until recently . BetaE ( Ren & Leskovec , 2020 ) introduced the first method able to do so . This work takes advantages of the good relationship inference capabilities of Neural Networks and uses them to create the negation operator . 2 RELATED WORK . Traditional tasks on graphs include Link Prediction ( Liben-Nowell & Kleinberg , 2007 ) , Knowledge Base Completion ( Wang et al. , 2015 ) , or basic Query-Answering ( one-hop ) . They are all different versions of the same problem : Is link ( h , r , t ) in the KG ? or Is t an answer to query ( h , r , ) ? , where only a variable is missing . However , we face a more complicated problem , known as Knowledge Graph Reasoning , that may involve several unobserved edges or nodes over massive and incomplete KGs . In this case , queries can be path queries , conjunctive queries , disjunctive queries or or a combination of them . A formal definition of KG Reasoning can be found in Chen et al . ( 2020 ) , as stated in Definition 2.1 . Definition 2.1 ( Reasoning over knowledge graphs ) . Defining a knowledge graph as : G = 〈E , R , T 〉 , where E , T represent the set of entities , R the set of relations , and the edges inR link two nodes to form a triple as ( h , r , t ) ∈ T . Then , reasoning over a KG is defined as creating a triplet that does not exist in the original KG , G′ = { ( h , r , t ) |h ∈ E , r ∈ R , t ∈ T , ( h , r , t ) 6∈ G } Most related to our work are embedding approaches for multi-hop queries over KGs : ( Hamilton et al. , 2018 ) , ( Ren et al. , 2020 ) , ( Ren & Leskovec , 2020 ) and ( Das et al. , 2016 ) , as well as models for question answering ( Yasunaga et al. , 2021 ) , ( Feng et al. , 2020 ) . The main differences with these methods rely on the ability to handle full First-Order Logical Queries and using Neural Networks to define all logical operators , including the projection . We also deliver a more extensive range of networks implementations . On a larger outlook , we identify a series of works that aim to solve Knowledge Graph Reasoning with several different techniques , such as Attention Mechanisms ( Wang et al. , 2018 ) , Reinforcement Learning like DeepPath ( Xiong et al. , 2017b ) or DIVA ( Chen et al. , 2018 ) , or Neural Logic Networks ( Shi et al. , 2020 ) , ( Qu & Tang , 2019 ) . 3 MODELS . Both models presented here follow the idea behind Graph Query Embedding – GQE ( Hamilton et al. , 2018 ) : Learning to embed the queries into a low dimensional space . Our models differ from it in the point that logical query operations are represented by geometric operators . In our case , we do not follow the direct geometric sense and these operators are all represented by Neural Networks , instead of just the Intersection operator in GQE . Similarly , however , the operators are jointly optimized with the node embeddings to find the optimal representation . In order to answer a query , the system receives a query q , represented as a DAG , where the nodes are the entities and the edges the relationships . Starting with the embeddings ev1 , ... , evn of its anchor nodes and apply the logical operations represented by the edges to finally obtain an embedding q of the query ( Guu et al. , 2015 ) . 3.1 FORMAL PROBLEM DEFINITION . A Knowledge Graph ( G ) is a heterogeneous graph with a set of entities – nodes – ( V ) and a set of relations – edges – ( R ) . In heterogeneous graphs , there can be different kinds of relations , which are defined as binary functions r : V × V → { True , False } that connect two entities with a directed edge . The goal is to answer First-Order Logical ( FOL ) Queries . We can define them as follows : Definition 3.1 ( First-Order Logical Queries ) . A first-order logical query q is formed by an anchor entity set Va ⊆ V , an unknown target variable V ? and a series of existentially quantified variables V1 , ... , Vk . In its disjunctive normal form ( DNF ) , it is written as a disjunction of conjunctions : q [ V ? ] = V ? · ∃V1 , ... Vk : c1 ∨ c2 ∨ ... ∨ cn ( 1 ) where ci represents a conjunctive query of one or several literals : ci = ei1 ∧ ei2 ∧ ... ∧ eim . And the literals represent a relation or its negation : eij = r ( vi , vj ) or ¬v ( vi , vj ) where vi , vj are entities and r ∈ R. The entity embeddings are initialized to zero and later learned as part of the training process , along with the operators ’ weights . Computation Graph . The Computation Graph can be defined as the Direct Acyclic Graph ( DAG ) where the nodes correspond to embeddings and the edges represent the logical operations . The computation graph can be derived from a query by representing the relations as projections , intersections as merges and negation as complement . This graph shows the order of operations to answer the queries . Each branch can be computed independently and then merged until the sink node is reached . Each node represents a point in the embedding space and each edge represents a logical operation , computed via a Neural Network in our case . The representation of a FOL as a computation graph can be seen as a heterogeneous tree where each leaf node corresponds to the anchor entities and the root is the final target variable , which is a set of entities . The logical operations corresponding to the edges are defined below : • Projection . Given an entity vi ∈ V and a relation type r ∈ R. It aims to return the set of adjacent entities with that relation . Being Pri ( vi , r ) the set of adjacent entities through r , we define the projection as : Pri ( vi , r ) = { v′ ∈ V : ( v , v′ ) = True } . • Intersection . The intersection can be defined as : I ( vi ) = ∩ni=1vi . • Negation . It calculates the complement of a set of entities T ⊆ V : N ( T ) = T = V \ T , where the set can either be the embedding corresponding to an entity or another embedding in between which represents a set of them . A Union operation is unnecessary , as it will be later discussed in Sections 3.5 . Query2Box ( Ren et al. , 2020 ) shows that a union operator becomes intractable in distance-based metrics . | The article presents a new system for solving multi-hop queries on knowledge graphs. The system allows queries to be performed by handling operators using one- and two-input MLPs. This formulation also makes it possible to handle negative queries. The paper also presents a second version of the presented system that exploits an MLP Mixer model, usually used in computer vision. The system was tested on three standard knowledge graphs: FB15K, FB15k-237 and NELL995. The results obtained are promising because the presented system is able to improve on the established baseline. The results obtained by the BetaE, Q2B and GQE systems on the same datasets were used as the baseline. | SP:7a7a78ede395707824bd3ea07930ca75388e9eeb |
Benchmarking Machine Learning Robustness in Covid-19 Spike Sequence Classification | The rapid spread of the COVID-19 pandemic has resulted in an unprecedented amount of sequence data of the SARS-CoV-2 viral genome — millions of sequences and counting . This amount of data , while being orders of magnitude beyond the capacity of traditional approaches to understanding the diversity , dynamics and evolution of viruses , is nonetheless a rich resource for machine learning ( ML ) and deep learning ( DL ) approaches as alternatives for extracting such important information from these data . It is of hence utmost importance to design a framework for testing and benchmarking the robustness of these ML and DL approaches . This paper the first ( to our knowledge ) to explore such a framework . In this paper , we introduce several ways to perturb SARS-CoV-2 spike protein sequences in ways that mimic the error profiles of common sequencing platforms such as Illumina and PacBio . We show from experiments on a wide array of ML approaches from naive Bayes to logistic regression , that DL approaches are more robust ( and accurate ) to such adverarial attacks to the input sequences , while k-mer based feature vector representations are more robust than the baseline one-hot embedding . Our benchmarking framework may developers of futher ML and DL techniques to properly assess their approaches towards understanding the behaviour of the SARS-CoV-2 virus , or towards avoiding possible future pandemics . 1 INTRODUCTION . A novel ( RNA ) coronavirus was identified in January 2020 , which began the COVID-19 pandemic that is still ongoing today . With the help of sequencing technology and phylogenetic analysis , the scientific community disclosed that this novel coronavirus has 50 % similarity with the Middle-Eastern Repiratory Syndrome Coronavirus ( MERS-CoV ) , 79 % sequencing similarity to Severe Acute Respiratory Syndrome Coronavirus ( SARS-CoV ) — also known simply as “ SARS ” — and more than 85 % similarity with coronavirusus found in bats . Further studies confirmed that bats are the likely reservoir of these coronaviruses ; however , the ecological separation of bats from humans indicates that some other organisms may have acted as intermediate hosts . Considering all scientific evidence , the International Committee on Taxonomy of Viruses named the novel RNA virus SARS-CoV-2 ( Wu et al. , 2020 ; Park , 2020 ; Zhang & Holmes , 2020 ) . RNA viruses generally introduce errors during replication , the resulting mutations incorporated into the viral genome after repeated replication within a single host , generating a heterogenous population of viral quasispecies . However , SARS-CoV-2 has an excellent proofreading mechanism that encodes a nonstructural protein 14 ( nsp14 ) allowing it to have a 10-fold lower mutation rate than the typical RNA viruses . Epidemiologists estimate that SARS-CoV-2 has 33 genomic mutations per year on average . Some of these mutations are advantageous , leading to the more infections variants of SARS-CoV-2 that continue to emerge ( Nelson , 2021 ) . Because of this relatively slow process of accumlating mutations , and the fact that each major variant can be characterized or differentiated by a handfull of mutations ( SARS-CoV-2 Variant Classifications and Definitions , 2021 ) , small perturbations ( errors ) in the sequence should not lead to mistaking one variant from another . Moreover , most of these changes occur in the S gene — the segment of the genome which encodes the surface , or spike , protein ( see Figure 1 ) — hence , characterizing variants using ( the resulting tran- scribed ) spike proteins is sufficient for the classification task ( SARS-CoV-2 Variant Classifications and Definitions , 2021 ; Kuzmin et al. , 2020 ) . The diminishing cost of next-generation sequencing ( NGS ) technology has aided scientists from different parts of the world to generate SARS-CoV-2 whole-genome sequencing ( WGS ) . The Centers for Disease Control and Prevention ( CDC ) of the United States has also provided a wealth of information on resources , tools , and protocols for SARS-CoV-2 WGS from different sequencing platforms such as Illumina , PacBio , and Ion Torrent . Finally , the Global Initiative on Sharing All Influenza Data ( GISAID ) hosts the largest SARS-CoV-2 genome sequencing dataset to date — the largest of any virus in history , with millions of sequences . This unprecedented amount of genomic data generation and easy availability allowed researchers to explore the molecular mechanism , genetic variability , evolutionary progress , and capability of development and spread of novel variants of the virus . On the other hand , this amount of data exceeds the capacity of methods such as Nextstrain ( Hadfield et al. , 2018 ) or even the more recent IQTREE2 ( Minh et al. , 2020 ) by several orders of magnitude — a Big Data challenge . As a result , recent alternative approaches based on clustering and classification of sequences , e.g. , to identify major variants , have appeared in the literature ( Melnyk et al. , 2020 ; Ali et al. , 2021a ; b ; Ali & Patterson , 2021 ) , with promising accuracy and scalability properties . Many issues still remain , however , such as sequencing errors being mistaken for mutations in different analyses , when studying the evolutionary and transmission pattern of the SARS-CoV-2 ( GISAID History , 2021 ; Arons et al. , 2020 ) , or other viruses . Incorporation of error in NGS sequences due to contamination in sample preparation , sequencing technology , or genome assembly methodology are other confounding factors . Generally , computational biologists filter those sequences having errors or mask those sequence fragments having errors . For example , each GISAID ( GISAID Website , 2021 ) sequence is a consensus sequence from the intra-host viral population sampled from the patient , averaging out the minor variations which exist in this population . While such a consensus sequence is a good representative of this population , i.e. , it is still precise enough to capture the SARS-CoV-2 variant harboured by the infected individual , it comes at the cost of losing this important information , such as these minor variations . Such minor variations , when given enough time to evolve , e.g. , within an immunocompromized individual , can become dominant — one of the theories theory behind the emergence of the Alpha variant ( Frampton et al. , 2021 ) . What this means is that many of machine learning approaches towards clustering and classification of sequences ( Ali et al. , 2021a ; b ; Ali & Patterson , 2021 ) have been operating under rather idealized conditions of virtually error-free consensus sequences . Moveover , these methods rely on a k-mer based feature vector representation — an approach that does not even rely on alignment of the sequences , something which can also introduce bias ( Golubchik et al. , 2007 ) . Such a framework should easily cope with errors as well — something machine learning approaches can do very naturally ( Du et al. , 2021 ) . There is hence a great need for some way to reliably benchmark such methods for robustness to errors , which is what we carry out in this paper . We highlight the main contributions of this paper as follows : • We propose several ways of introducing errors into spike sequences which reflect the error profiles of modern NGS technologies such as Illumina and PacBio ; • We demonstrate that the k-mer based approach is more robust to such errors when compared to the baseline ( one-hot encoding ) ; and • We show that deep learning is generally more robust in handling these errors than machine learning models . Moreover , we extend our error testing procedure as a framework for bechmarking the performance of different ML methods in terms of classification accuracy and robustness to different types of simulated random errors in the sequences . The two types of errors that we introduce are “ consecutive ” and “ random ” errors ( see Sec . 3.4 ) . Random errors are just point mutations , which happen uniformly at random along the protein sequence , simulating closely the behaviour of Illumina sequenceing technolgies ( Stoler & Nekrutenko , 2021 ) . Consecutive errors , on the other hand , are small subsequences of consective errors , which can model insertion-delection ( indel ) errors which are common in third generation long-reads technologies such as Pacific Biosciences ( PacBio ) SMRT sequencing ( Dohm et al. , 2020 ) . This paper is structured as follows . In Sec . 2 we discuss related work . In Sec . 3 we discuss some approaches we benchmark , and then how we benchmark : the type of adversarial attacks we use . Sce . 4 details the experiments , and Sec . 5 gives the results . Finally , we conclude this paper in Sec . 6 . 2 RELATED WORK . Assessing and benchmarking the robustness of ML or DL approaches by a series of adversarial attacks is popular in the image classification domain ( Hendrycks & Dietterich , 2019 ) , but there are others that are closer to the domain of molecular data . In ( Schwalbe-Koda et al. , 2021 ) , the authors provide a series of realistic adversarial attacks to benchmark methods which predict chemical properties from atomistic simulations e.g. , molecular conformation , reactions and phase transitions . Even closer to the subject of our paper — protein sequences – the authors of ( Jha et al. , 2021 ) show that methods , such as AlphaFold ( Jumper et al. , 2021 ) and RoseTTAFold ( Baek et al. , 2021 ) which employ deep neural networks to predict protein conformation are not robust : producing drastically different protein structures as a result of very small biologically meaningful perturbations in the protein sequence . Our approach is similar , albeit with the different goal of classification : namely , to explore how a small number of point mutations ( simulating the error introduced certain types of NGS technologies ) can affect the downstream classification of different machine learning and deep learning approaches . After getting the numerical representation , a popular approach is to get the kernel matrix and give that matrix as input to traditional machine learning classifiers like support vector machines ( SVM ) ( Leslie et al. , 2003 ; Farhan et al. , 2017 ; Kuksa et al. , 2012 ) . However , these methods are expensive in terms of space complexity . Authors in ( Ali & Patterson , 2021 ; Kuzmin et al. , 2020 ) proposes an efficient embedding method for classification and clustering of spike sequences . However , their approaches are either not scalable or perform poorly on bigger datasets . 3 PROPOSED APPROACH . In this section , we start by explaining the baseline model for spike sequence classification . After that , we will explain our deep learning model in detail . 3.1 ONE-HOT ENCODING ( OHE ) BASED EMBEDDING . Authors in ( Kuzmin et al. , 2020 ) propose that classification of viral hosts of the coronavirus can be done by using spike sequences only . For this purpose , a fixed-length one-hot encoding based feature vector is generated for the spike sequences . In spike sequence , we have 21 unique characters ( amino acids ) that are “ ACDEFGHIKLMNPQRSTVWXY ” . Also , note that the length of each spike sequence is 1273 with the stopping character ‘ * ’ at the 1274th position . When we design the OHE based numerical vector for the spike sequence , the length of numerical vector will be 21 × 1273 = 26733 . This high dimensionality could create the problem of “ Curse of Dimensionality ( CoD ) ” . To solve CoD problem , any dimensionality reduction method can be used such as Principal Component Analysis ( Abdi & Williams , 2010 ) . After reducing the dimensions of the feature vectors , classical Machine Learning ( ML ) algorithms can be applied to classify the spike sequences . One major problem with such OHE based representation is that it does not preserve the order of the amino acids very efficiently ( Ali et al. , 2021a ) . If we compute the pair-wise euclidean distance between any two OHE based vectors , the overall distance will not be effected if a random pair of amino acids are swapped for those two feature vectors . Since the order of amino acids is important in case of sequential data , OHE fails to give us efficient results ( Ali et al. , 2021a ) . In this paper , we use OHE as baseline embedding method . | This paper presents a framework to test the accuracy and robustness of different machine learning algorithms in classifying the COVID-19 spike sequences. It benchmarks Naive Bayes, Logistic regression, Ridge regression, and fully-connected neural network architectures. It also explores k-mer and one hot encoding representation of the sequences as inputs into these models. For benchmarking robustness, the paper proposes 2 ways to introduce errors in the spike sequence (reflecting sequencing errors produced by state-of-the-art sequencing technologies). | SP:c3e7365d31c567dd3ac59851549b08f505396158 |
Interrogating Paradigms in Self-supervised Graph Representation Learning | 1 INTRODUCTION . Analyzing graph-structured data is essential for many real-world applications and graph neural networks ( GNNs ) have emerged as a popular solution for challenging prediction tasks . However , these tasks often have limited labeled data due to prohibitive procuration costs and require models to possess strong generalization abilities to be practically useful . For example , in molecular property prediction , obtaining training labels requires expensive wet lab experiments and , at test time , models must predict properties for novel candidate molecules ( Hwang et al. , 2020 ; Duvenaud et al. , 2015 ; Zitnik et al. , 2018 ) . Unsupervised graph representation learning is a natural paradigm in such cases , where graph contrastive learning ( GCL ) is a promising approach over using pre-training tasks ( Hu et al. , 2020 ) . While recent findings ( Arora et al. , 2019 ; HaoChen et al. , 2021 ; Tian et al. , 2020 ; von Kügelgen et al. , 2021 ; Zimmermann et al. , 2021 ; Wang & Isola , 2020 ; Purushwalkam & Gupta , 2020 ) have investigated what makes for successful visual contrastive learning , a similar understanding remains lacking for GCL . Furthermore , in computer vision , reconstruction-based approaches using an autoencoder framework ( Kingma & Welling , 2014 ) , updated with modern encoder architectures and data augmentation , are emerging as an alternative paradigm that avoids negative sampling or large batch sizes ( Falcon et al. , 2021 ) . Reconstruction-based approaches ( Kipf & Welling , 2016 ) have not yet been similarly revisited with improved GNN architecture designs or augmentations for selfsupervised graph representation learning . Moreover , due to complications arising from the discrete , non-Euclidean nature of graph datasets , analysis from visual contrastive learning ( VCL ) can not be straightforwardly extended to a graph setting . Therefore , it remains unclear under what circumstances a reconstruction or CL-based approach is expected to perform well on a given task . In this paper , we investigate , theoretically and empirically , the conditions that enable a given unsupervised learning approach to perform well . Specifically , we first show theoretically that the success of GCL with generic graph augmentations ( GGA ) introduced by GraphCL ( You et al. , 2020a ) is dependent on the graph edit distance between classes . Next , we address the elephant in the room : that untrained GNNs have enough inductive bias to nullify the benefits of unsupervised pre-training on benchmark graph classification datasets . Therefore , we introduce a carefully designed synthetic dataset and conduct an extensive evaluation to better understand the behavior of both reconstruction and CL approaches . Here , we demonstrate that the effectiveness of different unsupervised approaches over strong untrained baselines can be understood through a style vs. content decomposition : the proportion of relevant information for a task ( content ) and irrelevant information ( style ) that each example in a dataset contains . Our contributions are as follows : ( i ) We provide theoretical analysis of when contrastive learning is expected to work well , showing that this depends on the graph edit distance of samples within and across classes ; ( ii ) We systematically evaluate reconstruction as an alternative unsupervised paradigm to contrastive learning for graphs , including introducing augmentation-augmented graph autoencoders ( AAGAE ) . Further , we empirically show to what extent untrained GNN models are a competitive baseline in terms of accuracy , invariance , and sample complexity ; and ( iii ) mWe identify a style vs. content trade-off in graphs and introduce an extensive benchmark setup that can carefully control this trade-off . Using our benchmark , we show how not only the ratio of style vs. content but also how generic versus content-aware augmentation impacts different learning paradigms . 2 BACKGROUND : UNSUPERVISED REPRESENTATION LEARNING FOR GNNS . While the general approach of pre-training can be either supervised ( Hu et al. , 2020 ) ) or unsupervised , we focus on the latter . In this section , we formalize unsupervised representation learning ( URL ) for graphs and discuss two widely adopted approaches , namely graph contrastive learning and reconstruction-based learning . Appendix A.6 contains additional related work on self-supervised learning and data augmentation for graphs . Graph Contrastive Learning . Contrastive learning ( CL ) frameworks learn representations by maximizing similarity between positive or augmented examples , and at the same time minimizing similarity between negative or uncorrelated examples . Formally , let X = { x1 , . . . , xn } denote a dataset consisting of un-augmented ( clean ) samples , where each xi = ( Gi , Fi ) corresponds to a tuple containing the adjacency matrix Gi ∈ [ 0 , 1 ] n×n and node feature matrix Fi . Let A represent a set of augmentations over X ; namely the generic graph augmentations ( GGA ) introduced by ( You et al. , 2020a ) : ( i ) node dropping , ( ii ) edge perturbation , ( iii ) attribute masking and ( iv ) sub-graph sampling . Furthermore , let X be the set of all augmented samples given X , and { xi = A ( xi ) , xj = A ( xi ) } be considered a positive pair . GraphCL parallels SimCLR ( Chen et al. , 2020a ) and uses the normalized temperature scaled cross entropy ( NT-XENT ) loss to learn representations by contrasting the representations of positive pairs and negative samples . Specifically , let f be a graph feature learner , such that f ( xi ) = zi ∈ Rd , e.g. , a GNN with a global READOUT layer , i.e. , READOUT : Rn×d → Rd . Given batch size B , similarity function , sim : ( Rd , Rd ) → [ 0 , 1 ] , temperature parameter , τ , and positive pair , { xi , xj } , the NT-XENT loss is defined as : ℓi , j = − log exp ( sim ( zi , zj ) /τ ) ∑2B k=1 1 [ k ̸=i ] exp ( sim ( zi , zk ) /τ ) . ( 1 ) Here , the numerator encourages the representations for xi , xj to have high similarity , while the denominator encourages representations of negative pairs ( k ̸= i ) to have low similarity . By maximizing similarity between positive samples , we expect the representations to become invariant to the properties modified by augmentations . Correspondingly , models learn to perform instance discrimination where each sample defines its own class and the augmented samples also belong to this class . Other recent GCL frameworks follow this general formulation but differ in the choice of the objective function and the augmentation strategy . For example , InfoGraph ( Sun et al. , 2020 ) maximizes the mutual information between sampled subgraphs ( local ) and pooled graph ( global ) representations . MVGRL ( Hassani & Ahmadi , 2020 ) contrasts representations of graphs augmented through diffusion processes at node and graph scales . While this work focuses on GraphCL , other formulations including InfoGraph , DGI ( Hjelm et al. , 2019 ) , and GMI ( Peng et al. , 2020 ) , can be derived as instances of this general framework . Reconstruction-Based Approaches . In computer vision , auto-encoding frameworks enriched with sophisticated model architectures and strong data augmentations ( Falcon et al. , 2021 ) are currently being revisited as an alternative unsupervised learning paradigm that is less dependent on large batch-sizes ( Chen et al. , 2020a ) and negative sampling strategies ( Kalantidis et al. , 2020 ) when compared to CL . Given that graph datasets are often significantly smaller than vision datasets and negative sampling strategies may be difficult to design , such approaches are particularly relevant to self-supervised graph representation learning and bear revisiting in light of stronger GNN architectures and augmentations . Formally , let g : ( Gi , Fi ) → Rn×d be an encoder that outputs node representations , h : Rn×d → [ 0 , 1 ] n×n be a decoder that predicts the edges of Gi given node representations , and READOUT : Rn×d → Rd provide graph representations given node representations . Then , a vanilla graph autoencoder minimizes : ||h ( g ( xi ) − Gi||22 , where h is often defined as σ ( g ( xi ) g ( xi ) T ) and the aggregated graph representation zi = READOUT ( g ( Gi , Fi ) ) is used to perform downstream tasks . Given that graphs are generally sparse , standard implementations sample an equivalent number of positive and negative edges to ensure stable training . Variational graph auto-encoders ( Kipf & Welling , 2016 ) reparameterize node representations and add a KL divergence term to the reconstruction loss similar to ( Kingma & Welling , 2014 ) . As we will argue in this paper , reconstruction-based approaches enhanced with suitable augmentations can be an effective alternative for GCL , under specific conditions . We choose to focus on reconstruction tasks as it is more general than task-specific pretraining tasks and more amenable to theoretical analysis ( Khemakhem et al. , 2020 ) . In subsequent sections , we seek to understand when and why a given method performs well . We begin by taking a closer look at the performance of graph URL using benchmark datasets . 3 A CLOSER LOOK INTO GRAPH URL USING BENCHMARK DATASETS . Designing an unsupervised representation learning pipeline for graph-structured data requires selecting from a number of components , including encoder architecture , data augmentation , strategies for leveraging inductive bias , and training paradigms . It is important to understand the impact of different components on downstream performance , so practitioners can appropriately select them for their needs and determine if URL or pre-training will improve representation quality . To this end , we begin by performing an empirical study on benchmark datasets that considers different : ( i ) levels of inductive biases by incorporating data augmentation and varying the amount of training ; ( ii ) representation learning paradigms ( CL , reconstruction-based ) ( iii ) GNN architectures ( GIN , GCN , GAT etc. ) . We note that we are the first to implement and benchmark the augmentation augmented graph auto-encoders ( AAGAE ) as a stable reconstruction-based approach for graph URL . While our empirical analysis offers several insights into different components of graph URL pipelines , we are unable to evaluate context-aware augmentations ( CAA ) as they are difficult to realize on standard graph benchmarks . CAA have been critical to the advancements in visual CL and the remainder of this paper investigates if CAA have similar promise for graph URL . In Section 4 , we extend analytical tools from visual CL to characterize the behaviour of generic graph augmentations ( GGA ) . In Section 5 , we introduce a novel , synthetic benchmark that gives us control over the style vs. content ratio in the synthesized samples . This enables systematic evaluation of the potential gains to be obtained from CAA . We begin by evaluating the quality of representations obtained not only through GCL and reconstruction-based approaches but also from surprisingly effective , untrained GNN encoders . 3.1 REPRESENTATION LEARNING STRATEGIES . We consider three flavors of unsupervised representation learning : ( i ) Graph contrastive learning : For a representative GCL approach , we select GraphCL with GGA as it is a popular and effective method for graph classification . Following You et al . ( 2020a ) , we use random node-dropping or subgraph sampling at 20 % of the graph size as the augmentation strategy ; ( ii ) Reconstruction-based : In addition to standard graph autoencoders ( GAEs ) , we extend AAVAE ( Falcon et al. , 2021 ) to the graph domain and introduce augmentation-augmented graph autoencoders ( AAGAE ) . While GAE minimizes the reconstruction loss with respect to the original sample , AAGAE minimizes the reconstruction loss between the original and the reconstruction for an augmented sample to learn representations that are consistent with respect to augmentations : ||Gi −h ( g ( A ( Gi , Xi ) ) ) ||22 . We use the same augmentations and encoder architecture as GraphCL for fair comparison and include a straightthrough estimator in the decoder for better training ( Jang et al. , 2017 ) ; and finally ( iii ) Untrained representations : We include untrained GNNs as an important baseline and find that representations from randomly initialized models often perform comparably to unsupervised approaches . There is some folk wisdom that untrained GNNs can be surprisingly competitive with trained models . Early GNN works noted that even an untrained model may have strong inductive bias suitable for node-level tasks ( Kipf & Welling , 2017 ) . For graph-level transfer learning , Xu et al . ( 2021 ) consider an untrained GIN model as a baseline , finding it obtains competitive although generally inferior results . A recent blog post performs a limited exploratory analysis of graph classification using untrained embeddings obtained from a simple GCN model ( Safronov , 2021 ) . Our analysis here ( extended to consider different architectures in Appendix A.3-A.4 ) is far more comprehensive , showing precisely in what ways untrained models may be competitive . | This paper focuses on the augmentation of graph contrastive learning. Authors make further explorations on graph contrastive learning based on the previous CV contrastive work (HaoChen et al. (2021) ) and hope to design a good benchmark by analyzing the relationship between GCL/auto-encoding methods and augmentations. In the analysis part, authors mainly use the perspective of population augmentation graph work to find connections with existing graph augmentations (mainly You et al., 2020a) and analyze the relationship between GED and task performance/downstream labels. In the benchmark part, authors proposes a benchmark based on the idea of "STYLE VS. CONTENT" which is inherited from CV contrastive work. The analysis of the experimental results is okay. | SP:c5226d60fb9d3459cde51541282a43ba3d5c445d |
Differentially Private SGD with Sparse Gradients | 1 INTRODUCTION . The success of machine learning , and deep neural networks in particular , combined with ubiquitous edge computation and digital record keeping , has led to a surge in privacy sensitive learning applications . Internet-scale data promises to accelerate the development of data-driven statistical approaches , but the need for privacy constrains the amalgamation of such datasets . Private data are in fact isolated , constraining our ability to build models that learn from a large number of instances . On the other hand , the information contained in locally stored data can also be exposed through releasing the model trained on a local dataset ( Fredrikson et al. , 2015 ; Shokri et al. , 2017 ) , or even reconstructed when gradients generated during training are shared ( Zhu et al. , 2019 ; Geiping et al. , 2020 ; Zhu & Blaschko , 2021 ) . To address these issues , many applications of machine learning are expected to be privacypreserving . While differential privacy ( DP ) provides a rigorously defined and measurable privacy guarantee for database operations ( Dwork & Roth , 2014 ) , it also contains intriguing properties , such as robustness to post-processing and composability , which enables conveniently computing an overall privacy guarantee for several DP components . Differential privacy1 defines privacy with respect to the difficulty of distinguishing the outputs . For a pair of neighboring databases X , X ′ ∈ X , i.e . X can be obtained from X ′ by adding or removing an element . Definition 1 . A randomized mechanism M : X → R is ( ε , δ ) -differentially private , if for any subset of outputs S ⊆ R it holds that : Pr [ M ( X ) ∈ S ] ≤ eε Pr [ M ( X ′ ) ∈ S ] + δ . A common paradigm for a randomized mechanismM in deep learning is perturbed gradient descent : M ( X ) : = f ( X ) +N ( 0 , S2fσ2I ) , ( 1 ) 1In this work we only consider approximate differential privacy which includes the δ term . where f : X → R computes an aggregated gradient given a database X or X ′ . The isotropic Gaussian distributed noise ξDP ∼ N ( 0 , S2fσ2I ) is calibrated to f ’ s sensitivity S2f , which is the maximal ` 2 distance ‖f ( X ) − f ( X ′ ) ‖ , i.e . the maximal ` 2 norm of gradient among all individual examples . X , X ′ could be batches of training data , for instance , in our experiments they are batches of image-label pairs . The factor σ is a noise multiplier controlling the strength of the privacy guarantee : higher σ leads to lower privacy loss . Differentially private stochastic gradient descent ( DP-SGD ) upper bounds the certainty of connecting data with arbitrary subset of gradient space using the privacy budget variables ( ε , δ ) . Bassily et al . ( 2014 ) show that in a convex setting , DP-SGD achieves excess risk of Õ ( √ d/nε ) for a modelw ∈ Rd that minimizes the empirical risk ∑n i=1 ` ( w , xi ) , where x1 , x2 , ... , xn are drawn from X . While we show that in non-convex general setting , the mean square error ( MSE ) of perturbed gradient g̃ = g + ξDP is between Ω ( d ) and Ω ( d2 ) by assuming the gradients follow a Gaussian distribution : Theorem 1 . Assuming that the gradient is drawn from N ( ∇w , Σ ) , centered at the true gradient ∇w and with respect to the covariance matrix Σ whose trace goes linearly up with dimension d. The MSE of perturbed gradient g̃ = g + ξDP can be lower bounded by : MSE ≥ Tr [ Σ ] ( 1 + dσ2 ) . ( 2 ) from which we conclude that the lower bound on MSE is between linear and quadratic in d in practice . For the proof and conclusion , refer to Appendix A . In terms of deep learning , as d is a large number for modern network architectures , this can lead to a significant increase in error . The work of Abadi et al . ( 2016 ) proposed to clip the gradient of each individual example in ` 2 norm to a preset bound C , i.e . ḡ = g ·min ( 1 , C‖g‖2 ) . They then apply this clipping bound to compute the variance of Gaussian distributed noise . The Gaussian noise mechanism can be expressed as : M ( D ) : = f ( D ) +N ( 0 , C2 · σ2Id ) . ( 3 ) DP-SGD with gradient clipping has been empirically verified to be effective as it constraints the amount of injected noise by setting a small clipping bound . However , clipping removes the magnitude information of the gradient and therefore results in gradient estimation bias . Setting a small clipping bound with a deeper network will not result in better performance . The expected MSE of the perturbed gradient is only constrained to O ( d ) , the impact of perturbation is non-negligible in practice . The biggest network where this strategy is successfully applied so far is a CNN with Tanh proposed by Papernot et al . ( 2021 ) , which reaches ∼ 66 % accuracy on CIFAR10 in a low privacy regime and is regarded as the state-of-the-art ( SOTA ) end-to-end network with DP-SGD . To address this curse of dimensionality , most recent works concentrate on gradient dimension reduction . 1.1 RELATED WORKS . Abadi et al . ( 2016 ) propose to pretrain a network on an auxiliary dataset and then transfer the feature extraction , so that only a linear classifier will be replaced and trained on the private data . Tramer & Boneh ( 2021 ) adopt ScatterNet ( Oyallon et al. , 2019 ) to extract handcrafted features and train a relatively shallow network based on the features . Both work decrease d by excluding the majority of parameters during DP learning , which also constrains the learning ability of network . Inspired by the empirical observation that the optimization trajectory is contained in lowerdimensional subspace ( Vogels et al. , 2019 ; Gooneratne et al. , 2020 ; Li et al. , 2020 ) , a line of work intend to reduce d by exploiting the low-rank property of the gradient while considering privacy . Several recent works ( Zhou et al. , 2021 ; Yu et al. , 2021a ; Kairouz et al. , 2021 ) project the gradient into a subspace which is identified by auxiliary data or released historical gradients . In practice , they use the power method to search for the subspace . The computational cost of running the power method and projecting gradients as well as the memory footprint of storing the projection matrix limits the application of such method to large models . Zhang et al . ( 2021 ) target an NLP task where networks are heavily over-parameterized and gradients are extremely sparse , and propose to adopt DP selection to privately select top-k significant gradients for optimization . Also targeting an NLP task , Yu et al . ( 2021b ) propose a low-rank reparameterization of weights via released historical gradients . In addition to the aforementioned works , McMahan et al . ( 2017 ) ; Yang et al . ( 2019 ) and others study how to incorporate differential privacy in collaborative training , e.g . federated learning , in the interest of protecting the privacy of participants . Federated learning also suffers from large d , as it is usually deployed on edge devices and local models are periodically synchronized , so communication cost becomes expensive both in time and power usage ( Pathak et al. , 2012 ) . Therefore , gradient dimension reduction can have large benefits in federated learning involving power-restricted edge devices . A line of work studies how to tackle this issue by utilizing the low-rank property ( Shokri & Shmatikov , 2015 ; Yang et al. , 2019 ; Liu et al. , 2020 ) . 1.2 OUR CONTRIBUTION . In this work , we demonstrate an axis-aligned gradient dimension reduction method . Our work is orthogonal to previous works , we do not extract any characteristic information of the gradient or model , or approximate the gradient from a subspace . Instead , we randomly zero-out a fraction of the gradient during training and force the gradient to have a sparse representation . We provide a theoretical study on this strategy and reveal that random freeze exhibits a trade-off between signal loss and perturbation moderation in DP-SGD . We remark that our theory and approach do not necessarily rely on the low-rank assumption . To the best of our knowledge , we are the first to study this trade-off in DP-SGD and provide an effective approach . We use the benchmark CIFAR10 ( Krizhevsky , 2012 ) which is to date standard in benchmarking DP learning and show that well implemented random freeze exhibits various advantages and can be widely applied . More specifically , we maintain accuracy when we adapt projected DP-SGD with random freeze , while we reduce the computational cost and memory footprint induced by the power method and projection . Applying it to various frameworks , we achieve a high representation sparsity of gradient without a loss in performance . Federated learning can take advantage of the resulting sparse representation to reduce communication costs . We further note that the random freeze strategy improves the accuracy of large networks , which we demonstrate with the SOTA End-to-end CNN proposed by Papernot et al . ( 2021 ) . 2 ANALYSIS OF RANDOM FREEZE . In this section we theoretically prove that to a certain freeze rate r , DP-SGD with random freeze will converge if the approach without random freeze can converge . Then we investigate the tradeoff between signal loss and perturbation moderation induced by random freeze . Furthermore , we empirically demonstrate benefits of applying random freeze from the perspective of the gradient distribution . 2.1 CONVERGENCE RATE OF DP-SGD WITH RANDOM FREEZE . Let L be the objective function L ( w ) : = Ex∼X [ ` ( w , x ) ] , m ∈ { 0 , 1 } d the freeze mask and r the freeze rate , we randomly draw rp indices and set these positions in the mask to 0 and others to 1 so that ∑ m = ( 1 − r ) d. We assume an oracle telling us the true gradient ∇w and individual gradient gt , i = ∇w + ξt ( xi ) , where ξt is independent gradient deviation with zero mean . Let pt be the distribution of ξt . For random freeze the sparse gradient is g′t , i = ∇w′t + ξ′t ( xi ) , where ∇w′t : = m ∇wt , ξ′t ( xi ) : = m ξt ( xi ) . Denote for DP-SGD the averaged clipped gradient of B samples ḡt : = 1B ∑ i gt , i ·min ( 1 , C ‖gt , i‖ ) , and for DP-SGD with random freeze ĝt : = 1 B ∑ i g ′ t , i · min ( 1 , C‖g′t , i‖ ) . We have for DP-SGD with random freeze the following inequality : Theorem 2 . Assume G-Lipschitz smoothness of∇w such that ||∇wt+1−∇wt|| ≤ G||wt+1−wt|| . Consider an algorithm with clipping bound C , learning rate γ and choose a symmetric probability density distribution p̃ ( · ) satisfying p̃t ( ξt ) = p̃t ( −ξt ) , ∀ξt ∈ Rd . Then ∃κ ≥ 1− r such that : 1 T T∑ t=1 Pξt∼p̃t ( ‖ξt‖ < C 4 ) h ( ∇wt ) ‖∇wt‖ ≤ 1 κ ( ∆L γT +γ∆C + ( 1−r ) γ∆DP − 1 T T∑ t=1 Em [ bt ] ) , ( 4 ) where we define bt : = ∫ 〈∇w′t , g′t , i · min ( 1 , C‖g′t , i‖ ) 〉 ( p ′ t ( ξ ′ t ) − p̃′t ( ξ′t ) ) dξ′t , p′t , p̃′t are corresponding projected distribution , and define ∆L : = E [ L1 − minw L ( w ) ] , ∆C : = GC 2 2 , ∆DP : = C2σ2dG 2B2 , h ( ∇wt ) : = min ( ‖∇wt‖ , 3C4 ) . The proof can be found in Appendix B . When no freeze r = 0 , i.e . m is a vector filled with value 1 . Note that κ = 1 for r = 0 , we can obtain the inequality 4 in the following form : 1 T T∑ t=1 Pξt∼p̃t ( ‖ξt‖ < C 4 ) h ( ∇wt ) ‖∇wt‖ ≤ ∆L γT + γ ( ∆C + ∆DP ) − 1 T T∑ t=1 bt , ( 5 ) which describes DP-SGD without random freeze . Chen et al . ( 2020b ) argue that by tweaking p̃t it is possible to boundPξt∼p̃t away from zero which means the l.h.s . is proportional to ‖∇wt‖ or ‖∇wt‖2 at each iteration , while letting the convergence bias term−bt tend to be small as pt is approximately symmetric . They then prove that by setting a certain learning rate γ , the r.h.s . diminishes to zero , so the network under DP-SGD can converge . Adapted from that , we see at the r.h.s . of inequality 4 for random freeze , −Em [ bt ] also tends to be small as p′t is expected to be approximately symmetric if pt is . Additionally , 1/κ will not be large as along as r is not extremely close to 1 . So with the same learning rate and γ adapted for DP-SGD without random freeze , the r.h.s . of inequality 4 will also tend to zero , which proves the convergence of DP-SGD with random freeze . | This paper considers the problem of differentially privately learning deep neural networks. In order to improve the accuracy and reduce the communication cost, this paper proposes to randomly freeze a progressively increasing subset of parameters, which results in sparse gradient updates. Empirical results also show that the new algorithm can largely reduce the communication cost, while maintaining the performance. Furthermore, the extra computation cost is negligible. | SP:11163a354be2ff895b7cfe45b3048ce7239f018f |
FedProf: Selective Federated Learning with Representation Profiling | 1 INTRODUCTION . With the advances in Artificial Intelligence ( AI ) , we are seeing a rapid growth in the number of AI-driven applications as well as the volume of data required to train them . However , a large proportion of data used for machine learning are often generated outside the data centers by distributed resources such as mobile phones and IoT ( Internet of Things ) devices . It is predicted that the data generated by IoT devices will account for 75 % of the total in 2025 ( Meulen , 2018 ) . Under this circumstance , it will be very costly to gather all the data for centralized training . More importantly , moving the data out of their local devices ( e.g. , mobile phones ) is now restricted by law in many countries , such as the General Data Protection Regulation ( GDPR ) 1 enforced in EU . We face three main difficulties to learn from decentralized data : i ) massive scale of end devices ; ii ) limited communication bandwidth at the network edge ; and iii ) uncertain data distribution and data quality . As an promising solution , Federated Learning ( FL ) ( McMahan et al. , 2017 ) is a framework for efficient distributed machine learning with privacy protection ( i.e. , no data exchange ) . A typical process of FL is organized in rounds where the devices ( clients ) download the global model from the server , perform local training on their data and then upload their updated local models to the server for aggregation . Compared to traditional distributed learning methods , FL is naturally more communication-efficient at scale ( Konečnỳ et al. , 2016 ; Wang et al. , 2019 ) . Nonetheless , several issues stand out . 1.1 MOTIVATION . 1 ) FL is susceptible to biased and low-quality local data . Only a fraction of clients are selected for a round of FL ( involving too many clients leads to diminishing gains ( Li et al. , 2019 ) ) . The standard FL algorithm ( McMahan et al. , 2017 ) selects clients randomly , which implies that every client ( and its local data ) is considered equally important . This makes the training process susceptible to local data with strong heterogeneity and of low quality ( e.g. , user-generated texts ( Hard et al. , 1https : //gdpr.eu/what-is-gdpr/ 2018 ) and noisy photos ) . In some scenarios , local data may contain irrelevant or even adversarial samples ( Bhagoji et al. , 2019 ; Bagdasaryan et al. , 2020 ) from malicious clients ( Fang et al. , 2020 ; Bagdasaryan et al. , 2020 ; Tolpegin et al. , 2020 ) . Traditional solutions such as data augmentation ( Yoo et al. , 2020 ) and re-sampling ( Lin et al. , 2017 ) prove useful for centralised training but applying them to local datasets may introduce extra noise ( Cui et al. , 2019 ) and increase the risk of information leakage ( Yu et al. , 2021 ) . Another naive solution is to directly exclude those low-value clients with low-quality data , which , however , is often impractical because i ) the quality of the data depends on the learning task and is difficult to gauge ; ii ) some noisy or biased data could be useful to the training at early stages ( Feelders , 1996 ) ; and iii ) sometimes low-quality data are very common across the clients . In Fig . 1 we demonstrate the impact of involving ” low-value ” clients by running FL over 100 clients to learn a CNN model on MNIST using the standard FEDAVG algorithm . From the traces we can see that training over clients with problematic or strongly biased data can compromise the efficiency and efficacy of FL , resulting in an inferior global model that takes more rounds to converge . 2 ) Learned representations can reflect data distribution and quality . Representation learning is vital to the performance of deep models because learned representations can capture the intrinsic structure of data and provide useful information for the downstream machine learning tasks ( Bengio et al. , 2013 ) . In ML research , The value of representations lies in the fact that they characterize the domain and learning task and provide task-specific knowledge ( Morcos et al. , 2018 ; Kornblith et al. , 2019 ) . In the context of FL , the similarity of representations are used for refining the model update rules ( Li et al. , 2021 ; Feng & Yu , 2020 ) , but the distributional difference between representations of heterogeneous data is not yet explored . Our study is also motivated by a key observation that representations from neural networks tend to have Gaussian patterns . As a demonstration we trained two different models ( LeNet-5 and ResNet18 ) on two different datasets ( MNIST and CIFAR-100 ) separately . Fig . 2a shows the neuron-wise distribution of representations extracted from the first dense layer ( FC-1 ) of LeNet-5 . Fig . 2b shows the distribution of fused representations ( in a channel-wise manner ) extracted from a plain convolution layer and a residual block of ResNet-18 . These observations motivate us to study the distributional property of data representations and use it as a means to differentiate clients ’ value . 1.2 CONTRIBUTIONS . Our contributions are summarized as the following : • We first provide theoretical proof for the observation that data representations from neural networks tend to follow Gaussian distribution , based on which we propose a representation profiling and matching scheme for fast , low-cost comparison between different representation profiles . • We present a novel FL algorithm FEDPROF that adaptively adjusts clients ’ participation probability based on representation profile dissimilarity . • Results of extensive experiments show that FEDPROF reduces the number of communication rounds by up to 77 % , shortens the overall training time ( up to 4.5x speedup ) while increasing the accuracy of the global model by up to 2.5 % . 2 RELATED WORK . Different from traditional distributed training methods ( e.g. , Alistarh et al . ( 2017 ) ; Wu et al . ( 2018 ) ; Zheng et al . ( 2017 ) ) , Federated Learning assumes strict constraints of data locality and limited communication capacity ( Konečnỳ et al. , 2016 ) . Much effort has been made in optimizing FL and covers a variety of perspectives including communication ( Konečnỳ et al. , 2016 ; Niknam et al. , 2020 ; Cui et al. , 2021 ) , update rules ( Li et al. , 2020 ; Wu et al. , 2021a ; Leroy et al. , 2019 ; Luping et al. , 2019 ) , flexible aggregation ( Wang et al. , 2019 ; Wu et al. , 2021b ) and personalization ( Fallah et al. , 2020 ; Tan et al. , 2021 ; Deng et al. , 2020 ) . The control of device participation is imperative in cross-device FL scenarios ( Kairouz et al. , 2019 ; Yang et al. , 2020 ) where the quality of local data is uncontrollable and the clients show varied value for the training task ( Tuor et al. , 2020 ) . To this end , the selection of clients is pivotal to the convergence of FL over heterogeneous data and devices ( Nishio & Yonetani , 2019 ; Wang et al. , 2020b ; Chai et al. , 2019 ; Acar et al. , 2020 ) . Non-uniform client selection is widely adopted in existing studies ( Li et al. , 2020 ; Goetz et al. , 2019 ; Cho et al. , 2020 ; Li et al. , 2019 ; Chen et al. , 2020b ; Wang et al. , 2020a ) and has been theoretically proven with convergence guarantees ( Chen et al. , 2020b ; Li et al. , 2019 ) . Many approaches sample clients based on their performance ( Nishio & Yonetani , 2019 ; Chai et al. , 2020 ) or aim to jointly optimize the model accuracy and training time ( Shi et al. , 2020 ; Chen et al. , 2020a ; 2021 ) . A popular strategy is to use loss as the information to guide client selection ( Goetz et al. , 2019 ; Lai et al. , 2021 ; Sarkar et al. , 2020 ) . For example , AFL ( Goetz et al. , 2019 ) prioritizes the clients with high loss feedback on local data , but it is potentially susceptible to noisy and unexpected data that yield illusive loss values . Data representations are useful in the context of FL for information exchange ( Feng & Yu , 2020 ) or objective adaptation . For example , Li et al . ( 2021 ) introduces representation similarities into local objectives . This contrastive learning approach guides local training to avoid model divergence . Nonetheless , the study on the distribution of data representations is still lacking whilst its connection to clients ’ training value is hardly explored either . 3 DATA REPRESENTATION PROFILING AND MATCHING . In this paper , we consider a typical cross-device FL setting ( Kairouz et al. , 2019 ) , in which multiple end devices collaboratively perform local training on their own datasets Di , i = 1 , 2 , ... , n. The server owns a validation dataset D∗ for model evaluation . Every dataset is only accessible to its owner . Considering the distributional pattern of data representations ( Fig . 2 ) and the role of the global model in FL , we propose to profile the representations of local data using the global model . In this section , we first provide theoretical proof to support our observation that representations from neural network models tend to follow Gaussian distribution . Then we present a novel scheme to profile data representations and define profile dissimilarity for fast and secure representation comparison . 3.1 GAUSSIAN DISTRIBUTION OF REPRESENTATIONS . We first make the following definition to facilitate our analysis . Definition 1 ( The Lyapunov ’ s condition ) . A set of random variables { Z1 , Z2 , . . . , Zv } satisfy the Lyapunov ’ s condition if there exists a δ such that lim v→∞ 1 s2+δ v∑ k=1 E [ |Zk − µk|2+δ ] = 0 , ( 1 ) where µk = E [ Zk ] , σ2k = E [ ( Zk − µk ) 2 ] and s = √∑v k=1 σ 2 k. The Lyapunov ’ s condition can be intuitively explained as a limit on the overall variation ( with |Zk− µk|2+δ being the ( 2 + δ ) -th moment of Zk ) of a set of random variables . Now we present Proposition 1 and Proposition 2 . The Propositions provide theoretical support for our representation profiling and matching method to be introduced in Section 3.2 . Proposition 1 . The representations from linear operators ( e.g. , a pre-activation dense layer or a plain convolutional layer ) in a neural network tend to follow the Gaussian distribution if the layer ’ s weighted inputs satisfy the Lyapunov ’ s condition . Proposition 2 . The fused representations2 from non-linear operators ( e.g. , a hidden layer of LSTM or a residual block of ResNet ) in a neural network tend to follow the Gaussian distribution if the layer ’ s output elements satisfy the Lyapunov ’ s condition . The proofs of Propositions 1 and 2 are provided in Appendices A.1 and A.2 , respectively . We base our proof on the Lyapunov ’ s CLT which assumes independence between the variables . The assumption theoretically holds by using the Bayesian network concepts : let X denote the layer ’ s input and Hk denote the k-th component in its output . The inference through the layer produces dependencies X → Hk for all k. According to Local Markov Property , we have Hi independent of any Hj ( j ̸= i ) given X . Also , the Lyapunov ’ s condition is typically met when the model is properly initialized and batch normalization is applied . Next , we discuss the proposed representation profiling and matching scheme . | In this paper, the authors propose a user selection algorithm for federated learning (FL). The key motivation is to select high quality clients for update and thus to reduce the impact of low quality data on FL training. A hidden hypothesis is that high quality data has similar representations while noisy and low-quality data has different distributions of representations. Based on this hypothesis, the key idea is to select users based on their representation layer distribution difference from the global model, the higher the difference, the lower the chance of the client being selected. Furthermore, the authors observed and proved that representation layers follow a Gaussian distribution, which makes the representation difference learning more efficient. The authors evaluated the proposed algorithm in comparison to existing algorithms using a small-scale sensor dataset and a large-scale EMNIST dataset. The proposed algorithm performs well in the evaluation. | SP:c840b9aeecbbce27b1f5d1e9773f5eaf249a0806 |
Unified Visual Transformer Compression | 1 INTRODUCTION . Convolution neural networks ( CNNs ) ( LeCun et al. , 1989 ; Krizhevsky et al. , 2012 ; He et al. , 2016 ) have been the de facto architecture choice for computer vision tasks in the past decade . Their training and inference cost significant and ever-increasing computational resources . Recently , drawn by the scaling success of attention-based models ( Vaswani et al. , 2017 ) in natural language processing ( NLP ) such as BERT ( Devlin et al. , 2018 ) , various works seek to leverage the Transformer architecture to computer vision ( Parmar et al. , 2018 ; Child et al. , 2019 ; Chen et al. , 2020 ) . The Vision Transformer ( ViT ) architecture ( Dosovitskiy et al. , 2020 ) , and its variants , have been demonstrated achieves comparable or superior results on a series of image understanding tasks compared to the state of the art CNNs , especially when pretrained on datasets with sufficient model capacity ( Han et al. , 2021 ) . Despite the emerging power of ViTs , such architecture is shown to be even more resource-intensive than CNNs , making its deployment impractical under resource-limited scenarios . That is due to the absence of customized image operators such as convolution , the stack of self-attention modules that suffer from quadratic complexity with regard to the input size , among other factors . Owing to the substantial architecture differences between CNNs and ViTs , although there is a large wealth of successful CNN compression techniques ( Liu et al. , 2017 ; Li et al. , 2016 ; He et al. , 2017 ; 2019 ) , it is not immediately clear whether they are the same effective for ViTs . One further open question is how to best integrate their powers for ViT compression , as one often needs to jointly exploit multiple compression means for CNNs ( Mishra & Marr , 2018 ; Yang et al. , 2020b ; Zhao et al. , 2020b ) . On the other hand , the NLP literature has widely explored the compression of BERT ( Ganesh et al. , 2020 ) , ranging from unstructured pruning ( Gordon et al. , 2020 ; Guo et al. , 2019 ) , attention head pruning ( Michel et al. , 2019 ) and encoder unit pruning ( Fan et al. , 2019 ) ; to knowledge distillation ( Sanh et al. , 2019 ) , layer factorization ( Lan et al. , 2019 ) , quantization ( Zhang et al. , 2020 ; Bai et al. , 2020 ) and dynamic width/depth inference ( Hou et al. , 2020 ) . Lately , earlier works on compressing ViTs have also drawn ideas from those similar aspects : examples include weight/attention pruning ( Zhu et al. , 2021 ; Chen et al. , 2021b ; Pan et al. , 2021a ) , input feature ( token ) selection ( Tang et al. , 2021 ; Pan et al. , 2021a ) , and knowledge distillation ( Touvron et al. , 2020 ; Jia et al. , 2021 ) . Yet up to our best knowledge , there has been no systematic study that strives to either compare or compose ( even naively cascade ) multiple individual compression techniques for ViTs – not to mention any joint optimization like ( Mishra & Marr , 2018 ; Yang et al. , 2020b ; Zhao et al. , 2020b ) did for CNNs . We conjecture that may potentially limit the performance gain of ViT compression . This paper aims to establish the first all-in-one compression framework that organically integrate three different compression strategies : ( structured ) pruning , block skipping , and knowledge distillation . Rather than ad-hoc composition , we for the first time propose a unified vision transformer compression ( UVC ) framework , which seamlessly integrates the three effective compression and jointly optimizes towards the task utility goal under the budget constraints . UVC is mathematically formulated as a constrained optimization problem and solved using the primal-dual algorithm from end to end . Our main contributions are outlined as follows : • We present UVC that unleashes the potential of ViT compression , by jointly leveraging multiple ViT compression means for the first time . UVC only requires to specify a global resource budget , and can automatically optimize the composition of different techniques . • We formulate and solve UVC as a unified constrained optimization problem . It simultaneously learns model weights , layer-wise pruning ratios/masks , and skip configurations , under a distillation loss and an overall budget constraint . • Extensive experiments are conducted with several DeiT backbones on ImageNet , which consistently verify the effectiveness of our proposal . For example , UVC on DeiT-Tiny ( with/without distillation tokens ) yields around 50 % FLOPs reduction , with little performance degradation ( only 0.3 % /0.9 % loss compared to the baseline ) . 2 RELATED WORK . 2.1 VISION TRANSFORMER . Transformer ( Vaswani et al. , 2017 ) architecture stems from natural language processing ( NLP ) applications first , with the renowned technique utilizing Self-Attention to exploit information from sequential data . Though intuitively , transformer model seems inept to the special inductive bias of space correlation for images-oriented tasks , it has proved itself of capability on vision tasks just as good as CNN ( Dosovitskiy et al. , 2020 ) . The main point of Vision Transformer is that they encode the images by partitioning it into sequences of patches , projecting them into token embeddings , and feeding them to transformer encoders ( Dosovitskiy et al. , 2020 ) . ViT outperforms convolutional nets if given sufficient training data on various image classification benchmarks . Since then , ViT has been developed to various different variants first on data efficiency towards training like DeiT ( Touvron et al. , 2020 ) and T2T-ViT ( Yuan et al. , 2021 ) are proposed to enhance ViT ’ s training data efficiency , by leveraging teacher-student and better crafted architectures respectively . Then modifications are made to the general structure of ViT to tackle other popular downstream computer vision tasks , including object detection ( Zheng et al. , 2020 ; Carion et al. , 2020 ; Dai et al. , 2021 ; Zhu et al. , 2020 ) , semantic segmentation ( Wang et al. , 2021a ; b ) , image enhancement ( Chen et al. , 2021a ; Yang et al. , 2020a ) , image generation ( Jiang et al. , 2021 ) , video understanding ( Bertasius et al. , 2021 ) , and 3D point cloud processing ( Zhao et al. , 2020a ) . 2.2 MODEL COMPRESSION . Pruning . Pruning methods can be broadly categorized into : unstructured pruning ( Dong et al. , 2017 ; Lee et al. , 2018 ; Xiao et al. , 2019 ) by removing insignificant weight via certain criteria ; and structured pruning ( Luo et al. , 2017 ; He et al. , 2017 ; 2018 ; Yu et al. , 2018 ; Lin et al. , 2018 ; Guo et al. , 2021 ; Yu et al. , 2021 ; Chen et al. , 2021b ; Shen et al. , 2021 ) by zero out parameters in a structured group manner . Unstructured pruning can be magnitude-based ( Han et al. , 2015a ; b ) , hessian-based ( LeCun et al. , 1990 ; Dong et al. , 2017 ) , and so on . They result in irregular sparsity , causing sparse matrix operations that are hard to accelerate on hardware ( Buluc & Gilbert , 2008 ; Gale et al. , 2019 ) . This can be addressed with structured pruning where algorithms usually calculate an importance score for some group of parameters ( e.g. , convolutional channels , or matrix rows ) . Liu et al . ( 2017 ) uses the scaling factor of the batch normalization layer as the sensitivity metric . Li et al . ( 2016 ) proposes channel-wise summation over weights as the metric . Lin et al . ( 2020 ) proposes to use channel rank as sensitivity metric while ( He et al. , 2019 ) uses the geometric median of the convolutional filters . Particularly for transformer-based models , the basic structures that one many consider pruning with include blocks , attention heads , and/or fully-connected matrix rows . For example , ( Michel et al. , 2019 ) canvasses the behavior of multiple attention heads and proposes an iterative algorithm to prune redundant heads . ( Fan et al. , 2019 ) prunes entire layers to extract shallow models at inference time . Knowledge Distillation . Knowledge distillation ( KD ) is a special technique that do not explicitly compress the model from any dimension of the network . KD lets a student model leverages “ soft ” labels coming from a teacher network ( Hinton et al. , 2015 ) to boost the performance of a student model . This can be regarded as a form of compression from the teacher model into a smaller student . The soft labels from the teacher is well known to be more informative than hard labels , and leads to better student training ( Yuan et al. , 2020 ; Wei et al. , 2020 ) Skip Configuration . Skip connection plays a crucial role in transformers ( Raghu et al. , 2021 ) , by tackling the vanishing gradient problem ( Vaswani et al. , 2017 ) , or by preventing their outputs from degenerating exponentially quickly with respect to the network depth ( Dong et al. , 2021 ) . Meanwhile , transformer has an inborn advantage of uniform block structure . A basic transformer block contains a Self-Attention module and a Multi-layer Perceptron module , and its output size matches the input size . That implies the possibility to manipulate the transformer depth by directly skipping certain layers or blocks . ( Xu et al. , 2020 ) proposes to randomly replace the original modules with their designed compact substitutes to train the compact modules to mimic the behavior of the original modules . ( Zhang & He , 2020 ) design a Switchable-Transformer Blocks to progressively drop layers from the architecture . To flexibly adjust the size and latency of transformers by selecting adaptive width and depth , DynaBERT ( Hou et al. , 2020 ) first trains a width-adaptive BERT and then allows for both adaptive width and depth . LayerDrop ( Fan et al. , 2019 ) randomly drops layers at training time , while at test time , it allows for sub-network selection to any desired depth . 3 METHODOLOGY . 3.1 PRELIMINARY . Vision Transformer ( ViT ) Architecture . To unfold the unified algorithm in the following sections , here we first introduce the notations . There are totally L transformer blocks , while H denotes number of attention heads in each transformer block . In each block l of the ViT , there are two constituents , namely the self-attention module and the MLP module . In the self-attention module , W ( l ) Q , W ( l ) K , W ( l ) V are the weights of the three linear projection matrix using the block input X l to calculate Ql , Kl , V l. The weights of the projection module that follows the calculation of self-attention is denoted as W ( l,1 ) , represents the first linear projection module in block l. The MLP module consists of two linear projection modules W ( l,2 ) and W ( l,3 ) . Compression Targets The main parameters that can be potentially compressed in a ViT block are W ( l ) Q , W ( l ) K , W ( l ) V and W ( l,1 ) , W ( l,2 ) , W ( l,3 ) . Our goal is to prune the head number and head dimensions simultaneously inside each layer , associated with the layer level skipping , solved in a unified framework . Currently , we do not extend the scope to reducing other dimensions such as input patch number or token size . However , our framework can also pack these parts together easily . For head number and head dimensions pruning , instead of going into details of QKV computation , we innovate to use { W ( l,1 ) } 1≤l≤L to be the proxy pruning targets . Pruning on these linear layers is equivalent to the pruning of head number and head dimension . We also add { W ( l,3 ) } 1≤l≤L as our pruning targets , since these linear layers do not have dimension alignment issues with other parts , they can be freely pruned . We do not prune W ( l ) Q , W ( l ) K , W ( l ) V since Q l , Kl , V l should be of the same shape for computing self-attention . Besides , skip connection is recognized as another important component to enhance the performance of ViTs ( Raghu et al. , 2021 ) . The dimension between X l and the output of linear projection module should be aligned . For this sake , W ( l,2 ) is excluded from our compression . Eventually , the weights to be compressed in our subsequent framework are { W ( l,1 ) , W ( l,3 ) } 1≤l≤L . | This paper proposed a unified ViT compression framework that assembles pruning, layer skipping, and knowledge distillation as one. By adding the sparsity loss and the resources loss into the objective, ViT models can be stably trained at a high sparse ratio. By introducing the knowledge distillation loss, the compressed model can maintain performance with around 50% of the original FLOPs. Experimental results in ImageNet with DeiT models prove the effectiveness of the proposed method. | SP:2d58776ea12096986ca728229d06765779ebad50 |
Global Convergence of Multi-Agent Policy Gradient in Markov Potential Games | 1 INTRODUCTION . Multi-agent reinforcement learning ( MARL ) has been the fundamental driver of numerous recent advances in Artificial Intelligence ( AI ) and Machine Learning ( ML ) ranging from super-human performance in competitive game-playing ( Silver et al. , 2016 ; 2018 ; Brown & Sandholm , 2019 ; Jaderberg et al. , 2019 ) and multi-tasking ( Mnih et al. , 2015 ; OpenAI , 2018 ; Vinyals et al. , 2019 ) to robotics , autonomous-driving and cyber-physical systems ( Busoniu et al. , 2008 ; Zhang et al. , 2019 ) . However , despite the popularity of MARL algorithms to analyze these systems in practice , the theory that underpins their empirical success lags behind ( Dafoe et al. , 2020 ) . Many state-of-the-art theoretical results concern single-agent RL systems , typically modelled as single-agent Markov Decision Processes ( MDPs ) ( Bertsekas , 2000 ; Panait & Luke , 2005 ; Sutton & Barto , 2018 ) . The main challenge when transitioning from single to multi-agent RL settings is the computation of Nash policies . For n ≥ 2 agents , a Nash policy is defined to be a profile of policies ( π∗1 , ... , π∗n ) so that by fixing the policies of all agents but i , π∗i is optimal for the resulting single-agent MDP and this is true for all 1 ≤ i ≤ n 1 ( Definition 1 ) . In multi-agent settings , Nash policies may not be unique in principle and , unlike singe-agent MDPs , agents ’ rewards may differ dramatically between them . A common approach to compute Nash policies in MDPs is the use of policy gradient methods . The significant progress in the analysis of such methods ( see Agarwal et al . ( 2020 ) and references therein ) has mainly concerned the single-agent case or the case of pure common interests ( identical agents ) ( Wang & Sandholm , 2002 ; Panait & Luke , 2005 ) : the convergence properties of policy gradient in general MARL settings remain poorly understood . Recent steps towards a theory for multi-agent settings involve Daskalakis et al . ( 2020 ) who show convergence of independent policy gradient to the optimal policy for two-agent zero-sum stochastic games , Wei et al . ( 2021 ) who improve the result of Daskalakis et al . ( 2020 ) using optimistic policy gradient and Zhao et al . ( 2021 ) who study extensions of Natural Policy Gradient using function approximation . It is worth noting that the positive results 1Analogue of Nash equilibrium notion . of Daskalakis et al . ( 2020 ) ; Wei et al . ( 2021 ) and Zhao et al . ( 2021 ) depend on the fact that two-agent stochastic zero-sum games satisfy the min-max equals max-min property ( Shapley , 1953 ) . If we move away from the extremes of single-agent or purely competitive settings ( two-agents , zero-sum ) , a lot of these regularities , and in particular the value-uniqueness property , cease to hold . However , building a theory to analyze problems of cooperation between two or more agents constitutes a primary open challenge for the fields of AI and ML ( Dafoe et al. , 2020 ; Dafoe et al. , 2021 ) . Based on the above , our work is motivated by the following natural question : Can we get ( provable ) convergence guarantees for multi-agent RL settings in which agents have aligned incentives , i.e. , in which coordination is desirable ? Model and Informal Statement of Results . To make progress in this direction , we study a class of n-agent MDPs that naturally generalize normal form potential games ( Monderer & Shapley , 1996 ) , the archetypal model of interactions between multiple agents with aligned , yet not necessarily identical interests , called Markov Potential Games ( MPGs ) . In words , a multi-agent MDP is an MPG as long as there exists a ( state-dependent ) real-valued potential function Φ so that if an agent i changes their policy ( and the rest of the agents keep their policy unchanged ) , the difference in agent i ’ s value/utility , V i , is captured by the difference in the value of Φ ( Definition 2 ) . Our first task is to understand the structural properties of MPGs and their Nash policies . Rather surprisingly , many insights from normal-form potential games do not carry over as MPGs involve settings with purely competitive ( zero-sum ) interactions at some states . Moreover , Markov games in which every state-interaction is a potential game are not necessarily MPGs . These findings suggest that MPGs form a class of MDPs with rich structure which challenges our intuition on the nature of cooperation in state-based interactions . On the other hand , MPGs trivially include MDPs of pure common interests ( MDPs in which agents have identical rewards ) and showcase intuitively expected properties such as the existence of deterministic Nash policies . Our structural results are as follows . Theorem 1.1 ( Structural Properties of MPGs ) . The following facts are true for MPGs with n-agents . ( a ) There always exists a deterministic Nash policy profile ( see Theorem 3.1 ) . ( b ) We can construct MDPs for which each state is a ( normal-form ) potential game but which are not MPGs . This can be true regardless of whether the whole MDP is competitive or cooperative in nature ( see Examples 1 and 2 , respectively ) . On the opposite side , we can construct MDPs that are MPGs , but which include states that are purely competitive ( i.e. , zero-sum games ) , see Figure 3 . ( c ) We provide sufficient conditions so that an MDP is an MPG . These include cases where each state is a ( normal-form ) potential game and the transition probabilities are not affected by agents actions or the reward functions satisfy certain regularity conditions between different states ( see conditions C1 and C2 in Proposition 3.2 ) . We then turn to our motivating question above and , in our main contribution , we answer it in the affirmative . We show that if every agent i independently runs ( with simultaneous updates ) projected gradient ascent ( PGA ) on their policy ( using their value V i ) , then , after O ( 1/ 2 ) iterations , the system will reach an -approximate Nash policy . Here , independence means that ( PGA ) requires only local information to determine the updates , i.e. , each agent ’ s own rewards , actions , and view of the environment . Such protocols are naturally motivated in distributed settings where all information about type of interaction and other agents ’ actions is encoded in the agent ’ s environment . For the finite samples analogue , we show that the system will reach an -approximate Nash policy after O ( 1/ 6 ) iterations . Our main convergence results are summarized in the following ( informal ) Theorem . Theorem 1.2 ( Convergence of Policy Gradient ( Informal ) ) . Consider an MPG with n agents and let > 0 . ( a ) Exact Gradients : If each agent i runs independent policy gradient using direct parameterization on their policy and the updates are simultaneous , then the learning dynamics reach an -Nash policy after O ( 1/ 2 ) iterations . ( b ) Finite Samples : If each agent i runs stochastic policy gradient using greedy parameterization ( see equation 3 ) on their policy and the updates are simultaneous , then the learning dynamics reach an -Nash policy after O ( 1/ 6 ) iterations . The formal statements for cases ( a ) and ( b ) are provided in Theorems 4.2 and 4.4 , respectively . The technical details are presented in Section 4 . The main step in the proof of Theorem 1.2 establishes that Projected Gradient Ascent ( PGA ) on the potential function generates the same dynamics as each agent running independent PGA on their value function . This follows from a straightforward derivation of an agent-wise version of the single-agent gradient domination property which can be used to show that every ( approximate ) stationary point ( Definition 4 ) of the potential function is an ( approximate ) Nash policy ( Lemma 4.1 ) . If agents do not have access to exact gradients , the key is to get an unbiased sample for the gradient of the value functions and prove that it has bounded variance ( in terms of the parameters of the MPG ) . This is established by requiring agents to perform stochastic PGA with α-greedy exploration ( equation 3 ) . The main idea is that this parameterization stays away from the boundary of the simplex throughout its trajectory ( Daskalakis et al. , 2020 ) . Other Related Works . Our paper contributes to the growing literature on cooperative AI and ML ( Carroll et al. , 2019 ; Dafoe et al. , 2020 ) . The results on convergence of MARL algorithms are scarce and largely restricted to purely competitive ( Daskalakis et al. , 2020 ; Wei et al. , 2021 ; Zhao et al. , 2021 ) or purely cooperative ( Wang & Sandholm , 2002 ; Bard et al. , 2020 ) settings . As Daskalakis et al . ( 2020 ) argue , the current frontier concerns the extension to settings that are not zero-sum , involve more than two agents and/or are cooperative in nature , albeit likely for weaker solution concepts . Our current paper proceeds precisely in this direction , and in fact , it does so without reverting to a weaker solution concept . Concerning the setup , our paper contributes to the rapidly growing literature on MPGs and variations thereof which is showcased by the works of Marden ( 2012 ) ; Valcarcel Macua et al . ( 2018 ) ; Mguni ( 2021 ) ; Mguni et al . ( 2021 ) and the partially concurrent work of Zhang et al . ( 2021 ) . Marden ( 2012 ) study Markov games that are potential at every state and which satisfy a strong additional state-transitivity property . Under the same assumption , Mguni ( 2021 ) derive an analogous result to our Theorem 3.1 on the existence of deterministic Nash policies . Valcarcel Macua et al . ( 2018 ) provide an analytical way to find a closed-loop Nash policy in a class of Markov games that is more closely related to our current MPG setting ( cf . Proposition 3.2 ) . Zhang et al . ( 2021 ) study the same class of MPGs , and present additional practical applications . By introducing the notion of averaged MDPs , they derive an alternative , model-based policy evaluation method , which , interestingly , establishes the same sample-complexity ( of O ( −6 ) ) as our model-free estimation . As pointed out by Zhang et al . ( 2021 ) , it will be instructive to further explore this connection . Concerning the technical parts , our methods are related to Daskalakis et al . ( 2020 ) ; Agarwal et al . ( 2020 ) ; Kakade & Langford ( 2002 ) and to Davis & Drusvyatskiy ( 2018 ) ; Bubeck ( 2015 ) ; Nemirovski et al . ( 2009 ) . 2 PRELIMINARIES . Markov Decision Processes ( MDPs ) . We consider a setting with n agents who select actions in a shared Markov Decision Process ( MDP ) . Formally , an MDP is a tuple G = ( S , N , { Ai , Ri } i∈N , P , γ , ρ ) , where S is a finite state space of size S = |S| , N = { 1 , 2 , . . . , n } is the set of agents , and Ai is a finite action space of size Ai = |Ai| for each agent i ∈ N with generic element ai ∈ Ai . We write A = ∏ i∈N Ai and A−i = ∏ j 6=iAj to denote the joint action spaces of all agents and of all agents other than i with generic elements a = ( ai ) i∈N and a−i = ( aj ) j 6=i , respectively . Ri : S × A → [ −1 , 1 ] is the reward function of agent i ∈ N , i.e. , Ri ( s , ai , a−i ) is the instantaneous reward of agent i when they take action ai and all other agents take actions a−i at state s ∈ S. P is the transition probability function , for which P ( s′ | s , a ) is the probability of transitioning from s to s′ when a ∈ A is chosen by the agents . Finally , γ ( same for all agents ) is a discount factor for future rewards and ρ ∈ ∆ ( S ) is a distribution for the initial state at time t = 0.2 Whenever time is relevant , we will index the above terms with t. In particular , at each time step t ≥ 0 , all agents i ∈ N observe the state st ∈ S , select actions at = ( ai , t , a−i , t ) , receive rewards ri , t : = Ri ( st , at ) , and transition to the next state st+1 ∼ P ( · | st , at ) . We will write τ = ( st , at , rt ) t≥0 to denote the trajectories of the system , where rt : = ( ri , t ) , i ∈ N . Policies and Value Functions . For each agent i ∈ N , a deterministic , stationary policy πi : S → Ai specifies the action of agent i at each state s ∈ S , i.e. , πi ( s ) = ai ∈ Ai for each s ∈ S. A stochastic , stationary policy πi : S → ∆ ( Ai ) specifies a probability distribution over the actions of agent i for each state s ∈ S. Accordingly , πi ∈ Πi : = ∆ ( Ai ) S . In this case , we will write ai ∼ πi ( · | s ) to denote the randomized action of agent i at state s ∈ S. As above , we will write π = ( πi ) i∈N ∈ Π : = ×i∈N∆ ( Ai ) S and π−i = ( πj ) i 6=j∈N ∈ Π−i : = ×i6=j∈N∆ ( Aj ) S to denote the joint policies of all agents and of all agents other than i , respectively . A joint policy π induces a distribution Prπ over trajectories τ = ( st , at , rt ) t≥0 , where s0 is drawn from the initial state distribution ρ and ai , t is drawn from πi ( · | st ) for all i ∈ N . 2We will write ∆ ( X ) to denote the set of probability distributions over any set X . The value function , V is : Π → R , gives the expected reward of agent i ∈ N when s0 = s and the agents draw their actions , at = ( ai , t , a−i , t ) , at time t ≥ 0 from policy π = ( πi , π−i ) V is ( π ) : = Eπ [ ∑∞ t=0 γtri , t | s0 = s ] . ( 1 ) We also write V iρ ( π ) = Es∼ρ [ V is ( π ) ] if the initial state is random and follows distribution ρ . The solution concept that we will be focusing on are the Nash Policies which are formally defined next . Definition 1 ( -Nash Policy ) . A joint policy π∗ = ( π∗i ) i∈N is an -Nash policy if there exists an ≥ 0 so that for each agent i ∈ N , V is ( π∗i , π∗−i ) ≥ V is ( πi , π∗−i ) − , for all πi ∈ ∆ ( Ai ) S , and all s ∈ S. If = 0 , then π∗ is a called a Nash policy . In this case , π∗i maximizes each agent i ’ s value function for each starting state s ∈ S given the policies , π∗−i = ( π∗j ) j 6=i , of all other agents j 6= i ∈ N . The definition of a Nash policy remains the same if s ∼ ρ ( random starting state ) . | The paper introduces the Markov Potential Game (MPG), which generalizes the classical potential game. The authors then point out several properties of MPG. It proves the convergence to $\epsilon$-NE for learning agents following independent policy gradient or stochastic gradient. The paper also presents the experiment on a MPG of congestion games that verifies the theoretical results. | SP:5e61fb0b1e9e65ced941ad735535761280b33058 |
Distributed Zeroth-Order Optimization: Convergence Rates That Match Centralized Counterpart | Zeroth-order optimization has become increasingly important in complex optimization and machine learning when cost functions are impossible to be described in closed analytical forms . The key idea of zeroth-order optimization lies in the ability for a learner to build gradient estimates by queries sent to the cost function , and then traditional gradient descent algorithms can be executed replacing gradients by the estimates . For optimization over large-scale multi-agent systems with decentralized data and costs , zeroth-order optimization can continue to be utilized to develop scalable and distributed algorithms . In this paper , we aim at understanding the trend in performance transitioning from centralized to distributed zeroth-order algorithms in terms of convergence rates , and focus on multi-agent systems with time-varying communication networks . We establish a series of convergence rates for distributed zeroth-order subgradient algorithms under both one-point and two-point zeroth-order oracles . Apart from the additional node-to-node communication cost due to the distributed nature of algorithms , the established rates in convergence are shown to match their centralized counterpart . We also propose a multi-stage distributed zeroth-order algorithm that better utilizes the learning rates , reduces the computational complexity , and attains even faster convergence rates for compact decision set . 1 INTRODUCTION . Various machine learning tasks ultimately boil down to solving optimization problems of different forms , where the cost functions are formed jointly by the data accumulated in experiences and the model used in representing the learning framework . Gradient descent algorithms have been playing a foundational role in practically solving such optimization problems . However , for learning tasks with high-dimensional data and involved learning representations , access to the gradient of the cost function may turn out not possible : the cost function supporting the learning may not have a closed analytical form ; or it is simply too computationally costly to be properly differentiated . Zeroth-order optimization provides a systemic way of facilitating gradient descent without direct access to gradient information , where oracles query the cost function values and generate gradient estimates . Zeroth-order methods have shown a number of successful applications , e.g. , searching for adversarial attacks in deep learning Chen et al . ( 2019 ) ; Liu et al . ( 2019 ) and policy search in reinforcement learning Vemula et al . ( 2019 ) . The literature has also explored the potential in extending the standard ( centralized ) zeroth-order optimization to distributed settings over multi-agent systems , where the data and cost functions are scattered across a network of decentralized agents . With the help of a communication network , the agents may collaboratively solve the network-level optimization task by iteratively exchanging decisions obtained from local zeroth-order descent . The rates of convergence of centralized zerothorder optimization algorithms are now well understood for several sub-classes of convex functions . We are interested in systematically investigating these convergence rates scale for the corresponding distributed algorithms , and focus on the case of time-varying communication networks . 1.1 PROBLEM DEFINITION . Consider a network of agents ( nodes ) V = { 1 , . . . , N } . The agents aim to collectively solve the following distributed optimization problem minimize f ( x ) : = N∑ i=1 fi ( x ) subject to x ∈ X . ( 1 ) Here x ∈ Rd is the decision variable , X ⊆ Rd is a convex decision space , and fi : Rd → R is a private convex objective function associated with agent i . The communication network connecting the nodes is described by a time-varying graph G ( t ) = ( V , E ( t ) ) , where E ( t ) is the set of activated links at time t. Let A ( t ) be a weight matrix at time t for the graph G ( t ) : for each link ( i , j ) ∈ E ( t ) , a weight [ A ( t ) ] ij > 0 is assigned , and [ A ( t ) ] ij = 0 for ( i , j ) /∈ E ( t ) . We impose the following assumption on the communication network E ( t ) and the weight matrix A ( t ) . Assumption 1 ( i ) There exists a positive integer B such that the union graph ( V , E ( kB+ 1 ) ∪ · · ·∪ E ( ( k+1 ) B ) ) is strongly connected for all k ≥ 0 ; ( ii ) A ( t ) is doubly stochastic , i.e. , ∑N i=1 [ A ( t ) ] ij = 1 and ∑N j=1 [ A ( t ) ] ij = 1 ; ( iii ) [ A ( t ) ] ii ≥ ξ for all i , and [ A ( t ) ] ij ≥ ξ if ( j , i ) ∈ E ( t ) , where ξ > 0 . 1.2 FUNCTION CLASSES . Let Fcvx denote the set of all convex functions on Rd . We define the following three classes of convex functions in Fcvx . • The Lipschitz continuous class Flip ( Lf , X ) contains the functions in Fcvx that admit a finite Lipschitz constant Lf over X , i.e. , Flip ( Lf , X ) : = { g ∈ Fcvx : ∀x , x′ ∈ X , |g ( x ) − g ( x′ ) | ≤ Lf‖x− x′‖ } . • The smooth class Fsmo ( sf , X ) contains the functions that admit a sf -Lipschitz continuous gradient over X , i.e. , Fsmo ( sf , X ) = { g ∈ Fcvx : ∀x , x′ ∈ X , ‖∇g ( x ) −∇g ( x′ ) ‖ ≤ sf‖x− x′‖ } . • The strongly convex class Fsc ( µf , X ) contains the functions that are µf -strongly convex , i.e. , Fsc ( µf , X ) = { g ∈ Fcvx : ∀x , x′ ∈ X , g ( x ) ≥ g ( x′ ) + 〈∇g ( x′ ) , x− x′〉+ µf 2 ‖x− x′‖2 } . 1.3 CONTRIBUTIONS AND RELATED WORK . Contributions . We first present MAZOPA , a multi-agent zeroth-order projection averaging algorithm . In MAZOPA , the agents iteratively carry out local zeroth-order descents for their private costs to generate intermediate decisions , send these intermediate decisions to their neighbors over the graph G ( t ) , and then update their decisions by projecting the average neighboring intermediate decisions onto X . For distributed zeroth-order oracles based on one-point or two-point estimates , a series of convergence rate results are established for the three basic function classes . Remarkably , the convergence rates for distributed algorithms are found to be matching their centralized counterpart , and sometimes even tighter rates are obtained , as summarized in Table 1 . These results show that by paying the price of node-to-node communication , distributed zeroth-order optimization provides equal performance guarantees as those of centralized approaches . Next , we generalize the MAZOPA to a multi-stage setting , where the local zeroth-order descents take place for multiple steps before the projected averaging in a sequence of epochs . Such multi-stage MAZOPA is shown to be able to reduce the computational complexity , while providing improved convergences rates compared to MAZOPA when the decision set is compact . Related Work . Recently , many types of centralized zeroth-order optimization algorithms have been studied , and their convergence rates ( and the way they depend on the dimension ) have been established in different settings . For unconstrained convex optimization , Nesterov & Spokoiny ( 2017 ) develops several types of two-point gradient estimators and achieves convergence rates that scale with dimension as O ( d2 ) . For constrained stochastic optimization , Duchi et al . ( 2015 ) establishes that the convergence rates are sharp up to factors at most logarithmic in the dimension . Zeroth-order optimization has a natural connection to bandit online optimization , where the latter focuses on dynamic environment where the objective functions are varying over time ( see , e.g. , Flaxman et al . ( 2005 ) ; Agarwal et al . ( 2010 ) ; Shamir ( 2013 ; 2017 ) ; Bubeck et al . ( 2017 ) ; Lattimore ( 2020 ) ; Hazan & Levy ( 2014 ) ) . In particular , the seminal work Flaxman et al . ( 2005 ) constructs a one-point gradient estimator ( or one-point bandit feedback model ) and achieves an O ( d/T 1/4 ) average regret . For two-point gradient estimator , Shamir ( 2017 ) establishes the tightness of the dimension-dependent factor O ( √ d ) in the framework of zeroth-order stochastic mirror descent . It is worth zooming into the literature on distributed zeroth-order/bandit online optimization . Due to the absence of a central coordinator , the algorithms developed should always rely on local computations and communications ( e.g. , Yuan & Ho ( 2015 ) ; Yi et al . ( 2020 ) ; Jakovetic et al . ( 2018 ) ; Hajinezhad et al . ( 2019 ) ; Wang et al . ( 2019 ) ; Pang & Hu ( 2019 ) ; Hajinezhad & Zavlanos ( 2018 ) ; Wan et al . ( 2020 ) ) . This makes the convergence analysis of the distributed zeroth-order/bandit online optimization algorithms more challenging . In Yuan & Ho ( 2015 ) , the authors develop a class of distributed zeroth-order optimization algorithms that require two functional evaluations at each iteration , and establishes asymptotic convergence of the algorithm . Non-asymptotic convergence is established in Jakovetic et al . ( 2018 ) ; Hajinezhad et al . ( 2019 ) ; Wang et al . ( 2019 ) ; Pang & Hu ( 2019 ) ; Hajinezhad & Zavlanos ( 2018 ) , but the dimension-dependence factors are either O ( d2 ) or far from optimal . The work Yi et al . ( 2020 ) considers distributed online optimization with long-term constraints and establishes bounds on regret as well as constraint violations . To avoid Euclidean projection onto the constraint set , Wan et al . ( 2020 ) develops a distributed bandit online optimization algorithm based on conditional gradient descent and one-point bandit feedback , and achieves a regret scaling of O ( T 3/4 √ lnT ) . 2 THE MAZOPA ALGORITHM AND ITS CONVERGENCE RATES In this section , we present the MAZOPA algorithm and establish the convergence rates for the three function classes . 2.1 DISTRIBUTED ZEROTH-ORDER ORACLES . Let n be a random vector in Rd drawn from some probability distribution . Then f̂i ( x ; δ ) : = En [ fi ( x + δn ) ] ( 2 ) is a smoothed function for fi . Here δ > 0 is a parameter setting the level of the smoothing . We introduce the following definition on distributed zeroth-order oracles ( DistZOO ) . Definition 1 ( DistZOO ) A vector g̃i ( x ; δ ) ∈ Rd is called a distributed zeroth-order oracle at node i if the following conditions hold : ( i ) E [ g̃i ( x ; δ ) ] = ∇f̂i ( x ; δ ) for all x ∈ Rd ; ( ii ) If fi ∈ Flip ( Lf ) , then f̂i ∈ Flip ( Lf ) as well , and there holds ∣∣f̂i ( x ; δ ) − fi ( x ) ∣∣ ≤ pdLfδ , with pd being some positive constant ; ( iii ) If fi ∈ Fsmo ( sf ) , then ∣∣f̂i ( x ; δ ) − fi ( x ) ∣∣ ≤ 12 p̃dsfδ2 with p̃d being some positive constant . A number of DistZOO satisfying Definition 1 can be obtained using existing gradient estimators , see , e.g. , Liu et al . ( 2020 ) . In the paper , we provide two representative gradient estimators that are commonly adopted in the literature . Let ui be a random vector independently generated from a unit sphere B1 in Rd . Then ( e.g. , Flaxman et al . ( 2005 ) ) g̃OPi ( x ; δ ) : = fi ( x + δtui ) uid/δ ( 3 ) is a one-point DistZOO satisfying Definition 1 . Moreover , g̃TPi ( x ; δ ) : = d 2δ ( fi ( x + δu ) − fi ( x− δu ) ) u ( 4 ) is a two-point DistZOO satisfying Definition 1 ( e.g. , Shamir ( 2017 ) ) . 2.2 THE MAZOPA ALGORITHM We present the following Multi-Agent Zeroth-Order Projection Averaging ( MAZOPA ) algorithm , which consists of two steps , a local zeroth-order optimization step and a distributed averaging step . MAZOPA , whose pseudo-code is presented in Algorithm 1 , is a variation of the multi-agent subgradient averaging algorithm proposed in Nedic et al . ( 2008 ) ; Nedic & Ozdaglar ( 2009 ) ; Nedic et al . ( 2010 ) , where the local optimization step is executed by sub-gradient descent . Algorithm 1 MAZOPA : x̂i ( T ) = MAZOPA ( xi ( 1 ) , ηt , δt , X ) Require : step size ηt , DistZOO g̃i ( x ; δt ) with exploration parameter δt for all i ∈ V Ensure : xi ( 1 ) ∈ X , ∀i ∈ V 1 : for t = 1 to T do 2 : Node i queries the DistZOO at point xi ( t ) and receives g̃i ( xi ( t ) ; δt ) 3 : Node i computes vi ( t ) = xi ( t ) − ηt · g̃i ( xi ( t ) ; δt ) 4 : Node i updates its state by using the information received from its instant neighbors xi ( t+ 1 ) = projX ( N∑ j=1 [ A ( t ) ] ijvj ( t ) ) 5 : end for Output : x̂i ( T ) = 1T ∑T t=1 xi ( t ) | This paper proposes a zeroth-order optimization algorithm for distributed, multi-agent systems with time-varying communication networks. The authors show that their presented multi-agent zeroth-order projection averaging algorithm (and its improved multi-stage version) has a convergence rate that matches the centralized counterpart algorithms under different assumptions. A small numerical experiment is also conducted to illustrate their theoretical findings. | SP:b249ace6538513759286988a08e2be87b7fe4f04 |
VAT-Mart: Learning Visual Action Trajectory Proposals for Manipulating 3D ARTiculated Objects | Perceiving and manipulating 3D articulated objects ( e.g. , cabinets , doors ) in human environments is an important yet challenging task for future home-assistant robots . The space of 3D articulated objects is exceptionally rich in their myriad semantic categories , diverse shape geometry , and complicated part functionality . Previous works mostly abstract kinematic structure with estimated joint parameters and part poses as the visual representations for manipulating 3D articulated objects . In this paper , we propose object-centric actionable visual priors as a novel perception-interaction handshaking point that the perception system outputs more actionable guidance than kinematic structure estimation , by predicting dense geometry-aware , interaction-aware , and task-aware visual action affordance and trajectory proposals . We design an interaction-for-perception framework VATMART to learn such actionable visual representations by simultaneously training a curiosity-driven reinforcement learning policy exploring diverse interaction trajectories and a perception module summarizing and generalizing the explored knowledge for pointwise predictions among diverse shapes . Experiments prove the effectiveness of the proposed approach using the large-scale PartNet-Mobility dataset in SAPIEN environment and show promising generalization capabilities to novel test shapes , unseen object categories , and real-world data . 1 INTRODUCTION . We live in a 3D world composed of a plethora of 3D objects . To help humans perform everyday tasks , future home-assistant robots need to gain the capabilities of perceiving and manipulating a wide range of 3D objects in human environments . Articulated objects that contain functionally important and semantically interesting articulated parts ( e.g. , cabinets with drawers and doors ) especially require significantly more attention , as they are more often interacted with by humans and artificial intelligent agents . Having much higher degree-of-freedom ( DoF ) state spaces , articulated objects are , however , generally more difficult to understand and subsequently to interact with , compared to 3D rigid objects that have only 6-DoF for their global poses . There has been a long line of research studying the perception and manipulation of 3D articulated objects in computer vision and robotics . On the perception side , researchers have developed various successful visual systems for estimating kinematic structures ( Abbatematteo et al. , 2019 ; Staszak et al. , 2020 ) , articulated part poses ( Li et al. , 2020 ; Jain et al. , 2020 ; Liu et al. , 2020 ) , and joint parameters ( Wang et al. , 2019b ; Yan et al. , 2019 ) . Then , with these estimated visual articulation models , robotic manipulation planners and controllers can be leveraged to produce action trajectories for robot executions ( Klingbeil et al. , 2010 ; Arduengo et al. , 2019 ; Florence et al. , 2019 ; Urakami et al. , 2019 ; Mittal et al. , 2021 ) . While the commonly used two-stage solution underlying most of these systems reasonably breaks the whole system into two phases and thus allows bringing together well-developed techniques from vision and robotics communities , the current handshaking point – the standardized visual articulation models ( i.e . kinematic structure , articulated part poses , and joint parameters ) , may not be the best choice , since essential geometric and semantic features for robotic manipulation tasks , such as interaction hotspots ( e.g . edges , holes , bars ) and part functionality ( e.g . handles , doors ) , are inadvertently abstracted away in these canonical representations . We propose a new type of actionable visual representations ( Do et al. , 2018 ; Nagarajan et al. , 2019 ; Mo et al. , 2021 ) exploring a more geometry-aware , interaction-aware , and task-aware perceptioninteraction handshaking point for manipulating 3D articulated objects . Concretely , we train the perception system to predict action possibility and visual action trajectory proposals at every point over parts of 3D articulated objects ( See Figure 1 ) . In contrast to previous work that use standardized visual articulation models as visual representations , our framework VAT-MART predicts per-point dense action trajectories that are adaptive to the change of geometric context ( e.g. , handles , door edges ) , interactions ( e.g. , pushing , pulling ) , and tasks ( e.g. , open a door for 30◦ , close up a drawer by 0.1-unit-length ) . Abstracting away from concrete external manipulation environments , such as robot arm configurations , robot base locations , and scene contexts , we aim for learning unified objectcentric visual priors with a dense and diverse superset of visual proposals that can be potentially applied to different manipulation setups , avoiding learning separate manipulation representations under different circumstances . The proposed actionable visual priors , as a ” preparation for future tasks ” ( Ramakrishnan et al. , 2021 ) or ” visually-guided plans ” ( Wang et al. , 2019a ; Karamcheti et al. , 2021 ) , can provide informative guidance for downstream robotic planning and control . Sharing a similar spirit with Nagarajan et al . ( 2019 ) ; Mo et al . ( 2021 ) , we formulate our visual action possibility predictions as per-point affordance maps , on which the downstream robotic planners may sample a position to interact according to the predicted likelihood of success . Then , for a chosen point for interaction , the discrete task planner may search for applicable interaction modes ( e.g. , whether to attempt a grasp ) within a much smaller space formed by the visual action trajectory distribution , instead of searching in the entire solution space . Next , considering the robot kinematic constraints and physic collisions , the continuous motion planner can further select an open-loop trajectory from the set of proposed visual action trajectory candidates as an initial value for optimization , and finally pass to the robot controller for execution . More recent reinforcement learning ( RL ) based planners and controllers can also benefit from our proposed solution spaces for more efficient exploration . To obtain such desired actionable visual priors , we design an interaction-for-perception learning framework VAT-MART , as shown in Figure 2 . By conducting trial-and-error manipulation with a set of diverse 3D articulated objects , we train an RL policy to learn successful interaction trajectories for accomplishing various manipulation tasks ( e.g. , open a door for 30◦ , close up a drawer by 0.1- unit-length ) . In the meantime , the perception networks are simultaneously trained to summarize the RL discoveries and generalize the knowledge across points over the same shape and among various shapes . For discovering diverse trajectories , we leverage curiosity feedback ( Pathak et al. , 2017 ) for enabling the learning of perception networks to reversely affect the learning of RL policy . We conduct experiments using SAPIEN ( Xiang et al. , 2020 ) over the large-scale PartNetMobility ( Chang et al. , 2015 ; Mo et al. , 2019 ) dataset of 3D articulated objects . We use 562 shapes in 7 object categories to perform our experiments and show that our VAT-MART framework can successfully learn the desired actionable visual priors . We also observe reasonably good generalization capabilities over unseen shapes , novel object categories , and real-world data , thanks to large-scale training over diverse textureless geometry . In summary , we make the following contributions in this work : • We formulate a novel kind of actionable visual priors making one more step towards bridging the perception-interaction gap for manipulating 3D articulated objects ; • We propose an interaction-for-perception framework VAT-MART to learn such priors with novel designs on the joint learning between exploratory RL and perception networks ; • Experiments conducted over the PartNet-Mobility dataset in SAPIEN demonstrate that our system works at a large scale and learns representations that generalize over unseen test shapes , across object categories , and even real-world data . 2 RELATED WORK . Perceiving and Manipulating 3D Articulated Objects has been a long-lasting research topic in computer vision and robotics . A vast literature ( Yan & Pollefeys , 2006 ; Katz et al. , 2008 ; Sturm et al. , 2009 ; 2011 ; Huang et al. , 2012 ; Katz et al. , 2013 ; Martin & Brock , 2014 ; Höfer et al. , 2014 ; Katz et al. , 2014 ; Schmidt et al. , 2014 ; Hausman et al. , 2015 ; Martı́n-Martı́n et al. , 2016 ; Tzionas & Gall , 2016 ; Paolillo et al. , 2017 ; Martın-Martın & Brock , 2017 ; Paolillo et al. , 2018 ; Martı́n-Martı́n & Brock , 2019 ; Desingh et al. , 2019 ; Nunes & Demiris , 2019 ) has demonstrated successful systems , powered by visual feature trackers , motion segmentation predictors , and probabilistic estimators , for obtaining accurate link poses , joint parameters , kinematic structures , and even system dynamics of 3D articulated objects . Previous works ( Peterson et al. , 2000 ; Jain & Kemp , 2009 ; Chitta et al. , 2010 ; Burget et al. , 2013 ) have also explored various robotic planning and control methods for manipulating 3D articulated objects . More recent works further leveraged learning techniques for better predicting articulated part configurations , parameters , and states ( Wang et al. , 2019b ; Yan et al. , 2019 ; Jain et al. , 2020 ; Zeng et al. , 2020 ; Li et al. , 2020 ; Liu et al. , 2020 ; Mu et al. , 2021 ) , estimating kinematic structures ( Abbatematteo et al. , 2019 ; Staszak et al. , 2020 ) , as well as manipulating 3D articulated objects with the learned visual knowledge ( Klingbeil et al. , 2010 ; Arduengo et al. , 2019 ; Florence et al. , 2019 ; Urakami et al. , 2019 ; Mittal et al. , 2021 ) . While most of these works represented visual data with link poses , joint parameters , and kinematic structures , such standardized abstractions may be insufficient if fine-grained part geometry , such as drawer handles and faucet switches that exhibit rich geometric diversity among different shapes , matters for downstream robotic tasks . Learning Actionable Visual Representations aims for learning visual representations that are strongly aware of downstream robotic manipulation tasks and directly indicative of action probabilities for robotic executions , in contrast to predicting standardized visual semantics , such as category labels ( Russakovsky et al. , 2015 ; Wu et al. , 2015b ) , segmentation masks ( Lin et al. , 2014 ; Mo et al. , 2019 ) , and object poses ( Hinterstoisser et al. , 2011 ; Xiang et al. , 2016 ) , which are usually defined independently from any specific robotic manipulation task . Grasping ( Montesano & Lopes , 2009 ; Lenz et al. , 2015 ; Mahler et al. , 2017 ; Fang et al. , 2020 ; Mandikal & Grauman , 2021 ; Corona et al. , 2020 ; Kokic et al. , 2020 ; Yang et al. , 2020 ; Jiang et al. , 2021 ) or manipulation affordance ( Kjellström et al. , 2011 ; Do et al. , 2018 ; Fang et al. , 2018 ; Goff et al. , 2019 ; Nagarajan et al. , 2019 ; Nagarajan & Grauman , 2020 ; Nagarajan et al. , 2020 ; Xu et al. , 2021 ; Mo et al. , 2021 ) is one major kind of actionable visual representations , while many other types have been also explored recently ( e.g. , spatial maps ( Wu et al. , 2020 ; 2021 ) , keypoints ( Wang et al. , 2020 ; Qin et al. , 2020 ) , contact points ( You et al. , 2021 ) , etc ) . Following the recent work Where2Act ( Mo et al. , 2021 ) , we employ dense affordance maps as the actionable visual representations to suggest action possibility at every point on 3D articulated objects . Extending beyond Where2Act which considers task-less short-term manipulation , we further augment the per-point action predictions with task-aware distributions of trajectory proposals , providing more actionable information for downstream executions . Learning Perception from Interaction augments the tremendously successful learning paradigm using offline curated datasets ( Russakovsky et al. , 2015 ; Lin et al. , 2014 ; Chang et al. , 2015 ; Mo et al. , 2019 ) by allowing learning agents to collect online active data samples , which are more task-aware and learning-efficient , during navigation ( Anderson et al. , 2018 ; Ramakrishnan et al. , 2021 ) , recognition ( Wilkes & Tsotsos , 1992 ; Yang et al. , 2019 ; Jayaraman & Grauman , 2018 ) , segmentation ( Pathak et al. , 2018 ; Gadre et al. , 2021 ) , and manipulation ( Pinto et al. , 2016 ; Bohg et al. , 2017 ) . Many works have also demonstrated the usefulness of simulated interactions for learning perception ( Wu et al. , 2015a ; Mahler et al. , 2017 ; Xu et al. , 2019 ; Ramakrishnan et al. , 2021 ; Nagarajan & Grauman , 2020 ; Lohmann et al. , 2020 ; Mo et al. , 2021 ) and promising generalizability to the real world ( James et al. , 2019 ; Chebotar et al. , 2019 ; Hundt et al. , 2019 ; Liang et al. , 2020 ; Kadian et al. , 2020 ; Anderson et al. , 2020 ; Rao et al. , 2020 ) . Our method follows the route of learning perception from interaction via using the action trajectories discovered by an RL interaction policy to supervise a jointly trained perception system , which reversely produces curiosity feedback ( Pathak et al. , 2017 ) to encourage the RL policy to explore diverse action proposals . 3 ACTIONABLE VISUAL PRIORS : Action Affordance and Trajectory Proposals We propose novel actionable visual representations for manipulating 3D articulated objects ( see Fig . 1 ) . For each articulated object , we learn object-centric actionable visual priors , which are comprised of : 1 ) an actionability map over articulated parts indicating where to interact ; 2 ) per-point distributions of visual action trajectory proposals suggesting how to interact ; and 3 ) estimated success likelihood scores rating the outcomes of the interaction . All predictions are interaction-conditioned ( e.g. , pushing , pulling ) and task-aware ( e.g. , open a door for 30◦ , close a drawer by 0.1-unit-length ) . Concretely , given a 3D articulated object O with its articulated parts P = { P1 , P2 , · · · } , an interaction type T , and a manipulation task θ , we train a perception system that makes dense predictions at each point p over each articulated part p ∈ ∪P : 1 ) an actionability score ap|O , T , θ ∈ [ 0,1 ] indicating how likely there exists an action trajectory of interaction type T at point p that can successfully accomplish the task θ ; 2 ) a distribution of visual action trajectories Pp ( ·|O , T , θ ) , from which we can sample diverse action trajectories τp|O , T , θ ∼ Pp ( ·|O , T , θ ) of interaction type T to accomplish the task θ at point p ; and 3 ) a per-trajectory success likelihood score rτ|O , p , T , θ ∈ [ 0,1 ] . Inputs . We represent the input 3D articulated object O as a partial point cloud SO . We consider two typical interaction types : pushing and pulling . A pushing trajectory maintains a closed gripper and has 6-DoF motion performing the pushing , whereas a pulling trajectory first performs a grasping operation at the point of interaction by closing an initially opened gripper and then has the same 6-DoF motion during the pulling . For articulated objects we use in this work , we only consider 1-DoF part articulation and thus restrict the task specification θ ∈ R. For example , a cabinet drawer has a 1-DoF prismatic translation-joint and a refrigerator door is modeled by a 1-DoF revolute hinge-joint . We use the absolute angular degrees in radian ( i.e . θ ∈ [ −π , π ] ) for revolute joints and use the units of length ( i.e . θ ∈ [ −1,1 ] ) relative to the global shape scale for prismatic joints . Outputs . Both the actionability score ap|O , T , θ and per-trajectory success likelihood score rτ|O , p , T , θ are scalars within [ 0,1 ] , where larger values indicate higher likelihood . One can use a threshold of 0.5 to obtain binary decisions if needed . Every action trajectory τp|O , T , θ is a sequence of 6- DoF end-effector waypoints ( wp0 , wp1 , · · · , wpk ) , with variable trajectory length ( k ≤ 5 ) . In our implementation , we adopt a residual representation ( wp0 , wp1−wp0 , · · · , wpk−wpk−1 ) for the action trajectory , as it empirically yields better performance . Each 6-DoF waypoint is comprised of a 3-DoF robot hand center x and 3-DoF orientation R. We use the 6D-rotation representation ( Zhou et al. , 2019 ) for the orientation of wp0 and predict 3-DoF euler angles for subsequent orientation changes . 4 VAT-MART : AN Interaction-for-perception LEARNING FRAMEWORK The VAT-MART system ( Fig . 2 ) consists of two parts : an RL policy exploring diverse action trajectories and a perception system learning the proposed actionable visual priors . While the RL policy collects interaction trajectories for supervising the perception networks , the perception system provides curiosity feedback ( Pathak et al. , 2017 ) for encouraging the RL policy to further explore diverse solutions . In our implementation , we first pretrain the RL policy , then train the perception network with RL-collected data , and finally finetune the two parts jointly with curiosity-feedback enabled . We describe key system designs below and will release code for our implementation . | This paper is solving the problem of pushing and pulling objects (mostly things like cabinets) by learning visual action trajectories proposals via a curiosity-driven RL / Perception joint training. The system input point clouds the object and outputs the actionable score and the per-trajectory success likelihood score on the most likely approach to interacting with the object. This approach is validated both in simulations but also in simulation and with real results. | SP:864954858dee11b824ad1f786685e3c4d33a6d75 |
Deep Reinforcement Learning for Equal Risk Option Pricing and Hedging under Dynamic Expectile Risk Measures | 1 INTRODUCTION . This paper considers solving risk-averse dynamic decision making problems arising from applications where risk needs to be evaluated according to risk measures that are coherent . In particular , we draw our motivation from the financial application of equal-risk pricing ( ERP ) and hedging ( Guo & Zhu ( 2017 ) ) , where two dynamic hedging problems need to be solved , one for the buyer and one for the seller of a financial derivative ( a.k.a option ) , for determining a fair transaction price that would expose both parties to the same amount of hedging risk . The need to meaningfully model each party ’ s best hedging decision in a financial market , namely that no arbitrage is allowed , and to have a meaningful comparison between the two parties ’ risk exposures , namely that the risks should be measured in the same units , has led to the use of coherent risk measures for capturing both parties ’ hedging risks in this application ( see Marzban et al . ( 2020 ) ) . To this date , most solution methods proposed for solving risk-averse dynamic decision making problems under a coherent risk measure have either relied on traditional dynamic programming ( DP ) , which suffers from the curse of dimensionality and assumes the knowledge of a stochastic model that precisely captures the dynamics of the decision environment , or on the use of a static risk measure , i.e. , that disregards the temporal structure of the random variable ( e.g . Marzban et al . ( 2020 ) , Carbonneau & Godin ( 2020 ) , and Carbonneau & Godin ( 2021 ) in the case of the ERP application ) . The latter raises the serious issue that the resulting policy could be time inconsistent , i.e . that the actions prescribed by the policy may be considered significantly sub-optimal once the state is visited . In an application such as ERP , this issue implies that policies obtained based on static risk measures will not be implemented in practice , raising the need to consider dynamic risk measures . Focusing on deep reinforcement learning ( DRL ) methods , while there has been a large number of approaches proposed to address risk averse Markov decision processes ( MDPs ) using coherent risk measures , to the best of our knowledge , all of them , except for two exceptions , consider a static risk measure ( see Prashanth & Ghavamzadeh ( 2013 ) ; Chow & Ghavamzadeh ( 2014 ) ; Castro et al . ( 2019 ) ; Singh et al . ( 2020 ) ; Urpı́ et al . ( 2021 ) ) and therefore suffer from time-inconsistency . The two exceptions consist of Tamar et al . ( 2015 ) and Huang et al . ( 2021 ) who propose actor-critic reinforcement learning ( ACRL ) algorithms to deal with a general dynamic law-invariant coherent risk measures . Unfortunately , the two algorithms respectively either assume that it is possible to generate samples from a perturbed version of the dynamics , or rely on training three neural networks ( namely a state distribution reweighting network , a transition perturbation network , and a Lagrangean penalisation network ) concurrently with the actor and critic networks . Furthermore , only Huang et al . ( 2021 ) actually implemented their method . This was done on a toy tabular problem involving 12 states and 4 actions where it produced questionable performances1 . In this paper , we develop a new model-free ACRL algorithm for solving a time-consistent risk averse MDP under a dynamic expectile risk measure.2 Overall , we may summarize the contribution as follows : • Our ACRL algorithm is the first to naturally extend the popular model-free deep deterministic policy gradient algorithm ( DDPG ) ( see Lillicrap et al . ( 2015 ) ) to a risk averse setting where a time consistent coherent risk measure is used . Unlike the ACRL proposed in Huang et al . ( 2021 ) , which employs five neural networks , our algorithm will only require an actor and a critic network . While our policy network will be trained following a stochastic gradient procedure similar to Silver et al . ( 2014 ) , we are the first to leverage the elicitability property of expectile risk measures to propose a procedure for training the “ risk-to-go ” deep Q-network that is also based on stochastic gradient descent . • Our ACRL is the first model-free DRL-based algorithm capable of identifying optimal risk averse option hedging strategies that are time-consistent with respect to a dynamic coherent risk measure , and of computing their associated equal risk prices . A side benefit of timeconsistency will be that after training for an option with a given maturity , one obtains equal risk prices and hedging strategies for any other shorter maturities . While our algorithm certainly has a broader set of applications , we believe that ERP constitutes an original and fertile application in which to develop and test new risk averse DRL methods . • We evaluate the training efficiency and the quality of solution , in terms of quality of option hedging strategies and of estimated equal risk prices , obtained using our ACRL algorithm on a synthetic multi-asset geometric Brownian motion market model . These experiments constitute the first real application of a risk averse DRL algorithm that employs a dynamic coherent risk measure . The rest of this paper is organized as follows . Section 2 introduces equal risk pricing and its associated DP equations . Section 3 proposes the new ACRL algorithm for general finite horizon risk averse MDP with dynamic expectile measures . Finally , Section 4 presents and discusses our numerical experiments . We note that a reader only interested in the ACRL algorithm can skip right ahead to Section 3 . 2 APPLICATION : EQUAL RISK PRICING AND HEDGING UNDER DYNAMIC . EXPECTILE RISK MEASURES As described in Marzban et al . ( 2020 ) , the problem of ERP can be formalized as follows . Consider a frictionless market , i.e . no transaction cost , tax , etc , that contains m risky assets , and a risk-free bank account with zero interest rate . Let St : ⌦ ! Rm denote the values of the risky assets adapted to a filtered probability space ( ⌦ , F , F : = { Ft } Tt=0 , P ) , i.e . each St is Ft measurable . It is assumed that St is a locally bounded real-valued semi-martingale process and that the set of equivalent local martingale measures is non-empty ( i.e . no arbitrage opportunity ) . The set of all admissible selffinancing hedging strategies with the initial capital p0 2 R is shown by X ( p0 ) : X ( p0 ) = ( X : ⌦ ! RT 9 { ⇠t } T 1 t=0 , Xt = p0 + t 1X t0=0 ⇠ > t0 St0+1 , 8t = 1 , . . . , T ) , 1At the time of writing this paper , the risk averse implementation of this algorithm reported in Huang et al . ( 2021 ) is unable to recommend an optimal policy in a deterministic setting , while the risk neutral implementation produces policies that are outperformed by risk averse ones in a stochastic setting . 2Our ACRL algorithm exploits the elicitabilty property of expectile risk measures , which is the only elicitable coherent risk measure . where St+1 : = St+1 St , the hedging strategy ⇠t 2 Rm is a vector of random variables adapted to the filtration F and captures the number of shares of each risky asset held in the portfolio during the period [ t , t+ 1 ] , and Xt is the accumulated wealth . Let F ( { St } Tt=1 ) denote the payoff of a derivative . Throughout this paper , we assume F ( { St } Tt=1 ) admits the formulation of F ( ST , YT ) where Yt is an auxiliary fixed-dimensional stochastic process that is Ft-measurable . This class of payoff functions is common in the literature , ( see for example Bertsimas et al . ( 2001 ) and Marzban et al . ( 2020 ) ) . The problem of ERP is defined based on the following two hedging problems that seek to minimize the risk of hedging strategies , one is for the writer and the other is for the buyer of the derivative : ( Writer ) % w ( p0 ) = inf X2X ( p0 ) ⇢w ( F ( ST , YT ) XT ) ( 1 ) ( Buyer ) % b ( p0 ) = inf X2X ( p0 ) ⇢b ( F ( ST , YT ) XT ) , ( 2 ) where ⇢w and ⇢b are two risk measures that capture respectively the writer and the buyer ’ s risk aversion . In words , equation ( 1 ) describes a writer that is receiving p0 as the initial payment and implements an optimal hedging strategy for the liability F ( ST , YT ) . On the other hand , in ( 2 ) the buyer is assumed to borrow p0 in order to pay for the option and then to manage a portfolio that will minimize the risks associated to his final wealth . With equations ( 1 ) and ( 2 ) , ERP defines a fair price p⇤0 as the value of an initial capital that leads to the same risk exposure to both parties , i.e . % w ( p⇤0 ) = % b ( p⇤0 ) . In particular , based on Proposition 3.1 and the examples presented in section 3.3 of Marzban et al . ( 2020 ) , together with the fact that both ⇢w and ⇢b are dynamic recursive law invariant risk measures , a Markovian assumption allows us to conclude that the ERP can be calculated using two sets of dynamic programming equations . Assumption 2.1 . [ Markov property ] There exists a sufficient statistic process t adapted to F such that { ( St , Yt , t ) } Tt=0 is a Markov process relative to the filtration F. Namely , P ( ( St+s , Yt+s , t+s ) 2 A|Ft ) = P ( ( St+s , Yt+s , t+s ) 2 A|St , Yt , t ) for all t , for all s 0 , and all sets A . Specifically , on the writer side , we can define V wT ( ST , YT , T ) : = F ( ST , YT ) , and recursively V wt ( St , Yt , t ) : = inf ⇠t ⇢̄ ( ⇠ > t St+1 + V wt+1 ( St + St+1 , Yt + Yt+1 , t+1 ) |St , Yt , t ) , where ⇢̄ ( ·|St , Yt , t ) is a law invariant risk measure that uses P ( ·|St , Yt , t ) . This leads to considering % w ( 0 ) = V w0 ( S0 , Y0 , 0 ) . On the other hand , for the buyer we similarly define : V bT ( ST , YT , T ) : = F ( ST , YT ) and V bt ( St , Yt , t ) : = inf ⇠t ⇢̄ ( ⇠ > t St+1 + V bt+1 ( St + St+1 , Yt + Yt+1 , t+1 ) |St , Yt , t ) , with % b ( 0 ) = V b0 ( S0 , Y0 , 0 ) . The following lemma summarizes how DP can be used to compute the ERP . Lemma 2.1 ( Marzban et al . ( 2020 ) ) . Under Assumption 2.1 , the ERP that employs dynamic expectile risk measure can be computed as : p⇤0 = ( V w 0 ( S0 , Y0 , 0 ) V b0 ( S0 , Y0 , 0 ) ) /2 . In what follows , we will further assume that the risk measure is a dynamic expectile risk measure . Definition 2.1 . A dynamic expectile risk measure takes the form : ⇢ ( X ) : = ⇢̄0 ( ⇢̄1 ( . . . ⇢̄T 1 ( X ) ) ) where each ⇢̄ ( · ) is an expectile risk measure that employs the conditional distribution based on Ft. Namely , ⇢̄t ( Xt+1 ) : = argminq ⌧E ⇥ ( q Xt+1 ) 2+|Ft ⇤ + ( 1 ⌧ ) E ⇥ ( q Xt+1 ) 2 |Ft ⇤ where Xt+1 is a random liability measureable on Ft+1 . Like conditional value at risk , the expectile measure ( see Bellini & Bignozzi ( 2015 ) ) covers the range of risk attitudes from risk neutrality , when ⌧ = 1/2 , to worst-case risk , when ⌧ ! 1 . | The paper offers a solution to the problem of Equal Risk Pricing (ERP) by framing it as a risk-sensitive MDP formulation. In particular, the authors considers a dynamic risk-measures using expectiles measures as conditional risk-measure for each step. An extension of DDPG is derived by exploiting the properties of the chosen risk-measure and it is tested on two experiments. The first one involves a vanilla option, while the second one feature a more complex basket option. | SP:a5f92cc855c1b6a188be22bf49090cac1b9d241c |
Is Homophily a Necessity for Graph Neural Networks? | 1 INTRODUCTION Graph neural networks ( GNNs ) are a prominent approach for learning representations for graph structured data . Thanks to their great capacity in jointly leveraging attribute and graph structure information , they have been widely adopted to promote improvements for numerous graph-related learning tasks ( Kipf and Welling , 2016 ; Hamilton et al. , 2017 ; Ying et al. , 2018 ; Fan et al. , 2019 ; Zitnik et al. , 2018 ) , especially centered around node representation learning and semi-supervised node classification ( SSNC ) . GNNs learn node representations by a recursive neighborhood aggregation process , where each node aggregates and transforms features from its neighbors . The node representations can then be utilized for downstream node classification or regression tasks . Due to this neighborhood aggregation mechanism , several existing works posit that many GNNs implicitly assume strong homophily and homophily is critical for GNNs to achieve strong performance on SSNC ( Zhu et al. , 2020b ; a ; Chien et al. , 2021 ; Maurya et al. , 2021 ; Halcrow et al. , 2020 ; Lim et al. , 2021 ) . In general , homophily describes the phenomenon that nodes tend to connect with “ similar ” or “ alike ” others . Homophily is observed in a wide range of real-world graphs including friendship networks ( McPherson et al. , 2001 ) , political networks ( Gerber et al. , 2013 ; Newman , 2018 ) , citation networks ( Ciotti et al. , 2016 ) and more . Under the homophily assumption , through the aggregation process , a node ’ s representation is “ smoothed ” via its neighbors ’ representations , since each node is able to receive additional information from neighboring nodes , which are likely to share the same label . Several recent works ( Zhu et al. , 2020b ; a ) claim that GNNs are implicitly ( or explicitly ) designed with homophily in mind , are not suitable for graphs exhibiting heterophily , where connected nodes are prone to have different properties or labels , e.g dating networks or molecular networks ( Zhu et al. , 2020b ) . Such works accordingly design and modify new architectures and demonstrate outperformance over other GNN models on several heterophilous graphs . Present work . In our work , we empirically find that the graph convolutional network ( GCN ) Kipf and Welling ( 2016 ) , a fundamental , representative GNN model ( which we focus on in this work ) is actually able to outperform such heterophily-specific models on some heterophilous graphs after careful hyperparameter tuning . This motivates us to reconsider the popular notion in the literature that GNNs exhibit a homophilous inductive bias , and more specifically that strong homophily is crucial to strong GNN performance . Counter to this idea , we find that GCN model has the potential to work well for heterophilous graphs under suitable conditions . We demonstrate intuition with the following toy example : Consider the perfectly heterophilous graph ( with all inter-class edges ) shown in Figure 1 , where the color indicates the node label . Blue-labeled and orange-labeled nodes are associated with the scalar feature 0 and 1 , respectively . If we consider a single-layer GCN by performing an averaging feature aggregation over all neighboring nodes , it is clear that all blue nodes will have a representation of 1 , while the orange nodes will have that of 0 . Additional layers/aggregations will continue to alternate the features between the two types of nodes . Regardless of the number of layers , the two classes can still be perfectly separated . In this toy example , each blue ( orange ) node only connects orange ( blue ) nodes , and all blue ( orange ) nodes share similar neighborhood patterns in terms of their neighbors ’ label/feature distributions . Our work elucidates this intuition and extends it to a more general case : put simply , given a ( homophilous or heterophilous ) graph , GCN has the potential to achieve good performance if nodes with the same label share similar neighborhood patterns . We theoretically support this argument by investigating the learned node embeddings from the GCN model . We find that homophilous graphs always satisfy such assumptions , which explains why GCN typically works well for them . On other hand , there exist both “ good ” and “ bad ” heterophily , and GCNs can actually achieve strong performance for “ good ” heterophily settings while they usually fail on “ bad ” heterophily settings . Our work characterizes these settings , and provides a new perspective and solid step towards deeper understanding for heterophilous graphs . In short : Our contributions . ( 1 ) We reveal that strong homophily is not a necessary assumption for the GCN model . The GCN model can perform well over some heterophilous graphs under certain conditions . ( 2 ) We carefully characterize these conditions and provide theoretical understandings on how GCNs can achieve good SSNC performance under these conditions by investigating their embedding learning process . ( 3 ) We carefully investigate commonly used homophilous and heterophilous benchmarks and reason about GCN ’ s performs on them utilizing our theoretical understanding . 2 PRELIMINARIES . Let G = { V , E } denote a graph , where V and E are the sets of nodes and edges , respectively . The graph connection information can also be represented as an adjacency matrix A ∈ { 0 , 1 } |V|×|V| , where |V| is the number of nodes in the graph . The i , j-th element of the adjacency matrix A [ i , j ] is equal to 1 if and only if nodes i and j are adjacent to each other , otherwise A [ i , j ] = 0 . Each node i is associated with a l-dimensional vector of node features xi ∈ Rl ; the features for all nodes can be summarized as a matrix X ∈ R|V|×l . Furthermore , each node i is associated with a label yi ∈ C , where C denotes the set of labels . We also denote the set of nodes with a given label c ∈ C as Vc . We assume that labels are only given for a subset of nodes Vlabel ⊂ V . The goal of semi-supervised node classification ( SSNC ) is to learn a mapping f : V → C utilizing the graph G , the node features X and the labels for nodes in Vlabel . 2.1 HOMOPHILY IN GRAPHS . In this work , we focus on investigating performance in the context of graph homophily and heterophily properties . Homophily in graphs is typically defined based on similarity between connected node pairs , where two nodes are considered similar if they share the same node label . The homophily ratio is defined based on this intuition following Zhu et al . ( 2020b ) . Definition 1 ( Homophily ) . Given a graph G = { V , E } and node label vector y , the edge homophily ratio is defined as the fraction of edges that connect nodes with the same labels . Formally , we have : h ( G , { yi ; i ∈ V } ) = 1 |E| ∑ ( j , k ) ∈E 1 ( yj = yk ) , ( 1 ) where |E| is the number of edges in the graph and 1 ( · ) is the indicator function . A graph is typically considered to be highly homophilous when h ( · ) is large ( typically , 0.5 ≤ h ( · ) ≤ 1 ) , given suitable label context . On the other hand , a graph with a low edge homophily ratio is considered to be heterophilous . In future discourse , we write h ( · ) as h when discussing given a fixed graph and label context . 2.2 GRAPH NEURAL NETWORKS . Graph neural networks learn node representations by aggregating and transforming information over the graph structure . There are different designs and architectures for the aggregation and transformation , which leads to different graph neural network models ( Scarselli et al. , 2008 ; Kipf and Welling , 2016 ; Hamilton et al. , 2017 ; Veličković et al. , 2017 ; Gilmer et al. , 2017 ; Zhou et al. , 2020 ) . One of the most popular and widely adopted GNN models is the graph convolutional network ( GCN ) . A single GCN operation takes the following form H′ = D−1AHW , where H and H′ denote the input and output features of layer , W ( k ) ∈ Rl×l is a parameter matrix to transform the features , and D is a diagonal matrix and D [ i , i ] = deg ( i ) with deg ( i ) denoting the degree of node i . From a local perspective for node i , the process can be written as a feature averaging process hi = 1 deg ( i ) ∑ j∈N ( i ) Wxj , where N ( i ) denotes the neighbors of node i . The neighborhood N ( i ) may contain the node i itself . Usually , when building GCN model upon GCN operations , nonlinear activation functions are added between consecutive GCN operations . 3 GRAPH CONVOLUTIONAL NETWORKS UNDER HETEROPHILY . Considerable prior literature posits that graph neural networks ( such as GCN ) work by assuming and exploiting homophily assumptions in the underlying graph ( Maurya et al. , 2021 ; Halcrow et al. , 2020 ; Wu et al. , 2018 ) . To this end , researchers have determined that such models are considered to be ill-suited for heterophilous graphs , where the homophily ratio is low ( Zhu et al. , 2020b ; a ; Chien et al. , 2021 ) . To deal with this limitation , researchers proposed several methods including H2GNN ( Zhu et al. , 2020b ) , CPGNN ( Zhu et al. , 2020a ) and GPRGNN ( Chien et al. , 2021 ) , which are explicitly designed to handle heterophilous graphs via architectural choices ( e.g . adding skipconnections , carefully choosing aggregators , etc . ) In this section , we revisit the claim that GCNs have fundamental homophily assumptions and are not suited for heterophilous graphs . To this end , we first observe empirically that the GCN model achieves fairly good performance on some of the commonly used heterophilous graphs ; specifically , we present SSNC performance on two commonly used heterophilous graph datasets , Chameleon and Squirrel in Table 1 ( see Appendix D for further details about the datasets and models ) . Both Chameleon and Squirrel are highly heterophilous ( h≈0.2 ) . We find that with some hyperparameter tuning , GCN can outperform alternative methods uniquely designed to operate on some certain heterophilous graphs . This observation suggests that GCN does not always “ underperform ” on heterophilous graphs , and it leads us to reconsider the prevalent assumption in literature . Hence , we next examine how GCNs learn representations , and how this information is used in downstream SSNC tasks . 3.1 WHEN DOES GCN LEARN SIMILAR EMBEDDINGS FOR NODES WITH THE SAME LABEL ? . GCN is considered to be unable to tackle heterophilous graphs due to its feature averaging process ( Zhu et al. , 2020b ; Chien et al. , 2021 ) . Namely , a node ’ s newly aggregated features are considered “ corrupted ” by those neighbors that do not share the same label , leading to the intuition that GCN embeddings are noisy and un-ideal for SSNC . However , we find that crucially , for some heterophilous graphs , the features of nodes with the same label are “ corrupted in the same way. ” Hence , the obtained embeddings still contain informative characteristics and thus facilitate SSNC . We next illustrate when GCN learns similar embeddings for nodes with the same label , beginning with a toy example and generalizing to more practical cases . a b Figure 2 : Two nodes share the same neighborhood distribution ; GCN learns equivalent embeddings for a and b. GCNs have been shown to be able to capture the local graph topological and structural information ( Xu et al. , 2019 ; Morris et al. , 2019 ) . Specifically , the aggregation step in the GCN model is able to capture and discriminate neighborhood distribution information , e.g . the mean of the neighborhood features ( Xu et al. , 2019 ) . Let us con- sider the two nodes a and b shown in Figure 2 , where we use color to indicate the label of each node . If we further assume that all nodes sharing the same label are associated with exactly the same features , then clearly , after 1-step aggregation , the GCN operation will output exactly the same embedding for nodes a and b . Accordingly , Xu et al . ( 2019 ) reasons that the GCN model lacks expressiveness due to its inability to differentiate the two nodes in the embedding space . However , in the SSNC task , mapping a and b to the same location in the embedding space is explicitly desirable . Intuitively , if all nodes with the same label are mapped to the same embedding and embeddings for different labels are distinct , SSNC is effortless ( Zhao et al. , 2020 ) . Such assumptions are hard to meet in practice . Thus , to consider a more practical scenario , we assume that both features and neighborhood patterns for nodes with a certain label are sampled from some fixed distributions . Under these conditions , same-label nodes may not share fixed embeddings , but we can aim to characterize their closeness . Intuitively , if the learned embeddings for same-label nodes are close and embeddings for other-label nodes are far , we expect strong SSNC performance to be good , given class separability ( low intra-class variance and high inter-class variance ) ( Fisher , 1936 ) . We prove that , for graphs meeting suitable conditions the distance between GCN-learned embeddings of any same-label node pair is bounded by a small quantity with high probability . Assumptions on Graphs . We consider a graph G , where each node i has features xi ∈ Rl and label yi . We assume that ( 1 ) The features of node i are sampled from feature distribution Fyi , i.e , xi ∼ Fyi , with µ ( Fyi ) denoting its mean ; ( 2 ) Dimensions of xi are independent to each other ; ( 3 ) The features in X are bounded by a positive scalar B , i.e , maxi , j |X [ i , j ] | ≤ B ; ( 4 ) For node i , its neighbor ’ s labels are independently sampled from neighbor distribution Dyi . The sampling is repeated for deg ( i ) times to sample the labels for deg ( i ) neighbors . We denote a graph following these assumptions ( 1 ) - ( 4 ) as G = { V , E , { Fc , c ∈ C } , { Dc , c ∈ C } } . Note that we use the subscripts in Fyi and Dyi to indicate that these two distributions are shared by all nodes with the same label as node i . Next , we analyze the embeddings obtained after a GCN operation . Following previous works ( Li et al. , 2018 ; Chen et al. , 2020 ; Baranwal et al. , 2021 ) , we drop the non-linearity in the analysis . Theorem 1 . Consider a graph G = { V , E , { Fc , c ∈ C } , { Dc , c ∈ C } } , which follows Assumptions ( 1 ) - ( 4 ) . For any node i ∈ V , the expectation of the pre-activation output of a single GCN operation is given by E [ hi ] = W ( Ec∼Dyi , x∼Fc [ x ] ) . ( 2 ) and for any t > 0 , the probability that the distance between the observation hi and its expectation is larger than t is bounded by P ( ‖hi − E [ hi ] ‖2 ≥ t ) ≤ 2 · l · exp ( − deg ( i ) t 2 2ρ2 ( W ) B2l ) , ( 3 ) where l denotes the feature dimensionality and ρ ( W ) denotes the largest singular value of W. The detailed proof can be found in Appendix A. Theorem 1 demonstrates two key ideas . First , in expectation , all nodes with the same label have the same embedding ( Eq . ( 2 ) ) . Second , the distance between the output embedding of a node and its expectation is small with a high probability . Specifically , this probability is related to the node degree and higher degree nodes have higher probability to be close to the expectation . Together , these results show that the GCN model is able to map nodes with the same label to an area centered around the expectation in the embedding space under given assumptions . Then , the downstream classifier in the GCN model is able to assign these nodes to the same class with high probability . To ensure that the classifier achieves strong performance , the centers ( or the expectations ) of different classes must be distant from each other ; if we assume that µ ( Fyi ) are distinct from each other ( as is common ) , then the neighbor distributions { Dc , c ∈ C } must be distinguishable to ensure good SSNC performance . Based on these understandings and discussions , we have the following key ( informal ) observations on GCN ’ s performance for graphs with homophily and heterophily . Observation 1 ( GCN under Homophily ) . In homophilous graphs , the neighborhood distribution of nodes with the same label ( w.l.o.g c ) can be approximately regarded as a highly skewed discrete Dc , with most of the mass concentrated on the category c. Thus , different labels clearly have distinct distributions . Hence , the GCN model typically in SSNC on such graph , with high degree nodes benefiting more , which is consistent with previous work ( Tang et al. , 2020b ) . Observation 2 ( GCN under Heterophily ) . In heterophilous graphs , if the neighborhood distribution of nodes with the same label ( w.l.o.g . c ) is ( approximately ) sampled from a fixed distribution Dc , and different labels have distinguishable distributions , then GCN can excel at SSNC , especially when node degrees are large . Otherwise , GCNs may fail for heterophilous graphs . Notably , our findings illustrate that disruptions of certain conditions inhibit GCN performance on heterophilous graphs , but heterophily is not a sufficient condition for poor GCN performance . GCNs are able to achieve reasonable performance for both homophilous and heterophilous graphs if they follow certain assumptions as discussed in the two observations . In Section 3.2 , we theoretically demonstrate these observations for graphs sampled from the Contextual Stochastic Block Model ( CSBM ) ( Deshpande et al. , 2018 ) with two classes , whose distinguishablilty of neighborhood distributions can be explicitly characterized . Furthermore , in Section 3.3 , we empirically demonstrate these observations on graphs with multiple classes . We note that although our derivations are for GCN , a similar line of analysis can be used for more general message-passing neural networks . | The paper revisited the performance of GCN on graph with heterophily and provide negative evidence that heterophily does not always result in the poor performance of GCN, which contradicts with the assumptions/observations of many previous papers. They demonstrated that the GCN embeddings are still label-distinguishable on a special type of graphs with assumptions that the nodes with same labels have the same node feature distribution as well as the same neighborhood label distributions. They theoretically analyzed the case of CSBM model with two classes, and also empirically investigated on synthetic/real-world graphs with multiple classes. The conclusion is that GCNs can achieve good performance on heterophilous graphs under certain conditions. | SP:e733b8bfbcc68c8cd2d535378f89800fbce902c7 |
A generalization of the randomized singular value decomposition | 1 INTRODUCTION . Computing the singular value decomposition ( SVD ) is a fundamental linear algebra task in machine learning ( Paterek , 2007 ) , statistics ( Wold et al. , 1987 ) , and signal processing ( Alter et al. , 2000 ; Van Der Veen et al. , 1993 ) . The SVD of an m × n real matrix A with m ≥ n is a factorization of the form A = UΣV∗ , where U is an m × m orthogonal matrix of left singular vectors , Σ is an m × n diagonal matrix with entries σ1 ( A ) ≥ · · · ≥ σn ( A ) ≥ 0 , and V is an n × n orthogonal matrix of right singular vectors ( Golub & Van Loan , 2013 ) . The SVD plays a central role because truncating it after k terms provides a best rank k approximation to A in the spectral and Frobenius norm ( Eckart & Young , 1936 ; Mirsky , 1960 ) . Since computing the SVD of a large matrix can be computationally infeasible , there are various alternative algorithms that compute near-best rank k matrix approximations from matrix-vector products ( Halko et al. , 2011 ; Martinsson & Tropp , 2020 ; Nakatsukasa , 2020 ; Nyström , 1930 ; Williams & Seeger , 2001 ) . The randomized SVD uses matrixvector products with standard Gaussian random vectors and is one of the most popular algorithms for constructing a low-rank approximation to A ( Halko et al. , 2011 ; Martinsson & Tropp , 2020 ) . Currently , the randomized SVD is used and theoretically justified when it uses matrix-vector products with standard Gaussian random vectors . In this paper , we consider the following generalizations . Generalization 1 . We generalize the randomized SVD when the matrix-vector products are with multivariate Gaussian random vectors . Our theory allows for multivariate Gaussian random input vectors that have a general symmetric positive semi-definite covariance matrix . A key novelty of our work is that prior knowledge of A can be exploited to design covariance matrices that achieve lower approximation errors than the randomized SVD with standard Gaussian vectors . Generalization 2 . We generalize the randomized SVD to Hilbert–Schmidt ( HS ) operators ( Hsing & Eubank , 2015 ) . We design a practical algorithm for learning HS operators using random input functions , sampled from a Gaussian process ( GP ) . Examples of applications include learning integral kernels such as Green ’ s functions associated with linear partial differential equations ( Boullé & Townsend , 2022 ; Boullé et al. , 2021 ) . The choice of the covariance kernel in the GP is crucial and impacts both the theoretical bounds and numerical results of the randomized SVD . This leads us to introduce a new covariance kernel based on weighted Jacobi polynomials for learning HS operators . One of the main advantages of this kernel is that it is directly expressed as a Karhunen–Loève expansion ( Karhunen , 1946 ; Loève , 1946 ) so that it is faster to sample functions from the associated GP than using a standard squaredexponential kernel . In addition , we show that the smoothness of the functions sampled from a GP with the Jacobi kernel can be controlled as it is related to the decay rate of the kernel ’ s eigenvalues . Contributions . We summarize our novel contributions as follows : 1 . We provide new theoretical bounds for the randomized SVD for matrices or HS operators when using random input vectors generated from any multivariate Gaussian distribution . This shows when it is beneficial to use nonstandard Gaussian random vectors in the randomized SVD for constructing low-rank approximations . 2 . We generalize the randomized SVD to HS operators and provide numerical examples to learn integral kernels . 3 . We propose a covariance kernel based on weighted Jacobi polynomials and show that one can select the smoothness of the sampled random functions by choosing the decay rate of the kernel eigenvalues . 2 BACKGROUND : THE RANDOMIZED SVD FOR MATRICES . The randomized SVD computes a near-best rank k approximation to a matrixA . First , one performs the matrix-vector products y1 = Ax1 , . . . , yk+p = Axk+p , where x1 , . . . , xk+p are standard Gaussian random vectors with identically and independently distributed entries and p ≥ 1 is an oversampling parameter . Then , one computes the economized QR factorization [ y1 · · · yk+p ] = QR , before forming the rank ≤ k + p approximant QQ∗A . Note that if A is symmetric , one can form QQ∗A by computing Q ( AQ ) ∗ via matrix-vector products involving A . The quality of the rank ≤ k + p approximant QQ∗A is characterized by the following theorem . Theorem 1 ( Halko et al . ( 2011 ) ) Let A be an m × n matrix , k ≥ 1 an integer , and choose an oversampling parameter p ≥ 4 . If Ω ∈ Rn× ( k+p ) is a standard Gaussian random matrix and QR = AΩ is the economized QR decomposition of AΩ , then for all u , t ≥ 1 , ‖A−QQ∗A‖F ≤ ( 1 + t √ 3k p+ 1 ) √√√√ n∑ j=k+1 σ2j ( A ) + ut √ k + p p+ 1 σk+1 ( A ) , ( 1 ) with failure probability at most 2t−p + e−u 2 . The squared tail of the singular values of A , i.e. , √∑n j=k+1 σ 2 j ( A ) , gives the best rank k approxi- mation error to A in the Frobenius norm . This result shows that the randomized SVD can compute a near-best low-rank approximation to A with high probability . 3 GENERALIZED RANDOMIZED SVD FOR MATRICES AND OPERATORS . The theory behind the randomized SVD has been recently extended to nonstandard covariance matrices and HS operators ( Boullé & Townsend , 2022 ) . However , the probability bounds , generalizing Theorem 1 , are not sharp enough to emphasize the improved performance of covariance matrices with prior information over the standard randomized SVD . We provide new bounds for GPs with nonstandard covariance matrices in Theorem 2 . An upper bound on the expectation is also available in the Appendix ( see Lemma 7 ) . While Theorem 2 is formulated with matrices , the same result holds for HS operators in infinite dimensions . For a fixed target rank 1 ≤ k ≤ n , we define V1 ∈ Rn×k and V2 ∈ Rn× ( n−k ) to be the matrices containing the first k and last n − k right singular vectors of A , respectively , and denote by Σ2 ∈ R ( n−k ) × ( n−k ) , the diagonal matrix with entries σk+1 ( A ) , . . . , σn ( A ) . We consider a symmetric positive semi-definite covariance matrix K ∈ Rn×n , with kth largest eigenvalue λk > 0 . Theorem 2 Let A be an m × n matrix , k ≥ 1 an integer , and choose an oversampling parameter p ≥ 4 . If Ω ∈ Rn× ( k+p ) is a Gaussian random matrix , where each column is sampled from a multivariate Gaussian distribution with covariance matrix K ∈ Rn×n , and QR = AΩ is the economized QR decomposition of AΩ , then for all u , t ≥ 1 , ‖A−QQ∗A‖F ≤ ( 1 + ut √ ( k + p ) 3k p+ 1 βk γk ) √√√√ n∑ j=k+1 σ2j ( A ) , ( 2 ) with failure probability at most t−p + [ ue− ( u 2−1 ) /2 ] k+p . Here , γk = k/ ( λ1 Tr ( ( V∗1KV1 ) −1 ) ) ) denotes the covariance quality factor , and βk = Tr ( Σ22V ∗ 2KV2 ) / ( λ1‖Σ2‖2F ) , where λ1 is the largest eigenvalue of K. The factors γk and βk , measuring the quality of the covariance matrix to learn A in Theorem 2 , can be respectively bounded ( Boullé & Townsend 2022 , Lem . 2 ; Lemma 9 ) using the eigenvalues λ1 ≥ · · · ≥ λn of the covariance matrix K and the singular values of A as : 1 γk ≤ 1 k n∑ j=n−k+1 λ1 λj , βk ≤ n∑ j=k+1 λj−k λ1 σ2j ( A ) / n∑ j=k+1 σ2j ( A ) . This shows that the performance of the generalized randomized SVD depends on the decay rate of the sequence { λj } . The quantities αk and βk depend on how much prior information of the k+ 1 , . . . , n right singular vectors of A is encoded in K. In the ideal situation where these singular vectors are known , then one can define K such that βk = 0 for λk+1 = · · · = λn = 0 . In particular , this highlights that a suitably chosen covariance matrix can outperform the randomized SVD with standard Gaussian vectors ( see Section 5.1 for a numerical example ) . 3.1 RANDOMIZED SVD FOR HILBERT–SCHMIDT OPERATORS . We now describe the randomized SVD for learning HS operators ( see Algorithm 1 ) . The algorithm is implemented in the Chebfun software system ( Driscoll et al. , 2014 ) , which is a MATLAB package for computing with functions . The Chebfun implementation of the randomized SVD for HS operators uses Chebfun ’ s capabilities , which offer continuous analogues of several matrix operations like the QR decomposition and numerical integration . Indeed , the continuous analogue of a matrixvector multiplication AΩ for an HS integral operator F ( see Hsing & Eubank , 2015 for definitions and properties of HS operators ) , with kernel G : D ×D → R , is ( Ff ) ( x ) = ∫ D G ( x , y ) f ( y ) dy , x ∈ D , f ∈ L2 ( D ) , where D ⊂ Rd with d ≥ 1 , and L2 ( D ) is the space of square-integrable functions on D. Algorithm 1 Randomized SVD for HS operators Input : HS integral operator F with kernel G ( x , y ) , number of samples k > 0 Output : Approximation Gk of G 1 : Define a GP covariance kernel K 2 : Sample the GP k times to generate a quasimatrix of random functions Ω = [ f1 . . . fk ] 3 : Evaluate the integral operator at Ω , Y = [ F ( f1 ) . . .F ( fk ) ] 4 : Orthonormalize the columns of Y , Q = orth ( Y ) = [ q1 . . . qk ] 5 : Compute an approximation to G by evaluating the adjoint of F 6 : Initialize Gk ( x , y ) to 0 7 : for i = 1 : k do 8 : Gk ( x , y ) ← Gk ( x , y ) + qi ( x ) ∫ D G ( z , y ) qi ( z ) dz 9 : end for The algorithm takes as input an integral operator that we aim to approximate . Note that we focus here on learning an integral operator , but other HS operators would work similarly . The first step of the randomized SVD for HS operators consists of generating an∞× k quasimatrix Ω by sampling a GP k times , where k is the target rank ( see Section 4 ) . An ∞ × k quasimatrix is an ordered set of k functions ( Townsend & Trefethen , 2015 ) , and generalizes the notion of matrix to infinite dimensions . Therefore , each column of Ω is an object , consisting of a polynomial approximation of a smooth random function sampled from the GP in the Chebyshev basis . After evaluating the HS operator at Ω to obtain a quasimatrix Y , we use the QR algorithm ( Townsend & Trefethen , 2015 ) to obtain an orthonormal basis Q for the range of the columns of Y . Then , the randomized SVD for HS operators requires the left-evaluation of the operator F or , equivalently , the evaluation of its adjoint Ft satisfying : ( Ftf ) ( x ) = ∫ D G ( y , x ) f ( y ) dy , x ∈ D. We evaluate the adjoint of F at each column vector of Q to construct an approximation Gk of G. Finally , the approximation error between the operator kernel G and the learned kernel Gk can be computed in the L2-norm , corresponding to the HS norm of the integral operator . | This paper proposes a generalization approach for the randomized SVD. In the existing approach of the randomized SVD, a standard Gaussian random matrix is used to reduce the size of a matrix to perform SVD. The proposed approach uses a multivariate Gaussian distribution with a covariance matrix instead of the standard Gaussian random matrix in performing SVD. Since the covariance matrix can reflect prior knowledge of the given matrix, the proposed approach can improve the approximation quality of the randomized SVD. By using a synthetic dataset, this paper conducts experiments to show the effectiveness of the proposed approach. | SP:010e3bb657a3e5a7a39576ce2c8e82ad77894a13 |
CheXT: Knowledge-Guided Cross-Attention Transformer for Abnormality Classification and Localization in Chest X-rays | 1 INTRODUCTION . In medical study , handcrafted radiomics ( Zwanenburg et al. , 2016 ) refers to the process of extracting several quantitative and semiquantitative features from medical images for improved decision support . It has the potential to uncover disease characteristics that are difficult to identify by viewing raw images alone . Given their advantages , researchers have explored the performance of radiomic features for chest X-ray analysis . For example , ( Shi et al . ; Saygılı , 2021 ) extracted a set of radiomic features to diagnose different types of pneumonia . ( Bai et al. , 2020 ) proposed a hybrid model to encode the combination of radiomic features and clinical information . ( Ghosh et al. , 2020 ) presented a new handcrafted feature to distinguish between severe and nonsevere patients . However , all the above methods rely on accurate pathology localization annotations to extract radiomic features from the correct “ region of interest ” ( aka bounding boxes ) but not other irrelevant parts ( Van Griethuysen et al. , 2017 ) . Such bounding boxes are usually expensive and time-consuming to acquire by humans and , if inaccurate , will tremendously degrade the reliability of radiomic features . There is thus an unmet need to automatically localize pathologies on chest X-rays to facilitate radiomic features extraction . Under the rapid development of deep learning , many researchers have made their efforts to utilize the Convolutional Neural Networks ( CNNs ) in building automated systems of chest X-ray abnormality classification and localization ( Rajpurkar et al. , 2017 ; Wang et al. , 2017 ; Li et al. , 2018 ; Liu et al. , 2019b ; Rozenberg et al. , 2020 ; Wang et al. , 2021 ) . However , CNN methods witness several limitations . First , chest X-rays own valuable domain knowledge and domain-specific features , such as radiomic features . Thus , they could have blessed better recognition but are unfortunately overlooked by most CNNs . Second , chest X-rays have more subtle discriminative features compared to natural images , making their recognition more challenging . Finally , CNNs are often criticized for being non-transparent and their predictions not traceable by humans , hence hinders their acceptance and adoption by clinicians . Why Transformers for Chest X-rays ? The latest surge of transformers provides a promising alternative to model chest X-rays . Transformer was first prevailing to Natural Language Processing ( Vaswani et al. , 2017 ; Devlin et al. , 2018 ; Brown et al. , 2020 ) , followed by its recent success in computer vision ( Dosovitskiy et al. , 2020 ; Carion et al. , 2020 ; Zhu et al. , 2020 ) and multi-modal learning ( Ying et al. , 2021 ) . It is an “ universal modeling tool ” that can unify the feature extraction and fusion from different input modalities within one model , without domainspecific model tweaks . For example , ( Akbari et al. , 2021 ) demonstrated to learn powerful multi-modal representations from unlabeled video , audio , and text data , using one Transformer architecture . Bringing that into the context of chest X-rays , we see the tantalizing potential that a Transformer could organically and jointly learn from two views of chest X-rays : ( i ) raw X-ray images that contain the richest details , hence benefiting from the data-driven learning capacity ; and ( ii ) radiomic features that encode critical domain prior knowledge , hence effectively guiding and regularizing the learning process . The appeal of Transformers is , however , blocked by a “ chicken-and-egg ” problem : as aforementioned , the extraction of reliable radiomic features hinge on the pathology localization , but then the pathology localization is often absent in images and also needs to be learned first . This paper presents a holistic framework of Knowledge-Guided Cross-Attention Transformer for Chest X-ray analysis , named CheXT ( Figure 1 ) . CheXT consists of two Transformer-based branches that learn from two data formats characterizing the same patient : the image and radiomics branches . Both are deeply fused and interacted by cross-attention layers ( Chen et al. , 2021a ) . Notably , the radiomic features need be extracted from the learned pathology localizations , which are not readily available . The key enabling technology to resolve this hurdle , is to construct a “ feedback loop ” during training : the image branch leverages its learned attention to estimating pathology localization , which is then utilized to extract radiomic features from images in the radiomics branch . Training under a unified contrastive loss , such an end-to-end optimization loop can bootstrap accurate pathology localization from image data , with no bounding boxes used for training . Our contributions are outlined as follows : • We leverage the radiomic feature as an “ auxiliary input modality ” correlated with the raw image modality and encoded with domain knowledge . We then propose a novel knowledgeguided cross-attention Transformer , CheXT , to jointly extract and fuse image and radiomic feature representations for chest X-ray analysis . • To resolve the key “ chicken-and-egg ” problem of extracting radiomic features without available pathology localization , we construct an innovative optimization loop with the image and radiomic branches deeply interacting via attention . Such end-to-end loop can bootstrap accurate pathology localization from images without using human-annotated bounding boxes . • Our approach achieve superior classification and localization results against several competitive baselines , on the NIH chest X-ray benchmark . Notably , compared to existing approaches , CheXT generates more accurate disease localization for extracting radiomic features , by a significant average margin of 3.6 % over different IoU thresholds . 2 RELATED WORK . Radiomics in Medical Diagnosis . The design of radiomics involves biological and medical data and prior knowledge . Thus , radiomics vastly enriches images and expands the horizons of the image toward in-vivo biologic information extraction ( Gillies et al. , 2016 ) . In image-based biomarkers for cancer staging and prognostication , radiomics had shown promising power ( Nasief et al. , 2019 ) . Radiomics extracts quantitative data from medical images to represent tumor phenotypes , such as spatial heterogeneity of a tumor and spatial response variations . ( Eilaghi et al. , 2017 ) demonstrated that radiomic of CT texture features are associated with the overall survival rate of pancreatic cancer . ( Chen et al. , 2017 ) revealed that the first-order radiomic features ( e.g. , mean , skewness , and kurtosis ) are correlated with pathological responses to cancer treatment . ( Huang et al. , 2018 ) showed that radiomics could increase the positive predictive value and reduce the false-positive rate in lung cancer screening for small nodules compared with radiologists . ( Zhang et al. , 2018 ) found that multiparametric MRI-based radiomics nomograms provided improved prognostic ability in advanced nasopharyngeal carcinoma . In comparison , deep learning is often criticized for being a “ black box ” and lacks interpretability despite high predictive accuracy . This limitation has motivated many interpretable learning techniques including activation maximization ( Erhan et al. , 2009 ) , network inversion ( Mahendran & Vedaldi , 2015 ) , GradCAM ( Selvaraju et al. , 2016 ) , and network dissection ( Bau et al. , 2017 ) . We believe that the joint utilization of radiomics and interpretable learning techniques in our framework can further advance accurate yet interpretable learning in the medical image domain . Transformers for Medical Images . Recently , Vision Transformer ( ViT ) ( Dosovitskiy et al. , 2020 ) achieved state-of-the-art classification on ImageNet by directly applying Transformers with global self-attention to full-sized images . Inspired by the promising performance of ViT , researchers have recently applied the idea to medical images . For example , ( Oktay et al. , 2018 ; Wang et al. , 2019 ; Chen et al. , 2021b ) used the attention mechanism to boost the performance of medical image segmentation . ( Valanarasu et al. , 2021 ) proposed a gated axial-attention model to introduce an additional control mechanism in the self-attention module . ( Park et al. , 2021 ) utilized a hybrid framework of CNN and Transformer for Covid-19 prediction . However , those methods did not consider any domain prior knowledge . ( Han et al. , 2021 ) applied pre-extracted radiomic features to guide pneumonia detection from chest X-ray images . However , they adopted a convolutional backbone for image encoder , while using a another specifically crafted radiomic features encoder . Therefore , the method involves no joint interaction between image and radiomic features , and need to use accurate bounding boxes during training in order to extract radiomic features . Hence , their method dramatically limits usability in clinical practice . 3 METHOD . An overview of CheXT is illustrated in Figure 2 . In the following subsections , we will first present Cross-attention Vision Transformer ( CrossViT ) , a recent two-branch ViT backbone on which CheXT is built , and then describe our many unique improvements customized for Chest X-ray analysis . 3.1 PRELIMINARY : VIT AND CROSS-ATTENTION . ViT first converts an image into a sequence of patch tokens by dividing the image with certain patch size and linearly projecting each patch into tokens . A special token ( CLS ) is added in front of the sequence , as in the original BERT ( Devlin et al. , 2018 ) . Then , all tokens are passed through stacked Transformer encoders . Finally , the hidden state corresponding to the CLS token is used as the aggregate sequence representation for image classification . A Transformer encoder is composed of a sequence of blocks where each block contains multiheaded self-attention with a feed-forward network . Layer normalization and residual shortcuts are applied before and after every block , respectively . The granularity of the patch size affects the accuracy and complexity of ViT . Therefore , ViT can perform better with fine-grained patch size but with higher FLOPS and memory consumption ( Chen et al. , 2021a ) . To relieve this problem , CrossViT ( Chen et al. , 2021a ) was proposed with a dual-branch ViT where either branch operates at a different patch size , as its own “ view ” of the image . The cross-attention module is then used to fuse information between the branches to balance the patch sizes and complexity . Similar to ViT , the final hidden vector of CLS from two branches are used for image classification . 3.2 OUR PROPOSED CHEXT MODEL . CrossViT supplies a graceful framework to simultaneously tackle and fuse two different “ views ” from the same input data , e.g. , different-size image patches in ( Chen et al. , 2021a ) . In CheXT , we extend their idea by treating image itself as one “ view ” and the radiomic feature extracted from the same image as another “ view ” ( Figure 2 ) . The two views are then jointly learned by interacting through cross-attention . Transformer serves as the modality-agnostic backbone for both . Specifically , we introduce a dual-branch cross-attention Transformer where the first ( primary ) branch operates the image part , while the second ( complementary ) branch handles the radiomic features . To resolve the “ chicken-and-egg ” dilemma in extracting reliable radiomic features without bounding boxes , we have designed a novel Bootstrap Your Own Attention ( BYOA ) module , using feedbacks to learn region localization for extracting radiomic features . A simple yet effective module is also utilized to fuse information between the branches . In the subsequent sections , we will describe the two branches , the BOYA module , and the fusion module . Image Branch . The primary image branch uses a Progress-Sampling ViT ( PS-ViT ) ( Yue et al. , 2021 ) as its backbone . Unlike the vanilla ViT that splits images into fixed-size tokens , PS-ViT utilizes an iterative and progressive sampling strategy to locate discriminative regions and avoid over-partition object structures . We experimentally observed PS-ViT outperforms ViT and other variants in our framework because it generates higher-quality and more structure-aware attention maps , which are crucial for estimating the pathology localization during training . Radiomics Branch . The complementary radiomics branch is for processing radiomic features . Handcrafted features usually cover a wide range of categories , such as first-order ( basic intensity and shaped-based features ) , second-order ( texture features extracted from various matrices ) , and more advanced features including those calculated from Fourier and wavelet transforms . Specifically , the radiomic features are composed of the following categories : • First-Order statistics features to measure the distribution of voxel intensities within the bounding boxes . The features include energy ( the measurement of the magnitude of voxel values ) , entropy ( the measurement of uncertainty in the image values ) , and max/mean/median gray level intensity within the region of interest . • Shape-based features , such as Mesh Surface , Pixel Surface , and Perimeter . • Gray-level features , such as Gray Level Co-occurrence Matrix ( GLCM ) , Gray Level Size Zone ( GLSZM ) , Gray Level Run Length Matrix ( GLRLM ) , Neighboring Gray Tone Difference Matrix ( NGTDM ) , and Gray Level Dependence Matrix ( GLDM ) features . In short , radiomic features are a set of quantitative features that can describe the characteristics of medical images . In our framework , we aim to make the hidden features of the CLS similar to the radiomic features to learn the localization of pathologies in the chest X-rays . For this branch , we use the vanilla Transformer ( Liu et al. , 2017 ) as the radiomic features encoder . Please note that the only difference is that the positional encoding module is discarded , since there does not exist any positional relationship between the radiomic features . Bootstrap Your Own Attention ( BYOA ) : A Feedback Loop Module . Our main roadblock is how to generate robust radiomic features without pathology localization . On one hand , radiomic features are dependent on and highly sensitive to the local image regions of interest , for which we have no bounding box annotation . On the other hand , image features would benefit from the guidance from radiomic features that encode important domain knowledge . The learning of image and radiomic features are fully entangled , forming a challenging “ chicken-and-egg ” loop . To address this issue , we design BYOA to constitute an end-to-end feedback loop that can bootstrap accurate pathology localization from image data , without any bounding box used for training ( Figure 3 ) . BYOA contains two components : attention map generation and radiomic feature extraction . • Attention Map Generation . Similar to the approach in ( Caron et al. , 2021 ) , we look at the self-attention of the CLS token on the heads of the last layer . Here , we have two CLS tokens from two branches , but the attention maps only come from the Image branch . Then we apply a threshold on the self-attention maps to generate bounding boxes for the extraction of radiomic features . The choice of the threshold will influence the quality of the radiomic features . Specifically , the threshold is designed as how much active pixels to keep in the generated attention map . The more active pixels we keep , the larger the generated bounding box is . Please see 4.3.3 for more details . • Radiomic Features Extraction . Given the original images and generated bounding boxes , we used the Pyradiomic tool to extract radiomic features ( Van Griethuysen et al. , 2017 ) . Cross-Attention Fusion Module . This fusion involves the CLS token of one branch and patch tokens of the other branch . As the CLS token is the aggregate representation of the branch , this interaction helps include information at different scale . Please refer to ( Chen et al. , 2021a ) for more details about the cross-attention mechanism . | This paper presents a Transformer-based model CheXT for abnormality classification and localization from chest X-rays with auxiliary modality of radiomic features via a feedback loop module. The output tokens from image and radiomics branches are fused by a cross-attention module for the localization and the disease classification is performed from the output of two CLS tokens. The model is trained by jointly optimizing supervised classification focal loss and unsupervised cross-view contrastive loss. The evaluation on the NIH chest X-ray dataset for 8 cardiopulmonary diseases shows improved performance for disease classification and localization. | SP:a1595e4fffaaddf6d7d0708456c9ef19c89f7840 |
Distributionally Robust Models with Parametric Likelihood Ratios | 1 INTRODUCTION . It is well acknowledged that modern neural network based machine learning models tend to underperform when they are evaluated on data distributions that differ from the one they were trained on . For example , machine learning model performance has been observed to degrade under train-test mismatch in topics ( Gururangan et al. , 2020 ) , demographics ( Blodgett et al. , 2016 ; Amodei et al. , 2016 ; Hovy & Søgaard , 2015 ; Grother et al. , 2019 ) , geographic regions ( Koh et al. , 2020 ) , and even data collection processes ( Beery et al. , 2018 ; Zech et al. , 2018 ; Michel & Neubig , 2018 ) . In particular , these models often perform poorly when evaluated on subpopulations , domains that are present but underrepresented in their training data ( Sagawa et al. , 2020 ) , and they can latch on to spurious correlations ( McCoy et al. , 2019 ) . This has problematic real-world consequences : when such models are deployed at large , this representation disparity can , for example , unfairly affect minority groups ( Buolamwini & Gebru , 2018 ; Hashimoto et al. , 2018 ) . This behaviour can largely be attributed to the empirical risk minimization ( ERM ) principle which underlies the majority of learning algorithms used in practice . In ERM , models are trained to minimize the average loss over a finite sample from a fixed training distribution ( Vapnik , 1992 ) , as a proxy for the expected loss on a random example drawn from the fixed , albeit unknown , data distribution . This favors models which perform well on average on a fixed training set , as opposed to models which would perform equally well on a variety of subpopulations that better reflects the diverse set of distributions that can be encountered at test time . On the other hand , Distributionally robust optimization ( DRO ) proposes an appealing alternative to ERM . In DRO , models are trained to minimize their worst case risk ( or an empirical estimate thereof computed on a finite sample , via e.g . importance weighting ) under a pre-determined family of distributions Q , called the “ uncertainty set ” ( or “ ambiguity set ” ) : LDRO ( θ ) = max q∈Q E ( x , y ) ∼q ` θ ( x , y ) . ( 1 ) In the absence of explicit information about the subpopulations of interest ( which would naturally define Q ) , it is up to the practitioner to carefully define this uncertainty set . This has been the subject of much work in the literature ( see Rahimian & Mehrotra ( 2019 ) for a survey ) . Recently , Michel et al . ( 2021 ) proposed P-DRO , a promising approach where the uncertainty set is defined by a parametric family of generative models , which allows for more flexibility in defining the uncertainty set . P-DRO shows significant improvement over comparable baselines , but it suffers from several drawbacks . First , it presupposes the availability of generative models capable of outputting exact densities , which limits its field of application to modalities where such models are readily available ( such as language models in NLP ) . Second , it is challenging to use in practice due to its reliance on a number of hyper-parameters and approximations to the objective function . In this paper , we propose a new approach for DRO , called RP-DRO , based on a key modification of the P-DRO algorithm : instead of modeling the worst-case distributions directly , we parametrize the likelihood ratio between the training distribution and the worst-case distribution . This removes the dependency on an unwieldy generative model , making the method useful for more applications . While likelihood ratio formulations of DRO have been tried in prior work ( Sagawa et al. , 2020 ) , we show that they are particularly effective for parametric , neural network based adversaries . Our approach relies on three simple ideas : a mini-batch level normalization strategy to enforce likelihood ratio constraints , a penalty-form of the KL divergence uncertainty set , and the use of simultaneous gradient updates for training . RP-DRO consistently achieves equal or better robust subpopulation accuracy compared to P-DRO and other baselines on a variety of standard benchmarks in image and text classification . In addition , we find it is both faster than P-DRO and depends on fewer hyperparameters . Additional ablation experiments demonstrate that both our mini-batch normalization strategy and simultaneous gradient updates are necessary for high performance . Finally , we perform experimental analyses to shed light on the advantages brought by parametric adversaries compared to their nonparametric counterparts . 2 BACKGROUND . In the following , we consider a model parametrized by θ ∈ Rdmodel . Our goal is to find a model which minimizes the loss function ` θ ( x , y ) on pairs of inputs and outputs ( x , y ) ∈ X × Y . For instance , x might represent images and y a categorical label . Parameters θ are estimated on a training dataset Dtrain = { ( xi , yi ) } i=1 ... Ntrain which we assume to be drawn from a training distribution p. The DRO optimization problem with uncertainty set Q is min θ max q∈Q Eq ` θ ( x , y ) . ( 2 ) Note that the DRO loss in Eq . 1 is the inner maximum of the DRO problem , and it provides an upper bound on the expected loss of the model under any distribution in the uncertainty set Q . This motivates the use the minimizer of the min-max game in Eq . 2 as a robust model . We refer to the solution of the inner maximum as the “ adversary ” from now on However this objective is only useful insofar that ( 1 ) Q covers test distributions of interest ( corresponding to different domains , demographics , etc . ) and ( 2 ) Q is not overly pessimistic . To fulfil this second condition , there should exist some model θ∗ that achieves low loss simultaneously on the test distribution as well as Q . This often requires that Q only contain distributions that are covariate shifts of the test distribution , i.e . that are such that the conditional distribution q ( y | x ) coincides with that of training distribution p ( y | x ) . 2.1 NONPARAMETRIC DRO . There is substantial existing work on nonparametric formulations of DRO , where Q is expressed as a divergence ball centered at the training distribution . This includes f -divergences ( Ben-Tal et al. , 2013 ; Hu & Hong , 2013 ; Faury et al. , 2020 ) , Wasserstein/IPM ( Sinha et al. , 2018 ; Husain , 2020 ) , moment constraints ( Delage & Ye , 2010 ; Nguyen et al. , 2020 ) , and CVaR ( Fan et al. , 2017 ; Curi et al. , 2020 ; Levy et al. , 2020 ) based uncertainty sets . These nonparametric approaches are appealing as they require very little domain-specific knowledge , have well-understood theory ( Duchi & Namkoong , 2018 ) , and optimization procedures ( e.g . Hu & Hong ( 2013 ) for KL constraints and Levy et al . ( 2020 ) for χ2 and CVaR constraints ) . Unfortunately , nonparametric DRO algorithms suffer from being overly pessimistic . Their uncertainty sets tend to include distributions that are exceedingly difficult to learn , or not representative of realworld distribution shifts . Furthermore , they often can not enforce even basic constraints such as covariate shift structures ( Duchi et al. , 2020 ; Hu et al. , 2018 ) . Group-structured DRO uncertainty sets ( Sagawa et al. , 2020 ) overcome some of these challenges , but require significant domain expertise to pre-specify target subpopulations that a model should be robust to . 2.2 PARAMETRIC DRO . Parametric DRO ( Michel et al. , 2021 ) is a method for DRO in which the uncertainty set Q is defined as a family of parametric generative models , which avoids the extreme pessimism of nonparametric DRO without the explicit specification of subpopulations . Specifically , given a generative model qψ parameterized by ψ ∈ Rdadv , the KL-constrained parametric DRO objective can be written as follows : min θ max ψ KL ( qψ‖p ) ≤κ E ( x , y ) ∼qψ ` ( x , y , θ ) . ( 3 ) As demonstrated by Michel et al . ( 2021 ) , P-DRO yields significant improvements over its nonparametric counterpart . However , the difficulty of optimizing Eq . 3 directly results in a number of approximations and additional hyper-parameters that are hard to tune . In addition , a central drawback of P-DRO is that it necessitates training an auxiliary generative model of the data . This can be difficult for several reasons . First , this limits the applicability of the method to domains with generative models that allow for exact probability computations . Moreover , even when such generative models are available , they are often more computationally demanding than their discriminative counterparts . In language models for instance , probabilities for sequences of text are obtained by iteratively producing conditional probabilities over all tokens in the vocabulary . This additional step results in considerable computational overhead compared to discriminative models . 3 PARAMETRIC LIKELIHOOD RATIO . 3.1 DRO AS A LIKELIHOOD RATIO OPTIMIZATION PROBLEM . In the situation that all distributions in Q are absolutely continuous with respect to p ( i.e . for all measurable subset A ⊂ X × Y , all q ∈ Q , q ( A ) > 0 only if p ( A ) > 0 ) the inner maximum in Eq . 2 can be rewritten purely as a function of the likelihood ratio qp E ( x , y ) ∼q ` θ ( x , y ) = E ( x , y ) ∼p q ( x , y ) p ( x , y ) ` θ ( x , y ) . ( 4 ) Such absolute continuity assumptions are standard in f -divergence and group DRO methods , which both rely upon re-weighting the training distributions . In fact , the KL divergence constraint in P-DRO presupposes absolute continuity . This suggests that the inner maximum can be re-written as an optimization problem on functions r : X × Y −→ R+ within the uncertainty setR ∈ { r | pr ∈ Q } min θ max r∈R E ( x , y ) ∼p r ( x , y ) ` θ ( x , y ) . ( 5 ) This reparametrization of the problem will allow us to replace a parametric family of generative models with a parametric family over probability ratios . 3.2 RATIO-BASED P-DRO . The likelihood ratio formulation described above is appealing for P-DRO because it enables the use of discriminative style neural architectures for parametrizing the ratio r , which opens up many more options for defining the parametric uncertainty set . Specifically , we can set the adversary to be any parametric function rψ : X × Y −→ R+ verifying Ex , y∼p rψ ( x , y ) = 1 . The key insight that we use to realize our proposed method is that we do not need to restrict the choice of adversaries to those that implicitly satisfy this normalization condition ( i.e . generative models ) . Instead , we can pick any adversary and treat normalization as an additional constraint ( the “ normalization constraint ” ) . Note that in this case , the KL constraint takes the simple form KL ( prψ‖p ) = Eprψ log prψ p = Ep rψ log rψ . The final min-max problem , which we dub ratio-based P-DRO ( RP-DRO ) , is : min θ max ψ Ep rψ log rψ≤κ Eprψ=1 E ( x , y ) ∼prψ ( x , y ) ` θ ( x , y ) ︸ ︷︷ ︸ LRP-DRO . ( 6 ) As in P-DRO , we can look for equilibria of this differentiable min-max game by performing simultaneous gradient updates ( Singh et al. , 2000 ) to θ and ψ in directions −∇θLRP-DRO and +∇ψLRP-DRO respectively . Although finding global equilibria is not guaranteed in high dimensional non-convex settings ( Balduzzi et al. , 2018 ) , empirical evidence suggests that models trained in this manner still reach useful solutions ( Michel et al. , 2021 ) . In experiments , we adopt an exponential parametrization rψ ( x , y ) ∝ efψ ( x , y ) where fψ is the output of any parametric model with values in R. Similarly to P-DRO , we do not explicitly enforce the KL constraint ( due to the difficulty of projecting onto the KL ball ) , and instead we relax it in the form of a term τ Ep rψ log rψ added to the loss function . The regularization strength τ is treated as a hyper-parameter . | As far as I can see, this work is about practical methods for distributionally robust optimization (DRO) with a special focus on trying to overcome the limitations of previous methods that have been proposed for this kind of problem. This work builds on the idea of instance-reweighting of the loss function via a re-weighting function that plays the role of the likelihood ratios (between the distributions in the class used for enforcing robustness and the training distribution). The re-weighting functions considered here are the well-known "exponential weights" and this work proposes and explores (i) using mini-batch level renormalizations and (ii) ensuring the KL-constraint by adding a KL penalty term to the training objective. The framework and corresponding objectives are described, and they are tested in experiments on benchmark image and text classification data sets, and compared to other existing DRO methods and to plain ERM. | SP:306987e867cca43b12cabb31f2ab1449a1780c73 |
Generalized Fourier Features for Coordinate-Based Learning of Functions on Manifolds | 1 INTRODUCTION . Recent breakthroughs on learning representations of 3D shapes ( Mescheder et al. , 2019 ; Park et al. , 2019 ; Sitzmann et al. , 2019 ) or scenes ( Mildenhall et al. , 2020 ) employ the so-called “ coordinatebased ” networks , which take low-dimensional coordinates as inputs and approximate a continuous function . These are sometimes called “ implicit models ” , when the approximated function implicitly represents the desired output ; a typical example is using a signed distance function to represent a 3D shape ( Park et al. , 2019 ) . Perhaps the most important recent advancement in this line of research is NeRF ( Mildenhall et al. , 2020 ) . One of the reasons for NeRF ’ s impressive performance is the positional encoding of input coordinates using sinusoidals of various frequencies , a technique that has been widely adopted ( Liu et al. , 2020 ; Schwarz et al. , 2020 ; Yariv et al. , 2020 ) and studied ( Tancik et al. , 2020 ; Zheng et al. , 2021 ) . The sinusoidals typically used for positional encoding are elements of orthonormal bases for functions on Euclidean spaces . Our key observation is that , to generalize this idea to non-Euclidean manifolds , we should use orthonormal basis functions on the manifold . Figure 1 ( middle ) illustrates the evaluation of the Euclidean basis functions on spherical coordinates , which break orthogonality , results in uneven frequency distribution and singularities near the poles . The spherical harmonics are orthonormal basis functions for the sphere and do not exhibit these undesired properties . NeRF ( Mildenhall et al. , 2020 ) and subsequent works avoid the problem just described by parametrizing the view direction as a unit vector in R3 instead of two angles . We argue that this overparametrization unnecessarily increases the dimensionality of the problem , since the number of basis functions for a fixed bandwidth b grows exponentially with the number of dimensions d. Another relevant example is IPDF ( Murphy et al. , 2021 ) , which takes inputs on the 3-dimensional manifold SO ( 3 ) in the form of a flattened rotation matrix ( a vector in R9 ) , and applies positional encoding by sparsely sampling the space of O ( b9 ) basis elements . We show that our approach improve results for both NeRF and IPDF . Our basic idea is to find an orthonormal basis for the space of functions on the manifold of interest , and introduce principled methods for choosing a subset of the ( possibly infinite ) basis elements on which the input coordinates are evaluated . We describe mathematical techniques to obtain bases for large classes of manifolds and show experiments on a variety of them . Our main contributions are : • We introduce a principled way to apply positional encoding for coordinate-based learning of high-frequency functions on manifolds . • We prove that our approach is shift-invariant under the light of the neural tangent kernel ( NTK ) theory ( Jacot et al. , 2018 ; Tancik et al. , 2020 ) and for the appropriate “ shift ” on the manifold , which implies a manifold convolutional behavior . • Our experiments show the advantages of the proposed methodology on different applications and manifolds : 1 ) learning panoramas on the sphere , 2 ) learning probability distributions on the rotation manifold , 3 ) learning neural radiance fields on the product of cube and sphere , and 4 ) learning light fields represented as the product of spheres . 2 RELATED WORK . The idea of positional encoding using a Fourier basis appeared as early as Rahimi & Recht ( 2008 ) . They introduced the so-called random Fourier features to accelerate training of kernel methods . The idea is to approximate a shift-invariant kernel with random directions sampled from its Fourier transform , on which the inputs are evaluated . More recently , positional encoding has become popular for sequence modeling in natural language processing and often appears in attention layers and transformers as a way to encode the order of the input tokens . Gehring et al . ( 2017 ) use a learned embedding while Vaswani et al . ( 2017 ) use the Fourier basis for encoding input token positions . Alternative approaches were introduced by Xu et al . ( 2019 ) ; Wang et al . ( 2020 ) . Rahaman et al . ( 2019 ) demonstrated that neural networks tend to learn low frequencies more easily than high frequencies , a property called “ spectral bias ” . It also shows , for a simple task of approximating an 1D function , that projecting the input coordinate into a basis of sinusoids facilitates learning high frequencies . NeRF ( Mildenhall et al. , 2020 ) reproduced this finding in the challenging task of photorealistic novel view synthesis from a collection of images . They showed that positional encoding is crucial to achieving photorealism , and significantly outperformed the previous state of the art , which included other coordinate-based MLPs ( Sitzmann et al. , 2019 ) . Concurrently , Zhong et al . ( 2020 ) demonstrated the usefulness of Fourier encoding for reconstruction of 3D protein complexes . Tancik et al . ( 2020 ) conducted an in-depth study of positional encoding for coordinate-based MLPs . They show that , under the Neural Tangent Kernel ( NTK ) theory ( Jacot et al. , 2018 ) , the positional encoding using a sinusoidal basis results in a stationary kernel , which in turn can be interpreted as a convolutional ( shift-invariant ) reconstruction filter , desirable for signals on Euclidean spaces . The theory also explains the “ spectral bias ” ( Rahaman et al. , 2019 ) of these models via the rapidly decaying NTK eigenvalues for MLPs . In practice , Tancik et al . ( 2020 ) propose randomly sampling the frequencies of the Fourier basis elements for the encoding , and show that it outperforms previous coordinate-based MLPs with no positional encoding ( Mescheder et al. , 2019 ) , or axis-aligned positional encoding ( Mildenhall et al. , 2020 ) . While groundbreaking results and insightful theoretical developments have been demonstrated , most of the attention so far has been focused on coordinate-based MLPs for functions on Euclidean spaces . In this paper , we focus on the non-Euclidean case . One alternative to Fourier features was introduced by Sitzmann et al . ( 2020 ) , who use the sine function as the MLP nonlinearity . Major differences are that the sinusoidal is applied on every layer , and the frequencies are defined by the network MLP weights . Zheng et al . ( 2021 ) studied the trade-off between memorization and generalization in positional encoding , showing the former is related to the rank of the embedding matrix and the latter is related to the distance preservation of the embedding . They also propose another alternative to Fourier features that consists of sampling a Gaussian at fixed offsets from the input . 3 BACKGROUND . NeRF ( Mildenhall et al. , 2020 ) recently demonstrated the importance of positional encoding for coordinate-based learning of high frequency functions . For a coordinate x = [ x1 , x2 , x3 ] ∈ R3 , the following map was applied before the multilayer perceptron ( MLP ) , xi 7→ { sin ( 20πxi ) , cos ( 20πxi ) , sin ( 21πxi ) , cos ( 21πxi ) , · · · , sin ( 2Lπxi ) , cos ( 2Lπxi ) } . ( 1 ) Recall that { sin ( m⊤x ) } ∪ { cos ( n⊤x ) } with m , n ∈ Z3 form an orthonormal basis for functions defined on a compact subset of R3 . So Eq . ( 1 ) corresponds to evaluating basis functions of different frequencies at input coordinates ; we will refer to this method as “ Euclidean encoding ” . In the particular case of Eq . ( 1 ) , only axis-aligned , powers-of-two frequencies are used , so the basis for bandwidth 2L is only sparsely sampled . Tancik et al . ( 2020 ) found it better to randomly sample the frequency space , which results in basis elements that are not axis aligned , but it is still a sparse sample of the complete basis . In NeRF ( Mildenhall et al. , 2020 ) , a subset of the input encodes the view direction . A direction can be associated with a point on the surface of the unit sphere , a non-Euclidean manifold . In order to apply the Euclidean encoding to such input , ( Mildenhall et al. , 2020 ) represent the direction as a 3D unit vector instead , which increases the input dimensionality from 2D to 3D , and causes the positional encoding to sample from a set of O ( b3 ) basis functions , instead of the minimal O ( b2 ) for a bandwidth b . In IPDF ( Murphy et al. , 2021 ) , the input coordinates are flattened 3× 3 rotation matrices , which correspond to points on the 3D rotation manifold SO ( 3 ) . The Euclidean encoding then corresponds to sampling basis functions on R9 . This results in sampling from a space of O ( b9 ) basis functions instead of O ( b3 ) . Our key observation is that positional encoding of input coordinates should reflect the geometry of the underlying manifold . We propose to use the appropriate orthonormal basis functions on the manifold to implement this idea . While for many applications the Euclidean manifold is the correct one , for others it is not , as exemplified above . In the following sections we will show how the appropriate basis can be found for different types of manifolds , how to actually choose a subset of the basis to use in the encoding , and demonstrate experimentally the benefits of using them . 4 METHOD . 4.1 OVERVIEW . We consider a neural network that takes as inputs points on an n-dimensional manifold M. We assume there exists an orthonormal basis B = { bi : M → R } for the space of scalar functions on the manifold L2 ( M ) . Our goal is to apply the map γ : M → Rk to positionally encode x ∈ M before feeding it to the network , where k is the encoding dimension and γ ( x ) = { bj ( x ) | bj ∈ B′ ⊂ B } . ( 2 ) The first question that arises is how to find the basis for a given manifold . There is no general solution , but specific solutions exist for some large classes of manifolds . For compact groups ( not necessarily abelian ) , the Peter-Weyl theorem establishes a generalization of the Fourier series that results in a countable set of orthonormal basis functions . It gives rise to the Wigner-D matrix elements that are used as a basis for SO ( 3 ) in Section 4.3 . For locally compact abelian groups , the Pontryagin duality can be used , which is a generalization of the Fourier transform . For Riemannian manifolds , an orthonormal basis can be obtained as eigenfunctions of the Laplace-Beltrami operator . For the sphere S2 , these are the spherical harmonics used in Section 4.2 . The neural tangent kernel ( NTK ) theory ( Jacot et al. , 2018 ; Arora et al. , 2019 ; Lee et al. , 2019 ) shows that , under certain conditions , an MLP trained for regression f : Rn → R , converges to the solution of a kernel regression f ( x ) ≈ ∑ i wiyik ( x , xi ) , where k is the NTK , wi the kernel regression weights , and the sum is over the whole dataset . Moreover , when the inputs x have constant norm , the kernel depends only on inner products : k ( x , y ) = k′ ( x⊤y ) . In other words , it is rotationinvariant . Tancik et al . ( 2020 ) leverages this theory to explain the success of Euclidean encoding – it transforms the rotation-invariant kernel in a shift-invariant one , which results in approximating a convolution operation over the whole training set for inputs in a flat space . In this paper , the inputs do not lie on Euclidean space , so the shift-invariance in the sense of translations in Euclidean space is not appropriate . For the manifolds considered , we will seek positional encodings that have constant norm ( lie on Sn ) and such that the natural shift on the manifold also preserves the inner products between positionally encoded inputs . Then , the NTK should approximate a convolution on the manifold . We ’ ll show in the following sections that these properties constrain the selection of basis elements . | The paper generalizes the commonly used sinusoidal position encoding scheme (such as that in NerF input encoding) to inputs naturally residing in non-Euclidean manifold. This is achieved by representing the input coordinates as projections on alternative sets of orthornormal bases instead of the trivial Euclidean coordinates. The authors argue that by doing so, they extend the translational invariance of Fourier features in Euclidean space to non-Euclidian manifolds, resulting in a convolution-like operator that is invariant to the 'natural shift' on these manifolds. These new position encoding techniques are tested for several tasks and seem to get consistent improvemnts over their Fourier counterparts. | SP:c6f3f96922127f672a92b6911c1b8e29e210074d |
On the Connection between Local Attention and Dynamic Depth-wise Convolution | 1 INTRODUCTION . Vision Transformer ( Chu et al. , 2021b ; d ’ Ascoli et al. , 2021 ; Dosovitskiy et al. , 2021 ; Guo et al. , 2021 ; Han et al. , 2020 ; Khan et al. , 2021 ; Touvron et al. , 2020 ; Wang et al. , 2021b ; Wu et al. , 2021 ; Xu et al. , 2021 ; Yuan et al. , 2021b ) has shown promising performance in ImageNet classification . The improved variants , Local Vision Transformer ( Chu et al. , 2021a ; Liu et al. , 2021b ; Vaswani et al. , 2021 ) , adopt the local attention mechanism , which partitions the image space into a set of small windows , and conducts the attention over the windows simultaneously . Local attention leads to great improvement in memory and computation efficiency and makes the extension to downstream tasks easier and more efficient , such as object detection and semantic segmentation . We exploit the network regularization schemes ( Goodfellow et al. , 2016 ) , sparse connectivity that controls the model complexity , and weight sharing that relaxes the requirement of increasing the training data scale and reduces the model parameters , as well as dynamic weight prediction that increases the model capability , to study the local attention mechanism . We rephrase local attention as a channel-wise spatially-locally connected layer with dynamic connection weights . The main properties are summarized as follows . ( i ) Sparse connectivity : there is no connection across channels , and each output position is only connected to the input positions within a local window . ( ii ) Weight sharing : the connection weights are shared across channels or within each group of channels . ( iii ) Dynamic weight : the connection weights are dynamically predicted according to each image instance . We connect local attention with depth-wise convolution ( Chollet , 2017 ; Howard et al. , 2017 ) and its dynamic variants that are also a channel-wise spatially-locally connected layer with optional dynamic connection weights . They are similar in sparse connectivity . The main differences lie in ( i ) weight sharing - depth-wise convolution shares connection weights ( kernel weights ) across spatial positions and attention shares the connection weights across channels , and ( ii ) dynamic weight computation manners - local attention is based on dot-products between pairwise positions in the local window , and dynamic convolution is based on linear projections conducted on the center representation or the globally pooled representation . We further present the empirical verification for the connection . We take the recently-developed Local Vision Transformer , Swin Transformer ( Liu et al. , 2021b ) , as an example , and study the empirical performance of local attention and ( dynamic ) depth-wise convolution in the same training settings as Swin Transformer . We replace the local attention layer with the ( dynamic ) depth-wise convolution layer , keeping the overall structure unchanged . The results show that the ( dynamic ) depth-wise convolution-based approaches achieve comparable or slightly higher performance for ImageNet classification and two downstream tasks , COCO object detection and ADE semantic segmentation , and ( dynamic ) depth-wise convolution takes lower computation complexity . The ablation studies imply that weight sharing and dynamic weight improves the model capability . Specifically , ( i ) for Swin Transformer , weight sharing across channels is beneficial mainly for reducing the parameter ( attention weight ) complexity , and the attention-based dynamic weight scheme is advantageous in learning instance-specific weights and block-translation equivalent representations ; ( ii ) for depth-wise convolution , weight sharing across positions is beneficial for reducing the parameter complexity as well as learning translation equivalent representations , and the linear projection-based dynamic weight scheme learns instance-specific weights . 2 CONNECTING LOCAL ATTENTION AND DEPTH-WISE CONVOLUTION . 2.1 LOCAL ATTENTION . Vision Transformer ( Dosovitskiy et al. , 2021 ) forms a network by repeating the attention layer and the subsequent point-wise MLP ( point-wise convolution ) . The local Vision Transformer , such as Swin Transformer ( Liu et al. , 2021b ) and HaloNet ( Vaswani et al. , 2021 ) , adopts the local attention layer , which partitions the space into a set of small windows and performs the attention operation within each window simultaneously , to improve the memory and computation efficiency . The local attention mechanism forms the keys and values in a window that the query lies in . The attention output for the query xi ∈ RD at the position i is the aggregation of the corresponding values in the local window , { xi1 , xi2 , . . . , xiNk } , weighted by the corresponding attention weights { ai1 , ai2 , . . . , aiNk } 1 : yi = ∑Nk j=1 aijxij , ( 1 ) where Nk = Kw ×Kh is the size of the local window . The attention weight aij is computed as the softmax normalization of the dot-product between the query xi and the key xij : aij = e 1√ D x > i xij Zi where Zi = ∑Nk j=1 e 1√ D x > i xij . ( 2 ) The multi-head version partitions the D-dimensional query , key and value vectors into M subvectors ( each with DM dimensions ) , and conducts the attention process M times , each over the corresponding subvector . The whole output is the concatenation of M outputs , yi = [ y > i1 y > i2 . . . y > iM ] > . The mth output yim is calculated by yim = ∑Nk j=1 aijmxijm , ( 3 ) where xijm is the mth value subvector and aijm is the attention weight computed from the mth head in the same way as Equation 2 . 2.2 SPARSE CONNECTIVITY , WEIGHT SHARING , AND DYNAMIC WEIGHT . We give a brief introduction of two regularization forms , sparse connectivity and weight sharing , and dynamic weight , and their benefits . We will use the three forms to analyze local attention and connect it to dynamic depth-wise convolution . 1For presentation convenience , we ignore the linear projections conducted to the queries , the keys and the values . In vision applications , the value and the corresponding key are from the same feature possibly with different linear projections , and we denote them using the same symbol xij . Sparse connectivity means that there are no connections between some output neurons ( variables ) and some input neurons in a layer . It reduces the model complexity without decreasing the number of neurons , e.g. , the size of the ( hidden ) representations . Weight sharing indicates that some connection weights are equal . It lowers the number of model parameters and increases the network size without requiring a corresponding increase in training data ( Goodfellow et al. , 2016 ) . Dynamic weight refers to learning specialized connection weights for each instance . It generally aims to increase the model capacity . If regarding the learned connection weights as hidden variables , dynamic weight can be viewed as introducing second-order operations that increase the capability of the network . The connection to Hopfield networks is discussed in ( Ramsauer et al. , 2020 ) . 2.3 ANALYZING LOCAL ATTENTION . We show that local attention is a channel-wise spatially-locally connected layer with dynamic weight computation , and discuss its properties . Figure 1 ( c ) illustrates the connectivity pattern . The aggregation processes ( Equation 1 and Equation 3 ) for local attention can be rewritten equivalently in a form of element-wise multiplication : yi = ∑Nk j=1 wij xij , ( 4 ) where is the element-wise multiplication operator , and wij ∈ RD is the weight vector formed from the attention weight aij or { aij1 , aij2 , . . . , aijM } . Sparse connectivity . The local attention layer is spatially sparse : each position is connected to the Nk positions in a small local window . There are also no connections across channels . The element-wise multiplication in Equation 4 indicates that given the attention weights , each output element , e.g. , yid ( the ith position for the dth channel ) , is only dependent on the corresponding input elements from the same channel in the window , { xi1d , xi2d , . . . , xiNkd } , and not related to other channels . Weight sharing . The weights are shared with respect to channels . In the single-head attention case , all the elements { wij1 , wij2 , . . . , wijD } in the weight vector wij are the same : wijd = aij , 1 6 d 6 D. In the multi-head attention case , the weight vector wij is group-wise same : wij is partitioned to M subvectors each corresponding to one attention head , { wij1 , wij2 , . . . , wijM } , and the elements in each subvector wijm are the same and are equal to the mth attention weight , aijm . Dynamic weight . The weights , { wi1 , wi2 , . . . , wiNk } , are dynamically predicted from the query xi and the keys { xi1 , xi2 , . . . , xiNk } in the local window as shown in Equation 2 . We rewrite it as : { wi1 , wi2 , . . . , wiNk } = f ( xi ; xi1 , xi2 , . . . , xiNk ) . ( 5 ) Each weight may obtain the information across all the channels in one head , and serves as a bridge to deliver the across-channel information to each output channel . Translation equivalence . Different from the convolution which satisfies translation equivalence through sharing weights across positions , the equivalence to translation for local attention , depends if the keys/values are changed , i.e. , the attention weights are changed , when the feature map is translated . In the case of sparsely-sampled window ( for run-time efficiency ) , e.g. , ( Hu et al. , 2019 ; Liu et al. , 2021b ; Ramachandran et al. , 2019 ; Vaswani et al. , 2021 ) , local attention is equivalent to block-wise translation , i.e. , the translation is a block or multiple blocks with the block size same as the window size Kw × Kh , and otherwise not equivalent ( as kyes/values are changed ) . In the case that the windows are densely sampled ( e.g. , ( Zhao et al. , 2020 ) ) , local attention is equivalent to translation . Set representation . The keys/values for one query are collected as a set with the spatial-order information lost . This leads to that the spatial correspondence between the keys/values across windows is not exploited . The order information loss is partially remedied by encoding the positions as embeddings ( Dosovitskiy et al. , 2021 ; Touvron et al. , 2020 ) , or learning a so-called relative position embedding ( e.g. , ( Liu et al. , 2021b ) ) in which the spatial-order information is preserved as the keys/values in a local window are collected as a vector . 2.4 CONNECTION TO DYNAMIC DEPTH-WISE CONVOLUTION . Depth-wise convolution is a type of convolution that applies a single convolutional filter for each channel : X̄d = Cd ⊗Xd , where Xd and X̄d are the dth input and output channel maps , Cd ∈ RNk is the corresponding kernel weight , and ⊗ is the convolution operation . It can be equivalently written in the form of element-wise multiplication for each position : yi = ∑Nk j=1 woffset ( i , j ) xij . ( 6 ) Here , offset ( i , j ) is the relative offset , from the 2D coordinate of the position j to the 2D coordinate of the central position i . The weights { woffset ( i , j ) ∈ RD ; j = 1 , 2 , . . . , Nk } are reshaped from C1 , C2 , . . . , CD . The Nk weight vectors are model parameters and shared for all the positions . We also consider two dynamic variants of depth-wise convolution : homogeneous and inhomogeneous2 . The homogeneous dynamic variant predicts the convolution weights using linear projections from a feature vector that is obtained by globally-pooling the feature maps : { w1 , w2 , . . . , wNk } = g ( GAP ( x1 , x2 , . . . , xN ) ) . ( 7 ) Here , { x1 , x2 , . . . , xN } are the image responses . GAP ( ) is the global average pooling operator . g ( ) is a function based on linear projection : a linear projection layer to reduce the channel dimension with BN and ReLU , followed by another linear projection to generate the connection weights . The inhomogeneous dynamic variant predicts the convolution weights separately for each position from the feature vector xi at the position ( the center of the window ) : { wi1 , wi2 , . . . , wiNk } = g ( xi ) . ( 8 ) This means that the weights are not shared across positions . We share the weights across the channels in a way similar to the multi-head attention mechanism to reduce the complexity . We describe the similarities and differences between ( dynamic ) depth-wise convolution and local attention . Figure 1 ( c ) illustrates the connectivity patterns and Table 1 shows the properties between local attention and depth-wise convolution , and various other modules . Similarity . Depth-wise convolution resembles local attention in sparse connectivity . There are no connections across channels . Each position is only connected to the positions in a small local window for each channel . Difference . One main difference lies in weight sharing : depth-wise convolution shares the connection weights across spatial positions , while local attention shares the weights across channels or within each group of channels . Local attention uses proper weight sharing across channels to get better performance . Depth-wise convolution benefits from the weight sharing across positions to reduce the parameter complexity and increase the network capability . The second difference is that the connection weights for depth-wise convolution are static and learned as model parameters , while the connection weights for local attention are dynamic and predicted from each instance . The dynamic variants of depth-wise convolution also benefit from the dynamic weight . One more difference lies in window representation . Local attention represents the positions in a window by utilizing a set form with spatial-order information lost . It explores the spatial-order 2The homogeneous version follows and applies the dynamic convolution to depth-wise convolution . The inhomogeneous version is close to involution ( Li et al. , 2021 ) and lightweight depth-wise convolution ( Wu et al. , 2019 ) information implicitly using the positional embedding or explicitly using the learned so-called relative positional embedding . Depth-wise convolution exploits a vector form : aggregate the representations within a local window with the weights indexed by the relative position ( see Equation 6 ) ; keep spatial correspondence between the positions for different windows , thus exploring the spatial-order information explicitly . | Recently local attention based vision transformers achieved state-of-the-art results on various visual recognition tasks. This paper rephrases local attention as a channel-wise spatially-locally connected layer with dynamic connection weights. By analyzing local attention form the view of sparse connectivity, weight sharing and dynamic weight computation, the paper discusses the similarities and differences between local attention and dynamic depth-wise convolution. Motivated by this connection, the paper experimentally compares local attention with depth-wise convolution and its dynamic variants on three vision tasks using the macro architecture of Swin-Transformer. The results show that dynamic depth-wise convolution-based models perform on par or better when compared to local attention while being computationally more efficient. | SP:df325139c17effd3c3bfb932cbf44ef230559261 |
Manifold Distance Judge, an Adversarial Samples Defense Strategy Based on Service Orchestration | Deep neural networks ( DNNs ) are playing an increasingly significant role in the modern world . However , they are weak to adversarial examples that are generated by adding specially crafted perturbations . Most defenses against adversarial examples focused on refining the DNN models , which often sacrifice the performance and computational cost of models on benign samples . In this paper , we propose a manifold distance detection method to distinguish between legitimate samples and adversarial samples by measuring the different distances on the manifold . The manifold distance detection method neither modifies the protected models nor requires knowledge of the process for generating adversarial samples . Inspired by the effectiveness of the manifold distance detection , we demonstrated a well-designed orchestrated defense strategy , named Manifold Distance Judge ( MDJ ) , which selects the best image processing method that will effectively expand the manifold distance between legitimate and adversarial samples , and thus , enhances the performance of the following manifold distance detection method . Tests on the ImageNet dataset , the MDJ is effective against the most adversarial samples under whitebox , graybox , and blackbox attack scenarios . We show empirically that the orchestration strategy MDJ is significantly better than Feature Squeezing on the recall rate . Meanwhile , MDJ achieves high detection rates against CW attack and DI-FGSM attack . 1 INTRODUCTION . Deep Neural Networks ( DNNs ) is the main research direction in artificial intelligence in recent years . Research and applications have shown that deep learning has replaced previous related technologies , and extraordinary breakthroughs have been made in image recognition , security-sensitive applications , and other fields ( Kaiming He & Sun , 2016 ) . However , DNNs are weak to adversarial attacks ( Christian Szegedy & Fergus , 2014 ) . Attackers can deceive the DNNs model by manipulating graph structure or node features , which results in graph counter disturbances , and limits their application in safety-critical systems . We can divide the attack into two different attack methods based on the attack principles . One is the gradient attack based on the known optimization model , and another one is based on the transfer attack model . Recent researches have shown that we can use the Manifold Hypothesis theory to explain deep learning models from the mapping of data in high-dimensional space and low-dimensional space ( Fefferman et al. , 2016 ) The Manifold Hypothesis states that real-world high-dimensional data lie on low-dimensional manifolds embedded within the high-dimensional space ( Aamari , 2019 ) . This Hypothesis is important in DNN . Manifold hypothesis can explain the learning and detection process of deep learning models in image classification , as well as the principle of attacking against attacks ( Fefferman & Narayanan , 2019 ) . The Manifold Hypothesis explains why machine learning techniques are able to find useful features and produce accurate predictions from datasets that have a potentially large number of dimensions . From another perspective , the manifold hypothesis also explains why the adversarial attack can attack successfully and achieve the effect of confusing the deep learning model . We can use the theory of manifold hypothesis to explain the three adversarial defense methods . Current defenses against adversarial examples follow three approaches : ( 1 ) Training the target classifier with adversarial examples , called adversarial training ( Christian Szegedy & Fergus , 2014 ; Ian J. Goodfellow & Szegedy , 2015 ) ; ( 2 ) Making target classifiers hard to attack by blocking gradient pathway ( Papernot et al. , 2016b ) , e.g. , defensive distillation and ( 3 ) training a classifier to distinguish between normal and adversarial examples ( Fischer et al. , 2017 ) , e.g. , Preprocessing . In the analysis of defense methods using the manifold hypothesis , we can prove that in the deep learning model , the accuracy and generalization of the model can not be taken into account at the same time . That is , when we improve the performance of one aspect , we will sacrifice another one . It also illustrates the necessity of building an adversarial sample defense system . Finally , we can also conclude that it is inevitable to produce adversarial samples . On the other hand , in systematic adversarial sample detection methods , there are also methods such as adversarial training , defensive distillation and preprocessing method . Among these methods , there are optimal defense methods for different attacks.Based on the previous manifold analysis and defense methods analysis , we propose an orchestration defense strategy , Manifold Distance Judge ( MDJ ) , which is combining the manifold and the image preprocessing method . This paper makes four contributions . First , through the analysis of the manifold hypothesis , we propose the manifold distance detection method to reduce the pass rate of adversarial samples by expanding the manifold distance between legitimate and adversarial samples . Second , simple image transformation can enhance the difference in feature distribution between adversarial samples and legitimate samples . Third , we propose a well-designed orchestration strategy , MDJ , for detecting adversarial examples . MDJ combines the manifold distance detection method and input image preprocessing method to obtain a high detection rate of adversarial samples . Meanwhile , the MDJ method we propose can be used as a supplement to other defense methods . Because the original model does not have to be changed , it is easy to combine with other defenses such as a detection method specifically for a certain type of attack . Moreover , we prove that there is an orchestration strategy which is a simple defense combination method in the image field , and its effect is better than the single simple defense , and the random combination of the weak defense combination method . 2 RELATED WORK . In this section , we classify adversarial attack methods and briefly summarize the defense methods of adversarial training , defensive distillation , and preprocessing-based techniques . 2.1 ADVERSARIAL SAMPLE GENERATION ALGORITHM . Gradient Optimization Model : In a gradient optimization attack model , the attacker knows all the information and parameters inside the model and can generate adversarial samples based on the gradient of a given model to attack the classification model ( Muñoz-González et al. , 2017 ) . We discuss the attacking algorithms used in our experiments , Fast Gradient Sign Method ( FGSM ) ( Goodfellow et al. , 2014 ) , Basic Iterative Method ( BIM ) ( Kurakin et al. , 2018 ) , DeepFool ( Moosavi-Dezfooli et al. , 2016 ) , Acobian Saliency Map Approach ( JSMA ) ( Papernot et al. , 2016a ) , Carlini/Wagner Attacks ( Carlini & Wagner , 2017 ) . Transfer Attacks : In the transfer attack model , because the attacker does not know the internal information of the model , it is necessary to query the target model multiple times , use the alternative model and other optimization methods to solve the parameters based on the query results , generate the adversarial sample according to the gradient of the alternative model , and classify model attacks . we discuss the attacking algorithms used in our experiment , Momentum Iterative Fast Gradient Sign Method ( MI-FGSM ) ( Dong et al. , 2018 ) , Diverse Input Iterative Fast Gradient Sign Method ( DI2FGSM ) ( Xie et al. , 2019 ) . 2.2 EXISTING DETECTION METHODS . Adversarial Training : The defense method is to superimpose the disturbance that maximizes the loss function in the sample , so it is effective for fixed or large disturbances , even if the attack method with obvious changes in the model gradient is easy to be detected.But adversarial training diminishes the ML model ’ s accuracy and can make the ML model more exposed to generalization ( Carmon et al. , 2019 ) . Another disadvantage of Adversarial training based defense techniques is that we need to retrain the model whenever some new attack samples are discovered . It will be hard to update all deployed ML models . Defensive Distillation : The essence of the defense method is to replace the model defense idea , that is , to train a new distillation network based on the original model and its output to classify or predict samples.But distillation techniques work by combining the double model , and the second model uses the first model knowledge to improve accuracy . The black-box attack ’ s recent improvement makes this out-of-date defense ( Chakraborty et al. , 2018 ) . The strong transfer-potential of adversarial samples across neural network models ( Papernot et al. , 2016c ) is the main reason for this method ’ s collapse . It is not robust as simplistic variation in a neural network can make the system exposed to attacks ( Carlini & Wagner , 2016 ) . ( He et al. , 2017 ) concluded that combining/ensemble weak defenses does not automatically improve a system ’ s robustness . Also , the ensemble technique remains static and vulnerable to a new attack . Processing-based Techniques : The defense method based on image preprocessing has a defensive effect on migration attacks and gradient attacks . Its essence is to reduce the noise of the sample , to reduce the interference of the adversarial disturbance to the model . For the choice of preprocessing method , we can not judge which attack is effective , and most of the selection of preprocessing method adopts enumeration method , which is complicated to calculate . 3 MANIFOLD HYPOTHESIS AND ADVERSARIAL ATTACK . In this section , we introduce the manifold hypothesis to explain the learning and detection process of the deep learning model , and discuss the effect of this hypothesis in adversarial attacks . 3.1 MANIFOLD HYPOTHESIS . The Manifold Hypothesis states that real-world high-dimensional data lie on low-dimensional manifolds embedded within the high-dimensional space ( Fefferman et al. , 2016 ) . It reflects the local smoothness of the decision function , helps to more accurately characterize the local area , and enables the decision function to better perform data simulation . It also explains why deep learning techniques are able to find useful features and produce accurate predictions from datasets that have a potentially large number of dimensions ( Fefferman et al. , 2016 ) . The fact that the actual data set of interest actually lives on in a space of low dimension , means that a given deep learning model only needs to learn to focus on a few key features of the dataset to make decisions . Many of the algorithms behind machine learning techniques focus on ways to determine these ( embedding ) functions . 3.2 MANIFOLD HYPOTHESIS APPLIED IN ADVERSARIAL DEFENSE . In the training stage , the models learn the manifold representation of the data and the optimal decision border of classification , taking classification task as an example . The model continuously maps different images on low dimensions to form a manifold and learns by confirming tags . In the model checking stage , the features of the picture are also mapped on low dimensions , and the distance from the manifold determined in the learning process is measured to determine the label output by the model . In the detection stage , the model extracts the characteristics of the input picture and compares it with the stored optimal decision border to determine the classification of the input picture . The optimal decision border affects the classification efficiency of the model . The reason is that too few data points cause the boundary shape to change during smoothing , which makes the appearance of adversarial samples inevitable ; on the other hand , due to the excessive pursuit of the accuracy of the boundary , it leads to overfitting , and reduce the generalization and robustness of the model . From the perspective of binary classification , there is no difference between adversarial samples and correctly classified negative samples . The reason is legitimate samples are extremely sparse in the distribution of high-dimensional space in the real world ( take images as an example , MxNx8 black and white images , only the value in the high-dimensional extremely sparse field is meaningful ) . So we can use low-dimensional manifolds to classify legitimate samples . For deep learning models , if the adversarial samples and legitimate samples usually do not appear in which the samples are discriminated in high-dimensional space , it can be found that they are closer to the manifold than the legitimate negative samples . It leads to the failure to correctly classify legitimate samples into negative samples on the low-dimensional manifold that successfully classifies them . From the perspective of two attack optimization models , there are two reasons for a classifier misclassifies an adversarial example : ( 1 ) The adversarial example is far from the boundary of the manifold of the task . ( 2 ) The adversarial example is close to the boundary of the manifold . If the classifier generalizes poorly off the manifold in the vicinity of the adversarial example , then misclassification occurs . The distribution probability of the adversarial sample and the legitimate sample is different , that is , the model decision probability of the adversarial sample and the legitimate sample should be different . There is a theoretical method that can distinguish between legitimate samples and adversarial samples , that is , using adversarial samples that do not appear in the high-dimensional space of legitimate samples for judgment . This type of attack method against samples is to cross the boundary of the manifold with the smallest distance , and their mapping positions in the low-dimensional space are different from the legitimate samples . We assume that if there is a method that can change the mapping position of the image in the high-dimensional space , and also change the mapping position of the adversarial sample in the low-dimensional space , we can let the model learn the manifold of these samples to compare them . Adversarial samples are distinguished and used as the basis for classifying and detecting samples . | This paper proposes a manifold distance based detection based against adversarial samples. In addition, it also proposes manifold distance judge for the adversarial defense. The focus of the paper is to make low-dimensional manifolds better express high-dimensional data; the experimental results seems that the proposed method has good performance, but there are still lots of space to improve. | SP:fc3fbc5ba25cbbe3633a32893f018f9e7318c0ee |
On the Convergence of Certified Robust Training with Interval Bound Propagation | 1 INTRODUCTION . It has been shown that deep neural networks are vulnerable against adversarial examples ( Szegedy et al. , 2014 ; Goodfellow et al. , 2015 ; Carlini & Wagner , 2017 ; Kurakin et al. , 2016 ) , where a human imperceptible adversarial perturbation can easily alter the prediction by neural networks . This poses concerns to safety-critical applications such as autonomous vehicles , healthcare or finance systems . To combat adversarial examples , many defense mechanisms have been proposed in the past few years ( Kurakin et al. , 2016 ; Madry et al. , 2018 ; Zhang et al. , 2019 ; Guo et al. , 2018 ; Song et al. , 2018 ; Xiao et al. , 2020 ) . However , due to the lack of reliable measurement on adversarial robustness , many defense methods are later broken by stronger attacks ( Carlini & Wagner , 2017 ; Athalye et al. , 2018 ; Tramer et al. , 2020 ) . There are recently a line of robust training works , known as certified defense , focusing on training neural networks with certified robustness , where the evaluation of robustness needs to be provable – the network is considered robust on a test example if and only if the prediction is provably correct for any perturbation in a predefined set ( e.g. , a small ` ∞ ball ) ( Wang et al. , 2018b ; Bunel et al. , 2018 ; Zhang et al. , 2018 ; Wang et al. , 2018c ; Wong & Kolter , 2018 ; Singh et al. , 2018 ; 2019 ; Weng et al. , 2018 ; Xu et al. , 2020 ) . Unlike empirical methods that evaluate robustness with adversarial attacks and thus the evaluation can be limited by the strength of the attack algorithm , certified defense methods provide provable robustness guarantees without referring to any specific attack . To obtain a neural network with certified robustness , a common practice is to derive a neural network verification method that computes the upper and lower bounds of output neurons given an input region under perturbation ( e.g. , a small ` ∞ ball around an unperturbed sample ) , and then train the neural network to optimize the loss defined not on the original output , but on the worst-case output produced by the verification method . Many methods along this line have been proposed in the past few years ( Wong & Kolter , 2018 ; Wong et al. , 2018 ; Mirman et al. , 2018 ; Gowal et al. , 2018 ; Raghunathan et al. , 2018a ; Zhang et al. , 2020a ) . Among these methods , Interval Bound Propagation ( IBP ) ( Mirman et al. , 2018 ; Gowal et al. , 2018 ) is a simple but effective and efficient method for certified robust training . It simply propagates the interval bound of each neuron through the network in the forward pass to obtain output bounds of the network . Most of the latest state-ofthe-art certified defense methods are still at least partly based on IBP training ( Zhang et al. , 2020a ; Shi et al. , 2021 ; Lyu et al. , 2021 ; Zhang et al. , 2021 ) . Despite being one of the most successful certified defense methods , the convergence properties of IBP training remained unknown . For natural neural network training ( training without considering adversarial perturbation , aka standard training ) , it has been shown that gradient descent for overparameterized networks can provably converge to a global minimizer with random initialization ( Li & Liang , 2018 ; Du et al. , 2019b ; a ; Jacot et al. , 2018 ; Allen-Zhu et al. , 2019 ; Zou et al. , 2018 ) . Compared to natural neural network training , IBP-based robust training has a very different training scheme , and thus requires a different convergence analysis . First , in the robust training problem , input data can contain adversarial perturbations , and the training objective is to minimize a robust loss rather than a natural loss . Second , IBP training essentially optimizes an augmented network which contains IBP bound computation rather than standard neural networks , as illustrated in Zhang et al . ( 2020a ) . Third , in IBP training , the activation state of each neuron depends on the certified bounds rather than the value in natural neural network computation , and this introduces additional perturbation-related terms in the convergence analysis for IBP . In this paper , we conduct a theoretical analysis to study the convergence of IBP training . Following recent convergence analysis on Stochastic Gradient Descent ( SGD ) for natural training , we consider IBP robust training with gradient flow ( gradient descent with infinitesimal step size ) for a two-layer overparameterized neural network on a classification task . We summarize our contributions below : • We provide the first convergence analysis for IBP-based certified robust training . On a two-layer overparameterized ReLU network with logistic loss , with sufficiently small perturbation radius and large network width , gradient flow with IBP has a linear convergence rate , and is guaranteed to converge to zero training error with high probability . • Our result implies that IBP converges to a state where the certified robust accuracy measured by IBP bounds tightly reflects the true robustness of the network . • We show additional perturbation-related conditions required to guarantee the convergence of IBP training so far , and identify additional challenges in the convergence analysis for IBP training compared to standard training . 2 RELATED WORK . 2.1 CERTIFIED ROBUST TRAINING . The goal of certified robust training is to maximize the robust accuracy of the model under the evaluation by provable robustness verifiers . Some works add heuristic regularizations during adversarial training to improve certified robustness ( Xiao et al. , 2019 ; Balunovic & Vechev , 2020 ) . Some others optimize a certified robust loss which is a certified upper bound of the loss function under all considered perturbations , computed from certified bounds by robustness verifiers . Among them , Wong & Kolter ( 2018 ) ; Mirman et al . ( 2018 ) ; Dvijotham et al . ( 2018 ) ; Wong et al . ( 2018 ) ; Wang et al . ( 2018a ) used verification with linear relaxation for nonlinear activation functions , and Raghunathan et al . ( 2018b ) used semi-definite relaxation . However , Interval Bound Propagation ( IBP ) ( Mirman et al. , 2018 ; Gowal et al. , 2018 ) which computes and propagates an interval lower and upper bound for each neuron , has been shown as efficient and effective and can even outperform methods using more complicated relaxation as partly discussed by Lee et al . ( 2021 ) ; Jovanović et al . ( 2021 ) . At least partly based on IBP , Zhang et al . ( 2020a ) combined IBP with linear relaxation bounds ; Lyu et al . ( 2021 ) designed a parameterized activation ; Zhang et al . ( 2021 ) designed a 1-Lipschitz layer with ` ∞-norm computation before layers using IBP ; Shi et al . ( 2021 ) improved IBP training with shortened training schedules . Yet , the state-of-the-art methods still contain IBP as an important part , and thus we focus on analyzing the convergence of IBP training in this paper . On the theoretical analysis for IBP bounds , Baader et al . ( 2020 ) analyzed the universal approximation of IBP verification bounds , and Wang et al . ( 2020 ) extended the analysis to other activation functions beyond ReLU . However , to the best of our knowledge , there is still no existing work analyzing the convergence of IBP training . The aforementioned methods for certified robustness target at robustness with deterministic certification . There are also some other works on probabilistic certification such as randomized smoothing ( Cohen et al. , 2019 ; Li et al. , 2019 ; Salman et al. , 2019 ) which is out of our scope . 2.2 CONVERGENCE OF STANDARD NEURAL NETWORK TRAINING . There have been many works analyzing the convergence of standard neural network training . For two-layer ReLU neural networks with quadratic loss , Du et al . ( 2019b ) proved that randomly initialized gradient descent can converge to a globally optimum with a large enough network width m which is polynomial in the number of training examples n. Ji & Telgarsky ( 2019 ) pushed the requirement of network width m to a polylogarithmic function . For deep neural networks , Allen-Zhu et al . ( 2019 ) proved that for randomly initialized ReLU deep neural networks , gradient descent has a linear convergence rate for various loss functions with width polynomial in network depth and number of training examples . And Chen et al . ( 2019 ) proved that a polylogarithmic width is also sufficient for deep neural networks to converge to the optimal point . However , these works only focus on standard training , and can not be directly adapted to the robust training setting . 2.3 CONVERGENCE OF EMPIRICAL ADVERSARIAL TRAINING . Robust training including both certified training and empirical adversarial training is essentially a min-max optimization . For a training data distribution X , the objective for learning a model fθ parameterized by θ can be written as1 : arg min θ E ( x , y ) ∼X max ∆∈S ` ( fθ ( x + ∆ ) , y ) , ( 1 ) where ( x , y ) is an example sampled from X , ` ( · , y ) is the loss function for ground truth y , S is the space of all possible perturbations . Empirical adversarial training approximately solves the inner minimization by running adversarial attacks . Some works have analyzed the convergence of adversarial training . Wang et al . ( 2019 ) considered a first-order stationary condition for solving the inner constrained maximization problem . Gao et al . ( 2019 ) ; Zhang et al . ( 2020b ) showed that overparameterized networks with projected gradient descent can converge to a state where the surrogate robust loss by adversarial attack is close to the true robust loss ( i.e. , the inner maximization by adversarial attack is mostly optimal ) and the robust loss is close to 0 . Zou et al . ( 2021 ) showed that adversarial training provably learns robust halfspaces in the presence of noise . However , there is a significant difference between empirical adversarial training and IBP training . In adversarial training , there is a concrete perturbation ∆ generated for the inner maximization , and there is a concrete adversarial input x+ ∆ . However , in IBP-based training , the inner maximization is computed from certified bounds , where for each layer , the interval certified bounds of each neuron are computed independently . Thereby , the certified bounds of the network generally no longer correspond to any concrete ∆ . Due to this significant difference , prior theoretical analysis on adversarial training , which required there to be a concrete ∆ for inner maximization , is not applicable to IBP . 3 PRELIMINARIES . 3.1 NEURAL NETWORKS . We consider a similar network architecture as used in Du et al . ( 2019b ) – a two-layer ReLU network . Unlike Du et al . ( 2019b ) which considered a regression task with a square loss , here we consider a classification task where IBP is usually used , and we consider binary classification for simplicity . On a training dataset { ( xi , yi ) } ni=1 , for every i ∈ [ n ] , ( xi , yi ) is a training example with d-dimensional input xi ( xi∈Rd ) and label yi ( yi∈ { ±1 } ) , and the network output is : f ( W , a , xi ) = 1√ m m∑ r=1 arσ ( w > r xi ) , ( 2 ) where m is the width of hidden layer ( the first layer ) in the network , W ∈ Rm×d is the weight matrix of the hidden layer , wr ( r ∈ [ m ] ) is the r-th row of W , a ∈ Rm is the weight vector of the second layer ( output layer ) with elements a1 , · · · , am , and σ ( · ) is the activation function . We assume the activation is ReLU as IBP is typically used with ReLU . For initialization , we set ar ∼ 1Here we use notations to denote the general robust training problem , but in our later theoretical analysis , we will have different notations for a simplified problem setting . unif [ { 1 , −1 } ] and wr ∼N ( 0 , I ) . Following Du et al . ( 2019b ) , we assume the second layer is fixed after initialization , and we only train the first layer . Since we consider binary classification , we use a logistic loss . For training example ( xi , yi ) , we define ui ( W , a , xi ) : = yif ( W , a , xi ) , and then the loss for this example is computed as l ( ui ( W , a , xi ) ) = log ( 1 + exp ( −ui ( W , a , xi ) ) ) , and the standard training loss on the whole training set is L = n∑ i=1 l ( ui ( W , a , xi ) ) = n∑ i=1 log ( 1 + exp ( −ui ( W , a , xi ) ) ) . ( 3 ) | Training deep neural networks in the presence of adversarial perturbations (in the input data) is a very active research topic. There are lots of works defining notions of robustness, proposing solution algorithms, and introducing algorithmic improvements. Several of the recent techniques involve or extend the interval bound propagation (IBP) technique. However, there is no work analysing the convergence of IBP even in its simplest setting. In this paper, the author(s) analyse the convergence of IBP in a simplified setting for the first time. | SP:348b7ab8ecfe2e7cfce697d8a1f9917880e95f62 |
CONTEXT AUGMENTATION AND FEATURE REFINEMENT NETWORK FOR TINY OBJECT DETECTION | Tiny objects are hard to detect due to their low resolution and small size . The poor detection performance of tiny objects is mainly caused by the limitation of network and the imbalance of training dataset . A new feature pyramid network is proposed to combine context augmentation and feature refinement . The features from multi-scale dilated convolution are fused and injected into feature pyramid network from top to bottom to supplement context information . The channel and spatial feature refinement mechanism is introduced to suppress the conflicting formation in multi-scale feature fusion and prevent tiny objects from being submerged in the conflict information . In addition , a data enhancement method called copy-reduce-paste is proposed , which can increase the contribution of tiny objects to loss during training , ensuring a more balanced training . Experimental results show that the mean average precision of target targets on the VOC dataset of the proposed network reaches 16.9 % ( IOU=0.5:0.95 ) , which is 3.9 % higher than YOLOV4 , 7.7 % higher than CenterNet , and 5.3 % higher than RefineDet . 1 INTRODUCTION . As an challenge in the field of target detection , tiny object detection is widely used in vision tasks such as autonomous driving , medical field , drone navigation , satellite positioning , and industrial detection . In recent years , object detectors based on deep learning have made great progress ( Tong et al. , 2020 ; Feng et al. , 2020 ) . One-stage algorithms represented by ( Redmon & Farhadi , 2018 ; Zhang et al. , 2020 ; Liu et al. , 2016 ) can directly get access to the target of interest through the forward convolutional neural network with a fast speed . However , two-stage algorithms ( He et al. , 2017 ; Ren et al. , 2016 ) obtain the RoI ( Region of Interest ) based on the generated candidate boxes , which has higher accuracy . Although these target detection algorithms have made great progress in precision and speed , their performance is still very unsatisfactory when detecting tiny targets ( less than 32×32 pixels ) . On most public data sets , the detection precision of tiny objects is even less than half of that of larger targets ( Liu et al. , 2016 ) . Therefore , tiny object detection still has a lot of room for improvement . The poor performance of tiny object detection is mainly caused by the limitations of the network itself and the imbalance of training data ( Kisantal et al. , 2019 ) . To obtain solid semantic information , modern detectors try to stack more and more pooling and down-sampling operations so that tiny object features with few pixels are gradually lost in forwarding propagation ( Liu et al. , 2021 ) , limiting the detection performance of tiny objects . FPN ( Lin et al. , 2017 ) can alleviate the problem of information diffusion to a certain extent ( Redmon & Farhadi , 2018 ; Liu et al. , 2016 ) by fusing low-resolution feature maps with high-resolution feature maps horizontally . However , fusing the information of different densities directly will cause semantic conflicts , which limiting the expression of multi-scale features and making tiny objects submerged in conflicting information easily . At the same time , in the current classic public data set , the number of annotations of tiny objects is much less than that of larger targets ( Chen et al. , 2020 ) . Therefore , the convergence direction of the network is continuously leaning toward larger targets during training , resulting in poor performance of tiny objects . Consequently , we believe that it is feasible to improve the detection rate of tiny objects from the above two aspects . To solve the problem of feature dispersion of tiny objects and semantic differences between layers , this paper proposes a new feature pyramid composite neural network structure that combines context augmentation and feature refinement . The proposed algorithm framework is shown in Figure 1 . It is combined with context augmentation module ( CAM ) and feature refinement module ( FRM ) . CAM merges multi-scale dilated convolution features to obtain rich context information for feature augmentation . FRM introduces a feature refinement mechanism in the dimensions of the channel and space to suppress conflict information and prevent tiny objects from being submerged in conflict information . Simultaneously , to ensure that the network will not lean towards larger targets during training , a method called copy-reduce-paste is proposed to increase the contribution to the loss of tiny objects in training . We train and test on the standard public data set PASCAL VOC , and verify the effectiveness of out method for detecting tiny objects through comparative experiments and ablation experiments . The algorithm proposed in this paper achieves a precision of 83.6 % ( IOU=0.5 ) on the VOC data set , which is higher than most comparison algorithms , and the precision of tiny objects reaches 16.9 % ( IOU=0.5:0.95 ) , which is higher than YOLOV4 , CenterNet and other cutting-edge networks . 2 RELATED WORK . 2.1 OBJECT DETECTOR BASED ON DEEP LEARNING . As a fundamental computer vision task , target detection contains both classification and localization , which can be regarded as a regression problem . In the early days , hand-designed features were widely applied to target detection . However , hand-designed feature is a kind of shallow feature , and it is gradually replaced after the appearance of the CNN-based features . R-CNN ( He et al. , 2017 ) , as the pioneering work of two-stage algorithms , employs prior boxes of different size to match targets of different size and then selects candidate regions through CNN . To reduce the training time , FastRCNN ( Ren et al. , 2016 ; Xiao et al. , 2020 ) extracts the feature map of the entire image , and then spatial pyramid pooling and RoI ( Region of Interest ) pooling are used to generate regional features and to filter candidate regions . To further improve the precision of tiny object , EFPN ( Deng et al. , 2021 ) proposes a super-resolution feature pyramid structure to amplify tiny object features . Compared with two-stage networks , one-stage networks have a faster speed but lower precision . SSD ( Liu et al. , 2016 ) puts anchor boxes densely on the image to obtain the target boxes , and meanwhile , it makes full use of features of different scales to detect smaller targets . YOLOV3 ( Redmon & Farhadi , 2018 ) chooses to detect large , medium , and tiny objects separately based on three outputs of the feature pyramid , which significantly improves the detection performance of tiny objects . ( Zhang et al. , 2020 ) introduces a high-resolution attention mechanism to FPN to mine the most useful information of tiny targets . This paper chooses YOLOV3 ( Redmon & Farhadi , 2018 ) as the baseline and makes improvements on this basis . RefineDet ( Zhang et al. , 2018 ) introduces a new loss function to solve the imbalance between simple samples and difficult samples . Recently , detectors based on anchorfree architecture are becoming more and more popular ( Zhao et al. , 2019 ) . Although target detection algorithms are constantly developing and replacing , there is no big breakthrough in the field of tiny object detection , and the detection precision of tiny objects stays low . 2.2 MULTI-SCALE FEATURE FUSION . Using multi-scale features is an effective method to improve the detection precision of tiny objects . SSD ( Liu et al. , 2016 ) is the first attempt to predict the location and category of targets with multiscale features . FPN ( Lin et al. , 2017 ) merges adjacent feature maps with different grains from top to bottom , which can improve the expressive ability of features greatly . A large number of variant structures similar to FPN ( Lin et al. , 2017 ) have emerged . PANet ( Liu et al. , 2018 ) adds extra bottomup connections based on FPN ( Lin et al. , 2017 ) to transfer information from the lower layer to the upper layer more efficiently . NAS-FPN ( Ghiasi et al. , 2019 ) found a new connection method through neural architecture search technology . BiFPN ( Tan et al. , 2020 ) improved the connection method of PANet ( Liu et al. , 2018 ) to make it more efficient and introduced a simple attention mechanism at the connection point . Although the structures mentioned above have greatly improved the multi-scale expression ability of the network , they have ignored the existence of conflict information between features of different scales , and the lack of context information may hinder the further improvement of performance , especially for tiny objects , which is easy to be submerged in conflict information . This article fully considers the impact of conflict information and context information on detection precision . 2.3 DATA AUGMENTATION . Preprocessing of the training set has always been an indispensable part of deep learning , such as rotation , deformation , random erasure , random occlusion , illumination distortion , and MixUp . In recent days , several data enhancement methods for tiny objects have been proposed . ( Chen et al. , 2020 ) regards loss as a kind of feedback . And four images were scaled to the same size and stitched together to enhance the performance of tiny object detection under the guidance of feedback . Unlike ( Chen et al. , 2020 ) , ( Yu & Koltun , 2015 ) scales 4 images to different sizes and stitched them into one . ( Kisantal et al. , 2019 ) tried to achieve tiny object data augmentation by copying and pasting tiny objects back to original images . This method can only increase the number of tiny objects but not the number of training images containing tiny objects . It will also cause the imbalance of training to a certain extent . Because larger targets are widely distributed in each batch of training , this paper guarantees the tiny objects ’ contribution to the loss in eache batch of training , making the training more balanced . 3 PROPOSED METHODS . This chapter will introduce our tiny object detection network in detail . As we can see in Figure 1 , { C2 , C3 , C4 , C5 } represent different levels after input image being down-sampled by { 4 , 8 , 16 , 32 } times . { F1 , F2 , F3 } are denoted as newly generated feature levels corresponding to { C3 , C4 , C5 } by a layer of convolution , and C2 is discarded because of a mess of noises . { L1 , L2 , L3 } are denoted as feature levels generated by FPN and { P1 , P2 , P3 } are denoted as the feature levels generated by FRM . The network is mainly composed of CAM and FRM . CAM is inspired by the mode that humans recognize objects . For example , it is difficult for human to distinguish a bird in a very high sky , but it is easy for human to distinguish when considering the sky as the context information . Therefore , we believe that context information is helpful for tiny object detection . CAM applies dilated convolution with different dilated convolution rates to obtain context information of different receptive fields , and injects it into FPN ( Lin et al. , 2017 ) from top to bottom to enrich context information . But it will introduce redundant information and conflicting information while sharing the information , because of the semantic differences among different levels of FPN ( Lin et al. , 2017 ) . Therefore , FRM is proposed to filter conflict information and reduce semantic differences . By fusing the features between different layers adaptively , the conflict information among layers is eliminated to prevent the tiny object features from being submerged in the conflict information . Simultaneously , in view of the small number of positive samples generated by tiny objects and the limited contribution to loss of tiny objects , a data augmentation method called copy-reduce-paste is proposed . Specifically , copy the larger targets in the training set , reduce them , and then paste them back to the original imge . During the pasting process , it is necessary to ensure that the pasted targets do not overlap with the existing targets . The above methods will be explained in detail in the following sections . | The paper aims at the tiny object detection and point out the issues are small context feature, semantic feature conflicts, and less tiny objects in training data. To solve the aforementioned problems, authors introduce context augmentation module (CAM), design a feature refinement module, and adopt data-augmentation manner in training process. Experiments are conducted on PASCAL VOC dataset to validate the proposed methods and modules. | SP:46824855f69bc3fda308ee0159a03791dafe4d7a |
Certified Adversarial Robustness Under the Bounded Support Set | 1 INTRODUCTION Vulnerability to adversarial samples is a major obstacle that various classifiers obtained by machine learning algorithms , especially deep neural networks ( DNNs ) , need to overcome ( Szegedy et al. , 2013 ; Nguyen et al. , 2015 ) . For instance , in computer vision applications , deliberately adding some subtle perturbation δ that humans can not perceive to the input image x will cause DNNs to give a wrong classification output with high probability . Many empirical adversarial defenses have been proposed , among which adversarial training ( Madry et al. , 2018 ) is the most effective one ( Athalye et al. , 2018 ) , however , it still faces stronger or adaptive attacks to decrease its effectiveness to a certain degree ( Croce & Hein , 2020 ) . This motivates research on certified robustness : algorithms that are provably robust to the worst-case attacks . Some works propose algorithms to learn DNNs that are provably robust against norm-bounded adversarial perturbations by using some convex relaxation methods ( Wong & Kolter , 2018 ; Weng et al. , 2018 ; Xiao et al. , 2018 ; Zhang et al. , 2019 ) . However , these approaches are usually computationally expensive and require extensive knowledge of classifier architecture . Besides , randomized smoothing ( first introduced in Cohen et al . ( 2019 ) ) has received significant attention in recent years for verifying the robustness of classifiers . Based on this method , several papers have studied which smoothing strategies perform better for specific lp perturbations . Cohen et al . ( 2019 ) concludes that randomized smoothing can be well understood for the l2 case by using Gaussian probability measure for smoothing . It follows that several special cases of the conjecture have been proven for p < 2 . Li et al . ( 2018 ) show that l1 robustness can be achieved with the Laplacian distribution , and Lee et al . ( 2019 ) show that l0 robustness can be achieved with a discrete distribution . Other papers start from the opposite perspective and focus on studying under specific assumptions which perturbation is provably difficult to handle and which smoothing methods are ineffective for particular disturbance . As for the existence of a noise distribution that works for the case of p > 2 , Blum et al . ( 2020 ) and Kumar et al . ( 2020 ) show hardness results for random smoothing to achieve certified adversarial robustness against attacks in the lp ball of radius . Nevertheless , since these works provide hardness results for every possible base classifier f : Rd → Y including those unusual and even bizarre ones , hardness results given by these papers might be attributed to taking into account classifiers that will never appear in real-world applications . From this perspective , the order of difficulty restricted within the common classifiers subset still remains unresolved . Notably , based on randomized smoothing strategy , Dvijotham et al . ( 2020 ) introduce a provable robustness framework using f -divergence as their convex relaxation technique . However , due to the use of likelihood ratio in their certification methods , the framework can not be applied to smoothing measures with bounded support sets such as uniform probability measures . In this paper , we introduce a framework that is able to deal with robustness properties of arbitrary smoothing measures , including those with bounded support set , by using Wasserstein distance as well as total variation distance . Our contributions are summarized as follows : • By applying our methodology to uniform probability measures with support set B2 ( O , r ) , we obtain certified robustness properties with respect to lp-perturbations . By applying our methodology to uniform probability measures with support set B∞ ( O , r ) , we obtain certified robustness properties with respect to l1 , l2 , l∞-perturbations . • Furthermore , we analyze the cases when smoothing measure is taken as uniform probability measure with more general support set Bp ( O , r ) and show the unavoidable curse of dimension for the usage of bounded support set smoothing measures . • We present experimental results on CIFAR-10 dataset with ResNet to validate our theory . It is worth mentioning that our certification procedure only costs constant computation time , which is an improvement upon the state-of-the-art methods in terms of the computation time . 2 PROBLEM SETTING Given a binary base classifier h : Rd → Y = { ±1 } and smoothing probability measure µ , the randomly smoothed classifier hµ ( x ) is defined as follows . Definition 1 ( smoothed classifier , smoothing measure ) . The smoothed version of a base binary classifier h producing labels in set Y = { ±1 } is defined as hµ ( x ) = arg max y∈Y PX∼x+µ [ h ( X ) = y ] , ( 1 ) where µ ∈ P ( X ) is called smoothing measure . Another way to understand this definition is to say that the smoothed classifier first scores point x as hµ , y ( x ) = PX∼x+µ [ h ( X ) = y ] for each specific class y ∈ Y and then outputs the class y∗ with the highest score . We want to study the robustness of the smoothed classifier hµ against adversarial perturbations of size at most with respect to a given norm || · ||p . The question that whether a bounded lp norm adversarial attack on a fixed input x satisfying hµ ( x ) = +1 is successful or not can be formulated as solving the optimization problem below : min ||x′−x||p≤ PX∼x′+µ [ h ( X ) = +1 ] . ( 2 ) The attack is successful if and only if the minimum value is smaller than 12 . Since we know little about the information of the black-box classifier h , we follow the approach introduced in Dvijotham et al . ( 2020 ) : rather than studying the adversarial attack in the input spaceX , we study it in the space of probability measures defined on input space P ( X ) , min ||x′−x||≤ PX∼x′+µ [ h ( X ) = +1 ] = min ν∈Dx , , q PX∼ν [ h ( X ) = +1 ] , ( 3 ) where Dx , , q : = { x′+µ : ||x−x′||q ≤ } represents an lq-norm-based constraint set of radius for smoothing measure µ centered at a particular sample point x . Then , we follow the full-information robust certification framework established in Dvijotham et al . ( 2020 ) and analyze the generalization of binary classifier h , which they called specification and denote it as φ : X ⊆ Rd → Z ⊆ R. Besides , define reference measure ρ as x + µ and a collection of perturbed probability measures D ⊆ P ( X ) . Checking whether a given specification φ is robustly certified at ρ with respect to D or not is equivalent to estimating the optimal value of following optimization problem is non-negative or not : OPT ( φ , ρ , D ) : = min ν∈D EX∼ν [ φ ( X ) ] . ( 4 ) And certifying lp robustness on input x with output of smoothed classifier hµ ( x ) = +1 is equivalent to verify whether OPT ( h , x+ µ , Dx , , q ) ≥ 0 or not . 3 OUR CERTIFICATION PROCEDURES Notice that the certification in Dvijotham et al . ( 2020 ) uses the likelihood ratio r ( X ) = ν ( X ) ρ ( X ) , while r ( X ) is well-defined only when the support set of ρ contains the support set of ν . Thus , when the support set of reference measure ρ is bounded , and ν takes even a small translation of ρ , the support set of ν will cross over the boundary of support set of ρ . Their certification is invalid in this case . In this paper , by using Wasserstein distance as well as total variance distance , we provide analytical techniques able to analyze bounded support set which is not covered by Dvijotham et al . ( 2020 ) . Since the set of measures Dx , , q constraint in optimization problem OPT ( h , x + µ , Dx , , q ) is intractable to deal with , we consider relaxations of this by using Wasserstein distance as well as total variance distance constraints between ν and x+ µ , i.e . Dx , , q ⊆ { ν : Wp ( x+ µ , ν ) ≤ δ } : = Dx , δ , p which represents Wp-distance-based constraint set of radius δ for smoothing measure µ centered at sample point x and D ⊆ { ν : TV ( x + µ , ν ) ≤ ξ } : = Dx , ξ which represents TV-distance-based constraint set of radius ξ for smoothing measure µ centered at sample point x . Combining the two relaxations , we know Dx , , q ⊆ Dx , δ , p ∩ Dx , ξ and therefore OPT ( h , x+ µ , Dx , , q ) ≥ OPT ( h , x+ µ , Dx , δ , p ∩ Dx , ξ ) . ( 5 ) And we can obtain tighter relaxation by combining multiple Wasserstein distance relaxation with different p , i.e . Dx , , q ⊆ ( ⋂ i∈I Dx , δi , pi ) ∩ Dx , ξ where I ⊆ R+ and therefore OPT ( h , x+ µ , Dx , , q ) ≥ OPT ( h , x+ µ , ( ⋂ i∈I Dx , δi , pi ) ∩ Dx , ξ ) . ( 6 ) Thus , for a fixed input x , it suffices to consider the Wasserstein distance and total variance distance relaxed problem and verify whether OPT ( h , x+ µ , Dx , δ , p ∩Dx , ξ ) ≥ 0 or not . The analysis of this problem can be divided into three parts : computing the Wasserstein distance relaxation measure set , computing the total variance distance relaxation measure set , and computing the Lagrange function as well as dual problem of the relaxed optimization problem OPT ( h , x + µ , Dx , δ , p ∩ Dx , ξ ) . The details are discussed in the following three sections . 3.1 RELAXATION USING WASSERSTEIN DISTANCE In this section , we show the following relaxation from norm-based constraint sets into W-distancebased constraint sets for general smoothing measures as well as Gaussian smoothing measure . Dx , , q = { x′ + µ : ||x− x′||q ≤ } ⊆ { ν : Wp ( x+ µ , ν ) ≤ δ } = Dx , δ , p . ( 7 ) 3.1.1 GENERAL PROBABILITY MEASURE Here , we want to find a δq ( ) such that Dx , , q = { x′ + µ : ||x− x′||q ≤ } ⊆ { ν : Wp ( x+ µ , ν ) ≤ δq ( ) } = Dx , δq ( ) , p for all µ ∈ P ( X ) . ( 8 ) Theorem 3.1 . For all x ∈ Rd , > 0 , q > 0 , norm-based constraint set Dx , , q can be relaxed into W-distance-based constraint set Dx , δq ( ) , p with radius δq ( ) = max { , d 1 2− 1 q } which can be formulated as Dx , , q ⊆ { ν : Wp ( x+ µ , ν ) ≤ max { , d 1 2− 1 q } } : = D x , max { , d 1 2 − 1 q } , p ( 9 ) And this relaxation radius max { , d 1 2− 1 q } works for any Wasserstein distance parameter p > 0 as well as any smoothing measure µ . Note that for lq ( q ≤ 2 ) adversarial perturbations , the relaxed radius avoids the influence of dimension d , whereas for lq ( q > 2 ) adversarial perturbations , as q increases , 12 − 1 q increases from 0 to 1 2 correspondingly . The fact that the radius of Wq-distance constraint set grows with order Θ ( d 1 2− 1 q ) provides us with an intuition that it is increasingly harder to bound Dx , , q with larger q , therefore , W-distance-relaxation works better for lq ( q ≤ 2 ) norm perturbation . And this relaxation radius is tight for W2 distance and Gaussian smoothing measures which is proved in the appendix D and therefore shows that W2-distance-relaxation works well for Gaussian smoothing measure . 3.2 RELAXATION USING TOTAL VARIANCE DISTANCE In this section , we show the following relaxation from norm-based constraint sets into TV-distancebased constraint sets for Gaussian and uniform smoothing measures . Dx , , q = { x′ + µ : ||x− x′||q ≤ } ⊆ { ν : TV ( x+ µ , ν ) ≤ ξ } = Dx , ξ ( 10 ) 3.2.1 GAUSSIAN PROBABILITY MEASURE Here , we want to find a ξ ( ) for Gaussian measure µ = N ( 0 , σ2I ) such that Dx , , q = { x′ + µ : ||x− x′||q ≤ } ⊆ { ν : TV ( x+ µ , ν ) ≤ ξ ( ) } = Dx , ξ ( ) . ( 11 ) The magnitude of ξ ( ) is given by the following theorem . Theorem 3.2 . For Gaussian probability measure µ = N ( 0 , σ2I ) on Euclidean space Rd and for all x ∈ R , > 0 , q > 0 , norm-based constraint set Dx , , q can be relaxed into TV-distance-based con- straint setDx , ξ ( ) with radius ξ ( ) = 2G ( max { , d 12− 1q } 2σ ) −1 whereG is the cumulative distribution function for standard normal distribution N ( 0 , 1 ) which can be formulated as Dx , , q ⊆ { ν : TV ( x+ µ , ν ) ≤ 2G ( max { 2σ , d 1 2− 1 q 2σ } ) − 1 } . ( 12 ) This theorem theoretically shows that TV distance relaxation works effectively for lq ( q ≤ 2 ) perturbation due to the irrelevance of the radius to dimension d and increasingly bad for lq ( q > 2 ) perturbation because of the dependence of the radius to dimension d as order Θ ( d 1 2− 1 q ) . 3.2.2 UNIFORM PROBABILITY MEASURE Here , we want to find a ξ ( ) for uniform measure µ = U ( K ) , where K is a specific convex compact set , with density function fK ( x ) = 1Vol ( K ) Ix∈K such that Dx , , q = { x′ + µ : ||x− x′||q ≤ } ⊆ { ν : TV ( x+ µ , ν ) ≤ ξ ( ) } = Dx , ξ ( ) . ( 13 ) In this paper , we mainly focus on the case when K is lp-norm ball centered at original point O with radius r , i.e. , K = Bp ( O , r ) . We give following theorems about special cases when p = 1 , 2 , ∞ . Theorem 3.3 . When K is an l1 norm ball centered at O with radius r , for uniform probability measure U ( K ) on Euclidean space Rd , we have Dx , , q \ { ν : TV ( x+ µ , ν ) ≤ 1− δ } 6= ∅ for all q > 1 and arbitrarily small δ > 0 , ( 14 ) when ≥ 2rd 1 q−1 . Note that ≥ 2r√ d which decays with order Θ ( d− 1 2 ) for q = 2 and ≥ 2rd which decays with order Θ ( d−1 ) for q =∞ . This theorem theoretically shows that for uniform smoothing measures with l1 ball support set , and total variance distance failed to relax measure set Dx , , q effectively when q = 2 , ∞ . And this will consequently lead to bad performance for l2 and l∞ robustness certification task , which can be seen from the following section discussing the importance of TV-distance-based relaxation radius . Theorem 3.4 . When K is an l2 ( Euclidean ) ball centered at O with radius r , for uniform probability measure U ( K ) on Euclidean space Rd and for all x ∈ R , > 0 , q > 0 , when > min { 2r , 2rd 1 q− 1 2 } , norm-based constraint set Dx , , q failed to be relaxed into TV-distancebased constraint set which can be formulated as Dx , , q \ { ν : TV ( x+ µ , ν ) ≤ 1− δ } 6= ∅ for all q > 1 and arbitrarily small δ > 0 . ( 15 ) And when ≤ min { 2r , 2rd 1 q− 1 2 } , norm-based constraint set Dx , , q can be relaxed into valid TVdistance-based constraint set Dx , ξ ( ) with radius ξ ( ) = 1− ∫ arccos ( max { , d 12− 1q } 2r ) 0 sin n ( t ) dt∫ π 2 0 sin n ( t ) dt which can be formulated as Dx , , q ⊆ { ν : TV ( x+ µ , ν ) ≤ 1− ∫ arccos ( max { , d 12− 1q } 2r ) 0 sinn ( t ) dt∫ π 2 0 sinn ( t ) dt } . ( 16 ) This theorem shows that for uniform smoothing measures with l2 ball support set , when q ≤ 2 , relaxation radius is independent of dimension d , whereas when q > 2 relaxation radius starts to be bound up with dimension d and the impact of d grows as q increases . To put it another way , total variance distance relaxation performs well for uniform smoothing measures with l2 ball support set when q ≤ 2 and increasingly poor when q > 2 . Theorem 3.5 . When K is an l∞ cube centered at O with radius r , for uniform probability measure U ( K ) on Euclidean space Rd and for all x ∈ R , > 0 , q > 0 , when > 2r , norm-based constraint set Dx , , q failed to be relaxed into TV-distance-based constraint set which can be formulated as Dx , , q \ { ν : TV ( x+ µ , ν ) ≤ 1− δ } 6= ∅ for all q > 0 and arbitrarily small δ > 0 . ( 17 ) And when ≤ 2r , norm-based constraint set Dx , , q can be relaxed into valid TV-distance-based constraint set Dx , ξ ( ) . When q = 1 , ξ ( ) can be taken as 2r , which can be formulated as Dx , ,1 ⊆ { ν : TV ( x+ µ , ν ) ≤ 2r } . ( 18 ) When q = 2 , ξ ( ) can be taken as 1− ( 1− 2d 1 2 r ) d when 0 < ≤ 2tnr where √ n−1 n ≤ tn < 1 and tn approaches 1 at an exponential rate , which can be formulated as Dx , ,2 ⊆ { ν : TV ( x+ µ , ν ) ≤ 1− ( 1− 2d 1 2 r ) d } ≈ { ν : TV ( x+ µ , ν ) ≤ 1− e− 2r d 12 } , ( 19 ) ξ ( ) can be taken as 1 − ( d−1+ √ d ( 2r ) 2−d+1 d ) d−1 ( 1−√d ( 2r ) 2−d+1 d ) when 2tnr < < 2r , which can be formulated as Dx , ,2 ⊆ { ν : TV ( x+ µ , ν ) ≤ 1− ( d− 1 +√d ( 2r ) 2 − d+ 1 d ) d−1 ( 1−√d ( 2r ) 2 − d+ 1 d ) } . ( 20 ) When q =∞ , ξ ( ) can be taken as 1− ( 1− 2r ) d , which can be formulated as Dx , , ∞ ⊆ { ν : TV ( x+ µ , ν ) ≤ 1− ( 1− 2r ) d } . ( 21 ) As for uniform smoothing measures with l∞ cube support set , this theorem shows that the performance towards l1 perturbation turns out to be fine since TV distance relaxation radius 2r has nothing to do with dimension d and the dimensional curse is avoided . However , in this case , TV distance relaxation shows incapability to cope with l2 and l∞ perturbation in some extent due to the rate of increasing radius tending to 1 as Θ ( ed 1 2 ) and Θ ( ed ) . After discussing the special cases when K is an l∞ cube or an l2 Euclidean ball , we then consider the general case when K is an lp ball centered at the original point with radius r and give a lower bound for TV distance relaxation radius in the following theorem . Theorem 3.6 . When K is an lp ball centered at O with radius r , for uniform probability measure U ( K ) on Euclidean space Rd and assume norm-based constraint set Dx , , q can be relaxed into TV-distance-based constraint set Dx , ξ ( ) , then ξ ( ) ≥ 2 ∫ d 1p 4r ( pe ) 1 p Γ ( 1+ 1 p ) 0 exp ( 1 p − e ( 2xΓ ( 1 + 1 p ) ) p ) dx for all perturbation norm parameter q > 0 with high probability when d is sufficiently large , which can be formulated as Dx , , q \ { ν : TV ( x+ µ , ν ) ≤ 2 ∫ d 1p 4r ( pe ) 1 p Γ ( 1+ 1 p ) 0 exp ( 1 p − e ( 2xΓ ( 1 + 1 p ) ) p ) dx− δ } 6= ∅ ( 22 ) for arbitrarily small δ > 0 . Figure 1 : Graph of density function f ( x ) = exp ( 1 p − e ( 2 pΓ ( 1 p ) ) pxp ) when p = 2 , 4 , 6 from left to right A way to interpret this theorem is that as p increases and K correspondingly translates from l1 norm cross-polytope into l∞ norm cube , the dependence of integral upper limit d 1 p 4r ( pe ) 1 p Γ ( 1+ 1p ) on dimension d is gradually reduced , which theoretically shows by taking all kinds of lq perturbations into consideration , in average scale U ( Bp ( O , r ) ) tends to perform better than U ( Bq ( O , r ) ) where p > q . Nevertheless , note that the curse of dimension is unavoidable when we use uniform smoothing measure U ( K ) with bounded support set . Note the graphs of density function shown in Figure 1 when p = 2 , 4 , 6 , we know that as p increases , the density curve is increasingly short , fat , and light-tailed . From another perspective , we consider a ball with a fixed radius r. As the dimension d of the base Euclidean space increases , fixed proportion of mass concentrates within a slab of width Θ ( d− 1 p ) . Thus , intuitively , it is increasingly difficult to bound the perturbed measure set Dx , , q by using TV distance and certify as dimension d enlarge due to the existence of TV-relaxation upper bound in the dual optimization problem . 3.3 VERIFYING FULL-INFORMATION ROBUST CERTIFICATION Based on the above analysis , in this section , we are now prepared to compute the Lagrange function and dual problem of the relaxed optimization problem OPT ( φ , x + µ , Dx , δ , p ∩ Dx , ξ ) . Here we mainly focus on the case when reference measure ρ = x+µ and perturbed probability measure ν are absolutely continuous w.r.t . Lebesgue measure λ on Rd , i.e. , ρ , ν λ and discard uncommon cases when ρ , ν are discrete , single or mixed w.r.t . λ . Since ρ , ν λ , assume the density function of ρ and ν w.r.t . Lebesgue measure λ are f ( x ) and g ( x ) , x ∈ Rd respectively . Instead of using likelihood ratio r ( x ) , we consider the difference between g ( x ) and f ( x ) and define it as q ( x ) : = g ( x ) − f ( x ) . The objective function EX∼ν [ φ ( X ) ] of optimization problem OPT ( φ , ρ , D ) can be rewritten in terms of difference function q ( x ) . And we give the theorems below . Theorem 3.7 ( Wp distance relaxation with 0 < p ≤ 1 ) . The relaxed optimization problem OPT ( φ , x+ µ , Dx , δ , p ∩Dx , ξ ) is equivalent to the convex optimization problem with only one functional variable as below inf q∈L1 ( X ) ∫ X φ ( x ) q ( x ) dx+ EX∼x+µ [ φ ( X ) ] , s.t . sup ||f ||L , p≤1 ∫ f ( x ) q ( x ) dx ≤ δ , ∫ |q ( x ) |dx ≤ 2ξ ( 23 ) where ||f ||L , p : = supx , y∈Rd , x 6=y |f ( x ) −f ( y ) | ||x−y||p2 . Theorem 3.8 ( Wp distance relaxation with p > 1 ) . When smoothing measure µ possesses a convex compact support setK andR : = supy∈K ||y||2 , R∗ : = ||x||2+R+max { , d 1 2− 1 q } , the relaxed optimization problemOPT ( φ , x+µ , Dx , δ , p∩Dx , ξ ) can be further relaxed into the convex optimization problem with only one functional variable below inf q∈L1 ( X ) ∫ X φ ( x ) q ( x ) dx+ EX∼x+µ [ φ ( X ) ] , ( 24 ) s.t . sup ||f ||L≤p ( 2R∗ ) p−1 ∫ f ( x ) q ( x ) dx ≤ δp + ( p− 1 ) ( 2R∗ ) p−1 , ∫ |q ( x ) |dx ≤ 2ξ , where ||f ||L : = supx , y∈Rd , x 6=y |f ( x ) −f ( y ) | ||x−y||2 . Theorem 3.9 . The Lagrange function of optimization problem in ( 23 ) and ( 24 ) is L ( λ ) = EX∼x+µ [ φ ( X ) ] − 2ξ − λC , ( 25 ) Smoothing Measure Perturbation Certification Objective Prerequisite U ( B2 ( O , r ) ) lq ( q ≤ 2 ) EX∼x+µ [ φ ( X ) ] − 2 ( 1− ∫ arccos ( 2r ) 0 sin n ( t ) dt∫ π 2 0 sin n ( t ) dt ) ≤ 2r lq ( q > 2 ) EX∼x+µ [ φ ( X ) ] − 2 ( 1− ∫ arccos ( d 12− 1q 2r ) 0 sin n ( t ) dt∫ π 2 0 sin n ( t ) dt ) ≤ 2rd 1 q− 1 2 U ( B∞ ( O , r ) ) l1 EX∼x+µ [ φ ( X ) ] − r ≤ 2r l2 EX∼x+µ [ φ ( X ) ] − 2 ( 1− ( 1− 2d 1 2 r ) d ) ≤ 2tnr l∞ EX∼x+µ [ φ ( X ) ] − 2 ( 1− ( 1− 2r ) d ) ≤ 2r N ( 0 , σ2I ) lq ( q ≤ 2 ) EX∼x+µ [ φ ( X ) ] − 2 ( 2G ( 2σ ) − 1 ) - lq ( q > 2 ) EX∼x+µ [ φ ( X ) ] − 2 ( 2G ( d 1 2 − 1 q 2σ ) − 1 ) - Table 1 : Certification objectives and prerequisites . where λ ≥ 0 is the dual variable w.r.t . constraint sup||f ||L≤1 ∫ f ( x ) q ( x ) dx ≤ δ or constraint sup||f ||L≤p ( 2R∗ ) p−1 ∫ f ( x ) q ( x ) dx ≤ δp + ( p− 1 ) ( 2R∗ ) p−1 and C : = δ when 0 < p ≤ 1 whereas C : = δp + ( p− 1 ) ( 2R∗ ) p−1 when p > 1 . Using the duality result , we know the optimal value in ( 23 ) can be obtained by computing max λ≥0 EX∼x+µ [ φ ( X ) ] − ξ − λC = EX∼x+µ [ φ ( X ) ] − ξ , ( 26 ) which is only related to the radius ξ of TV distance relaxation set . We can see from this formula the significance of TV distance relaxation radius . By plugging the TV distance relaxation radius given in theorem 3.4 , 3.5 and 3.2 in dual optimization problem , we obtain the certification objective in Table 1 and we return certified for lp norm perturbation with magnitude if the objective function has non-negative value . 3.4 RELATIONSHIP WITH PREVIOUS WORK By applying our methodology to Gaussian probability measure , we miraculously obtain the same certified robustness properties provided in Dvijotham et al . ( 2020 ) using as Hockey-stick divergence with β = 1 . Theorem 3.10 . When smoothing measure is taken as Gaussian probability measure , the certificate EX∼x+µ [ φ ( X ) ] −2 ( 2G ( 2σ ) −1 ) given in our paper is equivalent to the certificate HS,1 ≤ [ θa−θb2 ] + given in paper Dvijotham et al . ( 2020 ) . Therefore , when applying both methodologies to Gaussian measure , the formulas obtained are theoretically equivalent . Despite the similarity in analyzing Gaussian measure , our work covers cases with bounded support sets , which is our main contribution . 4 EXPERIMENTS For adversarial robustness certification , we choose the test set certified accuracy as our metric of interest , which is defined as the percentage of data points in the test set that can be correctly classified and can also pass the robustness certification within an l2 ball of an assigned radius r. To pass the robustness certification at data point x , the classification results of all points within an l2 distance to the original point x must be consistent . For a model using the smoothing method , the classification result of a data point is the class with the highest score in the smoothed data distribution , not to be confused with the direct output of the base classifier at that data point . In all experiments , the certification process on the test set with assigned perturbation l2 radius is shown in the following Algorithm 1 . Note that the cert ( scorea , 1− scorea , r ) function returns true if the certification objective is non-negative , otherwise it returns false . Such objective is calculated using formulas in Table 1 with l2 perturbation and corresponding smoothing distribution . Since our method using Wasserstein distance does not involve iterations , our certification procedure only costs constant computation time , which is much faster than Dvijotham et al . ( 2020 ) . Algorithm 1 Certification process Input : T : test set , gt ( x ) : true class of image x , f ( x ) : base classifier , D ( x ) : smoothing distribution , n : sample amount , r : perturbation radius Output : acc : test set certified accuracy 1 : certCount← 0 , allCount← 0 2 : for all x ∈ T do 3 : S ← { n samples from D ( x ) } 4 : countc ← 0 for every class c 5 : for all x′ ∈ S do 6 : countf ( x′ ) ← countf ( x′ ) + 1 7 : end for 8 : scorec ← countccard ( S ) for every class c 9 : a← arg maxc { scorec } 10 : if a = gt ( x ) ∧ cert ( scorea , 1− scorea , r ) then 11 : certCount← certCount+ 1 12 : end if 13 : allCount← allCount+ 1 14 : end for 15 : return acc← certCountallCount We achieve identical results when comparing our W-distance method with the F-divergence method in Dvijotham et al . ( 2020 ) using Gaussian distribution and with specific metric parameter settings , which is proved possible in Section 3.4 . However , there is no previous work done yet to examine the usage of uniform distribution when smoothing , so we mainly focus on comparing Gaussian , l2 and l∞ uniform distribution all using our W-distance method . 4.1 SETUPS We choose CIFAR-10 as our dataset and ResNet-110 as our base classifier . We firstly train the base classifier on the 50000 image training set without smoothing and achieve 89.6 % prediction accuracy on the 10000 image test set . Then we run the certification process on the test set with incremental perturbation radius r. We test out different smoothing distributions as mentioned above , and we change the parameters of such distributions to illustrate the effect of different distributions further . We also try increasing the smoothing sample amount to examine the trade-off between performance and accuracy improvement . All training , testing , and certification are run on an NVIDIA RTX 3090 . 4.2 W-DISTANCE METHOD WITH DIFFERENT SMOOTHING DISTRIBUTIONS We firstly implement our W-distance method with N ( x , 0.05 ) as smoothing distribution and sample amount n=100 , and then we change the variance of the Gaussian distribution to 0.025 and 0.1 . As shown in Figure 2 , there is a neat cut-off for each setting where the perturbation gets too big , and no data point can pass the certification at this point . By changing the variance of the smoothing distribution , we observe a clear trend that the increase of variance leads to a drop of initial certification accuracy but also stronger robustness that can endure more significant perturbation , and the decrease of the variance leads to the opposite change accordingly . Next , for smoothing process , we substitute Gaussian distribution with l2 or l∞ uniform distribution , with the norm range set to 0.025 , 0.05 and 0.1 . In Figure 2 , both experiment results show identical characteristics as with Gaussian distribution , but they bring along a critical issue , the mismatch of the perturbation radius ’ s magnitude . Comparing the perturbation radius at the cut-off point , we find that the radius of Gaussian distribution is about 50 times larger than that of two uniform distributions . We assume that this phenomenon is caused by the lack of intersection of the smoothing distributions before and after perturbation . For Gaussian distribution , there is always an intersection no matter how big the perturbation radius gets , but two uniform distributions will separate quickly and become disjoint under perturbation . Furthermore , the dimension of a 32× 32× 3 image is 3072 , the square root of which is around 55.4 , very close to the cut-off radius ’ s 50 times ratio difference . Such correlation may trace to the involvement of dimension when calculating the finite support set volume of l2 and l∞ uniform distribution , while the support set volume of Gaussian distribution is infinitely large . We conjecture that such deficiency is inherent when using the uniform distribution , which can hardly be further improved . 4.3 W-DISTANCE METHOD WITH DIFFERENT SAMPLING AMOUNTS When calculating scores for each class in the smoothing process , as we can not classify all possible data points , we shall only acquire approximate scores by sampling from the smoothed data distribution . Thus such scores may differ in multiple runs due to the randomness of sampling . However , through our experiments , we find that with a certain amount of samples , we can already obtain sufficiently accurate scores , which can not be significantly improved by increasing the sample amount . We set the sample amount n to 100 , 1000 , and 10000 with three different smoothing distributions , and they all obtain similar results : it takes only 10 minutes to run through the 10000 images test set with 100 samples for each image , 30 minutes with 1000 samples and 3 hours with excessive 10000 samples . It is ten times faster than the 2 hours running time with the iteration-based method in Dvijotham et al . ( 2020 ) using just 100 samples . It is also worth noting in Figure 3 that by increasing the sample amount , no significant improvement is observed with Gaussian distribution . However , there is minor progress made with both uniform distributions when the samples are getting overly abundant . We assume that the extra samples make up for the lack of intersections of smoothing uniform distributions before and after the perturbation , while Gaussian distribution has no such issues . 5 CONCLUSION We have introduced a framework based on Wasserstein distance and total variance distance relaxation as well as Lagrange duality . This methodology is able to deal with the analysis of bounded support set smoothing measures , which is not covered by previous work . Moreover , we have analyzed the performance of specific smoothing measures , including Gaussian probability measure and uniform probability measures with support set B2 ( O , r ) , B∞ ( O , r ) theoretically and experimentally , which shows the relative incapability of bounded support set smoothing measures compared with Gaussian smoothing measure . REFERENCES Anish Athalye , Nicholas Carlini , and David Wagner . Obfuscated gradients give a false sense of security : Circumventing defenses to adversarial examples . In ICML , 2018 . Avrim Blum , Travis Dick , Naren Manoj , and Hongyang Zhang . Random smoothing might be unable to certify l∞ robustness for high-dimensional images . Journal Of Machine Learning Research , 2020 . Jeremy Cohen , Elan Rosenfeld , and Zico Kolter . Certified adversarial robustness via randomized smoothing . In ICML , 2019 . Francesco Croce and Matthias Hein . Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks . In ICML , 2020 . D.C Dowson and B.V Landau . The fréchet distance between multivariate normal distributions . Journal of Multivariate Analysis , 1982 . Krishnamurthy Dj Dvijotham , Jamie Hayes , Borja Balle , Zico Kolter , Chongli Qin , Andras Gyorgy , Kai Xiao , Sven Gowal , and Pushmeet Kohli . A framework for robustness certification of smoothed classifiers using f-divergences . In ICLR , 2020 . Aounon Kumar , Alexander Levine , Tom Goldstein , and Soheil Feizi . Curse of dimensionality on randomized smoothing for certifiable robustness . In ICML , 2020 . Guang-He Lee , Yang Yuan , Shiyu Chang , and Tommi S Jaakkola . Tight certificates of adversarial robustness for randomly smoothed classifiers . arXiv preprint arXiv:1906.04948 , 2019 . Bai Li , Changyou Chen , Wenlin Wang , and Lawrence Carin . Certified adversarial robustness with additive noise . arXiv preprint arXiv:1809.03113 , 2018 . Aleksander Madry , Aleksandar Makelov , Ludwig Schmidt , Dimitris Tsipras , and Adrian Vladu . Towards deep learning models resistant to adversarial attacks . In ICLR , 2018 . Anh Nguyen , Jason Yosinski , and Jeff Clune . Deep neural networks are easily fooled : High confidence predictions for unrecognizable images . In Proceedings of the IEEE conference on computer vision and pattern recognition , 2015 . Christian Szegedy , Wojciech Zaremba , Ilya Sutskever , Joan Bruna , Dumitru Erhan , Ian Goodfellow , and Rob Fergus . Intriguing properties of neural networks . arXiv preprint arXiv:1312.6199 , 2013 . Matthew Thorpe . Introduction to optimal transport , 2018 . Lily Weng , Huan Zhang , Hongge Chen , Zhao Song , Cho-Jui Hsieh , Luca Daniel , Duane Boning , and Inderjit Dhillon . Towards fast computation of certified robustness for relu networks . In ICML , 2018 . Eric Wong and Zico Kolter . Provable defenses against adversarial examples via the convex outer adversarial polytope . In ICML , 2018 . Kai Y Xiao , Vincent Tjeng , Nur Muhammad Shafiullah , and Aleksander Madry . Training for faster adversarial robustness verification via inducing relu stability . arXiv preprint arXiv:1809.03008 , 2018 . Huan Zhang , Hongge Chen , Chaowei Xiao , Sven Gowal , Robert Stanforth , Bo Li , Duane Boning , and Cho-Jui Hsieh . Towards stable and efficient training of verifiably robust neural networks . arXiv preprint arXiv:1906.06316 , 2019 . A OPTIMAL TRANSPORT THEORY Assume µ , ν ∈ P ( Rd ) . Besides , assume µ , ν are absolutely continuous w.r.t . Lebesgue measure λ and let density functions be f and g. Definition 2 ( Push Forward ) . If T : Rd → Rd , then the distribution of T ( X ) is called the pushforward of P , denoted by T # P . In other words , T # P ( A ) = P ( T ( x ) ∈ A ) = P ( T−1 ( A ) ) Definition 3 ( Optimal Distance , Optimal Transport Map ) . The Monge version of the optimal transport distance is inf T : T # P=Q ∫ ||x− T ( x ) ||pdP ( x ) ( 27 ) A minimizer T ∗ , if one exists , is called the optimal transport map . Definition 4 ( Wasserstein Distance , Earth Mover Distance , Optimal Transport Plan ) . Let Γ ( µ , ν ) denote all joint distributions γ for ( X , Y ) that have marginals µ and ν . Then the Wasserstein distance is Wp ( µ , ν ) = ( inf γ∈Γ ( µ , ν ) ∫ ||x− y||p2dγ ( x , y ) ) 1 p where p ≥ 1 ( 28 ) When p = 1 , this is also called the Earth Mover distance . The minimizer γ∗ ( which does exist ) is called the optimal transport plan . Lemma A.1 ( Dual Formulation of Wasserstein Distance When p ≤ 1 ) . It can be shown that W pp ( µ , ν ) = sup ψ , φ ∫ ψ ( y ) dν ( y ) − ∫ φ ( x ) dµ ( x ) ( 29 ) where ψ ( y ) − φ ( x ) ≤ ||x− y||p . In the special case when p = 1 , we have the very simple representation W1 ( µ , ν ) = sup ϕ∈F1 ∫ ϕ ( x ) dµ ( x ) − ∫ ϕ ( x ) dν ( x ) = sup ϕ∈F1 ∫ ϕ ( x ) d ( µ−ν ) ( x ) = sup ϕ∈F1 ∫ ϕ ( x ) ( f−g ) ( x ) dx ( 30 ) where F1 denotes all maps from Rd to R such that |f ( x ) − f ( y ) | ≤ ||x− y|| for all x , y . In the case when 0 < p < 1 , we have similar simple representation Wp ( µ , ν ) = sup ϕ∈Fp ∫ ϕ ( x ) dµ ( x ) − ∫ ϕ ( x ) dν ( x ) = sup ϕ∈Fp ∫ ϕ ( x ) d ( µ−ν ) ( x ) = sup ϕ∈Fp ∫ ϕ ( x ) ( f−g ) ( x ) dx ( 31 ) where Fp denotes all maps from Rd to R such that |f ( x ) − f ( y ) | ≤ ||x− y||p for all x , y. Lemma A.2 ( Dual Formulation of Wasserstein Distance When 1 < p < ∞ ) . In the case when 1 < p < ∞ and the support sets of measure µ and ν are included in a convex compact set K. Define R = supx∈K ||x||2 , then we have slightly different dual formulation Wp ( µ , ν ) ≥ ( sup ϕ∈Lip ( p ( 2R ) p−1 ) ∫ ϕ ( y ) d ( ν − µ ) ( y ) − ( p− 1 ) ( 2R ) p−1 ) 1 p = ( sup ϕ∈Lip ( p ( 2R ) p−1 ) ∫ ϕ ( y ) ( g − f ) ( y ) dy − ( p− 1 ) ( 2R ) p−1 ) 1 p ( 32 ) where Lip ( p ( 2R ) p−1 ) denotes all maps f from Rd to R such that |f ( x ) −f ( y ) | ≤ p ( 2R ) p−1||x−y|| for all x , y ∈ K. Definition 5 ( Total Variation Distance ) . The total variation distance between two probability distribution µ and ν on Rd is defined by ||µ− ν||TV = max { |µ ( A ) − ν ( A ) | : A ⊆ Rd } ( 33 ) whereRd is the set of all Borel subsets . Lemma A.3 . Let µ and ν be two probability distributions on Rd and absolutely continuous w.r.t . Lebesgue measure λ . Assume the density function of measure µ and ν w.r.t . λ are f ( x ) and g ( x ) . Then , ||µ− ν||TV = 1 2 ∫ Rd ∣∣f ( x ) − g ( x ) ∣∣dx ( 34 ) B PROOF OF LEMMA A.2 Recall the dual form of Wasserstein distance W pp ( µ , ν ) = sup ψ , φ∈C ( Rd ) ∫ ψ ( y ) dν ( y ) − ∫ φ ( x ) dµ ( x ) ( 35 ) where ψ ( y ) − φ ( x ) ≤ ||x− y||p . For simplicity of the proof , consider equivalent form W pp ( µ , ν ) = sup ψ , φ∈C ( Rd ) ∫ ψ ( y ) dν ( y ) + ∫ φ ( x ) dµ ( x ) ( 36 ) where ψ ( y ) − φ ( x ) ≤ ||x− y||p . First , we introduce a theorem in Thorpe ( 2018 ) Theorem B.1 ( Existence of a Maximiser to the Dual Problem ) . Let µ ∈ P ( X ) , ν ∈ P ( Y ) , where X and Y are polish , and c : X × Y → [ 0 , +∞ ) . Assume that there exists cX ∈ L1 ( µ ) , cY ∈ L1 ( ν ) such that c ( x , y ) ≤ cX ( x ) + cY ( y ) for µ-almost every x ∈ X and ν-almost every y ∈ Y . In addition , assume that M : = ∫ X cX ( x ) dµ ( x ) + ∫ Y cY ( y ) dν ( y ) < ∞ ( 37 ) Then there exists ( ϕ , ψ ) ∈ Φc = { ( ϕ , ψ ) ∈ L1 ( µ ) × L1 ( ν ) : ϕ ( x ) + ψ ( y ) ≤ c ( x , y ) } where the inequality is understood to hold for µ-almost every x ∈ X and ν-almost every y ∈ Y such that sup Φc J = J ( ϕ , ψ ) ( 38 ) where J is defined by J : L1 ( µ ) × L1 ( ν ) → R , J ( ϕ , ψ ) = ∫ X ϕdµ + ∫ Y ψdν . Futhermore we can choose ( ϕ , ψ ) = ( ηcc , ηc ) for some η ∈ L1 ( µ ) . For η : X → R̄ , the c-transforms ηc , ηcc are defined by ηc : Y → R̄ , ηc ( y ) = inf x∈X ( c ( x , y ) − η ( x ) ) ( 39 ) ηcc : Y → R̄ , ηcc ( y ) = inf x∈X ( c ( x , y ) − ηc ( x ) ) ( 40 ) Lemma B.1 . For a , b ∈ R and 1 ≤ p < ∞ , |a+ b|p ≤ 2p−1 ( |a|p + |b|p ) ( 41 ) Proof . First , it ’ s easy to verify the cases when either of a = 0 , b = 0 , p = 1 holds . Then , Wlog , assume a , b ∈ R+ |a+ b|p ≤ 2p−1 ( |a|p + |b|p ) ⇐⇒ ( a+ b ) p ≤ 2p−1 ( ap + bp ) ⇐⇒ 2p−1 ( ( a a+ b ) p + ( b a+ b ) p ) ≥ 1 ⇐⇒ 2p−1 [ xp + ( 1− x ) p ] ≥ 1 , ∀x ∈ ( 0 , 1 ) where the last inequality is easy to verify . In our case , c ( x , y ) = ||x− y||p ≤ ( ||x||+ ||y|| ) p ≤ 2p−1 ( ||x||p + ||y||p ) and the requirement that M < ∞ is exactly the condition that µ and ν have finite pth moments which is easy to verify by noting that supp ( µ ) = supp ( ν ) = K is compact set in Rd . Then , according to the theorem , there exists η ∈ L1 ( µ ) such that W pp ( µ , ν ) = sup η∈L1 ( µ ) ∫ ηc ( y ) dν ( y ) + ∫ ηcc ( x ) dµ ( x ) ( 42 ) Note that ηc possesses Lipschitz continuous property stated below Lemma B.2 . For η ∈ L1 ( K ) where K ⊆ Rd is a convex compact set , then ηcp is a p ( 2R ) p−1Lipschitz function where R : = supx∈K ||x|| and cp ( x , y ) = ||x− y||p , i.e. , ||ηcp ( x ) − ηcp ( y ) || ≤ p ( 2R ) p−1||x− y|| , x , y ∈ K ( 43 ) Proof . |ηcp ( x ) − ηcp ( y ) | = ∣∣∣ inf z1∈K ( ||x− z1||p − η ( z1 ) ) − inf z2∈K ( ||y − z2||p − η ( z2 ) ) ∣∣∣ ( 44 ) = ∣∣∣ inf z1∈K sup z2∈K ( ( ||x− z1||p − ||y − z2||p ) − ( η ( z1 ) − η ( z2 ) ) ) ∣∣∣ ≤ sup z∈K ∣∣∣ ( ||x− z||p − η ( z ) ) − ( ||y − z||p − η ( z ) ) ∣∣∣ ( 45 ) = sup z∈K ∣∣||x− z||p − ||y − z||p∣∣ where 44 is due to the definition of c-transform ; 45 is obtained by taking a specific value of z1 as z2 . Note that K is a compact set and ∣∣||x− z||p− ||y− z||p∣∣ is a continuous function w.r.t . z , then there exists a point z∗ such that ∣∣||x− z∗||p − ||y− z∗||p∣∣ = supz∈K ∣∣||x− z||p − ||y− z||p∣∣ . According to the first order condition , z∗ satisfies the equation below ∇z ( ||x− z||p − ||y − z||p ) = ∇z||x− z||p −∇z||y − z||p = ∇z||z − x||p −∇z||z − x||p = p||z − x|| p 2−1 ( z − x ) > − p||z − y|| p 2−1 ( z − y ) > = 0 ( 46 ) =⇒||z − x|| p 2−1 ( z − x ) > = ||z − y|| p 2−1 ( z − y ) > =⇒ ( ||z − x|| p 2−1 − ||z − y|| p 2−1 ) z > = ||z − x|| p 2−1x > − ||z − y|| p 2−1y > =⇒z = ||z − x|| p 2−1 ||z − x|| p2−1 − ||z − y|| p2−1 x− ||z − y|| p 2−1 ||z − x|| p2−1 − ||z − y|| p2−1 y where 46 is due to ∇x||x||p = ∇x ( x > x ) p 2 = p ( x > x ) p 2−1x > = p||x|| p 2−1x > . And this equation shows that z∗ lie on the line determined by x and y but does not lies on the part between x and y , which can be formulated as z∗ = λx+ ( 1− λ ) y , λ ∈ R \ ( 0 , 1 ) . Note that sup λ∈R\ ( 0,1 ) ∣∣∣||x− ( λx+ ( 1− λ ) y ) ||p − ||y − ( λx+ ( 1− λ ) y ) ||p∣∣∣ = sup λ∈R\ ( 0,1 ) ∣∣∣|| ( 1− λ ) ( x− y ) ||p − ||λ ( y − x ) ||p∣∣∣ = sup λ∈R\ ( 0,1 ) ∣∣∣|1− λ|p − |λ|p∣∣∣ · ||x− y||p = ( sup λ∈R\ ( 0,1 ) ∣∣∣|1− λ||p − |λ|p∣∣∣ ) · ||x− y||p Then , we just need to optimize sup λ∈R\ ( 0,1 ) ∣∣∣|1− λ|p − |λ|p∣∣∣ s.t . λx+ ( 1− λ ) y ∈ K Note that we can relax the constraint as below λx+ ( 1− λ ) y ∈ K ⇐⇒ λ ( x− y ) + y = ( 1− λ ) ( y − x ) + x ∈ K =⇒||λ ( x− y ) + y|| = || ( 1− λ ) ( y − x ) + x|| ≤ R ( 47 ) =⇒||λ ( x− y ) || ≤ R+ ||y|| , || ( 1− λ ) ( y − x ) || ≤ R+ ||x|| ( 48 ) =⇒|λ| · ||x− y|| ≤ 2R , |1− λ| · ||x− y|| ≤ 2R ( 49 ) =⇒1− 2R ||x− y|| ≤ λ ≤ 2R ||x− y|| where 47 and 49 is due to the definition of R as supx∈K ||x|| ; 48 is due to triangular inequality . Using the relaxed constraint , we can show that when λ ≥ 1 , ∣∣∣|1−λ|p− |λ|p∣∣∣ = λp− ( λ− 1 ) p is an increasing function w.r.t . λ as p ≥ 1 , then∣∣∣|1− λ|p − |λ|p∣∣∣ = λp − ( λ− 1 ) p ≤ ( 2R||x− y|| ) p − ( 2R ||x− y|| − 1 ) p ( 50 ) And when λ ≤ 0 , ∣∣∣|1 − λ|p − |λ|p∣∣∣ = ( 1 − λ ) p − ( −λ ) p is a decreasing function w.r.t λ as p ≥ 1 , then ∣∣∣|1− λ|p − |λ|p∣∣∣ = ( 1− λ ) p − ( −λ ) p ≤ ( 2R||x− y|| ) p − ( 2R ||x− y|| − 1 ) p ( 51 ) Note that ( 2R ||x− y|| ) p − ( 2R ||x− y|| − 1 ) p = p ( k · ( 2R ||x− y|| ) + ( 1− k ) · ( 2R ||x− y|| − 1 ) ) p−1 ( 52 ) = p ( 2R ||x− y|| + ( k − 1 ) ) p−1 ≤ p ( 2R ||x− y|| ) p−1 where 52 is due to the Differential Mean Value Theorem where k ∈ ( 0 , 1 ) . Thus , we have |ηcp ( x ) − ηcp ( y ) | ≤ p ( 2R ||x− y|| ) p−1 · ||x− y||p = p ( 2R ) p−1||x− y|| ( 53 ) i.e . ηcp ( x ) is a p ( 2R ) p−1-Lipschitz function . Using Lipschitz continuous property of ηc , we get W pp ( µ , ν ) = sup η∈L1 ( µ ) ∫ ηc ( y ) dν ( y ) + ∫ ηcc ( x ) dµ ( x ) ≤ sup ϕ∈Lip ( p ( 2R ) p−1 ) ∫ ϕ ( y ) dν ( y ) + ∫ ϕc ( x ) dµ ( x ) = sup ϕ∈Lip ( p ( 2R ) p−1 ) ∫ ϕ ( y ) dν ( y ) + ∫ ϕc ( y ) dµ ( y ) ( 54 ) where Lip ( p ( 2R ) p−1 ) denotes the set of p ( 2R ) p−1-Lipschitz functions . On the other hand , recall that W pp ( µ , ν ) = sup ψ , φ∈C ( Rd ) ∫ ψ ( y ) dν ( y ) + ∫ φ ( x ) dµ ( x ) ( 55 ) where ψ ( y ) + φ ( x ) ≤ ||x − y||p . Keeping ψ ( x ) fixed and optimizing w.r.t . φ ( y ) , then we just need to optimize ∫ φ ( y ) dµ ( y ) under constraint φ ( y ) ≤ ||x − y||p − ψ ( x ) . Then obviously we have φ∗ ( y ) = infx∈K ( ||x − y||p − ψ ( x ) ) = ψcp ( y ) where cp ( x , y ) = ||x − y||p . The map ( φ , ψ ) ∈ C ( K ) 2 7→ ( ψcp , ψ ) ∈ C ( K ) 2 replaces dual potentials by ” better ” ones improving the dual objective W pp ( µ , ν ) . Using c-transform , we can reformulate constrained problem into unconstrained convex problem over a single potential W pp ( µ , ν ) = sup ψ∈C ( Rd ) ∫ ψ ( y ) dν ( y ) + ∫ ψcp ( x ) dµ ( x ) = sup ψ∈C ( Rd ) ∫ ψ ( y ) dν ( y ) + ∫ ψcp ( y ) dµ ( y ) ( 56 ) Combining 54 and 56 , we know that when the support set of measure µ and ν supp ( µ ) = supp ( ν ) = K where K is a convex compact set , we have sup ψ∈C ( K ) ∫ ψ ( y ) dν ( y ) + ∫ ψcp ( y ) dµ ( y ) = W pp ( µ , ν ) ≤ sup ϕ∈Lip ( p ( 2R ) p−1 ) ∫ ϕ ( y ) dν ( y ) + ∫ ϕc ( y ) dµ ( y ) ( 57 ) Note that Lipschitz function must be continuous and therefore Lip ( p ( 2R ) p−1 ) ⊆ C ( K ) . Then , we have sup ϕ∈Lip ( p ( 2R ) p−1 ) ∫ ϕ ( y ) dν ( y ) + ∫ ϕc ( y ) dµ ( y ) ≤ sup φ∈C ( K ) ∫ ψ ( y ) dν ( y ) + ∫ ψcp ( y ) dµ ( y ) ( 58 ) Combining 57 and 58 , we know the inequality in 57 changes into equality W pp ( µ , ν ) = sup ϕ∈Lip ( p ( 2R ) p−1 ) ∫ ϕ ( y ) dν ( y ) + ∫ ϕc ( y ) dµ ( y ) ( 59 ) Note that for f ( x ) = xp − p ( 2R ) p−1x , x ∈ R+ achieves its minimum when f ′ ( x ) = pxp−1 − p ( 2R ) p−1 = 0 , i.e . x = 2R and the minimum is f ( 2R ) = − ( p− 1 ) ( 2R ) p−1 . Then , ϕcp ( y ) = inf x∈K ( ||x−y||p−ϕ ( x ) ) ≥ inf x∈K ( ||x−y||p−ϕ ( y ) −p ( 2R ) p−1||x−y|| ) = −ϕ ( y ) − ( p−1 ) ( 2R ) p−1 ( 60 ) Thus , we attain a lower bound of W pp ( µ , ν ) W pp ( µ , ν ) = sup ϕ∈Lip ( p ( 2R ) p−1 ) ∫ ϕ ( y ) dν ( y ) + ∫ ϕc ( y ) dµ ( y ) ( 61 ) ≥ sup ϕ∈Lip ( p ( 2R ) p−1 ) ∫ ϕ ( y ) dν ( y ) − ∫ ( ϕ ( y ) + ( p− 1 ) ( 2R ) p−1 ) dµ ( y ) ( 62 ) = sup ϕ∈Lip ( p ( 2R ) p−1 ) ∫ ϕ ( y ) dν ( y ) − ∫ ϕ ( y ) dµ ( y ) − ( p− 1 ) ( 2R ) p−1 = sup ϕ∈Lip ( p ( 2R ) p−1 ) ∫ ϕ ( y ) d ( ν − µ ) ( y ) − ( p− 1 ) ( 2R ) p−1 where 61 is due to 59 and 62 is due to 60 . C PROOF OF THEOREM 3.1 Proof . Dx , , q = { x′ + µ : ||x− x′||q ≤ } ( 63 ) Note that sup ν∈Dx , , q Wp ( µ , ν ) = sup ||x−x′||q≤ Wp ( x+ µ , x ′ + µ ) = sup ||z||q≤ Wp ( µ , z + µ ) ( 64 ) where the first equality is due to the definition of Dx , , q and the second equality is due to the translation invariance property of Wasserstein distance . Then recall the Monge version of Wasserstein distance Wp ( µ , ν ) ≤ ( inf T : T # µ=ν ∫ ||x− T ( x ) ||pdµ ( x ) ) 1 p ( 65 ) Noticing the inf operator in the Monge version definition of Wp , we can get an upper bound for Wp ( µ , ν ) by specializing a transport map T̃ satisfying T̃ µ = ν . In our case , we take T̃ : Rd → Rd , T̃ : x 7→ x+ z , and it ’ s easy to verify that T̃ # µ = z + µ . Then we get the upper bound below Wp ( µ , z + µ ) ≤ ( inf T : T # µ=z+µ ∫ ||x− T ( x ) ||pdµ ( x ) ) 1 p ≤ ( ∫ ||x− T̃ ( x ) ||pdµ ( x ) ) 1 p = ||z|| ( 66 ) where the last equality is due to µ is a probability measure . This provides us with an intuition that the upper bound of Wp ( µ , z + µ ) is determined by the Euclidean norm of displacement z . Using this upper bound , sup ||z||q≤ Wp ( µ , z + µ ) ≤ sup ||z||q≤ ||z||2 ( 67 ) When 0 < q ≤ 2 , using the lemma that when 0 < p < q < ∞ , ||z||q ≤ ||z||p , ∀z ∈ Rd holds , we have sup||z||q≤ ||z||2 ≤ sup||z||q≤ ||z||q = . On the other hand , note that || e1||2 = || e1||q = , we have sup||z||q≤ ||z||2 = . And when q > 2 , recall Holder ’ s Inequality below Lemma C.1 ( Holder ’ s Inequality for Rn ) . For { ai } 1≤i≤n , { bi } 1≤i≤n ⊆ R , r > 1 , we have n∑ i=1 |ai||bi| ≤ ( n∑ i=1 |ai|r ) 1 r ( n∑ i=1 |ai| r r−1 ) r−1 r ( 68 ) Apply it to the case n = d , |ai| = |xi|2 , |bi| = 1 and r = q2 > 1 , d∑ i=1 |xi|2 = d∑ i=1 |xi|2 · 1 ≤ ( d∑ i=1 ( |xi|2 ) q 2 ) 2 q ( d∑ i=1 1 q q−2 ) q−2 q = ( d∑ i=1 |xi|q ) 2 q d1− 2 q ( 69 ) ||x||2 = ( d∑ i=1 |xi|2 ) 1 2 ≤ ( d∑ i=1 |xi|q ) 1 q d 1 2− 1 q = ||x||qd 1 2− 1 q ( 70 ) Thus , sup||z||q≤ ||z||2 ≤ sup||z||q≤ ||x||qd 1 2− 1 q = d 1 2− 1 q . On the other hand , note that || n 1 q ∑d i=1 ei||q = , || n 1 q ∑d i=1 ei||2 = d 1 2− 1 q , we have sup||z||q≤ ||z||2 = d 1 2− 1 q . Combin- ing the case when 0 < q ≤ 2 and q > 2 , we have sup ||x−x′||q≤ Wp ( x+ µ , x ′ + µ ) = sup ||z||q≤ Wp ( µ , z + µ ) ≤ { when 0 < q ≤ 2 d 1 2− 1 q when q > 2 = max { , d 1 2− 1 q } ( 71 ) D W2 DISTANCE RELAXATION IS TIGHT FOR GAUSSIAN PROBABILITY MEASURE Here , we show that W2 distance relaxation for Gaussian probability measure is tight . Theorem D.1 . When µ = N ( 0 , σ2I ) and p = 2 , the relaxation in 9 is tight . In other words , Dx , , q ⊆ D x , max { , d 1 2 − 1 q } ,2 but Dx , , q \ D x , max { , d 1 2 − 1 q } −δ,2 6= ∅ for any sufficiently small δ > 0 . ( 72 ) Proof . Note that Dowson & Landau ( 1982 ) established the formula of Wasserstein distance between two Gaussian measures . Theorem D.2 . For Gaussian probability measures µ = N ( µ1 , Σ1 ) and ν = N ( µ2 , Σ2 ) , W2distance between µ and ν have closed form formula W2 ( µ , ν ) 2 = ||µ1 − µ2||2 + tr ( Σ1 + Σ2 − 2 ( Σ1Σ2 ) 1 2 ) ( 73 ) Using above theorem , we yield following tight relaxation between norm-based constraint set Dx , , q and W2-distance based constraint sets Dx , δ,2 for Gaussian smoothing measures centered at origin , i.e . µ = N ( 0 , σ2I ) sup ν∈Dx , , q W2 ( µ , ν ) = sup ||x−x′||q≤ W2 ( x+ µ , x ′ + µ ) = sup ||z||q≤ W2 ( µ , z + µ ) = sup ||z||q≤ ||z||2 = max { , d 1 2− 1 q } ( 74 ) where 74 is due to theorem D.2 and equality 71 . And generalization of above theorem when µ = N ( 0 , Σ ) can be proved in the same way . E PROOF OF THEOREM 3.2 Proof . First , we introduce the lemma below . Lemma E.1 . Let X be a random variable that follows d-dimensional Gaussian distribution with density function f ( x ; µ , Σ ) = 1 ( 2π ) d 2 |Σ| 12 e− 1 2 ( x−µ ) TΣ−1 ( x−µ ) ( 75 ) where x , µ ∈ Rd and Σ ∈ Sd++ . Let H : xTw + b = 0 be a hyperplane in the d-dimensional Euclidean space Rd , where w ∈ Rd and b ∈ R. The hyperplane H defines two half-spaces : Ω+ = { x ∈ Rd|xTw + b ≥ 0 } , Ω− = { x ∈ Rd|xTw + b < 0 } ( 76 ) Define the integral over half-space Ω+ as P = ∫ Ω+ f ( x ; µ , Σ ) dx = ∫ Ω+ 1 ( 2π ) d 2 |Σ| 12 e− 1 2 ( x−µ ) TΣ−1 ( x−µ ) dx Since Σ is positive definite symmetric , there exist an orthogonal matrix U and a diagonal matrix D with positive diagonal elements such that Σ = UTDU . Let x0 = − µ > w+b || √ DUw||2 and hence P =∫∞ x0 1√ 2π e− 1 2x 2 dx . ( The proof of this lemma is credit to https : //math.stackexchange.com/questions/ 556977/gaussian-integrals-over-a-half-space . ) Recall the definition of lp-norm constraint set of probability measures Dx , , q = { x′ + µ : ||x− x′||q ≤ } ( 77 ) Note that sup ν∈Dx , , q TV ( µ , ν ) = sup ||x−x′||q≤ TV ( x+ µ , x′ + µ ) = sup ||z||q≤ TV ( µ , z + µ ) ( 78 ) where the first equality is due to the definition of Dx , , q and the second equality is due to the translation invariance property of total variance distance . Define hyperplane H1 : xT z − ||z|| 2 2 2 = 0 and H 2 : xT z + ||z||22 2 = 0 . The hyperplane H 1 defines two half-spaces : Ω1+ = { x ∈ Rd|xT z − ||z||22 2 ≥ 0 } and Ω 1 − = { x ∈ Rd|xT z − ||z||22 2 < 0 } . And the hyperplane H2 defines two half-spaces : Ω2+ = { x ∈ Rd|xT z + ||z||22 2 ≥ 0 } and Ω 2 − = { x ∈ Rd|xT z + ||z|| 2 2 2 < 0 } . Applying lemma E.1 and lemma A.3 , we know that sup ||z||q≤ TV ( µ , z + µ ) = sup ||z||q≤ 1 2 ∫ ∣∣∣ 1 ( 2π ) d 2 σd e− xT x 2σ2 − 1 ( 2π ) d 2 σd e− ( x−z ) T ( x−z ) 2σ2 ∣∣∣dx ( 79 ) = 1 2 sup ||z||q≤ ∫ Ω1+ 1 ( 2π ) d 2 σd ∣∣∣e− xT x2σ2 − e− ( x−z ) T ( x−z ) 2σ2 ∣∣∣dx+ ∫ Ω1− 1 ( 2π ) d 2 σd ∣∣∣e− xT x2σ2 − e− ( x−z ) T ( x−z ) 2σ2 ∣∣∣dx = 1 2 sup ||z||q≤ ∫ Ω1+ 1 ( 2π ) d 2 σd ( e− ( x−z ) T ( x−z ) 2σ2 − e− xT x 2σ2 ) dx+ ∫ Ω1− 1 ( 2π ) d 2 σd ( e− xT x 2σ2 − e− ( x−z ) T ( x−z ) 2σ2 ) dx ( 80 ) = 1 2 sup ||z||q≤ ∫ Ω1+ d ( z + µ ) − ∫ Ω1+ dµ+ ∫ Ω1− dµ− ∫ Ω1− d ( z + µ ) = 1 2 sup ||z||q≤ ∫ Ω2+ dµ− ∫ Ω1+ dµ+ ∫ Ω1− dµ− ∫ Ω2− dµ ( 81 ) = 1 2 sup ||z||q≤ ∫ ∞ −||z||2 2σ 1√ 2π e− 1 2x 2 dx− ∫ ∞ ||z||2 2σ 1√ 2π e− 1 2x 2 dx+ ∫ ||z||2 2σ −∞ 1√ 2π e− 1 2x 2 dx− ∫ − ||z||22σ −∞ 1√ 2π e− 1 2x 2 dx ( 82 ) = 1 2 sup ||z||q≤ ( G ( ||z||2 2σ ) −G ( − ||z||2 2σ ) +G ( ||z||2 2σ ) −G ( − ||z||2 2σ ) ) ( 83 ) = 1 2 sup ||z||q≤ 2 ( 2G ( ||z||2 2σ ) − 1 ) ( 84 ) = 2G ( max { , d 12− 1q } 2σ ) − 1 ( 85 ) where 79 is due to lemma A.3 ; 80 is due to the consistency of sign of integrand function on Ω1+ and Ω1− ; 81 is due to the transformation formula of space coordinates ; 82 is due to lemma E.1 ; 83 and 85 is due to the definition and central symmetry property of G as the cumulative density function of standard normal distribution ; 85 is due to 71 . F PROOF OF THEOREM 3.3 Proof . Recall the definition of lp-norm constraint set of probability measures Dx , , q = { x′ + µ : ||x− x′||q ≤ } ( 86 ) Note that sup ν∈Dx , , q TV ( µ , ν ) = sup ||x−x′||q≤ TV ( x+ µ , x′ + µ ) = sup ||z||q≤ TV ( µ , z + µ ) ( 87 ) where the first equality is due to the definition of Dx , , q and the second equality is due to the translation invariance property of total variance distance . Next , compute the value of TV ( µ , z + µ ) . Lemma F.1 . K is a l1 norm ball centered at original point of radius r , then K ∩ ( z + K ) = ∅ if and only if ||z||1 > 2r . Proof . First , we prove the if part and assume ||z||1 > 2r . Consider arbitrarily taken x ∈ ( z + K ) , i.e . ||x− z||1 ≤ r. According to the triangular inequality with respect to l1 norm , we have ||x||1 = ||z − ( x− z ) ||1 ≥ ||z||1 − ||x− z||1 > 2r − r = r ( 88 ) which shows that x /∈ K and therefore K ∩ ( z +K ) = ∅ . Then we prove the only if part by using reduction to absurdity and assume ||z||1 ≤ 2r . Take y = 12z , then ||y||1 = 12 ||z||1 ≤ r and ||y − z||1 = 1 2 ||z||1 ≤ r which shows that y ∈ K ∩ ( z + K ) and therefore K ∩ ( z +K ) 6= ∅ which leads to a contradiction . According to lemma F.1 , we know that when { z ∣∣||z||q ≤ , ||z||1 ≥ 2r } 6= ∅ , we have sup ν∈Dx , , q TV ( µ , ν ) = sup ||z||q≤ TV ( µ , z + µ ) = 1 ( 89 ) Define z̄ = 2rd ∑d i=1 ei , and it ’ s easy to verify that ||z̄||1 = 2r and ||z̄||q = 2rd 1 q−1 for q > 1 . Thus , when > 2rd 1 q−1 , we have sup ν∈Dx , , q TV ( µ , ν ) = sup ||z||q≤ TV ( µ , z + µ ) = 1 ( 90 ) G PROOF OF THEOREM 3.4 Proof . First , we introduce the lemmas below for the convenience of later proof . Lemma G.1 ( Volume Formula of d-dimensional spherical cap ) . The volume of a d-dimensional hyperspherical cap of height h and radius r is given by : V = π d−1 2 rd Γ ( d+12 ) ∫ arccos ( r−hr ) 0 sind ( t ) dt ( 91 ) where we define h as the value shown in figure 4 and Γ ( the gamma function ) is given by Γ ( z ) =∫∞ 0 tz−1e−tdt . Lemma G.2 ( Volume formula of d-dimensional Euclidean ball ) . The volume of d-dimensional Euclidean ball of radius r is given by V = π d 2 rd Γ ( d2 + 1 ) ( 92 ) Recall the definition of lp-norm constraint set of probability measures Dx , , q = { x′ + µ : ||x− x′||q ≤ } ( 93 ) Note that sup ν∈Dx , , q TV ( µ , ν ) = sup ||x−x′||q≤ TV ( x+ µ , x′ + µ ) = sup ||z||q≤ TV ( µ , z + µ ) ( 94 ) where the first equality is due to the definition of Dx , , q and the second equality is due to the translation invariance property of total variance distance . Lemma G.3 . K is a l2 norm ball centered at original point of radius r , then K ∩ ( z + K ) = ∅ if and only if ||z||2 > 2r . According to this lemma , we know that when q ≤ 2 and > 2r , we have 1 ≥ sup ||z||q≤ TV ( µ , z + µ ) ≥ TV ( µ , e1 + µ ) = Vol ( K∆ ( e1 +K ) ) 2Vol ( K ) = 1 ( 95 ) where the last equality is due to || e1||2 = > 2r and applying lemma G.3 . And when q > 2 and > 2rd 1 q− 1 2 , we have 1 ≥ sup ||z||q≤ TV ( µ , z + µ ) ≥ TV ( µ , d 1 q d∑ i=1 ei + µ ) = Vol ( K∆ ( d 1 q ∑d i=1 ei +K ) ) 2Vol ( K ) = 1 ( 96 ) where the last equality is due to || d 1 q ∑d i=1 ei||2 = d 1 2− 1 q > 2r and applying lemma G.3 . Combin- ing the results for q ≤ 2 and q > 2 , we have sup ||z||q≤ TV ( µ , z + µ ) = 1 when > min { 2r , 2rd 1 q− 1 2 } ( 97 ) Next , consider the case when ≤ min { 2r , 2rd 1 q− 1 2 } . Applying G.1 , lemma G.2 and lemma A.3 , we have sup ||z||q≤ TV ( µ , z + µ ) = sup ||z||q≤ 1 2 ∫ ∣∣∣ 1 Vol ( K ) Ix∈K − 1 Vol ( K ) Ix∈z+K ∣∣∣dx ( 98 ) = sup ||z||q≤ 1 2Vol ( K ) ∫ Ix∈K∆ ( z+K ) dx = sup ||z||q≤ Vol ( K∆ ( z +K ) ) 2Vol ( K ) = sup ||z||q≤ Vol ( K ) − 2π d−1 2 rd Γ ( d+12 ) ∫ arccos ( ||z||22r ) 0 sind ( t ) dt Vol ( K ) = sup ||z||q≤ 1− 2π d−1 2 rd Γ ( d+12 ) ∫ arccos ( ||z||22r ) 0 sind ( t ) dt Vol ( K ) ( 99 ) = sup ||z||q≤ 1− 2π d−1 2 rd Γ ( d+12 ) ∫ arccos ( ||z||22r ) 0 sind ( t ) dt π d 2 Γ ( d2 +1 ) rd = sup ||z||q≤ 1− 2Γ ( d2 + 1 ) π 1 2 Γ ( d+12 ) ∫ arccos ( ||z||22r ) 0 sind ( t ) dt ( 100 ) = 1− 2Γ ( d2 + 1 ) π 1 2 Γ ( d+12 ) ∫ arccos ( max { , d 12− 1q } 2r ) 0 sind ( t ) dt ( 101 ) where 114 is due to lemma A.3 ; 99 is due to lemma G.1 ; 100 is due to lemma G.2 ; 101 is due to 71 . Because of the computation difficulty ( overflow ) , we have to simplify the term Γ ( d 2 +1 ) Γ ( d+12 ) . When d is even , assume d = 2k , k ∈ N and note that Γ ( 1 ) = 1 , Γ ( 12 ) = π 1 2 , then Γ ( d2 + 1 ) Γ ( d+12 ) = Γ ( k + 1 ) Γ ( k + 12 ) = k ! Γ ( 1 ) Πki=1 ( i− 12 ) Γ ( 1 2 ) = k ! π 1 2 Πki=1 ( i− 12 ) = ( 2k ) ! ! π 1 2 ( 2k − 1 ) ! ! ( 102 ) Recall the Wallis integral lemma that when d is even∫ π 2 0 sind ( t ) dt = ∫ π 2 0 cosd ( t ) dt = π 2 · ( d− 1 ) ! ! d ! ! , d = 2k ∈ N ( 103 ) Thus , Γ ( d2 + 1 ) Γ ( d+12 ) = ( 2k ) ! ! π 1 2 ( 2k − 1 ) ! ! = 1 2π− 1 2 · ( π2 · ( 2k−1 ) ! ! ( 2k ) ! ! ) = 1 2π− 1 2 ∫ π 2 0 sin2k ( t ) dt = 1 2π− 1 2 ∫ π 2 0 sind ( t ) dt ( 104 ) When d is odd , assume d = 2k + 1 , k ∈ N and note that Γ ( 1 ) = 1 , Γ ( 12 ) = π 1 2 , then Γ ( d2 + 1 ) Γ ( d+12 ) = Γ ( k + 32 ) Γ ( k + 1 ) = Πki=0 ( i+ 1 2 ) Γ ( 1 2 ) k ! Γ ( 1 ) = π 1 2 Πki=0 ( i+ 1 2 ) k ! = π 1 2 ( 2k + 1 ) ! ! 2 · ( 2k ) ! ! ( 105 ) Recall the Wallis integral lemma that when d is odd∫ π 2 0 sind ( t ) dt = ∫ π 2 0 cosd ( t ) dt = ( d− 1 ) ! ! d ! ! , d = 2k + 1 ∈ N ( 106 ) Thus , Γ ( d2 + 1 ) Γ ( d+12 ) = π 1 2 ( 2k + 1 ) ! ! 2 · ( 2k ) ! ! = 1 2π− 1 2 · ( ( 2k ) ! ! ( 2k+1 ) ! ! ) = 1 2π− 1 2 ∫ π 2 0 sin2k+1 ( t ) dt = 1 2π− 1 2 ∫ π 2 0 sind ( t ) dt ( 107 ) To sum up , for all d ∈ N , we have Γ ( d2 + 1 ) Γ ( d+12 ) = 1 2π− 1 2 ∫ π 2 0 sind ( t ) dt ( 108 ) Then we avoid the computation of Γ ( d2 + 1 ) , Γ ( d+1 2 ) and transfer it into the computation of an integral . Applying formula 108 , we have sup ||z||q≤ TV ( µ , z + µ ) = 1− 1∫ π 2 0 sind ( t ) dt ∫ arccos ( max { , d 12− 1q } 2r ) 0 sind ( t ) dt ( 109 ) H PROOF OF THEOREM 3.5 Proof . Recall the definition of lp-norm constraint set of probability measures Dx , , q = { x′ + µ : ||x− x′||q ≤ } ( 110 ) Note that sup ν∈Dx , , q TV ( µ , ν ) = sup ||x−x′||q≤ TV ( x+ µ , x′ + µ ) = sup ||z||q≤ TV ( µ , z + µ ) ( 111 ) where the first equality is due to the definition of Dx , , q and the second equality is due to the translation invariance property of total variance distance . When ≥ 2r , 1 ≥ sup ||z||q≤ TV ( µ , z + µ ) ≥ TV ( µ , e1 + µ ) = 1 ( 112 ) where the first inequality is due to the fact that µ and z + µ are probability measures ; the second inequality is due to supp ( µ ) ∩ supp ( e1 + µ ) = ∅ . Thus , in this case , sup ||z||q≤ TV ( µ , z + µ ) = 1 ( 113 ) When < 2r , sup ||z||q≤ TV ( µ , z + µ ) = sup ||z||q≤ 1 2 ∫ ∣∣∣ 1 Vol ( K ) Ix∈K − 1 2Vol ( K ) Ix∈z+K ∣∣∣dx ( 114 ) = sup ||z||q≤ 1 2Vol ( K ) ∫ Ix∈K∆ ( z+K ) dx = sup ||z||q≤ Vol ( K∆ ( z +K ) ) 2Vol ( K ) = sup ||z||q≤ 1− Vol ( K ∩ ( z +K ) ) Vol ( K ) = sup ||z||q≤ 1− Π d i=1 ( 2r − |zi| ) ( 2r ) d = sup ||z||q≤ 1−Πdi=1 ( 1− |zi| 2r ) ( 115 ) First , we study typical cases when q = 1 , 2 , ∞ . When q = 1 , we need to solve the following optimization problem inf ||z||1≤ Πdi=1 ( 2r − |zi| ) ( 116 ) Here we use mathematical induction to prove that inf ||z||1≤ Πdi=1 ( 2r − |zi| ) = ( 2r ) d−1 ( 2r − ) ( 117 ) When d = 2 , inf ||z||1≤ Πdi=1 ( 2r − |zi| ) = inf|z1|+|z2|≤ ( 2r − |z1| ) ( 2r − |z2| ) = inf |z2|≤ ( 2r − + |z2| ) ( 2r − |z2| ) = inf 0≤z2≤ ( 2r − + z2 ) ( 2r − z2 ) = inf 0≤z2≤ z2 ( − z2 ) + 2r ( 2r − ) = 2r ( 2r − ) Thus , induction hypothesis holds for d = 2 . Then , assume induction hypothesis holds for d = n. When d = n+ 1 , inf ||z||1≤ Πn+1i=1 ( 2r − |zi| ) = inf∑n+1 i=1 |zi|≤ Πn+1i=1 ( 2r − |zi| ) = inf∑n i=1 |zi|≤ −|zn+1| ( Πni=1 ( 2r − |zi| ) ) ( 2r − |zn+1| ) = inf |zn+1|≤ ( 2r ) n−1 ( 2r − + |zn+1| ) ( 2r − |zn+1| ) ( 118 ) = ( 2r ) n ( 2r − ) = ( 2r ) d−1 ( 2r − ) ( 119 ) where 118 is due to the induction hypothesis when d = n ; 119 is due to the induction hypothesis when d = 2 . Therefore , we have already proved that inf ||z||1≤ Πdi=1 ( 2r − |zi| ) = ( 2r ) d−1 ( 2r − ) , ∀d ∈ N ( 120 ) Plugging in this result , it follows that sup ||z||1≤ TV ( µ , z + µ ) = sup ||z||1≤ 1− Π d i=1 ( 2r − |zi| ) ( 2r ) d = 1− ( 2r ) d−1 ( 2r − ) ( 2r ) d = 2r ( 121 ) When q = 2 , we need to solve the following optimization problem inf ||z||2≤ Πdi=1 ( 2r − |zi| ) ( 122 ) When d = 2 , inf ||z||2≤ Πdi=1 ( 2r − |zi| ) = inf|z1|2+|z2|2≤ 2 ( 2r − |z1| ) ( 2r − |z2| ) = inf |z2|≤ ( 2r − ( 2 − z22 ) 1 2 ) ( 2r − |z2| ) = inf 0≤z2≤ ( 2r − ( 2 − z22 ) 1 2 ) ( 2r − z2 ) Define f ( z2 ) = ln ( 2r − ( 2 − z22 ) 1 2 ) + ln ( 2r − z2 ) , then f ′ ( z2 ) = z2 ( 2 − z22 ) − 1 2 2r − ( 2 − z22 ) 1 2 − 1 2r − z2 = 2rz2 ( 2 − z22 ) − 1 2 − z22 ( 2 − z22 ) − 1 2 − 2r + ( 2 − z22 ) 1 2 ( 2r − ( 2 − z22 ) 1 2 ) ( 2r − z2 ) ( 123 ) Define g ( z2 ) = 2rz2 ( 2 − z22 ) − 1 2 − z22 ( 2 − z22 ) − 1 2 − 2r + ( 2 − z22 ) 1 2 , then g′ ( z2 ) = ( 2z 3 2 − 3 2z2 + 2r 2 ) ( 2 − z22 ) − 3 2 ( 124 ) Define h ( z2 ) = 2z32 − 3 2z2 + 2r 2 , then h′ ( z2 ) = 6z22 − 3 2 = 6 ( z2 − √2 ) ( z2 + √ 2 ) . Thus , when 0 ≤ z2 ≤ √2 , h ′ ( x ) ≤ 0 ; when √ 2 < z2 ≤ , h′ ( x ) > 0 . Thus , the minimum value of h ( x ) on interval [ 0 , ] is h ( √ 2 ) = √ 2 2 ( √ 2r − ) . Therefore , function f ( z2 ) behaves differently when 0 < ≤ √ 2r and when √ 2r < < 2r . When 0 < ≤ √ 2r , h ( z2 ) ≥ h ( √2 ) = √ 2 2 ( √ 2r − ) ≥ 0 on interval [ 0 , ] and therefore g′ ( z2 ) = h ( z2 ) ( 2 − z22 ) − 3 2 ≥ 0 . Note that g ( 0 ) = − 2r < 0 , g ( √ 2 ) = 0 , g ( − ) = ∞ and therefore f ′ ( z2 ) ≤ 0 when 0 ≤ z2 ≤ √2 while f ′ ( z2 ) > 0 when √2 < z2 ≤ . Thus , f ( z2 ) takes its minimum when z2 = √2 . In this case , inf 0≤z2≤ ( 2r − ( 2 − z22 ) 1 2 ) ( 2r − z2 ) = ( 2r − √ 2 ) 2 ( 125 ) When √ 2r < < 2r , we have h ( 0 ) = 2r 2 > 0 , h ( √ 2 ) = √ 2 2 ( √ 2r − ) < 0 , h ( ) = 2 ( 2r − ) > 0 . Assume h ( t1 ) = h ( t2 ) = 0 , 0 < t1 < √2 < t2 < , then when 0 ≤ z2 ≤ t1 or t2 ≤ z2 ≤ , h ( z2 ) ≥ 0 and when t1 < z2 < t2 , h ( z2 ) < 0 . Therefore , g′ ( z2 ) ≥ 0 when 0 ≤ z2 ≤ t1 or t2 ≤ z2 ≤ ; g′ ( z2 ) < 0 when t1 < z2 < t2 . Note that g ( z2 ) = 0 ⇐⇒ ( 2z22 − 2 ) ( 2 ( z2−r ) 2+2r2− 2 ) = 0 , therefore when 0 ≤ z2 ≤ r− √ 2 2 − r2 or √ 2 ≤ z2 ≤ r+ √ 2 2 − r2 , g ( z2 ) ≤ 0 ; when r − √ 2 2 − r2 < z2 < √ 2 or r + √ 2 2 − r2 < z2 < , g ( z2 ) > 0 . Thus , when 0 ≤ z2 ≤ r− √ 2 2 − r2 or √ 2 ≤ z2 ≤ r+ √ 2 2 − r2 , f ′ ( x ) ≤ 0 ; when r− √ 2 2 − r2 < z2 < √ 2 or r + √ 2 2 − r2 < z2 < , f ′ ( x ) > 0 . Thus , f ( z2 ) takes its minimum when z2 = r − √ 2 2 − r2 or z2 = r + √ 2 2 − r2 . In this case , inf 0≤z2≤ ( 2r − ( 2 − z22 ) 1 2 ) ( 2r − z2 ) = ( r − √ 2 2 − r2 ) ( r + √ 2 2 − r2 ) = 2r2 − 2 2 ( 126 ) inf ||z||2≤ Πdi=1 ( 2r−|zi| ) = inf∑n+1 i=1 z 2 i≤ 2 Πn+1i=1 ( 2r−|zi| ) = inf∑n i=1 z 2 i≤ 2−z2n+1 ( Πni=1 ( 2r−|zi| ) ) ( 2r−|zn+1| ) ( 127 ) By then , we have understand clearly the optimization problem when d = 2 . Then , consider the case when d = 3 . When d = 3 , inf ||z||2≤ Πdi=1 ( 2r − |zi| ) = inf z21+z 2 2+z 2 3≤ 2 ( 2r − |z1| ) ( 2r − |z2| ) ( 2r − |z3| ) ( 128 ) When 0 < ≤ √ 2r , assume the optimal point is z∗ . We will prove that each coordinate of z∗ has the same value . Here we use reduction to absurdity , and wlog assume z∗1 6= z∗2 . By fixing the value of z∗3 , the optimization problem 122 is equivalent to inf z21+z 2 2≤ 2− ( z∗3 ) 2 ( 2r − |z1| ) ( 2r − |z2| ) ( 129 ) And ( z∗1 , z ∗ 2 ) should be an optimal point of above problem . Note that 2 − ( z∗3 ) 2 ≤ 2 ≤ 2r2 and applying 125 , we know that z∗1 = z ∗ 2 which is a contradiction . Thus , z ∗ 1 = z ∗ 2 = z ∗ 3 = c. And inf ||z||2≤ Πni=1 ( 2r − |zi| ) = inf c≤ √ 3 ( 2r − c ) 3 = ( 2r − √ 3 ) 3 ( 130 ) When √ 2r < ≤ √ 3r , it ’ s obvious that the optimal point z∗ of optimization problem 128 must lie on the boundary of feasible region , i.e . ( z∗1 ) 3 + ( z∗2 ) 3 + ( z∗3 ) 3 = 2 . Wlog , assume ( z∗3 ) 3 ≥ 2 3 and ( z∗1 ) 2 + ( z∗2 ) 2 ≤ 2 2 3 ≤ 2r 3 . By fixing the value of z∗3 and following similar deduction procedure as above we know that z∗1 = z ∗ 2 = c ∗ , where c∗ is the optimal point of following optimization problem . inf 0≤c≤ √ 3 ( 2r − c ) 2 ( 2r − √ 2 − 2c2 ) ( 131 ) Define f ( x ) = 2 ln ( 2r − x ) + ln ( 2r − √ 2 − 2x2 ) where 0 ≤ x ≤ √ 3 , then f ′ ( x ) = 2 ( 3x2 − 2rx− 2 + 2r √ 2 − 2x2 ) ( x− 2r ) ( 2r − √ 2 − 2x2 ) √ 2 − 2x2 ( 132 ) It ’ s obvious that the denominator of f ′ ( x ) is negative . As for the numerator , define g ( x ) = 3x2 − 2rx− 2 where 0 ≤ x ≤ √ 3 . Note that g ( x ) ≤ max { g ( 0 ) , g ( √ 3 ) } = max { − 2 , −2r √ 3 } ≤ 0 ( 133 ) Thus , we have the following equivalent relationship 3x2 − 2rx− 2 + 2r √ 2 − 2x2 ≤ 0 ⇐⇒ 3x2 − 2rx− 2 ≤ −2r √ 2 − 2x2 ≤ 0 ⇐⇒ ( 3x2 − 2rx− 2 ) 2 ≥ ( − 2r √ 2 − 2x2 ) 2 ≥ 0 ⇐⇒ ( 3x2 − 2 ) ( 3x2 − 4rx+ 4r2 − 2 ) ≥ 0 ⇐⇒ 3x2 − 4rx+ 4r2 − 2 ≤ 0 ⇐⇒ ∅ when √ 2r < ≤ 2 √ 2 3 r 2r − √ 3 2 − 8r2 3 ≤ x ≤ 2r + √ 3 2 − 8r2 3 when 2 √ 2 3 r < ≤ √ 3r where the last equivalent relationship is due to the discriminant of the quadratic equation 3x2 − 4rx+4r2− 2 is ∆ = 4 ( 3 2−8r2 ) . Therefore , when √ 2r < ≤ 2 √ 2 3r , f ′ ( x ) ≤ 0 , ∀0 ≤ x ≤ √ 3 and hence the optimal point c∗ in the optimization problem 131 takes value √ 3 , whereas when 2 √ 2 3r < ≤ √ 3r , f ′ ( x ) ≤ 0 for 0 ≤ x ≤ 2r− √ 3 2−8r2 3 , 2r+ √ 3 2−8r2 3 ≤ x ≤ √ 3 and f ′ ( x ) > 0 for 2r− √ 3 2−8r2 3 ≤ x ≤ 2r+ √ 3 2−8r2 3 and note that f ( 2r− √ 3 2−8r2 3 ) < f ( √ 3 ) hence the optimal point c∗ in the optimization problem takes value 2r− √ 3 2−8r2 3 . To sum up , when √ 2r < ≤ 2 √ 2 3r , the optimal point z∗ of optimization problem 128 satisfies z∗1 = z ∗ 2 = z ∗ 3 = √ 3 . And when 2 √ 2 3r < ≤ √ 3r , the optimal point z∗ of optimization problem 128 satisfies z∗1 = z ∗ 2 = 2r− √ 3 2−8r2 3 , z ∗ 3 = 4r+ √ 3 2−8r2 3 or one of its permutations . When √ 3r < < 2r , similarly we have ( z∗1 ) 3 + ( z∗2 ) 3 + ( z∗3 ) 3 = 2 . If there exists 1 ≤ i ≤ 3 such that ( z∗i ) 2 ≥ 2 − 2r2 , wlog assume ( z∗3 ) 2 ≥ 2 − 2r2 . By substituting the value range of x from [ 0 , √ 3 ] into [ 0 , r ] , following similar deduction procedure and noticing that f ( 2r− √ 3 2−8r2 3 ) < f ( r ) , we know that the optimal point z∗ in this case satisfies z∗1 = z ∗ 2 = 2r− √ 3 2−8r2 3 , z ∗ 3 = 4r+ √ 3 2−8r2 3 or one of its permutations . On the other hand , if ( z∗i ) 2 < 2 − 2r2 for all 1 ≤ i ≤ 3 , then ( z∗1 ) 2 + ( z∗2 ) 2 = 2 − ( z∗3 ) 2 > 2r2 . Applying 126 and taking z∗1 = r − √ 2− ( z∗3 ) 2 2 − r2 , z ∗ 2 = r + √ 2− ( z∗3 ) 2 2 − r2 , we know the optimization problem is equivalent to inf 0≤z3 < √ 2−2r2 ( 2r2 − 2 − z23 2 ) ( 2r − z3 ) ( 134 ) According to monotonicity analysis of the cubic function above , the optimal point z∗3 is either 2r− √ 3 2−8r2 3 or √ 2 − 2r2 . And it ’ s easy to verify that f ( 2r− √ 3 2−8r2 3 ) < f ( √ 2 − 2r2 ) and therefore z∗3 = 2r− √ 3 2−8r2 3 . However , ( z ∗ 2 ) 2 > 2 − 2r2 which leads to a contradiction . In summary , considering the case d = 3 , when 0 < ≤ 2 √ 2 3r , the optimal point z ∗ of original optimization problem satisfies z∗1 = z ∗ 2 = z ∗ 3 = √ 3 and the optimal value is ( 2r − √ 3 ) 3 and when √ 3r < < 2r , the optimal point z∗ , the optimal point z∗ of original optimization problem satisfies z∗1 = z ∗ 2 = 2r− √ 3 2−8r2 3 , z ∗ 3 = 4r+ √ 3 2−8r2 3 or one of its permutations . Next , consider the general case when d = n ≥ 4 . In the first place , we point out and prove two useful properties of the optimal point z∗ which help simplify our later discussion a lot . • All coordinates of optimal point z∗ takes at most two different values . • If the coordinates of an optimal point z∗ takes exactly two different values c1 and c2 , then the number of coordinates equal to c1 must be n− 1 or 1 . Proof . On one hand , by using reduction to absurdity , wlog assume z∗1 , z ∗ 2 , z ∗ 3 take three different values . Fixing the value of the other n − 3 coordinates , we know that ( z∗1 , z∗2 , z∗3 ) is the optimal point of a special case of original problem when d = 3 . And note that for all the optimal points of d = 3 , there must exist two coordinates taking the same value , which leads to a contradiction . Thus , the first property is satisfied . On the other hand , similarly , by applying reduction to absurdity , wlog assume z∗1 = z ∗ 2 = c1 and z∗3 = z ∗ 4 = c2 where c1 6= c2 . Fixing z∗2 , z∗4 and the value of the other n−4 coordinates and aware of the fact that ( z∗1 ) 2 + ( z∗3 ) 2 ≤ 2 2 < 2r 2 , we know that ( z∗1 , z ∗ 3 ) is the optimal point of a special case of original problem when d = 2 , < √ 2r and therefore z∗1 = z ∗ 3 , which leads to a contradiction . Thus , the second property is satisfied . Using the two properties above , we know that the optimal point z∗ has only two possible forms : z∗ = ( √ n , · · · , √ n ) and z∗ = ( c , · · · , c , √ 2 − ( n− 1 ) c2 ) or one of its permutations where 0 ≤ c ≤ √ n−1 , c 6= √ n , which can be unified into one form : z∗ = ( c , · · · , c , √ 2 − ( n− 1 ) c2 ) or one of its permutations where 0 ≤ c ≤ √ n−1 . Thus , the original problem can be simplified into following optimization problem with one degree of freedom : inf 0≤c≤ √ n−1 ( 2r − c ) n−1 ( 2r − √ 2 − ( n− 1 ) c2 ) ( 135 ) Define f ( x ) = ( n− 1 ) ln ( 2r − x ) + ln ( 2r − √ 2 − ( n− 1 ) x2 ) where 0 ≤ x ≤ √ n−1 , then f ′ ( x ) = ( n− 1 ) ( nx2 − 2rx− 2 + 2r √ 2 − ( n− 1 ) x2 ) ( x− 2r ) ( 2r − √ 2 − ( n− 1 ) x2 ) √ 2 − ( n− 1 ) x2 , where 0 ≤ x < √ n− 1 ( 136 ) It ’ s obvious that the denominator of f ′ ( x ) is negative . As for the numerator , define g ( x ) = nx2 − 2rx− 2 where 0 ≤ x ≤ √ n−1 . Note that g ( x ) ≤ min { g ( 0 ) , g ( √ n− 1 ) } = max { 0 , ( − 2 √ n− 1r ) n− 1 } ≤ 0 ( 137 ) where the last inequality is due to < 2r < 2 √ n− 1r . Thus , when 0 ≤ x ≤ √ n−1 , nx2 − 2rx− 2 + 2r √ 2 − ( n− 1 ) x2 ≤ 0 ⇐⇒ nx2 − 2rx− 2 ≤ −2r √ 2 − ( n− 1 ) x2 ≤ 0 ⇐⇒ ( nx2 − 2rx− 2 ) 2 ≥ ( − 2r √ 2 − ( n− 1 ) x2 ) 2 ⇐⇒ ( nx2 − 2 ) ( nx2 − 4rx+ 4r2 − 2 ) ≥ 0 ⇐⇒ ( x− √ n ) ( nx2 − 4rx+ 4r2 − 2 ) ≥ 0 ⇐⇒ x ≥ √ n when 0 < < 2 √ n− 1 n r x ≥ √ n or 2r − √ n 2 − 4 ( n− 1 ) r2 n ≤ x ≤ 2r + √ n 2 − 4 ( n− 1 ) r2 n when 2 √ n− 1 n r ≤ < 2r where the last equivalence relationship is due to the discriminant of the quadratic equation nx2 − 4rx+ 4r2 − 2 = 0 is ∆ = 4 ( n 2 − 4 ( n− 1 ) r2 ) < 0 ⇐⇒ 0 < < 2 √ n− 1 n r ( 138 ) Thus , if 0 < < 2 √ n−1 n r , then f ′ ( x ) ≥ 0 when √ n ≤ x ≤ √ n−1 and f ′ ( x ) < 0 when 0 ≤ x < √ n . Thus , f ( x ) takes its minimum when x = √ n and therefore c∗ = √ n . If 2 √ n−1 n r ≤ < 2r , then f ′ ( x ) ≥ 0 when 2r− √ n 2−4 ( n−1 ) r2 n ≤ x ≤ 2r+ √ n 2−4 ( n−1 ) r2 n or √ n ≤ x ≤ √ n−1 and f ′ ( x ) < 0 when 0 ≤ x < 2r− √ n 2−4 ( n−1 ) r2 n or 2r+ √ n 2−4 ( n−1 ) r2 n < x < √ n . In this case , f ( x ) takes its minimum when x = 2r− √ n 2−4 ( n−1 ) r2 n or x = √ n . For the convenience of analysis , assume t = 2r , √ n−1 n ≤ t < 1 and it follows that e f ( √ n ) = ( 2r ) n ( 1− t√ n ) n ( 139 ) ef ( 2r− √ n 2−4 ( n−1 ) r2 n ) = ( 2r ) n ( ( n− 1 ) + √ nt2 − ( n− 1 ) n ) n−1 ( 1− √ nt2 − ( n− 1 ) n ) ( 140 ) We can prove that there exists tn ∈ [ √ n−1 n , 1 ) such that c∗ = √ n when 2 √ n−1 n r ≤ ≤ 2tnr and c∗ = 2r− √ n 2−4 ( n−1 ) r2 n when 2tnr < < 2r while tn converge to 1 at an exponential rate as shown in figure 5 . In conclusion , for the case d = n ≥ 4 , when 0 < ≤ 2tnr , c∗ = √n and therefore inf ||z||2≤ Πni=1 ( 2r−|zi| ) = ( 2r−c∗ ) n−1 ( 2r− √ 2 − ( n− 1 ) ( c∗ ) 2 ) = ( 2r− n 1 2 ) n = ( 2r− d 1 2 ) d ( 141 ) Plugging in this result , it follows that sup ||z||2≤ TV ( µ , z+µ ) = sup ||z||2≤ 1−Π d i=1 ( 2r − |zi| ) ( 2r ) d = 1− ( 2r − d 1 2 ) d ( 2r ) d = 1− ( 1− 2d 1 2 r ) d ( 142 ) Figure 5 : Graphs of functions f1 ( t ) = ( 1 − t√ n ) n , f2 ( t ) = ( ( n−1 ) + √ nt2− ( n−1 ) n ) n−1 ( 1−√nt2− ( n−1 ) n ) when n = 4 , 16 , 64 from left to right . Accord- ing to the figure , on interval [ √ n−1 n , 1 ] , f2 ( t ) is greater than f1 ( t ) at first and then f2 ( t ) exceeds f1 ( t ) . Furthermore , as n increases , the horizontal coordinate of the intersection point converge to 1 , which can be seen intuitively from the figure above . and when 2tnr < < 2r , c∗ = 2r− √ n 2−4 ( n−1 ) r2 n and therefore inf ||z||2≤ Πni=1 ( 2r − |zi| ) = ( 2r − c∗ ) n−1 ( 2r − √ 2 − ( n− 1 ) ( c∗ ) 2 ) = ( 2 ( n− 1 ) r + √ n 2 − 4 ( n− 1 ) r2 n ) n−1 ( 2r − √ n 2 − 4 ( n− 1 ) r2 n ) = ( 2 ( d− 1 ) r + √ d 2 − 4 ( d− 1 ) r2 n ) n−1 ( 2r − √ d 2 − 4 ( d− 1 ) r2 d ) Plugging in this result , it follows that sup ||z||2≤ TV ( µ , z + µ ) = sup ||z||2≤ 1− Π d i=1 ( 2r − |zi| ) ( 2r ) d = 1− ( 2 ( d−1 ) r+ √ d 2−4 ( d−1 ) r2 d ) d−1 ( 2r−√d 2−4 ( d−1 ) r2 d ) ( 2r ) d = 1− ( d− 1 +√d ( 2r ) 2 − d+ 1 d ) d−1 ( 1−√d ( 2r ) 2 − d+ 1 d ) When q =∞ , it ’ s easy to verify that inf ||z||∞≤ Πdi=1 ( 2r − |zi| ) = ( 2r − ) d ( 143 ) Plugging in the formula above , it follows sup ||z||∞≤ TV ( µ , z + µ ) = sup ||z||∞≤ 1− Π d i=1 ( 2r − |zi| ) ( 2r ) d = 1− ( 2r − ) d ( 2r ) d = 1− ( 1− 2r ) d ( 144 ) I PROOF OF THEOREM 3.6 Proof . Recall the definition of lp-norm constraint set of probability measures Dx , , q = { x′ + µ : ||x− x′||q ≤ } ( 145 ) Assume Dx , , q ⊆ Dx , ξ ( ) , then ξ ( ) ≥ sup ν∈Dx , , q TV ( µ , ν ) = sup ||x−x′||q≤ TV ( x+µ , x′+µ ) = sup ||z||q≤ TV ( µ , z+µ ) ≥ TV ( µ , e1+µ ) ( 146 ) which indicates that TV ( µ , e1+µ ) provides a lower bound for ξ ( ) . Thus , we only need to estimate the value of TV ( µ , e1 + µ ) . According to lemma A.3 , we have TV ( µ , e1 + µ ) = Vol ( K∆ ( e1 +K ) ) 2Vol ( K ) = 1− Vol ( K ∩ ( e1 +K ) ) Vol ( K ) Note that K ∩ ( e1 +K ) = { x ∈ Rd ∣∣∣|x1|p + · · ·+ |xd|p ≤ rp , |x1 − |p + |x2|p + · · ·+ |xd|p ≤ rp } = { x ∈ Rd ∣∣∣ − ( rp − ( |x2|p + · · ·+ |xd|p| ) ) 1p ≤ x1 ≤ ( rp − ( |x2|p + · · ·+ |xd|p| ) ) 1p } = { x ∈ Rd ∣∣∣ − ( rp − ( |x2|p + · · ·+ |xd|p ) ) 1p ≤ x1 ≤ 2 } ∪ { x ∣∣∣ 2 ≤ x1 ≤ ( rp − ( |x2|p + · · ·+ |xd|p| ) ) 1 p } : = Ω1 ∪ Ω2 where Ω1 ∩ Ω2 = ∅ It ’ s easy to verify that Vol ( Ω1 ) = Vol ( Ω2 ) according to integration by substitution and therefore Vol ( K ∩ ( e1 +K ) ) = 2Vol ( Ω2 ) . To estimate the volume of Ω2 , we first introduce several lemmas below for the convenience of later discussion . Lemma I.1 ( Volume formula of d-dimensional lp norm ball ) . The volume of d-dimensional lp ball of radius r is given by V ( d ) p = ( 2r ) d Γ ( 1 + 1p ) d Γ ( 1 + dp ) ( 147 ) Lemma I.2 . The d-dimensional lp ball of volume 1 has radius about d 1 p 2 ( pe ) 1 p Γ ( 1+ 1p ) . Proof . When dimension d is big enough , we can obtain an asymptotic volume estimation of lp norm ball with radius r. V ( d ) p = ( 2r ) d Γ ( 1 + 1p ) d Γ ( 1 + dp ) ≈ ( 2r ) d Γ ( 1 + 1p ) d√ 2π dp ( d pe ) d p = √ p 2πd ( 2r ( pe ) 1 pΓ ( 1 + 1p ) d 1 p ) d ( 148 ) where the first equality is due to lemma I.1 and the approximate equality is due to Stirling ’ s formula about the estimation of gamma function that Γ ( z + 1 ) ≈ √ 2πz ( z e ) z . Thus , when V ( d ) p = 1 , we have r ≈ d 1 p 2 ( pe ) 1 pΓ ( 1 + 1p ) ( 149 ) Then we estimate the volume of lp norm ball cap by studying the asymptotic property of the mass distribution of lp norm ball . To begin with , let ’ s estimate the ( d− 1 ) -dimensional volume of a slice through the center of the lp ball of volume 1 . Note that the ball has radius r = ( V ( d ) p ) − 1 d . The slice is an ( d− 1 ) -dimensional ball of this radius , so its volume is V ( d−1 ) p r d−1 = V ( d−1 ) p ( V ( d ) p ) − d−1d = 2d−1 Γ ( 1 + 1p ) d−1 Γ ( 1 + d−1p ) ( 2d Γ ( 1 + 1p ) d Γ ( 1 + dp ) ) − d−1d ( 150 ) Using Stirling ’ s formula again , when d is sufficiently large , we have V ( d−1 ) p r d−1 = 2d−1 Γ ( 1 + 1p ) d−1 Γ ( 1 + d−1p ) ( 2d Γ ( 1 + 1p ) d Γ ( 1 + dp ) ) − d−1d = 2d−1 Γ ( 1 + 1p ) d−1√ 2π d−1p ( d−1 pe ) d−1 p ( 2d Γ ( 1 + 1p ) d√ 2π dp ( d pe ) d p ) − d−1d = 1√ 2π d−1p ( d−1 pe ) d−1 p · 1 ( √ 2π dp ( d pe ) d p ) − d−1d = 1 ( 2πp ) 12d ( d− 1 ) d−1p + 12 d− d−1p − d−12d = ( 1 + 1d−1 ) d−1 p + 1 2 ( 2πdp ) 1 2d ≈ e 1 p where the second equality is due to Stirling ’ s formula for Γ ( 1+ d−1p ) and Γ ( 1+ d p ) ; the third equality just eliminate the exponential of 2 and Γ ( 1 + 1p ) . Thus , we conclude that the slice has volume about e 1 p when d is large . Then , consider the ( d− 1 ) -dimensional volumes of parallel slices . The slice at distance x from the center is an ( d− 1 ) -dimensional ball whose radius is ( rp − xp ) 1 p , so the volume of the smaller slice is about e 1 p ( ( rp − xp ) 1 p r ) d−1 = e 1 p ( 1− ( x r ) p ) d−1p Since r is roughly d 1 p 2 ( pe ) 1 p Γ ( 1+ 1p ) , this is about e 1 p ( 1− ( 2x ( pe ) 1pΓ ( 1 + 1p ) d 1 p ) p ) d−1p = e 1 p ( 1− pe ( 2xΓ ( 1 + 1p ) ) p d ) d−1 p ≈ exp ( 1 p −e ( 2xΓ ( 1+1 p ) ) p ) Thus , if we project the mass distribution of the lp ball of volume 1 onto a single coordinate direction , we get a distribution with density function f ( x ) = exp ( 1p − e ( 2xΓ ( 1 + 1 p ) ) p ) = exp ( 1 p − e ( 2 pΓ ( 1 p ) ) pxp ) . Thus , for an lp ball centered at original pointO with volume 1 and approximate radius d 1 p 2 ( pe ) 1 p Γ ( 1+ 1p ) , then we can use the integral 2 ∫ s 0 exp ( 1 p − e ( 2xΓ ( 1 + 1 p ) ) p ) dx to estimate the volume between two parallel slices at the same distance s from the center . Then the volume of lp ball cap corresponding to the slice at distance s from the center can be approximated by 12 − ∫ s 0 exp ( 1 p −e ( 2xΓ ( 1+ 1 p ) ) p ) dx . Note that the ratio k of slice ’ s distance d from center to radius r is about s / d 1 p 2 ( pe ) 1 p Γ ( 1+ 1p ) = 2s ( pe ) 1 p Γ ( 1+ 1p ) d 1 p , i.e . s = kd 1 p 2 ( pe ) 1 p Γ ( 1+ 1p ) . Thus , the volume of cap can be represented as 1 2 − ∫ kd 1p 2 ( pe ) 1 p Γ ( 1+ 1 p ) 0 exp ( 1 p − e ( 2xΓ ( 1 + 1 p ) ) p ) dx which is only related to the ratio k. Then , we can conclude that for a lp ball with radius r , when dimension d is large enough and its cap corresponding to the slice at distance h form the center , then the volume ratio of cap to ball is approximately 1 2 − ∫ sd 1p 2r ( pe ) 1 p Γ ( 1+ 1 p ) 0 exp ( 1 p − e ( 2xΓ ( 1 + 1 p ) ) p ) dx ( 151 ) Thus , Vol ( Ω2 ) Vol ( K ) = 1 2 − ∫ d 1p 4r ( pe ) 1 p Γ ( 1+ 1 p ) 0 exp ( 1 p − e ( 2xΓ ( 1 + 1 p ) ) p ) dx ( 152 ) and therefore TV ( µ , e1 + µ ) = 1− Vol ( K ∩ ( e1 +K ) ) Vol ( K ) = 1− 2Vol ( Ω2 ) Vol ( K ) = 2 ∫ d 1p 4r ( pe ) 1 p Γ ( 1+ 1 p ) 0 exp ( 1 p − e ( 2xΓ ( 1 + 1 p ) ) p ) dx J PROOF OF THEOREM 3.7 Proof . Note that f ( x ) and g ( x ) are respectively density functions of reference measure ρ = x + µ and perturbed measure ν and q ( x ) is defined as g ( x ) − f ( x ) . Therefore EX∼ν [ φ ( X ) ] = ∫ φ ( x ) g ( x ) dx = ∫ φ ( x ) ( g ( x ) − f ( x ) ) dx+ ∫ φ ( x ) f ( x ) dx = ∫ φ ( x ) q ( x ) dx+ ∫ φ ( x ) f ( x ) dx = ∫ φ ( x ) q ( x ) dx+ EX∼x+µ [ φ ( X ) ] where the first term contains all the uncertainty in one functional variable q ( x ) and the second term is a constant when sample point x , smoothing measure µ and specification φ are fixed . And when ν ∈ Dx , δ , p or equivalently Wp ( ν , x + µ ) ≤ δ , applying the dual form of Wp distance given in formula 30 and 31 , we have W1 ( ν , x+ µ ) = sup ϕ∈F1 ∫ ϕ ( x ) ( f − g ) ( x ) dx = sup ϕ∈F1 ∫ ϕ ( x ) ( g − f ) ( x ) dx = sup ϕ∈F1 ∫ ϕ ( x ) q ( x ) dx = sup ||f ||L≤1 ∫ f ( x ) q ( x ) dx ≤ δ ( 153 ) And when ν ∈ Dx , ξ or equivalently TV ( ν , x+ µ ) ≤ ξ , applying lemma A.3 for absolutely continuous measure , we have TV ( ν , x+ µ ) = 1 2 ∫ |f ( x ) − g ( x ) |dx = 1 2 ∫ |q ( x ) |dx ≤ ξ ( 154 ) It follows that OPT ( φ , x+ µ , Dx , δ , p ∩Dx , ξ ) is equivalent to minν∈Dx , δ , p∩Dx , ξ E [ φ ( X ) ] according to the definition and therefore equivalent to optimization problem 23 which is obviously convex according to 153 and 154 . K PROOF OF THEOREM 3.8 Recall the following result proved in the section before EX∼ν [ φ ( X ) ] = ∫ φ ( x ) q ( x ) dx+ EX∼x+µ [ φ ( X ) ] ( 155 ) When ν ∈ Dx , δ , p or equivalently Wp ( ν , x + µ ) ≤ δ , applying the dual form of Wp distance given in formula 32 and noticing that supy∈spt ( ν ) ∪spt ( x+µ ) ||y||2 = ||x||2 + R + max { , d 1 2− 1 q } : = R∗ , we have ( sup ϕ∈Lip ( p ( 2R∗ ) p−1 ) ∫ ϕ ( y ) ( g − f ) ( y ) dy − ( p− 1 ) ( 2R∗ ) p−1 ) 1 p ≤Wp ( ν , x+ µ ) ≤ δ ( 156 ) or equivalently sup ϕ∈Lip ( p ( 2R∗ ) p−1 ) ∫ ϕ ( y ) ( g − f ) ( y ) dy = sup ||f ||L≤p ( 2R∗ ) p−1 ∫ f ( x ) q ( x ) dx ≤ δp + ( p− 1 ) ( 2R∗ ) p−1 ( 157 ) where Lip ( p ( 2R∗ ) p−1 ) denotes all maps f from Rd to R such that |f ( x ) −f ( y ) | ≤ p ( 2R∗ ) p−1||x− y|| for all x , y ∈ K. Note OPT ( φ , x+µ , Dx , δ , p∩Dx , ξ ) is equivalent to minν∈Dx , δ , p∩Dx , ξ E [ φ ( X ) ] according to the definition and therefore can be relaxed into optimization problem which is obviously convex according to 157 and 154 . L PROOF OF THEOREM 3.9 Proof . For 0 < p ≤ 1 , the optimization over q can be solved using Lagrangian duality as follows : we dualize the constraints on q and obtain L ( λ ) = inf ||q||1≤2ξ ( ∫ φ ( x ) q ( x ) dx+ EX∼x+µ [ φ ( X ) ] + λ ( sup ||f ||L , p≤1 ∫ f ( x ) q ( x ) dx− δ ) ) = EX∼x+µ [ φ ( X ) ] + inf ||q||1≤2ξ sup ||f ||L , p≤1 ( ∫ φ ( x ) q ( x ) dx+ λ ( sup ||f ||L≤1 ∫ f ( x ) q ( x ) dx− δ ) ) = EX∼x+µ [ φ ( X ) ] + inf ||q||1≤2ξ sup ||f ||L , p≤1 ∫ ( φ ( x ) + f ( x ) ) q ( x ) dx− λδ = EX∼x+µ [ φ ( X ) ] + sup ||f ||L , p≤1 inf ||q||1≤2ξ ∫ ( φ ( x ) + f ( x ) ) q ( x ) dx− λδ = EX∼x+µ [ φ ( X ) ] + sup ||f ||L , p≤1 inf ||q||1≤2ξ − ∫ ∣∣ ( φ ( x ) + f ( x ) ) q ( x ) ∣∣dx− λδ ( 158 ) = EX∼x+µ [ φ ( X ) ] − inf ||f ||L , p≤1 sup ||q||1≤2ξ ∫ ∣∣ ( φ ( x ) + f ( x ) ) q ( x ) ∣∣dx− λδ = EX∼x+µ [ φ ( X ) ] − 2ξ inf ||f ||L , p≤1 ∣∣∣∣φ ( x ) + f ( x ) ∣∣∣∣∞ − λδ ( 159 ) = EX∼x+µ [ φ ( X ) ] − 2ξ − λδ ( 160 ) where 158 is due to the choice of q ( x ) such that sgn ( q ( x ) ) = sgn ( φ ( x ) + f ( x ) ) ; 159 is due to Holder inequality when q = 1 , p =∞ ; 160 is due to the fact that inf ||f ||L≤1 ∣∣∣∣φ ( x ) + f ( x ) ∣∣∣∣∞ = 1 since the range of φ ( x ) is { ±1 } in applications and f can not change suddenly when crossing the decision region boundary of φ due to the Lipschitz constant constraint . Similarly , for p > 1 , we have L ( λ ) = inf ||q||1≤2ξ ( ∫ φ ( x ) q ( x ) dx+ EX∼x+µ [ φ ( X ) ] + λ ( sup ||f ||L≤p ( 2R∗ ) p−1 ∫ f ( x ) q ( x ) dx− ( δp + ( p− 1 ) ( 2R∗ ) p−1 ) ) ) = EX∼x+µ [ φ ( X ) ] + inf ||q||1≤2ξ sup ||f ||L≤p ( 2R∗ ) p−1 ( ∫ φ ( x ) q ( x ) dx+ λ ( sup ||f ||L≤p ( 2R∗ ) p−1 ∫ f ( x ) q ( x ) dx− ( δp + ( p− 1 ) ( 2R∗ ) p−1 ) ) ) = EX∼x+µ [ φ ( X ) ] + inf ||q||1≤2ξ sup ||f ||L≤p ( 2R∗ ) p−1 ∫ ( φ ( x ) + f ( x ) ) q ( x ) dx− λ ( δp + ( p− 1 ) ( 2R∗ ) p−1 ) = EX∼x+µ [ φ ( X ) ] + sup ||f ||L≤p ( 2R∗ ) p−1 inf ||q||1≤2ξ ∫ ( φ ( x ) + f ( x ) ) q ( x ) dx− λ ( δp + ( p− 1 ) ( 2R∗ ) p−1 ) = EX∼x+µ [ φ ( X ) ] + sup ||f ||L≤p ( 2R∗ ) p−1 inf ||q||1≤2ξ − ∫ ∣∣ ( φ ( x ) + f ( x ) ) q ( x ) ∣∣dx− λ ( δp + ( p− 1 ) ( 2R∗ ) p−1 ) = EX∼x+µ [ φ ( X ) ] − inf ||f ||L≤p ( 2R∗ ) p−1 sup ||q||1≤2ξ ∫ ∣∣ ( φ ( x ) + f ( x ) ) q ( x ) ∣∣dx− λ ( δp + ( p− 1 ) ( 2R∗ ) p−1 ) = EX∼x+µ [ φ ( X ) ] − 2ξ inf ||f ||L≤p ( 2R∗ ) p−1 ∣∣∣∣φ ( x ) + f ( x ) ∣∣∣∣∞ − λ ( δp + ( p− 1 ) ( 2R∗ ) p−1 ) = EX∼x+µ [ φ ( X ) ] − 2ξ − λ ( δp + ( p− 1 ) ( 2R∗ ) p−1 ) M PROOF OF THEOREM 3.10 Recall the certificate by using Hockey-stick divergence provided in table 4 in Dvijotham et al . ( 2020 ) as below HS , β ≤ [ β ( θa − θb ) − |β − 1| 2 ] + When β = 1 , it follows that HS,1 ≤ [ θa − θb 2 ] + Besides , recall the relaxation radius using Hockey-stick divergence as below HS,1 = G ( 2σ ) −G ( − 2σ ) = 2G ( 2σ ) − 1 And plug it in above inequality , we have HS,1 = 2G ( 2σ ) − 1 ≤ [ θa − θb 2 ] + And recall the definition of θa and θb , we have EX∼x+µ [ φ ( X ) ] = θa − θb Thus , our certificate EX∼x+µ [ φ ( X ) ] − 2 ( 2G ( 2σ ) − 1 ) ≥ 0 is equivalent to 2G ( 2σ ) − 1 ≤ θa − θb 2 Thus , the equivalence relation holds . | The authors provide robustness certification results for smoothed classifiers. Specifically, the considered setting follows that of Dvijotham (2020) except the base smoothing distribution is specified to have bounded support, and the relaxation follows from an intersection of Wasserstein and TV balls. Under this setting, much of the technical machinery describes which Wasserstein and TV balls are needed to cover these bounded-support smoothing distributions. | SP:29a0522752ffb52ec7ea614953efdab3f4d58956 |
Learning affective meanings that derives the social behavior using Bidirectional Encoder Representations from Transformers | 1 INTRODUCTION . Consider talking to your mentor for some advice about how to behave with your colleague . Your mentor probably starts asking questions about the culture in the workspace and may continue asking about the identity of the person . These questions could be about institutional constraints such as being the manager , or they could be personality sentiment such as being nice or active . Knowing this information , your mentor may have some initial recommendations , but you adapt your behavior after observing the reactions from the colleague . This is a descriptive scenario for a daily interaction . Affect Control Theory ( ACT ) quantifies the variables in this scenario and produces equations for simulating human behavior in social interactions . ACT was introduced in the 1970s ( Heise , 1977 ) and has been validated in more than 100 social science projects ( Robinson & Smith-Lovin , 2018 ) . ACT has been used in interdisciplinary applications such as Human-Computer Interactions ( Robillard & Hoey , 2018 ) , finding how language cultures affect social response ( Kriegel et al. , 2017 ) , and modeling identities and behaviors within groups ( Rogers & Smith-Lovin , 2019 ) . More recently , Mostafavi ( 2021 ) introduced ACT to estimate and track emotional states during online messaging . For example , chatbots can use the ACT framework to understand the emotional state of the customer in real time and adapt their behavior accordingly . While the potential uses of ACT are understanding emotional changes during online messaging Mostafavi ( 2021 ) , real life applications are limited due to the vocabulary size of affective dictionaries . ACT uses a three-dimensional affective meaning space as a quantified form of sentiments ( Heise , 1977 ) . ACT uses Evaluation [ good vs. bad ] , Potency [ powerful vs. powerless ] , and Activity [ active vs. passive ] ( EPA ) space introduced by Osgood et al . ( 1957 ) as a semantic differential form of affective meaning . These affective lexicons represent the word of interest within cultural and social boundaries ( Robinson & Smith-Lovin , 1992 ) . Fontaine et al . ( 2007 ) found that EPA scores are the first three principal components after reducing dimensionality on 144 features representing the main components of emotions . Historically , surveys are used to quantify the affective meanings within a cultural group . To compensate for unreliability in the survey , most EPA surveys are designed so that each word is scored by at least 25 different participants . Thus , finding the affective meaning for 5000 words requires over 125,000 ratings and 400 hours of respondent time ( Heise , 2010 ) . Because ACT also requires EPA estimates for social interactions , EPA surveys must also include participants to score a large number of additional scenarios . Due to the high cost and time required , most EPA surveys have been focused on a small number of words which has limited the applicability of ACT . As an alternative to conducting new surveys , researchers have tried supervised ( Mostafavi & Porter , 2021 ; Li et al. , 2017 ) and semi-supervised ( Alhothali & Hoey , 2017 ) methods on shallow word-embeddings to find affective lexicons . However , their performance on the activity and potency dimensions is poor . In this paper , we discuss the main limitations for the applicability of shallow word-embeddings . In this work , we use deep sentence-embedding to consider contexual aspects of concepts in social events . For that purpose , we show how to generate a contextual data-set describing social events to train and test a deep neural network . We use Bidirectional Encoder Representations from Transformers ( BERT ) embedding tuned for finding affective lexicons . The performance of our approach achieves state-of-the-art accuracy in estimating affective lexicons . 2 BACKGROUND . In this section , we start with a review of ACT and how it uses sentiment of social characters to model interactions . Then we review related works to estimate affective meanings from corpus and discuss their main limitations . Finally , we briefly review the BERT model and how we can use this model as a deep embedding space . 2.1 AFFECT CONTROL THEORY . According to ACT , every concept representing interactions is quantified in EPA space . The baseline EPA representation of words is known as sentiments . Figure 1 visualizes EPA representation of some sample words . In this plot , we can observe that “ suicidal ” and “ nervous ” both have bad , powerless , and passive meanings but “ suicidal ” is more negative in all three dimensions . On the other hand , “ happy ” is a pleasant , powerful , and active word . Note the range of EPA ratings is from -4.3 to 4.3 . ACT considers social interactions or events that include an actor that behaves toward an object . Extracting the Actor-Behavior-Object ( ABO ) components of an event is the first step in modeling interactions ( Heise , 2010 ) . Actor/Object in an event has an identity such as “ baby ” or “ boss ” . In some cases , the characteristics of an actor/object is part of the identity . For example , the identity of a person is “ nervous boss ” . In these cases , modifiers are amalgamated to their identities . Figure . 1 is a visualization of sample words in EPA space . It uses symbols to represent that a concept is evaluated as identity , behavior , or modifier . According to ACT theory , social events make impressions on ABO characters ( Robinson & SmithLovin , 1999 ) . Consider an example of observing “ a bossy employer argues with an employee ” . This observation leads people to evaluate both the actor and the object of the interaction are less pleasant than initial thoughts . They may also feel the employer is more powerful , and the employee is more powerless than their baseline sentiments after observing this event . Being more pleasant/powerful is impression of observing and event and it means higher value in evaluation/potency . If actor/object behaves as expected , then impression of identity does not change far from baseline , but if actor/object does something unexpected , then a large change from the baseline is expected . Deflection is the euclidean distance between the baseline sentiments of ABO characters and their impressions following an event . If the impression of an ABO event is close to initial sentiments , deflection is small , and it gets bigger when the impression of the event leaves the initial sentiments . ACT discusses that minimizing deflection is the driving force in human activity . Highly deflecting events create social and physiological distress ( Goldstein , 1989 ) . For example , if a grandmother fights with her grandchild , the grandmother and the grandchild feel distressed and prefer to do something . We may expect one side to take an action , like apologize , to bring the impression of their identities back to where they views themselves in the society . This highly deflected event is very different from two soldiers fighting in a battle . The soldiers are supposed to fight with enemies in battle , so they may not feel social pressure to change their behavior . Heise ( 2013 ) developed a software called INTERACT . It simulates sequential interactions between two identities and finds the behavior that minimizes the deflection . It can also predict attributes and emotions during the interaction . Consider the following set of events/interactions that we simulate using INTERACT , 1 . Employee greets bossy employer . 2 . Bossy employer asks employee . 3 . Employee replies to bossy employer . 4 . Bossy employer argues with employee . 5 . Employee listens to / disobeys bossy employer . The visualization in Figure 2 shows how the impression of actor/object ’ s identity changed based on sequential interactions . Let ’ s focus on evaluation dimension for the employer . Employer has a negative baseline evaluation but after observing the first two interactions , it increases . The first two interactions include positively rated behaviors . After second interaction , impression of the employer ’ s identity is positively evaluated and so the next positively evaluated action , replies to , does not move it substantially . A positive behavior is expected from a positive identity . However , in the fourth interaction , the employer is evaluated to have an unpleasant identity after doing a negative behavior , argue with . For the fifth event , we have shown how the impression of different actions by the employee has significantly moved the states for both the actor and the object . The sequential interactions discussed here are similar to our mentorship example discussed the beginning . It shows how understanding the interaction dynamic can make us predict the consequences of our behavior . ACT has rules to describe how impression of an events changes affective meaning of ABO characters . ACT uses either mathematical equations or descriptive forms to discuss these rules . The following two descriptive forms show how the identity of the actor is impressed by some events , • Actors seem nice when they behave in a positive way toward others . This describes morality fact in ACT literature . Observing the evaluation dimension for the actors after he greets the object , we can find this behavior resulted in an impression of being nicer ( getting larger evaluation ) comparing to the state in the last step . • Active behaviors make the actors seem more active . Observing the boss ’ s activity , he is considered more active after he argues with [ active behavior ] the employee . As we have seen in the descriptive forms , events can change the impression of ABO characters . They move them toward or away from their currentor initial sentiments . To formulate the process in mathematical space , we briefly review the quantification process using surveys . The first step is quantifying the sentiments that are introduced as identity , behavior , and modifier . For this purpose , at least 25 participants rate words of interest in EPA space ( Heise , 2010 ) . In this survey , the participants rate how they feel about an identity/behavior/modifier such as “ employer ” . After aggregating the sentiment surveys , every concept is assigned to its baseline affective meaning . The next step is identifying contributing facts that derive the impressions of events ( Robinson & Smith-Lovin , 1999 ) . For this purpose , the participants rate ABO characters again after observing a set of events . For example , participants rate affective meaning of “ employee ” , “ greet ” , and “ employer ” after observing “ the employee greets the employer ” . As we discussed earlier , the ratings of ABO could be different from the initial basements . ACT uses regression models , known as impression change equations , to estimate these changes ( Heise , 2013 ) . Let X = [ Ae , Ap , Aa , Be , Bp , Ba , Oe , Op , Oa ] T represent the EPA values/sentiments of an ABO triple , where { A , B , O } represent the ABO characters and { e , p , a } the EPA components . Consider further the two-way interactions X2 = [ AeBe , AeOe , AeBa , . . . AaOa ] T and three-way interactions X3 = [ AeBeOe , AeBeOp , AeBeOa , . . . AaBaOa ] T . The basic structure of an impression change equation is the linear model X ′ = αX + βX2 + γX3 ( 1 ) where α , β , and γ are coefficient vectors and X ′ represent the resulting impression after the event . Modifiers can incorporated prior to impression change by changing the baseline values/sentiments ( e.g . bossy employer ) . Averett & Heise ( 1987 ) defined amalgamation equations similar to ( 2 ) to find the sentiments for an identity with a modifier . A = ρ+ θM + ψI , ( 2 ) ρ = [ −0.17 −0.18 0 ] , θ = [ 0.62 −0.14 −0.18 −0.11 0.63 0 0 0 0.61 ] , ψ = [ 0.50 0 0 0 0.56 0.07 0 −0.05 0.60 ] . where , A , M , I , represent affective meaning of actor ’ s identity , modifier , baseline identity and ρ , θ , ψ are vector of intercepts and coefficient matrices . Equation ( 2 ) is a weighted average of the evaluation for the modifier and the identity . | This paper proposes a new sentiment representation method by using Affect Control Theory (ACT) and BERT model. Using ACT could capture the social interactions and sentiment changes. The main contribution of this paper is the usage of ACT and the whole process. According to the experimental results, the BERT model shows good performance. | SP:f8f828468e58832938cfac03ceac0894b8919b4a |
An Operator Theoretic View On Pruning Deep Neural Networks | 1 INTRODUCTION . A surprising , but well-replicated , result in the study of deep neural network ( DNN ) optimization is that it is often possible to significantly “ prune ” the number of parameters after training with little effect on performance ( Janowsky , 1989 ; Mozer & Smolensky , 1989a ; b ; LeCun et al. , 1989 ; Karnin , 1990 ; Han et al. , 2015 ; Blalock et al. , 2020 ) . Because DNNs have become increasingly large and require considerable storage , memory bandwidth , and computational resources ( Han et al. , 2015 ) , finding a reduced form is desirable and has become an area of major research . In addition to the practical considerations , DNN pruning has become of theoretical interest , as the search for subnetworks that can be pruned with minimal effect on performance led to new insight on the success of large DNNs , via the development of the Lottery Ticket Hypothesis ( LTH ) ( Frankle & Carbin , 2019 ; Frankle et al. , 2020 ) . A considerable body of literature has been devoted to expanding , interrogating , and critiquing this theory , furthering the understanding of sparse DNNs . While many different methods exist for choosing which parameters to prune , including ones that take into account the gradient and the Hessian of the loss function ( LeCun et al. , 1989 ; Hassibi & Stork , 1993 ; Yu et al. , 2018 ; Lee et al. , 2019 ; 2020 ) , the simple approach of pruning based on a global threshold of parameters ’ magnitudes has been found to be robust and competitive with more complicated , state-of-the-art methods ( Blalock et al. , 2020 ) . In addition , early work on the LTH found that magnitude pruning could be successfully performed early during training ( although , iteratively pruning based on magnitude was found to yield considerably better results ) ( Frankle & Carbin , 2019 ) . Subsequent research has related the point in training time when iterative magnitude pruning can be successfully applied to a phenomenon known as “ linear mode connectivity ” ( Frankle et al. , 2020 ) . However , why magnitude pruning does not work before the emergence of linear mode connectivity , is not well understood . Therefore , there is a need to develop new , theoretically driven tools for studying magnitude pruning , especially during training pre-convergence ( Frankle et al. , 2021 ) . DNN training can be viewed as a discrete dynamical system , evolving the associated parameters along a trajectory . Despite the fact that this perspective is familiar ( indeed it is often taught in introductions to gradient descent ) , the complex dependence of the trajectory on the choice of optimization algorithm , architecture , activation functions , and data has kept dynamical systems theory from providing much insight into the behavior of DNNs . However , the recent development of Koopman operator theory ( Koopman , 1931 ; Koopman & Neumann , 1932 ; Mezić , 2005 ; Budišić et al. , 2012 ) , a rigorous , data-driven framework for studying nonlinear dynamical systems , has been successfully applied to DNNs and machine learning , more generally ( Dietrich et al. , 2020 ; Dogra & Redman , 2020 ; Tano et al. , 2020 ; Manojlović et al. , 2020 ; Mohr et al. , 2021 ; Naiman & Azencot , 2021 ) . This recent success motivated us to ask whether we could leverage Koopman operator theory to provide insight into the pruning of DNNs . We first made use of Koopman methods to define a new class of pruning algorithms . One method in this class , which we refer to as Koopman magnitude pruning , is shown to be equivalent to magnitude pruning at convergence . Early during training , we again find that the two methods are equivalent . The dynamical systems perspective of by Koopman pruning allows us to derive insight into the parameter dynamics present when the equivalence holds and when it does not . We find that the breaking of the equivalence occurs at a similar time that non-trivial structure emerges within the DNN . Finally , we extend our work beyond magnitude based pruning , showing that gradient pruning is equivalent to another form of Koopman pruning . Thus , the Koopman framework unifies magnitude and gradient pruning algorithms . Our contributions are the following : • A new class of theoretically motivated pruning methods ; • New insight on how training dynamics may impact the success ( or lack thereof ) of magnitude pruning pre-convergence ; • A unifying framework for magnitude and gradient based pruning . 2 KOOPMAN OPERATOR THEORY BASED PRUNING . Koopman operator theory is a dynamical systems theory that lifts the nonlinear dynamics present in a finite dimensional state space , to an infinite dimensional function space , where the dynamics are linear ( Koopman , 1931 ; Koopman & Neumann , 1932 ; Mezić , 2005 ) . While gaining an infinite number of dimensions would appear to make the problem intractable , numerical methods have been developed in the past two decades to find good finite dimensional approximations of the relevant spectral objects ( Mezić & Banaszuk , 2004 ; Mezić , 2005 ; Rowley et al. , 2009 ; Schmid , 2010 ; Tu et al. , 2014 ; Williams et al. , 2015 ; Mezić , 2020 ) . Given the powerful and interpretable tools that exist for studying linear systems , Koopman operator theory has found tremendous success in a number of applied settings . Below we discuss the basics of Koopman mode decomposition , a key element in Koopman operator theory , and use it to motivate a new class of pruning algorithms . We broadly refer to these methods as Koopman based pruning . For more details on Koopman operator theory , we refer the interested reader to Budišić et al . ( 2012 ) . 2.1 KOOPMAN MODE DECOMPOSITION . The central object of interest in Koopman operator theory is the Koopman operator , U , an infinite dimensional linear operator that describes the time evolution of observables ( i.e . functions of the underlying state space variables ) that live in the function space F . That is , after t > 0 amount of time , which can be continuous or discrete , the value of the observable g ∈ F , which can be a scalar or a vector valued function , is given by Utg ( p ) = g [ Tt ( p ) ] . ( 1 ) Here T is the nonlinear dynamical map evolving the system and p is the initial condition or location in state space . In the case of training a DNN , T is determined by the optimization algorithm and its associated hyperparameters ( e.g . learning rate ) , architecture , activation functions , and order in which the training data is presented . If the optimizer is ( a variant of ) stochastic gradient descent , then each epoch will have its own T , since the dynamic map depends on the ordering of the training data ( see Sec . 2.3 ) . The DNN parameter values that are set at initialization , θ ( 0 ) , is the associated initial condition [ i.e . p = θ ( 0 ) ] . The observable , g , could be chosen to be the identity function or some other function that might be relevant to a given DNN , such as its loss or gradient . However , note that Eq . 1 must hold for all g ∈ F . For the remainder of the paper , it will be assumed that the state space being considered is of finite dimension , and that F is the space of square-integrable functions . The action of the Koopman operator on the observable g can be decomposed as Ug ( p ) = R∑ i=0 λiφi ( p ) vi , ( 2 ) where the φi are eigenfunctions of U , with λi ∈ C as their eigenvalues and vi as their Koopman modes ( Mezić , 2005 ) . The decomposition of Eq . 2 is called the Koopman mode decomposition . The Koopman mode decomposition is powerful because , for a discrete dynamical system , the value of g at t ∈ Z+ time steps in the future is given by g [ Tt ( p ) ] = Utg ( p ) = R∑ i=0 λtiφi ( p ) vi . ( 3 ) From Eq . 3 , we see that the dynamics of the system in the directions vi , scaled by φi ( p ) , are given by the magnitude of the corresponding λi . Assuming that |λi| ≤ 1 for all i , finding the long time behavior of g amounts to considering only the φi ( p ) vi whose λi ≈ 1 . Given that the Koopman operator is linear , and it is known that even simple DNNs can have parameters that exhibit nonlinear dynamics ( Saxe et al. , 2014 ) , it may seem that applying Koopman methods to the training of DNNs is an over simplification . However , the Hartman-Grobman Theorem , a foundational result in dynamical systems theory , guarantees local neighborhoods around hyperbolic fixed points where the linearization captures the dynamical properties of the full , nonlinear system ( i.e . the two are conjugate ) ( Wiggins , 2003 ) . Additional work by Lan & Mezić ( 2013 ) extended the neighborhood where this conjugacy holds to the entirety of the basin . Therefore , as long as the DNN is in a basin of attraction of some fixed point , we can assume that the Koopman mode decomposition will provide an accurate representation to the true , nonlinear dynamics . There exist a number of different methods for computing the Koopman mode decomposition . While they differ in their assumptions on the dynamics of the system , they are all data-driven and require multiple snapshots of some g. In the case of DNN training , we can take g to be the identity function , and collect τ + 1 column vectors of the values the DNN parameters , θ , each taken at a different training step . That is , to compute the Koopman mode decomposition , the data matrix D = [ θ ( 0 ) , θ ( 1 ) , ... , θ ( τ ) ] ∈ RN× ( τ+1 ) must be constructed . For more details on the method used in this paper to compute the Koopman modes , and its computational demands , see Appendix A . 2.2 KOOPMAN BASED PRUNING . Any combination of DNN optimizer , architecture , activation function , and ordering of training data has an associated Koopman operator , U , which governs the flow of DNN parameters during training . This Koopman operator , in turn , has various directions along which the flow exponentially grows and shrinks ( i.e . the φi [ θ ( 0 ) ] vi ) . Previous work has shown that , over a non-trivial window of training , approximations of the Koopman operator can well capture the weight and bias dynamics of DNNs ( Dogra & Redman , 2020 ; Tano et al. , 2020 ) , suggesting that the φi [ θ ( 0 ) ] vi may be useful for pruning . If we order the modes by the real part of their eigenvalues , i.e . re ( λ1 ) > re ( λ2 ) > ... > re ( λR ) , and assume that λ1 = 1 ( a reasonable assumption in the case of stable dynamical systems , which we find corroborated in our experiments ) , then φ1 [ θ ( 0 ) ] v1 corresponds to the predicted fixed point of training . That is , the first mode identifies the parameter values that the DNN would take after training reached convergence . All additional modes would identify parameters that changed at increasingly larger exponential decays . If φ1 [ θ ( 0 ) ] v1 is accurate in its approximation of the fixed point , then pruning parameters based on their magnitude in φ1 [ θ ( 0 ) ] v1 could prove to be useful . We refer to this as Koopman magnitude pruning ( KMP ) to denote its similarity to global magnitude pruning ( GMP ) , a popular and robust approach to pruning ( Blalock et al. , 2020 ) . We make this connection explicit in Section 3 . Alternatively , the decaying modes , i.e . φ2 [ θ ( 0 ) ] v2 , φ3 [ θ ( 0 ) ] v3 ... , might be expected to convey useful information about which parameters are most coherently dynamic . We refer to this strategy as Koopman gradient pruning ( KGP ) to denote its similarity to gradient pruning . We make this connection explicit in Section 5 . Algorithm 1 General form for class of Koopman based pruning methods . 1 . Construct the data matrix D = [ θ ( 0 ) , θ ( 1 ) , ... , θ ( τ ) ] from τ + 1 snapshots of the parameter values θ during training . 2 . Compute the Koopman mode decomposition from D to obtain R Koopman modes , ( λi , φi , vi ) . 3 . Using a scoring function , s , that is a function of ( λi , φi , vi ) , create a pruning mask , m , that compresses the network by an amount c. In the case of KMP , s ( θ , λi , φi , vi ) = |φ1 [ θ ( 0 ) ] v1| , assuming that λ1 = 1 . 4 . Create the pruned DNN , f ( x ; θ m ) . These algorithms , KMP and KGP , are two of many possible methods for pruning based on the Koopman mode decomposition . Our methods can be extended to layer magnitude pruning , by splitting φ1 [ θ ( 0 ) ] v1 into subvectors and pruning each layer based on thresholds computed from each subvector . Algorithm 1 provides a general form for approaches in the class of Koopman based pruning . Note that we follow standard practice in the pruning literature and denote a DNN by f ( x ; θ ) , where x is its input and θ is its N parameters . The goal of pruning is to find a mask , m ∈ { 0 , 1 } N , such that the accuracy of f ( x ; θ m ) is comparable to the original DNN . Here denotes the usual element-wise multiplication . To determine which parameters to prune ( i.e . which mi = 0 ) , a scoring function , s , is used . In the case of GMP , s ( θi ) = |θi| . The DNN is compressed an amount c by keeping only the 100c % of parameters with the largest scores . If c = 4 , then only the parameters with scoring function values that are in the top 25 % are kept . | The authors studied network pruning from the perspective of dynamical system theory. They show that a new type of pruning method, named Koopman pruning, unifies magnitude pruning and gradient-based pruning to a degree. It also clarifies aspects of magnitude-based pruning before convergence in training. | SP:c0704b8a3266abd3de42e86e02bb7020f90b90f7 |
NAS-Bench-Suite: NAS Evaluation is (Now) Surprisingly Easy | 1 INTRODUCTION . Automated methods for neural network design , referred to as neural architecture search ( NAS ) , have been used to find architectures that are more efficient and more accurate than the best manually designed architectures ( Zoph et al. , 2018 ; Real et al. , 2019 ; So et al. , 2019 ) . However , it is notoriously challenging to provide fair comparisons among NAS methods due to potentially high computational complexity ( Zoph & Le , 2017 ; Real et al. , 2019 ) and the use of different training pipelines and search spaces ( Li & Talwalkar , 2019 ; Lindauer & Hutter , 2020 ) , resulting in the conclusion that “ NAS evaluation is frustratingly hard ” ( Yang et al. , 2020 ) . To make fair , statistically sound comparisons of NAS methods more accessible , tabular NAS benchmarks have been released ; these exhaustively evaluate all architectures in a given search space , storing the relevant training metrics in a lookup table ( Ying et al. , 2019 ; Dong & Yang , 2020 ; Zela et al. , 2020b ; Mehrotra et al. , 2021 ) . This substantially lowers the computational overhead of NAS experiments , since the performance of an architecture can be found simply by querying these tables , hence allowing for a rigorous comparison of various NAS algorithms with minimal computation . While early tabular NAS benchmarks , such as NAS-Bench-101 ( Ying et al. , 2019 ) and NAS-Bench201 ( Dong & Yang , 2020 ) , have been widely adopted by the community , they are limited to small search spaces and focus solely on image classification . Recently , benchmarks have been introduced for natural language processing ( Klyuchnikov et al. , 2020 ) , speech recognition ( Mehrotra et al. , 2021 ) , object detection , and self-supervised tasks ( Duan et al. , 2021 ) . Furthermore , the release of surrogate NAS benchmarks ( Siems et al. , 2020 ; Yan et al. , 2021 ) , which estimate the performance of all architectures in a search space via a surrogate model , has removed the constraint of exhaustively evaluating the entire search space , expanding the scope of possible search space sizes to 1018 and beyond . However , substantial differences in the abstractions ( such as whether a node or an edge denotes an operation ) , capabilities ( such as whether all , or only some , of the architectures can be queried ) , and implementations ( such as incompatible deep learning libraries ) have so far prevented nearly all research in NAS from providing results on more than two families of benchmarks . Overall , the lack of consistency in “ NAS-Bench ” datasets has significantly slowed their collective adoption . In this work , we show that there is a need to adopt newer benchmarks because many conclusions drawn from a small subset of benchmarks do not generalize across diverse datasets and tasks . Specifically , we present an in-depth analysis of popular black-box ( Real et al. , 2019 ; White et al. , 2021a ; Ottelander et al. , 2021 ) , one-shot ( Liu et al. , 2019b ; Chen et al. , 2021 ; Dong & Yang , 2019 ) , and performance prediction methods ( White et al. , 2021c ) across 25 different combinations of search spaces and datasets . To the best of our knowledge , this is by far the largest set of NAS search spaces and datasets on which experiments have been conducted to date . We show that many implicit assumptions in the NAS community are wrong . First , if a NAS algorithm does well on NAS-Bench101 and NAS-Bench-201 , it does not necessarily perform well on other search spaces . Second , NAS algorithms may not have robust default hyperparameters and therefore require tuning . Finally , tuning the hyperparameters of a NAS method on one search space and transferring these hyperparameters to other search spaces often make the NAS method perform significantly worse . In order to help NAS researchers and practitioners avoid these pitfalls , we release the NAS Benchmark Suite ( NAS-Bench-Suite ) , a comprehensive and extensible collection of NAS benchmarks , accessible through a unified interface , created with the aim to facilitate reproducible , generalizable , and rapid NAS research . Our work eliminates the overhead for NAS research to evaluate on several different datasets and problem types , helping the community to develop NAS methods that generalize to new problem types and unseen datasets . See Figure 1 for an overview . To ensure reproducibility and other best practices , we release our code and adhere to the NAS best practices checklist ( Lindauer & Hutter , 2020 , see Section 8 for details ) . Our contributions . We summarize our main contributions below . • We conduct a comprehensive study of the generalizability of NAS algorithms and their hyperparameters across 25 settings , showing that it is often not sufficient to tune on just a few benchmarks , and showing that the best hyperparameters depend on the specific search space . • We introduce a unified benchmark suite , NAS-Bench-Suite , which implements 25 different combinations of search spaces and datasets . By making it easy to quickly and comprehensively evaluate new NAS algorithms on a broad range of problems , our benchmark suite can improve experimental rigor and generalizability in NAS research . 2 NAS BENCHMARKS OVERVIEW . Preliminaries . A search space in NAS is the set of all architectures that the NAS algorithm is allowed to select . Most recent search spaces are defined by a cell-based ( micro ) structure and a macro structure . A cell is a small set of neural network operations arranged in a directed acyclic graph ( DAG ) , with constraints on the number of nodes , edges , and incoming edges per node . The macro structure consists of the architecture skeleton and the arrangement of cells , such as how many times each cell is duplicated . For many popular search spaces , the macro structure is completely fixed , while for other search spaces , the macro structure can have variable length , width , and number of channels for different architectures in the search space . A NAS benchmark ( Lindauer & Hutter , 2020 ) consists of a dataset ( with a fixed train-test split ) , a search space , and a fixed evaluation pipeline with predefined hyperparameters for training the architectures . A tabular NAS benchmark is one that additionally provides precomputed evaluations with that training pipeline for all possible architectures in the search space . Finally , a surrogate NAS benchmark ( Siems et al. , 2020 ; Yan et al. , 2021 ) is a NAS benchmark that provides a surrogate model that can be used to predict the performance of any architecture in the search space . We say that a NAS benchmark is queryable if it is either a tabular or surrogate benchmark . Queryable NAS benchmarks can be used to simulate NAS experiments very cheaply by querying the performance of neural networks ( using a table or a surrogate ) instead of training the neural networks from scratch . NAS benchmarks . Now we describe the characteristics of many popular NAS benchmarks . For a summary , see Table 1 , and for a more comprehensive and detailed survey , see Appendix A . The first tabular NAS benchmark to be released was NAS-Bench-101 ( Ying et al. , 2019 ) . This benchmark consists of 423 624 architectures trained on CIFAR-10 . The cell-based search space consists of a directed acyclic graph ( DAG ) structure in which the nodes can take on operations . A follow-up work , NAS-Bench-1Shot1 ( Zela et al. , 2020b ) , defines three subsets of NAS-Bench-101 which allow one-shot algorithms to be run . The largest subset size in NAS-Bench-1Shot1 is 363 648 . NAS-Bench-201 Dong & Yang ( 2020 ) is another popular tabular NAS benchmark . The cell-based search space consists of a DAG where each edge can take on operations ( in contrast to NAS-Bench101 , in which the nodes are operations ) . The number of non-isomorphic architectures is 6 466 and all are trained on CIFAR-10 , CIFAR-100 , and ImageNet-16-120 . NATS-Bench ( Dong et al. , 2021 ) is an extension of NAS-Bench-201 which also varies the macro architecture . NAS-Bench-NLP ( Klyuchnikov et al. , 2020 ) is a NAS benchmark for natural language processing , which is size 1053 . However , only 14 322 of the architectures were trained on Penn TreeBank ( Mikolov et al. , 2010 ) , meaning NAS-Bench-NLP is not queryable . NAS-Bench-ASR ( Mehrotra et al. , 2021 ) is a tabular NAS benchmark for automatic speech recognition . The search space consists of 8 242 architectures trained on the TIMIT dataset . TransNAS-Bench ( Duan et al. , 2021 ) is a tabular NAS benchmark consisting of two separate search spaces ( cell-level and macro-level ) and seven tasks including pixel-level prediction , regression , and self-supervised tasks . The cell and macro search spaces are size 4 096 and 3 256 , respectively . NAS-Bench-MR ( Ding et al. , 2021 ) is a surrogate NAS benchmark which evaluates across four datasets : ImageNet50-1000 , Cityscapes , KITTI , and HMDB51 . NAS-Bench-MR consists of a single search space of size 1023 . The DARTS ( Liu et al. , 2019b ) search space with CIFAR-10 , consisting of 1018 architectures , is arguably the most widely-used NAS benchmark . Recently , 60 000 of the architectures were trained and used to create NASBench-301 ( Siems et al. , 2020 ) , the first surrogate NAS benchmark . More recently , NAS-Bench-111 , NAS-Bench-311 , and NAS-Bench-NLP11 ( Yan et al. , 2021 ) were released as surrogate benchmarks that extend NAS-Bench-101 , NAS-Bench-301 , and NAS-Bench-NLP by predicting the full learning curve information . 3 NAS BENCHMARK STATISTICS . In this section and in Appendix B , we use NAS-Bench-Suite to compute a set of aggregate statistics across a large set of NAS benchmarks . There is a high variance with respect to the distribution of accuracies and other statistics across benchmarks due to substantial differences in the tasks performed and layout of the search space . It is essential to keep this in mind to ensure a fair comparison of the performance of NAS algorithms across these benchmarks . To the best of our knowledge , this is the first large-scale aggregation of statistics computed on NAS benchmarks . Figure 2 shows box plots for the validation accuracy distribution for a representative set of the 25 NAS benchmarks . We find that TransNAS-Bench ( Sem . Segment ) and DARTS achieve the highest median and maximum accuracies , yet they also have among the smallest variance in validation accuracy across the search space . On the other hand , the search space with the highest interquartile range is TransNAS-Bench Jigsaw . In Figure 3 , we assess the level of locality in each search space , or the similarity of validation accuracy among neighboring architectures ( architectures which differ by a single operation or edge ) using the random walk autocorrelation ( RWA ) ( Weinberger , 1990 ; Ying et al. , 2019 ; White et al. , 2021b ) . RWA computes the autocorrelation of accuracies of architectures during a random walk , in which each step perturbs one operation or edge . We see that NAS-Bench-201 ImageNet16-120 has the highest autocorrelation , while NAS-Bench-101 has the lowest . In Appendix B , we also discuss plots describing the average runtime for training architectures and the average neighborhood size , for each NAS benchmark . Overall , we see substantial differences among the search spaces along the various axes that we tested . Overall , we find that the diversity is important to keep into context when comparing across many different NAS benchmarks . For example , it is more impressive if a NAS algorithm discovers an architecture within 0.1 % of the optimal on NAS-Bench-201 ImageNet16-120 , compared to DARTS , because the standard deviation of accuracies for DARTS is much lower . Additional factors , such as locality and neighborhood size , also affect the difficulty of NAS benchmarks for some NAS algorithms more than for others ; for example , locality has a large effect on the performance of regularized evolution but not for random search . | The authors collected most of the existing NAS benchmarks to construct a new benchmark. A unified API is provided to use these existing search spaces and architecture datasets. Based on this the authors re-analyze some NAS algorithms on this new large and comprehensive benchmark and have some interesting observations. | SP:60f9746771f8a8c53f13dbafebf3ad2cdcec2367 |
Target Propagation via Regularized Inversion | 1 INTRODUCTION . Target propagation algorithms can be seen as perturbative learning alternatives to the gradient backpropagation algorithm , where virtual targets are propagated backward instead of gradients ( Le Cun , 1986 ; Le Cun et al. , 1989 ; Rohwer , 1990 ; Mirowski & LeCun , 2009 ; Bengio , 2014 ; Goodfellow et al. , 2016 ) . A high-level summary is presented in Fig . 1 : while gradient back-propagation considers storing intermediate gradients in a forward pass , target propagation algorithms proceed by computing and storing approximate inverses . The approximate inverses are then passed on backward along the graph of computations to finally yield a weight update for stochastic learning . Target propagation aims to take advantage of the availability of approximate inverses to compute better descent directions for the objective at hand . Bengio et al . ( 2013 ) ; Bengio ( 2020 ) argued that the approach could be relevant for problems involving multiple compositions such as the training of Recurrent Neural Networks ( RNNs ) , which generally suffer from the phenomenon of exploding or vanishing gradients ( Hochreiter , 1998 ; Bengio et al. , 1994 ; ? ) . Recently , empirical results indeed showed the potential advantages of target propagation over classical gradient back-propagation for training RNNs on several tasks ( Manchev & Spratling , 2020 ) . However , these recent investigations remain built on multiple approximations , which hinder the analysis of the core idea of TP , i.e. , using layer inverses . On the theoretical side , difference target propagation , a modern variant of target propagation , was related to an approximate Gauss-Newton method , suggesting interesting venues to explain the benefits of target propagation ( Bengio , 2020 ; Meulemans et al. , 2020 ) . Previous works have considered approximating inverses by adding multiple reverse layers ( Manchev & Spratling , 2020 ; Meulemans et al. , 2020 ; Bengio , 2020 ) . However , it is unclear whether such reverse layers actually learn layer inverses during the training process . Even if they were , the additional cost of computational complexity of learning approximate inverses should be carefully accounted for . In this work , we propose a simple target propagation approach , revisiting the original insights of Le Cun et al . ( 1989 ) on the critical importance of the good conditioning of layer inverses . We define regularized inverses through a variational formulation and we obtain approximate inverses via these regularized inverses . In this spirit , we can also interpret the difference target propagation formula ( Lee et al. , 2015 ) as a finite difference approximation of a linearized regularized inverse . We propose a smoother formula that can directly be integrated into a differentiable programming framework . G adien Back-P o aga ion Ta ge P o aga ion We detail the computational complexity of the proposed target propagation and compare it to the one of gradient back-propagation , showing that the additional cost of computing inverses can be effectively amortized for very long sequences . Following the benchmark of Manchev & Spratling ( 2020 ) , we observe that the proposed target propagation can perform better than classical gradientbased methods on several tasks involving RNNs . Related work . Many variations of back-propagation algorithms have been explored ; see Werbos ( 1994 ) ; Goodfellow et al . ( 2016 ) for an extensive bibliography . Closer to target propagation , penalized formulations of the training problem have been considered to decouple the optimization of the weights in a distributed way or using an ADMM approach ( Carreira-Perpinan & Wang , 2014 ; Taylor et al. , 2016 ; Gotmare et al. , 2018 ) . Rather than modifying the backward operations in the layers , one can also modify the weight updates for deep forward networks by using a regularized inverse ( Frerix et al. , 2018 ) . Wiseman et al . ( 2017 ) recast target propagation as an ADMM-like algorithm for language modeling and reported disappointing experimental results . Recently , in a careful experimental benchmark evaluation , Manchev & Spratling ( 2020 ) explored further target propagation to train RNNs , mapping a sequence to a single final output , in an attempt to understand the benefits of target propagation to capture long-range dependencies , and obtained promising experimental results . Another line of research has considered synthetic gradients that approximate gradients using an additional layer instead of using back-propagated gradients ( Jaderberg et al. , 2017 ; Czarnecki et al. , 2017 ) to speed up the training of deep neural networks . Recently , Ahmad et al . ( 2020 ) ; Dalm et al . ( 2021 ) considered using analytical inverses to implement target propagation and blend it with what they called a gradient-adjusted incremental formula . Yet , an additional orthogonality penalty is critical for their approach to work . Recently , Meulemans et al . ( 2020 ) considered using as many reverse layers as forwarding operations . We focus here on the optimization gains of using target propagation that can not be obtained by adding a prohibitive number of reverse layers . Finally , we do not discuss the biological plausibility of TP since we are unable to comment on this . We refer the interested reader to , e.g. , ( Bengio , 2020 ) . Notations . For f : Rp ⇥ Rq ! Rd , we denote @ xf ( x , y ) = @ f j ( x , y ) / @ xi i , j 2 Rd⇥p . 2 TARGET PROPAGATION WITH LINEARIZED REGULARIZED INVERSES . While target propagation was initially developed for multi-layer neural networks , we focus on its implementation for recurrent neural networks , as we shall follow the benchmark of Manchev & Spratling ( 2020 ) in the experiments . Recurrent Neural Networks ( RNNs ) are also a canonical family of neural networks in which interesting phenomena arise in back-propagation algorithms . Problem setting . A simple RNN parameterized by ✓ = ( Whh , Wxh , bh , Why , by ) maps a sequence of inputs x1 : ⌧ = ( x1 , . . . , x⌧ ) to an output ŷ = g✓ ( x1 : ⌧ ) by computing hidden states ht 2 Rp corresponding to the inputs xt . Formally , the output ŷ and the hidden states ht are computed as an output operation following transition operations defined as ŷ = c✓ ( h⌧ ) : = s ( Whyh⌧ + by ) , ht = f✓ , t ( ht 1 ) : = a ( Wxhxt +Whhht 1 + bh ) for t 2 { 1 , . . . , ⌧ } , where s is , e.g. , the soft-max function for classification tasks , a is a non-linear operation such as the hyperbolic tangent function , and the initial hidden state is generally fixed as h0 = 0 . Given samples of sequence-output pairs ( x1 : ⌧ , y ) , the RNN is trained to minimize the error ` ( y , g✓ ( x1 : ⌧ ) ) of predicting ŷ = g✓ ( x1 : ⌧ ) instead of y . As one considers longer sequences , RNNs face the challenge of exploding/vanishing gradients @ g✓ ( x1 : ⌧ ) / @ ht ( Bengio & Frasconi , 1995 ) ; see Appendix A for more discussion . We acknowledge that specific parameterization-based strategies have been proposed to address this issue of exploding/vanishing gradients , such as orthonormal parameterizations of the weights ( Arjovsky et al. , 2016 ; Helfrich et al. , 2018 ; Lezcano-Casado & Martınez-Rubio , 2019 ) . The focus here is to simplify and understand target propagation as a backpropagation-type algorithm using RNNs as a workbench . Indeed , training RNNs is an optimization problem involving multiple compositions for which approximate inverses can easily be available . The framework could also be potentially applied to , e.g. , time-series or control models ( Roulet et al. , 2019 ) . Given the parameters Whh , Wxh , bh of the transition operations , we can get approximate inverses of f✓ , t ( ht 1 ) for all t 2 { 1 , . . . , ⌧ } , that yield optimization surrogates that can be better performing than the ones corresponding to regular gradients . We present below a simple version of target propagation based on regularized inverses and inverse linearizations . Back-propagating targets . The idea of target propagation is to compute virtual targets vt for each layer t = ⌧ , . . . , 1 such that if the layers were able to match their corresponding target at time t , i.e. , f✓ , t ( ht 1 ) ⇡ vt , the objective would decrease . The final target v⌧ is computed as a gradient step on the loss w.r.t . h⌧ . The targets are then back-propagated using an approximate inverse1 f 1✓ , t of f✓ , t at each time step . Formally , consider an RNN that computed ⌧ states h1 , . . . , h⌧ from a sequence x1 , . . . , x⌧ with associated output y . For a given stepsize h > 0 , we propose to back-propagate targets by computing v⌧ = h⌧ h @ h ` ( y , c✓ ( h⌧ ) ) , ( 1 ) vt 1 = ht 1 + @ hf 1 ✓ , t ( ht ) > ( vt ht ) , for t 2 { ⌧ , . . . , 1 } . ( 2 ) The update rule ( 2 ) blends two ideas : i ) regularized inversion ; ii ) linear approximation . We shall describe below that our update ( 2 ) allows us to interpret the “ magic formula ” of difference target propagation in Eq . 15 of Lee et al . ( 2015 ) as 0th-order finite difference approximation , while ours is a 1st-order linear approximation . We shall also show that ( 2 ) puts in practice an insight from Bengio ( 2020 ) suggesting to use the inverse of the gradients in the spirit of a Gauss-Newton method . Once all targets are computed , the parameters of the transition operations are updated such that the outputs of f✓ , t at each time step move closer to the given target . Formally , the update consists of a gradient step with stepsize ✓ on the squared error between the targets and the current outputs , i.e. , for ✓h 2 { Whh , Wxh , bh } , ✓ next h = ✓h ✓ ⌧X t=1 @ ✓hkf✓ , t ( ht 1 ) vtk22/2 . ( 3 ) As for the parameters ✓y = ( Why , by ) of the output operation , they are updated by a simple gradient step on the loss with a stepsize ✓ . 2.1 REGULARIZED INVERSION . To explore further the original idea of Le Cun et al . ( 1989 ) , we consider using the variational definition of the inverse , f 1 ✓ , t ( vt ) = argmin vt 12Rp kf✓ , t ( vt 1 ) vtk22 = argmin vt 12Rp ka ( Wxhxt +Whhvt 1 + bh ) vtk22 . ( 4 ) As long as vt belongs to the image f✓ , t ( Rp ) of f✓ , t , this definition recovers exactly the inverse of vt by f✓ , t . More generally , if vt 62 f✓ , t ( Rp ) , Eq . ( 4 ) computes the best approximation of the 1In the following , to ease the presentation , we abuse notations and denote approximate inverses by f 1✓ , t . inverse in the sense of the Euclidean projection . When one considers an activation function a and ✓h = ( Whh , Wxh , bh ) , the solution of ( 4 ) can easily be computed . Formally , for the sigmoid , the hyperbolic tangent or the ReLU , their inverse can be obtained analytically for any vt 2 a ( Rp ) . So for vt 2 a ( Rp ) and Whh full rank , we get f 1 ✓ , t ( vt ) = ( W > hhWhh ) 1 W > hh ( a 1 ( vt ) Wxhxt bh ) . If vt 62 a ( Rp ) , the minimizer of ( 4 ) is obtained by first projecting vt onto a ( Rp ) , before inverting the linear operation . To account for non-invertible matrices Whh , we also add a regularization in the computation of the inverse . Overall we consider approximating the inverse of the layer by a regularized inverse of the form f 1 ✓ , t ( vt ) = ( W > hhWhh + r I ) 1 W > hh ( a 1 ( ⇡ ( vt ) ) Wxhxt bh ) , with r > 0 and ⇡ a projection onto a ( Rp ) . Regularized inversion vs. parameterized inversion . Bengio ( 2014 ) ; Manchev & Spratling ( 2020 ) parameterize the inverse as a reverse layer such that f 1 ✓ , t ( vt ) = ✓0 , t ( vt ) : = a ( Wxhxt + V vt + c ) , and learn the parameters ✓0 = ( V , c ) for this reverse layer to approximate the inverse of the forward computations . The parameterized layer needs to be learned to get a good approximation which involves numerically solving an optimization problem for each layer . These optimization problems come with a computational cost that can be better controlled by using regularized inversions presented earlier . However , the approach based on parameterized inverses may lack theoretical grounding , as pointed out by Bengio ( 2020 ) , as we do not know how close the learned inverse is to the actual inverse throughout the training process . In contrast , the regularized inversion ( 4 ) is less ad hoc and clearly defined and , as we shall show in the experiments , leads to competitive performance on real datasets . In any case , the analytic formulation of the inverse gives simple insights on an approach with parameterized inverses . Namely , the analytical formula suggests parameterizing the reverse layer s.t . ( i ) the reverse activation is defined as the inverse of the activation and not any activation , ( ii ) the layer uses a non-linear operation followed by a linear one instead of the usual scheme , i.e. , a linear operation followed by a non-linear one . | The authors study a variant of target propagation in which targets are computed by solving a sequence of minimization problems. Instead of resorting to iterative methods the authors propose to use an analytical solution. The algorithm is investigated as a recurrent neural network learning algorithm in a number of experiments. A relationship between the proposed descent direction and the loss function gradient is developed. | SP:66e5ebec53c030720e05ce949998e42a9dc655d6 |
A Sampling-Free Approximation of Gaussian Variational Auto-Encoders | 1 INTRODUCTION . Variational Auto-Encoders ( VAE ) allow generating data , mapping data into a latent space , and modifying data by perturbing it in a controlled manner in the latent space [ 1 , 2 ] . This enables them to generate and modify images [ 3 , 4 ] , speech [ 5 ] , and molecular structures [ 6 ] , or detect outliers in distributions [ 7 ] . VAEs extend the concept of regular auto-encoders by modeling the latent space as a distribution and with a distributional constraint that allows for a distributional latent space . Thus , they enforce all samples drawn from the prior to be representative for the data set . For this , VAEs predict a distribution through the encoder , sample from this distribution , and propagate the sample through the decoder . During training , they constrain the predicted distribution with respect to the prior , and require that the reconstructions produced by the decoder are correct . To allow for random sampling in the context of gradient descent , Gaussian VAEs employ the sampling reparameterization trick [ 8 ] , which enables backpropagation through the sampling operation . In fact , the sampling reparameterization trick and VAEs have received a lot of attention in research [ 3 , 9–11 ] . Recently , research has also started to look into techniques to compute the posterior and marginal distribution in an exact analytical solution without the need for sampling . In a sampling-free formulation , during training , the loss is not computed via stochastic sampling but derived by propagating the distributions from the latent space to the output space . However , computing the exact likelihood is in many cases intractable . Two approaches have recently been proposed to address this challenging problem . Balestriero et al . [ 12 ] propose to compute the likelihood for small neural networks by integration over piecewise continuous polytopes . Lucas et al . [ 13 ] formulate an analytical sampling-free linear VAE , which can be efficiently computed in closed form . In this context , the following work proposes a sampling-free approximate formulation for VAEs that allows sampling-free training of VAEs . To this end , we approach the problem of intractability by approximating the probability distributions instead of computing them exactly . This approximation is done by local Taylor series expansion of locally affine ( ReLU-activated ) neural networks . This corresponds to the local linearization of the respective neural network and allows for a local linearization of the decoder of the Gaussian VAE . We propose to use the local linearization to estimate the ( co- ) variances for each data point , while the median of the output distribution is computed exactly . Locally approximating neural networks by their Taylor series around each individual data point enables us to express the covariance matrix of the probability distribution in terms of the Jacobian of the neural network . Furthermore , as computing the covariance matrix explicitly is very expensive , the proposed formulation allows computing the likelihood without explicitly computing the covariance matrix nor its inverse . This allows us to compute the training objective without sampling at a reason- able additional cost for standard architectures , specifically , at the cost of evaluating the Jacobian of the decoder . Note that the local Taylor series expansion or local linearization of the neural network decoder function does neither correspond to a global linearization of the neural network decoder nor a global approximation via its Maclaurin series . We evaluate the proposed method on the CelebA [ 14 ] , the 3D Chairs [ 15 ] , and the MNIST [ 16 ] data sets . When considering the number of samples necessary to estimate a covariance matrix of equivalent quality wrt . the Frobenius norm via stochastic sampling , our approximation is ( on average ) equivalent to more than 235 samples for a deep network on the CelebA data set . Overall , the proposed approach achieves competitive results compared to sampling Gaussian VAEs . Especially on the Frechet Inception Distance ( FID ) [ 17 ] , the sampling-free VAE performs better than the sampling VAE , while the estimated marginal likelihoods between both methods are on par . This demonstrates that local linearization is a good approximation and does not damage performance in comparison to a regular sampling VAE . Following the setup by Lucas et al . [ 13 ] , the sampling-free VAE leads to smaller ( ǫ , δ ) −posterior collapse than its sampling counterpart . We summarize the contributions of this work as follows : • We present a novel sampling-free approximation for training Gaussian VAEs . In contrast to exact computation , it requires only a small overhead compared to its sampling counterpart , and reaches a less noisy approximation of the training objective than sampling . • We show that the sampling-free Gaussian VAE approximation achieves competitive performance on the MNIST , Omniglot , CelebA , and 3D Chairs data sets compared to sampling VAE methods . Also , the sampling-free formulation also achieves a better FID on CelebA when provided with the same computational budget as its sampling counterpart . • We find that sampling-free VAEs are more robust against posterior collapse than sampling VAEs . The full implementation as well as experiments will be publicly available upon publication . 2 RELATED WORK . Balestriero et al . [ 12 ] present an approach to compute the exact likelihood for small yet deep neural networks using the continuous piecewise affinity of respective neural networks to compute the exact likelihood by partitioning the network and integrating over the polytopes . Based on this , an analytical Expectation-Maximization algorithm is derived that enables gradient-free learning . The method is empirically validated by training a three layer deep generative network with 8 and 16 hidden units and with one latent dimension on the number 4 from the MNIST data set , where they demonstrate that an exact sampling-free VAE is superior to the stochastic sampling VAE . However , as the exact analytical formulation of deep neural networks has a computational complexity that is exponential in the size of the neural network , it is intractable for larger networks . Lucas et al . [ 13 ] examine sampling-free linear VAEs , which by the nature of their linearity allow for efficient exact computation of the likelihood and are able to show that the linear VAE recovers probabilistic principal component analysis ( pPCA ) [ 18 ] . They employ the sampling-free linear VAE for understanding posterior collapse in VAEs and apply it to the MNIST data set . Ghosh et al . [ 19 ] propose regularized deterministic auto-encoders , to learn a smooth latent space without sampling via different regularization schemes . They regularize their auto-encoders through weight decay , the gradient norm of the decoder and/or spectral normalization , which all bound the Lipschitz continuity of the decoder . Our work ( implicitly ) also includes a kind of gradient regularization of the decoder . However , in our work , this arises from approximating the marginal log-likelihood via local Taylor approximations of the decoder . Tolstikhin et al . [ 20 ] propose Wasserstein Auto-Encoders ( WAEs ) , which minimize the Wasserstein distance between the model distribution and the target distribution . Kolouri et al . [ 21 ] propose Sliced Wasserstein Auto-Encoders ( SWAEs ) , which regularize the auto-encoders using the sliced / marginal Wasserstein distance between the distribution of the encoded training samples and a predefined sampleable distribution . Note that both WAEs and SWAEs require sampling [ 20–22 ] . Knop et al . [ 22 ] propose Cramer-Wold Auto-Encoders ( CWAEs ) , a sampling-free distributionally regularized Auto-Encoder . They introduce the Cramer-Wold distance , which has a simple analytical formula for computing normality of high-dimensional samples . By regularizing their auto-encoders via the Cramer-Wold distance , they can evaluate their training objective in closed form . Note that CWAEs are not VAEs as , for VAEs , the distance to the true distribution is measured using KL divergence under the latent variable model [ 22 ] . Instead , the CWAE is a different kind of generative model that was designed to have a tractable sampling-free objective . Burda et al . [ 23 ] introduce importance weighted sampling for VAEs by using multiple samples to have a tighter variational lower bound . Huang et al . [ 24 ] propose hierarchical importance weighted auto-encoders reducing the number of redundant samples and introducing a hierarchical structure to induce correlation . Dieng et al . [ 25 ] use importance weighted VAEs using an EM-based algorithm employing moment matching . Roeder et al . [ 26 ] propose a low-variance gradient estimator for VAEs . Park et al . [ 27 ] enrich the posterior by applying the Laplace approximation to VAEs , which enables modeling a more expressive full-covariance Gaussian posterior . Tomczak et al . [ 28 ] also produce an improved posterior distribution through a Householder transformation-based volume-preserving flow . Nielsen et al . [ 29 ] bridge the gap between normalizing flows [ 30 ] and VAEs by preseting SurVAE Flows , which use surjective transformation which are deterministic in one direction and stochastic / sampling in the reverse direction . Morrow et al . [ 31 ] present VAEs with normalizing flow decoders . Taylor series approximations [ 32 ] are a ubiquitous tool in variational inference ( VI ) , e.g. , in the delta or the Laplace method [ 33 , 34 ] . VI methods , such as the delta method or the Laplace method require solving an optimization problem to obtain an approximation of an output distribution . In contrast , our method uses the Taylor approximation to produce a closed-form estimate of the training objective and the only optimization is the training of the VAE . A phenomenon frequently appearing in VAEs is posterior collapse , i.e. , the posterior distribution ( produced by an encoder ) is close to the prior distribution . This leads to a reduced expressivity of the VAE ’ s latent space . To tackle this , Kingma et al . [ 8 ] proposed to constrain the KL divergence such that it is only active if the KL divergence is above a threshold . Other works used KL annealing [ 35 , 36 ] or constrained the posterior to have a minimum distance to the prior [ 37 ] . Lucas et al . [ 13 ] defined the ( ǫ , δ ) −posterior collapse in order to reliably quantify posterior collapse in VAEs . 3 METHOD . We begin this section by introducing the conventional data generating process of VAEs . After that , we briefly motivate and derive the evidence lower bound ( ELBO ) and present our sampling-free local approximation of the ELBO including an efficient way of computing it . Following this , we discuss a method for stabilizing training and investigate the balance between reconstruction quality and variance of reconstructions . 3.1 GAUSSIAN VARIATIONAL AUTO-ENCODERS . We begin by stating the assumptions about the data generating process . Note that this process does not differ from the conventional data generating process of VAEs [ 1 ] . For easier reference , we follow the notation of Kingma and Welling [ 9 ] . The goal of VAEs is to approximate the true distribution of the data p∗ ( x ) with a distribution parameterized via a model pθ ( x ) ≈ p∗ ( x ) . Here , p ( z ) = N ( z ; 0 , I ) ( 1 ) pθ ( x|z ) = N ( x ; fθ ( z ) , cI ) for some c > 0 ( 2 ) pθ ( x ) = ∫ pθ ( z ) pθ ( x|z ) dz . ( 3 ) z denotes an m-dimensional vector referring to the hidden / latent space , x denotes an n-dimensional vector referring to the input / output space , fθ is the decoder / generator network , and c captures the observation uncertainty . N denotes a multivariate Gaussian distribution and Im the m×m identity matrix . To approximate the intractable pθ ( z|x ) , VAEs include an encoder network gφ and a network that computes the encoder ’ s uncertainty hφ ( in the form of a diagonal covariance matrix ) such that : qφ ( z|x ) ≈ pθ ( z|x ) where qφ ( z|x ) = N ( z ; gφ ( x ) , hφ ( x ) ) . ( 4 ) The training objective is to maximize the log-likelihood of our data log pθ ( x ) by optimizing θ and φ : log pθ ( x ) = Eqφ ( z|x ) ( log pθ ( x|z ) p ( z ) qφ ( z|x ) ) + Eqφ ( z|x ) ( log qφ ( z|x ) pθ ( z|x ) ) ( cf . [ 9 ] ) ( 5 ) = Eqφ ( z|x ) ( log pθ ( x|z ) ) − Eqφ ( z|x ) ( log qφ ( z|x ) p ( z ) ) + Eqφ ( z|x ) ( log qφ ( z|x ) pθ ( z|x ) ) ( 6 ) = Eqφ ( z|x ) ( log pθ ( x|z ) ) −DKL ( qφ ( z|x ) , p ( z ) ) ︸ ︷︷ ︸ ELBO +DKL ( qφ ( z|x ) , pθ ( z|x ) ) ︸ ︷︷ ︸ not computable but non-negative . ( 7 ) The last term is not computable , because pθ ( z|x ) is intractable , and hence the log-likelihood log pθ ( x ) can not be computed exactly . However , since a KL-divergence is non-negative , the first two terms yield a lower bound for log pθ ( x ) , the so-called evidence lower bound ( ELBO ) [ 1 , 9 , 38 ] . The ELBO is the substitute objective that allows training VAEs . ELBO = log pθ ( x ) −DKL ( qφ ( z|x ) , pθ ( z|x ) ) ≤ log pθ ( x ) ( 8 ) The KL-Divergence DKL ( qφ ( z|x ) , p ( z ) ) can be computed in closed form . However , the computation of Eqφ ( z|x ) ( log pθ ( x|z ) ) is generally intractable and is therefore usually approximated via stochastic sampling from the latent distribution qφ ( z|x ) . In the stochastic sampling approach , a data point x is propagated through gφ and hφ , an element z is sampled from N ( z ; gφ ( x ) , hφ ( x ) ) , and propagated through fθ , which approximates the output distribution ( including the observation uncertainty ) N ( x ; fθ ( z ) , cI ) where z ∼ N ( z ; gφ ( x ) , hφ ( x ) ) . Since the observation uncertainty is an isotropic normal distribution , the sample log-likelihood log pθ ( x|z ) reduces to log pθ ( x|z ) = − 1 2c ( ‖fθ ( z ) − x‖2 ) − n 2 log ( 2πc ) ( 9 ) which is , apart from the normalization constant , a mean squared error [ 1 ] . | The paper proposes an approximation that frees the calculation of ELBOs of Gaussian variational autoencoders from sampling. To achieve this, it utilizes Taylor expansion on the decoder networks. The proposed method was evaluated on three typical datasets. The authors also found that the approximation alleviated the issue of posterior collapse to the sampling VAEs. | SP:fc4fe8b6a9c90505e18dae21685b0de3a1f2fdc6 |
How Attentive are Graph Attention Networks? | 1 INTRODUCTION . Graph neural networks ( GNNs ; Gori et al. , 2005 ; Scarselli et al. , 2008 ) have seen increasing popularity over the past few years ( Duvenaud et al. , 2015 ; Atwood and Towsley , 2016 ; Bronstein et al. , 2017 ; Monti et al. , 2017 ) . GNNs provide a general and efficient framework to learn from graph-structured data . Thus , GNNs are easily applicable in domains where the data can be represented as a set of nodes and the prediction depends on the relationships ( edges ) between the nodes . Such domains include molecules , social networks , product recommendation , computer programs and more . In a GNN , each node iteratively updates its state by interacting with its neighbors . GNN variants ( Wu et al. , 2019 ; Xu et al. , 2019 ; Li et al. , 2016 ) mostly differ in how each node aggregates and combines the representations of its neighbors with its own . Veličković et al . ( 2018 ) pioneered the use of attention-based neighborhood aggregation , in one of the most common GNN variants – Graph Attention Network ( GAT ) . In GAT , every node updates its representation by attending to its neighbors using its own representation as the query . This generalizes the standard averaging or max-pooling of neighbors ( Kipf and Welling , 2017 ; Hamilton et al. , 2017 ) , by allowing every node to compute a weighted average of its neighbors , and ( softly ) select its most relevant neighbors . The work of 1An annotated implementation of GATv2 is available at https : //nn.labml.ai/graphs/gatv2/ 2from torch_geometric.nn.conv.gatv2_conv import GATv2Conv 3from dgl.nn.pytorch import GATv2Conv 4from tensorflow_gnn.graph.keras.layers.gat_v2 import GATv2Convolution k0 k1 k2 k3 k4 k5 k6 k7 k8 k9 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 0.08 0.10 0.10 0.07 0.08 0.08 0.11 0.09 0.20 0.08 0.05 0.10 0.10 0.04 0.04 0.04 0.13 0.06 0.38 0.04 0.05 0.10 0.10 0.04 0.05 0.05 0.13 0.06 0.38 0.05 0.08 0.10 0.10 0.07 0.08 0.08 0.10 0.09 0.24 0.08 0.08 0.09 0.09 0.07 0.07 0.07 0.10 0.08 0.27 0.07 0.09 0.11 0.11 0.08 0.09 0.08 0.11 0.10 0.16 0.09 0.04 0.10 0.11 0.03 0.04 0.04 0.14 0.06 0.40 0.04 0.07 0.09 0.09 0.06 0.07 0.07 0.10 0.08 0.29 0.07 0.04 0.11 0.11 0.02 0.04 0.03 0.14 0.07 0.41 0.04 0.07 0.09 0.09 0.06 0.07 0.07 0.11 0.08 0.30 0.07 k0 k1 k2 k3 k4 k5 k6 k7 k8 k9 0.1 0.2 0.3 0.4 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 ( a ) Attention in standard GAT ( Veličković et al . ( 2018 ) ) k0 k1 k2 k3 k4 k5 k6 k7 k8 k9 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 0.95 0.00 0.00 0.01 0.01 0.00 0.00 0.02 0.01 0.00 0.01 0.92 0.01 0.01 0.01 0.00 0.01 0.01 0.00 0.02 0.00 0.00 0.95 0.00 0.00 0.01 0.02 0.01 0.00 0.00 0.01 0.01 0.00 0.94 0.00 0.01 0.00 0.00 0.02 0.01 0.00 0.00 0.00 0.00 0.96 0.00 0.00 0.01 0.01 0.00 0.00 0.01 0.01 0.01 0.01 0.89 0.01 0.01 0.04 0.02 0.00 0.01 0.04 0.00 0.01 0.01 0.86 0.02 0.01 0.03 0.04 0.02 0.01 0.01 0.03 0.01 0.00 0.87 0.00 0.01 0.01 0.00 0.01 0.01 0.01 0.01 0.01 0.00 0.94 0.00 0.01 0.02 0.01 0.01 0.01 0.01 0.01 0.00 0.00 0.93 k0 k1 k2 k3 k4 k5 k6 k7 k8 k9 0.0 0.2 0.4 0.6 0.8 1.0 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 ( b ) Attention in GATv2 , our fixed version of GAT Figure 1 : In a complete bipartite graph of “ query nodes ” { q0 , ... , q9 } and “ key nodes ” { k0 , ... , k9 } : standard GAT ( Figure 1a ) computes static attention – the ranking of attention coefficients is global for all nodes in the graph , and is unconditioned on the query node . For example , all queries ( q0 to q9 ) attend mostly to the 8th key ( k8 ) . In contrast , GATv2 ( Figure 1b ) can actually compute dynamic attention , where every query has a different ranking of attention coefficients of the keys . Veličković et al . also generalizes the Transformer ’ s ( Vaswani et al. , 2017 ) self-attention mechanism , from sequences to graphs ( Joshi , 2020 ) . Nowadays , GAT is one of the most popular GNN architectures ( Bronstein et al. , 2021 ) and is considered as the state-of-the-art neural architecture for learning with graphs ( Wang et al. , 2019a ) . Nevertheless , in this paper we show that GAT does not actually compute the expressive , well known , type of attention ( Bahdanau et al. , 2014 ) , which we call dynamic attention . Instead , we show that GAT computes only a restricted “ static ” form of attention : for any query node , the attention function is monotonic with respect to the neighbor ( key ) scores . That is , the ranking ( the argsort ) of attention coefficients is identical for all nodes in the graph , and is unconditioned on the query node . This fact severely hurts the expressiveness of GAT , and is demonstrated in Figure 1a . Supposedly , the conceptual idea of attention as the form of interaction between GNN nodes is orthogonal to the specific choice of attention function . However , Veličković et al. ’ s original design of GAT has spread to a variety of domains ( Yang et al. , 2020 ; Wang et al. , 2019c ; Huang and Carley , 2019 ; Ma et al. , 2020 ; Kosaraju et al. , 2019 ; Nathani et al. , 2019 ; Wu et al. , 2020 ; Zhang et al. , 2020 ) and has become the default implementation of “ graph attention network ” in all popular GNN libraries such as PyTorch Geometric ( Fey and Lenssen , 2019 ) , DGL ( Wang et al. , 2019b ) , and others ( Dwivedi et al. , 2020 ; Gordić , 2020 ; Brockschmidt , 2020 ) . Many other works employed GNNs with attention mechanisms other than the standard GAT ’ s ( Yun et al . ( 2019 ) , see also Appendix A ) . However , none of these works identified the monotonicity of GAT ’ s attention mechanism , the theoretical differences between attention types , nor empirically compared their performance . To overcome the limitation we identified in GAT , we introduce a simple fix to its attention function by only modifying the order of internal operations . The result is GATv2 – a graph attention variant that has a universal approximator attention function , and is thus strictly more expressive than GAT . The effect of fixing the attention function in GATv2 is demonstrated in Figure 1b . In summary , our main contribution is identifying that one of the most popular GNN types , the graph attention network , does not compute dynamic attention , the kind of attention that it seems to compute . We introduce formal definitions for analyzing the expressive power of graph attention mechanisms ( Definitions 3.1 and 3.2 ) , and derive our claims theoretically ( Theorem 1 ) from the equations of Veličković et al . ( 2018 ) . Empirically , we use a synthetic problem to show that standard GAT can not express problems that require dynamic attention ( Section 4.1 ) . We introduce a simple fix by switching the order of internal operations in GAT , and propose GATv2 , which does compute dynamic attention ( Theorem 2 ) . We further conduct a thorough empirical comparison of GAT and GATv2 and find that GATv2 outperforms GAT across 12 benchmarks of node- , link- , and graph-prediction . For example , GATv2 outperforms extensively tuned GNNs by over 1.4 % in the difficult “ UnseenProj Test ” set of the VarMisuse task ( Allamanis et al. , 2018 ) , without any hyperparameter tuning ; and GATv2 improves over an extensively-tuned GAT by 11.5 % in 13 prediction objectives in QM9 . In node-prediction benchmarks from OGB ( Hu et al. , 2020 ) , not only that GATv2 outperforms GAT with respect to accuracy – we find that dynamic attention provided a much better robustness to noise . 2 PRELIMINARIES . A directed graph G = ( V , E ) contains nodes V = { 1 , ... , n } and edges E ⊆ V × V , where ( j , i ) ∈ E denotes an edge from a node j to a node i . We assume that every node i ∈ V has an initial representation h ( 0 ) i ∈ Rd0 . An undirected graph can be represented with bidirectional edges . 2.1 GRAPH NEURAL NETWORKS . A graph neural network ( GNN ) layer updates every node representation by aggregating its neighbors ’ representations . A layer ’ s input is a set of node representations { hi ∈ Rd | i ∈ V } and the set of edges E . A layer outputs a new set of node representations { h′i ∈ Rd ′ | i ∈ V } , where the same parametric function is applied to every node given its neighbors Ni = { j ∈ V | ( j , i ) ∈ E } : h′i = fθ ( hi , AGGREGATE ( { hj | j ∈ Ni } ) ) ( 1 ) The design of f and AGGREGATE is what mostly distinguishes one type of GNN from the other . For example , a common variant of GraphSAGE ( Hamilton et al. , 2017 ) performs an element-wise mean as AGGREGATE , followed by concatenation with hi , a linear layer and a ReLU as f . 2.2 GRAPH ATTENTION NETWORKS . GraphSAGE and many other popular GNN architectures ( Xu et al. , 2019 ; Duvenaud et al. , 2015 ) weigh all neighbors j ∈ Ni with equal importance ( e.g. , mean or max-pooling as AGGREGATE ) . To address this limitation , GAT ( Veličković et al. , 2018 ) instantiates Equation ( 1 ) by computing a learned weighted average of the representations ofNi . A scoring function e : Rd×Rd→R computes a score for every edge ( j , i ) , which indicates the importance of the features of the neighbor j to the node i : e ( hi , hj ) = LeakyReLU ( a > · [ Whi‖Whj ] ) ( 2 ) where a ∈ R2d′ , W ∈ Rd′×d are learned , and ‖ denotes vector concatenation . These attention scores are normalized across all neighbors j ∈ Ni using softmax , and the attention function is defined as : αij = softmaxj ( e ( hi , hj ) ) = exp ( e ( hi , hj ) ) ∑ j′∈Ni exp ( e ( hi , hj′ ) ) ( 3 ) Then , GAT computes a weighted average of the transformed features of the neighbor nodes ( followed by a nonlinearity σ ) as the new representation of i , using the normalized attention coefficients : h′i = σ ( ∑ j∈Ni αij ·Whj ) ( 4 ) From now on , we will refer to Equations ( 2 ) to ( 4 ) as the definition of GAT . 3 THE EXPRESSIVE POWER OF GRAPH ATTENTION MECHANISMS . In this section , we explain why attention is limited when it is not dynamic ( Section 3.1 ) . We then show that GAT is severely constrained , because it can only compute static attention ( Section 3.2 ) . Next , we show how GAT can be fixed ( Section 3.3 ) , by simply modifying the order of operations . We refer to a neural architecture ( e.g. , the scoring or the attention function of GAT ) as a family of functions , parameterized by the learned parameters . An element in the family is a concrete function with specific trained weights . In the following , we use [ n ] to denote the set [ n ] = { 1 , 2 , ... , n } ⊂ N . | This paper analyzes the limitation of GAT by pointing out that GAT computes a limited kind of attention: static attention. This paper then introduces a simple fix by modifying the order of operations and proposes GATv2: a dynamic attention variant. Experiments show that GATv2 can outperform GAT. | SP:dfdfd08fcf35668935298ab57e6b6626d277e5dd |
Classify and Generate Reciprocally: Simultaneous Positive-Unlabelled Learning and Conditional Generation with Extra Data | 1 INTRODUCTION . Existing machine learning methods , particularly deep learning models , typically require big data to pursue remarkable performance . For instance , conditional deep generative models are able to generate high-fidelity and diverse images , but they have to rely on vast amounts of labeled data ( Lucic et al. , 2019 ) . Nevertheless , it is often laborious or impractical to collect large-scale accurate class-labeled data in real-world scenarios , and thus the label scarcity is ubiquitous . Under such circumstances , the performance of classification and conditional generation ( Mirza & Osindero , 2014 ) drops significantly ( Lucic et al. , 2019 ) . At the same time , diverse unlabeled data are available in enormous quantities , and therefore a key issue is how to take advantage of the extra data to enhance the conditional generation or classification . Within the unlabeled data , both in-distribution and out-of-distribution data exist , where indistribution data conform to the distribution of the labeled data while out-of-distribution data do not . Our key insight is to harness the out-of-distribution data . In the generation with extra data , most related works focused on the in-distribution data ( Lucic et al. , 2019 ; Gui et al. , 2020 ; Donahue & Simonyan , 2019 ) . When it comes to the out-of-distribution data , the majority of existing methods ( Noguchi & Harada , 2019 ; Yamaguchi et al. , 2019 ; Zhao et al. , 2020 ) attempted to forcibly train generative models on a large amount of unlabeled data , and then transferred the learned knowledge of the pre-trained generator to the in-distribution data . In classification , a common setting to utilize unlabeled data is semi-supervised learning ( Miyato et al. , 2018 ; Sun et al. , 2019 ; Berthelot et al. , 2019 ) , which usually assumes that the unlabeled and labeled data come from the same distribution , ignoring their distributional mismatch . In contrast , Positive and Unlabeled ( PU ) Learning ( Bekker & Davis , 2020 ; Kiryo et al. , 2017 ) is an elegant way of handling this under-studied problem , where a model has the only access to positive samples and unlabeled data . Therefore , it is possible to utilize pseudo labels predicted by a PU classifier on unlabeled data to guide the conditional gen- eration . However , the predicted signals from the classifier tend to be noisy . Although there are a flurry of papers about learning from noisy labels for classification ( Tsung Wei Tsai , 2019 ; Ge et al. , 2020 ; Guo et al. , 2019 ) , to our best knowledge , no work has considered to leverage the noisy labels seamlessly in the joint classification and generation . Additionally , another work ( Hou et al. , 2018 ) leveraged GANs to recover both positive and negative data distribution to step away from overfitting , but they never considered the noise-invariant generation or their mutual improvement . The generative-discriminative complementary learning ( Xu et al. , 2019 ) was investigated in weakly supervised learning , but we are the first attempt to tackle the ( Multi- ) Positive and Unlabeled learning setting while developing the method of noise-invariant generation from noisy labels . Please refer to Section 5 for the discussion about more related works . In this paper , we focus on the mutual benefits of conditional generation and PU classification , when we are only accessible to little class-labeled data , but extra unlabeled data , including outof-distribution data , can be available . Firstly , a parallel non-negative multi-class PU estimator is derived to classify both the positive data of all classes and the negative data . Then we design a Classifier-Noise-Invariant Conditional Generative Adversarial Network ( CNI-CGAN ) that is able to learn the clean data distribution on all unlabeled data with noisy labels provided by the PU classifier . Simultaneously , we also leverage our CNI-CGAN to enhance the performance of the PU classification through data augmentation , demonstrating a reciprocal benefit for both generation and classification . We provide the theoretical analysis on the optimal condition of our CNI-CGAN and conduct extensive experiments to verify the superiority of our approach . 2 OUR METHOD . 2.1 POSITIVE-UNLABELED LEARNING . Traditional Binary Positive-Unlabeled Problem Setting Let X ∈ Rd and Y ∈ { ±1 } be the input and output variables and p ( x , y ) is the joint distribution with marginal distribution pp ( x ) = p ( x|Y = +1 ) and pn ( x ) = p ( x|Y = −1 ) . In particular , we denote p ( x ) as the distribution of unlabeled data . np , nn and nu are the amount of positive , negative and unlabeled data , respectively . Parallel Non-Negative PU Estimator Vanilla PU learning ( Bekker & Davis , 2020 ; Kiryo et al. , 2017 ; Du Plessis et al. , 2014 ; 2015 ) employs unbiased and consistent estimator . Denote gθ : Rd → R as the score function parameterized by θ , and ` : R× { ±1 } → R as the loss function . The risk of gθ can be approximated by its empirical version denoted as R̂pn ( gθ ) : R̂pn ( gθ ) = πpR̂ + p ( gθ ) + πnR̂ − n ( gθ ) , ( 1 ) where πp represents the class prior probability , i.e . πp = P ( Y = +1 ) with πp+πn = 1 . In addition , R̂+p ( gθ ) = 1 np ∑np i=1 ` ( gθ ( x p i ) , +1 ) and R̂ − n ( gθ ) = 1 nn ∑nn i=1 ` ( gθ ( x n i ) , −1 ) . As negative data xn are unavailable , a common strategy is to offset R−n ( gθ ) . We also know that πnpn ( x ) = p ( x ) − πppp ( x ) , and hence πnR̂−n ( gθ ) = R̂−u ( gθ ) − πpR̂−p ( gθ ) . Then the resulting unbiased risk estimator R̂pu ( gθ ) can be formulated as : R̂pu ( gθ ) = πpR̂ + p ( gθ ) − πpR̂−p ( gθ ) + R̂−u ( gθ ) , ( 2 ) where R̂−p ( gθ ) = 1 np ∑np i=1 ` ( gθ ( x p i ) , −1 ) and R̂−u ( gθ ) = 1nu ∑nu i=1 ` ( gθ ( x u i ) , −1 ) . The advantage of this unbiased risk minimizer is that the optimal solution can be easily obtained if g is linear in θ . However , in real scenarios we tend to leverage more flexible models gθ , e.g. , deep neural networks . This strategy will push the estimator to a point where it starts to suffer from overfitting . Hence , we decide to utilize non-negative risk ( Kiryo et al. , 2017 ) for our PU learning , which has been verified in ( Kiryo et al. , 2017 ) to allow deep neural network to mitigate overfitting . The non-negative PU estimator is formulated as : R̂pu ( gθ ) = πpR̂ + p ( gθ ) + max { 0 , R̂−u ( gθ ) − πpR̂−p ( gθ ) } . ( 3 ) In pursue of the parallel implementation of R̂pu ( gθ ) , we replace max { 0 , R̂−u ( gθ ) − πpR̂−p ( gθ ) } with its lower bound 1N ∑N i=1 max { 0 , R̂−u ( gθ ; X iu ) − πpR̂−p ( gθ ; X ip ) } where X iu and X ip denote as the unlabeled and positive data in the i-th mini-batch , and N is the number of batches . From Binary PU to Multi-PU Learning Previous PU learning focuses on learning a classifier from positive and unlabeled data , and can not easily be adapted to K + 1 multi-classification tasks where K represents the number of classes in the positive data . Multi-Positive and Unlabeled learning ( Xu et al. , 2017 ) was ever developed , but the proposed algorithm may not allow deep neural networks . Instead , we extend binary PU learning to multi-class version in a straightforward way by additionally incorporating cross entropy loss on all the positive data with labels for different classes . More precisely , we consider theK+1-class classifier fθ as a score function fθ = ( f1θ ( x ) , . . . , f K+1 θ ( x ) ) . After the softmax function , we select the first K positive data to construct cross-entropy loss ` CE , i.e. , ` CE ( fθ ( x ) , y ) = log ∑K+1 j=1 exp ( f jθ ( x ) ) − fyθ ( x ) where y ∈ [ K ] . For the PU loss , we consider the composite function h ( fθ ( x ) ) : Rd → R where h ( · ) conducts a logit transformation on the accumulative probability for the first K classes , i.e. , h ( fθ ( x ) ) = ln ( p1−p ) in which p = ∑K j=1 exp ( f jθ ( x ) ) / ∑K+1 j=1 exp ( f jθ ( x ) ) . The final mini-batch risk of our PU learning can be presented as : R̃pu ( fθ ; X i ) = πpR̂+p ( h ( fθ ) ; X ip ) + max { 0 , R̂−u ( h ( fθ ) ; X iu ) − πpR̂−p ( h ( fθ ) ; X ip ) } + R̂CEp ( fθ ; X ip ) , ( 4 ) where R̂CEp ( fθ ; X ip ) = 1np ∑np i=1 ` CE ( fθ ( x p i ) , y ) . 2.2 CLASSIFIER-NOISE-INVARIANT CONDITIONAL GENERATIVE ADVERSARIAL . NETWORK ( CNI-CGAN ) To leverage extra data , i.e. , all unlabeled data , to benefit the generation , we deploy our conditional generative model on all data with pseudo labels predicted by our PU classifier . However , these predicted labels tend to be noisy , reducing the reliability of the supervision signals and thus worsening the performance of the conditional generative model . Besides , the noise depends on the accuracy of the given PU classifier . To address this issue , we focus on developing a novel noise-invariant conditional GAN that is robust to noisy labels provided by a specified classifier , e.g . a PU classifier . We call our method Classifier-Noise-Invariant Conditional Generative Adversarial Network ( CNI-CGAN ) and the architecture is depicted in Figure 1 . In the following , we elaborate on each part of it . Principle of the Design of CNI-CGAN Albeit being noisy , the pseudo labels given by the PU classifier still provide rich information that we can exploit . The key is to take the noise generation mechanism into consideration during the generation . We denote the real data as xr and the predicted hard label through the PU classifier as PUθ ( xr ) , i.e. , PUθ ( xr ) = arg maxi f i θ ( xr ) , as displayed in Figure 1 . We let the generator “ imitate ” the noise generation mechanism to generate pseudo labels for the labeled data . With both pseudo and real labels , we can leverage the PU classifier fθ to estimate a confusion matrix C̃ to model the label noise from the classifier . During the generation , a real label y , while being fed into the generator G , will also be polluted by C̃ to compute a noisy label ỹ , which then will be combined with the generated fake sample xg for the following discrimination . Finally , the discriminator D will distinguish the real samples [ xr , PUθ ( xr ) ] out of fake samples [ xg , ỹ ] . Overall , the noise “ generation ” mechanism from both sides can be balanced . Estimation of C̃ The key in the design of C̃ is to estimate the label noise of the pre-trained PU classifier by considering all the samples of each class . More specifically , the confusion matrix C̃ is k+ 1 by k+ 1 and each entry C̃ij represents the probability of a generated sample xg , given a label i , being classified as class j by the PU classifier . Mathematically , we denote C̃ij as : C̃ij = P ( PUθ ( xg ) = j|y = i ) = Ez [ I { PUθ ( xg ) =j|y=i } ] , ( 5 ) where xg = G ( z , y = i ) and I is the indicator function . Owing to the stochastic optimization nature when training deep neural networks , we incorporate the estimation of C̃ in the processing of training by Exponential Moving Average ( EMA ) method . This choice can balance the utilization of information from previous training samples and the updated PU classifier to estimate C̃ . We formulate the update of C̃ ( l+1 ) in the l-th mini-batch as follows : C̃ ( l+1 ) = λC̃ ( l ) + ( 1− λ ) ∆C̃Xl , ( 6 ) where ∆C̃Xl denotes the incremental change of C̃ on the current l-th mini-batch data Xl via Eq . 5. λ is the averaging coefficient in EMA . Theoretical Guarantee of Clean Data Distribution Firstly , we denote O ( x ) as the oracle class of sample x from an oracle classifier O ( · ) . Let πi , i = 1 , ... , K+1 , be the class-prior probability of the class i in the multi-positive unlabeled setting . Theorem 1 proves the optimal condition of CNI-CGAN to guarantee the convergence to the clean data distribution . The proof is provided in Appendix A. Theorem 1 . ( Optimal Condition of CNI-CGAN ) Let P g be a probabilistic transition matrix where P gij = P ( O ( xg ) = j|y = i ) indicates the probability of sample xg with the oracle label j generated by G with the initial label i . We assume that the conditional sample space of each class is disjoint with each other , then ( 1 ) P g is a permutation matrix if the generator G in CNI-CGAN is optimal , with the permutation , compared with an identity matrix , only happens on rows r where corresponding πr , r ∈ r are equal . ( 2 ) If P g is an identity matrix and the generator G in CNI-CGAN is optimal , then pr ( x , y ) = pg ( x , y ) where pr ( x , y ) and pg ( x , y ) are the real and the generating joint distribution , respectively . Briefly speaking , CNI-CGAN can learn the clean data distribution if P g is an identity matrix . More importantly , the method we elaborate till now has already guaranteed Pg as a permutation matrix , which is very close to an identity one . We need an additional constraint , although the permutation happens only when same class-prior probabilities exist . The Auxiliary Loss The optimal G in CNI-CGAN can only guarantee that pg ( x , y ) is close to pr ( x , y ) as the optimal permutation matrix P g is close to the identity matrix . Hence in practice , to ensure that we can exactly learn an identity matrix for P g and thus achieve the clean data distribution , we introduce an auxiliary loss to encourage a larger trace of P g , i.e. , ∑K+1 i=1 P ( O ( xg ) = i ) |y = i ) . As O ( · ) is intractable , we approximate it by the current PU classifier PUθ ( xg ) . Then we obtain the auxiliary loss ` aux : ` aux ( z , y ) = max { κ− 1 K + 1 K+1∑ i=1 Ez ( I { PUθ ( xg ) =i|y=i } ) , 0 } , ( 7 ) where κ ∈ ( 0 , 1 ) is a hyper-parameter . With the support of auxiliary loss , P g has the tendency to converge to the identity matrix where CNI-CGAN can learn the clean data distribution even in the presence of noisy labels . Comparison with RCGAN ( Thekumparampil et al. , 2018 ; Kaneko et al. , 2019 ) The theoretical property of CNI-CGAN has a major advantage over existing Robust CGAN ( RCGAN ) ( Thekumparampil et al. , 2018 ; Kaneko et al. , 2019 ) , for which the optimal condition can only be achieved when the label confusion matrix is known a priori . Although heuristics can be employed , such as RCGAN-U ( Thekumparampil et al. , 2018 ) , to handle the unknown label noise setting , these approaches still lack the theoretical guarantee to converge to the clean data distribution . To guarantee the efficacy of our approach , one implicit and mild assumption is that our PU classifier will not overfit on the training data , while our non-negative estimator helps to ensure that it as explained in Section 2.1 . To further clarify the optimization process of CNI-CGAN , we elaborate the training steps of D and G , respectively . D-Step : We train D on an adversarial loss from both the real data and the generated ( xg , ỹ ) , where ỹ is corrupted by C̃ . C̃y denotes the y-th row of C̃ . We formulate the loss of D as : max D∈F E x∼p ( x ) [ φ ( D ( x , PUθ ( x ) ) ) ] + E z∼PZ , y∼PY ỹ|y∼C̃y [ φ ( 1−D ( G ( z , y ) , ỹ ) ) ] , ( 8 ) where F is a family of discriminators and PZ is the distribution of latent space vector z , e.g. , a Normal distribution . PY is a discrete uniform distribution on [ K + 1 ] and φ is the measuring function . G-Step : We train G additionally on the auxiliary loss ` aux ( z , y ) as follows : min G∈G E z∼PZ , y∼PY ỹ|y∼C̃y [ φ ( 1−D ( G ( z , y ) , ỹ ) ) + β ` aux ( z , y ) ] , ( 9 ) where β controls the strength of auxiliary loss and G is a family of generators . In summary , our CNI-CGAN conducts K+ 1 classes generation , which can be further leveraged to benefit the K+ 1 PU classification via data augmentation . Algorithm 1 Alternating Minimization for PU Learning and Classifier-Noise-Invariant Generation . Input : Training data ( Xp , Xu ) . Batch size M and hyper-parameter β > 0 , λ , κ ∈ ( 0 , 1 ) . L0 and L ∈ N+ . Initializing C̃ ( 1 ) as identity matrix . Number of batches N during the training . Output : Model parameter for generator G , and θ for the PU classifier fθ . 1 : / * Pre-train PU classifier fθ * / 2 : for i = 1 to N do 3 : Update fθ by descending its stochastic gradient of R̃pu ( fθ ; X i ) via Eq . 4 . 4 : end for 5 : repeat 6 : / * Update CNI-CGAN * / 7 : for l = 1 to L do 8 : Sample { z1 , ... , zM } , { y1 , ... , yM } and { x1 , ... , xM } from PZ , PY and all training data , respectively , and then sample { ỹ1 , ... , ỹM } through the current C̃ ( l ) . Then , update the discriminator D by ascending its stochastic gradient of 1 M M∑ i=1 [ φ ( D ( xi , PUθ ( xi ) ) ) ] + φ ( 1−D ( G ( zi , yi ) , ỹi ) ) ] . 9 : Sample { z1 , ... , zM } and { y1 , ... , yM } from PZ and PY , and then sample { ỹ1 , ... , ỹM } through the current C̃ ( l ) . Update the generator G by descending its stochastic gradient of 1 M M∑ i=1 [ φ ( 1−D ( G ( zi , yi ) , ỹi ) ) + β ` aux ( yi , zi ) ] . 10 : if l ≥ L0 then 11 : Compute ∆C̃Xl = 1 M ∑M i=1 I { PUθ ( G ( zi , yi ) ) |yi } via Eq . 5 , and then estimate C̃ by C̃ ( l+1 ) = λC̃ ( l ) + ( 1− λ ) ∆C̃Xl . 12 : end if 13 : end for 14 : / * Update PU classifier via Data Augmentation * / 15 : Sample { z1 , ... , zM } and { y1 , ... , yM } from PZ and PY , respectively , and then update the PU classifier fθ by descending its stochastic gradient of 1 M M∑ i=1 ` CE ( fθ ( G ( zi , yi ) ) , yi ) . 16 : until convergence | This paper targets at relieving the massive labeled data consumption of deep learning through the framework of semi-supervised learning. In particular, it finds out that two training approaches, Positive-Unlabeled classification and the conditional generation, can benefit each other. Jointly conducting these two approaches can push better performance on both tasks, thus eventually achieving better performance with a limited amount of labeled data. The authors combined the two tasks with a new type of GAN network. They further gave the corresponding theoretical proof for this new GAN model and verified its performance on the benchmark datasets. | SP:bf9538a602859eaf9e0c3138c5e46c782863a054 |
Proving the Lottery Ticket Hypothesis for Convolutional Neural Networks | 1 INTRODUCTION . Many impressive successes in machine learning are reached through neural network architectures with a huge number of trainable parameters . Consequently , substantial research in the field aims at reducing the size of such networks while maintaining good accuracy , e.g . for deployment in resource constrained devices ( Yang et al. , 2017 ) . A major empirical fact of such endeavour is the contrast between the initial model overparametrization , which appears necessary for effective training , and the extent to which the size of the resulting model can be reduced through compression techniques . Among the latter , pruning methods appear as a mature and efficient way of achieving significant compression , often without incurring any accuracy loss ( Blalock et al. , 2020 ) . Recently , the aforementioned contrast between the initial and final number of parameters has been addressed by the lottery ticket hypothesis ( Frankle & Carbin , 2019 ) , or LTH for short , which states that any randomly initialized network contains lottery tickets , that is , sparse subnetworks that can be trained just once and reach the performance of the fully-trained original network . This hypothesis was first verified experimentally , leveraging pruning methods to identify the lottery tickets ( Frankle & Carbin , 2019 ; Lee et al. , 2019 ) . ( Ramanujan et al. , 2020 ) then proposed a stronger version of the hypothesis , named strong lottery ticket hypothesis ( SLTH ) by ( Pensia et al. , 2020 ) : it stipulates that a network with random weights contains , with high probability , sub-networks that can approximate any given sufficiently-smaller neural network . In other words , a sufficiently large and randomly initialized network that can be successfully trained for a task , could instead be suitably pruned to obtain a network that , even without training , achieves good accuracy . Experimental support for this stronger version were reported by Ramanujan et al . ( 2020 ) ; Zhou et al . ( 2019 ) ; Wang et al . ( 2020 ) , making use of pruning methods to find lottery tickets in a range of architectures , including convolutional neural networks ( CNNs ) . A first rigorous proof of the SLTH has been given by Malach et al . ( 2020 ) for the case of dense networks ( i.e . consisting of fully connected layers ) . Pensia et al . ( 2020 ) and Orseau et al . ( 2020 ) successively improved this result by showing that logarithmic over-parametrization is sufficient . Their results are also restricted to dense networks and they leave as an open problem to extend it to CNNs . Our contributions . We extend and complete the proof of the SLTH ( and thus , also , of the LTH ) , for classical network architectures which can combine convolutional and fully connected layers . More precisely , we prove that any CNN with given weights can be approximated by pruning a CNN with random weights ( random CNN for short ) , with the latter being larger than the former by a logarithmic factor . We also provide basic experiments showing that starting from a random CNN which is roughly 30 times larger than LeNet5 , it is possible to compute in few hours a pruning mask that allows to approximate the trained convolutional layers of LeNet5 with relative error 10−3 , even when ignoring some hypothesis of our theoretical result . Our theoretical analysis follows the approach of Malach et al . ( 2020 ) and make use of two layers to approximate one . We borrow from Pensia et al . ( 2020 ) the use of random subset sum ( RSS ) ( Lueker , 1998 ) to approximate a given weight via the sum of a subset of a sample of random weights , and carefully design instances of RSS via a combination of two convolutional layers . By controlling the error accumulated by each layer with Young ’ s convolution inequality , we establish the following result . Informal version of Theorem 1 . Given ε , δ > 0 , any CNN with k parameters and ` layers , and kernels with ` 1 norm at most 1 , can be approximated within ε by pruning a random CNN withO ( k log ( k ` min { ε , δ } ) ) parameters and 2 ` layers with probability at least 1− δ . This result generalizes those by Pensia et al . ( 2020 ) , Orseau et al . ( 2020 ) and Malach et al . ( 2020 ) , as the dense-network case is retrieved as a special case of our theorem , when the kernel size matches the input size . Roadmap . After discussing related work in the next section , we state our theoretical results alongside a high-level idea of the proofs . Successively , we report our experimental results . Finally , in Section 4 , we provide detailed proofs of our statements . 1.1 RELATED WORK . Pruning methods are classical neural network compression strategies that date back to the 80 ’ s ( LeCun et al. , 1989b ; Mozer & Smolensky , 1988 ) . We recommend the recent survey Blalock et al . ( 2020 ) for an overview of the current state of research on these techniques . As for the lottery ticket hypothesis , Lange ( 2020 ) provides a survey which summarizes the progress on the topic until the results by Malach et al . ( 2020 ) . In the following we briefly mention works which are not discussed in Lange ( 2020 ) . Cosentino et al . ( 2019 ) shows that lottery tickets can be adversarially trained , yielding sparse and robust neural networks . Soelen & Sheppard ( 2019 ) shows that lottery tickets are transferable , in the sense of showing remarkable accuracy for tasks other than the original one for which they have been found . Sabatelli et al . ( 2021 ) further shows that minimal retraining on a new task allows lottery tickets to often achieve better generalization than models trained ad-hoc for the task . ( Yu et al. , 2020 ) empirically supports that the LTH holds also in the context of reinforcement learning and natural language processing . ( Diffenderfer & Kailkhura , 2021 ) shows that lottery tickets are also robust against extreme quantization of the weights . Aladago & Torresani ( 2021 ) provides a method to train networks where each initial weight is restricted to few possible random values . An extreme case of the latter is to share only a single ( random ) value among all weights , and focus the training solely on finding the best architecture ( Gaier & Ha , 2019 ) . Our work also relates to recent papers investigating properties of random CNNs , such as Ulyanov et al . ( 2020 ) which observes that random CNNs already seem to capture some natural image statistics required for tasks such as de-noising and inpainting . 2 THEORETICAL RESULTS . We start by introducing some of our notation . The rest of it follows Goodfellow et al . ( 2016 ) with minor modifications , so we defer a full description to Section 4.1 . Given n ∈ N , we denote the set { 1 , . . . , n } by [ n ] . The symbol ∗ represents the convolution operation , represents the element-wise ( Hadamard ) product , and σ represents ReLU activation function . Finally , the notation ‖·‖1 refers to the sum of the absolute values of each entry in a tensor while ‖·‖max denotes the maximum norm : the maximum among the absolute value of each entry . Those are akin to vector norms and should not be confused with operator norms . We restrict our setting to convolutional neural networks f : [ 0 , 1 ] D×D×c0 → RD×D×c ` of the form f ( X ) = K ` ∗ σ ( K ` −1 ∗ · · ·σ ( K1 ∗ X ) ) , where Ki ∈ Rdi×di×ci−1×ci , and the convolutions have no bias and are suitably padded with zeros . The restrictions on tensor sizes and the exclusion of bias terms1 aim only to ease presentation . Our initial goal is to approximate a convolution with a single kernel , as depicted in Figure 1 , using convolutions with ( pruned ) random kernels . We achieve this by the means of the structure presented in Figure 2 , using two convolutions with random tensors . Lemma 1 asserts that , with high probability , we can prune this structure to approximate the output of a convolution with any given kernel as long as the amount of kernels is large enough . Lemma 1 ( Single kernel ) . Let D , d , c , n ∈ N , and ε , C ∈ R > 0 , where n ≥ C log d 2c ε , U ∈ Rd×d×c×n , V ∈ R1×1×n×1 , and S ∈ { 0 , 1 } d×d×c×n . Let us further assume that the entries of U and V are i.i.d . random variables following a Unif ( [ −1 , 1 ] ) distribution , and define g ( X ) = V ∗ σ ( U ∗ X ) and gS ( X ) = V ∗ σ ( ( U S ) ∗ X ) thus yielding a random CNN g : [ 0 , 1 ] D×D×c → RD×D×1 and its pruned version gS w.r.t . the mask S. Then , we can choose constant C independently from other parameters so that , with probability at least 1− ε , for all K ∈ [ −1 , 1 ] d×d×c×1 with ‖K‖1 ≤ 1 , there exists a pruning mask S such that sup X∈ [ 0,1 ] D×D×c ∥∥K ∗ X− gS ( X ) ∥∥max < ε . Proof idea . We leverage the absence of negative entries in the input and an initial pruning of U to bypass the ReLU non-linearity . This allows us to virtually replace the operations in g by a single 1If biases are present , the structures used in the proofs also puts them in a RSS configuration . Thus the results can be readily adapted by replacing the d2i terms by d 2 i + 1. convolution with a random kernel obtained by combining U and V. Each entry of this resulting kernel is the sum of n random variables , where we can choose to include/exclude each term in the sum by choosing to keep/prune the relevant weights . We finish the proof by applying Theorem 2 to conclude that n variables suffice to approximate all entries , simultaneously , with enough precision to ensure the thesis . We now extend Lemma 1 to an entire layer . As before , a detailed proof is provided in Section 4.3 . Lemma 2 ( Convolutional Layer ) . Let D , d , c0 , c1 , n ∈ N , and ε , C ∈ R > 0 , where n ≥ C c1 log d2c0c1 ε , U ∈ Rd×d×c0×n , V ∈ R1×1×n×c1 , S ∈ { 0 , 1 } d×d×c0×n and T ∈ { 0 , 1 } 1×1× [ n ] × [ c1 ] . Let us further assume that the entries of U and V are i.i.d . random variables following a Unif ( [ −1 , 1 ] ) distribution , and define g ( X ) = V ∗ σ ( U ∗ X ) and gT , S ( X ) = ( V T ) ∗ σ ( ( U S ) ∗ X ) thus yielding a random CNN g : [ 0 , 1 ] D×D×c0 → RD×D×c1 and its pruned version gT , S ( X ) w.r.t . the masks S and T. Then , we can choose constant C independently from other parameters so that , with probability at least 1− ε , for all K ∈ [ −1 , 1 ] d×d×c0×c1 with ‖K‖1 ≤ 1 , there exist masks S and T such that sup X∈ [ 0,1 ] D×D×c0 ‖K ∗ X− gT , S ( X ) ‖max < ε . Proof Idea . The lemma follows by applying Lemma 1 to each kernel independently , so that all of them are approximated by a factor at most εc1 ; the latter approximation allows to apply the union bound so that the desired approximation holds simultaneously for all c1 output kernels with probability at least 1− ε . We are now ready to extend the previous approximation result from a single layer to the entire network , thus proving our main result . A detailed proof is given in Section B. Theorem 1 ( Convolutional Network ) . Let D , d , c0 , c1 , ` ∈ N , and ε , C ∈ R > 0 . For each i ∈ [ ` ] , let L2i−1 and L2i be tensors with size di × di × ci−1 × ( Cci log ci−1cid 2 i ` min { ε , δ } ) and 1 × 1 × ( Cci log ci−1d 2 i ci ` min { ε , δ } ) ×ci , respectively . Furthermore , for each i ∈ [ 2 ` ] , let S i ∈ { 0 , 1 } size ( Li ) . Finally , let us assume that the entries of L1 , ... , L2 ` are i.i.d . random variables following a Unif ( [ −1 , 1 ] ) distribution , and define g ( X ) = L2 ` ∗ σ ( L2 ` −1 ∗ · · ·σ ( L1 ∗ X ) ) and gS1 , ... , S2 ` ( X ) = ( L 2 ` S2 ` ) ∗ σ [ ( L2 ` −1 S2 ` −1 ) ∗ · · ·σ [ ( L1 S1 ) ∗ X ] ] thus yielding a random 2 ` -layer CNN g : [ 0 , 1 ] D×D×c0 → RD×D×c1 and its pruned version gS1 , ... , S2 ` ( X ) w.r.t . masks S 1 , ... , S2 ` . Let F be the class of functions from [ 0 , 1 ] D×D×c0 to RD×D×c ` such that , for each f ∈ F f ( X ) = K ` ∗ σ ( K ` −1 ∗ · · ·σ ( K1 ∗ X ) ) , where , for each i ∈ [ ` ] , Ki ∈ [ −1 , 1 ] di×di×ci−1×ci and ‖Ki‖1 ≤ 1 . Then , we can choose constant C independently from other parameters so that , with probability at least 1− δ , the following holds for every f ∈ F : inf ∀i∈ [ 2 ` ] , Si∈ { 0,1 } size ( Li ) sup X∈ [ 0,1 ] D×D×c0 ∥∥∥f ( X ) − gS1 , ... , S2 ` ( X ) ∥∥∥ max < ε . Proof Idea . The proof leverages Lemma 2 in an analogous way to how the latter relied on Lemma 1 ; namely , we apply Lemma 2 by requiring an approximation factor that guarantees , with sufficient probability , that a suitable approximation is reached across all layers simultaneously . The latter requirement is responsible for the ` factor which appears in the logarithms of the dimensions of each random tensor Li . | The authors provide theoretical analysis on the lottery ticket hypothesis for convolutional neural networks. The techniques of the random subset sum are used to prove theorems. The authors start with introducing the case of a single convolutional kernel and then generalize to the case of the whole convolutional neural networks. By specifying multiple constraints and assumptions on the models' parameters and inputs, the error between the approximated and the true convolution results can be limited to a small number. | SP:ba7c73fbdb6515240ef43aaa93a0894af771d1c7 |
STRIC: Stacked Residuals of Interpretable Components for Time Series Anomaly Detection | We present a residual-style architecture for interpretable forecasting and anomaly detection in multivariate time series . Our architecture is composed of stacked residual blocks designed to separate components of the signal such as trends , seasonality , and linear dynamics . These are followed by a Temporal Convolutional Network ( TCN ) that can freely model the remaining components and can aggregate global statistics from different time series as context for the local predictions of each time series . The architecture can be trained end-to-end and automatically adapts to the time scale of the signals . After modeling the signals , we use an anomaly detection system based on the classic CUMSUM algorithm and a variational approximation of the f -divergence to detect both isolated point anomalies and change-points in statistics of the signals . Our method outperforms state-ofthe-art robust statistical methods on typical time series benchmarks where deep networks usually underperform . To further illustrate the general applicability of our method , we show that it can be successfully employed on complex data such as text embeddings of newspaper articles . 1 INTRODUCTION . Time series data is being generated in increasing volumes from industrial , medical , commercial and scientific applications . Such growth is fueling demand for anomaly detection algorithms that are general enough to be applicable across domains , yet reliable enough to operate on real-world time series data ( Munir et al. , 2019 ; Geiger et al. , 2020 ; Su et al. , 2019 ) . While recent developments have focused on deep neural networks ( DNNs ) , simple linear models still outperform DNNs in applications that require robustness ( Braei & Wagner , 2020 ) and interpretable failure modes ( Geiger et al. , 2020 ; Su et al. , 2019 ) . To harvest the flexibility and interpretability of engineered modules while enabling end-to-end differentiable training , we introduce STRIC : Stacked Residuals of Interpretable Components . We follow standard practice and consider a two stage anomaly detection pipeline comprising a model of the normal time series and an anomaly detector based on the prediction residuals ( Munir et al. , 2019 ) . In particular , STRIC is composed of three modules : An interpretable local predictor , a non-linear predictor and a novel non-parametric anomaly detector . More specifically , STRIC uses a parametric model implemented by a sequence of residuals blocks with each layer capturing the prediction residual of previous layers . The first layer models trends , the second layer models quasiperiodicity/seasonality at multiple temporal scales , the third layer is a general linear predictor , and the last is a general non-linear model in the form of a Temporal Convolution Network ( TCN ) . While the first three layers are local ( i.e . applied to each component of the time series separately ) , the last integrates global statistics from additional time series ( covariates ) . Thanks to the residual structure the interpretable linear blocks do not reduce the representative power of our non-linear architecture : any component of the input time-series which can not be modeled by the interpretable blocks is processed deeper into our architecture by the non-linear module ( see Section 4 ) . The model is trained end-toend with a prediction loss and we automatically select its complexity using an upper bound of the marginal likelihood which , to the best of our knowledge , has never been applied to TCNs before . Anomalies are detected by checking for time instants in which the prediction residual is not stationary . To avoid any unrealistic assumption on the prediction residuals distribution , we use a likelihood ratio test that we derive from a variational upper bound of f -divergences and that can be computed directly from the data points . To summarize , our contributions are : 1 . We introduce STRIC , a stacked residual model that explicitly isolates interpretable factors such as slow trends , quasi-periodicity , and linearly predictable statistics ( Oreshkin et al. , 2019 ; Cleveland et al. , 1990 ) , and incorporates statistics from other time series as context/side information . 2 . We introduce a novel regularization that is added to the prediction loss and is used for automatic model complexity selection according to the Empirical Bayes framework ( Rasmussen & Williams , 2006 ) . 3 . We introduce a non-parametric extesion of the CUMSUM algorithm which entails a tunable parameter corresponding to the length of observation and enables anomaly detection in the absence of knowledge about the pre- and post-distributions . 4 . We test our method on standard anomaly detection benchamrks and show it merges both the advantages of simple and interpretable linear models and the flexibility of non-linear ones while discounting their major drawbacks : lack of flexibility of linear models and lack of interpretability and overfitting of non-linear ones . 2 RELATED WORK . A time series is an ordered sequence of data points . We focus on discrete and regularly spaced time indices , and thus we do not include literature specific to asynchronous time processes in our review . Different methods for time series anomaly detection ( TSAD ) can be taxonomized by their choice of ( i ) discriminant function , ( ii ) continuity criterion , and ( iii ) optimization method to determine the tolerance threshold . It is common to use statistics of the prediction error as the discriminant ( Braei & Wagner , 2020 ) , and the likelihood ratio between the distribution of the prediction error before and after a given time instant as the continuity criterion ( Yashchin , 1993 ) . Recent methods compute the discriminant using deep neural network architectures and euclidean distance as continuity criterion ( Munir et al. , 2019 ; Geiger et al. , 2020 ; Su et al. , 2019 ; Bashar & Nayak , 2020 ) . Our method follows a similar line but introduces novel elements both in ( i ) and ( ii ) : ( i ) the discriminant function is the prediction error residual of a novel regularized stacked residual architecture ; ( ii ) the decision function is based on a novel non-parametric extension of the CUMSUM algorithm . The resulting method , STRIC , has the advantage of separating interpretable components due to trends and seasonality , without reducing the representative power of our architecture . At initialization , the system is approximately equivalent to a multi-scale SARIMA model ( Adhikari & Agrawal , 2013 ) , which can be reliably applied out-of-the-box on most time series . However , as more data is acquired , any part of the system can be further fine-tuned in an unsupervised end-to-end fashion . Munir et al . ( 2019 ) argue that anomaly detection can be solved by exploiting a flexible model provided a proper inductive bias is introduced ( e.g . TCN ) . In Appendix A.7.2 we show that TCN alone might overfit simple time series . We therefore take their direction a step further , and , differently from previous works ( Bai et al. , 2018 ; Munir et al. , 2019 ; Sen et al. , 2019 ; Geiger et al. , 2020 ) , we provide our temporal model with an interpretable structure , similar to Oreshkin et al . ( 2019 ) . Moreover , unlike previous works on interpretability of DNNs ( Tsang et al. , 2018 ; Guen et al. , 2020 ) , our architecture explicitly imposes both an inductive bias and a regularization which are designed to expose the user both a STL-like decomposition ( Cleveland et al. , 1990 ) and the relevant time scale of the signals . Since TCNs tend to overfit if not properly regularized ( Appendix A.7.2 ) , we constrain our TCN ’ s representational power by enforcing fading memory ( Zancato & Chiuso , 2021 ) while retaining what is needed to predict future values . Our method outperforms both classical statistical methods ( Braei & Wagner , 2020 ) and deep networks ( Munir et al. , 2019 ; Geiger et al. , 2020 ; Su et al. , 2019 ; Bergman & Hoshen , 2020 ; Bashar & Nayak , 2020 ) on different anomaly detection benchmarks ( Laptev & Amizadeh , 2020 ; Lavin & Ahmad , 2015 ) ( Section 6 ) . Moreover , we show it can be employed to detect anomalous patterns on complex data such as text embeddings of newspaper articles ( Figure 4 ) . 3 NOTATION . We denote vectors with lower case and matrices with upper case . In particular y is multi-variate time series { y ( t ) } t∈Z , y ( t ) ∈ Rn ; we stack observations from time t to t+ k − 1 and denote the resulting matrix as Y t+k−1t : = [ y ( t ) , y ( t+ 1 ) , ... , y ( t+ k − 1 ) ] ∈ Rn×k . The row index refers to the dimension of the time series while the column index refers to the temporal dimension . We denote the i-th component of the time series y as yi and its evaluation at time t ad as yi ( t ) ∈ R. We refer to { y ( s ) , s > t } as the test/future and to { y ( s ) , s ≤ t } as the reference/past intervals . At time t , sub-sequences containing the np past samples up to time t − np + 1 are given by Y tt−np+1 ( note that we include the Ytt−np+1 t ̂y ( t + 1 ) t − np + 1 t + 1 past future n ⋮ Linear X̂LIN XLIN ∈ ℝn×np Seasonal X̂SEAS XSEAS ∈ ℝn×np ̂ySEAS ( t + 1 ) ∈ ℝ ̂yLIN ( t + 1 ) ∈ ℝ ̂yTCN ( t + 1 ) ∈ ℝ X̂TREND XTREND ∈ ℝn×np TCNTrend ̂yTREND ( t + 1 ) ∈ ℝ ( a ) STRIC predictor architecture . Z = z1 z2 ⋮ zn Z ∈ { XTREND , XSEAS , XLIN } Φ = φ1 φ2 ⋮ φn Φ ∈ { 𝒦TREND , 𝒦SEAS , 𝒦LIN } Layer inputs Layer filters banks Layer features selectors A = aT1 aT2 ⋮ aTn A ∈ { 𝒜TREND , 𝒜SEAS , 𝒜LIN } Time Features Future Predictor Gi aTi Gi aTi Gibi ℝl×np∈ φ1 * zi φ2 * zi ⋮ φl * zi zii = 1 , ... , n For each B = bT1 bT2 ⋮ bTn Layer predictors B ∈ { ℬTREND , ℬSEAS , ℬLIN } ∈ ∈ ℝ1×np ℝ ( b ) Interpretable blocks structure . Time features are extracted independently for each time series ( see Appendix A.1 for more details ) . present data into the past data ) , while future samples up to time t + nf are Y t+nf t+1 . We will use past data to predict future ones , where the length of past and future intervals is an hyper-parameter that is up to the user to design . 4 TEMPORAL RESIDUAL ARCHITECTURE . Our architecture is depicted in Figure 1a . Its basic building blocks are causal convolutions ( Bai et al. , 2018 ) , with a fixed-size 1-D kernel with input elements from time t and earlier . Rather than initializing the convolutional filter randomly , as commonly done in deep learning , we initialize the weights so that each layer is biased to attend at different components of the signal , as explained in the following . Linear module . The first ( linear ) module is interpretable and captures local statistics of a given time series by means of a cascade of learnable linear filters . Its first layer models and removes slow-varying components in the input data . We initialize the filters to mimic a causal Hodrick Prescott ( HP ) filter ( Ravn & Uhlig , 2002 ) . The second layer models and removes periodic components : it is initialized to have a periodic impulse response . Finally , the third layer implements a linear stationary filter bank . We treat the impulse responses parameters of the linear filters as trainable parameters . To allow our model to work on a wide variety of time scales , we initialize the trend layer with different HP smoothness degrees , while we initialize the periodic and linear-stationary layers with randomly chosen poles ( Farahmand et al. , 2017 ) both on the unit circle and within the unit circle , thus allowing to capture different periodicities . Non-linear module . The second ( non-linear ) module aggregates global statistics from different time series using a TCN model ( Sen et al. , 2019 ) . It takes as input the prediction residual of the linear module and outputs a matrix G ( Y tt−np+1 ) ∈ R l×np where l is the number of output features extracted by the TCN model . The columnG ( Y tt−np+1 ) j with j = 1 , ... , np of the non-linear features is computed using data up to time t−np + j ( due to the internal structure of a TCN network ( Bai et al. , 2018 ) ) . We build a linear predictor on top of G ( Y tt−np+1 ) for each single time series independenty : the predictor for the i-th time series is given by : ŷTCN ( t+ 1 ) i : = aTi G ( Y t t−np+1 ) bi where ai ∈ R l and bi ∈ Rnp . Since ai combines features ( uniformly in time ) we can interpret it as a feature selector . While bi aggregates relevant features across time indices to build the one-step ahead predictor ( see Appendix A.1 ) . Note that the third layer of the linear module is a superset of preceding ones , and the non-linear module is a superset of the whole linear module . While this makes the model redundant , we show that this design , coupled with proper initialization and regularization , improves the reliability and intepretability of the final model . We improve filters optimization by sharing their kernel parameters among different time series so that global information ( e.g. , common trend shapes , periodicities ) can be extracted . In Appendix A.1 , we describe each component of the model in detail . | This paper aims to boost the performance of deep neural networks (DNNs) for time series applications by focusing on the characteristics of interpretable forecasting and anomaly detection which are important for real-world time series data. The authors propose an end-to-end trainable DNN architecture which is composed of stacked residual blocks to separate signal components including slow trends, quasi-periodicity, and linear dynamics, followed by a temporal convolutional network (TCN) to model other components. Although previous studies showed that conventional simple linear models often outperformed DNN models on typical time series benchmarks that require robustness and interpretability, this paper shows that the proposed DNN model outperforms state-of-the-art robust statistical methods in some datasets, kind of demonstrating the best of both worlds. | SP:5b01a386e24c24a0ad1760cf7bd7464cc61645ef |
Re-evaluating Word Mover's Distance | 1 INTRODUCTION The optimal transport ( OT ) distance is an effective tool for comparing probabilistic distributions . Applications of OT include image processing ( Ni et al. , 2009 ; Rabin et al. , 2011 ; De Goes et al. , 2012 ) , natural language processing ( NLP ) ( Kusner et al. , 2015 ; Rolet et al. , 2016 ) , biology ( Schiebinger et al. , 2019 ; Lozupone & Knight , 2005 ; Evans & Matsen , 2012 ) , and generative models ( Arjovsky et al. , 2017 ; Salimans et al. , 2018 ) . A prominent application of OT is the word mover ’ s distance ( WMD ) ( Kusner et al. , 2015 ) for document comparison . WMD regards a document as a probabilistic distribution of words , defines the underlying word geometry using pre-trained word embeddings , and computes the distance using the optimal transport distance between two word distributions ( i.e. , documents ) . WMD is preferable because it takes the underlying geometry into account . For example , bag-of-words ( BOW ) will conclude that two documents are dissimilar if they have no common words , whereas WMD will determine that they are similar if the words are semantically similar ( even if they are not exactly the same ) , as illustrated in Figure 1 . WMD has been widely used in NLP owing to this preferred property . For example , Kusner et al . ( 2015 ) and others ( Huang et al. , 2016 ; Li et al. , 2019 ) used WMD for document classification , Wu et al . ( 2018 ) used WMD for computing document embeddings , Xu et al . ( 2018 ) used WMD for topic modeling , Kilickaya et al . ( 2017 ) and others ( Clark et al. , 2019 ; Zhao et al. , 2019 ; 2020 ; Wang et al. , 2020a ; Gao et al. , 2020 ; Lu et al. , 2019 ; Chen et al. , 2020b ) used WMD for evaluating text generation . Many extensions have been proposed including supervised ( Huang et al. , 2016 ; Takezawa et al. , 2021 ) and fast ( Le et al. , 2019 ; Backurs et al. , 2020 ; Genevay et al. , 2016 ; Dong et al. , 2020 ; Sato et al. , 2020b ) variants . WMD is one of the fundamental tools used in NLP , and understanding the deep mechanism of WMD is crucial for further applications . The most fundamental application of WMD is document classification . The original study on WMD ( Kusner et al. , 2015 ) conducted extensive experiments using kNN classifiers . Figure 2 shows the classification errors reported in ( Kusner et al. , 2015 ) . This figure clearly shows that WMD is superior to classical baselines , BOW and TF-IDF1 Figure 2 is surprising in the following senses . First , WMD outperforms the classical baselines by excessively large margins . BOW and TF-IDF have long been recognized as effective tools for document classification . Although it is reasonable for WMD to outperform them , the improvements are surprisingly large . In particular , the performance is ten times better on the classic dataset and five times better on the bbcsport dataset . Such results are excessively impressive . Second , although TF-IDF is known to be more effective than BOW , it performs worse than BOW on the ohsumed , reuters , and amazon datasets . In fact , the number of misclassification doubles on the reuters datasets . In this paper , we point out the possibility that the evaluations conducted in the original WMD study ( Kusner et al. , 2015 ) are misleading . Specifically , we found that the main improvements of WMD were due to normalization . Using the same normalization , WMD is comparable to BOW and TF-IDF , or WMD achieves improvements of only two to eight percent at the price of heavy computations . We also confirm that TF-IDF is more effective than raw BOW if we employ adequate normalization . To understand the mechanism of WMD , we introduce an analogy between WMD and L1-normalized BOW . We experimentally find that the distribution of the distances between matched words is not Gaussian-like but two-modal in high dimensional spaces . We then find that not only the performance of WMD but also the distance values resemble those of BOW in high dimensional spaces . The contributions of this paper are summarized as follows . • We point out that the performance of WMD is not as high as we previously believed . The performance is comparable to classical baselines in document classification with the same normalization . • We introduce an analogy between WMD and L1-normalized BOW ( Proposition 1 ) and find that WMD resembles BOW in high dimensional spaces ( Figure 5 ) . • We point out several confusing aspects in the evaluations conducted in the original study on WMD . We suspect that many readers and researchers are unaware of these issues . Clarifying them is crucial for a solid evaluation and analysis in this field Reproducibility . We include our code in the supplementary materials . It contains a script to download datasets and pre-computed results , algorithm implementations , and evaluation code . 2 RELATED WORK . Word Mover ’ s Distance ( WMD ) and Optimal Transport ( OT ) in NLP . WMD ( Kusner et al. , 2015 ) is one of the most thriving applications of OT . WMD can take the underlying word geometry into account and inherit many elegant theoretical properties from OT . The success of WMD has facilitated many applications of OT in NLP . EmbDist ( Kobayashi et al. , 2015 ) is a method concurrent 1It should be noted that ( Kusner et al. , 2015 ) used many stronger baselines such as LSI and LDA . We focus on BOW and TF-IDF because ( i ) BOW was used as the base performance ( Figure 4 in ( Kusner et al. , 2015 ) , Figure 4 in ( Yurochkin et al. , 2019 ) ) , and ( ii ) BOW is a special case of WMD ( Propositoin 1 ) . with WMD . It also regards a document as a distribution of word embeddings but uses greedy matching instead of OT . Kumar et al . ( 2017 ) apply WMD to hidden representations of words instead of raw word embeddings . Yurochkin et al . ( 2019 ) consider a document as a distribution of topics and compute the document similarities using OT . They also use the OT distance for computing the ground distance of the topics . Alvarez-Melis et al . ( 2018 ) proposed a structured OT and applied it to a document comparison to take the positional consistency into account . Singh et al . ( 2020 ) consider a word as a probabilistic distribution of surrounding words and compute the similarity of the words using the OT distance of the distributions . Muzellec & Cuturi ( 2018 ) and others ( Deudon , 2018 ; Frogner et al. , 2019 ; Sun et al. , 2018 ) embed words or sentences into distributions instead of vectors and compute the distance between embeddings using OT . Chen et al . ( 2019 ) and others ( Li et al. , 2020 ; Chen et al. , 2020a ) regularize the text generation models based on the OT distance between the generated texts and the ground truth texts to improve the generation . Nested Wasserstein ( Zhang et al. , 2020a ) compares the distributions of sequences and is successfully used in imitation learning for text generation . Lei et al . ( 2019 ) use WMD to generate paraphrase texts for creating adversarial examples . Zhang et al . ( 2020b ) introduced partial OT to drop meaningless words . Michel et al . ( 2017 ) use a Gromov Wasserstein-like distance instead of the standard OT to compare documents . Zhang et al . ( 2016 ) and others ( Zhang et al. , 2017b ; a ; Grave et al. , 2019 ; Dou & Neubig , 2021 ) use OT to align word embeddings of different languages . Trapp et al . ( 2017 ) use WMD to compare compositional documents by weighting each document . Kilickaya et al . ( 2017 ) and others ( Clark et al. , 2019 ; Zhao et al. , 2019 ; 2020 ; Wang et al. , 2020a ; Gao et al. , 2020 ; Lu et al. , 2019 ; Chen et al. , 2020b ) used WMD for evaluating text generation . BERTScore ( Zhang et al. , 2020c ) is a relevant method , but it uses greedy matching instead of OT . To summarize , OT and WMD have been used in many NLP tasks . It is important to understand the underlying mechanism of WMD for further advancements in this field . Re-evaluation of Existing Methods . Back in 2009 , Armstrong et al . ( 2009 ) found that , although many studies have claimed statistically significant improvements against the baselines , most have employed excessively weak baselines , and the performance did not improve from the classical baselines in the information retrieval domain . Dacrema et al . ( 2019 ) recently found that many of the deep learning-based recommender systems are extremely difficult to reproduce , and for the methods whose results authors could reproduce , the performance was not as high as people had believed , and the deep approaches were actually comparable to classical baselines with an appropriate hyperparameter tuning . Their paper has had a large impact on the community and was awarded thr best paper prize at RecSys 2019 . Similar observations have also been made in sentence embeddings ( Arora et al. , 2017 ; Shen et al. , 2018 ) , session-based recommendations ( Ludewig et al. , 2019 ) , and graph neural networks ( Errica et al. , 2020 ) as well . In general , science communication suffers from publication and confirmation biases . The importance of reproducing existing experiments by third-party groups has been widely recognized in science ( Lin , 2018 ; Sculley et al. , 2018 ; Munafò et al. , 2017 ; Collins & Tabak , 2014 ; Goodman et al. , 2016 ) . 3 BACKGROUNDS . 3.1 PROBLEM FORMULATION . In this paper , we consider document classification tasks . Each document is represented by a bag-ofword vector x ∈ Rm , where m is the number of unique words in the dataset . The i-th component of x represents the number of occurrences of the i-th word in the document . We focus on the kNN classification following the original paper . The kNN classification gathers k samples of the smallest distances ( with respect to a certain distance ) to a test sample from the training dataset and classifies the sample to the majority class of the gathered labels . The design of the distance function is crucial for the performance of kNN classification . 3.2 WORD MOVER ’ S DISTANCE ( WMD ) . WMD provides an effective distance function utilizing pre-trained word embeddings . Let zi be the embedding of the i-th word . To utilize OT , WMD first regards a document as a discrete probabilistic distribution of words by normalizing the bag-of-word vector : nL1 ( x ) = x/ ∑ i xi . ( 1 ) WMD defines the cost matrix C ∈ Rm×Rm as the distance of the embeddings , i.e. , Cij = ‖zi−zj‖2 . The distance between the two documents x and x′ is the optimal value of the following problem : minimize P∈Rm×m ∑ ij CijPij ( 2 ) s.t . Pij ≥ 0 , P1 = nL1 ( x ) , P > 1 = nL1 ( x′ ) , where P > denotes the transpose of P , 1 ∈ Rm is the vector of ones . Intuitively , Pij represents the amount of word i that is transported to word j. WMD is defined as the minimum total distance to convert one document to another document . Let OT ( x , x′ , C ) ∈ R be the optimal value of eq . ( 2 ) . | This paper re-evaluates WMD and identifies issues with the original paper. It shows that the gain from the original paper is not the product of WMD but the normalization. When the normalization is controlled, WMD performs similarly to baseline. Finally, it shows WMD resembles classic BOW when normalization is controlled. | SP:43f992caf8e44161143c89d2a947a21393d17f3b |
A multi-domain splitting framework for time-varying graph structure | 1 INTRODUCTION . In the analysis of spatial-temporal structured data , graph signal processing ( GSP ) is an important type of method , taking advantages of graph model to represent the structure . Graph has abundant features , which should be captured by appropriate rules . These methods can be divided into 2 categories by whether graph structure is variable or not.The first , in the applications with invariant graph structure , there are no temporal differences on graph to consider . For instance , in traffic flow forecasting proposed by Yu et al . ( 2018 ) , the road map is regarded as the graph structure ( adjacency matrix ) , which is generated by fixed longitude and latitude without temporal features . The second , in the tasks that consider spatial-temporal structured datasets , the graph structure must be influenced by time lapse , such as , traffic ( Guo et al . ( 2020 ) ) , urban , Covid-19 , etc . Thus , in the tasks belong to second category , it is inevitable to consider the graph structure as time-varying . Also , time-varying data structures could be more common than the invariant cases in real world . Then , anomaly detection is of great importance in modern data science , as singular or anomaly data is ubiquitous among real-world datasets , which are time-series collected from distributed sensor or receiver networks . Especially , detecting the anomalies in the time-varying structure is then becomes an open challenge Atluri et al . ( 2018 ) , Bergman & Hoshen ( 2020 ) . The applications include traffic events detection , neighbors discovery , pandemic spreading analysis and social network clustering . Significantly , the applications in traffic are the most considered task Zhang et al . ( 2020 ) . The meticulous and effective analysis of graph structure are important for valuable detecting of anomalies of vertices Djenouri et al . ( 2019 ) . However , how to divide graph sequence into appropriate sub-sequences adaptively is the key point in the challenge of temporal dynamic graph structure capturing . Therefore , to break the limitation of time-varying structure analysis , the time-vertex-frequency multi-domain graph splitting framework , called GMDS , which is proposed to capture the timevarying graph structure . The first part is an augmented dickey-fuller ( ADF ) test based data preprocessing . The second is the discrete wavelet transform based graph time-series local splitting . Based on ARIMA , the third part of the GMDS is the graph generation to capture the variable graph struc- ture that segmented by the second part . The last part is the global detection , which is designed as anomaly detection to extract the dependencies and eigenvalues among graph . The output of last part is the anomalies . And the implementations of our framework without training part are accessible at https : //github.com/Zehua-Yu/TVF-anomaly-detection . Our contributions are summarized as follows : • A novel framework based on the appropriate temporal splitting in multi-domain called GMDS is proposed for time-varying graph structure anomaly detection . • Through the dynamic adaptive partition graph , our framework can analyze the data of different periods more carefully and accurately . It breaks the limitation of global unified graph generation and prevents local features from being submerged in the global scope . • The experiments show that GMDS has the generalization to different types of traffic data . 2 RELATED WORK . There are many methods with abundant mechanisms and modules that have been applied to anomaly detection . Zhang et al . ( 2020 ) has done a survey of urban anomaly analysis approaches , including description , detection and prediction . These methods can be divided into sets by different standards . Djenouri et al . ( 2019 ) summarize the anomalies detection algorithms that are applicated in urban traffic . All the methods are divided into 2 categories : flow outlier detection and trajectory outlier detection . The front category includes statistical , similarity , and pattern mining methods . The latter one includes offline and online processing . However , the above methods consider little about the spatial-temporal and interaction topology analysis among data . Graph is a widly used structure , which is good at modeling the data with complicated multi-meta to capture the saptial-temporal topology and other types linkages among vertices . Sofuoglu & Aviyente ( 2021 ) introduce low-rank matrix recovery on graphs into low-rank tensor recovery to imply the anomaly detection in spatial-temporal data . Tasneem et al . ( 2019 ) presents numerous examples and proofs to illustrate the validity of the theorems of using antimagic graph labeling for splitting . Then , Ioannidis et al . ( 2021 ) present GraphSAC to effectively detect anomaly vertices in graph with complicated dependency features . ITGCN have been proposed by Yu et al . ( 2021 ) to capture the interactions among vertices , and performed well in Covid-19 daily confirmed cases forecasting . 3 PRELIMINARIES . In this section , we recap the preliminaries in graph signal , ARIMA , discrete wavelet transform ( DWT ) and graph wavelet transform . 3.1 GRAPH SIGNAL . In our works , the graph signals are defined on the graphs , which are weighted , connected and undirected . Following the Zheng et al . ( 2019 ) , the graphs considered in this work are denoted as G = ( V , E , A ) , where V = v0 , v1 , ... , vN−1 is the set of vertices that contain features , E is the set of edges , A ∈ RN×N is the adjacency matrix that represent weights . The adjacency matrix is symmetric , shown as A ( i , j ) = A ( j , i ) , where A ( i , j ) ∈ R denotes the weight assigned to the edge e ( i , j ) between the vertices vi and vj . The degree matrix D of the graph G is defined as a diagonal matrix whose D ( i , i ) is given by the degree of vertex i , i.e. , D ( i , i ) = deg ( vi ) , where deg ( vi ) is the degree of vertex i . All the graphs considered in this work are undirected weighted graph without self-loops as shown in Fig . 1 . The linkages between vertices are all nonnegative . 3.2 ARIMA . Auto regressive integrated moving average ( ARIMA ) is widly used in sequences modeling or forecasting tasks . No significant difference with stationarity and with a rapidly decreasing autocorrelation function are two satisfied requirements for ARMA modeling . Thus , for the data without the requirements above , the difference is introduced to solve this problem in ARIMA . Let d be a nonnegative integer , { Xt } isARIMA ( p , d , q ) , if Yt , ( 1−B ) dXt is the causalARMA ( p , q ) process , the { X } satisfies φ∗ ( B ) Xt ≡ φ ( B ) ( 1 − B ) dXt = θ ( B ) Zt , { Zt } ∼ WN ( 0 , σ2 ) where φ ( z ) and θ ( z ) are p-order and q-order polynomials respectively , B is the coefficient setted by mission requirement , d is the differences order . 3.3 DISCRETE WAVELET TRANSFORM . Signals defined on time are discrete . At the same time , the scale parameter a and time shift parameter b are also processed by discretion ( a = 2j , b = k2j , ( j , k ∈ Z ) ) . Under this definition , mother wavelet and other wavelets are all discrete , represented by φ ( n ) and φj , k ( n ) respectively , where φj , k ( n ) is defined as φj , k ( n ) = 2−j/2φ ( 2−jn−k ) , ( j , k ∈ Z ) where j , k are calculated according to the specific data . Let f ( n ) be the input , the DWT of f ( n ) according to φj , k ( n ) is Cj , k , DWTφf ( 2 j , k2j ) = ∑∞ n=−∞ f ( n ) ¯φj , k ( n ) = 2 −j/2∑∞ n=−∞ f ( n ) φ̄ ( 2 −jn − k ) , ( j , k , n ∈ Z ) where n is the total number of discrete time . 3.4 SPECTRAL GRAPH WAVELET TRANSFORM . Following the definition of Graph Fourier Transform Hammond et al . ( 2011 ) , the spectral graph wavelet transform can be defined as follow . The transform will be determined by the choice of a kernel function g : R+ → R+ , which is analogous to Fourier domain wavelet ψ̂∗ in ( T sδa ) ( x ) = 1/sψ ∗ ( a − x/s ) This kernel g should behave as a band-pass filter , i.e . it satisfies g ( 0 ) = 0 and limx→∞g ( x ) = 0 . We will defer the exact specification of the kernel g that we use until later . The spectral graph wavelet transform is generated by wavelet operators that are operator-valued functions of the Laplacian L , which is L = 1 − D−1/2AD1/2 . L is a real symmetric matrix , it has a complete set of orthonormal eigenvector denoted by χl for l = 0 , ... , N − 1 , with associated eigenvalues λl . A measureable function of a bounded self-adjoint linear operator on a Hilbert space using the continuous functional calculus is defined to achieved using the spectral representation of the operator , which is equivalent to the graph Fourier transform defined in Hammond et al . ( 2011 ) . In particular , for spectral graph wavelet kernel g , the wavelet operator Tg = g ( L ) acts on a given function f by modulating each Fourier mode as ˆTgf ( l ) = g ( λl ) f̂ ( l ) . Employing the inverse Fourier transform yields ( Tgf ) ( m ) = ∑N−1 l=0 g ( λl ) f̂ ( l ) χl ( m ) . The wavelet operators at scale t is then defined by T tg = g ( tL ) . The spectral graph wavelets are then realized through localizing these opertors by applying them to the impulse on a single vertex , i.e . ψt , n = T tgδn . Using the orthonormality of the χl , it can be seen that the wavelet coefficients can also be achieved directly from the wavelet opertors , as Wf ( t , n ) = ( T tgf ) ( n ) = ∑N−1 l=0 g ( tλl ) f̂ ( l ) χl ( n ) . The above is the main part of the application of SGWT in our method . See Hammond et al . ( 2011 ) for other notes and proofs . Then in next section , following the definition above , we will introduce the details of our method . 4 GMDS FRAMEWORK . In this section , the multi-domain splitting framework for graph structure is proposed , and we describe the detailed architecture of it shown in Figure 1 . Firstly , we use preprocessing module to clean the original data , and form them into the appropriate format of next layer . Secondly , the Local Splitting is used to split the graph time-series that follow our framework order by local DWT analysis . Then , after the splitting , we use graph generation module to generate the adjacency matrix of each splitted graph time-series . In the last layer , we use spectral graph wavelet transform ( SGWT ) to implement the frequency domain global detection . And the output of our framework is the detection results that involve in the anomaly vertices finding , vertices classification and related application analysis . Furthermore , the local part is detection in each splitted period , the global part stands for splitting on whole time-series . | In this paper, the authors considered the problem of time-varying graph structure anomaly detection. A graph multi-domain splitting framework was proposed by integrating the time, vertex, and frequency features to locate the anomalies. The authors designed a splitting approach for separating the graph sequences into several sub-sequences adaptively, which is based on the discrete wavelet transform. The experiments showed that the proposed method has a better performance than the baselines. | SP:1fe378d812bd4b9722ae0228396d737d1cc76be2 |
$$Research on fusion algorithm of multi-attribute decision making and reinforcement learning based on intuitionistic fuzzy number in wargame environment$$ | 1 INTRODUCTION . Artificial intelligence ( AI ) and machine learning ( ML ) are becoming increasingly popular in realworld applications . For example , AlphaGo has attracted huge attention in the research community and society by showing the capability of AI defeating professional human players in the board game Go . Yet Alphastar , another strong AI program , has achieved great success in the human-machine combating game ’ StarCraft ’ Pang et al . ( 2019 ) ; Silver et al . ( 2016 ) . In RTS games , AI-driven methods are widely studied and integrated into the game AI design to increase the intelligence of computer opponent and generate more realistic confrontation gaming experience . In the King Glory Game , Ye D used an improved PPO algorithm to train the game AI , with positive results Ye et al . ( 2020 ) . By using reinforcement learning techniques , Silver D et al . developed a training framework that requires no human knowledge other than the rules of the game , allowing AlphaGo to train itself , and achieving high levels of intelligence in the process Silver et al . ( 2017 ) . Using deep reinforcement learning and supervised strategy learning , Barrigan el al . improved the AI performance of RTS games , and defeats the built-in game AI Barriga et al . ( 2019 ) . AI has become a hot research topic in recent years , showing a wide variety of applications such as deduction and analysis Schrittwieser et al . ( 2020 ) ; Barriga et al . ( 2017 ) ; O ’ Hanlon ( 2021 ) . However , there are still limited research to address the problem of slow convergence during AI training process under a variety of conditions , especially when it comes to human-AI confrontation games . Indexes measure the value of things or the parameter of an evaluation system . It is the scale of the effectiveness of things to the subject . As an attribute value , it provides the subjective consciousness or the objective facts expressed in numbers or words . It is important to select a scientifically valid target threat assessment ( TA ) index and evaluate that index scientifically . Target threat assessment contributes to intelligence wargame decision-making as part of current intelligent wargames . It is mainly based on rules , decision trees , reinforcement learning , and other technologies in the current mainstream game intelligent decision-making field , but rarely incorporates multi-attribute decisionmaking theory and methods into the intelligent decision-making field . The actual wargame data obtained through wargame environments are presented in this paper , as well as the multi-attribute threat assessment indicators that are effectively transformed and presented as a unified expression . Using three expression forms of real number , interval number , and intuitionistic fuzzy number , the multi-attribute decision-making theory and methods are used to analyse the target threat degree . Then , an enhanced reward function based on the generated threat degree is established to train more effective intelligent decision making model . To the best of our knowledge , this is the first work that combines the multi-attribute decision making with reinforcement learning to produce high performance for game AI in a wargame experiment . 2 WARGAMING MULTIPLE ATTRIBUTE INDEX THREAT QUANTIFICATION . Obtaining scientific evaluation results requires a reasonable quantification of indicators . An important aspect of decision-making assistance in wargames is target threat assessment , and the evaluation result directly affects the effectiveness of wargame AI . The aim of this section is to introduce threat quantification methods for different types of indicators . By combining the target type , this section divides the target into target distance threat , target attack threat , target speed threat , terrain visibility threat , environmental indicator threat , and target defense value . The acquired confrontation data are incorporated into different indicator types , and then the corresponding comprehensive threat value is calculated . In Table 1 are the attributes and meanings of specific indicators . 3 ESTABLISHMENT OF A MULTI-ATTRIBUTE QUANTITATIVE THREAT MODEL BASED ON INTUITIONISTIC FUZZY NUMBERS . By using the interval number method , our framework indicates whether visibility is possible , and different threats are generated . Nevertheless , the quantified values of other threat targets are real numbers . To unify the problem-solving method , our algorithm converts all interval numbers and real numbers to intuitionistic fuzzy numbers , and calculates the size of the threat by calculating the intuitionistic fuzzy numbers . ( 1 ) This intuitionistic fuzzy entropy describes the degree of fuzzy judgment information provided by an intuitionistic fuzzy set . The larger the intuitionistic fuzzy entropy of an evaluation criterion , the smaller the weight it is ; otherwise , the larger needs to be . Based on formulas from the literature Vlachos & Sergiadis ( 2007 ) , we calculated the entropy weights for each intuitionistic fuzzy . Among them , ideal solution S+i is a conceived optimal solution ( scheme ) , and its attribute values hit the best value among the alternatives ; and the negative ideal solution S−i is the worst conceived solution ( scheme ) , and its attribute values hit the worst value among the alternatives . pi is generated by comparing each alternative scheme with the ideal solution and negative ideal solution . If one of the solutions is closest to the ideal solution , but at the same time far from the negative ideal solution , then it is the best solution among the alternatives . Hj = − 1 n ln 2 m∑ i=1 [ µij lnµij + vij ln vij− ( µij + vij ) ln ( µij + vij ) − ( 1− µij − vij ) ln 2 ] ( 1 ) If µij = 0 , vij = 0 , then µij lnµij = 0 , vij ln vij = 0 , ( µij + vij ) ln ( µij + vij ) = 0 . The entropy weight of the j attribute is defined as : wj = 1−Hj n− n∑ j=1 Hj ( 2 ) Among wj ≥ 0 , j = 1 , 2 , · · · , n , n∑ j=1 wj = 1 ( 2 ) Determine the optimal solution A+ and the worst solution A- using the following formula : { A+ = { 〈 µ+1 , ν + 1 〉 , 〈 µ+2 , ν + 2 〉 , · · · , 〈µ+n , ν+n 〉 } A− = { 〈 µ−1 , ν − 1 〉 , 〈 µ−2 , ν − 2 〉 , · · · , 〈µ−n , ν−n 〉 } ( 3 ) Where µ+i = max j=12 ...... m { µij } , ν+i = min j=1,2 , ... , m { νij } ( 4 ) µ−i = min j=1,2 , ··· , m { µij } , ν−i = max j=1,2 , ··· , m { νij } ( 5 ) ( 3 ) Calculate the similarity between the fuzzy intuitionistic A and B as follows : s ( 〈µ1 , ν1〉 , 〈µ2 , ν2〉 ) = 1− |2 ( µ1 − µ2 ) − ( ν1 − ν2 ) | 3 × ( 1− π1 + π2 2 ) −|2 ( ν1 − ν2 ) − ( µ1 − µ2 ) | 3 × ( π1 + π2 2 ) ( 6 ) In which , π1 = 1− µ1 − ν1 , π2 = 1− µ2 − ν2 . ( 4 ) Calculate the similarity S+i and S − i between each solution and the optimal solution and the worst solution based on the following formula : S+i = n∑ k=1 wk · s ( 〈 µ+k , ν + k 〉 , 〈µik , νik〉 ) S−i = n∑ k=1 wk · s ( 〈 µ−k , ν − k 〉 , 〈µik , νik〉 ) ( 7 ) ( 5 ) Then calculate the relative closeness pi = S − i / ( S+i + S − i ) ( 8 ) Comparing threat levels of opponents based on their closeness to the target depends on the level of threat assessment performed . 4 MULTI-ATTRIBUTE THREAT QUANTITATIVE SIMULATION . The threat assessment problem is transformed into a multi-attribute decision making problem , while the combat intention of the target is incorporated into the evaluation system to make the evaluation more realistic and the results more reliable . A simulation scene includes ten tanks on each side , i.e . red and blue , fighting each other , and ten opposite are found as game agents in the wargame . A unified intuitiveistic fuzzy number representation has been created for all multi-attribute indicators . An example of an intuitionistic fuzzy number representation of threat assessment indicators is illustrated in Table 2 . By obtaining data represented by the intuitionistic vagueness of the threat assessment indicators shown in the Table 2 , formulae in ( 7 ) and ( 8 ) may be used to obtain the intuitionistic vague target threat assessment based on multi-attribute decision making approaches . Table 3 shows the assessment scores to determine the target threat level . In Table 4 , the opposite target at T1 is shown as a threat . Based on the evaluation results , it can be concluded that the blue T6 tank is the most harmful and the T7 tank is the second most harmful , this is shown in figure 1 . This paper does not limit evaluation to subjective analysis of experts , but also introduces reinforcement learning , associates the reinforcement learning algorithm through a reward function and analyses the actual wargame AI ’ s winning rate . 5 A FUSION MODEL OF REINFORCEMENT LEARNING AND MULTI-ATTRIBUTE THREAT ANALYSIS . 5.1 REINFORCEMENT LEARNING ALGORITHM AND MULTI-ATTRIBUTE MODEL FORMULATION . Previous sections described the quantified value of multi-attribute analysis of threat levels based on the entropy weight method . The section integrate this method with with reinforcement learning . Its essence is to establish a multi-attribute decision-making mechanism that is based on reinforcement learning , and then select the entity with the highest threat level to establish the return value and threat level . The higher the threat level , the greater the return value , this is shown in figure 2 . A reinforcement learning algorithm is built using the AC framework to achieve intelligent decisionmaking . It includes a reinforcement learning pre-training module that integrates multi-attribute decision-making , critic evaluation network update module and a new and old strategy network update module . In the intensive pre-training module , multi-attribute decision making mainly uses state data obtained from the wargame environment , such as elevation , distance , armour thickness , etc. , to make multi-attribute decisions . By normalizing the data , calculating the threat of each piece of the opponent by using the entropy method , and then setting the reward function and storing it in the experience , further actions in the environment will be taken to obtain the next state and action rewards . The critic network calculates the value from the reward value determined during the last step of the action . combines the experience store data with the value calculated by the critic network , slashes it from the reward value determined during the last action , then returns to update the critic network parameters . As the advantage value guides the calculation of the actor network value , the network outputs the action value according to the old and new networks , and the distribution probability overall , and outputs the action from the network . As a result , the advantage value is corrected , the actor loss is calculated , and the actor network is updated in the reverse direction . | This paper explores training a deep reinforcement learning agent to play a wargame. To my understanding, a hand-crafted feature extraction, “multi-attribute decision making”, and a hand-crafted reward shaping module were used to create a dataset of pre-training data for the agent. The resulting PPO agent was shown to outperform a baseline rules-based agent, and also train faster and reach a higher asymptotic win-rate against a baseline opponent than a comparable PPO agent. The contribution of the paper is the use of multi-attribute decision making to learn weights for attributes of opponent game pieces, to guide the creation of a pre-training dataset and shaping rewards for the RL agent. | SP:894582a4fb8f14e4e9e5f88daff0207320cccef2 |
Randomized Signature Layers for Signal Extraction in Time Series Data | 1 INTRODUCTION . Modeling time series is a common task in finance , physics , and engineering . A frequent challenge is finding a transformation mapping a newly observed time series into a target one ( seq2seq modeling ) or into a label summarizing its salient properties ( classification ) . In the absence of any principled model describing such a mapping , one has to infer it from data . The last few years have witnessed the rise of deep neural networks , which have found successful application to problems involving time series in numerous domains ( Fawaz et al. , 2019 ; Gamboa , 2017 ) . Nevertheless , their outstanding performance comes at the price of over-parametrization , data hungriness , and expensive training cost ( Werbos , 1990 ; Brown et al. , 2020 ; Teubert et al. , 2021 ; Neyshabur et al. , 2018 ; Marcus , 2018 ) . Furthermore , even if sufficient data is available , the resulting models learn representations of the input data that are highly specialized to the training task and difficult to adapt in different contexts . In addition , the remarkable performance of these methods is often the result of a substantial engineering effort and is not supported by theoretical results . Reservoir Computing ( RC ) ( Schrauwen et al. , 2007 ) offers an intriguing alternative strategy to cope with the limitations above , yet retaining the universal approximation properties typical of deep neural networks . In RC , the learning is divided into two phases : first , data is passed through an untrained reservoir which extracts a set of task-independent features ; second , a simple and efficient-to-train linear map ( the readout map ) projects such features into the desired output . The critical point is that the design of the reservoir determines the expressiveness of the features , and several alternatives can be found in the literature ( see ( Gauthier et al. , 2021 ) and references therein ) . A powerful reservoir is offered by the Signature Transform , often simply referred to as Signature , stemming from rough path theory ( Ben Hambly , 2010 ; Friz and Hairer , 2020 ) . The Signature of a path consists in enhancing the path with additional curves , which , in the smooth case , corresponds to iterated integrals of the curve with itself . A profound mathematical result ( Levin et al. , 2013 ) guarantees that the solution of a ( rough ) differential equation can be approximated arbitrarily well by a linear map of the Signature of the input signals ( a.k.a . controls ) . In the machine learning jargon , the Signature of a path can be interpreted as a feature map extracting all its geometrical properties and thus allowing a simple linear map to approximate any function of it . On the other hand , it is often the case that the reservoir features are very high dimensional , and hence are particularly expensive to calculate and use in downstream tasks . In addition , the high-dimensionality of the Signature reservoir poses additional challenges for modern gradient-based optimizers as convergence rates suffer from a linear dependence in the model dimension ( Bottou et al. , 2018 ) . Inspired by the remarkable theoretical properties of the Signature reservoir and motivated to fix its practical pitfalls , our contribution is to showcase the effectiveness of Randomized Signatures ( Cuchiero et al. , 2021b ; a ) , a recently introduced reservoir of random features . These features provably hold the same geometric properties and approximation power as the Signature , yet are often more efficient to compute and of lower dimensionality . To extract Randomized Signatures , we numerically integrate a set of random linear stochastic differential equations driven by the path itself . We assess the expressiveness of the proposed random features on several tasks , including nonparametric ( black-box ) system identification problems arising from complex controlled nonlinear dynamical systems as well as time series classification . The paper is structured as follows : In Section 2 , we link the Randomized Signature approach with related research areas in the literature ; in Section 3 , we present relevant theoretical results motivating our method ; in Section 4 , we assess the effectiveness of Randomized Signatures on various system identification and time series classification tasks , showing promising results when compared to other signature approaches for reservoir computing . Finally , in Section 5 , we discuss our conclusions and possible future developments . 2 RELATED WORKS . Random Features and Reservoir Computing . The idea of extracting features based on random operations is not new and has seen a number of successful applications over the past years . Of particular note , the seminal work of Rahimi and Recht ( 2008 ) proposes to accelerate kernel machines by learning random features whose inner product matches that of a target shift-invariant kernel . The trade-off between generalization and computational efficiency of learning with random features has then been rigorously studied by Rudi and Rosasco ( 2017 ) . A conceptually very similar rationale is introduced by a parallel series of works exploring the topic of Reservoir Computing ( Schrauwen et al. , 2007 ) . Similarly to us , Echo State Networks ( Jaeger , 2003 ) evolve the input state by a series of fixed random projection ( the reservoir ) and generate the output by applying a trainable linear projection over the hidden states . However , we make the additional step of linking the random features to the Signature of the input path and , as shown below , the evolution of the features is dictated by a randomly-evolved stochastic differential equation driven by the input path . Controlled Differential Equations . Our work is also related with a series of recent papers investigating the problems of how to process irregular time series and to condition a model on incoming information through the lens of controlled differential equations ( CDEs ) ( Kidger et al. , 2020 ; Morrill et al. , 2021 ) . Interestingly , Kidger et al . ( 2020 ) show that the action of a linear layer on the final output of a trained Neural CDEs – the extension of Neural ODEs ( Chen et al. , 2018 ) to CDEs – results in a universal function approximator . Differently from them , our method is less computationally expensive as the only parameters we need to train are those of the final linear readout layer . Fundamentally different to our work , the approach of Morrill et al . ( 2020 ) first randomly projects the possibly high dimensional controls into a lower dimensional space and then extracts the Truncated Signature from such compressed input . Our method instead extracts a random compression of the signature of the original input controls . Rough Path Theory . Rough path theory is about describing how possibly highly oscillatory ( rough ) control path interact with nonlinear systems ( Lyons , 2014 ) . The concept of Signature is introduced in this context to provide a powerful description of the input path , removing the need to look at the fine structure of the path itself . Recent years have seen a resurgence of these ideas , which have been revisited from a machine learning perspective ( Bonnier et al. , 2019 ; Kidger and Lyons , 2021 ) . Our analysis is strongly influenced by the work of Cuchiero et al . ( 2021a ; b ) , who , starting from the observation that the Signature is an infinite dimensional reservoir , establishes that its information content can be efficiently compressed by a random projection performed by a dynamical system driven by random vector fields . As we show later , this results in a random reservoir which preserves the properties of the Signature while living in a finite dimensional space . 3 BACKGROUND . We provide the theoretical tools supporting the Randomized Signature approach for feature extraction in times series . A formal discussion can be found in ( Friz and Hairer , 2020 ) and ( Cuchiero et al. , 2021b ) . 3.1 RANDOMIZED SIGNATURE OF A PATH . Let X : [ 0 , T ] → Rd be a continuous piecewise smooth d-dimensional path X = ( X1 , · · · , Xd ) . We will refer to X as the control and to its single components Xi as controls . We denote by { e1 , . . . , ed } the canonical basis of Rd . Definition 1 ( Signature ) For any t ∈ [ 0 , T ] , the Signature of a continuous piecewise smooth path X : [ 0 , T ] → Rd on [ 0 , t ] is the countable collection St : = ( 1 , S1t , S 2 t , . . . ) ∈ ∏∞ k=0 ( Rd ) ⊗k where , for each k ≥ 1 , the entries Skt are the iterated integrals defined as Skt : = ∑ ( i1 , ... , ik ) ∈ { 1 , ... , d } k ( ∫ 0≤s1≤···≤sk≤t dXi1s1 . . . dX ik sk ) ei1 ⊗ · · · ⊗ eik . ( 1 ) We define the Truncated Signature of X of order M ≥ 0 as SMt : = ( 1 , S1t , . . . , S M t ) ∈ M∏ k=0 ( Rd ) ⊗k = : T M ( Rd ) . ( 2 ) A practical example of computation of Signatures is presented in Appendix A.3 . The definition in the last paragraph suggests that the Signatures of X can be used to approximate any regular enough function of X , for instance the solution to differential equations controlled by X . The following result makes this argument precise in the multidimensional setting . Theorem 1 ( Signature is a Reservoir ) Let Vi : Rm → Rm , i = 1 , . . . , d be vector fields regular enough s.t . dYt = ∑d i=1 V i ( Yt ) dX i t , Y0 = y ∈ Rm , admits a unique solution Yt : [ 0 , T ] → Rm . Then , for any smooth test function F : Rm → R and for every M ≥ 0 there is a time-homogeneous linear operator L : T M ( Rd ) → R which depends only on ( V1 , . . . , Vd , F , M , y ) s.t . F ( Yt ) = L ( SMt ) +O ( tM+1 ) , t ∈ [ 0 , T ] . ( 3 ) This theorem suggests the first M entries of the Signature of X are sufficient to linearly explain the solution of any differential equation driven by it . In addition to this , it supports the claim that such features are valuable for any downstream usage . 3.2 RANDOMIZED SIGNATURE OF A PATH AND ITS THEORETICAL GUARANTEES . Calculating SMt requires the calculation of dM+1−1 d−1 iterated integrals ( Appendix A.3 ) – which in total quickly becomes computationally expensive . Several computational techniques have been developed to circumvent this problem , see , e.g . ( Kidger and Lyons , 2021 ) . The next result provides a practical description of how it is possible to reduce the computational burden without losing too much explanatory power . As such , this results provides the theoretical foundation for our approach . Theorem 2 ( Randomized Signature ( Informal ) ) For any k ∈ N big enough and appropriately chosen random matrices A1 , . . . , Ad in Rk×k , random shifts b1 , . . . , bd in Rk×1 , random starting point z in Rk×1 , and any fixed activation function σ , the solution of dZt = d∑ i=1 σ ( AiZt + bi ) dX i t , Z0 = z ∈ Rk , t ∈ [ 0 , T ] . ( 4 ) – called the Randomized Signature of X – has comparable approximation power as the Signature itself and maintains its geometric properties . The formal statement of such a result is the combination of Theorem 8 , Theorem 9 , and Definition 10 ( see Appendix ) . A complete formal discussion as well as the original statement of this theorem can be found in the paper ( Cuchiero et al. , 2021a ) . In a nutshell , the Randomized Signature Z follows a dynamics which provides an efficient and powerful compression of the Signature through a low-dimensional random projection . The expressiveness of such projection is guaranteed by a standard Johnson-Lindenstrauss argument ( Cuchiero et al. , 2021a ) . Computational complexity and dimensionality of Randomized Signatures . The computational complexity of calculating Zt is O ( k2d ) , while its dimensionality is O ( k ) . However , we should then ask the crucial question “ how should we compare k with M ? ” . We show experimentally in Section 4 that , in order to match the approximation guarantees of the Truncated Signature of order M , the number of required Randomized Signatures k is not too big — in particular it is not exponential in M . This confirms that working with Randomized Signatures is often less computationally demanding and results in lower-dimensional features . We conclude the section remarking the fascinating implications of choosing a random Ais and bis . Theorem 3 ( Density of Randomized Signatures ( Informal ) ) For any sequences of time points 0 ≤ t0 < . . . < tN ≤ T and points zt0 , . . . , ztN ∈ Rk we can find a smooth control X such that the solution Z of Equation 4 at time ti is such that Zti = zti , for i = 0 , . . . , N . Additionally , if the control X is a d-dimensional Brownian motion , then the solution of Equation 4 at any point in time t > 0 admits a smooth density with respect to Lebesgue measure . | This paper proposes a Signature-based method for learning feature representation of time series, denoted as $d$-dimensional path $X$. By definition, Signature is a sequence of $M$ tensors where each tensor is a sum of integral terms defined on dimensions of $X$. Theoretically Signature is guaranteed to linearly explain the solution of any differential equation driven by $X$ which implies that it encodes well $X$. Computing Signature however has time complexity $O(d^M)$ rendering it impractical for learning purposes. To alleviate the issue, the paper introduces Randomized Signature, which can be computed in $O(k^2 d)$ only where $k$ is the number of Randomized Signatures. Each of such Signature has $O(kd)$ dimensions. As stated by Theorem 2 in the paper, Randomized Signature approximates well the original Signature. Experiments on differential equations show Randomized Signature finds solutions close to ground-truth solutions. Experiments on time series classification also show its potential. | SP:b82519f51f99145432f1a9b910dad6db02515a44 |
Recurrent Model-Free RL is a Strong Baseline for Many POMDPs | 1 INTRODUCTION While reinforcement learning ( RL ) is often cast as the problem of learning a single fully observable task , also known as MDP , training and testing on that same task , most real-world applications of RL demand some degree of transfer and partial observability . For example , visual navigation ( Zhu et al. , 2017 ) requires adaptation to unseen scenes with occlusion in observations , and human-robot collaboration requires that robots infer the intentions of human collaborators . ( Chen et al. , 2018 ) . Many subareas in RL study problems that are special cases of POMDPs , and we summarize them in Table 1 . For example , meta RL ( Duan et al. , 2016 ; Schmidhuber , 1987 ; Thrun & Pratt , 2012 ; Wang et al. , 2017 ) is a POMDP where certain aspects of the reward function or ( less commonly ) dynamics function are unobserved but held constant through one episode . The robust RL problem ( Bagnell et al. , 2001 ; Pattanaik et al. , 2018 ; Pinto et al. , 2017 ; Rajeswaran et al. , 2017a ) assumes that certain aspects of the dynamics or reward function are unknown , aiming at finding optimal policies that perform against adversarially-chosen perturbations . Generalization in RL ( Cobbe et al. , 2019 ; Packer et al. , 2018 ; Whiteson et al. , 2011 ; Zhang et al. , 2018a ) focuses on unobserved aspects of the dynamics or reward function that are novel during testing , using an average-case objective instead of a worst-case objective like robust RL . Recent work has proposed efficient and performant algorithms for solving these specialized problem settings . However , these algorithms often make assumptions that preclude their application to other classes of POMDPs . For example , methods for robust RL are rarely used for the meta RL setting due to objective mismatch ; methods for meta RL are rarely used for general POMDPs due to the stationarity assumption in meta RL . 1Code : https : //drive.google.com/drive/folders/1I5mLlKPf2Gmdpm0nzy9OkR494nCJll1g ? usp=sharing Nonetheless , many prior works have used a simple baseline that is applicable to all POMDPs : model-free RL equipped with a recurrent policy and ( sometimes ) value function ( Duan et al. , 2016 ; Fakoor et al. , 2020 ; Igl et al. , 2018 ; Packer et al. , 2018 ; Rakelly et al. , 2019 ; Wang et al. , 2017 ; Yu et al. , 2019 ) . We will refer to this approach as recurrent model-free RL . This baseline is simultaneously simple ( requiring changing only a few lines of code from a model-free RL algorithm ) and general . However , prior work has consistently found that recurrent model-free RL performs poorly across a wide range of problem settings , including meta RL ( Rakelly et al. , 2019 ; Zintgraf et al. , 2020 ) , general POMDPs ( Han et al. , 2020 ; Igl et al. , 2018 ) , robust RL ( Zhang et al. , 2021 ) , and generalization in RL ( Packer et al. , 2018 ) . One common explanation is that specialized algorithms that are tailored to specific types of POMDPs are very likely to outperform recurrent model-free RL because they ( implicitly ) encode inductive biases for solving these specific tasks . For example , algorithms for meta RL may leverage the assumption that the underlying dynamics ( while unknown ) are fixed , and the underlying goals are fixed within one episode ( Rakelly et al. , 2019 ; Zintgraf et al. , 2020 ) ; algorithms for robust RL may assume that the dynamics parameters are known ( Rajeswaran et al. , 2017a ) and dynamics is Lipschitz continuous ( Jiang et al. , 2021 ) . This paper challenges this explanation . We argue that , contrary to popular belief , recurrent modelfree RL is competitive with recent state-of-the-art algorithms across a range of different POMDP settings . Similar to prior work in Markovian on-policy RL methods ( Andrychowicz et al. , 2021 ; Engstrom et al. , 2020 ) , our experiments show that implementation in recurrent model-free RL matters . Fig . 1 shows a typical scenario in PyBullet occlusion environments ( Coumans & Bai , 2016 ) to support this argument . Through extensive experiments , we show that the careful design and implementation of recurrent model-free RL is critical to its performance . Design decisions , such as the actor-critic architecture , conditioning on previous actions and/or rewards , the underlying model-free RL algorithms , and context length in RNNs , are especially crucial . The main contribution of this paper is a performant implementation of recurrent-model free RL . We demonstrate that simple yet important design decisions , such as the underlying RL algorithm and the context length , yield a recurrent model-free RL algorithm that performs on par with prior specialized POMDP algorithms on the environments those algorithms were designed to solve . Ablation experiments identify the importance of these design decisions . We also open-sourced our code that is easy to use and memory-efficient . 2 BACKGROUND . MDP . A Markov decision process ( MDP ) ( Bellman , 1957 ) is a tuple ( S , A , T , T0 , R , H , γ ) , where S is the set of states , A is the set of actions , T : S × A × S → [ 0 , 1 ] is the transition function ( dynamics ) , T0 : S → [ 0 , 1 ] is the initial state distribution , R : S × A × S → R is the reward function , H ∈ N is the time horizon , and γ ∈ [ 0 , 1 ) is the discount factor . Solving an MDP requires learning a memoryless policy π : S × A → [ 0 , 1 ] that maximizes the expected discounted return : π∗ = argmaxπ Est , at , rt∼T , π [ ∑H−1 t=0 γ trt+1 | s0 ] . For any MDP , there exists an optimal policy that is both memoryless and deterministic ( Puterman , 2014 ) . MaxEnt RL algorithms ( Ziebart , 2010 ) , such as SAC ( Haarnoja et al. , 2018a ) , add an entropy bonus to the RL objective . POMDP . A partially observable Markov decision process ( POMDP ) ( Åström , 1965 ) is a tuple ( S , A , O , T , T0 , O , O0 , R , H , γ ) , where the underlying process is an MDP ( S , A , T , T0 , R , H , γ ) . Let O be the set of observations and let O : S × A ×O → [ 0 , 1 ] be the emission function . Let the observable trajectory up to time-step t be τ0 : t = ( o0 , a0 , o1 , r1 , . . . , at−1 , ot , rt ) , the memory-based policy in the most general form is defined as π ( at | τ0 : t ) , conditioning on the whole history . At the first time step t = 0 , an initial state s0 ∼ T0 ( · ) and initial observation o0 ∼ O0 ( · | s0 ) are sampled . At any time-step t ∈ { 0 , . . . , H − 1 } , the policy emits the action at ∈ A to the system , the system updates the state following the dynamics , st+1 ∼ T ( · | st , at ) , then the next observation is sampled ot+1 ∼ O ( · | st+1 , at ) and the reward is computed as rt+1 = R ( st , at , st+1 ) . We refer to the part of the state st at current time-step t that can be directly unveiled from current observation ot as the observable state sot , and the rest part of the state as the hidden state sht . We call the hidden state s h t stationary if it does not change within an episode . In this scenario , the policy objective can be rewritten as π∗ = argmaxπ Esh∼T0 [ Est , at , rt∼T , O , O0 , π [ ∑H−1 t=0 γ trt+1 | sh ] ] for the average-case POMDP objec- 3 RELATED WORK . In this section , we discuss several subareas of RL that both explicitly and implicitly solve POMDPs , as well as algorithms proposed for these specialized settings . Table 1 summarizes these subareas . RL for “ Standard ” POMDPs . We use the term “ standard ” to refer to prior work that explicitly labels the problems studied as POMDPs . Common tasks include scenarios where the states are partially occluded ( Heess et al. , 2015 ) , different states correspond to the same observation ( perceptual aliasing ( Whitehead & Ballard , 1990 ) ) , random frames are dropped ( Hausknecht & Stone , 2015 ) , observations use egocentric images ( Zhu et al. , 2017 ) , or the observations are perturbed with random noise ( Meng et al. , 2021 ) . These POMDPs often have hidden states that are non-stationary and affect both the rewards and the dynamics . POMDPs are hard to solve ( Littman , 1996 ; Papadimitriou & Tsitsiklis , 1987 ) because of the curse of dimensionality : the size of the history grows linearly with the horizon length . Many prior POMDP algorithms ( Cassandra et al. , 1994 ; Kaelbling et al. , 1998 ) attempt to infer the state from the past sequence of observations , and then apply standard RL techniques to that inferred state . However , the exact inference requires the knowledge of the dynamics , emission , and reward functions , and is intractable in all except the most simple settings . A common strategy for solving these general POMDPs is to use recurrent policies , which take the entire history of past observations as inputs ( Bakker , 2001 ; Schmidhuber , 1991 ; Wierstra et al. , 2007 ) . This strategy is very simple and general , and can be applied to arbitrary tasks without knowledge of the task structure ( e.g. , whether the hidden states change within an episode ) across long time horizons ( Duan et al. , 2016 ) . These recurrent strategies can be further subdivided into model-free methods ( Hausknecht & Stone , 2015 ; Heess et al. , 2015 ; Meng et al. , 2021 ) , where the single objective is to maximize the return , and model-based methods ( Freeman et al. , 2019 ; Han et al. , 2020 ; Igl et al. , 2018 ; Watter et al. , 2015 ) that have explicit objectives on modeling the belief states and use them as the inputs of memoryless policies . The recurrent model-free RL that we focus on belongs to the class of model-free off-policy memory-based algorithms . Meta RL . Meta RL , also called “ learning to learn ” ( Schmidhuber , 1987 ; Thrun & Pratt , 2012 ) , focuses on POMDPs where some parameters in the rewards or ( less commonly ) dynamics are varied from episode to episode , but remain fixed within a single episode , which represent different tasks with different values ( Humplik et al. , 2019 ) . The meta RL setting is almost the same as multitask RL ( Wilson et al. , 2007 ; Yu et al. , 2019 ) , but differs in that multi-task RL can observe the task parameters , making it an MDP instead of a POMDP . Algorithms for meta RL can be roughly categorized based on how the adaptation step is performed . Gradient-based algorithms ( Fakoor et al. , 2020 ; Finn et al. , 2017 ; Hochreiter et al. , 2001 ) run a few gradient steps on the pre-trained models to adapt . Memory or context-based algorithms use RNNs to implicitly adapt , which can be further subdivided into implicit and explicit task inference methods . Implicit task inference methods ( Duan et al. , 2016 ; Wang et al. , 2017 ) use RL objective only to learn recurrent policies . Explicit task inference methods ( Rakelly et al. , 2019 ; Zintgraf et al. , 2020 ) train an extra inference model to explicitly estimate task embeddings ( i.e. , a representation of the unobserved parameters ) by variational inference . Task embeddings are then used as additional inputs to memoryless policies . Robust RL . The goal of robust RL is to find a policy that maximizes returns in the worst-case environments . Early work in the control and operations research community ( Khalil et al. , 1996 ; Nilim & Ghaoui , 2005 ) and RL community ( Bagnell et al. , 2001 ; Morimoto & Doya , 2005 ) focused on linear or finite systems . Prior work designs deep RL algorithms that are robust against a variety of adversarial attacks , including attacks on the dynamics ( Jiang et al. , 2021 ; Rajeswaran et al. , 2017a ) , observations ( Huang et al. , 2017 ; Pattanaik et al. , 2018 ; Zhang et al. , 2021 ) , and actions ( Gleave et al. , 2020 ; Pinto et al. , 2017 ; Tessler et al. , 2019 ) . Treating the robust RL problem as a POMDP , rather than an MDP ( as done in most prior work ) , unlocks a key capability for RL agents , because agents can use their memory to identify the hidden states of the current adversarial environment , although previous work ( Jiang et al. , 2021 ; Rajeswaran et al. , 2017a ) only train Markovian policies on POMDPs . While some work find memory-based policies are more robust to the adversarial attacks than Markovian policies ( Russo & Proutière , 2021 ; Zhang et al. , 2021 ) , they train these baselines in a single MDP without adversaries , which differs from our training setting where the recurrent model-free RL can have access to a set of MDPs . Generalization in RL . The goal of generalization in RL is to make RL algorithms perform well in test domains that are unseen during training , which emphasizes the average case on the novel test domains instead of the worse case in the possibly seen test domains as in robust RL . Prior work have studied generalization to initial states in the same MDP ( Rajeswaran et al. , 2017b ; Whiteson et al. , 2011 ; Zhang et al. , 2018b ) , random disturbance in dynamics ( Rajeswaran et al. , 2017b ) , states ( Stulp et al. , 2011 ) , observations ( Song et al. , 2020 ; Zhang et al. , 2018a ) , and actions ( Srouji et al. , 2018 ) , and different modes in procedurally generated games ( Cobbe et al. , 2019 ; Farebrother et al. , 2018 ; Justesen et al. , 2018 ) . Among them , Packer et al . ( 2018 ) provides a benchmark on both in-distribution ( ID ) and out-of-distribution ( OOD ) generalization to different dynamics parameters , and Zhao et al . ( 2019 ) extends the benchmark by introducing random noise in states , observations , and actions . Algorithms for improving generalization in RL can be roughly divided into classic regularization methods such as weight decay , dropout , batch normalization , and entropy regularization ( Cobbe et al. , 2020 ; Farebrother et al. , 2018 ; Igl et al. , 2019 ) , model architectures ( Raileanu & Fergus , 2021 ; Srouji et al. , 2018 ) , data augmentation through randomization ( Lee et al. , 2020 ; Tobin et al. , 2017 ) , Although introducing observational noise and the change in dynamics parameters will transform MDPs to POMDPs , few work study memory-based policies such as model-free recurrent RL with mixed results . Same algorithm RL2 ( Duan et al. , 2016 ) was found to perform badly in Packer et al . ( 2018 ) but relatively well in Yu et al . ( 2019 ) . | This paper is concerned with understanding when RNNs are useful in POMDPs. They should that, for a class of POMDPS (e.g., meta RL, robust RL), standard RNNs can be competitive with solutions that are tailored to the given POMDP structure. The authors discuss four design considerations that they claim are essential for performance: (1) decoupling actor and critic networks, (2) using off-policy instead of on-policy algorithms, (3) context length of RNN, and (4) using rewards as historical input. They should on 4 mujoco baselines that their results are competitive with sota methods whenever these design choices are taken into account. | SP:9147a661714557dc78e84fcdc676258c434c048d |
Neural network architectures for disentangling the multimodal structure of data ensembles | 1 INTRODUCTION . Neural networks are being employed increasingly in high-stakes application areas , such as face recognition [ Taigman et al . ( 2014 ) ; Huang ( 2012 ) ; Sun et al . ( 2013 ) ; Chen et al . ( 2015 ) ; Xiong et al . ( 2016 ) ] , and medical technologies [ Kermany et al . ( 2018 ) ; Madani et al . ( 2018 ) ; Topol ( 2019 ) ] . Developing a set of neural network architectures that are causally explainable is important in developing a trustworthy machine learning , where `` A causes B '' means `` the effect of A is B '' , a measurable and experimentally repeatable quantity [ Holland ( 1986 ) ] . Forward causal inference models the mechanism of data formation , and estimates the effects of interventions [ Pearl ( 2000 ) ; Imbens & Rubin ( 2015 ) ; Spirtes et al . ( 2000 ) ; Vasilescu et al . ( 2021 ) ; Vasilescu & Terzopoulos ( 2002a ; 2005 ; 2004 ) ] . Unlike , conventional statistics and conventional machine learning that model the observed data distribution , and make predictions about a variable that has been co-observed with another . Inverse causal inference estimates the causes of effects given an estimated forward causal model that is inverted subject to a set of observations that constrain the solution set [ Vasilescu ( 2011 ) ; Vasilescu & Terzopoulos ( 2007 ) ] . There are two conceptual frameworks for causal inference : DAGs or path analysis and potentialoutcome . Donald Rubin and his collaborators have advocated the potential outcome approach which framed causal inference as a missing data problem [ Imbens ( 2020 ) ] . Judea Pearl has been advocating do-calculus – a directed acyclic graph approach as a mathematical language that he has unified with structural equations and counterfactuals [ Bollen & Pearl ( 2013 ) ] . Judea Pearl ’ s causation ladder [ Pearl ( 2000 ) ] provides a way of thinking about causal discovery , causal reasoning , and decision making . Pearl & Bareinboim ( 2014 ) ; Bareinboim & Pearl ( 2016 ) have parameterized the differences between experimental and observational studies based on possible sources of error . Tensor data analysis is a type of structural equation modeling that has been employed to perform dimensionality reduction , to develop regression models , and to model cause-and-effect , Fig . 1 . Tensor factor analysis has been employed in psychometrics [ Tucker ( 1966 ) ; Harshman ( 1970 ) ; Carroll & Chang ( 1970 ) ; Bentler & Lee ( 1979 ) ; Kroonenberg & de Leeuw ( 1980 ) ] , econometrics [ Kapteyn et al . ( 1986 ) ; Magnus & Neudecker ( 1988 ) ] , chemometrics [ Bro ( 1997 ) ; Acar et al . ( 2014 ) ] , signal processing [ de Lathauwer ( 1997 ; 2008 ) ; Cichocki et al . ( 2009 ) ] , computer vision [ Vasilescu & Terzopoulos ( 2002b ) ; Wang & Ahuja ( 2003 ) ] , computer graphics [ Vasilescu ( 2002 ) ; Davis & Gao ( 2003 ) ; Vasilescu & Terzopoulos ( 2004 ) ; Vlasic et al . ( 2005 ) ; Hsu et al . ( 2005 ) ] , and machine learning [ Vasilescu ( 2009 ) ; Vasilescu & Terzopoulos ( 2005 ) ] . In machine learning , tensor methods have been effectively employed to reparameterize neural networks . Neural network weights have been organized into “ data tensors ” and dimensionally reduced in order to achieve greater computational efficiency [ Lebedev et al . ( 2014 ) ; Novikov et al . ( 2015 ) ; Kim et al . ( 2015 ) ; Khrulkov ( 2020 ) ; Onu et al . ( 2020 ) ; Iwen et al . ( 2021 ) ] . Tensor methods have also been applied in regression analysis [ Kolda et al . ( 2005 ) ; Chu & Ghahramani ( 2009 ) ; Tang et al . ( 2013 ) ; Anandkumar et al . ( 2014 ) ; Kossaifi et al . ( 2017 ) ; Wang et al . ( 2017 ) ; Benesty et al . ( 2021 ) ; Vendrow et al . ( 2021 ) ] . This paper introduces a set of causal capsule architectures for forward and inverse causal inference that implement tensor factor analysis operations . These architectures are consistent with capsule theory proposed by Geoffrey Hinton and his collaborators [ Hinton et al . ( 2011 ) ; Sabour et al . ( 2017 ) ; Hinton ( 2021 ) ] . Forward causal inference , the estimation of effects of causes , is performed with a causal autoencoder architecture that consists of several causal capsules that compute the causal factor representations , and a tensor-autoencoder that governs the causal factor interaction , Fig 2 . A causal capsule is formed from a set of constrained “ cluster ” -based autoencoders1that transform the basis vectors spanning the “ cluster ” subspace , such that a causal factor representation is invariant of the “ cluster ” membership , i.e. , invariant to all the other causal factors [ Vasilescu ( 2009 ) ] . A tensor autoencoder is an autoencoder with a vectorized tensor code formed from the multilinear ( tensor ) product of factor representations . A recurrent non-linear causal capsule chain that employs kernel activations computes the optimal linearized subspace for every causal factor , and implements the kernel multilinear principal component analysis or the kernel multilinear independent component analysis , Fig 3 . For distributed computation , we break the chain links andeach causal representation is computed separately , shuttling causal information between capsules . For a scalable architecture , causal representations for an object whole can be computed efficiently by parts , Fig 4 . As Hinton ( 2021 ) has also indicated , a part-based causal capsule architectures may also be “ glommed ” together to analyze a hierarchy of data columns [ Vasilescu et al . ( 2021 ) ; Vasilescu & Kim ( 2019 ) ; de Lathauwer ( 2008 ) ] . The hierarchical neural network architecture is a compositional 1In the context of multifactor data analysis , a cluster is a set of observations for which all factors are fixed except one . Data belonging to the same cluster may not form a cluster in Euclidean space and not easily identifiable by an EM algorithm [ Dempster et al . ( 1977 ) ] . hierarchical computation of causal factor representation and implements the Incremental M -mode Block SVD algorithm . 2 Algorithm 1 M -mode SVD algorithm . Input the data tensor D ∈ CI0×···×IM . 1 . For m : = 0 , . . . , M , Let Um be the left orthonormal matrix of [ UmSmVTm ] : = svd ( D [ m ] ) a 2 . Set Z : = D ×0 U0T ×1 U1T · · · ×m Um T · · · ×M UM T. Output mode matrices U0 , U1 . . . , UM and the core tensor Z . aThe computation of Um in the SVD D [ m ] = UmΣVm T can be performed efficiently , depending on which dimension of D [ m ] is smaller , by decomposing either D [ m ] D [ m ] T = UmΣ2UmT ( note that VmT = Σ+UmTD [ m ] ) or by decomposing D [ m ] TD [ m ] = VmΣ 2Vm T and then computing Um = D [ m ] VmΣ + . Inverse causal inference is performed with a multilinear projection architecture [ Vasilescu & Terzopoulos ( 2007 ) ; Vasilescu ( 2009 ) ] that is performed by inverting an estimated forward model subject to data constraints . Fig . 5 . The architectures are derived based on two mathematical principles : ( i ) linear autoencodersdecoders weights are the principal component analysis basis vectors , sec . 2 , ( ii ) the object-whole representation can be derived bottom-up in closed form from a part-based hierarchical causal factor representation , sec 3.2 . After reviewing the mathematical foundations of our work in the next section , we discuss forward causal models and depict their neural network arcitectures in Section 3 and discuss inverse causal inference and depict the multilinear projection neural network architectures in Section 4 . Section 5 concludes the paper . 2 LINEAR AUTOENCODER AND LINEAR PCA . An autoencoder-decoder that minimizes the reconstruction loss function , l = I∑ i=1 ‖di −Bci‖+ λ‖BTB− I‖ ( 1 ) and has a linear decoder learns a set of weights , br that are identical to the PCA basis vectors when the weights of each neuron , cr are computed sequentially . An autoencoder is implemented with a cascade of Hebb neurons [ Hebb ( 1949 ) ] . The contribution of each neuron , c1 , . . . , cr , are the PCA sequentially computed and subtracted from a centered training data set , and the difference is driven through the next Hebb neuron , cr+1 [ Sejnowski et al . ( 1989 ) ; Sanger ( 1989 ) ; Rumelhart et al . ( 1986 ) ; Ackley et al . ( 1985 ) ; Oja ( 1982 ) ] . The weights of a Hebb neuron , cr , are updated by ∆br ( t+ 1 ) = η ( d− r∑ ir=1 bir ( t ) cir ( t ) ) cr ( t ) = η ( d− r∑ ir=1 bir ( t ) b T ir ( t ) d ) dTbr ( t ) , br ( t+ 1 ) = ( br ( t ) + ∆br ( t+ 1 ) ) ‖br ( t ) + ∆br ( t+ 1 ) ‖ where d ∈ CI0 is a vectorized centered observation with I0 measurements , η is the learning rate , br are the autoencoder weights of the r neuron , cr is the activation , and t is the time iteration . Backpropagation [ LeCun et al . ( 1988 ; 2012 ) ] is equivalent to performing PCA gradient descent [ Jolliffe ( 1986 ) ] . 3 CAUSAL INFERENCE . Throughout this article , we will denote scalars by lower case italic letters ( a , b , ... ) , vectors by bold lower case letters ( a , b , ... ) , matrices by bold uppercase letters ( A , B , ... ) , and higher-order tensors by bold uppercase calligraphic letters ( A , B , ... ) . Index upper bounds are denoted by italic uppercase letters ( i.e. , 1 ≤ a ≤ A or 1 ≤ i ≤ I ) . The zero matrix is denoted by 0 , and the identity matrix is denoted by I . The TensorFaces paper [ Vasilescu & Terzopoulos ( 2002a ) is a gentle introduction to tensor factor analysis , Kolda and Bader [ Kolda & Bader ( 2009 ) is a nice survey of tensor methods and references [ Vasilescu ( 2009 ) ; de Lathauwer ( 1997 ) ; Bro ( 1997 ) provide an in depth treatment of tensor factor analysis . 2By comparison , a hierarchical Tucker is a resource efficient hierarchical computational scheme that employs a hierarchical re-balancing of the modes trick in which one flattens a data tensor in multiple modes at the same time to avoid computing SVDs of skinny matrices [ Hackbusch & Kühn ( 2009 ) ; Grasedyck ( 2010 ) ; Perros et al . ( 2015 ) ] . Algorithm 2 Kernel Multilinear PCA/ICA ( K-MPCA/MICA ) algorithm . Input the data tensor D ∈ CI0×···×IM , where mode m = 0 is the measurement mode , and the desired ranks R̃1 , . . . , R̃M . 1 . For m : = 1 , . . . , M , Compute the elements of the mode-m covariance matrix , for j , k : = 1 , . . . , Im , as follows : [ D [ m ] D [ m ] T ] jk : = I1∑ i1=1 ... Im−1∑ im-1=1 Im+1∑ im+1=1 ... IM∑ iM=1 K ( di1 ... im-1 j im+1 ... iM , di1 ... im-1 k im+1 ... iM ) . For K-MPCA : Set Um to the left matrix of the SVD of D [ m ] D [ m ] T = UmΣ2UmT Truncate to R̃m columns Um ∈ CIm×R̃m . For K-MICA : Compute Um : = Cm ∈ CIm×R̃m based on [ Vasilescu & Terzopoulos ( 2005 ) ] . The initial SVD truncates to R̃m . 2 . Set T : = D ×1 U+1 · · · ×m U+m · · · ×M U + M . 3 . Local optimization via alternating least squares : Iterate for n : = 1 , . . . , N For m : = 1 , . . . , M , Set Xm : = D ×1 U+1 · · · ×m−1 U + m−1 ×m+1 U + m+1 · · · ×M U + M . Set Um to the R̃m leading left-singular vectors of the SVD of Xm , [ m ] a . Set T : = XM ×M U+M . until convergence . Output the converged extended core tensor T ∈ CI0×R̃1×···×R̃M and causal factor mode matrices U1 , . . . , UM . | This paper is an attempt to connect tensor factor analysis with DNN learning. The paper explores the forward causal inference and inverse causal inference problems. The forward causal inference is performed using causal capsules architecture that uses M-mode SVD for subspace learning (autoencoder). The authors show that the M-mode SVD rotates the basis vectors of various clusters such that the causal representation is the same regardless of the data cluster (Fig.1). They introduce causal capsule hierarchy architecture that uses tensor decompositions for forward and inverse causal inference. | SP:935749d9ae4f9c3c109650a3d303285adf15a117 |
Ancestral protein sequence reconstruction using a tree-structured Ornstein-Uhlenbeck variational autoencoder | 1 Introduction . Representation learning of biological sequences is important for data exploration and downstream tasks such as protein design ( Detlefsen et al. , 2020 ; Alley et al. , 2019 ) . Deep generative models such as variational autoencoders ( VAEs ) ( Kingma & Welling , 2013 ; 2019 ) have been especially useful for this purpose ( Riesselman et al. , 2018 ; Greener et al. , 2018 ) . However , current models do not take evolutionary information fully into account , i.e. , by relating the sequences belonging to a protein family in a phylogenetic tree and incorporating parameterized evolutionary models ( Durbin et al. , 1998 ) . To address this problem , we replace the standard multivariate Gaussian prior of a conventional VAE with a tree-structured prior that takes into account a given evolutionary tree . We propose a prior based on the Ornstein-Uhlenbeck Gaussian process on a tree ( Hansen , 1997 ; Jones & Moriarty , 2013 ) . We apply the model to a classic problem in phylogenetics , namely the inference of ancestral sequences . Ancestral sequence reconstruction ( ASR ) , i.e. , the inference of ancestral sequences given their descendants or leaf sequences ( Pauling et al. , 1963 ; Yang et al. , 1995 ; Koshi & Goldstein , 1996 ; Joy et al. , 2016 ; Hochberg & Thornton , 2017 ; Selberg et al. , 2021 ) , has important applications including protein engineering ( Cole & Gaucher , 2011 ; Spence et al. , 2021 ) , modeling tumour evolution ( El-Kebir et al. , 2015 ) , evaluating virus diversity and vaccine design ( Gaschen et al. , 2002 ) , understanding drug mechanisms ( Wilson et al. , 2015 ) and reconstructing ancient proteins in vitro ( Chang et al. , 2002 ; Wilson et al. , 2015 ; Hochberg & Thornton , 2017 ) . As input , we assume a set of nS known , aligned leaf sequences and their phylogenetic tree . The task we want to address is the inference of the nA = nS−1 unknown , ancestral sequences ( Joy et al. , 2016 ) . We show that our probabilistic model , called Draupnir , is about on par with or better than the accuracy of established ASR methods for a standard experimentallyderived data set ( Alieva et al. , 2008 ; Randall et al. , 2016 ) and several simulated data sets . The paper is organised as follows . In Background , we briefly discuss evolution of biological sequences , ancestral sequence reconstruction and the tree-structured Ornstein-Uhlenbeck process . In Related Work , we discuss deep generative models of biological sequences . In Methods , we describe the Draupnir model , the inference of ancestral sequences and the setup of the benchmarking experiments . In Results , we discuss the quality of the latent representations , compare the accuracy of Draupnir with state-of-the-art phylogenetic methods for ASR , and present the results of ablation experiments . We end with a brief discussion of future work , including extending the method to genomic-scale data sets and the case of a latent phylogenetic tree . 2 Background . 2.1 Protein sequences and evolution . Biological molecules such as proteins and nucleic acids ( DNA , RNA ) can be characterised by sequences of characters from an alphabet of size nC , where typically nC = 21 for proteins and nC = 5 for nucleic acids ( Durbin et al. , 1998 ) . These alphabets include one character that represents a gap , which is useful in aligning related sequences in a multiple sequence alignment ( MSA ) . In the course of evolution , mutations arise that cause changes in these sequences , including character substitutions , deletions and insertions . A set of nS known , homologous , extant sequences and their evolutionary relationships are naturally represented as nS leaf nodes in a binary tree or phylogeny , where the nA internal or ancestral nodes represent unknown , ancestral sequences ( Joy et al. , 2016 ) . Among the internal nodes , the root node is the most ancient node . Edges between two nodes in the tree are labelled by positive real numbers that represent the time difference or the amount of change between them . Such a labelled binary tree naturally defines a ( nS +nA ) × ( nS +nA ) matrix containing the pairwise distances between all nodes , called the patristic distance matrix , T. In the context of biological sequences , the field of phylogenetics is concerned with the inference of the tree topology , the labels of the tree ’ s edges and the composition of the ancestral sequences , making use of methods based on heuristics ( such as maximum parsimony ) or probabilistic , evolutionary models ( Joy et al. , 2016 ) . 2.2 Ancestral protein reconstruction . The ASR problem amounts to inferring the composition of the nA ancestral sequences from the nS extant sequences , making use of a tractable model of evolution ( Joy et al. , 2016 ) . Typically , the phylogenetic tree that relates the sequences is assumed known . Standard methods to do this typically assume independent ( factorized ) evolution of the characters in the sequence , which is a computationally convenient but unrealistic assumption . For example , in proteins , amino acids are involved in an intricate 3-dimensional network of interactions that can lead to strong dependencies between amino acids far part in the sequence . This phenomenon is called epistasis ( Hochberg & Thornton , 2017 ) , which requires coevolutionary models that go beyond the factorized assumption . Nonetheless , it has been possible to infer ancestral sequences and subsequently resurrect functional ancient , ancestral proteins in vitro ( Hochberg & Thornton , 2017 ) . The aim of this work is to go beyond the assumption of independent , factorized evolution by using a model of evolution that features continuous , latent vector representations of the protein sequences . This allows us to formulate the ASR problem in the context of a deep generative model . 2.3 The Ornstein-Uhlenbeck process on a phylogenetic tree . Typically , ASR of biological sequences is done using factorised evolutionary models that represent substitutions , insertions and deletions of the discrete characters in the sequences ( Joy et al. , 2016 ) . In contrast , Draupnir aims to model the evolution of latent , continuous representations or underlying traits of the sequences . A simple diffusive process allowing for an equilibrium distribution is the Ornstein-Uhlenbeck ( OU ) process ( Hansen , 1997 ; Jones & Moriarty , 2013 ) . As the OU process is a Gaussian process , it has a Gaussian equilibrium distribution , as well as Gaussian marginal distributions . We use an OU process on a phylogenetic tree ( TOU process ) ( Hansen , 1997 ; Jones & Moriarty , 2013 ) to put the latent representations under the control of a parameterized evolutionary model . Apart from the mean , which for our purposes can be assumed to be zero , the TOU process has three parameters : the variation unattributable to the phylogeny or the intensity of specific variation σn , the characteristic length scale of the evolutionary dynamics , λ and the intensity of inherited variation , σf . The covariance function for the corresponding multivariate Gaussian distribution is then given by ( Hadjipantelis et al. , 2012 ; Jones & Moriarty , 2013 ) , Σk , l = σ2f exp ( −Tk , l λ ) + σ2nδk , l ( 1 ) where Tk , l is the patristic distance between nodes k and l in the tree , and the Kronecker delta δk , l = 1 if k = l , and 0 otherwise . The TOU process and related diffusive processes on trees are well-established evolutionary models that have been used to model the evolution of continuous traits , such as body mass or length ( Joy et al. , 2016 ) . For example , Lartillot ( 2014 ) proposes a phylogenetic Kalman filter for ancestral trait reconstruction of low-dimensional , continuous traits ; Tolkoff et al . ( 2018 ) propose phylogenetic factor analysis , in which a latent variable under the control of a small number independent univariate Brownian diffusion processes is related to observed traits through a loading matrix ; Horta et al . ( 2021 ) use a multivariate TOU process and Markov chain Monte Carlo to model both continuous traits and sequences of discrete characters . To represent the latter , they make use of a pairwise Potts model . 3 Related work . 3.1 Representation learning of biological sequences . A VAE ( Kingma & Welling , 2013 ; 2019 ) is a probabilistic , generative model featuring latent vectors or representations , { z } Nn=1 , that are independently sampled from a prior distribution , zn ∼ π ( zn ) . The latent vectors are passed to a neural network ( the decoder ) with parameters θ , leading to a likelihood , xn ∼ pθ ( xn | NNθ ( zn ) ) , for the data , { x } Nn=1 . The prior is typically a standard multivariate Gaussian distribution , but other priors have been used , such as distributions on the Poincaré ball to recover hierarchical structures ( Mathieu et al. , 2019 ) . The posterior distribution p ( zn | xn ) is intractable , but can be approximated with a variational distribution or guide , qφ ( zn | NNφ ( xn ) ) , involving a second neural network ( the encoder ) . Point estimates of the parameters θ and φ are obtained by maximizing the evidence lower bound ( ELBO ) , Lθ , φ ( x ) = Eq [ log ( pθ ( x , z ) qφ ( z | x ) ) ] , using stochastic gradient ascent ( Hoffman et al. , 2013 ) . VAEs are increasingly used for representation learning of biological sequences ( Detlefsen et al. , 2020 ) . Riesselman et al . ( 2018 ) use a VAE with biologically motivated priors to evaluate the stability of mutants and to explore new regions of sequence space . Greener et al . ( 2018 ) use autoencoders to design metal-binding proteins and novel protein folds . Ding et al . ( 2019 ) show that the latent representations obtained with a VAE can capture evolutionary relationships between sequences . The above models do not represent the phylogenetic tree explicitly , but typically aim to condition on some evolutionary information by training on pre-computed MSAs - an approach that has been called evo-tuning ( Rao et al. , 2019 ; Detlefsen et al. , 2020 ) . Hawkins-Hooker et al . ( 2021 ) use a VAE with a convolutional encoder and decoder , combining upsampling and autoregression , without relying on a MSA . The above models assume that the latent vectors factor independently , which is computationally convenient but unrealistic if the sequences are related to each other in a phylogeny . A more realistic approach thus uses a prior π ( { z } Nn=1 | τ , κ ) π ( κ ) that conditions the latent vectors on a given phylogenetic tree , τ , and an evolutionary model with latent parameters , κ . Because the latent vectors do not factor independently anymore , mini-batch training can include the sequences but not the latent vectors , which limits the possible size of the data sets . Nonetheless , we show here that such a model is both computationally tractable and practically useful for realistic data sets concerning single protein families . | The authors introduce a VAE for modeling individual protein families that incorporates phylogenetic trees through an OU process on latent space. They also use a sequence likelihood which does not factorize over positions. The authors claim these two advances represent a more expressive and efficient model of protein evolution and apply it to ancestral sequence reconstruction. | SP:ceb5a9157bf76148cd4ad91c986700cc13a746e9 |
Using Graph Representation Learning with Schema Encoders to Measure the Severity of Depressive Symptoms | 1 INTRODUCTION . Nowadays , deep learning techniques have been frequently used in sentiment analysis ( Tan et al. , 2013 ; Mukhtar & Khan , 2018 ; Liao et al. , 2021 ) , particularly in movie recommendations and product reviews and ratings . In the healthcare domain , sentiment analysis with deep learning provides many benefits such as utilizing medical information to achieve the best result to increase healthcare quality ( Abirami & Askarunisa , 2017 ; Bi et al. , 2020 ) . We focus our work on applications related to mental health such as using deep learning to make a diagnostic prediction . There is a pressing need to find a convenient and automated method to assess depression severity . Worldwide , more than 300 million people are suffering depression ( Organization et al. , 2017 ) . Apart from the high prevalence of Major Depressive Disorder , overall 85 % of depressed individuals are underdiagnosed ( Falagas et al. , 2007 ) . Research has shown that about 30 % of patients suffering from an episode of major depression do not seek treatment , with only 10 % of them being adequately treated ( Falagas et al. , 2007 ) . We validate our approach based on its application to the diagnosis of MDD . We demonstrate that our approach can result in more accurate predictions of the severity of depression , which can enhance automated health care decision making . Medical research ( Tsakalidis et al. , 2018 ) shows that text sentiment analysis methods can be effective in making inferences about people ’ s mental states , such as MDD . For example , depressed people use more first person pronouns than non-depressed people because they are more focused on themselves and less connected with others . These may not be reflected in a person ’ s visual appearance , i.e. , visual behaviors . Visual data alone will therefore be insufficient for capturing depressive symptoms that are only manifested in a person ’ s verbal utterances . Mental disorders are difficult to detect . In practice , clinicians first measure the severity of depressive symptoms in patients and then identify depression in them . During in-person clinical interviews , clinicians widely use a structured Patient Health Questionnaire ( PHQ ) — a clinically validated tool determining the severity of depressive symptoms across several personal dimensions ( Kroenke & Spitzer , 2002 ; Arseniev-Koehler et al. , 2018 ) . Inspired by the observation of the provided data set of such interviews , we formulated the hypothesis that the context of words in a transcript can be used to generate PHQ scores ( Kroenke et al. , 2009 ) . This PHQ metric for depressive disorder forms a context constructed with eight items , such as “ sleep problem ” , “ anxiety problem ” , “ fatigue problem ” , “ depression problem ” , and “ no motivation or interest in things ” ( Arseniev-Koehler et al. , 2018 ) . We observed that each text ( see figure 1 ) covers information relating to at least one of these eight topics . This motivates use of a deep learning model that represents these eight PHQ topics , thereby introducing an inductive bias into the learning process . Thus the contextual information about these eight PHQ topics should be encoded to determine depression states . We motivate generating graph-level representations for transcripts ( as inputs ) to encode contextual information from these transcripts ( we assume a transcript encodes facts representing depressive symptoms ) . To achieve this , we propose a novel form for node attributes within a GNN based model that captures node-specific embeddings for every word in the vocabulary . The representations of each word is shared globally and can be updated according to associations among words in a transcript . We summarize the representations of all the words in the transcript to predict depression states . Intuitively , the generated node-level embeddings maintain records linking certain existing facts that indicate the known symptoms of a subject . When subsequent facts are discovered which indicate additional depressive symptoms , records will be updated by aggregating both old and new facts . In other words , those records will be updated via a message passing mechanism over the transcript context until ideally all major depressive features ( characterizing depressive symptoms ) have been discovered . In this way , we can represent the most relevant contextual information which is universal across all transcripts – possibly involving the context of eight PHQ topics we discussed above . Using graph structures to capture context-level features is an innovative pathway which we hypothesise can be used to measure different levels of depression . In our experiments , our approach realized a good generalization on a limited , incomplete , and unevenly distributed dataset ( see figure 3a ) . 1.1 RELATED WORK . Research in measuring the severity of depressive symptoms aims to train a regression model to predict depression scores ( Valstar et al. , 2016 ; Alhanai et al. , 2018 ; Tsakalidis et al. , 2018 ) . Some prior work ( Ringeval et al. , 2017 ; Alhanai et al. , 2018 ; Haque et al. , 2018 ) applies a sequencelevel deep learning model to capture implicit depressive signals . Such models , in general , use a multi-modal sentence embedding , rather than a mapping of a whole interview , to predict a PHQ score . Other prior work ( Valstar et al. , 2016 ; Cummins et al. , 2017 ) implements statistical functions ( e.g. , max , min ) on short-term features over an entire interview , but this may fail to preserve useful temporal information across an entire interview , such as some short-term signs of regret , anxiety , etc . Current machine learning methods ( Valstar et al. , 2016 ; Alhanai et al. , 2018 ; Song et al. , 2018 ; Du et al. , 2019 ) concentrate on learning features from multi-modalities –– as determinants for estimating the severity of depressive disorders . The method ( Lin et al. , 2020 ; Solieman & Pustozerov , 2021 ) applies a multi-modal fusion network that summarizes all depressive features from both text and audio . The work ( Lam et al. , 2019 ) leverages a 1D CNN model to extract text-level embeddings from the text . The methods ( Ray et al. , 2019 ; Mallol-Ragolta et al. , 2019 ; Zhang et al. , 2020 ; Solieman & Pustozerov , 2021 ) utilize deep learning models with pretrained global word embeddings to extract contextual features from text . They only apply their work to the depression detection task . In principle , we should be able to improve performance further using all available modalities , however feature-fusion method may lead to learn a wrong representation encoding inter-subject variability unrelated to depression ( Williamson et al. , 2016 ) . The feature-fusion approach to learning from small data may cause poor generalization : with a small sample size , the number of features should also be small to avoid the problems of dimensionality and overfitting . However , given that the dimensions of audio and video features are very large , sparse parametrization needs to be taken into account when training machine learning models for learning a joint multi-modal feature vector ( Williamson et al. , 2016 ) . 2 METHOD . We generate a node-level embedding matrix for each word of a transcript . These node attributes represent an underlying relationship between the current word and every other word in the transcript . In this way , a graph neural network ( GNN ) schematizes underlying associations among words via their internal representations . We propose to aggregate their internal representations to encode information from the context of a transcript generalizing all major depressive symptoms1 . Building a Text Graph : For a given transcript , we build a text graph . We regard all unique words appearing in a transcript as the nodes of the graph . Each edge starts from a word in the transcript and ends with a word within a fixed window either side of the word . Let G = ( V , E ) denote a text level graph . V is a set of nodes representing all the unique words in a given text , and E is a set of undirected edges between pairs of these nodes , each represented by a set of the two nodes at either end of the edge . We build edges by using a fixed size sliding window in a transcript to collect co-occurrence statistics . Each node has an attribute which is a matrix . To emphasise this representational structure of the attribute matrix , we refer to it as a ‘ schema ’ ( Dozois & Beck , 2008 ; Hammen & Zupan , 1984 ; Rudolph et al. , 1997 ; Soygüt & Savaşir , 2001 ) Ui ∈ Rn×d . The jth row of Ui is a vector of length d containing the representation that node vi has of vj ; and n denotes the total number of unique words ( the vocabulary size ) in a corpus . 2.1 SCHEMAS . We generate a schema for each word node which performs a role of recording a global context . This global context retains information from interactions between the current word and every other word . In this way , each word node maintains “ a dynamic record ” ( in the form of a schema ) of the context from the given transcript . The schemas are progressively updated by a GNN model . This resulting model produces final embeddings of the words in a transcript in relation to all words in the vocabulary , including the other words that make up the current training transcript . Schemas preserve structures that represent relationships between the identifier word and every other word . Thus we can exploit these schemas to capture context-level features in an explicit way by learning a GNN model . Our innovation is to represent word proximity through the graph structure and co-occurrence within the same transcript within the schema at each node . 2.2 SCHEMA-BASED GRAPH NEURAL NETWORK ( SGNN ) . We use multiple passes ( layers ) of the message passing mechanism ( MPM ) ( Gilmer et al. , 2017 ; Xu et al. , 2018 ) to update the schema at each node of the text graph . 1our code links to : https : //github.com/Clio-dl/Using-SGNN-for-Depression-Estimate . git/ Initialization : We first initialise an n × d1 matrix ( in our experiments , we set d1 = 32 ) as the schema U ( 1 ) i at each node vi ∈ V . The schema is all zeros apart from the row corresponding to the word associated with this node , which is a random d-dimensional vector using a linear transformation . Message passing layer : In this work , the operation of message passing is split into two steps to update the schema at each node . We first modify the schema at each node vi : Ûi ( k ) = U ( k ) i W ( k ) 1 + 1 n 11TU ( k ) i W ( k ) 2 + 1 n 1i1TU ( k ) i W ( k ) 3 ( 1 ) where 1 ∈ Rn is a vector of ones . The first term updates each row independently . The second term operates on the sum of the columns , replicated in each row . The third term operates on the row corresponding to the current word , replicated in each row . These terms are a subset of equivariant linear functions which are computed by ( Maron et al. , 2018 ) . Second we compute the message function , which is defined as : M ( k ) ( Ûi ( k ) , Ûj ( k ) ) = Ûj ( k ) +RELU ( [ Ûi ( k ) ||Ûj ( k ) ] W ( k ) 4 ) W ( k ) 5 ( 2 ) where || denotes concatenation along the second axis . ( W ( k ) m ) 1≤m≤5 are learnable parameters . This is essentially a two-layer neural network . In the next step , each node ’ s schema is updated as : Ui ( k+1 ) = ∑ j∈N ( i ) M ( k ) ( Ûi ( k ) , Ûj ( k ) ) ∈ Rn×dk+1 ( 3 ) We apply equation ( 3 ) as the sum aggregator over the k-th layer of the SGNN . After all K message-passing layers have been applied , the schemas are pooled to get representations of all nodes in the graph . We apply an elementwise max-pooling operater to extract node features . We use the READOUT ( Ying et al. , 2018 ; Xu et al. , 2018 ) function which aggregates node features by summing them together : hG = ∑ vi∈V U ( K ) i ( 4 ) We use hG to predict a PHQ score for each transcript . In our experiments , we apply a 2-layer multi-layer perceptron ( MLP ) . | This paper proposes a schema-based GNN method to measure the severity of depression. To gain a global representation of each word, the proposed method constructs word nodes and uses schema structure to capture the context-level information. The main contribution of this paper is the introduction of the schema encoder. The experimental results show the superiority of schema GNN over other SOTA models. | SP:78856cb083aaa3ec5e98047bea34695240c74477 |
Escaping Stochastic Traps with Aleatoric Mapping Agents | When extrinsic rewards are sparse , artificial agents struggle to explore an environment . Curiosity , implemented as an intrinsic reward for prediction errors , can improve exploration but fails when faced with action-dependent noise sources . We present aleatoric mapping agents ( AMAs ) , a neuroscience inspired novel form of curiosity modeled on the cholinergic system of the mammalian brain . AMAs aim to explicitly ascertain when dynamics of the environment are unpredictable , even if those dynamics are induced by the actions of the agent . This is achieved by generating separate forward predictions for the mean and aleatoric uncertainty of future states , reducing intrinsic rewards for those transitions that are unpredictable . We demonstrate that in a range of environments AMAs are able to circumvent action-dependent stochastic traps that immobilise conventional curiosity driven agents . 1 INTRODUCTION . Efficient exploration is a central problem in reinforcement learning . Exploration is particular challenging in environments with sparse rewards—requiring agents to navigate with limited guidance ( e.g . Sutton & Barto ( 2018 ) ; Pathak et al . ( 2017 ) ; Burda et al . ( 2018b ) , see Weng ( 2020 ) for a review ) . A notable exploration method that effectively deals with sparse rewards is curiosity driven learning—where agents are equipped with a self-supervised forward prediction model that employs prediction errors as intrinsic rewards Schmidhuber ( 1991b ) ; Pathak et al . ( 2017 ) ; Schmidhuber ( 1991a ) . Curiosity is built upon the intuition that in unexplored regions of the environment , the forward prediction error of the agent ’ s internal model will be large Schmidhuber ( 1991b ) ; Pathak et al . ( 2017 ) . As a result , agents are rewarded for visiting regions of the state space that they have not previously occupied . If , however , a particular state transition is impossible to predict , it will trap a curious agent Burda et al . ( 2018b ) ; Schmidhuber ( 1991a ) . This is referred to as the noisy TV problem ( e.g . Burda et al . ( 2018b ) ; Schmidhuber ( 1991a ) ) , the etymology being that a naively curious agent could dwell on the unpredictability of a noisy TV screen . Several existing curiosity-like methods Burda et al . ( 2018b ) ; Pathak et al . ( 2017 ; 2019 ) aim to avoid noisy TVs or “ stochastic traps ” Shyam et al . ( 2019 ) . Nevertheless , employing dynamics based prediction errors as intrinsic rewards is difficult as current methods either fail when stochastic traps are action-dependent , or require an ensemble of dynamics models Pathak et al . ( 2017 ; 2019 ) ; Shyam et al . ( 2019 ) ; Burda et al . ( 2018a ) . This work presents aleatoric mapping agents ( AMAs ) , which uses aleatoric uncertainty estimation Kendall & Gal ( 2017 ) to escape stochastic traps . AMAs are both inspired by and build upon proposals developed within neuroscience Yu & Dayan ( 2005 ) , that suggest expected uncertainties in top down predictions are signalled by the modulation of cortical acetylcholine . We build on this theory by algorithmically demonstrating a functional purpose for expected aleatoric uncertainties that is consistent with , but also further specifies , Yu & Dayan ( 2005 ) ’ s predictions of cholinergic activity in the Posner task . Our work adds further credence to Yu & Dayan ( 2005 ) ’ s call for experimental tests of whether acetylcholine signals epistemic or aleatoric uncertainties . Accordingly , a blueprint for a VR mouse task , along with theoretical predictions of cholinergic uncertainty signalling in such a task , is presented in Section 5 . 2 BACKGROUND . 2.1 EPISTEMIC AND ALEATORIC UNCERTAINTIES . The uncertainty of a statistical model can be described as the sum of two theoretically distinct types of uncertainty : epistemic uncertainty and aleatoric uncertainty ( e.g . Hora ( 1996 ) , see Hüllermeier & Waegeman ( 2021 ) for a review ) . Epistemic uncertainty measures the errors of a model ’ s prediction that can be minimised with additional experience and learning Hüllermeier & Waegeman ( 2021 ) . As a result , an agent using epistemic uncertainties as intrinsic rewards tends to value dynamics it has not previously encountered , and hence can not predict accurately , but could learn to predict in the future ( e.g . Osband et al . ( 2016 ) ) . More concretely , epistemic uncertainty can be considered to be the expected information gain of observing the next predicted state Mukhoti et al . ( 2021 ) . On the other hand , prediction errors that are due to aleatoric uncertainties are , by definition , a result of unpredictable processes Hüllermeier & Waegeman ( 2021 ) . Therefore , any agents that receives intrinsic rewards for aleatoric dynamics risks being trapped , as exemplified by the noisy TV problem Schmidhuber ( 1991a ) ; Burda et al . ( 2018a ) . Direct estimation of epistemic uncertainty surrounding future states would be an ideal basis for a curious agent but tractable epistemic uncertainty estimation with high dimensional data is an unsolved problem Gal ( 2016 ) . We implicitly incentivise agents to seek epistemic uncertainties by removing the aleatoric component from the total prediction error . This is similar to methods that separate epistemic and aleatoric uncertainties in return predictions Clements et al . ( 2019 ) , or within a latent variable model Depeweg et al . ( 2018 ) —allowing for the construction of policies that are rewarded for exploring their environments and punished for experiencing aleatoric uncertainty . However , as far as we are aware , we are the first to compute aleatoric uncertainties within a scalable curiosity framework to reduce intrinsic rewards for those state transitions with aleatoric uncertainty . 2.2 CURIOSITY AND INTRINSIC MOTIVATION IN REINFORCEMENT LEARNING . Curiosity-driven Pathak et al . ( 2017 ) agents assign value to states of the environment that they deem to be “ interesting ” Still & Precup ( 2012 ) ; Schmidhuber ( 1997 ) . How a curiosity based method computes whether a state is “ interesting ” Still & Precup ( 2012 ) ; Schmidhuber ( 1997 ) is usually its defining characteristic . The original formulation of curiosity used prediction errors directly as intrinsic rewards Schmidhuber ( 1991b ) . The noisy TV problem quickly emerged when using this naïve approach in stochastic environments Schmidhuber ( 1991a ) . In order to evade the allure of stochastic traps , the first proposed solution to the noisy TV problem implements “ interesting ” Still & Precup ( 2012 ) ; Schmidhuber ( 1997 ) as prediction errors that reduce over time Schmidhuber ( 1991a ) ; Kaplan & Oudeyer ( 2007 ) . Others consider “ interesting ” Still & Precup ( 2012 ) ; Schmidhuber ( 1997 ) to mean a high dependency between present and future states and actions ( i.e . “ interesting ” things are predictable Still & Precup ( 2012 ) or controllable Mohamed & Jimenez Rezende ( 2015 ) ) . Inverse dynamics feature ( IDF ) curiosity Pathak et al . ( 2017 ) rejuvenated interest in using one step prediction errors as intrinsic rewards . IDF curiosity avoids stochastic traps by computing prediction errors with features that aim to only contain information concerning stimuli the agent can affect Pathak et al . ( 2017 ) . Further experiments Burda et al . ( 2018a ) showed that simple one-step prediction errors also work effectively within a random representation space generated by feeding state observations through a randomly initialised network . Burda et al . ( 2018a ) also showed the ( IDF ) approach is vulnerable to action-dependent noisy TVs—demonstrated by giving the agent a ‘ remote control ’ to a noisy TV in the environment that could induce unpredictable environment transitions . This motivated random network distillation ( RND ) Burda et al . ( 2018b ) , which removes dynamics from the prediction problem altogether—instructing a network to learn to predict the output of another fixed randomly initialised network at each state , using the resulting error as intrinsic rewards . Other exploration methods explicitly leverage uncertainty quantification for exploration . The canonical approach is “ optimism under uncertainty ” , which in its most basic form means weighting the value of state-actions pairs inversely to the number of times they have been experienced ( Sutton & Barto , 2018 , p. 36 ) . Known as count based methods Strehl & Littman ( 2008 ) ; Bellemare et al . ( 2016 ) , this approach was shown to reliably evade noisy TVs in minigrid environments Raileanu & Rocktäschel ( 2020 ) . However , it is not feasible to count state visitations in many environments where there is a large number of unique states Bellemare et al . ( 2016 ) . “ Pseudo-count ” methods exchange tabular look up tables for density models to estimate an analogous intrinsic reward to counts in large state spaces Bellemare et al . ( 2016 ) . Nevertheless , prediction error based methods for exploration remain a key component in state of the art algorithms deployed in high dimensional state spaces ( e.g . Badia et al . ( 2019 ) ) . Attempts have been made to reward Epistemic uncertainty directly . This typically requires a posterior distribution over model parameters , which is intractable without approximations such as ensembles or variational inference ( e.g . Houthooft et al . ( 2016 ) ) . Osband et al . ( 2016 ) instantiated an ensemble Lakshminarayanan et al . ( 2017 ) approach into the final layer of a deep Q-network—rewarding its agents for epistemic value uncertainty . Pathak et al . ( 2019 ) use the variance of ensemble predictions being used as intrinsic rewards , while Shyam et al . ( 2019 ) reward experience of epistemic uncertainty within an ensemble of environment models . Lastly , some uncertainty estimation methods have recently been developed that enforce a smoothness constraint in the representation space Mukhoti et al . ( 2021 ) ; van Amersfoort et al . ( 2021 ) —allowing for sensible estimations of uncertainty to be made from learned representations—but these approaches have not yet been adopted in reinforcement learning . All in all , uncertainty often plays a role in different formulations of curiosity , which is why we looked at models acetylcholine—a neuromodulator associated with uncertainty—for inspiration in building curiosity models capable of avoiding distractions . 2.3 ACETYLCHOLINE . In the mammalian brain acetylcholine is implicated in a range of processes including learning and memory , fear , novelty detection , and attention Ranganath & Rainer ( 2003 ) ; Pepeu & Giovannini ( 2004 ) ; Acquas et al . ( 1996 ) ; Barry et al . ( 2012 ) ; Yu & Dayan ( 2005 ) ; Hasselmo ( 2006 ) ; Giovannini et al . ( 2001 ) ; Parikh et al . ( 2007 ) . Traditional views—supported by the rapid increase in cholinergic tone in response to environmental novelty and demonstrable effects on neural plasticity— emphasised its role as a learning signal , generating physiological changes that favour encoding of new information over retrieval Hasselmo ( 2006 ) . Notably , Yu & Dayan ( 2003 ) proposed an alternative perspective , suggesting that acetylcholine signals the expected uncertainty of top down predictions , while modulation of norepinephrine is a result of unexpected uncertainties . More concretelty , Yu & Dayan ( 2003 ) ’ s model can be seen as favouring bottom up sensory input over top down predictions if predictions are believed to be inaccurate—consistent with evidence that shows acetylcholine inhibits feedback connections and strengthens sensory inputs Hasselmo ( 2006 ) . However this approach does not explicitly separate epistemic and aleatoric uncertainties Yu & Dayan ( 2005 ) . In contrast , the utility of quantifying epistemic uncertainties for exploration has been widely recognised in the RL literature ( e.g . Osband et al . ( 2016 ) ; Pathak et al . ( 2019 ) ) . Here we demonstrate a potential use of aleatoric uncertainties in exploring agents both biological and artificial . Namely , aleatoric uncertainties can be used to divert attention away from unpredictable dynamics when using prediction errors as intrinsic rewards . This is similar to a model proposed by Parr & Friston ( 2017 ) , suggesting acetylcholine may indicate expected uncertainties in top down predictions within an MDP . In this context we propose an extension to Yu & Dayan ( 2005 ) ’ s dichotomy . Specifically , we suggest that in the mammalian brain , cortical acetylcholine signals expected aleatoric uncertainties , while norepinephrine is modulated by epistemic uncertainties both expected and unexpected . This formulation is attractive in an ML framework , providing a means to avoid stochastic traps , while also being consistent with empirical biological data Hasselmo ( 2006 ) ; Yu & Dayan ( 2003 ) . Testing this hypothesis calls for experiments to clarify the nature of the uncertainty signalled by acetylcholine , which we present in Section 5 . | This paper suggests an intrinsic bonus for exploration that avoids noisy TV by adding a penalty for the estimated variance of the reached state $S_{t+1}$ given previous state $S_{t}$. For this, they fit an independent normal model of the new state $S_{t+1}$ with mean ($\mu_{t+1}$) and var ($\sigma_{t+1}^2$) predicted from the previous state $S_{t}$. Then, the bonus is given by the error of prediction $(S_{t+1} - \hat{\mu_{t+1}})^2$ minus the variance penalty $\sigma_{t+1}^2$. That way, a noisy TV will always be fitted with an higher variance that should have a similar order than the error of prediction, so both predictable and unpredictable transitions bonus will end up to zero (in average) after learning the model of dynamics of the whole environment. | SP:caf2cc9159de2ab140c0337fbd87db251f8f890b |
Monotonic Improvement Guarantees under Non-stationarity for Decentralized PPO | 1 INTRODUCTION . In cooperative multi-agent reinforcement learning ( MARL ) , a team of agents must coordinate their behavior to maximize a single cumulative return ( Panait & Luke , 2005 ) . In such a setting , partial observability and/or communication constraints necessitate the learning of decentralized policies that condition only on the local action-observation history of each agent . In a simulated or laboratory setting , decentralized policies can often be learned in a centralized fashion , i.e. , Centralized Training with Decentralized Execution ( CTDE ) ( Oliehoek & Amato , 2016 ) , which allows agents to access each other ’ s observations and unobservable extra state information during training . Actor-critic algorithms ( Konda & Tsitsiklis , 2000 ) are a natural approach to CTDE because critics can exploit centralized training by conditioning on extra information not available to the decentralized policies ( Lowe et al. , 2017 ; Foerster et al. , 2017 ) . Unfortunately , such actor-critic methods have long been outperformed by value-based methods such as QMIX ( Rashid et al. , 2018 ) on MARL benchmark tasks such as Starcraft Multi-Agent Challenge ( SMAC ) ( Samvelyan et al. , 2019 ) . However , two recent actor-critic algorithms ( Schröder de Witt et al. , 2020 ; Yu et al. , 2021 ) have upended this ranking by outperforming previously dominant MARL methods , such as MADDPG ( Lowe et al. , 2017 ) and value-decomposed Q-learning ( Sunehag et al. , 2017 ; Rashid et al. , 2018 ) . Both algorithms are multi-agent extensions of Proximal Policy Optimization ( PPO ) ( Schulman et al. , 2017 ) but one uses decentralized critics , i.e. , independent PPO ( IPPO ) ( Schröder de Witt et al. , 2020 ) , and the other uses centralized critics , i.e. , multi-agent PPO ( MAPPO ) ( Yu et al. , 2021 ) . One key feature of PPO-based methods is the use of ratios ( between the policy probabilities before and after updating ) in the objective . Both IPPO and MAPPO extend this feature of PPO to the multi-agent setting by computing ratios separately for each agent ’ s policy during training , which we call independent ratios . Unfortunately , until now there has been no theoretical justification for the use of such independent ratios . In this paper we show that the analysis that underpins the monotonic policy improvement guarantee for PPO ( Schulman et al. , 2015 ) does not carry over to the use of independent ratios in IPPO and MAPPO . Instead , a direct application of this analysis leads to a joint policy optimization and suggests the use of joint ratios , i.e. , computing ratios between joint policies . The difference is crucial because , based on the existing trust region analysis for PPO , only a joint ratios approach enjoys a monotonic policy improvement guarantee . Moreover , as independent ratios consider only the change in one agent ’ s policy and ignore the fact that the other agents ’ policies also change , the transition dynamics underlying these independent ratios are non-stationary ( Papoudakis et al. , 2019 ) , breaking the assumptions in the monotonic improvement analysis ( Schulman et al. , 2015 ) . While some studies attempt to extend the monotonic improvement analysis to MARL ( Wen et al. , 2021 ; Li & He , 2020 ) , they primarily consider optimizing policies with joint ratios , rather than independent ratios as in our paper , and are thus not applicable to IPPO or MAPPO . To address this gap , we provide a new monotonic improvement analysis that holds even when the transition dynamics are non-stationary . We show that , despite this non-stationarity , a monotonic improvement guarantee still arises as a result of enforcing the trust region constraint over joint policies , i.e. , a centralized trust region constraint . In other words , constraining the update of joint policies in centralized training addresses the non-stationarity of learning decentralized policies . This new analysis implies that independent ratios can also enjoy the same performance guarantee as joint ratios if the centralized trust region constraint is properly enforced by bounding independent ratios . In this way both IPPO and MAPPO can guarantee monotonic policy improvement . We also provide a theoretical foundation for proximal ratio clipping by showing that centralized trust region can be enforced in a principled way by bounding independent ratios based on the number of agents in training . Furthermore , we show that the surrogate objectives optimized in IPPO and MAPPO are essentially equivalent when their critics converge to a fixed point . Finally , we provide empirical results that support the hypothesis that the strong performance of IPPO and MAPPO is a direct result of enforcing such a trust region constraint via clipping in centralized training . Particularly , we show that good values of the hyperparameters for the clipping range are highly sensitive to the number of agents , as these hyperparameters , together with the number of agents , effectively determine the size of the centralized trust region . Moreover , we show that IPPO and MAPPO have comparable performance on SMAC maps with varied difficulty and numbers of agents . This comparable performance also implies that the way of training critics could be less crucial in practice than enforcing a trust region constraint . 2 RELATED WORK . The use of trust region optimization in MARL traces back to parameter-sharing TRPO ( PSTRPO ) ( Gupta et al. , 2017 ) , which combines parameter sharing with TRPO for cooperative multiagent continuous control but provides no theoretical support . Our analysis showing that a trust region constraint is pivotal to guarantee performance improvement in MARL applies to PS-TRPO , among other algorithms . Multi-agent trust region learning ( MATRL ) ( Wen et al. , 2021 ) uses a trust region for independent learning with a game-theoretical analysis in the policy space . MATRL considers independent learning and proposes to enforce a trust region constraint by approximating the stable fixed point via a meta-game . Despite the improvement guarantee for joint policies , solving a meta-game itself can be challenging because its complexity increases exponentially in the number of agents . We instead consider centralized learning and enforce the trust region constraint in a centralized and scalable way . Multi-Agent TRPO ( MATRPO ) directly extends TRPO to the multi-agent case ( Li & He , 2020 ) and divides the trust region by the number of agents . However , the analysis assumes a private reward for each agent , which yields different theoretical results from ours . Non-stationarity has been discussed in multi-agent mirror descent with trust region decomposition ( Li et al. , 2021 ) , which first decomposes the trust region for each decentralized policy and then approximates the KL divergence through additional training . However , this method needs to learn a fully centralized action-value function and thus becomes becomes impractical when there are many agents . 3 BACKGROUND . Dec-MDPs . We consider a fully cooperative multi-agent task in which a team of cooperative agents choose sequential actions in a stochastic environment . It can be modeled as a decentralized Markov decision process ( Dec-MDP ) , defined by a tuple { N , S , A , P , r , ρ0 , γ } , where N , { 1 , . . . , N } denotes the set ofN agents and s ∈ S , S1×S2× ... ×SN describes the joint state of the environment . The initial state s0 ∼ ρ0 is drawn from distribution ρ0 , and at each time step t , all agents k ∈ N choose simultaneously one action akt ∈ Ak , yielding a joint action at , a1t × a2t × ... × aNt ∈ A , A1 ×A2 × ... ×AN . After executing the joint action at in state st , the next state st+1 ∼ P ( st , at ) is drawn from transition kernel P and a collaborative reward rt = r ( st , at ) is returned . In a DecMDP , each agent k ∈ N has a local state skt ∈ Sk , and chooses its actions with a decentralized policy akt ∼ πk ( ·|skt ) based only on its local state . The collaborating team of agents aims to learn a joint policy , π ( at|st ) , ∏N k=1 πk ( a k t |skt ) , that maximizes their expected discounted return , η ( π ) , E ( st , at ) [ ∑∞ t=0 γ trt ] , where γ ∈ [ 0 , 1 ) is a discount factor . Policy optimization methods . For single-agent RL that is modeled as an infinite-horizon discounted Markov decision process ( MDP ) { S , A , P , r , ρ0 , γ } , the performance for a policy π ( a|s ) is defined as : η ( π ) = E ( st , at ) [ ∑∞ t=0 γ tr ( st , at ) ] . The action-value function Qπ and value function Vπ are defined as : Qπ ( st , at ) = Est+1∼p ( ·|st , at ) , at+1∼π ( ·|st+1 ) [ ∞∑ l=0 γlr ( st+l , at+l ) ] , Vπ ( st ) = Eat∼π ( ·|st ) [ Qπ ( st , at ) ] . Let the advantage function be Aπ ( s , a ) = Qπ ( s , a ) − Vπ ( s ) ; the following useful identity expresses the expected return of another policy π̃ in terms of the advantage over π ( Kakade & Langford , 2002 ) : η ( π̃ ) = η ( π ) + ∑ s ρπ̃ ( s ) ∑ a π̃ ( a|s ) Aπ ( s , a ) , where ρπ̃ ( s ) is the state distribution induced by π̃ . The complex dependency of ρπ̃ ( s ) on π̃ makes the righthand side difficult to optimize directly . Schulman et al . ( 2015 ) proposed to consider the following surrogate objective Lπ ( π̃ ) = η ( π ) + ∑ s ρπ ( s ) ∑ a π̃ ( a|s ) Aπ ( s , a ) = η ( π ) + E ( s , a ) ∼ρπ [ π̃ ( a|s ) π ( a|s ) Aπ ( s , a ) ] , where the ρπ̃ is replaced with ρπ . Define DmaxTV ( π , π̃ ) , maxsDTV ( π ( ·|s ) , π̃ ( ·|s ) ) , where DTV is the total variation ( TV ) divergence . Theorem 1 . ( Theorem 1 in Schulman et al . ( 2015 ) ) Let α = DmaxTV ( π , π̃ ) . Then the following bound holds η ( π̃ ) ≥ Lπ ( π̃ ) − 4 γ ( 1− γ ) 2 α2 , where = maxs , a|Aπ ( s , a ) | . This theorem forms the foundation of policy optimization methods , including Trust Region Policy Optimization ( TRPO ) ( Schulman et al. , 2015 ) and Proximal Policy Optimization ( PPO ) ( Schulman et al. , 2017 ) . TRPO suggests a robust way to take large update steps by using a constraint , rather than a penalty , on the TV divergence , and considers the following practical optimization problem , TRPO : max π̃ E ( s , a ) ∼ρπ [ π̃ ( a|s ) π ( a|s ) Aπ ( s , a ) ] , s.t . DmaxTV ( π ( ·|s ) , π̃ ( ·|s ) ) ≤ α . ( 1 ) This constrained optimization is complicated as it requires using conjugate gradient algorithms with a quadratic approximation to the constraint . PPO simplifies the above optimization by clipping probability ratios λπ̃ = π̃ ( a|s ) π ( a|s ) to form a lower bound of Lπ ( π̃ ) : PPO : max π̃ E ( s , a ) ∼ρπ [ min ( λπ̃Aπ ( s , a ) , clip ( λπ̃ , 1− , 1 + ) Aπ ( s , a ) ) ] , ( 2 ) where is a hyperparameter to specify the clipping range . Independent PPO and Multi-Agent PPO . Both IPPO ( Schröder de Witt et al. , 2020 ) and MAPPO ( Yu et al. , 2021 ) optimize decentralized policies with independent ratios . In particular , the main objective IPPO and MAPPO optimize is max π̃k E ( sk , ak ) ∼ρπk [ min ( λπ̃kA k ( sk , ak ) , clip ( λπ̃k , 1− , 1 + ) Ak ( sk , ak ) ) ] ∀k ∈ { 1 , 2 , ... , N } , ( 3 ) where λπ̃k = π̃k ( a k|sk ) πk ( ak|sk ) denotes the ratio between the decentralized policy probabilities of agent k before and after updating . The difference between IPPO and MAPPO lies in how they estimate the advantage function : IPPO learns a decentralized advantage functionAk ( sk , ak ) , ∑∞ t=0 [ r ( s k t , a k t ) ] − V ( sk ) based on the local information ( sk , ak ) for each agent , while MAPPO uses a centralized critic that conditions on centralized state information s : Ak ( sk , ak ) , Es−k [ ∑∞ t=0 [ r ( s k t , a k t ) ] − V ( s ) ] , where −k refers the set of all agents except agent k. Both methods use parameter sharing between agents . Consequently , as all agents share the same actor and critic networks , one can ignore the agent specifier k in the objective and use experience from all agents to update the actor and critic networks : max π̃θ ∑ k E ( sk , ak ) ∼ρπθ [ min ( λθAφ ( s k , ak ) , clip ( λθ , 1− , 1 + ) Aφ ( sk , ak ) ) ] , ( 4 ) where λθ = π̃θ ( a k|sk ) πθ ( ak|sk ) , and θ , φ are shared parameters for policy and advantage networks . The use of independent ratios together with parameter sharing has shown strong empirical results in various MARL benchmark tasks ( Schröder de Witt et al. , 2020 ; Yu et al. , 2021 ) . | This paper provides analysis showing monotonic improvements when in cooperative MARL settings, where independent, as opposed to joint ratios (over agents) are used. From a single agent’s perspective, a non-stationary distribution is experienced since other players are simultaneously performing updates to their policies, breaking the standard monotonic improvement property in TRPO. The authors’ propose a surrogate objective for decentralized policies, and show that the improvement in expected return can be bounded in terms of the sum of these (decentralized) surrogate objectives and a term proportionate to the total variation divergence between the 2 policies---analogous to the result by Schulman et al in 2005. Similarly, the authors proceed by showing that the TV divergence between policies can be bounded by enforcing constraints on independent ratios, where the strictness of these bounds depends on the number of agents. The trust region constraint is then split (independently) over all agents, and the authors show that prior methods like IPPO and MAPPO maximize an objective consistent with the proposed theory. | SP:68ecfb4419e38696c2d36f59cf7aae4569a56c8e |
Can Reinforcement Learning Efficiently Find Stackelberg-Nash Equilibria in General-Sum Markov Games? | 1 INTRODUCTION . Reinforcement learning ( RL ) has achieved striking empirical successes in solving complicated realworld sequential decision-making problems ( Mnih et al. , 2015 ; Duan et al. , 2016 ; Silver et al. , 2016 ; 2017 ; 2018 ; Agostinelli et al. , 2019 ; Akkaya et al. , 2019 ) . Motivated by these successes , multi-agent extensions of RL algorithms recently have gained great popularity in decision-making problems involving multiple interacting agents ( Busoniu et al. , 2008 ; Hernandez-Leal et al. , 2018 ; 2019 ; OroojlooyJadid & Hajinezhad , 2019 ; Zhang et al. , 2019 ) . Multi-agent RL is often modeled as a Markov game ( Littman , 1994 ) where , at each time step , each player ( agent ) takes an action simultaneously at each state of the environment , observe her own immediate reward , and the environment evolves into a next state . Here both the reward of each player and the state transition depends on the actions of all players . From the perspective of each player , her goal is to find a policy that maximizes her expected total reward in the presence of other agents . In Markov games , depending on the structure of the reward functions , the relationship among the players can be either collaborative , where each player has the same reward function , or competitive , where the sum of the reward function is equal to zero , or mixed , which corresponds to a general-sum game . While most of existing theoretical results focus on the collaborative or two-player competitive settings , the mixed setting is oftentimes more pertinent to real-world multi-agent applications . Moreover , in addition to having diverse reward functions , the players might also have asymmetric roles in the Markov game — the players might be divided into leaders and followers , where the leaders ’ joint policy determines a general-sum game for the followers . Games with such a leaderfollower structure is popular in applications such as mechanism design ( Conitzer & Sandholm , 2002 ; Roughgarden , 2004 ; Garg & Narahari , 2005 ; Kang & Wu , 2014 ) , security games ( Tambe , 2011 ; Korzhyk et al. , 2011 ; Balcan et al. , 2015 ) , incentive design ( Zheng et al. , 1984 ; Ratliff et al. , 2014 ; Chen et al. , 2016 ; Ratliff & Fiez , 2020 ) , and model-based RL ( Rajeswaran et al. , 2020 ) . Consider a simplified economic system that consists of a government and a group of companies , where the companies purchase or sell goods , and the government collects taxes from transactions . Such a problem can be viewed as a multi-player general-sum game , where the government serves as the leader and the companies are followers ( Zheng et al. , 2020 ) . In particular , when the government sets a tax rate , the companies form a general-sum game themselves , whose reward functions depend on the tax rate . Each company aims to maximize their own revenue , and thus ideally they achieve a Nash equilibrium ( NE ) of the induced game . Whereas the goal of the government might be achieving the social welfare , which might be measured via certain fairness metrics computed by the revenues of the companies . In multi-player Markov games with such a leader-follower structure , the desired solution concept is the Stackelberg-Nash equilibrium ( SNE ) ( Başar & Olsder , 1998 ) . In the setting where there is a single leader , SNE corresponds to a pair of leader ’ s policy π∗ and followers ’ joint policy ν∗ that satisfies the following two properties : ( i ) when the leader adopts π∗ , ν∗ is the best-response policy of the followers , i.e. , ν∗ is a Nash equilibrium of the followers ’ subgame induced by π∗ ; and ( ii ) π∗ is the optimal policy of the leader assuming the followers always adopt the best response . We are interested in finding an SNE in a multi-player Markov game when the reward functions and Markov transition kernel are unknown . In particular , we focus on the setting with a single leader and the state transitions only depend on the leader ’ s actions . That is , the followers ’ actions only affect the rewards received by the leader and followers . For such a game , we are interested in the following question : Can we develop reinforcement learning methods that provably find Stackelberg-Nash equilibria in leader-controlled general-sum games with sample efficiency ? To this end , we consider both online and offline RL settings , where in the former , we learn the SNE in a trial-an-error fashion by interacting with the environment and generating data , and in the latter , we learn the SNE from a given dataset that is collected a priori . For the online setting , as the transition model is unknown , to achieve sample efficiency , the equilibrium-finding algorithm also needs to take the exploration-exploitation tradeoff into consideration . Although the similar challenge has been studied in zero-sum Markov game , it seems unclear how to incorporate popular exploration mechanisms such as optimism in the face of uncertainty ( Sutton & Barto , 2018 ) into SNE finding . Meanwhile , under the offline setting , as the RL agent has no control of data collection , it is ideal to design an RL algorithm with theoretical guarantees for an arbitrary dataset that might not be sufficiently explorative . Our contributions Our contributions are three-fold . First , for the episodic leader-controlled general-sum game , under the online and offline settings respectively , we propose optimistic and pessimistic variants of the least-squares value iteration ( LSVI ) algorithm . In particular , in a version of LSVI , we estimate the optimal action-value function of the leader via least-squares regression and construct an estimate of the SNE by solving the SNE of the multi-matrix game for each state , whose payoff matrices are given by the leader ’ s estimated action-value function and the followers ’ reward functions . Moreover , we add a UCB exploration bonus to the least-squares solution to achieve optimism in the online setting . Whereas in the offline setting , pessimism is achieved by subtracting a penalty function constructed using the offline data , which is equal to the negative bonus function . Moreover , these algorithms are readily able to incorporate function approximators and we showcase the version with linear function approximation . Second , under the online setting , we prove that our optimistic LSVI algorithm achieves a sublinear Õ ( H2 √ d3K ) regret , where K is the number of episodes , H is the horizon , d is the dimension of the feature mapping , and Õ ( · ) omits logarithmic terms . Finally , under the offline setting , we establish an upper bound on the suboptimality of the proposed algorithm for an arbitrary dataset with K trajectories . Our upper bound yields a sublinear Õ ( H2 √ d3/K ) rate as long as the dataset has sufficient coverage over the trajectory induced by the desired SNE . Related work In the sequel , we discuss the related works on learning Stackelberg games . We defer more related works on RL for solving NE in Markov games and single-agent RL to §A . Learning Stackelberg games As for solving Stackelberg-Nash equilibrium , most of the existing results focus on the normal form game , which is equivalent to our Markov game with H = 1 . Letchford et al . ( 2009 ) ; Blum et al . ( 2014 ) ; Peng et al . ( 2019 ) study learning Stackelberg equilibrium with a best response oracle . In addition , Fiez et al . ( 2019 ) study the local convergence of firstorder methods for finding Stackelberg equilibria in general-sum games with differentiable reward functions , and Ghadimi & Wang ( 2018 ) ; Chen et al . ( 2021a ) ; Hong et al . ( 2020 ) analyze the global convergence of first-order methods for achieving global optimality of bilevel optimization . A more related work is Bai et al . ( 2021 ) , which studies the matrix Stackelberg game with bandit feedback . This work also studies an RL extension where the leader has a finite action set and the follower is faced with an MDP specified by the leader ’ s action . In comparison , we assume the leader knows the reward functions and the main challenge lies in the unknown and leader-controlled transitions . Thus , our setting is different from that in Bai et al . ( 2021 ) . Furthermore , a more relevant work is ( Bucarey et al. , 2019b ) , which establishes the Bellman equation and value iteration algorithm for solving SNE in leader-controlled Markov games . In comparison , we establish modifications of least-squares value iteration that are tailored to online and offline settings . Notation See §B for details . 2 PRELIMINARIES . In this section , we introduce the formulation of the general-sum simultaneous-move Markov games , Stackelberg-Nash equilibrium , and the linear structure we use in this paper . 2.1 GENERAL-SUM SIMULTANEOUS-MOVE MARKOV GAMES . In this setting , two levels of hierarchy in decision making are considered : one leader l and N followers { fi } i∈ [ N ] . Specifically , we define an episodic version of general-sum simultaneousmoves Markov game by the tuple ( S , Al , Af = { Afi } i∈ [ N ] , H , rl , rf = { rfi } i∈ [ N ] , P ) , where S is the state space , Al and Af are the sets of actions of the leader and the followers respectively , H is the number of steps in each episode , rl = { rl , h : S × Al × Af → [ −1 , 1 ] } Hh=1 and rfi = { rfi , h : S × Al × Af → [ −1 , 1 ] } Hh=1 are reward functions of the leader and the followers respectively , and P = { Ph : S × Al × Af × S → [ 0 , 1 ] } Hh=1 is a collection of transition kernels . Here Al ×Af = Al ×Af1 × · · · × AfN . Throughout this paper , we also let ? be some element in { l , f1 , · · · , fN } . Moreover , for any ( h , x , a ) ∈ [ H ] × S ×Al and b = { bi ∈ Afi } i∈ [ N ] , we use the shorthands r ? , h ( x , a , b ) = r ? , h ( x , a , b1 , · · · , bN ) and Ph ( · |x , a , b ) = Ph ( · |x , a , b1 , · · · , bN ) . Policy and Value Function . A stochastic policy π = { πh : S → ∆ ( Al ) } Hh=1 of the leader is a set of probability distributions over actions given the state . Meanwhile , a stochastic joint policy of the followers is defined by ν = { νfi } i∈ [ N ] , where νfi = { νfi , h : S → ∆ ( Afi ) } Hh=1 . We use the notation πh ( a |x ) and νfi , h ( bi |x ) to denote the probability of taking action a ∈ Al or bi ∈ Afi for state x at step h under policy π , νfi respectively . Throughout this paper , for any ν = { νfi } i∈ [ N ] and b = { bi } i∈ [ N ] , we use the shorthand νh ( b |x ) = νf1 , h ( b1 |x ) × · · · × νfN , h ( bN |x ) . Given policies ( π , ν = { νfi } i∈ [ N ] ) , the action-value ( Q ) and state-value ( V ) functions for the leader and followers are defined by Qπ , ν ? , h ( x , a , b ) = Eπ , ν , h , x , a , b [ H∑ t=h r ? , h ( xt , at , bt ) ] , V π , ν ? , h ( x ) = Ea∼πh ( · | x ) , b∼νh ( · | x ) Q π , ν ? , h ( x , a , b ) , ( 2.1 ) where the expectation Eπ , ν , h , x , a , b is taken over state-action pairs induced by the policies ( π , ν = { νfi } i∈ [ N ] ) and the transition probability , when initializing the process with the triplet ( s , a , b = { bi } i∈ [ N ] ) at step h. For notational simplicity , when h , x , a , b are clear from the context , we omit h , x , a , b from Eπ , ν , h , x , a , b . By the definition in ( 2.1 ) , we have the Bellman equation V π , ν ? , h = 〈Q π , ν ? , h , πh × νh〉Al×Af , Q π , ν ? , h = r ? , h + PhV π , ν ? , h+1 , ∀ ? ∈ { l , f1 , · · · , fN } , ( 2.2 ) where πh × νh represents πh × νf1 , h × · · · × νfN , h. Here Ph is the operator which is defined by ( Phf ) ( x , a , b ) = E [ f ( x′ ) |x′ ∼ Ph ( x′ |x , a , b ) ] ( 2.3 ) for any function f : S → R and ( x , a , b ) ∈ S ×Al ×Af . | The paper studies the problem of multi-agent Markov games with one leader and multiple followers. Moreover, the games considered are controlled by the leader, meaning that the transition function only depends on the action of the leader. The goal is to find the Stackelberg-Nash equilibrium of the game by means of reinforcement learning-based algorithms, both for the offline and online setting. The algorithms proposed have guarantees in terms of regret which is sub-linear in the number of episodes for the online setting and converges to zero in the offline setting in the size of the dataset. | SP:30c0a536a6fd499a14ec394c948c0d87eb47a9eb |
Minimax Optimality (Probably) Doesn't Imply Distribution Learning for GANs | 1 INTRODUCTION . When will a generative adversarial network ( GAN ) trained with samples from a distribution D actually output samples from a distribution that is close to D ? This question is one of the most foundational questions in GAN theory—indeed , it was raised since the original paper introducing GANs . However , despite significant interest , this question still remains to be fully understood for general classes of generators and discriminators . A significant literature has developed discussing the role of the training dynamics ( Liu et al. , 2017 ; Li et al. , 2018 ; Arora et al. , 2018 ; Berard et al. , 2019 ; Wiatrak et al. , 2019 ; Thanh-Tung & Tran , 2020 ; Allen-Zhu & Li , 2021 ) , as well as the generalization error of the GAN objective ( Zhang et al. , 2017 ; Arora et al. , 2017 ; Thanh-Tung et al. , 2019 ) . In most cases , researchers have demonstrated that given sufficient training data , GANs are able to learn some specific form of distributions after successful training . Underlying these works appears to be a tacit belief that if we are able to achieve the minimax optimal solution to the population-level GAN objective , then the GAN should be able to learn the target distribution . In this work , we take a closer look at this assumption . What does it mean to learn the target distribution ? As a starting point , we must first formally define what we mean by learning a distribution ; more concretely , what do we mean when we say that two distributions are close ? The original paper of ( Goodfellow et al. , 2020 ) proposed to measure closeness with KL divergence . However , learning the target distribution in KL divergence is quite unlikely to be satisfied for real-world distributions . This is because learning distributions in KL divergence also requires us to exactly recover the support of the target distribution , which we can not really hope to do if the distribution lies in an unknown ( complicated ) low-dimensional manifold . To rectify this , one may instead consider learning in Wasserstein distance , as introduced in the context of GANs by ( Arjovsky et al. , 2017 ) , which has no such “ trivial ” barriers . Recall that the Wasserstein distance between two distributions D1 , D2 over Rd is given by W1 ( D1 , D2 ) = sup Lip ( f ) 1 ED1 [ f ] ED2 [ f ] , where for any f : Rd ! R , we let Lip ( f ) denote the Lipschitz constant of f . That is , two densities are close in Wasserstein distance if no Lipschitz function can distinguish between them . In this work we will focus on Wasserstein distance as it is the most standard notion of distance between probability distributions considered in the context of GANs . Note that if the class of discriminators contains sufficiently large neural networks , then minimax optimality of the GAN objective does imply learning in Wasserstein distance . This is because we can approximate any Lipschitz function arbitrarily well , with an exponentially large network with one hidden layer ( see e.g . ( Poggio et al. , 2017 ) ) . Thus , in this case , minimizing the population GAN objective is actually equivalent to learning in Wasserstein distance . Of course in practice , however , we are limited to polynomially large networks for both the generator and the discriminator . This raises the natural question : Does achieving small error against all poly-size neural network discriminators imply that the poly-size generator has learned the distribution in Wasserstein distance ? One might conjecture that this claim is true , since the generator is only of poly-size . Thus , using a ( larger ) poly-size discriminator ( as opposite to the class of all 1-Lipschitz functions ) might still be sufficient to minimize the actual Wasserstein distance . In this paper , however , we provide strong evidence to the contrary . We demonstrate that widely accepted cryptographic assumptions imply that this is false , even if the generator is of constant depth : Theorem 1.1 ( Informal , see Theorem 3.1 ) . For any n 2 N , let n be the standard Gaussian measure over Rn . Assuming local pseudorandom generators exist , the following holds for any sufficiently large m 2 Z , d , r poly ( m ) , and any diverse1 target distribution D⇤ over [ 0 , 1 ] d given by the pushforward of the uniform distribution Ir on [ 0 , 1 ] r by a constant depth ReLU network of polynomial size/Lipschitzness : 2 There exist generators G : Rm ! Rd computed by ( deterministic ) ReLU networks of constant depth and polynomial size for which no ReLU network of polynomial depth/size/Lipschitzness can tell apart the distributions G ( m ) and D⇤ , yet G ( m ) and D⇤ are ⌦ ( 1 ) -far in Wasserstein distance . While Theorem 1.1 pertains to the practically relevant setting of continuous seed and output distributions , we also give guarantees for the discrete setting . In fact , if we replace D⇤ and m by the uniform distributions over { ±1 } d and { ±1 } m , we show this holds for generators whose output coordinates are given by constant-size networks ( see Theorem 3.2 ) . We defer the formal definition of local pseudorandom generators ( PRGs ) to Section 2.2 . We pause to make a number of remarks about this theorem . First , our theorem talks about the population loss of the GAN objective ; namely , it says that the true population GAN objective is small for this generator G , meaning that for every ReLU network discriminator f of polynomial depth/size/Lipschitzness , we have that |E [ f ( D⇤ ) ] E [ f ( G ( m ) ) ] | 1 d ! ( 1 ) . In other words , our theorem states that even optimizing the true population minimax objective is insufficient for distribution learning . In fact , we show this even when the target distribution can be represented perfectly by some other generative model . Second , notice that our generator is extremely simple : notably , it is only constant depth . On the other hand , the discriminator is allowed to be much more complex , namely any ReLU network of polynomial complexity . This discriminator class thus constitutes the most powerful family of functions we could hope to use in practice . Despite this , we show that the discriminators are still not powerful enough to distinguish the output of the ( much simpler ) generator from the target distribution . Third , our conclusions hold both for d m and d m , so long as the input and output dimensions are related by polynomial factors . 1See Definition 6 . In the discussion proceeding this definition , we give a number of examples making clear that this is a mild and practically relevant assumption to make . 2When we say “ polynomial , ” we are implicitly referring to the dependence on the parameter m , though because d , r are bounded by poly ( m ) , “ polynomial ” could equivalently refer to the dependence on those parameters if they exceeded m. Finally , we formally define the class of “ diverse ” target distributions for which our conclusions hold in Section 2.3 . We note that this class is quite general : for instance , it includes pushforwards of the uniform distribution under random leaky ReLU networks ( see Lemma 2.3 ) . Empirical results . To complement these theoretical results , we also perform some empirical validations of our findings ( see Section 4 ) . Our theorem is constructive ; that is , given a local PRG , we give an explicit generator which satisfies the theorem . We instantiate this construction with Goldreich ’ s PRG with the “ Tri-Sum-And ” ( TSA ) predicate ( Goldreich , 2011 ) , which is an explicit function which is believed to satisfy the local PRG property . We then demonstrate that a neural network discriminator trained via standard methods empirically can not distinguish between the output of this generator and the uniform distribution . While of course we can not guarantee that we achieve the truly optimal discriminator using these methods , this still demonstrates that our construction leads to a function which does appear to be hard to distinguish in practice . GANs , PRGs , and circuit lower bounds . At a high level , our results and techniques demonstrate surprising and deep connections between GANs and more “ classical ” problems in cryptography and complexity theory . Theorem 1.1 already shows that cryptographic assumptions may pose a fundamental barrier to the most basic question in GAN theory . In addition to this , we also show a connection between this question and circuit lower bounds . In the supplementary material , we show that if we are able to unconditionally exhibit generators which can fool polynomially large ReLU network discriminators , then we would obtain breakthrough circuit lower bounds against TC0 ( see Theorem C.2 and Remark C.3 ) . This complements Theorem 1.1 , as it says that if we can unconditionally construct generators which fool realistic discriminators , then we make progress on long-standing questions in circuit complexity . We believe that exploring these connections may be crucial to achieving a deeper understanding of what GANs can and can not learn . 1.1 RELATED WORK . GANs and Distribution Learning The literature on GAN theory is vast and we can not hope to do it full justice here . For a more extensive review , see e.g . ( Gui et al. , 2020 ) . Besides the previously mentioned work on understanding GAN dynamics and generalization , we only mention the most relevant papers here . One closely related line of work derives concrete bounds on when minimax optimality of the GAN objective implies distribution learning ( Bai et al. , 2018 ; Liang , 2018 ; Singh et al. , 2018 ; Uppal et al. , 2019 ; Chen et al. , 2020a ; Schreuder et al. , 2021 ) . However , the rates they achieve scale poorly with the dimensionality of the data , and/or require strong assumptions on the class of generators and discriminators , such as invertability . Another line of work has demonstrated that first order methods can learn very simple GAN architectures in polynomial time ( Feizi et al. , 2017 ; Daskalakis et al. , 2017 ; Gidel et al. , 2019 ; Lei et al. , 2020 ) . However , these results do not cover many of the generators used in practice , such as ReLU networks with > 1 hidden layers . Local PRGs and Learning PRGs have had a rich history of study in cryptography and complexity theory ( see e.g . ( Vadhan , 2012 ) ) . From this literature , the object most relevant to the present work is the notion of a local PRG . These are part of a broader research program of building constant parallel-time cryptography ( Applebaum et al. , 2006 ) . One popular local PRG candidate was suggested in ( Goldreich , 2011 ) . By now there is compelling evidence that this candidate is a valid PRG , as a rich family of algorithms including sum-of-squares ( ODonnell & Witmer , 2014 ) and statistical query algorithms ( Feldman et al. , 2018 ) provably can not break it . Finally , we remark that Goldreich ’ s PRG and , more generally , hardness of refuting random CSPs have been used in a number of works showing hardness for various supervised learning problems ( Daniely & Vardi , 2021 ; Daniely et al. , 2014 ; Daniely , 2016 ; Daniely & Shalev-Shwartz , 2016 ; Applebaum et al. , 2006 ; Applebaum & Raykov , 2016 ) . We consider a very different setting , and our techniques are very different from the aforementioned papers . | This paper studies the problem of learning generative adversarial networks using a ploy-size ReLU generator and discriminator under the standard Wasserstein-1 metric. The main result is that there exists a "bad" generator that can cheat all discriminators under the estimation of the Wasserstein-1 metric while being far from the data distribution under the true Wasserstein-1 metric. The proof relies on two assumptions. The first one is on the diversity of the target data distribution. The second one is a standard assumption in cryptography as claimed by this paper while I'm not familiar with cryptography. The results explicitly consider the computation complexity of the model and may show the learnability of the GAN model in some sense. | SP:758657fd14760eaf9183ac60344d08267b6d6c56 |
Robust Losses for Learning Value Functions | 1 INTRODUCTION . Learning value functions from off-policy data remains an open challenge due to high-variance samples and the inability to optimize the objective of interest . Progress towards this goal has been made over years of algorithm development , by reducing the variance for temporal difference ( TD ) algorithms ( Precup et al. , 2000 ; Munos et al. , 2016 ; Mahmood et al. , 2017 ) ; following approximate gradients of a proxy objective—the mean squared Bellman error ( MSBE ) —which upper bounds our objective of interest ( Dai et al. , 2017 ; 2018 ; Feng et al. , 2019 ) ; and following an approximate gradient of a projected version of the MSBE ( Sutton et al. , 2009 ; Maei et al. , 2009 ; Mahadevan et al. , 2014 ; Liu et al. , 2016 ; Ghiassian et al. , 2020 ) . For many years , however , there was only a limited set of choices—mainly vanilla TD algorithms . Because it was unclear precisely what objective TD was optimizing ( Baird , 1995 ; Antos et al. , 2008 ) , it was difficult to extend the algorithm . The known alternative—optimizing the MSBE—suffers from an issue of double sampling in the absence of a simulator ( Baird , 1995 ; Scherrer , 2010 ) . Driving the recent innovations are two key advances for objectives in RL . The first is the formalization of the objective underlying TD , called the mean squared projected Bellman error ( MSPBE ) ( Antos et al. , 2008 ; Sutton et al. , 2009 ) , which projects the Bellman error into the space spanned by the function approximator . Many algorithms are built on the originally introduced variants , GTD2 and TD with gradient corrections ( TDC ) ( Sutton et al. , 2009 ) . These algorithms , however , are limited to linear function approximation because the MSPBE is defined only for the linear case . The second advance is the introduction of a conjugate form for the MSBE to handle the double sampling problem ( Dai et al. , 2017 ) . By transforming the MSBE using biconjugate functions , the double sampling problem instead became a better understood saddlepoint optimization problem . The SBEED algorithm ( Dai et al. , 2018 ) later extended the conjugate MSBE to control using a smoothed Bellman optimality operator and parameterizing both the policy and value function estimates . By transforming the MSBE into an objective for which we can obtain unbiased sample gradients , the conjugate MSBE allowed a natural extension to nonlinear function approximation . A natural next step is to use these advances to revisit defining and optimizing statistically robust losses for value functions . The MSBE and MSPBE are built on squared errors , which are known to be sensitive to outliers . In the RL setting , this translates into overemphasizing states for which the Bellman residual is high , at the cost of obtaining accurate estimates in other states . For example , consider the CliffWorld domain ( Sutton and Barto , 2018 ) where the agent must navigate alongside a cliff to reach a rewarding goal state . Should the agent step into the cliff , the agent is sent back to the start state with a large negative reward . In order to represent the optimal policy , the agent must learn that actions which lead to the cliff yield negative return , while actions that lead towards the goal yield positive return ( or at least less negative ) . Perfectly representing the exact magnitude of negative returns for stepping in the cliff is not useful , as it is sufficient to only know that these actions are more negative than actions leading towards the goal . Further , because the agent bootstraps off these value estimates in the states near the goal , squared errors tend to magnify these inaccuracies across all states visited in the episode . In general , the ability to replace squared errors with alternatives , like absolute errors or the Huber loss ( Huber , 1964 ) , provides another dimension to improve our algorithms and , to the best of our knowledge , has yet to be explored . Issues with squared errors have been noted in the RL literature and addressed heuristically in control using clipping . DQN uses clipped TD errors by default to avoid large magnitude updates ( Mnih et al. , 2015 ) , likewise , Dueling DQN ( Wang et al. , 2016 ) directly clips its gradients . There is a close relationship between clipping TD errors and using a Huber loss in the linear function approximation setting . However , even for linear Q-learning or TD-learning , clipping TD errors does not correspond to minimizing a Huber loss for the Bellman error . Rather , it takes a non-gradient update and applies clipping to that update to mimic the Huber loss which results in a bias similar to residual TD methods ( Baird , 1995 ; Sutton and Barto , 2018 ) . In this work , we develop practical algorithms that can use absolute and Huber errors instead of squared errors for the BE . To do so , we develop a unified perspective of the mean absolute Bellman Error ( MABE ) , mean squared Bellman Error ( MSBE ) , and mean Huber Bellman Error ( MHBE ) which smoothly interpolates between these other two . We rely on the insight that the MSBE can be reformulated into a saddlepoint problem with the introduction of an auxiliary learned variable ; using the same strategy , we derive a biconjugate form for the MHBE and MABE amenable to simple gradient-descent techniques . The resulting approach is a simple modification of existing gradient TD algorithms , using a different update for the auxiliary variable , making it straightforward to use either of these losses . We show that the MHBE and MABE can significantly change the solution quality , improving accuracy in terms of the mean squared value error , as well as the mean absolute value error . We then show that gradient algorithms for the MHBE tend to perform similar to those for the MSBE , but provide significant robustness improvements in certain cases , particularly under bad state aliasing . Finally , we show that in control with nonlinear function approximation , gradient-based algorithms minimizing the MHBE often outperform those using squared losses or those using non-gradient updates . 2 PROBLEM FORMULATION . We model the agent ’ s interactions with its environment as a Markov Decision Process ( MDP ) , ( S , A , P , R , γ ) . At each time-step t , the agent observes states St ∈ S , selects an action At ∈ A according to policy π : S → ∆ ( A ) , transitions to the next state St+1 ∈ S according to transition function P : S × A → ∆ ( S ) , and receives a scalar reward signal Rt+1 and discount γt+1 ∈ [ 0 , 1 ] . The discount depends on the state , and encodes termination when γt+1 = 0 ( White , 2017 ) . For the prediction setting , the agent ’ s goal is to estimate the value function vπ for a given policy . The value function can be defined recursively , using the Bellman operator ( T v ) ( s ) def= E [ Rt+1 + γt+1v ( St+1 ) | St = s ] where the expectation is taken with respect to the policy π and transition dynamics P . The true values vπ are the fixed point for this operator : T vπ = vπ . Our goal is to approximate vπ , with vθ ∈ F for some ( parameterized ) function space F . Typically , the quality of this approximation is evaluated under the value error , either mean squared value error ( MSVE ) or mean absolute value error ( MAVE ) MSVE ( vθ ) def = ∑ s∈S d ( s ) ( vθ ( s ) − vπ ( s ) ) 2 MAVE ( vθ ) def = ∑ s∈S d ( s ) |V ( s ) − vπ ( s ) | where d : S → [ 0 , 1 ] is typically the visitation distribution under a behavior policy.1 1For exposition , we assume discrete states and actions throughout this paper . The connection to continuous state-actions is straightforward and we will explicitly call out where this connection is less obvious . One objective used to learn approximation vθ is the mean squared Bellman error ( MSBE ) MSBE ( θ ) def= ∑ s∈S d ( s ) ( ( T vθ ) ( s ) − vθ ( s ) ) 2 = ∑ s∈S d ( s ) E [ δ ( θ ) | S = s ] 2 ( 1 ) where δ ( θ ) def= Rt+1 + γt+1vθ ( St+1 ) − vθ ( St ) . If vπ ∈ F , then there exists a θ such that vθ = vπ and MSBE ( θ ) = 0 . Otherwise , if vπ /∈ F , then this objective trades-off Bellman error across states . The trade-off in errors across states is impacted by both the weighting d as well as the fact that a squared error is used . The function approximator focuses on states with high weighting d , which is sensible . However , by using a squared error , it heavily emphasizes states with higher error which may not be desirable . In the next section , we develop an approach to use robust losses—the absolute error and the Huber error—in place of this squared error . The same approach as above can also be used for control to approximate the optimal action-values q∗ . These values can similarly be defined using a Bellman optimality operator ( T ∗q ) ( s , a ) def= E [ Rt+1 + γt+1 max a′∈A q ( St+1 , a ′ ) | St = s , At = a ] with T ∗q∗ = q∗ . The corresponding mean squared Bellman error for learning approximate qθ is∑ s∈S , a∈A d ( s , a ) [ ( T ∗qθ ) ( s , a ) − qθ ( s , a ) ] 2 where we overload d to be a state-action weighting , which typically corresponds to the state-action visitation frequency under a policy . 3 ROBUST BELLMAN ERRORS . In this section , we provide reformulations of the MABE and the MHBE which avoid the double sampling issue by using their biconjugates . For some intuition on how these objectives differ from the MSVE and MSBE , we visualize them in Figure 1 . To sample this gradient requires a sample of δ ( θ ) for the first expectation and an independent sample of δ ( θ ) for the second expectation . Otherwise , using the same sample , we estimate the gradient of E [ δ ( θ ) 2 | S = s ] instead of E [ δ ( θ ) | S = s ] 2 . Due to the chain rule , both the MABE and MHBE will suffer from the same issue as the MSBE . The strategy is to reformulate the objectives using conjugates , introducing an auxiliary variable to estimate part of the gradient . For a real-valued function f : R → R , the conjugate is f∗ ( h ) def= supx∈R xh − f ( x ) . This function f∗ also has a conjugate , f∗∗ , which is called the biconjugate of f . Further , for any function f that is proper , convex , and lower semi-continuous , the biconjugate f∗∗ ( x ) = f ( x ) for all x by the Fenchel-Moreau theorem ( Fenchel , 1949 ; Moreau , 1970 ) . Because the three functions we want to reformulate—the absolute , huber , and square functions—are all proper , convex , and lower semi-continuous , this equivalence allows us to reformulate these losses using biconjugates to avoid the double sampling issue without changing the solutions to these losses . To rewrite existing results in our notation and provide some intuition , we first write the reformulation for the MSBE . The conjugate of the squared error f ( x ) = 12x 2 is f∗ ( h ) = maxx∈R hx− 12x 2 , which is in fact again the squared error : f∗ ( h ) = 12h 2 ( this result is well known , but for completeness we include the proof in Appendix A ) . The biconjugate is f∗∗ ( x ) = maxh∈R xh− 12h 2 and f ( x ) = f∗∗ ( x ) . We can use this to get that , for x = E [ δ ( θ ) | S = s ] , E [ δ ( θ ) | S = s ] 2 = max h∈R 2E [ δ ( θ ) | S = s ] h− h2 . If we have function space Fall—the set of all possible functions h : S → R—then we get that MSBE ( θ ) = ∑ s∈S d ( s ) max h∈R ( 2E [ δ ( θ ) | S = s ] h− h2 ) = max h∈Fall ∑ s∈S d ( s ) ( 2E [ δ ( θ ) | S = s ] h ( s ) − h ( s ) 2 ) where the maximization comes out of the sum using the interchangeability property ( Shapiro et al. , 2014 ; Dai et al. , 2017 ) and h ( s ) is a function that allows us to independently pick a maximizer for every state in the summation . If we have the maximizing function h∗ ( s ) , it is straightforward to sample the gradient . Because h∗ ( s ) itself is not directly a function of θ , then the gradient is ∇θ ∑ s∈S d ( s ) ( 2E [ δ ( θ ) | St=s ] h∗ ( s ) −h∗ ( s ) 2 ) = ∑ s∈S 2d ( s ) h∗ ( s ) E [ γ∇θv ( S′ ) −∇θv ( s ) ) | St=s ] . Drawing samples S ∼ d ( · ) , A ∼ π ( ·|S ) , and S′ ∼ P ( ·|S , A ) , we can easily compute a stochastic sample of the gradient . In practice , we simply optimize the resulting saddlepoint problem with a minimization over θ and maximization over h. Note the optimal h∗ ( s ) = E [ δ ( θ ) | St = s ] . We can use the same procedure for the Huber error and the absolute error . We derive the biconjugate form for the Huber error in the following proposition . Though it is a relatively straightforward result to obtain , to the best of our knowledge , it is new and so worth providing formally . Proposition 3.1 The biconjugate of the Huber function is p∗∗τ ( x ) = max h∈ [ −τ , τ ] xh− 1 2 h2 . ( 2 ) Due to space restrictions , we provide a complete proof in Appendix A . The absolute value has biconjugate maxh∈ [ −1,1 ] xh . As in the squared error case , this is a well known result but we include the proof for completeness in Appendix A . Notice again the constrained optimization problem for this biconjugate , as in the case of the Huber biconjugate function . We can now provide the forms for MABE and MHBE : MABE ( θ ) def= max h∈Fsign ∑ s∈S d ( s ) h ( s ) E [ δ ( θ ) |S = s ] MHBE ( θ ) def= max h∈Fclipτ ∑ s∈S d ( s ) ( 2h ( s ) E [ δ ( θ ) |S = s ] − h ( s ) 2 ) Fsign is the set of all functions hsign : S→ { −1 , 1 } andFclipτ the set of all functions hclipτ : S→ [ −τ , τ ] . For all of these reformulations , in practice we will have parameterized functions h , and so only approximate the objective . For example , for the MSBE , we may use linear functions Fh = { h | h ( s ) = θh > x ( s ) , θh ∈ Rd } where x : S → Rd is a d-dimensional feature generating function . For the MHBE , we might use Fh = { h | h ( s ) = clipτ ( θh > x ( s ) ) , θh ∈ Rd } . For the conjugate reformulation of the MSBE , limiting vθ and h ( s ) to both be linear functions of the same features results in the mean squared Projected Bellman error , as noted by Dai et al . ( 2017 ) . There are no equivalent existing projected Bellman errors for these new absolute and Huber variants . We note , however , that when the function space is constrained to only functions of our features x ( s ) , these conjugate reformulations do not suffer from the same identifiability issue raised for the MSBE ( Sutton and Barto , 2018 ; Scherrer , 2010 ) as we show in Appendix B . The final form of the MHBE highlights a connection to a recently proposed gradient TD algorithm that seemed to significantly improve stability over vanilla gradient TD methods . The algorithm , called TD with Regularized Corrections ( TDRC ) , adds a regularizer to the parameters for h ( Ghiassian et al. , 2020 ) . This regularizer has the effect of constraining h ( s ) to be closer to zero , and so could be seen as providing some of the same robustness benefits as a Huber loss . Of course , the correspondence is by no means exact . Regularizing with ` 2 on the parameters is different than restricting between −1 and 1 . Further , as shown in that work , TDRC does not alter the fixed-point of its mean squared objective . Using the Huber error in place of the squared error , however , will likely alter the fixed-point . Finally , we show that the MHBE bounds the MAVE . It is well-known that absolute errors are hard to optimize and so the Huber error acts as a smooth approximation to the absolute error . Theorem 3.2 first shows that minimizing the MABE acts as a proxy for minimizing the MAVE . Then , by bounding the absolute value error with the Huber error , we get that the MHBE acts as an approximation of the MABE implying that minimizing the MHBE likewise minimizes the MAVE . Because of this approximation , the MHBE has an irreducible error term which is controlled by the Huber parameter τ . We provide a complete proof of Theorem 3.2 in Appendix A.1 . Theorem 3.2 Let τcap = min ( τ , 1 ) , then for arbitrary v ∈ Rd and 0 < < τ2cap we have ‖vπ − v‖1 ≤ ‖ ( I − Pπ , γ ) −1‖1‖T v − v‖1 ≤ ‖ ( I − Pπ , γ ) −1‖1 d∑ s=0 ( √ 2 pτ ( T vs − vs ) + √ 2 ) . | This paper starts with the premise that squared error minimization, despite its wide use, might not be the most effective option for learning value functions. The authors hypothesize that this might be because of squared error's emphasis on outlier states where the bellman error is large at the expense of accuracy on other states. To address this, they consider the absolute value and huber errors alongside the squared error objective and propose a saddle-point reformulation for these objectives that requires learning an auxiliary learned state function which, essentially, attempts to predict the residual error at each state. Based on this motivation, starting with Section 4 the authors then make a connection of the proposed robust loss framework involving a learned auxiliary state function with prior work on algorithms for improving TD learning, namely, GTD2 and TDC. Empirical analysis covers both prediction tasks as well as control tasks. In the prediction experiments, evaluations are conducted over carefully designed synthetic problems with linear function approximation in order to highlight particular challenges for each objective. These demonstrate that the Huber objective can often improve the prediction accuracy over squared error over a wide range of step sizes (learning rates). For the empirical investigation on non-linear control problems, the authors consider a Huber-extension of the previously proposed QRC algorithm (which itself extends the TDC update to be considered in conjunction with the DQN target definition) and demonstrate that QRC-huber can improve on baselines in certain environments while being competitive elsewhere. These algorithms are also validated on a mini version of the Atari domain called Minatar. | SP:960d665d3bb325ea587d49ce1c4b0f2dea0a0bdf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.