paper_name
stringlengths
11
170
text
stringlengths
8.07k
307k
summary
stringlengths
152
6.16k
paper_id
stringlengths
43
43
A self-explanatory method for the black box problem on discrimination part of CNN
1 INTRODUCTION . Convolution neural network ( CNN ) has surpassed human abilities in some specific tasks such as computer game and computer vision etc . However , they are considered difficult to understand and explain ( Brandon , 2017 ) , which leads to many problems in aspects of privacy leaking , reliability and robustness . Explanation technology is of immense help for companies to create safer , more trustable products , and to better manage any possible liability of them ( Riccardo et al. , 2018 ) . Recently , for finding inherent causality implied in the CNN , the unexplainable problem of CNN , especially concerning the discrimination part which is composed of the fully connected layers of the CNN , has been studied by different scientific communities . Many methods were proposed , which can extract various interpretable models from the optimal discrimination part based on inputs and outputs of the part for expressing the inherent causality implied in the part . However , because of data bias and noisy data in the training data set , the inherent causality can not readily be found because the part is difficult to be approximated by any interpretable model . We think that the problem could be solved by the following procedure . Firstly , a lightweight interpretable model is designed which can be easily understood by human . And then , the model is initiatively extracted from the discrimination part by solving a Maximum Satisfiability ( MAX-SAT ) problem based on the activated states of the neurons in the first layer and the output layer of the part . An new distance is proposed which can evaluate the degree to which the discrimination part is easily explained , namely as interpretability performance or interpretable distance . For shrinking the interpretable distance , a game process between the interpretable model and the discrimination part is implemented . Finally , the optimal interpretable model can be obtained , which can express inherent causality implied in the discrimination part . Moreover , based on the procedure , it is also possible to monitor the evolution of the inherent causality implied in the part in the game process . Main contributions of this paper can be summarized as follows : • An interpretable model , Deep Cognitive Learning Model ( DCLM ) , is proposed to express the inherent causality implied in the discrimination part , and a greedy method is given for initiatively extracting the DCLM from the discrimination part by solving its Maximum Satisfiability ( MAX-SAT ) Problem . • A new game method is proposed to improve the interpretability performance of the discrimination part without largely reducing its generalization performance by iteratively shrinking the interpretable distance between DCLM and the discrimination part . • A new distance is proposed to evaluate the degree to which the discrimination part is easily explained , namely as interpretability performance or interpretable distance . 2 RELATED WORK . There are usually two types of methods for the unexplainable problem of the discrimination part , such as post-hoc method and ante-hoc method ( Holzinger et al. , 2019 ) . However , because ante-hoc method is a transparent modeling method ( Arrietaa et al. , 2020 ) , it can not obtain an explanation about the discrimination part . So , the post-hoc method will be reviewed . Early post-hoc method can obtain global explanations for a neural network by extracting an interpretable model . Some references ( Craven & Shavlik , 1999 ; Krishnan et al. , 1999 ; Boz , 2002 ; Johansson & Niklasson , 2009 ) proposed a few methods that can find a decision tree for explaining a neural network by maximizing the gain ratio and an estimation of the current model fidelity . Other references ( Craven & Shavlik , 1994 ; Johansson & Niklasson , 2003 ; Augasta & Kathirvalavakumar , 2012 ; Sebastian et al. , 2015 ; Zilke et al. , 2016 ) proposed rule extraction methods for searching optimal interpretable rules from a neural network . Recently , some feature relevance methods have become progressively more popular . Montavon et al . ( Montavon et al. , 2017 ) proposed a decomposition method from a network classification decision into contributions of its input elements based on deep Taylor decomposition . Shrikumar et al . ( Shrikumar et al. , 2016 ) proposed DeepLIFT which can compute importance scores in a multilayer neural network by explaining the difference of the output from some reference output in terms of differences of the inputs from their reference inputs . Some other works make complex black box model simpler . Che et al . ( Che et al. , 2017 ) proposed a simple distillation method called Interpretable Mimic Learning for extracting an interpretable simple model by gradient boosting trees . Thiagarajan et al . ( Thiagarajan et al. , 2016 ) build a Treeview representation of the complex model by hierarchical partitioning of the feature space . In addition , some references ( Hinton et al. , 2015 ; Bucila et al. , 2006 ; Frosst & Hinton , 2017 ; Traore et al. , 2019 ) proposed the distillation method of knowledge from an ensemble of models into a single model . Wu et al. ( M . Wu , 2018 ) proposed a tree regularization method via knowledge distillation to represent the output feature space of a RNN based on a Multilayered perception . However , these methods can only solve the unexplainable problem of trained neural network or trained deep neural networks with explicit input characteristics . Wan et al . ( Wan et al. , 2020 ) constructed a decision tree using the last fully connection layer of the discrimination part of a CNN based on a prior structure . In the paper , our goal is to find the inherent causality implied in the discrimination part of CNN , which is composed of all fully connected layers of the CNN without hurting its generalization performance by initiatively extracting its logic relationships with no prior structure and finally obtain its explanation by these logic relationships . 3 DEEP COGNITIVE LEARNING MODEL . For expressing the causal relationship between these neurons in the discrimination part , a new interpretable model is designed in the section . As we all known , a CNN includes a feature extractor and a discrimination part . The feature extractor composes of some convolution layers and some pooling layers . The outputs from the feature extractor are the inputs of the discrimination part of the CNN , namely feature maps , τ1 , τ2 , ... , τk where k is the number of feature maps . All these feature maps form a feature set Γ . We suppose that the discrimination part should better be explained by the logic relationships of the activated states of the neurons in its first layer and its output layer . This is because the relationships are the inherent property of the part . In order to express the relationships , a deep cognitive learning model ( DCLM ) is proposed , shown in Fig.1 ( b ) . The DCLM consists of three layers : feature predicate layer , disjunction layer , and decision layer . The top layer is feature predicate layer which consists of many nodes . Every node has a predicate Zj ( Γ ) that expresses a positive action or negative action of features which the jth neuron in the first fully connected layer of the discrimination part captures . The predicate Zj ( Γ ) is defined as follows : Z1 ( Γ ) = 1 , ∑k i=1 τi ∗ wi,1 > −b and τi ∈ Γ , ( 1 ) null , ∑k i=1 τi ∗ wi,1 = −b and τi ∈ Γ , ( 1′ ) 0 , otherwise . ( 1′′ ) where j ∈ 1 , 2 , ... , N , N is the number of the input neurons of the first fully connection layer of the discrimination part of the CNN . wi , j is a weight vector between the ith feature map and the jth neuron , bj is the bias of the jth neuron , and ” ∗ ” is a convolution operation . ” 1 ” and ” 0 ” denote a positively activated state and a negatively activated state of the neuron respectively . ” null ” denotes an inactivated state . The bottom layer is a decision layer which includes all nodes used for decision . Every node has a predicate which expresses an activated state of an output neuron of the discrimination part . It is defined as follows : D ( y1 ) = { 1 , y1 > 0 , ( 2 ) 0 , otherwise . ( 2′ ) where i ∈ 1 , 2 , ... , C , C is number of the output neurons of the CNN , yi is the output value of the ith output neuron of the discrimination part . All nodes on the feature predicate layer and every node on the decision layer are connected to one or more nodes on the middle layer , namely as disjunction layer , with true or false edges . Every node represents a disjunction relation , which is expressed by a disjunctive normal form . It is worth mentioning : if a node is connected to a node on the disjunction layer by a false edge , its predicate follows after a non-operator in the disjunctive normal form . The potential function of a disjunctive normal form can be obtained by using the Lukasiewicz method ( Giles , 1975 ) . φc ( yi ) = min ( 1 , T ( Γ , yi ) ) ( 3 ) where T ( Γ , yi ) = ∑N j=1 { aj [ 1− Zj ( Γ ) ] + ( 1− aj ) Zj ( Γ ) } + ( aN + 1 ) D ( yi ) and N is the number of the nodes on the feature predicate layer . If aj = 1 , there is a false edge . Otherwise , there is a true edge . The conditional probability distribution that a ground DCLM including all disjunctive normal forms is true is p ( y , Γ ) = 1 Ξ exp ( ∑G i=1 λiφci ( yi ) ∑G i=1 λi ) ( 4 ) where G is the number of all ground formulas , Ξ = ∑ Γ∈F exp ( ∑G i=1 λiφci ( yi ) ∑G i=1 λi ) is a partition function , y = ( y1 , y2 , ... , yG ) , yi is an output value of the CNN and λi is a weighted value of the ith ground formula . By maximizing its likelihood function , the optimal ai and λi in the DCLM can be obtained . C ( Γ ) = arg max ai , λi [ log p ( y , Γ ) ] = arg max ai , λi ( ∑ i λiφci ( yi ) ∑ i λi − log ( Ξ ) ) ( 5 ) For extracting a optimal DCLM , a Maximum A Posterior ( MAP ) algorithm on the Maximum Satisfiability Problem ( MAX-SAT ) was designed . Using the disjunction normal form with the greatest weighted value in the optimal DCLM , a prediction of an input image can be obtained . 4 EVALUATION OF INTERPRETABILITY PERFORMANCE . We consider that if the discrimination part of a CNN has a similar shape of function curve with its optimal interpretable model , the former can be easily explained by the latter . Therefore , the interpretable performance of the discrimination part can be measured by the shape similarity between it and its optimal interpretable model . We posit that given the same input data set , the similarity may be measured by variance of differences between outputs of the both models . It can be named interpretation distance . It is easily proved that the smaller the interpretation distance is , the more similar their shapes are , and the better the interpretability performance of the discrimination part would be . Definition 1 If X is a compact metric space and ν is a Borel measure in X , such as Lebesgue measure or marginal measures , inL2ν ( X ) , a square integrable function space on X , the interpretation distance , φd ( P ∗ , f ) , between a discrimination part f ( x ) and its optimal DCLM P ∗ ( x ) is φd ( P ∗ , f ) = ∫ Z ( f ( x ) − P ∗ ( x ) − µP∗ ( f ) ) 2dν ( 6 ) where µP ∗ ( f ) = ∫ Z ( f ( x ) − P ∗ ( x ) ) dν ( 7 )
This paper proposes an interesting framework for training interpretable CNNs, similar to distillation methods. The authors propose a probabilistic model to approximate CNN predictions (specifically the discriminatory part i.e. fully connected network, and a procedure for training CNN+ DCLM as a game. Results show interesting performance over benchmark datasets in comparison to existing distillation baselines.
SP:59c5d78884feb7f21eb812b69d71827770f6fe39
ANOCE: Analysis of Causal Effects with Multiple Mediators via Constrained Structural Learning
1 INTRODUCTION . In the era of causal revolution , identifying the causal effect of an exposure on the outcome of interest is an important problem in many areas , such as epidemics ( Hernán , 2004 ) , medicine ( Hernán et al. , 2000 ) , education ( Card , 1999 ) , and economics ( Panizza & Presbitero , 2014 ) . Under a general causal graph , the exposure may have a direct effect on the outcome and also an indirect effect regulated by a set of mediators ( or intermediate variables ) . For instance , during the outbreak of Coronavirus disease 2019 ( COVID-19 ) , the Chinese government has taken extreme measures to stop the virus spreading such as locking Wuhan down on Jan 23rd , 2020 , followed by 12 other cities in Hubei , known as the “ 2020 Hubei lockdowns ” . This approach ( viewed as the exposure ) , directly blocked infected people leaving from Hubei ; and also stimulated various quarantine measures taken by cities outside of Hubei ( as the mediators ) , which further decreased the migration countrywide in China , and thus indirectly control the spread of COVID-19 . Quantifying the causal effects of 2020 Hubei lockdowns on reducing the COVID-19 spread regulated by different cities outside Hubei is challenging but of great interest for the current COVID-19 crisis . An analysis of causal effects that interprets the causal mechanism contributed via individual mediators is thus very important . Many recent efforts have been made on studying causal effects that are regulated by mediators . Chakrabortty et al . ( 2018 ) specified the individual mediation effect in a sparse high-dimensional causal graphical model . However , the sum of marginal individual mediation effect is not equal to the effect of all mediators considered jointly ( i.e . the indirect effect ) due to the common interaction among mediators ( VanderWeele & Vansteelandt , 2014 ) . Here , ‘ interaction ’ means that there exists at least one mediator that is regulated by other mediator ( s ) ( see Figure 1b for illustration ) , in contrast to the simple ‘ parallel ’ case ( shown in Figure 1a ) . Vansteelandt & Daniel ( 2017 ) considered an exact decomposition of the indirect effect with a two-mediator setting based on the conditional densities of mediators , while there was no feasible algorithm provided to solve their proposed expressions yet . Therefore , a new framework with a computational friendly algorithm that gives an exact decomposition of the indirect effect on the level of individual mediators is desired under the complex causal network . To estimate the underlying causal network , structure learning algorithms of the directed acyclic graph ( DAG ) are widely used . Popular methods such as the PC algorithm ( Spirtes et al. , 2000 ) that uses conditional independence tests to examine the existence of edges between each pair of variables , require strong assumptions and thus have no guarantee in the finite sample regime . Recently , Zheng et al . ( 2018 ) opened up another class of causal discovery methods by directly formulating a pure optimization problem over real metrics with a novel characteristic of the acyclicity . Yu et al . ( 2019 ) further extended Zheng et al . ( 2018 ) ’ s work with a deep generative model , and showed better performance on the structure learning with weaker assumptions on the noise . See more follow-up works in Lachapelle et al . ( 2019 ) and Zhu & Chen ( 2019 ) . However , the current cutting-edge methods neglect the temporal causal relationship among variables , and thus can not appropriately represent the causal network with pre-specified exposure and outcome . In this paper , we consider establishing a new statistical framework to comprehensively characterize causal effects with multiple mediators , namely , ANalysis Of Causal Effects ( ANOCE ) , under the linear structure equation model ( LSEM ) . Specifically , we propose two causal effects on the level of individual mediators , the natural direct effect and the natural indirect effect for a mediator , denoted as DM and IM , respectively . Our proposed DM can be interpreted as the direct effect of a particular mediator on the outcome that is not regulated by other mediators , while the IM is the indirect effect of the mediator controlled by its descendant mediators . We prove that the DM is valid in the sense that it exactly decomposes the indirect effect of the exposure on the outcome , followed by an ANOCE table to explain different sources of causal effects . To bridge the cutting-edge graphical learning approaches with the temporal causal relationship of variables , we extend the variational auto-encoder ( VAE ) framework in Yu et al . ( 2019 ) with a novel identification constraint that specifies the topological order of the exposure and the outcome . The proposed constrained VAE algorithm is then used to estimate causal effects defined in our ANOCE table , named as ‘ ANOCE-CVAE ’ . Our contributions can be summarized in the following three aspects : • 1 ) . Conceptually , we define different sources of causal effects through mediators with a newly introduced definition of direct and indirect mediator effects , and give an exact decomposition of the indirect effect on the level of individual mediators , under the linear structure equation model . • 2 ) . Methodologically , we incorporate the background knowledge ( the temporal causal relationship among variables ) when using an optimization approach to the causal discovery . Such prior knowledge can be generalized for any measured variable and on the possible set of their parents . Our proposed constrained structural learning can be easily extended to other score-based algorithms . • 3 ) . Practically , extensive simulations are conducted to demonstrate the empirical validity of the proposed algorithm and its competitive performance among existing causal discovery algorithms . Our method is applied to investigate the causal effects of 2020 Hubei lockdowns on reducing the COVID-19 spread in China , by quantifying the individual effect for each city . 2 BACKGROUND AND RELATED WORK . 2.1 GRAPH TERMINOLOGY . Consider a graph G = ( X , E ) with a node set X and an edge set E. There is at most one edge between any pair of nodes . If there is an edge between Xi and Xj , then Xi and Xj are adjacent . A node Xi is said to be a parent of Xj if there is a directed edge from Xi to Xj . Let the set of all parents of node Xj in G as PAXj ( G ) . A path from Xi to Xj in G is a sequence of distinct vertices , π ≡ { a0 , a1 , · · · , aL } ⊂ V such that a0 = Xi , and aL = Xj . A directed path from Xi to Xj is a path between Xi and Xj where all edges are directed toward Xj . A directed cycle is formed by the directed path from Xi to Xj together with the directed edge Xj to Xi . A directed graph that does not contain directed cycles is called a directed acyclic graph ( DAG ) . A directed graph is acyclic if and only if it has a topological ordering . Suppose a DAG G = ( X , E ) that characterizes the causal relationship among |X| = d nodes , where X = [ X1 , X2 , · · · , Xd ] > represents a random vector and an edge Xi → Xj means that Xi is a direct cause of Xj . Let B = { bi , j } 1≤i≤d,1≤j≤d be a d × d matrix , where bi , j is the weight of the edge Xi → Xj ∈ E , and bi , j = 0 otherwise . Then , we say that G = ( X , B ) is a weighted DAG with the node set X and the weighted adjacency matrix B ( the edge set E is nested in B ) . 2.2 RELATED WORK . Our work connects to the literature of the causal graphical model . Pearl et al . ( 2009 ) provided a comprehensive review of recent advances in the analysis of causes and counterfactuals using ‘ dooperator ’ by graphical methods . Later , Maathuis et al . ( 2009 ) started to use an unknown DAG without hidden variables to estimate the causal effects from the high-dimensional observational data . Nandy et al . ( 2017 ) extended the work of Maathuis et al . ( 2009 ) with the linear structure equation model , followed by the individual mediation effect defined in Chakrabortty et al . ( 2018 ) . All of these models rely on the PC algorithm to search the Markov equivalence class of the partial DAG , and usually require strong assumptions due to the computational limit . Our ANOCE is established under the same causal structure of Chakrabortty et al . ( 2018 ) but without sparsity and normality assumptions . Wide literature on causal discovery can be summarized in three classes . The first type focuses on local conditional independence tests to find a causal skeleton and then determine the orientation of edges , such as the well-known PC algorithm ( Spirtes et al. , 2000 ; Kalisch & Bühlmann , 2007 ) . However , testing the conditional independence of continuous variables is not easy ( Shah & Peters , 2018 ) . The second class specifies properly functional causal models with additional assumptions on data distribution , including the ICA-LiNGAM ( Shimizu et al. , 2006 ) and the causal additive model ( CAM ) ( Bühlmann et al. , 2014 ) . The last class , the score-based method , includes the greedy equivalence search ( GES ) ( Chickering , 2002 ) and the fast GES ( fGES ) ( Ramsey et al. , 2017 ) that use for example Bayesian scores in searching a space of causal models . Recently , Zheng et al . ( 2018 ) opened up another track of score-based methods by constructing an optimization with an acyclicity constraint under the LSEM , i.e . the NOTEARS . A follow-up work using a VAE parameterized by a graph neural network that generalizes LSEM was proposed in Yu et al . ( 2019 ) with a more computational friendly constraint , namely DAG-GNN . Also see Zhu & Chen ( 2019 ) and Lachapelle et al . ( 2019 ) for other cutting-edge structural learning methods . The improvement of our ANOCE-CVAE over the state-of-the-arts is as follows . We consider a new constrained structural learning , by incorporating the background knowledge ( the temporal causal relationship among variables ) into the score-based algorithms . We formulated such prior information as the identification constraint and add it as the penalty term in the objective function for the causal discovery . In this paper , we typically extend the DAG-GNN for an illustration . Note that the proposed constraint is not limited to the DAG-GNN and can be easily extended to other score-based algorithms . 3 ANALYSIS OF CAUSAL EFFECTS . 3.1 STATISTICAL FRAMEWORK AND ASSUMPTIONS . Let A be the exposure/treatment , M = [ M1 , M2 , · · · , Mp ] > be mediators with dimension p , and Y be the outcome of interest . Suppose there exists a weighted DAG G = ( X , B ) that characterizes the causal relationship among X = [ A , M > , Y ] > , where the dimension of X is d = p + 2 . Let Y ∗ ( A = a , M = m ) be the potential outcome that would be observed after receiving treatment a and setting mediators as m , and M∗ ( A = a ) be the potential mediators that would be observed after receiving treatment a . As standard in the causal inference ( Rosenbaum & Rubin , 1983 ) , we assume that there is no unmeasured confounder : ( A1 ) the effect of the treatment A on the outcome Y is unconfounded , i.e . Y ∗ ( A = a , M = m ) ⊥ A , ∀a , m ; ( A2 ) the effect of the treatment A on the mediators M is unconfounded , i.e . M∗ ( A = a ) ⊥ A , ∀a ; ( A3 ) the effect of the mediators M on the outcome Y is unconfounded given the treatment A , i.e . Y ∗ ( A = a , M = m ) ⊥ M |A , ∀a , m . In addition , as standard in the graphical causal discovery , we also make the Markov condition , the faithfulness condition , causal sufficiency assumption , and the linear structural equation model ( LSEM ) such that X = [ A , M > , Y ] > characterized by the pair ( G , ) is generated by X = B > X + , ( 1 ) where is a random vector of jointly independent error variables . Denote all directed paths in G that start with the exposure A and end with the outcome Y as set { πAY ( G ) } . If there exists at least one directed path π∗ ∈ { πAY ( G ) } such that the length of π∗ is larger than 2 , we say there is an interaction among mediators , as shown in Figure 1b ; otherwise , we call mediators are ‘ parallel ’ as shown in Figure 1a . In this paper , we consider all possible causal structures with multiple mediators under assumptions ( A1-A3 ) . We next give the total effect ( TE ) , the natural direct effect that is not mediated by mediators ( DE ) , and the natural indirect effect that is regulated by mediators ( IE ) defined in Pearl et al . ( 2009 ) . Definition 3.1 ( Pearl et al. , 2009 ) TE = ∂E { Y |do ( A = a ) } /∂a = E { Y |do ( A = a+ 1 ) } − E { Y |do ( A = a ) } , DE = E { Y |do ( A = a+ 1 , M = m ( a ) ) } − E { Y |do ( A = a ) } , IE = E { Y |do ( A = a , M = m ( a+1 ) ) } − E { Y |do ( A = a ) } , where do ( A = a ) is a mathematical operator to simulate physical interventions that hold A constant as a while keeping the rest of the model unchanged , which corresponds to remove edges into A and replace A by the constant a in G. Here , m ( a ) is the value of M if setting do ( A = a ) , and m ( a+1 ) is the value of M if setting do ( A = a+ 1 ) . Refer to Pearl et al . ( 2009 ) for more details of ‘ do-operator ’ . Note that in the assumed linear model , the slope of the line is the same everywhere ; for convenience and simplicity , we use a and a+ 1 to present the change of the treatment of 1 in the definition .
The paper proposes a framework for the analysis of causal inference. Its main contribution is to decompose the indirect effect by teasing out the causal contribution of a set of mediators. In a series of experiments with simulated data the authors show that the proposed method, ANOCE, outperforms other comparison partners. The manuscript also contains an analysis of real-world data that describes the causal effects of the lockdown of cities in the Hubei province (China) to reduce the spread of COVID-19. An extensive supplementary file is also part of the submission and it includes additional experiments and technical proofs.
SP:a8c2db9bf91b517ea4317c85cab34a53206f7090
Why Are Convolutional Nets More Sample-Efficient than Fully-Connected Nets?
1 INTRODUCTION . Deep convolutional nets ( “ ConvNets ” ) are at the center of the deep learning revolution ( Krizhevsky et al. , 2012 ; He et al. , 2016 ; Huang et al. , 2017 ) . For many tasks , especially in vision , convolutional architectures perform significantly better their fully-connected ( “ FC ” ) counterparts , at least given the same amount of training data . Practitioners explain this phenomenon at an intuitive level by pointing out that convolutional architectures have better “ inductive bias ” , which intuitively means the following : ( i ) ConvNet is a better match to the underlying structure of image data , and thus are able to achieve low training loss with far fewer parameters ( ii ) models with fewer total number of parameters generalize better . Surprisingly , the above intuition about the better inductive bias of ConvNets over FC nets has never been made mathematically rigorous . The natural way to make it rigorous would be to show explicit learning tasks that require far more training samples on FC nets than for ConvNets . ( Here “ task ” means , as usual in learning theory , a distribution on data points , and binary labels for them generated given using a fixed labeling function . ) Surprisingly , the standard repertoire of lower bound techniques in ML theory does not seem capable of demonstrating such a separation . The reason is that any ConvNet can be simulated by an FC net of sufficient width , since a training algorithm can just zero out unneeded connections and do weight sharing as needed . Thus the key issue is not an expressiveness per se , but the combination of architecture plus the training algorithm . But if the training algorithm must be accounted for , the usual hurdle arises that we lack good mathematical understanding of the dynamics of deep net training ( whether FC or ConvNet ) . How then can one establish the limitations of “ FC nets + current training algorithms ” ? ( Indeed , many lower bound techniques in PAC learning theory are information theoretic and ignore the training algorithm . ) The current paper makes significant progress on the above problem by exhibiting simple tasks that require Ω ( d2 ) factor more training samples for FC nets than for ConvNets , where d is the data dimension . ( In fact this is shown even for 1-dimensional ConvNets ; the lowerbound easily extends to 2-D ConvNets . ) The lower bound holds for FC nets trained with any of the popular algorithms listed in Table 1 . ( The reader can concretely think of vanilla SGD with Gaussian initialization of network weights , though the proof allows use of momentum , ` 2 regularization , and various learning rate schedules . ) Our proof relies on the fact that these popular algorithms lead to an orthogonalequivariance property on the trained FC nets , which says that at the end of training the FC net —no matter how deep or how wide — will make the same predictions even if we apply orthogonal transformation on all datapoints ( i.e. , both training and test ) . This notion is inspired by Ng ( 2004 ) ( where it is named “ orthogonal invariant ” ) , which showed the power of logistic regression with ` 1 regularization versus other learners . For a variety of learners ( including kernels and FC nets ) that paper described explicit tasks where the learner has Ω ( d ) higher sample complexity than logistic regression with ` 1 regularization . The lower bound example and technique can also be extended to show a ( weak ) separation between FC nets and ConvNets . ( See Section 4.2 ) Our separation is quantitatively stronger than the result one gets using Ng ( 2004 ) because the sample complexity gap is Ω ( d2 ) vs O ( 1 ) , and not Ω ( d ) vs O ( 1 ) . But in a more subtle way our result is conceptually far stronger : the technique of Ng ( 2004 ) seems incapable of exhibiting a sample gap of more than O ( 1 ) between Convnets and FC nets in our framework . The reason is that the technique of Ng ( 2004 ) can exhibit a hard task for FC nets only after fixing the training algorithm . But there are infinitely many training algorithms once we account for hyperparameters associated in various epochs with LR schedules , ` 2 regularizer and momentum . Thus Ng ( 2004 ) ’ s technique can not exclude the possibility that the hard task for “ FC net + Algorithm 1 ” is easy for “ FC net + Algorithm 2 ” . Note that we do not claim any issues with the results claimed in Ng ( 2004 ) ; merely that the technique can not lead to a proper separation between ConvNets and FC nets , when the FC nets are allowed to be trained with any of the infinitely many training algorithms . ( Section 4.2 spells out in more detail the technical difference between our technique and Ng ’ s idea . ) The reader may now be wondering what is the single task that is easy for ConvNets but hard for FC nets trained with any standard algorithm ? A simple example is the following : data distribution in Rd is standard Gaussian , and target labeling function is the sign of ∑d/2 i=1 x 2 i − ∑d i=d/2+1 x 2 i . Figure 1 shows that this task is indeed much more difficult for FC nets . Furthermore , the task is also hard in practice for data distributions other than Gaussian ; the figure shows that a sizeable performance gap exists even on CIFAR images with such a target label . Extension to broader class of algorithms . The orthogonal-equivariance property holds for many types of practical training algorithms , but not all . Notable exceptions are adaptive gradient methods ( e.g . Adam and AdaGrad ) , ` 1 regularizer , and initialization methods that are not spherically symmetric . To prove a lower bound against FC nets with these algorithms , we identify a property , permutationinvariance , which is satisfied by nets trained using such algorithms . We then demonstrate a single and natural task on Rd × { ±1 } that resembles real-life image texture classification , on which we prove any permutation-invariant learning algorithm requires Ω ( d ) training examples to generalize , while Empirical Risk Minimization with O ( 1 ) examples can learn a convolutional net . Paper structure . In Section 2 we discuss about related works . In section 3 , we define the notation and terminologies . In Section 4 , we give two warmup examples and an overview for the proof technique for the main theorem . In Section 5 , we present our main results on the lower bound of orthogonal and permutation equivariant algorithms . 2 RELATED WORKS . Du et al . ( 2018 ) attempted to investigate the reason why convolutional nets are more sample efficient . Specifically they prove O ( 1 ) samples suffice for learning a convolutional filter and also proved a Ω ( d ) min-max lower bound for learning the class of linear classifiers . Their lower bound is against learning a class of distributions , and their work fails to serve as a sample complexity separation , because their upper and lower bounds are proved on different classes of tasks . Arjevani & Shamir ( 2016 ) also considered the notion of distribution-specific hardness of learning neural nets . They focused on proving running time complexity lower bounds against so-called `` orthogonally invariant '' and `` linearly invariant '' algorithms . However , here we focus on sample complexity . Recently , there has been progress in showing lower bounds against learning with kernels . Wei et al . ( 2019 ) constructed a single task on which they proved a sample complexity separation between learning with neural networks vs. with neural tangent kernels . Notably the lower bound is specific to neural tangent kernels ( Jacot et al. , 2018 ) . Relatedly , Allen-Zhu & Li ( 2019 ) showed a sample complexity lower bound against all kernels for a family of tasks , i.e. , learning k-XOR on the hypercube . 3 NOTATION AND PRELIMINARIES . We will use X = Rd , Y = { −1 , 1 } to denote the domain of the data and label and H = { h | h : X → Y } to denote the hypothesis class . Formally , given a joint distribution P , the error of a hypothesis h ∈ H is defined as errP ( h ) : = Px , y∼P [ h ( x ) 6= y ] . If h is a random hypothesis , we define errP ( h ) : = Px , y∼P , h [ h ( x ) 6= y ] for convenience . A class of joint distributions supported on X × Y is referred as a problem , P . We use ‖·‖2 to denote the spectrum norm and ‖·‖F to denote the Frobenius norm of a matrix . We use A ≤ B to denote that B − A is a semi-definite positive matrix . We also use O ( d ) and GL ( d ) to denote the d-dimensional orthogonal group and general linear group respectively . We use Bd 2 p to denote the unit Schatten-p norm ball in Rd×d . We useN ( µ , Σ ) to denote Gaussian distribution with mean µ and covariance Σ . For random variables X and Y , we denote X is equal to Y in distribution by X d= Y . In this work , we also always use PX to denote the distributions on X and P to denote the distributions supported jointly on X × Y . Given an input distribution PX and a hypothesis h , we define PX h as the joint distribution on X × Y , such that ( PX h ) ( S ) = P ( { x| ( x , h ( x ) ) ∈ S } ) , ∀S ⊂ X × Y . In other words , to sample ( X , Y ) ∼ PX h means to first sample X ∼ PX , and then set Y = h ( X ) . For a family of input distributions PX and a hypothesis class H , we define PX H = { PX h | PX ∈ PX , h ∈ H } . In this work all joint distribution P can be written as PX h for some h , i.e . PY|X is deterministic . For set S ⊂ X and 1-1 map g : X → X , we define g ( S ) = { g ( x ) |x ∈ S } . We use ◦ to denote function composition . ( f ◦ g ) ( x ) is defined as f ( g ( x ) ) , and for function classes F , G , F ◦ G = { f ◦ g | f ∈ F , g ∈ G } . For any distribution PX supported on X , we define PX ◦ g as the distribution such that ( PX ◦ g ) ( S ) = PX ( g ( S ) ) . In other words , if X ∼ PX ⇐⇒ g−1 ( X ) ∼ PX ◦ g , because ∀S ⊆ X , P X∼PX [ g−1 ( X ) ∈ S ] = P X∼PX [ X ∈ g ( S ) ] = [ PX ◦ g ] ( S ) . Algorithm 1 Iterative algorithm A Require : Initial parameter distribution Pinit supported in W = Rm , total iterations T , training dataset { xi , yi } ni=1 , parametric modelM : W → H , iterative update rule F ( W , M , { xi , yi } n i=1 ) Ensure : Hypothesis h : X → Y . Sample W ( 0 ) ∼ Pinit . for t = 0 to T − 1 do W ( t+1 ) = F ( W ( t ) , M , { xi , yi } ni=1 ) . return h = sign [ M [ W ( T ) ] ] . For any joint distribution P of form P = PX h , we define P ◦ g = ( PX ◦ g ) ( h ◦ g ) . In other words , ( X , Y ) ∼ P ⇐⇒ ( g−1 ( X ) , Y ) ∼ P ◦ g. For any distribution class P and group G acting on X , we define P ◦ G as { P ◦ g | P ∈ P , g ∈ G } . Definition 3.1 . A deterministic supervised Learning Algorithm A is a mapping from a sequence of training data , { ( xi , yi ) } ni=1 ∈ ( X × Y ) n , to a hypothesis A ( { ( xi , yi ) } ni=1 ) ∈ H ⊆ YX . The algorithmA could also be randomized , in which case the outputA ( { ( xi , yi ) } ni=1 ) is a distribution on hypotheses . Two randomized algorithms A and A′ are the same if for any input , their outputs have the same distribution in function space , which is denoted by A ( { xi , yi } ni=1 ) d = A′ ( { xi , yi } ni=1 ) . Definition 3.2 ( Equivariant Algorithms ) . A learning algorithm is equivariant under group GX ( or GX -equivariant ) if and only if for any dataset { xi , yi } ni=1 ∈ ( X × Y ) n and ∀g ∈ GX , x ∈ X , A ( { g ( xi ) , yi } ni=1 ) ◦ g = A ( { xi , yi } n i=1 ) , or A ( { g ( xi ) , yi } n i=1 ) ( g ( x ) ) = [ A ( { xi , yi } n i=1 ) ] ( x ) . 1 Definition 3.3 ( Sample Complexity ) . Given a problem P and a randomized learning algorithm A , δ , ε ∈ [ 0 , 1 ] , we define the ( ε , δ ) -sample complexity , denoted N ( A , P , ε , δ ) , as the smallest number n ∈ N such that ∀P ∈ P , w.p . 1− δ over the randomness of { xi , yi } ni=1 , errP ( A ( { xi , yi } n i=1 ) ) ≤ ε . We also define the ε-expected sample complexity for a problem P , denoted N ∗ ( A , P , ε ) , as the smallest number n ∈ N such that ∀P ∈ P , E ( xi , yi ) ∼P [ errP ( A ( { xi , yi } ni=1 ) ) ] ≤ ε . By definition , we have N ∗ ( A , P , ε+ δ ) ≤ N ( A , P , ε , δ ) ≤ N ∗ ( A , P , εδ ) , ∀ε , δ ∈ [ 0 , 1 ] .
The paper presents an interesting analysis of MLP and convnets, where they show a gap between the number of required training examples to generalize well. They show that due to orthogonality invariance in MLP training, then more examples are required compare to convnet, where one example is needed. This approach, which relies on an older result, provides an intuition as to the success of resnet.
SP:75ea5f45677f0daa8a50a6e74737cfd7afc9f817
LAYER SPARSITY IN NEURAL NETWORKS
Sparsity has become popular in machine learning , because it can save computational resources , facilitate interpretations , and prevent overfitting . In this paper , we discuss sparsity in the framework of neural networks . In particular , we formulate a new notion of sparsity that concerns the networks ’ layers and , therefore , aligns particularly well with the current trend toward deep networks . We call this notion layer sparsity . We then introduce corresponding regularization and refitting schemes that can complement standard deep-learning pipelines to generate more compact and accurate networks . 1 INTRODUCTION . The number of layers and the number of nodes in each layer are arguably among the most fundamental parameters of neural networks . But specifying these parameters can be challenging : deep and wide networks , that is , networks with many layers and nodes , can describe data in astounding detail , but they are also prone to overfitting and require large memory , CPU , energy , and so forth . The resource requirements can be particularly problematic for real-time applications or applications on fitness trackers and other wearables , whose popularity has surged in recent years . A promising approach to meet these challenges is to fit networks sizes adaptively , that is , to allow for many layers and nodes in principle , but to ensure that the final network is “ simple ” in that it has a small number of connections , nodes , or layers ( Changpinyo et al. , 2017 ; Han et al. , 2016 ; Kim et al. , 2016 ; Liu et al. , 2015 ; Wen et al. , 2016 ) . Popular ways to fit such simple and compact networks include successively augmenting small networks ( Ash , 1989 ; Bello , 1992 ) , pruning large networks ( Simonyan & Zisserman , 2015 ) , or explicit sparsity-inducing regularization of the weight matrices , which we focus on here . An example is the ` 1-norm , which can reduce the number of connections . Another example is the ` 1-norm grouped over the rows of the weight matrices , which can reduce the number of nodes . It has been shown that such regularizers can indeed produce networks that are both accurate and yet have a small number of nodes and connections either in the first layer ( Feng & Simon , 2017 ) or overall ( Alvarez & Salzmann , 2016 ; Liu et al. , 2015 ; Scardapane et al. , 2017 ) . Such sparsity-inducing regularizers also have a long-standing tradition and thorough theoretical underpinning in statistics ( Hastie et al. , 2015 ) . But while sparsity on the level of connections and nodes has been studied in some detail , sparsity on the level of layers is much less understood . This lack of understanding contrasts the current trend to deep network architectures , which is supported by state-of-the-art performances of deep networks ( LeCun et al. , 2015 ; Schmidhuber , 2015 ) , recent approximation theory for ReLU activation networks ( Liang & Srikant , 2016 ; Telgarsky , 2016 ; Yarotsky , 2017 ) , and recent statistical theory ( Golowich et al. , 2017 ; Kohler & Langer , 2019 ; Taheri et al. , 2020 ) . Hence , a better understanding of sparsity on the level of layers seems to be in order . Therefore , we discuss in this paper sparsity with a special emphasis on the networks ’ layers . Our key observation is that for typical activation functions such as ReLU , a layer can be removed if all its parameter values are non-negative . We leverage this observation in the development of a new regularizer that specifically targets sparsity on the level of layers , and we show that this regularizer can lead to more compact and more accurate networks . Our three main contributions are : 1 . We introduce a new notion of sparsity that we call layer sparsity . 2 . We introduce a corresponding regularizer that can reduce network sizes . 3 . We introduce an additional refitting step that can further improve prediction accuracies . In Section 2 , we specify our framework , discuss different notions of sparsity , and introduce our refitting scheme . In Section 3 , we establish a numerical proof of concept . In Section 4 , we conclude with a discussion . 2 SPARSITY IN NEURAL NETWORKS . We first state our framework , then discuss different notions of sparsity , and finally introduce a refitting scheme . 2.1 MATHEMATICAL FRAMEWORK . To fix ideas , we first consider fully-connected neural networks that model data according to yi = f 1 [ W 1f2 [ ... f l [ W lxi ] ] ] + ui , ( 1 ) where i ∈ { 1 , . . . , n } indexes the n different samples , yi ∈ R is the output , xi ∈ Rd is the corresponding input with d the input dimension , l is the number of layers , W j ∈ Rpj×pj+1 for j ∈ { 1 , . . . , l } are the weight matrices with p1 = 1 and pl+1 = d , f j : Rpj → Rpj for j ∈ { 1 , . . . , l } are the activation functions , and ui ∈ R is the random noise . Extensions beyond fully-connected networks are straightforward—see Section 2.5 . We summarize the parameters in W : = ( W 1 , . . . , W l ) ∈ V : = { V = ( V 1 , . . . , V l ) : V j ∈ Rpj×pj+1 } , and we write for ease of notation fV [ xi ] : = f 1 [ V 1f2 [ ... f l [ V lxi ] ] ] ( 2 ) for V ∈ V . Neural networks are usually fitted based on regularized estimators in Lagrange Ŵ ∈ argmin V ∈V { DataFit [ y1 , . . . , yn , x1 , . . . , xn ] + h [ V ] } ( 3 ) or constraint form Ŵ ∈ argmin V ∈V h [ V ] ≤1 { DataFit [ y1 , . . . , yn , x1 , . . . , xn ] } , ( 4 ) where DataFit : Rn × Rn×d is a data-fitting function such as least-squares ∑n i=1 ( yi − fV [ xi ] ) 2 , and h : V → [ 0 , ∞ ) is a regularizer such as the elementwise ` 1-norm ∑ j , k , l | ( V j ) kl| . We are particularly interested in regularizers that induce sparsity . 2.2 STANDARD NOTIONS OF SPARSITY . We first state two regularizers that are known in deep learning and the corresponding notions of sparsity . Connection sparsity Consider the vanilla ` 1-regularizer hC [ V ] : = l∑ j=1 ( rC ) j |||V j |||1 : = l∑ j=1 ( rC ) j pj∑ v=1 pj+1∑ w=1 | ( V j ) vw| , where rC ∈ [ 0 , ∞ ) l is a vector of tuning parameters . This regularizer is the deep learning equivalent of the lasso regularizer in linear regression ( Tibshirani , 1996 ) and has received considerable attention no sparsity connection sparsity node sparsity layer sparsity combined sparsity recently ( Barron & Klusowski , 2018 ; 2019 ; Kim et al. , 2016 ) . The regularizer acts on each individual connection , pruning a full network ( first network from the left in Figure 1 ) to a more sparsely connected network ( second network in Figure 1 ) . We , therefore , propose to speak of connection sparsity . Node sparsity Consider a grouped version of the above regularizer hN [ V ] : = l∑ j=1 ( rN ) j |||V j |||2,1 : = l∑ j=1 ( rN ) j pj∑ v=1 √√√√pj+1∑ w=1 | ( V j ) vw|2 , where rN ∈ [ 0 , ∞ ) l is again a vector of tuning parameters . This regularizer is the deep learning equivalent of the group lasso regularizer in linear regression ( Bakin , 1999 ) and has received some attention recently ( Alvarez & Salzmann , 2016 ; Feng & Simon , 2017 ; Scardapane et al. , 2017 ) . The regularizer acts on all connections that go into a node simultaneously , rendering entire nodes inactive ( third network in Figure 1 ) . We , therefore , propose to speak of node sparsity . 2.3 LAYER SPARSITY . We now complement the two existing regularizers and notions of sparsity with a new , third notion . Layer sparsity Consider the regularizer hL [ V ] : = l−1∑ j=1 ( rL ) j |||V j |||2 , + : = l−1∑ j=1 ( rL ) j √√√√ pj∑ v=1 pj+1∑ w=1 ( neg [ ( V j ) vw ] ) 2 , ( 5 ) where rL ∈ [ 0 , ∞ ) l−1 is a vector of tuning parameters , and neg [ a ] : = min { a , 0 } is the negative part of a real value a ∈ R. This regularizers does not have an equivalent in linear regression , and it is also new in deep learning . We argue that the regularizer can give rise to a new type of sparsity . The regularizer can be disentangled along the layers according to hL [ V ] = l−1∑ j=1 ( rL ) jh L , j [ V j ] with hL , j [ V j ] : = √√√√ pj∑ v=1 pj+1∑ w=1 ( neg [ ( V j ) vw ] ) 2 for j ∈ { 1 , . . . , l − 1 } . We then focus on an individual inner layer , that is , a layer that corresponds to an index j ∈ { 2 , . . . , l− 1 } . To fix ideas , we consider the popular ReLU activation ( Glorot et al. , 2011 ; Hahnloser , 1998 ; Hahnloser et al. , 2000 ; Salinas & Abbott , 1996 ) ; in other words , we consider ( f j ) q [ t ] : = fReLU [ t ] : = max { t , 0 } for all j ∈ { 2 , . . . , l } , q ∈ { 1 , . . . , pj } , and t ∈ R ( the activation of the output layer can be arbitrary ) . It is now easy to show that the regularizer hL indeed induces sparsity on the level of layers . Theorem 1 ( Layer Sparsity ) . Consider j ∈ { 2 , . . . , l − 1 } , and define a merged weight matrix as V j−1 , j : = V j−1V j ∈ Rpj−1×pj+1 . It holds that hL , j [ V j ] = 0 ⇒ f j−1 [ V j−1f j [ V jz ] ] = f j−1 [ V j−1 , jz ] for all z ∈ [ 0 , ∞ ) pj+1 . Proof of Theorem 1 . If hL , j [ V j ] = 0 , then ( V j ) qm ≥ 0 for all q ∈ { 1 , . . . , pj } , m ∈ { 1 , . . . , pj+1 } . Hence , it holds for all q ∈ { 1 , . . . , pj } that ( V jz ) q ≥ 0 and , therefore , that f j [ V jz ] = V jz . The theorem follows then by the fact that V j−1 , j = V j−1V j . A key property of the ReLU function is positive homogeneity . That positive homogeneity can allow for moving weights between layers had been observed in Barron & Klusowski ( 2018 ) ; here , we use the positive homogeneity to merge layers . The idea is as follows : hL , j [ V j ] = 0 means in view of the stated theorem that we can redefine the network of depth l as a network of depth l − 1 by removing the function f j , replacing the weights V j−1 by V j−1 , j , and then removing the jth layer altogether . Theorem 1 can be applied sequentially to neighboring layers ; hence , the regularization can merge not only one but many layers into one . In conclusion , our new regularizer hL acts on all nodes and connections of each layer simultaneously , rendering entire layers inactive ( fourth network in Figure 1 ) . We , therefore , propose to speak of layer sparsity . The concept of layer sparsity and Theorem 1 in particular do not hinge on the exact choice of the regularizer in ( 5 ) : one can take any function hL that can be disentangled along the layers as described and that ensures the fact that hL , j [ V j ] = 0 implies mink , l ( V j ) kl ≥ 0 . We illustrate layer sparsity with two examples . Example 1 ( Identity Activation ) . We first highlight the meaning of layer sparsity in a simplistic setting that does not rely on Theorem 1 . We consider identity activation , that is , ( f j ) q [ t ] = t for all j ∈ { 2 , . . . , l } , q ∈ { 1 , . . . , pj } , and t ∈ R. The networks in ( 2 ) can then be written as fV [ xi ] = f 1 [ V 1 · · ·V lxi ] . In other words , the initial l-layer network can be compressed into a one-layer network with activation function f1 and parameter matrix V 1 · · ·V l ∈ R1×d . This setting with identity activation is , of course , purely academic , but it motivates an important question : can parts of networks be compressed similarly in the case of ReLU ? Theorem 1 gives an answer to this question : if hL , j [ V j ] = 0 , then the jth and ( j − 1 ) th layers can be combined . In the extreme case hL,2 [ V 2 ] = · · · = hL , l [ V l ] = 0 and non-negative input , the network can be condensed into a one-layer network just as in the linear case . In this sense , one can understand our layer regularizer is as a measure for the networks ’ “ distance to linearity. ” We detail this further in the following example . Example 2 ( ReLU Activation ) . We now illustrate how layer sparsity compresses and , therefore , simplifies networks in the case of ReLU activation . We fix an initial network fN parameterized by N ∈ V . We identify the active layers of the network by S ≡ S [ N ] : = { j ∈ { 2 , . . . , l − 1 } : hL , j [ N j ] 6= 0 } ∪ { 1 , l } . ( 6 ) Thus , S and { 1 , . . . , l } \ S contain the indexes of the relevant and irrelevant layers , respectively . ( We always consider the input and output layers as active . ) The level of sparsity , that is , the number of active layers , is s : = |S| ≤ l. Observe first that the theorem ’ s restriction to z ’ s that have non-negative elements makes sense : by the definition of fReLU , the outputs of every ReLU layer are non-negative . We now denote the indexes in S in an orderly fashion : j1 , . . . , js ∈ S such that j1 < · · · < js = l. We then define scaled versions of the corresponding merged matrices : if ji−1 ∈ S or ji ∈ { 1 , l } , we do the “ trivial merge ” M ji : = N ji ∈ Rpji×pji+1 ; otherwise , we do the “ non-trivial merge ” M ji : = N ji−1+1 · · ·N ji ∈ Rpji−1+1×pji+1 . In other words , we merge all irrelevant layers between the ji−1th and jith layers into the jith layer . We can then compress the data-generating model in ( 1 ) into yi = f j1 [ M j1f j2 [ ... f js [ M jsxi ] ] ] + ui with M : = ( M j1 , . . . , M js ) ∈ VS : = { V = ( V 1 , . . . , V s ) : V i ∈ Rpji−1+1×pji+1 } . Formulated differently , we can condense the original network according to fN [ xi ] = fM [ xi ] = f j1 [ M j1f j2 [ ... f js [ M jsxi ] ] ] , that is , we can formulate the initial ReLU activation network with l layers as a new ReLU activation network with s layers . The new network is still a ReLU activation network but has a smaller number of layers if s < l and , consequently , a smaller number of parameters in total : the total number of parameters in the initial network is ∑l j=1 ( pj × pj+1 ) , while the total number of parameters in the transformed network is only ∑s i=1 ( pji−1+1 × pji+1 ) . Our concept for regularizing layers is substantially different from existing ones : our layer-wise regularizer induces weights to be non-negative , whereas existing layer-wise regularizers induce weights to be zero ( Wen et al. , 2016 , Section 3.3 ) . The two main advantages of our approach are that it ( i ) does not require shortcuts to avoid trivial networks and ( ii ) does not implicitly enforce connection or node sparsity . We thus argue that our layer sparsity is a much more natural and appropriate way to capture and regularize network depths . Layer sparsity more closely relates to ResNets ( He et al. , 2016 ) . The recent popularity of ResNets is motivated by two observations : 1 . Solvers seem to struggle with finding good minima of deep networks ; even training accuracies can deteriorate when increasing the number of layers . 2 . Allowing for linear mappings that short-circuit parts of the network seem to help solvers in finding better minima . From our viewpoint here , one can argue that ResNets use these linear mappings to regulate network depths adaptively and , therefore , are related to layer sparsity . But importantly , ResNets are even more complex than the networks they are based on , while our notion simplifies networks . Since , as one can verify again readily , all three regularizers are convex , any combination of them is also convex . Such combinations can be used to obtain networks that are sparse in two or all three aspects ( last network in Figure 1 ) . In this sense , the different notions of sparsity are not competing but rather complementing each other .
The paper proposes a regularizer enforcing a novel form of sparsity that authors call "layer sparsity". Under certain conditions on layer weights, two consecutive layers in a deep neural network (with certain nonlinear activation functions) can be represented exactly as a single layer. The authors proposed a regularizer that can lead to such layer collapse thus resulting in shallower and more compact models.
SP:9fd718d9cc2318a1d6306c22a45b4e90ace9fd80
Adversarially-Trained Deep Nets Transfer Better: Illustration on Image Classification
1 INTRODUCTION . While deep neural networks ( DNNs ) achieve state-of-the-art performance in many fields , they are known to require large quantities of reasonably high-quality labeled data , which can often be expensive to obtain . As such , transfer learning has emerged as a powerful methodology that can significantly ease this burden by enabling the user to adapt a pre-trained DNN to a range of new situations and domains ( Bengio , 2012 ; Yosinski et al. , 2014 ) . Models that are pre-trained on ImageNet ( Deng et al. , 2009 ) have excellent transfer learning capabilities after fine-tuning only a few of the last layers ( Kornblith et al. , 2019 ) on the target domain . Early work in transfer learning was motivated by the observation that humans apply previously learned knowledge to solve new problems with ease ( Caruana , 1995 ) . With this motivation , learning aims to extract knowledge from one or more source tasks and apply the knowledge to a target task ( Pan & Yang , 2009 ) . The main benefits include a reduction in the number of required labeled data points in the target domain ( Gong et al. , 2012 ; Pan & Yang , 2009 ) and a reduction in training costs as compared to training a model from scratch . However , in practice , transfer learning remains an “ art ” that requires domain expertise to tune the many knobs of the transfer process . An important consideration , for example , is which concepts or features are transferable from the source domain to the target domain . The features which are unique to a domain can not be transferred , and so an important goal of transfer learning is to hunt for features shared across domains . It has recently been shown that adversarially-trained models ( henceforth denoted as robust models ) capture more robust features that are more aligned with human perception , compared to the seemingly patternless features ( to humans , at least ) of standard models ( Ilyas et al. , 2019 ) . Unfortunately , ∗Equal contribution these models typically have a lower generalization performance on the source domain , as compared to non-adversarially-trained ( henceforth denoted as natural , as in previous works ( Tsipras et al. , 2019 ; Shafahi et al. , 2019 ; Salman et al. , 2020 ) ) model . Hence , Ilyas et al . ( 2019 ) hypothesize that non-robust features that are lost during adversarially training may have a significant positive impact on generalization within a given dataset or domain . This inherently different feature representation between models constructed with adversarial training and models trained with standard methods would also explain why accuracy and robustness are at odds ( Tsipras et al. , 2019 ) . This leads to the question of whether models that use robust representations generalize better across domains . This is the main question we address . In this work , we demonstrate that robust models transfer better to new domains than natural models . To demonstrate this , we conduct an extensive number of transfer learning experiments across multiple domains ( i.e. , datasets ) , with various numbers of fine-tuned convolutional blocks and random subset sizes from the target dataset , where the critical variable is the constraint used to adversarially train the source model . ( Described in detail in Sections 3 and Appendix A.3 ) Importantly , note that we do not use an adversarial training procedure for the actual transfer learning process . Our findings indicate that robust models have outstanding transfer learning characteristics across all configurations , where we measure the performance in terms of model accuracy on target datasets for varying numbers of training images and epochs . Figure 1 provides a summary of our approach . Our focus in this work is to show that robust source models learn representations that transfer better to new datasets on image recognition tasks . While adversarial training was proposed to combat adversarial attacks , our experiments discover an unintended but useful application . Adversarial training retains the robust features that are independent of the idiosyncrasies present in the source training data . Thus , these models exhibit worse generalization performance on the source domain , but better performance when transferred . This observation is novel , and we undertake extensive empirical studies to make the following contributions : • We discover that adversarially-trained source models obtain higher test accuracy than natural source models after fine-tuning with fewer training examples on the target datasets and over fewer training epochs . • We notice that the similarity between the source and target datasets affects the optimal number of fine-tuned blocks and the robustness constraint . • We show that adversarial training biases the learned representations to retain shapes instead of textures , impacting the source models ’ transferability . • We interpret robust representations using influence functions and observe that adversarially-trained source models better capture class-level semantic properties of the images , consistent with human concept learning and understanding . 2 RELATED WORKS . ImageNet transfers . Our focus is on studying the transfer of all but the last few layers of trained DNNs and fine-tuning the last non-transferred layers . For ease of exposition , we restrict our attention to ImageNet models ( Deng et al. , 2009 ) . Kornblith et al . ( 2019 ) study the transfer of natural models to various datasets and is thus a prequel to our work . Yosinski et al . ( 2014 ) also study transferring natural models but focus on the importance of individual neurons on transfer learning . Recht et al . ( 2019 ) study the generalization of natural and robust models to additional data generated using a process similar to that of generating ImageNet . They conclude that models trained on ImageNet overfit the data . However , they study the models ’ generalization as-is without fine-tuning . Covariate shift . A significant challenge in transfer learning is handling the data distribution change across different domains , also called covariate shift . It ’ s widely recognized in successful domain adaptations ( Yosinski et al. , 2014 ; Glorot et al. , 2011 ) that the representations in earlier layers are more “ generic ” and hence more transferable than the ones in later layers . This hierarchical disentanglement is attributed to the properties of the data itself , so that the later layers are more closely associated with the data and do not transfer as well . This motivated studies for shallow transfer learning ( Yosinski et al. , 2014 ; Ghifary et al. , 2014 ) and more general studies to extract features that remain invariant across different data distributions ( Arjovsky et al. , 2019 ) . In Section 5 we see that adversarial training biases the learned representations to retain shapes instead of textures , which may be a more desirable invariant across the datasets . Transfering adversarially-trained models . There are mainly two works directly associated with ours . First , subsequent to this paper ’ s initial posting ( in a non-anonymized form in a public forum ) , Salman et al . ( 2020 ) posted a related paper . They arrived at broadly similar conclusions , confirming our main results that robust models transfer better ; and they do so by focusing on somewhat different experiments , e.g. , they focus on the effects of network architecture width , fixed feature transfer , and seeing if models without texture bias transfer better than robust models . Second , Shafahi et al . ( 2020 ) mainly find that models lose robustness as more layers are fine-tuned . It might seem to contradict our thesis that they also notice that an ImageNet robust model with a ‖δ‖∞ ≤ 5 constraint has lower accuracy on the target datasets , CIFAR-10 and CIFAR-100 , compared to a natural ImageNet model . However , we show that the robust model transfers better than the natural one when we use a ‖δ‖2 ≤ 3 constraint to adversarially train the source model . Example based interpretability . There has been significant interest in interpreting blackbox models using salient examples from the data . A line of research focuses on using influence functions ( Koh & Liang , 2017 ; Koh et al. , 2019 ; Khanna et al. , 2019 ) to choose the most indicative data points for a given prediction . In particular , Khanna et al . ( 2019 ) discuss the connection of influence functions with Fisher kernels ; and Kim et al . ( 2016 ) propose using criticisms in addition to representative examples . Complimentary lines of research focus on interpretability based on human-understandable concepts ( Bau et al. , 2017 ) and feature saliency metrics ( M. Ancona , 2017 ) . 3 BRIEF OVERVIEW OF THE ADVERSARIAL TRAINING PROCESS . Adversarial training modifies the objective of minimizing the average loss across all data points by first maximizing the loss produced by each image with a perturbation ( i.e. , a mask ) that may not exceed a specified magnitude . Here , we describe this process , similar to Madry et al . ( 2018 ) . Let ( xi , yi ) be m data points for i ∈ [ m ] , where xi ∈ Rd is the ith feature vector , and yi ∈ Y is the corresponding response value . Typically , we model the response as a parametric model hθ : Rd → Y with a corresponding loss function ` : Y ×Y → R≥0 . The objective is to minimize the loss ` ( ŷ , y ) , where ŷ = hθ ( x ) is the predicted response . Adversarial training replaces the above minimization problem of training the model by a minimax optimization problem to make the model resilient to arbitrary perturbations of inputs . The goal of adversarial training is to solve a problem of the form min θ 1 m m∑ i=1 max ‖δi‖p≤ ` ( hθ ( xi + δi ) , yi ) . ( 1 ) That is , the goal is to find the parameters θ of the model hθ that minimize the average maximum loss obtained by perturbing every input xi with a δi constrained such that its ` p norm does not exceed some non-negative . If = 0 , then δi = 0 , in which case there is no perturbation to the input , which is what we call natural training . As increases , the magnitude of the perturbation also increases . For more details on how we solve this problem , and a few examples , see Appendix A.2 . 4 TRANSFERRING ADVERSARIALLY-TRAINED MODELS . In this study , we train four ResNet50 source models on ImageNet . We train one of them naturally ( non-adversarially ) , and train each of the remaining three adversarially with one of the following constraints : ( i ) ‖δ‖2 ≤ 3 , ( ii ) ‖δ‖∞ ≤ 4255 , ( iii ) ‖δ‖∞ ≤ 8 255 . Next , we fine-tune some convolutional blocks in the source models to each of the six target datasets separately using a subset of the training data . We repeat each of these trials for various seed values and report the mean and 95 % confidence interval . Altogether , we have a comprehensive and replicable experimental setup that considers four ImageNet source models , four fine-tuning configurations , six target datasets , ten random subset sizes , and an average of fifteen random seeds for a total of 14,400 fine-tuned models . For more details , see Appendix A.3 and A.4 . Adversarially-trained models transfer better and faster . For ease of comparison , we select the robust and natural models that transfer with the highest test accuracy across all datasets ( finetuning three convolutional blocks and the robust model using the ‖δ‖2 ≤ 3 constraint ) , as shown in Figures 2 and 3 . See Appendix A.5 for additional results . Figure 2 ( b ) shows that the test accuracy delta between robust and natural models is above zero for all six target datasets . Thus , robust models obtain higher test accuracy on the target dataset than the natural model , especially with less training data in the target domain . Robust models also learn faster , as shown by the positive test accuracy delta in Figure 3 ( b ) for all target datasets after only 11 and 21 fine-tuning epochs . See Appendix A.6 for additional information on different random subset sizes . Fine-tuning cost is the same for both robust and natural models , but training the source model is considerably more expensive . For more detail on computational complexity see A.8 . Also , our code is available at https : //github.com/utrerf/robust transfer learning.git Best results achieved with ` 2 constraint and fine-tuning one to three convolutional blocks . Robust models achieve the highest test accuracy on the target datasets when an optimal number of convolutional blocks are fine-tuned , and when these models are trained with an appropriate constraint type . In particular , fine-tuning zero ( only the fully-connected layer ) or nine convolutional blocks leads to lower test accuracy than fine-tuning one or three blocks , as shown in Figure 4 ( a ) for all six target datasets . The natural model and the other two robust models exhibit the same behavior , as shown in Appendix A.7 . To analyze the best constraint type , we select the fine-tuning configuration that yields the highest test accuracy on the target datasets ( fine-tuning three convolutional blocks ) . We see that the ` 2 constraint outperforms the ` ∞ constraint , as shown by the positive accuracy delta between the ` 2 and ` ∞ models in Figures 5 ( d ) and ( e ) , respectively . Similarity effect on transfer learning configurations . Besides noticing that robust models achieved better performance on the target dataset than natural models , we also observe trends in how well they transfer to different datasets . When transferring from ImageNet , we find that CIFAR-10 and CIFAR-100 have interesting transfer properties , compared to the other datasets . In particular , even though all other datasets transfer better when fine-tuning one or three blocks , it seems that models transfer better to CIFAR-10 and CIFAR-100 when fewer blocks are fine-tuned , as shown in Figure 4 ( b ) . This suggests that because these datasets are close to ImageNet , fine-tuning of early blocks is unnecessary ( Yosinski et al. , 2014 ) . Along similar lines , it is better to use a smaller for CIFAR-10 and CIFAR-100 datasets than the other datasets when transferring from ImageNet , as seen from Figure 5 ( c ) . This is because a larger perturbation would destroy low-level features , learned from ImageNet , which are useful to discriminate between labels in CIFAR-10 and CIFAR100 . Finally , for datasets that are most distinct from ImageNet ( SVHN and KMNIST ) , we find that robustness yields the largest benefit to classification accuracy and learning speed , as seen in Figure 2 ( b ) and Figure 3 ( b ) , respectively . These discrepancies are even more noticeable when smaller fractions of the target dataset are used .
This paper tries to investigate and understand if and how adversarial training helps the models trained on the source domain transfer easier and faster to target domains. With extensive different configurations (such as fine-tuning strategies) in experiments, the authors show that robust models transfer better than natural models with less training data from the target domain. Also they demonstrate the intuition behind through experiments, such as capturing shapes than textures or using influence functions.
SP:c0072c347d78252701da4d55192f607131d97adf
Optimizing Loss Functions Through Multivariate Taylor Polynomial Parameterization
1 INTRODUCTION . As deep learning systems have become more complex , their architectures and hyperparameters have become increasingly difficult and time-consuming to optimize by hand . In fact , many good designs may be overlooked by humans with prior biases . Therefore , automating this process , known as metalearning , has become an essential part of the modern machine learning toolbox . Metalearning aims to solve this problem through a variety of approaches , including optimizing different aspects of the architecture from hyperparameters to topologies , and by using different methods from Bayesian optimization to evolutionary computation ( Schmidhuber , 1987 ; Elsken et al. , 2019 ; Miikkulainen et al. , 2019 ; Lemke et al. , 2015 ) . Recently , loss-function discovery and optimization has emerged as a new type of metalearning . Focusing on neural network ’ s root training goal it aims to discover better ways to define what is being optimized . However , loss functions can be challenging to optimize because they have a discrete nested structure as well as continuous coefficients . The first system to do so , Genetic Loss Optimization ( GLO ; Gonzalez & Miikkulainen , 2020 ) tackled this problem by discovering and optimizing loss functions in two separate steps : ( 1 ) representing the structure as trees , and evolving them with Genetic Programming ( GP ; Banzhaf et al. , 1998 ) ; and ( 2 ) optimizing the coefficients using Covariance-Matrix Adaptation Evolutionary Strategy ( CMA-ES ; Hansen & Ostermeier , 1996 ) . While the approach was successful , such separate processes make it challenging to find a mutually optimal structure and coefficients . Furthermore , small changes in the tree-based search space do not always result in small changes in the phenotype , and can easily make a function invalid , making the search process ineffective . In an ideal case , loss functions would be mapped into fixed-length vectors in a Hilbert space . This mapping should be smooth , well-behaved , well-defined , incorporate both a function ’ s structure and coefficients , and should by its very nature exclude large classes of infeasible loss functions . This paper introduces such an approach : Multivariate Taylor expansion-based genetic loss-function optimization ( TaylorGLO ) . With a novel parameterization for loss functions , the key pieces of information that affect a loss function ’ s behavior are compactly represented in a vector . Such vectors are then optimized for a specific task using CMA-ES . Special techniques can be developed to narrow down the search space and speed up evolution . Loss functions discovered by TaylorGLO outperform the standard cross-entropy loss ( or log loss ) on the MNIST , CIFAR-10 , CIFAR-100 , and SVHN datasets with several different network architectures . They also outperform the Baikal loss , discovered by the original GLO technique , and do it with significantly fewer function evaluations . The reason for the improved performance is that evolved functions discourage overfitting to the class labels , thereby resulting in automatic regularization . These improvements are particularly pronounced with reduced datasets where such regularization matters the most . TaylorGLO thus further establishes loss-function optimization as a promising new direction for metalearning . 2 RELATED WORK . Applying deep neural networks to new tasks often involves significant manual tuning of the network design . The field of metalearning has recently emerged to tackle this issue algorithmically ( Schmidhuber , 1987 ; Lemke et al. , 2015 ; Elsken et al. , 2019 ; Miikkulainen et al. , 2019 ) . While much of the work has focused on hyperparameter optimization and architecture search , recently other aspects , such activation functions and learning algorithms , have been found useful targets for optimization ( Bingham et al. , 2020 ; Real et al. , 2020 ) . Since loss functions are at the core of machine learning , it is compelling to apply metalearning to their design as well . Deep neural networks are trained iteratively , by updating model parameters ( i.e. , weights and biases ) using gradients propagated backward through the network ( Rumelhart et al. , 1985 ) . The process starts from an error given by a loss function , which represents the primary training objective of the network . In many tasks , such as classification and language modeling , the cross-entropy loss ( also known as the log loss ) has been used almost exclusively . While in some approaches a regularization term ( e.g . L2 weight regularization ; Tikhonov , 1963 ) is added to the the loss function definition , the core component is still the cross-entropy loss . This loss function is motivated by information theory : It aims to minimize the number of bits needed to identify a message from the true distribution , using a code from the predicted distribution . In other types of tasks that do not fit neatly into a single-label classification framework different loss functions have been used successfully ( Gonzalez et al. , 2019 ; Gao & Grauman , 2019 ; Kingma & Welling , 2014 ; Zhou et al. , 2016 ; Dong et al. , 2017 ) . Indeed , different functions have different properties ; for instance the Huber Loss ( Huber , 1964 ) is more resilient to outliers than other loss functions . Still , most of the time one of the standard loss functions is used without a justification ; therefore , there is an opportunity to improve through metalearning . Genetic Loss Optimization ( GLO ; Gonzalez & Miikkulainen , 2020 ) provided an initial approach into metalearning of loss functions . As described above , GLO is based on tree-based representations with coefficients . Such representations have been dominant in genetic programming because they are flexible and can be applied to a variety of function evolution domains . GLO was able to discover Baikal , a new loss function that outperformed the cross-entropy loss in image classification tasks . However , because the structure and coefficients are optimized separately in GLO , it can not easily optimize their interactions . Many of the functions created through tree-based search are not useful because they have discontinuities , and mutations can have disproportionate effects on the functions . GLO ’ s search is thus inefficient , requiring large populations that are evolved for many generations . Thus , GLO does not scale to the large models and datasets that are typical in modern deep learning . The technique presented in this paper , TaylorGLO , aims to solve these problems through a novel loss function parameterization based on multivariate Taylor expansions . Furthermore , since such representations are continuous , the approach can take advantage of CMA-ES ( Hansen & Ostermeier , 1996 ) as the search method , resulting in faster search . 3 LOSS FUNCTIONS AS MULTIVARIATE TAYLOR EXPANSIONS . Taylor expansions ( Taylor , 1715 ) are a well-known function approximator that can represent differentiable functions within the neighborhood of a point using a polynomial series . Below , the common univariate Taylor expansion formulation is presented , followed by a natural extension to arbitrarily-multivariate functions . Given a Ckmax smooth ( i.e. , first through kmax derivatives are continuous ) , real-valued function , f ( x ) : R→ R , a kth-order Taylor approximation at point a ∈ R , f̂k ( x , a ) , where 0 ≤ k ≤ kmax , can be constructed as f̂k ( x , a ) = k∑ n=0 1 n ! f ( n ) ( a ) ( x− a ) n. ( 1 ) Conventional , univariate Taylor expansions have a natural extension to arbitrarily high-dimensional inputs of f . Given a Ckmax+1 smooth , real-valued function , f ( x ) : Rn → R , a kth-order Taylor approximation at point a ∈ Rn , f̂k ( x , a ) , where 0 ≤ k ≤ kmax , can be constructed . The stricter smoothness constraint compared to the univariate case allows for the application of Schwarz ’ s theorem on equality of mixed partials , obviating the need to take the order of partial differentiation into account . Let us define an nth-degree multi-index , α = ( α1 , α2 , . . . , αn ) , where αi ∈ N0 , |α| = ∑n i=1 αi , α ! = ∏n i=1 αi ! . x α = ∏n i=1 x αi i , and x ∈ Rn . Multivariate partial derivatives can be concisely written using a multi-index ∂αf = ∂α11 ∂ α2 2 · · · ∂αnn f = ∂|α| ∂xα11 ∂x α2 2 · · · ∂x αn n . ( 2 ) Thus , discounting the remainder term , the multivariate Taylor expansion for f ( x ) at a is f̂k ( x , a ) = ∑ ∀α , |α|≤k 1 α ! ∂αf ( a ) ( x− a ) α . ( 3 ) The unique partial derivatives in f̂k and a are parameters for a kth order Taylor expansion . Thus , a kth order Taylor expansion of a function in n variables requires n parameters to define the center , a , and one parameter for each unique multi-index α , where |α| ≤ k. That is : # parameters ( n , k ) = n+ ( n+k k ) = n+ ( n+k ) ! n ! k ! . The multivariate Taylor expansion can be leveraged for a novel loss-function parameterization . Let an n-class classification loss function be defined as LLog = − 1n ∑n i=1 f ( xi , yi ) . The function f ( xi , yi ) can be replaced by its kth-order , bivariate Taylor expansion , f̂k ( x , y , ax , ay ) . More sophisticated loss functions can be supported by having more input variables beyond xi and yi , such as a time variable or unscaled logits . This approach can be useful , for example , to evolve loss functions that change as training progresses . For example , a loss function in x and y has the following third-order parameterization with parameters θ ( where a = 〈θ0 , θ1〉 ) : L ( x , y ) = − 1 n n∑ i=1 [ θ2 + θ3 ( yi − θ1 ) + 12θ4 ( yi − θ1 ) 2 + 16θ5 ( yi − θ1 ) 3 + θ6 ( xi − θ0 ) +θ7 ( xi − θ0 ) ( yi − θ1 ) + 12θ8 ( xi − θ0 ) ( yi − θ1 ) 2 + 12θ9 ( xi − θ0 ) 2 + 12θ10 ( xi − θ0 ) 2 ( yi − θ1 ) + 16θ11 ( xi − θ0 ) 3 ] ( 4 ) Notably , the reciprocal-factorial coefficients can be integrated to be a part of the parameter set by direct multiplication if desired . As will be shown in this paper , the technique makes it possible to train neural networks that are more accurate and learn faster than those with tree-based loss function representations . Representing loss functions in this manner confers several useful properties : • It guarantees smooth functions ; • Functions do not have poles ( i.e. , discontinuities going to infinity or negative infinity ) within their relevant domain ; • They can be implemented purely as compositions of addition and multiplication operations ; • They can be trivially differentiated ; • Nearby points in the search space yield similar results ( i.e. , the search space is locally smooth ) , making the fitness landscape easier to search ; • Valid loss functions can be found in fewer generations and with higher frequency ; • Loss function discovery is consistent and not dependent on a specific initial population ; and • The search space has a tunable complexity parameter ( i.e. , the order of the expansion ) . These properties are not necessarily held by alternative function approximators . For instance : Fourier series are well suited for approximating periodic functions ( Fourier , 1829 ) . Consequently , they are not as well suited for loss functions , whose local behavior within a narrow domain is important . Being a composition of waves , Fourier series tend to have many critical points within the domain of interest . Gradients fluctuate around such points , making gradient descent infeasible . Additionally , close approximations require a large number of terms , which in itself can be injurious , causing large , high-frequency fluctuations known as “ ringing ” , due to Gibb ’ s phenomenon ( Wilbraham , 1848 ) . Padé approximants can be more accurate approximations than Taylor expansions ; indeed , Taylor expansions are a special case of Padé approximants where M = 0 ( Graves-Morris , 1979 ) . However , unfortunately Padé approximants can model functions with one or more poles , which valid loss functions typically should not have . These problems still exist , and are exacerbated , for Chisholm approximants ( a bivariate extension ; Chisholm , 1973 ) and Canterbury approximants ( a multivariate generalization ; Graves-Morris & Roberts , 1975 ) . Laurent polynomials can represent functions with discontinuities , the simplest being x−1 . While Laurent polynomials provide a generalization of Taylor expansions into negative exponents , the extension is not useful because it results in the same issues as Padé approximants . Polyharmonic splines can represent continuous functions within a finite domain , however , the number of parameters is prohibitive in multivariate cases . The multivariate Taylor expansion is therefore a better choice than the alternatives . It makes it possible to optimize loss functions efficiently in TaylorGLO , as will be described next . 4 THE TAYLORGLO METHOD Candidate Evaluation0 0 00 0 0 [ ] 0 0 Build TaylorGLO Loss FunctionCMA-ES Mean Vector Covariance Matrix Sampler Partial Model Training ( Few Epochs ) ℒ = − 1 n n ∑ i=1 f ( xi , yi ) 1.1 0.8 1.41.2 1 1.2 [ ] 1.4 0.8 Build TaylorGLO Loss Function Initial Solution Mean Vector Best Solution Validation Set Evaluation Figure 1 : The TaylorGLO method . Starting with a population of initially unbiased loss functions , CMA-ES optimizes their Taylor expansion parameters in order to maximize validation accuracy after partial training . The candidate with the highest accuracy is chosen as the final , best solution . TaylorGLO ( Figure 1 ) aims to find the optimal parameters for a loss function represented as a multivariate Taylor expansion . The parameters for a Taylor approximation ( i.e. , the center point and partial derivatives ) are referred to as θf̂ : θf̂ ∈ Θ , Θ = R # parameters . TaylorGLO strives to find the vector θ∗ f̂ that parameter- izes the optimal loss function for a task . Because the values are continuous , as opposed to discrete graphs of the original GLO , it is possible to use continuous optimization methods . In particular , Covariance Matrix Adaptation Evolutionary Strategy ( CMA-ES Hansen & Ostermeier , 1996 ) is a popular population-based , black-box optimization technique for rugged , continuous spaces . CMA-ES functions by maintaining a covariance matrix around a mean point that represents a distribution of solutions . At each generation , CMA-ES adapts the distribution to better fit evaluated objective values from sampled individuals . In this manner , the area in the search space that is being sampled at each step grows , shrinks , and moves dynamically as needed to maximize sampled candidates ’ fitnesses . TaylorGLO uses the ( µ/µ , λ ) variant of CMA-ES ( Hansen & Ostermeier , 2001 ) , which incorporates weighted rank-µ updates ( Hansen & Kern , 2004 ) to reduce the number of objective function evaluations needed . In order to find θ∗ f̂ , at each generation CMA-ES samples points in Θ . Their fitness is determined by training a model with the corresponding loss function and evaluating the model on a validation dataset . Fitness evaluations may be distributed across multiple machines in parallel and retried a limited number of times upon failure . An initial vector of θf̂ = 0 is chosen as a starting point in the search space to avoid bias . Fully training a model can be prohibitively expensive in many problems . However , performance near the beginning of training is usually correlated with performance at the end of training , and therefore it is enough to train the models only partially to identify the most promising candidates . This type of approximate evaluation is common in metalearning ( Grefenstette & Fitzpatrick , 1985 ; Jin , 2011 ) . An additional positive effect is that evaluation then favors loss functions that learn more quickly . For a loss function to be useful , it must have a derivative that depends on the prediction . Therefore , internal terms that do not contribute to ∂∂yLf ( x , y ) can be trimmed away . This step implies that any term t within f ( xi , yi ) with ∂∂yi t = 0 can be replaced with 0 . For example , this refinement simplifies Equation 4 , providing a reduction in the number of parameters from twelve to eight : L ( x , y ) = − 1 n n∑ i=1 [ θ2 ( yi − θ1 ) + 12θ3 ( yi − θ1 ) 2 + 16θ4 ( yi − θ1 ) 3 + θ5 ( xi − θ0 ) ( yi − θ1 ) + 12θ6 ( xi − θ0 ) ( yi − θ1 ) 2 + 12θ7 ( xi − θ0 ) 2 ( yi − θ1 ) ] . ( 5 )
This paper proposed a method, called TaylorGLO, to learn the loss functions, for training deep neural network, by meta-learning. Specifically, the authors proposed to parameterize the loss function with multivariate Taylor polynomial, and then learn the parameters in the polynomial using evolutionary algorithm within the meta-learning framework. The experiments showed improved performance of the TaylorGLO over cross-entropy baseline on several datasets and with different network architectures.
SP:ffc8e46a5dbbcd0906458c0e302190997dfe8b5e
Efficient Long-Range Convolutions for Point Clouds
1 INTRODUCTION . Point-cloud representations provide detailed information of objects and environments . The development of novel acquisition techniques , such as laser scanning , digital photogrammetry , light detection and ranging ( LIDAR ) , 3D scanners , structure-from-motion ( SFM ) , among others , has increased the interest of using point cloud representation in various applications such as digital preservation , surveying , autonomous driving ( Chen et al. , 2017 ) , 3D gaming , robotics ( Oh & Watanabe , 2002 ) , and virtual reality ( Park et al. , 2008 ) . In return , this new interest has fueled the development of machine learning frameworks that use point clouds as input . Historically , early methods used a preprocessing stage that extracted meticulously hand-crafted features from the point cloud , which were subsequently fed to a neural network ( Chen et al. , 2003 ; Rusu et al. , 2008 ; Rusu et al. , 2009 ; Aubry et al. , 2011 ) , or they relied on voxelization of the geometry ( Savva et al. , 2016 ; Wu et al. , 2015 ; Riegler et al. , 2017 ; Maturana & Scherer , 2015 ) . The PointNet architecture ( Qi et al. , 2017 ) was the first to handle raw point cloud data directly and learn features on the fly . This work has spawned several related approaches , aiming to attenuate drawbacks from the original methodology , such as PointNet++ ( Qi et al. , 2017 ) , or to increase the accuracy and range of application ( Wang et al. , 2019 ; Zhai et al. , 2020 ; Li et al. , 2018 ; Liu et al. , 2019 ) . Even though such methods have been quite successful for machine learning problems , they rely on an assumption of locality , which may produce large errors when the underlying task at hand exhibits long-range interactions ( LRIs ) . To capture such interactions using standard convolutional layers , one can use wider window sizes , deeper networks , and/or a large number of features , which may increase the computational cost significantly . Several approaches have been proposed to efficiently capture such interactions in tasks such as semantic segmentation , of which the ideas we briefly summarize below . In the multi-scale type of approaches , features are progressively processed and merged . Within this family , there exist several variants , where the underlying neural networks can be either recursive neural networks ( Ye et al. , 2018 ) , convolutional layers ( Xu et al. , 2019 ; Xu et al. , 2018 ) or autoencoders ( Yang et al. , 2018 ; Deng et al. , 2018 ) . Some works have proposed skip connections , following an U-net ( Ronneberger et al. , 2015 ) type architecture ( Zhou & Tuzel , 2018 ; Qi et al. , 2017 ) , while others have focused on using a tree structure for the clustering of the points ( Klokov & Lempitsky , 2017 ; Zeng & Gevers , 2018 ; Gadelha et al. , 2018 ) , or using an reference permutohedral lattices to compute convolutions ( Jampani et al. , 2016 ) whose results are interpolated back to the point cloud ( Su et al. , 2018 ) . Although these methods have been shown to be successful in a range of applications , when the task at hand presents symmetries , such as rotation , translation , and permutation invariance , there is no systematic framework to embed those symmetries into the algorithmic pipelines . Another line of work , relies on interpreting the point cloud as a graph and use spectral convolutions ( Bruna et al . ; Defferrard et al. , 2016 ) , whose cost can scale super-linearly when dealing with LRIs . In applications of machine learning to scientific computing , several classical multilevel matrix factorizations have been rewritten in the context of machine learning ( Kondor et al. , 2014 ) , which have been adapted to handle long-range interactions in the context of end-to-end maps using voxelized geometries in ( Fan et al. , 2019b ; a ; Khoo & Ying , 2019 ; Fan & Ying , 2019 ) resulting in architectures similar to U-nets ( Ronneberger et al. , 2015 ) , which have been extended to point clouds in ( Li et al. , 2020 ) . Due to underlying voxelization of the geometry , it may be difficult for these networks to generalize when the resolution of the voxelization changes . The efficient treatment of LRI for point clouds is also a prominent problem in many physical applications such as molecular modeling and molecular dynamics simulation . While long-range electrostatic interactions are omnipresent , it has been found that effectively short-ranged models can already describe the N -body potential and the associated force field ( Behler & Parrinello , 2007 ; Zhang et al. , 2018a ; b ) for a wide range of physical systems . There have also been a number of recent works aiming at more general systems beyond this regime of effective short-range interactions , such as the work of Ceriotti and co-workers ( Grisafi & Ceriotti , 2019 ; Grisafi et al . ; Nigam et al. , 2020 ; Rossi et al. , 2020 ) , as well as the works of ( Yao et al. , 2018 ; Ko et al. , 2009 ; Hirn et al. , 2017 ; Rupp et al. , 2012 ; Huo & Rupp ; Deng et al. , 2019 ; Bereau et al. , 2018 ; Zhang et al. , 2019 ) . The general strategy is to build parameterized long-range interactions into the kernel methods or neural network models , so that the resulting model can characterize both short-range , as well as long-range electrostatic interactions . In the neural network context , the computational cost of treating the LRIs using these methods can grow superlinearly with the system size . The idea of this work is aligned with the approaches in the molecular modeling community , which constructs a neural network layer to directly describe the LRI . In particular , we present a new longrange convolutional ( LRC ) -layer , which performs a global convolutional operation in nearly-linear time with respect to number of units in the layer . By leveraging the non-uniform Fourier transform ( NUFFT ) ( Dutt & Rokhlin , 1993 ; Greengard & Lee , 2004 ; Barnett et al. , 2019 ) technique , the LRC-layer implements a convolution with a point-wise multiplication in the frequency domain with trainable weights known as Fourier multipliers . The NUFFT is based on the regular fast Fourier transform ( FFT ) ( Cooley & Tukey , 1965 ) with a fast gridding algorithms , to allow for fast convolution on unstructured data . This new LRC-layer provides a new set of descriptors that can seamlessly satisfy relevant symmetries . For instance , when the kernel of the LRI is rotationally invariant , such symmetry can be directly built into the parameterization of the Fourier kernel . Such descriptors can be used in tandem with the descriptors provided by short-range convolutional layers to improve the performance of the neural network . Efficient training of a neural network with the LRC-layer for capturing the information of LRIs is another challenging problem . Short-range models can often be trained with data generated with a relatively small computational box ( called the small-scale data ) , and they can be seamlessly deployed in large-scale systems without significantly increasing the generalization error . On the other hand , long-range models need to be trained directly with data generated in a large computational box ( called the large-scale data ) , and the generation process of such large-scale data can be very expensive . For instance , in molecular modeling , the training data is often generated with highly accurate quantum mechanical methods , of which the cost can scale steeply as O ( Nα ) , where N is the system size and α ≥ 3 . Therefore it is desirable to minimize the number of samples with a large system size . In many applications , the error of the effective short-range model is already modestly small . This motivates us to propose a two-scale training strategy as follows . We first generate many small-scale data ( cheaply and possibly in parallel ) , and train the network without the LRC-layer . Then we use a small number of large-scale data , and perform training with both the short- and long-range convolutional layers . In order to demonstrate the effectiveness of the LRC-layer and the two-scale training procedure , we apply our method to evaluate the energy and force associated with a model N -body potential that exhibit tunable short- and long-range interactions in one , two and three dimensions . The input point cloud consists of the atomic positions , and the output data include the N -body potential , local potential , and the force ( derivative of the N -body potential with respect to atomic positions ) . In particular , the local potential and the force can be viewed as point clouds associated with the atomic positions . The evaluation of the N -body potential is a foundational component in molecular modeling , and LRI plays an important role in the description of ionic systems , macroscopically polarized interfaces , electrode surfaces , and many other problems in nanosciences ( French et al. , 2010 ) . Our result verifies that the computational cost of the long-range layer can be reduced from O ( N2 ) using a direct implementation , to O ( N ) ( up to logarithmic factors ) using NUFFT . Furthermore , we demonstrate that the force , i.e . the derivatives of the potential with respect to all inputs can be evaluated with O ( N ) cost ( up to logarithmic factors ) . In terms of sample efficiency , we find that for the model problem under study here , the two-scale training strategy can effectively reduce the number of large-scale samples by over an order of magnitude to reach the target accuracy . This can be particularly valuable in the context of molecular modeling , where accurate data are often obtained from first principle electronic structure calculations . Such calculations are often very expensive for large scale systems , and the number of large-scale samples is thus limited . 2 LONG-RANGE CONVOLUTIONAL LAYER . Convolutional layers are perhaps the most important building-block in machine learning , due to their great success in image processing and computer vision . A convolutional layer convolves the input , usually an array , with a rectangular mask containing the trainable parameters . When the mask can be kept small ( for example while extracting localized features ) , the convolution layer is highly efficient and effective . A different way for computing a convolution is to use the convolutional theorem as follows : ( 1 ) compute the Fourier transform of the input , ( 2 ) multiply with the Fourier transform of the mask , i.e.m the Fourier multiplier , and ( 3 ) inverse Fourier transform back . In this case , the trainable parameters are the DOFs of the Fourier multipliers and the Fourier transforms are computed using the fast Fourier transform ( FFT ) . This alternative approach is particularly attractive for smooth kernels with large support ( i.e. , smooth long-range interactions ) because the computational cost does not increase with the size of the mask . To the best of our knowledge , this direction has not been explored for LRIs and below we detail now to apply this to point clouds . Given a point cloud { xi } Ni=1 ⊂ Rd and scalar weights { fi } Ni=1 , we consider the problem of computing the quantity ui : = ∑N j=1 φθ ( xi − xj ) fj at each xi . Here the function φθ ( · ) is the kernel with a generic trainable parameter θ . At first glance the cost of this operation scales as O ( N2 ) : we need to evaluate ui for each point xi , which requiresO ( N ) work per evaluation . By introducing a generalized function f ( y ) = ∑ i fi · δ ( y − xi ) and defining a function u ( x ) = ∫ φθ ( x− y ) f ( y ) dy , one notices that ui is the value of u ( x ) at x = xi . The advantage of this viewpoint is that one can now invoke the connection between convolution and Fourier transform û ( k ) = φ̂θ ( k ) · f̂ ( k ) , ( 1 ) where φ̂θ ( k ) is a trainable Fourier multiplier . This approach is suitable for point clouds since the trainable parameters are decoupled from the geometry of the point cloud . To make this approach practical , one needs to address two issues : ( 1 ) the non-uniform distribution of the point cloud and ( 2 ) how to represent the multiplier φ̂θ ( k ) . Non-uniform distribution of the point cloud Equation 1 suggests that one can compute the convolution directly using the convolution theorem , which typically relies on the FFT to obtain a low-complexity algorithm . Unfortunately , { xi } Ni=1 do not form a regular grid , thus FFT can not be directly used . We overcome this difficulty by invoking the NUFFT1 ( Dutt & Rokhlin , 1993 ) , which serves as the corner-stone of our instance of the LRC-layer2 . 1See Appendix C.2 for further details . 2We point out , that one could in practice use an fast summation algorithm , such as the fast multipole method ( FMM ) introduced by Greengard & Rokhlin ( 1987 ) , to evaluate ui . This would results in the same complexity if Algorithm 1 Long-range convolutional layer Input : { xi } Ni=1 , { fi } Ni=1 Output : { xi } Ni=1 , { ui } Ni=1 , where ui = ∑N j=1 fjφθ ( xi − xj ) . 1 : Define the generalized function : f ( x ) = ∑N j=1 fjδ ( x− xj ) 2 : Mollify the Dirac deltas : fτ ( x ) = ∑N j=1 fjgτ ( x− xj ) , where gτ is defined in Appendix C.2 3 : Sample in a regular grid : fτ ( x ` ) = ∑N j=1 gτ ( x ` − xj ) for x ` in grid of size LFFT in each dim 4 : Compute FFT : Fτ ( k ) = FFT ( fτ ) ( k ) 5 : Re-scale the signal : F ( k ) = √ π τ e k2τFτ ( k ) 6 : Multiply by Fourier multipliers : v̂ ( k ) = φ̂θ ( k ) · F ( k ) 7 : Re-scale the signal : v̂−τ ( k ) = √ π τ e k2τ v̂ ( k ) 8 : Compute IFFT : u−τ ( x ` ) = IFFT ( v̂−τ ) ( x ) for x ` on the regular grid 9 : Interpolate to the point cloud : ui = u ( xi ) = u−τ ∗ gτ ( xi ) The LRC-layer is summarized in Alg . 1 , where τ is chosen following Dutt & Rokhlin ( 1993 ) . The inputs of this layer are the point cloud { xi } Ni=1 and the corresponding weights { fi } Ni=1 . The outputs are ui ≡ u ( xi ) for i = 1 , ... , N . The number of elements in the underlying grid NFFT = LdFFT is chosen such that the kernel is adequately sampled and the complexity remains low . As shown in Appendix C.5 , one only needs a relatively small LFFT . Even though the precise number is problemspecific , given that the goal is to approximate LRIs that are supposedly smooth , it can be captured with a relatively small number of Fourier modes . The LRC-layer is composed of three steps : ( 1 ) It computes the Fourier transform from the point cloud to a regular grid using the NUFFT algorithm ( lines 2− 5 in Alg . 1 and showcased in Fig . 2 ) . ( 2 ) It multiplies the result by a set of trainable Fourier multipliers ( line 6 in Alg . 1 ) . ( 3 ) It computes the inverse Fourier transform from the regular grid back to the point cloud ( lines 7− 9 in Alg . 1 ) . Within the LRC-layer in Alg . 1 , the only trainable component is the parameter θ of the Fourier multiplier φ̂θ ( k ) . The remaining components , including the mollifier gτ ( · ) and the Cartesian grid size , are taken to be fixed . One can , in principle , train them as well , but it comes with a much higher cost . Among the steps of Alg . 1 , the sampling operator , the rescaling operator , the interpolation operator , and the Fourier transforms , are all linear and non-trainable . Therefore , derivative computations of backpropagation just go through them directly . Alg . 1 is presented in terms of only one single channel or feature dimension , i.e. , fj ∈ R and ui ∈ R. However , it can be easily generalized to multiple channels , for example fj ∈ Rd1 and ui ∈ Rd2 . In this case , the Fourier multiplier φ̂θ ( k ) at each point k is a d2 × d1 matrix , and all Fourier transforms are applied component-wise . Representation of the Fourier multiplier A useful feature of the LRC-layer is that it is quite easy to impose symmetries on the Fourier multipliers . For example , if the convolution kernel φθ ( · ) is constrained to have parity symmetry , rotational symmetry , smoothness or decay properties , these constraints can be imposed accordingly on the coefficients of the Fourier multipliers φ̂θ ( k ) . When the size of the training data is limited , it is often necessary to reduce the number of trainable parameters in order to regularize the kernel . For example , we may parameterize the Fourier multiplier as a linear combination of several predetermined functions on the Fourier grid . This is the procedure used in molecular modeling ( Grisafi & Ceriotti , 2019 ; Yao et al. , 2018 ; Ko et al. , 2009 ) , and also in our numerical examples in equation 7 . We also remark that the LRC-layer described here can be applied to point clouds a way similar to a standard convolution layer applied to images and multiple LRC-layers can be composed on top of each other . the kernel is fixed . However , in order for the kernel to be trainable , this would require a different algorithm for each iteration , including the computation of the derivatives , thus increasing the computational cost and rendering the implementation significantly more cumbersome . Under review as a conference paper at ICLR 2021 < latexit sha1_base64= '' CzgOsCb5dn9rKCMHR0qbPmNYaK8= '' > AAAB6HicbVBNS8NAEJ3Ur1q/qh69LBbBU0lEsceCF48t2A9oQ9lsJ+3azSbsboQS+gu8eFDEqz/Jm//GbZuDtj4YeLw3w8y8IBFcG9f9dgobm1vbO8Xd0t7+weFR+fikreNUMWyxWMSqG1CNgktsGW4EdhOFNAoEdoLJ3dzvPKHSPJYPZpqgH9GR5CFn1FipGQ7KFbfqLkDWiZeTCuRoDMpf/WHM0gilYYJq3fPcxPgZVYYzgbNSP9WYUDahI+xZKmmE2s8Wh87IhVWGJIyVLWnIQv09kdFI62kU2M6ImrFe9ebif14vNWHNz7hMUoOSLReFqSAmJvOvyZArZEZMLaFMcXsrYWOqKDM2m5INwVt9eZ20r6redfWmeV2p1/I4inAG53AJHtxCHe6hAS1ggPAMr/DmPDovzrvzsWwtOPnMKfyB8/kDyoeM6A== < /latexit > < latexit sha1_base64= '' cf2V4AnIhRim/3JeHlwyQomsm9U= '' > AAAB6HicbVDLTgJBEOzFF+IL9ehlIjHxRHYNRo4kXjxCIo8ENmR26IWR2dnNzKyREL7AiweN8eonefNvHGAPClbSSaWqO91dQSK4Nq777eQ2Nre2d/K7hb39g8Oj4vFJS8epYthksYhVJ6AaBZfYNNwI7CQKaRQIbAfj27nffkSleSzvzSRBP6JDyUPOqLFS46lfLLlldwGyTryMlCBDvV/86g1ilkYoDRNU667nJsafUmU4Ezgr9FKNCWVjOsSupZJGqP3p4tAZubDKgISxsiUNWai/J6Y00noSBbYzomakV725+J/XTU1Y9adcJqlByZaLwlQQE5P512TAFTIjJpZQpri9lbARVZQZm03BhuCtvrxOWldlr1K+blRKtWoWRx7O4BwuwYMbqMEd1KEJDBCe4RXenAfnxXl3PpatOSebOYU/cD5/AOXPjPo= < /latexit > < latexit sha1_base64= '' 9sT+zsi99ZHLmWbkwsJA3sBXKbw= '' > AAACHHicbVDLSgMxFM34rPU16tJNsAgVpMxoxW6EghtXUsE+oFNLJs20oZkHyR2xDPMhbvwVNy4UceNC8G/MtF1o64VwDufcy809biS4Asv6NhYWl5ZXVnNr+fWNza1tc2e3ocJYUlanoQhlyyWKCR6wOnAQrBVJRnxXsKY7vMz85j2TiofBLYwi1vFJP+AepwS01DVPHcE8cJIxFL1uwtNj/JCBI3l/AEcTcFItXdjpXXKd5rtmwSpZ48LzxJ6SAppWrWt+Or2Qxj4LgAqiVNu2IugkRAKngqV5J1YsInRI+qytaUB8pjrJ+LgUH2qlh71Q6hcAHqu/JxLiKzXyXd3pExioWS8T//PaMXiVTsKDKAYW0MkiLxYYQpwlhXtcMgpipAmhkuu/YjogklDQeWYh2LMnz5PGSckul85uyoVqZRpHDu2jA1RENjpHVXSFaqiOKHpEz+gVvRlPxovxbnxMWheM6cwe+lPG1w9426Iw < /latexit > < latexit sha1_base64= '' OigvCa5o4zDt9IMj06BI+xVCTFQ= '' > AAACGnicbVDLSgMxFM3UV62vUZdugkVoF5YZqdhNoeDGlVSwD2jHIZNm2rSZB0lGWob5Djf+ihsXirgTN/6NaTuIth4IHM45l5t7nJBRIQ3jS8usrK6tb2Q3c1vbO7t7+v5BUwQRx6SBAxbwtoMEYdQnDUklI+2QE+Q5jLSc0eXUb90TLmjg38pJSCwP9X3qUoykkmzddO24K1GUFMZFWIVdEXl2PKyayV18nUDXHsL+T+AUju1h0dbzRsmYAS4TMyV5kKJu6x/dXoAjj/gSMyRExzRCacWIS4oZSXLdSJAQ4RHqk46iPvKIsOLZaQk8UUoPugFXz5dwpv6eiJEnxMRzVNJDciAWvan4n9eJpFuxYuqHkSQ+ni9yIwZlAKc9wR7lBEs2UQRhTtVfIR4gjrBUbeZUCebiycukeVYyy6Xzm3K+VknryIIjcAwKwAQXoAauQB00AAYP4Am8gFftUXvW3rT3eTSjpTOH4A+0z2+P5Z/q < /latexit > < latexit sha1_base64= '' xBA9/PTg3eHQ5avpSkVxfJfaLOc= '' > AAACJXicbVDLSgMxFM3UV62vUZdugkVoF5YZqdiFhYIbV1LBPqAzDpk006bNPEgy0jLMz7jxV9y4sIjgyl8xfSy09UDgcM653NzjRowKaRhfWmZtfWNzK7ud29nd2z/QD4+aIow5Jg0cspC3XSQIowFpSCoZaUecIN9lpOUOb6Z+64lwQcPgQY4jYvuoF1CPYiSV5OjXnpNYEsVpYaQIYSwtwiq0ROw7yaBqpo/JXQp7yxl4DkfOoOjoeaNkzABXibkgebBA3dEnVjfEsU8CiRkSomMakbQTxCXFjKQ5KxYkQniIeqSjaIB8IuxkdmUKz5TShV7I1QsknKm/JxLkCzH2XZX0keyLZW8q/ud1YulV7IQGUSxJgOeLvJhBGcJpZbBLOcGSjRVBmFP1V4j7iCMsVbE5VYK5fPIqaV6UzHLp8r6cr1UWdWTBCTgFBWCCK1ADt6AOGgCDZ/AK3sFEe9HetA/tcx7NaIuZY/AH2vcPOzWlCQ== < /latexit > < latexit sha1_base64= '' 0Pdhr03PRt6u7uFQmsGCy911yOY= '' > AAACFXicbVDLSgMxFM3UV62vqks3wSK0IGVGKnYjFITiskJf0JYhk2ba0MyD5I5YhvkJN/6KGxeKuBXc+Tdm2i609UDC4ZxzSe5xQsEVmOa3kVlb39jcym7ndnb39g/yh0dtFUSSshYNRCC7DlFMcJ+1gINg3VAy4jmCdZzJTep37plUPPCbMA3ZwCMjn7ucEtCSnT+v230gUXFSwte4D+wB4tkNENfrzSQpunacBpKSjtj5glk2Z8CrxFqQAlqgYee/+sOARh7zgQqiVM8yQxjERAKngiW5fqRYSOiEjFhPU594TA3i2VYJPtPKELuB1McHPFN/T8TEU2rqOTrpERirZS8V//N6EbjVQcz9MALm0/lDbiQwBDitCA+5ZBTEVBNCJdd/xXRMJKGgi8zpEqzllVdJ+6JsVcqXd5VCrbqoI4tO0CkqIgtdoRq6RQ3UQhQ9omf0it6MJ+PFeDc+5tGMsZg5Rn9gfP4AXkueTw== < /latexit > < latexit sha1_base64= '' s7++NogcTuVwzYAFvVpPjIhc0y4= '' > AAACIHicbVDLSgMxFM34rPVVdekmWIS6KTNF0Y1QFIrLCrYVOrVk0kwbmnmY3BFKmE9x46+4caGI7vRrTNtZaOuBwMk595Dc48WCK7DtL2thcWl5ZTW3ll/f2NzaLuzsNlWUSMoaNBKRvPWIYoKHrAEcBLuNJSOBJ1jLG16O/dYDk4pH4Q2MYtYJSD/kPqcEjNQtnNZKw6NzV91L0K4vCdVuzFPtAknSFLM7PbzTlRRP7rjWnRom0i0U7bI9AZ4nTkaKKEO9W/h0exFNAhYCFUSptmPH0NFEAqeCpXk3USwmdEj6rG1oSAKmOnqyYIoPjdLDfiTNCQFP1N8JTQKlRoFnJgMCAzXrjcX/vHYC/llH8zBOgIV0+pCfCAwRHreFe1wyCmJkCKGSm79iOiCmJjCd5k0JzuzK86RZKTvH5ZPr42L1Iqsjh/bRASohB52iKrpCddRAFD2iZ/SK3qwn68V6tz6mowtWltlDf2B9/wBJ3KOs < /latexit >
The paper proposes an efficient long-range convolution method for point clouds by using the non-uniform Fourier transform. The long-range convolutional (LRC)-layer mollifies the point cloud to an adequately sized regular grid, computes its Fourier transform, multiplies the results by a set of trainable Fourier multipliers, computes the inverse Fourier transform, and finally interpolates the result back to the point cloud. The method is demonstrated to be effective by a N-body problem.
SP:6a0a4a33a8023f2bed39d64f92a054e494ecdb74
Counterfactual Self-Training
Unlike traditional supervised learning , in many settings only partial feedback is available . We may only observe outcomes for the chosen actions , but not the counterfactual outcomes associated with other alternatives . Such settings encompass a wide variety of applications including pricing , online marketing and precision medicine . A key challenge is that observational data are influenced by historical policies deployed in the system , yielding a biased data distribution . We approach this task as a domain adaptation problem and propose a self-training algorithm which imputes outcomes with finite discrete values for finite unseen actions in the observational data to simulate a randomized trial . We offer a theoretical motivation for this approach by providing an upper bound on the generalization error defined on a randomized trial under the self-training objective . We empirically demonstrate the effectiveness of the proposed algorithms on both synthetic and real datasets . 1 INTRODUCTION . Counterfactual inference ( Pearl et al. , 2000 ) attempts to address a question central to many applications - What would be the outcome had an alternative action was chosen ? It may be selecting relevant ads to engage with users in online marketing ( Li et al. , 2010 ) , determining prices that maximize profit in revenue management ( Bertsimas & Kallus , 2016 ) , or designing the most effective personalized treatment for a patient in precision medicine ( Xu et al. , 2016 ) . With observational data , we have access to past actions , their outcomes , and possibly some context , but in many cases not the complete knowledge of the historical policy which gave rise to the action ( Shalit et al. , 2017 ) . Consider a pricing setting in the form targeted promotion . We might record information of a customer ( context ) , promotion offered ( action ) and whether an item was purchased ( outcome ) , but we do not know why a particular promotion was selected . Unlike traditional supervised learning , we only observe feedback for the chosen action in observational data , but not the outcomes associated with other alternatives ( i.e. , in the pricing example , we do not observe what would occur if a different promotion was offered ) . In contrast to the gold standard of a randomized controlled trial , observational data are influenced by historical policy deployed in the system which may over or under represent certain actions , yielding a biased data distribution . A naive but widely used approach is to learn a machine learning algorithm directly from observational data and use it for prediction . This is often referred to as direct method ( DM ) ( Dudı́k et al. , 2014 ) . Failure to account for the bias introduced by historical policy often results in an algorithm which has high accuracy on the data it was trained on , but performs considerably worse under a different policy . For example in the pricing setting , if historically most customers who received high promotion offers bear a certain profile , then a model based on direct method may fail to produce reliable predictions on these customers when low offers are given . To overcome the limitations of direct method , Shalit et al . ( 2017 ) ; Johansson et al . ( 2016 ) ; Lopez et al . ( 2020 ) cast counterfactual learning as a domain adaptation problem , where the source domain is observational data and the target domain is a randomized trial whose assignment of actions follows a uniform distribution for a given context . The key idea is to map contextual features to an embedding space and jointly learn a representation that encourages similarity between these two domains , leading to better counterfactual inference . The embedding is generally learned by a neural network and the estimation of the domain gap is usually slow to compute . Update 𝑓 on target data . In this paper , while we also view counterfactual inference as a domain adaptation problem between observational data and an ideal randomized trial , we take a different approach - instead of estimating the domain gap between the two distributions via an embedding , we explicitly simulate a randomized trial by imputing pseudo-labels for the unobserved actions in the observational data . The optimization process is done by iteratively updating the pseudo-labels and a model that is trained on both the factual and the counterfactual data , as illustrated in Figure 1 . As this method works in a selfsupervised fashion ( Zou et al. , 2018 ; Amini & Gallinari , 2002 ) , we refer to our proposed framework as Counterfactual Self-Training ( CST ) . The contribution of our paper is as follows . First , we propose a novel self-training algorithm for counterfactual inference . To the best of our knowledge , this is the first application of self-training algorithm for learning from observational data . Moreover , in contrast to the existing methods from domain adaption on counterfactual inference , CST is flexible and can work with a wide range of machine learning algorithms , not limited to neural networks . Second , we offer a theoretical motivation of our approach by providing an upper bound on the generalization error defined on a randomized trial under the self-training objective . In other words , we show that the counterfactual self-training algorithm helps minimizing the risk on the target domain . Our theoretical bounds suggest generating pseudo-labels with random imputation , which is a methodological departure from traditional self-training algorithms which impute hard labels . Third , we present comprehensive experiments on several synthetic datasets and three counterfactual learning datasets converted from multi-label classification tasks to evaluate our method against state-of-the-art baselines . In all experiments , CST shows competitive or superior performance against all the baselines . Moreover , our algorithm is easy to optimize with a much faster training time than other baselines . 2 RELATED WORK . Counterfactual policy optimization has received a lot of attention in the machine learning community in the recent years ( Swaminathan & Joachims , 2015a ; Joachims et al. , 2018 ; Shalit et al. , 2017 ; Lopez et al. , 2020 ; Kallus , 2019 ; Kallus & Zhou , 2018 ; Wang et al. , 2019 ) . Most of the proposed algorithms can be divided into two categories : counterfactual risk minimization ( CRM ) and direct method ( DM ) . Both can be used together to construct doubly robust estimators ( Dudı́k et al. , 2014 ) to further improve efficiency . CRM , also known as off-policy learning or batch learning from bandit feedback , typically utilizes inverse propensity weighting ( IPW ) ( Rosenbaum , 1987 ; Rosenbaum & Rubin , 1983 ) to account for the bias in the data . Swaminathan & Joachims ( 2015a ) introduces the CRM principle with a variance regularization term derived from an empirical Bernstein bound ( Maurer & Pontil , 2009 ) for finite samples . In order to reduce the variance of the IPW estimator , Swaminathan & Joachims ( 2015b ) proposes a self-normalized estimator , while BanditNet ( Joachims et al. , 2018 ) utilizes the baseline technique ( Greensmith et al. , 2004 ) in deep nets . As pointed out by Lefortier et al . ( 2016 ) , CRM-based methods tend to struggle with medium to large action spaces in practice . Morever , CRM-based methods generally require a known and stochastic logging policy , along with full support on the action space . When either one of the requirements is violated , Sachdeva et al . ( 2020 ) ; Kang et al . ( 2007 ) observe direct method often demonstrates a more robust performance . When the logging policy is not available , the counterfactual learning problem is often referred to as learning from observational data , which is the setting we focus on . In addition to select the optimal actions , direct method can also be used to identify causal treatment effect ( Künzel et al. , 2019 ) , CST can be viewed as an extention to direct method . Learning from observational data is also closely related to estimating Individualized Treatment Effects ( ITE ) ( Shpitser & Pearl , 2012 ) or conditional average treatment effect ( CATE ) , which is defined as the difference of expected outcomes between two actions , with respect to a given context . The main challenge of identifying ITE is that unlike an ideal randomized trial , observational data is biased and we do not have the access to the counterfactuals . Hill ( 2011 ) uses a bayesian nonparametric algorithm to address this issue . Yoon et al . ( 2018 ) proposes using generative adversarial nets to capture the uncertainty in the counterfactual distributions to facilitate ITE estimation . Johansson et al . ( 2016 ) ; Shalit et al . ( 2017 ) approach counterfactual inference with representation learning and domain adaptation . Their key idea is to learn a representation between observational data and a randomized trial that encourages better generalization on all possible actions . It is achieved by minimizing a weighted sum of the factual loss on the observational data ( loss for direct method ) plus an estimated domain gap measured by integral probability metrics . Lopez et al . ( 2020 ) further extends this framework to multiple treatments using Hilbert-Schmidt Independence Criterion ( HSIC ) ( Gretton et al. , 2008 ) and achieves state-of-the-art performance . The HSIC proposed in Lopez et al . ( 2020 ) has a computation time of at least O ( N2 ) , making its training process slow . While the aforementioned methods and our approach can be viewed as extensions to direct method , we tackle the domain adaptation problem differently by explicitly augmenting the observational data to create a simulated randomized trial via self-training . Different counterfactual estimation algorithms are classified as X- , T- , S-learner in Künzel et al . ( 2019 ) , for example Hill ( 2011 ) is an instance of S-learner . Our approach is similar to X-learner which uses pseudo-label to create counterfactuals , but CST considers multiple instead of binary actions and is trained in an iterative fashion . Self-training algorithms have been widely studied in semi-supervised learning and domain adaptation problems ( Nigam et al. , 2000 ; Amini & Gallinari , 2002 ; Grandvalet & Bengio , 2005 ; Zou et al. , 2019 ; Han et al. , 2019 ) . Grandvalet & Bengio ( 2005 ) proposes to use entropy regularization for semi-supervised learning as a class-overlapping measure to utilize unlabeled data . Nigam et al . ( 2000 ) ; Amini & Gallinari ( 2002 ) ; Zou et al . ( 2019 ) formulate the pseudo-label imputation as classification EM algorithm and show its convergence under proper initialization . Han et al . ( 2019 ) points out that pseudo-label imputation can be viewed as minimizing min-entropy as a type of Rényi entropy 11−α log ( ∑n i=1 p α i ) when α→∞ , and Shannon entropy in Grandvalet & Bengio ( 2005 ) is the case when α → 1 . Self-training is also shown to be effective in semi-supervised learning for many other machine learning models besides neural networks ( Tanha et al. , 2017 ; Li et al. , 2008 ) . It is worthy to mention that unlike traditional self-training where the target domain is given by the problem , we propose to construct a target domain by imputing pseudo-labels on all unseen actions to simulate a pseudo-randomized trial . Moreover , instead of hard labels used in traditional self-training , we propose to use random imputation to create pseudo-labels which have a theoretical motivation tailored for counterfactual inference and are shown to be more effective based on the experiments results .
The paper proposes to use self-training to tackle the fundamental problem of causal inference where only one potential outcome is seen. The proposed self-training method is iterative: after training a model on the observational dataset, they run points with different actions (treatments) through the trained model and collect the predictions, which are the pseudo-labels. They then continue the training of the model, including the pseudo-labels, until convergence. The paper experiments with two versions of the method -- one with deterministic pseudo-labels (CST-AI) and another with soft pseudo-labels sampled from a probability distribution (CST-RI). It is assumed that there are no unobserved confounders.
SP:23db11b6d3d07a1820fd393c16e447f1716a17ca
An Empirical Exploration of Open-Set Recognition via Lightweight Statistical Pipelines
1 INTRODUCTION . Embodied perception and autonomy require systems to be self-aware and reliably know their unknowns . This requirement is often formulated as the open set recognition problem ( Scheirer et al. , 2012 ) , meaning that the system , e.g. , a K-way classification model , should recognize anomalous examples that do not belong to one of K closed-world classes . This is a significant challenge for machine-learned systems that notoriously over-generalize to anomalies and unknowns on which they should instead raise a warning flag ( Amodei et al. , 2016 ) . Open-world benchmarks : Curating open-world benchmarks is hard ( Liu et al. , 2019 ) . One common strategy re-purposes existing classification datasets into closed vs open examples – e.g. , declaring MNIST digits 0-5 as closed and 6-9 as open ( Neal et al. , 2018 ; Oza & Patel , 2019 ; Geng et al. , 2020 ) . In contrast , anomaly/out-of-distribution ( OOD ) benchmarks usually generate anomalous samples by adding examples from different datasets - e.g. , declaring CIFAR as anomalous for MNIST ( Ge et al. , 2017 ; Oza & Patel , 2019 ; Liu et al. , 2019 ) . Most open-world protocols assume open-world data is not available during training ( Liang et al. , 2018 ; Oza & Patel , 2019 ) . Interestingly , Dhamija et al . ( 2018 ) ; Hendrycks et al . ( 2019b ) find that , if some open examples are available during training , one can learn simple open-vs-closed binary classifiers that are remarkably effective . However , Shafaei et al . ( 2019 ) comprehensively compare various well-known open-world methods through rigorous experiments , and empirically show that none of the compared methods generalize to high-dimensional open-world images . Intuitively , classifiers can easily overfit to the available set of open-world images , which won ’ t likely exhaustively span the open world outside the K classes of interest . In this paper , we carry out a rigorous empirical exploration of open-set recognition of highdimensionial images . We explore simple statistical models such as Nearest Class Means ( NCMs ) , kmeans and Gaussian Mixture Models ( GMMs ) . Our hypothesis is that such classic statistical methods can reliably model the closed-world distribution ( through the closed-world training data ) , and help avoid overfitting ( an issue in open-vs-closed classifiers ) . Traditionally , such simple models have been used to address the open-world ( Chandola et al. , 2009 ; Geng et al. , 2020 ) , but are largely neglected in the recent literature . We revisit these simple methods , and find them quite effective once crucial techniques are considered , as summarized by contributions below . Contribution 1 : We build classic statistical models on top of off-the-shelf ( OTS ) features computed by the underlying K-way classification network . We find it crucial to use OTS features that have been pre-trained and post-processed appropriately ( discussed further below ) . Armed with such features , we find classic statistical models such as kmeans and GMMs ( Murphy , 2012 ) can outperform prior work . We describe two core technical insights below . Insight-1 Pre-training networks ( e.g. , on ImageNet ( Deng et al. , 2009 ) ) is a common practice for traditional closed-world tasks . However , to the best of our knowledge , open-world methods do not sufficiently exploit pre-training ( Oza & Patel , 2019 ) . Hendrycks et al . ( 2019a ) report that pre-training improves anomaly detection using softmax confidence thresholding ( Hendrycks & Gimpel , 2017 ) . We find pretraining to be a crucial factor in learning better representations that support more sophisticated open-world reasoning . Intuitively , pre-trained networks expose themselves to diverse data that may look similar to open-world examples encountered at test-time . We operationalize this intuition by building statistical models on top of existing discriminative networks , which tend to make use of pre-training by design . We demonstrate this significantly outperforms features trained from scratch , as most prior open-set work does . Insight-2 Low-dimensional normalized features . While some existing open-world methods also exploit OTS features ( Lee et al. , 2018 ) , we find it crucial to make use of insufficiently well-known best practices for feature extraction . Specifically , to reduce dimensionality , we pool spatially ( Gong et al. , 2014 ) and use principle component analysis ( PCA ) ( Turk & Pentland , 1991 ) . Then , to ensure features are invariant to scalings , we adopt L2 normalization ( Gong et al. , 2014 ; Gordo et al. , 2017 ) . While these are somewhat standard practices for deep feature extraction in areas such as retrieval , their combination is not well explored in the open-set literature ( Bendale & Boult , 2016 ; Grathwohl et al. , 2019 ) . Given a particular OTS K-way classification network , we determine the “ right ” feature processing through validation . In particular , we find that L2-normalization greatly boosts open-world recognition performance ; spatial pooling and PCA altogether reduce feature dimension by three orders of magnitude without degrading performance , resulting in a lightweight pipeline . Contribution 2 : We re ( introduce ) the problem of open-set semantic segmentation . Interestingly , classic benchmarks explicitly evaluate background pixels outside the set of K classes of interest ( Everingham et al. , 2015 ) . However , contemporary benchmarks such as Cityscapes ( Cordts et al. , 2016 ) ignore such pixels during evaluation . As a result , most contemporary segmentation networks also ignore such pixels during training . Perhaps surprisingly , such ignored pixels include vulnerable objects like strollers and wheelchairs . Misclassifying such objects may have serious implications for real-world autonomous systems ( see Figure 1 ) . Instead of ignoring these pixels , we use them to explore open-world recognition by repurposing them as open-world examples . Interestingly , this setup naturally allows for open-pixels in the train-set , a protocol advocated by ( Dhamija et al. , 2018 ; Hendrycks et al. , 2019b ) . We benchmark various open-world methods on this setup , and show that our suggested simple statistical models still outperform typical open-world methods . Similar to past work , we also find that simple open-vs-closed binary classifiers serve as strong baselines , provided one has enough training examples of open pixels that span the open-world . 2 RELATED WORK . Open-set recognition . There are multiple lines of work addressing the open-world problems in the context of K-way classification , such as anomaly/out-of-distribution detection ( Chandola et al. , 2009 ; Zong et al. , 2018 ; Hendrycks et al. , 2019b ) , novelty/outlier detection ( Pidhorskyi et al. , 2018 ) . Defined on K-way classification , these problems can be crisply formulated as open-set recognition ( Scheirer et al. , 2012 ; Bendale & Boult , 2016 ; Lee et al. , 2018 ; Geng et al. , 2020 ) . Given a testing example , these methods compute the likelihood that it belongs to the open-world via post-hoc functions like density estimation ( Zong et al. , 2018 ) , uncertainty modeling ( Gal & Ghahramani , 2016 ; Liang et al. , 2018 ; Kendall & Gal , 2017 ) and reconstruction error of the testing example ( Pidhorskyi et al. , 2018 ; Dehaene et al. , 2020 ) . Different from the above sophisticated methods , we train simple statistical models ( e.g. , GMM ) which can work much better by following our proposed pipeline . Feature extraction . Off-the-shelf ( OTS ) features can be extracted from the discriminative network and act as powerful embeddings ( Donahue et al. , 2014 ) . Using OTS features for open-set recognition has been explored in prior work ( Oza & Patel , 2019 ; Grathwohl et al. , 2019 ; Lee et al. , 2018 ) . OTS features can be logits , softmax and other intermediate feature activations computed by the discriminative network . Early open-set methods modify the softmax ( Hendrycks & Gimpel , 2017 ; Bendale & Boult , 2016 ) . Grathwohl et al . ( 2019 ) learn an energy-based model over the logit features for anomaly detection . Oza & Patel ( 2019 ) reconstruct input images from penultimate-layer features and use the reconstruction error as the open-set likelihood . Most related to our work is Lee et al . ( 2018 ) , who build Gaussian models over OTS features for anomaly detection , but relies on input image perturbation for better open-set classification performance . In contrast , we study even simpler statistical models such as kmeans and GMM , and show that proper feature processing ( via L2-normalization and PCA ) greatly boosts the efficacy and efficiency of open-set recognition . 3 OPEN-SET RECOGNITION VIA LIGHTWEIGHT STATISTICAL PIPELINES . In this section , we discuss various design choices in our pipeline , including ( 1 ) training schemes for the underlying closed-world task , ( 2 ) methods for extracting and repurposing closed-world feature descriptors for open-world recognition , and ( 3 ) the statistical density estimation models built on such extracted features . We conclude with ( 4 ) an analysis of the additional compute required for self-aware processing ( via the addition of an open-world `` head '' on top of the closed-world network ) , pointing out that minimal additional processing is needed . 1 . Network training strategies . Virtually all state-of-the-art deep classifiers make use of large-scale pre-training , e.g. , on ImageNet ( Deng et al. , 2009 ) , which seems to consistently improve towards the state-of-the-art performance on the closed-world data ( Sun et al. , 2017 ; Mahajan et al. , 2018 ) . However , many , if not all , open-world methods trains the discriminant network purely on the closedworld data without pre-training ( Oza & Patel , 2019 ; Hendrycks & Gimpel , 2017 ) . We argue that a pre-trained network also serves as an abstraction of the ( pseudo ) open world . Intuitively , such a pre-trained model has already seen diverse data that may look similar to the open-world examples that will be encountered at test-time , particularly if ImageNet does not look similar to the ( closed ) training set for the task of interest . Recently , Hendrycks et al . ( 2019a ) show that pre-training improves open-world robustness with a simplistic method that thresholds softmax confidence ( Hendrycks & Gimpel , 2017 ) . Our diagnostic study shows that our explored statistical models , as well as prior methods , do perform much better when built on a pre-trained network than a network trained from scratch ! 2 . Feature extraction . OTS features generated at different layers of the trained discriminative model can be repurposed for open-set recognition ( Lee et al. , 2018 ) . Most methods leverage softmax ( Hendrycks & Gimpel , 2017 ) and logits ( Bendale & Boult , 2016 ; Grathwohl et al. , 2019 ) which can be thought of as features extracted at top layers . Similar to ( Lee et al. , 2018 ) , we find it crucial to analyze features from intermediate layers for open-set recognition , for which logits and softmax may be too invariant to be effective for open-set recognition ( see Figure 3 ) . One immediate challenge to extract features from an intermediate layer is their high dimensionality , e.g. , of size 512x7x7 from ResNet18 ( He et al. , 2016 ) . To reduce feature dimension , we simply ( max or average ) pool the feature activations spatially into a 512-dim feature vectors ( Yang & Ramanan , 2015 ) . We further use PCA , which can reduce dimension by 10× ( from 512-dim to 50-dim ) without sacrificing performance . We find this dimensionality particularly important for learning second-order covariance statistics as in GMMs , described below . Finally , following ( Gong et al. , 2014 ; Gordo et al. , 2017 ) , we find it crucial to L2-normalize extracted features ( see Figure 2 ) . 3 . Statistical models . Given the above extracted features , we can learn various generative statistical models to capture the confidence/probability that a test example belongs to the closed-world distribution . We explore simple parametric models such as Nearest Class Means ( NCMs ) ( Mensink et al. , 2013 ) and class-conditional Gaussian models ( Lee et al. , 2018 ; Grathwohl et al. , 2019 ) , as well as non-parametric models such has nearest neighbors ( NN ) ( Boiman et al. , 2008 ; Júnior et al. , 2017 ) . We finally explore an intermediate regime of mixture models , including ( class-conditional ) GMMs and kmeans ( Chandola et al. , 2009 ; ? ; Cao et al. , 2016 ; Geng et al. , 2020 ) . Our models label a test example as open-world when the inverse probability ( e.g. , of the most-likely class-conditional GMMs ) or distance ( e.g. , to the closest class centroid ) is above a threshold . One benefit of such simple statistical models is that they are interpretable and relatively easier to diagnose failures . For example , one failure mode is an open-world sample being misclassified as a closed-world class . This happens when open-world data lie close to a class-centroid or Gaussian component mean ( see Figure 3-left ) . Note that a single statistical model may have several hyperparameters – GMMs can have multiple Gaussian components and different structures of second-order covariance , e.g. , either a single scalar , a vector or a full-rank general covariance per component , as denoted by “ spherical ” , “ diag ” and “ full ” , respectively . We make use of a validation set to determine the hyperparameters ( as well as feature processing steps listed above ) . 4 . Lightweight Pipeline . We re-iterate that the above feature extraction and statistical models result in a lightweight pipeline for open-set recognition . We now analyze the number of additional parameters in our pipeline . Naively learning a GMM over features from the last convolutional layer result in massive second-order statistics , on the order of ( 512× 7× 7 ) 2 for a 512x7x7 Res18 feature map . We find that spatial pooling and PCA can reduce dimensionality to 50 , which requires only 502 covariance parameters ( a reduction of 105 ) . We find linear dimensionality reduction more effective than sparse covariance matrices ( e.g. , assuming diagonal structure ) . The appendix includes additional experiments . Given a class-conditional five-component GMM ( the largest found to be effective through cross validation ) , this requires 128KB storage per class , or 594KB for all 19 classes in Cityscapes . This is less than 0.1 % of the compute of the underlying closed-world network ( e.g. , HRNet at 250 MB ) , making it a quite practical addition that enables self-aware processing on real-time autonomy stacks .
of Paper: The main claim of the paper is that out of distribution (OOD) detection can be done by use of pre-training and appropriately deriving a feature space from SOTA activations via pooling, PCA based dimensionality reduction, L2 normalization. Classical methods such as GMMs, k-means etc. can then be used to estimate the probability density function of features for use in OOD detection. Several alternative schemes are compared against many OOD detection schemes.
SP:4b0b0b58ac822beb29097ed55dfe44128530d5ed
ChemistryQA: A Complex Question Answering Dataset from Chemistry
1 INTRODUCTION . Recent years have witnessed huge advances for the question answering ( QA ) task , and some AI agents even beat human beings . For example , IBM Watson won Jeopardy for answering questions which requires a broad range of knowledge ( Ferrucci , 2012 ) . Transformer-based neural models , e.g . XLNet ( Yang et al. , 2019 ) and RoBERTa ( Liu et al. , 2019 ) , beat human beings on both machine reading comprehension and conversational QA task . Ariso System ( Clark et al. , 2019 ) gets an ’ Ace ’ for an eighth-grade science examination and is able to give 80 percent correct answers for 12th-grade science test . Most solutions of the QA task fall into two categories , end-to-end solution and parsing plus execution . The former predicts answers with an end-to-end neural network , e.g. , Reading comprehension QA ( Rajpurkar et al. , 2016 ; 2018 ; Lai et al. , 2017 ) and Science Exam QA ( Clark et al. , 2019 ; 2018 ) . The latter translates a question into a specific structural form which is executed to get the answer . For example , in knowledge-based question answering ( KBQA ) ( Berant et al. , 2013 ; Yih et al. , 2016 ; Saha et al. , 2018 ) questions are parsed into SPARQL-like queries consisting of predicates , entities and operators . In Math Word Problem ( Huang et al. , 2016 ; Amini et al. , 2019 ) questions are translated to stacks of math operators and quantities . However , in the real world , many QA tasks can not be solved by end-to-end neural networks and it is also very difficult to translate questions into any kind of formal representation . Solving Chemical Calculation Problems is such an example . Chemical Calculation Problems can not be solved by end-to-end neural networks since complex symbolic calculations are required . It is also difficult to translate such problems into formal representations , since not all operators in solving processes occur in question stems , which makes it difficult to annotate data and train models . Table 1 shows a question in ChemistryQA . To answer the question in Table 1 , machines need to : 1 ) understand the question and extract variable to be solved and conditions in the question ; 2 ) retrieve and apply related chemistry knowledge , including calculating molarity by mole and volume , balancing a chemical equation and calculating the equilibrium constant K , although there is no explicit statement for ” calculating molarity ” and ” balancing equations ” in the question . The combination of these capabilities is scarcely evaluated well by existing QA datasets . In order to foster the research on this area , we create a dataset of chemical calculation problems , namely ChemstriyQA . We collect about 4,500 chemical calculation problems from https : //socratic.org/ chemistry , covering more than 200 topics in chemistry . Besides the correct answer , we also label the target variable and conditions provided in a question . Such additional labels facilitate potential data augmentation and inferring golden solving process for training . To verify the dataset is consistent with the purpose of evaluating AI ’ comprehensive capability and help other researchers ramp up , we build two baselines as follows . a ) We build a BERT based sequence to sequence model , which take the raw question as input and the answer as output . The first baseline achieves 0.164 precision on ChemistryQA . b ) We create an extraction system which extracts the target variable and conditions from raw questions . The extracted structure information is fed into a graph searching based solver , which performs a sequence of calculating and reasoning to get the final answer . The second baseline achieves 0.169 precision on ChemistryQA . In summary , our contribution of this paper is shown as follows . • We propose a new QA task , ChemistryQA , which requires open knowledge and complex solving processes . ChemistryQA is different with other existing QA tasks , and can not be solved by existing QA methods very well . • We create a ChemistryQA dataset , which contains about 4,500 chemical calculation problems and covers more than 200 topics in chemistry . In this dataset , we provide a novel annotation for questions , which only labels the variable asked and conditions from question stem but not solving processes . This annotation is much easier and cost less effort , and it is flexible for researchers to explore various of solutions as a weakly supervised dataset . • We build two baselines to prove : a ) end-to-end neural networks can not solve this task very well ; b ) the annotation we provided can be used to improve a simple graph search based solver . 2 CHEMISTRYQA DATASET . 2.1 DATA COLLECTION . We collect chemical calculation problems from https : //socratic.org/chemistry . It this website , there are more than 30,000 questions which cover about 225 chemistry related topics , e.g. , Decomposition Reactions , Ideal Gas Law and The Periodic Table . There is an example of annotation page in Appendix A . Figure 2.A shows the original page in Socratic , which contains a raw question , an answer and probably a description of solving process . We filter raw questions by a simple rule , and only keep questions with a numerical value , a chemical formula or a chemical equation as answers . 2.2 DATA ANNOTATION . Unlike similar tasks ’ annotation , we can not collect all the atomic operations needed before starting annotation , since the set of chemical operators is not closed . Therefore , we propose a novel annotation method that only the target variable and all conditions will be labeled in a triple-like format . For instance in Figure 2 , the target variable is labeled as ( subject = reaction , predicate = Equilibrium constant K , object = ? ) , and one of conditions is labeled as ( subject = N2 , predicate = Mole , object = 2.80× 10−4 mol ) . Therefore , for a question in a link , parts to be annotated are question stems , correct answers , the target variable and all conditions . Figure 2.B shows our annotation page for a question link . For questions and answers , we ask annotators to copy them into corresponding forms . If there are typos or obvious mistakes , we also ask annotators to correct them . For the target variable and conditions , we break them down into several types : physical unit , chemical formula , chemical equation , substance name and other . We also design easy-to-understand annotation interfaces , e.g. , ( [ BLANK ( predicate ) ] OF [ BLANK ( subject ) ] IN [ BLANK ( unit or None ) ] ) and ( [ BLANK ( predicate ) ] OF [ BLANK ( subject ) ] = [ BLANK ( object or value ) ] ) for tagging the physical unit from the raw question as variables and conditions , respectively . More detail about other types ’ definitions and annotation interfaces are shown in Appendix A . We employed crowdsourcing for this annotation work . The task was split into 6 batches and assigned to annotators sequentially . We applied some check-and-verify mechanism in first batch to ensure the annotation quality , also help annotators be more familiar with this task . Finally , we have collected 4418 annotated questions within around 336 hours . During the annotating phase , we encourage annotators to use text phrase in original questions whenever possible for chemical formula , chemical equation , substance name , subject and value in physical unit , while for predicates and units , we do not make any restrictions . We maintain two dynamic mappings to convert mentions labeled to identified predicates or unites , which greatly reduces the difficulty of labeling and the total annotation time . For other , there is not any restrictions either , and we only consume identified ones , e.g. , STP . 2.3 DATA ANALYSIS . We divide annotated questions into train , valid and test subsets , and their sizes are 3433 , 485 and 500 , respectively . We make some statistics on the annotated questions in different perspectives as follows . 1 ) According to the types of target variables , we divide questions into 3 classes , physical unit , chemical formula , chemical equation . Table 2 shows examples belonging to different question types , and Table 3 shows the distribution of question types . 2 ) There are 172 unique predicates , 90 unique units and 25 identified other conditions . We conducted detailed statistics on them in Appendix B , 2.4 COMPARING WITH OTHER QA DATASETS . We pick a representative dataset from each type of task to compare with ChemistryQA , including WEBQUESTIONS ( Berant et al. , 2013 ) , RACE ( Lai et al. , 2017 ) , ARC ( Clark et al. , 2018 ) and MathQA ( Amini et al. , 2019 ) . We compare these QA datasets in Answer Type , External Knowledge , Knowledge usage , Calculation and Annotation perspectives , and Table 4 shows the detail . Comparing ChemistryQA with existing QA datasets , ChemistryQA has the following advantages : 1 ) ChemistryQA contains more diverse answer types and excludes the influence of randomness by not providing options . 2 ) There are various knowledge required by ChemistryQA including a ) triplet-like fact , e.g. , substances ’ molar mass , colour and other physical properties , b ) calculation methods between various physical quantities and c ) domain specific skills , e.g. , balancing chemical equations . The knowledge in ChemsitryQA is open and used in various ways , while other datasets use knowledge in single way . 3 ) ChemistryQA only provides triplet like extraction annotation which isolates language understanding and domain knowledge as much as possible . This setting makes annotation and model training easier . 3 METHODS . We provide two completely different baselines : 1 ) an end-to-end neural based solver and 2 ) a solving pipeline composed of an extractor and a graph search based solver . 3.1 END TO END SOLVER . We build a sequence to sequence model , and both of its encoder and decoder are based on BERT model . Both encoder and decoder load from pretrained BERT and share the same vocabulary , more than 30,000 sub-tokens from BERT . To build the decoder , we change the encoder ’ s structure as Vaswani et al . ( 2017 ) did : 1 ) the self-attention of decoder has a triangular mask matrix and 2 ) there is an extra layer of attention performing over outputs of the encoder and hidden states of the decoder . We also append a head of predicting next token to the decoder , which maps hidden states into the vocabulary size space Rv and follows a softmax layer behind it . The end-to-end solver takes the question as the input of encoder and takes the answer as the target of decoder . Questions are split into sub-tokens , and even real numbers also break into sub-tokens . We greedily choose the next token with maximum score after softmax . We append a special token , ’ [ SEP ] ’ , as the end of the target sequence . During inference , the decoding process ends when the decoder outputs ’ [ SEP ] ’ token.This method represents a class of powerful neural networks , which achieved state-of-the-art performance on many QA tasks . 3.2 EXTRACTOR PLUS GRAPH SEARCH BASED SOLVER . As the second baseline , we build an extractor plus solver pipeline . First , we employ the extractor to extract the target variable and conditions from the question text . The target variable and conditions are represented as triplets as described in the above Data Annotation Section . Second , we employ a graph search based solver to take triplets as input and execute pre-defined functions in chemistry domain to get the final answer . Figure 1 shows the structure of the extractor plus solver pipeline .
This paper proposes a new dataset based on textbook / classroom chemistry questions for complex knowledge retrieval and aggregation. The authors scrape several thousands questions from online repositories and add additional natural language annotations signifying the quantities to be solved for in each question, as well as the declarative knowledge. Two baselines, one end-to-end neural and another symbolic, both fail at this dataset.
SP:5fc35f794bdf1281225c24a5096547e75904a2d0
Sufficient and Disentangled Representation Learning
1 INTRODUCTION . Representation learning is a fundamental problem in machine learning and artificial intelligence ( Bengio et al. , 2013 ) . Certain deep neural networks are capable of learning effective data representation automatically and achieve impressive prediction results . For example , convolutional neural networks , which can encode the basic characteristics of visual observations directly into the network architecture , is able to learn effective representations of image data ( LeCun et al. , 1989 ) . Such representations in turn can be subsequently used for constructing classifiers with outstanding performance . Convolutional neural networks learn data representation with a simple structure that captures the essential information through the convolution operator . However , in other application domains , optimizing the standard cross-entropy and least squares loss functions do not guarantee that the learned representations enjoy any desired properties ( Alain & Bengio , 2016 ) . Therefore , it is imperative to develop general principles and approaches for constructing effective representations for supervised learning . There is a growing literature on representation learning in the context deep neural network modeling . Several authors studied the internal mechanism of supervised deep learning from the perspective of information theory ( Tishby & Zaslavsky , 2015 ; Shwartz-Ziv & Tishby , 2017 ; Saxe et al. , 2019 ) , where they showed that training a deep neural network that optimizes the information bottleneck ( Tishby et al. , 2000 ) is a trade-off between the representation and prediction at each layer . To make the information bottleneck idea more practical , deep variational approximation of information bottleneck ( VIB ) is considered in Alemi et al . ( 2016 ) . Information theoretic objectives describing conditional independence such as mutual information are utilized as loss functions to train a representation-learning function , i.e. , an encoder in the unsupervised setting ( Hjelm et al. , 2018 ; Oord et al. , 2018 ; Tschannen et al. , 2019 ; Locatello et al. , 2019 ; Srinivas et al. , 2020 ) . There are several interesting extensions of variational autoencoder ( VAE ) ( Kingma & Welling , 2013 ) in the form of VAE plus a regularizer , including beta-VAE ( Higgins et al. , 2017 ) , Annealed-VAE ( Burgess et al. , 2018 ) , factor-VAE ( Kim & Mnih , 2018 ) , beta-TC-VAE ( Chen et al. , 2018 ) , DIP-VAE ( Kumar et al. , 2018 ) . The idea of using a latent variable model has also been used in adversarial auto- encoders ( AAE ) ( Makhzani et al. , 2016 ) and Wasserstein auto-encoders ( WAE ) ( Tolstikhin et al. , 2018 ) . However , these existing works focus on the unsupervised representation learning . A challenge of supervised representation learning that distinguishes it from standard supervised learning is the difficulty in formulating a clear and simple objective function . In classification , the objective is clear , which is to minimize the number of misclassifications ; in regression , a least squares criterion for model fitting error is usually used . In representation learning , the objective is different from the ultimate objective , which is typically learning a classifier or a regression function for prediction . How to establish a simple criterion for supervised presentation learning has remained an open question ( Bengio et al. , 2013 ) . We propose a sufficient and disentangled representation learning ( SDRL ) approach in the context of supervised learning . With SDRL , we seek a data representation with two characteristics : sufficiency and disentanglement . In the context of representation learning , sufficient means that a good representation should preserve all the information in the data about the supervised learning task . This is a basic requirement and a long-standing principle in statistics . This is closely related to the fundamental concept of sufficient statistics in parametric statistical models ( Fisher , 1922 ) . A sufficient representation can be naturally characterized by the conditional independence principle , which stipulates that , given the representation , the original input data does not contain any additional information about the response variable . In addition to the basic sufficiency property , the representation should have a simple statistical structure . Disentangling is based on the general notion that some latent causes underlie data generation process : although the observed data are typically high-dimensional , complex and noisy , the underlying factors are low-dimensional , independent and have a relatively simple statistical structure . There is a range of definitions of disentangling ( Higgins et al. , 2018 ; Eastwood & Williams , 2018 ; Ridgeway & Mozer , 2018 ; Do & Tran , 2020 ) . Several metrics have been proposed for the evaluation of disentangling . However , none of these definitions and metrics have been turned into empirical criterions and algorithms for learning disentangled representations . We adopt a simple definition of disentangling which defines a representation to be disentangled if its components are independent ( Achille & Soatto , 2018 ) . This definition requires the representation to be maximally disentangled in the sense that the total correlation is zero , where the total correlation is defined as the KL divergence between the joint distribution of g ( x ) and the product of the marginal distributions of its components ( Watanabe , 1960 ) . In the rest of the paper , we first discuss the motivation and the theoretical framework for learning a sufficient and disentangled representation map ( SDRM ) . This framework leads to the formulation of an objective function based on the conditional independence principle and a metric for disentanglement and invariance adopted in this work . We estimate the target SDRM based on the sample version of the objective function using deep neural networks and develop an efficient algorithm for training the SDRM . We establish an upper error bound on the measure of conditional independence and disentanglement and show that it reaches the nonparametric minimax rate under mild regularity conditions . This result provides strong statistical guarantees for the proposed method . We validate the proposed SDRL via numerical experiments and real data examples . 2 SUFFICIENT AND DISENTANGLED REPRESENTATION . Consider a pair of random vectors ( x , y ) ∈ Rp×Rq , where x is a vector of input variables and y is a vector of response variables or labels . Our goal is to find a sufficient and disentangled representation of x. Sufficiency We say that a measurable map g : Rp → Rd with d ≤ p is a sufficient representation of x if y x|g ( x ) , ( 1 ) that is , y and x are conditionally independent given g ( x ) . This condition holds if and only if the conditional distribution of y given x and that of y given g ( x ) are equal . Therefore , the information in x about y is completely encoded by g ( x ) . Such a g always exists , since if we simply take g ( x ) = x , then ( 1 ) holds trivially . This formulation is a nonparametric generalization of the basic condition in sufficient dimension reduction ( Li , 1991 ; Cook , 1998 ) , where it is assumed g ( x ) = BTx with B ∈ Rp×d belonging to the Stiefel manifold , i.e. , BTB = Id . Denote the class of sufficient representations satisfying ( 1 ) by F = { g : Rp → Rd , g measurable and satisfies y x|g ( x ) } . We refer toF as a Fisher class because of its close connection with the concept of sufficient statistics ( Fisher , 1922 ; Cook , 2007 ) . For an injective measurable transformation T : Rd → Rd and g ∈ F , T ◦ g ( x ) is also sufficient by the basic property of conditional probability . Therefore , the Fisher class F is invariant in the sense that T ◦ F = F , provided T is injective , where T ◦ F = { T ◦ g : g ∈ F } . An important class of transformations is the class of affine transformations , T ◦ g = Ag + b , whereA is a d× d nonsingular matrix and b ∈ Rd . Disentanglement We focus on the disentangled representations among those that are sufficient . Therefore , we start from the functions of the input data that are sufficient representations in the Fisher class F . For any sufficient and disentangled representation g ( x ) , let Σg = Var ( g ( x ) ) . Since the components of g ( x ) are disentangled in the sense that they are independent , Σg is a diagonal matrix , thus Σ−1/2g g ( x ) also has independent components . Therefore , we can always rescale g ( x ) such that it has identity covariance matrix . To further simplify the statistical structure of a representation g , we also require it to be rotation invariant in distribution , that is , Qg ( x ) = g ( x ) in distribution for any orthogonal matrix Q ∈ Rd×d . The Fisher class F is rotation invariant in terms of conditional independence , but not all its members are rotation invariant in distribution . By the Maxwell characterization of the Gaussian distributions ( Maxwell , 1860 ; Bartlett , 1934 ; Bryc , 1995 ; Gyenis , 2017 ) , a random vector of dimension two or more with independent components is rotation invariant in distribution if and only if it is Gaussian with zero mean and a spherical covariance matrix . Therefore , after absorbing the scaling factor , for a sufficient representation map to be disentangled and rotation invariant , it is necessarily distributed as Nd ( 0 , Id ) . Let M be the Maxwell class of functions g : Rd → Rd , where g ( x ) is disentangled and rotation invariant in distribution . By the Maxwell characterization , we can write M = { g : Rp → Rd , g ( x ) ∼ N ( 0 , Id ) } . ( 2 ) Now our problem becomes that of finding a representation in F ∩M , the intersection of the Fisher class and the Maxwell class . The first question to ask is whether such a representation exists . The following result from optimal transport theory provides an affirmative answer and guarantees that F ∩M is nonempty under mild conditions ( Brenier , 1991 ; McCann , 1995 ; Villani , 2008 ) . Lemma 2.1 . Let µ be a probability measure on Rd . Suppose it has finite second moment and is absolutely continuous with respect to the standard Gaussian measure , denoted by γd . Then it admits a unique optimal transportation map T : Rd → Rd such that T # µ = γd ≡ N ( 0 , Id ) , where T # µ denotes the pushforward distribution of µ under T . Moreover , T is injective µ-almost everywhere . Denote the law of a random vector z by µz . Lemma 2.1 implies that , for any g ∈ F with E‖g ( x ) ‖2 < ∞ and µg ( x ) absolutely continuous with respect to γd , there exists a map T ∗ transforming the distribution of g ( x ) to N ( 0 , Id ) . Therefore , R∗ : = T ∗ ◦ g ∈ F ∩M , that is , x y|R∗ ( x ) and R∗ ( x ) ∼ N ( 0 , Id ) , ( 3 ) i.e. , R∗ is a sufficient and disentangled representation map ( SDRM ) .
The authors present a new representation learning algorithm that trades off between a sufficiency condition (that is, the label should be independent of the input conditioned on the representation) and what they call a "disentangling" condition - that the representation vectors should be independent of one another and rotationally invariant. While the first condition has been used to define disentangled representations, the second is not standard. From the condition of rotational invariance, they require that the distribution over representations is isomorphic to a uniform Gaussian. They arrive at a loss with two terms, the first is a distance correlation between labels and representation, and the second is a divergence between the representation and a uniform Gaussian. In this sense, the regularization term looks quite similar to a VAE while the loss term looks quite similar to standard classification losses. The regularization is represented as a maximum over another loss, leading to a GAN-like coupled optimization problem.
SP:804fada5af8ccfe842706ac812bcc294956b4fb4
Neural Partial Differential Equations with Functional Convolution
1 INTRODUCTION ( 1+ ) Problem definition We aim to devise a learning paradigm to solve the inverse PDE identification problem . By observing a small data set in the PDE ’ s solution space with an unknown form of equations , we want to generate an effective neural representation that can precisely reconstruct the hidden structure of the target PDE system . This neural representation will further facilitate the prediction of the PDE solution with different boundary conditions . The right inset figure shows a typical example of our target problem : by observing a small part ( 4 samples in the figure ) of the solution space of a nonlinear PDE system F ( x ) = b , without knowing its analytical equations , our neural representation will depict the hidden differential operators underpinning F ( e.g. , to represent the unknown differential operator∇ · ( 1 + x2 ) ∇ by training the model on the solution of∇ · ( 1 + x2 ) ∇x = b . Challenges to solve The nonlinearity and the curse of dimensionality of the target PDE ’ s solution manifold are the two main challenges for the design of a high-performance neural discretization . An effective neural representation of a PDE system plays an essential role to solve these challenges . In retrospect , the design of neural PDE representations has been evolving from the raw , unstructured networks ( e.g. , by direct end-to-end data fitting ) to various structured ones with proper mathematical priors embedded . Examples include the residual-based loss function ( e.g. , physics-informed networks Raissi et al. , 2020 ; Lu et al. , 2019 ; Raissi et al. , 2019 ) , learnable convolution kernels ( e.g. , PDE-Nets Long et al. , 2018a ; b ; 2019 ) , and hybrid of numerical stencils and MLP layers ( e.g. , see Amos & Kolter , 2017 ; Pakravan et al. , 2020 ; Geng et al. , 2020 ; Stevens & Colonius , 2020 ) . Following this line of research , we aim to devise a lightweighted neural PDE representation that fuses the mathematical equation ’ s essential structure , the numerical solvers ’ computational efficiency , and the neural networks ’ expressive power . In particular , we want to aggressively reduce the scale of both model parameters and training data to some extremal extent , while extending the scope of the targeted PDE systems to a broad range , encompassing equations that are both linear and nonlinear , both steady-state and dynamic . i , j Flatten vector of , , . . . Output of , , Translational similarity of differential operators Our neural PDE representation design is motivated by the historical successes of the various sparse , iterative numerical solvers in solving nonlinear PDEs over the past decades . The key observation we have made is that the efficacy of a classical numerical PDE solver relies on the translational similarity of its discretized , local differential operators . Namely , the form of a differential operator can be written as a functional C ( x , p ) with respect to the the PDE unknown x and the local position p , which is showed in the right inset figure . For example , for a linear Poisson system ∇ · ∇x = b , C is a constant function ; for a linear Poisson system with embedded boundary conditions , C is a function of position p ; for a nonlinear PDE∇· ( 1 +x2 ) ∇x = b , C is a function of PDE unknown x ( or both x and p if it has embedded boundaries ) . For most numerical PDEs , these local functional operators can be parameterized and built on-the-fly within the solver iterations . Such operators ’ locality further inspired the design of a variety of computationally efficient PDE solvers , among which the most famous one is the matrix-free scheme that has been used widely in solving large-scale physical systems on GPU . These local procedures for stencil creation have demonstrated their extreme performance in accommodating PDE solvers . From a machine learning perspective , these “ translational similar ” differential operators resemble the concept of convolution operators that function as the cornerstone to embed the “ translational invariant ” priors into neural networks ( see LeCun et al. , 1995 ; 1998 ) . Method overview In this work , we leverage the PDE differential operators ’ “ translational similarity ” in a reverse manner by devising a local neural representation that can uncover and describe the global structure of the target PDE . At the heart of our approach lies in a differential procedure to simultaneously describe the spatial coupling and the temporal evolution of a local data point . Such procedure is implemented as a parameterized micro network , which is embedded in our iterative solving architecture , to learn the numerical process of converging from an initial guess to a final steady state for a PDE solution . We name these embedded micro networks “ functional convolutions , ” for two reasons . First , fitting the parameters of these local embedded networks amounts to the exploration of the optimal function that best describes the observed solution of the unknown nonlinear PDE within a functional space . Second , the local differential operators that span this functional space can be treated as numerically employing convolution kernels Hsieh et al . ( 2018 ) ; Lin et al . ( 2013 ) . Based on these functional convolutions , we are able to devise a learning framework by embedding the micro network architecture within an iterative procedure to 1 ) backwardly learn the underpinning , spatially varying structures of a nonlinear PDE system by iteratively applying the adjoint linear solvers and 2 ) forwardly predict the steady states of a PDE system by partially observing data samples of its equilibrium . We show that our model can simultaneously discover structures and predict solutions for different types of nonlinear PDEs . We particularly focus on solving elliptic boundary value problems that were less explored in the current literature . 2 MOTIVATING EXAMPLE : FORWARD NUMERICAL PDE . Naming convention We first show a motivating example to demonstrate the standard process of a forward numerical PDE solver . We take the simplest Poisson equation with Dirichlet boundary conditions as an example . The mathematical equation of a Poisson system can be written as ∇ · ∇x = b for x ∈ Ω , with x as the PDE unknowns , b as the right-hand side , and Ω as the problem ’ s domain . The boundary conditions are enforced in a Dirichlet way ( by assigning values directly ) as x = x̂ on the domain boundary , with x̂ as the specified boundary values . To create a discretized , numerical system to solve the equation , we use the symbol p to denote the position within the domain . The numerical solution of the PDE amounts to seeking an unknown function x ( p ) that can specify the value of x in an arbitrary position p within Ω . Linear PDE As shown in Figure 1 , we illustrate how to solve the Poisson system using a finitedifference method . We first subdivide the domain into n cell ( segment intervals in 1D and squares in 2D ) with the cell size of ∆p . Taking the 2D case for example , we can derive the discretized Poisson equation by approximating the Laplacian operator on each grid cell using the central finite difference method ( −xi−1 , j − xi+1 , j + 4xi , j − xi , j−1 − xi , j+1 ) /∆p2 = bi , j .The discretization of each cell forms one row in the linear system , and the combination of all the rows ( cells ) forms a sparse 1D Poisson equation 2D Poisson equation linear system Ax = b to solve . For a linear Poisson system , each row of A can be translated into a convolutional stencil instantiated with constant parameters , e.g. , ( -1,2,1 ) in 1D and ( -1 , -1,4 , -1 , -1 ) in 2D . This convolution perspective can be used to accelerate the numerical solver by maintaining a “ conceptual ” A matrix without storing the redundant matrix element values in memory ( we refer the readers to the matrix-free method Carey & Jiang ( 1986 ) for more details ) . This matrix-free nature indicates an extremely concise representation of a numerical Poisson system ( i.e. , the matrix A ) —using a 1× 3 or 3× 3 convolution kernel with fixed values . We use the symbol C to denote the convolutional representation of A . For a linear system , C is independent from the values of p and x. Nonlinear PDE and Picard interation The nonlinear case of the Poisson system is a bit complicated . We can still use the matrix-free representation to describe a nonlinear Poisson system , but the parameters of this convolutional stencil now depends on both the local position p and the local unknown p ( x ) . This dependency is nonlinear and therefore we can not find the solution by solving a single Ax = b . Here we present an iterative scheme—the Picard method—to solve a numerical nonlinear PDE system . ( see Picard , 1893 ; Bai , 2010 ) Let ’ s consider the nonlinear Poisson equation as : ∇ · α ( x ) ∇x = b for x ∈ Ω and Dirichlet boundary conditions on the boundary . The source of nonlinearity in this PDE includes the coefficient α ( x ) which is dependent on the solution of x , e.g. , α ( x ) = 1 + x2 . A simple and effective fixed-point procedure to discretize and solve the nonlinear Poisson equation , named Picard iteration , can be sketched as follows : while : |xn − xn−1| > xn+1 = A −1 ( xn ) b , ( 1 ) with the matrix A representing the current discretized nonlinear Laplacian operator approximated by the value of unknowns from the previous iteration . The key idea is to employ a linear approximation of a nonlinear problem and enforce such approximation iteratively to evolve to a steady state ( see Figure 2 ) . To uncover the underlying structure of A , which can evolve both spatially and temporally , we make a prior assumption that A can be described by a kernel function C ( x ( p ) , p ) . Such prior applies to most of the elliptic PDE systems where the spatial terms can be expressed as the combination of one or several differential operators . From a numerical perspective , C describes the local discretized interaction between an element and its neighbours . It amounts to a function that returns all the non-zero elements for each row i in A ( think of A in a matrix-free way ) . 3 METHOD : BACKWARD NEURAL PDE . Overview In this section , we present our neural PDE design motivated by the forward Picard solver with convolutional representation of the nonlinear system . Our framework consists of three key components : the neural representation of the convolution operator , the embedded Picard forward iterative solver , and the adjoint backward derivatives . The key idea is to differentiate the forward nonlinear Picard solver and build the neural representation for its sparse linearization step . This differentiation is implemented by our functional convolution scheme on the linearization level and the adjoint Picard for the nonlinear iterations . 3.1 FUNCTIONAL CONVOLUTION . In a conventional ML method , C can be approximated by the combination of a set of kernels Long et al . ( 2018a ) or by solving a deconvolution problem Xu et al . ( 2014 ) ; Jin et al . ( 2017 ) ; Zhang et al . ( 2017 ) . However , these strategies do not suit our scenario , where the instant linear effects of the system should be approximated by extracting the nonlinear effects of C. A natural choice to approximate this spatially-and-temporally varying kernel function is to devise a neural network , which takes the form of C ( x ( p ) , p , θ ) , with θ as the network parameters . Numerically , the global matrix A can be fully parameterized by C ( x ( p ) , p , θ ) by assuming the fact that C is a non-weight-shared convolution operator in the spatial domain . As illustrated in Figure 3 , such neural network can be further incorporated into a conventional nonlinear Picard solver to obtain the forward steady-state solution by solving the linear system A ( xn , θ ) xn+1 = b ( xn ) , where a black-box sparse linear solver can be used as in a conventional simulation program . The formal definition of functional convolution written in the kernel way is A ( x ( pi ) , θ ) = ∑ pj∈N ( pi ) [ C ( x ( N ( pi ) ) , N ( pi ) , θ ) ] e ( pj ) ( 2 ) where A ( x ( pi ) , θ ) is the ith row of matrix A , N ( pi ) is the neighboring positions of pi , x ( N ( pi ) ) is all the neighboring elements ( all channels ) around the position pi and e ( pj ) is the unit vector representing the jth column in A . To specify the 2D example , equation ( 2 ) has the following form A ( xm , n ) , θ ) = 1∑ i=−1 1∑ j=−1 [ C ( N ( xm , n ) , θ ) ] i , jem+i , n+j ( 3 ) where xm , n is the element that lies in row m , column n of the feature map . The input N ( xm , n ) = { xm+i , n+j for i , j = −1 , 0 , 1 } is the flatten vector of neighboring elements of pixel xm , n . After a simple neural network C with parameters θ , we obtain the output C ( N ( xm , n ) , θ ) , which is a vector with the same length of N ( xm , n ) .
Post-discussion update: The authors only partially adressed my concerns in their rebuttal. The paper suffers from lack of comparisons: only 2 baselines are compared, and only on few systems. Crucially the new Navier-Stokes experiment lacks comparisons. The authors also couldn't respond to my questions about research context or scope: it's difficult to assess what this work actually claims in relation to competing methods. For a machine learning paper this is not enough.
SP:bd4bc912bd62fdcf54adeb77330f6cfbe4bb0352
A Chain Graph Interpretation of Real-World Neural Networks
1 INTRODUCTION . During the last decade , deep learning ( Goodfellow et al. , 2016 ) , the study of neural networks ( NNs ) , has achieved ground-breaking results in diverse areas such as computer vision ( Krizhevsky et al. , 2012 ; He et al. , 2016 ; Long et al. , 2015 ; Chen et al. , 2018 ) , natural language processing ( Hinton et al. , 2012 ; Vaswani et al. , 2017 ; Devlin et al. , 2019 ) , generative modeling ( Kingma & Welling , 2014 ; Goodfellow et al. , 2014 ) and reinforcement learning ( Mnih et al. , 2015 ; Silver et al. , 2016 ) , and various network designs have been proposed . However , neural networks have been treated largely as “ black-box ” function approximators , and their designs have chiefly been found via trialand-error , with little or no theoretical justification . A major cause that hinders the theoretical analysis is the current overly generic modeling of neural networks as function approximators : simply interpreting a neural network as a composition of parametrized functions provides little insight to decipher the nature of its components or its behavior during the learning process . In this paper , we show that a neural network can actually be interpreted as a probabilistic graphical model ( PGM ) called chain graph ( CG ) ( Koller & Friedman , 2009 ) , and feed-forward as an efficient approximate probabilistic inference on it . This offers specific interpretations for various neural network components , allowing for in-depth theoretical analysis and derivation of new approaches . 1.1 RELATED WORK . In terms of theoretical understanding of neural networks , a well known result based on the function approximator view is the universal approximation theorem ( Goodfellow et al. , 2016 ) , however it only establishes the representational power of NNs . Also , there have been many efforts on alternative NN interpretations . One prominent approach identifies infinite width NNs as Gaussian processes ( Neal , 1996 ; Lee et al. , 2018 ) , enabling kernel method analysis ( Jacot et al. , 2018 ) . Other works also employ theories such as optimal transport ( Genevay et al. , 2017 ; Chizat & Bach , 2018 ) or mean field ( Mei et al. , 2019 ) . These approaches lead to interesting findings , however they tend to only hold under limited or unrealistic settings and have difficulties interpreting practical real-world NNs . Alternatively , some existing works study the post-hoc interpretability ( Lipton , 2018 ) , proposing methods to analyze the empirical behavior of trained neural networks : activation maximization ( Erhan et al. , 2009 ) , typical input synthesis ( Nguyen et al. , 2016 ) , deconvolution ( Zeiler & Fergus , 2014 ) , layer-wise relevance propagation ( Bach et al. , 2015 ) , etc . These methods can offer valuable insights to the practical behavior of neural networks , however they represent distinct approaches and focuses , and are all limited within the function approximator view . Our work links neural networks to probabilistic graphical models ( Koller & Friedman , 2009 ) , a rich theoretical framework that models and visualizes probabilistic systems composed of random variables ( RVs ) and their interdependencies . There are several types of graphical models . The chain graph model ( also referred to as the LWF chain graph model ) ( Koller & Friedman , 2009 ; Lauritzen & Wermuth , 1989 ; Frydenberg , 1990 ) used in our work is a general form that unites directed and undirected variants , visualized as a partially directed acyclic graph ( PDAG ) . Interestingly , there exists a series of works on constructing hierarchical graphical models for data-driven learning problems , such as sigmoid belief network ( Neal , 1992 ) , deep belief network ( Hinton et al. , 2006 ) , deep Boltzmann machine ( Salakhutdinov & Hinton , 2012 ) and sum product network ( Poon & Domingos , 2011 ) . As alternatives to neural networks , these models have shown promising potentials for generative modeling and unsupervised learning . Nevertheless , they are yet to demonstrate competitive performances over neural network for discriminative learning . Neural networks and graphical models have so far been treated as two distinct approaches in general . Existing works that combine them ( Zheng et al. , 2015 ; Chen et al. , 2018 ; Lample et al. , 2016 ) mainly treat either neural networks as function approximators for amortized inference , or graphical models as post-processing steps . Tang & Salakhutdinov ( 2013 ) create a hybrid model , the stochastic feedforward neural network ( SFNN ) , by concatenating deterministic neurons with stochastic Bernoulli random variables , in order to represent multimodal distributions . Some also consider neural networks as graphical models with deterministic hidden nodes ( Buntine , 1994 ) . However this is an atypical degenerate regime . To the best of our knowledge , our work provides the first rigorous and comprehensive formulation of a ( non-degenerate ) graphical model interpretation for neural networks in practical use . 1.2 OUR CONTRIBUTIONS . The main contributions of our work are summarized as follows : • We propose a layered chain graph representation of neural networks , interpret feed-forward as an approximate probabilistic inference procedure , and show that this interpretation provides an extensive coverage of practical NN components ( Section 2 ) ; • To illustrate its advantages , we show with concrete examples ( residual block , RNN , dropout ) that the chain graph interpretation enables coherent and in-depth theoretical support , and provides additional insights to various empirically established network structures ( Section 3 ) ; • Furthermore , we demonstrate the potential of the chain graph interpretation for discovering new approaches by using it to derive a novel stochastic inference method named partially collapsed feed-forward , and establish experimentally its empirical effectiveness ( Section 4 ) . 2 CHAIN GRAPH INTERPRETATION OF NEURAL NETWORKS . Without further delay , we derive the chain graph interpretation of neural networks in this section . We will state and discuss the main results here and leave the proofs in the appendix . 2.1 THE LAYERED CHAIN GRAPH REPRESENTATION . We start by formulating the so called layered chain graph that corresponds to neural networks we use in practice : Consider a system represented by L layers of random variables ( X1 , . . . , XL ) , where X li is the i-th variable node in the l-th layer , and denote N l the number of nodes in layer l. We assume that nodes X li in the same layer l have the same distribution type characterized by a feature function Tl that can be multidimensional . Also , we assume that the layers are ordered topologically and denote Pa ( Xl ) the parent layers of Xl . To ease our discussion , we assume that X1 is the input layer and XL the output layer ( our formulation can easily extend to multi-input/output cases ) . A layered chain graph is then defined as follows : Definition 1 . A layered chain graph that involves L layers of random variables ( X1 , . . . , XL ) is a chain graph that encodes the overall distribution P ( X2 , . . . , XL|X1 ) such that : 1 . It can be factored into layerwise chain components P ( Xl|Pa ( Xl ) ) following the topological or- der , and nodes X li within each chain component P ( X l|Pa ( Xl ) ) are conditionally independent given their parents ( this results in bipartite chain components ) , thus allowing for further decomposition into nodewise conditional distributions P ( X li |Pa ( Xl ) ) . This means we have P ( X2 , . . . , XL|X1 ) = L∏ l=2 P ( Xl|Pa ( Xl ) ) = L∏ l=2 N l∏ i=1 P ( X li |Pa ( Xl ) ) ; ( 1 ) 2 . For each layer l with parent layers Pa ( Xl ) = { Xp1 , . . .Xpn } , p1 , . . . , pn ∈ { 1 , . . . , l − 1 } , its nodewise conditional distributions P ( X li |Pa ( Xl ) ) are modeled by pairwise conditional random fields ( CRFs ) with with unary ( bli ) and pairwise ( W p , l j , i ) weights ( as we will see , they actually correspond to biases and weights in NN layers ) : P ( X li |Pa ( Xl ) ) = f l ( Tl ( X li ) , e l i ( Tp1 ( Xp1 ) , . . . , Tpn ( Xpn ) ) ) ( 2 ) with eli ( Tp1 ( Xp1 ) , . . . , Tpn ( Xpn ) ) = bli + pn∑ p=p1 Np∑ j=1 Wp , lj , iT p ( Xpj ) . ( 3 ) Figure 1 Left illustrates an example three-layer network as layered chain graph and its chain component factorization . In Eq . ( 2 ) , f l is an arbitrary function that represents a probability distribution . For exponential family distributions ( Koller & Friedman , 2009 ) , Eq . ( 2 ) simply becomes P ( X li |Pa ( Xl ) ) ∝ exp ( Tl ( X li ) · eli ( Tp1 ( Xp1 ) , . . . , Tpn ( Xpn ) ) ) . Note that layered chain graph has a globally directed graph structure and has an equivalent modeling based on directed graphical model ( Bayesian network ) ( Koller & Friedman , 2009 ) , we elaborate on this point for interested readers in Appendix A . 2.2 FEED-FORWARD AS APPROXIMATE PROBABILISTIC INFERENCE . To identify layered chain graphs with real-world neural networks , we need to show that they can behave the same way during inference and learning . For this , we establish the fact that feed-forward can actually be seen as performing an approximate probabilistic inference on a layered chain graph : Given an input sample x̃1 , we consider the problem of inferring the marginal distribution Qli of a node X li and its expected features q l i , defined as Qli ( x l i|x̃1 ) = P ( X li = xli|X1 = x̃1 ) ; qli = EQli [ T l ( X li ) ] ( q 1 = x̃1 ) . ( 4 ) Consider a non-input layer l with parent layers p1 , . . . , pn , the independence assumptions encoded by the layered chain graph lead to the following recursive expression for marginal distributions Q : Qli ( x l i|x̃1 ) = EQp1 , ... , Qpn [ P ( xli|Pa ( Xl ) ) ] . ( 5 ) However , the above expression is in general intractable , as it integrates over the entire admissible states of all parents nodes in Pa ( Xl ) . To proceed further , simplifying approximations are needed . Interestingly , by using linear approximations , we can obtain the following results ( in case of discrete random variable the integration in Eq . 7 is replaced by summation ) : Proposition 1 . If we make the assumptions that the corresponding expressions are approximately linear w.r.t . parent features Tp1 ( Xp1 ) , . . . , Tpn ( Xpn ) , we obtain the following approximations : Qli ( x l i|x̃1 ) ≈ f l ( Tl ( xli ) , e l i ( q p1 , . . . , qpn ) ) ; ( 6 ) qli ≈ ∫ xli Tl ( xli ) f l ( Tl ( xli ) , e l i ( q p1 , . . . , qpn ) ) dxli : = g l ( eli ( q p1 , . . . , qpn ) ) . ( 7 ) Especially , Eq . ( 7 ) is a feed-forward expression for expected features qli with activation function g l determined by Tl and f l , i.e . the distribution type of random variable nodes in layer l. The proof is provided in Appendix B.1 . This allows us to identify feed-forward as an approximate probabilistic inference procedure for layered chain graphs . For learning , the loss function is typically a function of ( QL , qL ) obtainable via feed-forward , and we can follow the same classical neural network parameter update using stochastic gradient descent and backpropagation . Thus we are able to replicate the exact neural network training process with this layered chain graph framework . The following corollary provides concrete examples of some common activation functions g ( we emphasize their names in bold , detailed formulations and proofs are given in Appendix B.2 ) : Corollary 2 . We have the following node distribution - activation function correspondences : 1 . Binary nodes taking values { α , β } results in sigmoidal activations , especially , we obtain sigmoid with α = 0 , β = 1 and tanh with α = −1 , β = 1 ( α , β are interchangeable ) ; 2 . Multilabel nodes characterized by label indicator features result in the softmax activation ; 3 . Variants of ( leaky ) rectified Gaussian distributions ( T li ( X l i ) = X l i = max ( Y l i , Y l i ) with Y l i ∼ N ( eli , ( s l i ( e l i ) ) 2 ) ) can approximate activations such as softplus ( = 0 , sli ≈ 1.7761 ) and -leaky rectified linear unit ( ReLU ) ( sli = tanh ( eli ) ) including ReLU ( = 0 ) and identity ( = 1 ) . Figure 1 Right illustrates activation functions approximated by various rectified Gaussian variants . We also plotted ( in orange ) an alternative approximation of ReLU with sigmoid-modulated standard deviation proposed by Nair & Hinton ( 2010 ) which is less accurate around the kink at the origin . The linear approximations , needed for feed-forward , is coarse and only accurate for small pairwise weights ( ‖W‖ 1 ) or already linear regions . This might justify weight decay beyond the general “ anti-overfit ” argument and the empirical superiority of piecewise linear activations like ReLU ( Nair & Hinton , 2010 ) . Conversely , as a source of error , it might explain some “ failure cases ” of neural networks such as their vulnerability against adversarial samples , see e.g. , Goodfellow et al . ( 2015 ) .
This paper tries to interpret neural networks with chain graphs that provides theoretical analysis on various neural network components. Furthermore, this chain graph interpretation has been used to propose a new approach (architecture), which is a partially collapsed feed-forward. A layered chain graph representation is adopted to formulate the neural networks with layered chain graphs. This further establishes to interpret feed-forward as an approximate probabilistic inference with using linear approximations. Some concrete examples are shown to be analyzed based on the chain graph formulation.
SP:e7c149067b48a63680ae063c880c00a304309b90
Convex Regularization in Monte-Carlo Tree Search
1 INTRODUCTION . Monte-Carlo Tree Search ( MCTS ) is a well-known algorithm to solve decision-making problems through the combination of Monte-Carlo planning with an incremental tree structure ( Coulom , 2006 ) . Although standard MCTS is only suitable for problems with discrete state and action spaces , recent advances have shown how to enable MCTS in continuous problems ( Silver et al. , 2016 ; Yee et al. , 2016 ) . Most remarkably , AlphaGo ( Silver et al. , 2016 ) and AlphaZero ( Silver et al. , 2017b ; a ) couple MCTS with neural networks trained using Reinforcement Learning ( RL ) ( Sutton & Barto , 1998 ) methods , e.g. , Deep Q-Learning ( Mnih et al. , 2015 ) , to speed up learning of large scale problems with continuous state space . In particular , a neural network is used to compute value function estimates of states as a replacement of time-consuming Monte-Carlo rollouts , and another neural network is used to estimate policies as a probability prior for the therein introduced PUCT action selection method , a variant of well-known UCT sampling strategy commonly used in MCTS for exploration ( Kocsis et al. , 2006 ) . Despite AlphaGo and AlphaZero achieving state-of-the-art performance in games with high branching factor like Go ( Silver et al. , 2016 ) and Chess ( Silver et al. , 2017a ) , both methods suffer from poor sample-efficiency , mostly due to the polynomial convergence rate of PUCT ( Xiao et al. , 2019 ) . This problem , combined with the high computational time to evaluate the deep neural networks , significantly hinder the applicability of both methodologies . In this paper , we provide a unified theory of the use of convex regularization in MCTS , which proved to be an efficient solution for driving exploration and stabilizing learning in RL ( Schulman et al. , 2015 ; 2017a ; Haarnoja et al. , 2018 ; Buesing et al. , 2020 ) . In particular , we show how a regularized objective function in MCTS can be seen as an instance of the Legendre-Fenchel transform , similar to previous findings on the use of duality in RL ( Mensch & Blondel , 2018 ; Geist et al. , 2019 ; Nachum & Dai , 2020 ) and game theory ( Shalev-Shwartz & Singer , 2006 ; Pavel , 2007 ) . Establishing our theoretical framework , we can derive the first regret analysis of regularized MCTS , and prove that a generic convex regularizer guarantees an exponential convergence rate to the solution of the reg- ularized objective function , which improves on the polynomial rate of PUCT . These results provide a theoretical ground for the use of arbitrary entropy-based regularizers in MCTS until now limited to maximum entropy ( Xiao et al. , 2019 ) , among which we specifically study the relative entropy of policy updates , drawing on similarities with trust-region and proximal methods in RL ( Schulman et al. , 2015 ; 2017b ) , and the Tsallis entropy , used for enforcing the learning of sparse policies ( Lee et al. , 2018 ) . Moreover , we provide an empirical analysis of the toy problem introduced in Xiao et al . ( 2019 ) to intuitively evince the practical consequences of our theoretical results for each regularizer . Finally , we empirically evaluate the proposed operators in AlphaGo and AlphaZero on problems of increasing complexity , from classic RL problems to an extensive analysis of Atari games , confirming the benefit of our novel operators compared to maximum entropy and , in general , the superiority of convex regularization in MCTS w.r.t . classic methods . 2 PRELIMINARIES . 2.1 MARKOV DECISION PROCESSES . We consider the classical definition of a finite-horizon Markov Decision Process ( MDP ) as a 5- tuple M = 〈S , A , R , P , γ〉 , where S is the state space , A is the finite discrete action space , R : S × A × S → R is the reward function , P : S × A → S is the transition kernel , and γ ∈ [ 0 , 1 ) is the discount factor . A policy π ∈ Π : S × A → R is a probability distribution of the event of executing an action a in a state s. A policy π induces a value function corresponding to the expected cumulative discounted reward collected by the agent when executing action a in state s , and following the policy π thereafter : Qπ ( s , a ) , E [ ∑∞ k=0 γ kri+k+1|si = s , ai = a , π ] , where ri+1 is the reward obtained after the i-th transition . An MDP is solved finding the optimal policy π∗ , which is the policy that maximizes the expected cumulative discounted reward . The optimal policy corresponds to the one satisfying the optimal Bellman equation ( Bellman , 1954 ) Q∗ ( s , a ) , ∫ S P ( s ′|s , a ) [ R ( s , a , s′ ) + γmaxa′ Q∗ ( s′ , a′ ) ] ds′ , and is the fixed point of the optimal Bellman operator T ∗Q ( s , a ) , ∫ S P ( s ′|s , a ) [ R ( s , a , s′ ) + γmaxa′ Q ( s′ , a′ ) ] ds′ . Additionally , we define the Bellman operator under the policy π as TπQ ( s , a ) , ∫ S P ( s ′|s , a ) [ R ( s , a , s′ ) + γ ∫ A π ( a ′|s′ ) Q ( s′ , a′ ) da′ ] ds′ , the optimal value function V ∗ ( s ) , maxa∈AQ ∗ ( s , a ) , and the value function under the policy π as V π ( s ) , maxa∈AQπ ( s , a ) . 2.2 MONTE-CARLO TREE SEARCH AND UPPER CONFIDENCE BOUNDS FOR TREES . Monte-Carlo Tree Search ( MCTS ) is a planning strategy based on a combination of Monte-Carlo sampling and tree search to solve MDPs . MCTS builds a tree where the nodes are the visited states of the MDP , and the edges are the actions executed in each state . MCTS converges to the optimal policy ( Kocsis et al. , 2006 ; Xiao et al. , 2019 ) , iterating over a loop composed of four steps : 1 . Selection : starting from the root node , a tree-policy is executed to navigate the tree until a node with unvisited children , i.e . expandable node , is reached ; 2 . Expansion : the reached node is expanded according to the tree policy ; 3 . Simulation : run a rollout , e.g . Monte-Carlo simulation , from the visited child of the cur- rent node to the end of the episode ; 4 . Backup : use the collected reward to update the action-values Q ( · ) of the nodes visited in the trajectory from the root node to the expanded node . The tree-policy used to select the action to execute in each node needs to balance the use of already known good actions , and the visitation of unknown states . The Upper Confidence bounds for Trees ( UCT ) sampling strategy ( Kocsis et al. , 2006 ) extends the use of the well-known UCB1 sampling strategy for multi-armed bandits ( Auer et al. , 2002 ) , to MCTS . Considering each node corresponding to a state s ∈ S as a different bandit problem , UCT selects an action a ∈ A applying an upper bound to the action-value function UCT ( s , a ) = Q ( s , a ) + √ logN ( s ) N ( s , a ) , ( 1 ) where N ( s , a ) is the number of executions of action a in state s , N ( s ) = ∑ aN ( s , a ) , and is a constant parameter to tune exploration . UCT asymptotically converges to the optimal action-value function Q∗ , for all states and actions , with the probability of executing a suboptimal action at the root node approaching 0 with a polynomial rate O ( 1t ) , for a simulation budget t ( Kocsis et al. , 2006 ; Xiao et al. , 2019 ) . 3 REGULARIZED MONTE-CARLO TREE SEARCH . The success of RL methods based on entropy regularization comes from their ability to achieve state-of-the-art performance in decision making and control problems , while enjoying theoretical guarantees and ease of implementation ( Haarnoja et al. , 2018 ; Schulman et al. , 2015 ; Lee et al. , 2018 ) . However , the use of entropy regularization is MCTS is still mostly unexplored , although its advantageous exploration and value function estimation would be desirable to reduce the detrimental effect of high-branching factor in AlphaGo and AlphaZero . To the best of our knowledge , the MENTS algorithm ( Xiao et al. , 2019 ) is the first and only method to combine MCTS and entropy regularization . In particular , MENTS uses a maximum entropy regularizer in AlphaGo , proving an exponential convergence rate to the solution of the respective softmax objective function and achieving state-of-the-art performance in some Atari games ( Bellemare et al. , 2013 ) . In the following , motivated by the success in RL and the promising results of MENTS , we derive a unified theory of regularization in MCTS based on the Legendre-Fenchel transform ( Geist et al. , 2019 ) , that generalizes the use of maximum entropy of MENTS to an arbitrary convex regularizer . Notably , our theoretical framework enables to rigorously motivate the advantages of using maximum entropy and other entropy-based regularizers , such as relative entropy or Tsallis entropy , drawing connections with their RL counterparts TRPO ( Schulman et al. , 2015 ) and Sparse DQN ( Lee et al. , 2018 ) , as MENTS does with Soft Actor-Critic ( SAC ) ( Haarnoja et al. , 2018 ) . 3.1 LEGENDRE-FENCHEL TRANSFORM . Consider an MDP M = 〈S , A , R , P , γ〉 , as previously defined . Let Ω : Π → R be a strongly convex function . For a policy πs = π ( ·|s ) andQs = Q ( s , · ) ∈ RA , the Legendre-Fenchel transform ( or convex conjugate ) of Ω is Ω∗ : RA → R , defined as : Ω∗ ( Qs ) , max πs∈Πs TπsQs − τΩ ( πs ) , ( 2 ) where the temperature τ specifies the strength of regularization . Among the several properties of the Legendre-Fenchel transform , we use the following ( Mensch & Blondel , 2018 ; Geist et al. , 2019 ) . Proposition 1 Let Ω be strongly convex . • Unique maximizing argument : ∇Ω∗ is Lipschitz and satisfies ∇Ω∗ ( Qs ) = arg max πs∈Πs TπsQs − τΩ ( πs ) . ( 3 ) • Boundedness : if there are constants LΩ and UΩ such that for all πs ∈ Πs , we have LΩ ≤ Ω ( πs ) ≤ UΩ , then max a∈A Qs ( a ) − τUΩ ≤ Ω∗ ( Qs ) ≤ max a∈A Qs ( a ) − τLΩ . ( 4 ) • Contraction : for any Q1 , Q2 ∈ RS×A ‖ Ω∗ ( Q1 ) − Ω∗ ( Q2 ) ‖∞≤ γ ‖ Q1 −Q2 ‖∞ . ( 5 ) Although the Legendre-Fenchel transform Ω∗ applies to every strongly convex function , for the purpose of this work we only consider a representative set of entropic regularizers .
The authors consider planning for Markov Decision Process. Precisely they study the benefit of convex regularization in Monte-Carlo Tree Search (MCTS). They generalize the E2W by xiao et al., 2019 by considering any strictly convex function as regularizer instead of the intial negative entropy. They provide a regret analysis of this algorithm named E3W and prove that EW3 converges at an exponential rate to the solution of the regularized objective function. Then they consider three particular instances MENTS with the Shannon entropy as a regularizer, RENTS with relative entropy to the previous policy as regularizer, and TENTS with the Tsallis entropy. They compare empirically these algorithms with PUCT as policy search in Alpha-go style MCTS on CartPol, Acrobot, and Atari games.
SP:46354d6dca2faa7f4553f9a00059c86178ab87e2
On the Effectiveness of Weight-Encoded Neural Implicit 3D Shapes
1 INTRODUCTION . While 3D surface representation has been a foundational topic of study in the computer graphics community for over four decades , recent developments in machine learning have highlighted the potential that neural networks can play as effective parameterizations of solid shapes . The success of neural approaches to shape representations has been evidenced both through their ability of representing complex geometries as well as their utility in end-to-end 3D shape learning , reconstruction , and understanding and tasks . These approaches also make use of the growing availability of user generated 3D content and high-fidelity 3D capture devices , e.g. , point cloud scanners . For these 3D tasks , one powerful configuration is to represent a 3D surface S as the set containing any point x ∈ R3 for which an implicit function ( i.e. , a neural network ) evaluates to zero : S : = { x ∈ R3|fθ ( x ; z ) = 0 } , ( 1 ) Implicit Explicit ( mesh ) where θ ∈ Rm are the network weights and z ∈ Rk is an input latent vector encoding a particular shape . In contrast to the de facto standard polygonal mesh representation which explicitly discretizes a surface ’ s geometry , the function f implicitly defines the shape S encoded in z . We refer to the representation in Eq . ( 1 ) as a latent-encoded neural implicit . Park et al . ( 2019 ) propose to optimize the weights θ so each shape Si ∈ D in a dataset or shape distribution D is encoded into a corresponding latent vector zi . If successfully trained , the weights θ of their DEEPSDF implicit function fθ can be said to generalize across the “ shape space ” of D. As always with supervision , reducing the training set from D will affect f ’ s ability to generalize and can lead to overfitting . Doing so may seem , at first , to be an ill-fated and uninteresting idea . Our work considers an extreme case – when the training set is reduced to a single shape Si . We can draw a simple but powerful conclusion : in this setting , one can completely forgo the latent vector ( i.e. , k = 0 ) . From the perspective of learning the shape space of D , we can “ purposefully overfit ” a network to a single shape Si : Si : = { x ∈ R3|fθi ( x ) = 0 } , ( 2 ) where θi now parameterizes a weight-encoded neural implicit for the single shape Si . In the pursuit of learning the “ space of shapes , ” representing a single shape as a weight-encoded neural implicit has been discarded as a basic validation check or stepping stone toward the ultimate goal of generalizing over many shapes ( see , e.g. , ( Chen & Zhang , 2019 ; Park et al. , 2019 ; Atzmon & Lipman , 2020a ; b ) ) . Weight-encoded neural implicits , while not novel , have been overlooked as a valuable shape representation beyond learning and computer vision tasks . For example , the original DEEPSDF work briefly considered – and nearly immediately discards – the idea of independently encoding each shape of a large collection : “ Training a specific neural network for each shape is neither feasible nor very useful. ” – Park et al . ( 2019 ) We propose training a specific neural network for each shape and will show that this approach is both feasible and very useful . I II III IV Point cloud × × • ×/• Mesh • × • × Regular grid • • × • Adaptive grid • • • × Neural implicit • • • • We establish that a weight-encoded neural implicit meets the criteria of a first-class representation for 3D shapes ready for direct use in graphics and geometry processing pipelines ( see inset table ) While common solid shape representations have some important features and miss others , neural implicits provide a new and rich constellation of features . Unstructured point clouds are often raw output from 3D scanners , but do not admit straightforward smooth surface visualization ( I ) . While meshes are the de facto standard representation , conducting signed distance queries and CSG operations remain non-trivial ( II ) . Signed distances or occupancies stored on a regular grid admit fast spatial queries and are vectorizeable just like 2D images , but they wastefully sample space uniformly rather than compactly adapt their storage budget to a particular shape ( III ) . Adaptive or sparse grids are more economical , but , just as meshes will have a different number of vertices and faces , adaptive grids will different storage profiles and access paths precluding consistent data vectorization ( IV ) . While previous methods have explored weight-encoded neural implicits as an intermediary representation for scene reconstruction ( e.g. , ( Mildenhall et al. , 2020 ) ) and noisy point-cloud surfacing tasks ( e.g. , ( Atzmon & Lipman , 2020a ; b ) ) , we consider neural implicits as the primary geometric representation . Beyond this observational contribution , our technical contributions include a proposed architecture and training regime for converting the ( current ) most widely-adopted 3D geometry format – polygonal meshes – into a weight-encoded neural implicit representation . We report on experiments1 with different architectures , sampling techniques , and activation functions – including positional encoding ( Mildenhall et al. , 2020 ) and sinusoidal activation approaches ( Sitzmann et al. , 2020b ) that have proven powerful in the context of neural implicits . Compared to existing training regimes , we benefit from memory improvements ( directly impacting visualization performance ) , stability to perturbed input data , and scalability to large datasets . Weight-encoded neural implicits can be treated as an efficient , lossy compression for 3D shapes . Increasing the size of the network increases the 3D surface accuracy ( see Figure 1 ) and , compared to standard graphics solutions for reducing complexity ( mesh decimation and storing signed distances on a regular grid ) , we achieve higher accuracy for the same memory footprint as well as maintaining a SIMD representation : n shapes can be represented as n weight-vectors for a fixed architecture . The benefits of converting an existing mesh to a neural implicit extends beyond compression : in approximating the signed distance field ( SDF ) of the model , neural implicits are both directly usable for many tasks in graphics and geometry processing , and preferable in many contexts compared to traditional representations . Many downstream uses of 3D shapes already mandate the conversion of meshes to less accurate grid-based SDFs , due to the ease and efficiency of computation for SDFs : here , neural implicits serve as a drop-in replacement . 1Source code , data , and demo at our ( anonymized ) repo : https : //github.com/u2ni/ICLR2021 Encoding : Latent Weight Interpolation : trivial non-trivial Scalability : poor excellent Stability : poor excellent Many works explore latent-encoding methods ( e.g. , ( Park et al. , 2019 ; Atzmon & Lipman , 2020a ; b ) ) , taking advantage of interpolation in latent space as a ( learned ) proxy for exploration in the “ space of shapes ” . We show that this flexibility comes at a direct cost of other desirable proprieties . In particular , we show that latentencoded neural implicits scale poorly as a representation for individual shapes both at training and inference time . Existing latent-encoded neural implicits are sensitive to the distribution of training data : while they may perform well for large datasets of a limited subclass of shapes ( e.g. , “ jet airplanes ” ) , we show that training fails with more general 3D shape datasets . Even within a class , existing methods rely on canonical orientation alignment ( see Figure 2 ) in order to alleviate some of this difficulty – such orientation are notably ( and notoriously ) not present in 3D shapes captured or authored in the wild and , as a result , latent-encoded neural implicits will fail to provide meaningful results for many real-world and practical shape datasets . Fitting latent-encoded neural implicits to each shape independently complicates shape space interpolation , rendering it difficult though not impossible ( Sitzmann et al. , 2020a ) . In contrast , weight-encoded neural implicits leverage the power of the neural network function space without the constraints imposed by the requirement of generalizing across shapes through latent sampling . 2 METHOD . Neural implicits soared in popularity over the last year . While significant attention has been given to perfecting network architectures and loss functions in the context of latent-encoding and pointcloud reconstruction , there is relatively little consideration of the conversion process from 3D surface meshes to weight-encoded neural implicits ( e.g. , both Park et al . ( 2019 ) and Sitzmann et al . ( 2020b ) consider this task briefly ) . We focus on identifying a setup to optimize weight-encoded neural implicits for arbitrary shapes robustly with a small number of parameters while achieving a high surface accuracy . Once successfully converted , we consider how the weight-encoded neural implicit representation compares to standard 3D model reduction techniques and how choosing this representation impacts downstream graphics and geometric modeling operations . 2.1 SIGNED DISTANCE FIELD REGRESSION . In general , the value of an implicit function f away from its zero-isosurface can be arbitrary . In shape learning , many previous methods have considered occupancy where f ( ~x ) outputs the likelihood of ~x being inside of a solid shape ( and extract the surface as the 50 % -isosurface ) Mildenhall et al . ( 2020 ) ; Mescheder et al . ( 2019 ) ; Littwin & Wolf ( 2019 ) ; Chen & Zhang ( 2019 ) ; Maturana & Scherer ( 2015 ) ; Wang et al . ( 2018 ) . We instead advocate that f should approximate the signed distance field ( SDF ) induced by a given solid shape . Learning properties aside ( see , e.g. , ( Park et al. , 2019 ) ) , SDFs are more immediately useful in graphics and geometry processing applications . Given a surface S = ∂V of a volumetric solid V ⊂ R3 , the signed distance field gS : R3 → R induced by S is a continuous function of space that outputs the distance of a query point ~x ∈ R3 modulated by ±1 depending on whether ~x is inside or outside of the solid : gS ( ~x ) = signS ( ~x ) min ~p∈S ‖~x− ~p‖ , where signS ( ~x ) = { −1 if ~x ∈ V , 1 otherwise . ( 3 ) Our goal is to regress a feed-forward network fθ to approximate the SDF of a given surface S : fθ ( ~x ) ≈ gS ( ~x ) . ( 4 ) If successfully trained , the weights θ ∈ Rm encode a neural implicit representing S . 2.1.1 ARCHITECTURE . Our proposed architecture is a feed-forward fully connected network with N layers , of hidden size H . Each hidden layer has ReLU non-linearities , while the output layer is activated by tanh . Increasing the depth and width of this network will generally improve accuracy but at the cost of increasing the memory footprint and , for example , the time required to render the surface . The weight-encoded neural implicit ’ s rendered in Figures 2 , 4 , and 8 all share a common architecture of just 8 fully connected layers with a hidden size of 32 ( resulting in just 7553 weights , or 59 kB in memory ) . Through experimentation on a subset of 1000 meshes from Thingi10k ( Zhou & Jacobson , 2016 ) , we find that this configuration yields a good balance between reconstruction accuracy , rendering speed , and memory impact ( Figure 1 ) . While maintaining acceptable surface quality , our default architecture has a 99 % reduction in number of parameters and 93 % speed up in “ time to render first frame ” compared to the default weight-encoding architecture of ( Park et al. , 2019 ) . Excited by the recent work exploring methods to overcome an MLP ’ s bias to learn low frequency signals faster , we performed experiments using both positional encodings ( Tancik et al. , 2020 ) and SIREN activations ( Sitzmann et al. , 2020b ) . Both perform well when the network architecture is sufficiently wide ( e.g. , H > 64 ) , but introduce surface noise with our more compact architecture . See Appendix A.3 for detailed experimental setup and findings . By increasing N and H , our network could in theory ( Hornik et al. , 1989 ) learn to emulate any arbitrary topology shape with infinite precision . In reality , like any representation , there are tradeoffs . The network complexity can be increased over our base configuration for smaller surface reconstruction error , or decreased for faster rendering speeds depending on the application . A sample of geometries produced at a number of configurations can be seen in Figure 1 .
The paper proposes a weight-encoded neural implicit representation for 3D shapes. The idea is to encode every shape in the network weights of its own designated small MLP network, instead of trying to learn a latent space of shapes. This leads to a really compact shape representation based on signed distance fields that could be interesting for many applications. The approach uses importance sampling to speed up training and robust losses.
SP:222cf20bdaa0a95c8dd13031acf16dd19ca3f318
Isometric Transformation Invariant and Equivariant Graph Convolutional Networks
1 INTRODUCTION . Graph-structured data embedded in Euclidean spaces can be utilized in many different fields such as object detection , structural chemistry analysis , and physical simulations . Graph neural networks ( GNNs ) have been introduced to deal with such data . The crucial properties of GNNs include permutation invariance and equivariance . Besides permutations , isometric transformation invariance and equivariance must be addressed when considering graphs in Euclidean spaces because many properties of objects in the Euclidean space do not change under translation and rotation . Due to such invariance and equivariance , 1 ) the interpretation of the model is facilitated ; 2 ) the output of the model is stabilized and predictable ; and 3 ) the training is rendered efficient by eliminating the necessity of data augmentation as discussed in the literature ( Thomas et al. , 2018 ; Weiler et al. , 2018 ; Fuchs et al. , 2020 ) .. Isometric transformation invariance and equivariance are inevitable , especially when applied to physical simulations , because every physical quantity and physical law is either invariant or equivariant to such a transformation . Another essential requirement for such applications is computational efficiency because the primary objective of learning a physical simulation is to replace a computationally expensive simulation method with a faster machine learning model . In the present paper , we propose IsoGCNs , a set of simple yet powerful models that provide computationally-efficient isometric transformation invariance and equivariance based on graph convolutional networks ( GCNs ) ( Kipf & Welling , 2017 ) . Specifically , by simply tweaking the definition of an adjacency matrix , the proposed model can realize isometric transformation invariance . Because the proposed approach relies on graphs , it can deal with the complex shapes that are usually presented using mesh or point cloud data structures . Besides , a specific form of the IsoGCN layer can be regarded as a spatial differential operator that is essential for describing physical laws . In addition , we have shown that the proposed approach is computationally efficient in terms of processing graphs with up to 1M vertices that are often presented in real physical simulations . Moreover , the proposed model exhibited faster inference compared to a conventional finite element analysis approach at the same level of accuracy . Therefore , an IsoGCN can suitably replace physical simulations regarding its power to express physical laws and faster , scalable computation . The corresponding implementation and the dataset are available online1 . The main contributions of the present paper can be summarized as follows : • We construct isometric invariant and equivariant GCNs , called IsoGCNs for the specified input and output tensor ranks . • We demonstrate that an IsoGCN model enjoys competitive performance against state-ofthe-art baseline models on the considered tasks related to physical simulations . • We confirm that IsoGCNs are scalable to graphs with 1M vertices and achieve inference considerably faster than conventional finite element analysis . 2 RELATED WORK . Graph neural networks . The concept of a GNN was first proposed by Baskin et al . ( 1997 ) ; Sperduti & Starita ( 1997 ) and then improved by ( Gori et al. , 2005 ; Scarselli et al. , 2008 ) . Although many variants of GNNs have been proposed , these models have been unified under the concept of message passing neural networks ( Gilmer et al. , 2017 ) . Generally , message passing is computed with nonlinear neural networks , which can incur a tremendous computational cost . In contrast , the GCN developed by Kipf & Welling ( 2017 ) is a considerable simplification of a GNN , that uses a linear message passing scheme expressed as Hout = σ ( ÂHinW ) , ( 1 ) where Hin ( Hout ) is an input ( output ) feature of the lth layer , Â is a renormalized adjacency matrix with self-loops , and W is a trainable weight . A GCN , among the variants of GNNs , is essential to the present study because the proposed model is based on GCNs for computational efficiency . Invariant and equivariant neural networks . A function f : X → Y is said to be equivariant to a group G when f ( g · x ) = g · f ( x ) , for all g ∈ G and x ∈ X , assuming that group G acts on both X and Y . In particular , when f ( g · x ) = f ( x ) , f is said to be invariant to the group G. Group equivariant convolutional neural networks were first proposed by Cohen & Welling ( 2016 ) for discrete groups . Subsequent studies have categorized such networks into continuous groups ( Cohen et al. , 2018 ) , three-dimensional data ( Weiler et al. , 2018 ) , and general manifolds ( Cohen et al. , 2019 ) . These methods are based on CNNs ; thus , they can not handle mesh or point cloud data structures as is . Specifically , 3D steerable CNNs ( Weiler et al. , 2018 ) uses voxels ( regular grids ) , which though relatively easy to handle , are not efficient because they represent both occupied and non-occupied parts of an object ( Ahmed et al. , 2018 ) . In addition , a voxelized object tends to lose the smoothness of its shape , which can lead to drastically different behavior in a physical simulation , as typically observed in structural analysis and computational fluid dynamics . Thomas et al . ( 2018 ) ; Kondor ( 2018 ) discussed how to provide rotation equivariance to point clouds . Specifically , the tensor field network ( TFN ) ( Thomas et al. , 2018 ) is a point cloud based rotation and translation equivariant neural network the layer of which can be written as H̃ ( l ) out , i = w ll H̃ ( l ) in , i + ∑ k≥0 ∑ j 6=i W lk ( xj − xi ) H̃ ( k ) in , j , ( 2 ) W lk ( x ) = k+l∑ J=|k−l| φlkJ ( ‖x‖ ) J∑ m=−J YJm ( x/‖x‖ ) QlkJm , ( 3 ) where H̃ ( l ) in , i ( H̃ ( l ) out , i ) is a type-l input ( output ) feature at the ith vertex , φ lk J : R≥0 → R is a trainable function , YJm is the mth component of the J th spherical harmonics , and QlkJm is the ClebschCordan coefficient . The SE ( 3 ) -Transformer ( Fuchs et al. , 2020 ) is a variant of the TFN with selfattention . These models achieve high expressibility based on spherical harmonics and message passing with nonlinear neural networks . However , for this reason , considerable computational resources 1https : //github.com/yellowshippo/isogcn-iclr2021 are required . In contrast , the present study allows a significant reduction in the computational costs because it eliminates spherical harmonics and nonlinear message passing . From this perspective , IsoGCNs are also regarded as a simplification of the TFN , as seen in equation 14 . Physical simulations using GNNs . Several related studies , including those by Sanchez-Gonzalez et al . ( 2018 ; 2019 ) ; Alet et al . ( 2019 ) ; Chang & Cheng ( 2020 ) focused on applying GNNs to learn physical simulations . These approaches allowed the physical information to be introduced to GNNs ; however , addressing isometric transformation equivariance was out of the scope of their research . In the present study , we incorporate isometric transformation invariance and equivariance into GCNs , thereby , ensuring the stability of the training and inference under isometric transformation . Moreover , the proposed approach is efficient in processing large graphs with up to 1M vertices that have a sufficient number of degrees of freedom to express complex shapes . 3 ISOMETRIC TRANSFORMATION INVARIANT AND EQUIVARIANT GRAPH CONVOLUTIONAL LAYERS . In this section , we discuss how to construct IsoGCN layers that correspond to the isometric invariant and equivariant GCN layers . To formulate a model , we assume that : 1 ) only attributes associated with vertices and not edges ; and 2 ) graphs do not contain self-loops . Here , G = ( V , E ) denotes a graph and d denotes the dimension of a Euclidean space . In this paper , we refer to tensor as geometric tensors , and we consider a ( discrete ) rank-p tensor field H ( p ) ∈ R|V|×f×dp , where |V| denotes the number of vertices and f ∈ Z+ ( Z+ denotes the positive integers ) . Here , f denotes the number of features ( channels ) of H ( p ) , as shown in Figure 1 ( a ) . With the indices , we denote H ( p ) i ; g ; k1k2 ... kp , where i permutes under the permutation of vertices and k1 , . . . , kp refers to the Euclidean representation . Thus , under the permutation , π : H ( p ) i ; g ; k1k2 ... kp 7→ H ( p ) π ( i ) ; g ; k1k2 ... kp , and under orthogonal transformation , U : H ( p ) i ; g ; k1k2 ... kp 7→ ∑ l1 , l2 , ... , lp Uk1l1Uk2l2 . . . UkplpH ( p ) i ; g ; l1l2 ... lp . 3.1 CONSTRUCTION OF AN ISOMETRIC ADJACENCY MATRIX . Before constructing an IsoGCN , an isometric adjacency matrix ( IsoAM ) , which is at the core of the IsoGCN concept must be defined . The proof of each proposition can be found in Appendix B . An IsoAM G ∈ R|V|×|V|×d is defined as : Rd 3 Gij ; ; : : = ∑ k , l∈V , k 6=l Tijkl ( xk − xl ) , ( 4 ) where Gij ; ; : is a slice in the spatial index of G , xi ∈ Rd is the position of the ith vertex ( rank1 tensor ) , and Tijkl ∈ Rd×d is an untrainable transformation invariant and orthogonal transformation equivariant rank-2 tensor . Note that we denote Gij ; ; k to be consistent with the no- tation of H ( p ) i ; g ; k1k2 ... kp because i and j permutes under the vertex permutation and k represents the spatial index while the number of features is always 1 . The IsoAM can be viewed as a weighted adjacency matrix for each direction and reflects spatial information while the usual weighted adjacency matrix can not because a graph has only one adjacency matrix . If the size of the set { Gij ; ; : 6= 0 } j is greater than or equal to d , then it can be deemed to be a frame , which is a generalization of a basis . For the simplest case , one can define Tijkl = δilδjkAijI ( Figure 1 ( b ) ) , where δij is the Kronecker delta , A is the adjacency matrix of the graph , and I is the identity matrix that is the simplest rank-2 tensor . In another case , Tijkl can be determined from the geometry of a graph , as defined in equation 16 . Nevertheless , in the bulk of this section , we retain Tijkl abstract to cover various forms of interaction , such as position-aware GNNs ( You et al. , 2019 ) . Here , G is composed of only untrainable parameters and thus can be determined before training . Proposition 3.1 . IsoAM defined in equation 4 is both translation invariant and orthogonal transformation equivariant , i.e. , for any isometric transformation ∀t ∈ R3 , U ∈ O ( d ) , T : x 7→ Ux+ t , T : Gij ; ; k 7→ ∑ l UklGij ; ; l. ( 5 ) Based on the definition of the GCN layer in the equation 1 , let G ∗ H ( 0 ) ∈ R|V|×f×d denote the convolution between G and the rank-0 tensor field H ( 0 ) ∈ R|V|×f ( f ∈ Z+ ) as follows : ( G ∗ H ( 0 ) ) i ; g ; k : = ∑ j Gij ; ; kH ( 0 ) j ; g ; . ( 6 ) With a rank-1 tensor field H ( 1 ) ∈ R|V|×f×d , let G H ( 1 ) ∈ R|V|×f and G G ∈ R|V|×|V| denote the contractions which are defined as follows : ( G H ( 1 ) ) i ; g ; : = ∑ j , k Gij ; ; kH ( 1 ) j ; g ; k , ( G G ) il ; ; : = ∑ j , k Gij ; ; kGjl ; k. ( 7 ) The contraction of IsoAMs G G can be interpreted as the inner product of each component in the IsoAMs . Thus , the subsequent proposition follows . Proposition 3.2 . The contraction of IsoAMs G G is isometric transformation invariant , i.e. , for any isometric transformation ∀t ∈ R3 , U ∈ O ( d ) , T : x 7→ Ux + t , G G 7→ G G. With a rank-p tensor field H ( p ) ∈ R|V|×f×dp , let G⊗H ( p ) ∈ R|V|×f×d1+p . and G⊗G ∈ R|V|×|V|×d2 denote the tensor products defined as follows : ( G⊗ H ( p ) ) i ; g ; km1m2 ... mp : = ∑ j Gij ; ; kH ( p ) j ; g ; m1m2 ... mp , ( 8 ) ( G⊗G ) il ; ; k1k2 : = ∑ j Gij ; ; k1Gjl ; ; k2 . ( 9 ) The tensor product of IsoAMs G⊗G can be interpreted as the tensor product of each of the IsoAMs components . Thus , the subsequent proposition follows : Proposition 3.3 . The tensor product of the IsoAMs G⊗G is isometric transformation equivariant in terms of the rank-2 tensor , i.e. , for any isometric transformation ∀t ∈ R3 , U ∈ O ( d ) , T : x 7→ Ux + t , and ∀i , j ∈ 1 , . . . , |V| , ( G⊗G ) ij ; ; k1k2 7→ Uk1l1Uk2l2 ( G⊗G ) ij ; ; l1l2 . This proposition is easily generalized to the tensors of higher ranks by defining the pth tensor power of G as follows : ⊗0 G = 1 , ⊗1 G = G , and ⊗p G = ⊗p−1 G⊗G . Namely , ⊗p G is isometric transformation equivariant in terms of rank-p tensor . Therefore , one can see that ( ⊗p G ) ⊗ H ( q ) = ( ⊗p−1 G ) ⊗ ( G ⊗ H ( q ) ) . Moreover , the convolution can be generalized for ⊗p G and the rank-0 tensor field H ( 0 ) ∈ R|V|×f as follows : [ ( p⊗ G ) ∗ H ( 0 ) ] i ; g ; k1k2 ... kp = ∑ j ( p⊗ G ) ij ; ; k1k2 ... kp H ( 0 ) j ; g ; . ( 10 )
The paper proposes a network that operates on features of graphs that are embedded in a d-dim Euclidean space. The paper considers equivariance to a group G that is the direct product of permutations of N points and Euclidean transformations. The features they consider are tensor products of the N-dimensional natural representations of permutations and the d-dimensional standard representation of O(d). From the coordinates, an “isometric adjacency matrix” is created, which is such a tensor. This matrix is combined in various G-equivariant ways with the features and then linearly combined with learnable weights to create new features. These operations are interleaved with non-linearities to form the network. The authors compare to several graph network methods and show competitive performance on several tasks.
SP:d4831b759e850c4a630024c55aa6ccd957d337e1
A Distributional Approach to Controlled Text Generation
1 INTRODUCTION . Neural language models , such as GPT-2/3 ( Radford et al. , 2019 ; Brown et al. , 2020a ) , pretrained on huge amounts of text , have become pre-eminent in NLP , producing texts of unprecedented quality . In this paper , we are concerned with the problem of controlling a generic pretrained LM in order to satisfy certain desiderata . For instance , we may want to avoid toxic content ; prevent certain demographic biases ; or steer generations towards a certain topic or style . Prior work , taking inspiration from Reinforcement Learning ( RL ) , has aimed at inducing autoregressive models to optimize global objectives using task specific rewards such as BLEU and ROUGE for Machine Translation and Summarization ( Ranzato et al. , 2016 ; Bahdanau et al. , 2017 ) , or hand crafted rewards ( Li et al. , 2016b ; Tambwekar et al. , 2019 ) to improve certain a priori desirable features . However , such an optimization process is not infallible ; Liu et al . ( 2016a ) noted that it often leads to “ degeneration ” , producing poor examples that improve the average reward but forgo coherence and fluency . This degeneration is often diagnosed as an effect of deviating too much from the original pretrained LM during optimization . Consequently , prior work has regarded proximity to the pretrained model as a prescription for sample quality . This view is most prominent in open-domain generation where no gold references are available for fine-tuning , making the pretrained LM itself the yardstick for fluency . Jaques et al . ( 2017 ) ; Ziegler et al . ( 2019 ) propose a conservative fine-tuning approach moderated by a KL penalty between the trained policy and the original LM , discouraging large deviations . A KL penalty was also used by Dathathri et al . ( 2020 ) , this time in a plug-and-play rather than a fine-tuning context . However , the authors show that balancing policy deviations from the original LM while also satisfying the control conditions is delicate . To combat degeneration they had to combine the KL penalty with post-norm fusion , reranking , and early-stopping procedures . ∗Equal Contributions . †Work done during an internship at NAVER Labs Europe . 1Code available on https : //github.com/naver/gdc Most of the existing work on Controlled Generation has taken what we refer to as a “ pointwise ” view , namely focusing on the quality of each individual output , a view that is encouraged by the standard RL goal of maximizing rewards computed at the individual level . Such techniques are incapable of enforcing “ distributional ” conditions , where some collective statistical properties are desired over the set of all generations . Distributional control is key to solving the problem of social biases in LMs trained on large , uncurated Web corpora . Those LMs - dubbed “ Stochastic Parrots ” in ( Bender et al. , 2021 ) - tend to encode hegemonic biases that are harmful to marginalized populations . There has been a large body of work analysing these distributional biases ( Blodgett et al. , 2020 ; Stanovsky et al. , 2019 ; Prates et al. , 2020 ; Sheng et al. , 2019a ; Brown et al. , 2020b ) . However , applying distributional control on pretrained models is still an understudied problem . Sheng et al . ( 2020 ) introduce a method relying on adversarial triggers ( Wallace et al. , 2019 ) ; this method does not de-bias the whole distribution but only obtains non-biased continuations of given prompts . Bordia & Bowman ( 2019 ) introduce a regularization term for reducing gender bias when training a language model from scratch ( as opposed to de-biasing a pretrained model ) .2 In this work , we present our Generation with Distributional Control ( GDC ) approach , in which we formalize the problem of controlled text generation as a constraint satisfaction problem over the probability distribution p representing the desired target LM . Namely , we require the expectations ( “ moments ” ) relative to p of certain output features to have specific values ; this permits for instance to condition all outputs to speak about sports ( a pointwise constraint ) , and 50 % of them to mention female characters ( a distributional constraint ) . Additionally , we require p to have a minimal KL divergence DKL ( p , a ) from the original pretrained LM a . This has the effect that p now inherits favorable linguistic qualities from a . As we will explain , this formulation is a generalization of the Maximum Entropy Principle and leads to a unique solution P ( x ) . P ( x ) is an unnormalized distribution , aka an Energy-Based Model ( EBM ) ( Hinton , 2002 ; LeCun et al. , 2006 ; Bakhtin et al. , 2020 ) , of which p ( x ) = 1/Z P ( x ) is the normalized version , where Z .= ∑ x P ( x ) is the partition function of P . Computing the EBM representation P is a crucial step , as it fully determines the optimal distribution p we are looking for . However , it is not the end of the story , because the representation thus obtained does not enable us to directly sample from p , an essential property of any LM.3 To this end , we introduce KL-adaptive DPG ( Distributional Policy Gradient ) , a variant of an algorithm recently proposed in ( Parshakova et al. , 2019b ) . We train the policy πθ to approximate p in an adaptive way , by speeding up the next round of approximations based on approximations previously obtained . At the end of this process , we obtain a final πθ , our target LM , on which we can estimate diverse metrics , including DKL ( p , πθ ) , measuring the approximation quality of πθ relative to the optimal p , and DKL ( πθ , a ) , measuring the divergence of πθ relative to the original LM a . This two-step approach differs from much research in NLP-oriented work with EBMs , which tends to use EBM representations inside the training loops of neural networks , blurring different dimensions of the problem . By contrast — similarly to Parshakova et al . ( 2019a ; b ) in a different context — we clearly decouple the relatively simple problem of determining a “ pivot ” optimal EBM from the more difficult problem of exploiting this EBM at inference time , Such decoupling is valuable , because it permits to better diagnose the important challenges to focus on . Overall , our contributions can be summarized as follows : 1 . We introduce a Distributional View for controlled text generation formalized as a constraint satisfaction problem combined with a divergence minimization objective , providing a single framework both for “ distributional ” constraints ( collective statistical requirements ) and for “ pointwise ” constraints ( hard requirements on each individual ) ( §2.1 ) . To our knowledge , this is the first framework with such generality for controlled text generation . 2 . We show how these constraints lead to an optimal EBM for the target model ( §2.2 ) , propose the KL-Adaptive DPG algorithm for approximating the optimal EBM distribution by 2Additional Related Work is provided in §E . We use §A , §B ... to refer to sections in the Appendix . 3One possible sampling approach here would be to employ MCMC techniques , such as Metropolis- Hastings ( Robert & Casella , 2005 ) . These come with theoretical convergence guarantees in the limit but in practice convergence can be very difficult to assess , and furthermore , obtaining samples can be extremely slow . an autoregressive policy ( §2.3 ) , and show the effectiveness of this adaptive technique for obtaining faster convergence ( §B.2 ) . 3 . We conduct experiments in a number of pointwise and distributional conditions , assessing results in terms of divergence from GPT-2 , fluency and diversity , with better performance than strong baselines . The distributional experiments show the potential of our approach as a remedy to the current and important problem of bias in pretrained language models , providing a novel direction for addressing it ( §3 ) . 2 FORMALIZATION . We denote byX the set of all sequences x of bounded length Lmax , by a the initial pretrained model and by p the desired target model . The probabilities of x according to each model are a ( x ) and p ( x ) . Our approach consists in expressing our desiderata through constraints on the desired values µ̄i of the expectations ( aka moments ) µi . = Ex∼p φi ( x ) of certain predefined real-valued feature functions φi ( x ) , for i ∈ { 1 , . . . , k } . To illustrate , the previous example can be expressed by using two binary features , φ1 ( x ) = 1 iff x is classified as speaking about sports , φ2 ( x ) = 1 iff x mentions a female character . Then our “ moment constraints ” take the following form : µ1 = Ex∼p φ1 ( x ) = 1.0 , µ2 = Ex∼p φ2 ( x ) = 0.5 . The first ( pointwise ) constraint implies that each individual x has to speak about sports ( otherwise µ1 could not reach its maximum value 1.0 ) , the second ( distributional ) constraint that 50 % of the x ’ s have to mention a female character.4 Let C be the set of all distributions c over X that satisfy the moment constraints . We then propose to specify p as a distribution respecting the constraints , but also minimizing KL divergence from a : p . = arg min c∈C DKL ( c , a ) , ( 1 ) Equation ( 1 ) is a generalization of the Maximum Entropy Principle of Jaynes ( 1957 ) , which corresponds to the limit case where a is the uniform u distribution over X , noting that minimizing DKL ( c , u ) is equivalent to maximizing the entropy of c under the constraints — in other words , trying to find the least “ specific ” distribution satisfying the constraints . 2.1 CONSTRAINTS , INFORMATION GEOMETRY , EXPONENTIAL FAMILIES . To recap our formal approach , we have a finite setX , a distribution a overX s.t . a ( x ) > 0 , ∀x ∈ X , and real functions φ1 , ... , φk overX . We specify moment constraints µi = µ̄i on distributions c over X , where µi . = Ex∼c φi ( x ) and the µ̄i ’ s are given targets ; the set of distributions satisfying these constraints is denoted by C. Our Problem is to find a p such that p = arg minc∈C DKL ( c , a ) . We follow Csiszár & Shields ( 2004 ) on this question , a problem that is at the core of the field of Information Geometry ( Nielsen , 2018 ; Amari & Nagaoka , 2000 ) . Under the assumption that C 6= ∅ , they prove the following result ( also see §A.1 ) : 4This example uses only binary features , but real-valued features can also be used , for instance scores returned by a soft classifier . Theorem 1 ( A ) There exists a unique solution p to the problem above , obtained as p ( x ) ∝ P ( x ) where P is in exponential family form : P ( x ) = a ( x ) 1 [ x ∈ XC ] e ∑ i λiφi ( x ) . ( 2 ) In other words p ( x ) = 1/Z P ( x ) , with Z = ∑ x∈X P ( x ) ; P is an unnormalized distribution , i.e . an EBM . Here XC = { x ∈ X| ∃c ∈ C s.t . c ( x ) > 0 } is the “ support set ” associated with C. The λi ’ s are real numbers called the natural parameters associated with the moments µi . ( B ) p can be approximated to arbitrary precision by distributions p of the form : p ( x ) ∝ a ( x ) e ∑ i λ , iφi ( x ) ( 3 ) for appropriate real values of the λ , i . ( C ) p satisfies the Pythagorean Identity : DKL ( c , a ) = DKL ( c , p ) +DKL ( p , a ) , ∀c ∈ C ( see Fig 1 ) . The advantage of this version of the connection between Generalized Maximum Entropy and Exponential Families is its generality , which distinguishes it from other presentations , and which makes it ideal for unified application to pointwise , distributional or hybrid constraints . In the special case of only pointwise constraints , of the form Ex∼cφi ( x ) = 1.0 , i ∈ [ 1 , k ] , with φi ( x ) ∈ { 0 , 1 } , let ’ s define the predicate b ( x ) to be 1 iff x satisfies all the constraints . Then , using the ( A ) form of the result , it is an easy exercise ( see §A.2 ) to prove that XC = { x ∈ X| b ( x ) = 1 } and that one has p ( x ) ∝ a ( x ) b ( x ) . In this case P ( x ) = a ( x ) b ( x ) is a very simple EBM that does not involve an exponential part ; this is the EBM form that we use for experiments involving only pointwise constraints . In the general case where some constraints are distributional , the determination ofXC is not as direct , and we prefer to use the approximation provided by ( B ) , which permits a generic implementation . With only distributional constraints , an exact solution is typically obtained with finite λ ’ s . With hybrid constraints , some of the λ ’ s may tend to infinite ( positive or negative ) values but thresholding them suffices to get a good approximation . 2.2 FROM MOMENT CONSTRAINTS TO EBM Algorithm 1 Computing λ Input : a , features φ , imposed moments µ̄ 1 : sample a batch x1 , . . . , xN from a 2 : for each j ∈ [ 1 , N ] : wj ( λ ) ← eλ·φ ( xj ) 3 : µ̂ ( λ ) ← ∑N j=1 wj ( λ ) φ ( xj ) ∑N j=1 wj ( λ ) 4 : solve by SGD : arg minλ ||µ̄− µ̂ ( λ ) ||22 Output : parameter vector λ Let ’ s now consider a set of desired moment constraints µ̄.5 In the general case ( i.e. , when some constraints are distributional ) , we use Theorem 1 . ( B ) , which says that the desired energy-based model P can be approximated arbitrarily closely in the following form : P ( x ) . = a ( x ) eλ·φ ( x ) . ( 4 ) This EBM defines the desired normalized distribution p ( x ) .= P ( x ) Z , where Z . = ∑ x P ( x ) . What is left is to learn appropriate values for the parameter vector λ s.t . : Ex∼pφ ( x ) ' µ̄ . ( 5 ) We address this problem through Algorithm 1 . First , we sample a large number N of sequences x1 . . . xj . . . xN from a . On line 2 , we define “ importance weights ” wj ( λ ) . = P ( xj ) a ( xj ) = exp 〈λ , φ ( xj ) 〉 . On line 3 , we then use SNIS ( Self Normalized Importance Sampling ) ( Kim & Bengio , 2016 ; Parshakova et al. , 2019a ) to estimate µ ( λ ) .= Ex∼pφ ( x ) . SNIS consists in computing : µ̂ ( λ ) = ∑N j=1 wj ( λ ) φ ( xj ) ∑N j=1 wj ( λ ) , ( 6 ) 5Boldface φ and µ represents vectors of real values ( features and moments ) . and it can be shown that µ̂ ( λ ) ' µ ( λ ) , with convergence in the limit ( Owen , 2013 ) . Note that the estimate µ̂ ( λ ) is obtained not as a single number , but as a parametric function of the variable λ . We want to find λ such that µ̂ ( λ ) = µ̄ , a question that we handle on line 4 by performing an SGD optimization over the objective min ||µ̄− µ̂ ( λ ) ||22.6 At the end of this process , we obtain an estimated value for the parameter vector λ , and a representation P ( x ) = a ( x ) exp 〈λ , φ ( x ) 〉 . While a ( x ) is a normalized distribution by construction , the introduction of the second factor loses this normalization property , making P ( x ) an EBM.7 8
The paper studies the controlled sequence generation problem based on pretrained language models, i.e., controlling a generic pretrained LM to satisfy certain constraints, e.g., removing certain biases in language models. Specifically, the paper proposes a distributional view and imposes constraints based on collective statistical properties. The problem is formalized as a constraint satisfaction problem, minimizing a divergence objective. The paper proposes to use KL-Adaptive DPG algorithm for approximating the optimal energy-based model distribution. Experiments were conducted over both pointwise constraints and distributional constraints, showing the effectiveness of the model over the compared baselines.
SP:41a9a0e893ccd973ebf57ca7f99b9b6f22e8d339
Self-training For Few-shot Transfer Across Extreme Task Differences
1 INTRODUCTION . Despite progress in visual recognition , training recognition systems for new classes in novel domains requires thousands of labeled training images per class . For example , to train a recognition system for identifying crop types in satellite images , one would have to hire someone to go to the different locations on earth to get the labels of thousands of satellite images . The high cost of collecting annotations precludes many downstream applications . This issue has motivated research on few-shot learners : systems that can rapidly learn novel classes from a few examples . However , most few-shot learners are trained on a large base dataset of classes from the same domain . This is a problem in many domains ( such as medical imagery , satellite images ) , where no large labeled dataset of base classes exists . The only alternative is to train the fewshot learner on a different domain ( a common choice is to use ImageNet ) . Unfortunately , few-shot learning techniques often assume that novel and base classes share modes of variation ( Wang et al. , 2018 ) , class-distinctive features ( Snell et al. , 2017 ) , or other inductive biases . These assumptions are broken when the difference between base and novel is as extreme as the difference between object classification in internet photos and pneumonia detection in X-ray images . As such , recent work has found that all few-shot learners fail in the face of such extreme task/domain differences , underperforming even naive transfer learning from ImageNet ( Guo et al. , 2020 ) . Another alternative comes to light when one considers that many of these problem domains have unlabeled data ( e.g. , undiagnosed X-ray images , or unlabeled satellite images ) . This suggests the possibility of using self-supervised techniques on this unlabeled data to produce a good feature representation , which can then be used to train linear classifiers for the target classification task using just a few labeled examples . Indeed , recent work has explored self-supervised learning on a variety of domains ( Wallace & Hariharan , 2020 ) . However , self-supervised learning starts tabula rasa , and as such requires extremely large amounts of unlabeled data ( on the order of millions of images ) . With more practical unlabeled datasets , self-supervised techniques still struggle to outcompete naive ImageNet transfer ( Wallace & Hariharan , 2020 ) . We are thus faced with a conundrum : on the one hand , few-shot learning techniques fail to bridge the extreme differences between ImageNet and domains such as X-rays . On the other hand , self-supervised techniques fail when they ignore inductive biases from ImageNet . A sweet spot in the middle , if it exists , is elusive . In this paper , we solve this conundrum by presenting a strategy that adapts feature representations trained on source tasks to extremely different target domains , so that target task classifiers can then be trained on the adapted representation with very little labeled data . Our key insight is that a pre-trained base classifier from the source domain , when applied to the target domain , induces a grouping of images on the target domain . This grouping captures what the pre-trained classifier thinks are similar or dissimilar in the target domain . Even though the classes of the pre-trained classifier are themselves irrelevant in the target domain , the induced notions of similarity and dissimilarity might still be relevant and informative . This induced notion of similarity is in contrast to current self-supervised techniques which often function by considering each image as its own class and dissimilar from every other image in the dataset ( Wu et al. , 2018 ; Chen et al. , 2020 ) . We propose to train feature representations on the novel target domain to replicate this induced grouping . This approach produces a feature representation that is ( a ) adapted to the target domain , while ( b ) maintaining prior knowledge from the source task to the extent that it is relevant . A discerning reader might observe the similarity of this approach to self-training , except that our goal is to adapt the feature representation to the target domain , rather than improve the base classifier itself . We call our approach “ Self Training to Adapt Representations To Unseen Problems ” , or STARTUP . In a recently released BSCD-FSL benchmark consisting of datasets from extremely different domains ( Guo et al. , 2020 ) , we show that STARTUP provides significant gains ( up to 2.9 points on average ) over few-shot learning , transfer learning and self-supervision state-of-the-art . To the best of our knowledge , ours is the first attempt to bridge such large task/domain gaps and successfully and consistently outperform naive transfer in cross-domain few-shot learning . 2 PROBLEM SETUP . Our goal is to build learners for novel domains that can be quickly trained to recognize new classes when presented with very few labeled data points ( “ few-shot ” ) . Formally , the target domain is defined by a set of data points ( e.g . images ) XN , an unknown set of classes ( or label space ) YN , and a distribution DN over XN × YN . A “ few-shot learning task ” in this domain will consist of a set of classes Y ⊂ YN , a very small training set ( “ support ” ) S = { ( xi , yi ) } ni=1 ∼ DnN , yi ∈ Y and a small test set ( “ query ” ) Q = { xi } mi=1 ∼ DmN When presented with such a few-shot learning task , the learner must rapidly learn the classes presented and accurately classify the query images . As with prior few-shot learning work , we will assume that before being presented with few-shot learning tasks in the target domain , the learner has access to a large annotated dataset DB known as the base dataset . However , crucially unlike prior work on few-shot learning , we assume that this base dataset is drawn from a very different distribution . In fact , we assume that the base dataset is drawn from a completely disjoint image space XB and a disjoint set of classes YB : DB = { ( xi , yi ) } NBi=1 ⊂ XB × YB where XB is the set of data ( or the source domain ) and YB is the set of base classes . Because the base dataset is so different from the target domain , we introduce another difference vis-a-vis the conventional few-shot learning setup : the learner is given access to an additional unlabeled dataset from the target domain : Du = { xi } Nui=1 ∼ DN Nu Put together , the learner will undergo two phases . In the representation learning phase , the learner will pre-train its representation on DB and Du ; then it goes into the evaluation phase where it will be presented few-shot tasks from the target domain where it learns the novel classes ( Figure 1 ) . 3 RELATED WORK . Few-shot Learning ( FSL ) . This paper explores few-shot transfer , and as such the closest related work is on few-shot learning . Few-shot learning techniques are typically predicated on some degree of similarity between classes in the base dataset and novel classes . For example , they may assume that features that are discriminative for the base classes are also discriminative for the novel classes , suggesting a metric learning-based approach ( Gidaris & Komodakis , 2018 ; Qi et al. , 2018 ; Snell et al. , 2017 ; Vinyals et al. , 2016 ; Sung et al. , 2018 ; Hou et al. , 2019 ) or transfer learning-based approach ( Chen et al. , 2019b ; Wang et al. , 2019 ; Kolesnikov et al. , 2020 ; Tian et al. , 2020 ) . Alternatively , they may assume that model initializations that lead to rapid convergence on the base classes are also good initializations for the novel classes ( Finn et al. , 2017 ; 2018 ; Ravi & Larochelle , 2017 ; Nichol & Schulman ; Rusu et al. , 2019 ; Sun et al. , 2019 ; Lee et al. , 2019 ) . Other methods assume that modes of intra-class variation are shared , suggesting the possibility of learned , class-agnostic augmentation policies ( Hariharan & Girshick , 2017 ; Wang et al. , 2018 ; Chen et al. , 2019c ) . Somewhat related is the use of a class-agnostic parametric model that can “ denoise ” few-shot models , be they from the base or novel classes ( Gidaris & Komodakis , 2018 ; 2019 ) . In contrast to such strong assumptions of similarity between base and novel classes , this paper tackles few-shot learning problems where base and novel classes come from very different domains , also called cross-domain few-shot learning . Cross-domain Few-shot Classification ( CD-FSL ) . When the domain gap between the base and novel dataset is large , recent work ( Guo et al. , 2020 ; Chen et al. , 2019b ) has shown that existing stateof-the-art few-shot learners fail to generalize . Tseng et al . ( 2020 ) attempt to address this problem by simulating cross-domain transfer during training . However , their approach assumes access to an equally diverse array of domains during training , and a much smaller domain gap at test time : for example , both base and novel datasets are from internet images . Another relevant work ( Ngiam et al. , 2018 ) seeks to build domain-specific feature extractor by reweighting different classes of examples in the base dataset based on the target novel dataset but their work only investigates transfer between similar domains ( both source and target are internet images ) . Our paper tackles a more extreme domain gap . Another relevant benchmark for this problem is ( Zhai et al. , 2019 ) but they assume access to more annotated examples ( 1k annotations ) during test time than the usual FSL setup . Few-shot learning with unlabeled data . This paper uses unlabeled data from the target domain to bridge the domain gap . Semi-supervised few-shot learning ( SS-FSL ) ( Ren et al. , 2018 ; Li et al. , 2019 ; Yu et al. , 2020 ; Rodrı́guez et al. , 2020 ; Wang et al. , 2020 ) and transductive few-shot learning ( T-FSL ) ( Liu et al. , 2019 ; Dhillon et al. , 2020 ; Hou et al. , 2019 ; Wang et al. , 2020 ; Rodrı́guez et al. , 2020 ) do use such unlabeled data , but only during evaluation , assuming that representations trained on the base dataset are good enough . In contrast our approach leverages the unlabeled data during representation learning . The two are orthogonal innovations and can be combined . Self-Training . Our approach is closely related to self-training , which has been shown to be effective for semi-supervised training and knowledge distillation . In self-training , a teacher model trained on the labeled data is used to label the unlabeled data and another student model is trained on both the original labeled data and the unlabeled data labeled by the teacher . Xie et al . ( 2020 ) and Yalniz et al . ( 2019 ) have shown that using self-training can improve ImageNet classification performance . Knowledge distillation ( Hinton et al. , 2015 ) is similar but aims to compress a large teacher network by training a student network to mimic the prediction of the teacher network . A key difference between these and our work is that self-training / knowledge distillation focus on a single task of interest , i.e , there is no change in label space . Our approach is similar , but we are interested in transferring to novel domains with a wholly different label space : an unexplored scenario . Domain Adaptation . Transfer to new domains is also in the purview of domain adaptation ( Tzeng et al. , 2017 ; Hoffman et al. , 2018 ; Long et al. , 2018 ; Xu et al. , 2019 ; Laradji & Babanezhad , 2020 ; Wang & Deng , 2018 ; Wilson & Cook , 2020 ) where the goal is to transfer knowledge from the labelabundant source domain to a target domain where only unlabeled data is available . In this realm , self-training has been extensively explored ( Zou et al. , 2018 ; Chen et al. , 2019a ; Zou et al. , 2019 ; Zhang et al. , 2019 ; Mei et al. , 2020 ) . However , a key assumption in domain adaptation is that the source domain and target domain share the same label space which does not hold for FSL . Self-supervised Learning . Learning from unlabeled data has seen a resurgence of interest with advances in self-supervised learning . Early self-supervised approaches were based on handcrafted “ pretext tasks ” such as solving jigsaw puzzles ( Noroozi & Favaro , 2016 ) , colorization ( Zhang et al. , 2016 ) or predicting rotation ( Gidaris et al. , 2018 ) . A more recent ( and better performing ) line of self-supervised learning is contrastive learning ( Wu et al. , 2018 ; Misra & Maaten , 2020 ; He et al. , 2020 ; Chen et al. , 2020 ) which aims to learn representations by considering each image together with its augmentations as a separate class . While self supervision has been shown to boost few-shot learning ( Gidaris et al. , 2019 ; Su et al. , 2020 ) , its utility in cases of large domain gaps between base and novel datasets have not been evaluated . Our work focuses on this challenging scenario .
Problem: The paper introduces the problem of few-shot transfer when there is an extreme difference between the base task and the target task. The usual few-shot learning setup considers a representation that is trained on a large amount of labeled data. This base representation is then fine-tuned for the target task (that has a few examples, say 1 or 5 labeled examples per class). This strategy works well when the data distribution of the base and target task is similar. However, few-shot learners fail when the data distribution for the two domains are different (e.g., imagenet and crop-diseases) as shown by Guo et al., 2020.
SP:0961e5b8ac98e0d66b599c7b91bd636a75d07b35
Augmentation-Interpolative AutoEncoders for Unsupervised Few-Shot Image Generation
1 INTRODUCTION . Modern generative models can synthesize high-quality ( Karras et al. , 2019 ; Razavi et al. , 2019 ; Zhang et al. , 2018a ) , diverse ( Ghosh et al. , 2018 ; Mao et al. , 2019 ; Razavi et al. , 2019 ) , and highresolution ( Brock et al. , 2018 ; Karras et al. , 2017 ; 2019 ) images of any class , but only given a large training dataset for these classes ( Creswell et al. , 2017 ) . This requirement of a large dataset is impractical in many scenarios . For example , an artist might want to use image generation to help create concept art of futuristic vehicles . Smartphone users may wish to animate a collection of selfies , or researchers training an image classifier might wish to generate augmented data for rare classes . These and other applications will require generative models capable of synthesizing images from a large , ever-growing set of object classes . We can not rely on having hundreds of labeled images for all of them . Furthermore , most of them will likely be unknown at the time of training . We therefore need generative models that can train on one set of image classes , and then generalize to a new class using only a small quantity of new images : few-shot image generation . Unfortunately , we find that the latest and greatest generative models can not even represent novel classes in their latent space , let alone generate them on demand ( Figure 1 ) . Perhaps because of this generalization challenge , recent attempts at few-shot image generation rely on undesirable assumptions and compromises . They need impractically large labeled datasets of hundreds of classes ( Edwards & Storkey , 2016 ) , involve substantial computation at test time ( Clouâtre & Demers , 2019 ) , or are highly domain-specific , generalizing only across very similar classes ( Jitkrittum et al. , 2019 ) . In this paper , we introduce a strong , efficient , unsupervised baseline for few-shot image generation that avoids all the above compromises . We leverage the finding that although the latent spaces of powerful generative models , such as VAEs and GANs , do not generalize to new classes , the representations learned by autoencoders ( AEs ) generalize extremely well . The AEs can then be converted into generative models by training them to interpolate between seed images ( Sainburg et al. , 2018 ; Berthelot et al. , 2018 ; Beckham et al. , 2019 ) . These Interpolative AutoEncoders ( IntAEs ) would seem a natural fit for few-shot image generation . Unfortunately , we also find that although IntAEs can reproduce images from novel classes , the ability to interpolate between them breaks down upon leaving the training domain . To remedy this , we introduce a new training method based on data augmentation , which produces smooth , meaningful interpolations in novel domains . We demonstrate on three different settings ( handwritten characters , faces and general objects ) that our Augmentation-Interpolative Autoencoder ( AugIntAE ) achieves simple , robust , highly general , and completely unsupervised few-shot image generation . 2 RELATED WORK . 2.1 GENERATIVE MODELING . AEs were originally intended for learned non-linear data compression , which could then be used for downstream tasks ; the generator network was discarded ( Kramer , 1991 ; Hinton & Salakhutdinov , 2006 ; Masci et al. , 2011 ) . VAEs do the opposite : by training the latent space toward a prior distribution , the encoder network can be discarded at test time instead . New images are sampled directly from the prior ( Kingma & Welling , 2013 ) . Subsequent models discard the encoder network entirely . GANs sample from a noise distribution and learn to generate images which fool a concurrently-trained real/fake image discriminator ( Goodfellow et al. , 2014 ) . Bojanowski et al . ( 2017 ) and Hoshen et al . ( 2019 ) treat latent codes as learnable parameters directly , and train separate sampling procedures for synthesizing the novel images . Recent work has also seen a return to AEs as conditional generators , by training reconstruction networks to interpolate smoothly between pairs or sets of seed images . This is accomplished by combining the reconstruction loss on seed images with an adversarial loss on the seed and interpolated images . Different forms of adversarial loss ( Sainburg et al. , 2018 ; Berthelot et al. , 2018 ) and interpolation ( Beckham et al. , 2019 ) have been proposed . While all of these approaches generate new images , it is unclear if any of them can generalize to novel domains . Some results suggest the opposite : a VAE sufficiently powerful to model the training data becomes incapable of producing anything else ( Bozkurt et al. , 2018 ) . 2.2 FEW-SHOT IMAGE GENERATION . Current attempts at few-shot image generation span a wide range of approaches and models . Neural Statistician , an early attempt , is similar to the AE in that it is built for few-shot classification , and largely discards the generative capability ( Edwards & Storkey , 2016 ) . Generation-oriented iterations exist , but likewise depend on a large , varied , labelled dataset for training ( Hewitt et al. , 2018 ) . Other approaches based on few-shot classification include generative matching networks ( Bartunov & Vetrov , 2018 ) and adversarial meta-learning ( Clouâtre & Demers , 2019 ) . These models also depend on heavy supervision , and are fairly complicated , involving multiple networks and training procedures working in tandem - making them potentially difficult to train in practice reliably . Separate work has approached few-shot image generation from the side of generative modeling . Wang et al . ( 2018 ) , Noguchi & Harada ( 2019 ) and Wu et al . ( 2018 ) investigate the ability of GANs to handle domain adaptation via fine-tuning - thus requiring substantial computation , and more novel class examples than are available in the few-shot setting . Zhao et al . ( 2020 ) train GANs directly from few examples , though still more than are at hand for few-shot learning , and can be considered orthogonal work , as AugIntAE can serve as a useful pre-trained initialization . Antoniou et al . ( 2017 ) and Liu et al . ( 2019 ) use adversarial training to produce feed-forward few-shot generators . However , both models still depend on varied , labelled training data , and risk exhibiting the same problems as standard GANs : mode collapse and hyperparameter sensitivity ( Arora et al. , 2017 ; 2018 ) . Jitkrittum et al . ( 2019 ) introduce an algorithm for class-conditioning an unconditioned generative model . New images are produced by matching latent space batch statistics to real images from a single , possibly novel class . Nguyen et al . ( 2017 ) learn individual latent codes from a pretrained discriminator , while Wang et al . ( 2020 ) train a latent sampling network . These approaches have little to no evaluation on novel classes , and to what degree they generalize depends entirely on the pretrained image generator . They may also require substantial test-time computation . In contrast , AugIntAEs are lightweight , train robustly , and generalize broadly from completely unlabelled data . 3 PROBLEM SETUP . Let X be a large , unlabelled collection of images depicting objects from a set of classes C. Let X ′ be a very small set of images - as few as two - belonging to a novel class c′ 6∈ C. Our goal is to train a network on X which , given X ′ , generates images clearly belonging to c′ . We refer to this as the network ’ s ability to generalize to new domains ( note that this usage is distinct from “ generalizing ” to novel images in the same domain , a much simpler task ) . We can not directly adapt the network to X ′ using SGD , as X ′ contains too few images to prevent overfitting . This is an extremely difficult problem , since it is unclear if a neural network trained to model the data distribution in X can even represent images from a different distribution , let alone sample from it . Therefore , we first examine whether existing generative models can faithfully encode novel class images in latent space . We train a VAE and a WGAN-GP ( Gulrajani et al. , 2017 ) on MNIST handwritten digits ( LeCun et al. , 1998 ) , as well as an encoder network that inverts the WGAN-GP as in Bau et al . ( 2019 ) ( details in appendix ) . We then evaluate the ability of each generative model to recover particular images . Using the built-in VAE encoder and the WGAN-GP inversion network , we find that while both models can reconstruct training images ( Fig . 2 , top ) , the same approach fails on images from novel classes - in this case , EMNIST handwritten letters ( Cohen et al. , 2017 ) . The outputs do not much resemble the inputs ; crucial semantic information is lost ( Fig . 2 , bottom ) . To discount the possibility of sub-optimal encoders , we simulate an oracle encoder , refining the latent code parameters for each image directly via SGD . These reconstructions are not much better . Fig . 1 demonstrates a similar failure in a large , state-of-the-art pretrained GAN . This confirms prior findings ( Bozkurt et al. , 2018 ) that current generative approaches by default can not even represent images from novel classes . Generating new novel class images is simply out of the question . Why do sophisticated generative models fail to generalize ? We argue this is largely by design . Generative models such as VAEs and GANs are trained to minimize the divergence between a prior distribution and a learned posterior distribution , where one or both are approximated by repeated sampling . VAEs push the learned latent posterior toward a Gaussian prior , while GANs map samples from the prior to a posterior distribution in image space . In both cases , latent vectors are repeatedly sampled and sent through the generator . Thus , by the time the generator is trained to convergence , and the posterior approaches the prior ( or vice-versa ) , every region of the latent space feasible under the prior will have been mapped at some point to a training image - or , in the case of GANs , to an image indistinguishable from a training image . This means that a properly trained VAE or GAN can not construct or reconstruct new object classes . If it could , then it would have been able to sample such images during training - which would mean it had not been properly trained at all . 4 AUGMENTATION-INTERPOLATIVE AUTOENCODERS . AutoEncoders : As discussed above , minimizing the divergence between prior and posterior training distributions ensures good image synthesis , but poor generalization . The opposite could also hold : AEs do not enforce any latent distribution on the data posterior , and so might generalize well . More formally , given a network E that maps an image x to latent vector z , and a generator G mapping z back to image space , we refer to the function composition G ( E ( · ) ) as the autoencoder . E and G are trained jointly over X to minimize the pixel reconstruction error between x ∈ X and G ( E ( x ) ) . The question of generalization becomes , to what degree does a trained AE maintain close proximity between x′ and G ( E ( x′ ) ) for x′ which lies far from the data manifold of X ? By this measure , we find that our conjecture holds : AEs generalize surprisingly well . Examples are given in Fig . 3 , demonstrating near-perfect generalization performance over three pairs of classdisjoint datasets : MNIST digits to EMNIST letters , Omniglot training alphabets to Omniglot testing alphabets ( Lake et al. , 2015 ) , and CIFAR-10 to CIFAR-100 ( Krizhevsky et al. , 2009 ) . We also quantitatively evaluate generalization ( in terms of reconstruction error ) between all the above pairs , as well as between Omniglot and MNIST/EMNIST , which includes domain shifts , e.g. , stroke width ( Table 1 ) . Reconstruction quality is high across the board , especially given that the MNIST and CIFAR-10 networks learn only ten distinct classes ! AEs exhibit very little overfitting to the training domain , learning a general mapping despite heavy class constraints . It is possible that this generalization is a result of AEs simply learning an identity function . Fortunately , this is not the case : AEs learn clear image priors . We find that our trained AEs are much more effective at encoding real images than noise ( see Fig . 3 , right ) . We also find that low-frequency noise is encoded more faithfully than high-frequency noise - an analysis is provided in appendix . The learned AE mapping , while general , is also nontrivial . Interpolative AutoEncoders : The fact that AEs generalize suggests they are capable of acting as few-shot image generators for novel classes , given a method for sampling appropriate latent z vectors . One possibility is to interpolate between data points in latent space : every sampled point is a weighted sum of two or more real points . This allows us to produce novel combinations of seed images without changing the semantic content . Unfortunately , it is a known fact that AEs do not interpolate well , as shown in Fig . 5 , row 2 ( Berthelot et al. , 2018 ) . Prior work ( Sainburg et al. , 2018 ; Berthelot et al. , 2018 ; Beckham et al. , 2019 ) addresses this by applying an adversarial loss to the interpolated images , which works well in the training domain . However , we find the Interpolative AutoEncoder ( IntAE ) approach overly restrictive for our purposes : it constrains all interpolations between arbitrary image pairs to the training domain . For example , on MNIST , an IntAE must produce recognizable digits when interpolating between a 3 and a 4 , a semantically unintuitive result . This makes the learning process harder and causes the model to learn interpolations that do not generalize . When it interpolates between letters ( Fig . 5 , row 3 , left ) , we find that it does produce undesirable artifacts - that look like numbers ! Augmentation-Interpolative AutoEncoders : We introduce a novel training procedure for IntAEs to remove such artifacts while maintaining generalizability . Instead of optimizing interpolated images using only a GAN loss , we train the network to directly recover known , semantically interpolated images from the corresponding interpolated latent code . This accomplishes two things simultaneously : first , we only interpolate between images where the interpolation makes semantic sense , since we must know the interpolated image in advance . This simplifies the learning problem significantly . Second , the model is no longer constrained to the training manifold when interpolating arbitrary training image pairs . The network can now learn simpler , more direct interpolations that work well on both training and novel domains . Formally , suppose we have a triplet of imagesA = f ( ρ1 ) , B = f ( ρ2 ) and C = f ( αρ1+ ( 1−α ) ρ2 ) , where f is some unknown image generating process , ρ is a semantic variable , and α ∈ [ 0 , 1 ] . Using this triplet , we train the interpolative AE to reconstruct C by decoding the interpolated latent code of A and B . Formally , we train the encoder E and the generator G by minimizing : Lrecon = ||C −G ( αE ( A ) + ( 1− α ) E ( B ) ) ||1 ( 1 ) In practice , finding appropriate image tripletsA , B , C in a dataset of independent images is difficult . Instead , we synthesizeA , B , C using affine spatial transformations , and color jitter for 3-channel images . Given training image x , we randomly sample two sets of augmentation parameters ( translation , rotation , hue , etc. ) . Applying each of these transformations independently to x yields A and B ( for example , a 10o rotation and a −5o rotation ) . We then sample a weight α ∈ [ 0 , 1 ] and compute a weighted average of the two transformations , which we apply to x to produce C ( in our example , if α = 13 , C represents a 5 o rotation ) . The Augmentation-Interpolative AutoEncoder ( AugIntAE ) is then trained to recover C from the α-weighted interpolation between the latent embeddings for A and B . This corresponds to Equation 1 . We can also augment the model with the original IntAE losses : a reconstruction loss on A and B , and a GAN loss Ladv on the interpolated C. In practice , we found that the former did not noticeably affect performance , while the latter was helpful in reducing the blurriness of output images . Subsequent models include Ladv . The full procedure is displayed in Fig . 4 . At first glance , learning the space of affine and color transformations does not appear particularly helpful for an IntAE . Very few visual relationships in the real world can be captured by these transformations alone . However , we find that these learned interpolations act as a powerful regularizer on the latent space , allowing AugIntAE to smoothly capture far more interesting and difficult transformations as well , such as shape , lighting , and even 3D pose . Few-shot generation : Once the AugIntAE is trained , we can sample novel images given only a set of seeds . Simply select a random pair of images , find their latent space embeddings , sample α ∈ [ 0 , 1 ] , and generate the image from the α-weighted mixture of embeddings . More sophisticated sampling techniques are possible , but left to future work .
The paper investigates the generative model which generalizes to new domain with limited samples. Authors firstly explore the current hot generative models: VAEs and GANs, and experimentally find that both VAEs and GANs fail to learn a model which generalizes well to novel domain. Interestingly, AutoEncoders exhibits effective performance of the generalizability to new domain. With the encouraging insight, authors further approach Augmentation-Interpolative AutoEncoders. Specially, the paper firstly augments the training sample to get the input pair, and extracts the latent feature by the sharing Encoder. A weighted sum of both features is conducted to form the mixed feature, which further is taken as input for the decoder to synthesize the output sample. Differently the paper performs the reconstruction loss between the output and the mixed input which sum the input pair with the same from to the one of the latent space.
SP:144d436a6cbb52de49b6934f3cc4fca95e480647
Mapping the Timescale Organization of Neural Language Models
1 INTRODUCTION . Language processing requires tracking information over multiple timescales . To be able to predict the final word “ timescales ” in the previous sentence , one must consider both the short-range context ( e.g . the adjective “ multiple ” ) and the long-range context ( e.g . the subject “ language processing ” ) . How do humans and neural language models encode such multi-scale context information ? Neuroscientists have developed methods to study how the human brain encodes information over multiple timescales during sequence processing . By parametrically varying the timescale of intact context , and measuring the resultant changes in the neural response , a series of studies ( Lerner et al. , 2011 ; Xu et al. , 2005 ; Honey et al. , 2012 ) showed that higher-order regions are more sensitive to longrange context change than lower-order sensory regions . These studies indicate the existence of a “ hierarchy of processing timescales ” in the human brain . More recently , Chien & Honey ( 2020 ) used a time-resolved method to investigate how the brain builds a shared representation , when two groups of people processed the same narrative segment preceded by different contexts . By directly mapping the time required for individual brain regions to converge on a shared representation in response to shared input , we confirmed that higher-order regions take longer to build a shared representation . Altogether , these and other lines of investigation suggest that sequence processing in the 1The code and dataset to reproduce the experiment can be found at https : //github.com/ sherrychien/LSTM_timescales brain is supported by a distributed and hierarchical structure : sensory regions have short processing timescales and are primarily influenced by the current input and its short-range context , while higher-order cortical regions have longer timescales and track longer-range dependencies ( Hasson et al. , 2015 ; Honey et al. , 2012 ; Chien & Honey , 2020 ; Lerner et al. , 2011 ; Baldassano et al. , 2017 ; Runyan et al. , 2017 ; Fuster , 1997 ) . How are processing timescales organized within recurrent neural networks ( RNNs ) trained to perform natural language processing ? Long short-term memory networks ( LSTMs ) ( Hochreiter & Schmidhuber , 1997 ) have been widely investigated in terms of their ability to successfully solve sequential prediction tasks . However , long-range dependencies have usually been studied with respect to a particular linguistic function ( e.g . subject-verb number agreement , Linzen et al . 2016 ; Gulordava et al . 2018 ; Lakretz et al . 2019 ) , and there has been less attention on the broader question of how sensitivity to prior context – broadly construed – is functionally organized within these RNNs . Therefore , drawing on prior work in the neuroscience literature , here we demonstrate a model-free approach to mapping processing timescale in RNNs . We focused on existing language models that were trained to predict upcoming tokens at the word level ( Gulordava et al. , 2018 ) and at the character level ( Hahn & Baroni , 2019 ) . The timescale organization of these two models both revealed that the higher layers of LSTM language models contained a small subset of units which exhibit long-range sequence dependencies ; this subset includes previously reported units ( e.g . a “ syntax ” unit , Lakretz et al. , 2019 ) as well as previously unreported units . After mapping the timescales of individual units , we asked : does the processing timescales of each unit in the network relate to its functional role , as measured by its connectivity ? The question is motivated by neuroscience studies which have shown that in the human brain , higher-degree nodes tend to exhibit slower dynamics and longer context dependence than lower-degree nodes ( Baria et al. , 2013 ) . More generally , the primate brain exhibits a core periphery structure in which a relatively small number of “ higher order ” and high-degree regions ( in the prefrontal cortex , in default-mode regions and in so-called “ limbic ” zones ) maintain a large number of connections with one another , and exert a powerful influence over large-scale cortical dynamics ( Hagmann et al. , 2008 ; Mesulam , 1998 ; Gu et al. , 2015 ) . Inspired by the relationships between timescales and network structure in the brain , we set out to test corresponding hypotheses in RNNs : ( 1 ) Do units with longer-timescales tend to have higher degree in neural language models ? and ( 2 ) Do neural language models also exhibit a “ core network ” composed of functionally influential high-degree units ? Using an exploratory network-theoretic approach , we found that units with longer timescales tend to have more projections to other units . Furthermore , we identified a set of medium-to-long timescale “ controller ” units which exhibit distinct and strong projections to control the state of other units , and a set of longtimescale “ integrator units ” which showed influence on predicting words where the long context is relevant . In summary , these findings advance our understanding of the timescale distribution and functional organization of LSTM language models , and provide a method for identifying important units representing long-range contextual information in RNNs . 2 RELATED WORK . Linguistic Context in LSTMs . How do LSTMs encode linguistic context at multiple timescales ? Prior work suggested that the units sensitive to information that requires long-range dependencies are sparse . By ablating one unit at a time , Lakretz et al . ( 2019 ) found two units that encode information required for processing long-range subject-verb number agreement ( one for singular and one for plural information encoding ) . They further identified several long-range “ syntax units ” whose activation was associated with syntactic tree-depth . Overall , Lakretz et al . ( 2019 ) suggests that a sparse subset of units tracks long-range dependencies related to subject-verb agreement and syntax . If this pattern is general – i.e . if there are very few nodes tracking long-range dependencies in general – this may limit the capacity of the models to process long sentences with high complexity , for reasons similar to those that may limit human sentence processing ( Lakretz et al. , 2020 ) . To test whether long-range nodes are sparse in general , we require a model-free approach for mapping the context dependencies of every unit in the language network . Whole-network context dependence . Previous work by Khandelwal et al . ( 2018 ) investigated the duration of prior context that LSTM language models use to support word prediction . Contextdependence was measured by permuting the order of words preceding the preserved context , and observing the increase in model perplexity when the preserved context gets shorter . Khandelwal et al . ( 2018 ) found that up to 200 word-tokens of prior context were relevant to the model perplexity , but that the precise ordering of words only mattered within the most recent 50 tokens . The tokenbased context-permutation method employed in this study was analogous to the approach used to measure context-dependence in human brain responses to movies ( Hasson et al. , 2008 ) and to auditory narratives ( Lerner et al. , 2011 ) . Inspired by the findings of Khandelwal et al . ( 2018 ) and Lakretz et al . ( 2019 ) , in the present study we set out to map the context-dependence across all of the individual units in the LSTM model . This enabled us to relate the timescales to the effects of node-specific ablation and the network architecture itself . In addition , our context manipulations included both context-swapping ( substituting alternative meaningful contexts ) and context-shuffling ( permuting the words in the prior context to disrupt inter-word structure ) , which allowed us to better understand how individual words and syntactically structured word-sequences contribute to the the context representation of individual hidden units . 3 METHODS . 3.1 LANGUAGE MODELS AND CORPUS . We evaluated the internal representations generated by a pre-trained word-level LSTM language model ( WLSTM , Gulordava et al. , 2018 ) as well as a pre-trained character-level LSTM model ( CLSTM , Hahn & Baroni , 2019 ) as they processed sentences sampled from the 427804-word ( 1965719-character ) novel corpus : Anna Karenina by Leo Tolstoy ( Tolstoy , 2016 ) , translated from Russian to English by Constance Garnett . For the WLSTM , we used the model made available by Gulordava et al . ( 2018 ) . The WLSTM has a 650-dimensional embedding layer , two 650-dimensional hidden layers and an output layer with vocabulary size 50,000 . The model was trained and tested on Wikipedia sentences and was not fine-tuned to the novel corpus . Therefore , we only used sentences with low perplexity from the novel in our main timescale analysis . We performed the same analysis using the Wikipedia test set from Gulordava et al . ( 2018 ) and obtained similar results ( See Section 5.3 , Figure A.4A , Appendix A.2.1 ) . For the CLSTM , we used the model made available by Hahn & Baroni ( 2019 ) . The CLSTM has a 200-dimensional embedding layer , three 1024-dimensional hidden layers and an output layer with vocabulary size 63 . The model was trained on Wikipedia data with all characters lower-cased and whitespace removed . We tested the model with sentences sampled from Anna Karenina as the WLSTM model , and we obtained bits-per-character ( BPC ) similar to what Hahn & Baroni ( 2019 ) reported in their original work . 3.2 TEMPORAL CONTEXT CONSTRUCTION PARADIGM . In order to determine the processing timescales of cell state vectors and individual units , we modified the “ temporal context construction ” method developed by Chien & Honey ( 2020 ) . Thus , the internal representations of the model were compared across two conditions : ( 1 ) the Intact Context condition and ( 2 ) the Random Context condition . In both conditions , the model was processing the same shared sequence of words ( for example , segment B ) , but the preceding sentence differed across the two conditions . In the Intact Context condition , the model processed segment B ( the shared segment ) preceded by segment A , which was the actual preceding context from the original text . In the current study , for example , segment A and B are connected by “ , and ” within long sentences from the novel corpus ( Figure 1A ) , to ensure the temporal dependencies between A and B . In the Random Context condition , however , the model processed the same shared input ( segment B ) , but the context was replaced by segment X , which was a randomly sampled context segment from the rest of the corpus . Segment X was therefore not usually coherently related to segment B . For the WLSTM timescale analysis , we chose long sentences in the Intact Context condition that satisfied the following constraints : ( 1 ) mean perplexity across all words in the sentence < 200 , ( 2 ) the shared segment was longer than 25 words , and ( 3 ) the context segment was longer than 10 words . 77 sentences are included as trials in our analyses . In the Random Context condition , we preserved the same shared segments and randomly sampled 30 context segments ( each longer than 10 words ) from other parts of the novel . For the CLSTM timescale analysis , we used the same 77 long sentences in the Intact Context condition , and randomly sampled 25 context segments ( with length > 33 characters ) for the Random Context condition . In brief , the model is processing the same input ( the shared segment ) with different preceding context ( the intact vs. random context ) . We can now measure the context dependence of individual units by examining how the cell state activations differ between the two conditions , while the network is processing the shared segments with identical input . Any difference in internal representations must arise from the context manipulation , since the current input is the same . A decrease in activation difference over time implies that the units exposed in the Intact context and Random context start to build a similar representation as they process the shared input . For a long-timescale unit , whose current state is dependent on information in the far-preceding context , we will see that the activation difference is preserved across contexts ( Figure 1B , green curve ) , even while the unit is processing the shared input . On the other hand , for a short-timescale unit whose activation is driven largely by the current input , we will see that the activation difference drops quickly ( Figure 1B , red curve ) as the unit processes the shared input .
This paper applies tools from neuroscience to understand how language models integrate across time. The basic approach is to present a phrase, preceded by two different context phrases: one that is natural (i.e. the phrase that actually preceded it in the corpus) and one that is randomly selected. The authors then measure how long it takes for the unit activations to become similar for the two different contexts, which provides a measure for how long the context impacts the representation. They find that (1) timescales increase at later layers of the language model (2) that only a small fraction of units exhibit long timescales (3) that long/medium-timescale units appear to come in two forms which they try and characterize using graph-style analyses.
SP:a7605f203e883bb5d782cd9e090cebff0cf504ef
An Adversarial Attack via Feature Contributive Regions
1 INTRODUCTION . The development of deep learning technology has promoted the successful application of deep neural networks ( DNNs ) in various fields , such as image classification ( Krizhevsky et al. , 2012 ; Simonyan & Zisserman , 2014 ) , computer vision ( He et al. , 2016 ; Taigman et al. , 2014 ) , natural language processing ( Devlin et al. , 2018 ; Goldberg , 2017 ) , etc . In particular , convolutional neural networks ( CNNs ) , a typical DNNs , have shown excellent performance applied in image classification . However , many works have shown that CNNs are extremely vulnerable to adversarial examples ( Szegedy et al. , 2013 ) . The adversarial example is crafted from clean example added by well-designed perturbations that are almost imperceptible to human vision , while can fool CNNs . Scholars have proposed a variety of methods to craft adversarial samples , such as L-BFGS ( Szegedy et al. , 2013 ) , FGSM ( Goodfellow et al. , 2014 ) , I-FGSM ( Kurakin et al. , 2016 ) , PGD ( Madry et al. , 2017 ) and C & W ( Carlini & Wagner , 2017 ) . These attack strategies can successfully mislead CNNs to make incorrect predictions , restricting the application of CNNs in certain security-sensitive areas ( such as autonomous driving , financial payments based on face recognition , etc. ) . Therefore , learning how to generate adversarial examples is of great significance . We can categorize these attacks into two categories , i.e. , the global attacks and the local attacks , according to the region added perturbations . The global attacks tempt to perturb all pixels of the clean image , such as FGSM ( Goodfellow et al. , 2014 ) , PGD ( Madry et al. , 2017 ) and C & W ( Carlini & Wagner , 2017 ) ; the local attacks only modify some pixels of the clean image , such as one-pixel attacks ( Su et al. , 2019 ) and JSMA ( Papernot et al. , 2016b ) . At present , the global attacks perturb all pixels on the whole image , which not only fail to destroy the feature contributive regions ( the critical semantics of an image ) , but they also increase the degree of image distortion . We explain in detail in the experimental part . The local attacks seem to be able to solve this problem , but the current proposed local attacks don ’ t well realize that focus on undermining the image feature contributive regions . Papernot et al . ( 2016b ) proposed a method of crafting adversarial example based on the Jacobian Saliency Map by constraining the ` 0 norm of the perturbations , which means that only a few pixels in the image are modified . However , this method has the disadvantage of over-modifying the value of the pixels , making the added perturbations easily perceptible by the naked eye , and its adversarial strength is weak ( Akhtar & Mian , 2018 ) . Su et al . ( 2019 ) proposed an extremely adversarial attack—one-pixel attack . One-pixel attack can fool CNNs by changing 1 to 5 pixels , but this method is better for low-resolution images attack ( such as CIFAR-10 ) , and the attack success rate for high-resolution images will be greatly reduced ( such as ImageNet ) , and the cost is very large ` 1 distortion ( Xu et al. , 2018 ) . In this paper , we propose a novel attack method to overcome the redundant perturbations of the global attacks and the poor strength of the proposed local attacks . Inspired by the work of CAM ( Zhou et al. , 2016 ) and Grad-CAM ( Selvaraju et al. , 2017 ) , it is the most effective way to reduce image distortion , high efficiency and reduce computational complexity by adding perturbations to the critical semantics . As we all know , CNN is an end-to-end representation learning model , which starts from simple low-level features and combines them into abstract high-level features layer by layer . Thus , Grad-CAM ( Selvaraju et al. , 2017 ) uses the gradient information of the last convolutional layer as the metric to understand the decision of each neuron for target classification , and explains in a visual way that not all image pixels contribute to the model classification . Similarly , as shown in Figure 1 , the red area is the main contributive area . Therefore , perturbing the image globally is not the most efficient strategy . We propose the FCRs attack strategy , which only adds perturbations in Feature Contributive Regions ( FCRs ) with the aim of generating sparse and more excellent perturbations . Especially , compared with existing local attacks , our proposed method perturbs continuous semantic regions rather than discrete pixels . In this work , we use Grad-CAM to locate regions that have a greater impact on the classification decision of CNNs . To ensure the similarity between the adversarial example and the corresponding clean image as much as possible , the objective function we optimize is the sum of the two parts of the function : the ` 2 norm of the perturbations and the loss function of the generated adversarial examples . We thus use the stochastic gradient descent optimization algorithm to find efficient perturbations . In order to avoid the situation where the perturbations do not update when the objective function tends to zero , we also introduce inverse temperature T under the inspiration of Hinton et al . ( 2015 ) . Compared to previous work , the contributions of our work are summarized as follows : • We propose an attack via feature contributive regions ( FCRs ) for achieving a trade-off between the powerful attack and the small perturbations . More importantly , this work implements an effective local attack algorithm by redefining an objective function . • Specially , we novelly propose an inverse temperature T , which avoids the situation where the loss function of the generated adversarial example tends to be zero when the stochastic gradient descent optimization algorithm is used to find the perturbations . • Comprehensive experiments demonstrate that FCRs attack consistently outperforms stateof-the-art methods on the CIFAR-10 and ILSVRC-2012 datasets . In addition , we verify the importance of FCRs by dividing the original clean image into two parts ( i.e. , FCRs and Non-FCRs ) . 2 RELATED WORK . In many cases , the CNNs are vulnerable to adversarial attacks which have caused extensive research in academia . Szegedy et al . ( 2013 ) used the constrained L-BFGS algorithm to craft adversarial ex- amples . L-BFGS attack has a high attack success rate , but the computational cost is also high ( Narodytska & Kasiviswanathan , 2017 ) . Therefore , Goodfellow et al . ( 2014 ) proposed FGSM , which can quickly generate adversarial examples but has a low attack success rate . Kurakin et al . ( 2016 ) proposed the Iterative attack method ( I-FGSM ) on the basis of FGSM and Madry et al . ( 2017 ) proposed PGD . Dong et al . ( 2018 ) proposed an iterative algorithm based on momentum ( MI-FGSM ) to improve the transferability of adversarial samples . Xie et al . ( 2019 ) combined the input diversity strategy with iterative attacks on I-FGSM and MI-FGSM to further improve the transferability of adversarial examples . The aforementioned attacks belong to the gradient attack family , and they destroy the semantic information of the whole image . Papernot et al . ( 2016b ) proposed an attack method based on the Jacobian Saliency Map by minimizing the ` 0 norm of adversarial perturbations and used a greedy algorithm to find saliency pixels . However , this method has the problems of over-modifying pixels too much and weak attack intensity . Su et al . ( 2019 ) proposed an adversarial attack method based on the differential evolution algorithm . This method also focuses on the number of pixels to be modified , but does not limit the power of a single change , thus leading to very large ` 1 distortion ( Xu et al. , 2018 ) . In this work , we expect to achieve a more effective attack that can be as successful as existing attacks but achieves a trade-off between the perturbation power and the number of perturbed pixels . We will show that the proposed FCRs attack is able to destroy the feature contribution regions that make attacks successful , but without incurring extra pixel-level perturbations . Related to our work is Deng & Zeng ( 2019 ) , who proposed a spatial transformed attack method based on attention mechanism . This work expands the stadv ( Xiao et al. , 2018 ) to A-stadv . The purpose of this work is to generate adversarial examples with less interference and less visible . The author only conducts experiments on the ImageNet dataset , and does not discuss the black-box attack effect of this method . But while verifying that many pixel-level perturbations are redundant , our work proposes a new algorithm to craft perturbations , and demonstrates its white-box and blackbox attack effects on the CIFAR-10 and ILSVRC2012 datasets . In addition , Xu et al . ( 2019 ) used CAM to explain adversarial perturbations but their target is not to generate adversarial examples , but to understand and interpret adversarial examples . Zhang et al . ( 2020 ) proposed a target-free method to generate adversarial examples via principal component analysis and made adversarial examples relate to the data manifold , but their experiment showed that the performances of their method were not always better than FGS and C & W . Here we pay more attention to the feature contribution regions and finally , we achieve a trade-off between the powerful attack and the number of perturbed pixels . 3 METHODOLOGY . Inspired by “ attention mechanism ” ( Zagoruyko & Komodakis , 2016 ) , we believe the classifier ’ s performance is greatly affected by some specific feature regions that is termed as feature contributive regions ( FCRs ) in this paper . This intuition is also confirmed by Deng & Zeng ( 2019 ) proposed Astadv which is an attention based on spatial transformed adversarial example . Therefore , if we find FCRs and add perturbations to them , it will be more effective to fool the classifier with fewer perturbations than previous methods . Our idea is to divide an image into two semantic parts : FCRs and Non-FCRs and then perturbs feature contributive regions . The result of fewer perturbations ensures maximumly adversarial effects on local regions of clean images . 3.1 NOTIONS . Deep neural networks ( DNNs ) : A DNN can be expressed as a high-dimensional approximation function : f ( X , θ ) : Rm → Rn , whereX ∈ Rm is the input variable , Y ∈ Rn is the true class , X and θ represents the model parameters . In this work , we focus on a specific DNN , convolutional neural networks ( CNNs ) that are typically comprised of convolutional layers with some method of periodic downsampling ( either through pooling or strided convolutions ) . Here , we define the Logits layer . The input before the softmax layer of the CNNs , namely the Logits layer ( the penultimate layer ) : Yj = w T j A , j = 1 , 2 , . . . , C , where w T j is the weight matrix and A is the input vector of the Logits layer , which contains a mapping function X 7→ A . Then the softmax function can be expressed as Sj = expYj/ ∑c i=1 expYi , and the final model can be expressed as f ( X ) = S ( wTj A ) . Given an input X , then the predicted class of X can be expressed as Ŷ = argmaxj=1 , ... , k f ( X ) j . The goal of model training is to minimize the cross-entropy loss function , which can be expressed as : J = − C∑ j=1 Yj logSj = − logSj ( 1 ) where Y is a 1 × C vector and there are C values in it . Only one value is 1 ( corresponding to the true label ) , and the other C − 1 values are all 0 . For N input-label pairs ( Xi , Yi ) , the cross-entropy loss function of the model can be expressed as : J = − 1 N N∑ i=1 C∑ j=1 Yj logSj = − 1 N N∑ i=1 logSj ( 2 ) Adversarial examples : An adversarial example can be represented as X ′ = X + δ , where δ is the perturbation . Normally , the perturbation δ is constrained by the ` 0 , ` 2 or ` ∞ norm , that is ‖X ′ −X‖p ≤ . For untargeted attacks , we only need to search for an X ′ satisfying Y ′ = argmaxj f ( X ′ ) j , where Y ′ 6= Y and we also do not need to specify which class will be misclassified ; for targeted attacks , we specify a target class Y ∗ 6= Y , so that the target model not only misclassifies the example , but also needs to classify them into the specified class . In general , the targeted attacks are more difficult than untargeted attacks .
This paper focuses on the problem of generating sparse l2-adversarial examples in a white-box and surrogate/transfer setting. The authors consider “local attacks” – perturbing on a limited number of pixels while achieving high attack success rate. The main contribution of this work is to define the region to perturb using grad-cam based saliency maps to identify regions that have a greater impact on the classification decision. Having identified this region, the author use SGD to find the adversarial perturbations. The experimental results show that a high attack success rate can be achieved with this method.
SP:345a245503d9e3acaf695de66d73d9f4ff3eab83
Multi-Task Learning by a Top-Down Control Network
1 INTRODUCTION . The goal of multi-task learning is to improve the learning efficiency and increase the prediction accuracy of multiple tasks learned and performed in a shared network . In recent years , several types of architectures have been proposed to combine multiple tasks training and evaluation . Most current schemes assume task-specific branches , on top of a shared backbone ( Figure 1a ) and use a weighted sum of tasks losses for training ( Chen et al. , 2017 ; Sener & Koltun , 2018 ) . Having a shared representation is more efficient from the standpoint of memory and sample complexity ( Zhao et al. , 2018 ) , but the performance of such schemes is highly dependent on the relative losses weights that can not be easily determined without a “ trial and error ” search phase ( Kendall et al. , 2018 ) . Another type of architecture ( Zhao et al. , 2018 ; Strezoski et al. , 2019 ) uses task-specific vectors to modulate the feature-maps along a feed-forward network , in a channel-wise manner ( Figure 1b ) . Channel-wise modulation based architecture has been shown to decrease the destructive interference between conflicting gradients of different tasks ( Zhao et al. , 2018 ) and allowed Strezoski et al . ( 2019 ) to scale the number of tasks without changing the network . Here , both training and evaluation use the single tasking paradigm : executing one task at a time , rather than getting responses to all the tasks in a single forward pass . Executing one task at a time is also possible by integrating task-specific modules along the network ( Maninis et al. , 2019 ) . A limitation of using task-specific modules ( Maninis et al. , 2019 ) or of using a fixed number of branches ( Strezoski et al. , 2019 ) , is that it may become difficult to add additional tasks at a later time during the system life-time . We propose a new type of architecture with no branching , which performs a single task at a time with no task-specific modules . Our model is trained to perform a set of tasks ( { ti } Ti=1 ) one task at a time . The model receives two inputs : the input image , and a learned vector that specifies the selected task tk to perform . It is constructed from two main parts ( Figure 1c ) : a main recognition network that is common to all tasks , termed below BU2 ( BU for bottom-up ) , and a control network that modifies the feature-maps along BU2 in a manner that will compute a close approximation to the selected task tk . As detailed below , the control network itself is built from two components ( Figure 1d ) : a top-down ( TD ) network that receives as inputs both a task vector as well as image information from a bottom-up stream termed BU1 ( Figure 1d ) . As a result , the TD stream combines task information with image information , to control the individual units of the feature-maps along BU2 . The modification of units activity in BU2 therefore depends on the task to perform , the spatial location , and the image content extracted by BU1 . As shown later , the task control by our approach becomes highly efficient in the sense that the recognition network becomes tuned with high specificity to the selected task tk . Our contributions are as follow : a . Our new architecture is the first to modulate a multi-task network as a function of the task , location ( spatial-aware ) and image content ( image-aware ) . All this is achieved by a top-down stream propagating task , image and location information to lower levels of the bottom-up network . b . Our scheme provides scalability with the number of tasks ( no additional modules / branches per task ) and interpretability ( Localization of relevant objects at the end of the top-down stream ) . c. We show significantly better results than other state-of-the-art methods on four datasets : MultiMNIST ( Sener & Koltun , 2018 ) , CLEVR ( Johnson et al. , 2017 ) , CELEB-A ( Liu et al. , 2015 ) and CUB-200 ( Welinder et al. , 2010 ) . Advantages are shown in both accuracy and effective learning . d. We introduce a new measure of task specificity , crucial for multi-tasking , and show the high task-selectivity of our scheme compared with alternatives . 2 RELATED WORK . Our work draws ideas from the following research lines : Multiple Task Learning ( MTL ) Multi-task learning has been used in machine learning well before the revival of deep networks ( Caruana , 1997 ) . The success of deep neural networks in the performance of single tasks ( e.g. , in classification , detection and segmentation ) has revived the interest of the computer vision community in the subject ( Kokkinos , 2017 ; He et al. , 2017 ; Redmon & Farhadi , 2017 ) . Although our primary application area is computer vision , multi-task learning has also many applications in other fields like natural language processing ( Hashimoto et al. , 2016 ; Collobert & Weston , 2008 ) and even across modalities ( Bilen & Vedaldi , 2016 ) . Over the years , several types of architectures have been proposed in computer vision to combine the training and evaluation of multiple tasks . First works used several duplications ( as many as the tasks ) of the base network , with connections between them to pass useful information between the tasks ( Misra et al. , 2016 ; Rusu et al. , 2016 ) . These works do not share computations and can not scale with the number of tasks . More recent architectures , which are in common practice these days , assume task-specific branches on top of a shared backbone , and use a weighted sum of losses to train them . The joint learning of several tasks has proven beneficial in several cases ( He et al. , 2017 ) , but can also decrease the accuracy of some of the tasks due to limited network capacity , the presence of uncorrelated gradients from the different tasks and different rates of learning ( Kirillov et al. , 2019 ) . A naive implementation of multi-task learning requires careful calibration of the relative losses of the different tasks . To address these problem several methods have been proposed : ‘ Grad norm ’ ( Chen et al. , 2017 ) dynamically tunes gradient magnitudes over time to obtain similar rates of learning for the different tasks . Kendall et al . ( 2018 ) uses a joint likelihood formulation to derive task weights based on the intrinsic uncertainty in each task . Sener & Koltun ( 2018 ) applies an adaptive weighting of the different tasks , to force a pareto optimal solution on the multi-task problem . Along an orthogonal line of research , other works suggested to add task-specific modules to be activated or deactivated during training and evaluation , depending on the task at hand . Liu et al . ( 2019 ) suggests task specific attention networks in parallel to a shared recognition network . Maninis et al . ( 2019 ) suggests adding several types of low-weight task-specific modules ( e.g. , residual convolutional layers , squeeze and excitation ( SE ) blocks and batch normalization layers ) along the recognition network . Note that the SE block essentially creates a modulation vector , to be channelwise multiplied with a feature-map . Modulation vectors have been further used in Strezoski et al . ( 2019 ) for a recognition application , in Cheung et al . ( 2019 ) for continual learning applications and in Zhao et al . ( 2018 ) for a retrieval application and proved to decrease the destructive interference between tasks and the effect of catastrophic forgetting . Our design , in contrast , does not use a multi-branch architecture , nor task-specific modules . Our network is fully-shared between the different tasks . Compared to Zhao et al . ( 2018 ) , we modulate the feature-maps in the recognition network both channel-wise and spatial-wise , also depending on the specific image at hand . Top-Down Modulation Networks Neuroscience research provides evidence for a top-down context , feedback and lateral processing in the primate visual pathway ( Gazzaley & Nobre , 2012 ; Gilbert & Sigman , 2007 ; Lamme et al. , 1998 ; Hopfinger et al. , 2000 ; Piëch et al. , 2013 ; Zanto et al. , 2010 ) where top-down signals modulate the neural activity of neurons in lower-order sensory or motor areas based on the current goals . This may involve enhancement of task-relevant representations or suppression for task-irrelevant representations . This mechanism underlies humans ability to focus attention on task-relevant stimuli and ignore irrelevant distractions ( Hopfinger et al. , 2000 ; Piëch et al. , 2013 ; Zanto et al. , 2010 ) . In this work , consistent with this general scheme , we suggest a model that uses top-down modulation in the scope of multi-task learning . Top down modulation networks with feedback , implemented as conv-nets , have been suggested by the computer vision community for some high level tasks ( e.g. , re-classification ( Cao et al. , 2015 ) , keypoints detection ( Carreira et al. , 2016 ; Newell et al. , 2016 ) , crowd counting ( Sam & Babu , 2018 ) , curriculum learning ( Zamir et al. , 2017 ) , etc . ) and here we apply them to multi-task learning applications . 3 APPROACH . A schematic illustration of our network is shown in Figures 1c and 2a , and explained further below . A control network is used in this scheme to control each of the units in the main recognition network ( BU2 ) given the task and the current image . In practice , this scheme is implemented by using three separate sub-networks ( two of them identical ) with lateral inter-connections . We next describe the network architecture and implementation in detail . Overall structure and information flow Our model contains three essentially identical subnetworks ( BU1 , TD , BU2 ) , with added lateral connections between them . The networks BU1 , BU2 share identical weights . The network receives two inputs : an input image ( to both BU1 , BU2 ) , and a task specification provided at the top of the TD network by a one-hot vector selecting one of k possible tasks . The processing flows sequentially through BU1 , TD ( in a top-down direction ) , BU2 , and the final output is produced at the top of BU2 . In some cases , discussed below , we used an additional output ( object locations ) at the bottom of TD . During the sequential processing BU1 first creates an initial image representation . The TD creates a learned representation of the selected task that converts the one-hot vector to a new form ( task embedding ) , and propagates it down the layers . On the way down the TD stream also extracts relevant image information from the BU1 representation via the BU1-TD lateral connections . Finally , the TD stream controls the BU2 network , to apply the selected task to the input image via the TD-BU2 lateral connections . Bottom-Up streams The BU streams use a standard backbone ( such as Resnet , VGG , LeNet , etc . ) , which is usually subdivided into several stages followed by one or more fully-connected layers , including the final classifier . The lateral connections between streams are placed at the end of each stage , connecting between tensors of the same sizes , allowing element-wise modifications . Top-down stream The TD stream we use ( unless stated otherwise ) is a replica of the BU stream in terms of number of layers , type of layers ( convolutional / residual ) and number of channels in each layer . The downsampling layers ( used in the BU stream ) are replaced with upsampling layers ( nearest neighbour interpolation layers ) . This design allows us to immediately extend any given BU backbone to our scheme , and it gives good results in our comparison , but the optimal TD structure is subject to future studies . The TD stream has two inputs : the selected task at its top , and inputs from BU1 via lateral connections . The selected task is usually specified by a one-hot vector , which is transformed via learnable weights , into a learned task-representation tensor ( called the task embedding , ‘ Emb ’ in Figure 2a ) that serves as an input to the TD stream . lateral connections For the lateral connections , we experimented extensively with different types , and based on the results we selected two types of connections , one for BU1-to-TD , which is additive , the second for TD-to-BU2 , which is multiplicative , shown in Figures 2b and 2c . More details and ablation studies of the lateral connections are given in the Supplementary . Auxiliary losses The use of three sub-networks ( BU1 , TD , BU2 ) suggest the natural use of auxiliary losses at the end of the BU1 or TD streams . In the scope of multi-task learning , the TD auxiliary loss can be used to train the extraction of useful spatial information such as the detection of task-relevant objects . This issue is further discussed in Section 4.2 where we demonstrate the use of a localization loss in the last TD feature-map . We show that applying a localization loss allows us to obtain a task-dependent spatial map in inference time , helping interpretability by locating objects of interest . Training & evaluation During training , the learning optimizes all the weights along the BU and TD streams , shared by all tasks , as well as the task specific embedding parameters . Learning uses a standard backpropagation , as the full model forms an end-to-end trainable model . In training time , the network is supplied with an input image and a selected task , drawn at random from the different tasks . During testing , the different tasks are applied sequentially to each test image . We used in our implementation shared weights between BU1 and BU2 streams . The main motivation for this design was to allow in future applications a multi-cycle use of the model , by using the BU and TD streams iteratively . With this broader goal in mind , our scheme can also be seen as an unfolded version of a BU-TD recurrent network for one and a half cycles , which is the minimal cycles that allow an image-aware modification process .
In this paper a novel top-down control network is introduced for multi-task learning. Different from the traditional bottom-up attention models, the authors introduce a top-down module to modify the activation of recognition network based on different tasks. Specifically,the proposed module consists of three identical networks, which are BU1, TD, BU2 streams. Given the input, the BU1 is firstly trained, and then the TD streams is trained by assigning the specific labels. After that, the BU2 is updated with the top-down parameters. Experimental results demonstrate the effectiveness of proposed model.
SP:652a231a924a97e438595264ea869986e40d45a7
Computing Preimages of Deep Neural Networks with Applications to Safety
To apply an algorithm in a sensitive domain it is important to understand the set of input values that result in specific decisions . Deep neural networks suffer from an inherent instability that makes this difficult : different outputs can arise from very similar inputs . We present a method to check that the decisions of a deep neural network are as intended by constructing the exact , analytical preimage of its predictions . Preimages generalize verification in the sense that they can be used to verify a wide class of properties , and answer much richer questions besides . We examine the functioning and failures of neural networks used in robotics , including an aircraft collision avoidance system , related to sequential decision making and extrapolation . Our method iterates backwards through the layers of piecewise linear deep neural networks . Uniquely , we compute all intermediate values that correspond to a prediction , propagating this calculation through layers using analytical formulae for layer preimages . 1 INTRODUCTION . Folk wisdom holds that although deep neural networks ( DNNs ) can achieve excellent predictive accuracy , reasoning about their performance is difficult , even for experts . Our goal is to enable nonexpert stakeholders , such as clinical health workers , investors , or military commanders to build trust a statistical model in high-stakes environments . To do this , we posit that decisionmakers want to understand a model in both directions , both from inputs to outputs , but also being able to start with hypothetical outputs , and understand the inputs that lead to them . In this paper , we develop an equivalent , but much simpler , representation of a certain class of DNN classifiers . This representation , which requires only a basic numeracy to productively interact with , can be used by domain experts to build intuition and trust . We apply this method to a reinforcement learning agent trained to solve the cart-pole problem , and find that a DNN implementing a successful policy makes a particular type of mistake on 24 % of the mass of the 1/8th of the state space for which we know the optimal action ( Section 3.2 ) . We also show how using the preimage in place of verification can yield a more efficient and interpretable end-to-end system for analyzing aircraft collision avoidance systems ( Section 3.3 ) . 1.1 PREVIOUS WORK . DNNs have the property that knowing the output tells us very little about the input it corresponds to . This is most apparent in image classifiers , where totally different outputs can arise from inputs that are visually indistinguishable ( Szegedy et al . ( 2014 ) ) . We build upon the mathematical framework developed for verifying DNNs that grew out of a desire to prove the absence of adversarial examples , for example Tjeng et al . ( 2017 ) and Wong & Kolter ( 2017 ) . However , we depart from these studies along with Katz et al . ( 2017 ) , being more oriented towards small DNNs that map to and from lowdimensional spaces with considerable structure . These DNNs arise especially in systems which interoperate with the physical world , for example mapping measurements of positions and velocities to movements . Table 1 orients our work to the literature . We have phrased verification in this unusual fashion to facilitate comparison with the other points . Stated in the familiar application to image classifiers X would be an epsilon ball around an input , and Y would be the halfspace where one coordinate is higher than all others . Verification ultimately amounts to a simple yes or no , and so answering higher-level questions typically requires many verifications : for example , Katz et al . ( 2017 ) describes a suite of 45 tests , and image classifiers often wish to verify the absence of adversarial examples around the entire training set . Yang et al . ( 2020 ) is an interesting extension to verification in that it computes the entire image of , say , an epsilon ball around a data point , and not just whether it intersects with a decision boundary . Reasoning forward , about the outputs that can arise from inputs , is only half of the picture . Carlsson et al . ( 2017 ) and Behrmann et al . ( 2018 ) are oriented backwards , they attempt to reconstruct the inputs that result in an output . These related papers study the statistical invariances that nonlinear layers encode . Behrmann et al . ( 2018 ) examines the preimage of a single point through a single ReLU layer , analyzing stability via an approximation-based experiment . Carlsson et al . ( 2017 ) analyzes the preimage of a single point through the repeated application of a nonlinearity , purely theoretically . Our paper looks at the preimage of non-singleton subsets of the codomain , which is much more practically useful , and requires considerable extension to their approaches . 2 METHOD . Our method is easily stated : build up the preimage of a DNN from the preimage of its layers , using simple analytical formulae . We start by developing some properties of the preimage operator , then we describe the class of sets that we compute the preimage of , and finally we discuss the class of DNNs that our algorithm addresses . 2.1 PROPERTIES OF PREIMAGES . Lemma 1 shows how to build up the preimage of a DNN from the preimages of its constitutent layers . Lemma 1 ( Preimage of composition is reversed composition of preimages ) . For functions fj : Rnj → Rnj+1 , ( f ` +k ◦ f ` +k−1 ◦ . . . ◦ f ` ) −1 = f−1 ` ◦ . . . ◦ f −1 ` +k−1 ◦ f −1 ` +k . ( 1 ) Secondly , we mention an intuitive property of f−1 that is handy for building up the preimage of any set from the preimages of any partition of that set . Lemma 2 ( Preimage of union is union of preimages ) . f−1 ( ∪Ni=1Si ) = ∪Ni=1f−1 ( Si ) . 2.2 POLYTOPES . Our method is not applicable to arbitrary sets Y , but rather sets that , roughly , have piecewise linear boundaries . The basic building block of these sets are polytopes . Definition 1 ( Polytope ) . A polytope in Rn is a set that can be written as { x ∈ Rn : b − Ax ≥ 0 } for some m ∈ N , b ∈ Rm , and A ∈ Rm×n . Put more simply : a polytope is the intersection of half-planes . Definition 1 does not require that polytopes be bounded , but polytopes are convex . Sets with linear boundaries , though they may be non-convex , can decomposed into the union of polytopes . We term such sets region-unions , and the set of polytopes which comprise them , regions . Definition 2 ( Region and region-union ) . For N ∈ N , bi ∈ Rmi , Ai ∈ Rmi×n , with mi ∈ N , a region is { { x : bi −Aix ≥ 0 } ; i = 1 , . . . , N } . ( 2 ) A region-union is a set ∪r∈R r for some region R .. Region-unions are interesting because the the preimage polytopes under piecewise linear functions are regions-unions . However , we need to also keep information on how to form a region-union , hence the notion of a region . It is trivial to observe that if R1 and R2 are regions , then R1 ∪ R2 is likewise a region , and correspondingly for region-unions . 2.3 LINEAR AND RELU POLYTOPE PREIMAGES . In this section , we give formulae for the preimage of linear and ReLU functions , giving significant content to Lemma 1 . The preimage of polytopes under linear mappings are polytopes : Lemma 3 ( Preimage of Linear layer ) . ( x 7→Wx+ a ) −1 ( { x : b−Ax ≥ 0 } ) = { x : ( b−Aa ) −AWx ≥ 0 } . ( 3 ) ReLU is a piecewise linear function , so if we carefully treat the portions of the domain on which it exhibits different behavior , we obtain a similar formulation for each : Lemma 4 ( Preimage of ReLU layer ) . ReLU−1 ( { x : b−Ax ≥ 0 } ) = ⋃ ν∈ { 0,1 } n { x : b−Adiag ( ν ) x ≥ 0 , −diag ( 1− ν ) x ≥ 0 , diag ( ν ) x ≥ 0 } . ( 4 ) To understand Lemma 4 let s ( x ) be the vector given by s ( x ) i = 1 if xi ≥ 0 and zero otherwise . Then diag ( s ( x ) ) x = ReLU ( x ) . This expression separates x 7→ ReLU ( x ) into a pattern of signs over its coordinates and x itself . This means that once we restrict attention to a set on which the sign does not change , we can apply familiar linear algebra routines to compute the preimage set , akin to Lemma 3 . The nonnegative values are denoted by ν ∈ { 0 , 1 } n in the above , and the set of x such that xi ≥ 0 ⇐⇒ νi = 1 is given by diag ( ν ) x ≥ 0 . Similarly , xi ≤ 0 ⇐⇒ νi = 0 for i = 1 , 2 , . . . , n if and only if −diag ( 1− ν ) x ≥ 0 . Equation 4 follows by partitioning Rn into the 2n sets where each coordinate is nonnegative or not . Computing the preimage of a ReLU layer is unavoidably intractable at scale , though the problem exhibits considerable structure . We expect that it is possible to compute the preimage of networks of a similar scale to those that can be completely verified , such as small image-scale networks . Preimages are most insightful and useful when the inputs and outputs have definite interpretation – application areas where the need for massive networks is less . 2.4 THE SUFFICIENCY OF LINEAR AND RELU LAYERS . In familiar terms a DNN classifier might consist of some “ feature building ” modules , say composed of alternating convolution and maxpooling , then flattened , and passed onto the prediction logic consisting of alternating linear and ReLU layers , possibly including dropout or batch normalization , and concluding with a softmax function to normalize the predictions to a probability distribution . Resnets ( He et al . ( 2016 ) ) do not strictly fit this pattern , bu can be handled with similar reasoning ( see Appendix B ) . How do the results of Section 2.3 suffice to invert such DNNs ? Firstly , under our convention that layers operate on flat tensors , flattening is superfluous . Next , dropout affects inference only through the weights – this layer can be omitted entirely in computing the preimage . Convolution is essentially linear . Maxpool is straightforwardly rewritten in terms of the ReLU and linear function . { x : b− Asoftmax ( x ) ≥ 0 } is not a polytope . However , if the classification alone suffices then the softmax layer can be elided entirely since arg maxj xj = arg maxj softmax ( x ) j . 3 EXPERIMENTS . 3.1 TWO MOONS CLASSIFICATION . To cultivate some intuition about the preimage of a DNN we start by examining a classic test problem in nonlinear classification . We fit a DNN f : [ −3 , +3 ] 2 → R2 consisting of two nonlinear layers with eight neurons each on an instance of the “ two moons ” dataset . This data is shown in Figure 1a ( further details of details of f and the data are in Section D.1 ) . Figure 1b plot the corresponding logits , along with the sets to be inverted { x : x1 ≶ x2 } ⊆ R2 . Figure 1c shows the corresponding preimages , with different hues of the same color corresponding to different sign patterns ν in Equation 4 .
Deep neural networks are known to be brittle, and can lead to dangerous consequences if left unverified. Forward reach set computation can be used as a basic primitive to verify properties of deep neural networks used in a robotic setting. There has been a rising interest in verifying larger neural networks used in safety critical setting.
SP:d00483a38437b6c706f04cc03b34cc593a3f7273
Quantitative Understanding of VAE as a Non-linearly Scaled Isometric Embedding
1 INTRODUCTION . Variational autoencoder ( VAE ) ( Kingma & Welling , 2014 ) is one of the most successful generative models , estimating posterior parameters of latent variables for each input data . In VAE , the latent representation is obtained by maximizing an evidence lower bound ( ELBO ) . A number of studies ( Higgins et al. , 2017 ; Kim & Mnih , 2018 ; Lopez et al. , 2018 ; Chen et al. , 2018 ; Locatello et al. , 2019 ; Alemi et al. , 2018 ; Rolı́nek et al. , 2019 ) have tried to reveal the property of latent variables . However , quantitative behavior of VAE is still not well clarified . For example , there has not been a theoretical formulation of the reconstruction loss and KL divergence in ELBO after optimization . More specifically , although the conditional distribution pθ ( x|z ) in the reconstruction loss of ELBO is predetermined such as the Gaussian or Bernoulli distributions , it has not been discussed well whether the true conditional distribution after optimization matches the predetermined distribution . Rate-distortion ( RD ) theory ( Berger , 1971 ) , which is an important part of Shannon information theory and successfully applied to image compression , quantitatively formulates the RD trade-off optimum in lossy compression . To realize a quantitative data analysis , Rate-distortion ( RD ) theory based autoencoder , RaDOGAGA ( Kato et al. , 2020 ) , has been proposed with isometric embedding ( Han & Hong , 2006 ) where the distance between arbitrary two points of input space in a given metrics is always the same as L2 distance in the isometric embedding space . In this paper , by mapping VAE latent space to an implicit isometric space like RaDOGAGA on variable-by-variable basis and analysing VAE quantitatively as a well-examined lossy compression , we thoroughly clarify the quantitative properties of VAE theoretically and experimentally as follows . 1 ) Implicit isometric embedding is derived in the loss metric defined space such that the entropy of data representation becomes minimum . A scaling factor between the VAE latent space and implicit isometric space is formulated by the posterior for each input . In the case of β-VAE , the posterior variance of each dimensional component in the implicit isometric embedding space is a constant β/2 , which is analogous to the rate-distortion optimal of transform coding in RD theory . As a result , the reconstruction loss and KL divergence in ELBO can be quantitatively formulated . 2 ) From these properties , VAE can provide a practical quantitative analysis of input data . First , the data probabilities in the input space can be estimated from the prior , loss metric , and posterior parameters . In addition , the quantitative importance of each latent variable , analogous to the eigenvalue of PCA , can be evaluated from the posterior variance of VAE . This work will lead the information theoretic generative models in the right direction . 2 RELATED WORKS . 2.1 VARIATIONAL AUTOENCODER AND THEORETICAL ANALYSIS . In VAE , ELBO is maximized instead of maximizing the log-likelihood directly . Let x ∈ Rm be a point in a dataset . The original VAE model consists of a latent variable with fixed prior z ∼ p ( z ) = N ( z ; 0 , In ) ∈ Rn , a parametric encoder Encφ : x ⇒ z , and a parametric decoder Decθ : z ⇒ x̂ . In the encoder , qφ ( z|x ) = N ( z ; µ ( x ) , σ ( x ) ) is provided by estimating parameters µ ( x ) and σ ( x ) . Let Lx be a local cost at data x . Then , ELBO is described by ELBO = Ex∼p ( x ) [ Ez∼qφ ( z|x ) [ log pθ ( x|z ) ] −DKL ( qφ ( z|x ) ‖p ( z ) ) ] . ( 1 ) In Ex∼p ( x ) [ · ] , the first term Ez∼qφ ( z|x ) [ · ] is called the reconstruction loss . The second term DKL ( · ) is a Kullback–Leibler ( KL ) divergence . Let µj ( x ) , σj ( x ) , and DKLj ( x ) be j-th dimensional values of µ ( x ) , σ ( x ) , and KL divergence . Then DKL ( · ) is derived as : DKL ( · ) = n∑ j=1 DKLj ( x ) , where DKLj ( x ) = 1 2 ( µj ( x ) 2 + σj ( x ) 2 − log σj ( x ) 2 − 1 ) . ( 2 ) D ( x , x̂ ) denotes a metric such as sum square error ( SSE ) and binary cross-entropy ( BCE ) as loglikelihoods of Gaussian and Bernoulli distributions , respectively . In training VAE , the next objective is used instead of Eq . 1 , where β is a parameter to control the trade-off ( Higgins et al. , 2017 ) . Lx = Ez∼qφ ( z|x ) [ D ( x , x̂ ) ] + βDKL ( · ) . ( 3 ) However , it has not been fully discussed whether the true conditional distribution matches the predetermined distribution , or how the value of KL divergence is derived after training . There have been several studies to analyse VAE theoretically . Alemi et al . ( 2018 ) introduced the RD trade-off based on the information-theoretic framework to analyse β-VAE . However , they did not clarify the quantitative property after optimization . Dai et al . ( 2018 ) showed that VAE restricted as a linear transform can be considered as a robust PCA . However , their model has a limitation for the analysis on each latent variable basis because of the linearity assumption . Rolı́nek et al . ( 2019 ) showed that the Jacobian matrix of VAE at each latent variable is orthogonal , which makes latent variables disentangled implicitly . However , they do not uncover the orthonormality and quantitative properties because they simplify KL divergence as a constant . Dai & Wipf ( 2019 ) also showed that the expected rate of VAE for the r-dimensional manifold is close to − ( r/2 ) log γ +O ( 1 ) at γ → 0 when pθ ( x̂|x ) = N ( x̂ ; x , γIm ) holds . The remaining challenge is to clearly figure out what latent space is obtained at a given dataset , a loss metric , and β in the model . 2.2 RATE-DISTORTION THEORY , TRANSFORM CODING , AND ISOMETRIC EMBEDDING . RD theory ( Berger , 1971 ) formulated the optimal transform coding ( Goyal , 2001 ) for the Gaussian source with square error metric as follows . Let x ∈ Rm be a point in a dataset . First , the data are transformed deterministically with the orthonormal transform ( orthogonal and unit norm ) such as Karhunen-Loève transform ( KLT ) ( Rao & Yip , 2000 ) . Let z ∈ Rm be a point transformed from x . Then , z is entropy-coded by allowing equivalent stochastic distortion ( or posterior with constant variance ) in each dimension . A lower bound of a rate R at a distortion D is denoted by R ( D ) . The derivation of R ( D ) is as follows . Let zj be the j-th dimensional component of z and σzj2 be the variance of zj in a dataset . It is noted that σzj2 is the equivalent to eigenvalues of PCA for the dataset . Let d be a distortion equally allowed in each dimensional channel . At the optimal condition , the distortion Dopt and rate Ropt on the curve R ( D ) is calculated as a function of d : Ropt = 1 2 m∑ j=1 max ( log ( σzj 2/d ) , 0 ) , Dopt = m∑ j=1 min ( d , σzj 2 ) . ( 4 ) The simplest way to allow equivalent distortion is to use a uniform quantization ( Goyal , 2001 ) . Let T be a quantization step , and round ( · ) be a round function . Quantized value ẑj is derived as kT , where k = round ( zj/T ) . Then , d is approximated by T 2/12 as explained in Appendix H.1 . To practically achieve the best RD trade-off in image compression , rate-distortion optimization ( RDO ) has also been widely used ( Sullivan & Wiegand , 1998 ) . In RDO , the best trade-off is achieved by finding a encoding parameter that minimizes a cost L = D + λR at given Lagrange parameter λ . Recently , deep image compression ( Ballé et al. , 2018 ) has been proposed . In these works , instead of an orthonormal transform with sum square error ( SSE ) metric in the conventional lossy compression , a deep autoencoder is trained with flexible metrics , such as structural similarity ( SSIM ) ( Wang et al. , 2001 ) for RDO . Recently , an isometric autoencoder , RaDOGAGA ( Kato et al. , 2020 ) was proposed based on Ballé et al . ( 2018 ) . They proved that the latent space to be isometric to the input space if the model is trained by RDO using a parametric prior and posterior with constant variance . By contrast , VAE uses a fixed prior with a variable posterior . In section 3 , we explain that VAE can be quantitatively understood as the rate-distortion optimum as in Eq . 4 by mapping VAE latent space to implicit isometric embedding on a variable-to-variable basis as in Fig . 1 . 3 UNDERSTANDING OF VAE AS A SCALED ISOMETRIC EMBEDDING . This section shows the quantitative understanding of VAE . First , we present the hypothesis of mapping VAE latent space to an implicit isometric embedding space . Second , we reformulate the objective of β-VAE for easy analysis . Third , we prove the hypothesis from the minimum condition of the objective . Then , we show that ELBO can be interpreted as an optimized RDO cost of transform coding where the quantitative properties are well clarified , as well as discuss and correct some prior theoretical studies . Lastly , we explain the quantitative properties of VAE to validate the theory including approximations and provide a practical data analysis . 3.1 HYPOTHESIS OF MAPPING VAE TO THE IMPLICIT ORTHONORMAL TRANSFORM . Figure 1 shows the mapping of VAE to the implicit isometric embedding . Assume the data manifold is smooth and differentiable . Let Sinput ( ⊂ Rm ) be an input space of the dataset . D ( x , x́ ) denotes a metric for points x , x́ ∈ Sinput . Using the second order Taylor expansion , D ( x , x + δx ) can be approximated by tδx Gxδx , where Gx and δx are an x dependent positive definite Hermitian metric tensor and an arbitrary infinitesimal displacement in Sinput , respectively . The derivations of Gx for SSE , BCE , and SSIM are shown in Appendix H.2 . Next , an implicit isometric embedding space SIso ( ⊂ Rm ) is introduced like the isometric latent space in RaDOGAGA ( Kato et al. , 2020 ) , such that the entropy of data representation is minimum in the inner product space ofGx . Let y and yj be a point in SIso and its j-th component , respectively . Because of the isometricity , p ( x ) ' p ( y ) will hold . We will also show the posterior variance of each dimensional component yj is a constant β/2 . In addition , the variance of yj will show the importance like PCA when the data manifold has a disentangled feature by nature in the metric space ofGx and the prior covariance is diagonal . Then , SIso is nonlinearly scaled to the VAE ’ s anisometric orthogonal space SVAE ( ⊂ Rn ) on a variable-by-variable basis . Let z be a point in SVAE , and zj denotes the j-th component of z . Let p ( yj ) and p ( zj ) be the probability distribution of the j-th variable in SIso and SVAE . Each variable yj is nonlinearly scaled to zj , such that dzj/dyj = p ( yj ) /p ( zj ) to fit the cumulative distribution . dzj/dyj is σj ( x ) / √ β/2 , the ratio of posterior ’ s standard deviations for zj and yj , such that KL divergences in both spaces are equivalent . In addition , dimensional components whose KL divergences are zero can be discarded because such dimensions have no information . 3.2 REFORMULATION OF OBJECTIVE TO THE FORM USING ∂x/∂zj AND ∂x/∂z We reformulate the objective Lx to the form using ∂x/∂zj and ∂x/∂z . Here , the dimensions of x and z , i.e. , m and n , are set as the same . The condition to reduce n is shown in section 3.3 . Reformulation of D ( x , x̂ ) loss : In accordance with Kato et al . ( 2020 ) , the loss D ( x , x̂ ) can be decomposed into D ( x̆ , x̂ ) + D ( x , x̆ ) , where x̆ denotes Decθ ( µ ( x ) ) . The first term D ( x̆ , x̂ ) is a distortion between the decoded values of µ ( x ) with and without noise σ ( x ) . We call this term as a coding loss . This term is expanded as follows . δx̆ denotes x̂ − x̆ . Then , D ( x̆ , x̂ ) term can be approximated by tδx̆ Gxδx̆ . Let xzj be ∂x/∂zj at zj = µj ( x ) , and δzj ∼ N ( 0 , σj ( x ) ) be an added noise in zj . Then , δx̆ is approximated by δx̆ ' ∑m j=1 δzj xzj . Because δzj and δzk for j 6= k are uncorrelated , the average of D ( x̆ , x̂ ) over z ∼ qφ ( z|x ) can be finally reformulated by Ez∼qφ ( z|x ) [ D ( x̆ , x̂ ) ] ' Ez∼qφ ( z|x ) [ tδx̆ Gxδx̆ ] ' n∑ j=1 σj ( x ) 2 txzjGxxzj . ( 5 ) The second term D ( x , x̆ ) is a loss between the input data and Decθ ( µ ( x ) ) . We call this term a transform loss . We presume VAE is analogous to the Wiener filter ( Wiener , 1964 ; Jin et al. , 2003 ) where the coding loss is regarded as an added noise . From the Wiener filter theory , the ratio between the transform loss and coding loss is close to the ratio between the coding loss and the variance of the input data . The coding loss , approximately nβ/2 as in Eq . 14 , should be smaller than the variance of the input data to capture meaningful information . Thus the transform loss , usually small , is not considered in the following discussion . Appendix B explains the detail in a simple 1-dimensional VAE . We show the exhaustive and quantitative evaluation of coding loss and transform loss in the toy dataset in appendix E.2 to validate this approximation . Reformulation of KL divergence : When σj ( x ) 1 , σj ( x ) 2 − log σj ( x ) 2 is observed . For example , when σj ( x ) 2 < 0.1 , we have − ( σj ( x ) 2/ log σj ( x ) 2 ) < 0.05 . In such dimensions , DKLj ( x ) can be approximated as Eq . 6 by ignoring the σj ( x ) 2 term and setting p ( µj ( x ) ) to N ( zj ; 0 , 1 ) : DKLj ( x ) ' 1 2 ( µj ( x ) 2 − log σj ( x ) 2 − 1 ) = − log ( σj ( x ) p ( µj ( x ) ) ) − log 2πe 2 . ( 6 ) Eq . 6 can be considered as a rate of entropy coding for a symbol with mean µj ( x ) allowing quantization noise σj ( x ) 2 , as shown in Appendix H.3 . Thus , in the dimension with meaningful information , σj ( x ) 2 is much smaller than the prior variance 1 , and the approximation in Eq.6 is reasonable . Let p ( µ ( x ) ) be ∏n j=1 p ( µj ( x ) ) . p ( µ ( x ) ) = p ( x ) |det ( ∂x/∂z ) | holds where det ( ∂x/∂z ) is a Jacobian determinant at z = µ ( x ) . Let CDKL be a constant n 2 log 2πe . Then , DKL ( · ) is reformulated by DKL ( · ) ' − log ( p ( µ ( x ) ) n∏ j=1 σj ( x ) ) − CDKL ' − log ( p ( x ) ∣∣∣∣det ( ∂x∂z ) ∣∣∣∣ n∏ j=1 σj ( x ) ) − CDKL . ( 7 ) Final objective form : From Eqs . 5 and 7 , the objective L′x to minimise is derived as : L′x = n∑ j=1 σj ( x ) 2 txzjGxxzj − β log ( p ( x ) ∣∣∣∣det ( ∂x∂z ) ∣∣∣∣ n∏ j=1 σj ( x ) ) − CDKL . ( 8 )
The paper builds on a branch of recent works that consider and analyse Variational autoencoders (VAE) from the view point of data compression. This started from Alemi et al. 2018, where the authors consider and analyse the mutual information between data and latent codes and culminates in Kato et al. 2020, where the authors consider models in which both the encoder and the decoder are assumed as deterministic (isometric) mappings. The submitted paper aims at reconciling this type of models with standard VAEs by claiming to prove that VAEs can be obtained from the former by an non-linear component-wise scaling of the latent space. The authors claim among others that this approach allows to estimate the data probability density from the learned VAE model.
SP:c00c16048e11229025e209fc0e547af1471dae90
Universal Approximation Theorem for Equivariant Maps by Group CNNs
Group symmetry is inherent in a wide variety of data distributions . Data processing that preserves symmetry is described as an equivariant map and often effective in achieving high performance . Convolutional neural networks ( CNNs ) have been known as models with equivariance and shown to approximate equivariant maps for some specific groups . However , universal approximation theorems for CNNs have been separately derived with individual techniques according to each group and setting . This paper provides a unified method to obtain universal approximation theorems for equivariant maps by CNNs in various settings . As its significant advantage , we can handle non-linear equivariant maps between infinite-dimensional spaces for non-compact groups . 1 INTRODUCTION . Deep neural networks have been widely used as models to approximate underlying functions in various machine learning tasks . The expressive power of fully-connected deep neural networks was first mathematically guaranteed by the universal approximation theorem in Cybenko ( 1989 ) , which states that any continuous function on a compact domain can be approximated with any precision by an appropriate neural network with sufficient width and depth . Beyond the classical result stated above , several types of variants of the universal approximation theorem have also been investigated under different conditions . Among a wide variety of deep neural networks , convolutional neural networks ( CNNs ) have achieved impressive performance for real applications . In particular , almost all of state-of-the-art models for image recognition are based on CNNs . These successes are closely related to the property that performing CNNs commute with translation on pixel coordinate . That is , CNNs can conserve symmetry about translation in image data . In general , this kind of property for symmetry is known as the equivariance , which is a generalization of the invariance . When a data distribution has some symmetry and the task to be solved relates to the symmetry , data processing is desired to be equivariant on the symmetry . In recent years , different types of symmetry have been focused per each task , and it has been proven that CNNs can approximate arbitrary equivariant data processing for specific symmetry . These results are mathematically captured as the universal approximation for equivariant maps and represent the theoretical validity of the use of CNNs . In order to theoretically correctly handle symmetric structures , we have to carefully consider the structure of data space where data distributions are defined . For example , in image recognition tasks , image data are often supposed to have symmetry for translation . When each image data is acquired , there are finite pixels equipped with an image sensor , and an image data is represented by a finitedimensional vector in a Euclidean space Rd , where d is the number of pixels . However , we note that the finiteness of pixels stems from the limit of the image sensor and a raw scene behind the image data is thought to be modelled by an element in RS with continuous spatial coordinates S , where RS is a set of functions from S to R. Then , the element in RS is regarded as a functional representation of the image data in Rd . In this paper , in order to appropriately formulate data symmetry , we treat both typical data representation in finite-dimensional settings and functional representation in infinite-dimensional settings in a unified manner . 1.1 RELATED WORKS . Symmetry and functional representation . Symmetry is mathematically described in terms of groups and has become an essential concept in machine learning . Gordon et al . ( 2019 ) point out that , when data symmetry is represented by a infinite group like the translation group , equivariant maps , which are symmetry-preserving processing , can not be captured as maps between finitedimensional spaces but can be described by maps between infinite-dimensional function spaces . As a related study about symmetry-preserving processing , Finzi et al . ( 2020 ) propose group convolution of functional representations and investigate practical computational methods such as discretization and localization . Universal approximation for continuous maps . The universal approximation theorem , which is the main objective of this paper , is one of the most classical mathematical theorems of neural networks . The universal approximation theorem states that a feedforward fully-connected network ( FNN ) with a single hidden layer containing finite neurons can approximate a continuous function on a compact subset of Rd . Cybenko ( 1989 ) proved this theorem for the sigmoid activation function . After his work , some researchers showed similar results to generalize the sigmoidal function to a larger class of activation functions as Barron ( 1994 ) , Hornik et al . ( 1989 ) , Funahashi ( 1989 ) , Kůrková ( 1992 ) and Sonoda & Murata ( 2017 ) . These results were approximations to functional representations between finite-dimensional vector spaces , but recently Guss & Salakhutdinov ( 2019 ) generalized them to continuous maps between infinite-dimensional function spaces in Guss & Salakhutdinov ( 2019 ) . Equivariant neural networks . The concept of group-invariant neural networks was first introduced in Shawe-Taylor ( 1989 ) in the case of permutation groups . In addition to the invariant case , Zaheer et al . ( 2017a ) designed group-equivariant neural networks for permutation groups and obtained excellent results in many applications . Maron et al . ( 2019a ; 2020 ) consider and develop a theory of equivariant tensor networks for general finite groups . Petersen & Voigtlaender ( 2020 ) established a connection between group CNNs , which are equivariant networks , and FNNs for group finites . However , symmetry are not limited to finite groups . Convolutional neural networks ( CNNs ) was designed to be equivariant for translation groups and achieved impressive performance in a wide variety of tasks . Gens & Domingos ( 2014 ) proposed architectures that are based on CNNs and invariant to more general groups including affine groups . Motivated by CNN ’ s experimental success , many researchers have further generalized this by using group theory . Kondor & Trivedi ( 2018 ) proved that , when a group is compact and the group action is transitive , a neural network constrained by some homogeneous structure is equivariant if and only if it becomes a group CNN . Universal approximation for equivariant maps . Compared to the vast studies about universal approximation for continuous maps , there are few existing studies about universal approximation for equivariant maps . Sannai et al . ( 2019 ) ; Ravanbakhsh ( 2020 ) ; Keriven & Peyré ( 2019 ) considered the equivariant model for finite groups and proved universal approximation property of them by attributing it to the results of Maron et al . ( 2019b ) . Cohen et al . ( 2019 ) considered group convolution on a homogeneous space and proved that a linear equivariant map is always convolution-like . Yarotsky ( 2018 ) proved universal approximation theorems for nonlinear equivariant maps by CNNlike models when groups are the d-dimensional translation group T ( d ) = Rd or the 2-dimensional Euclidean group SE ( 2 ) . However , when groups are more general , universal approximation theorems for non-linear equivariant maps have not been obtained . 1.2 PAPER ORGANIZATION AND OUR CONTRIBUTIONS . The paper is organized as follows . In section 2 , we introduce the definition of group equivariant maps and provide the essential property that equivariant maps have one-to-one correspondence to theoretically tractable maps called generators . In section 3 , we define fully-connected and group convolutional neural networks between function spaces . This formulation is suitable to represent data symmetry . Then , we provide a main theorem called the conversion theorem that can convert FNNs to CNNs . In section 4 , using the conversion theorem , we derive universal approximation theorems for non-linear equivariant maps by group CNNs . In particular , this is the first universal approximation theorem for equivariant maps in infinite-dimensional settings . We note that finite and infinite groups are handled in a unified manner . In section 5 , we provide concluding remarks and mention future works . 2 GROUP EQUIVARIANCE . 2.1 PRELIMINARIES . We introduce definitions and terminology used in the later discussion . Functional representation . In this paper , sets denoted by S , T and G are assumed to be locally compact , σ-compact , Hausdorff spaces . When S is a set , we denote by RS the set of all maps from S to R and by ‖ · ‖∞ the supremum norm . We call S of RS the index set . We denote by C ( S ) the set of all continuous maps from S to R. We denote by C0 ( S ) the set of continuous functions from S to R which vanish at infinity1 . For a Borel space S with some measure µ , we denote the set of integrable functions from S to R with respect to µ as L1µ ( S ) . For a subset B ⊂ S , the restriction map RB : RS → RB is defined by RB ( x ) = x|B , where x ∈ RS and x|B is the restriction of the domain of x onto B . When S is a finite set , RS is identified with the finite-dimensional Euclidean space R|S| , where |S| is the cardinality of S. In this sense , RS for general sets S is a generalization of Euclidean spaces . However , RS itself is often intractable for an infinite set S. In such cases , we instead consider C ( S ) , C0 ( S ) or Lp ( S ) as relatively tractable subspaces of RS . Group action . We denote the identity element in a group G by 1 . We assume that the action of a group G on a set S is continuous . We denote by g · s the left action of g ∈ G to s ∈ S . Then we call Gs : = { g · s|g ∈ G } the orbit of s ∈ S . From the definition , we have S = ⋃ s∈S Gs . When a subset B ⊂ S is the set of representative elements from all orbits , it satisfies the disjoint condition S = ⊔ s∈B Gs . Then , we call B a base space2 and define the projection PB : S → B by mapping s ∈ S to the representative element in B ∩Gs . When a group G acts on sets S and T , the action of G on the product space S ×T is defined by g · ( s , t ) : = ( g · s , g · t ) . When a group G acts on a index set S , the G-translation operators Tg : RS → RS for g ∈ G are defined by Tg [ x ] ( s ) : = x ( g−1 · s ) , where x ∈ RS and s ∈ S . We often denote Tg [ x ] simply by g ·x for brevity . Then , group translation determine the action3 of G on RS . 2.2 GROUP EQUIVARIANT MAPS . In this section , we introduce group equivariant maps and show their basic properties . First , we define group equivariance . Definition 1 ( Group Equivariance ) . Suppose that a group G acts on sets S and T . Then , a map F : RS → RT is called G-equivariant when F [ g · x ] = g · F [ x ] holds for any g ∈ G and x ∈ RS . An example of an equivariant map in image processing is provided in Figure 1 . To clarify the degree of freedom of equivariant maps , we define the generator of equivariant maps . Definition 2 ( Generator ) . Let B ⊂ T be a base space with respect to the action of G on T . For a G-equivariant map F : RS → RT , we call FB : = RB ◦ F the generator of F . The following theorem shows that equivariant maps can be represented by their generators . Theorem 3 ( Degree of Freedom of Equivariant Maps ) . Let a group G act on sets S and T , and B ⊂ T a base space . Then , a G-equivariant map F : RS → RT has one-to-one correspondence to its generator FB . A detailed version of Theorem 3 is proved in Section A.1 . 1A function f on a locally compact space is said to vanish at infinity if , for any ϵ , there exists a compact subset K ⊂ S such that sups∈S\K |f ( s ) | < ϵ . 2The choice of the base space is not unique in general . However , the topological structure of a base space can be induced by the quotient space S/G . 3We note that Tg ◦ Tg′ = Tg′g and the group translation operator is the action of G on RS from the right .
This paper considers a certain generalization of convolutional neural networks and equivariant linear networks to the infinite dimensional case, while covering also the discrete case, and offers a universality result. In more detail, the paper first characterizes equivariant maps as the unique extensions of "generator", namely regular maps that provide target functions (or vector) defined over a basic domain. In other words, any map that takes functions (or vectors) into functions (or vectors) defined over the representatives from the symmetry's equivalent classes can be extended uniquely to an equivariant map by enlarging its target domain according to the equivariance rule. Second, infinite dimensional fully connected networks (FNNs) and general (equivariant) convolution neural networks (CNNs) are described. The main result of the paper is the Conversion Theorem (Theorem 11), and its consequences. The theorem specify the conditions under which an FNN can be approximated by a CNN. Since FNNs are known to be universal this implies universality of CNNs.
SP:9f4c8080e3e3b45abdd1d906312bd1271670a805
THE EFFICACY OF L1 REGULARIZATION IN NEURAL NETWORKS
1 INTRODUCTION . Neural networks have been successfully applied in modeling nonlinear regression functions in various domains of applications . A critical evaluation metric for a predictive learning model is to measure its statistical risk bound . For example , the L1 or L2 risks of typical parametric models such as linear regressions are at the order of ( d/n ) 1/2 for small d ( Seber & Lee , 2012 ) , where d and n denote respectively the input dimension and number of observations . Obtaining the risk bound for a nonparametric regression model such as neural networks is highly nontrivial . It involves an approximation error ( or bias ) term as well as a generalization error ( or variance ) term . The standard analysis of generalization error bounds may not be sufficient to describe the overall predictive performance of a model class unless the data is assumed to be generated from it . For the model class of two-layer feedforward networks and a rather general data-generating process , Barron ( 1993 ; 1994 ) proved an approximation error bound of O ( r−1/2 ) where r denotes the number of neurons . The author further developed a statistical risk error bound of O ( ( d/n ) 1/4 ) , which is the tightest statistical risk bound for the class of two-layer neural networks up to the authors ’ knowledge ( for d < n ) . This risk bound is based on an optimal bias-variance tradeoff involving an deliberate choice of r. Note that the risk is at a convergence rate much slower than the classical parametric rate . We will tackle the same problem from a different perspective , and obtain a much tighter risk bound . A practical challenge closely related to statistical risks is to select the most appropriate neural network architecture for a particular data domain ( Ding et al. , 2018 ) . For two-layer neural networks , this is equivalent to selecting the number of hidden neurons r. While a small r tends to underfit , researchers have observed that the network is not overfitting even for moderately large r. Nevertheless , recent research has also shown that an overly large r ( e.g. , when r > n ) does cause overfitting with high probability ( Zhang et al. , 2016 ) . It can be shown under some non-degeneracy conditions that a two-layer neural network with more than n hidden neurons can perfectly fit n arbitrary data , even in the presence of noise , which inevitably leads to overfitting . A theoretical choice of r suggested by the asymptotic analysis in ( Barron , 1994 ) is at the order of ( n/d ) 1/2 , and a practical choice of r is often from cross-validation with an appropriate splitting ratio ( Ding et al. , 2018 ) . An alternative perspective that we advocate is to learn from a single neural network with sufficiently many neurons and an appropriate L1 regularization on the neuron coefficients , instead of performing a selection from multiple candidate neural models . A potential benefit of this approach is easier hardware implementation and computation since we do not need to implement multiple models separately . Perhaps more importantly , this perspective of training enables much tighter risk bounds , as we will demonstrate . In this work , we focus on the model class of two-layer feedforward neural networks . Our main contributions are summarized below . First , we prove that L1 regularization on the coefficients of the output layer can produce a risk bound O ( ( d/n ) 1/2 ) ( up to a logarithmic factor ) under the L1 training loss , which approaches the minimax optimal rate . Such a rate has not been established under the L2 training loss so far . The result indicates a potential benefit of using L1 regularization for training a neural network , instead of selecting from a number of neurons . Additionally , a key ingredient of our result is a unique amalgamation of dimension-based and norm-based risk analysis , which may be interesting on its own right . The technique leads to an interesting observation that an excessively large r can reduce approximation error while not increasing generalization error under L1 regularizations . This implies that an explicit regularization can eliminate overfitting even when the specified number of neurons is enormous . Moreover , we prove that the L1 regularization on the input layer can induce sparsity by producing a risk bound that does not involve d , where d may be much larger compared with the true number of significant variables . Related work on neural network analysis . Despite the practical success of neural networks , a systematic understanding of their theoretical limit remains an ongoing challenge and has motivated research from various perspectives . Cybenko ( 1989 ) showed that any continuous function could be approximated arbitrarily well by a two-layer perceptron with sigmoid activation functions . Barron ( 1993 ; 1994 ) established an approximation error bound of using two-layer neural networks to fit arbitrary smooth functions and their statistical risk bounds . A dimension-free Rademacher complexity for deep ReLU neural networks was recently developed ( Golowich et al. , 2017 ; Barron & Klusowski , 2019 ) . Based on a contraction lemma , a series of norm-based complexities and their corresponding generalization errors are developed ( Neyshabur et al. , 2015 , and the references therein ) . Another perspective is to assume that the data are generated by a neural network and convert its parameter estimation into a tensor decomposition problem through the score function of the known or estimated input distribution ( Anandkumar et al. , 2014 ; Janzamin et al. , 2015 ; Ge et al. , 2017 ; Mondelli & Montanari , 2018 ) . Also , tight error bounds have been established recently by assuming that neural networks of parsimonious structures generate the data . In this direction , Schmidt-Hieber ( 2017 ) proved that specific deep neural networks with few non-zero network parameters can achieve minimax rates of convergence . Bauer & Kohler ( 2019 ) developed an error bound that is free from the input dimension , by assuming a generalized hierarchical interaction model . Related work on L1 regularization . The use of L1 regularization has been widely studied in linear regression problems ( Hastie et al. , 2009 , Chapter 3 ) . The use of L1 regularization for training neural networks has been recently advocated in deep learning practice . A prominent use of L1 regularization was to empirically sparsify weight coefficients and thus compress a network that requires intensive memory usage ( Cheng et al. , 2017 ) . The extension of L1 regularization to groupL1 regularization ( Yuan & Lin , 2006 ) has also been extensively used in learning various neural networks ( Han et al. , 2015 ; Zhao et al. , 2015 ; Wen et al. , 2016 ; Scardapane et al. , 2017 ) . Despite the above practice , the efficacy of L1 regularization in neural networks deserves more theoretical study . In the context of two-layer neural networks , we will show that the L1 regularizations in the output and input layers play two different roles : the former for reducing generalization error caused by excessive neurons while the latter for sparsifying input signals in the presence of substantial redundancy . Unlike previous theoretical work , we consider the L1 loss , which ranks among the most popular loss functions in , e.g. , learning from ordinal data ( Pedregosa et al. , 2017 ) or imaging data ( Zhao et al. , 2016 ) , and for which the statistical risk has not been studied previously . In practice , the use of L1 loss for training has been implemented in prevalent computational frameworks such as Tensorflow ( Google , 2016 ) , Pytorch ( Ketkar , 2017 ) , and Keras ( Gulli & Pal , 2017 ) . 2 PROBLEM FORMULATION . 2.1 MODEL ASSUMPTION AND EVALUATION . Suppose we have n labeled observations { ( xi , yi ) } i=1 , ... , n , where yi ’ s are continuously-valued responses or labels . We assume that the underlying data generating model is yi = f∗ ( xi ) + εi for some unknown function f∗ ( · ) , where xi ’ s ∈ X ⊂ Rd are independent and identically distributed , and εi ’ s are independent and identically distributed that is symmetric at zero and E ( ε2i | xi ) ≤ τ2 . ( 1 ) Here , X is a bounded set that contains zero , for example { x : ‖x‖∞ ≤ M } for some constant M . Our goal is learn a regression model f̂n : x 7→ f̂n ( x ) for prediction . The f̂n is obtained from the following form of neural networks r∑ j=1 ajσ ( w > j x+ bj ) + a0 , ( 2 ) where a0 , aj , bj ∈ R , wj ∈ Rd , j = 1 , . . . , r , are parameters to estimate . We let a = [ a0 , a1 , . . . , ar ] T denote the output layer coefficients . An illustration is given Figure 1 . The estimation is typically accomplished by minimizing the empirical risk n−1 ∑n i=1 ` ( yi , f ( xi ) ) , for some loss function l ( · ) plus a regularization term . We first consider the L1 regularization at the output layer . In particular , we search for such f by the empirical risk minimization from the function class FV = { f : Rd → R ∣∣∣f ( x ) = r∑ j=1 ajσ ( w > j x+ bj ) + a0 , ‖a‖1 ≤ V } ( 3 ) where V is a constant . The following statistical risk measures the predictive performance of a learned model f : R ( f ) ∆= E ` ( y , f ( x ) ) − E ` ( y , f∗ ( x ) ) . The loss function ` ( · ) is pre-determined by data analysts , usually the L1 loss defined by ` ( y , ỹ ) = |y − ỹ| or the L2 loss defined by ` 2 ( y , ỹ ) = ( y − ỹ ) 2 . Under the L1 loss , the risk is R ( f ) = E |f∗ ( x ) + ε − f ( x ) | − E |ε| , which is nonnegative for symmetric random variables ε . It is typical to use the same loss function for both training and evaluation . 2.2 NOTATION . Throughout the paper , we use n , d , k , r to denote the number of observations , the number of input variables or input dimension , the number of significant input variables or sparsity level , the number of neurons ( or hidden dimension ) , respectively . We write an & bn , bn . an , or bn = O ( an ) , if |bn/an| < c for some constant c for all sufficiently large n. We write an bn if an & bn as well as an . bn . Let N ( µ , V ) denote Gaussian distribution with mean µ and covariance V . Let ‖ · ‖1 and ‖ · ‖2 denote the common L1 and L2 vector norms , respectively . Let X denote the essential support of X . For any vector z ∈ Rd , we define ‖z‖X ∆ = supx∈X |x > z| , which may or may not be infinity . If X = { x : ‖x‖∞ ≤ M } , ‖z‖X is equivalent to M‖z‖1 . Throughout the paper , f̂n denotes the estimated regression function with n being the number of observations .
This paper studies the statistical risk bounds for two-layer neural networks with $L_1$-regularization. The authors consider two types of $L_1$-regularization: the $L_1$-regularization on output layer and the $L_1$-regularization on the input layer. For the $L_1$-regularization on output layer, the authors develop nearly minimax statistical risk bounds. For the $L_1$-regularization on input layers, the authors develop bounds with no-dependency on the input dimension. The paper is clearly written and easy to follow.
SP:d8da07759331a59ef4062e5893eef1a8a8d2c589
Neural Learning of One-of-Many Solutions for Combinatorial Problems in Structured Output Spaces
1 INTRODUCTION . Neural networks have become the de-facto standard for solving perceptual tasks over low level representations , such as pixels in an image or audio signals . Recent research has also explored their application for solving symbolic reasoning tasks , requiring higher level inferences , such as neural theorem proving ( Rocktäschel et al. , 2015 ; Evans & Grefenstette , 2018 ; Minervini et al. , 2020 ) , and playing blocks world ( Dong et al. , 2019 ) . The advantage of neural models for these tasks is that it will create a unified , end-to-end trainable representation for integrated AI systems that combine perceptual and high level reasoning . Our paper focuses on one such high level reasoning task – solving combinatorial problems in structured output spaces , e.g. , solving a Sudoku or N-Queens puzzle . These can be thought of as Constraint Satisfaction problems ( CSPs ) where the underlying constraints are not explicitly available , and need to be learned from training data . We focus on learning such constraints by a non-autoregressive neural model where variables in the structured output space are decoded simultaneously ( and therefore independently ) . Notably , most of the current state-of-the-art neural models for solving combinatorial problems , e.g. , SATNET ( Wang et al. , 2019 ) , RRN ( Palm et al. , 2018 ) , NLM ( Dong et al. , 2019 ) , work with non autoregressive architectures because of their high efficiency of training and inference , since they do not have to decode the solution sequentially . One of the key characteristics of such problems is solution multiplicity – there could be many correct solutions for any given input , even though we may be interested in finding any one of these solutions . For example , in a game of Sudoku with only 16 digits filled , there are always multiple correct solutions ( McGuire et al. , 2012 ) , and obtaining any one of them suffices for solving Sudoku . Unfortunately , existing literature has completely ignored solution multiplicity , resulting in sub-optimally trained ∗Equal contribution . Work done while at IIT Delhi . Current email : deepanshu.jindal @ alumni.iitd.ac.in networks . Our preliminary analysis of a state-of-the-art neural Sudoku solver ( Palm et al. , 2018 ) 1 , which trains and tests on instances with single solutions , showed that it achieves a high accuracy of 96 % on instances with single solution , but the accuracy drops to less than 25 % , when tested on inputs that have multiple solutions . Intuitively , the challenge comes from the fact that ( a ) there could be a very large number of possible solutions for a given input , and ( b ) the solutions may be highly varied . For example , a 16-givens Sudoku puzzle could have as many as 10,000 solutions , with maximum hamming distance between any two solutions being 61 . Hence , we argue that an explicit modeling effort is required to represent this solution multiplicity . As the first contribution of our work , we formally define the novel problem of One-of-Many Learning ( 1oML ) . It is given training data of the form { ( xi , Yxi ) } , where Yxi denotes a subset of all correct outputs Yxi associated with input xi . The goal of 1oML is to learn a function f such that , for any input x , f ( x ) = y for some y ∈ Yx . We show that a naïve strategy that uses separate loss terms for each ( xi , yij ) pair where yij ∈ Yxi can result in a bad likelihood objective . Next , we introduce a multiplicity aware loss ( CC-LOSS ) and demonstrate its limitations for non-autoregressive models on structured output spaces . In response , we present our first-cut approach , MINLOSS , which picks up the single yij closest to the prediction ŷi based on the current parameters of prediction network ( base architecture for function f ) , and uses it to compute and back-propagate the loss for that training sample xi . Though significantly better than naïve training , through a simple example , we demonstrate that MINLOSS can be sub-optimal in certain scenarios , due to its inability to pick a yij based on global characteristics of solution space . To alleviate the issues with MINLOSS , we present two exploration based techniques , I-EXPLR and SELECTR , that select a yij in a non-greedy fashion , unlike MINLOSS . Both techniques are generic in the sense that they can work with any prediction network for the given problem . I-EXPLR relies on the prediction network itself for selecting yij , whereas SELECTR is an RL based learning framework which uses a selection module to decide which yij should be picked for a given input xi , for back-propagating the loss in the next iteration . The SELECTR ’ s selection module is trained jointly along with the prediction network using reinforcement learning , thus allowing us to trade-off exploration and exploitation in selecting the optimum yij by learning a probability distribution over the space of possible yij ’ s for any given input xi . We experiment on three CSPs : N-Queens , Futoshiki , and Sudoku . Our prediction networks for the first two problems are constructed using Neural Logic Machines ( Dong et al. , 2019 ) , and for Sudoku , we use a state-of-the-art neural solver based on Recurrent Relational Networks ( Palm et al. , 2018 ) . In all three problems , our experiments demonstrate that SELECTR vastly outperforms naïve baselines by up to 21 pts , underscoring the value of explicitly modeling solution multiplicity . SELECTR also consistently improves on other multiplicity aware methods , viz . CC-LOSS , MINLOSS , and I-EXPLR . 2 BACKGROUND AND RELATED WORK . Related ML Models : There are a few learning scenarios within weak supervision which may appear similar to the setting of 1oML , but are actually different from it . We first discuss them briefly . ‘ Partial Label Learning ’ ( PLL ) ( Jin & Ghahramani , 2002 ; Cour et al. , 2011 ; Xu et al. , 2019 ; Feng & An , 2019 ; Cabannes et al. , 2020 ) involves learning from the training data where , for each input , a noisy set of candidate labels is given amongst which only one label is correct . This is different from 1oML in which there is no training noise and all the solutions in the solution set Yx for a given x are correct . Though some of the recent approaches to tackle ambiguity in PLL ( Cabannes et al. , 2020 ) may be similar to our methods , i.e. , MINLOSS , by the way of deciding which solution in the target set should be picked next for training , the motivations are quite different . Similarly , in the older work by ( Jin & Ghahramani , 2002 ) , the EM model , where the loss for each candidate is weighted by the probability assigned to that candidate by the model itself , can be seen as a naïve exploration based approach , applied to a very different setting . In PLL , the objective is to select the correct label out of many incorrect ones to reduce training noise , whereas in 1oML , selecting only one label for training provably improves the learnability and there is no question of reducing noise as all the labels are correct . Further , most of the previous work on PLL considers classification over a discrete output space with , say , L labels , where as in 1oML , we work with structured output spaces , e.g. , an r dimensional vector space where each dimension represents a discrete space of L labels . This 1Available at https : //data.dgl.ai/models/rrn-sudoku.pkl exponentially increases the size of the output space , making it intractable to enumerate all possible solutions as is typically done in existing approaches for PLL ( Jin & Ghahramani , 2002 ) . Within weak supervision , the work on ‘ Multi Instance Learning ’ ( MIL ) approach for Relation Extraction ( RE ) employs a selection module to pick a set of sentences to be used for training a relation classifier , given a set of noisy relation labels ( Feng et al. , 2018 ; Qin et al. , 2018 ) . This is different from us where multiplicity is associated with any given input , not with a class ( relation ) . Other than weak supervision , 1oML should also not be confused with the problems in the space of multi-label learning ( Tsoumakas & Katakis , 2007 ) . In multi-label learning , given a solution set Yx for each input x , the goal is to correctly predict each possible solution in the set Yx for x . Typically , a classifier is learned for each of the possible labels separately . On the other hand , in 1oML , the objective is to learn any one of the correct solutions for a given input , and a single classifier is learned . The characteristics of the two problems are quite different , and hence , also the solution approaches . As we show later , the two settings lead to requirements for different kinds of generalization losses . Solution Multiplicity in Other Settings : There is some prior work related to our problem of solution multiplicity , albeit in different settings . An example is the task of video-prediction , where there can be multiple next frames ( yij ) for a given partial video xi ( Henaff et al. , 2017 ; Denton & Fergus , 2018 ) . The multiplicity of solutions here arises from the underlying uncertainty rather than as a inherent characteristic of the domain itself . Current approaches model the final prediction as a combination of the deterministic part oblivious to uncertainty , and a non-determinstic part caused by uncertainty . There is no such separation in our case since each solution is inherently different from others . Another line of work , which comes close to ours is the task of Neural Program Synthesis ( Devlin et al. , 2017 ; Bunel et al. , 2018 ) . Given a set of Input-Output ( IO ) pairs , the goal is to generate a valid program conforming to the IO specifications . For a given IO pair , there could be multiple valid programs , and often , training data may only have one ( or a few ) of them . Bunel et al . ( 2018 ) propose a solution where they define an alternate RL based loss using the correctness of the generated program on a subset of held out IO pairs as reward . In our setting , in the absence of the constraints ( or rules ) of the CSP , there is no such additional signal available for training outside the subset of targets Yx for an input x . It would also be worthwhile to mention other tasks such as Neural Machine translation ( Bahdanau et al. , 2015 ; Sutskever et al. , 2014 ) , Summarization ( Nallapati et al. , 2017 ; Paulus et al. , 2018 ) , Image Captioning ( Vinyals et al. , 2017 ; You et al. , 2016 ) etc. , where one would expect to have multiple valid solutions for any given input . E.g. , for a given sentence in language A , there could be multiple valid translations in language B . To the best of our knowledge , existing literature ignores solution multiplicity in such problems , and simply trains on all possible given labels for any given input . Models for Symbolic Reasoning : Our work follows the line of recent research , which proposes neural architectures for implicit symbolic and relational reasoning problems ( Santoro et al. , 2018 ; Palm et al. , 2018 ; Wang et al. , 2019 ; Dong et al. , 2019 ) . We experiment with two architectures as base prediction networks : Neural Logic Machines ( NLMs ) ( Dong et al. , 2019 ) , and Recurrent Relational Networks ( RRNs ) ( Palm et al. , 2018 ) . NLMs allow learning of first-order logic rules expressed as Horn Clauses over a set of predicates , making them amenable to transfer over different domain sizes . The rules are instantiated over a given set of objects , where the groundings are represented as tensors in the neural space over which logical rules operate . RRNs use a graph neural network to learn relationships between symbols represented as nodes in the graph , and have been shown to be good at problems that require multiple steps of symbolic reasoning .
The authors work in the domain of applying neural networks to combinatorial problems with structured output space, such as sudoku and n-queens. They notice how models currently performing well at this task encounter difficulties when there are multiple possible solutions. They formalize the task of learning any of multiple given (and possibly quite different) labels and propose an RL based approach to solve that task. They show improvements over selected baselines.
SP:44e95502bce4ea4e27495a27aa1bf56e962ca6fd
Fixing Asymptotic Uncertainty of Bayesian Neural Networks with Infinite ReLU Features
1 INTRODUCTION . Calibrated uncertainty is crucial for safety-critical decision making by neural networks ( NNs ) ( Amodei et al. , 2016 ) . Standard training methods of NNs yield point estimates that , even if they are highly accurate , can still be severely overconfident ( Guo et al. , 2017 ) . Approximate Bayesian methods , which turn NNs into Bayesian neural networks ( BNNs ) , can be used to address this issue . Kristiadi et al . ( 2020 ) recently showed that for binary ReLU classification networks , far away from the training data ( more precisely : when scaling any input x with a scalar α > 0 and taking the limit α → ∞ ) , the uncertainty of BNNs can be bounded away from zero . This is an encouraging result when put in contrast to the standard point-estimated networks , for which Hein et al . ( 2019 ) showed earlier that the same asymptotic limit always yields arbitrarily high ( over- ) confidence . Nevertheless , BNNs can still be asymptotically overconfident ( albeit less so than the standard NNs ) since the aforementioned uncertainty bound can be loose . This issue is our principal interest in this paper . An intuitive interpretation is that ReLU NNs “ miss out on some uncertainty ” even in their Bayesian formulation , because they fit a finite number of ReLU features to the training data , by “ moving around ” these features within the coverage of the data . This process has no means to encode a desideratum that the model should be increasingly uncertain away from the data . In this work , we “ add in ” additional uncertainty by considering an infinite number of additional ReLU features spaced at regular intervals away from the data in the input and hidden spaces of the network . Since these features have negligible values in the data region , they do not contribute to the training process . Hence , we can consider a prior for their weights , chosen to be an independent Gaussian , and arrive at a specific Gaussian process ( GP ) which covariance function is a generalization of the classic cubic-spline kernel ( Wahba , 1990 ) . This GP prior can be added to any pre-trained ReLU BNN as a simple augmentation to its output . Considering the additive combination of a parametric BNN and GP prior together , we arrive at another view of the method : It approximates the “ full GP posterior ” that models the residual of a point-estimated NN ( Blight & Ott , 1975 ; Qiu et al. , 2020 ) . In our factorization , the BNN models uncertainty around the training data , while the GP prior models uncertainty far away from them . By factorizing these two parts from each other , our formulation requires no ( costly ) GP posterior inference , and thus offers lightweight , modular uncertainty calibration . See Fig . 1 for illustration . Theoretical analysis is a core contribution of this work . We show that the proposed method ( i ) preserves the predictive performance of the base ReLU BNN . Furthermore , it ( ii ) ensures that the surrounding output variance asymptotically grows cubically in the distance to the training data , and thus ( iii ) yields uniform asymptotic confidence in the multi-class classification setting . These results extend those of Kristiadi et al . ( 2020 ) in so far as their analysis is limited to the binary classification case and their bound can be loose . Furthermore , our approach is complementary to the method of Meinke & Hein ( 2020 ) which attains maximum uncertainty far from the data for non-Bayesian point-estimate NNs . Finally , our empirical evaluation confirms our analysis and shows that the proposed method also improves uncertainty estimates in the non-asymptotic regime . 2 BACKGROUND . 2.1 BAYESIAN NEURAL NETWORKS . Let f : RN ×RD → RC defined by ( x , θ ) 7→ f ( x ; θ ) = : fθ ( x ) be a neural network . Here , θ is the collection of all parameters of f . Given an i.i.d . dataset D : = ( xm , ym ) Mm=1 , the standard training procedure amounts to finding a point estimate θ∗ of the parameters θ , which can be identified in the Bayesian framework with maximum a posteriori ( MAP ) estimation1 θ∗ = arg max θ log p ( θ | D ) = arg max θ M∑ m=1 log p ( ym | fθ ( xm ) ) + log p ( θ ) . While this point estimate may yield highly accurate predictions , it does not encode uncertainty over θ , causing an overconfidence problem ( Hein et al. , 2019 ) . Bayesian methods can mitigate this issue , specifically , by treating the parameter of f as a random variable and applying Bayes rule . The resulting network is called a Bayesian neural network ( BNN ) . The common way to approximate the posterior p ( θ | D ) of a BNN is by a Gaussian q ( θ | D ) = N ( θ | µ , Σ ) , which can be constructed for example by a Laplace approximation ( MacKay , 1992b ) or variational Bayes ( Hinton & Van Camp , 1993 ) . Given such an approximate posterior q ( θ | D ) and a test point x∗ ∈ RN , one then needs to marginalize the parameters to make predictions , i.e . we compute the integral y∗ = ∫ h ( f ( x∗ ; θ ) ) q ( θ | D ) dθ , where h is an inverse link function , such as the identity function for regression or the logistic-sigmoid and softmax functions for binary and multi-class classifications , respectively . Since the network f is a non-linear function of θ , this integral does not have an analytic solution . However , one can obtain a useful approximation via the following network linearization : Let x∗ ∈ RN be a test point and q ( θ | D ) = N ( θ | µ , Σ ) be a Gaussian approximate posterior . Linearizing f around µ yields the following marginal distribution over the function output f ( x∗ ) :2 p ( f ( x∗ ) | x∗ , D ) ≈ N ( f ( x∗ ) | f ( x∗ ; µ ) ︸ ︷︷ ︸ = : m∗ , J > ∗ ΣJ∗︸ ︷︷ ︸ = : V∗ ) , ( 1 ) where J∗ is the Jacobian of f ( x∗ ; θ ) w.r.t . θ at µ . ( In the case of a real-valued network f , we use the gradient g∗ : = ∇θf ( x∗ ; θ ) |µ instead of J∗ . ) This distribution can then be used as the predictive distribution p ( y∗ | x∗ , D ) in the regression case . For classifications , we need another approximation since h is not the identity function . One such approximation is the generalized probit approximation 1In the statistical learning view , log p ( ym | fθ ( xm ) ) is identified with the empirical risk , log p ( θ ) with the regularizer . The two views are equivalent in this regard . 2See Bishop ( 2006 , Sec . 5.7.1 ) for more details . ( Gibbs , 1997 ; Spiegelhalter & Lauritzen , 1990 ; MacKay , 1992a ) : p ( y∗ = c | x∗ , D ) ≈ exp ( m∗c κ∗c ) ∑C i=1 exp ( m∗i κ∗i ) , for all c = 1 , . . . , C , ( 2 ) where for each i = 1 , . . . , C , the real numbers m∗i is the i-th component of the vector m∗ , and κ∗i : = ( 1 + π/8 v∗ii ) −1/2 where v∗ii is the i-th diagonal term of the matrix V∗ . These approximations are analytically useful , but can be expensive due to the computation of the Jacobian matrix J∗ . Thus , Monte Carlo ( MC ) integration is commonly used as an alternative , i.e . we approximate y∗ ≈ 1S ∑S s=1 h ( f ( x∗ ; θs ) ) with θs ∼ q ( θ | D ) . Finally , given a classification predictive distribution p ( y∗ | x∗ , D ) , we define the predictive confidence of x∗ as the maximum probability conf ( x∗ ) : = maxc∈ { 1 , ... , C } p ( y∗ = c | x∗ , D ) over class labels . 2.2 RELU AND GAUSSIAN PROCESSES . The ReLU activation function ReLU ( z ) : = max ( 0 , z ) ( Nair & Hinton , 2010 ) has become the defacto choice of non-linearity in deep learning . Given arbitrary real numbers c , it can be generalized as ReLU ( z ; c ) : = max ( 0 , z − c ) , with the “ kink ” at location c. An alternative formulation , useful below , is in terms of the Heaviside function H as ReLU ( z ; c ) = H ( z − c ) ( z − c ) . We may define a collection of d such ReLU functions evaluated at some point in R as the function φ : R → RK with z 7→ ( ReLU ( z ; c1 ) , . . . , ReLU ( z ; cK ) ) > . We call this function the ReLU feature map ; it can be interpreted as “ placing ” ReLU functions at different locations in R. Consider a linear model g : R × RK → R defined by g ( x ; w ) : = w > φ ( x ) . Suppose φ regularly places the K generalized ReLU functions centered at ( ci ) Ki=1 over [ cmin , cmax ] ⊂ R , where cmin < cmax . If we consider a Gaussian prior p ( w ) : = N ( w ∣∣0 , σ2K−1 ( cmax − cmin ) I ) over the weights w then , as K goes to infinity , the distribution over g ( x ) is a Gaussian process with mean 0 and covariance ( using the shorthand gx : = g ( x ) and x̄ : = min ( x , x′ ) ; full derivation in Appendix A ) : lim K→∞ cov ( gx , gx′ ) = σ 2H ( x̄− cmin ) ( 1 3 ( x̄3 − c3min ) − 1 2 ( x̄2 − c2min ) ( x+ x′ ) + ( x̄− cmin ) xx′ ) = : k1 ( x , x′ ; cmin , σ 2 ) , for x̄ ≤ cmax . Since this expression does not depend on cmax , we consider the limit cmax → ∞ . The resulting covariance function is the cubic spline kernel ( Wahba , 1990 ) . 3 METHOD . Hein et al . ( 2019 ) showed that the confidence of point-estimated ReLU networks ( i.e . feed-forward nets which use piecewise-affine activation functions and are linear in the output layer ) approaches 1 with increasing distance from the training data . For binary classification , Kristiadi et al . ( 2020 ) showed that Gaussian-approximated ReLU BNNs f instead approach a constant confidence bounded away from 1 , but not necessarily close to the maximum uncertainty value of 1/2 . Thus , just being Bayesian as such does not fix overconfidence entirely . A close look at their proof suggests that the issue is a structural limitation of the deep model itself : for any input x∗ and a sufficiently large scalar α , both the mean and standard deviation of the output f ( αx∗ ) are linear functions of x∗ . Intuitively , this issue arises because the net only has finitely many ReLU features available to “ explain ” the data , and thus it “ lacks ” ReLU features for modeling uncertainty away from the data . In this section , we will utilize the cubic spline kernel to construct a new kernel and method that , intuitively speaking , adds an infinite number ReLU features away from the data to pre-trained BNNs . This construction adds the “ missing ” ReLU features and endows BNNs with super-quadratic output variance growth , without affecting predictions . All proofs are in Appendix B .
The authors consider the issue of overconfidence in ReLU NN and BNNs, particularly for data that are far (in Euclidean distance) from the training data. They address this by modeling the residual (to the NN) in the latent space with a GP. The kernel for this GP is derived as the limit of infinitely many ReLU-based random features. Specifically, this kernel has the property that it scales cubically with the norm of the input, and so causes large uncertainty away from the origin. Crucially, the GP term changes little from its prior distribution after conditioning on the data, so no expensive inference is required under the approximation made.
SP:3665fd208fe6506f389defd4267ebc6ed5fefe98
Model-Free Counterfactual Credit Assignment
1 INTRODUCTION . Reinforcement learning ( RL ) agents act in their environments and learn to achieve desirable outcomes by maximizing a reward signal . A key difficulty is the problem of credit assignment ( Minsky , 1961 ) , i.e . to understand the relation between actions and outcomes and to determine to what extent an outcome was caused by external , uncontrollable factors , i.e . to determine the share of ‘ skill ’ and ‘ luck ’ . One possible solution to this problem is for the agent to build a model of the environment , and use it to obtain a more fine-grained understanding of the effects of an action . While this topic has recently generated a lot of interest ( Ha & Schmidhuber , 2018 ; Hamrick , 2019 ; Kaiser et al. , 2019 ; Schrittwieser et al. , 2019 ) , it remains difficult to model complex , partially observed environments . In contrast , model-free reinforcement learning algorithms such as policy gradient methods ( Williams , 1992 ; Sutton et al. , 2000 ) perform simple time-based credit assignment , where events and rewards happening after an action are credited to that action , post hoc ergo propter hoc . While unbiased in expectation , this coarse-grained credit assignment typically has high variance , and the agent will require a large amount of experience to learn the correct relation between actions and rewards . Another issue of model-free methods is that counterfactual reasoning , i.e . reasoning about what would have happened had different actions been taken with everything else remaining the same , is not possible . Given a trajectory , model-free methods can in fact only learn about the actions that were actually taken to produce the data , and this limits the ability of the agent to learn quickly . As environments grow in complexity due to partial observability , scale , long time horizons , and large number of agents , actions taken by the agent will only affect a vanishing part of the outcome , making it increasingly difficult to learn from classical reinforcement learning algorithms . We need better credit assignment techniques . In this paper , we investigate a new method of credit assignment for model-free reinforcement learning which we call Counterfactual Credit Assignment ( CCA ) , that leverages hindsight information to implicitly perform counterfactual evaluation - an estimate of the return for actions other than the ones which were chosen . These counterfactual returns can be used to form unbiased and lower variance estimates of the policy gradient by building future-conditional baselines . Unlike classical Q functions , which also provide an estimate of the return for all actions but do so by averaging over all possible futures , our methods provide trajectory-specific counterfactual estimates , i.e . an estimate of the return for different actions , but keeping as many of the external factors constant between the return and its counterfactual estimate . Our method is inspired by ideas from causality theory , but does not require learning a model of the environment . Our main contributions are : a ) proposing a set of environments which further our understanding of when difficult credit assignment leads to poor policy learning ; b ) introducing new model-free policy gradient algorithms , with sufficient conditions for unbiasedness and guarantees for lower variance . In the appendix , we further c ) present a collection of model-based policy gradient algorithms extending previous work on counterfactual policy search ; d ) connect the literature about causality theory , in particular notions of treatment effects , to concepts from the reinforcement learning literature . 2 COUNTERFACTUAL CREDIT ASSIGNMENT . 2.1 NOTATION . We use capital letters for random variables and lowercase for the value they take . Consider a generic MDP ( X , A , p , r , γ ) . Given a current state x ∈ X and assuming an agent takes action a ∈ A , the agent receives reward r ( x , a ) and transitions to a state y ∼ p ( ·|x , a ) . The state ( resp . action , reward ) of the agent at step t is denoted Xt ( resp . At , Rt ) . The initial state of the agent X0 is a fixed x0 . The agent acts according to a policy π , i.e . action At is sampled from the policy πθ ( ·|Xt ) where θ are the parameters of the policy , and aims to optimize the expected discounted return E [ G ] = E [ ∑ t γ tRt ] . The return Gt from step t is Gt = ∑ t′≥t γ t′−tRt′ . Finally , we define the score function sθ ( πθ , a , x ) = ∇θ log πθ ( a|x ) ; the score function at time t is denoted St = ∇θ log πθ ( At|Xt ) . In the case of a partially observed environment , we assume the agent receives an observation Et at every time step , and simply define Xt to be the set of all previous observations , actions and rewards Xt = ( O≤t ) , with Ot = ( Et , At−1 , Rt−1 ) .1 P ( X ) will denote the probability distribution of a random variable X . 2.2 POLICY GRADIENT ALGORITHMS . We begin by recalling two forms of policy gradient algorithms and the credit assignment assumptions they make . The first is the REINFORCE algorithm introduced by Williams ( 1992 ) , which we will also call the single-action policy gradient estimator : Proposition 1 ( single action estimator ) . The gradient of E [ G ] is given by ∇θE [ G ] = E [ ∑ t≥0 γ t St ( Gt − V ( Xt ) ) ] , where V ( Xt ) = E [ Gt|Xt ] . The appeal of this estimator lies in its simplicity and generality : to evaluate it , the only requirement is the ability to simulate trajectories , and compute both the score function and the return . Let us note two credit assignment features of the estimator . First , the score function St is multiplied not by the whole return G , but by the return from time t. Intuitively , action At can only affect states and rewards coming after time t , and it is therefore pointless to credit action At with past rewards . Second , removing the value function V ( Xt ) from the return Gt does not bias the estimator and typically reduces variance . This estimator updates the policy through the score term ; note however the learning signal only updates the policy πθ ( a|Xt ) at the value taken by action At = a ( other values are only updated through normalization ) . The policy gradient theorem from ( Sutton et al. , 2000 ) , which we will also call all-action policy gradient , shows it is possible to provide learning signal to all actions , given we have access to a Q-function Qπ ( x , a ) = E [ Gt|Xt = x , At = a ] , which we will call a critic in the following . Proposition 2 ( All-action policy gradient estimator ) . The gradient of E [ G ] is given by ∇θE [ G ] = E [ ∑ t γ t ∑ a∇θπθ ( a|Xt ) Qπθ ( Xt , a ) ] . A particularity of the all-actions policy gradient estimator is that the term at time t for updating the policy ∇πθ ( a|Xt ) Qπθ ( Xt , a ) depends only on past information ; this is in contrast with the score function estimates above which depend on the return , a function of the entire trajectory . Proofs can be found in appendix D.1 . 2.3 INTUITIVE EXAMPLE ON HINDSIGHT REASONING AND SKILL VERSUS LUCK . Imagine a scenario in which Alice just moved to a new city , is learning to play soccer , and goes to the local soccer field to play a friendly game with a group of other kids she has never met . As the game goes on , Alice does not seem to play at her best and makes some mistakes . It turns out however her partner Megan is a strong player , and eventually scores the goal that makes the game a victory . What should Alice learn from this game ? 1Previous actions and rewards are provided as part of the observation as it is generally beneficial to do so in partially observable Markov decision processes . When using the single-action policy gradient estimate , the outcome of the game being a victory , and assuming a ±1 reward scheme , all her actions are made more likely ; this is in spite of the fact that during this particular game she may not have played well and that the victory is actually due to her strong teammate . From an RL point of view , her actions are wrongly credited for the victory and positively reinforced as a result ; effectively , Alice was lucky rather than skillful . Regular baselines do not mitigate this issue , as Alice did not a priori know the skill of Megan , resulting in a guess she had a 50 % chance of winning the game and corresponding baseline of 0 . This could be fixed by understanding that Megan ’ s strong play were not a consequence of Alice ’ s play , that her skill was a priori unknown but known in hindsight , and that it is therefore valid to retroactively include her skill level in the baseline . A hindsight baseline , conditioned on Megan ’ s estimated skill level , would therefore be closer to 1 , driving the advantage ( and corresponding learning signal ) close to 0 . As pointed out by Buesing et al . ( 2019 ) , situations in which hindsight information is helpful in understanding a trajectory are frequent . In that work , the authors adopt a model-based framework , where hindsight information is used to ground counterfactual trajectories ( i.e . trajectories under different actions , but same randomness ) . Our proposed approach follows a similar intuition , but is model-free : we attempt to measure—instead of model— information known in hindsight to compute a future-conditional baseline , with the constraint that the captured information must not have been caused by the agent . 2.4 FUTURE-CONDITIONAL POLICY GRADIENT ESTIMATOR ( FC-PG ) . Intuitively , our approach for assigning proper credit to action At is as follows : via learning statistics Φt we capture relevant information from the rest of the trajectory , e.g . including observations Ot′ at times t′ greater than t. We then learn value functions which are conditioned on the additional hindsight information contained in Φt . In general , these future-conditional values and critics would be biased for use in a policy gradient algorithm ; we therefore need to correct their impact on the policy gradient through an importance correction term . Theorem 1 ( Future single-action policy gradient estimator ) . Let Φt be an arbitrary random variable . The following is an unbiased estimator of the gradient of E [ G ] : ∇θE [ G ] = E [ ∑ t γt St ( Gt − πθ ( At|Xt ) Pπθ ( At|Xt , Φt ) V ( Xt , Φt ) ) ] ( 1 ) where V ( Xt , Φt ) = E [ Gt|Xt , Φt ] is the future Φ-conditional value function2 , and Pπθ ( At|Xt , Φt ) is the posterior probability of action At given ( Xt , Φt ) , for trajectories generated by policy πθ . Theorem 2 ( Future all-action policy gradient estimator ) . The following is an unbiased estimator of the gradient of E [ G ] : ∇θE [ G ] = E [ ∑ t γt ∑ a ∇θ log πθ ( a|Xt ) Pπθ ( a|Xt , Φt ) Qπθ ( Xt , Φt , a ) ] ( 2 ) where Qπ ( Xt , Φt , a ) = E [ Gt|Xt , Φt , At = a ] is the future-conditional Q function ( critic ) . Furthermore , we have Qπθ ( Xt , a ) = E [ Qπθ ( Xt , Φt , a ) Pπ ( a|Xt , Φt ) π ( a|Xt ) ] . Proofs can be found in appendix D.2 . These estimators bear similarity to ( and indeed , generalize ) the Hindsight Credit Assignment estimator ( Harutyunyan et al. , 2019 ) , see the literature review and appendix C for a discussion of the connections .
The paper explores a new approach to credit assignment that complements existing work. It focuses on model-free approaches to credit assignment using hindsight information. In contrast to some prior work on this topic, e.g., (Harutyunyan et al. 2019), the paper does not rely explicitly on hand-crafted information, but instead learns to extract useful hindsight information. The contributions of the paper are two-fold. First, the paper introduces two new policy gradient estimators, FC-PG and CCA-PG, and it proves that the novel gradient estimators are unbiased. Second, it provides experimental evidence that the novel estimators are beneficial compared to some prior work (in particular (Harutyunyan et al. 2019)).
SP:bad1f2bea2a00f6edc474cd1e78c4011525348e5
Towards Finding Longer Proofs
We present a reinforcement learning ( RL ) based guidance system for automated theorem proving geared towards Finding Longer Proofs ( FLoP ) . FLoP focuses on generalizing from short proofs to longer ones of similar structure . To achieve that , FLoP uses state-of-the-art RL approaches that were previously not applied in theorem proving . In particular , we show that curriculum learning significantly outperforms previous learning-based proof guidance on a synthetic dataset of increasingly difficult arithmetic problems . 1 INTRODUCTION . In 1958 B. F. Skinner , a pioneer of modern behaviorism , in the article “ Teaching Machines ” ( Skinner , 1958 ) noticed that “ in acquiring complex behavior the student must pass through a carefully designed sequence of steps , often of considerable length . Each step must be so small that it can always be taken , yet in taking it the student moves somewhat closer to fully competent behavior ” . His study extended also to the teaching of arithmetic : “ The student is expected to arrive at 9 · 7 = 63 , not by memorizing it as he would memorize a line of poetry , but by putting into practice such principles as that nine times a number is the same as ten times the number minus the number . . . ” . The idea of learning using a curriculum of problems is also widely used in machine learning ( Bengio et al. , 2009 ; Elman , 1993 ; Resnick et al. , 2018 ; Salimans & Chen , 2018 ) and in this work we apply curriculum learning to automatic theorem proving focusing on arithmetic . Our work has the following contributions . ( 1 ) We introduce a new theorem proving algorithm FLoP ( Section 4 ) based on reinforcement learning and the connection tableau calculus . FLoP uses a meta-learning variation of the curriculum learning algorithms presented by Resnick et al . ( 2018 ) and Salimans & Chen ( 2018 ) . ( 2 ) We introduce a synthetic dataset of increasingly difficult arithmetic problems organized as RL environments ( Section 5 ) . ( 3 ) We use this benchmark to compare ( Section 6 ) the performance of our system with state-of-the-art saturation provers Vampire ( Kovács & Voronkov , 2013 ) and E ( Schulz , 2013 ) guided by human-designed strategies , and with rlCoP ( Kaliszyk et al. , 2018 ) – a recently developed RL-based connection tableau prover . FLoP significantly outperforms the other provers on harder problems , demonstrating its ability to find longer proofs . Our datasets presented in Section 5 seem to be particularly suited for machine learning methods : problems are simple , solutions are long , repetitive and rather predictable for humans . Still , state-ofthe-art systems struggle with solving some of the problems – see Section 6 for details . Other works using machine learning to guide a prover ( Chvalovský et al. , 2019 ; Jakubuv & Urban , 2017 ; Kaliszyk & Urban , 2015b ; Kaliszyk et al. , 2018 ; Loos et al. , 2017 ; Urban et al. , 2011 ) usually deal with large mathematical corpora , while we focus on a fragment of Robinson Arithmetic , which is a limited and simple theory . Our reasons behind this narrower focus : ( a ) We wanted to create a scalable RL benchmark with emphasis on the length of proofs . ( b ) A symbolic method based on human-designed sets of hints ( Veroff , 1996 ) was previously successfully applied in abstract algebra by Kinyon et al . ( 2013 ) to discover long proofs and we wanted to check whether learning of long proofs is feasible using the state-of-the-art ML toolset . ( c ) We wanted interpretable failure modes . In the case of large mathematical corpora , the interpretation of failures may be a hard task because of multiple failures and the complicated structure of the corpora , requiring specialized domain knowledge both in mathematics and with regard to the inner workings of the proof system . Our code , datasets and all experiment configuration files are available at http : //bit.ly/code_ atpcurr1 . Supplementary materials including screencasts with gameplays performed in our environments are available at the project webpage http : //bit.ly/site_atpcurr . 2 RELATED WORK . Machine learning datasets and RL environments involving mathematics and logic . The arithmetic dataset which we introduce in Section 5 is geared towards longer proofs and is structurally much simpler than other theorem proving datasets which we list below . One can think about this suite of RL problems as gridworlds of theorem proving ( see ( Sutton & Barto , 2018 , Example 3.5 ) for a broader explanation of importance of gridworlds in RL ) . Our dataset is intended to become a general purpose testing ground for theorem proving and reinforcement learning methods , in particular for meta-learning and hierarchical learning algorithms . TPTP ( Sutcliffe , 2017 ) consists of 22507 problems in 53 domains collected over several decades . A large dataset for developing machine learning for theorem proving based on the Mizar Mathematical Library ( MML ) ( Grabowski et al. , 2010 ) was introduced by Urban ( 2006a ) in the MPTP project . The dataset was used e.g . by Alemi et al . ( 2016 ) ; Kaliszyk & Urban ( 2015a ) ; Urban ( 2007 ) ; Urban et al . ( 2008 ) . Similar datasets based on the Isabelle/HOL , HOL Light/Flyspeck and HOL4/CakeML systems and projects ( Blanchette et al. , 2016 ; Gauthier & Kaliszyk , 2015 ; Kaliszyk & Urban , 2014 ) were introduced in the last decade and used for the CASC LTB ( large theory ) ATP competition ( Sutcliffe & Urban , 2016 ) and other system evaluations . Such datasets cover large areas of mathematics and computer science and contain diverse axioms , lemmas , theorems , definitions , and symbols . Smaller subsets of lemmas leading to the Bolzano-Weierstrass theorem were selected from the MPTP dataset to form the MPTP Challenge ( Urban , 2006b ) and the MPTP2078 benchmark ( Alama et al. , 2014 ) . HOLStep ( Kaliszyk et al. , 2017 ) introduced a dataset based on 11400 proofs , including a proof of the Kepler Conjecture ( Hales et al. , 2015 ) , formalized using HOL Light ( Harrison , 1996 ) . In HOLStep and in FormulaNet ( Wang et al. , 2017 ) the dataset was used as a benchmark for various neural architectures . The recent HOList project ( Bansal et al. , 2019a ; b ; Paliwal et al. , 2019 ) uses 29462 theorems formalized in HOL Light and instruments them for experiments oriented towards tactic selection , where a tactic is a human-designed program which aggregates multiple proof steps . GamePad ( Huang et al. , 2019 ) introduced a dataset based on a formalization of the Feit-Thompson Theorem ( Gonthier et al. , 2013 ) along with a generated algebra problems . It is intended for learning tactic selection together with an auxiliary task of predicting the number of proof steps left . A dataset based on theorems proved in HOL4 ( Slind & Norrish , 2008 ) was used for developing the TacticToe ( Gauthier et al. , 2018 ) learning-guided tactical prover . Saxton et al . ( 2019 ) proposed a dataset of simple algebraic problems expressed in English . Arithmetic problems without a natural language context were tackled by Neural GPUs ( Kaiser & Sutskever , 2016 ) and its improved successors ( Freivalds & Liepins , 2017 ) . Supervised learning was also applied to various instances of propositional satisfiability in NeuroSAT ( Selsam et al. , 2018 ) and NeuroCore ( Selsam & Bjørner , 2019 ) as well as in ( Chvalovsky , 2019 ; Evans et al. , 2018 ) . Datasets introduced in Section 5 are OpenAI-gym ( Brockman et al. , 2016 ) compliant and can be tested with modern RL algorithms . Previous work on theorem proving and RL includes TacticToe , HOList and rlCoP ( Kaliszyk et al. , 2018 ) . TacticToe and rlCoP use guided Monte Carlo Tree Search ( MCTS ) and HOList proposes a custom RL algorithm . Machine learning systems for guidance of theorem provers . Our current work focuses on providing guidance for the fCoP ( Kaliszyk et al. , 2015b ) theorem prover . fCoP is an OCaml implementation of the very compact lean connection tableau prover ( Otten & Bibel , 2003 ) . fCoP was used as the proof engine in the guided provers FEMaLeCoP ( Kaliszyk & Urban , 2015b ) and rlCoP ( Kaliszyk et al. , 2018 ) . FEMaLeCoP learns only from positive data using two simple , but fast machine learning models ( custom nearest neighbour and naive Bayes ) . In rlCoP , the value and policy functions of the guided MCTS algorithm are learned similar to ( Anthony et al. , 2017 ; Silver et al. , 2017 ) , using gradient boosted trees as implemented in the XGBoost ( Chen & Guestrin , 2016 ) library . In contrast , we use neural network models instead of trees and the Proximal Policy Optimization ( PPO ) ( Schulman et al. , 2017 ) algorithm instead of MCTS . In a longer run we believe that these methods should be combined , see ( François-Lavet et al. , 2018 , Section 6.2 ) , but in this work we 1This distribution does not include the fCoP theorem prover , which can not yet be publicly released , however a binary can be obtained upon request . propose to investigate how much can be achieved directly via rollouts and without a search algorithm like MCTS . A distinctive feature of our approach is the ability to perform very long rollouts both in training and evaluation . We demonstrate this in Section 6 , see Figure 4 . Chvalovský et al . ( 2019 ) ; Jakubuv & Urban ( 2017 ; 2019 ) ; Loos et al . ( 2017 ) added learning-based guidance to E prover ( Schulz , 2013 ) . These are supervised experiments which learn from saturation-style proof traces . Meta-learning suites of RL environments . Meta-learning algorithms in the context of RL can be tested using a suite of simulated robotic tasks ( Finn et al. , 2017 ; Rakelly et al. , 2019 ) , one of discrete environments proposed in ( Cobbe et al. , 2018 ; Juliani et al. , 2019 ; Menashe & Stone , 2018 ; Nichol et al. , 2018 ; Roderick et al. , 2017 ) or a new MineRL ( Guss et al. , 2019 ) suite of problems with mixed continuous and discrete actions . Our suite of tasks involves discrete actions . Curriculum learning and reinforcement learning . Our algorithm FLoP is an adaptation of the curriculum learning algorithms presented in ( Resnick et al. , 2018 ; Salimans & Chen , 2018 ) in a context of a suite of reinforcement learning environments presented in Section 5 . 3 FCOP AND THE CONNECTION TABLEAU CALCULUS In this section , we give a brief overview of the connection tableau method , as implemented by the fCoP system . We assume basic first-order logic and theorem proving terminology ( Robinson & Voronkov , 2001 ) . The input is a ( mathematical ) problem consisting of axioms and conjectures formally stated in first-order logic ( FOL ) . The calculus searches for refutational proofs , i.e . proofs showing that the axioms together with the negated conjectures are unsatisfiable . The FOL formulas are first translated to clause normal form ( CNF ) , producing a set of first-order clauses consisting of literals ( atoms or their negations ) . Figure 1 shows a closed connection tableau , i.e. , a finished proof tree where every branch contains complementary literals ( literals with opposite polarity ) . Since all branches contain a pair of contradictory literals , this shows that the set of clauses is unsatisfiable . Proof search starts with a start clause as a goal and proceeds by building a connection tableau by repeatedly applying extension steps and reduction steps . The extension step connects ( unifies ) the current goal ( a selected tip of a tableau branch ) with a complementary literal of a new clause . This extends the current branch , possibly splitting it into several branches if there are more literals in the new clause , and possibly instantiating some variables in the tableau . The reduction step connects the current goal to a complementary literal of the active path , thus closing the current branch . The proof is finished when all branches are closed . The extension and reduction steps are nondeterministic , requiring backtracking in the standard connection calculus . Brute force search such as iterative deepening can be used to ensure completeness , i.e. , making sure that the proof search finds a proof if there is any . fCoP represents theorem proving as a one-person game . The game ends with a success if a proof is found . The prover has many choices to make along the way , hence it typically has to explore a search space that is exponentially large in the length of the proof . In fCoP , the action space is roughly correlated with the size of the axiom set . While this can be large for large problems , typically only a few actions are available in any particular state . 4 FLOP – THE MAIN ALGORITHM The FLoP algorithm combines the connection tableau calculus with guidance based on PPO and curriculum learning Resnick et al . ( 2018 ) ; Salimans & Chen ( 2018 ) . Actions in our theorem proving game consist of selecting an extension step as defined in Section 3 ( reduction steps are performed automatically by the game engine ) . Figures 2 and 3 show how actions interact with other components of FLoP . Each extension step involves selecting one of the clauses , however , not all clauses are applicable as actions at a given proof step , due to the unification condition . The full information about the game state consists of all previous proof steps , the partial proof tree ( proof state ) and the current goal . The state and actions ( formulas ) are represented using previously developed features Kaliszyk & Urban ( 2015b ) ; Kaliszyk et al . ( 2015a ; 2018 ) . The features mainly include ( suitably hashed ) triples of adjacent nodes in the formula trees and in the partial proof trees . This means that the proof states and the actions are presented as ( sparse ) fixed length vectors , see the inputs to the policy and value networks in Figure 2 . These features have proved useful but are not free from problems . See the discussion in Appendix A. Curriculum Learning on Proofs . In theorem proving we are dealing with sparse rewards and we tackle this with the help of curriculum learning as implemented in Algorithm 1 . First , in line 6 of Algorithm 1 we sample a problem . In lines 7-20 we play an episode : if we have a proof then we start from the state dictated by the global curriculum ( lines 7-9 ) . If we do not have a proof then we start from the beginning . If the policy succeeds in finding a proof of a yet unproven problem then we reset the global curriculum to 1 in line 20 . We sample k episodes repeating k times the loop in lines 6-20 and finally decide whether to increase the global curriculum in lines 23-24 . We can advance curriculum globally ( as in Algorithm 1 ) or independently for each problem . We found that global advancement makes learning more stable , so that is our default approach . We can start learning with or without training proofs . It does not change the processing of Algorithm 1 . In Section 6 we provide experimental evidence with regard to both approaches .
This work introduces a method for learning to prove theorems which can leverage prior proving experience in order to discover very long proofs. At its core it works by inputting a corpus of training problems (which can also be annotated with solutions i.e. proofs), training a policy to solve these training problems by curriculum learning. The curriculum works by first supervising on the trace of an entire solution, and then once the system can solve a particular problem, decreasing the amount of the trace that it supervises on. The authors claim that this is a kind of analogical reasoning, because the system's policy is implicitly learning to represent the state/action space on the basis of prior experience.
SP:2093f2f9d4bf15531dd76e02f8d36cddf6961352
UserBERT: Self-supervised User Representation Learning
1 INTRODUCTION . The choice of data representations , i.e. , how to create meaningful features , imposes tremendous impact on the performance of machine learning applications ( Bengio et al. , 2013 ) . Therefore , data processing and feature engineering have been the decisive steps in developing machine learning models . To extend the applicability of the models , recent research on representation learning aims to discover the underlying explanatory factors hidden in raw data . With rapid advances in this direction , we have witnessed many breakthroughs in the areas of computer vision ( CV ) ( Doersch et al. , 2015 ; Sharif Razavian et al. , 2014 ; Simo-Serra et al. , 2015 ) and natural language processing ( NLP ) ( Mikolov et al. , 2013 ; Pennington et al. , 2014 ; Lin et al. , 2017 ) . Similarly , for building user-oriented industrial applications like next purchase prediction and recommendation , much effort has been spent on understanding business models and user behavior for creating useful features ( Richardson et al. , 2007 ; Covington et al. , 2016 ) . This is a time-consuming and application-specific process . Also , it is challenging to reuse these features or share gained knowledge between different services and applications . To solve the issues of isolated feature engineering and task-oriented pipeline design , the pretrainingtransfer learning paradigm has been explored . For example , multi-task learning ( MTL ) has shown promising results ( Ni et al. , 2018 ) . Nevertheless , MTL has its intrinsic challenges , e.g. , deciding which tasks to learn jointly ( Standley et al. , 2019 ) , or how to weigh tasks ( Kendall et al. , 2018 ) , to achieve optimal performance . More importantly , the learning still hinges on large amounts of well-annotated user labels . Inspired by the BERT model and its variations ( Devlin et al. , 2019 ; Lan et al. , 2020 ) , this paper explores the feasibility of understanding users in a similar way to how language is understood . We think it is conceptually intuitive to make such an analogy since understanding language and users share a similar goal , i.e. , understanding a conveyed message , but with different mediums . The former models what is said ( sentences ) while the latter learns from what is done ( behavior ) . The syntax and semantics of a sentence are comparable with the behavioral patterns and the characteristics of a user . Hence , we hypothesize the learning procedure can be consistent in methodology as well , and propose to build upon BERT for pretraining user representations on unlabeled behavior data . Our proposal , UserBERT , simultaneously learns from three categories of user data , i.e. , long-term and short-term behavior as well as user profiles , via a unified architecture . In particular , different action types ( e.g. , page views , clicks and purchases ) and attributes ( e.g. , shop and item genre ) are chosen to represent long-term and short-term user behavior . For these two behavior types , we first present distinct strategies to discretize them into a sequence of behavioral words . Instead of modeling single user actions sequentially , the applied discretization leads to better generalization . The token representation of these behavioral words is computed by the concatenation and mean calculation of the word embeddings of the attribute IDs in each action , and this is followed by the summation of token , position and segment embeddings . These representation vectors are finally aligned with the word embeddings of user categorical profiles as the input to UserBERT . With this input , we design a novel pretext task , masked multi-label classification , and the UserBERT model is pretrained via optimizing the multi-label classifications of the multiple attributes in the masked behavioral words . Despite the parallels between user behavior and sentences , there are substantial differences and challenges in designing the learning procedure in a coherent way . Our model is able to deal with heterogeneous user behavior data , and achieve generalization via effective tokenization and the pretraining task . While there is prior work applying BERT to task-specific user modeling ( Sun et al. , 2019b ) , this paper is built upon the assumption that behavioral patterns can be understood like the structure of a language . The UserBERT model explores integrating various types of user data in a unified architecture and learning generic representations with self-supervised signals . In our experiments , the pretrained model is fine-tuned on three different real-world tasks , and the results show that UserBERT outperforms task-specific modeling and multi-task learning based pretraining . Our contributions are summarized as follows : • We propose UserBERT , a self-supervised learning model , to pretrain user representations via analogizing actions in a user behavior sequence to words in sentence . It eliminates the needs of previous approaches for collecting additional user annotated labels . • We design the discretization of user raw data sequences , the generation of the input representation and a novel pretext task for pretraining . • UserBERT adopts a unified model architecture to enable the simultaneous learning from heterogeneous data including long , short-term behavior as well as demographics . • We demonstrate the empirical power of UserBERT with extensive experiments . Our model is compared with task-specific models without pretraining and multi-task learning based pretraining models , and achieves performance gains on three real-world applications . 2 RELATED WORK . 2.1 PRETRAINING AND TRANSFER LEARNING . Recent studies have demonstrated that pretraining on large , auxiliary datasets followed by finetuning on target tasks is a promising paradigm for boosting performance ( Oquab et al. , 2014 ; Donahue et al. , 2014 ; Hendrycks et al. , 2019 ; Ghadiyaram et al. , 2019 ) . Multi-task learning has been one of the commonly adopted approaches for pretraining due to its ability to improve generalization ( Zhang & Yang , 2017 ; Ruder , 2017 ) . It is shown that the pretrained MTL models can boost performance even when transferred to unseen tasks ( Liu et al. , 2015 ; Ni et al. , 2018 ) . Despite its success , MTL still has many challenges , such as negative transfer and the learning adjustment between different tasks ( Guo et al. , 2018 ) . Also , MTL requires large amounts of well-annotated labels to produce satisfying outputs . There are two common forms of adaptation when transferring the pretrained models to a given target task , i.e. , feature-based in which the pretrained weights are frozen , and directly fine-tuning the pretrained model ( Peters et al. , 2019 ) . We fine-tune pretrained models in our experiments . 2.2 SELF-SUPERVISED LEARNING . Deep learning models can already compete with humans on challenging tasks like semantic segmentation in the CV area ( He et al. , 2015 ) as well as a few language understanding tasks ( Liu et al. , 2019 ) . However , such success relies on adequate amounts of quality training data , which can be extremely expensive or even impossible to obtain ( Kolesnikov et al. , 2019 ) . As a result , a lot of research efforts aim to liberate learning from the heavy dependency on supervised signals . Selfsupervised learning ( SSL ) , a subclass of unsupervised learning , has been drawing more attention since the recent advances in the NLP field . Instead of using supervision signals , SSL only requires unlabeled data and trains models via formulating a pretext learning task . There are two main types of pretext tasks : context-based ( Pathak et al. , 2016 ; Noroozi & Favaro , 2016 ; Sermanet et al. , 2018 ; Wu et al. , 2019 ) and contrastive-based ( Hjelm et al. , 2019 ; Chen et al. , 2020 ) . 2.3 USER MODELING . To build user-oriented machine learning applications , the key challenge is finding an expressive representation of user data so that the followed modeling can effectively extract useful information to produce good performance . For that reason , much effort has been going towards data preprocessing and transformations , such as converting user categorical attributes to embeddings and aggregating user activities like total number of visits , clicks or amount of money spent over certain time interval or a particular product genre ( Richardson et al. , 2007 ; Zhu et al. , 2010 ) . Deep learning models have successfully mitigated the dependency on human efforts due to its ability to capture underlying representations in raw data ( Cheng et al. , 2016 ; Covington et al. , 2016 ; Zhou et al. , 2018 ) . However , these models need massive supervision signals for training , and they are mostly designed for specific tasks like recommendation ( Pei et al. , 2019 ) and click-through rate prediction ( Zhou et al. , 2019 ) . Despite the success of these deep learning models , they fail to generate promising results for realworld industrial tasks with limited labeled data . To deal with this issue , the methodology that pretraining universal user representations on massive user data , and then fine-tuning them for downstream tasks is explored . The goal is to learn a universal and effective representation for each user which can be transferred to new tasks ( Ni et al. , 2018 ) . However , MTL-based pretraining still requires the collection of user labels . Also , it is limited by inherent shortcomings to achieve optimal results ( Kendall et al. , 2018 ; Guo et al. , 2018 ) . It is highly desirable for user applications to have a learning paradigm that does not require large amounts of manually annotated data . Our work is inspired by the BERT model which pretrains representations for language understanding . We aim to pretrain universal user representations by analogizing actions in a user behavior sequence to words in sentence , and apply transfer learning to downstream tasks , especially those with few labeled data , for boosting performance . 3 THE PROPOSED APPROACH . In this section , we first review the BERT model in brief , and then elaborate on how to extend it to user data including behavior sequences and demographic profiles . 3.1 THE BERT MODEL . BERT is a language representation model that pretrains deep bidirectional representations by jointly conditioning on both left and right contexts in all encoding layers ( Devlin et al. , 2019 ) . The input of the BERT model is a sequence of tokens that can represent both a single text sentence and a pair of sentences . These discrete tokens consist of words and a set of special tokens : separation tokens ( SEP ) , classifier tokens ( CLS ) and tokens for masking values ( MASK ) . For a token in the sequence , its input representation is a sum of a word embedding , the embeddings for encoding position and segment . The BERT model is pretrained with two tasks , masked language modeling ( MLM ) and next sentence prediction . In MLM , the input tokens are randomly masked and the BERT model is trained to reconstruct these masked tokens . In detail , a linear layer is learned to map the final output features of the masked tokens to a distribution over the vocabulary and the model is trained with a crossentropy loss . In next sentence prediction , the inputs are two sampled sentences with a separator token SEP between them . The model learns to predict whether the second sentence is the successor of the first . A linear layer connecting the final output representations of the CLS token is trained to minimize a cross-entropy loss on binary labels . Many recent research works focus on extending the BERT model to areas beyond NLP , and successfully achieved state-of-the-art results ( Sun et al. , 2019a ; Lu et al. , 2019 ; Su et al. , 2020 ; Qi et al. , 2020 ) .
The paper presents an approach to learning user representations based on activity patterns on e-commerce websites and a user profile. The method turns activity patterns into a sequence of discrete tokens based on the action type and attributes that correspond to a certain action. A self-supervised transformer is trained on this data with a masked language modeling (MLM) objective. Data is compartmentalized as long-term patterns such as a purchase or the use of reward points or short-term such as clickthrough data or user profile information such as user age, gender, or location. Separate segment and position embeddings are used within each compartment. Since each masked token is a high-level action type that may have many attributes, predicting a masked-token is cast as a multi-label classification problem over attributes.
SP:6a4302d604b03b5c7ce0c30450808705348d4e9c
More Side Information, Better Pruning: Shared-Label Classification as a Case Study
1 INTRODUCTION . Pruning Neural networks , the task of compressing a network by removing parameters , has been an important subject both for practical deployment and theoretical research . Some pruning algorithms have focused on manipulating pre-trained models , ( Mozer & Smolensky , 1989 ; LeCun et al. , 1990 ; Reed , 1993 ; Han et al. , 2015 ) while recent work have identified that there exist sparse subnetwork ( also called winning tickets ) in randomly-initialized neural networks that , when trained in isolation , can match and often even surpass the test accuracy of the original network ( Frankle & Carbin , 2019 ; Frankle et al. , 2020 ) . There is a vast literature on network pruning , and we refer the reader to Blalock et al . ( 2020 ) ; Sze et al . ( 2017 ) ; Reed ( 1993 ) for an excellent survey . In this work , we adopt the pruning methods of Tanaka et al . ( 2020 ) ; Lee et al . ( 2019 ) ; Wang et al . ( 2020 ) ; Han et al . ( 2015 ) which have been influential in our experiments . More crucially , most literature on pruning has been focused on designing a machine that converts a fixed deep learning solution to a prediction problem , to a more efficient version thereof . The pruning machine has a compression knob which trades off the level of pruning with accuracy of the prediction . The more resources we are willing to expend in prediction ( measured here using floating-point operations ( FLOPs ) ) , the more information we can obtain , where information here is measured as prediction accuracy , or as reduction of uncertainty ( defined below ) . We now ask what happens when we want to prune a network , but also possess information on the prediction coming from another source . Intuitively , given some form of additional side information , we should be able to prune our network with a higher compression ratio to reach the same level of accuracy for the prediction task , compared with a scenario with no additional side information . But how can we take the side information into account when pruning ? 1.1 MOTIVATION . This question was motivated by an actual real-life scenario . We describe the scenario in detail , although the actual problem we thoroughly study in what follows is much simpler . Imagine a database retrieval system with a static space of objects X . Given a query object q , the goal is to return an object x from X that maximizes a ground-truth retrieval value function fq ( x ) . We have access to a function f̃q ( x ) expressed as a deep network , which approximates fq , and was trained using samples thereof . The function f̃q is very expensive to compute . ( Note that we keep q fixed here , as part of the definition of fq ( · ) , although in an actual setting both q and x would be input to a bivariate retrieval function f̃ . ) Computing f̃q ( x ) for all x ∈ X is infeasible . One way to circumvent this is by computing a less accurate , but efficient function ˜̃fq ( · ) , defined by the network resulting in a pruning of the network defining f̃q . Then compute ˜̃ fq ( · ) on all x ∈ X to obtain a shortlist of candidates X ′ , and then compute f̃q ( x ) on x ∈ X ′ only . This idea can also be bootstrapped , using rougher , more aggresively pruned estimates ˜̃̃ fq , f̃ ( 4 ) q , f̃ ( 5 ) q ... and increasingly shorter shortlist . However , an important point is ignored in this approach : The space X is structured , and we expect there to be prior connections between its elements . This is the side information . Such connections can be encoded , for example , as a similarity graph over X where it is expected that fq ( x1 ) is close to fq ( x2 ) whenever there is an edge between x1 , x2 . There is much work on deep networks over graphs ( Zhou et al. , 2018 ; Kipf & Welling , 2017 ; Wu et al. , 2020 ) . But how can the extra information , encoded as a graph , be used in conjunction with the pruning process ? Let us simplify the information retrieval scenario . First , assume that we are in a classification and not in a regression scenario , so that fq ( x ) can take a finite set of discrete values , and f̃q ( x ) returns a vector of logits , one coordinate per class . Second , assume the side information on X is a partitioning of X into cliques , or clusters X1 ... Xk where on each clique the value of fq ( · ) is fixed , and written as fq ( Xi ) , i = 1 .. k. Now the problem becomes that of estimating the fq ( Xi ) ’ s using n random samples xi1 ... xin ∈ Xi , i = 1 .. k. 1 Fixing the cluster Xi , one obvious thing to do in order to estimate fq ( Xi ) is to take an average of the logit vectors f̃q ( xi1 ) ... f̃q ( xin ) , where f̃q is some fixed ( possibly pruned ) network , and use the argmax coordinate as prediction . Assuming each pruned network f̃q outputs a prediction vector with a certain level of uncertainty , the averaged vector should have lower uncertainty , and this can be quantified using simple probabilistic arguments . This will henceforth be called the baseline method . Intuitively the baseline method , though easy to do using out-of-the-box pruning libraries , can not possibly be optimal given the side information of same label across Xi . Indeed , the baseline method feeds all the examples xi1 ... xin independently through separate instantiations of f̃q , and nothing 1Continuing the retrieval story , the practitioner would now find the Xi that maximizes fq , and then further focus the search in that cluster . prevents the different instantiations to learn overlapping pieces of information . Hence it makes sense to somehow interconnect these networks as a meta-network , and possibly do the pruning on the meta-network . In this work , we experiment with several methods for performing this task , and compare our results with the baseline . 1.2 THE SHARED-LABEL PREDICTION PROBLEM . We depart from the original motivating information retrieval scenario , and henceforth consider a simpler , toy problem which we call the shared-label prediction problem . We are given an underlying space of instances X and an unknown ground truth labelling function f : X 7→ Y for some discrete set Y of labels . The goal is to train a classifier that , given a random n-tuple of instances x1 ... xn ∈ Xn sharing the same unknown label y ( so that f ( x1 ) = · · · = f ( xm ) = y ) , outputs a prediction of y . This is the shared prediction problem . Our work is empirical , and the goal is to develop general methods for the shared prediction problem , given a base network , designed for the standard ( non-shared ) prediction problem , and a base pruning method , we ask : How do we reuse and rewire these readily available tools to effectively solve the shared-label prediction problem on tuples of n-instances ? 2 OUR CONTRIBUTION . Below in Section 2.1 we present four methods . Each method uses a baseline CNN model , together with a pruning method with a compression ratio knob ρ , and creates a meta-network that is parameterized by the information size n and by ρ , designed to solve the shared classification problem . To measure our success , we will both use a measure of accuracy as well as a measure of relative information which we define below . We will compute these measures extensively over a grid of possible pairs ( n , ρ ) , for each method . Visualization of the results highlights an interesting invariant that is worth studying . Intuitively , the measure of relative information tells us how efficiently each method uses its computational resource , without wasting time on computing the same pieces of information over and over on the n-tuple of instances . Therefore , it allows us to obtain a quantitative comparison between the methods . To define the measure , we first recall some information theory . Given a random variable Y over a discrete space , the Shannon entropy , or uncertainty of Y is H [ Y ] = − ∑ Pr [ Y = y ] log Pr [ Y = y ] , where the sum ranges over possible values of Y . In our case , we will use H ( Y ) to measure the uncertainty in the label of a randomly drawn instance , which is also the uncertainty in the label of a randomly drawn n-tuple in the shared label setting . Given a random variable Ỹ ( an estimate of Y ) , the information gain measures the difference between the entropy of Y and the expectation with respect to Ỹ of H ( Y |Ỹ ) . More precisely , IG ( Y ; Ỹ ) = H ( Y ) − EỸ [ − ∑ y Pr [ Y = y|Ỹ ] log Pr [ Y = y|Ỹ ] ] . Note that information gain is symmetrical , that is IG ( Ỹ ; Y ) = IG ( Y ; Ỹ ) . Therefore it is also called mutual information and denoted I ( Ỹ ; Y ) . In our setting , Ỹ will be an estimator of Y obtained using the output of the network on an n-tuple of instances in the shared label setting , and I ( Ỹ ; Y ) will measure the expected amount of information we learn about Y using the network output on that tuple . For a given network , we will be computing IG ( Ỹ ; Y ) empirically in what follows , by taking Ỹ to be the prediction obtained by selecting the argmax coordinate ( logit ) of the output of a network . Given a method for the shared-label scenario , we define the relative information ( RI ) to be RI ( Ỹ , Y , n , ρ ) = IG ( Ỹ ; Y ) n/ρ . In words , this is a measure of information that the network learns , per computational cost . The denominator n/ρ is a reasonable measure of computational cost for the methods we study , because for these methods , the amount of computational effort we expend for shared label instance x1 ... xn is proportional to n , and inverse proportional to the compression ratio ρ . We believe it is also a reasonable measure of computational cost for other natural methods . For all methods we study , fixing the information size n , our experiments suggest that there exists a sweet spot phenomenon , or a `` compression threshold '' in the sense that RI , as a function of ρ , has a global maximum ρ∗ . If the compression ratio ρ is smaller than ρ∗ , than we are at the undercompressed regime , where we can still save computational resources without relatively deteriorating the results , or the information , to a large extent . On the other side , if the compression ratio ρ is bigger than ρ∗ , than we are at the over-compressed regime , where we can gain a lot more information , by using a relatively mere amount of computational resources . We believe that a better understanding of this phenomenon can shed light on the interaction between different compression ratios , information sizes , and the information gains achieved by the methods ( which is equivalent to test performances , as our experiments show ) . We show that the above is a robust phenomenon that occurs in a variety of settings .
The authors study how to improve the prediction and pruning performance with additional information generated by labels in the shared-label classification problem. As a starting point, the authors consider a simple scenario where side information can be extracted from the same labeled batch. To train the neural network, the authors use a balanced loss consisting of a weighted sum of general cross-entropy and cross-entropy of average batch prediction. The authors also suggest a new CNN-LSTM architecture to improve predictive performance to exploit the side information. The experiments section shows the proposed method performs well and achieves a high compression rate.
SP:4c72c81f76d16b52fbef2e1804d913d0fbd61b2c
Bridging the Imitation Gap by Adaptive Insubordination
1 Introduction . Imitation learning ( IL ) can be remarkably successful in settings where reinforcement learning ( RL ) struggles . For instance , IL has been shown to succeed in complex tasks with sparse rewards [ 8 , 47 , 44 ] , and when the observations are high-dimensional , e.g. , in visual 3D environments [ 31 , 54 ] . To succeed , IL provides the agent with consistent expert supervision at every timestep , making it less reliant on the agent randomly attaining success . To obtain this expert supervision , it is often convenient to use “ privileged information , ” i.e. , information that is unavailable to the student at inference time . This privileged information takes many forms in practice . For instance , in navigational tasks , experts are frequently designed using shortest path algorithms which access the environment ’ s connectivity graph [ e.g. , 19 ] . Other forms of privilege include semantic maps [ e.g. , 60 , 13 ] , the ability to see into “ the future ” via rollouts [ 61 ] , and ground-truth world layouts [ 7 ] . The following example shows how this type of privileged information can result in IL dramatically failing . Example 1 ( Poisoned Doors ) . Suppose an agent is presented with N 3 doors d1 , . . . , dN . As illustrated in Fig . 1 ( for N = 4 ) , opening d1 requires entering an unknown fixed code of length M . Successful code entry results in a reward of 1 , otherwise the reward is 0 . Since the code is unknown to the agent , it would need to learn the code by trial and error . All other doors can be opened without a code . For some randomly chosen 2 j N ( sampled each episode ) , the reward behind dj is 2 but for all i 2 { 2 , . . . , N } \ { j } the reward behind di is 2 . Without knowing j , the optimal policy is to always enter the correct code to open d1 obtaining an expected reward of 1 . In contrast , if the expert ⇤denotes equal contribution by LW and UJ ; †work done , in part , as an intern at Allen Institute for AI 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . is given the privileged knowledge of the door dj with reward 2 , it will always choose to open this door immediately . It is easy to see that an agent without knowledge of j attempting to imitate such an expert will learn to open a door among d2 , . . . , dN uniformly at random obtaining an expected return of 2 · ( N 3 ) / ( N 1 ) . In this setting , training with reward-based RL after a ‘ warm start ’ with IL is strictly worse than starting without it : the agent needs to unlearn its policy and then , by chance , stumble into entering the correct code for door d1 , a practical impossibility when M is large . To characterize this imitation failure , we show that training a student to imitate a teacher who uses privileged information results in the student learning a policy which marginalizes out this privileged information . This can result in a sub-optimal , even uniformly random , student policy over a large collection of states . We call the discrepancy between the teacher ’ s and student ’ s policy the imitation gap . To bridge the imitation gap , we introduce Adaptive Insubordination ( ADVISOR ) . ADVISOR adaptively weights imitation and RL losses . Specifically , throughout training we use an auxiliary actor which judges whether the current observation is better treated using an IL or a RL loss . For this , the auxiliary actor attempts to reproduce the teacher ’ s action using the observations of the student at every step . Intuitively , the weight corresponding to the IL loss is large when the auxiliary actor can reproduce the teacher ’ s action with high confidence . We study the benefits of ADVISOR on thirteen tasks , including ‘ POISONEDDOORS ’ from Ex . 1 , a 2D “ lighthouse ” gridworld , a suite of tasks set within the MINIGRID environment [ 8 , 9 ] , Cooperative Navigation with limited range ( COOPNAV ) in the multi-agent particle environment ( MPE ) [ 43 , 38 ] , and two navigational tasks set in 3D , high visual fidelity , simulators of real-world living environments ( POINTNAV in AIHABITAT [ 54 ] and OBJECTNAV in ROBOTHOR [ 31 , 14 ] ) . Our results show that , • the imitation gap ’ s size directly impacts agent performance when using modern learning methods , • ADVISOR is performant ( outperforming IL and RL baselines ) , robust , and sample efficient , • ADVISOR can succeed even when expert supervision is partially corrupted , and • ADVISOR can be easily integrated in existing pipelines spanning diverse observations ( grids and pixels ) , actions spaces ( discrete and continuous ) , and algorithms ( PPO and MADDPG ) . 2 Related Work . A series of methods [ e.g. , 41 , 65 , 3 , 55 ] have made off-policy deep Q-learning stable for complex environments like Atari Games . Several high-performance ( on-policy ) policy-gradient methods for deep-RL have also been proposed [ 56 , 42 , 34 , 68 , 61 ] . For instance , Trust Region Policy Optimization ( TRPO ) [ 56 ] improves sample-efficiency by safely integrating larger gradient steps . Proximal Policy Optimization ( PPO ) [ 58 ] employs a clipped variant of TRPO ’ s surrogate objective and is widely adopted in the deep RL community . We use PPO as a baseline in our experiments . As environments get more complex , navigating the search space with only deep RL and simple heuristic exploration ( such as ✏-greedy ) is increasingly difficult . Therefore , methods that imitate expert ( i.e. , teacher ) supervision were introduced . A popular approach to imitation learning ( IL ) is Behaviour Cloning ( BC ) , i.e. , use of a supervised classification loss between the policy of the student and expert agents [ 53 , 2 ] . However , BC suffers from compounding errors . Namely , a single mistake of the student may lead to settings that have never been observed in training [ 51 ] . To address this , Data Aggregation ( DAgger ) [ 52 ] trains a sequence of student policies by querying the expert at states beyond those that would be reached by following only expert actions . IL is further enhanced by , e.g. , hierarchies [ 33 ] , improving over the expert [ 5 , 4 , 27 ] , bypassing any intermediate reward function inference [ 24 ] , and/or learning from experts that differ from the student [ 18 , 26 , 16 ] . Importantly , a sequential combination of IL and RL , i.e. , pre-training a model on expert data before letting the agent interact with the environment , performs remarkably well . This strategy has been applied in a wide range of applications – the game of Go [ 61 ] , robotic and motor skills [ 49 , 30 , 48 , 50 ] , navigation in visually realistic environments [ 19 , 12 ] , and web & language based tasks [ 21 , 11 , 59 , 67 ] . More recent methods mix expert demonstrations with the agent ’ s own rollouts instead of using a sequential combination of IL followed by RL . Chemali and Lazaric [ 6 ] perform policy iteration from expert and on-policy demonstrations . DQfD [ 23 ] initializes the replay buffer with expert episodes and adds rollouts of ( a pretrained ) agent . They weight experiences based on the previous temporal difference errors [ 55 ] and use a supervised loss to learn from the expert . For continuous action spaces , DDPGfD [ 66 ] analogously incorporates IL into DDPG [ 35 ] . POfD [ 28 ] improves by adding a demonstration-guided exploration term , i.e. , the Jensen-Shannon divergence between the expert ’ s and the learner ’ s policy ( estimated using occupancy measures ) . THOR uses suboptimal experts to reshape rewards and then searches over a finite planning horizon [ 62 ] . Zhu et al . [ 72 ] show that a combination of GAIL [ 24 ] and RL can be highly effective for difficult manipulation tasks . Critically , the above methods have , implicitly or explicitly , been designed under certain assumptions ( e.g. , the agent operates in an MDP ) which imply the expert and student observe the same state . Different from the above methods , we investigate the difference of privilege between the expert policy and the learned policy . Contrary to a sequential , static , or rule-based combination of supervised loss or divergence , we train an auxiliary actor to adaptively weight IL and RL losses . To the best of our knowledge , this hasn ’ t been studied before . In concurrent work , Warrington et al . [ 69 ] address the imitation gap by jointly training their teacher and student to adapt the teacher to the student . For our applications of interest , this work is not applicable as our expert teachers are fixed . Our approach attempts to reduce the imitation gap directly , assuming the information available to the learning agent is fixed . An indirect approach to reduce this gap is to enrich the information available to the agent or to improve the agent ’ s memory of past experience . Several works have considered this direction in the context of autonomous driving [ 10 , 20 ] and continuous control [ 17 ] . We expect that these methods can be beneficially combined with the method that we discuss next . 3 ADVISOR . We first introduce notation to define the imitation gap and illustrate how it arises due to ‘ policy averaging. ’ Using an ‘ auxiliary policy ’ construct , we then propose ADVISOR to bridge this gap . Finally , we show how to estimate the auxiliary policy in practice using deep networks . In what follows we will use the terms teacher and expert interchangeably . Our use of “ teacher ” is meant to emphasize that these policies are ( 1 ) designed for providing supervision for a student and ( 2 ) need not be optimal among all policies . 3.1 Imitation gap . We want an agent to complete task T in environment E . The environment has states s 2 S and the agent executes an action a 2 A at every discrete timestep t 0 . For simplicity and w.l.o.g . assume both A and S are finite . For example , let E be a 1D-gridworld in which the agent is tasked with navigating to a location by executing actions to move left or right , as shown in Fig . 2a . Here and below we assume states s 2 S encapsulate historical information so that s includes the full trajectory of the agent up to time t 0 . The objective is to find a policy ⇡ , i.e. , a mapping from states to distributions over actions , which maximizes an evaluation criterion . Often this policy search is restricted to a set of feasible policies ⇧feas. , for instance ⇧feas . may be the set { ⇡ ( · ; ✓ ) : ✓ 2 RD } where ⇡ ( · ; ✓ ) is a deep neural network with D-dimensional parameters ✓ . In classical ( deep ) RL [ 41 , 42 ] , the evaluation criterion is usually the expected -discounted future return . We focus on the setting of partially-observed Markov decision processes ( POMDPs ) where an agent makes decisions without access to the full state information . We model this restricted access by defining a filtration function f : S ! Of and limiting the space of feasible policies to those policies ⇧feas.f for which the value of ⇡ ( s ) depends on s only through f ( s ) , i.e. , so that f ( s ) = f ( s 0 ) implies ⇡ ( s ) = ⇡ ( s0 ) . We call any ⇡ satisfying this condition an f -restricted policy and the set of feasible f -restricted policies ⇧feas.f . In a gridworld example , f might restrict s to only include information local to the agent ’ s current position as shown in Figs . 2c , 2d . If a f -restricted policy is optimal among all other f -restricted policies , we say it is f -optimal . We call o 2 Of a partial-observation and for any f -restricted policy ⇡f we write ⇡f ( o ) to mean ⇡f ( s ) if f ( s ) = o . It is frequently the case that , during training , we have access to a teacher policy which is able to successfully complete the task T . This teacher policy may have access to the whole environment state and thus may be optimal among all policies . Alternatively , the teacher policy may , like the student , only make decisions given partial information ( e.g. , a human who sees exactly the same inputs as the student ) . For flexibility we will define the teacher policy as ⇡teachf teach , denoting it is an f teach-restricted policy for some filtration function A A Goal Boundary Agent 1 . 2 . A A A A 0 . Random start 1 . Move right · · · An . Goal reached Hypothetical episode 2 . Move right 3 . Move left 0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0 ( a ) ( b ) ( c ) ( d ) Environment E start states Actions A = { left , right } = { L , R } L R A A A A· · · A f 2-partial obs . 0.5 0.5 0.5 0.5 0.0 1.0 0.0 1.0 L R ⇡ IL f2 A A A A A· · · f 1-partial obs . 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 L R ⇡ IL f1⇡ teach < latexit sha1_base64= '' Vl/iaP1zJc4vIB4jjoXAxI2rjqE= '' > AAACEXicbVDLSsNAFJ3UV62vWpdugkVwVRJRdFl047KCfUAby2R60w6dZMLMjbSEfIV7t/oL7sStX+Af+BlOHwvbeuDC4Zx7OZfjx4JrdJxvK7e2vrG5ld8u7Ozu7R8UD0sNLRPFoM6kkKrlUw2CR1BHjgJasQIa+gKa/vB24jefQGkuowccx+CFtB/xgDOKRuoWS52YP6YdhBGmCJQNsqxbLDsVZwp7lbhzUiZz1LrFn05PsiSECJmgWrddJ0YvpQo5E5AVOomGmLIh7UPb0IiGoL10+ntmnxqlZwdSmYnQnqp/L1Iaaj0OfbMZUhzoZW8i/ue1EwyuvZRHcYIQsVlQkAgbpT0pwu5xBQzF2BDKFDe/2mxAFWVo6lpI8aUcIvV1VjDVuMtFrJLGecW9qFzeX5SrN/OS8uSYnJAz4pIrUiV3pEbqhJEReSGv5M16tt6tD+tztpqz5jdHZAHW1y8vtp5g < /latexit > Figure 2 : Effect of partial observability in a 1-dimensional gridworld environment . ( a ) The two start states and actions space for 1D-Lighthouse with N = 4 . ( b ) A trajectory of the agent following a hypothetical random policy . At every trajectory step we display output probabilities as per the shortest-path expert ( ⇡teach ) for each state . ( c/d ) Using the same trajectory from ( b ) we highlight the partial-observations available to the agent ( shaded gray ) under different filtration function f1 , f2 . Notice that , under f1 , the agent does not see the goal within its first four steps . The policies ⇡ILf1 , ⇡ IL f2 , learned by imitating ⇡teach , show that imitation results in sub-optimal policies , i.e. , ⇡ILf1 , ⇡ IL f2 6= ⇡ teach . f teach . For simplicity , we will assume that ⇡teachf teach is f teach-optimal . Subsequently , we will drop the subscript f teach unless we wish to explicitly discuss multiple teachers simultaneously . In IL [ 45 , 52 ] , ⇡f is trained to mimic ⇡teach by minimizing the ( expected ) cross-entropy between ⇡f and ⇡teach over a set of sampled states s 2 S : min ⇡f2⇧feas.f Eµ [ CE ( ⇡teach , ⇡f ) ( S ) ] , ( 1 ) where CE ( ⇡teach , ⇡f ) ( S ) = ⇡teach ( S ) log ⇡f ( S ) , denotes the usual dot-product , and S is a random variable taking values s 2 S with probability measure µ : S ! [ 0 , 1 ] . Often µ ( s ) is chosen to equal the frequency with which an exploration policy ( e.g. , random actions or ⇡teach ) visits state s in a randomly initialized episode . When it exists , we denote the policy minimizing Eq . ( 1 ) as ⇡µ , ⇡ teach f . When µ and ⇡teach are unambiguous , we write ⇡ILf = ⇡ µ , ⇡teach f . What happens when there is a difference of privilege ( or filtration functions ) between the teacher and the student ? Intuitively , if the information that a teacher uses to make a decision is unavailable to the student then the student has little hope of being able to mimic the teacher ’ s decisions . As we show in our next example , even when optimizing perfectly , depending on the choice of f and f teach , IL may result in ⇡ILf being uniformly random over a large collection of states . We call the phenomenon that ⇡ IL f 6= ⇡ teach the imitation gap . Example 2 ( 1D-Lighthouse ) . We illustrate the imitation gap using a gridworld spanning { N , . . . , N } . The two start states correspond to the goal being at either N or N , while the agent is always initialized at 0 ( see Fig . 2a ) . Clearly , with full state information , ⇡teach maps states to an ‘ always left ’ or ‘ always right ’ probability distribution , depending on whether the goal is on the left or right , respectively . Suppose now that the agent ’ s visibility is constrained to a radius of i ( Fig . 2c shows i = 1 ) , i.e. , an f i-restricted observation is accessible . An agent following an optimal policy with a visibility of radius i will begin to move deterministically towards any corner , w.l.o.g . assume right . When the agent sees the rightmost edge ( from position N i ) , it will either continue to move right if the goal is visible or , if it ’ s not , move left until it reaches the goal ( at N ) . Now we may ask : what is the best f i-restricted policy that can be learnt by imitating ⇡teach ( i.e. , what is ⇡ILfi ) ? Tragically , the cross-entropy loss causes ⇡ IL fi to be uniform in a large number of states . In particular , an agent following policy ⇡ILfi will execute left ( and right ) actions with probability 0.5 , until it is within a distance of i from one of the corners . Subsequently , it will head directly to the goal . See the policies highlighted in Figs . 2c , 2d . The intuition for this result is straightforward : until the agent observes one of the corners it can not know if the goal is to the right or left and , conditional on its observations , each of these events is equally likely under µ ( assumed uniform ) . Hence for half of these events the teacher will instruct the agent to go right . For the other half the instruction is to go left . See App . A.1 for a rigorous treatment of this example . In Sec . 4 and Fig . 6 , we train f i-restricted policies with f j-optimal teachers for a 2D variant of this example . We empirically verify that a student learns a better policy when imitating teachers whose filtration function is closest to their own . The above example shows : when a student attempts to imitate an expert that is privileged with information not available to the student , the student learns a version of ⇡teach in which this privileged information is marginalized out . We formalize this intuition in the following proposition . Proposition 1 ( Policy Averaging ) .
This paper identifies a problem in imitation learning when an expert has access to privileged information that is not available to the learner. When a decision has to be made based on the privileged information, the learner tends to choose average or uniformly random actions of the expert due to the lack of important information, which is called the "imitation gap". Therefore, in such cases, learning from the expert can actually harm the training of the learner.
SP:32040641c0cbdc186c2db90470bec7856c89cb38
Representation learning for improved interpretability and classification accuracy of clinical factors from EEG
1 INTRODUCTION . Mental health disorders make up one of the main causes of the overall disease burden worldwide ( Vos et al. , 2013 ) , with depression ( e.g. , Major Depressive Disorder , MDD ) believed to be the second leading cause of disability ( Lozano et al. , 2013 ; Whiteford et al. , 2013 ) , and around 17 % of the population experiencing its symptoms at some point throughout their lifetime ( McManus et al. , 2016 ; 2009 ; Kessler et al. , 1993 ; Lim et al. , 2018 ) . At the same time diagnosing mental health disorders has many well-identified limitations ( Insel et al. , 2010 ) . Despite the existence of diagnostic manuals ∗Equal contribution † { ghonk , irinah , nthigpen , vmiskovic , katielink , sunnyd , pramodg } @ google.com ‡JK is now at Humboldt-Universität zu Berlin , Berlin , Germany ; julia.klawohn @ hu-berlin.de §greg.hajcak @ med.fsu.edu like Structured Clinical Interview for Diagnostic and Statistical Manual of Mental Disorders ( SCID ) ( DSM-V , 2013 ) , diagnostic consistency between expert psychiatrists and psychologists with decades of professional training can be low , resulting in different diagnoses in upwards of 30 % of the cases ( Cohen ’ s Kappa = 0.66 ) ( Lobbestael et al. , 2011 ) . Even if higher inter-rater reliability was achieved , many psychological disorders do not have a fixed symptom profile , with depression alone having many hundreds of possible symptom combinations ( Fried & Nesse , 2015 ) . This means that any two people with the same SCID diagnosis can exhibit entirely different symptom expressions . This is a core challenge for developing an objective , symptom-driven diagnostic tool in this domain . Electroencephalography ( EEG ) is a measurement of post-synaptic electrical potentials that can be taken non-invasively at the scalp . EEG signals can function as important biomarkers of clinical disorders ( Hajcak et al. , 2019 ) but they are difficult to clean and interpret at scale . For example , components of the EEG signal can often significantly overlap or interfere with each other . Furthermore , nearby electronics , line noise , hardware quality , signal drift and other variations in the electrode–scalp connection can all distort the recorded EEG signal . Hence , the extraction of EEG data of sufficient quality is usually a laborious , semi-automated process executed by lab technicians with extensive training . A typical EEG analysis pipeline consists of collecting EEG recordings evoked from a large number of stimulus presentations ( trials ) in order to have sufficient data to average out the noise . Independent Components Analysis ( ICA ) is often used to visually identify and remove the component that corresponds to eye blinks ( Delorme & Makeig , 2004 ; Makeig et al. , 2004 ; Jung et al. , 2000 ) ( although see Weber et al . ( 2020 ) ; Nolan et al . ( 2010 ) as examples of fully automated artifact removal pipelines ) . This can be followed by a trial rejecton stage where anomalous trials are identified and removed from the EEG data scroll , sometimes also through visual examination . The cleaned up EEG recordings from a large number of trials are then averaged to produce an Event Related Potential ( ERP ) ( Luck , 2012 ) . This allows a clinician to extract specific ERP components relevant to the clinical factor of interest , average out the event-locked activity within them , and then either perform a statistical group comparison , or—in the case of the diagnosis classification goal—apply an off-the-shelf classifier , like Logistic Regression ( LR ) to obtain the final diagnostic results . Some more advanced classification approaches might include Support Vector Machines ( SVM ) , Linear Discriminant Analysis ( LDA ) , or Random Forest ( RF ) ( Parvar et al. , 2015 ; Güler & Übeyli , 2007 ; Subasi & Gursoy , 2010 ; Tomioka et al. , 2007 ; Bashivan et al. , 2016 ) . To summarise , EEG recordings are noisy measures of electric activity from across the brain . There is evidence that these signals are useful as markers of depression , but we lack understanding of what aspects of depression they index . Furthermore , the field of clinical psychopathology still lacks consensus on the etiopathogenesis of mental health disorders , which means that there is no such thing as the “ ground truth ” diagnostic labels . Hence , while EEG is routinely used to diagnose conditions like epilepsy ( Smith , 2005 ) , memory ( Stam et al. , 1994 ) or sleep disorders ( Karakis et al. , 2012 ) , its promise for being a reliable diagnostic tool for clinical conditions like depression has not been fully realised so far . In order to make EEG a viable diagnostic tool for a broader set of clinical conditions it is important to have an automated pipeline for extracting the relevant interpretable biomarker correlates from the ( preferably individual trial ) EEG data in a robust manner . Furthermore , this process should not depend fully on diagnostic labels which are often subjective and at best represent highly heterogeneous classes . Recent advances in deep learning have prompted research into end-to-end classification of EEG signal using convolutional and/or recurrent neural networks ( Bashivan et al. , 2016 ; Mirowski et al. , 2009 ; Cecotti & Graser , 2011 ; Güler et al. , 2005 ; Wang et al. , 2018 ; Farahat et al. , 2019 ; Solon et al. , 2019 ; Cecotti et al. , 2014 ) , holding the promise of automated extraction of relevant biomarker correlates . However , deep classifiers operate best in the big data regime with clean , well-balanced ground truth classification targets . In contrast , even the largest of EEG datasets typically contain only a few hundred datapoints , and the classification labels are subjective , noisy and unbalanced , with the majority of the data coming from healthy control participants . Hence , in order to utilise the benefits of deep learning but avoid the pitfalls of over-reliance on the classification labels , we propose a two-step pipeline consisting of unsupervised representation learning , followed by supervised mapping of the pre-trained representation to the latest version of the available diagnostic labels . The hope is that the unsupervised learning step would denoise the input signal and extract the broad statistical regularities hidden in it thus serving as an alternative for the existing automatic EEG pre-processing pipelines ( Weber et al. , 2020 ; Nolan et al. , 2010 ) while minimising the need for a priori knowledge , resulting in a representation that can continue to be useful even if the label taxonomy evolves . Recently great progress has been made in the field of deep unsupervised representation learning ( Roy et al. , 2019 ; Devlin et al. , 2018 ; Brown et al. , 2020 ; Chen et al. , 2020b ; Grill et al. , 2020 ; Chen et al. , 2020a ; Higgins et al. , 2017 ; Burgess et al. , 2019 ) . Disentangled representation learning is a branch of deep unsupervised learning that produces interpretable factorised low-dimensional representations of the training data ( Bengio et al. , 2013 ; Higgins et al. , 2017 ) . Given the requirement for model interpretability in our use-case , we use Beta Variational Autoencoders ( β-VAE ) ( Higgins et al. , 2017 ) —one of the state of the art unsupervised disentangled representation learning methods—to discover low-dimensional disentangled representations of the EEG data . We then train the recently proposed Symbol–Concept Association Network ( SCAN ) ( Higgins et al. , 2018 ) to map the available classification labels to the representations learnt by β-VAE ( see Fig . 1 ) . We demonstrate that our proposed pipeline results in better classification accuracy than the typical approach for extracting a known ERP pattern for use as a biomarker—a process that is often heavily influenced by a priori knowledge . This holds true when predicting a number of factors , including age , gender , and depression diagnosis . Furthermore , SCAN is able to produce arguably interpretable classification recommendations , whereby its decisions on different clinical factors are grounded in a small number ( often single ) latent dimensions of the β-VAE , allowing the clinicians an opportunity to interpret the recommendations produced by SCAN , and visualise what aspects of the EEG signal are associated with the classification decision post-hoc . This opens up the opportunity to use our proposed pipeline as a tool for discovering new EEG biomarkers . We validate this by “ re-discovering ” a known biomarker for depression . Finally , we demonstrate that once a β-VAE is pre-trained on ERP signals , it can often produce ERP-like reconstructions even when presented with single noisy EEG trajectories . Furthermore , the representations inferred from single EEG trials produce good classification results , still outperforming the canonical baseline method . This suggests that once a good disentangled representation is learnt , the model can be used online as new EEG data is being recorded , thus lowering the burden of keeping potentially vulnerable participants in the lab for extended recording sessions . 2 METHODS . 2.1 DATA . Anhedonia . This work targets one of the two cardinal symptoms of depression—anhedonia . Anhedonia is the lack of pleasure and/or interest in previously pleasurable stimuli and activities ( DSM-V , 2013 ) . One established approach for objectively quantifying this symptom is the use of EEG to measure neural responses elicited by emotionally salient visual stimuli . Research in this domain has uncovered a stereotyped neural activation pattern in healthy control participants , where emotionally-salient stimuli evoke a Late Positive Potential ( LPP ) in ERPs—the averaged timeseries of stimulus time-locked EEG recordings . This pattern has been identified as a potential biomarker for depression because ( on average ) this positive deflection in amplitude is attenuated or absent in individuals who exhibit symptoms of anhedonia ( Brush et al. , 2018 ; Foti et al. , 2010 ; Klawohn et al. , 2020 ; MacNamara et al. , 2016 ; Weinberg et al. , 2016 ; Weinberg & Shankman , 2017 ) . Participants . The data were collected as part of a mental health study across multiple laboratory sites . The multi-site aspect of the study meant that more data could be pooled together , however , it also meant that the data was noisier . Participants ( N=758 , ageX̄=16.7 , agerange= [ 11.0 , 59.8 ] , 398 female ) were samples of healthy controls ( nHC=485 ) and people diagnosed with depression ( among other mental illnesses ) ( see Sec . A.1.1 and Tbl . A1 for further breakdown ) . Stimuli and Experimental Design . Participants were shown a series of 80 images from the International Affective Picture System ( IAPS ) ( Lang et al. , 2008 ) presented in random order up to 40 times each . The images varied in valence : either positive ( affiliative scenes or cute animals designed to elicit the LPP ERP component ) , or neutral ( objects or scenes with people ) . Each image trial consisted of a white fixation cross presented for a random duration between 1000-2000 ms ( square window ) followed by a black and white image presented for 1000 ms. EEG Preprocessing . While participants completed the picture viewing task , EEG was continuously recorded . Each picture trial was then segmented to contain a 200 ms pre-stimulus baseline and a 1200 ms post-stimulus interval . The raw EEG signal was digitized , bandpass filtered and cleared of the eye movement artifacts and anomalous trials as described in Sec . A.1.2 . Classification labels . The following classification labels were used in this study : age ( adult or child ) , gender ( male or female ) , study site , and the presence or absence of two clinical conditions : depression diagnosis and a broader Axis 1 disorder diagnosis . All classification labels were binary , apart from study site , which contained four possible values corresponding to four different sites where the data were collected . Participants 18 years of age and older were classified as adults . Gender was classified based on self-reported values . Positive depression labels ( n=110 ) include all participants that were diagnosed with Major Depressive Disorder ( MDD ) , Persistent Depressive Disorder ( PDD ) , and depressive disorder NOS ( not-otherwise-specified ) by expert clinicians through a clinical interview ( e.g. , SCID for adults , KSADS for children ) . Axis 1 is a broad category consisting of the most prevalent psychological disorders in the population ( now discontinued in DSM-V ) that excludes intellectual disabilities and personality disorder ( DSM-V , 2013 ) . Positive Axis 1 labels ( n=273 ) encompassed all participants with positive depression labels plus individuals diagnosed with Cyclothemia , Dysthemia , anxiety disorders , mood disorders ( e.g. , Bipolar Disorder ) , panic disorders , and substance and eating disorders ( all of which are sparse ) . The Axis 1 class is provided to compare model behavior on a transdiagnostic measurement of psychopathology.1 While recruitment for the study was primarily focused on depression , the SCID produces a large set of diagnostic decisions , and we collapsed this sparser set of positive diagnoses into the existing Axis 1 DSM-IV superordinate category . We include this label in modeling and analysis to maximize the number of positive labels for training and evaluation and to give the reader a sense of what the algorithm may have learned that is generalizable across disorders—akin to the P factor ( Caspi et al. , 2014 ) . 1Disorders in this class that are present in the data include Major Depressive Disorder , Persistent Depressive Disorder , Depression NOS , Cyclothemia , Dysthemia , Bipolar I , Bipolar II , Bipolar NOS , Mania , Hypomania , Agoraphobia , Social Phobia , Separation Anxiety , Generalized Anxiety Disorder , Panic Disorder , Panic Disorder with Agoraphobia , Anorexia , Bulimia , Eating disorder NOS , Alcohol Abuse , Alcohol Dependence , and Substance Abuse and Substance Dependence disorders .
The authors propose a beta-VAE network to learn EEG representation as biomarkers for diagnosing depression from EEG data. They show improved performance compared to an off-the shelf linear classifier. The paper is well-written but lacks a description of related work in the field and also a detailed analysis of the results to support the claims.
SP:40b48e4e0455356fe1dd476f4515a1811af9d0bf
MoPro: Webly Supervised Learning with Momentum Prototypes
1 INTRODUCTION . Large-scale datasets with human-annotated labels have revolutionized computer vision . Supervised pretraining on ImageNet ( Deng et al. , 2009 ) has been the de facto formula of success for almost all state-of-the-art visual perception models . However , it is extremely labor intensive to manually annotate millions of images , which makes it a non-scalable solution . One alternative to reduce annotation cost is self-supervised representation learning , which leverages unlabeled data . However , self-supervised learning methods ( Goyal et al. , 2019 ; He et al. , 2019 ; Chen et al. , 2020a ; Li et al. , 2020b ) have yet consistently shown superior performance compared to supervised learning , especially when transferred to downstream tasks with limited labels . With the help of commercial search engines , photo-sharing websites , and social media platforms , there is near-infinite amount of weakly-labeled images available on the web . Several works have exploited the scalable source of web images and demonstrated promising results with weblysupervised representation learning ( Mahajan et al. , 2018 ; Sun et al. , 2017 ; Li et al. , 2017 ; Kolesnikov et al. , 2020 ) . However , there exists two competing claims on whether weakly-labeled noisy datasets lead to worse generalization performance . One claim argues that the effect of noise can be overpowered by the scale of data , and simply applies standard supervised learning method on web datasets ( Mahajan et al. , 2018 ; Sun et al. , 2017 ; Li et al. , 2017 ; Kolesnikov et al. , 2020 ) . The other claim argues that deep models can easily memorize noisy labels , resulting in worse generalization ( Zhang et al. , 2017 ; Ma et al. , 2018 ) . In this paper , we show that both claims are partially true . While increasing the size of data does improve the model ’ s robustness to noise , our method can substantially boost the representation learning performance by addressing noise . There exists a large body of literature on learning with label noise ( Jiang et al. , 2018 ; Han et al. , 2018 ; Guo et al. , 2018 ; Tanaka et al. , 2018 ; Arazo et al. , 2019 ; Li et al. , 2020a ) . However , existing methods have several limitations that make them less effective for webly-supervised representation learning . First , most methods do not consider out-of-distribution ( OOD ) samples , which is a major source of noise in real-world web datasets . Second , many methods perform computation-heavy procedures for noise cleaning ( Jiang et al. , 2018 ; Li et al. , 2019 ; 2020a ) , or require access to a set of samples with clean labels ( Vahdat , 2017 ; Veit et al. , 2017 ; Lee et al. , 2018 ) , which limit their scalability in practice . We propose a new method for efficient representation learning from weakly-labeled web images . Our method is inspired by recent developments in contrastive learning for self-supervised learning ( He et al. , 2019 ; Chen et al. , 2020a ; Li et al. , 2020b ) We introduce Momentum Prototypes ( MoPro ) , a simple component which is effective in label noise correction , OOD sample removal , and representation learning . A visual explanation of our method is shown in Figure 1 . We use a deep network to project images into normalized low-dimensional embeddings , and calculate the prototype for a class as the moving-average embedding for clean samples in that class . We train the network such that embeddings are pulled closer to their corresponding prototypes , while pushed away from other prototypes . Images with corrupted labels are corrected either as another class or as an OOD sample based on their distance to the momentum prototypes . We experimentally show that : • MoPro achieves state-of-the-art performance on the upstream weakly-supervised learning task . • MoPro substantially improves representation learning performance when the pretrained model is transferred to downstream image classification and object detection tasks . For the first time , we show that weakly-supervised representation learning achieves similar performance as supervised representation learning , under the same data and computation budget . With a larger web dataset , MoPro outperforms ImageNet supervised learning by a large margin . • MoPro learns a more robust and calibrated model that generalizes better to distribution variations . 2 RELATED WORK . 2.1 WEBLY-SUPERVISED REPRESENTATION LEARNING . A number of prior works exploit large web datasets for visual representation learning ( Divvala et al. , 2014 ; Chen & Gupta , 2015 ; Joulin et al. , 2016 ; Mahajan et al. , 2018 ; Sun et al. , 2017 ; Li et al. , 2017 ; Kolesnikov et al. , 2020 ) . These datasets contain a considerable amount of noise . Approximately 20 % of the labels in the JMT-300M dataset ( Sun et al. , 2017 ) are noisy , whereas 34 % of images in the WebVision dataset ( Li et al. , 2017 ) are considered outliers . Surprisingly , most prior works have chosen to ignore the noise and applied vanilla supervised method , with the claim that the scale of data can overpower the noise ( Mahajan et al. , 2018 ; Sun et al. , 2017 ; Li et al. , 2017 ) . However , we show that supervised method can not fully harvest the power of large-scale weakly-labeled datasets . Our method achieves substantial improvement by addressing noise , and advances the potential of webly-supervised representation learning . 2.2 LEARNING WITH LABEL NOISE . Learning with label noise has been widely studied . Some methods require access to a small set of clean samples ( Xiao et al. , 2015 ; Vahdat , 2017 ; Veit et al. , 2017 ; Lee et al. , 2018 ; Zhang et al. , 2020 ) , and other methods assume that no clean labels are available . There exist two major types of approaches . The first type performs label correction using predictions from the network ( Reed et al. , 2015 ; Ma et al. , 2018 ; Tanaka et al. , 2018 ; Yi & Wu , 2019 ; Yang et al. , 2020 ) . The second type separates clean samples from corrupted samples , and trains the model on clean samples ( Han et al. , 2018 ; Arazo et al. , 2019 ; Jiang et al. , 2018 ; Wang et al. , 2018 ; Chen et al. , 2019 ; Li et al. , 2020a ) . However , existing methods have yet shown promising results for large-scale weakly-supervised representation learning . The main reasons include : ( 1 ) most methods do not consider OOD samples , which commonly occur in real-world web datasets ; ( 2 ) most methods are computational-heavy due to co-training ( Han et al. , 2018 ; Li et al. , 2020a ; Jiang et al. , 2018 ; 2020 ) , iterative training ( Tanaka et al. , 2018 ; Yi & Wu , 2019 ; Wang et al. , 2018 ; Chen et al. , 2019 ) , or meta-learning ( Li et al. , 2019 ; Zhang et al. , 2019 ) . Different from existing methods , MoPro achieves both label correction and OOD sample removal on-the-fly with a single step , based on the similarity between an image embedding and the momentum prototypes . MoPro also leverages contrastive learning to learn a robust embedding space . 2.3 SELF-SUPERVISED REPRESENTATION LEARNING . Self-supervised methods have been proposed for representation learning using unlabeled data . The recent developments in self-supervised representation learning can be attributed to contrastive learning . Most methods ( He et al. , 2019 ; Chen et al. , 2020a ; Oord et al. , 2018 ; Wu et al. , 2018 ) leverage the task of instance discrimination , where augmented crops from the same source image are enforced to have similar embeddings . Prototypical contrastive learning ( PCL ) ( Li et al. , 2020b ) performs clustering to find prototypical embeddings , and enforces an image embedding to be similar to its assigned prototypes . Different from PCL , we update prototypes on-the-fly in a weakly-supervised setting , where the momentum prototype of a class is the moving average of clean samples ’ embeddings . Furthermore , we jointly optimize two contrastive losses and a cross-entropy loss . Current self-supervised representation learning methods are limited in ( 1 ) inferior performance in low-shot task adaptation , ( 2 ) huge computation cost , and ( 3 ) inadequate to harvest larger datasets . We show that weakly-supervised learning with MoPro addresses these limitations . 3 METHOD . In this section , we delineate the details of our method . First , we introduce the components in our representation learning framework . Then , we describe the loss functions . Finally , we explain the noise correction procedure for label correction and OOD sample removal . A pseudo-code of MoPro is provided in appendix B . 3.1 REPRESENTATION LEARNING FRAMEWORK . Our proposed framework consists of the following components . Figure 2 gives an illustration . • A noisy training dataset { ( xi , yi ) } ni=1 , where xi is an image and yi ∈ { 1 , ... , K } is its class label . • A pseudo-label ŷi for each image xi , which is its corrected label . Details for generating the pseudo-label is explained in Sec 3.3 . • An encoder network , which maps an augmented image x̃i to a representation vector vi ∈ Rde . We experiment with ResNet-50 ( He et al. , 2016 ) as the encoder , where the activations of the final global pooling layer ( de = 2048 ) are used as the representation vector . • A classifier ( a fully-connected layer followed by softmax ) which receives the representation vi as input and outputs class predictions pi . • A projection network , which maps the representation vi into a low-dimensional embedding zi ∈ Rdp ( dp = 128 ) . zi is always normalized to the unit sphere . Following SimCLR ( Chen et al. , 2020a ) , we use a MLP with one hidden layer as the projection network . • Momentum embeddings z′i generated by a momentum encoder . The momentum encoder has the same architecture as the encoder followed by the projection network , and its parameters are the moving-average of the encoder ’ s and the projection network ’ s parameters . Same as in MoCo ( He et al. , 2019 ) , we maintain a queue of momentum embeddings of past samples . • Momentum prototypes C ∈ Rdp×K . The momentum prototype of the k-th class , ck , is the normalized moving-average embedding for samples with pseudo-label ŷi = k . 3.2 CONTRASTIVE LOSS . As illustrated in Figure 1 , we aim to learn an embedding space where samples from the same class gather around its class prototype , while samples from different classes are seperated . We achieve it with two contrastive losses : ( 1 ) a prototypical contrastive loss Lpro which increases the similarity between an embedding and its corresponding class prototype , ( zi , cŷi ) , in contrast to other prototypes ; ( 2 ) an instance contrastive loss Lins which increases the similarity between two embeddings of the same source image , ( zi , z′i ) , in contrast to embeddings of other images . Specifically , the contrastive losses are defined as : Lipro = − log exp ( zi · cŷi/τ ) ∑K k=1 exp ( zi · ck/τ ) , Liins = − log exp ( zi · z′i/τ ) ∑R r=0 exp ( zi · z′r/τ ) , ( 1 ) where τ is a temperature parameter , and ŷi is the pseudo-label . We use R negative momentum embeddings to construct the denominator of the instance contrastive loss . We train the classifier with cross-entropy loss , using pseudo-labels as targets . Lice = − log ( p ŷi i ) ( 2 ) We jointly optimize the contrastive losses and the classification loss . The training objective is : L = n∑ i=1 ( Lice + λproLipro + λinsLiins ) ( 3 ) For simplicity , we set λpro = λins = 1 for all experiments .
To train a model with a noisy weakly supervised training set, this paper proposed a momentum prototypes method for label noise correction and OOD sample removal. Noise correction is done by a heuristic rule, that if the prediction is confident enough or the prediction on original label is higher than uniform probability, the label will be kept otherwise it is considered as OOD sample. For training the model, this paper jointly optimizes cross entropy loss on the corrected labels, as well as contrastive loss using prototypical examples and instances.
SP:c1089bb29c0bac6e75d163ef843098a1d8c008da
Importance and Coherence: Methods for Evaluating Modularity in Neural Networks
1 INTRODUCTION . Deep neural networks have achieved state-of-the-art performance in a variety of applications , but this success contrasts with the challenge of making them more intelligible . As these systems become more advanced and widely-used , there are a number of reasons we may need to understand them more effectively . One reason is to shed light on better ways to build and train them . A second reason is the importance of transparency , especially in settings which involve matters of safety , trust , or justice ( Lipton , 2018 ) . More precisely , we want methods for analyzing a trained network that can be used to construct semantic and faithful descriptions of its inner mechanisms . We refer to this as mechanistic transparency . Toward this goal , we consider modularity as an organizing principle to achieve mechanistic transparency . In the natural sciences , we often try to understand things by taking them apart . Aside from subdivision into the standard architectural building blocks ( e.g. , neurons , channels , layers ) , are there other ways a trained neural network be meaningfully “ taken apart ” ? We aim to analyze a network via a partitioning of its neurons into disjoint sets with the hope of finding that these sets are “ modules ” with distinct functions . Since there are many choices for how to partition a network , we would like metrics for anticipating how meaningful a given partition might be . Inspired by the field of program analysis ( Fairley , 1978 ) , we apply the concepts of “ dynamic ” and “ static ” analysis to neural networks . Dynamic analysis includes performing forward passes and/or computing gradients , while static analysis only involves analyzing architecture and parameters . In a concurrent submission ( Anonymous et al. , 2021 ) , we use spectral clustering to study the extent to which networks form clusters of neurons that are highly connected internally but not externally and find that in many cases , networks are structurally clusterable . This approach is static because the partitioning is produced according to the network ’ s weights only , using neither activations nor gradients . Here , we build off of this concurrent submission by working to bridge graph-based clusterability and functional modularity . To see how well neurons within each cluster share meaningful similarities , we introduce two proxies : importance and coherence . Importance refers to how crucial clusters are to the network ’ s perfor- mance overall and lends insight into how well a partition identifies clusters that are individually key to the network ’ s function . Coherence refers to how consistently the neurons within a cluster correspond in their activations to particular features in data . We analyze coherence both with respect to input features and output labels . To measure these proxies , we utilize dynamic interpretability methods that have been conventionally used for single-neuron analysis to the study of these partitions . We conduct a set of experiments and hypothesis tests in networks scaling from the MNIST to the ImageNet level . In doing so , we show that spectral clustering is capable of identifying functionally important and coherent clusters of neurons . This new finding the and methods we present for combining spectral clustering with dynamic methods supports the use of modular decompositions of neurons toward mechanistic transparency . Our key contributions are threefold : 1 . Introducing two proxies , importance and coherence , to assess whether a given partitioning of a network exhibits modularity . 2 . Quantifying these two proxies with interpretability methods equipped with statistical hypothesis testing procedures . 3 . Applying our methods on the partitions produced by the spectral clustering technique of Anonymous et al . ( 2021 ) on a range of networks , and finding evidence of modularity among these clusters . 2 GENERATING PARTITIONINGS WITH SPECTRAL CLUSTERING . In our concurrent submission , we introduce and study in-depth a procedure to partition a neural network into disjoint clusters of neurons ( Anonymous et al. , 2021 ) based only on its weights . We found that trained networks are more clusterable than randomly initialized ones , and they are also often more clusterable than similar networks with identical weight distributions . The experimental procedure consists of three steps : ( 1 ) “ Graphification ” - transforming the network into an undirected edge-weighted graph ; ( 2 ) Spectral clustering - obtaining a partitioning via spectral clustering of the graph . Graphification : To perform spectral clustering , a network must be represented as an undirected graph with non-negative edges . For MLPs ( multilayer perceptrons ) , each graph vertex corresponds to a neuron in the network including input and output neurons . If two neurons have a weight connecting them in the network , their corresponding vertices are connected by an edge giving its absolute value . For CNNs ( convolutional neural networks ) , a vertex corresponds to a single feature map ( which we also refer to as a “ neuron ” ) in a convolutional layer . Here , we do not use input , output , or fully-connected layers . If two feature maps are in adjacent convolutional layers , their corresponding vertices are connected with an edge giving the L1 norm for the corresponding 2 dimensional kernel slice . If convolutional layers are separated by a batch normalization layer ( Ioffe & Szegedy , 2015 ) , we multiply weights by γ/ ( σ+ ε ) where γ is the scaling factor , σ is the moving standard deviation , and ε is a small constant . Spectral Clustering : We run normalized spectral clustering on the resulting graph ( Shi & Malik , 2000 ) to obtain a partition of the neurons into clusters . For all experiments , we set the number of clusters to 12 unless explicitly mentioned otherwise . We choose 12 because ( 1 ) it is computationally tractable , ( 2 ) it is larger than the number of classes in MNIST and CIFAR-10 , and ( 3 ) it is small compared to the number of neurons in the layers of all of our networks . However , in Appendix A.6 , we show results for k = 8 and k = 18 for a subset of experiments and find no major differences . We use the scikit-learn implementation ( Pedregosa et al. , 2011 ) with the ARPACK eigenvalue solver ( Borzı̀ & Borzı̀ , 2006 ) . Refer to appendix A.1 for a complete description of the algorithm . 3 EVALUATION OF MODULARITY USING IMPORTANCE AND COHERENCE . Clusters of neurons produced by spectral clustering span more than one layer . However , layers at different depths of a network tend to develop different representations . To control for these differences , we study the neurons in clusters separately per layer . We call these sets of neurons within the same cluster and layer “ sub-clusters. ” In our experiments , we compare these sub-clusters to other sets of random units of the same size and same layer . When discussing these experiments , we refer to the sub-clusters from the clustering algorithm as “ true sub-clusters ” and the sets composed of random neurons as “ random sub-clusters. ” Random sub-clusters form the natural control condition to test whether the specific partitioning of neurons exhibits importance or coherence compare to alternative partitions , while taking account location and size . As outlined in the Introduction , we study importance : how crucial each sub-cluster is to the network ; input coherence : how well neurons in a sub-cluster associate with similar input features ; and output coherence , how well they associate with particular output labels , as proxies for modularity . In this section , we present two types of experiments . First , we use visualization techniques on sub-clusters to measure input and output coherence , and second , we use “ lesion tests ” based on dropping out neurons in a sub-cluster to measure output coherence and importance . These techniques are scalable , and we experiment with a wide range of networks . For small-scale experiments , we train and analyze MLPs with four hidden layers of 256 neurons each and small convolutional networks with 3 layers of 64 neurons each followed by a dense layer of 128 neurons trained on the MNIST ( LeCun et al. , 1998 ) and Fashion-MNIST ( Xiao et al. , 2017 ) datasets . At a mid scale , we train and analyze VGG-style CNNs containing 13 convolutional layers using the architectures from Simonyan & Zisserman ( 2014 ) trained on CIFAR-10 ( Krizhevsky et al. , 2009 ) using the procedure from Liu & Deng ( 2015 ) . Finally , for the ImageNet ( Krizhevsky et al. , 2009 ) scale , we analyze pretrained ResNet18 , ResNet50 , ( He et al. , 2016 ) VGG-16 , and VGG-19 ( Simonyan & Zisserman , 2014 ) models . In our concurrent submission ( Anonymous et al. , 2021 ) we show that in some cases , weight pruning and dropout can each be used to promote graph-based clusterability . We use pruning in small MLPs but no other networks . We use dropout for MLPs in correlation-based visualization experiments in subsection 3.1.1 but no other MLPs . Also , for the mid-sized VGG-CNNs , we experiment both with versions that are unregularized and which are regularized using dropout and L2 regularization as done in Liu & Deng ( 2015 ) . Complete training details including testing accuracies are in the appendix A.2 . 3.1 FEATURE VISUALIZATION . 3.1.1 CORRELATION-BASED VISUALIZATION . First , we introduce here a simple method to provide visual examples and build intuition . In later subsections , we present a quantitative approach with statistical hypothesis testing . A simple way to visualize a sub-cluster is to identify what input features each of its neurons respond to and then use these to create an aggregated visualization . We do this for small MLPs in which we construct visualizations of neurons using their correlations with the input pixels across the test dataset . We use their post-ReLU activations , and consider the activation of a convolutional feature map to be its L1 norm . Instead of linear correlation , we use the Spearman correlation ( which is the linear correlation of ranks ) because it is able to capture relationships which tend to monotonically increase even if they are nonlinear . After obtaining visualizations for each neuron in a sub-cluster , we do not directly take their average to visualize the entire sub-cluster . To see why , consider two neurons which are highly anticorrelated across the testing set . These neurons are highly coherent , but averaging together their visualizations would obscure this by cancellation . To fix this problem , we align the signs of the visualizations for individual neurons using a variant of an algorithm from Watanabe ( 2019 ) . To visualize a sub-cluster , for a number of iterations ( we use 20 ) , we iterate over its neurons , and calculate for each the sum of cosines between its visualization and each of the other neurons ’ visualizations in vector form . If this sum is negative , we flip the sign of this neuron ’ s visualization . Refer to appendix A.3 for a complete algorithmic description . After this procedure , we take the mean of the visualizations within a sub-cluster . To see how much meaningful input coherence these sub-clusters exhibit , we compare them to random sub-clusters ( recall each of these are randomly selected sets of neurons of the same size from the same layer as a true sub-cluster ) . Figure 1a-b shows results from MLPs trained on MNIST and Fashion-MNIST . Here , these MLPs are trained with dropout which we found to be helpful for clearer visualizations . In the first row of each image are visualizations for true sub-clusters , and the bottom four rows show visualizations for random ones . The true sub-clusters in the top row produce more coherent visualizations with better-defined and higher-contrast features compared to the random ones in the bottom 4 rows . Next , we hypothesized that if we trained a network on a task that lent itself well to parallel processing , spectral clustering would capture specialized modules . To test this , we designed “ halves-same ” and “ halves-diff ” tasks for small MLPs based on the MNIST and Fashion-MNIST datasets . For the halves-same tasks , two images of the same class were resized to have half their original width and concatenated side-by-side in order to create a composite image of the same size as the originals . We gave these images the same label as their component halves . For the halves-diff tasks , this was done with two images from random classes , and the resulting image was labeled with the sum of their labels modulo 10 . Example images from each of the the halves-same/diff MNIST and Fashion-MNIST datasets are shown in figure 3 . We expected that the halves-diff task would be more economical to compute in a modular way by separately recognizing the two halves and computing their modular sum . In appendix A.3 , we show that our networks can compute this modular sum . Figure 1c-d shows these visualizations for MLPs trained with dropout on halves-same MNIST and without dropout on halves-diff MNIST . We did not use dropout to train the halves-diff networks because it resulted in poor accuracy . This is likely because while amenable to image classification , dropout is not amenable to modulo arithmetic . Columns are arranged from left to right in the order of the layer in which they appear in the network . Visualizations for the halves-same networks tend to result in similar left and right halves , but in the early ( leftmost ) layers of the networks trained on the halves-diff tasks , there is a tendency for true sub-clusters to be selective to one half . This method of understanding input coherence has the advantage of being able to provide intuitive visual examples and efficiently construct interpretable features for MLPs . However , it was not as effective for CNNs . In appendix A.3 we detail this process , and in figure 4 , we show visualizations for small CNNs in which we find less evidence of coherence among sub-clusters . To expand on the intuitive visual examples offered here , in the following section , we introduce a more versatile , scalable method along with hypothesis testing procedures for obtaining quantitative results .
The authors identify putative clusters of units/neurons in deep networks using spectral clustering on a graph defined by synaptic weights. The authors then argue that these structurally defined clusters of neurons have similar *functional representations*. Finding interpretable relationships between weight matrices and functional modules is challenging, and the authors should be applauded for attempting to tackle this challenging problem that few research groups are devoting energy to.
SP:98f5d14f7167266f06fd7e2a30c93a20905e7a6c
Model agnostic meta-learning on trees
1 INTRODUCTION . Deep learning models require a large amount of data in order to perform well when trained from scratch . When data is scarce for a given task , we can transfer the knowledge gained in a source task to quickly learn a target task , if the two tasks are related . The field of Multi-task learning studies how to learn multiple tasks simultaneously , with a single model , by taking advantage of task relationships ( Ruder ( 2017 ) , Zhang & Yang ( 2018 ) ) . However , in Multi-task learning models , a set of tasks is fixed in advance , and they do not generalize to new tasks . The field of of Meta-learning is inspired by the ability of humans to learn how to quickly learn new tasks , by using the knowledge of previously learned ones . Meta-learning has seen a widespread use in multiple domains , especially in recent years and after the advent of Deep Learning ( Hospedales et al . ( 2020 ) ) . However , there is still a lack of methods for sharing information across tasks in meta-learning models , and the goal of our work is to fill this gap . In particular , a successful model for meta-learning , MAML ( Finn et al . ( 2017 ) ) , does not diversify task relationships according to their similarity , and it is unclear how to modify it for that purpose . In this work , we contribute the following : • We propose a novel modification of MAML to account for a hierarchy of tasks . The algorithm uses the tree structure of data during adaptation , by pooling gradients across tasks at each adaptation step , and subsequent steps follow down the tree ( see Figure 1a ) . • We introduce new benchmarks for testing a hierarchy of tasks in meta-learning on a variety of synthetic non-linear ( sinusoidal ) and multidimensional linear regression tasks . • We compare our algorithm to MAML and a baseline model , where we train on all tasks but without any meta-learning algorithm applied . We show that the algorithm has a better performance with respect to both of these models in the sinusoidal regression task and the newly introduced synthetic task because it exploits the hierarchical structure of the data . 2 RELATED WORK . The problem of quantifying and exploiting task relationships has a long history in Multi-task learning , and is usually approached by parameter sharing , see Ruder ( 2017 ) , Zhang & Yang ( 2018 ) for reviews . However , Multi-task Learning is fundamentally different from Meta-learning as it does not consider the problem of generalizing to new tasks ( Hospedales et al . ( 2020 ) ) . Recent work includes Zamir et al . ( 2018 ) , who studies a large number of computer vision tasks and quantifies the transfer between all pairs of tasks . Achille et al . ( 2019 ) proposes a novel measure of task representation , by assigning an importance score to each model parameter in each task . The score is based on the gradients of each task ’ s loss function with respect to each model parameter . This work suggests that gradients can be used as a measure of task similarity , and we use this insight in our proposed algorithm . In the context of Meta-learning , a few papers have been published on the problem of learning and using task relationships in the past months . The model of Yao et al . ( 2019 ) applies hierarchical clustering to task representations learned by an autoencoder , and uses those clusters to adapt the parameters to each task . The model of Liu et al . ( 2019 ) maps the classes of each task into the edges of a graph , it meta-learns relationships between classes and how to allocate new classes by using a graph neural network with attention . However , these algorithms are not model-agnostic , they have a fixed backbone and loss function , and are thus difficult to apply to new problems . Instead , we design our algorithm as a simple generalization of Model-agnostic meta-learning ( MAML , Finn et al . ( 2017 ) ) , and it can be applied to any loss function and backbone . A couple of studies looked into modifying MAML to account for task similarities . The work of Jerfel et al . ( 2019 ) finds a different initial condition for each cluster of tasks , and applies the algorithm to the problem of continual learning . The work of Katoch et al . ( 2020 ) defines parameter updates for a task by aggregating gradients from other tasks according to their similarity . However , in contrast with our algorithm , both of these models are not hierarchical , tasks are clustered on one level only and can not be represented by a tree structure . As far as we know , ours is the first model-agnostic algorithm for meta-learning that can be applied to a tree structure of tasks . 3 THE META-LEARNING PROBLEM . We follow the notation of Hospedales et al . ( 2020 ) . We assume the existence of a distribution over tasks τ and , for each task , a distribution over data points D and a loss function L. The loss function of the meta-learning problem , Lmeta , is defined as an average across both distributions of tasks and data points : Lmeta ( ω ) = E τ E D|τ Lτ ( θτ ( ω ) ; D ) ( 1 ) The goal of meta-learning is to minimize the loss function with respect to a vector of metaparameters ω . The vector of parameters θ is task-specific and depends on the meta-parameters ω . Different meta-learning algorithms correspond to a different choice of θτ ( ω ) . We describe below the choice of TreeMAML , the algorithm proposed in this study . During meta-training , the loss is evaluated on a sample of m tasks , and a sample of nv validation data points for each task Lmeta ( ω ) = 1 mnv m∑ i=1 nv∑ j=1 Lτi ( θτi ( ω ) ; Dij ) ( 2 ) For each task i , the parameters θτi are learned by a set of nt training data points , distinct from the validation data . During meta-testing , a new ( target ) task is given and the parameters θ are learned by a set of nr target data points . In this work , we also use a batch of training data points to adapt θ at test time . No training data is used to compute the final performance of the model , which is computed on separate test data of the target task . 3.1 MAML . MAML aims at finding the optimal initial condition ω from which a good parameter set can be found , separately for each task , after K gradient steps ( Finn et al . ( 2017 ) ) . For task i , we define the single gradient step with learning rate α as Ui ( ω ) = ω − α nt nt∑ j=1 ∇L ( ω ; Dij ) ( 3 ) Then , MAML with K gradient steps corresponds to K iterations of this step ( here we assume that the same batch of training data points is used at each step , because these are task specific ) θτi ( ω ) = Ui ( Ui ( ... Ui ( ω ) ) ) ( K times ) ( 4 ) This update is usually referred to as inner loop , and is performed separately for each task , while optimization of the loss 2 is referred to as outer loop . 3.2 TREEMAML . We propose to modify MAML in order to account for a hierarchical structure of tasks . The idea is illustrated in Figure 1 . At each gradient step k , we assume that tasks are aggregated into Ck clusters , and the parameters for each task are updated according to the average gradient across tasks within the corresponding cluster ( in Fig.1b , we use K = 3 steps and C1 = 2 , C2 = 4 , C3 = 8 ) . We denote by Tc the set of tasks in cluster c. Then , the gradient update for the parameters of each task belonging to cluster c is equal to Uc ( ω ) = ω − α nt |Tc| ∑ i∈Tc nt∑ j=1 ∇L ( ω ; D ( i ) j ) ( 5 ) Furthermore , we denote by cki the cluster to which task i belongs at step k. Then , TreeMAML with k gradient steps corresponds to K iterations of this step θτi ( ω ) = UcKi ( UcK−1i ( ... Uc1i ( ω ) ) ) ( 6 ) The intuition is the following : if each task has scarce data , gradient updates for single tasks are noisy , and adding up gradients across similar tasks increases the signal . Note that we recover MAML if Ck is equal to the total number of tasks m at all steps . On the other hand , if Ck = 1 then the inner loop would take a step with a gradient averaged across all tasks . Because at one specific step the weight updates are equal for all tasks within a cluster , it is possible to define the steps of the inner loop update per cluster c instead of per task θτi . Given a cluster c and its parent cluster pc in the tree , the update at step k is given by θc , k = θpc , k−1 − α nt |Tc| ∑ i∈Tc nt∑ j=1 ∇L ( θpc , k−1 ; Dij ) ( 7 ) where θck is the parameter value for cluster c at step k. In terms of the notation used in expression 6 , we have the equivalence θτi ( ω ) = θci , K , which depends on the initial condition ω . The full procedure is described in Algorithm 1 We consider two versions of the algorithm , depending on how we obtain the tree structure ( similar to Srivastava & Salakhutdinov ( 2013 ) ) : • Fixed tree . The tree is fixed by the knowledge of the tree structure of tasks , when this structure is available . In that case , the values of Ck are determined by such tree . • Learned tree . The tree is unknown a priori , and is learned using a hierarchical clustering algorithm . In that case , the values of Ck are determined at each step as a result of the clustering algorithm . In the latter case , we cluster tasks based on the gradients of each task loss , consistent with recent work ( Achille et al . ( 2019 ) ) . After each step k at cluster ci , the clustering algorithm takes as input the gradient vectors of the children tasks i gik = 1 nt nt∑ j=1 ∇L ( θci , k ; Dij ) ( 8 ) and these gradients are further allocated into clusters according to their similarity . The clustering algorithm is described in subsection 3.3 . Similar to MAML , adaptation to a new task is performed by computing θ ( i ) ( ω ) on a batch of data of the target task . In order to exploit task relationships , we first reconstruct the tree structure by using a batch of training data and then we introduce the new task . Algorithm 1 TreeMAML Require : distribution over tasks p ( τ ) ; distribution over data for each task p ( D|τ ) ; Require : number of inner steps K ; number of training tasks m ; learning rates α , β ; Require : number of clusters Ck for each step k ; loss function Lτ ( ω , D ) for each task randomly initialize ω while not done do sample batch of i = 1 : m tasks { τi } ∼ p ( τ ) for all tasks i = 1 : m initialize a single cluster ci = 1 initialize θ1,0 = ω for steps k = 1 : K do for tasks i = 1 : m do sample batch of j = 1 : nv data points { Dij } ∼ p ( D|τi ) evaluate gradient gik = 1nt ∑nt j=1∇Lτi ( θci , k−1 ; Dij ) end for regroup tasks into Ck clusters Tc = { i : ci = c } according to similarity of { gik } and parent clusters { pc } update θc , k = θpc , k−1 − α|Tc| ∑ i∈Tc gik for all clusters c = 1 : Ck end for update ω ← ω − β 1mnv ∑m i=1 ∑nv j=1∇ωLτi ( θci , K ( ω ) ; Dij ) end while
The submission proposes a meta-learning algorithm attuned to the hierarchical structure of a dataset of tasks. Hierarchy is enforced in a set of synthetically-generated regression tasks via the data-sampling procedure, which is modified from the task-sampling procedure of [1] to include an additional source of randomness corresponding to which of a set of cluster components task parameters are generated from. The authors propose to adapt the model-agnostic meta-learning algorithm (MAML) of [1] to reflect this hierarchical structure by either observing (Section 4.1, FixedTree MAML) or inferring (Section 4.2, LearnedTree MAML) an assignment of tasks to clusters at each step of the inner loop (task-specific adaptation phase) of MAML; if tasks belong to the same cluster, the correspond task-parameters receive the same update at that step (in particular, the update direction is averaged). It is assumed that there are increasingly many clusters at each step, so that task-specific parameter updates are increasingly granular.
SP:e5719e04d242e5f1b4646cf4bfe43b8aeaa950ad
Multi-resolution modeling of a discrete stochastic process identifies causes of cancer
1 INTRODUCTION . Numerous domains involve modeling highly non-stationary discrete-time and integer-valued stochastic processes where event counts vary dramatically over time or space . An important open problem of this nature in biology is understanding the stochastic process by which mutations arise across the genome . This is central to identifying mutations that drive cancer emergence ( Lawrence et al. , 2013 ) . Tumor drivers provide a cellular growth advantage to cells by altering the function of a genomic element such as a gene or regulatory feature ( e.g . promoter ) . Drivers are identifiable because they reoccur across tumors , but there are two major challenges to detecting such recurrence . First , driver mutations are rare and their signal is hidden by the thousands of passenger mutations that passively and stochastically accumulate in tumors ( Stratton et al. , 2009 ; Martincorena & Campbell , 2015 ) . Second , because functional elements vary dramatically in size ( genes : 103-106 bases ; regulatory elements : 101-103 bases ; and single positions ) , driver mutations accumulate across regions that vary many orders of magnitude . Accurately predicting the stochastic accumulation of passenger mutations at multiple scales is necessary to reveal the subtle recurrence of driver mutations across the genome . Here , we introduce the split-Poisson Gamma ( SPG ) process , an extension of the Poisson-Gamma distribution , to efficiently model a non-stationary discrete stochastic process at numerous length scales . The model first approximates quasi-stationary regional rate parameters within small windows ; it then projects these estimates to arbitrary regions in linear time ( 10-15 minutes for genome-wide inference ) . This approach is in contrast to existing efforts that model fixed regions and require computationally expensive retraining ( e.g . over 5 hours ) to predict over multiple scales of interest ( Nik-Zainal et al. , 2016 ; Martincorena et al. , 2017 ) . We apply our framework to model cancer-specific mutation patterns ( fig . 1 ) . We perform data-driven training of our model ’ s parameters and show that it more accurately captures mutation patterns than existing methods on simulated and real data . We demonstrate the power of our multi-resolution approach by identifying drivers across functional ∗Authors contributed equally to this work . elements : genes , regulatory features , and single base mutations . Despite the method having no knowledge of genome structure , it detects nearly all gene drivers present in over 5 % of samples while making no false discoveries and detects all previously characterized regulatory drivers . Detected events also include novel candidate drivers , providing promising targets for future investigation . 1.1 PREVIOUS WORK . Numerous methods exist for modeling stationary stochastic processes ( Lindsey , 2004 ) . Far fewer exist for non-stationary processes because they are difficult to capture with the covariance functions of parametric models ( Risser , 2016 ) . Non-stationary kernels have been introduced for Gaussian processes ( Paciorek & Schervish , 2004 ) , but these may not be tractable on large datasets due to their computational complexity . More recently , there has been work developing Poisson-gamma models for dynamical systems ( Schein et al. , 2016 ; Guo et al. , 2018 ) , but these methods have focused on learning relationships between count variables , not predicting counts based on continuous covariates . In the particular case of modeling mutation patterns across the cancer genome , numerous computational methods exist to model mutation rates within well-understood genomic contexts such as genes ( Lawrence et al. , 2013 ; Martincorena et al. , 2017 ; Wadi et al. , 2017 ; Mularoni et al. , 2016 ; Juul et al. ) . These models account for < 4 % of the genome ( Rheinbay et al. , 2020 ) . They are not applicable in non-coding regions , where the majority of mutations occur ( Gloss & Dinger , 2018 ) . A handful of methods to model genome-wide mutation rates have been introduced ( Polak et al. , 2015 ; Nik-Zainal et al. , 2016 ; Bertl et al. , 2018 ) . However , they operate on a single length-scale or set of regions and require computationally expensive retraining to predict over each new length-scale . Several methods rely on Poisson or binomial regression ; however , previous work has extensively documented that mutation counts data are over-dispersed , leading these models to underestimate variance and yield numerous false-positive driver predictions ( Lochovsky et al. , 2015 ; Martincorena et al. , 2017 ; Juul et al. , 2019 ) . Negative binomial regression has recently been used to account for over-dispersion ( Nik-Zainal et al. , 2016 ) and perform genome-wide mutation modeling and driver detection . However , resolution was coarse , and it only found a few , highly recurrent driver mutations . 1.2 OUR CONTRIBUTIONS . This work makes three key contributions : 1 ) we introduce an extension of the Poisson-Gamma distribution to model non-stationary discrete stochastic processes at any arbitrary length scale without retraining ; 2 ) we apply the framework to capture cancer-specific mutation rates with unprecedented accuracy , resolution , and efficiency ; and 3 ) we perform a multi-scale search for cancer driver mutations genome-wide , including the first-ever base-resolution scan of the whole genome . This search yields several new candidate driver events in the largely unexplored non-coding genome , which we are working on validating with experimental collaborators . Crucially , our approach allows fast , efficient , and accurate searches for driver elements and mutations anywhere in the genome without requiring arduous retraining of a model , a feat which is not possible with existing approaches . 2 MULTI-RESOLUTION MODELING OF A NON-STATIONARY DISCRETE STOCHASTIC PROCESS . We consider a non-stationary discrete stochastic process { Mi ; i = 1,2 , ... } where Mi is the integervalued event count at position i . Associated with each position i is a real-valued , L-dimensional feature vector ηi that determines the instantaneous event rate λi via an unknown function . Thus a region R = { i , i+1 , ... , i+N } of N contiguous positions is characterized by an L×N feature matrix ηR and an event count XR = ∑i∈R Mi . As training data , ηR , XR , and Mi are observed for some set of regions { R ∈T } . Then given a set of feature matrices from unobserved regions { ηR ; R ∈H } , the challenge is to predict the distribution of event counts over any arbitrary set I of unseen positions that may or may not be contiguous . Real-world examples include traders in a stock market , packets delivered to routers in a network , and mutations accumulating at positions in the genome . 2.1 THE SPLIT-POISSON-GAMMA PROCESS . We assume that the process is near-stationary within a small enough region R= { i , i+1 , ... , i+N } and that the L×N covariate matrix ηR is observed . Thus the rate of events λR within R is approximately constant and associated with ηR , albeit in an unknown way . A number of events ( XR ) may occur within R dependent on λR and are then stochastically distributed to individual positions within R , implying a hierarchical factorization of the scalar random variables λR , XR , and Mi ( fig . 1e ) as Pr ( Mi = k , XR , λR ; ηR ) = Pr ( Mi = k|XR ; ηR ) Pr ( XR|λR ; ηR ) Pr ( λR ; ηR ) . ( 1 ) XR and λR are unknown nuisance variables and are marginalized in general as Pr ( Mi = k|ηR ) = ∫ ∞ 0 Pr ( λR ; ηR ) ∞ ∑ XR=k Pr ( Mi = k|XR ; ηR ) Pr ( XR|λR ; ηR ) dλR . ( 2 ) Since applications often require many posterior predictions over regions of varying sizes , we propose a prior parameterization that builds on the success and flexibility of the classical Poisson-Gamma distribution while ensuring the marginalization has an easy-to-compute posterior distribution : λR ∼ Gamma ( αR , θR ) ( 3 ) XR ∼ Poisson ( λR ) ( 4 ) Mi ∼ Binomial ( XR , p̃i ) ( 5 ) where αR and θR are shape and scale parameters dependent on ηR , pi is the time-averaged probability of an event at i and p̃i = pi ∑ j∈R p j , the normalized probability within R. A plate diagram of the hierarchical model is presented in fig . 1e . The above formulation provides a simple , closed form solution to eq . ( 2 ) as a negative binomial ( NB ) distribution ( See Appendix for details ) : Pr ( Mi = k|αR , θR , p̃i ; ηr ) = NB ( k ; αR , 1 1+θR · p̃i ) . ( 6 ) Eq . 5 implicitly assumes that events are distributed independently to units within R. Exploiting this assumption , eq . ( 6 ) immediately generalizes to consider any set of units I ⊆ R as Pr ( ∑ i∈I Mi = k|αR , θR , { p̃i } i∈I ; ηR ) = NB ( k ; αR , 1 1+θR ·∑i∈I p̃i ) . ( 7 ) The above formulation is an extension of the classical Poisson-Gamma distribution whereby the Poisson is randomly split by a binomial . We term this a split-Poisson-Gamma ( SPG ) process . While the derivation of the SPG solution makes simplifying assumptions , the benefit is that the parameters αR and θR need to be estimated only once for each non-overlapping region R. Estimates for a region of any other size can then be computed in constant time from eq . ( 7 ) . If a new region R′ is larger than R , we approximate the gamma distribution in a super-region containing R′ as a superposition of the previously inferred parameters of each region of size R within the super-region ( see section 2.2 ) . 2.2 INFERRING REGIONAL RATE PARAMETERS . The statistical power of SPG depends on accurate estimation of the regional gamma rate parameters αR and θR . We propose a variational approach to enable flexible , accurate , and non-linear inference of these parameters from a set of covariates . Let G ( α , θ ) be a gamma distribution . By the central limit theorem , limα→∞ G ( α , θ ) = N ( µ , σ2 ) where µ = αθ and σ2 = αθ 2 . We thus use a Gaussian process ( GP ) to non-linearly map covariates to regional estimates for µR and σ2R . The variational estimates for the gamma parameters are then αR = µ2R/σ 2 R , θR = µR/σ 2 R ( 8 ) For a super-region R′ = Ri +R j , µR′ = µRi +µR j and σ2R′ = σ 2 Ri +σ 2 R j . A limitation of this approach is that GPs can only operate on vectors of covariates . Thus a dimensionality reduction method must be applied to the input matrix ηR . In cases where ηR includes spatial relationships , a convolutional neural network can be a powerful approach to dimension-reduction ; however , other approaches are feasible ( see section 3.2 and section 5.1 ) . 2.3 INFERRING TIME-AVERAGED EVENT PROBABILITIES . The time-averaged parameters { pi ; i = 1,2 , ... } must also be inferred . Crucially , as seen in eq . ( 5 ) , these parameters are never used directly ; instead , they are always renormalized to sum to one within a region of interest . Thus , estimates do not need to reflect the absolute probability of an event at i but merely the relative rate of events between positions . Indeed , because of the renormalization procedure , the estimates need not even be a true probability distribution . Estimating pi can thus be accomplished by clustering units with similar relative rates of events . How this clustering should be performed will depend on the application of interest ( see section 3.3 for a concrete example ) .
The authors present the split Poisson Gamma (SPG) distribution, an extension of the Poisson-Gamma distribution, to model a discrete non-stationary stochastic process. SPG has an analytical posterior allowing accurate prediction after the model parameters have been inferred a single time. The authors apply the SPG to model tumor mutation rates and show that model parameters can be accurately inferred from high-dimensional epigenetic data. This is achieved through a combination of CNNs, GPs and MLE. The results are promising in detecting tumor drivers such as genes, regulatory structures and base-pairs.
SP:18a31dc5f6d12d1d30a3d1e4698523336cd67eb1
Towards Robust Graph Neural Networks against Label Noise
1 INTRODUCTION . Deep Neural Networks ( DNNs ) have achieved great success in various domains , but the necessity of collecting large amount of samples with high-quality labels is both expensive and time-consuming . To address this problem , cheaper alternatives have emerged . For example , the onerous labeling process can be completed on some crowdsourced system like Amazon Mechanical Turk 1 . Besides , we can collect labeled samples from web with search engines and social media . However , all these methods are prone to produce noisy labels of low quality . As is shown in recent research ( Zhang et al. , 2016b ) , an intractable problem is that DNNs can easily overfit to noisy labels , which dramatically degrades the generalization performance . Therefore , it is necessary and urgent to design some valid methods for solving this problem . Graph Neural Networks ( GNNs ) have aroused keen research interest in recent years , which resulted in rapid progress in graph-structured data analysis ( Kipf & Welling , 2016 ; Velickovic et al. , 2017 ; Xu et al. , 2018 ; Hou et al. , 2019 ; Wang & Leskovec , 2020 ) . Graph node classification is the mostcommon issue in GNNs . However , almost all the previous works about label noise focus on image classification problem and handling noisy labels in the task of graph node classification with GNNs has not been studied yet . Fortunately , most edges in the graph-structured datasets are intra-class edges ( Wang & Leskovec , 2020 ) , indicating that a node ’ s label can be estimated by its neighbor nodes ’ labels . In this paper , we utilize this special attribute of graph data to alleviate the damages caused by noisy labels . Moreover , meta learning paradigm serves as a useful tool for us to learn a proper aggregation between origin labels and pseudo labels as the final labels . The key contributions of this paper are as follows : • To the best of our knowledge , we are the first to focus on the label noise existing in utilizing GNNs to classify graph nodes , which may serve as a beginning for future research towards robust GNNs against label noise . • We utilize meta-learning to learn how to aggregate origin labels and pseudo labels properly to get more credible supervision instead of learning to re-weight different samples . 1https : //www.mturk.com/ We experimentally show that our LPM outperforms state-of-the-art algorithms in utilizing GNNs to classify graph nodes with both synthetic and real-world label noise . 2 RELATED WORK . 2.1 GRAPH NEURAL NETWORKS . To start , we use G = ( V , E , X ) to denote a graph whose nodes set is V and edges set is E , and X ∈ Rn×d is the input feature matrix , where n denotes the number of nodes in the graph and d is the dimension of the input feature vector of each node . We use eu , v ∈ E to denote the edge that connects node u and v. For each node v ∈ V , its neighbor nodes set can be donated as Nv = { u : eu , v ∈ E } . For node classification task , the goal of GNNs is to learn optimal mapping function f ( · ) to predict the class label yv for node v. Generally speaking , GNNs follows a framework including aggregation and combination in each layer . Different GNNs have proposed different ways of aggregation and combination . In general , the k-th layer of a GNN reads a ( k ) v = Aggregate ( k ) ( { h ( k−1 ) u : u ∈ N ( v ) } ) , h ( k ) v = Combine ( k ) ( h ( k−1 ) v , a ( k ) v ) , ( 1 ) where h ( k ) v is the output for k-th layer of node v , h ( 0 ) v is the input vector of node v . 2.2 LABEL PROPAGATION . In Label Propagation ( LP ) , node labels are propagated and aggregated along the edges in the graph ( Zhou et al. , 2004 ; Zhu et al. , 2005 ; Wang & Zhang , 2007 ; Karasuyama & Mamitsuka , 2013 ) . There are some works which were designed to improve the performance of label propagation . For example , Gong et al . ( 2016 ) proposed a novel iterative label propagation algorithm which explicitly optimizes the propagation quality by manipulating the propagation sequence to move from simple to difficult examples ; Zhang et al . ( 2020 ) introduces a triple matrix recovery mechanism to remove noise from the estimated soft labels during propagation . Label propagation has been applied in semi-supervised image classification task . For example , Gong et al . ( 2017 ) used a weighted Knearest neighborhood graph to bridge the datapoints so that the label information can be propagated from the scarce labeled examples to unlabeled examples along the graph edges . Park et al . ( 2020 ) proposed a novel framwork to propagate the label information of the sampled data ( reliable ) to adjacent data along a similarity based graph . Compared to these methods , we utilize the intrinsic graph structure instead of handcrafted graph to propagate clean labels information , which is more reliable for graph-structured data . Besides , GNNs are utilized by us to extract features and classify nodes for graph-structured data . 2.3 META-LEARNING BASED METHODS AGAINST NOISY LABELS . Meta-learning aims to learn not only neural networks ’ weights , but also itself , such as hand-designed parameters , optimizer and so on ( Andrychowicz et al. , 2016 ; Finn et al. , 2017 ) . Several works have utilized meta-learning paradigm to deal with label noise . For example , Li et al . ( 2019 ) has proposed to find noise-tolerant model parameters by keeping the consistency between the output of teacher and student networks , and Li et al . ( 2017b ) trains the teacher networks with samples with clean labels and then transfer the knowledge to student networks so that the student can learn correctly even if the existence of mislabeled data . Besides , Ren et al . ( 2018 ) ; Jenni & Favaro ( 2018 ) ; Shu et al . ( 2019 ) utilize meta-learning paradigm to re-weight samples , i.e. , weight samples with clean labels more and weight mislabeled samples less . The weighting factors are optimized by gradient decent or generated by a network to minimizes the loss on a small amount of samples with correct labels . In contrast , meta-learning paradigm is utilized in this paper to learn how to aggregate origin labels and pseudo labels properly . We can get more credible supervision by combining the original label information with the label information provided by LP properly . 3 METHODS . 3.1 PRELIMINARIES . Given a graph data with n nodes and their labels D = { ( x0 , y0 ) , ( x1 , y1 ) , ... , ( xn−1 , yn−1 ) } , where xj is the j-th node and yj ∈ { 0 , 1 } c is the label over c classes . Dtrain = { ( x0 , y0 ) , ( x1 , y1 ) , ... , ( xs−1 , ys−1 ) } are training nodes with noisy labels . Our goal is to enable the GNNs f ( xj ; w ) trained with noisy sets Dtrain can also generalize well on test nodes . w is the learnable parameters of GNNs . In our method , m nodes with true labels Dclean = { ( xs , ys ) , ( xs+1 , ys+1 ) , ... , ( xs+m−1 , ys+m−1 ) } in the graph are provided as the initial clean sets ( m s ) . GCN ( Kipf & Welling , 2016 ) and GAT ( Velickovic et al. , 2017 ) are utilized in our experiments to extract features and classify nodes . Our method includes two main parts : label propagation and label aggregation . We will go into details about these two parts in the following section 3.2 and section 3.3 . 3.2 LABEL PROPAGATION . Label Propagation is based on the label smoothness that two connected nodes tend to have the same label . Therefore , the weighted average of neighbor nodes ’ label of a node is similar to this node ’ s true label . An illustration of LP part in our method can be found in Figure . 1 . The first step of LP is to construct an appropriate neighborhood graph . A common choice is k-nearest graph ( Iscen et al. , 2019 ; Liu et al. , 2018 ) but there is an intrinsic graph structure ( adjacency matrix A ) in graph data , so our similarities matrix W with zero diagonal can be constructed with A , whose elements Wi , j are pairwise similarities between node i and node j : Wi , j = Ai , j d ( hi , hj ) + ε , ( 2 ) where hi , hj are the feature vectors extracted by GNNs for node i and node j. d ( · , · ) is a distance measure ( e.g. , Euclidean distance ) . ε is an infinitesimal . Note that we can get W with time complexity O ( | E | ) instead of O ( n2 ) because A is a sparse matrix whose edge lists are given . Then we can normalize the similarities matrix W : S = D−1/2WD−1/2 , ( 3 ) where D is a diagonal matrix with ( i , i ) -value to be the sum of the i-th row of W . Let Y ( k ) = [ y ( k ) 1 , ... , y ( k ) n ] T ∈ Rn×c be the soft label matrix in LP iteration k and the i-th row y ( k ) i is the predicted label distribution for node i . When k = 0 , the initial label matrix Y ( 0 ) = [ y ( 0 ) 1 , ... , y ( 0 ) n ] T consists of one-hot label vectors for i = s , s+ 1 , ... , s+m− 1 ( i.e. , initial clean sets ) or zero vectors otherwise . The LP ( Zhu et al. , 2005 ) in iteration k can be formulated as : Y ( k+1 ) = SY ( k ) , ( 4 ) y ( k+1 ) i = y ( 0 ) i , ∀i ∈ [ s , s+m− 1 ] ( 5 ) In Eq . ( 4 ) , every node ’ s label in the ( k + 1 ) -th iteration equals the weighted average of its neighbor nodes ’ labels in k-th iteration . In this way , the clean sets propagate labels to the noisy training nodes according to normalized edge weights . And then in Eq . ( 5 ) , the labels of clean sets nodes are reset to their initial values . The reason is that we can take full advantage of the tiny minority of clean nodes and in case that the effect of clean sets fade away . Co-teaching ( Han et al. , 2018 ) and Co-teaching plus ( Yu et al. , 2019 ) have been proposed to train DNNs robustly against label noise . There are two DNNs which select samples with small loss from noisy training sets to train each other . Our method is similar to theirs to some extent because LP is utilized by us to select true-labeled samples from Dtrain for training . However , instead of taking the nodes with small loss as true-labeled nodes , we select the nodes Dselect whose original labels are same with pseudo labels for training . Original labels ofDselect are credible and we also inject them to initial clean sets Dclean for better LP in next epoch . This is why our method can achieve better performance even if few true-labeled nodes are provided . 3.3 META-LEARNING BASED LABEL AGGREGATION 1 . Fo w ar d no is y 2 . Aggregation net forward 3 . Ba ck w ar d no is y Training loss 6.Backw ard on backw ard 4 . Fo rw ar d cl ea n 5.Backw ard clean Clean loss Gradients descent 7.Aggregation net backward In section 3.2 , the selected training nodes ( node 5,7 in Figure.1 ) have been utilized for training and LP but the left training nodes Dleft ( node 6,8,9,10 in Figure.1 ) with abundant information haven ’ t been fully exploited . In this section , we mine the abundant and precious information from Dleft via meta learning . The computation process of label aggregation is shown in Figure . 2 . For ∀ ( xj , yj ) ∈ Dleft , we can get two loss values : l1 = loss ( ŷj , yj ) , ( 6 ) l2 = loss ( ŷj , ỹj ) , ( 7 ) where ŷj is the label predicted by GNNs for training node j and ỹj is the pseudo label predicted by LP for node j . We can also get final label yj for node j by aggregating original label yj and pseudo label ỹj : yj = λjyj + ( 1− λj ) ỹj , λj ∈ [ 0 , 1 ] ( 8 ) where λ is the aggregation coefficient . Some previous methods designed a weighting function mapping training loss to sample weights for noisy label problems ( Kumar et al. , 2010 ; Ren et al. , 2018 ; Shu et al. , 2019 ) . Instead , we utilize a 3-layer multi-layer perceptron ( MLP ) as the aggregation network g ( · ; · ) to map loss values to aggregation coefficient λj : λj = g ( l1 ‖ l2 ; θ ) = λj ( θ ; w ) , ( 9 ) Where l1 ‖ l2 is a 2-dimensional vector which is the concatenation of l1 and l2 and θ is the weights of aggregation network g. The rationality lies on a consensus that samples ’ loss values are affiliated with the credibility of samples ’ original labels ( Kumar et al. , 2010 ; Shu et al. , 2019 ; Yu et al. , 2019 ) . The MLP or aggregation networks ’ input layer are 2 neurons and its output layer is one neuron , which can be an approximator to almost any continuous functions . The activation function of the last layer is sigmoid function to ensure that output λj ∈ [ 0 , 1 ] . We can get the training loss Ltrj for node j : Ltrj ( w , θ ) = loss ( ŷj ( w ) , yj ( θ ) ) , ( 10 ) Then we can backward on the GNNs : ŵt ( θt ) = wt − α | Dleft | ∑ ( xj , yj ) ∈Dleft ∇wLtrj ( w , θt ) |wt , ( 11 ) where α is the learning rate of GNNs . Then we can get the loss Lc on clean sets Dclean : Lc ( ŵt ( θt ) ) = 1 | Dclean | ∑ ( xi , yi ) ∈Dclean loss ( f ( xi ; ŵt ( θt ) ) , yi ) , ( 12 ) Where f ( xi ; ŵt ( θt ) ) is the output of GNNs . Then we can utilize Lc to update the weights of aggregation network : θt+1 = θt − β∇θLc ( ŵ ( θ ) ) |θt , ( 13 ) where β is the learning rate of aggregation network . Finally , GNNs ’ weights can be updated : wt+1 = wt − α | Dleft | ∑ ( xj , yj ) ∈Dleft ∇wLtrj ( w , θt+1 ) |wt . ( 14 ) To some extent , this part is similar to re-weight based methods ( Ren et al. , 2018 ; Shu et al. , 2019 ) . However , LPM has two significant advantages . Firstly , re-weight based methods can not remove the damages caused by incorrect labels because they assign every noisy training sample a positive weight while LPM potentially has the ability to take full advantage of noisy samples positively . Secondly , LPM can generate comparatively credible labels for other usages while re-weight or some other methods can not . Algorithm . 1 shows all the steps of our algorithm .
The paper proposes a robust training algorithm for graph neural networks against label noise. The authors assume the labeled nodes are divided into two parts, clean part without noise and train part with some noise. The proposed method contains two parts. Firstly, it leverages label propagation (LP) trained on the clean nodes to assign pseudo labels on train nodes with noisy labels. Secondly, the authors design a learnable weight \lambda to learn the label for those noisy nodes where LP does not agree with the original labels. The final graph neural network is trained with clean nodes, high confidence train nodes, and uncertain train nodes with learned labels. The authors conduct experiments on four graph datasets with manual injected noise and one real-world noisy dataset to validate the proposed method.
SP:9deac038d6aedcb20ea92ca2d40863e859515d9a
Recycling sub-optimial Hyperparameter Optimization models to generate efficient Ensemble Deep Learning
Ensemble Deep Learning improves accuracy over a single model by combining predictions from multiple models . It has established itself to be the core strategy for tackling the most difficult problems , like winning Kaggle challenges . Due to the lack of consensus to design a successful deep learning ensemble , we introduce Hyperband-Dijkstra , a new workflow that automatically explores neural network designs with Hyperband and efficiently combines them with Dijkstra ’ s algorithm . This workflow has the same training cost than standard Hyperband running except sub-optimal solutions are stored and are candidates to be selected in the ensemble selection step ( recycling ) . Next , to predict on new data , the user gives to Dijkstra the maximum number of models wanted in the ensemble to control the tradeoff between accuracy and inference time . Hyperband is a very efficient algorithm allocating exponentially more resources to the most promising configurations . It is also capable to propose diverse models due to its pure-exploration nature , which allows Dijkstra algorithm with a smart combination of diverse models to achieve a strong variance and bias reduction . The exploding number of possible combinations generated by Hyperband increases the probability that Dijkstra finds an accurate combination which fits the dataset and generalizes on new data . The two experimentation on CIFAR100 and on our unbalanced microfossils dataset show that our new workflow generates an ensemble far more accurate than any other ensemble of any ResNet models from ResNet18 to ResNet152 . 1 INTRODUCTION . Ensemble machine learning is a popular method to use predictions and combine them for a successful and optimal classification . In the light of its success in Kaggle competition , all top-5 solutions published in the last seven image recognition challenges use at least one ensemble method . The average and median number of individual models used by ensemble is between 7 and 8 . Appendix A summarized these 17 solutions . Despite its recent popularity among practitioners , there is no consensus on how to apply ensemble in the context of deep neural network . The overall work on ensemble Machine Learning ( non-deep ) was carried out in the 1990s and 2000s . The implementation of Deep Learning on GPU appeared less than 10 years ago . The outbreak of multi-GPU servers allows to effectively train and evaluate many neural networks simultaneously but also deploy ensemble deep architectures . Another recent trend to improve accuracy is the transfer learning or use external similar data source Kolesnikov et al . ( 2019 ) . Instead we search a new model-oriented method which can be applied on new kind of problems where no similar dataset exists . Hyperband-Dijkstra is an innovative way to benefit from this increasing computing power . It consists in unifying the two already proven efficient but contradictory approaches : hyperparameter optimization ( HPO ) and ensemble . First , one explores and trains models until finding the optimal solution and wasting sub-optimal ones while the other one uses a population of trained models to predict more accurately . Hyperband-Dijkstra creates an ensemble based on hyperband which is able to generate a huge number of trained deep models . Then , Dijkstra yields efficient combinations between them . As far as we know , it was never proposed to use Dijkstra ’ s algorithm to find a subset of k previously trained models in a greater population . After that , we describe and discuss interesting properties and experimental results on two datasets : • Hyperband-Dijkstra is able to generate better ensemble than any ensemble of ResNet models . • We show that Dijkstra algorithm is better to aggregate k trained models than a naive strategy consisting in taking the top k models based on their validation accuracy . • We show that our workflow ( with ensemble of size ≥ 2 ) keeps benefiting of hyperband running after many days while a standard use of hyperband ( consisting in taking only the best model ) stops improving much earlier . 2 RELATED WORKS . In this section we briefly review the main ideas from prior work that are relevant to our method . Ensemble . Authors Sollich & Krogh ( 1995 ) laid the foundation stone about the idea that over-fitted machine learning algorithms can be averaged out to get more accurate results . This phenomenon is explained by the Law of Large Numbers which claims that the average of the results obtained from a large number of trials should be close to the expected value . These results are especially interesting for deep learning models because they are machine learning models which are the most affected to random effects ( over-fitting ) due to their huge amount of parameters . Many ensemble algorithms have been invented such as Wolpert ( 1992 ) , Breiman ( 1996 ) or boosting Schwenk & Bengio ( 2000 ) . Some other methods are neural networks specific like negative correlation learning Liu & Yao ( 1999 ) , dropout Srivastava et al . ( 2014 ) or snapshot learning Huang et al . ( 2017 ) . There is today no consensus on the way to do ensembles like shown in the appendix A . In case the architecture of models in the ensemble is biased - for example all models contained are not deep enough or not wide enough to capture relevant features in the data - exploiting parametric diversity will not efficiently improve the results . That is why authors Liao & Moody ( 1999 ) Gashler et al . ( 2008 ) promote more and more diversity , not only based on the random weights initialisation but based on different machine learning algorithms such as neural network and decision tree in the same ensemble to maximize diversity and therefore the accuracy . Knapsack problem . A Combinatorial Optimization problem consists in searching for a solution in a discrete set so that a function is optimized . In many such problems , exhaustive search is not tractable , that is why approximate methods are used . Dijkstra ’ s algorithm Dijkstra ( 1959 ) is a path finding algorithm which locally selects the next best node until it reaches the final node . A * Hart et al . ( 1972 ) is an informed algorithm which first expands the most promising node to converge faster than Dijkstra . This knowledge is used only if an appropriate heuristic function is available . Otherwise , in absence of this knowledge , Dijkstra and A * are equivalent . More recently , SP-MCTS Schadd et al . ( 2008 ) is a probabilistic approach which runs many tree explorations based on the Upper Confident bound applied to Tree ( UCT ) Kocsis & Szepesvári ( 2006 ) formula to guide exploration/exploitation to catch a maximum of information on one node before selecting it . Hyperparameter Optimization . The empirical nature of research in Deep Learning leads us to try many models , optimization settings and pre-processing settings to find the best suited one for data . No Free Lunch theorem Wolpert & Macready ( 1997 ) proves that no hyperparameter optimization can show a superior performance in all cases . Nevertheless , methods have been developed and have shown a stable performance on supervised deep learning dataset . Discrete-space search enables to search the best model description to a given neural network . Under this umbrella , we can find : the number of units per layer , regularization parameters , batch size , type of initialization , optimizer strategy , learning rate . Plenty of approaches exist with a different theoretical background , a pure-exploration approach Bergstra & Bengio ( 2012 ) , Li et al . ( 2017 ) , smart computing resources allocation strategies Li et al . ( 2017 ) Falkner et al . ( 2018 ) , a priori based Hoffman et al . ( 2011 ) , a posteriori based Bergstra et al . ( 2011 ) or genetic inspired Jaderberg et al . ( 2017 ) . Those methods are not exclusive , for example BOHB Falkner et al . ( 2018 ) mixes Bayesian Optimization strategy to Hyperband . Another automatic approach exists like graph-space search Pham et al . ( 2018 ) . It consists in finding the best architecture ( graph ) of neural networks . It provides a maximum degree of freedom in the construction of the neural network architecture . Due to the infinity of combinations , scientists implement several constraints to limit the possibilities of graph generation , save computation cost and preserve the correctness of generated graphs . All hyper-parameters , like optimization settings and data pre-preprocessing are given by user to drive into this graph-space . Due to this complexity and because only models architectures are explored , we decide to not follow this path . Parallel hyperparameter optimization . All HPO strategies presented in this paper are asynchronous so their deployment is ideal on multi-GPU or multi-node GPU HPC . Distributed clientserver softwares Matthew Rocklin ( 2015 ) , Moritz et al . ( 2018 ) allow to simultaneously spread those training candidate models and evaluate them . Those frameworks allow also serve them in parallel . Multi-objective goal . Authors Johnston et al . ( 2017 ) discovered that many neural networks have a comparable accuracy . Literature lets us imagine that the hyper-parameter function topology has two plateaus : where the optimizer algorithm converges and where it does not . This flatness can be used to optimize a secondary goal such as model size , time-to-prediction , power consumption and so on . Authors Patton et al . ( 2019 ) propose a multi-objective optimization to not only search an accurate model but also faster ones . Early Stopping . A common practice exists to speed up HPO running like Early Stopping . They consists in resources reallocation strategies by considering learning dynamic of DNN . Prechelt ( 1998 ) Li et al . ( 2017 ) . Early stopping is also known to be a regularization method that stops the training when the validation accuracy plateaus is symptomatic and that it will not generalize well ( overfitting ) . 3 PROPOSED WORKFLOW . In this section we will first see the workflow proposed before going into a more detailed explanation step by step . 3.1 DETAIL OF THE WORKFLOW . As shown in figure 1 , the proposed workflow consists in using hyperband and not only saving the best one on the disk but the sub-optimal one too . Second , a combinatorial optimization algorithm ( Dijkstra ’ s ) finds the best one regarding the maximum number of models desired by the user ( noted K ) . Dijkstra ’ s algorithm computes the validation loss of candidates ensemble to evaluate how well a solution will generalize on the test database . The final accuracy depends on the running time of hyperband and the number of models chosen in the ensemble . Experiments results are shown in section 4 . The workflow we introduce is simple . We use Hyperband algorithm and the distributed framework Ray Moritz et al . ( 2018 ) and then our combinatorial optimization Disjkstra ’ s algorithm is a natural choice to ensemble models . The simplicity of the chosen algorithm and re-using existing frameworks reinforce our claims that this work is easy to test on a new dataset . 3.2 STEP 1 - HYPERBAND TO GENERATE MANY MODELS . Hyperband relies on an iterative selection of the most promising models to allocate resources , allowing it to exponentially evaluate more configurations than strategies which do not use progressive results during training . Hyperband is a technique that makes minimal assumptions unlike prior configuration evaluation approaches . Its pure-exploration nature combined with conservative resource allocation strategies can sweep better the hyperparameter space than other strategies like blackbox bayesian optimization . This diversity of models sampled are ideal to combine them for Dijkstra ’ s algorithm and make better ensemble Liao & Moody ( 1999 ) Gashler et al . ( 2008 ) . We only store models trained at least half maximum epochs . This allows to reduce the number of models saved and thus the number of possible combinations by focusing on the most promising models explored by Hyperband .
This paper is proposing to build ensembles of deep models, components of which have different hyperparameter (HP) configurations. This is done by first running Hyperband to create a large pool, and then run a greedy algorithm to construct an ensemble. This algorithm is termed Dykstra's algorithm on a certain graph, but it is of course simply just the default greedy algorithm, which is almost by default used to create an ensemble from a pool. The correct reference for this is [1], and this is just what people do when they create ensembles. The paper also misses a number of relevant recent work to build ensembles of deep models, at least [2, 3]. There is nothing new here, except maybe that Caruana's algorithm can now also be called Dykstra's.
SP:280c877eeaeb18c931ef41182155ce29a95adb06
Deep Learning is Singular, and That's Good
In singular models , the optimal set of parameters forms an analytic set with singularities and classical statistical inference can not be applied to such models . This is significant for deep learning as neural networks are singular and thus “ dividing ” by the determinant of the Hessian or employing the Laplace approximation are not appropriate . Despite its potential for addressing fundamental issues in deep learning , singular learning theory appears to have made little inroads into the developing canon of deep learning theory . Via a mix of theory and experiment , we present an invitation to singular learning theory as a vehicle for understanding deep learning and suggest important future work to make singular learning theory directly applicable to how deep learning is performed in practice . 1 INTRODUCTION . It has been understood for close to twenty years that neural networks are singular statistical models ( Amari et al. , 2003 ; Watanabe , 2007 ) . This means , in particular , that the set of network weights equivalent to the true model under the Kullback-Leibler divergence forms a real analytic variety which fails to be an analytic manifold due to the presence of singularities . It has been shown by Sumio Watanabe that the geometry of these singularities controls quantities of interest in statistical learning theory , e.g. , the generalisation error . Singular learning theory ( Watanabe , 2009 ) is the study of singular models and requires very different tools from the study of regular statistical models . The breadth of knowledge demanded by singular learning theory – Bayesian statistics , empirical processes and algebraic geometry – is rewarded with profound and surprising results which reveal that singular models are different from regular models in practically important ways . To illustrate the relevance of singular learning theory to deep learning , each section of this paper illustrates a key takeaway idea1 . The real log canonical threshold ( RLCT ) is the correct way to count the effective number of parameters in a deep neural network ( DNN ) ( Section 4 ) . To every ( model , truth , prior ) triplet is associated a birational invariant known as the real log canonical threshold . The RLCT can be understood in simple cases as half the number of normal directions to the set of true parameters . We will explain why this matters more than the curvature of those directions ( as measured for example by eigenvalues of the Hessian ) laying bare some of the confusion over “ flat ” minima . For singular models , the Bayes predictive distribution is superior to MAP and MLE ( Section 5 ) . In regular statistical models , the 1 ) Bayes predictive distribution , 2 ) maximum a posteriori ( MAP ) estimator , and 3 ) maximum likelihood estimator ( MLE ) have asymptotically equivalent generalisation error ( as measured by the Kullback-Leibler divergence ) . This is not so in singular models . We illustrate in our experiments that even “ being Bayesian ” in just the final layers improves generalisation over MAP . Our experiments further confirm that the Laplace approximation of the predictive distribution Smith & Le ( 2017 ) ; Zhang et al . ( 2018 ) is not only theoretically inappropriate but performs poorly . Simpler true distribution means lower RLCT ( Section 6 ) . In singular models the RLCT depends on the ( model , truth , prior ) triplet whereas in regular models it depends only on the ( model , prior ) pair . The RLCT increases as the complexity of the true distribution relative to the supposed model increases . We verify this experimentally with a simple family of ReLU and SiLU networks . 1The code to reproduce all experiments in the paper will be released on Github . For now , see the zip file . 2 RELATED WORK . In classical learning theory , generalisation is explained by measures of capacity such as the l2 norm , Radamacher complexity , and VC dimension ( Bousquet et al. , 2003 ) . It has become clear however that these measures can not capture the empirical success of DNNs ( Zhang et al. , 2017 ) . For instance , over-parameterised neural networks can easily fit random labels ( Zhang et al. , 2017 ; Du et al. , 2018 ; Allen-Zhu et al. , 2019b ) indicating that complexity measures such as Rademacher complexity are very large . There is also a slate of work on generalisation bounds in deep learning . Uniform convergence bounds ( Neyshabur et al. , 2015 ; Bartlett et al. , 2017 ; Neyshabur & Li , 2019 ; Arora et al. , 2018 ) usually can not provide non-vacuous bounds . Data-dependent bounds ( Brutzkus et al. , 2018 ; Li & Liang , 2018 ; Allen-Zhu et al. , 2019a ) consider the “ classifiability ” of the data distribution in generalisation analysis of neural networks . Algorithm-dependent bounds ( Daniely , 2017 ; Arora et al. , 2019 ; Yehudai & Shamir , 2019 ; Cao & Gu , 2019 ) consider the relation of Gaussian initialisation and the training dynamics of ( stochastic ) gradient descent to kernel methods ( Jacot et al. , 2018 ) . In contrast to many of the aforementioned works , we are interested in estimating the conditional distribution q ( y|x ) . Specifically , we measure the generalisation error of some estimate q̂n ( y|x ) in terms of the Kullback-Leibler divergence between q and q̂n , see ( 8 ) . The next section gives a crash course on singular learning theory . The rest of the paper illustrates the key ideas listed in the introduction . Since we cover much ground in this short note , we will review other relevant work along the way , in particular literature on “ flatness ” , the Laplace approximation in deep learning , etc . 3 SINGULAR LEARNING THEORY . To understand why classical measures of capacity fail to say anything meaningful about DNNs , it is important to distinguish between two different types of statistical models . Recall we are interested in estimating the true ( and unknown ) conditional distribution q ( y|x ) with a class of models { p ( y|x , w ) : w ∈ W } where W ⊂ Rd is the parameter space . We say the model is identifiable if the mapping w 7→ p ( y|x , w ) is one-to-one . Let q ( x ) be the distribution of x . The Fisher information matrix associated with the model { p ( y|x , w ) : w ∈W } is the matrix-valued function on W defined by I ( w ) ij = ∫ ∫ ∂ ∂wi [ log p ( y|x , w ) ] ∂ ∂wj [ log p ( y|x , w ) ] q ( y|x ) q ( x ) dxdy , if this integral is finite . Following the conventions in Watanabe ( 2009 ) , we have the following bifurcation of statistical models . A statistical model p ( y|x , w ) is called regular if it is 1 ) identifiable and 2 ) has positive-definite Fisher information matrix . A statistical model is called strictly singular if it is not regular . Let ϕ ( w ) be a prior on the model parameters w. To every ( model , truth , prior ) triplet , we can associate the zeta function , ζ ( z ) = ∫ K ( w ) zϕ ( w ) dw , z ∈ C , where K ( w ) is the Kullback-Leibler ( KL ) divergence between the model p ( y|x , w ) and the true distribution q ( y|x ) : K ( w ) : = ∫ ∫ q ( y|x ) log q ( y|x ) p ( y|x , w ) q ( x ) dx dy . ( 1 ) For a ( model , truth , prior ) triplet ( p ( y|x , w ) , q ( y|x ) , ϕ ) , let −λ be the maximum pole of the corresponding zeta function . We call λ the real log canonical threshold ( RLCT ) ( Watanabe , 2009 ) of the ( model , truth , prior ) triplet . The RLCT is the central quantity of singular learning theory . By Watanabe ( 2009 , Theorem 6.4 ) the RLCT is equal to d/2 in regular statistical models and bounded above by d/2 in strictly singular models if realisability holds : let W0 = { w ∈W : p ( y|x , w ) = q ( y|x ) } be the set of true parameters , we say q ( y|x ) is realisable by the model class if W0 is non-empty . The condition of realisability is critical to standard results in singular learning theory . Modifications to the theory are needed in the case that q ( y|x ) is not realisable , see the condition called relatively finite variance in Watanabe ( 2018 ) . Neural networks in singular learning theory . Let W ⊆ Rd be the space of weights of a neural network of some fixed architecture , and let f ( x , w ) : RN ×W −→ RM be the associated function . We shall focus on the regression task and study the model p ( y|x , w ) = 1 ( 2π ) M/2 exp ( − 12‖y − f ( x , w ) ‖ 2 ) ( 2 ) but singular learning theory can also apply to classification , for instance . It is routine to check ( see Appendix A.1 ) that for feedforward ReLU networks not only is the model strictly singular but the matrix I ( w ) is degenerate for all nontrivial weight vectors and the Hessian of K ( w ) is degenerate at every point of W0 . RLCT plays an important role in model selection . One of the most accessible results in singular learning theory is the work related to the widely-applicable Bayesian information criterion ( WBIC ) Watanabe ( 2013 ) , which we briefly review here for completeness . Let Dn = { ( xi , yi ) } ni=1 be a dataset of input-output pairs . Let Ln ( w ) be the negative log likelihood Ln ( w ) = − 1 n n∑ i=1 log p ( yi|xi , w ) ( 3 ) and p ( Dn|w ) = exp ( −nLn ( w ) ) . The marginal likelihood of a model { p ( y|x , w ) : w ∈ W } is given by p ( Dn ) = ∫ W p ( Dn|w ) ϕ ( w ) dw and can be loosely interpreted as the evidence for the model . Between two models , we should prefer the one with higher model evidence . However , since the marginal likelihood is an intractable integral over the parameter space of the model , one needs to consider some approximation . The well-known Bayesian Information Criterion ( BIC ) derives from an asymptotic approximation of − log p ( Dn ) using the Laplace approximation , leading to BIC = nLn ( wMLE ) + d2 log n. Since we want the marginal likelihood of the data for some given model to be high one should almost never adopt a DNN according to the BIC , since in such models d may be very large . However , this argument contains a serious mathematical error : the Laplace approximation used to derive BIC only applies to regular statistical models , and DNNs are not regular . The correct criterion for both regular and strictly singular models was shown in Watanabe ( 2013 ) to be nLn ( w0 ) +λ log nwherew0 ∈W0 and λ is the RLCT . Since DNNs are highly singular λ may be much smaller than d/2 ( Section 6 ) it is possible for DNNs to have high marginal likelihood – consistent with their empirical success .
This paper is more like a review of singular learning theory and its implication on deep learning. The authors point out that deep neural networks are singular models and ways to characterize generalization error for regular models cannot produce satisfactory results in this setting. Then the authors introduce the singular learning theory, which has been developed for decades. Then, a series of topics for deep learning, such as flatness and generalization, are studied within the framework singular learning theory, with a combination of theoretical analysis and numerical experiments. The paper is clearly written and well organized.
SP:4a55b108b8ae5fe388f54028d939a84dcd677c49
On the Decision Boundaries of Neural Networks. A Tropical Geometry Perspective
1 INTRODUCTION . Deep Neural Networks ( DNNs ) have demonstrated outstanding performance across a variety of research domains , including computer vision ( Krizhevsky et al. , 2012 ) , speech recognition ( Hinton et al. , 2012 ) , natural language processing ( Bahdanau et al. , 2015 ; Devlin et al. , 2018 ) , quantum chemistry Schütt et al . ( 2017 ) , and healthcare ( Ardila et al. , 2019 ; Zhou et al. , 2019 ) to name a few ( LeCun et al. , 2015 ) . Nevertheless , a rigorous interpretation of their success remains elusive ( ShalevShwartz & Ben-David , 2014 ) . For instance , in an attempt to uncover the expressive power of DNNs , the work of Montufar et al . ( 2014 ) studied the complexity of functions computable by DNNs that have piecewise linear activations . They derived a lower bound on the maximum number of linear regions . Several other works have followed to improve such estimates under certain assumptions ( Arora et al. , 2018 ) . In addition , and in attempt to understand some of the subtle behaviours DNNs exhibit , e.g . the sensitive reaction of DNNs to small input perturbations , several works directly investigated the decision boundaries induced by a DNN for classification . The work of Moosavi-Dezfooli et al . ( 2019 ) showed that the smoothness of these decision boundaries and their curvature can play a vital role in network robustness . Moreover , the expressiveness of these decision boundaries at perturbed inputs was studied in He et al . ( 2018 ) , where it was shown that these boundaries do not resemble the boundaries around benign inputs . The work of Li et al . ( 2018 ) showed that under certain assumptions , the decision boundaries of the last fully connected layer of DNNs will converge to a linear SVM . Also , Beise et al . ( 2018 ) showed that the decision regions of DNNs with width smaller than the input dimension are unbounded . More recently , and due to the popularity of the piecewise linear ReLU as an activation function , there has been a surge in the number of works that study this class of DNNs in particular . As a result , this has incited significant interest in new mathematical tools that help analyze piecewise linear functions , such as tropical geometry . While tropical geometry has shown its potential in many applications such as dynamic programming ( Joswig & Schröter , 2019 ) , linear programming ( Allamigeon et al. , 2015 ) , multi-objective discrete optimization ( Joswig & Loho , 2019 ) , enumerative geometry ( Mikhalkin , 2004 ) , and economics ( Akian et al. , 2009 ; Mai Tran & Yu , 2015 ) , it has only been recently used 1Code regenerating all our experiments is attached in the supplementary material . to analyze DNNs . For instance , the work of Zhang et al . ( 2018 ) showed an equivalency between the family of DNNs with piecewise linear activations and integer weight matrices and the family of tropical rational maps , i.e . ratio between two multi-variate polynomials in tropical algebra . This study was mostly concerned about characterizing the complexity of a DNN by counting the number of linear regions , into which the function represented by the DNN can divide the input space . This was done by counting the number of vertices of a polytope representation recovering the results of Montufar et al . ( 2014 ) with a simpler analysis . More recently , Smyrnis & Maragos ( 2019 ) leveraged this equivalency to propose a heuristic for neural network minimization through approximating the tropical rational map . Contributions . In this paper , we take the results of Zhang et al . ( 2018 ) several steps further and present a novel perspective on the decision boundaries of DNNs using tropical geometry . To that end , our contributions are three-fold . ( i ) We derive a geometric representation ( convex hull between two zonotopes ) for a super set to the decision boundaries of a DNN in the form ( Affine , ReLU , Affine ) . ( ii ) We demonstrate a support for the lottery ticket hypothesis ( Frankle & Carbin , 2019 ) from a geometric perspective . ( iii ) We leverage the geometric representation of the decision boundaries , referred to as the decision boundaries polytope , in two interesting applications : network pruning and adversarial attacks . For tropical pruning , we design a geometrically inspired optimization to prune the parameters of a given network such that the decision boundaries polytope of the pruned network does not deviate too much from its original network counterpart . We conduct extensive experiments with AlexNet ( Krizhevsky et al. , 2012 ) and VGG16 ( Simonyan & Zisserman , 2014 ) on SVHN ( Netzer et al. , 2011 ) , CIFAR10 , and CIFAR 100 ( Krizhevsky & Hinton , 2009 ) datasets , in which 90 % pruning rate is achieved with a marginal drop in testing accuracy . For tropical adversarial attacks , we show that one can construct input adversaries that can change network predictions by perturbing the decision boundaries polytope . 2 PRELIMINARIES TO TROPICAL GEOMETRY . For completeness , we first provide preliminaries to tropical geometry ( Itenberg et al. , 2009 ; Maclagan & Sturmfels , 2015 ) . Definition 1 . ( Tropical Semiring2 ) The tropical semiring T is the triplet { R ∪ { −∞ } , ⊕ , } , where ⊕ and define tropical addition and tropical multiplication , respectively . They are denoted as : x⊕ y = max { x , y } , x y = x+ y , ∀x , y ∈ T . It can be readily shown that −∞ is the additive identity and 0 is the multiplicative identity .. Given the previous definition , a tropical power can be formulated as x a = x x · · · x = a.x , for x ∈ T , a ∈ N , where a.x is standard multiplication . Moreover , a tropical quotient can be defined as : x y = x− y , where x− y is standard subtraction . For ease of notation , we write x a as xa . Definition 2 . ( Tropical Polynomials ) For x ∈ Td , ci ∈ R and ai ∈ Nd , a d-variable tropical polynomial with n monomials f : Td → Td can be expressed as : f ( x ) = ( c1 xa1 ) ⊕ ( c2 xa2 ) ⊕ · · · ⊕ ( cn xan ) , ∀ ai 6= aj when i 6= j . We use the more compact vector notation xa = xa11 x a2 2 · · · x ad d . Moreover and for ease of notation , we will denote ci xai as cixai throughout the paper . Definition 3 . ( Tropical Rational Functions ) A tropical rational is a standard difference or a tropical quotient of two tropical polynomials : f ( x ) − g ( x ) = f ( x ) g ( x ) . Algebraic curves or hypersurfaces in algebraic geometry , which are the solution sets to polynomials , can be analogously extended to tropical polynomials too . Definition 4 . ( Tropical Hypersurfaces ) A tropical hypersurface of a tropical polynomial f ( x ) = c1x a1 ⊕ · · · ⊕ cnxan is the set of points x where f is attained by two or more monomials in f , i.e . T ( f ) : = { x ∈ Rd : cixai = cjxaj = f ( x ) , for some ai 6= aj } . Tropical hypersurfaces divide the domain of f into convex regions , where f is linear in each region . Also , every tropical polynomial can be associated with a Newton polytope . 2A semiring is a ring that lacks an additive inverse . Definition 5 . ( Newton Polytopes ) The Newton polytope of a tropical polynomial f ( x ) = c1xa1 ⊕ · · · ⊕ cnxan is the convex hull of the exponents ai ∈ Nd regarded as points in Rd , i.e . ∆ ( f ) : = ConvHull { ai ∈ Rd : i = 1 , . . . , n and ci 6= −∞ } . A tropical polynomial determines a dual subdivision , which can be constructed by projecting the collection of upper faces ( UF ) inP ( f ) : = ConvHull { ( ai , ci ) ∈ Rd×R : i = 1 , . . . , n } onto Rd . That is to say , the dual subdivision determined by f is given as δ ( f ) : = { π ( p ) ⊂ Rd : p ∈ UF ( P ( f ) ) } , where π : Rd×R→ Rd is the projection that drops the last coordinate . It has been shown by Maclagan & Sturmfels ( 2015 ) that the tropical hypersurface T ( f ) is the ( d-1 ) -skeleton of the polyhedral complex dual to δ ( f ) . This implies that each node of the dual subdivision δ ( f ) corresponds to one region in Rd where f is linear . This is exemplified in Figure 1 with three tropical polynomials , and to see this clearly , we will elaborate on the first tropical polynomial example f ( x , y ) = x⊕ y ⊕ 0 . Note that as per Definition 4 , the tropical hypersurface is the set of points ( x , y ) where x = y , y = 0 , and x = 0 . This indeed gives rise to the three solid red lines indicating the tropical hypersurfaces . As for the dual subdivision δ ( f ) , we observe that x⊕y⊕0 can be written as ( x1 y0 ) ⊕ ( x0 y1 ) ⊕ ( x0 y0 ) . Thus , and since the monomials are bias free ( ci = 0 ) , then P ( f ) = ConvHull { ( 1 , 0 , 0 ) , ( 0 , 1 , 0 ) , ( 0 , 0 , 0 ) } . It is then easy to see that δ ( f ) = ConvHull { ( 1 , 0 ) , ( 0 , 1 ) , ( 0 , 0 ) } , since UP ( P ( f ) ) = P ( f ) , which is the black triangle in solid lines in Figure 1 . One key observation in all three examples in Figure 1 is that the number of regions where f is linear ( that is 3 , 6 and 10 , respectively ) is equal to the number of nodes in the corresponding dual subdivisions . Second , the tropical hypersurfaces are parallel to the normals to the edges of the dual subdivision polytope . This observation will be essential for the remaining part of the paper . Several other observations are summarized by Brugallé & Shaw ( 2014 ) . Moreover , Zhang et al . ( 2018 ) showed an equivalency between tropical rational maps and a family of neural network f : Rn → Rk with piecewise linear activations through the following theorem . Theorem 1 . ( Tropical Characterization of Neural Networks , ( Zhang et al. , 2018 ) ) . A feedforward neural network with integer weights and real biases with piecewise linear activation functions is a function f : Rn → Rk , whose coordinates are tropical rational functions of the input , i.e. , f ( x ) = H ( x ) Q ( x ) = H ( x ) −Q ( x ) , where H and Q are tropical polynomials . While this is new in the context of tropical geometry , it is not surprising , since any piecewise linear function can be written as a difference of two max functions over a set of hyperplanes ( Melzer , 1986 ) . Before any further discussion , we first recap the definition of zonotopes . Definition 6 . Let u1 , . . . , uL ∈ Rn . The zonotope formed by u1 , . . . , uL is defined as Z ( u1 , . . . , uL ) : = { ∑L i=1 xiu i : 0 ≤ xi ≤ 1 } . Equivalently , Z can be expressed with respect to the generator matrix U ∈ RL×n , where U ( i , : ) = ui > as ZU : = { U > x : ∀x ∈ [ 0 , 1 ] L } . Another common definition for a zonotope is the Minkowski sum of the set of line segments { u1 , . . . , uL } ( refer to appendix ) , where a line segment of the vector ui in Rn is defined as { αui : ∀α ∈ [ 0 , 1 ] } . It is well-known that the number of vertices of a zonotope is polynomial in the number of line segments , i.e . |vert ( ZU ) | ≤ 2 ∑n−1 i=0 ( L−1 i ) = O ( Ln−1 ) ( Gritzmann & Sturmfels , 1993 ) .
This work studies the decision boundaries of neural networks (NN) with piecewise linear (ReLU) activation functions from a tropical geometry perspective. Leveraging the work of [1], the authors show that NN decision boundaries form subsets of tropical hypersurfaces. This geometric characterization of NN decision boundaries is then leveraged to better understand the lottery ticket hypothesis, and prune deep NNs. The authors also allude to the use of tropical geometric perspectives on NN decision boundaries for the generation of adversarial samples, but do not explicitly discuss it in any detail within the main text of the paper.
SP:f478e45dfb8dcd578090da3010b2b1df73595b66
Attentional Constellation Nets for Few-Shot Learning
1 INTRODUCTION . Tremendous progress has been made in both the development and the applications of the deep convolutional neural networks ( CNNs ) ( Krizhevsky et al. , 2012 ; Simonyan & Zisserman , 2015 ; Szegedy et al. , 2015 ; He et al. , 2016 ; Xie et al. , 2017 ) . Visualization of the internal CNN structure trained on e.g . ImageNet ( Deng et al. , 2009 ) has revealed the increasing level of semantic relevance for the learned convolution kernels/filters to the semantics of the object classes , displaying bar/edge like patterns in the early layers , object parts in the middle layers , and face/object like patterns in the higher layers ( Zeiler & Fergus , 2014 ) . In general , we consider the learned convolution kernels being somewhat implicit about the underlying objects since they represent projections/mappings for the input but without the explicit knowledge about the parts in terms of their numbers , distributions , and spatial configurations . On the other hand , there has been a rich history about explicit object representations starting from deformable templates ( Yuille et al. , 1992 ) , pictorial structure ( Felzenszwalb & Huttenlocher , 2005 ) , constellation models ( Weber et al. , 2000 ; Fergus et al. , 2003 ; Sudderth et al. , 2005 ; Fei-Fei et al. , 2006 ) , and grammar-based model ( Zhu & Mumford , 2007 ) . These part-based models ( Weber et al. , 2000 ; Felzenszwalb & Huttenlocher , 2005 ; Fergus et al. , 2003 ; Sudderth et al. , 2005 ; Zhu & Mumford , 2007 ) share three common properties in the algorithm design : ( 1 ) unsupervised learning , ( 2 ) explicit clustering to obtain the parts , and ( 3 ) modeling to characterize the spatial configuration of the parts . Compared to the CNN architectures , these methods are expressive with explicit part-based representation . They have pointed to a promising direction for object recognition , albeit a lack of strong practice performance on the modern datasets . Another line of object recognition system with the part concept but trained discriminatively includes the discriminative trained part-based model ( DPM ) ( Felzenszwalb et al. , 2009 ) and the spatial pyramid matching method ( SPM ) ( Lazebnik et al. , 2006 ) . In the context of deep learning , efforts exist to bring the explicit part representation into deep hierarchical structures ( Salakhutdinov et al. , 2012 ) . The implicit and explicit feature representations could share mutual benefits , especially in fewshot learning where training data is scarce : CNNs may face difficulty in learning a generalized representation due to lack of sufficient training data , whereas clustering and dictionary learning ∗indicates equal contribution provide a direct means for data abstraction . In general , end-to-end learning of both the implicit and explicit part-based representations is a viable and valuable means in machine learning . We view convolutional features as an implicit part-based representation since they are learned through back-propagation via filtering processes . On the other hand , an explicit representation can be attained by introducing feature clustering that captures the data abstraction/distribution under a mixture model . In this paper , we develop an end-to-end framework to combine the implicit and explicit part-based representations for the few-shot classification task by seamlessly integrating constellation models with convolution operations . In addition to keeping a standard CNN architecture , we also employ a cell feature clustering module to encode the potential object parts . This procedure is similar to the clustering/codebook learning for appearance in the constellation model ( Weber et al. , 2000 ) . The cell feature clustering process generates a dense distance map . We further model the relations for the cells using a self-attention mechanism , resembling the spatial configuration design in the constellation model ( Weber et al. , 2000 ) . Thus , we name our method constellation networks ( ConstellationNet ) . We demonstrate the effectiveness of our approach on standard few-shot benchmarks , including FC100 ( Oreshkin et al. , 2018 ) , CIFAR-FS ( Bertinetto et al. , 2018 ) and mini-ImageNet ( Vinyals et al. , 2016 ) by showing a significant improvement over the existing methods . An ablation study also demonstrates the effectiveness of ConstellationNet is not achieved by simply increasing the model complexity using e.g . more convolution channels or deeper and wider convolution layers ( WRN-28-10 ( Zagoruyko & Komodakis , 2016 ) ) ( see ablation study in Table 3 and Figure 2 ( e ) ) . 2 RELATED WORK . Few-Shot Learning . Recently , few-shot learning attracts much attention in the deep learning community ( Snell et al. , 2017 ; Lee et al. , 2019 ) . Current few-shot learning is typically formulated as a meta-learning problem ( Finn et al. , 2017 ) , in which an effective feature embedding is learned for generalization across novel tasks . We broadly divide the existing few-shot learning approaches into three categories : ( 1 ) Gradient-based methods optimize feature embedding with gradient descent during meta-test stage ( Finn et al. , 2017 ; Bertinetto et al. , 2018 ; Lee et al. , 2019 ) . ( 2 ) Metric-based methods learn a fixed optimal embedding with a distance-based prediction rule ( Vinyals et al. , 2016 ; Snell et al. , 2017 ) . ( 3 ) Model-based methods obtains a conditional feature embedding via a weight predictor ( Mishra et al. , 2017 ; Munkhdalai et al. , 2017 ) . Here we adopt ProtoNet ( Snell et al. , 2017 ) , a popular metric-based framework , in our approach and boost the generalization ability of the feature embeddings with explicit structured representations from the constellation model . Recently , Tokmakov et al . ( 2019 ) proposes a compositional regularization to the image with its attribute annotations , which is different from out unsupervised part-discovery strategy . Part-Based Constellation/Discriminative Models . The constellation model family ( Weber et al. , 2000 ; Felzenszwalb & Huttenlocher , 2005 ; Fergus et al. , 2003 ; Sudderth et al. , 2005 ; Fei-Fei et al. , 2006 ; Zhu & Mumford , 2007 ) is mostly generative/expressive that shares two commonalities in the representation : ( 1 ) clustering/codebook learning in the appearance and ( 2 ) modeling of the spatial configurations . The key difference among these approaches lies in how the spatial configuration is modeled : Gaussian distributions ( Weber et al. , 2000 ) ; pictorial structure ( Felzenszwalb & Huttenlocher , 2005 ) ; joint shape model ( Fergus et al. , 2003 ) ; hierarchical graphical model ( Sudderth et al. , 2005 ) ; grammar-based ( Zhu & Mumford , 2007 ) . These constellation models represent a promising direction for object recognition but are not practical competitive compared with deep learning based approaches . There are also discriminative models : The discriminatively trained part-based model ( DPM ) ( Felzenszwalb et al. , 2009 ) is a typical method in this vein where object parts ( as HOG features ( Dalal & Triggs , 2005 ) ) and their configurations ( a star model ) are learned jointly in a discriminative way . The spatial pyramid matching method ( SPM ) ( Lazebnik et al. , 2006 ) has no explicit parts but instead builds on top of different levels of grids with codebook learned on top of the SIFT features ( Lowe , 2004 ) . DPM and SPM are of practical significance for object detection and recognition . In our approach , we implement the constellation model with cell feature clustering and attention-based cell relation modeling to demonstrate the appearance learning and spatial configuration respectively . Parts models are extensively studied in fine-grained image classifications and object detection to provide spatial guidance for filtering uninformative object proposals ( Simon & Rodner , 2015 ; Peng et al. , 2017 ; Zhu et al. , 2017 ; Ge et al. , 2019 ; Qi et al. , 2019 ) . Related to our work , Neural Activation Constellations ( NAC ) ( Simon & Rodner , 2015 ) introduces the constellation model to perform unsupervised part model discovery with convolutional networks . Our work is different from NAC in three aspects : ( 1 ) The algorithmic mechanisms behind Simon & Rodner ( 2015 ) and ours are different . Simon & Rodner ( 2015 ) implements a traditional Gaussian-based constellation module to model the spatial configuration and part selection on top of a fixed pre-trained CNN . However , in our ConstellationNet , our part representation and spatial configuration are modeled by cell feature clustering and self-attention based cell relation module , which is general-purpose , modularized and recursive . ( 2 ) In Simon & Rodner ( 2015 ) , the constellation module is optimized in an EM-like algorithm , which is separate from the CNN optimization . Our constellation modules are seamlessly integrated into the current CNNs and jointly optimized with them . ( 3 ) Our ConstellationNet uses the dense cell features from the CNN feature maps , which considers all positions from the images as potential parts and models their relation . However , ( Simon et al . 2015 ) extracts sparse part representations ( i.e . it uses at most one part proposal per channel and selects even less parts later ) , which may not fully utilize the rich information from the CNN feature maps . 3 FEW-SHOT LEARNING . In a standard classification problem , we aim to learn a model trained on the dataset Dbase that can generalize its classification ability to unseen test set Dnovel belonging to same categories . In few-shot classification problem , we encourage Dbase and Dnovel to be formed from different categories to emphasize model ’ s generalization ability on novel categories , where we denote training categories as Cbase , test categories as Cnovel , and Cbase ∩ Cnovel = ∅ to ensure the fairness . In the training stage ( a.k.a . meta-train stage ) , metric-based few-shot learning approaches ( Snell et al. , 2017 ; Vinyals et al. , 2016 ; Oreshkin et al. , 2018 ) usually learn a feature extractor φ ( x ) on the dataset Dbase to obtain generic feature embedding by optimizing the loss L ( φ ) : L ( φ ) = E { ( x , y ) } ∼Dbase ` ( { ( φ ( x ) , y ) } ) ( 1 ) where { ( x , y ) } is a sampled mini-batch of data points and ` ( · ) is usually an episodic few-shot loss ( Vinyals et al. , 2016 ) or a standard cross-entropy loss ( Chen et al. , 2020 ) . In the inference stage ( a.k.a . meta-test stage ) , a typical few-shot benchmark evaluates the model on K-way , N -shot classification tasks T drawn from Dnovel , where each task has a support set and a query set , i.e . T = ( T supp , T query ) . The support set T supp contains K classes and each class has N images ( e.g . K = 5 , N ∈ { 1 , 5 } ) . Following Snell et al . ( 2017 ) , the prediction ŷ′ of a query image x′ ∈ T query is given by the label of nearest prototype ck from T supp under a cosine similarity d ( · , · ) : ŷ′ = arg max k d ( φ ( x′ ) , ck ) , ck = 1 N ∑ ( x , y ) ∈T supp , y=k φ ( x ) . ( 2 ) An extended description of the few-shot learning framework can be found from Appendix A.1 . The generalization ability of the feature extractor φ ( x ) is improved in terms of training scheme ( e.g . episodic learning ( Vinyals et al. , 2016 ) ) , network design ( e.g . task condition ( Oreshkin et al. , 2018 ) ) or objective function ( e.g . learnable distance ( Sung et al. , 2018 ) ) . In our method , we propose a novel network design by inserting constellation models into CNNs and strengthen the intermediate features .
The paper proposes a constellation model that performs feature clustering and encoding dense part representations. The constellation module is placed after convolutional blocks. The module clusters cell features and calculates distance map between each cluster centroids and cell feature. The self-attention mechanism is applied on the distance map and concatenated to the original feature map to complement the feature representation. The resulting feature representation contains part representations. The few-shot experiments on the mini-Imagenet, CIFAR-FS, and FC100 datasets show the effectiveness of the proposed method.
SP:6a900a782e440dc5225d8ecb39155f594fa2cfb5
Progressively Stacking 2.0: A Multi-stage Layerwise Training Method for BERT Training Speedup
1 INTRODUCTION . In recent years , the pre-trained language models , such as BERT ( Devlin et al. , 2018 ) , XLNet ( Yang et al. , 2019 ) , GPT ( Radford et al. , 2018 ) , have shown their powerful performance in various areas , especially in the field of natural language processing ( NLP ) . By pre-trained on unlabeled datasets and fine-tuned on small downstream labeled datasets for specific tasks , BERT achieved significant breakthroughs in eleven NLP tasks ( Devlin et al. , 2018 ) . Due to its success , a lot of variants of BERT were proposed , such as RoBERTa ( Liu et al. , 2019b ) , ALBERT ( Lan et al. , 2019 ) , Structbert ( Wang et al. , 2019 ) etc. , most of which yielded new state-of-the-art results . Despite the accuracy gains , these models usually involve a large number of parameters ( e.g . BERTBase has more than 110M parameters and BERT-Large has more than 340M parameters ) , and they are generally trained on large-scale datasets . Hence , training these models is quite time-consuming and requires a lot of computing and storage resources . Even training a BERT-Base model costs at least $ 7k ( Strubell et al. , 2019 ) , let alone the other larger models , such as BERT-Large . Such a high cost is not affordable for many researchers and institutions . Therefore , improving the training efficiency should be a critical issue to make BERT more practical . Some pioneering attempts have been made to accelerate the training of BERT . You et al . ( 2019 ) proposed a layerwise adaptive large batch optimization method ( LAMB ) , which is able to train a BERT model in 76 minutes . However , the tens of times speedup is based on the huge amount of computing and storage resources , which is unavailable for common users . Lan et al . ( 2019 ) proposed an ALBERT model , which shares parameters across all the hidden layers , so the memory consumption is greatly reduced and training speed is also improved due to less communication overhead . Gong et al . ( 2019 ) proposed a progressively stacking method , which trains a deep BERT network by progressively stacking from a shallow one . Utilizing the similarity of the attention distributions across different layers , such a strategy achieves about 25 % speedup without significant performance loss . Progressively stacking provides a novel training strategy , namely training a BERT model from shallow to deep . However , progressively stacking only has a high training efficiency at the initial stage in which the model depth is small . As the training goes on , the model depth increases and the training speed decreases . The low efficiency of the later stages makes the overall speedup of progressively stacking limited . Note that in the progressively stacking method , the bottom layers are trained with longer time than the top layers . However , we observe that though the bottom layers are updated all the time , they do not have significant changes in the later stages , in terms of the attention distribution which can reflect the functionality of the encoder layers to some extent ( Gong et al. , 2019 ) . In other words , most optimization of the bottom layers has been finished in the early stage when the model is shallow . Motivated by this observation , in this work , we propose a novel multi-stage layerwise training ( MSLT ) approach , which can greatly improve the training efficiency of BERT . We decompose the training process of BERT into several stages , as shown in Fig . 1 . We start the training from a small BERT model with only a few encoder layers and gradually add new encoder layers . At each stage ( except the first stage ) , only the output layer and the newly added top encoder layers are updated , while the other layers which have been trained in the previous stages will be fixed in the current stage . After all the encoder layers are trained , to make the network better behaved , we further retrain the model by updating all the layers together . Since the whole model has already been well trained , this stage only requires a few steps ( accounting for about 20 % of the total steps ) . Compared with the progressively stacking method , which requires a lot of steps ( accounting for about 70 % of the total steps ( Gong et al. , 2019 ) ) to train the whole model , our method is much more time-efficient . Experimental results demonstrate the effectiveness and efficiency of the proposed method in two aspects : 1 ) with the same data throughput ( same training steps ) , our method can achieve comparable performance , compared with the original training method , but consumes much less training time ; 2 ) with the same training time , our method can achieve better performance than the original method . According to the results , the proposed method achieves more than 110 % speedup without significant performance degradation . To avoid misunderstanding , it should be mentioned that some widely-known methods such as model compression ( Han et al. , 2015a ; b ) and knowledge distillation ( Yim et al. , 2017 ; Hinton et al. , 2015 ; Sanh et al. , 2019 ) are designed for network speedup in the inference phase . Namely , these methods are used after the model has been trained . While in this paper , we focus on the model training speedup . 2 RELATED WORK . Based on the bidirectional Transformer ( Vaswani et al. , 2017 ) encoder , BERT has shown its great representational ability and it achieved state-of-the-art results in eleven NLP tasks . Following BERT , many pre-trained models were proposed , such as RoBERTa ( Liu et al. , 2019b ) , XLNet ( Yang et al. , 2019 ) , KBERT ( Liu et al. , 2019a ) , StructBERT ( Wang et al. , 2019 ) , and so on . Higher accuracy were achieved by these models with more training data , more training steps , or more effective loss functions . However , the BERT models are generally large-scale and they need to be trained on massive datasets ( e.g . BERT-base is trained on BooksCorpus and Wikipedia with totally 3.3 billion word corpus ) . Hence , training a BERT model is challenging in terms of both computation and storage . In the literature , some approaches were proposed to improve the training speed of BERT . 2.1 DISTRIBUTED TRAINING WITH LARGE BATCH SIZE . A direct way to reduce the training time is to increase the training batch size by using more machines and train the model in a distributed manner . However , traditional stochastic gradient descent ( SGD ) based optimization methods perform poorly in large mini-batches training . Naively increasing the batch size leads to performance degradation and computational benefits reduction ( You et al. , 2019 ) . An efficient layerwise adaptive large batch optimization technique named LAMB was proposed in You et al . ( 2019 ) to address this problem . It allows the BERT model to be trained with extremely large batch size without any performance degradation . By using 1024 TPUv3 chips , LAMB reduced the BERT training time from 3 days to 76 minutes . Though tens of times speedup is achieved , these methods require a huge amount of computing and storage resources , which are far beyond the reach of common users . 2.2 ALBERT . ALBERT ( Lan et al. , 2019 ) adopted two parameter reduction techniques , namely factorized embedding parameterization and cross-layer parameter sharing , which significantly reduced the model size . In addition , ALBERT adopted the sentence-order prediction loss instead of the next-sentence prediction loss during pre-training , which is demonstrated to be more effective in terms of downstream performance . Since the communication overhead is directly proportional to the number of parameters in the model , ALBERT also improved the communication efficiency in distributed training setting . However , since ALBERT has almost the same computational complexity as BERT , training an ALBERT model is still very time-consuming . 2.3 PROGRESSIVELY STACKING . The most related work should be progressively stacking ( Gong et al. , 2019 ) , which is mainly based on the observation that in a trained BERT model , the attention distributions of many heads from top layers are quite similar to the attention distributions of the corresponding heads from the bottom layers , as shown in Fig . 2 . Such a phenomenon implies that the encoder layers in the BERT model have similar functionalities . Utilizing the natural similarity characteristic , to train a N−layer BERT model , the progressively stacking method first trains a N/2−layer model , and then sticks it into N−layer by copying the parameters of the trained N/2 layers . After the N−layer model is constructed , the progressively stacking method continues to train the whole model by updating all the parameters together . By repeatedly using such a strategy , the deep BERT model can be trained more efficiently . According to the results shown in Gong et al . ( 2019 ) , progressively stacking can achieve the training time about 25 % shorter than the original training method ( Devlin et al. , 2018 ) . However , we can see that the speedup of progressively stacking mainly comes from the initial stage in which the model depth is small . As the model depth increases in the later stages , the training efficiency also decreases , and according to Gong et al . ( 2019 ) , to guarantee the performance , more training steps should be assigned in the later stages for training the deep model . Hence , the overall speedup brought by progressively stacking is limited . Such an issue is addressed in this paper . In our work , we also train the BERT model from shallow to deep . In contrast , at each stage , we only train the top few layers and we almost keep a high training efficiency during the whole training process . Hence , much more significant speedup is achieved . 3 METHODOLOGY . In this section , we propose an efficient training method to accelerate the training of BERT model . 3.1 MOTIVATION . The large depth should be one of the main reasons making the BERT training time-consuming . The original method ( Devlin et al. , 2018 ) trains all the encoder layers simultaneously . At each training step , the parameters need to wait for the cost function gradients to propagate backwards across all the layers before update , which is very inefficient , especially when the model is very deep . Inspired by progressively stacking ( Gong et al. , 2019 ) , we also consider to train the BERT model from shallow to deep . The main problem of progressively stacking is that its training efficiency decreases as the training goes on . We observe that in the progressively stacking strategy , the bottom layers are trained for longer time than the top layers . For example , the first encoder layer ( near the input layer ) is updated from beginning to end , while the last encoder layer ( near the output layer ) is only trained at the last stage . We doubt whether it is necessary to spend much more time training the bottom layers , since some research implies that the top encoder layers play a much more significant role ( Khetan & Karnin , 2020 ) . In BERT model , the encoder layers are mainly used to learn the dependencies of the input elements , which can be reflected by the attention distribution . In Gong et al . ( 2019 ) , the authors showed that the distributions of most attention heads are mixtures of two distributions : one distribution focuses on local positions , and another focuses on the first CLS token . In addition , the authors also observed that the attention distribution of the top layers is very similar to that of the bottom layers . Using a similar way , we also visualize some important attention distributions and we get some new findings when using the progressively stacking method to train a 12-layer BERT-Base model . Specifically , we first train a 6-layer model . Then we stack the trained 6-layer model into a 12-layer model and continue to train the whole model until convergence . The attention distributions of the top 6 encoder layers of the final 12-layer BERT-Base model are shown in the first row of Fig . 3 . For each layer , we randomly choose an attention head . Then we also show the attention distributions of the corresponding heads of the bottom 6 encoder layers in the second row of Fig . 3 . Further , we show the attention distributions of the corresponding heads of the trained 6-layer BERT model before stacking in the third row . As a comparison , we also train a 12-layer BERT-Base model from scratch using the original method , where the parameters of the bottom 6 encoder layers use the same initialization as the above BERT model trained by progressively stacking . The forth row of Fig . 3 shows the attention distributions of the bottom 6 encoder layers of the original BERT-Base model . Combined with Fig . 2 , we find that : 1 . Except the two obvious distributions found by Gong et al . ( 2019 ) , namely the distribution focusing on local positions and the distribution focusing on the CLS token , the attention distributions of many heads also focus on the SEP token ( for example , the dark vertical line in “ L11 H4 ” in Fig . 2 corresponds to the position of SEP ) . 2 . Compared with the first and second rows of Fig . 3 , one can see that for a trained 12-layer BERT model , some bottom layers have similar attention distributions to the corresponding top layers , which is in line with the observation in Gong et al . ( 2019 ) . In addition , there are also some bottom-top layer pairs whose attention distributions are very different . On the other hand , compared with the second and third rows of Fig . 3 , we can see that the attention distributions of the bottom layers from the final 12-layer model are almost the same as those of the corresponding layers from the trained 6-layer model before stacking , which implies that the further training of the bottom layers after stacking does not bring substantial optimization . The performance of the bottom encoder layers are not further improved , in terms of catching the elements ’ dependencies . Compared with the third and forth rows of Fig . 3 , we see that the attention distributions of the trained 6-layer model are also very similar to those of the bottom layers of the BERT-Base model with all the layers jointly trained from scratch . Therefore , it is not worth spending too much time training the bottom layers , especially updating the bottom layers is generally much more expensive than updating the top layers , since backward computation is top-down . An intuitive idea is that at each stage , let the bottom layers having been trained in the previous stages only participate in the forward computation , and only the newly added top layers as well as the output layer participate in the backward computation . Then the gradient information of the parameters from the bottom layers will not be computed and also will not be communicated in distributed training setting . So the time of both computation and communication can be greatly reduced .
The work proposes a simple enough idea to speed up the training of BERT by progressively stacking new layers while fixing older layers. Empirically, with the same number of training steps (and less time), the proposed method can achieve a comparable performance to the original BERT. When the same amount of running time (more steps) is used, the proposed strategy can further improve the performance.
SP:e6866231757407d20d8fbd8059cf1d0414efe018
NAS-Bench-ASR: Reproducible Neural Architecture Search for Speech Recognition
1 INTRODUCTION . Innovations in Deep Neural Network ( DNN ) architecture design , data augmentation techniques and a continuous increase in the amount of available high quality training datasets , resulted in a massive reduction in ASR word-error-rate over the past decade [ Amodei et al. , 2016 ; Kim et al. , 2019 ; Park et al. , 2019 ; Synnaeve et al. , 2020 ] . However , training ASR models to achieve state-of-the-art performance remains challenging as it requires computationally heavy training process , e.g. , often thousands of GPU-hours are needed for good convergence [ Amodei et al. , 2016 ; Kahn et al. , 2020 ] . Furthermore , the requirement of hyper-parameter optimizations increases the computational loads in ASR training . Despite the system-level complexities in the training procedure , the importance of novel architecture design has proven extremely important in a variety of application domains including ASR [ Chiu & Raffel , 2018 ; Pratap et al. , 2020 ] , computer vision [ He et al. , 2016 ; Krizhevsky et al. , 2012 ] , and natural-language processing ( NLP ) [ Devlin et al. , 2019 ; Vaswani et al. , 2017 ] . However , architecture design is a non-trivial task and often depends on years of experience , domain knowledge of the researchers and is driven by empirical successes . Over the past few years , the deep learning community is witnessing a trend in adopting automatic techniques to find neural network architectures over more traditional hand-designed alternatives . NAS algorithms are highly successful in discovering state-of-the-art architectures in various computer vision tasks [ Cai et al. , 2020 ; Howard et al. , 2019 ; Lee et al. , 2020 ; Real et al. , 2018 ; Tan et al. , 2019 ; Tan & Le , 2019 ] . However , many of them suffer from high computational demands , requiring a large number of architecture variations to be trained [ Zoph & Le , 2017 ] . Furthermore , NAS algorithms are often difficult to reproduce by different researchers , mainly due to a non-standard use of training settings , e.g. , hyperparameters , and subtle variations in the architecture search spaces [ Li & Talwalkar , 2019 ; Sciuto et al. , 2020 ] . Recently , a number of attempts have been made to mitigate these problems by releasing various benchmark datasets for the NAS research community [ Dong & Yang , 2020 ; Klyuchnikov et al. , 2020 ; Siems et al. , 2020 ; Ying et al. , 2019 ] . These datasets usually provide a direct mapping between an architecture variant and its post training performances , which can be used efficiently by a NAS algorithm speeding up the search process and , at the same time , providing common , fully reproducible environment for assessment and comparison of different algorithms . Initial attempts of creating benchmark datasets predominantly focus on image classification tasks ( with only one existing work targeting NLP at the time of this writing ) , and thus suffer from poor application coverage . We address the lack of coverage problem by introducing a new NAS-benchmak dataset in the domain of ASR , to our best knowledge the very first of its kind . To build the dataset , we have trained 8 , 242 unique convolutional neural network architectures on the TIMIT dataset [ Garofolo et al. , 1993 ] . We consider convolutional architectures due to their recent successes in the domain of ASR [ Pratap et al. , 2020 ; Hannun et al. , 2019 ] . Moreover , convolution based architectures are computationally efficient to run on mobile devices , thus favouring real-time on-device deployment . Our dataset contains multiple runs of the entire training procedure of an architecture , spanning three initializations of the network parameters and three target epochs , amounting a total of 74 , 178 = 8 , 242 × 3 × 3 training runs . In addition to the per epoch validation and final test metrics , such as Phoneme Error Rate ( PER ) , and CTC loss , we also provide run-times of the architectures on desktop and embedded GPUs for varying batch size . Furthermore , we compare a number of NAS algorithms [ Zoph & Le , 2017 ; Real et al. , 2018 ; Dudziak et al. , 2020 ; Li et al. , 2017 ; Li & Talwalkar , 2019 ] on our search space , highlighting potential challenges and differences compared to their performances on existing NAS benchmark dataset . Lastly , we show the transferability of the top architecture cells found on TIMIT to a much larger Librispeech dataset [ Panayotov et al. , 2015 ] . In summary , the contributions of this paper are : • Design of ASR NAS Search Space . ASR NAS-Bench is a first-of-its-kind search space for convolutional speech models . It facilitates the reproducible study of ASR through NAS methods and thus fills an important gap in the literature . The associated dataset consists of 8 , 242 unique cells and contains validation and test metrics along with model parameters , FLOPs and on-device run-times1 . • Enabling NAS for Large-scale ASR . Prohibitive training times for non-toy ASR datasets , has prevented NAS from strongly influencing the evolution of ASR architecture design . We show that ASR NAS-Bench is able to support the discovery of cell structures that generalize even to largescale datasets like Librispeech – a key breakthrough . We believe the methodological decisions in this paper will act as a blueprint for future work , where NAS plays a prominent role in ASR design . • Validating Existing NAS Algorithm Design . Existing understanding of NAS is grossly influenced by image-based tasks . By systematically benchmarking popular NAS algorithms , under a rich ASR search space , our findings provide otherwise lacking scientific support for prior results . 2 RELATED WORK . NAS Benchmarks . Ying et al . [ 2019 ] inroduced NAS-Bench-101 dataset in an attempt to address the difficulties in reproducing NAS research . It contains over 400K unique image classification 1The NAS-Bench-ASR dataset and the code can be downloaded from https : //github.com/ AbhinavMehrotra/nb-asr . models trained on the CIFAR10 dataset . Despite being the biggest NAS dataset yet , not all NAS algorithms can utilize the dataset due to the restrictions it imposes on the maximum number of edges to limit the search space size . To mitigate the limitations , NAS-Bench-201 was introduced , which contains 15K image classification models and includes more diagnostic data [ Dong & Yang , 2020 ] . Concurrently to NAS-Bench-201 , NAS-Bench-1shot1 [ Zela et al. , 2020 ] and NAS-Bench301 [ Siems et al. , 2020 ] were introduced . NAS-Bench-1shot1 focuses on benchmarking NAS with weight sharing , whereas , NAS-Bench-301 points out the need for surrogate functions for scaling and uses the DARTS search space [ Liu et al. , 2019 ] with approximately 1018 models . Lastly , NASBench-NLP [ Klyuchnikov et al. , 2020 ] contains models with custom recurrent cells , which are used to replace traditional layers like LSTMs . The dataset contains around 14K different architectures trained on a language modeling task . NAS in Audio Modeling . Recently , there has been an increasing interest in applying NAS in speechrelated tasks , such as keyword spotting [ Mo et al. , 2020 ; Mazzawi et al. , 2019 ] , speaker verification [ Ding et al. , 2020 ; Qu et al. , 2020 ] , and acoustic scene classification [ Li et al. , 2020 ] . NAS has also been applied in ASR [ He et al. , 2020 ; Chen et al. , 2020 ; Kim et al. , 2020 ; Baruwa et al. , 2019 ] . For example , Chen et al . [ 2020 ] used a search methodology based on the vanilla DARTS to optimize a CNN-based feature extractor , followed by a fixed Bi-LSTM module and multiple output heads . The authors evaluated the NAS-discovered models under mono- and multi-lingual settings , using the Full Language Pack from IARPA BABEL [ Gales et al. , 2014 ] , showing improvements over a VGG-based extractor . In contrast , Kim et al . [ 2020 ] considered evolution-based search to optimize a micro-cell used within a transformer architecture . The evaluation was done using English and Korean dataset of approximately 100 hours of speech each , under monolingual setting . Similarly , He et al . [ 2020 ] used differentiable search , using P-DARTS [ Chen et al. , 2019 ] as the base , to optimize a convolutional model without the recurrent tail . Unlike the previous approaches , the evaluation is done on Mandarin , while using various training datasets spanning between 170 and 10K hours of speech . Closest to our work is the work by Baruwa et al . [ 2019 ] , where the authors consider both TIMIT and LibriSpeech datasets , but studied them independently rather than using TIMIT as a proxy for LibriSpeech . Further differences include variations in search space design , e.g. , the authors only considered operations arranged in a fixed feed-forward manner , and allowed interleaving convolutions with recurrent blocks . Lastly , current work on NAS for ASR focus mainly on using the search to improve prediction accuracy , however , they often lack solid foundations needed for analysing and reasoning about the overall search process and identifying its limitations . This work presents a large-scale study on the effects of architectural changes on ASR models . 3 ASR NAS-BENCH . The main purpose of the ASR NAS-Bench dataset is to provide a direct mapping from an architecture instance in the search-space ( §3.1 ) to its training time and final performance metrics . The mapping is designed for any NAS algorithm to quickly navigate the architecture space without requiring the time-consuming and computationally-heavy training procedure . For architecture search we use the TIMIT dataset [ Garofolo et al. , 1993 ] and conduct a pilot experiment to select suitable hyperparameters used to train 8 , 242 unique models . 3.1 ASR ARCHITECTURE SEARCH SPACE . In-line with existing work [ Liu et al. , 2019 ; Pham et al. , 2018 ] and NAS Benchmarks [ Ying et al. , 2019 ; Dong & Yang , 2020 ] , we restrict our search to a small feed-forward neural network topologyspace , commonly known as cells . We repeat and arrange a chosen cell to construct a predefined macro-architecture , which is then trained on the TIMIT dataset . Micro-Architecture . A micro-architecture or a cell , as shown in Figure 1 ( a ) , is represented by a directed acyclic graph ( DAG ) . We consider DAGs with four nodes T1 , . . . , T4 with corresponding incident tensors t1 , . . . , t4 and allow two types of edges : main and skip connection edges . A main edge connects two successive nodes Ti−1 and Ti in the graph as shown by the solid line-arrows in Figure 1 ( a ) . A skip connection edge on the other hand , can connect any two nodes Tj and Ti , with the constraint j < i and are depicted as dotted line-arrows in Figure 1 ( a ) . Each edge ej→i represents an operation on the tensor tj . The tensor ti is computed by summing the results of operations done by all incoming edges on Ti ( i.e. , ej→i , where j < i ) . We consider a choice of six operations for the main edges : linear operation , four convolution operations distinguished by choices of ( kernel size , dilation ) ∈ { ( 5 , 1 ) , ( 5 , 2 ) , ( 7 , 1 ) , ( 7 , 2 ) } , and a zero operation , which outputs a tensor of zeros with the same shape and type as its input . Skip connection operations on the other hand , can be either the identity operation or the zero operation . We used L2 kernel regularizer with convolution operations and dropouts with linear operations . Within the convolution operations , the size of the kernels ( e.g. , 5 or 7 ) is chosen as a trade-off between the audio context duration and the model size . Similarly two dilation factors are considered ( e.g. , 1 or 2 ) to investigate the trade-off between audio context duration and time resolution . As the final step of a cell , the value of t4 is further passed through a layer normalization to produce the output of the cell . These design choices are made after we have considered the search space that can be used by the vast majority of the NAS algorithms . Macro-Architecture . One of our focuses in this benchmark is on-device deployment , so the macroarchitecture is made up of convolution and unidirectional LSTM blocks as they are computationally ef- ficient to run on mobile CPUs . The macro architecture , illustrated in Figure 1 ( b ) , is a sequential computation composed of four blocks followed by a unidirectional LSTM and a linear layer . Individual blocks are composed of a convolution layer , an activation layer ( ReLU ) , a layer normalization and a composition of Ci ( i = 1 , 2 , 3 , 4 ) search cells , with the same micro architecture across all the blocks . Each block is parametrized by three parameters Fi , Ki and Si . These are used to define the number of filters Fi , the kernel size Ki and the stride Si of the convolution layer . Note that Fi is also the number of filters of the convolution layers inside the search cell . We use the following set of parameters to define the macro-architecture while performing all micro-architecture training on the TIMIT dataset : C1∶4 = [ 3 , 4 , 5 , 6 ] , F1∶4 = [ 600 , 800 , 1000 , 1200 ] , K1∶4 = [ 8 , 8 , 8 , 8 ] and S1∶4 = [ 1 , 1 , 2 , 2 ] .
The authors contribute to the NAS literature by presenting a framework that works decently well on small ASR tasks, specifically TIMIT. They make judicious decisions regard the macro and micro cells that are then swept over. They also show that there is some correlation between training for TIMIT and tasks that have more data, such as librispeech. The experiments look to have been done carefully.
SP:247dfe2208798ffebd81477467ac4dab8661ef3a
Rethinking the Role of Gradient-based Attribution Methods for Model Interpretability
Current methods for the interpretability of discriminative deep neural networks commonly rely on the model ’ s input-gradients , i.e. , the gradients of the output logits w.r.t . the inputs . The common assumption is that these input-gradients contain information regarding pθ ( y | x ) , the model ’ s discriminative capabilities , thus justifying their use for interpretability . However , in this work we show that these input-gradients can be arbitrarily manipulated as a consequence of the shiftinvariance of softmax without changing the discriminative function . This leaves an open question : if input-gradients can be arbitrary , why are they highly structured and explanatory in standard models ? We investigate this by re-interpreting the logits of standard softmax-based classifiers as unnormalized log-densities of the data distribution and show that input-gradients can be viewed as gradients of a class-conditional density model pθ ( x | y ) implicit within the discriminative model . This leads us to hypothesize that the highly structured and explanatory nature of input-gradients may be due to the alignment of this class-conditional model pθ ( x | y ) with that of the ground truth data distribution pdata ( x | y ) . We test this hypothesis by studying the effect of density alignment on gradient explanations . To achieve this density alignment , we use an algorithm called score-matching , and propose novel approximations to this algorithm to enable training large-scale models . Our experiments show that improving the alignment of the implicit density model with the data distribution enhances gradient structure and explanatory power while reducing this alignment has the opposite effect . This also leads us to conjecture that unintended density alignment in standard neural network training may explain the highly structured nature of input-gradients observed in practice . Overall , our finding that input-gradients capture information regarding an implicit generative model implies that we need to re-think their use for interpreting discriminative models . 1 INTRODUCTION . Input-gradients , or gradients of outputs w.r.t . inputs , are commonly used for the interpretation of deep neural networks ( Simonyan et al. , 2013 ) . For image classification tasks , an input pixel with a larger input-gradient magnitude is attributed a higher ‘ importance ’ value , and the resulting maps are observed to agree with human intuition regarding which input pixels are important for the task at hand ( Adebayo et al. , 2018 ) . Quantitative studies ( Samek et al. , 2016 ; Shrikumar et al. , 2017 ) also show that these importance estimates are meaningful in predicting model response to larger structured perturbations . These results suggest that input-gradients do indeed capture relevant information regarding the underlying model . However in this work , we show that input-gradients can be arbitrarily manipulated using the shift-invariance of softmax without changing the underlying discriminative model , which calls into question the reliability of input-gradient based attribution methods for interpreting arbitrary black-box models . Given that input-gradients can be arbitrarily structured , the reason for their highly structured and explanatory nature in standard pre-trained models is puzzling . Why are input-gradients relatively well- behaved when they can just as easily be arbitrarily structured , without affecting discriminative model performance ? What factors influence input-gradient structure in standard deep neural networks ? To answer these , we consider the connections made between softmax-based discriminative classifiers and generative models ( Bridle , 1990 ; Grathwohl et al. , 2020 ) , made by viewing the logits of standard classifiers as un-normalized log-densities . This connection reveals an alternate interpretation of input-gradients , as representing the log-gradients of a class-conditional density model which is implicit within standard softmax-based deep models , which we shall call the implicit density model . This connection compels us to consider the following hypothesis : perhaps input-gradients are highly structured because this implicit density model is aligned with the ‘ ground truth ’ class-conditional data distribution ? The core of this paper is dedicated to testing the validity of this hypothesis , whether or not input-gradients do become more structured and explanatory if this alignment increases and vice versa . For the purpose of validating this hypothesis , we require mechanisms to increase or decrease the alignment between the implicit density model and the data distribution . To this end , we consider a generative modelling approach called score-matching , which reduces the density modelling problem to that of local geometric regularization . Hence by using score-matching , we are able to view commonly used geometric regularizers in deep learning as density modelling methods . In practice , the score-matching objective is known for being computationally expensive and unstable to train ( Song & Ermon , 2019 ; Kingma & LeCun , 2010 ) . To this end , we also introduce approximations and regularizers which allow us to use score-matching on practical large-scale discriminative models . This work is broadly connected to the literature around unreliability of saliency methods . While most such works consider how the explanations for nearly identical images can be arbitrarily different ( Dombrowski et al. , 2019 ; Subramanya et al. , 2019 ; Zhang et al. , 2020 ; Ghorbani et al. , 2019 ) , our work considers how one may change the model itself to yield arbitrary explanations without affecting discriminative performance . This is similar to Heo et al . ( 2019 ) who show this experimentally , whereas we provide an analytical reason for why this happens relating to the shift-invariance of softmax . The rest of the paper is organized as follows . We show in § 2 that it is trivial to manipulate input-gradients of standard classifiers using the shift-invariance of softmax without affecting the discriminative model . In § 3 we state our main hypothesis and describe the details of score-matching , present a tractable approximation for the same that eliminates the need for expensive Hessian computations . § 4 revisits other interpretability tools from a density modelling perspective . Finally , § 5 presents experimental evidence for the validity of the hypothesis that improved alignment between the implicit density model and the data distribution can improve the structure and explanatory nature of input-gradients . 2 INPUT-GRADIENTS ARE NOT UNIQUE . In this section , we show that it is trivial to manipulate input-gradients of discriminative deep networks , using the well-known shift-invariance property of softmax . Here we shall make a distinction between two types of input-gradients : logit-gradients and loss-gradients . While logit-gradients are gradients of the pre-softmax output of a given class w.r.t . the input , loss-gradients are the gradients of the loss w.r.t . the input . In both cases , we only consider outputs of a single class , usually the target class . Let x ∈ RD be a data point , which is the input for a neural network model f : RD → RC intended for classification , which produces pre-softmax logits for C classes . The cross-entropy loss function for some class 1 ≤ i ≤ C , i ∈ N corresponding to an input x is given by ` ( f ( x ) , i ) ∈ R+ , which is shortened to ` i ( x ) for convenience . Note that here the loss function subsumes the softmax function as well . The logit-gradients are given by∇xfi ( x ) ∈ RD for class i , while loss-gradients are ∇x ` i ( x ) ∈ RD . Let the softmax function be p ( y = i|x ) = exp ( fi ( x ) ) / ∑C j=1 exp ( fj ( x ) ) , which we denote as pi for simplicity . Here , we make the observation that upon adding the same scalar function g to all logits , the logit-gradients can arbitrarily change but the loss values do not . Observation . Assume an arbitrary function g : RD → R. Consider another neural network function given by f̃i ( · ) = fi ( · ) + g ( · ) , for 0 ≤ i ≤ C , for which we obtain ∇xf̃i ( · ) = ∇xfi ( · ) +∇xg ( · ) . For this , the corresponding loss values and loss-gradients are unchanged , i.e . ; ˜̀i ( · ) = ` i ( · ) and ∇x ˜̀i ( · ) = ∇x ` i ( · ) as a consequence of the shift-invariance of softmax . This explains how the structure of logit-gradients can be arbitrarily changed : one simply needs to add an arbitrary function g to all logits . This implies that individual logit-gradients ∇xfi ( x ) and logits fi ( x ) are meaningless on their own , and their structure may be uninformative regarding the underlying discriminative model . Despite this , a large fraction of work in interpretable deep learning ( Simonyan et al. , 2013 ; Selvaraju et al. , 2017 ; Smilkov et al. , 2017 ; Fong et al. , 2019 ; Srinivas & Fleuret , 2019 ) uses individual logits and logit-gradients for saliency map computation . We also provide a similar illustration in the supplementary material for the case of loss-gradients , where we show that it is possible for loss-gradients to diverge significantly even when the loss values themselves do not . These simple observations leave an open question : why are input-gradients highly structured and explanatory when they can just as easily be arbitrarily structured , without affecting discriminative model performance ? Further , if input-gradients do not depend strongly on the underlying discriminative function , what aspect of the model do they depend on instead ? In the section that follows , we shall consider a generative modelling view of discriminative neural networks that offers insight into the information encoded by logit-gradients . 3 IMPLICIT DENSITY MODELS WITHIN DISCRIMINATIVE CLASSIFIERS . Let us consider the following link between generative models and the softmax function . We first define the following joint density on the logits fi of classifiers : pθ ( x , y = i ) = exp ( fi ( x ; θ ) ) Z ( θ ) , where Z ( θ ) is the partition function . We shall henceforth suppress the dependence of f on θ for brevity . Upon using Bayes ’ rule to obtain pθ ( y = i | x ) , we observe that we recover the standard softmax function . Thus the logits of discriminative classifiers can alternately be viewed as un-normalized log-densities of the joint distribution . Assuming equiprobable classes , we have pθ ( x | y = i ) = exp ( fi ( x ) ) Z ( θ ) /C , which is the quantity of interest for us . Thus while the logits represent un-normalized log-densities , logit-gradients represent the score function , i.e . ; ∇x log pθ ( x | y = i ) = ∇xfi ( x ) , which avoids dependence on the partition function Z ( θ ) as it is independent of x . This viewpoint naturally leads to the following hypothesis , that perhaps the reason for the highly structured and explanatory nature of input-gradients is that the implicit density model pθ ( x | y ) is close to that of the ground truth class-conditional data distribution pdata ( x | y ) ? We propose to test this hypothesis explicitly using score-matching as a density modelling tool . Hypothesis . ( Informal ) Improved alignment of the implicit density model to the ground truth classconditional density model improves input-gradient interpretability via both qualitative and quantitative measures , whereas deteriorating this alignment has the opposite effect . 3.1 SCORE-MATCHING . Score-matching ( Hyvärinen , 2005 ) is a generative modelling objective that focusses solely on the derivatives of the log density instead of the density itself , and thus does not require access to the partition function Z ( θ ) . Specifically , for our case we have∇x log pθ ( x | y = i ) = ∇xfi ( x ) , which are the logit-gradients . Given i.i.d . samples X = { xi ∈ RD } from a latent data distribution pdata ( x ) , the objective of generative modelling is to recover this latent distribution using only samples X . This is often done by training a parameterized distribution pθ ( x ) to align with the latent data distribution pdata ( x ) . The score-matching objective instead aligns the gradients of log densities , as given below . J ( θ ) = Epdata ( x ) 1 2 ‖∇x log pθ ( x ) −∇x log pdata ( x ) ‖22 ( 1 ) = Epdata ( x ) ( trace ( ∇2x log pθ ( x ) ) + 1 2 ‖∇x log pθ ( x ) ‖22 ) + const ( 2 ) The above relationship is proved ( Hyvärinen , 2005 ) using integration by parts . This is a consistent objective , i.e , J ( θ ) = 0 ⇐⇒ pdata = pθ . This approch is appealing also because this reduces the problem of generative modelling to that of regularization of the local geometry of functions , i.e . ; the resulting terms only depend on the point-wise gradients and Hessian-trace .
The key message of this paper is that input-gradients (gradient of the logit wrt to input) or loss-gradients are/might be unrelated to the discriminative capabilities of a DNN. The input-gradient is a key primitive in several interpretability and visualization methods. Until now, it has been taken as a given that these gradients reveal 'why' or what parts of the inputs the model is sensitive to. However, this paper questions this reasoning and says that if the input-gradients can be easily manipulated without changing the generalization ability of the model, then does the input-gradient really contain discriminative signals?
SP:06c032ed2556090f71a474a5ff4ee340c103d5c2
Learning Subgoal Representations with Slow Dynamics
1 INTRODUCTION . Deep Reinforcement Learning ( RL ) has demonstrated increasing capabilities in a wide range of domains , including playing games ( Mnih et al. , 2015 ; Silver et al. , 2016 ) , controlling robots ( Schulman et al. , 2015 ; Gu et al. , 2017 ) and navigation in complex environments ( Mirowski et al. , 2016 ; Zhu et al. , 2017 ) . Solving temporally extended tasks with sparse or deceptive rewards is one of the major challenges for RL . Hierarchical Reinforcement Learning ( HRL ) , which enables control at multiple time scales via a hierarchical structure , provides a promising way to solve those challenging tasks . Goal-conditioned methods have long been recognized as an effective paradigm in HRL ( Dayan & Hinton , 1993 ; Schmidhuber & Wahnsiedler , 1993 ; Nachum et al. , 2019 ) . In goal-conditioned HRL , higher-level policies set subgoals for lower-level ones periodically , and lower-level policies are incentivized to reach these selected subgoals . A proper subgoal representation function , abstracting a state space to a latent subgoal space , is crucial for effective goal-conditioned HRL , because the abstract subgoal space , i.e. , high-level action space , simplifies the high-level policy learning , and explorative low-level behaviors can be induced by setting different subgoals in this compressed space as well . Recent works in goal-conditioned HRL have been concentrated on implicitly learning the subgoal representation in an end-to-end manner with hierarchical policies ( Vezhnevets et al. , 2017 ; Dilokthanakul et al. , 2019 ) , e.g. , using a variational autoencoder ( Péré et al. , 2018 ; Nair & Finn , 2019 ; Nasiriany et al. , 2019 ) , directly utilizing the state space ( Levy et al. , 2019 ) or a handcrafted space ( Nachum et al. , 2018 ) as a subgoal space . Sukhbaatar et al . ( 2018 ) proposed to learn subgoal embeddings via self-play , and Ghosh et al . ( 2018 ) designed a representation learning objective using an actionable distance metric , but both of the methods need a pretraining process . Near-Optimal ∗Denotes equal contribution 1Videos available at https : //sites.google.com/view/lesson-iclr 2Find open-source code at https : //github.com/SiyuanLee/LESSON Representation ( NOR ) for HRL ( Nachum et al. , 2019 ) learns an abstract space concurrently with hierarchical policies by bounding the sub-optimality . However , the NOR subgoal space could not support efficient exploration in challenging deceptive reward tasks . In this paper , we develop a novel method , which LEarns the Subgoal representation with SlOw dyNamics ( LESSON ) along with the hierarchical policies . Subgoal representation in HRL is not only a state space abstraction , but also a form of high-level action abstraction . Since the high-level agent makes decisions at a low temporal resolution , our method extracts features with slow dynamics from observations as the subgoal space to enable temporal coherence . LESSON minimizes feature changes between adjacent low-level timesteps , in order for the learned feature representation to have the slowness property . To capture dynamic features and prevent the collapse of the learned representation space , we also introduce an additional contrastive objective that maximizes feature changes between high-level temporal intervals . We provide a theoretical motivation for the slowness objective . That is , selecting slow features as the subgoal space can achieve the most efficient hierarchical exploration when the subgoal space dimension is low and fixed . We illustrate on a didactic example that our method LESSON accomplishes the most efficient state coverage among all the compared subgoal representation functions . We also compare LESSON with state-of-theart HRL and exploration methods on complex MuJoCo tasks ( Todorov et al. , 2012 ) . Experimental results demonstrate that ( 1 ) LESSON dramatically outperforms previous algorithms and learns hierarchical policies more efficiently ; ( 2 ) our learned representation with slow dynamics can provide interpretability for the hierarchical policy ; and ( 3 ) our subgoal representation and low-level policies can be transferred between different tasks . 2 PRELIMINARIES . In reinforcement learning , an agent interacts with an environment modeled as an MDP M = ( S , A , P , R , γ ) , where S is a state space , A is an action space . P : S × A × S → [ 0 , 1 ] is an unknown dynamics model , which specifies the probability P ( s′|s , a ) of transitioning to next state s′ from current state s by taking action a. R : S × A → R is a reward function , and γ ∈ [ 0 , 1 ) is a discount factor . We optimize a stochastic policy π ( a|s ) , which outputs a distribution over the action space for a given state s. The objective is to maximize the expected cumulative discounted reward Eπ [ ∑∞ t=0 γ trt ] under policy π . 3 METHOD . In this section , we present the proposed method for LEarning Subgoal representations with SlOw dyNamics ( LESSON ) . First , we describe a two-layered goal-conditioned HRL framework . We then introduce a core component of LESSON , the slowness objective for learning the subgoal representation of HRL . Finally , we summarize the whole learning procedure . 3.1 FRAMEWORK . Following previous work ( Nachum et al. , 2018 ; 2019 ) , we model a policy π ( a|s ) as a two-level hierarchical policy composed of a high-level policy πh ( g|s ) and a low-level policy πl ( a|s , g ) . The high-level policy πh ( g|s ) selects a subgoal g in state s every c timesteps . The subgoal g is in a low dimensional space abstracted by representation function φ ( s ) : S → Rk . The low-level policy πl ( a|s , g ) takes the high-level action g as input and interacts with the environment every timestep . Figure 1 depicts the execution process of the hierarchical policy . LESSON iteratively learns the subgoal representation function φ ( s ) with the hierarchical policy . To encourage policy πl to reach the subgoal g , we train πl with an intrinsic reward function based on the negative Euclidean distance in the latent space , rl ( st , at , st+1 , g ) = −||φ ( st+1 ) − g||2 . Policy πh is trained to optimize the expected extrinsic rewards renvt . We use the off-policy algorithm SAC ( Haarnoja et al. , 2018 ) as our base RL optimizer . In fact , our framework is compatible with any standard RL algorithm . Apparently , a proper subgoal representation φ ( s ) is critical not only for learning an effective lowlevel goal-conditioned policy but also for efficiently learning an optimal high-level policy to solve a given task . As the feature dimension k is low , φ ( s ) has a compression property , which is necessary to make the hierarchical policy learning easier . If φ ( s ) is exactly an identity function without any abstraction , the high-level policy πh still needs to explore in a large space and the complicated subgoal g for the low-level policy is hard to reach as well . In this circumstance , the hierarchical structure can not simplify the MDP and has no advantage over a flat structure . 3.2 LEARNING SUBGOAL REPRESENTATIONS . Inspired by physics-based priors , features with slow dynamics preserve higher temporal coherence and less noise ( Wiskott & Sejnowski , 2002 ) . As the high-level policy acts at a lower temporal resolution compared to the low-level policy , it is sensible to learn a subgoal representation function with a slowness objective . To solve large-scale problems , we parameterize the representation function φ ( s ) with a neural network to extract slow features . One natural way of learning φ ( s ) is to minimize the squared difference between feature values at times t and t+ 1 , min φ E ( st , st+1 ) ∼D [ ||φ ( st ) − φ ( st+1 ) ||2 ] , ( 1 ) where D is a replay buffer . This loss function eliminates fast features , but can be trivially optimized if we allow lossy representation function φ ( e.g. , if φ ( s ) = 0 for ∀s ∈ S ) . To avoid such trivial solutions and capture dynamic features , we propose a contrastive loss to maximize the distance between high-level state transitions in the latent subgoal space , i.e. , minφ E ( st , st+c ) ∼D [ −||φ ( st ) − φ ( st+c ) ||2 ] . To trade off these two loss functions , we adopt the technique of triplet loss ( Chopra et al. , 2005 ) , i.e. , imposing the latent distance between high-level transitions larger than a margin parameterm , as shown by Eq . 2 . If we remove the margin parameterm and themax operator , Eq . 2 will be dominated by the maximizing distance part . Margin m defines a unit of distance in the latent space , which prevents trivial solutions as well . min φ E ( st , st+1 , st+c ) ∼D [ ||φ ( st ) − φ ( st+1 ) ||2 +max ( 0 , m− ||φ ( st ) − φ ( st+c ) ||2 ) ] . ( 2 ) The above learning objective abstracts the state space to a latent subgoal space with slow dynamics . As Eq . 2 optimizes the squared difference between feature values , the learned representation can preserve the spatial locality property of the state space , so a subgoal g can be selected in the neighborhood of φ ( s ) . In the next section , we give a theoretical motivation for the slowness objective . That is , selecting slow features as the subgoal space can promote efficient exploration . Algorithm 1 shows the learning procedure of our method . We update φ ( s ) and πl at the same frequency so that the low-level reward function varies in a stationary way . The high-level policy is updated less frequently , as the high-level transitions are less . 4 EFFICIENT EXPLORATION WITH SLOW SUBGOAL REPRESENTATION . In this section , we provide a theoretical motivation for subgoal representation learning with slow dynamics from a statistical view . To support a formal analysis , we consider selecting a subset of features from the state space as a subgoal space . We prove that , given a fixed subgoal space dimension , selecting slow features as the subgoal space can achieve the most efficient hierarchical exploration . We first define a measure for exploration and describe assumptions of our analysis . Then , we present a theorem about the optimality property and corresponding implications . Algorithm 1 LESSON algorithm 1 : Input : Number of training steps N , margin m , replay buffer D. 2 : Initialize : Learnable parameters for πh ( g|s ) , πl ( a|s , g ) and φ ( s ) . 3 : for t = 1 .. N do 4 : Collect experience ( st , gt , at , st+1 , renvt ) under πh and πl . 5 : Compute low-level reward rlt = −||φ ( st+1 ) − gt||2 . 6 : Update the replay buffer D. 7 : Optimize πh by maximizing cumulative task rewards with D every c timesteps . 8 : Optimize πl by maximizing cumulative low-level rewards with D every timestep . 9 : Sample a batch of state transitions from D and update φ with Eq . 2 every timestep . 10 : end for 11 : Return : πh , πl and φ .
This paper proposes a new method for learning subgoal representations in HRL. The method learns a representation that emphasises features that change slowly, through a “slowness objective”. The slowness objective minimises changes in the subgoal representation between low level time steps, while maximising feature changes between the high-level temporal intervals. This objective allows for efficient exploration, which the paper justifies theoretically, and supports with some empirical experiments on challenging control domains.
SP:f0ab80d4f3742a539ea2559845d00e8110ab9e98
Learning Monotonic Alignments with Source-Aware GMM Attention
1 INTRODUCTION . In recent years , transformer models with soft attention have been widely adopted in various sequence generation tasks ( Raffel et al. , 2019 ; Vaswani et al. , 2017 ; Parmar et al. , 2018 ; Karita et al. , 2019 ) . Soft attention does not explicitly model the order of elements in a sequence and attends all encoder outputs for each decoder step . However , the order of elements is crucial for understanding monotonic sequence-to-sequence ( Seq2Seq ) tasks , such as automatic speech recognition ( ASR ) , video analysis , and lip reading . Learning monotonic alignments enables the model to attend to a subset of the encoder output without performance degradation in these tasks . In comparison , soft attention is not suitable for streaming inference applications because the softmax operation needs to wait until all encoder outputs are produced . Figure 1 ( b ) shows the attention plot for soft-attention . Soft attention learns the alignments between queries and keys based on their similarities ; it requires all encoder tokens prior to the attention score calculation . Furthermore , soft attention can not easily decode long-form sequences that are not considered in the training corpus . The Gaussian Mixture Model ( GMM ) attention Graves ( 2013 ) ; Battenberg et al . ( 2020 ) ; Chiu et al . ( 2019 ) have been proposed for learning the monotonic mapping between encoder and decoder states for long-form sequence generation . The GMM attention is a pure location-aware algorithm in which encoder contents are not considered during attention score calculation . However , each element in the encoder output sequence contains different amounts of information and should be attended considering their contents . In figure 1 ( c ) , the GMM attention fails to learn the detailed alignments and attends to many tokens simultaneously . In this study , we adopted the GMM attention mechanism to the modern transformer structure and proposed the Source-Aware Gaussian Mixture Model ( SAGMM ) attention which considers both contents and orders of source sequences . Each component in the SAGMM is multi-modal and discards non-informative tokens in the attention window . For online inference , we propose a truncated SAGMM ( SAGMM-tr ) that discards the long-tail of the attention score in the SAGMM . To the best of our knowledge , this is the first attempt to adopt a GMM-based attention to online sequence generation tasks . Learning accurate monotonic alignments enables the SAGMM-tr to attend to a relevant subset of sequences for each decoder step and improves the performance of the model in terms of streaming and long-form sequence generation tasks . Figure 1 ( d ) shows the monotonic alignments learned by the SAGMM-tr , enabling online inference . Experiments involving streaming and long-form ASR showed substantial performance improvements compared with conventional algorithms without performance degradation in offline in-distribution ASR . Furthermore , we tested the SAGMM-tr in a machine translation task and demonstrated the performance of the proposed algorithm in non-monotonic tasks . 2 SOURCE-AWARE GMM ATTENTION . 2.1 SOFT ATTENTION . Herein , we abbreviate the head index h during attention score calculation for simplicity . In dot-product multi-head soft attention Vaswani et al . ( 2017 ) without relative positional encoding , the attention score from soft attention αSoft is derived from the query matrix Q ∈ RI×d and key matrix K ∈ RJ×d as follows : αSoft = softmax ( QKᵀ/ √ d ) ( 1 ) where d , I , and J are the feature dimension , decoder and encoder sequence length , respectively . The attention context matrix from the h-th head Hh and the multi-head output M are expressed as Hh = αhSoft V h ( 2 ) M = concat [ H1 ; ... ; Hnh ] WO ( 3 ) where αhSoft denotes the αSoft for the h-th head , V h ∈ RJ×d the value matrix for the h-th head , and nh the number of heads . In this study , we adopted relative positional encoding Shaw et al . ( 2018 ) ; Dai et al . ( 2019 ) which provides a stronger baseline for long-form sequence generation for self-attention layers . 2.2 GMM ATTENTION . The previous studies regarding GMM attention Battenberg et al . ( 2020 ) ; Chiu et al . ( 2019 ) were based on early content-based attention ( Cho et al. , 2014 ) . Li et al . ( 2020 ) adopted the GMM attention to the transformer framework , but did not provide detailed descriptions . Herein , we adopt v2 model in Battenberg et al . ( 2020 ) which improved the performance of the original GMM attention mechanism Graves ( 2013 ) . We define the GMM attention as a variant of multi-head attention by considering a Gaussian distribution component as an attention score of single-head in a multi-head mechanism . In the study by Battenberg et al . ( 2020 ) , the value matrix was shared for all Gaussian components , whereas multi-head value matrices were multiplied with the probability from corresponding components in this study to attend to information from different representation subspaces ( Vaswani et al. , 2017 ) . Hence , the multi-head GMM attention introduced here is a more generalized algorithm compared with the early GMM attention . Let us denote the i-th row of Q as Qi ∈ R1×d . The normal distribution parameters for the i-th step are expressed ∆i , σi , φi = ζ ( QiW∆ ) , ζ ( QiWσ ) , QiWφ ( 4 ) µi = ∆i + µi−1 ( 5 ) where ζ ( x ) is a softplus function of x ; W∆ ∈ Rd×1 , Wσ ∈ Rd×1 , and Wφ ∈ Rd×1 . The softplus function was adopted , similar to the study of Battenberg et al . ( 2020 ) in which softplus activation demonstrated better performances than the exponential operation . A mixture component of the GMM attention , from the i-th decoder step to the j-th encoder token , is derived from the αGMM‖i , j is defined as follows : N ( j , µi , σi ) = 1√ 2πσi exp ( − ( j − µi ) 2 2σi ) ( 6 ) αGMM‖i , j = N ( j , µi , σi ) ( 7 ) Hhi = softmaxh ( φhi ) ∑ j αhGMM‖i , jV h j . ( 8 ) where softmaxh denotes the softmax function over heads . The conventional GMM attention mechanism is analogous to integral of source sequences with a uniform axis spacing as shown in Figure 2 ( a ) . In this figure , each rectangle denotes the attention score with specified Gaussian component parameters . The GMM attention assumes that each encoder output is equally important . However , this assumption is not satisfied for many input modalities , e.g . speech and videos from real environments . Moreover , the number of modes in the GMM attention is limited by the number of mixture components . To learn robust alignments for monotonic Seq2Seq tasks , we propose the SAGMM which considers both contents and locations for the attention mechanism . 2.3 SOURCE-AWARE GMM ATTENTION . Figure 2 ( b ) shows the scheme of the proposed SAGMM attention . Compared with the GMM attention , the SAGMM is analogous to an integral of normal distribution with non-uniform spacing based on encoder contents . In the figure 2 ( b ) , the width of rectangle δj controls the model to selectively attend to the informative tokens during the attention score calculation . This content-aware property of the SAGMM enables the model to learn stable monotonic alignments from the training corpus . Furthermore , SAGMM can easily discard non-informative tokens and aggregate information distributed over several remote tokens . In the SAGMM , normal distribution parameter ∆i , σi , φi , and µi are derived from equation 4 and equation 5 . To encode the contents of the source sequences , the weight for each encoder output δj is provided from the j-th row of the key matrix K as follows : δj = sigmoid ( KjWδ ) . ( 9 ) where Wδ ∈ Rd×1 and the sigmoid function are introduced to smoothly bound the maximum weight δj similar to Dong & Xu ( 2020 ) . Subsequently , the probability of normal distribution N ( νj ; µi , σi ) is calculated from its cumulative sum νj expressed as νj = δj + νj−1 ( 10 ) N ( νj ; µi , σi ) = 1√ 2πσi exp ( − ( νj − µi ) 2 2σi ) ( 11 ) Finally , the SAGMM attention score αSAGMM is defined as follows : αSAGMM‖i , j = δj N ( νj ; µi , σi ) ( 12 ) where δj where δj is multiplied to describe uneven step sizes in summation . In the early stage of training , we introduced a length penalty loss to facilitate alignment learning between µ and ν ; it is expressed as Llength = λlength ∗ ( ( µI −min ( I , J ) ) 2 + ( νJ −min ( I , J ) ) 2 ) . ( 13 ) with λlength = 0.0005 where I and J denote the length of the decoder and encoder sequences , respectively . We turned off the Llength after 200K of training steps in the experiments . Finally , we modified 5 as µi = µi−1 + min ( max ( ∆i , 0 ) , 3 ) to scale µi and νj similar to the token indices . This modification facilitates the interpretability of µ and ν . The attention score for each encoder token in the SAGMM was determined independently because they do not rely on the softmax operation over the encoder outputs . It is noteworthy that ∑ j δj N ( νj ; µi , σi ) approximates the integral of the Gaussian distribution . Hence , the sum of the attention weights is approximately 1 , thereby facilitating numerical stability and learning without using softmax . 2.4 SAGMM-TR FOR ONLINE INFERENCE . Since the attention score in SAGMM is generated without softmax normalization over all encoder tokens , we can simply build the attention for streaming inference by cropping the long-tail of the Gaussian distribution . In SAGMM-tr , the normal distribution is truncated to limit the past and future contexts as follows : Ntr ( νj ; µi , σi ) = { 1√ 2πσi exp ( − ( νj−µi ) 2 2σi ) , if µi − 2 √ σi < νj < µi + 2 √ σi 0 , else . ( 14 ) αSAGMM -tr‖i , j = δj Ntr ( νj ; µi , σi ) ( 15 ) Hhi = softmaxh ( φhi ) ∑ j∈µi−2 √ σi < νj < µi+2 √ σi αhSAGMM−tr‖i , jV h j . ( 16 ) Discarding the tokens with threshold of 2 √ σi removes approximately 5 % of the attention score . In online inference with the SAGMM-tr , Hhi can be calculated after νj exceeds µi + 2 √ σi . It is noteworthy that when νj ≥ µi + 2 √ σi satisfies in for a current token j = βi , then the equation satisfies for all j > βi and Hhi can be emitted without for waiting future contexts . We started from the SAGMM model and fine-tuned SAGMM-tr until the performance converged . We discovered that the models with the SAGMM-tr demonstrated slightly better performances than the SAGMM ; hence , we mainly report the results involving the SAGMM-tr model herein . For online speech recognition using the SAGMM-tr , we randomly concatenated the 1-vector after the end of the source sequence with a probability peos in the training stage and performed training to emit the endof-sequence ( EOS ) token only with the utterances containing the 1-vector . The 1-vector concatenation suppresses the EOS token in the long silence part . Finally , we built a unidirectional encoder whose maximum latency was similar to those of Zhang et al . ( 2020 ) ; Dong et al . ( 2019 ) by adopting a block-wise mask on self-attention layers . A detailed explanation on the block-wise masking is provided in the Appendix . Algorithm 1 in the Appendix shows a pseudo code for the SAGMM-tr attention in inference stage . The number of tokens required to 16 was determined by model parameters . We trained and tested the SAGMM-tr with a fixed attention window width c , to demonstrate the performance in environments with maximum latency constraint . In this version , equation 14 - 16 were modified as follows : γi = arg max γi−1≤j < J N ( νj ; µi , σi ) ( 17 ) Ntr ( νj ; µi , σi ) = { 1√ 2πσi exp ( − ( νj−µi ) 2 2σi ) , if γ − c2 < j < γi + c 2 0 , else . ( 18 ) αSAGMM -tr‖i , j = δj Ntr ( νj ; µi , σi ) ( 19 ) Hhi = ∑ γi− c2 < j < γi+ c 2 αSAGMM -tr‖i , jVj . ( 20 ) In equation 20 , we wait c2 additional tokens before producing the output . We compared the performance of the SAGMM-tr with adaptive and fixed window widths through experiments .
This paper introduces “source-aware” GMM attention and applies it to offline, online, long-form ASR. The value of source-aware GMM attention appears to be its ability to “ignore” long segments of silence in the input audio, which could potentially be more difficult to do using other attention mechanisms. Fairly competitive results are presented for offline ASR. For online ASR, the results are state-of-the-art amongst sequence-to-sequence-based models.
SP:1d56942da0ed8d8280bd444bf9265b79b33b07eb
On The Adversarial Robustness of 3D Point Cloud Classification
1 INTRODUCTION . Despite the prominent achievements that deep neural networks ( DNN ) have reached in the past decade , adversarial attacks ( Szegedy et al. , 2013 ) are becoming the Achilles ’ heel in modern deep learning deployments , where adversaries generate imperceptible perturbations to mislead the DNN models . Numerous attacks have been deployed in various 2D vision tasks , such as classification ( Carlini & Wagner , 2017 ) , object detection ( Song et al. , 2018 ) , and segmentation ( Xie et al. , 2017 ) . Since adversarial robustness is a critical feature , tremendous efforts have been devoted to defending against 2D adversarial images ( Guo et al. , 2017 ; Papernot et al. , 2016 ; Madry et al. , 2018 ) . However , Athalye et al . ( 2018 ) suggest that most of the current countermeasures essentially try to obfuscate gradients , which give a false sense of security . Besides , certified methods ( Zhang et al. , 2019 ) often provide a lower bound of robustness , which are not helpful in practice . Therefore , adversarial training is widely believed as the most and only effective defense solution . The emergence of 3D point cloud applications in safety-critical areas like autonomous driving raises public concerns about their security of DNN pipelines . A few studies ( Xiang et al. , 2019 ; Cao et al. , 2019 ; Sun et al. , 2020 ) have demonstrated that various deep learning tasks on point clouds are indeed vulnerable to adversarial examples . Among them , point cloud classification models have laid solid foundations upon which other complex models are built ( Lang et al. , 2019 ; Yu et al. , 2018a ) . While it seems intuitive to extend convolutional neural networks ( CNN ) from 2D to 3D for point cloud classification , it is actually not a trivial task . The difficulty mainly inherits from that point cloud is an unordered set structure that CNN can not handle . Modern point cloud classification models ( Qi et al. , 2017a ; Zaheer et al. , 2017 ) address this problem by leveraging a symmetric function , which is permutation-invariant to the order of points , to aggregate local features , as shown in Figure 2 . Recently , a number of countermeasures have been proposed to defend against 3D adversarial point clouds . However , the failure of gradient obfuscation-based defenses in the 2D space motivates us to re-think whether current defense designs provide real robustness for 3D point cloud classification . Especially , DUP-Net ( Zhou et al. , 2019 ) and GvG-PointNet++ ( Dong et al. , 2020a ) claim to improve the adversarial robustness significantly . However , we find that both defenses belong to gradient obfuscation through our analysis , hence further design white-box adaptive attacks to break their robustness . Unfortunately , our 100 % attack success rates demonstrate that current defense designs are still vulnerable . As mentioned above , adversarial training ( AT ) is considered the most effective defense strategy ; we thus perform the first rigorous study of how AT behaves in point cloud classification by exploiting projected gradient descent ( PGD ) attacks ( Madry et al. , 2018 ) . We identify that the default used symmetric function weakens the effectiveness of AT . Specifically , popular models ( e.g. , PointNet ) utilize fixed pooling operations like MAX and SUM pooling as their symmetric functions to aggregate features . Different from CNN-based models that usually apply pooling operations with a small sliding window ( e.g. , 2× 2 ) , point cloud classification models leverage such fixed pooling operations to aggregate features from a large number of candidates ( e.g. , 1024 ) . We find that those fixed pooling operations inherently lack flexibility and learnability , which are not appreciated by AT . Moreover , recent research has also presented parametric pooling operations in set learning ( Wang et al. , 2020 ; Zhang et al. , 2020 ) , which also preserve permutation-invariance.We take a step further to systematically analyze point cloud classification models ’ robustness with parametric pooling operations under AT . Experimental results show that the sorting-based pooling design benefits AT well , which vastly outperforms MAX pooling , for instance , in adversarial accuracy by 7.3 % without hurting the nominal accuracy1 . Lastly , based on our experimental insights , we propose DeepSym , a sorting-based pooling operation that employs deep learnable layers , to architecturally advance the adversarial robustness of point cloud classification models under AT . Experimental results show that DeepSym reaches the best adversarial accuracy in all chosen backbones , which on average , is a 10.8 % improvement compared to the default architectures . We also explore the limits of DeepSym based on PointNet due to its broad adoption ( Guo et al. , 2020 ) . We obtain the best robustness on ModelNet40 , which achieves the adversarial accuracy of 47.0 % , significantly outperforming the default MAX pooling design by 28.5 % ( ∼ 2.6× ) . In addition , we demonstrate that PointNet with DeepSym also reaches the best adversarial accuracy of 45.2 % under the most efficient AT on ModelNet10 ( Wu et al. , 2015 ) , exceeding MAX pooling by 17.9 % ( ∼ 1.7× ) . 2 BACKGROUND AND RELATED WORK . 3D point cloud classification . Early works attempt to classify point clouds by adapting deep learning models in the 2D space ( Su et al. , 2015 ; Yu et al. , 2018b ) . DeepSets ( Zaheer et al. , 2017 ) and PointNet ( Qi et al. , 2017a ) are the first to achieve end-to-end learning on point cloud classification and formulate a general specification ( Figure 2 ) for point cloud learning . PointNet++ ( Qi et al. , 2017b ) and DGCNN ( Wang et al. , 2019 ) build upon PointNet set abstraction to better learn local features . Lately , DSS ( Maron et al. , 2020 ) generalizes DeepSets to enable complex functions in set learning . Besides , ModelNet40 ( Wu et al. , 2015 ) is the most popular dataset for benchmarking point cloud classification , which consists of 12,311 CAD models belonging to 40 categories . The numerical range of the point cloud data is normalized to [ −1 , 1 ] in ModelNet40 . Adversarial attacks and defenses on point clouds . Xiang et al . ( 2019 ) perform the first study to extend C & W attack ( Carlini & Wagner , 2017 ) to point cloud classification . Wen et al . ( 2019 ) improve the loss function in C & W attack to realize attacks with smaller perturbations and Hamdi et al . ( 2019 ) present black-box attacks on point cloud classification . Recently , Zhou et al . ( 2019 ) and Dong et al . ( 2020a ) propose to defend against adversarial point clouds by input transformation and adversarial detection . Besides , Liu et al . ( 2019 ) conduct a preliminary investigation on extending countermeasures in the 2D space to defend against simple attacks like FGSM ( Goodfellow et al. , 2014 ) on point cloud data . In this work , we first design adaptive attacks to break existing defenses and analyze the adversarial robustness of point cloud classification under adversarial training . 3 BREAKING THE ROBUSTNESS OF EXISTING DEFENSES . 3.1 ADAPTIVE ATTACKS ON DUP-NET . DUP-Net ( ICCV ’ 19 ) presents a denoiser layer and upsampler network structure to defend against adversarial point cloud classification . The denoiser layer g : X → X′ leverages kNN ( k-nearest 1In this paper , we use nominal and adversarial accuracy to denote the model ’ s accuracy on clean and adversarially perturbed data , respectively . neighbour ) for outlier removal . Specifically , the kNN of each point xi in point cloud X is defined as knn ( xi , k ) so that the average distance di of each point xi to its kNN is denoted as : di = 1 k ∑ xj∈knn ( xi , k ) ||xi − xj ||2 , i = { 1 , 2 , . . . , n } ( 1 ) where n is the number of points . The mean µ = 1n ∑n i=1 di and standard deviation σ =√ 1 n ∑n i=1 ( di − µ ) 2 of all these distances are computed to determine a distance threshold as µ+α·σ to trim the point clouds , where α is a hyper-parameter . As a result , the denoised point cloud is represented as X′ = { xi | di < µ + α · σ } . The denoised point cloud X′ will be further fed into PU-Net ( Yu et al. , 2018a ) , defined as p : X′ → X′′ , to upsample X′ to a fixed number of points . Combined with the classifier f , the integrated DUP-Net can be noted as ( f ◦ p ◦ g ) ( X ) . The hypothesis is that the denoiser layer will eliminate the adversarial perturbations and the upsampler network will re-project the denoised off-manifold point cloud to the natural manifold . Analysis . The upsampler network p ( i.e. , PU-Net ) is differentiable and can be integrated with the classification network f . Therefore , f ◦ p is clearly vulnerable to gradient-based adaptive attacks . Although the denoiser layer g is not differentiable , it can be treated as deterministic masking : M ( xi ) = 1di < µ+α·σ so that the gradients can still flow through the masked points . By involving M ( xi ) into the iterative optimization process : ∇xi ( f ◦p◦g ) ( X ) |xi=x̂ ≈ ∇xi ( f ◦p ) ( X ) |xi=x̂·M ( x̂ ) , similar to BPDA ( Athalye et al. , 2018 ) , attackers may still find adversarial examples . Experimentation . We leverage the open-sourced codebase2 of DUP-Net for experimentation . Specifically , a PointNet ( Qi et al. , 2017a ) trained on ModelNet40 is used as the target classifier f . For the PU-Net , the upsampled number of points is 2048 , and the upsampling ratio is 2 . For the adaptive attacks , we exploit targeted L2 norm-based C & W attack and untargeted L∞ norm-based PGD attack with 200 iterations ( PGD-200 ) . Detailed setups are elaborated in Appendix A.1 . Discussion . As shown in Table 1 , adaptive C & W attacks achieve 100 % success rates on DUP-Net . Though the mean distance of adversarial examples targeting DUP-Net is larger than those targeting PU-Net , they are almost indistinguishable by human perception , as visualized in Appendix A.2 . We find that naı̈ve PGD attacks are also effective since the upsampler network is sensitive to L∞ norm-based perturbations . The design of DUP-Net is similar to ME-Net ( Yang et al. , 2019 ) in the 2D space , which recently has been shown vulnerable to adaptive attacks ( Tramer et al. , 2020 ) . We hereby demonstrate that such input transformation-based defenses can not offer real robustness to point cloud classification , either . 3.2 ADAPTIVE ATTACKS ON GVG-POINTNET++ . GvG-PointNet++ ( CVPR ’ 20 ) introduces gather vectors in the 3D point clouds as an adversarial indicator . The original PointNet++ aggregates local features fi hierarchically to make final classification . Gather vectors vi are learned from local features fi to indicate the global center ci of a point cloud sample . If the indicated global center ci is far away from the ground-truth global center cg , the corresponding local feature fi will be masked out : ci = xci + vi ; Mi = 1||cg−ci|| < r ; Fg = { fi · Mi } ( 2 ) 2https : //github.com/RyanHangZhou/DUP-Net where xci is the geometry center of the local point set , r is the distance threshold to mask the local feature , and Fg is the cleaned feature set for final classification . To train GvG-PointNet++ , it is necessary to optimize a surrogate loss to correctly learn the gather vectors besides the cross-entropy ( xent ) loss : Ltotal = Lxent + λ · Lgather , Lgather = n′∑ i=1 ||ci − cg||1 ( 3 ) where n′ is the number of local features and λ is a hyper-parameter . Thus , GvG-PointNet++ essentially applies self-attention to the local features and relies on it for robustness enhancement . Analysis . Dong et al . ( 2020a ) evaluate white-box adversaries on GvG-PointNet++ with naı̈ve L2 norm-based PGD attacks . Specifically , only Lxent is utilized in the adversarial optimization process so that the maskingMi will hinder the gradient propagation . However , sinceMi is learned from the network itself , it is highly possible to further break this obfuscation with Lgather considered . The adaptive attack can be then formulated as an optimization problem with the loss function : Ladv = Lxent − β · Lgather ( 4 ) where β is a hyper-parameter . By maximizing Ladv with L2 norm-based PGD attacks , adversaries strive to enlarge the adversarial effect but also minimize the perturbations on gather vectors . We also find that GvG-PointNet++ is by design vulnerable to PGD attacks on Lgather as such perturbations will potentially affect most gather vector predictions to make gi masked out so that insufficient for final classification . Experimentation . We train GvG-PointNet++ based on single-scale grouped PointNet++ ( Qi et al. , 2017b ) on ModelNet40 and set r = 0.08 and λ = 1 as suggested by Dong et al . ( 2020a ) . The model is trained by Adam ( Kingma & Ba , 2014 ) optimizer with 250 epochs using batch size 16 , and the initial learning rate is 0.01 . For the adaptive attack , we use 10-step binary search to find a appropriate β . The setup of L2 norm-based PGD attacks is identical to Dong et al . ( 2020a ) , and we also leverage L∞ norm-based PGD-200 in the evaluation . Detailed setups are elaborated in Appendix A.1 . Discussion . As shown in Table 2 , both adaptive PGD attacks achieve high success rates on GvGPointNet++ . we also observe that the L∞ norm-based PGD attack is more effective on Lgather since L∞ norm perturbations assign the same adversarial budget to each point , which can easily impact a large number of gather vector predictions . However , it is hard for the L2 norm-based PGD attack to influence so many gather vector predictions because it prefers to perturb key points rather than the whole point set . GvG-PointNet++ leverages DNN to detect adversarial perturbations , which is similar to MagNet ( Meng & Chen , 2017 ) in the 2D space . We validate that adversarial detection also fails to provide real robustness under adaptive white-box adversaries in point cloud classification .
The paper addresses the problem of adversarial robustness in 3D point cloud representations. It claims that two of the previous defense designs do not prevent adaptive attacks. The authors then propose to use adversarial training (AT) to improve the robustness. It claims that the standard MAX pooling operation within PointNet-derivates contribute to the weaknesses. It then proposes a new pooling operation that improves the robustness under AT.
SP:22bf1d0b48da000c80613747d59bc93c1270064e
Distantly supervised end-to-end medical entity extraction from electronic health records with human-level quality
1 INTRODUCTION . Wide adoption of electronic health records ( EHR ) in the medical care industry has led to accumulation of large volumes of medical data ( Pathak et al. , 2013 ) . This data contains information about the symptoms , syndromes , diseases , lab results , patient treatments and presents an important source of data for building various medical systems ( Birkhead et al. , 2015 ) . Information extracted from medical records is used for clinical support systems ( CSS ) ( Shao et al. , 2016 ) ( Topaz et al. , 2016 ) ( Zhang et al. , 2014 ) , lethality estimation ( Jo et al. , 2015 ) ( Luo & Rumshisky , 2016 ) , drug side-effects discovery ( LePendu et al. , 2012 ) ( Li et al. , 2014 ) ( Wang et al. , 2009 ) , selection of patients for clinical and epidemiological studies ( Mathias et al. , 2012 ) ( Kaelber et al. , 2012 ) ( Manion et al. , 2012 ) , medical knowledge discovery ( Hanauer et al. , 2014 ) ( Jensen et al. , 2012 ) and personalized medicine ( Yu et al. , 2019 ) . Large volumes of medical text data and multiple applicable tasks determine the importance of accurate and efficient information extraction from EHR . Information extraction from electronic health records is a difficult natural language processing task . EHR present a heterogeneous dynamic combination of structured , semi-structured and unstructured texts . Such records contain patients ’ complaints , anamneses , demographic data , lab results , instrumental results , diagnoses , drugs , dosages , medical procedures and other information contained in medical records ( Wilcox , 2015 ) . Electronic health records are characterised by several linguistic phenomena making them harder to process . • Rich special terminology , complex and volatile sentence structure . • Often missing term parts and punctuation . • Many abbreviations , special symbols and punctuation marks . • Context-dependant terms and large number of synonims . • Multi-word terms , fragmented and non-contiguous terms . From practical point of view the task of medical information extraction splits into entity extraction and relation extraction . We focus on medical entity extraction in this work . In the case of medical texts such entities represent symptoms , diagnoses , drug names etc . Entity extraction , also referred as Concept Extraction is a task of extracting from free text a list of concepts or entities present . Often this task is combined with finding boundaries of extracted entities as an intermediate step . Medical entity extraction in practice divides into two sequential tasks : Named entity recognition ( NER ) and Named entity normalization ( NEN ) . During NER sequences of tokens that contain entities are selected from original text . During NEN each sequence is linked with specific concepts from knowledge base ( KB ) . We used Unified Medical Language System ( UMLS ) KB ( Bodenreider , 2004 ) as the source of medical entities in this paper . In this paper we make the following contributions . First , we show that a single transformer model ( Devlin et al. , 2018 ) is able to perform NER and NEN for electronic health records simultaneously by using the representation of EHR for a single multi-label classification task . Second , we show that provided a large enough number of examples such model can be trained using only automatically assigned labels from KB to generalize to unseen and difficult cases . Finally , we empirically estimate the number of examples needed to achieve human-quality medical entity extraction using such distantly-supervised setup . 2 RELATED WORK . First systems for named entity extraction from medical texts combined NER and NEN using term vocabularies and heuristic rules . One of the first such systems was the Linguistic String Project - Medical Language Processor , described in Sager et al . ( 1986 ) . Columbia University developed Medical Language Extraction and Encoding System ( MedLEE ) , using rule-based models at first and subsequently adding feature-based models ( Friedman , 1997 ) . Since 2000 the National Library of Medicine of USA develops the MetaMap system , based mainly on rule-based approaches ( Aronson et al. , 2000 ) . Rule-based approaches depend heavily on volume and fullness of dictionaries and number of applied rules . These systems are also very brittle in the sense that their quality drops sharply when applied to texts from new subdomains or new institutions . Entity extraction in general falls into three broad categories : rule-based , feature-based and deeplearning ( DL ) based . Deep learning models consist of context encoder and tag decoder . The context encoder applies a DL model to produce a sequence of contextualized token representation used as input for tag decoder which assign entity class for each token in sequence . For a comprehensive survey see ( Li et al. , 2020 ) . In most entity extraction systems the EE task is explicitly ( or for some DL models implicitly ) separated into NER an NEN tasks . Feature-based approaches solve the NER task as a sequence markup problem by applying such feature-based models as Hidden Markov Models ( Okanohara et al. , 2006 ) and Conditional Random Fields ( Lu et al. , 2015 ) . The downside of such models is the requirement of extensive feature engineering . Another method for NER is to use DL models ( Ma & Hovy , 2016 ) ( Lample et al. , 2016 ) . This models not only select text spans containing named entities but also extract quality entity representations which can be used as input for NEN . For example in ( Ma & Hovy , 2016 ) authors combine DL bidirectional long short-term memory network and conditional random fields . Main approaches for NEN task are : rule-based ( D ’ Souza & Ng , 2015 ) ( Kang et al. , 2013 ) , featurebased ( Xu et al. , 2017a ) ( Leaman et al. , 2013 ) and DL methods ( Li et al. , 2017a ) ( Luo et al. , 2018b ) and their different combinations ( Luo et al. , 2018a ) . Among DL approaches a popular way is to use distance metrics between entity representations ( Ghiasvand & Kate , 2014 ) or ranking metrics ( Xu et al. , 2017a ) ( Leaman et al. , 2013 ) . In addition to ranking tasks DL models are used to create contextualized and more representative term embeddings . This is done with a wide range of models : Word2Vec ( Mikolov et al. , 2013 ) , ELMo ( Peters et al. , 2018 ) , GPT ( Radford et al. , 2018 ) , BERT ( Devlin et al. , 2018 ) . The majority of approaches combine several DL models to extract contextaware representations which are used for ranking or classification using a dictionary of reference entity representations ( Ji et al. , 2020 ) . The majority of modern medical EE systems sequentially apply NER and NEN . Considering that NER and NEN models themselves are often multistage the full EE systems are often complex combinations of multiple ML and DL models . Such models are hard to train end-to-end and if the NER task fails the whole system fails . This can be partially mitigated by simultaneous training of NER and NEN components . In ( Durrett & Klein , 2014 ) a CRF model is used to train NER and NEN simultaneously . In Le et al . ( 2015 ) proposed a model that merged NER and NEN at prediction time , but not during training . In Leaman & Lu ( 2016 ) proposed semi-Markov Models architecture that merged NER and NEN both at training and inference time . Even with such merging of NER and NEN both tasks were present in the pipeline which proves problematic in difficult cases with multi-word entities or single entities with non-relevant text insertions . A number of deep-learning EE models ( Strubell et al. , 2017 ) , ( Li et al. , 2017b ) , ( Xu et al. , 2017b ) , ( Devlin et al. , 2018 ) , ( Cui & Zhang , 2019 ) do not split the EE task into NER and NEN implicitly and use a single linear classification layer over token representations as the tag decoder . Our model is mostly identical to the model described in ( Devlin et al. , 2018 ) with the difference that instead of using a contexualized representation of each token to classify it as an entity we use the representation of the whole text to extract all entities present in the text at once . Supervised training of EE systems requires large amount of annotated data , this is especially challenging for domain-specific EE where domain-expert annotations is costly and/or slow to obtain . To avoid the need of hand-annotated data various weakly-supervised methods were developed . A particular instance of weak annotation is distant annotation which relies on external knowledge base to automatically label texts with entities from KB ( Mintz et al. , 2009 ) , ( Ritter et al. , 2013 ) , ( Shang et al. , 2018 ) . Distant supervision can been applied to automatically label training data , and has gained successes in various natural language processing tasks , including entity recognition ( Ren et al. , 2015 ) , ( Fries et al. , 2017 ) , ( He , 2017 ) . We use distant annotation in this paper to label our train and test datasets . 3 DATA . 3.1 ELECTRONIC HEALTH RECORDS DATASETS . In this work we used two proprietary Russian language EHR datasets , containing anonymized information . First one contains information about 2,248,359 visits of 429,478 patients to two networks of private clinics from 2005 to 2019 . This dataset does not contain hospital records and was used for training the model . The second dataset was used for testing purposes and comes from a regional network of public clinics and hospitals . Testing dataset contains 1,728,259 visits from 2014 to 2019 of 694,063 patients . 3.2 MEDICAL KNOWLEDGE BASE . We used UMLS as our medical KB and a source of medical entity dictionary for this paper . A subset of UMLS , Medical Dictionary for Regulatory Activities ( MedDRA ) was used to obtain translation of terms to Russian language . After merging the synonymous terms we selected 10000 medical entities which appeared most frequently in our training dataset . To find the terms we used a distantly supervised labelling procedure as described in next section . To increase the stability of presented results we decided to keep only terms that appear at least 10 times in the test dataset reducing the total number of entities to 4434 . Medical terms were grouped according to UMLS taxonomy , statistics for group distribution are shown in Table 1 . 3.3 DISTANT SUPERVISION LABELING . Combining an EHR dataset and a list of terms from medical KB we used a simple rule-based model for train and test datasets labeling . The exact procedure for each record was as follows : • Input text was transformed to lower case , all known abbreviations where expanded , and all words were lemmatized using pymorphy2 ( Korobov , 2015 ) • We selected all possible candidates using sliding window with lengths from 1 to 7 words • All possible candidates where compared to all possible synonims of medical entities • Exact matches between candidate and medical terms from KB where considered to be positive cases . 4 MODEL . In this paper we used a RuBERT model pretrained on general russian texts ( Kuratov & Arkhipov , 2019 ) and further pretrained on electronic health records . A linear classification layer with 10000 outputs was added as the last model layer ( Fig 1. ) . This layer was initialized with weights from normal distribution with mean=-0,1 and std=0,11 to have at the start of training a low prediction probability for all classes . We trained our model with binary crossentropy loss and Adam optimizer ( Kingma & Ba , 2014 ) with learning rate 0.00001 making one pass over training dataset with training batches of size 20 . To speed up training we used dynamic class weightings , classes not present in the current batch were given less weight compared to classes present . Model architecture is shown on Figure 1 .
This paper proposes a method to do medical entity extraction from HER data by fine-tuning a transformer model pretrained on a large EHR dataset. The model combines a two-step process of NER and NEN into a single step on a multi-label classification task by distantly supervised training. The main contribution of this paper is to exploit a single transformer model to perform NER and NEN for HER data simultaneously by using the representation of EHR for a single multi-label classification task. Empirical studies are performed to show the expected recall.
SP:1dff36cb48bfef13cafeed2e263fa0fd9c85ab08
Why Does Decentralized Training Outperform Synchronous Training In The Large Batch Setting?
1 INTRODUCTION . Deep Learning ( DL ) has revolutionized AI training across application domains : Computer Vision ( CV ) ( Krizhevsky et al. , 2012 ; He et al. , 2015 ) , Natural Language Processing ( NLP ) ( Vaswani et al. , 2017 ) , and Automatic Speech Recognition ( ASR ) ( Hinton et al. , 2012 ) . Stochastic Gradient Descent ( SGD ) is the fundamental optimization method used in DL training . Due to massive computational requirements , Distributed Deep Learning ( DDL ) is the preferred mechanism to train large scale Deep Learning ( DL ) tasks . In the early days , Parameter Server ( PS ) based Asynchronous SGD ( ASGD ) training was the preferred DDL approach ( Dean et al. , 2012 ; Li et al. , 2014 ) as it did not require strict system-wide synchronization . Recently , ASGD has lost popularity due to its unpredictability and often inferior convergence behavior ( Zhang et al. , 2016b ) . Practitioners now favor deploying Synchronous SGD ( SSGD ) on homogeneous High Performance Computing ( HPC ) systems . The degree of parallelism in a DDL system is dictated by batch size : the larger the batch size , the more parallelism and higher speedup can be expected . However , large batches require a larger learning rate and overall they may negatively affect model accuracy because 1 ) large batch training usually converges to sharp minima which do not generalize well ( Keskar et al. , 2016 ) and 2 ) large learning rates may violate the conditions ( i.e. , the smoothness parameter ) required for convergence in nonconvex optimization theory ( Ghadimi & Lan , 2013 ) . Although training longer with large batches could lead to better generalization ( Hoffer et al. , 2017 ) , doing so gives up some or all of the speedup we seek . Through meticulous hyper-parameter design ( e.g. , learning rate ) tailored to each specific task , SSGD-based DDL systems have enabled large batch training and shortened training time for some challenging CV tasks ( Goyal et al. , 2017 ; You et al. , 2017 ) and NLP tasks ( You et al. , 2019 ) from weeks to hours or less . However , it is observed that SSGD with large batch size leads to large training loss and inferior model quality for ASR tasks ( Zhang et al. , 2019b ) , as illustrated in Figure 1a ( red curve ) . In this paper we found for other types of tasks ( e.g . CV ) and DL models , large batch SSGD has the same problem ( Figure 1b and Figure 1c ) . The cause of this problem could be that training gets trapped at saddle points since large batches reduce the magnitude of noise in the stochastic gradient and prevent the algorithm from exploring the whole parameter space . To solve this problem , one may add isotropic noise ( e.g. , spherical Gaussian ) to help SSGD escape from saddle points ( Ge et al. , 2015 ) . However , this is not a good solution for high-dimensional DL training as shown in the blue curves of Figure 1 . One possible reason is that the complexity of escaping a saddle point by adding isotropic noise has a polynomial dependency on the dimension of the parameter space , so adding such noise in a high dimensional space ( such as deep learning ) does not bring significant benefits . In this paper , we have found that Decentralized Parallel SGD ( DPSGD ) ( Lian et al. , 2017b ) greatly improves large batch training performance , as illustrated in the green curves in Figure 1 . Unlike SSGD , where each learner updates its weights by taking a global average of all learners ’ weights , DPSGD updates each learner ’ s weights by taking a partial average ( i.e. , across a subset of neighboring learners ) . Therefore , in DPSGD , each learner ’ s weights differ from the weights of other learners.1 The key difference among SSGD , SSGD with Gaussian noise 2 and DPSGD is the source of noise during the update , and this noise directly affects performance in deep learning . This naturally motivates us to study Why decentralized training outperform synchronous training in the large batch setting ? More specifically , we try to understand whether their performance difference is caused by their different noise . We answer these questions from both theoretical and empirical perspectives . Our contributions are : • We analyze the dynamics of DDL algorithms , including both SSGD and DPSGD . We show , both theoretically and empirically , that the intrinsic noise in DPSGD can 1 ) reduce the effective learning rate when the gradient is large to help convergence ; 2 ) enhance the search in weight space for flat minima with better generalization . • We conduct extensive empirical studies of 12 CV and ASR tasks with state-of-the-art CNN and LSTM models . Our experimental results demonstrate that DPSGD consistently outperforms SSGD , across application domains and Neural Network ( NN ) architectures in the large batch setting , without any hyper-parameter tuning . To the best of our knowledge , we are unaware of any generic algorithm that can improve SSGD large batch training on this many models/tasks . The remainder of this paper is organized as follows . Section 2 details the problem formulation and learning dynamics analysis of SSGD , SSGD+Gaussian , and DPSGD ; Section 3 and Section 4 detail the empirical results ; and Section 5 concludes the paper . 2 ANALYSIS OF STOCHASTIC LEARNING DYNAMICS AND EFFECTS OF LANDSCAPE-DEPENDENT NOISE . We first formulate the dynamics of an SGD based learning algorithm with multiple ( n > 1 ) learners indexed by j = 1 , 2 , 3 , ... n following the same theoretical framework established for a single learner ( Chaudhari & Soatto , 2018 ) . At each given time ( iteration ) t , each learner has its own weight vector ~wj ( t ) , and the average weight vector ~wa ( t ) is defined as : ~wa ( t ) ⌘ n 1 Pn j=1 ~wj ( t ) . 1The detailed DPSGD algorithm and its learning dynamics are described in Section 2 . 2We use the terms ” SSGD with Gaussian noise ” and `` SSGD⇤ '' interchangeably in this paper . Each learner j updates its weight vector according to the cross-entropy loss function Lµj ( t ) ( ~w ) for minibatch µj ( t ) that is assigned to it at time t. The size of the local minibatch is B , and the overall batch size for all learners is nB . Two multi-learner algorithms are described below . ( 1 ) Synchronous Stochastic Gradient Descent ( SSGD ) : In the synchronous algorithm , the learner j 2 [ 1 , n ] starts from the average weight vector ~wa and moves along the gradient of its local loss function Lµj ( t ) evaluated at the average weight ~wa : ~wj ( t+ 1 ) = ~wa ( t ) ↵rLµj ( t ) ( ~wa ( t ) ) , ( 1 ) where ↵ is the learning rate . ( 2 ) Decentralized Parallel SGD ( DPSGD ) : In the DPSGD algorithm ( Lian et al. , 2017a ) , learner j computes the gradient at its own local weight ~wj ( t ) . The learning dynamics follows : ~wj ( t+ 1 ) = ~ws , j ( t ) ↵rLµj ( t ) ( ~wj ( t ) ) . ( 2 ) where ~ws , j ( t ) is the starting weight set to be the average weight of a subset of “ neighboring '' learners of learner-j , which corresponds to the non-zero entries in the mixing matrix defined in ( Lian et al. , 2017a ) ( note that ~ws , j = ~wa if all learners are included as neighbors ) . By averaging over all learners , the learning dynamics for the average weight ~wa for both SSGD and DPSGD can be written formally the same way as : ~wa ( t + 1 ) = ~wa ( t ) ↵~ga , where ~ga = n 1 Pn j=1 ~gj is the average gradient and ~gj is the gradient from learner-j . The difference between SSGD and DPSGD is the weight at which ~gj is computed : ~gj ⌘ rLµj ( t ) ( ~wa ( t ) ) is computed at ~wa for SSGD ; ~gj ⌘ rLµj ( t ) ( ~wj ( t ) ) is computed at ~wj for DPSGD . By projecting the weight displacement vector ~wa ⌘ ↵~ga onto the direction of the gradient ~g ⌘ rL ( ~wa ) of the overall loss function L at ~wa , we can write the learning dynamics as : ~wa ( t+ 1 ) = ~wa ( t ) ↵e~g + ~⌘ , ( 3 ) where ↵e ⌘ ↵~ga · ~g/||~g||2 is an effective learning rate and ~⌘ = ↵~ga + ↵e~g is the noise term that describes the stochastic weight dynamics in directions orthogonal to ~g . The noise term has zero mean h~⌘iµ = 0 and its strength is characterized by its variance ( t ) ⌘ ||~⌘||2 . and ↵e are related by the equality : ↵2e||~g||2 + = ↵2||~ga||2 , which indicates that a higher noise strength leads to a lower effective learning rate ↵e . The noise strength ( and hence ↵e ) is different in SSGD and DPSGD . The DPSGD noise DP is larger than the SSGD noise S by an additional noise ( 2 ) ( > 0 ) that originates from the difference of local weights ( ~wj ) from their mean ( ~wa ) : DP = S + ( 2 ) , see Appendix B for details . By expanding ( 2 ) w.r.t . ~wj ⌘ ~wj ~wa , we obtain the average ( 2 ) over minibatch ensemble { µ } : h ( 2 ) iµ ⌘ ↵2h||n 1 nX j=1 [ rLµj ( ~wj ) rLµj ( ~wa ) ] ||2iµ ⇡ ↵2 X k , l , l0 HklHkl0Cll0 , ( 4 ) where Hkl = r2klL is the Hessian matrix of the loss function and Cll0 = n 2 Pn j=1 wj , l wj , l0 is the weight covariance matrix . It is clear that ( 2 ) depends on the loss landscape – it is larger in rough landscapes and smaller in flat landscapes . It is important to stress that the noise ~⌘ in Eq.3 is not an artificially added noise . It is intrinsic to the use of minibatches ( random subsampling ) in SGD-based algorithms and is enhanced by the difference among different learners in DPSGD . The noise strength varies in weight space via its dependence on the loss landscape , as explicitly shown in Eq.4 . However , besides its landscape dependence , SGD noise also depends inversely on the minibatch size B ( Chaudhari & Soatto , 2018 ) . With n synchronized learners , the noise in SSGD scales as 1/ ( nB ) , which is too small to be effective for a large batch size nB . A main finding of our paper is that the additional landscape-dependent noise ( 2 ) in DPSGD can make up for the small SSGD noise when nB is large and help enhance convergence and generalization in the large batch setting . In the following , we investigate the effects of this landscape-dependent noise for SSGD and DPSGD using the MNIST dataset where each learner is a fully connected network with two hidden layers ( 50 units per layer ) . We focus on the large batch setting using nB = 2000 in the experiments .
This paper claims that decentralized parallel SGD (DPSGD) performs better than synchronous SGD (SSGD) and noisy version of synchronous SGD (SSGD*) in large batch setting. Theoretically, it shows that the noise in DPSGD is landscape-dependent, which may help generalization. Experimental results on CV and ASR tasks show that DPSGD can outperform baselines when batch size is very large. Meanwhile, DPSGD is observed to adaptively adjust the effective learning rate and converge to flatter minima.
SP:efd742fa15a8751c1b97e553bb6259944b2be339
Black-Box Optimization Revisited: Improving Algorithm Selection Wizards through Massive Benchmarking
1 INTRODUCTION : STATE OF THE ART . Many real-world optimization challenges are black-box problems ; i.e. , instead of having an explicit problem formulation , they can only be accessed through the evaluation of solution candidates . These evaluations often require simulations or even physical experiments . Black-box optimization methods are particularly widespread in machine learning ( Salimans et al. , 2016 ; Wang et al. , 2020 ) , to the point that it is considered a key research area of artificial intelligence . Black-box optimization algorithms are typically easy to implement and easy to adjust to different problem types . To achieve peak performance , however , proper algorithm selection and configuration are key , since black-box optimization algorithms have complementary strengths and weaknesses ( Rice , 1976 ; Smith-Miles , 2009 ; Kotthoff , 2014 ; Bischl et al. , 2016 ; Kerschke & Trautmann , 2018 ; Kerschke et al. , 2018 ) . But whereas automated algorithm selection has become standard in SAT solving ( Xu et al. , 2008 ) and AI planning ( Vallati et al. , 2015 ) , a manual selection and configuration of the algorithms is still predominant in the broader black-box optimization context . To reduce the bias inherent to such manual choices , and to support the automation of algorithm selection and configuration , sound comparisons of the different black-box optimization approaches are needed . Existing benchmarking suites , however , are rather selective in the problems they cover . This leads to specialized algorithm frameworks whose performance suffer from poor generalizability . Addressing this flaw in black-box optimization , we present a unified benchmark collection which covers a previously unseen breadth of problem instances . We use this collection to develop a high-performing algorithm selection wizard , ABBO . ABBO uses high-level problem characteristics to select one or several algorithms , which are run for the allocated budget of function evaluations . Originally derived from a subset of the available benchmark collection , in particular YABBOB , the excellent performance of ABBO generalizes across almost all settings of our broad benchmark suite . Implemented as a fork of Nevergrad ( Rapin & Teytaud , 2018 ) , the benchmark collection , the ABBO wizard , the base solvers , and all performance data are open source . The algorithms are automatically rerun at certain time intervals and all Algorithm 1 High-level overview of ABBO . Selection rules are followed in this order , first match applied . d = dimension , budget b = number of evaluations . Details in ( Anonymous , 2020 ) . Case Choice Discrete decision variables only Noisy optimization with categorical variables Genetic algorithm mixed with bandits ( Heidrich-Meisner & Igel , 2009 ; Liu et al. , 2020 ) . alphabets of size < 5 , sequential evaluations ( 1 + 1 ) -Evolutionary Alg . with linearly decreasing stepsize alphabets of size < 5 , parallel case Adaptive ( 1 + 1 ) -Evolutionary Alg . ( Doerr et al. , 2019 ) . Other discrete cases with finite alphabets Convert to the continuous case using SoftMax as in ( Liu et al. , 2020 ) and apply CMandAS2 ( Rapin et al. , 2019 ) Presence of infinite discrete domains FastGA ( Doerr et al. , 2017 ) Numerical decision variables only , evaluations are subject to noise d > 100 progressive optimization as in ( Berthier , 2016 ) . d ≤ 30 TBPSA ( Hellwig & Beyer , 2016 ) b > 100 sequential quadratic programming Other cases TBPSA ( Hellwig & Beyer , 2016 ) Numerical decision variables only , high degree of parallelism Parallelism > b/2 or b < d MetaTuneRecentering ( Meunier et al. , 2020 ) Parallelism > b/5 , d < 5 , and b < 100 DiagonalCMA-ES ( Ros & Hansen , 2008 ) Parallelism > b/5 , d < 5 , and b < 500 Chaining of DiagonalCMA-ES ( 100 asks ) , then CMA-ES+metamodel ( Auger et al. , 2005 ) Parallelism > b/5 , other cases NaiveTBPSA as in ( Cauwet & Teytaud , 2020 ) Numerical decision variables only , sequential evaluations b > 6000 and d > 7 Chaining of CMA-ES and Powell , half budget each . b < 30d and d > 30 ( 1 + 1 ) -Evol . Strategy w/ 1/5-th rule ( Rechenberg , 1973 ) d < 5 and b < 30d CMA-ES + meta-model ( Auger et al. , 2005 ) b < 30d Cobyla ( Powell , 1994 ) For all other cases and all details , please refer to the source code data is exported to the public dashboard ( Rapin & Teytaud , 2020 ) . For ICLR reviewers , all code is available , thanks to github-anonymizer , at ( Anonymous , 2020 ) . In summary , our contributions are as follows . ( 1 ) OptimSuite Benchmark Collection : OptimSuite combines several contributions that recently led to improved reliability and generalizability of black-box optimization benchmarking , among them LSGO ( Li et al. , 2013 ) , YABBOB ( Hansen et al. , 2009 ; Liu et al. , 2020 ; Anonymous , 2020 ) , Pyomo ( Hart et al. , 2017 ; Anonymous , 2020 ) , MLDA ( Gallagher & Saleem , 2018 ) , and MuJoCo ( Todorov et al. , 2012 ; Mania et al. , 2018 ) , and others ( novelty discussed in Section 2 ) . ( 2 ) Algorithm Selection Wizard ABBO : Our algorithm selection technique , ABBO , can be seen as an extension of the Shiwa wizard presented in ( Liu et al. , 2020 ) . It uses three types of selection techniques : passive algorithm selection ( choosing an algorithm as a function of a priori available features ( Baskiotis & Sebag , 2004 ; Liu et al. , 2020 ) ) , active algorithm selection ( a bet-and-run strategy which runs several algorithms for some time and stops all but the strongest ( Mersmann et al. , 2011 ; Pitzer & Affenzeller , 2012 ; Fischetti & Monaci , 2014 ; Malan & Engelbrecht , 2013 ; Muñoz Acosta et al. , 2015 ; Cauwet et al. , 2016 ; Kerschke et al. , 2018 ) ) , and chaining ( running several algorithms in turn , in an a priori defined order ( Molina et al. , 2009 ) ) . Our wizard combines , among others , algorithms suggested in ( Virtanen et al. , 2019 ; Hansen & Ostermeier , 2003 ; Storn & Price , 1997 ; Powell , 1964 ; 1994 ; Liu et al. , 2020 ; Hellwig & Beyer , 2016 ; Artelys , 2015 ; Doerr et al. , 2017 ; 2019 ; Dang & Lehre , 2016 ) . Another core contribution of our work is a sound comparison of our wizard to Shiwa , and to the long list of algorithms available in Nevergrad . 2 SOUND BLACK-BOX OPTIMIZATION BENCHMARKING . We summarize desirable features and common shortcomings of black-box optimization benchmarks and discuss how OptimSuite addresses these . Generalization . The most obvious issue in terms of generalization is the statistical one : we need sufficiently many experiments for conducting valid statistical tests and for evaluating the robustness of algorithms ’ performance . This , however , is probably not the main issue . A biased benchmark , excluding large parts of the industrial needs , leads to biased conclusions , no matter how many experiments we perform . Inspired by ( Recht et al. , 2018 ) in the case of image classification , and similar to the spirit of cross-validation for supervised learning , we use a much broader collection of benchmark problems for evaluating algorithms in an unbiased manner . Another subtle issue in terms of generalization is the case of instance-based choices of ( hyper- ) parameters : an experimenter modifying the algorithm or its parameters specifically for each instance can easily improve results by a vast margin . In this paper , we consider that only the following problem properties are known in advance ( and can hence be used for algorithm selection and configuration ) : the dimension of the domain , the type and range of each variable , their order , the presence of noise ( but not its intensity ) , the budget , the degree of parallelism ( i.e. , number of solution candidates that can be evaluated simultaneously ) . To mitigate the common risk of over-tuning , we evaluate algorithms on a broad range of problems , from academic benchmark problems to real-world applications . Each algorithm runs on all benchmarks without any change or task-specific tuning . Use the ask , tell , and recommend pattern . Formalizing the concept of numerical optimization is typically made through the formalism of oracles or parallel oracles ( Rogers , 1987 ) . A recent trend is the adoption of the ask-and-tell format ( Collette et al. , 2010 ) . The bandit literature pointed out that we should distinguish ask , tell , and recommend : the way we choose a point for gathering more information is not necessarily close to the way we choose an approximation of the optimum ( Bubeck et al. , 2011 ; Coulom , 2012b ; Decock & Teytaud , 2013 ) . We adopt the following framework : given an objective function f and an optimizer , for i ∈ { 1 , . . . , T } , do x ← optimizer.ask and optimizer.tell ( x , f ( x ) ) . Then , evaluate the performance with f ( optimizer.recommend ) . The requirement of a recommend method distinct from the ask is critical in noisy optimization . A debate pointed out some shortcomings in the the noisy counterpart of BBOB ( Auger & Hansen , 2009 ) which was assuming that ask = recommend : ( Beyer , 2012a ; b ; Coulom , 2012a ) have shown that in the noisy case , this difference was particularly critical , and a framework should allow algorithms to “ recommend ” differently than they “ ask ” . A related issue is that a run with budget T is not necessarily close to the truncation of a run in budget 10T . Translation-invariance . Zero frequently plays a special role in optimization . For example , complexity penalizations often “ push ” towards zero . In control , numbers far from zero are often more likely to lead to bang-bang solutions ( and therefore extract zero signal , leading to a needle-inthe-haystack optimization situation ) , in particular with neural networks . In one-shot optimization , ( Cauwet et al. , 2019 ; Meunier et al. , 2020 ) have shown how much focusing to the center is a good idea in particular in high-dimension . Our experiments in control confirm that the scale of the optimization search is critical , and explains the misleading results observed in some optimization papers ( Section 4.2 ) . In artificial experiments , several classical test functions have their optimum in zero . To avoid misleading conclusions , it is now a standard procedure , advocated in particular in ( Hansen et al. , 2009 ) , to randomly translate the objective functions . This is unfortunately not always applied . Rotation and symmetrization . Some optimization methods may perform well on separable objective functions but degrade significantly in optimizing non-separable functions . If the dimension of a separable objective function is d , these methods can reduce the objective function into d onedimensional optimization processes ( Salomon , 1996 ) . Therefore , Hansen et al . ( 2009 ; 2011 ) have insisted that objective functions should be rotated to generate more difficult non-separable objective functions . However , Bousquet et al . ( 2017 ) pointed out the importance of dummy variables , which are not invariant per rotation ; and ( Holland , 1975 ) and more generally the genetic algorithms literature insist that rotation does not always makes sense – we lose some properties of a real-world objective function , and in some real-world scenarios rotating would , e.g. , mix temperature , distance and electric intensity . Permutating the order of variables is also risky , as their order is sometimes critical - k-point crossovers a la Holland ( Holland , 1975 ) typically assume some order of variables , which would be broken . Also , users sometimes rank variables with the most important first – and some optimization methods do take care of this ( Cauwet et al. , 2019 ) . In OptimSuite , we do include rotations , but include both cases , rotated or not . For composite functions which use various objective functions on various subsets of variables , we consider the case with rotations – without excluding the non-rotated case . An extension of symmetrization that we will integrate later in ABBO , which makes sense for replicating an objective function without exact identity , consists in symmetrizing some variables : for example , if the ith variable has range [ a , b ] , we can replace xi by b + a − xi . Applying this on various subsets of variables leads to 2d symmetries of an objective function , if the dimension is d. This variation can reduce the bias toward symmetric search operations ( Li et al. , 2013 ) . Benchmarking in OptimSuite . We summarize in Table 1 some existing benchmark collections and their ( desirable ) properties . We inherit various advantages from Nevergrad , namely the automatic rerun of experiments and reproducibility in one-line . Our fork includes PBT ( a small scale version of Population-Based Training ( Jaderberg et al. , 2017 ) ) , Pyomo ( Hart et al. , 2017 ) , Photonics ( problems related to optical properties and nanometric materials ) , YABBOB and variants , LSGO ( Li et al. , 2013 ) , MLDA ( Gallagher & Saleem , 2018 ) , PowerSystems , FastGames , 007 , Rocket , SimpleTSP , Realworld ( Liu et al. , 2020 ) , MuJoCo ( Todorov et al. , 2012 ) and others including a ( currently small ) benchmark of hyperparameters of Scikit-Learn ( Pedregosa et al. , 2011 ) and Keras-tuning , all of those being visible for review at the above-mentioned anonymized URL ( underlined means : the benchmark is either new , or , in the case of PowerSystems or SimpleTSP , significantly modified compared to previous works , or , in the case of LSGO or MuJoCo , included for the first time inside Nevergrad . For MuJoCo , we believe that interfacing with Nevergrad is particularly useful , to ensure fair comparisons , which rely very much on the precise setup of MuJoCo. . We note that , at present , we do not reproduce the extreme black-box nature of Loshchilov & Glasmachers ( 2017 ) . Still , by integrating such a wide range of benchmarks in a single open source framework , which , in addition , is periodically re-run , we believe that Nevergrad/OptimSuite provides a significant contribution to benchmarking , and this both for the optimization and the machine learning community , where most of the benchmark suites originate from .
The paper proposes a benchmarking suite to overcome the problem low generalizability with black box optimization algorithm. The benchmarking suite consists of standard academic benchmarks to real world optimization problems. It also covers several scenarios such as dynamic-static, small to large-scale, discrete to mixed-integer etc. This is a relevant contribution to the machine learning however there are several drawbacks which pushes back it's acceptance into ICLR.
SP:8ac7287ce4e46fbcfd0b4231d6afab4238e7ca2c
Latent Causal Invariant Model
1 INTRODUCTION . Current data-driven deep learning models , revolutionary in various tasks though , heavily rely on i.i.d data to exploit all types of correlations to fit data well . Among such correlations , there can be spurious ones corresponding to biases ( e.g. , selection or confounding bias due to coincidence of the presence of the third factor ) inherited from the data provided . Such data-dependent spurious correlations can erode the ( i ) interpretability of decision-making , ( ii ) ability of out-of-distribution ( OOD ) generalization , i.e. , extrapolation from observed to new environments , which is crucial especially in safety-critical tasks such as healthcare , and ( iii ) robustness to small perturbation ( Goodfellow et al. , 2014 ) . Recently , there is a Renaissance of causality in machine learning , expected to pursue causal prediction ( Schölkopf , 2019 ) . The so-called “ causality ” is pioneered by Judea Pearl ( Pearl , 2009 ) , as a mathematical formulation of this metaphysical concept grasped in the human mind . The incorporation of a priori about cause and effect endows the model with the ability to identify the causal structure which entails not only the data but also the underlying process of how they are generated . For causal prediction , the old-school methods ( Peters et al. , 2016 ; Bühlmann , 2018 ) causally related the output label Y to the observed input X , which however is NOT conceptually reasonable in scenarios with sensory-level observed data ( e.g . modeling pixels as causal factors of Y does not make much sense ) . For such applications , we rather adopt the manner in Bengio et al . ( 2013 ) ; Biederman ( 1987 ) to relate the causal factors of Y to unobserved abstractions denoted by S , i.e. , Y ← fy ( S , εy ) via mechanism fy . We further assume existence of additional latent components denoted as Z , that together with S generates the input X via mechanism fx as X ← fx ( S , Z , εx ) . Taking image classification as an example , the S and Z respectively refer to object-related abstractions ( e.g. , contour , texture , color ) and contextual information ( e.g. , light , view ) . Such an assumption is similarly adopted in the literature of nonlinear Independent Components Analysis ( ICA ) ( Hyvarinen and Morioka , 2016 ; Hyvärinen et al. , 2019 ; Khemakhem , Kingma and Hyvärinen , 2020 ; Teshima et al. , 2020 ) and latent generative models ( Suter et al. , 2019 ) , which are however without separation of output ( y ) -causative factors ( a.k.a , S ) and other correlating factors ( a.k.a , Z ) that can both be learned in data-fitting process . We encapsulate these assumptions into a novel causal model , namely Latent Causal Invariance Model ( LaCIM ) as illustrated in Fig . 1 , in which we assume the structural equations fx ( associated with S , Z → X ) , fy ( associated with S → Y ) to be the Causal Invariant Mechanisms ( CIMe ) that hold under any circumstances with P ( S , Z ) allowed to be varied across domains . The incorporation of these priories can explain the spurious correlation embedded in the back-door path from Z to Y ( contextual information to the class label in image classification ) . To avoid learning spurious correlations , our goal is to identify the intrinsic CIMe fx , fy . Specifically , we first prove the identifiability ( i.e. , the possibility to be precisely inferred up to an equivalence relation ) of the CIMe . Notably , far beyond the scope in existing literature ( Khemakhem , Kingma and Hyvärinen , 2020 ) , our results can implicitly , and are the first to disentangle the output-causative factors ( a.k.a , S ) from others ( a.k.a , Z ) for prediction , to ensure the isolation of undesired spurious correlation . Guaranteed by such , we propose to estimate the CIMe by extending the Variational Auto-encoder ( VAE ) ( Kingma and Welling , 2014 ) to the supervised scenario . For OOD prediction , we propose to optimize over latent space under the identified CIMe . To verify the correctness of our identifiability claim , we conduct a simulation experiment . We further demonstrate the utility of our LaCIM via high explainable learned semantic features , improved prediction power on various OOD scenarios ( including tasks with confounding and selection bias , healthcare ) , and robustness on security . We summarize our contribution as follows : ( i ) Methodologically , we propose in section 4.1 a latent causal model in which only a subset of latent components are causally related to the output , to avoid spurious correlation and benefit OOD generalization ; ( ii ) Theoretically , we prove the identifiability ( in theorem 4.3 ) of CIMe fx , fy from latent variables to observed data , which disentangles outputcausative factors from others ; ( iii ) Algorithmically , guided by the identifiability , we in section 4.3 reformulate Variational Bayesian method to estimate CIMe during training and optimize over latent space during the test ; ( iv ) Experimentally , LaCIM outperforms others in terms of prediction power on OOD tasks and interpretability in section 5.2 , and robustness to tiny perturbation in section 5.3 . 2 RELATED WORK . The invariance/causal learning proposes to learn the assumed invariance for transferring . For the invariance learning methods in Krueger et al . ( 2020 ) and Schölkopf ( 2019 ) , the “ invariance ” can refer to stable correlation rather than causation , which lacks the interpretability and impedes its generalization to a broader set of domains . For causal learning , Peters et al . ( 2016 ) ; Bühlmann ( 2018 ) ; Kuang et al . ( 2018 ) ; Heinze-Deml and Meinshausen ( 2017 ) assume causal factors as observed input , which is inappropriate for sensory-level observational data . In contrast , our LaCIM introduces latent components as causal factors of the input ; more importantly , we explicitly separate them into the output-causative features and others , to avoid spurious correlation . Further , we provide the identifiability claim of causal invariant mechanisms . In independent and concurrent works , Teshima et al . ( 2020 ) and Ilse et al . ( 2020 ) also explore latent variables in causal relation . As comparisons , Teshima et al . ( 2020 ) did not differentiate S from Z ; and Ilse et al . ( 2020 ) proposed to augment intervened data , which can be intractable in real cases . Other works which are conceptually related to us , as a non-exhaustive review , include ( i ) transfer learning which also leverages invariance in the context of domain adaptation ( Schölkopf et al. , 2011 ; Zhang et al. , 2013 ; Gong et al. , 2016 ) or domain generalization ( Li et al. , 2018 ; Shankar et al. , 2018 ) ; and ( ii ) causal inference ( Pearl , 2009 ; Peters et al. , 2017 ) which proposes a structural causal model to incorporate intervention via “ do-calculus ” for cause-effect reasoning and counterfactual learning ; ( iii ) latent generative model which also assumes generation from latent space to observed data ( Kingma and Welling , 2014 ; Suter et al. , 2019 ) but aims at learning generator in the unsupervised scenario . 3 PRELIMINARIES . Problem Setup & Notation LetX , Y respectively denote the input and output variables . The training data { De } e∈Etrain are collected from the set of multiple environments Etrain , where each domain e is associated with a distribution Pe ( X , Y ) over X × Y and De = { xei , yei , de } i∈ [ ne ] i.i.d∼ Pe with [ k ] : = { 1 , ... , k } for any k ∈ Z+ . The de∈ { 0 , 1 } m denotes the one-hot encoded domain index for e , where 1 ≤ m : = ∣∣Etrain∣∣ ≤ n : = ∑e∈Etrain ne . Our goal is to learn a model f : X 7→ Y that learns output ( y ) -causative factors for prediction and performs well on the set of all environments E ⊃ Etrain , which is aligned with existing OOD generalization works ( Arjovsky et al. , 2019 ; Krueger et al. , 2020 ) . We use respectively upper , lower case letter and Cursive letter to denote the random variable , the instance and the space , e.g. , a is an instance in the space A of random variable A . The [ f ] A denotes the f restricted on dimensions of A . The Sobolev space W k , p ( A ) contains all f such that ∫ A ∣∣∂Afα∣∣A=a∣∣pda < ∞ , ∀α ≤ k. Structural Causal Model . The structural causal model ( SCM ) is defined as the causal graph assigned with structural equations . The causal graph encodes the assumptions in missing arrows in a directed acylic graph ( DAG ) : G = ( V , E ) with V , E respectively denoting the node set and the edge set . The Pa ( k ) denotes the set of parent nodes of Vk for each Vk ∈ V and the X → Y ∈ E indicates the causal effect of X on Y . The structural equations { Vk ← fk ( Pa ( k ) , εk ) } Vk∈V , quantify the causal effects shown in the causal graph G. By assuming independence among exogenous variables { εk } k , the Causal Markov Condition states that P ( { Vk = vk } Vk∈V ) = ΠkP ( Vk = vk|Pa ( k ) = pa ( k ) ) . A back-door path from Va to Vb is defined as a path that ends with an arrow pointing to Va ( Pearl , 2009 ) . 4 METHODOLOGY . We build our causal model associated with Causal Invariant Mechanism ( CIMe , i.e. , fx , fy ) and a priori about the generating process in section 4.1 , followed by our identifiability result for CIMe in section 4.2 . Finially , we introduce our learning method to estimate CIMe in section 4.3 . 4.1 LATENT CAUSAL INVARIANCE MODEL We introduce latent variables to model the abstractions/concepts that play as causal factors that generate the observed variables ( X , Y ) , which is more reasonable than assuming the X as the direct cause of Y in scenarios with sensory-level data . We explicitly separate the latent variables into two parts : the S and Z that respectively denote the y ( output ) -causative and y-non-causative factors , as shown by the arrow S → Y in Fig . 1 . Besides , the X and Y are respectively generated by S , Z and S , via structural equations ( with noise ) fx , fy , which are denoted as Causal Invariant Mechanisms ( CIMe ) that hold across all domains . The output Y denotes the label generated by human knowledge , e.g. , the semantic shape , the contour to discern the object , etc . Hence , we assume the Y as the outcome/effect of these high-level abstractions ( Biederman , 1987 ) rather than the cause ( detailed comparison with Y → S is left in supplementary 7.7.1 ) . We call the model associated with the causal graph in Fig . 1 as Latent Causal Invariance Model ( LaCIM ) , with formal definition given in Def . 4.1 . As an illustration , we consider the image classification in which X , Y denote the image and the class label . Instead of X , i.e. , the pixels , it is more reasonable to assume the causal factors ( of X , Y ) as latent concepts ( S , Z ) that can denote light , angle , the shape of the object to generate X following the physical mechanisms . Among these concepts , only the ones that are causally related to the object , i.e. , S ( e.g. , shape ) are causal factors of the object label , i.e. , Y . Following the physical or natural law , the mechanisms S , Z → X , S → Y invariantly hold across domains . The S : = Rqs , Z : = Rqz denote the space of S , Z , with Pe ( S , Z ) ( that characterizes the correlation between S and Z ) varying across E ( e.g. , the object is more associated with a specific scene than others ) . We assume that the y-non-causative factor ( i.e. , Z ) is associated with ( but not causally related to ) S , Y through the confounder C , which is allowed to take a specific value for each sample unit . Therefore , the back-door path Z←C→S→Y induces the correlation between Z and Y in each single domain . Rather than invariant causation , this correlation is data-dependent and can vary across domains , which is known as “ spurious correlation ” . In real applications , this spurious correlation corresponds to the bias inherited from data , e.g . the contextual information in object classification . This domain-specific S-Z correlation , can be explained by the source variable D , which takes a specific and fixed value for each domain and functions the prior of distribution of the confounder C , as illustrated in Fig . 1 . This source variable D can refer to attributes/parameters that characterize the distribution of S , Z in each domain . When such attributes are unobserved , we use the domain index as a substitute . Consider the cat/dog classification task as an illustration , the animal in each image is either associated with the snow or grass . The S , Z respectively denote the concepts of animals and scenes . The D denotes the sampler , which can be described by the proportions of scenes associated with the cat and those associated with the dog . The D generates the C that denotes the ( time , weather ) to go outside and collect samples . Since each sampler may have a fixed pattern ( e.g . gets used to going out in the sunny morning ( or in the snowy evening ) ) , the data he/she collects , may have sample selection bias ( e.g . with dogs ( cats ) more associated with grass ( snow ) in the sunny morning ( or snowy evening ) ) . In this regard , the scene concepts Z can be correlated with the animal concepts S , and also the label Y . Definition 4.1 ( LaCIM ) . The Latent Causal Invariance Model ( LaCIM ) for e ∈ E is defined as a SCM characterized by ( i ) the causal graph , i.e. , the G = ( V , E ) with V = { C , S , Z , X , Y } and E = { C → S , C → Z , Z → X , S → X , S → Y } ; and ( ii ) structural equations with causal mechanisms { fc , fz , fs , fx , fy } embodying the quantitative causal information : c ← fc ( de , εc ) , z ← fz ( c , εz ) , s← fs ( c , εs ) ; x← fx ( s , z , εx ) ; y ← fy ( s , εy ) , in which { εc , εz , εs , εx , εy } are independent exogenous variables that induce pfc ( c|de ) , pfz ( z|c ) , pfs ( s|c ) , pfx ( x|s , z ) , pfy ( y|s ) . The CIMe fx , fy are assumed to be invariant across E . We call the environment-dependent parts : Pe ( S , Z ) and Pe ( S , Z|X ) as S , Z-prior and S , Z-inference in the following . Remark 1 . We denote LaCIM-ds and LaCIM-d as two versions of LaCIM , with the source variable ds with practical meaning ( e.g . attributes or parameters of P ( S , Z ) ) observed or not . The observation of ds can be possible in some applications ( e.g. , age , gender that characterizes population in medical diagnosis ) . As for the LaCIM-d with ds unobserved , we use domain index D as a substitute . Denote C as the space of C. We assume that the C is finite union of disjoint sets { Cr } Rr=1 , i.e . C : = ∪Rr=1Cr , such that for any cr , i 6= cr , j ∈ Cr , it holds that p ( s , z|cr , i ) = p ( s , z|cr , j ) for any ( s , z ) . Returning to the cat/dog classification example , the C denotes the range of time to collect samples , i.e. , 00 : 00-24 : 00 . The C can be divided into several time periods C1 , ... , CR , such that the proportion of concepts of ( animal , scene ) given any c in the same period is unchanged , e.g. , the dog often comes up on the grass in the morning . Further , since p ( x , y|s , z ) = p ( x|s , z ) p ( y|s ) is invariant , we have for each Cr that p ( x , y|cr , i ) = ∫ p ( x , y|s , z ) p ( s , z|cr , i ) dsdz = ∫ p ( x , y|s , z ) p ( s , z|cr , j ) dsdz = p ( x , y|cr , j ) for any ( x , y ) . That is , the { p ( x , y|cr } cr∈Cr for each ( x , y ) collapse to a single point , namely p ( x , y|cr ) . In this regard , we have pe ( x , y ) : = p ( x , y|de ) = ∑R r=1 p ( x , y|cr ) p ( cr|de ) . Besides , we assume the Additive Noise Model ( ANM ) for X , i.e. , fx ( s , z , εx ) = f̂x ( s , z ) + εx ( we replace f̂x with fx without loss of generality ) , which has been widely adopted to identify the causal factors ( Janzing et al. , 2009 ; Peters et al. , 2014 ; Khemakhem , Kingma and Hyvärinen , 2020 ) . We need to identify the CIMe ( i.e. , fx , fy ) , guaranteed by the identifiability that ensures the learning method to distinguish S from Z to avoid spurious correlation , as presented in section 4.2 . Traditionally speaking , the identifiability means the parameter giving rise to the observational distribution pθ ? ( x , y|de ) can be uniquely determined , i.e. , pθ ( x , y|de ) = pθ̃ ( x , y|de ) =⇒ θ = θ̃ . Instead of strict uniqueness , we rather identify an equivalent class of θ ? ( in Def . 4.2 ) that suffices to disentangle the y-causative features S from Z to avoid learning spurious correlation . To achieve this goal , we first narrow our interest in case when p ( s , z|c ) is exponential family in Eq . ( 1 ) , in which we can respectively identify the S , Z up to linear and point-wise transformations given by theorem 4.3 ; then we generalize to any p ( s , z|c ) as long as it belongs to Sobolev space , as explained in theorem 4.4 . A reformulated VAE is proposed to learn the CIMe practically . For generalization , note that the gap between two environments in terms of prediction given x , i.e. , ∣∣Epe2 [ Y |X = x ] − Epe1 [ Y |X = x ] ∣∣ = ∫S ∣∣pe2 ( s|x ) − pe1 ( s|x ) ∣∣pfy ( y|s ) ds , is mainly due to the inconsistency of S , Z-inference , i.e. , pe ( s , z|x ) 6= pe′ ( s , z|x ) for e′ 6= e ( for details please refer to theorem 7.1 in supplement 7.1 ) . Therefore , one can not directly apply the trained { pe ( s , z|x ) , pe ( y|x ) } e∈Etrain to the inference model of new environment , i.e . pe ′ ( s , z|x ) , pe′ ( y|x ) for e′ /∈ Etrain . To solve this problem and generalize to new environment , we note that since pfx ( x|s , z ) and pfy ( y|s ) are shared among all environments , we propose to inference s , z that give rise to the test sample x via maximizing the identified pfx ( x|s , z ) , as a pseudo-likelihood of x given ( s , z ) , rather than using S , Z-inference model which is inconsistent among environments . Then , we feed estimated s into invariant predictor pfy ( y|s ) for prediction .
This paper proposes a VAE based model for learning latent causal factors given data from multiple domains. Similar to [Kingma and Hyv¨arinen, 2020], it utilizes additional labels as supervision signals and learns the model using a Bayesian optimization approach given a fixed hypothetical causal structure. The identifiability is obtained by assuming the casual mechanism to be domain invariant, which is partially supported by some empirical experiments.
SP:7f369156e476623039e657c05ddc65aabdd923a8
BayesAdapter: Being Bayesian, Inexpensively and Robustly, via Bayesian Fine-tuning
Despite their theoretical appealingness , Bayesian neural networks ( BNNs ) are falling far behind in terms of adoption in real-world applications compared with deterministic NNs , mainly due to their limited scalability in training and low fidelity in uncertainty estimates . In this work , we develop a new framework , named BayesAdapter , to address these issues and bring Bayesian deep learning to the masses . The core notion of BayesAdapter is to adapt pre-trained deterministic NNs to be BNNs via Bayesian fine-tuning . We implement Bayesian fine-tuning with a plug-and-play instantiation of stochastic variational inference , and propose exemplar reparameterization to reduce gradient variance and stabilize the finetuning . Together , they enable training BNNs as if one were training deterministic NNs with minimal added overheads . During Bayesian fine-tuning , we further propose an uncertainty regularization to supervise and calibrate the uncertainty quantification of learned BNNs at low cost . To empirically evaluate BayesAdapter , we conduct extensive experiments on a diverse set of challenging benchmarks , and observe satisfactory training efficiency , competitive predictive performance , and calibrated and faithful uncertainty estimates . 1 INTRODUCTION . Much effort has been devoted to developing flexible and efficient Bayesian deep models to make accurate , robust , and well-calibrated decisions ( MacKay , 1992 ; Neal , 1995 ; Graves , 2011 ; Blundell et al. , 2015 ) , with Bayesian neural networks ( BNNs ) as popular examples . The principled uncertainty quantification inside BNNs is critical for realistic decision-making , well evaluated in scenarios ranging from model-based reinforcement learning ( Depeweg et al. , 2016 ) and active learning ( Hernández-Lobato & Adams , 2015 ) , to healthcare ( Leibig et al. , 2017 ) and autonomous driving ( Kendall & Gal , 2017 ) . BNNs are also known to be capable of resisting over-fitting . However , there are fundamental obstacles posed in front of ML practitioners when trying to push the limit of BNNs to larger datasets and deeper architectures : ( i ) The scalability of the existing BNNs is generally restrictive owing to the essential difficulties of learning a complex , non-degenerate distribution over parameters in a high-dimensional and over-parameterized space ( Liu & Wang , 2016 ; Louizos & Welling , 2017 ; Sun et al. , 2019 ) . ( ii ) The Bayes posteriors learned from scratch are often systematically worse than their point-estimate counterparts in terms of predictive performance when “ cold posterior ” strategies are not applied ( Wenzel et al. , 2020 ) . ( iii ) It is shown that the BNNs have the possibility to assign low ( epistemic ) uncertainty for realistic out-of-distribution ( OOD ) data ( e.g. , adversarial examples ) , rendering their uncertainty estimates unreliable in safety-critical scenarios ( Grosse et al. , 2018 ) . To solve these problems , we present a scalable workflow , named BayesAdapter , to learn more reliable BNNs . In a holistic view , we unfold the learning of a BNN into two steps : deterministic pre-training of the deep neural network ( DNN ) counterpart of the BNN followed by several-round Bayesian fine-tuning . This enables us to learn a principled BNN with slightly more efforts than training a regular DNN , and provides us with the opportunities to embrace qualified off-the-shelf pre-trained DNNs ( e.g. , those on PyTorch Hub ) . The converged parameters of the deterministic model serve as a strong start point for Bayesian fine-tuning , allowing us to bypass extensive local optimum suffered by a direct learning of BNN1 . To render the fine-tuning in the style of training normal NNs , we resort to stochastic variational inference ( VI ) to update the approximate posterior . We develop optimizers with built-in weight decay for the parameters of the variational distribution to absorb the regularization effects from the prior , and develop exemplar reparametrization to reduce the gradient variance . Moreover , to make the uncertainty estimation of the learned models reliable , we propose to additionally , explicitly regularize the model to behave uncertainly on representative foreseeable OOD data during fine-tuning . This regularization takes the form of a margin loss , and is readily applicable to most of the existing BNNs . Figure 1 depicts the whole framework of BayesAdapter . Extensive empirical studies validate the efficiency and effectiveness of our workflow . In summary , our contributions are as follows : 1 . We propose BayesAdapter , to quickly and cheaply adapt a pre-trained DNN to be Bayesian without compromising performance when facing new tasks . 2 . We provide an easy-to-use instantiation of stochastic VI , which allows learning a BNN as if training a deterministic NN and frees the users from tedious details of BNN . 3 . We augment the fine-tuning with a generally applicable uncertainty regularization term to rectify the predictive uncertainty according to a collection of OOD data . 4 . Extensive studies validate that BayesAdapter is scalable ; the delivered BNN models are high-quality ; and the acquired uncertainty quantification is calibrated and transferable . 2 BAYESADAPTER . In this section , we first motivate BayesAdapter by drawing a connection between maximum a posteriori ( MAP ) and Bayesian inference . We then describe the proposed procedure Bayesian fine-tuning , and a practical and robust implementation of stochastic VI to realize it . Figure 1 illustrates the overall workflow of BayesAdapter . 2.1 FROM DNNS TO BNNS . Let D = { ( xi , yi ) } ni=1 be a given training set , where xi ∈ Rd and yi ∈ Y denote the input data and label , respectively . A DNN model can be fit via MAP as following : max w 1 n ∑ i [ log p ( yi|xi ; w ) ] + 1 n log p ( w ) . ( 1 ) We use w ∈ Rp to denote the high-dimensional model parameters , and p ( y|x ; w ) as the predictive distribution associated with the model . The prior term p ( w ) , when taking the form of an isotropic Gaussian , reduces to the common L2 weight decay regularizer in optimization . Despite the wide adoption , DNNs are known to be prone to over-fitting , generating over-confident predictions , and are unable to convey valuable information on the trustworthiness of their predictions . Naturally , Bayesian neural networks ( BNNs ) come into the picture to address these limitations . 1Here the BNN mainly refers to mean-field variational BNNs , and the results in Sec 4.1 testify this point . Typically , a BNN imposes a prior p ( w ) on model parameters , which is put together with the likelihood p ( D|w ) to infer the posterior p ( w|D ) . Among the wide spectrum of BNN algorithms ( MacKay , 1992 ; Neal , 1995 ; Graves , 2011 ; Blundell et al. , 2015 ; Liu & Wang , 2016 ; Gal & Ghahramani , 2016 ; Louizos & Welling , 2017 ) , variational BNNs are particularly promising due to their ease of training compared with other BNN variants . Formally , variational BNNs derive a θ-parameterized varitional distribution q ( w|θ ) to approximate the true posterior p ( w|D ) , by maximizing the evidence lower bound ( ELBO ) ( scaled by 1/n ) : max θ Eq ( w|θ ) [ 1 n ∑ i log p ( yi|xi ; w ) ] ︸ ︷︷ ︸ Lell − 1 n DKL ( q ( w|θ ) ‖p ( w ) ) ︸ ︷︷ ︸ Lc , ( 2 ) whereLell is the expected log-likelihood andLc is the complexity loss . By casting posterior inference into optimization , Eq . ( 2 ) makes the training of BNNs more approachable . However , most existing BNNs2 trained under such a criterion exhibit limitations in scalability and performance ( Osawa et al. , 2019a ; Wenzel et al. , 2020 ) compared with their deterministic counterparts , mainly attributed to the higher difficulty of learning high-dimensional distributions than point estimates , and challenges in finding non-degenerated optima of highly nonlinear functions characterized by NNs . Given that MAP converges to the mode of the Bayesian posterior , it might be plausible to adapt pretrained deterministic DNNs to be Bayesian economically . Following this hypothesis , we propose to repurpose the converged parameters w∗ of MAP , and use it to instantiate q ( w|θ ) as a Gaussian N ( w ; θ ) with θ = ( µ , Σ ) , where µ is initialized as w∗ and Σ ∈ Rp×p denotes the covariance . Then , we arrive at a BNN with posterior predictive : p ( y|x , D ) = EN ( w ; µ , Σ ) p ( y|x ; w ) ≈ 1 S S∑ s=1 p ( y|x ; w ( s ) ) , where w ( s ) ∼ N ( w ; µ , Σ ) , s = 1 , ... , S. ( 3 ) Eq . ( 3 ) is also called Bayes ensemble , where µ is perturbed , and the predictions from multiple likely models are assembled . Σ controls the magnitude of perturbation . A classic method to generate an informative Σ is by Laplace approximation ( Bleistein & Handelsman , 1986 ) , but it is more like a postprocessing procedure , lacking the flexibility to jointly adapt the mean and covariance of the Gaussian posterior w.r.t . data , and its naive implementation without strong assumptions may be computationally prohibitive . Instead , we suggest a more practical workflow – that fine-tunes the approximate posterior N ( w ; µ , Σ ) by maximizing the ELBO with randomly initialized Σ . 2.2 BAYESIAN FINE-TUNING IN THE STYLE OF FINE-TUNING DNNS . We develop practical learning algorithms under the stochastic VI scheme to fine-tune the imperfect variational posterior , and to cope with contemporary ML frameworks . In the following , we discuss how to deal with each term in Eq . ( 2 ) . Algorithm 1 gives an overview of BayesAdapter . Complexity loss Lc . Without losing generality , we assume an isotropic Gaussian prior p ( w ) = N ( w ; 0 , σ20I ) . Then the complexity loss is derived as : Lc = − 1 n DKL ( N ( w ; µ , Σ ) ‖N ( w ; 0 , σ20I ) ) = −µ Tµ+ tr ( Σ ) 2σ20n + log detΣ 2n + c , ( 4 ) where tr and det are matrix trace and determinant , respectively . c is a constant . The gradients of Lc w.r.t . µ and Σ can be estimated precisely as : ∇µLc = − µ σ20n , ∇ΣLc = σ20Σ −1 − I 2σ20n . ( 5 ) Eq . ( 5 ) indicates that maxµ Lc amounts to applying a weight decay regularizer with coefficient λ = 1 σ20n on µ , which can be conveniently optimized by leveraging the built-in weight decay modules in ML frameworks such as TensorFlow ( Abadi et al. , 2016 ) or PyTorch ( Paszke et al. , 2019 ) . Directly computing ∇ΣLc involves matrix inversion . Implementing the posterior as matrix-variate Gaussian is an alternative , while existing algorithms for matrix-variate Gaussian posterior typically exhibit high complexity in time or memory , limited compatibility with contemporary NN building block operations ( e.g. , convolution ) , and struggle to scale with data-parallel distributed training ( Louizos & Welling , 2016 ; Sun et al. , 2017 ; Osawa et al. , 2019b ) . To simplify the implementation and boost scalability , we assume a fully factorized Gaussian variational by devising Σ as 2We use BNNs equivalently with variational BNNs in the following text when there is no ambiguity . diag ( exp ( 2ψ ) ) , where ψ ∈ Rp is the parameter to be optimized along with µ ( i.e. , θ = ( µ , ψ ) ) . Injecting this into Eq . ( 5 ) gets a more concise gradient estimator : ∇ψLc = 1/n−λ exp ( 2ψ ) , meaning that maxψ Lc adds an exponential weight decay of ψ with coefficient λ , which can be realized by modifying only two lines of code on top of de facto DL frameworks ( see Figure 1 ) . Expected log-likelihood Lell . With the complexity loss expressed as weight decay , we now develop efficient ways for calculating the Lell at the end of forward pass , and for performing backpropagation afterwards . In particular , we derive a Monte Carlo ( MC ) estimation of Lell based on reparameterization ( Kingma & Welling , 2013 ) : we sample a p-dimensional Gaussian noise ∼ N ( 0 , I ) , then obtain the sampled parameter for the whole mini-batch B of data viaw = µ+exp ( ψ ) , given which we approximate Lell with L′ell = 1|B| ∑ ( xi , yi ) ∈B log p ( yi|xi ; w ) . The gradients of µ and ψ can be derived automatically with autodiff libraries , thus the training resembles that of normal DNNs . However , gradients derived by L′ell might exhibit high variance , caused by sharing one set of sampled parameters w across all the training instances in B . Local reparameterization is proposed to reduce the variance , but it requires at least 2x forward-backward FLOPS than vanilla reparameterization ( refer to Kingma et al . ( 2015 ) for more details ) . Flipout ( Wen et al. , 2018 ) is an alternative solution . But it is only suitable for perturbation based MC estimation and its modeling assumptions make Flipout unable to handle complex variational posterior like a FLOW ( Louizos & Welling , 2017 ) , or an implicit model ( Shi et al. , 2018b ) . Besides , it is still as slow as local reparameterization . To mitigate these issues , we propose exemplar reparametrization ( ER ) which samples a separate set of parameters for every exemplar in the minibatch . Formally , for ∀xi ∈ B , we draw w ( i ) = µ + exp ( ψ ) ( i ) where ( i ) ∼ N ( 0 , I ) , and approximate the expected log-likelihood by L∗ell = 1|B| ∑ ( xi , yi ) ∈B log p ( yi|xi ; w ( i ) ) . Obviously , ER is distribution agnostic , and is readily applicable to various variational distributions . While ER generates more parameters at training , they are mostly temporary , and the resultant computational FLOPS are provably identical to that of the vanilla reparameterization . The challenge of ER is to cope with nowadays ML frameworks and maintain computing efficiency , because off-the-shelf computation kernels in autodiff libraries typically assume a batch of instances share a common set of parameters . We present an example in Fig- ure 2 on how the standard convolution op can be converted into its exemplar version without compromising computational efficiency . The key insight here is that multiple exemplar convolutions can be expressed as a group convolution , which can be performed in parallel using a single group convolution kernel , leveraging the optimized implementations provided by various device-propriety kernel backends ( e.g . cuDNN ( Chetlur et al. , 2014 ) ) . Other common operators such as matrix multiplication are straightforward to handle ( refer to Appendix A ) . With this insight , BayesAdapter enables to obtain a BNN with only minor computational cost in addition to pre-training , and can immediately benefit from the availability of higher-performance computational kernels ( e.g. , more powerful group convolution kernel ) .
This paper introduces a fast way to get Bayesian posterior by using a pretrained deterministic model. Specifically, the authors first train a standard DNN model and then use it to initialize the variational parameters. Finally the variational parameters are optimized through standard variational inference (VI) training. To further improve uncertainty estimate, the authors propose an uncertainty regularization which maximizes the prediction inconsistency on out-of-distribution (OOD) data. Experiments including image classification and uncertainty estimates are conducted to demonstrate the proposed method.
SP:d021dc94272c00ac362f53e3deb239da1292a734
WordsWorth Scores for Attacking CNNs and LSTMs for Text Classification
Black box attacks on traditional deep learning models trained for text classification target important words in a piece of text , in order to change model prediction . Current approaches towards highlighting important features are time consuming and require large number of model queries . We present a simple yet novel method to calculate word importance scores , based on model predictions on single words . These scores , which we call WordsWorth scores , need to be calculated only once for the training vocabulary . They can be used to speed up any attack method that requires word importance , with negligible loss of attack performance . We run experiments on a number of datasets trained on word-level CNNs and LSTMs , for sentiment analysis and topic classification and compare to state-of-the-art baselines . Our results show the effectiveness of our method in attacking these models with success rates that are close to the original baselines . We argue that global importance scores act as a very good proxy for word importance in a local context because words are a highly informative form of data . This aligns with the manner in which humans interpret language , with individual words having well-defined meaning and powerful connotations . We further show that these scores can be used as a debugging tool to interpret a trained model by highlighting relevant words for each class . Additionally , we demonstrate the effect of overtraining on word importance , compare the robustness of CNNs and LSTMs , and explain the transferability of adversarial examples across a CNN and an LSTM using these scores . We highlight the fact that neural networks make highly informative predictions on single words . 1 INTRODUCTION . Deep learning models are vulnerable to carefully crafted adversarial examples . The goal of such an attack is to fool a classifier into giving incorrect prediction while the perturbed input appears normal to human observers . The probelm is important from the point of view of robustness as well as interpretability . Thoroughly analyzing different kinds of vulnerabilities in neural networks would help us in creating robust models for deployment in the real world , in addition to throwing some light on the internal working of these models . In this work , we consider text classification , where finding important words in a body of text is the first step towards malicious modification . For this problem , we propose a novel method for calculating word importance . After training a model , we calculate importance scores over the entire training vocabulary , word by word . We further use these importance scores for black box attacks and demonstrate that the attack success rate is comparable to the original methods , particularly for CNNs . Since these scores are global and calculated over the training vocabulary , they can also be used as a tool to interpret a trained model . They provide a measure for comparing different architectures and models beyond training and validation accuracy . Over a single training dataset , we can compare a small CNN to a large CNN , a CNN to an LSTM , or the word importance distribution of one class against another , as we outline in our experiments section . The motivation for our particular algorithm comes from the fact that in a piece of text , most of the time , words and phrases have a strong influence on their own . This gives us a rationale for evaluating a model on single words , in direct contrast to the leave-one-out technique , which involves deleting a word from a document and measuring its importance by the change in model prediction on this modified input . Further , we expect a well-trained network to treat a word approximately the same , irrespective of its location in the input , when surrounding words are removed . Thus a particular word can occur at any position in a document with 200 words and its importance will be roughly the same . We expect a well-trained model to exhibit this behaviour and our experiments confirm this . In summary , our contributions are as follows : • We propose a simple and efficient method for calculating word importance for attacking traditional deep learning models in the black box setting . • We argue that these scores can act as a tool for model interpretation and outline a number of use cases in this context . 2 RELATED WORK . 2.1 ADVERSARIAL ATTACKS ON NLP MODELS : . The idea of perturbation , whether random or malicious , is rather simple in the image domain , where salt and pepper noise can be enough to images to fool models . This kind of noise is hard for humans to detect . However , since text data is discrete , perturbations in text are difficult to quantify . Besides , people easily notice errors in computer-generated text . This places additional constraints for an NLP attack to be counted as successful , where a successful attack is one that forces the model to give an incorrect prediction while a human would make the correct prediction on the input . We limit ourselves to text classification problems , using sentiment analysis and topic classification as examples . We only consider the attack scenarios in which specific words in the input are replaced by valid words from the dictionary . Thus we are not considering attacks in which extra information is appended to input data , or where word replacements purposefully introduce spelling errors . The former take an entirely different approach ; the latter introduce errors and do not preserve semantics . In addition , training a neural network to be robust to spelling errors would stop these attacks . Further , we limit ourselves to black box attacks where the attacker has no information about model architectures and parameters . 2.2 FIND AND REPLACE ATTACKS ON TEXT CLASSIFICATION . Most attacks on text classification solve the problem in two parts ; by locating important words in the input , and by finding suitable replacements for these words . We only consider attacks where substitutions are valid words picked from a dictionary , to avoid introducing grammatical errors , and ignore the case , for example , when spelling errors are introduced in important words . 2.2.1 WHITE BOX ATTACKS . In the white-box setting , where an attacker has full knowledge of the model architecture , gradients serve as a good proxy for word importance . Gong et al . ( 2018 ) use gradient based methods to locate important words . Samanta & Mehta ( 2017 ) use gradients to calculate word importance , with linguistic constraints over substitution words . Lei et al . ( 2019 ) carry joint word and sentence attacks , by generating sentence paraphrases in the first stage , and resorting to greedy word substitutions if the first stage fails . Again , important words are located by the magnitude of the gradient of word embedding . 2.2.2 BLACK BOX ATTACKS . In the black box scenario , where gradients are not available , saliency maps are calculated for words through different methods . Yang et al . ( 2018 ) provide a greedy algorithm which we will outline in detail in the next section . Li et al . ( 2016 ) propose masking each feature with zero padding , using the decrease in the predicted probability as the score of the feature or word , and masking the top-k features as unknown . Alzantot et al . ( 2018 ) and Kuleshov et al . ( 2018 ) propose variations of genetic algorithms . Kuleshov et al . ( 2018 ) replace words one by one until the classifier is misdirected while observing a bound on the number of perturbed features . They run each new iteration on the modified input . For substitution , they used post processed GloVe to find pool of suitable words . They also compute ’ thought vectors ’ for sentences and ensure that these are preserved . Alzantot et al . ( 2018 ) select words by random sampling , where probability of each word being selected is proportional to the number of suitable neighbours for replacement . They use Google 1 billion words language model to ensure that replacements match the context provided by the rest of the input . Ren et al . ( 2019 ) propose a saliency-based greedy algorithm , calculated by deleting words during the search phase and select substitutions from WordNet . Another similar attack model is Jin et al . ( 2019 ) , which has extra semantic similarity checking when searching adversarial examples , and calculates word importance by deleting words . Zang et al . ( 2019 ) propose a particle swarm optimization algorithm for the search problem . Gao et al . ( 2018 ) define different scoring functions where they look at prediction before and after removing a particular word from a subset of input , and perform character level modifications in the second stage . Li et al . ( 2019 ) use the sentence probability directly but once again , when ranking words , they try masking words in a sentence . A common thread among all search methods for black box attacks is erasure or omission , where the effect of a word is observed by comparing the classifier output probability for original input to that for input with this particular word removed or replaced by zero . 2.3 INTERPRETABILITY IN MACHINE LEARNING THROUGH ERASURE . Li et al . ( 2016 ) is a pioneering body of work in the domain of interpretability that highlights the importance of interpreting networks by erasing parts of various layers . This Leave-One-Out method is followed by most interpretation algorithms . For a particular word , they calculate importance score as the average of prediction difference due to erasing this word from all test examples . Feng et al . ( 2018 ) gradually remove unimportant input words so that only the important ones are left at the end . Barham & Feizi ( 2019 ) propose sparse projected gradient descent to generate adversarial examples to improve interpretability . Nguyen ( 2018 ) looks at different methods of local explanations for labels , which include LIME , random feature deletion and first derivative saliency . Kádár et al . ( 2017 ) measure salience of a word by removing it and noting the change in prediction . Jin et al . ( 2019 ) mention deleting a particular word to calculate its importance score . Ren et al . ( 2019 ) use word saliency which is the change in the classifier output if a word is set to unknown . Carter et al . ( 2018 ) find sufficient input subsets while calculating the feature importance by masking words . For calculating word score matrices , Xu & Du ( 2020 ) propose a method which involves masking words . We want to highlight the aspect that all the dominant techniques for interpretation use leave-one-out method for calculating word importance . WordsWorth scores provide a reliable way of calculating feature importance , as shown by attack success rates . Thus , they can be reliably used to interpret a model after it has been trained . When these scores show that a particular word is important or unimportant for predicting a particular class , we can be sure that this is how the model behaves . 3 GREEDY ALGORITHM FOR BLACK BOX ATTACKS . The greedy algorithm mentioned in Yang et al . ( 2018 ) consists of two steps : finding the most important words in a text , and finding the most distracting replacements for these words , with some constraint . For an attack where k features are allowed to be perturbed , the top k important words are picked first , and then replaced one by one . In the first step , greedy finds the most important words by calculating importance scores for each word in the input using leave-one-out technique . The score of a word is the difference in prediction probability for original input and for input with the word removed . The second step of the algorithm includes finding suitable replacement for these words . Throughout this paper we will use their greedy algorithm as a baseline for comparison , since it achieves the highest success rate among all black box methods ( Hsieh et al. , 2019 ) . Greedy uses the pretrained GloVe embeddings and limits the search in second step to within a prespecified distance , to preserve semantics . However , it should be noted that GloVe embeddings do not always provide semantic preserving replacements , and a post-processed form of embeddings would work better , such as the ones used by Kuleshov et al . ( 2018 ) . In our experiments , we use 50-dimensional GloVe embeddings to find replacements for important words . We limit our search to the ten nearest neighbours for each word .
This paper proposes WordsWorth score (WW score), a score to represent the importance of the word obtained from the trained model. Then, the score is applied to the greedy attack proposed by (Yang et al., 2018). In detail, the greedy attack first tries to search for the most important $k$ words in a text, and then it searches for values to replace the selected $k$ words. This paper uses the WW score to select the $k$ words in the first step.
SP:8359aea398860c827e9751215f55d399b2c9cfc0
Scheduled Restart Momentum for Accelerated Stochastic Gradient Descent
1 INTRODUCTION . Training many machine learning ( ML ) models reduces to solving the following finite-sum optimization problem min w f ( w ) : = min w 1 N N∑ i=1 fi ( w ) : = min w 1 N N∑ i=1 L ( g ( xi , w ) , yi ) , w ∈ Rd , ( 1 ) where { xi , yi } Ni=1 are the training samples and L is the loss function , e.g. , cross-entropy loss for a classification task , that measure the discrepancy between the ground-truth label yi and the prediction by the model g ( · , w ) , parametrized by w. The problem ( 1 ) is known as empirical risk minimization ( ERM ) . In many applications , f ( w ) is non-convex , and g ( · , w ) is chosen among deep neural networks ( DNNs ) due to their preeminent performance across various tasks . These deep models are heavily overparametrized and require large amounts of training data . Thus , both N and the dimension of w can scale up to millions or even billions . These complications pose serious computational challenges . One of the simplest algorithms to solve ( 1 ) is gradient descent ( GD ) , which updates w according to : wk+1 = wk − sk 1 N N∑ i=1 ∇fi ( wk ) , ( 2 ) where sk > 0 is the step size at the k-th iteration . Computing ∇f ( wk ) on the entire training set is memory intensive and often prohibitive for devices with limited random access memory ( RAM ) such as graphics processing units ( GPUs ) used for deep learning ( DL ) . In practice , we sample a subset of the training set , of size m with m N , to approximate ∇f ( wk ) by the mini-batch gradient 1/m ∑m j=1∇fij ( wk ) , resulting in the ( mini-batch ) -stochastic gradient descent ( SGD ) . SGD and its Under review as a conference paper at ICLR 2021 accelerated variants are among the most used optimization algorithms in ML . These gradient-based algorithms have low computational complexity , and they are easy to parallelize , making them suitable for large scale and high dimensional problems ( Zinkevich et al. , 2010 ; Zhang et al. , 2015 ) . Nevertheless , GD and SGD have issues with slow convergence , especially when the problem is ill-conditioned . There are two common techniques to accelerate GD and SGD : adaptive step size ( Duchi et al. , 2011 ; Hinton et al . ; Zeiler , 2012 ) and momentum ( Polyak , 1964 ) . The integration of both adaptive step size and momentum with SGD leads to Adam ( Kingma & Ba , 2014 ) , one of the most used optimizers for training DNNs . Many recent developments have improved Adam ( Reddi et al. , 2019 ; Dozat , 2016 ; Loshchilov & Hutter , 2018 ; Liu et al. , 2020 ) . GD with constant momentum leverages the previous step to accelerate GD according to : vk+1 = wk − sk∇f ( wk ) ; wk+1 = vk+1 + µ ( vk+1 − vk ) , ( 3 ) where µ > 0 is a constant . A similar acceleration can be achieved by the heavy-ball ( HB ) method ( Polyak , 1964 ) . The momentum update in both ( 3 ) and HB have the same convergence rate of O ( 1/k ) as that of GD for convex smooth optimization . A breakthrough due to Nesterov ( 1983 ; 2018 ) replaces µ with ( k − 1 ) / ( k + 2 ) , which is known as the Nesterov accelerated gradient ( NAG ) with time-varying momentum . For simplicity , we denote this method as NAG below . NAG accelerates the convergence rate to O ( 1/k2 ) , which is optimal for convex and smooth loss functions ( Nesterov , 1983 ; 2018 ) . NAG can also speed up the process of escaping from saddle points ( Jin et al. , 2017 ) . In practice , NAG momentum can accelerate GD for nonconvex optimization , especially when the underlying problem is poorly conditioned ( Goh , 2017 ) . However , NAG accumulates error and causes instability when the gradient is inexact ( Devolder et al. , 2014 ; Assran & Rabbat , 2020 ) . In many DL applications , constant momentum achieves state-of-the-art result . For instance , training DNNs for image classification . Since NAG momentum achieves a much better convergence rate than constant momentum with exact gradient for general convex optimization , we consider the following question : Can we leverage NAG with a time-varying momentum parameter to accelerate SGD in training DNNs and improve the test accuracy of the trained models ? Contributions . We answer the above question by proposing the first algorithm that integrates scheduled restart NAG momentum with plain SGD . Here , we restart the momentum , which is orthogonal to the learning rate restart ( Loshchilov & Hutter , 2016 ) . We name the resulting algorithm scheduled restart SGD ( SRSGD ) . Theoretically , we prove the error accumulation of Nesterov accelerated SGD ( NASGD ) and the convergence of SRSGD . The major practical benefits of SRSGD are fourfold : • SRSGD remarkably speeds up DNN training . For image classification , SRSGD significantly reduces the number of training epochs while preserving or even improving the network ’ s accuracy . In particular , on CIFAR10/100 , the number of training epochs is reduced by half with SRSGD , while on ImageNet the reduction in training epochs is also remarkable . • DNNs trained by SRSGD generalize significantly better than the current benchmark optimizers . The improvement becomes more significant as the network grows deeper as shown in Fig . 1 . • SRSGD reduces overfitting in training very deep networks such as ResNet-200 for ImageNet classification , enabling the accuracy to keep increasing with depth . • SRSGD is straightforward to implement and only requires changes in a few lines of the SGD code . There is also no additional computational or memory overhead . We focus on image classification with DNNs , in which SGD with constant momentum is the choice . Related Work . Momentum has long been used to accelerate SGD . SGD with scheduled momentum and a good initialization can handle the curvature issues in training DNNs and enable the trained models to generalize well ( Sutskever et al. , 2013 ) . Kingma & Ba ( 2014 ) and Dozat ( 2016 ) integrated momentum with adaptive step size to accelerate SGD . In this work , we study the time-varying momentum version of NAG with restart for stochastic optimization . Adaptive and scheduled restart have been used to accelerate NAG with the exact gradient ( Nemirovskii & Nesterov , 1985 ; Nesterov , 2013 ; Iouditski & Nesterov , 2014 ; Lin & Xiao , 2014 ; Renegar , 2014 ; Freund & Lu , 2018 ; Roulet et al. , 2015 ; O ’ donoghue & Candes , 2015 ; Giselsson & Boyd , 2014 ; Su et al. , 2014 ) . These studies of restart NAG momentum are for convex optimization with the exact gradient . Restart techniques have also been used for stochastic optimization ( Kulunchakov & Mairal , 2019 ) . In particular , Aybat et al . ( 2019 ) developed a multistage variant of NAG with momentum restart between stages . Our work focuses on developing NAG-based optimization for training DNNs . Many efforts have also been Under review as a conference paper at ICLR 2021 devoted to studying the non-acceleration issues of SGD with HB and NAG momentum ( Kidambi et al. , 2018 ; Liu & Belkin , 2020 ) , as well as accelerating first-order algorithms with noise-corrupted gradients ( Cohen et al. , 2018 ; Aybat et al. , 2018 ; Lan , 2012 ) . Ghadimi & Lan ( 2013 ; 2016 ) provides analysis for the general stochastic gradient-based optimization algorithms. . Organization . In Section 2 , we review and discuss momentum for accelerating GD for convex smooth optimization . In Section 3 , we present the SRSGD algorithm and its theoretical guarantees . In Section 4 , we verify the efficacy of the proposed SRSGD in training DNNs for image classification on CIFAR and ImageNet . In Section 4.3 , we perform empirical analysis of SRSGD . We end with some concluding remarks . Technical proofs , some experimental details , and more results in training LSTMs ( Hochreiter & Schmidhuber , 1997 ) and WGANs ( Arjovsky et al. , 2017 ; Gulrajani et al. , 2017 ) are provided in the Appendix . Notation . We denote scalars and vectors by lower case and lower case bold face letters , respectively , and matrices by upper case bold face letters . For a vector x = ( x1 , · · · , xd ) ∈ Rd , we denote its ` p norm ( p ≥ 1 ) by ‖x‖p = ( ∑d i=1 |xi|p ) 1/p . For a matrix A , we use ‖A‖p to denote its induced norm by the vector ` p norm . Given two sequences { an } and { bn } , we write an = O ( bn ) if there exists a positive constant s.t . an ≤ Cbn . We denote the interval a to b ( included ) as ( a , b ] . For a function f ( w ) : Rd → R , we denote its gradient as∇f ( w ) and its Hessian as∇2f ( w ) . 2 REVIEW : MOMENTUM IN GRADIENT DESCENT . GD . GD ( 2 ) is a popular approach to solve ( 1 ) , which dates back to Cauchy ( 1847 ) . If f ( w ) is convex and L-smooth ( i.e. , ‖∇2f ( w ) ‖2 ≤ L ) , then GD converges with rate O ( 1/k ) by letting sk ≡ 1/L ( we use this sk in all the discussion below ) , which is independent of the dimension of w. HB . HB ( 4 ) ( Polyak , 1964 ) accelerates GD by using the historical information , which gives wk+1 = wk − sk∇f ( wk ) + µ ( wk −wk−1 ) , µ > 0 . ( 4 ) We can also accelerate GD by using the Nesterov/lookahead momentum , which leads to ( 3 ) . Both ( 3 ) and ( 4 ) have a convergence rate of O ( 1/k ) for convex smooth optimization . Recently , several variants of ( 3 ) have been proposed for DL , e.g. , ( Sutskever et al. , 2013 ) and ( Bengio et al. , 2013 ) . NAG . NAG ( Nesterov , 1983 ; 2018 ; Beck & Teboulle , 2009 ) replaces µ with ( tk − 1 ) /tk+1 , where tk+1 = ( 1 + √ 1 + 4t2k ) /2 with t0 = 1 . NAG iterates as following vk+1 = wk − sk∇f ( wk ) ; wk+1 = vk+1 + tk − 1 tk+1 ( vk+1 − vk ) . ( 5 ) NAG achieves a convergence rate O ( 1/k2 ) with the step size sk = 1/L . Remark 1 . Su et al . ( 2014 ) showed that ( k− 1 ) / ( k+ 2 ) is the asymptotic limit of ( tk − 1 ) /tk+1 . In the following presentation of NAG with restart , for the ease of notation , we will replace the momentum coefficient ( tk − 1 ) /tk+1 with ( k − 1 ) / ( k + 2 ) . Adaptive Restart NAG ( ARNAG ) . The sequences , { f ( wk ) − f ( w∗ ) } where w∗ is the minimum of f ( w ) , generated by GD and GD with constant momentum ( GD + Momentum , which follows ( 3 ) ) converge monotonically to zero . However , that sequence generated by NAG oscillates , as illustrated in Fig . 2 ( a ) when f ( w ) is a quadratic function . O ’ donoghue & Candes ( 2015 ) proposed ARNAG Under review as a conference paper at ICLR 2021 ( 6 ) , which restart the time-varying momentum of NAG according to the change of function values , to alleviate this oscillatory phenomenon . ARNAG iterates as following vk+1 = wk − sk∇f ( wk ) ; wk+1 = vk+1 + m ( k ) − 1 m ( k ) + 2 ( vk+1 − vk ) , ( 6 ) where m ( 1 ) = 1 ; m ( k + 1 ) = m ( k ) + 1 if f ( wk+1 ) ≤ f ( wk ) , and m ( k + 1 ) = 1 otherwise . Scheduled Restart NAG ( SRNAG ) . SR is another strategy to restart the time-varying momentum of NAG . We first divide the total iterations ( 0 , T ] ( integers only ) into a few intervals { Ii } mi=1 = ( Ti−1 , Ti ] , such that ( 0 , T ] = ⋃m i=1 Ii . In each Ii we restart the momentum after every Fi iterations . The update rule is then given by : vk+1 = wk − sk∇f ( wk ) ; wk+1 = vk+1 + ( k mod Fi ) ( k mod Fi ) + 3 ( vk+1 − vk ) . ( 7 ) Both AR and SR accelerate NAG to linear convergence for convex problems with the PolyakLojasiewicz ( PL ) condition ( Roulet & d ’ Aspremont , 2017 ) . Case Study – Quadratic Function . Consider the following quadratic optimization ( Hardt , 2014 ) min x f ( x ) = 1 2 xTLx− xT b , ( 8 ) where L ∈ Rd×d is the Laplacian of a cycle graph , and b is a d-dimensional vector whose first entry is 1 and all the other entries are 0 . Note that f ( x ) is convex with Lipschitz constant 4 . In particular , we set d = 1K ( 1K : = 103 ) . We run T = 50K iterations with step size 1/4 . In SRNAG , we restart , i.e. , we set the momentum to 0 , after every 1K iterations . Fig . 2 ( a ) shows that GD + Momentum as in ( 3 ) converges faster than GD , while NAG speeds up GD + Momentum dramatically and converges to the minimum in an oscillatory fashion . Both AR and SR accelerate NAG significantly .
This paper proposes to restart the momentum parameter in SGD (with Nesterov's momentum) according to some carefully chosen schedules in training deep neural network, which is named as SRSGD. Two different restarting schedules are proposed: linear schedule and exponential schedule. The strong point of this paper is its extensive experimental evaluations, which justify that SRSGD significantly improves the convergence speed and generalization over standard momentum SGD. The empirical analysis also sheds some light on the parameter tuning and interpretation of SRSGD.
SP:2788722ffb82bb4ee15189b47e16d178eccecf3e
Exploring single-path Architecture Search ranking correlations
1 INTRODUCTION . The development and study of algorithms that automatically design neural networks , Neural Architecture Search ( NAS ) , has become a significant influence in recent years ; owed to the promise of creating better models with less human effort and in shorter time . Whereas the first generations of algorithms required training thousands of networks in thousands of GPU hours using reinforcement learning ( Zoph & Le ( 2016 ) ; Zoph et al . ( 2018 ) ) , greedy progressive optimization ( Liu et al . ( 2018a ) ) , regularized evolution ( Real et al . ( 2018 ) ) and more , the invention of weight sharing during search ( Pham et al . ( 2018 ) ) reduced the computation cost to few GPU hours , and thus made NAS accessible to a much wider audience . While this also enables gradient based NAS ( Liu et al . ( 2018b ) ) , the necessity to compare operations against each other leads to an increased memory requirement . The issue is commonly alleviated by training a small search network consisting of cells with a shared topology , later scaling the resulting architecture up by adding more cells and increasing the number of channels . Although the standalone network is often trained from scratch , reusing the search network weights can increase both training speed and final accuracy ( Yan et al . ( 2019 ) ; Hu et al . ( 2020 ) ) . More recent gradient based methods require to have only one path in memory ( Dong & Yang ( 2019 ) ; Cai et al . ( 2019 ) ; Hu et al . ( 2020 ) ) and can even be applied directly to huge data sets . However , the aforementioned weight sharing methods only yield a single result , require manually fine-tuning the loss function when there are multiple objectives , and can not guarantee results within constraints ( e.g . latency , FLOPs ) . The single-path one-shot approach seeks to combine the best of both worlds , requiring only one additional step in the search phase ( Guo et al . ( 2020 ) ) : Firstly a full sized weight-sharing model ( super-network ) is fully trained by randomly choosing one of the available operations at each layer in every training step . Then , as specific architectures can be evaluated by choosing the model ’ s operations accordingly , a hyper-parameter optimization method can be used to find combinations of operations maximizing the super-network accuracy . If the rankings of the architectures by their respective super-network accuracy and by their stand-alone model retraining results are consistent , the quality of the discovered candidates is high . However , since the single-path method ’ s search spaces are often gigantic and the network training costly ( see e.g . Guo et al . ( 2020 ) ; Chu et al . ( 2019b ; a ) ) , a study of the ranking correlation is usually limited to a handful of architectures . In this work we study the single-path one-shot super-network predictions and ranking correlation throughout an entire search space , as all stand-alone model re- sults are known in advance . This enables us to quantify the effects of several super-network training variations and search space subsets , to gain further insights on the popular single-path one-shot method itself . We briefly list the closest related work in Section 2 and introduce the measurement metric , benchmark dataset , super-network training and experiment design in Section 3 . We then systematically evaluate several variations in the single-path one-shot approach with a novel method , computing the ranking correlation of the trained super-networks with the ground-truth top-N best architectures . Experiments on search space subsets in Section 4.1 once again demonstrate that the ranking is more difficult as the search space increases in size , and that the operations that make the ranking especially hard are Zero and Pool . Section 4.2 evaluates Linear Transformers ( Chu et al . ( 2019a ) ) , which we find to perform very well in specific search space subsets , and otherwise even harmful . Furthermore , some commonly used training variations such as learning rate warmup , gradient clipping , data augmentation and regularization are evaluated in Section 4.3 , where we find that none of these provides a measurable improvement . We further test disabling cell topology sharing only during training time and find that training the network in the same way as evaluating it is more effective . We finally list some grains of salt in Section 5 and conclude the paper with Section 6 . 2 RELATED WORK . A high quality architecture ranking prediction is the foundation of any NAS algorithm . In this paper we explore the effects of several super-network training variations on the ranking prediction of the aforementioned single-path one-shot approach ( Guo et al . ( 2020 ) ) . Recent efforts have shown improvements by strictly fair operation sampling in the super-network training phase ( Chu et al . ( 2019b ) ) and adding a linear 1×1 convolution to skip connections , improving training stability ( Chu et al . ( 2019a ) ) . Other works divide the search space , exploring multiple models with different operation-subsets ( Zhao et al . ( 2020 ) ) , or one model with several smaller blocks that use a trained teacher as a guiding signal ( Li et al . ( 2020b ) ) . Due to the often gigantic search spaces and the inherent randomness of network training and hyperparameter optimization algorithms , the reproducibility of NAS methods has become a major concern . NAS Benchmarks attempt to alleviate this issue by providing statistics ( e.g . validation loss , accuracy and latency ) of several thousand different networks on multiple data sets ( Ying et al . ( 2019 ) ; Dong & Yang ( 2020 ) ) , providing the ground-truth training results that we use for our evaluation . 3 METHOD . 3.1 METRIC . As we correlate the super-network accuracy prediction and the benchmark results , but are only interested in a correct ranking , we need a ranking correlation metric . We choose Kendall ’ s Tau ( τ , KT ) , a commonly used ranking metric ( Sciuto et al . ( 2019 ) ; Chu et al . ( 2019b ) ) that counts how often all pairs of observations ( xi , yi ) and ( xj , yj ) 1. are concordant , agreeing on a sorting order ( xi < xj and yi < yj ; or xi > xj and yi > yj ) 2. are discordant , disagreeing on a sorting order ( xi < xj and yi > yj ; or xi > xj and yi < yj ) 3. are neither and is then calculated by their difference and normalized by the number of possible different pairs . τ = ( num concordant ) − ( num discordant ) ( n2 ) τ ranges from -1 in perfect disagreement to +1 in perfect agreement , and is around zero for independent X and Y . A small selection of experiments that use additional metrics can be found in Appendix D . 3.2 NAS-BENCH-201 . NAS-Bench-201 ( Dong & Yang ( 2020 ) ) is a tabular benchmark , which contains training and evaluation statistics of 15625 different architectures on the common vision data sets CIFAR10 , CIFAR100 ( Krizhevsky et al . ( 2009 ) ) and a reduced variant of ImageNet ( Deng et al . ( 2009 ) ) . The models differ in the design of the cell , a building block that is stacked several times to create a network . Within the cell , as visualized in Figure 1 , at six specific positions ( orange edges ) , one of five operations ( Zero , Skip , 1×1 Convolution , 3×3 Convolution , 3×3 Average Pooling ) is chosen ( 56 = 15625 ) . The inputs of each node , such as the cell output ( rightmost node ) are averaged . N * Stem 3x3 Conv reduction ResNet N * reduction ResNet N * Head GAP , Softmax As we are only interested in the final accuracy of each architecture , we average the benchmark test results over all seeds and the last three epochs of training . As the models ’ rankings are quite consistent across all data sets ( Dong & Yang ( 2020 ) ) , we focus on the CIFAR-10-Valid accuracy . Further results are provided in the supplementary material , see Appendix B . Since discrepancies of model rankings for the top performing architectures became apparent ( Dong & Yang ( 2020 ) ) , we measure the accuracy of the trained super-networks according to the top-N ( 10 , 25 , 50 , 150 , 250 , 500 ) benchmark architectures , as well as up to 1000 randomly sampled ones . If a reduced search space ( due to masking operations , 36 = 729 ) contains fewer than 1000 different topologies , it is fully evaluated . 3.3 TRAINING . In our experiments we train various NAS-Bench-201 networks . Small variants have 2 cells per stage ( total of 8 cells , with 3 stages and 2 fixed cells for spatial reduction ) and 32 channels in the first cell , which is roughly similar to common topology sharing methods . Medium sized networks have 4 cells per stage and start with 64 channels . All models were subject to the same training schedule . We used CIFAR10 as training set ( Krizhevsky et al . ( 2009 ) ) , of which we withheld 5000 images for validation . The batch size is 256 , we used SGD with momentum of 0.9 and learning rate of 0.025 , which was cosine annealed to 1e-5 over 250 epochs . All results are averaged over five independent runs with different seeds . Further details are listed in Appendix A . 3.4 EXPERIMENT DESIGN . All of the following experiments are structured the same way : The top-N network architectures ( ordered by top1 accuracy , measured in NAS-Bench-201 ) are selected , and an over-complete supernetwork predicts their respective accuracy values , as seen in Figure 2 . If an operation is not available to the super-network , the top-N networks are also taken from the bench results without that operation . Variations to the search space and the super-network ( structure or training process ) affect the ranking correlation τ between the bench results and the super-network predictions . In the case of Figure 2 , removing the Zero operation from the search space improves τ . To make the figures more compact , the exact benchmark and prediction values are ignored in the further figures , only average prediction accuracy and τ depending on N will be shown ( see Appendix B for further detailed figures ) , as seen in e.g . Figure 4 . We also add the additional metric τa which describes the ranking correlation of the average prediction accuracy depending on N. More formally , τa is computed as described in Section 3.1 on the series of measurements [ ( 10 , A10 ) , ( 25 , A25 ) , ( 50 , A50 ) , ... ] where AN is the accuracy of super-network M with topology Ti and weights θs on the validation data Dvalid , averaged over the top-N topologies and multiple seeds . AN = ∑ s∈seeds 1 |seeds| N∑ i=1 1 N Acc ( M , θs , Ti , Dvalid ) As we increase N ( 10 , 25 , 50 , ... ) AN should monotonically decrease ( e.g . 0.7 , 0.65 , 0.6 , ... ) , so that τa = −1 is the case where the super-network estimates match the bench results best .
+ This paper studies the single-path one-shot super-network predictions and ranking correlation throughout an entire search space, as all stand-alone model results are known in advance. This is a crucial step in NAS. As we know, inaccurate architecture rating is the cause of ineffective NAS in almost all existing NAS methods. It makes nearly all previous NAS methods not better the random architecture selection (suggested by two ICLR 2020 papers and many ICLR 2021 submissions). Therefore, analyzing the architecture rating problem is of most importance in NAS. This paper takes a deep insight into the architecture rating problem, which provides a timely metric for evaluating NAS's effectiveness. (+)
SP:2c21ee98d8ae42925da9d69e11cc2584e7e9dce8
Set Prediction without Imposing Structure as Conditional Density Estimation
1 INTRODUCTION . This paper strives for set prediction . Making multiple predictions with intricate interactions is essential in a variety of applications . Examples include predicting the set of attributes given an image ( Rezatofighi et al. , 2020 ) , detecting all pedestrians in video footage ( Wang et al. , 2018 ) or predicting the future state for a group of molecules ( Noé et al. , 2020 ) . Because of their unordered nature , sets constitute a challenge for both the choice of machine learning model and training objective . Models that violate permutation invariance suffer from lower performance , due to the additional difficulty of needing to learn it . Similarly , loss functions should be indifferent to permutations in both the ground-truth and predictions . Additional ambiguity in the target set exacerbates the problem of defining a suitable set loss . We propose Deep Energy-based Set Prediction ( DESP ) to address the permutation symmetries in both the model and loss function , with a focus on situations where multiple plausible predictions exist . DESP respects the permutation symmetry , by training a permutation invariant energy-based model with a likelihood-based objective . In the literature , assignment-based set distances are applied as loss functions ( Zhang et al. , 2019 ; Kosiorek et al. , 2020 ) . Examples include the Chamfer loss ( Fan et al. , 2017 ) and the Hungarian loss ( Kuhn , 1955 ) . Both compare individual elements in the predicted set to their assigned groundtruth counterpart and vice-versa . While they guarantee permutation invariance , they also introduce a structure over sets , in the form of a metric space . Choosing the wrong set distance can result in implausible predictions , due to interpolations in the set space for underdefined problems . For example , Fan et al . ( 2017 ) observe different set distances to lead to trade-offs between fine-grained shape reconstruction and compactness , for 3d reconstruction from RGB images . As an additional shortcoming , optimizing for a set loss during training poses a limitation on the family of learnable data distributions . More specifically , conditional multi-modal distributions over sets can not be learned by minimizing an assignment-based set loss during training . To overcome the challenges of imposed structure and multi-modal distributions , we propose to view set prediction as a conditional density estimation problem , where P ( Y |x ) denotes the distribution for the target set Y given observed features x . In this work we focus on distributions taking the form of deep energy-based models ( Ngiam et al. , 2011 ; Zhai et al. , 2016 ; Belanger & McCallum , 2016 ) : Pθ ( Y |x ) = 1 Z ( x ; θ ) exp ( −Eθ ( x , Y ) ) , ( 1 ) with Z as the partition function and Eθ the energy function with parameters θ . The expressiveness of neural networks ( Cybenko , 1989 ) allows for learning multi-modal densities Pθ ( Y |x ) . This sets the approach apart from forward-processing models , that either require conditional independence assumptions ( Rezatofighi et al. , 2017 ) , or an order on the predictions , when applying the chain rule ( Vinyals et al. , 2016 ) . Energy-based prediction is regarded as a non-linear combinatorial optimization problem ( LeCun et al. , 2006 ) : Ŷ = argmin Y Eθ ( x , Y ) , ( 2 ) which is typically approximated by gradient descent for deep energy-based models ( Belanger & McCallum , 2016 ; Belanger et al. , 2017 ) . We replace the deterministic gradient descent with a stochastically augmented prediction algorithm , to account for multiple plausible predictions . We show that our stochastic version outperforms standard gradient descent for set prediction tasks . Our main contribution is DESP , a training and prediction framework for set prediction , that removes the limitations imposed by assignment-based set losses . Sampling plays a key role in DESP . For training , sampling approximates the intractable model gradients , while during prediction , sampling introduces stochasticity . We show the generality of our framework by adapting recently proposed permutation invariant neural networks as set prediction deep energy-based models . We demonstrate that our approach ( i ) learns multi-modal distributions over sets ( ii ) makes multiple plausible predictions ( iii ) generalizes over different deep energy-based model architectures and ( iv ) is competitive even in non-stochastic settings , without requiring problem specific loss-engineering . 2 DEEP ENERGY BASED SET PREDICTION . 2.1 TRAINING . Our goal is to train a deep energy based model for set prediction , such that all plausible sets are captured by the model . Regression models with a target in the Rd space , that are trained with a root mean-square error ( RMSE ) loss , implicitly assume a Gaussian distribution over the target . Analog to the RMSE , assignment-based set losses assume a uni-modal distribution over the set space . Training with the negative log-likelihood ( NLL ) circumvents the issues of assignment-based set losses . Notably , NLL does not necessitate explicit element-wise comparisons , but treats the set holistically . We reformulate the NLL for the training data distribution PD as : E ( x , Y ) ∼PD [ − log ( Pθ ( Y |x ) ) ] = E ( x , Y ) ∼PD [ Eθ ( x , Y ) ] + Ex∼PD [ log ( Z ( x ; θ ) ) ] . ( 3 ) The gradient of the left summand is approximated by sampling a mini-batch of n tuples { ( xi , Y +i ) } i=0 .. n from the training set . The gradient of the right summand is approximated by solely sampling input features { xi } i=0 .. m. Directly evaluating ∂∂θ log ( Z ( x ; θ ) ) is intractable ; instead we approximate the gradient by sampling { Y −j } j=0 .. k from the model distribution : ∂ ∂θ log ( Z ( x ; θ ) ) = −EY ∼Pθ [ ∂ ∂θ Eθ ( x , Y ) ] ≈ − k∑ j=0 ∂ ∂θ Eθ ( x , Y − j ) . ( 4 ) The resulting approximate NLL objective is equivalent to contrasting the energy value for real and synthesized targets , with the former being minimized and the latter maximized . The objective is reminiscent of the discriminator ’ s loss in generative adversarial networks ( Goodfellow et al. , 2014 ) , where a real sample is contrasted to a sample synthesized by the generator network . In practice , setting k=1 suffices . The Langevin MCMC algorithm allows for efficient sampling from high dimensional spaces ( Geman & Geman , 1984 ; Neal et al. , 2011 ) . Access to the derivative of the unnormalized density function provides sufficient information for sampling . We apply the following modified transition function and keep only the last sample : Y ( t+1 ) = Y ( t ) − ∂Eθ ( x , Y ( t ) ) ∂Y +U ( t ) , ( 5 ) with U ( t ) ∼ N ( 0 , I ) , > 0 , Y ( 0 ) ∼ N ( 0 , I ) a sample from a fixed initial distribution and Y ( T ) the final sample . The proper formulation of the Langevin MCMC algorithm multiplies the gradient in Equation 5 by a factor and further requires a Metropolis-Hastings acceptance step ( Neal , 1993 ) . We forgo both of these components in favor of increased efficiency , but at the cost of forfeiting theoretical guarantees for desirable properties such as not being trapped in a subset of the sampling space , i.e. , ergodicity . Discarding all but the last sample Y ( T ) of each chain constitutes a non typical usage that undermines the usual importance of ergodicity . Notably , this weakens the hard to meet requirement for the sampler to mix between multiple modes in a single MCMC chain , making it sufficient for independently sampled chains to find different local modes . Although the fixed cutoff at T and missing Metropolis-Hastings update result in a biased sampler , previous works have demonstrated the feasibility of training generative models on images with similar Langevin MCMC methods ( Xie et al. , 2016 ; 2018 ; Nijkamp et al. , 2020 ; Du & Mordatch , 2019 ; Grathwohl et al. , 2019 ) . The model density from Equation 1 approaches the data distribution PD while training , leading to an increased ability in distinguishing between synthesized sets Y − from real sets Y + . This in turn enhances the samples Y − to be closer to the ground-truth , making it harder for the model to discriminate between real and fake . In practice , it is necessary to smooth out the data distribution . Otherwise , the deep energy-based model would be required to fit a distribution with zero density everywhere except the training examples . Any gradient based sampling and prediction algorithm would be rendered useless . Additional Gaussian distributed noise on the data samples Y + alleviates this issue and facilitates stable training . 2.2 PREDICTION . Prediction from an energy-based viewpoint corresponds to finding the set with the lowest energy value . One approach addresses this intractable optimization problem by approximating a local minimum via gradient descent ( Belanger & McCallum , 2016 ; Belanger et al. , 2017 ) . Learning a multimodal distribution is clearly not sufficient , as the deterministic gradient descent algorithm would not be able to cover all possible sets . This would make the learning process pointless , except for a single local minimum in the energy function . We propose to augment the gradient descent optimizer with additional Gaussian noise during the first n steps : Y ( t+1 ) = Y ( t ) − ∂ ∂Y Eθ ( x , Y ( t ) ) +U ( t ) , for t ≤ S , ( 6a ) Y ( t+1 ) = Y ( t ) − ∂ ∂Y Eθ ( x , Y ( t ) ) , for S < t ≤ T. ( 6b ) For simplicity we choose the same maximum number of steps T , both for training and prediction . One interpretation of the prediction procedure is : 1 . Langevin MCMC sample Y ( S ) based on the energy Eθ and 2 . Refine the sample via gradient descent , such that Y ( T ) is a local minimum of Eθ that is close to Y ( S ) . Note that the partial derivative ∂∂Y Eθ ( x , Y ( t ) ) is not stochastic and can be computed independent of a mini-batch . Thus the sole source of randomness lies with the addition of U , resulting in a prediction procedure that allows for different predictions given the same observation . From the set prediction point of view , the noise term addresses an optimization problem that is specific to set functions . Commonly used set neural networks ( Zaheer et al. , 2017 ) , require permutation invariant pooling operators . Examples include sum or mean pooling . Both of these result in identical partial gradients for identical elements : ∂ ∂yi Eθ ( x , Y ) = ∂ ∂yj Eθ ( x , Y ) , ( 7 ) where yi and yj are two different elements in Y with identical value , i.e. , yi=yj . Although we consider set , not multi-set prediction ; in practice the set Y needs to be stored as a tensor of numbers with limited precision . For the purpose of successfully sampling Y from Eθ , we restrict the parameters θ to energy functions with numerically stable derivatives . Specifically , the difference in the gradients of two elements in Y is limited by the difference between the same two elements . This poses the additional difficulty for the optimizer of separating different elements that are too close , next to the original task of moving the element to the correct position . It is reasonable to assume several elements in close vicinity for problems where the set size is much larger than the number of features . The independently sampled noise term helps disambiguate such proximal elements and speeds up the optimization procedure . A naive alternative would be to solely initialize the set Y ( 0 ) with the constraint of a minimal distance between each element . While this approach addresses the problem at step t=0 , it is ignored in the subsequent steps t > 0 , where two elements may have collapsed . Our proposed prediction procedure adds independently sampled noise at several steps ; thus removing some of the responsibility , for separating elements , from the gradient-based optimizer .
Authors propose a new method for formulating set prediction tasks. They propose to use a noisy energy-based model with langevin mcmc + noisy startup as their model. The can approximate the gradient of the likelihood function by computing the enery of ground truth pairs and energy of synthesized pairs where the target is sampled from the model distribution.
SP:fd7c0858a0f642af7bfe4340bbbd8c598a4f5e32
Learning Irreducible Representations of Noncommutative Lie Groups
1 INTRODUCTION . Many tasks in machine learning exactly or approximately obey a continuous symmetry such as 2D rotations . An ML model is said to be equivariant to such a symmetry if the model respects it automatically ( without training ) . Equivariant models have been applied to tasks ranging from computer vision to molecular chemistry , leading to a generalization of equivariance techniques beyond 2D rotations to other symmetries such as 3D rotations . This is enabled by known mathematical results about each new set of symmetries . Specifically , explicit group representation matrices for each new symmetry group are required . For many important symmetries , formulae are readily available to produce these representations . For other symmetries we are not so lucky , and the representations may be difficult to find explicitly . In the worst cases , the classification of the group representations is an open problem in mathematics . For example , in the important case of the homogeneous Galilean group , which we define in section 2 , the classification of the finite dimensional representations is a so-called “ wild algebraic problem ” for which we have only partial solutions ( De Montigny et al. , 2006 ; Niederle & Nikitin , 2006 ; Levy-Leblond , 1971 ) . To construct an equivariant network without prior knowledge of the group representations , novel approaches are needed . In this work , we propose an algorithm LearnRep that finds the representation matrices with high precision . We validate that LearnRep succeeds for the Poincaré group , a set of symmetries governing phenomena from particle physics to object tracking . We further validate LearnRep on two additional sets of symmetries where formulae are known . We apply the Poincaré group representations obtained by LearnRep to construct SpacetimeNet , a Poincaré-equivariant object-tracking model . As far as we are aware , LearnRep is the first automated solver which can find explicit representation matrices for sets of symmetries which form noncompact , noncommutative Lie groups Further , SpacetimeNet is the first object-tracking model with a rigorous guarantee of Poincaré group equivariance . 1.1 GROUP REPRESENTATIONS AND EQUIVARIANT MACHINE LEARNING . Group theory provides the mathematical framework for describing symmetries and building equivariant ML models . Informally , a symmetry group G is a set of invertible transformations α , β ∈ G which can be composed together using a product operation αβ . We are interested in continuous symmetries for which G is a Lie group . In prior constructions of Lie group-equivariant models , group representations are required . For a group G , an n−dimensional ( real ) group representation ρ : G→ Rn×n is a mapping from each element α ∈ G to an n× n-dimensional matrix ρ ( α ) , such that for any two elements α , β ∈ G , we have ρ ( α ) ρ ( β ) = ρ ( αβ ) . Two parallel techniques have been developed for implementing Lie group equivariant neural networks . The first approach was described in general by Cohen et al . ( 2019 ) . For the latter approach taken by Thomas et al . ( 2018 ) ; Anderson et al . ( 2019 ) ; Bogatskiy et al . ( 2020 ) , convolutions and nonlinearities are performed directly on the irreducible representations of the group , which we define in section 2.4 . A common thread in these works has been to utilize existing formulas derived for the matrix elements of these irreducible representations . However , these formulas are only available for specific Lie groups where the representation theory is well-understood . A more convenient approach for extending equivariance to novel Lie groups would utilize an automated computational technique to obtain the required representations . The primary contribution of this work is such a technique . 1.2 CONTRIBUTIONS . In this work , we automate the generation of explicit group representation matrices of Lie groups using an algorithm called LearnRep . LearnRep poses an optimization problem defined by the Lie algebra associated with a Lie group , whose solutions are the representations of the algebra . A penalty term is used to prevent the formation of trivial representations . Gradient descent of the resulting loss function produces nontrivial representations upon convergence . We apply LearnRep to three noncommutative Lie groups for which the finite-dimensional representations are well-understood , allowing us to verify that the representations produced are irreducible by computing their Clebsch-Gordan coefficients and applying Schur ’ s Lemma . One of the Lie groups where LearnRep performs well is the Lorentz group of special relativity . Prior work has applied Lorentz-equivariant models to particle physics . In this work we explain that the Lorentz group along with the larger Poincaré group also governs everyday object-tracking tasks . We construct a Poincaré-equivariant neural network architecture called SpacetimeNet and demonstrate that it can learn to solve a 3D object-tracking task subject to “ motion equivariance , ” where the inputs are a time series of points in space . In summary , our contributions are : • LearnRep , an algorithm which can find irreducible representations of a noncompact and noncommutative Lie group . • SpacetimeNet , a Poincaré group-equivariant neural network applied to object-tracking tasks . Our work contributes towards a general framework and toolset for building neural networks equivariant to novel Lie groups , and motivates further study of Lorentz equivariance for object tracking . 1.3 ORGANIZATION . We summarize all necessary background and terminology in section 2 . We describe the LearnRep algorithm in section 3.1 and SpacetimeNet in section 3.2 . We summarize related work in section 4 . We present our experimental results in section 5 : our experiments in learning irreducible Lie group representations with LearnRep in section 5.1 and the performance of our Poincaré-equivariant SpacetimeNet model on a 3D object tracking task in section 5.2 . 2 TECHNICAL BACKGROUND . We explain the most crucial concepts here and defer to Appendix A.1 for a derivation of the representation theory of the Lorentz group . 2.1 SYMMETRY GROUPS SO ( n ) AND SO ( m , n ) A 3D rotation may be defined as a matrix A : ∈ R3×3 which satisfies the following properties , in which 〈~u , ~v〉 = ∑3 i=1 uivi : ( i ) detA = 1 ( ii ) ∀~u , ~v ∈ R3 , 〈A~u , A~v〉 = 〈~u , ~v〉 ; these imply the set of 3D rotations forms a group under matrix multiplication and this group is denoted SO ( 3 ) . This definition directly generalizes to the n−dimensional rotation group SO ( n ) . For n ≥ 3 , the group SO ( n ) is noncommutative , meaning there are elements A , B ∈ SO ( n ) such that AB 6= BA . Allowing for rotations and translations of n dimensional space gives the n−dimensional special Euclidean group SE ( n ) . SO ( n ) is generalized by a family of groups denoted SO ( m , n ) , with SO ( n ) = SO ( n , 0 ) . For integers m , n ≥ 0 , we define 〈~u , ~v〉m , n = ∑m i=1 uivi − ∑m+n i=m+1 uivi . The group SO ( m , n ) is the set of matrices A ∈ R ( m+n ) × ( m+n ) satisfying ( i-ii ) below : ( i ) detA = 1 ( ii ) ∀~u , ~v ∈ Rm+n , 〈A~u , A~v〉m , n = 〈~u , ~v〉m , n ; these imply that SO ( m , n ) is also a group under matrix multiplication . While the matrices in SO ( n ) can be seen to form a compact manifold for any n , the elements of SO ( m , n ) form a noncompact manifold whenever n , m ≥ 1 . For this reason SO ( n ) and SO ( m , n ) are called compact and noncompact Lie groups respectively . The representations of compact Lie groups are fairly well understood , see Bump ( 2004 ) ; Cartan ( 1930 ) . 2.2 ACTION OF SO ( m , n ) ON SPACETIME We now explain the physical relevance of the groups SO ( m , n ) by reviewing spacetime . We refer to Feynman et al . ( 2011 ) ( ch . 15 ) for a pedagogical overview . Two observers who are moving at different velocities will in general disagree on the coordinates { ( ti , ~ui ) } ⊂ R4 of some events in spacetime . Newton and Galileo proposed that they could reconcile their coordinates by applying a spatial rotation and translation ( i.e. , an element of SE ( 3 ) ) , a temporal translation ( synchronizing their clocks ) , and finally applying a transformation of the following form : ti 7→ ti ~ui 7→ ~ui + ~vti , ( 1 ) in which ~v is the relative velocity of the observers . The transformation equation 1 is called a Galilean boost . The set of all Galilean boosts along with 3D rotations forms the homogeneous Galilean group denoted HG ( 1 , 3 ) . Einstein argued that equation 1 must be corrected by adding terms dependent on ||~v||2/c , in which c is the speed of light and ||~v||2 is the ` 2 norm of ~v . The resulting coordinate transformation is called a Lorentz boost , and an example of its effect is shown in figure 1 . The set of 3D rotations along with Lorentz boosts is exactly the group SO ( 3 , 1 ) . In the case of 2 spatial dimensions , the group is SO ( 2 , 1 ) . Including spacetime translations along with the Lorentz group SO ( n , 1 ) gives the larger Poincaré group Pn with n spatial dimensions . The Poincaré group P3 is the group of coordinate transformations between different observers in special relativity . Consider an object tracking task with input data consisting of a spacetime point cloud with n dimensions of space and 1 of time , and corresponding outputs consisting of object class along with location and velocity vectors . A perfectly accurate object tracking model must respect the action of Pn on the input . That is , given the spacetime points in any observer ’ s coordinate system , the perfect model must give the correct outputs in that coordinate system . Therefore the model should be Pn-equivariant . For low velocities the symmetries of the homogeneous Galilean groups HG ( n , 1 ) provide a good approximation to SO ( n , 1 ) symmetries , so Galilean-equivariance may be sufficient for some tasks . Unfortunately the representations of HG ( n , 1 ) are not entirely understood De Montigny et al . ( 2006 ) ; Niederle & Nikitin ( 2006 ) ; Levy-Leblond ( 1971 ) . 2.3 LIE GROUPS AND LIE ALGEBRAS . Here we give an intuitive summary of Lie groups and Lie algebras , deferring to Bump ( 2004 ) for a rigorous technical background . A Lie group G gives rise to a Lie algebra A as its tangent space at the identity . This is a vector space V along with a bilinear product called the Lie bracket : [ a , b ] which must behave like1 the commutator for an associative ring R with multiplication operation ×R : [ a , b ] = a×R b− b×R a The Lie algebra for SO ( 3 ) , denoted so ( 3 ) , has a basis { J1 , J2 , J3 } satisfying [ Ji , Jj ] = ijkJk , ( 2 ) in which ijk ∈ { ±1 , 0 } is the totally antisymmetric Levi-Civita symbol.2 Intuitively , the Lie bracket shows how group elements near the identity fail to commute . For example , the matrices Rx , Ry , Rz 1Specifically , the Lie bracket must satisfy the Jacobi identity and [ a , a ] = 0 . 2The symbol ijk simply expresses in equation 2 that [ J1 , J2 ] = J3 , [ J2 , J3 ] = J1 , [ J3 , J1 ] = J2 . for rotations about the x and y axes by a small angle θ satisfy RxRy −RyRx = Rz +O ( θ2 ) ; more generally the Lie bracket of equation 2 is satisfied to first order in θ . The Lia algebra so ( 3 , 1 ) of the Lorentz Group SO ( 3 , 1 ) also satisfies equation 2 for the generators J1 , J2 , J3 of its subalgebra isomorphic to so ( 3 ) . It has 3 additional generators denoted K1 , K2 , K3 , which satisfy : [ Ji , Kj ] = ijkKk [ Ki , Kj ] = − ijkJk ( 3 ) These Ki correspond to the Lorentz boosts in the same way that the Ji correspond to the rotations . In general , if A is a t-dimensional Lie algebra with generators T1 , ... , Tt such that [ Ti , Tj ] = t∑ k=1 AijkTk , ( 4 ) we call the tensor Aijk the structure constants of A . For connected matrix Lie groups such as SO ( m , n ) , the structure constants Aijk are easily obtained . For example , one may apply the matrix logarithm to several elements of the group to obtain elements of the algebra , then find a complete basis for the algebra and write the commutator of all basis elements in this basis .
The paper proposes the algorithm LearnRep that uses gradient descent methods to learn Lie algebras from structure constants, before obtaining the corresponding group representation through the exponential map. The algorithm is tested on SO(3), SO(2, 1), and SO(3, 1). In addition to this, the paper proposes SpaceTimeNet, a Poincaré-equivariant neural network architecture, and applies this architecture to an object-tracking task involving MNIST digits moving uniformly through space.
SP:18fb9d26da8c96c91e9787d3b539c483f9fe4871
ProGAE: A Geometric Autoencoder-based Generative Model for Disentangling Protein Conformational Space
1 INTRODUCTION . The complex and time-consuming calculations in molecular simulations have been significantly impacted by the application of machine learning techniques in recent years . In particular , deep learning has been applied to analysis and simulation of molecular trajectories to address diverse problems , such as estimating free energy surfaces , defining optimal reaction coordinates , constructing Markov State Models , and enhancing molecular sampling . For a comprehensive review of deep learning methods for analyzing and enhancing molecular simulations , see ( Noé et al. , 2020a ) and ( Noé et al. , 2020b ) . Specifically , there has been interest in modeling the underlying conformational space of proteins by using deep generative models , e.g . ( Ramaswamy et al. , 2020 ) and ( Bhowmik et al. , 2018 ; Guo et al. , 2020 ; Varolgüneş et al. , 2020 ) . This line of work has mainly attempted to respect the domain geometry by using convolutional AEs on features extracted from 3D structures . In parallel , learning directly from 3D structure has recently developed into an exciting and promising application area for deep learning . In this work , we learn the protein conformational space from a set of protein simulations using geometric deep learning . We also investigate how the geometry of a protein itself can assist learning and improve latent conformational space interpretability . Namely , we consider the influence of intrinsic and extrinsic geometry , where intrinsic geometry is independent of 3D embedding and extrinsic is not . Intrinsic geometric protein properties can be thought to be robust to conformation . To this end , we propose a Protein Geometric Autoencoder model , named ProGAE , to separately encode intrinsic and extrinsic protein geometries . The main contributions of this work are summarized : • Inspired by recent unsupervised geometric disentanglement learning works ( Tatro et al. , 2020 ; Wu et al. , 2019 ; Yang et al. , 2020 ) , we propose a novel geometric autoencoder named ProGAE that directly learns from 3D protein structures via separately encoding intrinsic and extrinsic geometries into disjoint latent spaces used to generate protein structures . • We further propose a novel formulation , in which network intrinsic input is taken as the Cα-Cα pseudo-bond distances , and the extrinsic input is the backbone bond orientations . • Analysis shows that the learned extrinsic geometric latent space can be used for drug classification and drug property prediction , where the drug is bound to the given protein . • We find that the intrinsic geometric latent space , even with small variation in the intrinsic input signal , is important for reducing geometric errors in reconstructed proteins . • We also demonstrate that the learned ProGAE can be transferred to a trajectory of the protein in a different state or a trajectory of a different protein all-together . 1.1 RELATED WORK . Recently , a body of work has used deep learning to learn from protein structures ( Graves et al. , 2020 ; Jing et al. , 2020 ; Klicpera et al. , 2020 ) . For example , Gainza et al . ( 2019 ) uses geometric deep learning to predict docking sites for protein interactions . Ingraham et al . ( 2019a ) solves the inverse folding problem using a graph transformer on the protein backbone . Degiacomi ( 2019 ) uses an AE to generate candidate proteins for docking . Hermosilla et al . ( 2020 ) leverages the notion of intrinsic and extrinsic geometry to define an architecture for a fold classification task . Additionally , there has been focus on directly learning the temporal aspects of molecular dynamics from simulation trajectories , which is not directly related to the current work . Please see Appendix A.1 for a detailed discussion . There is an existing body of recent works that use AE-based approaches for either analyzing and/or generating structures from from the latent space ( Bhowmik et al. , 2018 ; Guo et al. , 2020 ; Ramaswamy et al. , 2020 ; Varolgüneş et al. , 2020 ) , which are most closely related to this work . ( Bhowmik et al. , 2018 ) and ( Guo et al. , 2020 ) aim at learning from and generating protein contact maps , while ProGAE directly deals with 3D structures . Therefore a direct comparison of ProGAE with these methods is not possible . Ramaswamy et al . ( 2019 ) uses a 1D CNN autoencoder trained on backbone coordinates and uses a loss objective comprised of geometric MSE error and physicsbased ( bond length , bond angle , etc . ) error . Due to the unavailability of code or pre-trained model , we were unable to perform a direct comparison . Varolgüneş et al . ( 2020 ) uses a VAE with a Gaussian Mixture Prior for performing clustering of high-dimensional input configurations in the learned latent space . While the method works well on toy models and a standard Alanine Dipeptide benchmark , its performance drops as the size of the protein system grows to 15 amino acids , which is approximately an order smaller than the protein systems studied here . Also , their approach is likely not going to scale well to larger systems due to the use of fully-connected layers in the encoder . These mentioned works have not considered explicit disentangling of intrinsic and extrinsic geometries . To our knowledge , this work is the first to propose an autoencoder for the unsupervised modeling of the geometric disentanglement of protein conformational space captured in molecular simulations . This representation provides better interpretability of the latent space , in terms of the physico-chemical and geometric attributes , results in more geometrically accurate protein conformations , as well as scales and transfers well to larger protein systems . 2 PROGAE FOR PROTEIN CONFORMATIONAL SPACE . First , we introduce the input signal for our novel geometric autoencoder , ProGAE . We then discuss how ProGAE utilizes this signal to generate the conformational space of a protein . Geometric Features of Protein as Network Input ProGAE functions by separately encoding intrinsic and extrinsic geometry with the goal of achieving better latent space interpretability . We clarify these geometric notions . Mathematically , we can consider a manifold ( i.e . surface ) independent of its embedding in Euclidean space . Properties that do not depend on this embedding are known as intrinsic geometric properties , while properties that do are referred to as extrinsic . As an example , given two atoms of a protein , the intrinsic distance between them is the minimum sum of bond lengths in the bond path connecting them , whereas the extrinsic distance is their Euclidean distance in R3 . For an in-depth review of geometry , we refer the reader to ( Do Carmo , 2016 ) . As we will train ProGAE to learn the conformational space of a given protein , the protein primary structure is implicit . Then in treating it as a geometric object , we view the protein at the level of its backbone , which specifies its shape . Given primary structure , reconstructing the protein backbone is sufficient for reconstructing the entire protein . Of importance in the backbone are the Cα atoms , which are the centers of amino acids in the protein . Then a coarse-level description of the backbone is the Cα atoms connected linearly in terms of the protein sequence . This is known as the trace of the protein . We will use the backbone and trace as domains on which to define our signals . Both the protein backbone and its trace can be viewed as polygonal chain in Euclidean space . They are depicted in Figure 1 with their geometric features as network input . We can see that a polygonal chain can be determined up to translation given both the length and orientation of its line segments . Then it follows that the protein backbone can be determined given the length and orientation of its bonds . Here the length of these bonds is intrinsic while the orientation is extrinsic . Thus , to decouple the intrinsic and extrinsic geometry , we can consider encoding these signals . The length of covalent bonds undergo very little change during a simulation performed using an empirical force-field , like the simulations considered in this work . A standard deviation of less than 0.059Å from target bond lengths is common in PDB structures ( Jaskolski et al. , 2007 ) . To this end , we instead consider intrinsic geometry at a coarse level , so that the resulting signal has more variability . Specifically , we use length of the Cα-Cα pseudobonds in the trace as a representative of the intrinsic protein geometry , where as backbone bond orientations capture extrinsic geometry . We model the backbone by the graph , Gb = ( Vb , Eb ) , and the backbone trace by the graph , Gt = ( Vt , Et ) . Then our intrinsic and extrinsic signals , Int : Et → R and Ext : Eb → R3 are defined : Int ( Eij ) = ‖Eij‖2 , Eij ∈ Et , Ext ( Eij ) = sgn ( j − i ) Eij ‖Eij‖ , Eij ∈ Eb . ( 1 ) Network Architecture With the network inputs defined , we discuss the architecture of ProGAE . The core idea is to create an intrinsic latent space , LI ∈ Rni , and an extrinsic latent space , LE ∈ Rne , via separately encoding the intrinsic and extrinsic signals . Consequently , our network contains two encoders , Enci and Ence where : Enci ◦ Int ( Et ) ∈ LI , Ence ◦ Ext ( Eb ) ∈ LE . ( 2 ) We then jointly decode these latent vectors to recover the coordinates of the atoms in the protein backbone . Thus , we formally define the decoder : Dec : LI × LE → R|Vb|×3 . ( 3 ) This high level structure of ProGAE is depicted in Figure 1 . We provide additional details on the encoders and decoders . As these edge-based signals are defined on a geometric domain , it is sensible to learn feature representations using geometric convolution that respects the geometry of the data . The intrinsic encoder is simple , as the signal is defined on the backbone trace , which corresponds to a set of discrete curves . Here each curve corresponds to a protein fragment . Then we define Enci to be a series of 1D convolutions operating on each protein fragment . Each convolution is taken to have a kernel size of 3 and a stride of 2 , being followed with batch normalization layers and ReLU . In contrast , the extrinsic encoder operates on the backbone , which we associate with a graph . So the layers of graph attention networks ( GATs ) introduced in ( Veličković et al. , 2017 ) are a natural tool to use , albeit with some modification . Since the input signal is defined only on the edges of the graph , Eb , we define a signal on the graph vertices , Vb , as the average value of its incident edges , f0 ( vi ) : = 1 | { j ; Ei , · ∈ Eb } | ∑ j ; Ei , ·∈Eb Ext ( Eij ) , vi ∈ Vb . ( 4 ) Then the first layer of the extrinsic encoder uses the edge-convolution operator of ( Gong & Cheng , 2019 ) to map this graph signal to a signal defined exclusively on the graph vertices , Vb . The rest of the encoder contains successive graph attention layers with sparsity defined by a given neighborhood radius . At each layer , the signal is downsampled by a factor of two based on farthest point sampling . Given L layers , this defines a sequence of graphs , { Gb , i } Li=0 , with increasing decimation . As with Enci , each layer is followed with batch normalization and ReLU . Summarily , for l = 1 , 2 , ... , L , fl = σ ◦BN ◦GAT ( dl−1 ) where dl−1 = DS ( fl−1 ; 2 ) , f1 ( vi ) : = GAT ( f0 ( Vb ) , Ext ( Eb ) ) . ( 5 ) Global average pooling is applied to the encoder outputs to introduce invariance to size of Vt and Vb . Dense layers then map each result to their respective latent spaces , LI and LE . The Tanh function is applied to bound the latent space . This produces the intrinsic and extrinsic latent codes , zi and ze . The latent code z is taken as the concatenation of the two latent codes , [ zi , ze ] . A dense layer maps z to the a signal defined on the most decimated backbone graph , Gb , L . The structure of the decoder , Dec , is then analogous to Ence , though the convolutions are transposed . The output of Dec is the point cloud , P̂ , corresponding to the predicted coordinates of the backbone atoms , Vb ≈ P . Loss Function The first term in the loss function is a basic reconstruction loss , where P and P̂ are taken to be the true and predicted coordinates of the protein backbone atoms . Namely , we evaluate their difference using Smooth-L1 loss . This loss is defined , with δ = 2 , as SmoothL1 ( x , y ) : = # x∑ i=1 zi , where zi = min ( δ2 2 ( xi − yi ) 2 , δ|xi − yi| − 1 2 ) , ( 6 ) This loss function modifies L2 loss to be more robust to outliers ( Girshick , 2015 ) . As the reconstruction loss depends on the embedding of the protein in Euclidean space , it may not best measure if intrinsic geometry is faithfully reconstructed . To address this , we consider two encoded proteins with latent codes , [ zi,1 , ze,1 ] and [ zi,2 , ze,2 ] . Then we form a new latent variable , ẑi = ( 1− β ) zi,1 + βzi,2 , ẑe = ze,1 , β ∼ U [ 0 , 1 ] . ( 7 ) Each of these latent variable decodes to some point cloud P̂ . We let Int ( Êt , β ) , Int ( Êt,1 ) , and Int ( Êt,2 ) be the lengths of the Cα-Cα pseudobonds of the generated proteins from the interpolated latent code and the two given latent codes . We then introduce a bond length penalty given by , R ( P̂1 , P̂2 ) = Eβ ||Int ( Êt , β ) − ( ( 1− β ) Int ( Êt,1 ) + βInt ( Êt,2 ) ) ||1 , β ∈ U [ 0 , 1 ] . ( 8 ) This penalty can be viewed as promoting faithful reconstruction of the pseudobond length between Cα atoms , as well as a smooth interpolation of these lengths along paths in LI , that is independent of LE . This penalty is analogous to the metric preservation regularizer introduced in ( Cosmo et al. , 2020 ) for 3D meshes . Thus , the loss function L for ProGAE is , L ( ( P̂1 , P̂2 ) , ( P1 , P2 ) ) : = 2∑ i=1 SmoothL1 ( P̂i , Pi ) + λRR ( P̂1 , P̂2 ) . ( 9 )
The paper introduces a geometric variational autoencoder for capturing protein structural ensembles, disentangling intrinsic and extrinsic geometry into separate latent spaces. The model is shown to accurately reconstruct protein structure, and the difference between the intrinsic and extrinsic latent spaces are explored. Finally, the model is tested in a transfer-learning setting, where it displays encouraging results.
SP:f21bf18198261a5400f8aa437e305ea60b7695ac
Adaptive Single-Pass Stochastic Gradient Descent in Input Sparsity Time
We study sampling algorithms for variance reduction methods for stochastic optimization . Although stochastic gradient descent ( SGD ) is widely used for large scale machine learning , it sometimes experiences slow convergence rates due to the high variance from uniform sampling . In this paper , we introduce an algorithm that approximately samples a gradient from the optimal distribution for a common finite-sum form with n terms , while just making a single pass over the data , using input sparsity time , and Õ ( Td ) space . Our algorithm can be implemented in big data models such as the streaming and distributed models . Moreover , we show that our algorithm can be generalized to approximately sample Hessians and thus provides variance reduction for second-order methods as well . We demonstrate the efficiency of our algorithm on large-scale datasets . 1 INTRODUCTION . There has recently been tremendous progress in variance reduction methods for stochastic gradient descent ( SGD ) methods for the standard convex finite-sum form optimization problem min x∈Rd F ( x ) : = 1 n ∑n i=1 fi ( x ) , where f1 , . . . , fn : Rd → R is a set of convex functions that commonly represent loss functions . Whereas gradient descent ( GD ) performs the update rule xt+1 = xt − ηt∇F ( xt ) on the iterative solution xt at iterations t = 1 , 2 , . . . , SGD ( Robbins & Monro , 1951 ; Nemirovsky & Yudin , 1983 ; Nemirovski et al. , 2009 ) picks it ∈ [ n ] in iteration t with probability pit and performs the update rule xt+1 = xt − ηtnpit∇fit ( xt ) , where ∇fit is the gradient ( or a subgradient ) of fit and ηt is some predetermined learning rate . Effectively , training example it is sampled with probability pit and the model parameters are updated using the selected example . The SGD update rule only requires the computation of a single gradient at each iteration and provides an unbiased estimator to the full gradient , compared to GD , which evaluates n gradients at each iteration and is prohibitively expensive for large n. However , since SGD is often performed with uniform sampling so that the probability pi , t of choosing index i ∈ [ n ] at iteration t is pi , t = 1n at all times , the variance introduced by the randomness of sampling a specific vector function can be a bottleneck for the convergence rate of the iterative process . Thus the subject of variance reduction beyond uniform sampling has been well-studied in recent years ( Roux et al. , 2012 ; Johnson & Zhang , 2013 ; Defazio et al. , 2014 ; Reddi et al. , 2015 ; Zhao & Zhang , 2015 ; Daneshmand et al. , 2016 ; Needell et al. , 2016 ; Stich et al. , 2017 ; Johnson & Guestrin , 2018 ; Katharopoulos & Fleuret , 2018 ; Salehi et al. , 2018 ; Qian et al. , 2019 ) . A common technique to reduce variance is importance sampling , where the probabilities pi , t are chosen so that vector functions with larger gradients are more likely to be sampled . Thus for Var ( v ) : = E [ ‖v‖22 ] − ‖E [ v ] ‖22 , for a random vector v , then pi , t = 1 n for uniform sampling implies σ2t = Var ( 1 npit , t ∇fit ) = 1 n2 ( n n∑ i=1 ‖∇fi ( xt ) ‖2 − n2 · ‖∇F ( xt ) ‖2 ) , whereas importance sampling with pi , t = ‖∇fi ( xt ) ‖∑n j=1‖∇fj ( xt ) ‖ gives σ2t = Var ( 1 npit , t ∇fit ) = 1 n2 ( n∑ i=1 ‖∇fi ( xt ) ‖ ) 2 − n2 · ‖∇F ( xt ) ‖2 , which is at most 1n2 ( n ∑ ‖∇fi ( xt ) ‖2 − n2 · ‖∇F ( xt ) ‖2 ) , by the Root-Mean Square-Arithmetic Mean Inequality , and can be significantly less . Hence the variance at each step is reduced , possibly substantially , e.g. , Example 1.3 and Example 1.4 , by performing importance sampling instead of uniform sampling . In fact , it follows from the Cauchy-Schwarz inequality that the above importance sampling probability distribution is the optimal distribution for variance reduction . However , computing the probability distribution for importance sampling requires computing the gradients in each round , which is too expensive in the first place . Second-Order Methods . Although first-order methods such as SGD are widely used , they do sometimes have issues such as sensitivity to the choice of hyperparameters , stagnation at high training errors , and difficulty in escaping saddle points . By considering second-order information such as curvature , second-order optimization methods are known to be robust to several of these issues , such as ill-conditioning . For example , Newton ’ s method can achieve a locally super-linear convergence rate under certain conditions , independent of the problem . Although naı̈ve second-order methods are generally too slow compared to common first-order methods , stochastic Newton-type methods such as Gauss-Newton have shown to be scalable in the scientific computing community ( Roosta-Khorasani et al. , 2014 ; Roosta-Khorasani & Mahoney , 2016a ; b ; Xu et al. , 2019 ; 2020 ) . Our Contributions . We give a time efficient algorithm that provably approximates the optimal importance sampling using a small space data structure . Remarkably , our data structure can be implemented in big data models such as the streaming model , which just takes a single pass over the data , and the distributed model , which requires just a single round of communication between parties holding each loss function . For ∇F = 1n ∑ ∇fi ( x ) , where each ∇fi = f ( 〈ai , x〉 ) · ai for some polynomial f and vector ai ∈ Rd , let nnz ( A ) be the number of nonzero entries of A : = a1◦ . . .◦an1 . Thus for T iterations , where d T n , GD has runtime Õ ( T · nnz ( A ) ) while our algorithm has runtime T · poly ( d , log n ) + Õ ( nnz ( A ) ) , where we use Õ ( · ) to suppress polylogarithmic terms . Theorem 1.1 Let ∇F = 1n ∑ ∇fi ( x ) , where each ∇fi = f ( 〈ai , x〉 ) · ai for some polynomial f and vector ai ∈ Rd and let nnz ( A ) be the number of nonzero entries of A : = a1 ◦ . . . ◦ an . For d T n , there exists an algorithm that performs T steps of SGD and at each step samples a gradient within a constant factor of the optimal probability distribution . The algorithm requires a single pass over A and uses Õ ( nnz ( A ) ) pre-processing time and Õ ( Td ) space . Theorem 1.1 can be used to immediately obtain improved convergence guarantees for a class of functions whose convergence rate depends on the variance σ2t , such as µ-smooth functions or strongly convex functions . Recall that SGD offers the following convergence guarantees for smooth functions : Theorem 1.2 ( Nemirovski et al. , 2009 ; Meka , 2017 ) Let F be a µ-smooth convex function and xopt = argminF ( x ) . Let σ2 be an upper bound for the variance of the unbiased estimator across all iterations and xk = x1+ ... +xkk . Let each step-size ηt be η ≤ 1 µ . Then for SGD with initial position x0 , E [ F ( xk ) − F ( xopt ) ] ≤ 1 2ηk ‖x0 − xopt‖22 + ησ2 2 , so that k = O ( 1 2 ( σ2 + µ ‖x0 − xopt‖22 ) 2 ) iterations suffices to obtain an -approximate optimal value by setting η = 1√ k . In the convergence guarantees of Theorem 1.2 , we obtain a constant factor approximation to the variance σ = σopt from optimal importance sampling , which can be significantly better than the 1We use the notation a ◦ b to denote the vertical concatenation [ a b ] . variance σ = σuniform from uniform sampling in standard SGD . We first show straightforward examples where uniform sampling an index performs significantly worse than importance sampling . For example , if∇fi ( x ) = 〈ai , x〉 · ai , then for A = a1 ◦ . . . ◦ an : Example 1.3 When the nonzero entries of the input A are concentrated in a small number of vectors ai , uniform sampling will frequently sample gradients that are small and make little progress , whereas importance sampling will rarely do so . In an extreme case , the A can contain exactly one nonzero vector ai and importance sampling will always output the full gradient whereas uniform sampling will only find the nonzero row with probability 1n . Example 1.4 It may be that all rows of A have large magnitude , but x is nearly orthogonal to most of the rows of A and heavily in the direction of row ar . Then 〈ai , x〉 · ai is small in magnitude for most i , but 〈ar , x〉 · ar is large so uniform sampling will often output small gradients while importance sampling will output 〈ar , x〉 · ar with high probability . Thus Example 1.3 shows that naı̈ve SGD with uniform sampling can suffer up to a multiplicative n factor loss in the convergence rate of Theorem 1.2 compared to that of SGD with importance sampling whereas Example 1.4 shows a possible additive n factor loss . Unlike a number of previous variance reduction methods , we do not require distributional assumptions ( Bouchard et al. , 2015 ; Frostig et al. , 2015 ; Gopal , 2016 ; Jothimurugesan et al. , 2018 ) or offline access to the data ( Roux et al. , 2012 ; Johnson & Zhang , 2013 ; Defazio et al. , 2014 ; Reddi et al. , 2015 ; Zhao & Zhang , 2015 ; Daneshmand et al. , 2016 ; Needell et al. , 2016 ; Stich et al. , 2017 ; Johnson & Guestrin , 2018 ; Katharopoulos & Fleuret , 2018 ; Salehi et al. , 2018 ; Qian et al. , 2019 ) . On the other hand , for applications such as neural nets in which the parameters in the loss function can change , we can use a second-order approximation for a number of iterations , then reread the data to build a new second-order approximation when necessary . We complement our main theoretical result with empirical evaluations comparing our algorithm to SGD with uniform sampling for logistic regression on the a9a Adult dataset collected by UCI and retrieved from LibSVM ( Chang & Lin , 2011 ) . Our evaluations demonstrate that for various step-sizes , our algorithm has significantly better performance than uniform sampling across both the number of SGD iterations and surprisingly , wall-clock time . We then show that our same framework can also be reworked to approximate importance sampling for the Hessian , thereby performing variance reduction for second-order optimization methods . ( Xu et al. , 2016 ) reduce the bottleneck of many second-order optimization methods to the task of sampling s rows of A = a1 ◦ . . . ◦ an so that a row ai is sampled with probability ‖f ( 〈ai , x〉 ) ·a > i ai‖2F∑n i=1‖f ( 〈ai , x〉 ) ·a > i ai‖2F , for some fixed function f so that the Hessian H has the form H : = ∇2F = 1n ∑ ∇f ( 〈ai , x〉 ) a > i ai . ( Xu et al. , 2016 ) show that this finite-sum form arises frequently in machine learning problems such as logistic regression with least squares loss . Theorem 1.5 Let∇2F = 1n ∑ ∇fi ( x ) , where each∇fi = f ( 〈ai , x〉 ) · a > i ai for some polynomial f and vector ai ∈ Rd and let nnz ( A ) be the number of nonzero entries of A : = a1 ◦ . . . ◦ an . For d T n , there exists an algorithm that subsamples T Hessians within a constant factor of the optimal probability distribution . The algorithm requires a single pass over A and uses Õ ( nnz ( A ) ) pre-processing time and Õ ( Td ) space .
This paper develops an efficient streaming algorithm to approximate the optimal importance sampling weights for variance reduction in finite-sum SGD. The optimal weights are proportional to each sample's gradient norm; this work uses AMS-like moment estimation to sketch gradient norms which take the form of a bounded-degree polynomial, in time linear in the input sparsity and polynomial in the dimension d, iteration count T, and the log of the number of the samples n. A second-order analogue is derived for approximating optimal importance weights for sampling the Hessian. Some experiments are shown with more simplistic importance weight estimators (not the proposed algorithm), to demonstrate the advantage over uniform sampling.
SP:637780028802e048cce8c2a18cbaaa851e915b38
Interpretable Models for Granger Causality Using Self-explaining Neural Networks
1 INTRODUCTION . Granger causality ( GC ) ( Granger , 1969 ) is a popular practical approach for the analysis of multivariate time series and has become instrumental in exploratory analysis ( McCracken , 2016 ) in various disciplines , such as neuroscience ( Roebroeck et al. , 2005 ) , economics ( Appiah , 2018 ) , and climatology ( Charakopoulos et al. , 2018 ) . Recently , the focus of the methodological research has been on inferring GC under nonlinear dynamics ( Tank et al. , 2018 ; Nauta et al. , 2019 ; Wu et al. , 2020 ; Khanna & Tan , 2020 ; Löwe et al. , 2020 ) , causal structures varying across replicates ( Löwe et al. , 2020 ) , and unobserved confounding ( Nauta et al. , 2019 ; Löwe et al. , 2020 ) . To the best of our knowledge , the latest powerful techniques for inferring GC do not target the effect sign detection ( see Section 2.1 for a formal definition ) or exploration of effect variability with time and , thus , have limited interpretability . This drawback defeats the purpose of GC analysis as an exploratory statistical tool . In some nonlinear interactions , one variable may have an exclusively positive or negative effect on another if it consistently drives the other variable up or down , respectively . Negative and positive causal relationships are common in many real-world systems , for example , gene regulatory networks feature inhibitory effects ( Inoue et al. , 2011 ) or in metabolomics , certain compounds may inhibit or promote synthesis of other metabolites ( Rinschen et al. , 2019 ) . Differentiating between the two types of interactions would allow inferring and understanding such inhibition and promotion relationships in real-world dynamical systems and would facilitate a more comprehensive and insightful exploratory analysis . Therefore , we see a need for a framework capable of inferring nonlinear GC which is more amenable to interpretation than previously proposed methods ( Tank et al. , 2018 ; Nauta et al. , 2019 ; Khanna & Tan , 2020 ) . To this end , we introduce a novel method for detecting nonlinear multivariate Granger causality that is interpretable , in the sense that it allows detecting effect signs and exploring influences among variables throughout time . The main contributions of the paper are as follows : 1 . We extend self-explaining neural network models ( Alvarez-Melis & Jaakkola , 2018 ) to time series analysis . The resulting autoregressive model , named generalised vector autore- gression ( GVAR ) , is interpretable and allows exploring GC relations between variables , signs of Granger-causal effects , and their variability through time . 2 . We propose a framework for inferring nonlinear multivariate GC that relies on a GVAR model with sparsity-inducing and time-smoothing penalties . Spurious associations are mitigated by finding relationships that are stable across original and time-reversed ( Winkler et al. , 2016 ) time series data . 3 . We comprehensively compare the proposed framework and the powerful baseline methods of Tank et al . ( 2018 ) , Nauta et al . ( 2019 ) , and Khanna & Tan ( 2020 ) on a range of synthetic time series datasets with known Granger-causal relationships . We evaluate the ability of the methods to infer the ground truth GC structure and effect signs . 2 BACKGROUND AND RELATED WORK . 2.1 GRANGER CAUSALITY . Granger-causal relationships are given by a set of directed dependencies within multivariate time series . The classical definition of Granger causality is given , for example , by Lütkepohl ( 2007 ) . Below we define nonlinear multivariate GC , based on the adaptation by Tank et al . ( 2018 ) . Consider a time series with p variables : { xt } t∈Z+ = { ( x1t x 2 t ... x p t ) > } t∈Z+ . Assume that causal relationships between variables are given by the following structural equation model : xit : = gi ( x11 : ( t−1 ) , ... , x j 1 : ( t−1 ) , ... , x p 1 : ( t−1 ) ) + εit , for 1 ≤ i ≤ p , ( 1 ) where xj1 : ( t−1 ) is a shorthand notation for x j 1 , x j 2 , ... , x j t−1 ; ε i t are additive innovation terms ; and gi ( · ) are potentially nonlinear functions , specifying how the future values of variable xi depend on the past values of x . We then say that variable xj does not Granger-cause variable xi , denoted as xj 6−→ xi , if and only if gi ( · ) is constant in xj1 : ( t−1 ) . Depending on the form of the functional relationship gi ( · ) , we can also differentiate between positive and negative Granger-causal effects . In this paper , we define the effect sign as follows : if gi ( · ) is increasing in all xj1 : ( t−1 ) , then we say that variable x j has a positive effect on xi , if gi ( · ) is decreasing in xj1 : ( t−1 ) , then x j has a negative effect on xi . Note that an effect may be neither positive nor negative . For example , xj can ‘ contribute ’ both positively and negatively to the future of xi at different delays , or , for instance , the effect of xj on xi could depend on another variable . Granger-causal relationships can be summarised by a directed graph G = ( V , E ) , referred to as summary graph ( Peters et al. , 2017 ) , where V = { 1 , ... , p } is a set of vertices corresponding to variables , and E = { ( i , j ) : xi −→ xj } is a set of edges corresponding to Granger-causal relationships . Let A ∈ { 0 , 1 } p×p denote the adjacency matrix of G. The inference problem is then to estimateA from observations { xt } Tt=1 , where T is the length of the time series observed . In practice , we usually fit a time series model that explicitly or implicitly infers dependencies between variables . Consequently , a statistical test for GC is performed . A conventional approach ( Lütkepohl , 2007 ) used to test for linear Granger causality is the linear vector autoregression ( VAR ) ( see Appendix A ) . 2.2 RELATED WORK . 2.2.1 TECHNIQUES FOR INFERRING NONLINEAR GRANGER CAUSALITY . Relational inference in time series has been studied extensively in statistics and machine learning . Early techniques for inferring undirected relationships include time-varying dynamic Bayesian networks ( Song et al. , 2009 ) and time-smoothed , regularised logistic regression with time-varying coefficients ( Kolar et al. , 2010 ) . Recent approaches to inferring Granger-causal relationships leverage the expressive power of neural networks ( Montalto et al. , 2015 ; Wang et al. , 2018 ; Tank et al. , 2018 ; Nauta et al. , 2019 ; Khanna & Tan , 2020 ; Wu et al. , 2020 ; Löwe et al. , 2020 ) and are often based on regularised autoregressive models , reminiscent of the Lasso Granger method ( Arnold et al. , 2007 ) . Tank et al . ( 2018 ) propose using sparse-input multilayer perceptron ( cMLP ) and long short-term memory ( cLSTM ) to model nonlinear autoregressive relationships within time series . Building on this , Khanna & Tan ( 2020 ) introduce a more sample efficient economy statistical recurrent unit ( eSRU ) architecture with sparse input layer weights . Nauta et al . ( 2019 ) propose a temporal causal discovery framework ( TCDF ) that leverages attention-based convolutional neural networks to test for GC . Appendix B contains further details about these and other relevant methods . Approaches discussed above ( Tank et al. , 2018 ; Nauta et al. , 2019 ; Khanna & Tan , 2020 ) and in Appendix B ( Marinazzo et al. , 2008 ; Ren et al. , 2020 ; Montalto et al. , 2015 ; Wang et al. , 2018 ; Wu et al. , 2020 ; Löwe et al. , 2020 ) focus almost exclusively on relational inference and do not allow easily interpreting signs of GC effects and their variability through time . In this paper , we propose a more interpretable inference framework , building on self explaining-neural networks ( Alvarez-Melis & Jaakkola , 2018 ) , that , as shown by experiments , performs on par with the techniques described herein . 2.2.2 STABILITY-BASED SELECTION PROCEDURES . The literature on stability-based model selection is abundant ( Ben-Hur et al. , 2002 ; Lange et al. , 2003 ; Meinshausen & Bühlmann , 2010 ; Sun et al. , 2013 ) . For example , Ben-Hur et al . ( 2002 ) propose measuring stability of clustering solutions under perturbations to assess structure in the data and select an appropriate number of clusters . Lange et al . ( 2003 ) propose a somewhat similar approach . Meinshausen & Bühlmann ( 2010 ) introduce the stability selection procedure applicable to a wide range of high-dimensional problems : their method guides the choice of the amount of regularisation based on the error rate control . Sun et al . ( 2013 ) investigate a similar procedure in the context of tuning penalised regression models . 2.2.3 SELF-EXPLAINING NEURAL NETWORKS . Alvarez-Melis & Jaakkola ( 2018 ) introduce self-explaining neural networks ( SENN ) – a class of intrinsically interpretable models motivated by explicitness , faithfulness , and stability properties . A SENN with a link function g ( · ) and interpretable basis concepts h ( x ) : Rp → Rk follows the form f ( x ) = g ( θ ( x ) 1h ( x ) 1 , ... , θ ( x ) kh ( x ) k ) , ( 2 ) where x ∈ Rp are predictors ; and θ ( · ) is a neural network with k outputs . We refer to θ ( x ) as generalised coefficients for data point x and use them to ‘ explain ’ contributions of individual basis concepts to predictions . In the case of g ( · ) being sum and concepts being raw inputs , Equation 2 simplifies to f ( x ) = p∑ j=1 θ ( x ) jxj . ( 3 ) Appendix C lists additional properties SENNs need to satisfy , as defined by Alvarez-Melis & Jaakkola ( 2018 ) . A SENN is trained by minimising the following gradient-regularised loss function , which balances performance with interpretability : Ly ( f ( x ) , y ) + λLθ ( f ( x ) ) , ( 4 ) where Ly ( f ( x ) , y ) is a loss term for the ground classification or regression task ; λ > 0 is a regularisation parameter ; and Lθ ( f ( x ) ) = ∥∥∇xf ( x ) − θ ( x ) > Jhx ( x ) ∥∥2 is the gradient penalty , where Jhx is the Jacobian of h ( · ) w.r.t . x . This penalty encourages f ( · ) to be locally linear . 3 METHOD . We propose an extension of SENNs ( Alvarez-Melis & Jaakkola , 2018 ) to autoregressive time series modelling , which is essentially a vector autoregression ( see Equation 11 in Appendix A ) with generalised coefficient matrices . We refer to this model as generalised vector autoregression ( GVAR ) . The GVAR model of order K is given by xt = K∑ k=1 Ψθk ( xt−k ) xt−k + εt , ( 5 ) where Ψθk : Rp → Rp×p is a neural network parameterised by θk . For brevity , we omit the intercept term here and in following equations . No specific distributional assumptions are made on the additive innovation terms εt . Ψθk ( xt−k ) is a matrix whose components correspond to the generalised coefficients for lag k at time step t. In particular , the component ( i , j ) of Ψθk ( xt−k ) corresponds to the influence of xjt−k on x i t. In our implementation , we use K MLPs for Ψθk ( · ) with p input units and p2 outputs each , which are then reshaped into an Rp×p matrix . Observe that the model defined in Equation 5 takes on a form of SENN ( see Equation 3 ) with future time series values as the response , past values as basis concepts , and sum as a link function . Relationships between variables x1 , ... , xp and their variability throughout time can be explored by inspecting generalised coefficient matrices . To mitigate spurious inference in multivariate time series , we train GVAR by minimising the following penalised loss function with the mini-batch gradient descent : 1 T −K T∑ t=K+1 ‖xt − x̂t‖22 + λ T −K T∑ t=K+1 R ( Ψt ) + γ T −K − 1 T−1∑ t=K+1 ‖Ψt+1 −Ψt‖22 , ( 6 ) where { xt } Tt=1 is a single observed replicate of a p-variate time series of length T ; x̂t =∑K k=1 Ψθ̂k ( xt−k ) xt−k is the one-step forecast for the t-th time point by the GVAR model ; Ψt is a shorthand notation for the concatenation of generalised coefficient matrices at the t-th time point : [ Ψθ̂K ( xt−K ) Ψθ̂K−1 ( xt−K+1 ) ... Ψθ̂1 ( xt−1 ) ] ∈ Rp×Kp ; R ( · ) is a sparsity-inducing penalty term ; and λ , γ ≥ 0 are regularisation parameters . The loss function ( see Equation 6 ) consists of three terms : ( i ) the mean squared error ( MSE ) loss , ( ii ) a sparsity-inducing regulariser , and ( iii ) the smoothing penalty term . Note , that in presence of categorically-valued variables the MSE term can be replaced with e.g . the cross-entropy loss . The sparsity-inducing term R ( · ) is an appropriate penalty on the norm of the generalised coefficient matrices . Examples of possible penalties for the linear VAR are provided in Table 4 in Appendix A . These penalties can be easily adapted to the GVAR model . In the current implementation , we employ the elastic-net-style penalty term ( Zou & Hastie , 2005 ; Nicholson et al. , 2017 ) R ( Ψt ) = α ‖Ψt‖1 + ( 1− α ) ‖Ψt‖ 2 2 , with α = 0.5 . The smoothing penalty term , given by 1T−K−1 ∑T−1 t=K+1 ‖Ψt+1 −Ψt‖ 2 2 , is the average norm of the difference between generalised coefficient matrices for two consecutive time points . This penalty term encourages smoothness in the evolution of coefficients w.r.t . time and replaces the gradient penalty Lθ ( f ( x ) ) from the original formulation of SENN ( see Equation 4 ) . Observe that if the term is constrained to be 0 , then the GVAR model behaves as a penalised linear VAR on the training data : coefficient matrices are invariant across time steps . for the loss function in Appendix D .
This paper primarily deals with learning Granger-causal relationships in multivariate time series in the nonlinear dynamics setting. The core method uses vector autoregressive modeling with sparsity inducing regularizers (elastic net and smoothness based fused lasso) along with the recently proposed with self-explaining neural networks (for interpretability). The authors also augment the framework by learning Granger-causal structures that are stable on original and time-reversed data. Exhaustive empirical analysis is done with recent GC baselines. Some of my concerns with the paper are the following
SP:f7c98dd7ab57f9ffc12e7d462ac5d2ae04504504
Improving Self-supervised Pre-training via a Fully-Explored Masked Language Model
1 INTRODUCTION . Large-scale pre-trained language models have attracted tremendous attention recently due to their impressive empirical performance on a wide variety of NLP tasks . These models typically abstract semantic information from massive unlabeled corpora in a self-supervised manner . Masked language model ( MLM ) has been widely utilized as the objective for pre-training language models . In the MLM setup , a certain percentage of words within the input sentence are masked out , and the model learns useful semantic information by predicting those missing tokens . Previous work found that the specific masking strategy employed during pre-training plays a vital role in the effectiveness of the MLM framework ( Liu et al. , 2019 ; Joshi et al. , 2019 ; Sun et al. , 2019 ) . Specifically , Sun et al . ( 2019 ) introduce entity-level and phrase-level masking strategies , which incorporate the prior knowledge within a sentence into its masking choice . Moreover , Joshi et al . ( 2019 ) propose to mask out random contiguous spans , instead of tokens , since they can serve as more challenging targets for the MLM objective . Although effective , we identify an issue associated with the random sampling procedure of these masking strategies . Concretely , the difficulty of predicting each masked token varies and is highly dependent on the choice of the masking tokens . For example , predicting stop words such as “ the ” or “ a ” tends to be easier relative to nouns or rare words . As a result , with the same input sentence , randomly sampling certain input tokens/spans , as a typical masking recipe , will result in undesirable large variance while estimating the gradients . It has been widely demonstrated that large gradient variance typically hurts the training efficiency with stochastic gradient optimization algorithms ( Zhang & Xiao , 2019 ; Xiao & Zhang , 2014 ; Johnson & Zhang , 2013 ) . Therefore , we advocate that obtaining gradients with a smaller variance has the potential to enable more sample-efficient learning and thus accelerate the self-supervised learning stage . In this paper , we start by introducing a theoretical framework to quantify the variance while estimating the training gradients . The basic idea is to decompose the total gradient variance into two terms , where the first term is induced by the data sampling process and the second one relates to the sampling procedure of masked tokens . Theoretical analysis on the second variance term demonstrates that it can be minimized by reducing the gradient covariance between two masked sequences . Furthermore , we conduct empirical investigation on the correlation between the gradient ’ s covariance while utilizing two masked sequences for training and the Hamming distance between these sequences . We observed that that the gradients ’ covariance tends to decrease monotonically w.r.t the sequences ’ Hamming distance . Inspired by the observations above , we propose a fully-explored masking strategy , which maximizes the Hamming distance between any of two sampled masks on a fixed text sequence . First , a text sequence is randomly divided into multiple non-overlapping segments , where each token ( e.g . subword , word or span ) belongs to one of them . While the model processes this input , several different training samples are constructed by masking out one of these segments ( and leaving the others as the contexts ) . In this manner , the gradient w.r.t . this input sequence can be calculated by averaging the gradients across multiple training samples ( produced by the same input sequence ) . We further verify , under our theoretical framework , that the gradients obtained with such a scheme tend to have smaller variance , and thus can improve the efficiency of the pre-training process . We evaluate the proposed masking strategies on both continued pre-training ( Gururangan et al. , 2020 ) and from-scratch pre-training scenarios . Specifically , Computer Science ( CS ) and News domain corpus ( Gururangan et al. , 2020 ) are leveraged to continually pre-train RoBERTa models , which are then evaluated by fine-tuning on downstream tasks of the corresponding domain . It is demonstrated that the proposed fully-explored masking strategies lead to pre-trained models with stronger generalization ability . Even with only a subset of the pre-training corpus utilized in ( Gururangan et al. , 2020 ) , our model consistently outperforms reported baselines across four natural language understanding tasks considered . Besides , we also show the effectiveness of our method on the pre-training of language models from scratch . Moreover , the comparison between fully-explored and standard masking strategies in terms of their impacts on the model learning efficiency further validates the advantages of the proposed method . Extensive ablation studies are further conducted to explore the robustness of the proposed masking scheme . 2 RELATED WORK . Self-supervised Language Pre-training Self-supervised learning has been demonstrated as a powerful paradigm for natural language pre-training in recent years . Significant research efforts have been devoted to improve different aspects of the pre-training recipe , including training objective ( Lewis et al. , 2019 ; Clark et al. , 2019 ; Bao et al. , 2020 ; Liu et al. , 2019 ) , architecture design ( Yang et al. , 2019 ; He et al. , 2020 ) , the incorporation of external knowledge ( Sun et al. , 2019 ; Zhang et al. , 2019 ) , etc . The idea of self-supervised learning has also been extended to generation tasks and achieves great results ( Song et al. , 2019 ; Dong et al. , 2019 ) . Although impressive empirical performance has been shown , relatively little attention has been paid to the efficiency of the pre-training stage . ELECTRA ( Clark et al. , 2019 ) introduced a discriminative objective that is defined over all input tokens . Besides , it has been showed that incorporating language structures ( Wang et al. , 2019 ) or external knowledge ( Sun et al. , 2019 ; Zhang et al. , 2019 ) into pre-training could also help the language models to better abstract useful information from unlabeled samples . In this work , we approach the training efficiency issue from a different perspective , and argue that the masking strategies , as an essential component within the MLM framework , plays a vital role especially in efficient pre-training . Notably , our fully-explored masking strategies can be easily combined with different model architectures for MLM training . Moreover , the proposed approach can be flexibly integrated with various tokenization choices , such as subword , word or span ( Joshi et al. , 2019 ) . A concurrent work Chen et al . ( 2020 ) also shared similar motivation as this work , although they have a different solution and their method requires additional computation to generate the masks , and yet is outperformed by the proposed fully-explored masking ( see Table 2 ) . Domain-specific Continual Pre-training The models mentioned above typically abstract semantic information from massive , heterogeneous corpora . Consequently , these models are not tailored to any specific domains , which tends to be suboptimal if there is a domain of interest beforehand . Gururangan et al . ( 2020 ) showed that continual pre-training ( on top of general-purpose LMs ) with in-domain unlabeled data could bring further gains to downstream tasks ( of that particular domain ) . One challenge inherent in continual pre-training is that in-domain data are usually much more limited , compared to domain-invariant corpora . As a result , how to efficiently digest information from unlabeled corpus is especially critical while adapting large pre-trained language models to specific domains . To this end , we specifically consider the continual pre-training scenario to evaluate the effectiveness of our approach . 3 PROPOSED APPROACH . In this section , we first review the MLM framework that is widely employed for natural language pre-training . Motivated by the gradient variance analysis of MLM in section 3.2 , we present the fully-explored masking strategy , which serves as a simple yet effective solution to reduce the gradient variance during training . Connections between our method and variance reduction theory are further drawn , which provides a theoretical foundation for the effectiveness of the proposed strategy . Finally , some specific implementation details are discussed . 3.1 BACKGROUND : THE MLM FRAMEWORK . Let V denote the token vocabulary and x = ( x1 , . . . , xn ) denote a sentence of n tokens , where xi ∈ V for i = 1 , . . . , n. Let m = ( m1 , . . . , mn ) denote a binary vector of length n , where mi ∈ { 0 , 1 } , representing the mask over a sentence . Specifically , mi = 1 means the token xi is masked and mi = 0 if xi is not masked . We use m ◦ x to denote a masked sentence , that is , ( m ◦ x ) i = { [ MASK ] if mi = 1 , xi if mi = 0 . In addition , let m be the complement of m ; in other words , mi = 0 if mi = 1 and mi = 1 if mi = 0 . Naturally , m ◦ x denotes a sentence with the complement mask m. For a typical language model with parameters θ , its loss function over a sentence x ∈ Vn and a mask m ∈ { 0 , 1 } n as ` ( θ ; x , m ) = − logP ( m ◦ x | θ , m ◦ x ) = − ∑ i : mi=1 logP ( xi | θ , m ◦ x ) , ( 1 ) where P ( xi | θ , m ◦ x ) is the probability of the model correctly predicting xi given the masked sentence m ◦ x . If mi = 0 , it always has P ( xi | θ , m ◦ x ) = 1 as the ground-truth xi is not masked . We will focus on masks with a fixed length . Let τ be an integer satisfying 0 ≤ τ ≤ n. The set of possible masks of length τ is defined asM ( τ ) , M ( τ ) = { m ∈ { 0 , 1 } n | ∑n i=1mi = τ } , which has a cardinality |M ( τ ) | = ( n τ ) = n ! τ ! ( n−τ ) ! . Therefore , the average loss function over a sentence x with masks of length τ is , L ( θ ; x ) = Em∼Unif ( M ( τ ) ) ` ( θ ; x , m ) = 1 ( n τ ) ∑ m∈M ( τ ) ` ( θ ; x , m ) . ( 2 ) Let ’ s consider PD as the probability distribution of sentence in a corpus D ⊂ Vn . The overall loss function for training the masked language model over corpus D is L ( θ ) , Ex∼PDL ( θ ; x ) = Ex∼PDEm∼Unif ( M ( τ ) ) ` ( θ ; x , m ) . ( 3 ) During each step of the training process , it randomly samples a mini-batch of sentences St ⊂ D. For each x ∈ St , we randomly pick a subset of masksKt ( x ) ⊂M ( τ ) , independently across different x . Thus , the mini-batch stochastic gradient is gt ( θ ) = 1 S ∑ x∈St 1 K ∑ m∈Kt ( x ) ∇θ ` ( θ ; x , m ) . ( 4 ) where |St| = S and |Kt ( x ) | = K for all t. Clearly we have E [ gt ( θ ) ] = ∇L ( θ ) . In the following sections , it first gives the variance of gt ( θ ) which is an important factor to influence model training efficiency ( Xiao & Zhang , 2014 ; Zhang & Xiao , 2019 ) , and then it presents the proposed fullyexplored masking strategy to help reduce the gradient variance of the masked language model .
This paper theoretically shows that the gradient variance of the standard MLM (masked language modeling) task in BERT-style training depends on the covariance of the gradient covariance between different masks within the mini-batch. This paper then empirically shows that the covariance can be reduced by making the masks less overlapped. A modified version of MLM is proposed, which has been shown with a smaller gradient variance than the standard MLM. The experimental results show that the new masking strategy does lead to some gains on several benchmarks.
SP:0ae8f7b5bbb7f3cb1f97a95af2d936f44a494a9c
Thinking Like Transformers
1 INTRODUCTION . While Yun et al . ( 2019 ) show that sufficiently large transformers can approximate any constantlength sequence-to-sequence function , and Hahn ( 2019 ) provides theoretical limitations on their ability to compute functions on unbounded input length , neither of these provide insight on how a transformer may achieve a specific task . Orthogonally , Bhattamishra et al . ( 2020 ) provide transformer constructions for several counting languages , but this also does not direct us towards a general model . This is in stark contrast to other neural network architectures , which do have clear computational models . For example , convolution networks are seen as as a sequence of filters ( Zhang et al. , 2018 ) , and finite-state automata and their variants have been extensively used both for extraction from and theoretical analysis of recurrent neural networks ( RNNs ) ( Omlin & Giles , 1996 ; Weiss et al. , 2018 ; Rabusseau et al. , 2018 ; Merrill et al. , 2020 ) , even inspiring new RNN variants ( Joulin & Mikolov , 2015 ) . In this work we propose a computational model for the transformer-encoder , in the form of a simple sequence-processing language which we dub RASP ( Restricted Access Sequence Processing Language ) . Much like how automata describe the token-by-token processing behavior of an RNN , our language captures the unique information flow constraints under which a transformer ( Vaswani et al. , 2017 ) operates as it processes input sequences . Considering computation problems and their implementation in the RASP language allows us to “ think like a transformer ” while abstracting away the technical details of a neural network in favor of symbolic programs . A RASP program operates on sequences of values from uniform atomic types , and transforms them by composing a restricted set of sequence processors . One pair of processors is used to select inputs for aggregation , and then aggregate the selected items . Another processor performs arbitrary but local computation over its ( localized ) input . However , access to the complete sequence is available only through aggregate operations that reduce a stream of numbers to a scalar . The key to performing complex global computations under this model is to compose the aggregations such that they gather the correct information , that can then be locally processed for a final output . Given a RASP program , we can analyze it to infer the minimal number of layers and maximum number of heads that is required to implement it as a transformer . We show several examples of expressive programs written in the RASP language , showing how complex operations can be implemented by a transformer . Thinking in terms of the RASP model also allows us to shed light on recent empirical observation of transformer variants ( Press et al. , 2020 ) and find concrete limitations of “ efficient transformers ” with restricted-attention ( Tay et al. , 2020 ) . 2 THE RESTRICTED ACCESS SEQUENCE PROCESSING LANGUAGE . In this section , we present the the Restricted Access Sequence Processing Language ( RASP ) . RASP assumes a machine composed of several Turing-complete processors , each of which can only run functions taking and returning a fixed number of primitive arguments , and a simple memory accessor that is controlled by these processors . The select , aggregate , and zipmap operations which we present will define and constrain how the processors work together to process an input sequence . We will focus here only on the language itself , leaving the discussion of its exact relation to transformers to Section 3 . Overview A RASP program works by manipulating sequences , occasionally with the help of selectors . Sequences contain values of uniform atomic type , such as booleans , integers , floats , or strings . They are functions used for selecting elements from sequences , and are used ( together with the appropriate operations ) only in the process of creating new sequences . All sequences in RASP are lazily evaluated , meaning that their length and contents are not populated until passed an input . The Base Sequences Every program in RASP begins from the same set of base sequences , and then creates new ones using a small number of core operations . These base sequences are indices , length , and tokens , evaluated on input x1 , x2 , ... , xn as their names suggest : ( 0 , 1 , ... , n − 1 ) , ( n , n , ... , n ) ( of length n ) , and ( x1 , x2 , ... , xn ) , respectively . Combining Sequences Sequences can be combined in an ‘ elementwise ’ manner , such that the value of the resulting sequence at each position i is a function of the values in the combined sequences at position i ( similar to a map operation ) , or have positions ‘ mixed ’ in more complicated ways using selectors , which are functions f : N × N → { True , False } whose sole purpose is to guide the combination of existing sequences into new ones . We present the basic ingredients of RASP using an example . Figure 1 shows a simple RASP function for sorting a sequence of values according to a sequence of keys . It accepts an input sequence vals and uses the base sequence indices , that is available to any RASP program , to compute its output in three operations as follows : 1. count_conditioned of Line 2 creates a new sequence that counts for each element of keys the number of “ previous items ” it has in keys , where the “ previous items ” are defined to be all items that have a lesser value , or equal value and lower index . Thus , num_prevs creates a sequence of numbers , representing the target sorted position of each item . 2. select of line 7 creates a new selector which will focus each position i on the corresponding position j for which indices [ i ] is equal to num_prevs [ j ] . Effectively , it will direct the elements in each position j towards their target location i . 3 . Finally , aggregate of line 8 applies select_sorted_val to vals , moving each i-th element of vals to its calculated sorted position num_prevs [ i ] . We now describe the base operations of RASP in-depth , occasionally presenting an example on the hypothetical input sequence x of length n. • zipmap The zipmap operation takes a tuple of sequences and an element-processing function f , and applies f per-index to the values in those sequences to create a new sequence . For a simple example , y1=zipmap ( ( indices , indices ) , lambda i , j : i+j ) creates a sequence that always evaluates to ( 0 , 2 , ... , 2n− 2 ) . • aggregate The aggregate operation takes a selector s , a sequence x , and an optional parameter default , and averages subsets of the values of x into a new sequence y as follows : for every index i , y [ i ] is the average of x [ j0 ] , x [ j1 ] , ... x [ jk ] , where j0 , j1 , ... , jk are the indices j ∈ [ n ] for which s ( i , j ) is True . We say k is the focus width of s at i . If k = 0 , then y [ j0 ] is assigned the value in default . For example : if s ( i , j ) returns True iff i is odd and j=0 , and the value in default is d , then y will evaluate to ( d , x [ 0 ] , d , x [ 0 ] , ... , y [ n− 1 ] ) where y [ n−1 ] is either d or x [ 0 ] depending on the parity of n. • select The select operation takes two sequences-tuples of lengths k and l , me= ( m1 , m2 , ... , mk ) and other= ( ot1 , ot2 , ... , otl ) , and a function f expecting k + 1 atomic values and giving boolean output . It composes these to create a selector s as follows : for every two indices i , j , s ( i , j ) is the output of f on the i-th and j-th slice of me and other respectively , i.e. , s ( i , j ) =f ( m1 [ i ] , ... , mk [ i ] , ot1 [ j ] ... otl [ j ] ) . For a simple example , in s=select ( ( indices , ) , ( indices , ) , lambda mi , oti : mi % 2==1 and oti==0 ) , then m1=indices , ot1=indices , and s is the same selector we used for our example in aggregate above . • count_conditioned This operation takes the same parameters me , other and f as select , but this time returns a sequence y describing the number of selected influencing positions j for each output position i that s=select ( me , other , f ) would have created . In other words , for each i , y [ i ] = k where j1 , ... , jk is the set of positions j for which s ( i , j ) =True . For example , h=count_conditioned ( ( tokens , ) , ( tokens , ) , lambda a , b : a==b ) returns an in-place histogram for the tokens in the input sequence : h ( “ abaa ” ) = ( 3 , 1 , 3 , 3 ) . This concludes the base operations of RASP – all other operations are shortcuts for combinations of the above 4 , occasionally with the base sequences . Sugar We implement RASP with a variety of syntactic sugar , presented fully in appendix E. Briefly : 1 . When applying zipmap to a single sequence , it may be passed directly without using a tuple , e.g . : zipmap ( indices , f ) is equivalent to zipmap ( ( indices , ) , f ) . 2. zipmap has sugar for most of the binary operators , e.g . : for two sequences x , y , then x+y is sugar for zipmap ( ( x , y ) , lambda a , b : a+b ) . 3 . Whenever the focus width of s at some index is ≤ 1 ( “ up-to-one selection ” ) , aggregate ( s , x , default=d ) does not explicitly compute the division . In this case the values of x do not have to be numbers . 4. aggregate accepts one additional optional parameter elementwise_function . The full order of parameters is s , x , elementwise_function , default , and the use of elementwise_function is as follows : aggregate ( s , x , f , d ) is equivalent to aggregate ( s , zipmap ( x , f ) , default=d ) . 2.1 EXAMPLES . We now present some more example RASP programs , by increasing order of complexity . Simple Examples The first and simplest example is to compute an in-place histogram for some sequence vals . This is achieved with a single application of count_conditioned : histogram=count_conditioned ( vals , vals , lambda a , b : a==b ) . From Length to Parity While length is provided as a primitive in the language , it can actually be achieved as a composition of the other base operations and sequences . This is done by computing full_s=select ( ( ) , ( ) , lambda : True ) followed by 1/aggregate ( full_s , indices , lambda i : int ( i==0 ) ) ( the fraction of elements equal to 0 in indices , inverted ) . From length and that same full_s we can then define count ( vals , v ) , a function taking any sequence vals and value v and returning a new sequence counting the number of appearances of v in vals . The implementation of count is simply length * aggregate ( full_s , vals , lambda e : e==v ) . count in turn enables us to write programs like parity simply as count ( tokens,1 ) % 2==01 . Reverse We can reverse a sequence seq with the help of an up-to-one selector mapping each position to its opposite : flip_s = select ( indices , length-1-indices , lambda m , oth : m==oth ) . We use flip_s to re-order the tokens of seq : reverse=aggregate ( flip_s , seq ) . Balanced Parentheses For balanced parentheses we use count_conditioned twice , storing in prev_opens and prev_closes the number of previous “ ( ” or “ ) ” ( respectively ) tokens each position has , including itself . The sequence is balanced if prev_opens-prev_closes has no negative values , and is 0 at position length-1 . These two qualities can be easily computed using two final select-aggregate pairs , and then combined with a zipmap . Most Frequent Tokens In fig . 2 we show how RASP can be used to arrange for any input sequence s the most frequent tokens in s , without repetition . The solution has 2 parts : first , we compute the histogram for all the tokens , and mask it such that all but the first of each token is given a negative value . Then , we sort the tokens according to the masked histogram . The solution uses the sort function from Figure 1 . 1This does not contradict with the findings of Hahn ( 2019 ) , who showed that parity is not computable in transformers when each selector is restricted to width 1 ( “ hard attention ” ) . Count Conditioned The operation count_conditioned is a powerful part of RASP , appearing in many other programs . Surprisingly , it is realisable as a composition of the other operations ( and base sequence indices ) . Understanding its implementation is interesting for learning how to “ truly ” think like a transformer , and we present the code in Figure 3 . The intuition is as follows : we compute the select whose width we want to calculate twice , once such that it also selects the position 0 , and once such that it only selects this position . We then aggregate both these values , broadcasting 1 from position 0 and 0 from everywhere else , and using default value 0 . The first aggregate computes for each position the inverse of the number of selected positions ( excluding 0 ) plus one , and the second computes whether that position would also focus on 0 . A straightforward zipmaps then gives us the result . To further help the intuition , we present in fig . 4 the computation flow for a histogram calculation , when count_conditioned is implemented as described here . Note Many of the functions provided with RASP can be expressed in terms of count_conditioned – such as count ( which counts how many elements in a sequence are equal to a given value ) and contains ( which checks if count is greater than 0 ) – but this is not necessarily an optimal implementation with respect to number of heads it uses . The RASPlibrary provides optimal implementations .
The authors introduce a DSL, the Restricted Access Sequence Processing (RASP) language, that they claim can serve as a computational model for the transformer-encoder. They develop the reader's intuition for RASP by providing RASP implementations of many basic operations such as computing histograms, sorting, and reversing. They also show how, for a given RASP program, to determine the minimum number of layers required and to upper-bound the number of heads required to implement it as a transformer. Lastly, they analyze two transformer variants, restricted-attention transformers and sandwich transformers. For the former, they use the RASP perspective to claim a theoretical limitation, and for the latter, they comment that a known empirical finding is intuitive in light of the RASP perspective.
SP:bafc54f2425a7c809ceb795b0c972efba778d06d
Drift Detection in Episodic Data: Detect When Your Agent Starts Faltering
1 INTRODUCTION . Reinforcement learning ( RL ) algorithms have recently demonstrated impressive success in a variety of sequential decision-making problems ( Badia et al. , 2020 ; Hessel et al. , 2018 ) . While most RL works focus on the maximization of rewards under various conditions , a key issue in real-world RL tasks is the safety and reliability of the system ( Dulac-Arnold et al. , 2019 ; Chan et al. , 2020 ) , arising in both offline and online settings . In offline settings , comparing the agent performance in different environments is important for generalization ( e.g. , in sim-to-real and transfer learning ) . The comparison may indicate the difficulty of the problem or help to select the right learning algorithms . Uncertainty estimation , which could help to address this challenge , is currently considered a hard problem in RL , in particular for modelfree methods ( Yu et al. , 2020 ) . In online settings , where a fixed , already-trained agent runs continuously , its performance may be affected ( gradually or abruptly ) by changes in the controlled system or its surroundings , or when reaching new states beyond the ones explored during the training . Some works address the robustness of the agent to such changes ( Lecarpentier & Rachelson , 2019 ; Lee et al. , 2020 ) . However , noticing the changes may be equally important , as it allows us to fall back into manual control , send the agent to re-train , guide diagnosis , or even bring the agent to halt . This is particularly critical in real-world problems such as health care and autonomous driving ( Zhao et al. , 2019 ) , where agents are required to be fixed and stable : interventions in the policy are often limited or forbidden ( Matsushima et al. , 2020 ) , but any performance degradation should be detected as soon as possible . Many sequential statistical tests exist for detection of mean degradation in a random process . However , common methods ( Page , 1954 ; Lan , 1994 ; Harel et al. , 2014 ) assume independent and identically distributed ( i.i.d ) samples , while in RL the feedback from the environment is usually both highly correlated over consecutive time-steps , and varies over the life-time of the task ( Korenkevych et al. , 2019 ) . This is demonstrated in Fig . 1 . A possible solution is to apply statistical tests to large blocks of time-steps assumed to be i.i.d ( Ditzler et al. , 2015 ) . Since many RL applications consist of repeating episodes , such a blocks-partition can be applied in a natural way ( Colas et al. , 2019 ) . However , this approach requires complete episodes for change detection , while a faster response is often required . Furthermore , naively ap- plying a statistical test on the accumulated feedback ( e.g. , sum of rewards ) from complete episodes , ignores the dependencies within the episodes and may miss vital information , leading to highly sub-optimal tests . In this work , we devise an optimal test for detection of degradation of the rewards in an episodic RL task ( or in any other episodic signal ) , based on the covariance structure within the episodes . Even in absence of the assumptions that guarantee its optimality , the test is still asymptotically superior to the common approach of comparing the mean ( Colas et al. , 2019 ) . The test can detect changes and drifts in both the offline and the online settings defined above . In addition , for the online settings , we suggest a novel Bootstrap mechanism to control the False Alarm Rate ( BFAR ) through adjustment of test thresholds in sequential tests of episodic signals . The suggested procedures rely on the ability to estimate the correlations within the episodes , e.g. , through a ” reference dataset ” of episodes . Since the test is applied directly to the rewards , it is model-free in the following senses : the underlying process is not assumed to be known , to be Markov , or to be observable at all ( as opposed to other works , e.g. , Banerjee et al . ( 2016 ) ) , and we require no knowledge about the process or the running policy . Furthermore , as the rewards are simply referred to as episodic time-series , the test can be similarly applied to detect changes in any episodic signal . We demonstrate the new procedures in the environments of Pendulum ( OpenAI ) , HalfCheetah and Humanoid ( MuJoCo ; Todorov et al. , 2012 ) . BFAR is shown to successfully control the false alarm rate . The covariance-based degradation-test detects degradation faster and more often than three alternative tests – in certain cases by orders of magnitude . Section 3 formulates the offline setup ( individual tests ) and the online setup ( sequential tests ) . Section 4 introduces the model of an episodic signal , and derives an optimal test for degradation in such a signal . Section 5 shows how to adjust the test for online settings and control the false alarm rate . Section 6 describes the experiments , Section 7 discusses related works and Section 8 summarizes . To the best of our knowledge , we are the first to exploit the covariance between rewards in posttraining phase to test for changes in RL-based systems . The contributions of this paper are ( i ) a new framework for model-free statistical tests on episodic ( non-i.i.d ) data with trusted referenceepisodes ; ( ii ) an optimal test ( under certain conditions ) for degradation in episodic data ; and ( iii ) a novel bootstrap mechanism that controls the false alarm rate of sequential tests on episodic data . 2 PRELIMINARIES . Reinforcement learning and episodic framework : A Reinforcement Learning ( RL ) problem is usually modeled as a decision process , where a learning agent has to repeatedly make decisions that affect its future states and rewards . The process is often organized as a finite sequence of timesteps ( an episode ) that repeats multiple times in different variants , e.g. , with different initial states . Common examples are board and video games ( Brockman et al. , 2016 ) , as well as more realistic problems such as repeating drives in autonomous driving tasks . Once the agent is fixed ( which is the case in the scope of this work ) , the rewards of the decision process essentially reduce to a ( decision-free ) random process { Xt } nt=1 , which can be defined by its PDF ( f { Xt } nt=1 : R n → [ 0 , ∞ ) ) . { Xt } usually depend on each other : even in the popular Markov Decision Process ( Bellman , 1957 ) , where the dependence goes only a single step back , long-term correlations may still carry information if the states are not observable by the agent . Hypothesis tests : Consider a parametric probability function p ( X|θ ) describing a random process , and consider two different hypotheses H0 , HA determining the value ( simple hypothesis ) or allowed values ( complex hypothesis ) of θ . When designing a test to decide between the hypotheses , the basic metrics for the test efficacy are its significance P ( not reject H0|H0 ) = 1−α and its power P ( reject H0|HA ) = β . A statistical hypothesis test with significance 1 − α and power β is said to be optimal if any test with as high significance 1− α̃ ≥ 1− α has smaller power β̃ ≤ β . The likelihood of the hypothesis H : θ ∈ Θ given data X is defined as L ( H|X ) = supθ∈Θp ( X|θ ) . According to Neyman-Pearson Lemma ( Neyman et al. , 1933 ) , a threshold-test on the likelihood ratio LR ( H0 , HA|X ) = L ( H0|X ) /L ( HA|X ) is optimal . In a threshold-test , the threshold is uniquely determined by the desired significance level α , though is often difficult to calculate given α . In many practical applications , a hypothesis test is repeatedly applied as the data change or grow , a procedure known as a sequential test . If the null hypothesisH0 is true , and any individual hypothesis test falsely rejects H0 with some probability α , then the probability that at least one of the multiple tests will reject H0 is α0 > α , termed family-wise type-I error ( or false alarm rate when associated with frequency ) . See Appendix K for more details about hypothesis testing and sequential tests in particular . Common approaches for sequential tests , such as CUSUM ( Page , 1954 ; Ryan , 2011 ) and α-spending functions ( Lan , 1994 ; Pocock , 1977 ) , usually require strong assumptions such as independence or normality , as further discussed in Appendix F . 3 PROBLEM SETUP . In this work , we consider two setups where detecting performance deterioration is important – sequential degradation-tests and individual degradation-tests . The individual tests , in addition to their importance in ( offline ) settings such as sim-to-real and transfer learning , are used in this work as building-blocks for the ( online ) sequential tests . Both setups assume a fixed agent that was previously trained , and aim to detect whenever the agent performance begins to deteriorate , e.g. , due to environment changes . The ability to notice such changes is essential in many real-world problems , as explained in Section 1 . Setup 1 ( Individual degradation-test ) . We consider a fixed trained agent ( policy must be fixed but is not necessarily optimal ) , whose rewards in an episodic environment ( with episodes of length T ) were previously recorded for multiple episodes ( the reference dataset ) . The agent runs in a new environment for n time-steps ( both n < T and n ≥ T are valid ) . The goal is to decide whether the rewards in the new environment are smaller than the original environment or not . If the new environment is identical , the probability of a false alarm must not exceed α . Setup 2 ( Sequential degradation-test ) . As in Setup 1 , we consider a fixed trained agent with recorded reference data of multiple episodes . This time the agent keeps running in the same environment , and at a certain point in time its rewards begin to deteriorate , e.g. , due to changes in the environment . The goal is to alert to the degradation as soon as possible . As long as the environment has not changed , the probability of a false alarm must not exceed α0 during a run of h̃ episodes . Note that while in this work the setups focus on degradation , they can be easily modified to look for any change ( as positive changes may also indicate the need for further training , for example ) . 4 OPTIMIZATION OF INDIVIDUAL DEGRADATION-TESTS . To tackle the problem of Setup 1 , we first define the properties of an episodic signal and the general assumptions regarding its degradation . Definition 4.1 ( T -long episodic signal ) . Let n , T ∈ N , and write n = KT + τ0 ( for non-negative integers K , τ0 with τ0 ≤ T ) . A sequence of real-valued random variables { Xt } nt=1 is a T -long episodic signal , if its joint probability density function can be written as f { Xt } nt=1 ( x1 , ... , xn ) = [ K−1∏ k=0 f { Xt } Tt=1 ( xkT+1 , ... , xkT+T ) ] · f { Xt } τ0t=1 ( xKT+1 , ... , xKT+τ0 ) ( 1 ) ( where an empty product is defined as 1 ) . We further denote µ0 : = E [ ( X1 , ... , XT ) > ] ∈ RT , Σ0 : = Cov ( ( X1 , ... , XT ) > , ( X1 , ... , XT ) ) ∈ RT×T . Note that the episodic signal consists of i.i.d episodes , but is not assumed to be independent or identically-distributed within the episodes . For simplicity we focus on one-dimensional episodic signals , although a generalization to multidimensional signals is straight-forward ( see Appendix G ) . In the analysis below we assume that both µ0 and Σ0 are known . In practice , this can be achieved either through detailed domain knowledge , or by estimation from the recorded reference dataset of Setup 1 , assuming it satisfies Eq . ( 1 ) . The estimation errors decrease as O ( 1/ √ N ) with the number N of reference episodes , and are distributed according to the Central Limit Theorem ( for means ) and Wishart distribution ( K. V. Mardia & Bibby , 1979 ) ( for covariance ) . While in this work we use up to N = 10000 reference episodes , Appendix E shows that N = 300 reference episodes are sufficient for reasonable results in HalfCheetah , for example . Note that correlations estimation has been already discussed in several other RL works ( Alt et al. , 2019 ) . Fig . 1 demonstrates the estimation of mean and covariance parameters for a trained agent in the environment of HalfCheetah , from a reference dataset of N = 10000 episodes . This also demonstrates the non-trivial correlations structure in the environment . According to Fig . 1b , the variance in the rewards varies and does not seem to reach stationarity within the scope of an episode . Fig . 1c shows the autocorrelation function ACF ( t2 − t1 ) = corr ( t1 , t2 ) for different reference times t1 . It is evident that the correlations last for hundreds of time-steps , and depend on the time t1 rather than merely on the time-difference t2− t1 . This means that the autocorrelation function is not expressive enough for the actual correlations structure . Once the per-episode parametersµ0 ∈ RT , Σ0 ∈ RT×T are known , the expectations and covariance matrix of the whole signal µ ∈ Rn , Σ ∈ Rn×n can be derived directly : µ consists of periodic repetitions of µ0 , and Σ consists of copies of Σ0 as T × T blocks along its diagonal . For both parameters , the last repetition is cropped if n is not an integer multiplication of T . In other words , by taking advantage of the episodic setup , we can treat the temporal univariate non-i.i.d signal as a multivariate signal with easily-measured mean and covariance – even if the signal is measured in the middle of an episode . The degradation in the signal X = { Xt } nt=1 is defined through the difference between two hypotheses . The null hypothesis H0 states that X is a T -long episodic signal with expectations µ0 ∈ RT and invertible covariance matrix Σ0 ∈ RT×T . Our first alternative hypothesis – uniform degradation – states that X is a T -long episodic signal with the same covariance Σ0 but smaller expectations : ∃ ≥ 0 , ∀1 ≤ t ≤ T : ( µ ) t = ( µ0 ) t − . Note that this hypothesis is complex ( ≥ 0 ) , where 0 can be tuned according to the minimal degradation magnitude of interest . In fact , Theorem 4.1 shows that the optimal corresponding test is independent of the choice of 0 . Theorem 4.1 ( Optimal test for uniform degradation ) . Define the uniform-degradation weightedmean sunif ( X ) : = W ·X , whereW : = 1 > ·Σ−1 ∈ Rn ( and 1 is the all-1 vector ) . If the distribution of X is multivariate normal , then a threshold-test on sunif is optimal . Proof Sketch . According to Neyman-Pearson Lemma ( Neyman et al. , 1933 ) , a threshold-test on the likelihood-ratio ( LR ) between H0 and HA is optimal . Since HA is complex , the LR is a minimum over ∈ [ 0 , ∞ ) . Lemma 1 shows that ∃s0 : sunif ≥ s0 ⇒ = 0 and sunif ≤ s0 ⇒ = ( sunif ) . The rest of the proof in Appendix J substitutes in both domains of sunif to prove monotony of the LR in sunif , from which we can conclude monotony in sunif over all R. Following Theorem 4.1 , we define the Uniform Degradation Test ( UDT ) to be a threshold-test on sunif , i.e. , ” declare a degradation if sunif < κ ” for a pre-defined κ . Recall that optimality of a test is defined in Section 2 as having maximal power given significance level . To achieve the significance α required in Setup 1 , we apply a bootstrap mechanism that randomly samples episodes from the reference dataset and calculates the corresponding statistic ( e.g. , sunif ) . This yields a bootstrap-estimate of the distribution of the statistic under H0 , and the α-quantile of the estimated distribution is chosen as the test-threshold ( κ = qα ( sunif |H0 ) ) . Note that Theorem 4.1 relies on multivariate normality assumption , which is often too strong for real-world applications . Theorem 4.2 guarantees that if we remove the normality assumption , it is still beneficial to look into the episodes instead of considering them as atomic blocks ; that is , UDT is still asymptotically better than a test on the simple mean ssimp = ∑n t=1Xt/n . Note that ” asymptotic ” refers to the signal length n→∞ ( while T remains constant ) , and is translated in the sequential setup into a ” very long lookback-horizon h ” ( rather than very long running time ) . Theorem 4.2 ( Asymptotic power of UDT ) . Denote the length of the signal n = K · T , assume a uniform degradation of size √ K , and let two threshold-tests τsimp on ssimp and UDT on sunif be tuned to have significance α . Then limK→∞P ( τsimp rejects H0 ∣∣HA ) = Φ ( q0α + T√ 1 > Σ01 ) ≤ Φ ( q0α + √ 1 > Σ−10 1 ) = limK→∞P ( UDT rejects H0 ∣∣HA ) ( 2 ) where Φ is the CDF of the standard normal distribution , and q0α is its α-quantile . Proof Sketch . Since the episodes of the signal are i.i.d , both ssimp and sunif are asymptotically normal according to the Central Limit Theorem . The means and variances of both statistics are calculated in Lemma 2 . Calculation of the variance of sunif relies on writing sunif as a sum of linear transformations of X ( sunif = ∑n i=1 ( Σ −1 ) iX ) , and using the relation between Σ and Σ0 . Appendix J shows that the inequality between the resulted powers is equivalent to a matrix-form of the means-inequality , and proves it by applying Cauchy-Schwarz inequality to Σ−1/20 1 and Σ 1/2 0 1 . Motivated by Theorem 4.2 , we define G2 : = ( 1 > Σ−10 1 ) ( 1 > Σ01 ) T 2 to be the asymptotic power gain of UDT , quantify it , and show that it increases with the heterogeneity of the spectrum of Σ0 . Proposition 4.1 ( Asymptotic power gain ) . G2 = 1 + ∑T i , j=1 wij ( λi−λj ) 2 , where { λi } Ti=1 are the eigenvalues of Σ0 and { wij } Ti , j=1 are positive weights . Proof Sketch . The result can be calculated after diagonalization of Σ0 , and the weights { wij } correspond to the diagonalizing matrix . See Appendix J for more details . This time , calculation of the optimal test-statistic through the LR yields a minimum over ( T m ) possible subsets of decreased entries , which is computationally heavy . However , Theorem 4.3 shows that if we optimize for small values of ( where optimality is indeed most valuable ) , a near-optimal statistic is spart , which is the sum of the m = p · T smallest time-steps of ( X − µ ) after a Σ−10 - transformation ( see formal definition in Definition I.11 ) . We define the Partial Degradation Test ( PDT ) to be a threshold-test on spart with a parameter p. Theorem 4.3 ( Near-optimal test for uniform degradation ) . Assume that X is multivariate normal , and let Pα be the maximal power of a hypothesis test with significance 1 − α . The power of a threshold-test on spart with significance 1− α is Pα −O ( ) . Proof Sketch . The expression that is minimized is a sum of two terms . One term is the sum of a subset of entries of Σ−1 ( X − µ ) , which is minimized by simply taking the lowest entries ( up to the constraint of consistency across episodes , which requires us to sum the rewards per time-step in advance ) . In Appendix J we bound the second term and its effects on the modified statistic and on the modified test-threshold . We show that the resulted decrease of rejection probability isO ( ) .
This paper considers the drift detection for episodic data, where data episodes are assumed to be i.i.d. but data within each episodic can be correlated. It is assumed that the pre-change (nominal) mean and covariance of each episodic is perfectly known or can be accurately estimated from reference data. The Uniform Degradation Test (UDT) and Partial Degradation Test (PDT) are proposed to detect the mean shift. Moreover, this paper uses bootstrap to control the false alarm rate by setting the threshold as empirical quantiles of the detection statistic computed from reference data.
SP:43947cdb5064af3146a898c27347d7d987f92e30
Batch Inverse-Variance Weighting: Deep Heteroscedastic Regression
1 INTRODUCTION . In supervised learning , a central assumption is that the samples in the training dataset , used to train the model , and the samples in the testing set , used to evaluate the model , are sampled from identical distributions . Formally , for input x and label y , this assumption implies that ptrain ( x , y ) = ptest ( x , y ) . This assumption can be decomposed as the product ptrain ( x ) · ptrain ( y|x ) = ptest ( x ) · ptest ( y|x ) , which is true if two conditions are respected : 1 . The features in both datasets are sampled from the same distribution : ptrain ( x ) = ptest ( x ) . When this is condition is violated , the training dataset is not representative . 2 . The labels in both datasets are sampled from the same conditional distribution : ptrain ( y|x ) = ptest ( y|x ) . If this condition is violated , the training labels are noisy . In practice , these assumptions are not always respected because gathering representative and precise data ( including labels ) can be arduous . In this case , the training and testing datasets are misaligned , and the performance of the deployed model may decrease since the training process did not actually optimize the model ’ s parameters based on the correct data ( Arpit et al. , 2017 ; Kawaguchi et al. , 2020 ) . One possible reason for misalignment is that there is some uncertainty about the labels in the training set as a result of the labeling process . Since our objective is to optimize the performance of the model compared to ground truth labels , we should consider that the labels in test dataset have no uncertainty , even though it may be impossible to collect such a dataset in practice . As a result , ptest ( y|x ) is sampled from a Dirac delta function , whereas ptrain ( y|x ) is not since it encapsulates the uncertainty in the labelling process , which leads to misalignment . In this paper , we propose an algorithm for more efficient model training in the case where we have some information about the sample-wise misalignment . More specifically , we examine the case of regression with a deep network where labels are corrupted by heteroscedastic noise . We assume that we have access at least an estimate of the variance of the distribution of the noise that corrupted each label , information that is available if the labels are being generated by some stochastic process that is capable of also jointly reporting uncertainty . We examine how the knowledge of the estimate of the label noise variance can be used to mitigate the effect of the noise on the learning process of a deep neural network . We refer to our method as Batch Inverse-Variance ( BIV ) , which , inspired by information theory , performs a re-weighting using both the the sample-wise variance but also statistics over the entire mini-batch . BIV shows a strong empirical advantage over L2 loss as well as over a simple filtering of the samples based on a threshold over the variance.1 Our claimed contributions are threefold : 1 . A definition of the problem of learning with information quantifying the misalignment between datasets for the case of heteroscedastic noisy labels in regression . 2 . A general formulation of how to use the mini-batch to infer statistics of the dataset and incorporate this information in the loss function when training on neural networks . 3 . We present Batch Inverse-Variance as an instantiation of this framework and show its usefulness when applied to regression tasks with labels corrupted by heteroscedastic noise . The outline of the paper is as follows : In section 2 , we describe the task of regression with heteroscedastic noisy labels and its parallels with learning with privileged information , and we explain the challenges of applying classical heteroscedastic regression methods to stochastic gradient descent . In section 3 , we position our work among the existing literature on learning with noisy labels . In section 4 , we present a general framework to incorporate information regarding dataset misalignment in the mini-batch loss . We introduce BIV within this framework to tackle heteroscedastic regression . In section 5 , we describe the setup for the experiments we made to validate the benefits of using BIV , and we present and analyze the results in section 6 . 2 BACKGROUND . 2.1 HETEROSCEDASTIC NOISY LABELS IN REGRESSION . Here , we introduce how heteroscedastic noisy labels can be generated in regression and how the variance can be known . Consider an unlabelled dataset of inputs { xi } . To label it , one must apply to each input xi an instance of a label generator which should provide its true label yi . This label generator has access to some features zi correlated to xi . We define LGj : Z −→ R . When the labelling process is not exact and causes some noise on the label , the noisy label of xi provided by LGj is defined as ỹi , j . Noise on a measured or estimated value is often represented by a Gaussian distribution , based on the central limit theorem , as most noisy processes are the sum of several independent variables . Gaussian distributions are also mathematically practical , although they present some drawbacks as they can only represent unimodal and symmetric noise ( Thrun et al. , 2006 ) . We model : ỹi , j = yi + δyi , j with δyi , j ∼ N ( 0 , σ2i , j ) ( 1 ) σ2i , j can be a function of zi and LGj , without any assumption on its dependence on one or the other . We finally assume that the label generator is able to provide an estimate of σ2i , j , therefore being redefined as LGj : Z −→ R× R≥0 . The training dataset is formed of triplets ( xi , σ2i , j , ỹi , j ) , renamed ( xk , σ 2 k , ỹk ) for triplet k for simplicity . This setup describes many labelling processes , such as : Crowd-sourced labelling : In the example case of age estimation from facial pictures , labellers Alice and Bob are given zi = xi the picture of someone ’ s face and are asked to estimate the age of that person . Age is harder to estimate for older people come ( 5 and 15 years of age are harder to confuse than 75 and 85 ) suggesting a correlation between σ2i , j and zi . But Alice and Bob may also have been given different instructions regarding the precision needed , inducing a correlation between σ2i , j and LGj . Finally , there may be some additional interactions between zi and LGj , as for example Alice may know Charlie , recognize him on the picture and label his age with lower 1Our code is available in supplemental material and will be publicly released after the reviewing process . uncertainty . Both labellers can provide an estimation of the uncertainty around their labels , for example with a plus-minus range which can be used as a proxy for standard deviation . Labelling from sensor readings , population studies , or simulations : Imagine you want build a dataset of pictures xi from a camera on the ground labelled with the position yi of a drone in the sky . To estimate the position of the drone at the moment the picture was taken , you could use state estimation algorithms based on the Bayes ’ filter ( Thrun et al. , 2006 ) . These algorithms take as an input zi the measurements of the drone ’ s sensors , and provide a full posterior distribution over the state , sometimes under a Gaussian assumption for Kalman filters for example . The uncertainty depends , among others , on the precision of the sensors , the observability of a given state , the precision of the dynamic model , and the time since sensor signals were received . Similarly , studies based on population such as polling or pharmaceutical trials have quantified uncertainties based on the quantity and quality of their samples . It is also possible to train on simulators , as in climate sciences ( Rasp et al. , 2018 ) or in epidemiology ( Alsdurf et al. , 2020 ) , and some of them provide their estimations ’ uncertainty based on the simulation procedure and the inclusion of real measurements in the model . Using predictions from a neural network in complex neural architectures : In deep reinforcement learning for example , the critic network learns to predict a value from a state-action pair under the supervision of the heteroscedastic noisy output of a target network plus the reward ( Mnih et al. , 2015 ; Haarnoja et al. , 2018 ) . While the estimation of the uncertainty of the output of a neural network is not an easy task , it is an active field of research ( Gal & Ghahramani , 2016 ; Peretroukhin et al. , 2019 ) . There , zi is the state-action pair at the next step , and LGj the target network being updated over time . The prediction is a mix of aleatoric and epistemic uncertainties as defined by Kendall & Gal ( 2017 ) which are dependent on both zi and LGj . We could not find any current dataset that provides such label uncertainty information for regression . However , as it is precious information , we argue that it should actually be provided when possible . In classification , Xie et al . ( 2016 ; 2020 ) took a step in this direction by providing a “ confidence ” score from 0 to 255 for each pixel in the KITTI-360 dataset . 2.2 LEARNING USING PRIVILEGED INFORMATION . Training with a dataset of triplets ( xi , x∗i , yi ) , where x ∗ i is only given at training time and not available at test time , fits in the framework of learning using privileged information ( LUPI ) , defined in Vapnik & Vashist ( 2009 ) and mainly applied to SVMs . In most works in this field , this privileged information makes the task easier on a sample-to-sample basis . For example , object detection can be improved by adding segmentation masks ( Feyereisl et al. , 2014 ) or depth images ( Hoffman et al. , 2016 ) . Another interpretation of LUPI is to use privileged information as a vector for knowledge transfer between a teacher and a student ( Vapnik & Izmailov , 2015 ) . Hernández-Lobato et al . ( 2014 ) and Lambert et al . ( 2018 ) have made a link between privileged information and uncertainty , using it to evaluate the confidence of the model for a training sample . The former applied the approach to Gaussian processes through latent noise , and the latter to neural networks through Gaussian dropout . More formally , at training time the neural network has access to triplets ( xk , x∗k , yk ) where xk is the input , yk its corresponding label , and x∗k the additional information with respect to this sample . The objective in LUPI is the same as classical supervised learning : train the network parameters θ so that , at test time , and without access to information x∗i , the expected loss is minimized , i.e . : θopt = argmin θ E { xi , yi } ∈Dtest [ L ( f ( xi , θ ) , yi ) ) ] ( 2 ) where L ( f ( xi , θ ) , yi ) is the objective loss function based on the true label and on the network ’ s prediction f ( xi , θ ) , for example the L2 distance in the task of regression . In our work , we have x∗i = σ 2 i . In contrast with the usual LUPI setting , x ∗ i does not help the task on a sample-to-sample basis , but instead informs about the role of each sample on the misalignment between the datasets due to the noise in the labelling process . The objective , however , is the same : use this privileged information during training to minimize the expected loss at test time .
In this paper, a reweighting technique is proposed to suppress the impact of heteroscedastic label noise in regression model training. The objective function of the regression model training process is composed of a weighted combination of instance-wise training loss. The instance-wise weight is determined by the estimated noise variance based on prior information of the label generation process. The weighting formulation is inspired by the best possible estimator of noisy measurements reaching the Cramer-Rao bound.
SP:355303ce20a95719616333e88b1732715e1a9ff7
The Role of Momentum Parameters in the Optimal Convergence of Adaptive Polyak's Heavy-ball Methods
t ) , as opposed to that of O ( log t√ t ) of SGD , where t is the number of iterations . Our new analysis not only shows how the HB momentum and its timevarying weight help us to achieve the acceleration in convex optimization but also gives valuable hints how the momentum parameters should be scheduled in deep learning . Empirical results validate the correctness of our convergence analysis in optimizing convex functions and demonstrate the improved performance of the adaptive HB methods in training deep networks . 1 INTRODUCTION . One of the most popular optimization algorithms in deep learning is the momentum method ( Krizhevsky et al. , 2012 ) . The first momentum can be traced back to the pioneering work of Polyak ’ s heavy-ball ( HB ) method ( Polyak , 1964 ) , which helps accelerate stochastic gradient descent ( SGD ) in the relevant direction and dampens oscillations ( Ruder , 2016 ) . Recent studies also find that the HB momentum has the potential to escape from the local minimum and saddle points ( Ochs et al. , 2014 ; Sun et al. , 2019a ) . From the perspective of theoretical analysis , HB enjoys a smaller convergence factor than SGD when the objective function is twice continuously differentiable and strongly convex ( Ghadimi et al. , 2015 ) . In nonsmooth convex cases , with suitably chosen step size , HB attains an optimal convergence rate of O ( 1√ t ) in terms of the averaged output ( Yang et al. , 2016 ) , where t is the number of iterations . ∗Equal contribution †Corresponding author To overcome the data-independent limitation of predetermined step size rules , some adaptive gradient methods have been proposed to exploit the geometry of historical data . The first algorithm in this line is AdaGrad ( Duchi et al. , 2011 ) . The intuition behind AdaGrad is that the seldom-updated weights should be updated with a larger step size than the frequently-updated weights . Typically , AdaGrad rescales each coordinate and estimates the predetermined step size by a sum of squared past gradient values . As a result , AdaGrad has the same convergence rate as vanilla SGD but enjoys a smaller factor especially in sparse learning problems . The detailed analysis of AdaGrad ( Mukkamala & Hein , 2017 ) implies that one can derive similar convergence rates for the adaptive variants of the predetermined step size methods without additional difficulties . Unfortunately , experimental results illustrate that AdaGrad under-performed when applied to training deep neural newtworks ( Wilson et al. , 2017 ) . Practical experience has led to the development of adaptive methods that is able to emphasize the more recent gradients . Specifically , an exponential moving average ( EMA ) strategy was proposed in RMSProp to replace the cumulative sum operation ( Tieleman & Hinton , 2012 ) . Adam ( Kingma & Ba , 2014 ) , which remains one of the most popular optimization algorithms in deep learning till today , built upon RMSProp together with updating the search directions via the HB momentum . Generally speaking , the gradient-based momentum algorithms that simultaneously update the search directions and learning rates using the past gradients are referred to as the Adam-type methods ( Chen et al. , 2019 ) . These kinds of methods have achieved several state-of-the-art results on various learning tasks ( Sutskever et al. , 2013 ) . Compared with HB and AdaGrad , the main novelty of Adam lies in applying EMA to gradient estimate ( first-order ) and to element-wise square-of-gradients ( second-order ) , with the momentum parameter β1t and step size parameter β2t ( see ( 6 ) ) ( Alacaoglu et al. , 2020 ) . However , the use of EMA causes a lot of complexities to the convergence analysis . For example , in the online setting , ( Kingma & Ba , 2014 ) offered a proof that Adam would converge to the optimum . Despite its remarkable practicality , Adam suffers from the non-convergence issue . To overcome its advantages , several variants such as AMSGrad and AdamNC were proposed ( Reddi et al. , 2018 ) . Unfortunately , the regret bound of AMSGrad in ( Reddi et al. , 2018 ) is O ( √ log t √ t ) for nonsmooth convex problems , as opposed to that of O ( √ t ) of SGD . On the other hand , EMA uses the current step size in exponential moving averaging while the original HB can use the previous information ( Zou et al. , 2018 ) . This will lead the update to stagnate when β1t is very close to 1 . Fortunately , such a dilemma will not appear in Polyak ’ s HB method and a simple proof on the convergence of this kind of Adams in smooth cases has been provided ( Défossez et al. , 2020 ) . In this paper , we will focus on the adaptive Polyak ’ s HB method , in which the step size is only updated using EMA . Despite various reported practical performance for the Adam-type methods , there still exist some gaps between theoretical guarantees and empirical success . • First of all , some important regret bounds have been established to guarantee the performance of online Adam-type algorithms . Nevertheless , the online-to-batch conversion can inevitably lead the solution of the induced stochastic algorithm to take the form of averaging of all the past iterates . In practice , the last iterate is popularly used as the final solution , which has the advantage of readily enforcing the learning structure ( Chen et al. , 2012 ) . For SGD , the convergence of the last iterate , which is referred to as individual convergence in ( Tao et al. , 2020b ) , was posed as an open problem ( Shamir , 2012 ) . Only recently , its optimal individual convergence rate is proved to be O ( log t√ t ) and O ( log tt ) for general and strongly convex problems respectively ( Harvey et al. , 2019 ; Jain et al. , 2019 ) . Despite enjoying the optimal averaging convergence ( Yang et al. , 2016 ) , as far as we know , the individual convergence about the adaptive HB has not been discussed . • Secondly , the momentum technique is often claimed as an accelerated strategy in machine learning community . However , almost all the theoretical analysis is only limited to the Nesterov ’ s accelerated gradient ( NAG ) ( Nesterov , 1983 ) method especially in smooth cases ( Hu et al. , 2009 ; Liu & Belkin , 2020 ) , which accelerates the rate of SGD from O ( 1t ) to O ( 1t2 ) . While the individual convergence of HB is also concerned in some papers ( Sebbouh et al. , 2020 ; Sun et al. , 2019b ) , the considered problem is limited to smooth and the derived rate is not optimal in convex cases . It is discovered that NAG is capable of accelerating the rate of individual convergence of SGD from O ( log t√ t ) to O ( 1√ t ) ( Tao et al. , 2020a ) in nonsmooth convex cases . Nevertheless , there is still a lack of the report about the acceleration of the adaptive HB . • Finally , in practice , almost all the momentum and Adam-type algorithms are often used with a constant momentum parameter β1t ( typically between 0.9 and 0.99 ) . In theory , regret guarantees in the online Adam require a rapidly decaying β1t → 0 schedule , which is also considered in ( Sutskever et al. , 2013 ; Orvieto et al. , 2019 ) . This gap is recently bridged by getting the same regret bounds as that in ( Reddi et al. , 2018 ) with a constant β1t ( Alacaoglu et al. , 2020 ) . In each state-of-the-art deep learning library ( e.g . TensorFlow , PyTorch , and Keras ) , HB is named as SGD with momentum and β1t is empirically set to 0.9 ( Ruder , 2016 ) . Despite its intuition in controlling the number of forgotten past gradients and guarantee in optimal averaging convergence ( Yang et al. , 2016 ) , how β1t affects individual convergence has not been discussed ( Gitman et al. , 2019 ) . The goal of this paper is to close a theory-practice gap when using HB to train the deep neural networks as well as optimize the convex objective functions . Specifically , • By setting β1t = tt+2 , we prove that the adaptive HB attains an individual convergence rate of O ( 1√ t ) ( Theorem 5 ) , as opposed to that of O ( log t√ t ) of SGD . Our proof is different from all the existing analysis of averaging convergence . It not only provides a theoretical guarantee for the acceleration of HB but also clarifies how the momentum and its parameter β1t help us to achieve the optimal individual convergence . • If 0 ≤ β1t ≡ β < 1 , we prove that the adaptive HB attains optimal averaging convergence ( Theorem 6 ) . To guarantee the optimal individual convergence , Theorem 5 suggests that time-varying β1t can be adopted . Note β1t = tt+2 → 1 , thus our new convergence analysis not only offers an interesting explanation why we usually restrict β1t → 1 but also gives valuable hints how the momentum parameters should be scheduled in deep learning . We mainly focus on the proof of individual convergence of HB ( Theorem 3 , Appendix A.1 ) . The analysis of averaging convergence ( Theorem 4 ) is simpler . Their extensions to adaptive cases are slightly more complex ( Theorem 5 and 6 ) , but it is similar to the proof of AdaGrad ( Mukkamala & Hein , 2017 ) and the details can be found in the supplementary material . 2 PROBLEM STATEMENT AND RELATED WORK . Consider the following optimization problem , min f ( w ) , s.t . w ∈ Q . ( 1 ) where Q ⊆ Rd is a closed convex set and f ( w ) is a convex function . Denote that w∗ is an optimal solution and P is the projection operator on Q . Generally , the averaging convergence is defined as f ( w̄t ) − f ( w∗ ) ≤ ( t ) , ( 2 ) where w̄t = 1t ∑t i=1 wi and ( t ) is the convergence bound about t. By contrast , the individual convergence is described as f ( wt ) − f ( w∗ ) ≤ ( t ) . ( 3 ) Throughout this paper , we use g ( wt ) to denote the subgradient of f at wt . Projected subgradient descent ( PSG ) is one of the most fundamental algorithms for solving problem ( 1 ) ( Dimitri P. et al. , 2003 ) , and the iteration of which is wt+1 = P [ wt − αtg ( wt ) ] , where αt > 0 is the step size . To analyze the convergence , we need the following assumption . Assumption 1 . Assume that there exists a number M > 0 such that ‖g ( w ) ‖ ≤M , ∀w ∈ Q . It is known that the optimal bound for the nonsmooth convex problem ( 1 ) is O ( 1√ t ) ( Nemirovsky & Yudin , 1983 ) . PSG can attain this optimal convergence rate in terms of the averaged output while its optimal individual rate is only O ( log t√ t ) ( Harvey et al. , 2019 ; Jain et al. , 2019 ) . When Q = RN , the regular HB for solving the unconstrained problem ( 1 ) is wt+1 = wt − αtg ( wt ) + βt ( wt −wt−1 ) . ( 4 ) If 0 ≤ βt ≡ β < 1 , the key property of HB is that it can be reformulated as ( Ghadimi et al. , 2015 ) wt+1 + pt+1 = wt + pt − αt 1− β g ( wt ) , where pt = β 1− β ( wt −wt−1 ) . ( 5 ) Thus its convergence analysis makes almost no difference to that of PSG . Especially , if αt ≡ α√T , its averaging convergence rate is O ( 1√ T ) ( Yang et al. , 2016 ) , where T is the total number of iterations . Simply speaking , the regular Adam ( Kingma & Ba , 2014 ) takes the form of wt+1 = wt − α√ t V − 12 t ĝt , where ĝ ( wt ) is a unbiased estimation of g ( wt ) and ĝt = β1tĝt−1 + ( 1− β1t ) ĝ ( wt ) , Vt = β2tVt−1 + ( 1− β2t ) diag [ ĝ ( wt ) ĝ ( wt ) > ] . ( 6 )
The authors investigate the convergence of the projected Heavy-ball method (and an adaptive variant) for convex problems with convex constraints. The authors prove 4 results: 2 individual (last iterate) convergence rates and 2 rates using averaging. Notably, in their proofs they require an increasing (from 1/2 to 1) momentum parameter and a decreasing stepsize. Finally, the authors present some experimental results.
SP:88a54725f8b4e2e8b1876b37b783876ed14a205b
On the Inversion of Deep Generative Models
1 INTRODUCTION . In the past several years , deep generative models , e.g . Generative Adversarial Networks ( GANs ) ( Goodfellow et al. , 2014 ) and Variational Auto-Encoders ( VAEs ) ( Kingma & Welling , 2013 ) , have been greatly developed , leading to networks that can generate images , videos , and speech voices among others , that look and sound authentic to humans . Loosely speaking , these models learn a mapping from a random low-dimensional latent space to the training data distribution , obtained in an unsupervised manner . Interestingly , deep generative models are not used only to generate arbitrary signals . Recent work rely on the inversion of these models to perform visual manipulations , compressed sensing , image interpolation , and more ( Zhu et al. , 2016 ; Bora et al. , 2017 ; Simon & Aberdam , 2020 ) . In this work , we study this inversion task . Formally , denoting the signal to invert by y ∈ Rn , the generative model as G : Rn0 → Rn , and the latent vector as z ∈ Rn0 , we study the following problem : z∗ = argmin z 1 2 ‖G ( z ) − y‖22 , ( 1 ) where G is assumed to be a feed-forward neural network . The first question that comes to mind is whether this model is invertible , or equivalently , does Equation 1 have a unique solution ? In this work , we establish theoretical conditions that guarantee the invertibility of the model G. Notably , the provided theorems are applicable to general non-random generative models , and do not depend on the chosen inversion algorithm . Once the existence of a unique solution is recognized , the next challenge is to provide a recovery algorithm that is guaranteed to obtain the sought solution . A common and simple approach is to draw a random vector z and iteratively update it using gradient descent , opting to minimize Equation 1 ( Zhu et al. , 2016 ; Bora et al. , 2017 ) . Unfortunately , this approach has theoretical guarantees only in limited scenarios ( Hand et al. , 2018 ; Hand & Voroninski , 2019 ) , since the inversion problem is generally non-convex . An alternative approach is to train an encoding neural network that maps images to their latent vectors ( Zhu et al. , 2016 ; Donahue et al. , 2016 ; Bau et al. , 2019 ; Simon & Aberdam , 2020 ) ; however , this method is not accompanied by any theoretical justification . We adopt a third approach in which the generative model is inverted in an analytical fashion . Specifically , we perform the inversion layer-by-layer , similar to Lei et al . ( 2019 ) . Our approach is based on the observation that every hidden layer is an outcome of a weight matrix multiplying a sparse vector , followed by a ReLU activation . By utilizing sparse representation theory , the proposed algorithm ensures perfect recovery in the noiseless case and bounded estimation error in the noisy one . Moreover , we show numerically that our algorithm outperforms gradient descent in several tasks , including reconstruction of noiseless and corrupted images . Main contributions : The contributions of this work are both theoretical and practical . We derive theoretical conditions for the invertiblity of deep generative models by ensuring a unique solution for the inversion problem defined in Equation 1 . In short , these conditions rely on the growth of the non-zero elements of consecutive hidden layers by a factor of 2 for trained networks and by any constant greater than 1 for random models . Then , by leveraging the inherent sparsity of the hidden layers , we introduce a layerwise inversion algorithm with provable guarantees in the noiseless and noisy settings for fully-connected generators . To the best of our knowledge , this is the first work that provides such guarantees for general ( non-random ) models , addressing both the conceptual inversion and provable algorithms for solving Equation 1 . Finally , we provide numerical experiments , demonstrating the superiority of our approach over gradient descent in various scenarios . 1.1 RELATED WORK . Inverting deep generative models : A tempting approach for solving Equation 1 is to use first order methods such as gradient descent . Even though this inversion is generally non-convex , the works in Hand & Voroninski ( 2019 ) ; Hand et al . ( 2018 ) show that if the weights are random then , under additional assumptions , no spurious stationary points exist , and thus gradient descent converges to the optimum . A different analysis , given in Latorre et al . ( 2019 ) , studies the case of strongly smooth generative models that are near isometry . In this work , we study the inversion of general ( non-random and non-smooth ) ReLU activated generative networks , and provide a provable algorithm that empirically outperforms gradient descent . A close but different line of theoretical work analyzes the compressive sensing abilities of trained deep generative networks ( Shah & Hegde , 2018 ; Bora et al. , 2017 ) ; however , these works assume that an ideal inversion algorithm , solving Equation 1 , exists . Different works Bojanowski et al . ( 2017 ) ; Wu et al . ( 2019 ) suggest training procedures that result with generative models that can be easily inverted . Nevertheless , in this work we do not assume anything on the training procedure itself , and only rely on the weights of the trained model . Layered-wise inversion : The closest work to ours , and indeed its source of inspiration , is Lei et al . ( 2019 ) , which proposes a novel scheme for inverting generative models . By assuming that the input signal was corrupted by bounded noise in terms of ` 1 or ` ∞ , they suggest inverting the model using linear programs layer-by-layer . That said , to assure a stable inversion , their analysis is restricted to cases where : ( i ) the network weights are Gaussian i.i.d . variables ; ( ii ) the layers expand such that the number of non-zero elements in each layer is larger than the size of the entire layer preceding it ; and ( iii ) that the last activation function is either ReLU or leaky-ReLU . Unfortunately , as mentioned in their work , these three assumptions often do not hold in practice . In this work , we do not rely on the distribution of the weights nor on the chosen activation function of the last layer . Furthermore , we relax the expansion assumption as to rely only on the expansion of the number of non-zero elements . This relaxation is especially needed in the last hidden layer , which is typically larger than the image size . Neural networks and sparse representation : In the search for a profound theoretical understanding for deep learning , a series of papers suggested a connection between neural networks and sparse coding , by demonstrating that the forward pass of a neural network is in fact a pursuit for a multilayer sparse representation ( Papyan et al. , 2017 ; Sulam et al. , 2018 ; Chun & Fessler , 2019 ; Sulam et al. , 2019 ; Romano et al. , 2019 ; Xin et al. , 2016 ) . In this work , we expand this proposition by showing that the inversion of a generative model is based on sequential sparse coding steps . 2 THE GENERATIVE MODEL . Notations : We use bold uppercase letters to represent matrices , and bold lowercase letters to represent vectors . The vector wj represents the jth column in the matrix W. Similarly , the vector wi , j represents the jth column in the matrix Wi . The activation function ReLU is the entry-wise operator ReLU ( u ) = max { u,0 } . We denote by spark ( W ) the smallest number of columns in W that are linearly-dependent , and by ‖x‖0 the number of non-zero elements in x . The mutual coherence of a matrix W is defined as : µ ( W ) = maxi 6=j |wTi wj| ‖wi‖2‖wj‖2 . Finally , we define xS and WSi as the supported vector and the row-supported matrix according to the set S , and denote by Sc the complementary set of S. Problem Statement : We consider a typical generative scheme G : Rn0 → Rn of the form : x0 = z , xi+1 = ReLU ( Wixi ) , for all i ∈ { 0 , . . . , L− 1 } , G ( z ) = φ ( WLxL ) , ( 2 ) where xi ∈ Rni , { xi } L−1i=1 are the hidden layers , Wi ∈ Rni+1×ni are the weight matrices ( nL+1 = n ) , x0 = z ∈ Rn0 is the latent vector that is usually randomly selected from a normal distribution , z ∼ N ( 0 , σ2In0 ) , and φ is an invertible activation function , e.g . tanh , sigmoid , or piece-wise linear . Given a sample x = G ( z ) , that was created by the generative model above , we aim to recover its latent vector z . Note that each hidden vector in the model is produced by a ReLU activation , leading to hidden layers that are inherently sparse . This observation supports our approach to study this model utilizing sparse representation theory . In what follows , we use this observation to derive theoretical statements on the invertibility and the stability of this problem , and to develop pursuit algorithms that are guaranteed to restore the original latent vector . 3 INVERTIBILITY AND UNIQUENESS . We start by addressing this question : “ Is this generative process invertible ? ” . In other words , when given a signal that was generated by the model , x = G ( z∗ ) , we know that a solution z∗ to the inverse problem exists ; however , can we ensure that this is the only one ? Theorem 1 below ( its proof is given in Appendix A ) provides such guarantees , which are based on the sparsity level of the hidden layers and the spark of the weight matrices ( see Section 2 ) . Importantly , this theorem is not restricted to a specific pursuit algorithm ; it can rather be used for any restoration method ( gradient descent , deep encoder , etc . ) to determine whether the recovered latent vector is the unique solution . Definition 1 ( sub-spark ) . Define the s-sub-spark of a matrix W as the minimal spark of any subset S of rows of cardinality |S| = s , sub-spark ( W , s ) = min|S|=s spark ( WS ) . Definition 2 ( sub-rank ) . Define the s-sub-rank of a matrix W as the minimal rank over any subset S of rows of cardinality |S| = s , sub-rank ( W , s ) = min|S|=s rank ( WS ) . Theorem 1 ( Uniqueness ) . Consider the generative scheme described in Equation 2 and a signal x = G ( z∗ ) with a corresponding set of representations { x∗i } Li=1 that satisfy : ( i ) sL = ‖x∗L‖0 < spark ( WL ) 2 . ( ii ) si = ‖x∗i ‖0 < sub-spark ( Wi , si+1 ) 2 , for all i ∈ { 1 , . . . , L− 1 } . ( iii ) n0 = sub-rank ( W0 , s1 ) ≤ s1 . Then , z∗ is the unique solution to the inverse problem that meets these sparsity conditions . Theorem 1 is the first of its kind to provide uniqueness guarantees for general non-statistical weight matrices . Moreover , it only requires an expansion of the layer cardinalities as opposed to Huang et al . ( 2018 ) ; Hand & Voroninski ( 2019 ) and Lei et al . ( 2019 ) that require dimensionality expansion that often does not hold for the last layer ( typically n < nL ) . A direct corollary of Theorem 1 is in the case of random matrices . In such case , the probability of heaving n linearly dependent columns is essentially zero ( Elad , 2010 , Chapter 2 ) . Hence , the conditions of Theorem 1 become : ( i ) sL < n+ 1 2 . ( ii ) si < si+1 + 1 2 . ( iii ) s1 ≥ n0 . ( 3 ) In fact , since singular square matrices have Lebesgue measure zero , this corollary holds for almost all set of matrices . In practice , to allow for a sufficient increase in the cardinalities of the hidden layers , their dimensions should expand as well , excluding the last layer . For example , if the dimensions of the hidden layers increase by a factor of 2 , as long as the hidden layers preserve a constant percentage of non-zero elements , Theorem 1 holds almost surely . Notably , this is the common practice in various generative architectures , such as DC-GAN Radford et al . ( 2015 ) and PGAN Karras et al . ( 2017 ) . Nevertheless , in the random setting , we can further relax the above conditions by utilizing a theorem by Foucart & Rauhut ( 2013 ) . This theorem considers a typical sparse representation model with a random dictionary and states that a sparse representation is unique as long as its cardinality is smaller than the signal dimension . Therefore , as presented in Theorem 2 , in the random setting the cardinality across the layers need to grow only by a constant , i.e . si < si+1 and sL < n. Theorem 2 ( Uniqueness for Random Weight Matrices ) . Assume that the weight matrices comprise of random independent and identically distributed entries ( say Gaussian ) . If the representations of a signal x = G ( z∗ ) satisfy : ( i ) sL = ‖xL‖0 < n. ( ii ) si = ‖xi‖0 < si+1 , for all i ∈ { 1 , . . . , L− 1 } . ( iii ) s1 = ‖x1‖0 ≥ n0 , then , with probability 1 , the inverse problem has a unique solution that meets these conditions . The above theorem states that to ensure a unique global minimum in the stochastic case , the number of nonzero elements should expand by only a single parameter . The proof of this theorem follows the same protocol as Theorem 1 ’ s proof , while replacing the spark-based uniqueness ( Donoho & Elad , 2003 ) with Foucart & Rauhut ( 2013 ) . As presented in Section 6.1 , these conditions are very effective in predicting whether the generative process is invertible or not , regardless of the recovery algorithm used .
In this submission, the authors study the inversion of ReLU networks (where the output of the network is subject to an invertible activation function). This is an important task, for example for inverse problems using generative priors. The authors introduce spark-based conditions for the invertibility of each layer of the network, leveraging sparsity that is induced by ReLUs. The authors also introduce a novel layer wise inversion algorithm and provide provable recovery guarantees in both noisy and noiseless settings. Empirical results demonstrate the superiority of the proposed algorithm relative to baselines for inversion in particular parameter regimes.
SP:26a9ea5bc6af46b1e59b1e34390a1bdb5a660312
SiamCAN:Simple yet Effective Method to enhance Siamese Short-Term Tracking
1 INTRODUCTION . Visual object tracking is the fundamental task of computer vision , aiming at tracking unknown object of which the information is given by the first frame . Although great progress has been achieved in recent years , a robust tracker is still in desperate demand due to tricky challenge such as scale variation , appearance deformation and similar object with complex background which can deteriorate tracking performance ( Wu et al . ( 2013 ) ; Zhang et al . ( 2014 ) ) . Recently , Siamese Network based trackers have taken a vital place in SOT field due to its accuracy and speed . Since ( Tao et al . ( 2016 ) ) and ( Bertinetto et al . ( 2016 ) ) introduced Siamese networks in visual tracking , Siamese structure has been adopted as baseline for researchers to design efficient trackers ( Li et al . ( 2018 ) ; Zhu et al . ( 2018a ) ; Zhang & Peng ( 2019 ) ; Li et al . ( 2019 ) ; Xu et al . ( 2020 ) ; Chen et al . ( 2020 ) ) . After siamRPN ( Li et al . ( 2018 ) ) being proposed to gain more accurate anchor boxes , region proposal network has become an essential part of tracker . However , the anchor scales are manual-set which go against the fact that the tracking target is unknown . Besides , the performance of the Siamese based trackers depends greatly on offline training by using massive frame pairs . Therefore , it highly increases the risk of tracking drift when facing significant deformation , similar object distractors , or complex background , due to the undiscriminating feature learned from the target when the category of the target is excluded from the training dataset . In these years , the attention mechanism has become the spotlight in computer vision which inspires the relative works not only in detection task but also in visual tracking ( He et al . ( 2018 ) ; Abdelpakey et al . ( 2018 ) ; Wang et al . ( 2018 ) ; Zhu et al . ( 2018b ) ) . The attention mechanism includes channel attention and spatial attention , the former tends to generate a set of channel-weights for modeling interdependencies between channels while the latter focuses on finding the informative part by utilizing the inter-spatial relationship of features . Considering these benefits , Siamese based trackers try to introduce attention module to distinguish target from complex background . Nevertheless , the performance of these trackers is not satisfactory for exploiting the expressive power of the attention mechanism inappropriately . Based on the limitations discussed above , we design a simple Cross-attention Guided Siamese network ( SiamCAN ) based tracker with anchor-free strategy which performs better than the state-ofthe-art trackers when facing the similar object challenge . SiamCAN takes template channel attention to guide the feature extraction of search image by which can strengthen the ability of tracker to overcome distractors and complex backgrounds , performing better than most of Siamese-based trackers , as shown in Figure 1 . The main contributions of this work are : • We formulate a cross-attention guided Siamese framework ( SiamCAN ) including crosschannel attention and self-spatial attention . The cross-channel attention builds an interactive bridge between the target template and search frame to share the identical channel weights . The self-spatial attention focuses on the discriminative part of the correlated feature map , which is complementary to the cross-channel attention . • The proposed tracker is adaptive box regression , without numerous hyper-parameters setting . In order to get more accurate bounding box , we adopt the proper strategy to utilize the merits of anchor-free at the stage of training . • SiamCAN achieves state-of-the-art results on four large tracking benchmarks , including OTB100 ( Wu et al . ( 2013 ) ) , UAV123 ( Mueller et al . ( 2016 ) ) , VOT2018 ( Kristan et al . ( 2018 ) ) and VOT2019 ( Kristan et al . ( 2019 ) ) . The speed of tracker can also achieve 35 FPS . 2 RELATED WORK . In this section , we briefly review the recent Siamese based trackers , the anchor-free approaches and attention mechanism in both tracking and detection filed . 2.1 SIAMESE NETWORK BASED TRACKER . The pioneering works , SINT ( Tao et al . ( 2016 ) ) and SiamFC ( Bertinetto et al . ( 2016 ) ) , first introduce the siamese network in tracking filed . Due to its fast speed with light structure , Siamese network draws great attention from the visual tracking community . SiamFC tries to use siamese network to learn the feature of both target template and search frame , and compare the similarity of them to find the most confident candidates . Although tracks fast , it can not handle the scale variation problem by applying several scales of feature map . Inspired by Faster-RCNN ( Ren et al . ( 2015 ) ) from object detection , SiamRPN ( Li et al . ( 2018 ) ) draws on the region proposal network to get more various scale ratio bounding boxes . Since then , the RPN module has become an essential part of the tracker ( Zhu et al . ( 2018a ) ; Zhang & Peng ( 2019 ) ; Li et al . ( 2019 ) ; Dong & Shen ( 2018 ) ; Fan & Ling ( 2019 ) ) . However , the complexity of anchor design makes the performance of trackers depend greatly on the effect of anchor training . 2.2 ANCHOR-FREE APPROACHES . In recent time , Anchor-free approaches have developed fast . The achor-free work can be divided into two categories . The first one ( Kong et al . ( 2019 ) ; Law & Deng ( 2018 ) ) aims to estimate the keypoints of the objects , while , the other ( Redmon et al . ( 2016 ) ; Tian et al . ( 2019 ) ) tends to predict the bounding box for each pixel which can avoid presetting the scale ratio of anchors . Not only is anchor-free approach popular in detection field , but it is suitable for target estimation in tracking field due to its high efficiency . SiamFC++ takes example by FCOS ( Tian et al . ( 2019 ) ) to design regression subnetwork and add centerness branch to eliminate the low quality samples . SiamCAR ( Guo et al . ( 2020 ) ) changes the basic network structure additionally , merging the multi-layers features before correlation . Different from SiamCAR , SiamBAN ( Chen et al . ( 2020 ) ) puts emphasis on the label assignment which improves the tracking performance . Our method differs from the above trackers in details ( Section4.3 ) . 2.3 ATTENTION MECHANISM . Attention mechanism has been the focus of the detection filed , on account to its powerful ability of enhancing deep CNNs . SE-Net ( Hu et al . ( 2018 ) ) firstly puts forward the mechanism to generate channel weights in return to direct the learning of channel attention . After that , CBAM ( Woo et al . ( 2018 ) ) utilizes both max-pooling and average-pooling to generate the merged attention , includes channel and spatial attention . Recently , ECA-Net ( Wang et al . ( 2020b ) ) finds that avoiding dimensionality is of great importance for channel attention learning , and propose a cross-channel interaction strategy which performs better than SE-Net . In the tracking field , the recent trackers began to equip with the attention mechanism to get better performance . SA Siam ( He et al . ( 2018 ) ) simply combines the SE-Net and SiamFC to get both discriminative and general features which boost the tracking performance . RASNet ( Wang et al . ( 2018 ) ) designs residual attention , general attention and channel attention to learn target feature better . SATIN ( Gao et al . ( 2020 ) ) uses hourglass network as backbone and designs a cross-attention module for exemplar branch to combine the channel and spatial attention from shallow and deep layers . However , these trackers only calculate alongside each branch and neglect the information flow between them , as a result , the ability of attention mechanism can not be fully utilized . 3 OUR APPROACH As shown in Figure 2 , the proposed framework mainly consists of three components , the feature extracted Siamese network , the cross-attention module and anchor-free bounding box regression subnetwork with foreground classification subnetwork . 3.1 FEATURE EXTRACTED SIAMESE NETWORK . Like the most Siamese based tracker , we adopt the fully convolution network without padding , which guarantees the accurate location calculation . Feature extracted network composes of two parts , template branch and search branch . Both of them share the same layer parameters of backbone , by this mean , CNNs can learn the relative feature for them to calculate similarity in the subsequent operation . The template branch intends to encode the exemplar feature in the first frame while the other branch aims to encode the candidates feature which may involve target in the follow-up frames . Set the input in template branch as It , the subsequent frames in search branch as Is . We feed the It and Is into backbone , and get the feature φl ( It ) and φl ( Is ) from different l-th backbone layers . Next , the given features are sent to the corresponding branch after having a convolution with a neck layer to reduce feature channel size to 256 and get the template feature ψt ( It ) with the search feature ψs ( Is ) . At last , crop the 7×7 patch from the center of template feature . 3.2 CROSS-ATTENTION NETWORK . Attention mechanism is created for the purpose that enforce CNNs to focus on the special parts which is of great importance , i.e. , channels information and spatial information . The channel attention is designed to explore the interdependencies between channels while the spatial attention tends to make CNNs pay more attention to the most critical areas of the feature . Different from ( He et al . ( 2018 ) ; Wang et al . ( 2018 ) ) , the channel attention is used between two branches not being applied as self-attention . Moreover , SATIN ( Gao et al . ( 2020 ) ) designs a module also called cross-attention , but the ’ cross ’ means the combination of different layers which is different from our method . In this paper , the target branch feature ψt ( It ) is sent to global average pooling to get aggregated feature Yt , i.e. , Yt = 1 WH ∑W , H i=0 ψt ( It ) ( 1 ) Given the aggregated feature , the channel weight is obtained by performing a 1D convolution of size k , i.e. , Vi = σ ( ∑k j=1 ω jyji ) , y j i ∈ Ω k i ( 2 ) Where σ is a Sigmoid function , ω indicates the parameters of 1D convolution and Ωki indicates the set of k adjacent channels of yi . To let search branch learns the information from target template , we multiply the channel weights with the search feature , i.e. , ψ̃s ( Is ) = ψs ( Is ) ∗ V ( 3 ) 3.3 CLASSIFICATION AND ANCHOR-FREE REGRESSION SUBNETWORK . As shown in Figure 2 , the correlation feature map is calculated by the depth-wise correlation operation between ψ̃s ( Is ) and ψt ( It ) , i.e. , F clsw×h×c = ψ̃s ( Is ) ? ψt ( It ) ( 4 ) F regw×h×c = ψ̃s ( Is ) ? ψt ( It ) ( 5 ) where ? denotes depth-wise convolution operation . Then , we apply self-spatial attention to the feature map in order to focus on discriminative part automatically , i.e. , F̃ clsw×h×c = σ ( f ( [ AvgP ( F cls w×h×c ) ; MaxP ( F cls w×h×c ) ] ) ) ( 6 ) F̃ regw×h×c = σ ( f ( [ AvgP ( F reg w×h×c ) ; MaxP ( F reg w×h×c ) ] ) ) ( 7 ) After that , we use two convolution layers with kernel size 1×1 to reduce the number of channel from 256 to 2 and 4 respectively for each branch and concatenate the feature maps from different layers of backbone by the trainable weights α , i.e. , P clsw×h×2 = ∑N l=1 αl ∗ F̃ clsl : w×h×2 ( 8 ) P regw×h×4 = ∑N l=1 αl ∗ F̃ regl : w×h×4 ( 9 ) where N denotes the total number of the backbone layers we use . The classification feature map has two channels , the one represents the foreground and the points ( i , j ) on Pclsw×h×2 ( 0 , i , j ) refer to the probability scores of target , the other represents the background and the points ( i , j ) on Pclsw×h×2 ( 1 , i , j ) refer to the probability scores of background . The regression feature map has four channels , each of them represents the four direction distances from the points location in search branch input to the four sides of the bounding box respectively , that is to say , each point ( i , j ) in Pregw×h×2 ( : , i , j ) is a vector which can denoted as ( l , r , t , b ) . Classification label and regression label . For anchor based methods , the positive sample and the negative one are classified by the value of Intersection over Union between anchor and groundtruth . In this paper , We use ellipse and circle figure region to design label for points ( i , j ) in feature map , which is inspired by ( Chen et al . ( 2020 ) ) . The ellipse E1 center and axes length are set by groundtruth center ( gxc , gyc ) of groundtruth size ( gw 2 , gh 2 ) , We also get the circle C2 with 0.5gw ∗ 0.5gh ( ( gw2 ) 2 + ( gh2 ) 2 ) 1 2 as radius , i.e. , ( B ( pi ) − gxc ) 2 ( gw2 ) 2 + ( B ( pj ) − gyc ) 2 ( gh2 ) 2 = 1 ( 10 ) B ( pi ) 2 +B ( pj ) 2 = r2 ( 11 ) where B denotes the calculation for the location of points ( i , j ) in feature map P clsw×h×2 back to the search frame . If the point B ( pi , pj ) falls within the C2 region , it will be given a positive label , and if it falls outside the E1 area , it will be given a negative label , i.e. , label = 1 , ifC2 ( p ( i , j ) ) < r 2 −1 , ifE1 ( p ( i , j ) ) > 1 0 , otherwise ( 12 ) For regression branch , the regression targets can be defined by : dl ( i , j ) = pi − gx0 , d t ( i , j ) = pj − gy0 ( 13 ) dr ( i , j ) = gx1 − pi , d b ( i , j ) = gy1 − pj ( 14 ) where ( gx0 , gy0 ) , ( gx1 , gy1 ) denote the left-top and right-bottom coordinates location of the groundtruth . Loss function . We employ cross entropy loss to train the classification network . To predict more accurate bounding box , we adopt the DIoU loss ( Zheng et al . ( 2020 ) ) to train the regression network , i.e. , Lreg = 1− IoU + ρ2 ( p , pgt ) c ( 15 ) where ρ ( . ) is the Euclidean distance , p and pgt denote the central points of predicted box and groundtruth and c is the diagonal length of the smallest enclosing box covering the two boxes . For regression branch training , DIoU loss can optimize the bounding faster than GIoU loss ( Rezatofighi et al . ( 2019 ) ) . The overall loss function is : L = λ1Lcls + λ2Lreg ( 16 ) where constants λ1 and λ2 weight the classification loss and regression loss . During model training , we simply set λ1 = 1 , λ2 = 1 without hyper-parameters searching .
The architecture of the tracker is standard siamese. The novelty is at a technical level, modules of the "cross-guided" type have been proposed. It does bring an improvement, but not to the state-of-the-art level. There is no significant insight, training, updating novelty or theoretical. Recent short-term trackers output segmentation, the proposed tracker outputs a bounding box.
SP:bba4f71cb381146e980c7cb32dd2510e1bcdb226
Supervision Accelerates Pre-training in Contrastive Semi-Supervised Learning of Visual Representations
We investigate a strategy for improving the efficiency of contrastive learning of visual representations by leveraging a small amount of supervised information during pre-training . We propose a semi-supervised loss , SuNCEt , based on noise-contrastive estimation and neighbourhood component analysis , that aims to distinguish examples of different classes in addition to the self-supervised instancewise pretext tasks . On ImageNet , we find that SuNCEt can be used to match the semi-supervised learning accuracy of previous contrastive approaches while using less than half the amount of pre-training and compute . Our main insight is that leveraging even a small amount of labeled data during pre-training , and not only during fine-tuning , provides an important signal that can significantly accelerate contrastive learning of visual representations . 1 INTRODUCTION . Learning visual representations that are semantically meaningful with limited semantic annotations is a longstanding challenge with the potential to drastically improve the data-efficiency of learning agents . Semi-supervised learning algorithms based on contrastive instance-wise pretext tasks learn representations with limited label information and have shown great promise ( Hadsell et al. , 2006 ; Wu et al. , 2018b ; Bachman et al. , 2019 ; Misra & van der Maaten , 2020 ; Chen et al. , 2020a ) . Unfortunately , despite achieving state-of-the-art performance , these semi-supervised contrastive approaches typically require at least an order of magnitude more compute than standard supervised training with a cross-entropy loss ( albeit without requiring access to the same amount of labeled data ) . Burdensome computational requirements not only make training laborious and particularly timeand energy-consuming ; they also exacerbate other issues , making it more difficult to scale to more complex models and problems , and potentially inducing significant carbon footprints depending on the infrastructure used for training ( Henderson et al. , 2020 ) . In this work , we investigate a strategy for improving the computational efficiency of contrastive learning of visual representations by leveraging a small amount of supervised information during pre-training . We propose a semi-supervised loss , SuNCEt , based on noise-contrastive estimation ( Gutmann & Hyvärinen , 2010 ) and neighbourhood component analysis ( Goldberger et al. , 2005 ) , that aims at distinguishing examples of different classes in addition to the self-supervised instance-wise pretext tasks . We conduct a case-study with respect to the approach of Chen et al . ( 2020a ) on the ImageNet ( Russakovsky et al. , 2015 ) and CIFAR10 ( Krizhevsky & Hinton , 2009 ) benchmarks . We find that using any available labels during pre-training ( either in the form of a cross-entropy loss or SuNCEt ) can be used to reduce the amount of pre-training required . Our most notable results on ImageNet are obtained with SuNCEt , where we can match the semi-supervised learning accuracy of previous contrastive approaches while using less than half the amount of pre-training and compute , and require no hyper-parameter tuning . : : : By : : : : : : : : : combining SuNCEt : : : with : : : the : : : : : : : : : contrastive : : : : : : SwAV : : : : : : method : : of : : : : : : : : : : : : : : : Caron et al . ( 2020 ) : , : : : we : : : also : : : : : : : achieve : : : : : : : : : : : : state-of-the-art : : : : : top-5 : : : : : : : accuracy : : : on : : : : : : : : ImageNet : : : : with : : : : 10 % : : : : : : labels , : : : : while : : : : : : cutting : : : the : : : : : : : : : : pre-training : : : : : : epochs : : in : : : : : half . 2 BACKGROUND . The goal of contrastive learning is to learn representations by comparison . Recently , this class of approaches has fueled rapid progress in unsupervised representation learning of images through selfsupervision ( Chopra et al. , 2005 ; Hadsell et al. , 2006 ; Bachman et al. , 2019 ; Oord et al. , 2018 ; Hénaff et al. , 2019 ; Tian et al. , 2019 ; Misra & van der Maaten , 2020 ; He et al. , 2019 ; Arora et al. , 2019 ; Chen et al. , 2020a ; Caron et al. , 2020 ; Grill et al. , 2020 ; Chen et al. , 2020b ) . In that context , contrastive approaches usually learn by maximizing the agreement between representations of different views of the same image , either directly , via instance discrimination , or indirectly through , cluster prototypes . Instance-wise approaches perform pairwise comparison of input data to push representations of similar inputs close to one another while pushing apart representations of dissimilar inputs , akin to a form of distance-metric learning . Self-supervised contrastive approaches typically rely on a data-augmentation module , an encoder network , and a contrastive loss . The data augmentation module stochastically maps an image xi ∈ R3×H×W to a different view . Denote by x̂i,1 , x̂i,2 two possible views of an image xi , and denote by fθ the parameterized encoder , which maps an input image x̂i,1 to a representation vector zi,1 = fθ ( x̂i,1 ) ∈ Rd . The encoder fθ is usually parameterized as a deep neural network with learnable parameters θ . Given a representation zi,1 , referred to as an anchor embedding , and the representation of an alternative view of the same input zi,2 , referred to as a positive sample , the goal is to optimize the encoder fθ to output representations that enable one to easily discriminate between the positive sample and noise using multinomial logistic regression . This learning by picking out the positive sample from a pool of negatives is in the spirit of noise-contrastive estimation ( Gutmann & Hyvärinen , 2010 ) . The noise samples in this context are often taken to be the representations of other images . For example , suppose we have a set of images ( xi ) i∈ [ n ] and apply the stochastic data-augmentation to construct a new set with two views of each image , ( x̂i,1 , x̂i,2 ) i∈ [ n ] . Denote by Z = ( zi,1 , zi,2 ) i∈ [ n ] the set of representations corresponding to these augmented images . Then the noise samples with respect to the anchor embedding zi,1 ∈ Z are given by Z\ { zi,1 , zi,2 } . In this work , we minimize the normalized temperature-scaled cross entropy loss ( Chen et al. , 2020a ) for instance-wise discrimination ` inst ( zi,1 ) = − log exp ( sim ( zi,1 , zi,2 ) /τ ) ∑ z∈Z\ { zi,1 } exp ( sim ( zi,1 , z ) /τ ) , ( 1 ) where sim ( a , b ) = a T b ‖a‖‖b‖ denotes the cosine similarity and τ > 0 is a temperature parameter . In typical semi-supervised contrastive learning setups , the encoder fθ is learned in a fully unsupervised pre-training phase . The goal of this pre-training is to learn a representation invariant to common data augmentations ( cf . Hadsell et al . ( 2006 ) ; Misra & van der Maaten ( 2020 ) ) such as random crop/flip , resizing , color distortions , and Gaussian blur . After pre-training on unlabeled data , labeled training instances are leveraged to fine-tune fθ , e.g. , using the canonical cross-entropy loss . 3 METHODOLOGY . Our goal is to investigate a strategy for improving the computational efficiency of contrastive learning of visual representations by leveraging the available supervised information during pre-training . Here we explore a contrastive approach for utilizing available labels , but we also include additional numerical evaluations with a cross-entropy loss and a parametric classifier in Section 4 . Contrastive approach . Consider a set S of labeled samples operated upon by the stochastic dataaugmentation module . The associated set of parameterized embeddings are given by ZS ( θ ) = ( fθ ( x̂ ) ) x̂∈S . Let x̂ ∈ S denote an anchor image view with representation z = fθ ( x̂ ) and class label y . By slight overload of notation , denote by Zy ( θ ) the set of embeddings for images in S with class label y ( same class as the anchor z ) . We define the Supervised Noise Contrastive Estimation ( SuNCEt ) loss as ` ( z ) = − log ∑ zj∈Zy ( θ ) exp ( sim ( z , zj ) /τ ) ∑ zk∈ZS ( θ ) \ { z } exp ( sim ( z , zk ) /τ ) , ( 2 ) which is then averaged over all anchors 1|S| ∑ z∈ZS ( θ ) ` ( z ) . In each iteration of training we sample a few unlabeled images to compute the self-supervised instance-discrimination loss equation 1 , and sample a few labeled images to construct the set S and compute the SuNCEt loss equation 2 . We sum these two losses together and backpropagate through the encoder network . By convention , when “ sampling unlabeled images , ” we actually sample images from the entire training set ( labeled and unlabeled ) . This simple procedure bears some similarity to unsupervised data augmentation ( Xie et al. , 2019 ) , where a supervised cross-entropy loss and a parametric consistency loss are calculated at each iteration . Motivation . We motivate the form of the SuNCEt loss by leveraging the relationship between contrastive representation learning and distance-metric learning . Specifically , the SuNCEt loss can be seen as a form of neighborhood component analysis ( Goldberger et al. , 2005 ) with an alternative similarity metric . Consider a classifier that predicts an image ’ s class based on the similarity of the image ’ s embedding z to those of other labeled images zj using a temperature-scaled cosine similarity metric d ( z , zj ) = z T zj/ ( ‖z‖‖zj‖τ ) . Specifically , let the classifier randomly choose one point as its neighbour , with distribution as described below , and adopt the neighbour ’ s class . Given the query embedding z , denote the probability that the classifier selects point zj ∈ ZS ( θ ) \ { z } as its neighbour by p ( zj |z ) = exp ( d ( z , zj ) ) ∑ zk∈ZS ( θ ) \ { z } exp ( d ( z , zk ) ) . Under mutual exclusivity ( since the classifier only chooses one neighbour ) and a uniform prior , the probability that the classifier predicts the class label ŷ equal to some class c , given a query image x with embedding z , is p ( ŷ = c|z ) = ∑ zj∈Zc ( θ ) p ( zj |z ) = ∑ zj∈Zc ( θ ) exp ( d ( z , zj ) ) ∑ zk∈ZS ( θ ) \ { z } exp ( d ( z , zk ) ) , ( 3 ) where Zc ( θ ) ⊂ ZS ( θ ) is the set of embeddings of labeled images from class c. Minimizing the KL divergence between p ( ŷ|z ) and the true class distribution ( one-hot vector on the true class y ) , one arrives at the SuNCEt loss in equation 2 . Assuming independence between labeled samples , the aggregate loss with respect to all labeled samples S decomposes into the simple sum ∑ z∈ZS ( θ ) ` ( z ) . Numerical experiments in Appendix G show that using SuNCEt during pre-training optimizes this aforementioned non-parametric stochastic nearest-neighbours classifier and significantly out-performs inference with the more common K-Nearest Neighbours strategy . Practical considerations . Rather than directly using the outputs of encoder fθ to contrast samples , we feed the representations into a small multi-layer perceptron ( MLP ) , hθproj , to project the representations into a lower dimensional subspace before evaluating the contrastive loss , following Chen et al . ( 2020a ) . That is , instead of using z = fθ ( x̂ ) directly in equation 1 and equation 2 , we use hθproj ( z ) = hθproj ( fθ ( x̂ ) ) . The projection network hθproj is only used for optimizing the contrastive loss , and is discarded at the fine-tuning phase . In general , adding SuNCEt to a pre-training script only takes a few lines of code . See Listing 2 in Appendix A for the pseudo-code used to compute SuNCEt loss on a mini-batch of labeled images .
This paper designs a new loss, called SuNCTt, to speed up the convergence of semi-supervised training. Specifically, the loss involves the computation of similarity between anchor and other images with the same class, and the similarity between anchor and other labeled images. It is claimed to be considered as the form of neighborhood component analysis. Together with the standard contrastive learning loss, it only uses less than half the amount of pre-training and computes to match the accuracy of the previous approaches.
SP:2385685fee86534706f021a67f2393812f063415
A Benchmark for Voice-Face Cross-Modal Matching and Retrieval
Cross-modal associations between a person ’ s voice and face can be learned algorithmically , and this is a useful functionality in many audio and visual applications . The problem can be defined as two tasks : voice-face matching and retrieval . Recently , this topic has attracted much research attention , but it is still in its early stages of development , and evaluation protocols and test schemes need to be more standardized . Performance metrics for different subtasks are also scarce , and a benchmark for this problem needs to be established . In this paper , a baseline evaluation framework is proposed for voice-face matching and retrieval tasks . Test confidence is analyzed , and a confidence interval for estimated accuracy is proposed . Various state-of-the-art performances with high test confidence are achieved on a series of subtasks using the baseline method ( called TriNet ) included in this framework . The source code will be published along with the paper . The results of this study can provide a basis for future research on voice-face cross-modal learning . 1 INTRODUCTION . Studies in biology and neuroscience have shown that a person ’ s appearance is associated with his or her voice ( Smith et al. , 2016b ; a ; Mavica & Barenholtz , 2013 ) . Both the facial features and voice–controlling organs of individuals are affected by hormones and genetic information ( Hollien & Moore , 1960 ; Thornhill & Møller , 1997 ; Kamachi et al. , 2003 ; Wells et al. , 2013 ) , and human beings have the ability to recognize this association . For example , when speaking on the phone , we can guess the gender and approximate age of the person on the other end of the line . When watching a TV show without sound , we can also imagine the approximate voice of the protagonist by observing his or her face movements . With the recent advances in deep learning , face recognition models ( Wen et al. , 2016 ; Wu et al. , 2018 ; Liu et al. , 2017 ) and speaker recognition models ( Wang et al. , 2018 ; Li et al. , 2017 ) have achieved extremely high precision . It is then natural to wonder if the associations between voices and faces could be discovered algorithmically by machines . The research on this problem could benefit many applications such as the synchronization of video faces with talking voices and the generation of faces according to voice . In recent years , much research attention ( Wen et al. , 2018 ; Horiguchi et al. , 2018 ; Nagrani et al. , 2018a ; Kim et al. , 2018 ; Nagrani et al. , 2018b ) has been paid to voice-face cross-modal learning tasks , which has shown the feasibility of recognizing voice-face associations . This problem is generally formulated as a voice-face matching task and a voice-face retrieval task . The research on this problem is still at an early stage , and a benchmark for this problem still needs to be established . In this paper , we address this issue with the following contributions : 1 ) Existing methods are all evaluated on a single dataset of about 200 identities with limited tasks . The estimated accuracy always has great deviation due to the high sampling risk existed in cross-modal learning problem . Test confidence interval is proposed for qualifying the statistical significance of experimental results . 2 ) A solid baseline framework for voice-face matching and retrieval is also proposed . State-of-the-art performances on various voice-face matching and retrieval tasks are achieved on large-scale datasets with a high test confidence . 2 RELATED WORKS . The existing methods for voice-face cross-modal learning can be classified as classification-based methods and pair-wise loss based methods , as shown in Figure 1 . CNN-based networks are normally used to embed the voices and faces into feature vectors . SVHF ( Nagrani et al. , 2018b ) is a prior study on voice-face cross-modal learning that investigated the performance of a CNN-based deep network on this problem . The human baseline for the voice-face matching task is also presented in this paper . DIMNet ( Wen et al. , 2018 ) learns a common representation for faces and voices by leveraging their relationships to some covariates such as gender and nationality . For pair-wise loss based methods , a pair or a triplet of vectors is embedded by a voice and face network , and contrastive loss ( Hadsell et al. , 2006 ) or triplet loss ( Schroff et al. , 2015 ) is used to supervise the learning of the embeddings . Horiguchi et al. ’ s method ( Horiguchi et al. , 2018 ) , Pins ( Nagrani et al. , 2018a ) , Kim et al. ’ s methods ( Kim et al. , 2018 ) are all these kind of methods . The aim of pair-wise loss based methods is to make the embeddings of positive pairs closer and the embeddings of negative pairs farther apart . In contrast , the aim of classification-based methods is to separate the embeddings of different classes . Of these two approaches , pair-wise loss based methods are better at distinguishing hard examples because of the characteristics of this approach . There is still no related work which presents a benchmark for voice-face cross-modal learning tasks , which is addressed in detail as follows : 1 ) As for evaluation metrics , the reliability of experiments has not been addressed by all previous research . Test confidence is proposed in this paper . With the guidance of test confidence , reliable evaluations can be conducted . 2 ) As for tasks , joint matching and joint retrieval tasks established in this paper are not noticed by previous research . Though these tasks are direct extensions of traditional tasks , these very simple extensions can improve the performance of voice-face cross-modal learning dramatically . 3 ) As for models , the most similar work to TriNet of this paper is Kim et al. ’ s method ( Kim et al. , 2018 ) . Both models use the triplet loss function . The main difference is that TriNet uses L2 normalization and voice-anchored embedding learning to constrain the feature space , because it is difficult to obtain satisfactory results by training directly in a huge Euclidean space . Though L2 normalization is a normal technique , it hasn ’ t been introduced to the current problem . 4 ) As for datasets , currently available voice-face datasets are the data generated by the common speakers of VGGFace ( Cao et al. , 2018 ; Parkhi et al. , 2015 ) face recognition dataset and VoxCeleb ( Nagrani et al. , 2017 ; Chung et al. , 2018 ) speaker recognition dataset . As shown in Table 1 , the voice-face datasets have two versions , Vox-VGG-1 and Vox-VGG-2 , which include 1,251 and 5,994 identities , respectively . To the best of our knowledge , only Vox-VGG-1 is used in previous research . Both Vox-VGG-1 and Vox-VGG-2 are used to evaluate the proposed baseline method , TriNet . 3 TASKS AND EVALUATION . 3.1 TASKS . 1:2 Matching and 1 : n Matching . Given an audio and two face candidates ( only one of which is from the speaker of the audio ) , the goal is to find the face that belongs to the speaker . The more difficult l : n matching task is an extension of the 1:2 matching task that increases the number of candidate faces from 2 to N . Retrieval . Given a “ query ” voice , the goal of voice-face retrieval is to rank face images according to their relevance with respect to the voice query . This task is a supplement to the matching task , the position-related information of all retrieved faces is also effective for analyzing the model performance . Joint Matching and Joint Retrieval . Instead of a single audio segment or single face for one identity , multiple audio segments and faces can provide more information . Matching and retrieval can be conducted on the mean embeddings of multiple audios or images . This is the simplest way to improve the performance of current voice-face matching and retrieval methods . Widespread video resources imply that the use of multiple faces and voices is feasible . 3.2 TEST CONFIDENCE . The evaluation criteria for matching and retrieval tasks are accuracy and mAP ( Christopher et al. , 2008 ) respectively . All previous studies ( Wen et al. , 2018 ; Nagrani et al. , 2018a ; Kim et al. , 2018 ; Nagrani et al. , 2018b ) evaluated their methods on a single dataset of about 200 identities . As shown in the experiment ( Section 5.4 ) , the 1:2 matching accuracy tested on multiple datasets with 189 identities varies significantly , from 81 % to 87 % . So the results of all related works that used VoxVGG-1 for training and testing are unreliable . Testing a model on a single small dataset may lead to a large deviation in the accuracy . In 1:2 matching task , the accuracy is estimated on the sampled data , to represent the accuracy on the overall population . The estimated accuracy always has a large deviation due to the high sampling risk in the triplet sampling scenario . Essentially , our aim is to obtain the correct matching probability of a single independent triplet . When the dataset and the model are determined , a single independent sampling conforms to the Bernoulli distributionB ( p ) . The results of n samplings fit the binomial distributionB ( n , p ) . Interval estimation of a binomial distribution can be used for quantifying the deviation of the estimated accuracy . Suppose a dataset D can generate up to N triplets , and the number of sampled triplets used for testing is n. Among the sampled triplets , there are m correctly matched triplets . Suppose the sample rate is p , where p = mn , and the population rate of correctly matched N triplets is P . When n is sufficiently large , p can be approximated as normal distribution p ∼ N ( P , P ( 1−P ) n . By converting it to a standard normal distribution , we obtain u = p−P√ P ( 1−P ) n ∼ N ( 0 , 1 ) . For a significance level α , the confidence interval of p is ( p − uα 2 √ p ( 1−p ) n , p + uα2 √ p ( 1−p ) n ) . Testing a model on multiple datasets is strongly recommended when the dataset is very small . The test can be performed multiple times on datasets with a similar scale , and the results are regarded as conforming to the normal distribution . The t-test can then be used to estimate the confidence interval of the accuracy . 4 TRINET BASELINE METHOD . As shown in Figure 2 , the baseline method in the proposed framework consists of three steps : extracting voice and face features , constraining embeddings to a spherical space , and computing the triplet loss . After training , the face embedding and voice embedding form their own regions , and the distance between positive samples tends to be smaller . 4.1 TRIPLET MINING . The input triplets for the embedding network need to be mined from the datasets , the number of which is extremely large . In previous research ( Nagrani et al. , 2018b ; Kim et al. , 2018 ; Wen et al. , 2018 ; Horiguchi et al. , 2018 ) , discrete triplets are randomly mined to create a single input each time , which will lead to training and test inefficiency . Identity based sampling named as online mining is adopted in this paper , which can greatly improve the training and testing efficiency . In the identity based sampling , a batch of identities is randomly selected first , and then certain number of face images and audios for each identity of the batch are sampled . Triplets are generated based on each batch of identities . Triplet Loss is susceptible to noise which means the direction of network convergence is easy to be changed by few noise samples . Identity based training can effectively handle the disadvantage of Triplet Loss .
This paper aims to propose a benchmark for voce-face matching and retrieval problem. As shown by the test confidence analysis, the model is suggested to be evaluated on a large dataset or multiple datasets to avoid the large deviation in the accuracy. A baseline method TriNet and joint matching & retrieval are proposed. Improved results are reported in the experiment section.
SP:e3942da570a78a6c9668db22ab5d6ddce52f756f
Learning a Latent Search Space for Routing Problems using Variational Autoencoders
1 INTRODUCTION . Significant progress has been made in learning to solve optimization problems via machine learning ( ML ) . Especially for practical applications , learning-based approaches are of great interest because of the high labor costs associated with the development of completely hand-crafted solution approaches . For routing problems such as the traveling salesperson problem ( TSP ) and the capacitated vehicle routing problem ( CVRP ) , recent ML-based approaches are able to generate good solutions for small problem instances in a fraction of a second ( e.g. , Kool et al . ( 2019 ) ) . However , in many real-world applications of these problems users gladly accept more computation time for solutions of even higher quality . Recently proposed approaches ( e.g. , Hottung & Tierney ( 2020 ) ) address this demand and integrate learning-based components with high-level search procedures . While these approaches offer improved performance over non-search-based methods , they rely on domain knowledge encapsulated in the high-level search procedures . In this work , we present a learning-based optimization approach for routing problems that is able to perform an extensive search for high-quality solutions . In contrast to other approaches , our method does not rely on domain-specific high-level search procedures . Our approach learns an instancespecific mapping of solutions to a continuous search space that can then be searched via any existing continuous optimization method . We use a conditional variational autoencoder ( CVAE ) that learns to encode a solution to a given instance as a numerical vector and vice versa . Some genetic algorithm variants ( e.g. , Gonçalves & Resende ( 2012 ) ) use numerical vectors to represent solutions to combinatorial optimization problems . However , these approaches rely on decoding schemes that are carefully handcrafted by domain experts . In contrast , our approach learns the problem-specific decoding schema on its own , requiring no domain or optimization knowledge on the side of the user . The performance of an optimization algorithm heavily depends on the structure of the fitness landscape of the search space , such as its smoothness . If solutions close to each other in the search space are semantically similar , resulting in a smooth landscape , the employed search algorithm can iteratively move towards the more promising areas of the search space . It has been observed for some problems that variational autoencoders ( VAEs ) are capable of learning a latent space in which semantically similar inputs are placed in the same region . This allows , for example , a semantically meaningful interpolation between two points in the latent space ( see e.g . Berthelot et al . ( 2018 ) ) . However , it is unclear if this property upholds for a conditional latent space that encodes routing problems . We show experimentally that our CVAE-based approach is indeed capable of learning a latent search space in which neighboring solutions have a similar objective function value . Furthermore , we introduce a novel technique that addresses the issue of symmetries in the latent space and show that it enables our method to match and surpass state-of-the-art ML-based methods . We train our method using high-quality solutions because we aim to learn a latent search space that contains mostly high-quality solutions . Hence , our method usually requires a long offline phase ( e.g. , to generate solutions using a slow , domain-independent , generic solver ) . However , this offline phase is offset by fast , online solution generation . We focus on the TSP and the CVRP , which are two of the most well-researched problems in the optimization literature . The TSP is concerned with finding the shortest tour between a set of cities that visits each city exactly once and returns to the starting city . The CVRP describes a routing problem where the routes for multiple vehicles to a set of customers must be planned . All customers have a certain demand of goods and all vehicles have a maximum capacity that they can carry . All routes must start and end at the depot . The task is to find a set of routes with minimal cost so that the demand of all customers is fulfilled and each customer is visited by exactly one vehicle . We consider the versions of the TSP and CVRP where the distance matrix obeys the triangle inequality . The contributions of this work are as follows : • We propose a novel approach that learns a continuous , latent search space for routing problems based on CVAEs . • We show that our approach is able to learn a well-structured latent search space . • We show that the learned search space enables a standard differential evolution search strategy to outperform state-of-the-art ML methods . 2 RELATED WORK . In Hopfield & Tank ( 1985 ) , it was first proposed to use an ML-based method to solve a routing problem . The authors use a Hopfield network to solve small TSP instances with up to 30 cities . In Vinyals et al . ( 2015 ) , pointer networks are proposed and trained to solve TSP instances with up to 50 cities using supervised learning . Bello et al . ( 2016 ) extend this idea and train a pointer network via actor-critic reinforcement learning . More recently , graph neural networks have been used to solve the TSP , e.g. , a graph embedding network in Khalil et al . ( 2017 ) , a graph attention network in Deudon et al . ( 2018 ) , or a graph convolutional network in Joshi et al . ( 2019 ) . The significantly more complex CVRP has first been addressed in Nazari et al . ( 2018 ) and Kool et al . ( 2019 ) , in which a recurrent neural network decoder coupled with an attention mechanism and a graph attention network are used , respectively . While some of these methods use a high-level search procedure ( such as beam search ) , all of them are focused on finding solutions quickly ( in under one second ) . In contrast , our approach is able to exploit a longer runtime ( more than one minute for larger instances ) to find solutions of better quality . A couple of approaches use local search like algorithms combined with ML techniques to solve routing problems . Chen & Tian ( 2019 ) propose to learn an improvement operator that makes small changes to an existing solution . The operator is applied to a solution iteratively to find a highquality solutions for the CVRP . However , with a reported runtime of under half a second for the CVRP with 100 nodes , the method is not focused on performing an extensive search . In Hottung & Tierney ( 2020 ) , another iterative improvement method for the CVRP is proposed that integrates learned heuristics into a large neighborhood search framework . The method is used to perform an extensive search with reported runtimes of over one minute for larger instances . In contrast to our method , the high-level large neighborhood search framework contains domain specific components and is known to perform exceptionally well on routing problems ( Ropke & Pisinger , 2006 ) . Perhaps most similar to our work is the line of research based on Gómez-Bombarelli et al . ( 2018 ) , in which the authors use a VAE to learn a continuous latent search space for discovering molecules . They use an additional Gaussian process model that is trained to predict the the quality of molecules given their latent search space representation to allow for a gradient-based search . Kusner et al . ( 2017 ) and Jin et al . ( 2018 ) use a similar setup , but use Bayesian optimization for the search . Winter et al . ( 2019 ) propose to use particle swarm optimization to search a learned latent space for new molecules . To a more limited degree , the idea of optimizing in a continuous learned space has also been used for neural architecture optimization ( Luo et al. , 2018 ) . In contrast to the aforementioned methods , we do not use a separate model to predict the solution quality based on their latent representation , because decoding and evaluating solutions in our setting is cheap ( compared to molecules or neural network architectures ) . Furthermore , our approach addresses a fundamentally different problem , because routing problems must be solved with respect to a given context ( i.e. , a problem instance that describes location coordinates that must be visited ) and we hence use a CVAE in this work . Learning a latent space conditioned on a problem instance ( with the number of possible instances being basically infinite ) is significantly more challenging . Ichter et al . ( 2018 ) propose to use CAVEs to learn a latent space conditioned on problem instances to represent solutions to robot motion planing problems . However , they only sample solutions at random from the learned distribution and do not perform a guided search . We show that the learned structured latent space of our approach enables a guided search that significantly outperforms random sampling . Different generative models have been used to sample new population members in probabilistic evolutionary algorithms known as estimation of distribution algorithms ( e.g. , a Helmholtz machine ( Zhang & Shin , 2000 ) , a restricted Boltzmann machine ( Tang et al. , 2010 ; Shim et al. , 2010 ; Probst et al. , 2017 ) , or a VAE ( Garciarena et al. , 2018 ; Bhattacharjee & Gras , 2019 ) ) . All these methods are focused on how to explore an existing search space using generative models . In contrast , our method is focused on learning the search space itself , leaving the actual search to a generic optimizer . 3 METHOD . Our novel approach , called CVAE-Opt , learns a continuous ( latent ) search space for routing problems that can be searched by any continuous optimization method . It is based on a CVAE that learns to map solutions to routing problem instances to a continuous , n-dimensional space . In contrast to conventional search spaces , the learned latent search is trained to contain only high-quality solutions . Autoencoders are neural networks that are used to learn an efficient encoding of data . They consist of an encoder and a decoder network . The encoder learns to reduce an input x to a point z in a low dimensional space and the decoder tries to reconstruct the input x based on z . The objective of the training is to minimize the difference between the input x and the output of the decoder , requiring the network to learn an efficient encoding of x . In contrast , VAEs are generative models that do not use a deterministic encoder , but instead an encoder that parameterizes an approximate posterior distribution over z . In our context , we do not want to train the decoder to generate solutions for only a single instance ( e.g. , a given set of coordinates for the TSP ) , but instead for all instances of a certain instance type ( e.g. , all TSP instances with 50 cities ) . We thus use a CVAE ( Sohn et al. , 2015 ) , which enables us to learn a latent search space conditioned on the problem instances . 3.1 VARIATIONAL AUTOENCODER-BASED COMBINATORIAL OPTIMIZATION . The overall training process of CVAE-Opt is shown in Figure 1a . The stochastic encoder q ( z|l , s ) receives a problem instance l and a high-quality solution s and outputs an n-dimensional vector z . The decoder p ( s|l , z ) is given z together with the instance l and outputs a solution s′ . One objective of the training is to minimize the difference between the original high-quality solution s and the solution s′ generated by the decoder . While the decoder is powerful enough to construct a good solution based on the instance l alone , it is also given the latent variable z that describes the aspects of the solution s that the decoder can not reliably infer on its own . The second objective during training is to ensure that high-quality solutions can be generated for values of the latent variable that have not been seen during training . This objective is explained in more detail below . Figure 1b shows the iterative search process , in which the decoder p ( s|l , z ) is used together with any unconstrained continuous optimizer to search for solutions to a problem instance l. The unconstrained continuous optimizer navigates the search through the learned latent search space . At each iteration , the optimizer outputs a vector z describing a point in the latent search space . The decoder generates a solution s′ based on z and the objective function value of s′ is returned to the optimizer . With an effective optimizer and the learned search space , high-quality solutions to l can be found . Routing problem representation We describe a routing problem instance by a graphG = ( V , E ) , with V = { v0 , ... , vn } . The representation of a problem instance l consists of a set of n feature vectors x0 , . . . , xi , . . . , xn , where xi describes node vi . For the TSP , each node represents a location ( e.g. , a city ) with each two-dimensional feature vector describing the location ’ s coordinates . For the CVRP , the node v0 represents the depot , and all other nodes represent the customers . As in Nazari et al . ( 2018 ) , each feature vector is four-dimensional and describes the unfulfilled demand of a location , the remaining capacity of the vehicle , and the coordinates of the location . For both problems , a solution s describes a sequence of locations vs0 , . . . , vsT ( for the TSP , T = n ) in which the first location is the starting city ( for the TSP ) or the depot ( for the CVRP ) . We note that our formalism focuses on routing problems on a Euclidean plane . While we anticipate that our approach will work for other types of combinatorial optimization problems ( with adjustment of the input layers ) , we save showing this for future work .
This paper proposes a method to learn a continuous latent space via CVAE to represent solutions to routing problems. Combined with differentiable evolution search algorithms, one can search in the learned latent space for solutions to new problem instances at test time. The proposed method is evaluated on two classes of routing problems: TSP and CVRP. Results show better performance in terms of objective values and runtime. They are also competitive with established expert-designed algorithms such as LKH3.
SP:ddd2ae85b54dbb9143d25adf8bb2977732dae29b
Efficient Wasserstein Natural Gradients for Reinforcement Learning
A novel optimization approach is proposed for application to policy gradient methods and evolution strategies for reinforcement learning ( RL ) . The procedure uses a computationally efficient Wasserstein natural gradient ( WNG ) descent that takes advantage of the geometry induced by a Wasserstein penalty to speed optimization . This method follows the recent theme in RL of including a divergence penalty in the objective to establish a trust region . Experiments on challenging tasks demonstrate improvements in both computational cost and performance over advanced baselines . 1 INTRODUCTION . Defining efficient optimization algorithms for reinforcement learning ( RL ) that are able to leverage a meaningful measure of similarity between policies is a longstanding and challenging problem ( Lee & Popović , 2010 ; Meyerson et al. , 2016 ; Conti et al. , 2018b ) . Many such works rely on similarity measures such as the Kullback-Leibler ( KL ) divergence ( Kullback & Leibler , 1951 ) to define procedures for updating the policy of an agent as it interacts with the environment . These are generally motivated by the need to maintain a small variation in the KL between successive updates in an off-policy context to control the variance of the importance weights used in fthe estimation of the gradient . This includes work by Kakade ( 2002 ) and Schulman et al . ( 2015 ) , who propose to use the Fisher Natural Gradient ( Amari , 1997 ) as a way to update policies , using local geometric information to allow larger steps in directions where policies vary less ; and the work of Schulman et al . ( 2017 ) , which relies on a global measure of proximity using a soft KL penalty to the objective . While those methods achieve impressive performance , and the choice of the KL is well-motivated , one can still ask if it is possible to include information about the behavior of policies when measuring similarity , and whether this could lead to more efficient algorithms . Pacchiano et al . ( 2019 ) provide a first insight into this question , representing policies using behavioral distributions which incorporate information about the outcome of the policies in the environment . The Wasserstein Distance ( WD ) ( Villani , 2016 ) between those behavioral distributions is then used as a similarity measure between their corresponding policies . They further propose to use such behavioral similarity as a global soft penalty to the total objective . Hence , like the KL penalty , proximity between policies is measured globally , and does not necessarily exploit the local geometry defined by the behavioral embeddings . In this work , we show that substantial improvements can be achieved by taking into account the local behavior of policies . We introduce new , efficient optimization methods for RL that incorporate the local geometry defined by the behavioral distributions for both policy gradient ( PG ) and evolution strategies ( ES ) approaches . Our main contributions are as follows : 1- We leverage recent work in ( Li & Montufar , 2018a ; b ; Li , 2018 ; Li & Zhao , 2019 ; Chen & Li , 2018 ) which introduces the notion of the Wasserstein Information Matrix to define a local behavioral similarity measure between policies . This allows us to identify the Wasserstein Natural Gradient ( WNG ) as a key ingredient for optimization methods that rely on the local behavior of policies . To enable efficient estimation of WNG , we build on the recent work of Arbel et al . ( 2020 ) , and further extend it to cases where the re-parameterization trick is not applicable , but only the score function of the model is available . ∗Denotes equal contribution . Correspondence : ted @ gatsby.ucl.ac.uk . 2- This allows us to introduce two novel methods : Wasserstein natural policy gradients ( WNPG ) and Wasserstein natural evolution strategies ( WNES ) which use the local behavioral structure of policies through WNG and can be easily incorporated into standard RL optimization routines . When combined in addition with a global behavioral similarity such as a WD penalty , we show substantial improvement over using the penalty alone without access to local information . We find that such WNG-based methods are especially useful on tasks in which initial progress is difficult . 3- Finally , we demonstrate , to our knowledge , the first in-depth comparative analysis of the FNG and WNG , highlighting a clear interpretable advantage of using WNG over FNG on tasks where the optimal solution is deterministic . This scenario arises frequently in ES and in policy optimization for MDPs ( Puterman , 2010 ) . This suggests that WNG could be a powerful tool for this class of problems , especially when reaching accurate solutions quickly is crucial . In Section 2 , we present a brief review of policy gradient approaches and the role of divergence measures as regularization penalties . In Section 3 we introduce the WNG and detail its relationship with the FNG and the use of Wasserstein penalties , and in Section 4 we derive practical algorithms for applying the WNG to PG and ES . Section 5 contains our empirical results . 2 BACKGROUND . Policy Gradient ( PG ) methods directly parametrize a policy πθ , optimizing the parameter θ using stochastic gradient ascent on the expected total discounted reward R ( θ ) . An estimate ĝk of the gradient of R ( θ ) at θk can be computed by differentiating a surrogate objective Lθ which often comes in two flavors , depending on whether training is on-policy ( left ) or off-policy ( right ) : L ( θ ) = Ê [ log πθ ( at|st ) Ât ] , or L ( θ ) = Ê [ πθ ( at|st ) πθk ( at|st ) Ât ] . ( 1 ) The expectation Ê is an empirical average over N trajectories τi = ( si1 , ai1 , ri1 , ... , siT , aiT , riT ) of state-action-rewards obtained by simulating from the environment using πθk . The scalar Ât is an estimator of the advantage function and can be computed , for instance , using Ât = rt + γV ( st+1 ) − V ( st ) ( 2 ) where γ ∈ [ 0 , 1 ) is a discount factor and V is the value function often learned as a parametric function via temporal difference learning ( Sutton & Barto , 2018 ) . Reusing trajectories can reduce the computational cost at the expense of increased variance of the gradient estimator ( Schulman et al. , 2017 ) . Indeed , performing multiple policy updates while using trajectories from an older policy πθold means that the current policy πθ can drift away from the older policy . On the other hand , the objective is obtained as an expectation under πθ for which fresh trajectories are not available . Instead , the objective is estimated using importance sampling ( by re-weighting the old trajectories according to importance weights πθ/πθold ) . When πθ is too far from πθold , the importance weight can have a large variance . This can lead to a drastic degradation of performance if done naı̈vely ( Schulman et al. , 2017 ) . KL-based policy optimization ( PO ) aims at addressing these limitations . KL-based PO methods ensure that the policy does not change substantially between successive updates , where change is measured by the KL divergence between the resulting action distributions . The general idea is to add either a hard KL constraint , as in TRPO ( Schulman et al. , 2015 ) , or a soft constraint , as in PPO ( Schulman et al. , 2017 ) , to encourage proximity between policies . In the first case , TRPO recovers the FNG with a step-size further adjusted using line-search to enforce the hard constraint . The FNG permits larger steps in directions where policy changes the least , thus reducing the number of updates required for optimization . In the second case , the soft constraint leads to an objective of the form : maximizeθ L ( θ ) − βÊ [ KL ( πθk ( ·|st ) , πθ ( ·|st ) ) ] . ( 3 ) The KL penalty prevents the updates from deviating too far from the current policy πθk , thereby controlling the variance of the gradient estimator . This allows making multiple steps with the same simulated trajectories without degradation of performance . While both methods take into account the proximity between policies as measured using the KL , they do not take into account the behavior of such policies in the environment . Exploiting such information can greatly improve performance . Behavior-Guided Policy Optimization . Motivated by the idea that policies can differ substantially as measured by their KL divergence but still behave similarly in the environment , Pacchiano et al . ( 2019 ) recently proposed to use a notion of proximity in behavior between policies for PO . Exploiting similarity in behavior during optimization allows to take larger steps in directions where policies behave similarly despite having a large KL divergence . To capture a sense of global behavior , they define a behavioral embedding map ( BEM ) Φ that maps every trajectory τ to a behavior variable X = Φ ( τ ) belonging to some embedding space E . The behavior variable X provides a simple yet meaningful representation of each the trajectory τ . As a random variable , X is distributed according to a distribution qθ , called the behavior distribution . Examples of Φ include simply returning the final state of a trajectory ( Φ ( τ ) = sT ) or its concatenated actions ( Φ ( τ ) = [ a0 , . . . , aT ] ) . Proximity between two policies πθ and πθ′ is then measured using the Wasserstein distance between their behavior distributions qθ and qθ′ . Although , the KL could also be used in some cases , the Wasserstein distance has the advantage of being well-defined even for distributions with non-overlapping support , therefore allowing more freedom in choosing the embedding Φ ( see Section 3.1 ) . This leads to a penalized objective that regulates behavioral proximity : maximizeθ L ( θ ) − β 2 W2 ( qθk , qθ ) , ( 4 ) where β ∈ R is a hyper-parameter controlling the strength of the regularization . To compute the penalty , Pacchiano et al . ( 2019 ) use an iterative method from Genevay et al . ( 2016 ) . This procedure is highly accurate when the Wasserstein distance changes slowly between successive updates , as ensured when β is large . At the same time , larger values for β also mean that the policy is updated using smaller steps , which can impede convergence . An optimal trade-off between the rate of convergence and the precision of the estimated Wasserstein distance can be achieved using an adaptive choice of β as done in the case of PPO Schulman et al . ( 2017 ) . For a finite value of β , the penalty accounts for global proximity in behavior and doesn ’ t explicitly exploit the local geometry induced by the BEM , which can further improve convergence . We introduce an efficient method that explicitly exploits the local geometry induced by the BEM through the Wasserstein Natural gradient ( WNG ) , leading to gains in performance at a reduced computational cost . When global proximity is important to the task , we show that using the Wasserstein penalty in Equation ( 4 ) and optimizing it using the WNG yields more efficient updates , thus converging faster than simply optimizing Equation ( 4 ) using standard gradients .
This paper proposes to use natural gradient instead of standard gradient to optimize a regularized objective with the regularization being the Wasserstein distance between the so-called behaviour distributions for the previous policy and new policy. It then combines this Wasserstein gradient descent with Policy Gradient and Evolutionary Strategies. Experiments conducted in OpenAI and Roboschool show some promising results for this combination.
SP:2fbbc4ff1a587e2239a4f5b8672dd310d0124e39
Learning to live with Dale's principle: ANNs with separate excitatory and inhibitory units
1 INTRODUCTION . In recent years , artificial neural networks ( ANNs ) have been increasingly used in neuroscience research for modelling the brain at the algorithmic and computational level ( Richards et al. , 2019 ; Kietzmann et al. , 2018 ; Yamins & DiCarlo , 2016 ) . They have been used for exploring the structure of representations in the brain , the learning algorithms of the brain , and the behavioral patterns of humans and non-human animals ( Bartunov et al. , 2018 ; Donhauser & Baillet , 2020 ; Michaels et al. , 2019 ; Schrimpf et al. , 2018 ; Yamins et al. , 2014 ; Kell et al. , 2018 ) . Evidence shows that the ability of ANNs to match real neural data depends critically on two factors . First , there is a consistent correlation between the ability of an ANN to learn well on a task ( e.g . image recognition , audio perception , or motor control ) and the extent to which its behavior and learned representations match real data ( Donhauser & Baillet , 2020 ; Michaels et al. , 2019 ; Schrimpf et al. , 2018 ; Yamins et al. , 2014 ; Kell et al. , 2018 ) . Second , the architecture of an ANN also helps to determine how well it can match real brain data , and generally , the more realistic the architecture the better the match ( Schrimpf et al. , 2018 ; Kubilius et al. , 2019 ; Nayebi et al. , 2018 ) . Given these two factors , it is important for neuroscientific applications to use ANNs that have as realistic an architecture as possible , but which also learn well ( Richards et al. , 2019 ; Kietzmann et al. , 2018 ; Yamins & DiCarlo , 2016 ) . Although there are numerous disconnects between ANNs and the architecture of biological neural circuits , one of the most notable is the lack of adherence to Dale ’ s principle , which states that a neuron releases the same fast neurotransmitter at all of its presynaptic terminals ( Eccles , 1976 ) . Though there are some interesting exceptions ( Tritsch et al. , 2016 ) , for the vast majority of neurons in †Corresponding author : blake.richards @ mcgill.ca adult vertebrate brains , Dale ’ s principle means that presynaptic neurons can only have an exclusively excitatory or inhibitory impact on their postsynaptic partners . For ANNs , this would mean that units can not have a mixture of positive and negative output weights , and furthermore , that weights can not change their sign after initialisation . In other words , a unit can only be excitatory or inhibitory . However , most ANNs do not incorporate Dale ’ s principle . Why is Dale ’ s principle rarely incorporated into ANNs ? The reason is that this architectural constraint impairs the ability to learn—a fact that is known to many researchers who have tried to train such ANNs , but one that is rarely discussed in the literature . However , when we seek to compare ANNs to real brains , or use them to explore biologically inspired learning rules ( Bartunov et al. , 2018 ; Whittington & Bogacz , 2019 ; Lillicrap et al. , 2020 ) , ideally we would use a biologically plausible architecture with distinct populations of excitatory and inhibitory neurons , and at the same time , we would still be able to match the learning performance of standard ANNs without such constraints . Some previous computational neuroscience studies have used ANNs with separate excitatory and inhibitory units ( Song et al. , 2016 ; Ingrosso & Abbott , 2019 ; Miconi , 2017 ; Minni et al. , 2019 ; Behnke , 2003 ) , but these studies addressed questions other than matching the learning performance of standard ANNs , e.g . they focused on typical neuroscience tasks ( Song et al. , 2016 ) , dynamic balance ( Ingrosso & Abbott , 2019 ) , biologically plausible learning algorithms ( Miconi , 2017 ) , or the learned structure of networks ( Minni et al. , 2019 ) . Importantly , what these papers did not do is develop means by which networks that obey Dale ’ s principle can match the performance of standard ANNs on machine learning benchmarks , which has become an important feature of many computational neuroscience studies using ANNs ( Bartunov et al. , 2018 ; Donhauser & Baillet , 2020 ; Michaels et al. , 2019 ; Schrimpf et al. , 2018 ; Yamins et al. , 2014 ; Kell et al. , 2018 ) . Here , we develop ANN models with separate excitatory and inhibitory units that are able to learn as well as standard ANNs . Specifically , we develop a novel form of ANN , which we call a “ Dale ’ s ANN ” ( DANN ) , based on feed-forward inhibition in the brain ( Pouille et al. , 2009 ) . Our novel approach is different from the standard solution , which is to create ANNs with separate excitatory and inhibitory units by constraining whole columns of the weight matrix to be all positive or negative ( Song et al. , 2016 ) . Throughout this manuscript , we refer to this standard approach as “ ColumnEi ” models . We have departed from the ColumnEI approach in our work because it has three undesirable attributes . First , constrained weight matrix columns impair learning because they limit the potential solution space ( Amit et al. , 1989 ; Parisien et al. , 2008 ) . Second , modelling excitatory and inhibitory units with the same connectivity patterns is biologically misleading , because inhibitory neurons in the brain tend to have very distinct connectivity patterns from excitatory neurons ( Tremblay et al. , 2016 ) . Third , real inhibition can act in both a subtractive and a divisive manner ( Atallah et al. , 2012 ; Wilson et al. , 2012 ; Seybold et al. , 2015 ; Pouille et al. , 2013 ) , which may provide important functionality . Given these considerations , in DANNs , we utilize a separate pool of inhibitory neurons with a distinct , more biologically realistic connectivity pattern , and a mixture of subtractive and divisive inhibition ( Fig . 1 ) . This loosely mimics the fast feedforward subtractive and divisive inhibition provided by fast-spiking interneurons in the cortical regions of the brain ( Atallah et al. , 2012 ; Hu et al. , 2014 ; Lourenço et al. , 2020 ) . In order to get DANNs to learn as well as standard ANNs we also employ two key insights : 1 . It is possible to view this architecture as being akin to normalisation schemes applied to the excitatory input of a layer ( Ba et al. , 2016 ; Ioffe & Szegedy , 2015 ; Wu & He , 2018 ) , and we use this perspective to motivate DANN parameter initialisation . 2 . It is important to scale the inhibitory parameter updates based on the Fisher information matrix , in order to balance the impact of excitatory and inhibitory parameter updates , similar in spirit to natural gradient approaches ( Martens , 2014 ) . Altogether , our principle contribution is a novel architecture that obey ’ s Dale ’ s principle , and that we show can learn as well as standard ANNs on machine learning benchmark tasks . This provides the research community with a new modelling tool that will allow for more direct comparisons with real neural data than traditional ANNs allow , but which does not suffer from learning impairments . Moreover , our results have interesting implications for inhibitory plasticity , and provide a means for future research into how excitatory and inhibitory neurons in the brain interact at the algorithmic level . 2 BIOLOGICALLY INSPIRED NETWORKS THAT OBEY DALE ’ S PRINCIPLE . 2.1 MODEL DEFINITION . Our design for DANNs takes inspiration from the physiology of feedforward inhibitory microcircuits in the neocortex and hippocampus . Based on these circuits , and an interpretation of layers in ANNs as corresponding to brain regions , we construct DANNs with the following architectural constraints : 1 . Each layer of the network contains two distinct populations of units , an excitatory and an inhibitory population . 2 . There are far fewer inhibitory units than excitatory units in each layer , just as there are far more excitatory neurons than inhibitory neurons ( ∼ 5-10 times ) in cortical regions of the brain ( Tremblay et al. , 2016 ; Hu et al. , 2014 ) . 3 . As in real neural circuits where only the excitatory populations project between regions , here only excitatory neurons project between layers , and both the excitatory and inhibitory populations of a layer receive excitatory projections from the layer below . 4 . All of the synaptic weights are strictly non-negative , and inhibition is enforced via the activation rules for the units ( eq . 1 ) . 5 . The inhibitory population inhibits the excitatory population through a mixture of subtractive and divisive inhibition . This constrained architecture is illustrated in Figure 1 . Formally , we define the network as follows . Input to the network is received as a vector of positive scalar values x ∈ Rd+ , which we consider to be the first excitatory population . Each hidden layer , ` , is comprised of a vector of excitatory units h ` ∈ Rne+ and inhibitory units hI ` ∈ R ni + , in-line with constraint ( 1 ) above . ( We will drop the layer index when it is unnecessary for clarity . ) Note , for the first layer ( ` = 1 ) , we have h ` = x and ne = d. Next , based on constraint ( 2 ) we set ne > > ni , and use 10 % inhibitory units as default . Following constraint ( 3 ) , both the excitatory and inhibitory units receive inputs from the excitatory units in the layer below ( h ` −1 ) , but the inhibitory units do not project between layers . Instead , excitatory units receive inputs from the inhibitory units of the same layer . In-line with constraint ( 4 ) , we have three sets of strictly non-negative synaptic weights , one for the excitatory connections between layers , WEE ` ∈ R ne×ne + , one for the excitatory projection to the inhibitory units WIE ` ∈ R ni×ne + , and one for the inhibitory projections within layer W EI ` ∈ R ne×ni + . Finally , per constraint ( 5 ) , we define the impact of the inhibitory units on the excitatory units as comprising both a subtractive and a divisive component : h ` = f ( z ` ) z ` = g ` γ ` ( zE ` −WEI ` hI ` ) + β ` ( 1 ) where zE ` = W EE ` h ` −1 h I ` = f I ( zI ` ) = f I ( WIE ` h ` −1 ) γ ` = W EI ` ( e α ` hI ` ) where for each layer ` , β ` ∈ Rne is a bias , g ` ∈ Rne+ controls the gain , γ ` is the divisive inhibitory term , and α ` ∈ Rni is a parameter that controls the strength of this divisive inhibition . Here denotes elementwise multiplication ( Hadamard product ) and the exponential function and division are applied elementwise . In the rest of this manuscript we set f to be the rectified linear function ( ReLU ) . Though a ReLU function is not a perfect match to the input-output properties of real neurons , it captures the essential rectification operation performed by neurons in physiologically realistic low activity regimes ( Salinas & Sejnowski , 2000 ) . In this paper , we model the inhibitory units as linear ( i.e . f I ( zI ) = zI ) since they receive only positive inputs and have no bias , and therefore their activation would always be in the linear part of the ReLU function . Although we make make this modelling choice mainly for mathematical simplicity , there is some biological justification , as the resting membrane potential of the class of fast-spiking interneurons most related to our model is relatively depolarised and their spike outputs can follow single inputs one-to-one ( Hu et al. , 2014 ; Galarreta & Hestrin , 2001 ) . In future work , for example in which inhibitory connections are included between inhibitory units , we expect that the use of nonlinear functions for inhibitory units will be important .
Inspired by the observations of feedforward inhibition in the brain, the authors propose a novel ANN architecture that respects Dale’s rule (DANN). They provide two improvements for training DANNs: better initialization and update scaling for synaptic weights. As a result, they empirically demonstrate that DANNs perform no worse than the ANNs that do not respect Dale’s rule.
SP:c3835de54da82e1b07406d118aca719082367ffb
SketchEmbedNet: Learning Novel Concepts by Imitating Drawings
1 INTRODUCTION . Upon encountering a novel concept , such as a six-legged turtle , humans can quickly generalize this concept by composing a mental picture . The ability to generate drawings greatly facilitates communicating new ideas . This dates back to the advent of writing , as many ancient written languages are based on logograms , such as Chinese hanzi and Egyptian hieroglyphs , where each character is essentially a sketch of the object it represents . We often see complex visual concepts summarized by a few simple strokes . Inspired by the human ability to draw , recent research has explored the potential to generate sketches using a wide variety of machine learning models , ranging from hierarchical Bayesian models ( Lake et al. , 2015 ) , to more recent deep autoregressive models ( Gregor et al. , 2015 ; Ha & Eck , 2018 ; Chen et al. , 2017 ) and generative adversarial nets ( GANs ) ( Li et al. , 2019 ) . It is a natural question to ask whether we can obtain useful intermediate representations from models that produce sketches in the output space , as has been shown by other generative models ( Ranzato et al. , 2006 ; Kingma & Welling , 2014 ; Goodfellow et al. , 2014 ; Donahue et al. , 2017 ; Doersch et al. , 2015 ) . Unfortunately , a hierarchical Bayesian model suffers from prolonged inference time , while other current sketch models mostly focus on producing drawings in a closed set setting with a few classes ( Ha & Eck , 2018 ; Chen et al. , 2017 ) , or on improving log likelihood at the pixel level ( Rezende et al. , 2016 ) . Leveraging the learned representation from these drawing models remains a rather unexplored topic . In this paper , we pose the following question : Can we learn a generalized embedding function that captures salient and compositional features by directly imitating human sketches ? The answer is affirmative . In our experiments we develop SketchEmbedNet , an RNN-based sketch model trained to map grayscale and natural image pixels to the sketch domain . It is trained on hundreds of classes without the use of class labels to learn a robust drawing model that can sketch diverse and unseen inputs . We demonstrate salience by achieving state-of-the-art performance on the Omniglot few-shot classification benchmark and visual recognizability in one-shot generations . Then we explore how the embeddings capture image components and their spatial relationships to explore image space compositionality and also show a surprising property of conceptual composition . We then push the boundary further by applying our sketch model to natural images—to our knowledge , we are the first to extend stroke-based autoregressive models to produce drawings of open domain natural images . We train our model with adapted SVG images from the Sketchy dataset ( Sangkloy et al. , 2016 ) and then evaluate the embedding quality directly on unseen classes in the mini-ImageNet task for few-shot classification ( Vinyals et al. , 2016 ) . Our approach is competitive with existing unsupervised few-shot learning methods ( Hsu et al. , 2019 ; Khodadadeh et al. , 2019 ; Antoniou & Storkey , 2019 ) on this natural image benchmark . In both the sketch and natural image domain , we show that by learning to draw , our methods generalize well even across different datasets and classes . 2 RELATED WORK . In this section we review relevant literature including generating sketch-like images , unsupervised representation learning , unsupervised few-shot classification and sketch-based image retrieval ( SBIR ) . Autoregressive drawing models : Graves ( 2013 ) use an LSTM to directly output the pen coordinates to imitate handwriting sequences . SketchRNN ( Ha & Eck , 2018 ) builds on this by applying it to general sketches beyond characters . Song et al . ( 2018 ) ; Cao et al . ( 2019 ) ; Ribeiro et al . ( 2020 ) all extend SketchRNN through architectural improvements . Chen et al . ( 2017 ) change inputs to be pixel images . This and the previous 3 works consider multi-class sketching , but none handle more than 20 classes . Autoregressive models also generate images directly in the pixel domain . DRAW ( Gregor et al. , 2015 ) uses recurrent attention to plot pixels ; Rezende et al . ( 2016 ) extends this to one-shot generation and PixelCNN ( van den Oord et al. , 2016 ) generates image pixels sequentially . Image processing methods & GANs : Other works produce sketch-like images based on style transfer or low-level image processing techniques . Classic methods are based on edge detection and image segmentation ( Arbelaez et al. , 2011 ; Xie & Tu , 2017 ) . Zhang et al . ( 2015 ) use a CNN to directly produce sketch-like pixels for face images . Photo-sketch and pix2pix ( Li et al. , 2019 ; Isola et al. , 2017 ) propose a conditional GAN to generate images across different style domains . Image processing based methods do not acquire high-level image understanding , as all the operations are in terms of low-level filtering ; none of the GAN sketching methods are designed to mimic human drawings on open domain natural images . Unsupervised representation learning : In the sketch image domain , our method is similar to the large category of generative models which learn unsupervised representations by the principle of analysis-by-synthesis . Work by Hinton & Nair ( 2005 ) operates in a sketch domain and learns to draw by synthesizing an interpretable motor program . Bayesian Program Learning ( Lake et al. , 2015 ) draws through exact inference of common strokes but learning and inference are computationally challenging . As such , a variety of deep generative models aim to perform approximate Bayesian inference by using an encoder structure that directly predicts the embedding , e.g. , deep autoencoders ( Vincent et al. , 2010 ) , Helmholtz Machine ( Dayan et al. , 1995 ) , variational autoencoder ( VAE ) ( Kingma & Welling , 2014 ) , BiGAN ( Donahue et al. , 2017 ) , etc . Our method is also related to the literature of self-supervised representation learning ( Doersch et al. , 2015 ; Noroozi & Favaro , 2016 ; Gidaris et al. , 2018 ; Zhang et al. , 2016 ) , as sketch strokes are part of the input data itself . In few-shot learning ( Vinyals et al. , 2016 ; Snell et al. , 2017 ; Finn et al. , 2017 ) , recent work has explored unsupervised meta-training . CACTUs , AAL and UMTRA ( Hsu et al. , 2019 ; Antoniou & Storkey , 2019 ; Khodadadeh et al. , 2019 ) all operate by generating pseudo-labels for training . Sketch-based image retrieval ( SBIR ) : In SBIR , a model is provided a sketch-drawing and retrieves a photo of the same class . The area is split into fine-grained ( FG-SBIR ) ( Yu et al. , 2016 ; Sangkloy et al. , 2016 ; Bhunia et al. , 2020 ) and a zero-shot setting ( ZS-SBIR ) ( Dutta & Akata , 2019 ; Pandey et al. , 2020 ; Dey et al. , 2019 ) . FG-SBIR considers minute details while ZS-SBIR learns high-level cross-domain semantics and a joint latent space to perform retrieval . 3 LEARNING TO IMITATE DRAWINGS . Here we describe learning to draw through sketch imitation . Our architecture is a generative encoderdecoder model with a CNN encoder for pixel images and an RNN decoder to output vector sketches as shown in Figure 1 . Unlike other drawing models that only train on a single or few classes ( Ha & Eck , 2018 ; Chen et al. , 2017 ) , SketchEmbedNet is not limited by class inputs and can sketch a wide variety of images . We also introduce a differentiable rasterization function for computing an additional pixel-based training loss . Input & output representation Unlike SketchRNN which encodes drawing sequences , we learn an image embedding by mapping pixels to sketches , similar to Chen et al . ( 2017 ) . Training data for this task ( adopted from Ha & Eck ( 2018 ) ) consists of a tuple ( x , y ) , where x ∈ RH×W×C is the input image and y ∈ RT×5 is the stroke target . T is the maximum sequence length of the stroke data y , and each stroke yt consists of 5 elements , ( ∆x , ∆y , s1 , s2 , s3 ) . The first 2 elements are horizontal and vertical displacements on the drawing canvas from the endpoint of the previous stroke . The latter 3 elements are mutually exclusive pen states : s1 indicates the pen is on paper for the next stroke , s2 indicates the pen is lifted , and s3 indicates the sketch sequence has ended . y0 is initialized with ( 0 , 0 , 1 , 0 , 0 ) to start the generative process . Note that no class information is available while training . SketchEmbedding as a compositional encoding of images We use a CNN to encode the input image x and obtain the latent space representation z , as shown in Figure 1 . To model intra-class variance , z is a Gaussian random variable parameterized by CNN outputs , similar to a VAE ( Kingma & Welling , 2014 ) . Throughout this paper , we refer to z as the SketchEmbedding . In typical image representations the embedding is trained to classify object classes , or to reconstruct the input pixels . Here , since the SketchEmbedding is fed into an RNN decoder to produce a sequence of drawing actions , z is additionally encouraged to have a compositional understanding of the object structure , instead of just an unstructured set of pixel features . For example when drawing the legs of a turtle , the model must explicitly generate each leg instance . While pixel-based models suffer from blurriness and in generating the image at once , does not distinguish between individual components such as the legs , body and head . The loss of this component information by pixel models has been observed in GAN literature ( Goodfellow , 2017 ) which we propose is avoided by our sketching task . To accommodate the increased training data complexity by including hundreds of classes , we also upscale the size of our model in comparison to work by Chen et al . ( 2017 ) ; Ha & Eck ( 2018 ) ; Song et al . ( 2018 ) . The backbone is either a 4-layer CNN ( Conv4 ) ( Vinyals et al. , 2016 ) for consistent comparisons in the few-shot setting or a ResNet12 ( Oreshkin et al. , 2018 ) which produces better drawing results . In comparison , Chen et al . ( 2017 ) only use 2D convolution with a maximum of 8 filters . RNN decoder The RNN decoder used in SketchEmbedNet is the same as in SketchRNN ( Ha & Eck , 2018 ) . The decoder outputs a mixture density which represents the stroke distribution at each timestep . Specifically , the stroke distribution is a mixture of some hyperparameter M bivariate Gaussians denoting spatial offsets as well as the probability of the three pen states s1−3 . The spatial offsets ∆ = ( ∆x , ∆y ) are sampled from the mixture of Gaussians , described by : ( 1 ) the normalized mixture weight πj ; ( 2 ) mixture means µj = ( µx , µy ) j ; and ( 3 ) covariance matrices Σj . We further reparameterize each Σj with its standard deviation σj = ( σx , σy ) j and correlation coefficient ρxy , j . Thus , the stroke offset distribution is p ( ∆ ) = ∑M j=1 πjN ( ∆|µj , Σj ) . The RNN is implemented using a HyperLSTM ( Ha et al. , 2017 ) ; LSTM weights are generated at each timestep by a smaller recurrent “ hypernetwork ” to improve training stability . Generation is autoregressive , using z ∈ RD , concatenated with the stroke from the previous timestep yt−1 , to form the input to the LSTM . Stroke yt−1 is the ground truth supervision at train time ( teacher forcing ) , or a sample y′t−1 , from the mixture distribution output by the model during from timestep t− 1 .
This paper proposes learning embeddings for sketch or natural images by training a network that takes in a raster image and outputs and collection of sketch strokes. The architecture consists of a standard CNN encoder followed by an RNN decoder. The authors evaluate their learned embeddings on few-shot classification tasks and explore the the quality of the latent space. They demonstrate that they outperform unsupervised few-shot classification approaches and seem to obtain a latent space that is more aware of long-range structure than those from methods that operate purely in raster space.
SP:765c8b969d795ab629aa74bc20e8f19558a4e165
Learn what you can't learn: Regularized Ensembles for Transductive out-of-distribution detection
1 INTRODUCTION . Modern machine learning ( ML ) systems can achieve good test set performance and are gaining popularity in many real-world applications - from aiding medical diagnosis ( Beede et al. , 2020 ) to making recommendations for the justice system ( Angwin et al. , 2016 ) . In reality however , some of the data points in a test set could come from a different distribution than the training ( in-distribution ) data . For example , sampling biases can lead to spurious correlations in the training set ( Sagawa et al. , 2020 ) , a faulty sensor can produce novel data corruptions ( Lu et al. , 2019 ) , or new unseen classes can emerge over time , like undiscovered bacteria ( Ren et al. , 2019 ) . Many of these samples are so different compared to the training distribution that the model does not have enough information to predict their labels but still outputs predictions with high confidence . It is important to identify these out-of-distribution ( OOD ) samples in the test set and flag them , for example to at least temporarily abstain from prediction ( Geifman & El-Yaniv , 2017 ) and involve a human in the loop . To achieve this , Bayesian methods ( Gal & Ghahramani , 2016 ; Malinin & Gales , 2018 ) or alternatives such as Deep Ensembles ( Lakshminarayanan et al. , 2017 ) try to identify samples on which a given model can not predict reliably and include . Their aim is to obtain predictive models that simultaneously have low error on in-distribution ( ID ) data and perform well on OOD detection . Other approaches try to identify samples with low probability under the training distribution , independent of any prediction model , and use , for instance , density estimation ( Nalisnick et al. , 2019 ) or statistics of the intermediate layers of a neural network ( Lee et al. , 2018 ) . Most prior work have reported good OOD detection performance , reaching an almost perfect area under the ROC curve ( AUROC ) value of nearly 1 . However these settings generally consider differentiating two vastly different data sets such as SVHN vs CIFAR10 . We show that the picture is very different in a lot of other relevant settings . Specifically , for unseen classes within CIFAR10 or for data with strong distribution shifts ( e.g . ( resized ) ImageNet vs ObjectNet ( Barbu et al. , 2019 ) ) , the AUROC of state-of-the-art methods often drops below 0.8 . Almost all of these methods assume a setting where at test time , no training is possible and the OOD detection method can only be trained beforehand . This inductive setting allows real-time decision-making and is hence more broadly used . However , in many cases we can indeed do batch predictions , for example when sensor readings come in every second and it is sufficient to make a prediction and decision every few minutes ( e.g . automatic irrigation system ) . In this case we have a batch of unlabeled test data available that we want to predict ( and be warned about ) that we can use together with the labeled training set to detect the OOD points in the set . We call this the transductive OOD setting ( related to but quite different from transductive classification ( Vapnik , 1998 ) ) . Even in an online setting , transductive OOD could be very useful ( see Section 2.1 ) . ( How ) Can we achieve significantly better OOD detection performance in the transductive setting ? Even though the transductive setting improves test accuracy in small data settings for tasks such as classification or zero-shot learning , it is unclear how to successfully leverage simultaneous availability of training and test set in the transductive OOD setting which is quite distinct from the former problems . A concurrent recent work Yu & Aizawa ( 2019 ) tackles this challenge by encouraging two classifiers to maximally disagree on the test set ( i.e . to produce different predictions on test samples ) . However this leads to models that disagree to a similar degree on both ID and OOD data and hence one can not distinguish between the two , as indicated by the low AUROC in Figure 1 . We introduce a new method called Regularized Ensembles for Transductive OOD detection ( RETO ) for overparameterized models , which heavily uses regularization to make sure that the ensemble disagrees only on the OOD samples in the test set , but not on the ID samples . In summary , our main contributions in this paper are as follows : • We experimentally identify many realistic OOD scenarios where SOTA methods achieve a subpar AUROC below 0.84 . We hence argue that the field of OOD detection is far from satisfactorily solved and more methods will be proposed that include these ( or other ) hard OOD cases as benchmarks . • For the transductive OOD detection setting , we propose a new procedure , RETO , that manages to diversify the output of an ensemble only on the OOD portion of the test set and hence achieves significant improvements compared to SOTA methods ( see Figure 1 ) with a relative gain of at least 32 % . 2 REGULARIZED ENSEMBLES FOR TRANSDUCTIVE OOD DETECTION . Our main goal is to detect samples that are outside of the training distribution and focus on classification tasks . We are only interested in situations where we can obtain a model that generalizes well given the training data . If the models do not generalize well in-distribution ( ID ) , then the primary task should be to find a better classifier instead . Given a classifier with good generalization , the next challenge becomes to ensure that samples on which the model can not make confident predictions ( e.g . samples that are too far from the training data ) are correctly identified . This constitutes the main focus of our work . Recall that in our use case , we have a batch of unlabeled test samples at our disposal . This test set includes a mixture of samples drawn from the training distribution and samples we call OOD per our definition in the previous section . The goal is to distinguish between the ID and the OOD samples in the test set . In this section we propose our method that uses the more numerous training data as a counterweight that does not allow a sufficiently smooth model to fit an arbitrary label on ID test samples , but only on OOD test samples . 2.1 TRANSDUCTIVE OOD DETECTION . In an inductive OOD detection setting , one can only tune a method at training time , and then use it with unchanged parameters on any test set . In contrast , in a transductive setting , the training data is available during test time and it is possible to tune a method using both the training set and the unlabeled test set . We stress that no labels are available for the test data , so it is unknown which test samples are indeed anomalous . Moreover , we do not assume access to any known OOD samples , unlike some of the inductive methods , which sometimes use OOD data for training or calibration ( Lee et al. , 2018 ; Liang et al. , 2018 ; Malinin & Gales , 2018 ; Cao et al. , 2020 ) . When deployed in the context of classification , transductive and semi-supervised learning methods leverage the unlabeled data to obtain low-dimensional representations that are more effective for the prediction task . A key assumption for the setting to be useful is that the data is related in some way , e.g . the unlabeled data comes from the same distribution as the labeled data . On the other hand , transductive OOD detection differs from the usual transductive classification setting , in that the training distribution does not carry information about the OOD data . As a consequence , it is not obvious how to adapt existing semi-supervised methods to work in this different regime . Some of the downsides that prevent transductive classification methods from being used more broadly are that for each test set that we want to predict , we would need to have access to the training data and computational resources . Furthermore , they do not allow predictions on the fly in the online setting . For transductive OOD however , we know that the inductive model predicts reliably in-distribution . Hence we can still predict test points on the fly , and only flag OOD samples with a slight delay after receiving a batch of test points . An example for which all these downsides are not limiting should be quite relatable to the reader . For example , Covid-19 test results have a crucial role for controlling the spread of the virus . Imagine a machine learning model were to be developed and deployed for reliable fast testing that works well under usual circumstances . If a test pipeline becomes defect , informing the patient of the potentially wrong test result is still crucial , in particular if it is to inform a negatively tested patient to repeat the test or to quarantine . In this case we would also be willing to allow access to labeled training data and computational resources for fine-tuning as precision is of utmost importance . 2.2 THE COMPLETE RETO PROCEDURE . We now provide details on our approach , RETO , outlined in Algorithm 1 . Recall that we have access to both a labeled training set , and the unlabeled test set . We begin by assigning an arbitrary label ( selected from the set of labels of the training data ) to all the test samples . We train a classifier on the union of the correctly-labeled training set , and the arbitrarily-labeled test set . To find the optimal classifier , we search among functions that are known to generalize well on the ID ( training ) distribution . If the classifiers are smooth enough , they will not be able to fit both the correct labels of the training set and the arbitrary label on the ID test samples , as illustrated in Figure 2 for linear classifiers . However , they will still fit the arbitrary label on the OOD test samples . Using regularization , we ensure that the models we obtain are not too complex . We search inside a function class of regularized functions , Freg , as discussed in more detail in Section 3 . We ensemble several such classifiers , where each model fits a different label to the test set . We then use a disagreement statistic and flag as OOD all the points in the test set with high disagreement . To avoid training the ensemble from scratch for each new test batch , it is possible to instead start from pre-trained weights and perform a few iterations of fine-tuning , as detailed in Section 4 . We stress that we do not calibrate or train our method on any known OOD data . Algorithm 1 : Pseudocode for RETO Input : Train set S , Test set T , Ensemble size K , Test statistic threshold t0 , Regularized function class Freg , Disagreement metric Result : O , i.e . the elements of T which are OOD for c← { y1 , ... , yK } do // train K models T c ← { ( x , c ) : x ∈ T } f̂c ← Train ( S ∪ T c ; Freg ) O = ∅ for x ∈ T do // run two-sample test if disagreement ( f̂y1 ( x ) , . . . , f̂yK ( x ) ) > t0 then O ← O ∪ { x } return O Determining OOD samples with RETO . We distinguish between ID and OOD samples using a two-sample statistical test , with the null hypothesis : H0 : x ∈ suppP , for a test sample x and where P denotes the training distribution1 . Previous baselines have proposed their own choices of the test statistic , which is discussed in detail in Appendix A . For RETO , we use : Tavg-TV ( x ) : = 1 K ( K − 1 ) ∑ i 6=j dTV ( fi ( x ) , fj ( x ) ) , the average pairwise total variation distance between the softmax outputs fi ( x ) , fj ( x ) ∈ R|Y| of models i , j ∈ { 1 , ... , K } in the ensemble , where dTV is the total variation distance . The null hypothesis is rejected for high values of Tavg-TV . Appendix L contains more details about the choice of the test statistic . It follows from the way in which the hypothesis test is stated that true positives are OOD samples that are indeed flagged as OOD , while the false positives are ID samples that are incorrectly predicted as OOD .
The problem of good predictive uncertainty-based out of distribution (OOD) detection is essential for classification systems to be deployed in safety-critical environments. The authors present a method RETO that achieves state-of-the-art performance in a transductive OOD detection setting. Like other predictive uncertainty-based approaches RETO can ultimately be used downstream on problems like active learning or abstaining on OOD samples in combination with selective classification.
SP:9f14c6cce4e92d92e0025b6ede2a04a862c3b5a9
Contrastive Self-Supervised Learning of Global-Local Audio-Visual Representations
1 INTRODUCTION . Self-supervised learning aims to learn representations of data that generalize to a large variety of downstream tasks . Recently , contrastive self-supervised learning ( CSL ) has achieved impressive results on several computer vision tasks ( Oord et al. , 2018 ; Hjelm et al. , 2018 ; He et al. , 2020 ; Chen et al. , 2020 ) . In CSL , the choice of “ views ” determines the types of information that the representation captures ( Bachman et al. , 2019 ) , as the framework learns representations that focus on the shared information between views . It has been demonstrated that the optimal choice of views depends critically on the downstream task ( Tian et al. , 2020 ) . Therefore , existing works mainly focus on finding different views tailored for the intended downstream tasks . For example , when tailoring views for action classification , Hjelm & Bachman ( 2020 ) extends DIM ( Hjelm et al. , 2018 ) to the spatio-temporal setting by assuming that global and local information useful for action classification ( i.e , global semantics ) should be invariant across time and space within a given video . When dealing with multimodal data , several approaches utilize audio-visual correspondence from videos ( Morgado et al. , 2020 ) . Such a CSL approach is based on an assumption that information needed for audio/video classification should be shared between the two modalities . Although they achieve impressive results in their intended downstream tasks , existing approaches often fail to generalize to tasks that they were not originally designed for . For example , in lip reading ( Chung & Zisserman , 2016 ) , the desired information is the fine-grained spatio-temporal representation around the mouth . However , if we directly apply existing CSL approaches , the shared information across views is that a there is a face , while the useful information , the lip movements , will be suppressed as they are changing across views from the sample clip . Motivated by this , we propose a versatile CSL approach to learn representations that can generalize to both scenarios that require global representations ( e.g. , classification ) and scenarios that require local representations ( e.g. , localization ) ( see Fig . 1 ) . Our approach , which we call global-local cross-modal ( GLCM ) contrastive learning , has four key properties that we assume to be important for our learning objective : 1 ) observations from the same time span of a video should reflect the same content regardless of modalities ; 2 ) the same observations captured at different time scales can reflect both global and local information ; 3 ) when learning on a local temporal scale , the contrasting views should only share the time-varying information ( e.g . only the moving lip ) while ignoring globally invariant information ; 4 ) multi-scale ( global-local ) observations can be trained jointly in a collaborative way so that representations learned at either scale can be reused . sidering only the audio-visual features that lie in the same time window as positive pairs ; the others are all negative pairs . Finally , we utilize information captured at the global scale ( e.g . localizing the source of a sound ) to assist efficient learning at the local scale , thus capturing the fourth property . We show that GLCM pretraining learns representations with global and fine-grained spatio-temporal information from audio-visual signals . The learned representations perform effectively on a variety of downstream tasks . We evaluate our proposed approach on tasks that needs local spatio-temporal information ( i.e lip reading , deep-fake detection , and sound-source localization ) and also discriminative tasks that needs global information ( i.e . action classification and audio-event classification ) . 2 RELATED WORK . Contrastive self-supervised learning . CSL has contributed to strong performance on many tasks and in cases produced comparable results to supervised learning ( Chen et al. , 2020 ; Caron et al. , 2020 ) . Contrastive learning leverage multiple views of the same data ( Hjelm & Bachman , 2020 ; Oord et al. , 2018 ) , e.g. , multiple perspectives within the same modality ( e.g. , augmentations of the same image , different frames of a video , etc . ) ( He et al. , 2020 ; Hjelm & Bachman , 2020 ; Han et al. , 2019a ) or perspectives from different modalities ( e.g. , depth and RGB images , visual and textual signals ) ( Tian et al. , 2019 ; Sun et al. , 2019 ; Miech et al. , 2020 ; Alayrac et al. , 2020 ) . Chen et al . ( 2020 ) and Hjelm et al . ( 2018 ) show that leveraging local information to perform contrastive learning further improves the performance on image classification tasks . DIM ( Hjelm et al. , 2018 ) has been extended to multi-scale ( Bachman et al. , 2019 ) and video data Hjelm & Bachman ( 2020 ) . However , evaluation is still focused on “ discriminative ” tasks ( image classification and video event classification ) , while there is little evidence that these models will adapt well to the local information . Audio-visual representation learning . Several approaches have been proposed to leverage the natural correspondence between audio and visual signals to perform CSL ( Asano et al. , 2020 ; Korbar et al. , 2018 ; Alwassel et al. , 2019 ; Morgado et al. , 2020 ; Patrick et al. , 2020 ; Chung et al. , 2019 ) . Most existing approaches aim to capture high-level semantic information from observations . It has been empirically demonstrated that such learned information is very effective for “ discrimination tasks ” ( classification ) . However , in tasks that needs local information the learned representations may not perform well . Xiao et al . ( 2020a ) design their approach by utilizing different temporal scales of the audio and visual data , which encourages the model to capture fine-grained temporal information and hence improves the performance . However , the evaluation was limited to classification tasks . In contrast with previous work , we demonstrate that our approach effectively learns global-local audio-visual representations by evaluating on a variety of downstream tasks . 3 APPROACH We propose using the audio and visual channels as cross-modal views of video data . As we aim to learn both local and global temporal information , we utilize the same visual sequence processed at different sampling rates to reflect the same observation at different temporal scales . Given that we want each signal to capture complementary views of the same data , we use different encoders to extract the representations from the audio sequence ( Ea ) , subsampled visual sequence ( Egv ) and full sampling rate visual sequence ( Elv ) . The question is , then , how to design a contrastive loss to learn representations from these different views . We achieve this goal by jointly training the model using two contrastive losses : global and local . As shown in Fig . 2 , the global loss is computed by contrasting audio signals with subsampled visual sequence ( Sec.3.1 ) ; while the local loss is computed by contrasting audio signals with visual sequence at a full sampling rate ( Sec.3.2 ) . To jointly train the global and local pathways , we propose a spatially-aware attention pooling mechanism to effectively reuse the information that was captured from the global pathway in the local pathway ( Sec.3.3 ) . 3.1 GLOBAL CONTRASTIVE OBJECTIVE . We design the global contrastive objective to capture slowly changing information with high audiovisual correlation . We use video sequences captured at low sampling rates , which will inevitably lack local temporal information . Ea encodes an audio sequence into an audio embedding za ∈ RT×F , where F is the frequency , and T is the sequence length . After temporal global pooling , it becomes za ∈ R1×F . Similarly , we perform global temporal pooling on features encoded by the global visual encoder Egv , which produces the global visual embedding z g v ∈ R1×H×W×C . Note that , for the visual features , we perform global pooling only along the temporal dimension while keeping the spatial dimension intact . The reason is that when learning in a global temporal space , the model has capacity to capture more spatial information . To compute the global contrastive loss , we consider the audio features za and the visual features zgv that come from the same video sample as positive pairs , while features coming from different video samples are negative pairs . In order to encourage the model to also capture spatial information , we adopt MIL-NCE ( Miech et al. , 2020 ) to compute the loss . Specifically , we consider all H × W spatial grids in zgv as the instances , and therefore , instead of just taking a single audio-visual positive pair za ↔ zgv , the new positive pair becomes multiple visual instances zgv [ i ] H×W , i.e . za ↔ zgv [ i ] H×W . The loss is then defined as : Lg = −log ( ∑ zgv∈P exp ( z T a z g v ) ∑ zgv∈P exp ( z T a z g v ) + ∑ z′∈N exp ( z ′ a T z′v g ) ) ( 1 ) where N is a set of negative audio and visual pairs , P is a set of spatial grids in zgv . 3.2 LOCAL CONTRASTIVE OBJECTIVE . We design the local contrastive objective to capture fine-grained spatio-temporal information that is sensitive to temporal changes while being invariant to different modalities . We thus contrast between local audio features za and local spatio-temporal visual features zlv . Specifically , we consider the temporal local audio and visual features that lie in the same time window to be the positive pairs , za [ t ] ↔ zlv [ t ] , where z [ t ] represents features in the time window t. As shown in Figure 2 , the video and audio features shaded in the same color refer to those in the same time window . The features in different time windows ( e.g . green and orange blocks ) are considered as negative pairs even if they are from the same video sample . As such , the shared information between the modalities is principally how the features vary over time . We obtain the local audio features by using the same audio encoder Ea but without global temporal pooling . The local visual features zlocalv are obtained by feeding the visual sequence with a high sampling rate into the local visual encoder Elv , which produces the visual features zlv ∈ RT×H×W×C . We then perform spatial pooling while keeping the temporal scale the same , the visual features become zlv ∈ RT×1×1×C . As the audio channel in a video generally has a higher sampling rate than the visual channel , visual feature at a single time step will be mapped to multiple audio feature slices . As shown in Figure 2 , at time t1 , the visual features zlv [ t1 ] ( green block ) correspond to multiple audio features za [ t1 ] t∈M ( green blocks ) , where M = 5 in Figure 2 . Specifically , we use a sliding window of size M to map each set of visual features at a given time step to a window of audio feature slices . Then the positive pair is considered as a visual feature and the corresponding window of audio feature slices . Once again we use MIL-NCE ( Miech et al. , 2020 ) to compute the contrastive loss . The reasoning for applying MIL-NCE here is different than in the case of the global contrastive loss . In the global contrastive loss , we aim to let the network capture spatial information . While in the local contrastive objective , the goal of using MIL-NCE is to mitigate the missing strict temporal mapping problem . The loss is therefore defined as : Ll = −log ( ∑ za∈Q exp ( z T a z l v ) ∑ za∈Q exp ( z T a z l v ) + ∑ z′∈N exp ( z ′ a T z′v l ) ) ( 2 ) where Q is a set of audio feature slices in the same time window as zlv , and N is a set of negative audio and visual pairs .
This paper presents a new contrastive audio-visual learning method. Like previous work, they use self-supervision to learn a video feature set by training a network to associate audio and visual "views" taken from the same video. Their main contribution is to jointly learn from both "local" and "global" information. They simultaneously optimize two contrastive objectives. First, there is a global objective, which computes a feature set using a low framerate video, pools over time, and obtains negatives from other different videos. Second, there is a local contrastive objective that uses a higher framerate video, pools over space but not time, and gets negatives from other timesteps of the video. They optimize both losses jointly using a spatially-aware pooling method that provides information from the global pathway to the local pathway. They compute attention by taking dot products between the visual and audio features, and using this attention to pool local visual features (instead of a global pooling).
SP:d3a089d045255fe67d84efc540969b6ce8bb4448
Layer-wise Adversarial Defense: An ODE Perspective
1 INTRODUCTION . Recent years have witnessed the prosperity of deep learning in many tasks ( Hinton & Salakhutdinov , 2006 ; Sutskever et al. , 2014 ; He et al. , 2016 ; LeCun et al. , 2015 ; Huang et al. , 2017 ; Vaswani et al. , 2017 ) . Stacked with multiple layers , neural networks provide an end-to-end solution to all the tasks and prove to be highly effective . However , the seminal study by Szegedy et al . ( 2013 ) has shown that deep neural networks ( DNNs ) can be fragile against attacks : minor perturbations on inputs lead to significant change in model predictions . Regarding the defense approaches , intensive studies on adversarial defense techniques have been proposed ( Athalye et al. , 2018a ; Goodfellow et al. , 2014 ; Zheng et al. , 2016 ; Madry et al. , 2018 ; Zhang et al. , 2019b ; Kurakin et al. , 2017 ; Pang et al. , 2019a ; 2020 ; 2019b ; Raff et al. , 2019 ; Guo et al. , 2018 ; Zhang et al. , 2020a ; Balunovic & Vechev , 2019 ; Wong et al. , 2020 ; Chan et al. , 2020 ; Zhang et al. , 2020b ) . Among these techniques , adversarial training algorithms ( Madry et al. , 2018 ; Zhang et al. , 2019b ) incorporate the effect of perturbed inputs into the loss function , which are shown to be competent and boasts the dominant impact in the adversarial defense research field . While adversarial training techniques have gained increasing attention in the robust deep learning research community , most of current approaches concentrate on deriving perturbations on the inputs with gradients back-propagated from the loss function . However , as information flow in neural networks starts from inputs and passes through hidden layers , it is essential to robustify both the inputs and the hidden layers . While previous studies have made successful attempts on introducing damping terms ( Yang et al. , 2020 ) or stochastic noise ( Liu et al. , 2020 ; Wang et al. , 2019 ) to each layer in neural architectures , they concentrate on improving general model robustness and are less focused on adversarial model robustness . We ask the following question : Can we take the hidden layers of neural networks into account to improve adversarial model robustness ? In this work , we propose layer-wise adversarial defense to improve adversarial training , which enhances adversarial model robustness by stabilizing both inputs and hidden layers . In our method , the layer-wise perturbations are incorporated into the robust optimization framework of adversarial training . We propose to inject scaled back-propagated gradients into the architecture as layer-wise perturbations . Besides , we formulate our method from the perspective of ordinary differential equations and propose a novel ODE as its the continuous limit in order to study the neural dynamics . Inspired from the rich literature on numerical analysis , we use the Lie-Trotter and the Strang-Marchuk splitting schemes to solve the proposed ODE . We refer to the resulted discrete algorithms as Layerwise Adversarial Defense ( LAD ) and LAD-SM , respectively . Furthermore , we build up the extended relationship between our methods with current natural training and adversarial training techniques by analyzing the second order dynamics . Our analysis shows that our methods have introduced additional perturbations in the first order initial value of the second order dynamics compared with current adversarial training algorithms.Experiments on the CIFAR-10 and CIFAR-100 benchmarks show that our methods improve adversarial model robustness on top of different widely-used strong adversarial training techniques . We summarize our contributions as follows : • We propose layer-wise adversarial defense which generalizes conventional adversarial training approaches with layer-wise adversarial perturbations ( Section 3.1 ) ; • We investigate the continuous limit of our layer-wise adversarial defense methods and propose an ODE that integrates the adjoint state into the forward dynamics ( Section 3.2 ) ; • We build up the extended relationship between our methods and current adversarial training approaches by analyzing the second order neural dynamics in theory . Experiments have also shown the effectiveness of our methods in practice . ( Section 3.3 and Section 4 ) . 2 RELATED WORK . 2.1 ADVERSARIAL MODEL ROBUSTNESS . In this section we review the literature on gradient-based attack and defense approaches in the field of adversarial model robustness . For adversarial attacks , widely-used approaches include Fast Gradient Sign Method ( FGSM ) ( Goodfellow et al. , 2015 ) and Iterated Fast Gradient Sign Method ( IFGSM ) ( Madry et al. , 2018 ) . For a given data point , FGSM induces the adversarial example by moving with the attack radius at each component along the gradient ascent direction . Iterated FGSM performs FGSM with inner iteration updates with smaller step size α . Prior studies have inspired multiple adversarial attack techniques ( Athalye et al. , 2018b ; Carlini & Wagner , 2017 ; Ilyas et al. , 2018 ; Dong et al. , 2018 ; Pang et al. , 2018 ) . Adversarial defense techniques can be categorized by training phase ( Athalye et al. , 2018a ; Goodfellow et al. , 2014 ; Zheng et al. , 2016 ; Madry et al. , 2018 ; Zhang et al. , 2019b ; Kurakin et al. , 2017 ; Pang et al. , 2019a ; 2020 ; Zhang et al. , 2020a ; Balunovic & Vechev , 2019 ; Wong et al. , 2020 ; Chan et al. , 2020 ; Zhang et al. , 2020b ) and inference phase ( Pang et al. , 2019b ; Raff et al. , 2019 ; Xie et al. , 2018 ; Guo et al. , 2018 ) . The widely-used approach in training phase is Projected Gradient Descent ( PGD ) training ( Madry et al. , 2018 ) , which integrates the effect of the perturbed inputs into its loss function . The current state-of-the-art defense approach in training phase is TRADES ( Zhang et al. , 2019b ) , which additionally introduces the boundary error as a regularization term into its loss function . In our experiments , we select PGD training and TRADES as our baselines . While substantially enhancing adversarial model robustness , the gradient-based perturbations in adversarial training are currently only performed on inputs . As cascaded hidden layers comprise the passage for information flow in neural networks , it is essential to stabilize hidden layers as well . In our work , we introduce layerwise gradient-based perturbations to neural architectures to improve adversarial model robustness . 2.2 ODE-INSPIRED ARCHITECTURE DESIGNS . Research about the relationship between neural networks and ODEs starts with the continuous limit formulation of ResNet ( E , 2017 ) , which has inspired many novel neural architecture designs ( Lu et al. , 2018 ; Zhu et al. , 2018 ; Chang et al. , 2018 ; Haber & Ruthotto , 2017 ; Chen et al. , 2018 ; Dupont et al. , 2019 ) . Regarding model robustness , most prior studies have focused on improving dynamic system stability by Lyapunov analysis , more stable numerical schemes , or imposing regularization . From Lyaponov stability perspective , Yang et al . ( 2020 ) introduce damping terms to residual networks to stabilize dynamic systems . Appropriately adjusting the damping factor introduces damping effect to the dynamic system and enhances model robustness . Similarly , Chang et al . ( 2019 ) improve Lyapunov stability of RNNs by imposing antisymmetric constraints on the weight matrix . On more stable numerical schemes , prior studies include taking small step sizes in the forward Euler scheme ( Zhang et al. , 2019c ) or leveraging implicit schemes to enhance stability ( Reshniak & Webster , 2019 ; Li et al. , 2020 ) . For imposing regularization , stochasticity is introduced into ODEs for stabilization ( Liu et al. , 2020 ; Wang et al. , 2019 ) . Hanshu et al . ( 2019 ) regularize neural ODE models to be timeinvariant and add a regularization term about the upper bound of the effect from input perturbation . Zhang et al . ( 2019a ) propose a differential game formulation for adversarial training and accelerate the process from the optimal control theory . Our work differs from the prior studies by integrating gradient-based perturbations into the neural dynamics , which proves to be an extension to current approaches on improving adversarial model robustness in both theory and practice . 3 LAYER-WISE ADVERSARIAL DEFENSE . 3.1 THE MODEL FORMULATION . The objective of conventional adversarial training approaches can be formulated into a min-max problem ( Madry et al. , 2018 ; Zhang et al. , 2019a ) . We introduce layer-wise perturbations { ∆xn } Nn=0 and rewrite the min-max problem as follows : min { θn } Nn=1 max { ∆xn } Nn=0 L ( Θ , ∆x ) : = L ( xN ) subject to x̃0 = x0 + ∆x0 , xn+1 = x̃n + f ( x̃n , θn ) , x̃n+1 = xn+1 + ∆xn+1 , n = 0 , 1 , 2 , · · · , N − 1 . ( 1 ) where N is the number of layers in a neural network , Θ = { θn } Nn=1 represent its trainable parameters and the { ∆xn } Nn=0 represent the layer-wise perturbations . In our formulation , we ignore the bounded assumptions on the perturbations for simplicity , since if there are additional bounded constraints on the perturbations , we can project the gradient onto the intervals . It is noted that when ∆xn = 0 for all n = 1 , . . . , N , the model ( 1 ) reduces to the conventional adversarial training formulation . More specifically , for adversarial training algorithms ( Madry et al. , 2018 ; Zhang et al. , 2019b ) , let M be the maximum number of inner iterations for the perturbations , we have the following update rule ( ignoring the bounded constraints ) : x ( m+1 ) 0 = x ( m ) 0 + η ∂L ∂x0 ∣∣∣∣ ( m ) , x ( 0 ) 0 = x0 , ( 2 ) where the perturbation ∆x0 is defined as x ( M ) 0 − x0 . In this work , we generalize the above idea to introducing perturbations to hidden layers , i.e . determine ∆xn+1 in Eq . ( 1 ) so that the objective in Eq . ( 1 ) is maximized . Similar to Eq . ( 2 ) , we perturb xn+1 with iterative gradient descent : x ( m+1 ) n+1 = x ( m ) n+1 + η ∂L ∂xn+1 ∣∣∣∣ ( m ) , x ( 0 ) n+1 = xn+1 , ( 3 ) where η is the step size as a scaling factor over the gradients ∂L/∂xn+1 . We set ∆xn+1 = x ( M ) n+1 − xn+1 , where M is the number of the iteration steps . When M = 1 , the layer-wise adversarial perturbations are given by ∆xn+1 = x ( 1 ) n+1 − xn+1 = η ∂L ∂xn+1 , n = 0 , 1 , 2 , · · · , N − 1 . ( 4 ) Replacing the maximization of layer-wise perturbations { ∆xn } Nn=0 by Eq . ( 4 ) , we obtained a simplified problem as follows . min { θn } Nn=1 L ( Θ ) : = L ( xN ) subject to x̃n+1 = xn + f ( xn , θn ) , xn+1 = x̃n+1 + η ∂L ∂x̃n+1 , n = 0 , 1 , 2 , · · · , N − 1 , ( 5 ) with the inputs x̃0 = x0 +∆x0 determined by Eq . ( 4 ) . Notice that directly applying Eq . ( 5 ) requires alternative computations of x̃n+1 and ∂L/∂x̃n+1 with iterative forward and backward passes , which can be extremely time-consuming . In our implementation , we leverage a two-stage approach : first record the gradients with respect to each layer in a forward and backward pass , then add the recorded gradients to each layer in another forward pass as layer-wise adversarial perturbations . We refer to this algorithm as our Layer-wise Adversarial Defense ( LAD ) method .
This paper proposed a layer-wise adversarial defense which added perturbations in each hidden layer considering the influence of hidden features in latent space from the ODE perspective. It is essential to enhance the adversarial model robustness by stabilizing both inputs and hidden layers. The proposed method leveraged two operator splitting theory w.r.t. the Lie-Trotter and the Strang-Marchuk splitting schemes to discretize the specially designed ODE formulation by integrating the continuous limit of back-propagated gradients into the forward process. The main contribution of this paper is to generate perturbations with the idea of ODE in each layer. Empirical studies were performed to show the effectiveness of the proposed method on two benchmarks with two attack methods.
SP:9cf8f7dba8b4e672d685bc89295f237f422937cf
Exemplary Natural Images Explain CNN Activations Better than State-of-the-Art Feature Visualization
1 INTRODUCTION . As Deep Learning methods are being deployed across society , academia and industry , the need to understand their decisions becomes ever more pressing . Under certain conditions , a “ right to explanation ” is even required by law in the European Union ( GDPR , 2016 ; Goodman & Flaxman , 2017 ) . Fortunately , the field of interpretability or explainable artificial intelligence ( XAI ) is also growing : Not only are discussions on goals and definitions of interpretability advancing ( DoshiVelez & Kim , 2017 ; Lipton , 2018 ; Gilpin et al. , 2018 ; Murdoch et al. , 2019 ; Miller , 2019 ; Samek et al. , 2020 ) but the number of explanation methods is rising , their maturity is evolving ( Zeiler & Fergus , 2014 ; Ribeiro et al. , 2016 ; Selvaraju et al. , 2017 ; Kim et al. , 2018 ) and they are tested and ∗Joint first and corresponding authors : firstname.lastname @ uni-tuebingen.de †Current affiliation : Institute of Psychology and Center for Cognitive Science , Technische Universität Darmstadt ‡Joint senior authors ... or M ax im al ly Ac tiv at in g ... Synthetic Natural ... M in im al ly Ac tiv at in g ... Choose or Queries ... which image is strongly activating ? A Given these reference images ... B Synthetic Natural Chance 0.6 0.7 0.8 0.9 1.0 Pr op or tio n Co rr ec t Synthetic images are helpful Natural even more or Figure 1 : How useful are synthetic compared to natural images for interpreting neural network activations ? A : Human experiment . Given extremely activating reference images ( either synthetic or natural ) , a human participant chooses which out of two query images is also a strongly activating image . Synthetic images were generated via feature visualization ( Olah et al. , 2017 ) . B : Core result . Participants are well above chance for synthetic images — but even better when seeing natural reference images . used in real-world scenarios like medicine ( Cai et al. , 2019 ; Kröll et al. , 2020 ) and meteorology ( Ebert-Uphoff & Hilburn , 2020 ) . We here focus on the popular post-hoc explanation method ( or interpretability method ) of feature visualizations via activation maximization1 . First introduced by Erhan et al . ( 2009 ) and subsequently improved by many others ( Mahendran & Vedaldi , 2015 ; Nguyen et al. , 2015 ; Mordvintsev et al. , 2015 ; Nguyen et al. , 2016a ; 2017 ) , these synthetic , maximally activating images seek to visualize features that a specific network unit , feature map or a combination thereof is selective for . However , feature visualizations are surrounded by a great controversy : How accurately do they represent a CNN ’ s inner workings—or in short , how useful are they ? This is the guiding question of our study . On the one hand , many researchers are convinced that feature visualizations are interpretable ( Graetz , 2019 ) and that “ features can be rigorously studied and understood ” ( Olah et al. , 2020b ) . Also other applications from Computer Vision and Natural Language Processing support the view that features are meaningful ( Mikolov et al. , 2013 ; Karpathy et al. , 2015 ; Radford et al. , 2017 ; Zhou et al. , 2014 ; Bau et al. , 2017 ; 2020 ) and might be formed in a hierarchical fashion ( LeCun et al. , 2015 ; Güçlü & van Gerven , 2015 ; Goodfellow et al. , 2016 ) . Over the past few years , extensive investigations to better understand CNNs are based on feature visualizations ( Olah et al. , 2020b ; a ; Cammarata et al. , 2020 ; Cadena et al. , 2018 ) , and the technique is being combined with other explanation methods ( Olah et al. , 2018 ; Carter et al. , 2019 ; Addepalli et al. , 2020 ; Hohman et al. , 2019 ) . On the other hand , feature visualizations can be equal parts art and engineering as they are science : vanilla methods look noisy , thus human-defined regularization mechanisms are introduced . But do the resulting beautiful visualizations accurately show what a CNN is selective for ? How representative are the seemingly well-interpretable , “ hand-picked ” ( Olah et al. , 2017 ) synthetic images in publications for the entirety of all units in a network , a concern raised by e.g . Kriegeskorte ( 2015 ) ? What if the features that a CNN is truly sensitive to are imperceptible instead , as might be suggested by the existence of adversarial examples ( Szegedy et al. , 2013 ; Ilyas et al. , 2019 ) ? Morcos et al . ( 2018 ) even suggest that units of easily understandable features play a less important role in a network . Another criticism of synthetic maximally activating images is that they only visualize extreme features , while potentially leaving other features undetected that only elicit e.g . 70 % of the maximal activation . Also , polysemantic units ( Olah et al. , 2020b ) , i.e . units that are highly activated by different semantic concepts , as well as the importance of combinations of units ( Olah et al. , 2017 ; 2018 ; Fong & Vedaldi , 2018 ) already hint at the complexity of how concepts are encoded in CNNs . One way to advance this debate is to measure the utility of feature visualizations in terms of their helpfulness for humans . In this study , we therefore design well-controlled psychophysical experiments that aim to quantify the informativeness of the popular visualization method by Olah et al . ( 2017 ) . Specifically , participants choose which of two natural images would elicit a higher activa- 1Also known as input maximization or maximally exciting images ( MEIs ) . tion in a CNN given a set of reference images that visualize the network selectivities . We use natural query images because real-world applications of XAI require understanding model decisions to natural inputs . To the best of our knowledge , our study is the first to probe how well humans can predict intermediate CNN activations . Our data shows that : • Synthetic images provide humans with helpful information about feature map activations . • Exemplary natural images are even more helpful . • The superiority of natural images mostly holds across the network and various conditions . • Subjective impressions of the interpretability of the synthetic visualizations vary greatly between participants . 2 RELATED WORK . Significant progress has been made in recent years towards understanding CNNs for image data . Here , we mention a few selected methods as examples of the plethora of approaches for understanding CNN decision-making : Saliency maps show the importance of each pixel to the classification decision ( Springenberg et al. , 2014 ; Bach et al. , 2015 ; Smilkov et al. , 2017 ; Zintgraf et al. , 2017 ) , concept activation vectors show a model ’ s sensitivity to human-defined concepts ( Kim et al. , 2018 ) , and other methods - amongst feature visualizations - focus on explaining individual units ( Bau et al. , 2020 ) . Some tools integrate interactive , software-like aspects ( Hohman et al. , 2019 ; Wang et al. , 2020 ; Carter et al. , 2019 ; Collaris & van Wijk , 2020 ; OpenAI , 2020 ) , combine more than one explanation method ( Shi et al. , 2020 ; Addepalli et al. , 2020 ) or make progress towards automated explanation methods ( Lapuschkin et al. , 2019 ; Ghorbani et al. , 2019 ) . As overviews , we recommend Gilpin et al . ( 2018 ) ; Zhang & Zhu ( 2018 ) ; Montavon et al . ( 2018 ) and Carvalho et al . ( 2019 ) . Despite their great insights , challenges for explanation methods remain . Oftentimes , these techniques are criticized as being over-engineered ; regarding feature visualizations , this concerns the loss function and techniques to make the synthetic images look interpretable ( Nguyen et al. , 2017 ) . Another critique is that interpretability research is not sufficiently tested against falsifiable hypotheses and rather relies too much on intuition ( Leavitt & Morcos , 2020 ) . In order to further advance XAI , scientists advocate different directions . Besides the focus on developing additional methods , some researchers ( e.g . Olah et al . ( 2020b ) ) promote the “ natural science ” approach , i.e . studying a neural network extensively and making empirical claims until falsification . Yet another direction is to quantitatively evaluate explanation methods . So far , only decision-level explanation methods have been studied in this regard . Quantitative evaluations can either be realized with humans directly or with mathematically-grounded models as an approximation for human perception . Many of the latter approaches show great insights ( e.g . Hooker et al . ( 2019 ) ; Nguyen & Martı́nez ( 2020 ) ; Fel & Vigouroux ( 2020 ) ; Lin et al . ( 2020 ) ; Tritscher et al . ( 2020 ) ; Tjoa & Guan ( 2020 ) ) . However , a recent study demonstrates that metrics of the explanation quality computed without human judgment are inconclusive and do not correspond to the human rankings ( Biessmann & Refiano , 2019 ) . Additionally , Miller ( 2019 ) emphasizes that XAI should build on existing research in philosophy , cognitive science and social psychology . The body of literature on human evaluations of explanation methods is growing : Various combinations of data types ( tabular , text , static images ) , task set-ups and participant pools ( experts vs. laypeople , on-site vs. crowd-sourcing ) are being explored . However , these studies all aim to investigate final model decisions and do not probe intermediate activations like our experiments do . For a detailed table of related studies , see Appendix Sec . A.3 . A commonly employed task paradigm is the “ forward simulation / prediction ” task , first introduced by Doshi-Velez & Kim ( 2017 ) : Participants guess the model ’ s computation based on an input and an explanation . As there is no absolute metric for the goodness of explanation methods ( yet ) , comparisons are always performed within studies , typically against baselines . The same holds for additional data collected for confidence or trust ratings . According to the current literature , studies reporting positive effects of explanations ( e.g . Kumarakulasinghe et al . ( 2020 ) ) slightly outweigh those reporting inconclusive ( e.g . Alufaisan et al . ( 2020 ) ; Chu et al . ( 2020 ) ) or even negative effects ( e.g . Shen & Huang ( 2020 ) ) . To our knowledge , no study has yet evaluated the popular explanation method of feature visualizations and how it improves human understanding of intermediate network activations . This study therefore closes an important gap : By presenting data for a forward prediction task of a CNN , we provide a quantitative estimate of the informativeness of maximally activating images generated with the method of Olah et al . ( 2017 ) . Furthermore , our experiments are unique as they probe for the first time how well humans can predict intermediate model activations . 3 METHODS . We perform two human psychophysical studies2 with different foci ( Experiment I ( N = 10 ) and Experiment II ( N = 23 ) ) . In both studies , the task is to choose the one image out of two natural query images ( two-alternative forced choice paradigm ) that the participant considers to also elicit a strong activation given some reference images ( see Fig . 2 ) . Apart from the image choice , we record the participant ’ s confidence level and reaction time . Specifically , responses are given by clicking on the confidence levels belonging to either query image . In order to gain insights into how intuitive participants find feature visualizations , their subjective judgments are collected in a separate task and a dynamic conversation after the experiment ( for details , see Appendix Sec . A.1.1 and Appendix Sec . A.2.6 ) . All design choices are made with two main goals : ( 1 ) allowing participants to achieve the best performance possible to approximate an upper bound on the helpfulness of the explanation method , and ( 2 ) gaining a general impression of the helpfulness of the examined method . As an example , we choose the natural query images from among those of lowest and highest activations ( → best possible performance ) and test many different feature maps across the network ( → generality ) . For more details on the human experiment besides the ones below , see Appendix Sec . A.1 . In Experiment I , we focus on comparing the performance of synthetic images to two baseline conditions : natural reference images and no reference images . In Experiment II , we compare lay vs. expert participants as well as different presentation schemes of reference images . Expert participants qualify by being familiar or having practical experience with feature visualization techniques or at least CNNs . Regarding presentation schemes , we vary whether only maximally or both maximally and minimally activating images are shown ; as well as how many example images of each of these are presented ( 1 or 9 ) . Following the existing work on feature visualization ( Olah et al. , 2017 ; 2018 ; 2020b ; a ) , we use an Inception V1 network3 ( Szegedy et al. , 2015 ) trained on ImageNet ( Deng et al. , 2009 ; Russakovsky 2Code and data is available at https : //bethgelab.github.io/testing visualizations/ 3also known as GoogLeNet Synthetic Natural None Reference Images 0 0.2 0.4 0.6 0.8 1 Pr op or tio n Co rre ct p = 0.005 p = 0.003 p = 0.003A Synthetic Natural None Reference Images 0.0 2.5 5.0 7.5 10.0 12.5 15.0 17.5 Re ac tio n Ti m e [ s ec ] p = 0.002 p < 0.001 p = 0.003 CB Synthetic Pr op or tio n of C or re ct T ria ls Natural None 1 2 3 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 1 2 3 1 2 3 Confidence Rating Chance Figure 3 : Participants are better , more confident and faster at judging which of two query images causes higher feature map activation with natural than with synthetic reference images . A : Performance . Given synthetic reference images , participants are well above chance ( proportion correct : 82± 4 % ) , but even better for natural reference images ( 92± 2 % ) . Without reference images ( baseline comparison “ None ” ) , participants are close to chance . B : Confidence . Participants are much more confident ( higher rating = more confident ) for natural than for synthetic images on correctly answered trials ( χ2 , p < .001 ) . C : Reaction time . For correctly answered trials , participants are on average faster when presented with natural than with synthetic reference images . We show additional plots on confidence and reaction time for incorrectly answered trials and all trials in the Appendix ( Fig . 16 ) ; for Experiment II , see Fig . 17. ) . The p-values in A and C correspond to Wilcoxon signed-rank tests . et al. , 2015 ) . The synthetic images throughout this study are the optimization results of the feature visualization method by Olah et al . ( 2017 ) with the spatial average of a whole feature map ( “ channel objective ” ) . The natural stimuli are selected from the validation set of the ImageNet ILSVRC 2012 dataset ( Russakovsky et al. , 2015 ) according to their activations for the feature map of interest . Specifically , the images of the most extreme activations are sampled , while ensuring that each lay or expert participant sees different query and reference images . A more detailed description of the specific sampling process for natural stimuli and the generation process of synthetic stimuli is given in Sec . A.1.2 .
This paper asks a simple question: do extreme-activating synthetic images for a CNN unit help a human observer to predict that unit’s response to natural images, compared with maximally/minimally activating natural images. The authors present human observers with images synthesized to maximally or minimally activate a CNN unit, and then ask observers to make a binary choice as to which of two subsequently presented natural images will yield a larger unit response. They find that the synthetic images provide useful information for prediction, but that the benefit is smaller than that provided by simply presenting people with other natural images that maximally or minimally activate a unit.
SP:075f74ff0eec8a4d36e3d9d6c62276776dd465ba
MVP: Multivariate polynomials for conditional generation
Conditional Generative Adversarial Nets ( cGANs ) have been widely adopted for image generation . cGANs take i ) a noise vector and ii ) a conditional variable as input . The conditional variable can be discrete ( e.g. , a class label ) or continuous ( e.g. , an input image ) resulting into class-conditional ( image ) generation and imageto-image translation models , respectively . However , depending on whether the conditional variable is discrete or continuous , various cGANs employ substantially different deep architectures and loss functions for their training . In this paper , we propose a novel framework , called MVP , for conditional data generation . MVP resorts to multivariate polynomials of higher-order and treats in a unified way both discrete and continuous conditional variables . MVP is highly expressive , capturing higher-order auto- and cross-correlations of input variables ( noise vector and conditional variable ) . Tailored sharing schemes are designed between the polynomial ’ s parameter tensors , which result in simple recursive formulas . MVP can synthesize realistic images in both class-conditional and image-to-image translation tasks even in the absence of activation functions between the layers . 1 INTRODUCTION . Modelling high-dimensional distributions and generating samples from complex distributions are fundamental tasks in machine learning . Generative adversarial networks ( GANs ) ( Goodfellow et al. , 2014 ) have demonstrated spectacular results in the two tasks using both unsupervised ( Miyato et al. , 2018 ) and supervised ( Brock et al. , 2019 ) learning . In the unsupervised setting , ( the generator of ) a GAN accepts as input a noise vector zI and maps the noise vector to a high-dimensional output . The supervised models , called conditional Generative Adversarial Nets ( cGANs ) ( Mirza & Osindero , 2014 ) , accept both a noise vector zI and an additional conditional variable zII that facilitates the generation . The conditional variable can be discrete ( e.g. , a class or an attribute label ) or continuous ( e.g. , a low-resolution image ) . The impressive results obtained with both discrete conditional input ( Brock et al. , 2019 ) and continuous conditional input ( Park et al. , 2019 ; Ledig et al. , 2017 ) have led to a plethora of applications that range from text-to-image synthesis ( Qiao et al. , 2019 ) to deblurring ( Yan & Wang , 2017 ) and medical analysis ( You et al. , 2019 ) . Despite the similarity in the formulation for discrete and continuous conditional input ( i.e. , learning the function GpzI , zIIq ) , the literature has focused on substantially different architectures and losses . Frequently , techniques are simultaneously developed , e.g. , the self-attention in the class-conditional Self-Attention GAN ( Zhang et al. , 2019 ) and in the Attention-GAN ( Chen et al. , 2018 ) with continuous conditional input . This delays the progress since practitioners develop twice as many architectures and losses for every case . A couple of straightforward ideas can be employed to unify the behavior of the two conditional variable types . One idea is to use an encoder network to obtain representations that are independent of the conditional variable . This has two drawbacks : i ) the network ignores the noise and a deterministic one-variable mapping is learned ( Isola et al. , 2017 ) , ii ) such encoder has not been successful so far for discrete conditional input . An alternative idea is to directly concatenate the labels in the latent space instead of finding an embedding . In AC-GAN ( Odena et al. , 2017 ) the class labels are concatenated with the noise ; however , the model does not scale well beyond 10 classes . We argue that concatenation of the input is only capturing additive correlation and not higher-order interactions between the inputs . A detailed discussion is conducted on sec . D ( in the Appendix ) . A polynomial expansion with respect to the input variables can capture such higher-order correlations . Π-Net ( Chrysos et al. , 2020 ) casts the function approximation into a polynomial expansion of a single input variable . By concatenating the input variables , we can express the function approximation as a polynomial of the fused variable . However , the concatenation reduces the flexibility of the model significantly , e.g. , it enforces the same order of expansion with respect to the different variables and it only allows the same parameter sharing scheme to all variables . We introduce a multivariate framework , called MVP , for conditional data generation . MVP resorts to multivariate polynomials with two input variables , i.e. , zI for the noise vector and zII for the conditional variable . MVP captures higher-order auto- and cross-correlations between the variables . By imposing a tailored structure in the higher-order interactions , we obtain an intuitive , recursive formulation for MVP . The formulation is flexible and enables different constraints to be applied to each variable and its associated parameters . The formulation can be trivially extended to M input variables . In summary , our contributions are the following : • We introduce a framework , called MVP , that expresses a high-order , multivariate polynomial for conditional data generation . Importantly , MVP treats both discrete and continuous conditional variables in a unified way . • We offer an in-depth relationship with state-of-the-art works , such as SPADE ( Park et al. , 2019 ) , that can be interpreted as polynomial expansions . We believe this perspective better explains the success of such architectures and offers a new direction for their extension . • MVP is trained on eight different datasets for both class-conditional generation and imageto-image translation tasks . The trained models rely on both input variables , i.e. , they do not ignore the noise vector . • To illustrate the expressivity of the model , we also experiment with generators that do not use activation functions between the layers . We verify that MVP can synthesize realistic images even in the absence of activation functions between the layers . The source code of MVP will be published upon the acceptance of the paper . 2 RELATED WORK . The literature on conditional data generation is vast ; dedicated surveys per task ( Agnese et al. , 2019 ; Wu et al. , 2017b ) can be found for the interested reader . Below , we review representative works in conditional generation and then we summarize the recent progress in multiplicative interactions . 2.1 CONDITIONAL GENERATIVE MODELS . The challenging nature of image/video generation has led to a proliferation of conditional models . Although cGAN ( Mirza & Osindero , 2014 ) is a general framework , since then the methods developed for conditional generation differ substantially depending on the type of conditional data . We present below representative works of the two categories , i.e. , discrete and continuous conditional data , and their combination . Discrete conditional variable : This is most frequently used for class-conditional generation ( Miyato et al. , 2018 ; Brock et al. , 2019 ; Kaneko et al. , 2019 ) . Conditional normalization ( Dumoulin et al. , 2017 ; De Vries et al. , 2017 ) techniques have been popular in the case of discrete conditional input , e.g. , in generation of natural scenes images ( Miyato et al. , 2018 ; Brock et al. , 2019 ) . Conditional normalization can not trivially generalize to a continuous conditional variable . In AC-GAN ( Odena et al. , 2017 ) , they concatenate the class labels with the noise ; however , their model does not scale well ( i.e. , they train one model per 10 classes ) . The aforementioned methods can not be trivially used or modified for continuous conditional input . Text-to-image generation models ( Qiao et al. , 2019 ; Li et al. , 2019 ; Zhang et al. , 2018 ; Xu et al. , 2018 ) use a specialized branch to embed the text labels . Continuous conditional variable : The influential work of pix2pix ( Isola et al. , 2017 ) has become the reference point for continuous conditional input . The conditional input is embedded in a lowdimensional space ( with an encoder ) , and then mapped to a high-dimensional output ( through a decoder ) . The framework has been widely used for inverse tasks ( Ledig et al. , 2017 ; Pathak et al. , 2016 ; Wu et al. , 2017a ; Iizuka et al. , 2017 ; Huang et al. , 2017 ; Yu et al. , 2018a ; Grm et al. , 2019 ; Xie et al. , 2018 ; Yan & Wang , 2017 ) , conditional pose generation ( Ma et al. , 2017 ; Siarohin et al. , 2018 ; Liang et al. , 2019 ) , representation learning ( Tran et al. , 2017 ) , conditional video generation ( Wang et al. , 2018a ) , generation from semantic labels ( Wang et al. , 2018b ) , image blending ( Wu et al. , 2019 ; Zhan et al. , 2019 ) . We recognize two major drawbacks in the aforementioned methods : a ) they can not be easily adapted for discrete conditional input , b ) they learn a deterministic mapping , i.e. , the noise is typically ignored . However , in many real applications , such as inverse tasks , the mapping is not one-to-one ; there are multiple plausible outputs for every conditional input . The auxiliary losses used in such works , e.g. , ` 1 loss ( Isola et al. , 2017 ) , perceptual loss ( Ledig et al. , 2017 ) , are an additional drawback . Those losses both add hyper-parameters that require tuning and are domain-specific , thus it is challenging to transfer them to different domains or even different datasets . On the contrary , in our experiments , we do not use any additional loss . Discrete and continuous conditional variables : Few works combine both discrete and continuous conditional inputs ( Yu et al. , 2018b ; Xu et al. , 2017 ; Lu et al. , 2018 ) . However , these methods include significant engineering ( e.g. , multiple discriminators ( Xu et al. , 2017 ) , auxiliary losses ) , while often the generator learns to ignore the noise ( similarly to the continuous conditional input ) . Antipov et al . ( 2017 ) design a generator for face aging . The generator combines continuous with discrete variables ( age classes ) , however there is no Gaussian noise utilized , i.e. , a deterministic transformation is learned for each input face . InfoGAN ( Chen et al. , 2016 ) includes both discrete and continuous conditional variables . However , the authors explicitly mention that additional losses are required , otherwise the generator is ‘ free to ignore ’ the additional variables . The idea of Li et al . ( 2020 ) is most closely related to our work . They introduce a unifying framework for paired ( Isola et al. , 2017 ) and unpaired ( Zhu et al. , 2017a ) learning . However , their framework assumes a continuous conditional input , while ours can handle discrete conditional input ( e.g. , class labels ) . In addition , their method requires a pre-trained teacher generator , while ours consists of a single generator trained end-to-end . Diverse data generation : Conditional image generation often suffers from deterministic mappings , i.e. , the noise variable has often negligible or negative impact in the generator ( Zhu et al. , 2017b ; Isola et al. , 2017 ) . This has been tackled in the literature with additional loss terms and/or auxiliary network modules . A discussion of representative methods that tackle diverse generation is deferred to sec . I in the Appendix . In Table 1 the differences of the core techniques are summarized . Even though diverse generation is a significant task , we advocate that learning a generator does not ignore the input variables can be achieved without such additional loss terms . We highlight that diverse generation is a byproduct of MVP and not our main goal . Particularly , we believe that diverse images can be synthesized because the higher-order correlations of the input variables are captured effectively the proposed method .
This paper proposes a conditional generation framework (cGAN) that bridges the gap between discrete and continuous variable used in the generation. They do so by proposing a new network architecture that implements higher order multi variate polynomials (MVP). They show that MVP generalizes well to different types of conditional variables and has good expressivity even in the absence of activation functions.
SP:400ec44ff0b658f1acbd74ab8c710f88bea6f7dd
Transforming Recurrent Neural Networks with Attention and Fixed-point Equations
1 INTRODUCTION . Recurrent Neural Network , known as RNN , has been widely applied to various tasks in the last decade , such as Neural Machine Translation ( Kalchbrenner & Blunsom , 2013 ; Sutskever et al. , 2014 ) , Text Classification ( Zhou et al. , 2016 ) , Name Entity Recognition ( Zhang & Yang , 2018 ; Chiu & Nichols , 2016 ) , Machine Reading Comprehension ( Hermann et al. , 2015 ; Kadlec et al. , 2016 ) and Natural Language Inference ( Chen et al. , 2017 ; Wang et al. , 2017 ) . Models applied to these tasks are not the vanilla RNNs but two of their famous variants , Gated Recurrent Unit ( Cho et al. , 2014 ) , known as GRU , and Long Short Term Memory ( Hochreiter & Schmidhuber , 1997 ) , known as LSTM , in which gates play an important role . RNNs are hard to be computed parallelly . They are not bidirectional either , meaning that a word can not utilize the information of words coming after it . A general way to alleviate this problem is to reverse the input sequence and combine results given by two different RNN encoders with operations like concatenation and addition . However , Transformer ( Vaswani et al. , 2017 ) has provided a better solution . It is based on purely attention mechanism , which has been widely used in Neural Machine Translation since Bahdanau et al . ( 2014 ) . Models based on self-attention mechanism are mostly Transformer and its variants , such as Transformer-XL ( Dai et al. , 2019 ) , Universal Transformer ( Dehghani et al. , 2019 ) and Star-Transformer ( Guo et al. , 2019 ) . Compared with recurrent units such as GRU and LSTM , self-attention-style models can be computed parallelly , which means they suit better large-scale training . But each of these Transformers has an FFN layer with a very high vector dimension , which still is the bottleneck to improve the computation efficency . In this paper , we present a new framework based on Banach Fixed-point Theorem to transform the vanilla RNN and its variants with self-attention mechanism . StarSaber , one of such transformed models , outperforms both the vanilla Transformer and ReZero ( Bachlechner et al. , 2020 ) in our experiments with less parameters and thus less computational power . To start with , we need a different view of attention . Attention is a way to build a relation graph between words , and the vanilla RNN is nothing but a model with a relation graph as a chain . This graph is in fact represented with an adjacent matrix , which is computed by mapping each pair of positions to a positive real number and normalizing the numbers related to each position , which are just those in the same row of the adjacent matrix , so that they sum up to one . The vanilla RNN updates hidden states through a chain , that is , the hidden state for each position only depends on that in the previous position . However , if we have this relation graph , the hidden state for each position depends on hidden states for all other positions in a sequence . This is where we obtain equations . In our opinion , a bidirectional RNN is defined by some equations and Banach Fixed-point Theorem inspires us to iterate according to them . When we fix the number of iterations and specify distinct weights for each of them , a self-attention-style model is then constructed . In Transformer , Position Embedding ( PE ) as a way to capture word order information in language by adding a matrix to the input , is indispensable . But in StarSaber , position encoding is done in the aggregation step after the construction of a relation graph . For each position , we sum up linear transformations of hidden states in all positions with the corresponding weights in the relation matrix in order to get an attention vector . In the calculation of such a vector , we specify different linear transformation weights for the ” future ” and the ” past ” . Then the hidden vector for a position is computed with the corresponding attention vector and an input vector , which turns into a direct path from the input layer to each hidden layer . And we directly drop the FFN layer in Transformer achieving still competive and even better results with much less parameters on three datasets provided by CLUE ( Xu et al. , 2020 ) : the AFQMC dataset of Sentence Similarity , the TNEWS dataset of Text Classification and the CMNLI dataset of Natural Language Inference . More importantly , our derivation of StarSaber shows a universal way to transform different RNNs , such as LSTM and GRU discussed in the following content , providing possibilities other than Transformers for self-attention models . 2 RELATED WORK . Gates were first introduced into recurrent networks in LSTM and were rediscovered and simplified in GRU . Gate mechanism is an operation that multiplies an output by a single sigmoid layer of the input and is often seen as an approach to address the gradient vanishing issue . But if only so , other approaches which addresses this problem should achieve similar results to LSTM and GRU . In this paper , we show by experiments that in StarSaber which doesn ’ t have such a problem , gates can also help improve the performance . Attention in sequence modeling is a weighted sum of the output in each position of a sequence , which simulates the way a man distributes his attention to all its parts . Weights in this sum are given by a certain function of some inputs . And self-attention is an approach computing both the weighted sum and weights on the same sequence without any other inputs . There are different types of attention like multi-head attention and scaled dot product attention in Transformer , attention based on addition in Bahdanau et al . ( 2014 ) , and bilinear attention in Luong et al . ( 2015 ) . Our model applies the bilinear attention in the construction of a word relation graph . Residual Connection was proposed by He et al . ( 2015 ) . It alleviates the problem of training deep neural networks . In Natural Language Processing , Residual Connection alleviates both the gradient vanishing problem and the degration problem of deep networks . Our model uses a weighted residual connection ( Bachlechner et al. , 2020 ) which further alleviates the degration problem . Another similar idea is the highway connection ( Srivastava et al. , 2015 ) . In this paper , we inspect the gate mechanism in our self-attention-style model . Note that the highway connection can also fit into our framework , which is a fixed-point generalization of GRU . Pretraining has proved to be extremely useful since Embeddings from Language Models ( ELMO ) ( Peters et al. , 2018 ) . Many works that follow such as BERT ( Devlin et al. , 2018 ) , ALBERT ( Lan et al. , 2020 ) , XLNET ( Yang et al. , 2019 ) have outperformed humans . Pretraining is a training pattern which trains a language model , usually extremely large , on an enormous dataset with one or more unsupervised tasks and fine-tunes it on other datasets and tasks . There are two types of language models in general , known as auto-regressive models ( e.g. , XLNET ) and auto-encoder ones ( e.g. , BERT ) . However , pretraining on a large dataset requires resources . We show in this paper that only pretraining on a dadtaset formed by collecting the training , development and test inputs together can as well improve the performance , revealing the significance of pretraining tasks . MLM is the unsupervised task utilized by BERT to pretrain . It randomly masks some pieces of a sentence and train the model to predict what has been masked . In this way , knowledge is gained and the model is initialized for downstream tasks . However , experiments show that even not pretrained on a large dataset , using MLM to pretrain on a dataset formed by collecting the training , development and test inputs can still improve the performance , inspiring us that a more flexible and task-related pretraining method is beneficial . 3 MODEL ARCHITECTURE . 3.1 RECURRENT NEURAL NETWORKS AND BIDIRECTIONAL EQUATIONS WITH SELF-ATTENTION . This section follows the intuition we have discussed before . The vanilla RNN formulas are listed below : hn = tanh ( Uhn−1 +Wxn ) ( 1 ) In self-attention , we don ’ t just utilize the hidden state from the previous position but hidden states from all positions , to compute a hidden vector for position n. To encode information of relative order , we specify distinct linear transformation weights . For simplicity , we ignore all bias terms in the following derivation . Following the bilinear self-attention mechanism , we have : hn = tanh ( An + V xn ) An = ∑ i < n GniU lefthi + ∑ i≥n GniU righthi 1 Gni = softmax ( g , −1 ) = gni∑ j gnj gni = exp ( hTnWhi√ d ) 2 ( 2 ) What we have done here is replacing hn−1 with an attention vector An . Notice a fact that in the first equality , h appears on both the left-hand side and the right-hand side ( we use h to compute An ) , turning it into an equation . This means a bidirectional model is defined by a set of equations , because the word relation graph constructed by attention is not free of loops . Moreover , introducing equations can be seen as a constraint to obtain stable representation of a sentence . Intuitively , if we view the non-linear function on the right hand side as an updating operation and the hidden vector we obtain in each position as a semantic representation , it simply means that when the model ” reads ” the whole sentence again based on the current understanding , it should produce the same representation , meaning that it has ” fully understands ” the whole sentence and makes no changes on the hidden vectors . 3.2 GENERALIZE EQUATIONS WITH FIXED-POINT . Now we have an equation to solve , which is extremely complex and difficult . But Banach Fixedpoint theorem shows us a way . Theorem 3.1 ( Banach Fixed-point Theorem ) For any real-valued function f ( x ) , if | dfdx | < 1 , then iteration process xn+1 = f ( xn ) converges and lim n→+∞ xn = x ∗ , where x∗ = f ( x∗ ) . 1If not stated , a sum without a limit is to sum over all possible values . 2All these U , V , Ws are matrices that satisfy rules of the matrix-vector product . The hyperparameter d here is the hidden size . The attention here is scaled for faster convergence . The equation above is an equation of an iterative pattern , and this Theorem just tells us that as long as we keep iterating , we will obtain a root of the equation if its jacobian matrix satisfies some conditions . The iterative pattern is given as follows : hl+1n = tanh ( A l n + V xn ) Aln = ∑ i < n GlniU lefthli + ∑ i≥n GlniU righthli Glni = softmax ( g l , −1 ) = g l ni∑ j glnj glni = exp ( ( hln ) TWhli√ d ) ( 3 ) We can then iterate till it converges . Similar ideas are in Bai et al . ( 2019 ) , where the authors solve the fixed-point directly with very high computational cost . Sometimes it can not even converge to a fixedpoint , since the convergence condition is quite strict . A sufficient condition for convergence is that all parameter matrices are strictly orthogonal , making the optimization problem hard . Therefore , if we want to obtain a faster and more stable model , we can approximate it with a Multi-layer Perceptron ( MLP ) and relax the condition of convergence . In addition , we allow our model to assign different weights for different layers . The reason why we don ’ t reuse parameters in each layer is that iterating with the same set of parameters without a constraint of orthogonality often diverges . Even if we fix the number of iterations , it is still hardly possible to converge to the correct fixed-point . In this case , specifying different weights for each layer allows our model to learn a better fit for the whole iteration process . Therefore , we have hl+1n = tanh ( A l n + V lxn ) Aln = ∑ i < n GlniU lhli + ∑ i≥n GlniQ lhli Glni = softmax ( g l , −1 ) = g l ni∑ j glnj glni = exp ( ( hln ) TW lhli√ d ) ( 4 ) Here we also need an initial point to start the iteration . In our model , we choose the input sequence itself to be the initial value , that is to set h0i = xi . In more general cases , the initial value may be a linear transformation of the input or just some fixed vector like a zero one .
This paper aims to incorporate the attention mechanism into recurrent neural networks by using fixed point equations. In particular, the authors define a bidirectional RNN with attention by a fixed point equation and then transform it to a variant of the Transformer block. The proposed model StarSaber is shown to be more parameter efficient than the Transformer model and achieve competitive performance on three CLUE datasets.
SP:66df8bc94a4e5e99341cd1ad491018cca6207ad9
Dissecting graph measures performance for node clustering in LFR parameter space
1 INTRODUCTION . Graph node clustering is one of the central tasks in graph structure analysis . It provides a partition of nodes into disjoint clusters , which are groups of nodes that are characterized by strong mutual connections . It can be of practical use for graphs representing real-life systems , such as social networks or industrial processes . Clustering allows to infer some information about the system : the nodes of the same cluster are highly similar , while the nodes of different clusters are dissimilar . The technique can be applied without any labeled data to extract important insights about a network . There are different approaches to clustering , including ones based on modularity optimization ( Newman & Girvan , 2004 ; Blondel et al. , 2008 ) , label propagation algorithm ( Raghavan et al. , 2007 ; Barber & Clark , 2009 ) , Markov cluster process ( Van Dongen , 2000 ; Enright et al. , 2002 ) , and spectral clustering ( Von Luxburg , 2007 ) . In this work , we use a different approach based on choosing a closeness measure on a graph , which allows one to use any metric clustering algorithm ( e.g. , Yen et al. , 2009 ) . The choice of the measure significantly affects the quality of clustering . Classical measures are the Shortest Path ( Buckley & Harary , 1990 ) and the Commute Time ( Göbel & Jagers , 1974 ) distances . The former is the minimum number of edges in a path between a given pair of nodes . The latter is the expected number of steps from one node to the other and back in a random walk on the graph . There is a number of other measures , including recent ones ( e.g. , Estrada & Silver , 2017 ; Jacobsen & Tien , 2018 ) , many of them are parametric . Despite the fact that graph measures are compatible with any metric algorithm , in this paper we restrict ourselves to the kernel k-means algorithm ( e.g. , Fouss et al. , 2016 ) . We base our research on a generated set of graphs . There are various algorithms to generate graphs with community structures . The well-known ones are the Stochastic Block Model ( Holland et al. , 1983 ) and Lancichinetti–Fortunato–Radicchi benchmark ( Lancichinetti et al. , 2008 ) ( hereafter , LFR ) . The first one is an extension of the Erdős–Rényi model with different intra- and intercluster probabilities of edge creation . The second one involves power law distributions of node degrees and community sizes . There are other generation models , e.g. , Naive Scale-free Clustering ( Pasta & Zaidi , 2017 ) . We choose the LFR model : although it misses some key properties of real graphs , like diameter or the clustering coefficient , this model has been proven to be effective in meta-learning ( Prokhorenkova , 2019 ) . There are a lot of measure benchmarking studies considering node classification and clustering for both generated graphs and real-world datasets ( Fouss et al. , 2012 ; Sommer et al. , 2016 ; 2017 ; Avrachenkov et al. , 2017 ; Ivashkin & Chebotarev , 2016 ; Guex et al. , 2018 ; 2019 ; Aynulin , 2019a ; b ; Courtain et al. , 2020 ; Leleux et al. , 2020 ) , etc . Despite a large number of experimental results , theoretical results are still a matter of the future . One of the most interesting theoretical results on graph measures is the work by Luxburg et al . ( 2010 ) , where some unattractive features of the Commute Time distance on large graphs were explained theoretically , and a reasonable amendment was proposed to fix the problem . Beyond the complexity of such proofs , there is still very little empirical understanding of what effects need to be proven . Our empirical work has two main differences from the previous ones . First , we consider a large number of graph measures , which for the first time gives a fairly complete picture . Second , unlike these studies concluding with a global leaderboard , we are looking for the leading measures for each set of the LFR parameters . We aim to explore the performance of of the 25 most popular measures in the graph clustering problem on a set of generated graphs with various parameters . We assess the quality of clustering with every considered measure and determine the best measure for every region of the graph parameter space . Our contributions are as follows : • We generate a dataset of ∼7500 graphs covering all parameter space of LFR generator ; • We consider a broad set of measures and rank measures by clustering performance on this dataset ; • We find the regions of certain measure leadership in the graph parameter space ; • We determine the graph features that are responsible for measure leadership ; • We check the applicability of the results on real-world graphs . Our framework for clustering with graph measures as well as a collected dataset are available on link_is_not_available_during_blind_review . 2 DEFINITIONS 2.1 KERNEL k-MEANS The original k-means algorithm ( Lloyd , 1982 ; MacQueen et al. , 1967 ) clusters objects in Euclidean space . It requires coordinates of the objects to determine the distances between them and centroids . The algorithm can be generalized to use the degree of closeness between the objects without defining a particular space . This technique is called the kernel trick , usually it is used to bring non-linearity to linear algorithms . The algorithm that uses the kernel trick is called kernel k-means ( see , e.g. , Fouss et al. , 2016 ) . For graph node clustering scenario , we can use graph measures as kernels for the kernel k-means . Initially , the number of clusters is known and we need to set initial state of centroids . The results of the clustering with k-means are very sensitive to it . Usually , the algorithm runs several times with different initial states ( trials ) and chooses the best trial . There are different approaches to the initialization ; we consider three of them : random data points , k-means++ ( Arthur & Vassilvitskii , 2006 ) , and random partition . We combine all these strategies to reduce the impact of the initialization strategy on the result . 2.2 CLOSENESS MEASURES . For a given graph G , V ( G ) is the set of its vertices and A is its adjacency matrix . A measure on G is a function κ : V ( G ) × V ( G ) → R , which gets two nodes and returns closeness ( bigger means closer ) or distance ( bigger means farther ) . A kernel on a graph is a graph nodes ’ closeness measure that has an inner product representation . Any symmetric positive semidefinite matrix is an inner product matrix ( also called Gram matrix ) . A kernel matrix K is a square matrix that contains similarities for all pairs of nodes in a graph . To use kernel k-means , we need kernels . Despite that not all closeness measures we consider are Gram matrices , we treat them as kernels . The applicability of this approach was confirmed in Fouss et al . ( 2016 ) . For the list of measures bellow , we use the word “ kernel ” only for the measures that satisfy the strict definition of kernel . Classical measures are Shortest Path distance ( Buckley & Harary , 1990 ) ( SP ) and Commute Time distance ( Göbel & Jagers , 1974 ) ( CT ) . SP is the minimum number of edges in a path between a given pair of nodes . CT is the expected lengths of random walks between two nodes . SP and CT are defined as distances , so we need to transform them into similarities to use as kernels . We apply the following distance to closeness transformation ( Chebotarev & Shamis , 1998a ; Borg & Groenen , 2005 ) : K = −HDH ; H = I − E/n , ( 1 ) where D is a distance matrix , E is the matrix of ones , I is the identity matrix , and n is the number of nodes . In this paper , we examine 25 graph measures ( or , more exactly , 25 parametric families of measures ) . We present these measures grouped by type similarly to ( Avrachenkov et al. , 2017 ) : • Adjacency Matrix A based kernels and measures . – Katz kernel : KKatzα = ( I − αA ) −1 , 0 < α < ρ−1 , where ρ is the spectral radius of A . ( Katz , 1953 ) ( also known as Walk proximity ( Chebotarev & Shamis , 1998b ) or von Neumann diffusion kernel ( Kandola et al. , 2003 ; Shawe-Taylor & Cristianini et al. , 2004 ) ) . – Communicability kernel KCommt = expm ( tA ) , t > 0 , where expm means matrix exponential ( Fouss et al. , 2006 ; Estrada & Hatano , 2007 ; 2008 ) . – Double Factorial closeness : KDFt = ∑inf k=0 tk k ! ! A k , t > 0 ( Estrada & Silver , 2017 ) . • Laplacian Matrix L = D − A based kernels and measures , where D = Diag ( A · 1 ) is the degree matrix of G , Diag ( x ) is the diagonal matrix with vector x on the main diagonal . – Forest kernel : KFort = ( I + tL ) −1 , t > 0 ( also known as Regularized Laplacian kernel ) ( Chebotarev & Shamis , 1995 ) . – Heat kernel : KHeatt = expm ( −tL ) , t > 0 ( Chung & Yau , 1998 ) . – Normalized Heat kernel : KNHeatt = expm ( −tL ) , L = D− 1 2LD− 1 2 , t > 0 ( Chung , 1997 ) . – Absorption kernel : KAbst = ( tA+ L ) −1 , t > 0 ( Jacobsen & Tien , 2018 ) . • Markov Matrix P = D−1A based kernels and measures . – Personalized PageRank closeness : KPPRα = ( I − αP ) −1 , 0 < α < 1 ( Page et al. , 1999 ) . – Modified Personalized PageRank : KMPPRα = ( I − αP ) −1D−1 = ( D − αA ) −1 , 0 < α < 1 ( Kirkland & Neumann , 2012 ) . – PageRank heat closeness : KHPRt = expm ( −t ( I − P ) ) , t > 0 ( Chung , 2007 ) . – Randomized Shortest Path distance . Using P and the matrix of the SP distances C first get Z ( Yen et al. , 2008 ) : W = P ◦ exp ( −βC ) ; Z = ( I −W ) −1 . ( 2 ) Then S = ( Z ( C ◦W ) Z ) ÷Z ; C̄ = S−e diag ( S ) T , and finally , DRSP = ( C̄+C̄T ) /2 . Here ◦ and ÷ are element-wise multiplication and division . Kernel version KRSP ( t ) can be obtained with equation 1 . – Free Energy distance . Using Z from equation 2 : Zh = Z Diag ( Z ) −1 ; Φ = −1/β logZh ; DFE = ( Φ + ΦT ) /2 ( Kivimäki et al. , 2014 ) . Kernel version KFE ( t ) can be obtained with equation 1 . • Sigmoid Commute Time kernels . – Sigmoid Commute Time kernel : KSCTt = σ ( −tKCT/std ( KCT ) ) , t > 0 , ( 3 ) where σ is an element-wise sigmoid function σ ( x ) = 1/ ( 1 + e−x ) ( Yen et al. , 2007 ) . Occasionally , element-wise logarithm is applied to the resulting kernel matrix ( Chebotarev , 2013 ; Ivashkin & Chebotarev , 2016 ) . We apply it to almost all investigated measures and consider the resulting measures separately from their plain versions ( see Table 1 ) . For some measures , like Forest kernel , this is well-known practice ( Chebotarev , 2013 ) , while for others , like Double Factorial closeness , this transformation , to the best of our knowledge , is applied for the first time . The considered measures and their short names are summarized in Table 1 .
The paper deals with the problem of community detection on graphs, examining the impact of graph measures. To do so, the paper proposes an experimental framework where clustering is achieved using the kernel k-means algorithm, and the performance of graph measures is examined on various instances of artificially generated graphs using the LFR benchmark. The overall approach is empirical, supported mainly by the experimental results. The main observations concern the consistent behavior of particular graph measures across multiple settings of the dataset.
SP:741bcead336d8cc7288ce82bca8028516280fff0
DynaTune: Dynamic Tensor Program Optimization in Deep Neural Network Compilation
1 INTRODUCTION . The enormous computational intensity of Deep Neural Network ( DNN ) models has attracted great interest in optimizing their performance . Popular deep learning ( DL ) frameworks such as PyTorch ( Paszke et al. , 2019 ) and TensorFlow ( Abadi et al. , 2016 ) adopt custom optimized kernels such as Intel MKL-DNN or Nvidia cuDNN ( Chetlur et al. , 2014 ) as back-end . However , given the increasing complexity of tensor operations in DNNs and the volatility of DL algorithms , it calls for developing fast and automated compilation frameworks to handle the unprecedented amount of innovations . To imitate or even exceed the success of hand-optimized libraries , recent research has developed neural network compilers , such as XLA ( Leary & Wang , 2017 ) , Glow ( Rotem et al. , 2018 ) , Tensor Comprehension ( Vasilache et al. , 2018 ) , and TVM ( Chen et al. , 2018a ) . Among them , TVM has shown superior performance improvements using a technique called Learning to Compile ( AutoTVM ) ( Chen et al. , 2018b ) . AutoTVM optimizes the code by generating many versions of a tensor operator and chooses the best through a learned cost model and search over a large space of code transformation choices . While the Learning to Compile approach produces highly optimized code of DNN models , it suffers from excessively long optimization time . As an example , although AutoTVM is able to demonstrate close to 2× performance improvement over TensorFlow on ResNet-18 , the optimization time can take several hours or even tens of hours ( Chen et al. , 2018b ) . The long optimization time hinders the turnaround time and even puts the practical utility of the current compiler-based solutions into question . Recent works strive to reduce the optimization time by improving the search strategy for the code transformation plan and lowering the hardware measurement cost ( Ahn et al. , 2020 ; Adams et al. , 2019 ) . However , these approaches mostly focus on accelerating the convergence speed of optimization at the individual tensor operator level ( e.g. , Conv2D , batched GEMM ) , which do not necessarily solve the issue of slow convergence and long optimization time of the entire model , often containing tens of tensor operators . Different from existing methods , we introduce DynaTune , a DL code optimization algorithm that minimizes the sum of the execution time of all operators in a model as much as possible and as ∗Both authors contributed equally . Order of appearance is random . quickly as possible . Specifically , the contributions of our paper consist of ( 1 ) a preliminary analysis that reveals the challenges and opportunities from existing DL code optimization strategies , ( 2 ) a time-slot-based optimization scheme , which simultaneously explores different operators and learns in an online manner that allows to dynamically switch to optimizing more promising tensors operators . ( 3 ) a Bayesian belief model that predicts future performance gains of operators , which helps make better decisions and expedites the convergence speed . ( 4 ) a detailed evaluation of the proposed algorithm with modern DNNs ( ResNet-18 , VGG , SqueezeNet , Transformer ) on both CPU and GPU . Compared with the leading framework , AutoTVM , DynaTune is 1.2–2.4× times faster to obtain the same levels of optimization . 2 BACKGROUND . DL compilation pipeline . A typical DL compiler contains multiple passes to optimize a model trained by popular DL frameworks such as TensorFlow ( Abadi et al. , 2016 ) , PyTorch ( Paszke et al. , 2019 ) , or MXNET ( Chen et al. , 2015 ) , as shown in Fig . 1 . In the first pass ( box with dotted line ) , the compiler frontend applies target-independent and white-box target-dependent optimizations that do not include a measure of actual execution time . The target-independent passes perform optimizations such as operator fusion and data layout transformation , and the white-box target-dependent optimizations apply heuristic rules for code transformation based on domain knowledge . Recent work such as AutoTVM ( Chen et al. , 2018b ) extends the pipeline with another pass , a black-box target-dependent pass , which uses learning machinery to perform optimizations . Black-box target-dependent pass . In this pass , the compiler converts code transformation decisions as code templates . A template contains knobs that control various aspects of the optimization ( e.g. , memory tiling , loop transformations , vectorization ) and determines whether the code ( 1 ) fully utilizes the internal parallelism within processors , ( 2 ) uses the shared memory wisely , and ( 3 ) maximizes data locality . Due to the large transformation space , the compiler makes use of an auto-tuner ( with an optimization algorithm ) and real hardware measurements to find the best transformation on target hardware ( e.g. , CPU , GPU , ARM , or IoT devices ) ( Chen et al. , 2018b ) . 3 CHALLENGES AND MOTIVATIONS . This section presents several studies that reveal the challenges of existing DL compilation that guided our design in Section 4 . Challenge 1 . Existing DL compilation focuses on accelerating the convergence speed of individual tensor operator instead of the entire model , resulting in slow convergence and long optimization time . Prior work ( Chen et al. , 2018a ; b ; Vasilache et al. , 2018 ; Ahn et al. , 2020 ) optimizes one tensor operator at a time in a predefined order ( e.g. , in declaration order ) . However , such an optimization strategy is not always appropriate in practice . For example , there is often an extreme performance difference ( e.g. , an order of magnitude ) between optimized and unoptimized operators . If we optimize operators sequentially , the overall model inference time stays high as long as there are still unoptimized operators . As a result , practitioners may need to wait until all tensor operators have finished optimization to get the desired latency , which results in long optimization time . With the active research that has been pushing the model size to millions or even billion-scale parameters with a training time of only a few hours or less than one hour ( Yamazaki et al. , 2019 ; Goyal et al. , 2017 ; You et al. , 2017 ; Lin et al. , 2019 ; Shoeybi et al. , 2019 ; You et al. , 2019 ) , it becomes even more prominent to reduce the inference optimization cost of the current solution . Furthermore , since major players in the industry have adopted many of these DL compilers ( Wu et al. , 2019a ; b ; Lattner et al. , 2020 ; Liu et al. , 2019 ) , fast convergence is desirable for many users of these pipelines to have a better control of the optimization cost and good performance . For example , deployment engineers may want to obtain an optimized model sooner or quickly get a latency upper-bound estimate of a model in development . Challenge 2 . Static scheduling has only a limited view of the tensor program and has difficulty taking advantage of the actual optimization behavior . We note that from an execution point of view , the optimization of tensor operators is independent of each other , so that we may optimize them in any order and even non-consecutively . As a result , dynamic optimization has a big advantage for iterative DL compilation : We can intelligently order the optimization sequence of operators ( i.e. , scheduling ) to accelerate the convergence of the optimization significantly . For example , it would be better to switch to optimizing another operator if we convincingly identify that the other operator has a higher potential . That being said , is it realistic to assume that all the information concerning optimizing the operators is available before the optimization even starts so that we can decide the schedule from the very beginning ? Our preliminary analysis indicates that the amount of computation of an operator ( known a priori ) has a very disproportionate impact on the optimization time and latency reduction . Fig . 2 shows that although operator 17 of VGG ( Simonyan & Zisserman , 2015 ) takes the longest time to optimize , it yields the least amount of latency reduction1 . Our further investigation shows that the underlying code transformation space is non-linear , as shown in Fig . 3 2 . As a result , the optimization behavior tends to change over time , which is hard to recognize and predict with static knowledge only . Challenge 3 . Even with dynamic information , it is not clear how to best extrapolate estimated performance . Given the optimization results , there is an incentive to adopt a ” predict-thenoptimize ” paradigm that builds a model to learn the correlation between the optimization cost and the observed optimization performance the model can be used to make predictions for potential performance gains . To identify the characteristics of the optimization behavior , we plot 16 optimization curves of best-found GFLOPS ( Giga Floating Point Operations Per Second ) in Fig . 4 to find patterns that can be used for designing a prediction model . We find that most curves ( 1 ) roughly follow an increasing curve with a diminishing return , ( 2 ) saturate towards an unknown final value , and ( 3 ) occasionally exhibit sudden jumps . The curve saturates to an unknown value because the performance can not exceed the hardware peak GFLOPS , which is 9.7-TFLOPS in our case . The curve has sudden jumps because the code transformation space has change points , as shown in Fig . 3 . By taking into account the curve information , we believe it has more opportunity to dynamically optimize operators that likely lead to greater performance improvements . 1The orange bar shows the amount of computation of each operator measured as the floating-point operations ( FLOPs ) , which can be calculated statically before the optimization starts , as described in Molchanov et al . ( 2017 ) . The “ optimization gain ” is calculated as the reduction of wall-clock time from each operator after optimization , and the “ optimization cost ” is calculated as the wall-clock time spent to obtain the optimized latency , both of which are normalized by the total latency reduction and optimization time . 2The figure shows the code transformation space of a Conv2D operator in ResNet-18 . In this case , the performance of this operator varies based on the tiling size along the input channel and output channel while having other knobs fixed . The knobs control various aspects of the optimization and its performance . A summary of the knobs can be found in Ahn et al . ( 2020 ) . 4 METHOD . In this section , we present our design for DynaTune . We illustrate the difference between the existing DL optimization ( Fig . 5 ) and the high-level design of DynaTune ( Fig . 6 ) . 4.1 DYNAMIC MULTI-TENSOR-OPERATOR OPTIMIZATION PROBLEM . In this paper , we take a view of accelerating the convergence speed of multi-tensor-operator optimization by first considering a Multi-Armed Bandits model for the problem . In particular , we partition time into some fixed-length time slots { 1 , 2 , ... , T } . Similar to MAB , we define an operator scheduler that operates in discrete time steps . At the beginning of any time slot t ∈ { 1 , 2 , ... , T } , the scheduler needs to choose an operator kt ∈ [ K ] for tuning in that slot . The scheduler then obtains a list of observations ( i.e. , best-found performance measured in GFLOPS ) Perfk ( t ·Lk : ( t+1 ) ·Lk ) of k , where Lk is the number of iterations an operator has been optimized . The remaining unchosen operators stay the same unless it is selected ( i.e. , rested arms ) . The latency reduction for k at time slot t is rt ( kt ) = op ( k ) Perfk [ t·Lk ] − op ( k ) Perfk [ ( t+1 ) ·Lk ] , where op ( k ) represents the number of floating point operations of k. We further define an optimal schedule , i.e. , π∗ = { k∗1 , ... , k∗t , ... k∗T } , where k∗t is the operator at step t one could have taken in hindsight ( after seeing all performance realizations ) that would yield the maximum latency reduction . The cumulative regret is then defined as : R ( T ) = ∑T t=1 ( rt ( k ∗ t ) − rt ( kt ) ) , where k∗t is the operator at step t one could have taken in hindsight ( after seeing all performance realizations ) that would yield the maximum latency reduction . The goal is therefore to design the scheduler , such that the cumulative regret is minimized . We call this a dynamic multi-tensor-operator optimization problem .
In this paper, the authors develop DynaTune which achieves faster convergence speed to optimize a DNN model when compared to the state-of-the-art DL compiler, AutoTVM. The key idea is a time-slot-based scheduling method based on UCB-type multi-armed bandit policy. At each time, the scheduler chooses an action to maximize the latency reduction. In practice, A Bayesian belief model via MCMC is used to capture current knowledge of the optimization results to predict future performance, which helps make better decisions and expedites the convergence speed. The idea of using MAB in DL compiler is very interesting. The numerical experiments also demonstrate clear advantage of the proposed DynaTune. My concerns are as follows.
SP:cd671e0b2ae21fbca75c90741ccd008fefdd76ec
GLUECode: A Benchmark for Source Code Machine Learning Models
1 INTRODUCTION . In recent years , there has been considerable interest in researching machine learning models on source code artifacts . Machine learning models have been used to address a variety of software engineering tasks , as the inherent rich structure of code has allowed machine learning researchers to explore new models and ideas . However , research has focused on single-purpose application models , targeting a single task each time while using varying source code representations and datasets . This impedes progress towards general-purpose machine learning models of code that can learn and reason across many tasks . In this work , we present GLUECode ( Global and Local Understanding Evaluation of Code ) , with the goal of measuring progress in source code modelling across a range of tasks that account for the diverse characteristics of software and require diverse reasoning capabilities over several thousands of software projects . As GLUE ( Wang et al. , 2018 ) and SuperGLUE ( Wang et al. , 2019 ) does for natural language , GLUECode highlights important aspects of reasoning about code : ( 1 ) since code in software is composed of multiple interacting entities , it includes tasks that leverage both local ( single method ) and global ( multiple inter-related methods , information beyond the local method ) reasoning to varying degrees . This is in contrast to most tasks and models that have been introduced so far that focus on local reasoning ; ( 2 ) since source code mixes structured and unstructured information , GLUECode tasks leverage both kinds of information , and ( 3 ) since the space of modelling choices is large , we provide several source code representations ranging from raw text to abstract syntax trees ( AST ) and graph representations , lowering the barrier to entry and ease of experimentation . The design space for source code models is extremely large and spans a wide range of source code representations . These range from the simplest ( software metrics and n-grams ) , to very complex that fully take advantage of the structure and semantics of source code ( such as graph-based representations ) . Even seemingly simple choices , such as how to preprocess identifiers , can be handled in many different ways and have disproportionate impact ( Karampatsis et al. , 2020 ) . GLUECode aims to provide a unified benchmark to explore this design space . We provide performance results on a set of baselines , ranging from simple neural architectures such as LSTMs and CNNs , to variants of pre-trained transformers . These models leverage purely local reasoning and limited amounts of structural information . We show that existing models perform well in a few tasks but fail to yield good results in others : In contrast to NLP , where ( pre-trained ) transformers outperform other models , we find that no single model of code consistently outperforms the others in all tasks . Finally , while models can be evaluated on any single task in the benchmark in isolation ( as the field is presently doing ) , a long-term goal of GLUECode is the creation of unified multi-task source code models that perform well across multiple tasks . A source code model that is jointly trained and can perform well on all the task in the benchmark would be a significant step towards more versatile models , that can , beyond the tasks they were trained , also adapt to downstream tasks , especially when there is not enough data . Given the performance of our baselines in the single-task scenario , defining a model that performs well across the board is thus very much an open problem . 2 THE GLUECODE BENCHMARK . Benchmarks are a common practice in machine learning and NLP , prominently featuring GLUE and SuperGLUE ( Wang et al. , 2018 ; 2019 ) among others . In the domain of machine learning on source code , several benchmarks have been proposed . However , in contrast to GLUECode , they consider relatively local contexts and do not incentivize non-local reasoning : Idbench looks at identifiers , ( Wainakh et al. , 2019 ) , BigCloneBench ( Svajlenko & Roy , 2015 ) and OJClone ( Mou et al. , 2016 ) at clone detection , and CodeSearchNet at a function-level text-to-code search ( Husain et al. , 2020 ) . Finally , COSET concerns classifying small programs by their functionality in 38 classes ( Wang & Christodorescu , 2019 ) , and CoNaLa is a line-level text-to-code generation benchmark ( Yin et al. , 2018 ) . In this section , we provide an overview of GLUECode . We first describe the software-specific characteristics that impact the choice of tasks , before detailing the dataset and the tasks involved . Details about other related benchmarks can be found in the Appendix D . 2.1 LOCAL VERSUS GLOBAL CONTEXT . Most existing machine learning models of source code work at the level of a single function or method . We call these local models , as they reason over the local context of a single software entity . This is in contrast to global models that reason over multiple software entities and scales . Global models are highly desirable since software systems are composed of multiple entities such as modules and functions , that communicate with each other . This composition of communicating entities dictates the behavior of a software system . For instance , a function may have a radically different behavior , depending on its arguments . Indeed , small local changes can manifest in large changes in behaviour in distant program locations . Only global models will be able to detect that . To push forward the state of the art , it is thus critical to focus on global models . Fully global models are currently out of reach but GLUECode incentivizes building models that feature some form of global reasoning , in addition to local reasoning . Existing work uses simplified projections of global representations : the GNN works of Allamanis et al . ( 2017 ; 2020 ) look solely at file-level tokens , syntax , data and control flow information . CocoGum ( Wang et al. , 2020 ) uses class context represented as abstracted UML diagrams . LambdaNet extracts type dependencies in JavaScript into a single graph ( Wei et al. , 2020 ) for a few mid-sized projects ( 500-10k lines of code ) , ignoring syntactic information , code comments , etc . Finally , Func2Vec ( DeFreez et al. , 2018 ) computes function embeddings over an interprocedural call graph , ignoring local syntax , function arguments , etc . An extended related work discussion can be found in Appendix D. Instead to reason over global contexts two limitations need to be overcome : First , time-consuming interprocedural static analyses need to be performed at scale . These require compiling projects and resolving all its dependencies . In GLUECode , we take a step towards this direction , by using the largest publicly available corpus of compilable Java code ( Sec . 2.3 ) . ( 2 ) Existing methods do not operate well on large and sparse inputs and thus representations are tailored to use only the necessary information . In GLUECode , we provide access to a variety of representations and propose a set of tasks that can not focus solely on local or global information ( Sec 2.2 ) . 2.2 FLEXIBILITY IN REPRESENTATIONS OF CODE . Representations of source code in machine learning are a central topic of research . Source code has a known rich structure , as it can be unambiguously parsed , while valuable information is present in identifiers , literals , and comments , which are unstructured . As a result , there has been sustained work in exploring architectures and representations that leverage the different structural aspects of software , ranging from treating software as a textual artifact , to tree and graph-based representations . These representations come with distinct trade-offs . Sequence-level models treating source code as text are simpler and easy to scale to large amounts of data , at the expense of obscuring the information obtained from distinct structural inter-relations in code . LSTM ( Zaremba & Sutskever , 2014 ) , CNN ( Allamanis et al. , 2016 ) and transformer ( Husain et al. , 2020 ; Kanade et al. , 2020 ; Feng et al. , 2020 ) based models for source code have been explored . Meanwhile , more structured models commonly learn from less data thanks to the provided structure , but are harder to scale as they require extensive pre-processing . Such models use a program ’ s abstract syntax tree ( AST ) in Tree-LSTMs ( Wei & Li , 2017 ) , tree-based CNNs ( Mou et al. , 2014 ) , or use linearized forms fed to sequence models ( LeClair et al. , 2019 ; Kim et al. , 2020 ) , or linearized as bags of AST paths ( Alon et al. , 2018c ; a ) . Graph representations have been used in conjunctions with GNNs ( Allamanis et al. , 2017 ; Brockschmidt et al. , 2018 ; Wei et al. , 2020 ) and have been recently combined with RNNs and ( relational ) transformers ( Hellendoorn et al. , 2019b ) . Yet , most of these works are evaluated on a single task , yielding limited insights on the tradeoffs of various representations and models . GLUECode ’ s goal is to ease experimentation across representation and modelling choices on a variety of local and global tasks . To achieve this , we provide several pre-processed representations at the level of source code files : raw text , tokenized code , abstract syntax trees , graph representations ( as in Allamanis et al . ( 2017 ) ) , and bags of AST paths as in Alon et al . ( 2018c ; a ) . For global context we provide project-level call graphs . Across all representations , source code entities ( methods and classes ) are identified via a Universally Unique Identifier ( UUID ) , and can be linked together . Appendix A provides details and examples . Modelling decisions have significant impact on the performance of models and many different representations are possible , especially when considering models that perform global reasoning . GLUECode tasks are defined as a mapping from the UUID of the entity of interest to its label . Researchers can build their own input representations based on how they want to solve GLUECode . This allows researchers to combine these preprocessed representations as they see fit . GLUECode provides an API to efficiently access these representations to define the model . We show examples of the representations in Appendix A . 2.3 DATA . Performing pre-processing at scale is very challenging and time consuming . To extract the representations and some of the labels for the tasks , we use a variety of tools . Some of these tools perform extensive static analyses , and for this reason they require code that is compilable . Automatically compiling large amounts of arbitrary code is surprisingly difficult , as some systems may have convoluted build processes , or depend on a large number of libraries that may need to be present at compile time . We restrict our scope to Java since it is a popular language , with a lot of mature projects , and extensive tool support . To ease this task , our starting point is the 50K-C dataset ( Martins et al. , 2018 ) , which is a set of 50,000 Java projects extracted from GitHub , that are compilable . Of the 50,000 projects in 50K-C , many are too small to represent realistic software projects , such as projects authored by students . This is why we restrict our scope to projects that have 50 or more Java files . This leaves us with 6,925 projects , of which we were able to compile ∼5,300 . These projects have a combined total of 371,492 class files , and 2,361,111 method declarations . Once the projects are compiled , we run additional tools to extract all the representations , and extract some of the labels that the tasks need . Note that the entire process took several months , which we thus spare other researchers—simply trying to compile ∼7,000 projects is a weeks-long endeavour . We provide additional data processing details in Appendix A .
The objective of this paper is to present a benchmark of code understanding tasks in the spirit of GLUE benchmarks in NLP. Towards this, it designs 5 Java language tasks: NPath complexity, operator prediction, method naming, completion of method calls, and null dereference prediction. An evaluation on some common neural architectures is performed.
SP:fff5b8e98a9909fb289cd1455d381df4b75f01fe
Testing Robustness Against Unforeseen Adversaries
1 INTRODUCTION . Neural networks perform well on many datasets ( He et al. , 2016 ) yet can be consistently fooled by minor adversarial distortions ( Goodfellow et al. , 2014 ) . The research community has responded by quantifying and developing adversarial defenses against such attacks ( Madry et al. , 2017 ) , but these defenses and metrics have two key limitations . First , the vast majority of existing defenses exclusively defend against and quantify robustness to Lp-constrained attacks ( Madry et al. , 2017 ; Cohen et al. , 2019 ; Raff et al. , 2019 ; Xie et al. , 2018 ) . Though real-world adversaries are not Lp constrained ( Gilmer et al. , 2018 ) and can attack with diverse distortions ( Brown et al. , 2017 ; Sharif et al. , 2019 ) , the literature largely ignores this and evaluates against the Lp adversaries already seen during training ( Madry et al. , 2017 ; Xie et al. , 2018 ) , resulting in optimistic robustness assessments . The attacks outside the Lp threat model that have been proposed ( Song et al. , 2018 ; Qiu et al. , 2019 ; Engstrom et al. , 2017 ; Evtimov et al. , 2017 ; Sharif et al. , 2016 ) are not intended for general defense evaluation and suffer from narrow dataset applicability , difficulty of optimization , or fragility of auxiliary generative models . Second , existing defenses assume that attacks are known in advance ( Goodfellow , 2019 ) and use knowledge of their explicit form during training ( Madry et al. , 2017 ) . In practice , adversaries can deploy unforeseen attacks not known to the defense creator . For example , online advertisers use attacks such as perturbed pixels in ads to defeat ad blockers trained only on the previous generation of ads in an ever-escalating arms race ( Tramèr et al. , 2018 ) . However , current evaluation setups implicitly assume that attacks encountered at test-time are the same as those seen at train-time , which is unrealistic . The reality that future attacks are unlike those encountered during training is akin to a train-test distribution mismatch—a problem studied outside of adversarial robustness ( Recht et al. , 2019 ; Hendrycks & Dietterich , 2019 ) —but now brought to the adversarial setting . The present work addresses these limitations by proposing an evaluation framework ImageNet-UA to measure robustness against unforeseen attacks . ImageNet-UA assesses a defense which may have been created with knowledge of the commonly used L∞ or L2 attacks with six diverse attacks ( four of which are novel ) distinct from L∞ or L2 . We intend these attacks to be used at test-time only and not during training . Performing well on ImageNet-UA thus demonstrates generalization to a diverse set of distortions not seen during defense creation . While ImageNet-UA does not provide an exhaustive guarantee over all conceivable attacks , it evaluates over a diverse unforeseen test distribution similar to those used successfully in other studies of distributional shift ( Rajpurkar et al. , 2018 ; Hendrycks & Dietterich , 2019 ; Recht et al. , 2019 ) . ImageNet-UA works for ImageNet models and can be easily used with our code available at https : //github.com/ anon-submission-2020/anon-submission-2020 . Designing ImageNet-UA requires new attacks that are strong and varied , since real-world attacks are diverse in structure . To meet this challenge , we contribute four novel and diverse adversarial attacks which are easily optimized . Our new attacks produce distortions with occlusions , spatial similarity , and simulated weather , all of which are absent in previous attacks . Performing well on ImageNet-UA thus demonstrates that a defense generalizes to a diverse set of distortions distinct from the commonly used L∞ or L2 . With ImageNet-UA , we show weaknesses in existing evaluation practices and defenses through a study of 8 attacks against 48 models adversarially trained on ImageNet-100 , a 100-class subset of ImageNet . While most adversarial robustness evaluations use only L∞ attacks , ImageNet-UA reveals that models with high L∞ attack robustness can remain susceptible to other attacks . Thus , L∞ evaluations are a narrow measure of robustness , even though much of the literature treats this evaluation as comprehensive ( Madry et al. , 2017 ; Qian & Wegman , 2019 ; Schott et al. , 2019 ; Zhang et al. , 2019 ) . We address this deficiency by using the novel attacks in ImageNet-UA to evaluate robustness to a more diverse set of unforeseen attacks . Our results demonstrate that L∞ adversarial training , the current state-of-the-art defense , has limited generalization to unforeseen adversaries , and is not easily improved by training against more attacks . This adds to the evidence that achieving robustness against a few train-time attacks is insufficient to impart robustness to unforeseen test-time attacks ( Jacobsen et al. , 2019 ; Jordan et al. , 2019 ; Tramèr & Boneh , 2019 ) . In summary , we propose the framework ImageNet-UA to measure robustness to a diverse set of attacks , made possible by our four new adversarial attacks . Since existing defenses scale poorly to multiple attacks ( Jordan et al. , 2019 ; Tramèr & Boneh , 2019 ) , finding defense techniques which generalize to unforeseen attacks is crucial to create robust models . We suggest ImageNet-UA as a way to measure progress towards this goal . 2 RELATED WORK . Adversarial robustness is notoriously difficult to correctly evaluate ( Papernot et al. , 2017 ; Athalye et al. , 2018a ) . To that end , Carlini et al . ( 2019a ) provide extensive guidance for sound adversarial robustness evaluation . By measuring attack success rates across several distortion sizes and using a broader threat model with diverse differentiable attacks , ImageNet-UA has several of their recommendations built-in , while greatly expanding the set of attacks over previous work on evaluation . We are only aware of a few prior works which evaluate on unforeseen attacks in specific limited circumstances . Wu et al . ( 2020 ) evaluate against physically-realizable attacks from Evtimov et al . ( 2017 ) and Sharif et al . ( 2016 ) , though this limits the threat model to occlusion attacks on narrow datasets . Outside of vision , Pierazzi et al . ( 2020 ) proposes constraining attacks by a more diverse set of problem-space constraints in diverse domains such as text and malware or source code generation ; however , even in this framework , analytically enumerating all such constraints is impossible . Within vision , prior attacks outside the Lp threat model exist , but they lack the general applicability and fast optimization of ours . Song et al . ( 2018 ) and Qiu et al . ( 2019 ) attack using variational autoencoders and StarGANs , respectively , resulting in weaker attacks which require simple image distributions suitable for VAEs and GANs . Engstrom et al . ( 2017 ) apply Euclidean transformations determined by brute-force search . Zhao et al . ( 2019 ) use perceptual color distances to align human perception and L2 perturbations . Evtimov et al . ( 2017 ) and Sharif et al . ( 2016 ) attack stop signs and face-recognition systems with carefully placed patches or modified eyeglass frames , requiring physical object creation and applying only to specific image types . 3 NEW ATTACKS FOR A BROADER THREAT MODEL . There are few diverse , easily optimizable , plug-and-play adversarial attacks in the current literature ; outside of Elastic ( Xiao et al. , 2018 ) , most are Lp attacks such as L∞ ( Goodfellow et al. , 2014 ) , L2 ( Szegedy et al. , 2013 ; Carlini & Wagner , 2017 ) , L1 ( Chen et al. , 2018 ) . We rectify this deficiency with four novel adversarial attacks : JPEG , Fog , Snow , and Gabor . Our attacks are differentiable and fast , while optimizing over enough parameters to be strong . We show example adversarial images in Figure 1 and compare stochastic and adversarial distortions in Figure 2 . Our novel attacks provide a range of test-time adversaries visually and semantically distinct from L∞ and L2 attacks . Namely , they cause distortions with large L∞ and L2 norm , but result in images that are perceptually close to the original . These attacks are intended as unforeseen attacks not used during training , allowing them to evaluate whether a defense can generalize from L∞ or L2 to a more varied set of distortions than current evaluations . Though our attacks are not exhaustive , performing well against them already demonstrates robustness to occlusion , spatial similarity , and simulated weather , which are absent from previous evaluations . Our attacks create an adversarial image x′ from a clean image x with true label y . Let model f map images to a softmax distribution , and let ` ( f ( x ) , y ) be the cross-entropy loss . Given a target class y′ 6= y , our attacks attempt to find a valid image x′ such that ( 1 ) the attacked image x′ is obtained by applying a distortion ( of size controlled by a parameter ε ) to x , and ( 2 ) the loss ` ( f ( x′ ) , y′ ) is minimized . An unforeseen adversarial attack is a white- or black-box adversarial attack unknown to the defense designer which does not change the true label of x according to an oracle or human . 3.1 FOUR NEW UNFORESEEN ATTACKS . JPEG . JPEG applies perturbations in a JPEG-encoded space of compressed images rather than raw pixel space . More precisely , JPEG compression is a linear transform JPEG which applies colorspace conversion , the discrete cosine transform , and then quantization . Our JPEG attack imposes the L∞-constraint ‖JPEG ( x ) − JPEG ( x′ ) ‖∞ ≤ ε on the attacked image x′ . We optimize z = JPEG ( x′ ) under this constraint to find an adversarial perturbation in the resulting frequency space . The perturbed frequency coefficients are quantized , and we then apply a right-inverse of JPEG to obtain the attacked image x′ in pixel space . We use ideas from Shin & Song ( 2017 ) to make this differentiable . The resulting attack is conspicuously distinct from Lp attacks . Fog . Fog simulates worst-case weather conditions . Robustness to adverse weather is a safety critical priority for autonomous vehicles , and Figure 2 shows Fog provides a more rigorous stress-test than stochastic fog ( Hendrycks & Dietterich , 2019 ) . Fog creates adversarial fog-like occlusions by adversarially optimizing parameters in the diamond-square algorithm ( Fournier et al. , 1982 ) typically used to render stochastic fog effects . This algorithm starts with random perturbations to the four corner pixels of the image . At step t , it iteratively perturbs pixels at the centers of squares and diamonds formed by those pixels perturbed at step t−1 . The perturbation of a step t pixel is the average of the neighboring step t−1 perturbations plus a parameter value which we adversarially optimize . We continue this process until all pixels have been perturbed ; the outcome is a fog-like distortion to the original image . Snow . Snow simulates snowfall with occlusions of randomly located small image regions representing snowflakes . Because the distortions caused by snowflakes are not differentiable in their locations , we instead place occlusions representing snowflakes at randomly chosen locations and orientations and adversarially optimize their intensities . This choice results in a fast , differentiable , and strong attack . Compared to synthetic stochastic snow ( Hendrycks & Dietterich , 2019 ) , our adversarial snow is faster and includes snowflakes at differing angles . Figure 2 shows adversarial snow exposes model weaknesses more effectively than the easier stochastic , average-case snow . Gabor . Gabor spatially occludes the image with visually diverse Gabor noise Lagae et al . ( 2009 ) . Gabor noise is a form of band-limited anisotropic procedural noise which convolves a parameter mask with a Gabor kernel which is a product of a Gaussian kernel and a harmonic kernel . We choose the Gabor kernel randomly and adversarially optimize the parameters of the mask starting from a sparse initialization . We apply spectral variance normalization ( Co et al. , 2019 ) to the resulting distortion and add it to the input image to create the attack .
This paper proposes four novel efficient adversarial attack methods beyond Lp threat models. Together with other two existing attack methods, these six attack methods combine as a framework to evaluate robustness of defenses against unforeseen attacks. In this framework, the novel measure is normalized with the performance of adversarial training. The experiments show that the Linf adversarially trained model may not lead to improvement of robustness against other threat models. It is expected that the framework could help test model robustness.
SP:b49b8d0d0ece60538ce7629c6affeefbcdaf2d3c
Regularization Shortcomings for Continual Learning
1 INTRODUCTION . Continual Learning is a sub-field of machine learning dealing with non-iid ( identically and independently distributed ) data French ( 1999 ) ; Lesort et al . ( 2019c ) . Its goal is to learn the global optima to an optimization problem where the data distribution changes through time . This is typically the case in databases that get regularly augmented with new data or when data is streamed to the algorithms with limited storage possibilities . Continual learning ( CL ) looks for alternative methods to the iid training to avoid the complete retraining with all data each time new data is available . CL algorithms propose different memory storage approaches to collect information from past learning experiences and learning algorithms to continue to learn with this memory and new data . In this paper , we propose to study the class-incremental setting with regularization based methods . The class-incremental setting consists of learning sets of classes incrementally . Each task is composed of new classes . As the training ends , the model should classify data from all classes correctly . Without task labels for inferences , the model needs to both learn the discrimination of intra-task classes and the trans-task classes discrimination ( i.e . distinctions between classes from different tasks ) . On the contrary , if the task label is available for inferences , only the discrimination of intra-task classes needs to be learned . The discrimination upon different tasks is given by the task label . Learning without access to task labels at test time is then much more complex since it needs to discriminate data that are not available at the same time in the data stream . In such setting , we would like to demonstrate that regularization does not help to learn the discrimination between tasks . For example , if a first task is to discriminate white cats vs black cats and the second is the same with dogs , a regularization based method does not provide the learning criteria to learn features to distinguish white dogs from white cats . We consider as regularization methods , those who aim at protecting important weights learned from past tasks without using a buffer of old data or any replay process . Those methods are widely used for continual learning Kirkpatrick et al . ( 2017 ) ; Zenke et al . ( 2017 ) ; Ritter et al . ( 2018 ) ; Schwarz et al . ( 2018 ) . In this paper , we show that in the classical setting of class-incremental tasks , this approach has theoretical limitations and can not be used alone . Indeed , it does not provide any learning criteria to distinguish classes from different tasks . Therefore , in practice , regularization algorithms need external information to make an inference in class-incremental settings . It is provided by the task label at test time . However , relying on the task label to make inferences is an important limitation for algorithms ’ autonomy , i.e . its capacity to run without external information , in most application scenarios . We believe this paper presents important results for a better understanding of CL which will help practitioners to choose the appropriate approach for practical settings . 2 RELATED WORKS . In continual learning , algorithms protect knowledge from catastrophic forgetting French ( 1999 ) by saving them into a memory . The memory should be able to incorporate new knowledge and protect existing knowledge from modification . In continual learning , we distinguish four types of memorization categories dynamic architecture Rusu et al . ( 2016 ) ; Li & Hoiem ( 2017 ) , rehearsal Chaudhry et al . ( 2019 ) ; Aljundi et al . ( 2019 ) ; Belouadah & Popescu ( 2018 ) ; Wu et al . ( 2019 ) ; Hou et al . ( 2019 ) ; Caccia et al . ( 2019 ) , generative replay Shin et al . ( 2017 ) ; Lesort et al . ( 2019a ) ; Wu et al . ( 2018 ) and regularization Kirkpatrick et al . ( 2017 ) ; Zenke et al . ( 2017 ) ; Ritter et al . ( 2018 ) ; Schwarz et al . ( 2018 ) . In this paper , we are interested in the capacity of making inferences without task labels at test time ( test task label ) . The task label t ( typically a simple integer ) is an abstract representation built to help continual algorithms to learn . It is designed to index the current task and notify if the task changes Lesort et al . ( 2019c ) . Dynamic architecture is a well-known method that needs the task label at test time for an inference . Indeed , since the inference path is different for different tasks , the task test label is needed to use the right path through the neural network Rusu et al . ( 2016 ) ; Li & Hoiem ( 2017 ) . Rehearsal and Generative Replay methods generally need the task label at training time but not for inferences Lesort et al . ( 2019a ; b ) . Finally , Regularization methods are often assumed as methods that need task labels only at training time . In this article , we show that in class-incremental settings , it is also necessary at test time . Test task labels have been used in many continual learning approaches , in particular in those referred to as “ multi-headed ” Lange et al . ( 2019 ) . However , the need for task labels for inferences makes algorithms unable to make autonomous predictions and therefore we believe that this requirement is not in the spirit of continual learning . Continual learning is about creating autonomous algorithms that can learn in dynamic environments Lesort et al . ( 2019c ) . 3 REGULARIZATION APPROACH . In this section , we present the formalism we use and we present the class-incremental learning problem with a regularization based approach . 3.1 FORMALISM . In this paper , we assume that the data stream is composed of N disjoint tasks learned sequentially one by one ( with N > = 2 ) . Task t is noted Tt and Dt is the associated dataset . The task label t is a simple integer indicating the task index . We refer to the full sequence of tasks as the continuum , noted CN . The dataset combining all data until task t is noted Ct . While learning task Tt , the algorithm has access to data from Dt only . We study a disjoint set of classification tasks where classes of each task only appear in this task and never again . We assume at least two classes per task ( otherwise a classifier can not learn ) . Let f be a function parametrized by θ that implement the neural network ’ s model . At each task t the model learn an optimal set of parameters θ∗t optimizing the task loss ` Dt ( · ) . Since we are in a continual learning setting , θ∗t should also be an optima for all tasks Tt′ , ∀t′ ∈ J0 , tK . We consider the class-incremental setting with no test task label . It means that an optima θ∗1 for T1 is a set of parameters which at test time will , for any data point x from D0 ∪ D1 , classify correctly without knowing if x comes from T0 or T1 . Therefore , in our continual learning setting , the loss to optimize when learning a given task t is augmented with a remembering loss : ` Ct ( f ( x ; θ ) , y ) = ` Dt ( f ( x ; θ ) , y ) + λΩ ( Ct−1 ) ( 1 ) where ` Ct ( . ) is the continual loss , ` Dt ( . ) is the current task loss , Ω ( Ct−1 ) is the remembering loss with Ct−1 represents past tasks , λ is the importance parameter . 3.2 PROBLEM . In continual learning , the regularization approach is to define Ω ( · ) as a regularization term to maintain knowledge fromCt−1 in the parameters θ such as while learning a new task Tt , f ( x ; θ∗t−1 ) ≈ f ( x ; θ ) , ∀x ∈ Ct−1 . In other words , it aims to keep ` Ct−1 ( f ( x ; θ ) , y ) low ∀x ∈ Ct−1 while learning Tt . The regularization term Ωt−1 act as a memory of θ∗t−1 . This memory term depends on the learned parameters θ∗t−1 , on ` Ct−1 the loss computed on Tt−1 and the current parameters θ. Ωt−1 memorizes the optimal state of the model at Tt−1 and generally the importance of each parameter with regard to the loss ` Ct−1 . We note ΩCt−1 the regularization term memorizing past tasks optimal parameters . When learning the task Tt , the loss to optimize is then : ` Ct ( f ( x ; θ ) , y ) = ` Dt ( f ( x ; θ ) , y ) + λΩCt−1 ( θ ∗ t−1 , ` Ct−1 , θ ) ( 2 ) Eq . 2 is similar to eq . 1 but in this case the function Ω ( · ) is a regularization term depending on past optimal parameters θ∗t−1 , loss on previous tasks ` Ct−1 and the vector of current model parameters θ only . It could be , for example , a matrix pondering weights importance in previous tasks Kirkpatrick et al . ( 2017 ) ; Ritter et al . ( 2018 ) ; Zenke et al . ( 2017 ) . 4 PROPOSITIONS . In this section , we present the proposition concerning the shortcomings of regularization methods in class-incremental settings . We first present definitions and lemmas to prepare for the proposition . 4.1 PRELIMINARY DEFINITION / LEMMA . Definition 1 . Linear separability Let S and S′ be two sets of points in an n-dimensional Euclidean space . S and S′ are linearly separable if there exists n+ 1 real numbers ω1 , ω2 , ... , ωn , k such that ∀x ∈ S , ∑n i=1 ωixi > k and ∀x ∈ S′ , ∑n i=1 ωixi < k where xi the ith component of x . This means that two classes are linearly separable in an embedded space if there exists a hyperplane separating both classes of data points . This property can also be written , ∀x ∈ S and ∀x′ ∈ S′ , ( q · x + q0 ) · ( q · x′ + q0 ) < 0 . With q = [ ω1 , ω2 , ... , ωn ] and q0 = −k respectively the normal vector and position vector of a hyperplane Q . In the case of learning a binary classification with linear model , the model is a hyperplane separating two dataset . As soon as this equation can be solved , then it is possible to define a function f ( x , θ ) and a loss ` ( . ) to learn a hyperplane that will separate S and S′ perfectly . Definition 2 . Interferences In machine learning , interferences are conflicts between two ( or more ) objective functions leading to prediction errors . There are interferences when optimizing one objective function degrades the optimization of , at least , another one . As such , optimizing one of the objective function increases the error on the other one . In continual learning , interferences happen often after a drift in the data distribution . The loss on previous data is increased with the optimization of the loss for the new data leading to interferences and catastrophic forgetting . Lemma 4.1 . ∀ ( S , S′ ) bounded set of discrete points in Rn and linearly separable by a hyperplane Q . For any algorithm , it is impossible to assess Q as a separation hyperplane without access to S′ set . The proof is in appendix B , but in an insightful way , for any bounded set of points S , there is a infinite number of linearly separable set of points . Thus , there exists an infinite number of potential separating hyperplanes . If the second set of points S′ is not known , then it is not possible to choose among the infinite number of potential separating hyperplane which one is a correct one . And even if one is chosen , there is no way to tell if it is better or not than another . In the context of machine learning , without an assessment criterion for a classification problem , it is not possible to learn a viable solution . Hence , we can not optimize the parameters . For binary classification , the Lemma 4.1 can be interpreted as : “ The decision boundary between two classes can not be assessed nor learned if there is no access to data from both simultaneously ” . Lemma 4.2 . ∀ ( S , S′ ) two bounded datasets not linearly separable . For any algorithm , it is impossible to assess a function g ( . ) as a projection of S and S′ into a space were they are linearly separable without access to S′ set . The proof is in appendix C , but in an insightful way , for any bounded set of points , there is an infinite number of projections of the initial set of point in a space where it could be linearly separable from another set of points . Then , If you don ’ t know the second set of points S′ you can not choose among the infinite number of potential projections which one is a good one . And if you ever choose one , you have no way to tell if it is better or not than another . In the context of binary classification , the previous lemma can be interpreted as : “ Two classes representation can not be disentangled if there is no access to data from both simultaneously ” . In those lemma , the concept of “ not having access to ” a certain dataset can both be applicable to not being able to sample data point from the distributions and to not have a model of the dataset . It can be generalized to not having access to any representative data distribution of a dataset .
This paper presents a theoretical analysis of regularization based approaches to the problem of continually learning a sequence of tasks. The point of the paper is to demonstrate shortcomings of these kinds of approaches, in the context of class-incremental learning where classes are observed once and one after another. The authors argue that these kinds of methods require task labels at test time to correctly distinguish classes from different tasks.
SP:7d8d860da15b936e3976601cae537e18664c08e8
Beyond GNNs: A Sample Efficient Architecture for Graph Problems
1 INTRODUCTION . In recent years Graph Neural Networks ( GNNs ) have become the predominant paradigm for learning problems over graph structured data ( Hamilton et al. , 2017 ; Kipf & Welling , 2016 ; Veličković et al. , 2017 ) . Computation in GNNs is performed by each node sending and receiving messages along the edges of the graph , and aggregating messages from its neighbors to update its own embedding vector . After a few rounds of message passing , the computed node embeddings are aggregated to compute the final output ( Gilmer et al. , 2017 ) . The analogy to message passing leads to a simple and elegant architecture for learning functions on graphs . On the other hand , from a theoretical and practical perspective , we also need these architectures to be sample efficient , i.e. , learnable from a small number of training examples , where each training example corresponds to a graph . Recent works have shown that generalization in GNNs depends upon the depth of the architecture , i.e. , the number of rounds of message passing , as well as the embedding size for each node in the graph ( Garg et al. , 2020 ) . However , this requirement is in fundamental conflict with the message passing framework . In particular , using GNNs to compute several fundamental graph problems such as shortest paths , minimum spanning tree , min cut etc. , necessarily requires the product of the depth of the GNN and the embedding size to scale as √ n where n is the size of the graph ( Loukas , 2020 ) . This in turn places a significant statistical burden when learning these fundamental problems on large scale graphs . The above raises the the following question : Can one develop sample efficient architectures for graph problems while retaining the simplicity of the message passing framework ? Several recent works have tried to address the above question by proposing extensions to the basic GNN framework by augmenting various pooling operations in conjunction with message passing rounds to capture more global structure ( Ying et al. , 2018 ; Simonovsky & Komodakis , 2017 ; Fey et al. , 2018 ) . While these works demonstrate an empirical advantage over GNNs , we currently do not know of a general neural architecture that is versatile enough to provably encode the solution space of a variety of graph problems such as shortest paths and minimum spanning trees , while being significantly superior to GNNs in terms of statistical efficiency . In this work we propose a theoretically principled architecture , called GNN+ networks for learning graph problems . While the basic GNN framework is inspired from classical message passing style models studied in distributed computing , we borrow from two fundamental paradigms in graph algorithm design namely , sketching and parallel computation , to design GNN+ networks . As a result of combining these two powerful paradigms , we get a new neural architecture that simultaneously achieve low depth and low embedding size for many fundamental graph problems . As a result our proposed GNN+ architecture have a significantly smaller number of parameters that provably leads to better statistical efficiency than GNNs . Before we present our improved architecture , we briefly describe the standard GNN framework . Model for GNNs . In this work we will study GNNs that fall within the message passing framework and using notation from previous works we denote such networks as GNNmp ( Loukas , 2020 ) . A GNNmp network operates in the AGGREGATE and COMBINE model ( Gilmer et al. , 2017 ) that captures many popular variants such as GraphSAGE , Graph Convolutional Networks ( GCNs ) and GIN networks ( Hamilton et al. , 2017 ; Kipf & Welling , 2016 ; Xu et al. , 2019a ) . Given a graph G = ( V , E ) , let x ( k ) i denote the feature representation of node i at layer k. Then we have a ( k−1 ) i = AGGREGATE ( { x ( k−1 ) j : j ∈ N ( i ) } ) ( 1 ) x ( k ) i = COMBINE ( x ( k−1 ) i , a ( k−1 ) i ) . ( 2 ) Here N ( i ) is the set of neighbors for node i . Typically the aggregation and combination is performed via simple one or two layer full connected networks ( FNNs ) , also known as multi layer perceptrons ( MLPs ) . In the rest of the paper we will use the two terms interchangeably . GNN+ Networks . Our proposed GNN+ networks consist of one or more layers of a GNN+ block shown in Figure 1 . The GNN+ block comprises of r parallel GNNmp networks follows by s parallel fully connected network modules for pooling where r and s are the hyperparameters of the architecture . More importantly we restrict the r GNNmp modules to share the same set of weights . Hence the parallel GNNmp modules only differ in the way the node embeddings are initialized . Furthermore , we restrict each GNNmp to be of low depth . In particular , for degree-d graphs of diameter D , over n nodes , we will restrict the GNNmp to be of depth O ( ( d + D ) · polylog ( n ) ) . Similarly , we require the s fully connected networks to be of depth O ( ( d + D ) · polylog ( n ) ) and share the network weights . We connect the outputs of the GNNmp modules to the fully connected pooling networks in a sparse manner and restrict the input size of each fully connected network to be O ( ( d + D ) · polylog ( n ) ) . Stacking up L layers of GNN+ blocks results in a GNN+ network that is highly parameter efficient and in total has O ( ( d + D ) L · polylog ( n ) ) parameters . For such a network we call the depth as the total number of message passing rounds and the number of MLP layers used across all the L stacks . Since we restrict our MLPs and GNNmp blocks inside a GNN+ network to be of low depth , we will often abuse notation and refer to a GNN+ architecture with L stacks of GNN+ blocks as a depth L architecture . Our proposed design lets us alternate between local computations involving multiple parallel GNN blocks and global post-processing stages , while still being sample efficient due to the enforced parameter sharing . We will show via several applications that optimal or near-optimal solutions to many popular graph problems can indeed be computed via a GNN+ architecture . Below we briefly summarize our main results . Overview of Results . To demonstrate the generality of our proposed GNN+ architecture , we study several fundamental graph problems and show how to construct efficient GNN+ networks to compute optimal or near optimal solutions to these problems . In particular , we will focus on degree-d graphs , i.e. , graphs of maximum node degree d , with n nodes and diameter D and will construct GNN+ networks of depth polylog ( n ) and O ( ( D + d ) polylog ( n ) ) total parameters . Shortest Paths . The first problem we consider is the fundamental graph problem of computing ( approximate ) all pairs shortest paths in undirected graphs . Given a graph G = ( V , E ) , let dG ( u , v ) be the shortest path between nodes u and v. We say that an output { d̃G ( u , v ) : u , v ∈ V } is an α-approximate solution if for all u 6= v it holds that dG ( u , v ) ≤ d̃G ( u , v ) ≤ αdG ( u , v ) . We construct efficient GNN+ networks for all pairs shortest paths with the following guarantee . Theorem 1 ( Informal Theorem ) . For any constant c > 1 , there is a depth O ( D log d+ log n ) GNN+ network with O ( ( n 2 c + d ) polylog ( n ) ) parameters that computes ( 4c − 2 ) -approximate all pairs shortest paths in the undirected unweighted degree-d graphs over n nodes . On the other hand , computing a c-approximate shortest paths using GNNmp networks requires a network of depth Ω ( n ) . From the above theorem we see that by setting c = O ( log n ) we can encode a c-approximate solution using an O ( D log d+ log n ) GNN+ network with only O ( d ·polylog ( n ) ) parameters . This is in stark contrast with the depth requirement of Ω ( n ) for the traditional GNNmp networks . Connectivity Measures . Next we consider computing various graph connectivity measures . We first study the popular measure based on graph effective resistances ( Chandra et al. , 1996 ) . Definition 1 ( Effective Resistance ) . Let G be a weighted undirected graph G with adjacency matrix A and the associated Laplacian L = D − A . Given an edge u , v , the effective resistance between u , v is defined as Ru , v = ξ > u , vL †ξu , v . Here ξu , v is an n dimensional vector with +1 at position u , −1 at position v and zeros everywhere . L† refers to the matrix pseudo-inverse . We also study the following connectivity measure that was proposed by Panigrahy et al . ( 2012 ) in the context of web graphs . Given an undirected graph G , let Gp be the random graph obtained by sampling each edge with probability p. Definition 2 ( Affinity ) . For any two vertices u , v and for p ∈ [ 0 , 1 ] , define Ap ( u , v ) to be the probability that u , v are connected in Gp . Then the affinity between u and v is defined as A ( u , v ) = Ep [ Ap ( u , v ) ] where the expectation is taken over p drawn from the uniform distribution in [ 0 , 1 ] . For the above measures we show the following Theorem 2 ( Informal Theorem ) . There exists a GNN+ architecture with O ( D log ( nd ) ) parameters , and depth O ( D log ( nd ) ) on graphs of diameter D with n nodes and maximum degree d , that approximate the above connectivity measures up to constant factors . On the other hand using GNNmp networks to compute the above measures , even approximately , necessarily requires a network of depth Ω ( √ n ) . Clustering , Minimum Cuts and Minimum Spanning Trees . Finally , we showcase the power of a GNN+ architecture for computing other fundamental graph problems . Given an undirected graph G , the spectral clustering of G corresponds to the cut obtained by taking the sign of the eigenvector v corresponding to the second smallest eigenvalue λ2 ( L ) , where L is the graph Laplacian . For computing the spectral clustering via GNN+ networks we show the following Theorem 3 ( Informal Theorem ) . There is a GNN+ network of depth ` = O ( 1λ2 ( L ) 2 log n ) , with O ( d ) parameters that computes an -approximate spectral clustering on graphs of degree d. On the other hand , using GNNmp networks to even approximately compute the spectral clustering requires depth Ω ( √ n ) . Next we consider the classical problems of computing a global minimum cut and minimum spanning trees in undirected graphs . Theorem 4 ( Informal Theorem ) . There exist GNN+ networks of of depth O ( ( D+ log n ) log n ) , and O ( d ) parameters for computing a global minimum cut ( MINCUT ) and minimum spanning tree ( MST ) in degree d graphs of diameter D. Furthermore , using GNNmp networks to compute these primitives ( even approximately ) necessarily requires depth Ω ( √ n ) . Generalization Bounds . Our final result concerns the generalization properties of a depth L GNN+ architecture . For ease of exposition , we state here the results for the case when the GNN+ architecture produces a one dimensional output . More general results are presented in Appendix D. Our generalization bounds depend on the depth L and the total number of parameters P in the GNN+ network . Following recent work on providing generalization bounds for fully connected and convolutional neural networks ( Bartlett et al. , 2017 ; Long & Sedghi , 2020 ) that are based on distance to initialization , we consider the class Fβ of depth L GNN+ networks with P parameters that are at a distance β from a reference parameter configuration ( typically the parameters at random initialization ) . Let y ∈ R denote the output of the network and consider a Lipschitz loss function ` ( y , ŷ ) . Then , we provide following guarantee . Theorem 5 ( Informal Theorem ) . Let ` ( ŷ , y ) be a Lipschitz loss function bounded in [ 0 , B ] . Then , given m i.i.d . samples ( G1 , y1 ) , ( G2 , y2 ) , . . . ( Gm , ym ) generated from a distribution D , with probability at least 2/3 , it holds that for all f ∈ Fβ , ∣∣∣ÊD [ ` f ] − ED [ ` f ] ∣∣∣ ≤ O ( B√P ( β + L ) m ) . We refer the reader to Theorem 16 in Appendix D for a formal statement and the proof . Notice that the above theorem implies that our proposed GNN+ architecture for the above graph problems can indeed be trained using very few samples as opposed to the traditional GNNmp networks since the GNN+ network requires much fewer parameters and depth . Furthermore , since a GNNmp network is a special case of a GNN+ architecture , our analysis also leads to an improved bound on the generalization guarantees for GNNmp networks as well . In particular , the above theorem improves upon the recent work of Garg et al . ( 2020 ) that provides generalization guarantees for training GNNs that scale with the branching factor of the graph . Using our improved analysis we are able to remove this dependence on the branching factor . See Appendix D for details .
This paper proposes a new building block for GNNs, called GNN$^+$. This building block trades of depth for width and involves multiple parallel regular GNN processing units. Using the GNN$^+$ architecture, the authors establish bounds for the required network depth (and total parameters) for several combinatorial problems over graphs.
SP:dae92debea3e0d59d4b74385540ee6f827cfa37e
Variational Dynamic Mixtures
1 INTRODUCTION . Making sense of time series data is an important challenge in various domains , including ML for climate change . One important milestone to reach the climate goals is to significantly reduce the CO2 emissions from mobility ( Rogelj et al. , 2016 ) . Accurate forecasting models of typical driving behavior and of typical pollution levels over time can help both lawmakers and automotive engineers to develop solutions for cleaner mobility . In these applications , no accurate physical model of the entire dynamic system is known or available . Instead , data-driven models , specifically deep probabilistic time series models , can be used to solve the necessary tasks including forecasting . The dynamics in such data can be highly multi-modal . At any given part of the observed sequence , there might be multiple distinct continuations of the data that are plausible , but the average of these behaviors is unlikely , or even physically impossible . Consider for example a dataset of taxi trajectories1 . In each row of Fig . 1a , we have selected 50 routes from the dataset with similar starting behavior ( blue ) . Even though these routes are quite similar to each other in the first 10 way points , the continuations of the trajectories ( red ) can exhibit quite distinct behaviors and lead to points on any far edge of the map . The trajectories follow a few main traffic arteries , these could be considered the main modes of the data distribution . We would like to learn a generative model of the data , that based on some initial way points , can forecast plausible continuations for the trajectories . Many existing methods make restricting modeling assumptions such as Gaussianity to make learning tractable and efficient . But trying to capture the dynamics through unimodal distributions can lead either to “ over-generalization ” , ( i.e . putting probability mass in spurious regions ) or on focusing only on the dominant mode and thereby neglecting important structure of the data . Even neural approaches , with very flexible generative models can fail to fully capture this multi-modality because their capacity is often limited through the assumptions of their inference model . To address this , we develop variational dynamic mixtures ( VDM ) . Its generative process is a sequential latent variable model . The main novelty is a new multi-modal variational family which makes learning and inference multi-modal yet tractable . In summary , our contributions are • A new inference model . We establish a new type of variational family for variational inference of sequential latent variables . By successively marginalizing over previous latent states , the procedure can be efficiently carried-out in a single forward pass and induces a multi-modal posterior 1https : //www.kaggle.com/crailtap/taxi-trajectory approximation . We can see in Fig . 1b , that VDM trained on a dataset of taxi trajectories produces forecasts with the desired multi-modality while other methods overgeneralize . • An evaluation metric for multi-modal tasks . The negative log-likelihood measures predictive accuracy but neglects an important aspect of multi-modal forecasts – sample diversity . In Section 4 , we derive a score based on the Wasserstein distance ( Villani , 2008 ) which evaluates both sample quality and diversity . This metric complements our evaluation based on log-likelihoods . • An extensive empirical study . in Section 4 , we use VDM to study various datasets , including a synthetic data with four modes , a stochastic Lorenz attractor , the taxi trajectories , and a U.S. pollution dataset with the measurements of various pollutants over time . We illustrate VDM ’ s ability in modeling multi-modal dynamics , and provide quantitative comparisons to other methods showing that VDM compares favorably to previous work . 2 RELATED WORK . Neural recurrent models . Recurrent neural networks ( RNNs ) such as LSTMs ( Hochreiter & Schmidhuber , 1997 ) and GRUs ( Chung et al. , 2014 ) have proven successful on many time series modeling tasks . However , as deterministic models they can not capture uncertainties in their dynamic predictions . Stochastic RNNs make these sequence models non-deterministic ( Chung et al. , 2015 ; Fraccaro et al. , 2016 ; Gemici et al. , 2017 ; Li & Mandt , 2018 ) . For example , the variational recurrent neural network ( VRNN ) ( Chung et al. , 2015 ) enables multiple stochastic forecasts due to its stochastic transition dynamics . An extension of VRNN ( Goyal et al. , 2017 ) uses an auxiliary cost to alleviate the KL-vanishing problem . It improves on VRNN inference by forcing the latent variables to also be predictive of future observations . Another line of related methods rely on particle filtering ( Naesseth et al. , 2018 ; Le et al. , 2018 ; Hirt & Dellaportas , 2019 ) and in particular sequential Monte Carlo ( SMC ) to improve the evidence lower bound . In contrast , VDM adopts an explicitly multi-modal posterior approximation . Another SMC-based work ( Saeedi et al. , 2017 ) employs search-based techniques for multi-modality but is limited to models with finite discrete states . Recent works ( Schmidt & Hofmann , 2018 ; Schmidt et al. , 2019 ; Ziegler & Rush , 2019 ) use normalizing flows in the latent space to model the transition dynamics . A normalizing flow requires many layers to transform its base distribution into a truly multi-modal distribution in practice . In contrast , mixture density networks ( as used by VDM ) achieve multi-modality by mixing only one layer of neural networks . A task orthogonal to multi-modal inference is learning disentangled representations . Here too , mixture models are used ( Chen et al. , 2016 ; Li et al. , 2017 ) . These papers use discrete variables and a mutual information based term to disentangle different aspects of the data . VAE-like models ( Bhattacharyya et al. , 2018 ; 2019 ) and GAN-like models ( Sadeghian et al. , 2019 ; Kosaraju et al. , 2019 ) only have global , time independent latent variables . Yet , they show good results on various tasks , including forecasting . With a deterministic decoder , these models focus on average dynamics and don ’ t capture local details ( including multi-modal transitions ) very well . Sequential latent variable models are described next . Deep state-space models . Classical State-space models ( SSMs ) are popular due to their tractable inference and interpretable predictions . Similarly , deep SSMs with locally linear transition dynamics enjoy tractable inference ( Karl et al. , 2017 ; Fraccaro et al. , 2017 ; Rangapuram et al. , 2018 ; Becker et al. , 2019 ) . However , these models are often not expressive enough to capture complex ( or highly multi-modal ) dynamics . Nonlinear deep SSMs ( Krishnan et al. , 2017 ; Zheng et al. , 2017 ; Doerr et al. , 2018 ; De Brouwer et al. , 2019 ; Gedon et al. , 2020 ) are more flexible . Their inference is often no longer tractable and requires variational approximations . Unfortunately , in order for the inference model to be tractable , the variational approximations are often simplistic and don ’ t approximate multi-modal posteriors well with negative effects on the trained models . Multi-modality can be incorporated via additional discrete switching latent variables , such as recurrent switching linear dynamical systems ( Linderman et al. , 2017 ; Nassar et al. , 2018 ; Becker-Ehmck et al. , 2019 ) . However , these discrete states make inference more involved . 3 VARIATIONAL DYNAMIC MIXTURES . We develop VDM , a new sequential latent variable model for multi-modal dynamics . Given sequential observations x1 : T = ( x1 , . . . , xT ) , VDM assumes that the underlying dynamics are governed by latent states z1 : T = ( z1 , . . . , zT ) . We first present the generative process and the multi-modal inference model of VDM . We then derive a new variational objective that encourages multi-modal posterior approximations and we explain how it is regularized via hybrid-training . Finally , we introduce a new sampling method used in the inference procedure . Generative model . The generative process consists of a transition model and an emission model . The transition model p ( zt | z < t ) describes the temporal evolution of the latent states and the emission model p ( xt | z≤t ) maps the states to observations . We assume they are parameterized by two separate neural networks , the transition network φtra and the emission network φdec.To give the model the capacity to capture longer range temporal correlations we parametrize the transition model with a recurrent architecture φGRU ( Auger-Méthé et al. , 2016 ; Zheng et al. , 2017 ) such as a GRU ( Chung et al. , 2014 ) . The latent states zt are sampled recursively from zt | z < t ∼ N ( µ0 , t , σ20 , tI ) , where [ µ0 , t , σ20 , t ] = φtra ( ht−1 ) , ht−1 = φGRU ( zt−1 , ht−2 ) , ( 1 ) and are then decoded such that the observations can be sampled from the emission model , xt | z≤t ∼ N ( µx , t , σ2x , tI ) , where [ µx , t , σ2x , t ] = φdec ( zt , ht−1 ) . ( 2 ) This generative process is similar to ( Chung et al. , 2015 ) , though we did not incorporate autoregressive feedback due to its negative impact on long-term generation ( Ranzato et al. , 2016 ; Lamb et al. , 2016 ) . The competitive advantage of VDM comes from a more expressive inference model . Inference model . VDM is based on a new procedure for multi-modal inference . The main idea is that to approximate the posterior at time t , we can use the posterior approximation of the previous time step and exploit the generative model ’ s transition model φGRU . This leads to a sequential inference procedure . We first use the forward model to transform the approximate posterior at time t − 1 into a distribution at time t. In a second step , we use samples from the resulting transformed distribution and combine each sample with data evidence xt , where every sample parameterizes a Gaussian mixture component . As a result , we obtain a multi-modal posterior distribution that depends on data evidence , but also on the previous time step ’ s posterior . In more detail , for every zt , we define its corresponding recurrent state as the transformed random variable st = φGRU ( zt , ht−1 ) , using a deterministic hidden state ht−1 = E [ st−1 ] . The variational family of VDM is defined as follows : q ( z1 : T | x1 : T ) = T∏ t=1 q ( zt | x≤t ) = T∏ t=1 ∫ q ( zt | st−1 , xt ) q ( st−1 | x≤t ) dst−1 . ( 3 ) Chung et al . ( 2015 ) also use a sequential inference procedure , but without considering the distribution of st. Only a single sample is propagated through the recurrent network and all other information about the distribution of previous latent states z < t is lost . In contrast , VDM explicitly maintains st as part of the inference model . Through marginalization , the entire distribution is taken into account for inferring the next state zt . Beyond the factorization assumption and the marginal consistency constraint of Eq . ( 3 ) , the variational family of VDM needs two more choices to be fully specified ; First , one has to choose the parametrizations of q ( zt | st−1 , xt ) and q ( st−1 | x≤t ) and second , one has to choose a sampling method to approximate the marginalization in Eq . ( 3 ) . These choices determine the resulting factors q ( zt | x≤t ) of the variational family . We assume that the variational distribution of the recurrent state factorizes as q ( st−1 | x≤t ) = ω ( st−1 , xt ) q̃ ( st−1 | x < t ) , i.e . it is the distribution of the recurrent state given the past observation2 , re-weighted by a weighting function ω ( st−1 , xt ) which involves only the current observations . For VDM , we only need samples from q̃ ( st−1 | x < t ) , which are obtained by sampling from the previous posterior approximation q ( zt−1 | x < t ) and transforming the sample with the RNN , s ( i ) t−1 ∼ q̃ ( st−1 | x < t ) equiv . to s ( i ) t−1 = φ GRU ( z ( i ) t−1 , ht−2 ) , z ( i ) t−1 ∼ q ( zt−1 | x < t ) , ( 4 ) where i indexes the samples . The RNN φGRU has the same parameters as in the generative model . Augmenting the variational model with the recurrent state has another advantage ; approximating the marginalization in Eq . ( 3 ) with k samples from q ( st−1 | x≤t ) and choosing a Gaussian parametrization for q ( zt | st−1 , xt ) results in a q-distribution q ( zt | x≤t ) that resembles a mixture density network ( Bishop , 2006 ) , which is a convenient choice to model multi-modal distributions . q ( zt | x≤t ) = k∑ i ω ( i ) t N ( µ ( i ) z , t , σ ( i ) 2 z , t I ) , [ µ ( i ) z , t , σ ( i ) 2 z , t ] = φ inf ( s ( i ) t−1 , xt ) . ( 5 ) We assume q ( zt | st−1 , xt ) to be Gaussian and use an inference network φinf to model the effect of the observation xt and recurrent state st−1 on the mean and variance of the mixture components . The mixture weights ω ( i ) t : = ω ( s ( i ) t−1 , xt ) /k come from the variational distribution q ( st−1 | x≤t ) = ω ( st−1 , xt ) q̃ ( st−1 | x < t ) and importance sampling3 . We are free to choose how to parametrize the weights , as long as all variational distributions are properly normalized . Setting ω ( i ) t = ω ( s ( i ) t−1 , xt ) /k : = 1 ( i = argmax j p ( xt | ht−1 = s ( j ) t−1 ) ) , ( 6 ) achieves this . In Appendix A , we explain this choice with importance sampling and in Appendix H , we compare the performance of VDM under alternative variational choices for the weights . In the next time-step , plugging the variational distribution q ( zt | x≤t ) into Eq . ( 4 ) yields the next distribution over recurrent states q̃ ( st | x≤t ) . For this , the expected recurrent state ht−1 is required . 2q̃ ( st−1 | x < t ) is the distribution obtained by transforming the previous zt−1 ∼ q ( zt−1|x < t ) through the RNN . It can be expressed analytically using the Kronecker δ to compare whether the stochastic variable st−1 equals the output of the RNN : q̃ ( st−1 | x < t ) ∝ ∫ δ ( st−1 − φGRU ( zt−1 , ht−2 ) ) q ( zt−1 | xt−1 , λt−1 ) dzt−1 . 3the ω adjusts for using samples from q̃ ( st−1 | x < t ) when marginalizing over ω ( st−1 , xt ) q̃ ( st−1 | x < t ) We approximate the update using the same k samples ( and therefore the same weights ) as in Eq . ( 5 ) . ht−1 = E [ st−1 ] = ∫ st−1 q ( st−1 | x≤t ) dst−1 ≈ k∑ i ω ( i ) t s ( i ) t−1 . ( 7 ) A schematic view of the generative and inference model of VDM is shown in Fig . 2 . In summary , the inference model of VDM alternates between Eqs . ( 4 ) to ( 7 ) . Latent states are sampled from the posterior approximation of the previous time-step and transformed by Eq . ( 4 ) into samples of the recurrent state of the RNN . These are then combined with the new observation xt to produce the next variational posterior Eq . ( 5 ) and the expected recurrent state is updated ( Eq . ( 7 ) ) . These are then used in Eq . ( 4 ) again . Approximating the marginalization in Eq . ( 3 ) with a single sample , recovers the inference model of VRNN ( Chung et al. , 2015 ) , and fails in modeling multi-modal dynamics as shown in Fig . 3 . In comparison , VDM ’ s approximate marginalization over the recurrent states with multiple samples succeeds in modeling multi-modal dynamics . Variational objective . We develop an objective to optimize the variational parameters of VDM φ = [ φtra , φdec , φGRU , φinf ] . The evidence lower bound ( ELBO ) at each time step is LELBO ( x≤t , φ ) : = 1 k k∑ i ω ( s ( i ) t−1 , xt ) Eq ( zt|s ( i ) t−1 , xt ) [ log p ( xt | zt , ht−1 = s ( i ) t−1 ) ] + 1 k k∑ i ω ( s ( i ) t−1 , xt ) Eq ( zt|s ( i ) t−1 , xt ) [ log p ( zt | ht−1 = s ( i ) t−1 ) q ( zt | s ( i ) t−1 , xt ) ] − 1 k k∑ i ω ( s ( i ) t−1 , xt ) [ logω ( s ( i ) t−1 , xt ) +C ] ( 8 ) Claim 1 . The ELBO in Eq . ( 8 ) is a lower bound on the log evidence log p ( xt | x < t ) , log p ( xt | x < t ) ≥ LELBO ( x≤t , φ ) , ( see proof in Appendix B ) . ( 9 ) In addition to the ELBO , the objective of VDM has two regularization terms , LVDM ( φ ) = T∑ t=1 Epdata [ −LELBO ( x≤t , φ ) − ω1Lpred ( x≤t , φ ) ] + ω2Ladv ( x≤t , φ ) . ( 10 ) In an ablation study in Appendix E , we compare the effect of including and excluding the regularization terms in the objective . VDM is competitive without these terms , but we got the strongest results by setting ω1,2 = 1 ( this is the only nonzero value we tried . This hyperparameter could be tuned even further . ) The first regularization term Lpred , encourages the variational posterior ( from the previous time step ) to produce samples that maximize the predictive likelihood , Lpred ( x≤t , φ ) = logEq ( st−1|x < t ) [ p ( xt | st−1 , x < t ) ] ≈ log 1 k k∑ i p ( xt | s ( i ) t−1 ) . ( 11 ) This regularization term is helpful to improve the prediction performance , since it depends on the predictive likelihood of samples , which isn ’ t involved in the ELBO . The second optional regularization term Ladv ( Eq . ( 12 ) ) is based on ideas from hybrid adversarial-likelihood training ( Grover et al. , 2018 ; Lucas et al. , 2019 ) . These training strategies have been developed for generative models of images to generate sharper samples while avoiding “ mode collapse ” . We adapt these ideas to generative models of dynamics . The adversarial term Ladv uses a forward KL-divergence , which enables “ quality-driven training ” to discourage probability mass in spurious areas . Ladv ( x≤t , φ ) = DKL ( p ( xt | x < t ) ‖pD ( xt | x < t ) ) = E [ log p ( xt | x < t ) − log pD ( xt | x < t ) ] ( 12 ) The expectation is taken w.r.t . p ( xt | x < t ) . The true predictive distribution pD ( xt | x < t ) is unknown . Instead , we can train the generator of a conditional GAN ( Mirza & Osindero , 2014 ) , while assuming an optimal discriminator . As a result , we optimize Eq . ( 12 ) in an adversarial manner , conditioning on x < t at each time step . Details about the discriminator are in Appendix G. Stochastic cubature approximation ( SCA ) . The variational family of VDM is defined by a number of modeling choices , including the factorization and marginal consistency assumptions of Eq . ( 3 ) , the parametrization of the transition and inference networks Eqs . ( 4 ) and ( 5 ) , and the choice of weighting function ω ( · ) . It is also sensitive to the choice of sampling method which we discuss here . In principle , we could use Monte-Carlo methods . However , for a relatively small number of samples k , Monte-Carlo methods don ’ t have a mechanism to control the quality of samples . We instead develop a semi-stochastic approach based on the cubature approximation ( Wan & Van Der Merwe , 2000 ; Wu et al. , 2006 ; Arasaratnam & Haykin , 2009 ) , which chooses samples more carefully . The cubature approximation proceeds by constructing k = 2d+1 so-called sigma points , which are optimally spread out on the d-dimensional Gaussian with the same mean and covariance as the distribution we need samples from . In SCA , the deterministic sigma points are infused with Gaussian noise to obtain stochastic sigma variables . A detailed derivation of SCA is in Appendix D. We use SCA for various reasons : First , it typically requires fewer samples than Monte-Carlo methods because the sigma points are carefully chosen to capture the first two moments of the underlying distribution . Second , it ensures a persistence of the mixture components ; when we resample , we sample another nearby point from the mixture component and not an entirely new location .
This paper introduces variational dynamic mixtures (VDM), a new variational family, and demonstrates that using VDM to model the approximate posterior in sequential latent variable models can better capture multi-modality in data. VDM includes a distribution over recurrent states in the inference model, such that a sampling-based marginalization of this distribution reduces the approximate posterior to a mixture model. Setting the weights such that only the most probable mixture component is selected allows other mixture components to capture other modes. The authors validate VDM on both synthetic and real multimodal datasets, which outperform baselines with respect to negative log-likelihood and a new empirical Wasserstein distance.
SP:ab6c0eee6eebb90361fa87f9beeaf1722e4ec983
Private Split Inference of Deep Networks
Splitting network computations between the edge device and the cloud server is a promising approach for enabling low edge-compute and private inference of neural networks . Current methods for providing the privacy train the model to minimize information leakage for a given set of private attributes . In practice , however , the test queries might contain private attributes that are not foreseen during training . We propose an alternative solution , in which , instead of obfuscating the information corresponding to a set of attributes , the edge device discards the information irrelevant to the main task . To this end , the edge device runs the model up to a split layer determined based on its computational capacity and then removes the activation content that is in the null space of the next layer of the model before sending it to the server . It can further remove the low-energy components of the remaining signal to improve the privacy at the cost of reducing the accuracy . The experimental results show that our methods provide privacy while maintaining the accuracy and introducing only a small computational overhead . 1 INTRODUCTION . The surge in cloud computing and machine learning in recent years has led to the emergence of Machine Learning as a Service ( MLaaS ) , where the compute capacity of the cloud is used to analyze the data that lives on edge devices . One shortcoming of the MLaaS framework is the leakage of the clients ’ private data to the cloud server . To address this problem , several cryptographybased solutions have been proposed which provide provable security at the cost of increasing the communication cost and delay of remote inference by orders of magnitude ( Juvekar et al . ( 2018 ) ; Riazi et al . ( 2019 ) ) . The cryptography-based solutions are applicable in use-cases such as healthcare where a few minutes of delay is tolerable , but not in scenarios where millions of clients request fast and low-cost responses such as in Amazon Alexa or Apple Siri applications . A light-weight alternative to cryptographic solutions is to manually hide private information on the edge device ; For instance , sensitive information in an image can be blurred on the edge device before sending it to the service provider ( Vishwamitra et al . ( 2017 ) ) . This approach , however , is task-specific and may not be viable for generic applications . The objective of split inference framework , shown in Figure 1 , is to provide a generic and computationally efficient data obfuscation scheme ( Kang et al . ( 2017 ) ; Chi et al . ( 2018 ) ) . The service provider trains the model and splits it into two sub-models , M1 and M2 , where M1 contains the first few layers of the model and M2 contains the rest . The client runs M1 on the edge device and sends the resulting feature vector z =M1 ( x ) to the server , which computes the public label as ypub =M2 ( z ) . To preserve the privacy , the client desires z to only contain information related to the underlying task . For instance , when sending facial features for cell-phone authentication , the client does not want to disclose other information such as their mood . As seen in Figure 1 , the privacy leakage is quantified by an adversary that trains the model M3 to extract private label ypri from feature vector z . Current methods of private split inference aim to censor the information corresponding to a list of known private attributes . For example , Feutry et al . ( 2018 ) utilize adversarial training to minimize the accuracy of M3 on the private attribute , and Osia et al . ( 2018 ) minimize the mutual information between the query z and the private label ypri at training time . The set of private attributes , however , can vary from one query to another . Hence , it is not feasible to foresee all types of attributes that could be considered private for a specific MLaaS application . Moreover , the need to annotate inputs with all possible private attributes significantly increases the cost of model training . Figure 1 : Split inference setup . Client runs M1 locally and sends the features z = M1 ( x ) to the server . The server predicts the intended attribute as ypub = M2 ( z ) . An adversary trains a separate model M3 to predict the private attribute as ypri = M3 ( z ) . In this paper , we propose an alternative solution where , instead of censoring the information that is utilized to predict known private attributes , we discard the information that is not used by the main model for predicting the public attribute . Our contributions are summarized in the following . • We characterize the information that is not relevant to the prediction of the public attribute as part of the content of the feature vector z that will be removed by the server-side model . We then define the null content of the feature vector , zN , as the content in z that is in the null-space of the following linear layer . The remaining content is called signal content and is denoted by zS . We have M2 ( z ) =M2 ( zS + zN ) =M2 ( zS ) . • We propose to remove zN from features , z , and show that it reduces the accuracy of the adversary ( M3 ) , while maintaining the accuracy of the main model ( M2 ) . To further discard the private information in z , we propose to remove the low-energy components of zS , through which we achieve higher privacy ( lower accuracy of M3 ) at the cost of a small reduction in utility ( lower accuracy of M2 ) . • We show our methods provide tradeoffs between edge-computation efficiency , privacy , and accuracy . Specifically , with higher edge computation ( more layers on the edge device ) , the client achieves better privacy at the same accuracy . Also , with the same edge computation ( a given split layer ) , removing more components from the signal content provides better privacy at the cost of reduced accuracy . • We perform extensive experiments on several datasets and show that our methods provide better tradeoffs between accuracy and privacy compared to existing approaches such as adversarial training , despite having no knowledge of the private attribute at training or inference times . 2 BACKGROUND AND RELATED WORK . We consider the supervised learning setting of Figure 1 , where the model M2 ◦M1 is trained with a set of examples { xi } Ni=1 and their corresponding public labels { y pub i } Ni=1 . At inference phase , the client runs M1 on their data and sends the intermediate feature vector z =M1 ( x ) to the server . The goal of private inference is to ensure that z does not contain information about private attributes . 2.1 MEASURING PRIVACY . Several methods have been proposed to measure the privacy leakage of the feature vector . One approach is computing the mutual information between the query x and the feature vector z ( Kraskov et al . ( 2004 ) ) . In practice , measuring the mutual information is not tractable for high-dimensional random variables , unless certain assumptions are made about the probability distribution of the random variables of interest . A more practical approach measures privacy based on the reconstruction error , ||x̃− x|| , where x̃ is estimated based on z ( Mahendran & Vedaldi ( 2015 ) ) . Finally , attribute privacy is defined based on the accuracy of an adversary model that takes z as input and predicts the private label . In this paper , we use the attribute privacy notion as it applies to a wide range of applications . Assume each example { xi } Ni=1 has one or multiple private labels { y pri i } Ni=1 . The adversary trains a separate model M3 with ( zi , y pri i ) where zi = M1 ( xi ) , as shown in Figure 1 . Note that M3 is used as an aftermath process to evaluate the privacy of the model M2 ◦M1 . The split learning framework should achieve high utility , i.e. , the server should be able to infer the public attribute from z accurately , while providing privacy , i.e. , z should not contain information about ypri . We refer to the accuracy of M2 ◦M1 on ypub as public accuracy and the accuracy of M3 ◦M1 on ypri as private accuracy . 2.2 THREAT MODEL . Honest-but-curious server . The server performs the inference of the public attribute but will potentially try to extract private information from the features , z , as well . Client capabilities . Upon providing the service , the server also provides a profile of the utility ( accuracy on the public attributes ) , privacy ( accuracy on several private attributes ) , and computation of the edge device . The client then decides on the best tradeoff based on the computational resources and also the desired level of privacy . Such mechanisms are already in use in ML-on-the-edge applications . For example , in the application of unlocking the phone by face recognition , the client can specify the required precision in face recognition , where a lower precision will provide higher utility at the cost of lower security ( Chokkattu , 2019 ) . 2.3 RELATED WORK . Prior work has shown that the representations learned by deep neural networks can be used to extract private information ( Song & Shmatikov ( 2019 ) ) or even reconstruct the raw data ( Mahendran & Vedaldi ( 2015 ) ) . Current methods for private inference can be categorized as follows . Cryptography-based solutions . Since the server is not trusted , solutions based on public key encryption ( Al-Riyami & Paterson ( 2003 ) ) are not applicable . We consider scenarios where the server provides service to millions of users ( e.g. , in cases of Amazon Alexa or Apple Siri ) , and users expect low communication and fast response . Therefore , classic two-party cryptographic solutions for secure function evaluation ( Juvekar et al . ( 2018 ) ; Riazi et al . ( 2019 ) ) are also not applicable to our scenario . Noise Injection . A line of work suggests obfuscating private attributes by adding noise to the features , i.e. , instead of z , the client sends z + µ to the server , with the noise designed to maintain public accuracy while reducing private accuracy ( Mireshghallah et al . ( 2020 ) ) . While noise addition improves privacy , it has been shown to reduce the public accuracy significantly ( Liu et al . ( 2019 ) ) . Information Bottleneck . The notion of mutual information can be used to train private models . Let I ( a , b ) denote the mutual information between random variables a and b . The idea is to train M1 that maximizes I ( z , ypub ) while minimizing I ( z , ypri ) ( Osia et al . ( 2018 ) ; Moyer et al . ( 2018 ) ) . The optimization is formulated as follows : max M1 Ex , ypub , ypri [ I ( M1 ( x ) , ypub ) − γI ( M1 ( x ) , ypri ) − βI ( M1 ( x ) , x ) ] . ( 1 ) The use of mutual information for privacy , however , has been challenged by practical attacks that extract secret information even when I ( z , ypri ) is small ( Song & Shmatikov ( 2019 ) ) . Adversarial Training . This defense solves the following min-max optimization problem : max M1 , M2 min M3 Ex , ypub , ypri [ γL ( ypri , M3 ◦M1 ( x ) ) − L ( ypub , M2 ◦M1 ( x ) ) ] , ( 2 ) where L denotes the cross-entropy loss and γ is a scalar . The above objective can be achieved through adversarial training ( Edwards & Storkey ( 2016 ) ; Hamm ( 2017 ) ; Xie et al . ( 2017 ) ; Li et al . ( 2018 ) ; Feutry et al . ( 2018 ) ; Li et al . ( 2019 ) ) . At convergence , the trained M1 generates z such that M3 ( z ) is not an accurate estimation of ypri while M2 ( z ) accurately describes ypub . Existing methods for private split inference have several limitations . First , the underlying assumption in above learning-based defenses is that a set of private attributes along with the public label are provided at training time . In practice , however , it might not be feasible to foresee and identify all possible private attributes and annotate the training data accordingly . It also contradicts deployment at-scale since whenever a new private attribute is identified , the model M1 needs to be retrained and re-distributed to all edge devices that use the service . Second , current approaches for private inference often provide a poor tradeoff between accuracy and privacy . Moreover , the tradeoff of accuracy and privacy with the client-side computation is not well studied in the split learning framework . In this paper , we characterize this tradeoff and propose an alternative approach that , instead of obfuscating the information related to the private attributes , the edge device removes the feature content that is irrelevant to the public task . We empirically show our method successfully reduces the accuracy on private attributes at a small or no cost to public accuracy .
This paper tackles a timely problem of privacy leakage on the edge devices when applying deep neural networks. Instead of mitigating the leakage of a set of private attributes, the proposed method tries to remove the information irrelevant to the primary task. The proposed method does not need to identify the private attributes. The main contribution of this paper is the two proposed approaches for removing “null content” and “signal content.” The evaluations of the proposed approach are conducted on four image datasets.
SP:fd4240e0f2c6faa6783fe5e1d1e53d0d5f0945a0
Offline policy selection under Uncertainty
1 INTRODUCTION . Off-policy evaluation ( OPE ) ( Precup et al. , 2000 ) in the context of reinforcement learning ( RL ) is often motivated as a way to mitigate risk in practical applications where deploying a policy might incur significant cost or safety concerns ( Thomas et al. , 2015a ) . Indeed , by providing methods to estimate the value of a target policy solely from a static offline dataset of logged experience in the environment , OPE can help practitioners determine whether a target policy is or is not safe and worthwhile to deploy . Still , in many practical applications the ability to accurately estimate the online value of a specific policy is less of a concern than the ability to select or rank a set of policies ( one of which may be the currently deployed policy ) . This problem , related to but subtly different from OPE , is offline policy selection ( Doroudi et al. , 2017 ; Paine et al. , 2020 ; Kuzborskij et al. , 2020 ) , and it often arises in practice . For example , in recommendation systems , a practitioner may have a large number of policies trained offline using various hyperparameters , while cost and safety constraints only allow a few of those policies to be deployed as live experiments . Which policies should be chosen to form the small subset that will be evaluated online ? This and similar questions are closely related to OPE , and indeed , the original motivations for OPE were arguably with offline policy selection in mind ( Precup et al. , 2000 ; Jiang , 2017 ) , the idea being that one can use estimates of the value of a set of policies to rank and then select from this set . Accordingly , there is a rich literature of approaches for computing point estimates of the value of the policy ( Dudı́k et al. , 2011 ; Bottou et al. , 2013 ; Jiang & Li , 2015 ; Thomas & Brunskill , 2016 ; Nachum et al. , 2019 ; Zhang et al. , 2020 ; Uehara & Jiang , 2020 ; Kallus & Uehara , 2020 ; Yang et al. , 2020 ) . Because the offline dataset is finite and collected under a logging policy that may be different from the target policy , prior OPE methods also estimate high-confidence lower and upper bounds on a target policy ’ s value ( Thomas et al. , 2015a ; Kuzborskij et al. , 2020 ; Bottou et al. , 2013 ; Hanna et al. , 2016 ; Feng et al. , 2020 ; Dai et al. , 2020 ; Kostrikov & Nachum , 2020 ) . These existing approaches may be readily applied to our recommendation systems example , by using either mean or lower-confidence bound estimates on each candidate policy to rank the set and picking the top few to deploy online . However , this naı̈ve approach ignores crucial differences between the problem setting of OPE and the downstream evaluation criteria a practitioner prioritizes . For example , when choosing a few policies out of a large number of available policies , a recommendation systems practitioner may have a number of objectives in mind : The practitioner may strive to ensure that the policy with the overall highest groundtruth value is within the small subset of selected policies ( akin to top-k precision ) . Or , in scenarios where the practitioner is sensitive to large differences in achieved value , a more relevant downstream metric may be the difference between the largest groundtruth value within the k selected policies compared to the groundtruth of the best possible policy overall ( akin to top-k regret ) . With these or other potential offline policy selection metrics , it is far from obvious that ranking according to OPE estimates is ideal ( Doroudi et al. , 2017 ) . The diversity of potential downstream metrics in offline policy selection presents a challenge to any algorithm that yields a point estimate for each policy . Any one approach to computing point estimates will necessarily be sub-optimal for some policy selection criteria . To circumvent this challenge , we propose to compute a belief distribution over groundtruth values for each policy . Specifically , with the posteriors for the distribution over value for each policy calculated , one can use a straightforward procedure that takes estimation uncertainty into account to rank the policy candidates according to arbitrarily complicated downstream metrics . While this belief distribution approach to offline policy selection is attractive , it also presents its own challenge : how should one estimate a distribution over a policy ’ s value in the pure offline setting ? In this work , we propose Bayesian Distribution Correction Estimation ( BayesDICE ) for off-policy estimation of a belief distribution over a policy ’ s value . BayesDICE works by estimating posteriors over correction ratios for each state-action pair ( correcting for the distribution shift between the off-policy data and the target policy ’ s on-policy distribution ) . A belief distribution of the policy ’ s value may then be estimated by averaging these correction distributions over the offline dataset , weighted by rewards . In this way , BayesDICE builds on top of the state-of-the-art DICE point estimators ( Nachum et al. , 2019 ; Zhang et al. , 2020 ; Yang et al. , 2020 ) , while uniquely leveraging posterior regularization to satisfy chance constraints in a Markov decision process ( MDP ) . As a preliminary experiment , we show that BayesDICE is highly competitive to existing frequentist approaches when applied to confidence interval estimation . More importantly , we demonstrate BayesDICE ’ s application in offline policy selection under different utility measures on a variety of discrete and continuous RL tasks . Among other findings , our policy selection experiments suggest that , while the conventional wisdom focuses on using lower bound estimates to select policies ( due to safety concerns ) ( Kuzborskij et al. , 2020 ) , policy ranking based on the lower bound estimates does not always lead to lower ( top-k ) regret . Furthermore , when other metrics of policy selection are considered , such as top-k precision , being able to sample from the posterior enables significantly better policy selection than only having access to the mean or confidence bounds of the estimated policy values . 2 PRELIMINARIES . We consider an infinite-horizon Markov decision process ( MDP ) ( Puterman , 1994 ) denoted asM = 〈S , A , R , T , µ0 , γ〉 , which consists of a state space , an action space , a deterministic reward function,1 a transition probability function , an initial state distribution , and a discount factor γ ∈ ( 0 , 1 ] . In this setting , a policy π ( at|st ) interacts with the environment starting at s0 ∼ µ0 and receives a scalar reward rt = R ( st , at ) as the environment transitions into a new state st+1 ∼ T ( st , at ) at each timestep t. The value of a policy is defined as ρ ( π ) : = ( 1− γ ) Es0 , at , st [ ∑∞ t=0 γ trt ] . ( 1 ) 2.1 OFFLINE POLICY SELECTION . We formalize the offline policy selection problem as providing a ranking O ∈ Perm ( [ 1 , N ] ) over a set of candidate policies { πi } Ni=1 given only a fixed dataset D = { x ( j ) : = ( s ( j ) 0 , s ( j ) , a ( j ) , r ( j ) , s′ ( j ) ) } nj=1 where s ( j ) 0 ∼ µ0 , ( s ( j ) , a ( j ) ) ∼ dD are samples of an unknown distribution dD , r ( j ) = R ( s ( j ) , a ( j ) ) , and s′ ( j ) ∼ T ( s ( j ) , a ( j ) ) .2 One approach to the offline policy selection problem is to first characterize the value of each policy ( Eq . 1 , also known as the normalized per-step reward ) via OPE under some utility function u ( π ) that leverages a point estimate ( or 1For simplicity , we restrict our analysis to deterministic rewards , and extending our methods to stochastic reward scenarios is straightforward . 2This tuple-based representation of the dataset is for notational and theoretical convenience , following Dai et al . ( 2020 ) ; Kostrikov & Nachum ( 2020 ) , among others . In practice , the dataset is usually presented as finitelength trajectories { ( s ( j ) 0 , a ( j ) 0 , r ( j ) 0 , s ( j ) 1 , . . . ) } mj=1 , and this can be processed into a dataset of finite samples from µ0 and from dD ×R× T . For mathematical simplicity , we assume that the dataset is sampled i.i.d . This lower bound ) of the policy value ; i.e. , O ← ArgSortDescending ( { u ( πi ) } Ni=1 ) . 2.2 SELECTION EVALUATION . A proposed ranking O will eventually be evaluated according to how well its policy ordering aligns with the policies ’ groundtruth values . In this section , we elaborate on potential forms of this evaluation score . To this end , let us denote the groundtruth distribution of returns of policy πi by Z ( ·|πi ) . In other words , Z ( ·|πi ) is a distribution over R such that z ∼ Z ( ·|πi ) ≡ [ z : = ( 1− γ ) ∞∑ t=0 γt ·R ( st , at ) ; s0 ∼ µ0 , at ∼ πi ( st ) , st+1 ∼ T ( st , at ) ] . ( 2 ) Note that EZ ( ·|πi ) [ z ] = ρ ( πi ) . As part of the offline policy selection problem , we are given a ranking score S that is a function of a proposed ranking O and groundtruth policy statistics { Z ( ·|πi ) } Ni=1 . The ranking score S can take on many forms and is application specific ; e.g. , • top-k precision : This is an ordinal ranking score . The ranking score considers the top k policies in terms of groundtruth means ρ ( πi ) and returns the proportion of these which appear in the top k spots of O . • top-k accuracy : Another ordinal ranking score , this score considers the top-k policies in sorted order in terms of groundtruth means ρ ( πi ) and returns the proportion of these which appear in the same ordinal location in O . • top-k correlation : Another ordinal ranking score , this represents the Pearson correlation coefficient between the ranking of top-k policies in sorted order in terms of groundtruth means ρ ( πi ) and the truly best top-k policies . • top-k regret : This is a cardinal ranking score . This score respresents the difference in groundtruth means ρ ( πi ) between the overall best policy – i.e. , maxi ρ ( πi ) – and the best policy among the top-k ranked policies – i.e. , maxi∈ [ 1 , k ] ρ ( πO [ k ] ) . • Beyond expected return : One may define the above ranking scores in terms of statistics of Z ( ·|πi ) other than the groundtruth means ρ ( πi ) . For example , in safety-critical applications , one may be concerned with the variance of the policy return . Accordingly , one may define CVaR analogues to top-k precision and regret . For simplicity , we will restrict our attention to ranking scores which only depend on the average return of πi . To this end , we will use ρi as shorthand for ρ ( πi ) and assume that the ranking score S is a function of O and { ρi } Ni=1 .
This paper proposes a method BayesDICE to estimate posteriors over candidate policy values, which can be used for downstream policy selection. Specifically, the authors estimate the posteriors over the correction ratios for state-action pairs, which optimize a combined metric of a chance constraint from collected data and KL from the prior. Computationally, the authors demonstrate the advantages of their approach by having better performances in both coverage and power for policy evaluation and better downstream ranking with respect to different metrics for policy selection.
SP:0cb9035abb016fd549b5606e20e2229dace5033d
Regularization Matters in Policy Optimization - An Empirical Study on Continuous Control
1 INTRODUCTION . The use of regularization methods to prevent overfitting is a key technique in successfully training neural networks . Perhaps the most widely recognized regularization methods in deep learning are L2 regularization ( also known as weight decay ) and dropout ( Srivastava et al. , 2014 ) . These techniques are standard practices in supervised learning tasks across many domains . Major tasks in computer vision , e.g. , image classification ( Krizhevsky et al. , 2012 ; He et al. , 2016 ) , object detection ( Ren et al. , 2015 ; Redmon et al. , 2016 ) , use L2 regularization as a default option . In natural language processing , for example , the Transformer ( Vaswani et al. , 2017 ) uses dropout , and the popular BERT model ( Devlin et al. , 2018 ) uses L2 regularization . In fact , it is rare to see state-of-the-art neural models trained without regularization in a supervised setting . However , in deep reinforcement learning ( deep RL ) , those conventional regularization methods are largely absent or underutilized in past research , possibly because in most cases we are maximizing the return on the same task as in training . In other words , there is no generalization gap from the training environment to the test environment ( Cobbe et al. , 2018 ) . Heretofore , researchers in deep RL have focused on high-level algorithm design and largely overlooked issues related to network training , including regularization . For popular policy optimization algorithms like Trust Region Policy Optimization ( TRPO ) ( Schulman et al. , 2015 ) , Proximal Policy Optimization ( PPO ) ( Schulman et al. , 2017 ) , and Soft Actor Critic ( SAC ) ( Haarnoja et al. , 2018 ) , conventional regularization methods were not considered . In popular codebases such as the OpenAI Baseline ( Dhariwal et al. , 2017 ) , L2 regularization and dropout were not incorporated . Instead , a commonly used regularization in RL is the entropy regularization which penalizes the high-certainty output from the policy network to encourage more exploration and prevent the agent from overfitting to certain actions . The entropy ∗Equal contribution regularization was first introduced by ( Williams & Peng , 1991 ) and now used by many contemporary algorithms ( Mnih et al. , 2016 ; Schulman et al. , 2017 ; Teh et al. , 2017 ; Farebrother et al. , 2018 ) . In this work , we take an empirical approach to assess the conventional paradigm which omits common regularization when learning deep RL models . We study agent performance on current task ( the environment which the agent is trained on ) , rather than its generalization ability to different environments as in many recent works ( Zhao et al. , 2019 ; Farebrother et al. , 2018 ; Cobbe et al. , 2018 ) . We specifically focus our study on policy optimization methods , which are becoming increasingly popular and have achieved top performance on various tasks . We evaluate four popular policy optimization algorithms , namely SAC , PPO , TRPO , and the synchronous version of Advantage Actor Critic ( A2C ) , on multiple continuous control tasks . Various conventional regularization techniques are considered , including L2/L1 weight regularization , dropout , weight clipping ( Arjovsky et al. , 2017 ) and Batch Normalization ( BN ) ( Ioffe & Szegedy , 2015 ) . We compare the performance of these regularization techniques to that without regularization , as well as the entropy regularization . Surprisingly , even though the training and testing environments are the same , we find that many of the conventional regularization techniques , when imposed to the policy networks , can still bring up the performance , sometimes significantly . Among those regularizers , L2 regularization tends to be the most effective overall . L1 regularization and weight clipping can boost performance in many cases . Dropout and Batch Normalization tend to bring improvements only on off-policy algorithms . Additionally , all regularization methods tend to be more effective on more difficult tasks . We also verify our findings with a wide range of training hyperparameters and network sizes , and the result suggests that imposing proper regularization can sometimes save the effort of tuning other training hyperparameters . We further study which part of the policy optimization system should be regularized , and conclude that generally only regularizing the policy network suffices , as imposing regularization on value networks usually does not help . Finally we discuss and analyze possible reasons for some experimental observations . Our main contributions can be summarized as follows : • To our best knowledge , we provide the first systematic study of common regularization methods in policy optimization , which have been largely ignored in the deep RL literature . • We find conventional regularizers can be effective on continuous control tasks ( especially on harder ones ) with statistical significance , under randomly sampled training hyperparameters . Interestingly , simple regularizers ( L2 , L1 , weight clipping ) could perform better than entropy regularization , with L2 generally the best . BN and dropout can only help in off-policy algorithms . • We study which part of the network ( s ) should be regularized . The key lesson is to regularize the policy network but not the value network . • We analyze why regularization may help generalization in RL through sample complexity , return distribution , weight norm , and training noise robustness . 2 RELATED WORKS . Regularization in Deep RL . There have been many prior works studying the theory of regularization in policy optimization ( Farahmand et al. , 2009 ; Neu et al. , 2017 ; Zhang et al. , 2020 ) . In practice , conventional regularization methods have rarely been applied in deep RL . One rare case of such use is in Deep Deterministic Policy Gradient ( DDPG ) ( Lillicrap et al. , 2016 ) , where Batch Normalization is applied to all layers of the actor and some layers of the critic , and L2 regularization is applied to the critic . Some recent studies have developed more complicated regularization approaches to continuous control tasks . Cheng et al . ( 2019 ) regularizes the stochastic action distribution π ( a|s ) using a control prior and dynamically adjusts regularization weight based on the temporal difference ( TD ) error . Parisi et al . ( 2019 ) uses TD error regularization to penalize inaccurate value estimation and Generalized Advantage Estimation ( GAE ) ( Schulman et al. , 2016 ) regularization to penalize GAE variance . However , most of these regularizations are rather complicated ( Cheng et al. , 2019 ) or catered to certain algorithms ( Parisi et al. , 2019 ) . Also , these techniques consider regularizing the output of the network , while conventional methods mostly directly regularize the parameters . In this work , we focus on studying these simpler but under-utilized regularization methods . Generalization in Deep RL typically refers to how the model perform in a different environment from the one it is trained on . The generalization gap can come from different modes/levels/difficulties of a game ( Farebrother et al. , 2018 ) , simulation vs. real world ( Tobin et al. , 2017 ) , parameter variations ( Pattanaik et al. , 2018 ) , or different random seeds in environment generation ( Zhang et al. , 2018b ) . There are a number of methods designed to address this issue , e.g. , through training the agent over multiple domains/tasks ( Tobin et al. , 2017 ; Rajeswaran et al. , 2017 ) , adversarial training ( Tobin et al. , 2017 ) , designing model architectures ( Srouji et al. , 2018 ) , adaptive training ( Duan et al. , 2016 ) , etc . Meta RL ( Finn et al. , 2017 ; Gupta et al. , 2018 ; Al-Shedivat et al. , 2017 ) try to learn generalizable agents by training on many environments drawn from the same family/distribution . There are also some comprehensive studies on RL generalization with interesting findings ( Zhang et al. , 2018a ; b ; Zhao et al. , 2019 ; Packer et al. , 2018 ) , e.g. , algorithms performing better in training environment could perform worse with domain shift ( Zhao et al. , 2019 ) . Recently , several studies have investigated conventional regularization ’ s effect on generalization across tasks . ( Farebrother et al. , 2018 ) shows that in Deep Q-Networks ( DQN ) , L2 regularization and dropout are sometime beneficial when evaluated on the same Atari game with mode variations . ( Cobbe et al. , 2018 ) shows that L2 regularization , dropout , BN , and data augmentation can improve generalization performance , but to a less extent than entropy regularization and -greedy exploration . Different from those studies , we focus on regularization ’ s effect in the same environment , yet on which conventional regularizations are under-explored . 3 EXPERIMENTS . 3.1 SETTINGS . Regularization Methods . We study six regularization methods , namely , L2 and L1 weight regularization , weight clipping , Dropout ( Srivastava et al. , 2014 ) , Batch Normalization ( Ioffe & Szegedy , 2015 ) , and entropy regularization . See Appendix A for detailed introduction . Note that we consider entropy as a separate regularization method because it encourages exploration and helps to prevent premature convergence ( Mnih et al. , 2016 ) . In Appendix N , we show that in the presence of certain regularizers , adding entropy on top does not lead to significant performance difference . Algorithms . We evaluate regularization methods on four popular policy optimization algorithms , namely , A2C ( Mnih et al. , 2016 ) , TRPO ( Schulman et al. , 2015 ) , PPO ( Schulman et al. , 2017 ) , and SAC ( Haarnoja et al. , 2018 ) . The first three algorithms are on-policy while the last one is off-policy . For the first three algorithms , we adopt the code from OpenAI Baseline ( Dhariwal et al. , 2017 ) , and for SAC , we use the official implementation at ( Haarnoja , 2018 ) . Tasks . The algorithms with different regularizers are tested on nine continuous control tasks : Hopper , Walker , HalfCheetah , Ant , Humanoid , and HumanoidStandup from MuJoCo ( Todorov et al. , 2012 ) ; Humanoid , AtlasForwardWalk , and HumanoidFlagrun from RoboSchool ( OpenAI ) . Among the MuJoCo tasks , agents for Hopper , Walker , and HalfCheetah are easier to learn , while Ant , Humanoid , HumanoidStandup are relatively harder ( larger state-action space , more training examples ) . The three Roboschool tasks are even harder than the MuJoCo tasks as they require more timesteps to converge ( Klimov & Schulman , 2017 ) . To better understand how different regularization methods work on different difficulties , we roughly categorize the first three environments as “ easy ” tasks and the last six as “ hard ” tasks . Besides continuous control , we provide results on randomly sampled Atari environments ( Bellemare et al. , 2012 ) in Appendix S , which have discrete action space and different reward properties . Our observations are mostly similar to those on continuous control tasks . Training . On MuJoCo tasks , we keep all hyperparameters unchanged as in the codebase adopted . Since hyperparameters for the RoboSchool tasks are not included , we briefly tune the hyperparameters for each algorithm before we apply regularization ( details in Appendix D ) . For details on regularization strength tuning , please see Appendix C. The results shown in this section are obtained by only regularizing the policy network , and a further study on this will be presented in Section 5 . We run each experiment independently with five seeds , then use the average return over the last 100 episodes as the final result . Each regularization method is evaluated independently , with other regularizers turned off . We refer to the result without any regularization as the baseline . For BN and dropout , we use its training mode in updating the network , and test mode in sampling trajectories . During training , negligible computation overhead is induced when a regularizer is applied . Specifically , the increase in training time for BN is ∼ 10 % , dropout ∼ 5 % , while L2 , L1 , weight clipping , and entropy regularization are all < 1 % . We used up to 16 NVIDIA Titan Xp GPUs and 96 Intel Xeon E5-2667 CPUs , and all experiments take roughly 57 days with resources fully utilized . Additional Notes . 1 . Note that entropy regularization is still applicable for SAC , despite it already incorporates the maximization of entropy in the reward . In our experiments , we add the entropy regularization term to the policy loss function in equation ( 12 ) of ( Haarnoja et al. , 2018 ) . 2 . In our experiments , L2 regularization loss is added to the training loss , which is then optimized using Adam ( Kingma & Ba , 2015 ) . ( Loshchilov & Hutter , 2019 ) observes that L2 regularization interacts poorly with Adam and proposes AdamW to decouple weight decay from the optimization steps . However , in policy optimization algorithms , we find that the performance of AdamW with decoupled weight decay is slightly worse than the performance of Adam with L2 loss directly added . Comparisons are shown in Appendix O . 3 . Policy network dropout is not applicable to TRPO because during policy updates , different neurons in the old and new policy networks are dropped out , causing different shifts in the old and new action distributions given the same state , which violates the trust region constraint . In this case , the algorithm fails to perform any update from network initialization .
This paper conducts a comprehensive study on the effect of different regularization on Deep RL algorithms. Regularization has been mostly neglected in RL as most benefits were believed to be in generalization to unseen test environments in supervised learning settings. However, this paper shows that regularization does provide benefit even though training/testing is done on the same environment in deep RL settings.
SP:3d8801dc33baf1d1037f26f50be0da1001003cf3
Physics-aware Spatiotemporal Modules with Auxiliary Tasks for Meta-Learning
1 INTRODUCTION . Deep learning has recently shown promise to play a major role in devising new solutions to applications with natural phenomena , such as climate change ( Manepalli et al. , 2019 ; Drgona et al. , 2019 ) , ocean dynamics ( Cosne et al. , 2019 ) , air quality ( Soh et al. , 2018 ; Du et al. , 2018 ; Lin et al. , 2018 ) , and so on . Deep learning techniques inherently require a large amount of data for effective representation learning , so their performance is significantly degraded when there are only a limited number of observations . However , in many tasks in physical systems in the real-world we only have access to a limited amount of data . One example is air quality monitoring ( Berman , 2017 ) , in which the sensors are irregularly distributed over the space – many sensors are located in urban areas whereas there are much fewer sensors in vast rural areas . Another example is extreme weather modeling and forecasting , i.e. , temporally short events ( e.g. , tropical cyclones ( Racah et al. , 2017b ) ) without sufficient observations over time . Moreover , inevitable missing values from sensors ( Cao et al. , 2018 ; Tang et al. , 2019 ) further reduce the number of operating sensors and shorten the length of fullyobserved sequences . Thus , achieving robust performance from a few spatiotemporal observations in physical systems remains an essential but challenging problem . Learning on a limited amount of data from physical systems can be considered as a few shot learning . While recently many meta-learning techniques ( Schmidhuber , 1987 ; Andrychowicz et al. , 2016 ; Ravi & Larochelle , 2017 ; Santoro et al. , 2016 ; Snell et al. , 2017 ; Finn et al. , 2017 ) have been developed to address this few shot learning setting , there are still some challenges for the existing meta-learning methods to be applied in modeling natural phenomena . First , it is not easy to find a set of similar meta-tasks which provide shareable latent representations needed to understand targeted observations . For instance , while image-related tasks ( object detection ( He et al. , 2017 ) or visual-question-answering tasks ( Andreas et al. , 2016 ; Fukui et al. , 2016 ) ) can take advantage of an image-feature extractor pre-trained by a large set of images ( Deng et al. , 2009 ) and well-designed architecture ( Simonyan & Zisserman , 2014 ; He et al. , 2016 ; Sandler et al. , 2018 ) , there is no such large data corpus that is widely applicable for understanding natural phenomena . Second , unlike computer vision or natural language processing tasks where a common object ( images or words ) is clearly de- fined , it is not straightforward to find analogous objects in the spatiotemporal data . Finally , exact equations behind natural phenomena are usually unknown , leading to the difficulty in reproducing the similar dataset via simulation . For example , although there have been some works ( de Bezenac et al. , 2018 ; Lutter et al. , 2019 ; Greydanus et al. , 2019 ) improving data efficiency via explicitly incorporating PDEs as neural network layers when modeling spatiotemporal dynamics , it is hard to generalize for modeling different or unknown dynamics , which is ubiquitous in real-world scenario . In this work , we propose physics-aware modules designed for meta-learning to tackle the few shot learning challenges in physical observations . One of fundamental equations in physics describing the transport of physical quantity over space and time is a continuity equation : ∂ρ ∂t +∇ · J = σ , ( 1 ) where ρ is the amount of the target quantity ( u ) per unit volume , J is the flux of the quantity , and σ is a source or sink , respectively . This fundamental equation can be used to derive more specific transport equations such as the convection-diffusion equation , Navier-Stokes equations , and Boltzmann transport equation . Thus , the continuity equation is the starting point to model spatiotemporal ( conservative ) observations which are accessible from sensors . Based on the form of ρ and J with respect to a particular quantity u , Eq . 1 can be generalized as : ∂u ∂t = F ( ∇u , ∇2u , . . . ) , ( 2 ) where the function F ( · ) describes how the target u is changed over time from its spatial derivatives . Inspired by the form of Eq . 2 , we propose two modules : spatial derivative modules ( SDM ) and time derivative modules ( TDM ) . Since the spatial derivatives such as ∇ , ∇· , and ∇2 are commonly used across different PDEs , the spatial modules are PDE-independent and they can be meta-initialized from synthetic data . Then , the PDE-specific temporal module is trained to learn the unknown function F ( · ) from few observations in the real-world physical systems . This approach can effectively leverage a large amount of simulated data to train the spatial modules as the modules are PDE-independent and thus mitigating the need for a large amount of real-world tasks to extract shareable features . In addition , since the spatial modules are universally used in physics equations , the representations from the modules can be conveniently integrated with datadriven models for modeling natural phenomena . Based on the modularized PDEs , we introduce a novel approach that marries physics knowledge in spatiotemporal prediction tasks with metalearning by providing shareable modules across spatiotemporal observations in the real-world . Our contributions are summarized below : • Modularized PDEs and auxiliary tasks : Inspired by forms of PDEs in physics , we decompose PDEs into shareable ( spatial ) and adaptation ( temporal ) parts . The shareable one is PDE-independent and specified by auxiliary tasks : supervision of spatial derivatives . • Physics-aware meta-learning : We provide a framework for physcis-aware meta-learning , which consists of PDE-independent/-specific modules . The framework is flexible to be applied to the modeling of different or unknown dynamics . • Synthetic data for shareable modules : We extract shareable parameters in the spatial modules from synthetic data , which can be generated from different dynamics easily . 2 MODULARIZED PDES AND META-LEARNING . In this section , we describe how the physics equations for conserved quantities are decomposable into two parts and how the meta-learning approach tackles the task by utilizing synthetic data when the data are limited . 2.1 DECOMPOSABILITY OF VARIANTS OF A CONTINUITY EQUATION . In physics , a continuity equation ( Eq . 1 ) describes how a locally conserved quantity such as temperature , fluid density , heat , and energy is transported across space and time . This equation underlies many specific equations such as the convection-diffusion equation and Navier-Stokes equations : u̇ = ∇ · ( D∇u ) −∇ · ( vu ) +R , ( Convection-Diffusion eqn . ) u̇ = − ( u · ∇ ) u + ν∇2u−∇ω + g. ( Incompressible Navier-Stokes eqn . ) where the scalar u and vector field u are the variables of interest ( e.g. , temperature , flow velocity , etc. ) . A dot over a variable is time derivative . The common feature in these equations is that the forms of equations can be digested as ( Bar-Sinai et al. , 2019 ; Zhuang et al. , 2020 ) : u̇ = F ( ux , uy , uxx , uyy , . . . ) , ( 3 ) where the right-hand side denotes a function of spatial derivatives . As the time derivative can be seen as a Euler discretization ( Chen et al. , 2018 ) , it is notable that the next state is a function of the current state and spatial derivatives . Thus , knowing spatial derivatives at time t is a key step for spatiotemporal prediction at time t + 1 for locally conserved quantities . According to Eq . 3 , the spatial derivatives are universally used in variants of Eq . 1 and only the updating function F ( · ) is specifically defined for a particular equation . This property implies that PDEs for physical quantities can be decomposable into two modules : spatial and temporal derivative modules . 2.2 SPATIAL DERIVATIVE MODULES : PDE-INDEPENDENT MODULES . Finite difference method ( FDM ) is widely used to discretize a d-order derivative as a linear combination of function values on a n-point stencil . ∂du ∂xd ≈ n∑ i=1 αiu ( xi ) , ( 4 ) where n > d. According to FDM , it is independent for a form of PDE to compute spatial derivatives , which are input components of F ( · ) in Eq . 3 . Thus , we can modularize spatial derivatives as PDE-independent modules . The modules that can be learnable as a data-driven manner to infer the coefficients ( αi ) have been proposed recently ( Bar-Sinai et al. , 2019 ; Seo et al. , 2020 ) . The datadriven coefficients are particularly useful when the discretization in the n-point stencil is irregular and low-resolution where the fixed coefficients cause substantial numerical errors . 2.3 TIME DERIVATIVE MODULE : PDE-SPECIFIC MODULE . Once upto d-order derivatives are modularized by learnable parameters , the approximated spatial derivatives from the spatial modules are fed into an additional module to learn the function F ( · ) in Eq . 3 . This module is PDE-specific as the function F describes how the spatiotemporal observations change . Since the exact form of a ground truth PDE is not given , the time derivative module is datadriven and will be adapted to observations instead . 2.4 META-LEARNING WITH PDE-INDEPENDENT/-SPECIFIC MODULES . Recently , Raghu et al . ( 2019 ) investigate the effectiveness of model agnostic meta-learning ( MAML , Finn et al . ( 2017 ) ) and it is found that the outer loop of MAML is more likely to learn parameters for reusable features rather than rapid adaptation . The finding that feature reuse is the predominant reason for efficient learning of MAML allows us to use additional information which is beneficial for learning better representations . Previously , the objective in meta-training has been considered to be matched with one in meta-test as the purpose of meta-learning is to learn good initial parameters applicable across similar tasks ( e.g. , image classification to image classification ) . We are now able to incorporate auxiliary tasks under a meta-learning setting to reinforce reusable features for a main task . As described in Sec . 2.1 , the spatial modules are reusable across different observations , and thus , we can meta-initialize the spatial modules first with spatial derivatives provided by synthetic datasets . Then , we can integrate the spatial modules with the task-specific temporal module during meta-test to help adaptation of TDM on few observations . Since the spatial modules are trained by readily available synthetic datasets , a large number of similar tasks for meta-training is not required . 3 PHYSICS-AWARE META-LEARNING WITH AUXILIARY TASKS . In this section , we develop a physics-aware meta-learning framework for the modularized PDEs . Fig . 1 describes the proposed framework and its computational process . 3.1 SPATIAL DERIVATIVE MODULE . Algorithm 1 Spatial derivative module ( SDM ) Input : Graph signals ui and edge features eij = xj − xi on G where xi is a coordinate of node i . Output : Spatial derivatives { ûk , i | i ∈ V and k ∈ K } where K = { ∇x , ∇y , ∇2x , ∇2y } . Require : Spatial derivative modules { φk | k ∈ K } 1 : for k ∈ K do 2 : { ak , i , bk , ( i , j ) | ( i , j ) ∈ E and k ∈ K } = φk ( { u } , { e } , G ) 3 : for i ∈ V do 4 : ûk , i = ak , iui + ∑ ( j , i ) ∈E bk , ( j , i ) uj 5 : end for 6 : end for As we focus on the modeling and prediction of sensor-based observations , where the available data points are inherently on a spatially sparse irregular grid , we use graph networks for each module φk to learn the finite difference coefficients ( Bar-Sinai et al. , 2019 ) . Given a graph G = ( V , E ) where V = { 1 , . . . , N } and E = { ( i , j ) : i , j ∈ V } , a node i denotes a physical location xi = ( xi , yi ) where a function value ui = u ( xi , yi ) is observed . Then , the graph signals with positional relative displacement as edge features are fed into the spatial modules to approximate spatial derivatives by Alg . 1 . The coefficients ( ai , b ( i , j ) ) on each node i and edge ( i , j ) are output of φ and they are linearly combined with the function values ui and uj . K denotes a set of finite difference operators . For example , if we set K = { ∇x , ∇y , ∇2x , ∇2y } , we have 4 modules which approximate first/second order of spatial derivatives in 2-dimension , respectively .
The authors propose methodology for sharing learned differencing coefficients for estimating spatial derivatives between multiple spatio-temporal modeling tasks. They show that increased number of tasks improves learning. Additionally, the authors propose a meta-initialization procedure by which the differencing coefficients are initialized to values obtained from synthetic data. They show that this initialization procedure improves performance.
SP:824f8e8bc7c19ac46059d53c2ad192a2f905fd90
Descending through a Crowded Valley — Benchmarking Deep Learning Optimizers
1 INTRODUCTION . Large-scale stochastic optimization drives a wide variety of machine learning tasks . Because choosing the right optimization algorithm and effectively tuning its hyperparameters heavily influences the training speed and final performance of the learned model , doing so is an important , every-day challenge to practitioners . Hence , stochastic optimization methods have been a focal point of research ( cf . Figure 1 ) , engendering an ever-growing list of algorithms , many of them specifically targeted towards deep learning . The hypothetical machine learning practitioner who is able to keep up with the literature now has the choice among hundreds of methods ( cf . Table 2 in the appendix ) —each with their own set of tunable hyperparameters—when deciding how to train their model . There is limited theoretical analysis that would clearly favor one of these choices over the others . Some authors have offered empirical comparisons on comparably small sets of popular methods ( e.g . Wilson et al. , 2017 ; Choi et al. , 2019 ; Sivaprasad et al. , 2020 ) ; but for most algorithms , the only formal empirical evaluation is offered by the original work introducing the method . Many practitioners and researchers , meanwhile , rely on personal and anecdotal experience , and informal discussion on social media or with colleagues . The result is an often unclear , perennially changing “ state of the art ” occasionally driven by hype . The key obstacle for an objective benchmark is the combinatorial cost of such an endeavor posed by comparing a large number of methods on a large number of problems , with the high resource and time cost of tuning each method ’ s parameters and repeating each ( stochastic ) experiment repeatedly for fidelity . Offering our best attempt to construct such a comparison , we conduct a large-scale benchmark of optimizers to further the debate about deep learning optimizers , and to help understand how the choice of optimization method and hyperparameters influences the training performance . Specifically , 1https : //github.com/AnonSubmitter3/Submission543 we examine whether recently proposed methods show an improved performance compared to more established methods such as SGD or ADAM . Additionally , we are interested in assessing whether optimization methods with well-working default hyperparameters exist that are able to keep up with tuned optimization methods . To this end , we evaluate more than a dozen optimization algorithms , largely selected for their perceived popularity , on a range of representative deep learning problems ( see Figure 4 ) drawing conclusions from tens of thousands of individual training runs . Right up front , we want to state clearly that it is impossible to include all optimizers ( cf . Table 2 in the appendix ) , and to satisfy any and all expectations readers may have on tuning and initialization procedures , or the choice of benchmark problems—not least because everyone has different expectations in this regard . In our personal opinion , what is needed is an empirical comparison by a third party not involved in the original works . As a model reader of our work , we assume a careful practitioner who does not have access to near-limitless resources , nor to a broad range of personal experiences . As such , the core contributions ( in order of appearance , not importance ) of our work are : A concise summary of optimization algorithms and schedules A partly automated , mostly manual literature review provides a compact but extensive list of recent advances in stochastic optimization . We identify more than a hundred optimization algorithms ( cf . Table 2 in the appendix ) and more than 20 families of hyperparameter schedules ( cf . Table 3 in the appendix ) published at least as pre-prints . An extensive optimizer benchmark on deep learning tasks We conduct a large-scale optimizer benchmark , specifically focusing on optimization problems arising in deep learning . We evaluate 14 optimizers on eight deep learning problems using four different schedules , tuning over dozens of hyperparameter settings , to our knowledge , this is the most comprehensive empirical evaluation of deep learning optimizers to date ( cf . Section 1.1 on related work ) . An analysis of thousands of optimization runs Our empirical experiments indicate that an optimizer ’ s performance highly depends on the test problem ( see Figure 4 ) . But some high-level trends emerge , too : ( 1 ) Evaluating multiple optimizers with default hyperparameters works approximately as well as tuning the hyperparameters for a fixed optimizer . ( 2 ) Using an additional untuned learning rate schedule helps on average , but its effect varies greatly depending on the optimizer and the test problem . ( 3 ) While there is no optimizer that clearly dominates across all tested workloads , some of the algorithms we tested exhibited highly variable performance . Others demonstrated decent performance consistently . We deliberately refrain from recommending a single one among them , because we could not find a clear winner with statistical confidence . An open-source baseline for future optimizer benchmarks Our results are accessible online in an open and easily accessible form ( see footnote on Page 1 ) . These results can thus be used as competitive and well-tuned baselines for future benchmarks of new algorithms , drastically reducing the amount of computational budget required for a meaningful optimizer comparison . Our baselines can easily be expanded , and we encourage others to contribute to this collection . The high-level result of our benchmark is , perhaps expectedly , not a clear winner . Instead , our comparison shows that , while some optimizers are frequently decent , they also generally perform similarly , switching their relative positions in the ranking which can partially be explained by the No Free Lunch Theorem ( Wolpert & Macready , 1997 ) . A key insight of our comparison is that a practitioner with a new deep learning task can expect to do about equally well by taking almost any method from our benchmark and tuning it , as they would by investing the same computational resources into running a set of optimizers with their default settings and picking the winner . Possibly the most important takeaway from our comparison is that “ there are now enough optimizers. ” Methods research in stochastic optimization should focus on significant ( conceptual , functional , performance ) improvements—such as methods specifically suited for certain problem types , innerloop parameter tuning or structurally novel methods . We make this claim not to discourage research but , quite on the contrary , to offer a motivation for more meaningful , non-incremental research . 1.1 RELATED WORK . Following the rapid increase in publications on optimizers , benchmarking these methods for the application in deep learning has only recently attracted significant interest . Schneider et al . ( 2019 ) introduced a benchmarking framework called DEEPOBS , which includes a wide range of realistic deep learning test problems together with standardized procedures for evaluating optimizers . Metz et al . ( 2020 ) presented TASKSET , another collection of optimization problems focusing on smaller but many more test problems . For the empirical analysis presented here , we use DEEPOBS as it provides optimization problems closer to real-world deep learning tasks . In contrast to our evaluation of existing methods , TASKSET and its analysis focuses on meta-learning new algorithms or hyperparameters . Both Choi et al . ( 2019 ) and Sivaprasad et al . ( 2020 ) analyzed specific aspects of benchmarking process . Sivaprasad et al . ( 2020 ) used DEEPOBS to illustrate that the relative performance of an optimizer depends significantly on the used hyperparameter tuning budget . The analysis by Choi et al . ( 2019 ) supports this point , stating that “ the hyperparameter search space may be the single most important factor explaining the rankings. ” They further stress a hierarchy among optimizers , demonstrating that , given sufficient hyperparameter tuning , more general optimizers can never be outperformed by special cases . In their study , however , they manually chose a hyperparameter search space per optimizer and test problem basing it either on prior published results , prior experiences , or pre-tuning trials . Here we instead aim to identify well-performing optimizers in the case of a less extensive tuning budget and especially when there is no prior knowledge about well-working hyperparameter values for each specific test problem . We further elaborate on the influence of our chosen hyperparameter search strategy in Section 4 discussing the limitations of our empirical study . Our work is also related to empirical generalization studies of adaptive methods , such as that of Wilson et al . ( 2017 ) which sparked an extensive discussion whether adaptive methods ( e.g . ADAM ) tend to generalize worse than standard first-order methods ( i.e . SGD ) . 2 BENCHMARKING PROCESS . Any benchmarking effort requires tricky decisions on the experimental setup that influence the result . Evaluating on a specific task or picking a certain tuning budget , for example , may favor or disadvantage certain algorithms ( Sivaprasad et al. , 2020 ) . It is impossible to avoid these decisions or to cover all possible choices . Aiming for generality , we evaluate the performance on eight diverse real-world deep learning problems from different disciplines ( Section 2.1 ) . From a collection of more than a hundred deep learning optimizers ( Table 2 in the appendix ) we select 14 of the most popular and most promising choices ( cf . Figure 1 ) for this benchmark ( Section 2.2 ) . For each test problem and optimizer we evaluate all possible combinations of three different tuning budgets ( Section 2.3 ) and four selected learning rate schedules ( Section 2.4 ) , thus covering the following combinatorial space : Problem P1 P2 . . . P8 8 × Optimizer AMSBound AMSGrad . . . SGD 14 × Tuning one-shot small budget large budget 3 × Schedule constant cosine decay cosine warm restarts trapezoidal 4 . Combining those options results in 1,344 possible configurations and roughly 35,000 individual runs . 2.1 TEST PROBLEMS . We consider the eight optimization tasks summarized in Table 1 , available as the “ small ” ( P1–P4 ) and “ large ” ( P5–P8 ) problem sets , respectively , together forming the default collection of DEEPOBS . A detailed description of these problems , including architectures , training parameters , etc . can be found in the work of Schneider et al . ( 2019 ) .2 DEEPOBS ’ test problems provide several performance metrics , including the training and test loss , the validation accuracy , etc . While these are all relevant , any comparative evaluation of optimizers requires picking only a few , if not just one particular performance metric . For our analysis ( Section 3 ) , we focus on the final test accuracy ( or the final test loss , if no accuracy is defined for this problem ) . This metric captures , for example , the optimizer ’ s ability to generalize and is thus highly relevant for practical use . Our publicly released results include all metrics for completeness . An example of training loss performance is shown in Figure 16 in the appendix . Accordingly , the tuning ( Section 2.3 ) is done with respect to the validation metric . We discuss possible limitations resulting from these choices in Section 4 . 2.2 OPTIMIZER SELECTION . In Table 2 in the appendix we collect over a hundred optimizers introduced for , suggested for , or used in deep learning . This list was manually and incrementally collected by multiple researchers trying to keep up with the field over recent years . It is thus necessarily incomplete , although it may well represent one of the most exhaustive of such collections . Even this incomplete list , though , contains too many entries for a meaningful benchmark with the degrees of freedom collected above . This is a serious problem for research : Even an author of a new optimizer , let alone a practitioner , could not possibly be expected to compare their work with every possible competing method . We thus selected a subset of 14 optimizers , which we consider to be currently the most popular choices in the community ( see Table 4 in the appendix ) . These do not necessarily reflect the “ best ” algorithms , but are either commonly used by practitioners and researchers , or have recently generated enough attention to garner interest . Our selection is focused on first-order optimization methods , both due to their prevalence for non-convex continuous optimization problems in deep learning as well as to simplify the comparison . Whether there is a significant difference between these optimizers or if they are inherently redundant is one of the questions this work investigates . With our list , we tried to focus on optimization algorithms over techniques , although we acknowledge , the line being very blurry . Techniques such as averaging weights ( Izmailov et al. , 2018 , e.g . ) or ensemble methods ( Garipov et al. , 2018 , e.g . ) have been shown to be simple but effective at improving the optimization performance . Those methods , however , can be applied to all methods in our lists , similar to regularization techniques , learning rate schedules , or tuning methods and we have , therefore , decided to omit them from Table 2 . 2All experiments were performed using version 1.2.0-beta of DEEPOBS and TensorFlow version 1.15 Abadi et al . ( 2015 ) .
This paper benchmarks popular optimizers for training neural networks. The experiments consider all possible combinations of 3 different tuning budgets, and 4 different fixed learning rate schedules on 8 deep learning workloads for 14 optimizers. The paper highlights two main observations: 1) there is no clear dominating optimizer, and 2) selecting from a pool of optimizers with their default parameters is often as good as tuning a fixed optimizer.
SP:0d632e93235a2e5b3016ba66b339e0141d510f1f
Modifying Memories in Transformer Models
1 INTRODUCTION . Large-scale Transformer based language models ( Vaswani et al. , 2017 ; Devlin et al. , 2018 ; Radford et al. , 2019 ; Raffel et al. , 2019 ; Brown et al. , 2020 ) have not only pushed state-of-the-art on standard natural language processing ( NLP ) benchmarks such as GLUE and SQuAD , but they have also been crucial for improving various real-world systems ( see , e.g. , Nayak , 2019 ; Rao et al. , 2019 ) . Given that these models are pretrained on a large corpora of text such as Wikipedia and BookCorpus ( Zhu et al. , 2015 ) , it ’ s quite conceivable that they are able to implicitly memorize the factual knowledge in their large number of parameters . Recent works ( Petroni et al. , 2019 ; Roberts et al. , 2020 ) have verified this hypothesis by evaluating the pretrained language models on factual knowledge based tasks . This line of work shows that pretrained large Transformer based language models achieve non-trivial performance on various open-domain question answering ( QA ) tasks that probe the factual knowledge stored in the model parameters . The aforementioned memorization capability of Transformers opens up many exciting opportunities . In addition to improving generalization with better language understanding , Transformers may also replace or assist traditional knowledge bases ( KBs ) that are either manually curated or require significant amount of supervision ( Roth & Yih , 2002 ; Kambhatla , 2004 ; Surdeanu & Ji , 2014 ) . Different from conventional KBs that explicitly memorize factual knowledge , Transformers implicitly memorize knowledge in their model parameters . As a result , Transformers lack one key advantage of the conventional databases : efficiently modifying the factual knowledge stored in the model . Unlike Transformers , in conventional databases such as SQL and NoSQL that explicitly store knowledge in the forms of structured tables , key-value pairs , wide columns , graphs , or documents , updating knowledge is straightforward . Knowledge-augmented Transformers , which leverage factual knowledge bases to improve their feature representations , can not effectively modify their predictions by only updating the symbolic knowledge as it causes conflict with the implicit memorization in their parameters ( Verga et al. , 2020 ) . This raises the natural question : Can Transformers cope with the ever-changing world where knowledge is continuously being added , updated , and deprecated ? To answer this question , we propose a new task of explicitly modifying specific factual knowledge in Transformer models while ensuring that model performance does not degrade on the unaltered facts . This task is useful in many scenarios . For example , the factual knowledge stored by the model can become stale over time , which needs to be updated periodically , e.g. , a sports player may play with different teams over time . Users may ask a Transformer-based assistant model to update certain knowledge ( factual or otherwise ) that they asked model to memorized in the past , e.g. , their favorite tourist destination . In the context of privacy one may need to overwrite unintendedly memorized sensitive information without retraining the model ( Carlini et al. , 2019 ) . Furthermore , language models are susceptible to various biases present in the large corpora of text used for their training , and such biases may need to be eliminated to ensure a fair application of such models in real-world ( Bolukbasi et al. , 2016 ; Bordia & Bowman , 2019 ; Blodgett et al. , 2020 ) . To the best of our knowledge , this is the first work studying reliable and efficient modification of the factual knowledge memorized by Transformers . The paper makes the following contributions . • We create a new benchmark to evaluate the ability of a candidate method to modify the factual knowledge of a Transformer model as desired while preserving the model ’ s performance on the unmodified factual knowledge ( § 3.1 ) . • We formulate the knowledge modification as a constrained optimization problem with a constraint on the loss on the unmodified facts and explore better baseline methods to approximately enforce this constraint ( § 3.3 ) . • We show that constrained layer-wise fine-tuning is a simple yet effective way to modify the knowledge memorized by Transformers ( § 4 ) . • We find that it is not necessarily easier to modify factual knowledge in the models that employ explicit memory modules , e.g. , FaE ( Verga et al. , 2020 ) , as compared to those Transformer models that solely rely on implicit memorization . 2 RELATED WORKS . Traditionally , KBs are commonly utilized to store and access the relational knowledge in NLP domain ( Ji et al. , 2020 ; Zelle & Mooney , 1996 ; Zettlemoyer & Collins , 2005 , inter alia ) . However , the recent success of Transformer-based language models on a multitude of NLP tasks has fueled an increasing number of efforts on exploring the ability of these language models to serve as unstructured/non-symbolic KBs . Language models as a source of factual knowledge . To assess the performance of off-the-self modern language models as KBs , Petroni et al . ( 2019 ) introduced LAMA ( LAnguage Model Analysis ) probing method that convert various facts and fact-seeking question-answer pairs into cloze sentences . Petroni et al . ( 2019 ) concluded that pretrained BERT ( Devlin et al. , 2018 ) shows factual knowledge that is competitive with KBs generated using some of the traditional off-the-self techniques . Further , Roberts et al . ( 2020 ) probed the knowledge within T5 models ( Raffel et al. , 2019 ) and found very promising results . Another line of work ( Sun et al. , 2019 ; Zhang et al. , 2019 ; Peters et al. , 2019 ) focuses on leveraging the readily available structured KBs to further complement the knowledge possessed by language models . Earlier works on retrofitting improves word representation learning with relation information ( Faruqui et al. , 2015 ) . Recently , there have been attempts to develop novel Transformer models and/or training procedures that aim to leverage both available high-quality KBs and large corpora of ( unstructured ) text ( Dhingra et al. , 2019 ; Guu et al. , 2020 ; Lewis et al. , 2020 ) , further broadening the scope of factual knowledge . However , unlike structured KBs , which are accompanied by infrastructure for querying , inferring , or updating facts , neural language models do not possess such capabilities directly . Jiang et al . ( 2020 ) explored designs for better prompts to query the knowledge implicitly stored in the model parameters of a neural language model . To the best of our knowledge , however , there has been no work on designing efficient ways for modifying knowledge in a neural language model , which is the focus of our present work . Memory augmented models . Multiple recent research efforts augment the Transformer models with explicit long-term memory modules to increase their factual knowledge . Use of knowledge augmented neural networks had been explored in pre-Transformer era as well ( Weston et al. , 2014 ; Sukhbaatar et al. , 2015 ) . More recently , in the context of Transformers , Févry et al . ( 2020 ) utilized an explicit key-value memory to store entity representations , which are trained along with the rest of model in an end-to-end manner . Verga et al . ( 2020 ) build on Févry et al . ( 2020 ) , and introduced Facts as Expert ( FaE ) model with explicit symbolic memory of ( subject , relation , object ) triples based on end-to-end trained entity representations . Notably , one of the motivations behind FaE is the ease of updating knowledge by directly modifying the content of the explicit symbolic memory . However , even though FaE has successfully demonstrated injecting new facts to its knowledge base , it exhibits poor performance when one tries to modify the facts that the model encountered during the training due to contradictions between the implicit knowledge of the underlying Transformer model and explicit content of the symbolic memory ( Verga et al. , 2020 , §5.3 ) . Modifying the value tokens in the datastore of kNN-LM ( Khandelwal et al. , 2020 ) is another non-parametric method to update the facts . However , this approach tends to cause wrong predictions for all other facts that shared the same object before modification , resulting in low accuracy on the unmodified facts ( cf . Appendix F ) . Thus , our work on modifying the implicit memory of Transformer models also has utility for the task of updating knowledge in memory augmented Transformer models . Generalization often requires memorization . In general , without specifically focusing on language models , Feldman ( 2020 ) ; Feldman & Zhang ( 2020 ) have demonstrated both theoretical results and empirical evidences to imply that close-to-optimal generalization requires memorization of labels for samples from the low-frequency sub-populations . This line of work is further supported by the recent efforts on adding the k-NN component to language models to improve their generalization via memorization ( Kassner & Schütze , 2020 ; Khandelwal et al. , 2020 ) . We believe that our work on modifying the implicit memories in Transformer models can improve their generalization by boosting their factual knowledge in specific domains . Memory modification vs. continual learning . Continual learning , with recent extensions to language models ( Sun et al. , 2020 ; Liu et al. , 2019 ; Mi et al. , 2020 ; Chuang et al. , 2020 ) , aims to learn a new task while preserving the performance on the previous tasks without access to their data . Similar to continual learning , memory modification also expects the predictions to be updated efficiently ( potentially without access to the unmodified facts ) while preserving the accuracy for the unmodified facts . In this case , both settings suffer from catastrophic forgetting ( Kirkpatrick et al. , 2017 ) , but memory modification further requires the model to memorize new facts that conflict with previously learned facts , posing new challenges to existing continual learning approaches , e.g. , we may need to update the Gradient Episodic Memory ( Lopez-Paz & Ranzato , 2017 ) or the Conceptors ( Liu et al. , 2019 ) . Furthermore , our benchmark and the evaluated models are at larger scales as compared to the works mentioned above , posing a stricter requirement on the scalability of the proposed solution . 3 MODIFYING IMPLICIT FACTUAL KNOWLEDGE OF TRANSFORMER MODELS . In this section , we define a new knowledge modification task . We then present several approaches to solve this task with different computational costs . We focus on a constrained optimization-based approach that is highly effective and efficient . 3.1 MODIFICATION OF IMPLICIT KNOWLEDGE . We propose a new task of modifying specific pieces of knowledge in a model that are stored implicitly in its weights . Specifically , we would like to change the model ’ s weights in a way so that a pre-selected subset of its knowledge is updated , while the rest of its knowledge is preserved . Such modifications can be challenging as each fact is stored non-locally across a large number of weights and each weight can affect a large number of implicitly memorized facts . More formally , a pretrained Transformer based language model is defined by its parameters θ0 ∈ Θ , which encodes a collection of facts F that the model has implicitly memorized . We would like to update a desired subset of facts S ⊂ F to a new set of facts M. At the end of the modification process , we should arrive at a model θnew that implicitly stores the collection F ′ = { F\S } ∪M . Ideally , the new model θnew not only stores the desired modified knowledge , but also retains the performance of θ0 on the unmodified knowledge F\S . For example , a Transformer model may have memorized ‘ Eliud Kipchoge ’ given the context ‘ The marathon world record is held by [ MASK ] ’ . When another athlete breaks this record , we will need to update this specific piece of knowledge while keeping most of the remaining knowledge intact .
Recently, pretrained Transformer language models have been shown to capture world knowledge (using testbeds containing facts). What if you want to update a fact, for example, with the current president of USA? This paper investigates different approaches to update the weights of a Transformer model such that the model works for the modified facts but does not catastrophically forget unmodified facts. The main proposal is a simple regularization technique (which they call constrained fine-tuning) to minimize weight changes while fine-tuning on the supporting factual sentences that represent the modified facts.
SP:86a3f8091d534d50e25612cbb933819d2a090941
Globetrotter: Unsupervised Multilingual Translation from Visual Alignment
1 INTRODUCTION Machine translation aims to learn a mapping between sentences of different languages while also maintaining the underlying semantics . In the last few years , sequenceto-sequence models have emerged as remarkably powerful methods for this task , leading to widespread applications in robust language translation . However , sequenceto-sequence models also require large data sets of parallel corpora for learning , which is expensive to collect and often impractical for rare language pairs . We propose to leverage the synchronization between language and vision in order to learn models for machine translation without parallel training corpora . Instead of learning a direct mapping between languages , we present a model that aligns them by first mapping through a visual representation . We show how vision creates a transitive closure across modalities , which we use to establish positive and negative pairs of sentences without supervision . Since the visual appearance of scenes and objects will remain relatively stable between different spoken languages , vision acts as a “ bridge ” between them . Our approach integrates these transitive relations into multi-modal contrastive learning . In our experiments and visualizations we show that the transitive relations through vision provide excellent self-supervision for learning neural machine translation . Although we train our approach without paired language data , our approach is able to translate between 52 different languages better than several baselines . While vision is necessary for our approach during learning , there is no dependence on vision during inference . After learning the language representation , our approach can translate both individual words and full sentences using retrieval . The contributions of this paper are three-fold . First , we propose a method that leverages crossmodal alignment between language and vision to train a multilingual translation system without any parallel corpora . Second , we show that our method outperforms previous work by a significant margin on both sentence and word translation , where we use retrieval to test translation . Finally , to evaluate and analyze our approach , we release a federated multi-modal dataset spanning 52 different languages . Overall , our work shows that grounding language in vision helps developing language processing tools that are robust across languages , even in cases where ground truth alignment across languages is not available . Code , data , and pre-trained models will be released . 2 RELATED WORK . Our unsupervised joint visual and multilingual model builds on recent progress in both the natural language processing and computer vision communities . We briefly summarize the prior work . Unsupervised language translation has been studied as a word representation alignment problem in Lample et al . ( 2018b ) , where the distribution of word embeddings for two unpaired languages is aligned to minimize a statistical distance between them . Lample et al . ( 2018a ) ; Artetxe et al . ( 2018 ) ; Lample et al . ( 2018c ) ; Lample & Conneau ( 2019 ) build on top of this idea , and train an encoderdecoder structure to enforce cycle-consistency when translating from one language to another and back to the first one . This method achieves strong unsupervised word translation results , but does not scale beyond two languages . It also does not leverage visual information in learning . Multi-language models are general language models that develop language-independent architectures that work equally well for any language ( Gerz et al. , 2018 ) . Lample & Conneau ( 2019 ) ; Conneau et al . ( 2020 ) ; Artetxe & Schwenk ( 2019 ) ; Devlin et al . ( 2019 ) ; Liu et al . ( 2020 ) ; Phang et al . ( 2020 ) share the same token embeddings across different languages , showing that this improves language modeling both for general downstream single-language NLP tasks and also for supervised language translation across multiple languages . Lample & Conneau ( 2019 ) ; Conneau et al . ( 2020 ) ; Artetxe & Schwenk ( 2019 ) use a shared Byte Pair Encoding ( BPE ) , which we use in our work . We loosely follow the architecture of Conneau et al . ( 2020 ) in that we train a transformer-based ( Vaswani et al. , 2017 ) masked language model with BPE . Vision as multi-modal bridge implies using vision as an interlingua between all languages . Using a third language as a pivot to translate between pairs of languages without source-target paired corpora has been studied for the past few years ( e.g . Firat et al. , 2016 ; Johnson et al. , 2017 ; Garcia et al. , 2020 ) . Harwath et al . ( 2018 ) ; Azuh et al . ( 2019 ) use vision for the same purpose , and they work directly on the speech signal instead of text . Chen et al . ( 2018 ) use images to help translate between languages in the text modality . Their model involves both generation and reinforcement learning , which makes optimization difficult , and they do not generalize to more than two languages . Sigurdsson et al . ( 2020 ) also use vision as a pivot for unsupervised translation . However , our approach works for multiple languages at once ( instead of just two ) and also obtains an explicit cross-lingual alignment . We share a single word embedding and language model for all languages , and use different training strategies . Our experiments quantitatively compare the two approaches , showing that our approach performs better both in word and sentence translation . Other work views the input image as extra information for translation ( e.g . Calixto & Liu , 2017 ; Su et al. , 2019 ) , and we refer readers to Specia et al . ( 2016 ) for an extensive overview on this topic . Instead of using images as a bridge , paired data between languages is used . There has also been research on training multilingual language representations for downstream vision tasks , in general leveraging visual-language correspondence , but without translation as a goal . Unlike this paper , they make use of ground truth language pairs ( Wehrmann et al. , 2019 ; Gella et al. , 2017 ; Kim et al. , 2020 ; Burns et al. , 2020 ) . Translation by retrieval . We evaluate the representations using retrieval-based machine translation ( Baldwin & Tanaka , 2000 ; Liu et al. , 2012 ) , which is often used in the context of example-based machine translation ( e.g . Brown , 1996 ; 2001 ; 1997 ; Cranias et al. , 1994 ; El-Shishtawy & El-Sammak , 2014 ) , analogy-based translation ( e.g . Nagao , 1984 ; Kimura et al. , 2014 ) , or translation memories ( e.g . Chatzitheodorou , 2015 ; Dong et al. , 2014 ; Wäschle & Riezler , 2015 ; Baldwin , 2001 ) . While there are also generative-based translation approaches , they are difficult to automatically evaluate . There is generally no well-defined metric for what consists of a good generative translation ( Callison-Burch et al. , 2006 ) . Instead , we evaluate our approach using translation-by-retrieval , allowing for rigorous experimental validation of the cross-lingual alignment in the representation . State-of-the-art cross-lingual retrieval approaches rely on supervised language pairs , and range from training the models in a standard contrastive learning setting ( Chi et al. , 2020 ) to more complex combinations of the language pairs such as using cross-attention ( Anonymous , 2021 ) or introducing custom fusion layers ( Fang et al. , 2020 ) . Our approach does not require supervised language pairs . Text Network . 3 METHOD . We present an approach that learns to map words and sentences from one language to semantically similar words and sentences from different languages , for a large number of languages simultaneously . Our approach does not require any paired data between languages , and instead only depends on image-language pairs . Fig . 2 provides an overview of our framework . 3.1 SENTENCE EMBEDDING . Our approach learns an aligned embedding space for sentences across languages . Let zli ∈ RD be the learned embedding of sentence i , obtained by processing the text through a language network Θl . Moreover , let βij be the similarity between sentences zli and z l j , for example through the cosine similarity . Our goal is to learn the parameters of the embedding z such that sentences with the same meaning are mapped to similar positions in the embedding space despite coming from different languages . After learning , we will have a sentence embedding zli that we can use for a variety of tasks , such as retrieving or generating sentences in different languages . We learn the parameters of the embedding space z by optimizing the contrastive learning problem : Lt = − ∑ i ∑ j 6=i αij log exp ( βij/τ ) ∑ k 6=i exp ( βik/τ ) with βij = sim ( zli , z l j ) ( 1 ) In contrastive learning , we need to define which pairs of examples should be close in the learned embedding space ( the positives ) , and which pairs of examples should not ( the negatives ) . In the above formulation , the scalar αij ∈ [ 0 , 1 ] indicates this assignment . However , since we are in an unsupervised translation setting , we do not have ground truth pairs . Our main idea , which we introduce in the next section , is that we can use the visual modality to discover these pairs . 3.2 TRANSITIVE RELATIONS . Estimating the similarity for sentences of different languages is challenging without labels . Unsupervised machine translation approaches typically rely on topological properties , such as distributional alignment or back-translation ( Lample et al. , 2018b ; Lample & Conneau , 2019 ) . However , these constraints provide a noisy gradient for learning , which makes large-scale optimization difficult . We propose to take advantage of a transitive relation through the visual modality in order to estimate the similarity in language space αij . Given a dataset of images and their corresponding captions , we estimate both a cross-modal ( sentence-image ) similarity as well as a cross-image ( image-image ) similarity . Let αxii be the cross-modal similarity , which indicates the alignment between image i and its corresponding caption i . We also let αvij be the cross-image similarity , indicating the perceptual similarity between image i and another image j . This provides the transitive relation as the product of similarities : αij = f ( α x ii · αvij · αxjj ) , where f ( x ) = max ( 0 , x−m ) / ( 1−m ) , ( 2 ) and m is a margin that we set to m = 0.4 , which prevents pairs with low similarity from being used as positives . Note that αij = αji . The transitive similarity causes two sentences from different languages to be similar if they appear in similar visual contexts . Since both αxii ∈ [ 0 , 1 ] and αvij ∈ [ 0 , 1 ] , the final similarity is in the same range , αij ∈ [ 0 , 1 ] . Only when there is a strong alignment between an image and its caption , and there is also another image with close perceptual similarity , will a transitive relation be formed . In realistic scenes , the correspondence for some image and caption pairs may be difficult to establish in the presence of noise , which our formulation handles by breaking the transitive relation . In other words , we only consider paths with high total similarity as positives for the contrastive objective , and discard those paths with low total similarity , since their sentences likely do not match .
The authors propose to leverage images to train an unsupervised machine translation (MT) model. Their main idea is that the similarity of images can be used as a proxy for the similarity of sentences describing the images. The sentences, in turn, can be in different languages, and knowledge about their similarity can be exploited as training signal for an unsupervised MT model, i.e., training without parallel sentences. Their model consists of a sentence encoder and an image encoder. For training and evaluation of the model, they use translations (multi-way for the test set) of image captioning datasets.
SP:11d9e619756f936a241fb838a78157de03d22344
Matrix Data Deep Decoder - Geometric Learning for Structured Data Completion
1 INTRODUCTION . Matrix completion ( MC ) consists of estimating the missing entries of an n×m matrixX ( usually , of very big dimensions ) given its measurements M on a ( usually , very sparse ) support Ω . An example of such matrices are signals on graphs/manifolds which are Non-Euclidean domains . The classical example of such data are recommender ( recommendation ) systems , where the ratings are signals on ( user item ) couple . The most known Matrix Completion problem is the Netflix problem , where a 1M $ prize was offered for the algorithm that can best predict user ratings in a dataset that contained 480k movies × 18k users ( 8.5B entries ) , with 0.011 % known entries ( Bell et al. , 2009 ) . Many works focused on solutions for the MC problem . In brief , one wishes to obtain the matrix X given matrix M as the specified input on the support Ω . Then , formally the completion task amounts to the minimization problem X̂ = argmin X ‖AΩ ◦ ( X −M ) ‖2F where AΩ is the observation mask matrix ( filled with 1 where data exists in the original problem ) , ◦ is the Hadamard product and ‖.‖2F is the Frobenius norms ( Rennie & Srebro , 2005 ) . Different approaches where presented in order to fill in matrix X . Those approached included imposing different regularization ( priors ) on the matrix and its factors . The most prominent approach consists of imposing a low rank ( Candès & Recht , 2009 ; Recht , 2009 ) on the matrix . Then , priors based on collaborative filtering ( users/items rating patterns ) , content based filtering ( user/items profile ) ( Ghassemi et al. , 2018 ; Jain & Dhillon , 2013 ; Xu et al. , 2013 ; Si et al. , 2016 ) and their combinations . Then Geometric Matrix Completion approaches appeared ( Li & Yeung , 2009 ; Rao et al. , 2015 ; Cai et al. , 2011 ) and proposed describing rows/column graphs which represent similarity , then encoding the structural ( geometric ) information of those graphs via graph Laplacian regularization ( Belkin & Partha , 2002 ; Belkin & Niyogi , 2003 ) and imposing smoothness of the data in those graphs ( Kalofolias et al. , 2014 ; Rao et al. , 2015 ; Ma et al. , 2011 ; Mardani et al. , 2012 ) . Those approaches where generally related to the field of signal processing as entries signals on the rows/columns graphs ( Shuman et al. , 2012 ) . Then Geometric Deep Learning Methods where introduced to learn the domains of geometric data structures ( e.g . single graphs or manifolds ) ( Bronstein et al. , 2016 ; Lefkimmiatis , 2016 ; Defferrard et al. , 2016 ; Niepert et al. , 2016 ; Gilmer et al. , 2017 ; Hamilton et al. , 2017 ; Velickovic et al. , 2017 ; Chen et al. , 2018 ; W. Huang et al. , 2018 ; Klicpera et al. , 2018 ; Abu-El-Haija et al. , 2019 ; Ying et al. , 2018 ; Gao et al. , 2018 ; Hammond et al. , 2011 ) . The current state of the art solution for Matrix completion problem , relies on an extending classical harmonic analysis methods to non-Euclidean domains . When , the geometry of the column/row spaces and their graphs is utilised to provide a Geometric Deep Learning mechanism called the RMGCNN ( Monti et al. , 2017 ) that includes a complex combined CNN and RNN ( Hochreiter & Schmidhuber , 1997 ) networks . In this work we present a simplified method for the MC problem : the Matrix Data Deep Decoder that contains a classical end to end GRAPH convolutional neural network and inspired by the leading methods from the field of image completion - the Deep Image Prior ( Ulyanov et al. , 2020 ) and the Deep Decoder ( Heckel & Hand , 2018 ) . In our method , random noisy input matrix is acted upon by the weights of a neural network ( parametrization ) . By tuning the parameters of the network and minimising the error between its output to the initial corrupted matrix , we find the best candidate for the complete matrix . This method yields state of art results for the MC task . The contributions of our work are : • A novel approach for solving the MC Problem , using deep learning with end-to-end pure convolutional network for graphs . • State-of-the-art performance for the MC problem in both prediction error ( RMSE ) and solution running time1 . Our method significantly outperforms the previous state of art method - the RMGCNN . • We show that a pure graph convolutional neural network is a good prior for the MC problem . This provides a correspondence of convolutionial neural networks methods to MC problems . 2 PRELIMINARIES . 2.1 MATRIX COMPLETION NOTATION . The most prominent prior for the MC problem is assuming the matrix X is of low rank . Low rank is obtained by rank regularization using its nuclear ( trace ) norm ‖X‖∗ – sum of the singular values ofX . The canonical optimization problem with parameter λ∗ , is stated as : X̂ = min X ‖AΩ ◦ ( X −M ) ‖2F + λ∗ ‖X‖∗ 2.1.1 MATRIX FACTORIZATION . To alleviate the computational burden for big datasets , we factorize X = W HT , where W ∈ Rm×k , HT ∈ Rk×n . Here , k m and n is the upper bound on the rank of X . With this factorization , the nuclear norm term can be replaced by the sum of the Frobenius norms leading to the following non-convex ( but still very well-behaved ) problem ( Rao et al. , 2015 ) : X̂ = min W , HT ∥∥AΩ ◦ ( WHT −M ) ∥∥2F + λ∗2 ( ‖W ‖2F + ∥∥HT∥∥2F ) 2.2 GEOMETRIC MATRIX COMPLETION . We introduce the geometric matrix completion framework , using notations as in RMGCNN ( Monti et al. , 2017 ) . 1evaluated on the existing classical benchmark for MC Problems 2.2.1 THE ROW/COLUMN GRAPHS . The matrix X is comprised from signals on non-euclidean domains of rows and columns . We represent those domains by undirected weighted graphs Gr ( e.g . items ) and Gc ( e.g users ) respectively , where : Gr/c = ( V , E , W ) . Gr/c are built either directly from the ratings matrix X , or based on additional data about the rows/columns ( if given ) . Their structure is encoded in Laplacian matrices which are built from the adjacency matrices Wr/c ( definitions are below ) . This procedure is sketched in figure 1 below . 2.2.2 THE ADJACENCY MATRIX : . For a graph G = ( V , E , W ) , the elements of its adjacency matrix ( W ) ij = wij obey : wij = wji , wij = 0 if ( i , j ) /∈ E and wi , j > 0 if ( i , j ) ∈ E. The Adjacency Matrix represents the weights of the proximity between every two vertices and can be built based on the signal patterns or on external features about the rows/columns in methods like euclidean distance of normalized features , Chi square , Gaussian Kernel , K-nn clustering K-means clustering and etc . 2.2.3 THE GRAPH LAPLCIANS . The Laplacian matricesLr andLc are based on the adjacency matricesW and are holding inside the internal Graph Structure . The most common constructions of a Laplacian matrix is an n× n matrix defined as L = D −W . where D is degree matrix , an n× n diagonal matrix ( D ) ii = ∑n j 6=i wij . We adopt the Normalized Graph Laplacian definition as L̃ = D− 1 2LD− 1 2 = I −D− 12WD− 12 . 2.2.4 THE OPTIMIZATION PROBLEM . We use the graph laplacians in the optimization function as an additional prior regularizing the matrix completion problem . We ’ d like more similar items/users get more similar predictions . Mathematically , regarding the columns x1 , . . . , xn for example as a vector-valued function defined on the vertices Vc , the smoothness assumption implies that xj ≈ xj′ if ( j , j′ ) ∈ Ec . Stated differently , we want the following entity ( Trace norm or Dirichlet semi-norm ( Kalofolias et al. , 2014 ) ) : ∑ i , j w c i , j ‖xi − xj‖ 2 2 = tr ( XLcX T ) to be as small as possible , leading to the following optimization problem : X̂ = argmin x∈Rm×n ‖PΩ ◦ ( X −M ) ‖2F + λ∗ ‖X‖∗ + λr tr ( XT LrX ) + λc tr ( XLcX T ) , which , if we will look at the factorized model will be equivalent to , X̂ = argmin W∈Rn×k , HT∈Rk×n ∥∥PΩ ◦ ( WHT −M ) ∥∥2F +λ∗ ∥∥WHT∥∥∗+λr tr ( W TLrW ) +λc tr ( HTLcH ) ) From this perspective , the estimation of the left and the right factors ofX is considered as diffusion of the input fields on the row and column graphs , respectively . This separable form allows no accommodation for the low rank constraint ( which pertains to the product of the graphs ) . 2.3 DEEP NEURAL NETWORKS . In the recent years , deep neural networks and , in particular , convolutional neural networks ( CNNs ) ( Lecun et al. , 1998 ) based methods have been applied with great success to Image completion tasks . Such methods are based on one of the key properties of CNN architectures - the ability to extract the important local stationary patterns of Euclidean data . Image completion with untrained networks ( when only the corrupted image is the input with no other training examples ) can be seen as parallel to the `` Matrix Completion '' task . Two recent works , applying un-trained deep neural networks on corrupted images , showed state-of the art results for this task . We were inspired by those methods and our goal was to generalize them to the Non-Euclidean Domain . 2.3.1 DIP – DEEP IMAGE PRIOR . The method suggests to feed the network with random input Z , forward pass the random input through the network and check how close the output is to the corrupted image , while tuning the network parameters weights . This operation surprisingly reconstructs the clean image ( see Ulyanov et al . ( 2020 ) ) . 2.3.2 DEEP DECODER . The Deep Decoder method showed results even better then the DIP ( see Heckel & Hand ( 2018 ) ) . The method proposed to take a small sample of noise , and pass it through a network , while making some non-linear operations on it and up-sample , then check how far the result is from the corrupted image while fixing the network parameters . This method showed that a deep decoder network is a very concise image prior . The number of parameters it needs to completely specify that image is very small , providing a barrier for over-fitting ( catching only the most important image features ( natural structures ) and ignore noise ) and allowing the network to be amenable to theoretical analysis . 2.4 GEOMETRIC DEEP LEARNING OR DEEP LEARNING ON GRAPHS . In contrast to image matrices , the notion of convolution and pooling for Non-Euclidean matrices needs to be re-defined to give the Non-Euclidean stracture the special meaning that convolutional networks are based on . When those operations are redefined , we can build a `` graph convolutional neural network '' which is parallel to some classical neural network and find the estimate forX .
This paper aims to tackle the matrix completion problem by drawing connection from prior work in image completion domain. It seems to be a combination of prior work: Multi-graph convolution combined with Dirichlet energy on row and column graph laplacian where the input rating matrix is corrupted with noise. The writing and presentation is significantly below par Iclr acceptance in the current form. Also, considering some of the work mentioned below, SOTA results is an overclaim.
SP:1e43e2ad50364f396fa19a2e9d8e9f7244a40178
Structural Landmarking and Interaction Modelling: on Resolution Dilemmas in Graph Classification
1 INTRODUCTION . Complex systems are ubiquitous in natural and scientific disciplines , and how the relation between component parts gives rise to global behaviour of a system is a central research topic in many areas such as system biology ( Camacho et al. , 2018 ) , neural science ( Kriegeskorte , 2015 ) , and drug and material discoveries ( Stokes et al. , 2020 ; Schmidt et al. , 2019 ) . Recently , graph neural networks provide a promising architecture for representation learning on graphs – the structural abstraction of a complex system . State-of-the-art performances are observed in various graph mining tasks ( Bronstein et al. , 2017 ; Defferrard et al. , 2016 ; Hamilton et al. , 2017 ; Xu et al. , 2019 ; Velickovic et al. , 2017 ; Morris et al. , 2019 ; Wu et al. , 2020 ; Zhou et al. , 2018 ; Zhang et al. , 2020 ) . However , due to the non-Euclidean nature , important challenges still exist in graph classification . For example , in order to generate a fixed-dimensional representation for a graph of arbitrary size , graph pooling is typically adopted to summarize the information from each each node . In the pooled form , the whole graph is squeezed into a “ super-node ” , in which the identities of the constituent sub-graphs and their interconnections are mixed together . Is this the best way to generate graph-level features ? From a complex system ’ s view , mixing all parts together might make it difficult for interpreting the prediction results , because properties of a complex system arise largely from the interactions among its components ( Hartwell et al. , 1999 ; Debarsy et al. , 2017 ; Cilliers , 1998 ) . The choice of the “ collapsing ” -style graph pooling roots deeply in the lack of natural alignment among graphs that are not isomorphic . Therefore pooling sacrifices structural details for feature ( dimension ) compatibility . Recent years , substructure patterns1 draw considerable attention in graph mining , such as motifs ( Milo et al. , 2002 ; Alon , 2007 ; Wernicke , 2006 ; Austin R. Benson , 2016 ) and graphlets ( Shervashidze et al. , 2009 ) . It provides an intermediate scale for structure comparison or counting , and has been applied to node embedding ( Lee et al. , 2019 ; Ahmed et al. , 2018 ) , deep graph kernels ( Yanardag & Vishwanathan , 2015 ) and graph convolution ( Yang et al. , 2018 ) . However , due to combinatorial nature , only substructures of very small size ( 4 or 5 nodes ) can be considered ( Yanardag 1Informally , substructure in this paper means a connected subgraph and will be used interchargeably with it . & Vishwanathan , 2015 ; Wernicke , 2006 ) , greatly limiting the coverage of structural variations ; also , handling substructures as discrete objects makes it difficult to compensate for their similarities , and so the risk of overfitting may rise in supervised learning scenarios ( Yanardag & Vishwanathan , 2015 ) . We view these intrinsic difficulties as related to resolution dilemmas in graph-structured data processing . Resolution is the scale at which measurements can be made and/or information processing algorithms are conducted , and here we will discuss two types of resolution and related dilemmas : the spatial resolution ( dilemma ) and the structural resolution ( dilemma ) . Spatial resolution relates to the geometrical scale of the “ component ” that can be identified from the final representation of a graph ( based on which the prediction is performed ) . In GNN , since graph pooling compresses the whole graph into a single vector , node and edge identities are mixed together and the spatial resolution drops to the lowest . We call this vanishing spatial resolution ( dilemma ) . Structural resolution is the fineness level in differentiating between two substructures . Currently practice of exact matching makes it computationally intractable to handle the exponentially many sub-graph instances , and the risk of overfitting may also rise as observed in deep graph kernels ( Yanardag & Vishwanathan , 2015 ) and dictionary learning ( Marsousi et al. , 2014 ) . We will call this over-delicate substructure profiling an exploding structural resolution ( dilemma ) . In fact , these two resolution dilemmas are not isolated . They have a causal relation and the origin is the way we perform identification and comparison of discrete substructures ( more in Section 2.3 ) . Our contribution . Inspired by the well-studied science of complex systems , and in particular the importance of the interacting relation between component parts of a system , we propose a simple neural architecture called “ Structural Landmarking and Interaction Modelling ” - or SLIM . It allows graphs to be projected onto a set of end-to-end optimizable , well-aligned structural landmarks , so that identities of graph substructures and their interactions can be captured explicitly to explain the complexity and improve graph classification . We show that , by resolving the two resolution dilemmas , and subsequently respecting the structural organization of complex systems , SLIM can be empirically very promising and offers new possibilities in graph representation learning . In the rest of the paper , we will first define the resolution dilemmas of graph classification in Section 2 , together with the discussion of related works . We then cover in Section 3 , 4 and 5 the design , analysis , and performance of SLIM , respectively . Finally , the last section concludes the paper . 2 RESOLUTION DILEMMAS IN GRAPH CLASSIFICATION . A complex system is often composed of many parts interacting with each other in a non-trivial way . Since graphs are structural abstraction of complex systems , accurate graph classification depends on how global properties of a system relate to its structure . It is believed that property of a complex system arises from interactions among its components ( Debarsy et al. , 2017 ; Cilliers , 1998 ) . Consequently , accurate interaction modelling should benefit prediction . However , it is non-trivial due to resolution dilemmas , as described in the following subsections . 2.1 SPATIAL RESOLUTION DIMINISHES IN GRAPH POOLING . Graph neural networks ( GNN ) for graph classification typically involves two key blocks , graph convolution and graph pooling ( Kipf & Welling , 2017 ; Hamilton et al. , 2017 ; Xu et al. , 2019 ) , at significantly different spatial resolutions . The goal of convolution is to pass information among neighboring nodes in the general form of hv = AGGREGATE ( { hu , u ∈ Nv } ) , where Nv is the neighbors of v ( Hamilton et al. , 2017 ; Xu et al. , 2019 ) . Here , the spatial resolution is controlled by the number of convolution layers : more layers capture lager substructures/sub-trees and can lead to improved discriminative power ( Xu et al. , 2019 ) . In other words , the spatial resolution in the convolution stage can be controlled easily , and multiple resolutions may be even combined together via CONCATENATE function ( Hamilton et al. , 2017 ; Xu et al. , 2019 ) for improved modelling . The goal of graph pooling is to generate compact , graph- or subgraph-level representations that are compatible across graphs . Due to the lack of natural alignment between non-isomorphic graphs , graph pooling typically “ squeezes ” a graph G into a single vector ( or “ super-node ” ) in the form of hG = READOUT ( { f ( hv ) , ∀v ∈ V } ) , where V is the vertex set of G. The readout functions include : max-pooling ( Cangea et al. , 2018 ) , sumpooling ( Xu et al. , 2019 ) , some other pooling functions ( Hamilton et al. , 2017 ) , or deep sets ( Zaheer et al. , 2017 ) ; attention has been used to evaluate node importance in attention pooling ( Lee et al. , 2019 ) and gPool ( Gao & Ji , 2019 ) ; hierarchical pooling has also been investigated ( Ying et al. , 2018 ) . The spatial resolution drops significantly in graph pooling , as shown in Figure 1 . Since all the nodes ( and their representation ) are mixed into one vector , subsequent classifier can no longer identify any individual substructure regardless of the spatial resolution used in the convolution stage . We call this “ diminishing spatial resolution ” . A diminishing spatial resolution will mix the identity of sub-structures ( e.g. , functional modules of a molecule ) , making it non-trivial to trace the behaviour of the classifier back to meaningful parts of the graph for interpretation . 2.2 STRUCTURAL RESOLUTION EXPLODES IN SUBSTRUCTURE IDENTIFICATION . Substructures are the basic unit to accommodate interacting relations . A global criterion to identify and align substructures is the key to preserving substructure identities and comparing the inherent interactions across graphs . Again , the granularity in determining whether two substructures are “ similar ” or “ different ” is subject to a wide spectrum of choices , which we call “ structural resolution ” . We illustrate the concept in Figure 2 . The right end denotes the finest resolution in differentiating substructures : exact matching , as we manipulate motif/graphlet ( Milo et al. , 2002 ; Alon , 2007 ; Wernicke , 2006 ; Yang et al. , 2018 ; Shervashidze et al. , 2009 ) . The exponential configuration of subgraphs will finally lead to an “ exploding ” structural resolution , because maintaining a large number of unique substructures is computationally infeasible , and easily overfits ( Yanardag & Vishwanathan , 2015 ) . The left end of the spectrum treats all substructures the same and underfits the data . We are interested in a medium structural resolution , where similar substructures are mapped to the same identity , which we believe can benefit the generalization performance ( empirical evidence in Fig . 5 ) . 2.3 RELATION BETWEEN SPATIAL AND STRUCTURAL RESOLUTION DILEMMAS . The two resolution dilemmas have a causal relation , and the logic chain is as follows . 1 . Due to difficulty of characterizing discrete subgraphs , exact matching is typically adopted . 2 . As a result , an exploding structural resolution ( dilemma ) is caused . 3 . Such an over-delicate granularity makes it infeasible to compare substructure across graphs . 4 . As a result , a collapsing-style graph pooling has to be adopted that summarizes the whole graph into a single vector , serving as compatible graph-level features . 5 . As a result , a vanishing spatial resolution ( dilemma ) caused finally . Namely , the exploding structural resolution makes ( collapsing-style ) graph pooling an inevitable choice , which in turn leads to diminishing spatial resolution . Since the root cause of exploding structural resolution is how we typically manipulate discrete sub-structures , i.e. , exact matching , we will replace it with structural landmarking in SLIM , so that both dilemmas are coordinately solved . 3 STRUCTURAL LANDMARKING AND INTERACTION MODELLING ( SLIM ) . The key idea of SLIM is to compute landmarks ( or representatives ) from the distribution of substructures ( embedded in a continuous space ) across different graphs . By doing this , identification and comparison of sub-structures become much easier , and so an identity-preserving graph pooling becomes applicable that explicitly models interaction between component parts of a graph . Problem Setting . Give a set of labeled graphs { Gi , yi } ’ s for i = 1 , 2 , ... , n , with each graph defined on the node/edge set Gi = ( Vi , Ei ) with adjacency matrix Ai ∈ Rni×ni where ni = |Vi| , and yi ∈ { ±1 } . Assume that nodes are drawn from c categories , and the node attribute matrix for Gi is Xi ∈ Rni×c . Our goal is to train an inductive model to predict the labels of the testing graphs . The SLIM network has three main steps : ( 1 ) substurcture embedding , ( 2 ) substructure landmarking , and ( 3 ) identity-preserving graph pooling , as shown in Figure 3 . Detailed discussion follows .
The proposed SLIM algorithm organizes graph neural networks around substructures surrounding "landmarks" in the graph. In addition to presenting the three steps of the SLIM algorithm (sub-structure embedding, sub-structure landmarking, and "identity-preserving" graph pooling), the authors compare to other approaches on a graph classification problem. A large part of the paper is also given over to a high-level discussion of "resolution dilemmas."
SP:b2f40913d778d27c888d81bec337aa81a1acb46c
Federated learning using mixture of experts
1 INTRODUCTION In many real-world scenarios , data is distributed over a large number of devices , due to privacy concerns or communication limitations . Federated learning is a framework that can leverage this data in a distributed learning setup . This allows for exploiting both the compute power of all participating clients , and to benefit from a large joint training data set . Furthermore , this is beneficial for privacy and data security . For example , in keyboard prediction for smartphones , thousands or even millions of users produce keyboard input that can be leveraged as training data . The training can ensue directly on the devices , doing away with the need for costly data transfer , storage , and immense compute on a central server ( Hard et al. , 2018 ) . The medical field is another example area where data is extremely sensitive and may have to stay on premise , and a setting where analysis may require distributed and privacy-protecting approaches . In settings with such firm privacy requirements , standard federated learning approaches may not be enough to guarantee the needed privacy . The optimization problem that we solve in a federated learning setting is min w∈Rd L ( w ) = min w∈Rd 1 n n∑ k=1 E ( x , y ) ∼pk [ ` k ( w ; x , y ) ] ( 1 ) where ` k is the loss for client k and ( x , y ) samples from the kth client ’ s data distribution pk . A central server is coordinating training between the K local clients . The most prevalent algorithm for solving this optimization is the federated averaging ( FEDAVG ) algorithm ( McMahan et al. , 2017 ) . In this solution , each client has its own client model , parameterized bywk which is trained on a local dataset for E local epochs . When all clients have completed the training , their weights are sent to the central server where they are aggregated into a global model , parameterized by wg . In FEDAVG , the k client models are combined via layer-wise averaging of parameters , weighted by the size of their respective local datasets : wgt+1 ← ∑ k nk n wkt+1 , ( 2 ) where nk is the size of the dataset of client k and n = ∑ k nk . Finally , the new global model is sent out to each client , where it constitutes the starting point for the next round of ( local ) training . This process is repeated for a defined number of global communication rounds . The averaging of local models in parameter space generally works but requires some care to be taken in order to ensure convergence . McMahan et al . ( 2017 ) showed that all local models need to be initialized with the same random seed for FEDAVG to work . Extended phases of local training between communication rounds can similarly break training , indicating that the individual client models will over time diverge towards different local minima in the loss landscape . Similarly , different distributions between client datasets will also lead to divergence of client models ( McMahan et al. , 2017 ) . Depending on the use case , however , the existence of local datasets and the option to train models locally can be advantageous : specialized local models , optimized for the data distribution at hand may yield higher performance in the local context than a single global model . Keyboard prediction , for example , based on a global model may represent a good approximation of the population average , but could provide a better experience at the hands of a user when biased towards their individual writing style and word choices . A natural question arises : when is a global FL-trained model better than a specialized local model ? A specialist would be expected to perform better than a global generalist in a pathological non-iid setting , whereas the global generalist would be expected to perform better in an iid setting . To address the issue of specialized local models within the federated learning setting , we propose a general framework based on mixtures of experts of a local and a global model on each client . Local expert models on each client are trained in parallel to the global model , followed by training local gating functions hk ( x ) that aggregate the two models ’ output depending on the input . We show advantages of this approach over fine-tuning the global model on local data in a variety of settings , and analyze the effect that different levels of variation between the local data distributions have on performance . While standard federated learning already shows some privacy enhancing properties , it has been shown that in some settings , properties of the client and of the training data may be reconstructed from the weights communicated to the server ( Wang et al. , 2019 ) . To this end , in this paper we will work with a stronger notion of privacy . While existing solutions may be private enough for some settings , we will assume that a client that require privacy for some of its data , needs this data to not influence the training of the global model at all . Instead , our framework allows for complete opting out from the federation with all or some of the data at any given client . Clients with such preferences will still benefit from the global model and retain a high level of performance on their own , skewed data distribution . This is important when local datasets are particularly sensitive , as may be the case in medical applications . Our experimental evaluation demonstrate the robustness of our learning framework with different levels of skewness in the data , and under varying fractions of opt-out clients . 2 RELATED WORK . Distributed machine learning has been studied as a strategy to allow for training data to remain with the clients , giving it some aspects of privacy , while leveraging the power of learning from bigger data and compute ( Konečnỳ et al. , 2016 ; Shokri & Shmatikov , 2015 ; McMahan et al. , 2017 ; Vanhaesebrouck et al. , 2016 ; Bellet et al. , 2018 ) . The federated averaging technique ( McMahan et al. , 2017 ) has been influential and demonstrated that layer-wise averaging of the weights in neural network models trained separately at the clients is successful in many settings , producing a federated model that demonstrates some ability to generalize from limited subsets of data at the clients . However , it has been shown that federated averaging struggles when data is not independent and identically distributed among the clients ( the non-iid setting ) , which shows that there is a need for personalization within federated learning ( Kairouz et al. , 2019 ) . In general , addressing class imbalance with deep learning is still a relatively understudied problem ( Johnson & Khoshgoftaar , 2019 ) . A common approach for personalization is to first train a generalist model and then fine-tune it using more specific data . This approach is used in meta-learning ( Finn et al. , 2017 ) , domain adaptation ( Mansour et al. , 2009 ) , and transfer learning ( Oquab et al. , 2014 ) . This approach was proposed for the distributed setting by Wang et al . ( 2019 ) who used federated averaging to obtain a generalist model which was later fine-tuned locally on each client , using its specific training data . Some work has been inspired by the meta-learning paradigm to learn models that are specialized at the clients ( Jiang et al. , 2019 ; Fallah et al. , 2020 ) . Arivazhagan et al . ( 2019 ) combined this strategy and ideas from transfer learning with deep neural networks and presented a solution where shallow layers are frozen , and the deeper layers are retrained at every client . Zhao et al . ( 2018 ) propose a strategy to improve training on non-iid client data by creating a subset of data which is globally shared between all clients . Recent strategies have also explored knowledge distillation techniques for federated learning ( Jeong et al. , 2018 ; He et al. , 2020 ; Lin et al. , 2020 ) , which show promising results in non-iid settings . Hanzely & Richtárik ( 2020 ) proposed a solution that provides an explicit trade-off between global and local models by the introduction of an alternative learning scheme that does not take the full federation step at every round , but instead takes a step in the direction towards the federated average . Deng et al . ( 2020 ) proposed to combine a global model w trained using federated averaging , with a local model v with a weight αi . To find optimal αi they optimize α∗i = argminαi∈ [ 0,1 ] fi ( αiv + ( 1− αi ) w ) every communication round . While this weighting scheme will balance the two models , it has no way of adapting to the strengths of the different members of the mix . Mixture of experts ( Jacobs et al. , 1991 ) is the combination of several competing neural networks trained together with a gating network to solve a common task . It was presented as an ensemble method which can be trained end to end using gradient descent . In the current work , we will apply the mixture to leverage the specific strengths of a global model trained with federated averaging , and a local model trained locally on each client . 3 FEDERATED LEARNING USING A MIXTURE OF EXPERTS . In this work , we present a framework for federated learning that builds on federated averaging and mixtures of experts . Our framework includes a personalized model for each client , which is included in a mixture together with a globally trained model using federated learning . The local models never leave the clients , which gives strong privacy properties , while the global model is trained using federated averaging and leverages larger compute and data . In our framework as seen in Figure 1 , some clients can choose to opt-out from the federation , meaning that no information of their data is leaving the client , ensuring privacy of those clients . Let fg be the global model with parameters wg . We denote the index of clients by k and the local models by fkl with parameters w k l . The gating function is denoted by h k , parameterized with wkh . Training in the proposed framework is divided into three main parts . First , a global model fg is trained using federated averaging using opt-in data ( see Section 3.1 ) . Second , a local model fkl is trained using all available data on a client . Third , fg and fkl are further trained together with a gating model hk on each client locally , using all available data on the client . Steps one and two may be performed in parallel if allowed by the available resources . 3.1 PRIVACY GUARANTEES . The proposed framework allows for a strict form of privacy guarantee . Each client may choose an arbitrary part of their data which they consider being too sensitive to use for federated learning , and no information from this data will ever leave the client . The system will still leverage learning from this data by using it to train the local model fkl and the gating model h k. This is a very flexible and useful property . For example , it allows for a user to use the sensitive data in training of the private local models , while transforming it using some privatization mechanism and use the censored version to train the federated model . In general , each client dataset Dk is split into two non-overlapping datasets , DkO and DkI , one of which has to be non-empty . The local model fkl and the gating model h k is trained using the whole dataset Dk = DkO ∪ DkI , while the global model fg is trained with FEDAVG using only the opt-in dataset DkI . This is visualized in Figure 1 .
The proposed method is a federated method allowing to have a certain amount of data shared between all the learners and some data specific to each learner. The targeted field of application is classification for problems where strong privacy is crucial. The method consists in learning a global classifier (with the shared data) as well as local classifiers (one per learner, using the local data). The inference, for each learner, is done with a local expert (another neural network) trained to combine inferences from the local and global models.
SP:9a8aa745df5a94d693dde585ca37765f9d657978
Redefining The Self-Normalization Property
1 INTRODUCTION . In recent years , deep neural networks ( DNNs ) have achieved state-of-the-art performance on different tasks like image classification ( He et al. , 2015 ; Zheng et al. , 2019 ) . This rapid development can be largely attributed to the initialization and normalization techniques that prevent the gradient explosion and vanishing . The initialization techniques ( He et al. , 2015 ; Xiao et al. , 2018 ) initialize the parameters in networks to have good statistical property at beginning , and assume that this property can be more or less maintained throughout the training process . However , this assumption is likely to be violated when the network gets deeper or is trained with higher learning rate . Hence , normalization techniques are proposed to explicitly normalize the network parameters ( Salimans & Kingma , 2016 ; Arpit et al. , 2016 ) or the activations ( Ioffe & Szegedy , 2015b ; Ulyanov et al. , 2016 ) during training . In particular , Batch Normalization ( BN ) ( Ioffe & Szegedy , 2015a ) has become a standard component in DNNs , as it not only effectively improves convergence rate and training stability , but also regularizes the model to improve generalization ability . However , BN still has several drawbacks . First , when calculating the mean and variance , the accumulation must be done under FP32 to avoid underflow ( Micikevicius et al. , 2018 ) . This brings challenges when training neural networks in low bit width . Second , the performance degradation under micro batch size also makes it more difficult to design training accelerators , as the large batch size increases the memory size to store the intermediate results for backward pass ( Deng et al. , 2020 ) . Besides , Chen et al . ( 2020a ) ; Wu et al . ( 2018 ) show that BN introduces considerable overhead . The self-normalizing neural network ( SNN ) provides a promising way to address this challenge . SNN initializes the neural network to have a good statistical property at the beginning just like initialization techniques . However , the statistics deviation in forward and backward passes can be gradually fixed during propagation , thus it is more robust to the deviation from initial properties ( Chen et al. , 2020b ) . For instance , the mean and variance of output activations with SELU in Klambauer et al . ( 2017 ) automatically converge the fixed point ( 0 , 1 ) . Chen et al . ( 2020b ) analyze the Frobenius norm of backward gradient in SNN activated with SELU . They reveal a trade-off between the self-normalization property and the speed of gradient explosion in the backward pass , and the hyper-parameters need to be configured according to the depth of the network . The resulting activation function , depth-aware SELU ( dSELU ) , has achieved even higher accuracy than the original configuration on moderate-scale datasets like CIFAR-10 , and makes the SNN trainable on ImageNet . However , in deeper neural networks , the dSELU gradually degenerates to ReLU and loses its selfnormalization property . Moreover , even with dSELU , the test accuracy on ImageNet with Conv MobileNet V1 ( Howard et al. , 2017 ) is still 1.79 % lower than BN ( Chen et al. , 2020b ) . Therefore , we aim to answer the following three questions in this paper : 1 ) . Is SELU the only activation function that has self-normalization property ? 2 ) . If it is not , is there a better choice ? And how do we compare the strength of self-normalization property between different activation functions ? 3 ) . Why the performance of SNN on ImageNet is less satisfying ? Is there any way to alleviate that ? In this paper , we analyze the signal propagation in both forward and backward passes in serial deep neural networks with mean-field theory ( Poole et al. , 2016 ) and block dynamical isometry ( Chen et al. , 2020b ) . Our main theoretical results are summarized as follows : • We illustrate that an activation function would demonstrate self-normalization property if the second moment of its Jacobian matrix ’ s singular values φ ( q ) is inversely proportional to the second moment of its input pre-activations q , and the property gets stronger when φ ( q ) gets closer to 1/q . A new definition of the self-normalization property is proposed that can be easily used both analytically and numerically . • We propose leaky SELU ( lSELU ) and scaled SELU ( sSELU ) . Both of them have an additional parameter , β , that can be configured to achieve stronger self-normalization property . The hyper-parameters can be solved with a constrained optimization program , thus no additional hyper-parameter relative to dSELU is introduced . • We reveal that models with larger fan-in have weaker normalization effectiveness on the mean of the forward pass signal . This can be solved with explicit weight centralization , mixup data augmentation ( Zhang et al. , 2018 ) , and centralized activation function . On CIFAR-10 , CIFAR-100 , and Tiny ImageNet , lSELU and sSELU achieves up to 2.13 % higher test accuracy than previous studies . On ImageNet - Conv MobileNet V1 , sSELU with Mixup , trainable λ , and centralized activation function achieves comparable test accuracy ( 71.95 % ) with BN . Besides , we provide a CUDA kernel design for lSELU and sSELU that has only 2 % overhead than SELU . 2 RELATED WORK . In this section , we present an overview of existing studies on the self-normalizing neural networks ( SNN ) as well as statistical studies on forward and backward signals in deep neural networks . Self-normalizing Neural Network . Scaled Exponential Linear Unit ( SELU ) ( Klambauer et al. , 2017 ) scales the Exponent Linear Unit ( ELU ) by a constant scalar λ . The λ and original parameter α in ELU are configured such that the mean and variance of output activation have a fixed point ( 0 , 1 ) . The authors further prove that this fixed point is still stable and attractive even when the input activations and the weights are unnormalized . Chen et al . ( 2020b ) investigate the fixed point in backward gradient . They reveal that the gradient of SNN is exploding with the rate ( 1 + ) per layer , where is a small positive value . The self-normalizing property gets stronger when is larger , whereas the gradient will explode at a higher rate . Therefore , they propose the depth-aware SELU in which the ≈ 1/L is used to derive the optimal α and λ in SELU for a network with depth L. Statistical Analysis of Deep Neural Networks . Schoenholz et al . ( 2016 ) ; Poole et al . ( 2016 ) ; Burkholz & Dubatovka ( 2018 ) investigate the forward activations under the limit of large layer width with mean-field theory . They have identified an Order-to-Chaos phase transition characterized by the second moment of singular values of the network ’ s input-output Jacobian matrix . The neural network has good performance when it is on the border of the order and chaos phases . On the other hand , Chen et al . ( 2020b ) develop a very handy framework for analyzing the Frobenius norm of gradient . They illustrate that the gradient norm equality is a universal philosophy behind various different initialization , normalization techniques , and even some neural network structures . The gradient norm equality means the Frobenius Norm of the gradient is more or less equal in different layers so that the information flow in the backward pass can be well preserved . ( Arpit & Bengio , 2020 ) 3 SELF-NORMALIZATION PROPERTY . In this section , we formally define the self-normalization property under the problem formulation , notations , and assumptions as follows . Problem Formulation . Let ’ s consider a DNN with L layers . Each layer performs a linear transform followed by a non-linear element-wise activation function f , i.e . xl = f ( hl ) , hl = Wlxl−1 + bl , l = 1 , ... , L , ( 1 ) where xl ∈ RNl is the output feature vector of layer l , hl is the pre-activation vector , Wl is the weight of fully-connected layer or the expanded doubly block circulant matrix ( Sedghi et al. , 2019 ) of 2D convolution , bl is the vector of biases , and we denote the loss as L. Besides , without loss of generality , for f and x ∼ N ( 0 , q ) , we have ( 1 + δq ) E [ f2 ( x ) ] = E [ ( df ( x ) /dx ) 2 ] E [ x2 ] , ( 2 ) where δq is a function of q . Following previous studies ( Poole et al. , 2016 ; Chen et al. , 2020b ) , for ∀ l , we make the assumptions as follows : Assumption 1 The mean of entries inWl and bl are zero . Assumption 2 With central limit theory , the entries in hl follow i.i.d . N ( 0 , ql ) , ql = 1Nlh T l hl . Assumption 3 The eigenvalues ofW Tl Wl are independent with entries in hl−1 . Klambauer et al . ( 2017 ) first define the self-normalization property of a neural network as follows . Definition 1 ( Self-normalizing Neural Network ) A neural network is self-normalizing if it possesses a mapping g : Ω→ Ω for each activation y that maps mean and variance from one layer to the next and has a stable and attracting fixed point depending on ( ω , τ ) in Ω . Furthermore , the mean and the variance remain in the domain Ω , that is g ( Ω ) ⊆ Ω , where Ω = { ( µ , ν ) |µ ∈ [ µmin , µmax ] , ν ∈ [ νmin , νmax ] } . When iteratively applying the g , each point within Ω converges to this fixed point . This definition imitates the explicit normalization techniques like BN , which ensures that the feedforward signal is normalized . Based on Definition 1 , Klambauer et al . ( 2017 ) propose the SELU : f ( x ) = λ { x if x > 0 αex − α if x ≤ 0 . ( 3 ) Besides , Klambauer et al . ( 2017 ) initialize the entries in Wl with N ( 0 , 1/Nl−1 ) , so that the output pre-activation will have the same second moment of input activation . With the stable fixed points of mean and variance around ( 0 , 1 ) , the optimal choice for λ and α can be derived from∫ ∞ −∞ f ( z ) e− z2 2 √ 2π dz = 0 , ∫ ∞ −∞ f2 ( z ) e− z2 2 √ 2π dz = 1 . ( 4 ) Furthermore , the authors prove that the fixed points for mean and variance are still attractive even when the statistical properties of the parameters in the neural network deviate from the initial setup . However , the statistical fixed point in the forward pass doesn ’ t necessarily lead to good dynamics of gradient . Chen et al . ( 2020b ) analyze the Frobenius norm of the gradient in neural networks activated by SELU . With the same activation function shown in equation 3 , their analysis shows that the optimal λ and α can be configured by preserving the Frobenius norm of backward gradient and second moment of forward activations with equations as follows : ∫ ∞ −∞ ( df ( z ) dz ) 2 e− z2 2 √ 2π dz=1 + , ∫ ∞ −∞ f2 ( z ) e− z2 2 √ 2π dz = 1 . ( 5 ) where is a small positive constant , without which the only solution for equation 5 would be λ = √ 2 and α = 0 , and the activation function degenerates back to ReLU with the initialization technique proposed in He et al . ( 2015 ) . Thus it will lose the self-normalization property . Conversely , a relatively large will bring stronger self-normalization property , but meanwhile make the Frobenius norm of gradient explode with rate ( 1+ ) per layer . Notably , the original configuration of SELU can be obtained by setting = 0.0716 . Therefore , Chen et al . ( 2020b ) assert that having ≈ 1L could bring a good trade-off between gradient norm stability and self-normalization property . Experiments on CIFAR-10 and ImageNet show that the new configuration results in higher accuracy . Inspired by Chen et al . ( 2020b ) , we formally redefine the self-normalization property as follows : Definition 2 ( Self-normalization Property ) Given an activation function f , we define operand φ as φ ( q ) = ∫ ∞ −∞ ( df ( √ qz ) d √ qz ) 2 e− z2 2 √ 2π dz . ( 6 )
The paper proposes two modifications to SELU activation function to improve it with regards to preserving forward-backward signal propagation in neural networks. The work builds on top of the mean-field theory literature and provides a modified self-normalization property (additional constraints compared to SELU). Further, it discusses some heuristics (mixup, weight centralization) to improve performance in practice.
SP:235d680e5cfac85db6704ba1d79eb7b728da8d08
Learning to Deceive Knowledge Graph Augmented Models via Targeted Perturbation
1 INTRODUCTION . Recently , neural reasoning over knowledge graphs ( KGs ) has emerged as a popular paradigm in machine learning and natural language processing ( NLP ) . KG-augmented models have improved performance on a number of knowledge-intensive downstream tasks : for question answering ( QA ) , the KG provides context about how a given answer choice is related to the question ( Lin et al. , 2019 ; Feng et al. , 2020 ; Lv et al. , 2020 ; Talmor et al. , 2018 ) ; for item recommendation , the KG mitigates data sparsity and cold start issues ( Wang et al. , 2018b ; 2019a ; b ; 2018a ) . Furthermore , by using attention over the KG , such models aim to explain which KG information was most relevant for making a given prediction ( Lin et al. , 2019 ; Feng et al. , 2020 ; Wang et al. , 2018b ; 2019b ; Cao et al. , 2019 ; Gao et al. , 2019 ) . Nonetheless , the process in which KG-augmented models reason about KG information is still not well understood . It is assumed that , like humans , KG-augmented models base their predictions on meaningful KG paths and that this process is responsible for their performance gains ( Lin et al. , 2019 ; Feng et al. , 2020 ; Gao et al. , 2019 ; Song et al. , 2019 ) . In this paper , we question if existing KG-augmented models actually use KGs in this human-like manner . We study this question primarily by measuring model performance when the KG ’ s semantics and structure have been perturbed to hinder human comprehension . To perturb the KG , we propose four perturbation heuristics and a reinforcement learning ( RL ) based perturbation algorithm . Surprisingly , for KG-augmented models on both commonsense QA and item recommendation , we find that the KG can be extensively perturbed with little to no effect on performance . This raises doubts about KG-augmented models ’ use of KGs and the plausibility of their explanations . 2 PROBLEM SETTING . Our goal is to investigate whether KG-augmented models and humans use KGs similarly . Since KGs are human-labeled , we assume that they are generally accurate and meaningful to humans . Thus , across different perturbation methods , we measure model performance when every edge in the KG has been perturbed to make less sense to humans . To quantify the extent to which the KG has been perturbed , we also measure both semantic and structural similarity between the original ∗Work done while MR , SA and HW interned remotely at USC . Code and data are available at https : //github.com/INK-USC/deceive-KG-models . †Equal contribution . KG and perturbed KG . If original-perturbed KG similarity is low , then a human-like KG-augmented model should achieve worse performance with the perturbed KG than with the original KG . Furthermore , we evaluate the plausibility of KG-augmented models ’ explanations when using original and perturbed KGs , by asking humans to rate these explanations ’ readability and usability . Notation Let Fθ be an KGaugmented model , and let ( Xtrain , Xdev , Xtest ) be a dataset for some downstream task . We denote a KG as G = ( E , R , T ) , where E is the set of entities ( nodes ) , R is the set of relation types , and T = { ( e1 , r , e2 ) | e1 , e2 ∈ E , r ∈ R } is the set of facts ( edges ) composed from existing entities and relations ( Zheng et al. , 2018 ) . Let G ′ = ( E , R′ , T ′ ) be the KG obtained after perturbing G , where R ′ ⊆ R and T ′ 6= T . Let f ( G , G ′ ) be a function that measures similarity between G and G ′ . Let g ( G ) be the downstream performance when evaluating Fθ on Xtest and G. Also , let ⊕ denote the concatenation operation , and let NL ( e ) denote the set of L-hop neighbors for entity e ∈ E . High-Level Procedure First , we train Fθ on Xtrain and G , then evaluate Fθ on Xtest and G to get the original performance g ( G ) . Second , we freeze Fθ , then perturb G to obtain G ′ . Third , we evaluate Fθ on Xtest and G ′ to get the perturbed performance g ( G ′ ) . Finally , we measure g ( G ) − g ( G′ ) and f ( G , G ′ ) to assess how human-like Fθ ’ s reasoning process is . This procedure is illustrated in Fig . 1 . In this paper , we consider two downstream tasks : commonsense QA and item recommendation . Commonsense QA Given a question x and a set of k possible answers A = { y1 , ... , yk } , the task is to predict a compatibility score for each ( x , y ) pair , such that the highest score is predicted for the correct answer . In commonsense QA , the questions are designed to require commonsense knowledge which is typically unstated in natural language , but more likely to be found in KGs ( Talmor et al. , 2018 ) . Let F textφ be a text encoder ( Devlin et al. , 2018 ) , F graph ψ be a graph encoder , and F cls ξ be an MLP classifier , where φ , ψ , ξ ⊂ θ . Let G ( x , y ) denote a subgraph of G consisting of entities mentioned in text sequence x ⊕ y , plus their corresponding edges . We start by computing a text embedding htext = F textφ ( x⊕ y ) and a graph embedding hgraph = F graph φ ( G ( x , y ) ) . After that , we compute the score for ( x , y ) as S ( x , y ) = F clsξ ( htext ⊕ hgraph ) . Finally , we select the highest scoring answer : ypred = argmaxy∈A S ( x , y ) . KG-augmented commonsense QA models vary primarily in their design of Fgraphψ . In particular , path-based models compute the graph embedding by using attention to selectively aggregate paths in the subgraph . The attention scores can help explain which paths the model focused on most for a given prediction ( Lin et al. , 2019 ; Feng et al. , 2020 ; Santoro et al. , 2017 ) . Item Recommendation We consider a set of users U = { u1 , u2 , ... , um } , a set of items V = { v1 , v2 , ... , vn } , and a user-item interaction matrix Y ∈ Rm×n with entries yuv . If user u has been observed to engage with item v , then yuv = 1 ; otherwise , yuv = 0 . Additionally , we consider a KG G , in which R is the set of relation types in G. In G , nodes are items v ∈ V , and edges are facts of the form ( v , r , v′ ) , where r ∈ R is a relation . For the zero entries in Y ( i.e. , yuv = 0 ) , our task is to predict a compatibility score for user-item pair ( u , v ) , indicating how likely user u is to want to engage with item v. We represent each user u , item v , and relation r as embeddings u , v , and r , respectively . Given a user-item pair ( u , v ) , its compatibility score is computed as 〈u , v〉 , the inner product between u and v. KG-augmented recommender systems differ mainly in how they use G to compute u and v. Generally , these models do so by using attention to selectively aggregate items/relations in G. The attention scores can help explain which items/relations the model found most relevant for a given prediction ( Wang et al. , 2018b ; 2019b ) . 3 KG SIMILARITY METRICS . To measure how much the perturbed KG has deviated from the original KG , we propose several metrics for capturing semantic ( ATS ) and structural ( SC2D , SD2 ) similarity between KGs . Aggregated Triple Score ( ATS ) ATS measures semantic similarity between two KGs . Let sG be an edge ( triple ) scoring function , such that sG ( e1 , r , e2 ) measures how likely edge ( e1 , r , e2 ) is to exist in G. Also , assume sG has been pre-trained on G for link prediction . Then , ATS is defined as fATS ( G , G ′ ) = 1 |T ′ | ∑ ( e1 , r , e2 ) ∈T ′ sG ( e1 , r , e2 ) ∈ [ 0 , 1 ] , which denotes the mean sG score across all edges in G′ . Intuitively , if a high percentage of edges in G′ are also likely to exist in G ( i.e. , high ATS ) , then we say that G′ and G have high semantic similarity . sG is task-specific , as KGs from different tasks may differ greatly in semantics . For commonsense QA , we use the sG from Li et al . ( 2016 ) ; for item recommendation , we use the sG from Yang et al . ( 2015 ) . While ATS captures semantic KG differences , it is not sensitive to KG connectivity structure . Note that fATS ( G , G ) may not equal 1 , since sG may not perfectly generalize to KGs beyond those it was trained on . Similarity in Clustering Coefficient Distribution ( SC2D ) SC2D measures structural similarity between two KGs and is derived from the local clustering coefficient ( Saramäki et al. , 2007 ; Onnela et al. , 2005 ; Fagiolo , 2007 ) . For a given entity in G ( treated here as undirected ) , the local clustering coefficient is the fraction of possible triangles through the entity that exist ( i.e. , how tightly the entity ’ s neighbors cluster around it ) . For entity ei ∈ E , the local clustering coefficient is defined as ci = 2Tri ( ei ) / ( deg ( ei ) ( deg ( ei ) − 1 ) ) , where Tri ( ei ) is the number of triangles through ei , and deg ( ei ) is the degree of ei . For each relation r ∈ R , let Gr be the subgraph of G consisting of all edges in T with r . That is , Gr = ( E , r , T ′ ) , where T ′ = { ( e , r , e′ ) | e , e′ ∈E } . Let cr denote the |E|-dimensional clustering coefficient vector for Gr , where the ith element of cr is ci . Then , the mean clustering coefficient vectors for G and G′ are co = 1|R| ∑ r∈R c r and cp = 1|R′| ∑ r∈R′ c r , respectively . SC2D is defined as fSC2D ( G , G ′ ) = 1− ‖co−cp‖2‖co−cp‖2+1 ∈ [ 0 , 1 ] , with higher value indicating higher similarity . Similarity in Degree Distribution ( SD2 ) SD2 also measures structural similarity between two KGs , while addressing SC2D ’ s ineffectiveness when the KGs ’ entities have tiny local clustering coefficients ( e.g. , the item KG used by recommender systems is roughly bipartite ) . In such cases , SC2D is always close to one regardless of perturbation method , thus rendering SC2D useless . Let dr denote the |E|-dimensional degree vector for Gr , where the ith element of dr is deg ( ei ) . Then , the mean degree vectors for G and G′ are do = 1|R| ∑ r∈R d r and dp = 1|R′| ∑ r∈R′ d r , respectively . SD2 is defined as fSD2 ( G , G ′ ) = 1− ‖do−dp‖2‖do−dp‖2+1 ∈ [ 0 , 1 ] , with higher value indicating higher similarity .
The paper provides a number of adversarial attacks on hybrid neural-symbolic systems. The systems are recommender and QA systems which use an underlying knowledge-graph (KG) such as ConceptNet. Previous work has suggested that the KGs are important for good performance, and moreover that the use of KGs lends the system a degree of interpretability. The attacks are successful - maintaining performance whilst seriously degrading the KG - throwing doubt on these claims.
SP:7d6dc558590032eefb2033e9a2c784124bac8ac1