paper_name stringlengths 11 170 | text stringlengths 8.07k 307k | summary stringlengths 152 6.16k | paper_id stringlengths 43 43 |
|---|---|---|---|
Average-case Acceleration for Bilinear Games and Normal Matrices | 1 INTRODUCTION . The traditional analysis of optimization algorithms is a worst-case analysis ( Nemirovski , 1995 ; Nesterov , 2004 ) . This type of analysis provides a complexity bound for any input from a function class , no matter how unlikely . However , since hard-to-solve inputs might rarely occur in practice , the worst-case complexity bounds might not be representative of the observed running time . A more representative analysis is given by the average-case complexity , averaging the algorithm ’ s complexity over all possible inputs . This analysis is standard for analyzing , e.g. , sorting ( Knuth , 1997 ) and cryptography algorithms ( Katz & Lindell , 2014 ) . Recently , a line of work ( Berthier et al. , 2020 ; Pedregosa & Scieur , 2020 ; Lacotte & Pilanci , 2020 ; Paquette et al. , 2020 ) focused on optimal methods for the optimization of quadratics , specified by a symmetric matrix . While worst-case analysis uses bounds on the matrix eigenvalues to yield upper and lower bounds on convergence , average-case analysis relies on the expected distribution of eigenvalues and provides algorithms with sharp optimal convergence rates . While the algorithms developed in this context have been shown to be efficient for minimization problems , these have not been extended to smooth games . A different line of work considers algorithms for smooth games but studies worst-case optimal methods ( Azizian et al. , 2020 ) . In this work , we combine average-case analysis with smooth games , and develop novel average-case optimal algorithms for finding the root of a linear system determined by a ( potentially non-symmetric ) normal matrix . We make the following main contributions : 1 . Inspired by the problem of finding equilibria in smooth games , we develop average-case optimal algorithms for finding the root of a non-symmetric affine operator , both under a normality assumption ( Thm . 4.1 ) , and under the extra assumption that eigenvalues of the operator are supported in a disk ( Thm . 4.2 ) . The proposed method shows a polynomial speedup compared to the worst-case optimal method , verified by numerical simulations . 2 . We make a novel connection between average-case optimal methods for optimization , and average-case optimal methods for bilinear games . In particular , we show that solving the Hamiltonian using an average-case optimal method is optimal ( Theorem 3.1 ) for bilinear games . This result complements ( Azizian et al. , 2020 ) , who proved that Polyak Heavy Ball algorithm on the Hamiltonian is asymptotically worst-case optimal for bilinear games . 2 AVERAGE-CASE ANALYSIS FOR NORMAL MATRICES . In this paper we consider the following class of problems . Definition 1 . Let A ∈ Rd×d be a real matrix and x ? ∈ Rd a vector . The non-symmetric ( affine ) operator ( NSO ) problem is defined as : Find x : F ( x ) def = A ( x−x ? ) = 0 . ( NSO ) This problem generalizes that of minimization of a convex quadratic function f , since we can cast the latter in this framework by setting the operator F = ∇f . The set of solutions is an affine subspace that we will denote X ? . We will find convenient to consider the distance to this set , defined as dist ( x , X ? ) def= min v∈X ? ‖x− v‖2 , with X ? = { x ∈ Rd |A ( x− x ? ) = 0 } . ( 1 ) In this paper we will develop average-case optimal methods . For this , we consider A and x ? to be random vectors , and a random initialization x0 . This induces a probability distribution over NSO problems , and we seek to find methods that have an optimal expected suboptimality w.r.t . this distribution . Denoting E ( A , x ? , x0 ) the expectation over these random problems , we have that average-case optimal methods they verify the following property at each iteration t min xt E ( A , x ? , x0 ) dist ( xt , X ? ) s.t . xi ∈ x0 + span ( { F ( xj ) } i−1j=0 ) , ∀i ∈ [ 1 : t ] . ( 2 ) The last condition on xt stems from restricting the class of algorithms to first-order methods . The class of first-order methods encompasses many known schemes such as gradient descent with momentum , or full-matrix AdaGrad . However , methods such as Adam ( Kingma & Ba , 2015 ) or diagonal AdaGrad ( Duchi et al. , 2011 ) are not in this class , as the diagonal re-scaling creates iterates xt outside the span of previous gradients . Although we will focus on the distance to the solution , the results can be extended to other convergence criteria such as ‖F ( xt ) ‖2 . Finally , note that the expectations in this paper are on the problem instance and not on the randomness of the algorithm . 2.1 ORTHOGONAL RESIDUAL POLYNOMIALS AND FIRST-ORDER METHODS . The analysis of first-order methods simplifies through the use of polynomials . This section provides the tools required to leverage this connection . Definition 2 . A residual polynomial is a polynomial P that satisfies P ( 0 ) = 1 . Proposition 2.1 . ( Hestenes et al. , 1952 ) If the sequence ( xt ) t∈Z+ is generated by a first-order method , then there exist residual polynomials Pt , each one of degree at most t , verifying xt − x ? = Pt ( A ) ( x0 − x ? ) . ( 3 ) As we will see , optimal average-case method are strongly related to orthogonal polynomials . We first define the inner product between polynomials , where we use z∗ for the complex conjugate of z ∈ C. Definition 3 . For P , Q ∈ R [ X ] , we define the inner product 〈· , ·〉µ for a measure µ over C as 〈P , Q〉µ def = ∫ C P ( λ ) Q ( λ ) ∗ dµ ( λ ) . ( 4 ) Definition 4 . A sequence of polynomials { Pi } is orthogonal ( resp . orthonormal ) w.r.t . 〈· , ·〉µ if 〈Pi , Pi〉µ > 0 ( resp . = 1 ) ; 〈Pi , Pj〉µ = 0 if i 6= j . 2.2 EXPECTED SPECTRAL DISTRIBUTION . Following ( Pedregosa & Scieur , 2020 ) , we make the following assumption on the problem family . Assumption 1. x0 − x ? is independent ofA , and E ( x0 , x ? ) [ ( x0 − x ? ) ( x0 − x ? ) > ] = R 2 d Id . We will also require the following definitions to characterize difficulty of a problem class . Let { λ1 , . . . , λd } be the eigenvalues of a matrix A ∈ Rd×d . We define the empirical spectral distribution ofA as the probability measure µ̂A ( λ ) def = 1d ∑d i=1δλi ( λ ) , ( 5 ) where δλi is the Dirac delta , a distribution equal to zero everywhere except at λi and whose integral over the entire real line is equal to one . Note that with this definition , ∫ D dµ̂A ( λ ) corresponds to the proportion of eigenvalues in D. WhenA is a matrix-valued random variable , µA is a measure-valued random variable . As such , we can define its expected spectral distribution µA def = EA [ µ̂A ] , ( 6 ) which by the Riesz representation theorem is the measure that verifies ∫ f dµ = EA [ ∫ f dµA ] for all measureable f . Surprisingly , the expected spectral distribution is the only required characteristic to design optimal algorithms in the average-case . 2.3 EXPECTED ERROR OF FIRST-ORDER METHODS . In this section we provide an expression for the expected convergence in terms of the residual polynomial and the expected spectral distribution introduced in the previous section . To go further in the analysis , we have to assume thatA is a normal matrix . Assumption 2 . The ( real ) random matrixA is normal , that is , it verifiesAA > = A > A . Normality is equivalent to A having the spectral decomposition A = UΛU∗ , where U is unitary , i.e. , U∗U = UU∗ = I . We now have everything to write the expected error of a first-order algorithm applied to ( NSO ) . Theorem 2.1 . Consider the application of a first-order method associated to the sequence of polynomials { Pt } ( Proposition 2.1 ) on the problem ( NSO ) . Let µ be the expected spectral distribution ofA . Under Assumptions 1 and 2 , we have E [ dist ( xt , X ? ) ] = R2 ∫ C\ { 0 } |Pt|2 dµ , ( 7 ) Before designing optimal algorithms for certain specific distributions , we compare our setting with the average-case accelerating for minimization problems of Pedregosa & Scieur ( 2020 ) , who proposed optimal optimization algorithms in the average-case . 2.4 DIFFICULTIES OF FIRST-ORDER METHODS ON GAMES AND RELATED WORK . This section compares our contribution with the existing framework of average-case optimal methods for quadratic minimization problems . Definition 5 . Let H ∈ Rd×d be a random symmetric positive-definite matrix and x ? ∈ Rd a random vector . These elements determine the following random quadratic minimization problem minx∈Rd { f ( x ) def = 1 2 ( x−x ? ) > H ( x−x ? ) } . ( OPT ) As in our paper , Pedregosa & Scieur ( 2020 ) find deterministic optimal first-order algorithms in expectation w.r.t . the matrix H , the solution x ? , and the initialization x0 . Since they work with problem ( OPT ) , their problem is equivalent to ( NSO ) with the matrix A = H . However , they have the stronger assumption that the matrix is symmetric , which implies being normal . The normality assumption is restrictive in the case of game theory , as they do not always naturally fit such applications . However , this set is expressive enough to consider interesting cases , such as bilinear games , and our experiments show that our findings are also consistent with non-normal matrices . Using orthogonal residual polynomials and spectral distributions , they derive the explicit formula of the expected error . Their result is similar to Theorem 2.1 , but the major difference is the domain of the integral , a real positive line in convex optimization , but a shape in the complex plane in our case . This shape plays a crucial role in the rate of converge of first-order algorithms , as depicted in the work of Azizian et al . ( 2020 ) ; Bollapragada et al . ( 2018 ) . In the case of optimization methods , they show that optimal schemes in the average-case follow a simple three-term recurrence arising from the three-term recurrence for residual orthogonal polynomials for the measure λµ ( λ ) . Indeed , by Theorem 2.1 the optimal method corresponds to the residual polynomials minimizing 〈P , P 〉µ , and the following result holds : Theorem 2.2 . ( Fischer , 1996 , §2.4 ) When µ is supported in the real line , the residual polynomial of degree t minimizing 〈P , P 〉µ is given by the degree t residual orthogonal polynomial w.r.t . λµ ( λ ) . However , the analogous result does not hold for general measures in C , and hence our arguments will make use of the following Theorem 2.3 instead , which links the residual polynomial of degree at most t that minimizes 〈P , P 〉µ to the sequence of orthonormal polynomials for µ. Theorem 2.3 . [ Theorem 1.4 of Assche ( 1997 ) ] Let µ be a positive Borel measure in the complex plane . The minimum of the integral ∫ C |P ( λ ) | 2 dµ ( λ ) over residual polynomials P of degree lower or equal than t is uniquely attained by the polynomial P ? ( λ ) = ∑t k=0 φk ( λ ) φk ( 0 ) ∗∑t k=0 |φk ( 0 ) |2 , with optimal value ∫ C |P ? ( λ ) |2 dµ ( λ ) = 1∑t k=0 |φk ( 0 ) |2 , ( 8 ) where ( φk ) k is the orthonormal sequence of polynomials with respect to the inner product 〈· , ·〉µ . In the next sections we consider cases where the optimal scheme is identifiable . | The paper combines two recent areas of interest in optimization for machine learning: average-case analysis for acceleration and learning in bilinear games. Average-case optimal methods are proposed for some distributions on eigenvalues for the Jacobian of the games vector-field. Also, a connection is made between average-case optimal methods in bilinear games and optimally solving the Hamiltonian. | SP:ff34a84b45570d684598dda4a9cd63be2a459e51 |
On Single-environment Extrapolations in Graph Classification and Regression Tasks | 1 INTRODUCTION . In some graph classification and regression applications , the graphs themselves are representations of a natural process rather than the true state of the process . Molecular graphs are built from a pairwise atom distance matrix by keeping edges whose distance is below a certain threshold and the choice impacts distinguishability between molecules ( Klicpera et al. , 2020 ) . Functional brain connectomes are derived from time series but researchers must choose a frequency range for the signals , which affects resulting graph structure ( De Domenico et al. , 2016 ) . Recent work ( e.g . Knyazev et al . ( 2019 ) ; Bouritsas et al . ( 2020 ) ; Xu et al . ( 2020 ) ) explore extrapolations in real-world tasks , showcasing a growing interest in the underexplored topic of graph extrapolation tasks . In this work , we refer to graph-processing environment ( or just environment ) as the collection of heuristics and other data curation processes that gave us the observed graph from the true state of the process under consideration . The true state alone defines the target variable . Our work is interested in what we refer as the graph extrapolation task : predict a target variable from a graph regardless of its environment . In this context , even graph sizes can be determined by the environment . Unsurprisingly , graph extrapolation tasks—a type of out-of-distribution prediction—are only feasible when we make assumptions about these environments . We define the graph extrapolation task as a counterfactual inference task that requires learning environment-invariant ( E-invariant ) representations . Unfortunately , graph datasets largely contain a single environment , while common E-invariant representation methods require training data from multiple environments , including Independence of causal mechanism ( ICM ) methods ( Bengio et al. , 2019 ; Besserve et al. , 2018 ; Johansson et al. , 2016 ; Louizos et al. , 2017 ; Raj et al. , 2020 ; Schölkopf , 2019 ; Arjovsky et al. , 2019 ) , Causal Discovery from Change ( CDC ) methods ( Tian & Pearl , 2001 ) , and representation disentanglement methods ( Bengio et al. , 2019 ; Goudet et al. , 2017 ; Locatello et al. , 2019 ) . Contributions . Our work contributes to a growing literature by providing , to the best of our knowledge , the first systematic counterfactual modeling framework for extrapolations in graph classification/regression tasks . Existing work , e.g. , the parallel work of Xu et al . ( 2020 ) , define extrapolations geometrically and , thus , have a different scope . Our work connects Lovász ’ s graph limit theory with graph-size extrapolation in a family of graph classification and regression tasks . Moreover , our experiments show that in these tasks , traditional graph classification/regression methods —including graph neural networks and graph kernels— are unable to extrapolate . 2 A FAMILY OF GRAPH EXTRAPOLATION TASKS . Geometrically , extrapolation can be thought as reasoning beyond a convex hull of a set of training points ( Hastie et al. , 2012 ; Haffner , 2002 ; King & Zeng , 2006 ; Xu et al. , 2020 ) . However , for neural networks—and their arbitrary representation mappings—this geometric interpretation is insufficient to describe a truly broad range of tasks . Rather , extrapolations are better described through counterfactual reasoning ( Neyman , 1923 ; Rubin , 1974 ; Pearl , 2009 ; Schölkopf , 2019 ) . Specifically we want to ask : After seeing training data from environment A , how to extrapolate and predict what would have been the model predictions of a test example from an unknown environment B , had the training data also been from B ? For instance , what would have been the model predictions for a large test example graph if our training data had also been large graphs rather than small ones ? A structural causal model ( SCM ) for graph classification and regression tasks . In many applications , graphs are simply representations of a natural process rather than the true state of the process . In what follows we assume all graphs are simple , meaning all pairs of vertices have at most one edge and no self-loops are present . Our work defines an n-vertex attributed graph as a sample of a random variable Gn : = ( X ( obs ) 1,1 , . . . , X ( obs ) n , n ) , where X ( obs ) i , j ∈ Ω ( e ) encodes edges and edge attributes and X ( obs ) i , i ∈ Ω ( v ) encodes vertex attributes ; we will assume Ω = Ω ( v ) = Ω ( e ) for simplicity . Consider a supervised task over a graph input Gn , n ≥ 2 , and its corresponding output Y . We describe the graph and target generation process with the help of a structural causal model ( SCM ) ( Pearl , 2009 , Definition 7.1.1 ) . We first consider a hidden random variableE with support in Z+ that describes the graph-processing environment ( see Introduction ) . We also consider an independent hidden random variableW ∈ DW that defines the true state of the data , which is independent of the environment variable E , with an appropriately defined space DW . In the SCM , these two variables are inputs to a deterministic graph-generation function g : Z+ ×DW ×DZ → Ωn×n , for some appropriately defined space DZ , that outputs G ( hid ) N ( obs ) : = ( X ( hid ) 1,1 , . . . , X ( hid ) N ( obs ) , N ( obs ) ) = g ( E , W , ZX ) , with N ( obs ) : = η ( E , W ) , ( 1 ) where ZX is another independent random variable that defines external noise ( like measurement noise of a device ) . Equation ( 1 ) gives edge and vertex attributes of the graph G ( hid ) N ( obs ) in some arbitrary canonical form ( Immerman & Lander , 1990 ) , where η is a function of both E and W that gives the number of vertices in the graph . To understand our definitions , consider the following simple example ( divided into two parts ) . Erdős-Rényi example ( part 1 ) : For a single environment e , let n = η ( e ) be the ( fixed ) number of vertices of the graphs in our training data , and p = W be the probability that any two vertices of the graph have an edge . Finally , the variable ZX can be thought as the seed of a random number generator that is drawn n ( n−1 ) 2 times to determine if two distinct vertices are connected by an edge . The above defines our training data as a set of Erdős-Rényi random graphs of size n with p = W . The data generation process in Equation ( 1 ) could leak information about W through the vertex ids ( the order of the vertices ) . Rather than restricting how W acts on ( X ( hid ) 1,1 , . . . , X ( hid ) N ( obs ) , N ( obs ) ) , we remedy this by modeling a random permutation to the vertex indices : G ( obs ) N ( obs ) : = ( X ( obs ) 1,1 , . . . , X ( obs ) N ( obs ) , N ( obs ) ) = ( X ( hid ) π ( 1 ) , π ( 1 ) , . . . , X ( hid ) π ( N ( obs ) ) , π ( N ( obs ) ) ) , ( 2 ) where π ∼ Uniform ( SN ( obs ) ) is an uniform permutation of the indices { 1 , . . . , N ( obs ) } and SN ( obs ) is the permutation group . The observed graph is the outcome of this joint permutation of vertex ids . SCM target variable . We now define our target variable Y . The true target of G ( obs ) N ( obs ) is Y = h ( W , ZY ) , ( 3 ) which is given by a deterministic function h that depends only on W and a random noise ZY independent of W and E. Our final structural causal model is summarized in the directed acyclic graph ( DAG ) of Figure 1 ( a ) . Erdős-Rényi example ( part 2 ) : The targets of the Erdős-Rényi graphs in our previous example can be , for instance , the value Y = W in Equation ( 3 ) , which is also the edge probability p. Graph extrapolation tasks over new environments . Equation ( 3 ) shows that our target variable Y is a function only of the true state W of the data , rather than the graph-processing environment E. Due to the reverse path between Y and E through G ( obs ) N ( obs ) in the DAG of Figure 1 ( a ) , Y is not independent of E given G ( obs ) N ( obs ) . These non-causal paths are called backdoor paths since they flow backwards from Y and G ( obs ) N ( obs ) . Hence , traditional ( interpolation ) methods can pick-up this corre- lation , which would prevent the learnt model from extrapolating over environments different than the ones provided in the training data ( or even over different P ( E ) distributions ) ( Arjovsky et al. , 2019 ; Schölkopf , 2019 ; de Haan et al. , 2019 ) . To address the challenge of predicting Y in spite of backdoor paths , we need a backdoor adjustment ( Pearl , 2009 , Theorem 3.3.2 ) . Instead of explicitly conditioning on the environment for the adjustment , we eliminate the need for conditioning with a graph representation that is invariant to the environment E. Before we proceed , we note that the existing counterfactual notation in the literature ( see Definition 7 of Bareinboim et al . ( 2020 ) ) could be cumbersome in our setting . Hence , we re-propose the powerful concept of random variable coupling from Markov chains ( Pitman , 1976 ; Propp & Wilson , 1996 ) to describe our counterfactual inference problem . The coupling of two independent variables D1 and D2 is a proof technique that creates a random vector ( D † 1 , D † 2 ) , such that Di , D † i have the same marginal distributions , i = 1 , 2 , butD†1 , D † 2 are structurally dependent . For instance , ifD1 , D2 are independent 6-sided die rolls , then D†1 = ( D + 2 ) mod 6 + 1 , D † 2 = ( D + 1 ) mod 6 + 1 are coupled variables corresponding to D1 and D2 , respectively , where D is a 6-sided die roll . Definition 1 ( Counterfactual coupling ( CFC ) ) . A counterfactual coupling of Equations ( 1 ) to ( 3 ) is P ( Y = y , G ( obs ) N ( obs ) = G ( obs ) n ( obs ) , G ( cf ) N ( cf ) = G ( cf ) n ( cf ) ) = EW , ZX , ZY , π , E , Ẽ [ 1 { y = h ( W , ZY ) } · 1 { G ( obs ) n ( obs ) =π ( g ( E , W , ZX ) ) } · 1 { G ( cf ) n ( cf ) =π ( g ( Ẽ , W , ZX ) ) } · 1 { n ( obs ) = η ( E , W ) } · 1 { n ( cf ) = η ( Ẽ , W ) } ] , ( 4 ) where G ( obs ) N ( obs ) : = ( X ( obs ) 1,1 , . . . , X ( obs ) N ( obs ) , N ( obs ) ) and G ( cf ) N ( cf ) : = ( X ( cf ) 1,1 , . . . , X ( cf ) N ( cf ) , N ( cf ) ) , π ( · ) is defined below , and E and Ẽ are independent random variables that sample environments , potentially with different distributions and supports , and 1 is the Dirac delta function . The counterfactual coupled variable G ( cf ) N ( cf ) asks what would have happened to G ( obs ) N ( obs ) if we had used the environment random variable Ẽ in place of E in Equation ( 1 ) . In an abuse of notation we have defined π ( G ( · ) N ) : = ( X ( · ) π ( 1 ) , π ( 1 ) , . . . , X ( · ) π ( N ) , π ( N ) ) above . Using Definition 1 we now prove that a graph representation function Γ ( · ) that is E-invariant is able to predict the targets of the counterfactual graphs . Proposition 1 . Let P ( Y |G ( obs ) N ( obs ) = G ( obs ) n ( obs ) ) and P ( Y |G ( cf ) N ( cf ) = G ( cf ) n ( cf ) ) be the conditional target distributions defined by the counterfactually-coupled random variables in Definition 1 . To simplify exposition , we consider the case where Y ∈ Y is discrete . The continuous case is similar but requires significantly more complex measure theory definitions . Consider a permutation-invariant graph representation Γ : ∪∞n=1Ωn×n → Rd , d ≥ 1 , and a function ρ ( · , · ) ∈ [ 0 , 1 ] ( e.g. , a feedforward network with softmax outputs ) such that , for some , δ > 0 , the interpolation error ( generalization error ) is defined as P ( |P ( Y = y|G ( obs ) N ( obs ) = G ( obs ) n ( obs ) ) − ρ ( y , Γ ( G ( obs ) n ( obs ) ) ) | ≤ ) ≥ 1− δ , ∀y ∈ Y. Γ is said environment-invariant ( E-invariant ) if Γ ( G ( obs ) N ( obs ) ) a.s. = Γ ( G ( cf ) N ( cf ) ) , where a.s. ( almost surely ) means Γ ( G ( obs ) n ( obs ) ) = Γ ( G ( cf ) n ( cf ) ) , except for a set of graphs { G ( obs ) n ( obs ) } and { G ( cf ) n ( cf ) } with zero probability ( measure ) . Then , the extrapolation error is the same as the interpolation error , i.e. , P ( |P ( Y = y|G ( cf ) N ( cf ) = G ( cf ) n ( cf ) ) − ρ ( y , Γ ( G ( cf ) n ( cf ) ) ) | ≤ ) ≥ 1− δ , ∀y ∈ Y . ( 5 ) Proposition 1 shows that an E-invariant representation will perform no worse on the counterfactual test data ( extrapolation samples from ( Y , G ( cf ) N ( cf ) ) ) than on a test dataset having the same environment distribution as the training data ( samples from ( Y , G ( obs ) N ( obs ) ) ) . Other notions of E-invariant representations are possible ( Arjovsky et al. , 2019 ; Schölkopf , 2019 ) , but ours —through coupling— provides a direct relationship with how we learn graph representations from a single training environment . Our task now becomes finding an E-invariant graph representation Γ that can describe well the training data distribution . Specifically , we are interested in single-environment extrapolations . Definition 2 ( Single-environment extrapolation ) . An extrapolation task is a single-environment extrapolation task if the observed training data is generated from a single-environment e ∈ Z+ , while the test data may come from a larger set of environments E ⊆ Z+ , E 6= { e } . In recent years , a crop of interesting research has analyzed the expressiveness of Γ . In what follows we explain why these are related to interpolations rather than extrapolations . A comment on most-expressive graph representations , interpolations , and extrapolations . The expressiveness of a graph classification/regression method is a measure of model family bias ( Morris et al. , 2019 ; Xu et al. , 2018a ; Gärtner et al. , 2003 ; Maron et al. , 2019a ; Murphy et al. , 2019 ) . That is , given enough training data , a neural network from a more expressive family can achieve smaller generalization error ( interpolation error ) than a neural network from a less expressive family , assuming appropriate optimization . However , this power is just a measure of interpolation capability , not extrapolation . Figure 1 ( b ) illustrates a space where each point is a set of neural network parameters from a most-expressive model family . The blue region ( ellipsoid i ) represents models that can perfectly interpolate over the training distribution ( i.e. , models with the smallest generalization error ) . The models in the blue region are mostly fitting spurious training environment E correlations with Y , that will cause poor extrapolations in new environments . The models illustrated in the red region of Figure 1 ( b ) ( ellipsoid ii ) are E-invariant and , thus , by Proposition 1 , can extrapolate across environments , since they can not fit these spurious environment correlations . The intersection between the blue and red regions contains models that are optimal both for test data from the same environment distribution as training ( interpolation test ) and test data from a different environment distribution ( extrapolation test ) . In our SCM in Equations ( 1 ) to ( 3 ) , the intersection between the blue and red ellipsoids is nonempty . We can denote the models in the red ellipsoid as the most-expressive family of E-invariant ( Proposition 1 ) . Our work focuses on a family of classifiers and regression models that reside inside the red ellipsoid . Summary . In this section we have defined a family of extrapolation tasks for graph classification and regression using counterfactual modelling , and connected it to the existing literature . Next , we show how these definitions can be applied to a family of random graph models ( graphons ) first introduced by Diaconis & Freedman ( 1981 ) . | This paper formulates a theoretical model for testing extrapolation abilities of graph learning tasks, and suggests some practical feature maps to achieve good extrapolation properties empirically. In more detail, this paper introduces a model, a so-called structural causal model, for graphs where the graph creation process is modeled as a random variable that depends on different independent factors: environment $E$, which is used to model the graph size $n$; graph property $W$, which is used for example to model the probability of edge existence; and random seed $Z_X$. The created graph is also scrambled by a random permutation to yield the observed graph $G^{\text{obs}}$. The ground truth labels of the graph $Y$ are functions of two factors $W$, the graph property, and $Z_Y$ random seed. | SP:6bb786b66e6692c476fc201d325e82f4fc2e15b8 |
On Single-environment Extrapolations in Graph Classification and Regression Tasks | 1 INTRODUCTION . In some graph classification and regression applications , the graphs themselves are representations of a natural process rather than the true state of the process . Molecular graphs are built from a pairwise atom distance matrix by keeping edges whose distance is below a certain threshold and the choice impacts distinguishability between molecules ( Klicpera et al. , 2020 ) . Functional brain connectomes are derived from time series but researchers must choose a frequency range for the signals , which affects resulting graph structure ( De Domenico et al. , 2016 ) . Recent work ( e.g . Knyazev et al . ( 2019 ) ; Bouritsas et al . ( 2020 ) ; Xu et al . ( 2020 ) ) explore extrapolations in real-world tasks , showcasing a growing interest in the underexplored topic of graph extrapolation tasks . In this work , we refer to graph-processing environment ( or just environment ) as the collection of heuristics and other data curation processes that gave us the observed graph from the true state of the process under consideration . The true state alone defines the target variable . Our work is interested in what we refer as the graph extrapolation task : predict a target variable from a graph regardless of its environment . In this context , even graph sizes can be determined by the environment . Unsurprisingly , graph extrapolation tasks—a type of out-of-distribution prediction—are only feasible when we make assumptions about these environments . We define the graph extrapolation task as a counterfactual inference task that requires learning environment-invariant ( E-invariant ) representations . Unfortunately , graph datasets largely contain a single environment , while common E-invariant representation methods require training data from multiple environments , including Independence of causal mechanism ( ICM ) methods ( Bengio et al. , 2019 ; Besserve et al. , 2018 ; Johansson et al. , 2016 ; Louizos et al. , 2017 ; Raj et al. , 2020 ; Schölkopf , 2019 ; Arjovsky et al. , 2019 ) , Causal Discovery from Change ( CDC ) methods ( Tian & Pearl , 2001 ) , and representation disentanglement methods ( Bengio et al. , 2019 ; Goudet et al. , 2017 ; Locatello et al. , 2019 ) . Contributions . Our work contributes to a growing literature by providing , to the best of our knowledge , the first systematic counterfactual modeling framework for extrapolations in graph classification/regression tasks . Existing work , e.g. , the parallel work of Xu et al . ( 2020 ) , define extrapolations geometrically and , thus , have a different scope . Our work connects Lovász ’ s graph limit theory with graph-size extrapolation in a family of graph classification and regression tasks . Moreover , our experiments show that in these tasks , traditional graph classification/regression methods —including graph neural networks and graph kernels— are unable to extrapolate . 2 A FAMILY OF GRAPH EXTRAPOLATION TASKS . Geometrically , extrapolation can be thought as reasoning beyond a convex hull of a set of training points ( Hastie et al. , 2012 ; Haffner , 2002 ; King & Zeng , 2006 ; Xu et al. , 2020 ) . However , for neural networks—and their arbitrary representation mappings—this geometric interpretation is insufficient to describe a truly broad range of tasks . Rather , extrapolations are better described through counterfactual reasoning ( Neyman , 1923 ; Rubin , 1974 ; Pearl , 2009 ; Schölkopf , 2019 ) . Specifically we want to ask : After seeing training data from environment A , how to extrapolate and predict what would have been the model predictions of a test example from an unknown environment B , had the training data also been from B ? For instance , what would have been the model predictions for a large test example graph if our training data had also been large graphs rather than small ones ? A structural causal model ( SCM ) for graph classification and regression tasks . In many applications , graphs are simply representations of a natural process rather than the true state of the process . In what follows we assume all graphs are simple , meaning all pairs of vertices have at most one edge and no self-loops are present . Our work defines an n-vertex attributed graph as a sample of a random variable Gn : = ( X ( obs ) 1,1 , . . . , X ( obs ) n , n ) , where X ( obs ) i , j ∈ Ω ( e ) encodes edges and edge attributes and X ( obs ) i , i ∈ Ω ( v ) encodes vertex attributes ; we will assume Ω = Ω ( v ) = Ω ( e ) for simplicity . Consider a supervised task over a graph input Gn , n ≥ 2 , and its corresponding output Y . We describe the graph and target generation process with the help of a structural causal model ( SCM ) ( Pearl , 2009 , Definition 7.1.1 ) . We first consider a hidden random variableE with support in Z+ that describes the graph-processing environment ( see Introduction ) . We also consider an independent hidden random variableW ∈ DW that defines the true state of the data , which is independent of the environment variable E , with an appropriately defined space DW . In the SCM , these two variables are inputs to a deterministic graph-generation function g : Z+ ×DW ×DZ → Ωn×n , for some appropriately defined space DZ , that outputs G ( hid ) N ( obs ) : = ( X ( hid ) 1,1 , . . . , X ( hid ) N ( obs ) , N ( obs ) ) = g ( E , W , ZX ) , with N ( obs ) : = η ( E , W ) , ( 1 ) where ZX is another independent random variable that defines external noise ( like measurement noise of a device ) . Equation ( 1 ) gives edge and vertex attributes of the graph G ( hid ) N ( obs ) in some arbitrary canonical form ( Immerman & Lander , 1990 ) , where η is a function of both E and W that gives the number of vertices in the graph . To understand our definitions , consider the following simple example ( divided into two parts ) . Erdős-Rényi example ( part 1 ) : For a single environment e , let n = η ( e ) be the ( fixed ) number of vertices of the graphs in our training data , and p = W be the probability that any two vertices of the graph have an edge . Finally , the variable ZX can be thought as the seed of a random number generator that is drawn n ( n−1 ) 2 times to determine if two distinct vertices are connected by an edge . The above defines our training data as a set of Erdős-Rényi random graphs of size n with p = W . The data generation process in Equation ( 1 ) could leak information about W through the vertex ids ( the order of the vertices ) . Rather than restricting how W acts on ( X ( hid ) 1,1 , . . . , X ( hid ) N ( obs ) , N ( obs ) ) , we remedy this by modeling a random permutation to the vertex indices : G ( obs ) N ( obs ) : = ( X ( obs ) 1,1 , . . . , X ( obs ) N ( obs ) , N ( obs ) ) = ( X ( hid ) π ( 1 ) , π ( 1 ) , . . . , X ( hid ) π ( N ( obs ) ) , π ( N ( obs ) ) ) , ( 2 ) where π ∼ Uniform ( SN ( obs ) ) is an uniform permutation of the indices { 1 , . . . , N ( obs ) } and SN ( obs ) is the permutation group . The observed graph is the outcome of this joint permutation of vertex ids . SCM target variable . We now define our target variable Y . The true target of G ( obs ) N ( obs ) is Y = h ( W , ZY ) , ( 3 ) which is given by a deterministic function h that depends only on W and a random noise ZY independent of W and E. Our final structural causal model is summarized in the directed acyclic graph ( DAG ) of Figure 1 ( a ) . Erdős-Rényi example ( part 2 ) : The targets of the Erdős-Rényi graphs in our previous example can be , for instance , the value Y = W in Equation ( 3 ) , which is also the edge probability p. Graph extrapolation tasks over new environments . Equation ( 3 ) shows that our target variable Y is a function only of the true state W of the data , rather than the graph-processing environment E. Due to the reverse path between Y and E through G ( obs ) N ( obs ) in the DAG of Figure 1 ( a ) , Y is not independent of E given G ( obs ) N ( obs ) . These non-causal paths are called backdoor paths since they flow backwards from Y and G ( obs ) N ( obs ) . Hence , traditional ( interpolation ) methods can pick-up this corre- lation , which would prevent the learnt model from extrapolating over environments different than the ones provided in the training data ( or even over different P ( E ) distributions ) ( Arjovsky et al. , 2019 ; Schölkopf , 2019 ; de Haan et al. , 2019 ) . To address the challenge of predicting Y in spite of backdoor paths , we need a backdoor adjustment ( Pearl , 2009 , Theorem 3.3.2 ) . Instead of explicitly conditioning on the environment for the adjustment , we eliminate the need for conditioning with a graph representation that is invariant to the environment E. Before we proceed , we note that the existing counterfactual notation in the literature ( see Definition 7 of Bareinboim et al . ( 2020 ) ) could be cumbersome in our setting . Hence , we re-propose the powerful concept of random variable coupling from Markov chains ( Pitman , 1976 ; Propp & Wilson , 1996 ) to describe our counterfactual inference problem . The coupling of two independent variables D1 and D2 is a proof technique that creates a random vector ( D † 1 , D † 2 ) , such that Di , D † i have the same marginal distributions , i = 1 , 2 , butD†1 , D † 2 are structurally dependent . For instance , ifD1 , D2 are independent 6-sided die rolls , then D†1 = ( D + 2 ) mod 6 + 1 , D † 2 = ( D + 1 ) mod 6 + 1 are coupled variables corresponding to D1 and D2 , respectively , where D is a 6-sided die roll . Definition 1 ( Counterfactual coupling ( CFC ) ) . A counterfactual coupling of Equations ( 1 ) to ( 3 ) is P ( Y = y , G ( obs ) N ( obs ) = G ( obs ) n ( obs ) , G ( cf ) N ( cf ) = G ( cf ) n ( cf ) ) = EW , ZX , ZY , π , E , Ẽ [ 1 { y = h ( W , ZY ) } · 1 { G ( obs ) n ( obs ) =π ( g ( E , W , ZX ) ) } · 1 { G ( cf ) n ( cf ) =π ( g ( Ẽ , W , ZX ) ) } · 1 { n ( obs ) = η ( E , W ) } · 1 { n ( cf ) = η ( Ẽ , W ) } ] , ( 4 ) where G ( obs ) N ( obs ) : = ( X ( obs ) 1,1 , . . . , X ( obs ) N ( obs ) , N ( obs ) ) and G ( cf ) N ( cf ) : = ( X ( cf ) 1,1 , . . . , X ( cf ) N ( cf ) , N ( cf ) ) , π ( · ) is defined below , and E and Ẽ are independent random variables that sample environments , potentially with different distributions and supports , and 1 is the Dirac delta function . The counterfactual coupled variable G ( cf ) N ( cf ) asks what would have happened to G ( obs ) N ( obs ) if we had used the environment random variable Ẽ in place of E in Equation ( 1 ) . In an abuse of notation we have defined π ( G ( · ) N ) : = ( X ( · ) π ( 1 ) , π ( 1 ) , . . . , X ( · ) π ( N ) , π ( N ) ) above . Using Definition 1 we now prove that a graph representation function Γ ( · ) that is E-invariant is able to predict the targets of the counterfactual graphs . Proposition 1 . Let P ( Y |G ( obs ) N ( obs ) = G ( obs ) n ( obs ) ) and P ( Y |G ( cf ) N ( cf ) = G ( cf ) n ( cf ) ) be the conditional target distributions defined by the counterfactually-coupled random variables in Definition 1 . To simplify exposition , we consider the case where Y ∈ Y is discrete . The continuous case is similar but requires significantly more complex measure theory definitions . Consider a permutation-invariant graph representation Γ : ∪∞n=1Ωn×n → Rd , d ≥ 1 , and a function ρ ( · , · ) ∈ [ 0 , 1 ] ( e.g. , a feedforward network with softmax outputs ) such that , for some , δ > 0 , the interpolation error ( generalization error ) is defined as P ( |P ( Y = y|G ( obs ) N ( obs ) = G ( obs ) n ( obs ) ) − ρ ( y , Γ ( G ( obs ) n ( obs ) ) ) | ≤ ) ≥ 1− δ , ∀y ∈ Y. Γ is said environment-invariant ( E-invariant ) if Γ ( G ( obs ) N ( obs ) ) a.s. = Γ ( G ( cf ) N ( cf ) ) , where a.s. ( almost surely ) means Γ ( G ( obs ) n ( obs ) ) = Γ ( G ( cf ) n ( cf ) ) , except for a set of graphs { G ( obs ) n ( obs ) } and { G ( cf ) n ( cf ) } with zero probability ( measure ) . Then , the extrapolation error is the same as the interpolation error , i.e. , P ( |P ( Y = y|G ( cf ) N ( cf ) = G ( cf ) n ( cf ) ) − ρ ( y , Γ ( G ( cf ) n ( cf ) ) ) | ≤ ) ≥ 1− δ , ∀y ∈ Y . ( 5 ) Proposition 1 shows that an E-invariant representation will perform no worse on the counterfactual test data ( extrapolation samples from ( Y , G ( cf ) N ( cf ) ) ) than on a test dataset having the same environment distribution as the training data ( samples from ( Y , G ( obs ) N ( obs ) ) ) . Other notions of E-invariant representations are possible ( Arjovsky et al. , 2019 ; Schölkopf , 2019 ) , but ours —through coupling— provides a direct relationship with how we learn graph representations from a single training environment . Our task now becomes finding an E-invariant graph representation Γ that can describe well the training data distribution . Specifically , we are interested in single-environment extrapolations . Definition 2 ( Single-environment extrapolation ) . An extrapolation task is a single-environment extrapolation task if the observed training data is generated from a single-environment e ∈ Z+ , while the test data may come from a larger set of environments E ⊆ Z+ , E 6= { e } . In recent years , a crop of interesting research has analyzed the expressiveness of Γ . In what follows we explain why these are related to interpolations rather than extrapolations . A comment on most-expressive graph representations , interpolations , and extrapolations . The expressiveness of a graph classification/regression method is a measure of model family bias ( Morris et al. , 2019 ; Xu et al. , 2018a ; Gärtner et al. , 2003 ; Maron et al. , 2019a ; Murphy et al. , 2019 ) . That is , given enough training data , a neural network from a more expressive family can achieve smaller generalization error ( interpolation error ) than a neural network from a less expressive family , assuming appropriate optimization . However , this power is just a measure of interpolation capability , not extrapolation . Figure 1 ( b ) illustrates a space where each point is a set of neural network parameters from a most-expressive model family . The blue region ( ellipsoid i ) represents models that can perfectly interpolate over the training distribution ( i.e. , models with the smallest generalization error ) . The models in the blue region are mostly fitting spurious training environment E correlations with Y , that will cause poor extrapolations in new environments . The models illustrated in the red region of Figure 1 ( b ) ( ellipsoid ii ) are E-invariant and , thus , by Proposition 1 , can extrapolate across environments , since they can not fit these spurious environment correlations . The intersection between the blue and red regions contains models that are optimal both for test data from the same environment distribution as training ( interpolation test ) and test data from a different environment distribution ( extrapolation test ) . In our SCM in Equations ( 1 ) to ( 3 ) , the intersection between the blue and red ellipsoids is nonempty . We can denote the models in the red ellipsoid as the most-expressive family of E-invariant ( Proposition 1 ) . Our work focuses on a family of classifiers and regression models that reside inside the red ellipsoid . Summary . In this section we have defined a family of extrapolation tasks for graph classification and regression using counterfactual modelling , and connected it to the existing literature . Next , we show how these definitions can be applied to a family of random graph models ( graphons ) first introduced by Diaconis & Freedman ( 1981 ) . | The paper explores the problem of extrapolation in graph classification tasks and by leveraging Lovasz’s graph limit theory, provides graph representations and related theoretical guarantees on graph size extrapolation in the context of unattributed graphs. Specifically, it is shown that the graph representations characterized by induced homomorphism densities are size-invariant under certain conditions. The theoretical claims are validated by empirical evaluation of classifiers trained on the proposed graph representations. | SP:6bb786b66e6692c476fc201d325e82f4fc2e15b8 |
Dynamically Stable Infinite-Width Limits of Neural Classifiers | 1 INTRODUCTION . For a couple of decades neural networks have proved to be useful in a variety of applications . However , their theoretical understanding is still lacking . Several recent works have tried to simplify the object of study by approximating a training dynamics of a finite-width neural network with its limit counterpart in the limit of a large number of hidden units ; we refer it as an `` infinite-width '' limit . The exact type of the limit training dynamics depends on how hyperparameters of the training dynamics scale with width . In particular , two different types of limit models have been already extensively discussed in the literature : an NTK model ( Jacot et al. , 2018 ) and a mean-field limit model ( Mei et al. , 2018 ; 2019 ; Rotskoff & Vanden-Eijnden , 2019 ; Sirignano & Spiliopoulos , 2020 ; Chizat & Bach , 2018 ; Yarotsky , 2018 ) . A recent work ( Golikov , 2020 ) attempted to provide a link between these two different types of limit models by building a framework for choosing a scaling of hyperparameters that lead to a `` well-defined '' limit model . Our work is the next step in this direction . We study infinite-width limits for networks with a single hidden layer trained to minimize cross-entropy loss with gradient descent . Our contributions are following . 1 . We develop a framework for reasoning about scaling of hyperparameters , which allows one to infer scaling parameters that allow for a dynamically stable model evolution in the limit of infinite width . This framework allows us to derive both mean-field and NTK limits that have been extensively studied in the literature , as well as the `` intermediate limit '' introduced in Golikov ( 2020 ) . 2 . Our framework demonstrates that there are only 13 distinct stable model evolution equations in the limit of infinite width that can be induced by scaling hyperparameters of a finite-width model . Each distinct limit model corresponds to a region ( two- , one- , or zero-dimensional ) of a green band of the Figure 1 , left . 3 . We consider a list of properties that are statisfied by the evolution of finite-width models , but not generally are for its infinite-width limits . We demonstrate that mean-field and NTK limit models , as well as `` sym-default '' limit model which was not discussed in the literature previously , are special in the sense that they satisfy most of these properties among all limit models induced by hyperparameter scalings . We propose a model modification that allows for all of these properties in the limit of infinite width and call the corresponding limit `` initialization-corrected mean-field limit ( IC-MF ) '' . 4 . We discuss the ability of limit models to approximate the training dynamics of finite-width ones . We show that our proposed IC-MF limiting model is the best among all other possible limit models . While our present analysis is restricted to networks with a single hidden layer , we discuss a high-level plan for generalizing it to deep nets , as well as an expected outcome of this research program , in App . H . 2 TRAINING A ONE HIDDEN LAYER NET WITH SGD . Here we consider training a one hidden layer net fd with d hidden units with SGD . We assume the hyperparameters , namely , initialization variances and learning rates , are scaled as power-laws of d. Each scaling induces a limit model f∞ = limd→∞ fd . We present a notion of dynamical stability , which states that the change of logits after a single gradient step is comparable to logits themselves . We derive a necessary condition for dynamical stability in terms of the power-law exponents of hyperparameters . We then present a list of conditions that divide the class of scalings into 13 subclasses ; each subclass corresponds to a unique distinct limit model . Consider a one hidden layer network : f ( x ; a , W ) = aTφ ( WTx ) = d∑ r=1 arφ ( w T r x ) , ( 1 ) where x ∈ Rdx , W = [ w1 , . . . , wd ] ∈ Rdx×d , and a = [ a1 , . . . , ad ] T ∈ Rd . We assume a nonlinearity to be real analytic and asymptotically linear : φ ( z ) = Θz→∞ ( z ) . Such a nonlinearity can be , e.g . `` leaky softplus '' : φ ( z ) = ln ( 1 + ez ) − α ln ( 1 + e−z ) for α > 0 . This is a technical assumption introduced to simplify proofs . Note that we have used traditional leaky ReLUs in our experiments : see App . F for details . We assume the loss function ` ( y , z ) to be the standard binary cross-entropy loss : ` ( y , z ) = ln ( 1 + e−yz ) , where labels y ∈ { −1 , 1 } . The data distribution loss is defined as L ( a , W ) = E x , y∼D ` ( y , f ( x ; a , W ) ) . We assume that the data distribution D does not depend on width d. Weights are initialized with isotropic gaussians with zero means : w ( 0 ) r ∼ N ( 0 , σ2wI ) , a ( 0 ) r ∼ N ( 0 , σ2a ) ∀r = 1 . . . d. The evolution of weights is driven by the stochastic gradient descent ( SGD ) : ∆θ ( k ) = θ ( k+1 ) − θ ( k ) = −ηθ ∂ ` ( y ( k ) θ , f ( x ( k ) θ ; a , W ) ) ∂θ , ( x ( k ) θ , y ( k ) θ ) ∼ D , ( 2 ) where θ is either a or W . We assume that gradients for a and W are estimated using independent data samples ( x ( k ) a , y ( k ) a ) and ( x ( k ) w , y ( k ) w ) . While this assumption is indeed non-standard , we note that corresponding stochastic gradients still give unbiased estimates for true gradients . Moreover , we have used either full-batch GD or standard mini-batch SGD in our experiments : see App . F for details . Define : â ( k ) r = a ( k ) r σa , ŵ ( k ) r = w ( k ) r σw , η̂a = ηa σ2a , η̂w = ηw σ2w . ( 3 ) Then the dynamics transforms to : ∆θ̂ ( k ) r = η̂θ ∂ ` ( y ( k ) θ , f ( x ( k ) θ ; σaâ , σwŴ ) ) ∂θ̂r , ( x ( k ) θ , y ( k ) θ ) ∼ D , ( 4 ) while scaled initial conditions become : â ( 0 ) r ∼ N ( 0 , 1 ) , ŵ ( 0 ) r ∼ N ( 0 , I ) ∀r = 1 . . . d. By expanding gradients , we get the following : ∆â ( k ) r = −η̂aσa∇ ( k ) fd ` ( x ( k ) a , y ( k ) a ) φ ( σwŵ ( k ) , T r x ( k ) a ) , â ( 0 ) r ∼ N ( 0 , 1 ) , ( 5 ) ∆ŵ ( k ) r = −η̂wσaσw∇ ( k ) fd ` ( x ( k ) w , y ( k ) w ) â ( k ) r φ ′ ( . . . ) x ( k ) w , ŵ ( 0 ) r ∼ N ( 0 , I ) , ( 6 ) ∇ ( k ) fd ` ( x , y ) = ∂ ` ( y , z ) ∂z ∣∣∣∣ z=f ( k ) d ( x ) = −y 1 + exp ( f ( k ) d ( x ) y ) , f ( k ) d ( x ) = σa d∑ r=1 â ( k ) r φ ( σwŵ ( k ) , T r x ) . Without loss of generality assume σw = 1 ( we can rescale inputs x otherwise ) . We shall omit a subscript of σa from now on . Assume hyperparameters that drive the dynamics obey power-law dependence on d : σ ( d ) = σ∗ × ( d/d∗ ) qσ , η̂a ( d ) = η̂∗a × ( d/d∗ ) q̃a , η̂w ( d ) = η̂∗w × ( d/d∗ ) q̃w . ( 7 ) Given this , a network of width d∗ has hyperparameters σ∗ and η̂∗a∨w . Here and then we write `` a∨w '' meaning `` a or w '' . This assumption is quite natural : for He initialization ( He et al. , 2015 ) commonly used in practice σ ∝ d−1/2 , while we keep learning rates in the original parameterization constant while changing width by default : ηa∨w = const , which implies η̂a ∝ d and η̂w ∝ d0 . On the other hand , NTK scaling ( Jacot et al. , 2018 ; Lee et al. , 2019 ) requires scaled learning rates to be constants : η̂a∨w ∝ d0 . Scaling exponents ( qσ , q̃a , q̃w ) together with proportionality factors ( d∗ , σ∗ , η̂∗a , η̂ ∗ w ) define a limit model f ( k ) ∞ ( x ) = limd→∞ f ( k ) d ( x ) . We call a model `` dynamically stable in the limit of large width '' if it satisfies the following condition which we state formally in Appendix A : Condition 1 ( informal version of Condition 4 in Appendix A ) . Let ∆f ( k ) d ( x ) = f ( k+1 ) d ( x ) −f ( k ) d ( x ) . ∃kbalance ∈ N : ∀k ≥ kbalance ∆f ( k ) d fkbalanced stays finite for large d. Roughly speaking , this condition states that the change of logits after a single step is comparable to logits themselves . This means that the model learns . Note that this condition is weaker than the one used in Golikov ( 2020 ) , because it allows logits to vanish or diverge with width . Such situations are fine , because only logit signs matter for the binary classification . For simplicity assume q̃a = q̃w = q̃ . We prove the following in Appendix B.1 : Proposition 1 . Suppose q̃a = q̃w = q̃ and D is a continuous distribution . Then Condition 1 requires qσ + q̃ ∈ [ −1/2 , 0 ] to hold . This statement gives a necessary condition for growth rates of σ and η̂ to lead to a well-defined limit model evolution . This condition corresponds to a band in ( qσ , q̃ ) -plane : see Figure 1 , left . We refer it as a `` band of dynamical stability '' . Each point of this band corresponds to a dynamically stable limit model evolution . We present several conditions that separate the dynamical stability band into regions . We then show that each region corresponds to a single limit model evolution . We start with defining tangent kernels . Since φ is smooth , we have : ∆f ( k ) d ( x ) = f ( k+1 ) d ( x ) − f ( k ) d ( x ) = d∑ r=1 ∂fd ( x ) ∂θ̂r ∣∣∣∣ θ̂r=θ̂ ( k ) r ∆θ̂ ( k ) r +Oη̂∗a∨w→0 ( η̂ ∗ aη̂ ∗ w + η̂ ∗,2 w ) = = −η̂∗a∇ ( k ) fd ` ( x ( k ) a , y ( k ) a ) K ( k ) a , d ( x , x ( k ) a ) − η̂∗w∇ ( k ) fd ` ( x ( k ) w , y ( k ) w ) K ( k ) w , d ( x , x ( k ) w ) +O ( η̂ ∗ aη̂ ∗ w+ η̂ ∗,2 w ) , ( 8 ) where we have defined kernels : K ( k ) a , d ( x , x ′ ) = ( d/d∗ ) q̃aσ2 d∑ r=1 φ ( ŵ ( k ) , Tr x ) φ ( ŵ ( k ) , T r x ′ ) , ( 9 ) K ( k ) w , d ( x , x ′ ) = ( d/d∗ ) q̃wσ2 d∑ r=1 |â ( k ) r |2φ′ ( ŵ ( k ) , Tr x ) φ′ ( ŵ ( k ) , Tr x′ ) xTx′ . ( 10 ) Here we deviate from the traditional definition of tangent kernels ( e.g . from Jacot et al . ( 2018 ) ) in embedding learning rate growth factors into kernels . This is done for avoiding 0 ×∞ ambiguity when η̂a∨w grows with d while σ vanishes so that `` a learning rate times a kernel '' stays finite . This is the case for the mean-field scaling : η̂a∨w ∝ d , while σ ∝ d−1 . While for the NTK scaling kernels stop evolving with k in the limit of large d , this is not the case generally . Indeed , for the mean-field scaling mentioned above we have : K ( k ) a , d ( x , x ′ ) = σ∗,2 ( d/d∗ ) −1 d∑ r=1 φ ( ŵ ( k ) , Tr x ) φ ( ŵ ( k ) , T r x ′ ) . ( 11 ) Similarly to the NTK case , the kernel above converges due to the Law of Large Numbers , however in contrast to the NTK case the weights evolve in the limit : ŵ ( k ) r 9 ŵ ( 0 ) r . This is due to the fact that weight increments are proportional to η̂wσ which is ∝ d0 for the mean-field scaling but ∝ d−1/2 for the NTK one . For this reason , similarly to model increments ∆f ( k ) d we define kernel increments : ∆K ( k ) a∨w , d ( x , x ′ ) = K ( k+1 ) a∨w , d ( x , x ′ ) −K ( k ) a∨w , d ( x , x ′ ) . ( 12 ) Condition 2 ( informal version of Condition 5 in Appendix A ) . Following conditions separate the band of dynamical stability ( Figure 1 , left ) : 1. f ( 0 ) d stays finite for large d. 2 . K ( 0 ) a∨w , d stays finite for large d. 3 . K ( 0 ) a∨w , d/f ( 0 ) d stays finite for large d. 4 . ∆K ( 0 ) a∨w , d/K ( 0 ) a∨w , d stays finite for large d. We prove the following in Appendix B.2 : Proposition 2 ( Separating conditions ) . Given Condition 1 , Condition 2 reads as , point by point : 1 . A limit model at initialization is finite : qσ + 1/2 = 0 . 2 . Tangent kernels at initialization are finite : 2qσ + q̃ + 1 = 0 . 3 . Tangent kernels and a limit model are of the same order at initialization : qσ + q̃ + 1/2 = 0 . 4 . Tangent kernels start to evolve : qσ + q̃ = 0 . We have also checked this Proposition numerically for limit models discussed below : see Figure 1 , right . Each condition corresponds to a straight line in the ( qσ , q̃ ) -plane : see Figure 1 , left . These four lines divide the well-definiteness band into 13 regions : three are two-dimensional , seven are onedimensional , and three are zero-dimensional . In Appendix C we show that each region corresponds to a single distinct limit model evolution ; we also list corresponding evolution equations . Note that a segment ( a one-dimensional region ) that corresponds to the Condition 2-2 exactly coincides with a family of `` intermediate scalings '' introduced in Golikov ( 2020 ) . | The paper analyzes joint scalings of the parameter initialization and the learning rate, with respect to the limit of infinite width, in the context of two-layer neural networks with stochastic gradient descent and binary logistic loss. It proposes some “dynamically stable” conditions and identifies a range of scalings that satisfy these conditions. This covers the neural tangent kernel (NTK) and mean field (MF) scalings, as well as others. The paper then proposes to add an extra correction function to the initialization of the MF limit and argues experimentally that this correction can give a proxy for standard neural networks. | SP:df86cedbf3a09f5d07380bcc99ee1674758a309b |
Dynamically Stable Infinite-Width Limits of Neural Classifiers | 1 INTRODUCTION . For a couple of decades neural networks have proved to be useful in a variety of applications . However , their theoretical understanding is still lacking . Several recent works have tried to simplify the object of study by approximating a training dynamics of a finite-width neural network with its limit counterpart in the limit of a large number of hidden units ; we refer it as an `` infinite-width '' limit . The exact type of the limit training dynamics depends on how hyperparameters of the training dynamics scale with width . In particular , two different types of limit models have been already extensively discussed in the literature : an NTK model ( Jacot et al. , 2018 ) and a mean-field limit model ( Mei et al. , 2018 ; 2019 ; Rotskoff & Vanden-Eijnden , 2019 ; Sirignano & Spiliopoulos , 2020 ; Chizat & Bach , 2018 ; Yarotsky , 2018 ) . A recent work ( Golikov , 2020 ) attempted to provide a link between these two different types of limit models by building a framework for choosing a scaling of hyperparameters that lead to a `` well-defined '' limit model . Our work is the next step in this direction . We study infinite-width limits for networks with a single hidden layer trained to minimize cross-entropy loss with gradient descent . Our contributions are following . 1 . We develop a framework for reasoning about scaling of hyperparameters , which allows one to infer scaling parameters that allow for a dynamically stable model evolution in the limit of infinite width . This framework allows us to derive both mean-field and NTK limits that have been extensively studied in the literature , as well as the `` intermediate limit '' introduced in Golikov ( 2020 ) . 2 . Our framework demonstrates that there are only 13 distinct stable model evolution equations in the limit of infinite width that can be induced by scaling hyperparameters of a finite-width model . Each distinct limit model corresponds to a region ( two- , one- , or zero-dimensional ) of a green band of the Figure 1 , left . 3 . We consider a list of properties that are statisfied by the evolution of finite-width models , but not generally are for its infinite-width limits . We demonstrate that mean-field and NTK limit models , as well as `` sym-default '' limit model which was not discussed in the literature previously , are special in the sense that they satisfy most of these properties among all limit models induced by hyperparameter scalings . We propose a model modification that allows for all of these properties in the limit of infinite width and call the corresponding limit `` initialization-corrected mean-field limit ( IC-MF ) '' . 4 . We discuss the ability of limit models to approximate the training dynamics of finite-width ones . We show that our proposed IC-MF limiting model is the best among all other possible limit models . While our present analysis is restricted to networks with a single hidden layer , we discuss a high-level plan for generalizing it to deep nets , as well as an expected outcome of this research program , in App . H . 2 TRAINING A ONE HIDDEN LAYER NET WITH SGD . Here we consider training a one hidden layer net fd with d hidden units with SGD . We assume the hyperparameters , namely , initialization variances and learning rates , are scaled as power-laws of d. Each scaling induces a limit model f∞ = limd→∞ fd . We present a notion of dynamical stability , which states that the change of logits after a single gradient step is comparable to logits themselves . We derive a necessary condition for dynamical stability in terms of the power-law exponents of hyperparameters . We then present a list of conditions that divide the class of scalings into 13 subclasses ; each subclass corresponds to a unique distinct limit model . Consider a one hidden layer network : f ( x ; a , W ) = aTφ ( WTx ) = d∑ r=1 arφ ( w T r x ) , ( 1 ) where x ∈ Rdx , W = [ w1 , . . . , wd ] ∈ Rdx×d , and a = [ a1 , . . . , ad ] T ∈ Rd . We assume a nonlinearity to be real analytic and asymptotically linear : φ ( z ) = Θz→∞ ( z ) . Such a nonlinearity can be , e.g . `` leaky softplus '' : φ ( z ) = ln ( 1 + ez ) − α ln ( 1 + e−z ) for α > 0 . This is a technical assumption introduced to simplify proofs . Note that we have used traditional leaky ReLUs in our experiments : see App . F for details . We assume the loss function ` ( y , z ) to be the standard binary cross-entropy loss : ` ( y , z ) = ln ( 1 + e−yz ) , where labels y ∈ { −1 , 1 } . The data distribution loss is defined as L ( a , W ) = E x , y∼D ` ( y , f ( x ; a , W ) ) . We assume that the data distribution D does not depend on width d. Weights are initialized with isotropic gaussians with zero means : w ( 0 ) r ∼ N ( 0 , σ2wI ) , a ( 0 ) r ∼ N ( 0 , σ2a ) ∀r = 1 . . . d. The evolution of weights is driven by the stochastic gradient descent ( SGD ) : ∆θ ( k ) = θ ( k+1 ) − θ ( k ) = −ηθ ∂ ` ( y ( k ) θ , f ( x ( k ) θ ; a , W ) ) ∂θ , ( x ( k ) θ , y ( k ) θ ) ∼ D , ( 2 ) where θ is either a or W . We assume that gradients for a and W are estimated using independent data samples ( x ( k ) a , y ( k ) a ) and ( x ( k ) w , y ( k ) w ) . While this assumption is indeed non-standard , we note that corresponding stochastic gradients still give unbiased estimates for true gradients . Moreover , we have used either full-batch GD or standard mini-batch SGD in our experiments : see App . F for details . Define : â ( k ) r = a ( k ) r σa , ŵ ( k ) r = w ( k ) r σw , η̂a = ηa σ2a , η̂w = ηw σ2w . ( 3 ) Then the dynamics transforms to : ∆θ̂ ( k ) r = η̂θ ∂ ` ( y ( k ) θ , f ( x ( k ) θ ; σaâ , σwŴ ) ) ∂θ̂r , ( x ( k ) θ , y ( k ) θ ) ∼ D , ( 4 ) while scaled initial conditions become : â ( 0 ) r ∼ N ( 0 , 1 ) , ŵ ( 0 ) r ∼ N ( 0 , I ) ∀r = 1 . . . d. By expanding gradients , we get the following : ∆â ( k ) r = −η̂aσa∇ ( k ) fd ` ( x ( k ) a , y ( k ) a ) φ ( σwŵ ( k ) , T r x ( k ) a ) , â ( 0 ) r ∼ N ( 0 , 1 ) , ( 5 ) ∆ŵ ( k ) r = −η̂wσaσw∇ ( k ) fd ` ( x ( k ) w , y ( k ) w ) â ( k ) r φ ′ ( . . . ) x ( k ) w , ŵ ( 0 ) r ∼ N ( 0 , I ) , ( 6 ) ∇ ( k ) fd ` ( x , y ) = ∂ ` ( y , z ) ∂z ∣∣∣∣ z=f ( k ) d ( x ) = −y 1 + exp ( f ( k ) d ( x ) y ) , f ( k ) d ( x ) = σa d∑ r=1 â ( k ) r φ ( σwŵ ( k ) , T r x ) . Without loss of generality assume σw = 1 ( we can rescale inputs x otherwise ) . We shall omit a subscript of σa from now on . Assume hyperparameters that drive the dynamics obey power-law dependence on d : σ ( d ) = σ∗ × ( d/d∗ ) qσ , η̂a ( d ) = η̂∗a × ( d/d∗ ) q̃a , η̂w ( d ) = η̂∗w × ( d/d∗ ) q̃w . ( 7 ) Given this , a network of width d∗ has hyperparameters σ∗ and η̂∗a∨w . Here and then we write `` a∨w '' meaning `` a or w '' . This assumption is quite natural : for He initialization ( He et al. , 2015 ) commonly used in practice σ ∝ d−1/2 , while we keep learning rates in the original parameterization constant while changing width by default : ηa∨w = const , which implies η̂a ∝ d and η̂w ∝ d0 . On the other hand , NTK scaling ( Jacot et al. , 2018 ; Lee et al. , 2019 ) requires scaled learning rates to be constants : η̂a∨w ∝ d0 . Scaling exponents ( qσ , q̃a , q̃w ) together with proportionality factors ( d∗ , σ∗ , η̂∗a , η̂ ∗ w ) define a limit model f ( k ) ∞ ( x ) = limd→∞ f ( k ) d ( x ) . We call a model `` dynamically stable in the limit of large width '' if it satisfies the following condition which we state formally in Appendix A : Condition 1 ( informal version of Condition 4 in Appendix A ) . Let ∆f ( k ) d ( x ) = f ( k+1 ) d ( x ) −f ( k ) d ( x ) . ∃kbalance ∈ N : ∀k ≥ kbalance ∆f ( k ) d fkbalanced stays finite for large d. Roughly speaking , this condition states that the change of logits after a single step is comparable to logits themselves . This means that the model learns . Note that this condition is weaker than the one used in Golikov ( 2020 ) , because it allows logits to vanish or diverge with width . Such situations are fine , because only logit signs matter for the binary classification . For simplicity assume q̃a = q̃w = q̃ . We prove the following in Appendix B.1 : Proposition 1 . Suppose q̃a = q̃w = q̃ and D is a continuous distribution . Then Condition 1 requires qσ + q̃ ∈ [ −1/2 , 0 ] to hold . This statement gives a necessary condition for growth rates of σ and η̂ to lead to a well-defined limit model evolution . This condition corresponds to a band in ( qσ , q̃ ) -plane : see Figure 1 , left . We refer it as a `` band of dynamical stability '' . Each point of this band corresponds to a dynamically stable limit model evolution . We present several conditions that separate the dynamical stability band into regions . We then show that each region corresponds to a single limit model evolution . We start with defining tangent kernels . Since φ is smooth , we have : ∆f ( k ) d ( x ) = f ( k+1 ) d ( x ) − f ( k ) d ( x ) = d∑ r=1 ∂fd ( x ) ∂θ̂r ∣∣∣∣ θ̂r=θ̂ ( k ) r ∆θ̂ ( k ) r +Oη̂∗a∨w→0 ( η̂ ∗ aη̂ ∗ w + η̂ ∗,2 w ) = = −η̂∗a∇ ( k ) fd ` ( x ( k ) a , y ( k ) a ) K ( k ) a , d ( x , x ( k ) a ) − η̂∗w∇ ( k ) fd ` ( x ( k ) w , y ( k ) w ) K ( k ) w , d ( x , x ( k ) w ) +O ( η̂ ∗ aη̂ ∗ w+ η̂ ∗,2 w ) , ( 8 ) where we have defined kernels : K ( k ) a , d ( x , x ′ ) = ( d/d∗ ) q̃aσ2 d∑ r=1 φ ( ŵ ( k ) , Tr x ) φ ( ŵ ( k ) , T r x ′ ) , ( 9 ) K ( k ) w , d ( x , x ′ ) = ( d/d∗ ) q̃wσ2 d∑ r=1 |â ( k ) r |2φ′ ( ŵ ( k ) , Tr x ) φ′ ( ŵ ( k ) , Tr x′ ) xTx′ . ( 10 ) Here we deviate from the traditional definition of tangent kernels ( e.g . from Jacot et al . ( 2018 ) ) in embedding learning rate growth factors into kernels . This is done for avoiding 0 ×∞ ambiguity when η̂a∨w grows with d while σ vanishes so that `` a learning rate times a kernel '' stays finite . This is the case for the mean-field scaling : η̂a∨w ∝ d , while σ ∝ d−1 . While for the NTK scaling kernels stop evolving with k in the limit of large d , this is not the case generally . Indeed , for the mean-field scaling mentioned above we have : K ( k ) a , d ( x , x ′ ) = σ∗,2 ( d/d∗ ) −1 d∑ r=1 φ ( ŵ ( k ) , Tr x ) φ ( ŵ ( k ) , T r x ′ ) . ( 11 ) Similarly to the NTK case , the kernel above converges due to the Law of Large Numbers , however in contrast to the NTK case the weights evolve in the limit : ŵ ( k ) r 9 ŵ ( 0 ) r . This is due to the fact that weight increments are proportional to η̂wσ which is ∝ d0 for the mean-field scaling but ∝ d−1/2 for the NTK one . For this reason , similarly to model increments ∆f ( k ) d we define kernel increments : ∆K ( k ) a∨w , d ( x , x ′ ) = K ( k+1 ) a∨w , d ( x , x ′ ) −K ( k ) a∨w , d ( x , x ′ ) . ( 12 ) Condition 2 ( informal version of Condition 5 in Appendix A ) . Following conditions separate the band of dynamical stability ( Figure 1 , left ) : 1. f ( 0 ) d stays finite for large d. 2 . K ( 0 ) a∨w , d stays finite for large d. 3 . K ( 0 ) a∨w , d/f ( 0 ) d stays finite for large d. 4 . ∆K ( 0 ) a∨w , d/K ( 0 ) a∨w , d stays finite for large d. We prove the following in Appendix B.2 : Proposition 2 ( Separating conditions ) . Given Condition 1 , Condition 2 reads as , point by point : 1 . A limit model at initialization is finite : qσ + 1/2 = 0 . 2 . Tangent kernels at initialization are finite : 2qσ + q̃ + 1 = 0 . 3 . Tangent kernels and a limit model are of the same order at initialization : qσ + q̃ + 1/2 = 0 . 4 . Tangent kernels start to evolve : qσ + q̃ = 0 . We have also checked this Proposition numerically for limit models discussed below : see Figure 1 , right . Each condition corresponds to a straight line in the ( qσ , q̃ ) -plane : see Figure 1 , left . These four lines divide the well-definiteness band into 13 regions : three are two-dimensional , seven are onedimensional , and three are zero-dimensional . In Appendix C we show that each region corresponds to a single distinct limit model evolution ; we also list corresponding evolution equations . Note that a segment ( a one-dimensional region ) that corresponds to the Condition 2-2 exactly coincides with a family of `` intermediate scalings '' introduced in Golikov ( 2020 ) . | This paper proposed a general framework to derive different stable limiting behaviors of the dynamics of two-layers neural networks, under different parameterization of the hyper-parameters. For certain choices of hyper-parameters, this recovers the mean-field limit and the NTK limit. This paper also proposed certain properties of the limiting dynamics and showed that using these properties as the classification criteria, there are only a finite number of distinct models in the limit. This paper also proposed a novel initialization-corrected mean-field limit that satisfies all properties. | SP:df86cedbf3a09f5d07380bcc99ee1674758a309b |
Alpha Net: Adaptation with Composition in Classifier Space | Deep learning classification models typically train poorly on classes with small numbers of examples . Motivated by the human ability to solve this task , models have been developed that transfer knowledge from classes with many examples to learn classes with few examples . Critically , the majority of these models transfer knowledge within model feature space . In this work , we demonstrate that transferring knowledge within classifier space is more effective and efficient . Specifically , by linearly combining strong nearest neighbor classifiers along with a weak classifier , we are able to compose a stronger classifier . Uniquely , our model can be implemented on top of any existing classification model that includes a classifier layer . We showcase the success of our approach in the task of long-tailed recognition , whereby the classes with few examples , otherwise known as the “ tail ” classes , suffer the most in performance and are the most challenging classes to learn . Using classifier-level knowledge transfer , we are able to drastically improve - by a margin as high as 10.5 % - the state-of-the-art performance on the “ tail ” categories . 1 INTRODUCTION . The computer vision field has made rapid progress in the area of object recognition due to several factors : complex architectures , larger compute power , more data , and better learning strategies . However , the standard method to train recognition models on new classes still relies on training using large sets of examples . This dependence on large scale data has made learning from few samples a natural challenge . Highlighting this point , new tasks such as low-shot learning and longtailed learning , have recently become common within computer vision . Many approaches to learning from small numbers of examples are inspired by human learning . In particular , humans are able to learn new concepts quickly and efficiently over only a few samples . The overarching theory is that humans are able to transfer their knowledge from previous experiences to bootstrap their new learning task ( Lake et al. , 2017 ; 2015 ; Gopnik & Sobel , 2000 ) . Inherent in these remarkable capabilities are two related questions : what knowledge is being transferred and how is this knowledge being transferred ? Within computer vision , recent low-shot learning and long-tailed recognition models answer these questions by treating visual “ representations ” as the knowledge structures that are being transferred . As such , the knowledge transfer methods implemented in these models transfer learned features from known classes learned from large data to the learning of new classes with low data ( Liu et al. , 2019 ; Yin et al. , 2019 ) . These models exemplify the broader assumption that , in both human and computer vision , knowledge transfer occurs within model representation and feature space ( Lake et al. , 2015 ) . In contrast , we claim that previously learned information is more concisely captured in classifier space . This inference is based on the fact that sample representation is unique to that sample , but classifiers are fitted for all the samples in a given class . The success of working within classifier space to improve certain classifiers has been established in several papers ( Elhoseiny et al. , 2013 ; Qi et al. , 2018 ) , where the models are able to directly predict classifiers from features or create new models entirely by learning other models . Other non-deep learning models use classifiers learnt with abundant data to generate novel classifiers ( Aytar & Zisserman , 2011 ; 2012 ) . ΘW a Figure 1 : A classifier space depicting how Alpha Net adaptively adjusts weak classifiers through nearest neighbor compositions . Despite these successes , the concept of learning within classifier space is not as common in deep learning models . We suggest that transfer learning can , likewise , be implemented in the classifier space of deep learning models . Specifically , we combine known , strong classifiers ( i.e. , learned with large datasets ) with weak classifiers ( i.e. , learned with small datasets ) to improve our weak classifiers . Our classifier space method is illustrated in Figure 1 . In this toy example demonstrating our method , we are given n classifiers Ci trained with large data and a weak classifier a , which was trained for a class with very few samples . Our goal is to combine the most relevant strong classifiers to adaptively adjust and improve a . Our method implements this approach in the simplest way possible . To select the most effective strong classifiers to combine , we take the target ’ s a nearest neighbor classifiers . Given the appropriate nearest neighbor classifiers , the challenge becomes how to combine these strong classifiers with the target weak classifier so as to improve its performance given no further samples . We address this challenge using what we view as the most natural approach - creating a new classifier by linearly combining the nearest neighbor classifiers and the original weak classifier . Embedded in this solution is the further challenge of choosing a strategy for computing the combination coefficients . We propose learning the coefficients of the linear combination through another neural network , which we refer to as “ Alpha Net ” . As compared to many other approaches to learning from small numbers of examples , our methodology has three characteristics : 1 . Our approach can be implemented on top of any architecture . This is because the Alpha Net does not need to re-learn representations and only operates within classifier space to improve weak classifiers . As a result , our approach is agnostic to the type of architecture used to learn the classifiers ; it merely provides a systematic method for combining classifiers . 2 . Our approach demonstrates the importance of combining not only the most relevant classifiers but also the original classifier . In the absence of the original classifier , any combination of classifiers becomes a possible solution , without being constrained by the initial classifier . 3 . Our approach creates for every target class a completely different set of linear coefficients for our new classifier composition . In this manner , we are learning our coefficients in a more adaptive way , which is extremely difficult to achieve through classical methods . To illustrate the efficacy of our method , we apply it to the task of long-tailed recognition . “ Longtailed ” refers to a data distribution in which there is a realistic distribution of classes with many examples ( head classes ) and classes with few examples ( tail classes ) . We compare our Alpha Net method to recent state-of-the-art models Kang et al . ( 2020 ) on two long-tailed datasets : ImageNetLT and Places-LT . Critically , we are able to improve the tail classifiers accuracy by as much as 10.5 % . 2 RELATED WORK . Creating , modifying , and learning model weights are concepts that are seen in many earlier models . In particular , these concepts appear frequently in transfer learning , meta-learning , low-shot learning , and long-tailed learning . Classifier Creation The process of creating new classifiers is captured within meta-learning concepts such as learning-to-learn , transfer learning , and multi-task learning ( Thrun & Pratt , 2012 ; Schmidhuber et al. , 1997 ; Pan & Yang , 2009 ; Caruana , 1997 ; Santoro et al. , 2016 ) . These approaches generalize to novel tasks by learning shared information from a set of related tasks . Many studies find that shared information is embedded within model weights , and , thus , aim to learn structure within learned models to directly modify another network ’ s weights ( Schmidhuber , 1987 ; 1992 ; 1993 ; Bertinetto et al. , 2016 ; Ha et al. , 2016 ; Finn et al. , 2017 ; Rebuffi et al. , 2017 ; Sinha et al. , 2017 ; Munkhdalai & Yu , 2017 ) . Other studies go even further and instead of modifying networks , they create entirely new networks from training samples only ( Socher et al. , 2013 ; Lei Ba et al. , 2015 ; Noh et al. , 2016 ) . However , our method only combines existing classifiers , without having to create new classifiers or networks from scratch . Classifier or Feature Composition In various classical approaches , there has been work that learns better embedding spaces for image annotation ( Weston et al. , 2010 ) or uses classification scores as useful features ( Wang et al. , 2009 ) . However , they do not attempt to compose classifiers nor do they address the long-tail problem . Within non-deep methods in classic transfer learning , there have been attempts of using and combining SVMs . In Tsochantaridis et al . ( 2005 ) , SVMs are trained per object instance and a hierarchical structure is required for combination in the datasets of interest . Such a structure is typically not guaranteed nor provided in our long-tail datasets . Additional SVM work uses regularized minimization to learn the coefficients necessary to combine patches from other classifiers ( Aytar & Zisserman , 2012 ) . While conceptually similar to Alpha Net , our method has an additional advantage of learning the compositional coefficients in a more adaptive way . Specifically , different novel classes will have their own sets of alphas , and similar novel classes will naturally have similar sets of alphas . Learning such varying sets of alphas is difficult in previous classical approaches . They either learn a fixed set of alphas for all of the novel classes or are forced to introduce more complex group sparsity-like constraints . Finally , in zero-shot learning there exist methods which compose classifiers of known visual concepts to learn a completely new classifier ( Elhoseiny et al. , 2013 ; Misra et al. , 2017 ; Lei Ba et al. , 2015 ; Changpinyo et al. , 2016 ) . However , such composition is often guided by additional attribute supervision or textual description , which Alpha Net does not depend on . Learning Transformations Between Models and Classes Other studies have demonstrated different ways of learning transformations to modify model weights in an attempt to learn these transformations during stochastic gradient descent ( SGD ) optimization ( Andrychowicz et al. , 2016 ; Ravi & Larochelle , 2017 ) . Additionally , Wang & Hebert ( 2016 ) empirically show the existence of a generic nonlinear transformation from small-sample to large-sample models for different types of feature spaces and classifier models . Finally , Du et al . ( 2017 ) provide theoretical guarantees on performance when one learns the transformation going from the source function to a related target function . In our work , we are also inferring that our target classifier is a transformation from a set of source classifiers . Low-shot Learning Meta-learning , transfer learning , and learning-to-learn are frequently applied to the domain of low-shot learning ( Fei-Fei et al. , 2006 ; Koch et al. , 2015 ; Lake et al. , 2015 ; Santoro et al. , 2016 ; Wang & Hebert , 2016 ; Li & Hoiem , 2017 ; Hariharan & Girshick , 2017 ; Bromley et al. , 1994 ; Koch et al. , 2015 ; Snell et al. , 2017 ; George et al. , 2017 ; Wang et al. , 2017 ; Akata et al. , 2015 ) . Many prior studies have attempted to transfer knowledge from tasks with abundant data to completely novel tasks ( Vinyals et al. , 2016 ; Ravi & Larochelle , 2017 ; Bertinetto et al. , 2016 ) . However , the explicit nature of low-shot learning consisting of tasks with small fixed samples means that these approaches do not generalize well beyond the arbitrary few tasks . This is indeed a significant problem as the visual world very clearly involves a wide set of tasks with continuously varying amounts of information . Long-tailed Learning The restrictions on low-shot learning have directly led to a new paradigm referred to as “ long-tailed ” learning , where data samples are continuously decreasing and the data distribution closely models that of the visual world . Recent work has approached long-tailed recognition by re-balancing the samples in different stages of model training ( Cao et al. , 2019 ) . One other study attempts to transfer features from common classes to rare classes ( Liu et al. , 2019 ) or transfer intra-class variance ( Yin et al. , 2019 ) . However , both these approaches to knowledge transfer require complex architectures , such as a specialized attention mechanism and memory models as in Liu et al . ( 2019 ) . While most studies have largely focused on representation space transferability , recent work explores the potential of operating in classifier space ( Kang et al. , 2020 ) . Results suggest that decoupling model representation learning and classifier learning is actually a more efficient way to approach long-tailed learning . Specifically , normalizing classifiers and adjusting classifiers only with re-sampling strategies are able to achieve good performance . Their success in working only with classifiers supports our general concept that combining strong classifiers is a natural and direct way to improve upon weak classifiers . | This paper addresses the well-known long-tail classification problem. The argument made here is that most of the existing methods attempt to transfer knowledge in the feature space, which is true. Based on this motivation, the paper proposes a method to do the knowledge transfer in the model space instead. The idea is to apply K-NN method in the model space to pick up a group of strong classifiers trained on the head classes with sufficient training samples available that are closest to a weak classifier in the model space and then a linear combination of the group of strong classifiers and the weak classifier to form a stronger classifier to the tail classes where only few samples are available for training; the linear combination weights are learned from a simple neural network, called Alpha Net. Two datasets artificially truncated from ImageNet and Places, respectively, that were also used in the peer work in the literature, were used to report the evaluations. | SP:e8386ff9f69f7ffae3bf7fe122d61ef7b81fd425 |
Alpha Net: Adaptation with Composition in Classifier Space | Deep learning classification models typically train poorly on classes with small numbers of examples . Motivated by the human ability to solve this task , models have been developed that transfer knowledge from classes with many examples to learn classes with few examples . Critically , the majority of these models transfer knowledge within model feature space . In this work , we demonstrate that transferring knowledge within classifier space is more effective and efficient . Specifically , by linearly combining strong nearest neighbor classifiers along with a weak classifier , we are able to compose a stronger classifier . Uniquely , our model can be implemented on top of any existing classification model that includes a classifier layer . We showcase the success of our approach in the task of long-tailed recognition , whereby the classes with few examples , otherwise known as the “ tail ” classes , suffer the most in performance and are the most challenging classes to learn . Using classifier-level knowledge transfer , we are able to drastically improve - by a margin as high as 10.5 % - the state-of-the-art performance on the “ tail ” categories . 1 INTRODUCTION . The computer vision field has made rapid progress in the area of object recognition due to several factors : complex architectures , larger compute power , more data , and better learning strategies . However , the standard method to train recognition models on new classes still relies on training using large sets of examples . This dependence on large scale data has made learning from few samples a natural challenge . Highlighting this point , new tasks such as low-shot learning and longtailed learning , have recently become common within computer vision . Many approaches to learning from small numbers of examples are inspired by human learning . In particular , humans are able to learn new concepts quickly and efficiently over only a few samples . The overarching theory is that humans are able to transfer their knowledge from previous experiences to bootstrap their new learning task ( Lake et al. , 2017 ; 2015 ; Gopnik & Sobel , 2000 ) . Inherent in these remarkable capabilities are two related questions : what knowledge is being transferred and how is this knowledge being transferred ? Within computer vision , recent low-shot learning and long-tailed recognition models answer these questions by treating visual “ representations ” as the knowledge structures that are being transferred . As such , the knowledge transfer methods implemented in these models transfer learned features from known classes learned from large data to the learning of new classes with low data ( Liu et al. , 2019 ; Yin et al. , 2019 ) . These models exemplify the broader assumption that , in both human and computer vision , knowledge transfer occurs within model representation and feature space ( Lake et al. , 2015 ) . In contrast , we claim that previously learned information is more concisely captured in classifier space . This inference is based on the fact that sample representation is unique to that sample , but classifiers are fitted for all the samples in a given class . The success of working within classifier space to improve certain classifiers has been established in several papers ( Elhoseiny et al. , 2013 ; Qi et al. , 2018 ) , where the models are able to directly predict classifiers from features or create new models entirely by learning other models . Other non-deep learning models use classifiers learnt with abundant data to generate novel classifiers ( Aytar & Zisserman , 2011 ; 2012 ) . ΘW a Figure 1 : A classifier space depicting how Alpha Net adaptively adjusts weak classifiers through nearest neighbor compositions . Despite these successes , the concept of learning within classifier space is not as common in deep learning models . We suggest that transfer learning can , likewise , be implemented in the classifier space of deep learning models . Specifically , we combine known , strong classifiers ( i.e. , learned with large datasets ) with weak classifiers ( i.e. , learned with small datasets ) to improve our weak classifiers . Our classifier space method is illustrated in Figure 1 . In this toy example demonstrating our method , we are given n classifiers Ci trained with large data and a weak classifier a , which was trained for a class with very few samples . Our goal is to combine the most relevant strong classifiers to adaptively adjust and improve a . Our method implements this approach in the simplest way possible . To select the most effective strong classifiers to combine , we take the target ’ s a nearest neighbor classifiers . Given the appropriate nearest neighbor classifiers , the challenge becomes how to combine these strong classifiers with the target weak classifier so as to improve its performance given no further samples . We address this challenge using what we view as the most natural approach - creating a new classifier by linearly combining the nearest neighbor classifiers and the original weak classifier . Embedded in this solution is the further challenge of choosing a strategy for computing the combination coefficients . We propose learning the coefficients of the linear combination through another neural network , which we refer to as “ Alpha Net ” . As compared to many other approaches to learning from small numbers of examples , our methodology has three characteristics : 1 . Our approach can be implemented on top of any architecture . This is because the Alpha Net does not need to re-learn representations and only operates within classifier space to improve weak classifiers . As a result , our approach is agnostic to the type of architecture used to learn the classifiers ; it merely provides a systematic method for combining classifiers . 2 . Our approach demonstrates the importance of combining not only the most relevant classifiers but also the original classifier . In the absence of the original classifier , any combination of classifiers becomes a possible solution , without being constrained by the initial classifier . 3 . Our approach creates for every target class a completely different set of linear coefficients for our new classifier composition . In this manner , we are learning our coefficients in a more adaptive way , which is extremely difficult to achieve through classical methods . To illustrate the efficacy of our method , we apply it to the task of long-tailed recognition . “ Longtailed ” refers to a data distribution in which there is a realistic distribution of classes with many examples ( head classes ) and classes with few examples ( tail classes ) . We compare our Alpha Net method to recent state-of-the-art models Kang et al . ( 2020 ) on two long-tailed datasets : ImageNetLT and Places-LT . Critically , we are able to improve the tail classifiers accuracy by as much as 10.5 % . 2 RELATED WORK . Creating , modifying , and learning model weights are concepts that are seen in many earlier models . In particular , these concepts appear frequently in transfer learning , meta-learning , low-shot learning , and long-tailed learning . Classifier Creation The process of creating new classifiers is captured within meta-learning concepts such as learning-to-learn , transfer learning , and multi-task learning ( Thrun & Pratt , 2012 ; Schmidhuber et al. , 1997 ; Pan & Yang , 2009 ; Caruana , 1997 ; Santoro et al. , 2016 ) . These approaches generalize to novel tasks by learning shared information from a set of related tasks . Many studies find that shared information is embedded within model weights , and , thus , aim to learn structure within learned models to directly modify another network ’ s weights ( Schmidhuber , 1987 ; 1992 ; 1993 ; Bertinetto et al. , 2016 ; Ha et al. , 2016 ; Finn et al. , 2017 ; Rebuffi et al. , 2017 ; Sinha et al. , 2017 ; Munkhdalai & Yu , 2017 ) . Other studies go even further and instead of modifying networks , they create entirely new networks from training samples only ( Socher et al. , 2013 ; Lei Ba et al. , 2015 ; Noh et al. , 2016 ) . However , our method only combines existing classifiers , without having to create new classifiers or networks from scratch . Classifier or Feature Composition In various classical approaches , there has been work that learns better embedding spaces for image annotation ( Weston et al. , 2010 ) or uses classification scores as useful features ( Wang et al. , 2009 ) . However , they do not attempt to compose classifiers nor do they address the long-tail problem . Within non-deep methods in classic transfer learning , there have been attempts of using and combining SVMs . In Tsochantaridis et al . ( 2005 ) , SVMs are trained per object instance and a hierarchical structure is required for combination in the datasets of interest . Such a structure is typically not guaranteed nor provided in our long-tail datasets . Additional SVM work uses regularized minimization to learn the coefficients necessary to combine patches from other classifiers ( Aytar & Zisserman , 2012 ) . While conceptually similar to Alpha Net , our method has an additional advantage of learning the compositional coefficients in a more adaptive way . Specifically , different novel classes will have their own sets of alphas , and similar novel classes will naturally have similar sets of alphas . Learning such varying sets of alphas is difficult in previous classical approaches . They either learn a fixed set of alphas for all of the novel classes or are forced to introduce more complex group sparsity-like constraints . Finally , in zero-shot learning there exist methods which compose classifiers of known visual concepts to learn a completely new classifier ( Elhoseiny et al. , 2013 ; Misra et al. , 2017 ; Lei Ba et al. , 2015 ; Changpinyo et al. , 2016 ) . However , such composition is often guided by additional attribute supervision or textual description , which Alpha Net does not depend on . Learning Transformations Between Models and Classes Other studies have demonstrated different ways of learning transformations to modify model weights in an attempt to learn these transformations during stochastic gradient descent ( SGD ) optimization ( Andrychowicz et al. , 2016 ; Ravi & Larochelle , 2017 ) . Additionally , Wang & Hebert ( 2016 ) empirically show the existence of a generic nonlinear transformation from small-sample to large-sample models for different types of feature spaces and classifier models . Finally , Du et al . ( 2017 ) provide theoretical guarantees on performance when one learns the transformation going from the source function to a related target function . In our work , we are also inferring that our target classifier is a transformation from a set of source classifiers . Low-shot Learning Meta-learning , transfer learning , and learning-to-learn are frequently applied to the domain of low-shot learning ( Fei-Fei et al. , 2006 ; Koch et al. , 2015 ; Lake et al. , 2015 ; Santoro et al. , 2016 ; Wang & Hebert , 2016 ; Li & Hoiem , 2017 ; Hariharan & Girshick , 2017 ; Bromley et al. , 1994 ; Koch et al. , 2015 ; Snell et al. , 2017 ; George et al. , 2017 ; Wang et al. , 2017 ; Akata et al. , 2015 ) . Many prior studies have attempted to transfer knowledge from tasks with abundant data to completely novel tasks ( Vinyals et al. , 2016 ; Ravi & Larochelle , 2017 ; Bertinetto et al. , 2016 ) . However , the explicit nature of low-shot learning consisting of tasks with small fixed samples means that these approaches do not generalize well beyond the arbitrary few tasks . This is indeed a significant problem as the visual world very clearly involves a wide set of tasks with continuously varying amounts of information . Long-tailed Learning The restrictions on low-shot learning have directly led to a new paradigm referred to as “ long-tailed ” learning , where data samples are continuously decreasing and the data distribution closely models that of the visual world . Recent work has approached long-tailed recognition by re-balancing the samples in different stages of model training ( Cao et al. , 2019 ) . One other study attempts to transfer features from common classes to rare classes ( Liu et al. , 2019 ) or transfer intra-class variance ( Yin et al. , 2019 ) . However , both these approaches to knowledge transfer require complex architectures , such as a specialized attention mechanism and memory models as in Liu et al . ( 2019 ) . While most studies have largely focused on representation space transferability , recent work explores the potential of operating in classifier space ( Kang et al. , 2020 ) . Results suggest that decoupling model representation learning and classifier learning is actually a more efficient way to approach long-tailed learning . Specifically , normalizing classifiers and adjusting classifiers only with re-sampling strategies are able to achieve good performance . Their success in working only with classifiers supports our general concept that combining strong classifiers is a natural and direct way to improve upon weak classifiers . | This paper focuses on how to transfer knowledge between classes. The authors proposed to transfer classifiers instead of features. The proposed to linearly combine the classifiers from rich classes to construct more robust classifiers or rare classes. The combination weights are predicted from a learned neural network for each rare class. The experimental results on two benchmark datasets outperform some existing methods. | SP:e8386ff9f69f7ffae3bf7fe122d61ef7b81fd425 |
Are Graph Convolutional Networks Fully Exploiting the Graph Structure? | Graph Convolutional Networks ( GCNs ) represent the state-of-the-art for many graph related tasks . At every layer , GCNs rely on the graph structure to define an aggregation strategy where each node updates its representation by combining information from its neighbours . A known limitation of GCNs is their inability to infer long-range dependencies . In fact , as the number of layers increases , information gets smoothed and node embeddings become indistinguishable , negatively affecting performance . In this paper we formalize four levels of injection of graph structural information , and use them to analyze the importance of long-range dependencies . We then propose a novel regularization technique based on random walks with restart , called RWRReg , which encourages the network to encode long-range information into node embeddings . RWRReg does not require additional operations at inference time , is model-agnostic , and is further supported by our theoretical analysis connecting it to the Weisfeiler-Leman algorithm . Our experimental analysis , on both transductive and inductive tasks , shows that the lack of long-range structural information greatly affects the performance of state-ofthe-art models , and that the long-range information exploited by RWRReg leads to an average accuracy improvement of more than 5 % on all considered tasks . 1 INTRODUCTION . Graphs are a ubiquitous data representation of many real world phenomena , with applications ranging from social networks , to chemistry , biology , and recommendation systems ( Zhou et al. , 2018 ) . Graph Neural Networks ( GNNs ) are the generalization of deep learning for graph structured data , and have received a huge amount of attention from the research community . One class of GNN models , the Graph Convolutional Network ( GCN ) , has demonstrated to be extremely effective and is the current state-of-the-art for tasks such as graph classification , node classification , and link prediction . GCNs adopt a message passing mechanism where at each layer every node in the graph receives a message ( e.g . a feature vector ) from its 1-hop neighbours . The massages are then aggregated with a permutation invariant function ( e.g . by mean or sum ) and are used to update the node ’ s representation vector with a learnable , possibly non-linear , transformation . The final node embedding vectors are used to make predictions , and the whole process is trained end-to-end . Empirically , the best results are obtained when the message passing procedure is repeated 2 or 3 times , as a higher number of layers leads to over-smoothing ( Li et al. , 2018 ; Xu et al. , 2018b ) . Thus , GCNs are only leveraging the graph structure in the form of the 2-hop or 3-hop neighbourhood of each node . A direct consequence of this phenomenon is that GCNs are not capable of extracting and exploiting long-range dependencies between nodes . Random walks with restart ( Page et al. , 1998 ) have proven to be very effective at quantifying how closely related two nodes are ( Tong et al. , 2006 ) , regardless of their distance in the graph . In fact random walks with restart can capture the global structure of a graph , and have been used for many tasks including ranking , link prediction , and community detection ( Jin et al. , 2019 ) . On the other hand , random walks with restart do not consider node features , which are instead heavily exploited by GCNs . Combining GCNs and random walks with restart could then provide a powerful method to fully exploit the information contained in a graph . In this work we are not interested in defining new state-of-the-art results , or proposing novel GNN models . We focus on studying the impact of long-range dependencies , and identifying a first strategy , which can easily be applied to any existing model , to incorporate this information . Our Contribution . In more detail , we assess whether the injection of information on the graph structure that can not be captured by 2 or 3-hop neighbourhoods has a significant impact on the performance of several state-of-the-art GCN models . In this regard , our contributions are fourfold . Firstly , we propose and formalize four different levels of structural information injection . Secondly , we propose a novel and practical regularization strategy , Random Walk with Restart Regularization ( RWRReg ) , to inject structural information using random walks with restart , allowing GCNs to leverage long-range dependencies . RWRReg does not require additional operations at inference time , maintains the permutation-invariance of GCN models , and leads to an average 5 % increase in accuracy on both node classification , and graph classification . Thirdly , we prove a theoretical result linking random walks with restart and the Weisfeiler-Leman algorithm , providing a theoretical foundation for their use in GCNs . Fourthly , we test how the injection of structural information can impact the performance of 6 different GCN models on node classification , graph classification , and on the task of triangle counting . Results show that current state-of-the-art models lack the ability to extract long-range information , and this is severely affecting their performance . 2 INJECTING LONG-RANGE INFORMATION IN GCNS . To test if GCNs are missing on important information that is encoded in the structure of a graph , we inject additional structural information into existing GCN models , and test how the performance of these models changes in several graph related tasks . Intuitively , based on a model ’ s performance when injected with different levels of structural information , we can understand how much information is not captured by GCNs , and if this additional knowledge can improve performance on the considered tasks . In the rest of this section we present the notation used throughout the paper , the four levels of structural information injection that we consider , and an analytical result proving the effectiveness of using information from random walks with restart . 2.1 PRELIMINARIES . We use uppercase bold letters for matrices ( M ) , and lowercase bold letters for vectors ( v ) . We use plain letters with subscript indices to refer to a specific element of a matrix ( Mi , j ) , or of a vector ( vi ) . We refer to the vector containing the i-th row of a matrix with the subscript “ i , : ” ( Mi , : ) , while we refer to the i-th column with the subscript “ : , i ” ( M : ,i ) . For a graph G = ( V , E ) , where V = { 1 , .. , n } is the set of nodes and E ⊆ V × V is the set of edges , the input is given by a tuple ( X , A ) . X is an n × d matrix where the i-th row contains the d-dimensional feature vector of the i-th node , and A is the n × n adjacency matrix . For the sake of clarity we restrict our presentation to undirected graphs , but similar concepts can be applied to directed graphs . 2.2 STRUCTURAL INFORMATION INJECTION . We consider four different levels of structural information injection , briefly described below . We remark that not all the injection strategies presented in this section are made for practical use , as the scope of these strategies is to help us understand the importance of missing structural information . In particular , in Section 4 we study the impact of the different types of structural information injection , and hence quantify the information that is not exploited by current GCN models . We then discuss scalability and practicality aspects in Section 5 . Adjacency Matrix . We concatenate each node ’ s adjacency matrix row to its feature vector . This explicitly empowers the GCN model with the connectivity of each node , and allows for higher level structural reasoning when considering a neighbourhood ( the model will have access to the connectivity of the whole neighbourhood when aggregating messages from neighbouring nodes ) . Random Walk with Restart ( RWR ) Matrix . We perform random walks with restart ( RWR ) ( Page et al. , 1998 ) from each node v , thus obtaining a n-dimensional vector ( for each node ) that gives a score of how much v is “ related ” to each other node in the graph . We concatenate this vector of RWR features to each node ’ s feature vector . The choice of RWR is motivated by their capability to capture the relevance between two nodes in a graph ( Tong et al. , 2006 ) , and by the possibility to modulate the exploration of long-range dependencies by changing the restart probability . Intuitively , if a RWR starting at node v is very likely to visit a node u ( e.g . there are multiple paths that connect the two ) , then there will be a high score in the RWR vector for v at position u . This gives the GCN model higher level information about the structure of the graph that goes beyond the 1- hop neighbourhood of each node , and , again , it allows for high level reasoning on neighbourhood connectivity . RWR Regularization . We define a novel regularization term that pushes nodes with mutually high RWR scores to have embeddings that are close to each other ( independently of how far they are in the graph ) . This regularization term encourages the message passing procedure defined by GCNs , that acts on neighbouring nodes , to produce embeddings where pairs of nodes with high RWR score have similar representations . Therefore , the model is encouraged to extract global information , from local communications . The final embeddings are then a combination of local information and longrange information provided by RWR . Let S be the n × n matrix with the RWR scores . We define the RWRReg ( Random Walk with Restart Regularization ) loss as follows : LRWRReg = ∑ i , j∈V Si , j ||Hi , : −Hj , :||2 where H is a matrix of size n × d containing d-dimensional node embeddings that are in between graph convolution layers ( see Appendix A for the exact point in which H is considered for each model ) . With this approach , the loss function used to train the model becomes : L = Loriginal + λLRWRReg , where Loriginal is the original loss function for each model , and λ is a balancing term . RWR Matrix + RWR Regularization . We combine the previous two types of structural knowledge injection . The intuition is that it should be easier to enforce the RWRReg by having the additional long-range information provided by the RWR features . We expect this type of information injection to have the highest impact on performance of the models on downstream tasks . 2.3 RELATIONSHIP BETWEEN THE 1-WEISFEILER-LEMAN ALGORITHM AND RWRS . In this section we provide analytical evidence that the information from RWR significantly empowers GCNs . In particular , we prove an interesting connection between the 1-Weisfeiler-Leman ( 1-WL ) algorithm and RWR . The 1-WL algorithm for graph isomorphism testing uses an iterative coloring , or relabeling , scheme , in which all nodes are initially assigned the same label ( e.g. , the value 1 ) . It then iteratively refines the color of each node by aggregating the multiset of colors in its neighborhood . The final feature representation of a graph is the histogram of resulting node colors . ( For a more detailed description of the 1-WL algorithm we refer the reader to Shervashidze et al . ( 2011 ) . ) It is known that there are non-isomorphic graphs that are not distinguishable by the 1-WL algorithm , and that n iterations are enough to distinguish two graphs of n vertices which are distinguishable by the 1-WL algorithm . There is a well known connection ( Kipf & Welling , 2017 ; Xu et al. , 2018a ) between 1-WL and aggregation-based GCNs , which can be seen as a differentiable approximation of the algorithm . In particular , graphs that can be distinguished in k iterations by the 1-WL algorithm , can be distinguished by certain GCNs in k message passing iterations ( Morris et al. , 2019 ) . Here , we prove that graphs that are distinguishable by 1-WL in k iterations have different feature representations extracted by RWR of length k. Given a graphG = ( V , E ) , we define its k-step RWR representation as the set of vectors rv = [ rv , u1 , . . . , rv , un ] , v ∈ V , where each entry rv , u describes the probability that a RWR of length k starting in v ends in u ∈ V . Proposition 1 . Let G1 = ( V1 , E1 ) and G2 = ( V2 , E2 ) be two non-isomorphic graphs for which the 1-WL algorithm terminates with the correct answer after k iterations and starting from the labelling of all 1 ’ s . Then the k-step RWR representations of G1 and G2 are different . The proof can be found in Appendix B . Given that k iterations of the 1-WL algorithm require GCNs of depth k to be performed , but in practice GCNs are limited to depth 2 or 3 , the result above shows that RWR can empower GCNs with relevant information that is discarded in practice . Recent work ( Micali & Zhu , 2016 ) has shown that anonymous random walks ( i.e. , random walks where the global identities of nodes are not known ) of fixed length starting at node u are sufficient to reconstruct the local neighborhood within a fixed distance of a node u ( Micali & Zhu , 2016 ) . Subsequently , anonymous random walks have been introduced in the context of learning graph representations ( Ivanov & Burnaev , 2018 ) . Such results are complementary to ours , since they assume access to the distribution of entire walks of a given length , while our RWR representation only stores information on the probability of ending in a given node . In addition , such works do not provide a connection between RWR and 1-WL . | This paper proposes to use k-step RWR to capture long-range structural information as a part of node features, so as to overcome the limitation of GCN that it cannot infer long-range dependencies. However, the methodology is incremental and cannot easily be applied to real-world large-scale networks. In summary, the originality and significance are limited (please see detailed comments in the following). | SP:8971d18110014de85c721169795edb6c101a3706 |
Are Graph Convolutional Networks Fully Exploiting the Graph Structure? | Graph Convolutional Networks ( GCNs ) represent the state-of-the-art for many graph related tasks . At every layer , GCNs rely on the graph structure to define an aggregation strategy where each node updates its representation by combining information from its neighbours . A known limitation of GCNs is their inability to infer long-range dependencies . In fact , as the number of layers increases , information gets smoothed and node embeddings become indistinguishable , negatively affecting performance . In this paper we formalize four levels of injection of graph structural information , and use them to analyze the importance of long-range dependencies . We then propose a novel regularization technique based on random walks with restart , called RWRReg , which encourages the network to encode long-range information into node embeddings . RWRReg does not require additional operations at inference time , is model-agnostic , and is further supported by our theoretical analysis connecting it to the Weisfeiler-Leman algorithm . Our experimental analysis , on both transductive and inductive tasks , shows that the lack of long-range structural information greatly affects the performance of state-ofthe-art models , and that the long-range information exploited by RWRReg leads to an average accuracy improvement of more than 5 % on all considered tasks . 1 INTRODUCTION . Graphs are a ubiquitous data representation of many real world phenomena , with applications ranging from social networks , to chemistry , biology , and recommendation systems ( Zhou et al. , 2018 ) . Graph Neural Networks ( GNNs ) are the generalization of deep learning for graph structured data , and have received a huge amount of attention from the research community . One class of GNN models , the Graph Convolutional Network ( GCN ) , has demonstrated to be extremely effective and is the current state-of-the-art for tasks such as graph classification , node classification , and link prediction . GCNs adopt a message passing mechanism where at each layer every node in the graph receives a message ( e.g . a feature vector ) from its 1-hop neighbours . The massages are then aggregated with a permutation invariant function ( e.g . by mean or sum ) and are used to update the node ’ s representation vector with a learnable , possibly non-linear , transformation . The final node embedding vectors are used to make predictions , and the whole process is trained end-to-end . Empirically , the best results are obtained when the message passing procedure is repeated 2 or 3 times , as a higher number of layers leads to over-smoothing ( Li et al. , 2018 ; Xu et al. , 2018b ) . Thus , GCNs are only leveraging the graph structure in the form of the 2-hop or 3-hop neighbourhood of each node . A direct consequence of this phenomenon is that GCNs are not capable of extracting and exploiting long-range dependencies between nodes . Random walks with restart ( Page et al. , 1998 ) have proven to be very effective at quantifying how closely related two nodes are ( Tong et al. , 2006 ) , regardless of their distance in the graph . In fact random walks with restart can capture the global structure of a graph , and have been used for many tasks including ranking , link prediction , and community detection ( Jin et al. , 2019 ) . On the other hand , random walks with restart do not consider node features , which are instead heavily exploited by GCNs . Combining GCNs and random walks with restart could then provide a powerful method to fully exploit the information contained in a graph . In this work we are not interested in defining new state-of-the-art results , or proposing novel GNN models . We focus on studying the impact of long-range dependencies , and identifying a first strategy , which can easily be applied to any existing model , to incorporate this information . Our Contribution . In more detail , we assess whether the injection of information on the graph structure that can not be captured by 2 or 3-hop neighbourhoods has a significant impact on the performance of several state-of-the-art GCN models . In this regard , our contributions are fourfold . Firstly , we propose and formalize four different levels of structural information injection . Secondly , we propose a novel and practical regularization strategy , Random Walk with Restart Regularization ( RWRReg ) , to inject structural information using random walks with restart , allowing GCNs to leverage long-range dependencies . RWRReg does not require additional operations at inference time , maintains the permutation-invariance of GCN models , and leads to an average 5 % increase in accuracy on both node classification , and graph classification . Thirdly , we prove a theoretical result linking random walks with restart and the Weisfeiler-Leman algorithm , providing a theoretical foundation for their use in GCNs . Fourthly , we test how the injection of structural information can impact the performance of 6 different GCN models on node classification , graph classification , and on the task of triangle counting . Results show that current state-of-the-art models lack the ability to extract long-range information , and this is severely affecting their performance . 2 INJECTING LONG-RANGE INFORMATION IN GCNS . To test if GCNs are missing on important information that is encoded in the structure of a graph , we inject additional structural information into existing GCN models , and test how the performance of these models changes in several graph related tasks . Intuitively , based on a model ’ s performance when injected with different levels of structural information , we can understand how much information is not captured by GCNs , and if this additional knowledge can improve performance on the considered tasks . In the rest of this section we present the notation used throughout the paper , the four levels of structural information injection that we consider , and an analytical result proving the effectiveness of using information from random walks with restart . 2.1 PRELIMINARIES . We use uppercase bold letters for matrices ( M ) , and lowercase bold letters for vectors ( v ) . We use plain letters with subscript indices to refer to a specific element of a matrix ( Mi , j ) , or of a vector ( vi ) . We refer to the vector containing the i-th row of a matrix with the subscript “ i , : ” ( Mi , : ) , while we refer to the i-th column with the subscript “ : , i ” ( M : ,i ) . For a graph G = ( V , E ) , where V = { 1 , .. , n } is the set of nodes and E ⊆ V × V is the set of edges , the input is given by a tuple ( X , A ) . X is an n × d matrix where the i-th row contains the d-dimensional feature vector of the i-th node , and A is the n × n adjacency matrix . For the sake of clarity we restrict our presentation to undirected graphs , but similar concepts can be applied to directed graphs . 2.2 STRUCTURAL INFORMATION INJECTION . We consider four different levels of structural information injection , briefly described below . We remark that not all the injection strategies presented in this section are made for practical use , as the scope of these strategies is to help us understand the importance of missing structural information . In particular , in Section 4 we study the impact of the different types of structural information injection , and hence quantify the information that is not exploited by current GCN models . We then discuss scalability and practicality aspects in Section 5 . Adjacency Matrix . We concatenate each node ’ s adjacency matrix row to its feature vector . This explicitly empowers the GCN model with the connectivity of each node , and allows for higher level structural reasoning when considering a neighbourhood ( the model will have access to the connectivity of the whole neighbourhood when aggregating messages from neighbouring nodes ) . Random Walk with Restart ( RWR ) Matrix . We perform random walks with restart ( RWR ) ( Page et al. , 1998 ) from each node v , thus obtaining a n-dimensional vector ( for each node ) that gives a score of how much v is “ related ” to each other node in the graph . We concatenate this vector of RWR features to each node ’ s feature vector . The choice of RWR is motivated by their capability to capture the relevance between two nodes in a graph ( Tong et al. , 2006 ) , and by the possibility to modulate the exploration of long-range dependencies by changing the restart probability . Intuitively , if a RWR starting at node v is very likely to visit a node u ( e.g . there are multiple paths that connect the two ) , then there will be a high score in the RWR vector for v at position u . This gives the GCN model higher level information about the structure of the graph that goes beyond the 1- hop neighbourhood of each node , and , again , it allows for high level reasoning on neighbourhood connectivity . RWR Regularization . We define a novel regularization term that pushes nodes with mutually high RWR scores to have embeddings that are close to each other ( independently of how far they are in the graph ) . This regularization term encourages the message passing procedure defined by GCNs , that acts on neighbouring nodes , to produce embeddings where pairs of nodes with high RWR score have similar representations . Therefore , the model is encouraged to extract global information , from local communications . The final embeddings are then a combination of local information and longrange information provided by RWR . Let S be the n × n matrix with the RWR scores . We define the RWRReg ( Random Walk with Restart Regularization ) loss as follows : LRWRReg = ∑ i , j∈V Si , j ||Hi , : −Hj , :||2 where H is a matrix of size n × d containing d-dimensional node embeddings that are in between graph convolution layers ( see Appendix A for the exact point in which H is considered for each model ) . With this approach , the loss function used to train the model becomes : L = Loriginal + λLRWRReg , where Loriginal is the original loss function for each model , and λ is a balancing term . RWR Matrix + RWR Regularization . We combine the previous two types of structural knowledge injection . The intuition is that it should be easier to enforce the RWRReg by having the additional long-range information provided by the RWR features . We expect this type of information injection to have the highest impact on performance of the models on downstream tasks . 2.3 RELATIONSHIP BETWEEN THE 1-WEISFEILER-LEMAN ALGORITHM AND RWRS . In this section we provide analytical evidence that the information from RWR significantly empowers GCNs . In particular , we prove an interesting connection between the 1-Weisfeiler-Leman ( 1-WL ) algorithm and RWR . The 1-WL algorithm for graph isomorphism testing uses an iterative coloring , or relabeling , scheme , in which all nodes are initially assigned the same label ( e.g. , the value 1 ) . It then iteratively refines the color of each node by aggregating the multiset of colors in its neighborhood . The final feature representation of a graph is the histogram of resulting node colors . ( For a more detailed description of the 1-WL algorithm we refer the reader to Shervashidze et al . ( 2011 ) . ) It is known that there are non-isomorphic graphs that are not distinguishable by the 1-WL algorithm , and that n iterations are enough to distinguish two graphs of n vertices which are distinguishable by the 1-WL algorithm . There is a well known connection ( Kipf & Welling , 2017 ; Xu et al. , 2018a ) between 1-WL and aggregation-based GCNs , which can be seen as a differentiable approximation of the algorithm . In particular , graphs that can be distinguished in k iterations by the 1-WL algorithm , can be distinguished by certain GCNs in k message passing iterations ( Morris et al. , 2019 ) . Here , we prove that graphs that are distinguishable by 1-WL in k iterations have different feature representations extracted by RWR of length k. Given a graphG = ( V , E ) , we define its k-step RWR representation as the set of vectors rv = [ rv , u1 , . . . , rv , un ] , v ∈ V , where each entry rv , u describes the probability that a RWR of length k starting in v ends in u ∈ V . Proposition 1 . Let G1 = ( V1 , E1 ) and G2 = ( V2 , E2 ) be two non-isomorphic graphs for which the 1-WL algorithm terminates with the correct answer after k iterations and starting from the labelling of all 1 ’ s . Then the k-step RWR representations of G1 and G2 are different . The proof can be found in Appendix B . Given that k iterations of the 1-WL algorithm require GCNs of depth k to be performed , but in practice GCNs are limited to depth 2 or 3 , the result above shows that RWR can empower GCNs with relevant information that is discarded in practice . Recent work ( Micali & Zhu , 2016 ) has shown that anonymous random walks ( i.e. , random walks where the global identities of nodes are not known ) of fixed length starting at node u are sufficient to reconstruct the local neighborhood within a fixed distance of a node u ( Micali & Zhu , 2016 ) . Subsequently , anonymous random walks have been introduced in the context of learning graph representations ( Ivanov & Burnaev , 2018 ) . Such results are complementary to ours , since they assume access to the distribution of entire walks of a given length , while our RWR representation only stores information on the probability of ending in a given node . In addition , such works do not provide a connection between RWR and 1-WL . | This paper studies GCNs when long-range dependencies have been added to the model as a regularizer. The regularizer proposed in this work is based on a random walk with restart (RWR) approach as RWR encourages the model to consider long-range dependencies. This paper shows that infusing the long-range dependencies using RWR regularizer improves the performance of some models for node classification and graph classification. | SP:8971d18110014de85c721169795edb6c101a3706 |
Neurally Augmented ALISTA | 1 INTRODUCTION AND RELATED WORK . Compressed sensing deals with the problem of recovering a sparse vector from very few compressive linear observations , far less than its ambient dimension . Fundamental works of Candes et al . ( Candès et al. , 2006 ) and Donoho ( Donoho , 2006 ) show that this can be achieved in a robust and stable manner with computationally tractable algorithms given that the observation matrix fulfills certain conditions , for an overview see Foucart & Rauhut ( 2017 ) . Formally , consider the set of s-sparse vectors in RN , i.e . ΣNs : = { x ∈ RN ∣∣‖x‖0 ≤ s } where the size of the support of x is denoted by ‖x‖0 : = |supp ( x ) | = | { i : xi 6= 0 } | . Furthermore , let Φ ∈ RM×N be the measurement matrix , with typically M N . For a given noiseless observation y = Φx∗ of an unknown but s-sparse x∗ ∈ ΣNs we therefore wish to solve : argmin x ‖x‖0 s.t . y = Φx ( 1 ) In ( Candès et al. , 2006 ) it has been shown , that under certain assumptions on Φ , the solution to the combinatorial problem in ( 1 ) can be also obtained by a convex relaxation where one instead minimizes the ` 1–norm of x . The Lagrangian formalism yields then an unconstrained optimization problem also known as LASSO ( Tibshirani , 1996 ) , which penalizes the ` 1-norm via the hyperparameter λ ∈ R : x̂ = argmin x 1 2 ‖y − Φx‖22 + λ‖x‖1 ( 2 ) A very popular approach for solving this problem is the iterative shrinkage thresholding algorithm ( ISTA ) ( Daubechies et al. , 2003 ) , in which a reconstruction x ( k ) is obtained after k iterations from initial x ( 0 ) = 0 via the iteration : x ( k+1 ) = ηλ/L ( x ( k ) + 1 L ΦT ( y − Φx ( k ) ) ) ( 3 ) ∗equal contribution † The work is partially funded by DFG grant JU 2795/3 and the German Federal Ministry of Education and Research ( BMBF ) in the framework of the international future AI lab `` AI4EO – Artificial Intelligence for Earth Observation : Reasoning , Uncertainties , Ethics and Beyond '' ( Grant number : 01DD20001 ) . where ηθ is the soft thresholding function given by ηθ ( x ) = sign ( x ) max ( 0 , |x| − θ ) ( applied coordinate-wise ) and L is the Lipschitz constant ( i.e . the largest eigenvalue ) of ΦTΦ . Famously , the computational graph of ISTA with K iterations can be unrolled to yield Learned ISTA ( LISTA ) ( Gregor & LeCun , 2010 ) , a K-layer neural network in which all parameters involved can be trained ( each layer k has an individual threshold parameter and individual or shared matrix weights ) using backpropagation and gradient descent . LISTA achieves impressive empirical reconstruction performance for many sparse datasets but loses the theoretical guarantees of ISTA . Bridging the gap between LISTA ’ s strong reconstruction quality and the theoretical guarantees for ISTA , ALISTA ( Liu et al. , 2019 ) was introduced . ALISTA , introduces a matrix WT , related to the measurement matrix ΦT in ( 3 ) , which is computed by optimizing the generalized coherence : µ ( W , Φ ) = inf W∈RM×N max i 6=j WT : ,iΦ : ,j s.t . ∀i ∈ { 1 , . . . , N } : WT : ,iΦ : ,i = 1 ( 4 ) Then , contrary to LISTA , all matrices are excluded from learning in order to retain desirable properties such as low coherence . For each layer of ALISTA , only a scalar step size parameter γ ( k ) and a scalar threshold θ ( k ) is learned from the data , yielding the iteration : x ( k+1 ) = ηθ ( k ) ( x ( k ) − γ ( k ) WT ( Φx ( k ) − y ) ) ( 5 ) As in LISTA , the parameters for ALISTA are learned end-to-end using backpropagation and stochastic gradient descent by empirically minimizing the reconstruction error : min θ ( 1 ) , ... , θ ( K ) , γ ( 1 ) , ... , γ ( K ) Ex∗ [ ‖x ( K ) − x∗‖22 ] ( 6 ) The authors rigorously upper-bound the reconstruction error of ALISTA in the noiseless case and demonstrate strong empirical reconstruction quality even in the noisy case . The empirical performance similar to LISTA , the retained theoretical guarantees , and the reduction of number of parameters to train from either O ( KM2 + NM ) in vanilla LISTA or O ( MNK ) in the variant of LISTA-CPSS ( Chen et al. , 2018 ) to just O ( K ) , make ALISTA an appealing algorithm to study and extend . In ( Ablin et al. , 2019 ) , instead of directly focusing on the reconstruction problem , where λ is not known a priori , analytical conditions for optimal step sizes in ISTA are derived for LASSO , yielding Stepsize-ISTA . Stepsize-ISTA is a variant of LISTA in which the measurement matrices are exempt from training like in ALISTA , outperforming existing approaches to directly solving LASSO . Thresholds that are adaptive to the current target vector have been explored in ALISTA-AT ( Kim & Park , 2020 ) . Following the majorization-minimization method , component-wise thresholds are computed from previous iterations . In a particular case this yields θ ( k ) i = 1/ ( 1 + |x ( k−1 ) i |/ ) for some > 0 , known as iterative reweighted ` 1-minimization . By unrolling this algorithm , the authors demonstrate superior recovery over ALISTA for a specific setting of M , N and s. In a related approach ( Wu et al. , 2020 ) identify undershooting , meaning that reconstructed components are smaller than target components , as a shortcoming of LISTA and propose Gated-LISTA to address these issues . The authors introduce gain and overshoot gates to LISTA , which can amplify the reconstruction after each iteration before and after thresholding , yielding an architecture resembling GRU cells ( Cho et al. , 2014 ) . The authors demonstrate better sparse reconstruction than previous LISTA-variants and also show that adding their proposed gates to ALISTA , named AGLISTA , it is possible to improve its performance in the same setting of M , N and s as ALISTA-AT . In this paper , motivated by essential proof steps of ALISTA ’ s recovery guarantee , we propose an alternative method for adaptively choosing thresholds and step sizes during reconstruction . Our method directly extends ALISTA by using a recurrent neural network to predict thresholds and step sizes depending on an estimate of the ` 1-error between the reconstruction and the unknown target vector after each iteration . We refer to our method as Neurally Augmented ALISTA ( NA-ALISTA ) , as the method falls into the general framework of neural augmentation of unrolled algorithms ( Welling , 2020 ; Monga et al. , 2019 ; Diamond et al. , 2017 ) . The rest of the paper is structured as follows : we provide theoretical motivation for NA-ALISTA in Section 2 , before describing our method in detail in Section 3 . In Section 4 , we demonstrate experimentally that NA-ALISTA achieves state-of-the-art performance in all evaluated settings . To summarize , our main contributions are : 1 . We introduce Neurally Augmented ALISTA ( NA-ALISTA ) , an algorithm which learns to adaptively compute thresholds and step-sizes for individual target vectors during recovery . The number of parameters added does not scale with the problem size . 2 . We provide theoretical motivation inspired by guarantees for sparse reconstruction which show that NA-ALISTA can achieve arrive tighter error bounds depending on the target x∗ . 3 . We find that NA-ALISTA empirically outperforms ALISTA and other state-of-the-art algorithms in a synthetic setting as well as in a real-world application from wireless communications and that the gains increase with decreasing M/N . 2 THEORETICAL MOTIVATION . The thresholds θ ( k ) in ( 5 ) play an important role in the analysis of ALISTA . While the authors of ( Liu et al. , 2019 ) prove that θ ( k ) must be larger than a certain value in order to guarantee no false positives in the support of the reconstruction x ( k ) , the thresholds θ ( k ) also appear as an additive term in the reconstruction error upper bound . Thus , to guarantee good reconstruction θ ( k ) should be just slightly larger than the value it must surpass in order to both minimize the error and verify the assumption . In this section , we repeat key insights from ALISTA and motivate the choice of adaptive thresholds - the key improvement in our proposed NA-ALISTA . More specifically , we repeat the conditions under which ALISTA guarantees no false positives and highlight an intermediate step in the error bound from ( Liu et al. , 2019 ) , which tightens when the thresholds can adapt to specific instances of x∗ . Assumption ( adapted from Assumption 1 from ( Liu et al. , 2019 ) 1 ) Let x∗ ∈ ΣNs be a fixed s–sparse target vector . Let W be such that it attains the infimum of the generalized coherence with Φ ( as in ( 4 ) ) and denote this generalized coherence as µ̃ = µ ( W , Φ ) . Let s < ( 1 + 1/µ̃ ) /2 . Let γ ( 1 ) , . . . , γ ( K ) be any sequence of scalars taking values in ( 0 , 22µ̃s−µ̃+1 ) and θ ( 1 ) , . . . , θ ( K ) with : θ ( k ) ≥ γ ( k ) µ̃‖x ( k ) − x∗‖1 ( 7 ) Because in ALISTA , the thresholds γ ( 1 ) , . . . , γ ( K ) and stepsizes θ ( 1 ) , . . . , θ ( K ) are optimized in expectation over the training data , the inequality in ( 7 ) holds only in the general case if the thresholds are larger than the worst case ` 1-error committed by the algorithm over all training vectors x∗ i.e . : θ ( k ) ≥ γ̃ ( k ) µ̃ sup x∗ ‖x ( k ) − x∗‖1 ( 8 ) This is needed in order to fulfill the Assumption . Under these conditions it is guaranteed that no false positives are in the support of the reconstruction : No false positives ( Lemma 1 from ( Liu et al. , 2019 ) ) Under the settings of the Assumption , it holds that : supp ( x ( k ) ) ⊆ supp ( x∗ ) ( 9 ) However , the threshold θ ( k ) also reappears in the error upper bound . Here we employ an intermediate step of the error upper bound from ( Liu et al. , 2019 ) : Reconstruction error upper bound ( Theorem 1 from ( Liu et al. , 2019 ) ) Under the settings of the Assumption , it holds that : ‖x ( k+1 ) −x∗‖2 ≤ ‖x ( k+1 ) −x∗‖1 ≤ µ̃γ ( k ) ( s−1 ) ‖x ( k ) −x∗‖1+θ ( k ) s+|1−γ ( k ) |‖x ( k ) −x∗‖1 ( 10 ) Where the first inequality holds for all real vectors and the second inequality is derived in detail in Appendix A of ( Liu et al. , 2019 ) . According to ( 10 ) it is therefore desirable that θ ( k ) is as small as 1Note that in this work and in Liu et al . ( 2019 ) the noiseless case is considered to simplify the theorems and proofs . For similar statements in the noisy case , we refer the reader to Chen et al . ( 2018 ) . possible , but such that it still satisfies ( 7 ) . This means that ALISTA has to learn thresholds θ̃ ( k ) at least proportional to the largest possible committed ` 1-error over all possible x∗ in order to guarantee good reconstruction , for which it is in turn penalized in the error bound . However , if an algorithm would have access to ‖x ( k ) − x∗‖1 and were allowed to choose thresholds adaptively based on x∗ , the more relaxed inequality ( 7 ) could be employed directly , without taking the supremum over all possible x∗ as in ( 8 ) . Then , this algorithm could obtain a tighter error bound for some individual targets x∗ than ALISTA since θ̃ ( k ) ≥ θ ( k ) . Finding such an algorithm is the aim of this paper . | The paper at hand introduces Neurally augmented ALISTA (NA-ALISTA) which is an extension to the previously proposed analytical learned iterative shrinkage threshold algorithm (ALISTA). Both algorithms belong to the class of learned optimization algorithms for solving the compressed sensing problem, i.e., methods that have parameters which are learned via backpropagating through multiple iterations of the algorithm. The key novelty of the NA-LISTA is the LSTM network used to predict thresholds and stepsized used by the algorithm. The experiments show that this adaptive approach improves the performance of ALISTA. | SP:7883aef70e8fefe38482cd2baeb645e94b21c4d2 |
Neurally Augmented ALISTA | 1 INTRODUCTION AND RELATED WORK . Compressed sensing deals with the problem of recovering a sparse vector from very few compressive linear observations , far less than its ambient dimension . Fundamental works of Candes et al . ( Candès et al. , 2006 ) and Donoho ( Donoho , 2006 ) show that this can be achieved in a robust and stable manner with computationally tractable algorithms given that the observation matrix fulfills certain conditions , for an overview see Foucart & Rauhut ( 2017 ) . Formally , consider the set of s-sparse vectors in RN , i.e . ΣNs : = { x ∈ RN ∣∣‖x‖0 ≤ s } where the size of the support of x is denoted by ‖x‖0 : = |supp ( x ) | = | { i : xi 6= 0 } | . Furthermore , let Φ ∈ RM×N be the measurement matrix , with typically M N . For a given noiseless observation y = Φx∗ of an unknown but s-sparse x∗ ∈ ΣNs we therefore wish to solve : argmin x ‖x‖0 s.t . y = Φx ( 1 ) In ( Candès et al. , 2006 ) it has been shown , that under certain assumptions on Φ , the solution to the combinatorial problem in ( 1 ) can be also obtained by a convex relaxation where one instead minimizes the ` 1–norm of x . The Lagrangian formalism yields then an unconstrained optimization problem also known as LASSO ( Tibshirani , 1996 ) , which penalizes the ` 1-norm via the hyperparameter λ ∈ R : x̂ = argmin x 1 2 ‖y − Φx‖22 + λ‖x‖1 ( 2 ) A very popular approach for solving this problem is the iterative shrinkage thresholding algorithm ( ISTA ) ( Daubechies et al. , 2003 ) , in which a reconstruction x ( k ) is obtained after k iterations from initial x ( 0 ) = 0 via the iteration : x ( k+1 ) = ηλ/L ( x ( k ) + 1 L ΦT ( y − Φx ( k ) ) ) ( 3 ) ∗equal contribution † The work is partially funded by DFG grant JU 2795/3 and the German Federal Ministry of Education and Research ( BMBF ) in the framework of the international future AI lab `` AI4EO – Artificial Intelligence for Earth Observation : Reasoning , Uncertainties , Ethics and Beyond '' ( Grant number : 01DD20001 ) . where ηθ is the soft thresholding function given by ηθ ( x ) = sign ( x ) max ( 0 , |x| − θ ) ( applied coordinate-wise ) and L is the Lipschitz constant ( i.e . the largest eigenvalue ) of ΦTΦ . Famously , the computational graph of ISTA with K iterations can be unrolled to yield Learned ISTA ( LISTA ) ( Gregor & LeCun , 2010 ) , a K-layer neural network in which all parameters involved can be trained ( each layer k has an individual threshold parameter and individual or shared matrix weights ) using backpropagation and gradient descent . LISTA achieves impressive empirical reconstruction performance for many sparse datasets but loses the theoretical guarantees of ISTA . Bridging the gap between LISTA ’ s strong reconstruction quality and the theoretical guarantees for ISTA , ALISTA ( Liu et al. , 2019 ) was introduced . ALISTA , introduces a matrix WT , related to the measurement matrix ΦT in ( 3 ) , which is computed by optimizing the generalized coherence : µ ( W , Φ ) = inf W∈RM×N max i 6=j WT : ,iΦ : ,j s.t . ∀i ∈ { 1 , . . . , N } : WT : ,iΦ : ,i = 1 ( 4 ) Then , contrary to LISTA , all matrices are excluded from learning in order to retain desirable properties such as low coherence . For each layer of ALISTA , only a scalar step size parameter γ ( k ) and a scalar threshold θ ( k ) is learned from the data , yielding the iteration : x ( k+1 ) = ηθ ( k ) ( x ( k ) − γ ( k ) WT ( Φx ( k ) − y ) ) ( 5 ) As in LISTA , the parameters for ALISTA are learned end-to-end using backpropagation and stochastic gradient descent by empirically minimizing the reconstruction error : min θ ( 1 ) , ... , θ ( K ) , γ ( 1 ) , ... , γ ( K ) Ex∗ [ ‖x ( K ) − x∗‖22 ] ( 6 ) The authors rigorously upper-bound the reconstruction error of ALISTA in the noiseless case and demonstrate strong empirical reconstruction quality even in the noisy case . The empirical performance similar to LISTA , the retained theoretical guarantees , and the reduction of number of parameters to train from either O ( KM2 + NM ) in vanilla LISTA or O ( MNK ) in the variant of LISTA-CPSS ( Chen et al. , 2018 ) to just O ( K ) , make ALISTA an appealing algorithm to study and extend . In ( Ablin et al. , 2019 ) , instead of directly focusing on the reconstruction problem , where λ is not known a priori , analytical conditions for optimal step sizes in ISTA are derived for LASSO , yielding Stepsize-ISTA . Stepsize-ISTA is a variant of LISTA in which the measurement matrices are exempt from training like in ALISTA , outperforming existing approaches to directly solving LASSO . Thresholds that are adaptive to the current target vector have been explored in ALISTA-AT ( Kim & Park , 2020 ) . Following the majorization-minimization method , component-wise thresholds are computed from previous iterations . In a particular case this yields θ ( k ) i = 1/ ( 1 + |x ( k−1 ) i |/ ) for some > 0 , known as iterative reweighted ` 1-minimization . By unrolling this algorithm , the authors demonstrate superior recovery over ALISTA for a specific setting of M , N and s. In a related approach ( Wu et al. , 2020 ) identify undershooting , meaning that reconstructed components are smaller than target components , as a shortcoming of LISTA and propose Gated-LISTA to address these issues . The authors introduce gain and overshoot gates to LISTA , which can amplify the reconstruction after each iteration before and after thresholding , yielding an architecture resembling GRU cells ( Cho et al. , 2014 ) . The authors demonstrate better sparse reconstruction than previous LISTA-variants and also show that adding their proposed gates to ALISTA , named AGLISTA , it is possible to improve its performance in the same setting of M , N and s as ALISTA-AT . In this paper , motivated by essential proof steps of ALISTA ’ s recovery guarantee , we propose an alternative method for adaptively choosing thresholds and step sizes during reconstruction . Our method directly extends ALISTA by using a recurrent neural network to predict thresholds and step sizes depending on an estimate of the ` 1-error between the reconstruction and the unknown target vector after each iteration . We refer to our method as Neurally Augmented ALISTA ( NA-ALISTA ) , as the method falls into the general framework of neural augmentation of unrolled algorithms ( Welling , 2020 ; Monga et al. , 2019 ; Diamond et al. , 2017 ) . The rest of the paper is structured as follows : we provide theoretical motivation for NA-ALISTA in Section 2 , before describing our method in detail in Section 3 . In Section 4 , we demonstrate experimentally that NA-ALISTA achieves state-of-the-art performance in all evaluated settings . To summarize , our main contributions are : 1 . We introduce Neurally Augmented ALISTA ( NA-ALISTA ) , an algorithm which learns to adaptively compute thresholds and step-sizes for individual target vectors during recovery . The number of parameters added does not scale with the problem size . 2 . We provide theoretical motivation inspired by guarantees for sparse reconstruction which show that NA-ALISTA can achieve arrive tighter error bounds depending on the target x∗ . 3 . We find that NA-ALISTA empirically outperforms ALISTA and other state-of-the-art algorithms in a synthetic setting as well as in a real-world application from wireless communications and that the gains increase with decreasing M/N . 2 THEORETICAL MOTIVATION . The thresholds θ ( k ) in ( 5 ) play an important role in the analysis of ALISTA . While the authors of ( Liu et al. , 2019 ) prove that θ ( k ) must be larger than a certain value in order to guarantee no false positives in the support of the reconstruction x ( k ) , the thresholds θ ( k ) also appear as an additive term in the reconstruction error upper bound . Thus , to guarantee good reconstruction θ ( k ) should be just slightly larger than the value it must surpass in order to both minimize the error and verify the assumption . In this section , we repeat key insights from ALISTA and motivate the choice of adaptive thresholds - the key improvement in our proposed NA-ALISTA . More specifically , we repeat the conditions under which ALISTA guarantees no false positives and highlight an intermediate step in the error bound from ( Liu et al. , 2019 ) , which tightens when the thresholds can adapt to specific instances of x∗ . Assumption ( adapted from Assumption 1 from ( Liu et al. , 2019 ) 1 ) Let x∗ ∈ ΣNs be a fixed s–sparse target vector . Let W be such that it attains the infimum of the generalized coherence with Φ ( as in ( 4 ) ) and denote this generalized coherence as µ̃ = µ ( W , Φ ) . Let s < ( 1 + 1/µ̃ ) /2 . Let γ ( 1 ) , . . . , γ ( K ) be any sequence of scalars taking values in ( 0 , 22µ̃s−µ̃+1 ) and θ ( 1 ) , . . . , θ ( K ) with : θ ( k ) ≥ γ ( k ) µ̃‖x ( k ) − x∗‖1 ( 7 ) Because in ALISTA , the thresholds γ ( 1 ) , . . . , γ ( K ) and stepsizes θ ( 1 ) , . . . , θ ( K ) are optimized in expectation over the training data , the inequality in ( 7 ) holds only in the general case if the thresholds are larger than the worst case ` 1-error committed by the algorithm over all training vectors x∗ i.e . : θ ( k ) ≥ γ̃ ( k ) µ̃ sup x∗ ‖x ( k ) − x∗‖1 ( 8 ) This is needed in order to fulfill the Assumption . Under these conditions it is guaranteed that no false positives are in the support of the reconstruction : No false positives ( Lemma 1 from ( Liu et al. , 2019 ) ) Under the settings of the Assumption , it holds that : supp ( x ( k ) ) ⊆ supp ( x∗ ) ( 9 ) However , the threshold θ ( k ) also reappears in the error upper bound . Here we employ an intermediate step of the error upper bound from ( Liu et al. , 2019 ) : Reconstruction error upper bound ( Theorem 1 from ( Liu et al. , 2019 ) ) Under the settings of the Assumption , it holds that : ‖x ( k+1 ) −x∗‖2 ≤ ‖x ( k+1 ) −x∗‖1 ≤ µ̃γ ( k ) ( s−1 ) ‖x ( k ) −x∗‖1+θ ( k ) s+|1−γ ( k ) |‖x ( k ) −x∗‖1 ( 10 ) Where the first inequality holds for all real vectors and the second inequality is derived in detail in Appendix A of ( Liu et al. , 2019 ) . According to ( 10 ) it is therefore desirable that θ ( k ) is as small as 1Note that in this work and in Liu et al . ( 2019 ) the noiseless case is considered to simplify the theorems and proofs . For similar statements in the noisy case , we refer the reader to Chen et al . ( 2018 ) . possible , but such that it still satisfies ( 7 ) . This means that ALISTA has to learn thresholds θ̃ ( k ) at least proportional to the largest possible committed ` 1-error over all possible x∗ in order to guarantee good reconstruction , for which it is in turn penalized in the error bound . However , if an algorithm would have access to ‖x ( k ) − x∗‖1 and were allowed to choose thresholds adaptively based on x∗ , the more relaxed inequality ( 7 ) could be employed directly , without taking the supremum over all possible x∗ as in ( 8 ) . Then , this algorithm could obtain a tighter error bound for some individual targets x∗ than ALISTA since θ̃ ( k ) ≥ θ ( k ) . Finding such an algorithm is the aim of this paper . | This paper extends the framework of ALISTA, a variant of learned ISTA called Neurally Augmented ALISTA (AG-ALISTA), which significantly reduces the number parameters in the model (down to 2 scalars per layer, one for step size and the other for the threshold in soft-thresholding function). Specifically, the authors use a LSTM to generate these two parameters in each layer along iterations, taking reconstruction error related signals as input. This method is based on (1) the previous previous finding of the relation of the step size and threshold with the $\ell_1$ signal recovery error; and (2) the empirical observation of the correlation between the $\ell_1$ signal recovery error and reconstruction error. Experiments in synthetic setting show the superiority of AG-ALISTA over ALISTA and other variants that follow it, especially in settings where the compression ratios are challenging, which is claimed to be more realistic in real-world settings. | SP:7883aef70e8fefe38482cd2baeb645e94b21c4d2 |
Unsupervised Active Pre-Training for Reinforcement Learning | 1 INTRODUCTION . Deep reinforcement learning ( RL ) provides a general framework for solving challenging sequential decision-making problems , it has achieved remarkable success in advancing the frontier of AI technologies thanks to scalable and efficient learning algorithms ( Mnih et al. , 2015 ; Lillicrap et al. , 2015 ; Schulman et al. , 2015 ; 2017 ) . These landmarks include outperforming humans in board ( Silver et al. , 2016 ; 2018 ; Schrittwieser et al. , 2019 ) and computer games ( Mnih et al. , 2015 ; Berner et al. , 2019 ; Schrittwieser et al. , 2019 ; Vinyals et al. , 2019 ; Badia et al. , 2020a ) , and solving complex robotic control tasks ( Andrychowicz et al. , 2017 ; Akkaya et al. , 2019 ) . Despite these successes , a key challenge with Deep RL is that it requires a huge amount of interactions with the environment before it learns effective policies , and needs to do so for each encountered task . Environments are required to have carefully designed task-specific reward functions to guide the RL algorithms ( Andrychowicz et al. , 2017 ; Ng et al. , 1999 ) , which further limits its wide applications of Deep RL . This is in contrast to how intelligent creatures learn in the absence of external supervisory signals , acquiring abilities in a task-agnostic manner by exploring the environment . Unsupervised pre-training is a framework that trains models without expert supervision has obtained promising results in computer vision ( Oord et al. , 2018 ; He et al. , 2019 ; Chen et al. , 2020b ; Caron et al. , 2020 ; Grill et al. , 2020 ) and natural language modeling ( Vaswani et al. , 2017 ; Devlin et al. , 2018 ; Peters et al. , 2018 ; Brown et al. , 2020 ) . The key insight of unsupervised pre-training techniques is learning a good representation or initialization from a massive amount of unlabeled data such as ImageNet ( Deng et al. , 2009 ) , Instagram image set ( He et al. , 2019 ) , Wikipedia , and WebText ( Radford et al. , 2019 ) which are easier to collect and scales to millions or trillions of data points . As a result , The learned representation when fine-tuned on the downstream tasks can solve them efficiently without needing any supervision or in a few-shot manner . Driven by the significance of the massive abundance of unlabeled data relative to labeled data , we pose the following question : is enabling efficient unsupervised pretraining for deep RL as easy as increasing the amount of unlabeled data ? Unlike the computer vision or language domains , in reinforcement learning it ’ s not obvious where to extract large pools of unlabeled data . A natural choice is pretraining on ImageNet and transfer the encoder to reinforcement learning tasks . We experimented with using ImageNet data for unsupervised representation learning as initialization of the encoder in deep RL agent , specifically , we used the momentum contrast ( He et al. , 2019 ; Chen et al. , 2020c ) method which is one of the state-of-the-art methods for representation learning . We used DrQ ( Kostrikov et al. , 2020 ) as the RL optimization algorithm . The results on DMControl are shown in Figure 1 . We can see that using ImageNet pre-trained representations does not lead to any significant improvement over training from scratch . We also experimented with using supervised pre-trained ResNet features as initialization similar to Levine et al . ( 2016 ) ( details in Appendix ) but the results are no different . This seems in contrast to the preeminent successes of ImageNet pre-trained models in various computer vision downstream tasks ( see e.g . Krizhevsky et al. , 2012 ; Zeiler & Fergus , 2014 ; Hendrycks et al. , 2019 ; Chen et al. , 2020a ) . On the other hand , previous research in robotics also found that ImageNet pre-training did not help ( Julian et al. , 2020 ) . We hypothesize that the reason for the discrepancy is that the ImageNet data distribution is far from the induced sample distribution encountered during RL training . It is therefore necessary to collect data from the RL agent induced distribution . To investigate this hypothesis , we also experimented with training RL agents by ‘ exhaustively ’ collecting data during the reward-free interaction . Specifically , during pre-training phase , the only reward signal is defined by the count-based exploration ( Bellemare et al. , 2016 ; Ostrovski et al. , 2017 ) which is one of the state-of-the-art methods for exploration ( Taïga et al. , 2019 ) , and the density estimation model is PixelCNN ( Van den Oord et al. , 2016 ) . The results of using the resulting pre-trained policy as initialization are shown in Figure 1 . We can see that pre-trained initialization in Cheetah environment does not improve significantly over random initialization on Cheetah Run task . Similarly , pre-trained initialization in Hopper environment only leads to a small improvement over baseline . The reason for this ineffectiveness is that density modeling at the pixel level is difficult especially in the low-data and non-stationary regime . The results on DMControl demonstrate that simply increasing the amount of unlabeled data does not work well , therefore we need a more systematical strategy that caters to RL . In this paper , we address the issue by proposing to actively collect novel data by exploring unknown areas in the task agnostic environment . Our means is maximizing the entropy of visited state distribution subject to some prior constraints . The entropy maximization principle ( Jaynes , 1957 ) originated in statistical mechanics , where Jaynes showed that entropy in statistical mechanics and information theory were equivalent . Our motivation is that the resulting representation and initialization will encode both prior information while being as agnostic as possible , and can be adapted to various downstream tasks . While the entropy maximization principle seems simple , it is practically difficult to calculate the Shannon entropy ( Shannon , 2001 ) as a density model is needed . To remedy this , we resort to the particle-based entropy estimator ( Singh et al. , 2003 ; Beirlant , 1997 ) which has wide applications in various machine learning areas ( Sricharan et al. , 2013 ; Pál et al. , 2010 ; Jiao et al. , 2018 ) . The particle-based entropy estimator is known to be asymptotically unbiased and consistent . Specifically , it computes the average of the Euclidean distance of each sample to its nearest neighbors . We compute the entropy in the latent representation space , for this we adapt the idea of contrastive learning ( Hadsell et al. , 2006 ; Gutmann & Hyvärinen , 2010 ; Mnih & Kavukcuoglu , 2013 ; He et al. , 2019 ; Chen et al. , 2020b ) to encode image observations to representation space . Our approach alternates between training the encoder via contrastive learning and RL style optimization of maximizing expected reward where reward is defined by the particle-based entropy . After the pre-training phase , we can either fine-tune the encoder representation for test tasks that have different action space dimension or fine-tune the policy initialization for tasks with the same action space dimension . Since our method actively collects data during the pre-training phase , the method is named as Active Pre-Training ( APT ) . We empirically evaluate APT on the Atari game suite and DMControl suite by exposing task-specific reward to the agent after a long unsupervised pre-training phase . On the full suite of Atari games , fine-tuning APT pre-trained models achieves human-level performance on 12 games . On the Atari 100k benchmark ( Kaiser et al. , 2019 ) , our fine-tuning achieves 1.3× higher human median scores than state-of-the-art training from scratch and 4× higher scores than state-of-the-art pre-training RL . On DMControl suite , fine-tuning APT pre-trained models beating all baselines in terms of asymptotic performance and data efficiency and solving tasks that are extremely difficult for training from scratch . The contributions of our paper can be summarized as : ( i ) We propose a new approach for pretraining in RL . ( ii ) We show that our pre-training method significantly improves data efficiency of solving downstream tasks on DMControl and Atari suite . ( iii ) We demonstrate that pre-training with particle-based entropy maximization in contrastive representation space significantly outperforms prior count-based approaches that rely on density modeling . 2 RELATED WORK . 2.1 INTRINSIC MOTIVATION AND EXPLORATION . The learning process of RL agents becomes highly inefficient in sparse supervision tasks when relying on standard exploration techniques . This issue can be alleviated by introducing intrinsic motivation , i.e. , denser reward signals that can be automatically computed . These rewards are generally taskagnostic and might come from state visitation count bonus ( Bellemare et al. , 2016 ; Tang et al. , 2017 ; Ostrovski et al. , 2017 ; Zhao & Tresp , 2019 ) , learning to predict environment dynamics ( Meyer & Wilson , 1991 ; Pathak et al. , 2017 ; Burda et al. , 2018a ; Sekar et al. , 2020 ) , distilling random neural networks ( Burda et al. , 2018b ; Choi et al. , 2018 ) , hindsight relabeling ( Andrychowicz et al. , 2017 ) , learning options ( Sutton et al. , 1999 ) through mutual information ( Jung et al. , 2011 ; Mohamed & Rezende , 2015 ) , information gain ( Lindley , 1956 ; Sun et al. , 2011 ; Houthooft et al. , 2016 ) , successor features ( Kulkarni et al. , 2016 ; Machado et al. , 2018 ) , maximizing mutual information between behaviors and some aspect of the corresponding trajectory ( Gregor et al. , 2016 ; Florensa et al. , 2017 ; Warde-Farley et al. , 2018 ; Hausman et al. , 2018 ; Shyam et al. , 2019 ) , using imitation learning to return to the furthest discovered states ( Ecoffet et al. , 2019 ) , self-play curriculum ( Schmidhuber , 2013 ; Sukhbaatar et al. , 2017 ; Liu et al. , 2019 ) , exploration in latent space ( Vezzani et al. , 2019 ) , injecting noise in parameter space ( Fortunato et al. , 2017 ; Plappert et al. , 2017 ) , learning to imitate self ( Oh et al. , 2018 ) , predicting improvement measure ( Schmidhuber , 1991 ; Oudeyer et al. , 2007 ; Lopes et al. , 2012 ; Achiam & Sastry , 2017 ) , and unsupervised auxiliary task ( Jaderberg et al. , 2016 ) . The work by Badia et al . ( 2020b ) also considers k-nearest neighbor based intrinsic reward to incentive exploration , and shows improved exploration in sparse reward games . Our work differs in that we consider reward-free settings and the objective of our intrinsic reward is based on particle-based entropy instead of count bonus . The work closest to ours is Hazan et al . ( 2019 ) which presents provably efficient exploration algorithms under certain conditions . However , their method directly estimates state visitations through a density model which is difficult to scale . In contrast , our work turns to particle based entropy maximization in contrastive representation space . Concurrent work by Mutti et al . ( 2020 ) shows maximizing particle-based entropy can improve data efficiency in solving downstream continuous control tasks . However , their method relies on importance sampling and on-policy RL which suffers from high variance and is difficult to scale . In contrast , our work resorts to a biased but lower variance entropy estimator which is scalable for high dimensional observations and suitable for off-policy RL optimization . | The paper proposes a method to simultaneously learn effective representations and efficient exploration in a reward-free context. The algorithm iterates between minimizing a contrastive loss and maximizing an intrinsic reward derived from a k-NN entropy estimation of the state distribution. Then, authors empirically evaluate the method over a set of visual Mujoco tasks and Atari games. | SP:77b114448647f9b8edcd6dad7d8be6e152e44696 |
Unsupervised Active Pre-Training for Reinforcement Learning | 1 INTRODUCTION . Deep reinforcement learning ( RL ) provides a general framework for solving challenging sequential decision-making problems , it has achieved remarkable success in advancing the frontier of AI technologies thanks to scalable and efficient learning algorithms ( Mnih et al. , 2015 ; Lillicrap et al. , 2015 ; Schulman et al. , 2015 ; 2017 ) . These landmarks include outperforming humans in board ( Silver et al. , 2016 ; 2018 ; Schrittwieser et al. , 2019 ) and computer games ( Mnih et al. , 2015 ; Berner et al. , 2019 ; Schrittwieser et al. , 2019 ; Vinyals et al. , 2019 ; Badia et al. , 2020a ) , and solving complex robotic control tasks ( Andrychowicz et al. , 2017 ; Akkaya et al. , 2019 ) . Despite these successes , a key challenge with Deep RL is that it requires a huge amount of interactions with the environment before it learns effective policies , and needs to do so for each encountered task . Environments are required to have carefully designed task-specific reward functions to guide the RL algorithms ( Andrychowicz et al. , 2017 ; Ng et al. , 1999 ) , which further limits its wide applications of Deep RL . This is in contrast to how intelligent creatures learn in the absence of external supervisory signals , acquiring abilities in a task-agnostic manner by exploring the environment . Unsupervised pre-training is a framework that trains models without expert supervision has obtained promising results in computer vision ( Oord et al. , 2018 ; He et al. , 2019 ; Chen et al. , 2020b ; Caron et al. , 2020 ; Grill et al. , 2020 ) and natural language modeling ( Vaswani et al. , 2017 ; Devlin et al. , 2018 ; Peters et al. , 2018 ; Brown et al. , 2020 ) . The key insight of unsupervised pre-training techniques is learning a good representation or initialization from a massive amount of unlabeled data such as ImageNet ( Deng et al. , 2009 ) , Instagram image set ( He et al. , 2019 ) , Wikipedia , and WebText ( Radford et al. , 2019 ) which are easier to collect and scales to millions or trillions of data points . As a result , The learned representation when fine-tuned on the downstream tasks can solve them efficiently without needing any supervision or in a few-shot manner . Driven by the significance of the massive abundance of unlabeled data relative to labeled data , we pose the following question : is enabling efficient unsupervised pretraining for deep RL as easy as increasing the amount of unlabeled data ? Unlike the computer vision or language domains , in reinforcement learning it ’ s not obvious where to extract large pools of unlabeled data . A natural choice is pretraining on ImageNet and transfer the encoder to reinforcement learning tasks . We experimented with using ImageNet data for unsupervised representation learning as initialization of the encoder in deep RL agent , specifically , we used the momentum contrast ( He et al. , 2019 ; Chen et al. , 2020c ) method which is one of the state-of-the-art methods for representation learning . We used DrQ ( Kostrikov et al. , 2020 ) as the RL optimization algorithm . The results on DMControl are shown in Figure 1 . We can see that using ImageNet pre-trained representations does not lead to any significant improvement over training from scratch . We also experimented with using supervised pre-trained ResNet features as initialization similar to Levine et al . ( 2016 ) ( details in Appendix ) but the results are no different . This seems in contrast to the preeminent successes of ImageNet pre-trained models in various computer vision downstream tasks ( see e.g . Krizhevsky et al. , 2012 ; Zeiler & Fergus , 2014 ; Hendrycks et al. , 2019 ; Chen et al. , 2020a ) . On the other hand , previous research in robotics also found that ImageNet pre-training did not help ( Julian et al. , 2020 ) . We hypothesize that the reason for the discrepancy is that the ImageNet data distribution is far from the induced sample distribution encountered during RL training . It is therefore necessary to collect data from the RL agent induced distribution . To investigate this hypothesis , we also experimented with training RL agents by ‘ exhaustively ’ collecting data during the reward-free interaction . Specifically , during pre-training phase , the only reward signal is defined by the count-based exploration ( Bellemare et al. , 2016 ; Ostrovski et al. , 2017 ) which is one of the state-of-the-art methods for exploration ( Taïga et al. , 2019 ) , and the density estimation model is PixelCNN ( Van den Oord et al. , 2016 ) . The results of using the resulting pre-trained policy as initialization are shown in Figure 1 . We can see that pre-trained initialization in Cheetah environment does not improve significantly over random initialization on Cheetah Run task . Similarly , pre-trained initialization in Hopper environment only leads to a small improvement over baseline . The reason for this ineffectiveness is that density modeling at the pixel level is difficult especially in the low-data and non-stationary regime . The results on DMControl demonstrate that simply increasing the amount of unlabeled data does not work well , therefore we need a more systematical strategy that caters to RL . In this paper , we address the issue by proposing to actively collect novel data by exploring unknown areas in the task agnostic environment . Our means is maximizing the entropy of visited state distribution subject to some prior constraints . The entropy maximization principle ( Jaynes , 1957 ) originated in statistical mechanics , where Jaynes showed that entropy in statistical mechanics and information theory were equivalent . Our motivation is that the resulting representation and initialization will encode both prior information while being as agnostic as possible , and can be adapted to various downstream tasks . While the entropy maximization principle seems simple , it is practically difficult to calculate the Shannon entropy ( Shannon , 2001 ) as a density model is needed . To remedy this , we resort to the particle-based entropy estimator ( Singh et al. , 2003 ; Beirlant , 1997 ) which has wide applications in various machine learning areas ( Sricharan et al. , 2013 ; Pál et al. , 2010 ; Jiao et al. , 2018 ) . The particle-based entropy estimator is known to be asymptotically unbiased and consistent . Specifically , it computes the average of the Euclidean distance of each sample to its nearest neighbors . We compute the entropy in the latent representation space , for this we adapt the idea of contrastive learning ( Hadsell et al. , 2006 ; Gutmann & Hyvärinen , 2010 ; Mnih & Kavukcuoglu , 2013 ; He et al. , 2019 ; Chen et al. , 2020b ) to encode image observations to representation space . Our approach alternates between training the encoder via contrastive learning and RL style optimization of maximizing expected reward where reward is defined by the particle-based entropy . After the pre-training phase , we can either fine-tune the encoder representation for test tasks that have different action space dimension or fine-tune the policy initialization for tasks with the same action space dimension . Since our method actively collects data during the pre-training phase , the method is named as Active Pre-Training ( APT ) . We empirically evaluate APT on the Atari game suite and DMControl suite by exposing task-specific reward to the agent after a long unsupervised pre-training phase . On the full suite of Atari games , fine-tuning APT pre-trained models achieves human-level performance on 12 games . On the Atari 100k benchmark ( Kaiser et al. , 2019 ) , our fine-tuning achieves 1.3× higher human median scores than state-of-the-art training from scratch and 4× higher scores than state-of-the-art pre-training RL . On DMControl suite , fine-tuning APT pre-trained models beating all baselines in terms of asymptotic performance and data efficiency and solving tasks that are extremely difficult for training from scratch . The contributions of our paper can be summarized as : ( i ) We propose a new approach for pretraining in RL . ( ii ) We show that our pre-training method significantly improves data efficiency of solving downstream tasks on DMControl and Atari suite . ( iii ) We demonstrate that pre-training with particle-based entropy maximization in contrastive representation space significantly outperforms prior count-based approaches that rely on density modeling . 2 RELATED WORK . 2.1 INTRINSIC MOTIVATION AND EXPLORATION . The learning process of RL agents becomes highly inefficient in sparse supervision tasks when relying on standard exploration techniques . This issue can be alleviated by introducing intrinsic motivation , i.e. , denser reward signals that can be automatically computed . These rewards are generally taskagnostic and might come from state visitation count bonus ( Bellemare et al. , 2016 ; Tang et al. , 2017 ; Ostrovski et al. , 2017 ; Zhao & Tresp , 2019 ) , learning to predict environment dynamics ( Meyer & Wilson , 1991 ; Pathak et al. , 2017 ; Burda et al. , 2018a ; Sekar et al. , 2020 ) , distilling random neural networks ( Burda et al. , 2018b ; Choi et al. , 2018 ) , hindsight relabeling ( Andrychowicz et al. , 2017 ) , learning options ( Sutton et al. , 1999 ) through mutual information ( Jung et al. , 2011 ; Mohamed & Rezende , 2015 ) , information gain ( Lindley , 1956 ; Sun et al. , 2011 ; Houthooft et al. , 2016 ) , successor features ( Kulkarni et al. , 2016 ; Machado et al. , 2018 ) , maximizing mutual information between behaviors and some aspect of the corresponding trajectory ( Gregor et al. , 2016 ; Florensa et al. , 2017 ; Warde-Farley et al. , 2018 ; Hausman et al. , 2018 ; Shyam et al. , 2019 ) , using imitation learning to return to the furthest discovered states ( Ecoffet et al. , 2019 ) , self-play curriculum ( Schmidhuber , 2013 ; Sukhbaatar et al. , 2017 ; Liu et al. , 2019 ) , exploration in latent space ( Vezzani et al. , 2019 ) , injecting noise in parameter space ( Fortunato et al. , 2017 ; Plappert et al. , 2017 ) , learning to imitate self ( Oh et al. , 2018 ) , predicting improvement measure ( Schmidhuber , 1991 ; Oudeyer et al. , 2007 ; Lopes et al. , 2012 ; Achiam & Sastry , 2017 ) , and unsupervised auxiliary task ( Jaderberg et al. , 2016 ) . The work by Badia et al . ( 2020b ) also considers k-nearest neighbor based intrinsic reward to incentive exploration , and shows improved exploration in sparse reward games . Our work differs in that we consider reward-free settings and the objective of our intrinsic reward is based on particle-based entropy instead of count bonus . The work closest to ours is Hazan et al . ( 2019 ) which presents provably efficient exploration algorithms under certain conditions . However , their method directly estimates state visitations through a density model which is difficult to scale . In contrast , our work turns to particle based entropy maximization in contrastive representation space . Concurrent work by Mutti et al . ( 2020 ) shows maximizing particle-based entropy can improve data efficiency in solving downstream continuous control tasks . However , their method relies on importance sampling and on-policy RL which suffers from high variance and is difficult to scale . In contrast , our work resorts to a biased but lower variance entropy estimator which is scalable for high dimensional observations and suitable for off-policy RL optimization . | This submission presents a technique for unsupervised pre-training of representations and policies for RL. Unsupervised representation learning has obtained impressive results in supervised scenarios, and adapting these methods to RL is an important research direction. One of the main challenges in the RL setting is that of defining the distribution of data to learn from, as well as sampling from it. The learned representations are unlikely to be useful for observations that are out of the pre-training distribution, so it is desirable to perform representation learning on data that is representative of the full state space. Previous works (Hazan et al., Lee et al.) proposed strategies to train agents that induce maximally entropic state visitation distributions, but they involve density estimation whose underlying assumptions are not well suited for pixel observations. The authors propose to overcome these limitations by using a particle based entropy estimate in the learned representation space. The pre-trained representations and policies can be used for RL from pixels, obtaining faster convergence and higher end scores than the considered baselines in both DMControl and Atari. | SP:77b114448647f9b8edcd6dad7d8be6e152e44696 |
Uniform Priors for Data-Efficient Transfer | 1 INTRODUCTION . Deep Neural Networks have enabled great success in various machine learning domains such as computer vision ( Girshick , 2015 ; He et al. , 2016 ; Long et al. , 2015 ) , natural language processing ( Vaswani et al. , 2017 ; Devlin et al. , 2018 ; Brown et al. , 2020 ) , decision making ( Schulman et al. , 2015 ; 2017 ; Fujimoto et al. , 2018 ) or in medical applications ( Ronneberger et al. , 2015 ; Hesamian et al. , 2019 ) . This can be largely attributed to the ability of networks to extract abstract features from data , which , given sufficient data , can effectively generalize to held-out test sets . However , the degree of generalization scales with the semantic difference between test and training tasks , caused e.g . by domain or distributional shifts between training and test data . Understanding how to achieve generalization under such shifts is an active area of research in fields like MetaLearning ( Snell et al. , 2017 ; Finn et al. , 2017 ; Chen et al. , 2020 ) , Deep Metric Learning ( DML ) ( Roth et al. , 2020b ; Hadsell et al. , 2006 ) , Zero-Shot Domain Adaptation ( ZSDA ) ( Tzeng et al. , 2017 ; Kodirov et al. , 2015 ) or low-level vision tasks ( Tang et al. , 2020 ) . In the few-shot Meta-Learning setting , a meta-learner is tasked to quickly adapt to novel test data given its training experience and a limited labeled data budget ; similarly fields like DML and ZSDA study generalization at the limit of such adaptation , where predictions on novel test data are made without any test-time finetuning . Yet , despite the motivational differences , each of these fields require representations to be learned from the training data that allow for better generalization and adaptation to novel tasks and data . Although there exists a large corpus of domain-specific training methods , in this paper we seek to investigate what fundamental properties learned features and feature spaces should have to facilitate such generalization . Fortunately , recent literature provides pointers towards one such property : the notion of “ feature uniformity ” for improved generalization . For Unsupervised Representation Learning , Wang & Isola ( 2020 ) highlight a link between the uniform distribution of hyperspherical feature representations and the transfer performance in downstream tasks , which has been implicitly adapted in the design of modern contrastive learning methods ( Bachman et al. , 2019 ; Tian et al. , 2020a ; b ) . Similarly , Roth et al . ( 2020b ) show that for Deep Metric Learning , uniformity in hyperspherical embedding space coverage as well as uniform singular value distribution embedding spaces are strongly connected to zero-shot generalization performance . Both Wang & Isola ( 2020 ) and Roth et al . ( 2020b ) link the uniformity in the feature representation space to the preservation of maximal information and reduced overfitting . This suggests that actively imposing a uniformity prior on learned feature representations should encourage better transfer properties by retaining more information and reducing bias towards training tasks , which in turn facilitate better adaptation to novel tasks . However , while both Wang & Isola ( 2020 ) and Roth et al . ( 2020b ) propose methods to incorporate this notion of uniformity , they are defined only for hyperspherical embedding spaces or contrastive learning approaches1 , thus severely limiting the applicability to other domains . To address these limitations and leverage the benefits of uniformity for any type of novel task and data adaptation for deep neural networks , we propose uniformity regularization , which places a uniform hypercube prior on the learned features space during training , without being limited to the contrastive training approaches or a hyperspherical representation space . Unlike e.g . a multivariate Gaussian , the uniform prior puts equal likelihood over the feature space , which then enables the network to make fewer assumptions about the data , limiting model overfitting to the training task . This incentivizes the model to learn more task-agnostic and reusable features , which in turn improve generalization ( Raghu et al. , 2019 ) . Our uniformity regularization follows an adversarial learning framework that allows us to apply our proposed uniformity prior , since a uniform distribution does not have a closed-form divergence minimization scheme . Using this setup , we experimentally demonstrate that uniformity regularization aids generalization in zero-shot setups such as Deep Metric Learning , Domain Adaptation , Out-of-Distribution Detection as well as few-shot Meta-Learning . Furthermore , for Deep Metric learning and few-shot Meta-Learning , we are even able to set a new state-of-the-art over benchmark datasets . Overall , our contributions can be summarized as : • We propose to perform uniformity regularization in the embedding spaces of a deep neural network , using a GAN-like alternating optimization scheme , to increase the transferability of learned features and the ability for better adaptation to novel tasks and data . • Using our proposed regularization , we achieve strong improvements over baseline methods in Deep Metric Learning , Zero-Shot Domain Adaptation , Out-of-Distribution Detection and Meta-Learning . Furthermore , uniformity regularization allows us to set a new state-ofthe-art in Meta-Learning on the Meta-Dataset ( Triantafillou et al. , 2019 ) as well as in Deep Metric Learning over two benchmark datasets ( Welinder et al. , 2010 ; Krause et al. , 2013 ) . 2 BACKGROUND . 2.1 GENERATIVE ADVERSARIAL NETWORKS ( GANS ) . Generative Adversarial Networks ( GANs , Goodfellow et al . ( 2014 ) ) were proposed as a generative model which utilizes an alternative optimization scheme that solves a minimax two-player game between a generator , G , and a discriminator , D. The generator G ( z ) is trained to map samples from a prior z ∼ p ( z ) to the target space , while the discriminator is trained to be an arbiter between the target data distribution p ( x ) and the generator distribution . The generator is trained to trick the discriminator into predicting that samples from G ( z ) actually stem from the target distribution . While many different GAN objectives have been proposed , the standard “ Non-Saturating Cost ” generator objective as well as the discriminator objective can be written as LD = max D Ez∼p ( z ) [ 1− logD ( G ( z ) ) ] + Ex∼p ( x ) [ logD ( x ) ] ( 1 ) LG = min G Ez∼p ( z ) [ 1− logD ( G ( z ) ) ] ( 2 ) with p ( z ) the generator prior and p ( x ) a defined target distribution ( e.g . natural images ) . 2.2 FAST ADAPTATION AND GENERALIZATION . Throughout this work , we use the notion of “ fast adaptation ” to novel tasks to measure the transferability of learned features , and as such the generalization and adaptation capacities of a model . Fast adaptation has recently been popularized by different meta-learning strategies ( Finn et al. , 2017 ; Snell et al. , 2017 ) . These methods assume distinct meta-training and meta-testing task distributions , 1By imposing a Gaussian potential over hyperspherical embedding distances or pairwise sample relations . where the goal of a meta-learner is to adapt fast to a novel task given limited samples for learning it . Specifically , a few-shot meta-learner is evaluated to perform n-way classification given k ‘ shots ’ , corresponding to k examples taken from n previously unseen classes . Generally , one distinguishes two types of meta-learners : ones requiringm training iterations for finetuning ( Finn et al. , 2017 ; Rajeswaran et al. , 2019 ) , and ones that do not ( Snell et al. , 2017 ; Lee et al. , 2019 ) . In the meta-learning phase , the meta-learner is trained to solve entire tasks as ( meta-training ) datapoints . Its generalization is measured by how well it can quickly adapt to novel test tasks . Many different strategies have been introduced to maximize the effectiveness of the meta-learning phase such as episodic training , where the model is trained by simulating ‘ test-like ’ conditions ( Vinyals et al. , 2016 ) , or finetuning , where the model performs up to m gradient steps on the new task ( Finn et al. , 2017 ) . While such meta-learning approaches assume the availability of a finetuning budget for adaptation at test time , zero-shot approaches introduce the limit scenario of fast adaptation , in which generalization has to be achieved without access to any examples . Such a setting can be found in metric learning ( Yang & Jin , 2006 ; Suárez et al. , 2018 ) , where a model is evaluated on the ability to perform zero-shot retrieval on novel data . Most commonly , metric models are trained on a training data distribution Dtrain and evaluated on a testing distribution Dtest which share no classes . However , the data generating function is assumed to be similar between Dtrain and Dtest , such as natural images of birds ( Welinder et al. , 2010 ) . While vanilla metric learning learns a parametrized metric on fixed feature extractors , Deep Metric Learning ( DML ) leverages deep neural networks to train the feature extractors concurrently ( Roth et al. , 2020b ) . Such deep abstractions further allow for simplified and computationally cheap metrics such as euclidean distances which make large-scale retrieval applications with fast similarity searches possible ( e.g . Johnson et al . ( 2017 ) ) . Similar to DML , Zero-Shot Domain Adaptation ( ZSDA ) introduces a learner that is also trained and evaluated on two distinctDtrain andDtest in a zero-shot setting . However , unlike DML , in ZSDA , the labels between the data distributions are shared . Instead , training and test distribution come from distinct data generative functions , such as natural images of digits ( Goodfellow et al. , 2013 ) and handwritten images of digits ( LeCun , 1998 ) . 3 EXTENDING NETWORK TRAINING WITH A UNIFORMITY PRIOR . In this section , we introduce the proposed uniformity regularization and detail the employed alternating GAN-like optimization scheme to perform it in a computationally tractable manner . Prior Matching . Given a neural network q ( y|x ) that is parameterized by θ we formally define the training objective as LT ( q ( y|x ) , y ) where LT is any task-specific loss such as a cross-entropy loss , ( x , y ) are samples from the training distribution Dtrain and q ( y|x ) the probability of predicting label y under q . This is a simplified formulation ; in practice , there are many different ways to train a neural network , such as ranking-based training with tuples ( Chopra et al. , 2005 ) . We define the embedding space z as the output of the final convolutional layer of a deep network . Accordingly , we ’ ll note q ( z|x ) as the conditional distribution for that embedding space which , due to the convnet being a deterministic mapping , is a dirac delta distribution at the value of the final convolutional layer . Section 4.1 further details how to apply uniformity regularization in practice . As we ultimately seek to impose a uniformity prior over the learned aggregate feature/embedding “ posterior ” q ( z ) = ∫ x q ( z|x ) p ( x ) dx , we begin by augmenting the generic task-objective to allow for the placement of a prior r ( z ) . For priors r ( z ) with closed-form KL-divergences D , one can define a prior-regularized task objective as L = min θ E ( x , y ) ∼Dtrain [ LT ( q ( y|x ) , y ) ] +Dx∼Dtrain ( q ( z|x ) ‖r ( z ) ) ( 3 ) similar to the Variational Autoencoder formulation in Kingma & Welling ( 2013 ) . However , to improve the generalization of a network by encouraging uniformity in the learned embeddings , we require regularization by matching the learned embedding space to a uniform distribution prior U ( −α , β ) , defined by the lower and upper bounds α and β , respectively . Unfortunately , such a regularization does not have a simple solution in practice , as a bounded uniform distribution has no closed-form KL divergence metric to minimize . Uniformity Regularization . To address the practical limitation of solving Eqn . 3 , we draw upon the GAN literature , in which alternate adversarial optimization has been successfully used to match a generated distribution to a defined target distribution using implicit divergence minimization . Latent variable models such as the Adversarial Autoencoder ( Makhzani et al. , 2015 ) have successfully used such a GAN-style adversarial loss , instead of a KL divergence , in the latent space of the autoencoder to learn a rich posterior . Such implicit divergence minimization allows us to match any well-defined distribution as a prior , but more specifically , ensures that we can successfully match learned embedding spaces to U ( −α , α ) , which we set to the unit hypercube U ( −1 , 1 ) by default . To this end , we adapt the GAN objective in Eqn . 1 and 2 for uniformity regularization optimization and train a discriminator , D , to be an arbiter between which samples are from the learned distribution q ( z|x ) and from the uniform prior r ( z ) . As such , the task model q ( parameterized by θ ) aims to fool the discriminator D into thinking that learned features , q ( z|x ) , come from the chosen uniform target distribution , r ( z ) , while the discriminator D learns to distinguish between learned features and samples taken from the prior , z̃ ∼ r ( z ) . Note that while the task-model defines a deterministic mapping for q ( z|x ) instead of a stochastic one , the aggregate feature “ posterior ” ∫ x q ( z|x ) p ( x ) dx , on which we apply our uniformity prior , is indeed a stochastic distribution ( Makhzani et al. , 2015 ) . Concretely for our uniformity regularization , we rewrite the discriminator objective from Eqn . 1 to account for the uniform prior matching , giving LD = max D Ex∼Dtrain [ log ( 1−D ( q ( z|x ) ) ) ] + Ez̃∼U ( −1,1 ) [ logD ( z̃ ) ] ( 4 ) Consequently , we reformulate the generator objective from Eqn . 2 to reflect the task-model q , Lmax = min θ Ex∼Dtrain [ log ( 1−D ( q ( z|x ) ) ) ] ( 5 ) where we used the notation Lmax to reflect that optimization maximizes the feature uniformity by learning to fool D. Our final min-max uniformity regularized objective for θ and the Discriminator is then given as L = min θ max D E ( x , y ) ∼Dtrain [ LT ( qθ ( y|x ) , y ) ] +γEx∼Dtrain [ log ( 1−D ( qθ ( z|x ) ) ) ] +Ez̃∼U ( −1,1 ) [ logD ( z̃ ) ] ( 6 ) with task-objective LT and training data distribution Dtrain . Using this objective , the learned feature space is implicitly encouraged to become more uniform . The amount of regularization is controlled by the hyperparameter γ , balancing generalization of the model to new tasks and performance on the training task at hand . Large γ values hinder effective feature learning from training data , while values of γ too small result in weak regularization , leading to a non-uniform learned feature distribution with reduced generalization capabilities . | In this paper, the authors claimed that uniformity in embedding space if the key for good generalization, and then propose an adversarial training based method to improve the uniformity of feature space. The claim is from previous work, thus the key contribution is the way to impose such regularization. The method itself makes sense to me. | SP:73bf13710be8ac67ecba0e706e128b807d9d64a5 |
Uniform Priors for Data-Efficient Transfer | 1 INTRODUCTION . Deep Neural Networks have enabled great success in various machine learning domains such as computer vision ( Girshick , 2015 ; He et al. , 2016 ; Long et al. , 2015 ) , natural language processing ( Vaswani et al. , 2017 ; Devlin et al. , 2018 ; Brown et al. , 2020 ) , decision making ( Schulman et al. , 2015 ; 2017 ; Fujimoto et al. , 2018 ) or in medical applications ( Ronneberger et al. , 2015 ; Hesamian et al. , 2019 ) . This can be largely attributed to the ability of networks to extract abstract features from data , which , given sufficient data , can effectively generalize to held-out test sets . However , the degree of generalization scales with the semantic difference between test and training tasks , caused e.g . by domain or distributional shifts between training and test data . Understanding how to achieve generalization under such shifts is an active area of research in fields like MetaLearning ( Snell et al. , 2017 ; Finn et al. , 2017 ; Chen et al. , 2020 ) , Deep Metric Learning ( DML ) ( Roth et al. , 2020b ; Hadsell et al. , 2006 ) , Zero-Shot Domain Adaptation ( ZSDA ) ( Tzeng et al. , 2017 ; Kodirov et al. , 2015 ) or low-level vision tasks ( Tang et al. , 2020 ) . In the few-shot Meta-Learning setting , a meta-learner is tasked to quickly adapt to novel test data given its training experience and a limited labeled data budget ; similarly fields like DML and ZSDA study generalization at the limit of such adaptation , where predictions on novel test data are made without any test-time finetuning . Yet , despite the motivational differences , each of these fields require representations to be learned from the training data that allow for better generalization and adaptation to novel tasks and data . Although there exists a large corpus of domain-specific training methods , in this paper we seek to investigate what fundamental properties learned features and feature spaces should have to facilitate such generalization . Fortunately , recent literature provides pointers towards one such property : the notion of “ feature uniformity ” for improved generalization . For Unsupervised Representation Learning , Wang & Isola ( 2020 ) highlight a link between the uniform distribution of hyperspherical feature representations and the transfer performance in downstream tasks , which has been implicitly adapted in the design of modern contrastive learning methods ( Bachman et al. , 2019 ; Tian et al. , 2020a ; b ) . Similarly , Roth et al . ( 2020b ) show that for Deep Metric Learning , uniformity in hyperspherical embedding space coverage as well as uniform singular value distribution embedding spaces are strongly connected to zero-shot generalization performance . Both Wang & Isola ( 2020 ) and Roth et al . ( 2020b ) link the uniformity in the feature representation space to the preservation of maximal information and reduced overfitting . This suggests that actively imposing a uniformity prior on learned feature representations should encourage better transfer properties by retaining more information and reducing bias towards training tasks , which in turn facilitate better adaptation to novel tasks . However , while both Wang & Isola ( 2020 ) and Roth et al . ( 2020b ) propose methods to incorporate this notion of uniformity , they are defined only for hyperspherical embedding spaces or contrastive learning approaches1 , thus severely limiting the applicability to other domains . To address these limitations and leverage the benefits of uniformity for any type of novel task and data adaptation for deep neural networks , we propose uniformity regularization , which places a uniform hypercube prior on the learned features space during training , without being limited to the contrastive training approaches or a hyperspherical representation space . Unlike e.g . a multivariate Gaussian , the uniform prior puts equal likelihood over the feature space , which then enables the network to make fewer assumptions about the data , limiting model overfitting to the training task . This incentivizes the model to learn more task-agnostic and reusable features , which in turn improve generalization ( Raghu et al. , 2019 ) . Our uniformity regularization follows an adversarial learning framework that allows us to apply our proposed uniformity prior , since a uniform distribution does not have a closed-form divergence minimization scheme . Using this setup , we experimentally demonstrate that uniformity regularization aids generalization in zero-shot setups such as Deep Metric Learning , Domain Adaptation , Out-of-Distribution Detection as well as few-shot Meta-Learning . Furthermore , for Deep Metric learning and few-shot Meta-Learning , we are even able to set a new state-of-the-art over benchmark datasets . Overall , our contributions can be summarized as : • We propose to perform uniformity regularization in the embedding spaces of a deep neural network , using a GAN-like alternating optimization scheme , to increase the transferability of learned features and the ability for better adaptation to novel tasks and data . • Using our proposed regularization , we achieve strong improvements over baseline methods in Deep Metric Learning , Zero-Shot Domain Adaptation , Out-of-Distribution Detection and Meta-Learning . Furthermore , uniformity regularization allows us to set a new state-ofthe-art in Meta-Learning on the Meta-Dataset ( Triantafillou et al. , 2019 ) as well as in Deep Metric Learning over two benchmark datasets ( Welinder et al. , 2010 ; Krause et al. , 2013 ) . 2 BACKGROUND . 2.1 GENERATIVE ADVERSARIAL NETWORKS ( GANS ) . Generative Adversarial Networks ( GANs , Goodfellow et al . ( 2014 ) ) were proposed as a generative model which utilizes an alternative optimization scheme that solves a minimax two-player game between a generator , G , and a discriminator , D. The generator G ( z ) is trained to map samples from a prior z ∼ p ( z ) to the target space , while the discriminator is trained to be an arbiter between the target data distribution p ( x ) and the generator distribution . The generator is trained to trick the discriminator into predicting that samples from G ( z ) actually stem from the target distribution . While many different GAN objectives have been proposed , the standard “ Non-Saturating Cost ” generator objective as well as the discriminator objective can be written as LD = max D Ez∼p ( z ) [ 1− logD ( G ( z ) ) ] + Ex∼p ( x ) [ logD ( x ) ] ( 1 ) LG = min G Ez∼p ( z ) [ 1− logD ( G ( z ) ) ] ( 2 ) with p ( z ) the generator prior and p ( x ) a defined target distribution ( e.g . natural images ) . 2.2 FAST ADAPTATION AND GENERALIZATION . Throughout this work , we use the notion of “ fast adaptation ” to novel tasks to measure the transferability of learned features , and as such the generalization and adaptation capacities of a model . Fast adaptation has recently been popularized by different meta-learning strategies ( Finn et al. , 2017 ; Snell et al. , 2017 ) . These methods assume distinct meta-training and meta-testing task distributions , 1By imposing a Gaussian potential over hyperspherical embedding distances or pairwise sample relations . where the goal of a meta-learner is to adapt fast to a novel task given limited samples for learning it . Specifically , a few-shot meta-learner is evaluated to perform n-way classification given k ‘ shots ’ , corresponding to k examples taken from n previously unseen classes . Generally , one distinguishes two types of meta-learners : ones requiringm training iterations for finetuning ( Finn et al. , 2017 ; Rajeswaran et al. , 2019 ) , and ones that do not ( Snell et al. , 2017 ; Lee et al. , 2019 ) . In the meta-learning phase , the meta-learner is trained to solve entire tasks as ( meta-training ) datapoints . Its generalization is measured by how well it can quickly adapt to novel test tasks . Many different strategies have been introduced to maximize the effectiveness of the meta-learning phase such as episodic training , where the model is trained by simulating ‘ test-like ’ conditions ( Vinyals et al. , 2016 ) , or finetuning , where the model performs up to m gradient steps on the new task ( Finn et al. , 2017 ) . While such meta-learning approaches assume the availability of a finetuning budget for adaptation at test time , zero-shot approaches introduce the limit scenario of fast adaptation , in which generalization has to be achieved without access to any examples . Such a setting can be found in metric learning ( Yang & Jin , 2006 ; Suárez et al. , 2018 ) , where a model is evaluated on the ability to perform zero-shot retrieval on novel data . Most commonly , metric models are trained on a training data distribution Dtrain and evaluated on a testing distribution Dtest which share no classes . However , the data generating function is assumed to be similar between Dtrain and Dtest , such as natural images of birds ( Welinder et al. , 2010 ) . While vanilla metric learning learns a parametrized metric on fixed feature extractors , Deep Metric Learning ( DML ) leverages deep neural networks to train the feature extractors concurrently ( Roth et al. , 2020b ) . Such deep abstractions further allow for simplified and computationally cheap metrics such as euclidean distances which make large-scale retrieval applications with fast similarity searches possible ( e.g . Johnson et al . ( 2017 ) ) . Similar to DML , Zero-Shot Domain Adaptation ( ZSDA ) introduces a learner that is also trained and evaluated on two distinctDtrain andDtest in a zero-shot setting . However , unlike DML , in ZSDA , the labels between the data distributions are shared . Instead , training and test distribution come from distinct data generative functions , such as natural images of digits ( Goodfellow et al. , 2013 ) and handwritten images of digits ( LeCun , 1998 ) . 3 EXTENDING NETWORK TRAINING WITH A UNIFORMITY PRIOR . In this section , we introduce the proposed uniformity regularization and detail the employed alternating GAN-like optimization scheme to perform it in a computationally tractable manner . Prior Matching . Given a neural network q ( y|x ) that is parameterized by θ we formally define the training objective as LT ( q ( y|x ) , y ) where LT is any task-specific loss such as a cross-entropy loss , ( x , y ) are samples from the training distribution Dtrain and q ( y|x ) the probability of predicting label y under q . This is a simplified formulation ; in practice , there are many different ways to train a neural network , such as ranking-based training with tuples ( Chopra et al. , 2005 ) . We define the embedding space z as the output of the final convolutional layer of a deep network . Accordingly , we ’ ll note q ( z|x ) as the conditional distribution for that embedding space which , due to the convnet being a deterministic mapping , is a dirac delta distribution at the value of the final convolutional layer . Section 4.1 further details how to apply uniformity regularization in practice . As we ultimately seek to impose a uniformity prior over the learned aggregate feature/embedding “ posterior ” q ( z ) = ∫ x q ( z|x ) p ( x ) dx , we begin by augmenting the generic task-objective to allow for the placement of a prior r ( z ) . For priors r ( z ) with closed-form KL-divergences D , one can define a prior-regularized task objective as L = min θ E ( x , y ) ∼Dtrain [ LT ( q ( y|x ) , y ) ] +Dx∼Dtrain ( q ( z|x ) ‖r ( z ) ) ( 3 ) similar to the Variational Autoencoder formulation in Kingma & Welling ( 2013 ) . However , to improve the generalization of a network by encouraging uniformity in the learned embeddings , we require regularization by matching the learned embedding space to a uniform distribution prior U ( −α , β ) , defined by the lower and upper bounds α and β , respectively . Unfortunately , such a regularization does not have a simple solution in practice , as a bounded uniform distribution has no closed-form KL divergence metric to minimize . Uniformity Regularization . To address the practical limitation of solving Eqn . 3 , we draw upon the GAN literature , in which alternate adversarial optimization has been successfully used to match a generated distribution to a defined target distribution using implicit divergence minimization . Latent variable models such as the Adversarial Autoencoder ( Makhzani et al. , 2015 ) have successfully used such a GAN-style adversarial loss , instead of a KL divergence , in the latent space of the autoencoder to learn a rich posterior . Such implicit divergence minimization allows us to match any well-defined distribution as a prior , but more specifically , ensures that we can successfully match learned embedding spaces to U ( −α , α ) , which we set to the unit hypercube U ( −1 , 1 ) by default . To this end , we adapt the GAN objective in Eqn . 1 and 2 for uniformity regularization optimization and train a discriminator , D , to be an arbiter between which samples are from the learned distribution q ( z|x ) and from the uniform prior r ( z ) . As such , the task model q ( parameterized by θ ) aims to fool the discriminator D into thinking that learned features , q ( z|x ) , come from the chosen uniform target distribution , r ( z ) , while the discriminator D learns to distinguish between learned features and samples taken from the prior , z̃ ∼ r ( z ) . Note that while the task-model defines a deterministic mapping for q ( z|x ) instead of a stochastic one , the aggregate feature “ posterior ” ∫ x q ( z|x ) p ( x ) dx , on which we apply our uniformity prior , is indeed a stochastic distribution ( Makhzani et al. , 2015 ) . Concretely for our uniformity regularization , we rewrite the discriminator objective from Eqn . 1 to account for the uniform prior matching , giving LD = max D Ex∼Dtrain [ log ( 1−D ( q ( z|x ) ) ) ] + Ez̃∼U ( −1,1 ) [ logD ( z̃ ) ] ( 4 ) Consequently , we reformulate the generator objective from Eqn . 2 to reflect the task-model q , Lmax = min θ Ex∼Dtrain [ log ( 1−D ( q ( z|x ) ) ) ] ( 5 ) where we used the notation Lmax to reflect that optimization maximizes the feature uniformity by learning to fool D. Our final min-max uniformity regularized objective for θ and the Discriminator is then given as L = min θ max D E ( x , y ) ∼Dtrain [ LT ( qθ ( y|x ) , y ) ] +γEx∼Dtrain [ log ( 1−D ( qθ ( z|x ) ) ) ] +Ez̃∼U ( −1,1 ) [ logD ( z̃ ) ] ( 6 ) with task-objective LT and training data distribution Dtrain . Using this objective , the learned feature space is implicitly encouraged to become more uniform . The amount of regularization is controlled by the hyperparameter γ , balancing generalization of the model to new tasks and performance on the training task at hand . Large γ values hinder effective feature learning from training data , while values of γ too small result in weak regularization , leading to a non-uniform learned feature distribution with reduced generalization capabilities . | The authors argue that uniform priors for the high-level latent representations improve transferability, which is beneficial in a number of tasks involving transference. The approach is evaluated on deep metric learning, zero-shot domain adaptation and few-shot meta-learning. The authors propose a uniformity regularization term on the latent representation, implemented as an adversarial discrepancy. The results show consistent improvement in the different tasks. | SP:73bf13710be8ac67ecba0e706e128b807d9d64a5 |
Uncertainty Weighted Offline Reinforcement Learning | 1 INTRODUCTION . Deep reinforcement learning ( RL ) has seen a surge of interest over the recent years . It has achieved remarkable success in simulated tasks ( Silver et al. , 2017 ; Schulman et al. , 2017 ; Haarnoja et al. , 2018 ) , where the cost of data collection is low . However , one of the drawbacks of RL is its difficulty of learning from prior experiences . Therefore , the application of RL to unstructured real-world tasks is still in its primal stages , due to the high cost of active data collection . It is thus crucial to make full use of previously collected datasets whenever large scale online RL is infeasible . Offline batch RL algorithms offer a promising direction to leveraging prior experience ( Lange et al. , 2012 ) . However , most prior off-policy RL algorithms ( Haarnoja et al. , 2018 ; Munos et al. , 2016 ; Kalashnikov et al. , 2018 ; Espeholt et al. , 2018 ; Peng et al. , 2019 ) fail on offline datasets , even on expert demonstrations ( Fu et al. , 2020 ) . The sensitivity to the training data distribution is a well known issue in practical offline RL algorithms ( Fujimoto et al. , 2019 ; Kumar et al. , 2019 ; 2020 ; Peng et al. , 2019 ; Yu et al. , 2020 ) . A large portion of this problem is attributed to actions or states not being covered within the training set distribution . Since the value estimate on out-of-distribution ( OOD ) actions or states can be arbitrary , OOD value or reward estimates can incur destructive estimation errors that propagates through the Bellman loss and destabilizes training . Prior attempts try to avoid OOD actions or states by imposing strong constraints or penalties that force the actor distribution to stay within the training data ( Kumar et al. , 2019 ; 2020 ; Fujimoto et al. , 2019 ; Laroche et al. , 2019 ) . While such approaches achieve some degree of experimental success , they suffer from the loss of generalization ability of the Q function . For example , a state-action pair that does not appear in the training set can still lie within the training set distribution , but policies trained with strong penalties will avoid the unseen states regardless of whether the Q function can produce an accurate estimate of the state-action value . Therefore , strong penalty based solutions often promote a pessimistic and sub-optimal policy . In the extreme case , e.g. , in certain benchmarking environments with human demonstrations , the best performing offline algorithms only achieve the same performance as a random agent ( Fu et al. , 2020 ) , which demonstrates the need of robust offline RL algorithms . In this paper , we hypothesize that a key aspect of a robust offline RL algorithm is a proper estimation and usage of uncertainty . On the one hand , one should be able to reliably assign an uncertainty score to any state-action pair ; on the other hand , there should be a mechanism that utilizes the estimated uncertainty to prevent the model from learning from data points that induce high uncertainty scores . The first problem relates closely to OOD sample detection , which has been extensively studied in the Bayesian deep learning community . ( Gal & Ghahramani , 2016a ; Gal , 2016 ; Osawa et al. , 2019 ) , often measured by the epistemic uncertainty of the model . We adopt the dropout based approach Gal & Ghahramani ( 2016a ) , due to its simplicity and empirical success in practice . For the second problem , we provide an intuitive modification to the Bellman updates in actor-critic based algorithms . Our proposed Uncertainty Weighted Actor Critic ( UWAC ) is to simply down weigh the contribution of target state and action pairs with high uncertainty . By doing so , we prevent the Q function from learning from overly optimistic targets that lie far away from training data distribution ( high uncertainty ) . Empirically , we first verified the effectiveness of dropout uncertainty estimation at detecting OOD samples . We show that the uncertainty estimation makes intuitive sense in a simple environment . With the uncertainty based down weighting scheme , our method significantly improves the training stability over our chosen baseline ( Kumar et al. , 2019 ) , and achieves state-of-the-art performance in a variety of standard benchmarking tasks for offline RL . Overall , our contribution can be summarized as follows : 1 ) We propose a simple and efficient technique ( UWAC ) to counter the effect of OOD samples with no additional loss terms or models . 2 ) We experimentally demonstrate the effectiveness of dropout uncertainty estimation for RL . 3 ) UWAC offers a novel way for stabilizing offline RL . 4 ) UWAC achieves SOTA performance on common offline RL benchmarks , and obtains significant performance gain on narrow human demonstrations . 2 RELATED WORK . In this work , we consider offline batch reinforcement learning ( RL ) under static datasets . Offline RL algorithms are especially prone to errors from inadequate coverage of the training set distribution , distributional shifts during actor critic training , and the variance induced by deep neural networks . Such error have been extensively studied as ” error propagation ” in approximate dynamic programming ( ADP ) ( Bertsekas & Tsitsiklis , 1996 ; Farahmand et al. , 2010 ; Munos , 2003 ; Scherrer et al. , 2015 ) . Scherrer et al . ( 2015 ) obtains a bound on the point-wise Bellman error of approximate modified policy iteration ( AMPI ) with respect to the supremum of the error in function approximation for an arbitrary iteration . We adopt the theoretical tools from ( Kumar et al. , 2019 ) and study the accumulation and propagation of Bellman errors under the offline setting . One of the most significant problems associated with off-policy and offline RL is the bootstrapping error ( Kumar et al. , 2019 ) : When training encounters an action or state unseen within the training set , the critic value estimate on out-of-distribution ( OOD ) samples can be arbitrary and incur an error that destabilizes convergence on all other states ( Kumar et al. , 2019 ; Fujimoto et al. , 2019 ) through the Bellman backup . Yu et al . ( 2020 ) trains a model of the environment that captures the epistemic uncertainty . The uncertainty estimate is used to penalize reward estimation for uncertain states and actions , promoting a pessimistic policy against OOD actions and states . The main drawback of such a model based approach is the unnecessary introduction of a model of the environment – it is often very hard to train a good model . On the other hand , model-free approaches either train an agent pessimistic to OOD states and actions ( Wu et al. , 2019 ; Kumar et al. , 2020 ) or constrain the actor distribution to the training set action distribution ( Fujimoto et al. , 2019 ; Kumar et al. , 2019 ; Wu et al. , 2019 ; Jaques et al. , 2019 ; Fox et al. , 2015 ; Laroche et al. , 2019 ) . However , the pessimistic assumption that all unseen states or actions are bad may lead to a sub-optimal agent and greatly reduce generalization to online fine-tuning ( Nair et al. , 2020 ) . Distributional constraints , in addition , rely on approximations since the actor distribution is often implicit . Such approximations cause practical training instability that we will study in detail in section 5.4 . We propose a model-free actor-critic method that down-weighs the Bellman loss term by inverse uncertainty of the critic target . Uncertainty estimation has been implemented in model-free RL for safety and risk estimation ( Clements et al. , 2019 ; Hoel et al. , 2020 ) or exploration ( Gal & Ghahramani , 2016a ; Lines & Van Der Wilk ) , through ensembling ( Hoel et al. , 2020 ) or distributional RL ( Dabney et al. , 2018 ; Clements et al. , 2019 ) . However , distributional RL works best on discrete action spaces ( Dabney et al. , 2018 ) and require additional distributional assumptions when extended to continuous action spaces ( Clements et al. , 2019 ) . Our approach estimates uncertainty through Monte Carlo dropout ( MC-dropout ) ( Srivastava et al. , 2014 ) . MC-dropout uncertainty estimation is a simple method with minimal overhead and has been thoroughly studied in many traditional supervised learning tasks in deep learning ( Gal & Ghahramani , 2016a ; Hron et al. , 2018 ; Kingma et al. , 2015 ; Gal & Ghahramani , 2016b ) . Moreover , we observe experimentally that MC-dropout uncertainty estimation behaves similarly to explicit ensemble models where the prediction is the mean of the ensembles , while being much simpler ( Lakshminarayanan et al. , 2017 ; Srivastava et al. , 2014 ) . The most relevant to our work are MOPO ( Yu et al. , 2020 ) , BEAR ( Kumar et al. , 2019 ) , and CQL ( Kumar et al. , 2020 ) . MOPO approaches offline RL from a different model-based paradigm , and obtains competitive results on some tasks with wide data distribution . However , due to the model-based nature , MOPO achieves limited performance on most other benchmarks due to the performance of the model being limited by the data distribution . On the other hand , BEAR and CQL both use actorcritic and do not suffer from the above problem . We use BEAR ( discussed in section 3.2 ) as our baseline algorithm and achieve significant performance gain through dropout uncertainty weighted backups . CQL avoids OOD states/actions through direct Q value penalty on actions that leads to OOD unseen states within the training set . However the penalty proposed by CQL 1 ) risks hurting Q estimates for ( action , state ) pairs that are not OOD , since samples not seen within the dataset can still lie within the true dataset distribution ; 2 ) limits the policy to be pessimistic , which may be hard to fine-tune once on-policy data becomes available . Additionally our method is not limited to BEAR and can apply to other actor-critic methods like CQL . We leave such exploration to future works . 3 PRELIMINARIES . 3.1 NOTATIONS . Following Kumar et al . ( 2019 ) , we represent the environment as a Markov decision process ( MDP ) comprising of a 6-tuple ( S , A , P , R , ρ0 , γ ) , where S is the state space , A is the action space , P ( s′|s , a ) is the transition probability distribution , ρ0 is the initial state distribution , R : S×A → R is the reward function , and γ ∈ ( 0 , 1 ] is the discount factor . Our goal is to find a policy π ( s|a ) from the set of policy functions Π to maximize the expected cumulative discounted reward . Standard Q-learning learns an optimal state-action value function Q∗ ( s , a ) , representing the expected cumulative discounted reward starting from s with action a and then acting optimally thereafter . Q-learning is trained on the Bellman equation defined as follows with the Bellman optimal operator T defined by : T Q ( s , a ) : = R ( s , a ) + γEP ( s′|s , a ) [ max a′ Q ( s′ , a′ ) ] ( 1 ) In practice , the critic ( Q function ) is updated through dynamic programming , by projecting the target Q estimate ( T Q ) into Q ( i.e . minimizing Bellman Squared Error E [ ( Q− T Q ) 2 ] ) . Since maxa′ Q ( s ′ , a′ ) in generally intractable in continuous action spaces , an actor ( πθ ) function is learned to maximize the critic function ( πθ ( s ) : = arg maxaQ ( s , a ) ) ( Haarnoja et al. , 2018 ; Fujimoto et al. , 2018 ; Sutton & Barto , 2018 ) . In the context of offline reinforcement learning , naively performing maxa′ Q ( s′ , a′ ) in equation 1 may result in an a′ unseen within the training dataset ( OOD ) , and resulting in aQ estimate with very large error that can propagate through the Bellman bootstrapping and destabilize training on other states ( Kumar et al. , 2019 ) . | This paper proposes to use an uncertainty-weighted objective for offline RL with BEAR (Kumar et al.) that penalizes the MMD distance between the learned policy and the previous policy. The uncertainty weighted objective weights the policy improvement objective with the variance in the Q-function, where this variance primarily represents aleatoric or intrinsic uncertainty, not the epistemic or belief uncertainty. They show that their method performs reasonably better than prior methods on the D4RL datasets and show that the learned Q-values are better than BEAR. | SP:650d7f17c93a91cce9f886766671ed19044deecd |
Uncertainty Weighted Offline Reinforcement Learning | 1 INTRODUCTION . Deep reinforcement learning ( RL ) has seen a surge of interest over the recent years . It has achieved remarkable success in simulated tasks ( Silver et al. , 2017 ; Schulman et al. , 2017 ; Haarnoja et al. , 2018 ) , where the cost of data collection is low . However , one of the drawbacks of RL is its difficulty of learning from prior experiences . Therefore , the application of RL to unstructured real-world tasks is still in its primal stages , due to the high cost of active data collection . It is thus crucial to make full use of previously collected datasets whenever large scale online RL is infeasible . Offline batch RL algorithms offer a promising direction to leveraging prior experience ( Lange et al. , 2012 ) . However , most prior off-policy RL algorithms ( Haarnoja et al. , 2018 ; Munos et al. , 2016 ; Kalashnikov et al. , 2018 ; Espeholt et al. , 2018 ; Peng et al. , 2019 ) fail on offline datasets , even on expert demonstrations ( Fu et al. , 2020 ) . The sensitivity to the training data distribution is a well known issue in practical offline RL algorithms ( Fujimoto et al. , 2019 ; Kumar et al. , 2019 ; 2020 ; Peng et al. , 2019 ; Yu et al. , 2020 ) . A large portion of this problem is attributed to actions or states not being covered within the training set distribution . Since the value estimate on out-of-distribution ( OOD ) actions or states can be arbitrary , OOD value or reward estimates can incur destructive estimation errors that propagates through the Bellman loss and destabilizes training . Prior attempts try to avoid OOD actions or states by imposing strong constraints or penalties that force the actor distribution to stay within the training data ( Kumar et al. , 2019 ; 2020 ; Fujimoto et al. , 2019 ; Laroche et al. , 2019 ) . While such approaches achieve some degree of experimental success , they suffer from the loss of generalization ability of the Q function . For example , a state-action pair that does not appear in the training set can still lie within the training set distribution , but policies trained with strong penalties will avoid the unseen states regardless of whether the Q function can produce an accurate estimate of the state-action value . Therefore , strong penalty based solutions often promote a pessimistic and sub-optimal policy . In the extreme case , e.g. , in certain benchmarking environments with human demonstrations , the best performing offline algorithms only achieve the same performance as a random agent ( Fu et al. , 2020 ) , which demonstrates the need of robust offline RL algorithms . In this paper , we hypothesize that a key aspect of a robust offline RL algorithm is a proper estimation and usage of uncertainty . On the one hand , one should be able to reliably assign an uncertainty score to any state-action pair ; on the other hand , there should be a mechanism that utilizes the estimated uncertainty to prevent the model from learning from data points that induce high uncertainty scores . The first problem relates closely to OOD sample detection , which has been extensively studied in the Bayesian deep learning community . ( Gal & Ghahramani , 2016a ; Gal , 2016 ; Osawa et al. , 2019 ) , often measured by the epistemic uncertainty of the model . We adopt the dropout based approach Gal & Ghahramani ( 2016a ) , due to its simplicity and empirical success in practice . For the second problem , we provide an intuitive modification to the Bellman updates in actor-critic based algorithms . Our proposed Uncertainty Weighted Actor Critic ( UWAC ) is to simply down weigh the contribution of target state and action pairs with high uncertainty . By doing so , we prevent the Q function from learning from overly optimistic targets that lie far away from training data distribution ( high uncertainty ) . Empirically , we first verified the effectiveness of dropout uncertainty estimation at detecting OOD samples . We show that the uncertainty estimation makes intuitive sense in a simple environment . With the uncertainty based down weighting scheme , our method significantly improves the training stability over our chosen baseline ( Kumar et al. , 2019 ) , and achieves state-of-the-art performance in a variety of standard benchmarking tasks for offline RL . Overall , our contribution can be summarized as follows : 1 ) We propose a simple and efficient technique ( UWAC ) to counter the effect of OOD samples with no additional loss terms or models . 2 ) We experimentally demonstrate the effectiveness of dropout uncertainty estimation for RL . 3 ) UWAC offers a novel way for stabilizing offline RL . 4 ) UWAC achieves SOTA performance on common offline RL benchmarks , and obtains significant performance gain on narrow human demonstrations . 2 RELATED WORK . In this work , we consider offline batch reinforcement learning ( RL ) under static datasets . Offline RL algorithms are especially prone to errors from inadequate coverage of the training set distribution , distributional shifts during actor critic training , and the variance induced by deep neural networks . Such error have been extensively studied as ” error propagation ” in approximate dynamic programming ( ADP ) ( Bertsekas & Tsitsiklis , 1996 ; Farahmand et al. , 2010 ; Munos , 2003 ; Scherrer et al. , 2015 ) . Scherrer et al . ( 2015 ) obtains a bound on the point-wise Bellman error of approximate modified policy iteration ( AMPI ) with respect to the supremum of the error in function approximation for an arbitrary iteration . We adopt the theoretical tools from ( Kumar et al. , 2019 ) and study the accumulation and propagation of Bellman errors under the offline setting . One of the most significant problems associated with off-policy and offline RL is the bootstrapping error ( Kumar et al. , 2019 ) : When training encounters an action or state unseen within the training set , the critic value estimate on out-of-distribution ( OOD ) samples can be arbitrary and incur an error that destabilizes convergence on all other states ( Kumar et al. , 2019 ; Fujimoto et al. , 2019 ) through the Bellman backup . Yu et al . ( 2020 ) trains a model of the environment that captures the epistemic uncertainty . The uncertainty estimate is used to penalize reward estimation for uncertain states and actions , promoting a pessimistic policy against OOD actions and states . The main drawback of such a model based approach is the unnecessary introduction of a model of the environment – it is often very hard to train a good model . On the other hand , model-free approaches either train an agent pessimistic to OOD states and actions ( Wu et al. , 2019 ; Kumar et al. , 2020 ) or constrain the actor distribution to the training set action distribution ( Fujimoto et al. , 2019 ; Kumar et al. , 2019 ; Wu et al. , 2019 ; Jaques et al. , 2019 ; Fox et al. , 2015 ; Laroche et al. , 2019 ) . However , the pessimistic assumption that all unseen states or actions are bad may lead to a sub-optimal agent and greatly reduce generalization to online fine-tuning ( Nair et al. , 2020 ) . Distributional constraints , in addition , rely on approximations since the actor distribution is often implicit . Such approximations cause practical training instability that we will study in detail in section 5.4 . We propose a model-free actor-critic method that down-weighs the Bellman loss term by inverse uncertainty of the critic target . Uncertainty estimation has been implemented in model-free RL for safety and risk estimation ( Clements et al. , 2019 ; Hoel et al. , 2020 ) or exploration ( Gal & Ghahramani , 2016a ; Lines & Van Der Wilk ) , through ensembling ( Hoel et al. , 2020 ) or distributional RL ( Dabney et al. , 2018 ; Clements et al. , 2019 ) . However , distributional RL works best on discrete action spaces ( Dabney et al. , 2018 ) and require additional distributional assumptions when extended to continuous action spaces ( Clements et al. , 2019 ) . Our approach estimates uncertainty through Monte Carlo dropout ( MC-dropout ) ( Srivastava et al. , 2014 ) . MC-dropout uncertainty estimation is a simple method with minimal overhead and has been thoroughly studied in many traditional supervised learning tasks in deep learning ( Gal & Ghahramani , 2016a ; Hron et al. , 2018 ; Kingma et al. , 2015 ; Gal & Ghahramani , 2016b ) . Moreover , we observe experimentally that MC-dropout uncertainty estimation behaves similarly to explicit ensemble models where the prediction is the mean of the ensembles , while being much simpler ( Lakshminarayanan et al. , 2017 ; Srivastava et al. , 2014 ) . The most relevant to our work are MOPO ( Yu et al. , 2020 ) , BEAR ( Kumar et al. , 2019 ) , and CQL ( Kumar et al. , 2020 ) . MOPO approaches offline RL from a different model-based paradigm , and obtains competitive results on some tasks with wide data distribution . However , due to the model-based nature , MOPO achieves limited performance on most other benchmarks due to the performance of the model being limited by the data distribution . On the other hand , BEAR and CQL both use actorcritic and do not suffer from the above problem . We use BEAR ( discussed in section 3.2 ) as our baseline algorithm and achieve significant performance gain through dropout uncertainty weighted backups . CQL avoids OOD states/actions through direct Q value penalty on actions that leads to OOD unseen states within the training set . However the penalty proposed by CQL 1 ) risks hurting Q estimates for ( action , state ) pairs that are not OOD , since samples not seen within the dataset can still lie within the true dataset distribution ; 2 ) limits the policy to be pessimistic , which may be hard to fine-tune once on-policy data becomes available . Additionally our method is not limited to BEAR and can apply to other actor-critic methods like CQL . We leave such exploration to future works . 3 PRELIMINARIES . 3.1 NOTATIONS . Following Kumar et al . ( 2019 ) , we represent the environment as a Markov decision process ( MDP ) comprising of a 6-tuple ( S , A , P , R , ρ0 , γ ) , where S is the state space , A is the action space , P ( s′|s , a ) is the transition probability distribution , ρ0 is the initial state distribution , R : S×A → R is the reward function , and γ ∈ ( 0 , 1 ] is the discount factor . Our goal is to find a policy π ( s|a ) from the set of policy functions Π to maximize the expected cumulative discounted reward . Standard Q-learning learns an optimal state-action value function Q∗ ( s , a ) , representing the expected cumulative discounted reward starting from s with action a and then acting optimally thereafter . Q-learning is trained on the Bellman equation defined as follows with the Bellman optimal operator T defined by : T Q ( s , a ) : = R ( s , a ) + γEP ( s′|s , a ) [ max a′ Q ( s′ , a′ ) ] ( 1 ) In practice , the critic ( Q function ) is updated through dynamic programming , by projecting the target Q estimate ( T Q ) into Q ( i.e . minimizing Bellman Squared Error E [ ( Q− T Q ) 2 ] ) . Since maxa′ Q ( s ′ , a′ ) in generally intractable in continuous action spaces , an actor ( πθ ) function is learned to maximize the critic function ( πθ ( s ) : = arg maxaQ ( s , a ) ) ( Haarnoja et al. , 2018 ; Fujimoto et al. , 2018 ; Sutton & Barto , 2018 ) . In the context of offline reinforcement learning , naively performing maxa′ Q ( s′ , a′ ) in equation 1 may result in an a′ unseen within the training dataset ( OOD ) , and resulting in aQ estimate with very large error that can propagate through the Bellman bootstrapping and destabilize training on other states ( Kumar et al. , 2019 ) . | This paper considers the problem of dealing with uncertainty for static datasets in offlineRL. The authors propose a novel algorithm ‘UWAC’, uncertainty weighted actor-critic. UWAC takes a Bayesian perspective of RL, and uses Monte Carlo dropout for detecting, down-weighting OOD samples. Building on BEAR, they estimate the epistemic uncertainty as the Var(Q(s, a)), and modify the update to downweight samples with higher variance. On D4RL datasets, UWAC seems to perform competitively against model-based baselines like MOPO, model-free baselines like BEAR/CQL. | SP:650d7f17c93a91cce9f886766671ed19044deecd |
Improving Graph Neural Network Expressivity via Subgraph Isomorphism Counting | 1 INTRODUCTION . The field of graph representation learning has undergone a rapid growth in the past few years . In particular , Graph Neural Networks ( GNNs ) , a family of neural architectures designed for irregularly structured data , have been successfully applied to problems ranging from social networks and recommender systems ( Ying et al. , 2018a ) to bioinformatics ( Fout et al. , 2017 ; Gainza et al. , 2020 ) , chemistry ( Duvenaud et al. , 2015 ; Gilmer et al. , 2017 ; Sanchez-Lengeling et al. , 2019 ) and physics ( Kipf et al. , 2018 ; Battaglia et al. , 2016 ) , to name a few . Most GNN architectures are based on message passing ( Gilmer et al. , 2017 ) , where at each layer the nodes are updated by information aggregated from their neighbours . A crucial difference from traditional neural networks operating on grid-structured data is the absence of canonical ordering of the nodes in a graph . To address this , the aggregation function is constructed to be invariant to neighbourhood permutations and , as a consequence , to graph isomorphism . This kind of symmetry is not always desirable and thus different inductive biases that disambiguate the neighbours have been proposed . For instance , in geometric graphs , such as 3D molecular graphs and meshes , directional biases are usually employed in order to model the positional information of the nodes ( Masci et al. , 2015 ; Monti et al. , 2017 ; Bouritsas et al. , 2019 ; Klicpera et al. , 2020 ; de Haan et al. , 2020b ) ; for proteins , ordering information is used to disambiguate amino-acids at different positions in the sequence ( Ingraham et al. , 2019 ) ; in multi-relational knowledge graphs , a different aggregation is performed for each relation type ( Schlichtkrull et al. , 2018 ) . The structure of the graph itself does not usually explicitly take part in the aggregation function . In fact , most models rely on multiple message passing steps as a means for each node to discover the global structure of the graph . However , since message-passing GNNs are at most as powerful as the Weisfeiler Lehman test ( WL ) ( Xu et al. , 2019 ; Morris et al. , 2019 ) , they are limited in their abilities to adequately exploit the graph structure , e.g . by counting substructures ( Arvind et al. , 2019 ; Chen et al. , 2020 ) . This uncovers a crucial limitation of GNNs , as substructures have been widely recognised as important in the study of complex networks . For example , in molecular chemistry , functional groups and rings are related to a plethora of chemical properties , while cliques are related to protein complexes in Protein-Protein Interaction networks and community structure in social networks , respectively ( Granovetter , 1982 ; Girvan & Newman , 2002 ) . Motivated by this observation , in this work we propose Graph Substructure Network ( GSN ) , a new symmetry breaking mechanism for GNNs based on introducing structural biases in the aggregation function . In particular , each message is transformed differently depending on the topological relationship between the endpoint nodes . This relationship is expressed by counting the appearance of certain substructures , the choice of which allows us to provide the model with different inductive biases , based on the graph distribution at hand . The substructures are encoded as structural identifiers that are assigned to either the nodes or edges of the graph and can thus disambiguate the neighbouring nodes that take part in the aggregation . We characterise the expressivity of substructure encoding in GNNs , showing that GSNs are strictly more expressive than traditional GNNs for the vast majority of substructures while retaining the locality of message passing , as opposed to higher-order methods ( Maron et al. , 2019b ; c ; a ; Morris et al. , 2019 ) that follow the WL hierarchy ( see Section 2 ) . In the limit , our model can yield a unique representation for every isomorphism class and is thus universal . We provide an extensive experimental evaluation on hard instances of graph isomorphism testing ( strongly regular graphs ) , as well as on real-world networks from the social and biological domains , including the recently introduced large-scale benchmarks ( Dwivedi et al. , 2020 ; Hu et al. , 2020 ) . We observe that when choosing the structural inductive biases based on domain-specific knowledge , GSN achieves state-ofthe-art results . 2 PRELIMINARIES . Let G = ( VG , EG ) be a graph with vertex set VG and undirected edge set EG . A subgraph GS = ( VGS , EGS ) of G is any graph with VGS ⊆ VG , EGS ⊆ EG . When EGS includes all the edges of G with endpoints in VGS , i.e . EGS = { ( v , u ) ∈ E : v , u ∈ VGS } , the subgraph is said to be induced . Isomorphisms Two graphs G , H are isomorphic ( denoted H ' G ) , if there exists an adjacencypreserving bijective mapping ( isomorphism ) f : VG → VH , i.e . ( v , u ) ∈ EG iff ( f ( v ) , f ( u ) ) ∈ EH . Given some small graph H , the subgraph isomorphism problem amounts to finding a subgraph GS of G such that GS ' H . An automorphism of H is an isomorphism that maps H onto itself . The set of all the unique automorphisms form the automorphism group of the graph , denoted as Aut ( H ) , contains all the possible symmetries of the graph . The automorphism group yields a partition of the vertices into disjoint subsets of VH called orbits . Intuitively , this concept allows us to group the vertices based on their structural roles , e.g . the end vertices of a path , or all the vertices of a cycle ( see Figure 1 ) . Formally , the orbit of a vertex v ∈ VH is the set of vertices to which it can be mapped via an automorphism : Orb ( v ) = { u ∈ VH : ∃g ∈ Aut ( H ) s.t . g ( u ) = v } , and the set of all orbits H \Aut ( H ) = { Orb ( v ) : v ∈ VH } is usually called the quotient of the automorphism when it acts on the graph H . We are interested in the unique elements of this set that we will denote as { OVH,1 , OVH,2 , . . . , OVH , dH } , where dH is the cardinality of the quotient . Analogously , we define edge structural roles via edge automorphisms , i.e . bijective mappings from the edge set onto itself , that preserve edge adjacency ( two edges are adjacent if they share a common endpoint ) . In particular , every vertex automorphism g induces an edge automorphism by mapping each edge { u , v } to { g ( u ) , g ( v ) } . 1 In the same way as before , we construct the edge automorphism group , from which we deduce the partition of the edge set in edge orbits { OEH,1 , OEH,2 , . . . , OEH , dH } . Weisfeiler-Lehman tests : The Weisfeiler-Lehman graph-isomorphism test ( Weisfeiler & Leman , 1968 ) , also known as naive vertex refinement , 1-WL , or just WL ) , is a fast heuristic to decide if two graphs are isomorphic or not . The WL test proceeds as follows : every vertex v is initially assigned a colour c0 ( v ) that is later iteratively refined by aggregating neighbouring information : 1Note that the edge automorphism group is larger than that of induced automorphisms , but strictly larger only for 3 trivial cases ( Whitney , 1932 ) . However , induced automorphisms provide a more natural way to express edge structural roles . ct+1 ( v ) = HASH ( ct ( v ) , Hct ( u ) Iu∈N ( v ) ) , where H·I denotes a multiset ( a set that allows element repetitions ) and N ( v ) is the neighbourhood of v. The WL algorithm terminates when the colours stop changing , and outputs a histogram of colours . Two graphs with different histograms are nonisomorphic ; if the histograms are identical , the graphs are possibly , but not necessarily , isomorphic . Note that the neighbour aggregation in the WL test is a form of message passing , and GNNs are the learnable analogue . A series of works on improving GNN expressivity mimic the higher-order generalisations of WL , known as k-WL and k-Folklore WL ( WL hierarchy ) and operate on k-tuples of nodes ( see Appendix B.1 ) . The ( k + 1 ) -FWL is strictly stronger than k-FWL , k-FWL is as strong as ( k + 1 ) -WL and 2-FWL is strictly stronger than the simple 1-WL test . 3 GRAPH SUBSTRUCTURE NETWORKS . Graphs consist of nodes ( or edges ) with repeated structural roles . Thus , it is natural for a neural network to treat them in a similar manner , akin to weight sharing between local patches in CNNs for images ( LeCun et al. , 1989 ) or positional encodings in language models for sequential data ( Sukhbaatar et al. , 2015 ; Gehring et al. , 2017 ; Vaswani et al. , 2017 ) . Nevertheless , GNNs are usually unaware of the nodes ’ different structural roles , since all nodes are treated equally when performing local operations . Despite the initial intuition that the neural network would be able to discover these roles by constructing deeper architectures , it has been shown that GNNs are ill-suited for this purpose and are blind to the existence of structural properties , e.g . triangles or larger cycles ( Chen et al. , 2020 ; Arvind et al. , 2019 ) . To this end , we propose to explicitly encode structural roles as part of message passing , in order to capture richer topological properties . Our method draws inspiration from Loukas ( 2020 ) , where it was shown that GNNs become universal when the nodes in the graph are uniquely identified , i.e when they are equipped with different features . However , it is not clear how to choose these identifiers in a way that can allow the neural network to generalise . Structural roles , when treated as identifiers , although not necessarily unique , are more amenable to generalisation due to their repetition across different graphs . Thus , they can constitute a trade-off between uniqueness and generalisation . Structural features : Structural roles are encoded into features by counting the appearance of certain substructures . The larger the substructure collection , the more fine-grained the partition of nodes into roles will be . LetH = { H1 , H2 . . . HK } be a set of small ( connected ) graphs , for example cycles of fixed length or cliques . For each graph H ∈ H , we first find its isomorphic subgraphs in G denoted as GS . For each node v ∈ VGS we infer its role w.r.t . H by obtaining the orbit of its mapping f ( v ) in H , OrbH ( f ( v ) ) . By counting all the possible appearances of different orbits in v , we obtain the vertex structural feature xVH ( v ) of v , defined as follows : xVH , i ( v ) = | { GS ' H : v ∈ VGS s.t . f ( v ) ∈ OVH , i } | |Aut ( H ) | , i = 1 , . . . , dH . ( 1 ) We divide the counts by the number of the automorphisms of H , since for every matched subgraph GS there will always be |Aut ( H ) | different ways to map it to H , thus these repetitions will be uninformative . By combining the counts from different substructures inH and different orbits , we obtain the feature vector xV ( v ) = [ xVH1 ( v ) , . . . , x V HK ( v ) ] ∈ ND×1 of dimension D = ∑ Hi∈H dHi . Similarly , we can define edge structural features xEH , i ( { u , v } ) by counting occurrences of edge automorphism orbits : xEH , i ( { u , v } ) = | { GS ' H : { u , v } ∈ EGS s.t . { f ( u ) , f ( v ) } ∈ OEH , i } | |Aut ( H ) | , ( 2 ) and the combined edge features xE ( { u , v } ) = [ xEH1 ( { u , v } ) , . . . , x E HK ( { u , v } ) ] . An example of vertex and edge structural features is illustrated in Figure 1 . Structure-aware message passing : The key building block of our architecture is the graph substructure layer , defined in a general manner as a Message Passing Neural Network ( MPNN ) ( Gilmer et al. , 2017 ) , where now the messages from the neighbouring nodes also contain the structural information . In particular , each node v updates its state ht ( v ) by combining its previous state with the aggregated messages : ht+1 ( v ) = UPt+1 ( ht ( v ) , MSGt+1 ( v ) ) , where the UPt+1 function is a multilayer perceptron ( MLP ) and the message aggregation is a summation of features transformed by an MLP M t+1 as follows : MSGt+1 ( v ) = ∑ u∈N ( v ) M t+1 ( ht ( v ) , ht ( u ) , xV ( v ) , xV ( u ) , e ( { u , v } ) ) ( 3 ) MSGt+1 ( v ) = ∑ u∈N ( v ) M t+1 ( ht ( v ) , ht ( u ) , xE ( { u , v } ) , e ( { u , v } ) ) ( 4 ) where the two variants , named GSN-v and GSN-e , correspond to vertex- or edge-counts , respectively , and e ( { u , v } ) denotes edge features . The two variants are analogous to absolute and relative positional encodings in language models ( Shaw et al. , 2018 ; Dai et al. , 2019 ) . It is important to note here that contrary to identifier-based GNNs ( Loukas , 2020 ; Sato et al. , 2020 ; Dasoulas et al. , 2020 ) that obtain universality at the expense of permutation equivariance ( since the identifiers are arbitrarily chosen with the sole requirement of being unique ) , GSNs retain the attractive inductive bias of the permutation equivariant property . This stems from the fact that the process generating our structural identifiers ( i.e . subgraph isomorphism ) is permutation equivariant itself ( proof provided in the appendix ) . How powerful are GSNs ? We now turn to the expressive power of GSNs in comparison to MPNNs and the WL tests , a key tool for the theoretical analysis of the expressivity of graph neural networks so far . Since GSN is a generalisation of MPNNs , it is easy to see that it is at least as powerful . Importantly , GSNs have the capacity to learn functions that traditional MPNNs can not learn . The following observation derives directly from the analysis of the counting abilities of the 1-WL test ( Arvind et al. , 2019 ) and its extension to MPNNs ( Chen et al. , 2020 ) ( for proofs , see Appendix A.2 ) . Proposition 3.1 . GSN is strictly more powerful than MPNN and the 1-WL test when one of the following holds : a ) H is any graph except for star graphs of any size and structural features are inferred by subgraph matching , i.e . we count all subgraphs GS ∼= H for which it holds that EGS ⊆ EG , or b ) H is any graph except for single edges and single nodes and structural features are inferred by induced subgraph matching , i.e . we count all subgraphs GS ∼= H for which it holds that EGS = EG ∩ ( VGS × VGS ) . An important question is which substructures are the most informative and whether they can completely characterise the graph . As of today , we are not aware of any results in graph theory that can guarantee the reconstruction of a graph from a smaller collection of its subgraphs . In fact , the Reconstruction Conjecture ( Kelly et al. , 1957 ; Ulam , 1960 ) , states that a graph with size n ≥ 3 can be reconstructed from its vertex-deleted subgraphs . Moreover , it is known ( Dasoulas et al. , 2020 ; Chen et al. , 2019 ) that solving graph isomorphism is equivalent to universal approximation of permutation invariant functions defined on graphs . Thus , we can state the following for GSN : Corollary 3.1 . If the Reconstruction Conjecture holds , GSN can distinguish all non-isomorphic graphs of size n and is therefore universal , whenH contains all substructures of size k = n− 1 . How to choose the substructures ? The Reconstruction Conjecture has only been proven for n ≤ 11 ( McKay , 1997 ) and still remains open for larger graphs , while to the best of our knowledge , there is no similar hypothesis for smaller values of k. However , in practice we observe that small substructures of size k = O ( 1 ) are sufficient both for resolving hard instances of graph isomorphism as well as for tasks related to real-world networks . In particular , although our method does not attempt to align with the WL hierarchy , an interesting observation that we make is that small substructures have the capacity to distinguish strongly regular graphs , where 2-FWL provably fails ( proven in Appendix B.3 ) . This is illustrated in Figure 2 ( right ) , where counting 4-cliques is sufficient to disambiguate this exemplary pair , and in Section 5 , where a large scale experimental study is conducted . In real-world scenarios , using too many and too large subgraphs will not only be expensive to compute , but they might also lead to overfitting . As an alternative , one can choose only the most discriminative subgraphs , i.e . the ones that can achieve the maximum possible node disambiguation , similarly to identifier-based approaches . Note that this approach solely takes into account expressivity and does not provide any guarantee about generalisation . This is empirically validated in Figure 4 , where we observe that choosing substructures with strong node disambiguation properties allows for better fitting of the training data , but the test set performance does not necessarily improve . Aiming at better generalisation , it is desirable to make use of substructures for which there is substantial prior knowledge of their importance in certain network distributions and have been observed to be intimately related to various properties . For example , small substructures ( graphlets ) have been extensively analysed in protein-protein interaction networks ( Pržulj et al. , 2004 ) , triangles and cliques characterise the structure of ego-nets and social networks in general ( Granovetter , 1982 ) , simple cycles ( rings ) are central in molecular distributions , directed and temporal motifs have been shown to explain the working mechanisms of gene regulatory networks , biological neural networks , transportation networks and food webs ( Milo et al. , 2002 ; Paranjape et al. , 2017 ; Benson et al. , 2016 ) . In Figure 6 in the Appendix , we showcase the importance of these inductive biases : a cycle-based GSN predicting molecular properties achieves smaller generalisation gap compared to a traditional MPNN , while at the same time generalising better with less training data . Choosing the best substructure collection is still an open problem ; various heuristics can be used ( motif frequencies , feature selection strategies ) or ideally by learning the substructure dictionary in an end-to-end manner . Answering this question is left for future work . GSN-v vs GSN-e : Finally , we examine the expressive power of the two proposed variants . A crucial observation that we make , is that for each graph H in the collection , the vertex structural identifiers can be reconstructed by the corresponding edge identifiers . Thus , we can show that for every GSN-v there exists a GSN-e that can simulate the behaviour of the former ( proof provided in Appendix A.3 ) . Proposition 3.2 . For a given subgraph collectionH , let CV the set of functions that can be expressed by a GSN-v with arbitrary depth and with , and CE the set of functions that can be expressed by a GSN-e with the same properties . Then , it holds that CE ⊇ CV , or in other words GSN-e is at least as expressive as GSN-v . Complexity : The complexity of GSN comprises two parts : precomputation ( substructure counting ) and training/testing . The key appealing property is that training and inference are linear w.r.t the number of edges , O ( |E| ) , as opposed to higher-order methods ( Maron et al. , 2019a ; Morris et al. , 2019 ) with O ( nk ) training complexity and relational pooling ( Murphy et al. , 2019 ) with O ( n ! ) training complexity in absence of approximations . The worst-case complexity of subgraph isomorphism of fixed size k is O ( nk ) , by examining all the possible k-tuples in the graph . However , for specific types of subgraphs , such as paths and cycles , the problem can be solved even faster ( see e.g . Giscard et al . ( 2019 ) ) . Approximate counting algorithms are also widely used , especially for counting frequent network motifs ( Kashtan et al. , 2004 ; Wernicke , 2005 ; 2006 ; Wernicke & Rasche , 2006 ) , and can provide a considerable speed-up . Furthermore , recent neural approaches ( Ying et al. , 2020b ; a ) provide fast approximate counting . In our experiments , we performed exact counting using the common isomorphism algorithm VF2 ( Cordella et al. , 2004 ) . Although its worst case complexity is O ( nk ) , it scales better in practice , for instance when the candidate subgraph is infrequently matched or when the graphs are sparse , and is also trivially parallelisable . In Figure 3 , we show a quantitative analysis of the empirical runtime of the counting algorithm against the worst case , for three different graph distributions : molecules , protein contact maps , social networks . It is easy to see that when the graphs are sparse ( for the first two cases ) and the number of matches is small , the algorithm is significantly faster than the worst case , while it scales better with the size of the graph n. Even , in the case of social networks , where several examples are near-complete graphs , both the runtime and the growth w.r.t both n and k are better than the worst case . Overall , the preprocessing computational burden in most of the cases remains negligible for relatively small and sparse graphs , as it is the case of molecules . | This paper presents a natural extension of Message Passing Neural Net (MPNN) by incorporating structural features. These structural features are computed as the counts from different substructures (like small lines, stars or complete graphs) induced in the original graph. These counts are combined to obtain a new feature per node or per edge. Then these features are used in a standard MPNN. The authors then show that the resulting GNN is more expressive and they validate this claim experimentally. | SP:d6b0ad3bacba7ba1a532470056cd180ec9bf9688 |
Improving Graph Neural Network Expressivity via Subgraph Isomorphism Counting | 1 INTRODUCTION . The field of graph representation learning has undergone a rapid growth in the past few years . In particular , Graph Neural Networks ( GNNs ) , a family of neural architectures designed for irregularly structured data , have been successfully applied to problems ranging from social networks and recommender systems ( Ying et al. , 2018a ) to bioinformatics ( Fout et al. , 2017 ; Gainza et al. , 2020 ) , chemistry ( Duvenaud et al. , 2015 ; Gilmer et al. , 2017 ; Sanchez-Lengeling et al. , 2019 ) and physics ( Kipf et al. , 2018 ; Battaglia et al. , 2016 ) , to name a few . Most GNN architectures are based on message passing ( Gilmer et al. , 2017 ) , where at each layer the nodes are updated by information aggregated from their neighbours . A crucial difference from traditional neural networks operating on grid-structured data is the absence of canonical ordering of the nodes in a graph . To address this , the aggregation function is constructed to be invariant to neighbourhood permutations and , as a consequence , to graph isomorphism . This kind of symmetry is not always desirable and thus different inductive biases that disambiguate the neighbours have been proposed . For instance , in geometric graphs , such as 3D molecular graphs and meshes , directional biases are usually employed in order to model the positional information of the nodes ( Masci et al. , 2015 ; Monti et al. , 2017 ; Bouritsas et al. , 2019 ; Klicpera et al. , 2020 ; de Haan et al. , 2020b ) ; for proteins , ordering information is used to disambiguate amino-acids at different positions in the sequence ( Ingraham et al. , 2019 ) ; in multi-relational knowledge graphs , a different aggregation is performed for each relation type ( Schlichtkrull et al. , 2018 ) . The structure of the graph itself does not usually explicitly take part in the aggregation function . In fact , most models rely on multiple message passing steps as a means for each node to discover the global structure of the graph . However , since message-passing GNNs are at most as powerful as the Weisfeiler Lehman test ( WL ) ( Xu et al. , 2019 ; Morris et al. , 2019 ) , they are limited in their abilities to adequately exploit the graph structure , e.g . by counting substructures ( Arvind et al. , 2019 ; Chen et al. , 2020 ) . This uncovers a crucial limitation of GNNs , as substructures have been widely recognised as important in the study of complex networks . For example , in molecular chemistry , functional groups and rings are related to a plethora of chemical properties , while cliques are related to protein complexes in Protein-Protein Interaction networks and community structure in social networks , respectively ( Granovetter , 1982 ; Girvan & Newman , 2002 ) . Motivated by this observation , in this work we propose Graph Substructure Network ( GSN ) , a new symmetry breaking mechanism for GNNs based on introducing structural biases in the aggregation function . In particular , each message is transformed differently depending on the topological relationship between the endpoint nodes . This relationship is expressed by counting the appearance of certain substructures , the choice of which allows us to provide the model with different inductive biases , based on the graph distribution at hand . The substructures are encoded as structural identifiers that are assigned to either the nodes or edges of the graph and can thus disambiguate the neighbouring nodes that take part in the aggregation . We characterise the expressivity of substructure encoding in GNNs , showing that GSNs are strictly more expressive than traditional GNNs for the vast majority of substructures while retaining the locality of message passing , as opposed to higher-order methods ( Maron et al. , 2019b ; c ; a ; Morris et al. , 2019 ) that follow the WL hierarchy ( see Section 2 ) . In the limit , our model can yield a unique representation for every isomorphism class and is thus universal . We provide an extensive experimental evaluation on hard instances of graph isomorphism testing ( strongly regular graphs ) , as well as on real-world networks from the social and biological domains , including the recently introduced large-scale benchmarks ( Dwivedi et al. , 2020 ; Hu et al. , 2020 ) . We observe that when choosing the structural inductive biases based on domain-specific knowledge , GSN achieves state-ofthe-art results . 2 PRELIMINARIES . Let G = ( VG , EG ) be a graph with vertex set VG and undirected edge set EG . A subgraph GS = ( VGS , EGS ) of G is any graph with VGS ⊆ VG , EGS ⊆ EG . When EGS includes all the edges of G with endpoints in VGS , i.e . EGS = { ( v , u ) ∈ E : v , u ∈ VGS } , the subgraph is said to be induced . Isomorphisms Two graphs G , H are isomorphic ( denoted H ' G ) , if there exists an adjacencypreserving bijective mapping ( isomorphism ) f : VG → VH , i.e . ( v , u ) ∈ EG iff ( f ( v ) , f ( u ) ) ∈ EH . Given some small graph H , the subgraph isomorphism problem amounts to finding a subgraph GS of G such that GS ' H . An automorphism of H is an isomorphism that maps H onto itself . The set of all the unique automorphisms form the automorphism group of the graph , denoted as Aut ( H ) , contains all the possible symmetries of the graph . The automorphism group yields a partition of the vertices into disjoint subsets of VH called orbits . Intuitively , this concept allows us to group the vertices based on their structural roles , e.g . the end vertices of a path , or all the vertices of a cycle ( see Figure 1 ) . Formally , the orbit of a vertex v ∈ VH is the set of vertices to which it can be mapped via an automorphism : Orb ( v ) = { u ∈ VH : ∃g ∈ Aut ( H ) s.t . g ( u ) = v } , and the set of all orbits H \Aut ( H ) = { Orb ( v ) : v ∈ VH } is usually called the quotient of the automorphism when it acts on the graph H . We are interested in the unique elements of this set that we will denote as { OVH,1 , OVH,2 , . . . , OVH , dH } , where dH is the cardinality of the quotient . Analogously , we define edge structural roles via edge automorphisms , i.e . bijective mappings from the edge set onto itself , that preserve edge adjacency ( two edges are adjacent if they share a common endpoint ) . In particular , every vertex automorphism g induces an edge automorphism by mapping each edge { u , v } to { g ( u ) , g ( v ) } . 1 In the same way as before , we construct the edge automorphism group , from which we deduce the partition of the edge set in edge orbits { OEH,1 , OEH,2 , . . . , OEH , dH } . Weisfeiler-Lehman tests : The Weisfeiler-Lehman graph-isomorphism test ( Weisfeiler & Leman , 1968 ) , also known as naive vertex refinement , 1-WL , or just WL ) , is a fast heuristic to decide if two graphs are isomorphic or not . The WL test proceeds as follows : every vertex v is initially assigned a colour c0 ( v ) that is later iteratively refined by aggregating neighbouring information : 1Note that the edge automorphism group is larger than that of induced automorphisms , but strictly larger only for 3 trivial cases ( Whitney , 1932 ) . However , induced automorphisms provide a more natural way to express edge structural roles . ct+1 ( v ) = HASH ( ct ( v ) , Hct ( u ) Iu∈N ( v ) ) , where H·I denotes a multiset ( a set that allows element repetitions ) and N ( v ) is the neighbourhood of v. The WL algorithm terminates when the colours stop changing , and outputs a histogram of colours . Two graphs with different histograms are nonisomorphic ; if the histograms are identical , the graphs are possibly , but not necessarily , isomorphic . Note that the neighbour aggregation in the WL test is a form of message passing , and GNNs are the learnable analogue . A series of works on improving GNN expressivity mimic the higher-order generalisations of WL , known as k-WL and k-Folklore WL ( WL hierarchy ) and operate on k-tuples of nodes ( see Appendix B.1 ) . The ( k + 1 ) -FWL is strictly stronger than k-FWL , k-FWL is as strong as ( k + 1 ) -WL and 2-FWL is strictly stronger than the simple 1-WL test . 3 GRAPH SUBSTRUCTURE NETWORKS . Graphs consist of nodes ( or edges ) with repeated structural roles . Thus , it is natural for a neural network to treat them in a similar manner , akin to weight sharing between local patches in CNNs for images ( LeCun et al. , 1989 ) or positional encodings in language models for sequential data ( Sukhbaatar et al. , 2015 ; Gehring et al. , 2017 ; Vaswani et al. , 2017 ) . Nevertheless , GNNs are usually unaware of the nodes ’ different structural roles , since all nodes are treated equally when performing local operations . Despite the initial intuition that the neural network would be able to discover these roles by constructing deeper architectures , it has been shown that GNNs are ill-suited for this purpose and are blind to the existence of structural properties , e.g . triangles or larger cycles ( Chen et al. , 2020 ; Arvind et al. , 2019 ) . To this end , we propose to explicitly encode structural roles as part of message passing , in order to capture richer topological properties . Our method draws inspiration from Loukas ( 2020 ) , where it was shown that GNNs become universal when the nodes in the graph are uniquely identified , i.e when they are equipped with different features . However , it is not clear how to choose these identifiers in a way that can allow the neural network to generalise . Structural roles , when treated as identifiers , although not necessarily unique , are more amenable to generalisation due to their repetition across different graphs . Thus , they can constitute a trade-off between uniqueness and generalisation . Structural features : Structural roles are encoded into features by counting the appearance of certain substructures . The larger the substructure collection , the more fine-grained the partition of nodes into roles will be . LetH = { H1 , H2 . . . HK } be a set of small ( connected ) graphs , for example cycles of fixed length or cliques . For each graph H ∈ H , we first find its isomorphic subgraphs in G denoted as GS . For each node v ∈ VGS we infer its role w.r.t . H by obtaining the orbit of its mapping f ( v ) in H , OrbH ( f ( v ) ) . By counting all the possible appearances of different orbits in v , we obtain the vertex structural feature xVH ( v ) of v , defined as follows : xVH , i ( v ) = | { GS ' H : v ∈ VGS s.t . f ( v ) ∈ OVH , i } | |Aut ( H ) | , i = 1 , . . . , dH . ( 1 ) We divide the counts by the number of the automorphisms of H , since for every matched subgraph GS there will always be |Aut ( H ) | different ways to map it to H , thus these repetitions will be uninformative . By combining the counts from different substructures inH and different orbits , we obtain the feature vector xV ( v ) = [ xVH1 ( v ) , . . . , x V HK ( v ) ] ∈ ND×1 of dimension D = ∑ Hi∈H dHi . Similarly , we can define edge structural features xEH , i ( { u , v } ) by counting occurrences of edge automorphism orbits : xEH , i ( { u , v } ) = | { GS ' H : { u , v } ∈ EGS s.t . { f ( u ) , f ( v ) } ∈ OEH , i } | |Aut ( H ) | , ( 2 ) and the combined edge features xE ( { u , v } ) = [ xEH1 ( { u , v } ) , . . . , x E HK ( { u , v } ) ] . An example of vertex and edge structural features is illustrated in Figure 1 . Structure-aware message passing : The key building block of our architecture is the graph substructure layer , defined in a general manner as a Message Passing Neural Network ( MPNN ) ( Gilmer et al. , 2017 ) , where now the messages from the neighbouring nodes also contain the structural information . In particular , each node v updates its state ht ( v ) by combining its previous state with the aggregated messages : ht+1 ( v ) = UPt+1 ( ht ( v ) , MSGt+1 ( v ) ) , where the UPt+1 function is a multilayer perceptron ( MLP ) and the message aggregation is a summation of features transformed by an MLP M t+1 as follows : MSGt+1 ( v ) = ∑ u∈N ( v ) M t+1 ( ht ( v ) , ht ( u ) , xV ( v ) , xV ( u ) , e ( { u , v } ) ) ( 3 ) MSGt+1 ( v ) = ∑ u∈N ( v ) M t+1 ( ht ( v ) , ht ( u ) , xE ( { u , v } ) , e ( { u , v } ) ) ( 4 ) where the two variants , named GSN-v and GSN-e , correspond to vertex- or edge-counts , respectively , and e ( { u , v } ) denotes edge features . The two variants are analogous to absolute and relative positional encodings in language models ( Shaw et al. , 2018 ; Dai et al. , 2019 ) . It is important to note here that contrary to identifier-based GNNs ( Loukas , 2020 ; Sato et al. , 2020 ; Dasoulas et al. , 2020 ) that obtain universality at the expense of permutation equivariance ( since the identifiers are arbitrarily chosen with the sole requirement of being unique ) , GSNs retain the attractive inductive bias of the permutation equivariant property . This stems from the fact that the process generating our structural identifiers ( i.e . subgraph isomorphism ) is permutation equivariant itself ( proof provided in the appendix ) . How powerful are GSNs ? We now turn to the expressive power of GSNs in comparison to MPNNs and the WL tests , a key tool for the theoretical analysis of the expressivity of graph neural networks so far . Since GSN is a generalisation of MPNNs , it is easy to see that it is at least as powerful . Importantly , GSNs have the capacity to learn functions that traditional MPNNs can not learn . The following observation derives directly from the analysis of the counting abilities of the 1-WL test ( Arvind et al. , 2019 ) and its extension to MPNNs ( Chen et al. , 2020 ) ( for proofs , see Appendix A.2 ) . Proposition 3.1 . GSN is strictly more powerful than MPNN and the 1-WL test when one of the following holds : a ) H is any graph except for star graphs of any size and structural features are inferred by subgraph matching , i.e . we count all subgraphs GS ∼= H for which it holds that EGS ⊆ EG , or b ) H is any graph except for single edges and single nodes and structural features are inferred by induced subgraph matching , i.e . we count all subgraphs GS ∼= H for which it holds that EGS = EG ∩ ( VGS × VGS ) . An important question is which substructures are the most informative and whether they can completely characterise the graph . As of today , we are not aware of any results in graph theory that can guarantee the reconstruction of a graph from a smaller collection of its subgraphs . In fact , the Reconstruction Conjecture ( Kelly et al. , 1957 ; Ulam , 1960 ) , states that a graph with size n ≥ 3 can be reconstructed from its vertex-deleted subgraphs . Moreover , it is known ( Dasoulas et al. , 2020 ; Chen et al. , 2019 ) that solving graph isomorphism is equivalent to universal approximation of permutation invariant functions defined on graphs . Thus , we can state the following for GSN : Corollary 3.1 . If the Reconstruction Conjecture holds , GSN can distinguish all non-isomorphic graphs of size n and is therefore universal , whenH contains all substructures of size k = n− 1 . How to choose the substructures ? The Reconstruction Conjecture has only been proven for n ≤ 11 ( McKay , 1997 ) and still remains open for larger graphs , while to the best of our knowledge , there is no similar hypothesis for smaller values of k. However , in practice we observe that small substructures of size k = O ( 1 ) are sufficient both for resolving hard instances of graph isomorphism as well as for tasks related to real-world networks . In particular , although our method does not attempt to align with the WL hierarchy , an interesting observation that we make is that small substructures have the capacity to distinguish strongly regular graphs , where 2-FWL provably fails ( proven in Appendix B.3 ) . This is illustrated in Figure 2 ( right ) , where counting 4-cliques is sufficient to disambiguate this exemplary pair , and in Section 5 , where a large scale experimental study is conducted . In real-world scenarios , using too many and too large subgraphs will not only be expensive to compute , but they might also lead to overfitting . As an alternative , one can choose only the most discriminative subgraphs , i.e . the ones that can achieve the maximum possible node disambiguation , similarly to identifier-based approaches . Note that this approach solely takes into account expressivity and does not provide any guarantee about generalisation . This is empirically validated in Figure 4 , where we observe that choosing substructures with strong node disambiguation properties allows for better fitting of the training data , but the test set performance does not necessarily improve . Aiming at better generalisation , it is desirable to make use of substructures for which there is substantial prior knowledge of their importance in certain network distributions and have been observed to be intimately related to various properties . For example , small substructures ( graphlets ) have been extensively analysed in protein-protein interaction networks ( Pržulj et al. , 2004 ) , triangles and cliques characterise the structure of ego-nets and social networks in general ( Granovetter , 1982 ) , simple cycles ( rings ) are central in molecular distributions , directed and temporal motifs have been shown to explain the working mechanisms of gene regulatory networks , biological neural networks , transportation networks and food webs ( Milo et al. , 2002 ; Paranjape et al. , 2017 ; Benson et al. , 2016 ) . In Figure 6 in the Appendix , we showcase the importance of these inductive biases : a cycle-based GSN predicting molecular properties achieves smaller generalisation gap compared to a traditional MPNN , while at the same time generalising better with less training data . Choosing the best substructure collection is still an open problem ; various heuristics can be used ( motif frequencies , feature selection strategies ) or ideally by learning the substructure dictionary in an end-to-end manner . Answering this question is left for future work . GSN-v vs GSN-e : Finally , we examine the expressive power of the two proposed variants . A crucial observation that we make , is that for each graph H in the collection , the vertex structural identifiers can be reconstructed by the corresponding edge identifiers . Thus , we can show that for every GSN-v there exists a GSN-e that can simulate the behaviour of the former ( proof provided in Appendix A.3 ) . Proposition 3.2 . For a given subgraph collectionH , let CV the set of functions that can be expressed by a GSN-v with arbitrary depth and with , and CE the set of functions that can be expressed by a GSN-e with the same properties . Then , it holds that CE ⊇ CV , or in other words GSN-e is at least as expressive as GSN-v . Complexity : The complexity of GSN comprises two parts : precomputation ( substructure counting ) and training/testing . The key appealing property is that training and inference are linear w.r.t the number of edges , O ( |E| ) , as opposed to higher-order methods ( Maron et al. , 2019a ; Morris et al. , 2019 ) with O ( nk ) training complexity and relational pooling ( Murphy et al. , 2019 ) with O ( n ! ) training complexity in absence of approximations . The worst-case complexity of subgraph isomorphism of fixed size k is O ( nk ) , by examining all the possible k-tuples in the graph . However , for specific types of subgraphs , such as paths and cycles , the problem can be solved even faster ( see e.g . Giscard et al . ( 2019 ) ) . Approximate counting algorithms are also widely used , especially for counting frequent network motifs ( Kashtan et al. , 2004 ; Wernicke , 2005 ; 2006 ; Wernicke & Rasche , 2006 ) , and can provide a considerable speed-up . Furthermore , recent neural approaches ( Ying et al. , 2020b ; a ) provide fast approximate counting . In our experiments , we performed exact counting using the common isomorphism algorithm VF2 ( Cordella et al. , 2004 ) . Although its worst case complexity is O ( nk ) , it scales better in practice , for instance when the candidate subgraph is infrequently matched or when the graphs are sparse , and is also trivially parallelisable . In Figure 3 , we show a quantitative analysis of the empirical runtime of the counting algorithm against the worst case , for three different graph distributions : molecules , protein contact maps , social networks . It is easy to see that when the graphs are sparse ( for the first two cases ) and the number of matches is small , the algorithm is significantly faster than the worst case , while it scales better with the size of the graph n. Even , in the case of social networks , where several examples are near-complete graphs , both the runtime and the growth w.r.t both n and k are better than the worst case . Overall , the preprocessing computational burden in most of the cases remains negligible for relatively small and sparse graphs , as it is the case of molecules . | This work proposes the Graph Substructure Network (GSN) to encode structural roles for different nodes so that the expressivity of Graph Neural Networks is improved. The core idea is to count the number of certain substructures, such as cycles, cliques, and triangles. Then the proposed MPNN encodes such substructure counting information into the message passing. Experimental results show that the proposed method can obtain better performance than the comparing methods. | SP:d6b0ad3bacba7ba1a532470056cd180ec9bf9688 |
Efficiently Disentangle Causal Representations | 1 INTRODUCTION . Causal reasoning is a fundamental tool that has shown great impact in different disciplines ( Rubin & Waterman , 2006 ; Ramsey et al. , 2010 ; Rotmensch et al. , 2017 ) , and it has roots in work by David Hume in the eighteenth century ( Hume , 2003 ) and in classical AI ( Pearl , 2003 ) . Causality has been mainly studied from a statistical perspective ( Pearl , 2009 ; Peters et al. , 2016 ; Greenland et al. , 1999 ; Pearl , 2018 ) with Judea Pearl ’ s work on the causal calculus leading its statistical development . More recently , there has been a growing interest to integrate statistical techniques into machine learning to leverage their benefits . Welling raises a particular question about how to disentangle correlation from causation in machine learning settings to take advantage of the sample efficiency and generalization abilities of causal reasoning ( Welling , 2015 ) . Although machine learning has achieved important results on a variety of tasks like computer vision and games over the past decade ( e.g. , Mnih et al . ( 2015 ) ; Silver et al . ( 2017 ) ; Szegedy et al . ( 2017 ) ; Hudson & Manning ( 2018 ) ) , current approaches can struggle to generalize when the test data distribution is much different from the training distribution ( common in real applications ) . Further , these successful methods are typically “ data hungry ” , requiring an abundance of labeled examples to perform well across data distributions . In statistical settings , encoding the causal structure in models has been shown to have significant efficiency advantages . In support of the advantages of encoding causal mechanisms , Bengio et al . ( 2020 ) recently introduced an approach to disentangling causal relationships in end-to-end machine learning by comparing the adaptation speeds of separate models that encode different causal structures . With this as the baseline , in this paper , we propose a more efficient approach to learning disentangled representations with causal mechanisms , based on the difference of conditional probabilities in original and new distributions . The key idea is to approximate the difference with model ’ s generalization abilities so that it fits in standard machine learning framework and can be efficiently computed . In contrast to the state-of-the-art baseline approach , which relies on learner ’ s adaptation speed to new distribution , the proposed approach only requires evaluating the generalization ability of the model . Our method is based on the same assumption as the baseline that the conditional distribution P ( B|A ) does not change between the train and transfer distribution . This assumption can be explained with an atmospheric physics example of learning P ( A , B ) , where A ( Altitude ) causes B ( Temperature ) ( Peters et al. , 2016 ) . The marginal probability of A can be changed depending on , for instance , the place ( Switzerland to less mountainous country like Netherlands ) , but P ( B|A ) as the underlining causality mechanism does not change . Therefore , the causality structure can be inferred from the robustness of predictive models on out-of-distribution ( Peters et al. , 2016 ; 2017 ) . The proposed method is more efficient by omitting the adaptation process , and is more robust when the marginal distribution is complicated . We provide theoretical explanation and experimental verification for the advantage of the proposed method . Our experiments show the proposed technique is 1.9– 11.0× more sample efficient and 9.4–32.4× quicker than measuring adaptation speed on various tasks . We also argue that the proposed approach has less hyper parameters and it is straight-forward to implement the approach within the standard machine learning workflows . Our contributions can be summarized as follows . • We propose an efficient approach to disentangling representations for causal mechanisms by measuring generalization . • We theoretically prove that the proposed estimators can identify causal direction and disentangles causal mechanisms . • We empirically show that the proposed approach is significantly quicker and more sample efficient for various tasks . Sample efficiency is important when data size in transfer distribution is small . 2 APPROACH . To begin , we reflect on the tasks and the disentangling approach ( as baseline ) described by previous work ( Bengio et al. , 2020 ) . The invariance of conditional distribution for the correct causal direction P ( B|A ) is the key assumption in their work , and we also follow it in this work . We notice that their baseline approach compares the adaptation speed of models on a transfer data distribution , and hence requires significant time for adaptation . We propose an approach to learn causality mechanisms by directly measuring the changes in conditional probabilities before and after intervention for both P ( B|A ) and P ( A|B ) . Further , we optimize the proposed approach to use generalization loss rather than a divergence metric—because loss can be directly measured in standard machine learning workflows—and we show that it is likely to correctly predict causal direction and disentangle causal mechanisms . 2.1 CAUSALITY DIRECTION PREDICTION . As the first step towards learning disentangled representations for causal mechanisms , we start with the binary classification task . Given two discrete variables A and B , we want to determine whether A causes B , or vice-versa . We assume noiseless dynamics , and A and B do not have hidden confounders . The training ( transfer ) data contains samples ( a , b ) from training ( transfer ) distribution , P1 ( P2 ) . The baseline approach defines models that factor the joint distribution P ( A , B ) into two causality directions PA→B ( A , B ) = PA→B ( B|A ) PA→B ( A ) and PB→A = PB→A ( A|B ) PB→A ( B ) . It then compares their speed of adaptation to transfer distribution . Intuitively , the factorization with correct causality direction should adapt more quickly to the transfer distribution . Suppose A→ B is the ground-truth causal direction . For the correct factorization , they assume that conditional distribution PA→B ( B|A ) does not change between the train and transfer distributions , so that only the marginal PA→B ( A ) needs adaptation . In contrast , for the factorization with incorrect causality direction , both the conditional PB→A ( A|B ) and marginal distributions PB→A ( B ) need adaptation . They analyze that updating a marginal distribution P ( A ) A→B is likely to have lower sample complexity than the conditional distribution PB→A ( A|B ) ( only a part of PB→A ( A , B ) ) because the later has more parameters . Therefore , the model with correct factorization will adapt more quickly , and causality direction can be predicted from adaptation speed . To leverage this observation , the baseline method defines a meta-learning objective . Let LA→B and LB→A be the log-likelihood of PA→B ( A , B ) and PB→A ( A , B ) , respectively . Their baseline approach optimizes a regret , R , to acquire an indicator variable γ ∈ R. If γ > 0 , the prediction is A→ B , otherwise B → A. R = − log [ σ ( γ ) LA→B + ( 1− σ ( γ ) ) LB→A ] ( 1 ) 2.2 PROPOSED MECHANISM : OBSERVE THE MODEL ’ S CONDITIONAL DISTRIBUTION DIVERGENCE . Rather than relying on gradients of end-to-end predictions to identify causal direction , we propose to directly observe the divergence of each model ’ s conditional distribution predictions under the intervention of the transfer dataset . We consider the distribution of a single model ’ s predictions on the training and transfer distributions . These distributions depend on both the marginal and conditional distributions learned by the models . It is expected that a model encoding the correct causal direction will have learned a correct conditional distribution , but the marginal distribution might shift from the training to transfer datasets . Hence , we would like to ignore changes in the model ’ s predictions that are due to marginal distribution differences and focus directly on the conditional distribution . Given access to the model ’ s conditional distribution predictions , we could use the KL-divergence to directly measure the conditional distribution differences between the training and transfer datasets . A model that encodes the correct causal structure should show no change in its conditional distribution predictions , so the divergence of these predictions should be small . On the other hand , a model that encodes the incorrect causal structure is likely to show significantly large divergence . We tie these observations together in the following proposition : Proposition 1 . Given two data distributions with the same directed causality between two random variables , A and B , the difference of the KL-divergences of their conditional distributions is an unbiased estimator of the correct causality direction between A and B . This approach shares the same intuition as the baseline approach . The model with correct causal direction should only witness minimal changes in the conditional distribution of its predictions between train and transfer distributions . Thus , the KL-divergence of the predictions should not change for models with correct causal structure . The proof for Proposition 1 is included in Appendix A . 2.3 PROPOSED SIMPLIFICATION : GENERALIZATION LOSS APPROXIMATES THE DIVERGENCE . Although we can use the KL-divergence of the conditional probabilities of two data distributions as an unbiased estimator of causality direction , it requires additional computation to model conditional distribution in transfer distribution . However , in many practical end-to-end learning settings , it is more efficient and straight-forward to acquire generalization loss , such as the cross-entropy , that can be used to approximate the conditional KL-divergence . More specifically , we compare the generalization gaps between two causal models to approximate the causality direction . Let the generalization gap , G , be the difference of a model ’ s losses on the training and transfer datasets : GA→B = LtransferA→B − LtrainA→B . Here , L ·A→B is the loss on the specified set . Further , we define a directionality score as the difference of generalization gaps : SG = GB→A − GA→B We show that , for an appropriately chosen loss , such as cross-entropy , SG is a biased but reasonable estimator of the correct causal direction . When SG > 0 , it is likely that A→ B is the correct causal direction–the generalization gap for the incorrect causal model dominates the score . We formalize this notion in Proposition 2 in Appendix B : Proposition 2 . Given two data distributions with the same directed causality between two random variables , A and B , the difference of their generalization gaps is a biased estimator of the correct causality direction between A and B . In practice for the tasks we test in next section , we find that although SG is biased , it always indicates the correct causal direction . An intuitive understanding is that this approach measures how well models trained on train distribution can predict in transfer distribution–their generalization ability . Algorithm 1 summarizes the process for identifying a correct causal model . In Appendix C , we describe that the generalization-based approach should converge more quickly than a gradient-based approach , especially in practical settings . Algorithm 1 The proposed approach for causality direction prediction . 1 : Train fA→B on training data , and get train loss LtrainA→B . 2 : Train fB→A on training data , and get train loss LtrainB→A . 3 : Get transfer loss LtransferA→B with fA→B on transfer data . 4 : Get transfer loss LtransferB→A with fB→A on transfer data . 5 : Get generalization loss GA→B = LtransferA→B − LtrainA→B . 6 : Get generalization loss GB→A = LtransferB→A − LtrainB→A . 7 : Compute SG = GB→A − GA→B . 8 : If SG > 0 return A→ B , else return return B → A . The baseline approach and our proposed approach are based on the same intuition of unchanging conditional distributions for correct causality direction . However , the baseline approach must observe gradients during transfer distribution training , while the proposed approach looks directly at the changes in model outputs on the transfer data distribution . Informally , we note that these approaches are roughly equivalent by observing the following : For the correct causal direction , G·→· = Ltransfer·→· − Ltrain·→· ∇G·→· = ∇Ltransfer·→· −∇Ltrain·→· Since ∇Ltrain = 0 , ∇G·→· = ∇Ltransfer·→· . The previous work shows that ∇θiLtransfer·→· = 0 for model parameters , θi , representing correct causal structures ( i.e. , joint distribution ) , so∇Ltransfer·→· should also be small . Similar to that , we expect G·→· to be small relative to the incorrect causal model . | This paper describes an approach for learning a representation U(X,Y), V(X,Y) of data (X,Y) such that U and V are causally meaningful, and U causes V. The approach relies on observing data from two domains, P and Q, where P(V| U) = Q(V |U) (reflecting the causal structure). The approach is a modification of Bengio et al. The main new idea is that the objective function can be tweaked by replacing a KL divergence term with a term involving domain-shift induced generalization errors. | SP:c0d72e20146d4608068bd607c0d1fe306e821779 |
Efficiently Disentangle Causal Representations | 1 INTRODUCTION . Causal reasoning is a fundamental tool that has shown great impact in different disciplines ( Rubin & Waterman , 2006 ; Ramsey et al. , 2010 ; Rotmensch et al. , 2017 ) , and it has roots in work by David Hume in the eighteenth century ( Hume , 2003 ) and in classical AI ( Pearl , 2003 ) . Causality has been mainly studied from a statistical perspective ( Pearl , 2009 ; Peters et al. , 2016 ; Greenland et al. , 1999 ; Pearl , 2018 ) with Judea Pearl ’ s work on the causal calculus leading its statistical development . More recently , there has been a growing interest to integrate statistical techniques into machine learning to leverage their benefits . Welling raises a particular question about how to disentangle correlation from causation in machine learning settings to take advantage of the sample efficiency and generalization abilities of causal reasoning ( Welling , 2015 ) . Although machine learning has achieved important results on a variety of tasks like computer vision and games over the past decade ( e.g. , Mnih et al . ( 2015 ) ; Silver et al . ( 2017 ) ; Szegedy et al . ( 2017 ) ; Hudson & Manning ( 2018 ) ) , current approaches can struggle to generalize when the test data distribution is much different from the training distribution ( common in real applications ) . Further , these successful methods are typically “ data hungry ” , requiring an abundance of labeled examples to perform well across data distributions . In statistical settings , encoding the causal structure in models has been shown to have significant efficiency advantages . In support of the advantages of encoding causal mechanisms , Bengio et al . ( 2020 ) recently introduced an approach to disentangling causal relationships in end-to-end machine learning by comparing the adaptation speeds of separate models that encode different causal structures . With this as the baseline , in this paper , we propose a more efficient approach to learning disentangled representations with causal mechanisms , based on the difference of conditional probabilities in original and new distributions . The key idea is to approximate the difference with model ’ s generalization abilities so that it fits in standard machine learning framework and can be efficiently computed . In contrast to the state-of-the-art baseline approach , which relies on learner ’ s adaptation speed to new distribution , the proposed approach only requires evaluating the generalization ability of the model . Our method is based on the same assumption as the baseline that the conditional distribution P ( B|A ) does not change between the train and transfer distribution . This assumption can be explained with an atmospheric physics example of learning P ( A , B ) , where A ( Altitude ) causes B ( Temperature ) ( Peters et al. , 2016 ) . The marginal probability of A can be changed depending on , for instance , the place ( Switzerland to less mountainous country like Netherlands ) , but P ( B|A ) as the underlining causality mechanism does not change . Therefore , the causality structure can be inferred from the robustness of predictive models on out-of-distribution ( Peters et al. , 2016 ; 2017 ) . The proposed method is more efficient by omitting the adaptation process , and is more robust when the marginal distribution is complicated . We provide theoretical explanation and experimental verification for the advantage of the proposed method . Our experiments show the proposed technique is 1.9– 11.0× more sample efficient and 9.4–32.4× quicker than measuring adaptation speed on various tasks . We also argue that the proposed approach has less hyper parameters and it is straight-forward to implement the approach within the standard machine learning workflows . Our contributions can be summarized as follows . • We propose an efficient approach to disentangling representations for causal mechanisms by measuring generalization . • We theoretically prove that the proposed estimators can identify causal direction and disentangles causal mechanisms . • We empirically show that the proposed approach is significantly quicker and more sample efficient for various tasks . Sample efficiency is important when data size in transfer distribution is small . 2 APPROACH . To begin , we reflect on the tasks and the disentangling approach ( as baseline ) described by previous work ( Bengio et al. , 2020 ) . The invariance of conditional distribution for the correct causal direction P ( B|A ) is the key assumption in their work , and we also follow it in this work . We notice that their baseline approach compares the adaptation speed of models on a transfer data distribution , and hence requires significant time for adaptation . We propose an approach to learn causality mechanisms by directly measuring the changes in conditional probabilities before and after intervention for both P ( B|A ) and P ( A|B ) . Further , we optimize the proposed approach to use generalization loss rather than a divergence metric—because loss can be directly measured in standard machine learning workflows—and we show that it is likely to correctly predict causal direction and disentangle causal mechanisms . 2.1 CAUSALITY DIRECTION PREDICTION . As the first step towards learning disentangled representations for causal mechanisms , we start with the binary classification task . Given two discrete variables A and B , we want to determine whether A causes B , or vice-versa . We assume noiseless dynamics , and A and B do not have hidden confounders . The training ( transfer ) data contains samples ( a , b ) from training ( transfer ) distribution , P1 ( P2 ) . The baseline approach defines models that factor the joint distribution P ( A , B ) into two causality directions PA→B ( A , B ) = PA→B ( B|A ) PA→B ( A ) and PB→A = PB→A ( A|B ) PB→A ( B ) . It then compares their speed of adaptation to transfer distribution . Intuitively , the factorization with correct causality direction should adapt more quickly to the transfer distribution . Suppose A→ B is the ground-truth causal direction . For the correct factorization , they assume that conditional distribution PA→B ( B|A ) does not change between the train and transfer distributions , so that only the marginal PA→B ( A ) needs adaptation . In contrast , for the factorization with incorrect causality direction , both the conditional PB→A ( A|B ) and marginal distributions PB→A ( B ) need adaptation . They analyze that updating a marginal distribution P ( A ) A→B is likely to have lower sample complexity than the conditional distribution PB→A ( A|B ) ( only a part of PB→A ( A , B ) ) because the later has more parameters . Therefore , the model with correct factorization will adapt more quickly , and causality direction can be predicted from adaptation speed . To leverage this observation , the baseline method defines a meta-learning objective . Let LA→B and LB→A be the log-likelihood of PA→B ( A , B ) and PB→A ( A , B ) , respectively . Their baseline approach optimizes a regret , R , to acquire an indicator variable γ ∈ R. If γ > 0 , the prediction is A→ B , otherwise B → A. R = − log [ σ ( γ ) LA→B + ( 1− σ ( γ ) ) LB→A ] ( 1 ) 2.2 PROPOSED MECHANISM : OBSERVE THE MODEL ’ S CONDITIONAL DISTRIBUTION DIVERGENCE . Rather than relying on gradients of end-to-end predictions to identify causal direction , we propose to directly observe the divergence of each model ’ s conditional distribution predictions under the intervention of the transfer dataset . We consider the distribution of a single model ’ s predictions on the training and transfer distributions . These distributions depend on both the marginal and conditional distributions learned by the models . It is expected that a model encoding the correct causal direction will have learned a correct conditional distribution , but the marginal distribution might shift from the training to transfer datasets . Hence , we would like to ignore changes in the model ’ s predictions that are due to marginal distribution differences and focus directly on the conditional distribution . Given access to the model ’ s conditional distribution predictions , we could use the KL-divergence to directly measure the conditional distribution differences between the training and transfer datasets . A model that encodes the correct causal structure should show no change in its conditional distribution predictions , so the divergence of these predictions should be small . On the other hand , a model that encodes the incorrect causal structure is likely to show significantly large divergence . We tie these observations together in the following proposition : Proposition 1 . Given two data distributions with the same directed causality between two random variables , A and B , the difference of the KL-divergences of their conditional distributions is an unbiased estimator of the correct causality direction between A and B . This approach shares the same intuition as the baseline approach . The model with correct causal direction should only witness minimal changes in the conditional distribution of its predictions between train and transfer distributions . Thus , the KL-divergence of the predictions should not change for models with correct causal structure . The proof for Proposition 1 is included in Appendix A . 2.3 PROPOSED SIMPLIFICATION : GENERALIZATION LOSS APPROXIMATES THE DIVERGENCE . Although we can use the KL-divergence of the conditional probabilities of two data distributions as an unbiased estimator of causality direction , it requires additional computation to model conditional distribution in transfer distribution . However , in many practical end-to-end learning settings , it is more efficient and straight-forward to acquire generalization loss , such as the cross-entropy , that can be used to approximate the conditional KL-divergence . More specifically , we compare the generalization gaps between two causal models to approximate the causality direction . Let the generalization gap , G , be the difference of a model ’ s losses on the training and transfer datasets : GA→B = LtransferA→B − LtrainA→B . Here , L ·A→B is the loss on the specified set . Further , we define a directionality score as the difference of generalization gaps : SG = GB→A − GA→B We show that , for an appropriately chosen loss , such as cross-entropy , SG is a biased but reasonable estimator of the correct causal direction . When SG > 0 , it is likely that A→ B is the correct causal direction–the generalization gap for the incorrect causal model dominates the score . We formalize this notion in Proposition 2 in Appendix B : Proposition 2 . Given two data distributions with the same directed causality between two random variables , A and B , the difference of their generalization gaps is a biased estimator of the correct causality direction between A and B . In practice for the tasks we test in next section , we find that although SG is biased , it always indicates the correct causal direction . An intuitive understanding is that this approach measures how well models trained on train distribution can predict in transfer distribution–their generalization ability . Algorithm 1 summarizes the process for identifying a correct causal model . In Appendix C , we describe that the generalization-based approach should converge more quickly than a gradient-based approach , especially in practical settings . Algorithm 1 The proposed approach for causality direction prediction . 1 : Train fA→B on training data , and get train loss LtrainA→B . 2 : Train fB→A on training data , and get train loss LtrainB→A . 3 : Get transfer loss LtransferA→B with fA→B on transfer data . 4 : Get transfer loss LtransferB→A with fB→A on transfer data . 5 : Get generalization loss GA→B = LtransferA→B − LtrainA→B . 6 : Get generalization loss GB→A = LtransferB→A − LtrainB→A . 7 : Compute SG = GB→A − GA→B . 8 : If SG > 0 return A→ B , else return return B → A . The baseline approach and our proposed approach are based on the same intuition of unchanging conditional distributions for correct causality direction . However , the baseline approach must observe gradients during transfer distribution training , while the proposed approach looks directly at the changes in model outputs on the transfer data distribution . Informally , we note that these approaches are roughly equivalent by observing the following : For the correct causal direction , G·→· = Ltransfer·→· − Ltrain·→· ∇G·→· = ∇Ltransfer·→· −∇Ltrain·→· Since ∇Ltrain = 0 , ∇G·→· = ∇Ltransfer·→· . The previous work shows that ∇θiLtransfer·→· = 0 for model parameters , θi , representing correct causal structures ( i.e. , joint distribution ) , so∇Ltransfer·→· should also be small . Similar to that , we expect G·→· to be small relative to the incorrect causal model . | The paper presents a novel approach for determining the causal direction between two random variables $A$ and $B$. The approach is based on the assumption that the conditional distribution $P_{A \rightarrow B}(B \mid B)$ does not change between the train and transfer distribution. As a result, a model that predicts the correct causal direction $A \rightarrow B$ should generalize better from the train to the transfer distribution compared to a model predicting the wrong causal direction $B \rightarrow A$. While previous work has proposed to use this insight to determine the causal direction by comparing the adaptation speed, this paper proposes to directly measure and compare the generalization performance. The results indicate that the proposed approach leads to the same performance in terms of causal relation prediction, but that it is more sample efficient and faster. | SP:c0d72e20146d4608068bd607c0d1fe306e821779 |
Learning Parametrised Graph Shift Operators | 1 INTRODUCTION . Real-world data and applications often involve significant structural complexity and as a consequence graph representation learning attracts great research interest ( Hamilton et al. , 2017b ; Wu et al. , 2020 ) . The topology of the observations plays a central role when performing machine learning tasks on graph structured data . A variety of supervised , semi-supervised or unsupervised graph learning algorithms employ different forms of operators that encode the topology of these observations . The most commonly used operators are the adjacency matrix , the Laplacian matrix and their normalised variants . All of these matrices belong to a general set of linear operators , the Graph Shift Operators ( GSOs ) ( Sandryhaila & Moura , 2013 ; Mateos et al. , 2019 ) . Graph Neural Networks ( GNNs ) , the main application domain in this paper , are representative cases of algorithms that use chosen GSOs to encode the graph structure , i.e. , to encode neighbourhoods used in the aggregation operators . Several GNN models ( Kipf & Welling , 2017 ; Hamilton et al. , 2017a ; Xu et al. , 2019 ) choose different variants of normalised adjacency matrices as GSOs . Interestingly , in a variety of tasks and datasets , the incorporation of explicit structural information of neighbourhoods into the model is found to improve results ( Pei et al. , 2020 ; Zhang & Chen , 2018 ; You et al. , 2019 ) , leading us to conclude that the chosen GSO is not entirely capturing the information of the data topology . In most of these approaches , the GSO is chosen without an analysis of the impact of this choice of representation . From this observation arise our two research questions . Question 1 : Is there a single optimal representation to encode graph structures or is the optimal representation task- and data-dependent ? On different tasks and datasets , the choice between the different representations encoded by the different graph shift operator matrices has shown to be a consequential decision . Due to the past ∗Equal contribution . successful approaches that use different GSOs for different tasks and datasets , it is natural to assume that there is no single optimal representation for all scenarios . Finding an optimal representation of network data could contribute positively to a range of learning tasks such as node and graph classification or community detection . Fundamental to this search is an answer to Question 1 . In addition , we pose the following second research question . Question 2 : Can we learn such an optimal representation to encode graph structure in a numerically stable and computationally efficient way ? The utilisation of a GSO as a topology representation is currently a hand-engineered choice of normalised variants of the adjacency matrix . Thus , the learnable representation of node interactions is transferred into either convolutional filters ( Kipf & Welling , 2017 ; Hamilton et al. , 2017a ) or attention weights ( Veličković et al. , 2018 ) , keeping the used GSO constant . In this work , we suggest a parametrisation of the GSO . Specific parameter values in our proposed parametrised ( and differentiable ) GSO result in the most commonly used GSOs , namely the adjacency , unnormalised Laplacian and both normalised Laplacian matrices , and GNN aggregation functions , e.g. , the averaging and summation message passing operations . The beauty of this innovation is that it can be seamlessly included in both message passing and convolutional GNN architectures . Optimising the operator parameters will allow us to find answers to our two research questions . The remainder of this paper is organised as follows . In Section 2 , we give an overview of related work in the literature . Then in Section 3 , we define our parametrised graph shift operator ( PGSO ) and discuss how it can be incorporated into many state-of-the-art GNN architectures . This is followed by a spectral analysis of our PGSO in Section 4 , where we observe good numerical stability in practice . In Section 5 , we analyse the performance of GNN architectures augmented by the PGSO in a node classification task on a set of stochastic blockmodel graphs with varying sparsity and on learning tasks performed on several real-world datasets . 2 RELATED WORK . GSOs emerge in different research fields such as in physics , network science , computer science and mathematics , taking usually the form of either graph Laplacian normalisations or variants of the adjacency matrix . In an abundant number of machine learning applications the expressivity of GSOs is exploited , e.g. , in unsupervised learning ( von Luxburg , 2007 ; Kim et al. , 2008 ) , semisupervised node classification on graph-structured data ( Kipf & Welling , 2017 ; Schlichtkrull et al. , 2018 ) and supervised learning on computer vision tasks ( Chang & Yeung , 2006 ) . The majority of these works assumes a specified normalised version of the Laplacian that encodes the structural information of the problem and usually these versions differ depending on the analysed dataset and the end-user task . Recently , new findings on the impact of the chosen Laplacian representation have emerged that highlight the contribution of Laplacian regularisation ( Dall ’ Amico et al. , 2020 ; Saade et al. , 2014 ; Dall ’ Amico et al. , 2019 ) . The different GSO choices in different tasks indicate a data-dependent relation between the structure of the data and its optimal GSO representation . This observation motivates us to investigate how beneficial a well-chosen GSO can be for a learning task on structured data . GNNs use a variety of GSOs to encode neighbourhood topologies , either normalisations of the adjacency matrix ( Xu et al. , 2019 ; Hamilton et al. , 2017a ) or normalisations of the graph Laplacian ( Kipf & Welling , 2017 ; Wu et al. , 2019 ) . Due to the efficiency and the predictive performance of GNNs , a research interest has recently emerged in their expressive power . One of the examined aspects is that of the equivalence of the GNNs ’ expressive power with that of the Weisfeiler-Lehman graph isomorphism test ( Dasoulas et al. , 2020 ; Maron et al. , 2019 ; Morris et al. , 2019 ; Xu et al. , 2019 ) . Another research direction is that of analysing the depth and the width of GNNs , moving one step forward to the design of deep GNNs ( Loukas , 2020 ; Li et al. , 2018 ; Liu et al. , 2020 ; Alon & Yahav , 2020 ) . In this analysis , the authors study phenomena of Laplacian oversmoothing and combinatorial oversquashing , that harm the expressiveness of GNNs . In most of these approaches , however , the used GSO is fixed without a motivation of the choice . We hope that the parametrised GSO that is presented in this work can contribute positively to the expressivity analysis of GNNs . We will now delineate our approach and that of a closely related work by Klicpera et al . ( 2019 ) . Klicpera et al . ( 2019 ) demonstrate that varying the choice of the GSO in the message passing step of GNNs can lead to significant performance gains . In Klicpera et al . ( 2019 ) two fixed diffusion operators with a much larger receptive field than the 1-hop neighbourhood convolutions , are inserted into the architectures , leading to a significant improvement of the GNNs ’ performance . In our work here we replace the GSOs in GNN frameworks with the PGSO , which has a receptive field equal to the 1-hop neighbourhood of the nodes . We find that parameter values of our PGSO can be trained in a numerically stable fashion , which allows us to chose a parametric form unifying the most common GSOs and aggregation functions . As with standard GNN architectures the receptive field of the convolutions is increased in our architectures by stacking additional layers . Klicpera et al . ( 2019 ) increase the size of the receptive field and keep the neighbourhood representation fixed , while we keep the size of the receptive field fixed and learn the neighbourhood representation . 3 PARAMETRISED GRAPH SHIFT OPERATORS . We define notation and fundamental concepts in Section 3.1 and introduce our proposed parametrised graph shift operator γ ( A , S ) in Section 3.2 . In Section 3.3 , we provide a detailed discussion of how γ ( A , S ) can be applied to the message-passing operation in GNNs and we demonstrate use cases of the incorporation of γ ( A , S ) in different GNN architectures . 3.1 PRELIMINARIES . Let a graph G be a tuple , G = ( V , E ) , where V and E are the sets of nodes and edges and let |V | = n. We assume the graph G to be attributed with attribute matrix X ∈ Rn×d , where the ith row of X contains the d-dimensional attribute vector corresponding to node vi . We denote the n×n identity matrix by In and the n-dimensional column vector of all ones by 1n . Given the node and edge sets , one can define the adjacency matrix , denoted A ∈ [ 0 , 1 ] n×n , where Aij 6= 0 if and only if ( i , j ) ∈ E , and the degree matrix of A as D = Diag ( A1n ) . Recently the notion of a GSO has been defined as a general family of operators which enable the propagation of signals over graph structures ( Sandryhaila & Moura , 2013 ; Shuman et al. , 2013 ) . Definition 1 . Graph Shift Operator A matrix S ∈ Rn×n is called a Graph Shift Operator ( GSO ) if it satisfies Sij = 0 for i 6= j and ( i , j ) /∈ E ( Mateos et al. , 2019 ; Gama et al. , 2020 ) . This general definition includes the adjacency and Laplacian matrices as instances of its class . Remark 1 . According to Definition 1 , the existence of an edge ( i , j ) ∈ E does not imply a nonzero entry in the GSO , Sij 6= 0 . Hence , the correspondence between a GSO and a graph is not bijective in general . 3.2 PARAMETRISED GSO . We begin by defining our parametrised graph shift operator . Definition 2 . We define the parametrised graph shift operator ( PGSO ) , denoted by γ ( A , S ) , as γ ( A , S ) = m1De1a +m2De2a AaDe3a +m3In , ( 1 ) where Aa = A+ aIn and Da = Diag ( Aa1n ) is the degree matrix of Aa . We denote the parameter tuple corresponding the γ ( A , S ) by S = ( m1 , m2 , m3 , e1 , e2 , e3 , a ) consisting of scalar multiplicative parameters m1 , m2 , m3 , scalar exponential parameters e1 , e2 , e3 and an additive parameter a . The main motivation of the parametrised form in Equation ( 1 ) is to span the space of commonly used GSOs and indeed we are able to generate a wide range of different graph shift operators by choosing different values for the parameter set S. In Table 1 , we give examples of parameter values in γ ( A , S ) which result in the most commonly used GSOs and message-passing operators in GNNs . Unlike the GSO , the PGSO uniquely identifies the graph it corresponds to , i.e. , the GSO and PGSO do not share the property discussed in Remark 1 . Although we base the definition of γ ( A , S ) on the adjacency matrix , we can define the PGSO using other graph representation matrices , such as the non-backtracking operator B , γ ( B , S ) , ( Krzakala et al. , 2013 ; Bordenave et al. , 2015 ) or the diffusion matrix S , γ ( S , S ) ( Klicpera et al. , 2019 ) . 3.3 SUGGESTED METHOD : GNN-PGSO AND GNN-mPGSO Next , we formally discuss how γ ( A , S ) is incorporated in GNN models . Let a GNN model be denoted by M ( φ ( A ) , X ) , taking as input a non-parametrised function of the adjacency matrix φ ( A ) : [ 0 , 1 ] n×n → Rn×n and an attribute matrix ( in case of an attributed graph ) X ∈ Rn×d . Further , let K denote the number of aggregation layers thatM consists of . The Parametrised Graph Shift Operator ( PGSO ) formulation transforms the GNN modelM ( φ ( A ) , X ) into the GNN-PGSO model M′ ( γ ( A , S ) , X ) . Moreover , we define the GNN-mPGSO model M′′ ( γ [ K ] ( A , S [ K ] ) , X ) , where γ [ K ] ( A , S [ K ] ) = [ γ ( A , S1 ) , ... , γ ( A , SK ) ] , i.e. , we assign each GNN layer a different parameter tuple Sl for l ∈ { 1 , . . . , K } . Message-passing steps and convolutions In a spectral-based GNN ( Wu et al. , 2020 ) , where the GSO is explicitly multiplied by the model parameters , it is straightforward to replace the GSO with γ ( A , S ) . However , with some further analysis γ ( A , S ) can also be incorporated in spatial-based GNNs , where the node update equation is defined as a message-passing step . Here we illustrate the required analysis on the sum-based aggregation operator , where we sum the feature vectors hj ∈ Rd in the neighborhood of a given node vi , denoted N ( vi ) . The sum operator of the neighborhood representations can be reexpressed as : ∑ j : vj∈N ( vi ) hj = ∑n j=1Aijhj . Using this observation we can derive the application of γ ( A , S ) in a message-passing step to be , ( γ ( A , S ) h ) i = m1 ( Da ) e1i hi +m2 n∑ j=1 ( Da ) e2 i ( Aa ) ij ( Da ) e3 j hj +m3hi . ( 2 ) Examples The following examples highlight the usage of the γ ( A , S ) operator : 1 . In the standard GCN ( Kipf & Welling , 2017 ) the propagation rule of the node representation H ( l ) ∈ Rn×d in a computation layer l is , H ( l+1 ) = σ ( D − 12 1 A1D − 12 1 H ( l ) W ( l ) ) , where W ( l ) is the trainable weight matrix and σ denotes a non-linear activation function . The GCN-PGSO and GCN-mPGSO models , respectively , perform the following propagation rules , H ( l+1 ) = σ ( γ ( A , S ) H ( l ) W ( l ) ) and H ( l+1 ) = σ ( γ ( A , Sl ) H ( l ) W ( l ) ) . 2 . The Graph Isomorphism Network ( GIN ) ( Xu et al. , 2019 ) consists of the following propagation rule for a node representation h ( l ) i ∈ Rd of node vi in the computation layer l , h ( l+1 ) i = σ ( h ( l ) i W ( l ) + ∑ j : vj∈N ( vi ) h ( l ) j W ( l ) ) . Using the Equation ( 2 ) the propagation rule is transformed into the GIN-PGSO formulation as , h ( l+1 ) i = σ ( ( m1 ( Da ) e1 i +m3 ) h ( l ) i W ( l ) +m2 ∑ j : vj∈N ( vi ) ijh ( l ) j W ( l ) ) , where uv are edge weights defined as ij = ( Da ) e2 i ( Da ) e3 j . Analogously , we can construct the GIN-mPGSO formulation by superscripting every parameter in S by ( l ) . Computational Cost Since in ( 1 ) the exponential parameters are applied only to diagonal matrices the PGSO and mPGSO are efficiently computable and optimisable . γ ( A , S ) can be extended by using vector instead of scalar parameters . Although this extension leads to better expressivity , the computational cost is increased , as the number of parameters then depends on the size of the graph . 4 SPECTRAL ANALYSIS OF γ ( A , S ) In this section , we study spectral properties of γ ( A , S ) in theoretical analysis in Section 4.1 and through empirical observation in Section 4.2 . The obtained theoretical results provide a foundation for further analysis of methodology involving the PGSO and allow an efficient observation of spectral support bounds of commonly used GSOs , that are instances of γ ( A , S ) . | The paper proposes a parametric form for a matrix representation of a graph to be used as a building block within graph neural networks (GNNs). In essence, people use different normalized versions of the adjacency and Laplacian matrices within GNNs. The authors, in turn, propose a generic parametrized version that encompasses those normalizations and that can be learned from data. | SP:424eaac0eb5a5fcb526c39f5e21f9ec7506aa3bc |
Learning Parametrised Graph Shift Operators | 1 INTRODUCTION . Real-world data and applications often involve significant structural complexity and as a consequence graph representation learning attracts great research interest ( Hamilton et al. , 2017b ; Wu et al. , 2020 ) . The topology of the observations plays a central role when performing machine learning tasks on graph structured data . A variety of supervised , semi-supervised or unsupervised graph learning algorithms employ different forms of operators that encode the topology of these observations . The most commonly used operators are the adjacency matrix , the Laplacian matrix and their normalised variants . All of these matrices belong to a general set of linear operators , the Graph Shift Operators ( GSOs ) ( Sandryhaila & Moura , 2013 ; Mateos et al. , 2019 ) . Graph Neural Networks ( GNNs ) , the main application domain in this paper , are representative cases of algorithms that use chosen GSOs to encode the graph structure , i.e. , to encode neighbourhoods used in the aggregation operators . Several GNN models ( Kipf & Welling , 2017 ; Hamilton et al. , 2017a ; Xu et al. , 2019 ) choose different variants of normalised adjacency matrices as GSOs . Interestingly , in a variety of tasks and datasets , the incorporation of explicit structural information of neighbourhoods into the model is found to improve results ( Pei et al. , 2020 ; Zhang & Chen , 2018 ; You et al. , 2019 ) , leading us to conclude that the chosen GSO is not entirely capturing the information of the data topology . In most of these approaches , the GSO is chosen without an analysis of the impact of this choice of representation . From this observation arise our two research questions . Question 1 : Is there a single optimal representation to encode graph structures or is the optimal representation task- and data-dependent ? On different tasks and datasets , the choice between the different representations encoded by the different graph shift operator matrices has shown to be a consequential decision . Due to the past ∗Equal contribution . successful approaches that use different GSOs for different tasks and datasets , it is natural to assume that there is no single optimal representation for all scenarios . Finding an optimal representation of network data could contribute positively to a range of learning tasks such as node and graph classification or community detection . Fundamental to this search is an answer to Question 1 . In addition , we pose the following second research question . Question 2 : Can we learn such an optimal representation to encode graph structure in a numerically stable and computationally efficient way ? The utilisation of a GSO as a topology representation is currently a hand-engineered choice of normalised variants of the adjacency matrix . Thus , the learnable representation of node interactions is transferred into either convolutional filters ( Kipf & Welling , 2017 ; Hamilton et al. , 2017a ) or attention weights ( Veličković et al. , 2018 ) , keeping the used GSO constant . In this work , we suggest a parametrisation of the GSO . Specific parameter values in our proposed parametrised ( and differentiable ) GSO result in the most commonly used GSOs , namely the adjacency , unnormalised Laplacian and both normalised Laplacian matrices , and GNN aggregation functions , e.g. , the averaging and summation message passing operations . The beauty of this innovation is that it can be seamlessly included in both message passing and convolutional GNN architectures . Optimising the operator parameters will allow us to find answers to our two research questions . The remainder of this paper is organised as follows . In Section 2 , we give an overview of related work in the literature . Then in Section 3 , we define our parametrised graph shift operator ( PGSO ) and discuss how it can be incorporated into many state-of-the-art GNN architectures . This is followed by a spectral analysis of our PGSO in Section 4 , where we observe good numerical stability in practice . In Section 5 , we analyse the performance of GNN architectures augmented by the PGSO in a node classification task on a set of stochastic blockmodel graphs with varying sparsity and on learning tasks performed on several real-world datasets . 2 RELATED WORK . GSOs emerge in different research fields such as in physics , network science , computer science and mathematics , taking usually the form of either graph Laplacian normalisations or variants of the adjacency matrix . In an abundant number of machine learning applications the expressivity of GSOs is exploited , e.g. , in unsupervised learning ( von Luxburg , 2007 ; Kim et al. , 2008 ) , semisupervised node classification on graph-structured data ( Kipf & Welling , 2017 ; Schlichtkrull et al. , 2018 ) and supervised learning on computer vision tasks ( Chang & Yeung , 2006 ) . The majority of these works assumes a specified normalised version of the Laplacian that encodes the structural information of the problem and usually these versions differ depending on the analysed dataset and the end-user task . Recently , new findings on the impact of the chosen Laplacian representation have emerged that highlight the contribution of Laplacian regularisation ( Dall ’ Amico et al. , 2020 ; Saade et al. , 2014 ; Dall ’ Amico et al. , 2019 ) . The different GSO choices in different tasks indicate a data-dependent relation between the structure of the data and its optimal GSO representation . This observation motivates us to investigate how beneficial a well-chosen GSO can be for a learning task on structured data . GNNs use a variety of GSOs to encode neighbourhood topologies , either normalisations of the adjacency matrix ( Xu et al. , 2019 ; Hamilton et al. , 2017a ) or normalisations of the graph Laplacian ( Kipf & Welling , 2017 ; Wu et al. , 2019 ) . Due to the efficiency and the predictive performance of GNNs , a research interest has recently emerged in their expressive power . One of the examined aspects is that of the equivalence of the GNNs ’ expressive power with that of the Weisfeiler-Lehman graph isomorphism test ( Dasoulas et al. , 2020 ; Maron et al. , 2019 ; Morris et al. , 2019 ; Xu et al. , 2019 ) . Another research direction is that of analysing the depth and the width of GNNs , moving one step forward to the design of deep GNNs ( Loukas , 2020 ; Li et al. , 2018 ; Liu et al. , 2020 ; Alon & Yahav , 2020 ) . In this analysis , the authors study phenomena of Laplacian oversmoothing and combinatorial oversquashing , that harm the expressiveness of GNNs . In most of these approaches , however , the used GSO is fixed without a motivation of the choice . We hope that the parametrised GSO that is presented in this work can contribute positively to the expressivity analysis of GNNs . We will now delineate our approach and that of a closely related work by Klicpera et al . ( 2019 ) . Klicpera et al . ( 2019 ) demonstrate that varying the choice of the GSO in the message passing step of GNNs can lead to significant performance gains . In Klicpera et al . ( 2019 ) two fixed diffusion operators with a much larger receptive field than the 1-hop neighbourhood convolutions , are inserted into the architectures , leading to a significant improvement of the GNNs ’ performance . In our work here we replace the GSOs in GNN frameworks with the PGSO , which has a receptive field equal to the 1-hop neighbourhood of the nodes . We find that parameter values of our PGSO can be trained in a numerically stable fashion , which allows us to chose a parametric form unifying the most common GSOs and aggregation functions . As with standard GNN architectures the receptive field of the convolutions is increased in our architectures by stacking additional layers . Klicpera et al . ( 2019 ) increase the size of the receptive field and keep the neighbourhood representation fixed , while we keep the size of the receptive field fixed and learn the neighbourhood representation . 3 PARAMETRISED GRAPH SHIFT OPERATORS . We define notation and fundamental concepts in Section 3.1 and introduce our proposed parametrised graph shift operator γ ( A , S ) in Section 3.2 . In Section 3.3 , we provide a detailed discussion of how γ ( A , S ) can be applied to the message-passing operation in GNNs and we demonstrate use cases of the incorporation of γ ( A , S ) in different GNN architectures . 3.1 PRELIMINARIES . Let a graph G be a tuple , G = ( V , E ) , where V and E are the sets of nodes and edges and let |V | = n. We assume the graph G to be attributed with attribute matrix X ∈ Rn×d , where the ith row of X contains the d-dimensional attribute vector corresponding to node vi . We denote the n×n identity matrix by In and the n-dimensional column vector of all ones by 1n . Given the node and edge sets , one can define the adjacency matrix , denoted A ∈ [ 0 , 1 ] n×n , where Aij 6= 0 if and only if ( i , j ) ∈ E , and the degree matrix of A as D = Diag ( A1n ) . Recently the notion of a GSO has been defined as a general family of operators which enable the propagation of signals over graph structures ( Sandryhaila & Moura , 2013 ; Shuman et al. , 2013 ) . Definition 1 . Graph Shift Operator A matrix S ∈ Rn×n is called a Graph Shift Operator ( GSO ) if it satisfies Sij = 0 for i 6= j and ( i , j ) /∈ E ( Mateos et al. , 2019 ; Gama et al. , 2020 ) . This general definition includes the adjacency and Laplacian matrices as instances of its class . Remark 1 . According to Definition 1 , the existence of an edge ( i , j ) ∈ E does not imply a nonzero entry in the GSO , Sij 6= 0 . Hence , the correspondence between a GSO and a graph is not bijective in general . 3.2 PARAMETRISED GSO . We begin by defining our parametrised graph shift operator . Definition 2 . We define the parametrised graph shift operator ( PGSO ) , denoted by γ ( A , S ) , as γ ( A , S ) = m1De1a +m2De2a AaDe3a +m3In , ( 1 ) where Aa = A+ aIn and Da = Diag ( Aa1n ) is the degree matrix of Aa . We denote the parameter tuple corresponding the γ ( A , S ) by S = ( m1 , m2 , m3 , e1 , e2 , e3 , a ) consisting of scalar multiplicative parameters m1 , m2 , m3 , scalar exponential parameters e1 , e2 , e3 and an additive parameter a . The main motivation of the parametrised form in Equation ( 1 ) is to span the space of commonly used GSOs and indeed we are able to generate a wide range of different graph shift operators by choosing different values for the parameter set S. In Table 1 , we give examples of parameter values in γ ( A , S ) which result in the most commonly used GSOs and message-passing operators in GNNs . Unlike the GSO , the PGSO uniquely identifies the graph it corresponds to , i.e. , the GSO and PGSO do not share the property discussed in Remark 1 . Although we base the definition of γ ( A , S ) on the adjacency matrix , we can define the PGSO using other graph representation matrices , such as the non-backtracking operator B , γ ( B , S ) , ( Krzakala et al. , 2013 ; Bordenave et al. , 2015 ) or the diffusion matrix S , γ ( S , S ) ( Klicpera et al. , 2019 ) . 3.3 SUGGESTED METHOD : GNN-PGSO AND GNN-mPGSO Next , we formally discuss how γ ( A , S ) is incorporated in GNN models . Let a GNN model be denoted by M ( φ ( A ) , X ) , taking as input a non-parametrised function of the adjacency matrix φ ( A ) : [ 0 , 1 ] n×n → Rn×n and an attribute matrix ( in case of an attributed graph ) X ∈ Rn×d . Further , let K denote the number of aggregation layers thatM consists of . The Parametrised Graph Shift Operator ( PGSO ) formulation transforms the GNN modelM ( φ ( A ) , X ) into the GNN-PGSO model M′ ( γ ( A , S ) , X ) . Moreover , we define the GNN-mPGSO model M′′ ( γ [ K ] ( A , S [ K ] ) , X ) , where γ [ K ] ( A , S [ K ] ) = [ γ ( A , S1 ) , ... , γ ( A , SK ) ] , i.e. , we assign each GNN layer a different parameter tuple Sl for l ∈ { 1 , . . . , K } . Message-passing steps and convolutions In a spectral-based GNN ( Wu et al. , 2020 ) , where the GSO is explicitly multiplied by the model parameters , it is straightforward to replace the GSO with γ ( A , S ) . However , with some further analysis γ ( A , S ) can also be incorporated in spatial-based GNNs , where the node update equation is defined as a message-passing step . Here we illustrate the required analysis on the sum-based aggregation operator , where we sum the feature vectors hj ∈ Rd in the neighborhood of a given node vi , denoted N ( vi ) . The sum operator of the neighborhood representations can be reexpressed as : ∑ j : vj∈N ( vi ) hj = ∑n j=1Aijhj . Using this observation we can derive the application of γ ( A , S ) in a message-passing step to be , ( γ ( A , S ) h ) i = m1 ( Da ) e1i hi +m2 n∑ j=1 ( Da ) e2 i ( Aa ) ij ( Da ) e3 j hj +m3hi . ( 2 ) Examples The following examples highlight the usage of the γ ( A , S ) operator : 1 . In the standard GCN ( Kipf & Welling , 2017 ) the propagation rule of the node representation H ( l ) ∈ Rn×d in a computation layer l is , H ( l+1 ) = σ ( D − 12 1 A1D − 12 1 H ( l ) W ( l ) ) , where W ( l ) is the trainable weight matrix and σ denotes a non-linear activation function . The GCN-PGSO and GCN-mPGSO models , respectively , perform the following propagation rules , H ( l+1 ) = σ ( γ ( A , S ) H ( l ) W ( l ) ) and H ( l+1 ) = σ ( γ ( A , Sl ) H ( l ) W ( l ) ) . 2 . The Graph Isomorphism Network ( GIN ) ( Xu et al. , 2019 ) consists of the following propagation rule for a node representation h ( l ) i ∈ Rd of node vi in the computation layer l , h ( l+1 ) i = σ ( h ( l ) i W ( l ) + ∑ j : vj∈N ( vi ) h ( l ) j W ( l ) ) . Using the Equation ( 2 ) the propagation rule is transformed into the GIN-PGSO formulation as , h ( l+1 ) i = σ ( ( m1 ( Da ) e1 i +m3 ) h ( l ) i W ( l ) +m2 ∑ j : vj∈N ( vi ) ijh ( l ) j W ( l ) ) , where uv are edge weights defined as ij = ( Da ) e2 i ( Da ) e3 j . Analogously , we can construct the GIN-mPGSO formulation by superscripting every parameter in S by ( l ) . Computational Cost Since in ( 1 ) the exponential parameters are applied only to diagonal matrices the PGSO and mPGSO are efficiently computable and optimisable . γ ( A , S ) can be extended by using vector instead of scalar parameters . Although this extension leads to better expressivity , the computational cost is increased , as the number of parameters then depends on the size of the graph . 4 SPECTRAL ANALYSIS OF γ ( A , S ) In this section , we study spectral properties of γ ( A , S ) in theoretical analysis in Section 4.1 and through empirical observation in Section 4.2 . The obtained theoretical results provide a foundation for further analysis of methodology involving the PGSO and allow an efficient observation of spectral support bounds of commonly used GSOs , that are instances of γ ( A , S ) . | The authors consider the problem of learning a parametrized graph shift operator (or message passing operator) in the context of graph neural networks. They consider a family of GSO (that they name PGSO) based on seven scalar parameters, and show that it includes most commonly used operators such as the adjacency matrix or the laplacian. The spectral properties of the PGSO are analyzed. Finally, some empirical results are provided demonstrating the PGSO as a drop-in replacement for standard GSO in GNN architectures. | SP:424eaac0eb5a5fcb526c39f5e21f9ec7506aa3bc |
Accelerating Safe Reinforcement Learning with Constraint-mismatched Policies | 1 INTRODUCTION . Deep reinforcement learning ( RL ) has achieved superior performance in several domains such as games ( Mnih et al. , 2013 ; Silver et al. , 2016 ) and robotic control ( Levine et al. , 2016 ; Rajeswaran et al. , 2017 ) . However , in these complex applications , learning policies from scratch often requires tremendous amounts of time and computation power . To alleviate this issue , one would like to leverage a baseline policy available from a teacher or a previous task . However , the baseline policy may be sub-optimal for the new application and is not guaranteed to produce actions that satisfy given constraints on safety , fairness , or other costs . For instance , when you drive an unfamiliar vehicle , you do so cautiously to ensure safety , while at the same time you adapt your driving technique to the vehicle characteristics to improve your ‘ driving reward ’ . In effect , you ( as the agent ) gradually adapt a baseline policy ( i.e. , prior driving skill ) to avoid violating the constraints ( e.g. , safety ) while improving your driving reward ( e.g. , travel time , fuel efficiency ) . This problem is challenging because directly leveraging the baseline policy , as in DAGGER ( Ross et al. , 2011 ) or GAIL ( Ho & Ermon , 2016 ) , may result in policies that violate the constraints since the baseline is not guaranteed to satisfy them . To ensure constraint satisfaction , prior work either adds a hyper-parameter weighted copy of the imitation learning ( IL ) objective ( i.e. , imitating the baseline policy ) to the RL objective ( Rajeswaran et al. , 2017 ; Gao et al. , 2018 ; Hester et al. , 2018 ) , or pre-trains a policy with the baseline policy and then fine-tunes it through RL ( Mülling et al. , 2013 ; Chernova & Thomaz , 2014 ) . Both these approaches incur the cost of weight tuning to satisfy the cost constraint and do not ensure constraint satisfaction during training . In this work , to learn from the baseline policy while satisfying constraints , we propose an iterative algorithm that performs policy updates in three stages . The first step updates the policy to maximize expected reward using trust region policy optimization ( e.g. , TRPO ( Schulman et al. , 2015 ) ) . This can , however , result in a new intermediate policy that is too far from the baseline policy and one that may not satisfy the constraints . The second step performs a projection in policy space to control 1Code is available at : https : //sites.google.com/view/spacealgo . the distance between the current policy and the baseline policy . This distance is updated each episode depending on the reward improvement and constraint satisfaction , allowing the learning algorithm to explore without being overly restricted by the ( potentially constraint-violating ) baseline policy ( Rajeswaran et al. , 2017 ) . This also enables the baseline policy to influence the learning without the computational burden of learning a cost function for the baseline policy ( Kwon et al. , 2020 ) . The third step ensures constraint satisfaction at every iteration by performing a projection onto the set of policies that satisfy the given constraints . This ensures recovery from infeasible ( i.e. , constraint-violating ) states ( e.g. , due to approximation errors ) , and eliminates the need for tuning weights for auxiliary cost objective functions ( Tessler et al. , 2018 ) . We call our algorithm Safe Policy Adaptation with Constrained Exploration ( SPACE ) . This paper ’ s contributions are two-fold . We first analyze our proposed SPACE algorithm and provide a finite-time guarantee for its convergence . We also provide an analysis of controlling the distance between the learned policy at iteration k and the baseline policy to ensure both feasibility of the optimization problem and safe exploration by the learning agent . Second , we empirically compare SPACE with state-of-the-art algorithms on five different control tasks , including two Mujoco environments with safety constraints from Achiam et al . ( 2017 ) , two challenging traffic management tasks with fairness constraints from Vinitsky et al . ( 2018 ) , and one human demonstration driving task with safety constraints from Brockman et al . ( 2016 ) . In all tasks , SPACE outperforms the state-of-the art safe RL algorithm , projection-based constrained policy optimization ( PCPO ) in Yang et al . ( 2020 ) , averaging 40 % more reward with 10 times fewer cost constraint violations . This shows that SPACE leverages the baseline policy to achieve better learning efficiency while satisfying the cost constraint . 2 RELATED WORK . Policy optimization with constraints . Learning constraint-satisfying policies has been explored in the context of safe RL ( Garcia & Fernandez , 2015 ) , ( Hasanbeig et al. , 2020 ; Junges et al. , 2016 ; Jansen et al. , 2020 ) . Prior work either uses a conditional-gradient type of approach ( Achiam et al. , 2017 ) , adds a weighted copy of the cost objective in the reward function ( Tessler et al. , 2018 ; Chow et al. , 2019 ; Fujimoto et al. , 2019 ; Stooke et al. , 2020 ) , adds a safety layer to the policy ( Dalal et al. , 2018 ) ( Avni et al. , 2019 ) , or concerns about the chanced constraints ( Fu & Prashanth L , 2018 ; Zheng & Ratliff , 2020 ) . Perhaps the closest work to ours is Projection-based Constrained Policy Optimization ( PCPO ) ( Yang et al. , 2020 ) , which also uses projections in policy space to ensure constraint satisfaction . However , PCPO does not have the capability to safely exploit prior information ( through a baseline policy ) . The lack of using prior policies in PCPO makes it sampleinefficient . In addition , our SPACE algorithm ’ s update dynamically sets distances between policies while PCPO does not . This update is important to effectively and safely learn from the baseline policy . Furthermore , we provide a safety guarantee to ensure the feasibility of the optimization problem while PCPO does not . Merely adding an IL objective in the reward objective of PCPO can not learn efficiently , as shown in experiments . This analysis allows us to advance towards the practical use of RL in real applications , which PCPO and other algorithms have never done before . Policy optimization with the initial safe set . Wachi & Sui ( 2020 ) ; Sui et al . ( 2015 ) ; Turchetta et al . ( 2016 ) assume that the initial safe set is given , and the agent explores the environment and verifies the safety function from this initial safe set . There is no baseline policy here . In contrast , our assumption is to give a baseline policy to the agent . Both assumptions are reasonable as they provide an initial understanding of the environment . Leveraging baseline policies for RL . Prior work has used baseline policies to provide initial information to RL algorithms to reduce or avoid undesirable situations . This is done by either : initializing the policy with the baseline policy ( Driessens & Džeroski , 2004 ; Smart & Kaelbling , 2000 ; Koppejan & Whiteson , 2011 ; Abbeel et al. , 2010 ; Gao et al. , 2018 ; Le et al. , 2019 ; Vecerik et al. , 2017 ; Jaques et al. , 2019 ) ; or providing a teacher ’ s advice to the agent ( Garcia & Fernández , 2012 ; Quintı́a Vidal et al. , 2013 ; Abel et al. , 2017 ; Zhang et al. , 2019 ) . However , such works often assume that the baseline policy is constraint-satisfying ( Sun et al. , 2018 ; Balakrishna et al. , 2019 ) . In contrast , our SPACE algorithm safely leverages the baseline policy without requiring it to satisfy the specified constraints . Pathak et al . ( 2015 ) ; Bartocci et al . ( 2011 ) also modify the existing known models ( policies ) based on new conditions in the context of the formal methods . In contrast , we solve this problem using projections in the policy space . Learning from logged demonstration data . To effectively learn from demonstration data given by the baseline policy , Wu et al . ( 2019 ) ; Brown et al . ( 2019 ) ; Kwon et al . ( 2020 ) assess the demonstration data by either : predicting their cost in the new task using generative adversarial networks ( GANs ) ( Goodfellow et al. , 2014 ) ; or directly learning the cost function of the demonstration data . However , these approaches require a large number of training samples from the new task . In addition , the learned cost function is not guaranteed to recover the true one . This may result in driving the agent to undesirable situations . In contrast , SPACE controls the distance between the learned and baseline policies to ensure reward improvement and constraint satisfaction . Table 1 catalogs related work on safe RL and IL . We can differentiate these methods on several key axes : ( 1 ) whether they optimize reward and/or ensure cost satisfaction , ( 2 ) whether they use on-policy methods ( i.e. , query the baseline policy ) or off-policy methods ( i.e. , learn from a batch of demonstration data ) , ( 3 ) whether the baseline policy or demonstration data is optimal for the agent ’ s own objective , and ( 4 ) the technical approach of the work . 3 PROBLEM FORMULATION . We frame our problem as a constrained Markov Decision Process ( CMDP ) ( Altman , 1999 ) , defined as a tuple < S , A , T , R , C > . Here S is the set of states , A is the set of actions , and T specifies the conditional probability T ( s′|s , a ) that the next state is s′ given the current state s and action a . In addition , R : S × A → R is a reward function , and C : S × A → R is a constraint cost function . The reward function encodes the benefit of using action a in state s , while the cost function encodes the corresponding constraint violation penalty . A policy is a map from states to probability distributions on A . It specifies that in state s the selected action is drawn from the distribution π ( s ) . The state then transits from s to s′ according to the state transition distribution T ( s′|s , a ) . In doing so , a reward R ( s , a ) is received and a constraint cost C ( s , a ) is incurred , as outlined above . Let γ ∈ ( 0 , 1 ) denote a discount factor , and τ denote the trajectory τ = ( s0 , a0 , s1 , · · · ) induced by a policy π . Normally , we seek a policy π that maximizes a cumulative discounted reward JR ( π ) . = Eτ∼π [ ∑∞ t=0 γ tR ( st , at ) ] , ( 1 ) while keeping the cumulative discounted cost below hC JC ( π ) . = Eτ∼π [ ∑∞ t=0 γ tC ( st , at ) ] ≤ hC . ( 2 ) Here we consider an additional objective . We are provided with a baseline policy πB and at each state s we measure the divergence between π ( s ) and πB ( s ) . For example , this could be the KL-divergence D ( s ) . = DKL ( π ( s ) ‖πB ( s ) ) . We then seek a policy that maximizes Eq . ( 1 ) , satisfies Eq . ( 2 ) , and ensures the discounted divergence between the learned and baseline policies is below hD : JD ( π ) . = Eτ∼π [ ∑∞ t=0 γ tD ( st ) ] ≤ hD . ( 3 ) We do not assume that the baseline policy satisfies the cost constraint . Hence we allow hD to be adjusted during the learning of π to allow for reward improvement and constraint satisfaction . Let µt ( ·|π ) denote the state distribution at time t under policy π . The discounted state distribution induced by π is defined to be dπ ( s ) .= ( 1− γ ) ∑∞ t=0 γ tµt ( s|π ) . Now bring in the reward advantage function ( Kakade & Langford , 2002 ) defined by AπR ( s , a ) . = QπR ( s , a ) − V πR ( s ) , where V πR ( s ) . = Eτ∼π [ ∑∞ t=0 γ tR ( st , at ) |s0 = s ] is the expected reward from state s under policy π , and QπR ( s , a ) . = Eτ∼π [ ∑∞ t=0 γ tR ( st , at ) |s0 = s , a0 = a ] is the expected reward from state s and initial action a , and thereafter following policy π . These definitions allow us to express the reward performance of one policy π′ in terms of another π : JR ( π ′ ) − JR ( π ) = 11−γEs∼dπ′ , a∼π′ [ A π R ( s , a ) ] . Similarly , we can define AπD ( s , a ) , Q π D ( s , a ) and V π D ( s ) for the divergence cost , and A π C ( s , a ) , QπC ( s , a ) and V π C ( s ) for the constraint cost . | The paper considers the constrained Markov Decision Process (CMDP) problem where the goal is to maximize cumulative reward while satisfying the safety constraint on cumulative cost. Solving CMDP is challenging, and this paper proposes a shortcut by utilizing a given baseline policy. The idea of the proposed SPACE algorithm is to have three steps for each iteration of policy optimization. The first step is a trust region optimization step to optimize reward, the second step projects the policy to a region close to the given baseline policy, and the third step projects the policy to the constraint set. | SP:a6dfcd6335c24f1ee193abb860a5c67048be8c03 |
Accelerating Safe Reinforcement Learning with Constraint-mismatched Policies | 1 INTRODUCTION . Deep reinforcement learning ( RL ) has achieved superior performance in several domains such as games ( Mnih et al. , 2013 ; Silver et al. , 2016 ) and robotic control ( Levine et al. , 2016 ; Rajeswaran et al. , 2017 ) . However , in these complex applications , learning policies from scratch often requires tremendous amounts of time and computation power . To alleviate this issue , one would like to leverage a baseline policy available from a teacher or a previous task . However , the baseline policy may be sub-optimal for the new application and is not guaranteed to produce actions that satisfy given constraints on safety , fairness , or other costs . For instance , when you drive an unfamiliar vehicle , you do so cautiously to ensure safety , while at the same time you adapt your driving technique to the vehicle characteristics to improve your ‘ driving reward ’ . In effect , you ( as the agent ) gradually adapt a baseline policy ( i.e. , prior driving skill ) to avoid violating the constraints ( e.g. , safety ) while improving your driving reward ( e.g. , travel time , fuel efficiency ) . This problem is challenging because directly leveraging the baseline policy , as in DAGGER ( Ross et al. , 2011 ) or GAIL ( Ho & Ermon , 2016 ) , may result in policies that violate the constraints since the baseline is not guaranteed to satisfy them . To ensure constraint satisfaction , prior work either adds a hyper-parameter weighted copy of the imitation learning ( IL ) objective ( i.e. , imitating the baseline policy ) to the RL objective ( Rajeswaran et al. , 2017 ; Gao et al. , 2018 ; Hester et al. , 2018 ) , or pre-trains a policy with the baseline policy and then fine-tunes it through RL ( Mülling et al. , 2013 ; Chernova & Thomaz , 2014 ) . Both these approaches incur the cost of weight tuning to satisfy the cost constraint and do not ensure constraint satisfaction during training . In this work , to learn from the baseline policy while satisfying constraints , we propose an iterative algorithm that performs policy updates in three stages . The first step updates the policy to maximize expected reward using trust region policy optimization ( e.g. , TRPO ( Schulman et al. , 2015 ) ) . This can , however , result in a new intermediate policy that is too far from the baseline policy and one that may not satisfy the constraints . The second step performs a projection in policy space to control 1Code is available at : https : //sites.google.com/view/spacealgo . the distance between the current policy and the baseline policy . This distance is updated each episode depending on the reward improvement and constraint satisfaction , allowing the learning algorithm to explore without being overly restricted by the ( potentially constraint-violating ) baseline policy ( Rajeswaran et al. , 2017 ) . This also enables the baseline policy to influence the learning without the computational burden of learning a cost function for the baseline policy ( Kwon et al. , 2020 ) . The third step ensures constraint satisfaction at every iteration by performing a projection onto the set of policies that satisfy the given constraints . This ensures recovery from infeasible ( i.e. , constraint-violating ) states ( e.g. , due to approximation errors ) , and eliminates the need for tuning weights for auxiliary cost objective functions ( Tessler et al. , 2018 ) . We call our algorithm Safe Policy Adaptation with Constrained Exploration ( SPACE ) . This paper ’ s contributions are two-fold . We first analyze our proposed SPACE algorithm and provide a finite-time guarantee for its convergence . We also provide an analysis of controlling the distance between the learned policy at iteration k and the baseline policy to ensure both feasibility of the optimization problem and safe exploration by the learning agent . Second , we empirically compare SPACE with state-of-the-art algorithms on five different control tasks , including two Mujoco environments with safety constraints from Achiam et al . ( 2017 ) , two challenging traffic management tasks with fairness constraints from Vinitsky et al . ( 2018 ) , and one human demonstration driving task with safety constraints from Brockman et al . ( 2016 ) . In all tasks , SPACE outperforms the state-of-the art safe RL algorithm , projection-based constrained policy optimization ( PCPO ) in Yang et al . ( 2020 ) , averaging 40 % more reward with 10 times fewer cost constraint violations . This shows that SPACE leverages the baseline policy to achieve better learning efficiency while satisfying the cost constraint . 2 RELATED WORK . Policy optimization with constraints . Learning constraint-satisfying policies has been explored in the context of safe RL ( Garcia & Fernandez , 2015 ) , ( Hasanbeig et al. , 2020 ; Junges et al. , 2016 ; Jansen et al. , 2020 ) . Prior work either uses a conditional-gradient type of approach ( Achiam et al. , 2017 ) , adds a weighted copy of the cost objective in the reward function ( Tessler et al. , 2018 ; Chow et al. , 2019 ; Fujimoto et al. , 2019 ; Stooke et al. , 2020 ) , adds a safety layer to the policy ( Dalal et al. , 2018 ) ( Avni et al. , 2019 ) , or concerns about the chanced constraints ( Fu & Prashanth L , 2018 ; Zheng & Ratliff , 2020 ) . Perhaps the closest work to ours is Projection-based Constrained Policy Optimization ( PCPO ) ( Yang et al. , 2020 ) , which also uses projections in policy space to ensure constraint satisfaction . However , PCPO does not have the capability to safely exploit prior information ( through a baseline policy ) . The lack of using prior policies in PCPO makes it sampleinefficient . In addition , our SPACE algorithm ’ s update dynamically sets distances between policies while PCPO does not . This update is important to effectively and safely learn from the baseline policy . Furthermore , we provide a safety guarantee to ensure the feasibility of the optimization problem while PCPO does not . Merely adding an IL objective in the reward objective of PCPO can not learn efficiently , as shown in experiments . This analysis allows us to advance towards the practical use of RL in real applications , which PCPO and other algorithms have never done before . Policy optimization with the initial safe set . Wachi & Sui ( 2020 ) ; Sui et al . ( 2015 ) ; Turchetta et al . ( 2016 ) assume that the initial safe set is given , and the agent explores the environment and verifies the safety function from this initial safe set . There is no baseline policy here . In contrast , our assumption is to give a baseline policy to the agent . Both assumptions are reasonable as they provide an initial understanding of the environment . Leveraging baseline policies for RL . Prior work has used baseline policies to provide initial information to RL algorithms to reduce or avoid undesirable situations . This is done by either : initializing the policy with the baseline policy ( Driessens & Džeroski , 2004 ; Smart & Kaelbling , 2000 ; Koppejan & Whiteson , 2011 ; Abbeel et al. , 2010 ; Gao et al. , 2018 ; Le et al. , 2019 ; Vecerik et al. , 2017 ; Jaques et al. , 2019 ) ; or providing a teacher ’ s advice to the agent ( Garcia & Fernández , 2012 ; Quintı́a Vidal et al. , 2013 ; Abel et al. , 2017 ; Zhang et al. , 2019 ) . However , such works often assume that the baseline policy is constraint-satisfying ( Sun et al. , 2018 ; Balakrishna et al. , 2019 ) . In contrast , our SPACE algorithm safely leverages the baseline policy without requiring it to satisfy the specified constraints . Pathak et al . ( 2015 ) ; Bartocci et al . ( 2011 ) also modify the existing known models ( policies ) based on new conditions in the context of the formal methods . In contrast , we solve this problem using projections in the policy space . Learning from logged demonstration data . To effectively learn from demonstration data given by the baseline policy , Wu et al . ( 2019 ) ; Brown et al . ( 2019 ) ; Kwon et al . ( 2020 ) assess the demonstration data by either : predicting their cost in the new task using generative adversarial networks ( GANs ) ( Goodfellow et al. , 2014 ) ; or directly learning the cost function of the demonstration data . However , these approaches require a large number of training samples from the new task . In addition , the learned cost function is not guaranteed to recover the true one . This may result in driving the agent to undesirable situations . In contrast , SPACE controls the distance between the learned and baseline policies to ensure reward improvement and constraint satisfaction . Table 1 catalogs related work on safe RL and IL . We can differentiate these methods on several key axes : ( 1 ) whether they optimize reward and/or ensure cost satisfaction , ( 2 ) whether they use on-policy methods ( i.e. , query the baseline policy ) or off-policy methods ( i.e. , learn from a batch of demonstration data ) , ( 3 ) whether the baseline policy or demonstration data is optimal for the agent ’ s own objective , and ( 4 ) the technical approach of the work . 3 PROBLEM FORMULATION . We frame our problem as a constrained Markov Decision Process ( CMDP ) ( Altman , 1999 ) , defined as a tuple < S , A , T , R , C > . Here S is the set of states , A is the set of actions , and T specifies the conditional probability T ( s′|s , a ) that the next state is s′ given the current state s and action a . In addition , R : S × A → R is a reward function , and C : S × A → R is a constraint cost function . The reward function encodes the benefit of using action a in state s , while the cost function encodes the corresponding constraint violation penalty . A policy is a map from states to probability distributions on A . It specifies that in state s the selected action is drawn from the distribution π ( s ) . The state then transits from s to s′ according to the state transition distribution T ( s′|s , a ) . In doing so , a reward R ( s , a ) is received and a constraint cost C ( s , a ) is incurred , as outlined above . Let γ ∈ ( 0 , 1 ) denote a discount factor , and τ denote the trajectory τ = ( s0 , a0 , s1 , · · · ) induced by a policy π . Normally , we seek a policy π that maximizes a cumulative discounted reward JR ( π ) . = Eτ∼π [ ∑∞ t=0 γ tR ( st , at ) ] , ( 1 ) while keeping the cumulative discounted cost below hC JC ( π ) . = Eτ∼π [ ∑∞ t=0 γ tC ( st , at ) ] ≤ hC . ( 2 ) Here we consider an additional objective . We are provided with a baseline policy πB and at each state s we measure the divergence between π ( s ) and πB ( s ) . For example , this could be the KL-divergence D ( s ) . = DKL ( π ( s ) ‖πB ( s ) ) . We then seek a policy that maximizes Eq . ( 1 ) , satisfies Eq . ( 2 ) , and ensures the discounted divergence between the learned and baseline policies is below hD : JD ( π ) . = Eτ∼π [ ∑∞ t=0 γ tD ( st ) ] ≤ hD . ( 3 ) We do not assume that the baseline policy satisfies the cost constraint . Hence we allow hD to be adjusted during the learning of π to allow for reward improvement and constraint satisfaction . Let µt ( ·|π ) denote the state distribution at time t under policy π . The discounted state distribution induced by π is defined to be dπ ( s ) .= ( 1− γ ) ∑∞ t=0 γ tµt ( s|π ) . Now bring in the reward advantage function ( Kakade & Langford , 2002 ) defined by AπR ( s , a ) . = QπR ( s , a ) − V πR ( s ) , where V πR ( s ) . = Eτ∼π [ ∑∞ t=0 γ tR ( st , at ) |s0 = s ] is the expected reward from state s under policy π , and QπR ( s , a ) . = Eτ∼π [ ∑∞ t=0 γ tR ( st , at ) |s0 = s , a0 = a ] is the expected reward from state s and initial action a , and thereafter following policy π . These definitions allow us to express the reward performance of one policy π′ in terms of another π : JR ( π ′ ) − JR ( π ) = 11−γEs∼dπ′ , a∼π′ [ A π R ( s , a ) ] . Similarly , we can define AπD ( s , a ) , Q π D ( s , a ) and V π D ( s ) for the divergence cost , and A π C ( s , a ) , QπC ( s , a ) and V π C ( s ) for the constraint cost . | The authors propose SPACE, an RL algorithm for learning a policy that maximizes reward while satisfying given constraints in a setting where a baseline policy is provided. They design a three-step update rule for learning such a policy and provide a finite-sample analysis of the resulting method in a simplified setting. They report numerical results in several domains that show how the proposed approach outperforms competitive baselines. | SP:a6dfcd6335c24f1ee193abb860a5c67048be8c03 |
Not All Memories are Created Equal: Learning to Expire | 1 INTRODUCTION . Transformer architectures ( Vaswani et al. , 2017 ) have demonstrated strong performance across a variety of tasks ( Devlin et al. , 2019 ; Roller et al. , 2020 ; Brown et al. , 2020 ) , including those that require learning long term relationships ( Zhang et al. , 2018 ; Fan et al. , 2019a ; Izacard & Grave , 2020 ) . Recent work has focused on scaling attention mechanisms efficiently to longer memory sizes , enabling large improvements on long context tasks ( Dai et al. , 2019 ; Sukhbaatar et al. , 2019a ) . However , a critical component of human memory is not just the ability to remember , but also forgetting irrelevant information to focus on the salient , relevant bits . Most studies of long-term memory in humans indicate that not everything is remembered ( Murre & Dros , 2015 ) — instead , only vivid , remarkable memories are retained from the far past ( Wixted , 2004 ) . Standard Transformer architectures lack the ability to search over extremely large memories , as the self-attention mechanism is computationally intensive and the storage cost of preserving the large memory grows quickly . Recent work ( Child et al. , 2019 ; Rae et al. , 2020 ) has proposed learning how to extend to greater context through sparse mechanisms or through compression , to more compactly represent the past . However , there exists a fundamental problem with large memories beyond strict computational concerns : as the amount of information stored increases , deciding which information is relevant becomes more challenging . Other work ( Lample et al. , 2019 ) approaches this by considering how to efficiently search large memories . We will focus on learning what to forget , and thereby reducing the computational burden of the model easing the challenges of the search problem . We propose EXPIRE-SPAN , a straightforward extension to attention mechanisms , that learns when to expire unneeded memories . By expiring memories that are no longer useful , EXPIRE-SPAN enables scaling to memories tens of thousands of timesteps long . This learnable mechanism allows the model to adjust the span size as needed , selecting which information is critical to retain and forgetting the rest . More concretely , we augment the self-attention with a simple predictor that outputs an expiration value for each hidden state that determines how long a memory should be retained and accessible to the model . After the EXPIRE-SPAN runs out , the memory will be forgotten , but in a gradually differentiable way to retain end-to-end training with backpropagation . This process is done independently for each layer , allowing different layers to specialize in different time-scales . We demonstrate that EXPIRE-SPAN can distinguish between critical and irrelevant information on several illustrative tasks in natural language processing and reinforcement learning . We then show on long-context language modeling benchmarks and a frame-by-frame colliding objects task that EXPIRE-SPAN can scale to memories in the tens of thousands — by expiring irrelevant information , capacity is freed to have even larger memory . Finally , we analyze the information retained and expired by EXPIRE-SPAN models , to understand the importance of long context memory . 2 RELATED WORK . Memory is crucial for many tasks and has been studied in recurrent networks ( Elman , 1990 ; Hochreiter & Schmidhuber , 1997 ; Mikolov et al. , 2010 ) for a long time . The development of memory augmented networks ( Graves et al. , 2014 ; Sukhbaatar et al. , 2015b ) made it possible to store large quantities of information and selectively access them using attention ( Bahdanau et al. , 2015 ) . The Transformer ( Vaswani et al. , 2017 ) took full advantage of this approach . Processing long sequences with Transformers is an active area with applications in language understanding ( Brown et al. , 2020 ) , reinforcement learning ( Parisotto et al. , 2019 ) , video processing ( Wu et al. , 2019 ) , and protein folding ( Rives et al. , 2019 ) . However , extending the memory span is computationally expensive due to the quadratic time and space complexity of self-attention . Various work has focused on reducing this complexity and increasing memory capacity . Dynamic attention spans , such as Adaptive-Span ( Sukhbaatar et al. , 2019a ) and Adaptively Sparse Transformer ( Correia et al. , 2019 ) , focus on learning which heads can have shorter spans of attention , but can only extend to spans of a few thousand . Other work sparsifies attention by computing fewer tokens ( Fan et al. , 2019c ) , often by using fixed attention masks ( Child et al. , 2019 ) or sliding windows and dilation ( Beltagy et al. , 2020 ) . The BP Transformer ( Ye et al. , 2019 ) structures tokens as a binary tree , so some tokens have coarse attention . These works focus on learning what to attend to , but searching larger and larger memories is very difficult . In contrast , we focus on learning to expire what is irrelevant . Compressive Transformer ( Rae et al. , 2020 ) reduces the number of memories by replacing every few memories with a single compressed one . A disadvantage of this is that all memories have the same compression ratio , so relevant memories are equally compressed . Another line of work investigates linear-time attention mechanisms . Wu et al . ( 2018 ) replace selfattention with convolutions that run in linear time , but the scalability to long context tasks remains limited . Wang et al . ( 2020 ) propose linear time attention by decomposing attention into multiple smaller attentions , that recombine to form a low-rank factorization of the original attention . Those methods , however , focus on making attention more efficient without actually reducing the number of memories . Further , as our goal is to reduce the number of memories that feed to self-attention by learning to expire , EXPIRE-SPAN can be easily combined with these efficiency improvements . For a review of further recent Transformer variants , see Tay et al . ( 2020 ) . 3 BACKGROUND . Transformer architectures have been widely used as decoder-only auto-regressive models for sequential tasks . Each Transformer decoder is made of a stack of identical layers , composed of a multi-head self-attention sublayer followed by a feedforward sublayer . The output of each timestep is the hidden state hlt at layer l , which is then projected to key k , value v , and query q vectors : qlt =W l qh l t , k l t =W l kh l t , v l t =W l vh l t. where W represents the weight . Going forward , we focus on a single layer and omit the layer index l for brevity . Information from previous timesteps is accessed through attention a to create output o : at , i = Softmaxi∈Ct ( q > t ki ) , ot =Wo ∑ i∈Ct at , ivi . The set Ct indicates which memories can be accessed at time t , which is the focus on this work . The space and time complexity of self-attention is linearly correlated to |Ct| , making it an important metric of efficiency . For the rest of the paper , we will refer to |Ct| as the memory size . Including all previous timesteps in self-attention by settingCt = { 1 , . . . , t−1 } results in a quadratic complexityO ( T 2 ) to compute the full attention over a sequence of length T . Fixed-spans ( Dai et al. , 2019 ) take a more scalable approach such that Ct = { t−L , . . . , t− 1 } so the attention is restricted to previous L steps . The total complexity in this case is O ( TL ) , where L is the attention span . Adaptive-Span ( Sukhbaatar et al. , 2019a ) further improves upon this by learning an optimal span L per attention head from data , which results in small L values for many heads . Compression approaches ( Rae et al. , 2020 ) reduce memory size by compressing multiple timesteps into a single memory , with complexity O ( TL/c ) , where c is the compression rate . However , in all these approaches , all memories are treated equally without regards to their importance to the task . In this work , we focus on distinguishing between relevant and irrelevant memories by learning to expire unneeded information — by expiring , the remaining attention on relevant information can scale beyond existing long context memory approaches . 4 EXPIRE-SPAN . We detail the EXPIRE-SPAN mechanism and how to integrate it into Transformer architectures to focus attention on relevant information and expire the rest . We describe how to scale EXPIRE-SPAN and practically train with drastically longer memory spans . 4.1 METHOD . EXPIRE-SPAN , depicted in Figure 1 , allows models to selectively forget memories that are no longer relevant . We describe it in the context of a single Transformer layer and omit the layer index l for brevity . Our goal is to reduce the size of Ct defined in Section 3 for more efficiency without performance degradation . For each memory hi , we will compute a scalar EXPIRE-SPAN ei ∈ [ 0 , L ] : ei = Lσ ( w > hi + b ) . Here w , b represent trainable parameters , σ is the sigmoid function , and L is the maximum span . This expire-span ei determines how long hi should be kept and included in Ct. At time t , the remaining span of hi is rt , i = ei− ( t−i ) . When rt , i becomes negative , it indicates the memory hi is expired and can be removed from Ct . This can be implemented by updating attention weights with a binary masking function mt , i : a′t , i = mt , iat , i∑ j mt , jat , j , ot = ∑ i a′t , ivi where mt , i = { 1 if rt , i > 0 0 otherwise , However , with such a discrete masking , the expire-span ei will not receive any gradient for training . Therefore , we use a masking function that smoothly transitions from 0 to 1 as shown in Figure 2 : mt , i = max ( 0 , min ( 1 , 1 + rt , i/R ) ) , where R is a hyper-parameter that determines the length of a ramp that is bounded between 0 to 1 . This function has non-zero gradient for values in [ −R , 0 ] to train ei , but also can take a value of 0 , which is necessary for expiring memories . Thus Ct = { i | mt , i > 0 } . Sincemt , i is a monotonically decreasing function of t , once a memory is expired , it can be permanently deleted . x m ( x ) 1 −R Figure 2 : Soft Mask Function Our goal is to reduce average memory size , which is directly related with the average EXPIRE-SPAN . 1 T ∑ t |Ct| = 1 T ∑ t ∑ i < t 1mt , i > 0 = 1 T ∑ i ( R+ ∑ t > i 1rt , i > 0 ) = 1 T ∑ i ( R+ ∑ t > i 1ei > t−i ) = R− 1 + 1 T ∑ i beic Thus , we add an auxiliary term to the loss function to penalize the L1-norm of EXPIRE-SPANS : Ltotal = Ltask + α ∑ i ei/T , where α > 0 is a hyperparameter . This loss term will decrease the span of memories that contribute less to the main task , resulting in a model with a small memory that focuses on the most relevant information . Note that w and b are the only new parameters , and are negligible in size compared to the total number of parameters in standard neural models . | The paper proposes a method for overcoming the long-term memory bottleneck of transformers. The idea is to assign a value (expire-span) to each formed memory, which indicates how long the memory should be stored and be available for the transformer to access it. The authors demonstrate the performance of their approach on a set of | SP:0228dd243b9ca1b38e728d54f5d000858f959ea4 |
Not All Memories are Created Equal: Learning to Expire | 1 INTRODUCTION . Transformer architectures ( Vaswani et al. , 2017 ) have demonstrated strong performance across a variety of tasks ( Devlin et al. , 2019 ; Roller et al. , 2020 ; Brown et al. , 2020 ) , including those that require learning long term relationships ( Zhang et al. , 2018 ; Fan et al. , 2019a ; Izacard & Grave , 2020 ) . Recent work has focused on scaling attention mechanisms efficiently to longer memory sizes , enabling large improvements on long context tasks ( Dai et al. , 2019 ; Sukhbaatar et al. , 2019a ) . However , a critical component of human memory is not just the ability to remember , but also forgetting irrelevant information to focus on the salient , relevant bits . Most studies of long-term memory in humans indicate that not everything is remembered ( Murre & Dros , 2015 ) — instead , only vivid , remarkable memories are retained from the far past ( Wixted , 2004 ) . Standard Transformer architectures lack the ability to search over extremely large memories , as the self-attention mechanism is computationally intensive and the storage cost of preserving the large memory grows quickly . Recent work ( Child et al. , 2019 ; Rae et al. , 2020 ) has proposed learning how to extend to greater context through sparse mechanisms or through compression , to more compactly represent the past . However , there exists a fundamental problem with large memories beyond strict computational concerns : as the amount of information stored increases , deciding which information is relevant becomes more challenging . Other work ( Lample et al. , 2019 ) approaches this by considering how to efficiently search large memories . We will focus on learning what to forget , and thereby reducing the computational burden of the model easing the challenges of the search problem . We propose EXPIRE-SPAN , a straightforward extension to attention mechanisms , that learns when to expire unneeded memories . By expiring memories that are no longer useful , EXPIRE-SPAN enables scaling to memories tens of thousands of timesteps long . This learnable mechanism allows the model to adjust the span size as needed , selecting which information is critical to retain and forgetting the rest . More concretely , we augment the self-attention with a simple predictor that outputs an expiration value for each hidden state that determines how long a memory should be retained and accessible to the model . After the EXPIRE-SPAN runs out , the memory will be forgotten , but in a gradually differentiable way to retain end-to-end training with backpropagation . This process is done independently for each layer , allowing different layers to specialize in different time-scales . We demonstrate that EXPIRE-SPAN can distinguish between critical and irrelevant information on several illustrative tasks in natural language processing and reinforcement learning . We then show on long-context language modeling benchmarks and a frame-by-frame colliding objects task that EXPIRE-SPAN can scale to memories in the tens of thousands — by expiring irrelevant information , capacity is freed to have even larger memory . Finally , we analyze the information retained and expired by EXPIRE-SPAN models , to understand the importance of long context memory . 2 RELATED WORK . Memory is crucial for many tasks and has been studied in recurrent networks ( Elman , 1990 ; Hochreiter & Schmidhuber , 1997 ; Mikolov et al. , 2010 ) for a long time . The development of memory augmented networks ( Graves et al. , 2014 ; Sukhbaatar et al. , 2015b ) made it possible to store large quantities of information and selectively access them using attention ( Bahdanau et al. , 2015 ) . The Transformer ( Vaswani et al. , 2017 ) took full advantage of this approach . Processing long sequences with Transformers is an active area with applications in language understanding ( Brown et al. , 2020 ) , reinforcement learning ( Parisotto et al. , 2019 ) , video processing ( Wu et al. , 2019 ) , and protein folding ( Rives et al. , 2019 ) . However , extending the memory span is computationally expensive due to the quadratic time and space complexity of self-attention . Various work has focused on reducing this complexity and increasing memory capacity . Dynamic attention spans , such as Adaptive-Span ( Sukhbaatar et al. , 2019a ) and Adaptively Sparse Transformer ( Correia et al. , 2019 ) , focus on learning which heads can have shorter spans of attention , but can only extend to spans of a few thousand . Other work sparsifies attention by computing fewer tokens ( Fan et al. , 2019c ) , often by using fixed attention masks ( Child et al. , 2019 ) or sliding windows and dilation ( Beltagy et al. , 2020 ) . The BP Transformer ( Ye et al. , 2019 ) structures tokens as a binary tree , so some tokens have coarse attention . These works focus on learning what to attend to , but searching larger and larger memories is very difficult . In contrast , we focus on learning to expire what is irrelevant . Compressive Transformer ( Rae et al. , 2020 ) reduces the number of memories by replacing every few memories with a single compressed one . A disadvantage of this is that all memories have the same compression ratio , so relevant memories are equally compressed . Another line of work investigates linear-time attention mechanisms . Wu et al . ( 2018 ) replace selfattention with convolutions that run in linear time , but the scalability to long context tasks remains limited . Wang et al . ( 2020 ) propose linear time attention by decomposing attention into multiple smaller attentions , that recombine to form a low-rank factorization of the original attention . Those methods , however , focus on making attention more efficient without actually reducing the number of memories . Further , as our goal is to reduce the number of memories that feed to self-attention by learning to expire , EXPIRE-SPAN can be easily combined with these efficiency improvements . For a review of further recent Transformer variants , see Tay et al . ( 2020 ) . 3 BACKGROUND . Transformer architectures have been widely used as decoder-only auto-regressive models for sequential tasks . Each Transformer decoder is made of a stack of identical layers , composed of a multi-head self-attention sublayer followed by a feedforward sublayer . The output of each timestep is the hidden state hlt at layer l , which is then projected to key k , value v , and query q vectors : qlt =W l qh l t , k l t =W l kh l t , v l t =W l vh l t. where W represents the weight . Going forward , we focus on a single layer and omit the layer index l for brevity . Information from previous timesteps is accessed through attention a to create output o : at , i = Softmaxi∈Ct ( q > t ki ) , ot =Wo ∑ i∈Ct at , ivi . The set Ct indicates which memories can be accessed at time t , which is the focus on this work . The space and time complexity of self-attention is linearly correlated to |Ct| , making it an important metric of efficiency . For the rest of the paper , we will refer to |Ct| as the memory size . Including all previous timesteps in self-attention by settingCt = { 1 , . . . , t−1 } results in a quadratic complexityO ( T 2 ) to compute the full attention over a sequence of length T . Fixed-spans ( Dai et al. , 2019 ) take a more scalable approach such that Ct = { t−L , . . . , t− 1 } so the attention is restricted to previous L steps . The total complexity in this case is O ( TL ) , where L is the attention span . Adaptive-Span ( Sukhbaatar et al. , 2019a ) further improves upon this by learning an optimal span L per attention head from data , which results in small L values for many heads . Compression approaches ( Rae et al. , 2020 ) reduce memory size by compressing multiple timesteps into a single memory , with complexity O ( TL/c ) , where c is the compression rate . However , in all these approaches , all memories are treated equally without regards to their importance to the task . In this work , we focus on distinguishing between relevant and irrelevant memories by learning to expire unneeded information — by expiring , the remaining attention on relevant information can scale beyond existing long context memory approaches . 4 EXPIRE-SPAN . We detail the EXPIRE-SPAN mechanism and how to integrate it into Transformer architectures to focus attention on relevant information and expire the rest . We describe how to scale EXPIRE-SPAN and practically train with drastically longer memory spans . 4.1 METHOD . EXPIRE-SPAN , depicted in Figure 1 , allows models to selectively forget memories that are no longer relevant . We describe it in the context of a single Transformer layer and omit the layer index l for brevity . Our goal is to reduce the size of Ct defined in Section 3 for more efficiency without performance degradation . For each memory hi , we will compute a scalar EXPIRE-SPAN ei ∈ [ 0 , L ] : ei = Lσ ( w > hi + b ) . Here w , b represent trainable parameters , σ is the sigmoid function , and L is the maximum span . This expire-span ei determines how long hi should be kept and included in Ct. At time t , the remaining span of hi is rt , i = ei− ( t−i ) . When rt , i becomes negative , it indicates the memory hi is expired and can be removed from Ct . This can be implemented by updating attention weights with a binary masking function mt , i : a′t , i = mt , iat , i∑ j mt , jat , j , ot = ∑ i a′t , ivi where mt , i = { 1 if rt , i > 0 0 otherwise , However , with such a discrete masking , the expire-span ei will not receive any gradient for training . Therefore , we use a masking function that smoothly transitions from 0 to 1 as shown in Figure 2 : mt , i = max ( 0 , min ( 1 , 1 + rt , i/R ) ) , where R is a hyper-parameter that determines the length of a ramp that is bounded between 0 to 1 . This function has non-zero gradient for values in [ −R , 0 ] to train ei , but also can take a value of 0 , which is necessary for expiring memories . Thus Ct = { i | mt , i > 0 } . Sincemt , i is a monotonically decreasing function of t , once a memory is expired , it can be permanently deleted . x m ( x ) 1 −R Figure 2 : Soft Mask Function Our goal is to reduce average memory size , which is directly related with the average EXPIRE-SPAN . 1 T ∑ t |Ct| = 1 T ∑ t ∑ i < t 1mt , i > 0 = 1 T ∑ i ( R+ ∑ t > i 1rt , i > 0 ) = 1 T ∑ i ( R+ ∑ t > i 1ei > t−i ) = R− 1 + 1 T ∑ i beic Thus , we add an auxiliary term to the loss function to penalize the L1-norm of EXPIRE-SPANS : Ltotal = Ltask + α ∑ i ei/T , where α > 0 is a hyperparameter . This loss term will decrease the span of memories that contribute less to the main task , resulting in a model with a small memory that focuses on the most relevant information . Note that w and b are the only new parameters , and are negligible in size compared to the total number of parameters in standard neural models . | To help Transformer learn long sequence efficiently, the paper performs attention on selective timesteps that have high expire-span scores. For each timestep, the expire-span score is computed by mapping the corresponding hidden feature to a number, which is learnt during training. Soft masking is applied to make the learning differentiable. An additional loss is introduced to reduce the average span, making the attention sparse. The proposed attention is integrated into each layer of Transformer and tested on several synthetic tasks and two language modelling datasets, yielding promising results. | SP:0228dd243b9ca1b38e728d54f5d000858f959ea4 |
Quantifying Exposure Bias for Open-ended Language Generation | 1 INTRODUCTION . Language model ( LM ) is a central module for natural language generation ( NLG ) tasks ( Young et al. , 2017 ) such as open-ended language generation ( Radford et al. , 2018 ; Nadeem et al. , 2020 ) , machine translation ( Wu et al. , 2017 ) , dialogue response generation ( Li et al. , 2017 ) , image captioning ( Lin et al. , 2014 ) , etc . For decades , maximum likelihood estimation ( MLE ) has been the most widely used objective for LM training . However , there is a popular belief in the natural language processing ( NLP ) community that standard MLE training suffers from the exposure bias problem which leads to an incremental performance degradation during test-time generation . The claim of the exposure bias problem ( Bengio et al. , 2015 ; Ranzato et al. , 2016 ) is originated from the following discrepancy between MLE training and test-time generation for auto-regressive language models : During training , the model is trained to predict the next word conditioned on prefix ( or history ) words sampled from the ground-truth data distribution ; While during generation , the model generates words conditioned on prefix sequences generated by the model itself . Hence , due to the exposure to real data during training , the language model could potentially be biased to only perform well with data prefixes . Therefore , it is claimed ( and widely believed among researchers ) that during generation the errors should accumulate along the generated sequence , and the distribution generated by the model would be incrementally distorted . The forced exposure to ground-truth data during training is also referred to as teacher forcing . In order to avoid teacher forcing , many training algorithms ( Bengio et al. , 2015 ; Lamb et al. , 2016 ; Ranzato et al. , 2016 ; Yu et al. , 2016 ; Zhu et al. , 2018 ; Lu et al. , 2018 ; Lin et al. , 2017 ; Guo et al. , 2017 ; Rajeswar et al. , 2017 ; Wiseman & Rush , 2016 ; Nie et al. , 2019 ; Shi et al. , 2018 ; de Masson d ’ Autume et al. , 2019 ; Rennie et al. , 2016 ) have been proposed as alternatives to MLE training for open-ended language generation . Most of these works utilize techniques from generative adversarial networks ( GANs ) ( Goodfellow et al. , 2014 ) or reinforcement learning ( RL ) ( Sutton & Barto , 1998 ) . In this paper , we refer to these algorithms as non-MLE methods . With the huge research efforts devoted to alleviate exposure bias , interestingly , the existence or significance of exposure bias is much less studied . On the other hand , despite the criticism , MLE ( teacher forcing ) has remained to be the dominant objective for LM training ( Radford et al. , 2018 ; Keskar et al. , 2019 ) . To make the situation more curious , multiple recent works show that the proposed non-MLE methods actually have inferior generation performance ( Caccia et al. , 2018 ; de Masson d ’ Autume et al. , 2019 ) than the MLE baseline . These negative results lead us to question : Is exposure bias truly a serious problem for MLE training ? In this work we seek a direct answer to the above question . Here we briefly summarize our contributions : We conduct controlled experiments in which we remove the training-generation discrepancy in the prefix , and design various metrics to quantify the performance improvement of the generation as the prefix length grows . On the contrary to our expectation , our measurements consistently show that the performance gain is limited , and the incremental distortion as claimed by exposure bias is not observed ( the performance gap does not become larger with longer prefixes ) . In the next section , we begin by introducing notations and background . 2 PRELIMINARIES . The task of auto-regressive language modelling is to learn the probability distribution of the ( l + 1 ) th word ( or token ) Wl+1 in a sentence W conditioned on the prefix W1 : l : = ( W1 , . . . , Wl ) . We use Wi 2 V to denote a discrete random variable distributed across the vocabulary V . For simplicity , we assume all sentences are of length L in the formulations . Denoting the ground-truth data distribution as PD , the standard MLE training aims to minimize the negative log-likelihood ( NLL ) loss below : LMLE = E W⇠PD ⌃L 1 l=0 logP✓ ( Wl+1|W1 : l ) , ( 1 ) where P✓ ( · | W1 : l ) denotes the conditional distribution of Wl+1 of P✓ given a prefix W1 : l , and ✓ stands for the set of parameters to be trained . Note that the concept of “ sentence ” ( W ) can be naturally generalized to paragraphs or even articles , depending on the target task . We denote the distribution of a MLE-trained LM as PM , which is the major subject of this study . We will experiment with two popular model architectures : LSTM LM ( Hochreiter & Schmidhuber , 1997 ; Sundermeyer et al. , 2012 ) and transformer LM ( Baevski & Auli , 2018 ; Dai et al. , 2019 ) . For generation , we do classical ancestral sampling without invoking sampling algorithms such as top-k sampling ( Fan et al. , 2018 ) for the following reasons : ( 1 ) The sampling algorithms are known to trade quality out of diversity ( Nadeem et al. , 2020 ; Caccia et al. , 2018 ) . So , invoking them could “ hide ” the exposure bias problem because the prefixes from the model will be of higher quality . ( 2 ) The sampling algorithms requires tuning of hyper-parameters , which will complicate the comparison . In addition to popular measures in natural language generation ( NLG ) such as BLEU ( Papineni et al. , 2002 ) or METEOR ( Denkowski & Lavie , 2014 ) , our quantification approaches also rely on the measurements of the divergence between two distributions . Let P denote the set of probability distributions on the vocabulary V , and let fdiv : P ⇥ P ! R 0 be a divergence function between two distributions ( e.g. , total variation distance ) . We will adopt two popular probability divergence functions : total variation distance ( denoted as dTV ) and Jensen-Shannon divergence ( denoted as dJS ) . We provide definitions of dTV and dJS in Appendix A . Our experiments will be focused on the task of open-ended language generation , which is arguably a good test bed for exposure bias because of the following reasons : ( 1 ) The generation length is long . ( 2 ) Different from typical seq2seq tasks such as machine translation , the generation space is only weakly constrained and the topics can be very diverse , which means the training-generation discrepancy could be large . 3 A QUALITATIVE ATTEMPT . We begin with a qualitative attempt to verify the significance of exposure bias . We design a prefixswitching experiment as follows : We feed a MLE-trained transformer LM on the wiki-103 dataset with four types of prefixes of the same length : ( 1 ) test-data samples , ( 2 ) model ’ s own samples , ( 3 ) test-data samples shuffled on word-level , or ( 4 ) samples from a uniformly random distribution on V . Then we let the model continue the generation given these prefixes and compare the quality of the samples in a qualitative manner . We defer details of the model and dataset to Section 5 . The intuition behind the prefix-switching experiment follows immediately from the original claim of exposure bias : During generation , if we set the prefix distribution to be the ground-truth data distribution instead of the model ’ s own distribution , then the discrepancy between training and generation in the prefix is removed , and hence the model ’ s generation quality should be much better . In the extreme case of shuffled or random prefixes , due to the claim from exposure bias that the errors should accumulate , we expect the model to generate also badly distorted sequences . The samples with different types of prefixes are shown in Table 1 . To make the generation from data and model prefix more comparable , we force the same prompt at the beginning of the context to constrain the topic . Moreover , we intentionally use long prefixes of length 100 , in the hope that the incremental distortion of generation ( as claimed by exposure bias ) would become observable . We include another set of examples with the same transformer LM , and examples with a LSTM LM in Appendix B , which gives similar observations . On the contrary to our expectation , we do not observe a noticeable difference in sample quality comparing samples from model and data prefixes . More surprisingly , the model is still able to generate fairly good samples from shuffled prefixes . Even in the extreme case of random prefixes , we still observe basic language structures in the sample . This experiment suggests that the MLE-trained auto-regressive LMs have the self-recovery ability , i.e. , the model is able to recover from artificially distorted history input , and generate samples with reasonable quality . This phenomenon can not be explained by exposure bias which claims that the errors along the generation process should , on the contrary , accumulate . We conclude that this qualitative attempt fails to show the significance of exposure bias , indicating its impact could be more subtle than expected . In the following sections , we turn to more rigorous quantification methods to measure the impact of exposure bias . 4 QUANTIFICATION METHODS . Following the intuition of the prefix switching experiment , we design our quantification metrics to be a simple ratio of the relative performance gain when length-l data prefixes in fed to the model as opposed to the original model prefixes . And we compute the measurements for different prefix lengths . For a systematic assessment of exposure bias , we decompose the claim of exposure bias into two factors : ( 1 ) The discrepancy or mismatch in the prefix distribution would indeed hurt the generation performance , in general . ( 2 ) Moreover , the distortion should be incremental along the generation . The first factor can be reflected by the average magnitude of the measurements ( the values are expected to be larger than 1 by a meaningful margin ) , and the second factor can be reflected by whether the measurements are increasing along the prefix length . We now go into the detailed definitions of our metrics . We attempt to quantify the impact of exposure bias on three key aspects of open-ended language generation : quality , diversity , and consistency . We first introduce EB-M , which covers the quality and diversity aspects , and then EB-C , which covers the consistency aspect . 4.1 DEFINITION OF EB-M . In this section , we propose the EB-M metric . Since the key idea is to compare the generation quality with different types of prefixes , denoting the prefix distribution as PH 2 { PM , PD } ( model or data prefixes ) , we first formalize the following generation process : • Given a prefix length l and a prefix distribution PH , we sample W1 : l from PH . • Conditioned on the prefix W1 : l , we sample Wl+1 : l+lgen from PM , where Wl+j is sampled from PM ( · | W1 : l+j 1 ) with j > 0 , and lgen is the length of generation . We denote the marginal distribution of Wl+1 : l+lgen of the above random process as P Wl+1 : l+lgen M |H . If exposure bias is indeed serious , we expect the quality or diversity of Wl+1 : l+lgen to be better when PD is used as PH than PM . In our experiments we fix lgen to be 30 , and vary the prefix length l. With these ingredients in hand , we now propose the EB-M quantification for exposure bias . It reflects the relative performance gain when the length-l prefix is from PD instead of from PM , and is formulated as below : EB-M ( M , l , fscore ) = fscore ( P Wl+1 : l+lgen M |D , P Wl+1 : l+lgen D ) fscore ( P Wl+1 : l+lgen M |M , P Wl+1 : l+lgen D ) , ( 2 ) where fscore is a pre-defined scoring function1 of the generation samples , and we assume higher value of fscore indicates that the generation is of higher quality or diversity . In our experiments , we will use popular NLG metrics including BLEU ( Yu et al. , 2016 ; Caccia et al. , 2018 ) / Nist ( Doddington , 2002 ) / METEOR ( Denkowski & Lavie , 2014 ) , which mainly capture the quality aspect , and backwardBLEU ( Shi et al. , 2018 ) / n-gram entropy ( Zhang et al. , 2018 ) , which capture the diversity aspect . We will show that the observations from different metrics are consistent . EB-M has a potential weakness that it doesn ’ t reflect how the generation is consistent with the given prefix W1 : l , because it only focuses on the marginal distribution of Wl+1 : l+lgen . To cover this shortcoming , in the next section we propose another quantification method named EB-C , which focuses on the model ’ s conditional generation distribution of Wl+1 given a prefix W1 : l . | This paper makes a key observation: “exposure bias” is blamed for many of the issues with Neural Language Generation but it lacks both a concrete definition or any obvious evidence that it truly exists. The authors begin by defining exposure bias as the decrease in quality and relevancy (to the conditioning text) in generations as the model conditions on its own output. A limited qualitative study fails to find evidence of exposure bias, and the authors propose two metrics, EB-M and EB-C, to measure the quality and relevancy degradation, respectively. Quantitative results find that degradation on these two axes as the model conditions on itself are either minor or non-existent. To calibrate our understanding of these metrics, the authors do a human study as well as comparing two GAN frameworks. In the discussion the authors discuss limitations of the work, mostly that the given metrics are not a complete notion of evaluation and connect their work to related literature. | SP:a0fa3a2620b05676185a997067aa3e514cd56a35 |
Quantifying Exposure Bias for Open-ended Language Generation | 1 INTRODUCTION . Language model ( LM ) is a central module for natural language generation ( NLG ) tasks ( Young et al. , 2017 ) such as open-ended language generation ( Radford et al. , 2018 ; Nadeem et al. , 2020 ) , machine translation ( Wu et al. , 2017 ) , dialogue response generation ( Li et al. , 2017 ) , image captioning ( Lin et al. , 2014 ) , etc . For decades , maximum likelihood estimation ( MLE ) has been the most widely used objective for LM training . However , there is a popular belief in the natural language processing ( NLP ) community that standard MLE training suffers from the exposure bias problem which leads to an incremental performance degradation during test-time generation . The claim of the exposure bias problem ( Bengio et al. , 2015 ; Ranzato et al. , 2016 ) is originated from the following discrepancy between MLE training and test-time generation for auto-regressive language models : During training , the model is trained to predict the next word conditioned on prefix ( or history ) words sampled from the ground-truth data distribution ; While during generation , the model generates words conditioned on prefix sequences generated by the model itself . Hence , due to the exposure to real data during training , the language model could potentially be biased to only perform well with data prefixes . Therefore , it is claimed ( and widely believed among researchers ) that during generation the errors should accumulate along the generated sequence , and the distribution generated by the model would be incrementally distorted . The forced exposure to ground-truth data during training is also referred to as teacher forcing . In order to avoid teacher forcing , many training algorithms ( Bengio et al. , 2015 ; Lamb et al. , 2016 ; Ranzato et al. , 2016 ; Yu et al. , 2016 ; Zhu et al. , 2018 ; Lu et al. , 2018 ; Lin et al. , 2017 ; Guo et al. , 2017 ; Rajeswar et al. , 2017 ; Wiseman & Rush , 2016 ; Nie et al. , 2019 ; Shi et al. , 2018 ; de Masson d ’ Autume et al. , 2019 ; Rennie et al. , 2016 ) have been proposed as alternatives to MLE training for open-ended language generation . Most of these works utilize techniques from generative adversarial networks ( GANs ) ( Goodfellow et al. , 2014 ) or reinforcement learning ( RL ) ( Sutton & Barto , 1998 ) . In this paper , we refer to these algorithms as non-MLE methods . With the huge research efforts devoted to alleviate exposure bias , interestingly , the existence or significance of exposure bias is much less studied . On the other hand , despite the criticism , MLE ( teacher forcing ) has remained to be the dominant objective for LM training ( Radford et al. , 2018 ; Keskar et al. , 2019 ) . To make the situation more curious , multiple recent works show that the proposed non-MLE methods actually have inferior generation performance ( Caccia et al. , 2018 ; de Masson d ’ Autume et al. , 2019 ) than the MLE baseline . These negative results lead us to question : Is exposure bias truly a serious problem for MLE training ? In this work we seek a direct answer to the above question . Here we briefly summarize our contributions : We conduct controlled experiments in which we remove the training-generation discrepancy in the prefix , and design various metrics to quantify the performance improvement of the generation as the prefix length grows . On the contrary to our expectation , our measurements consistently show that the performance gain is limited , and the incremental distortion as claimed by exposure bias is not observed ( the performance gap does not become larger with longer prefixes ) . In the next section , we begin by introducing notations and background . 2 PRELIMINARIES . The task of auto-regressive language modelling is to learn the probability distribution of the ( l + 1 ) th word ( or token ) Wl+1 in a sentence W conditioned on the prefix W1 : l : = ( W1 , . . . , Wl ) . We use Wi 2 V to denote a discrete random variable distributed across the vocabulary V . For simplicity , we assume all sentences are of length L in the formulations . Denoting the ground-truth data distribution as PD , the standard MLE training aims to minimize the negative log-likelihood ( NLL ) loss below : LMLE = E W⇠PD ⌃L 1 l=0 logP✓ ( Wl+1|W1 : l ) , ( 1 ) where P✓ ( · | W1 : l ) denotes the conditional distribution of Wl+1 of P✓ given a prefix W1 : l , and ✓ stands for the set of parameters to be trained . Note that the concept of “ sentence ” ( W ) can be naturally generalized to paragraphs or even articles , depending on the target task . We denote the distribution of a MLE-trained LM as PM , which is the major subject of this study . We will experiment with two popular model architectures : LSTM LM ( Hochreiter & Schmidhuber , 1997 ; Sundermeyer et al. , 2012 ) and transformer LM ( Baevski & Auli , 2018 ; Dai et al. , 2019 ) . For generation , we do classical ancestral sampling without invoking sampling algorithms such as top-k sampling ( Fan et al. , 2018 ) for the following reasons : ( 1 ) The sampling algorithms are known to trade quality out of diversity ( Nadeem et al. , 2020 ; Caccia et al. , 2018 ) . So , invoking them could “ hide ” the exposure bias problem because the prefixes from the model will be of higher quality . ( 2 ) The sampling algorithms requires tuning of hyper-parameters , which will complicate the comparison . In addition to popular measures in natural language generation ( NLG ) such as BLEU ( Papineni et al. , 2002 ) or METEOR ( Denkowski & Lavie , 2014 ) , our quantification approaches also rely on the measurements of the divergence between two distributions . Let P denote the set of probability distributions on the vocabulary V , and let fdiv : P ⇥ P ! R 0 be a divergence function between two distributions ( e.g. , total variation distance ) . We will adopt two popular probability divergence functions : total variation distance ( denoted as dTV ) and Jensen-Shannon divergence ( denoted as dJS ) . We provide definitions of dTV and dJS in Appendix A . Our experiments will be focused on the task of open-ended language generation , which is arguably a good test bed for exposure bias because of the following reasons : ( 1 ) The generation length is long . ( 2 ) Different from typical seq2seq tasks such as machine translation , the generation space is only weakly constrained and the topics can be very diverse , which means the training-generation discrepancy could be large . 3 A QUALITATIVE ATTEMPT . We begin with a qualitative attempt to verify the significance of exposure bias . We design a prefixswitching experiment as follows : We feed a MLE-trained transformer LM on the wiki-103 dataset with four types of prefixes of the same length : ( 1 ) test-data samples , ( 2 ) model ’ s own samples , ( 3 ) test-data samples shuffled on word-level , or ( 4 ) samples from a uniformly random distribution on V . Then we let the model continue the generation given these prefixes and compare the quality of the samples in a qualitative manner . We defer details of the model and dataset to Section 5 . The intuition behind the prefix-switching experiment follows immediately from the original claim of exposure bias : During generation , if we set the prefix distribution to be the ground-truth data distribution instead of the model ’ s own distribution , then the discrepancy between training and generation in the prefix is removed , and hence the model ’ s generation quality should be much better . In the extreme case of shuffled or random prefixes , due to the claim from exposure bias that the errors should accumulate , we expect the model to generate also badly distorted sequences . The samples with different types of prefixes are shown in Table 1 . To make the generation from data and model prefix more comparable , we force the same prompt at the beginning of the context to constrain the topic . Moreover , we intentionally use long prefixes of length 100 , in the hope that the incremental distortion of generation ( as claimed by exposure bias ) would become observable . We include another set of examples with the same transformer LM , and examples with a LSTM LM in Appendix B , which gives similar observations . On the contrary to our expectation , we do not observe a noticeable difference in sample quality comparing samples from model and data prefixes . More surprisingly , the model is still able to generate fairly good samples from shuffled prefixes . Even in the extreme case of random prefixes , we still observe basic language structures in the sample . This experiment suggests that the MLE-trained auto-regressive LMs have the self-recovery ability , i.e. , the model is able to recover from artificially distorted history input , and generate samples with reasonable quality . This phenomenon can not be explained by exposure bias which claims that the errors along the generation process should , on the contrary , accumulate . We conclude that this qualitative attempt fails to show the significance of exposure bias , indicating its impact could be more subtle than expected . In the following sections , we turn to more rigorous quantification methods to measure the impact of exposure bias . 4 QUANTIFICATION METHODS . Following the intuition of the prefix switching experiment , we design our quantification metrics to be a simple ratio of the relative performance gain when length-l data prefixes in fed to the model as opposed to the original model prefixes . And we compute the measurements for different prefix lengths . For a systematic assessment of exposure bias , we decompose the claim of exposure bias into two factors : ( 1 ) The discrepancy or mismatch in the prefix distribution would indeed hurt the generation performance , in general . ( 2 ) Moreover , the distortion should be incremental along the generation . The first factor can be reflected by the average magnitude of the measurements ( the values are expected to be larger than 1 by a meaningful margin ) , and the second factor can be reflected by whether the measurements are increasing along the prefix length . We now go into the detailed definitions of our metrics . We attempt to quantify the impact of exposure bias on three key aspects of open-ended language generation : quality , diversity , and consistency . We first introduce EB-M , which covers the quality and diversity aspects , and then EB-C , which covers the consistency aspect . 4.1 DEFINITION OF EB-M . In this section , we propose the EB-M metric . Since the key idea is to compare the generation quality with different types of prefixes , denoting the prefix distribution as PH 2 { PM , PD } ( model or data prefixes ) , we first formalize the following generation process : • Given a prefix length l and a prefix distribution PH , we sample W1 : l from PH . • Conditioned on the prefix W1 : l , we sample Wl+1 : l+lgen from PM , where Wl+j is sampled from PM ( · | W1 : l+j 1 ) with j > 0 , and lgen is the length of generation . We denote the marginal distribution of Wl+1 : l+lgen of the above random process as P Wl+1 : l+lgen M |H . If exposure bias is indeed serious , we expect the quality or diversity of Wl+1 : l+lgen to be better when PD is used as PH than PM . In our experiments we fix lgen to be 30 , and vary the prefix length l. With these ingredients in hand , we now propose the EB-M quantification for exposure bias . It reflects the relative performance gain when the length-l prefix is from PD instead of from PM , and is formulated as below : EB-M ( M , l , fscore ) = fscore ( P Wl+1 : l+lgen M |D , P Wl+1 : l+lgen D ) fscore ( P Wl+1 : l+lgen M |M , P Wl+1 : l+lgen D ) , ( 2 ) where fscore is a pre-defined scoring function1 of the generation samples , and we assume higher value of fscore indicates that the generation is of higher quality or diversity . In our experiments , we will use popular NLG metrics including BLEU ( Yu et al. , 2016 ; Caccia et al. , 2018 ) / Nist ( Doddington , 2002 ) / METEOR ( Denkowski & Lavie , 2014 ) , which mainly capture the quality aspect , and backwardBLEU ( Shi et al. , 2018 ) / n-gram entropy ( Zhang et al. , 2018 ) , which capture the diversity aspect . We will show that the observations from different metrics are consistent . EB-M has a potential weakness that it doesn ’ t reflect how the generation is consistent with the given prefix W1 : l , because it only focuses on the marginal distribution of Wl+1 : l+lgen . To cover this shortcoming , in the next section we propose another quantification method named EB-C , which focuses on the model ’ s conditional generation distribution of Wl+1 given a prefix W1 : l . | The paper studies the exposure bias in auto-regressive neural language models. This problem is known to cause incremental performance degradation, and attempts to mitigate this problem have received significant attention in the community (using, e.g., RL and GANs). The paper claims that prior work has mostly focused on addressing the problem rather than measuring how severe the exposure bias problem actually is. Despite extensive previous work on mitigating exposure bias, the paper suggests that the exposure bias is not “large enough [to] induce drastic performance loss during generation” (e.g., a human evaluation controlling for exposure bias show relative differences of only < 3%). | SP:a0fa3a2620b05676185a997067aa3e514cd56a35 |
Optimal Rates for Averaged Stochastic Gradient Descent under Neural Tangent Kernel Regime | 1 INTRODUCTION . Recent studies have revealed why a stochastic gradient descent for neural networks converges to a global minimum and why it generalizes well under the overparameterized setting in which the number of parameters is larger than the number of given training examples . One prominent approach is to map the learning dynamics for neural networks into function spaces and exploit the convexity of the loss functions with respect to the function . The neural tangent kernel ( NTK ) ( Jacot et al. , 2018 ) has provided such a connection between the learning process of a neural network and a kernel method in a reproducing kernel Hilbert space ( RKHS ) associated with an NTK . The global convergence of the gradient descent was demonstrated in Du et al . ( 2019b ) ; Allen-Zhu et al . ( 2019a ) ; Du et al . ( 2019a ) ; Allen-Zhu et al . ( 2019b ) through the development of a theory of NTK with the overparameterization . In these theories , the positivity of the NTK on the given training examples plays a crucial role in exploiting the property of the NTK . Specifically , the positivity of the Gram-matrix of the NTK leads to a rapid decay of the training loss , and thus the learning dynamics can be localized around the initial point of a neural network with the overparameterization , resulting in the equivalence between two learning dynamics for neural networks and kernel methods with the NTK through a linear approximation of neural networks . Moreover , Arora et al . ( 2019a ) provided a generalization bound of O ( T−1/2 ) , where T is the number of training examples , on a gradient descent under the positivity assumption of the NTK . These studies provided the first steps in understanding the role of the NTK . However , the eigenvalues of the NTK converge to zero as the number of examples increases , as shown in Su & Yang ( 2019 ) ( also see Figure 1 ) , resulting in the degeneration of the NTK . This phenomenon indicates that the convergence rates in previous studies in terms of generalization are generally slower than O ( T−1/2 ) owing to the dependence on the minimum eigenvalue . Moreover , Bietti & Mairal ( 2019 ) ; Ronen et al . ( 2019 ) ; Cao et al . ( 2019 ) also supported this observation by providing a precise estimation of the decay of the eigenvalues , and Ronen et al . ( 2019 ) ; Cao et al . ( 2019 ) proved the spectral bias ( Rahaman et al. , 2019 ) for a neural network , where lower frequencies are learned first using a gradient descent . By contrast , several studies showed faster convergence rates of the ( averaged ) stochastic gradient descent in the RKHS in terms of the generalization ( Cesa-Bianchi et al. , 2004 ; Smale & Yao , 2006 ; Ying & Zhou , 2006 ; Neu & Rosasco , 2018 ; Lin et al. , 2020 ) . In particular , by extending the results in a finite-dimensional case ( Bach & Moulines , 2013 ) , Dieuleveut & Bach ( 2016 ) ; Dieuleveut et al . ( 2017 ) showed convergence rates of O ( T −2rβ 2rβ+1 ) depending on the complexity r ∈ [ 1/2 , 1 ] of the target functions and the decay rate β > 1 of the eigenvalues of the kernel ( a.k.a . the complexity of the hypothesis space ) . In addition , extensions to the random feature settings ( Rahimi & Recht , 2007 ; Rudi & Rosasco , 2017 ; Carratino et al. , 2018 ) , to the multi-pass variant ( Pillaud-Vivien et al. , 2018b ) , and to the tail-averaging and mini-batching variant ( Mücke et al. , 2019 ) have been developed . Motivation . The convergence rate of O ( T −2rβ 2rβ+1 ) is always faster than O ( T−1/2 ) and is known as the minimax optimal rate ( Caponnetto & De Vito , 2007 ; Blanchard & Mücke , 2018 ) . Hence , a gap exists between the theories regarding NTK and kernel methods . In other words , there is still room for an investigation into a stochastic gradient descent due to a lack of specification of the complexities of the target function and the hypothesis space . That is , to obtain faster convergence rates , we should specify the eigenspaces of the NTK that mainly contain the target function ( i.e. , the complexity of the target function ) , and specify the decay rates of the eigenvalues of the NTK ( i.e. , the complexity of the hypothesis space ) , as studied in kernel methods ( Caponnetto & De Vito , 2007 ; Steinwart et al. , 2009 ; Dieuleveut & Bach , 2016 ) . In summary , the fundamental question in this study is Can stochastic gradient descent for overparameterized neural networks achieve the optimal rate in terms of the generalization by exploiting the complexities of the target function and hypothesis space ? In this study , we answer this question in the affirmative , thereby bridging the gap between the theories of overparameterized neural networks and kernel methods . 1.1 CONTRIBUTIONS . The connection between neural networks and kernel methods is being understood via the NTK , but it is still unknown whether the optimal convergence rate faster than O ( T−1/2 ) is achievable by a certain algorithm for neural networks . This is the first paper to overcome technical challenges of achieving the optimal convergence rate under the NTK regime . We obtain the minimax optimal convergence rates ( Corollary 1 ) , inherited from the learning dynamics in an RKHS , for an averaged stochastic gradient descent for neural networks . That is , we show that smooth target functions efficiently specified by the NTK are learned rapidly at faster convergence rates than O ( 1/ √ T ) . Moreover , we obtain an explicit optimal convergence rate of O ( T −2rd 2rd+d−1 ) for a smooth approximation of the ReLU network ( Corollary 2 ) , where d is the dimensionality of the data space and r is the complexity of the target function specified by the NTK of the ReLU network . 1.2 TECHNICAL CHALLENGE . The key to showing a global convergence ( Theorem 1 ) is making the connection between kernel methods and neural networks in some sense . Although this sort of analysis has been developed in several studies ( Du et al. , 2019b ; Arora et al. , 2019a ; Weinan et al. , 2019 ; Arora et al. , 2019b ; Lee et al. , 2019 ; 2020 ) , we would like to emphasize that our results can not be obtained by direct application of their results . A naive idea is to simply combine their results with the convergence analysis of the stochastic gradient descent for kernel methods , but it does not work . The main reason is that we need the L2-bound weighted by a true data distribution on the gap between dynamics of stochastic gradient descent for neural networks and kernel methods if we try to derive a convergence rate of population risks for neural networks from that for kernel methods . However , such a bound is not provided in related studies . Indeed , to the best of our knowledge , all related studies make this kind of connection regarding the gap on training dataset or sample-wise high probability bound ( Lee et al. , 2019 ; Arora et al. , 2019b ) . That is , a statement “ for every input data x with high probability |g ( t ) nn ( x ) − g ( t ) ntk ( x ) | < ” can not yield a desired statement “ ‖g ( t ) nn − g ( t ) ntk‖L2 ( ρX ) < ” where g ( t ) nn and g ( t ) ntk are t-th iterate of gradient descent for a neural network and corresponding iterate described by NTK , and ‖·‖L2 ( ρX ) is the L2-norm weighted by a marginal data distribution ρX over the input space . Moreover , we note that we can not utilize the positivity of the Gram-matrix of NTK which plays a crucial role in related studies because we consider the population risk with respect to ‖ · ‖L2 ( ρX ) rather than the empirical risk . To overcome these difficulties we develop a different strategy of the proof . First , we make a bound on the gap between two dynamics of the averaged stochastic gradient descent for a two-layer neural network and its NTK with width M ( Proposition A ) , and obtain a generalization bound for this intermediate NTK ( Theorem A in Appendix ) . Second , we remove the dependence on the width of M from the intermediate bound . These steps are not obvious because we need a detailed investigation to handle the misspecification of the target function by an intermediate NTK . Based on detailed analyses , we obtain a faster and precise bound than those in previous results ( Arora et al. , 2019a ) . The following is an informal version of Proposition A providing a new connection between a two-layer neural networks and corresponding NTK with width M . Proposition 1 ( Informal ) . Under appropriate conditions we simultaneously run averaged stochastic gradient descent for a neural network with width of M and for its NTK . Assume they share the same hyper-parameters and examples to compute stochastic gradients . Then , for arbitrary number of iterations T ∈ Z+ and > 0 , there exists M ∈ Z+ depending only on T and such that ∀t ≤ T , ‖g ( t ) nn − g ( t ) ntk‖L∞ ( ρX ) ≤ , where g ( t ) nn and g ( t ) ntk are iterates obtained by averaged stochastic gradient descent . This proposition is the key because it connects two learning dynamics for a neural network and its NTK through overparameterization without the positivity of the NTK . Instead of the positivity , this proposition says that overparameterization increases the time stayed in the NTK regime where the learning dynamics for neural networks can be characterized by the NTK . As a result , the averaged stochastic gradient descent for the overparameterized two-layer neural networks can fully inherit preferable properties from learning dynamics in the NTK as long as the network width is sufficiently large . See Appendix A for detail . 1.3 ADDITIONAL RELATED WORK . Besides the abovementioned studies , there are several works ( Chizat & Bach , 2018b ; Wu et al. , 2019 ; Zou & Gu , 2019 ) that have shown the global convergence of ( stochastic ) gradient descent for overparameterized neural networks essentially relying on the positivity condition of NTK . Moreover , faster convergence rates of the second-order methods such as the natural gradient descent and GaussNewton method have been demonstrated ( Zhang et al. , 2019 ; Cai et al. , 2019 ) in the similar setting , and the further improvement of Gauss-Newton method with respect to the cost per iteration has been conducted in Brand et al . ( 2020 ) . There have been several attempts to improve the overparameterization size in the NTK theory . For the regression problem , Song & Yang ( 2019 ) has succeeded in reducing the network width required in Du et al . ( 2019b ) by utilizing matrix Chernoff bound . For the classification problem , the positivity condition can be relaxed to a separability condition using another reference model ( Cao & Gu , 2019a ; b ; Nitanda et al. , 2019 ; Ji & Telgarsky , 2019 ) , resulting in mild overparameterization and generalization bounds of O ( T−1/2 ) or O ( T−1/4 ) on classification errors . For an averaged stochastic gradient descent on classification problems in RKHSs , linear convergence rates of the expected classification errors have been demonstrated in Pillaud-Vivien et al . ( 2018a ) ; Nitanda & Suzuki ( 2019 ) . Although our study focuses on regression problems , we describe how to combine their results with our theory in the Appendix . The mean field regime ( Nitanda & Suzuki , 2017 ; Mei et al. , 2018 ; Chizat & Bach , 2018a ) that is a different limit of neural networks from the NTK is also important for the global convergence analysis of the gradient descent . In the mean field regime , the learning dynamics follows the Wasserstein gradient flow which enables us to establish convergence analysis in the probability space . Moreover , several studies ( Allen-Zhu & Li , 2019 ; Bai & Lee , 2019 ; Ghorbani et al. , 2019 ; Allen-Zhu & Li , 2020 ; Li et al. , 2020 ; Suzuki , 2020 ) attempt to show the superiority of neural networks over kernel methods including the NTK . Although it is also very important to study the conditions beyond the NTK regime , they do not affect our contribution and vice versa . Indeed , which method is better depends on the assumption on the target function and data distribution , so it is important to investigate the optimal convergence rate and optimal method in each regime . As shown in our study , the averaged stochastic gradient descent for learning neural network achieves the optimal convergence rate if the target function is included in RKHS associated with the NTK with the small norm . It means there are no methods that outperform the averaged stochastic gradient descent under this setting . | This paper considers the optimization of a wide two layers neural network (for a regression task) using averaged SGD. The authors consider the Neural Tangent Kernel (NTK) regime. The NTK is a kernel defined using the activation function and the initial distribution of the parameters of the input layer. The RKHS H associated to this NTK is assumed to contain the Bayes predictor. Based on this, the authors derive a convergence rate for the predictor constructed from the T-th iterate of averaged SGD and the Bayes predictor in terms of the L2 distance wrt the distribution of the features. By specifying this bound in terms of the decay of the eigenvalues of the integral operator in H, they obtain an explicit generalization error bound, which is optimal for the class of problems considered in the paper. | SP:ccdb108ba692c4227be899e453faf3c36102ff71 |
Optimal Rates for Averaged Stochastic Gradient Descent under Neural Tangent Kernel Regime | 1 INTRODUCTION . Recent studies have revealed why a stochastic gradient descent for neural networks converges to a global minimum and why it generalizes well under the overparameterized setting in which the number of parameters is larger than the number of given training examples . One prominent approach is to map the learning dynamics for neural networks into function spaces and exploit the convexity of the loss functions with respect to the function . The neural tangent kernel ( NTK ) ( Jacot et al. , 2018 ) has provided such a connection between the learning process of a neural network and a kernel method in a reproducing kernel Hilbert space ( RKHS ) associated with an NTK . The global convergence of the gradient descent was demonstrated in Du et al . ( 2019b ) ; Allen-Zhu et al . ( 2019a ) ; Du et al . ( 2019a ) ; Allen-Zhu et al . ( 2019b ) through the development of a theory of NTK with the overparameterization . In these theories , the positivity of the NTK on the given training examples plays a crucial role in exploiting the property of the NTK . Specifically , the positivity of the Gram-matrix of the NTK leads to a rapid decay of the training loss , and thus the learning dynamics can be localized around the initial point of a neural network with the overparameterization , resulting in the equivalence between two learning dynamics for neural networks and kernel methods with the NTK through a linear approximation of neural networks . Moreover , Arora et al . ( 2019a ) provided a generalization bound of O ( T−1/2 ) , where T is the number of training examples , on a gradient descent under the positivity assumption of the NTK . These studies provided the first steps in understanding the role of the NTK . However , the eigenvalues of the NTK converge to zero as the number of examples increases , as shown in Su & Yang ( 2019 ) ( also see Figure 1 ) , resulting in the degeneration of the NTK . This phenomenon indicates that the convergence rates in previous studies in terms of generalization are generally slower than O ( T−1/2 ) owing to the dependence on the minimum eigenvalue . Moreover , Bietti & Mairal ( 2019 ) ; Ronen et al . ( 2019 ) ; Cao et al . ( 2019 ) also supported this observation by providing a precise estimation of the decay of the eigenvalues , and Ronen et al . ( 2019 ) ; Cao et al . ( 2019 ) proved the spectral bias ( Rahaman et al. , 2019 ) for a neural network , where lower frequencies are learned first using a gradient descent . By contrast , several studies showed faster convergence rates of the ( averaged ) stochastic gradient descent in the RKHS in terms of the generalization ( Cesa-Bianchi et al. , 2004 ; Smale & Yao , 2006 ; Ying & Zhou , 2006 ; Neu & Rosasco , 2018 ; Lin et al. , 2020 ) . In particular , by extending the results in a finite-dimensional case ( Bach & Moulines , 2013 ) , Dieuleveut & Bach ( 2016 ) ; Dieuleveut et al . ( 2017 ) showed convergence rates of O ( T −2rβ 2rβ+1 ) depending on the complexity r ∈ [ 1/2 , 1 ] of the target functions and the decay rate β > 1 of the eigenvalues of the kernel ( a.k.a . the complexity of the hypothesis space ) . In addition , extensions to the random feature settings ( Rahimi & Recht , 2007 ; Rudi & Rosasco , 2017 ; Carratino et al. , 2018 ) , to the multi-pass variant ( Pillaud-Vivien et al. , 2018b ) , and to the tail-averaging and mini-batching variant ( Mücke et al. , 2019 ) have been developed . Motivation . The convergence rate of O ( T −2rβ 2rβ+1 ) is always faster than O ( T−1/2 ) and is known as the minimax optimal rate ( Caponnetto & De Vito , 2007 ; Blanchard & Mücke , 2018 ) . Hence , a gap exists between the theories regarding NTK and kernel methods . In other words , there is still room for an investigation into a stochastic gradient descent due to a lack of specification of the complexities of the target function and the hypothesis space . That is , to obtain faster convergence rates , we should specify the eigenspaces of the NTK that mainly contain the target function ( i.e. , the complexity of the target function ) , and specify the decay rates of the eigenvalues of the NTK ( i.e. , the complexity of the hypothesis space ) , as studied in kernel methods ( Caponnetto & De Vito , 2007 ; Steinwart et al. , 2009 ; Dieuleveut & Bach , 2016 ) . In summary , the fundamental question in this study is Can stochastic gradient descent for overparameterized neural networks achieve the optimal rate in terms of the generalization by exploiting the complexities of the target function and hypothesis space ? In this study , we answer this question in the affirmative , thereby bridging the gap between the theories of overparameterized neural networks and kernel methods . 1.1 CONTRIBUTIONS . The connection between neural networks and kernel methods is being understood via the NTK , but it is still unknown whether the optimal convergence rate faster than O ( T−1/2 ) is achievable by a certain algorithm for neural networks . This is the first paper to overcome technical challenges of achieving the optimal convergence rate under the NTK regime . We obtain the minimax optimal convergence rates ( Corollary 1 ) , inherited from the learning dynamics in an RKHS , for an averaged stochastic gradient descent for neural networks . That is , we show that smooth target functions efficiently specified by the NTK are learned rapidly at faster convergence rates than O ( 1/ √ T ) . Moreover , we obtain an explicit optimal convergence rate of O ( T −2rd 2rd+d−1 ) for a smooth approximation of the ReLU network ( Corollary 2 ) , where d is the dimensionality of the data space and r is the complexity of the target function specified by the NTK of the ReLU network . 1.2 TECHNICAL CHALLENGE . The key to showing a global convergence ( Theorem 1 ) is making the connection between kernel methods and neural networks in some sense . Although this sort of analysis has been developed in several studies ( Du et al. , 2019b ; Arora et al. , 2019a ; Weinan et al. , 2019 ; Arora et al. , 2019b ; Lee et al. , 2019 ; 2020 ) , we would like to emphasize that our results can not be obtained by direct application of their results . A naive idea is to simply combine their results with the convergence analysis of the stochastic gradient descent for kernel methods , but it does not work . The main reason is that we need the L2-bound weighted by a true data distribution on the gap between dynamics of stochastic gradient descent for neural networks and kernel methods if we try to derive a convergence rate of population risks for neural networks from that for kernel methods . However , such a bound is not provided in related studies . Indeed , to the best of our knowledge , all related studies make this kind of connection regarding the gap on training dataset or sample-wise high probability bound ( Lee et al. , 2019 ; Arora et al. , 2019b ) . That is , a statement “ for every input data x with high probability |g ( t ) nn ( x ) − g ( t ) ntk ( x ) | < ” can not yield a desired statement “ ‖g ( t ) nn − g ( t ) ntk‖L2 ( ρX ) < ” where g ( t ) nn and g ( t ) ntk are t-th iterate of gradient descent for a neural network and corresponding iterate described by NTK , and ‖·‖L2 ( ρX ) is the L2-norm weighted by a marginal data distribution ρX over the input space . Moreover , we note that we can not utilize the positivity of the Gram-matrix of NTK which plays a crucial role in related studies because we consider the population risk with respect to ‖ · ‖L2 ( ρX ) rather than the empirical risk . To overcome these difficulties we develop a different strategy of the proof . First , we make a bound on the gap between two dynamics of the averaged stochastic gradient descent for a two-layer neural network and its NTK with width M ( Proposition A ) , and obtain a generalization bound for this intermediate NTK ( Theorem A in Appendix ) . Second , we remove the dependence on the width of M from the intermediate bound . These steps are not obvious because we need a detailed investigation to handle the misspecification of the target function by an intermediate NTK . Based on detailed analyses , we obtain a faster and precise bound than those in previous results ( Arora et al. , 2019a ) . The following is an informal version of Proposition A providing a new connection between a two-layer neural networks and corresponding NTK with width M . Proposition 1 ( Informal ) . Under appropriate conditions we simultaneously run averaged stochastic gradient descent for a neural network with width of M and for its NTK . Assume they share the same hyper-parameters and examples to compute stochastic gradients . Then , for arbitrary number of iterations T ∈ Z+ and > 0 , there exists M ∈ Z+ depending only on T and such that ∀t ≤ T , ‖g ( t ) nn − g ( t ) ntk‖L∞ ( ρX ) ≤ , where g ( t ) nn and g ( t ) ntk are iterates obtained by averaged stochastic gradient descent . This proposition is the key because it connects two learning dynamics for a neural network and its NTK through overparameterization without the positivity of the NTK . Instead of the positivity , this proposition says that overparameterization increases the time stayed in the NTK regime where the learning dynamics for neural networks can be characterized by the NTK . As a result , the averaged stochastic gradient descent for the overparameterized two-layer neural networks can fully inherit preferable properties from learning dynamics in the NTK as long as the network width is sufficiently large . See Appendix A for detail . 1.3 ADDITIONAL RELATED WORK . Besides the abovementioned studies , there are several works ( Chizat & Bach , 2018b ; Wu et al. , 2019 ; Zou & Gu , 2019 ) that have shown the global convergence of ( stochastic ) gradient descent for overparameterized neural networks essentially relying on the positivity condition of NTK . Moreover , faster convergence rates of the second-order methods such as the natural gradient descent and GaussNewton method have been demonstrated ( Zhang et al. , 2019 ; Cai et al. , 2019 ) in the similar setting , and the further improvement of Gauss-Newton method with respect to the cost per iteration has been conducted in Brand et al . ( 2020 ) . There have been several attempts to improve the overparameterization size in the NTK theory . For the regression problem , Song & Yang ( 2019 ) has succeeded in reducing the network width required in Du et al . ( 2019b ) by utilizing matrix Chernoff bound . For the classification problem , the positivity condition can be relaxed to a separability condition using another reference model ( Cao & Gu , 2019a ; b ; Nitanda et al. , 2019 ; Ji & Telgarsky , 2019 ) , resulting in mild overparameterization and generalization bounds of O ( T−1/2 ) or O ( T−1/4 ) on classification errors . For an averaged stochastic gradient descent on classification problems in RKHSs , linear convergence rates of the expected classification errors have been demonstrated in Pillaud-Vivien et al . ( 2018a ) ; Nitanda & Suzuki ( 2019 ) . Although our study focuses on regression problems , we describe how to combine their results with our theory in the Appendix . The mean field regime ( Nitanda & Suzuki , 2017 ; Mei et al. , 2018 ; Chizat & Bach , 2018a ) that is a different limit of neural networks from the NTK is also important for the global convergence analysis of the gradient descent . In the mean field regime , the learning dynamics follows the Wasserstein gradient flow which enables us to establish convergence analysis in the probability space . Moreover , several studies ( Allen-Zhu & Li , 2019 ; Bai & Lee , 2019 ; Ghorbani et al. , 2019 ; Allen-Zhu & Li , 2020 ; Li et al. , 2020 ; Suzuki , 2020 ) attempt to show the superiority of neural networks over kernel methods including the NTK . Although it is also very important to study the conditions beyond the NTK regime , they do not affect our contribution and vice versa . Indeed , which method is better depends on the assumption on the target function and data distribution , so it is important to investigate the optimal convergence rate and optimal method in each regime . As shown in our study , the averaged stochastic gradient descent for learning neural network achieves the optimal convergence rate if the target function is included in RKHS associated with the NTK with the small norm . It means there are no methods that outperform the averaged stochastic gradient descent under this setting . | This paper analyzed the averaged SGD for overparameterized two-layer NNs for regression problems. Particularly, they show that the averaged SGD can achieve the minimax optimal convergence rate, with the global convergence guarantee. To achieve, they propose a new parameter which captures the ``complexities’’ of the target function and the RKHS associated with the NTK. | SP:ccdb108ba692c4227be899e453faf3c36102ff71 |
TropEx: An Algorithm for Extracting Linear Terms in Deep Neural Networks | 1 INTRODUCTION . Many of the most widely used neural network architectures , including VGG ( Simonyan & Zisserman , 2015 ) , GoogLeNet ( Szegedy et al. , 2015 ) and ResNet ( He et al. , 2016 ) , make use of rectified linear activations ( ReLU , ( Hahnloser et al. , 2000 ; Glorot et al. , 2011 ) , i.e. , σ ( x ) = max { x , 0 } ) and are therefore piecewise linear functions . Despite the apparent simplicity of these functions , there is a lack of theoretical understanding of the factors that contribute to the success of such architectures . Previous attempts of understanding piecewise linear network functions have focused on estimating the number of linear terms , which are the linear pieces ( affine functions ) that constitute the network function . A linear region is being defined as a maximally connected subset of the input space on which the network function is linear . Since computing the exact number of linear regions is intractable , work has focused on obtaining upper and lower bounds for this number ( Arora et al. , 2016 ; Serra et al. , 2018 ; Pascanu et al. , 2013 ; Raghu et al. , 2017 ; Montufar et al. , 2014 ; Montúfar , 2017 ; Xiong et al. , 2020 ; Zhang et al. , 2018 ) . To our knowledge , the currently best upper and lower bounds were calculated by Serra et al . ( 2018 ) . Raghu et al . ( 2017 ) show these bounds to be asymptotically tight . All of the mentioned papers share the intuition that the number of linear regions of neural networks measures their expressivity . Since the bounds grow linearly in width and exponentially in depth , deep networks are interpreted to have greater representational power . However , these bounds are staggeringly high : the upper bound on the number of linear regions in ( Serra et al. , 2018 ) exceeds 10300 even for the smallest networks we experimented on . ( There are approximately 1080 atoms in the universe . ) For slightly larger networks , the upper bound exceeds 1017000 whereas the lower bound exceeds 1083 linear regions . The number of training samples is generally much smaller than the estimated number of linear regions ( ≤ 106 ) , so that almost none of the linear regions contains training data . This raises the question of how representative the number of linear regions is for network performance and how information extracted from training samples passes on to the many linear regions free of data for successful generalization to test data . There are indications that a high number of linear regions is not required for good network performance . Frankle & Carbin ( 2019 ) point out that smaller networks perform similarly well as large ones , when a suitable initialization of the smaller network can be found from training the larger one . Hence , ∗Denotes equal contribution . the expressivity of the large network is helpful to explore the parameter space , but the small , less expressive network is sufficient to achieve high accuracy . Lee et al . ( 2019 ) and Croce et al . ( 2018 ) modify the training loss to encourage larger linear regions with the goal of robustness to adversarial attacks . Hanin & Rolnick ( 2019b ; a ) argue that in practice there are fewer linear regions than expected from the bounds and empirically investigate this for the MNIST data set . All these observations question the explanatory power of astronomically high bounds for the number of linear regions . More recently , the focus of research on linear regions has been shifting away from pure counting towards an understanding of the linear regions themselves . Zhang & Wu ( 2020 ) study geometric properties of linear regions and notice that batch normalization and dropout , albeit leading to similar network accuracies , produce differently looking linear regions . Our approach to the understanding of linear regions differs in that it investigates the linear coefficients of linear regions . To this end , we propose TropEx , a tropical algebra-based algorithm extracting linear terms of the network function N ( Figure 1 ) using a data set X . TropEx outputs an extracted function N ( X ) containing only the linear terms corresponding to regions on which data lies . As a result , N and N ( X ) agree on neighbourhoods of all data points . This creates a tool for the study of generalization from a new viewpoint , i.e. , the perspective of linear regions and their coefficients . Our contributions are as follows : • A new computational framework representing tropical functions ( Definition B.4 ) as matrices to efficiently perform tropical calculations appearing in networks with rectified linear activations . • This framework allows us to derive TropEx , an algorithm to systematically extract linear terms from piecewise linear network functions.1 • An application of TropEx to fully-connected ( FCN ) and convolutional networks ( CNN ) reveals that ( i ) consistently all training and test samples fall into different linear regions ; ( ii ) Simple tasks ( MNIST ) can be solved with the few linear regions of training samples alone , while this does not hold for more complex data sets . ( iii ) FCNs and CNNs differ in how they use linear regions free of training data for their performance on test data : Several measures illustrate that CNNs , in contrast to FCNs , tend to learn more diverse linear terms . ( iv ) We confirm that the number of linear regions alone is not a good indicator for network performance and show that the coefficients of linear regions contain information on architecture and classification performance . 2 BACKGROUND AND OVERVIEW . It was recently shown by Charisopoulos & Maragos ( 2018 ) ; Zhang et al . ( 2018 ) that ReLU neural network functions are the same as tropical rational maps . Tropical rational maps are exactly those functions where each entry in the output vector can be written as a difference of maxima Ni ( x ) = max { a+i1 ( x ) , . . . , a + in ( x ) } −max { a − i1 ( x ) , . . . , a − im ( x ) } , ( 1 ) 1Link to open source implementation : https : //github.com/martrim/tropex where each a+ij , a − ij : Rd → R is an affine function with only positive coefficients , taking the form x 7→ ∑ j wjxj+w0 with allwj ∈ R≥0 . Since the number of terms in ( 1 ) dwarfs the number of atoms in the universe , it is impossible to obtain this expression in practice . Therefore , we only extract those terms that correspond to linear regions of data points . For a fixed data point x ∈ X , the maximum of the network outputs can be written as maxiNi ( x ) = a+x ( x ) − a−x ( x ) , where a+x , a−x are the affine functions such that a+x ( x ) ≥ a+ij ( x ) , a−x ( x ) ≥ a − ij ( x ) for all i , j. TropEx extracts a + x and a − x . The extracted terms can be used to construct a tropical map N ( X ) ( x ) = ( N ( X ) 1 ( x ) , . . . , N ( X ) s ( x ) ) with maximally enlarged linear regions , given by N ( X ) i ( x ) = max { a + xk1 ( x ) , . . . , a+xkDi ( x ) } −max { a−xk1 ( x ) , . . . , a − xkDi ( x ) } , ( 2 ) where there are Di data points xk1 , . . . , xkDi given label i by the original network . Being a tropical rational map , the functionN ( X ) is again a ReLU neural network function by Zhang et al . ( 2018 ) . The maximal entries of the two output vectors ( hence also the assigned labels ) of the extracted function N ( X ) and the original network N agree in the neighbourhood of any data point x ∈ X . We discuss the basics of tropical algebra in Appendix B.1 and refer to Maclagan & Sturmfels ( 2015 ) for a detailed introduction . The relation of tropical geometry and ReLU networks is studied in Zhang et al . ( 2018 ) ; Charisopoulos & Maragos ( 2018 ) ; Alfarra et al . ( 2021 ) . 3 METHOD . 3.1 MATRIX REPRESENTATION OF TROPICAL RATIONAL MAPS . If one were to represent tropical rational maps symbolically on a computer , computations would be too slow . Therefore , we present tropical rational maps as multi-dimensional arrays . Definition 3.1 . Given an affine function a : Rd0 → R ; x 7→ ∑ k wkxk + w0 , we will call the vector ( w0 , w1 , . . . , wd0 ) its coefficient vector , the scalar w0 its constant part and the vector ( w1 , . . . , wd0 ) its variable part . We can represent functions Ni : Rd0 → R as in equation ( 1 ) in the following way : Let the rows of the matrix A+i ∈ Rn×d0 and the vector a + i ∈ Rn×1 be the variable and the constant parts of the affine functions a+ij , respectively . ( Analogously for A − i and a − i . ) We can then define ( A+i , a + i ) ( x ) = max { A + i x + a + i } , where the maximum is taken over the rows of the resulting column vector . If we define the formal quotient2 of matrix-vector pairs by ( A+i , a + i ) / ( A − i , a − i ) ( x ) = max { A+i x+ a + i } −max { A − i x+ a − i } , thenNi ( x ) = ( A + i , a + i ) / ( A − i , a − i ) ( x ) , giving us a matrixrepresentation of the function Ni . An entire network function with s output dimensions can then be represented by a list ( ( A+i , a + i ) / ( A − i , a − i ) ) 1≤i≤s . The advantage of the proposed matrix representation of tropical rational maps are natural operations performing calculations that arise for ( concatenations of ) layers of neural networks ( see supplements ) . A dense layer ` : Rd1 → Rd2 with ReLU activation is represented as a list ( ( A+i , a + i ) / ( A − i , a − i ) ) 1≤i≤d2 . Denoting by Wpos and Wneg the positive and negative part of a matrix W , respectively , i.e . wposij = max { wij , 0 } and w neg ij = max { −wij , 0 } , the matrix representation of a single neuron ni ( x ) = max { w · x+ b , 0 } is given by A+i = ( wpos wneg ) , a+i = ( bpos bneg ) ; A−i = w neg , a−i = b neg . | This paper studies the role of linear terms in the network performance using nontrivial tropical algebra inspired algorithms. In particular, the paper extracts linear terms associated with the linear regions of only the training points, and uses this to generate an extracted network function. The paper proposes an algorithm TropEx to systematically extract linear terms from piecewise linear network functions built using activation functions such as ReLUs. It is shown that this extracted network can be used for classification on the test data as well. In fully connected networks, such a modeling seems to work well on the test data. In the case of CNNs, the gap between the extracted network and original one is large. The paper argues that the number of linear regions may not be the right metric for expressiveness and generalization. | SP:c42bf54b98bda516112c7b604dd2a84002c4ecfa |
TropEx: An Algorithm for Extracting Linear Terms in Deep Neural Networks | 1 INTRODUCTION . Many of the most widely used neural network architectures , including VGG ( Simonyan & Zisserman , 2015 ) , GoogLeNet ( Szegedy et al. , 2015 ) and ResNet ( He et al. , 2016 ) , make use of rectified linear activations ( ReLU , ( Hahnloser et al. , 2000 ; Glorot et al. , 2011 ) , i.e. , σ ( x ) = max { x , 0 } ) and are therefore piecewise linear functions . Despite the apparent simplicity of these functions , there is a lack of theoretical understanding of the factors that contribute to the success of such architectures . Previous attempts of understanding piecewise linear network functions have focused on estimating the number of linear terms , which are the linear pieces ( affine functions ) that constitute the network function . A linear region is being defined as a maximally connected subset of the input space on which the network function is linear . Since computing the exact number of linear regions is intractable , work has focused on obtaining upper and lower bounds for this number ( Arora et al. , 2016 ; Serra et al. , 2018 ; Pascanu et al. , 2013 ; Raghu et al. , 2017 ; Montufar et al. , 2014 ; Montúfar , 2017 ; Xiong et al. , 2020 ; Zhang et al. , 2018 ) . To our knowledge , the currently best upper and lower bounds were calculated by Serra et al . ( 2018 ) . Raghu et al . ( 2017 ) show these bounds to be asymptotically tight . All of the mentioned papers share the intuition that the number of linear regions of neural networks measures their expressivity . Since the bounds grow linearly in width and exponentially in depth , deep networks are interpreted to have greater representational power . However , these bounds are staggeringly high : the upper bound on the number of linear regions in ( Serra et al. , 2018 ) exceeds 10300 even for the smallest networks we experimented on . ( There are approximately 1080 atoms in the universe . ) For slightly larger networks , the upper bound exceeds 1017000 whereas the lower bound exceeds 1083 linear regions . The number of training samples is generally much smaller than the estimated number of linear regions ( ≤ 106 ) , so that almost none of the linear regions contains training data . This raises the question of how representative the number of linear regions is for network performance and how information extracted from training samples passes on to the many linear regions free of data for successful generalization to test data . There are indications that a high number of linear regions is not required for good network performance . Frankle & Carbin ( 2019 ) point out that smaller networks perform similarly well as large ones , when a suitable initialization of the smaller network can be found from training the larger one . Hence , ∗Denotes equal contribution . the expressivity of the large network is helpful to explore the parameter space , but the small , less expressive network is sufficient to achieve high accuracy . Lee et al . ( 2019 ) and Croce et al . ( 2018 ) modify the training loss to encourage larger linear regions with the goal of robustness to adversarial attacks . Hanin & Rolnick ( 2019b ; a ) argue that in practice there are fewer linear regions than expected from the bounds and empirically investigate this for the MNIST data set . All these observations question the explanatory power of astronomically high bounds for the number of linear regions . More recently , the focus of research on linear regions has been shifting away from pure counting towards an understanding of the linear regions themselves . Zhang & Wu ( 2020 ) study geometric properties of linear regions and notice that batch normalization and dropout , albeit leading to similar network accuracies , produce differently looking linear regions . Our approach to the understanding of linear regions differs in that it investigates the linear coefficients of linear regions . To this end , we propose TropEx , a tropical algebra-based algorithm extracting linear terms of the network function N ( Figure 1 ) using a data set X . TropEx outputs an extracted function N ( X ) containing only the linear terms corresponding to regions on which data lies . As a result , N and N ( X ) agree on neighbourhoods of all data points . This creates a tool for the study of generalization from a new viewpoint , i.e. , the perspective of linear regions and their coefficients . Our contributions are as follows : • A new computational framework representing tropical functions ( Definition B.4 ) as matrices to efficiently perform tropical calculations appearing in networks with rectified linear activations . • This framework allows us to derive TropEx , an algorithm to systematically extract linear terms from piecewise linear network functions.1 • An application of TropEx to fully-connected ( FCN ) and convolutional networks ( CNN ) reveals that ( i ) consistently all training and test samples fall into different linear regions ; ( ii ) Simple tasks ( MNIST ) can be solved with the few linear regions of training samples alone , while this does not hold for more complex data sets . ( iii ) FCNs and CNNs differ in how they use linear regions free of training data for their performance on test data : Several measures illustrate that CNNs , in contrast to FCNs , tend to learn more diverse linear terms . ( iv ) We confirm that the number of linear regions alone is not a good indicator for network performance and show that the coefficients of linear regions contain information on architecture and classification performance . 2 BACKGROUND AND OVERVIEW . It was recently shown by Charisopoulos & Maragos ( 2018 ) ; Zhang et al . ( 2018 ) that ReLU neural network functions are the same as tropical rational maps . Tropical rational maps are exactly those functions where each entry in the output vector can be written as a difference of maxima Ni ( x ) = max { a+i1 ( x ) , . . . , a + in ( x ) } −max { a − i1 ( x ) , . . . , a − im ( x ) } , ( 1 ) 1Link to open source implementation : https : //github.com/martrim/tropex where each a+ij , a − ij : Rd → R is an affine function with only positive coefficients , taking the form x 7→ ∑ j wjxj+w0 with allwj ∈ R≥0 . Since the number of terms in ( 1 ) dwarfs the number of atoms in the universe , it is impossible to obtain this expression in practice . Therefore , we only extract those terms that correspond to linear regions of data points . For a fixed data point x ∈ X , the maximum of the network outputs can be written as maxiNi ( x ) = a+x ( x ) − a−x ( x ) , where a+x , a−x are the affine functions such that a+x ( x ) ≥ a+ij ( x ) , a−x ( x ) ≥ a − ij ( x ) for all i , j. TropEx extracts a + x and a − x . The extracted terms can be used to construct a tropical map N ( X ) ( x ) = ( N ( X ) 1 ( x ) , . . . , N ( X ) s ( x ) ) with maximally enlarged linear regions , given by N ( X ) i ( x ) = max { a + xk1 ( x ) , . . . , a+xkDi ( x ) } −max { a−xk1 ( x ) , . . . , a − xkDi ( x ) } , ( 2 ) where there are Di data points xk1 , . . . , xkDi given label i by the original network . Being a tropical rational map , the functionN ( X ) is again a ReLU neural network function by Zhang et al . ( 2018 ) . The maximal entries of the two output vectors ( hence also the assigned labels ) of the extracted function N ( X ) and the original network N agree in the neighbourhood of any data point x ∈ X . We discuss the basics of tropical algebra in Appendix B.1 and refer to Maclagan & Sturmfels ( 2015 ) for a detailed introduction . The relation of tropical geometry and ReLU networks is studied in Zhang et al . ( 2018 ) ; Charisopoulos & Maragos ( 2018 ) ; Alfarra et al . ( 2021 ) . 3 METHOD . 3.1 MATRIX REPRESENTATION OF TROPICAL RATIONAL MAPS . If one were to represent tropical rational maps symbolically on a computer , computations would be too slow . Therefore , we present tropical rational maps as multi-dimensional arrays . Definition 3.1 . Given an affine function a : Rd0 → R ; x 7→ ∑ k wkxk + w0 , we will call the vector ( w0 , w1 , . . . , wd0 ) its coefficient vector , the scalar w0 its constant part and the vector ( w1 , . . . , wd0 ) its variable part . We can represent functions Ni : Rd0 → R as in equation ( 1 ) in the following way : Let the rows of the matrix A+i ∈ Rn×d0 and the vector a + i ∈ Rn×1 be the variable and the constant parts of the affine functions a+ij , respectively . ( Analogously for A − i and a − i . ) We can then define ( A+i , a + i ) ( x ) = max { A + i x + a + i } , where the maximum is taken over the rows of the resulting column vector . If we define the formal quotient2 of matrix-vector pairs by ( A+i , a + i ) / ( A − i , a − i ) ( x ) = max { A+i x+ a + i } −max { A − i x+ a − i } , thenNi ( x ) = ( A + i , a + i ) / ( A − i , a − i ) ( x ) , giving us a matrixrepresentation of the function Ni . An entire network function with s output dimensions can then be represented by a list ( ( A+i , a + i ) / ( A − i , a − i ) ) 1≤i≤s . The advantage of the proposed matrix representation of tropical rational maps are natural operations performing calculations that arise for ( concatenations of ) layers of neural networks ( see supplements ) . A dense layer ` : Rd1 → Rd2 with ReLU activation is represented as a list ( ( A+i , a + i ) / ( A − i , a − i ) ) 1≤i≤d2 . Denoting by Wpos and Wneg the positive and negative part of a matrix W , respectively , i.e . wposij = max { wij , 0 } and w neg ij = max { −wij , 0 } , the matrix representation of a single neuron ni ( x ) = max { w · x+ b , 0 } is given by A+i = ( wpos wneg ) , a+i = ( bpos bneg ) ; A−i = w neg , a−i = b neg . | The paper proposes a method for representing a computation of a neural network over a finite set of inputs by a projection onto a set of linear transformations (from the input space) called tropical rational map (TRM). TRM is essentially a snapshot representing the internal representation of however deep network based on its response to a finite set of inputs. Authors use this linearised approximation of the network internal to gather information about the complexity and generalisability of its function mapping. | SP:c42bf54b98bda516112c7b604dd2a84002c4ecfa |
Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval | 1 INTRODUCTION . Many language systems rely on text retrieval as their first step to find relevant information . For example , search ranking ( Nogueira & Cho , 2019 ) , open domain question answering ( OpenQA ) ( Chen et al. , 2017 ) , and fact verification ( Thorne et al. , 2018 ) all first retrieve relevant documents for their later stage reranking , machine reading , and reasoning models . All these later-stage models enjoy the advancements of deep learning techniques ( Rajpurkar et al. , 2016 ; Wang et al. , 2019 ) , while , the first stage retrieval still mainly relies on matching discrete bag-of-words , e.g. , BM25 , which has become the pain point of many systems ( Nogueira & Cho , 2019 ; Luan et al. , 2020 ; Zhao et al. , 2020 ) . Dense Retrieval ( DR ) aims to overcome the sparse retrieval bottleneck by matching in a continuous representation space learned via neural networks ( Lee et al. , 2019 ; Karpukhin et al. , 2020 ; Luan et al. , 2020 ) . It has many desired properties : fully learnable representation , easy integration with pretraining , and efficiency support from approximate nearest neighbor ( ANN ) search ( Johnson et al. , 2017 ) . These grant dense retrieval an intriguing potential to fundamentally overcome some intrinsic limitations of sparse retrieval , for example , vocabulary mismatch ( Croft et al. , 2009 ) . One challenge in dense retrieval is to construct proper negative instances when learning the representation space ( Karpukhin et al. , 2020 ) . Unlike in reranking ( Liu , 2009 ) where the training and testing negatives are both irrelevant documents from previous retrieval stages , in first stage retrieval , DR models need to distinguish all irrelevant ones in a corpus with millions or billions of documents . As illustrated in Fig . 1 , these negatives are quite different from those retrieved by sparse models . Recent research explored various ways to construct negative training instances for dense retrieval ( Karpukhin et al. , 2020 ) , e.g. , using contrastive learning ( Oord et al. , 2018 ; He et al. , 2020 ; Chen et al. , 2020a ) to select hard negatives in current or recent mini-batches . However , as observed in recent research ( Karpukhin et al. , 2020 ) , the in-batch local negatives , though effective in learning word or visual representations , are not significantly better than spare-retrieved negatives in representation learning for dense retrieval . In addition , the accuracy of dense retrieval models often underperform BM25 , especially on documents ( Gao et al. , 2020b ; Luan et al. , 2020 ) . ∗Lee and Chenyan contributed equally . In this paper , we first theoretically analyze the convergence of dense retrieval training with negative sampling . Using the variance reduction framework ( Alain et al. , 2015 ; Katharopoulos & Fleuret , 2018 ) , we show that , under conditions commonly met in dense retrieval , local in-batch negatives lead to diminishing gradient norms , resulted in high stochastic gradient variances and slow training convergence — the local negative sampling is the bottleneck of dense retrieval ’ s effectiveness . Based on our analysis , we propose Approximate nearest neighbor Negative Contrastive Estimation ( ANCE ) , a new contrastive representation learning mechanism for dense retrieval . Instead of random or in-batch local negatives , ANCE constructs global negatives using the beingoptimized DR model to retrieve from the entire corpus . This fundamentally aligns the distribution of negative samples in training and of irrelevant documents to separate in testing . From the variance reduction perspective , these ANCE negatives lift the upper bound of per instance gradient norm , reduce the variance of the stochastic gradient estimation , and lead to faster learning convergence . We implement ANCE using an asynchronously updated ANN index of the corpus representation . Similar to Guu et al . ( 2020 ) , we maintain an Inferencer that parallelly computes the document encodings with a recent checkpoint from the being optimized DR model , and refresh the ANN index used for negative sampling once it finishes , to keep up with the model training . Our experiments demonstrate the advantage of ANCE in three text retrieval scenarios : standard web search ( Craswell et al. , 2020 ) , OpenQA ( Rajpurkar et al. , 2016 ; Kwiatkowski et al. , 2019 ) , and in a commercial search engine ’ s retrieval system . We also empirically validate our theory that the gradient norms on ANCE sampled negatives are much bigger than local negatives , thus improving the convergence of dense retrieval models.1 2 PRELIMINARIES . In this section , we discuss the preliminaries of dense retrieval and its representation learning . Task Definition : Given a query q and a corpus C , the first stage retrieval is to find a set of documents relevant to the query D+ = { d1 , ... , di , ... , dn } from C ( |D+| |C| ) , which then serve as input to later more complex models ( Croft et al. , 2009 ) . Instead of using sparse term matches and inverted index , Dense Retrieval calculates the retrieval score f ( ) using similarities in a learned embedding space ( Lee et al. , 2019 ; Luan et al. , 2020 ; Karpukhin et al. , 2020 ) : f ( q , d ) = sim ( g ( q ; θ ) , g ( d ; θ ) ) , ( 1 ) where g ( ) is the representation model that encodes the query or document to dense embeddings . The encoder parameter θ provides the main capacity . The similarity function ( sim ( ) ) is often simply cosine or dot product to leverage efficient ANN retrieval ( Johnson et al. , 2017 ; Guo et al. , 2020 ) . BERT-Siamese Model : A standard instantiation of Eqn . 1 is to use the BERT-Siamese/twotower/dual-encoder model ( Lee et al. , 2019 ; Karpukhin et al. , 2020 ; Luan et al. , 2020 ) : f ( q , d ) = BERT ( q ) · BERT ( d ) = MLP ( ~ [ CLS ] q ) ·MLP ( ~ [ CLS ] d ) . ( 2 ) It encodes the query and document separately with BERT as the encoder g ( ) , using their last layer ’ s [ CLS ] token representation , and applied dot product ( · ) on them . This enables offline precomputing of the document encodings and efficient first-stage retrieval . In comparison , the BERT reranker ( Nogueira et al. , 2019 ) applies BERT on the concatenation of each to-rerank query-document pair : BERT ( q ◦ d ) , which has explicit access to term level interactions between query-document with transformer attentions , but is often infeasible in first stage retrieval as enumerating all documents in the corpus for each query is too costly . 1Our code and trained models are available at http : //aka.ms/ance . Learning with Negative Sampling : The effectiveness of DR resides in learning a good representation space that maps query and relevant documents together , while separating irrelevant ones . The learning of this representation often follows standard learning to rank ( Liu , 2009 ) : Given a query q , a set of its relevant document D+q and irrelevant ones D − q , find the best θ ∗ that : θ∗ = argminθ ∑ q ∑ d+∈D+q ∑ d−∈D−q l ( f ( q , d+ ) , f ( q , d− ) ) . ( 3 ) The loss l ( ) can be binary cross entropy ( BCE ) , hinge loss , or negative log likelihood ( NLL ) . A unique challenge in dense retrieval , targeting first stage retrieval , is that the irrelevant documents to separate are from the entire corpus ( D−q = C \ D+q ) . This often leads to millions of negative instances , which have to be sampled in training : θ∗ = argminθ ∑ q ∑ d+∈D+ ∑ d−∈D̂− l ( f ( q , d+ ) , f ( q , d− ) ) . ( 4 ) Here we start to omit the subscript q in Dq . All D+ and D− are query dependent . A natural choice is to sample negatives D̂− from top documents retrieved by BM25 . However , they may bias the DR model to merely mimic sparse retrieval ( Luan et al. , 2020 ) . Another way is to sample negatives in local mini-batches , e.g. , as in contrastive learning ( Oord et al. , 2018 ) , however , these local negatives do not significantly outperform BM25 negatives ( Karpukhin et al. , 2020 ; Luan et al. , 2020 ) . 3 ANALYSES ON THE CONVERGENCE OF DENSE RETRIEVAL TRAINING . In this section , we theoretically analyze the convergence of dense retrieval training . We first show the connections between learning convergence and gradient norms ( Sec . 3.1 ) , then we discuss how non-informative negatives in dense retrieval yield less optimal convergence ( Sec . 3.2 ) . 3.1 ORACLE NEGATIVE SAMPLING ACCORDING TO PER-INSTANCE GRADIENT-NORM . Let l ( d+ , d− ) = l ( f ( q , d+ ) , f ( q , d− ) be the loss function on the training triple ( q , d+ , d− ) , PD− the negative sampling distribution for the given ( q , d+ ) , and pd− the sampling probability of negative instance d− , a stochastic gradient decent ( SGD ) step with importance sampling ( Alain et al. , 2015 ) is : θt+1 = θt − η 1 Npd− ∇θt l ( d+ , d− ) , ( 5 ) with θt the parameter at t-th step , θt+1 the one after , and N the total number of negatives . The scaling factor 1Npd− ensures Eqn . 5 is an unbiased estimator of the non-stochastic gradient on the full data . Then we can characterize the converge rate of this SGD step as the movement to the optimal θ∗ . Following derivations in variance reduction ( Katharopoulos & Fleuret , 2018 ; Johnson & Guestrin , 2018 ) , let gd− = 1Npd−∇θt l ( d + , d− ) the weighted gradient , the convergence rate is : E∆t = ||θt − θ∗||2 − EPD− ( ||θt+1 − θ ∗||2 ) ( 6 ) = ||θt||2 − 2θTt θ∗ − EPD− ( ||θt − ηgd− || 2 ) + 2θ∗TEPD− ( θt − ηgd− ) ( 7 ) = −η2EPD− ( ||gd− || 2 ) + 2ηθTt EPD− ( gd− ) − 2ηθ ∗TEPD− ( gd− ) ( 8 ) = 2ηEPD− ( gd− ) T ( θt − θ∗ ) − η2EPD− ( ||gd− || 2 ) ( 9 ) = 2ηEPD− ( gd− ) T ( θt − θ∗ ) − η2EPD− ( gd− ) TEPD− ( gd− ) − η 2Tr ( VPD− ( gd− ) ) . ( 10 ) This shows we can obtain better convergence rate by sampling from a distribution PD− that minimizes the variance of the stochastic gradient estimator EPD− ( ||gd− || 2 ) , or Tr ( VPD− ( gd− ) ) as the estimator is unbiased . The variance reflects how good the stochastic gradient from negative sampling represents the full gradient on all negatives—the latter is ideal but infeasible . Intuitively , we prefer the stochastic estimator to be stable and have smaller variances . A well known result in importance sampling ( Alain et al. , 2015 ; Johnson & Guestrin , 2018 ) is that there exists an optimal distribution that : p∗d− = argminpd− Tr ( VPD− ( gd− ) ) ∝ ||∇θt l ( d + , d− ) ||2 . ( 11 ) To prove this , one can apply Jensen ’ s inequality on the gradient variance and verify that Eqn . 11 achieves the minimum . The detailed derivations can be find in Johnson & Guestrin ( 2018 ) . Eqn . 11 shows that the convergence rate can be improved by sampling negatives proportional to their per-instance gradient norms ( though too expensive to calculate ) . Intuitively , an negative instance with larger gradient norm is more likely to reduce the non-stochastic training loss , thus should be sampled more frequently than those with diminishing gradients . The correlation of larger gradient norm and better training convergence is also observed in BERT fine-tuning ( Mosbach et al. , 2021 ) . | This paper studies the problem of dense text retrieval, which represents texts as dense vectors for approximate nearest neighbors (ANN) search. Dense text retrieval has two phases. The first phase learns a representation model to project semantically similar texts to vectors of large similarity scores (e.g. inner products or cosine similarity scores). The second phase adopts an ANN search algorithm to index these vectors and process queries. The paper claims key contributions at the first phase. Specifically, (1) The paper introduces a better negative sampling method to sample good dissimilar text pairs for training. (2) The new method enables faster converge of model learning. (3) The new method leads to 100x faster efficiency than a BERT-based baseline, while achieving almost the same accuracy as the baseline. | SP:fe103976fa70a0c45fbc1056c39851a76a3e1451 |
Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval | 1 INTRODUCTION . Many language systems rely on text retrieval as their first step to find relevant information . For example , search ranking ( Nogueira & Cho , 2019 ) , open domain question answering ( OpenQA ) ( Chen et al. , 2017 ) , and fact verification ( Thorne et al. , 2018 ) all first retrieve relevant documents for their later stage reranking , machine reading , and reasoning models . All these later-stage models enjoy the advancements of deep learning techniques ( Rajpurkar et al. , 2016 ; Wang et al. , 2019 ) , while , the first stage retrieval still mainly relies on matching discrete bag-of-words , e.g. , BM25 , which has become the pain point of many systems ( Nogueira & Cho , 2019 ; Luan et al. , 2020 ; Zhao et al. , 2020 ) . Dense Retrieval ( DR ) aims to overcome the sparse retrieval bottleneck by matching in a continuous representation space learned via neural networks ( Lee et al. , 2019 ; Karpukhin et al. , 2020 ; Luan et al. , 2020 ) . It has many desired properties : fully learnable representation , easy integration with pretraining , and efficiency support from approximate nearest neighbor ( ANN ) search ( Johnson et al. , 2017 ) . These grant dense retrieval an intriguing potential to fundamentally overcome some intrinsic limitations of sparse retrieval , for example , vocabulary mismatch ( Croft et al. , 2009 ) . One challenge in dense retrieval is to construct proper negative instances when learning the representation space ( Karpukhin et al. , 2020 ) . Unlike in reranking ( Liu , 2009 ) where the training and testing negatives are both irrelevant documents from previous retrieval stages , in first stage retrieval , DR models need to distinguish all irrelevant ones in a corpus with millions or billions of documents . As illustrated in Fig . 1 , these negatives are quite different from those retrieved by sparse models . Recent research explored various ways to construct negative training instances for dense retrieval ( Karpukhin et al. , 2020 ) , e.g. , using contrastive learning ( Oord et al. , 2018 ; He et al. , 2020 ; Chen et al. , 2020a ) to select hard negatives in current or recent mini-batches . However , as observed in recent research ( Karpukhin et al. , 2020 ) , the in-batch local negatives , though effective in learning word or visual representations , are not significantly better than spare-retrieved negatives in representation learning for dense retrieval . In addition , the accuracy of dense retrieval models often underperform BM25 , especially on documents ( Gao et al. , 2020b ; Luan et al. , 2020 ) . ∗Lee and Chenyan contributed equally . In this paper , we first theoretically analyze the convergence of dense retrieval training with negative sampling . Using the variance reduction framework ( Alain et al. , 2015 ; Katharopoulos & Fleuret , 2018 ) , we show that , under conditions commonly met in dense retrieval , local in-batch negatives lead to diminishing gradient norms , resulted in high stochastic gradient variances and slow training convergence — the local negative sampling is the bottleneck of dense retrieval ’ s effectiveness . Based on our analysis , we propose Approximate nearest neighbor Negative Contrastive Estimation ( ANCE ) , a new contrastive representation learning mechanism for dense retrieval . Instead of random or in-batch local negatives , ANCE constructs global negatives using the beingoptimized DR model to retrieve from the entire corpus . This fundamentally aligns the distribution of negative samples in training and of irrelevant documents to separate in testing . From the variance reduction perspective , these ANCE negatives lift the upper bound of per instance gradient norm , reduce the variance of the stochastic gradient estimation , and lead to faster learning convergence . We implement ANCE using an asynchronously updated ANN index of the corpus representation . Similar to Guu et al . ( 2020 ) , we maintain an Inferencer that parallelly computes the document encodings with a recent checkpoint from the being optimized DR model , and refresh the ANN index used for negative sampling once it finishes , to keep up with the model training . Our experiments demonstrate the advantage of ANCE in three text retrieval scenarios : standard web search ( Craswell et al. , 2020 ) , OpenQA ( Rajpurkar et al. , 2016 ; Kwiatkowski et al. , 2019 ) , and in a commercial search engine ’ s retrieval system . We also empirically validate our theory that the gradient norms on ANCE sampled negatives are much bigger than local negatives , thus improving the convergence of dense retrieval models.1 2 PRELIMINARIES . In this section , we discuss the preliminaries of dense retrieval and its representation learning . Task Definition : Given a query q and a corpus C , the first stage retrieval is to find a set of documents relevant to the query D+ = { d1 , ... , di , ... , dn } from C ( |D+| |C| ) , which then serve as input to later more complex models ( Croft et al. , 2009 ) . Instead of using sparse term matches and inverted index , Dense Retrieval calculates the retrieval score f ( ) using similarities in a learned embedding space ( Lee et al. , 2019 ; Luan et al. , 2020 ; Karpukhin et al. , 2020 ) : f ( q , d ) = sim ( g ( q ; θ ) , g ( d ; θ ) ) , ( 1 ) where g ( ) is the representation model that encodes the query or document to dense embeddings . The encoder parameter θ provides the main capacity . The similarity function ( sim ( ) ) is often simply cosine or dot product to leverage efficient ANN retrieval ( Johnson et al. , 2017 ; Guo et al. , 2020 ) . BERT-Siamese Model : A standard instantiation of Eqn . 1 is to use the BERT-Siamese/twotower/dual-encoder model ( Lee et al. , 2019 ; Karpukhin et al. , 2020 ; Luan et al. , 2020 ) : f ( q , d ) = BERT ( q ) · BERT ( d ) = MLP ( ~ [ CLS ] q ) ·MLP ( ~ [ CLS ] d ) . ( 2 ) It encodes the query and document separately with BERT as the encoder g ( ) , using their last layer ’ s [ CLS ] token representation , and applied dot product ( · ) on them . This enables offline precomputing of the document encodings and efficient first-stage retrieval . In comparison , the BERT reranker ( Nogueira et al. , 2019 ) applies BERT on the concatenation of each to-rerank query-document pair : BERT ( q ◦ d ) , which has explicit access to term level interactions between query-document with transformer attentions , but is often infeasible in first stage retrieval as enumerating all documents in the corpus for each query is too costly . 1Our code and trained models are available at http : //aka.ms/ance . Learning with Negative Sampling : The effectiveness of DR resides in learning a good representation space that maps query and relevant documents together , while separating irrelevant ones . The learning of this representation often follows standard learning to rank ( Liu , 2009 ) : Given a query q , a set of its relevant document D+q and irrelevant ones D − q , find the best θ ∗ that : θ∗ = argminθ ∑ q ∑ d+∈D+q ∑ d−∈D−q l ( f ( q , d+ ) , f ( q , d− ) ) . ( 3 ) The loss l ( ) can be binary cross entropy ( BCE ) , hinge loss , or negative log likelihood ( NLL ) . A unique challenge in dense retrieval , targeting first stage retrieval , is that the irrelevant documents to separate are from the entire corpus ( D−q = C \ D+q ) . This often leads to millions of negative instances , which have to be sampled in training : θ∗ = argminθ ∑ q ∑ d+∈D+ ∑ d−∈D̂− l ( f ( q , d+ ) , f ( q , d− ) ) . ( 4 ) Here we start to omit the subscript q in Dq . All D+ and D− are query dependent . A natural choice is to sample negatives D̂− from top documents retrieved by BM25 . However , they may bias the DR model to merely mimic sparse retrieval ( Luan et al. , 2020 ) . Another way is to sample negatives in local mini-batches , e.g. , as in contrastive learning ( Oord et al. , 2018 ) , however , these local negatives do not significantly outperform BM25 negatives ( Karpukhin et al. , 2020 ; Luan et al. , 2020 ) . 3 ANALYSES ON THE CONVERGENCE OF DENSE RETRIEVAL TRAINING . In this section , we theoretically analyze the convergence of dense retrieval training . We first show the connections between learning convergence and gradient norms ( Sec . 3.1 ) , then we discuss how non-informative negatives in dense retrieval yield less optimal convergence ( Sec . 3.2 ) . 3.1 ORACLE NEGATIVE SAMPLING ACCORDING TO PER-INSTANCE GRADIENT-NORM . Let l ( d+ , d− ) = l ( f ( q , d+ ) , f ( q , d− ) be the loss function on the training triple ( q , d+ , d− ) , PD− the negative sampling distribution for the given ( q , d+ ) , and pd− the sampling probability of negative instance d− , a stochastic gradient decent ( SGD ) step with importance sampling ( Alain et al. , 2015 ) is : θt+1 = θt − η 1 Npd− ∇θt l ( d+ , d− ) , ( 5 ) with θt the parameter at t-th step , θt+1 the one after , and N the total number of negatives . The scaling factor 1Npd− ensures Eqn . 5 is an unbiased estimator of the non-stochastic gradient on the full data . Then we can characterize the converge rate of this SGD step as the movement to the optimal θ∗ . Following derivations in variance reduction ( Katharopoulos & Fleuret , 2018 ; Johnson & Guestrin , 2018 ) , let gd− = 1Npd−∇θt l ( d + , d− ) the weighted gradient , the convergence rate is : E∆t = ||θt − θ∗||2 − EPD− ( ||θt+1 − θ ∗||2 ) ( 6 ) = ||θt||2 − 2θTt θ∗ − EPD− ( ||θt − ηgd− || 2 ) + 2θ∗TEPD− ( θt − ηgd− ) ( 7 ) = −η2EPD− ( ||gd− || 2 ) + 2ηθTt EPD− ( gd− ) − 2ηθ ∗TEPD− ( gd− ) ( 8 ) = 2ηEPD− ( gd− ) T ( θt − θ∗ ) − η2EPD− ( ||gd− || 2 ) ( 9 ) = 2ηEPD− ( gd− ) T ( θt − θ∗ ) − η2EPD− ( gd− ) TEPD− ( gd− ) − η 2Tr ( VPD− ( gd− ) ) . ( 10 ) This shows we can obtain better convergence rate by sampling from a distribution PD− that minimizes the variance of the stochastic gradient estimator EPD− ( ||gd− || 2 ) , or Tr ( VPD− ( gd− ) ) as the estimator is unbiased . The variance reflects how good the stochastic gradient from negative sampling represents the full gradient on all negatives—the latter is ideal but infeasible . Intuitively , we prefer the stochastic estimator to be stable and have smaller variances . A well known result in importance sampling ( Alain et al. , 2015 ; Johnson & Guestrin , 2018 ) is that there exists an optimal distribution that : p∗d− = argminpd− Tr ( VPD− ( gd− ) ) ∝ ||∇θt l ( d + , d− ) ||2 . ( 11 ) To prove this , one can apply Jensen ’ s inequality on the gradient variance and verify that Eqn . 11 achieves the minimum . The detailed derivations can be find in Johnson & Guestrin ( 2018 ) . Eqn . 11 shows that the convergence rate can be improved by sampling negatives proportional to their per-instance gradient norms ( though too expensive to calculate ) . Intuitively , an negative instance with larger gradient norm is more likely to reduce the non-stochastic training loss , thus should be sampled more frequently than those with diminishing gradients . The correlation of larger gradient norm and better training convergence is also observed in BERT fine-tuning ( Mosbach et al. , 2021 ) . | Authors start from an assumption: “local negative sampling is the bottleneck of dense retrieval’s effectiveness”. To overcome this limitation, authors propose ANCE (Approximate nearest neighbour Negative Contrastive Estimation), a new contrastive representation learning mechanism for dense retrieval. The basic idea is that of constructing negatives exploiting the being trained deep retrieval module. The idea is that the model considers as negatives borderline cases. They also show, theoretically, that this improves the variance of the stochastic gradient estimation thus leading to faster convergence. | SP:fe103976fa70a0c45fbc1056c39851a76a3e1451 |
Unsupervised Cross-lingual Representation Learning for Speech Recognition | 1 INTRODUCTION . Cross-lingual learning aims to build models which leverage data from other languages to improve performance . This has been a long standing interest in the speech community ( Byrne et al. , 2000 ; Le & Besacier , 2009 ; Ghoshal et al. , 2013 ; Huang et al. , 2013 ; Gales et al. , 2017 ; Cho et al. , 2018 ; Seki et al. , 2018 ) which includes systems able to transcribe multiple languages ( Burget et al. , 2010 ; Bourlard et al. , 2011 ; Heigold et al. , 2013 ; Toshniwal et al. , 2018 ; Kannan et al. , 2019 ) . However , the vast majority of work in speech processing has focused on supervised cross-lingual training which requires labeled data in multiple languages . Transcribed speech is often much scarcer than unlabeled speech and requires non-trivial human annotation . Unsupervised representation learning , or pretraining , does not require labeled data and has received a lot of recent attention in computer vision ( Tian et al. , 2019 ; He et al. , 2019 ; Chen et al. , 2020 ) after much success in natural language processing ( Peters et al. , 2018 ; Devlin et al. , 2018 ) . For the latter , cross-lingual pretraining has been shown to be very effective , particularly , for low resource languages ( Lample & Conneau , 2019 ; Conneau et al. , 2019 ) . In speech processing , most work in this area has focused on monolingual unsupervised representation learning ( van den Oord et al. , 2018 ; Chung & Glass , 2018 ; Schneider et al. , 2019 ; Chung et al. , 2019 ; Baevski et al. , 2020b ; Harwath et al. , 2020 ; Jiang et al. , 2019 ; Tjandra et al. , 2019 ; Eloff et al. , 2019 ; Baevski et al. , 2020a ) . In this paper , we focus on the cross-lingual setting by learning representations on unlabeled data that generalize across languages . We build on the pretraining approach of Baevski et al . ( 2020c ) which jointly learns contextualized speech representations as well as a discrete vocabulary of latent speech representations . The latter serves to effectively train the model with a contrastive loss ( § 2 ) and the discrete speech representations are shared across languages ( Figure 1 ) . Different to recent work on unsupervised cross-lingual pretraining , we fine-tune the Transformer part of the model instead of freezing all pretrained representations ( Rivière et al. , 2020 ) or feeding them to a separate downstream model ( Kawakami et al. , 2020 ) . We extend the work of Rivière et al . ( 2020 ) by pretraining on multiple languages instead of just English and we experiment on top of a stronger baseline . We evaluate XLSR on 14 languages of the BABEL benchmark ( Gales et al. , 2014 ) which is conversational telephone data and ten languages of CommonVoice ( Ardila et al. , 2019 ) , a corpus of read speech ( § 3 ) . Multilingual pretraining outperforms monolingual pretraining in most cases , except for resource rich languages and we show that increased model capacity significantly closes the gap . We Chinese English French Multilingual quantized latent speech representations Shared Transformer encoder …… Masked Transformer CNN q q q q q L ` Contrastive loss Shared CNN encoder Speech signal In any language ( e.g . English ) Shared quantizer Figure 1 : The XLSR approach . A shared quantization module over feature encoder representations produces multilingual quantized speech units whose embeddings are then used as targets for a Transformer trained by contrastive learning . The model learns to share discrete tokens across languages , creating bridges across languages . Our approach is inspired by Devlin et al . ( 2018 ) ; Lample & Conneau ( 2019 ) and builds on top of wav2vec 2.0 ( Baevski et al. , 2020c ) . It requires only raw unlabeled speech audio in multiple languages . also demonstrate that XLSR representations can be fine-tuned simultaneously on multiple languages to obtain a multilingual speech recognition system whose performance is competitive to fine-tuning a separate model on each language § 4 ) . 2 APPROACH . Unsupervised cross-lingual representation learning has shown great success by pretraining Transformers ( Vaswani et al. , 2017 ) with multilingual masked language models ( Devlin et al. , 2018 ; Lample & Conneau , 2019 ) . In this work , we learn cross-lingual speech representations by extending wav2vec 2.0 ( Baevski et al. , 2020c ) to the cross-lingual setting . Our approach learns a single set of quantized latent speech representations which are shared across languages . Next , we outline the architecture ( § 2.1 ) , training ( § 2.2 ) and adaptations for cross-lingual training . 2.1 ARCHITECTURE . We follow the design choices described in Baevski et al . ( 2020c ) . The model contains a convolutional feature encoder f : X 7→ Z to map raw audioX to latent speech representations z1 , . . . , zT which are fed to a Transformer network g : Z 7→ C to output context representations c1 , . . . , cT ( Devlin et al. , 2018 ; Baevski et al. , 2020b ; a ) . For the purpose of training the model , feature encoder representations are discretized to q1 , . . . , qT with a quantization module Z 7→ Q to represent the targets in the self-supervised learning objective ( Figure 1 , § 2.2 ) . The quantization is based on product quantization ( Jegou et al. , 2011 ; Baevski et al. , 2020b ) by choosing quantized representations from G = 2 codebooks with V = 320 entries each . The result is concatenated to obtain q . A Gumbel softmax enables choosing discrete codebook entries in a fully differentiable way ( Jang et al. , 2016 ) . Each zt represents about 25ms of audio strided by 20ms , the context network architecture follows BERT ( Vaswani et al. , 2017 ; Devlin et al. , 2018 ) except for relative positional embeddings Mohamed et al . ( 2019 ) ; Baevski et al . ( 2020a ) . 2.2 TRAINING . The model is trained by solving a contrastive task over masked feature encoder outputs . For masking , we sample p = 0.065 of all time steps to be starting indices and mask the subsequent M = 10 time steps . The objective requires identifying the true quantized latent q̃ for a masked time-step within a set of K = 100 distractors Qt sampled from other masked time steps : − log exp ( sim ( ct , qt ) ) ∑ q̃∼Qt exp ( sim ( ct , q̃ ) ) where ct is the output of the transformer , and sim ( a , b ) denotes cosine similarity . This is augmented by a codebook diversity penalty to encourage the model to use all codebook entries ( Dieleman et al. , 2018 ) . We maximize the entropy of the averaged softmax distribution over the codebook entries for each group p̄g across a batch of utterances : 1GV ∑G g=1−H ( p̄g ) = 1 GV ∑G g=1 ∑V v=1 p̄g , v log p̄g , v . To stabilize the feature encoder we apply an L2 penalty over the outputs of the feature encoder . When pretraining on L languages , we form multilingual batches ( Devlin et al. , 2018 ; Lample & Conneau , 2019 ) by sampling speech samples from a multinomial distribution ( pl ) l=1 , ... , L where pl ∼ ( nl N ) α , nl being the number of pretraining hours of language l , N the total number of hours , and α the upsampling factor . The parameter α controls the importance given to high-resource versus low-resource languages during pretraining . 3 EXPERIMENTAL SETUP . 3.1 DATASETS . CommonVoice . The CommonVoice dataset1 is a multilingual corpus of read speech comprising more than two thousand hours of speech data in 38 languages ( Ardila et al. , 2019 ) . The amount of data per language ranges from three hours for Swedish ( `` low-resource '' ) to 353 hours for French and 1350 hours for English ( `` high-resource '' ) . Following Rivière et al . ( 2020 ) we consider ten languages : Spanish ( es ) , French ( fr ) , Italian ( it ) , Kyrgyz ( ky ) , Dutch ( du ) , Russian ( ru ) , Swedish ( sv ) , Turkish ( tr ) , Tatar ( tt ) and Chinese ( zh ) ; as well as English ( en ) for pretraining . We use the November 2019 release for training models , and for fine-tuning we use the evaluation splits of Rivière et al . ( 2020 ) which include one hour labeled data for training , 20 minutes for validation and one hour for testing . This few-shot evaluation dataset consists of phoneme sequences as output and we report phone error rate ( PER ) similar to prior work . BABEL . This dataset2 is a multilingual corpus of conversational telephone speech from IARPA , which includes Asian and African languages ( Gales et al. , 2014 ) . We adopt the same setup as Cho et al . ( 2018 ) and pretrain on ten languages : Bengali ( bn ) , Cantonese ( zh ) , Georgian ( ka ) , Haitian ( ht ) , Kurmanji ( ku ) , Pashto ( ps ) , Tamil ( ta ) , Turkish ( tr ) , Tokpisin ( tp ) , Vietnamese ( vi ) . We evaluate crosslingual transfer on four other languages ( models are not pretrained on these languages ) : Assamese ( as ) , Tagalog ( tl ) , Swahili ( sw ) , Lao ( lo ) . We train a multilingual model in ten languages and monolingual models in 14 languages . We use the same speech audio for pretraining and fine-tuning , and no unlabeled speech provided by BABEL . We use the dev folder of the BABEL dataset as our test set as `` eval '' has not been open-sourced , and use 10 % of the training set as dev data . We report character error rate ( CER ) . All audio is resampled to 16kHz . For comparison with Inaguma et al . ( 2019 ) only , we train 4-gram n-gram language models on CommonCrawl data ( Heafield et al. , 2013 ; Wenzek et al. , 2019 ) for Assamese ( 140MiB of text data ) , Swahili ( 2GiB ) , Tamil ( 4.8GiB ) and Lao ( 763MiB ) . 3.2 TRAINING DETAILS . Pretraining Models are implemented in fairseq ( Ott et al. , 2019 ) . We evaluate two architectures with the same feature encoder ( § 2.1 ) but different Transformer settings : Base with 12 blocks , model dimension 768 , inner dimension ( FFN ) 3072 and 8 attention heads ; and Large with 24 blocks , model dimension 1024 , inner dimension 4096 and 16 attention heads ; both use dropout 0.1 . For Base , we crop 250k samples , or 15.6sec of audio , and pack up to 1.4m samples on each GPU . For Large , we crop 320k samples and put up to 1.2m samples on a GPU . Batches are sampled using a factor α ∈ { 0.5 , 1 } . We use 16 GPUs for small datasets ( typically monolingual ) and 64 GPUs for large datasets ( typically multilingual ) , and use Adam ( Kingma & Ba , 2015 ) where the learning rate is warmed up for the first 10 % of updates to a peak of 1e-5 ( Base ) or 1e-3 ( Large ) , and then linearly decayed over a total of 250k updates . Fine-tuning . To fine-tune the model we add a classifier representing the output vocabulary of the respective downstream task on top of the model and train on the labeled data with a Connectionist 1 https : //voice.mozilla.org/en/languages 2 https : //catalog.ldc.upenn.edu/byyear , includes LDC2018S07 , LDC2018S13 , LDC2018S02 , LDC2017S03 , LDC2017S22 , LDC2017S08 , LDC2017S05 , LDC2017S13 , LDC2017S01 , LDC2017S19 , LDC2016S06 , LDC2016S08 , LDC2016S02 , LDC2016S12 , LDC2016S09 , LDC2016S13 , LDC2016S10 . Temporal Classification ( CTC ) loss ( Graves et al. , 2006 ; Baevski et al. , 2020a ) . Weights of the feature encoder are not updated at fine-tuning time . We determine the best learning rates setting in [ 2e-5 , 6e-5 ] based on dev set error rate . The learning rate schedule has three phases : warm up for the first 10 % of updates , keep constant for 40 % and then linearly decay for the remainder . For CommonVoice we fine-tune for 20k updates and on BABEL for 50k updates on 2 GPUs for the Base model and 4 GPUs for the Large model . | Authors extended the XLSR model from the previous mono-lingual task, where self-supervised learning was used in representation learning, to multi-lingual task. The basic idea does make a lot of sense, where all the data, irrespective of the language, is pushed through the representation learning task. We are anyways talking about human speech, so it is reasonable to assume that learning one language can help in learning the other language. | SP:367eefa594e6815c8a09c675fcf89f2fe29afd5d |
Unsupervised Cross-lingual Representation Learning for Speech Recognition | 1 INTRODUCTION . Cross-lingual learning aims to build models which leverage data from other languages to improve performance . This has been a long standing interest in the speech community ( Byrne et al. , 2000 ; Le & Besacier , 2009 ; Ghoshal et al. , 2013 ; Huang et al. , 2013 ; Gales et al. , 2017 ; Cho et al. , 2018 ; Seki et al. , 2018 ) which includes systems able to transcribe multiple languages ( Burget et al. , 2010 ; Bourlard et al. , 2011 ; Heigold et al. , 2013 ; Toshniwal et al. , 2018 ; Kannan et al. , 2019 ) . However , the vast majority of work in speech processing has focused on supervised cross-lingual training which requires labeled data in multiple languages . Transcribed speech is often much scarcer than unlabeled speech and requires non-trivial human annotation . Unsupervised representation learning , or pretraining , does not require labeled data and has received a lot of recent attention in computer vision ( Tian et al. , 2019 ; He et al. , 2019 ; Chen et al. , 2020 ) after much success in natural language processing ( Peters et al. , 2018 ; Devlin et al. , 2018 ) . For the latter , cross-lingual pretraining has been shown to be very effective , particularly , for low resource languages ( Lample & Conneau , 2019 ; Conneau et al. , 2019 ) . In speech processing , most work in this area has focused on monolingual unsupervised representation learning ( van den Oord et al. , 2018 ; Chung & Glass , 2018 ; Schneider et al. , 2019 ; Chung et al. , 2019 ; Baevski et al. , 2020b ; Harwath et al. , 2020 ; Jiang et al. , 2019 ; Tjandra et al. , 2019 ; Eloff et al. , 2019 ; Baevski et al. , 2020a ) . In this paper , we focus on the cross-lingual setting by learning representations on unlabeled data that generalize across languages . We build on the pretraining approach of Baevski et al . ( 2020c ) which jointly learns contextualized speech representations as well as a discrete vocabulary of latent speech representations . The latter serves to effectively train the model with a contrastive loss ( § 2 ) and the discrete speech representations are shared across languages ( Figure 1 ) . Different to recent work on unsupervised cross-lingual pretraining , we fine-tune the Transformer part of the model instead of freezing all pretrained representations ( Rivière et al. , 2020 ) or feeding them to a separate downstream model ( Kawakami et al. , 2020 ) . We extend the work of Rivière et al . ( 2020 ) by pretraining on multiple languages instead of just English and we experiment on top of a stronger baseline . We evaluate XLSR on 14 languages of the BABEL benchmark ( Gales et al. , 2014 ) which is conversational telephone data and ten languages of CommonVoice ( Ardila et al. , 2019 ) , a corpus of read speech ( § 3 ) . Multilingual pretraining outperforms monolingual pretraining in most cases , except for resource rich languages and we show that increased model capacity significantly closes the gap . We Chinese English French Multilingual quantized latent speech representations Shared Transformer encoder …… Masked Transformer CNN q q q q q L ` Contrastive loss Shared CNN encoder Speech signal In any language ( e.g . English ) Shared quantizer Figure 1 : The XLSR approach . A shared quantization module over feature encoder representations produces multilingual quantized speech units whose embeddings are then used as targets for a Transformer trained by contrastive learning . The model learns to share discrete tokens across languages , creating bridges across languages . Our approach is inspired by Devlin et al . ( 2018 ) ; Lample & Conneau ( 2019 ) and builds on top of wav2vec 2.0 ( Baevski et al. , 2020c ) . It requires only raw unlabeled speech audio in multiple languages . also demonstrate that XLSR representations can be fine-tuned simultaneously on multiple languages to obtain a multilingual speech recognition system whose performance is competitive to fine-tuning a separate model on each language § 4 ) . 2 APPROACH . Unsupervised cross-lingual representation learning has shown great success by pretraining Transformers ( Vaswani et al. , 2017 ) with multilingual masked language models ( Devlin et al. , 2018 ; Lample & Conneau , 2019 ) . In this work , we learn cross-lingual speech representations by extending wav2vec 2.0 ( Baevski et al. , 2020c ) to the cross-lingual setting . Our approach learns a single set of quantized latent speech representations which are shared across languages . Next , we outline the architecture ( § 2.1 ) , training ( § 2.2 ) and adaptations for cross-lingual training . 2.1 ARCHITECTURE . We follow the design choices described in Baevski et al . ( 2020c ) . The model contains a convolutional feature encoder f : X 7→ Z to map raw audioX to latent speech representations z1 , . . . , zT which are fed to a Transformer network g : Z 7→ C to output context representations c1 , . . . , cT ( Devlin et al. , 2018 ; Baevski et al. , 2020b ; a ) . For the purpose of training the model , feature encoder representations are discretized to q1 , . . . , qT with a quantization module Z 7→ Q to represent the targets in the self-supervised learning objective ( Figure 1 , § 2.2 ) . The quantization is based on product quantization ( Jegou et al. , 2011 ; Baevski et al. , 2020b ) by choosing quantized representations from G = 2 codebooks with V = 320 entries each . The result is concatenated to obtain q . A Gumbel softmax enables choosing discrete codebook entries in a fully differentiable way ( Jang et al. , 2016 ) . Each zt represents about 25ms of audio strided by 20ms , the context network architecture follows BERT ( Vaswani et al. , 2017 ; Devlin et al. , 2018 ) except for relative positional embeddings Mohamed et al . ( 2019 ) ; Baevski et al . ( 2020a ) . 2.2 TRAINING . The model is trained by solving a contrastive task over masked feature encoder outputs . For masking , we sample p = 0.065 of all time steps to be starting indices and mask the subsequent M = 10 time steps . The objective requires identifying the true quantized latent q̃ for a masked time-step within a set of K = 100 distractors Qt sampled from other masked time steps : − log exp ( sim ( ct , qt ) ) ∑ q̃∼Qt exp ( sim ( ct , q̃ ) ) where ct is the output of the transformer , and sim ( a , b ) denotes cosine similarity . This is augmented by a codebook diversity penalty to encourage the model to use all codebook entries ( Dieleman et al. , 2018 ) . We maximize the entropy of the averaged softmax distribution over the codebook entries for each group p̄g across a batch of utterances : 1GV ∑G g=1−H ( p̄g ) = 1 GV ∑G g=1 ∑V v=1 p̄g , v log p̄g , v . To stabilize the feature encoder we apply an L2 penalty over the outputs of the feature encoder . When pretraining on L languages , we form multilingual batches ( Devlin et al. , 2018 ; Lample & Conneau , 2019 ) by sampling speech samples from a multinomial distribution ( pl ) l=1 , ... , L where pl ∼ ( nl N ) α , nl being the number of pretraining hours of language l , N the total number of hours , and α the upsampling factor . The parameter α controls the importance given to high-resource versus low-resource languages during pretraining . 3 EXPERIMENTAL SETUP . 3.1 DATASETS . CommonVoice . The CommonVoice dataset1 is a multilingual corpus of read speech comprising more than two thousand hours of speech data in 38 languages ( Ardila et al. , 2019 ) . The amount of data per language ranges from three hours for Swedish ( `` low-resource '' ) to 353 hours for French and 1350 hours for English ( `` high-resource '' ) . Following Rivière et al . ( 2020 ) we consider ten languages : Spanish ( es ) , French ( fr ) , Italian ( it ) , Kyrgyz ( ky ) , Dutch ( du ) , Russian ( ru ) , Swedish ( sv ) , Turkish ( tr ) , Tatar ( tt ) and Chinese ( zh ) ; as well as English ( en ) for pretraining . We use the November 2019 release for training models , and for fine-tuning we use the evaluation splits of Rivière et al . ( 2020 ) which include one hour labeled data for training , 20 minutes for validation and one hour for testing . This few-shot evaluation dataset consists of phoneme sequences as output and we report phone error rate ( PER ) similar to prior work . BABEL . This dataset2 is a multilingual corpus of conversational telephone speech from IARPA , which includes Asian and African languages ( Gales et al. , 2014 ) . We adopt the same setup as Cho et al . ( 2018 ) and pretrain on ten languages : Bengali ( bn ) , Cantonese ( zh ) , Georgian ( ka ) , Haitian ( ht ) , Kurmanji ( ku ) , Pashto ( ps ) , Tamil ( ta ) , Turkish ( tr ) , Tokpisin ( tp ) , Vietnamese ( vi ) . We evaluate crosslingual transfer on four other languages ( models are not pretrained on these languages ) : Assamese ( as ) , Tagalog ( tl ) , Swahili ( sw ) , Lao ( lo ) . We train a multilingual model in ten languages and monolingual models in 14 languages . We use the same speech audio for pretraining and fine-tuning , and no unlabeled speech provided by BABEL . We use the dev folder of the BABEL dataset as our test set as `` eval '' has not been open-sourced , and use 10 % of the training set as dev data . We report character error rate ( CER ) . All audio is resampled to 16kHz . For comparison with Inaguma et al . ( 2019 ) only , we train 4-gram n-gram language models on CommonCrawl data ( Heafield et al. , 2013 ; Wenzek et al. , 2019 ) for Assamese ( 140MiB of text data ) , Swahili ( 2GiB ) , Tamil ( 4.8GiB ) and Lao ( 763MiB ) . 3.2 TRAINING DETAILS . Pretraining Models are implemented in fairseq ( Ott et al. , 2019 ) . We evaluate two architectures with the same feature encoder ( § 2.1 ) but different Transformer settings : Base with 12 blocks , model dimension 768 , inner dimension ( FFN ) 3072 and 8 attention heads ; and Large with 24 blocks , model dimension 1024 , inner dimension 4096 and 16 attention heads ; both use dropout 0.1 . For Base , we crop 250k samples , or 15.6sec of audio , and pack up to 1.4m samples on each GPU . For Large , we crop 320k samples and put up to 1.2m samples on a GPU . Batches are sampled using a factor α ∈ { 0.5 , 1 } . We use 16 GPUs for small datasets ( typically monolingual ) and 64 GPUs for large datasets ( typically multilingual ) , and use Adam ( Kingma & Ba , 2015 ) where the learning rate is warmed up for the first 10 % of updates to a peak of 1e-5 ( Base ) or 1e-3 ( Large ) , and then linearly decayed over a total of 250k updates . Fine-tuning . To fine-tune the model we add a classifier representing the output vocabulary of the respective downstream task on top of the model and train on the labeled data with a Connectionist 1 https : //voice.mozilla.org/en/languages 2 https : //catalog.ldc.upenn.edu/byyear , includes LDC2018S07 , LDC2018S13 , LDC2018S02 , LDC2017S03 , LDC2017S22 , LDC2017S08 , LDC2017S05 , LDC2017S13 , LDC2017S01 , LDC2017S19 , LDC2016S06 , LDC2016S08 , LDC2016S02 , LDC2016S12 , LDC2016S09 , LDC2016S13 , LDC2016S10 . Temporal Classification ( CTC ) loss ( Graves et al. , 2006 ; Baevski et al. , 2020a ) . Weights of the feature encoder are not updated at fine-tuning time . We determine the best learning rates setting in [ 2e-5 , 6e-5 ] based on dev set error rate . The learning rate schedule has three phases : warm up for the first 10 % of updates , keep constant for 40 % and then linearly decay for the remainder . For CommonVoice we fine-tune for 20k updates and on BABEL for 50k updates on 2 GPUs for the Base model and 4 GPUs for the Large model . | This paper proposes an unsupervised cross-lingual speech representation learning algorithm for multi-lingual automatic speech recognition. The main building block is based on an existing study (wav2vec series). The idea of this study is to apply previously (successful) unsupervised speech representation learning scheme to cross-lingual scenario to overcome the data sparsity problem of ASR for low-resource language. In this way, the experiments done in this paper are very meaningful and could shed light on future work on low-resource speech processing. The evaluations are intensive, and the results support most of the main claims well. | SP:367eefa594e6815c8a09c675fcf89f2fe29afd5d |
Privacy-preserving Learning via Deep Net Pruning | Neural network pruning has demonstrated its success in significantly improving the computational e ciency of deep models while only introducing a small reduction on final accuracy . In this paper , we explore an extra bonus of neural network pruning in terms of enhancing privacy . Specifically , we show a novel connection between magnitude-based pruning and adding di↵erentially private noise to intermediate layers under the overparameterized regime . To the best of our knowledge , this is the first work that bridges pruning with the theory of di↵erential privacy . The paper also presents experimental results by running the model inversion attack on two benchmark datasets , which supports the theoretical finding . 1 Introduction . Data privacy has become one of the top concerns in the application of deep neural networks , since there has been an increasing demand to train deep models on private data sets . For example , hospitals are now training their automated diagnosis systems on private patients ’ data Litjens et al . ( 2016 ) ; Lakhani & Sundaram ( 2017 ) ; De Fauw et al . ( 2018 ) ; and advertisement providers are collecting users ’ online trajectories to optimize their learning-based recommendation algorithm Covington et al . ( 2016 ) ; Ying et al . ( 2018 ) . These private data , however , are usually subject to the regulations such as California Consumer Privacy Act ( CCPA ) Legislature ( 2018 ) , Health Insurance Portability and Accountability Act ( HIPAA ) Act ( 1996 ) , and General Data Protection Regulation ( GDPR ) of European Union . Di↵erential privacy ( DP ) Dwork et al . ( 2006b ) ; Dwork ( 2009 ) ; Dwork & Roth ( 2014 ) has emerged , during the past few years , as a strong standard to provide theoretical privacy guarantees for algorithms on aggregate databases . The core idea of achieving di↵erential privacy is to add controlled noise to the output of a deterministic function , such that the output can not be used to infer much about any single individual in the database . Recent years have seen an increasing number of applications that adapt di↵erential privacy mechanisms to address privacy concerns in deep learning Shokri & Shmatikov ( 2015 ) ; Abadi et al . ( 2016 ) ; Phan et al . ( 2016 ) ; McMahan et al . ( 2018 ) . Neural network pruning ( or pruning in short ) , a seemingly orthogonal field to privacy , has also been the subject of a great amount of work in recent years . Pruning aims to reduce the number of model parameters , such that the compressed model can be applied even under the memory constraints of the edge-devices . Various pruning techniques have succeeded in significantly compressing models with little or no loss of accuracy Han et al . ( 2015 ; 2016a ) ; Li et al . ( 2016 ) ; Ding et al . ( 2018 ) ; Evci et al . ( 2019 ) ; Tanaka et al . ( 2020 ) . However , the majority of existing literature only demonstrate the benefits of pruning in terms of energy saving and inference speedup , while in this work , we investigate another interesting bonus of pruning – preserving data privacy . Our investigation is mainly inspired by the observation that neural network pruning makes the inversion from hidden-layers harder , as the percentage of remained weight decreases ( see Figure 1 ) . Motivated by this empirical observation , we build under the over-paramterized regime of deep learning theory , and show an interesting connection between neural network pruning and adding di↵erentially private noise to intermediate layers . We believe this con- nection may have important practical implications since the pruned model only incurs small accuracy loss , and we leave that as future work . We list our contributions as follow : • We explore the benefits of pruned neural networks in terms of preserving data privacy . To the best of our knowledge , this is the first step towards drawing a theoretical connection between neural network pruning and di↵erential privacy . • To build the connection between pruning and adding di↵erentially private noise to intermediate layers , we generalize the famous anti-concentration inequality due to Carbery and Wright Carbery & Wright ( 2001 ) . This generalization might find more applications in the theoretical analysis of neural network pruning in the future . • We provide empirical results in support of our theoretical finding . Specifically , we demonstrate on two benchmark datasets that pruned neural networks are more secure in the sense that running the model inversion attack becomes harder . Roadmap . The rest of this paper is organized as follow . Section 2 covers existing literature in di↵erent privacy , neural network pruning , and over-parameterized deep learning theory . Section 3 provides theoretical preliminaries and Section 4 presents our main theoretical result . Section 5 shows empirical results on MNIST and CIFAR-10 benchmarks that are in support of our theoretical findings . We conclude this work in Section 6 . 2 Related work . Neural network pruning Traditional deep neural network models are computationally expensive and memory intensive , which hinders their deployment in applications with limited memory resources or strict latency requirements . Many progress has been made to perform model compression in deep networks , including low-rank factorization Sainath et al . ( 2013 ) ; Lebedev et al . ( 2015 ) , network pruning LeCun et al . ( 1990 ) ; Srinivas & Babu ( 2015 ) ; Han et al . ( 2016b ) ; Li et al . ( 2017 ) , and knowledge distillation Hinton et al . ( 2015 ) ; Chen et al . ( 2017 ) . Among them , neural network pruning has been widely adopted because it is able to reduce model sizes by up to one order of magnitude without significant accuracy loss . The idea of network pruning dates back to the Optimal Brain Damage in 1990s LeCun et al . ( 1990 ) . Recently , it has been shown that removing the weights with low magnitude can also achieve a highly compressed model Han et al . ( 2016b ) , which is referred to as ‘ magnitude-based pruning ’ . Di↵erential privacy The concept of ✏-di↵erential privacy was originally introduced by Dwork , McSherry , Nissim and Smith Dwork et al . ( 2006b ) . Later , it was generalized to a relaxation of ( ✏ , ) -di↵erential privacy Dwork et al . ( 2006a ) ; Dwork ( 2009 ) ; Dwork & Roth ( 2014 ) . Di↵erential privacy has been successfully applied to many problems . For more detailed surveys of the applications of di↵erential privacy , we refer the readers to Dwork ( 2008 ; 2011 ) . Applying di↵erential privacy techniques in deep learning is an interesting but non-trivial task . Previous research have customized di↵erential privacy for di↵erent learning tasks and settings Shokri & Shmatikov ( 2015 ) ; Abadi et al . ( 2016 ) ; Phan et al . ( 2016 ) . Although there are existing studies about applying di↵erential privacy in neural network , but there is little exploration on presenting di↵erential privacy using prune network yet . To the best of our knowledge , this paper is the first work that shows a connection between di↵erential privacy and pruned neural network . Over-parameterized deep learning theory Recently , there is super long line of work focusing showing the convergence of deep neural network training under overparameterization regime Li & Liang ( 2018 ) ; Du et al . ( 2019 ) ; Allen-Zhu et al . ( 2019b ; c ; a ) ; Arora et al . ( 2019a ; b ) ; Song & Yang ( 2019 ) ; Oymak & Soltanolkotabi ( 2020 ) ; Brand et al . ( 2020 ) . The theory suggested as long as the neural network is su ciently wide , i.e. , m poly ( n , d , 1/ , L ) then running ( stochastic ) gradient descent algorithm is able to find the global minimum , where n is the number of input data points , d is the dimension of data , is the minimum ` 2 distances between all pairs and L is the number of layers in neural network . However , unlike the above classical deep learning convergence theory , this work explored the over-parameterized theory in a very di↵erent perspective , e.g . privacy . Our result is not an optimization result which indicating neural network can learn a set of input data points in certain sense , however our result is suggesting neural network can be private in the di↵erential privacy sense . 3 Backgrounds . Notations . For a positive integer n , we use [ n ] to denote set { 1 , 2 , · · · , n } . For vector x 2 Rn , we use kxk1 to denote Pn i=1 |xi| , kxk2 to denote ( Pn i=1 x 2 i ) 1/2 , kxk1 to denote maxi2 [ n ] |xi| . We use N ( µ , 2 ) to denote random Gaussian distribution . For a matrix A , we use kAk to denote its spectral norm . This section presents some backgrounds before theoretically establishing the equivalence between magnitude-based pruning and adding di↵erentially private noise in Section 4 . Section 3.1 revisits the notion of ( ✏dp , dp ) -di↵erential privacy . Section 3.2 describes the magnitude pruning algorithm . 3.1 Differential privacy . The classical definition of di↵erential privacy is shown as follow : Definition 3.1 ( ( ✏dp , dp ) -di↵erential privacy Dwork et al . ( 2006a ) ) . For a randomized function h ( x ) , we say h ( x ) is ( ✏dp , dp ) -di↵erential privacy if for all S ✓ Range ( h ) and for all x , y with kx yk1 1 we have Pr h [ h ( x ) 2 S ] exp ( ✏dp ) · Pr h [ h ( y ) 2 S ] + dp . Definition 3.1 says that , if there are two otherwise identical records x and y , one with privacy-sensitive information in it , and one without it , and we normalize them such that kx yk1 1 . Di↵erential Privacy ensures that the probability that a statistical query will produce a given result is nearly the same whether it ’ s conducted on the first or second record . Parameters ( ✏dp , dp ) are called the privacy budget , and smaller ✏dp and dp provide a better di↵erential privacy protection . One can think of a setting where both parameters are 0 , then the chance of telling whether a query result is from x or from y is no better than a random guessing . A standard strategy to achieve di↵erential privacy is by adding noise to the the original data x or the function output h ( x ) . In order to analyze it , we need the following definition : Definition 3.2 ( Global Sensitivity Dwork et al . ( 2006b ) ) . Let f : Rn ! Rd , define GSp ( f ) , the ` p global sensitivity of f , for all x , y with kx yk1 1 as GSp ( f ) = sup x , y2Rn kf ( x ) f ( y ) kp . The global sensitivity of a function measures how ‘ sensitive ’ the function is to slight changes in input . The noise needed for di↵erential privacy guarantee is then calibrated using some well-known mechanisms , e.g. , Laplace or Gaussian Dwork & Roth ( 2014 ) , and the amount of noise ( the standard deviation of the noise distribution ) is proportional to the sensitivity , but inversely proportional to the privacy budget ✏dp . That is to say , for a given function with fixed global sensitivity , a larger amount of noise is required to guarantee a better di↵erential privacy ( one with a smaller budget ✏dp ) . | Overview: This paper aims to establish a theoretical connection between differential privacy and magnitude based pruning. The authors show theoretically that outputs of pruned single layer neural networks have some similarity to outputs of the same network with differential privacy added. The paper then empirically demonstrates that model inversion attacks are harder against magnitude pruned neural networks. | SP:859e6be6784f83c885d384954c106b3e9f1bf39f |
Privacy-preserving Learning via Deep Net Pruning | Neural network pruning has demonstrated its success in significantly improving the computational e ciency of deep models while only introducing a small reduction on final accuracy . In this paper , we explore an extra bonus of neural network pruning in terms of enhancing privacy . Specifically , we show a novel connection between magnitude-based pruning and adding di↵erentially private noise to intermediate layers under the overparameterized regime . To the best of our knowledge , this is the first work that bridges pruning with the theory of di↵erential privacy . The paper also presents experimental results by running the model inversion attack on two benchmark datasets , which supports the theoretical finding . 1 Introduction . Data privacy has become one of the top concerns in the application of deep neural networks , since there has been an increasing demand to train deep models on private data sets . For example , hospitals are now training their automated diagnosis systems on private patients ’ data Litjens et al . ( 2016 ) ; Lakhani & Sundaram ( 2017 ) ; De Fauw et al . ( 2018 ) ; and advertisement providers are collecting users ’ online trajectories to optimize their learning-based recommendation algorithm Covington et al . ( 2016 ) ; Ying et al . ( 2018 ) . These private data , however , are usually subject to the regulations such as California Consumer Privacy Act ( CCPA ) Legislature ( 2018 ) , Health Insurance Portability and Accountability Act ( HIPAA ) Act ( 1996 ) , and General Data Protection Regulation ( GDPR ) of European Union . Di↵erential privacy ( DP ) Dwork et al . ( 2006b ) ; Dwork ( 2009 ) ; Dwork & Roth ( 2014 ) has emerged , during the past few years , as a strong standard to provide theoretical privacy guarantees for algorithms on aggregate databases . The core idea of achieving di↵erential privacy is to add controlled noise to the output of a deterministic function , such that the output can not be used to infer much about any single individual in the database . Recent years have seen an increasing number of applications that adapt di↵erential privacy mechanisms to address privacy concerns in deep learning Shokri & Shmatikov ( 2015 ) ; Abadi et al . ( 2016 ) ; Phan et al . ( 2016 ) ; McMahan et al . ( 2018 ) . Neural network pruning ( or pruning in short ) , a seemingly orthogonal field to privacy , has also been the subject of a great amount of work in recent years . Pruning aims to reduce the number of model parameters , such that the compressed model can be applied even under the memory constraints of the edge-devices . Various pruning techniques have succeeded in significantly compressing models with little or no loss of accuracy Han et al . ( 2015 ; 2016a ) ; Li et al . ( 2016 ) ; Ding et al . ( 2018 ) ; Evci et al . ( 2019 ) ; Tanaka et al . ( 2020 ) . However , the majority of existing literature only demonstrate the benefits of pruning in terms of energy saving and inference speedup , while in this work , we investigate another interesting bonus of pruning – preserving data privacy . Our investigation is mainly inspired by the observation that neural network pruning makes the inversion from hidden-layers harder , as the percentage of remained weight decreases ( see Figure 1 ) . Motivated by this empirical observation , we build under the over-paramterized regime of deep learning theory , and show an interesting connection between neural network pruning and adding di↵erentially private noise to intermediate layers . We believe this con- nection may have important practical implications since the pruned model only incurs small accuracy loss , and we leave that as future work . We list our contributions as follow : • We explore the benefits of pruned neural networks in terms of preserving data privacy . To the best of our knowledge , this is the first step towards drawing a theoretical connection between neural network pruning and di↵erential privacy . • To build the connection between pruning and adding di↵erentially private noise to intermediate layers , we generalize the famous anti-concentration inequality due to Carbery and Wright Carbery & Wright ( 2001 ) . This generalization might find more applications in the theoretical analysis of neural network pruning in the future . • We provide empirical results in support of our theoretical finding . Specifically , we demonstrate on two benchmark datasets that pruned neural networks are more secure in the sense that running the model inversion attack becomes harder . Roadmap . The rest of this paper is organized as follow . Section 2 covers existing literature in di↵erent privacy , neural network pruning , and over-parameterized deep learning theory . Section 3 provides theoretical preliminaries and Section 4 presents our main theoretical result . Section 5 shows empirical results on MNIST and CIFAR-10 benchmarks that are in support of our theoretical findings . We conclude this work in Section 6 . 2 Related work . Neural network pruning Traditional deep neural network models are computationally expensive and memory intensive , which hinders their deployment in applications with limited memory resources or strict latency requirements . Many progress has been made to perform model compression in deep networks , including low-rank factorization Sainath et al . ( 2013 ) ; Lebedev et al . ( 2015 ) , network pruning LeCun et al . ( 1990 ) ; Srinivas & Babu ( 2015 ) ; Han et al . ( 2016b ) ; Li et al . ( 2017 ) , and knowledge distillation Hinton et al . ( 2015 ) ; Chen et al . ( 2017 ) . Among them , neural network pruning has been widely adopted because it is able to reduce model sizes by up to one order of magnitude without significant accuracy loss . The idea of network pruning dates back to the Optimal Brain Damage in 1990s LeCun et al . ( 1990 ) . Recently , it has been shown that removing the weights with low magnitude can also achieve a highly compressed model Han et al . ( 2016b ) , which is referred to as ‘ magnitude-based pruning ’ . Di↵erential privacy The concept of ✏-di↵erential privacy was originally introduced by Dwork , McSherry , Nissim and Smith Dwork et al . ( 2006b ) . Later , it was generalized to a relaxation of ( ✏ , ) -di↵erential privacy Dwork et al . ( 2006a ) ; Dwork ( 2009 ) ; Dwork & Roth ( 2014 ) . Di↵erential privacy has been successfully applied to many problems . For more detailed surveys of the applications of di↵erential privacy , we refer the readers to Dwork ( 2008 ; 2011 ) . Applying di↵erential privacy techniques in deep learning is an interesting but non-trivial task . Previous research have customized di↵erential privacy for di↵erent learning tasks and settings Shokri & Shmatikov ( 2015 ) ; Abadi et al . ( 2016 ) ; Phan et al . ( 2016 ) . Although there are existing studies about applying di↵erential privacy in neural network , but there is little exploration on presenting di↵erential privacy using prune network yet . To the best of our knowledge , this paper is the first work that shows a connection between di↵erential privacy and pruned neural network . Over-parameterized deep learning theory Recently , there is super long line of work focusing showing the convergence of deep neural network training under overparameterization regime Li & Liang ( 2018 ) ; Du et al . ( 2019 ) ; Allen-Zhu et al . ( 2019b ; c ; a ) ; Arora et al . ( 2019a ; b ) ; Song & Yang ( 2019 ) ; Oymak & Soltanolkotabi ( 2020 ) ; Brand et al . ( 2020 ) . The theory suggested as long as the neural network is su ciently wide , i.e. , m poly ( n , d , 1/ , L ) then running ( stochastic ) gradient descent algorithm is able to find the global minimum , where n is the number of input data points , d is the dimension of data , is the minimum ` 2 distances between all pairs and L is the number of layers in neural network . However , unlike the above classical deep learning convergence theory , this work explored the over-parameterized theory in a very di↵erent perspective , e.g . privacy . Our result is not an optimization result which indicating neural network can learn a set of input data points in certain sense , however our result is suggesting neural network can be private in the di↵erential privacy sense . 3 Backgrounds . Notations . For a positive integer n , we use [ n ] to denote set { 1 , 2 , · · · , n } . For vector x 2 Rn , we use kxk1 to denote Pn i=1 |xi| , kxk2 to denote ( Pn i=1 x 2 i ) 1/2 , kxk1 to denote maxi2 [ n ] |xi| . We use N ( µ , 2 ) to denote random Gaussian distribution . For a matrix A , we use kAk to denote its spectral norm . This section presents some backgrounds before theoretically establishing the equivalence between magnitude-based pruning and adding di↵erentially private noise in Section 4 . Section 3.1 revisits the notion of ( ✏dp , dp ) -di↵erential privacy . Section 3.2 describes the magnitude pruning algorithm . 3.1 Differential privacy . The classical definition of di↵erential privacy is shown as follow : Definition 3.1 ( ( ✏dp , dp ) -di↵erential privacy Dwork et al . ( 2006a ) ) . For a randomized function h ( x ) , we say h ( x ) is ( ✏dp , dp ) -di↵erential privacy if for all S ✓ Range ( h ) and for all x , y with kx yk1 1 we have Pr h [ h ( x ) 2 S ] exp ( ✏dp ) · Pr h [ h ( y ) 2 S ] + dp . Definition 3.1 says that , if there are two otherwise identical records x and y , one with privacy-sensitive information in it , and one without it , and we normalize them such that kx yk1 1 . Di↵erential Privacy ensures that the probability that a statistical query will produce a given result is nearly the same whether it ’ s conducted on the first or second record . Parameters ( ✏dp , dp ) are called the privacy budget , and smaller ✏dp and dp provide a better di↵erential privacy protection . One can think of a setting where both parameters are 0 , then the chance of telling whether a query result is from x or from y is no better than a random guessing . A standard strategy to achieve di↵erential privacy is by adding noise to the the original data x or the function output h ( x ) . In order to analyze it , we need the following definition : Definition 3.2 ( Global Sensitivity Dwork et al . ( 2006b ) ) . Let f : Rn ! Rd , define GSp ( f ) , the ` p global sensitivity of f , for all x , y with kx yk1 1 as GSp ( f ) = sup x , y2Rn kf ( x ) f ( y ) kp . The global sensitivity of a function measures how ‘ sensitive ’ the function is to slight changes in input . The noise needed for di↵erential privacy guarantee is then calibrated using some well-known mechanisms , e.g. , Laplace or Gaussian Dwork & Roth ( 2014 ) , and the amount of noise ( the standard deviation of the noise distribution ) is proportional to the sensitivity , but inversely proportional to the privacy budget ✏dp . That is to say , for a given function with fixed global sensitivity , a larger amount of noise is required to guarantee a better di↵erential privacy ( one with a smaller budget ✏dp ) . | The paper claims to exhibit a connection between differential privacy and neural network pruning. The main result is that, for a single layer network with Gaussian weights that depend on the privacy parameters, there exists a differentially private function which approximates the pruned network in $L_2$ distance. This is proved by bounding the sensitivity of the network and adding Laplace noise so that the resulting function satisfies differential privacy and approximates the function defined by the pruned network. According to the authors, these results mean that “ network pruning can be an effective method to achieve differential privacy” | SP:859e6be6784f83c885d384954c106b3e9f1bf39f |
Pea-KD: Parameter-efficient and accurate Knowledge Distillation | 1 INTRODUCTION . How can we improve the accuracy of knowledge distillation ( KD ) with smaller number of parameters ? KD uses a well-trained large teacher model to train a smaller student model . Conventional KD method ( Hinton et al . ( 2006 ) ) trains the student model using the teacher model ’ s predictions as targets . That is , the student model uses not only the true labels ( hard distribution ) but also the teacher model ’ s predictions ( soft distribution ) as targets . Since better KD accuracy is directly linked to better model compression , improving KD accuracy is valuable and crucial . Naturally , there have been many studies and attempts to improve the accuracy of KD . Sun et al . ( 2019 ) introduced Patient KD , which utilizes not only the teacher model ’ s final output but also the intermediate outputs generated from the teacher ’ s layers . Jiao et al . ( 2019 ) applied additional KD in the pretraining step of the student model . However , existing KD methods share the limitation of students having lower model capacity compared to their teacher models , due to their smaller size . In addition , there is no proper initialization guide established for the student models , which especially becomes important when the student model is small . These limitations lower than desired levels of student model accuracy . In this paper , we propose Pea-KD ( Parameter-efficient and accurate Knowledge Distillation ) , a novel KD method designed especially for Transformer-based models ( Vaswani et al . ( 2017 ) ) that significantly improves the student model ’ s accuracy . Pea-KD is composed of two modules , Shuffled Parameter Sharing ( SPS ) and Pretraining with Teacher ’ s Predictions ( PTP ) . Pea-KD is based on the following two main ideas . 1 . We apply SPS in order to increase the effective model capacity of the student model without increasing the number of parameters . SPS has two steps : 1 ) stacking layers that share parameters and 2 ) shuffling the parameters between shared pairs of layers . Doing so increases the model ’ s effective capacity which enables the student to better replicate the teacher model ( details in Section 3.2 ) . 2 . We apply a pretraining task called PTP for the student . Through PTP , the student model learns general knowledge about the teacher and the task . With this additional pretraining , the student more efficiently acquires and utilizes the teacher ’ s knowledge during the actual KD process ( details in Section 3.3 ) . Throughout the paper we use Pea-KD applied on BERT model ( PeaBERT ) as an example to investigate our proposed approach . We summarize our main contributions as follows : • Novel framework for KD . We propose SPS and PTP , a parameter sharing method and a KD-specialized initialization method . These methods serve as a new framework for KD to significantly improve accuracy . • Performance . When tested on four widely used GLUE tasks , PeaBERT improves student ’ s accuracy by 4.4 % on average and up to 14.8 % maximum when compared to the original BERT model . PeaBERT also outperforms the existing state-of-the-art KD baselines by 3.5 % on average . • Generality . Our proposed method Pea-KD can be applied to any transformer-based models and classification tasks with small modifications . Then we conclude in Section 5 . 2 RELATED WORK . Pretrained Language Models . The framework of first pretraining language models and then finetuning for downstream tasks has now become the industry standard for Natural Language Processing ( NLP ) models . Pretrained language models , such as BERT ( Devlin et al . ( 2018 ) ) , XLNet ( Yang et al . ( 2019 ) ) , RoBERTa ( Liu et al . ( 2019 ) ) and ELMo ( Peters et al . ( 2018 ) ) prove how powerful pretrained language models can be . Specifically , BERT is a language model consisting of multiple transformer encoder layers . Transformers ( Vaswani et al . ( 2017 ) ) can capture long-term dependencies between input tokens by using a self-attention mechanism . Self-attention calculates an attention function using three components , query , key , and value , each denoted as matrices Q , K , and V. The attention function is defined as follows : A = QKT√ dk ( 1 ) Attention ( Q , K , V ) = softmax ( A ) V ( 2 ) It is known that through pretraining using Masked Language Modeling ( MLM ) and Next Sentence Prediction ( NSP ) , the attention matrices in BERT can capture substantial linguistic knowledge . BERT has achieved the state-of-the-art performance on a wide range of NLP tasks , such as the GLUE benchmark ( Wang et al . ( 2018 ) ) and SQuAD ( Rajpurkar et al . ( 2016 ) ) . However , these modern pretrained models are very large in size and contain millions of parameters , making them nearly impossible to apply on edge devices with limited amount of resources . Model Compression . As deep learning algorithms started getting adopted , implemented , and researched in diverse fields , high computation costs and memory shortage have started to become challenging factors . Especially in NLP , pretrained language models typically require a large set of parameters . This results in extensive cost of computation and memory . As such , Model Compression has now become an important task for deep learning . There have already been many attempts to tackle this problem , including quantization ( Gong et al . ( 2014 ) ) and weight pruning ( Han et al . ( 2015 ) ) . Two promising approaches are KD ( Hinton et al . ( 2015 ) ) and Parameter Sharing , which we focus on in this paper . Knowledge Distillation ( KD ) . As briefly covered in Section 1 , KD transfers knowledge from a well-trained and large teacher model to a smaller student model . KD uses the teacher models predictions on top of the true labels to train the student model . It is proven through many experiments that the student model learns to imitate the soft distribution of the teacher model ’ s predictions and ultimately performs better than learning solely from the original data . There have already been many attempts to compress BERT using KD . Patient Knowledge Distillation ( Sun et al . ( 2019 ) ) extracts knowledge not only from the final prediction of the teacher , but also from the intermediate layers . TinyBERT ( Jiao et al . ( 2019 ) ) uses a two-stage learning framework and applies KD in both pretraining and task-specific finetuning . DistilBERT ( Sanh et al . ( 2019 ) ) uses half of the layers of BERT-base model and applies KD during pretraining and finetuning of BERT . Insufficient capacity and the absence of a clear initialization guide are some of the existing KD method ’ s area of improvement . Parameter Sharing . Sharing parameters across different layers is a widely used idea for model compression . There have been several attempts to apply parameter sharing in transformer architecture and BERT model . However , the existing parameter sharing methods exhibit a large tradeoff between model performance and model size . They reduce the model ’ s size significantly but also suffers from a great loss in performance as a result . 3 PROPOSED METHODS . In the following , we provide an overview of the main challenges faced in KD and our methods to address them in Section 3.1 . We then discuss the precise procedures of SPS and PTP in Sections 3.2 and 3.3 . Lastly , we explain our final method , PeaBERT and the training details in Section 3.4 . 3.1 OVERVIEW . BERT-base model contains over 109 million parameters . Its extensive size makes model deployment often infeasible and computationally expensive in many cases , such as on mobile devices . As a result , industry practitioners commonly use a smaller version of BERT and apply KD . However , the existing KD methods face the following challenges : 1 . Insufficient model capacity of the student model . Since the student model contains fewer number of parameters than the teacher model , its model capacity is also lower . The smaller and simpler the student model gets , the gap between the student and the teacher grows , making it increasingly difficult for the student to replicate the teacher model ’ s accuracy . The limited capacity hinders the student model ’ s performance . How can we enlarge the student model ’ s capacity while maintaining the same number of parameters ? 2 . Absence of proper initial guide for the student model . There is no widely accepted and vetted guide to selecting the student ’ s initial state of the KD process . In most cases , a truncated version of pretrained BERT-base model is used . In reality , this hinders the student from reproducing the teacher ’ s results . Can we find a better method for the student ’ s KD initialization ? We propose the following main ideas to address these challenges : 1 . Shuffled Parameter Sharing ( SPS ) : increasing ‘ effective ’ model capacity of the student . SPS consists of two steps . Step 1 increases the student ’ s effective model capacity by stacking parameter-shared layers . Step 2 further improves the model capacity by shuffling the shared parameters . Shuffling enables more efficient use of the parameters by learning diverse set of information . As a result , the SPS-applied student model achieves much higher accuracy while still using the same number of parameters ( details in Section 3.2 ) . 2 . Pretraining with Teacher ’ s Predictions ( PTP ) : a novel pretraining task utilizing teacher ’ s predictions for student initialization . To address the limitation of the initial guide , we propose PTP , a novel pretraining method for the student by utilizing teacher model ’ s predictions . Through PTP , the student model pre-learns knowledge latent in the teacher ’ s softmax output which is hard to learn during the conventional KD process . This helps the student better acquire and utilize the teacher ’ s knowledge during the KD process ( details in Section 3.3 ) . The following subsections describe the procedures of SPS , PTP , and PeaBERT in detail . 3.2 SHUFFLED PARAMETER SHARING ( SPS ) . SPS improves student ’ s model capacity while using the same number of parameters , addressing the capacity limitations of a typical KD . SPS is composed of the following two steps . Step1 . Paired Parameter Sharing . We start with doubling the number of layers in the student model . We then share the parameters between the bottom half and the upper half of the model , as graphically represented in Figure 1a . Step2 . Shuffling . We shuffle the Query and Key parameters between the shared pairs . That is , for the shared upper half of layers we use the original Query parameters as Key parameters , and the original Key parameters as Query parameters . We call this architecture SPS , which is depicted in Figure 1b . For the 6-layer student case we slightly modify the architecture as shown in Figure 1c . We apply SPS on the top 3 layers only . Motivation behind step 1 : Increased model capacity due to a more complex structure . By applying step 1 , the student model now has more layers while maintaining the same number of parameters used . This leads to a higher model complexity , which we expect will increase model capacity and performance . Motivation behind step 2 : Increased parameter efficiency and additional regularization effect . The intuition behind shuffling becomes clear when we compare the model with and without step 2 . Let us consider the case depicted in Figure1b . In step 1 , the first layer ’ s Query parameter is used as a Query parameter in both the first layer and in the shared fourth layer . Since this parameter is used only as a Query parameter throughout the model , it will only learn the information relevant to Query . In step 2 , on the other hand , this parameter ’ s function changes due to shuffling . The first layer ’ s Query parameter is used as a Key parameter in the shared fourth layer . Thus it has the opportunity to learn the important features of both the Query and the Key , gaining a more diverse and wider breadth of knowledge . The shuffling mechanism allows the parameters to learn diverse information , thereby maximizing learning efficiency . We can also view this as a type of regularization or multi-task learning . Since these parameters need to learn the features of both the Query and the Key , this prevents overfitting to either one . Therefore , we expect the shuffling mechanism to improve the generalization ability of the model . | This paper proposes a distillation method for BERT. The work is based on two-fold main ideas. First, as the student model is usually smaller in the number of parameters, the model capacity is limited. The authors propose to stack the layers that share parameters to counter this limitation. Second, the authors argue that the initialization of the student model is crucial, so they propose an pre-training strategy for boosting the student's performance. | SP:1c0bc1ab70b7607f52d991c48ddad1c6b998a702 |
Pea-KD: Parameter-efficient and accurate Knowledge Distillation | 1 INTRODUCTION . How can we improve the accuracy of knowledge distillation ( KD ) with smaller number of parameters ? KD uses a well-trained large teacher model to train a smaller student model . Conventional KD method ( Hinton et al . ( 2006 ) ) trains the student model using the teacher model ’ s predictions as targets . That is , the student model uses not only the true labels ( hard distribution ) but also the teacher model ’ s predictions ( soft distribution ) as targets . Since better KD accuracy is directly linked to better model compression , improving KD accuracy is valuable and crucial . Naturally , there have been many studies and attempts to improve the accuracy of KD . Sun et al . ( 2019 ) introduced Patient KD , which utilizes not only the teacher model ’ s final output but also the intermediate outputs generated from the teacher ’ s layers . Jiao et al . ( 2019 ) applied additional KD in the pretraining step of the student model . However , existing KD methods share the limitation of students having lower model capacity compared to their teacher models , due to their smaller size . In addition , there is no proper initialization guide established for the student models , which especially becomes important when the student model is small . These limitations lower than desired levels of student model accuracy . In this paper , we propose Pea-KD ( Parameter-efficient and accurate Knowledge Distillation ) , a novel KD method designed especially for Transformer-based models ( Vaswani et al . ( 2017 ) ) that significantly improves the student model ’ s accuracy . Pea-KD is composed of two modules , Shuffled Parameter Sharing ( SPS ) and Pretraining with Teacher ’ s Predictions ( PTP ) . Pea-KD is based on the following two main ideas . 1 . We apply SPS in order to increase the effective model capacity of the student model without increasing the number of parameters . SPS has two steps : 1 ) stacking layers that share parameters and 2 ) shuffling the parameters between shared pairs of layers . Doing so increases the model ’ s effective capacity which enables the student to better replicate the teacher model ( details in Section 3.2 ) . 2 . We apply a pretraining task called PTP for the student . Through PTP , the student model learns general knowledge about the teacher and the task . With this additional pretraining , the student more efficiently acquires and utilizes the teacher ’ s knowledge during the actual KD process ( details in Section 3.3 ) . Throughout the paper we use Pea-KD applied on BERT model ( PeaBERT ) as an example to investigate our proposed approach . We summarize our main contributions as follows : • Novel framework for KD . We propose SPS and PTP , a parameter sharing method and a KD-specialized initialization method . These methods serve as a new framework for KD to significantly improve accuracy . • Performance . When tested on four widely used GLUE tasks , PeaBERT improves student ’ s accuracy by 4.4 % on average and up to 14.8 % maximum when compared to the original BERT model . PeaBERT also outperforms the existing state-of-the-art KD baselines by 3.5 % on average . • Generality . Our proposed method Pea-KD can be applied to any transformer-based models and classification tasks with small modifications . Then we conclude in Section 5 . 2 RELATED WORK . Pretrained Language Models . The framework of first pretraining language models and then finetuning for downstream tasks has now become the industry standard for Natural Language Processing ( NLP ) models . Pretrained language models , such as BERT ( Devlin et al . ( 2018 ) ) , XLNet ( Yang et al . ( 2019 ) ) , RoBERTa ( Liu et al . ( 2019 ) ) and ELMo ( Peters et al . ( 2018 ) ) prove how powerful pretrained language models can be . Specifically , BERT is a language model consisting of multiple transformer encoder layers . Transformers ( Vaswani et al . ( 2017 ) ) can capture long-term dependencies between input tokens by using a self-attention mechanism . Self-attention calculates an attention function using three components , query , key , and value , each denoted as matrices Q , K , and V. The attention function is defined as follows : A = QKT√ dk ( 1 ) Attention ( Q , K , V ) = softmax ( A ) V ( 2 ) It is known that through pretraining using Masked Language Modeling ( MLM ) and Next Sentence Prediction ( NSP ) , the attention matrices in BERT can capture substantial linguistic knowledge . BERT has achieved the state-of-the-art performance on a wide range of NLP tasks , such as the GLUE benchmark ( Wang et al . ( 2018 ) ) and SQuAD ( Rajpurkar et al . ( 2016 ) ) . However , these modern pretrained models are very large in size and contain millions of parameters , making them nearly impossible to apply on edge devices with limited amount of resources . Model Compression . As deep learning algorithms started getting adopted , implemented , and researched in diverse fields , high computation costs and memory shortage have started to become challenging factors . Especially in NLP , pretrained language models typically require a large set of parameters . This results in extensive cost of computation and memory . As such , Model Compression has now become an important task for deep learning . There have already been many attempts to tackle this problem , including quantization ( Gong et al . ( 2014 ) ) and weight pruning ( Han et al . ( 2015 ) ) . Two promising approaches are KD ( Hinton et al . ( 2015 ) ) and Parameter Sharing , which we focus on in this paper . Knowledge Distillation ( KD ) . As briefly covered in Section 1 , KD transfers knowledge from a well-trained and large teacher model to a smaller student model . KD uses the teacher models predictions on top of the true labels to train the student model . It is proven through many experiments that the student model learns to imitate the soft distribution of the teacher model ’ s predictions and ultimately performs better than learning solely from the original data . There have already been many attempts to compress BERT using KD . Patient Knowledge Distillation ( Sun et al . ( 2019 ) ) extracts knowledge not only from the final prediction of the teacher , but also from the intermediate layers . TinyBERT ( Jiao et al . ( 2019 ) ) uses a two-stage learning framework and applies KD in both pretraining and task-specific finetuning . DistilBERT ( Sanh et al . ( 2019 ) ) uses half of the layers of BERT-base model and applies KD during pretraining and finetuning of BERT . Insufficient capacity and the absence of a clear initialization guide are some of the existing KD method ’ s area of improvement . Parameter Sharing . Sharing parameters across different layers is a widely used idea for model compression . There have been several attempts to apply parameter sharing in transformer architecture and BERT model . However , the existing parameter sharing methods exhibit a large tradeoff between model performance and model size . They reduce the model ’ s size significantly but also suffers from a great loss in performance as a result . 3 PROPOSED METHODS . In the following , we provide an overview of the main challenges faced in KD and our methods to address them in Section 3.1 . We then discuss the precise procedures of SPS and PTP in Sections 3.2 and 3.3 . Lastly , we explain our final method , PeaBERT and the training details in Section 3.4 . 3.1 OVERVIEW . BERT-base model contains over 109 million parameters . Its extensive size makes model deployment often infeasible and computationally expensive in many cases , such as on mobile devices . As a result , industry practitioners commonly use a smaller version of BERT and apply KD . However , the existing KD methods face the following challenges : 1 . Insufficient model capacity of the student model . Since the student model contains fewer number of parameters than the teacher model , its model capacity is also lower . The smaller and simpler the student model gets , the gap between the student and the teacher grows , making it increasingly difficult for the student to replicate the teacher model ’ s accuracy . The limited capacity hinders the student model ’ s performance . How can we enlarge the student model ’ s capacity while maintaining the same number of parameters ? 2 . Absence of proper initial guide for the student model . There is no widely accepted and vetted guide to selecting the student ’ s initial state of the KD process . In most cases , a truncated version of pretrained BERT-base model is used . In reality , this hinders the student from reproducing the teacher ’ s results . Can we find a better method for the student ’ s KD initialization ? We propose the following main ideas to address these challenges : 1 . Shuffled Parameter Sharing ( SPS ) : increasing ‘ effective ’ model capacity of the student . SPS consists of two steps . Step 1 increases the student ’ s effective model capacity by stacking parameter-shared layers . Step 2 further improves the model capacity by shuffling the shared parameters . Shuffling enables more efficient use of the parameters by learning diverse set of information . As a result , the SPS-applied student model achieves much higher accuracy while still using the same number of parameters ( details in Section 3.2 ) . 2 . Pretraining with Teacher ’ s Predictions ( PTP ) : a novel pretraining task utilizing teacher ’ s predictions for student initialization . To address the limitation of the initial guide , we propose PTP , a novel pretraining method for the student by utilizing teacher model ’ s predictions . Through PTP , the student model pre-learns knowledge latent in the teacher ’ s softmax output which is hard to learn during the conventional KD process . This helps the student better acquire and utilize the teacher ’ s knowledge during the KD process ( details in Section 3.3 ) . The following subsections describe the procedures of SPS , PTP , and PeaBERT in detail . 3.2 SHUFFLED PARAMETER SHARING ( SPS ) . SPS improves student ’ s model capacity while using the same number of parameters , addressing the capacity limitations of a typical KD . SPS is composed of the following two steps . Step1 . Paired Parameter Sharing . We start with doubling the number of layers in the student model . We then share the parameters between the bottom half and the upper half of the model , as graphically represented in Figure 1a . Step2 . Shuffling . We shuffle the Query and Key parameters between the shared pairs . That is , for the shared upper half of layers we use the original Query parameters as Key parameters , and the original Key parameters as Query parameters . We call this architecture SPS , which is depicted in Figure 1b . For the 6-layer student case we slightly modify the architecture as shown in Figure 1c . We apply SPS on the top 3 layers only . Motivation behind step 1 : Increased model capacity due to a more complex structure . By applying step 1 , the student model now has more layers while maintaining the same number of parameters used . This leads to a higher model complexity , which we expect will increase model capacity and performance . Motivation behind step 2 : Increased parameter efficiency and additional regularization effect . The intuition behind shuffling becomes clear when we compare the model with and without step 2 . Let us consider the case depicted in Figure1b . In step 1 , the first layer ’ s Query parameter is used as a Query parameter in both the first layer and in the shared fourth layer . Since this parameter is used only as a Query parameter throughout the model , it will only learn the information relevant to Query . In step 2 , on the other hand , this parameter ’ s function changes due to shuffling . The first layer ’ s Query parameter is used as a Key parameter in the shared fourth layer . Thus it has the opportunity to learn the important features of both the Query and the Key , gaining a more diverse and wider breadth of knowledge . The shuffling mechanism allows the parameters to learn diverse information , thereby maximizing learning efficiency . We can also view this as a type of regularization or multi-task learning . Since these parameters need to learn the features of both the Query and the Key , this prevents overfitting to either one . Therefore , we expect the shuffling mechanism to improve the generalization ability of the model . | This paper proposed a framework for knowledge distillation with smaller number of parameters.The authors proposed a new parameter sharing method that allows a greater model complexity for the student model. Another contribution is that a KD-specialized initialization method named Pretraining with Teacher’s Predictions can improve the student's performance. The author combined these two methods to improve the performance of the student model on existing tasks, which has surpassed the existing knowledge distillation baseline. | SP:1c0bc1ab70b7607f52d991c48ddad1c6b998a702 |
Human-interpretable model explainability on high-dimensional data | 1 INTRODUCTION . The explainability of AI systems is important , both for model development and model assurance . This importance continues to rise as AI models – and the data on which they are trained – become ever more complex . Moreover , methods for AI explainability must be adapted to maintain the human-interpretability of explanations in the regime of highly complex data . Many explainability methods exist in the literature . Model-specific techniques refer to the internal structure of a model in formulating explanations ( Chen & Guestrin , 2016 ; Shrikumar et al. , 2017 ) , while model-agnostic methods are based solely on input-output relationships and treat the model as a black-box ( Breiman , 2001 ; Ribeiro et al. , 2016 ) . Model-agnostic methods offer wide applicability and , importantly , fix a common language for explanations across different model types . The Shapley framework for model-agnostic explainability stands out , due to its theoretically principled foundation and incorporation of interaction effects between the data ’ s features ( Shapley , 1953 ; Lundberg & Lee , 2017 ) . The Shapley framework has been used for explainability in machine learning for years ( Lipovetsky & Conklin , 2001 ; Kononenko et al. , 2010 ; Štrumbelj & Kononenko , 2014 ; Datta et al. , 2016 ) . Unfortunately , the combinatorics required to capture interaction effects make Shapley values computationally intensive and thus ill-suited for high-dimensional data . More computationally-efficient methods have been developed to explain model predictions on highdimensional data . Gradient- and perturbation-based methods measure a model prediction ’ s sensitivity to each of its raw input features ( Selvaraju et al. , 2020 ; Zhou et al. , 2016 ; Zintgraf et al. , 2017 ) . Other methods estimate the mutual information between input features and the model ’ s prediction ( Chen et al. , 2018a ; Schulz et al. , 2020 ) , or generate counterfactual feature values that change the model ’ s prediction ( Chang et al. , 2019 ; Goyal et al. , 2019 ; Wang & Vasconcelos , 2020 ) . See Fig . 1 for explanations produced by several of these methods ( with details given in Sec . 3.5 ) . When intricately understood by the practitioner , these methods for model explainability can be useful , e.g . for model development . However , many alternative methods exist to achieve broadly the same goal ( i.e . to monitor how outputs change as inputs vary ) with alternative design choices that Under review as a conference paper at ICLR 2021 Figure 1 : Pixel-based explanations of a model trained to predict the attractiveness label in CelebA . < latexit sha1_base64= '' uVbZDjeKN2CUg8cuBY25CqEibBw= '' > AAAB8HicjVDLSgMxFL1TX7W+qi7dBIvgqsyIoO6KblxWsA9ph5JJ77ShSWZIMkIp/Qo3LhRx6+e482/MtF2oKHggcDjnXu7JiVLBjfX9D6+wtLyyulZcL21sbm3vlHf3mibJNMMGS0Si2xE1KLjChuVWYDvVSGUksBWNrnK/dY/a8ETd2nGKoaQDxWPOqHXSXVdSO4xiEvfKlaDqz0D+JhVYoN4rv3f7CcskKssENaYT+KkNJ1RbzgROS93MYErZiA6w46iiEk04mQWekiOn9EmcaPeUJTP168aESmPGMnKTeUDz08vF37xOZuPzcMJVmllUbH4ozgSxCcl/T/pcI7Ni7AhlmrushA2ppsy6jkr/K6F5Ug1Oqxc3p5Xa5aKOIhzAIRxDAGdQg2uoQwMYSHiAJ3j2tPfovXiv89GCt9jZh2/w3j4BebeQNw== < /latexit > < latexit sha1_base64= '' 48lxewtfvoTjglqBN3Xn2cbIFVI= '' > AAAB8HicjVDLSgMxFL2pr1pfVZdugkVwVWakoO6KblxWsA9ph5JJM21okhmSjFiGfoUbF4q49XPc+Tdm2i5UFDwQOJxzL/fkhIngxnreByosLa+srhXXSxubW9s75d29lolTTVmTxiLWnZAYJrhiTcutYJ1EMyJDwdrh+DL323dMGx6rGztJWCDJUPGIU2KddNuTxI7CCN/3yxW/6s2A/yYVWKDRL7/3BjFNJVOWCmJM1/cSG2REW04Fm5Z6qWEJoWMyZF1HFZHMBNks8BQfOWWAo1i7pyyeqV83MiKNmcjQTeYBzU8vF3/zuqmNzoKMqyS1TNH5oSgV2MY4/z0ecM2oFRNHCNXcZcV0RDSh1nVU+l8JrZOqX6ueX9cq9YtFHUU4gEM4Bh9OoQ5X0IAmUJDwAE/wjDR6RC/odT5aQIudffgG9PYJlP+QSQ== < /latexit > < latexit sha1_base64= '' K7cr1icZ8HzhwI560g3J0QOAQ0o= '' > AAAB8HicjVDLSgMxFL2pr1pfVZdugkVwVWakoO6KblxWsA9ph5JJM21okhmSjFCHfoUbF4q49XPc+Tdm2i5UFDwQOJxzL/fkhIngxnreByosLa+srhXXSxubW9s75d29lolTTVmTxiLWnZAYJrhiTcutYJ1EMyJDwdrh+DL323dMGx6rGztJWCDJUPGIU2KddNuTxI7CCN/3yxW/6s2A/yYVWKDRL7/3BjFNJVOWCmJM1/cSG2REW04Fm5Z6qWEJoWMyZF1HFZHMBNks8BQfOWWAo1i7pyyeqV83MiKNmcjQTeYBzU8vF3/zuqmNzoKMqyS1TNH5oSgV2MY4/z0ecM2oFRNHCNXcZcV0RDSh1nVU+l8JrZOqX6ueX9cq9YtFHUU4gEM4Bh9OoQ5X0IAmUJDwAE/wjDR6RC/odT5aQIudffgG9PYJmAeQSw== < /latexit > < latexit sha1_base64= '' KmEypMHsM7yk2RUtZ+c6bXbVosA= '' > AAAB/nicbVDLSsNAFJ3UV62vqLhyM1iEuimJFNRd0Y3LCvYBTSiTyU07dPJgZiKWUPBX3LhQxK3f4c6/cdJmoa0HBg7n3Ms9c7yEM6ks69sorayurW+UNytb2zu7e+b+QUfGqaDQpjGPRc8jEjiLoK2Y4tBLBJDQ49D1xje5330AIVkc3atJAm5IhhELGCVKSwPzyAmJGnkBzoKaoxj3AT+eTQdm1apbM+BlYhekigq0BuaX48c0DSFSlBMp+7aVKDcjQjHKYVpxUgkJoWMyhL6mEQlButks/hSfasXHQSz0ixSeqb83MhJKOQk9PZmHlYteLv7n9VMVXLoZi5JUQUTnh4KUYxXjvAvsMwFU8YkmhAqms2I6IoJQpRur6BLsxS8vk8553W7Ur+4a1eZ1UUcZHaMTVEM2ukBNdItaqI0oytAzekVvxpPxYrwbH/PRklHsHKI/MD5/AHIalSw= < /latexit > < latexit sha1_base64= '' WqAssZMNrO3tfegI87RjqSrSAbQ= '' > AAACAXicbVDLSsNAFJ34rPUVdSO4GSxCuymJFNSNFNy4rGAf0IYymUzaoZMHMzdiDXXjr7hxoYhb/8Kdf+OkzUJbD1w4nHMv997jxoIrsKxvY2l5ZXVtvbBR3Nza3tk19/ZbKkokZU0aiUh2XKKY4CFrAgfBOrFkJHAFa7ujq8xv3zGpeBTewjhmTkAGIfc5JaClvnnYCwgMXR+nfrkHXHgM35cfKpVJ3yxZVWsKvEjsnJRQjkbf/Op5EU0CFgIVRKmubcXgpEQCp4JNir1EsZjQERmwrqYhCZhy0ukHE3yiFQ/7kdQVAp6qvydSEig1Dlzdmd2r5r1M/M/rJuCfOykP4wRYSGeL/ERgiHAWB/a4ZBTEWBNCJde3YjokklDQoRV1CPb8y4ukdVq1a9WLm1qpfpnHUUBH6BiVkY3OUB1dowZqIooe0TN6RW/Gk/FivBsfs9YlI585QH9gfP4AK46WEQ== < /latexit > < latexit sha1_base64= '' 249iHdhtu7W0+U31BonYLaM+rVg= '' > AAAB+3icjVDLSsNAFL2pr1pfsS7dDBbBVUlEUHdFNy4r2Ac0oUwmk3boZBJmJtIS8ituXCji1h9x5984abtQUfDAhcM593IPJ0g5U9pxPqzKyura+kZ1s7a1vbO7Z+/XuyrJJKEdkvBE9gOsKGeCdjTTnPZTSXEccNoLJtel37unUrFE3OlZSv0YjwSLGMHaSEO77sVYj4MI5Z5mPKRoWgzthtt05kB/kwYs0R7a716YkCymQhOOlRq4Tqr9HEvNCKdFzcsUTTGZ4BEdGCpwTJWfz7MX6NgoIYoSaUZoNFe/XuQ4VmoWB2azTKp+eqX4mzfIdHTh50ykmaaCLB5FGUc6QWURKGSSEs1nhmAimcmKyBhLTLSpq/a/ErqnTfeseXl71mhdLeuowiEcwQm4cA4tuIE2dIDAFB7gCZ6twnq0XqzXxWrFWt4cwDdYb5/eNJRa < /latexit > make their explanations uncomparable to a general user : e.g . the distinct explanations in Fig . 1 describe the same model prediction . Ideally , a set of axioms ( agreed upon or debated ) would constrain the space of explanations , thus leading to a framework of curated methods that the user can choose from based on which axioms are relevant to the application . A further challenge on high-dimensional data is the sheer complexity of an explanation : in the methods described above , explanations have the same dimensionality as the data itself . Moreover , the importance of raw input features ( e.g . pixels ) are not individually meaningful to the user . Even when structured patterns emerge in an explanation ( e.g . in Fig . 1 ) this is not sufficient to answer higher-level questions . For example , did the subject ’ s protected attributes ( e.g . gender , age , or ethnicity ) have any influence on the model ’ s decision ? In this work , we develop methods for explaining predictions in terms of a digestible number of semantically meaningful concepts . We provide several options for transforming from the highdimensional raw features to a lower-dimensional latent space , which allow varying levels of user control . Regardless of the method used , transformation to a low-dimensional human-interpretable basis is a useful step , if explanations are to satisfy experts and non-experts alike . Once a set of semantic latent features is selected , one must choose an explainability algorithm to obtain quantitative information about why a certain model prediction was made . Fortunately , since the set of latent features is low-dimensional by construction , a Shapley-based approach becomes once again viable . In this work , we develop a method to apply Shapley explainability at the level of semantic latent features , thus providing a theoretically-controlled , model-agnostic foundation for explainability on high-dimensional data . Our main contributions are : • We introduce an approach to model explainability on high-dimensional data that involves encoding the raw input features into a digestible number of semantically meaningful latent features . We develop a procedure to apply Shapley explainability in this context , obtaining Shapley values that describe the high-dimensional model ’ s dependence on each semantic latent feature . • We demonstrate 3 methods to extract semantic features for the explanations : Fourier transforms , disentangled representations , and image-to-image translation . We benchmark our approach on dSprites – with known latent space – and showcase its effectiveness in computer vision tasks such as MNIST , CIFAR-10 , ImageNet , Describable Textures , and CelebA . 2 SEMANTIC SHAPLEY EXPLAINABILITY . In this section , we present a simple modular framework for obtaining meaningful low-dimensional explanations of model predictions on high-dimensional data . The framework contains two modules : ( i ) a mechanism for transforming from the high-dimensional space of raw model inputs to a lowdimensional space of semantic latent features , and ( ii ) an algorithm for generating explanations of the model ’ s predictions in terms of these semantic features . See Fig . 2 . We will begin by describing module ( ii ) in Sec . 2.1 , where we will show how to adapt Shapley explainability to latent features . Then we will describe several options for module ( i ) in Sec . 2.2 . 2.1 SHAPLEY VALUES FOR LATENT FEATURES . Shapley values ( Shapley , 1953 ) were developed in cooperative game theory to distribute the value v ( N ) earned by a team N = { 1 , 2 , . . . , n } among its players . The Shapley value φv ( i ) represents the marginal value added by player i upon joining the team , averaged over all orderings in which the team can form . In particular , φv ( i ) = ∑ S⊆N\ { i } |S| ! ( n− |S| − 1 ) ! n ! [ v ( S ∪ { i } ) − v ( S ) ] ( 1 ) where v ( S ) represents the value that a coalition S obtains without the rest of their teammates . Shapley values are the unique attribution method satisfying 4 natural axioms ( Shapley , 1953 ) . For example , they sum to the total value earned : ∑ i φv ( i ) = v ( N ) − v ( { } ) , and they are symmetric if two players i and j are functionally interchangeable : φv ( i ) = φv ( j ) . Shapley values thus serve as a well-founded explanation of an output ( the earned value ) in terms of inputs ( the players ) . The method can be adapted to explain the output of a machine learning model by interpreting the model ’ s input features x = ( x1 , . . . , xn ) as the players of a game . Consider a classification task , and let fy ( x ) be the model ’ s predicted probability that data point x belongs to class y . To apply Shapley explainability , one must define a value function representing the model ’ s expected output given only a subset of the input features xS . The most common choice is vfy ( x ) ( S ) = Ep ( x′ ) [ fy ( xS t x′S̄ ) ] ( 2 ) where p ( x′ ) is the distribution from which the data is drawn , S̄ is the complement of S , and xS tx′S̄ represents the spliced data point with in-coalition features from x and out-of-coalition features from x′ . Then , inserting the value function of Eq . ( 2 ) into the definition of Eq . ( 1 ) , one obtains Shapley values φfy ( x ) ( i ) representing the portion of the prediction fy ( x ) attributable to feature xi . The Shapley values presented above provide a local explanation of the model ’ s behaviour on an individual data point . For a global explanation , local values can be aggregated ( Frye et al. , 2020 ) Φf ( i ) = Ep ( x , y ) [ φfy ( x ) ( i ) ] ( 3 ) where p ( x , y ) is the joint distribution from which the labelled data is drawn . This aggregation preserves the Shapley axioms and is motivated by the sum rule : ∑ i Φf ( i ) = Ep ( x , y ) [ fy ( x ) ] − Ep ( x′ ) p ( y ) [ fy ( x ′ ) ] ( 4 ) which can be interpreted as the model accuracy above a class-balance baseline . Global Shapley values thus represent the portion of model accuracy attributable to each feature . To adapt the Shapley framework to latent features , suppose ( as in Fig . 2 ) that a mapping x → z exists to transform the raw model inputs x into a semantically meaningful representation z ( x ) , and that an ( approximate ) inverse mapping z → x̃ exists as well . Then we can obtain an explanation of the model prediction fy ( x ) in terms of the latent features z ( x ) by applying Shapley explainability instead to the function fy ( x̃ ( z ) ) at the point z = z ( x ) . To be precise , we define a value function ṽfy ( x ) ( S ) = Ep ( x′ ) [ fy ( x̃ ( zS ( x ) t zS̄ ( x′ ) ) ) ] ( 5 ) which represents the marginalisation of fy ( x̃ ( z ) ) over out-of-coalition features zS̄ . Here zS ( x ) is the in-coalition slice of z ( x ) , and zS̄ ( x′ ) is the out-of-coalition slice corresponding to a different data point . These get spliced together in latent space before transforming back to model-input-space and feeding into the model . Inserting the value function of Eq . ( 5 ) into the definition of Eq . ( 1 ) produces semantic Shapley values that explain fy ( x ) in terms of latent features zi . 2.2 LANDSCAPE OF SEMANTIC REPRESENTATIONS . A wide variety of methods exist to transform from the high-dimensional set of raw model inputs to an alternative set of features that offer semantic insight into the data being modelled . In this section , we consider several options for this semantic component of our approach to explainability . | The paper proposes an approach to generate semantic explanations for high-dimensional data. The proposed approach consists of two modules -- the first module transforms the high-dimensional raw data into lower-dimensional semantic latent space and the second module applies Shapely explainability to this lower-dimensional latent space to generate explanations in terms of semantic concepts. The approach has been applied to six different datasets. | SP:44a4a56c6048b2e7deb16dc106f4552e8f2227b9 |
Human-interpretable model explainability on high-dimensional data | 1 INTRODUCTION . The explainability of AI systems is important , both for model development and model assurance . This importance continues to rise as AI models – and the data on which they are trained – become ever more complex . Moreover , methods for AI explainability must be adapted to maintain the human-interpretability of explanations in the regime of highly complex data . Many explainability methods exist in the literature . Model-specific techniques refer to the internal structure of a model in formulating explanations ( Chen & Guestrin , 2016 ; Shrikumar et al. , 2017 ) , while model-agnostic methods are based solely on input-output relationships and treat the model as a black-box ( Breiman , 2001 ; Ribeiro et al. , 2016 ) . Model-agnostic methods offer wide applicability and , importantly , fix a common language for explanations across different model types . The Shapley framework for model-agnostic explainability stands out , due to its theoretically principled foundation and incorporation of interaction effects between the data ’ s features ( Shapley , 1953 ; Lundberg & Lee , 2017 ) . The Shapley framework has been used for explainability in machine learning for years ( Lipovetsky & Conklin , 2001 ; Kononenko et al. , 2010 ; Štrumbelj & Kononenko , 2014 ; Datta et al. , 2016 ) . Unfortunately , the combinatorics required to capture interaction effects make Shapley values computationally intensive and thus ill-suited for high-dimensional data . More computationally-efficient methods have been developed to explain model predictions on highdimensional data . Gradient- and perturbation-based methods measure a model prediction ’ s sensitivity to each of its raw input features ( Selvaraju et al. , 2020 ; Zhou et al. , 2016 ; Zintgraf et al. , 2017 ) . Other methods estimate the mutual information between input features and the model ’ s prediction ( Chen et al. , 2018a ; Schulz et al. , 2020 ) , or generate counterfactual feature values that change the model ’ s prediction ( Chang et al. , 2019 ; Goyal et al. , 2019 ; Wang & Vasconcelos , 2020 ) . See Fig . 1 for explanations produced by several of these methods ( with details given in Sec . 3.5 ) . When intricately understood by the practitioner , these methods for model explainability can be useful , e.g . for model development . However , many alternative methods exist to achieve broadly the same goal ( i.e . to monitor how outputs change as inputs vary ) with alternative design choices that Under review as a conference paper at ICLR 2021 Figure 1 : Pixel-based explanations of a model trained to predict the attractiveness label in CelebA . < latexit sha1_base64= '' uVbZDjeKN2CUg8cuBY25CqEibBw= '' > AAAB8HicjVDLSgMxFL1TX7W+qi7dBIvgqsyIoO6KblxWsA9ph5JJ77ShSWZIMkIp/Qo3LhRx6+e482/MtF2oKHggcDjnXu7JiVLBjfX9D6+wtLyyulZcL21sbm3vlHf3mibJNMMGS0Si2xE1KLjChuVWYDvVSGUksBWNrnK/dY/a8ETd2nGKoaQDxWPOqHXSXVdSO4xiEvfKlaDqz0D+JhVYoN4rv3f7CcskKssENaYT+KkNJ1RbzgROS93MYErZiA6w46iiEk04mQWekiOn9EmcaPeUJTP168aESmPGMnKTeUDz08vF37xOZuPzcMJVmllUbH4ozgSxCcl/T/pcI7Ni7AhlmrushA2ppsy6jkr/K6F5Ug1Oqxc3p5Xa5aKOIhzAIRxDAGdQg2uoQwMYSHiAJ3j2tPfovXiv89GCt9jZh2/w3j4BebeQNw== < /latexit > < latexit sha1_base64= '' 48lxewtfvoTjglqBN3Xn2cbIFVI= '' > AAAB8HicjVDLSgMxFL2pr1pfVZdugkVwVWakoO6KblxWsA9ph5JJM21okhmSjFiGfoUbF4q49XPc+Tdm2i5UFDwQOJxzL/fkhIngxnreByosLa+srhXXSxubW9s75d29lolTTVmTxiLWnZAYJrhiTcutYJ1EMyJDwdrh+DL323dMGx6rGztJWCDJUPGIU2KddNuTxI7CCN/3yxW/6s2A/yYVWKDRL7/3BjFNJVOWCmJM1/cSG2REW04Fm5Z6qWEJoWMyZF1HFZHMBNks8BQfOWWAo1i7pyyeqV83MiKNmcjQTeYBzU8vF3/zuqmNzoKMqyS1TNH5oSgV2MY4/z0ecM2oFRNHCNXcZcV0RDSh1nVU+l8JrZOqX6ueX9cq9YtFHUU4gEM4Bh9OoQ5X0IAmUJDwAE/wjDR6RC/odT5aQIudffgG9PYJlP+QSQ== < /latexit > < latexit sha1_base64= '' K7cr1icZ8HzhwI560g3J0QOAQ0o= '' > AAAB8HicjVDLSgMxFL2pr1pfVZdugkVwVWakoO6KblxWsA9ph5JJM21okhmSjFCHfoUbF4q49XPc+Tdm2i5UFDwQOJxzL/fkhIngxnreByosLa+srhXXSxubW9s75d29lolTTVmTxiLWnZAYJrhiTcutYJ1EMyJDwdrh+DL323dMGx6rGztJWCDJUPGIU2KddNuTxI7CCN/3yxW/6s2A/yYVWKDRL7/3BjFNJVOWCmJM1/cSG2REW04Fm5Z6qWEJoWMyZF1HFZHMBNks8BQfOWWAo1i7pyyeqV83MiKNmcjQTeYBzU8vF3/zuqmNzoKMqyS1TNH5oSgV2MY4/z0ecM2oFRNHCNXcZcV0RDSh1nVU+l8JrZOqX6ueX9cq9YtFHUU4gEM4Bh9OoQ5X0IAmUJDwAE/wjDR6RC/odT5aQIudffgG9PYJmAeQSw== < /latexit > < latexit sha1_base64= '' KmEypMHsM7yk2RUtZ+c6bXbVosA= '' > AAAB/nicbVDLSsNAFJ3UV62vqLhyM1iEuimJFNRd0Y3LCvYBTSiTyU07dPJgZiKWUPBX3LhQxK3f4c6/cdJmoa0HBg7n3Ms9c7yEM6ks69sorayurW+UNytb2zu7e+b+QUfGqaDQpjGPRc8jEjiLoK2Y4tBLBJDQ49D1xje5330AIVkc3atJAm5IhhELGCVKSwPzyAmJGnkBzoKaoxj3AT+eTQdm1apbM+BlYhekigq0BuaX48c0DSFSlBMp+7aVKDcjQjHKYVpxUgkJoWMyhL6mEQlButks/hSfasXHQSz0ixSeqb83MhJKOQk9PZmHlYteLv7n9VMVXLoZi5JUQUTnh4KUYxXjvAvsMwFU8YkmhAqms2I6IoJQpRur6BLsxS8vk8553W7Ur+4a1eZ1UUcZHaMTVEM2ukBNdItaqI0oytAzekVvxpPxYrwbH/PRklHsHKI/MD5/AHIalSw= < /latexit > < latexit sha1_base64= '' WqAssZMNrO3tfegI87RjqSrSAbQ= '' > AAACAXicbVDLSsNAFJ34rPUVdSO4GSxCuymJFNSNFNy4rGAf0IYymUzaoZMHMzdiDXXjr7hxoYhb/8Kdf+OkzUJbD1w4nHMv997jxoIrsKxvY2l5ZXVtvbBR3Nza3tk19/ZbKkokZU0aiUh2XKKY4CFrAgfBOrFkJHAFa7ujq8xv3zGpeBTewjhmTkAGIfc5JaClvnnYCwgMXR+nfrkHXHgM35cfKpVJ3yxZVWsKvEjsnJRQjkbf/Op5EU0CFgIVRKmubcXgpEQCp4JNir1EsZjQERmwrqYhCZhy0ukHE3yiFQ/7kdQVAp6qvydSEig1Dlzdmd2r5r1M/M/rJuCfOykP4wRYSGeL/ERgiHAWB/a4ZBTEWBNCJde3YjokklDQoRV1CPb8y4ukdVq1a9WLm1qpfpnHUUBH6BiVkY3OUB1dowZqIooe0TN6RW/Gk/FivBsfs9YlI585QH9gfP4AK46WEQ== < /latexit > < latexit sha1_base64= '' 249iHdhtu7W0+U31BonYLaM+rVg= '' > AAAB+3icjVDLSsNAFL2pr1pfsS7dDBbBVUlEUHdFNy4r2Ac0oUwmk3boZBJmJtIS8ituXCji1h9x5984abtQUfDAhcM593IPJ0g5U9pxPqzKyura+kZ1s7a1vbO7Z+/XuyrJJKEdkvBE9gOsKGeCdjTTnPZTSXEccNoLJtel37unUrFE3OlZSv0YjwSLGMHaSEO77sVYj4MI5Z5mPKRoWgzthtt05kB/kwYs0R7a716YkCymQhOOlRq4Tqr9HEvNCKdFzcsUTTGZ4BEdGCpwTJWfz7MX6NgoIYoSaUZoNFe/XuQ4VmoWB2azTKp+eqX4mzfIdHTh50ykmaaCLB5FGUc6QWURKGSSEs1nhmAimcmKyBhLTLSpq/a/ErqnTfeseXl71mhdLeuowiEcwQm4cA4tuIE2dIDAFB7gCZ6twnq0XqzXxWrFWt4cwDdYb5/eNJRa < /latexit > make their explanations uncomparable to a general user : e.g . the distinct explanations in Fig . 1 describe the same model prediction . Ideally , a set of axioms ( agreed upon or debated ) would constrain the space of explanations , thus leading to a framework of curated methods that the user can choose from based on which axioms are relevant to the application . A further challenge on high-dimensional data is the sheer complexity of an explanation : in the methods described above , explanations have the same dimensionality as the data itself . Moreover , the importance of raw input features ( e.g . pixels ) are not individually meaningful to the user . Even when structured patterns emerge in an explanation ( e.g . in Fig . 1 ) this is not sufficient to answer higher-level questions . For example , did the subject ’ s protected attributes ( e.g . gender , age , or ethnicity ) have any influence on the model ’ s decision ? In this work , we develop methods for explaining predictions in terms of a digestible number of semantically meaningful concepts . We provide several options for transforming from the highdimensional raw features to a lower-dimensional latent space , which allow varying levels of user control . Regardless of the method used , transformation to a low-dimensional human-interpretable basis is a useful step , if explanations are to satisfy experts and non-experts alike . Once a set of semantic latent features is selected , one must choose an explainability algorithm to obtain quantitative information about why a certain model prediction was made . Fortunately , since the set of latent features is low-dimensional by construction , a Shapley-based approach becomes once again viable . In this work , we develop a method to apply Shapley explainability at the level of semantic latent features , thus providing a theoretically-controlled , model-agnostic foundation for explainability on high-dimensional data . Our main contributions are : • We introduce an approach to model explainability on high-dimensional data that involves encoding the raw input features into a digestible number of semantically meaningful latent features . We develop a procedure to apply Shapley explainability in this context , obtaining Shapley values that describe the high-dimensional model ’ s dependence on each semantic latent feature . • We demonstrate 3 methods to extract semantic features for the explanations : Fourier transforms , disentangled representations , and image-to-image translation . We benchmark our approach on dSprites – with known latent space – and showcase its effectiveness in computer vision tasks such as MNIST , CIFAR-10 , ImageNet , Describable Textures , and CelebA . 2 SEMANTIC SHAPLEY EXPLAINABILITY . In this section , we present a simple modular framework for obtaining meaningful low-dimensional explanations of model predictions on high-dimensional data . The framework contains two modules : ( i ) a mechanism for transforming from the high-dimensional space of raw model inputs to a lowdimensional space of semantic latent features , and ( ii ) an algorithm for generating explanations of the model ’ s predictions in terms of these semantic features . See Fig . 2 . We will begin by describing module ( ii ) in Sec . 2.1 , where we will show how to adapt Shapley explainability to latent features . Then we will describe several options for module ( i ) in Sec . 2.2 . 2.1 SHAPLEY VALUES FOR LATENT FEATURES . Shapley values ( Shapley , 1953 ) were developed in cooperative game theory to distribute the value v ( N ) earned by a team N = { 1 , 2 , . . . , n } among its players . The Shapley value φv ( i ) represents the marginal value added by player i upon joining the team , averaged over all orderings in which the team can form . In particular , φv ( i ) = ∑ S⊆N\ { i } |S| ! ( n− |S| − 1 ) ! n ! [ v ( S ∪ { i } ) − v ( S ) ] ( 1 ) where v ( S ) represents the value that a coalition S obtains without the rest of their teammates . Shapley values are the unique attribution method satisfying 4 natural axioms ( Shapley , 1953 ) . For example , they sum to the total value earned : ∑ i φv ( i ) = v ( N ) − v ( { } ) , and they are symmetric if two players i and j are functionally interchangeable : φv ( i ) = φv ( j ) . Shapley values thus serve as a well-founded explanation of an output ( the earned value ) in terms of inputs ( the players ) . The method can be adapted to explain the output of a machine learning model by interpreting the model ’ s input features x = ( x1 , . . . , xn ) as the players of a game . Consider a classification task , and let fy ( x ) be the model ’ s predicted probability that data point x belongs to class y . To apply Shapley explainability , one must define a value function representing the model ’ s expected output given only a subset of the input features xS . The most common choice is vfy ( x ) ( S ) = Ep ( x′ ) [ fy ( xS t x′S̄ ) ] ( 2 ) where p ( x′ ) is the distribution from which the data is drawn , S̄ is the complement of S , and xS tx′S̄ represents the spliced data point with in-coalition features from x and out-of-coalition features from x′ . Then , inserting the value function of Eq . ( 2 ) into the definition of Eq . ( 1 ) , one obtains Shapley values φfy ( x ) ( i ) representing the portion of the prediction fy ( x ) attributable to feature xi . The Shapley values presented above provide a local explanation of the model ’ s behaviour on an individual data point . For a global explanation , local values can be aggregated ( Frye et al. , 2020 ) Φf ( i ) = Ep ( x , y ) [ φfy ( x ) ( i ) ] ( 3 ) where p ( x , y ) is the joint distribution from which the labelled data is drawn . This aggregation preserves the Shapley axioms and is motivated by the sum rule : ∑ i Φf ( i ) = Ep ( x , y ) [ fy ( x ) ] − Ep ( x′ ) p ( y ) [ fy ( x ′ ) ] ( 4 ) which can be interpreted as the model accuracy above a class-balance baseline . Global Shapley values thus represent the portion of model accuracy attributable to each feature . To adapt the Shapley framework to latent features , suppose ( as in Fig . 2 ) that a mapping x → z exists to transform the raw model inputs x into a semantically meaningful representation z ( x ) , and that an ( approximate ) inverse mapping z → x̃ exists as well . Then we can obtain an explanation of the model prediction fy ( x ) in terms of the latent features z ( x ) by applying Shapley explainability instead to the function fy ( x̃ ( z ) ) at the point z = z ( x ) . To be precise , we define a value function ṽfy ( x ) ( S ) = Ep ( x′ ) [ fy ( x̃ ( zS ( x ) t zS̄ ( x′ ) ) ) ] ( 5 ) which represents the marginalisation of fy ( x̃ ( z ) ) over out-of-coalition features zS̄ . Here zS ( x ) is the in-coalition slice of z ( x ) , and zS̄ ( x′ ) is the out-of-coalition slice corresponding to a different data point . These get spliced together in latent space before transforming back to model-input-space and feeding into the model . Inserting the value function of Eq . ( 5 ) into the definition of Eq . ( 1 ) produces semantic Shapley values that explain fy ( x ) in terms of latent features zi . 2.2 LANDSCAPE OF SEMANTIC REPRESENTATIONS . A wide variety of methods exist to transform from the high-dimensional set of raw model inputs to an alternative set of features that offer semantic insight into the data being modelled . In this section , we consider several options for this semantic component of our approach to explainability . | This paper develops a Shapley value approach to explanation that uses low-dimensional latent features to explain the original input. In high-dimensional settings, Shapley values can be computationally intractable; as such, the authors adapt the characteristic (aka value) function $v(\cdot)$ to consider coalitions defined in latent space. This helps ensure that only feasible and plausible (i.e., semantically meaningful) perturbations are made. They consider three different latent encodings: Fourier Transforms, Disentanglement, and image-to-image translation (to isolate factors of variation). | SP:44a4a56c6048b2e7deb16dc106f4552e8f2227b9 |
Towards Robustness Against Natural Language Word Substitutions | 1 INTRODUCTION . Recent extensive studies have shown that deep neural networks ( DNNs ) are vulnerable to adversarial attacks ( Szegedy et al. , 2013 ; Goodfellow et al. , 2015 ; Papernot et al. , 2016a ; Kurakin et al. , 2017 ; Alzantot et al. , 2018 ) ; e.g. , minor phrase modification can easily deceive Google ’ s toxic comment detection systems ( Hosseini et al. , 2017 ) . This raises grand security challenges to advanced natural language processing ( NLP ) systems , such as malware detection and spam filtering , where DNNs have been broadly deployed ( Stringhini et al. , 2010 ; Kolter & Maloof , 2006 ) . As a consequence , the research on defending against natural language adversarial attacks has attracted increasing attention . Existing adversarial attacks in NLP can be categorized into three folds : ( i ) character-level modifications ( Belinkov & Bisk , 2018 ; Gao et al. , 2018 ; Eger et al. , 2019 ) , ( ii ) deleting , adding , or swapping words ( Liang et al. , 2017 ; Jia & Liang , 2017 ; Iyyer et al. , 2018 ) , and ( iii ) word substitutions using semantically similar words ( Alzantot et al. , 2018 ; Ren et al. , 2019 ; Zang et al. , 2020 ) . The first two attack types usually break the grammaticality and naturality of the original input sentences , and thus can be detected by spell or grammar checker ( Pruthi et al. , 2019 ) . In contrast , the third attack type only substitutes words with semantically similar words , thus preserves the syntactic and semantics ∗Corresponding author . 1Our code will be available at https : //github.com/dongxinshuai/ASCC . of the original input to the most considerable extent and are very hard to discern , even from a human ’ s perspective . Therefore , building robustness against such word substitutions is a fundamental stepping stone towards robustness in NLP , which is the focus of this paper . Adversarial attack by word substitution is a combinatorial optimization problem . Solving this problem in the discrete textual space is considered NP-hard as the searching space increases exponentially with the length of the input . As such , many methods have been proposed to model word substitutions in the continuous word vector space ( Sato et al. , 2018 ; Gong et al. , 2018 ; Jia et al. , 2019 ; Huang et al. , 2019 ) , so that they can leverage the gradients generated by a victim model either for attack or robust training . However , previous methods capture word substitutions in the vector space by using either l2-ball or hyper-rectangle , which results in perturbation sets that are not inclusive enough or unnecessarily large , and thus impedes precise mimicry of the worst cases for robust training ( see Fig . 1 for an illustration ) . In this paper , we introduce a novel Adversarial Sparse Convex Combination ( ASCC ) method , whose key idea is to model the solution space as a convex hull of word vectors . Using a convex hull brings two advantages : ( i ) a continuous convex space is beneficial for gradient-based adversary generation , and ( ii ) the convex hull is , by definition , the smallest convex set that contains all substitutions , thus is inclusive enough to cover all possible substitutions while ruling out unnecessary cases . In particular , we leverage a regularization term to encourage adversary towards an actual substitution , which aligns our modeling better with the discrete textual space . We further propose ASCC-defense , which employs the ASCC to generate adversaries and incorporates adversarial training to gain robustness . We evaluate ASCC-defense on two prevailing NLP tasks , i.e. , sentiment analysis on IMDB and natural language inference on SNLI , across four model architectures , concerning two common attack methods . Experimental results show that our method consistently yields models that are more robust than the state-of-the-arts with significant margins ; e.g. , we achieve 79.0 % accuracy under Genetic attacks on IMDB while the state-of-the-art performance is 75.0 % . Besides , our robustly trained word vectors can be easily plugged into standard NLP models and enforce robustness without applying any other defense techniques , which envisions a new class of approach towards NLP robustness . For instance , using our pre-trained word vectors as initialization enhances a normal LSTM model to achieve 73.4 % robust accuracy , while the state-of-the-art defense and the undefended model achieve 72.5 % and 7.9 % , respectively . 2 PRELIMINARIES . 2.1 NOTATIONS AND PROBLEM SETTING . In this paper , we focus on text classification problem to introduce our method , while it can also be extended to other NLP tasks . We assume we are interested in training classifier X → Y that predicts label y ∈ Y given input x ∈ X . The input x is a textual sequence of L words { xi } Li=1 . We consider the most common practice for NLP tasks where the first step is to map x into a sequence of vectors in a low-dimensional embedding space , which is denoted as v ( x ) . The classifier is then formulated as p ( y|v ( x ) ) , where p can be parameterized by using a neural network , e.g. , CNN or LSTM model . We examine the robustness of a model against adversarial word substitutions ( Alzantot et al. , 2018 ; Ren et al. , 2019 ) . Specifically , any word xi in x can be substituted with any word x̂i in S ( xi ) = { S ( xi ) j } Tj=1 , where S ( xi ) represents a predefined substitution set for xi ( including itself ) and T denotes the number of elements in S ( xi ) . To ensure that x̂ is likely to be grammatical and has the same label as x , S ( xi ) is often comprised of semantically similar words of xi , e.g. , its synonyms . Attack algorithms such as Genetic attack ( Alzantot et al. , 2018 ) and PWWS attack ( Ren et al. , 2019 ) aim to find the worst-case x̂ to fool a victim model , whereas our defense methods aim to build robustness against such substitutions . 2.2 PERTURBATION SET AT VECTOR LEVEL . Gradients provide crucial information about a victim model for adversary generation ( Szegedy et al. , 2013 ; Goodfellow et al. , 2015 ) . However , in NLP , the textual input space is neither continuous nor convex , which impedes effective use of gradients . Therefore , previous methods capture perturbations in the vector space instead , by using the following simplexes ( see Fig.1 for an illustration ) : L2-ball with a fixed radius . Miyato et al . ( 2017 ) first introduced adversarial training to NLP tasks . They use a l2-ball with radius to constrain the perturbation , which is formulated as : v̂ ( x ) = v ( x ) + r , s.t . ‖r‖2 ≤ , ( 1 ) where r denotes sequence-level perturbation in the word vector space and v̂ denotes the adversarial sequence of word vectors . While such modeling initially considers l2-ball at the sentence-level , it can also be extended to word-level to capture substitutions . Following that , Sato et al . ( 2018 ) and Barham & Feizi ( 2019 ) propose to additionally consider the directions towards each substitution . However , they still use the l2-ball , which often fails to capture the geometry of substitutions precisely . Axis aligned bounds . Jia et al . ( 2019 ) and Huang et al . ( 2019 ) use axis-aligned bound to capture perturbations at the vector level . They consider the smallest axis-aligned hyper-rectangular that contains all possible substitutions . Such perturbation set provides useful properties for bound propagation towards robustness . However , the volume of the unnecessary space it captures can grow with the depth of the model and grow exponentially with the dimension of the word vector space . Thus it fits shallow architectures but often fails to utilize the capacity of neural networks fully . Besides , instead of fully defining the vector-level geometry of substitutions , Ebrahimi et al . ( 2018 ) propose to find substitutions by first-order approximation using directional gradients . It is effective in bridging the gap between continuous embedding space and discrete textual space . However , it is based on local approximation , which often fails to find global worst cases for robust training . 3 METHODOLOGY . In this section , we first introduce the intuition of using a convex hull to capture substitutions . Then , we propose how Adversarial Sparse Convex Combination ( ASCC ) generates adversaries . Finally , we introduce ASCC-defense that incorporates adversarial training towards robustness . 3.1 OPTIMALITY OF USING CONVEX HULL . From the perspective of adversarial defense , it is crucial to well capture the attack space of word substitutions . There are three aspects we need to consider : ( i ) Inclusiveness : the space should include all vectors of allowed substitutions to cover all possible cases . ( ii ) Exclusiveness : on the basis of satisfying inclusiveness , the space should be as small as possible since a loose set can generate unnecessarily intricate perturbations , which impede a model from learning useful information . ( iii ) Optimization : the space should be convex and continuous to facilitate effective gradient-based optimization , whether the objective function is convex or not ( Bertsekas , 1997 ; Jain & Kar , 2017 ) . Inspired by archetypal analysis ( Cutler & Breiman , 1994 ) , we propose to use a convex hull to build the attack space : the convex hull is a continuous space and , by definition , the minimal convex set containing all vectors of substitutions . We argue that using a convex hull can satisfy all the above aspects ( as illustrated in Fig.1 ) , and thus it is considered as theoretical optimum . 3.2 ADVERSARIAL SPARSE CONVEX COMBINATION . Efficient representation of and optimization over a convex hull . A classical workaround in literature for optimization over a constraint set is the projected gradient descent ( Cauchy , 1847 ; Frank & Wolfe , 1956 ; Bubeck , 2014 ; Madry et al. , 2018 ) . As for optimization over a convex hull , it necessitates characterizing the convex hull , e.g. , by vertexes , to perform projections . However , computing vertexes is computationally unfavorable because we need to recalculate the vertexes whenever word embeddings change , which frequently occurs during the training process . In this paper , we propose a more efficient fashion for optimization over the concerning convex hull , based on the following proposition ( the proof of which lies in the definition of convex hull ) : Proposition 1 . Let S ( u ) = { S ( u ) 1 , ... , S ( u ) T } be the set of all substitutions of word u , convS ( u ) be the convex hull of word vectors of all elements in S ( u ) , and v ( · ) be the word vector function . Then , we have convS ( u ) = { ∑T i=1 wiv ( S ( u ) i ) | ∑T i=1 wi = 1 , wi ≥ 0 } . According to Proposition 1 , we can formulate v̂ ( xi ) , which denotes any vector in the convex hull around v ( xi ) , as : v̂ ( xi ) = ∑T j=1 wijv ( S ( xi ) j ) , s.t . ∑T j=1 wij = 1 , wij ≥ 0 . ( 2 ) As such , we use Eq.2 to transform the original optimization on v̂ ( xi ) to the optimization on wi , the coefficient of convex combination . Considering that wi still belongs to a set with constraint { ‖wi‖1 = 1 , wij ≥ 0 } , to achieve better flexibilities of optimization , we introduce a variable ŵ ∈ R to relax the constraint on w by the following equation : wij = exp ( ŵij ) ∑T j=1 exp ( ŵij ) , ŵij ∈ R. ( 3 ) After such relaxation in Eqs.2 and 3 , we are able to optimize the objective function over the convex hull by optimizing ŵ ∈ R. It provides a projection-free way to generate any adversaries inside the convex hull using gradients. . Gradient-based adversary generation . Let L be a loss function concerning a classifier . We can generate the worst-case convex combinations v̂ ( x ) by finding the worst-case ŵ : max ŵ L ( v ( x ) , v̂ ( x ) , y ) ( 4 ) where L is classification-related , e.g. , the cross-entropy loss over v̂ ( x ) : L ( v ( x ) , v̂ ( x ) , y ) = − log p ( y|v̂ ( x ) ) . ( 5 ) However , since we relax the discrete textual space to a convex hull in the vector space , any wi that ‖wi‖0 > 1 is highly possible to give rise to v̂ ( xi ) that does not correspond to a real substitution . Algorithm 1 ASCC-defense Input : dataset D , parameters of Adam optimizer . Output : parameters θ and φ . 1 : repeat 2 : for random mini-batch ∼ D do 3 : for every x , y in the mini-batch ( in parallel ) do 4 : Solve the inner maximization in Eq.11 to find the optimal ŵ by Adam ; 5 : Compute v̂ ( x ) by Eq.10 using ŵ and then compute the inner-maximum in Eq.11 ; 6 : end for 7 : Update θ and φ by Adam to minimize the calculated inner-maximum ; 8 : end for 9 : until the training converges . To align better with the discrete nature of textual input , we propose to impose a regularizer on the coefficient of convex combination , wi . To be specific , we take wi as a probability distribution and minimize the entropy function of wi to softly encourage the l0 sparsity of wi . We formulate this word-level entropy-based regularization term as : H ( wi ) = ∑T j=1 −wij log ( wij ) . ( 6 ) Combining loss function L and the entropy-based regularizer H , we here formulate Adversarial Sparse Convex Combination ( ASCC ) for adversary generation as : max ŵ L ( v ( x ) , v̂ ( x ) , y ) − α ∑L i=1 1 L H ( wi ) , ( 7 ) where α ≥ 0 is the weight controlling the regularization term ( the effectiveness of which is validated in Sec.4.3 ) . | of the paper*: This paper studies the problem of robustness against word substitutions. The authors propose a novel Adversarial Sparse Convex Combination (ASCC) method in which they model the word substitution attack space as a convex hull and leverages a regularization term to enforce perturbation towards an actual substitution. Based on the ASCC, they also propose ASCC-defense, which leverages ASCC to generate worst-case perturbations and incorporates adversarial training towards robustness. Experimental results show that their method outperforms the existing SOTA on two tasks -- sentiment analysis and natural language inference. | SP:a013c72647ecd00dc627a8e501a8c171a870e3e6 |
Towards Robustness Against Natural Language Word Substitutions | 1 INTRODUCTION . Recent extensive studies have shown that deep neural networks ( DNNs ) are vulnerable to adversarial attacks ( Szegedy et al. , 2013 ; Goodfellow et al. , 2015 ; Papernot et al. , 2016a ; Kurakin et al. , 2017 ; Alzantot et al. , 2018 ) ; e.g. , minor phrase modification can easily deceive Google ’ s toxic comment detection systems ( Hosseini et al. , 2017 ) . This raises grand security challenges to advanced natural language processing ( NLP ) systems , such as malware detection and spam filtering , where DNNs have been broadly deployed ( Stringhini et al. , 2010 ; Kolter & Maloof , 2006 ) . As a consequence , the research on defending against natural language adversarial attacks has attracted increasing attention . Existing adversarial attacks in NLP can be categorized into three folds : ( i ) character-level modifications ( Belinkov & Bisk , 2018 ; Gao et al. , 2018 ; Eger et al. , 2019 ) , ( ii ) deleting , adding , or swapping words ( Liang et al. , 2017 ; Jia & Liang , 2017 ; Iyyer et al. , 2018 ) , and ( iii ) word substitutions using semantically similar words ( Alzantot et al. , 2018 ; Ren et al. , 2019 ; Zang et al. , 2020 ) . The first two attack types usually break the grammaticality and naturality of the original input sentences , and thus can be detected by spell or grammar checker ( Pruthi et al. , 2019 ) . In contrast , the third attack type only substitutes words with semantically similar words , thus preserves the syntactic and semantics ∗Corresponding author . 1Our code will be available at https : //github.com/dongxinshuai/ASCC . of the original input to the most considerable extent and are very hard to discern , even from a human ’ s perspective . Therefore , building robustness against such word substitutions is a fundamental stepping stone towards robustness in NLP , which is the focus of this paper . Adversarial attack by word substitution is a combinatorial optimization problem . Solving this problem in the discrete textual space is considered NP-hard as the searching space increases exponentially with the length of the input . As such , many methods have been proposed to model word substitutions in the continuous word vector space ( Sato et al. , 2018 ; Gong et al. , 2018 ; Jia et al. , 2019 ; Huang et al. , 2019 ) , so that they can leverage the gradients generated by a victim model either for attack or robust training . However , previous methods capture word substitutions in the vector space by using either l2-ball or hyper-rectangle , which results in perturbation sets that are not inclusive enough or unnecessarily large , and thus impedes precise mimicry of the worst cases for robust training ( see Fig . 1 for an illustration ) . In this paper , we introduce a novel Adversarial Sparse Convex Combination ( ASCC ) method , whose key idea is to model the solution space as a convex hull of word vectors . Using a convex hull brings two advantages : ( i ) a continuous convex space is beneficial for gradient-based adversary generation , and ( ii ) the convex hull is , by definition , the smallest convex set that contains all substitutions , thus is inclusive enough to cover all possible substitutions while ruling out unnecessary cases . In particular , we leverage a regularization term to encourage adversary towards an actual substitution , which aligns our modeling better with the discrete textual space . We further propose ASCC-defense , which employs the ASCC to generate adversaries and incorporates adversarial training to gain robustness . We evaluate ASCC-defense on two prevailing NLP tasks , i.e. , sentiment analysis on IMDB and natural language inference on SNLI , across four model architectures , concerning two common attack methods . Experimental results show that our method consistently yields models that are more robust than the state-of-the-arts with significant margins ; e.g. , we achieve 79.0 % accuracy under Genetic attacks on IMDB while the state-of-the-art performance is 75.0 % . Besides , our robustly trained word vectors can be easily plugged into standard NLP models and enforce robustness without applying any other defense techniques , which envisions a new class of approach towards NLP robustness . For instance , using our pre-trained word vectors as initialization enhances a normal LSTM model to achieve 73.4 % robust accuracy , while the state-of-the-art defense and the undefended model achieve 72.5 % and 7.9 % , respectively . 2 PRELIMINARIES . 2.1 NOTATIONS AND PROBLEM SETTING . In this paper , we focus on text classification problem to introduce our method , while it can also be extended to other NLP tasks . We assume we are interested in training classifier X → Y that predicts label y ∈ Y given input x ∈ X . The input x is a textual sequence of L words { xi } Li=1 . We consider the most common practice for NLP tasks where the first step is to map x into a sequence of vectors in a low-dimensional embedding space , which is denoted as v ( x ) . The classifier is then formulated as p ( y|v ( x ) ) , where p can be parameterized by using a neural network , e.g. , CNN or LSTM model . We examine the robustness of a model against adversarial word substitutions ( Alzantot et al. , 2018 ; Ren et al. , 2019 ) . Specifically , any word xi in x can be substituted with any word x̂i in S ( xi ) = { S ( xi ) j } Tj=1 , where S ( xi ) represents a predefined substitution set for xi ( including itself ) and T denotes the number of elements in S ( xi ) . To ensure that x̂ is likely to be grammatical and has the same label as x , S ( xi ) is often comprised of semantically similar words of xi , e.g. , its synonyms . Attack algorithms such as Genetic attack ( Alzantot et al. , 2018 ) and PWWS attack ( Ren et al. , 2019 ) aim to find the worst-case x̂ to fool a victim model , whereas our defense methods aim to build robustness against such substitutions . 2.2 PERTURBATION SET AT VECTOR LEVEL . Gradients provide crucial information about a victim model for adversary generation ( Szegedy et al. , 2013 ; Goodfellow et al. , 2015 ) . However , in NLP , the textual input space is neither continuous nor convex , which impedes effective use of gradients . Therefore , previous methods capture perturbations in the vector space instead , by using the following simplexes ( see Fig.1 for an illustration ) : L2-ball with a fixed radius . Miyato et al . ( 2017 ) first introduced adversarial training to NLP tasks . They use a l2-ball with radius to constrain the perturbation , which is formulated as : v̂ ( x ) = v ( x ) + r , s.t . ‖r‖2 ≤ , ( 1 ) where r denotes sequence-level perturbation in the word vector space and v̂ denotes the adversarial sequence of word vectors . While such modeling initially considers l2-ball at the sentence-level , it can also be extended to word-level to capture substitutions . Following that , Sato et al . ( 2018 ) and Barham & Feizi ( 2019 ) propose to additionally consider the directions towards each substitution . However , they still use the l2-ball , which often fails to capture the geometry of substitutions precisely . Axis aligned bounds . Jia et al . ( 2019 ) and Huang et al . ( 2019 ) use axis-aligned bound to capture perturbations at the vector level . They consider the smallest axis-aligned hyper-rectangular that contains all possible substitutions . Such perturbation set provides useful properties for bound propagation towards robustness . However , the volume of the unnecessary space it captures can grow with the depth of the model and grow exponentially with the dimension of the word vector space . Thus it fits shallow architectures but often fails to utilize the capacity of neural networks fully . Besides , instead of fully defining the vector-level geometry of substitutions , Ebrahimi et al . ( 2018 ) propose to find substitutions by first-order approximation using directional gradients . It is effective in bridging the gap between continuous embedding space and discrete textual space . However , it is based on local approximation , which often fails to find global worst cases for robust training . 3 METHODOLOGY . In this section , we first introduce the intuition of using a convex hull to capture substitutions . Then , we propose how Adversarial Sparse Convex Combination ( ASCC ) generates adversaries . Finally , we introduce ASCC-defense that incorporates adversarial training towards robustness . 3.1 OPTIMALITY OF USING CONVEX HULL . From the perspective of adversarial defense , it is crucial to well capture the attack space of word substitutions . There are three aspects we need to consider : ( i ) Inclusiveness : the space should include all vectors of allowed substitutions to cover all possible cases . ( ii ) Exclusiveness : on the basis of satisfying inclusiveness , the space should be as small as possible since a loose set can generate unnecessarily intricate perturbations , which impede a model from learning useful information . ( iii ) Optimization : the space should be convex and continuous to facilitate effective gradient-based optimization , whether the objective function is convex or not ( Bertsekas , 1997 ; Jain & Kar , 2017 ) . Inspired by archetypal analysis ( Cutler & Breiman , 1994 ) , we propose to use a convex hull to build the attack space : the convex hull is a continuous space and , by definition , the minimal convex set containing all vectors of substitutions . We argue that using a convex hull can satisfy all the above aspects ( as illustrated in Fig.1 ) , and thus it is considered as theoretical optimum . 3.2 ADVERSARIAL SPARSE CONVEX COMBINATION . Efficient representation of and optimization over a convex hull . A classical workaround in literature for optimization over a constraint set is the projected gradient descent ( Cauchy , 1847 ; Frank & Wolfe , 1956 ; Bubeck , 2014 ; Madry et al. , 2018 ) . As for optimization over a convex hull , it necessitates characterizing the convex hull , e.g. , by vertexes , to perform projections . However , computing vertexes is computationally unfavorable because we need to recalculate the vertexes whenever word embeddings change , which frequently occurs during the training process . In this paper , we propose a more efficient fashion for optimization over the concerning convex hull , based on the following proposition ( the proof of which lies in the definition of convex hull ) : Proposition 1 . Let S ( u ) = { S ( u ) 1 , ... , S ( u ) T } be the set of all substitutions of word u , convS ( u ) be the convex hull of word vectors of all elements in S ( u ) , and v ( · ) be the word vector function . Then , we have convS ( u ) = { ∑T i=1 wiv ( S ( u ) i ) | ∑T i=1 wi = 1 , wi ≥ 0 } . According to Proposition 1 , we can formulate v̂ ( xi ) , which denotes any vector in the convex hull around v ( xi ) , as : v̂ ( xi ) = ∑T j=1 wijv ( S ( xi ) j ) , s.t . ∑T j=1 wij = 1 , wij ≥ 0 . ( 2 ) As such , we use Eq.2 to transform the original optimization on v̂ ( xi ) to the optimization on wi , the coefficient of convex combination . Considering that wi still belongs to a set with constraint { ‖wi‖1 = 1 , wij ≥ 0 } , to achieve better flexibilities of optimization , we introduce a variable ŵ ∈ R to relax the constraint on w by the following equation : wij = exp ( ŵij ) ∑T j=1 exp ( ŵij ) , ŵij ∈ R. ( 3 ) After such relaxation in Eqs.2 and 3 , we are able to optimize the objective function over the convex hull by optimizing ŵ ∈ R. It provides a projection-free way to generate any adversaries inside the convex hull using gradients. . Gradient-based adversary generation . Let L be a loss function concerning a classifier . We can generate the worst-case convex combinations v̂ ( x ) by finding the worst-case ŵ : max ŵ L ( v ( x ) , v̂ ( x ) , y ) ( 4 ) where L is classification-related , e.g. , the cross-entropy loss over v̂ ( x ) : L ( v ( x ) , v̂ ( x ) , y ) = − log p ( y|v̂ ( x ) ) . ( 5 ) However , since we relax the discrete textual space to a convex hull in the vector space , any wi that ‖wi‖0 > 1 is highly possible to give rise to v̂ ( xi ) that does not correspond to a real substitution . Algorithm 1 ASCC-defense Input : dataset D , parameters of Adam optimizer . Output : parameters θ and φ . 1 : repeat 2 : for random mini-batch ∼ D do 3 : for every x , y in the mini-batch ( in parallel ) do 4 : Solve the inner maximization in Eq.11 to find the optimal ŵ by Adam ; 5 : Compute v̂ ( x ) by Eq.10 using ŵ and then compute the inner-maximum in Eq.11 ; 6 : end for 7 : Update θ and φ by Adam to minimize the calculated inner-maximum ; 8 : end for 9 : until the training converges . To align better with the discrete nature of textual input , we propose to impose a regularizer on the coefficient of convex combination , wi . To be specific , we take wi as a probability distribution and minimize the entropy function of wi to softly encourage the l0 sparsity of wi . We formulate this word-level entropy-based regularization term as : H ( wi ) = ∑T j=1 −wij log ( wij ) . ( 6 ) Combining loss function L and the entropy-based regularizer H , we here formulate Adversarial Sparse Convex Combination ( ASCC ) for adversary generation as : max ŵ L ( v ( x ) , v̂ ( x ) , y ) − α ∑L i=1 1 L H ( wi ) , ( 7 ) where α ≥ 0 is the weight controlling the regularization term ( the effectiveness of which is validated in Sec.4.3 ) . | In this paper, the authors aim to build a robust model against word substitution attacks. Unlike previous work, they consider a convex hull as the perturbation region instead of a norm-ball or a hyper-rectangle. From their derivation, perturbed words can be viewed as the linear combinations of substitutions and perturbations can be viewed as the corresponding normalized weights. Therefore, they can adversarially train the perturbations and model to obtain a robust model and robust word embeddings. The authors also design a regularizer to encourage the sparsity on perturbation weights. The experimental results show that the proposed model is indeed more robust than other baselines. In addition, they show that the learned word embedding can be a good initialization for training robust models. | SP:a013c72647ecd00dc627a8e501a8c171a870e3e6 |
Attention-Based Clustering: Learning a Kernel from Context | 1 INTRODUCTION . Many problems in machine learning involve modelling the relations between elements of a set . A notable example , and the focus of this paper , is clustering , in which the elements are grouped according to some shared properties . A common approach uses kernel methods : a class of algorithms that operate on pairwise similarities , which are obtained by evaluating a specific kernel function ( Filippone et al. , 2008 ) . However , for data points that are not trivially comparable , specifying the kernel function is not straightforward . With the advent of deep learning , this gave rise to metric learning frameworks where a parameterized binary operator , either explicitly or implicitly , is taught from examples how to measure the distance between two data points ( Bromley et al. , 1993 ; Koch et al. , 2015 ; Zagoruyko & Komodakis , 2015 ; Hsu et al. , 2018 ; Wojke & Bewley , 2018 ; Hsu et al. , 2019 ) . These cases operate on the assumption that there exists a global metric , that is , the distance between points depends solely on the two operands . This assumption disregards situations where the underlying metric is contextual , by which we mean that the distance between two data points may depend on some structure of the entire dataset . We hypothesize that the context provided by a set of data points can be helpful in measuring the distance between any two data points in the set . As an example of where context might help , consider the task of clustering characters that belong to the same language . There are languages , like Latin and Greek , that share certain characters , for example the Latin T and the Greek upper case τ .1 However , given two sentences , one from the Aeneid and one from the Odyssey , we should have less trouble clustering the same character in both languages correctly due to the context , even when ignoring any structure or meaning derived from the sentences themselves . Indeed , a human performing this task will not need to rely on prior knowledge of the stories of Aeneas or Odysseus , nor on literacy in Latin or Ancient Greek . As a larger principle , it is well recognized that humans perceive emergent properties in configurations of objects , as documented in the Gestalt Laws of Perceptual Organization ( Palmer , 1999 , Chapter 2 ) . We introduce Attention-Based Clustering ( ABC ) which uses context to output pairwise similarities between the data points in the input set . Like other approaches in the literature ( Hsu et al. , 2018 ; 2019 ; Han et al. , 2019 ; Lee et al. , 2019b ) , our model is trained with ground-truth labels in the form of pairwise constraints , but in contrast to other methods , ours can be used with an unsupervised clustering method to obtain cluster labels . To demonstrate the benefit of using ABC over pairwise 1To the extend that there is not even a LaTeX command \Tau metric learning methods , we propose a clustering problem that requires the use of properties emerging from the entire input set in order to be solved . The task is to cluster a set of points that lie on a number of intersecting circles , which is a generalization of the Olympic circles problem ( Anand et al. , 2014 ) . Pairwise kernel methods for clustering perform poorly on the circles problem , whereas our ABC handles it with ease , as displayed in Figure 1 . We use the circles dataset for an ablation study in Section 6.1 . In recent years , numerous deep neural network architectures have been proposed for clustering ( Xie et al. , 2016 ; Min et al. , 2018 ) . The idea of using more than pairwise interactions between elements of an input set in order to improve clustering has been pursued recently in Lee et al . ( 2019a ; b ) , and is motivated by the problem of amortized clustering ( Gershman & Goodman , 2014 ; Stuhlmüller et al. , 2013 ) . Our architecture is inspired by the Transformer ( Vaswani et al. , 2017 ) , which was used by Lee et al . ( 2019a ) as the Set Transformer to improve clustering ( Lee et al. , 2019b ) . We inherit its benefits such as being equivariant under permutations as well as agnostic to input size . However , our approach is motivated by the use of context to improve metric learning , giving us a model that is moreover agnostic to the number of clusters in the sense that neither a prediction nor a bound on the number of clusters needs to be specified for the architecture definition . We also provide theoretical evidence that the Transformer architecture is effective for metric learning and clustering , and to our knowledge , are the first to do so . The idea of using deep metric learning to improve clustering has been pursued in Koch et al . ( 2015 ) ; Zagoruyko & Komodakis ( 2015 ) ; Hsu et al . ( 2018 ; 2019 ) ; Han et al . ( 2019 ) , but without considering the use of context . We use ground-truth labels , only in the form of pairwise constraints , to train a similarity kernel , making our approach an example of constrained clustering . These algorithms are often categorized by whether they use the constraints to only learn a metric or to also generate cluster labels ( Hsu et al. , 2018 ) . Our architecture belongs to the former category , where we only use the constraints to learn a metric and rely on an unconstrained clustering process to obtain cluster labels . Despite this , we achieve nearly state-of-the-art clustering results on the Omniglot , embedded ImageNet , and CIFAR-100 datasets , comparable to sophisticated methods that synthesize clusters , either using the constraints ( Hsu et al. , 2018 ; 2019 ; Han et al. , 2019 ) or otherwise ( Lee et al. , 2019a ; b ) . Our main contributions are : • ABC incorporates context in a general and flexible manner to improve metric learning for clustering . Our competitive results on Omniglot , embedded ImageNet , and CIFAR-100 , as well as our ablation study on our circles dataset provide support for the use of context in metric learning algorithms . • We provide theoretical evidence of why the self-attention module in the Transformer architecture is well suited for clustering , justifying its effectiveness for this task . 2 RELATED WORKS . Our method is similar to a line of research where a distance metric , rather than a similarity score , is learned in a supervised manner , which can then be used as input to off-the-shelf clustering methods ( Xing et al. , 2003 ; Shalev-Shwartz et al. , 2004 ; Davis et al. , 2007 ) . Only certain classes of distances , such as the Mahalanobis distance , are learned . In general , deep neural nets offer the ability to learn a more general class of distances , and have been used to learn a pairwise metric in numerous works ( Zagoruyko & Komodakis , 2015 ; Hsu et al. , 2018 ; Wojke & Bewley , 2018 ; Hsu et al. , 2019 ) , most notably in the Siamese network ( Bromley et al. , 1993 ; Koch et al. , 2015 ) . The idea of using contextual information has not been explored in any of these papers . Many models go further than metric learning by also learning how to synthesize clusters . An example of constrained clustering can be found in Anand et al . ( 2014 ) ; Amid et al . ( 2015 ) , where pairwise constraints are used to transform a predefined kernel in an iterative manner , which is used in a kernel mean shift clustering algorithm . Constrained clustering algorithms have been implemented using deep neural nets as well . In Hsu et al . ( 2018 ; 2019 ) , the authors train a similarity metric and transfer learning to a secondary clustering model . Both models are trained using only pairwise constraints , and any available context information remains unused in both components of their architecture . In Han et al . ( 2019 ) , a constrained clusterer inspired by the deep embedded clustering idea ( Xie et al. , 2016 ) is proposed , along with a number of best practices such as temporal ensembling and consistency constraints in the loss function . These techniques are fairly generic and can perhaps be applied to any other clustering algorithm to improve its results . Their model generates clusters by slowly annealing them , requiring optimization and back-propagation even at test time . The models from Hsu et al . ( 2018 ) and Hsu et al . ( 2019 ) also have this requirement . This may not be feasible during deployment . A more detailed discussion of the differences between our approach and that of Lee et al . ( 2019a ; b ) is in order . The Set Transformer architecture ( Lee et al. , 2019a ) uses the Transformer as a contextual encoder , followed by a pooling layer that uses a fixed number of seed vectors as queries . This architecture is used to cluster a mixture of Gaussians , but is less flexible than ours for two reasons : it requires the number of clusters in advance in setting the number of seed vectors , and those seed vectors being learned makes their approach less adaptable to unseen classes . The first limitation is addressed in a follow-up paper ( Lee et al. , 2019b ) , with the use of an iterated process to filter out clusters and a stopping condition . Our architecture , due to its use of metric learning in place of the pooling layer with learned seed vectors , is inductive and better suited to handle new classes . We also present a mathematical justification for the use of the Transformer in clustering applications . Lastly , Lee et al . ( 2019a ) contains no clustering results on real-world data . Lee et al . ( 2019b ) does and our results on embedded ImageNet are similar , while ours on Omniglot are significantly better . 3 BACKGROUND . Taking inspiration from kernel methods , we aim to compute a similarity matrix from a sequence of data points . Our architecture is inspired by ideas from two streams : the metric learning literature and the Siamese network ( Bromley et al. , 1993 ; Koch et al. , 2015 ) on how to learn compatibility scores , and the Transformer architecture ( Vaswani et al. , 2017 ) and the Set Transformer ( Lee et al. , 2019a ) on how to use context to make decisions . We discuss a few concepts from the literature which will form building blocks of our architecture in the next section . 3.1 COMPATIBILITY . In this section we introduce some compatibility functions which compute a similarity score between two vector arguments , called the query and key respectively . We present the forms of compatibility used in this paper in Table 1 and for both of these forms , keys and queries are required to have equal dimension d. In Siamese Networks ( Koch et al. , 2015 ) , compatibility between two input images is measured by the sigmoid of a weighted L1-distance between representations of the input . This can be seen as a special case of additive compatibility above . The Transformer ( Vaswani et al. , 2017 ) and Set Transformer ( Lee et al. , 2019a ; b ) make use of multiplicative compatibility . | This paper proposes a method for producing representations for clustering that take into account global trends in the dataset, rather than considering each pair of instances in isolation. They claim to achieve competitive clustering performance on omniglot, which they attribute to the use of these contextualised embeddings. They also present a theoretical justification for using transformers in metric learning | SP:e5bd789648c97f1c8836ec1e574f644e04a1c7da |
Attention-Based Clustering: Learning a Kernel from Context | 1 INTRODUCTION . Many problems in machine learning involve modelling the relations between elements of a set . A notable example , and the focus of this paper , is clustering , in which the elements are grouped according to some shared properties . A common approach uses kernel methods : a class of algorithms that operate on pairwise similarities , which are obtained by evaluating a specific kernel function ( Filippone et al. , 2008 ) . However , for data points that are not trivially comparable , specifying the kernel function is not straightforward . With the advent of deep learning , this gave rise to metric learning frameworks where a parameterized binary operator , either explicitly or implicitly , is taught from examples how to measure the distance between two data points ( Bromley et al. , 1993 ; Koch et al. , 2015 ; Zagoruyko & Komodakis , 2015 ; Hsu et al. , 2018 ; Wojke & Bewley , 2018 ; Hsu et al. , 2019 ) . These cases operate on the assumption that there exists a global metric , that is , the distance between points depends solely on the two operands . This assumption disregards situations where the underlying metric is contextual , by which we mean that the distance between two data points may depend on some structure of the entire dataset . We hypothesize that the context provided by a set of data points can be helpful in measuring the distance between any two data points in the set . As an example of where context might help , consider the task of clustering characters that belong to the same language . There are languages , like Latin and Greek , that share certain characters , for example the Latin T and the Greek upper case τ .1 However , given two sentences , one from the Aeneid and one from the Odyssey , we should have less trouble clustering the same character in both languages correctly due to the context , even when ignoring any structure or meaning derived from the sentences themselves . Indeed , a human performing this task will not need to rely on prior knowledge of the stories of Aeneas or Odysseus , nor on literacy in Latin or Ancient Greek . As a larger principle , it is well recognized that humans perceive emergent properties in configurations of objects , as documented in the Gestalt Laws of Perceptual Organization ( Palmer , 1999 , Chapter 2 ) . We introduce Attention-Based Clustering ( ABC ) which uses context to output pairwise similarities between the data points in the input set . Like other approaches in the literature ( Hsu et al. , 2018 ; 2019 ; Han et al. , 2019 ; Lee et al. , 2019b ) , our model is trained with ground-truth labels in the form of pairwise constraints , but in contrast to other methods , ours can be used with an unsupervised clustering method to obtain cluster labels . To demonstrate the benefit of using ABC over pairwise 1To the extend that there is not even a LaTeX command \Tau metric learning methods , we propose a clustering problem that requires the use of properties emerging from the entire input set in order to be solved . The task is to cluster a set of points that lie on a number of intersecting circles , which is a generalization of the Olympic circles problem ( Anand et al. , 2014 ) . Pairwise kernel methods for clustering perform poorly on the circles problem , whereas our ABC handles it with ease , as displayed in Figure 1 . We use the circles dataset for an ablation study in Section 6.1 . In recent years , numerous deep neural network architectures have been proposed for clustering ( Xie et al. , 2016 ; Min et al. , 2018 ) . The idea of using more than pairwise interactions between elements of an input set in order to improve clustering has been pursued recently in Lee et al . ( 2019a ; b ) , and is motivated by the problem of amortized clustering ( Gershman & Goodman , 2014 ; Stuhlmüller et al. , 2013 ) . Our architecture is inspired by the Transformer ( Vaswani et al. , 2017 ) , which was used by Lee et al . ( 2019a ) as the Set Transformer to improve clustering ( Lee et al. , 2019b ) . We inherit its benefits such as being equivariant under permutations as well as agnostic to input size . However , our approach is motivated by the use of context to improve metric learning , giving us a model that is moreover agnostic to the number of clusters in the sense that neither a prediction nor a bound on the number of clusters needs to be specified for the architecture definition . We also provide theoretical evidence that the Transformer architecture is effective for metric learning and clustering , and to our knowledge , are the first to do so . The idea of using deep metric learning to improve clustering has been pursued in Koch et al . ( 2015 ) ; Zagoruyko & Komodakis ( 2015 ) ; Hsu et al . ( 2018 ; 2019 ) ; Han et al . ( 2019 ) , but without considering the use of context . We use ground-truth labels , only in the form of pairwise constraints , to train a similarity kernel , making our approach an example of constrained clustering . These algorithms are often categorized by whether they use the constraints to only learn a metric or to also generate cluster labels ( Hsu et al. , 2018 ) . Our architecture belongs to the former category , where we only use the constraints to learn a metric and rely on an unconstrained clustering process to obtain cluster labels . Despite this , we achieve nearly state-of-the-art clustering results on the Omniglot , embedded ImageNet , and CIFAR-100 datasets , comparable to sophisticated methods that synthesize clusters , either using the constraints ( Hsu et al. , 2018 ; 2019 ; Han et al. , 2019 ) or otherwise ( Lee et al. , 2019a ; b ) . Our main contributions are : • ABC incorporates context in a general and flexible manner to improve metric learning for clustering . Our competitive results on Omniglot , embedded ImageNet , and CIFAR-100 , as well as our ablation study on our circles dataset provide support for the use of context in metric learning algorithms . • We provide theoretical evidence of why the self-attention module in the Transformer architecture is well suited for clustering , justifying its effectiveness for this task . 2 RELATED WORKS . Our method is similar to a line of research where a distance metric , rather than a similarity score , is learned in a supervised manner , which can then be used as input to off-the-shelf clustering methods ( Xing et al. , 2003 ; Shalev-Shwartz et al. , 2004 ; Davis et al. , 2007 ) . Only certain classes of distances , such as the Mahalanobis distance , are learned . In general , deep neural nets offer the ability to learn a more general class of distances , and have been used to learn a pairwise metric in numerous works ( Zagoruyko & Komodakis , 2015 ; Hsu et al. , 2018 ; Wojke & Bewley , 2018 ; Hsu et al. , 2019 ) , most notably in the Siamese network ( Bromley et al. , 1993 ; Koch et al. , 2015 ) . The idea of using contextual information has not been explored in any of these papers . Many models go further than metric learning by also learning how to synthesize clusters . An example of constrained clustering can be found in Anand et al . ( 2014 ) ; Amid et al . ( 2015 ) , where pairwise constraints are used to transform a predefined kernel in an iterative manner , which is used in a kernel mean shift clustering algorithm . Constrained clustering algorithms have been implemented using deep neural nets as well . In Hsu et al . ( 2018 ; 2019 ) , the authors train a similarity metric and transfer learning to a secondary clustering model . Both models are trained using only pairwise constraints , and any available context information remains unused in both components of their architecture . In Han et al . ( 2019 ) , a constrained clusterer inspired by the deep embedded clustering idea ( Xie et al. , 2016 ) is proposed , along with a number of best practices such as temporal ensembling and consistency constraints in the loss function . These techniques are fairly generic and can perhaps be applied to any other clustering algorithm to improve its results . Their model generates clusters by slowly annealing them , requiring optimization and back-propagation even at test time . The models from Hsu et al . ( 2018 ) and Hsu et al . ( 2019 ) also have this requirement . This may not be feasible during deployment . A more detailed discussion of the differences between our approach and that of Lee et al . ( 2019a ; b ) is in order . The Set Transformer architecture ( Lee et al. , 2019a ) uses the Transformer as a contextual encoder , followed by a pooling layer that uses a fixed number of seed vectors as queries . This architecture is used to cluster a mixture of Gaussians , but is less flexible than ours for two reasons : it requires the number of clusters in advance in setting the number of seed vectors , and those seed vectors being learned makes their approach less adaptable to unseen classes . The first limitation is addressed in a follow-up paper ( Lee et al. , 2019b ) , with the use of an iterated process to filter out clusters and a stopping condition . Our architecture , due to its use of metric learning in place of the pooling layer with learned seed vectors , is inductive and better suited to handle new classes . We also present a mathematical justification for the use of the Transformer in clustering applications . Lastly , Lee et al . ( 2019a ) contains no clustering results on real-world data . Lee et al . ( 2019b ) does and our results on embedded ImageNet are similar , while ours on Omniglot are significantly better . 3 BACKGROUND . Taking inspiration from kernel methods , we aim to compute a similarity matrix from a sequence of data points . Our architecture is inspired by ideas from two streams : the metric learning literature and the Siamese network ( Bromley et al. , 1993 ; Koch et al. , 2015 ) on how to learn compatibility scores , and the Transformer architecture ( Vaswani et al. , 2017 ) and the Set Transformer ( Lee et al. , 2019a ) on how to use context to make decisions . We discuss a few concepts from the literature which will form building blocks of our architecture in the next section . 3.1 COMPATIBILITY . In this section we introduce some compatibility functions which compute a similarity score between two vector arguments , called the query and key respectively . We present the forms of compatibility used in this paper in Table 1 and for both of these forms , keys and queries are required to have equal dimension d. In Siamese Networks ( Koch et al. , 2015 ) , compatibility between two input images is measured by the sigmoid of a weighted L1-distance between representations of the input . This can be seen as a special case of additive compatibility above . The Transformer ( Vaswani et al. , 2017 ) and Set Transformer ( Lee et al. , 2019a ; b ) make use of multiplicative compatibility . | The hypothesis of this paper is that learning a contextual metric (allowing pairwise distances to depend on the data) can improves clustering, and is motivated by two examples (Omniglot, intersecting circles). The paper proposes a new method - Attention based clustering (ABC) that incorporates context to learn a metric in the form of an embedding and kernel similarity layer (predefined). The embedding layer uses repeated self attention blocks (SABs) from the transformer architecture and is theoretically shown to make the clusters more condensed. An off-the-shelf clustering algorithm (e.g. spectral clustering) is used to cluster the similarity matrix (number of clusters pre-specified or inferred). The experiments show favorable results on the toy dataset and are competitive with methods that use a prespecified clustering. | SP:e5bd789648c97f1c8836ec1e574f644e04a1c7da |
Predicting Inductive Biases of Pre-Trained Models | 1 INTRODUCTION . Large pre-trained language models ( LMs ) ( Devlin et al. , 2019 ; Raffel et al. , 2020 ; Brown et al. , 2020 ) have demonstrated impressive empirical success on a range of benchmark NLP tasks . However , analyses have shown that such models are easily fooled when tested on distributions that differ from those they were trained on , suggesting they are often “ right for the wrong reasons ” ( McCoy et al. , 2019 ) . Recent research which attempts to understand why such models behave in this way has primarily made use of two analysis techniques : probing classifiers ( Adi et al. , 2017 ; Hupkes et al. , 2018 ) , which measure whether or not a given feature is encoded by a representation , and challenge sets ( Cooper et al. , 1996 ; Linzen et al. , 2016 ; Rudinger et al. , 2018 ) , which measure whether model behavior in practice is consistent with use of a given feature . The results obtained via these two techniques currently suggest different conclusions about how well pre-trained representations encode language . Work based on probing classifiers has consistently found evidence that models contain rich information about syntactic structure ( Hewitt & Manning , 2019 ; Bau et al. , 2019 ; Tenney et al. , 2019a ) , while work using challenge sets has frequently revealed that models built on top of these representations do not behave as though they have access to such rich features , rather they fail in trivial ways ( Dasgupta et al. , 2018 ; Glockner et al. , 2018 ; Naik et al. , 2018 ) . In this work , we attempt to link these two contrasting views of feature representations . We assume the standard recipe in NLP , in which linguistic representations are first derived from large-scale selfsupervised pre-training intended to encode broadly-useful linguistic features , and then are adapted for a task of interest via transfer learning , or fine-tuning , on a task-specific dataset . We test the hypothesis that the extent to which a fine-tuned model uses a given feature can be explained as a function of two metrics : The extractability of the feature after pre-training ( as measured by probing classifiers ) and the evidence available during fine-tuning ( defined as the rate of co-occurrence with the label ) . We first show results on a synthetic task , and second using state-of-the-art pre-trained LMs on language data . Our results suggest that probing classifiers can be viewed as a measure of the pre-trained representation ’ s inductive biases : The more extractable a feature is after pre-training , the less statistical evidence is required in order for the model to adopt the feature during fine-tuning . Contribution . This work establishes a relationship between two widely-used techniques for analyzing LMs . Currently , the question of how models ’ internal representations ( measured by probing classifiers ) influence model behavior ( measured by challenge sets ) remains open ( Belinkov & Glass , 2019 ; Belinkov et al. , 2020 ) . Understanding the connection between these two measurement techniques can enable more principled evaluation of and control over neural NLP models . 2 SETUP AND TERMINOLOGY . 2.1 FORMULATION . Our motivation comes from McCoy et al . ( 2019 ) , which demonstrated that , when fine-tuned on a natural language inference task ( Williams et al. , 2018 , MNLI ) , a model based on a state-of-the-art pre-trained LM ( Devlin et al. , 2019 , BERT ) categorically fails on test examples which defy the expectation of a “ lexical overlap heuristic ” . For example , the model assumes that the sentence “ the lawyer followed the judge ” entails “ the judge followed the lawyer ” purely because all the words in the latter appear in the former . While this heuristic is statistically favorable given the model ’ s training data , it is not infallible . Specifically , McCoy et al . ( 2019 ) report that 90 % of the training examples containing lexical overlap had the label “ entailment ” , but the remaining 10 % did not . Moreover , the results of recent studies based on probing classifiers suggest that more robust features are extractable with high reliability from BERT representations . For example , given the example “ the lawyer followed the judge ” / “ the judge followed the lawyer ” , if the model can represent that “ lawyer ” is the agent of “ follow ” in the first sentence , but is the patient in the second , then the model should conclude that the sentences have different meanings . Such semantic role information can be recovered at > 90 % accuracy from BERT embeddings ( Tenney et al. , 2019b ) . Thus , the question is : Why would a model prefer a weak feature over a stronger one , if both features are extractable from the model ’ s representations and justified by the model ’ s training data ? Abstracting over details , we distill the basic NLP task setting described above into the following , to be formalized in the Section 2.2 . We assume a binary sequence classification task where a target feature t perfectly predicts the label ( e.g. , the label is 1 iff t holds ) . Here , t represents features which actually determine the label by definition , e.g. , whether one sentence semantically entails another . Additionally , there exists a spurious feature s that frequently co-occurs with t in training but is not guaranteed to generalize outside of the training set . Here , s ( often called a “ heuristic ” or “ bias ” elsewhere in the literature ) corresponds to features like lexical overlap , which are predictive of the label in some datasets but are not guaranteed to generalize . Assumptions . In this work , we assume there is a single t and a single s ; in practice there may be many s features . Still , our definition of a feature accommodates multiple spurious or target features . In fact , some of our spurious features already encompass multiple features : the lexical feature , for example , is a combination of several individual-word features because it holds if one of a set of words is in the sentence . This type of spurious feature is common in real datasets : E.g. , the hypothesis-only baseline in NLI is a disjunction of lexical features ( with semantically unrelated words like “ no ” , “ sleeping ” , etc . ) ( Poliak et al. , 2018b ; Gururangan et al. , 2018 ) . We assume that s and t frequently co-occur , but that only s occurs in isolation . This assumption reflects realistic NLP task settings since datasets always contain some heuristics , e.g. , lexical cues , cultural biases , or artifacts from crowdsourcing ( Gururangan et al. , 2018 ) . Thus , our experiments focus on manipulating the occurrence of s alone , but not t alone : This means giving the model evidence against relying on s. This is in line with prior applied work that attempts to influence model behavior by increasing the evidence against s during training ( Elkahky et al. , 2018 ; Zmigrod et al. , 2019 ; Min et al. , 2020 ) . Published as a conference paper at ICLR 2021 2.2 DEFINITIONS . Let X be the set of all sentences and S be the space of all sentence-label pairs ( x , y ) ∈ X × { 0 , 1 } . We use D ⊂ S to denote a particular training sample drawn from S. We define two types of binary features : target ( t ) and spurious ( s ) . Each is a function from sentences x ∈ X to a binary label { 0 , 1 } that indicates whether the feature holds . Target and spurious features . The target feature t is such that there exists some function f : { 0 , 1 } → { 0 , 1 } such that ∀ ( x , y ) ∈ S , f ( t ( x ) ) = y . In other words , the label can always be perfectly predicted given the value of t.1 A feature s is spurious if it is not a target feature . Partitions of S. To facilitate analysis , we partition S in four regions ( Figure 1 ) . We define Ss-only to be the set of examples in which the spurious feature occurs alone ( without the target ) . Similarly , St-only is the set of examples in which the target occurs without the spurious feature . Sboth and Sneither are analogous . For clarity , we sometimes drop the S∗ notation ( e.g. , s-only in place of Ss-only ) . t-only both s-only neither S D ( a ) ( b ) Sboth “ tpx , yq | tpxq “ 1 ^ spxq “ 1u Sneither “ tpx , yq | tpxq “ 0 ^ spxq “ 0u St-only “ tpx , yq | tpxq “ 1 ^ spxq “ 0u Ss-only “ tpx , yq | tpxq “ 0 ^ spxq “ 1u < latexit sha1_base64= '' bSiqwQANSN306jL/eI6aFqdfpQw= '' > AAA00nicnVtbc9zKcaYcx3EYxzlOHv2CCiX7nBTFInWYil9cZd5JcXlfXqSzOiosthcLETdhZrGk4E1VKi9+8Evyg/I//F/8kJ4ZDLoHC/LEYZVE9PfNNOby9XQvFhzmcSTk+vqfXvzor3781z/5m5/+7fLf/ezvf/4PX/3iH29ENi0CuA6yOCvuhr6AOErhWkYyhru8AD8ZxnA7vN9R/G0JhYiytC8fc/iQ+GEajaPAlwh9/OrPHv5cfawGEh5kkVQvh5mcvJzPf/XbQfX1w+rjN4PV3w9W5dcP3/x2YzCDUQieMMbcGwyW271TiOQEim4H69zBercD+fJ1lsaPPzyAJ/qLZ/qvtyaw/PGrlfW1df3jLV5s1BcrS/XP+cdfvPmfwSgLpgmkMoh9Ib7bWM/lh8ovZBTEMF8eTAXkfnDvh/AdXqZ+AuJDpbdp7r1CZOSNswL/pdLTKO9R+YkQj8kQWya+nIg2p8Au7rupHP/mQxWl+VRCGpgbjaexJzNP7bk3igoIZPyIF35QRDhWL5j4hR9IVIZzl2GW3Ut/KNCHt68HWiQ+OvJRT25LNQqZZbFuGqACxfICX4ixmHfO0AHFdDiOwrnnzCnVd4bkQzXF/7s6rHrjOPPlfOG2/vBhNSz8fBIFDy4rs1GWZhJao5phYzWCp2bQuRFtUO3p/2W2z4/w/+N9efmV+vFO9269k63+obe7t390etQ/Oju98jTVOYNV63Z1iOu7/Mo78Yt7T6BS8GQQXjbGbc3NtdJsAWMoiigNlaxGURkJ2wyXblooeaQwC7Ik8dNRNUAwhrGcV9UAEu/rHl5/M58vtAkwkqCwrXa01dWuiMJJ4+xSGV2tZJbbNv0s72qBx5vMEttoW1sL7ep5+7aZ/1SLoW0xfKpFYFsET7UY2RYj1QK34RBnF6sZer6H7VXYwhiP95GHa5O4PvBagfPvNj6gl+HYW9mYa0F4+3pTzK7hoQCrXpzNoHitQnVteYAu9bLCeGWjMhv47wO0Ku2gqzsON5J+vKbPBSHxyFN7L9SOIW887luP+22PmpazzN5z5U19V+HZRh7OqDbe2B6fp/6Iuqx8u7K50G216WOvvuWuNvV0royqn10OVL4ZfB0Cznp0OLALYnpf2d5XHb0vbS99JM+yJsrWmoUxdxd6ZZoYfGJp2g4nBUDbJfO38u2iR1o15vvbRd9+6gFugurcsWTw2czZNnl60o6faZ5DoZOGcbNXu9nrcrPlFf6M1r3l7PXr136ZRSNvKtTRFI29PBMiwnRlXOexj6FT+396dCof5hhJHXNUjOlet/mLJ1k72mkc7fygI5xzipWKOoNNW2F8aLgZEUrF0tbV69dPygRH58dhhvl/knTMEzkzuqbRsxNlrhZmumVdbXW4soK398NJNL6ePwz6TqetH+y0sKg5Hlr1zJn6FGqGq66e2xTTv63e86b/udvfzrS5AY5aXT854FpwEMVKrLG6wAMdG6ir2h/WPFmhaX1leH1ZN0BqmFQb7WwjCwyEeTVQmT/w42q33aD042jEG3w011hVG2q+4BKE7O6gmXkzI8iFynG5iOIsrfPTJbrIEq/0i6guLrW+QfqVqeZNAVi9HCD0cm6Xs2jRPjFDlxkSE7hMQMzIZUbEgMsAMWOXGRMTukxIzMRlJsRELhMR88llPhFz7zL3xMQuE8+1jIvEiwRGLH4wHD2qw87s4Kr3aSqkhyXxr6WnPqqgHB/VyeNsjJfUvlPXd0p3zVwmIyZ3mZyYzy7zmZjCZQpihMsIYqTLSGKmLjMlpnSZkpiZy8yIeXCZB2IeXeaRmC8u82VuyjwbAJiZs+Z4L+sgqUwoDccsbJpx4ydsHSW2hbYZzzgODwlmsVEGBLPAKEcEs6gogWAWEuWYYBYPZUgwC4ZyQjCLhHJKMAuD8hPBLAbKe4JZAJQxwTGDE4ITBrOF5iucEczEXOYEMyWXnwlmMi4LgpmGS0Gw4JtKsOxeEy7dkmCm23JGMBNt+UAwU2z5SDCTa/mFYKvVPfwIjoW+/rRXdOgWjOg6z2Uwyus8mcHIr/NsBqPBztMZjBA7z2cwauw8ocFIsvOMBqPLzlMauSfPaTAK7Typwci086wGo9X2aW25xOUSzj15EoORbudZDEa/nacxGBF3nsdglNx5IoORc+eZDEbTnacyGGF3nstg1N15MoOReOfZDEbnnaczGLF3ns9gFP/0CY2xUERBU6EkWxQfWxQ2yTbB2wzeIXiHwbsE7zJ4j+A9Bu8TvM/gA4IPGHxI8CGDjwg+YvBbgt8y+JjgYwb3CO4x+ITgEwafEnzK4DOCzxh8TvA5gy8IvmDwJcGXDL4i+IrBfYL7DL4m+JrBNwTfMPiW4FsG3xF8x+B3BL9j8HuC3z99vLqiA6M6ptEtpl8tPcZtc27H5XY4t+tyu5zbc7k9zu273D7nDlzugHOHLnfIuSOXO+LcW5d7y7ljlzvmXM/lepw7cbkTzp263CnnzlzujHPnLnfOuQuXu+Dcpctdcu7K5a4413e5PueuXe6aczcud8O5W5e75dydy91x7p3LvePce5ezsr/hJUT5BfTnCPzsut70LbMUKvt51mLJ1ECDhJJGUxMr3K2HyxpmyNAgVIfoKgQRqj507YEI1RxlPRKqNHSdgQjVF7q6QISqCl1TIEK1hK4kEKEKQtcPiFDdoKsGRKha0LUCIjFbB4NQZaDrAkRStn4GoSpA1wCIUO7XmR8Ryvg63yNCeV5neUQEW3CDUE4v621hm1IahPK3zt6IUNbWORsRytU6UyNCGVrnZ0S6qlG3DC39OJ+o/da/GwWWw1ocWhcWpI9a9GSipmI/GY5UD3NBRJZAqHD9m2AtSSVHC6BDRPB/gkQUJqqr/k2wFW4t2mYiVcXHXymxWgvFGpCFQh2xSVVKoNZCgY7JQnGGZKEwJ2ThcNlYUZCfyEIx3rO1qZQIm5lXSoDWwsVkq4jiy9iSVEp01kLRfSYLBVewlaqU0JoFqpTIrIULzZYZBVaSheKakYXCeiALRfVIFgrqy7z+zgvz7IPBdY5FnVFu1ZkVEcqoOp8iQnlUZ1FEKHvq3IkI5UydMRGhTKnzJCKUH3V2RISyos6JiFAu1JkQEcqAOv8hQnlPZz1EKNvpXIcI5Tid4RChzKbzGiKUz3Q2Q4SymM5hiFDu0pkLEcpYOl8hQnlKZylEKDvp3IQI5SSdkRChTKTzECKUf3T2QYSyjs45iFCu0ZkGkfdsBykvDHlaSM4n9UE8wCu2ejb0FdOrw7+ZXB3DirsycaxV1IdUqO/ydyGI/QJQVJMtdQLhHU2xJ8aRelQKaZCNojREZ/40VogYN9fJvBLqKe8VyKccDLN49ENuhg9zDML2k9pU6O8ITd6s/emn1PXUpKkvU8HUL7ctRvqXOxajCJC7FqMYkHsWoyiQ+xajOJAHFqNIkIcWo1iQRxajaJBvLUbxII8tRhEhexajmJAnFqOokKcWo7iQZxajyJDnFqPYkBcWo+iQlxaj+JBXFqMIkX2LUYzIa4tRlMgbi1GcyFuLUaTIO4tRrMh3FqNoke8tZioyFPKBeinBsKH9nBs4HzfCbQaTLsIdBpM0wl0GkzrCPQaTQMJ9BpNGwgMGk0zCQwaTUsIjBpNYwrcMJr2ExwwmyYQ9BpNqwhMGk3DCUwaTdsIzBpN8wnMGk4LCCwaTiMJLBpOOwisGk5TCPoNJTeE1g0lQ4Q2DSVPhLYNJVuEdg0lZ4TsGk7jC9wy2FT8ebXWpJpqnKEMmLrFNKGlL7BBK0hK7hGplvfJ29TcZUwGe7wmQHt46hpG3t+oNIfAVLieR8GbZNB4hhBZ4Qn/vgbXktPDU6zRZjI7U+y7wkGNtqb/MtV+p79MdSZ3igFASpzgklLQpjgglaYq3hJIyxTGhJEzRI5R0KU4IJVmKU0JJleKMUBKlOCeUNCkuCCVJiktCSZHiilASpOgTSnoU14SSHMUNoaRGcUsoiVHcEUpaFO8IJSmK94Q2j1xSrPtAf4TwzcOWuggEqgB6bvGvysMtslCq22ShRHfIQmnukoWH3R5ZKKJ9slA8B2ShaA7JQrEckYUieUsWiuOYLBRFjywUwwlZKIJTsnDzz8jCTT8nCzf7gizc5EuycHOvyMJN7ZOFm3lNFm7iDVm4ebdk4abdkYWb9Y4s3KT37H51pVVXWWrLgG+ZNBUXHikqfvX7lBjEBl31ZpGcZFPpYbnjqZf7cijcggioInKqofr2stGAbrhQCIIul6BVL4EumKBVMYEumaBVM4EumqBVNYEum6BVN4EunKBVOYEunaBVO4EunqBVPYEun6BVP4EuoKBVQYEuoaBVQ4EuoqBVRYEuo6BVR4EupKBVSYEupaBVS4EupqBVTYEup6BVT4EuqKBVUYEuqaBVU4EuqqBVVYEuq6BVV4EurKBVWYEuraBVW4EurqBVXYEur6BVX4EusIBVWPhJAVOOLKbgTdMRFPGjemlp5EvfCyGFArONsiOBSh9OVepxZZurpvMq/1gNiqTShk58yiskeVREmPKc/s27g8NHne70ayDqJpgfW77tGyITX+IndfcWTstz3vJ83jWYJBtB/NxEdINmJsZauE/d6Py5RrmM4hHULQfaaEbf9MBjQmbBxBfq1Wd/KjP9CQoKZ4StF1hz06YZY91lcQAjcNoZs6NdgQQeOradMVELgX6G5jaO/Tz2A5g3b9T0akC9bV1fu8vr9t+bNxlvrz2QnmAv7fTa7OWc5/bWqZnkbI1bZFzM7XM3lyggnDdP0tpUIGmOyorGERRt1yIby8R/oJYWaLfDZJHpl5jMQ7ZFL3k8VbP/op4EuOxxb87fYDruLWzgjV/QCJTR9i/xl1/g3hcZa3m1sAE7WUm0MpRAb7N4XPiJeiA1mWUFFqjCfxTey973b16qt3f0nw1MU/MWqshx/4V+e+zlAOKYtbEPRF9525gAMeRT9d8jxjsk6i02VQUbp6y1eoU0m4Y6Z+qiOJKwqt2LzBtloNzNovsoh1Hkr7VeQc6KJFYP7+dV7/v1eQeZpaC4jS5OznS/N11crpi8g9Fa6H0/iNKxfGyHTu4X6uEwHhu+CpYrwLNW+CF4UeqlWV3QS3hY83YmmVDLk6kCMJh4u/jZN4VfC0/9FcTasvM45yxXp3NW/AtqvAj1APD3YFVdPddQnZOmIV51u9RqxWb6/yda9FFQffWGXwxy4A8xzuJsNizAv2/NXk7zGExhE/tpGIN5QVBf4v0/frWy0f77lsWLmzdrG5tr/3qxufK77fpvX3669Mulf176emlj6d+Wfrd0uHS+dL0UvBi++MOL/3rx35v9zS+b/7H5n6bpj17Uff5pyfnZ/OP/AsWXYDg= < /latexit > Figure 1 : We partition datasets into four sections , defined by the features ( spurious and/or target ) that hold . We sample training datasets D , which provide varying amounts of evidence against the spurious feature , in the form of s-only examples . In the illustration above , the s-only rate is 210 = 0.2 , i.e. , 20 % of examples in D provide evidence that s alone should not be used to predict y . Evidence from Spurious-Only Examples . We are interested in spurious features which are highly correlated with the target during training . Given a training sample D and features s and t , we define the s-only example rate as the evidence against the use of s as a predictor of y . Concretely , s-only rate = |Ds-only| / |D| , the proportion of training examples in which s occurs without t ( and y = 0 ) . Use of Spurious Feature . If a model has falsely learned that the spurious feature s alone is predictive of the label , it will have a high error rate when classifying examples for which s holds but t does not . We define the s-only error to be the classifier ’ s error on examples from Ss-only . When relevant , t-only error , both error , and neither error are defined analogously . In this work , “ feature use ” is a model ’ s predictions consistency with that feature ; we are not making a causal argument . Extractability of a Feature . We want to compare features in terms of how extractable they are given a representation . For example , given a sentence embedding , it may be possible to predict multiple features with high accuracy , e.g. , whether the word “ dog ” occurs , and also whether the word “ dog ” occurs as the subject of the verb “ run ” . However , detecting the former will no doubt be an easier task than detecting the latter . We use the prequential minimum description length ( MDL ) Rissanen ( 1978 ) –first used by Voita & Titov ( 2020 ) for probing–to quantify this intuitive difference.2 MDL is an information-theoretic metric that measures how accurately a feature can be decoded and the amount of effort required to decode it . Formally , MDL measures the number of bits required to communicate the labels given the representations . Conceptually , MDL can be understood as a measure of the area under the loss curve : If a feature is highly extractable , a model trained to detect that feature will converge quickly to high accuracy , resulting in a low MDL . Computing MDL requires repeatedly training a model over a dataset labeled by the feature in question . To compute MDL ( s ) , we train a classifier ( without freezing any parameters ) to differentiate Ss-only vs. Sneither , and similarly compute MDL ( t ) . See Voita & Titov ( 2020 ) for additional details on MDL.3 1Without loss of generality , we define t in our datasets s.t . t ( x ) = y , ∀x , y ∈ S. We do this to iron out the case where t outputs the opposite value of y . 2We observe similar overall trends when using an alternative metric based on validation loss ( Appendix A.3 ) . 3Note that our reported MDL is higher in some cases than that given by the uniform code ( the number of sentences that are being encoded ) . The MDL is computed as a sum of the costs of transmitting successively | The paper aims to bridge the gap between model interpretation using probing and model's use of spurious features. They show that the findings of MDL with respect to a feature correlate with the extractability of the feature, given the evidence of representing the feature is available in the training data. The results are presented using both synthetic and natural language data. | SP:ea63d76d9c20125dba72138cd644536bea909177 |
Predicting Inductive Biases of Pre-Trained Models | 1 INTRODUCTION . Large pre-trained language models ( LMs ) ( Devlin et al. , 2019 ; Raffel et al. , 2020 ; Brown et al. , 2020 ) have demonstrated impressive empirical success on a range of benchmark NLP tasks . However , analyses have shown that such models are easily fooled when tested on distributions that differ from those they were trained on , suggesting they are often “ right for the wrong reasons ” ( McCoy et al. , 2019 ) . Recent research which attempts to understand why such models behave in this way has primarily made use of two analysis techniques : probing classifiers ( Adi et al. , 2017 ; Hupkes et al. , 2018 ) , which measure whether or not a given feature is encoded by a representation , and challenge sets ( Cooper et al. , 1996 ; Linzen et al. , 2016 ; Rudinger et al. , 2018 ) , which measure whether model behavior in practice is consistent with use of a given feature . The results obtained via these two techniques currently suggest different conclusions about how well pre-trained representations encode language . Work based on probing classifiers has consistently found evidence that models contain rich information about syntactic structure ( Hewitt & Manning , 2019 ; Bau et al. , 2019 ; Tenney et al. , 2019a ) , while work using challenge sets has frequently revealed that models built on top of these representations do not behave as though they have access to such rich features , rather they fail in trivial ways ( Dasgupta et al. , 2018 ; Glockner et al. , 2018 ; Naik et al. , 2018 ) . In this work , we attempt to link these two contrasting views of feature representations . We assume the standard recipe in NLP , in which linguistic representations are first derived from large-scale selfsupervised pre-training intended to encode broadly-useful linguistic features , and then are adapted for a task of interest via transfer learning , or fine-tuning , on a task-specific dataset . We test the hypothesis that the extent to which a fine-tuned model uses a given feature can be explained as a function of two metrics : The extractability of the feature after pre-training ( as measured by probing classifiers ) and the evidence available during fine-tuning ( defined as the rate of co-occurrence with the label ) . We first show results on a synthetic task , and second using state-of-the-art pre-trained LMs on language data . Our results suggest that probing classifiers can be viewed as a measure of the pre-trained representation ’ s inductive biases : The more extractable a feature is after pre-training , the less statistical evidence is required in order for the model to adopt the feature during fine-tuning . Contribution . This work establishes a relationship between two widely-used techniques for analyzing LMs . Currently , the question of how models ’ internal representations ( measured by probing classifiers ) influence model behavior ( measured by challenge sets ) remains open ( Belinkov & Glass , 2019 ; Belinkov et al. , 2020 ) . Understanding the connection between these two measurement techniques can enable more principled evaluation of and control over neural NLP models . 2 SETUP AND TERMINOLOGY . 2.1 FORMULATION . Our motivation comes from McCoy et al . ( 2019 ) , which demonstrated that , when fine-tuned on a natural language inference task ( Williams et al. , 2018 , MNLI ) , a model based on a state-of-the-art pre-trained LM ( Devlin et al. , 2019 , BERT ) categorically fails on test examples which defy the expectation of a “ lexical overlap heuristic ” . For example , the model assumes that the sentence “ the lawyer followed the judge ” entails “ the judge followed the lawyer ” purely because all the words in the latter appear in the former . While this heuristic is statistically favorable given the model ’ s training data , it is not infallible . Specifically , McCoy et al . ( 2019 ) report that 90 % of the training examples containing lexical overlap had the label “ entailment ” , but the remaining 10 % did not . Moreover , the results of recent studies based on probing classifiers suggest that more robust features are extractable with high reliability from BERT representations . For example , given the example “ the lawyer followed the judge ” / “ the judge followed the lawyer ” , if the model can represent that “ lawyer ” is the agent of “ follow ” in the first sentence , but is the patient in the second , then the model should conclude that the sentences have different meanings . Such semantic role information can be recovered at > 90 % accuracy from BERT embeddings ( Tenney et al. , 2019b ) . Thus , the question is : Why would a model prefer a weak feature over a stronger one , if both features are extractable from the model ’ s representations and justified by the model ’ s training data ? Abstracting over details , we distill the basic NLP task setting described above into the following , to be formalized in the Section 2.2 . We assume a binary sequence classification task where a target feature t perfectly predicts the label ( e.g. , the label is 1 iff t holds ) . Here , t represents features which actually determine the label by definition , e.g. , whether one sentence semantically entails another . Additionally , there exists a spurious feature s that frequently co-occurs with t in training but is not guaranteed to generalize outside of the training set . Here , s ( often called a “ heuristic ” or “ bias ” elsewhere in the literature ) corresponds to features like lexical overlap , which are predictive of the label in some datasets but are not guaranteed to generalize . Assumptions . In this work , we assume there is a single t and a single s ; in practice there may be many s features . Still , our definition of a feature accommodates multiple spurious or target features . In fact , some of our spurious features already encompass multiple features : the lexical feature , for example , is a combination of several individual-word features because it holds if one of a set of words is in the sentence . This type of spurious feature is common in real datasets : E.g. , the hypothesis-only baseline in NLI is a disjunction of lexical features ( with semantically unrelated words like “ no ” , “ sleeping ” , etc . ) ( Poliak et al. , 2018b ; Gururangan et al. , 2018 ) . We assume that s and t frequently co-occur , but that only s occurs in isolation . This assumption reflects realistic NLP task settings since datasets always contain some heuristics , e.g. , lexical cues , cultural biases , or artifacts from crowdsourcing ( Gururangan et al. , 2018 ) . Thus , our experiments focus on manipulating the occurrence of s alone , but not t alone : This means giving the model evidence against relying on s. This is in line with prior applied work that attempts to influence model behavior by increasing the evidence against s during training ( Elkahky et al. , 2018 ; Zmigrod et al. , 2019 ; Min et al. , 2020 ) . Published as a conference paper at ICLR 2021 2.2 DEFINITIONS . Let X be the set of all sentences and S be the space of all sentence-label pairs ( x , y ) ∈ X × { 0 , 1 } . We use D ⊂ S to denote a particular training sample drawn from S. We define two types of binary features : target ( t ) and spurious ( s ) . Each is a function from sentences x ∈ X to a binary label { 0 , 1 } that indicates whether the feature holds . Target and spurious features . The target feature t is such that there exists some function f : { 0 , 1 } → { 0 , 1 } such that ∀ ( x , y ) ∈ S , f ( t ( x ) ) = y . In other words , the label can always be perfectly predicted given the value of t.1 A feature s is spurious if it is not a target feature . Partitions of S. To facilitate analysis , we partition S in four regions ( Figure 1 ) . We define Ss-only to be the set of examples in which the spurious feature occurs alone ( without the target ) . Similarly , St-only is the set of examples in which the target occurs without the spurious feature . Sboth and Sneither are analogous . For clarity , we sometimes drop the S∗ notation ( e.g. , s-only in place of Ss-only ) . t-only both s-only neither S D ( a ) ( b ) Sboth “ tpx , yq | tpxq “ 1 ^ spxq “ 1u Sneither “ tpx , yq | tpxq “ 0 ^ spxq “ 0u St-only “ tpx , yq | tpxq “ 1 ^ spxq “ 0u Ss-only “ tpx , yq | tpxq “ 0 ^ spxq “ 1u < latexit sha1_base64= '' bSiqwQANSN306jL/eI6aFqdfpQw= '' > AAA00nicnVtbc9zKcaYcx3EYxzlOHv2CCiX7nBTFInWYil9cZd5JcXlfXqSzOiosthcLETdhZrGk4E1VKi9+8Evyg/I//F/8kJ4ZDLoHC/LEYZVE9PfNNOby9XQvFhzmcSTk+vqfXvzor3781z/5m5/+7fLf/ezvf/4PX/3iH29ENi0CuA6yOCvuhr6AOErhWkYyhru8AD8ZxnA7vN9R/G0JhYiytC8fc/iQ+GEajaPAlwh9/OrPHv5cfawGEh5kkVQvh5mcvJzPf/XbQfX1w+rjN4PV3w9W5dcP3/x2YzCDUQieMMbcGwyW271TiOQEim4H69zBercD+fJ1lsaPPzyAJ/qLZ/qvtyaw/PGrlfW1df3jLV5s1BcrS/XP+cdfvPmfwSgLpgmkMoh9Ib7bWM/lh8ovZBTEMF8eTAXkfnDvh/AdXqZ+AuJDpbdp7r1CZOSNswL/pdLTKO9R+YkQj8kQWya+nIg2p8Au7rupHP/mQxWl+VRCGpgbjaexJzNP7bk3igoIZPyIF35QRDhWL5j4hR9IVIZzl2GW3Ut/KNCHt68HWiQ+OvJRT25LNQqZZbFuGqACxfICX4ixmHfO0AHFdDiOwrnnzCnVd4bkQzXF/7s6rHrjOPPlfOG2/vBhNSz8fBIFDy4rs1GWZhJao5phYzWCp2bQuRFtUO3p/2W2z4/w/+N9efmV+vFO9269k63+obe7t390etQ/Oju98jTVOYNV63Z1iOu7/Mo78Yt7T6BS8GQQXjbGbc3NtdJsAWMoiigNlaxGURkJ2wyXblooeaQwC7Ik8dNRNUAwhrGcV9UAEu/rHl5/M58vtAkwkqCwrXa01dWuiMJJ4+xSGV2tZJbbNv0s72qBx5vMEttoW1sL7ep5+7aZ/1SLoW0xfKpFYFsET7UY2RYj1QK34RBnF6sZer6H7VXYwhiP95GHa5O4PvBagfPvNj6gl+HYW9mYa0F4+3pTzK7hoQCrXpzNoHitQnVteYAu9bLCeGWjMhv47wO0Ku2gqzsON5J+vKbPBSHxyFN7L9SOIW887luP+22PmpazzN5z5U19V+HZRh7OqDbe2B6fp/6Iuqx8u7K50G216WOvvuWuNvV0royqn10OVL4ZfB0Cznp0OLALYnpf2d5XHb0vbS99JM+yJsrWmoUxdxd6ZZoYfGJp2g4nBUDbJfO38u2iR1o15vvbRd9+6gFugurcsWTw2czZNnl60o6faZ5DoZOGcbNXu9nrcrPlFf6M1r3l7PXr136ZRSNvKtTRFI29PBMiwnRlXOexj6FT+396dCof5hhJHXNUjOlet/mLJ1k72mkc7fygI5xzipWKOoNNW2F8aLgZEUrF0tbV69dPygRH58dhhvl/knTMEzkzuqbRsxNlrhZmumVdbXW4soK398NJNL6ePwz6TqetH+y0sKg5Hlr1zJn6FGqGq66e2xTTv63e86b/udvfzrS5AY5aXT854FpwEMVKrLG6wAMdG6ir2h/WPFmhaX1leH1ZN0BqmFQb7WwjCwyEeTVQmT/w42q33aD042jEG3w011hVG2q+4BKE7O6gmXkzI8iFynG5iOIsrfPTJbrIEq/0i6guLrW+QfqVqeZNAVi9HCD0cm6Xs2jRPjFDlxkSE7hMQMzIZUbEgMsAMWOXGRMTukxIzMRlJsRELhMR88llPhFz7zL3xMQuE8+1jIvEiwRGLH4wHD2qw87s4Kr3aSqkhyXxr6WnPqqgHB/VyeNsjJfUvlPXd0p3zVwmIyZ3mZyYzy7zmZjCZQpihMsIYqTLSGKmLjMlpnSZkpiZy8yIeXCZB2IeXeaRmC8u82VuyjwbAJiZs+Z4L+sgqUwoDccsbJpx4ydsHSW2hbYZzzgODwlmsVEGBLPAKEcEs6gogWAWEuWYYBYPZUgwC4ZyQjCLhHJKMAuD8hPBLAbKe4JZAJQxwTGDE4ITBrOF5iucEczEXOYEMyWXnwlmMi4LgpmGS0Gw4JtKsOxeEy7dkmCm23JGMBNt+UAwU2z5SDCTa/mFYKvVPfwIjoW+/rRXdOgWjOg6z2Uwyus8mcHIr/NsBqPBztMZjBA7z2cwauw8ocFIsvOMBqPLzlMauSfPaTAK7Typwci086wGo9X2aW25xOUSzj15EoORbudZDEa/nacxGBF3nsdglNx5IoORc+eZDEbTnacyGGF3nstg1N15MoOReOfZDEbnnaczGLF3ns9gFP/0CY2xUERBU6EkWxQfWxQ2yTbB2wzeIXiHwbsE7zJ4j+A9Bu8TvM/gA4IPGHxI8CGDjwg+YvBbgt8y+JjgYwb3CO4x+ITgEwafEnzK4DOCzxh8TvA5gy8IvmDwJcGXDL4i+IrBfYL7DL4m+JrBNwTfMPiW4FsG3xF8x+B3BL9j8HuC3z99vLqiA6M6ptEtpl8tPcZtc27H5XY4t+tyu5zbc7k9zu273D7nDlzugHOHLnfIuSOXO+LcW5d7y7ljlzvmXM/lepw7cbkTzp263CnnzlzujHPnLnfOuQuXu+Dcpctdcu7K5a4413e5PueuXe6aczcud8O5W5e75dydy91x7p3LvePce5ezsr/hJUT5BfTnCPzsut70LbMUKvt51mLJ1ECDhJJGUxMr3K2HyxpmyNAgVIfoKgQRqj507YEI1RxlPRKqNHSdgQjVF7q6QISqCl1TIEK1hK4kEKEKQtcPiFDdoKsGRKha0LUCIjFbB4NQZaDrAkRStn4GoSpA1wCIUO7XmR8Ryvg63yNCeV5neUQEW3CDUE4v621hm1IahPK3zt6IUNbWORsRytU6UyNCGVrnZ0S6qlG3DC39OJ+o/da/GwWWw1ocWhcWpI9a9GSipmI/GY5UD3NBRJZAqHD9m2AtSSVHC6BDRPB/gkQUJqqr/k2wFW4t2mYiVcXHXymxWgvFGpCFQh2xSVVKoNZCgY7JQnGGZKEwJ2ThcNlYUZCfyEIx3rO1qZQIm5lXSoDWwsVkq4jiy9iSVEp01kLRfSYLBVewlaqU0JoFqpTIrIULzZYZBVaSheKakYXCeiALRfVIFgrqy7z+zgvz7IPBdY5FnVFu1ZkVEcqoOp8iQnlUZ1FEKHvq3IkI5UydMRGhTKnzJCKUH3V2RISyos6JiFAu1JkQEcqAOv8hQnlPZz1EKNvpXIcI5Tid4RChzKbzGiKUz3Q2Q4SymM5hiFDu0pkLEcpYOl8hQnlKZylEKDvp3IQI5SSdkRChTKTzECKUf3T2QYSyjs45iFCu0ZkGkfdsBykvDHlaSM4n9UE8wCu2ejb0FdOrw7+ZXB3DirsycaxV1IdUqO/ydyGI/QJQVJMtdQLhHU2xJ8aRelQKaZCNojREZ/40VogYN9fJvBLqKe8VyKccDLN49ENuhg9zDML2k9pU6O8ITd6s/emn1PXUpKkvU8HUL7ctRvqXOxajCJC7FqMYkHsWoyiQ+xajOJAHFqNIkIcWo1iQRxajaJBvLUbxII8tRhEhexajmJAnFqOokKcWo7iQZxajyJDnFqPYkBcWo+iQlxaj+JBXFqMIkX2LUYzIa4tRlMgbi1GcyFuLUaTIO4tRrMh3FqNoke8tZioyFPKBeinBsKH9nBs4HzfCbQaTLsIdBpM0wl0GkzrCPQaTQMJ9BpNGwgMGk0zCQwaTUsIjBpNYwrcMJr2ExwwmyYQ9BpNqwhMGk3DCUwaTdsIzBpN8wnMGk4LCCwaTiMJLBpOOwisGk5TCPoNJTeE1g0lQ4Q2DSVPhLYNJVuEdg0lZ4TsGk7jC9wy2FT8ebXWpJpqnKEMmLrFNKGlL7BBK0hK7hGplvfJ29TcZUwGe7wmQHt46hpG3t+oNIfAVLieR8GbZNB4hhBZ4Qn/vgbXktPDU6zRZjI7U+y7wkGNtqb/MtV+p79MdSZ3igFASpzgklLQpjgglaYq3hJIyxTGhJEzRI5R0KU4IJVmKU0JJleKMUBKlOCeUNCkuCCVJiktCSZHiilASpOgTSnoU14SSHMUNoaRGcUsoiVHcEUpaFO8IJSmK94Q2j1xSrPtAf4TwzcOWuggEqgB6bvGvysMtslCq22ShRHfIQmnukoWH3R5ZKKJ9slA8B2ShaA7JQrEckYUieUsWiuOYLBRFjywUwwlZKIJTsnDzz8jCTT8nCzf7gizc5EuycHOvyMJN7ZOFm3lNFm7iDVm4ebdk4abdkYWb9Y4s3KT37H51pVVXWWrLgG+ZNBUXHikqfvX7lBjEBl31ZpGcZFPpYbnjqZf7cijcggioInKqofr2stGAbrhQCIIul6BVL4EumKBVMYEumaBVM4EumqBVNYEum6BVN4EunKBVOYEunaBVO4EunqBVPYEun6BVP4EuoKBVQYEuoaBVQ4EuoqBVRYEuo6BVR4EupKBVSYEupaBVS4EupqBVTYEup6BVT4EuqKBVUYEuqaBVU4EuqqBVVYEuq6BVV4EurKBVWYEuraBVW4EurqBVXYEur6BVX4EusIBVWPhJAVOOLKbgTdMRFPGjemlp5EvfCyGFArONsiOBSh9OVepxZZurpvMq/1gNiqTShk58yiskeVREmPKc/s27g8NHne70ayDqJpgfW77tGyITX+IndfcWTstz3vJ83jWYJBtB/NxEdINmJsZauE/d6Py5RrmM4hHULQfaaEbf9MBjQmbBxBfq1Wd/KjP9CQoKZ4StF1hz06YZY91lcQAjcNoZs6NdgQQeOradMVELgX6G5jaO/Tz2A5g3b9T0akC9bV1fu8vr9t+bNxlvrz2QnmAv7fTa7OWc5/bWqZnkbI1bZFzM7XM3lyggnDdP0tpUIGmOyorGERRt1yIby8R/oJYWaLfDZJHpl5jMQ7ZFL3k8VbP/op4EuOxxb87fYDruLWzgjV/QCJTR9i/xl1/g3hcZa3m1sAE7WUm0MpRAb7N4XPiJeiA1mWUFFqjCfxTey973b16qt3f0nw1MU/MWqshx/4V+e+zlAOKYtbEPRF9525gAMeRT9d8jxjsk6i02VQUbp6y1eoU0m4Y6Z+qiOJKwqt2LzBtloNzNovsoh1Hkr7VeQc6KJFYP7+dV7/v1eQeZpaC4jS5OznS/N11crpi8g9Fa6H0/iNKxfGyHTu4X6uEwHhu+CpYrwLNW+CF4UeqlWV3QS3hY83YmmVDLk6kCMJh4u/jZN4VfC0/9FcTasvM45yxXp3NW/AtqvAj1APD3YFVdPddQnZOmIV51u9RqxWb6/yda9FFQffWGXwxy4A8xzuJsNizAv2/NXk7zGExhE/tpGIN5QVBf4v0/frWy0f77lsWLmzdrG5tr/3qxufK77fpvX3669Mulf176emlj6d+Wfrd0uHS+dL0UvBi++MOL/3rx35v9zS+b/7H5n6bpj17Uff5pyfnZ/OP/AsWXYDg= < /latexit > Figure 1 : We partition datasets into four sections , defined by the features ( spurious and/or target ) that hold . We sample training datasets D , which provide varying amounts of evidence against the spurious feature , in the form of s-only examples . In the illustration above , the s-only rate is 210 = 0.2 , i.e. , 20 % of examples in D provide evidence that s alone should not be used to predict y . Evidence from Spurious-Only Examples . We are interested in spurious features which are highly correlated with the target during training . Given a training sample D and features s and t , we define the s-only example rate as the evidence against the use of s as a predictor of y . Concretely , s-only rate = |Ds-only| / |D| , the proportion of training examples in which s occurs without t ( and y = 0 ) . Use of Spurious Feature . If a model has falsely learned that the spurious feature s alone is predictive of the label , it will have a high error rate when classifying examples for which s holds but t does not . We define the s-only error to be the classifier ’ s error on examples from Ss-only . When relevant , t-only error , both error , and neither error are defined analogously . In this work , “ feature use ” is a model ’ s predictions consistency with that feature ; we are not making a causal argument . Extractability of a Feature . We want to compare features in terms of how extractable they are given a representation . For example , given a sentence embedding , it may be possible to predict multiple features with high accuracy , e.g. , whether the word “ dog ” occurs , and also whether the word “ dog ” occurs as the subject of the verb “ run ” . However , detecting the former will no doubt be an easier task than detecting the latter . We use the prequential minimum description length ( MDL ) Rissanen ( 1978 ) –first used by Voita & Titov ( 2020 ) for probing–to quantify this intuitive difference.2 MDL is an information-theoretic metric that measures how accurately a feature can be decoded and the amount of effort required to decode it . Formally , MDL measures the number of bits required to communicate the labels given the representations . Conceptually , MDL can be understood as a measure of the area under the loss curve : If a feature is highly extractable , a model trained to detect that feature will converge quickly to high accuracy , resulting in a low MDL . Computing MDL requires repeatedly training a model over a dataset labeled by the feature in question . To compute MDL ( s ) , we train a classifier ( without freezing any parameters ) to differentiate Ss-only vs. Sneither , and similarly compute MDL ( t ) . See Voita & Titov ( 2020 ) for additional details on MDL.3 1Without loss of generality , we define t in our datasets s.t . t ( x ) = y , ∀x , y ∈ S. We do this to iron out the case where t outputs the opposite value of y . 2We observe similar overall trends when using an alternative metric based on validation loss ( Appendix A.3 ) . 3Note that our reported MDL is higher in some cases than that given by the uniform code ( the number of sentences that are being encoded ) . The MDL is computed as a sum of the costs of transmitting successively | This paper studies the relationship between extractability of features from pre-trained representations and how much a fine-tuned model uses that feature. The extractability of features is measured by the minimum description length of a probing classifier trained to detect the feature from the pre-trained representations (using the online code version of Voita and Titov). The degree to which a fine-tuned model uses the feature is measured by the amount of evidence required for a model to tease apart spurious from non-spurious features (called "target" features). Evidence here means examples where a spurious feature occurs but a non-spurious feature does not occur. When there are many such examples (high spurious-only rate), it is easier for a model to reject the spurious feature and learn to rely on the target feature. The "degree to which a fine-tuned model uses a feature" is defined as the minimal spurious-only rate at which the model can accomplish the task. | SP:ea63d76d9c20125dba72138cd644536bea909177 |
DarKnight: A Data Privacy Scheme for Training and Inference of Deep Neural Networks | 1 INTRODUCTION . The need for protecting input privacy in Deep learning is growing rapidly in many areas such as health care ( Esteva et al. , 2019 ) , autonomous vehicles ( Zhu et al. , 2014 ) , finance ( Heaton et al. , 2017 ) , communication technologies ( Foerster et al. , 2016 ) etc . Many of the data holders are , however , not machine learning experts . Hence , the need for machine learning as a service ( MLaaS ) has emerged . Microsoft Azure ML ( Microsoft , 2020 ) , Google AI platform ( Google , 2020 ) , Amazon ML ( Amazon , 2020 ) are some examples . These services provide computing infrastructure and ML runtime to enable data holders to quickly set up their models and train . While these platforms accelerate the ML setup process , they exacerbate the user ’ s concern regarding the data privacy . In this paper , we propose DarKnight , a unified inference and training framework that protects data privacy with rigorous bounds on information leakage . DarKnight takes a unique hybrid-execution approach where it uses trusted execution environments ( TEE ) to blind input data using matrix masking techniques , and then uses GPUs to accelerate DNN ’ s linear computations on the blinded data . Training or inference solely within TEEs can provide data privacy , by blocking access to TEE memory for all intruders , including root users , using hardware encryption and isolation mechanisms . However , TEE-enabled CPUs have limited computation power and memory availability , which creates unacceptable performance hurdles to run an entire model within a TEE . Linear operations ( convolution , matrix multiplication , etc ) are orders of magnitudes faster on a GPU compared to a TEEenabled CPU . DarKnight offloads these compute-intensive linear operations to GPU . DarKnight ’ s usage of TEEs is limited to protecting the privacy of data through a novel matrix masking of multiple inputs and performing non-linear operations ( RelU , Maxpool ) . In terms of applicability , DarKnight allows users to train using floating-point ( FP ) representation for model parameters , while still providing rigorous bounds on information leakage . FP models are routinely used in training due to convergence , accuracy and faster implementation considerations ( Johnson , 2018 ; Guo et al. , 2020 ; Imani et al. , 2019 ) . Many DNN accelerators use bfloat16 ( Kalamkar et al. , 2019 ) which is a half precision FP . This format is used in Intel Xeon Processors , Intel FPGAs ( Nervana , 2018 ) , Google Cloud TPUs ( Cloud , 2018 ) and Tenserflow ( Google , 2018 ) . Several prior works on protecting privacy , however , use operations on finite fields to provide formal bounds . Such an approach limits their usage to integer arithmetic on quantized models ( Mohassel & Zhang , 2017 ; Gascón et al. , 2017 ; So et al. , 2019 ) . In this work , we allow training to use FP values and we bound the amount of information leakage with a rigorous mathematical proof . The information leakage is bounded by the variance of the additive noise and other parameters of the DarKnight blinding . We implemented DarKnight using an Intel SGX-enabled CPU to perform matrix masking and nonlinear DNN operations , while using an Nvidia GPU to accelerate linear operations . The blinding parameters in our experiments were chosen so as to preserve the original accuracy of training a model . Using these parameters DarKnight guarantees that no more than one bit of information is leaked from a one megapixel input image . Note that this will be an upper bound on the leaked information , assuming that the adversary has access to unlimited computation power to decode the blinded inputs . To the best of our knowledge , this is the first work that uses TEE-GPU collaboration for training large DNNs . The rest of the paper is organized as follow . In Section 2 , we explain the background . Section 3 describes the methodology for inference and training . In section 4 privacy theorem is provided . Experimental results are presented in section 5 . In section 6 , we draw the conclusion . 2 RELATED WORK AND BACKGROUND . 2.1 INTEL SGX . TEEs such as ARMTrustZone ( Alves , 2004 ) , Intel SGX ( Costan & Devadas , 2016 ) , and Sanctum ( Costan et al. , 2016 ) provide an execution environment where computational integrity of user ’ s application is guaranteed by the hardware . TEEs generally provide a limited amount of secure memory that is tamper proof even from a root user . SGX provides 128 MB as the enclave memory . An entire DNN model and data can be wrapped in an enclave for private execution but if size of the private data exceeds the 128MB TEE limit , it will pay a significant performance penalty for encryption and eviction of pages for swapping . While some types of side-channel attacks have been performed on SGX , many of these attacks are being fixed actively ( Costan & Devadas , 2016 ; Xu et al. , 2015 ) . In this work we assume that SGX computations are invisible to the outside entities . 2.2 RELATED WORK . There are a variety of approaches for protecting input privacy during DNN training and inference . We categorized these approaches in Table 1 . Homomorphic encryption ( HE ) techniques encrypt input data and then perform inference directly on encrypted data , albeit with significant performance penalty ( and hence are rarely used in training DNNs ) . Secure multi-party computing ( MPC ) is another approach , where multiple non-colluding servers may use custom data exchange protocols to protect input data . However , this approach requires multiple servers to perform training or inference . An entirely orthogonal approach is to use differential privacy ( DiifP ) , which protects user information through probabilistic guarantees . Additive Noise is another approach mostly used for inference , where there is a trade-off between the privacy , computational complexity and , model accuracy . In some of the works mentioned below a combination of forenamed techniques is used . Among those approaches , ( Tramer & Boneh , 2018 ) introduced Slalom an inference framework that uses TEE-GPU collaboration to protect data privacy and integrity . However , as stated in their work their quantized model was not designed for training DNNs . We elaborate on these reasons in Appendix E . 3 DARKNIGHT . 3.1 THREAT MODEL . Adversary capabilities : While adversaries can perform various attacks on DNN models and datasets ( Riazi et al. , 2019 ) , DarKnight focuses on attacks that expose the datasets used in training or inference and attacks that modify computational results on untrusted hardware . Model privacy and side channel attacks are out of the scope of this work . Within this scope , the adversary is assumed to have the full root access to the system , which includes the GPU in our setup . The adversary can not see any computations or data stored within the TEE . But the adversary has unrestricted access to data that leaves TEE , such as the blinded input data and can alter computational results performed on the GPU . Since model protection is outside of the scope we assume the adversary can access the DNN model parameters . Information-theoretic Data Privacy : We quantify information leakage in terms of the mutual information between original inputs and blinded inputs that are visible to the adversary . More precisely , from an information theoretical point of view , an adversary with an unlimited computation power who observes unlimited number of blinded inputs can not gain more information about original inputs than what our upper bound on leakage provides . This upper bound itself can be controlled by the power of noise and other blinding parameters in our design . In our implementation we selected these parameters such that the overall training or inference accuracy is not reduced due to them . In section 4 and Appendix A , we provide the details of our theoretical analysis . Computation Integrity : Since the adversary has access to blinded inputs , it can alter the returned values to the TEE to manipulate model training or inference . DarKnight can verify the computations performed in the unsecured GPU up to the computation precision . In the other words , DarKnight detects if the results are altered more than the computation precision by an adversary . 3.2 DARKNIGHT OVERVIEW DarKnight supports both private inference and training in a single framework . Fig . 1 depicts the overall execution flow of DarKnight . A cloud server with an SGX enclave and GPU accelerator forms the computing base . DarKnight uses SGX to blind input data while enabling GPUs to perform computationally intensive linear operations on private data . The initial model ( W ) that a user wants to train is loaded into the cloud server , and is made accessible to the untrusted GPU as well . DarKnight then uses the following steps : ( 1 ) A batch of training/inference input data set is encrypted by the client using a mutually agreed keys with SGX and sent to the server . ( 2 ) SGX decrypts the images and starts the forward and backward propagation . ( 3 ) During the forward/backward pass , each layer requires some linear and nonlinear operations . Before offloading linear operations to GPU , SGX calls DarKnight ’ s blinding mechanism to seal the data . To seal the data , DarKnight uses the notion of a virtual batch , where K inputs are linearly combined to form K coded inputs . The size of the virtual batch is limited by the size of the SGX memory that is necessary to blind K images , typically 4-8 images at a time . ( 4 ) The blinded data is offloaded to GPU for linear operation . ( 5 ) GPU performs linear operations on blinded data and returns the data back to SGX labeled as step 6 . ( 7 ) SGX decodes the received computational outputs using DarKnight ’ s decoding strategy and then performs any non-linear operations within SGX . This process is repeated both for forward and backward propagation of each layer . 3.3 PRIVACY IN INFERENCE . In this section , we start with DarKnight ’ s inference strategy . We consider a trained DNN , represented by model parameters W with L layers , which is performing inference on input x0 , which must be protected . At a layer l the inference process computes yl = 〈Wl , xl〉 , where Wl and xl represent the model parameters and inputs in layer l , and 〈· , ·〉 corresponds to the bilinear operation at that layer ( e.g . matrix product , convolution , etc. ) . After the linear operation finishes , an activation function ( g ( · ) ) creates the next layer input xl+1 = g ( yl ) . Within this context , DarKnight first receives a set of K inputs x ( 1 ) 0 , . . . , x ( K ) 0 for a batch inference from a client . Our goal is to perform linear calculations of y ( 1 ) 0 = 〈W0 , x ( 1 ) 0 〉 , . . . , y ( K ) 0 = 〈W0 , x ( K ) 0 〉 on the GPU without exposing the inputs to the GPU . Note that the subscript 0 in all these variables refers to the first layer . At this point , we drop the subscript for a more clear notation . Also , we apply x for the inputs that need to be protected and x̄ for the blinded inputs to visually distinguish different notations . Key Insight : The main idea behind DarKnight ’ s privacy protection scheme is the fact that the most computationally intensive operator ( such as convolutions ) is bilinear . Thus , instead of asking the GPU to calculate 〈W , x ( i ) 〉 , which exposes the inputs , DarKnight uses matrix masking to linearly combine the inputs and add a random noise to them . Due to the bilinear property , any linear operation on K masked inputs can be recovered if there are K different linear computations performed . Matrix Masking : Introduced by ( Cox , 1980 ; 1994 ; Kim , 1986 ; Spruill , 1983 ) , matrix masking scheme can be used for variety of reasons such as noise addition , sampling and etc . The general form of B X A+C is used for protecting Matrix X . Any of these matrices can be used for masking data based on the data privacy goal . For DarKnight we use A and C as we explain the in this section . DarKnight Matrix Masking ( Blinding ) : More specifically , DarKnight creates K + 1 inputs x̄ ( 1 ) , . . . , x̄ ( K ) , as follows , x̄ ( i ) = αi,1x ( 1 ) + · · ·+ αi , Kx ( K ) + αi , ( K+1 ) r , i = 1 , . . . , ( K + 1 ) ( 1 ) The scalars αi , j , and the noise vector r are randomly generated ; and the size of r matches that of x . The scalars αi , j ’ s are represented by matrix A , which are dynamically generated for each batch and securely stored inside SGX for unblinding . Hence , by revealing the values x̄ ( i ) ’ s to GPU , we do not expose the inputs x ( i ) ’ s . At the next step , the blinded data x̄ ( i ) ’ s are sent to the GPU which performs the following computations : ȳ ( i ) = 〈W , x̄ ( i ) 〉 , i = 1 , . . . , ( K + 1 ) . Please note that matrix A can be chosen such that its condition number close to one , so that blinding and unblinding algorithm remains numerically stable . For this purpose , orthogonal matrices serve us the best . DarKnight Unblinding : The K + 1 outputs ȳ ( i ) returned from the GPU must be unblinded to extract the original results y ( i ) . These value can be extracted as follows , Ȳ = 〈 W , [ x̄ ( 1 ) , . . . , x̄ ( K+1 ) ] 〉 = 〈 W , [ x ( 1 ) , . . . , x ( K ) , r ] 〉 ︸ ︷︷ ︸ Y ·A ⇒ Y = Ȳ ·A−1 ( 2 ) DarKnight Advantages : ( 1 ) Unlike prior works ( Tramer & Boneh , 2018 ) DarKnight does not need to store W · r within the SGX memory thereby significantly enhancing our ability to infer with much larger models . ( 2 ) size of the matrix A is proportional to the number of inputs that are blinded together ( K ) , and is orders of magnitude smaller the model size W. Hence , the order complexity of Blinding/Unblinding operations is much less than the linear operations ( 〈W , x〉 ) in a DNN with millions of parameters . ( 3 ) The process of unblinding K inputs with one random noise requires K + 1 computations . During unblinding we extract W · r , but that value is just dropped . Thus DarKnight trades 1/K additional computations in order to eliminate the need to secure very large model parameters . | This paper aims at addressing both secure training and inference of DNNs. The proposed method relies on securely off-loading the compute-intensive part of the operations from a trusted CPU environment which has low-performance, to an untrusted high-performance gpu. Their suggested method builds on SOTA, Slalom, but is shown to have less memory over-head. Also, they point-out that their proposed scheme supports training phase as well, as opposed to Slalom which targets inference. For off-loading the computation to the untrusted GPU they propose some matrix blinding techniques. | SP:1feae47cc68e37f008c8358ed960afa41f9c0019 |
DarKnight: A Data Privacy Scheme for Training and Inference of Deep Neural Networks | 1 INTRODUCTION . The need for protecting input privacy in Deep learning is growing rapidly in many areas such as health care ( Esteva et al. , 2019 ) , autonomous vehicles ( Zhu et al. , 2014 ) , finance ( Heaton et al. , 2017 ) , communication technologies ( Foerster et al. , 2016 ) etc . Many of the data holders are , however , not machine learning experts . Hence , the need for machine learning as a service ( MLaaS ) has emerged . Microsoft Azure ML ( Microsoft , 2020 ) , Google AI platform ( Google , 2020 ) , Amazon ML ( Amazon , 2020 ) are some examples . These services provide computing infrastructure and ML runtime to enable data holders to quickly set up their models and train . While these platforms accelerate the ML setup process , they exacerbate the user ’ s concern regarding the data privacy . In this paper , we propose DarKnight , a unified inference and training framework that protects data privacy with rigorous bounds on information leakage . DarKnight takes a unique hybrid-execution approach where it uses trusted execution environments ( TEE ) to blind input data using matrix masking techniques , and then uses GPUs to accelerate DNN ’ s linear computations on the blinded data . Training or inference solely within TEEs can provide data privacy , by blocking access to TEE memory for all intruders , including root users , using hardware encryption and isolation mechanisms . However , TEE-enabled CPUs have limited computation power and memory availability , which creates unacceptable performance hurdles to run an entire model within a TEE . Linear operations ( convolution , matrix multiplication , etc ) are orders of magnitudes faster on a GPU compared to a TEEenabled CPU . DarKnight offloads these compute-intensive linear operations to GPU . DarKnight ’ s usage of TEEs is limited to protecting the privacy of data through a novel matrix masking of multiple inputs and performing non-linear operations ( RelU , Maxpool ) . In terms of applicability , DarKnight allows users to train using floating-point ( FP ) representation for model parameters , while still providing rigorous bounds on information leakage . FP models are routinely used in training due to convergence , accuracy and faster implementation considerations ( Johnson , 2018 ; Guo et al. , 2020 ; Imani et al. , 2019 ) . Many DNN accelerators use bfloat16 ( Kalamkar et al. , 2019 ) which is a half precision FP . This format is used in Intel Xeon Processors , Intel FPGAs ( Nervana , 2018 ) , Google Cloud TPUs ( Cloud , 2018 ) and Tenserflow ( Google , 2018 ) . Several prior works on protecting privacy , however , use operations on finite fields to provide formal bounds . Such an approach limits their usage to integer arithmetic on quantized models ( Mohassel & Zhang , 2017 ; Gascón et al. , 2017 ; So et al. , 2019 ) . In this work , we allow training to use FP values and we bound the amount of information leakage with a rigorous mathematical proof . The information leakage is bounded by the variance of the additive noise and other parameters of the DarKnight blinding . We implemented DarKnight using an Intel SGX-enabled CPU to perform matrix masking and nonlinear DNN operations , while using an Nvidia GPU to accelerate linear operations . The blinding parameters in our experiments were chosen so as to preserve the original accuracy of training a model . Using these parameters DarKnight guarantees that no more than one bit of information is leaked from a one megapixel input image . Note that this will be an upper bound on the leaked information , assuming that the adversary has access to unlimited computation power to decode the blinded inputs . To the best of our knowledge , this is the first work that uses TEE-GPU collaboration for training large DNNs . The rest of the paper is organized as follow . In Section 2 , we explain the background . Section 3 describes the methodology for inference and training . In section 4 privacy theorem is provided . Experimental results are presented in section 5 . In section 6 , we draw the conclusion . 2 RELATED WORK AND BACKGROUND . 2.1 INTEL SGX . TEEs such as ARMTrustZone ( Alves , 2004 ) , Intel SGX ( Costan & Devadas , 2016 ) , and Sanctum ( Costan et al. , 2016 ) provide an execution environment where computational integrity of user ’ s application is guaranteed by the hardware . TEEs generally provide a limited amount of secure memory that is tamper proof even from a root user . SGX provides 128 MB as the enclave memory . An entire DNN model and data can be wrapped in an enclave for private execution but if size of the private data exceeds the 128MB TEE limit , it will pay a significant performance penalty for encryption and eviction of pages for swapping . While some types of side-channel attacks have been performed on SGX , many of these attacks are being fixed actively ( Costan & Devadas , 2016 ; Xu et al. , 2015 ) . In this work we assume that SGX computations are invisible to the outside entities . 2.2 RELATED WORK . There are a variety of approaches for protecting input privacy during DNN training and inference . We categorized these approaches in Table 1 . Homomorphic encryption ( HE ) techniques encrypt input data and then perform inference directly on encrypted data , albeit with significant performance penalty ( and hence are rarely used in training DNNs ) . Secure multi-party computing ( MPC ) is another approach , where multiple non-colluding servers may use custom data exchange protocols to protect input data . However , this approach requires multiple servers to perform training or inference . An entirely orthogonal approach is to use differential privacy ( DiifP ) , which protects user information through probabilistic guarantees . Additive Noise is another approach mostly used for inference , where there is a trade-off between the privacy , computational complexity and , model accuracy . In some of the works mentioned below a combination of forenamed techniques is used . Among those approaches , ( Tramer & Boneh , 2018 ) introduced Slalom an inference framework that uses TEE-GPU collaboration to protect data privacy and integrity . However , as stated in their work their quantized model was not designed for training DNNs . We elaborate on these reasons in Appendix E . 3 DARKNIGHT . 3.1 THREAT MODEL . Adversary capabilities : While adversaries can perform various attacks on DNN models and datasets ( Riazi et al. , 2019 ) , DarKnight focuses on attacks that expose the datasets used in training or inference and attacks that modify computational results on untrusted hardware . Model privacy and side channel attacks are out of the scope of this work . Within this scope , the adversary is assumed to have the full root access to the system , which includes the GPU in our setup . The adversary can not see any computations or data stored within the TEE . But the adversary has unrestricted access to data that leaves TEE , such as the blinded input data and can alter computational results performed on the GPU . Since model protection is outside of the scope we assume the adversary can access the DNN model parameters . Information-theoretic Data Privacy : We quantify information leakage in terms of the mutual information between original inputs and blinded inputs that are visible to the adversary . More precisely , from an information theoretical point of view , an adversary with an unlimited computation power who observes unlimited number of blinded inputs can not gain more information about original inputs than what our upper bound on leakage provides . This upper bound itself can be controlled by the power of noise and other blinding parameters in our design . In our implementation we selected these parameters such that the overall training or inference accuracy is not reduced due to them . In section 4 and Appendix A , we provide the details of our theoretical analysis . Computation Integrity : Since the adversary has access to blinded inputs , it can alter the returned values to the TEE to manipulate model training or inference . DarKnight can verify the computations performed in the unsecured GPU up to the computation precision . In the other words , DarKnight detects if the results are altered more than the computation precision by an adversary . 3.2 DARKNIGHT OVERVIEW DarKnight supports both private inference and training in a single framework . Fig . 1 depicts the overall execution flow of DarKnight . A cloud server with an SGX enclave and GPU accelerator forms the computing base . DarKnight uses SGX to blind input data while enabling GPUs to perform computationally intensive linear operations on private data . The initial model ( W ) that a user wants to train is loaded into the cloud server , and is made accessible to the untrusted GPU as well . DarKnight then uses the following steps : ( 1 ) A batch of training/inference input data set is encrypted by the client using a mutually agreed keys with SGX and sent to the server . ( 2 ) SGX decrypts the images and starts the forward and backward propagation . ( 3 ) During the forward/backward pass , each layer requires some linear and nonlinear operations . Before offloading linear operations to GPU , SGX calls DarKnight ’ s blinding mechanism to seal the data . To seal the data , DarKnight uses the notion of a virtual batch , where K inputs are linearly combined to form K coded inputs . The size of the virtual batch is limited by the size of the SGX memory that is necessary to blind K images , typically 4-8 images at a time . ( 4 ) The blinded data is offloaded to GPU for linear operation . ( 5 ) GPU performs linear operations on blinded data and returns the data back to SGX labeled as step 6 . ( 7 ) SGX decodes the received computational outputs using DarKnight ’ s decoding strategy and then performs any non-linear operations within SGX . This process is repeated both for forward and backward propagation of each layer . 3.3 PRIVACY IN INFERENCE . In this section , we start with DarKnight ’ s inference strategy . We consider a trained DNN , represented by model parameters W with L layers , which is performing inference on input x0 , which must be protected . At a layer l the inference process computes yl = 〈Wl , xl〉 , where Wl and xl represent the model parameters and inputs in layer l , and 〈· , ·〉 corresponds to the bilinear operation at that layer ( e.g . matrix product , convolution , etc. ) . After the linear operation finishes , an activation function ( g ( · ) ) creates the next layer input xl+1 = g ( yl ) . Within this context , DarKnight first receives a set of K inputs x ( 1 ) 0 , . . . , x ( K ) 0 for a batch inference from a client . Our goal is to perform linear calculations of y ( 1 ) 0 = 〈W0 , x ( 1 ) 0 〉 , . . . , y ( K ) 0 = 〈W0 , x ( K ) 0 〉 on the GPU without exposing the inputs to the GPU . Note that the subscript 0 in all these variables refers to the first layer . At this point , we drop the subscript for a more clear notation . Also , we apply x for the inputs that need to be protected and x̄ for the blinded inputs to visually distinguish different notations . Key Insight : The main idea behind DarKnight ’ s privacy protection scheme is the fact that the most computationally intensive operator ( such as convolutions ) is bilinear . Thus , instead of asking the GPU to calculate 〈W , x ( i ) 〉 , which exposes the inputs , DarKnight uses matrix masking to linearly combine the inputs and add a random noise to them . Due to the bilinear property , any linear operation on K masked inputs can be recovered if there are K different linear computations performed . Matrix Masking : Introduced by ( Cox , 1980 ; 1994 ; Kim , 1986 ; Spruill , 1983 ) , matrix masking scheme can be used for variety of reasons such as noise addition , sampling and etc . The general form of B X A+C is used for protecting Matrix X . Any of these matrices can be used for masking data based on the data privacy goal . For DarKnight we use A and C as we explain the in this section . DarKnight Matrix Masking ( Blinding ) : More specifically , DarKnight creates K + 1 inputs x̄ ( 1 ) , . . . , x̄ ( K ) , as follows , x̄ ( i ) = αi,1x ( 1 ) + · · ·+ αi , Kx ( K ) + αi , ( K+1 ) r , i = 1 , . . . , ( K + 1 ) ( 1 ) The scalars αi , j , and the noise vector r are randomly generated ; and the size of r matches that of x . The scalars αi , j ’ s are represented by matrix A , which are dynamically generated for each batch and securely stored inside SGX for unblinding . Hence , by revealing the values x̄ ( i ) ’ s to GPU , we do not expose the inputs x ( i ) ’ s . At the next step , the blinded data x̄ ( i ) ’ s are sent to the GPU which performs the following computations : ȳ ( i ) = 〈W , x̄ ( i ) 〉 , i = 1 , . . . , ( K + 1 ) . Please note that matrix A can be chosen such that its condition number close to one , so that blinding and unblinding algorithm remains numerically stable . For this purpose , orthogonal matrices serve us the best . DarKnight Unblinding : The K + 1 outputs ȳ ( i ) returned from the GPU must be unblinded to extract the original results y ( i ) . These value can be extracted as follows , Ȳ = 〈 W , [ x̄ ( 1 ) , . . . , x̄ ( K+1 ) ] 〉 = 〈 W , [ x ( 1 ) , . . . , x ( K ) , r ] 〉 ︸ ︷︷ ︸ Y ·A ⇒ Y = Ȳ ·A−1 ( 2 ) DarKnight Advantages : ( 1 ) Unlike prior works ( Tramer & Boneh , 2018 ) DarKnight does not need to store W · r within the SGX memory thereby significantly enhancing our ability to infer with much larger models . ( 2 ) size of the matrix A is proportional to the number of inputs that are blinded together ( K ) , and is orders of magnitude smaller the model size W. Hence , the order complexity of Blinding/Unblinding operations is much less than the linear operations ( 〈W , x〉 ) in a DNN with millions of parameters . ( 3 ) The process of unblinding K inputs with one random noise requires K + 1 computations . During unblinding we extract W · r , but that value is just dropped . Thus DarKnight trades 1/K additional computations in order to eliminate the need to secure very large model parameters . | The paper builds on previous work like Slalom to propose a new secure training and inference protocol in the TEE+GPU paradigm. The main technical contribution of this work is a new blinding algorithm that dramatically reduces the memory required to store the blinding parameters (decoupling it from the input/model size). The authors then build on this to extend their blinding scheme to the training use-case. | SP:1feae47cc68e37f008c8358ed960afa41f9c0019 |
Robust Imitation via Decision-Time Planning | The goal of imitation learning is to mimic expert behavior from demonstrations , without access to an explicit reward signal . A popular class of approach infers the ( unknown ) reward function via inverse reinforcement learning ( IRL ) followed by maximizing this reward function via reinforcement learning ( RL ) . The policies learned via these approaches are however very brittle in practice and deteriorate quickly even with small test-time perturbations due to compounding errors . We propose Imitation with Planning at Test-time ( IMPLANT ) , a new algorithm for imitation learning that utilizes decision-time planning to correct for compounding errors of any base imitation policy . In contrast to existing approaches , we retain both the imitation policy and the rewards model at decision-time , thereby benefiting from the learning signal of the two components . Empirically , we demonstrate that IMPLANT significantly outperforms benchmark imitation learning approaches on standard control environments and excels at zero-shot generalization when subject to challenging perturbations in test-time dynamics . 1 INTRODUCTION . The objective of imitation learning is to optimize agent policies directly from demonstrations of expert behavior . Such a learning paradigm sidesteps reward engineering , which is a key bottleneck for applying reinforcement learning ( RL ) in many real-world domains , e.g. , autonomous driving , robotics . In the presence of a finite dataset of expert demonstrations however , a key challenge with current approaches is that the learned policies can quickly deviate from intended expert behavior and lead to compounding errors at test-time ( Osa et al. , 2018 ) . Moreover , it has been observed that imitation policies can be brittle and drastically deteriorate in performance with even small perturbations to the dynamics during execution ( Christiano et al. , 2016 ; de Haan et al. , 2019 ) . A predominant class of approaches to imitation learning is based on inverse reinforcement learning ( IRL ) and involve successive application of two steps : ( a ) an IRL step where the agent infers the ( unknown ) reward function for the expert , followed by ( b ) an RL step where the agent maximizes the inferred reward function via a policy optimization algorithm . For example , many popular IRL approaches consider an adversarial learning framework ( Goodfellow et al. , 2014 ) , where the reward function is inferred by a discriminator that distinguishes expert demonstrations from roll-outs of an imitation policy [ IRL step ] and the imitation agent maximizes the inferred reward function to best match the expert policy [ RL step ] ( Ho & Ermon , 2016 ; Fu et al. , 2017 ) . In this sense , reward inference is only an intermediary step towards learning the expert policy and is discarded posttraining of the imitation agent . We introduce Imitation with Planning at Test-time ( IMPLANT ) , a new algorithm for imitation learning that incorporates decision-time planning within an IRL algorithm . During training , we can use any standard IRL approach to estimate a reward function and a stochastic imitation policy , along with an additional value function . The value function can be learned explicitly or is often a byproduct of standard RL algorithms that involve policy evaluation , such as actor-critic methods ( Konda & Tsitsiklis , 2000 ; Peters & Schaal , 2008 ) . At decision-time , we use the learned imitation policy in conjunction with a closed-loop planner . For any given state , the imitation policy proposes a set of candidate actions and the planner estimates the returns for each of actions by performing fixedhorizon rollouts . The rollout returns are estimated using the learned reward and value functions . Finally , the agent picks the action with the highest estimated return and the process is repeated at each of the subsequent timesteps . Conceptually , IMPLANT aims to counteract the imperfections due to policy optimization in the RL step by using the reward function ( along with a value function ) estimated in the IRL step for decision-time planning . We demonstrate strong empirical improvements using this approach over benchmark imitation learning algorithms in a variety settings derived from the MuJoCo-based benchmarks in OpenAI Gym ( Todorov et al. , 2012 ; Brockman et al. , 2016 ) . In default evaluation setup where train and test environments match , we observe that IMPLANT improves by 16.5 % on average over the closest baseline . We also consider transfer setups where the imitation agent is deployed in test dynamics that differ from train dynamics and the test dynamics are inaccessible to the agent during both training and decision-time planning . In particular , we consider the following three setups : ( a ) “ causal confusion ” where the agent observes nuisance variables in the state representation during training ( de Haan et al. , 2019 ) , ( b ) motor noise which adds noise in the executed actions during testing ( Christiano et al. , 2016 ) , and ( c ) transition noise which adds noise to the next state distribution during testing . In all these setups , we observe that IMPLANT consistently and robustly transfers to test environments with improvements of 35.2 % on average over the closest baseline . 2 PRELIMINARIES . Problem Setup . We consider the framework of Markov Decision Processes ( MDP ) ( Puterman , 1990 ) . An MDP is denoted by a tupleM = ( S , A , T , p0 , r , γ ) , where S is the state space , A is the action space , T : S × A × S → R≥0 are the stochastic transition dynamics , p0 : S → R≥0 is the initial state distribution , r : S ×A → R is the reward function , and γ ∈ [ 0 , 1 ) is the discount factor . We assume an infinite horizon setting . At any given state s ∈ S , an agent makes decisions via a stochastic policy π : S × A → R≥0 . We denote a trajectory to be a sequence of state-action pairs τ = ( s0 , a0 , s1 , a1 , · · · ) . Any policy π , along with MDP parameters , induces a distribution over trajectories , which can be expressed as pπ ( τ ) = p ( s0 ) ∏∞ t=0 π ( at|st ) T ( st+1|st , at ) . The return of a trajectory is the discounted sum of rewards R ( τ ) = ∑∞ t=0 γ tr ( st , at ) . In reinforcement learning ( RL ) , the goal is to learn a parameterized policy πθ that maximizes the expected returns w.r.t . the trajectory distribution . Maximizing such an objective requires interaction with the underlying MDP for simulating trajectories and querying rewards . However , in many highstakes scenarios , the reward function is not directly accessible and hard to manually design . In imitation learning , we sidestep the availability of the reward function . Instead , we have access to a finite set of D trajectories τE ( a.k.a . demonstrations ) that are sampled from an expert policy πE . Every trajectory τ ∈ τE consists of a finite length sequence of state and action pairs τ = ( s0 , a0 , s1 , a1 , · · · ) , where s0 ∼ p0 ( s ) , at ∼ πE ( ·|st ) , and st+1 ∼ T ( ·|st , at ) . Our goal is to learn a parameterized policy πθ which best approximates the expert policy given access to τE . Next , we discuss the two major families of techniques for imitation learning . 2.1 BEHAVIORAL CLONING . Behavioral cloning ( BC ) casts imitation learning as a supervised learning problem over state-action pairs provided in the expert demonstrations ( Pomerleau , 1991 ) . In particular , we learn the policy parameters by solving a regression problem with states st and actions at as the features and target labels respectively . Formally , we minimize the following objective : ` BC ( θ ) : = ∑ ( st , at ) ∈τE ‖at − πθ ( st ) ‖22 . ( 1 ) In practice , BC agents suffer from distribution shift in high dimensions , where small deviations in the learned policy quickly accumulate during deployment and lead to a significantly different trajectory distribution relative to the expert ( Ross & Bagnell , 2010 ; Ross et al. , 2011 ) . 2.2 INVERSE REINFORCEMENT LEARNING . An alternative indirect approach to imitation learning is based on inverse reinforcement learning ( IRL ) . Here , the goal is to infer a reward function for the expert and subsequently maximize the inferred reward to obtain a policy . For brevity , we focus on adversarial imitation learning approaches to IRL ( Goodfellow et al. , 2014 ) . These approaches represent the state-of-the-art in imitation learning and are also relevant baselines for our empirical evaluations . Generative Adversarial Imitation Learning ( GAIL ) is an IRL algorithm that formulates imitation learning as an “ occupancy measure matching ” objective w.r.t . a suitable probabilistic divergence ( Ho & Ermon , 2016 ) . GAIL consists of two parameterized networks : ( a ) a policy network πθ ( generator ) which is used to rollout agent trajectories ( assuming access to transition dynamics ) , and ( b ) a discriminator Dφ which distinguishes between “ real ” expert demonstrations and “ fake ” agent trajectories . Given expert trajectories τE and agent trajectories τθ , the discriminator minimizes the cross-entropy loss : ` IRL ( φ ) : = −EτE [ logDφ ( τE ) ] − Eτθ [ log ( 1−Dφ ( τθ ) ) ] . ( 2 ) We then feed the discriminator output− log ( 1−Dφ ( s , a ) ) as the inferred reward function to the generator policy . The policy parameters θ can be updated via any regular policy optimization algorithm for the RL objective , e.g. , Ho & Ermon ( 2016 ) use the TRPO algorithm ( Schulman et al. , 2015 ) . By simulating agent rollouts , GAIL seeks to match the full trajectory state-action distribution of the imitation agent with the expert as opposed to BC which greedily matches the conditional distribution of individual actions given the states . In practice , GAIL and its variants ( Li et al. , 2017 ; Fu et al. , 2017 ) outperform BC but might need excessive interactions with the training environment for sampling rollouts during training . Crucially , both BC and IRL approaches tend to fail catastrophically in the presence of small perturbations and nuisances at test-time ( de Haan et al. , 2019 ) . 3 THE IMPLANT FRAMEWORK . In the previous section , we showed that current IRL algorithms consider reward inference as an auxiliary task for imitation learning . Once the agents have been trained , the reward function is discarded and the learned policy is deployed.1 Indeed , if the RL step post reward inference ( e.g. , generator updates in GAIL ) were optimal , then the reward function provides no additional information about the expert relative to the imitation policy . However , this is far from reality , as current RL algorithms can fail to return optimal solutions due to either representational or optimization issues . For example , there might be a mismatch in the architecture of the policy network and the expert policy , and/or difficulties in optimizing non-convex objective functions . In fact , the latter challenge gets exacerbated in adversarial learning scenarios due to a non-stationary reward . Building off these observations , we propose Imitation with Planning at Test-time ( IMPLANT ) , an imitation learning algorithm that employs the learned reward function for decision-time planning . The pseudocode for IMPLANT is shown in Algorithm 1 . We can dissect IMPLANT into two sequential phases : a training phase and a planning phase . Training phase : We can invoke any IRL algorithm , e.g. , GAIL to optimize for a stochastic imitation policy πθ by optimizing for some inferred reward function rφ . Additionally , we also train a parameterized value function Vψ at this stage . Value function estimation is often a subroutine for many RL algorithms including those which are used to update the policy within the IRL setup , such as actor-critic methods ( Konda & Tsitsiklis , 2000 ) . For such algorithms , learning a value function does not incur any additional computation . Planning phase : At decision-time , we use the imitation policy along with the learned value and reward functions for closed-loop planning . We build our planner based on model-predictive control ( MPC ) ( Camacho & Alba , 2013 ) . At any given state st and time t ≥ 0 , we are interested in choosing action sequences for trajectories which maximizes the following objective : at , at+1 , · · · , = argmax at , at+1 , ··· R ( τ ) = ∞∑ t′=t γt ′−tr ( st′ , at′ ) ( 3 ) where s0 ∼ p0 and st+1 ∼ T ( ·|st , at ) for all t ≥ 0 . 1In some cases , the reward function is transferred to a new environment and a new policy is learned using the reward function and additional interactions with the new environment . See Section 5 for further discussion . Algorithm 1 : Imitation with Planning at Test-time ( IMPLANT ) 1 Input : available dynamics T̂ , expert demonstrations τE , rollout budget B , rollout policy π , horizon H , test start state s0 2 Note : For brevity , we omit relevant MDP parameters in the list of arguments 3 Function Train ( τE ) : 4 Learn a policy πθ and a reward function rφ with any existing IRL algorithm given access to demonstrations τE , e.g. , GAIL 5 Estimate a value function Vψ for πθ 6 return πθ , rφ , Vψ ; 7 Function Plan ( s , πθ , Vψ , rφ , π , H , B , T̂ ) : 8 Set s = s0 9 while agent is alive do 10 // Agent planning 11 Sample B trajectories { τ ( 1 ) , τ ( 2 ) , ... , τ ( B ) } of max length H starting from s using dynamics T̂ ; sample the first action a ( i ) 0 ∼ πθ , and sample subsequent actions from π as a ( i ) > 0 ∼ π , for i ∈ { 1 , 2 , ... , B } 12 Estimate trajectory returns R̂φ , ψ ( τ ( i ) ) using Vψ and rφ ( see Eq . 4 ) 13 Pick best action index i∗ = argmaxi R̂φ , ψ ( τ ( i ) ) and execute the best action a ( i ∗ ) 0 14 // Environment feedback 15 Observe true reward r ( s , a ( i ∗ ) 0 ) and true next state s ∼ T ( ·|s , a ( i∗ ) 0 ) 16 end This objective has also been applied for model-based RL with a learned dynamics model and blackbox access to the rewards function ( Nagabandi et al. , 2018 ; Chua et al. , 2018 ) . Unlike the RL setting however , we do not know the reward function for imitation learning . The true dynamics model may be available for planning ( i.e. , T̂ = T ) as in Ho & Ermon ( 2016 ) or can be estimated from expert demonstrations or online interactions ( Baram et al. , 2016 ) . Hence , we can do rollouts as before in regular model-based RL but need to rely on learned estimates for the reward function . In particular , we use the learned reward function rφ up to a fixed horizon H and a terminal value function Vψ thereafter to estimate the trajectory return as : R ( τ ) ≈ t+H−1∑ t′=t γt ′−trφ ( st′ , at′ ) + γ HVψ ( sH ) : = R̂φ , ψ ( τ ) . ( 4 ) Substituting Eq . 4 in Eq . 3 , we obtain a surrogate objective for optimization . To optimize this surrogate , we propose a variant of the random shooting optimizer ( Richards , 2005 ) that works as follows . At the current state st , we first sample a set of B candidate actions independently from the imitation policy . For each candidate action , we estimate a score based on their expected returns by performing rollout ( s ) of fixed-length H . The rollout policy π from which we sample all subsequent actions could be random ( potentially high variance ) or the imitation policy πθ ( potentially high bias ) or a mixture . In our experiments , we obtained consistently better performance with using πθ as the rollout policy π . For each trajectory , we estimate its return via Eq . 4 and finally , pick the action with the largest return . Consistent with the closed-loop nature of MPC , we repeat the above procedure at the next state st . Doing so helps correct for errors in estimation and optimization in the previous time step , albeit at the expense of additional computation . The algorithm has two critical parameters that induce similar computational trade-offs . First , we need to specify a budget B for the total number of rollouts . The higher the budget , larger is our search space for the best action . Second , we need to specify a planning horizon H . For larger lengths , we need extra computation that also involves interactions with the dynamics of the environment and rely more on the learned reward function than the value function for estimating returns in Eq . 4 . However , since the rollouts are independent , we can mitigate additional computational costs by parallelizing the rollouts . While this parallelization is indeed bottlenecked by the rollout with the largest horizon , in all of our experiments , we perform rollouts of fixed length and the horizon that corresponds to the optimal performance is relatively small ( 10 ∼ 50 ) . Thus , the gains due to parallelization are significant . In the next section , we present our empirical validation that also investigates the effect of planning horizon on the performance of the algorithm in greater detail . | The paper considers imitation learning problem in the presence of small perturbations and nuisances at test-time. In particular, it proposes Imitation with Planning at Test-time (IMPLANT), a new algorithm for imitation learning that incorporates decision-time planning within an inverse reinforcement learning algorithm. To counteract the imperfection due to policy optimization in RL step, IMPLANT uses the reward function estimated in the IRL step for decision-time planning. The effectiveness of the proposed method has been empirically evaluated on two kinds of setups, i.e., the default ‘no-transfer’ setting and the ‘transfer’ setting where the test dynamics is a perturbated version of the training dynamics. | SP:367b672094c7533843751a3f82a5cc073b1c3243 |
Robust Imitation via Decision-Time Planning | The goal of imitation learning is to mimic expert behavior from demonstrations , without access to an explicit reward signal . A popular class of approach infers the ( unknown ) reward function via inverse reinforcement learning ( IRL ) followed by maximizing this reward function via reinforcement learning ( RL ) . The policies learned via these approaches are however very brittle in practice and deteriorate quickly even with small test-time perturbations due to compounding errors . We propose Imitation with Planning at Test-time ( IMPLANT ) , a new algorithm for imitation learning that utilizes decision-time planning to correct for compounding errors of any base imitation policy . In contrast to existing approaches , we retain both the imitation policy and the rewards model at decision-time , thereby benefiting from the learning signal of the two components . Empirically , we demonstrate that IMPLANT significantly outperforms benchmark imitation learning approaches on standard control environments and excels at zero-shot generalization when subject to challenging perturbations in test-time dynamics . 1 INTRODUCTION . The objective of imitation learning is to optimize agent policies directly from demonstrations of expert behavior . Such a learning paradigm sidesteps reward engineering , which is a key bottleneck for applying reinforcement learning ( RL ) in many real-world domains , e.g. , autonomous driving , robotics . In the presence of a finite dataset of expert demonstrations however , a key challenge with current approaches is that the learned policies can quickly deviate from intended expert behavior and lead to compounding errors at test-time ( Osa et al. , 2018 ) . Moreover , it has been observed that imitation policies can be brittle and drastically deteriorate in performance with even small perturbations to the dynamics during execution ( Christiano et al. , 2016 ; de Haan et al. , 2019 ) . A predominant class of approaches to imitation learning is based on inverse reinforcement learning ( IRL ) and involve successive application of two steps : ( a ) an IRL step where the agent infers the ( unknown ) reward function for the expert , followed by ( b ) an RL step where the agent maximizes the inferred reward function via a policy optimization algorithm . For example , many popular IRL approaches consider an adversarial learning framework ( Goodfellow et al. , 2014 ) , where the reward function is inferred by a discriminator that distinguishes expert demonstrations from roll-outs of an imitation policy [ IRL step ] and the imitation agent maximizes the inferred reward function to best match the expert policy [ RL step ] ( Ho & Ermon , 2016 ; Fu et al. , 2017 ) . In this sense , reward inference is only an intermediary step towards learning the expert policy and is discarded posttraining of the imitation agent . We introduce Imitation with Planning at Test-time ( IMPLANT ) , a new algorithm for imitation learning that incorporates decision-time planning within an IRL algorithm . During training , we can use any standard IRL approach to estimate a reward function and a stochastic imitation policy , along with an additional value function . The value function can be learned explicitly or is often a byproduct of standard RL algorithms that involve policy evaluation , such as actor-critic methods ( Konda & Tsitsiklis , 2000 ; Peters & Schaal , 2008 ) . At decision-time , we use the learned imitation policy in conjunction with a closed-loop planner . For any given state , the imitation policy proposes a set of candidate actions and the planner estimates the returns for each of actions by performing fixedhorizon rollouts . The rollout returns are estimated using the learned reward and value functions . Finally , the agent picks the action with the highest estimated return and the process is repeated at each of the subsequent timesteps . Conceptually , IMPLANT aims to counteract the imperfections due to policy optimization in the RL step by using the reward function ( along with a value function ) estimated in the IRL step for decision-time planning . We demonstrate strong empirical improvements using this approach over benchmark imitation learning algorithms in a variety settings derived from the MuJoCo-based benchmarks in OpenAI Gym ( Todorov et al. , 2012 ; Brockman et al. , 2016 ) . In default evaluation setup where train and test environments match , we observe that IMPLANT improves by 16.5 % on average over the closest baseline . We also consider transfer setups where the imitation agent is deployed in test dynamics that differ from train dynamics and the test dynamics are inaccessible to the agent during both training and decision-time planning . In particular , we consider the following three setups : ( a ) “ causal confusion ” where the agent observes nuisance variables in the state representation during training ( de Haan et al. , 2019 ) , ( b ) motor noise which adds noise in the executed actions during testing ( Christiano et al. , 2016 ) , and ( c ) transition noise which adds noise to the next state distribution during testing . In all these setups , we observe that IMPLANT consistently and robustly transfers to test environments with improvements of 35.2 % on average over the closest baseline . 2 PRELIMINARIES . Problem Setup . We consider the framework of Markov Decision Processes ( MDP ) ( Puterman , 1990 ) . An MDP is denoted by a tupleM = ( S , A , T , p0 , r , γ ) , where S is the state space , A is the action space , T : S × A × S → R≥0 are the stochastic transition dynamics , p0 : S → R≥0 is the initial state distribution , r : S ×A → R is the reward function , and γ ∈ [ 0 , 1 ) is the discount factor . We assume an infinite horizon setting . At any given state s ∈ S , an agent makes decisions via a stochastic policy π : S × A → R≥0 . We denote a trajectory to be a sequence of state-action pairs τ = ( s0 , a0 , s1 , a1 , · · · ) . Any policy π , along with MDP parameters , induces a distribution over trajectories , which can be expressed as pπ ( τ ) = p ( s0 ) ∏∞ t=0 π ( at|st ) T ( st+1|st , at ) . The return of a trajectory is the discounted sum of rewards R ( τ ) = ∑∞ t=0 γ tr ( st , at ) . In reinforcement learning ( RL ) , the goal is to learn a parameterized policy πθ that maximizes the expected returns w.r.t . the trajectory distribution . Maximizing such an objective requires interaction with the underlying MDP for simulating trajectories and querying rewards . However , in many highstakes scenarios , the reward function is not directly accessible and hard to manually design . In imitation learning , we sidestep the availability of the reward function . Instead , we have access to a finite set of D trajectories τE ( a.k.a . demonstrations ) that are sampled from an expert policy πE . Every trajectory τ ∈ τE consists of a finite length sequence of state and action pairs τ = ( s0 , a0 , s1 , a1 , · · · ) , where s0 ∼ p0 ( s ) , at ∼ πE ( ·|st ) , and st+1 ∼ T ( ·|st , at ) . Our goal is to learn a parameterized policy πθ which best approximates the expert policy given access to τE . Next , we discuss the two major families of techniques for imitation learning . 2.1 BEHAVIORAL CLONING . Behavioral cloning ( BC ) casts imitation learning as a supervised learning problem over state-action pairs provided in the expert demonstrations ( Pomerleau , 1991 ) . In particular , we learn the policy parameters by solving a regression problem with states st and actions at as the features and target labels respectively . Formally , we minimize the following objective : ` BC ( θ ) : = ∑ ( st , at ) ∈τE ‖at − πθ ( st ) ‖22 . ( 1 ) In practice , BC agents suffer from distribution shift in high dimensions , where small deviations in the learned policy quickly accumulate during deployment and lead to a significantly different trajectory distribution relative to the expert ( Ross & Bagnell , 2010 ; Ross et al. , 2011 ) . 2.2 INVERSE REINFORCEMENT LEARNING . An alternative indirect approach to imitation learning is based on inverse reinforcement learning ( IRL ) . Here , the goal is to infer a reward function for the expert and subsequently maximize the inferred reward to obtain a policy . For brevity , we focus on adversarial imitation learning approaches to IRL ( Goodfellow et al. , 2014 ) . These approaches represent the state-of-the-art in imitation learning and are also relevant baselines for our empirical evaluations . Generative Adversarial Imitation Learning ( GAIL ) is an IRL algorithm that formulates imitation learning as an “ occupancy measure matching ” objective w.r.t . a suitable probabilistic divergence ( Ho & Ermon , 2016 ) . GAIL consists of two parameterized networks : ( a ) a policy network πθ ( generator ) which is used to rollout agent trajectories ( assuming access to transition dynamics ) , and ( b ) a discriminator Dφ which distinguishes between “ real ” expert demonstrations and “ fake ” agent trajectories . Given expert trajectories τE and agent trajectories τθ , the discriminator minimizes the cross-entropy loss : ` IRL ( φ ) : = −EτE [ logDφ ( τE ) ] − Eτθ [ log ( 1−Dφ ( τθ ) ) ] . ( 2 ) We then feed the discriminator output− log ( 1−Dφ ( s , a ) ) as the inferred reward function to the generator policy . The policy parameters θ can be updated via any regular policy optimization algorithm for the RL objective , e.g. , Ho & Ermon ( 2016 ) use the TRPO algorithm ( Schulman et al. , 2015 ) . By simulating agent rollouts , GAIL seeks to match the full trajectory state-action distribution of the imitation agent with the expert as opposed to BC which greedily matches the conditional distribution of individual actions given the states . In practice , GAIL and its variants ( Li et al. , 2017 ; Fu et al. , 2017 ) outperform BC but might need excessive interactions with the training environment for sampling rollouts during training . Crucially , both BC and IRL approaches tend to fail catastrophically in the presence of small perturbations and nuisances at test-time ( de Haan et al. , 2019 ) . 3 THE IMPLANT FRAMEWORK . In the previous section , we showed that current IRL algorithms consider reward inference as an auxiliary task for imitation learning . Once the agents have been trained , the reward function is discarded and the learned policy is deployed.1 Indeed , if the RL step post reward inference ( e.g. , generator updates in GAIL ) were optimal , then the reward function provides no additional information about the expert relative to the imitation policy . However , this is far from reality , as current RL algorithms can fail to return optimal solutions due to either representational or optimization issues . For example , there might be a mismatch in the architecture of the policy network and the expert policy , and/or difficulties in optimizing non-convex objective functions . In fact , the latter challenge gets exacerbated in adversarial learning scenarios due to a non-stationary reward . Building off these observations , we propose Imitation with Planning at Test-time ( IMPLANT ) , an imitation learning algorithm that employs the learned reward function for decision-time planning . The pseudocode for IMPLANT is shown in Algorithm 1 . We can dissect IMPLANT into two sequential phases : a training phase and a planning phase . Training phase : We can invoke any IRL algorithm , e.g. , GAIL to optimize for a stochastic imitation policy πθ by optimizing for some inferred reward function rφ . Additionally , we also train a parameterized value function Vψ at this stage . Value function estimation is often a subroutine for many RL algorithms including those which are used to update the policy within the IRL setup , such as actor-critic methods ( Konda & Tsitsiklis , 2000 ) . For such algorithms , learning a value function does not incur any additional computation . Planning phase : At decision-time , we use the imitation policy along with the learned value and reward functions for closed-loop planning . We build our planner based on model-predictive control ( MPC ) ( Camacho & Alba , 2013 ) . At any given state st and time t ≥ 0 , we are interested in choosing action sequences for trajectories which maximizes the following objective : at , at+1 , · · · , = argmax at , at+1 , ··· R ( τ ) = ∞∑ t′=t γt ′−tr ( st′ , at′ ) ( 3 ) where s0 ∼ p0 and st+1 ∼ T ( ·|st , at ) for all t ≥ 0 . 1In some cases , the reward function is transferred to a new environment and a new policy is learned using the reward function and additional interactions with the new environment . See Section 5 for further discussion . Algorithm 1 : Imitation with Planning at Test-time ( IMPLANT ) 1 Input : available dynamics T̂ , expert demonstrations τE , rollout budget B , rollout policy π , horizon H , test start state s0 2 Note : For brevity , we omit relevant MDP parameters in the list of arguments 3 Function Train ( τE ) : 4 Learn a policy πθ and a reward function rφ with any existing IRL algorithm given access to demonstrations τE , e.g. , GAIL 5 Estimate a value function Vψ for πθ 6 return πθ , rφ , Vψ ; 7 Function Plan ( s , πθ , Vψ , rφ , π , H , B , T̂ ) : 8 Set s = s0 9 while agent is alive do 10 // Agent planning 11 Sample B trajectories { τ ( 1 ) , τ ( 2 ) , ... , τ ( B ) } of max length H starting from s using dynamics T̂ ; sample the first action a ( i ) 0 ∼ πθ , and sample subsequent actions from π as a ( i ) > 0 ∼ π , for i ∈ { 1 , 2 , ... , B } 12 Estimate trajectory returns R̂φ , ψ ( τ ( i ) ) using Vψ and rφ ( see Eq . 4 ) 13 Pick best action index i∗ = argmaxi R̂φ , ψ ( τ ( i ) ) and execute the best action a ( i ∗ ) 0 14 // Environment feedback 15 Observe true reward r ( s , a ( i ∗ ) 0 ) and true next state s ∼ T ( ·|s , a ( i∗ ) 0 ) 16 end This objective has also been applied for model-based RL with a learned dynamics model and blackbox access to the rewards function ( Nagabandi et al. , 2018 ; Chua et al. , 2018 ) . Unlike the RL setting however , we do not know the reward function for imitation learning . The true dynamics model may be available for planning ( i.e. , T̂ = T ) as in Ho & Ermon ( 2016 ) or can be estimated from expert demonstrations or online interactions ( Baram et al. , 2016 ) . Hence , we can do rollouts as before in regular model-based RL but need to rely on learned estimates for the reward function . In particular , we use the learned reward function rφ up to a fixed horizon H and a terminal value function Vψ thereafter to estimate the trajectory return as : R ( τ ) ≈ t+H−1∑ t′=t γt ′−trφ ( st′ , at′ ) + γ HVψ ( sH ) : = R̂φ , ψ ( τ ) . ( 4 ) Substituting Eq . 4 in Eq . 3 , we obtain a surrogate objective for optimization . To optimize this surrogate , we propose a variant of the random shooting optimizer ( Richards , 2005 ) that works as follows . At the current state st , we first sample a set of B candidate actions independently from the imitation policy . For each candidate action , we estimate a score based on their expected returns by performing rollout ( s ) of fixed-length H . The rollout policy π from which we sample all subsequent actions could be random ( potentially high variance ) or the imitation policy πθ ( potentially high bias ) or a mixture . In our experiments , we obtained consistently better performance with using πθ as the rollout policy π . For each trajectory , we estimate its return via Eq . 4 and finally , pick the action with the largest return . Consistent with the closed-loop nature of MPC , we repeat the above procedure at the next state st . Doing so helps correct for errors in estimation and optimization in the previous time step , albeit at the expense of additional computation . The algorithm has two critical parameters that induce similar computational trade-offs . First , we need to specify a budget B for the total number of rollouts . The higher the budget , larger is our search space for the best action . Second , we need to specify a planning horizon H . For larger lengths , we need extra computation that also involves interactions with the dynamics of the environment and rely more on the learned reward function than the value function for estimating returns in Eq . 4 . However , since the rollouts are independent , we can mitigate additional computational costs by parallelizing the rollouts . While this parallelization is indeed bottlenecked by the rollout with the largest horizon , in all of our experiments , we perform rollouts of fixed length and the horizon that corresponds to the optimal performance is relatively small ( 10 ∼ 50 ) . Thus , the gains due to parallelization are significant . In the next section , we present our empirical validation that also investigates the effect of planning horizon on the performance of the algorithm in greater detail . | The authors propose a method to enhance imitation learning by using MPC on the reward function learned by an imitation learning approach. The chosen MPC approach uses the learned policy to generate candidates for a search process that maximizes the reward. To learn the reward function, the authors propose to use GAIL. Besides showing improved performance in a typical benchmark scenario, the authors compare their method with GAIL in various scenarios where some form of transfer is required. The writing is generally clear and easy to understand. | SP:367b672094c7533843751a3f82a5cc073b1c3243 |
Manifold-aware Training: Increase Adversarial Robustness with Feature Clustering | 1 INTRODUCTION . 1.1 BACKGROUND . Convolutional neural networks ( CNNs ) are increasingly used in recent years due to their high adaptivity and flexibility . However , Szegedy et al . ( 2014 ) discovered that by maximizing the loss of a CNN model w.r.t the input data , one can find a small and imperceptible perturbation which causes misclassification errors of the CNN . The proposed method for constructing such perturbations was designated as the Fast Gradient Sign Method ( FGSM ) , while the corrupted data ( with perturbation ) were referred to as adversarial examples . Since that time , many algorithms for constructing such perturbations have been proposed , where these algorithms are referred to generally as adversarial attack methods ( e.g. , Madry et al . ( 2018 ) ; Carlini & Wagner ( 2017 ) ; Rony et al . ( 2019 ) ; Brendel et al . ( 2018 ) ; Chen et al . ( 2017 ) ; Alzantot et al . ( 2019 ) ; Ru et al . ( 2020 ) ; Al-Dujaili & O ’ Reilly ( 2020 ) ) . Among them , Projected Gradient Descent ( PGD ) ( Kurakin et al. , 2017 ) and Carlini & Wagner ( C & W ) ( Carlini & Wagner , 2017 ) attacks are the most widely-used methods . Specifically , PGD is a multi-step variant of FGSM , which exhibits higher attack success rate , and C & W attack leverages an objective function designed to jointly minimize the perturbation norm and likelihood of the input being correctly classified . The existence of adversarial examples implies an underlying inconsistency between the decision-making processes of CNN models and humans , and can be catastrophic in life-and-death applications , such as automated vehicles or medical diagnosis systems , in which unpredictable noise may cause the CNN to misclassify the inputs . Various countermeasures for thwarting adversarial attacks , known as adversarial defenses , have been proposed . One of the most common forms in adversarial defense is to augment the training dataset with adversarial examples so as to increase the generalization ability of the CNN toward these patterns . Such a technique is known as adversarial training ( Shaham et al. , 2015 ; Zhang et al. , 2019 ; Wang et al. , 2020 ) . However , while such methods can achieve state-of-the-art robustness in terms of robust accuracy ( i.e. , the accuracy of adversarial examples ) , training robust classifiers is a non-trivial task . For example , Nakkiran ( 2019 ) showed that significantly higher model capacity is required for robust training , while Schmidt et al . ( 2018 ) proved that robust training requires a significantly larger number of data instances than natural training . 1.2 MOTIVATION AND CONTRIBUTIONS . The study commences by observing the distribution properties of the features learned by existing training methods in order to obtain a better understanding of the adversarial example problem . In particular , the t-SNE dimension reduction method ( van der Maaten & Hinton , 2008 ) is used to visualize the extracted features , as illustrated in Figures 1 . The observation results reveal the following feature distribution properties : • Non-clustering : same-class features are not always clustered together ( i.e. , some points leave the clusters of their respective colors in Figure 1 ) , which is at odds with intuition , which expects that the representative ( for classification ) features of same-class samples should be similar to one another . • Confusing-distance : closeness between samples in the feature space does not imply resemblance of their prediction ( especially for adversarial examples , as there are many triangles colored differently than surrounding points in Figure 1 ( b ) ) . We confirm the validity of these observations through a numerical analysis of the matching rate between the closest cluster dominant class and the predicted class . Clustering analysis algorithms ( e.g. , Ward ’ s Hierarchical Clustering algorithm ( Ward , 1963 ) ) are leveraged to find the clusters formed by the CNN-learned features . Additionally , the match rate is defined as Ex [ 1dom ( C ( x ) ) =f ( x ) ] , where C ( x ) is the closest cluster to x ( C ( x ) = argminC dist ( C , x ) ) and dom ( C ) evaluates the dominant class of a cluster ( dom ( C ) = argmaxim ( C ) i , where m ( C ) ∈ NL produces a cluster mapping vector describing the number of members of each class prediction ) . Table 1 summarizes the analysis results and confirms that both properties exist . Intuitively , a good feature extractor for classification purpose should produce similar features for all samples within the same class . On the other hand , according to Tang et al . ( 2019 ) , the existence of adversarial examples results from a mismatch between features used by human and those used by CNNs . Therefore , one intuitive approach for increasing CNN robustness is simply to drive CNN-learned features toward human-used features . However , it is impossible to understand and predict human-used features with any absolute degree of certainty . Thus , an alternative approach is to force the CNN-learned features to have some expected properties that human-used features should also have . For example , as mentioned above , features for the classification of objects belonging to the same class should be similar to one another . Based on the above observations , the present study proposes a novel training process , designated as Manifold-Aware Training ( MAT ) , for learning features which are both representative and compact . The experimental results confirm that models trained with MAT exhibit significantly higher robustness than existing state-of-the-art models . It would be clear later that our idea is , in some sense , similar to Pang et al . ( 2020 ) in that the authors proposed the Max-Mahalanobis Center ( MMC ) loss , which minimizes the distance of features to their assigned preset class centers . By showing that robustness of the model using MMC with adversarial training is higher than that using simply adversarial training , the authors claimed that high feature compactness results in locally sufficient samples , which are beneficial for robust training according to Nakkiran ( 2019 ) . Their conclusion of feature compactness helps robustness matches our idea . The main contributions of our study can be summarized as follows : • A better understanding of the relationship between robustness and the distance between adversarial examples and clean samples in the MAT-learned feature space . • Our method improves the state-of-the-art performance from 57 % to 80 % for CIFAR10 and from 96 % to 99 % for MNIST in terms of robust accuracy . The main notations used in present study are summarized in Appendix A 2 RELATED WORKS . One family of adversarial defense methods , referred to as adversarial-training-based methods , augments the training data with adversarial examples . For example , Zhang et al . ( 2019 ) defined the so-called TRADES loss , which is based on the trade-off between the clean accuracy ( i.e. , the accuracy of clean images ) and the robustness accuracy and has the form min θ 1 N N∑ i=1 J ( x ( i ) , y ( i ) ; θ ) + max x′ ( i ) ∈B ( x ( i ) ) J ′ ( x ( i ) , x′ ( i ) ; θ ) /λ , ( 1 ) where B ( x ( i ) ) denotes the lp-bounded ball ( B ( x ) = { x′ | ‖x′ − x‖p ≤ } ) , and J ( · , · ; θ ) and J ′ ( · , · ; θ ) are implemented using the cross-entropy loss and the Kullback-Leibler divergence criterion , respectively . Ding et al . ( 2020 ) proposed the Max Margin Adversarial ( MMA ) training method , which minimizes the cross-entropy loss for misclassified samples and maximizes the margin between them and the nearest decision boundaries for correctly classified samples . The authors proved that by minimizing the cross-entropy loss of the samples on the decision boundaries , the margin can be maximized . Wang et al . ( 2020 ) found that misclassified samples bring more robustness when used in adversarial training than correctly classified ones . Inspired by this observation , the authors proposed an objective function that encouraged stability around misclassified samples and optimized the classification loss for adversarial examples . While the adversarial-training-based methods achieve state-of-the-art robust accuracy , they inherit some limitations ( Nakkiran , 2019 ; Schmidt et al. , 2018 ) . Some studies try to alleviate these limitations to further improve the CNN robustness . For examples , according to the work of Schmidt et al . ( 2018 ) , robust training requires significantly more samples than natural training . However , high sample density may make the training samples locally sufficient for robust training . Therefore , Pang et al . ( 2020 ) proposed the Max-Mahalanobis Center ( MMC ) loss as follows : LMMC ( φ ( x ) , y ) = 1 2 ‖φ ( x ) − µ ( y ) ‖22 , ( 2 ) where φ ( · ) is a CNN feature extractor , and µy denotes the pre-set class center for class y. Additionally , the authors analyzed the limitations of traditional softmax and cross-entropy ( SCE ) loss based training methods regarding the induced sample density in the feature space . The authors then proved that the feature density induced by the MMC loss is guaranteed to be high around the centers ( µ ( y ) ) . To our knowledge , however , improving the robustness of CNNs by manipulating the feature space attracts little attention . In view of this , we propose a novel defense method by training CNNs with loss functions designed to induce feature compactness and improve the state-of-the-art robustness significantly . 3 PROPOSED METHOD . The proposed Manifold-Aware Training ( MAT ) algorithm is introduced in Subsection 3.1 , and two additional loss functions to further improve the performance of MAT are described in Subsection 3.2 . Moreover , a transformation technique designed to architecturally transform MAT-trained CNNs into traditional CNNs for compatibility with existing techniques is presented in Subsection 3.3 . 3.1 MANIFOLD-AWARE TRAINING ( MAT ) . Recall the observed properties of features learned by traditional CNNs , i.e. , the non-clustering property and the confusing-distance property ( see Section 1 ) . This subsection introduces our proposed loss function to achieve intra-class feature compactness and inter-class feature dispersion . Specifically , the loss function minimizes the distance of CNN output features to their corresponding class centers while the class centers are far from one another . According to Pang et al . ( 2020 ) , fixing class centers during the training phase makes better performance than updating them while learning for another objective ( e.g. , intra-class feature compactness ) since the CNN can focus on one objective rather than seeking a trade-off between multiple objectives . To ensure the pre-defined class centers are far from one another ( to ensure inter-class dispersion ) , the distance between the samples is measured using the cosine-distance ( CD ( a , b ) = 1− cos ( a , b ) , where cos ( a , b ) = ( a ·b ) / ( ‖a‖2‖b‖2 ) ) and the class centers are generated using the algorithm proposed by Pang et al . ( 2018 ) , i.e. , the Max-Mahalanobis Distribution ( MMD ) centers . The generated center vectors are the vertices of an L-dimensional simplex such that the included angles between class center vectors are maximized , i.e. , { µ ( 1 ) , ... , µ ( L ) } = argmin µ max i 6=j µ ( i ) · µ ( j ) , ‖µ ( k ) ‖2 = C ∀ 1 ≤ k ≤ L. ( 3 ) Note that the details of the generation algorithm and examples of MMD centers are provided in Appendix B . Accordingly , the proposed loss function for intra-class compactness , i.e. , Feature To Center ( FTC ) loss , is defined as LFTC ( x , y ) = CD ( φ ( x ) , µ ( y ) ) . ( 4 ) In addition , in the inference phase , an input images x is predicted to belong to class ŷ as : ŷ = f ( x ) = argmin 1≤k≤L CD ( φ ( x ) , µ ( k ) ) = argmax 1≤k≤L cos ( φ ( x ) , µ ( k ) ) . ( 5 ) | Results: To defend against adversarial attacks, this work experimentally analyzes the feature distribution of traditionally- trained CNNs for gaining more knowledge about adversarial examples. Two properties, i.e., the non-clustering property and confusing-distance property, of the feature distribution are identified by means of t-SNE visualization and clustering analysis (showing the limitations regarding representativeness) in Figure 1. The authors introduce a loss function which separates out cluster centers of CNN output features, setting them as far as possible - so that model accuracy is preserved while strengthening robustness. They test on two datasets: CIFAR10, MNIST, and show improvements in "robustness" of the model. | SP:4fc7700df32695121eeb7c7a858077c45c50b44d |
Manifold-aware Training: Increase Adversarial Robustness with Feature Clustering | 1 INTRODUCTION . 1.1 BACKGROUND . Convolutional neural networks ( CNNs ) are increasingly used in recent years due to their high adaptivity and flexibility . However , Szegedy et al . ( 2014 ) discovered that by maximizing the loss of a CNN model w.r.t the input data , one can find a small and imperceptible perturbation which causes misclassification errors of the CNN . The proposed method for constructing such perturbations was designated as the Fast Gradient Sign Method ( FGSM ) , while the corrupted data ( with perturbation ) were referred to as adversarial examples . Since that time , many algorithms for constructing such perturbations have been proposed , where these algorithms are referred to generally as adversarial attack methods ( e.g. , Madry et al . ( 2018 ) ; Carlini & Wagner ( 2017 ) ; Rony et al . ( 2019 ) ; Brendel et al . ( 2018 ) ; Chen et al . ( 2017 ) ; Alzantot et al . ( 2019 ) ; Ru et al . ( 2020 ) ; Al-Dujaili & O ’ Reilly ( 2020 ) ) . Among them , Projected Gradient Descent ( PGD ) ( Kurakin et al. , 2017 ) and Carlini & Wagner ( C & W ) ( Carlini & Wagner , 2017 ) attacks are the most widely-used methods . Specifically , PGD is a multi-step variant of FGSM , which exhibits higher attack success rate , and C & W attack leverages an objective function designed to jointly minimize the perturbation norm and likelihood of the input being correctly classified . The existence of adversarial examples implies an underlying inconsistency between the decision-making processes of CNN models and humans , and can be catastrophic in life-and-death applications , such as automated vehicles or medical diagnosis systems , in which unpredictable noise may cause the CNN to misclassify the inputs . Various countermeasures for thwarting adversarial attacks , known as adversarial defenses , have been proposed . One of the most common forms in adversarial defense is to augment the training dataset with adversarial examples so as to increase the generalization ability of the CNN toward these patterns . Such a technique is known as adversarial training ( Shaham et al. , 2015 ; Zhang et al. , 2019 ; Wang et al. , 2020 ) . However , while such methods can achieve state-of-the-art robustness in terms of robust accuracy ( i.e. , the accuracy of adversarial examples ) , training robust classifiers is a non-trivial task . For example , Nakkiran ( 2019 ) showed that significantly higher model capacity is required for robust training , while Schmidt et al . ( 2018 ) proved that robust training requires a significantly larger number of data instances than natural training . 1.2 MOTIVATION AND CONTRIBUTIONS . The study commences by observing the distribution properties of the features learned by existing training methods in order to obtain a better understanding of the adversarial example problem . In particular , the t-SNE dimension reduction method ( van der Maaten & Hinton , 2008 ) is used to visualize the extracted features , as illustrated in Figures 1 . The observation results reveal the following feature distribution properties : • Non-clustering : same-class features are not always clustered together ( i.e. , some points leave the clusters of their respective colors in Figure 1 ) , which is at odds with intuition , which expects that the representative ( for classification ) features of same-class samples should be similar to one another . • Confusing-distance : closeness between samples in the feature space does not imply resemblance of their prediction ( especially for adversarial examples , as there are many triangles colored differently than surrounding points in Figure 1 ( b ) ) . We confirm the validity of these observations through a numerical analysis of the matching rate between the closest cluster dominant class and the predicted class . Clustering analysis algorithms ( e.g. , Ward ’ s Hierarchical Clustering algorithm ( Ward , 1963 ) ) are leveraged to find the clusters formed by the CNN-learned features . Additionally , the match rate is defined as Ex [ 1dom ( C ( x ) ) =f ( x ) ] , where C ( x ) is the closest cluster to x ( C ( x ) = argminC dist ( C , x ) ) and dom ( C ) evaluates the dominant class of a cluster ( dom ( C ) = argmaxim ( C ) i , where m ( C ) ∈ NL produces a cluster mapping vector describing the number of members of each class prediction ) . Table 1 summarizes the analysis results and confirms that both properties exist . Intuitively , a good feature extractor for classification purpose should produce similar features for all samples within the same class . On the other hand , according to Tang et al . ( 2019 ) , the existence of adversarial examples results from a mismatch between features used by human and those used by CNNs . Therefore , one intuitive approach for increasing CNN robustness is simply to drive CNN-learned features toward human-used features . However , it is impossible to understand and predict human-used features with any absolute degree of certainty . Thus , an alternative approach is to force the CNN-learned features to have some expected properties that human-used features should also have . For example , as mentioned above , features for the classification of objects belonging to the same class should be similar to one another . Based on the above observations , the present study proposes a novel training process , designated as Manifold-Aware Training ( MAT ) , for learning features which are both representative and compact . The experimental results confirm that models trained with MAT exhibit significantly higher robustness than existing state-of-the-art models . It would be clear later that our idea is , in some sense , similar to Pang et al . ( 2020 ) in that the authors proposed the Max-Mahalanobis Center ( MMC ) loss , which minimizes the distance of features to their assigned preset class centers . By showing that robustness of the model using MMC with adversarial training is higher than that using simply adversarial training , the authors claimed that high feature compactness results in locally sufficient samples , which are beneficial for robust training according to Nakkiran ( 2019 ) . Their conclusion of feature compactness helps robustness matches our idea . The main contributions of our study can be summarized as follows : • A better understanding of the relationship between robustness and the distance between adversarial examples and clean samples in the MAT-learned feature space . • Our method improves the state-of-the-art performance from 57 % to 80 % for CIFAR10 and from 96 % to 99 % for MNIST in terms of robust accuracy . The main notations used in present study are summarized in Appendix A 2 RELATED WORKS . One family of adversarial defense methods , referred to as adversarial-training-based methods , augments the training data with adversarial examples . For example , Zhang et al . ( 2019 ) defined the so-called TRADES loss , which is based on the trade-off between the clean accuracy ( i.e. , the accuracy of clean images ) and the robustness accuracy and has the form min θ 1 N N∑ i=1 J ( x ( i ) , y ( i ) ; θ ) + max x′ ( i ) ∈B ( x ( i ) ) J ′ ( x ( i ) , x′ ( i ) ; θ ) /λ , ( 1 ) where B ( x ( i ) ) denotes the lp-bounded ball ( B ( x ) = { x′ | ‖x′ − x‖p ≤ } ) , and J ( · , · ; θ ) and J ′ ( · , · ; θ ) are implemented using the cross-entropy loss and the Kullback-Leibler divergence criterion , respectively . Ding et al . ( 2020 ) proposed the Max Margin Adversarial ( MMA ) training method , which minimizes the cross-entropy loss for misclassified samples and maximizes the margin between them and the nearest decision boundaries for correctly classified samples . The authors proved that by minimizing the cross-entropy loss of the samples on the decision boundaries , the margin can be maximized . Wang et al . ( 2020 ) found that misclassified samples bring more robustness when used in adversarial training than correctly classified ones . Inspired by this observation , the authors proposed an objective function that encouraged stability around misclassified samples and optimized the classification loss for adversarial examples . While the adversarial-training-based methods achieve state-of-the-art robust accuracy , they inherit some limitations ( Nakkiran , 2019 ; Schmidt et al. , 2018 ) . Some studies try to alleviate these limitations to further improve the CNN robustness . For examples , according to the work of Schmidt et al . ( 2018 ) , robust training requires significantly more samples than natural training . However , high sample density may make the training samples locally sufficient for robust training . Therefore , Pang et al . ( 2020 ) proposed the Max-Mahalanobis Center ( MMC ) loss as follows : LMMC ( φ ( x ) , y ) = 1 2 ‖φ ( x ) − µ ( y ) ‖22 , ( 2 ) where φ ( · ) is a CNN feature extractor , and µy denotes the pre-set class center for class y. Additionally , the authors analyzed the limitations of traditional softmax and cross-entropy ( SCE ) loss based training methods regarding the induced sample density in the feature space . The authors then proved that the feature density induced by the MMC loss is guaranteed to be high around the centers ( µ ( y ) ) . To our knowledge , however , improving the robustness of CNNs by manipulating the feature space attracts little attention . In view of this , we propose a novel defense method by training CNNs with loss functions designed to induce feature compactness and improve the state-of-the-art robustness significantly . 3 PROPOSED METHOD . The proposed Manifold-Aware Training ( MAT ) algorithm is introduced in Subsection 3.1 , and two additional loss functions to further improve the performance of MAT are described in Subsection 3.2 . Moreover , a transformation technique designed to architecturally transform MAT-trained CNNs into traditional CNNs for compatibility with existing techniques is presented in Subsection 3.3 . 3.1 MANIFOLD-AWARE TRAINING ( MAT ) . Recall the observed properties of features learned by traditional CNNs , i.e. , the non-clustering property and the confusing-distance property ( see Section 1 ) . This subsection introduces our proposed loss function to achieve intra-class feature compactness and inter-class feature dispersion . Specifically , the loss function minimizes the distance of CNN output features to their corresponding class centers while the class centers are far from one another . According to Pang et al . ( 2020 ) , fixing class centers during the training phase makes better performance than updating them while learning for another objective ( e.g. , intra-class feature compactness ) since the CNN can focus on one objective rather than seeking a trade-off between multiple objectives . To ensure the pre-defined class centers are far from one another ( to ensure inter-class dispersion ) , the distance between the samples is measured using the cosine-distance ( CD ( a , b ) = 1− cos ( a , b ) , where cos ( a , b ) = ( a ·b ) / ( ‖a‖2‖b‖2 ) ) and the class centers are generated using the algorithm proposed by Pang et al . ( 2018 ) , i.e. , the Max-Mahalanobis Distribution ( MMD ) centers . The generated center vectors are the vertices of an L-dimensional simplex such that the included angles between class center vectors are maximized , i.e. , { µ ( 1 ) , ... , µ ( L ) } = argmin µ max i 6=j µ ( i ) · µ ( j ) , ‖µ ( k ) ‖2 = C ∀ 1 ≤ k ≤ L. ( 3 ) Note that the details of the generation algorithm and examples of MMD centers are provided in Appendix B . Accordingly , the proposed loss function for intra-class compactness , i.e. , Feature To Center ( FTC ) loss , is defined as LFTC ( x , y ) = CD ( φ ( x ) , µ ( y ) ) . ( 4 ) In addition , in the inference phase , an input images x is predicted to belong to class ŷ as : ŷ = f ( x ) = argmin 1≤k≤L CD ( φ ( x ) , µ ( k ) ) = argmax 1≤k≤L cos ( φ ( x ) , µ ( k ) ) . ( 5 ) | This paper tackles the problem of training models that are robust to adversarial inputs. The authors starts by observing that previous models generate embeddings that can both (i) place same-class embeddings in different clusters and (ii) different-class embeddings in close proximity. They then introduce new loss functions that penalize these behaviors and design a training procedure (MAT) around these new losses. Finally, they show favorable performance of MAT compared to state-of-the-art techniques for addressing adversarial robustness. | SP:4fc7700df32695121eeb7c7a858077c45c50b44d |
Visualizing High-Dimensional Trajectories on the Loss-Landscape of ANNs | 1 INTRODUCTION . Artificial neural networks ( ANNs ) have been successfully used to solve a number of complex tasks in a diverse array of domains , such as object recognition , machine translation , image generation , 3D protein structure prediction and many more . Despite being highly overparameterized for the tasks they solve , and having the capacity to memorize the entire training data , ANNs tend to generalize to unseen data . This is a spectacular feat since the highly non-convex optimization typically encountered in them should ( theoretically ) be a significant obstacle to using these models ( Blum & Rivest , 1993 ) . Questions such as why ANNs favor generalization over memorization and why they find good minima even with intricate loss functions still remain largely unanswered . One promising research direction for answering them is to look at the loss-landscape of deep learning models . Recent work tried to approach this task by proposing various visualization methods . An emerging challenge here is how to look at such an extremely high dimensional optimization landscape ( linear in the number of parameters of the network ) with respect to minimized loss . In past work , loss functions and their level lines were visualized via random directions starting at a minimum , or by means of linear methods like PCA . In some case , this approach proved effective in uncovering underlying structures in the loss-landscape and link them to network characteristics , such as generalization capabilities or structural features ( Keskar et al. , 2016 ; Li et al. , 2018 ) . However , these methods have two major key drawbacks : ( 1 ) they are linear in that they only choose directions that are linear combinations of parameter axes while the loss landscape itself is highly nonlinear , and ( 2 ) they choose only two among thousands ( if not millions ) of axes to visualize and ignore all others . In this work , we utilize and adapt the PHATE dimensionality reduction method ( Moon et al. , 2019 ) , which relies on diffusion-based manifold learning , to study ANN loss landscapes by visualizing the evolution of network weights during training in low dimensions . In general , visualizations like PHATE Moon et al . ( 2019 ) are specifically designed to squeeze as much variability as possible into two dimensions , and thus provide an advantage over previous approaches . In particular our choice of using PHATE over other popular methods , such as tSNE ( van der Maaten & Hinton , 2008 ) , is due to its ability to capture global and local structures of data , and in particular to keep intact the training trajectories that are traversed through during gradient descent . Indeed , during training , the high-dimensional neural networks weights change significantly while remaining on a connected manifold defined by the support of viable configurations ( e.g. , with sufficiently low training loss ) , which we refer to when discussing the geometry of the loss landscape . We show that PHATE is suitable to track such continuous weight trajectories , as opposed to tSNE or UMAP that tend to shatter them . Moreover , our approach provides general view of relevant geometric patterns that emerge in the high-dimensional parameter space , providing insights regarding the properties of ANN training and reflecting on their impact on the loss landscape . Contributions : We propose a novel loss-landscape visualization based on a variation of PHATE , implemented with cosine distance in Section 4 . Our method is , to our knowledge , different from all other proposed methods for loss visualization in that it is naturally nonlinear and captures data characteristics from all dimensions . In Section 5.1 , we show that our method uncovers key geometric patterns characterizing loss-landscape regions surrounding good and bad generalization optima , as well as memorization optima . Finally , we establish the robustness of our method by applying it to numerous tasks , architectures , and optimizers in Sections 5.3 and 5.2 , suggesting that our method can be used in a consistent manner to validate training and design choices . 2 RELATED WORK . Loss landscape visualization methods have been proposed in numerous contexts . Goodfellow et al . ( 2014 ) proposed the “ linear path experiment ” where the loss of an ANN is evaluated at a series of points θ = ( 1− α ) θi + αθf for different values of α ∈ [ 0 , 1 ] and θi , θf corresponding to the initial parameters of the model and the found optima in parameter space respectively . This one-dimensional linear interpolation method has allowed them to show that popular state of the art ANNs typically do not encounter significant obstacles along a straight path from initialization to convergent solution . They also used the method to visualize the loss along directions connecting two distinct minima and to show that these are linearly separated by a region of higher valued loss . This method was further developed by Im et al . ( 2016 ) , who adapted it to enable the visualization of two-dimensional projections of the loss-landscape using barycentric and bilinear interpolation for groups of three or four points in parameter space . This analysis method has allowed them to establish that despite starting with the same parameter initialization , different optimization algorithms find different minima . Furthermore , they noticed that the loss-landscape around minima have characteristic shapes that are optimizer-specific and that batch-normalizations smooths the loss function . More recently , Li et al . ( 2018 ) have addressed the scale invariance and network symmetries problems discussed in Neyshabur et al . ( 2017 ) ; Dinh et al . ( 2017 ) , which prevented meaningful comparisons between loss-landscape plots from different networks . They proposed 1D and 2D linear interpolation plots , similar to past techniques , but where they used filter-wise normalized directions to remove the scaling effect . This method has allowed them to visualize and compare the regions on the loss-landscape surrounding minima coming from multiple networks in a meaningful way and to correlate the “ flatness ” of the region to the generalization capabilities of the corresponding network . Furthermore , they studied the effects of the network depth , width and the presence of skip connections on the geometry of the loss-landscape and on network generalization . The importance of loss landscape visualization methods like the one presented in this paper increases with the growing scientific community interest in furthering our understanding of ANNs . As our understanding of this landscape gets deeper , we start uncovering more and more high-dimensional and complex geometric and topological characteristics . For instance , Draxler et al . ( 2018 ) have found nonlinear pathways in parameter space connecting distinct minima , along which the training and test errors remain small and losses are consistently low . This suggests that minima are not situated in isolated valleys but rather on connected manifolds representing low loss regions . However , such characteristics are intrinsically high-dimensional , making linear methods inadequate to visualize these structures . Even in standard applications of the linear methods one inevitably asks if the thousands ( or even millions ) of unseen directions do not hide critical features of the landscape , and if the visualized linear path is relevant to what happened during training . In this paper , we suggest the use of modern dimensionality reduction techniques to study the complex loss-landscape of ANNs . Such techniques have been extensively used in recent years to successfully study the internal learned representations of deep networks and highlight their complex geometric structures and intrinsic dimensionality ( Gigante et al. , 2019 ; Horoi et al. , 2020 ; Recanatesi et al. , 2018 ; Farrell et al. , 2019 ; Maheswaranathan et al. , 2019 ) , and here we further advance this line of work to provide new applications and insights in the study of ANN optimization and generalization . 3 PRELIMINARIES : PHATE DIMENSIONALITY REDUCTION & VISUALIZATION . Given a n×m data matrix N , where n is the number of data points and m the number of features , PHATE computes low-dimensional embeddings of the data points ( dimension d to be specified by the user ) which preserve both their global and their local structure . It first computes the pairwise distance matrix D using a specified distance function φ , each element of the matrix being given by Dij = φ ( Ni , : , Nj , : ) . To better capture local affinities between data points , an affinity matrix A is computed using an α-decaying kernel with a locally-adaptive bandwidth k , i corresponding to the k-NN distance of the i-th data point . The elements of A are given by : Ai , j = Kk , α ( i , j ) = 1 2 exp ( − ( Di , j k , i ) α ) + 1 2 exp ( − ( Di , j k , j ) α ) The decaying factor α regulates the decay rate of the kernel ( smaller α⇒ kernel with lighter tails ) , α = 2 corresponding to the Gaussian . The affinity matrix is then row-normalized to obtain the diffusion operator P , a row-stochastic Markov transition matrix with element Pi , j giving the probability of jumping from the i-th to the j-th data point in one time step . One of the reasons PHATE excels at capturing global structures in data , especially high-dimensional trajectories and branches , is that it leverages the diffusion operator ( also used , Coifman & Lafon , 2006 , to construct diffusion maps ) by running the implicit Markov chain forward in time . This is accomplished by raising the matrix P to the power t , effectively taking t random walk steps and revealing intrinsic geometric structure through the affinity of the data at a scale that grows with the number of steps . The optimal value for t is automatically chosen to be the knee point of the von Neumann entropy of P. To enable dimensionality reduction while retaining diffusion geometry information from the operator , PHATE leverages information geometry to define a pairwise potential distance as an M-divergence IDi , j = ‖ logPi , : − logPj , :‖2 between corresponding t-step diffusion probability distributions of the two points , which provides a global context to each data point . The resulting information distance matrix ID is finally embedded into a visualizable low dimensional ( 2D or 3D ) space by metric multidimensional scaling ( MDS ) , thereby squeezing the intrinsic geometric information into two dimensions ( as is also done in tSNE ) , rather than producing a high dimensional alternative coordinate system like PCA or diffusion maps . We reason that since PHATE learns a data manifold via diffusion , and places points in the global context of other points , it can keep trajectories connected from beginning to end without shattering them . Indeed , this property was established quantitatively in Moon et al . ( 2019 ) via a Denoised Manifold Affinity Preservation ( DeMAP ) metric . Here , it leads to the preservation trajectory flow directions and relations between them , as demonstrated in Figure 1 , in comparison with other methods , on trajectory-like data and ANN training trajectories , as well as in our results presented in the remainder of the paper . 4 METHODS . The loss-landscape is a high dimensional function f ( θ ) that assigns a loss value to every possible vector θ in the high-dimensional parameter space of an ANN denoted Θ . The dimensionality of the space renders the task of completely visualizing the loss-landscape virtually impossible . By gathering locally connected loss-landscape patches throughout training and around minima found via gradient descent , we hope to reconstruct manifolds on which these trajectories lie . Despite the thousands , if not millions , of dimensions of the parameter space Θ , we hypothesize that these trajectories and manifolds are intrinsically of low dimensional and thus PHATE , which reduced dimensionality via manifold learning and information geometry , will help facilitate their visualization in two specific settings : 1 . To characterize the region of the loss-landscape surrounding minima ; and 2 . To simultaneously visualize multiple training trajectories corresponding to different parameter initializations and optimizers in order to make training choices . In setting ( 1 ) we use the following “ jump and retrain ” experiment . Given a trained ANN and a minimum found during training with an optimizer : • Let θo represent the vector of network parameters at the minimum ; • For seed ∈ { 0 , 1 , 2 , 3 , 4 } : – For step_size ∈ { 0.25 , 0.5 , 0.75 , 1 } : 1 . Choose the random vector vseed in the parameter space of the network Θ corre- sponding to the random seed seed ; 2 . Filter normalize the vector as proposed in Li et al . ( 2018 ) to obtain vseed ; 3 . Set the network parameters at each jump initialization to be θjump-init = θo + step_size · vseed ; 4 . Retrain for 50 epochs using optimizer with 0.9 momentum on the original training set ; 5 . Record network parameters θ for each seed and step size combination and at the end of each epoch . • Apply PHATE to the data matrix [ θseed , step_size , epoch ] and visualize the embeddings . In setting ( 2 ) , we simultaneously visualize multiple training trajectories corresponding to different parameter initializations and optimizers . Here , we simply follow the optimizer from initialization to convergence , and record the parameter vector at each step . We note that methods that pick random directions or surfaces around the minima projected to random directions are not able to visualize entire trajectories as the spaces and planes change . This is a distinct advantage of using all of the dimensions of the parameter space . In both settings , PHATE has allowed us to bypass the key drawbacks of previously proposed linear interpolation methods by : 1 . Capturing variance in data from all relevant dimensions and embed it in a low-dimensional space ; and 2. preserving high-dimensional trajectories and global structures of data in parameter space . All modern dimensionality-reduction techniques would have achieved ( 1 ) in one way or another and with various degrees of success . The reason our method is based on cosine-distance PHATE , is to better accomplishes ( 2 ) by preserving trajectories and global relationships in high-dimensional data to a greater extent than any other state-of-the-art dimensionality-reduction technique . Figure 1 demonstrates this by showing a comparison of multiple such techniques , namely PHATE , PCA , t-SNE ( van der Maaten & Hinton , 2008 ) and UMAP ( McInnes & Healy , 2018 ) , and how they each embed the results of a jump and retrain experiment ( Figure 1A and B ) and an artificial data set having a tree-like structure ( Figure 1C ) in a 2D space . While some trajectory-like structure is visible in all low-dimensional embeddings , only PHATE properly captures intra-trajectory variance . PHATE is also the only technique that captures the global relationships in between trajectories while t-SNE and UMAP have a tendency to cluster points that are close in parameter space and disregard the global structure of the data . On the artificial data set , what we observe is that the embeddings of the linear method PCA are highly affected by the noise in the data while t-SNE and UMAP have a tendency of shattering trajectories that should be connected . | This paper uses PHATE to visualize the progression of neural net parameters during learning in neural networks to provide insight into generalizable vs. non-generalizable minima, and the behaviors of different optimization algorithms. PHATE is an improvement over previous visualization techniques due to its approach to finding a manifold, allowing it to plot in two dimensions multiple trajectories that do not otherwise share a plane. This is then used to plot trajectories in "jump and retrain" experiments, in which a minimum is found, and then perturbations made to the network parameters, before restarting training. It is shown that in the networks experimented on, minima with good test set performance reliably funnel the new learning trajectories into the same minimum, while minima with poor test set performance see the perturbed initializations find other minima, thus demonstrating the "flatness vs sharpness" of minima. Trajectories produced by SGD, SGD with momentum, and Adam are also compared. Adam is shown to travel further, but along a smoother trajectory. | SP:1043d665e76e18b5418a66868d36575363717444 |
Visualizing High-Dimensional Trajectories on the Loss-Landscape of ANNs | 1 INTRODUCTION . Artificial neural networks ( ANNs ) have been successfully used to solve a number of complex tasks in a diverse array of domains , such as object recognition , machine translation , image generation , 3D protein structure prediction and many more . Despite being highly overparameterized for the tasks they solve , and having the capacity to memorize the entire training data , ANNs tend to generalize to unseen data . This is a spectacular feat since the highly non-convex optimization typically encountered in them should ( theoretically ) be a significant obstacle to using these models ( Blum & Rivest , 1993 ) . Questions such as why ANNs favor generalization over memorization and why they find good minima even with intricate loss functions still remain largely unanswered . One promising research direction for answering them is to look at the loss-landscape of deep learning models . Recent work tried to approach this task by proposing various visualization methods . An emerging challenge here is how to look at such an extremely high dimensional optimization landscape ( linear in the number of parameters of the network ) with respect to minimized loss . In past work , loss functions and their level lines were visualized via random directions starting at a minimum , or by means of linear methods like PCA . In some case , this approach proved effective in uncovering underlying structures in the loss-landscape and link them to network characteristics , such as generalization capabilities or structural features ( Keskar et al. , 2016 ; Li et al. , 2018 ) . However , these methods have two major key drawbacks : ( 1 ) they are linear in that they only choose directions that are linear combinations of parameter axes while the loss landscape itself is highly nonlinear , and ( 2 ) they choose only two among thousands ( if not millions ) of axes to visualize and ignore all others . In this work , we utilize and adapt the PHATE dimensionality reduction method ( Moon et al. , 2019 ) , which relies on diffusion-based manifold learning , to study ANN loss landscapes by visualizing the evolution of network weights during training in low dimensions . In general , visualizations like PHATE Moon et al . ( 2019 ) are specifically designed to squeeze as much variability as possible into two dimensions , and thus provide an advantage over previous approaches . In particular our choice of using PHATE over other popular methods , such as tSNE ( van der Maaten & Hinton , 2008 ) , is due to its ability to capture global and local structures of data , and in particular to keep intact the training trajectories that are traversed through during gradient descent . Indeed , during training , the high-dimensional neural networks weights change significantly while remaining on a connected manifold defined by the support of viable configurations ( e.g. , with sufficiently low training loss ) , which we refer to when discussing the geometry of the loss landscape . We show that PHATE is suitable to track such continuous weight trajectories , as opposed to tSNE or UMAP that tend to shatter them . Moreover , our approach provides general view of relevant geometric patterns that emerge in the high-dimensional parameter space , providing insights regarding the properties of ANN training and reflecting on their impact on the loss landscape . Contributions : We propose a novel loss-landscape visualization based on a variation of PHATE , implemented with cosine distance in Section 4 . Our method is , to our knowledge , different from all other proposed methods for loss visualization in that it is naturally nonlinear and captures data characteristics from all dimensions . In Section 5.1 , we show that our method uncovers key geometric patterns characterizing loss-landscape regions surrounding good and bad generalization optima , as well as memorization optima . Finally , we establish the robustness of our method by applying it to numerous tasks , architectures , and optimizers in Sections 5.3 and 5.2 , suggesting that our method can be used in a consistent manner to validate training and design choices . 2 RELATED WORK . Loss landscape visualization methods have been proposed in numerous contexts . Goodfellow et al . ( 2014 ) proposed the “ linear path experiment ” where the loss of an ANN is evaluated at a series of points θ = ( 1− α ) θi + αθf for different values of α ∈ [ 0 , 1 ] and θi , θf corresponding to the initial parameters of the model and the found optima in parameter space respectively . This one-dimensional linear interpolation method has allowed them to show that popular state of the art ANNs typically do not encounter significant obstacles along a straight path from initialization to convergent solution . They also used the method to visualize the loss along directions connecting two distinct minima and to show that these are linearly separated by a region of higher valued loss . This method was further developed by Im et al . ( 2016 ) , who adapted it to enable the visualization of two-dimensional projections of the loss-landscape using barycentric and bilinear interpolation for groups of three or four points in parameter space . This analysis method has allowed them to establish that despite starting with the same parameter initialization , different optimization algorithms find different minima . Furthermore , they noticed that the loss-landscape around minima have characteristic shapes that are optimizer-specific and that batch-normalizations smooths the loss function . More recently , Li et al . ( 2018 ) have addressed the scale invariance and network symmetries problems discussed in Neyshabur et al . ( 2017 ) ; Dinh et al . ( 2017 ) , which prevented meaningful comparisons between loss-landscape plots from different networks . They proposed 1D and 2D linear interpolation plots , similar to past techniques , but where they used filter-wise normalized directions to remove the scaling effect . This method has allowed them to visualize and compare the regions on the loss-landscape surrounding minima coming from multiple networks in a meaningful way and to correlate the “ flatness ” of the region to the generalization capabilities of the corresponding network . Furthermore , they studied the effects of the network depth , width and the presence of skip connections on the geometry of the loss-landscape and on network generalization . The importance of loss landscape visualization methods like the one presented in this paper increases with the growing scientific community interest in furthering our understanding of ANNs . As our understanding of this landscape gets deeper , we start uncovering more and more high-dimensional and complex geometric and topological characteristics . For instance , Draxler et al . ( 2018 ) have found nonlinear pathways in parameter space connecting distinct minima , along which the training and test errors remain small and losses are consistently low . This suggests that minima are not situated in isolated valleys but rather on connected manifolds representing low loss regions . However , such characteristics are intrinsically high-dimensional , making linear methods inadequate to visualize these structures . Even in standard applications of the linear methods one inevitably asks if the thousands ( or even millions ) of unseen directions do not hide critical features of the landscape , and if the visualized linear path is relevant to what happened during training . In this paper , we suggest the use of modern dimensionality reduction techniques to study the complex loss-landscape of ANNs . Such techniques have been extensively used in recent years to successfully study the internal learned representations of deep networks and highlight their complex geometric structures and intrinsic dimensionality ( Gigante et al. , 2019 ; Horoi et al. , 2020 ; Recanatesi et al. , 2018 ; Farrell et al. , 2019 ; Maheswaranathan et al. , 2019 ) , and here we further advance this line of work to provide new applications and insights in the study of ANN optimization and generalization . 3 PRELIMINARIES : PHATE DIMENSIONALITY REDUCTION & VISUALIZATION . Given a n×m data matrix N , where n is the number of data points and m the number of features , PHATE computes low-dimensional embeddings of the data points ( dimension d to be specified by the user ) which preserve both their global and their local structure . It first computes the pairwise distance matrix D using a specified distance function φ , each element of the matrix being given by Dij = φ ( Ni , : , Nj , : ) . To better capture local affinities between data points , an affinity matrix A is computed using an α-decaying kernel with a locally-adaptive bandwidth k , i corresponding to the k-NN distance of the i-th data point . The elements of A are given by : Ai , j = Kk , α ( i , j ) = 1 2 exp ( − ( Di , j k , i ) α ) + 1 2 exp ( − ( Di , j k , j ) α ) The decaying factor α regulates the decay rate of the kernel ( smaller α⇒ kernel with lighter tails ) , α = 2 corresponding to the Gaussian . The affinity matrix is then row-normalized to obtain the diffusion operator P , a row-stochastic Markov transition matrix with element Pi , j giving the probability of jumping from the i-th to the j-th data point in one time step . One of the reasons PHATE excels at capturing global structures in data , especially high-dimensional trajectories and branches , is that it leverages the diffusion operator ( also used , Coifman & Lafon , 2006 , to construct diffusion maps ) by running the implicit Markov chain forward in time . This is accomplished by raising the matrix P to the power t , effectively taking t random walk steps and revealing intrinsic geometric structure through the affinity of the data at a scale that grows with the number of steps . The optimal value for t is automatically chosen to be the knee point of the von Neumann entropy of P. To enable dimensionality reduction while retaining diffusion geometry information from the operator , PHATE leverages information geometry to define a pairwise potential distance as an M-divergence IDi , j = ‖ logPi , : − logPj , :‖2 between corresponding t-step diffusion probability distributions of the two points , which provides a global context to each data point . The resulting information distance matrix ID is finally embedded into a visualizable low dimensional ( 2D or 3D ) space by metric multidimensional scaling ( MDS ) , thereby squeezing the intrinsic geometric information into two dimensions ( as is also done in tSNE ) , rather than producing a high dimensional alternative coordinate system like PCA or diffusion maps . We reason that since PHATE learns a data manifold via diffusion , and places points in the global context of other points , it can keep trajectories connected from beginning to end without shattering them . Indeed , this property was established quantitatively in Moon et al . ( 2019 ) via a Denoised Manifold Affinity Preservation ( DeMAP ) metric . Here , it leads to the preservation trajectory flow directions and relations between them , as demonstrated in Figure 1 , in comparison with other methods , on trajectory-like data and ANN training trajectories , as well as in our results presented in the remainder of the paper . 4 METHODS . The loss-landscape is a high dimensional function f ( θ ) that assigns a loss value to every possible vector θ in the high-dimensional parameter space of an ANN denoted Θ . The dimensionality of the space renders the task of completely visualizing the loss-landscape virtually impossible . By gathering locally connected loss-landscape patches throughout training and around minima found via gradient descent , we hope to reconstruct manifolds on which these trajectories lie . Despite the thousands , if not millions , of dimensions of the parameter space Θ , we hypothesize that these trajectories and manifolds are intrinsically of low dimensional and thus PHATE , which reduced dimensionality via manifold learning and information geometry , will help facilitate their visualization in two specific settings : 1 . To characterize the region of the loss-landscape surrounding minima ; and 2 . To simultaneously visualize multiple training trajectories corresponding to different parameter initializations and optimizers in order to make training choices . In setting ( 1 ) we use the following “ jump and retrain ” experiment . Given a trained ANN and a minimum found during training with an optimizer : • Let θo represent the vector of network parameters at the minimum ; • For seed ∈ { 0 , 1 , 2 , 3 , 4 } : – For step_size ∈ { 0.25 , 0.5 , 0.75 , 1 } : 1 . Choose the random vector vseed in the parameter space of the network Θ corre- sponding to the random seed seed ; 2 . Filter normalize the vector as proposed in Li et al . ( 2018 ) to obtain vseed ; 3 . Set the network parameters at each jump initialization to be θjump-init = θo + step_size · vseed ; 4 . Retrain for 50 epochs using optimizer with 0.9 momentum on the original training set ; 5 . Record network parameters θ for each seed and step size combination and at the end of each epoch . • Apply PHATE to the data matrix [ θseed , step_size , epoch ] and visualize the embeddings . In setting ( 2 ) , we simultaneously visualize multiple training trajectories corresponding to different parameter initializations and optimizers . Here , we simply follow the optimizer from initialization to convergence , and record the parameter vector at each step . We note that methods that pick random directions or surfaces around the minima projected to random directions are not able to visualize entire trajectories as the spaces and planes change . This is a distinct advantage of using all of the dimensions of the parameter space . In both settings , PHATE has allowed us to bypass the key drawbacks of previously proposed linear interpolation methods by : 1 . Capturing variance in data from all relevant dimensions and embed it in a low-dimensional space ; and 2. preserving high-dimensional trajectories and global structures of data in parameter space . All modern dimensionality-reduction techniques would have achieved ( 1 ) in one way or another and with various degrees of success . The reason our method is based on cosine-distance PHATE , is to better accomplishes ( 2 ) by preserving trajectories and global relationships in high-dimensional data to a greater extent than any other state-of-the-art dimensionality-reduction technique . Figure 1 demonstrates this by showing a comparison of multiple such techniques , namely PHATE , PCA , t-SNE ( van der Maaten & Hinton , 2008 ) and UMAP ( McInnes & Healy , 2018 ) , and how they each embed the results of a jump and retrain experiment ( Figure 1A and B ) and an artificial data set having a tree-like structure ( Figure 1C ) in a 2D space . While some trajectory-like structure is visible in all low-dimensional embeddings , only PHATE properly captures intra-trajectory variance . PHATE is also the only technique that captures the global relationships in between trajectories while t-SNE and UMAP have a tendency to cluster points that are close in parameter space and disregard the global structure of the data . On the artificial data set , what we observe is that the embeddings of the linear method PCA are highly affected by the noise in the data while t-SNE and UMAP have a tendency of shattering trajectories that should be connected . | The paper suggests using PHATE, a modern dimensionality reduction method, for visualizing the training trajectories of deep networks. It argues that PHATE visualizations can bring to light interesting aspects of the training dynamics that are missed by other dimensionality reduction algorithms because PHATE does a better job at preserving both local and global structure in the data. This is not the first application of PHATE in the context of deep learning, but to my knowledge it is the first application to deep learning trajectories. | SP:1043d665e76e18b5418a66868d36575363717444 |
Rethinking Positional Encoding in Language Pre-training | 1 INTRODUCTION . The Transformer model ( Vaswani et al. , 2017 ) is the most widely used architecture in language representation learning ( Liu et al. , 2019 ; Devlin et al. , 2018 ; Radford et al. , 2019 ; Bao et al. , 2020 ) . In Transformer , positional encoding is an essential component since other main components of the model are entirely invariant to sequence order . The original Transformer uses the absolute positional encoding , which provides each position an embedding vector . The positional embedding is added to the word embedding , which is found significantly helpful at learning the contextual representations of words at different positions . Besides using the absolute positional encoding , Shaw et al . ( 2018 ) ; Raffel et al . ( 2019 ) further propose the relative positional encoding , which incorporates some carefully designed bias term inside the self-attention module to encode the distance between any two positions . In this work , we revisit and study the formulation of the widely used absolute/relative positional encoding . First , we question the rationality of adding the word embedding with the absolute positional embedding in the input layer . Since the two kinds of embeddings are apparently heterogeneous , this addition operation brings mixed correlations1 between the positional information and word semantics . For example , by expanding the dot-production function of keys and values in the self-attention module of the first layer , we find that there are explicit terms that use “ word ” to query “ positions ” and vice versa . However , words may only have weak correlations to where they appear in the sentence . Our empirical analysis also supports this by showing that in a well-trained model , such correlation is noisy . Second , we notice that the BERT model does not only handle natural language words . A special symbol [ CLS ] is usually attached to the sentence . It is widely acknowledged that this symbol ∗Correspondence to : { guolin.ke , dihe } @ microsoft.com 1The term “ correlation ” mainly refers to the dot product between Key and Query in the self-attention module . receives and summarizes useful information from all the positions , and the contextual representation of [ CLS ] will be used as the representation of the sentence in the downstream tasks . As the role of the [ CLS ] symbol is different from regular words that naturally contain semantics , we argue that it will be ineffective if we treat its position the same as word positions in the sentence . For example , if we apply the relative positional encoding to this symbol , the attention distribution of some heads will likely be biased to the first several words , which hurts the understanding of the whole sentence . Based on the investigation above , we propose several simple , yet effective modifications to the current methods , which lead to a new positional encoding called Transformer with Untied Positional Encoding ( TUPE ) for language pre-training , see Figure 1 . In TUPE , the Transformer only uses the word embedding as input . In the self-attention module , different types of correlations are separately computed to reflect different aspects of information , including word contextual correlation and absolute ( and relative ) positional correlation . Each kind of correlation has its own parameters and will be added together to generate the attention distribution . A specialized positional correlation is further set to the [ CLS ] symbol , aiming to capture the global representation of the sentence correctly . First , we can see that in TUPE , the positional correlation and word contextual correlation are de-coupled and computed using different parameters . This design successfully removes the randomness in word-to-position ( or position-to-word ) correlations and gives more expressiveness to characterize the relationship between a pair of words or positions . Second , TUPE uses a different function to compute the correlations between the [ CLS ] symbol and other positions . This flexibility can help the model learn an accurate representation of the whole sentence . We provide an efficient implementation of TUPE . To validate the method , we conduct extensive experiments and ablation studies on the GLUE benchmark dataset . Empirical results confirm that our proposed TUPE consistently improves the model performance on almost all tasks . In particular , we observe that by imposing this inductive bias to encode the positional information , the model can be trained more effectively , and the training time of the pre-training stage can be largely improved . 2 PRELIMINARY . 2.1 ATTENTION MODULE . The attention module ( Vaswani et al. , 2017 ) is formulated as querying a dictionary with key-value pairs , e.g. , Attention ( Q , K , V ) = softmax ( QK T √ d ) V , where d is the dimensionality of the hidden representations , and Q ( Query ) , K ( Key ) , V ( Value ) are specified as the hidden representations of the previous layer . The multi-head variant of the attention module is popularly used which allows the model to jointly attend to the information from different representation sub-spaces , and is defined as Multi-head ( Q , K , V ) = Concat ( head1 , · · · , headH ) WO headk = Attention ( QW Q k , KW K k , V W V k ) , ( 1 ) where WQk ∈ Rd×dK , WKk ∈ Rd×dK , WVk ∈ Rd×dV , and WO ∈ RHdV ×d are learnable project matrices , H is the number of heads . dK and dV are the dimensionalities of Key and Value . The self-attention module is one of the key components in Transformer and BERT encoder ( Devlin et al. , 2018 ) . For simplicity , we use the single-head self-attention module and set dK = dV = d for a demonstration . We denote xl = ( xl1 , x l 2 · · · , xln ) as the input to the self-attention module in the l-th layer , where n is the length of the sequence and each vector xli ∈ Rd is the contextual representation of the token at position i. zl = ( zl1 , z l 2 · · · , zln ) is the output of the attention module . Then the self-attention module can be written as zli = n∑ j=1 exp ( αij ) ∑n j′=1 exp ( αij′ ) ( xljW V , l ) , where αij = 1√ d ( xliW Q , l ) ( xljW K , l ) T . ( 2 ) As we can see , the self-attention module does not make use of the order of the sequence , i.e. , is permutation-invariant . However , natural language is well-structured and word order is important for language understanding ( Sutskever et al. , 2014 ) . In the next section , we show several previous works that proposed different ways of incorporating positional information into the Transformer model . 2.2 POSITIONAL ENCODING . Generally , there are two categories of methods that encode positional information in the Transformer model , absolute positional encoding and relative positional encoding . Absolute Positional Encoding . The original Transformer ( Vaswani et al. , 2017 ) proposes to use absolute positional encoding to represent positions . In particular , a ( learnable ) real-valued vector pi ∈ Rd is assigned to each position i . Given a sentence , pi will be added to the word embedding wi at position i , and wi + pi will be used as the input to the model , e.g , x1i = wi + pi . In such a way , the Transformer can differentiate the words coming from different positions and assign each token position-dependent attention . For example , in the self-attention module in the first layer , we have αAbsij = 1√ d ( ( wi + pi ) W Q,1 ) ( ( wj + pj ) W K,1 ) T . ( 3 ) Relative Positional Encoding . In absolute positional encoding , using different pi for different position i helps Transformer distinguish words at different positions . However , as pointed out in Shaw et al . ( 2018 ) , the absolute positional encoding is not effective for the model to capture the relative word orders . Therefore , besides using absolute positional encoding , Shaw et al . proposes a relative positional encoding as an inductive bias to help the learning of attention modules , αRelij = 1√ d ( xliW Q , l ) ( xljW K , l + alj−i ) T , ( 4 ) where alj−i ∈ Rd is learnable parameter and can be viewed as the embedding of the relative position j − i in layer l. In this way , embedding alj−i explicitly models the relative word orders . T5 ( Raffel et al. , 2019 ) further simplifies it by eliminating alj−1 in Query-Key product . αT5ij = 1√ d ( xliW Q , l ) ( xljW K , l ) T + bj−i . ( 5 ) For each j − i , bj−i is a learnable scalar2 and shared in all layers . 2Specifically , in Shaw et al . ( 2018 ) ; Raffel et al . ( 2019 ) , the relative position j − i will be first clipped to a pre-defined range , e.g. , clip ( j − i , −t , t ) , t = 128 . The embedding is defined over the possible values of the clipped range , i.e. , [ −t , t ] . Besides , Shaw et al . also tried to add vector aV , lj−i to the value V in the output of self-attention , but the experiment results indicate that it did not improve much . 3 TRANSFORMER WITH UNTIED POSITIONAL ENCODING . 3.1 UNTIE THE CORRELATIONS BETWEEN POSITIONS AND WORDS . In absolute positional encoding , the positional embedding is added together with the word embedding to serves as the input to the neural networks . However , these two kinds of information are heterogeneous . The word embedding encodes the semantic meanings of words and word analogy tasks can be solved using simple linear arithmetic on word embeddings ( Mikolov et al. , 2013 ; Pennington et al. , 2014 ; Joulin et al. , 2016 ) . On the other hand , the absolute positional embedding encodes the indices in a sequence , which is not semantic and far different from word meanings . We question the rationality of the linear arithmetic between the word embedding and the positional embedding . To check clearly , we take a look at the expansion of Eq . ( 3 ) . αAbsij = ( ( wi + pi ) W Q,1 ) ( ( wj + pj ) W K,1 ) T√ d = ( wiW Q,1 ) ( wjW K,1 ) T√ d + ( wiW Q,1 ) ( pjW K,1 ) T√ d + ( piW Q,1 ) ( wjW K,1 ) T√ d + ( piW Q,1 ) ( pjW K,1 ) T√ d ( 6 ) The above expansion shows how the word embedding and the positional embedding are projected and queried in the attention module . We can see that there are four terms after the expansion : word-to-word , word-to-position , position-to-word , and position-to-position correlations . We have several concerns regarding this formulation . First , it is easy to see that the first and the last term characterize the word-word and position-position relationships respectively . However , the projection matrices WQ , l and WK , l are shared in both terms . As the positional embedding and the word embedding encode significantly different concepts , it is not reasonable to apply the same projection to such different information . Furthermore , we also notice that the second and the third term use the position ( word ) as the query to get keys composed of words ( positions ) . As far as we know , there is little evidence suggesting that the word and its location in a sentence have a strong correlation . Furthermore , in BERT and recently developed advanced methods such as RoBERTa ( Liu et al. , 2010 ) , sentences are patched in a random way . For example , in BERT , each input contains multiple sentences and some of the sentences are negatively sampled from other documents to form the next sentence prediction task . Due to the random process of batching , it is possible that a word can even appear at any positions and the correlations between words and positions could be weak . To further investigate this , we visualize the four correlations in Eq . ( 6 ) on a pre-trained BERT model . We find that the second and the third term looks uniform across positions , as shown in Figure 2 . This phenomenon suggests that there are no strong correlations3 between the word and the absolute position and using such noisy correlation may be inefficient for model training . 3Some recent works ( Yang et al. , 2019 ; He et al. , 2020 ) show that correlations between relative positions and words can improve the performance . Our results have no contradiction with theirs as our study is on the correlations between word embeddings and absolute positional embeddings . Our modification . To overcome these problems , we propose to directly model the relationships between a pair of words or positions by using different projection matrices and remove the two terms in the middle . That is , we use αij = 1√ 2d ( xliW Q , l ) ( xljW K , l ) T + 1√ 2d ( piU Q ) ( pjU K ) T , ( 7 ) where UQ , UK ∈ Rd×d are the projection matrice for the positional embedding , and scaling term 1√ 2d is used to retain the magnitude of αij ( Vaswani et al. , 2017 ) . A visualization is put in Figure 3 . Our proposed method can be well combined with the relative positional encoding in Raffel et al . ( 2019 ) by simply changing Eq . ( 5 ) to αij = 1√ 2d ( xliW Q , l ) ( xljW K , l ) T + 1√ 2d ( piU Q ) ( pjU K ) T + bj−i . ( 8 ) 3.2 UNTIE THE [ CLS ] SYMBOL FROM POSITIONS Note that in language representation learning , the input sequence to the Transformer model is not always a natural sentence . In BERT , a special symbol [ CLS ] is attached to the beginning of the input sentence . This symbol is designed to capture the global information of the whole sentence . Its contextual representation will be used to make predictions in the sentence-level downstream tasks after pre-training ( Devlin et al. , 2018 ; Liu et al. , 2019 ) . We argue that there will be some disadvantages if we treat this token the same as other natural words in the attention module . For example , the regular words usually have strong local dependencies in the sentence . Many visualizations ( Clark et al. , 2019a ; Gong et al. , 2019 ) show that the attention distributions of some heads concentrate locally . If we process the position of [ CLS ] the same as the position of natural language words , according to the aforementioned local concentration phenomenon , [ CLS ] will be likely biased to focus on the first several words instead of the whole sentence . It will potentially hurt the performance of the downstream tasks . Our modification . We give a specific design in the attention module to untie the [ CLS ] symbol from other positions . In particular , we reset the positional correlations related to [ CLS ] . For better demonstration , we denote vij as the content-free ( position-only ) correlation between position i and j . For example , when using the absolute positional encoding in Eq . ( 7 ) , vij = 1√2d ( piU Q ) ( pjU K ) T ; when using relative positional encoding in Eq . ( 8 ) , vij = 1√2d ( piU Q ) ( pjU K ) T + bj−i . We reset the values of vij by the following equation : resetθ ( v , i , j ) = vij i 6= 1 , j 6= 1 , ( not related to [ CLS ] ) θ1 i = 1 , ( from [ CLS ] to others ) θ2 i 6= 1 , j = 1 , ( from others to [ CLS ] ) , ( 9 ) where θ = { θ1 , θ2 } is a learnable parameter . A visualization is put in Figure 4 . | This paper studies the positional encoding in BERT. It argues against the word—position correlations that are implicitly imposed by BERT’s treatment of positional encodings. The paper proposes to decouple the “content attention” (token to token) and “contentless attention” (position to position), and remove the so called heterogeneous interactions between tokens and positions. Further, it points out that it is problematic to treat the special [CLS] symbol as a token in calculating its positional encoding: per standard practice, [CLS]’s representation is used as a summary of the full sequence, and treating it as a token implicitly biases the sentence representation towards those tokens close [CLS]. To resolve this issue, the paper “hides” the position information of [CLS]. The proposed approach is built on top of BERT and evaluated on the GLUE benchmark. Experimental results show that it outperforms the baselines. | SP:ac65606f8823adff500d1e14e4f7fe5cac4e5b48 |
Rethinking Positional Encoding in Language Pre-training | 1 INTRODUCTION . The Transformer model ( Vaswani et al. , 2017 ) is the most widely used architecture in language representation learning ( Liu et al. , 2019 ; Devlin et al. , 2018 ; Radford et al. , 2019 ; Bao et al. , 2020 ) . In Transformer , positional encoding is an essential component since other main components of the model are entirely invariant to sequence order . The original Transformer uses the absolute positional encoding , which provides each position an embedding vector . The positional embedding is added to the word embedding , which is found significantly helpful at learning the contextual representations of words at different positions . Besides using the absolute positional encoding , Shaw et al . ( 2018 ) ; Raffel et al . ( 2019 ) further propose the relative positional encoding , which incorporates some carefully designed bias term inside the self-attention module to encode the distance between any two positions . In this work , we revisit and study the formulation of the widely used absolute/relative positional encoding . First , we question the rationality of adding the word embedding with the absolute positional embedding in the input layer . Since the two kinds of embeddings are apparently heterogeneous , this addition operation brings mixed correlations1 between the positional information and word semantics . For example , by expanding the dot-production function of keys and values in the self-attention module of the first layer , we find that there are explicit terms that use “ word ” to query “ positions ” and vice versa . However , words may only have weak correlations to where they appear in the sentence . Our empirical analysis also supports this by showing that in a well-trained model , such correlation is noisy . Second , we notice that the BERT model does not only handle natural language words . A special symbol [ CLS ] is usually attached to the sentence . It is widely acknowledged that this symbol ∗Correspondence to : { guolin.ke , dihe } @ microsoft.com 1The term “ correlation ” mainly refers to the dot product between Key and Query in the self-attention module . receives and summarizes useful information from all the positions , and the contextual representation of [ CLS ] will be used as the representation of the sentence in the downstream tasks . As the role of the [ CLS ] symbol is different from regular words that naturally contain semantics , we argue that it will be ineffective if we treat its position the same as word positions in the sentence . For example , if we apply the relative positional encoding to this symbol , the attention distribution of some heads will likely be biased to the first several words , which hurts the understanding of the whole sentence . Based on the investigation above , we propose several simple , yet effective modifications to the current methods , which lead to a new positional encoding called Transformer with Untied Positional Encoding ( TUPE ) for language pre-training , see Figure 1 . In TUPE , the Transformer only uses the word embedding as input . In the self-attention module , different types of correlations are separately computed to reflect different aspects of information , including word contextual correlation and absolute ( and relative ) positional correlation . Each kind of correlation has its own parameters and will be added together to generate the attention distribution . A specialized positional correlation is further set to the [ CLS ] symbol , aiming to capture the global representation of the sentence correctly . First , we can see that in TUPE , the positional correlation and word contextual correlation are de-coupled and computed using different parameters . This design successfully removes the randomness in word-to-position ( or position-to-word ) correlations and gives more expressiveness to characterize the relationship between a pair of words or positions . Second , TUPE uses a different function to compute the correlations between the [ CLS ] symbol and other positions . This flexibility can help the model learn an accurate representation of the whole sentence . We provide an efficient implementation of TUPE . To validate the method , we conduct extensive experiments and ablation studies on the GLUE benchmark dataset . Empirical results confirm that our proposed TUPE consistently improves the model performance on almost all tasks . In particular , we observe that by imposing this inductive bias to encode the positional information , the model can be trained more effectively , and the training time of the pre-training stage can be largely improved . 2 PRELIMINARY . 2.1 ATTENTION MODULE . The attention module ( Vaswani et al. , 2017 ) is formulated as querying a dictionary with key-value pairs , e.g. , Attention ( Q , K , V ) = softmax ( QK T √ d ) V , where d is the dimensionality of the hidden representations , and Q ( Query ) , K ( Key ) , V ( Value ) are specified as the hidden representations of the previous layer . The multi-head variant of the attention module is popularly used which allows the model to jointly attend to the information from different representation sub-spaces , and is defined as Multi-head ( Q , K , V ) = Concat ( head1 , · · · , headH ) WO headk = Attention ( QW Q k , KW K k , V W V k ) , ( 1 ) where WQk ∈ Rd×dK , WKk ∈ Rd×dK , WVk ∈ Rd×dV , and WO ∈ RHdV ×d are learnable project matrices , H is the number of heads . dK and dV are the dimensionalities of Key and Value . The self-attention module is one of the key components in Transformer and BERT encoder ( Devlin et al. , 2018 ) . For simplicity , we use the single-head self-attention module and set dK = dV = d for a demonstration . We denote xl = ( xl1 , x l 2 · · · , xln ) as the input to the self-attention module in the l-th layer , where n is the length of the sequence and each vector xli ∈ Rd is the contextual representation of the token at position i. zl = ( zl1 , z l 2 · · · , zln ) is the output of the attention module . Then the self-attention module can be written as zli = n∑ j=1 exp ( αij ) ∑n j′=1 exp ( αij′ ) ( xljW V , l ) , where αij = 1√ d ( xliW Q , l ) ( xljW K , l ) T . ( 2 ) As we can see , the self-attention module does not make use of the order of the sequence , i.e. , is permutation-invariant . However , natural language is well-structured and word order is important for language understanding ( Sutskever et al. , 2014 ) . In the next section , we show several previous works that proposed different ways of incorporating positional information into the Transformer model . 2.2 POSITIONAL ENCODING . Generally , there are two categories of methods that encode positional information in the Transformer model , absolute positional encoding and relative positional encoding . Absolute Positional Encoding . The original Transformer ( Vaswani et al. , 2017 ) proposes to use absolute positional encoding to represent positions . In particular , a ( learnable ) real-valued vector pi ∈ Rd is assigned to each position i . Given a sentence , pi will be added to the word embedding wi at position i , and wi + pi will be used as the input to the model , e.g , x1i = wi + pi . In such a way , the Transformer can differentiate the words coming from different positions and assign each token position-dependent attention . For example , in the self-attention module in the first layer , we have αAbsij = 1√ d ( ( wi + pi ) W Q,1 ) ( ( wj + pj ) W K,1 ) T . ( 3 ) Relative Positional Encoding . In absolute positional encoding , using different pi for different position i helps Transformer distinguish words at different positions . However , as pointed out in Shaw et al . ( 2018 ) , the absolute positional encoding is not effective for the model to capture the relative word orders . Therefore , besides using absolute positional encoding , Shaw et al . proposes a relative positional encoding as an inductive bias to help the learning of attention modules , αRelij = 1√ d ( xliW Q , l ) ( xljW K , l + alj−i ) T , ( 4 ) where alj−i ∈ Rd is learnable parameter and can be viewed as the embedding of the relative position j − i in layer l. In this way , embedding alj−i explicitly models the relative word orders . T5 ( Raffel et al. , 2019 ) further simplifies it by eliminating alj−1 in Query-Key product . αT5ij = 1√ d ( xliW Q , l ) ( xljW K , l ) T + bj−i . ( 5 ) For each j − i , bj−i is a learnable scalar2 and shared in all layers . 2Specifically , in Shaw et al . ( 2018 ) ; Raffel et al . ( 2019 ) , the relative position j − i will be first clipped to a pre-defined range , e.g. , clip ( j − i , −t , t ) , t = 128 . The embedding is defined over the possible values of the clipped range , i.e. , [ −t , t ] . Besides , Shaw et al . also tried to add vector aV , lj−i to the value V in the output of self-attention , but the experiment results indicate that it did not improve much . 3 TRANSFORMER WITH UNTIED POSITIONAL ENCODING . 3.1 UNTIE THE CORRELATIONS BETWEEN POSITIONS AND WORDS . In absolute positional encoding , the positional embedding is added together with the word embedding to serves as the input to the neural networks . However , these two kinds of information are heterogeneous . The word embedding encodes the semantic meanings of words and word analogy tasks can be solved using simple linear arithmetic on word embeddings ( Mikolov et al. , 2013 ; Pennington et al. , 2014 ; Joulin et al. , 2016 ) . On the other hand , the absolute positional embedding encodes the indices in a sequence , which is not semantic and far different from word meanings . We question the rationality of the linear arithmetic between the word embedding and the positional embedding . To check clearly , we take a look at the expansion of Eq . ( 3 ) . αAbsij = ( ( wi + pi ) W Q,1 ) ( ( wj + pj ) W K,1 ) T√ d = ( wiW Q,1 ) ( wjW K,1 ) T√ d + ( wiW Q,1 ) ( pjW K,1 ) T√ d + ( piW Q,1 ) ( wjW K,1 ) T√ d + ( piW Q,1 ) ( pjW K,1 ) T√ d ( 6 ) The above expansion shows how the word embedding and the positional embedding are projected and queried in the attention module . We can see that there are four terms after the expansion : word-to-word , word-to-position , position-to-word , and position-to-position correlations . We have several concerns regarding this formulation . First , it is easy to see that the first and the last term characterize the word-word and position-position relationships respectively . However , the projection matrices WQ , l and WK , l are shared in both terms . As the positional embedding and the word embedding encode significantly different concepts , it is not reasonable to apply the same projection to such different information . Furthermore , we also notice that the second and the third term use the position ( word ) as the query to get keys composed of words ( positions ) . As far as we know , there is little evidence suggesting that the word and its location in a sentence have a strong correlation . Furthermore , in BERT and recently developed advanced methods such as RoBERTa ( Liu et al. , 2010 ) , sentences are patched in a random way . For example , in BERT , each input contains multiple sentences and some of the sentences are negatively sampled from other documents to form the next sentence prediction task . Due to the random process of batching , it is possible that a word can even appear at any positions and the correlations between words and positions could be weak . To further investigate this , we visualize the four correlations in Eq . ( 6 ) on a pre-trained BERT model . We find that the second and the third term looks uniform across positions , as shown in Figure 2 . This phenomenon suggests that there are no strong correlations3 between the word and the absolute position and using such noisy correlation may be inefficient for model training . 3Some recent works ( Yang et al. , 2019 ; He et al. , 2020 ) show that correlations between relative positions and words can improve the performance . Our results have no contradiction with theirs as our study is on the correlations between word embeddings and absolute positional embeddings . Our modification . To overcome these problems , we propose to directly model the relationships between a pair of words or positions by using different projection matrices and remove the two terms in the middle . That is , we use αij = 1√ 2d ( xliW Q , l ) ( xljW K , l ) T + 1√ 2d ( piU Q ) ( pjU K ) T , ( 7 ) where UQ , UK ∈ Rd×d are the projection matrice for the positional embedding , and scaling term 1√ 2d is used to retain the magnitude of αij ( Vaswani et al. , 2017 ) . A visualization is put in Figure 3 . Our proposed method can be well combined with the relative positional encoding in Raffel et al . ( 2019 ) by simply changing Eq . ( 5 ) to αij = 1√ 2d ( xliW Q , l ) ( xljW K , l ) T + 1√ 2d ( piU Q ) ( pjU K ) T + bj−i . ( 8 ) 3.2 UNTIE THE [ CLS ] SYMBOL FROM POSITIONS Note that in language representation learning , the input sequence to the Transformer model is not always a natural sentence . In BERT , a special symbol [ CLS ] is attached to the beginning of the input sentence . This symbol is designed to capture the global information of the whole sentence . Its contextual representation will be used to make predictions in the sentence-level downstream tasks after pre-training ( Devlin et al. , 2018 ; Liu et al. , 2019 ) . We argue that there will be some disadvantages if we treat this token the same as other natural words in the attention module . For example , the regular words usually have strong local dependencies in the sentence . Many visualizations ( Clark et al. , 2019a ; Gong et al. , 2019 ) show that the attention distributions of some heads concentrate locally . If we process the position of [ CLS ] the same as the position of natural language words , according to the aforementioned local concentration phenomenon , [ CLS ] will be likely biased to focus on the first several words instead of the whole sentence . It will potentially hurt the performance of the downstream tasks . Our modification . We give a specific design in the attention module to untie the [ CLS ] symbol from other positions . In particular , we reset the positional correlations related to [ CLS ] . For better demonstration , we denote vij as the content-free ( position-only ) correlation between position i and j . For example , when using the absolute positional encoding in Eq . ( 7 ) , vij = 1√2d ( piU Q ) ( pjU K ) T ; when using relative positional encoding in Eq . ( 8 ) , vij = 1√2d ( piU Q ) ( pjU K ) T + bj−i . We reset the values of vij by the following equation : resetθ ( v , i , j ) = vij i 6= 1 , j 6= 1 , ( not related to [ CLS ] ) θ1 i = 1 , ( from [ CLS ] to others ) θ2 i 6= 1 , j = 1 , ( from others to [ CLS ] ) , ( 9 ) where θ = { θ1 , θ2 } is a learnable parameter . A visualization is put in Figure 4 . | The paper delves into the nature of positional encoding in Transformer and variants (especially BERT). The paper points out that, attention weight computation obtained from the addition of the word embedding and the position embedding in the first layer can be expanded into four terms, namely word-word, position-position, and two word-position (in both directions). The paper points out that word-position relationship is largely meaningless, which is also demonstrated via visualizing the values in pertained BERT. Then the paper proposes to remove these two terms when computing the attention. Secondly, the paper mentions that special tokens in BERT (e.g. [CLS]) should be treated in a different way than typical words. To do so, it proposes to replace the attention logic with a learnable parameter if the attention involves one or two special tokens. Both methods combined show a significant advantage on multiple GLUE tasks when applied to BERT. | SP:ac65606f8823adff500d1e14e4f7fe5cac4e5b48 |
GraphLog: A Benchmark for Measuring Logical Generalization in Graph Neural Networks | Relational inductive biases have a key role in building learning agents that can generalize and reason in a compositional manner . While relational learning algorithms such as graph neural networks ( GNNs ) show promise , we do not understand their effectiveness to adapt to new tasks . In this work , we study the logical generalization capabilities of GNNs by designing a benchmark suite grounded in first-order logic . Our benchmark suite , GraphLog , requires that learning algorithms perform rule induction in different synthetic logics , represented as knowledge graphs . GraphLog consists of relation prediction tasks on 57 distinct procedurally generated logical worlds . We use GraphLog to evaluate GNNs in three different setups : single-task supervised learning , multi-task ( with pre-training ) , and continual learning . Unlike previous benchmarks , GraphLog enables us to precisely control the logical relationship between the different worlds by controlling the underlying first-order logic rules . We find that models ’ ability to generalize and adapt strongly correlates to the availability of diverse sets of logical rules during multi-task training . We also find the severe catastrophic forgetting effect in continual learning scenarios , and GraphLog provides a precise mechanism to control the distribution shift . Overall , our results highlight new challenges for the design of GNN models , opening up an exciting area of research in generalization using graph-structured data . 1 INTRODUCTION . Relational reasoning , or the ability to reason about the relationship between objects and entities , is considered one of the fundamental aspects of intelligence ( Krawczyk et al. , 2011 ; Halford et al. , 2010 ) , and is known to play a critical role in cognitive growth of children ( Son et al. , 2011 ; Farrington-Flint et al. , 2007 ; Richland et al. , 2010 ) . This ability to infer relations between objects/entities/situations , and to compose relations into higher-order relations , is one of the reasons why humans quickly learn how to solve new tasks ( Holyoak and Morrison , 2012 ; Alexander , 2016 ) . The perceived importance of relational reasoning for generalization has fueled the development of several neural network architectures that incorporate relational inductive biases ( Battaglia et al. , 2016 ; Santoro et al. , 2017 ; Battaglia et al. , 2018 ) . Graph neural networks ( GNNs ) , in particular , have emerged as a dominant computational paradigm within this growing area ( Scarselli et al. , 2008 ; Hamilton et al. , 2017a ; Gilmer et al. , 2017 ; Schlichtkrull et al. , 2018 ; Du et al. , 2019 ) . However , despite the growing interest in GNNs and their promise of relational generalization , we currently lack an understanding of how effectively these models can adapt and generalize across distinct tasks . In this work , we study the task of logical generalization in the context of relational reasoning using GNNs . One example of such a reasoning task ( from everyday life ) can be in the context of a familygraph where the nodes are family members , and edges represent the relationships ( brother , father , etc ) . The objective is to learn logical rules , which are compositions of a specific form , such as “ the son of my son is my grandson ” . As new compositions of existing relations are discovered during the lifetime of a learner , ( e.g. , the son of my daughter is my grandson ) , it should remember the old compositions , even as it learns new compositions ( just like we humans do ) . This simplistic example can be extended to the more complex ( and yet practical ) scenarios like identifying novel chemical compositions , or recommender systems , where agents have to learn and retain compositions of existing relations . We study the effect of such generalization by analyzing the ability of GNNs in learning new relation compositions , leveraging first-order logic . In particular , we study how GNNs can induce logical rules and generalize by combining such rules in novel ways after training . We propose a benchmark suite , GraphLog , that is grounded in first-order logic . Figure 1 shows the setup of the benchmark . Given a set of logical rules , we create a diverse set of logical worlds with a different subset of rules . For each world ( say Wk ) , we sample multiple knowledge graphs ( say gki ) . The learning agent should learn to induce the logical rules for predicting the missing facts in these knowledge graphs . Using our benchmark , we evaluate the generalization capabilities of GNNs in the supervised setting by predicting inductively unseen combinations of known rules within a specific logical world . We further analyze how various GNN architectures perform in the multi-task and continual learning scenarios , where they have to learn over a set of logical worlds with different underlying logics . Our setup allows us to control the distribution shift by controlling the similarity between the different worlds , in terms of the overlap in logical rules between different worlds . Our analysis provides the following insights about logical generalization capabilities of GNNs : • Two architecture choices for GNNs strongly ( and positively ) impact generalization : 1 ) incorporating multirelational edge features using attention , and 2 ) modularising GNN architecture to include a parametric representation function , to learn representations for the relations using a knowledge graph structure . • In the multi-task setting , training a model on a more diverse set of logical worlds improves generalization and adaptation performance . • All the evaluated models exhibit catastrophic forgetting . This indicates that the models are not learning transferable representations and compositions and just overfitting to the current task —highlighting the challenge of lifelong learning in context of logical generalization and GNNs . 2 BACKGROUND AND RELATED WORK . GNNs . Several GNN architectures have been proposed to learn representations of the graph inputs ( Scarselli et al. , 2008 ; Duvenaud et al. , 2015 ; Defferrard et al. , 2016 ; Kipf and Welling , 2016 ; Gilmer et al. , 2017 ; Hamilton et al. , 2017b ; Schlichtkrull et al. , 2018 ) . Previous works have focused on evaluating GNNs in terms of their expressive power ( Barceló et al. , 2019 ; Morris et al. , 2019 ; Xu et al. , 2018 ) , usefulness of features ( Chen et al. , 2019 ) , and explaining their predictions ( Ying et al. , 2019 ) . Complementing these works , we evaluate GNN models on the task of logical generalization . Knowledge graph completion . Many knowledge graph datasets are available for relation prediction tasks ( also known as knowledge base completion ) . Prominent examples include Freebase15K ( Bordes et al. , 2013 ) , WordNet ( Miller , 1995 ) , NELL ( Mitchell and Fredkin , 2014 ) , and YAGO ( Suchanek et al. , 2007 ; Hoffart et al. , 2011 ; Mahdisoltani et al. , 2013 ) . Since these datasets are derived from real-world knowledge graphs , they are generally noisy and incomplete , and many facts are not available in the underlying knowledge bases ( West et al. , 2014 ; Paulheim , 2017 ) . Moreover , the underlying logical rules are often opaque and implicit ( Guo et al. , 2016 ) , thus reducing the utility of these datasets for understanding the logical generalization capability of neural networks . Procedurally generated datasets for reasoning . Several procedurally generated benchmarks have been proposed to study the relational reasoning and compositional generalization properties of neural networks ( Table 1 ) . These datasets provide a controlled testbed for evaluating compositional reasoning capabilities of neural networks in isolation . Based on these insightful works , we enumerate the four key desiderata that , we believe , such a benchmark should provide : 1 . Human interpretable rules should be used to generate the dataset . 2 . The datasets should be diverse , and the compositional rules used to solve different tasks should be distinct , so that adaptation on a new task is not trivial . The degree of similarity across the tasks should be configurable to evaluate the role of diversity in generalization . 3 . The benchmark should test for compositional generalization , which is the ability to solve unseen combinations of existing rules , thus generalizing through the composition of known concepts . 4 . The benchmark should support creating a large number of tasks and enable a more fine-grained inspection of the generalization capabilities of the model in different setups , e.g. , supervised learning , multi-task learning , and continual learning . As shown in Table 1 , GraphLog is unique in satisfying all of these desiderata . We highlight that unlike previous works which have been largely focused on the image and text modalities , GraphLog is one of the unique attempts to test logical generalization on graph-structured data using Graph Neural Networks . CLUTRR ( Sinha et al. , 2019 ) also provides similar underlying graphs in the text corpus , although GraphLog is different based on the following properties : • CLUTRR consists of a single rule world which in turn contains only 15 rules . GraphLog extends the concept to a more general framework where a user can define how many rules can occur in a single world , as well as define multiple such worlds . • GraphLog allows building multiple worlds consisting of either the same , overlapping , or distinct set of rules - which allows practitioners to test multi-task and continual learning scenarios in minute detail by controlling the distribution shift , which is a key difference with CLUTRR . • CLUTRR is built on a static set of relations ( 22 family relations ) while GraphLog can contain any number of such relations since it ’ s a flexible generator along with a dataset . Synthetic Graph Generation . Synthetic graph generation is extensively studied using various neural generative approaches for scale-free random graphs ( You et al. , 2018 ; Liao et al. , 2019 ) . Unlike these approaches , GraphLog is built using a procedural graph generator , which allows us to control the logical validity of the query graphs , which is defined in Section 3 . Control over logical validity is easier in synthetically generated datasets , which are used extensively in Inductive Logic Programming ( ILP ) / Rule Learning context ( Cornelio and Thost , 2019 ) 1 . GraphLog on the other hand , is targeted towards Graph Neural Network evaluation , which also supports for richer distribution shift evaluation through Multi-task learning and Continual learning scenarios . 3 GRAPHLOG . Background and Terminology . We leverage terminology and definitions from both knowledge graph and logic programming literature . A graph G = ( VG , EG ) is a collection of a set of nodes VG and a set of edges EG between the nodes . We assume that the graphs are relational , meaning that each edge between two nodes ( say u and v ) is assigned a label , and can be denoted as ri ( u , v ) ∈ EG . A relation set R is a set of relations { r1 , r2 , ... rK } . 1http : //ilp16.doc.ic.ac.uk/competition In logic programming terms , nodes in the graph correspond to constants , and edges correspond to ground atoms . Thus , as a slight abuse and mixture of notations , existence of an edge in the graph , i.e. , ri ( u , v ) ∈ EG , is equivalent to background assumption that ground atom is true ( i.e. , that ri ( u , v ) ← ) . We define a rule set R as set of dyadic definite Datalog clauses ( Abiteboul et al. , 1995 ) of form : rk ( U , V ) ← ri ( U , Z ) ∧ rj ( Z , V ) . ( 1 ) Note that Equation 1 is also termed as chain-rule in logic literature . Following standard convention , we use upper-case to denote variables ( e.g. , the variables in Equation 1 can be substituted for nodes ) and lower-case for constants ( e.g. , to denote nodes v ∈ VG ) . The relations ri , rj form the body while the relation rk forms the head of the rule . Path-based Horn clauses of this form represent a limited and well-defined subset of first-order logic . They encompass the types of logical rules learned by state-of-the-art rule induction systems for knowledge graph completion ( Das et al. , 2017 ; Evans and Grefenstette , 2017 ; Meilicke et al. , 2018 ; Sadeghian et al. , 2019 ; Teru et al. , 2020 ; Yang et al. , 2017 ; Zhang et al. , 2019 ) and are thus a useful synthetic test-bed . We use pu , vG to denote a path from node u to v in a graph G ( i.e. , a sequence unique nodes connected by edges ) . In logical terms , pu , vG corresponds to the conjunction of all the edge predicates in the path . We construct graphs according to rules of the form in Equation 1 so that a path between two nodes will always imply a specific relation between these two nodes . In other words , if we let PG denote the set of all finite paths in the graph G , then we have that ∀pu , vG ∈ PG ∃ri ∈ R : ( p u , v G → ri ( u , v ) ) ∧ ( ∀rj ∈ R \ { ri } ¬ ( p u , v G ∧ rj ( u , v ) ) ) . ( 2 ) Thus , by following the path between two nodes , and applying rules of the form of Equation 1 according to the edges of the path , we can always resolve the relationship between the nodes . Problem Setup . Given this setup , the task is to predict the relation between a pair of nodes . In particular , we define a query ( g , u , v ) as follows : ( i ) the query subgraph g ⊂ G is a subgraph of the full graph G ; ( ii ) the query nodes are present in the query subgraph ( i.e. , u , v ∈ Vg ) ; ( iii ) the edge between the query nodes is not present in the query subgraph , but the edge is present in the underlying graph ( i.e. , r ? ( u , v ) ∈ EG , r ? ( u , v ) /∈ Eg ) . The goal is to infer the missing edge between query nodes r ? ( u , v ) . We assume that the learning agent has access to a set of training queries g1 , ... , gn ⊂ G to optimize a prediction model before being tested on a set of held-out queries gn+1 , ... , gn+n′ ⊂ G. In knowledge graph terms , this is a form of link or relation prediction , as our goal is to infer the missing edge between two nodes . Unlike most work on knowledge graph completion , we emphasize an inductive problem setup , where the query graph g in each training and testing example is unique , requiring generalization to unseen graphs ( Teru et al. , 2020 ) . Finally , note that we will sometimes refer to the full graphs G as world graphs , in order to distinguish them from the query graphs g ⊂ G. We make this distinction because GraphLog involves link prediction over several different logical worlds , denoted W = ( GW , RW ) , with each defined with by its own underlying world graph GW and rule setRW . Our setup enables controlling the overlap between the rules in these different logical worlds , allowing for a unique ability to quantify the logical generalization capabilities of a learning agent . | The authors propose a synthetic graph generator to evaluate graph neural networks. The generation process starts with defining rules, subset of rules are used to define a world, each world is then used to sample a graph. Test queries are generated by picking a pair of vertices u, v and generating a path connecting them via the rules. There are some biases in the generation process. For instance, the rules are exclusively open path or chain rules. And as noted above, the test queries mostly stick to a path (the authors allow some variations by adding nodes to vertices already on the path but the path seems to form the backbone of the test query). The remainder of the paper takes a few well known graph neural networks and evaluates them on data generated using GraphLog. Based on these results, the authors claim that E-GAT outperforms RGCNs. | SP:3cdfd6f5f8455a41ef1edf46fada784b77b40cd7 |
GraphLog: A Benchmark for Measuring Logical Generalization in Graph Neural Networks | Relational inductive biases have a key role in building learning agents that can generalize and reason in a compositional manner . While relational learning algorithms such as graph neural networks ( GNNs ) show promise , we do not understand their effectiveness to adapt to new tasks . In this work , we study the logical generalization capabilities of GNNs by designing a benchmark suite grounded in first-order logic . Our benchmark suite , GraphLog , requires that learning algorithms perform rule induction in different synthetic logics , represented as knowledge graphs . GraphLog consists of relation prediction tasks on 57 distinct procedurally generated logical worlds . We use GraphLog to evaluate GNNs in three different setups : single-task supervised learning , multi-task ( with pre-training ) , and continual learning . Unlike previous benchmarks , GraphLog enables us to precisely control the logical relationship between the different worlds by controlling the underlying first-order logic rules . We find that models ’ ability to generalize and adapt strongly correlates to the availability of diverse sets of logical rules during multi-task training . We also find the severe catastrophic forgetting effect in continual learning scenarios , and GraphLog provides a precise mechanism to control the distribution shift . Overall , our results highlight new challenges for the design of GNN models , opening up an exciting area of research in generalization using graph-structured data . 1 INTRODUCTION . Relational reasoning , or the ability to reason about the relationship between objects and entities , is considered one of the fundamental aspects of intelligence ( Krawczyk et al. , 2011 ; Halford et al. , 2010 ) , and is known to play a critical role in cognitive growth of children ( Son et al. , 2011 ; Farrington-Flint et al. , 2007 ; Richland et al. , 2010 ) . This ability to infer relations between objects/entities/situations , and to compose relations into higher-order relations , is one of the reasons why humans quickly learn how to solve new tasks ( Holyoak and Morrison , 2012 ; Alexander , 2016 ) . The perceived importance of relational reasoning for generalization has fueled the development of several neural network architectures that incorporate relational inductive biases ( Battaglia et al. , 2016 ; Santoro et al. , 2017 ; Battaglia et al. , 2018 ) . Graph neural networks ( GNNs ) , in particular , have emerged as a dominant computational paradigm within this growing area ( Scarselli et al. , 2008 ; Hamilton et al. , 2017a ; Gilmer et al. , 2017 ; Schlichtkrull et al. , 2018 ; Du et al. , 2019 ) . However , despite the growing interest in GNNs and their promise of relational generalization , we currently lack an understanding of how effectively these models can adapt and generalize across distinct tasks . In this work , we study the task of logical generalization in the context of relational reasoning using GNNs . One example of such a reasoning task ( from everyday life ) can be in the context of a familygraph where the nodes are family members , and edges represent the relationships ( brother , father , etc ) . The objective is to learn logical rules , which are compositions of a specific form , such as “ the son of my son is my grandson ” . As new compositions of existing relations are discovered during the lifetime of a learner , ( e.g. , the son of my daughter is my grandson ) , it should remember the old compositions , even as it learns new compositions ( just like we humans do ) . This simplistic example can be extended to the more complex ( and yet practical ) scenarios like identifying novel chemical compositions , or recommender systems , where agents have to learn and retain compositions of existing relations . We study the effect of such generalization by analyzing the ability of GNNs in learning new relation compositions , leveraging first-order logic . In particular , we study how GNNs can induce logical rules and generalize by combining such rules in novel ways after training . We propose a benchmark suite , GraphLog , that is grounded in first-order logic . Figure 1 shows the setup of the benchmark . Given a set of logical rules , we create a diverse set of logical worlds with a different subset of rules . For each world ( say Wk ) , we sample multiple knowledge graphs ( say gki ) . The learning agent should learn to induce the logical rules for predicting the missing facts in these knowledge graphs . Using our benchmark , we evaluate the generalization capabilities of GNNs in the supervised setting by predicting inductively unseen combinations of known rules within a specific logical world . We further analyze how various GNN architectures perform in the multi-task and continual learning scenarios , where they have to learn over a set of logical worlds with different underlying logics . Our setup allows us to control the distribution shift by controlling the similarity between the different worlds , in terms of the overlap in logical rules between different worlds . Our analysis provides the following insights about logical generalization capabilities of GNNs : • Two architecture choices for GNNs strongly ( and positively ) impact generalization : 1 ) incorporating multirelational edge features using attention , and 2 ) modularising GNN architecture to include a parametric representation function , to learn representations for the relations using a knowledge graph structure . • In the multi-task setting , training a model on a more diverse set of logical worlds improves generalization and adaptation performance . • All the evaluated models exhibit catastrophic forgetting . This indicates that the models are not learning transferable representations and compositions and just overfitting to the current task —highlighting the challenge of lifelong learning in context of logical generalization and GNNs . 2 BACKGROUND AND RELATED WORK . GNNs . Several GNN architectures have been proposed to learn representations of the graph inputs ( Scarselli et al. , 2008 ; Duvenaud et al. , 2015 ; Defferrard et al. , 2016 ; Kipf and Welling , 2016 ; Gilmer et al. , 2017 ; Hamilton et al. , 2017b ; Schlichtkrull et al. , 2018 ) . Previous works have focused on evaluating GNNs in terms of their expressive power ( Barceló et al. , 2019 ; Morris et al. , 2019 ; Xu et al. , 2018 ) , usefulness of features ( Chen et al. , 2019 ) , and explaining their predictions ( Ying et al. , 2019 ) . Complementing these works , we evaluate GNN models on the task of logical generalization . Knowledge graph completion . Many knowledge graph datasets are available for relation prediction tasks ( also known as knowledge base completion ) . Prominent examples include Freebase15K ( Bordes et al. , 2013 ) , WordNet ( Miller , 1995 ) , NELL ( Mitchell and Fredkin , 2014 ) , and YAGO ( Suchanek et al. , 2007 ; Hoffart et al. , 2011 ; Mahdisoltani et al. , 2013 ) . Since these datasets are derived from real-world knowledge graphs , they are generally noisy and incomplete , and many facts are not available in the underlying knowledge bases ( West et al. , 2014 ; Paulheim , 2017 ) . Moreover , the underlying logical rules are often opaque and implicit ( Guo et al. , 2016 ) , thus reducing the utility of these datasets for understanding the logical generalization capability of neural networks . Procedurally generated datasets for reasoning . Several procedurally generated benchmarks have been proposed to study the relational reasoning and compositional generalization properties of neural networks ( Table 1 ) . These datasets provide a controlled testbed for evaluating compositional reasoning capabilities of neural networks in isolation . Based on these insightful works , we enumerate the four key desiderata that , we believe , such a benchmark should provide : 1 . Human interpretable rules should be used to generate the dataset . 2 . The datasets should be diverse , and the compositional rules used to solve different tasks should be distinct , so that adaptation on a new task is not trivial . The degree of similarity across the tasks should be configurable to evaluate the role of diversity in generalization . 3 . The benchmark should test for compositional generalization , which is the ability to solve unseen combinations of existing rules , thus generalizing through the composition of known concepts . 4 . The benchmark should support creating a large number of tasks and enable a more fine-grained inspection of the generalization capabilities of the model in different setups , e.g. , supervised learning , multi-task learning , and continual learning . As shown in Table 1 , GraphLog is unique in satisfying all of these desiderata . We highlight that unlike previous works which have been largely focused on the image and text modalities , GraphLog is one of the unique attempts to test logical generalization on graph-structured data using Graph Neural Networks . CLUTRR ( Sinha et al. , 2019 ) also provides similar underlying graphs in the text corpus , although GraphLog is different based on the following properties : • CLUTRR consists of a single rule world which in turn contains only 15 rules . GraphLog extends the concept to a more general framework where a user can define how many rules can occur in a single world , as well as define multiple such worlds . • GraphLog allows building multiple worlds consisting of either the same , overlapping , or distinct set of rules - which allows practitioners to test multi-task and continual learning scenarios in minute detail by controlling the distribution shift , which is a key difference with CLUTRR . • CLUTRR is built on a static set of relations ( 22 family relations ) while GraphLog can contain any number of such relations since it ’ s a flexible generator along with a dataset . Synthetic Graph Generation . Synthetic graph generation is extensively studied using various neural generative approaches for scale-free random graphs ( You et al. , 2018 ; Liao et al. , 2019 ) . Unlike these approaches , GraphLog is built using a procedural graph generator , which allows us to control the logical validity of the query graphs , which is defined in Section 3 . Control over logical validity is easier in synthetically generated datasets , which are used extensively in Inductive Logic Programming ( ILP ) / Rule Learning context ( Cornelio and Thost , 2019 ) 1 . GraphLog on the other hand , is targeted towards Graph Neural Network evaluation , which also supports for richer distribution shift evaluation through Multi-task learning and Continual learning scenarios . 3 GRAPHLOG . Background and Terminology . We leverage terminology and definitions from both knowledge graph and logic programming literature . A graph G = ( VG , EG ) is a collection of a set of nodes VG and a set of edges EG between the nodes . We assume that the graphs are relational , meaning that each edge between two nodes ( say u and v ) is assigned a label , and can be denoted as ri ( u , v ) ∈ EG . A relation set R is a set of relations { r1 , r2 , ... rK } . 1http : //ilp16.doc.ic.ac.uk/competition In logic programming terms , nodes in the graph correspond to constants , and edges correspond to ground atoms . Thus , as a slight abuse and mixture of notations , existence of an edge in the graph , i.e. , ri ( u , v ) ∈ EG , is equivalent to background assumption that ground atom is true ( i.e. , that ri ( u , v ) ← ) . We define a rule set R as set of dyadic definite Datalog clauses ( Abiteboul et al. , 1995 ) of form : rk ( U , V ) ← ri ( U , Z ) ∧ rj ( Z , V ) . ( 1 ) Note that Equation 1 is also termed as chain-rule in logic literature . Following standard convention , we use upper-case to denote variables ( e.g. , the variables in Equation 1 can be substituted for nodes ) and lower-case for constants ( e.g. , to denote nodes v ∈ VG ) . The relations ri , rj form the body while the relation rk forms the head of the rule . Path-based Horn clauses of this form represent a limited and well-defined subset of first-order logic . They encompass the types of logical rules learned by state-of-the-art rule induction systems for knowledge graph completion ( Das et al. , 2017 ; Evans and Grefenstette , 2017 ; Meilicke et al. , 2018 ; Sadeghian et al. , 2019 ; Teru et al. , 2020 ; Yang et al. , 2017 ; Zhang et al. , 2019 ) and are thus a useful synthetic test-bed . We use pu , vG to denote a path from node u to v in a graph G ( i.e. , a sequence unique nodes connected by edges ) . In logical terms , pu , vG corresponds to the conjunction of all the edge predicates in the path . We construct graphs according to rules of the form in Equation 1 so that a path between two nodes will always imply a specific relation between these two nodes . In other words , if we let PG denote the set of all finite paths in the graph G , then we have that ∀pu , vG ∈ PG ∃ri ∈ R : ( p u , v G → ri ( u , v ) ) ∧ ( ∀rj ∈ R \ { ri } ¬ ( p u , v G ∧ rj ( u , v ) ) ) . ( 2 ) Thus , by following the path between two nodes , and applying rules of the form of Equation 1 according to the edges of the path , we can always resolve the relationship between the nodes . Problem Setup . Given this setup , the task is to predict the relation between a pair of nodes . In particular , we define a query ( g , u , v ) as follows : ( i ) the query subgraph g ⊂ G is a subgraph of the full graph G ; ( ii ) the query nodes are present in the query subgraph ( i.e. , u , v ∈ Vg ) ; ( iii ) the edge between the query nodes is not present in the query subgraph , but the edge is present in the underlying graph ( i.e. , r ? ( u , v ) ∈ EG , r ? ( u , v ) /∈ Eg ) . The goal is to infer the missing edge between query nodes r ? ( u , v ) . We assume that the learning agent has access to a set of training queries g1 , ... , gn ⊂ G to optimize a prediction model before being tested on a set of held-out queries gn+1 , ... , gn+n′ ⊂ G. In knowledge graph terms , this is a form of link or relation prediction , as our goal is to infer the missing edge between two nodes . Unlike most work on knowledge graph completion , we emphasize an inductive problem setup , where the query graph g in each training and testing example is unique , requiring generalization to unseen graphs ( Teru et al. , 2020 ) . Finally , note that we will sometimes refer to the full graphs G as world graphs , in order to distinguish them from the query graphs g ⊂ G. We make this distinction because GraphLog involves link prediction over several different logical worlds , denoted W = ( GW , RW ) , with each defined with by its own underlying world graph GW and rule setRW . Our setup enables controlling the overlap between the rules in these different logical worlds , allowing for a unique ability to quantify the logical generalization capabilities of a learning agent . | This work proposes a method for generating synthetic datasets for testing path-based (knowledge) graph completion. Until recently, there were not many good benchmarks for evaluating reasoning with learned rules or learned knowledge, but there has been a fair amount of work on developing benchmarks for this lately. The synthetic datasets generated here are distinguished by the ability to produce datasets that share a controllable amount of rules. This permits the benchmarks to be used to evaluate multitask learning, robustness to distribution shift, etc. As an illustration of this, the paper includes experiments with a variety of baseline methods showing how (a) the generalization ability of various methods grows and then declines as the number of tasks is increased and (b) fine-tuning on diverse tasks improves accuracy. They also show that in a continual learning setting, the baseline methods all exhibit catastrophic forgetting. | SP:3cdfd6f5f8455a41ef1edf46fada784b77b40cd7 |
Policy Learning Using Weak Supervision | 1 Introduction . Recent breakthroughs in policy learning ( PL ) open up the possibility to apply reinforcement learning ( RL ) or behavioral cloning ( BC ) in real-world applications such as robotics [ 1 , 2 ] and self-driving [ 3 , 4 ] . Most existing works require agents to receive high-quality supervision signals , e.g. , reward or expert demonstrations , which are either infeasible or expensive to obtain in practice [ 5 , 6 ] . The outputs of reward functions in RL are subject to multiple kinds of randomness . For example , the reward collected from sensors on a robot may be biased and have inherent noise due to physical conditions such as temperature and lighting [ 7 , 8 , 9 ] . For the human-defined reward , different human instructors might provide drastically different feedback that leads to biased rewards [ 10 ] . Besides , the demonstrations by an expert in behavioral cloning ( BC ) are often imperfect due to limited resources and environment noise [ 11 , 12 , 13 ] . Therefore , learning from weak supervision signals such as noisy rewards [ 7 ] or low-quality demonstrations produced by untrustworthy expert [ 12 , 14 ] is one of the outstanding challenges that prevents a wider application of PL . Although some works have explored these topics separately in their specific domains [ 7 , 15 , 14 , 16 ] , there lacks a unified solution for robust policy learning in imperfect situations . Moreover , the noise model as well as the corruption level in supervision signals is often required . To handle these challenges , we first formulate a meta-framework to study RL/BC with weak supervision and call it weakly supervised policy learning . Then we propose a theoretically principled solution , PeerPL , to perform efficient policy learning using the available weak supervision without requiring noise rates . Our solution is inspired by peer loss [ 17 ] , a recently proposed loss function for learning with noisy labels but does not require the specification of noise rates . In peer loss , the noisy labels are treated as a peer agent ’ s supervision . This loss function explicitly punishes the classifier from simply agreeing with the noisy labels , but would instead reward it for a “ correlated agreement '' ( CA ) . We adopt a 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . similar idea and treat the “ weak supervision ” as the noisy information coming from an imperfect peer agent , and evaluate the learning agent ’ s policy based on a “ correlated agreement ” ( CA ) with the weak supervision signals . Compared to standard reward and evaluation functions that encourage simple agreements with the supervision , our approach punishes “ over-agreement '' to avoid overfitting to the weak supervision , which offers us a family of solutions that do not require prior knowledge of the corruption level in supervision signals . To summarize , the contributions in the paper are : ( 1 ) We provide a unified formulation of the weakly supervised policy learning problems ; ( 2 ) We propose PeerPL , a new way to perform policy evaluation for RL/BC tasks , and demonstrate how it adapts in challenging tasks including RL with noisy rewards and BC from weak demonstrations ; ( 3 ) PeerPL is theoretically guaranteed to recover the optimal policy , as if the supervision are of high-quality and clean . ( 4 ) Experiment results show strong evidence that PeerPL brings significant improvements over state-of-the-art solutions . Code is online available at : https : //github.com/wangjksjtu/PeerPL . 1.1 Related Work . Learning with Noisy Supervision Learning from noisy supervision is a widely explored topic . The seminal work [ 18 ] first proposed an unbiased surrogate loss function to recover the true loss from the noisy label distribution , given the knowledge of the noise rates of labels . Follow-up works offered ways to estimate the noise level from model predictions [ 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 ] or label consensuses of nearby representations [ 28 ] . Recent works also studied this problem in sequential settings including federated bandit [ 29 ] and RL [ 7 ] . The former work assumes the noise can be offset by averaging rewards from multiple agents . [ 7 ] designs a statistics-based estimation algorithm for noise rates in observed rewards , which can be inefficient especially when the state-action space is huge . Moreover , the error in the estimation can accumulate and amplify in sequential problems . Inspired by recent advances of peer loss [ 17 , 30 , 31 ] , our solution is able to recover true supervision signals without requiring a priori specification of the noise rates . Behavioral Cloning ( BC ) Standard BC [ 32 , 33 ] tackles the sequential decision-making problem by imitating the expert actions using supervised learning . Specifically , it aims to minimize the one-step deviation error over the expert trajectory without reasoning about the sequential consequences of actions . Therefore , the agent suffers from compounding errors when there is a mismatch between demonstrations and real states encountered [ 33 , 34 , 35 ] . Recent works introduce data augmentations [ 36 ] and value-based regularization [ 37 ] or inverse dynamics models [ 38 , 39 ] to encourage learning long-horizon behaviors . While being simple and straightforward , BC has been widely investigated in a range of application domains [ 40 , 41 ] and often yields competitive performance [ 42 , 37 ] . Our framework is complementary to the current BC literature by introducing a learning strategy from weak demonstrations ( e.g. , noisy or from a poorly-trained agent ) and provides theoretical guarantees on how to retrieve clean policy under mild assumptions [ 43 ] . Correlated Agreement In [ 44 , 45 ] , a correlated agreement ( CA ) type of mechanism is proposed to evaluate the correlations between agents ’ reports . In addition to encouraging a certain agreement between agents ’ reports , CA also punishes over-agreement when two agents always report identically . Recently , [ 17 , 30 , 25 ] adapt a similar idea to noisy label learning thus offloading the burdens of estimating noise rates . We consider a more challenging sequential decision-making problem and study the convergence rates under noisy supervision signals . 2 Policy Learning from Weak Supervision . We begin by reviewing conventional reinforcement learning and behavioral cloning with clean supervision signals . Then we introduce the weak supervision problem in policy learning and define two concrete instantiations : ( 1 ) RL with noisy reward and ( 2 ) BC using weak expert demonstrations . 2.1 Overview of Policy Learning . The goal of policy learning ( PL ) is to learn a policy ⇡ that the agent could follow to perform a series of actions in a stateful environment . For reinforcement learning , the interactive environment is characterized as an MDP M = hS , A , R , P , i . At each time t , the agent in state st 2 S takes an action at 2 A by following the policy ⇡ : S ⇥ A ! R , and potentially receives a reward r ( st , at ) 2 R. Then the agent transfers to the next state st+1 according to a transition probability function P . We denote the generated trajectory ⌧ = { ( st , at , rt ) } Tt=0 , where T is a finite or infinite horizon . RL algorithms aim to maximize the expected reward over the trajectory ⌧ induced by the policy : J clean ( ⇡ ) = E ( st , at , rt ) ⇠⌧ [ PT t=0 t rt ] , where 2 ( 0 , 1 ] is the discount factor . Another popular policy learning method is behavioral cloning . Let ⇡ ( ·|s ) denotes the distribution over actions formed by ⇡ , and ⇡ ( a|s ) be the probability of choosing action a given state s and policy ⇡ . The goal of BC is to mimic the expert policy ⇡E through a set of demonstrations DE = { ( si , ai ) } Ni=1 drawn from a distribution DE , where ( si , ai ) is the sampled state-action pair from the expert trajectory and ai ⇠ ⇡E ( ·|si ) Then training a policy with standard BC corresponds to maximizing the following log-likelihood : J clean ( ⇡ ) = E ( s , a ) ⇠DE [ log ⇡ ( a|s ) ] . In both RL and BC , the learning agent receives supervision through either the ( clean ) reward r by interacting with environments or the expert policy ⇡E as observable demonstrations . Consider a particular policy class ⇧ , the optimal policy is then defined as ⇡⇤ = argmax⇡2⇧ J clean ( ⇡ ) : ⇡⇤ obtains the maximum expected reward over the horizon T in RL and ⇡⇤ corresponds to the clean expert policy ⇡E in BC . In practice , one can also combine both RL and BC approaches to take advantage of both learning paradigm [ 46 , 47 , 15 , 43 ] . Specifically , a recent hybrid framework called policy co-training [ 43 ] will be considered in this paper . 2.2 Weak Supervision in Policy Learning . The weak supervision signal eY could be noisy reward r̃ for RL or noisy action ã from an imperfect expert policy ⇡̃E for BC , which are noisy versions of the corresponding high-quality supervision signals . See more details below . RL with Noisy Reward Consider a finite MDP fM = hS , A , R , F , P , i with noisy reward channels [ 7 ] , where R : S ⇥A ! R , and the noisy reward r̃ is generated following a certain function F : R ! eR . Denote the trajectory a policy ⇡✓ generates via interacting with fM as ⌧̃✓ . Assume the reward is discrete and has |R| levels . The noisy reward can be characterized via a unknown matrix CRL|R|⇥|R| , where each entry cj , k indicates the flipping probability for generating a possibly different outcome : cRLj , k = P ( r̃t = Rk|rt = Rj ) . We call r and r̃ the true reward and noisy reward . BC with Weak Demonstration Instead of observing the true expert demonstration generated according to ⇡E , denote the available weak demonstrations by { ( si , ãi ) } Ni=1 , where ãi is is the noisy expert action drawn according to a random variable ãi = ⇡̃E ( si ) ⇠ ⇡̃E ( ·|si ) , each state-action pair ( si , ãi ) is sampled from distribution eDE . Note there may exist two randomness factors in getting ãi : uncertainty in true policy ⇡E and noise from imperfect policy ⇡̃E . In particular , we do not consider the former randomness in theoretical analyses : given the output distribution ⇡E ( ·|si ) , only one deterministic action ⇡E ( si ) is taken by expert . This is because with uncertainty in true expert actions , it is hard to distinguish a clean case with true expert actions from the weak supervision case without addition knowledge . Similar assumptions are also adopted in [ 23 , 28 ] . The noisy action is modeled by a unknown confusion matrix CBC|A|⇥|A| , where each entry cj , k indicates the flipping probability for taking a sub-optimal action that differs from ⇡E ( s ) : cBCj , k = P ( ⇡̃E ( s ) = Ak|⇡E ( s ) = Aj ) , Ak and Aj denote the k-th and the j-th action from the action space A . In the above definition , we assume the noisy action ãi is independent of the state s given the deterministic expert action ⇡E ( s ) , i.e. , P ( ãi|⇡E ( si ) ) = P ( ãi|si , ⇡E ( si ) ) . We aim to recover ⇡⇤ as if we were able to access the quality expert demonstration ⇡E instead of ⇡̃E . Knowledge of C Recall C : CRL|R|⇥|R| or C BC |A|⇥|A| is unknown in practice . While recent works estimate this matrix [ 26 , 23 , 28 ] in supervised classification problems , it is still challenging to generalize them to a sequential setting [ 7 ] . When C is not perfectly estimated , the estimation error of C may lead to unexpected state-action pairs then the error of reward estimates will be accumulated in sequential learning . Besides , estimating C involves extra computation burden . In contrast , our method gets rid of the above issues since it is free of any knowledge of C and leads to more robust policy learning algorithms . Learning Goal With full supervision , both RL and BC can converge to the optimal policy ⇡⇤ . However , when only weak supervision is available , with an over-parameterized model such as a deep neural network , the learning agent will easily memorize the weak supervision and learn a biased policy [ 48 ] . In our meta framework , instead of converging to any biased policy , we focus on learning the optimal policy ⇡⇤ with only a weak supervision sequence denoted as { ( st , at ) , eYt } Tt=1 ( RL ) or { ( si , ai ) , eYi } Ni=1 ( BC ) . | This paper tackles the problem of policy learning under weak/noisy supervision. The authors present PeerPL, a unified framework that can train agents using behavior cloning under noisy/suboptimal demonstrations, or using reinforcement learning under noisy rewards. PeerPL uses the idea of “Correlated Agreement” by subtracting the original objective with a second term. The second term evaluates on randomly paired state-action tuples and supervisions, punishing the “blind” agreement between the learning agent and the weak supervision. The authors instantiate this idea on both behavior cloning and RL (PG/DQN), and also evaluate it on the problem of policy co-training. The authors demonstrate that PeerPL outperforms the weak supervision baselines on IL and RL setting, and sometimes it even outperforms agents trained with clean supervision. | SP:fef1b68e8fefbd9ab2610b3c995a74852ce53a6a |
Policy Learning Using Weak Supervision | 1 Introduction . Recent breakthroughs in policy learning ( PL ) open up the possibility to apply reinforcement learning ( RL ) or behavioral cloning ( BC ) in real-world applications such as robotics [ 1 , 2 ] and self-driving [ 3 , 4 ] . Most existing works require agents to receive high-quality supervision signals , e.g. , reward or expert demonstrations , which are either infeasible or expensive to obtain in practice [ 5 , 6 ] . The outputs of reward functions in RL are subject to multiple kinds of randomness . For example , the reward collected from sensors on a robot may be biased and have inherent noise due to physical conditions such as temperature and lighting [ 7 , 8 , 9 ] . For the human-defined reward , different human instructors might provide drastically different feedback that leads to biased rewards [ 10 ] . Besides , the demonstrations by an expert in behavioral cloning ( BC ) are often imperfect due to limited resources and environment noise [ 11 , 12 , 13 ] . Therefore , learning from weak supervision signals such as noisy rewards [ 7 ] or low-quality demonstrations produced by untrustworthy expert [ 12 , 14 ] is one of the outstanding challenges that prevents a wider application of PL . Although some works have explored these topics separately in their specific domains [ 7 , 15 , 14 , 16 ] , there lacks a unified solution for robust policy learning in imperfect situations . Moreover , the noise model as well as the corruption level in supervision signals is often required . To handle these challenges , we first formulate a meta-framework to study RL/BC with weak supervision and call it weakly supervised policy learning . Then we propose a theoretically principled solution , PeerPL , to perform efficient policy learning using the available weak supervision without requiring noise rates . Our solution is inspired by peer loss [ 17 ] , a recently proposed loss function for learning with noisy labels but does not require the specification of noise rates . In peer loss , the noisy labels are treated as a peer agent ’ s supervision . This loss function explicitly punishes the classifier from simply agreeing with the noisy labels , but would instead reward it for a “ correlated agreement '' ( CA ) . We adopt a 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . similar idea and treat the “ weak supervision ” as the noisy information coming from an imperfect peer agent , and evaluate the learning agent ’ s policy based on a “ correlated agreement ” ( CA ) with the weak supervision signals . Compared to standard reward and evaluation functions that encourage simple agreements with the supervision , our approach punishes “ over-agreement '' to avoid overfitting to the weak supervision , which offers us a family of solutions that do not require prior knowledge of the corruption level in supervision signals . To summarize , the contributions in the paper are : ( 1 ) We provide a unified formulation of the weakly supervised policy learning problems ; ( 2 ) We propose PeerPL , a new way to perform policy evaluation for RL/BC tasks , and demonstrate how it adapts in challenging tasks including RL with noisy rewards and BC from weak demonstrations ; ( 3 ) PeerPL is theoretically guaranteed to recover the optimal policy , as if the supervision are of high-quality and clean . ( 4 ) Experiment results show strong evidence that PeerPL brings significant improvements over state-of-the-art solutions . Code is online available at : https : //github.com/wangjksjtu/PeerPL . 1.1 Related Work . Learning with Noisy Supervision Learning from noisy supervision is a widely explored topic . The seminal work [ 18 ] first proposed an unbiased surrogate loss function to recover the true loss from the noisy label distribution , given the knowledge of the noise rates of labels . Follow-up works offered ways to estimate the noise level from model predictions [ 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 ] or label consensuses of nearby representations [ 28 ] . Recent works also studied this problem in sequential settings including federated bandit [ 29 ] and RL [ 7 ] . The former work assumes the noise can be offset by averaging rewards from multiple agents . [ 7 ] designs a statistics-based estimation algorithm for noise rates in observed rewards , which can be inefficient especially when the state-action space is huge . Moreover , the error in the estimation can accumulate and amplify in sequential problems . Inspired by recent advances of peer loss [ 17 , 30 , 31 ] , our solution is able to recover true supervision signals without requiring a priori specification of the noise rates . Behavioral Cloning ( BC ) Standard BC [ 32 , 33 ] tackles the sequential decision-making problem by imitating the expert actions using supervised learning . Specifically , it aims to minimize the one-step deviation error over the expert trajectory without reasoning about the sequential consequences of actions . Therefore , the agent suffers from compounding errors when there is a mismatch between demonstrations and real states encountered [ 33 , 34 , 35 ] . Recent works introduce data augmentations [ 36 ] and value-based regularization [ 37 ] or inverse dynamics models [ 38 , 39 ] to encourage learning long-horizon behaviors . While being simple and straightforward , BC has been widely investigated in a range of application domains [ 40 , 41 ] and often yields competitive performance [ 42 , 37 ] . Our framework is complementary to the current BC literature by introducing a learning strategy from weak demonstrations ( e.g. , noisy or from a poorly-trained agent ) and provides theoretical guarantees on how to retrieve clean policy under mild assumptions [ 43 ] . Correlated Agreement In [ 44 , 45 ] , a correlated agreement ( CA ) type of mechanism is proposed to evaluate the correlations between agents ’ reports . In addition to encouraging a certain agreement between agents ’ reports , CA also punishes over-agreement when two agents always report identically . Recently , [ 17 , 30 , 25 ] adapt a similar idea to noisy label learning thus offloading the burdens of estimating noise rates . We consider a more challenging sequential decision-making problem and study the convergence rates under noisy supervision signals . 2 Policy Learning from Weak Supervision . We begin by reviewing conventional reinforcement learning and behavioral cloning with clean supervision signals . Then we introduce the weak supervision problem in policy learning and define two concrete instantiations : ( 1 ) RL with noisy reward and ( 2 ) BC using weak expert demonstrations . 2.1 Overview of Policy Learning . The goal of policy learning ( PL ) is to learn a policy ⇡ that the agent could follow to perform a series of actions in a stateful environment . For reinforcement learning , the interactive environment is characterized as an MDP M = hS , A , R , P , i . At each time t , the agent in state st 2 S takes an action at 2 A by following the policy ⇡ : S ⇥ A ! R , and potentially receives a reward r ( st , at ) 2 R. Then the agent transfers to the next state st+1 according to a transition probability function P . We denote the generated trajectory ⌧ = { ( st , at , rt ) } Tt=0 , where T is a finite or infinite horizon . RL algorithms aim to maximize the expected reward over the trajectory ⌧ induced by the policy : J clean ( ⇡ ) = E ( st , at , rt ) ⇠⌧ [ PT t=0 t rt ] , where 2 ( 0 , 1 ] is the discount factor . Another popular policy learning method is behavioral cloning . Let ⇡ ( ·|s ) denotes the distribution over actions formed by ⇡ , and ⇡ ( a|s ) be the probability of choosing action a given state s and policy ⇡ . The goal of BC is to mimic the expert policy ⇡E through a set of demonstrations DE = { ( si , ai ) } Ni=1 drawn from a distribution DE , where ( si , ai ) is the sampled state-action pair from the expert trajectory and ai ⇠ ⇡E ( ·|si ) Then training a policy with standard BC corresponds to maximizing the following log-likelihood : J clean ( ⇡ ) = E ( s , a ) ⇠DE [ log ⇡ ( a|s ) ] . In both RL and BC , the learning agent receives supervision through either the ( clean ) reward r by interacting with environments or the expert policy ⇡E as observable demonstrations . Consider a particular policy class ⇧ , the optimal policy is then defined as ⇡⇤ = argmax⇡2⇧ J clean ( ⇡ ) : ⇡⇤ obtains the maximum expected reward over the horizon T in RL and ⇡⇤ corresponds to the clean expert policy ⇡E in BC . In practice , one can also combine both RL and BC approaches to take advantage of both learning paradigm [ 46 , 47 , 15 , 43 ] . Specifically , a recent hybrid framework called policy co-training [ 43 ] will be considered in this paper . 2.2 Weak Supervision in Policy Learning . The weak supervision signal eY could be noisy reward r̃ for RL or noisy action ã from an imperfect expert policy ⇡̃E for BC , which are noisy versions of the corresponding high-quality supervision signals . See more details below . RL with Noisy Reward Consider a finite MDP fM = hS , A , R , F , P , i with noisy reward channels [ 7 ] , where R : S ⇥A ! R , and the noisy reward r̃ is generated following a certain function F : R ! eR . Denote the trajectory a policy ⇡✓ generates via interacting with fM as ⌧̃✓ . Assume the reward is discrete and has |R| levels . The noisy reward can be characterized via a unknown matrix CRL|R|⇥|R| , where each entry cj , k indicates the flipping probability for generating a possibly different outcome : cRLj , k = P ( r̃t = Rk|rt = Rj ) . We call r and r̃ the true reward and noisy reward . BC with Weak Demonstration Instead of observing the true expert demonstration generated according to ⇡E , denote the available weak demonstrations by { ( si , ãi ) } Ni=1 , where ãi is is the noisy expert action drawn according to a random variable ãi = ⇡̃E ( si ) ⇠ ⇡̃E ( ·|si ) , each state-action pair ( si , ãi ) is sampled from distribution eDE . Note there may exist two randomness factors in getting ãi : uncertainty in true policy ⇡E and noise from imperfect policy ⇡̃E . In particular , we do not consider the former randomness in theoretical analyses : given the output distribution ⇡E ( ·|si ) , only one deterministic action ⇡E ( si ) is taken by expert . This is because with uncertainty in true expert actions , it is hard to distinguish a clean case with true expert actions from the weak supervision case without addition knowledge . Similar assumptions are also adopted in [ 23 , 28 ] . The noisy action is modeled by a unknown confusion matrix CBC|A|⇥|A| , where each entry cj , k indicates the flipping probability for taking a sub-optimal action that differs from ⇡E ( s ) : cBCj , k = P ( ⇡̃E ( s ) = Ak|⇡E ( s ) = Aj ) , Ak and Aj denote the k-th and the j-th action from the action space A . In the above definition , we assume the noisy action ãi is independent of the state s given the deterministic expert action ⇡E ( s ) , i.e. , P ( ãi|⇡E ( si ) ) = P ( ãi|si , ⇡E ( si ) ) . We aim to recover ⇡⇤ as if we were able to access the quality expert demonstration ⇡E instead of ⇡̃E . Knowledge of C Recall C : CRL|R|⇥|R| or C BC |A|⇥|A| is unknown in practice . While recent works estimate this matrix [ 26 , 23 , 28 ] in supervised classification problems , it is still challenging to generalize them to a sequential setting [ 7 ] . When C is not perfectly estimated , the estimation error of C may lead to unexpected state-action pairs then the error of reward estimates will be accumulated in sequential learning . Besides , estimating C involves extra computation burden . In contrast , our method gets rid of the above issues since it is free of any knowledge of C and leads to more robust policy learning algorithms . Learning Goal With full supervision , both RL and BC can converge to the optimal policy ⇡⇤ . However , when only weak supervision is available , with an over-parameterized model such as a deep neural network , the learning agent will easily memorize the weak supervision and learn a biased policy [ 48 ] . In our meta framework , instead of converging to any biased policy , we focus on learning the optimal policy ⇡⇤ with only a weak supervision sequence denoted as { ( st , at ) , eYt } Tt=1 ( RL ) or { ( si , ai ) , eYi } Ni=1 ( BC ) . | This paper formulates a framework for reinforcement learning and behavior cloning from weak supervisions (i.e., noisy rewards or imperfect expert demonstration). Specifically, it proposes PeerPL to perform efficient policy learning from the available weak supervisions, which covers PeerRL (for RL with noisy rewards), PeerBC (for imitation learning from imperfect demonstration) and PeerCT (for hybrid setting). The PeerPL idea is based on a new weak supervision objective that is in the form of difference between norm learning loss and a loss incurred by randomly sampling the supervision signals. Experimental results demonstrate that PeerPL significantly outperforms SOTA solutions when the complexity or the noise of the learning environment grows. The proposed idea is useful in practice as it increases the robustness of the learning process to imperfect supervision signals. | SP:fef1b68e8fefbd9ab2610b3c995a74852ce53a6a |
Non-Markovian Predictive Coding For Planning In Latent Space | 1 INTRODUCTION . Learning to control from high dimensional observations has been made possible due to the advancements in reinforcement learning ( RL ) and deep learning . These advancements have enabled notable successes such as solving video games ( Mnih et al. , 2015 ; Lample & Chaplot , 2017 ) and continuous control problems ( Lillicrap et al. , 2016 ) from pixels . However , it is well known that performing RL directly in the high-dimensional observation space is sample-inefficient and may require a large amount of training data ( Lake et al. , 2017 ) . This is a critical problem , especially for real-world applications . Recent model-based RL works ( Kaiser et al. , 2020 ; Ha & Schmidhuber , 2018 ; Hafner et al. , 2019 ; Zhang et al. , 2019 ; Hafner et al. , 2020 ) proposed to tackle this problem by learning a world model in the latent space , and then applying RL algorithms in the latent world model . The existing MBRL methods that learn a latent world model typically do so via reconstruction-based objectives , which are likely to encode task-irrelevant information , such as of the background . In this work , we take inspiration from the success of contrastive learning and propose Non-Markovian Predictive Coding ( NMPC ) , a novel information-theoretic approach for planning from pixels . In contrast to reconstruction , NMPC formulates a mutual information ( MI ) objective to learn the latent space for control . This objective circumvents the need to reconstruct and prioritizes the encoding of task-relevant components of the environment , thus make NMPC more robust when dealing with complicated observations . Our primary contributions are as follows : • We propose Non-Markovian Predictive Coding ( NMPC ) , a novel information-theoretic approach to learn latent world models for planning from high-dimensional observations and theoretically analyze its ability to prioritize the encoding of task-relevant information . • We show experimentally that NMPC outperforms the state-of-the-art model when deal- ing with complex environments dominated by task-irrelevant information , while remaining competitive on standard DeepMind control ( DMControl ) tasks . Additionally , we conduct detailed ablation analyses to study the empirical importance of the components in NMPC . 2 BACKGROUND . The motivation and design of our model are largely based on two previous works ( Shu et al. , 2020 ; Hafner et al. , 2020 ) . In this section , we briefly go over the key concepts in each work . Shu et al . ( 2020 ) proposed PC3 , an information-theoretic approach that uses contrastive predictive coding ( CPC ) to learn a latent space amenable to locally-linear control . Specifically , they present the theory of predictive suboptimality to motivate a CPC objective between the latent states of two consecutive time steps , instead of CPC between the frame and its corresponding state . Moreover , they use the latent dynamics F as the variational device in the lower bound ` cpc ( E , F ) = E 1 K ∑ i ln F ( E ( o ( i ) t+1 ) | E ( o ( i ) t ) , a ( i ) t ) 1 K ∑ j F ( E ( o ( i ) t+1 ) | E ( o ( j ) t ) , a ( j ) t ) ( 1 ) This particular design of the critic has two benefits , where it circumvents the instantiation of an auxiliary critic , and also takes advantage of the property that an optimal critic is the true latent dynamics . However , the author also shows that this objective does not ensure the learning of a latent dynamics F that is consistent with the true latent dynamics , therefore introduces the consistency loss to ensure the latent dynamics model F indeed approximates the true latent dynamics . ` cons ( E , F ) = Ep ( ot+1 , ot , at ) lnF ( E ( ot+1 ) | E ( ot ) , at ) ( 2 ) Since PC3 only tackles the problem from an optimal control perspective , it is not readily applicable to RL problems . Indeed , PC3 requires a depiction of the goal image in order to perform control , and also the ability to teleport to random locations of the state space to collect data , which are impractical in many problems . On the other hand , Dreamer ( Hafner et al. , 2020 ) achieves stateof-the-art performance on many RL tasks , but learns the latent space using a reconstruction-based objective . While the authors included a demonstration of a contrastive approach that yielded inferior performance to their reconstruction-based approach , their contrastive model applied CPC between the frame and its corresponding state , as opposed to between latent states across time steps . In this paper , we present Non-Markovian Predictive Coding ( NMPC ) , a novel latent world model that leverages the concepts in PC3 and apply them to Dream paradigm and RL setting . Motivated by PC3 , we formulate a mutual information objective between historical and future latent states to learn the latent space . We additionally take advantage of the recurrent model in Dreamer to model more complicated dynamics than what was considered in PC3 . The use of recurrent dynamics also allows us to extend Eqs . ( 1 ) and ( 2 ) to the non-Markovian setting , which was not considered in PC3 . 3 NON-MARKOVIAN PREDICTIVE CODING FOR PLANNING FROM PIXELS . To plan in an unknown environment , we need to model the environment dynamics from experience . We do so by iteratively collecting new data and using those data to train the world model . In this section , we focus on presenting the proposed latent world model , its components and objective functions , and provide practical considerations when implementing the method . 3.1 NON-MARKOVIAN PREDICTIVE CODING . We aim to learn a latent dynamics model for planning . To do that , we define an encoder E to embed high-dimensional observations into a latent space , a latent dynamics F to model the world in this space , and a reward function , as follows Encoder : E ( ot ) = st Latent dynamics : F ( st | s < t , a < t ) = p ( st | s < t , a < t ) Reward function : R ( rt | st ) = p ( rt | st ) ( 3 ) in which t is the discrete time step , { ot , at , rt } Tt=1 are data sequences with image observations ot , continuous action vectors at , scalar rewards rt , and st denotes the latent state at time t. To handle potentially non-Markovian environment dynamics , we model the transition dynamics using a recurrent neural network with a deterministic state ht = RNN ( ht−1 , st−1 , at−1 ) , which summarizes information about the past , followed by the stochastic state model p ( st|s < t , a < t ) = p ( st|ht ) . In practice , we use a deterministic encoder , and Gaussian distribution for dynamics and reward functions . The graphical model is presented in Figure 1 . We now introduce the three key components of our model : recurrent contrastive predictive coding , non-markovian consistency , and reward prediction . Recurrent contrastive predictive coding Instead of performing pixel prediction to learn E and F as in Hafner et al . ( 2019 ; 2020 ) , we take a different approach , where we maximize the mutual information ( MI ) between the past latent codes and actions against the future latent code I ( E ( Ot ) ; E ( O < t ) , A < t ) . This objective prioritizes the encoding of predictable components from the environment , which potentially helps avoid encoding nuance information when dealing with complex image observations . A similar MI objective was previously used in Shu et al . ( 2020 ) . However , Shu et al . ( 2020 ) only considered the Markovian setting and thus focused on the mutual information over consecutive time steps . In contrast , we consider a non-Markovian setting and wish to maximize the mutual information between the latent code at any time step t and the entire historical trajectory latent codes and actions prior to t. Given a trajectory over T steps , our non-Markovian MI objective thus sums over every possible choice of t ∈ { 2 , . . . , T } , T∑ t=2 I ( E ( Ot ) ; E ( O < t ) , A < t ) . ( 4 ) To estimate this quantity , we employ contrastive predictive coding ( CPC ) proposed by Oord et al . ( 2018 ) . We perform CPC by introducing a critic function f to construct the lower bound at a particular time step t , I ( E ( Ot ) ; E ( O < t ) , A < t ) ≥ E 1 K ∑ i ln exp f ( E ( o ( i ) t ) , E ( o ( i ) < t ) , a ( i ) < t ) 1 K ∑ j exp f ( E ( o ( i ) t ) , E ( o ( j ) < t ) , a ( j ) < t ) = : ` ( t ) r-cpc , ( 5 ) where the expectation is over K i.i.d . samples of ( ot , o < t , a < t ) . Note that Eq . ( 5 ) uses past ( E ( o ( j ) < t ) , a ( j ) < t ) from unrelated trajectories as an efficient source of negative samples for the con- trastive prediction of the future latent code E ( o ( i ) t ) . Following Shu et al . ( 2020 ) , we choose to tie f to our recurrent latent dynamics model F , exp f ( st , s < t , a < t ) = F ( st|s < t , a < t ) . ( 6 ) There are two favorable properties of this particular design . First , it is parameter-efficient since we can circumvent the instantiation of a separate critic f . Moreover , it takes advantage of the fact that an optimal critic is the true latent dynamics induced by the encoder E ( Poole et al. , 2019 ; Ma & Collins , 2018 ) . We denote our overall CPC objective as ` r-cpc ( E , F ) = ∑T t=2 ` ( t ) r-cpc ( E , F ) . Non-Markovian consistency Although the true dynamics is an optimal critic for the CPC bound , maximizing this objective only does not ensure the learning of a latent dynamics model F that is consistent with the true latent dynamics , due to the non-uniqueness of the optimal critic ( Shu et al. , 2020 ) . Since an accurate dynamics is crucial for planning in the latent space , we additionally introduce a consistency objective , which encourages the latent dynamics model to maintain a good prediction of the future latent code given the past latent codes and actions . Similar to the recurrent CPC objective , we optimize for consistency at every time step in the trajectory , ` cons ( E , F ) = T∑ t=2 Ep ( ot , o < t , a < t ) lnF ( E ( ot ) |E ( o < t ) , a < t ) . ( 7 ) Reward prediction Finally , we train the reward function by maximizing the likelihood of the true reward value conditioned on the latent state st = E ( ot ) , ` reward ( E , R ) = T∑ t=1 Ep ( ot ) lnR ( rt|E ( ot ) ) . ( 8 ) | This paper proposes an information-theoretic framework for learning a world model that encodes task-relevant information of the world. It shows that the learned encoder and dynamics model can be used to train the policy and fitting the value function to agent to perform comparibly well to Dreamer on standard tasks and outperform them when there are distractions in the scene. The paper also provides a theoretical anylisis of the task-relevant information in the encoding. | SP:c076b203ffada1be4399351d17008ce6fa54f441 |
Non-Markovian Predictive Coding For Planning In Latent Space | 1 INTRODUCTION . Learning to control from high dimensional observations has been made possible due to the advancements in reinforcement learning ( RL ) and deep learning . These advancements have enabled notable successes such as solving video games ( Mnih et al. , 2015 ; Lample & Chaplot , 2017 ) and continuous control problems ( Lillicrap et al. , 2016 ) from pixels . However , it is well known that performing RL directly in the high-dimensional observation space is sample-inefficient and may require a large amount of training data ( Lake et al. , 2017 ) . This is a critical problem , especially for real-world applications . Recent model-based RL works ( Kaiser et al. , 2020 ; Ha & Schmidhuber , 2018 ; Hafner et al. , 2019 ; Zhang et al. , 2019 ; Hafner et al. , 2020 ) proposed to tackle this problem by learning a world model in the latent space , and then applying RL algorithms in the latent world model . The existing MBRL methods that learn a latent world model typically do so via reconstruction-based objectives , which are likely to encode task-irrelevant information , such as of the background . In this work , we take inspiration from the success of contrastive learning and propose Non-Markovian Predictive Coding ( NMPC ) , a novel information-theoretic approach for planning from pixels . In contrast to reconstruction , NMPC formulates a mutual information ( MI ) objective to learn the latent space for control . This objective circumvents the need to reconstruct and prioritizes the encoding of task-relevant components of the environment , thus make NMPC more robust when dealing with complicated observations . Our primary contributions are as follows : • We propose Non-Markovian Predictive Coding ( NMPC ) , a novel information-theoretic approach to learn latent world models for planning from high-dimensional observations and theoretically analyze its ability to prioritize the encoding of task-relevant information . • We show experimentally that NMPC outperforms the state-of-the-art model when deal- ing with complex environments dominated by task-irrelevant information , while remaining competitive on standard DeepMind control ( DMControl ) tasks . Additionally , we conduct detailed ablation analyses to study the empirical importance of the components in NMPC . 2 BACKGROUND . The motivation and design of our model are largely based on two previous works ( Shu et al. , 2020 ; Hafner et al. , 2020 ) . In this section , we briefly go over the key concepts in each work . Shu et al . ( 2020 ) proposed PC3 , an information-theoretic approach that uses contrastive predictive coding ( CPC ) to learn a latent space amenable to locally-linear control . Specifically , they present the theory of predictive suboptimality to motivate a CPC objective between the latent states of two consecutive time steps , instead of CPC between the frame and its corresponding state . Moreover , they use the latent dynamics F as the variational device in the lower bound ` cpc ( E , F ) = E 1 K ∑ i ln F ( E ( o ( i ) t+1 ) | E ( o ( i ) t ) , a ( i ) t ) 1 K ∑ j F ( E ( o ( i ) t+1 ) | E ( o ( j ) t ) , a ( j ) t ) ( 1 ) This particular design of the critic has two benefits , where it circumvents the instantiation of an auxiliary critic , and also takes advantage of the property that an optimal critic is the true latent dynamics . However , the author also shows that this objective does not ensure the learning of a latent dynamics F that is consistent with the true latent dynamics , therefore introduces the consistency loss to ensure the latent dynamics model F indeed approximates the true latent dynamics . ` cons ( E , F ) = Ep ( ot+1 , ot , at ) lnF ( E ( ot+1 ) | E ( ot ) , at ) ( 2 ) Since PC3 only tackles the problem from an optimal control perspective , it is not readily applicable to RL problems . Indeed , PC3 requires a depiction of the goal image in order to perform control , and also the ability to teleport to random locations of the state space to collect data , which are impractical in many problems . On the other hand , Dreamer ( Hafner et al. , 2020 ) achieves stateof-the-art performance on many RL tasks , but learns the latent space using a reconstruction-based objective . While the authors included a demonstration of a contrastive approach that yielded inferior performance to their reconstruction-based approach , their contrastive model applied CPC between the frame and its corresponding state , as opposed to between latent states across time steps . In this paper , we present Non-Markovian Predictive Coding ( NMPC ) , a novel latent world model that leverages the concepts in PC3 and apply them to Dream paradigm and RL setting . Motivated by PC3 , we formulate a mutual information objective between historical and future latent states to learn the latent space . We additionally take advantage of the recurrent model in Dreamer to model more complicated dynamics than what was considered in PC3 . The use of recurrent dynamics also allows us to extend Eqs . ( 1 ) and ( 2 ) to the non-Markovian setting , which was not considered in PC3 . 3 NON-MARKOVIAN PREDICTIVE CODING FOR PLANNING FROM PIXELS . To plan in an unknown environment , we need to model the environment dynamics from experience . We do so by iteratively collecting new data and using those data to train the world model . In this section , we focus on presenting the proposed latent world model , its components and objective functions , and provide practical considerations when implementing the method . 3.1 NON-MARKOVIAN PREDICTIVE CODING . We aim to learn a latent dynamics model for planning . To do that , we define an encoder E to embed high-dimensional observations into a latent space , a latent dynamics F to model the world in this space , and a reward function , as follows Encoder : E ( ot ) = st Latent dynamics : F ( st | s < t , a < t ) = p ( st | s < t , a < t ) Reward function : R ( rt | st ) = p ( rt | st ) ( 3 ) in which t is the discrete time step , { ot , at , rt } Tt=1 are data sequences with image observations ot , continuous action vectors at , scalar rewards rt , and st denotes the latent state at time t. To handle potentially non-Markovian environment dynamics , we model the transition dynamics using a recurrent neural network with a deterministic state ht = RNN ( ht−1 , st−1 , at−1 ) , which summarizes information about the past , followed by the stochastic state model p ( st|s < t , a < t ) = p ( st|ht ) . In practice , we use a deterministic encoder , and Gaussian distribution for dynamics and reward functions . The graphical model is presented in Figure 1 . We now introduce the three key components of our model : recurrent contrastive predictive coding , non-markovian consistency , and reward prediction . Recurrent contrastive predictive coding Instead of performing pixel prediction to learn E and F as in Hafner et al . ( 2019 ; 2020 ) , we take a different approach , where we maximize the mutual information ( MI ) between the past latent codes and actions against the future latent code I ( E ( Ot ) ; E ( O < t ) , A < t ) . This objective prioritizes the encoding of predictable components from the environment , which potentially helps avoid encoding nuance information when dealing with complex image observations . A similar MI objective was previously used in Shu et al . ( 2020 ) . However , Shu et al . ( 2020 ) only considered the Markovian setting and thus focused on the mutual information over consecutive time steps . In contrast , we consider a non-Markovian setting and wish to maximize the mutual information between the latent code at any time step t and the entire historical trajectory latent codes and actions prior to t. Given a trajectory over T steps , our non-Markovian MI objective thus sums over every possible choice of t ∈ { 2 , . . . , T } , T∑ t=2 I ( E ( Ot ) ; E ( O < t ) , A < t ) . ( 4 ) To estimate this quantity , we employ contrastive predictive coding ( CPC ) proposed by Oord et al . ( 2018 ) . We perform CPC by introducing a critic function f to construct the lower bound at a particular time step t , I ( E ( Ot ) ; E ( O < t ) , A < t ) ≥ E 1 K ∑ i ln exp f ( E ( o ( i ) t ) , E ( o ( i ) < t ) , a ( i ) < t ) 1 K ∑ j exp f ( E ( o ( i ) t ) , E ( o ( j ) < t ) , a ( j ) < t ) = : ` ( t ) r-cpc , ( 5 ) where the expectation is over K i.i.d . samples of ( ot , o < t , a < t ) . Note that Eq . ( 5 ) uses past ( E ( o ( j ) < t ) , a ( j ) < t ) from unrelated trajectories as an efficient source of negative samples for the con- trastive prediction of the future latent code E ( o ( i ) t ) . Following Shu et al . ( 2020 ) , we choose to tie f to our recurrent latent dynamics model F , exp f ( st , s < t , a < t ) = F ( st|s < t , a < t ) . ( 6 ) There are two favorable properties of this particular design . First , it is parameter-efficient since we can circumvent the instantiation of a separate critic f . Moreover , it takes advantage of the fact that an optimal critic is the true latent dynamics induced by the encoder E ( Poole et al. , 2019 ; Ma & Collins , 2018 ) . We denote our overall CPC objective as ` r-cpc ( E , F ) = ∑T t=2 ` ( t ) r-cpc ( E , F ) . Non-Markovian consistency Although the true dynamics is an optimal critic for the CPC bound , maximizing this objective only does not ensure the learning of a latent dynamics model F that is consistent with the true latent dynamics , due to the non-uniqueness of the optimal critic ( Shu et al. , 2020 ) . Since an accurate dynamics is crucial for planning in the latent space , we additionally introduce a consistency objective , which encourages the latent dynamics model to maintain a good prediction of the future latent code given the past latent codes and actions . Similar to the recurrent CPC objective , we optimize for consistency at every time step in the trajectory , ` cons ( E , F ) = T∑ t=2 Ep ( ot , o < t , a < t ) lnF ( E ( ot ) |E ( o < t ) , a < t ) . ( 7 ) Reward prediction Finally , we train the reward function by maximizing the likelihood of the true reward value conditioned on the latent state st = E ( ot ) , ` reward ( E , R ) = T∑ t=1 Ep ( ot ) lnR ( rt|E ( ot ) ) . ( 8 ) | The paper proposes a method for visual model-based reinforcement learning that relies on contrastive learning to learn the predictive model. Building on Hafner’20, the paper replaces the image reconstruction objective with a noise contrastive estimation (NCE) objective for the latent dynamics model, an NCE objective between the images and representations, and an additional maximum likelihood objective for the latent dynamics. It is shown that the method is competitive to Hafner’20 on the DM Control benchmark, and outperforms Hafner’20 on DM Control tasks with natural images used as background. The paper also theoretically analyzes one of the used objectives, arguing that it may lead to discarding irrelevant information. | SP:c076b203ffada1be4399351d17008ce6fa54f441 |
Empirical Studies on the Convergence of Feature Spaces in Deep Learning | 1 INTRODUCTION . Blessed by the capacities of feature learning , deep neural networks ( DNNs ) ( LeCun et al. , 2015 ) have been widely used to perform learning tasks , ranging from classification , to generation ( Goodfellow et al. , 2014 ; Radford et al. , 2015 ) , in various settings ( e.g. , supervised , unsupervised , and selfsupervised learning ) . To better analyze the features learned by deep models , numerous works have studied on interpreting the features spaces of the well-trained models ( Simonyan et al. , 2013 ; White , 2016 ; Zhu et al. , 2016 ; Bau et al. , 2017 ; 2019 ; Jahanian et al. , 2020 ; Zhang & Wu , 2020 ) . Invariance beyond the use of architectures and labels . While existing studies primarily focus on the interpolation of a given model to discover mappings from the feature space to outputs of the model ( e.g. , classification ( Bau et al. , 2017 ) and generation ( Jahanian et al. , 2020 ) ) , the work is so few that compares the feature spaces learned by deep models of varying architectures ( e.g. , MLP/CNN classifiers versus Autoencoders ) for different learning paradigms ( Chen et al. , 2020 ; Khosla et al. , 2020 ; Spinner et al. , 2018 ) . More specifically , we are particularly interested in whether there exists certain “ statistical invariance ” in the feature space , no matter what type of architectures or whether label information ( e.g. , supervised vs. unsupervised vs. self-supervised ( Chen et al. , 2020 ) learning ) are used in feature learning with the same training dataset . Hypotheses . It is not difficult to imagine that the feature spaces of well-trained DNN classifiers in supervised learning setting might share some linear subspace ( Vaswani et al. , 2018 ) . When models are well fitted to the same training set , the feature vectors of training samples should be projected to the ground-truth labels after a Fully-Connected Layer ( i.e. , a linear transform ) , while such linear subspace are supposed to distribute samples in a discriminative manner . We doubt that such subspace might be not only shared by supervised learners but also with AEs which are trained to reconstruct input data without any label information in an unsupervised manner , or even shared with self-supervised DNN classifiers ( e.g. , SimCLR ( Chen et al. , 2020 ) ) which train ( 1 ) CNN feature extractor ( using contrastive loss without labels ) and ( 2 ) linear classifiers ( using discriminative loss based on labels ) separately in an ad-hoc manner . More specifically , we hypothesize that ( H.I : ) there exists certain common feature subspaces shared by well-trained deep models using the same training dataset , even though the architectures ( MLPs , CNNs , and AEs ) and the learning paradigms ( supervised , unsupervised , and self-supervised ) are significantly different . Further , as the training procedure usually initializes the DNN models from random weights and learns features from the training set step-by-step , we hypothesize that ( H.II : ) the training procedure gradually shapes the feature subspace over training iterations and asymptotically converge to the common subspace in certain statistical measure . Finally , we hypothesize that ( H.III ) the convergence to the common feature subspace would connect to the data distribution and performance of models , as such behavior indicates how well the features are learned from data . This hypothesis is motivated by the observation that when the DNN model tends to be linear the DNN feature subspace should be close to the data subspace , while the well-trained DNN models should be locally linear ( Zhang & Wu , 2020 ) or piecewise linear ( Arora et al. , 2018 ) . Contributions . To test above three hypotheses , this work makes contributions in proposing new measures to the DNN features , namely P-vectors , and conducting extensive experiments for empirical studies . We train deep models using various DNN architectures , multiple learning paradigms , and datasets , with the checkpoint restored per epoch . Then , we extract the feature vectors for either training or testing sample sets , from the model ( Please see Section 3 for details ) and discover some interesting relationships or associations as discussed below . I. P-vector and Convergence : Given the matrix of feature vectors ( # samples1× # features ) for either training or testing samples , we perform the singular value decomposition ( SVD ) to obtain left and right singular vectors , characterizing the subspaces that samples distribute and the projection of features to subspaces respectively . We observe that deep models well-trained using the same 1We follow the convenience that denotes # as the term “ the number of ” for short . dataset share similar top left-singular vectors ( referring to the principal subspace of feature vectors ) , namely P-vector in this study . For example , Figure 1 ( a ) – ( b ) . show the high cosine similarity ( close to 1 ) between the P-vectors of any two well-trained DNNs for eight different deep learning architectures/tasks . This observation well backups H.I , where the common subspace in feature spaces shared by models trained with different architectures/paradigms has been observed . With checkpoints obtained along the training procedure , we estimate the angle that compares P-vectors of the checkpoint per epoch and the well-trained one . We find such angle decrease over the number of epochs ( in an overall manner ) and would converge2 to smaller ones . For example , Figure 1 ( c ) – ( h ) . demonstrate the consistent converging trends of angles between P-vectors of the well-trained model and its checkpoints in progress of training for eight different deep learning architectures/tasks . This observation supports H.II , where convergence to the common feature subspace are expected . II . Data Distribution and Performance : To connect to the data distributions , we intend to compare feature vectors and original data vectors of samples using P-vectors . In addition to the P-vector estimated from the feature vectors of a deep model ( namely a “ model P-vector ” ) , We simply form the sample vectors ( either for training or testing ) into a # samples× # data dimension matrix and perform SVD to obtain the top left singular vector as the P-vector of samples ( namely a “ data P-vector ” ) . We estimate the angles between the model and dataP-vectors , and find a trend of convergence ( from nearly orthogonal to relatively small angles ) , where we can see the well-trained models would incorporate smaller angles than ones in the early stage of training processes . We further correlate such angles with training and testing accuracy of the models , where we observe significant negative correlations in most cases of experiments . The trends show that the model with a smaller angle between the model and data P-vectors would enjoy better performance . The evidences backup H.III . 2 RELATED WORK . In this section , we first present the preliminaries in understanding feature learning of DNNs , then discuss the most relevant works to our studies . As early as 2013 , ( Simonyan et al. , 2013 ) proposed to visualize the features learned by deep convolutional neural networks ( CNN ) and made sense of discriminative learning via deep feature extraction . For generative models , ( White , 2016 ; Zhu et al. , 2016 ) studied the interpolation of latent spaces while ( Zhu et al. , 2016 ) discovered an user-controlled way to manipulate the images generated through the surrogation of latent spaces via manifolds . Later , ( Bau et al. , 2017 ) presented the visual concepts learned in the feature spaces of discriminative models through network dissection on specific datasets while the same group of researchers also proposed GAN dissection ( Bau et al. , 2019 ) – an interactive way to manipulate the semantics and style of image synthesis . ( Richardson & Weiss , 2018 ) compared GAN and Gaussian Mixture Models ( GMMs ) to understand the capacity of distribution learning in GAN . ( Berthelot et al. , 2019 ) proposed to improve understanding and interpolation of Autoencoders using adversarial regularizer while ( Spinner et al. , 2018 ) compared AEs with its variational derivatives to interpret the latent spaces . More recently , ( Saxe et al. , 2019 ) mathematically analyzed the process of neural representation construction from the perspectives of learning dynamics of deep neural networks . ( Jahanian et al. , 2020 ) studied the “ steerability ” of GAN , where it discovered point-to-point editing paths for content/style manipulation . ( Zhang & Wu , 2020 ) uncovered the phenomena that DNN classifiers with piecewise linear activation tend to map the input data to linear subregions . Other impressive studies in this line of research include ( Nguyen et al. , 2016 ; Arvanitidis et al. , 2018 ; Sercu et al. , 2019 ) . Discussion . The most relevant studies to our work are ( Bau et al. , 2017 ; Zhang & Wu , 2020 ; Saxe et al. , 2019 ; Lee et al. , 2019 ) . For discriminative models , ( Bau et al. , 2017 ) recovered visual features learned by CNN classifiers with a priorly labeled dataset , and quantified then compared the feature learning capacities ( namely “ interpretability ” in the work ) of different DNN models through patterns matching with the ground truth . Compared to ( Bau et al. , 2017 ) , we carry out the empirical studies on a wide range of datasets without any prior information on their features and observe consistent phenomena in the distribution of samples in the feature spaces . Furthermore , while ( Zhang & Wu , 2020 ) 2In our research , we name convergence as the decreasing trend of P-vector angles from a larger one to a smaller one ( e.g. , 10◦ for supervised CNN classifiers and SimCLR , ≤ 10◦ for ConvAEs/DenoiseAEs , and 30◦ for SupCon ) over training epochs . For reference , Cosine ( 10◦ ) =0.985 is close to 1.0 studied the properties of regions where a supervised DNN classifier with piecewise linear activation behaves linearly , our work observes the common linear subspaces shared by the features learned by the networks that are trained with different architectures ( e.g. , MLP/CNN classifiers and AEs with ReLU activation ) and paradigms ( e.g. , supervised , unsupervised , and self-supervised learning ) . Furthermore , both our work and ( Saxe et al. , 2019 ) propose to compare feature/representation learning by various models through SVD , while we perform SVD to investigate the distribution of samples in feature space and ( Saxe et al. , 2019 ) uncovered the latent structures in input-and-output of neurons . To understand the latent space of generative models , some statistical/mathematical tools ( Richardson & Weiss , 2018 ; Lee et al. , 2019 ) have been introduced . Through comparisons between GAN and GMM , ( Richardson & Weiss , 2018 ) uncovered GAN ’ s superiority in feature/texture reconstruction and in the meanwhile its incompetence in distribution learning , while ( Lee et al. , 2019 ) provides some analytical insights on the structure of latent spaces . In our work , we propose P-vectors to model the distribution of samples in the feature/latent spaces of DNN classifiers and AEs . To the best of our knowledge , we make unique contributions compared to the above work . | This paper has a closer look at the distributions of samples in the feature space by utilizing P-vector to analyze principal subspace. According to their empirical studies, the authors concluded that the feature spaces learned by different deep models with the same dataset would share common principal subspaces for the same dataset. It will not be affected by DNN architectures or the usage of labels in feature learning. Only the training procedure gradually shapes the feature subspace to the shared common subspace. | SP:53ed366f6004f4c6edc7fcc5516d7e016c21ba91 |
Empirical Studies on the Convergence of Feature Spaces in Deep Learning | 1 INTRODUCTION . Blessed by the capacities of feature learning , deep neural networks ( DNNs ) ( LeCun et al. , 2015 ) have been widely used to perform learning tasks , ranging from classification , to generation ( Goodfellow et al. , 2014 ; Radford et al. , 2015 ) , in various settings ( e.g. , supervised , unsupervised , and selfsupervised learning ) . To better analyze the features learned by deep models , numerous works have studied on interpreting the features spaces of the well-trained models ( Simonyan et al. , 2013 ; White , 2016 ; Zhu et al. , 2016 ; Bau et al. , 2017 ; 2019 ; Jahanian et al. , 2020 ; Zhang & Wu , 2020 ) . Invariance beyond the use of architectures and labels . While existing studies primarily focus on the interpolation of a given model to discover mappings from the feature space to outputs of the model ( e.g. , classification ( Bau et al. , 2017 ) and generation ( Jahanian et al. , 2020 ) ) , the work is so few that compares the feature spaces learned by deep models of varying architectures ( e.g. , MLP/CNN classifiers versus Autoencoders ) for different learning paradigms ( Chen et al. , 2020 ; Khosla et al. , 2020 ; Spinner et al. , 2018 ) . More specifically , we are particularly interested in whether there exists certain “ statistical invariance ” in the feature space , no matter what type of architectures or whether label information ( e.g. , supervised vs. unsupervised vs. self-supervised ( Chen et al. , 2020 ) learning ) are used in feature learning with the same training dataset . Hypotheses . It is not difficult to imagine that the feature spaces of well-trained DNN classifiers in supervised learning setting might share some linear subspace ( Vaswani et al. , 2018 ) . When models are well fitted to the same training set , the feature vectors of training samples should be projected to the ground-truth labels after a Fully-Connected Layer ( i.e. , a linear transform ) , while such linear subspace are supposed to distribute samples in a discriminative manner . We doubt that such subspace might be not only shared by supervised learners but also with AEs which are trained to reconstruct input data without any label information in an unsupervised manner , or even shared with self-supervised DNN classifiers ( e.g. , SimCLR ( Chen et al. , 2020 ) ) which train ( 1 ) CNN feature extractor ( using contrastive loss without labels ) and ( 2 ) linear classifiers ( using discriminative loss based on labels ) separately in an ad-hoc manner . More specifically , we hypothesize that ( H.I : ) there exists certain common feature subspaces shared by well-trained deep models using the same training dataset , even though the architectures ( MLPs , CNNs , and AEs ) and the learning paradigms ( supervised , unsupervised , and self-supervised ) are significantly different . Further , as the training procedure usually initializes the DNN models from random weights and learns features from the training set step-by-step , we hypothesize that ( H.II : ) the training procedure gradually shapes the feature subspace over training iterations and asymptotically converge to the common subspace in certain statistical measure . Finally , we hypothesize that ( H.III ) the convergence to the common feature subspace would connect to the data distribution and performance of models , as such behavior indicates how well the features are learned from data . This hypothesis is motivated by the observation that when the DNN model tends to be linear the DNN feature subspace should be close to the data subspace , while the well-trained DNN models should be locally linear ( Zhang & Wu , 2020 ) or piecewise linear ( Arora et al. , 2018 ) . Contributions . To test above three hypotheses , this work makes contributions in proposing new measures to the DNN features , namely P-vectors , and conducting extensive experiments for empirical studies . We train deep models using various DNN architectures , multiple learning paradigms , and datasets , with the checkpoint restored per epoch . Then , we extract the feature vectors for either training or testing sample sets , from the model ( Please see Section 3 for details ) and discover some interesting relationships or associations as discussed below . I. P-vector and Convergence : Given the matrix of feature vectors ( # samples1× # features ) for either training or testing samples , we perform the singular value decomposition ( SVD ) to obtain left and right singular vectors , characterizing the subspaces that samples distribute and the projection of features to subspaces respectively . We observe that deep models well-trained using the same 1We follow the convenience that denotes # as the term “ the number of ” for short . dataset share similar top left-singular vectors ( referring to the principal subspace of feature vectors ) , namely P-vector in this study . For example , Figure 1 ( a ) – ( b ) . show the high cosine similarity ( close to 1 ) between the P-vectors of any two well-trained DNNs for eight different deep learning architectures/tasks . This observation well backups H.I , where the common subspace in feature spaces shared by models trained with different architectures/paradigms has been observed . With checkpoints obtained along the training procedure , we estimate the angle that compares P-vectors of the checkpoint per epoch and the well-trained one . We find such angle decrease over the number of epochs ( in an overall manner ) and would converge2 to smaller ones . For example , Figure 1 ( c ) – ( h ) . demonstrate the consistent converging trends of angles between P-vectors of the well-trained model and its checkpoints in progress of training for eight different deep learning architectures/tasks . This observation supports H.II , where convergence to the common feature subspace are expected . II . Data Distribution and Performance : To connect to the data distributions , we intend to compare feature vectors and original data vectors of samples using P-vectors . In addition to the P-vector estimated from the feature vectors of a deep model ( namely a “ model P-vector ” ) , We simply form the sample vectors ( either for training or testing ) into a # samples× # data dimension matrix and perform SVD to obtain the top left singular vector as the P-vector of samples ( namely a “ data P-vector ” ) . We estimate the angles between the model and dataP-vectors , and find a trend of convergence ( from nearly orthogonal to relatively small angles ) , where we can see the well-trained models would incorporate smaller angles than ones in the early stage of training processes . We further correlate such angles with training and testing accuracy of the models , where we observe significant negative correlations in most cases of experiments . The trends show that the model with a smaller angle between the model and data P-vectors would enjoy better performance . The evidences backup H.III . 2 RELATED WORK . In this section , we first present the preliminaries in understanding feature learning of DNNs , then discuss the most relevant works to our studies . As early as 2013 , ( Simonyan et al. , 2013 ) proposed to visualize the features learned by deep convolutional neural networks ( CNN ) and made sense of discriminative learning via deep feature extraction . For generative models , ( White , 2016 ; Zhu et al. , 2016 ) studied the interpolation of latent spaces while ( Zhu et al. , 2016 ) discovered an user-controlled way to manipulate the images generated through the surrogation of latent spaces via manifolds . Later , ( Bau et al. , 2017 ) presented the visual concepts learned in the feature spaces of discriminative models through network dissection on specific datasets while the same group of researchers also proposed GAN dissection ( Bau et al. , 2019 ) – an interactive way to manipulate the semantics and style of image synthesis . ( Richardson & Weiss , 2018 ) compared GAN and Gaussian Mixture Models ( GMMs ) to understand the capacity of distribution learning in GAN . ( Berthelot et al. , 2019 ) proposed to improve understanding and interpolation of Autoencoders using adversarial regularizer while ( Spinner et al. , 2018 ) compared AEs with its variational derivatives to interpret the latent spaces . More recently , ( Saxe et al. , 2019 ) mathematically analyzed the process of neural representation construction from the perspectives of learning dynamics of deep neural networks . ( Jahanian et al. , 2020 ) studied the “ steerability ” of GAN , where it discovered point-to-point editing paths for content/style manipulation . ( Zhang & Wu , 2020 ) uncovered the phenomena that DNN classifiers with piecewise linear activation tend to map the input data to linear subregions . Other impressive studies in this line of research include ( Nguyen et al. , 2016 ; Arvanitidis et al. , 2018 ; Sercu et al. , 2019 ) . Discussion . The most relevant studies to our work are ( Bau et al. , 2017 ; Zhang & Wu , 2020 ; Saxe et al. , 2019 ; Lee et al. , 2019 ) . For discriminative models , ( Bau et al. , 2017 ) recovered visual features learned by CNN classifiers with a priorly labeled dataset , and quantified then compared the feature learning capacities ( namely “ interpretability ” in the work ) of different DNN models through patterns matching with the ground truth . Compared to ( Bau et al. , 2017 ) , we carry out the empirical studies on a wide range of datasets without any prior information on their features and observe consistent phenomena in the distribution of samples in the feature spaces . Furthermore , while ( Zhang & Wu , 2020 ) 2In our research , we name convergence as the decreasing trend of P-vector angles from a larger one to a smaller one ( e.g. , 10◦ for supervised CNN classifiers and SimCLR , ≤ 10◦ for ConvAEs/DenoiseAEs , and 30◦ for SupCon ) over training epochs . For reference , Cosine ( 10◦ ) =0.985 is close to 1.0 studied the properties of regions where a supervised DNN classifier with piecewise linear activation behaves linearly , our work observes the common linear subspaces shared by the features learned by the networks that are trained with different architectures ( e.g. , MLP/CNN classifiers and AEs with ReLU activation ) and paradigms ( e.g. , supervised , unsupervised , and self-supervised learning ) . Furthermore , both our work and ( Saxe et al. , 2019 ) propose to compare feature/representation learning by various models through SVD , while we perform SVD to investigate the distribution of samples in feature space and ( Saxe et al. , 2019 ) uncovered the latent structures in input-and-output of neurons . To understand the latent space of generative models , some statistical/mathematical tools ( Richardson & Weiss , 2018 ; Lee et al. , 2019 ) have been introduced . Through comparisons between GAN and GMM , ( Richardson & Weiss , 2018 ) uncovered GAN ’ s superiority in feature/texture reconstruction and in the meanwhile its incompetence in distribution learning , while ( Lee et al. , 2019 ) provides some analytical insights on the structure of latent spaces . In our work , we propose P-vectors to model the distribution of samples in the feature/latent spaces of DNN classifiers and AEs . To the best of our knowledge , we make unique contributions compared to the above work . | The authors identify an interesting empirical phenomenon: across a range of network architectures and training approaches (supervised, unsupervised, auto-encoders), the feature spaces identified by these networks are similar. The authors introduce a specific way to summarize the feature space of a network as a vector (the top-left singular vector of the num_examples x num_features matrix) and show that these vectors are highly correlated across networks. In addition, the authors show that the features spaces become more similar throughout training and are predictive of the generalization performance of a neural network. | SP:53ed366f6004f4c6edc7fcc5516d7e016c21ba91 |
Secure Network Release with Link Privacy | 1 INTRODUCTION . Nowadays , open data of networks play a pivotal role in data mining and data analytics ( Tang et al. , 2008 ; Sen et al. , 2008 ; Blum et al. , 2013 ; Leskovec & Krevl , 2014 ) . By releasing and sharing structured relational data with research facilities and enterprise partners , data companies harvest the enormous potential value from their data , which benefits decision-making on various aspects , including social , financial , environmental , through collectively improved ads , recommendation , retention , and so on ( Yang et al. , 2017 ; 2018 ; Sigurbjörnsson & Van Zwol , 2008 ; Kuhn , 2009 ) . However , network data usually encode sensitive information not only about individuals but also their interactions , which makes direct release and exploitation rather unsafe . More importantly , even with careful anonymization , individual privacy is still at stake under collective attack models facilitated by the underlying network structure ( Zhang et al. , 2019 ; Cai et al. , 2018 ) . Can we find a way to securely release network data without drastic sanitization that essentially renders the released data useless ? In dealing with such tension between the need to release utilizable data and the concern of data owners ’ privacy , quite a few models have been proposed recently , focusing on grid-based data like images , texts and gene sequences ( Frigerio et al. , 2019 ; Papernot et al. , 2018 ; Triastcyn & Faltings , 2018 ; Narayanan & Shmatikov , 2008 ; Xie et al. , 2018 ; Chen et al. , 2018 ; Boob et al. , 2018 ; Dy & Krause , 2018 ; Lecuyer et al. , 2018 ; Zhang et al. , 2018 ) . However , none of the existing models can be directly applied to the network ( graph ) setting . While a secure generative model on grid-based data apparently aims to preserve high-level semantics ( e.g. , class distributions ) and protect detailed training data ( e.g. , exact images or sentences ) , it remains obtuse what to be preserved and what to be protected for network data , due to its modeling of complex interactive objects . Motivating scenario . In Figure 1 , a bank aims to encourage public studies on its customers ’ community structures . It does so by firstly anonymizing all customers and then sharing the network ( i.e. , ( a ) in Figure 1 ) to the public . However , an attacker interested in knowing the financial interactions ( e.g. , money transfer ) between particular customers in the bank may happen to have access to another network of a similar set of customers ( e.g. , a malicious employee of another financial company ) . The similarity of simple graph properties like node degree distribution and triangle count between the two networks can then be used to identify specific customers with high accuracy in the released network ( e.g. , customer A as the only node with degree 5 and within 1 triangle , and customer B as the only node with degree 2 and within 1 triangle ) . Thus , the attacker confidently knows the A and B ’ s identities and the fact that they have financial interactions in the bank , which seriously harms customers ’ privacy and poses potential crises . As the first contribution in this work , we define and formulate secure network release goals as preserving global network structure while protecting individual link privacy . Continue with the toy example , the solution we propose is to train a graph neural network model on the original network and release the generated networks ( e.g. , ( b ) in Figure 1 ) . Towards the utility of generated networks , we require them to be similar to the original networks from a global perspective , which can be measured by various graph global properties ( e.g. , network ( b ) has very similar degree distribution and the same triangle count as ( a ) ) . In this way , we expect many downstream data-mining and analytical tasks on them to produce similar results as on the original networks . As for privacy protection , we require that the information in the generated networks can not confidently reveal the existence or absence of any individual links in the original networks ( e.g. , the attacker may still identify customers A and B in network ( b ) , but their link structure has changed ) . Subsequently , there are two unique challenges in learning such structure-preserved and privacyprotected graph generation models , which have not been explored by existing literature so far . Challenge 1 : Rigorous protection of individual link privacy . The rich relational structures in graph data often allow attackers to recover private information through various ways of collective inference ( Zhang et al. , 2014 ; Narayanan & Shmatikov , 2009 ; Backstrom et al. , 2007 ) . Moreover , graph structure can always be converted to numerical features such as spectral embedding , after which most attacks on grid-based data like model inversion ( Fredrikson et al. , 2015 ) and membership inference ( Shokri et al. , 2017 ) can be directly applied for link identification . How can we design an effective mechanism with rigorous privacy protection on links in networks against various attacks ? Challenge 2 : Effective preservation of global network structure . To capture the global network structure , the model has to constantly compare the structures of the input graphs and currently generated graphs during training . However , unlike images and other grid-based data , graphs have flexible structures , and thus they lack efficient universal representations ( Dong et al. , 2019 ) . How can we allow a network generation model to effectively learn from the structural difference between two graphs , without conducting very time-costly operations like isomorphism tests all the time ? Present work . In this work , for the first time , we draw attention to the secure release of network data with deep generative models . Technically , towards the aforementioned two challenges , we develop Differentially Private Graph Generative Nets ( DPGGAN ) , which imposes DP training over a link reconstruction based network generation model for rigorous individual link privacy protection , and further ensures structure-oriented graph comparison for effective global network structure preservation . In particular , we first formulate and enforce edge-DP via Gaussian gradient distortion by injecting designed noise into the sensitive modules during model training . Then we leverage graph convolutional networks ( Kipf & Welling , 2017 ) through a variational generative adversarial network architecture ( Gu et al. , 2019 ; Larsen et al. , 2016 ) to enable structure-oriented network comparison . To evaluate the effectiveness of DPGGAN , we conduct extensive experiments on two real-world network datasets . On one hand , we evaluate the utility of generated networks by computing a suite of commonly concerned graph properties to compare the global structure of generated networks with the original ones . On the other hand , we validate the privacy of individual links by evaluating links predicted from the generated networks on the original networks . Consistent experimental results show that DPGGAN is able to effectively generate networks that are similar to the original ones regarding global network structure , while at the same time useless towards individual link prediction . 2 RELATED WORK . Differential Privacy ( DP ) . Differential privacy is a statistical approach in addressing the paradox of learning nothing about an individual while learning useful information about a population ( Dwork et al. , 2006 ) . Recent advances in deep learning have led to the rapid development of DP-oriented learning schemes . Among them , the Gaussian Mechanism ( Dwork et al. , 2014 ) , defined as follows , provides a neat and compatible framework for DP analysis over machine learning models . Definition 1 ( Gaussian Mechanism ( Dwork et al. , 2014 ) ) . For a deterministic function f with its ` 2-norm sensitivity as ∆2f = max ‖G−G′‖1=1 ‖f ( G ) − f ( G′ ) ‖2 , we have : Mf ( G ) , f ( G ) +N ( 0 , ∆2f2σ2 ) , ( 1 ) where N ( 0 , ∆2f2σ2 ) is a random variable obeying the Gaussian distribution with mean 0 and standard deviation ∆2fσ . The randomized mechanism Mf ( G ) is ( ε , δ ) -DP if σ ≥ ∆2f √ 2 ln ( 1.25/δ ) /ε and ε < 1 . Following this framework , ( Abadi et al. , 2016 ) proposes a general training strategy called DPSGD , which looses the condition on the overall privacy loss than that in Definition 1 by tracking detailed information of the SGD process to achieve an adaptive Gaussian Mechanism . DP learning has also been widely adapted to generative models ( Frigerio et al. , 2019 ; Papernot et al. , 2018 ; Triastcyn & Faltings , 2018 ; Narayanan & Shmatikov , 2008 ; Mohammed et al. , 2011 ; Xie et al. , 2018 ; Chen et al. , 2018 ; Boob et al. , 2018 ; Dy & Krause , 2018 ; Lecuyer et al. , 2018 ; Zhang et al. , 2018 ) . For example , ( Frigerio et al. , 2019 ; Chen et al. , 2018 ; Boob et al. , 2018 ; Zhang et al. , 2018 ) share the same spirit by enforcing DP on the discriminators , and thus inductively on the generators , in a generative adversarial network ( GAN ) scheme . However , none of them can be directly applied to graph data due to the lack of consideration of structure generation . For graphs ’ structural data , two types of privacy constraints can be applied , i.e. , node-DP ( Kasiviswanathan et al. , 2013 ) and edge-DP ( Blocki et al. , 2012 ) , which define two neighboring graphs to differ by at most one node or edge . In this work , we aim at the secure release of network data , and particularly , we focus on edge privacy because it is essential for the protection of object interactions unique for network data compared with other types of data . Several existing works have studied the protection of edge-DP . For example , ( Sala et al. , 2011 ) generates graphs based on the statistical representations extracted from the original graphs blurred by designed noise , whereas ( Wang & Wu , 2013 ) enforces the parameters of dK-graph models to be private . However , based on shallow graph generation models , they do not flexibly capture global network structure that can support various unknown downstream analytical tasks ( Zhang et al. , 2019 ; Wasserman & Zhou , 2010 ) . Graph Generation ( GGen ) . GGen has been studied for decades and is widely used to synthesize network data used to develop various collective analysis and mining models ( Evans & Lambiotte , 2009 ; Hallac et al. , 2017 ) . Earlier works mainly use probabilistic models to generate graphs with certain properties ( Erdős & Rényi , 1960 ; Watts & Strogatz , 1998 ; Barabási & Albert , 1999 ; Newman , 2001 ) , which are manually designed based on sheer observations and prior assumptions . Thanks to the surge of deep learning , many advanced GGen models have been developed recently , which leverage different powerful neural networks in a learn-to-generate manner ( Kipf & Welling , 2016 ; Bojchevski et al. , 2018 ; You et al. , 2018b ; Simonovsky & Komodakis , 2018 ; Li et al. , 2018 ; You et al. , 2018a ; Jin et al. , 2018 ; Grover et al. , 2017 ; De Cao & Kipf , 2018 ; Zou & Lerman , 2018 ; Ma et al. , 2018 ) . For example , NetGAN ( Bojchevski et al. , 2018 ) converts graphs into biased random walks , learns the generation of walks with GAN , and assembles the generated walks into graphs ; GraphRNN ( You et al. , 2018b ) regards the generation of graphs as node-and-edge addition sequences , and models it with a heuristic breadth-first-search scheme and hierarchical RNN . These neural network based models can often generate graphs with much richer properties , and flexible structures learned from real-world graphs . To the best of our knowledge , no existing work on deep GGen has looked into the potential privacy threats laid during the learning and releasing of the powerful models . Such concerns are rather urgent in the network setting , where sensitive information can often be more easily compromised in a collective manner ( Dai et al. , 2018 ; Backstrom et al. , 2007 ; Zhang et al. , 2014 ) and privacy leakage can easily further propagate ( Narayanan & Shmatikov , 2009 ; Zügner et al. , 2018 ) . | This work consider the problem of link privacy when releasing models that are trained on graph data. It achieves this by making a generative graph model based on a VAE differentially private. Differential privacy is obtained by adding noise to gradients during training (DPSGD approach). The paper uses graph metrics and a classification downstream task to evaluate the utility of generated graphs. Comparison of algorithms with related work and details of the mechanism could be expanded to articulate novelty and significance of the work. | SP:e0cd21da9c8cdb3bc34ae8ab2e7d2974a3d3e921 |
Secure Network Release with Link Privacy | 1 INTRODUCTION . Nowadays , open data of networks play a pivotal role in data mining and data analytics ( Tang et al. , 2008 ; Sen et al. , 2008 ; Blum et al. , 2013 ; Leskovec & Krevl , 2014 ) . By releasing and sharing structured relational data with research facilities and enterprise partners , data companies harvest the enormous potential value from their data , which benefits decision-making on various aspects , including social , financial , environmental , through collectively improved ads , recommendation , retention , and so on ( Yang et al. , 2017 ; 2018 ; Sigurbjörnsson & Van Zwol , 2008 ; Kuhn , 2009 ) . However , network data usually encode sensitive information not only about individuals but also their interactions , which makes direct release and exploitation rather unsafe . More importantly , even with careful anonymization , individual privacy is still at stake under collective attack models facilitated by the underlying network structure ( Zhang et al. , 2019 ; Cai et al. , 2018 ) . Can we find a way to securely release network data without drastic sanitization that essentially renders the released data useless ? In dealing with such tension between the need to release utilizable data and the concern of data owners ’ privacy , quite a few models have been proposed recently , focusing on grid-based data like images , texts and gene sequences ( Frigerio et al. , 2019 ; Papernot et al. , 2018 ; Triastcyn & Faltings , 2018 ; Narayanan & Shmatikov , 2008 ; Xie et al. , 2018 ; Chen et al. , 2018 ; Boob et al. , 2018 ; Dy & Krause , 2018 ; Lecuyer et al. , 2018 ; Zhang et al. , 2018 ) . However , none of the existing models can be directly applied to the network ( graph ) setting . While a secure generative model on grid-based data apparently aims to preserve high-level semantics ( e.g. , class distributions ) and protect detailed training data ( e.g. , exact images or sentences ) , it remains obtuse what to be preserved and what to be protected for network data , due to its modeling of complex interactive objects . Motivating scenario . In Figure 1 , a bank aims to encourage public studies on its customers ’ community structures . It does so by firstly anonymizing all customers and then sharing the network ( i.e. , ( a ) in Figure 1 ) to the public . However , an attacker interested in knowing the financial interactions ( e.g. , money transfer ) between particular customers in the bank may happen to have access to another network of a similar set of customers ( e.g. , a malicious employee of another financial company ) . The similarity of simple graph properties like node degree distribution and triangle count between the two networks can then be used to identify specific customers with high accuracy in the released network ( e.g. , customer A as the only node with degree 5 and within 1 triangle , and customer B as the only node with degree 2 and within 1 triangle ) . Thus , the attacker confidently knows the A and B ’ s identities and the fact that they have financial interactions in the bank , which seriously harms customers ’ privacy and poses potential crises . As the first contribution in this work , we define and formulate secure network release goals as preserving global network structure while protecting individual link privacy . Continue with the toy example , the solution we propose is to train a graph neural network model on the original network and release the generated networks ( e.g. , ( b ) in Figure 1 ) . Towards the utility of generated networks , we require them to be similar to the original networks from a global perspective , which can be measured by various graph global properties ( e.g. , network ( b ) has very similar degree distribution and the same triangle count as ( a ) ) . In this way , we expect many downstream data-mining and analytical tasks on them to produce similar results as on the original networks . As for privacy protection , we require that the information in the generated networks can not confidently reveal the existence or absence of any individual links in the original networks ( e.g. , the attacker may still identify customers A and B in network ( b ) , but their link structure has changed ) . Subsequently , there are two unique challenges in learning such structure-preserved and privacyprotected graph generation models , which have not been explored by existing literature so far . Challenge 1 : Rigorous protection of individual link privacy . The rich relational structures in graph data often allow attackers to recover private information through various ways of collective inference ( Zhang et al. , 2014 ; Narayanan & Shmatikov , 2009 ; Backstrom et al. , 2007 ) . Moreover , graph structure can always be converted to numerical features such as spectral embedding , after which most attacks on grid-based data like model inversion ( Fredrikson et al. , 2015 ) and membership inference ( Shokri et al. , 2017 ) can be directly applied for link identification . How can we design an effective mechanism with rigorous privacy protection on links in networks against various attacks ? Challenge 2 : Effective preservation of global network structure . To capture the global network structure , the model has to constantly compare the structures of the input graphs and currently generated graphs during training . However , unlike images and other grid-based data , graphs have flexible structures , and thus they lack efficient universal representations ( Dong et al. , 2019 ) . How can we allow a network generation model to effectively learn from the structural difference between two graphs , without conducting very time-costly operations like isomorphism tests all the time ? Present work . In this work , for the first time , we draw attention to the secure release of network data with deep generative models . Technically , towards the aforementioned two challenges , we develop Differentially Private Graph Generative Nets ( DPGGAN ) , which imposes DP training over a link reconstruction based network generation model for rigorous individual link privacy protection , and further ensures structure-oriented graph comparison for effective global network structure preservation . In particular , we first formulate and enforce edge-DP via Gaussian gradient distortion by injecting designed noise into the sensitive modules during model training . Then we leverage graph convolutional networks ( Kipf & Welling , 2017 ) through a variational generative adversarial network architecture ( Gu et al. , 2019 ; Larsen et al. , 2016 ) to enable structure-oriented network comparison . To evaluate the effectiveness of DPGGAN , we conduct extensive experiments on two real-world network datasets . On one hand , we evaluate the utility of generated networks by computing a suite of commonly concerned graph properties to compare the global structure of generated networks with the original ones . On the other hand , we validate the privacy of individual links by evaluating links predicted from the generated networks on the original networks . Consistent experimental results show that DPGGAN is able to effectively generate networks that are similar to the original ones regarding global network structure , while at the same time useless towards individual link prediction . 2 RELATED WORK . Differential Privacy ( DP ) . Differential privacy is a statistical approach in addressing the paradox of learning nothing about an individual while learning useful information about a population ( Dwork et al. , 2006 ) . Recent advances in deep learning have led to the rapid development of DP-oriented learning schemes . Among them , the Gaussian Mechanism ( Dwork et al. , 2014 ) , defined as follows , provides a neat and compatible framework for DP analysis over machine learning models . Definition 1 ( Gaussian Mechanism ( Dwork et al. , 2014 ) ) . For a deterministic function f with its ` 2-norm sensitivity as ∆2f = max ‖G−G′‖1=1 ‖f ( G ) − f ( G′ ) ‖2 , we have : Mf ( G ) , f ( G ) +N ( 0 , ∆2f2σ2 ) , ( 1 ) where N ( 0 , ∆2f2σ2 ) is a random variable obeying the Gaussian distribution with mean 0 and standard deviation ∆2fσ . The randomized mechanism Mf ( G ) is ( ε , δ ) -DP if σ ≥ ∆2f √ 2 ln ( 1.25/δ ) /ε and ε < 1 . Following this framework , ( Abadi et al. , 2016 ) proposes a general training strategy called DPSGD , which looses the condition on the overall privacy loss than that in Definition 1 by tracking detailed information of the SGD process to achieve an adaptive Gaussian Mechanism . DP learning has also been widely adapted to generative models ( Frigerio et al. , 2019 ; Papernot et al. , 2018 ; Triastcyn & Faltings , 2018 ; Narayanan & Shmatikov , 2008 ; Mohammed et al. , 2011 ; Xie et al. , 2018 ; Chen et al. , 2018 ; Boob et al. , 2018 ; Dy & Krause , 2018 ; Lecuyer et al. , 2018 ; Zhang et al. , 2018 ) . For example , ( Frigerio et al. , 2019 ; Chen et al. , 2018 ; Boob et al. , 2018 ; Zhang et al. , 2018 ) share the same spirit by enforcing DP on the discriminators , and thus inductively on the generators , in a generative adversarial network ( GAN ) scheme . However , none of them can be directly applied to graph data due to the lack of consideration of structure generation . For graphs ’ structural data , two types of privacy constraints can be applied , i.e. , node-DP ( Kasiviswanathan et al. , 2013 ) and edge-DP ( Blocki et al. , 2012 ) , which define two neighboring graphs to differ by at most one node or edge . In this work , we aim at the secure release of network data , and particularly , we focus on edge privacy because it is essential for the protection of object interactions unique for network data compared with other types of data . Several existing works have studied the protection of edge-DP . For example , ( Sala et al. , 2011 ) generates graphs based on the statistical representations extracted from the original graphs blurred by designed noise , whereas ( Wang & Wu , 2013 ) enforces the parameters of dK-graph models to be private . However , based on shallow graph generation models , they do not flexibly capture global network structure that can support various unknown downstream analytical tasks ( Zhang et al. , 2019 ; Wasserman & Zhou , 2010 ) . Graph Generation ( GGen ) . GGen has been studied for decades and is widely used to synthesize network data used to develop various collective analysis and mining models ( Evans & Lambiotte , 2009 ; Hallac et al. , 2017 ) . Earlier works mainly use probabilistic models to generate graphs with certain properties ( Erdős & Rényi , 1960 ; Watts & Strogatz , 1998 ; Barabási & Albert , 1999 ; Newman , 2001 ) , which are manually designed based on sheer observations and prior assumptions . Thanks to the surge of deep learning , many advanced GGen models have been developed recently , which leverage different powerful neural networks in a learn-to-generate manner ( Kipf & Welling , 2016 ; Bojchevski et al. , 2018 ; You et al. , 2018b ; Simonovsky & Komodakis , 2018 ; Li et al. , 2018 ; You et al. , 2018a ; Jin et al. , 2018 ; Grover et al. , 2017 ; De Cao & Kipf , 2018 ; Zou & Lerman , 2018 ; Ma et al. , 2018 ) . For example , NetGAN ( Bojchevski et al. , 2018 ) converts graphs into biased random walks , learns the generation of walks with GAN , and assembles the generated walks into graphs ; GraphRNN ( You et al. , 2018b ) regards the generation of graphs as node-and-edge addition sequences , and models it with a heuristic breadth-first-search scheme and hierarchical RNN . These neural network based models can often generate graphs with much richer properties , and flexible structures learned from real-world graphs . To the best of our knowledge , no existing work on deep GGen has looked into the potential privacy threats laid during the learning and releasing of the powerful models . Such concerns are rather urgent in the network setting , where sensitive information can often be more easily compromised in a collective manner ( Dai et al. , 2018 ; Backstrom et al. , 2007 ; Zhang et al. , 2014 ) and privacy leakage can easily further propagate ( Narayanan & Shmatikov , 2009 ; Zügner et al. , 2018 ) . | This paper considers the problem of releasing sensible structured data, where there are two inlined challenges: 1. The global network structure should be effectively preserved; 2. The link privacy should be rigorously protected. This paper looks at the secure release of network data with deep generative models. Specifically, the paper develops two models, DPGVAE and DPGGan, which can be viewed as a combination of DP-SGD and graph generation techniques. Extensive experiments are carried out on real-world network datasets, and the positive results have shown the effectiveness of the new models. | SP:e0cd21da9c8cdb3bc34ae8ab2e7d2974a3d3e921 |
TAM: Temporal Adaptive Module for Video Recognition | 1 INTRODUCTION . Deep learning has brought great progress for various recognition tasks in image domain , such as image classification ( Krizhevsky et al. , 2012 ; He et al. , 2016 ) , object detection ( Ren et al. , 2017 ) , and instance segmentation ( He et al. , 2017 ) . The key to these successes is to devise flexible and efficient architectures that are capable of learning powerful visual representations from large-scale image datasets ( Deng et al. , 2009 ) . However , deep learning research progress in video understanding is relatively more slowly , partially due to the high complexity of video data . The core technical problem in video understanding is to design an effective temporal module , that is expected to be able to capture complex temporal structure with high flexibility , while yet to be of low computational consumption for processing high dimensional video data efficiently . 3D Convolutional Neural Networks ( 3D CNNs ) ( Ji et al. , 2010 ; Tran et al. , 2015 ) have turned out to be mainstream architectures for video modeling ( Carreira & Zisserman , 2017 ; Feichtenhofer et al. , 2019 ; Tran et al. , 2018 ; Qiu et al. , 2017 ) . The 3D convolution is a natural extension over its 2D counterparts and provides a learnable operator for video recognition . However , this simple extension lacks specific consideration about the temporal properties in video data and might as well lead to high computational cost . Therefore , recent methods aim to improve 3D CNNs from two different aspects by combining a lightweight temporal module with 2D CNNs to improve efficiency ( e.g. , TSN ( Wang et al. , 2016 ) , TSM ( Lin et al. , 2019 ) ) , or designing a dedicated temporal module to better capture temporal relation ( e.g. , Nonlocal Net ( Wang et al. , 2018b ) , ARTNet ( Wang et al. , 2018a ) , STM ( Jiang et al. , 2019 ) ) . However , how to devise a temporal module with high efficiency and strong flexibility still remains to be an unsolved problem in video recognition . Consequently , we aim at advancing the current video architectures along this direction . In this paper , we focus on devising a principled adaptive module to capture temporal information in a more flexible way . In general , we observe that video data is with extremely complex dynamics along the temporal dimension due to factors such as camera motion and various speed . Thus 3D convolutions ( temporal convolutions ) might lack enough representation power to describe motion diversity by simply employing a fixed number of video invariant kernels . To deal with such complex temporal variations in videos , we argue that adaptive temporal kernels for each video are effective and as well necessary to describe motion patterns . To this end , as shown in Figure 1 , we present a two-level adaptive modeling scheme to decompose this video specific temporal kernel into a location sensitive importance map and a location invariant ( also video adaptive ) aggregation kernel . This unique design allows the location sensitive importance map to focus on enhancing discriminative temporal information from a local view , and enables the location invariant aggregation weights to capture temporal dependencies guided by a global view of the input video sequence . Specifically , the design of temporal adaptive module ( TAM ) strictly follows two principles : high efficiency and strong flexibility . To ensure our TAM with a low computational cost , we first squeeze the feature map by employing a global spatial pooling , and then establish our TAM in a channelwise manner to keep the efficiency . Our TAM is composed of two branches : a local branch ( L ) and a global branch ( G ) . As shown in Fig . 2 , TAM is implemented in an efficient way . The local branch employs temporal convolutions to produce the location sensitive importance maps to discriminate the local feature , while the global branch uses fully connected layers to produce the location invariant kernel for temporal aggregation . The importance map generated by a local temporal window focuses on short-term motion modeling and the aggregation kernel using a global view pays more attention to the long-term temporal information . Furthermore , our TAM could be flexibly plugged into the existing 2D CNNs to yield an efficient video recognition architecture , termed as TANet . We validate the proposed TANet on the task of action classification in video recognition . Particularly , we first study the performance of the TANet on the Kinetics-400 dataset . We demonstrate that our TAM is better at capturing temporal information than other several counterparts , such as temporal pooling , temporal convolution , TSM ( Lin et al. , 2019 ) , and Non-local block ( Wang et al. , 2018b ) . Our TANet is able to yield a very competitive accuracy with the FLOPs similar to 2D CNNs . We further test our TANet on the motion dominated dataset of Something-Something , where the state-of-the-art performance is also achieved . 2 RELATED WORKS . Video understanding is a core topic in the field of computer vision . At early stage , a lot of traditional methods ( Le et al. , 2011 ; Kläser et al. , 2008 ; Sadanand & Corso , 2012 ; Willems et al. , 2008 ) have designed various hand-crafted features to encode the video data , but these methods are too inflexible when generalized to other video tasks . Recently , since the rapid development of video understanding has been much benefited from deep learning methods ( Krizhevsky et al. , 2012 ; Simonyan & Zisserman , 2015 ; He et al. , 2016 ) , especially in video recognition , a series of CNNs-based methods were proposed to learn spatiotemporal representation , and the differences with our method will be clarified later . Furthermore , our work also relates to dynamic convolution and attention in CNNs . CNNs-based Methods for Action Recognition . Since the deep learning method has been wildly used in the image tasks , there are many attempts ( Karpathy et al. , 2014 ; Simonyan & Zisserman , 2014 ; Wang et al. , 2016 ; Zhou et al. , 2018 ; He et al. , 2019 ; Lin et al. , 2019 ) based on 2D CNNs devoted to modeling the video clips . In particular , Wang et al . ( 2016 ) used the frames sparsely sampled from the whole video to learn the long-range information by aggregating scores after the last fully-connected layer . Lin et al . ( 2019 ) shifted the channels along the temporal dimension in an efficient way , which yields a good performance with 2D CNNs . By a simple extension from spatial domain to spatiotemporal domain , 3D convolution ( Ji et al. , 2010 ; Tran et al. , 2015 ) was proposed to capture the motion information encoded in video clips . Due to the release of large-scale Kinetics dataset ( Kay et al. , 2017 ) , 3D CNNs ( Carreira & Zisserman , 2017 ) were wildly used in action recognition . Its variants ( Qiu et al. , 2017 ; Tran et al. , 2018 ; Xie et al. , 2018 ) decomposed the 3D convolution into a spatial 2D convolution and a temporal 1D convolution to learn the spatiotemporal features . And Feichtenhofer et al . ( 2019 ) designed a network with dual paths to learn the spatiotemporal features and achieved a promising accuracy in video understanding . The methods aforementioned all share a common insight that they are video invariant and ignore the inherent temporal diversities in videos . As opposed to these methods , we design a two-level adaptive modeling scheme by decomposing the video specific operation into a location sensitive excitation and a location invariant convolution with adaptive kernel for each video clip . Attention in Action Recognition . The local branch in TAM mostly relates to SENet ( Hu et al. , 2018 ) . But the SENet learned modulation weights for each channel of feature maps . Several methods ( Liu et al. , 2019b ; Diba et al. , 2018 ) also resorted to the attention to learn more discriminative features in videos . Different from these methods , the local branch keeps the temporal information to learn the location sensitive importances . Wang et al . ( 2018b ) designed a non-local block which can be seen as self-attention to capture long-range dependencies . Our TANet captures the long-range dependencies by simply stacking more TAM , and keep the efficiency of networks . Dynamic Convolutions . Jia et al . ( 2016 ) first proposed the dynamic filters on the tasks of video and stereo prediction , and designed a convolutional encoder-decoder as filter-generating network . Several works ( Yang et al. , 2019 ; Chen et al. , 2020 ) in image tasks attempted to generate aggregation weights for a set of convolutional kernels , and then produce a dynamic kernel . Our motivation are different from these methods . We aim to use this temporal adaptive module to deal with temporal variations in videos . Specifically , we design an efficient form to implement this temporal dynamic kernel based on input feature maps , which is critical for understanding the video content . 3 METHOD . 3.1 THE OVERVIEW OF TEMPORAL ADAPTIVE MODULE . As we discussed in Sec.1 , video data typically exhibit the complex temporal dynamics caused by many factors such as camera motion and speed variations . Therefore , we aim to tackle this issue by introducing a temporal adaptive module ( TAM ) with video specific kernels , unlike the sharing convolutional kernel in 3D CNNs . our TAM could be easily integrated into the existing 2D CNNs ( e.g. , ResNet ) to yield a video network architecture , as shown in Figure 2 . We will give an overview of TAM and then describe its technical details . Formally , let X ∈ RC×T×H×W denote the feature maps for a video clip , where C represents the number of channels , and T , H , W are its spatiotemporal dimensions . For efficiency , our TAM only focus on temporal modeling and the spatial pattern is expected to captured by 2D convolutions . Therefore , we first employ a global spatial average pooling to squeeze the feature map as follows : X̂c , t = φ ( X ) c , t = 1 H ×W ∑ i , j Xc , t , j , i , ( 1 ) where c , t , j , i is the index of different dimensions ( in channel , time , height and width ) , and X̂ ∈ RC×T aggregates the spatial information of X . For simplicity , we here use φ to denote the function . that aggregates the spatial information . Our proposed temporal adaptive module is established based on this squeezed 1D temporal signal for a high efficiency . Our TAM is composed of two branches : a local branch L and a global branch G , which aims to learn a location sensitive importance map to enhance discriminative features and then produces the location invariant weights to adaptively aggregate temporal information in a convolutional manner . More specifically , the TAM is formulated as follows : Y = G ( X ) ⊗ ( L ( X ) X ) , ( 2 ) where ⊗ denotes convolutional operator and denotes element-wise multiplication . It is worth noting that these two branches focus on different aspects of temporal information , where the local branch tries to capture the short term information to attend important features by using a temporal convolution , while the global branch aims to incorporate long-range temporal structure to guide adaptive temporal aggregation with fully connected layers . Disentangling kernel learning procedures into local and global branches turns out to be an effective way in experiments . The two branches will be introduced in the following sections . | This paper presents a new temporal adaptive module (TAM) to generate video-specific temporal kernels based on its own feature maps. TAM proposes a unique two-level adaptive modeling scheme by decoupling dynamic kernel into a location sensitive importance map and a location invariant aggregation weight. The importance map is learned in a local temporal window to capture short term information, while the aggregation weight is generated from a global view with a focus on long-term structure. | SP:aecbe1b77f8ad3df9f7377237cc47230b80ff50b |
TAM: Temporal Adaptive Module for Video Recognition | 1 INTRODUCTION . Deep learning has brought great progress for various recognition tasks in image domain , such as image classification ( Krizhevsky et al. , 2012 ; He et al. , 2016 ) , object detection ( Ren et al. , 2017 ) , and instance segmentation ( He et al. , 2017 ) . The key to these successes is to devise flexible and efficient architectures that are capable of learning powerful visual representations from large-scale image datasets ( Deng et al. , 2009 ) . However , deep learning research progress in video understanding is relatively more slowly , partially due to the high complexity of video data . The core technical problem in video understanding is to design an effective temporal module , that is expected to be able to capture complex temporal structure with high flexibility , while yet to be of low computational consumption for processing high dimensional video data efficiently . 3D Convolutional Neural Networks ( 3D CNNs ) ( Ji et al. , 2010 ; Tran et al. , 2015 ) have turned out to be mainstream architectures for video modeling ( Carreira & Zisserman , 2017 ; Feichtenhofer et al. , 2019 ; Tran et al. , 2018 ; Qiu et al. , 2017 ) . The 3D convolution is a natural extension over its 2D counterparts and provides a learnable operator for video recognition . However , this simple extension lacks specific consideration about the temporal properties in video data and might as well lead to high computational cost . Therefore , recent methods aim to improve 3D CNNs from two different aspects by combining a lightweight temporal module with 2D CNNs to improve efficiency ( e.g. , TSN ( Wang et al. , 2016 ) , TSM ( Lin et al. , 2019 ) ) , or designing a dedicated temporal module to better capture temporal relation ( e.g. , Nonlocal Net ( Wang et al. , 2018b ) , ARTNet ( Wang et al. , 2018a ) , STM ( Jiang et al. , 2019 ) ) . However , how to devise a temporal module with high efficiency and strong flexibility still remains to be an unsolved problem in video recognition . Consequently , we aim at advancing the current video architectures along this direction . In this paper , we focus on devising a principled adaptive module to capture temporal information in a more flexible way . In general , we observe that video data is with extremely complex dynamics along the temporal dimension due to factors such as camera motion and various speed . Thus 3D convolutions ( temporal convolutions ) might lack enough representation power to describe motion diversity by simply employing a fixed number of video invariant kernels . To deal with such complex temporal variations in videos , we argue that adaptive temporal kernels for each video are effective and as well necessary to describe motion patterns . To this end , as shown in Figure 1 , we present a two-level adaptive modeling scheme to decompose this video specific temporal kernel into a location sensitive importance map and a location invariant ( also video adaptive ) aggregation kernel . This unique design allows the location sensitive importance map to focus on enhancing discriminative temporal information from a local view , and enables the location invariant aggregation weights to capture temporal dependencies guided by a global view of the input video sequence . Specifically , the design of temporal adaptive module ( TAM ) strictly follows two principles : high efficiency and strong flexibility . To ensure our TAM with a low computational cost , we first squeeze the feature map by employing a global spatial pooling , and then establish our TAM in a channelwise manner to keep the efficiency . Our TAM is composed of two branches : a local branch ( L ) and a global branch ( G ) . As shown in Fig . 2 , TAM is implemented in an efficient way . The local branch employs temporal convolutions to produce the location sensitive importance maps to discriminate the local feature , while the global branch uses fully connected layers to produce the location invariant kernel for temporal aggregation . The importance map generated by a local temporal window focuses on short-term motion modeling and the aggregation kernel using a global view pays more attention to the long-term temporal information . Furthermore , our TAM could be flexibly plugged into the existing 2D CNNs to yield an efficient video recognition architecture , termed as TANet . We validate the proposed TANet on the task of action classification in video recognition . Particularly , we first study the performance of the TANet on the Kinetics-400 dataset . We demonstrate that our TAM is better at capturing temporal information than other several counterparts , such as temporal pooling , temporal convolution , TSM ( Lin et al. , 2019 ) , and Non-local block ( Wang et al. , 2018b ) . Our TANet is able to yield a very competitive accuracy with the FLOPs similar to 2D CNNs . We further test our TANet on the motion dominated dataset of Something-Something , where the state-of-the-art performance is also achieved . 2 RELATED WORKS . Video understanding is a core topic in the field of computer vision . At early stage , a lot of traditional methods ( Le et al. , 2011 ; Kläser et al. , 2008 ; Sadanand & Corso , 2012 ; Willems et al. , 2008 ) have designed various hand-crafted features to encode the video data , but these methods are too inflexible when generalized to other video tasks . Recently , since the rapid development of video understanding has been much benefited from deep learning methods ( Krizhevsky et al. , 2012 ; Simonyan & Zisserman , 2015 ; He et al. , 2016 ) , especially in video recognition , a series of CNNs-based methods were proposed to learn spatiotemporal representation , and the differences with our method will be clarified later . Furthermore , our work also relates to dynamic convolution and attention in CNNs . CNNs-based Methods for Action Recognition . Since the deep learning method has been wildly used in the image tasks , there are many attempts ( Karpathy et al. , 2014 ; Simonyan & Zisserman , 2014 ; Wang et al. , 2016 ; Zhou et al. , 2018 ; He et al. , 2019 ; Lin et al. , 2019 ) based on 2D CNNs devoted to modeling the video clips . In particular , Wang et al . ( 2016 ) used the frames sparsely sampled from the whole video to learn the long-range information by aggregating scores after the last fully-connected layer . Lin et al . ( 2019 ) shifted the channels along the temporal dimension in an efficient way , which yields a good performance with 2D CNNs . By a simple extension from spatial domain to spatiotemporal domain , 3D convolution ( Ji et al. , 2010 ; Tran et al. , 2015 ) was proposed to capture the motion information encoded in video clips . Due to the release of large-scale Kinetics dataset ( Kay et al. , 2017 ) , 3D CNNs ( Carreira & Zisserman , 2017 ) were wildly used in action recognition . Its variants ( Qiu et al. , 2017 ; Tran et al. , 2018 ; Xie et al. , 2018 ) decomposed the 3D convolution into a spatial 2D convolution and a temporal 1D convolution to learn the spatiotemporal features . And Feichtenhofer et al . ( 2019 ) designed a network with dual paths to learn the spatiotemporal features and achieved a promising accuracy in video understanding . The methods aforementioned all share a common insight that they are video invariant and ignore the inherent temporal diversities in videos . As opposed to these methods , we design a two-level adaptive modeling scheme by decomposing the video specific operation into a location sensitive excitation and a location invariant convolution with adaptive kernel for each video clip . Attention in Action Recognition . The local branch in TAM mostly relates to SENet ( Hu et al. , 2018 ) . But the SENet learned modulation weights for each channel of feature maps . Several methods ( Liu et al. , 2019b ; Diba et al. , 2018 ) also resorted to the attention to learn more discriminative features in videos . Different from these methods , the local branch keeps the temporal information to learn the location sensitive importances . Wang et al . ( 2018b ) designed a non-local block which can be seen as self-attention to capture long-range dependencies . Our TANet captures the long-range dependencies by simply stacking more TAM , and keep the efficiency of networks . Dynamic Convolutions . Jia et al . ( 2016 ) first proposed the dynamic filters on the tasks of video and stereo prediction , and designed a convolutional encoder-decoder as filter-generating network . Several works ( Yang et al. , 2019 ; Chen et al. , 2020 ) in image tasks attempted to generate aggregation weights for a set of convolutional kernels , and then produce a dynamic kernel . Our motivation are different from these methods . We aim to use this temporal adaptive module to deal with temporal variations in videos . Specifically , we design an efficient form to implement this temporal dynamic kernel based on input feature maps , which is critical for understanding the video content . 3 METHOD . 3.1 THE OVERVIEW OF TEMPORAL ADAPTIVE MODULE . As we discussed in Sec.1 , video data typically exhibit the complex temporal dynamics caused by many factors such as camera motion and speed variations . Therefore , we aim to tackle this issue by introducing a temporal adaptive module ( TAM ) with video specific kernels , unlike the sharing convolutional kernel in 3D CNNs . our TAM could be easily integrated into the existing 2D CNNs ( e.g. , ResNet ) to yield a video network architecture , as shown in Figure 2 . We will give an overview of TAM and then describe its technical details . Formally , let X ∈ RC×T×H×W denote the feature maps for a video clip , where C represents the number of channels , and T , H , W are its spatiotemporal dimensions . For efficiency , our TAM only focus on temporal modeling and the spatial pattern is expected to captured by 2D convolutions . Therefore , we first employ a global spatial average pooling to squeeze the feature map as follows : X̂c , t = φ ( X ) c , t = 1 H ×W ∑ i , j Xc , t , j , i , ( 1 ) where c , t , j , i is the index of different dimensions ( in channel , time , height and width ) , and X̂ ∈ RC×T aggregates the spatial information of X . For simplicity , we here use φ to denote the function . that aggregates the spatial information . Our proposed temporal adaptive module is established based on this squeezed 1D temporal signal for a high efficiency . Our TAM is composed of two branches : a local branch L and a global branch G , which aims to learn a location sensitive importance map to enhance discriminative features and then produces the location invariant weights to adaptively aggregate temporal information in a convolutional manner . More specifically , the TAM is formulated as follows : Y = G ( X ) ⊗ ( L ( X ) X ) , ( 2 ) where ⊗ denotes convolutional operator and denotes element-wise multiplication . It is worth noting that these two branches focus on different aspects of temporal information , where the local branch tries to capture the short term information to attend important features by using a temporal convolution , while the global branch aims to incorporate long-range temporal structure to guide adaptive temporal aggregation with fully connected layers . Disentangling kernel learning procedures into local and global branches turns out to be an effective way in experiments . The two branches will be introduced in the following sections . | This paper proposes a temporal adaptive module for video recognition. Specifically, it decouples dynamic kernel into a location sensitive importance map and a location invariant aggregation weight, which can be plugged into existing 2D CNNs to yield a powerful video architecture with small extra computational cost. The experiments conducted on several datasets demonstrate the effectiveness of the proposed method. | SP:aecbe1b77f8ad3df9f7377237cc47230b80ff50b |
Cubic Spline Smoothing Compensation for Irregularly Sampled Sequences | The marriage of recurrent neural networks and neural ordinary differential networks ( ODE-RNN ) is effective in modeling irregularly sampled sequences . While ODE produces the smooth hidden states between observation intervals , the RNN will trigger a hidden state jump when a new observation arrives and thus cause the interpolation discontinuity problem . To address this issue , we propose the cubic spline smoothing compensation , which is a stand-alone module upon either the output or the hidden state of ODE-RNN and can be trained end-to-end . We derive its analytical solution and provide its theoretical interpolation error bound . Extensive experiments indicate its merits over both ODE-RNN and cubic spline interpolation . 1 INTRODUCTION . Recurrent neural networks ( RNNs ) are commonly used for modeling regularly sampled sequences ( Cho et al. , 2014 ) . However , the standard RNN can only process discrete series without considering the unequal temporal intervals between sample points , making it fail to model irregularly sampled time series commonly seen in domains , e.g. , healthcare ( Rajkomar et al. , 2018 ) and finance ( Fagereng & Halvorsen , 2017 ) . While some works adapt RNNs to handle such irregular scenarios , they often assume an exponential decay ( either at the output or the hidden state ) during the time interval between observations ( Che et al. , 2018 ; Cao et al. , 2018 ) , which may not always hold . To remove the exponential decay assumption and better model the underlying dynamics , Chen et al . ( 2018 ) proposed to use the neural ordinary differential equation ( ODE ) to model the continuous dynamics of hidden states during the observation intervals . Leveraging a learnable ODE parametrized by a neural network , their method renders higher modeling capability and flexibility . However , an ODE determines the trajectory by its initial state , and it fails to adjust the trajectory according to subsequent observations . A popular way to leverage the subsequent observations is ODE-RNN ( Rubanova et al. , 2019 ; De Brouwer et al. , 2019 ) , which updates the hidden state upon observations using an RNN , and evolves the hidden state using an ODE between observation intervals . While ODE produces smooth hidden states between observation intervals , the RNN will trigger a hidden state jump at the observation point . This inconsistency ( discontinuity ) is hard to reconcile , thus jeopardizing continuous time series modeling , especially for interpolation tasks ( Fig . 1 top-left ) . We propose a Cubic Spline Smoothing Compensation ( CSSC ) module to tackle the challenging discontinuity problem , and it is especially suitable for continuous time series interpolation . Our CSSC employs the cubic spline as a means of compensation for the ODE-RNN to eliminate the jump , as illustrated in Fig . 1 top-right . While the latent ODE ( Rubanova et al. , 2019 ) with an encoder-decoder structure can also produce continuous interpolation , CSSC can further ensure the interpolated curve pass strictly through the observation points . Importantly , we can derive the closed-form solution for CSSC and obtain its interpolation error bound . The error bound suggests two key factors for a good interpolation : the time interval between observations and the performance of ODE-RNN . Furthermore , we propose the hidden CSSC that aims to compensate for the hidden state of ODE-RNN ( Fig . 1 bottom ) , which not only assuage the discontinuity problem but is more efficient when the observations are high-dimensional and only have continuity on the semantic level . We conduct extensive experiments and ablation studies to demonstrate the effectiveness of CSSC and hidden CSSC , and both of them outperform other comparison methods . 2 RELATED WORK . Spline interpolation is a practical way to construct smooth curves between a number of points ( De Boor et al. , 1978 ) , even for unequally spaced points . Cubic spline interpolation leverages the piecewise third order polynomials to avoid the Runge ’ s phenomenon ( Runge , 1901 ) and is applied as a classical way to impute missing data ( Che et al. , 2018 ) . Recent literature focuses on adapting RNNs to model the irregularly sampled time series , given their strong modeling ability . Since standard RNNs can only process discrete series without considering the unequal temporal intervals between sample points , different improvements were proposed . One solution is to augment the input with the observation mask or concatenate it with the time lag ∆t and expect the network to use interval information ∆t in an unconstrained manner ( Lipton et al. , 2016 ; Mozer et al. , 2017 ) . While such a flexible structure can achieve good performance under some circumstances ( Mozer et al. , 2017 ) , a more popular way is to use prior knowledge for missing data imputation . GRU-D ( Che et al. , 2018 ) imputes missing values with the weighted sum of exponential decay of the previous observation and the empirical mean . Shukla & Marlin ( 2019 ) employs the radial basis function kernel to construct an interpolation network . Cao et al . ( 2018 ) let hidden state exponentially decay for non-observed time points and use bi-directional RNN for temporal modeling . Another track is the probabilistic generative model . Due to the ability to model the missing data ’ s uncertainty , Gaussian processes ( GPs ) are adopted for missing data imputing ( Futoma et al. , 2017 ; Tan et al. , 2020 ; Moor et al. , 2019 ) . However , this approach introduced several hyperparameters , such as the covariance function , making it hard to fine-tune in practice . Neural processes ( Garnelo et al. , 2018 ) eliminate such constraints by introducing a global latent variable that represents the whole process . Generative adversarial networks are also adopted for imputing ( Luo et al. , 2018 ) . Recently , neural ODEs ( Chen et al. , 2018 ) utilize a continuous state transfer function parameterized by a neural network to learn the temporal dynamics . Rubanova et al . ( 2019 ) combine the RNN and ODE to reconcile both the new observation and latent state evolution between observations . De Brouwer et al . ( 2019 ) update the ODE with the GRU structure with Bayesian inference at observations . While the ODE produces the smooth hidden states between observation intervals , the RNN will trigger a jump of the hidden state at the observation point , leading to a discontinuous hidden state along the trajectory . This inconsistency ( discontinuity ) is hard to reconcile , thus jeopardizing the modeling of continuous time series , especially for interpolation tasks . The neural CDE ( Kidger et al. , 2020 ) directly apply cubic splines interpolation at the input sequence to make the sparse input continuous and thus produce continuous output . On the contrary , our method tackles this jumping problem by introducing the cubic spline as a compensation for the vanilla ODE-RNN , at either the output or hidden space . 3 METHODS . In this section , we first formalize the irregularly sampled time series interpolation problem ( Sec . 3.1 ) , then introduce the background of ODE-RNN ( Sec . 3.2 ) . Based upon ODE-RNN , we present CSSC and its closed-form solution ( Sec . 3.3 ) , and illustrate the inference and training procedure ( Sec . 3.4 ) . Finally , we provide the interpolation error bound of CSSC ( Sec . 3.5 ) and describe an useful extension of CSSC ( Sec . 3.6 ) . 3.1 PROBLEM DEFINITION . We focus on the interpolation task . Given an unknown underlying function x ( t ) : R→ Rd , t ∈ [ a , b ] , and a set of n + 1 observations { xk|xk = x ( tk ) } nk=0 ∈ Rd sampled from x ( t ) at the irregularly spaced time points Π : a = t0 < t1 < ... < tn = b , the goal is to learn a function F ( t ) : R→ Rd to approximate x , such that F ( tk ) = xk . 3.2 BACKGROUND OF ODE-RNN . ODE-RNN ( Rubanova et al. , 2019 ) achieves the interpolation by applying ODE and RNN interchangeably through a time series , illustrated in top-left of Fig . 1 . The function F on time interval t ∈ [ tk , tk+1 ) is described by a neural ODE with the initial hidden state h ( tk ) : ḣ ( t ) = f ( h ( t ) ) ; ( 1 ) o ( t ) = g ( h ( t ) ) , ( 2 ) where the h ∈ Rm is the hidden embedding of the data , ḣ = dhdt is the temporal derivative of the hidden state , o ∈ Rd is the interpolation output of F ( t ) . Here , f : Rm → Rm and g : Rm → Rd are the transfer function and the output function parameterized by two neural networks , respectively . At the observation time t = tk , the hidden state will be updated by an RNN as : h ( tk ) = RNNCell ( h ( t − k ) , xk ) ; ( 3 ) o ( tk ) = g ( h ( tk ) ) , ( 4 ) where the input x ∈ Rd , t−k and t + k are the left- and right-hand limits of tk . The above formulation has two downsides . The first is the discontinuity problem : while the function described by ODE is right continuous o ( tk ) = o ( t+k ) , the RNN cell in Eq . ( 3 ) renders the hidden state discontinuity h ( t−k ) 6= h ( t + k ) and therefore output discontinuity o ( t − k ) 6= o ( t + k ) . The second is that the model can not guarantee o ( tk ) = xk without explicit constraints . 3.3 CUBIC SPLINE SMOOTHING COMPENSATION . To remedy the two downsides , we propose the module Cubic Spline Smoothing Compensation ( CSSC ) , manifested in the top-right of Fig . 1 . It computes a compensated output ô ( t ) as : ô ( t ) = c ( t ) + o ( t ) , ( 5 ) where o ( t ) is the ODE-RNN output , and the c ( t ) is a compensation composed of piecewise continuous functions . Our key insight is that adding another continuous function to the already piecewise continuous o ( t ) will ensure the global continuity . For simplicity , we set c ( t ) as a piecewise polynomials function and then narrow it to a piecewise cubic function since it is the most commonly used polynomials for interpolation ( Burden & Faires , 1997 ) . As the cubic spline is computed for each dimension of c individually , w.l.o.g. , we will discuss one dimension of the o , c , ô , x and thus denote them as o , c , ô , x , respectively . c ( t ) is composed with pieces as c ( t ) = ∑n−1 k=0 ck ( t ) with each piece ck defined at domain [ tk , tk+1 ) . To guarantee the smoothness , we propose four constraints to ô ( t ) : 1. ô ( t−k ) = ô ( t + k ) = xk , k = 1 , ... , n− 1 , ô ( t0 ) = x0 , ô ( tn ) = xn ( output continuity ) ; 2 . ˙̂o ( t−k ) = ˙̂o ( t + k ) , k = 1 , ... , n− 1 ( first order output continuity ) ; 3 . ¨̂o ( t−k ) = ¨̂o ( t + k ) , k = 1 , ... , n− 1 ( second order output continuity ) ; 4 . ¨̂o ( t0 ) = ¨̂o ( tn ) = 0 ( natural boundary condition ) . The constraint 1 ensures the interpolation curves continuously pass through the observations . Constraint 2 and 3 enforce the first and second-order continuity at the observation points , which usually holds when the underline curve x is smooth . And constraint 4 specifies the natural boundary condition owing to the lack of information of the endpoints ( Burden & Faires , 1997 ) . Given o ( t ) and such four constraints , c ( t ) has unique analytical solution expressed in Theorem 1 . Theorem 1 . Given the first order and second order jump difference of ODE-RNN as ṙk = ȯ ( t + k ) − ȯ ( t − k ) ; ( 6 ) r̈k = ö ( t + k ) − ö ( t − k ) . ( 7 ) where the analytical expression of ȯ and ö can be obtained as ȯ = ∂g ∂h f ; ö = fᵀ ∂2g ∂h2 f + ∂g ∂h ᵀ ∂f ∂h f , ( 8 ) and the error defined as +k = xk − o ( t + k ) ; ( 9 ) −k = xk − o ( t − k ) , ( 10 ) then ck can be uniquely determined as ck ( t ) = Mk+1 + r̈k+1 −Mk 6τk ( t− tk ) 3 + Mk 2 ( t− tk ) 2+ ( −k+1 − + k τk − τk ( Mk+1 + r̈k+1 + 2Mk ) 6 ) ( t− tk ) + +k , ( 11 ) where Mk is obtained as M = A−1d , ( 12 ) A = 2 λ1 µ2 2 λ2 . . . . . . . . . µn−2 2 λn−2 µn−1 2 , M = M1 M2 ... Mn−2 Mn−1 , d = d1 d2 ... dn−2 dn−1 , ( 13 ) τk = tk+1 − tk , µk = τk−1τk−1+τk , λk = τk τk−1+τk , dk = 6 [ t+k , t − k+1 ] − [ t + k−1 , t − k ] τk−1+τk + 6ṙk−2r̈kτk−1−r̈k+1τkτk−1+τk , [ t+k , t − k+1 ] = −k+1− + k τk , M0 = Mn = 0 . The proof for Theorem . 1 is in Appx . A . The c ( t ) is obtained by computing each c ( t ) individually according to Theorem . 1 . Computational Complexity . The major cost is the inverse of A , a tridiagonal matrix , whose inverse can be efficiently computed inO ( n ) complexity with the tridiagonal matrix algorithm ( implementation detailed in Appx . C.1 ) . Another concern is that ȯ and ö needs to compute Jacobian and Hessian in Eq . ( 8 ) . We can circumvent this computing cost by computing the numerical derivative or an empirical substitution , detailed in Appx . C.2 . Model Reduction . Our CSSC can reduce to cubic spline interpolation if setting o in Eq . ( 5 ) as zero . In light of this , we further analyze our model with techniques used for cubic spline interpolation and experimentally show our advantages against it in Sec . 4.2 . | The paper builds on ODE-RNN model that allows to represent a time series as a continuous trajectory. The authors address the limitation of the ODE-RNN model that the trajectory is continuous everywhere except the observation points. They introduce a compensation term based on cubic splines that transforms the output trajectory into a continuous one. This approach is also applied to correct a hidden state trajectory. The authors demonstrate better interpolation properties on sparse time series data. | SP:2a6bbbe26cf19664ffb879a8ea4fb9e3be195d1e |
Cubic Spline Smoothing Compensation for Irregularly Sampled Sequences | The marriage of recurrent neural networks and neural ordinary differential networks ( ODE-RNN ) is effective in modeling irregularly sampled sequences . While ODE produces the smooth hidden states between observation intervals , the RNN will trigger a hidden state jump when a new observation arrives and thus cause the interpolation discontinuity problem . To address this issue , we propose the cubic spline smoothing compensation , which is a stand-alone module upon either the output or the hidden state of ODE-RNN and can be trained end-to-end . We derive its analytical solution and provide its theoretical interpolation error bound . Extensive experiments indicate its merits over both ODE-RNN and cubic spline interpolation . 1 INTRODUCTION . Recurrent neural networks ( RNNs ) are commonly used for modeling regularly sampled sequences ( Cho et al. , 2014 ) . However , the standard RNN can only process discrete series without considering the unequal temporal intervals between sample points , making it fail to model irregularly sampled time series commonly seen in domains , e.g. , healthcare ( Rajkomar et al. , 2018 ) and finance ( Fagereng & Halvorsen , 2017 ) . While some works adapt RNNs to handle such irregular scenarios , they often assume an exponential decay ( either at the output or the hidden state ) during the time interval between observations ( Che et al. , 2018 ; Cao et al. , 2018 ) , which may not always hold . To remove the exponential decay assumption and better model the underlying dynamics , Chen et al . ( 2018 ) proposed to use the neural ordinary differential equation ( ODE ) to model the continuous dynamics of hidden states during the observation intervals . Leveraging a learnable ODE parametrized by a neural network , their method renders higher modeling capability and flexibility . However , an ODE determines the trajectory by its initial state , and it fails to adjust the trajectory according to subsequent observations . A popular way to leverage the subsequent observations is ODE-RNN ( Rubanova et al. , 2019 ; De Brouwer et al. , 2019 ) , which updates the hidden state upon observations using an RNN , and evolves the hidden state using an ODE between observation intervals . While ODE produces smooth hidden states between observation intervals , the RNN will trigger a hidden state jump at the observation point . This inconsistency ( discontinuity ) is hard to reconcile , thus jeopardizing continuous time series modeling , especially for interpolation tasks ( Fig . 1 top-left ) . We propose a Cubic Spline Smoothing Compensation ( CSSC ) module to tackle the challenging discontinuity problem , and it is especially suitable for continuous time series interpolation . Our CSSC employs the cubic spline as a means of compensation for the ODE-RNN to eliminate the jump , as illustrated in Fig . 1 top-right . While the latent ODE ( Rubanova et al. , 2019 ) with an encoder-decoder structure can also produce continuous interpolation , CSSC can further ensure the interpolated curve pass strictly through the observation points . Importantly , we can derive the closed-form solution for CSSC and obtain its interpolation error bound . The error bound suggests two key factors for a good interpolation : the time interval between observations and the performance of ODE-RNN . Furthermore , we propose the hidden CSSC that aims to compensate for the hidden state of ODE-RNN ( Fig . 1 bottom ) , which not only assuage the discontinuity problem but is more efficient when the observations are high-dimensional and only have continuity on the semantic level . We conduct extensive experiments and ablation studies to demonstrate the effectiveness of CSSC and hidden CSSC , and both of them outperform other comparison methods . 2 RELATED WORK . Spline interpolation is a practical way to construct smooth curves between a number of points ( De Boor et al. , 1978 ) , even for unequally spaced points . Cubic spline interpolation leverages the piecewise third order polynomials to avoid the Runge ’ s phenomenon ( Runge , 1901 ) and is applied as a classical way to impute missing data ( Che et al. , 2018 ) . Recent literature focuses on adapting RNNs to model the irregularly sampled time series , given their strong modeling ability . Since standard RNNs can only process discrete series without considering the unequal temporal intervals between sample points , different improvements were proposed . One solution is to augment the input with the observation mask or concatenate it with the time lag ∆t and expect the network to use interval information ∆t in an unconstrained manner ( Lipton et al. , 2016 ; Mozer et al. , 2017 ) . While such a flexible structure can achieve good performance under some circumstances ( Mozer et al. , 2017 ) , a more popular way is to use prior knowledge for missing data imputation . GRU-D ( Che et al. , 2018 ) imputes missing values with the weighted sum of exponential decay of the previous observation and the empirical mean . Shukla & Marlin ( 2019 ) employs the radial basis function kernel to construct an interpolation network . Cao et al . ( 2018 ) let hidden state exponentially decay for non-observed time points and use bi-directional RNN for temporal modeling . Another track is the probabilistic generative model . Due to the ability to model the missing data ’ s uncertainty , Gaussian processes ( GPs ) are adopted for missing data imputing ( Futoma et al. , 2017 ; Tan et al. , 2020 ; Moor et al. , 2019 ) . However , this approach introduced several hyperparameters , such as the covariance function , making it hard to fine-tune in practice . Neural processes ( Garnelo et al. , 2018 ) eliminate such constraints by introducing a global latent variable that represents the whole process . Generative adversarial networks are also adopted for imputing ( Luo et al. , 2018 ) . Recently , neural ODEs ( Chen et al. , 2018 ) utilize a continuous state transfer function parameterized by a neural network to learn the temporal dynamics . Rubanova et al . ( 2019 ) combine the RNN and ODE to reconcile both the new observation and latent state evolution between observations . De Brouwer et al . ( 2019 ) update the ODE with the GRU structure with Bayesian inference at observations . While the ODE produces the smooth hidden states between observation intervals , the RNN will trigger a jump of the hidden state at the observation point , leading to a discontinuous hidden state along the trajectory . This inconsistency ( discontinuity ) is hard to reconcile , thus jeopardizing the modeling of continuous time series , especially for interpolation tasks . The neural CDE ( Kidger et al. , 2020 ) directly apply cubic splines interpolation at the input sequence to make the sparse input continuous and thus produce continuous output . On the contrary , our method tackles this jumping problem by introducing the cubic spline as a compensation for the vanilla ODE-RNN , at either the output or hidden space . 3 METHODS . In this section , we first formalize the irregularly sampled time series interpolation problem ( Sec . 3.1 ) , then introduce the background of ODE-RNN ( Sec . 3.2 ) . Based upon ODE-RNN , we present CSSC and its closed-form solution ( Sec . 3.3 ) , and illustrate the inference and training procedure ( Sec . 3.4 ) . Finally , we provide the interpolation error bound of CSSC ( Sec . 3.5 ) and describe an useful extension of CSSC ( Sec . 3.6 ) . 3.1 PROBLEM DEFINITION . We focus on the interpolation task . Given an unknown underlying function x ( t ) : R→ Rd , t ∈ [ a , b ] , and a set of n + 1 observations { xk|xk = x ( tk ) } nk=0 ∈ Rd sampled from x ( t ) at the irregularly spaced time points Π : a = t0 < t1 < ... < tn = b , the goal is to learn a function F ( t ) : R→ Rd to approximate x , such that F ( tk ) = xk . 3.2 BACKGROUND OF ODE-RNN . ODE-RNN ( Rubanova et al. , 2019 ) achieves the interpolation by applying ODE and RNN interchangeably through a time series , illustrated in top-left of Fig . 1 . The function F on time interval t ∈ [ tk , tk+1 ) is described by a neural ODE with the initial hidden state h ( tk ) : ḣ ( t ) = f ( h ( t ) ) ; ( 1 ) o ( t ) = g ( h ( t ) ) , ( 2 ) where the h ∈ Rm is the hidden embedding of the data , ḣ = dhdt is the temporal derivative of the hidden state , o ∈ Rd is the interpolation output of F ( t ) . Here , f : Rm → Rm and g : Rm → Rd are the transfer function and the output function parameterized by two neural networks , respectively . At the observation time t = tk , the hidden state will be updated by an RNN as : h ( tk ) = RNNCell ( h ( t − k ) , xk ) ; ( 3 ) o ( tk ) = g ( h ( tk ) ) , ( 4 ) where the input x ∈ Rd , t−k and t + k are the left- and right-hand limits of tk . The above formulation has two downsides . The first is the discontinuity problem : while the function described by ODE is right continuous o ( tk ) = o ( t+k ) , the RNN cell in Eq . ( 3 ) renders the hidden state discontinuity h ( t−k ) 6= h ( t + k ) and therefore output discontinuity o ( t − k ) 6= o ( t + k ) . The second is that the model can not guarantee o ( tk ) = xk without explicit constraints . 3.3 CUBIC SPLINE SMOOTHING COMPENSATION . To remedy the two downsides , we propose the module Cubic Spline Smoothing Compensation ( CSSC ) , manifested in the top-right of Fig . 1 . It computes a compensated output ô ( t ) as : ô ( t ) = c ( t ) + o ( t ) , ( 5 ) where o ( t ) is the ODE-RNN output , and the c ( t ) is a compensation composed of piecewise continuous functions . Our key insight is that adding another continuous function to the already piecewise continuous o ( t ) will ensure the global continuity . For simplicity , we set c ( t ) as a piecewise polynomials function and then narrow it to a piecewise cubic function since it is the most commonly used polynomials for interpolation ( Burden & Faires , 1997 ) . As the cubic spline is computed for each dimension of c individually , w.l.o.g. , we will discuss one dimension of the o , c , ô , x and thus denote them as o , c , ô , x , respectively . c ( t ) is composed with pieces as c ( t ) = ∑n−1 k=0 ck ( t ) with each piece ck defined at domain [ tk , tk+1 ) . To guarantee the smoothness , we propose four constraints to ô ( t ) : 1. ô ( t−k ) = ô ( t + k ) = xk , k = 1 , ... , n− 1 , ô ( t0 ) = x0 , ô ( tn ) = xn ( output continuity ) ; 2 . ˙̂o ( t−k ) = ˙̂o ( t + k ) , k = 1 , ... , n− 1 ( first order output continuity ) ; 3 . ¨̂o ( t−k ) = ¨̂o ( t + k ) , k = 1 , ... , n− 1 ( second order output continuity ) ; 4 . ¨̂o ( t0 ) = ¨̂o ( tn ) = 0 ( natural boundary condition ) . The constraint 1 ensures the interpolation curves continuously pass through the observations . Constraint 2 and 3 enforce the first and second-order continuity at the observation points , which usually holds when the underline curve x is smooth . And constraint 4 specifies the natural boundary condition owing to the lack of information of the endpoints ( Burden & Faires , 1997 ) . Given o ( t ) and such four constraints , c ( t ) has unique analytical solution expressed in Theorem 1 . Theorem 1 . Given the first order and second order jump difference of ODE-RNN as ṙk = ȯ ( t + k ) − ȯ ( t − k ) ; ( 6 ) r̈k = ö ( t + k ) − ö ( t − k ) . ( 7 ) where the analytical expression of ȯ and ö can be obtained as ȯ = ∂g ∂h f ; ö = fᵀ ∂2g ∂h2 f + ∂g ∂h ᵀ ∂f ∂h f , ( 8 ) and the error defined as +k = xk − o ( t + k ) ; ( 9 ) −k = xk − o ( t − k ) , ( 10 ) then ck can be uniquely determined as ck ( t ) = Mk+1 + r̈k+1 −Mk 6τk ( t− tk ) 3 + Mk 2 ( t− tk ) 2+ ( −k+1 − + k τk − τk ( Mk+1 + r̈k+1 + 2Mk ) 6 ) ( t− tk ) + +k , ( 11 ) where Mk is obtained as M = A−1d , ( 12 ) A = 2 λ1 µ2 2 λ2 . . . . . . . . . µn−2 2 λn−2 µn−1 2 , M = M1 M2 ... Mn−2 Mn−1 , d = d1 d2 ... dn−2 dn−1 , ( 13 ) τk = tk+1 − tk , µk = τk−1τk−1+τk , λk = τk τk−1+τk , dk = 6 [ t+k , t − k+1 ] − [ t + k−1 , t − k ] τk−1+τk + 6ṙk−2r̈kτk−1−r̈k+1τkτk−1+τk , [ t+k , t − k+1 ] = −k+1− + k τk , M0 = Mn = 0 . The proof for Theorem . 1 is in Appx . A . The c ( t ) is obtained by computing each c ( t ) individually according to Theorem . 1 . Computational Complexity . The major cost is the inverse of A , a tridiagonal matrix , whose inverse can be efficiently computed inO ( n ) complexity with the tridiagonal matrix algorithm ( implementation detailed in Appx . C.1 ) . Another concern is that ȯ and ö needs to compute Jacobian and Hessian in Eq . ( 8 ) . We can circumvent this computing cost by computing the numerical derivative or an empirical substitution , detailed in Appx . C.2 . Model Reduction . Our CSSC can reduce to cubic spline interpolation if setting o in Eq . ( 5 ) as zero . In light of this , we further analyze our model with techniques used for cubic spline interpolation and experimentally show our advantages against it in Sec . 4.2 . | This work addresses the discontinuity issues caused by jumps in hidden state/output at the arrival of new observations in a ODE-RNN. This problem is tackled by adding a cubic spline smoothing component on top of ODE-RNN to produce smooth and continuous hidden state/outputs. They derive a closed form solution for the cubic spline component based on the output of ODE-RNN and obtain an error bound for 4th order derivable inputs. Although the cubic spline component has no trainable component, this work shows that the gradient can flow through it to ODE-RNN and perform end-to-end training. | SP:2a6bbbe26cf19664ffb879a8ea4fb9e3be195d1e |
Grey-box Extraction of Natural Language Models | 1 INTRODUCTION . Machine learning models are often deployed behind APIs that enable querying the model but that prevent direct access to the model parameters . This restriction aims to protect intellectual property , as models are expensive to train and hence valuable ( Strubell et al. , 2019 ) ; security , as access to model parameters facilitates the creation of adversarial examples ( Laskov et al. , 2014 ; Ebrahimi et al. , 2018 ) ; and privacy , as model parameters carry potentially sensitive information about the training data ( Leino & Fredrikson , 2020 ) . Model extraction attacks ( Tramèr et al. , 2016 ) attempt to replicate machine learning models from sets of query-response pairs obtained via the model ’ s inference API , thus effectively circumventing the protection offered by the API . Several extraction attacks on deep neural networks ( see Jagielski et al . ( 2020 ) for a recent overview ) follow a learning-based approach ( Tramèr et al. , 2016 ; Orekondy et al. , 2018 ; Pal et al. , 2020 ; Krishna et al. , 2020 ) , where the target model is queried to label data used for training the replica . The replicas obtained in this way aim to achieve accuracy on the desired task , or agreement with the target model on predictions , but recovery of the model weights is out of scope of this approach . More recently , a novel class of attacks has emerged that uses algebraic techniques to recover the weights of deep neural networks up to model-specific invariances . Examples are the attacks of Milli et al . ( 2018 ) , which leverage observations of gradients to recover model parameters , and Rolnick & Körding ( 2020 ) ; Jagielski et al . ( 2020 ) ; Carlini et al . ( 2020 ) , which estimate gradients from finite differences of logits , and then use this information to recover model parameters . Algebraic attacks improve on learning-based attacks in that they ( i ) achieve higher-fidelity replicas and ( ii ) are orders of magnitude more query-efficient . So far , however , algebraic attacks have only been applied to small , fully connected neural networks with ReLU activations . In particular , for modern large-scale natural language models ( LLMs ) such as BERT or GPT-2 , the state-of-the-art model extraction attack is still learning-based ( Krishna et al. , 2020 ) . In this paper , we propose the first algebraic attacks on LLMs . We focus on models consisting of a pre-trained encoder and a single task-specific classification layer . We assume a grey-box setting where the encoder is public ( and hence known to the adversary ) , and the classification layer is private ( and hence the main target of the attack ) . There are two key observations that enable us to extract LLMs via algebraic attacks . The first is that it is sufficient for an adversary to know rather than to choose the embeddings that are fed into the last layer . Existing algebraic attacks can infer the inputs to hidden layers , but can only do so on piecewise linear networks and would not work on LLMs , which use non-linear activations . In the grey-box setting , an adversary can compute hidden embeddings of any input by querying the public encoder model , and can query the target LLM on the same input through the model ’ s API . We show in theory , and confirm by experiments , that a random set of n embeddings is likely to form a basis of the last layer ’ s input space . The raw outputs ( i.e. , the logits ) on this basis uniquely determine the parameters of the last linear layer , which can be recovered by a transformation to the standard basis . Our second observation is that this approach extends to the case where the API returns probabilities rather than raw logits , after normalization by the softmax function . For this , we leverage the invariance under translation of softmax to establish an invariance result for linear functions . Using this result , we show that the parameters of the last layer can be recovered ( up to invariance ) from embedding vectors spanning its input space and their corresponding probability outputs . We evaluate our attacks on LLMs of different sizes and fine-tuned to different downstream tasks . We study the effects of using different types and numbers of extraction queries and different learning rates for fine-tuning the encoder model . Our key findings are : • When the target model ’ s base layers are frozen during fine-tuning ( i.e. , the attacker can get the exact embedding of any input ) , the attack is extremely effective . With only twice as many queries as the dimension of the embedding space ( e.g. , 1536 for BERT-base ) , we extract models that achieve 100 % fidelity with the target , for all model sizes and tasks . • When the model ’ s base layers are fine-tuned together with the task-specific layer , the embeddings of the base model only approximate those of the target model and , as expected , the fidelity of the extracted models decreases as the learning rate grows . Maybe surprisingly , for some models and downstream tasks , we are still able to extract replicas with up to 82 % fidelity and up to 79 % task accuracy , for orders of magnitude fewer queries than required by state-of-the-art learning-based attacks ( Krishna et al. , 2020 ) . • Extraction is possible using either random or in-distribution queries . Replicas extracted using in-distribution queries perform well on both in-distribution and random challenge inputs . This shows that replicas can be created from small numbers of in-distribution queries , making attempts to extract the model indistinguishable from legitimate use . In summary , we propose a novel grey-box extraction attack on natural language models that is indistinguishable from legitimate use in terms of the content and number of queries required . 2 ATTACK . We consider classification models h : X → Rn , mapping elements from X to label probabilities in Rn . We assume that h = log ◦ softmax ◦ f ◦ g consists of three components h : X g−→ Rn f−→ Rm log ◦ softmax−−−−−−−−→ Rm where • g : X → Rn is a contextualized embedding model , such as BERT or GPT-2 ; • f : Rn → Rm is an affine function computing logits from embeddings , i.e. , f ( x ) = Ax+ b with A ∈ Rm×n and b ∈ Rm ; • softmax : Rm → Rm normalizes logits to probability vectors : softmax ( x ) = exp ( xi ) ∑m i=1 exp ( xi ) . ( 1 ) We assume the adversary knows the embedding model g and tries to infer A and b ( resp . f ) . We call this adversary grey-box because it can compute the embeddings from the inputs to h . 2.1 BASIC IDEA . Milli et al . ( 2018 ) show how to reconstruct models from oracle access to gradients . Carlini et al . ( 2020 ) show how to replace gradients by finite differences of logits , enabling reconstructing models without such an oracle . To explain the basic idea , let ei = ( 0 , . . . 0 , 1 , 0 , . . . 0 ) T be the ith vector of the standard basis in Rn , and let x ∈ Rn be arbitrary . The ith column of A can be obtained as the difference between f ( x + ei ) and f ( x ) . There are two obstacles that prevent us from directly applying this idea to classification layers from LLMs , namely ( 1 ) the attack requires the embeddings to be chosen , which would effectively amount to reversing the embedding model ; and ( 2 ) the attack uses raw logits , while APIs provide only log probabilities normalized with softmax . We show next how to overcome these obstacles . 2.2 EXTRACTION FROM LOGITS . As a first step , we overcome the requirement that the adversary be able to choose the inputs to f . Specifically , we show that it is sufficient for the adversary to know the inputs , given that they are sufficiently random . We rely on the following standard result : Proposition 1 . Let x ( 1 ) , . . . , x ( n ) ∈ Rn be uniformly distributed in an n-cube . Then x ( 1 ) , . . . , x ( n ) form a basis of Rn with probability 1 . Proof . Let { x ( i ) } ni=1 be a basis of Rn and V the subspace generated by { x ( i ) } mi=1 , for m < n. For x chosen uniformly in an n-cube , the space V ∪ { x } has dimensionm+1 with probability 1 . This is because for x to fall into V , it would need to have zero as coordinates wrt x ( m+1 ) , . . . , x ( n ) , which happens with probability zero . Applying this argument inductively proves the proposition . Based on this result , we mount the following grey-box attack on f ◦ g : 1 . Choose distinct inputs { x ( j ) } Nj=1 in X with N > n ; 2 . Compute their embeddings { y ( j ) = g ( x ( j ) ) } Nj=1 and logits { z ( j ) = f ( y ( j ) ) } Nj=1 ; 3 . Construct a matrix Y ∈ R ( n+1 ) ×N where the first component of each column is 1 and the rest are from the embeddings , i.e. , Yi , j = ( 1 , y ( j ) ) T , and a matrix Z ∈ Rm×N where the columns are the logit vectors , i.e. , Zi , j = z ( j ) i ; 4 . Solve for à ∈ Rm×n and b̃ ∈ Rm in ( b̃ , à ) Y = Z , i.e. , b̃1 ã1,1 ã1 , n ... . . . ... b̃m ãm,1 ãm , n 1 . . . 1 y ( 1 ) 1 . . . y ( N ) 1 ... . . . ... y ( 1 ) n . . . y ( N ) n = z ( 1 ) 1 . . . z ( N ) 1 ... . . . ... z ( 1 ) m . . . z ( N ) m ( 2 ) Proposition 2 . Assuming g maps inputs to uniformly distributed embeddings in an n-cube1 , the attack above uniquely determines the parameters of f . I.e. , we have à = A and b̃ = b . Proof . By construction of ( 2 ) , we have Ãy ( j ) + b̃ = f ( y ( j ) ) for j = 1 , . . . , N . The unique solution can be obtained multiplying Z by the right-inverse of Y . For uniformly random embeddings , this right-inverse exists because Y has full rank with probability 1 by Proposition 1 . While in theory N = n+1 distinct queries are sufficient to mount the attack , computing the inverse of Y based with finite-precision arithmetic can be numerically unstable . In practice , we gather a larger set of inputs and construct an over-determined system of equations . We then numerically compute a least squares solution to Equation ( 2 ) . 1A language model with vocabulary V and maximum sequence length L can only produce |V |L different embeddings . This is many more points than representable in the precision used , so not an issue in practice . | This paper proposes a range of algebraic model extraction attacks (different from the prevalent learning-based approaches) for transformer models trained for NLP tasks in a grey-box setting i.e., an existing, public, usually pretrained encoder, with a private classification layer. Through attacks on different sizes of models and a range of downstream tasks, they observe that only a portion of the embedding space forms a basis of the tuned classification layer’s input space, and using a grey-box method, this can be algebraically computed. The pretraining-finetuning experiments on different tasks also show the smallest number of dimensions needed for high-fidelity extraction, and also that the model extraction attacks effectiveness decreases with fine-tuning the larger models base layers---which is an insight that is very useful for a lot of interpretability/probing work. | SP:7f4c42d8f72214b7a2ffc295358fd0e8f8a4103e |
Grey-box Extraction of Natural Language Models | 1 INTRODUCTION . Machine learning models are often deployed behind APIs that enable querying the model but that prevent direct access to the model parameters . This restriction aims to protect intellectual property , as models are expensive to train and hence valuable ( Strubell et al. , 2019 ) ; security , as access to model parameters facilitates the creation of adversarial examples ( Laskov et al. , 2014 ; Ebrahimi et al. , 2018 ) ; and privacy , as model parameters carry potentially sensitive information about the training data ( Leino & Fredrikson , 2020 ) . Model extraction attacks ( Tramèr et al. , 2016 ) attempt to replicate machine learning models from sets of query-response pairs obtained via the model ’ s inference API , thus effectively circumventing the protection offered by the API . Several extraction attacks on deep neural networks ( see Jagielski et al . ( 2020 ) for a recent overview ) follow a learning-based approach ( Tramèr et al. , 2016 ; Orekondy et al. , 2018 ; Pal et al. , 2020 ; Krishna et al. , 2020 ) , where the target model is queried to label data used for training the replica . The replicas obtained in this way aim to achieve accuracy on the desired task , or agreement with the target model on predictions , but recovery of the model weights is out of scope of this approach . More recently , a novel class of attacks has emerged that uses algebraic techniques to recover the weights of deep neural networks up to model-specific invariances . Examples are the attacks of Milli et al . ( 2018 ) , which leverage observations of gradients to recover model parameters , and Rolnick & Körding ( 2020 ) ; Jagielski et al . ( 2020 ) ; Carlini et al . ( 2020 ) , which estimate gradients from finite differences of logits , and then use this information to recover model parameters . Algebraic attacks improve on learning-based attacks in that they ( i ) achieve higher-fidelity replicas and ( ii ) are orders of magnitude more query-efficient . So far , however , algebraic attacks have only been applied to small , fully connected neural networks with ReLU activations . In particular , for modern large-scale natural language models ( LLMs ) such as BERT or GPT-2 , the state-of-the-art model extraction attack is still learning-based ( Krishna et al. , 2020 ) . In this paper , we propose the first algebraic attacks on LLMs . We focus on models consisting of a pre-trained encoder and a single task-specific classification layer . We assume a grey-box setting where the encoder is public ( and hence known to the adversary ) , and the classification layer is private ( and hence the main target of the attack ) . There are two key observations that enable us to extract LLMs via algebraic attacks . The first is that it is sufficient for an adversary to know rather than to choose the embeddings that are fed into the last layer . Existing algebraic attacks can infer the inputs to hidden layers , but can only do so on piecewise linear networks and would not work on LLMs , which use non-linear activations . In the grey-box setting , an adversary can compute hidden embeddings of any input by querying the public encoder model , and can query the target LLM on the same input through the model ’ s API . We show in theory , and confirm by experiments , that a random set of n embeddings is likely to form a basis of the last layer ’ s input space . The raw outputs ( i.e. , the logits ) on this basis uniquely determine the parameters of the last linear layer , which can be recovered by a transformation to the standard basis . Our second observation is that this approach extends to the case where the API returns probabilities rather than raw logits , after normalization by the softmax function . For this , we leverage the invariance under translation of softmax to establish an invariance result for linear functions . Using this result , we show that the parameters of the last layer can be recovered ( up to invariance ) from embedding vectors spanning its input space and their corresponding probability outputs . We evaluate our attacks on LLMs of different sizes and fine-tuned to different downstream tasks . We study the effects of using different types and numbers of extraction queries and different learning rates for fine-tuning the encoder model . Our key findings are : • When the target model ’ s base layers are frozen during fine-tuning ( i.e. , the attacker can get the exact embedding of any input ) , the attack is extremely effective . With only twice as many queries as the dimension of the embedding space ( e.g. , 1536 for BERT-base ) , we extract models that achieve 100 % fidelity with the target , for all model sizes and tasks . • When the model ’ s base layers are fine-tuned together with the task-specific layer , the embeddings of the base model only approximate those of the target model and , as expected , the fidelity of the extracted models decreases as the learning rate grows . Maybe surprisingly , for some models and downstream tasks , we are still able to extract replicas with up to 82 % fidelity and up to 79 % task accuracy , for orders of magnitude fewer queries than required by state-of-the-art learning-based attacks ( Krishna et al. , 2020 ) . • Extraction is possible using either random or in-distribution queries . Replicas extracted using in-distribution queries perform well on both in-distribution and random challenge inputs . This shows that replicas can be created from small numbers of in-distribution queries , making attempts to extract the model indistinguishable from legitimate use . In summary , we propose a novel grey-box extraction attack on natural language models that is indistinguishable from legitimate use in terms of the content and number of queries required . 2 ATTACK . We consider classification models h : X → Rn , mapping elements from X to label probabilities in Rn . We assume that h = log ◦ softmax ◦ f ◦ g consists of three components h : X g−→ Rn f−→ Rm log ◦ softmax−−−−−−−−→ Rm where • g : X → Rn is a contextualized embedding model , such as BERT or GPT-2 ; • f : Rn → Rm is an affine function computing logits from embeddings , i.e. , f ( x ) = Ax+ b with A ∈ Rm×n and b ∈ Rm ; • softmax : Rm → Rm normalizes logits to probability vectors : softmax ( x ) = exp ( xi ) ∑m i=1 exp ( xi ) . ( 1 ) We assume the adversary knows the embedding model g and tries to infer A and b ( resp . f ) . We call this adversary grey-box because it can compute the embeddings from the inputs to h . 2.1 BASIC IDEA . Milli et al . ( 2018 ) show how to reconstruct models from oracle access to gradients . Carlini et al . ( 2020 ) show how to replace gradients by finite differences of logits , enabling reconstructing models without such an oracle . To explain the basic idea , let ei = ( 0 , . . . 0 , 1 , 0 , . . . 0 ) T be the ith vector of the standard basis in Rn , and let x ∈ Rn be arbitrary . The ith column of A can be obtained as the difference between f ( x + ei ) and f ( x ) . There are two obstacles that prevent us from directly applying this idea to classification layers from LLMs , namely ( 1 ) the attack requires the embeddings to be chosen , which would effectively amount to reversing the embedding model ; and ( 2 ) the attack uses raw logits , while APIs provide only log probabilities normalized with softmax . We show next how to overcome these obstacles . 2.2 EXTRACTION FROM LOGITS . As a first step , we overcome the requirement that the adversary be able to choose the inputs to f . Specifically , we show that it is sufficient for the adversary to know the inputs , given that they are sufficiently random . We rely on the following standard result : Proposition 1 . Let x ( 1 ) , . . . , x ( n ) ∈ Rn be uniformly distributed in an n-cube . Then x ( 1 ) , . . . , x ( n ) form a basis of Rn with probability 1 . Proof . Let { x ( i ) } ni=1 be a basis of Rn and V the subspace generated by { x ( i ) } mi=1 , for m < n. For x chosen uniformly in an n-cube , the space V ∪ { x } has dimensionm+1 with probability 1 . This is because for x to fall into V , it would need to have zero as coordinates wrt x ( m+1 ) , . . . , x ( n ) , which happens with probability zero . Applying this argument inductively proves the proposition . Based on this result , we mount the following grey-box attack on f ◦ g : 1 . Choose distinct inputs { x ( j ) } Nj=1 in X with N > n ; 2 . Compute their embeddings { y ( j ) = g ( x ( j ) ) } Nj=1 and logits { z ( j ) = f ( y ( j ) ) } Nj=1 ; 3 . Construct a matrix Y ∈ R ( n+1 ) ×N where the first component of each column is 1 and the rest are from the embeddings , i.e. , Yi , j = ( 1 , y ( j ) ) T , and a matrix Z ∈ Rm×N where the columns are the logit vectors , i.e. , Zi , j = z ( j ) i ; 4 . Solve for à ∈ Rm×n and b̃ ∈ Rm in ( b̃ , à ) Y = Z , i.e. , b̃1 ã1,1 ã1 , n ... . . . ... b̃m ãm,1 ãm , n 1 . . . 1 y ( 1 ) 1 . . . y ( N ) 1 ... . . . ... y ( 1 ) n . . . y ( N ) n = z ( 1 ) 1 . . . z ( N ) 1 ... . . . ... z ( 1 ) m . . . z ( N ) m ( 2 ) Proposition 2 . Assuming g maps inputs to uniformly distributed embeddings in an n-cube1 , the attack above uniquely determines the parameters of f . I.e. , we have à = A and b̃ = b . Proof . By construction of ( 2 ) , we have Ãy ( j ) + b̃ = f ( y ( j ) ) for j = 1 , . . . , N . The unique solution can be obtained multiplying Z by the right-inverse of Y . For uniformly random embeddings , this right-inverse exists because Y has full rank with probability 1 by Proposition 1 . While in theory N = n+1 distinct queries are sufficient to mount the attack , computing the inverse of Y based with finite-precision arithmetic can be numerically unstable . In practice , we gather a larger set of inputs and construct an over-determined system of equations . We then numerically compute a least squares solution to Equation ( 2 ) . 1A language model with vocabulary V and maximum sequence length L can only produce |V |L different embeddings . This is many more points than representable in the precision used , so not an issue in practice . | This paper is an interesting study of algebraic model extraction attacks on modern NLP models based on BERT. Model extraction is the setting where a malicious attacker tries to reconstruct a copy of a black-box inference API without access to the original training data. Prior work [1] showed these attacks are possible on BERT models using a distillation-like learning method, using gibberish sequences of words as queries to the API. However, these attacks needed large number of queries for success. This work adopts a different strategy --- equation solving the parameters of the neural network using least square linear algebra methods. This not only allows extraction with lesser queries, but also ensures greater similarity between the API and extracted model ("high fidelity", [2]). The attacks in this paper work perfectly in settings where BERT is frozen and a single classification layer is fine-tuned. However, the attacks are not as effective in the more practical setting where BERT is fine-tuned, and the authors perform a thorough analysis varying critical hyperparameters. | SP:7f4c42d8f72214b7a2ffc295358fd0e8f8a4103e |
Deepening Hidden Representations from Pre-trained Language Models | 1 INTRODUCTION . Language representation is essential to the understanding of text . Recently , pre-trained language models based on Transformer ( Vaswani et al. , 2017 ) such as GPT ( Radford et al. , 2018 ) , BERT ( Devlin et al. , 2019 ) , XLNet ( Yang et al. , 2019 ) , and RoBERTa ( Liu et al. , 2019c ) have been shown to be effective for learning contextualized language representation . These models have since continued to achieve new state-of-the-art results on a variety of natural language processing tasks . They include question answering ( Rajpurkar et al. , 2018 ; Lai et al. , 2017 ) , natural language inference ( Williams et al. , 2018 ; Bowman et al. , 2015 ) , named entity recognition ( Tjong Kim Sang & De Meulder , 2003 ) , sentiment analysis ( Socher et al. , 2013 ) and semantic textual similarity ( Cer et al. , 2017 ; Dolan & Brockett , 2005 ) . Normally , Transformer-based models are pre-trained on large-scale unlabeled corpus in an unsupervised manner , and then fine-tuned on the downstream tasks through introducing task-specific output layer . When fine-tuning on the supervised downstream tasks , the models pass directly the output of Transformer encoder ’ s final layer , which is considered as the contextualized representation of input text , to the task-specific layer . However , due to the numerous layers ( i.e. , Transformer blocks ) and considerable depth of these pretrained models , we argue that the output of the last layer may not always be the best representation of the input text during the fine-tuning for downstream tasks . Devlin et al . ( 2019 ) shows diverse combinations of different layers ’ outputs of the pre-trained BERT result in distinct performance on CoNLL-2003 Named Entity Recognition ( NER ) task ( Tjong Kim Sang & De Meulder , 2003 ) . Peters et al . ( 2018b ) points out for pre-trained language models , including Transformer , the most transferable contextualized representations of input text tend to occur in the middle layers , while the top layers specialize for language modeling . Therefore , the onefold use of the last layer ’ s output may restrict the power of the pre-trained representation . In this paper , we propose an extra network component design for Transformer-based model , which is capable of adaptively leveraging the hidden information in the Transformer ’ s hidden layers to refine the language representation . Our introduced additional components include two main additional components : 1 . HIdden Representation Extractor ( HIRE ) dynamically learns a complementary representation which contains the information that the final layer ’ s output fails to capture . 2 . Fusion network integrates the hidden information extracted by the HIRE with Transformer final layer ’ s output through two steps of functionalities , leading to a refined contextualized language representation . Taking advantage of the robustness of RoBERTa by using it as our backbone Transformer-based encoder ( Liu et al. , 2019c ) , we conduct experiments on GLUE benchmark ( Wang et al. , 2018 ) , which consists of nine Natural Language Understanding ( NLU ) tasks . With the help of HIRE , our model outperforms the baseline on 5/9 of them and advances the state-of-the-art on SST-2 dataset . Keeping the backbone Transformer model unchanged on its architecture , pre-training procedure and training objectives , we get comparable performance with other state-of-the-art models on the GLUE leaderboard , which verifies the effectiveness of the proposed HIRE enhancement over Transformer model . 2 MODEL 2.1 TRANSFORMER-BASED ENCODER . Transformer-based encoder is responsible for encoding input text into contextualized representation . Let { w1 , . . . , wn } represent a sequence of nwords of input text , Transformer-based encoder encodes the input sequence into its universal contextualized representationR ∈ Rn×d : R = Encoder ( { w1 , . . . , wn } ) ( 1 ) where d is the hidden size of the encoder and R is the output of Transformer-based encoder ’ s last layer which has the same length as the input text . We call it preliminary representation in this paper to distinguish it with the one that we introduce in section 2.2 . Here , we omit a rather extensive formulations of Transformer and refer readers to Vaswani et al . ( 2017 ) , Radford et al . ( 2018 ) and Devlin et al . ( 2019 ) for more details . 2.2 HIDDEN REPRESENTATION EXTRACTOR . Transformer-based encoder normally has many structure-identical layers stacked together , for example , BERTLARGE and XLNetLARGE all contain 24 layers of the identical structure , either outputs from these hidden layers or the last layer , but not only limited to the latter , may be extremely helpful for specific downstream task . To make full use of the representations from these hidden layers , we introduce an extra component attached to the original encoder , HIdden Representation Extractor ( HIRE ) to capture the complementary information that the output of the last layer fails to capture . Since each layer does not take the same importance to represent a certain input sequence for different downstream tasks , we design an adaptive mechanism that can compute the importance dynamically . We measure the importance by an importance score . The input to the HIRE is { H0 , . . . , Hj , . . . , Hl } where l represents the number of layers in the encoder . Here H0 is the initial embedding of input text , which is the input of the encoder ’ s first layer but is updated during training and Hj ∈ Rn×d is the hidden-state of the encoder at the output of layer j . For the sake of simplicity , we call them all hidden-state afterwards . We use the same 2-layer Bidirectional Gated Recurrent Unit ( GRU ) ( Cho et al. , 2014 ) to summarize each hidden-state of the encoder . Instead of taking the whole output of GRU as the representation of the hidden state , we concatenate GRU ’ s each layer and each direction ’ s final state together . In this way , we manage to summarize the hidden-state into a fixed-sized vector . Hence , we obtain U ∈ R ( l+1 ) ×4d with ui the summarized vector ofHi : ui = Bi-GRU ( Hi ) ∈ R4d ( 2 ) where 0 ≤ i ≤ l. Then the importance value αi for hidden-stateHi is calculated by : αi = ReLU ( W Tui + b ) ∈ R ( 3 ) whereW ∈ R4d×1 and b ∈ R are trainable parameters . Letα= { αi } be normalized into a probability distribution s through a softmax layer : s = softmax ( α ) ∈ Rl+1 ( 4 ) where si is the normalized weight of hidden-state i when computing the representation . Subsequently , we obtain the input sequence ’ s new representationA by : A = l+1∑ i=0 siHi ∈ Rn×d ( 5 ) With the same shape as the output of Transformer-based encoder ’ s final layer , HIRE ’ s output A is expected to contain the additional useful information from the encoder ’ s hidden-states and we call it complementary representation . 2.3 FUSION NETWORK . This module fuses the information contained in the output of Transformer-based encoder and the one extracted from encoders ’ hidden states by HIRE . Given the preliminary representation R , instead of letting it flow directly into task-specfic output layer , we combine it together with the complementary representationA to yieldM , defined by : M = [ R ; A ; R+A ; R ◦A ] ∈ Rn×4d ( 6 ) where ◦ is element-wise multiplication ( Hadamard Product ) and [ ; ] is concatenation across the last dimension . Later , two-layer bidirectional GRU , with the output size of d for each direction , is used to fully fuse the information contained in the preliminary representation and the complementary representation . We concatenate the outputs of the GRUs in two dimensions together for the final contextualized representation : F = Bi-GRU ( M ) ∈ Rn×2d ( 7 ) 2.4 OUTPUT LAYER . The output layer is task-specific . The following are the concerned implementation details on two tasks , classification and regression . For classification task , given the input text ’ s contextualized representation F , following Devlin et al . ( 2019 ) , we take the first row c ∈ R2d of F corresponding to the first input token ( < s > ) as the aggregated representation . Let m be the number of labels in the datasets , we pass c through a feed-forward network ( FFN ) : q =W T2 · tanh ( W T1 c+ b1 ) + b2 ∈ Rm ( 8 ) with W1 ∈ R2d×d , W2 ∈ Rd×m , b1 ∈ Rd and b2 ∈ Rm the only parameters that we introduce in output layer . Finally , the probability distribution of predicted label is computed as : p = softmax ( q ) ∈ Rm ( 9 ) For regression task , we obtain q in the same manner with m = 1 , and take q as the predicted value . 2.5 TRAINING . For classification task , the training loss to be minimized is defined by the Cross-Entropy : L ( θ ) = − 1 T T∑ i=1 log ( pi , c ) ( 10 ) where θ is the set of all parameters in the model , T is the number of examples in the dataset , pi , c is the predicted probability of gold class c for example i . For regression task , we define the training loss by mean squared error ( MSE ) : L ( θ ) = 1 T T∑ i=1 ( qi − yi ) 2 ( 11 ) where qi is the predicted value for example i and yi is the ground truth value for example i . 3 EXPERIMENTS . 3.1 DATASET . We conducted the experiments on the General Language Understanding Evaluation ( GLUE ) benchmark ( Wang et al. , 2018 ) to evaluate our proposed method . GLUE is a collection of 9 diverse datasets1 for training , evaluating , and analyzing natural language understanding models . 3.2 MAIN RESULTS . 1All the datasets can be obtained from https : //gluebenchmark.com/tasks Table 1 compares our method with a list of Transformer-based models on the development set . Model parameter comparison is shown in Table 2 . To obtain a direct and fair comparison with our baseline model RoBERTa , following the original paper ( Liu et al. , 2019c ) , we fine-tune RoBERTa+HIRE separately for each of the GLUE tasks , using only task-specific training data . The single-model results for each task are reported . We run our model with five different random seeds but the same hyperparameters and take the median value . Due to the problematic nature of WNLI dataset , we exclude its results in this table . The results shows that RoBERTa+HIRE consistently outperforms RoBERTa on 4 of the GLUE task development sets , with an improvement of 1.7 points , 0.4 points , 0.5/0.2 points , 0.3 points on CoLA , SST-2 , MNLI and QNLI respectively . And on the MRPC , STS-B and RTE task , our model get the same result as RoBERTa . It should be noted that the improvement is entirely attributed to the introduction of HIdden Representation Extractor and fusion network in our model . Table 3 presents the results of HIRE enhancement and other models on the test set that have been submitted to the GLUE leaderboard . Following Liu et al . ( 2019c ) , we fine-tune STS-B and MRPC starting from the MNLI single-task model . Given the simplicity between RTE , WNLI and MNLI , and the large-scale nature of MNLI dataset ( 393k ) , we also initialize RoBERTa+HIRE with the weights of MNLI single-task model before fine-tuning on RTE and WNLI . We submitted the ensemble-model results to the leaderboard . The results show that RoBERTa+HIRE still boosts the strong RoBERTa baseline model on the test set . To be specific , RoBERTa+HIRE outperforms RoBERTa over CoLA , SST-2 , MRPC , SST-B , MNLI-mm and QNLI with an improvement of 0.8 points , 0.4 points , 0.7/0.9 points , 0.2/0.1 points , 0.2 points and 0.1 points respectively . In the meantime , RoBERTa+HIRE gets the same results as RoBERTa on QQP and WNLI . By category , RoBERTa+HIRE has better performance than RoBERTa on the single sentence tasks , similarity and paraphrase tasks . It is worth noting that our model obtains state-of-the-art results on SST-2 dataset , with a score of 97.1 . The results are quite promising since HIRE does not modify the encoder internal architecture ( Yang et al. , 2019 ) or redefine the pre-training procedure ( Liu et al. , 2019c ) , getting the comparable results with them . | This paper presents a new mechanism, called HIRE, to extract more information from the intermediate layers of pre-trained models, which will be further fused with the last layer of pre-trained models. The main contribution of this work is the newly proposed dynamic feature extractor HIRE and the fusion network. Experiments confirmed the effectiveness of the proposed method, and some interesting observations on the importance of different layers for different tasks were given (i.e. Figure 2). | SP:1bd140af937b949ece558c8978306e3e04d02169 |
Deepening Hidden Representations from Pre-trained Language Models | 1 INTRODUCTION . Language representation is essential to the understanding of text . Recently , pre-trained language models based on Transformer ( Vaswani et al. , 2017 ) such as GPT ( Radford et al. , 2018 ) , BERT ( Devlin et al. , 2019 ) , XLNet ( Yang et al. , 2019 ) , and RoBERTa ( Liu et al. , 2019c ) have been shown to be effective for learning contextualized language representation . These models have since continued to achieve new state-of-the-art results on a variety of natural language processing tasks . They include question answering ( Rajpurkar et al. , 2018 ; Lai et al. , 2017 ) , natural language inference ( Williams et al. , 2018 ; Bowman et al. , 2015 ) , named entity recognition ( Tjong Kim Sang & De Meulder , 2003 ) , sentiment analysis ( Socher et al. , 2013 ) and semantic textual similarity ( Cer et al. , 2017 ; Dolan & Brockett , 2005 ) . Normally , Transformer-based models are pre-trained on large-scale unlabeled corpus in an unsupervised manner , and then fine-tuned on the downstream tasks through introducing task-specific output layer . When fine-tuning on the supervised downstream tasks , the models pass directly the output of Transformer encoder ’ s final layer , which is considered as the contextualized representation of input text , to the task-specific layer . However , due to the numerous layers ( i.e. , Transformer blocks ) and considerable depth of these pretrained models , we argue that the output of the last layer may not always be the best representation of the input text during the fine-tuning for downstream tasks . Devlin et al . ( 2019 ) shows diverse combinations of different layers ’ outputs of the pre-trained BERT result in distinct performance on CoNLL-2003 Named Entity Recognition ( NER ) task ( Tjong Kim Sang & De Meulder , 2003 ) . Peters et al . ( 2018b ) points out for pre-trained language models , including Transformer , the most transferable contextualized representations of input text tend to occur in the middle layers , while the top layers specialize for language modeling . Therefore , the onefold use of the last layer ’ s output may restrict the power of the pre-trained representation . In this paper , we propose an extra network component design for Transformer-based model , which is capable of adaptively leveraging the hidden information in the Transformer ’ s hidden layers to refine the language representation . Our introduced additional components include two main additional components : 1 . HIdden Representation Extractor ( HIRE ) dynamically learns a complementary representation which contains the information that the final layer ’ s output fails to capture . 2 . Fusion network integrates the hidden information extracted by the HIRE with Transformer final layer ’ s output through two steps of functionalities , leading to a refined contextualized language representation . Taking advantage of the robustness of RoBERTa by using it as our backbone Transformer-based encoder ( Liu et al. , 2019c ) , we conduct experiments on GLUE benchmark ( Wang et al. , 2018 ) , which consists of nine Natural Language Understanding ( NLU ) tasks . With the help of HIRE , our model outperforms the baseline on 5/9 of them and advances the state-of-the-art on SST-2 dataset . Keeping the backbone Transformer model unchanged on its architecture , pre-training procedure and training objectives , we get comparable performance with other state-of-the-art models on the GLUE leaderboard , which verifies the effectiveness of the proposed HIRE enhancement over Transformer model . 2 MODEL 2.1 TRANSFORMER-BASED ENCODER . Transformer-based encoder is responsible for encoding input text into contextualized representation . Let { w1 , . . . , wn } represent a sequence of nwords of input text , Transformer-based encoder encodes the input sequence into its universal contextualized representationR ∈ Rn×d : R = Encoder ( { w1 , . . . , wn } ) ( 1 ) where d is the hidden size of the encoder and R is the output of Transformer-based encoder ’ s last layer which has the same length as the input text . We call it preliminary representation in this paper to distinguish it with the one that we introduce in section 2.2 . Here , we omit a rather extensive formulations of Transformer and refer readers to Vaswani et al . ( 2017 ) , Radford et al . ( 2018 ) and Devlin et al . ( 2019 ) for more details . 2.2 HIDDEN REPRESENTATION EXTRACTOR . Transformer-based encoder normally has many structure-identical layers stacked together , for example , BERTLARGE and XLNetLARGE all contain 24 layers of the identical structure , either outputs from these hidden layers or the last layer , but not only limited to the latter , may be extremely helpful for specific downstream task . To make full use of the representations from these hidden layers , we introduce an extra component attached to the original encoder , HIdden Representation Extractor ( HIRE ) to capture the complementary information that the output of the last layer fails to capture . Since each layer does not take the same importance to represent a certain input sequence for different downstream tasks , we design an adaptive mechanism that can compute the importance dynamically . We measure the importance by an importance score . The input to the HIRE is { H0 , . . . , Hj , . . . , Hl } where l represents the number of layers in the encoder . Here H0 is the initial embedding of input text , which is the input of the encoder ’ s first layer but is updated during training and Hj ∈ Rn×d is the hidden-state of the encoder at the output of layer j . For the sake of simplicity , we call them all hidden-state afterwards . We use the same 2-layer Bidirectional Gated Recurrent Unit ( GRU ) ( Cho et al. , 2014 ) to summarize each hidden-state of the encoder . Instead of taking the whole output of GRU as the representation of the hidden state , we concatenate GRU ’ s each layer and each direction ’ s final state together . In this way , we manage to summarize the hidden-state into a fixed-sized vector . Hence , we obtain U ∈ R ( l+1 ) ×4d with ui the summarized vector ofHi : ui = Bi-GRU ( Hi ) ∈ R4d ( 2 ) where 0 ≤ i ≤ l. Then the importance value αi for hidden-stateHi is calculated by : αi = ReLU ( W Tui + b ) ∈ R ( 3 ) whereW ∈ R4d×1 and b ∈ R are trainable parameters . Letα= { αi } be normalized into a probability distribution s through a softmax layer : s = softmax ( α ) ∈ Rl+1 ( 4 ) where si is the normalized weight of hidden-state i when computing the representation . Subsequently , we obtain the input sequence ’ s new representationA by : A = l+1∑ i=0 siHi ∈ Rn×d ( 5 ) With the same shape as the output of Transformer-based encoder ’ s final layer , HIRE ’ s output A is expected to contain the additional useful information from the encoder ’ s hidden-states and we call it complementary representation . 2.3 FUSION NETWORK . This module fuses the information contained in the output of Transformer-based encoder and the one extracted from encoders ’ hidden states by HIRE . Given the preliminary representation R , instead of letting it flow directly into task-specfic output layer , we combine it together with the complementary representationA to yieldM , defined by : M = [ R ; A ; R+A ; R ◦A ] ∈ Rn×4d ( 6 ) where ◦ is element-wise multiplication ( Hadamard Product ) and [ ; ] is concatenation across the last dimension . Later , two-layer bidirectional GRU , with the output size of d for each direction , is used to fully fuse the information contained in the preliminary representation and the complementary representation . We concatenate the outputs of the GRUs in two dimensions together for the final contextualized representation : F = Bi-GRU ( M ) ∈ Rn×2d ( 7 ) 2.4 OUTPUT LAYER . The output layer is task-specific . The following are the concerned implementation details on two tasks , classification and regression . For classification task , given the input text ’ s contextualized representation F , following Devlin et al . ( 2019 ) , we take the first row c ∈ R2d of F corresponding to the first input token ( < s > ) as the aggregated representation . Let m be the number of labels in the datasets , we pass c through a feed-forward network ( FFN ) : q =W T2 · tanh ( W T1 c+ b1 ) + b2 ∈ Rm ( 8 ) with W1 ∈ R2d×d , W2 ∈ Rd×m , b1 ∈ Rd and b2 ∈ Rm the only parameters that we introduce in output layer . Finally , the probability distribution of predicted label is computed as : p = softmax ( q ) ∈ Rm ( 9 ) For regression task , we obtain q in the same manner with m = 1 , and take q as the predicted value . 2.5 TRAINING . For classification task , the training loss to be minimized is defined by the Cross-Entropy : L ( θ ) = − 1 T T∑ i=1 log ( pi , c ) ( 10 ) where θ is the set of all parameters in the model , T is the number of examples in the dataset , pi , c is the predicted probability of gold class c for example i . For regression task , we define the training loss by mean squared error ( MSE ) : L ( θ ) = 1 T T∑ i=1 ( qi − yi ) 2 ( 11 ) where qi is the predicted value for example i and yi is the ground truth value for example i . 3 EXPERIMENTS . 3.1 DATASET . We conducted the experiments on the General Language Understanding Evaluation ( GLUE ) benchmark ( Wang et al. , 2018 ) to evaluate our proposed method . GLUE is a collection of 9 diverse datasets1 for training , evaluating , and analyzing natural language understanding models . 3.2 MAIN RESULTS . 1All the datasets can be obtained from https : //gluebenchmark.com/tasks Table 1 compares our method with a list of Transformer-based models on the development set . Model parameter comparison is shown in Table 2 . To obtain a direct and fair comparison with our baseline model RoBERTa , following the original paper ( Liu et al. , 2019c ) , we fine-tune RoBERTa+HIRE separately for each of the GLUE tasks , using only task-specific training data . The single-model results for each task are reported . We run our model with five different random seeds but the same hyperparameters and take the median value . Due to the problematic nature of WNLI dataset , we exclude its results in this table . The results shows that RoBERTa+HIRE consistently outperforms RoBERTa on 4 of the GLUE task development sets , with an improvement of 1.7 points , 0.4 points , 0.5/0.2 points , 0.3 points on CoLA , SST-2 , MNLI and QNLI respectively . And on the MRPC , STS-B and RTE task , our model get the same result as RoBERTa . It should be noted that the improvement is entirely attributed to the introduction of HIdden Representation Extractor and fusion network in our model . Table 3 presents the results of HIRE enhancement and other models on the test set that have been submitted to the GLUE leaderboard . Following Liu et al . ( 2019c ) , we fine-tune STS-B and MRPC starting from the MNLI single-task model . Given the simplicity between RTE , WNLI and MNLI , and the large-scale nature of MNLI dataset ( 393k ) , we also initialize RoBERTa+HIRE with the weights of MNLI single-task model before fine-tuning on RTE and WNLI . We submitted the ensemble-model results to the leaderboard . The results show that RoBERTa+HIRE still boosts the strong RoBERTa baseline model on the test set . To be specific , RoBERTa+HIRE outperforms RoBERTa over CoLA , SST-2 , MRPC , SST-B , MNLI-mm and QNLI with an improvement of 0.8 points , 0.4 points , 0.7/0.9 points , 0.2/0.1 points , 0.2 points and 0.1 points respectively . In the meantime , RoBERTa+HIRE gets the same results as RoBERTa on QQP and WNLI . By category , RoBERTa+HIRE has better performance than RoBERTa on the single sentence tasks , similarity and paraphrase tasks . It is worth noting that our model obtains state-of-the-art results on SST-2 dataset , with a score of 97.1 . The results are quite promising since HIRE does not modify the encoder internal architecture ( Yang et al. , 2019 ) or redefine the pre-training procedure ( Liu et al. , 2019c ) , getting the comparable results with them . | The paper proposes a method to improve the downstream performance of a pretrained Transformer on NLP tasks. The core idea is to not only use the output of the last Transformer layer for prediction, but let the model decide how to fuse the information from intermediate layers as well. To dynamically decide which intermediate layers to use depending on the input example, the model uses a mechanism conceptually similar to self-attention, which yields a normalized importance score for each layer. The importance-weighted sum then yields a complementary representation to the last layer. Lastly, another network produces a final, integrated representation from the output at the last layer and the complementary representation, which is then used for prediction. | SP:1bd140af937b949ece558c8978306e3e04d02169 |
Efficient Generalized Spherical CNNs | Many problems across computer vision and the natural sciences require the analysis of spherical data , for which representations may be learned efficiently by encoding equivariance to rotational symmetries . We present a generalized spherical CNN framework that encompasses various existing approaches and allows them to be leveraged alongside each other . The only existing non-linear spherical CNN layer that is strictly equivariant has complexity OpC2L5q , where C is a measure of representational capacity and L the spherical harmonic bandlimit . Such a high computational cost often prohibits the use of strictly equivariant spherical CNNs . We develop two new strictly equivariant layers with reduced complexity OpCL4q and OpCL3 logLq , making larger , more expressive models computationally feasible . Moreover , we adopt efficient sampling theory to achieve further computational savings . We show that these developments allow the construction of more expressive hybrid models that achieve state-of-the-art accuracy and parameter efficiency on spherical benchmark problems . 1 INTRODUCTION . Many fields involve data that live inherently on spherical manifolds , e.g . 360˝ photo and video content in virtual reality and computer vision , the cosmic microwave background radiation from the Big Bang in cosmology , topographic and gravitational maps in planetary sciences , and molecular shape orientations in molecular chemistry , to name just a few . Convolutional neural networks ( CNNs ) have been tremendously effective for data defined on Euclidean domains , such as the 1D line , 2D plane , or nD volumes , thanks in part to their translation invariance properties . However , these techniques are not effective for data defined on spherical manifolds , which have a very different geometric structure to Euclidean spaces ( see Appendix A ) . To transfer the remarkable success of deep learning to data defined on spherical domains , deep learning techniques defined inherently on the sphere are required . Recently , a number of spherical CNN constructions have been proposed . Existing CNN constructions on the sphere fall broadly into three categories : fully real ( i.e . pixel ) space approaches ( e.g . Boomsma & Frellsen , 2017 ; Jiang et al. , 2019 ; Perraudin et al. , 2019 ; Cohen et al. , 2019 ) ; combined real and harmonic space approaches ( Cohen et al. , 2018 ; Esteves et al. , 2018 ; 2020 ) ; and fully harmonic space approaches ( Kondor et al. , 2018 ) . Real space approaches can often be computed efficiently but they necessarily provide an approximate representation of spherical signals and the connection to the underlying continuous symmetries of the sphere is lost . Consequently , such approaches can not fully capture rotational equivariance . Other constructions take a combined real and harmonic space approach ( Cohen et al. , 2018 ; Esteves et al. , 2018 ; 2020 ) , where sampling theorems ( Driscoll & Healy , 1994 ; Kostelec & Rockmore , 2008 ) are exploited to connect with underlying continuous signal representations to capture the continuous symmetries of the sphere . However , in these approaches non-linear activation functions are computed pointwise in real space , which induces aliasing errors that break strict rotational equivariance . Fully harmonic space spherical CNNs have been constructed by Kondor et al . ( 2018 ) . A continual connection with underlying continuous signal representations is captured by using harmonic signal representations throughout . Consequently , this is the only approach exhibiting strict rotational equivariance . However , strict equivariance comes at great computational cost , which can often prohibit usage . ˚Corresponding author : jason.mcewen @ kagenova.com In this article we present a generalized framework for CNNs on the sphere ( and rotation group ) , which encompasses and builds on the influential approaches of Cohen et al . ( 2018 ) , Esteves et al . ( 2018 ) and Kondor et al . ( 2018 ) and allows them to be leveraged alongside each other . We adopt a harmonic signal representation in order to retain the connection with underlying continuous representations and thus capture all symmetries and geometric properties of the sphere . We construct new fully harmonic ( non-linear ) spherical layers that are strictly rotationally equivariant , are parameterefficient , and dramatically reduce computational cost compared to similar approaches . This is achieved by a channel-wise structure , constrained generalized convolutions , and an optimized degree mixing set determined by a minimum spanning tree . Furthermore , we adopt efficient sampling theorems on the sphere ( McEwen & Wiaux , 2011 ) and rotation group ( McEwen et al. , 2015a ) to improve efficiency compared to the sampling theorems used in existing approaches ( Driscoll & Healy , 1994 ; Kostelec & Rockmore , 2008 ) . We demonstrate state-of-the-art performance on all spherical benchmark problems considered , both in terms of accuracy and parameter efficiency . 2 GENERALIZED SPHERICAL CNNS . We first overview the theoretical underpinnings of the spherical CNN frameworks introduced by Cohen et al . ( 2018 ) , Esteves et al . ( 2018 ) , and Kondor et al . ( 2018 ) , which make a connection to underlying continuous signals through harmonic representations . For more in-depth treatments of the underlying harmonic analysis we recommend Esteves ( 2020 ) , Kennedy & Sadeghi ( 2013 ) and Gallier & Quaintance ( 2019 ) . We then present a generalized spherical layer in which these and other existing frameworks are encompassed , allowing existing frameworks to be easily integrated and leveraged alongside each other in hybrid networks . Throughout the following we consider a network composed of S rotationally equivariant layers Ap1q , .... , ApSq , where the i-th layer Apiq maps an input activation f pi´1q P Hpi´1q onto an output activation f piq PHpiq . We focus on the case where the network input space Hp0q consists of spherical signals ( but note that input signals on the rotation group may also be considered ) . 2.1 SIGNALS ON THE SPHERE AND ROTATION GROUP . Let L2pΩq denote the space of square-integrable functions over domain Ω . A signal f P L2pΩq on the sphere ( Ω “ S2 ) or rotation group ( Ω “ SOp3q ) can be rotated by ρ P SOp3q by defining the action of rotation on signals by Rρfpωq “ fpρ´1ωq for ω P Ω . An operator A : L2pΩ1q Ñ L2pΩ2q , where Ω1 , Ω2 P tS2 , SOp3qu , is then equivariant to rotations if RρpApfqq “ ApRρfq for all f P L2pΩ1q and ρ P SOp3q , i.e . rotating the function before application of the operator is equivalent to application of the operator first , followed by a rotation . A spherical signal f P L2pS2q admits a harmonic representation pf̂0 , f̂1 , ... , q where f̂ ` P C2 `` 1 are the harmonic coefficients given by the inner product xf , Y ` my , where Y ` m are the spherical harmonic functions of degree ` and order |m| ď ` . Likewise a signal f P L2pSOp3qq on the rotation group admits a harmonic representation pf̂0 , f̂1 , ... qwhere f̂ ` P Cp2 `` 1qˆp2 `` 1q are the harmonic coefficients with pm , nq-th entry xf , D ` mny for integers |m| , |n| ď ` , where D ` : SOp3q Ñ Cp2 `` 1qˆp2 `` 1q is the unique 2 ` ` 1 dimensional irreducible group representation of SOp3q on Cp2 `` 1q . The rotation f ÞÑ Rρf of a signal f P L2pΩq can be described in harmonic space by f̂ ` ÞÑ D ` pρqf̂ ` . A signal on the sphere or rotation group is said to be bandlimited at L if , respectively , xf , Y ` my “ 0 or xf , D ` mny “ 0 for ` ě L. Furthermore , a signal on the rotation group is said to be azimuthally bandlimited at N if , additionally , xf , D ` mny “ 0 for |n| ě N . Bandlimited signals therefore admit finite harmonic representations pf̂0 , ... , f̂L´1q . In practice real-world signals can be accurately represented by suitably bandlimited signals ; henceforth , we assume signals are bandlimited . 2.2 CONVOLUTION ON THE SPHERE AND ROTATION GROUP . A standard definition of convolution between two signals f , ψ P L2pΩq on either the sphere ( Ω “ S2 ) or rotation group ( Ω “ SOp3q ) is given by pf ‹ ψqpρq “ xf , Rρψy “ ż Ω dµpωqfpωqψ˚pρ´1ωq , ( 1 ) where dµpωq denotes the Haar measure on Ω and ¨˚ complex conjugation ( e.g . Wandelt & Górski , 2001 ; McEwen et al. , 2007 ; 2013 ; 2015b ; 2018 ; Cohen et al. , 2018 ; Esteves et al. , 2018 ) . In particular , the convolution satisfies ppRρfq ‹ ψqpρ1q “ xRρf , Rρ1ψy “ xf , Rρ´1ρ1ψy “ pRρpf ‹ ψqqpρ1q ( 2 ) and is therefore a rotationally equivariant linear operation , which we shall denote by Lpψq . The convolution of bandlimited signals can be computed exactly and efficiently in harmonic space as { pf ‹ ψq ` “ f̂ ` ψ̂ ` ˚ , ` “ 0 , ... , L´ 1 , ( 3 ) which for each degree ` is a vector outer product for signals on the sphere and a matrix product for signals on the rotation group ( see Appendix B for further details ) . Convolving in this manner results in signals on the rotation group ( for inputs on both the sphere and rotation group ) . However , in the spherical case , if the filter is invariant to azimuthal rotations the resultant convolved signal may be interpreted as a signal on the sphere ( see Appendix B ) . 2.3 GENERALIZED SIGNAL REPRESENTATIONS . The harmonic representations and convolutions described above have proven useful for describing rotationally equivariant linear operators Lpψq . Cohen et al . ( 2018 ) and Esteves et al . ( 2018 ) define spherical CNNs that sequentially apply this operator , with intermediary representations taking the form of signals on SOp3q and S2 respectively . Alternatively , for intermediary representations we now consider the more general space of signals introduced by Kondor et al . ( 2018 ) , to which the aforementioned notions of rotation and convolution naturally extend . In describing the generalization we first note from Section 2.1 that all bandlimited signals on the sphere and rotation group can be represented as a set of variable length vectors of the form f “ tf̂ ` t P C2 `` 1 : ` “ 0 , .. , L´ 1 ; t “ 1 , ... , τ ` fu , ( 4 ) where τ ` f “ 1 for signals on the sphere and τ ` f “ minp2 `` 1 , 2N ´ 1q for signals on the rotation group . The generalization is to let FL be the space of all such sets of variable length vectors , with τf unrestricted . This more general space contains the spaces of bandlimited signals on the sphere and rotation group as strict subspaces . For a generalized signal f P FL we adopt the terminology of Kondor et al . ( 2018 ) by referring to f̂ ` t as the t-th fragment of degree ` and to τf “ pτ0f , ... , τ L´1 f q , specifying the number of fragments for each degree , as the type of f . The action of rotations upon FL can be naturally extended from their action upon L2pS2q and L2pSOp3qq . For f P FL we define the rotation operator f ÞÑ Rρf by f̂ ` t ÞÑ D ` pρqf̂ ` t , allowing us to extend the usual notion of equivariance to operators A : FL Ñ FL . | The paper introduces a framework for computationally efficient and exactly rotation-equivariant spherical CNNs. The work most closely resembles the Fourier space method of Kondor et al., but improves on it in a number of ways: firstly, a channel-wise structure is introduced for the tensor product nonlinearities, which avoids the degree blowup of this operation while still allowing mixing between different harmonic degrees. Secondly, computational complexity of linear layers is reduced by factorizing it into three operators, two of which operate similar to depthwise-separable convolutions and one of which acts uniformly across channels. Thirdly, an optimized sparse degree mixing set is proposed, based on a minimum spanning tree. Finally, a more efficient sampling theorem is used that reduces the Nyquist rate by a factor of two compared to the ones used in previous works on spherical CNNs. | SP:c175800a7bed98ed75736f032d6a5a9a2f3832c0 |
Efficient Generalized Spherical CNNs | Many problems across computer vision and the natural sciences require the analysis of spherical data , for which representations may be learned efficiently by encoding equivariance to rotational symmetries . We present a generalized spherical CNN framework that encompasses various existing approaches and allows them to be leveraged alongside each other . The only existing non-linear spherical CNN layer that is strictly equivariant has complexity OpC2L5q , where C is a measure of representational capacity and L the spherical harmonic bandlimit . Such a high computational cost often prohibits the use of strictly equivariant spherical CNNs . We develop two new strictly equivariant layers with reduced complexity OpCL4q and OpCL3 logLq , making larger , more expressive models computationally feasible . Moreover , we adopt efficient sampling theory to achieve further computational savings . We show that these developments allow the construction of more expressive hybrid models that achieve state-of-the-art accuracy and parameter efficiency on spherical benchmark problems . 1 INTRODUCTION . Many fields involve data that live inherently on spherical manifolds , e.g . 360˝ photo and video content in virtual reality and computer vision , the cosmic microwave background radiation from the Big Bang in cosmology , topographic and gravitational maps in planetary sciences , and molecular shape orientations in molecular chemistry , to name just a few . Convolutional neural networks ( CNNs ) have been tremendously effective for data defined on Euclidean domains , such as the 1D line , 2D plane , or nD volumes , thanks in part to their translation invariance properties . However , these techniques are not effective for data defined on spherical manifolds , which have a very different geometric structure to Euclidean spaces ( see Appendix A ) . To transfer the remarkable success of deep learning to data defined on spherical domains , deep learning techniques defined inherently on the sphere are required . Recently , a number of spherical CNN constructions have been proposed . Existing CNN constructions on the sphere fall broadly into three categories : fully real ( i.e . pixel ) space approaches ( e.g . Boomsma & Frellsen , 2017 ; Jiang et al. , 2019 ; Perraudin et al. , 2019 ; Cohen et al. , 2019 ) ; combined real and harmonic space approaches ( Cohen et al. , 2018 ; Esteves et al. , 2018 ; 2020 ) ; and fully harmonic space approaches ( Kondor et al. , 2018 ) . Real space approaches can often be computed efficiently but they necessarily provide an approximate representation of spherical signals and the connection to the underlying continuous symmetries of the sphere is lost . Consequently , such approaches can not fully capture rotational equivariance . Other constructions take a combined real and harmonic space approach ( Cohen et al. , 2018 ; Esteves et al. , 2018 ; 2020 ) , where sampling theorems ( Driscoll & Healy , 1994 ; Kostelec & Rockmore , 2008 ) are exploited to connect with underlying continuous signal representations to capture the continuous symmetries of the sphere . However , in these approaches non-linear activation functions are computed pointwise in real space , which induces aliasing errors that break strict rotational equivariance . Fully harmonic space spherical CNNs have been constructed by Kondor et al . ( 2018 ) . A continual connection with underlying continuous signal representations is captured by using harmonic signal representations throughout . Consequently , this is the only approach exhibiting strict rotational equivariance . However , strict equivariance comes at great computational cost , which can often prohibit usage . ˚Corresponding author : jason.mcewen @ kagenova.com In this article we present a generalized framework for CNNs on the sphere ( and rotation group ) , which encompasses and builds on the influential approaches of Cohen et al . ( 2018 ) , Esteves et al . ( 2018 ) and Kondor et al . ( 2018 ) and allows them to be leveraged alongside each other . We adopt a harmonic signal representation in order to retain the connection with underlying continuous representations and thus capture all symmetries and geometric properties of the sphere . We construct new fully harmonic ( non-linear ) spherical layers that are strictly rotationally equivariant , are parameterefficient , and dramatically reduce computational cost compared to similar approaches . This is achieved by a channel-wise structure , constrained generalized convolutions , and an optimized degree mixing set determined by a minimum spanning tree . Furthermore , we adopt efficient sampling theorems on the sphere ( McEwen & Wiaux , 2011 ) and rotation group ( McEwen et al. , 2015a ) to improve efficiency compared to the sampling theorems used in existing approaches ( Driscoll & Healy , 1994 ; Kostelec & Rockmore , 2008 ) . We demonstrate state-of-the-art performance on all spherical benchmark problems considered , both in terms of accuracy and parameter efficiency . 2 GENERALIZED SPHERICAL CNNS . We first overview the theoretical underpinnings of the spherical CNN frameworks introduced by Cohen et al . ( 2018 ) , Esteves et al . ( 2018 ) , and Kondor et al . ( 2018 ) , which make a connection to underlying continuous signals through harmonic representations . For more in-depth treatments of the underlying harmonic analysis we recommend Esteves ( 2020 ) , Kennedy & Sadeghi ( 2013 ) and Gallier & Quaintance ( 2019 ) . We then present a generalized spherical layer in which these and other existing frameworks are encompassed , allowing existing frameworks to be easily integrated and leveraged alongside each other in hybrid networks . Throughout the following we consider a network composed of S rotationally equivariant layers Ap1q , .... , ApSq , where the i-th layer Apiq maps an input activation f pi´1q P Hpi´1q onto an output activation f piq PHpiq . We focus on the case where the network input space Hp0q consists of spherical signals ( but note that input signals on the rotation group may also be considered ) . 2.1 SIGNALS ON THE SPHERE AND ROTATION GROUP . Let L2pΩq denote the space of square-integrable functions over domain Ω . A signal f P L2pΩq on the sphere ( Ω “ S2 ) or rotation group ( Ω “ SOp3q ) can be rotated by ρ P SOp3q by defining the action of rotation on signals by Rρfpωq “ fpρ´1ωq for ω P Ω . An operator A : L2pΩ1q Ñ L2pΩ2q , where Ω1 , Ω2 P tS2 , SOp3qu , is then equivariant to rotations if RρpApfqq “ ApRρfq for all f P L2pΩ1q and ρ P SOp3q , i.e . rotating the function before application of the operator is equivalent to application of the operator first , followed by a rotation . A spherical signal f P L2pS2q admits a harmonic representation pf̂0 , f̂1 , ... , q where f̂ ` P C2 `` 1 are the harmonic coefficients given by the inner product xf , Y ` my , where Y ` m are the spherical harmonic functions of degree ` and order |m| ď ` . Likewise a signal f P L2pSOp3qq on the rotation group admits a harmonic representation pf̂0 , f̂1 , ... qwhere f̂ ` P Cp2 `` 1qˆp2 `` 1q are the harmonic coefficients with pm , nq-th entry xf , D ` mny for integers |m| , |n| ď ` , where D ` : SOp3q Ñ Cp2 `` 1qˆp2 `` 1q is the unique 2 ` ` 1 dimensional irreducible group representation of SOp3q on Cp2 `` 1q . The rotation f ÞÑ Rρf of a signal f P L2pΩq can be described in harmonic space by f̂ ` ÞÑ D ` pρqf̂ ` . A signal on the sphere or rotation group is said to be bandlimited at L if , respectively , xf , Y ` my “ 0 or xf , D ` mny “ 0 for ` ě L. Furthermore , a signal on the rotation group is said to be azimuthally bandlimited at N if , additionally , xf , D ` mny “ 0 for |n| ě N . Bandlimited signals therefore admit finite harmonic representations pf̂0 , ... , f̂L´1q . In practice real-world signals can be accurately represented by suitably bandlimited signals ; henceforth , we assume signals are bandlimited . 2.2 CONVOLUTION ON THE SPHERE AND ROTATION GROUP . A standard definition of convolution between two signals f , ψ P L2pΩq on either the sphere ( Ω “ S2 ) or rotation group ( Ω “ SOp3q ) is given by pf ‹ ψqpρq “ xf , Rρψy “ ż Ω dµpωqfpωqψ˚pρ´1ωq , ( 1 ) where dµpωq denotes the Haar measure on Ω and ¨˚ complex conjugation ( e.g . Wandelt & Górski , 2001 ; McEwen et al. , 2007 ; 2013 ; 2015b ; 2018 ; Cohen et al. , 2018 ; Esteves et al. , 2018 ) . In particular , the convolution satisfies ppRρfq ‹ ψqpρ1q “ xRρf , Rρ1ψy “ xf , Rρ´1ρ1ψy “ pRρpf ‹ ψqqpρ1q ( 2 ) and is therefore a rotationally equivariant linear operation , which we shall denote by Lpψq . The convolution of bandlimited signals can be computed exactly and efficiently in harmonic space as { pf ‹ ψq ` “ f̂ ` ψ̂ ` ˚ , ` “ 0 , ... , L´ 1 , ( 3 ) which for each degree ` is a vector outer product for signals on the sphere and a matrix product for signals on the rotation group ( see Appendix B for further details ) . Convolving in this manner results in signals on the rotation group ( for inputs on both the sphere and rotation group ) . However , in the spherical case , if the filter is invariant to azimuthal rotations the resultant convolved signal may be interpreted as a signal on the sphere ( see Appendix B ) . 2.3 GENERALIZED SIGNAL REPRESENTATIONS . The harmonic representations and convolutions described above have proven useful for describing rotationally equivariant linear operators Lpψq . Cohen et al . ( 2018 ) and Esteves et al . ( 2018 ) define spherical CNNs that sequentially apply this operator , with intermediary representations taking the form of signals on SOp3q and S2 respectively . Alternatively , for intermediary representations we now consider the more general space of signals introduced by Kondor et al . ( 2018 ) , to which the aforementioned notions of rotation and convolution naturally extend . In describing the generalization we first note from Section 2.1 that all bandlimited signals on the sphere and rotation group can be represented as a set of variable length vectors of the form f “ tf̂ ` t P C2 `` 1 : ` “ 0 , .. , L´ 1 ; t “ 1 , ... , τ ` fu , ( 4 ) where τ ` f “ 1 for signals on the sphere and τ ` f “ minp2 `` 1 , 2N ´ 1q for signals on the rotation group . The generalization is to let FL be the space of all such sets of variable length vectors , with τf unrestricted . This more general space contains the spaces of bandlimited signals on the sphere and rotation group as strict subspaces . For a generalized signal f P FL we adopt the terminology of Kondor et al . ( 2018 ) by referring to f̂ ` t as the t-th fragment of degree ` and to τf “ pτ0f , ... , τ L´1 f q , specifying the number of fragments for each degree , as the type of f . The action of rotations upon FL can be naturally extended from their action upon L2pS2q and L2pSOp3qq . For f P FL we define the rotation operator f ÞÑ Rρf by f̂ ` t ÞÑ D ` pρqf̂ ` t , allowing us to extend the usual notion of equivariance to operators A : FL Ñ FL . | This paper introduces a generalized spherical convolution operation that is strictly equivariant to rotation. The authors show that the spherical convolution operations introduced in prior works can be encompassed by the proposed approach. Because spherical convolutions introduce significant computational overhead, the authors also introduce an array of methods that reduce the computational cost while maintaining the model accuracy. Experiment results on multiple benchmark datasets show that the proposed approach outperforms the alternative approaches while having less number of parameters. | SP:c175800a7bed98ed75736f032d6a5a9a2f3832c0 |
Heating up decision boundaries: isocapacitory saturation, adversarial scenarios and generalization bounds | 1 INTRODUCTION AND BACKGROUND . The endeavor to understand certain geometric aspects of decision problems has lead to intense research in statistical learning . These range from the study of data manifolds , through landscapes of loss functions to the delicate analysis of a classifier ’ s decision boundary . In the present work we focus on the latter . So far , a wealth of studies has analyzed the geometry of decision boundaries of deep neural networks ( DNN ) , reaching profound implications in the fields of adversarial machine learning ( adversarial examples ) , robustness , margin analysis and generalization . Inspired by recent isoperimetric results and curvature estimates ( Ford et al . ( 2019 ) ; Moosavi-Dezfooli et al . ( 2019 ) ; Fawzi et al . ( 2016 ) ) , we attempt to provide some new aspects of decision boundary analysis by introducing and studying a corresponding diffusion-inspired approach . In this note the guiding idea is to place a heat source at the classifier ’ s decision boundary and estimate its size/shape in terms of the amount of heat the boundary is able to emit within a given time ( Fig . 1 ) . The goal is to extract geometric information from the behavior of heat transmission . This technique of heat content seems well-known within capacity/potential theory and has led to a variety of results in spectral analysis relating heat diffusion and geometry , Jorgenson & Lang ( 2001 ) ; Grigor ’ Yan & Saloff-Coste ( 2002 ) ; Maz ’ ya ( 2011 ) . However , working with such heat diffusion directly in terms of the corresponding differential equations is impractical . To this end , we note that , due to Feynman-Kac duality , the heat estimates are convertible to Brownian motion hitting probabilities . Thus we circumvent the need for solving intractable differential equations and instead are able to employ a straightforward Monte-Carlo sampling scheme in the ambient data space ( Section 3 ) . Background on defense training We apply the above analysis in the context of adversarial machine learning ( Section 4 ) where one studies the interaction between an adversary and a ML system . One of the goals of the subject is to design attack/defense training strategies improving the robustness of a given ML model - in the present work we are interested in how adversarial/noise defense training are reflected geometrically . Many different metrics to estimate robustness have been proposed : on one hand , there is adversarial robustness ( the probability that error samples lie very near a given data point x ) ; on the other hand , there is corruption robustness ( the probability of getting an error sample after perturbing a given data point x with some specified noise ) . In our context , heat diffusion naturally suggests a capacitory robustness metric : this metric is built upon the probability that Brownian motion started at a given data point x will hit error samples within a given time window . One can perceive this metric as a combination of adversarial and noise robustness ( Brownian motion has continuous paths and specified stopping time determined by boundary impact ) . In this perspective , our work is aligned with studies of other robustness metrics and curvature results ( cf . Fawzi et al . ( 2016 ) for a `` semi-random '' projection robustness and relations to curvature ) . We study the capacitory metric on the well-known CIFAR10 and MNIST datasets and observe that defense training techniques may either yield a certain ( although not substantial ) decrease ( noise training ) or fail to have a significant effect on continuous Brownian attacks overall . Surprisingly , in both cases the studied capacitory metric does not converge to the corresponding value as in the case of a flat decision boundary . Due to our comparison statements and curvature considerations , this means that locally around clean data points the geometry is in general flattened out but may still retain complexity and substantial areas of ( small ) non-vanishing curvature . In other words , from the point of view of our heat diffusion metrics , decision boundaries locally exhibit non-flat behaviour . Background on generalization estimates Finally , we observe that the collected heat/hittingprobability metrics can further be used to obtain generalization bounds where , in a nutshell , one evaluates the performance of a model on unseen data in terms of the performance over a given sampled data , the model ’ s expressiveness , dimension , etc . In this regard , we view decision boundary heat diffusion traits as an indicator of how noise-stable a given model is - this relates Brownian hitting bounds with recent compression-based generalization techniques in the spirit of Arora et al . ( 2018 ) ; Suzuki et al . ( 2018 ; 2020 ) . More precisely , we proceed in two steps : first , we construct a `` smaller '' compressed model that is almost equivalent to the initial one in an appropriate heat-theoretic way ; second , we obtain generalization estimates for the smaller model in terms of the decision boundary hitting probabilities ( computed on the empirical dataset ) . Furthermore , the bounds are significantly improved under additional geometric assumptions on the decision boundary of the initial model . Additional related work The interplay between heat diffusion and geometry lies at the heart of many topics in geometric analysis and spectral theory ( cf . Jorgenson & Lang ( 2001 ) ; Grigor ’ Yan ( 2001 ) for a far reaching overview ) . Some direct applications of heat diffusion techniques to zero sets of eigenfunctions are seen , for example , in Steinerberger ( 2014 ) ; Georgiev & Mukherjee ( 2018a ; b ) . The literature on adversarial ML is vast : to name a few central works in the field , we refer to Dalvi et al . ( 2004 ) ; Biggio & Roli ( 2018 ) ; Szegedy et al . ( 2014 ) . Much effort has been invested in designing and understanding strategies that will render a model robust to various attacks ( e.g . Madry et al . ( 2018 ) ; Carlini & Wagner ( 2017 ) ) . In particular , the geometry of decision boundaries has been the focus of many works in the subject leading to breakthroughs in curvature estimates , boundary flatness and robustness , schemes for detecting boundary complexity , proposing adversarial attacks/defenses and diffusion based techniques towards constructing decision boundary from partially pre-labelled data ( e.g . Ford et al . ( 2019 ) ; Fawzi et al . ( 2016 ; 2017 ; 2018 ) ; Dezfooli et al . ( 2018 ) ; Moosavi-Dezfooli et al . ( 2019 ) ; Karimi et al . ( 2019 ) ; Karimi & Tang ( 2020 ) ; He et al . ( 2018 ) ; Szlam et al . ( 2008 ) ) . The theory of generalization bounds has formed a classical main line of ML and statistical inference research ( Vapnik ( 1999 ) ) . In this direction central questions address the generalization properties of heavily over-parametrized deep neural network models . According to some classical VC-dimension results such models should overfit the data and generalize poorly . Extensive research effort has been invested in developing appropriate sharper techniques to explain generalization of DNN models : on one hand there are the methods based on norm estimation whose bounds are not explicitly using the number of the network ’ s parameters ( see Golowich et al . ( 2019 ) ; Neyshabur et al . ( 2015 ; 2018 ) ; Wei & Ma ( 2019 ) ; Bartlett et al . ( 2017 ) , etc ) . On the other hand , recent results based on compression and VC-dimension can lead to sharper bounds ( Arora et al . ( 2018 ) ; Suzuki et al . ( 2018 ; 2020 ) ) . 2 CONTRIBUTIONS , CONTEXT AND PAPER OUTLINE . An outline of our essential contributions is given as follows : 1 . We analyze decision boundary geometries in terms of novel heat diffusion and Brownian motion techniques with thorough theoretical estimates on curvature and flattening . 2 . We show , both theoretically and empirically ( in terms of adversarial scenarios on stateof-art DNN models ) , that the proposed heat diffusion metrics detect the curvature of the boundary ; they complement , and in some respects are more sensitive in comparison to previous methods of boundary analysis - intuitively , our heat driven metrics are sharper on a finer scale and can detect small-scale `` wiggles and pockets '' . As an application , we are thus able to provide evidence that adversarial defenses lead to overall flatter boundaries but , surprisingly , the heat traits do not converge to the corresponding flat-case , and hence , finer-scale non-linear characteristics ( e.g . `` wiggles and pockets '' ) are persistent . 3 . Moreover , the preservation of `` wiggles and pockets '' means that susceptibility to naive Brownian motion attacks is not significantly decreased via adversarial defense mechanisms . 4 . Finally , we introduce a novel notion of compression based on heat diffusion and prove that stability of heat signature translates to compression properties and generalization capabilities . In terms of context , the present note is well-aligned with works such as Ford et al . ( 2019 ) ; Dezfooli et al . ( 2018 ) ; Fawzi et al . ( 2016 ; 2018 ) . Among other aspects , these works provide substantial analysis of the interplay between geometry/curvature and adversarial robustness/defenses - in particular , we use some of the these tools ( e.g . isoperimetric saturation ) as benchmarks and sanity checks . However , in contrast , in our work we provide a non-equivalent technique to address decision boundary geometry for which we provide an extensive theoretical and empirical evaluation with insights on the preservation of finer-scale traits . Intuitively , previous distance-based geometric methods could be considered as a `` coarser lens '' , whereas the present heat-diffusion tools appear to be much more sensitive . As a large-scale example , Brownian particles emanating from a point are able to distinguish between a decision boundary which is a hyperplane at distance d and a decision boundary which is a cylinder of radius d wrapping around the point . Our notion of compression is inspired by Arora et al . ( 2018 ) , and establishes a connection between the Johnson-Lindenstrauss dimension reduction algorithm with diffusion techniques . Furthermore , we bridge the proposed heat-theoretic techniques with generalization bounds in the spirit of Arora et al . ( 2018 ) ; Suzuki et al . ( 2020 ) . In particular , this shows that overall lower heat quantities at sample points imply better generalization traits . A step-wise road map of the present work is given below : • ( Subsection 3.1 ) We start by discussing what heat diffusion is and how it is to be evaluated - here we discuss that , via Feynman-Kac duality , one can essentially work with Brownian motion hitting probabilities . • ( Subsections 3.2 and 3.3 ) We introduce the isocapacitory saturation τ - a heat-theoretic metric that will be used to estimate boundary flatness . Moreover , here we emphasize the properties of τ such as relations to curvature ( Proposition 3.1 ) and the novel information obtained from heat theoretic methods in comparison to previous distance-based ones . • ( Subsection 3.4 ) We compute τ for certain geometric model cases such as hyperplanes , cones , wedges and `` spiky '' sets ( Lemmas 3.2 and 3.3 ) . This allows us later to evaluate how much a given geometry resembles these model cases . • ( Section 4 ) Next , we are in a position to evaluate and compare τ for decision boundaries of DNNs . We experimentally illustrate the effect of adversarial defense mechanisms and noise robustness on τ ( PGD/FGSM on MNIST and CIFAR-10 ) . • ( Section 5 ) We prove that heat transmission relates to generalization bounds ( Propositions 5.1 and 5.2 ) - in particular , lower levels of heat at sample points yield sharper generalization bounds . Finally , we complete the discussion by informally stating our compression scheme . • ( Appendix ) Our methods leverage several tool sets extensively . For this reason our goal in the main text is to only collect and showcase the techniques and results . However , the thorough in-depth analysis is provided in the Appendix where the reader can find all relevant proofs and further background and references . | The paper proposes an isocapacitory measure for analysing decision bound, in a way complementing the isoperimetric analysis proposed by Ford et al. 2019. The authors showed that the new measure captures different geometric properties of the decision boundary, potentially useful for adversarial training. The paper also proposed a new generalisation bound, although did not compare with other generalisation bounds. | SP:b76fa33429ee938e18037ddb4df37d2da952d566 |
Heating up decision boundaries: isocapacitory saturation, adversarial scenarios and generalization bounds | 1 INTRODUCTION AND BACKGROUND . The endeavor to understand certain geometric aspects of decision problems has lead to intense research in statistical learning . These range from the study of data manifolds , through landscapes of loss functions to the delicate analysis of a classifier ’ s decision boundary . In the present work we focus on the latter . So far , a wealth of studies has analyzed the geometry of decision boundaries of deep neural networks ( DNN ) , reaching profound implications in the fields of adversarial machine learning ( adversarial examples ) , robustness , margin analysis and generalization . Inspired by recent isoperimetric results and curvature estimates ( Ford et al . ( 2019 ) ; Moosavi-Dezfooli et al . ( 2019 ) ; Fawzi et al . ( 2016 ) ) , we attempt to provide some new aspects of decision boundary analysis by introducing and studying a corresponding diffusion-inspired approach . In this note the guiding idea is to place a heat source at the classifier ’ s decision boundary and estimate its size/shape in terms of the amount of heat the boundary is able to emit within a given time ( Fig . 1 ) . The goal is to extract geometric information from the behavior of heat transmission . This technique of heat content seems well-known within capacity/potential theory and has led to a variety of results in spectral analysis relating heat diffusion and geometry , Jorgenson & Lang ( 2001 ) ; Grigor ’ Yan & Saloff-Coste ( 2002 ) ; Maz ’ ya ( 2011 ) . However , working with such heat diffusion directly in terms of the corresponding differential equations is impractical . To this end , we note that , due to Feynman-Kac duality , the heat estimates are convertible to Brownian motion hitting probabilities . Thus we circumvent the need for solving intractable differential equations and instead are able to employ a straightforward Monte-Carlo sampling scheme in the ambient data space ( Section 3 ) . Background on defense training We apply the above analysis in the context of adversarial machine learning ( Section 4 ) where one studies the interaction between an adversary and a ML system . One of the goals of the subject is to design attack/defense training strategies improving the robustness of a given ML model - in the present work we are interested in how adversarial/noise defense training are reflected geometrically . Many different metrics to estimate robustness have been proposed : on one hand , there is adversarial robustness ( the probability that error samples lie very near a given data point x ) ; on the other hand , there is corruption robustness ( the probability of getting an error sample after perturbing a given data point x with some specified noise ) . In our context , heat diffusion naturally suggests a capacitory robustness metric : this metric is built upon the probability that Brownian motion started at a given data point x will hit error samples within a given time window . One can perceive this metric as a combination of adversarial and noise robustness ( Brownian motion has continuous paths and specified stopping time determined by boundary impact ) . In this perspective , our work is aligned with studies of other robustness metrics and curvature results ( cf . Fawzi et al . ( 2016 ) for a `` semi-random '' projection robustness and relations to curvature ) . We study the capacitory metric on the well-known CIFAR10 and MNIST datasets and observe that defense training techniques may either yield a certain ( although not substantial ) decrease ( noise training ) or fail to have a significant effect on continuous Brownian attacks overall . Surprisingly , in both cases the studied capacitory metric does not converge to the corresponding value as in the case of a flat decision boundary . Due to our comparison statements and curvature considerations , this means that locally around clean data points the geometry is in general flattened out but may still retain complexity and substantial areas of ( small ) non-vanishing curvature . In other words , from the point of view of our heat diffusion metrics , decision boundaries locally exhibit non-flat behaviour . Background on generalization estimates Finally , we observe that the collected heat/hittingprobability metrics can further be used to obtain generalization bounds where , in a nutshell , one evaluates the performance of a model on unseen data in terms of the performance over a given sampled data , the model ’ s expressiveness , dimension , etc . In this regard , we view decision boundary heat diffusion traits as an indicator of how noise-stable a given model is - this relates Brownian hitting bounds with recent compression-based generalization techniques in the spirit of Arora et al . ( 2018 ) ; Suzuki et al . ( 2018 ; 2020 ) . More precisely , we proceed in two steps : first , we construct a `` smaller '' compressed model that is almost equivalent to the initial one in an appropriate heat-theoretic way ; second , we obtain generalization estimates for the smaller model in terms of the decision boundary hitting probabilities ( computed on the empirical dataset ) . Furthermore , the bounds are significantly improved under additional geometric assumptions on the decision boundary of the initial model . Additional related work The interplay between heat diffusion and geometry lies at the heart of many topics in geometric analysis and spectral theory ( cf . Jorgenson & Lang ( 2001 ) ; Grigor ’ Yan ( 2001 ) for a far reaching overview ) . Some direct applications of heat diffusion techniques to zero sets of eigenfunctions are seen , for example , in Steinerberger ( 2014 ) ; Georgiev & Mukherjee ( 2018a ; b ) . The literature on adversarial ML is vast : to name a few central works in the field , we refer to Dalvi et al . ( 2004 ) ; Biggio & Roli ( 2018 ) ; Szegedy et al . ( 2014 ) . Much effort has been invested in designing and understanding strategies that will render a model robust to various attacks ( e.g . Madry et al . ( 2018 ) ; Carlini & Wagner ( 2017 ) ) . In particular , the geometry of decision boundaries has been the focus of many works in the subject leading to breakthroughs in curvature estimates , boundary flatness and robustness , schemes for detecting boundary complexity , proposing adversarial attacks/defenses and diffusion based techniques towards constructing decision boundary from partially pre-labelled data ( e.g . Ford et al . ( 2019 ) ; Fawzi et al . ( 2016 ; 2017 ; 2018 ) ; Dezfooli et al . ( 2018 ) ; Moosavi-Dezfooli et al . ( 2019 ) ; Karimi et al . ( 2019 ) ; Karimi & Tang ( 2020 ) ; He et al . ( 2018 ) ; Szlam et al . ( 2008 ) ) . The theory of generalization bounds has formed a classical main line of ML and statistical inference research ( Vapnik ( 1999 ) ) . In this direction central questions address the generalization properties of heavily over-parametrized deep neural network models . According to some classical VC-dimension results such models should overfit the data and generalize poorly . Extensive research effort has been invested in developing appropriate sharper techniques to explain generalization of DNN models : on one hand there are the methods based on norm estimation whose bounds are not explicitly using the number of the network ’ s parameters ( see Golowich et al . ( 2019 ) ; Neyshabur et al . ( 2015 ; 2018 ) ; Wei & Ma ( 2019 ) ; Bartlett et al . ( 2017 ) , etc ) . On the other hand , recent results based on compression and VC-dimension can lead to sharper bounds ( Arora et al . ( 2018 ) ; Suzuki et al . ( 2018 ; 2020 ) ) . 2 CONTRIBUTIONS , CONTEXT AND PAPER OUTLINE . An outline of our essential contributions is given as follows : 1 . We analyze decision boundary geometries in terms of novel heat diffusion and Brownian motion techniques with thorough theoretical estimates on curvature and flattening . 2 . We show , both theoretically and empirically ( in terms of adversarial scenarios on stateof-art DNN models ) , that the proposed heat diffusion metrics detect the curvature of the boundary ; they complement , and in some respects are more sensitive in comparison to previous methods of boundary analysis - intuitively , our heat driven metrics are sharper on a finer scale and can detect small-scale `` wiggles and pockets '' . As an application , we are thus able to provide evidence that adversarial defenses lead to overall flatter boundaries but , surprisingly , the heat traits do not converge to the corresponding flat-case , and hence , finer-scale non-linear characteristics ( e.g . `` wiggles and pockets '' ) are persistent . 3 . Moreover , the preservation of `` wiggles and pockets '' means that susceptibility to naive Brownian motion attacks is not significantly decreased via adversarial defense mechanisms . 4 . Finally , we introduce a novel notion of compression based on heat diffusion and prove that stability of heat signature translates to compression properties and generalization capabilities . In terms of context , the present note is well-aligned with works such as Ford et al . ( 2019 ) ; Dezfooli et al . ( 2018 ) ; Fawzi et al . ( 2016 ; 2018 ) . Among other aspects , these works provide substantial analysis of the interplay between geometry/curvature and adversarial robustness/defenses - in particular , we use some of the these tools ( e.g . isoperimetric saturation ) as benchmarks and sanity checks . However , in contrast , in our work we provide a non-equivalent technique to address decision boundary geometry for which we provide an extensive theoretical and empirical evaluation with insights on the preservation of finer-scale traits . Intuitively , previous distance-based geometric methods could be considered as a `` coarser lens '' , whereas the present heat-diffusion tools appear to be much more sensitive . As a large-scale example , Brownian particles emanating from a point are able to distinguish between a decision boundary which is a hyperplane at distance d and a decision boundary which is a cylinder of radius d wrapping around the point . Our notion of compression is inspired by Arora et al . ( 2018 ) , and establishes a connection between the Johnson-Lindenstrauss dimension reduction algorithm with diffusion techniques . Furthermore , we bridge the proposed heat-theoretic techniques with generalization bounds in the spirit of Arora et al . ( 2018 ) ; Suzuki et al . ( 2020 ) . In particular , this shows that overall lower heat quantities at sample points imply better generalization traits . A step-wise road map of the present work is given below : • ( Subsection 3.1 ) We start by discussing what heat diffusion is and how it is to be evaluated - here we discuss that , via Feynman-Kac duality , one can essentially work with Brownian motion hitting probabilities . • ( Subsections 3.2 and 3.3 ) We introduce the isocapacitory saturation τ - a heat-theoretic metric that will be used to estimate boundary flatness . Moreover , here we emphasize the properties of τ such as relations to curvature ( Proposition 3.1 ) and the novel information obtained from heat theoretic methods in comparison to previous distance-based ones . • ( Subsection 3.4 ) We compute τ for certain geometric model cases such as hyperplanes , cones , wedges and `` spiky '' sets ( Lemmas 3.2 and 3.3 ) . This allows us later to evaluate how much a given geometry resembles these model cases . • ( Section 4 ) Next , we are in a position to evaluate and compare τ for decision boundaries of DNNs . We experimentally illustrate the effect of adversarial defense mechanisms and noise robustness on τ ( PGD/FGSM on MNIST and CIFAR-10 ) . • ( Section 5 ) We prove that heat transmission relates to generalization bounds ( Propositions 5.1 and 5.2 ) - in particular , lower levels of heat at sample points yield sharper generalization bounds . Finally , we complete the discussion by informally stating our compression scheme . • ( Appendix ) Our methods leverage several tool sets extensively . For this reason our goal in the main text is to only collect and showcase the techniques and results . However , the thorough in-depth analysis is provided in the Appendix where the reader can find all relevant proofs and further background and references . | The paper under review introduces a number of geometric measures (isoperimetric, isocapacitory ratios that relate to Brownian motion or heat diffusion probabilities) that are applied to study neural network decision boundaries locally. Specifically, the studies applying the measures to study adversarially trained NN empirically, and there are generalization and network compression bounds analytically proven that are derived that relate to Brownian motion probabilities. Empirical observations on LeNet and Wide ResNet trained on MNIST and CIFAR showed adversarially trained or noise trained networks did exhibit curvature of the decision boundary, showing finer structure than previously known. | SP:b76fa33429ee938e18037ddb4df37d2da952d566 |
A Gradient Flow Framework For Analyzing Network Pruning | 1 INTRODUCTION . The use of Deep Neural Networks ( DNNs ) in intelligent edge systems has been enabled by extensive research on model compression . “ Pruning ” techniques are commonly used to remove “ unimportant ” filters to either preserve or promote specific , desirable model properties . Most pruning methods were originally designed to compress trained models , with the goal of reducing inference costs only . For example , Li et al . ( 2017 ) ; He et al . ( 2018 ) proposed to remove filters with small ` 1/ ` 2 norm , thus ensuring minimal change in model output . Molchanov et al . ( 2017 ; 2019 ) ; Theis et al . ( 2018 ) proposed to preserve the loss of a model , generally using Taylor expansions around a filter ’ s parameters to estimate change in loss as a function of its removal . Recent works focus on pruning models at initialization ( Lee et al . ( 2019 ; 2020 ) ) or after minimal training ( You et al . ( 2020 ) ) , thus enabling reduction in both inference and training costs . To estimate the impact of removing a parameter , these methods use the same importance measures as designed for pruning trained models . Since such measures focus on preserving model outputs or loss , Wang et al . ( 2020 ) argue they are not well-motivated for pruning models early-on in training . However , in this paper , we demonstrate that if the relationship between importance measures used for pruning trained models and the evolution of model parameters is established , their use early-on in training can be better justified . In particular , we employ gradient flow1 to develop a general framework that relates state-of-theart importance measures used in network pruning through the norm of model parameters . This framework establishes the relationship between regularly used importance measures and the evolution of a model ’ s parameters , thus demonstrating why measures designed to prune trained models also 1gradient flow refers to gradient descent with infinitesimal learning rate ; see Equation 6 for a short primer . perform well early-on in training . More generally , our framework enables better understanding of what properties make a parameter dispensable according to a particular importance measure . Our findings follow . ( i ) Magnitude-based pruning measures remove parameters that contribute least to reduction in loss . This enables magnitude-based pruned models to achieve faster convergence than magnitude-agnostic measures . ( ii ) Loss-preservation based measures remove parameters with the least tendency to change , thus preserving first-order model evolution dynamics . This shows the use of loss-preservation is justified for pruning models early-on in training as well . ( iii ) Gradient-norm based pruning is linearly related to second-order model evolution dynamics . Increasing gradient norm via pruning for even slightly trained models can permanently damage earlier layers , producing poorly performing architectures . This behavior is a result of aggressively pruning filters that maximally increase model loss . We validate our claims on several VGG-13 , MobileNet-V1 , and ResNet-56 models trained on CIFAR-10 and CIFAR-100 . 2 RELATED WORK . Several pruning frameworks define importance measures to estimate the impact of removing a parameter . Most popular importance measures are based on parameter magnitude ( Li et al . ( 2017 ) ; He et al . ( 2018 ) ; Liu et al . ( 2017 ) ) or loss preservation ( Molchanov et al . ( 2019 ; 2017 ) ; Theis et al . ( 2018 ) ; Gao et al . ( 2019 ) ) . Recent works show that using these measures , models pruned at initialization ( Lee et al . ( 2019 ) ; Wang et al . ( 2020 ) ; Hayou et al . ( 2021 ) ) or after minimal training ( You et al . ( 2020 ) ) achieve final performance similar to the original networks . Since measures for pruning trained models are motivated by output or loss preservation , Wang et al . ( 2020 ) argue they may not be well suited for pruning models early-on in training . They thus propose GraSP , a measure that promotes preservation of parameters that increase the gradient norm . Despite its success , the foundations of network pruning are not well understood . Recent work has shown that good “ subnetworks ” that achieve similar performance to the original network exist within both trained ( Ye et al . ( 2020 ) ) and untrained models ( Frankle & Carbin ( 2019 ) ; Malach et al . ( 2020 ) ; Pensia et al . ( 2020 ) ) . These works thus prove networks can be pruned without loss in performance , but do not indicate how a network should be pruned , i.e , which importance measures are preferable . In fact , Liu et al . ( 2019 ) show reinitializing pruned models before retraining rarely affects their performance , indicating the consequential differences among importance measures are in the properties of architectures they produce . Since different importance measures perform differently ( see Appendix E ) , analyzing popular measures to determine which model properties they tend to preserve can reveal which measures lead to better-performing architectures . From an implementation standpoint , pruning approaches can be placed in two categories . The first , structured pruning ( Li et al . ( 2017 ) ; He et al . ( 2018 ) ; Liu et al . ( 2017 ) ; Molchanov et al . ( 2019 ; 2017 ) ; Gao et al . ( 2019 ) ) , removes entire filters , thus preserving structural regularity and directly improving execution efficiency on commodity hardware platforms . The second , unstructured pruning ( Han et al . ( 2016b ) ; LeCun et al . ( 1990 ) ; Hassibi & Stork ( 1993 ) ) , is more fine-grained , operating at the level of individual parameters instead of filters . Unstructured pruning has recently been used to reduce computational complexity as well , but requires specially designed hardware ( Han et al . ( 2016a ) ) or software ( Elsen et al . ( 2020 ) ) that are capable of accelerating sparse operations . By clarifying benefits and pitfalls of popular importance measures , our work aims to ensure practitioners are better able to make informed choices for reducing DNN training/inference expenditure via network pruning . Thus , while results in this paper are applicable in both structured and unstructured settings , our experimental evaluation primarily focuses on structured pruning early-on in training . Results on unstructured pruning are relegated to Appendix H . 3 PRELIMINARIES : CLASSES OF STANDARD IMPORTANCE MEASURES . In this section , we review the most successful classes of importance measures for network pruning . These measures will be our focus in subsequent sections . We use bold symbols to denote vectors and italicize scalar variables . Consider a model that is parameterized as Θ ( t ) at time t. We denote the gradient of the loss with respect to model parameters at time t as g ( Θ ( t ) ) , the Hessian as H ( Θ ( t ) ) , and the model loss as L ( Θ ( t ) ) . A general model parameter is denoted as θ ( t ) . The importance of a set of parameters Θp ( t ) is denoted as I ( Θp ( t ) ) . Magnitude-based measures : Both ` 1 norm ( Li et al . ( 2017 ) ) and ` 2 norm ( He et al . ( 2018 ) ) have been successfully used as magnitude-focused importance measures and generally perform equally well . Due to its differentiability , ` 2 norm can be analyzed using gradient flow and will be our focus in the following sections . I ( Θp ( t ) ) = ‖Θp ( t ) ‖22 = ∑ θi∈Θp ( θi ( t ) ) 2 . ( 1 ) Loss-preservation based measures : These measures generally use a first-order Taylor decomposition to determine the impact removing a set of parameters has on model loss . Most recent methods ( Molchanov et al . ( 2019 ; 2017 ) ; Ding et al . ( 2019 ) ; Theis et al . ( 2018 ) ) for pruning trained models are variants of this method , often using additional heuristics to improve their performance . L ( Θ ( t ) −Θp ( t ) ) − L ( Θ ( t ) ) ≈ −ΘTp ( t ) g ( Θ ( t ) ) . ( 2 ) The equation above implies that the loss of a pruned model is higher ( lower ) than the original model if parameters with a negative ( positive ) value for ΘTp ( t ) g ( Θ ( t ) ) are removed . Thus , for preserving model loss , the following importance score should be used . I ( Θp ( t ) ) = ∣∣ΘTp ( t ) g ( Θ ( t ) ) ∣∣ . ( 3 ) Increase in gradient-norm based measures : Wang et al . ( 2020 ) argue loss-preservation based methods are not well-motivated for pruning models early-on in training . They thus propose GraSP , an importance measure that prunes parameters whose removal increases the gradient norm and can enable fast convergence for a pruned model . ‖g ( Θ ( t ) −Θp ( t ) ) ‖22 − ‖g ( Θ ( t ) ) ‖ 2 2 ≈ −2Θ T p ( t ) H ( Θ ( t ) ) g ( Θ ( t ) ) . ( 4 ) The above equation implies that the gradient norm of a pruned model is higher than the original model if parameters with a negative value for ΘTp ( t ) H ( Θ ( t ) ) g ( Θ ( t ) ) are removed . This results in the following importance score . I ( Θp ( t ) ) = Θ T p ( t ) H ( Θ ( t ) ) g ( Θ ( t ) ) . ( 5 ) As mentioned before , these importance measures were introduced for pruning trained models ( except for GraSP ) , but are also used for pruning models early-on in training . In the following sections , we revisit the original goals for these measures , establish their relationship with evolution of model parameters over time , and provide clear justifications for their use early-on in training . 4 GRADIENT FLOW AND NETWORK PRUNING . Gradient flow , or gradient descent with infinitesimal learning rate , is a continuous-time version of gradient descent . The evolution over time of model parameters , gradient , and loss under gradient flow can be described as follows . ( Parameters over time ) ∂Θ ( t ) ∂t = −g ( Θ ( t ) ) ; ( Gradient over time ) ∂g ( Θ ( t ) ) ∂t = −H ( Θ ( t ) ) g ( Θ ( t ) ) ; ( Loss over time ) ∂L ( t ) ∂t = −‖g ( Θ ( t ) ) ‖22 . ( 6 ) Recall that standard importance measures based on loss-preservation ( Equation 3 ) or increase in gradient-norm ( Equation 5 ) are derived using a first-order Taylor series approximation , making them exactly valid under the continuous scenario of gradient flow . This indicates analyzing the evolution of model parameters via gradient flow can provide useful insights into the relationships between different importance measures . To this end , we use gradient flow to develop a general framework that relates different classes of importance measures through the norm of model parameters . As we develop this framework , we explain the reasons why importance measures defined for pruning trained models are also highly effective when used for pruning early-on in training . In Appendix B , we further extend this framework to models trained using stochastic gradient descent , showing that up to a first-order approximation , the observations developed here are valid under SGD training too . | This paper proposes a detailed analysis on pruning heuristics, and its applications to early pruning. It thoroughly analyzed magnitude-based pruning, loss-preservation based pruning, and gradient-norm based pruning. The paper demonstrated the results on CIFAR-10 and CIFAR-100 datasets. it's very timely research to guide the audience which heuristic is better. My major concern is the novelty over existing pruning heuristics, since the techniques have all been proposed before. The other concern is the evaluation and the scale of the dataset. Given the results in table 2 different by less than a percent, and Cifar training is very noisy, it's hard to tell the difference. Just like the Lottery Ticket hypothesis works on Cifar but does not work on ImageNet, different pruning heuristics needs to be verified on the large scale ImageNet dataset in order to be convincing. | SP:9f7cb04c86bbb406040abc73f4f940af0c667d64 |
A Gradient Flow Framework For Analyzing Network Pruning | 1 INTRODUCTION . The use of Deep Neural Networks ( DNNs ) in intelligent edge systems has been enabled by extensive research on model compression . “ Pruning ” techniques are commonly used to remove “ unimportant ” filters to either preserve or promote specific , desirable model properties . Most pruning methods were originally designed to compress trained models , with the goal of reducing inference costs only . For example , Li et al . ( 2017 ) ; He et al . ( 2018 ) proposed to remove filters with small ` 1/ ` 2 norm , thus ensuring minimal change in model output . Molchanov et al . ( 2017 ; 2019 ) ; Theis et al . ( 2018 ) proposed to preserve the loss of a model , generally using Taylor expansions around a filter ’ s parameters to estimate change in loss as a function of its removal . Recent works focus on pruning models at initialization ( Lee et al . ( 2019 ; 2020 ) ) or after minimal training ( You et al . ( 2020 ) ) , thus enabling reduction in both inference and training costs . To estimate the impact of removing a parameter , these methods use the same importance measures as designed for pruning trained models . Since such measures focus on preserving model outputs or loss , Wang et al . ( 2020 ) argue they are not well-motivated for pruning models early-on in training . However , in this paper , we demonstrate that if the relationship between importance measures used for pruning trained models and the evolution of model parameters is established , their use early-on in training can be better justified . In particular , we employ gradient flow1 to develop a general framework that relates state-of-theart importance measures used in network pruning through the norm of model parameters . This framework establishes the relationship between regularly used importance measures and the evolution of a model ’ s parameters , thus demonstrating why measures designed to prune trained models also 1gradient flow refers to gradient descent with infinitesimal learning rate ; see Equation 6 for a short primer . perform well early-on in training . More generally , our framework enables better understanding of what properties make a parameter dispensable according to a particular importance measure . Our findings follow . ( i ) Magnitude-based pruning measures remove parameters that contribute least to reduction in loss . This enables magnitude-based pruned models to achieve faster convergence than magnitude-agnostic measures . ( ii ) Loss-preservation based measures remove parameters with the least tendency to change , thus preserving first-order model evolution dynamics . This shows the use of loss-preservation is justified for pruning models early-on in training as well . ( iii ) Gradient-norm based pruning is linearly related to second-order model evolution dynamics . Increasing gradient norm via pruning for even slightly trained models can permanently damage earlier layers , producing poorly performing architectures . This behavior is a result of aggressively pruning filters that maximally increase model loss . We validate our claims on several VGG-13 , MobileNet-V1 , and ResNet-56 models trained on CIFAR-10 and CIFAR-100 . 2 RELATED WORK . Several pruning frameworks define importance measures to estimate the impact of removing a parameter . Most popular importance measures are based on parameter magnitude ( Li et al . ( 2017 ) ; He et al . ( 2018 ) ; Liu et al . ( 2017 ) ) or loss preservation ( Molchanov et al . ( 2019 ; 2017 ) ; Theis et al . ( 2018 ) ; Gao et al . ( 2019 ) ) . Recent works show that using these measures , models pruned at initialization ( Lee et al . ( 2019 ) ; Wang et al . ( 2020 ) ; Hayou et al . ( 2021 ) ) or after minimal training ( You et al . ( 2020 ) ) achieve final performance similar to the original networks . Since measures for pruning trained models are motivated by output or loss preservation , Wang et al . ( 2020 ) argue they may not be well suited for pruning models early-on in training . They thus propose GraSP , a measure that promotes preservation of parameters that increase the gradient norm . Despite its success , the foundations of network pruning are not well understood . Recent work has shown that good “ subnetworks ” that achieve similar performance to the original network exist within both trained ( Ye et al . ( 2020 ) ) and untrained models ( Frankle & Carbin ( 2019 ) ; Malach et al . ( 2020 ) ; Pensia et al . ( 2020 ) ) . These works thus prove networks can be pruned without loss in performance , but do not indicate how a network should be pruned , i.e , which importance measures are preferable . In fact , Liu et al . ( 2019 ) show reinitializing pruned models before retraining rarely affects their performance , indicating the consequential differences among importance measures are in the properties of architectures they produce . Since different importance measures perform differently ( see Appendix E ) , analyzing popular measures to determine which model properties they tend to preserve can reveal which measures lead to better-performing architectures . From an implementation standpoint , pruning approaches can be placed in two categories . The first , structured pruning ( Li et al . ( 2017 ) ; He et al . ( 2018 ) ; Liu et al . ( 2017 ) ; Molchanov et al . ( 2019 ; 2017 ) ; Gao et al . ( 2019 ) ) , removes entire filters , thus preserving structural regularity and directly improving execution efficiency on commodity hardware platforms . The second , unstructured pruning ( Han et al . ( 2016b ) ; LeCun et al . ( 1990 ) ; Hassibi & Stork ( 1993 ) ) , is more fine-grained , operating at the level of individual parameters instead of filters . Unstructured pruning has recently been used to reduce computational complexity as well , but requires specially designed hardware ( Han et al . ( 2016a ) ) or software ( Elsen et al . ( 2020 ) ) that are capable of accelerating sparse operations . By clarifying benefits and pitfalls of popular importance measures , our work aims to ensure practitioners are better able to make informed choices for reducing DNN training/inference expenditure via network pruning . Thus , while results in this paper are applicable in both structured and unstructured settings , our experimental evaluation primarily focuses on structured pruning early-on in training . Results on unstructured pruning are relegated to Appendix H . 3 PRELIMINARIES : CLASSES OF STANDARD IMPORTANCE MEASURES . In this section , we review the most successful classes of importance measures for network pruning . These measures will be our focus in subsequent sections . We use bold symbols to denote vectors and italicize scalar variables . Consider a model that is parameterized as Θ ( t ) at time t. We denote the gradient of the loss with respect to model parameters at time t as g ( Θ ( t ) ) , the Hessian as H ( Θ ( t ) ) , and the model loss as L ( Θ ( t ) ) . A general model parameter is denoted as θ ( t ) . The importance of a set of parameters Θp ( t ) is denoted as I ( Θp ( t ) ) . Magnitude-based measures : Both ` 1 norm ( Li et al . ( 2017 ) ) and ` 2 norm ( He et al . ( 2018 ) ) have been successfully used as magnitude-focused importance measures and generally perform equally well . Due to its differentiability , ` 2 norm can be analyzed using gradient flow and will be our focus in the following sections . I ( Θp ( t ) ) = ‖Θp ( t ) ‖22 = ∑ θi∈Θp ( θi ( t ) ) 2 . ( 1 ) Loss-preservation based measures : These measures generally use a first-order Taylor decomposition to determine the impact removing a set of parameters has on model loss . Most recent methods ( Molchanov et al . ( 2019 ; 2017 ) ; Ding et al . ( 2019 ) ; Theis et al . ( 2018 ) ) for pruning trained models are variants of this method , often using additional heuristics to improve their performance . L ( Θ ( t ) −Θp ( t ) ) − L ( Θ ( t ) ) ≈ −ΘTp ( t ) g ( Θ ( t ) ) . ( 2 ) The equation above implies that the loss of a pruned model is higher ( lower ) than the original model if parameters with a negative ( positive ) value for ΘTp ( t ) g ( Θ ( t ) ) are removed . Thus , for preserving model loss , the following importance score should be used . I ( Θp ( t ) ) = ∣∣ΘTp ( t ) g ( Θ ( t ) ) ∣∣ . ( 3 ) Increase in gradient-norm based measures : Wang et al . ( 2020 ) argue loss-preservation based methods are not well-motivated for pruning models early-on in training . They thus propose GraSP , an importance measure that prunes parameters whose removal increases the gradient norm and can enable fast convergence for a pruned model . ‖g ( Θ ( t ) −Θp ( t ) ) ‖22 − ‖g ( Θ ( t ) ) ‖ 2 2 ≈ −2Θ T p ( t ) H ( Θ ( t ) ) g ( Θ ( t ) ) . ( 4 ) The above equation implies that the gradient norm of a pruned model is higher than the original model if parameters with a negative value for ΘTp ( t ) H ( Θ ( t ) ) g ( Θ ( t ) ) are removed . This results in the following importance score . I ( Θp ( t ) ) = Θ T p ( t ) H ( Θ ( t ) ) g ( Θ ( t ) ) . ( 5 ) As mentioned before , these importance measures were introduced for pruning trained models ( except for GraSP ) , but are also used for pruning models early-on in training . In the following sections , we revisit the original goals for these measures , establish their relationship with evolution of model parameters over time , and provide clear justifications for their use early-on in training . 4 GRADIENT FLOW AND NETWORK PRUNING . Gradient flow , or gradient descent with infinitesimal learning rate , is a continuous-time version of gradient descent . The evolution over time of model parameters , gradient , and loss under gradient flow can be described as follows . ( Parameters over time ) ∂Θ ( t ) ∂t = −g ( Θ ( t ) ) ; ( Gradient over time ) ∂g ( Θ ( t ) ) ∂t = −H ( Θ ( t ) ) g ( Θ ( t ) ) ; ( Loss over time ) ∂L ( t ) ∂t = −‖g ( Θ ( t ) ) ‖22 . ( 6 ) Recall that standard importance measures based on loss-preservation ( Equation 3 ) or increase in gradient-norm ( Equation 5 ) are derived using a first-order Taylor series approximation , making them exactly valid under the continuous scenario of gradient flow . This indicates analyzing the evolution of model parameters via gradient flow can provide useful insights into the relationships between different importance measures . To this end , we use gradient flow to develop a general framework that relates different classes of importance measures through the norm of model parameters . As we develop this framework , we explain the reasons why importance measures defined for pruning trained models are also highly effective when used for pruning early-on in training . In Appendix B , we further extend this framework to models trained using stochastic gradient descent , showing that up to a first-order approximation , the observations developed here are valid under SGD training too . | The paper contributes to explaining why saliency measures used for pruning trained models may (or may not) also be effective for pruning untrained or minimally trained models, by developing the relationship between those saliency measures and different forms of the norm of model parameters based on the evolution of model parameters via gradient flow (basically derivatives w.r.t. time). This result leads to several interesting interpretations that could shed some light on on-going efforts to understand recent methods of pruning early-on (e.g., pruning at initialization or after minimal training) and potential extensions to existing saliency measures. The idea of employing gradient flow is novel for its purpose and seems to be accurately executed. | SP:9f7cb04c86bbb406040abc73f4f940af0c667d64 |
Multi-Agent Trust Region Learning | 1 INTRODUCTION . Multi-agent systems ( MAS ) ( Shoham & Leyton-Brown , 2008 ) have received much attention from the reinforcement learning community . In real-world , automated driving ( Cao et al. , 2012 ) , StarCraft II ( Vinyals et al. , 2019 ) and Dota 2 ( Berner et al. , 2019 ) are a few examples of the myriad of applications that can be modeled by MAS . Due to the complexity of multi-agent problems ( Chatterjee et al. , 2004 ) , investigating if agents can learn to behave effectively during interactions with environments and other agents is essential ( Fudenberg et al. , 1998 ) . This can be achieved naively through the independent learner ( IL ) ( Tan , 1993 ) , which ignores the other agents and optimizes the policy assuming a stable environment ( Buşoniu et al. , 2010 ; Hernandez-Leal et al. , 2017 ) . Due to their theoretical guarantee and good empirical performance in real-world applications , trust region methods ( e.g. , PPO ( Schulman et al. , 2015 ; 2017 ) ) based ILs are popular ( Vinyals et al. , 2019 ; Berner et al. , 2019 ) . In single-agent learning , trust region methods can produce a monotonic payoff improvement guarantee ( Kakade & Langford , 2002 ) via line search ( Schulman et al. , 2015 ) . In multi-agent scenarios , however , an agent ’ s improvement is affected by other agent ’ s adaptive behaviors ( i.e. , the multi-agent environment is non-stationary ( Hernandez-Leal et al. , 2017 ) ) . As a result , trust region learners can measure the policy improvements of the agents ’ current policies , but the improvements of the updated opponents ’ policies are unknown ( shown in Fig . 1 ) . Therefore , trust region based ILs act less well in MAS as in single-agent tasks . Moreover , the convergence to a fixed point , such as a Nash equilibrium ( Nash et al. , 1950 ; Bowling & Veloso , 2004 ; Mazumdar et al. , 2020 ) , is a common and widely accepted solution concept for multi-agent learning . Thus , although independent learners can best respond to other agents ’ current policies , they lose their convergence guarantee ( Laurent et al. , 2011 ) . One solution to address the convergence problem for independent learners is Empirical GameTheoretic Analysis ( EGTA ) ( Wellman , 2006 ) , which approximates the best response to the policies generated by the independent learners ( Lanctot et al. , 2017 ; Muller et al. , 2019 ) . Although EGTA based methods ( Lanctot et al. , 2017 ; Omidshafiei et al. , 2019 ; Balduzzi et al. , 2019 ) establish Under review as a conference paper at ICLR 2021 < latexit sha1_base64= '' 1NN7F0aZfrdhNGV5c+4oOHrBfTM= '' > AAACEXicdVDLSgMxFM3UV62vqks3wSK4KjNS0YWLghuXFewD2qFk0jttaJIZk4xQhv6CGxf6K+7ErV/gn7g0087CtnggcDjn3uTkBDFn2rjut1NYW9/Y3Cpul3Z29/YPyodHLR0likKTRjxSnYBo4ExC0zDDoRMrICLg0A7Gt5nffgKlWSQfzCQGX5ChZCGjxGRSj8Njv1xxq+4MeJV4OamgHI1++ac3iGgiQBrKidZdz42NnxJlGOUwLfUSDTGhYzKErqWSCNB+Oss6xWdWGeAwUvZIg2fq342UCK0nIrCTgpiRXvYy8T8vu1EvvJ8GYimPCa/9lMk4MSDpPE6YcGwinNWDB0wBNXxiCaGK2R9hOiKKUGNLLNmqvOViVknrourVqpf3tUr9Ji+tiE7QKTpHHrpCdXSHGqiJKBqhZ/SK3pwX5935cD7nowUn3zlGC3C+fgHH+Z5O < /latexit > < latexit sha1_base64= '' 9HEuAo3NH+KpHjvH/J6u6lMbsxQ= '' > AAACDnicdVDLSgMxFL1TX7W+qi7dBIvgqsyIogvBghuXLdgHtEPJpJk2NMkMSUYoQ7/AjQv9FXfi1l/wT1yaaWdhWzwQOJxzb3JygpgzbVz32ymsrW9sbhW3Szu7e/sH5cOjlo4SRWiTRDxSnQBrypmkTcMMp51YUSwCTtvB+D7z209UaRbJRzOJqS/wULKQEWys1Ljrlytu1Z0BrRIvJxXIUe+Xf3qDiCSCSkM41rrrubHxU6wMI5xOS71E0xiTMR7SrqUSC6r9dBZ0is6sMkBhpOyRBs3UvxspFlpPRGAnBTYjvexl4n9edqNeeD8NxFIeE974KZNxYqgk8zhhwpGJUNYNGjBFieETSzBRzP4IkRFWmBjbYMlW5S0Xs0paF1XvsnrVuKzUbvPSinACp3AOHlxDDR6gDk0gQOEZXuHNeXHenQ/ncz5acPKdY1iA8/ULDlCc0Q== < /latexit > < latexit sha1_base64= '' 0MwWVFV0mTJ6Pj2jW71gFQUXJfk= '' > AAACEXicdVDLSgMxFM3UV62vqks3wSK4KjNS0YWLghuXFewD2qFk0jttaJIZk4xQhv6CGxf6K+7ErV/gn7g0087CtnggcDjn3uTkBDFn2rjut1NYW9/Y3Cpul3Z29/YPyodHLR0likKTRjxSnYBo4ExC0zDDoRMrICLg0A7Gt5nffgKlWSQfzCQGX5ChZCGjxGRSbwiP/XLFrboz4FXi5aSCcjT65Z/eIKKJAGkoJ1p3PTc2fkqUYZTDtNRLNMSEjskQupZKIkD76SzrFJ9ZZYDDSNkjDZ6pfzdSIrSeiMBOCmJGetnLxP+87Ea98H4aiKU8Jrz2UybjxICk8zhhwrGJcFYPHjAF1PCJJYQqZn+E6YgoQo0tsWSr8paLWSWti6pXq17e1yr1m7y0IjpBp+gceegK1dEdaqAmomiEntErenNenHfnw/mcjxacfOcYLcD5+gW/nZ5J < /latexit > < latexit sha1_base64= '' 9HEuAo3NH+KpHjvH/J6u6lMbsxQ= '' > AAACDnicdVDLSgMxFL1TX7W+qi7dBIvgqsyIogvBghuXLdgHtEPJpJk2NMkMSUYoQ7/AjQv9FXfi1l/wT1yaaWdhWzwQOJxzb3JygpgzbVz32ymsrW9sbhW3Szu7e/sH5cOjlo4SRWiTRDxSnQBrypmkTcMMp51YUSwCTtvB+D7z209UaRbJRzOJqS/wULKQEWys1Ljrlytu1Z0BrRIvJxXIUe+Xf3qDiCSCSkM41rrrubHxU6wMI5xOS71E0xiTMR7SrqUSC6r9dBZ0is6sMkBhpOyRBs3UvxspFlpPRGAnBTYjvexl4n9edqNeeD8NxFIeE974KZNxYqgk8zhhwpGJUNYNGjBFieETSzBRzP4IkRFWmBjbYMlW5S0Xs0paF1XvsnrVuKzUbvPSinACp3AOHlxDDR6gDk0gQOEZXuHNeXHenQ/ncz5acPKdY1iA8/ULDlCc0Q== < /latexit > < latexit sha1_base64= '' mlfS6P1wr0psE/0O2O9hkrlFv2g= '' > AAACbHicdVHBTtwwEPWmUOiWlm3LDSFZXYGotKySahEgcUDlAEdadQGJpJHjTBYLO4nsCWJl5ev6FXwClx7aS494wx66izqSpaf3ZsbPz0kphUHfv295LxYWXy4tv2q/XnnzdrXz7v25KSrNYcgLWejLhBmQIochCpRwWWpgKpFwkdwcT/SLW9BGFPl3HJcQKTbKRSY4Q0fFnShMIXOzzSarxhrS2n47+VLbYH/Qowe7PToI6nYIyGK7I+rtsBSxFXUvRLjDmalGcS0/HNJCQV1/ijtdv+83RZ+DYAq6ZFpncedvmBa8UpAjl8yYq8AvMbJMo+ASnI/KQMn4DRvBlYM5U2Ai29io6aZjUpoV2p0cacP+O2GZMmasEtepGF6beW1C/k+bbDQz99tEzfnBbD+yIi8rhJw/2ckqSbGgk+RpKjRwlGMHGNfCvYjya6YZR/c/bRdVMB/Mc3D+uR8M+gdfB92jw2loy2SdfCTbJCB75IickjMyJJz8JA/kN/nT+uWteevexlOr15rOfCAz5W09Arjwv3Y= < /latexit > < latexit sha1_base64= '' DcIAKyRK95otGmn1ylfKJLkPQG4= '' > AAACiHicdVHBTttAEF2b0oa0hUCPXFaNKlEpRDZKRSJxQHCAI6AGkHBqrddjWLFrW7tjhLXyh3LiN3pkE3IgQYy00tObNzNvZ5JSCoNB8OT5K59WP39prbW/fvu+vtHZ3Lo0RaU5jHkhC32dMANS5DBGgRKuSw1MJRKukvvjaf7qAbQRRf4X6xImit3mIhOcoaPiTh2lkLnaWSerag1pYy9OjhobDgc9OvrTo4OwaUeALLa7otmJEB5xQR2VIrai+eeAFgqapveBZvet6Hfc6Qb9YBb0PQjnoEvmcRZ3/kdpwSsFOXLJjLkJgxInlmkUXILzWBkoGb9nt3DjYM4UmImd2WjoL8ekNCu0eznSGfu2wjJlTK0Sp1QM78xybkp+lJt2NAvzbaKW/GA2nFiRlxVCzl/tZJWkWNDpVWgqNHCUtQOMa+F+RPkd04yju13brSpcXsx7cLnXDwf90fmge3gwX1qLbJOfZIeEZJ8cklNyRsaEk2dv1Vv3Nvy2H/j7/uhV6nvzmh9kIfyjF/pHyLI= < /latexit > < latexit sha1_base64= '' EGsGKugD16zqH57YPB5KPfiuvxo= '' > AAACh3icdVFNTxsxEPUuUCDlI9AjF4sIiUppuosCJBIHaA/lSCsCSGwaeb2zYGHvruxZlMjaH9pLf0eP9YYcSBAjWXp67834eRwXUhgMgj+ev7S88mF1bb3xcWNza7u5s3tj8lJzGPBc5vouZgakyGCAAiXcFRqYiiXcxk/fa/32GbQReXaNkwKGij1kIhWcoaNGzXGUQOp6p5OsmmhIKvvrx7fKhr1um/aP27QbVo0IkI2sqA4jhDHOmaNC1MpvB7RQUFXtdzxfXps+j5qtoBNMi74F4Qy0yKyuRs1/UZLzUkGGXDJj7sOgwKFlGgWX4CKWBgrGn9gD3DuYMQVmaKcxKnrgmISmuXYnQzplX3dYpoyZqNg5FcNHs6jV5HtaPdHM3W9jtZAH097QiqwoETL+EictJcWc1p9CE6GBo5w4wLgW7kWUPzLNOLqva7hVhYuLeQtujjpht9P/2W2dn82Wtkb2yD45JCE5JefkklyRAeHkr7fsbXpb/rr/1T/xey9W35v1fCJz5V/8B2ymyHs= < /latexit > < latexit sha1_base64= '' QmmZ03/Sf6mnjXKt2E0v8KaahaA= '' > AAACa3icdVHBTtwwEPUGaGFpYYEb9GCxQqLSskqqRYDEAdEDPQJiAYksK8eZgIWdRPYEsbLyc/2L/gEXDvTUY52wh+6ijmTp6b2Z8fNzlEth0Pd/NbyZ2bkPH+cXmoufPi8tt1ZWL01WaA59nslMX0fMgBQp9FGghOtcA1ORhKvo4XulXz2CNiJLL3CUw0Cxu1QkgjN01LAVhjEkbrbeZNVIQ1za85Pj0gb7vQ492O3QXlA2Q0A2tKLcDhGecKI5zEWl3DqghYKy7NTMjii/Dlttv+vXRd+DYAzaZFynw9afMM54oSBFLpkxN4Gf48AyjYJLcDYKAznjD+wObhxMmQIzsLWdkm45JqZJpt1JkdbsvxOWKWNGKnKdiuG9mdYq8n9atdFM3G8jNeUHk/2BFWleIKT8zU5SSIoZrYKnsdDAUY4cYFwL9yLK75lmHN33NF1UwXQw78Hlt27Q6x6c9dpHh+PQ5skG2STbJCB75Ij8IKekTzj5SZ7JK/ndePHWvHXvy1ur1xjPrJGJ8rb+Ajxhvz8= < /latexit > < latexit sha1_base64= '' oa4StdeIIx+XA1qsMVANMuqxEMQ= '' > AAACT3icdVHLSgMxFM3UV1tfVZdugkVQqGVGKiq4KLrQpYpVwZaSydzRYDIzJBmhhPkdv8aNCwW/RFdiZpyFVrxwuYdznznxE86Udt03pzIxOTU9U63VZ+fmFxYbS8uXKk4lhR6NeSyvfaKAswh6mmkO14kEInwOV/79UZ6/egCpWBxd6FECA0FuIxYySrSlho1uP4DQ9haTjBhJCDJzfnyYGW+v08L7Oy3c8bJ6HzQZGpZt9BOWx1YRt1i2OWw03bZbGP4LvBI0UWmnw8ZHP4hpKiDSlBOlbjw30QNDpGaUg12VKkgIvSe3cGNhRASogSnuy/C6ZQIcxtJ6pHHB/uwwRCg1Er6tFETfqfFcTv6XyyeqX/uNL8bu0eHewLAoSTVE9PucMOVYxzgXFwdMAtV8ZAGhktkXYXpHJKHafkHdSuWNC/MXXG63vU57/6zT7B6UolXRKlpDG8hDu6iLTtAp6iGKHtETekGvzrPz7nxWytKKU4IV9MsqtS/6MLQF < /latexit > < latexit sha1_base64= '' H8UEmSja/X4EcOJ731PXDegUMN8= '' > AAACUHicdVHPSxtBFH4btWq0bbTHXgZDIUIadiVFBQ/WHuwxlkYDJiyzs291cGZ3mZkVwrB/j3+NFw+K/4k3nWxS0EgfPN7H937ON1EuuDa+/+jVFhaXPiyvrNbX1j9++tzY2DzVWaEY9lkmMjWIqEbBU+wbbgQOcoVURgLPoqtfk/zZNSrNs/SvGec4kvQi5Qln1DgqbPwcxpi43mqSlWOFcWn/HB+VNtjrtsn+jzbpBmV9iIaG9jsvW8Och5aX7So6YjtsNP2OXxl5D4IZaMLMemHjaRhnrJCYGiao1ueBn5uRpcpwJtDtKjTmlF3RCzx3MKUS9chWB5bkm2NikmTKeWpIxb7usFRqPZaRq5TUXOr53IT8X24yUb/ZbyM5d49J9kaWp3lhMGXTc5JCEJORibok5gqZEWMHKFPcvYiwS6ooM+4P6k6qYF6Y9+B0pxN0O/sn3ebhwUy0FfgKW9CCAHbhEH5DD/rA4AZu4R4evDvvyXuuedPSfxG+wBur1V8AfZi0PA== < /latexit > convergence guarantees in several games classes , the computational cost is also large when empirically approximating and solving the increasing meta-game ( Yang et al. , 2019 ) . Other multi-agent learning approaches collect or approximate additional information such as communication ( Foerster et al. , 2016 ) and centralized joint critics ( Lowe et al. , 2017 ; Foerster et al. , 2017 ; Sunehag et al. , 2018 ; Rashid et al. , 2018 ) . Nevertheless , these methods usually require centralized parameters or centralized communication assumptions . Thus , there is considerable interest in multi-agent learning to find an algorithm that , while having minimal requirements and computational cost as independent learners , also improves convergence performance at the same time . This paper presents the Multi-Agent Trust Region Learning ( MATRL ) algorithm that augments the trust-region ILs with a meta-game analysis to improve the stability and efficiency of learning . In MATRL , a trust region trial step for an agents ’ payoff improvement is implemented by independent learners , which gives a predicted policy based on the current policy . Then , an empirical policy-space meta-game is constructed to compare the expected advantage of predicted policies with the current policies . By solving the meta-game , MATRL finds a restricted step by aggregating the current and predicted policies using meta-game Nash Equilibrium . Finally , MATRL takes the best responses based on the aggregated policies from last step for each agent to explore because the found TSR is not always strict stable . MATRL is , therefore , able to provide a weak stable solution compared with the naive independent learners . Based on trust region independent learners , MATRL does not need extra parameters , simulations , or modifications to the independent learner itself . We provide insights into the empirical meta-game in Section 3.2 , showing that an approximated Nash equilibrium of the meta-game is a weak stable fixed point of the underlying game . Our experiments demonstrate that MATRL significantly outperforms deep independent learners ( Schulman et al. , 2017 ) with the same hyper-parameters , centralized VDN ( Sunehag et al. , 2018 ) , QMIX ( Rashid et al. , 2018 ) methods in discrete action grid-worlds , centralized MADDPG ( Lowe et al. , 2017 ) in a continuous action multi-agent MuJoCo task ( de Witt et al. , 2020 ) and zero-sum multi-agent Atari ( Terry & Black , 2020 ) . 2 PRELIMINARY . A Stochastic Game ( Shapley , 1953 ; Littman , 1994 ) can be defined as : G = 〈N , S , { Ai } , { Ri } , P , p0 , γ〉 , where N is a set of agents , n = |N | is the number of agents and S denotes the state space . Ai is the action space for agent i . A = A1 × · · · × An = Ai ×A−i is the joint action space , and for the simplicity we use −i denotes the other agents except agent i. Ri = Ri ( s , ai , a−i ) is the reward function for agent i ∈ N . P : S ×A×S → [ 0 , 1 ] is the transition function . p0 is the initial state distribution , γ ∈ [ 0 , 1 ] is a discount factor . Each agent i ∈ N has a stochastic policy πi ( ai|s ) : S ×Ai → [ 0 , 1 ] , and aims to maximize its long term discounted return : ηi ( πi , π−i ) = Es0 , a0i , a0−i··· [ ∞∑ t=0 γtRi ( s t , ati , a t −i ) ] , ( 1 ) where s0 ∼ p0 , st+1 ∼ P ( st+1|st , ati , at−i ) , ati ∼ πi ( ati|τ ti ) . We then can have the standard definitions of the state-action value function Qπi , π−ii ( s t , ati , a t −i ) = Est+1 , at+1i , at+1−i ··· [ ∑∞ l=0 γ lRi ( s t+l , at+li , a t+l −i ) ] , the value function V πi , π−i i ( s t ) = Eati , at−i , st+1··· [ ∑∞ l=0 γ lRi ( s t+l , at+li , a t+l −i ) ] , and the advantage function A πi , π−i i ( s t , ati , a t −i ) = Q πi , π−i i ( s t , ati , a t −i ) − V πi , π−i i ( s t ) given the state and joint action . 3 MULTI-AGENT TRUST REGION POLICY OPTIMIZATION . A trust region algorithm aims to answer two questions : how to compute a trust region trial step and whether a trial step should be accepted . In multi-agent learning , a trust region trial step towards agents ’ payoff improvement can be easily implemented with independent learners , and we call the independent payoff improvement area as Trust Payoff Region ( TPR ) . The remaining issue is Under review as a conference paper at ICLR 2021 < latexit sha1_base64= '' 2oAtTy/Ncb1ME0cbS1OEdDjtsJk= '' > AAACFHicdVDLSgMxFL1TX7W+qi7dBIvgqsxIoQouCm5cVrAPaIeSSTNtaJIZkoxQhn6EGxf6K+7ErXv/xKWZdha2xQOBwzn3JicniDnTxnW/ncLG5tb2TnG3tLd/cHhUPj5p6yhRhLZIxCPVDbCmnEnaMsxw2o0VxSLgtBNM7jK/80SVZpF8NNOY+gKPJAsZwcZKnX7MBimbDcoVt+rOgdaJl5MK5GgOyj/9YUQSQaUhHGvd89zY+ClWhhFOZ6V+ommMyQSPaM9SiQXVfjqPO0MXVhmiMFL2SIPm6t+NFAutpyKwkwKbsV71MvE/L7tRL72fBmIljwmv/ZTJODFUkkWcMOHIRChrCA2ZosTwqSWYKGZ/hMgYK0yM7bFkq/JWi1kn7auqV6vePNQqjdu8tCKcwTlcggd1aMA9NKEFBCbwDK/w5rw4786H87kYLTj5zikswfn6BXmRn8c= < /latexit > < latexit sha1_base64= '' Klbc1KwZmtVbQeokYl+k7FxbmTM= '' > AAACFXicdVDLSgMxFL1TX7W+qi7dBIvgxjIjBRVcFNy4rGAf0A4lk2ba0CQzJBmhDP0JNy70V9yJW9f+iUsz7SxsiwcCh3PuTU5OEHOmjet+O4W19Y3NreJ2aWd3b/+gfHjU0lGiCG2SiEeqE2BNOZO0aZjhtBMrikXAaTsY32V++4kqzSL5aCYx9QUeShYygo2VOr2Y9dMLNu2XK27VnQGtEi8nFcjR6Jd/eoOIJIJKQzjWuuu5sfFTrAwjnE5LvUTTGJMxHtKupRILqv10lneKzqwyQGGk7JEGzdS/GykWWk9EYCcFNiO97GXif152o154Pw3EUh4TXvspk3FiqCTzOGHCkYlQVhEaMEWJ4RNLMFHM/giREVaYGFtkyVblLRezSlqXVa9WvXmoVeq3eWlFOIFTOAcPrqAO99CAJhDg8Ayv8Oa8OO/Oh/M5Hy04+c4xLMD5+gXr8p/+ < /latexit > < latexit sha1_base64= '' nVAjToaXS6TUfJk8m1M/i0MhQuI= '' > AAACGnicdVDLSgMxFM3UV62vqks3wSK4KjNSUMFFwY3LCvYB7VAyaaYNTTJjckcoQ7/DjQv9FXfi1o1/4tJMOwvb4oELh3MfOTlBLLgB1/12CmvrG5tbxe3Szu7e/kH58KhlokRT1qSRiHQnIIYJrlgTOAjWiTUjMhCsHYxvs377iWnDI/UAk5j5kgwVDzklYCW/NyKQ9mI+7ae2yhW36s6AV4mXkwrK0eiXf3qDiCaSKaCCGNP13Bj8lGjgVLBpqZcYFhM6JkPWtVQRyYyfzkxP8ZlVBjiMtC0FeKb+3UiJNGYiAzspCYzMci8T/+tlF83C+2kgl/xAeOWnXMUJMEXndsJEYIhwlhMecM0oiIklhGpuf4TpiGhCwaZZslF5y8GsktZF1atVr+9rlfpNHloRnaBTdI48dInq6A41UBNR9Iie0St6c16cd+fD+ZyPFpx85xgtwPn6BbVvopQ= < /latexit > < latexit sha1_base64= '' y8DmZzR1FkK1TScjZBKVMREfb1A= '' > AAACG3icdVDLSgMxFL3js9ZX1aWbYBHcWGakoIKLghuXFewDOrVk0kwbmmSGJCOUof/hxoX+ijtx68I/cWmmnYVt8UDC4Zx7b25OEHOmjet+Oyura+sbm4Wt4vbO7t5+6eCwqaNEEdogEY9UO8CaciZpwzDDaTtWFIuA01Ywus381hNVmkXywYxj2hV4IFnICDZWevSH2KR+zCa99NxepbJbcadAy8TLSRly1HulH78fkURQaQjHWnc8NzbdFCvDCKeTop9oGmMywgPasVRiQXU3nW49QadW6aMwUvZIg6bq344UC63HIrCVApuhXvQy8T8vm6jn3k8DsbCPCa+6KZNxYqgks3XChCMToSwo1GeKEsPHlmCimP0RIkOsMDE2zqKNylsMZpk0LypetXJ9Xy3XbvLQCnAMJ3AGHlxCDe6gDg0goOAZXuHNeXHenQ/nc1a64uQ9RzAH5+sXKnyiyw== < /latexit > < latexit sha1_base64= '' 9WUTxmFWU67i+UjWWsa7nYUvrow= '' > AAACFnicdVDLSgMxFL1TX7W+qi7dBIsgLsqMFFRwUXDjsoJ9SDuWTJppQ5PMkGSEMvQr3LjQX3Enbt36Jy7NtF3YFg8EDufcm5ycIOZMG9f9dnIrq2vrG/nNwtb2zu5ecf+goaNEEVonEY9UK8CaciZp3TDDaStWFIuA02YwvMn85hNVmkXy3oxi6gvclyxkBBsrPXRi1k3Z+PGsWyy5ZXcCtEy8GSnBDLVu8afTi0giqDSEY63bnhsbP8XKMMLpuNBJNI0xGeI+bVsqsaDaTyeBx+jEKj0URsoeadBE/buRYqH1SAR2UmAz0IteJv7nZTfquffTQCzkMeGlnzIZJ4ZKMo0TJhyZCGUdoR5TlBg+sgQTxeyPEBlghYmxTRZsVd5iMcukcV72KuWru0qpej0rLQ9HcAyn4MEFVOEWalAHAgKe4RXenBfn3flwPqejOWe2cwhzcL5+AaxmoGM= < /latexit > < latexit sha1_base64= '' ymbUExUlNEE2ahN3gNpcw6isMQ8= '' > AAACF3icdVDLSgMxFL3js9ZX1aWbYBFEsMxIQQUXBTcuK9gHtmPJpGkbmmSGJCOUoX/hxoX+ijtx69I/cWmmnYVt8UDgcM69yckJIs60cd1vZ2l5ZXVtPbeR39za3tkt7O3XdRgrQmsk5KFqBlhTziStGWY4bUaKYhFw2giGN6nfeKJKs1Dem1FEfYH7kvUYwcZKD+2IdZIzNn487RSKbsmdAC0SLyNFyFDtFH7a3ZDEgkpDONa65bmR8ROsDCOcjvPtWNMIkyHu05alEguq/WSSeIyOrdJFvVDZIw2aqH83Eiy0HonATgpsBnreS8X/vPRGPfN+Eoi5PKZ36SdMRrGhkkzj9GKOTIjSklCXKUoMH1mCiWL2R4gMsMLE2CrztipvvphFUj8veeXS1V25WLnOSsvBIRzBCXhwARW4hSrUgICEZ3iFN+fFeXc+nM/p6JKT7RzADJyvXx80oJo= < /latexit > < latexit sha1_base64= '' 2oAtTy/Ncb1ME0cbS1OEdDjtsJk= '' > AAACFHicdVDLSgMxFL1TX7W+qi7dBIvgqsxIoQouCm5cVrAPaIeSSTNtaJIZkoxQhn6EGxf6K+7ErXv/xKWZdha2xQOBwzn3JicniDnTxnW/ncLG5tb2TnG3tLd/cHhUPj5p6yhRhLZIxCPVDbCmnEnaMsxw2o0VxSLgtBNM7jK/80SVZpF8NNOY+gKPJAsZwcZKnX7MBimbDcoVt+rOgdaJl5MK5GgOyj/9YUQSQaUhHGvd89zY+ClWhhFOZ6V+ommMyQSPaM9SiQXVfjqPO0MXVhmiMFL2SIPm6t+NFAutpyKwkwKbsV71MvE/L7tRL72fBmIljwmv/ZTJODFUkkWcMOHIRChrCA2ZosTwqSWYKGZ/hMgYK0yM7bFkq/JWi1kn7auqV6vePNQqjdu8tCKcwTlcggd1aMA9NKEFBCbwDK/w5rw4786H87kYLTj5zikswfn6BXmRn8c= < /latexit > < latexit sha1_base64= '' Klbc1KwZmtVbQeokYl+k7FxbmTM= '' > AAACFXicdVDLSgMxFL1TX7W+qi7dBIvgxjIjBRVcFNy4rGAf0A4lk2ba0CQzJBmhDP0JNy70V9yJW9f+iUsz7SxsiwcCh3PuTU5OEHOmjet+O4W19Y3NreJ2aWd3b/+gfHjU0lGiCG2SiEeqE2BNOZO0aZjhtBMrikXAaTsY32V++4kqzSL5aCYx9QUeShYygo2VOr2Y9dMLNu2XK27VnQGtEi8nFcjR6Jd/eoOIJIJKQzjWuuu5sfFTrAwjnE5LvUTTGJMxHtKupRILqv10lneKzqwyQGGk7JEGzdS/GykWWk9EYCcFNiO97GXif152o154Pw3EUh4TXvspk3FiqCTzOGHCkYlQVhEaMEWJ4RNLMFHM/giREVaYGFtkyVblLRezSlqXVa9WvXmoVeq3eWlFOIFTOAcPrqAO99CAJhDg8Ayv8Oa8OO/Oh/M5Hy04+c4xLMD5+gXr8p/+ < /latexit > < latexit sha1_base64= '' nVAjToaXS6TUfJk8m1M/i0MhQuI= '' > AAACGnicdVDLSgMxFM3UV62vqks3wSK4KjNSUMFFwY3LCvYB7VAyaaYNTTJjckcoQ7/DjQv9FXfi1o1/4tJMOwvb4oELh3MfOTlBLLgB1/12CmvrG5tbxe3Szu7e/kH58KhlokRT1qSRiHQnIIYJrlgTOAjWiTUjMhCsHYxvs377iWnDI/UAk5j5kgwVDzklYCW/NyKQ9mI+7ae2yhW36s6AV4mXkwrK0eiXf3qDiCaSKaCCGNP13Bj8lGjgVLBpqZcYFhM6JkPWtVQRyYyfzkxP8ZlVBjiMtC0FeKb+3UiJNGYiAzspCYzMci8T/+tlF83C+2kgl/xAeOWnXMUJMEXndsJEYIhwlhMecM0oiIklhGpuf4TpiGhCwaZZslF5y8GsktZF1atVr+9rlfpNHloRnaBTdI48dInq6A41UBNR9Iie0St6c16cd+fD+ZyPFpx85xgtwPn6BbVvopQ= < /latexit > < latexit sha1_base64= '' y8DmZzR1FkK1TScjZBKVMREfb1A= '' > AAACG3icdVDLSgMxFL3js9ZX1aWbYBHcWGakoIKLghuXFewDOrVk0kwbmmSGJCOUof/hxoX+ijtx68I/cWmmnYVt8UDC4Zx7b25OEHOmjet+Oyura+sbm4Wt4vbO7t5+6eCwqaNEEdogEY9UO8CaciZpwzDDaTtWFIuA01Ywus381hNVmkXywYxj2hV4IFnICDZWevSH2KR+zCa99NxepbJbcadAy8TLSRly1HulH78fkURQaQjHWnc8NzbdFCvDCKeTop9oGmMywgPasVRiQXU3nW49QadW6aMwUvZIg6bq344UC63HIrCVApuhXvQy8T8vm6jn3k8DsbCPCa+6KZNxYqgks3XChCMToSwo1GeKEsPHlmCimP0RIkOsMDE2zqKNylsMZpk0LypetXJ9Xy3XbvLQCnAMJ3AGHlxCDe6gDg0goOAZXuHNeXHenQ/nc1a64uQ9RzAH5+sXKnyiyw== < /latexit > < latexit sha1_base64= '' 9WUTxmFWU67i+UjWWsa7nYUvrow= '' > AAACFnicdVDLSgMxFL1TX7W+qi7dBIsgLsqMFFRwUXDjsoJ9SDuWTJppQ5PMkGSEMvQr3LjQX3Enbt36Jy7NtF3YFg8EDufcm5ycIOZMG9f9dnIrq2vrG/nNwtb2zu5ecf+goaNEEVonEY9UK8CaciZp3TDDaStWFIuA02YwvMn85hNVmkXy3oxi6gvclyxkBBsrPXRi1k3Z+PGsWyy5ZXcCtEy8GSnBDLVu8afTi0giqDSEY63bnhsbP8XKMMLpuNBJNI0xGeI+bVsqsaDaTyeBx+jEKj0URsoeadBE/buRYqH1SAR2UmAz0IteJv7nZTfquffTQCzkMeGlnzIZJ4ZKMo0TJhyZCGUdoR5TlBg+sgQTxeyPEBlghYmxTRZsVd5iMcukcV72KuWru0qpej0rLQ9HcAyn4MEFVOEWalAHAgKe4RXenBfn3flwPqejOWe2cwhzcL5+AaxmoGM= < /latexit > < latexit sha1_base64= '' ymbUExUlNEE2ahN3gNpcw6isMQ8= '' > AAACF3icdVDLSgMxFL3js9ZX1aWbYBFEsMxIQQUXBTcuK9gHtmPJpGkbmmSGJCOUoX/hxoX+ijtx69I/cWmmnYVt8UDgcM69yckJIs60cd1vZ2l5ZXVtPbeR39za3tkt7O3XdRgrQmsk5KFqBlhTziStGWY4bUaKYhFw2giGN6nfeKJKs1Dem1FEfYH7kvUYwcZKD+2IdZIzNn487RSKbsmdAC0SLyNFyFDtFH7a3ZDEgkpDONa65bmR8ROsDCOcjvPtWNMIkyHu05alEguq/WSSeIyOrdJFvVDZIw2aqH83Eiy0HonATgpsBnreS8X/vPRGPfN+Eoi5PKZ36SdMRrGhkkzj9GKOTIjSklCXKUoMH1mCiWL2R4gMsMLE2CrztipvvphFUj8veeXS1V25WLnOSsvBIRzBCXhwARW4hSrUgICEZ3iFN+fFeXc+nM/p6JKT7RzADJyvXx80oJo= < /latexit > < latexit sha1_base64= '' dGmSt7Qks3BA2LjCv++bzX6uitc= '' > AAACH3icdVDNS8MwHE3n15xfVY9egkPwNFoRVPAw8OJxgvuAtZY0S7ewpA1JOhil/4kXD/qveBOv+088mm49uA0fBB7v/X7JywsFo0o7zsyqbGxube9Ud2t7+weHR/bxSUclqcSkjROWyF6IFGE0Jm1NNSM9IQniISPdcPxQ+N0JkYom8bOeCuJzNIxpRDHSRgps2xM0yGj+knlCUk7ywK47DWcOuE7cktRBiVZg/3iDBKecxBozpFTfdYT2MyQ1xYzkNS9VRCA8RkPSNzRGnCg/myfP4YVRBjBKpDmxhnP170aGuFJTHppJjvRIrXqF+J9X3KiW3s9CvpJHR7d+RmORahLjRZwoZVAnsCgLDqgkWLOpIQhLan4E8QhJhLWptGaqcleLWSedq4Z73bh7uq4378vSquAMnINL4IIb0ASPoAXaAIMJeAXv4MN6sz6tL+t7MVqxyp1TsARr9gvEf6Qh < /latexit > < latexit sha1_base64= '' pyoziTv79JsJ9qsAPoGpMJD40Kc= '' > AAACIHicdVDNS8MwHE39nPOr06OX4BC8OFoZqOBh4MXjBPcBay1plm5hSVqSVBmlf4oXD/qveBOP+pd4NN12cBs+CDze+/2SlxcmjCrtOF/Wyura+sZmaau8vbO7t29XDtoqTiUmLRyzWHZDpAijgrQ01Yx0E0kQDxnphKObwu88EqloLO71OCE+RwNBI4qRNlJgV7yEBtkZzR8yL5GUkzywq07NmQAuE3dGqmCGZmD/eP0Yp5wIjRlSquc6ifYzJDXFjORlL1UkQXiEBqRnqECcKD+bRM/hiVH6MIqlOULDifp3I0NcqTEPzSRHeqgWvUL8zytuVHPvZyFfyKOjSz+jIkk1EXgaJ0oZ1DEs2oJ9KgnWbGwIwpKaH0E8RBJhbTotm6rcxWKWSfu85tZrV3f1auN6VloJHIFjcApccAEa4BY0QQtg8ASewSt4s16sd+vD+pyOrliznUMwB+v7Fzi1pFg= < /latexit > < latexit sha1_base64= '' GgMP7Zgs4dXCmTjvBxmEYdeShb4= '' > AAACG3icdVDLSgMxFL3js9ZX1aWbYBHcWGakoIKLghuXFewDOmPJpGkbmmSGJCOUof/hxoX+ijtx68I/cWmmnYVt8UDC4Zx7b25OGHOmjet+Oyura+sbm4Wt4vbO7t5+6eCwqaNEEdogEY9UO8SaciZpwzDDaTtWFIuQ01Y4us381hNVmkXywYxjGgg8kKzPCDZWevRDrFI/ZpNuem6vUtmtuFOgZeLlpAw56t3Sj9+LSCKoNIRjrTueG5sgxcowwumk6CeaxpiM8IB2LJVYUB2k060n6NQqPdSPlD3SoKn6tyPFQuuxCG2lwGaoF71M/M/LJuq599NQLOxj+ldBymScGCrJbJ1+wpGJUBYU6jFFieFjSzBRzP4IkSFWmBgbZ9FG5S0Gs0yaFxWvWrm+r5ZrN3loBTiGEzgDDy6hBndQhwYQUPAMr/DmvDjvzofzOStdcfKeI5iD8/ULHNCiww== < /latexit > < latexit sha1_base64= '' ID+Z/3jlew3kk/MK1ozKW97Oqfo= '' > AAACGnicdVDLSgMxFL1TX7W+qi7dBIvgqsxIQQUXBTcuK9gHdIaSSTNtaJIZk4xQhn6HGxf6K+7ErRv/xKVpOwvb4oELh3MfOTlhwpk2rvvtFNbWNza3itulnd29/YPy4VFLx6kitEliHqtOiDXlTNKmYYbTTqIoFiGn7XB0O+23n6jSLJYPZpzQQOCBZBEj2Fgp8EOsMj9hk15mq1xxq+4MaJV4OalAjkav/OP3Y5IKKg3hWOuu5yYmyLAyjHA6KfmppgkmIzygXUslFlQH2cz0BJ1ZpY+iWNmSBs3UvxsZFlqPRWgnBTZDvdybiv/1phf1wvtZKJb8mOgqyJhMUkMlmduJUo5MjKY5oT5TlBg+tgQTxeyPEBlihYmxaZZsVN5yMKukdVH1atXr+1qlfpOHVoQTOIVz8OAS6nAHDWgCgUd4hld4c16cd+fD+ZyPFpx85xgW4Hz9AqfLoow= < /latexit > revolved by finding a restricted step leading to a stable point in the joint policy space , denoted as Trust Stable Region ( TSR ) . In other words , multi-agent trust region learning ( MATRL ) decomposes the trust region learning into two parts : firstly , find a trust payoff region between current policy πi and predicted policy π̂i ; then , with the help of the predicted policy , a precise method can , to some extent , approximate a weak stable fixed point . Instead of line searching in a single-agent payoff improvement , MATRL searches for the joint policy space to achieve a weak stable fixed point ( see Fig . 2 ) . Essentially , MATRL is a simple extension of the single-agent TRPO to MAS where independent learners learn to find a stable point between current policy and predicted policy . To solve the TSR , we assume the knowledge about other agents ’ policies during the training to find weak stable points via empirical meta-game analysis , while the execution can still be fully decentralized . We explain every step of MATRL in detail in the following sections . 3.1 INDEPENDENT TRUST PAYOFF IMPROVEMENT . Single-agent reinforcement learning algorithms can be straightforwardly applied to multi-agent learning , where we assume that all agents behave independently ( Tan , 1993 ) . In this section , we have chosen the policy-based reinforcement learning method as independent learners . In multi-agent games , the environment becomes a Markov decision process for agent i when each of the other agents plays according to a fixed policy . We set agent i ’ s to make a monotonic improvement against the fixed opponent policies . Thus , at each iteration , the policy is updated by maximizing the utility function ηi over a local neighborhood of the current joint policy πi , π−i : π̂i = arg maxπi∈Πi ηi ( πi , π−i ) based on the trajectories sampled by πi , π−i . We can adopt trust region policy optimization ( e.g. , PPO ( Schulman et al. , 2017 ) ) , which constrains step size in the policy update : π̂i = arg max πi∈Πθi ηi ( πi , π−i ) s.t . D ( πi , π̂i ) ≤ δi , ( 2 ) where D is a distance measurement and δi is a constraint . Independent trust region learners produce the monotonically improved policy π̂i which guarantees ηi ( π̂i , π−i ) ≥ ηi ( πi , π−i ) and give a trust payoff bound by π̂i . Due to the simultaneous policy improvement without awareness of other agents , however , the lower bound of payoff improvement from single-agent Schulman et al . ( 2015 ) no longer holds for multi-agent payoff improvement . Following the similar proof procedures , we can obtain a precise lower bound for a multi-agent simultaneous trust payoff region in Theorem 1 : Theorem 1 ( Independent Trust Payoff Region ) . Denote the expected advantage gain when πi , π−i → π̂i , π̂−i as : g πi , π−i i ( π̂i , π̂−i ) : = ∑ s pπi , π−i ( s ) ∑ ai π̂i ( ai|s ) ∑ a−i π̂−i ( a−i|s ) Aπi , π−ii ( s , ai , a−i ) . ( 3 ) Let αi = DmaxTV ( πi , π̂i ) = maxsDTV ( πi ( ·|s ) ‖π̂i ( ·|s ) ) for agent i , where DTV is total variation divergence ( Schulman et al. , 2015 ) . Then , the following lower bound can be derived for multi-agent independent trust region optimization : ηi ( π̂i , π̂−i ) − ηi ( πi , π−i ) ≥ gπi , π−ii ( π̂i , π̂−i ) − 4γ i ( 1− γ ) 2 ( αi + α−i − αiα−i ) 2 , ( 4 ) where i = maxs , a−i , a−i ∣∣Aπi , π−ii ( s , ai , a−i ) ∣∣ . Under review as a conference paper at ICLR 2021 Proof . See Appendix B . Based on the independent trust payoff improvement , although the predicted policy π̂i will guide us in determining the step size of the TPR , but the stability of ( π̂i , π̂−i ) is still unknown . As shown in Theorem 1 , an agent ’ s lower bound is roughly O ( 4α2 ) , which is four times larger than the single-agent lower bound trust region of O ( α2 ) ( Kakade & Langford , 2002 ) . Furthermore , i = maxs , a−i , a−i ∣∣Aπi , π−ii ( s , ai , a−i ) ∣∣ depends on the other agents ’ s action a−i that would be very large when agents have conflicting interests . Therefore , the most critical issue underlying the multi-agent trust region learning is to find a TSR after the TPR . In next section , we will illustrate how to search for a weak stable fixed point within the TPR , based on the policy-space meta-game analysis . | This paper proposes a modification of the Independent Learners trust region policy optimization method in general sum games. The modification consists of first forming a “meta game”—ie. the matrix game in which each agent’s options are his previous policy and his independent trust region optimized policy—-and then interpolating between the two for each agent according to a Nash equilibrium of the meta game. The paper shows that this algorithm results in each step generating a “weak stable fixed point”. The paper concludes by showing a number of experimental results indicating the convergence and overall performance of the method as compared with relevant baselines in a number of different games. | SP:10eba7b266e4d1443975f23593beae81e49a5051 |
Multi-Agent Trust Region Learning | 1 INTRODUCTION . Multi-agent systems ( MAS ) ( Shoham & Leyton-Brown , 2008 ) have received much attention from the reinforcement learning community . In real-world , automated driving ( Cao et al. , 2012 ) , StarCraft II ( Vinyals et al. , 2019 ) and Dota 2 ( Berner et al. , 2019 ) are a few examples of the myriad of applications that can be modeled by MAS . Due to the complexity of multi-agent problems ( Chatterjee et al. , 2004 ) , investigating if agents can learn to behave effectively during interactions with environments and other agents is essential ( Fudenberg et al. , 1998 ) . This can be achieved naively through the independent learner ( IL ) ( Tan , 1993 ) , which ignores the other agents and optimizes the policy assuming a stable environment ( Buşoniu et al. , 2010 ; Hernandez-Leal et al. , 2017 ) . Due to their theoretical guarantee and good empirical performance in real-world applications , trust region methods ( e.g. , PPO ( Schulman et al. , 2015 ; 2017 ) ) based ILs are popular ( Vinyals et al. , 2019 ; Berner et al. , 2019 ) . In single-agent learning , trust region methods can produce a monotonic payoff improvement guarantee ( Kakade & Langford , 2002 ) via line search ( Schulman et al. , 2015 ) . In multi-agent scenarios , however , an agent ’ s improvement is affected by other agent ’ s adaptive behaviors ( i.e. , the multi-agent environment is non-stationary ( Hernandez-Leal et al. , 2017 ) ) . As a result , trust region learners can measure the policy improvements of the agents ’ current policies , but the improvements of the updated opponents ’ policies are unknown ( shown in Fig . 1 ) . Therefore , trust region based ILs act less well in MAS as in single-agent tasks . Moreover , the convergence to a fixed point , such as a Nash equilibrium ( Nash et al. , 1950 ; Bowling & Veloso , 2004 ; Mazumdar et al. , 2020 ) , is a common and widely accepted solution concept for multi-agent learning . Thus , although independent learners can best respond to other agents ’ current policies , they lose their convergence guarantee ( Laurent et al. , 2011 ) . One solution to address the convergence problem for independent learners is Empirical GameTheoretic Analysis ( EGTA ) ( Wellman , 2006 ) , which approximates the best response to the policies generated by the independent learners ( Lanctot et al. , 2017 ; Muller et al. , 2019 ) . Although EGTA based methods ( Lanctot et al. , 2017 ; Omidshafiei et al. , 2019 ; Balduzzi et al. , 2019 ) establish Under review as a conference paper at ICLR 2021 < latexit sha1_base64= '' 1NN7F0aZfrdhNGV5c+4oOHrBfTM= '' > AAACEXicdVDLSgMxFM3UV62vqks3wSK4KjNS0YWLghuXFewD2qFk0jttaJIZk4xQhv6CGxf6K+7ErV/gn7g0087CtnggcDjn3uTkBDFn2rjut1NYW9/Y3Cpul3Z29/YPyodHLR0likKTRjxSnYBo4ExC0zDDoRMrICLg0A7Gt5nffgKlWSQfzCQGX5ChZCGjxGRSj8Njv1xxq+4MeJV4OamgHI1++ac3iGgiQBrKidZdz42NnxJlGOUwLfUSDTGhYzKErqWSCNB+Oss6xWdWGeAwUvZIg2fq342UCK0nIrCTgpiRXvYy8T8vu1EvvJ8GYimPCa/9lMk4MSDpPE6YcGwinNWDB0wBNXxiCaGK2R9hOiKKUGNLLNmqvOViVknrourVqpf3tUr9Ji+tiE7QKTpHHrpCdXSHGqiJKBqhZ/SK3pwX5935cD7nowUn3zlGC3C+fgHH+Z5O < /latexit > < latexit sha1_base64= '' 9HEuAo3NH+KpHjvH/J6u6lMbsxQ= '' > AAACDnicdVDLSgMxFL1TX7W+qi7dBIvgqsyIogvBghuXLdgHtEPJpJk2NMkMSUYoQ7/AjQv9FXfi1l/wT1yaaWdhWzwQOJxzb3JygpgzbVz32ymsrW9sbhW3Szu7e/sH5cOjlo4SRWiTRDxSnQBrypmkTcMMp51YUSwCTtvB+D7z209UaRbJRzOJqS/wULKQEWys1Ljrlytu1Z0BrRIvJxXIUe+Xf3qDiCSCSkM41rrrubHxU6wMI5xOS71E0xiTMR7SrqUSC6r9dBZ0is6sMkBhpOyRBs3UvxspFlpPRGAnBTYjvexl4n9edqNeeD8NxFIeE974KZNxYqgk8zhhwpGJUNYNGjBFieETSzBRzP4IkRFWmBjbYMlW5S0Xs0paF1XvsnrVuKzUbvPSinACp3AOHlxDDR6gDk0gQOEZXuHNeXHenQ/ncz5acPKdY1iA8/ULDlCc0Q== < /latexit > < latexit sha1_base64= '' 0MwWVFV0mTJ6Pj2jW71gFQUXJfk= '' > AAACEXicdVDLSgMxFM3UV62vqks3wSK4KjNS0YWLghuXFewD2qFk0jttaJIZk4xQhv6CGxf6K+7ErV/gn7g0087CtnggcDjn3uTkBDFn2rjut1NYW9/Y3Cpul3Z29/YPyodHLR0likKTRjxSnYBo4ExC0zDDoRMrICLg0A7Gt5nffgKlWSQfzCQGX5ChZCGjxGRSbwiP/XLFrboz4FXi5aSCcjT65Z/eIKKJAGkoJ1p3PTc2fkqUYZTDtNRLNMSEjskQupZKIkD76SzrFJ9ZZYDDSNkjDZ6pfzdSIrSeiMBOCmJGetnLxP+87Ea98H4aiKU8Jrz2UybjxICk8zhhwrGJcFYPHjAF1PCJJYQqZn+E6YgoQo0tsWSr8paLWSWti6pXq17e1yr1m7y0IjpBp+gceegK1dEdaqAmomiEntErenNenHfnw/mcjxacfOcYLcD5+gW/nZ5J < /latexit > < latexit sha1_base64= '' 9HEuAo3NH+KpHjvH/J6u6lMbsxQ= '' > AAACDnicdVDLSgMxFL1TX7W+qi7dBIvgqsyIogvBghuXLdgHtEPJpJk2NMkMSUYoQ7/AjQv9FXfi1l/wT1yaaWdhWzwQOJxzb3JygpgzbVz32ymsrW9sbhW3Szu7e/sH5cOjlo4SRWiTRDxSnQBrypmkTcMMp51YUSwCTtvB+D7z209UaRbJRzOJqS/wULKQEWys1Ljrlytu1Z0BrRIvJxXIUe+Xf3qDiCSCSkM41rrrubHxU6wMI5xOS71E0xiTMR7SrqUSC6r9dBZ0is6sMkBhpOyRBs3UvxspFlpPRGAnBTYjvexl4n9edqNeeD8NxFIeE974KZNxYqgk8zhhwpGJUNYNGjBFieETSzBRzP4IkRFWmBjbYMlW5S0Xs0paF1XvsnrVuKzUbvPSinACp3AOHlxDDR6gDk0gQOEZXuHNeXHenQ/ncz5acPKdY1iA8/ULDlCc0Q== < /latexit > < latexit sha1_base64= '' mlfS6P1wr0psE/0O2O9hkrlFv2g= '' > AAACbHicdVHBTtwwEPWmUOiWlm3LDSFZXYGotKySahEgcUDlAEdadQGJpJHjTBYLO4nsCWJl5ev6FXwClx7aS494wx66izqSpaf3ZsbPz0kphUHfv295LxYWXy4tv2q/XnnzdrXz7v25KSrNYcgLWejLhBmQIochCpRwWWpgKpFwkdwcT/SLW9BGFPl3HJcQKTbKRSY4Q0fFnShMIXOzzSarxhrS2n47+VLbYH/Qowe7PToI6nYIyGK7I+rtsBSxFXUvRLjDmalGcS0/HNJCQV1/ijtdv+83RZ+DYAq6ZFpncedvmBa8UpAjl8yYq8AvMbJMo+ASnI/KQMn4DRvBlYM5U2Ai29io6aZjUpoV2p0cacP+O2GZMmasEtepGF6beW1C/k+bbDQz99tEzfnBbD+yIi8rhJw/2ckqSbGgk+RpKjRwlGMHGNfCvYjya6YZR/c/bRdVMB/Mc3D+uR8M+gdfB92jw2loy2SdfCTbJCB75IickjMyJJz8JA/kN/nT+uWteevexlOr15rOfCAz5W09Arjwv3Y= < /latexit > < latexit sha1_base64= '' DcIAKyRK95otGmn1ylfKJLkPQG4= '' > AAACiHicdVHBTttAEF2b0oa0hUCPXFaNKlEpRDZKRSJxQHCAI6AGkHBqrddjWLFrW7tjhLXyh3LiN3pkE3IgQYy00tObNzNvZ5JSCoNB8OT5K59WP39prbW/fvu+vtHZ3Lo0RaU5jHkhC32dMANS5DBGgRKuSw1MJRKukvvjaf7qAbQRRf4X6xImit3mIhOcoaPiTh2lkLnaWSerag1pYy9OjhobDgc9OvrTo4OwaUeALLa7otmJEB5xQR2VIrai+eeAFgqapveBZvet6Hfc6Qb9YBb0PQjnoEvmcRZ3/kdpwSsFOXLJjLkJgxInlmkUXILzWBkoGb9nt3DjYM4UmImd2WjoL8ekNCu0eznSGfu2wjJlTK0Sp1QM78xybkp+lJt2NAvzbaKW/GA2nFiRlxVCzl/tZJWkWNDpVWgqNHCUtQOMa+F+RPkd04yju13brSpcXsx7cLnXDwf90fmge3gwX1qLbJOfZIeEZJ8cklNyRsaEk2dv1Vv3Nvy2H/j7/uhV6nvzmh9kIfyjF/pHyLI= < /latexit > < latexit sha1_base64= '' EGsGKugD16zqH57YPB5KPfiuvxo= '' > AAACh3icdVFNTxsxEPUuUCDlI9AjF4sIiUppuosCJBIHaA/lSCsCSGwaeb2zYGHvruxZlMjaH9pLf0eP9YYcSBAjWXp67834eRwXUhgMgj+ev7S88mF1bb3xcWNza7u5s3tj8lJzGPBc5vouZgakyGCAAiXcFRqYiiXcxk/fa/32GbQReXaNkwKGij1kIhWcoaNGzXGUQOp6p5OsmmhIKvvrx7fKhr1um/aP27QbVo0IkI2sqA4jhDHOmaNC1MpvB7RQUFXtdzxfXps+j5qtoBNMi74F4Qy0yKyuRs1/UZLzUkGGXDJj7sOgwKFlGgWX4CKWBgrGn9gD3DuYMQVmaKcxKnrgmISmuXYnQzplX3dYpoyZqNg5FcNHs6jV5HtaPdHM3W9jtZAH097QiqwoETL+EictJcWc1p9CE6GBo5w4wLgW7kWUPzLNOLqva7hVhYuLeQtujjpht9P/2W2dn82Wtkb2yD45JCE5JefkklyRAeHkr7fsbXpb/rr/1T/xey9W35v1fCJz5V/8B2ymyHs= < /latexit > < latexit sha1_base64= '' QmmZ03/Sf6mnjXKt2E0v8KaahaA= '' > AAACa3icdVHBTtwwEPUGaGFpYYEb9GCxQqLSskqqRYDEAdEDPQJiAYksK8eZgIWdRPYEsbLyc/2L/gEXDvTUY52wh+6ijmTp6b2Z8fNzlEth0Pd/NbyZ2bkPH+cXmoufPi8tt1ZWL01WaA59nslMX0fMgBQp9FGghOtcA1ORhKvo4XulXz2CNiJLL3CUw0Cxu1QkgjN01LAVhjEkbrbeZNVIQ1za85Pj0gb7vQ492O3QXlA2Q0A2tKLcDhGecKI5zEWl3DqghYKy7NTMjii/Dlttv+vXRd+DYAzaZFynw9afMM54oSBFLpkxN4Gf48AyjYJLcDYKAznjD+wObhxMmQIzsLWdkm45JqZJpt1JkdbsvxOWKWNGKnKdiuG9mdYq8n9atdFM3G8jNeUHk/2BFWleIKT8zU5SSIoZrYKnsdDAUY4cYFwL9yLK75lmHN33NF1UwXQw78Hlt27Q6x6c9dpHh+PQ5skG2STbJCB75Ij8IKekTzj5SZ7JK/ndePHWvHXvy1ur1xjPrJGJ8rb+Ajxhvz8= < /latexit > < latexit sha1_base64= '' oa4StdeIIx+XA1qsMVANMuqxEMQ= '' > AAACT3icdVHLSgMxFM3UV1tfVZdugkVQqGVGKiq4KLrQpYpVwZaSydzRYDIzJBmhhPkdv8aNCwW/RFdiZpyFVrxwuYdznznxE86Udt03pzIxOTU9U63VZ+fmFxYbS8uXKk4lhR6NeSyvfaKAswh6mmkO14kEInwOV/79UZ6/egCpWBxd6FECA0FuIxYySrSlho1uP4DQ9haTjBhJCDJzfnyYGW+v08L7Oy3c8bJ6HzQZGpZt9BOWx1YRt1i2OWw03bZbGP4LvBI0UWmnw8ZHP4hpKiDSlBOlbjw30QNDpGaUg12VKkgIvSe3cGNhRASogSnuy/C6ZQIcxtJ6pHHB/uwwRCg1Er6tFETfqfFcTv6XyyeqX/uNL8bu0eHewLAoSTVE9PucMOVYxzgXFwdMAtV8ZAGhktkXYXpHJKHafkHdSuWNC/MXXG63vU57/6zT7B6UolXRKlpDG8hDu6iLTtAp6iGKHtETekGvzrPz7nxWytKKU4IV9MsqtS/6MLQF < /latexit > < latexit sha1_base64= '' H8UEmSja/X4EcOJ731PXDegUMN8= '' > AAACUHicdVHPSxtBFH4btWq0bbTHXgZDIUIadiVFBQ/WHuwxlkYDJiyzs291cGZ3mZkVwrB/j3+NFw+K/4k3nWxS0EgfPN7H937ON1EuuDa+/+jVFhaXPiyvrNbX1j9++tzY2DzVWaEY9lkmMjWIqEbBU+wbbgQOcoVURgLPoqtfk/zZNSrNs/SvGec4kvQi5Qln1DgqbPwcxpi43mqSlWOFcWn/HB+VNtjrtsn+jzbpBmV9iIaG9jsvW8Och5aX7So6YjtsNP2OXxl5D4IZaMLMemHjaRhnrJCYGiao1ueBn5uRpcpwJtDtKjTmlF3RCzx3MKUS9chWB5bkm2NikmTKeWpIxb7usFRqPZaRq5TUXOr53IT8X24yUb/ZbyM5d49J9kaWp3lhMGXTc5JCEJORibok5gqZEWMHKFPcvYiwS6ooM+4P6k6qYF6Y9+B0pxN0O/sn3ebhwUy0FfgKW9CCAHbhEH5DD/rA4AZu4R4evDvvyXuuedPSfxG+wBur1V8AfZi0PA== < /latexit > convergence guarantees in several games classes , the computational cost is also large when empirically approximating and solving the increasing meta-game ( Yang et al. , 2019 ) . Other multi-agent learning approaches collect or approximate additional information such as communication ( Foerster et al. , 2016 ) and centralized joint critics ( Lowe et al. , 2017 ; Foerster et al. , 2017 ; Sunehag et al. , 2018 ; Rashid et al. , 2018 ) . Nevertheless , these methods usually require centralized parameters or centralized communication assumptions . Thus , there is considerable interest in multi-agent learning to find an algorithm that , while having minimal requirements and computational cost as independent learners , also improves convergence performance at the same time . This paper presents the Multi-Agent Trust Region Learning ( MATRL ) algorithm that augments the trust-region ILs with a meta-game analysis to improve the stability and efficiency of learning . In MATRL , a trust region trial step for an agents ’ payoff improvement is implemented by independent learners , which gives a predicted policy based on the current policy . Then , an empirical policy-space meta-game is constructed to compare the expected advantage of predicted policies with the current policies . By solving the meta-game , MATRL finds a restricted step by aggregating the current and predicted policies using meta-game Nash Equilibrium . Finally , MATRL takes the best responses based on the aggregated policies from last step for each agent to explore because the found TSR is not always strict stable . MATRL is , therefore , able to provide a weak stable solution compared with the naive independent learners . Based on trust region independent learners , MATRL does not need extra parameters , simulations , or modifications to the independent learner itself . We provide insights into the empirical meta-game in Section 3.2 , showing that an approximated Nash equilibrium of the meta-game is a weak stable fixed point of the underlying game . Our experiments demonstrate that MATRL significantly outperforms deep independent learners ( Schulman et al. , 2017 ) with the same hyper-parameters , centralized VDN ( Sunehag et al. , 2018 ) , QMIX ( Rashid et al. , 2018 ) methods in discrete action grid-worlds , centralized MADDPG ( Lowe et al. , 2017 ) in a continuous action multi-agent MuJoCo task ( de Witt et al. , 2020 ) and zero-sum multi-agent Atari ( Terry & Black , 2020 ) . 2 PRELIMINARY . A Stochastic Game ( Shapley , 1953 ; Littman , 1994 ) can be defined as : G = 〈N , S , { Ai } , { Ri } , P , p0 , γ〉 , where N is a set of agents , n = |N | is the number of agents and S denotes the state space . Ai is the action space for agent i . A = A1 × · · · × An = Ai ×A−i is the joint action space , and for the simplicity we use −i denotes the other agents except agent i. Ri = Ri ( s , ai , a−i ) is the reward function for agent i ∈ N . P : S ×A×S → [ 0 , 1 ] is the transition function . p0 is the initial state distribution , γ ∈ [ 0 , 1 ] is a discount factor . Each agent i ∈ N has a stochastic policy πi ( ai|s ) : S ×Ai → [ 0 , 1 ] , and aims to maximize its long term discounted return : ηi ( πi , π−i ) = Es0 , a0i , a0−i··· [ ∞∑ t=0 γtRi ( s t , ati , a t −i ) ] , ( 1 ) where s0 ∼ p0 , st+1 ∼ P ( st+1|st , ati , at−i ) , ati ∼ πi ( ati|τ ti ) . We then can have the standard definitions of the state-action value function Qπi , π−ii ( s t , ati , a t −i ) = Est+1 , at+1i , at+1−i ··· [ ∑∞ l=0 γ lRi ( s t+l , at+li , a t+l −i ) ] , the value function V πi , π−i i ( s t ) = Eati , at−i , st+1··· [ ∑∞ l=0 γ lRi ( s t+l , at+li , a t+l −i ) ] , and the advantage function A πi , π−i i ( s t , ati , a t −i ) = Q πi , π−i i ( s t , ati , a t −i ) − V πi , π−i i ( s t ) given the state and joint action . 3 MULTI-AGENT TRUST REGION POLICY OPTIMIZATION . A trust region algorithm aims to answer two questions : how to compute a trust region trial step and whether a trial step should be accepted . In multi-agent learning , a trust region trial step towards agents ’ payoff improvement can be easily implemented with independent learners , and we call the independent payoff improvement area as Trust Payoff Region ( TPR ) . The remaining issue is Under review as a conference paper at ICLR 2021 < latexit sha1_base64= '' 2oAtTy/Ncb1ME0cbS1OEdDjtsJk= '' > AAACFHicdVDLSgMxFL1TX7W+qi7dBIvgqsxIoQouCm5cVrAPaIeSSTNtaJIZkoxQhn6EGxf6K+7ErXv/xKWZdha2xQOBwzn3JicniDnTxnW/ncLG5tb2TnG3tLd/cHhUPj5p6yhRhLZIxCPVDbCmnEnaMsxw2o0VxSLgtBNM7jK/80SVZpF8NNOY+gKPJAsZwcZKnX7MBimbDcoVt+rOgdaJl5MK5GgOyj/9YUQSQaUhHGvd89zY+ClWhhFOZ6V+ommMyQSPaM9SiQXVfjqPO0MXVhmiMFL2SIPm6t+NFAutpyKwkwKbsV71MvE/L7tRL72fBmIljwmv/ZTJODFUkkWcMOHIRChrCA2ZosTwqSWYKGZ/hMgYK0yM7bFkq/JWi1kn7auqV6vePNQqjdu8tCKcwTlcggd1aMA9NKEFBCbwDK/w5rw4786H87kYLTj5zikswfn6BXmRn8c= < /latexit > < latexit sha1_base64= '' Klbc1KwZmtVbQeokYl+k7FxbmTM= '' > AAACFXicdVDLSgMxFL1TX7W+qi7dBIvgxjIjBRVcFNy4rGAf0A4lk2ba0CQzJBmhDP0JNy70V9yJW9f+iUsz7SxsiwcCh3PuTU5OEHOmjet+O4W19Y3NreJ2aWd3b/+gfHjU0lGiCG2SiEeqE2BNOZO0aZjhtBMrikXAaTsY32V++4kqzSL5aCYx9QUeShYygo2VOr2Y9dMLNu2XK27VnQGtEi8nFcjR6Jd/eoOIJIJKQzjWuuu5sfFTrAwjnE5LvUTTGJMxHtKupRILqv10lneKzqwyQGGk7JEGzdS/GykWWk9EYCcFNiO97GXif152o154Pw3EUh4TXvspk3FiqCTzOGHCkYlQVhEaMEWJ4RNLMFHM/giREVaYGFtkyVblLRezSlqXVa9WvXmoVeq3eWlFOIFTOAcPrqAO99CAJhDg8Ayv8Oa8OO/Oh/M5Hy04+c4xLMD5+gXr8p/+ < /latexit > < latexit sha1_base64= '' nVAjToaXS6TUfJk8m1M/i0MhQuI= '' > AAACGnicdVDLSgMxFM3UV62vqks3wSK4KjNSUMFFwY3LCvYB7VAyaaYNTTJjckcoQ7/DjQv9FXfi1o1/4tJMOwvb4oELh3MfOTlBLLgB1/12CmvrG5tbxe3Szu7e/kH58KhlokRT1qSRiHQnIIYJrlgTOAjWiTUjMhCsHYxvs377iWnDI/UAk5j5kgwVDzklYCW/NyKQ9mI+7ae2yhW36s6AV4mXkwrK0eiXf3qDiCaSKaCCGNP13Bj8lGjgVLBpqZcYFhM6JkPWtVQRyYyfzkxP8ZlVBjiMtC0FeKb+3UiJNGYiAzspCYzMci8T/+tlF83C+2kgl/xAeOWnXMUJMEXndsJEYIhwlhMecM0oiIklhGpuf4TpiGhCwaZZslF5y8GsktZF1atVr+9rlfpNHloRnaBTdI48dInq6A41UBNR9Iie0St6c16cd+fD+ZyPFpx85xgtwPn6BbVvopQ= < /latexit > < latexit sha1_base64= '' y8DmZzR1FkK1TScjZBKVMREfb1A= '' > AAACG3icdVDLSgMxFL3js9ZX1aWbYBHcWGakoIKLghuXFewDOrVk0kwbmmSGJCOUof/hxoX+ijtx68I/cWmmnYVt8UDC4Zx7b25OEHOmjet+Oyura+sbm4Wt4vbO7t5+6eCwqaNEEdogEY9UO8CaciZpwzDDaTtWFIuA01Ywus381hNVmkXywYxj2hV4IFnICDZWevSH2KR+zCa99NxepbJbcadAy8TLSRly1HulH78fkURQaQjHWnc8NzbdFCvDCKeTop9oGmMywgPasVRiQXU3nW49QadW6aMwUvZIg6bq344UC63HIrCVApuhXvQy8T8vm6jn3k8DsbCPCa+6KZNxYqgks3XChCMToSwo1GeKEsPHlmCimP0RIkOsMDE2zqKNylsMZpk0LypetXJ9Xy3XbvLQCnAMJ3AGHlxCDe6gDg0goOAZXuHNeXHenQ/nc1a64uQ9RzAH5+sXKnyiyw== < /latexit > < latexit sha1_base64= '' 9WUTxmFWU67i+UjWWsa7nYUvrow= '' > AAACFnicdVDLSgMxFL1TX7W+qi7dBIsgLsqMFFRwUXDjsoJ9SDuWTJppQ5PMkGSEMvQr3LjQX3Enbt36Jy7NtF3YFg8EDufcm5ycIOZMG9f9dnIrq2vrG/nNwtb2zu5ecf+goaNEEVonEY9UK8CaciZp3TDDaStWFIuA02YwvMn85hNVmkXy3oxi6gvclyxkBBsrPXRi1k3Z+PGsWyy5ZXcCtEy8GSnBDLVu8afTi0giqDSEY63bnhsbP8XKMMLpuNBJNI0xGeI+bVsqsaDaTyeBx+jEKj0URsoeadBE/buRYqH1SAR2UmAz0IteJv7nZTfquffTQCzkMeGlnzIZJ4ZKMo0TJhyZCGUdoR5TlBg+sgQTxeyPEBlghYmxTRZsVd5iMcukcV72KuWru0qpej0rLQ9HcAyn4MEFVOEWalAHAgKe4RXenBfn3flwPqejOWe2cwhzcL5+AaxmoGM= < /latexit > < latexit sha1_base64= '' ymbUExUlNEE2ahN3gNpcw6isMQ8= '' > AAACF3icdVDLSgMxFL3js9ZX1aWbYBFEsMxIQQUXBTcuK9gHtmPJpGkbmmSGJCOUoX/hxoX+ijtx69I/cWmmnYVt8UDgcM69yckJIs60cd1vZ2l5ZXVtPbeR39za3tkt7O3XdRgrQmsk5KFqBlhTziStGWY4bUaKYhFw2giGN6nfeKJKs1Dem1FEfYH7kvUYwcZKD+2IdZIzNn487RSKbsmdAC0SLyNFyFDtFH7a3ZDEgkpDONa65bmR8ROsDCOcjvPtWNMIkyHu05alEguq/WSSeIyOrdJFvVDZIw2aqH83Eiy0HonATgpsBnreS8X/vPRGPfN+Eoi5PKZ36SdMRrGhkkzj9GKOTIjSklCXKUoMH1mCiWL2R4gMsMLE2CrztipvvphFUj8veeXS1V25WLnOSsvBIRzBCXhwARW4hSrUgICEZ3iFN+fFeXc+nM/p6JKT7RzADJyvXx80oJo= < /latexit > < latexit sha1_base64= '' 2oAtTy/Ncb1ME0cbS1OEdDjtsJk= '' > AAACFHicdVDLSgMxFL1TX7W+qi7dBIvgqsxIoQouCm5cVrAPaIeSSTNtaJIZkoxQhn6EGxf6K+7ErXv/xKWZdha2xQOBwzn3JicniDnTxnW/ncLG5tb2TnG3tLd/cHhUPj5p6yhRhLZIxCPVDbCmnEnaMsxw2o0VxSLgtBNM7jK/80SVZpF8NNOY+gKPJAsZwcZKnX7MBimbDcoVt+rOgdaJl5MK5GgOyj/9YUQSQaUhHGvd89zY+ClWhhFOZ6V+ommMyQSPaM9SiQXVfjqPO0MXVhmiMFL2SIPm6t+NFAutpyKwkwKbsV71MvE/L7tRL72fBmIljwmv/ZTJODFUkkWcMOHIRChrCA2ZosTwqSWYKGZ/hMgYK0yM7bFkq/JWi1kn7auqV6vePNQqjdu8tCKcwTlcggd1aMA9NKEFBCbwDK/w5rw4786H87kYLTj5zikswfn6BXmRn8c= < /latexit > < latexit sha1_base64= '' Klbc1KwZmtVbQeokYl+k7FxbmTM= '' > AAACFXicdVDLSgMxFL1TX7W+qi7dBIvgxjIjBRVcFNy4rGAf0A4lk2ba0CQzJBmhDP0JNy70V9yJW9f+iUsz7SxsiwcCh3PuTU5OEHOmjet+O4W19Y3NreJ2aWd3b/+gfHjU0lGiCG2SiEeqE2BNOZO0aZjhtBMrikXAaTsY32V++4kqzSL5aCYx9QUeShYygo2VOr2Y9dMLNu2XK27VnQGtEi8nFcjR6Jd/eoOIJIJKQzjWuuu5sfFTrAwjnE5LvUTTGJMxHtKupRILqv10lneKzqwyQGGk7JEGzdS/GykWWk9EYCcFNiO97GXif152o154Pw3EUh4TXvspk3FiqCTzOGHCkYlQVhEaMEWJ4RNLMFHM/giREVaYGFtkyVblLRezSlqXVa9WvXmoVeq3eWlFOIFTOAcPrqAO99CAJhDg8Ayv8Oa8OO/Oh/M5Hy04+c4xLMD5+gXr8p/+ < /latexit > < latexit sha1_base64= '' nVAjToaXS6TUfJk8m1M/i0MhQuI= '' > AAACGnicdVDLSgMxFM3UV62vqks3wSK4KjNSUMFFwY3LCvYB7VAyaaYNTTJjckcoQ7/DjQv9FXfi1o1/4tJMOwvb4oELh3MfOTlBLLgB1/12CmvrG5tbxe3Szu7e/kH58KhlokRT1qSRiHQnIIYJrlgTOAjWiTUjMhCsHYxvs377iWnDI/UAk5j5kgwVDzklYCW/NyKQ9mI+7ae2yhW36s6AV4mXkwrK0eiXf3qDiCaSKaCCGNP13Bj8lGjgVLBpqZcYFhM6JkPWtVQRyYyfzkxP8ZlVBjiMtC0FeKb+3UiJNGYiAzspCYzMci8T/+tlF83C+2kgl/xAeOWnXMUJMEXndsJEYIhwlhMecM0oiIklhGpuf4TpiGhCwaZZslF5y8GsktZF1atVr+9rlfpNHloRnaBTdI48dInq6A41UBNR9Iie0St6c16cd+fD+ZyPFpx85xgtwPn6BbVvopQ= < /latexit > < latexit sha1_base64= '' y8DmZzR1FkK1TScjZBKVMREfb1A= '' > AAACG3icdVDLSgMxFL3js9ZX1aWbYBHcWGakoIKLghuXFewDOrVk0kwbmmSGJCOUof/hxoX+ijtx68I/cWmmnYVt8UDC4Zx7b25OEHOmjet+Oyura+sbm4Wt4vbO7t5+6eCwqaNEEdogEY9UO8CaciZpwzDDaTtWFIuA01Ywus381hNVmkXywYxj2hV4IFnICDZWevSH2KR+zCa99NxepbJbcadAy8TLSRly1HulH78fkURQaQjHWnc8NzbdFCvDCKeTop9oGmMywgPasVRiQXU3nW49QadW6aMwUvZIg6bq344UC63HIrCVApuhXvQy8T8vm6jn3k8DsbCPCa+6KZNxYqgks3XChCMToSwo1GeKEsPHlmCimP0RIkOsMDE2zqKNylsMZpk0LypetXJ9Xy3XbvLQCnAMJ3AGHlxCDe6gDg0goOAZXuHNeXHenQ/nc1a64uQ9RzAH5+sXKnyiyw== < /latexit > < latexit sha1_base64= '' 9WUTxmFWU67i+UjWWsa7nYUvrow= '' > AAACFnicdVDLSgMxFL1TX7W+qi7dBIsgLsqMFFRwUXDjsoJ9SDuWTJppQ5PMkGSEMvQr3LjQX3Enbt36Jy7NtF3YFg8EDufcm5ycIOZMG9f9dnIrq2vrG/nNwtb2zu5ecf+goaNEEVonEY9UK8CaciZp3TDDaStWFIuA02YwvMn85hNVmkXy3oxi6gvclyxkBBsrPXRi1k3Z+PGsWyy5ZXcCtEy8GSnBDLVu8afTi0giqDSEY63bnhsbP8XKMMLpuNBJNI0xGeI+bVsqsaDaTyeBx+jEKj0URsoeadBE/buRYqH1SAR2UmAz0IteJv7nZTfquffTQCzkMeGlnzIZJ4ZKMo0TJhyZCGUdoR5TlBg+sgQTxeyPEBlghYmxTRZsVd5iMcukcV72KuWru0qpej0rLQ9HcAyn4MEFVOEWalAHAgKe4RXenBfn3flwPqejOWe2cwhzcL5+AaxmoGM= < /latexit > < latexit sha1_base64= '' ymbUExUlNEE2ahN3gNpcw6isMQ8= '' > AAACF3icdVDLSgMxFL3js9ZX1aWbYBFEsMxIQQUXBTcuK9gHtmPJpGkbmmSGJCOUoX/hxoX+ijtx69I/cWmmnYVt8UDgcM69yckJIs60cd1vZ2l5ZXVtPbeR39za3tkt7O3XdRgrQmsk5KFqBlhTziStGWY4bUaKYhFw2giGN6nfeKJKs1Dem1FEfYH7kvUYwcZKD+2IdZIzNn487RSKbsmdAC0SLyNFyFDtFH7a3ZDEgkpDONa65bmR8ROsDCOcjvPtWNMIkyHu05alEguq/WSSeIyOrdJFvVDZIw2aqH83Eiy0HonATgpsBnreS8X/vPRGPfN+Eoi5PKZ36SdMRrGhkkzj9GKOTIjSklCXKUoMH1mCiWL2R4gMsMLE2CrztipvvphFUj8veeXS1V25WLnOSsvBIRzBCXhwARW4hSrUgICEZ3iFN+fFeXc+nM/p6JKT7RzADJyvXx80oJo= < /latexit > < latexit sha1_base64= '' dGmSt7Qks3BA2LjCv++bzX6uitc= '' > AAACH3icdVDNS8MwHE3n15xfVY9egkPwNFoRVPAw8OJxgvuAtZY0S7ewpA1JOhil/4kXD/qveBOv+088mm49uA0fBB7v/X7JywsFo0o7zsyqbGxube9Ud2t7+weHR/bxSUclqcSkjROWyF6IFGE0Jm1NNSM9IQniISPdcPxQ+N0JkYom8bOeCuJzNIxpRDHSRgps2xM0yGj+knlCUk7ywK47DWcOuE7cktRBiVZg/3iDBKecxBozpFTfdYT2MyQ1xYzkNS9VRCA8RkPSNzRGnCg/myfP4YVRBjBKpDmxhnP170aGuFJTHppJjvRIrXqF+J9X3KiW3s9CvpJHR7d+RmORahLjRZwoZVAnsCgLDqgkWLOpIQhLan4E8QhJhLWptGaqcleLWSedq4Z73bh7uq4378vSquAMnINL4IIb0ASPoAXaAIMJeAXv4MN6sz6tL+t7MVqxyp1TsARr9gvEf6Qh < /latexit > < latexit sha1_base64= '' pyoziTv79JsJ9qsAPoGpMJD40Kc= '' > AAACIHicdVDNS8MwHE39nPOr06OX4BC8OFoZqOBh4MXjBPcBay1plm5hSVqSVBmlf4oXD/qveBOP+pd4NN12cBs+CDze+/2SlxcmjCrtOF/Wyura+sZmaau8vbO7t29XDtoqTiUmLRyzWHZDpAijgrQ01Yx0E0kQDxnphKObwu88EqloLO71OCE+RwNBI4qRNlJgV7yEBtkZzR8yL5GUkzywq07NmQAuE3dGqmCGZmD/eP0Yp5wIjRlSquc6ifYzJDXFjORlL1UkQXiEBqRnqECcKD+bRM/hiVH6MIqlOULDifp3I0NcqTEPzSRHeqgWvUL8zytuVHPvZyFfyKOjSz+jIkk1EXgaJ0oZ1DEs2oJ9KgnWbGwIwpKaH0E8RBJhbTotm6rcxWKWSfu85tZrV3f1auN6VloJHIFjcApccAEa4BY0QQtg8ASewSt4s16sd+vD+pyOrliznUMwB+v7Fzi1pFg= < /latexit > < latexit sha1_base64= '' GgMP7Zgs4dXCmTjvBxmEYdeShb4= '' > AAACG3icdVDLSgMxFL3js9ZX1aWbYBHcWGakoIKLghuXFewDOmPJpGkbmmSGJCOUof/hxoX+ijtx68I/cWmmnYVt8UDC4Zx7b25OGHOmjet+Oyura+sbm4Wt4vbO7t5+6eCwqaNEEdogEY9UO8SaciZpwzDDaTtWFIuQ01Y4us381hNVmkXywYxjGgg8kKzPCDZWevRDrFI/ZpNuem6vUtmtuFOgZeLlpAw56t3Sj9+LSCKoNIRjrTueG5sgxcowwumk6CeaxpiM8IB2LJVYUB2k060n6NQqPdSPlD3SoKn6tyPFQuuxCG2lwGaoF71M/M/LJuq599NQLOxj+ldBymScGCrJbJ1+wpGJUBYU6jFFieFjSzBRzP4IkSFWmBgbZ9FG5S0Gs0yaFxWvWrm+r5ZrN3loBTiGEzgDDy6hBndQhwYQUPAMr/DmvDjvzofzOStdcfKeI5iD8/ULHNCiww== < /latexit > < latexit sha1_base64= '' ID+Z/3jlew3kk/MK1ozKW97Oqfo= '' > AAACGnicdVDLSgMxFL1TX7W+qi7dBIvgqsxIQQUXBTcuK9gHdIaSSTNtaJIZk4xQhn6HGxf6K+7ErRv/xKVpOwvb4oELh3MfOTlhwpk2rvvtFNbWNza3itulnd29/YPy4VFLx6kitEliHqtOiDXlTNKmYYbTTqIoFiGn7XB0O+23n6jSLJYPZpzQQOCBZBEj2Fgp8EOsMj9hk15mq1xxq+4MaJV4OalAjkav/OP3Y5IKKg3hWOuu5yYmyLAyjHA6KfmppgkmIzygXUslFlQH2cz0BJ1ZpY+iWNmSBs3UvxsZFlqPRWgnBTZDvdybiv/1phf1wvtZKJb8mOgqyJhMUkMlmduJUo5MjKY5oT5TlBg+tgQTxeyPEBlihYmxaZZsVN5yMKukdVH1atXr+1qlfpOHVoQTOIVz8OAS6nAHDWgCgUd4hld4c16cd+fD+ZyPFpx85xgW4Hz9AqfLoow= < /latexit > revolved by finding a restricted step leading to a stable point in the joint policy space , denoted as Trust Stable Region ( TSR ) . In other words , multi-agent trust region learning ( MATRL ) decomposes the trust region learning into two parts : firstly , find a trust payoff region between current policy πi and predicted policy π̂i ; then , with the help of the predicted policy , a precise method can , to some extent , approximate a weak stable fixed point . Instead of line searching in a single-agent payoff improvement , MATRL searches for the joint policy space to achieve a weak stable fixed point ( see Fig . 2 ) . Essentially , MATRL is a simple extension of the single-agent TRPO to MAS where independent learners learn to find a stable point between current policy and predicted policy . To solve the TSR , we assume the knowledge about other agents ’ policies during the training to find weak stable points via empirical meta-game analysis , while the execution can still be fully decentralized . We explain every step of MATRL in detail in the following sections . 3.1 INDEPENDENT TRUST PAYOFF IMPROVEMENT . Single-agent reinforcement learning algorithms can be straightforwardly applied to multi-agent learning , where we assume that all agents behave independently ( Tan , 1993 ) . In this section , we have chosen the policy-based reinforcement learning method as independent learners . In multi-agent games , the environment becomes a Markov decision process for agent i when each of the other agents plays according to a fixed policy . We set agent i ’ s to make a monotonic improvement against the fixed opponent policies . Thus , at each iteration , the policy is updated by maximizing the utility function ηi over a local neighborhood of the current joint policy πi , π−i : π̂i = arg maxπi∈Πi ηi ( πi , π−i ) based on the trajectories sampled by πi , π−i . We can adopt trust region policy optimization ( e.g. , PPO ( Schulman et al. , 2017 ) ) , which constrains step size in the policy update : π̂i = arg max πi∈Πθi ηi ( πi , π−i ) s.t . D ( πi , π̂i ) ≤ δi , ( 2 ) where D is a distance measurement and δi is a constraint . Independent trust region learners produce the monotonically improved policy π̂i which guarantees ηi ( π̂i , π−i ) ≥ ηi ( πi , π−i ) and give a trust payoff bound by π̂i . Due to the simultaneous policy improvement without awareness of other agents , however , the lower bound of payoff improvement from single-agent Schulman et al . ( 2015 ) no longer holds for multi-agent payoff improvement . Following the similar proof procedures , we can obtain a precise lower bound for a multi-agent simultaneous trust payoff region in Theorem 1 : Theorem 1 ( Independent Trust Payoff Region ) . Denote the expected advantage gain when πi , π−i → π̂i , π̂−i as : g πi , π−i i ( π̂i , π̂−i ) : = ∑ s pπi , π−i ( s ) ∑ ai π̂i ( ai|s ) ∑ a−i π̂−i ( a−i|s ) Aπi , π−ii ( s , ai , a−i ) . ( 3 ) Let αi = DmaxTV ( πi , π̂i ) = maxsDTV ( πi ( ·|s ) ‖π̂i ( ·|s ) ) for agent i , where DTV is total variation divergence ( Schulman et al. , 2015 ) . Then , the following lower bound can be derived for multi-agent independent trust region optimization : ηi ( π̂i , π̂−i ) − ηi ( πi , π−i ) ≥ gπi , π−ii ( π̂i , π̂−i ) − 4γ i ( 1− γ ) 2 ( αi + α−i − αiα−i ) 2 , ( 4 ) where i = maxs , a−i , a−i ∣∣Aπi , π−ii ( s , ai , a−i ) ∣∣ . Under review as a conference paper at ICLR 2021 Proof . See Appendix B . Based on the independent trust payoff improvement , although the predicted policy π̂i will guide us in determining the step size of the TPR , but the stability of ( π̂i , π̂−i ) is still unknown . As shown in Theorem 1 , an agent ’ s lower bound is roughly O ( 4α2 ) , which is four times larger than the single-agent lower bound trust region of O ( α2 ) ( Kakade & Langford , 2002 ) . Furthermore , i = maxs , a−i , a−i ∣∣Aπi , π−ii ( s , ai , a−i ) ∣∣ depends on the other agents ’ s action a−i that would be very large when agents have conflicting interests . Therefore , the most critical issue underlying the multi-agent trust region learning is to find a TSR after the TPR . In next section , we will illustrate how to search for a weak stable fixed point within the TPR , based on the policy-space meta-game analysis . | This paper presents a new trust-region method for multi-agent reinforcement learning (MARL). This approach extends ideas from single-agent trust-region methods to construct a smaller meta-game representing possible policy changes for each agent. The meta-game can then be solve to provide policy updates for the agents. Theory is provided for the meta-game (and corresponding restricted underlying game) and experimental results are shown with a number of baselines. | SP:10eba7b266e4d1443975f23593beae81e49a5051 |
Aspect-based Sentiment Classification via Reinforcement Learning | 1 INTRODUCTION . The goal of aspect-based ( also known as aspect-level ) sentiment classification is to predict the sentiment polarities of individual aspects . As shown in Figure 1 , given a sentence “ I like this computer but do not like the screen ” , the sentiment of the aspect “ computer ” is positive because of “ like ” . Meanwhile , the sentiment of the aspect “ screen ” is negative for ” do not like ” . Aspect-based sentiment classification is challenging , where the core problem is to correctly align aspects with their sentiment descriptions . State-of-the-art methods rely on supervision signals to automatically learn such alignment . By leveraging textual context and word-level attention learned from deep models ( Vo & Zhang , 2015 ; Dong et al. , 2014 ; Bahdanau et al. , 2014 ; Luong et al. , 2015 ; Xu et al. , 2015 ; Wang et al. , 2016 ; Tang et al. , 2016b ; Ma et al. , 2017a ; He et al. , 2018 ; Zhang et al. , 2018 ; 2019 ; Gao et al. , 2019 ; Tang et al. , 2020 ) , existing methods have made great progress on discovering aspect-specific sentimental statements . Meanwhile , the existing methods could suffer serious overfitting problems , as natural language inevitably includes a large proportion of task-irrelevant texts , or noise from the perspective of machine learning . Ideally , with a sufficient amount of training labels , the existing methods could effectively contain the negative impact of such task-irrelevant information . In practice , because of the high variance in language expression , it is costly to collect a large number of task-specific labels , and it is difficult to guarantee the expected label sufficiency . With limited labels , the existing approaches could easily include task-irrelevant information into decision processes , overfit training data , and end up with inferior generalization performance to unseen data . To effectively reduce the impact of task-irrelevant information , we propose SentRL , a reinforcement learning based framework for aspect-level sentiment classification . In our approach , input texts are firstly transformed into graph objects ( e.g. , dependency graphs ( Covington , 2001 ) ) , where nodes are words and edges indicate syntactic dependencies/relations between them . Next , we deploy a policy-based agent to discover aspect-related sentiment descriptions in the graphs . This agent is geared with a language understanding module so that it is able to update exploration states and make sentiment decisions for individual aspects . Unlike existing methods that aggregate potential sentiment information from all possible textual contexts or words , our agent strives to leverage the most relevant exploration paths under a limited budget . This strategy not only requires the agent to focus on the most effective paths but also encourages the agent to skip task-irrelevant regions . Using standard back-propagation methods , the policy network and the language understanding module are jointly trained . From public benchmark datasets , we observe our method could achieve up to 3.6 % improvement compared with competitive state-of-the-art methods . The main contributions of our work are listed below . • A novel reinforcement learning framework for aspect-based sentiment classification is proposed . It accurately pinpoints the most effective path between sentiment descriptions and the target aspects , and effectively avoids the impact of the task-irrelevant regions . • A policy network is developed to provide an agent with exploration guidance . This network iteratively provides suggestions on next-hop selection . In particular , the framework is permutation invariant and guarantees the consistency and reliability of the model . • A language understanding module is developed to help an agent “ remember ” its exploration history and make the final sentiment prediction . • Extensive experiments on representative benchmark datasets are evaluated . The results demonstrate the effectiveness , efficiency , and robustness of our approach . 2 RELATED WORK . 2.1 ASPECT-BASED SENTIMENT CLASSIFICATIONS . Aspect-based sentiment classification is to identify sentiment polarities of one or more aspects in given texts ( Thet et al. , 2010 ) . Aspects could be either substantial objects ( e.g. , computer and car ) or conceptional objects ( e.g. , service and atmosphere ) . There are usually three sentiment categories including positive , neutral , and negative , while more sophisticated categories could be explored . Conventional approaches ( Kiritchenko et al. , 2014 ) treat input texts as word sequences , and deploy separate feature extraction modules as well as classification modules . Deep learning-based sentiment analysis methods ( Tang et al. , 2016a ) take contextual information regarding the word order into consideration by using LSTM ( Hochreiter & Schmidhuber , 1997 ; Liu et al. , 2018 ) . Attentionbased approaches are proposed ( Tang et al. , 2016c ; Bahdanau et al. , 2014 ; Luong et al. , 2015 ; Xu et al. , 2015 ; Wang et al. , 2016 ; Tang et al. , 2016b ; Ma et al. , 2017a ; Huang & Carley , 2019 ; Ma et al. , 2017b ; Huang et al. , 2018 ; Li et al. , 2018 ) to improve the effectiveness of contextual feature extraction . While such approaches utilize sequential models and attention mechanisms to learn features from word sequences , they could require a large amount of training labels to be well generalized for natural language expressions with non-trivial variance ( e.g. , long sentences with majority of irrelevant contextual words ) . 2.2 SENTIMENT ANALYSIS ON GRAPHS . Syntactic dependency tree ( Covington , 2001 ) is a widely adopted data structure that encodes syntactic dependencies between words in input texts . To this end , aspect-based sentiment classification problems can be cast into node classification problems on syntactic dependency graphs . Existing methods develop variants of graph convolutional neural networks ( Yao et al. , 2019 ; Linmei et al. , 2019 ; Zhang et al. , 2019 ; Ghosal et al. , 2019 ; Bai et al. , 2020 ; Wang et al. , 2019 ) to extract contextual features that represent aspect nodes . However , such methods still suffer the following issues . First , due to the complexity of natural language , these models require a large amount of training data to be well generalized . Second , such methods ( Kipf & Welling , 2016 ; Yao et al. , 2019 ; Linmei et al. , 2019 ) usually perform under transductive settings with limited application scopes . 2.3 REINFORCEMENT LEARNING IN NLP . In the domain of NLP , reinforcement learning ( RL ) is usually explored in interactive tasks ( Wang et al. , 2018 ) , such as text-based games ( Narasimhan et al. , 2015b ) . Recently , RL methods are also developed for complex tasks , such as relation extraction ( Narasimhan et al. , 2015a ; Qin et al. , 2018 ) , image captioning ( Pasunuru & Bansal , 2017 ) , popularity prediction ( He et al. , 2016 ; Zhou & Wang , 2018 ) , coreference resolution ( Yin et al. , 2018 ) , and reasoning in question answering ( Xiong et al. , 2017 ; Wu et al. , 2018 ) . Unlike previous works , we are the first to study RL methods that intelligently collect information from syntactic dependency graphs for aspect-based sentiment analysis . 3 OUR APPROACH . In this work , we propose a reinforcement learning-based framework , SentRL , for solving the challenges . The details are introduced below : 1 © NEC Corporation 2016 NEC Group Internal Use Only 3.1 PRELIMINARY . Given the target texts c = { wc1 , wc2 , wc3 , ... , wcn } , where wci represents the i-th word in c. n is the total number of the words . The target aspect of c is denoted as ac = { wcr+1 , ... , wcr+m } , where r + 1 indicates the start location of the aspect and m is the length of the aspect . The aspect is either a single-word format ( e.g. , “ computer ” , “ service ” , and “ screen ” ) or multiple-word format ( e.g. , “ HDMI port ” and “ sport mode ” ) . There could be one or more aspects in c , and different aspects could have different sentimental categories . The goal of aspect-based sentiment classification is to predict sentiment polarity ( i.e. , “ positive ” , “ neutral ” , and “ negative ” ) for each given aspect . 3.2 DEPENDENCY GRAPH EXTRACTION . A dependency graph Gc = ( V ( Gc ) , E ( Gc ) ) is extracted from c. V ( Gc ) indicates all vertices/nodes inGc , and each vertice corresponds to a word in c. E ( Gc ) denotes the edges ofGc . Each edge inGc represents the syntactical relation categories between a pair of words . By deploying the dependency graph , we transfer the sequential text data into graph-structured format . In Gc , the long-distance pair of words in texts could be close in the graph . This provides extra syntactical knowledge and makes down-stream algorithms easier to pinpoint the sentimental words . 3.3 PATH SEARCHING VIA REINFORCEMENT LEARNING . Compared with state-of-the-art approaches utilizing graph learning algorithms ( e.g. , GCN , attention , and RNN ) , we proposed a reinforcement learning framework to explore the most effective aspectsentiment path on the dependency graph . First , an agent starts walking from the target aspect node . Then , a policy network selects the most effective walk based on the previous walk history and all feasible walk candidates . Next , a semantic understanding module is deployed to aggregate the path state and a sentiment classifier is used to obtain the final sentiment prediction . In summary , there are three components in our framework , 1 ) A Semantic Understanding Module which aggregates the comprehensive walk state , 2 ) A Policy Network which makes the walk decision , and 3 ) A Sentiment Classifier which obtains the final prediction of the sentiment categories . The details of each component are introduced in the following sections . 3.4 SEMANTIC UNDERSTANDING MODULE . The semantic understanding module aims to provide a comprehensive state of the walk for 1 ) allowing the policy network to make the effective walk action and 2 ) letting the sentiment classifier obtain a final prediction . There is a requirement that the state updating mechanism should make the walking procedure as a Markov Decision Process ( MDP ) . The expression is shown below : P ( St+1|S0 , A0 , ... , St , At ) = P ( St+1|St , At ) , ( 1 ) where Si , Ai , and Ri are the state , action , and reward of the i-th move respectively . Eq . equation 1 indicates that the path state of ( t+ 1 ) -th move , St+1 , should be only relevant to the current state St and action At , and irrelevant to earlier states . While , the information of the entire path is crucial and necessary for sentimental analysis tasks . To this end , St is required to preserve both the current and all previous walk information . To achieve this goal , we deploy the general Long Short-Term Memory ( LSTM ) Hochreiter & Schmidhuber ( 1997 ) structure in our framework , as LSTM and its varieties have been well validated as an effective way to capture both the feature and the sequential knowledge in a given sample . In our model , the function is shown below : St = LSTM ( At , St−1 ) , ( 2 ) where St is the current state , which could also be considered as the hidden state updated in each loop . At is the node feature of the corresponding t-th action ( i.e. , word embedding ) which is walked though by agent in the t-th move . Semantic understanding module keeps updating St for each walk . We consider St is effective enough to aggregate and preserve the entire path information . | The paper addresses aspect-based sentiment analysis by running reinforcement learning on the dependency parse of input sentences. The agent learns a policy network to select the most effective walk along edges in the dependency graphs, starting from the target aspect in the input sentences. The state representation is learned with an LSTM. At the end of the path, a sentiment classifier predicts the distribution of the polarity. The reward is the mean squared error between the class label (i.e. sentiment polarity) and the probability predicted by the model. The paper claims that by limiting the agent's budget, the approach forces the agent to discard irrelevant information and focus on the effective paths, enabling the approach to perform well with a small number of training examples. | SP:6cb958ab5e4337bc6d1d72324503a8362acead04 |
Aspect-based Sentiment Classification via Reinforcement Learning | 1 INTRODUCTION . The goal of aspect-based ( also known as aspect-level ) sentiment classification is to predict the sentiment polarities of individual aspects . As shown in Figure 1 , given a sentence “ I like this computer but do not like the screen ” , the sentiment of the aspect “ computer ” is positive because of “ like ” . Meanwhile , the sentiment of the aspect “ screen ” is negative for ” do not like ” . Aspect-based sentiment classification is challenging , where the core problem is to correctly align aspects with their sentiment descriptions . State-of-the-art methods rely on supervision signals to automatically learn such alignment . By leveraging textual context and word-level attention learned from deep models ( Vo & Zhang , 2015 ; Dong et al. , 2014 ; Bahdanau et al. , 2014 ; Luong et al. , 2015 ; Xu et al. , 2015 ; Wang et al. , 2016 ; Tang et al. , 2016b ; Ma et al. , 2017a ; He et al. , 2018 ; Zhang et al. , 2018 ; 2019 ; Gao et al. , 2019 ; Tang et al. , 2020 ) , existing methods have made great progress on discovering aspect-specific sentimental statements . Meanwhile , the existing methods could suffer serious overfitting problems , as natural language inevitably includes a large proportion of task-irrelevant texts , or noise from the perspective of machine learning . Ideally , with a sufficient amount of training labels , the existing methods could effectively contain the negative impact of such task-irrelevant information . In practice , because of the high variance in language expression , it is costly to collect a large number of task-specific labels , and it is difficult to guarantee the expected label sufficiency . With limited labels , the existing approaches could easily include task-irrelevant information into decision processes , overfit training data , and end up with inferior generalization performance to unseen data . To effectively reduce the impact of task-irrelevant information , we propose SentRL , a reinforcement learning based framework for aspect-level sentiment classification . In our approach , input texts are firstly transformed into graph objects ( e.g. , dependency graphs ( Covington , 2001 ) ) , where nodes are words and edges indicate syntactic dependencies/relations between them . Next , we deploy a policy-based agent to discover aspect-related sentiment descriptions in the graphs . This agent is geared with a language understanding module so that it is able to update exploration states and make sentiment decisions for individual aspects . Unlike existing methods that aggregate potential sentiment information from all possible textual contexts or words , our agent strives to leverage the most relevant exploration paths under a limited budget . This strategy not only requires the agent to focus on the most effective paths but also encourages the agent to skip task-irrelevant regions . Using standard back-propagation methods , the policy network and the language understanding module are jointly trained . From public benchmark datasets , we observe our method could achieve up to 3.6 % improvement compared with competitive state-of-the-art methods . The main contributions of our work are listed below . • A novel reinforcement learning framework for aspect-based sentiment classification is proposed . It accurately pinpoints the most effective path between sentiment descriptions and the target aspects , and effectively avoids the impact of the task-irrelevant regions . • A policy network is developed to provide an agent with exploration guidance . This network iteratively provides suggestions on next-hop selection . In particular , the framework is permutation invariant and guarantees the consistency and reliability of the model . • A language understanding module is developed to help an agent “ remember ” its exploration history and make the final sentiment prediction . • Extensive experiments on representative benchmark datasets are evaluated . The results demonstrate the effectiveness , efficiency , and robustness of our approach . 2 RELATED WORK . 2.1 ASPECT-BASED SENTIMENT CLASSIFICATIONS . Aspect-based sentiment classification is to identify sentiment polarities of one or more aspects in given texts ( Thet et al. , 2010 ) . Aspects could be either substantial objects ( e.g. , computer and car ) or conceptional objects ( e.g. , service and atmosphere ) . There are usually three sentiment categories including positive , neutral , and negative , while more sophisticated categories could be explored . Conventional approaches ( Kiritchenko et al. , 2014 ) treat input texts as word sequences , and deploy separate feature extraction modules as well as classification modules . Deep learning-based sentiment analysis methods ( Tang et al. , 2016a ) take contextual information regarding the word order into consideration by using LSTM ( Hochreiter & Schmidhuber , 1997 ; Liu et al. , 2018 ) . Attentionbased approaches are proposed ( Tang et al. , 2016c ; Bahdanau et al. , 2014 ; Luong et al. , 2015 ; Xu et al. , 2015 ; Wang et al. , 2016 ; Tang et al. , 2016b ; Ma et al. , 2017a ; Huang & Carley , 2019 ; Ma et al. , 2017b ; Huang et al. , 2018 ; Li et al. , 2018 ) to improve the effectiveness of contextual feature extraction . While such approaches utilize sequential models and attention mechanisms to learn features from word sequences , they could require a large amount of training labels to be well generalized for natural language expressions with non-trivial variance ( e.g. , long sentences with majority of irrelevant contextual words ) . 2.2 SENTIMENT ANALYSIS ON GRAPHS . Syntactic dependency tree ( Covington , 2001 ) is a widely adopted data structure that encodes syntactic dependencies between words in input texts . To this end , aspect-based sentiment classification problems can be cast into node classification problems on syntactic dependency graphs . Existing methods develop variants of graph convolutional neural networks ( Yao et al. , 2019 ; Linmei et al. , 2019 ; Zhang et al. , 2019 ; Ghosal et al. , 2019 ; Bai et al. , 2020 ; Wang et al. , 2019 ) to extract contextual features that represent aspect nodes . However , such methods still suffer the following issues . First , due to the complexity of natural language , these models require a large amount of training data to be well generalized . Second , such methods ( Kipf & Welling , 2016 ; Yao et al. , 2019 ; Linmei et al. , 2019 ) usually perform under transductive settings with limited application scopes . 2.3 REINFORCEMENT LEARNING IN NLP . In the domain of NLP , reinforcement learning ( RL ) is usually explored in interactive tasks ( Wang et al. , 2018 ) , such as text-based games ( Narasimhan et al. , 2015b ) . Recently , RL methods are also developed for complex tasks , such as relation extraction ( Narasimhan et al. , 2015a ; Qin et al. , 2018 ) , image captioning ( Pasunuru & Bansal , 2017 ) , popularity prediction ( He et al. , 2016 ; Zhou & Wang , 2018 ) , coreference resolution ( Yin et al. , 2018 ) , and reasoning in question answering ( Xiong et al. , 2017 ; Wu et al. , 2018 ) . Unlike previous works , we are the first to study RL methods that intelligently collect information from syntactic dependency graphs for aspect-based sentiment analysis . 3 OUR APPROACH . In this work , we propose a reinforcement learning-based framework , SentRL , for solving the challenges . The details are introduced below : 1 © NEC Corporation 2016 NEC Group Internal Use Only 3.1 PRELIMINARY . Given the target texts c = { wc1 , wc2 , wc3 , ... , wcn } , where wci represents the i-th word in c. n is the total number of the words . The target aspect of c is denoted as ac = { wcr+1 , ... , wcr+m } , where r + 1 indicates the start location of the aspect and m is the length of the aspect . The aspect is either a single-word format ( e.g. , “ computer ” , “ service ” , and “ screen ” ) or multiple-word format ( e.g. , “ HDMI port ” and “ sport mode ” ) . There could be one or more aspects in c , and different aspects could have different sentimental categories . The goal of aspect-based sentiment classification is to predict sentiment polarity ( i.e. , “ positive ” , “ neutral ” , and “ negative ” ) for each given aspect . 3.2 DEPENDENCY GRAPH EXTRACTION . A dependency graph Gc = ( V ( Gc ) , E ( Gc ) ) is extracted from c. V ( Gc ) indicates all vertices/nodes inGc , and each vertice corresponds to a word in c. E ( Gc ) denotes the edges ofGc . Each edge inGc represents the syntactical relation categories between a pair of words . By deploying the dependency graph , we transfer the sequential text data into graph-structured format . In Gc , the long-distance pair of words in texts could be close in the graph . This provides extra syntactical knowledge and makes down-stream algorithms easier to pinpoint the sentimental words . 3.3 PATH SEARCHING VIA REINFORCEMENT LEARNING . Compared with state-of-the-art approaches utilizing graph learning algorithms ( e.g. , GCN , attention , and RNN ) , we proposed a reinforcement learning framework to explore the most effective aspectsentiment path on the dependency graph . First , an agent starts walking from the target aspect node . Then , a policy network selects the most effective walk based on the previous walk history and all feasible walk candidates . Next , a semantic understanding module is deployed to aggregate the path state and a sentiment classifier is used to obtain the final sentiment prediction . In summary , there are three components in our framework , 1 ) A Semantic Understanding Module which aggregates the comprehensive walk state , 2 ) A Policy Network which makes the walk decision , and 3 ) A Sentiment Classifier which obtains the final prediction of the sentiment categories . The details of each component are introduced in the following sections . 3.4 SEMANTIC UNDERSTANDING MODULE . The semantic understanding module aims to provide a comprehensive state of the walk for 1 ) allowing the policy network to make the effective walk action and 2 ) letting the sentiment classifier obtain a final prediction . There is a requirement that the state updating mechanism should make the walking procedure as a Markov Decision Process ( MDP ) . The expression is shown below : P ( St+1|S0 , A0 , ... , St , At ) = P ( St+1|St , At ) , ( 1 ) where Si , Ai , and Ri are the state , action , and reward of the i-th move respectively . Eq . equation 1 indicates that the path state of ( t+ 1 ) -th move , St+1 , should be only relevant to the current state St and action At , and irrelevant to earlier states . While , the information of the entire path is crucial and necessary for sentimental analysis tasks . To this end , St is required to preserve both the current and all previous walk information . To achieve this goal , we deploy the general Long Short-Term Memory ( LSTM ) Hochreiter & Schmidhuber ( 1997 ) structure in our framework , as LSTM and its varieties have been well validated as an effective way to capture both the feature and the sequential knowledge in a given sample . In our model , the function is shown below : St = LSTM ( At , St−1 ) , ( 2 ) where St is the current state , which could also be considered as the hidden state updated in each loop . At is the node feature of the corresponding t-th action ( i.e. , word embedding ) which is walked though by agent in the t-th move . Semantic understanding module keeps updating St for each walk . We consider St is effective enough to aggregate and preserve the entire path information . | The paper proposes an approach to aspect-based sentiment classification, which is the task of identifying the sentiment of a specific phrase or entity in a sentence. The paper proposes to do this by first generating a dependency parse of the entire sentence and then using an RL agent to walk the dependency tree starting from the word or phrase to be classified. The state for the RL agent is the LSTM representation of its history. The final state is then used to classify the sentiment of the aspect. | SP:6cb958ab5e4337bc6d1d72324503a8362acead04 |
GANs Can Play Lottery Tickets Too | 1 INTRODUCTION . Generative adversarial networks ( GANs ) have been successfully applied to many fields like image translation ( Jing et al. , 2019 ; Isola et al. , 2017 ; Liu & Tuzel , 2016 ; Shrivastava et al. , 2017 ; Zhu et al. , 2017 ) and image generation ( Miyato et al. , 2018 ; Radford et al. , 2016 ; Gulrajani et al. , 2017 ; Arjovsky et al. , 2017 ) . However , they are often heavily parameterized and often require intensive calculation at the training and inference phase . Network compressing techniques ( LeCun et al. , 1990 ; Wang et al. , 2019 ; 2020b ; Li et al. , 2020 ) can be of help at inference by reducing the number of parameters or usage of memory ; nonetheless , they can not save computational burden at no cost . Although they strive to maintain the performance after compressing the model , a non-negligible drop in generative capacity is usually observed . A question is raised : Is there any way to compress a GAN model while preserving or even improving its performance ? . The lottery ticket hypothesis ( LTH ) ( Frankle & Carbin , 2019 ) provides positive answers with matching subnetworks ( Chen et al. , 2020b ) . It states that there exist matching subnetworks in dense models that can be trained to reach a comparable test accuracy to the full model within similar training iterations . The hypothesis has successfully shown its success in various fields ( Yu et al. , 2020 ; Renda et al. , 2020 ; Chen et al. , 2020b ) , and its property has been studied widely ( Malach et al. , 2020 ; Pensia et al. , 2020 ; Elesedy et al. , 2020 ) . However , it is never introduced to GANs , and therefore the presence of matching subnetworks in generative adversarial networks still remains mysterious . To address this gap in the literature , we investigate the lottery ticket hypothesis in GANs . One most critical challenge of extending LTH in GANs emerges : how to deal with the discriminator while compressing the generator , including ( i ) whether prunes the discriminator simultaneously and ( ii ) what initialization should be adopted by discriminators during the re-training ? Previous GAN compression methods ( Shu et al. , 2019 ; Wang et al. , 2019 ; Li et al. , 2020 ; Wang et al. , 2020b ) prune the generator model only since they aim at reducing parameters in the inference stage . The effect of ∗Equal Contribution . 1 pruning the discriminator has never been studied by these works , which is unnecessary for them but possibly essential in finding matching subnetworks . It is because that finding matching subnetworks involves re-training the whole GAN network , in which an imbalance in generative and discriminative power could result in degraded training results . For the same reason , the disequilibrium between initialization used in generators and discriminators incurs severe training instability and unsatisfactory results . Another attractive property of LTH is the powerful transferability of located matching subnetworks . Although it has been well studied in discriminative models ( Mehta , 2019 ; Morcos et al. , 2019 ; Chen et al. , 2020b ) , an in-depth understanding of transfer learning in GAN tickets is still missing . In this work , we not only show whether the sparse matching subnetworks in GANs can transfer across multiple datasets but also study what initialization benefits more to the transferability . To convert parameter efficiency of LTH into the advantage of computational saving , we also utilize channel pruning ( He et al. , 2017 ) to find the structural matching subnetworks of GANs , which enjoys the bonus of accelerated training and inference . Our contributions can be summarized in the following four aspects : • Using unstructured magnitude pruning , we identify matching subnetworks at 74 % sparsity in SNGAN ( Miyato et al. , 2018 ) and 67 % in CycleGAN ( Zhu et al. , 2017 ) . The matching subnetworks in GANs exist no matter whether pruning discriminators , while the initialization weights used in the discriminator are crucial . • We show that the matching subnetworks found by iterative magnitude pruning outperform subnetworks extracted by randomly pruning and random initialization in terms of extreme sparsity and performance . To fully exploit the trained discriminator , we using the dense discriminator as a distillation source and further improve the quality of winning tickets . • We demonstrate that the found subnetworks in GANs transfer well across diverse generative tasks . • The matching subnetworks found by channel pruning surpass previous state-of-the-art GAN com- pression methods ( i.e. , GAN Slimming ( Wang et al. , 2020b ) ) in both efficiency and performance . 2 RELATED WORK . GAN Compression Generative adversarial networks ( GANs ) have succeeded in computer vision fields , for example , image generation and translation . One significant drawback of the generative models is the high computational cost of the models ’ complex structure . A wide range of neural network compression techniques has been applied to generative models to address this problem . There are several categories of compression techniques , including pruning ( removing some parameters ) , quantization ( reducing the bit width ) , and distillation . Shu et al . ( 2019 ) proposed a channel pruning method for CycleGAN by using a co-evolution algorithm . Wang et al . ( 2019 ) proposed a quantization method for GANs based on the EM algorithm . Li et al . ( 2020 ) used a distillation method to transfer knowledge of the dense to the compressed model . Recently Wang et al . ( 2020b ) proposed a GAN compression framework , GAN slimming , that integrated the above three mainstream compression techniques into a unified form . Previous works on GAN pruning usually aim at finding a sparse structure of the trained generator model for faster inference speed , while we are focusing on finding trainable structures of GANs following the lottery ticket hypothesis . Moreover , in existing GAN compression methods , only the generator is pruned , which could undermine the performance of re-training since the left-out discriminator may have a stronger computational ability than the pruned generator and therefore cause a degraded result due to the imparity of these two models . The Lottery Ticket Hypothesis The lottery ticket hypothesis ( LTH ) ( Frankle & Carbin , 2019 ) claims the existence of sparse , separate trainable sub-networks in a dense network . These subnetworks are capable of reaching comparable or even better performance than full dense model , which has been evidenced in various fields , such as image classification ( Frankle & Carbin , 2019 ; Liu et al. , 2019 ; Wang et al. , 2020a ; Evci et al. , 2019 ; Frankle et al. , 2020 ; Savarese et al. , 2020 ; Yin et al. , 2020 ; You et al. , 2020 ; Ma et al. , 2021 ; Chen et al. , 2020a ) , natural language processing ( Gale et al. , 2019 ; Chen et al. , 2020b ) , reinforcement learning ( Yu et al. , 2020 ) , lifelong learning ( Chen et al. , 2021b ) , graph neural networks ( Chen et al. , 2021a ) , and adversarial robustness ( Cosentino et al. , 2019 ) . Most works of LTH use unstructured weight magnitude pruning ( Han et al. , 2016 ; Frankle & 2 Carbin , 2019 ) to find the matching subnetworks , and the channel pruning is also adopted in a recent work ( You et al. , 2020 ) . In order to scale up LTH to larger networks and datasets , the “ late rewinding ” technique is proposed by Frankle et al . ( 2019 ) ; Renda et al . ( 2020 ) . Mehta ( 2019 ) ; Morcos et al . ( 2019 ) ; Desai et al . ( 2019 ) are the pioneers to study the transferability of found subnetworks . However , all previous works focus on discriminative models . In this paper , we extend LTH to GANs and reveal unique findings of GAN tickets . 3 PRELIMINARIES . In this section , we describe our pruning algorithms and list related experimental settings . Backbone Networks We use two GANs in our experiments in Section 4 : SNGAN ( Miyato et al. , 2018 ) and CycleGAN ( Zhu et al. , 2017 ) ) . SNGAN with ResNet ( He et al. , 2016 ) is one of the most popular noise-to-image GAN network and has strong performance on several datasets like CIFAR10 . CycleGAN is a popular and well-studied image-to-image GAN network that also performs well on several benchmarks . For SNGAN , let g ( z ; θg ) be the output of the generator network G with parameters θg and a latent variable z ∈ R‖z‖0 and d ( x ; θd ) be the output of the discriminator network D with parameters θd and input example x . For CycleGAN which is composed of two generator-discriminator pairs , we use g ( x ; θg ) and θg again to represent the output and the weights of the two generators where x = ( x1 , x2 ) indicates a pair of input examples . The same modification can be done for the two discriminators in CycleGAN . Datasets For image-to-image experiments , we use a widely-used benchmark horse2zebra ( Zhu et al. , 2017 ) for model training . As for noise-to-image experiments , we use CIFAR-10 ( Krizhevsky et al. , 2009 ) as the benchmark . For the transfer study , the experiments are conducted on CIFAR-10 and STL-10 ( Coates et al. , 2011 ) . For better transferring , we resize the image in STL-10 to 32× 32 . Subnetworks For a network f ( · ; θ ) parameterized by θ , a subnetwork is defined as f ( · ; m θ ) , where m ∈ { 0 , 1 } ‖θ‖0 is a pruning mask for θ ∈ R‖θ‖0 and is the element-wise product . For GANs , two separate masks , md and mg , are needed for both the generator and the discriminator . Consequently , a subnetwork of GANs is consistent of : a sparse generator g ( · ; mg θg ) and a sparse discriminator d ( · ; md θd ) . Let θ0 be the initialization weights of model f and θt be the weights at training step t. Following Frankle et al . ( 2019 ) , we define a matching network as a subnetwork f ( · ; m θ ) , where θ is initialized with θt , that can reach the comparable performance to the full network within a similar training iterations when trained in isolation ; a winning ticket is defined as a matching subnetwork where t = 0 , i.e . θ initialized with θ0 . Finding subnetworks Finding GAN subnetworks is to find two masks mg and md for the generator and the discriminator . We use both an unstructured magnitude method , i.e . the iterative magnitude pruning ( IMP ) , and a structured pruning method , i.e . the channel pruning ( He et al. , 2017 ) , to generate the masks . For unstructured pruning , we follow the following steps . After we finish training the full GAN model for N iterations , we prune the weights with the lowest magnitude globally ( Han et al. , 2016 ) to obtain masks m = ( mg , md ) , where the position of a remaining weight in m is marked as one , and the position of a pruned weight is marked as zero . The weights of the sparse generator and the sparse discriminator are then reset to the initial weights of the full network . Previous works have shown that the iterative magnitude pruning ( IMP ) method is better than the one-shot pruning method . So rather than pruning the network only once to reach the desired sparsity , we prune a certain amount of non-zero parameters and re-train the network several times to meet the requirement . Details of this algorithm are in Appendix A1.1 , Algorithm 1 . As for channel pruning , the first step is to train the full model as well . Besides using a normal loss function LGAN , we follow Liu et al . ( 2017 ) to apply a ` 1-norm on the trainable scale parameters γ in the normalization layers to encourage channel-level sparsity : Lcp = ||γ||1 . To prevent the compressed network behave severely differently with the original large network , we introduce a distillation loss as Wang et al . ( 2020b ) did : Ldist = Ez [ dist ( g ( z ; θg ) , g ( z ; mg θg ) ) ] . We train the 3 GAN network with these two additional losses forN1 epochs and get the sparse networks g ( · ; mg θg ) and d ( · ; md θg ) . Details of this algorithm are in Appendix A1.1 , Algorithm 2 . Evaluation of subnetworks After obtaining the subnetworks g ( · ; θg mg ) and d ( · ; θd md ) , we test whether the subnetworks are matching or not . We reset the weights to a specific step i , and train the subnetworks for N iterations and evaluate them using two specific metrics , Inception Score ( Salimans et al. , 2016 ) and Fréchet Inception Distance ( Heusel et al. , 2017 ) . Other Pruning Methods We compare the size and the performance of subnetworks found by IMP with subnetworks found by other techniques that aim at compressing the network after training to reduce computational costs at inference . We use a benchmark pruning approach named Standard Pruning ( Chen et al. , 2020b ; Han et al. , 2016 ) , which iteratively prune the 20 % of lowest magnitude weights , and train the network for another N iterations without any rewinding , and repeat until we have reached the target sparsity . In order to verify that the statement of iterative magnitude pruning is better than one-shot pruning , we compare IMPG and IMPGD with their one-shot counterparts . Additionally , we compare IMP with some randomly pruning techniques to prove the effectiveness of IMP . They are : 1 ) Randomly Pruning : Randomly generate a sparsity mask m′ . 2 ) Random Tickets : Rewinding the weights to another initialization θ′0 . | The authors study the lottery ticket hypothesis for generative adversarial networks. Specifically, they attempt to answer the following questions: the existence of winning tickets in GANs; the effect of discriminator pruning in finding such winning tickets; the effect of initialization during the rewinding steps; and finally if the subnetworks found transfer across datasets. They provide extensive empirical evidence using that ```winning' tickets exist in GANs. Further they show that iterative magnitude pruning and channel pruning successfully find such `winning' subnetworks. They analyse the effect of discriminator pruning and find that initialization during the rewind step matters more than the actual pruning of the discriminator. Finally, they show state-of-the-art results on GAN compression through channel pruning. | SP:88ffd6498b2250b6b86a0e711446384df9285669 |
GANs Can Play Lottery Tickets Too | 1 INTRODUCTION . Generative adversarial networks ( GANs ) have been successfully applied to many fields like image translation ( Jing et al. , 2019 ; Isola et al. , 2017 ; Liu & Tuzel , 2016 ; Shrivastava et al. , 2017 ; Zhu et al. , 2017 ) and image generation ( Miyato et al. , 2018 ; Radford et al. , 2016 ; Gulrajani et al. , 2017 ; Arjovsky et al. , 2017 ) . However , they are often heavily parameterized and often require intensive calculation at the training and inference phase . Network compressing techniques ( LeCun et al. , 1990 ; Wang et al. , 2019 ; 2020b ; Li et al. , 2020 ) can be of help at inference by reducing the number of parameters or usage of memory ; nonetheless , they can not save computational burden at no cost . Although they strive to maintain the performance after compressing the model , a non-negligible drop in generative capacity is usually observed . A question is raised : Is there any way to compress a GAN model while preserving or even improving its performance ? . The lottery ticket hypothesis ( LTH ) ( Frankle & Carbin , 2019 ) provides positive answers with matching subnetworks ( Chen et al. , 2020b ) . It states that there exist matching subnetworks in dense models that can be trained to reach a comparable test accuracy to the full model within similar training iterations . The hypothesis has successfully shown its success in various fields ( Yu et al. , 2020 ; Renda et al. , 2020 ; Chen et al. , 2020b ) , and its property has been studied widely ( Malach et al. , 2020 ; Pensia et al. , 2020 ; Elesedy et al. , 2020 ) . However , it is never introduced to GANs , and therefore the presence of matching subnetworks in generative adversarial networks still remains mysterious . To address this gap in the literature , we investigate the lottery ticket hypothesis in GANs . One most critical challenge of extending LTH in GANs emerges : how to deal with the discriminator while compressing the generator , including ( i ) whether prunes the discriminator simultaneously and ( ii ) what initialization should be adopted by discriminators during the re-training ? Previous GAN compression methods ( Shu et al. , 2019 ; Wang et al. , 2019 ; Li et al. , 2020 ; Wang et al. , 2020b ) prune the generator model only since they aim at reducing parameters in the inference stage . The effect of ∗Equal Contribution . 1 pruning the discriminator has never been studied by these works , which is unnecessary for them but possibly essential in finding matching subnetworks . It is because that finding matching subnetworks involves re-training the whole GAN network , in which an imbalance in generative and discriminative power could result in degraded training results . For the same reason , the disequilibrium between initialization used in generators and discriminators incurs severe training instability and unsatisfactory results . Another attractive property of LTH is the powerful transferability of located matching subnetworks . Although it has been well studied in discriminative models ( Mehta , 2019 ; Morcos et al. , 2019 ; Chen et al. , 2020b ) , an in-depth understanding of transfer learning in GAN tickets is still missing . In this work , we not only show whether the sparse matching subnetworks in GANs can transfer across multiple datasets but also study what initialization benefits more to the transferability . To convert parameter efficiency of LTH into the advantage of computational saving , we also utilize channel pruning ( He et al. , 2017 ) to find the structural matching subnetworks of GANs , which enjoys the bonus of accelerated training and inference . Our contributions can be summarized in the following four aspects : • Using unstructured magnitude pruning , we identify matching subnetworks at 74 % sparsity in SNGAN ( Miyato et al. , 2018 ) and 67 % in CycleGAN ( Zhu et al. , 2017 ) . The matching subnetworks in GANs exist no matter whether pruning discriminators , while the initialization weights used in the discriminator are crucial . • We show that the matching subnetworks found by iterative magnitude pruning outperform subnetworks extracted by randomly pruning and random initialization in terms of extreme sparsity and performance . To fully exploit the trained discriminator , we using the dense discriminator as a distillation source and further improve the quality of winning tickets . • We demonstrate that the found subnetworks in GANs transfer well across diverse generative tasks . • The matching subnetworks found by channel pruning surpass previous state-of-the-art GAN com- pression methods ( i.e. , GAN Slimming ( Wang et al. , 2020b ) ) in both efficiency and performance . 2 RELATED WORK . GAN Compression Generative adversarial networks ( GANs ) have succeeded in computer vision fields , for example , image generation and translation . One significant drawback of the generative models is the high computational cost of the models ’ complex structure . A wide range of neural network compression techniques has been applied to generative models to address this problem . There are several categories of compression techniques , including pruning ( removing some parameters ) , quantization ( reducing the bit width ) , and distillation . Shu et al . ( 2019 ) proposed a channel pruning method for CycleGAN by using a co-evolution algorithm . Wang et al . ( 2019 ) proposed a quantization method for GANs based on the EM algorithm . Li et al . ( 2020 ) used a distillation method to transfer knowledge of the dense to the compressed model . Recently Wang et al . ( 2020b ) proposed a GAN compression framework , GAN slimming , that integrated the above three mainstream compression techniques into a unified form . Previous works on GAN pruning usually aim at finding a sparse structure of the trained generator model for faster inference speed , while we are focusing on finding trainable structures of GANs following the lottery ticket hypothesis . Moreover , in existing GAN compression methods , only the generator is pruned , which could undermine the performance of re-training since the left-out discriminator may have a stronger computational ability than the pruned generator and therefore cause a degraded result due to the imparity of these two models . The Lottery Ticket Hypothesis The lottery ticket hypothesis ( LTH ) ( Frankle & Carbin , 2019 ) claims the existence of sparse , separate trainable sub-networks in a dense network . These subnetworks are capable of reaching comparable or even better performance than full dense model , which has been evidenced in various fields , such as image classification ( Frankle & Carbin , 2019 ; Liu et al. , 2019 ; Wang et al. , 2020a ; Evci et al. , 2019 ; Frankle et al. , 2020 ; Savarese et al. , 2020 ; Yin et al. , 2020 ; You et al. , 2020 ; Ma et al. , 2021 ; Chen et al. , 2020a ) , natural language processing ( Gale et al. , 2019 ; Chen et al. , 2020b ) , reinforcement learning ( Yu et al. , 2020 ) , lifelong learning ( Chen et al. , 2021b ) , graph neural networks ( Chen et al. , 2021a ) , and adversarial robustness ( Cosentino et al. , 2019 ) . Most works of LTH use unstructured weight magnitude pruning ( Han et al. , 2016 ; Frankle & 2 Carbin , 2019 ) to find the matching subnetworks , and the channel pruning is also adopted in a recent work ( You et al. , 2020 ) . In order to scale up LTH to larger networks and datasets , the “ late rewinding ” technique is proposed by Frankle et al . ( 2019 ) ; Renda et al . ( 2020 ) . Mehta ( 2019 ) ; Morcos et al . ( 2019 ) ; Desai et al . ( 2019 ) are the pioneers to study the transferability of found subnetworks . However , all previous works focus on discriminative models . In this paper , we extend LTH to GANs and reveal unique findings of GAN tickets . 3 PRELIMINARIES . In this section , we describe our pruning algorithms and list related experimental settings . Backbone Networks We use two GANs in our experiments in Section 4 : SNGAN ( Miyato et al. , 2018 ) and CycleGAN ( Zhu et al. , 2017 ) ) . SNGAN with ResNet ( He et al. , 2016 ) is one of the most popular noise-to-image GAN network and has strong performance on several datasets like CIFAR10 . CycleGAN is a popular and well-studied image-to-image GAN network that also performs well on several benchmarks . For SNGAN , let g ( z ; θg ) be the output of the generator network G with parameters θg and a latent variable z ∈ R‖z‖0 and d ( x ; θd ) be the output of the discriminator network D with parameters θd and input example x . For CycleGAN which is composed of two generator-discriminator pairs , we use g ( x ; θg ) and θg again to represent the output and the weights of the two generators where x = ( x1 , x2 ) indicates a pair of input examples . The same modification can be done for the two discriminators in CycleGAN . Datasets For image-to-image experiments , we use a widely-used benchmark horse2zebra ( Zhu et al. , 2017 ) for model training . As for noise-to-image experiments , we use CIFAR-10 ( Krizhevsky et al. , 2009 ) as the benchmark . For the transfer study , the experiments are conducted on CIFAR-10 and STL-10 ( Coates et al. , 2011 ) . For better transferring , we resize the image in STL-10 to 32× 32 . Subnetworks For a network f ( · ; θ ) parameterized by θ , a subnetwork is defined as f ( · ; m θ ) , where m ∈ { 0 , 1 } ‖θ‖0 is a pruning mask for θ ∈ R‖θ‖0 and is the element-wise product . For GANs , two separate masks , md and mg , are needed for both the generator and the discriminator . Consequently , a subnetwork of GANs is consistent of : a sparse generator g ( · ; mg θg ) and a sparse discriminator d ( · ; md θd ) . Let θ0 be the initialization weights of model f and θt be the weights at training step t. Following Frankle et al . ( 2019 ) , we define a matching network as a subnetwork f ( · ; m θ ) , where θ is initialized with θt , that can reach the comparable performance to the full network within a similar training iterations when trained in isolation ; a winning ticket is defined as a matching subnetwork where t = 0 , i.e . θ initialized with θ0 . Finding subnetworks Finding GAN subnetworks is to find two masks mg and md for the generator and the discriminator . We use both an unstructured magnitude method , i.e . the iterative magnitude pruning ( IMP ) , and a structured pruning method , i.e . the channel pruning ( He et al. , 2017 ) , to generate the masks . For unstructured pruning , we follow the following steps . After we finish training the full GAN model for N iterations , we prune the weights with the lowest magnitude globally ( Han et al. , 2016 ) to obtain masks m = ( mg , md ) , where the position of a remaining weight in m is marked as one , and the position of a pruned weight is marked as zero . The weights of the sparse generator and the sparse discriminator are then reset to the initial weights of the full network . Previous works have shown that the iterative magnitude pruning ( IMP ) method is better than the one-shot pruning method . So rather than pruning the network only once to reach the desired sparsity , we prune a certain amount of non-zero parameters and re-train the network several times to meet the requirement . Details of this algorithm are in Appendix A1.1 , Algorithm 1 . As for channel pruning , the first step is to train the full model as well . Besides using a normal loss function LGAN , we follow Liu et al . ( 2017 ) to apply a ` 1-norm on the trainable scale parameters γ in the normalization layers to encourage channel-level sparsity : Lcp = ||γ||1 . To prevent the compressed network behave severely differently with the original large network , we introduce a distillation loss as Wang et al . ( 2020b ) did : Ldist = Ez [ dist ( g ( z ; θg ) , g ( z ; mg θg ) ) ] . We train the 3 GAN network with these two additional losses forN1 epochs and get the sparse networks g ( · ; mg θg ) and d ( · ; md θg ) . Details of this algorithm are in Appendix A1.1 , Algorithm 2 . Evaluation of subnetworks After obtaining the subnetworks g ( · ; θg mg ) and d ( · ; θd md ) , we test whether the subnetworks are matching or not . We reset the weights to a specific step i , and train the subnetworks for N iterations and evaluate them using two specific metrics , Inception Score ( Salimans et al. , 2016 ) and Fréchet Inception Distance ( Heusel et al. , 2017 ) . Other Pruning Methods We compare the size and the performance of subnetworks found by IMP with subnetworks found by other techniques that aim at compressing the network after training to reduce computational costs at inference . We use a benchmark pruning approach named Standard Pruning ( Chen et al. , 2020b ; Han et al. , 2016 ) , which iteratively prune the 20 % of lowest magnitude weights , and train the network for another N iterations without any rewinding , and repeat until we have reached the target sparsity . In order to verify that the statement of iterative magnitude pruning is better than one-shot pruning , we compare IMPG and IMPGD with their one-shot counterparts . Additionally , we compare IMP with some randomly pruning techniques to prove the effectiveness of IMP . They are : 1 ) Randomly Pruning : Randomly generate a sparsity mask m′ . 2 ) Random Tickets : Rewinding the weights to another initialization θ′0 . | In this paper, the authors provide an empirical study on lottery ticket hypothesis on GANs. To do this, the authors use two GAN models and two datasets: SNGAN/CycleGAN and CIFAR-10/horse2zebra. Extensive experiments show that matching subnetworks can be found using unstructured magnitude pruning and channel pruning and they are transferrable to other tasks. The performance of subnetworks found is competitive and even surpasses state-of-the-art performance. | SP:88ffd6498b2250b6b86a0e711446384df9285669 |
Debiasing Concept-based Explanations with Causal Analysis | 1 INTRODUCTION . Explaining the predictions of neural networks through higher level concepts ( Kim et al. , 2018 ; Ghorbani et al. , 2019 ; Brocki & Chung , 2019 ; Hamidi-Haines et al. , 2018 ) enables model interpretation on data with complex manifold structure such as images . It also allows the use of domain knowledge during the explanation process . The concept-based explanation has been used for medical imaging ( Cai et al. , 2019 ) , breast cancer histopathology ( Graziani et al. , 2018 ) , cardiac MRIs ( Clough et al. , 2019 ) , and meteorology ( Sprague et al. , 2019 ) . When the set of concepts is carefully selected , we can estimate a model in which the discriminative information flow from the feature vectors x through the concept vectors c and reach the labels y . To this end , we train two models for prediction of the concept vectors from the features denoted by ĉ ( x ) and the labels from the predicted concept vector ŷ ( ĉ ) . This estimation process ensures that for each prediction we have the reasons for the prediction stated in terms of the predicted concept vector ĉ ( x ) . However , in reality , noise and confounding information ( due to e.g . non-discriminative context ) can influence both of the feature and concept vectors , resulting in confounded correlations between them . Figure 1 provides an evidence for noise and confounding in the CUB-200-2011 dataset ( Wah et al. , 2011 ) . We train two predictors for the concepts vectors based on features ĉ ( x ) and labels ĉ ( y ) and compare the Spearman correlation coefficients between their predictions and the true ordinal value of the concepts . Having concepts for which ĉ ( x ) is more accurate than ĉ ( y ) could be due to noise , or due to hidden variables independent of the labels that spuriously correlated c and x , leading to undesirable explanations that include confounding or noise . In this work , using the Concept Bottleneck Models ( CBM ) ( Koh et al. , 2020 ; Losch et al. , 2019 ) we demonstrate a method for removing the counfounding and noise ( debiasing ) the explanation with concept vectors and extend the results to Testing with Concept Activation Vectors ( TCAV ) ( Kim et al. , 2018 ) technique . We provide a new causal prior graph to account for the confounding information and concept completeness ( Yeh et al. , 2020 ) . We describe the challenges in estimation of our causal prior graph and propose a new learning procedure . Our estimation technique defines and predicts debiased concepts such that the predictive information of the features maximally flow through them . We show that using a two-stage regression technique from the instrumental variables literature , we can successfully remove the impact of the confounding and noise from the predicted concept vectors . Our proposed procedure has three steps : ( 1 ) debias the concept vectors using the labels , ( 2 ) predict the debiased concept vectors using the features , and ( 3 ) use the predict concept vectors in the second step to predict the labels . Optionally , we can also find the residual predictive information in the features that are not in the concepts . We validate the proposed method using a synthetic dataset and the CUB-200-2011 dataset . On the synthetic data , we have access to the ground truth and show that in the presence of confounding and noise , our debiasing procedure improves the accuracy of recovering the true concepts . On the CUB-200-2011 dataset , we use the RemOve And Retrain ( ROAR ) framework ( Hooker et al. , 2019 ) to show that our debiasing procedure ranks the concepts in the order of their explanation more accurately than the regular concept bottleneck models . We also show that we improve the accuracy of CBNs in the prediction of labels using our debiasing technique . Finally , using several examples , we also qualitatively show when the debasing helps improve the quality of concept-based explanations . 2 METHODOLOGY . Notations . We follow the notation of Goodfellow et al . ( 2016 ) and denote random vectors by bold font letters x and their values by bold symbols x . The notation p ( x ) is a probability measure on x and dp ( x = x ) is the infinitesimal probability mass at x = x . We use ŷ ( x ) to denote the the prediction of y given x . In the graphical models , we show the observed and unobserved variables using filled and hollow circles , respectively . Problem Statement . We assume that during the training phase , we are given triplets ( xi , ci , yi ) for i = 1 , . . . , n data points . In addition to the regular features x and labels y , we are given a human interpretable concepts vector c for each data point . Each element of the concept vector measures the degree of existence of the corresponding concept in the features . Thus , the concept vector typically have binary or ordinal values . Our goal is to learn to predict y as a function of x and use c for explaining the predictions . Performing in two steps , we first learn a function ĉ ( x ) and then learn another function ŷ ( ĉ ( x ) ) . The prediction ĉ ( x ) is the explanation for our prediction ŷ . During the test time , only the features are given and the prediction+explanation algorithm predicts both ŷ and ĉ . In this paper , we aim to remove the bias and noise components from the estimated concept vector ĉ such that it explains the reasons for prediction of the labels more accurately . To this end , we first need to propose a new causal prior graph that includes the potential unobserved confounders . 2.1 A NEW CAUSAL PRIOR GRAPH FOR CBMS . Figure 2a shows the ideal situation in explanation via high-level concepts . The generative model corresponding to Figure 2a states that for generating each feature xi we first randomly draw the label yi . Given the label , we draw the concepts ci . Given the concepts , we generate the features . The Ideal Graphical Model Estimation ! '' = $ ! % & = ' '' ! '' ! `` # ( a ) The ideal concepts Realistic Graphical Model ! ) # * `` ( b ) Our more realistic graph Realistic Graphical Model ! + ) # * , '' ( c ) The graph with d̂ ( y ) Figure 2 : ( a ) The ideal view of the causal relationships between the features x , concepts c , and labels y . ( b ) In a more realistic setting , the unobserved confounding variable u impacts both x and c. The shared information between x and y go through the discriminative part of the concepts d. We also model the completeness of the concepts via a direct edge from the features x to the labels y . ( c ) When we use d̂ ( y ) = E [ c|y ] in place of d and c , we eliminate the confounding link u→ c. hierarchy in this graph is from nodes with less detailed information ( labels ) to more detailed ones ( features , images ) . This model in Figure 2a is an explanation for the phenomenon in Figure 1 , because the noise in generation of the concepts allows the x—c edge to be stronger than the c—y edge . However , another ( non-mutually exclusive ) explanation for this phenomenon is the existence of hidden confounders u shown in Figure 2b . In this graphical model , u represents the confounders and d represents the unconfounded concepts . Note that we assume that the confounders u and labels y are independent when x and c are not observed . Another phenomenon captured in Figure 2b is the lack of concept completeness ( Yeh et al. , 2020 ) . It describes the situation when the features , compared to the concepts , have additional predictive information about the labels . The non-linear structural equations corresponding to the causal prior graph in Figure 2b are as follows d = f1 ( y ) + εd , ( 1 ) c = d + h ( u ) , ( 2 ) x = f2 ( u , d ) + f3 ( y ) + εx , ( 3 ) for some vector functions h , f1 , f2 , and f3 . We have εd ⊥⊥ y and u ⊥⊥ y . Our definition of d in Eq . ( 2 ) does not restrict u , because we simply attribute the difference between c and f1 ( y ) to a function of the latent confounder u and noise . Our causal prior graph in Figure 2b corresponds to a generative process in which to generate an observed triplet ( xi , ci , yi ) we first draw a label yi and a confounder ui vector independently . Then we draw the discriminative concepts di based on the label and generate the features xi jointly based on the concepts , label , and the confounder . Finally , we draw the observed concept vector ci based on the drawn concept and confounder vectors . Both causal graphs reflect our assumption that the direction of causality is from the labels to concepts and then to the features , y→ d→ x , to ensure that u and y are marginally independent in Figure 2b . This direction also correspond to moving from more abstract class labels to concepts to detailed features . During estimation , we fit the functions in the x→ d→ y direction , because finding the statistical strength of an edge does not depend on its direction . Estimation of the model in Figure 2b is challenging because there are two distinct paths for the information from the labels y to reach the features x . Our solution is to prioritize the bottleneck path and estimate the y → d → x , then estimate the residuals of the regression using the y → x direct path . Our two-stage estimation technique ensures that the predictive information of the features maximally flow through the concepts . In the next sections , we focus on the first phase and using a two-stage regression technique borrowed from the instrumental variables literature to eliminate the noise and confounding in estimation of the d→ x link . Algorithm 1 Debiased CBMs Require : Data tuples ( xi , ci , yi ) for i = 1 , . . . , n. 1 : Estimate a model d̂ ( y ) = E [ c|y ] using ( ci , yi ) pairs . 2 : Train a neural network as an estimator for pφ̂ ( d|x ) using ( xi , d̂i ) ) pairs . 3 : Use pairs ( xi , yi ) to estimate function gθ by fitting ∫ gθ ( d ) dpφ̂ ( d = d|xi ) to yi . 4 : Compute the debiased explanations E [ d|xi ] − 1n ∑n i=1E [ d|xi ] for i = 1 , . . . , n. 5 : return The CBM defined by ( pφ̂ , gθ ) and the debiased explanations . 2.2 INSTRUMENTAL VARIABLES . Background on two-stage regression . In causal inference , instrumental variables ( Stock , 2015 ; Pearl , 2009 ) denoted by z are commonly used to find the causal impact of a variable x on y when x and y are jointly influenced by an unobserved confounder u ( i.e. , x← u→ y ) . The key requirement is that z should be correlated with x but independent of the confounding variable u ( i.e . z→ x→ y and z ⊥⊥ u ) . The commonly used 2-stage least squares first regresses x in terms of z to obtain x̂ followed by regression of y in terms of x̂ . Because of independence between z and u , x̂ is also independent of u . Thus , in the second regression the confounding impact of u is eliminated . Our goal is to use the two-stage regression trick again to remove the confounding factors impacting features and concept vectors . The instrumental variable technique can be used for eliminating the biases due to the measurement errors ( Carroll et al. , 2006 ) . Two-Stage Regression for CBMs . In our causal graph in Figure 2b , the label y can be used for the study of the relationship between concepts d and features x . We predict d as a function of y and use it in place of the concepts in the concept bottleneck models . The graphical model corresponding to this procedure is shown in Figure 2c , where the link u → c is eliminated . In particular , given the independence relationship y ⊥⊥ u , we have d̂ ( y ) = E [ c|y ] ⊥⊥ h ( u ) . This is the basis for our debiasing method in the next section . | Abstract: The paper proposed a way to learn unbiased (debiased) concept-based explainable models in the presence of unobserved confounders by the use of labels as instrumental variables. The proposed algorithm has 3 main steps: (1) regresses concept labels from the final labels (2) replace the original concepts with the learnt concepts and learn a model of debiased concepts as a function of features (3) predict label as a function of debiased concepts. The authors show in the experimental section that their training method captures the most salient concepts using the ROAR (Remove and Retrain) evaluation framework much better than the vanilla (non de-biased) approach. | SP:18f1b4ab7592fdcc814514e832b766dbb196d2b4 |
Debiasing Concept-based Explanations with Causal Analysis | 1 INTRODUCTION . Explaining the predictions of neural networks through higher level concepts ( Kim et al. , 2018 ; Ghorbani et al. , 2019 ; Brocki & Chung , 2019 ; Hamidi-Haines et al. , 2018 ) enables model interpretation on data with complex manifold structure such as images . It also allows the use of domain knowledge during the explanation process . The concept-based explanation has been used for medical imaging ( Cai et al. , 2019 ) , breast cancer histopathology ( Graziani et al. , 2018 ) , cardiac MRIs ( Clough et al. , 2019 ) , and meteorology ( Sprague et al. , 2019 ) . When the set of concepts is carefully selected , we can estimate a model in which the discriminative information flow from the feature vectors x through the concept vectors c and reach the labels y . To this end , we train two models for prediction of the concept vectors from the features denoted by ĉ ( x ) and the labels from the predicted concept vector ŷ ( ĉ ) . This estimation process ensures that for each prediction we have the reasons for the prediction stated in terms of the predicted concept vector ĉ ( x ) . However , in reality , noise and confounding information ( due to e.g . non-discriminative context ) can influence both of the feature and concept vectors , resulting in confounded correlations between them . Figure 1 provides an evidence for noise and confounding in the CUB-200-2011 dataset ( Wah et al. , 2011 ) . We train two predictors for the concepts vectors based on features ĉ ( x ) and labels ĉ ( y ) and compare the Spearman correlation coefficients between their predictions and the true ordinal value of the concepts . Having concepts for which ĉ ( x ) is more accurate than ĉ ( y ) could be due to noise , or due to hidden variables independent of the labels that spuriously correlated c and x , leading to undesirable explanations that include confounding or noise . In this work , using the Concept Bottleneck Models ( CBM ) ( Koh et al. , 2020 ; Losch et al. , 2019 ) we demonstrate a method for removing the counfounding and noise ( debiasing ) the explanation with concept vectors and extend the results to Testing with Concept Activation Vectors ( TCAV ) ( Kim et al. , 2018 ) technique . We provide a new causal prior graph to account for the confounding information and concept completeness ( Yeh et al. , 2020 ) . We describe the challenges in estimation of our causal prior graph and propose a new learning procedure . Our estimation technique defines and predicts debiased concepts such that the predictive information of the features maximally flow through them . We show that using a two-stage regression technique from the instrumental variables literature , we can successfully remove the impact of the confounding and noise from the predicted concept vectors . Our proposed procedure has three steps : ( 1 ) debias the concept vectors using the labels , ( 2 ) predict the debiased concept vectors using the features , and ( 3 ) use the predict concept vectors in the second step to predict the labels . Optionally , we can also find the residual predictive information in the features that are not in the concepts . We validate the proposed method using a synthetic dataset and the CUB-200-2011 dataset . On the synthetic data , we have access to the ground truth and show that in the presence of confounding and noise , our debiasing procedure improves the accuracy of recovering the true concepts . On the CUB-200-2011 dataset , we use the RemOve And Retrain ( ROAR ) framework ( Hooker et al. , 2019 ) to show that our debiasing procedure ranks the concepts in the order of their explanation more accurately than the regular concept bottleneck models . We also show that we improve the accuracy of CBNs in the prediction of labels using our debiasing technique . Finally , using several examples , we also qualitatively show when the debasing helps improve the quality of concept-based explanations . 2 METHODOLOGY . Notations . We follow the notation of Goodfellow et al . ( 2016 ) and denote random vectors by bold font letters x and their values by bold symbols x . The notation p ( x ) is a probability measure on x and dp ( x = x ) is the infinitesimal probability mass at x = x . We use ŷ ( x ) to denote the the prediction of y given x . In the graphical models , we show the observed and unobserved variables using filled and hollow circles , respectively . Problem Statement . We assume that during the training phase , we are given triplets ( xi , ci , yi ) for i = 1 , . . . , n data points . In addition to the regular features x and labels y , we are given a human interpretable concepts vector c for each data point . Each element of the concept vector measures the degree of existence of the corresponding concept in the features . Thus , the concept vector typically have binary or ordinal values . Our goal is to learn to predict y as a function of x and use c for explaining the predictions . Performing in two steps , we first learn a function ĉ ( x ) and then learn another function ŷ ( ĉ ( x ) ) . The prediction ĉ ( x ) is the explanation for our prediction ŷ . During the test time , only the features are given and the prediction+explanation algorithm predicts both ŷ and ĉ . In this paper , we aim to remove the bias and noise components from the estimated concept vector ĉ such that it explains the reasons for prediction of the labels more accurately . To this end , we first need to propose a new causal prior graph that includes the potential unobserved confounders . 2.1 A NEW CAUSAL PRIOR GRAPH FOR CBMS . Figure 2a shows the ideal situation in explanation via high-level concepts . The generative model corresponding to Figure 2a states that for generating each feature xi we first randomly draw the label yi . Given the label , we draw the concepts ci . Given the concepts , we generate the features . The Ideal Graphical Model Estimation ! '' = $ ! % & = ' '' ! '' ! `` # ( a ) The ideal concepts Realistic Graphical Model ! ) # * `` ( b ) Our more realistic graph Realistic Graphical Model ! + ) # * , '' ( c ) The graph with d̂ ( y ) Figure 2 : ( a ) The ideal view of the causal relationships between the features x , concepts c , and labels y . ( b ) In a more realistic setting , the unobserved confounding variable u impacts both x and c. The shared information between x and y go through the discriminative part of the concepts d. We also model the completeness of the concepts via a direct edge from the features x to the labels y . ( c ) When we use d̂ ( y ) = E [ c|y ] in place of d and c , we eliminate the confounding link u→ c. hierarchy in this graph is from nodes with less detailed information ( labels ) to more detailed ones ( features , images ) . This model in Figure 2a is an explanation for the phenomenon in Figure 1 , because the noise in generation of the concepts allows the x—c edge to be stronger than the c—y edge . However , another ( non-mutually exclusive ) explanation for this phenomenon is the existence of hidden confounders u shown in Figure 2b . In this graphical model , u represents the confounders and d represents the unconfounded concepts . Note that we assume that the confounders u and labels y are independent when x and c are not observed . Another phenomenon captured in Figure 2b is the lack of concept completeness ( Yeh et al. , 2020 ) . It describes the situation when the features , compared to the concepts , have additional predictive information about the labels . The non-linear structural equations corresponding to the causal prior graph in Figure 2b are as follows d = f1 ( y ) + εd , ( 1 ) c = d + h ( u ) , ( 2 ) x = f2 ( u , d ) + f3 ( y ) + εx , ( 3 ) for some vector functions h , f1 , f2 , and f3 . We have εd ⊥⊥ y and u ⊥⊥ y . Our definition of d in Eq . ( 2 ) does not restrict u , because we simply attribute the difference between c and f1 ( y ) to a function of the latent confounder u and noise . Our causal prior graph in Figure 2b corresponds to a generative process in which to generate an observed triplet ( xi , ci , yi ) we first draw a label yi and a confounder ui vector independently . Then we draw the discriminative concepts di based on the label and generate the features xi jointly based on the concepts , label , and the confounder . Finally , we draw the observed concept vector ci based on the drawn concept and confounder vectors . Both causal graphs reflect our assumption that the direction of causality is from the labels to concepts and then to the features , y→ d→ x , to ensure that u and y are marginally independent in Figure 2b . This direction also correspond to moving from more abstract class labels to concepts to detailed features . During estimation , we fit the functions in the x→ d→ y direction , because finding the statistical strength of an edge does not depend on its direction . Estimation of the model in Figure 2b is challenging because there are two distinct paths for the information from the labels y to reach the features x . Our solution is to prioritize the bottleneck path and estimate the y → d → x , then estimate the residuals of the regression using the y → x direct path . Our two-stage estimation technique ensures that the predictive information of the features maximally flow through the concepts . In the next sections , we focus on the first phase and using a two-stage regression technique borrowed from the instrumental variables literature to eliminate the noise and confounding in estimation of the d→ x link . Algorithm 1 Debiased CBMs Require : Data tuples ( xi , ci , yi ) for i = 1 , . . . , n. 1 : Estimate a model d̂ ( y ) = E [ c|y ] using ( ci , yi ) pairs . 2 : Train a neural network as an estimator for pφ̂ ( d|x ) using ( xi , d̂i ) ) pairs . 3 : Use pairs ( xi , yi ) to estimate function gθ by fitting ∫ gθ ( d ) dpφ̂ ( d = d|xi ) to yi . 4 : Compute the debiased explanations E [ d|xi ] − 1n ∑n i=1E [ d|xi ] for i = 1 , . . . , n. 5 : return The CBM defined by ( pφ̂ , gθ ) and the debiased explanations . 2.2 INSTRUMENTAL VARIABLES . Background on two-stage regression . In causal inference , instrumental variables ( Stock , 2015 ; Pearl , 2009 ) denoted by z are commonly used to find the causal impact of a variable x on y when x and y are jointly influenced by an unobserved confounder u ( i.e. , x← u→ y ) . The key requirement is that z should be correlated with x but independent of the confounding variable u ( i.e . z→ x→ y and z ⊥⊥ u ) . The commonly used 2-stage least squares first regresses x in terms of z to obtain x̂ followed by regression of y in terms of x̂ . Because of independence between z and u , x̂ is also independent of u . Thus , in the second regression the confounding impact of u is eliminated . Our goal is to use the two-stage regression trick again to remove the confounding factors impacting features and concept vectors . The instrumental variable technique can be used for eliminating the biases due to the measurement errors ( Carroll et al. , 2006 ) . Two-Stage Regression for CBMs . In our causal graph in Figure 2b , the label y can be used for the study of the relationship between concepts d and features x . We predict d as a function of y and use it in place of the concepts in the concept bottleneck models . The graphical model corresponding to this procedure is shown in Figure 2c , where the link u → c is eliminated . In particular , given the independence relationship y ⊥⊥ u , we have d̂ ( y ) = E [ c|y ] ⊥⊥ h ( u ) . This is the basis for our debiasing method in the next section . | The focus of the work is on model interpretability using concept-based explanation. The authors consider the issue of concepts being correlated with confounding information in the features. They propose a causal graph for representing the system and use instrumental variable methods to remove the impact of unobserved confounders. The proposed method is evaluated on synthetic and real data. | SP:18f1b4ab7592fdcc814514e832b766dbb196d2b4 |
GAN "Steerability" without optimization | 1 INTRODUCTION . Since their introduction by Goodfellow et al . ( 2014 ) , generative adversarial networks ( GANs ) have seen remarkable progress , with current models capable of generating samples of very high quality ( Brock et al. , 2018 ; Karras et al. , 2019a ; 2018 ; 2019b ) . In recent years , particular effort has been invested in constructing controllable models , which allow manipulating attributes of the generated images . These range from disentangled models for controlling e.g. , the hair color or gender of facial images ( Karras et al. , 2019a ; b ; Choi et al. , 2018 ) , to models that even allow specifying object relations ( Ashual & Wolf , 2019 ) . Most recently , it has been demonstrated that GANs trained without explicitly enforcing disentanglement , can also be easily “ steered ” ( Jahanian et al. , 2020 ; Plumerault et al. , 2020 ) . These methods can determine semantically meaningful linear directions in the latent space of a pre-trained GAN , which correspond to various different image transformations , such as zoom , horizontal/vertical shift , in-plane rotation , brightness , redness , blueness , etc . Interestingly , a walk in the revealed directions typically has a similar effect across all object categories that the GAN can generate , from animals to man-made objects . To detect such latent-space directions , the methods of Jahanian et al . ( 2020 ) and Plumerault et al . ( 2020 ) require a training procedure that limits them to transformations for which synthetic images can be produced for supervision ( e.g. , shift or zoom ) . Other works have recently presented unsupervised techniques for exposing meaningful directions ( Voynov & Babenko , 2020 ; Härkönen et al. , 2020 ; Peebles et al. , 2020 ) . These methods can go beyond simple user-specified transformations , but also require optimization or training of some sort ( e.g. , drawing random samples in latent space ) . In this paper , we show that for most popular generator architectures , it is possible to determine meaningful latent space trajectories directly from the generator ’ s weights without performing any kind of training or optimization . As illustrated in Fig . 1 , our approach supports both simple userdefined geometric transformations , such as shift and zoom , and unsupervised exploration of directions that typically reveals more complex controls , like the 3D pose of the camera or the blur of the background . We also discuss how to achieve attribute transfer between images , even across object categories ( see Fig . 1 ) , again without any training . We illustrate results mainly on BigGAN , which is class-conditional , but our trajectories are class-agnostic . Our approach is advantageous over existing methods in several respects . First , it is 104×-105× faster . Second , it seems to detect more semantic directions than other methods . And third , it allows explicitly accounting for dataset biases . First order dataset biases As pointed out by Jahanian et al . ( 2020 ) , dataset biases affect the extent to which a pre-trained generator can accommodate different transformations . For example , if all objects in the training set are centered , then no walk in latent space typically allows shifting an object too much without incurring degradation . This implies that a “ steering ” latent-space trajectory should have an end-point . Our nonlinear trajectories indeed possess such convergence points , which correspond to the maximally-transformed versions of the images at the beginning of the trajectories . Conveniently , the end-point can be computed in closed form , so that we can directly jump to the maximally-transformed image without performing a gradual walk . Second order dataset biases Dataset biases can also lead to coupling between transformations . For example , in many datasets zoomed-out objects can appear anywhere within the image , while zoomed-in objects are always centered . In this case , trying to apply a zoom transformation may also result in an undesired shift so as to center the enlarged object . Our unsupervised method allows controlling the extent to which transformation A comes on the expense of transformation B . 1.1 RELATED WORK . Walks in latent space Many works use walks in a GAN ’ s latent space to achieve various effects ( e.g. , ( Shen et al. , 2020 ; Radford et al. , 2015 ; Karras et al. , 2018 ; 2019b ; Denton et al. , 2019 ; Xiao et al. , 2018 ; Goetschalckx et al. , 2019 ) ) . The recent works of Jahanian et al . ( 2020 ) and Plumerault et al . ( 2020 ) specifically focus on determining trajectories which lead to simple user-specified transformations , by employing optimization through the ( pre-trained ) generator . Voynov & Babenko ( 2020 ) proposed an unsupervised approach for revealing dominant directions in latent space . This technique reveals more complex transformations , such as background blur and background removal , yet it also relies on optimization . Most recently , the work of Härkönen et al . ( 2020 ) studied unsupervised discovery of meaningful directions by using PCA on deep features of the generator . The method seeks linear directions in latent space that best map to those deep PCA vectors , and results in a set of non-orthogonal directions . Similarly to the other methods , it also requires a very demanding training procedure ( drawing random latent codes and regressing the latent directions ) , which can take a day for models like BigGAN . Nonlinear walks in latent space Linear latent-space trajectories may arrive at regions where the probability density is low . To avoid this , some methods proposed to replace the popular Gaussian latent space distribution by other priors ( Kilcher et al. , 2018 ) , or to optimize the generator together with the latent space ( Bojanowski et al. , 2018 ) . Others suggested to use nonlinear walks in latent space that avoid low-probability regions . For example , Jahanian et al . ( 2020 ) explored nonlinear trajectories parametrized by two-layer neural networks , while White ( 2016 ) proposed spherical paths for interpolating between two latent codes . Hierarchical GAN architectures Recently there is tendency towards hierarchical GAN architectures ( Karras et al. , 2018 ; 2019a ; Brock et al. , 2018 ; Choi et al. , 2018 ) , which are capable of producing high resolution images at very high quality . It is known that the earlier scales in such models are responsible for generating the global composition of the image , while the deeper scales are responsible for more local attributes ( Karras et al. , 2019a ; Yang et al. , 2019 ; Härkönen et al. , 2020 ) . Here , we distil this common knowledge and show how meaningful directions can be detected in each level , and how these architectures allow transferring attributes between images . 2 USER-SPECIFIED GEOMETRIC TRANSFORMATIONS . Most modern generator architectures map a latent code vector z ∈ Rd having no notion of spatial coordinates , into a two-dimensional output image . In some cases ( e.g. , BigGAN ) , different parts of z are processed differently . In others ( e.g. , BigGAN-deep ) , z is processed as a whole . However , in all cases , the first layer maps z ( or part of it ) into a tensor with low spatial resolution ( e.g. , 4×4×1536 in BigGAN 128 ) . This tensor is then processed by a sequence of convolutional layers that gradually increase its spatial resolution ( using fractional strides ) , until reaching the final image dimensions . Our key observation is that since the output of the first layer already has spatial coordinates , this layer has an important role in determining the coarse structure of the generated image . This suggests that if we were to apply a geometric transformation , like zoom or shift , on the output of the first layer , then we would obtain a similar effect to applying it directly on the generated image ( Fig . 2 ) . In fact , it may even allow slight semantic changes to take place due to the deeper layers that follow , which can compensate for the inability of the generator to generate the precise desired transformed image . As we now show , this observation can be used to find latent space directions corresponding to simple geometric transformations . 2.1 LINEAR TRAJECTORIES . Let us start with linear trajectories . Given a pre-trained generator G and some transformation T , our goal is to find a direction q in latent space such that G ( z + q ) ≈ T { G ( z ) } for every z . To this end , we define P to be the matrix corresponding to T in the resolution of the first layer ’ s output . Denoting the weights and biases of the first layer by W and b , respectively , our goal is therefore to bring1 W ( z + q ) + b as close as possible to P ( Wz + b ) . To guarantee that this holds on average over random draws of z , we formulate our problem as min q Ez∼pz [ ∥∥∥D ( W ( z + q ) + b− P ( Wz + b ) ) ∥∥∥2 ] , ( 1 ) where pz is the probability density function of z , and D is a diagonal matrix that can be used to assign different weights to different elements of the tensors . For example , if P corresponds to a horizontal shift of one element to the right , then we would not like to penalize for differences in the leftmost column of the shifted feature maps ( see Fig . 2 ) . In this case , we set the corresponding diagonal elements ofD to 0 and the rest to 1 . Assuming E [ z ] = 0 , as is the case in most frameworks , the objective in ( 1 ) simplifies to Ez∼pz [ ∥∥∥D ( ( I − P ) Wz ) ∥∥∥2 ] + ∥∥∥D ( Wq + ( I − P ) b ) ∥∥∥2 , ( 2 ) where I is the identity matrix . The first term in ( 2 ) is independent of q , and the second term is quadratic in q and is minimized by q = ( W TD2W ) −1 W TD2 ( P − I ) b . ( 3 ) We have thus obtained a closed form expression for the optimal linear direction corresponding to transformation P in terms of only the weightsW and b of the first layer . Figure 2 illustrates this framework in the context of the BigGAN model , in which the feature maps at the output of the first layer are 4× 4 . For translation , we use a matrix P that shifts the tensor by one element ( aiming at translating the output image by one fourth its size ) . For zoom-in , we use a matrix P that performs nearest-neighbor 2× up-sampling , and for zoom-out we use sub-sampling by 2× . For each such transformation , we can control the extent of the effect by multiplying the steering vector q by some α > 0 . Figure 1 ( top-left ) and Fig . 3 ( a ) show example results for zoom and shift with the BigGAN generator . As can be seen , this simple approach manages to produce pronounced effects , although not using optimization through the generator , as in ( Jahanian et al. , 2020 ) . Following ( Jahanian et al. , 2020 ) , we use an object detector to quantify our zoom and shift transformations . Figure 4 shows the distributions of areas and centers of object bounding boxes in the transformed images . As can be seen , our trajectories lead to similar effects to those of Jahanian et al . ( 2020 ) , despite being 104× faster to compute ( see Tab . 1 ) . Please refer to App . A.1 for details about the evaluation , and see additional results with BigGAN and with the DCGAN architecture of ( Miyato et al. , 2018 ) in App . A.3 . | The authors propose two new techniques that extract interpretable directions from latent spaces of pretrained GAN generators. Both techniques are very efficient and are shown to work with the state-of-the-art BigGAN models. Furthermore, the authors describe additional details of the method, like determining the transformation end-points, which are important for usage in the practical visual editing. | SP:a5b02af3879a1add513f148bc12934e814258b09 |
GAN "Steerability" without optimization | 1 INTRODUCTION . Since their introduction by Goodfellow et al . ( 2014 ) , generative adversarial networks ( GANs ) have seen remarkable progress , with current models capable of generating samples of very high quality ( Brock et al. , 2018 ; Karras et al. , 2019a ; 2018 ; 2019b ) . In recent years , particular effort has been invested in constructing controllable models , which allow manipulating attributes of the generated images . These range from disentangled models for controlling e.g. , the hair color or gender of facial images ( Karras et al. , 2019a ; b ; Choi et al. , 2018 ) , to models that even allow specifying object relations ( Ashual & Wolf , 2019 ) . Most recently , it has been demonstrated that GANs trained without explicitly enforcing disentanglement , can also be easily “ steered ” ( Jahanian et al. , 2020 ; Plumerault et al. , 2020 ) . These methods can determine semantically meaningful linear directions in the latent space of a pre-trained GAN , which correspond to various different image transformations , such as zoom , horizontal/vertical shift , in-plane rotation , brightness , redness , blueness , etc . Interestingly , a walk in the revealed directions typically has a similar effect across all object categories that the GAN can generate , from animals to man-made objects . To detect such latent-space directions , the methods of Jahanian et al . ( 2020 ) and Plumerault et al . ( 2020 ) require a training procedure that limits them to transformations for which synthetic images can be produced for supervision ( e.g. , shift or zoom ) . Other works have recently presented unsupervised techniques for exposing meaningful directions ( Voynov & Babenko , 2020 ; Härkönen et al. , 2020 ; Peebles et al. , 2020 ) . These methods can go beyond simple user-specified transformations , but also require optimization or training of some sort ( e.g. , drawing random samples in latent space ) . In this paper , we show that for most popular generator architectures , it is possible to determine meaningful latent space trajectories directly from the generator ’ s weights without performing any kind of training or optimization . As illustrated in Fig . 1 , our approach supports both simple userdefined geometric transformations , such as shift and zoom , and unsupervised exploration of directions that typically reveals more complex controls , like the 3D pose of the camera or the blur of the background . We also discuss how to achieve attribute transfer between images , even across object categories ( see Fig . 1 ) , again without any training . We illustrate results mainly on BigGAN , which is class-conditional , but our trajectories are class-agnostic . Our approach is advantageous over existing methods in several respects . First , it is 104×-105× faster . Second , it seems to detect more semantic directions than other methods . And third , it allows explicitly accounting for dataset biases . First order dataset biases As pointed out by Jahanian et al . ( 2020 ) , dataset biases affect the extent to which a pre-trained generator can accommodate different transformations . For example , if all objects in the training set are centered , then no walk in latent space typically allows shifting an object too much without incurring degradation . This implies that a “ steering ” latent-space trajectory should have an end-point . Our nonlinear trajectories indeed possess such convergence points , which correspond to the maximally-transformed versions of the images at the beginning of the trajectories . Conveniently , the end-point can be computed in closed form , so that we can directly jump to the maximally-transformed image without performing a gradual walk . Second order dataset biases Dataset biases can also lead to coupling between transformations . For example , in many datasets zoomed-out objects can appear anywhere within the image , while zoomed-in objects are always centered . In this case , trying to apply a zoom transformation may also result in an undesired shift so as to center the enlarged object . Our unsupervised method allows controlling the extent to which transformation A comes on the expense of transformation B . 1.1 RELATED WORK . Walks in latent space Many works use walks in a GAN ’ s latent space to achieve various effects ( e.g. , ( Shen et al. , 2020 ; Radford et al. , 2015 ; Karras et al. , 2018 ; 2019b ; Denton et al. , 2019 ; Xiao et al. , 2018 ; Goetschalckx et al. , 2019 ) ) . The recent works of Jahanian et al . ( 2020 ) and Plumerault et al . ( 2020 ) specifically focus on determining trajectories which lead to simple user-specified transformations , by employing optimization through the ( pre-trained ) generator . Voynov & Babenko ( 2020 ) proposed an unsupervised approach for revealing dominant directions in latent space . This technique reveals more complex transformations , such as background blur and background removal , yet it also relies on optimization . Most recently , the work of Härkönen et al . ( 2020 ) studied unsupervised discovery of meaningful directions by using PCA on deep features of the generator . The method seeks linear directions in latent space that best map to those deep PCA vectors , and results in a set of non-orthogonal directions . Similarly to the other methods , it also requires a very demanding training procedure ( drawing random latent codes and regressing the latent directions ) , which can take a day for models like BigGAN . Nonlinear walks in latent space Linear latent-space trajectories may arrive at regions where the probability density is low . To avoid this , some methods proposed to replace the popular Gaussian latent space distribution by other priors ( Kilcher et al. , 2018 ) , or to optimize the generator together with the latent space ( Bojanowski et al. , 2018 ) . Others suggested to use nonlinear walks in latent space that avoid low-probability regions . For example , Jahanian et al . ( 2020 ) explored nonlinear trajectories parametrized by two-layer neural networks , while White ( 2016 ) proposed spherical paths for interpolating between two latent codes . Hierarchical GAN architectures Recently there is tendency towards hierarchical GAN architectures ( Karras et al. , 2018 ; 2019a ; Brock et al. , 2018 ; Choi et al. , 2018 ) , which are capable of producing high resolution images at very high quality . It is known that the earlier scales in such models are responsible for generating the global composition of the image , while the deeper scales are responsible for more local attributes ( Karras et al. , 2019a ; Yang et al. , 2019 ; Härkönen et al. , 2020 ) . Here , we distil this common knowledge and show how meaningful directions can be detected in each level , and how these architectures allow transferring attributes between images . 2 USER-SPECIFIED GEOMETRIC TRANSFORMATIONS . Most modern generator architectures map a latent code vector z ∈ Rd having no notion of spatial coordinates , into a two-dimensional output image . In some cases ( e.g. , BigGAN ) , different parts of z are processed differently . In others ( e.g. , BigGAN-deep ) , z is processed as a whole . However , in all cases , the first layer maps z ( or part of it ) into a tensor with low spatial resolution ( e.g. , 4×4×1536 in BigGAN 128 ) . This tensor is then processed by a sequence of convolutional layers that gradually increase its spatial resolution ( using fractional strides ) , until reaching the final image dimensions . Our key observation is that since the output of the first layer already has spatial coordinates , this layer has an important role in determining the coarse structure of the generated image . This suggests that if we were to apply a geometric transformation , like zoom or shift , on the output of the first layer , then we would obtain a similar effect to applying it directly on the generated image ( Fig . 2 ) . In fact , it may even allow slight semantic changes to take place due to the deeper layers that follow , which can compensate for the inability of the generator to generate the precise desired transformed image . As we now show , this observation can be used to find latent space directions corresponding to simple geometric transformations . 2.1 LINEAR TRAJECTORIES . Let us start with linear trajectories . Given a pre-trained generator G and some transformation T , our goal is to find a direction q in latent space such that G ( z + q ) ≈ T { G ( z ) } for every z . To this end , we define P to be the matrix corresponding to T in the resolution of the first layer ’ s output . Denoting the weights and biases of the first layer by W and b , respectively , our goal is therefore to bring1 W ( z + q ) + b as close as possible to P ( Wz + b ) . To guarantee that this holds on average over random draws of z , we formulate our problem as min q Ez∼pz [ ∥∥∥D ( W ( z + q ) + b− P ( Wz + b ) ) ∥∥∥2 ] , ( 1 ) where pz is the probability density function of z , and D is a diagonal matrix that can be used to assign different weights to different elements of the tensors . For example , if P corresponds to a horizontal shift of one element to the right , then we would not like to penalize for differences in the leftmost column of the shifted feature maps ( see Fig . 2 ) . In this case , we set the corresponding diagonal elements ofD to 0 and the rest to 1 . Assuming E [ z ] = 0 , as is the case in most frameworks , the objective in ( 1 ) simplifies to Ez∼pz [ ∥∥∥D ( ( I − P ) Wz ) ∥∥∥2 ] + ∥∥∥D ( Wq + ( I − P ) b ) ∥∥∥2 , ( 2 ) where I is the identity matrix . The first term in ( 2 ) is independent of q , and the second term is quadratic in q and is minimized by q = ( W TD2W ) −1 W TD2 ( P − I ) b . ( 3 ) We have thus obtained a closed form expression for the optimal linear direction corresponding to transformation P in terms of only the weightsW and b of the first layer . Figure 2 illustrates this framework in the context of the BigGAN model , in which the feature maps at the output of the first layer are 4× 4 . For translation , we use a matrix P that shifts the tensor by one element ( aiming at translating the output image by one fourth its size ) . For zoom-in , we use a matrix P that performs nearest-neighbor 2× up-sampling , and for zoom-out we use sub-sampling by 2× . For each such transformation , we can control the extent of the effect by multiplying the steering vector q by some α > 0 . Figure 1 ( top-left ) and Fig . 3 ( a ) show example results for zoom and shift with the BigGAN generator . As can be seen , this simple approach manages to produce pronounced effects , although not using optimization through the generator , as in ( Jahanian et al. , 2020 ) . Following ( Jahanian et al. , 2020 ) , we use an object detector to quantify our zoom and shift transformations . Figure 4 shows the distributions of areas and centers of object bounding boxes in the transformed images . As can be seen , our trajectories lead to similar effects to those of Jahanian et al . ( 2020 ) , despite being 104× faster to compute ( see Tab . 1 ) . Please refer to App . A.1 for details about the evaluation , and see additional results with BigGAN and with the DCGAN architecture of ( Miyato et al. , 2018 ) in App . A.3 . | This paper studies transformations in GAN latent space that map to meaningful transformations in the generated data. The main contribution is to derive closed form methods for discovering latent transformations that correspond to 1) geometric changes and 2) changes that capture principle components of model variation. The paper also contributes new methods for nonlinear latent transformations, disentangled transformations, and an application to attribute transfer. | SP:a5b02af3879a1add513f148bc12934e814258b09 |
Hard Attention Control By Mutual Information Maximization | 1 INTRODUCTION . Reinforcement learning ( RL ) algorithms have successfully employed neural networks over the past few years , surpassing human level performance in many tasks ( Mnih et al. , 2015 ; Silver et al. , 2017 ; Berner et al. , 2019 ; Schulman et al. , 2017 ) . But a key difference in the way tasks are performed by humans versus RL algorithms is that humans have the ability to focus on parts of the state at a time , using attention to limit the amount of information gathered at every step . We actively control our attention to build an internal representation of our surroundings over multiple fixations ( Fourtassi et al. , 2017 ; Barrouillet et al. , 2004 ; Yarbus , 2013 ; Itti , 2005 ) . We also use memory and internal world models to predict motions of dynamic objects in the scene when they are not under direct observation ( Bosco et al. , 2012 ) . By limiting the amount of input information in these two ways , i.e . directing attention only where needed and internally modeling the rest of the environment , we are able to be more efficient in terms of data that needs to be collected from the environment and processed at each time step . By contrast , modern reinforcement learning methods often operate on the entire state . Observing the entire state simultaneously may be difficult in realistic environments . Consider an embodied agent that must actuate its camera to gather visual information about its surroundings learning how to cross a busy street . At every moment , there are different objects in the environment competing for its attention . The agent needs to learn to look left and right to store locations , heading , and speed of nearby vehicles , and perhaps other pedestrians . It must learn to create a live map of its surroundings , frequently checking back on moving objects to update their dynamics . In other words , the agent must learn to selectively move its attention so as to maximize the amount of information it collects from the environment at a time , while internally modeling motions of the other , more predictable parts of the state . Its internal representation , built using successive glimpses , must be sufficient to learn how to complete tasks in this partially observable environment . We consider the problem of acting in an environment that is only partially observable through a controllable , fixed-size , hard attention window ( see figure 1 ) . Only the part of the state that is under the attention window is available to the agent as its observation . The rest must be inferred from previous observations and experience . We assume that the location of the attention window at every time step is under control of the agent and its size compared to the full environment state is known to the agent . We distinguish this task from that of learning soft attention ( Vaswani et al. , 2017 ) , where the full state is attended to , weighted by a vector , and then fed into subsequent layers . Our system must learn to 1 ) decide where to place the attention in order to gather more information about its surroundings , 2 ) record the observation made into an internal memory and model the motion within parts of the state that were unobserved , and 3 ) use this internal representation to learn how to solve its task within the environment . Our approach for controlling attention uses RL to maximize an information theoretic objective closely related to the notion of surprise or novelty ( Schmidhuber , 1991 ) . It is unsupervised in terms of environment rewards , i.e . it can be trained on offline data ( states and actions ) without knowing the task or related rewards . We discuss this in more detail in section 5 . Memory also plays a crucial role in allowing agents to solve tasks in partially observable environments . We pair our attention control mechanism with a memory architecture inspired largely by Du & Narasimhan ( 2019 ) ’ s SpatialNet , but modified to work in partially observable domains . This is described in section 4 . Empirically , we show in section 6.1 that our system is able to reconstruct the full state image including dynamic objects at all time steps given only partial observations . Further , we show in section 6.2 that the internal representation built by our attention control mechanism and memory architecture is sufficient for the agent to learn to solve tasks in this challenging partially observable environment . 2 RELATED WORKS . Using hard attention for image classification or object recognition is well studied in computer vision ( Alexe et al. , 2012 ; Butko & Movellan , 2009 ; Larochelle & Hinton , 2010 ; Paletta et al. , 2005 ; Zoran et al. , 2020 ; Welleck et al. , 2017 ) . Attention allows for processing only the salient or interesting parts of the image ( Itti et al. , 1998 ) . Similarly , attention control has been applied to tracking objects within a video ( Denil et al. , 2012 ; Kamkar et al. , 2020 ; Yu et al. , 2020 ) . Surprisingly , not a lot of recent work exists on the topic of hard attention control in reinforcement learning domains , where a sequential decision making task has to be solved by using partial observations from under the attention . Mnih et al . ( 2014 ) proposed a framework for hard attention control in the classification setting and a simple reinforcement learning task . Their approach consists of using environment rewards to train an attention control RL agent . Our approach differs mainly in that we train the attention control using our novel information theoretic objective as reward . Mnih et al . ( 2014 ) ’ s approach leads to a task specific policy for attention control , whereas our approach is unsupervised in terms of the task and can be applied generally to downstream tasks in the environment . Our approach also differs in that we use a memory architecture that is more suited to partially observable tasks with 2D images as input , compared to a RNN used by Mnih et al . ( 2014 ) . There has been much prior work on memory and world models for reinforcement learning ( Ha & Schmidhuber , 2018 ; Graves et al. , 2016 ; Hausknecht & Stone , 2015 ; Khan et al. , 2017 ) . The work closest to our own is Du & Narasimhan ( 2019 ) ’ s SpatialNet , which attempts to learn a task-agnostic world model for multi-task settings . Our memory architecture is largely inspired by SpatialNet and adapted to work in the partially observable setting . We also use their PhysEnv environment to evaluate our approach . Closely related work is Neural Map ( Parisotto & Salakhutdinov , 2017 ) , which uses a structured 2D memory map to store information about the environment . Their approach also applies to partially observable RL tasks , but the attention is fixed to the agent . In contrast , we consider the problem of learning to control an attention window that can move independently of the agent location . Recently , Freeman et al . ( 2019 ) showed that world models can be learnt by simply limiting the agent ’ s ability to observe the environment . They apply observational dropout , where the output of the agent ’ s world model , rather than the environment state , is occasionally provided to the policy . We consider the related scenario where only a part of the true environment state is provided to the agent at each time step and the rest must be modeled using previous observations . Finally , mutual information has been used to train self-supervised RL agents . This line of work originates in curiosity driven and intrinsically motivated RL ( Schmidhuber , 1991 ; Pathak et al. , 2017 ; Bellemare et al. , 2016 ) . Typically , some notion of predictive error or novelty about an aspect of the environment is optimized in lieu of environment rewards . Multiple papers have successfully used different formulations of mutual information to learn how to efficiently explore the environment without extrinsic rewards ( Mohamed & Rezende , 2015 ; Houthooft et al. , 2016 ; Achiam et al. , 2018 ; Gregor et al. , 2016 ; Eysenbach et al. , 2018 ; Sharma et al. , 2019 ) . We apply the idea of using mutual information to the problem of curiosity driven attention control . 3 PRELIMINARIES . In this work , we are concerned with tasks solved using reinforcement learning ( RL ) . RL is the study of agents acting in an environment to maximize some notion of long term utility . It is almost always formalized using the language of Markov decision problems ( MDPs ) . States , actions , rewards and transitions form the components of an MDP , often represented as the tuple 〈S , A , R , T 〉 . Maximizing the expected sum of ( discounted ) rewards over rollouts in the environment is usually set as the objective of learning . Once a problem is formulated as an MDP , such that the components 〈S , A , R , T 〉 are well defined , one can apply a range of model-free RL algorithms to attempt to solve it ( Schulman et al. , 2017 ; Mnih et al. , 2016 ; Wu et al. , 2017 ) . A solution to an MDP is typically sought as an optimal policy , π∗ : S → A , which is a function that maps every state to an action that maximizes the long term expected rewards . In this section , we will attempt to formalize the components of the partially observable reinforcement learning problem under study . 3.1 INTERNAL REPRESENTATION First , we give a brief description of how the agent stores observations in an internal representation of its surroundings ( figure 2 ) . An map ( µ ) tracks the full environment state ( s ) , which is never directly observed . The map is empty at the start of the episode and gets sequentially written into as observations are made . The agent also creates a reconstruction of the full state ( τ ) at every time step based on its map . This will become useful later for training . For now , it suffices that µt is the map before an observation is made and µwt is the one after the observation is made . µt+1 is the map after the dynamics of the system for the next time step are taken into account . 3.2 THE TWO AGENTS . We formulate the solutions to controlling the attention at every time step and completing the environment task as two separate reinforcement learning agents . The attention location is controlled by the glimpse agent ( the eye in figure 2 ) , and actions within the environment are taken by the regular agent . These two agents have their own separate MDPs with their 〈S , A , R〉 tuples defined below . The glimpse agent ’ s state at every timestep is µt . Its set of actions is all possible attention locations within the full state ( Width × Height actions ) . Its reward is based on the information theoretic objective discussed in section 5 . Thus , the glimpse agent is provided the map before an observation is made and it must decide where the observation should be made from in order to optimize its reward . The environment agent acting in the environment receives as input µwt , i.e . the internal representation after the observation has been recorded . Its actions are the normal set of actions in the environment and its reward is the normal environment reward . We emphasize that neither agent has access to the full state at any time . They must both act based on the internal representation alone . They also can not make multiple observations from the same environment state . Once an observation is made , an action must be selected that will change the environment state . In the next section , we will describe in detail how µwt , µt+1 and τt are formed and how the internal map is trained through a sequence of partial observations . | This paper proposes a new architecture and training method to learn tasks that require hard attention control. Specifically, the paper proposes to learn the “glimpse agent” (which controls the hard attention window) by task-agnostic loss that seeks to maximize information gain by the glimpse to the learned world model. The authors also proposed a specific architecture that incorporates consecutive glimpses to learn the world model. | SP:73d7bceeae0307819f03d69e3799969808e20137 |
Hard Attention Control By Mutual Information Maximization | 1 INTRODUCTION . Reinforcement learning ( RL ) algorithms have successfully employed neural networks over the past few years , surpassing human level performance in many tasks ( Mnih et al. , 2015 ; Silver et al. , 2017 ; Berner et al. , 2019 ; Schulman et al. , 2017 ) . But a key difference in the way tasks are performed by humans versus RL algorithms is that humans have the ability to focus on parts of the state at a time , using attention to limit the amount of information gathered at every step . We actively control our attention to build an internal representation of our surroundings over multiple fixations ( Fourtassi et al. , 2017 ; Barrouillet et al. , 2004 ; Yarbus , 2013 ; Itti , 2005 ) . We also use memory and internal world models to predict motions of dynamic objects in the scene when they are not under direct observation ( Bosco et al. , 2012 ) . By limiting the amount of input information in these two ways , i.e . directing attention only where needed and internally modeling the rest of the environment , we are able to be more efficient in terms of data that needs to be collected from the environment and processed at each time step . By contrast , modern reinforcement learning methods often operate on the entire state . Observing the entire state simultaneously may be difficult in realistic environments . Consider an embodied agent that must actuate its camera to gather visual information about its surroundings learning how to cross a busy street . At every moment , there are different objects in the environment competing for its attention . The agent needs to learn to look left and right to store locations , heading , and speed of nearby vehicles , and perhaps other pedestrians . It must learn to create a live map of its surroundings , frequently checking back on moving objects to update their dynamics . In other words , the agent must learn to selectively move its attention so as to maximize the amount of information it collects from the environment at a time , while internally modeling motions of the other , more predictable parts of the state . Its internal representation , built using successive glimpses , must be sufficient to learn how to complete tasks in this partially observable environment . We consider the problem of acting in an environment that is only partially observable through a controllable , fixed-size , hard attention window ( see figure 1 ) . Only the part of the state that is under the attention window is available to the agent as its observation . The rest must be inferred from previous observations and experience . We assume that the location of the attention window at every time step is under control of the agent and its size compared to the full environment state is known to the agent . We distinguish this task from that of learning soft attention ( Vaswani et al. , 2017 ) , where the full state is attended to , weighted by a vector , and then fed into subsequent layers . Our system must learn to 1 ) decide where to place the attention in order to gather more information about its surroundings , 2 ) record the observation made into an internal memory and model the motion within parts of the state that were unobserved , and 3 ) use this internal representation to learn how to solve its task within the environment . Our approach for controlling attention uses RL to maximize an information theoretic objective closely related to the notion of surprise or novelty ( Schmidhuber , 1991 ) . It is unsupervised in terms of environment rewards , i.e . it can be trained on offline data ( states and actions ) without knowing the task or related rewards . We discuss this in more detail in section 5 . Memory also plays a crucial role in allowing agents to solve tasks in partially observable environments . We pair our attention control mechanism with a memory architecture inspired largely by Du & Narasimhan ( 2019 ) ’ s SpatialNet , but modified to work in partially observable domains . This is described in section 4 . Empirically , we show in section 6.1 that our system is able to reconstruct the full state image including dynamic objects at all time steps given only partial observations . Further , we show in section 6.2 that the internal representation built by our attention control mechanism and memory architecture is sufficient for the agent to learn to solve tasks in this challenging partially observable environment . 2 RELATED WORKS . Using hard attention for image classification or object recognition is well studied in computer vision ( Alexe et al. , 2012 ; Butko & Movellan , 2009 ; Larochelle & Hinton , 2010 ; Paletta et al. , 2005 ; Zoran et al. , 2020 ; Welleck et al. , 2017 ) . Attention allows for processing only the salient or interesting parts of the image ( Itti et al. , 1998 ) . Similarly , attention control has been applied to tracking objects within a video ( Denil et al. , 2012 ; Kamkar et al. , 2020 ; Yu et al. , 2020 ) . Surprisingly , not a lot of recent work exists on the topic of hard attention control in reinforcement learning domains , where a sequential decision making task has to be solved by using partial observations from under the attention . Mnih et al . ( 2014 ) proposed a framework for hard attention control in the classification setting and a simple reinforcement learning task . Their approach consists of using environment rewards to train an attention control RL agent . Our approach differs mainly in that we train the attention control using our novel information theoretic objective as reward . Mnih et al . ( 2014 ) ’ s approach leads to a task specific policy for attention control , whereas our approach is unsupervised in terms of the task and can be applied generally to downstream tasks in the environment . Our approach also differs in that we use a memory architecture that is more suited to partially observable tasks with 2D images as input , compared to a RNN used by Mnih et al . ( 2014 ) . There has been much prior work on memory and world models for reinforcement learning ( Ha & Schmidhuber , 2018 ; Graves et al. , 2016 ; Hausknecht & Stone , 2015 ; Khan et al. , 2017 ) . The work closest to our own is Du & Narasimhan ( 2019 ) ’ s SpatialNet , which attempts to learn a task-agnostic world model for multi-task settings . Our memory architecture is largely inspired by SpatialNet and adapted to work in the partially observable setting . We also use their PhysEnv environment to evaluate our approach . Closely related work is Neural Map ( Parisotto & Salakhutdinov , 2017 ) , which uses a structured 2D memory map to store information about the environment . Their approach also applies to partially observable RL tasks , but the attention is fixed to the agent . In contrast , we consider the problem of learning to control an attention window that can move independently of the agent location . Recently , Freeman et al . ( 2019 ) showed that world models can be learnt by simply limiting the agent ’ s ability to observe the environment . They apply observational dropout , where the output of the agent ’ s world model , rather than the environment state , is occasionally provided to the policy . We consider the related scenario where only a part of the true environment state is provided to the agent at each time step and the rest must be modeled using previous observations . Finally , mutual information has been used to train self-supervised RL agents . This line of work originates in curiosity driven and intrinsically motivated RL ( Schmidhuber , 1991 ; Pathak et al. , 2017 ; Bellemare et al. , 2016 ) . Typically , some notion of predictive error or novelty about an aspect of the environment is optimized in lieu of environment rewards . Multiple papers have successfully used different formulations of mutual information to learn how to efficiently explore the environment without extrinsic rewards ( Mohamed & Rezende , 2015 ; Houthooft et al. , 2016 ; Achiam et al. , 2018 ; Gregor et al. , 2016 ; Eysenbach et al. , 2018 ; Sharma et al. , 2019 ) . We apply the idea of using mutual information to the problem of curiosity driven attention control . 3 PRELIMINARIES . In this work , we are concerned with tasks solved using reinforcement learning ( RL ) . RL is the study of agents acting in an environment to maximize some notion of long term utility . It is almost always formalized using the language of Markov decision problems ( MDPs ) . States , actions , rewards and transitions form the components of an MDP , often represented as the tuple 〈S , A , R , T 〉 . Maximizing the expected sum of ( discounted ) rewards over rollouts in the environment is usually set as the objective of learning . Once a problem is formulated as an MDP , such that the components 〈S , A , R , T 〉 are well defined , one can apply a range of model-free RL algorithms to attempt to solve it ( Schulman et al. , 2017 ; Mnih et al. , 2016 ; Wu et al. , 2017 ) . A solution to an MDP is typically sought as an optimal policy , π∗ : S → A , which is a function that maps every state to an action that maximizes the long term expected rewards . In this section , we will attempt to formalize the components of the partially observable reinforcement learning problem under study . 3.1 INTERNAL REPRESENTATION First , we give a brief description of how the agent stores observations in an internal representation of its surroundings ( figure 2 ) . An map ( µ ) tracks the full environment state ( s ) , which is never directly observed . The map is empty at the start of the episode and gets sequentially written into as observations are made . The agent also creates a reconstruction of the full state ( τ ) at every time step based on its map . This will become useful later for training . For now , it suffices that µt is the map before an observation is made and µwt is the one after the observation is made . µt+1 is the map after the dynamics of the system for the next time step are taken into account . 3.2 THE TWO AGENTS . We formulate the solutions to controlling the attention at every time step and completing the environment task as two separate reinforcement learning agents . The attention location is controlled by the glimpse agent ( the eye in figure 2 ) , and actions within the environment are taken by the regular agent . These two agents have their own separate MDPs with their 〈S , A , R〉 tuples defined below . The glimpse agent ’ s state at every timestep is µt . Its set of actions is all possible attention locations within the full state ( Width × Height actions ) . Its reward is based on the information theoretic objective discussed in section 5 . Thus , the glimpse agent is provided the map before an observation is made and it must decide where the observation should be made from in order to optimize its reward . The environment agent acting in the environment receives as input µwt , i.e . the internal representation after the observation has been recorded . Its actions are the normal set of actions in the environment and its reward is the normal environment reward . We emphasize that neither agent has access to the full state at any time . They must both act based on the internal representation alone . They also can not make multiple observations from the same environment state . Once an observation is made , an action must be selected that will change the environment state . In the next section , we will describe in detail how µwt , µt+1 and τt are formed and how the internal map is trained through a sequence of partial observations . | This work presents a method for learning a hard attention controller using an information maximization approach. As the authors point out, such a method could be very useful for reasoning in terms of high-dimensional observations, like vision. In brief, the method learning to choose the next attention position to be the most informative by maximizing the uncertainty of the next observation. Uncertainty is quantified using a spatial memory model that is trained to reconstruct and predict the scene. The authors validate this approach by showing that the resulting attention mechanism can be used for two simple downstream tasks. The resulting agent outperforms others trained using baseline attention mechanisms: a hard attention mechanism that is trained on task reward ("environment"; similar to Mnih et al 2014), as well as models that attend to random positions or to the agent's location. | SP:73d7bceeae0307819f03d69e3799969808e20137 |
Geometry matters: Exploring language examples at the decision boundary | 1 INTRODUCTION . Machine learning classifiers have achieved state-of-the-art success in tasks such as image classification and text classification . Despite their successes , several recent papers have pointed out flaws in the features learned by such classifiers . Geirhos et al . ( 2020 ) cast this phenomenon as shortcut learning , where a classifier ends up relying on shallow features in benchmark datasets that do not generalize well to more difficult datasets or tasks . For instance , Beery et al . ( 2018 ) showed that an image dataset constructed for animal detection and classification failed to generalize to images of animals in new locations . In language , this problem manifests at the word level . Poliak et al . ( 2018 ) showed that models using one of the two input sentences for semantic entailment performed better than the majority class by relying on shallow features . Similar observations were also made by Gururangan et al . ( 2018 ) , where linguistic traits such as `` vagueness '' and `` negation '' were highly correlated with certain classes . In order to study the robustness of a classifier , it is essential to perturb the examples at the classifier ’ s decision boundary . Contrast sets by Gardner et al . ( 2020 ) and counterfactual examples by Kaushik et al . ( 2020 ) are two approaches where the authors aimed at perturbing the datasets to identify difficult examples . In contrast sets , authors of the dataset manually fill in the examples near the decision boundary ( examples highlighted in small circles in Figure 1 ) to better evaluate the classifier performance . In counterfactual examples , the authors use counterfactual reasoning along with Amazon Mechanical Turk to create the `` non-gratuitous changes . '' While these approaches are interesting , it ’ s still unclear if evaluating on these will actually capture a classifier ’ s fragility . Furthermore , these approaches significantly differ from each other and it ’ s important to come up with a common way to reason about them . Motivated by these challenges , we propose a geometrical framework to reason about difficult examples . Using our method , we are able to discover fragile examples for state of the art NLP models like BERTby Devlin et al . ( 2018 ) and CNN ( Convolutional Neural Networks ) by Kim ( 2014 ) . Our experiments using the Fisher information metric ( FIM ) show that both counterfactual examples and contrast sets are , in fact , quite far from the decision boundary geometrically and not that different from normal examples ( circles and triangles in Figure 1 ) . As such , it is more important to perform evaluation on the examples lying in the green region , which represent confusing examples for the classifier , where even a small perturbation ( for instance , substituting the name of an actress ) can cause the neural network to misclassify . It is important to note that this does not depend solely on the classifier ’ s certainty as adversarial examples can fool neural networks into misclassifying with high confidence , as was shown by Szegedy et al . ( 2013 ) . We now motivate our choice of using the Fisher information metric ( FIM ) in order to quantify the difficulty of an example . In most natural language processing tasks , deep learning models are used to model the conditional probability distribution p ( y | x ) of a class label y conditioned on the input x . Here x can represent a sentence , while y can be a sentiment of the sentence . If we imagine a neural network as a probabilistic mapping between inputs to outputs , a natural property to measure is the Kullback-Leibler ( KL ) divergence between the example and an perturbation around that example . For small perturbations to the input , the FIM gives a quadratic form that approximates , up to second order , the change in the output probabilities of a neural network . Zhao et al . ( 2019 ) used this fact to demonstrate that the eigenvector associated with the maximum eigenvalue of the FIM gives an effective direction to perturb an example to generate an adversarial attack in computer vision . Furthermore , from an information geometry viewpoint , the FIM is a Riemannian metric , inducing a manifold geometry on the input space and providing a notion of distance based on changes in the information of inputs . To the best of our knowledge , this is the first work analyzing properties of the fisher metric to understand classifier fragility in NLP . The rest of the paper is organized as follows : In Section 2 , we summarize related work . In Section 3 , we discuss our approach of computing the FIM and the gradient-based perturbation strategy . In Section 4 , we discuss the results of the eigenvalues of FIM in synthetic data and sentiment analysis datasets with BERT and CNN . Finally , in Section 5 , we discuss the implications of studying the eigenvalues of FIM for evaluating NLP models . Table 1 : CNN , IMDb dataset : Unlike the difficult examples ( larger eigenvalue ) , word substitutions are ineffective in changing the classifier output for the easier examples ( smaller eigenvalue ) . In difficult examples synonym or change of name , changes classifier label . In easy examples , despite multiple simultaneous antonym substitutions , the classifier sentiment does not change . Perturbed sentiment Word substitutions Positive → Negative difficult example ( λmax =5.25 ) Going into this movie , I had heard good things about it . Coming out of it , I wasn ’ t really amazed nor disappointed . Simon Pegg plays a rather childish character much like his other movies . There were a couple of laughs here and there– nothing too funny . Probably my favorite → preferred parts of the movie is when he dances in the club scene . I totally got ta try that out next time I find myself in a club . A couple of stars here and there including : Megan Fox , Kirsten Dunst , that chick from X-Files , and Jeff Bridges . I found it quite amusing to see a cameo appearance of Thandie Newton in a scene . She of course being in a previous movie with Simon Pegg , Run Fatboy Run . I see it as a toss up , you ’ ll either enjoy it to an extent or find it a little dull . I might add , Kirsten Dunst → Nicole Kidman , Emma Stone , Megan Fox , Tom Cruise , Johnny Depp , Robert Downey Jr. is adorable in this movie . :3 Negative → Negative easy example ( λmax =0.0008 ) I missed this movie in the cinema but had some idea in the back of my head that it was worth a look , so when I saw it on the shelves in DVD I thought `` time to watch it '' . Big mistake ! < br / > < br / > A long list of stars can not save this turkey , surely one of the worst → best movies ever . An incomprehensible → comprehensible plot is poorly → exceptionally delivered and poorly → brilliantly presented . Perhaps it would have made more sense if I ’ d read Robbins ’ novel but unless the film is completely different to the novel , and with Robbins assisting in the screenplay I doubt it , the novel would have to be an excruciating → exciting read as well. < br / > < br / > I hope the actors were well paid as they looked embarrassed to be in this waste of celluloid and more lately DVD blanks , take for example Pat Morita . Even Thurman has the grace to look uncomfortable at times. < br / > < br / > Save yourself around 98 minutes of your life for something more worthwhile , like trimming your toenails or sorting out your sock drawer . Even when you see it in the `` under $ 5 '' throw-away bin at your local store , resist the urge ! 2 RELATED WORK . In NLP , machine learning models for classification rely on spurious statistical patterns of the text and use shortcut for learning to classify . These can range from annotation artifacts , as was shown by Goyal et al . ( 2017 ) ; Kaushik and Lipton ( 2018 ) ; Gururangan et al . ( 2018 ) , spelling mistakes as in McCoy et al . ( 2019 ) , or new test conditions that require world knowledge Glockner et al . ( 2018 ) . Simple decision rules that the model relies on are hard to quantify . Trivial patterns like relying on the answer “ 2 ” for answering questions of the format “ how many ” for the visual question answering dataset Antol et al . ( 2015 ) , would correctly answer 39 % of the questions . Jia and Liang ( 2017 ) showed that adversarially inserted sentences that did not change the correct answer , would cause state of the art models to regress in performance in the SQuAD Rajpurkar et al . ( 2016 ) question answering dataset . Glockner et al . ( 2018 ) showed that template-based modifications by swapping just one word from the training set to create a test set highlighted models ’ failure to capture many simple inferences . Dixon et al . ( 2018 ) evaluated text classifiers using a synthetic test set to understand unintended biases and statistical patterns . Using a standard set of demographic identity terms , the authors reduce the unintended bias without hurting the model performance . Shen et al . showed that word substitution strategies include stylistic variations that change the sentiment analysis algorithms for similar word pairs . Evaluations of these models through perturbations of the input sentence are crucial to evaluating the robustness of models . Another issue of language recently has been that static benchmarks like GLUE by Wang et al . ( 2018 ) tend to saturate quickly because of the availability of ever-increasing compute and harder benchmarks are needed like SuperGlue by Wang et al . ( 2019 ) . A more sustainable approach to this is the development of moving benchmarks , and one notable initiative in this area is the Adversarial NLI by Nie et al . ( 2019 ) , but most of the research community hardly validate their approach against this sort of moving benchmark . In the Adversarial NLI dataset , the authors propose an iterative , adversarial human-and-model-in-the-loop solution for Natural Language Understanding dataset collection , where the goal post continuously shifts about useful benchmarks and makes models robust by training the model iteratively on difficult examples . Approaches like never-ending learning byMitchell et al . ( 2018 ) where models improve , and test sets get difficult over time is critical . A moving benchmark is necessary since we know that improving performance on a constant test set may not generalize to newly collected datasets under the same condition Recht et al . ( 2019 ) ; Beery et al . ( 2018 ) . Therefore , it is essential to find difficult examples in a more disciplined way . Approaches based on geometry have recently started gaining traction in computer vision literature . Zhao et al . ( 2019 ) et al used a similar approach for understanding adversarial examples in images . 3 METHODS . A neural network with discrete output can be thought of as a mapping between a manifold of inputs to the discrete output space . Most traditional formulations treat this input space as flat , thus reasoning that the gradient of the likelihood in input space gives us the direction which causes the most significant change in terms of likelihood . However , by imagining the input as a pullback of the output , we obtain a non-linear manifold where the euclidean metric no longer suffices . A more appropriate choice thus is to use the fisher information as a Riemannian metric tensor . We first introduce the Fisher Metric formulation for language . For the purposes of the derivation below the following notations are used . x : Vector of input sentence . This is an n * d sentence where n is the number of words in the sentence and d is the dimensionality of the word embedding . y : Label of class , in our context that is the positive or the negative sentiment . p ( y|x ) : The conditional probability distribution between y and x. KL ( p , q ) : The KL divergence between distributions p and q for two sentences ∇f ( x ) : Gradient of a function of f w.r.t x ∇2f ( x ) : Hessian of f ( x ) w.r.t x We apply the a perturbation η to modifying a sentence to create a new sentence ( eg. , a counterfactual example ) . We can then see the effect of this perturbation η in terms of change in the probability distribution over labels . Ideally , we would like to find points where a small perturbation can result in a large change in the probability distribution over labels . KL ( p ( y|x ) ||p ( y|x+ η ) ) = −Ep ( y|x ) logp ( y|x ) + Ep ( y|x ) logp ( y|x+ η ) We now perform a Taylor expansion of the first term on the right hand side = −Ep ( y|x ) ( logp ( y|x ) + η∇logp ( y|x ) + ηT∇2logp ( y|x ) η + ... ) + Ep ( y|x ) logp ( y|x ) ∼ −Ep ( y|x ) ηT∇2logp ( y|x ) η Since the expectation of score is zero and the first and last terms cancel out , we are left with . = ηTGη Where G is the FIM . By studying the eigenvalues of this matrix locally , we can quantify if small change in η can cause a large change in the distribution over labels . We use the largest eigenvalue of the FIM as a score to quantify the “ difficulty ” of an example . We now propose the following algorithm to compute the FIM : After getting the eigenvalues of the FIM , we can use the largest eigenvalue λmax to quantify how fragile an example is to linguistic perturbation . At points with largest eigenvalues , smaller perturbations can be much more effective in changing the classifier output . These examples , thus , are also more confusing and more difficult for the model to classify . Algorithm 1 Algorithm for estimating difficulty of an example | This paper proposes an analysis technique for studying the 'difficulty' of a pair of test dataset examples in NLP. The setup proposed by past work on Contrast sets and Counterfactual Examples (Gardner et al, 2020 and Kaushik et al 2020 respectively) is to manually construct two dataset examples (x,y) with different labels y, while the inputs x differ only minimally. This paper argues to compute the measure of a contrast / counterfactual example pair by extracting the largest Eigenvalue of a matrix (defined in part using the Fisher Information Matrix). | SP:a2ee061eda974bd5c2c854e1c65e157e8d95c6cb |
Geometry matters: Exploring language examples at the decision boundary | 1 INTRODUCTION . Machine learning classifiers have achieved state-of-the-art success in tasks such as image classification and text classification . Despite their successes , several recent papers have pointed out flaws in the features learned by such classifiers . Geirhos et al . ( 2020 ) cast this phenomenon as shortcut learning , where a classifier ends up relying on shallow features in benchmark datasets that do not generalize well to more difficult datasets or tasks . For instance , Beery et al . ( 2018 ) showed that an image dataset constructed for animal detection and classification failed to generalize to images of animals in new locations . In language , this problem manifests at the word level . Poliak et al . ( 2018 ) showed that models using one of the two input sentences for semantic entailment performed better than the majority class by relying on shallow features . Similar observations were also made by Gururangan et al . ( 2018 ) , where linguistic traits such as `` vagueness '' and `` negation '' were highly correlated with certain classes . In order to study the robustness of a classifier , it is essential to perturb the examples at the classifier ’ s decision boundary . Contrast sets by Gardner et al . ( 2020 ) and counterfactual examples by Kaushik et al . ( 2020 ) are two approaches where the authors aimed at perturbing the datasets to identify difficult examples . In contrast sets , authors of the dataset manually fill in the examples near the decision boundary ( examples highlighted in small circles in Figure 1 ) to better evaluate the classifier performance . In counterfactual examples , the authors use counterfactual reasoning along with Amazon Mechanical Turk to create the `` non-gratuitous changes . '' While these approaches are interesting , it ’ s still unclear if evaluating on these will actually capture a classifier ’ s fragility . Furthermore , these approaches significantly differ from each other and it ’ s important to come up with a common way to reason about them . Motivated by these challenges , we propose a geometrical framework to reason about difficult examples . Using our method , we are able to discover fragile examples for state of the art NLP models like BERTby Devlin et al . ( 2018 ) and CNN ( Convolutional Neural Networks ) by Kim ( 2014 ) . Our experiments using the Fisher information metric ( FIM ) show that both counterfactual examples and contrast sets are , in fact , quite far from the decision boundary geometrically and not that different from normal examples ( circles and triangles in Figure 1 ) . As such , it is more important to perform evaluation on the examples lying in the green region , which represent confusing examples for the classifier , where even a small perturbation ( for instance , substituting the name of an actress ) can cause the neural network to misclassify . It is important to note that this does not depend solely on the classifier ’ s certainty as adversarial examples can fool neural networks into misclassifying with high confidence , as was shown by Szegedy et al . ( 2013 ) . We now motivate our choice of using the Fisher information metric ( FIM ) in order to quantify the difficulty of an example . In most natural language processing tasks , deep learning models are used to model the conditional probability distribution p ( y | x ) of a class label y conditioned on the input x . Here x can represent a sentence , while y can be a sentiment of the sentence . If we imagine a neural network as a probabilistic mapping between inputs to outputs , a natural property to measure is the Kullback-Leibler ( KL ) divergence between the example and an perturbation around that example . For small perturbations to the input , the FIM gives a quadratic form that approximates , up to second order , the change in the output probabilities of a neural network . Zhao et al . ( 2019 ) used this fact to demonstrate that the eigenvector associated with the maximum eigenvalue of the FIM gives an effective direction to perturb an example to generate an adversarial attack in computer vision . Furthermore , from an information geometry viewpoint , the FIM is a Riemannian metric , inducing a manifold geometry on the input space and providing a notion of distance based on changes in the information of inputs . To the best of our knowledge , this is the first work analyzing properties of the fisher metric to understand classifier fragility in NLP . The rest of the paper is organized as follows : In Section 2 , we summarize related work . In Section 3 , we discuss our approach of computing the FIM and the gradient-based perturbation strategy . In Section 4 , we discuss the results of the eigenvalues of FIM in synthetic data and sentiment analysis datasets with BERT and CNN . Finally , in Section 5 , we discuss the implications of studying the eigenvalues of FIM for evaluating NLP models . Table 1 : CNN , IMDb dataset : Unlike the difficult examples ( larger eigenvalue ) , word substitutions are ineffective in changing the classifier output for the easier examples ( smaller eigenvalue ) . In difficult examples synonym or change of name , changes classifier label . In easy examples , despite multiple simultaneous antonym substitutions , the classifier sentiment does not change . Perturbed sentiment Word substitutions Positive → Negative difficult example ( λmax =5.25 ) Going into this movie , I had heard good things about it . Coming out of it , I wasn ’ t really amazed nor disappointed . Simon Pegg plays a rather childish character much like his other movies . There were a couple of laughs here and there– nothing too funny . Probably my favorite → preferred parts of the movie is when he dances in the club scene . I totally got ta try that out next time I find myself in a club . A couple of stars here and there including : Megan Fox , Kirsten Dunst , that chick from X-Files , and Jeff Bridges . I found it quite amusing to see a cameo appearance of Thandie Newton in a scene . She of course being in a previous movie with Simon Pegg , Run Fatboy Run . I see it as a toss up , you ’ ll either enjoy it to an extent or find it a little dull . I might add , Kirsten Dunst → Nicole Kidman , Emma Stone , Megan Fox , Tom Cruise , Johnny Depp , Robert Downey Jr. is adorable in this movie . :3 Negative → Negative easy example ( λmax =0.0008 ) I missed this movie in the cinema but had some idea in the back of my head that it was worth a look , so when I saw it on the shelves in DVD I thought `` time to watch it '' . Big mistake ! < br / > < br / > A long list of stars can not save this turkey , surely one of the worst → best movies ever . An incomprehensible → comprehensible plot is poorly → exceptionally delivered and poorly → brilliantly presented . Perhaps it would have made more sense if I ’ d read Robbins ’ novel but unless the film is completely different to the novel , and with Robbins assisting in the screenplay I doubt it , the novel would have to be an excruciating → exciting read as well. < br / > < br / > I hope the actors were well paid as they looked embarrassed to be in this waste of celluloid and more lately DVD blanks , take for example Pat Morita . Even Thurman has the grace to look uncomfortable at times. < br / > < br / > Save yourself around 98 minutes of your life for something more worthwhile , like trimming your toenails or sorting out your sock drawer . Even when you see it in the `` under $ 5 '' throw-away bin at your local store , resist the urge ! 2 RELATED WORK . In NLP , machine learning models for classification rely on spurious statistical patterns of the text and use shortcut for learning to classify . These can range from annotation artifacts , as was shown by Goyal et al . ( 2017 ) ; Kaushik and Lipton ( 2018 ) ; Gururangan et al . ( 2018 ) , spelling mistakes as in McCoy et al . ( 2019 ) , or new test conditions that require world knowledge Glockner et al . ( 2018 ) . Simple decision rules that the model relies on are hard to quantify . Trivial patterns like relying on the answer “ 2 ” for answering questions of the format “ how many ” for the visual question answering dataset Antol et al . ( 2015 ) , would correctly answer 39 % of the questions . Jia and Liang ( 2017 ) showed that adversarially inserted sentences that did not change the correct answer , would cause state of the art models to regress in performance in the SQuAD Rajpurkar et al . ( 2016 ) question answering dataset . Glockner et al . ( 2018 ) showed that template-based modifications by swapping just one word from the training set to create a test set highlighted models ’ failure to capture many simple inferences . Dixon et al . ( 2018 ) evaluated text classifiers using a synthetic test set to understand unintended biases and statistical patterns . Using a standard set of demographic identity terms , the authors reduce the unintended bias without hurting the model performance . Shen et al . showed that word substitution strategies include stylistic variations that change the sentiment analysis algorithms for similar word pairs . Evaluations of these models through perturbations of the input sentence are crucial to evaluating the robustness of models . Another issue of language recently has been that static benchmarks like GLUE by Wang et al . ( 2018 ) tend to saturate quickly because of the availability of ever-increasing compute and harder benchmarks are needed like SuperGlue by Wang et al . ( 2019 ) . A more sustainable approach to this is the development of moving benchmarks , and one notable initiative in this area is the Adversarial NLI by Nie et al . ( 2019 ) , but most of the research community hardly validate their approach against this sort of moving benchmark . In the Adversarial NLI dataset , the authors propose an iterative , adversarial human-and-model-in-the-loop solution for Natural Language Understanding dataset collection , where the goal post continuously shifts about useful benchmarks and makes models robust by training the model iteratively on difficult examples . Approaches like never-ending learning byMitchell et al . ( 2018 ) where models improve , and test sets get difficult over time is critical . A moving benchmark is necessary since we know that improving performance on a constant test set may not generalize to newly collected datasets under the same condition Recht et al . ( 2019 ) ; Beery et al . ( 2018 ) . Therefore , it is essential to find difficult examples in a more disciplined way . Approaches based on geometry have recently started gaining traction in computer vision literature . Zhao et al . ( 2019 ) et al used a similar approach for understanding adversarial examples in images . 3 METHODS . A neural network with discrete output can be thought of as a mapping between a manifold of inputs to the discrete output space . Most traditional formulations treat this input space as flat , thus reasoning that the gradient of the likelihood in input space gives us the direction which causes the most significant change in terms of likelihood . However , by imagining the input as a pullback of the output , we obtain a non-linear manifold where the euclidean metric no longer suffices . A more appropriate choice thus is to use the fisher information as a Riemannian metric tensor . We first introduce the Fisher Metric formulation for language . For the purposes of the derivation below the following notations are used . x : Vector of input sentence . This is an n * d sentence where n is the number of words in the sentence and d is the dimensionality of the word embedding . y : Label of class , in our context that is the positive or the negative sentiment . p ( y|x ) : The conditional probability distribution between y and x. KL ( p , q ) : The KL divergence between distributions p and q for two sentences ∇f ( x ) : Gradient of a function of f w.r.t x ∇2f ( x ) : Hessian of f ( x ) w.r.t x We apply the a perturbation η to modifying a sentence to create a new sentence ( eg. , a counterfactual example ) . We can then see the effect of this perturbation η in terms of change in the probability distribution over labels . Ideally , we would like to find points where a small perturbation can result in a large change in the probability distribution over labels . KL ( p ( y|x ) ||p ( y|x+ η ) ) = −Ep ( y|x ) logp ( y|x ) + Ep ( y|x ) logp ( y|x+ η ) We now perform a Taylor expansion of the first term on the right hand side = −Ep ( y|x ) ( logp ( y|x ) + η∇logp ( y|x ) + ηT∇2logp ( y|x ) η + ... ) + Ep ( y|x ) logp ( y|x ) ∼ −Ep ( y|x ) ηT∇2logp ( y|x ) η Since the expectation of score is zero and the first and last terms cancel out , we are left with . = ηTGη Where G is the FIM . By studying the eigenvalues of this matrix locally , we can quantify if small change in η can cause a large change in the distribution over labels . We use the largest eigenvalue of the FIM as a score to quantify the “ difficulty ” of an example . We now propose the following algorithm to compute the FIM : After getting the eigenvalues of the FIM , we can use the largest eigenvalue λmax to quantify how fragile an example is to linguistic perturbation . At points with largest eigenvalues , smaller perturbations can be much more effective in changing the classifier output . These examples , thus , are also more confusing and more difficult for the model to classify . Algorithm 1 Algorithm for estimating difficulty of an example | The authors argue that we should evaluate the robustness of NLP models near their decision boundaries, and argue that contrast sets and counterfactual examples cannot fullfill this purpose. The authors propose to find examples near the decision boundary using the largest eigenvalue of the Fisher information matrix, arguing that this value gives us a sense of how stable the model prediction is near the input. To verify that FIM can identify examples where the prediction is unstable, and perturbation leads to larger prediction change, the authors use some heuristic adversarial attacks: first identify tokens to replace using integrated gradients, then replace the tokens with synonyms (to confirm the prediction is sensitive) or antonyms (to confirm that the prediction is insensitive). | SP:a2ee061eda974bd5c2c854e1c65e157e8d95c6cb |
TEAC: Intergrating Trust Region and Max Entropy Actor Critic for Continuous Control | 1 INTRODUCTION . With the use of high-capacity function approximators , such as neural networks , reinforcement learning ( RL ) becomes practical in a wide range of real-world applications , including game playing ( Mnih et al. , 2013 ; Silver et al. , 2016 ) and robotic control ( Levine et al. , 2016 ; Haarnoja et al. , 2018a ) . However , when dealing with the environments with continuous state space or/and continuous action space , most existing deep reinforcement learning ( DRL ) algorithms still suffer from unstable learning processes and are impeded from converging to the optimal policy . The reason for unstable training process can be traced back to the use of greedy or -greedy policy updates in most algorithms . With the greedy update , a small error in value functions may lead to abrupt policy changes during the learning iterations . Unfortunately , the lack of stability in the training process makes the DRL unpractical for many real-world tasks ( Peters et al. , 2010 ; Schulman et al. , 2015 ; Tangkaratt et al. , 2018 ) . Therefore , many policy-based methods have been proposed to improve the stability of policy improvement ( Kakade , 2002 ; Peters & Schaal , 2008 ; Schulman et al. , 2015 ; 2017 ) . Kakade ( 2002 ) proposed a natural policy gradient-based method which inspired the design of trust region policy optimization ( TRPO ) . The trust region , defined by a bound of the Kullback-Leibler ( KL ) divergence between the new and old policy , was formally introduced in Schulman et al . ( 2015 ) to constrain the natural gradient policy changing within the field of trust . An alternative to enforcing a KL divergence constraint is to utilize the clipped surrogate objective , which was used in Proximal Policy Optimization ( PPO ) ( Schulman et al. , 2017 ) to simplify the objective of TRPO while maintaining similar performance . TRPO and PPO have shown significant performance improvement on a set of benchmark tasks . However , these methods are all on-policy methods requiring a large number of on-policy interaction with environment for each gradient step . Besides , these methods focus more on the policy update than exploration , which is not conducive to finding the global optimal policy . The globally optimal behavior is known to be difficult to learn due to sparse rewards and insufficient explorations . In addition to simply maximize the expected reward , maximum entropy RL ( MERL ) ( Ziebart et al. , 2008 ; Toussaint , 2009 ; Haarnoja et al. , 2017 ; Levine , 2018 ) proposes to extend the conventional RL objective with an additional “ entropy bonus ” argument , resulting in the preferences to the policies with higher entropy . The high entropy of the policy explicitly encourages exploration , thus improving the diverse collection of transition pairs , allowing the policy to capture multi-modes of good policies , and preventing from premature convergence to local optima . MERL reforms the reinforcement learning problem into a probabilistic framework to learn energy-based policies to maintain the stochastic property and seek the global optimum . The most representative methods in this category are soft Q-learning ( SQL ) ( Haarnoja et al. , 2017 ) and Soft Actor Critic ( SAC ) ( Haarnoja et al. , 2018b ; c ) . SQL defines a soft Bellman equation and implements it in a practical off-policy algorithm which incorporates the entropy of the policy into the reward to encourage exploration . However , the actor network in SQL is treated as an approximate sampler , and the convergence of the method depends on how well the actor network approximates the true posterior . To address this issue , SAC extends soft Q-learning to actor-critic architecture and proves that a given policy class can converge to the optimal policy in the maximum entropy framework . However , offpolicy DRL is difficult to stabilize in policy improvement procedure ( Sutton & Barto , 1998 ; van Hasselt et al. , 2018 ; Ciosek et al. , 2019 ) which may lead to catastrophic actions , such as ending the episode and preventing further learning . Several models have been proposed to benefit from considering both the trust region constraint and the entropy constraint , such as MOTO ( Akrour et al. , 2016 ) , GAC ( Tangkaratt et al. , 2018 ) , and Trust-PCL ( Nachum et al. , 2018 ) . However , MOTO and GAC can not efficiently deal with highdimensional action space because they rely on second-order computation , and Trust-PCL suffers from algorithm efficiency due to its requirement of trajectory/sub-trajectory samples to satisfy the pathwise soft consistency . Therefore , in this paper , we propose to further explore the research lines of unifying trust region policy-based methods and maximum entropy methods . Specifically , we first transform the RL problem into a primal optimization problem with four additional constraints to 1 ) set an upper bound of KL divergence between the new policy and the old policy to ensure the policy changes are within the region of trust , 2 ) provide a lower bound of the policy entropy to prevent from a premature convergence and encourage sufficient exploration , and 3 ) restrain the optimization problem as a Markov Decision Process ( MDP ) . We then leverage the Lagrangian duality to the optimization problem to redefine the Bellman equation which is used to verify the policy evaluation and guarantee the policy improvement . Thereafter , we propose a practical trust entropy actor critic ( TEAC ) algorithm , which trains the critic by minimizing the refined Bellman error and updates the actor by minimizing KL-divergence loss derived from the closed-form solution to the Lagrangian . The update procedure of the actor involves two dual variables w.r.t . the KL constraint and entropy constraint in the Lagrangian . Based on the Lagrange dual form of the primal optimization problem , we develop gradient-based method to regulate the dual variables regarding the optimization constraints . The key contribution of the paper is a novel off-policy trust-entropy actor-critic ( TEAC ) algorithm for continuous controls in DRL . In comparison with existing methods , the actor of TEAC updates the policy with the information from the old policy and the exponential of the current Q function , and the critic of TEAC updates the Q function with the new Bellman equation . Moreover , we prove that the policy evaluation and policy improvement in trust entropy framework is guaranteed to converge . A detailed comparison with similar work , including MOTO ( Akrour et al. , 2016 ) , GAC ( Tangkaratt et al. , 2018 ) , and Trust-PCL ( Nachum et al. , 2018 ) , is provided in Sec . 4 to explain that TEAC is the most effective and most theoretically complete method . We compare TEAC with 4 state-of-the-art solutions on the tasks in the MuJoCo environment . The results show that TEAC is comparable with the state-of-the-art solutions regarding the stability and sufficient exploration . 2 PRELIMINARIES . A RL problem can be modeled as a standard Markov decision process ( MDP ) , which is represented as a tuple 〈S , A , r , p , p0 , γ〉 . S and A denote the state space and the action space , respectively . p0 ( s ) denotes the initial state distribution . At time t , the agent in state st selects an action at according to the policy π ( a|s ) , in which the performance of the state-action pair is quantified by the reward function r ( st , at ) and the next state of the agent is decided by the transition probability as st+1 ∼ p ( st+1|st , at ) . The goal of the agent is to find the optimal policy π ( a|s ) to maximize the expected reward Es0 , a0 , ... [ ∑∞ t=0 γ tr ( st , at ) ] , where s0 ∼ p0 ( s ) and st+1 ∼ p ( st+1|st , at ) . γ is a discount factor ( 0 < γ < 1 ) ) which quantifies how much importance we give for future rewards . The state-action value function Qπ ( st , at ) and the value function V π ( st ) are then defined as : Qπ ( st , at ) = Est+1 , at+1 , ... [ ∞∑ l=0 γlr ( st+l , at+l ) ] , V π ( st ) = Eat , st+1 , ... [ ∞∑ l=0 γlr ( st+l , at+l ) ] . For the continuous environments , which is the focus of this paper , S andA denote finite dimensional real valued vector spaces , s denotes the real-valued state vector , and a denotes the real-valued action vector . The expected reward can be defined as : J ( π ) = E ( s , a ) ∼ρπ ( s , a ) [ Q π ( s , a ) ] = Eρπ ( s ) π ( a|s ) [ Q π ( s , a ) ] , ( 1 ) where ρπ ( s ) and ρπ ( s , a ) denote the ( discounted ) state and ( discounted ) state-action marginals of the trajectory distribution induced by a policy π ( a|s ) . 1 3 OUR METHOD . This section explains the details and features of the TEAC framework with the focus on the mathematical deductions and proofs of the guaranteed policy improvement and convergence in an actorcritic architecture . 3.1 PRIMAL AND DUAL OPTIMIZATION PROBLEM . To stabilize the training process and steer the exploration , in addition to simply maximizing the expected reward with ( - ) greedy policy updates , we propose to 1 ) confine the KL-divergence between neighboring policies in the training procedure to avoid large-step policy updates , and 2 ) favor a stochastic policy with relatively larger entropy to avoid premature convergence due to insufficient exploration . Therefore , we define the RL problem as a primal optimization problem with additional constraints , given as : maxπ Eρπ ( s ) π ( a|s ) [ Q̂ ( s , a ) ] , subject to Eρπ ( s ) [ KL ( π ( ·|s ) ‖πold ( ·|s ) ) ] ≤ τ , Eρπ ( s ) [ H ( π ( ·|s ) ) ] ≥ η , Eρπ ( s ) ∫ π ( a|s ) da = 1 , Eρπ ( s ) π ( a|s ) p ( s′|s , a ) V̂ ( s′ ) = Eρπ ( s′ ) V̂ ( s′ ) , ( 2 ) where Q̂ ( s , a ) is a critic estimating the state-action value function whose parameter is learned such that Q̂ ( s , a ) ≈ Qπ ( s , a ) , π ( ·|s ) is the policy distribution to be learned , πold ( ·|s ) is the prior policy distribution , and V̂ ( s′ ) is a state feature function estimating the state value function of the next state . The term KL ( π ( ·|s ) ‖πold ( ·|s ) ) = Eπ ( a|s ) [ log π ( a|s ) − log πold ( a|s ) ] confines the KL-divergence between the distributions of the new and old policies . The third constraint ensures that the stateaction marginal of the trajectory distribution is a proper probability density function . As the state marginal of the trajectory distribution needs to comply with the policy π ( a|s ) and the system dynamics p ( s′|s , a ) , i.e. , ρπ ( s ) π ( a|s ) p ( s′|s , a ) = ρπ ( s′ ) , meanwhile the direct matching of the state probabilities is not feasible in continuous state spaces , the use of V̂ ( s′ ) in the fourth constraint which can be also considered as state features , helps to focus on matching the feature averages . These last two constraints formally restrain the optimization problem within a MDP framework . The objective is to maximize the expected reward of a policy while ensuring it satisfies the lower bound of entropy and upper bound of distance from the previous policy . The constraint of KLdivergence term helps to avoid the abrupt difference between the new and old policies , while the constraint of the entropy term helps to promote the policy exploration . The entropy constraint is crucial in our optimization problem for two reasons : 1 ) Prior studies show that the use of KL-bound leads to a rapid decrease of the entropy , thus bounding the entropy helps to lower the risk of premature convergence induced by the KL-bound ; 2 ) Each iteration of policy update will modify the critic Q̂ ( s , a ) and the state distribution ρπ ( s ) , thus changing the optimization 1Following Sutton et al . ( 2000 ) , we use ρπ in the paper to implicate that ρπ is the stationary distribution of states under π and independent of s0 for all policies . landscape of the policy parameters . The entropy constraint ensures the exploration in the action space in case of evolving optimization landscapes . The Lagrangian of this optimization problem is denoted as : L ( π , α , β , λ , ν ) =Eρ ( s ) π ( a|s ) [ Q̂ ( s , a ) ] + α ( τ − Eρ ( s ) [ KL ( π ( ·|s ) ‖πold ( ·|s ) ) ] ) + β ( Eρ ( s ) [ H ( π ( ·|s ) ) ] − η ) + λ ( Eρ ( s ) ∫ π ( a|s ) da− 1 ) + ν ( Eρ ( s ) π ( a|s ) p ( s′|s , a ) V̂ ( s′ ) − Eρ ( s′ ) V̂ ( s′ ) ) , ( 3 ) where α , β , λ , ν are the dual variables , and for the sake of brevity , we use ρ ( s ) to represent ρπ ( s ) . Eq . 3 is a super set of trust region and maximum entropy methods . That is , β = 0 leads to an equivalent objective function as the standard trust region , while α = 0 , which indicates that the KL-divergence bound is not active , leads to a maximum entropy RL objective that SAC tries to solve . Take derivative of L w.r.t . π and set the derivative to zero : ∂πL =Eρ ( s ) [ ∫ ( Q̂ ( s , a ) − ( α+ β ) log π ( a|s ) + α log πold ( a|s ) − νV̂ ( s ) + Ep ( s′|s , a ) [ νV̂ ( s′ ) ] ) da ] − ( α+ β + λ ) =Q̂ ( s , a ) − ( α+ β ) log π ( a|s ) + α log πold ( a|s ) − νV̂ ( s ) + Ep ( s′|s , a ) [ νV̂ ( s′ ) ] − ( α+ β + λ ) =0 . ( 4 ) Continuous problem domains require a practical approximation to the policy update function . We use neural networks as function approximators to parameterize the policy and Q function . Specifically , the Q function , known as critic , is modeled as expressive neural networks Qφ ( s , a ) , and we follow Lillicrap et al . ( 2016 ) to build a target critic network Qφ̄ which mitigates the challenge of overestimation . Meanwhile , the policy , known as actor , is parameterized by πθ ( ·|s ) as a Gaussian with mean and covariance given by neural networks , and we also build up another neural network πθ̂ ( ·|s ) with the same architecture as πθ to enable us to facilitate policy learning by leveraging the “ old ” policy within our framework . | This paper proposes Trust Entropy Actor Critic (TEAC), a novel algorithm for reinforcement learning (RL) combining the idea of TRPO/PPO and max-entropy RL, together with the corresponding critic, actor and dual updates. The high level idea is that trust region methods ensure stability by constraining the KL divergence from the previous policy, while entropy regularization encourages exploration, and hence combining the two may achieve the best of both worlds and obtain a good trade-off between stability and exploration. To achieve this goal, the authors propose to augment the original trust-region subproblem in TRPO with an additional constraint on the lower bound of the policy entropy (together with two other trivial constraints corresponding to the validity of the policy in the MDP framework). Then by forming the Lagrangian function and setting the gradient to zero, the authors obtain both the critic (value) and actor (policy) updates with different choices of dual variables (corresponding to the two trivial constraints), together with the dual updates. Numerical experiments compared to some popular baseline RL algorithms are also reported to demonstrate the improvement of TEAC compared to the existing works. | SP:be593818e1d32a8b3cdb66adcbf6daca5c56cf0c |
TEAC: Intergrating Trust Region and Max Entropy Actor Critic for Continuous Control | 1 INTRODUCTION . With the use of high-capacity function approximators , such as neural networks , reinforcement learning ( RL ) becomes practical in a wide range of real-world applications , including game playing ( Mnih et al. , 2013 ; Silver et al. , 2016 ) and robotic control ( Levine et al. , 2016 ; Haarnoja et al. , 2018a ) . However , when dealing with the environments with continuous state space or/and continuous action space , most existing deep reinforcement learning ( DRL ) algorithms still suffer from unstable learning processes and are impeded from converging to the optimal policy . The reason for unstable training process can be traced back to the use of greedy or -greedy policy updates in most algorithms . With the greedy update , a small error in value functions may lead to abrupt policy changes during the learning iterations . Unfortunately , the lack of stability in the training process makes the DRL unpractical for many real-world tasks ( Peters et al. , 2010 ; Schulman et al. , 2015 ; Tangkaratt et al. , 2018 ) . Therefore , many policy-based methods have been proposed to improve the stability of policy improvement ( Kakade , 2002 ; Peters & Schaal , 2008 ; Schulman et al. , 2015 ; 2017 ) . Kakade ( 2002 ) proposed a natural policy gradient-based method which inspired the design of trust region policy optimization ( TRPO ) . The trust region , defined by a bound of the Kullback-Leibler ( KL ) divergence between the new and old policy , was formally introduced in Schulman et al . ( 2015 ) to constrain the natural gradient policy changing within the field of trust . An alternative to enforcing a KL divergence constraint is to utilize the clipped surrogate objective , which was used in Proximal Policy Optimization ( PPO ) ( Schulman et al. , 2017 ) to simplify the objective of TRPO while maintaining similar performance . TRPO and PPO have shown significant performance improvement on a set of benchmark tasks . However , these methods are all on-policy methods requiring a large number of on-policy interaction with environment for each gradient step . Besides , these methods focus more on the policy update than exploration , which is not conducive to finding the global optimal policy . The globally optimal behavior is known to be difficult to learn due to sparse rewards and insufficient explorations . In addition to simply maximize the expected reward , maximum entropy RL ( MERL ) ( Ziebart et al. , 2008 ; Toussaint , 2009 ; Haarnoja et al. , 2017 ; Levine , 2018 ) proposes to extend the conventional RL objective with an additional “ entropy bonus ” argument , resulting in the preferences to the policies with higher entropy . The high entropy of the policy explicitly encourages exploration , thus improving the diverse collection of transition pairs , allowing the policy to capture multi-modes of good policies , and preventing from premature convergence to local optima . MERL reforms the reinforcement learning problem into a probabilistic framework to learn energy-based policies to maintain the stochastic property and seek the global optimum . The most representative methods in this category are soft Q-learning ( SQL ) ( Haarnoja et al. , 2017 ) and Soft Actor Critic ( SAC ) ( Haarnoja et al. , 2018b ; c ) . SQL defines a soft Bellman equation and implements it in a practical off-policy algorithm which incorporates the entropy of the policy into the reward to encourage exploration . However , the actor network in SQL is treated as an approximate sampler , and the convergence of the method depends on how well the actor network approximates the true posterior . To address this issue , SAC extends soft Q-learning to actor-critic architecture and proves that a given policy class can converge to the optimal policy in the maximum entropy framework . However , offpolicy DRL is difficult to stabilize in policy improvement procedure ( Sutton & Barto , 1998 ; van Hasselt et al. , 2018 ; Ciosek et al. , 2019 ) which may lead to catastrophic actions , such as ending the episode and preventing further learning . Several models have been proposed to benefit from considering both the trust region constraint and the entropy constraint , such as MOTO ( Akrour et al. , 2016 ) , GAC ( Tangkaratt et al. , 2018 ) , and Trust-PCL ( Nachum et al. , 2018 ) . However , MOTO and GAC can not efficiently deal with highdimensional action space because they rely on second-order computation , and Trust-PCL suffers from algorithm efficiency due to its requirement of trajectory/sub-trajectory samples to satisfy the pathwise soft consistency . Therefore , in this paper , we propose to further explore the research lines of unifying trust region policy-based methods and maximum entropy methods . Specifically , we first transform the RL problem into a primal optimization problem with four additional constraints to 1 ) set an upper bound of KL divergence between the new policy and the old policy to ensure the policy changes are within the region of trust , 2 ) provide a lower bound of the policy entropy to prevent from a premature convergence and encourage sufficient exploration , and 3 ) restrain the optimization problem as a Markov Decision Process ( MDP ) . We then leverage the Lagrangian duality to the optimization problem to redefine the Bellman equation which is used to verify the policy evaluation and guarantee the policy improvement . Thereafter , we propose a practical trust entropy actor critic ( TEAC ) algorithm , which trains the critic by minimizing the refined Bellman error and updates the actor by minimizing KL-divergence loss derived from the closed-form solution to the Lagrangian . The update procedure of the actor involves two dual variables w.r.t . the KL constraint and entropy constraint in the Lagrangian . Based on the Lagrange dual form of the primal optimization problem , we develop gradient-based method to regulate the dual variables regarding the optimization constraints . The key contribution of the paper is a novel off-policy trust-entropy actor-critic ( TEAC ) algorithm for continuous controls in DRL . In comparison with existing methods , the actor of TEAC updates the policy with the information from the old policy and the exponential of the current Q function , and the critic of TEAC updates the Q function with the new Bellman equation . Moreover , we prove that the policy evaluation and policy improvement in trust entropy framework is guaranteed to converge . A detailed comparison with similar work , including MOTO ( Akrour et al. , 2016 ) , GAC ( Tangkaratt et al. , 2018 ) , and Trust-PCL ( Nachum et al. , 2018 ) , is provided in Sec . 4 to explain that TEAC is the most effective and most theoretically complete method . We compare TEAC with 4 state-of-the-art solutions on the tasks in the MuJoCo environment . The results show that TEAC is comparable with the state-of-the-art solutions regarding the stability and sufficient exploration . 2 PRELIMINARIES . A RL problem can be modeled as a standard Markov decision process ( MDP ) , which is represented as a tuple 〈S , A , r , p , p0 , γ〉 . S and A denote the state space and the action space , respectively . p0 ( s ) denotes the initial state distribution . At time t , the agent in state st selects an action at according to the policy π ( a|s ) , in which the performance of the state-action pair is quantified by the reward function r ( st , at ) and the next state of the agent is decided by the transition probability as st+1 ∼ p ( st+1|st , at ) . The goal of the agent is to find the optimal policy π ( a|s ) to maximize the expected reward Es0 , a0 , ... [ ∑∞ t=0 γ tr ( st , at ) ] , where s0 ∼ p0 ( s ) and st+1 ∼ p ( st+1|st , at ) . γ is a discount factor ( 0 < γ < 1 ) ) which quantifies how much importance we give for future rewards . The state-action value function Qπ ( st , at ) and the value function V π ( st ) are then defined as : Qπ ( st , at ) = Est+1 , at+1 , ... [ ∞∑ l=0 γlr ( st+l , at+l ) ] , V π ( st ) = Eat , st+1 , ... [ ∞∑ l=0 γlr ( st+l , at+l ) ] . For the continuous environments , which is the focus of this paper , S andA denote finite dimensional real valued vector spaces , s denotes the real-valued state vector , and a denotes the real-valued action vector . The expected reward can be defined as : J ( π ) = E ( s , a ) ∼ρπ ( s , a ) [ Q π ( s , a ) ] = Eρπ ( s ) π ( a|s ) [ Q π ( s , a ) ] , ( 1 ) where ρπ ( s ) and ρπ ( s , a ) denote the ( discounted ) state and ( discounted ) state-action marginals of the trajectory distribution induced by a policy π ( a|s ) . 1 3 OUR METHOD . This section explains the details and features of the TEAC framework with the focus on the mathematical deductions and proofs of the guaranteed policy improvement and convergence in an actorcritic architecture . 3.1 PRIMAL AND DUAL OPTIMIZATION PROBLEM . To stabilize the training process and steer the exploration , in addition to simply maximizing the expected reward with ( - ) greedy policy updates , we propose to 1 ) confine the KL-divergence between neighboring policies in the training procedure to avoid large-step policy updates , and 2 ) favor a stochastic policy with relatively larger entropy to avoid premature convergence due to insufficient exploration . Therefore , we define the RL problem as a primal optimization problem with additional constraints , given as : maxπ Eρπ ( s ) π ( a|s ) [ Q̂ ( s , a ) ] , subject to Eρπ ( s ) [ KL ( π ( ·|s ) ‖πold ( ·|s ) ) ] ≤ τ , Eρπ ( s ) [ H ( π ( ·|s ) ) ] ≥ η , Eρπ ( s ) ∫ π ( a|s ) da = 1 , Eρπ ( s ) π ( a|s ) p ( s′|s , a ) V̂ ( s′ ) = Eρπ ( s′ ) V̂ ( s′ ) , ( 2 ) where Q̂ ( s , a ) is a critic estimating the state-action value function whose parameter is learned such that Q̂ ( s , a ) ≈ Qπ ( s , a ) , π ( ·|s ) is the policy distribution to be learned , πold ( ·|s ) is the prior policy distribution , and V̂ ( s′ ) is a state feature function estimating the state value function of the next state . The term KL ( π ( ·|s ) ‖πold ( ·|s ) ) = Eπ ( a|s ) [ log π ( a|s ) − log πold ( a|s ) ] confines the KL-divergence between the distributions of the new and old policies . The third constraint ensures that the stateaction marginal of the trajectory distribution is a proper probability density function . As the state marginal of the trajectory distribution needs to comply with the policy π ( a|s ) and the system dynamics p ( s′|s , a ) , i.e. , ρπ ( s ) π ( a|s ) p ( s′|s , a ) = ρπ ( s′ ) , meanwhile the direct matching of the state probabilities is not feasible in continuous state spaces , the use of V̂ ( s′ ) in the fourth constraint which can be also considered as state features , helps to focus on matching the feature averages . These last two constraints formally restrain the optimization problem within a MDP framework . The objective is to maximize the expected reward of a policy while ensuring it satisfies the lower bound of entropy and upper bound of distance from the previous policy . The constraint of KLdivergence term helps to avoid the abrupt difference between the new and old policies , while the constraint of the entropy term helps to promote the policy exploration . The entropy constraint is crucial in our optimization problem for two reasons : 1 ) Prior studies show that the use of KL-bound leads to a rapid decrease of the entropy , thus bounding the entropy helps to lower the risk of premature convergence induced by the KL-bound ; 2 ) Each iteration of policy update will modify the critic Q̂ ( s , a ) and the state distribution ρπ ( s ) , thus changing the optimization 1Following Sutton et al . ( 2000 ) , we use ρπ in the paper to implicate that ρπ is the stationary distribution of states under π and independent of s0 for all policies . landscape of the policy parameters . The entropy constraint ensures the exploration in the action space in case of evolving optimization landscapes . The Lagrangian of this optimization problem is denoted as : L ( π , α , β , λ , ν ) =Eρ ( s ) π ( a|s ) [ Q̂ ( s , a ) ] + α ( τ − Eρ ( s ) [ KL ( π ( ·|s ) ‖πold ( ·|s ) ) ] ) + β ( Eρ ( s ) [ H ( π ( ·|s ) ) ] − η ) + λ ( Eρ ( s ) ∫ π ( a|s ) da− 1 ) + ν ( Eρ ( s ) π ( a|s ) p ( s′|s , a ) V̂ ( s′ ) − Eρ ( s′ ) V̂ ( s′ ) ) , ( 3 ) where α , β , λ , ν are the dual variables , and for the sake of brevity , we use ρ ( s ) to represent ρπ ( s ) . Eq . 3 is a super set of trust region and maximum entropy methods . That is , β = 0 leads to an equivalent objective function as the standard trust region , while α = 0 , which indicates that the KL-divergence bound is not active , leads to a maximum entropy RL objective that SAC tries to solve . Take derivative of L w.r.t . π and set the derivative to zero : ∂πL =Eρ ( s ) [ ∫ ( Q̂ ( s , a ) − ( α+ β ) log π ( a|s ) + α log πold ( a|s ) − νV̂ ( s ) + Ep ( s′|s , a ) [ νV̂ ( s′ ) ] ) da ] − ( α+ β + λ ) =Q̂ ( s , a ) − ( α+ β ) log π ( a|s ) + α log πold ( a|s ) − νV̂ ( s ) + Ep ( s′|s , a ) [ νV̂ ( s′ ) ] − ( α+ β + λ ) =0 . ( 4 ) Continuous problem domains require a practical approximation to the policy update function . We use neural networks as function approximators to parameterize the policy and Q function . Specifically , the Q function , known as critic , is modeled as expressive neural networks Qφ ( s , a ) , and we follow Lillicrap et al . ( 2016 ) to build a target critic network Qφ̄ which mitigates the challenge of overestimation . Meanwhile , the policy , known as actor , is parameterized by πθ ( ·|s ) as a Gaussian with mean and covariance given by neural networks , and we also build up another neural network πθ̂ ( ·|s ) with the same architecture as πθ to enable us to facilitate policy learning by leveraging the “ old ” policy within our framework . | The paper addresses the problem of reinforcement learning in continuous spaces by formulating the problem as a constrained optimization problem. In this problem, the objective is maximizing the expected reward, and the constraints ensure that 1) the distance between the new and old policies is bounded, 2) the entropy is above a threshold, and 3) the assumptions of MDP hold. The paper then derives closed-form solutions for the Lagrangian, which are used for obtaining variable update rules. An empirical study examines the ideas against benchmark problems. | SP:be593818e1d32a8b3cdb66adcbf6daca5c56cf0c |
Fair Differential Privacy Can Mitigate the Disparate Impact on Model Accuracy | 1 INTRODUCTION . Protecting data privacy is a significant concern in many data-driven decision-making applications ( Zhu et al. , 2017 ) , such as social networking service , recommender system , location-based service . For example , the United States Census Bureau will firstly employ differential privacy to the 2020 census data ( Bureau , 2020 ) . Differential privacy ( DP ) guarantees that the released model can not be exploited by attackers to derive whether one particular instance is present or absent in the training dataset ( Dwork et al. , 2006 ) . However , DP intentionally restricts the instance influence and introduces noise into the learning procedure . When we enforce DP to a model , DP may amplify the discriminative effect towards the underrepresented and relatively complicated classes ( Bagdasaryan et al. , 2019 ; Du et al. , 2020 ; Jaiswal & Provost , 2020 ) . That is , reduction in accuracy from nonprivate learning to private learning may be uneven for each class . There are several empirical studies on utility reduction : ( Bagdasaryan et al. , 2019 ; Du et al. , 2020 ) show that the model accuracy in private learning tends to decrease more on classes that already have lower accuracy in non-private learning . ( Jaiswal & Provost , 2020 ) shows different observations that the inequality in accuracy is not consistent for classes across multiple setups and datasets . It needs to be cautionary that although private learning improves individual participants ’ security , the model performance should not harm one class more than others . The machine learning model , specifically in supervised learning tasks , outputs a hypothesis f ( x ; θ ) parameterized by θ , which predicts the label y given the unprotected attributes x . Each instance ’ s label y belongs to a class k. The model aims to minimize the objective ( loss ) function L ( θ ; x , y ) , i.e. , θ∗ : = arg min θ E [ L ( θ ; x , y ) ] . ( 1 ) Our work builds on a recent advance in machine learning models ’ training that uses the differentially private mechanism , i.e. , DPSGD ( Abadi et al. , 2016 ) for releasing model . The key idea can be extended to other DP mechanisms with the specialized noise form ( generally Laplacian or Gaussian distribution ) . The iterative update scheme of DPSGD at the ( t+ 1 ) -th iteration is of the form θ̃t+1 = θ̃t − µt · 1 n ( ∑ i∈St gt ( xi ) max ( 1 , ‖g t ( xi ) ‖2 C ) + ξ1 ) , ( 2 ) where n and µt denote the batch size and step-size ( learning rate ) respectively ; St denotes the randomly chosen instance set ; the vector 1 denotes the vector filled with scalar value one ; and gt ( xi ) denotes the gradient of the loss function in ( 1 ) at iteration t , i.e. , ∇L ( yi ; θt , xi ) . The two key operations of DPSGD are : i ) clipping each gradient gt ( xi ) in ` 2-norm based on the threshold parameter C ; ii ) adding noise ξ drawn from Gaussian distribution N ( 0 , σ2C2 ) with a variance of noise scale σ and the clipping threshold parameter C. These operations enable training machine learning models with non-convex objectives at a manageable privacy cost . Based on the result of traditional SGD , we theoretically analyze the sufficient decrease type scheme of DPSGD , i.e. , E [ f ( θt+1 ) ] 6 f ( θt ) + E [ 〈 ∇f ( θt ) , θt+1 − θt 〉 ] + L 2 E [ ∥∥θt+1 − θt∥∥2 ] + τ ( C , σ ; θt ) , ( 3 ) where the last term τ ( C , σ ; θt ) denotes the gap of loss expectation compared with ideal SGD at this ( t+ 1 ) -th iteration , and related with parameters C , and σ . The term τ ( C , σ ; θ ) , which can be called bias-variance term , can be calculated mathematically as 2 ( 1 + 1 µtL ) ‖∇f ( θ ) ‖ · η + η2︸ ︷︷ ︸ Clipping bias + 1 n2 · σ2C2|1|︸ ︷︷ ︸ Noise variance , ( 4 ) where L denotes the Lipschitz constant of f ; |1| denotes the vector dimension ; and we have η : = 1 n ∑ I‖gt ( xi ) ‖ > C ( ‖gt ( xi ) ‖ − C ) , where I‖gt ( xi ) ‖ > C denotes the cardinality number of satisfying ‖gt ( xi ) ‖ > C. The detailed proof of ( 3 ) and ( 4 ) can be found in Appendix A. τ ( C , σ ) is consist of clipping bias and noise variance terms , which means the amount that the private gradient differs from the non-private gradient due to the influence truncation and depending on the scale of the noise respectively . As a result , we call τ ( C , σ ) the bias-variance term . As underrepresented class instances or complicated instances manifest differently from common instances , a uniform threshold parameter C may incur significant accuracy disparate for different classes . In Figure 1 ( a ) , we employ DPSGD ( Abadi et al. , 2016 ) on the unbalanced MNIST dataset ( Bagdasaryan et al. , 2019 ) to numerical study the inequality of utility loss ( i.e. , the prediction accuracy gap between private model and non-private model ) caused by differential privacy . For the unbalanced MNIST dataset , the underrepresented class ( Class 8 ) has significantly larger utility loss than the other classes ( e.g. , Class 2 ) in the private model . DPSGD results in a 6.74 % decrease in accuracy on the well-represented classes , but accuracy on the underrepresented class drops 74.16 % . Training with more epochs does not reduce this gap while exhausting the privacy budget . DPSGD obviously introduces negative discrimination against the underrepresented class ( which already has lower accuracy in the non-private SGD model ) . Further , Figure 1 ( b ) shows the classification accuracy of different sub-classes for τ ( C , σ ; θ ) on the unbalanced MNIST dataset . Larger bias-variance term τ ( C , σ ; θ ) ( determined by C and σ ) results in more serious accuracy bias on different classes , while similar results are also shown in ( Bagdasaryan et al. , 2019 ; Du et al. , 2020 ; Jaiswal & Provost , 2020 ) . Both theoretical analysis and experimental discussion suggest that minimizing the clipping bias and noise variance simultaneously could learn “ better ” DP parameters , which mitigates the accuracy bias between different classes . This motivates us to pursue fairness with a self-adaptive differentially privacy scheme1 . This paper proposes a fair differential privacy algorithm ( FairDP ) to mitigate the disparate impact problem . FairDP introduces a self-adaptive DP mechanism and automatically adjusts instance influence in each class . The main idea is to formulate the problem as bilevel programming by minimizing the bias-variance term as the upper-level objective with a lower-level differential privacy machine learning model . The self-adaptive clipping threshold parameters are calculated by balancing the fairness bias-variance and per-class accuracy terms simultaneously . Our contributions can be summarized as follows : • FairDP uses a self-adaptive clipping threshold to adjust the instance influence in each class , so the model accuracy for each class is calibrated based on their privacy cost through fairness balancing . The class utility reduction is semblable for each class in FairDP . • To our knowledge , we are the first to introduce bilevel programming to private learning , aiming to mitigate the disparate impact on model accuracy . We further design an alternating scheme to learn the self-adaptive clipping and private model simultaneously . • Our experimental evaluation shows that FairDP strikes a balance among privacy , fairness , and accuracy by performing stratified clipping over different subclasses . The following is the road-map of this paper . Section 2 describes the proposed FairDP algorithm . In Section 3 , we provide a brief but complete introduction to related works in privacy-aware learning , fairness-aware learning , and the intersection of differential privacy and fairness . Extensive experiments are further presented in Section 4 , and we finally conclude this paper and discuss some future work in Section 5 . 2 FAIRDP : FAIR DIFFERENTIAL PRIVACY . 2.1 THE BILEVEL FAIRDP FORMULATION . Our approach ’ s intuition is to fairly balance the level of privacy ( based on the clipping threshold ) for each class based on their bias-variance terms , which are introduced by associated DP . The biasvariance terms arise from capping instance influences to reduce the sensitivity of a machine learning algorithm . In detail , a self-adaptive DP mechanism is designed to balance the bias-variance difference among all groups , while the obtained DP mechanism must adapt to the original machine learning problem simultaneously . Recall the definition of the machine learning problem , we assume there are ` classes and according to the bias-variance term ( 4 ) for class k ∈ { 1 , · · · , ` } can be denoted as τk ( Ck , σ ; θ ∗ ) : = 2 ( 1 + 1 µtL ) ‖∇f ( θ∗ ) ‖ · ηk + ηk2 + |Gk|2 n2 · σ2Ck2|1| , ( 5 ) where Ck denotes the clipping parameter for class k ; Gk denotes the data sample set for class k. As motivated by Section 1 , we aim to minimize the associated bias-variance term to obtain a unified clipping parameter for the machine learning problem . However , to mitigate the disparate impact on model accuracy for different classes , we minimize the summation of per-class bias-variance terms . This objective can lead to the self-adaptive clipping threshold among different classes , while the inconsistent DP schemes for different classes should work on the privacy protection on the machine learning model . The self-adaptive clipping threshold parameters should be utilized to learn the original machine learning privately with the DP mechanism . A simple bilevel programming problem2 ( Dempe et al. , 2019 ; Liu et al. , 2019 ) is introduced to model these two goals which influence each 1Note that we do not attempt to optimize the bias-variance bound in a differentially private way , and we are most interested in understanding the forces at play . 2The simple bilevel programming is not to say that the bilevel problem is simple , and it denotes a specific bilevel programming problem . other . The formulation can be denoted as follows , i.e. , min { Ck } , θ ∑̀ k=1 τk ( Ck , σ ; θ ) , ( 6a ) s.t . θ ∈ arg min θ L ( θ ; { Gk } ` k=1 ) , ( 6b ) where the upper-level problem ( 6a ) aims to fairly adjust the clipping threshold parameters for all classes , which is related to the classification model θ ; as for the lower-level problem ( 6b ) , we aim to learn the classification model based on the differential privacy schema with the self-adaptive clipping threshold { Ck } . These two objectives are coupled together , although the model of the lower-level problem is determined only by θ . The effect of clipping is reflected through the DP calculation procedure . Guided by the bias-variance term in ( 6a ) , the parameters of the DP learning can be finely updated simultaneously with the learning process of the classifiers in ( 6b ) . Algorithm 1 : The FairDP Method Input : Instances { ( x1 , y1 ) , · · · , ( xN , yN ) } , objective function L ( θ ; x , y ) , learning rate µt ; 1 Initialize θ0 ; 2 for t← 1 to T do 3 Randomly sample a batch of instances St with probability |S t| N ; Compute gradient 4 for xi ∈ St do 5 Compute gt ( xi ) ← ∇θtL ( yi ; θt , xi ) ; 6 end Minimize bias-variance 7 Ct+1k ← arg minCk τk ( Ck , σ ; θ t ) ; 8 for xi ∈ St and yi = k do Clip gradient 9 ḡt ( xi ) ← g t ( xi ) max ( 1 , ‖gt ( xi ) ‖2 C t+1 k ) ; 10 end Add noise 11 g̃t ← 1n ( ∑ i ḡ t ( xi ) + ξI ) ; Noise Gradient Descent 12 θt+1 ← θt − µtg̃t ; 13 end Output : θT , accumulated privacy cost ( , δ ) . | This paper addresses the problem of an unbalanced data set. In particular, the accuracy on the well-represented classes is higher than the accuracy in underrepresented classes in an unbalanced dataset. This paper shows that DPSGD makes the problem of an unbalanced dataset even worse and decreases accuracy on the underrepresented class significantly. Further, this paper introduces a modification of DPSGD, which can increase the underrepresented class's accuracy. | SP:53e0d7909b00c88201dc1d7a8da7bd1efa4eb48e |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.