paper_name stringlengths 11 170 | text stringlengths 8.07k 307k | summary stringlengths 152 6.16k | paper_id stringlengths 43 43 |
|---|---|---|---|
Multi-Agent Imitation Learning with Copulas | 1 INTRODUCTION . Recent years have witnessed great success of reinforcement learning ( RL ) for single-agent sequential decision making tasks . As many real-world applications ( e.g. , multi-player games ( Silver et al. , 2017 ; Brown & Sandholm , 2019 ) and traffic light control ( Chu et al. , 2019 ) ) involve the participation of multiple agents , multi-agent reinforcement learning ( MARL ) has gained more and more attention . However , a key limitation of RL and MARL is the difficulty of designing suitable reward functions for complex tasks with implicit goals ( e.g. , dialogue systems ) ( Russell , 1998 ; Ng et al. , 2000 ; Fu et al. , 2017 ; Song et al. , 2018 ) . Indeed , hand-tuning reward functions to induce desired behaviors becomes especially challenging in multi-agent systems , since different agents may have completely different goals and state-action representations ( Yu et al. , 2019 ) . Imitation learning provides an alternative approach to directly programming agents by taking advantage of expert demonstrations on how a task should be solved . Although appealing , most prior works on multi-agent imitation learning typically assume agents make independent decisions after observing a state ( i.e. , mean-field factorization of the joint policy ) ( Zhan et al. , 2018 ; Le et al. , 2017 ; Song et al. , 2018 ; Yu et al. , 2019 ) , ignoring the potentially complex dependencies that exist among agents . Recently , Tian et al . ( 2019 ) and Liu et al . ( 2020 ) proposed to implement correlated policies with opponent modeling , which incurs unnecessary modeling cost and redundancy , while still lacking coordination during execution . Compared to the single-agent setting , one major and fundamental challenge in multi-agent learning is how to model the dependence among multiple agents in an effective and scalable way . Inspired by probability theory and statistical dependence modeling , in this work , we propose to use copulas ( Sklar , 1959b ; Nelsen , 2007 ; Joe , 2014 ) to model multi-agent behavioral patterns . Copulas are powerful statistical tools to describe the dependence among random variables , which have been widely used in quantitative finance for risk measurement and portfolio optimization ( Bouyé et al. , 2000 ) . Using a copulas-based multi-agent policy enables us to separately learn marginals that capture the local behavioral patterns of each individual agent and a copula function that only and fully captures the dependence structure among the agents . Such a factorization is capable of modeling arbitrarily complex joint policy and leads to interpretable , efficient and scalable multi-agent imitation learning . As a motivating example ( see Figure 1 ) , suppose there are two agents , each with one-dimensional action space . In Figure 1a , although two joint policies are quite different , they actually share the same copula ( dependence structure ) and one marginal . Our proposed copula-based policy is capable a2 π ( a1 , a2|s ) da2 ) as well as the copula c ( F1 ( a1|s ) , F2 ( a2|s ) ) on the unit cube . Here Fi is the cumulative distribution function of the marginal πi ( ai|s ) and ui : = Fi ( ai|s ) is the uniformly distributed random variable obtained by probability integral transform with Fi . More details and definitions can be found in Section 3.2. of capturing such information and more importantly , we may leverage such information to develop efficient algorithms for such transfer learning scenarios . For example , when we want to model teamplay in a soccer game and one player is replaced by his/her substitute while the dependence among different roles are basically the same regardless of players , we can immediately obtain a new joint policy by switching in the new player ’ s marginal while keeping the copula and other marginals unchanged . On the other hand , as shown in Figure 1b , two different joint policies may share the same marginals while having different copulas , which implies that the mean-field policy in previous works ( only modeling marginal policies and making independent decisions ) can not differentiate these two scenarios to achieve coordination correctly . Towards this end , in this paper , we propose a copula-based multi-agent imitation learning algorithm , which is interpretable , efficient and scalable for modeling complex multi-agent interactions . Extensive experimental results on synthetic and real-world datasets show that our proposed method outperforms state-of-the-art multi-agent imitation learning methods in various scenarios and generates multi-agent trajectories close to expert demonstrations . 2 PRELIMINARIES . In this work , we consider the problem of multi-agent imitation learning under the framework of Markov games ( Littman , 1994 ) , which generalize Markov Decision Processes to multi-agent settings , where N agents are interacting with each other . Specifically , in a Markov game , S is the common state space , Ai is the action space for agent i ∈ { 1 , . . . , N } , η ∈ P ( S ) is the initial state distribution and P : S × A1 × . . . × AN → P ( S ) is the state transition distribution of the environment that the agents are interacting with . Here P ( S ) denotes the set of probability distributions over state space S. Suppose at time t , agents observe s [ t ] ∈ S and take actions a [ t ] : = ( a1 [ t ] , . . . , aN [ t ] ) ∈ A1× . . .×AN , the agents will observe state s [ t+1 ] ∈ S at time t+1 with probability P ( s [ t + 1 ] |s [ t ] , a1 [ t ] , . . . , aN [ t ] ) . In this process , the agents select the joint action a [ t ] by sampling from a stochastic joint policy π : S → P ( A1 × . . . × AN ) . In the following , we will use subscript −i to denote all agents except for agent i . For example , ( ai , a−i ) represents the actions of all agents ; πi ( ai|s ) and πi ( ai|s , a−i ) represent the marginal and conditional policy of agent i induced by the joint policy π ( a|s ) ( through marginalization and Bayes ’ s rule respectively ) . We consider the following off-line imitation learning problem . Suppose we have access to a set of demonstrations D = { τ j } Mj=1 provided by some expert policy πE ( a|s ) , where each expert trajectory τ j = { ( sj [ t ] , aj [ t ] ) } Tt=1 is collected by the following sampling process : s1 ∼ η ( s ) , a [ t ] ∼ πE ( a|s [ t ] ) , s [ t+ 1 ] ∼ P ( s|s [ t ] , a [ t ] ) for t ∈ { 1 , . . . , T } . The goal is to learn a parametric joint policy πθ to approximate the expert policy πE such that we can do downstream inferences ( e.g. , action prediction and trajectory generation ) . The learning problem is off-line as we can not ask for additional interactions with the expert policy or the environment during training , and the reward is also unknown . 3 MODELING MULTI-AGENT INTERACTIONS WITH COPULAS . 3.1 MOTIVATION . Many modeling methods for multi-agent learning tasks employ a simplifying mean-field assumption that the agents make independent action choices after observing a state ( Albrecht & Stone , 2018 ; Song et al. , 2018 ; Yu et al. , 2019 ) , which means the joint policy can be factorized as follows : π ( a1 , . . . , aN |s ) = N∏ i=1 πi ( ai|s ) ( 1 ) Such a mean-field assumption essentially allows for independent construction of each agent ’ s policy . For example , multi-agent behavior cloning by maximum likelihood estimation is now equivalent to performing N single-agent behavior cloning tasks : max π E ( s , a ) ∼ρπE [ logπ ( a|s ) ] = N∑ i=1 max πi E ( s , ai ) ∼ρπE , i [ log πi ( ai|s ) ] ( 2 ) where the occupancy measure ρπ : S × A1 × . . . × AN → R denotes the state action distribution encountered when navigating the environment using the joint policy π ( Syed et al. , 2008 ; Puterman , 2014 ) and ρπ , i is the corresponding marginal occupancy measure . However , when the expert agents are making correlated action choices ( e.g. , due to joint plan and communication in a soccer game ) , such a simplifying modeling choice is not able to capture the rich dependency structure and coordination among agent actions . To address this issue , recent works ( Tian et al. , 2019 ; Liu et al. , 2020 ) propose to use a different factorization of the joint policy such that the dependency among N agents can be preserved : π ( ai , a−i|s ) = πi ( ai|s , a−i ) π−i ( a−i|s ) for i ∈ { 1 , . . . , N } . ( 3 ) Although such a factorization is general and captures the dependency among multi-agent interactions , several issues still remain . First , the modeling cost is increased significantly , because now we need to learn N different and complicated opponent policies π−i ( a−i|s ) as well as N different marginal conditional policies πi ( ai|s , a−i ) , each with a deep neural network . It should be noted that there are many redundancies in such a modeling choice . Specifically , suppose there are N agents and N > 3 , for agent 1 and N , we need to learn opponent policies π−1 ( a2 , . . . , aN |s ) and π−N ( a1 , . . . , aN−1|s ) respectively . These are potentially high dimensional and might require flexible function approximations . However , the dependency structure among agent 2 to agent N − 1 are modeled in both π−1 and π−N , which incurs unnecessary modeling cost . Second , when executing the policy , each agent i makes decisions through its marginal policy πi ( ai|s ) = Eπ−i ( a−i|s ) ( ai|s , a−i ) by first sampling a−i from its opponent policy π−i then sampling its action ai from πi ( ·|s , a−i ) . Since each agent is performing such decision process independently , coordination among agents are still impossible due to sampling randomness . Moreover , a set of independently learned conditional distributions are not necessarily consistent with each other ( i.e. , induced by the same joint policy ) ( Yu et al. , 2019 ) . In this work , to address above challenges , we draw inspiration from probability theory and propose to use copulas , a statistical tool for describing the dependency structure between random variables , to model the complicated multi-agent interactions in a scalable and efficient way . 3.2 COPULAS . When the components of a multivariate random variable x = ( x1 , . . . , xN ) are jointly independent , the density of x can be written as : p ( x ) = N∏ i=1 p ( xi ) ( 4 ) When the components are not independent , this equality does not hold any more as the dependencies among x1 , . . . , xN can not be captured by the marginals p ( xi ) . However , the differences can be corrected by multiplying the right hand side of Equation ( 4 ) with a function that only and fully describes the dependency . Such a function is called a copula ( Nelsen , 2007 ) , a multivariate distribution function on the unit hyper-cube with uniform marginals . Intuitively , let us consider a random variable xi with continuous cumulative distribution function Fi . Applying probability integral transform gives us a random variable ui = Fi ( xi ) , which has standard uniform distribution . Thus one can use this property to separate the information in marginals from the dependency structures among x1 , . . . , xN by first projecting each marginal onto one axis of the hyper-cube and then capture the pure dependency with a distribution on the unit hyper-cube . Formally , a copula is the joint distribution of random variables u1 , . . . , uN , each of which is marginally uniformly distributed on the interval [ 0 , 1 ] . Furthermore , we introduce the following theorem that provides the theoretical foundations of copulas : Theorem 1 ( ( Sklar , 1959a ) ) . Suppose the multivariate random variable ( x1 , . . . , xN ) has marginal cumulative distribution functions F1 , . . . , FN and joint cumulative distribution function F , then there exists a unique copula C : [ 0 , 1 ] N → [ 0 , 1 ] such that : F ( x1 , . . . , xN ) = C ( F1 ( x1 ) , . . . , FN ( xN ) ) ( 5 ) When the multivariate distribution has a joint density f and marginal densities f1 , . . . , fN , we have : f ( x1 , . . . , xN ) = N∏ i=1 fi ( xi ) · c ( F1 ( x1 ) , . . . , FN ( xN ) ) ( 6 ) where c is the probability density function of the copula . The converse is also true . Given a copula C and marginals Fi ( xi ) , then C ( F1 ( x1 ) , . . . , FN ( xN ) ) = F ( x1 , . . . , xN ) is a N -dimensional cumulative distribution function with marginal distributions Fi ( xi ) . Theorem 1 states that every multivariate cumulative distribution function F ( x1 , . . . , xN ) can be expressed in terms of its marginals Fi ( xi ) and a copula C ( F1 ( x1 ) , . . . , FN ( xN ) ) . Comparing Eq . ( 4 ) with Eq . ( 6 ) , we can see that a copula function encoding correlations between random variables can be used to correct the mean-field approximation for arbitrarily complex distribution . | The paper proposes a multi-agent imitation learning method that learns a joint policy for all agents from offline demonstrations. The key idea is to first learn a marginal policy for each agent using behavioral cloning, then fit a copula function that captures dependencies between the agents' policies. Experiments with particle simulations, simulated driving, and simulated RoboCup suggest that this approach could potentially outperform prior methods. | SP:900ada28e9a27c6ad856871ad5f04c50dc95e023 |
Bypassing the Ambient Dimension: Private SGD with Gradient Subspace Identification | 1 INTRODUCTION . Many fundamental machine learning tasks involve solving empirical risk minimization ( ERM ) : given a loss function ` , find a model w ∈ Rp that minimizes the empirical risk L̂n ( w ) = 1 n ∑n i=1 ` ( w , zi ) , where z1 , . . . , zn are i.i.d . examples drawn from a distribution P . In many applications , the training data may contain highly sensitive information about some individuals . When the models are given by deep neural networks , their rich representation can potentially reveal fine details of the private data . Differential privacy ( DP ) ( Dwork et al. , 2006 ) has by now become the standard approach to provide principled and rigorous privacy guarantees in machine learning . Roughly speaking , DP is a stability notion that requires that no individual example has a significant influence on the trained model . One of the most commonly used algorithm for solving private ERM is the differentially-private stochastic gradient descent ( DP-SGD ) ( Abadi et al. , 2016 ; Bassily et al. , 2014 ; Song et al. , 2013 ) –a private variant of SGD that perturbs each gradient update with random noise vector drawn from an isotropic Gaussian distribution N ( 0 , σ2Ip ) , with appropriately chosen variance σ2 . Due to the gradient perturbation drawn from an isotropic Gaussian distribution , the error rate of DP-SGD has a dependence on the ambient dimension p—the number of parameters in the model . In the case of convex loss ` , Bassily et al . ( 2014 ) show that DP-SGD achieves the optimal empirical excess risk of Õ ( √ p/ ( n ) ) . For non-convex loss ` , which is more common in neural network training , minimizing L̂n ( w ) is in general intractable . However , many ( non-private ) gradient-based optimization methods are shown to be effective in practice and can provably find approximate stationary points with vanishing gradient norm ‖∇L̂n ( w ) ‖2 ( see e.g . Nesterov ( 2014 ) ; Ghadimi and Lan ( 2013 ) ) . Moreover , for a wide family of loss functions L̂n under the Polyak-Łojasiewicz condition ( Polyak , 1963 ) , the minimization of gradient norm implies achieving global optimum . With privacy constraint , Wang and Xu ( 2019 ) recently showed that DP-SGD minimize the empirical gradient norm down to Õ ( p1/4/ √ n ) when the loss function ` is smooth . Furthermore , exsiting lower bounds results on private ERM ( Bassily et al. , 2014 ) show that such dependence on p is inevitable in the worst case . However , many modern machine learning tasks now involve training extremely large models , with the number of parameters substantially larger than the number of training samples . For these large models , the error dependence on p can be a barrier to practical private ERM . In this paper , we aim to overcome such dependence on the ambient dimension p by leveraging the structure of the gradient space in the training of neural networks . We take inspiration from the empirical observation from Li et al . ( 2020 ) ; Gur-Ari et al . ( 2018 ) ; Papyan ( 2019 ) that even though the ambient dimension of the gradients is large , the set of sample gradients at most iterations along the optimization trajectory is often contained in a much lower-dimensional subspace . While this observation has been made mostly for non-private SGD algorithm , we also provide our empirical evaluation of this structure ( in terms of eigenvalues of the gradient second moments matrix ) in Figure 1 . Based on this observation , we provide a modular private ERM optimization framework with two components . At each iteration t , the algorithm performs the following two steps : 1 ) Gradient dimension reduction . Let gt be the mini-batch gradient at iteration t. In general , this subroutines solves the following problem : given any k < p , find a linear projection V̂k ( t ) ∈ Rp×k such that the reconstruction error ‖gt − V̂k ( t ) V̂k ( t ) ᵀgt‖ is small . To implement this subroutine , we follow a long line of work that studies private data analysis with access to an auxiliary public dataset Sh drawn from the same distributionP , for which we don ’ t need to provide formal privacy guarantee ( Bassily et al. , 2019b ; 2020 ; Feldman et al. , 2018 ; Avent et al. , 2017 ; Papernot et al. , 2017 ) . In our case , we compute V̂k ( t ) which is given by the top-k eigenspace of the gradients evaluated on Sh . Alternatively , this subroutine can potentially be implemented through private subspace identification on the private dataset . However , to our best knowledge , all existing methods have reconstruction error scaling with √ p ( Dwork et al. , 2014 ) , which will be propagated to the optimization error . 2 ) Projected DP-SGD ( PDP-SGD ) . Given the projection V̂k ( t ) , we perturb gradient in the projected subspace : g̃t = V̂k ( t ) V̂k ( t ) ᵀ ( gt+bt ) , where bt is a p-dimensional Gaussian vector . The projection mapping provides a large reduction of the noise and enables higher accuracy for PDP-SGD . Our results . We provide both theoretical analyses and empirical evaluations of PDP-SGD : Uniform convergence for projections . A key step in our theoretical analysis is to bound the reconstruction error on the gradients from projection of V̂k ( t ) . This reduces to bounding the deviation ‖V̂k ( t ) V̂k ( t ) ᵀ − VkVk ( t ) ᵀ‖2 , where Vk ( t ) denotes the top-k eigenspace of the population second moment matrix E [ ∇ ` ( wt , z ) ∇ ` ( wt , z ) ᵀ ] . To handle the adaptivity of the sequence of iterates , we provide a uniform deviation bound for all w ∈ W , where the set W contains all of the iterates . By leveraging generic chaining techniques , we provide a deviation bound that scales linearly with a complexity measure—the γ2 function due to Talagrand ( 2014 ) —of the set W . We provide lowcomplexity examples of W that are supported by empirical observations and show that their γ2 function only scales logarithmically with p. Convergence for convex and non-convex optimization . Building on the reconstruction error bound , we provide convergence and sample complexity results for our method PDP-SGD in two types of loss functions , including 1 ) smooth and non-convex , 2 ) Lipschitz convex . Under suitable assumptions on the gradient space , our rates only scales logarithmically on p. Empirical evaluation . We provide an empirical evaluation of PDP-SGD on two real datasets . In our experiments , we construct the “ public ” datasets by taking very small random sub-samples of these two datasets ( 100 samples ) . While these two public datasets are not sufficient for training an accurate predictor , we demonstrate that they provide useful gradient subspace projection and substantial accuracy improvement over DP-SGD . Related work . Beyond the aforementioned work , there has been recent work on private ERM that also leverages the low-dimensional structure of the problem . Jain and Thakurta ( 2014 ) ; Song et al . ( 2020 ) show dimension independent excess empirical risk bounds for convex generalized linear problems , when the input data matrix is low-rank . Kairouz et al . ( 2020 ) study unconstrained convex empirical risk minimization and provide a noisy AdaGrad method that achieves dimensionfree excess risk bound , provided that the gradients along the optimization trajectory lie in a lowdimensional subspace . In comparison , our work studies both convex and non-convex problems and our analysis applies to more general low-dimensional structures that can be characterized by small γ2 functions ( Talagrand , 2014 ; Gunasekar et al. , 2015 ) ( e.g. , low-rank gradients and fast decay in the magnitude of the gradient coordinates ) . Recently , Tramer and Boneh ( 2021 ) show that private learning with features learned on public data from a similar domain can significantly improve the utility . Zhang et al . ( 2021 ) leverage the sparsity of the gradients in deep nets to improve the dependence on dimension in the error rate . We also note a recent work ( Yu et al. , 2021 ) that proposes an algorithm similar to PDP-SGD . However , in addition to perturbing the projected gradient in the top eigenspaces in the public data , their algorithm also adds noise to the residual gradient . Their error rate scales with dimension p in general due to the noise added to the full space . To achieve a dimension independent error bound , their analyses require fresh public samples drawn from the same distribution at each step , which consequently requires a large public data set with size scaling linearly with T . In comparison , our analysis does not require fresh public samples at each iteration , and our experiments demonstrate that a small public data set of size no more than 150 suffices.1 2 PRELIMINARIES . Given a private dataset S = { z1 , ... , zn } drawn i.i.d . from the underlying distribution P , we want to solve the following empirical risk minimization ( ERM ) problem subject to differential privacy:2 minw L̂n ( w ) = 1 n ∑n i=1 ` ( w , zi ) . where the parameter w ∈ Rp . We optimize this objective with an iterative algorithm . At each step t , we write wt as the algorithm ’ s iterate and use gt to denote the mini-batch gradient , and ∇L̂n ( wt ) = 1n ∑n i=1∇ ` ( wt , zi ) to denote the empirical gradient . In addition to the private dataset , the algorithm can also freely access to a small public dataset Sh = { z̃1 , . . . , z̃m } drawn from the same distribution P , without any privacy constraint . Notation . We write Mt ∈ Rp×p to denote the second moment matrix of gradients evaluated on public dataset Sh , i.e. , Mt = 1m ∑m i=1∇ ` ( wt , z̃i ) ∇ ` ( wt , z̃i ) ᵀ and write Σt ∈ Rp×p to denote the population second moment matrix , i.e. , Σt = Ez∼P [ ∇ ` ( wt , z ) ∇ ` ( wt , z ) ᵀ ] . We use V ( t ) ∈ Rp×p as the full eigenspace of Σt . We use V̂k ( t ) ∈ Rp×k as the top-k eigenspace ofMt and Vk ( t ) ∈ Rp×k as the top-k eigenspace of Σt . To present our result in the subsequent sections , we introduce the eigen-gap notation αt , i.e. , let λ1 ( Σt ) ≥ ... ≥ λp ( Σt ) be the eigenvalue of Σt , we use αt to denote the eigen-gap between λk ( Σt ) and λk+1 ( Σt ) , i.e. , λk ( Σt ) −λk+1 ( Σt ) ≥ αt . We also define W ∈ Rp as the set that contains all the possible iterates wt ∈ W for t ∈ [ T ] . Throughout , for any matrix A and vector v , ‖A‖2 denotes spectral norm and ‖v‖2 denotes ` 2 norm . Definition 1 ( Differential Privacy ( Dwork et al. , 2006 ) ) A randomized algorithm R is ( , δ ) differentially private if for any pair of datasetsD , D′ differ in exactly one data point and for all event 1Note that the requirement of a large public data set may remove the need of using the private data in the first place , since training with the large public data set may already provide an accurate model . 2In this paper , we focus on minimizing the empirical risk . However , by relying on the generalization guarantee of ( , δ ) -differential privacy , one can also derive a population risk bound that matches the empirical risk bound up to a term of order O ( + δ ) ( Dwork et al. , 2015 ; Bassily et al. , 2016 ; Jung et al. , 2020 ) . Y ⊆ Range ( R ) in the output range of R , we have P { R ( D ) ∈ Y } ≤ exp ( ) P { R ( D′ ) ∈ Y } + δ , where the probability is taken over the randomness ofR . To establish the privacy guarantee of our algorithm , we will combine three standard tools in differential privacy , including 1 ) the Gaussian mechanism ( Dwork et al. , 2006 ) that releases an aggregate statistic ( e.g. , the empirical average gradient ) by Gaussian perturbation , 2 ) privacy amplification via subsampling ( Kasiviswanathan et al. , 2008 ) that reduces the privacy parameters and δ by running the private computation on a random subsample , and 3 ) advanced composition theorem ( Dwork et al. , 2010 ) that tracks the cumulative privacy loss over the course of the algorithm . We analyze our method under two asumptions on the gradients of ` . Assumption 1 For any w ∈ Rp and example z , ‖∇ ` ( w , z ) ‖2 ≤ G. Assumption 2 For any example z , the gradient ∇ ` ( w , z ) is ρ-Lipschitz with respect to a suitable pseudo-metric d : Rp × Rp 7→ R , i.e. , ‖∇ ` ( w , z ) −∇ ` ( w′ , z ) ‖2 ≤ ρd ( w , w′ ) , ∀w , w′ ∈ Rp . Note that Assumption 1 implies that L̂n ( w ) is G-Lipschitz and Assumption 2 implies that L̂n ( w ) is ρ-smooth when d is the ` 2-distance . We will discuss additional assumptions regarding the structure of the stochastic gradients and the error rate for different type of functions in Section 3 . | The paper considers the problem of solving differentially private empirical risk minimization. To reduce the dependence on dimensionality $p$, they propose Projected DP-SGD (PDP-SGD) that projects the noisy gradients to a low-dimensional subspace computed from a free public dataset at each iteration. They prove that PDP-SGD is differentially private and has only a logarithmic dependence on $p$. | SP:d0393690be2cffce0618681c819a41cee75f1434 |
Bypassing the Ambient Dimension: Private SGD with Gradient Subspace Identification | 1 INTRODUCTION . Many fundamental machine learning tasks involve solving empirical risk minimization ( ERM ) : given a loss function ` , find a model w ∈ Rp that minimizes the empirical risk L̂n ( w ) = 1 n ∑n i=1 ` ( w , zi ) , where z1 , . . . , zn are i.i.d . examples drawn from a distribution P . In many applications , the training data may contain highly sensitive information about some individuals . When the models are given by deep neural networks , their rich representation can potentially reveal fine details of the private data . Differential privacy ( DP ) ( Dwork et al. , 2006 ) has by now become the standard approach to provide principled and rigorous privacy guarantees in machine learning . Roughly speaking , DP is a stability notion that requires that no individual example has a significant influence on the trained model . One of the most commonly used algorithm for solving private ERM is the differentially-private stochastic gradient descent ( DP-SGD ) ( Abadi et al. , 2016 ; Bassily et al. , 2014 ; Song et al. , 2013 ) –a private variant of SGD that perturbs each gradient update with random noise vector drawn from an isotropic Gaussian distribution N ( 0 , σ2Ip ) , with appropriately chosen variance σ2 . Due to the gradient perturbation drawn from an isotropic Gaussian distribution , the error rate of DP-SGD has a dependence on the ambient dimension p—the number of parameters in the model . In the case of convex loss ` , Bassily et al . ( 2014 ) show that DP-SGD achieves the optimal empirical excess risk of Õ ( √ p/ ( n ) ) . For non-convex loss ` , which is more common in neural network training , minimizing L̂n ( w ) is in general intractable . However , many ( non-private ) gradient-based optimization methods are shown to be effective in practice and can provably find approximate stationary points with vanishing gradient norm ‖∇L̂n ( w ) ‖2 ( see e.g . Nesterov ( 2014 ) ; Ghadimi and Lan ( 2013 ) ) . Moreover , for a wide family of loss functions L̂n under the Polyak-Łojasiewicz condition ( Polyak , 1963 ) , the minimization of gradient norm implies achieving global optimum . With privacy constraint , Wang and Xu ( 2019 ) recently showed that DP-SGD minimize the empirical gradient norm down to Õ ( p1/4/ √ n ) when the loss function ` is smooth . Furthermore , exsiting lower bounds results on private ERM ( Bassily et al. , 2014 ) show that such dependence on p is inevitable in the worst case . However , many modern machine learning tasks now involve training extremely large models , with the number of parameters substantially larger than the number of training samples . For these large models , the error dependence on p can be a barrier to practical private ERM . In this paper , we aim to overcome such dependence on the ambient dimension p by leveraging the structure of the gradient space in the training of neural networks . We take inspiration from the empirical observation from Li et al . ( 2020 ) ; Gur-Ari et al . ( 2018 ) ; Papyan ( 2019 ) that even though the ambient dimension of the gradients is large , the set of sample gradients at most iterations along the optimization trajectory is often contained in a much lower-dimensional subspace . While this observation has been made mostly for non-private SGD algorithm , we also provide our empirical evaluation of this structure ( in terms of eigenvalues of the gradient second moments matrix ) in Figure 1 . Based on this observation , we provide a modular private ERM optimization framework with two components . At each iteration t , the algorithm performs the following two steps : 1 ) Gradient dimension reduction . Let gt be the mini-batch gradient at iteration t. In general , this subroutines solves the following problem : given any k < p , find a linear projection V̂k ( t ) ∈ Rp×k such that the reconstruction error ‖gt − V̂k ( t ) V̂k ( t ) ᵀgt‖ is small . To implement this subroutine , we follow a long line of work that studies private data analysis with access to an auxiliary public dataset Sh drawn from the same distributionP , for which we don ’ t need to provide formal privacy guarantee ( Bassily et al. , 2019b ; 2020 ; Feldman et al. , 2018 ; Avent et al. , 2017 ; Papernot et al. , 2017 ) . In our case , we compute V̂k ( t ) which is given by the top-k eigenspace of the gradients evaluated on Sh . Alternatively , this subroutine can potentially be implemented through private subspace identification on the private dataset . However , to our best knowledge , all existing methods have reconstruction error scaling with √ p ( Dwork et al. , 2014 ) , which will be propagated to the optimization error . 2 ) Projected DP-SGD ( PDP-SGD ) . Given the projection V̂k ( t ) , we perturb gradient in the projected subspace : g̃t = V̂k ( t ) V̂k ( t ) ᵀ ( gt+bt ) , where bt is a p-dimensional Gaussian vector . The projection mapping provides a large reduction of the noise and enables higher accuracy for PDP-SGD . Our results . We provide both theoretical analyses and empirical evaluations of PDP-SGD : Uniform convergence for projections . A key step in our theoretical analysis is to bound the reconstruction error on the gradients from projection of V̂k ( t ) . This reduces to bounding the deviation ‖V̂k ( t ) V̂k ( t ) ᵀ − VkVk ( t ) ᵀ‖2 , where Vk ( t ) denotes the top-k eigenspace of the population second moment matrix E [ ∇ ` ( wt , z ) ∇ ` ( wt , z ) ᵀ ] . To handle the adaptivity of the sequence of iterates , we provide a uniform deviation bound for all w ∈ W , where the set W contains all of the iterates . By leveraging generic chaining techniques , we provide a deviation bound that scales linearly with a complexity measure—the γ2 function due to Talagrand ( 2014 ) —of the set W . We provide lowcomplexity examples of W that are supported by empirical observations and show that their γ2 function only scales logarithmically with p. Convergence for convex and non-convex optimization . Building on the reconstruction error bound , we provide convergence and sample complexity results for our method PDP-SGD in two types of loss functions , including 1 ) smooth and non-convex , 2 ) Lipschitz convex . Under suitable assumptions on the gradient space , our rates only scales logarithmically on p. Empirical evaluation . We provide an empirical evaluation of PDP-SGD on two real datasets . In our experiments , we construct the “ public ” datasets by taking very small random sub-samples of these two datasets ( 100 samples ) . While these two public datasets are not sufficient for training an accurate predictor , we demonstrate that they provide useful gradient subspace projection and substantial accuracy improvement over DP-SGD . Related work . Beyond the aforementioned work , there has been recent work on private ERM that also leverages the low-dimensional structure of the problem . Jain and Thakurta ( 2014 ) ; Song et al . ( 2020 ) show dimension independent excess empirical risk bounds for convex generalized linear problems , when the input data matrix is low-rank . Kairouz et al . ( 2020 ) study unconstrained convex empirical risk minimization and provide a noisy AdaGrad method that achieves dimensionfree excess risk bound , provided that the gradients along the optimization trajectory lie in a lowdimensional subspace . In comparison , our work studies both convex and non-convex problems and our analysis applies to more general low-dimensional structures that can be characterized by small γ2 functions ( Talagrand , 2014 ; Gunasekar et al. , 2015 ) ( e.g. , low-rank gradients and fast decay in the magnitude of the gradient coordinates ) . Recently , Tramer and Boneh ( 2021 ) show that private learning with features learned on public data from a similar domain can significantly improve the utility . Zhang et al . ( 2021 ) leverage the sparsity of the gradients in deep nets to improve the dependence on dimension in the error rate . We also note a recent work ( Yu et al. , 2021 ) that proposes an algorithm similar to PDP-SGD . However , in addition to perturbing the projected gradient in the top eigenspaces in the public data , their algorithm also adds noise to the residual gradient . Their error rate scales with dimension p in general due to the noise added to the full space . To achieve a dimension independent error bound , their analyses require fresh public samples drawn from the same distribution at each step , which consequently requires a large public data set with size scaling linearly with T . In comparison , our analysis does not require fresh public samples at each iteration , and our experiments demonstrate that a small public data set of size no more than 150 suffices.1 2 PRELIMINARIES . Given a private dataset S = { z1 , ... , zn } drawn i.i.d . from the underlying distribution P , we want to solve the following empirical risk minimization ( ERM ) problem subject to differential privacy:2 minw L̂n ( w ) = 1 n ∑n i=1 ` ( w , zi ) . where the parameter w ∈ Rp . We optimize this objective with an iterative algorithm . At each step t , we write wt as the algorithm ’ s iterate and use gt to denote the mini-batch gradient , and ∇L̂n ( wt ) = 1n ∑n i=1∇ ` ( wt , zi ) to denote the empirical gradient . In addition to the private dataset , the algorithm can also freely access to a small public dataset Sh = { z̃1 , . . . , z̃m } drawn from the same distribution P , without any privacy constraint . Notation . We write Mt ∈ Rp×p to denote the second moment matrix of gradients evaluated on public dataset Sh , i.e. , Mt = 1m ∑m i=1∇ ` ( wt , z̃i ) ∇ ` ( wt , z̃i ) ᵀ and write Σt ∈ Rp×p to denote the population second moment matrix , i.e. , Σt = Ez∼P [ ∇ ` ( wt , z ) ∇ ` ( wt , z ) ᵀ ] . We use V ( t ) ∈ Rp×p as the full eigenspace of Σt . We use V̂k ( t ) ∈ Rp×k as the top-k eigenspace ofMt and Vk ( t ) ∈ Rp×k as the top-k eigenspace of Σt . To present our result in the subsequent sections , we introduce the eigen-gap notation αt , i.e. , let λ1 ( Σt ) ≥ ... ≥ λp ( Σt ) be the eigenvalue of Σt , we use αt to denote the eigen-gap between λk ( Σt ) and λk+1 ( Σt ) , i.e. , λk ( Σt ) −λk+1 ( Σt ) ≥ αt . We also define W ∈ Rp as the set that contains all the possible iterates wt ∈ W for t ∈ [ T ] . Throughout , for any matrix A and vector v , ‖A‖2 denotes spectral norm and ‖v‖2 denotes ` 2 norm . Definition 1 ( Differential Privacy ( Dwork et al. , 2006 ) ) A randomized algorithm R is ( , δ ) differentially private if for any pair of datasetsD , D′ differ in exactly one data point and for all event 1Note that the requirement of a large public data set may remove the need of using the private data in the first place , since training with the large public data set may already provide an accurate model . 2In this paper , we focus on minimizing the empirical risk . However , by relying on the generalization guarantee of ( , δ ) -differential privacy , one can also derive a population risk bound that matches the empirical risk bound up to a term of order O ( + δ ) ( Dwork et al. , 2015 ; Bassily et al. , 2016 ; Jung et al. , 2020 ) . Y ⊆ Range ( R ) in the output range of R , we have P { R ( D ) ∈ Y } ≤ exp ( ) P { R ( D′ ) ∈ Y } + δ , where the probability is taken over the randomness ofR . To establish the privacy guarantee of our algorithm , we will combine three standard tools in differential privacy , including 1 ) the Gaussian mechanism ( Dwork et al. , 2006 ) that releases an aggregate statistic ( e.g. , the empirical average gradient ) by Gaussian perturbation , 2 ) privacy amplification via subsampling ( Kasiviswanathan et al. , 2008 ) that reduces the privacy parameters and δ by running the private computation on a random subsample , and 3 ) advanced composition theorem ( Dwork et al. , 2010 ) that tracks the cumulative privacy loss over the course of the algorithm . We analyze our method under two asumptions on the gradients of ` . Assumption 1 For any w ∈ Rp and example z , ‖∇ ` ( w , z ) ‖2 ≤ G. Assumption 2 For any example z , the gradient ∇ ` ( w , z ) is ρ-Lipschitz with respect to a suitable pseudo-metric d : Rp × Rp 7→ R , i.e. , ‖∇ ` ( w , z ) −∇ ` ( w′ , z ) ‖2 ≤ ρd ( w , w′ ) , ∀w , w′ ∈ Rp . Note that Assumption 1 implies that L̂n ( w ) is G-Lipschitz and Assumption 2 implies that L̂n ( w ) is ρ-smooth when d is the ` 2-distance . We will discuss additional assumptions regarding the structure of the stochastic gradients and the error rate for different type of functions in Section 3 . | The author proposes an algorithm that improves DPSGD by using public data to identify a lower-dimensional space where the gradients lie in. They show that the algorithm can provide a better convergence guarantee, specifically, p reduced to log(p). They also conducted experiments to show the proposed algorithm outperforms the generic DPSGD especially at small epsilon with a small amount of public data. | SP:d0393690be2cffce0618681c819a41cee75f1434 |
On the Importance of Looking at the Manifold | 1 INTRODUCTION . The ability to recognize relational information between or even within individual percepts is one of the fundamental differences between human and artificial learning systems . For example , the feature-binding problem ( Roskies , 1999 ) , i.e . the mechanism governing the visual system to represent hierarchical relationships between features in an image , is still largely unsolved by neuroscientists , exacerbating the development of bio-inspired statistical learning systems . Traditional relational learning approaches mostly sort into either learning internal or external relational structure between samples and rely heavily on crafting domain-specific expert knowledge that is engineered into the model ( Struyf & Blockeel , 2010 ) . Consequently , these models have yet to prove their usability in real applications and , although some neurocomputational frameworks for relational learning were proposed ( Isbister et al. , 2018 ) , building statistical models that explore higher-order dependencies between samples remains a key challenge for computer vision and robotics application . Consequently , relational reasoning has been advocated a pivotal role for the future of artificial intelligence ( Battaglia et al. , 2018 ) . On the very contrary , deep learning as a purely data-driven approach has enjoyed remarkable success in recent years by learning complex non-linear functions mapping raw inputs to outputs without explicit dependency modelling . Fields like relational reinforcement learning ( Džeroski et al. , 2001 ) and statistical relational learning ( Koller et al. , 2007 ) aimed to fill this gap ; but recently augmenting deep ( reinforcement ) learning models toward relational reasoning emerged as a promising approach ( Zambaldi et al. , 2018 ; Zhang et al. , 2016 ) . Many successful contributions for relational modelling in images however largely rely on Euclidean spaces ( Dai et al. , 2017 ; Yao et al. , 2018 ) . It is widely agreed that graphs are the ideal structure to enable relational deep learning ( Hamilton et al. , 2017 ) . Prior work has shown that metagraphs incorporating relational information about the dataset can improve unsupervised representation learning in finding less complex models that preserve relational information without loosing expressivity on the original representation ( Dumancic & Blockeel , 2017 ) . In terms of predictive modelling , the relational representations can be superior to ordinary ones ( Dumancic & Blockeel , 2017 ) and graph-induced kernels can aid in improving phenotype prediction compared to non-topological kernels ( Manica et al. , 2019 ) . In generative modelling , relational distribution comparison was demonstrated to facilitate the learning of generative models across incomparable spaces ( Bunne et al. , 2019 ) . Here , we perform an extensive study on the impact of the topological information in learning data representations . Specifically , we focus on the trade-off between leveraging data point features and relational information . We consider a selection of unsupervised models for learning representations lying in different areas of the spectrum . Ranging from Variational Autoencoders ( VAEs ) ( Kingma & Welling , 2013 ) to node embedding techniques based on random walks on graphs ( Grover & Leskovec , 2016 ) , passing through graph neural networks ( Veličković et al. , 2018 ) and the proposed Graph-Regularized Variational Autoencoders ( GR-VAE ) , our adaptation of VAEs where the latent space is regularized through a metagraph representing relations between samples of the dataset that we introduce in this work . The methods considered are evaluated on different datasets and downstream tasks where the impact of the topology can be appropriately assessed . Initially , we examine the impact of implicitly accounting for the topology to validate the GR-VAE in two synthetic studies based on topologically connected 4D point clouds and MNIST ( LeCun et al. , 2010 ) with added relational information based on the labels . After this initial validation , we move to evaluating all the methods in the case of text representations and chemical reactions . In the case of text representations , we analyze the methods performance on Cora , CiteSeer , and PubMed ( Sen et al. , 2008 ) , using their citation networks , and evaluating the representations learned in a downstream classification task . Finally , we study the impact of the topology in molecule representations using a chemical reaction dataset ( Jin et al. , 2017 ) , where the downstream task consists in predicting the reactivity of reactant/reagent-product pairs . 2 METHODS . In this section we present the different models compared in this study . Our approach is to explore a spectrum of models with varying availability of features and topology ( see Figure 1 ) . 2.1 IMPLICIT TOPOLOGICAL LEARNING . We first explore VAEs ( Kingma & Welling , 2013 ) which only intake features from the nodes , thus serving as a baseline model agnostic to topological information . Graph Regularized VAE . We then introduce a variation of VAEs ( Kingma & Welling , 2013 ) , defined as Graph-Regularized VAEs ( GR-VAE ) , that augments the trade-off between reconstruction error and KL divergence by a topological constraint ( see Figure 2 for an overview ) . In GR-VAE , the latent space is regularized through a metagraph present in the data . We suggest that accounting for available information on how different samples relate ( henceforth simply referred as the graph ) may help at obtaining more powerful representations , especially where this relationships are directly involved with a downstream task of interest . Our approach adds a term to the loss defined by the set of constraints to the samples ’ representation in the latent space given the distances of the samples ’ metagraph . For a given set of samples , S , we can compute their distances in the latent space D , as well as over the graph G. For each node , ν , we expect the distances to the other nodes , once embedded in D , to resemble the distances over G. Thus , we enforce a constraint aimed to preserve the relative distances in the two spaces . Formally , fixing a node ν and considering any pair of nodes ( i , j ) , we can define the following penalty term : φ ( dD , dG , ν , i , j ) = ( dD ( ν , j ) − dD ( ν , i ) ) + if dG ( ν , i ) > dG ( ν , j ) ( dD ( ν , i ) − dD ( ν , j ) ) 2 if dG ( ν , i ) = dG ( ν , j ) ( dD ( ν , i ) − dD ( ν , j ) ) + if dG ( ν , i ) < dG ( ν , j ) ( 1 ) where dD and dG are metrics defined in the latent space and over the graph respectively . In the following , we select the Euclidean distance as dD and the geodesic distance ( Floyd , 1962 ) as dG . The overall loss function of the GR-VAE thus becomes : LGR-VAE ( X ; θ ) = LVAE ( X ; θ ) + γ ∑ ν∈ S ∑ ( i , j ) ∈ S× S φ ( dD , dG , ν , i , j ) ( 2 ) where X are the features of the samples in S , θ the network parameters and γ ≥ 0 regulates the strength of the penalty . 2.2 EXPLICIT TOPOLOGICAL LEARNING . Notably , GR-VAE is devised to infer topological information solely from a soft constraint , without any architectural requirements such as graph convolutions . On the other side of the spectrum , graph neural networks ( GNN ) instead model topology explicitly . Deep Graph Infomax . Here , we consider to a Deep Graph Infomax ( DGI ) , a state-of-the-art GNN for unsupervised representation learning ( Veličković et al. , 2018 ) . DGI relies on maximizing mutual information between subgraphs ( themselves derived with GCNs ) yielding representations that facilitate downstream node-wise classification tasks . These two models used as a comparison for the text classification task . GAE and VGAE . We consider both non-probabilistic Graph Autoencoders ( GAE ) and Variational Graph Autoencoders ( VGAE ) ( Kipf & Welling , 2016 ) which are models for unsupervised-graph data inspired on the VAE . GraphSAGE . We consider GraphSAGE , an inductive framework that generates node embeddings by sampling and aggregating the features for the local neighborhood of a node ( Hamilton et al. , 2018 ) . GraphSAGE is used as a comparison model for the text classification task . node2vec . Finally , we utilize node2vec ( Grover & Leskovec , 2016 ) , which only consumes topological information but no node-specific features . The node2vec algorithm learns a compressed feature space that maximizes the probability to preserve local neighborhoods . With the exception of node2vec , the specific details for the configuration of each model will depend on the dataset we are evaluating on , thus will be detailed in each of the datasets ’ results . 2.3 DATASETS . In the following we describe the datasets used and the experimental setup for the downstream tasks . 2.3.1 SYNTHETIC DATA : A QUALITATIVE ASSESSMENT . First , we consider a synthetic dataset with arbitrarily generated graphs on a plane . Each node ’ s features will be composed by the combination of the first two edges directions ’ ( in the case of nodes with a single edge the feature vector is padded with zeros ) , resulting in a feature vector of 4 dimensions . Thus , each node holds partial , yet insufficient topological information about the graph . As described above , the entire graph is then used to regularize the latent space . 2.3.2 MNIST . On a similar line we expanded this experiments by taking MNIST ( LeCun et al. , 2010 ) and generating a topology across the different labels by chaining the samples from 0 all the way to 9 . We use this dataset to further test the model ’ s capability of affecting the topology of the latent where the individual node features are of higher complexity , at least when compared to the synthetic data , while maintaining comparable reconstruction performance to the non-constrained scenario . 2.3.3 TEXT REPRESENTATION . We evaluate three classification datasets : Cora , CiteSeer , and PubMed ( Sen et al. , 2008 ) . These datasets contain networks of documents linked by the citation links between documents . The text of the document is represented as a bag-of-words , which we take as a feature vector for each of the documents . Furthermore , each document corresponds to a particular task . We divide each dataset , and use a part of it to train the embedding and the other part on a downstream class prediction task , using the embedding model mentioned above . 2.3.4 CHEMICAL REACTION REPRESENTATION . Finally , we analyze the influence of the topology in learning effective representations for molecules in the context of chemical reactions , a topic that has testified a surge in popularity in the recent past as a field for deep learning applications ( Schwaller et al. , 2019 ; 2020 ) . To this end , we adopt the dataset compiled by Jin et al . ( 2017 ) where we represent reagents , reactants and products using SMILES representations ( Weininger , 1988 ) , using the splits provided . For each molecule we extract features using the encoder of a VAE based on stack-augmented GRU layers ( Joulin & Mikolov , 2015 ) , as proposed in Born et al . ( 2020 ) , pretrained on PubChem ( Kim et al. , 2015 ) ( more details can be found in the Appendix A.2 ) . As for the topological reaction representation we consider a bipartite graph connecting the products to all the reactants and reagents . Each reaction bipartite graph is then used to generate the resulting final graph connecting all the nodes that are shared between different reactions . Using the training split provided by Jin et al . ( 2017 ) , the models are finetuned as follows : VAE at molecule level , GR-VAE and DGI at reaction level ( GR-VAE in an implicit form through the loss regularizer ) , node2vec on the aggregated graph . Furthermore , DGI uses the different VAEs and GR-VAEs as part of its encoder . To evaluate the quality of the representations learned and the impact of the topology , we consider the task of predicting whether two molecules are respectively reactant/reagent and products of a valid chemical reaction . The resulting binary classification task has an inherent relation with the underlying reaction network . For VAE , GR-VAE and node2vec we represent a pair of molecules as the concatenation of the encoded molecules/nodes in the respective latent spaces . In the DGI case , we represent the pair as the embedding of a graph connecting the molecules . These representations are then trained on the validation split and later evaluated on the test split as defined by Jin et al . ( 2017 ) . | This paper investigates different ways of incorporating topological information about the data in the machine learning models. The paper introduces a novel loss that aims to enforce the relational information between data points into the embedding space learned by a Vae on the node features. The experiments demonstrate that for data with a certain topology type, the introduced loss can provide performance when used together with existing methods. The paper opens up possibilities of further investigation into incorporating topological information (if available) into the learning procedure. | SP:bc5907a21b9d31cda4e4c4c513792a8f99edd0b6 |
On the Importance of Looking at the Manifold | 1 INTRODUCTION . The ability to recognize relational information between or even within individual percepts is one of the fundamental differences between human and artificial learning systems . For example , the feature-binding problem ( Roskies , 1999 ) , i.e . the mechanism governing the visual system to represent hierarchical relationships between features in an image , is still largely unsolved by neuroscientists , exacerbating the development of bio-inspired statistical learning systems . Traditional relational learning approaches mostly sort into either learning internal or external relational structure between samples and rely heavily on crafting domain-specific expert knowledge that is engineered into the model ( Struyf & Blockeel , 2010 ) . Consequently , these models have yet to prove their usability in real applications and , although some neurocomputational frameworks for relational learning were proposed ( Isbister et al. , 2018 ) , building statistical models that explore higher-order dependencies between samples remains a key challenge for computer vision and robotics application . Consequently , relational reasoning has been advocated a pivotal role for the future of artificial intelligence ( Battaglia et al. , 2018 ) . On the very contrary , deep learning as a purely data-driven approach has enjoyed remarkable success in recent years by learning complex non-linear functions mapping raw inputs to outputs without explicit dependency modelling . Fields like relational reinforcement learning ( Džeroski et al. , 2001 ) and statistical relational learning ( Koller et al. , 2007 ) aimed to fill this gap ; but recently augmenting deep ( reinforcement ) learning models toward relational reasoning emerged as a promising approach ( Zambaldi et al. , 2018 ; Zhang et al. , 2016 ) . Many successful contributions for relational modelling in images however largely rely on Euclidean spaces ( Dai et al. , 2017 ; Yao et al. , 2018 ) . It is widely agreed that graphs are the ideal structure to enable relational deep learning ( Hamilton et al. , 2017 ) . Prior work has shown that metagraphs incorporating relational information about the dataset can improve unsupervised representation learning in finding less complex models that preserve relational information without loosing expressivity on the original representation ( Dumancic & Blockeel , 2017 ) . In terms of predictive modelling , the relational representations can be superior to ordinary ones ( Dumancic & Blockeel , 2017 ) and graph-induced kernels can aid in improving phenotype prediction compared to non-topological kernels ( Manica et al. , 2019 ) . In generative modelling , relational distribution comparison was demonstrated to facilitate the learning of generative models across incomparable spaces ( Bunne et al. , 2019 ) . Here , we perform an extensive study on the impact of the topological information in learning data representations . Specifically , we focus on the trade-off between leveraging data point features and relational information . We consider a selection of unsupervised models for learning representations lying in different areas of the spectrum . Ranging from Variational Autoencoders ( VAEs ) ( Kingma & Welling , 2013 ) to node embedding techniques based on random walks on graphs ( Grover & Leskovec , 2016 ) , passing through graph neural networks ( Veličković et al. , 2018 ) and the proposed Graph-Regularized Variational Autoencoders ( GR-VAE ) , our adaptation of VAEs where the latent space is regularized through a metagraph representing relations between samples of the dataset that we introduce in this work . The methods considered are evaluated on different datasets and downstream tasks where the impact of the topology can be appropriately assessed . Initially , we examine the impact of implicitly accounting for the topology to validate the GR-VAE in two synthetic studies based on topologically connected 4D point clouds and MNIST ( LeCun et al. , 2010 ) with added relational information based on the labels . After this initial validation , we move to evaluating all the methods in the case of text representations and chemical reactions . In the case of text representations , we analyze the methods performance on Cora , CiteSeer , and PubMed ( Sen et al. , 2008 ) , using their citation networks , and evaluating the representations learned in a downstream classification task . Finally , we study the impact of the topology in molecule representations using a chemical reaction dataset ( Jin et al. , 2017 ) , where the downstream task consists in predicting the reactivity of reactant/reagent-product pairs . 2 METHODS . In this section we present the different models compared in this study . Our approach is to explore a spectrum of models with varying availability of features and topology ( see Figure 1 ) . 2.1 IMPLICIT TOPOLOGICAL LEARNING . We first explore VAEs ( Kingma & Welling , 2013 ) which only intake features from the nodes , thus serving as a baseline model agnostic to topological information . Graph Regularized VAE . We then introduce a variation of VAEs ( Kingma & Welling , 2013 ) , defined as Graph-Regularized VAEs ( GR-VAE ) , that augments the trade-off between reconstruction error and KL divergence by a topological constraint ( see Figure 2 for an overview ) . In GR-VAE , the latent space is regularized through a metagraph present in the data . We suggest that accounting for available information on how different samples relate ( henceforth simply referred as the graph ) may help at obtaining more powerful representations , especially where this relationships are directly involved with a downstream task of interest . Our approach adds a term to the loss defined by the set of constraints to the samples ’ representation in the latent space given the distances of the samples ’ metagraph . For a given set of samples , S , we can compute their distances in the latent space D , as well as over the graph G. For each node , ν , we expect the distances to the other nodes , once embedded in D , to resemble the distances over G. Thus , we enforce a constraint aimed to preserve the relative distances in the two spaces . Formally , fixing a node ν and considering any pair of nodes ( i , j ) , we can define the following penalty term : φ ( dD , dG , ν , i , j ) = ( dD ( ν , j ) − dD ( ν , i ) ) + if dG ( ν , i ) > dG ( ν , j ) ( dD ( ν , i ) − dD ( ν , j ) ) 2 if dG ( ν , i ) = dG ( ν , j ) ( dD ( ν , i ) − dD ( ν , j ) ) + if dG ( ν , i ) < dG ( ν , j ) ( 1 ) where dD and dG are metrics defined in the latent space and over the graph respectively . In the following , we select the Euclidean distance as dD and the geodesic distance ( Floyd , 1962 ) as dG . The overall loss function of the GR-VAE thus becomes : LGR-VAE ( X ; θ ) = LVAE ( X ; θ ) + γ ∑ ν∈ S ∑ ( i , j ) ∈ S× S φ ( dD , dG , ν , i , j ) ( 2 ) where X are the features of the samples in S , θ the network parameters and γ ≥ 0 regulates the strength of the penalty . 2.2 EXPLICIT TOPOLOGICAL LEARNING . Notably , GR-VAE is devised to infer topological information solely from a soft constraint , without any architectural requirements such as graph convolutions . On the other side of the spectrum , graph neural networks ( GNN ) instead model topology explicitly . Deep Graph Infomax . Here , we consider to a Deep Graph Infomax ( DGI ) , a state-of-the-art GNN for unsupervised representation learning ( Veličković et al. , 2018 ) . DGI relies on maximizing mutual information between subgraphs ( themselves derived with GCNs ) yielding representations that facilitate downstream node-wise classification tasks . These two models used as a comparison for the text classification task . GAE and VGAE . We consider both non-probabilistic Graph Autoencoders ( GAE ) and Variational Graph Autoencoders ( VGAE ) ( Kipf & Welling , 2016 ) which are models for unsupervised-graph data inspired on the VAE . GraphSAGE . We consider GraphSAGE , an inductive framework that generates node embeddings by sampling and aggregating the features for the local neighborhood of a node ( Hamilton et al. , 2018 ) . GraphSAGE is used as a comparison model for the text classification task . node2vec . Finally , we utilize node2vec ( Grover & Leskovec , 2016 ) , which only consumes topological information but no node-specific features . The node2vec algorithm learns a compressed feature space that maximizes the probability to preserve local neighborhoods . With the exception of node2vec , the specific details for the configuration of each model will depend on the dataset we are evaluating on , thus will be detailed in each of the datasets ’ results . 2.3 DATASETS . In the following we describe the datasets used and the experimental setup for the downstream tasks . 2.3.1 SYNTHETIC DATA : A QUALITATIVE ASSESSMENT . First , we consider a synthetic dataset with arbitrarily generated graphs on a plane . Each node ’ s features will be composed by the combination of the first two edges directions ’ ( in the case of nodes with a single edge the feature vector is padded with zeros ) , resulting in a feature vector of 4 dimensions . Thus , each node holds partial , yet insufficient topological information about the graph . As described above , the entire graph is then used to regularize the latent space . 2.3.2 MNIST . On a similar line we expanded this experiments by taking MNIST ( LeCun et al. , 2010 ) and generating a topology across the different labels by chaining the samples from 0 all the way to 9 . We use this dataset to further test the model ’ s capability of affecting the topology of the latent where the individual node features are of higher complexity , at least when compared to the synthetic data , while maintaining comparable reconstruction performance to the non-constrained scenario . 2.3.3 TEXT REPRESENTATION . We evaluate three classification datasets : Cora , CiteSeer , and PubMed ( Sen et al. , 2008 ) . These datasets contain networks of documents linked by the citation links between documents . The text of the document is represented as a bag-of-words , which we take as a feature vector for each of the documents . Furthermore , each document corresponds to a particular task . We divide each dataset , and use a part of it to train the embedding and the other part on a downstream class prediction task , using the embedding model mentioned above . 2.3.4 CHEMICAL REACTION REPRESENTATION . Finally , we analyze the influence of the topology in learning effective representations for molecules in the context of chemical reactions , a topic that has testified a surge in popularity in the recent past as a field for deep learning applications ( Schwaller et al. , 2019 ; 2020 ) . To this end , we adopt the dataset compiled by Jin et al . ( 2017 ) where we represent reagents , reactants and products using SMILES representations ( Weininger , 1988 ) , using the splits provided . For each molecule we extract features using the encoder of a VAE based on stack-augmented GRU layers ( Joulin & Mikolov , 2015 ) , as proposed in Born et al . ( 2020 ) , pretrained on PubChem ( Kim et al. , 2015 ) ( more details can be found in the Appendix A.2 ) . As for the topological reaction representation we consider a bipartite graph connecting the products to all the reactants and reagents . Each reaction bipartite graph is then used to generate the resulting final graph connecting all the nodes that are shared between different reactions . Using the training split provided by Jin et al . ( 2017 ) , the models are finetuned as follows : VAE at molecule level , GR-VAE and DGI at reaction level ( GR-VAE in an implicit form through the loss regularizer ) , node2vec on the aggregated graph . Furthermore , DGI uses the different VAEs and GR-VAEs as part of its encoder . To evaluate the quality of the representations learned and the impact of the topology , we consider the task of predicting whether two molecules are respectively reactant/reagent and products of a valid chemical reaction . The resulting binary classification task has an inherent relation with the underlying reaction network . For VAE , GR-VAE and node2vec we represent a pair of molecules as the concatenation of the encoded molecules/nodes in the respective latent spaces . In the DGI case , we represent the pair as the embedding of a graph connecting the molecules . These representations are then trained on the validation split and later evaluated on the test split as defined by Jin et al . ( 2017 ) . | The paper focuses on studying the importance of utilising manifold/topology information for machine learning tasks. To this end, the authors benchmark four different approaches, including VAE, GR-VAE (using graph distances to regularise embedding distances (as shown in Eq. 1)). The paper performs experiments on four tasks, including synthetic data, MNIST, text representation, and chemical reactions. As conclusion, the paper demonstrates that in some cases, adding relational information is beneficial, while in other cases, the effect is subtle. Thus, the paper aims to provide a metric for understanding when and how manifold/topology information is needed. | SP:bc5907a21b9d31cda4e4c4c513792a8f99edd0b6 |
Implicit Regularization Effects of Unbiased Random Label Noises with SGD | 1 INTRODUCTION . Stochastic Gradient Descent ( SGD ) has been widely used as an effective way to train deep neural networks with large datasets ( Bottou , 1991 ) . While the mini-batch sampling strategy was firstly proposed to lower the cost of computation per iteration , it has been consider to incorporate an implicit regularizer preventing the learning process from converging to the local minima with poor generalization performance ( Zhang et al. , 2017 ; Zhu et al. , 2019 ; Jastrzebski et al. , 2017 ; Hoffer et al. , 2017 ; Keskar et al. , 2017 ) . To interpret such implicit regularization , one can model SGD as gradient descent ( GD ) with gradient noises caused by mini-batch sampling ( Bottou et al. , 2018 ) . Studies have demonstrated the potentials of such implicit regularization or gradient noises to improve the generalization performance of learning from both theoretical ( Mandt et al. , 2017 ; Chaudhari & Soatto , 2018 ; Hu et al. , 2019b ; Simsekli et al. , 2019 ) and empirical aspects ( Zhu et al. , 2019 ; Hoffer et al. , 2017 ; Keskar et al. , 2017 ) . In summary , gradient noises keep SGD away from converging to the sharp local minima that generalizes poorly ( Zhu et al. , 2019 ; Hu et al. , 2019b ; Simsekli et al. , 2019 ) and would select a flat minima ( Hochreiter & Schmidhuber , 1997 ) as the outcome of learning . In this work , we aim at investigating the influence of random label noises to the implicit regularization under mini-batch sampling of SGD . To simplify our research , we assume the training dataset as a set of vectorsD = { x1 , x2 , x3 , . . . , xN } .The label ỹi for every vector xi ∈ D is the noisy response of the true neural network f∗ ( x ) such that ỹi = yi + εi , yi = f ∗ ( xi ) , and E [ εi ] = 0 , var [ εi ] = σ2 , ( 1 ) where the label noise εi is assumed to be an independent zero-mean random variable . In our work , the random label noises can be either ( 1 ) drawn from probability distributions before training steps ( but dynamized by mini-batch sampling of SGD ) or ( 2 ) realized by the random variables per training iteration ( Han et al. , 2018 ) . Thus learning is to approximate f ( x , θ̂ ) that beats f∗ ( x ) , such that θ̂ ← argmin ∀θ∈Rd { 1 N N∑ i=1 L̃i ( θ ) : = 1 N N∑ i=1 ( f ( xi , θ ) − ỹi ) 2 } . ( 2 ) Inspired by ( Hochreiter & Schmidhuber , 1997 ; Zhu et al. , 2019 ) , our work studies how unbiased label noises εi ( 1 ≤ i ≤ N ) would affect the “ selection ” of θ̂ from possible solutions , in the viewpoint of learning dynamics ( Saxe et al. , 2014 ) of SGD under mini-batch sampling ( Li et al. , 2017 ; Wu et al. , 2020 ; Hu et al. , 2019b ) . Contributions . Our analysis shows that under mild conditions , with gradients of label-noisy losses , SGD might incorporate an additional data-dependent noise term , complementing with the stochastic gradient noises ( Li et al. , 2017 ; Wu et al. , 2020 ) of label-noiseless losses , through resampling the samples with label noises ( Li et al. , 2018 ) or dynamically adding noises to labels over iterations ( Han et al. , 2018 ) . We consider such noises as an implicit regularization caused by unbiased label noises , and interpret the effects of such noises as a solution selector of learning procedure . More specifically , this work has made unique contributions as follow . ( 1 ) Implicit Regularizer . We reviewed the preliminaries ( Li et al. , 2017 ; Ali et al. , 2019 ; Hu et al. , 2019b ; Wu et al. , 2020 ) and extent the analytical framework in ( Li et al. , 2017 ) to interpret the effects of unbiased label noises as an additional implicit regularizer on top of the continuous-time dynamics of SGD . Through discretizing the continuous-time dynamics of label-noisy SGD , we write discrete-time approximation to the learning dynamics , denoted as θULNk for k = 1 , 2 , . . . , as θULNk+1 ← θULNk − η N N∑ i=1 ∇L∗i ( θULNk ) + ξ∗k ( θULNk ) + ξULNk ( θULNk ) , ( 3 ) where L∗i ( θ ) = ( f ( xi , θ ) − f∗ ( xi ) ) 2 refers to the label-noiseless loss function with sample xi and the true ( noiseless ) label yi , the noise term ξ∗k ( θ ) refers to the stochastic gradient noise ( Li et al. , 2017 ) of label-noiseless loss function L∗i ( θ ) , then we can obtain the new implicit regularizer caused by the unbiased label noises ( ULN ) for ∀θ ∈ Rd , which can be approximated as follow ξULNk ( θ ) ≈ √ η B ( σ2 N N∑ i=1 ∇θf ( xi , θ ) ∇θf ( xi , θ ) > ) 1 2 zk , and zk ∼ N ( 0d , Id ) , ( 4 ) where zk refers to a random noise vector drawn from the standard Gaussian distribution , θk refers to the parameters of network in the kth iteration , ( · ) 1/2 refers to the Chelosky decomposition of the matrix , ∇θf ( xi , θ ) = ∂f ( xi , θ ) /∂θ refers to the gradient of the neural network output for sample xi over the parameter θk , and B and η are defined as the learning rate and the batch size of SGD respectively . Obviously , the strength of such implicit regularizer is controlled by σ2 , B and η . ( 2 ) Effects to Linear Regression . To understand behaviors of the implicit regularizer ξULNt ( θt ) to the learning dynamics , we studied SGD over Ordinary Least Square ( OLS ) .With the proposed model , we could easily obtain the implicit regularizer such that ξULNk ( β ) ≈ √ η/B ( σ2Σ̄N ) 1/2 zk and zk ∼ N ( 0d , Id ) ( 5 ) where Σ̄N = 1N ∑N i=1 xix > i referring to the sample covariance matrix of the training dataset . Our theoretical elaboration suggests that SGD with unbiased random label noises would converge to a distribution of Gaussian-alike centered at the optimal solution of OLS , where the span and shape of the distribution would controlled by σ2 and Σ̄N when η and B are constant . We conducted the extensive experiments using SGD with various σ2 and Σ̄N , and successfully obtain the results that coincide our theories and directly visualize the effects of the implicit regularizer over the path of learning and converging distribution of SGD for noisy linear regression . ( 3 ) Inference Stabilizer . The regularization effects of unbiased random label noises should be Ezk ∥∥ξULNk ( θk ) ∥∥22 ≈ ησ2BN N∑ i=1 ‖∇θf ( xi , θk ) ‖22 = ησ2 BN N∑ i=1 ∥∥∥∥ ∂∂θf ( xi , θk ) ∥∥∥∥2 2 , ( 6 ) where ∇θf ( x , θ ) refers to the gradient of f over θ and the effects is controlled by the batch size B and the variance of label noises σ2 . We extend above results to understand the newly-fashioned noisy self-distillation ( Zhang et al. , 2019a ; Kim et al. , 2020 ) paradigms , where a well-trained model is supposed to be further improved through learning from its noisy outputs . Our analysis showed that , when the new convergence achieved , the noisy self-distillation strategy would prefer to re-select a model with a lower neural network gradient norm 1N ∑N i=1 ‖∇θf ( xi , θ ) ‖22 , where the gradient norm characterizes the variation/instability of neural network inference results ( over perturbations ) around parameters of the model . We carry out extensive experiments while results backup our theories . Note that while the earlier work ( Bishop , 1995 ) found training with input noises can also bring regularization effects , our work focuses on the observational noises on labels . 2 PRELIMINARIES AND RELATED WORK . SGD Dynamics and Implicit Regularization We follow settings in ( Li et al. , 2017 ) and consider SGD as an algorithm that , in the kth iteration with the estimate θk , it randomly picks up a B-length subset of samples from the training dataset i.e. , Bk ⊂ D , and estimates the mini-batch stochastic gradient 1b ∑ ∀xi∈Bk ∇Li ( θk ) , then updates the estimate for θk+1 based on θk , as follow θk+1 ← ( θk − η B ∑ ∀xi∈Bk ∇Li ( θk ) ) = ( θk − η N ∑ ∀xi∈D ∇Li ( θk ) + √ ηVk ( θk ) ) , ( 7 ) where η refers to the step-size of SGD , and Vk ( θk ) refers to a stochastic gradient noise term caused by mini-batch sampling . The noise would converge to zero with increasing batch size , as follow Vk ( θk ) = √ η ( 1 N ∑ ∀xi∈D ∇Li ( θk ) − 1 B ∑ ∀xi∈Bk ∇Li ( θk ) ) → 0d , as B → N . ( 8 ) Let define ΣSGDN ( θk ) as the sample covariance matrix of loss gradients ∇Li ( θk ) for 1 ≤ i ≤ N , where we follow ( Li et al. , 2017 ) and do not make low-rank assumptions on ΣSGDN ( θk ) . Under mild conditions ( Li et al. , 2017 ; Chaudhari & Soatto , 2018 ) , one can approximate SGD as θ̄k such that θ̄k+1 ← θ̄k− η N ∑ ∀xi∈D ∇Li ( θ̄k ) + ξk ( θ̄k ) , ξk ( θ̄k ) = √ η B ( ΣSGDN ( θ̄k ) ) 1 2 zk , zk ∼ N ( 0 , Id ) . ( 9 ) The implicit regularizer of SGD could be considered as ξk ( θ̄k ) = √ η/B ( ΣSGDN ( θ̄k ) ) 1 2 zk which is data-dependent and controlled by the learning rate η and batch size B ( Smith et al. , 2018 ) . ( Mandt et al. , 2017 ; Chaudhari & Soatto , 2018 ; Hu et al. , 2019b ) discussed SGD for varational inference and enabled novel applications to samplers ( Zhang et al. , 2019b ; Xiong et al. , 2019 ) . To understand the effect to generalization performance , ( Zhu et al. , 2019 ; Smith et al. , 2018 ) studied the escaping behavior from the sharp local minima ( Keskar et al. , 2017 ) and convergence to the flat ones . Finally , ( Gidel et al. , 2019 ) studied regularization effects to linear DNNs and ( Wu et al. , 2020 ) proposed new multiplicative noises to interpret SGD and obtain stronger theoretical properties . SGD Implicit Regularization for Ordinary Least Square ( OLS ) The most recent and relevant work in this area is ( Ali et al. , 2019 ; 2020 ) , where the same group of authors studied the implicit regularization of gradient descent and stochastic gradient descent for OLS . They investigated an implicit regularizer of ` 2-norm alike on the parameter , which regularizes OLS as a Ridge estimator with decaying penalty . Prior to these efforts , F. Bach and his group have studied the convergence of gradient-based solutions for linear regression with OLS and regularized estimators under both noisy and noiseless settings in ( Dieuleveut et al. , 2017 ; Marteau-Ferey et al. , 2019 ; Berthier et al. , 2020 ) . Self-Distillation and Noisy Students Self-distillation ( Zhang et al. , 2019a ; Xie et al. , 2020 ; Xu et al. , 2020 ; Kim et al. , 2020 ) has been examined as an effective way to further improve the generalization performance of well-trained models . Such strategies enable knowledge distillation using the well-trained ones as teacher models and optionally adding noises ( e.g. , dropout , stochastic depth , and label smoothing or potentially the label noises ) onto training procedure of student models . Discussion on the Relevant Work Though tremendous pioneering studies have been done in this area , we still make contributions in above three categories . First of all , this work characterizes the implicit regularization effects of label noises to SGD dynamics . Compared to ( Ali et al. , 2019 ; 2020 ) working on linear regression , our model interpreted general learning tasks . Even from linear regression perspectives ( Ali et al. , 2019 ; 2020 ; Berthier et al. , 2020 ) , we precisely measured the gaps between SGD dynamics with and without label noises using the continuous-time diffusion.Compared to ( Lopez-Paz et al. , 2016 ; Kim et al. , 2020 ) , our analysis emphasized role of the implicit regularizer caused by label noises for model selection , where models with high inferential stability would be selected . ( Li et al. , 2020 ) is the most relevant work to us , where authors studied the early stopping of gradient descent under label noises via neural tangent kernel ( NTK ) ( Jacot et al. , 2018 ) approximation . Our work made the analyze for SGD without assumptions for approximation such as NTK . To best of our knowledge , this work is the first to understand the effects of unbiased label noises to SGD dynamics , by addressing technical issues including implicit regularization , OLS , self-distillation , model selection , and the stability inference results . | This paper studies the implicit regularization effect that arises from using stochastic gradient descent with label noise and squared loss. They derive the expression for the implicit regularization term and show that it favors solutions which are stable against perturbations of the parameters. This paper validates their empirical findings using SGD on linear regression task with label noise. This paper also uses their results to study the self distillation technique. | SP:55e4c0663d63e508027c4ac1a75025ffeabac81b |
Implicit Regularization Effects of Unbiased Random Label Noises with SGD | 1 INTRODUCTION . Stochastic Gradient Descent ( SGD ) has been widely used as an effective way to train deep neural networks with large datasets ( Bottou , 1991 ) . While the mini-batch sampling strategy was firstly proposed to lower the cost of computation per iteration , it has been consider to incorporate an implicit regularizer preventing the learning process from converging to the local minima with poor generalization performance ( Zhang et al. , 2017 ; Zhu et al. , 2019 ; Jastrzebski et al. , 2017 ; Hoffer et al. , 2017 ; Keskar et al. , 2017 ) . To interpret such implicit regularization , one can model SGD as gradient descent ( GD ) with gradient noises caused by mini-batch sampling ( Bottou et al. , 2018 ) . Studies have demonstrated the potentials of such implicit regularization or gradient noises to improve the generalization performance of learning from both theoretical ( Mandt et al. , 2017 ; Chaudhari & Soatto , 2018 ; Hu et al. , 2019b ; Simsekli et al. , 2019 ) and empirical aspects ( Zhu et al. , 2019 ; Hoffer et al. , 2017 ; Keskar et al. , 2017 ) . In summary , gradient noises keep SGD away from converging to the sharp local minima that generalizes poorly ( Zhu et al. , 2019 ; Hu et al. , 2019b ; Simsekli et al. , 2019 ) and would select a flat minima ( Hochreiter & Schmidhuber , 1997 ) as the outcome of learning . In this work , we aim at investigating the influence of random label noises to the implicit regularization under mini-batch sampling of SGD . To simplify our research , we assume the training dataset as a set of vectorsD = { x1 , x2 , x3 , . . . , xN } .The label ỹi for every vector xi ∈ D is the noisy response of the true neural network f∗ ( x ) such that ỹi = yi + εi , yi = f ∗ ( xi ) , and E [ εi ] = 0 , var [ εi ] = σ2 , ( 1 ) where the label noise εi is assumed to be an independent zero-mean random variable . In our work , the random label noises can be either ( 1 ) drawn from probability distributions before training steps ( but dynamized by mini-batch sampling of SGD ) or ( 2 ) realized by the random variables per training iteration ( Han et al. , 2018 ) . Thus learning is to approximate f ( x , θ̂ ) that beats f∗ ( x ) , such that θ̂ ← argmin ∀θ∈Rd { 1 N N∑ i=1 L̃i ( θ ) : = 1 N N∑ i=1 ( f ( xi , θ ) − ỹi ) 2 } . ( 2 ) Inspired by ( Hochreiter & Schmidhuber , 1997 ; Zhu et al. , 2019 ) , our work studies how unbiased label noises εi ( 1 ≤ i ≤ N ) would affect the “ selection ” of θ̂ from possible solutions , in the viewpoint of learning dynamics ( Saxe et al. , 2014 ) of SGD under mini-batch sampling ( Li et al. , 2017 ; Wu et al. , 2020 ; Hu et al. , 2019b ) . Contributions . Our analysis shows that under mild conditions , with gradients of label-noisy losses , SGD might incorporate an additional data-dependent noise term , complementing with the stochastic gradient noises ( Li et al. , 2017 ; Wu et al. , 2020 ) of label-noiseless losses , through resampling the samples with label noises ( Li et al. , 2018 ) or dynamically adding noises to labels over iterations ( Han et al. , 2018 ) . We consider such noises as an implicit regularization caused by unbiased label noises , and interpret the effects of such noises as a solution selector of learning procedure . More specifically , this work has made unique contributions as follow . ( 1 ) Implicit Regularizer . We reviewed the preliminaries ( Li et al. , 2017 ; Ali et al. , 2019 ; Hu et al. , 2019b ; Wu et al. , 2020 ) and extent the analytical framework in ( Li et al. , 2017 ) to interpret the effects of unbiased label noises as an additional implicit regularizer on top of the continuous-time dynamics of SGD . Through discretizing the continuous-time dynamics of label-noisy SGD , we write discrete-time approximation to the learning dynamics , denoted as θULNk for k = 1 , 2 , . . . , as θULNk+1 ← θULNk − η N N∑ i=1 ∇L∗i ( θULNk ) + ξ∗k ( θULNk ) + ξULNk ( θULNk ) , ( 3 ) where L∗i ( θ ) = ( f ( xi , θ ) − f∗ ( xi ) ) 2 refers to the label-noiseless loss function with sample xi and the true ( noiseless ) label yi , the noise term ξ∗k ( θ ) refers to the stochastic gradient noise ( Li et al. , 2017 ) of label-noiseless loss function L∗i ( θ ) , then we can obtain the new implicit regularizer caused by the unbiased label noises ( ULN ) for ∀θ ∈ Rd , which can be approximated as follow ξULNk ( θ ) ≈ √ η B ( σ2 N N∑ i=1 ∇θf ( xi , θ ) ∇θf ( xi , θ ) > ) 1 2 zk , and zk ∼ N ( 0d , Id ) , ( 4 ) where zk refers to a random noise vector drawn from the standard Gaussian distribution , θk refers to the parameters of network in the kth iteration , ( · ) 1/2 refers to the Chelosky decomposition of the matrix , ∇θf ( xi , θ ) = ∂f ( xi , θ ) /∂θ refers to the gradient of the neural network output for sample xi over the parameter θk , and B and η are defined as the learning rate and the batch size of SGD respectively . Obviously , the strength of such implicit regularizer is controlled by σ2 , B and η . ( 2 ) Effects to Linear Regression . To understand behaviors of the implicit regularizer ξULNt ( θt ) to the learning dynamics , we studied SGD over Ordinary Least Square ( OLS ) .With the proposed model , we could easily obtain the implicit regularizer such that ξULNk ( β ) ≈ √ η/B ( σ2Σ̄N ) 1/2 zk and zk ∼ N ( 0d , Id ) ( 5 ) where Σ̄N = 1N ∑N i=1 xix > i referring to the sample covariance matrix of the training dataset . Our theoretical elaboration suggests that SGD with unbiased random label noises would converge to a distribution of Gaussian-alike centered at the optimal solution of OLS , where the span and shape of the distribution would controlled by σ2 and Σ̄N when η and B are constant . We conducted the extensive experiments using SGD with various σ2 and Σ̄N , and successfully obtain the results that coincide our theories and directly visualize the effects of the implicit regularizer over the path of learning and converging distribution of SGD for noisy linear regression . ( 3 ) Inference Stabilizer . The regularization effects of unbiased random label noises should be Ezk ∥∥ξULNk ( θk ) ∥∥22 ≈ ησ2BN N∑ i=1 ‖∇θf ( xi , θk ) ‖22 = ησ2 BN N∑ i=1 ∥∥∥∥ ∂∂θf ( xi , θk ) ∥∥∥∥2 2 , ( 6 ) where ∇θf ( x , θ ) refers to the gradient of f over θ and the effects is controlled by the batch size B and the variance of label noises σ2 . We extend above results to understand the newly-fashioned noisy self-distillation ( Zhang et al. , 2019a ; Kim et al. , 2020 ) paradigms , where a well-trained model is supposed to be further improved through learning from its noisy outputs . Our analysis showed that , when the new convergence achieved , the noisy self-distillation strategy would prefer to re-select a model with a lower neural network gradient norm 1N ∑N i=1 ‖∇θf ( xi , θ ) ‖22 , where the gradient norm characterizes the variation/instability of neural network inference results ( over perturbations ) around parameters of the model . We carry out extensive experiments while results backup our theories . Note that while the earlier work ( Bishop , 1995 ) found training with input noises can also bring regularization effects , our work focuses on the observational noises on labels . 2 PRELIMINARIES AND RELATED WORK . SGD Dynamics and Implicit Regularization We follow settings in ( Li et al. , 2017 ) and consider SGD as an algorithm that , in the kth iteration with the estimate θk , it randomly picks up a B-length subset of samples from the training dataset i.e. , Bk ⊂ D , and estimates the mini-batch stochastic gradient 1b ∑ ∀xi∈Bk ∇Li ( θk ) , then updates the estimate for θk+1 based on θk , as follow θk+1 ← ( θk − η B ∑ ∀xi∈Bk ∇Li ( θk ) ) = ( θk − η N ∑ ∀xi∈D ∇Li ( θk ) + √ ηVk ( θk ) ) , ( 7 ) where η refers to the step-size of SGD , and Vk ( θk ) refers to a stochastic gradient noise term caused by mini-batch sampling . The noise would converge to zero with increasing batch size , as follow Vk ( θk ) = √ η ( 1 N ∑ ∀xi∈D ∇Li ( θk ) − 1 B ∑ ∀xi∈Bk ∇Li ( θk ) ) → 0d , as B → N . ( 8 ) Let define ΣSGDN ( θk ) as the sample covariance matrix of loss gradients ∇Li ( θk ) for 1 ≤ i ≤ N , where we follow ( Li et al. , 2017 ) and do not make low-rank assumptions on ΣSGDN ( θk ) . Under mild conditions ( Li et al. , 2017 ; Chaudhari & Soatto , 2018 ) , one can approximate SGD as θ̄k such that θ̄k+1 ← θ̄k− η N ∑ ∀xi∈D ∇Li ( θ̄k ) + ξk ( θ̄k ) , ξk ( θ̄k ) = √ η B ( ΣSGDN ( θ̄k ) ) 1 2 zk , zk ∼ N ( 0 , Id ) . ( 9 ) The implicit regularizer of SGD could be considered as ξk ( θ̄k ) = √ η/B ( ΣSGDN ( θ̄k ) ) 1 2 zk which is data-dependent and controlled by the learning rate η and batch size B ( Smith et al. , 2018 ) . ( Mandt et al. , 2017 ; Chaudhari & Soatto , 2018 ; Hu et al. , 2019b ) discussed SGD for varational inference and enabled novel applications to samplers ( Zhang et al. , 2019b ; Xiong et al. , 2019 ) . To understand the effect to generalization performance , ( Zhu et al. , 2019 ; Smith et al. , 2018 ) studied the escaping behavior from the sharp local minima ( Keskar et al. , 2017 ) and convergence to the flat ones . Finally , ( Gidel et al. , 2019 ) studied regularization effects to linear DNNs and ( Wu et al. , 2020 ) proposed new multiplicative noises to interpret SGD and obtain stronger theoretical properties . SGD Implicit Regularization for Ordinary Least Square ( OLS ) The most recent and relevant work in this area is ( Ali et al. , 2019 ; 2020 ) , where the same group of authors studied the implicit regularization of gradient descent and stochastic gradient descent for OLS . They investigated an implicit regularizer of ` 2-norm alike on the parameter , which regularizes OLS as a Ridge estimator with decaying penalty . Prior to these efforts , F. Bach and his group have studied the convergence of gradient-based solutions for linear regression with OLS and regularized estimators under both noisy and noiseless settings in ( Dieuleveut et al. , 2017 ; Marteau-Ferey et al. , 2019 ; Berthier et al. , 2020 ) . Self-Distillation and Noisy Students Self-distillation ( Zhang et al. , 2019a ; Xie et al. , 2020 ; Xu et al. , 2020 ; Kim et al. , 2020 ) has been examined as an effective way to further improve the generalization performance of well-trained models . Such strategies enable knowledge distillation using the well-trained ones as teacher models and optionally adding noises ( e.g. , dropout , stochastic depth , and label smoothing or potentially the label noises ) onto training procedure of student models . Discussion on the Relevant Work Though tremendous pioneering studies have been done in this area , we still make contributions in above three categories . First of all , this work characterizes the implicit regularization effects of label noises to SGD dynamics . Compared to ( Ali et al. , 2019 ; 2020 ) working on linear regression , our model interpreted general learning tasks . Even from linear regression perspectives ( Ali et al. , 2019 ; 2020 ; Berthier et al. , 2020 ) , we precisely measured the gaps between SGD dynamics with and without label noises using the continuous-time diffusion.Compared to ( Lopez-Paz et al. , 2016 ; Kim et al. , 2020 ) , our analysis emphasized role of the implicit regularizer caused by label noises for model selection , where models with high inferential stability would be selected . ( Li et al. , 2020 ) is the most relevant work to us , where authors studied the early stopping of gradient descent under label noises via neural tangent kernel ( NTK ) ( Jacot et al. , 2018 ) approximation . Our work made the analyze for SGD without assumptions for approximation such as NTK . To best of our knowledge , this work is the first to understand the effects of unbiased label noises to SGD dynamics , by addressing technical issues including implicit regularization , OLS , self-distillation , model selection , and the stability inference results . | The paper studies the implicit regularization effect of unbiased random label noise on the dynamics of stochastic gradient descent(SGD). More precisely, an unbiased random noise is added to the true labels and the paper aims to analyze the regularization effect of it. The paper shows that the unbiased label noise would favor convergence to points which | SP:55e4c0663d63e508027c4ac1a75025ffeabac81b |
Scalable Transfer Learning with Expert Models | 1 INTRODUCTION . Deep learning has been successful on many computer vision tasks . Unfortunately , this success often requires a large amount of per-task data and compute . To scale deep learning to new vision tasks , practitioners often turn to transfer learning . Transfer learning involves re-using models trained on a large source task , and tuning them on the target task . This can improve both convergence rates ( Ben-David et al. , 2007 ; 2010 ; Blitzer et al. , 2008 ; Du et al. , 2017 ; Kuzborskij & Orabona , 2013 ; Mansour et al. , 2009 ) and empirical performance ( Dai et al. , 2007 ; Donahue et al. , 2014 ; Oquab et al. , 2014 ; Tan et al. , 2018 ) . Transfer learning reduces per-task data or compute requirements , given a large one-off pre-training cost . In practice , this one-off down payment may not be made by the practitioner , since pre-trained networks are made available through platforms like PyTorch and TensorFlow Hub1 . For instance , ImageNet pre-training is popular since it is freely available and works well for many tasks ( Donahue et al. , 2014 ; Oquab et al. , 2014 ; Sharif Razavian et al. , 2014 ) . In contrast to generic homogeneous models ( e.g . most pre-trained ImageNet networks ) , Mixture of Experts ( MoE ) include multiple heterogeneous sub-models ( “ experts ” ) that specialize to sub-problems of the full task . MoEs have been studied for decades ( Eigen et al. , 2013 ; Jacobs & Jordan , 1993 ) , and have also been successful in deep learning ( Shazeer et al. , 2017 ) . Yet , the application of experts for deep transfer learning has been less explored . We study visual transfer with experts , and present a simple , scalable , yet effective strategy . Transfer of specialist models has been studied before . However , they either require expensive retraining on the source dataset for every target task ( Ngiam et al. , 2018 ; Yan et al. , 2020 ) , or operate at a small scale where all experts can be applied simultaneously ( Dvornik et al. , 2020 ) . Further , most of them are tested only on a limited suite of natural single-object classification tasks . We lift these ∗Equal contribution . Order decided by a coin toss . †Work done while interning at Google Research . 1https : //pytorch.org/hub/ and https : //tfhub.dev/ , respectively . constraints , and present a practical approach that scales to hundreds of large experts , while requiring relatively little compute per target task . Our strategy consists of four stages ( fig . 1 ) . ( 1 ) Unconditional pre-training . A single baseline model is trained on the entire upstream data . ( 2 ) Experts training . Multiple experts are pre-trained by exploiting the label hierarchy present in many large-scale image datasets , such as ImageNet and JFT . In addition to entire expert networks , we explore residual adapters that allow all of the expertise to be packed into a single model that can be loaded into memory . These two stages may be expensive , but are done only once . ( 3 ) Expert selection . Applying all experts to each task does not scale well ; some sort of sparsification is required . We focus on inexpensive model selection that can be applied to hundreds or thousands of experts . ( 4 ) Downstream fine-tuning . We take the output of the model selection phase and tune it on the target task . Importantly , this phase does not require revisiting the source dataset , which may be unavailable or expensive to train on . We show that this approach yields remarkably strong performance on many diverse tasks . We evaluate not only on classic vision tasks , but also on the diverse VTAB benchmark of 19 tasks ( Zhai et al. , 2019 ) . Our contributions can be summarized as follows . • We propose a transfer learning algorithm with a large number of experts based on per-task routing via nearest neighbors selection . Once we have amortized the pre-training cost , this algorithm requires little compute per target task , achieving an speed-up of 500×–1000× compared to competing strategies . Also , it can be easily replicated with any large upstream multilabel dataset . • We achieve a mean accuracy improvement of 3.6 % over the state-of-the-art performance on 19 VTAB datasets using ResNet50 networks . Our algorithm offers improvements on every group of tasks : natural , specialized , and structured . Figure 2 summarizes these results . • We explore using sub-networks as experts via residual adapters , allowing all experts to be packed into a single model . Surprisingly these perform almost as well as their full-network counterparts . 2 RELATED WORK . Transfer Learning . Tasks with little training data can benefit from other larger datasets , often from a similar domain . Transfer learning concerns the link between the source and target dataset ( Pan & Yang , 2009 ; Weiss et al. , 2016 ; Tan et al. , 2018 ; Wang , 2018 ) . One family of methods creates a single training dataset , where source instances are re-weighted according to their relevance ( Dai et al. , 2007 ; Pardoe & Stone , 2010 ; Wan et al. , 2011 ; Xu et al. , 2017 ) . A popular method consists of fine-tuning a model that was pre-trained on the source data ( Donahue et al. , 2014 ; Oquab et al. , 2014 ; Sharif Razavian et al. , 2014 ) . Some transfer learning algorithms condition the initial source model on the target dataset itself ( Ngiam et al. , 2018 ; Xie et al. , 2019 ; Yalniz et al. , 2019 ) , while others ( like ours ) are agnostic about the downstream task when the initial model is trained on the source data ( Kolesnikov et al. , 2019 ) . We offer an in-depth comparison with ( Ngiam et al. , 2018 ) in section 6.6 . In the context of few-shot learning , where out-of-the-box fine-tuning may not work , generic representations are sometimes frozen , and simple feature selection ( Dvornik et al. , 2020 ) or model training ( Chen et al. , 2019 ) techniques are applied on top . Instead of relying on fixed universal representations , ( Rebuffi et al. , 2017 ; 2018 ) use small additional modules , or adapters , that incorporate knowledge from several visual domains . Our work also explores this idea . Multi-task Learning . MTL tries to leverage the common aspects of several learning tasks ( Caruana , 1997 ) . A prominent approach uses explicit parameter sharing ; for instance , by means of common low-level layers leading to different heads . Among others , this has been successfully applied to vision ( Zhang et al. , 2014 ) , language ( Liu et al. , 2015 ) , and reinforcement learning ( Fedus et al. , 2019 ) tasks . In addition , a variety of ways to combine task-specific representations have arisen , such as cross-stitch networks ( Misra et al. , 2016 ) , or lateral connections ( Rusu et al. , 2016 ) . A different family of methods impose joint constraints on the –possibly different– models corresponding to each task . We can combine the learning problems via regularization and shared sparsity patterns ( Argyriou et al. , 2007 ; Lounici et al. , 2009 ) , or by imposing some prior knowledge regarding the task structure ( Evgeniou et al. , 2005 ; Jacob et al. , 2009 ; Kim et al. , 2012 ) . 3 THE TRANSFER LEARNING FRAMEWORK . In this section , we describe our transfer learning setup of interest . The high-level goal is to train strong models for arbitrary downstream tasks , possibly under severe data and compute limitations . To do so efficiently , one can offload computation to a previous upstream phase which is executed a priori , without knowing the downstream tasks in advance . Accordingly , the upstream model should not depend on any specific target data . We are mostly interested in the low data regime where downstream tasks contain few datapoints . These restrictions have a practical motivation : we would like to build and deploy universal representations that are easily transferred to a wide range of downstream settings . Any transfer algorithm must implement the following three stages . Upstream Training . Given the upstream data DU , the algorithm first outputs a source model M. The goal is to provide useful initial representations for various new tasks . This stage could actually produce a family of models { Me } rather than a single one . These models might not be disjoint , and could share parameters . The upstream learning problems are auxiliary ; accordingly , DU could include a diverse set of classification , regression , or even synthetic learning instances . Model Selection . When a new downstream task is given , a selection algorithm is applied to choose the upstream model ( s ) to transfer , possibly depending on the downstream data . This phase should be computationally cheap ; thus , the upstream data is no longer available . Sometimes , there is no choice to make ( say , with a single ImageNet representation ) . Alternatively , in models with a complex structure , one may choose which parts , routes , or modules to keep in a data-dependent fashion . Downstream Training . The final stage fine-tunes the selected model using the downstream data , either fully or partially . For neural nets , a new head is added as the output classes are task-specific . Our overall algorithm is depicted in fig . 1 . We give details about each step in the following sections . 4 UPSTREAM TRAINING . 4.1 EXPERT ARCHITECTURES . Our experts should provide feature extractions that are a good starting point to learn future tasks related to the expert ’ s upstream training data . We explore two different model architectures to train such experts . As an obvious choice , we first look at ResNets ( He et al. , 2016b ) . These are powerful models ; however , storing and deploying many of them can be challenging . As an alternative , we also develop more compact adapter modules that can all be assembled in a single architecture . Also , their individual size can be easily customized to meet memory and computational constraints , which makes them an ideal candidate for combining multiple experts in a single model , when needed . We informally refer to these as full and adapter modules ( or experts ) , respectively . Full ResNet Modules . As a base architecture for full experts we use ResNets . In particular , all of our experiments focus on the ResNet50-v2 architecture ( R50 ) ( He et al. , 2016a ) , which sequentially stacks a root block and 4 blocks with ( 3 , 4 , 6 , 3 ) residual units . The initial step in every experiment consists of training a baseline model B on the whole upstream data ( see stage 1 in fig . 1 ) . This baseline is subsequently fine-tuned by both full and adapter experts , but in different ways . A full expert trained on a slice of data is simply the baseline B fine-tuned on that data . The head will later be discarded for transfer . This approach requires as many R50s as there are experts . Adapter Modules . Residual adapters were proposed to adapt a neural network to a particular downstream task without needing to fine-tune the entire network ( Rebuffi et al. , 2017 ) . Instead , we use them to adapt the baseline architecture to slices of the upstream data . Originally , they were 1× 1 convolutions placed after each 3× 3 convolution , with a residual connection . Instead we place them before each of the R50 ’ s blocks . Finally , our adapters have a bottleneck and are non-linear , as in ( Houlsby et al. , 2019 ) . We insert several in parallel into the backbone B . When creating an expert , only the adapters are tuned and the backbone weights are frozen . Figure 3a depicts the ResNet architecture with multiple expert adapters ( a ( i ) 1 , . . . , a ( i ) n ) . Let Fi be the function implemented by the i-th block of the backbone network . We adapt its input by computing the output as xi : = Fi ( xi−1 + a ( i ) e ( xi−1 ) ) , where e = R ( x ) is the identity of the selected expert , given by some routing function R , and x is the original input . During upstream training , the function R may also use the labels in addition to the image , as we discuss in section 4.3 . Figure 3b shows the adapter ’ s bottleneck architecture . An adapter sequentially applies componentsA1 and A2 . Each component performs a group normalization ( N ) ( Wu & He , 2018 ) , a ReLU activation ( A ) ( Glorot et al. , 2011 ) , and a convolution ( C ) ( LeCun et al. , 1989 ) , in that order . Due to the skip connection , the output dimension of A2 ◦A1 must match that of its input , c. However , we can change the output channels k of A1 , in order to limit the amount of parameters . Thus , we set k = c2 so that the number of parameters equals that of a linear adapter . Each adapter only increases the parameter count of the R50 backbone by 6 % . We briefly explored placing these adapters in other locations , or using other variations ( Rebuffi et al. , 2018 ) , but we did not observe any significant improvement . It is important to emphasize that the names Full and Adapters refer to the parameters that are specialized to a given subset of the upstream data before any downstream fine-tuning . In both cases , we fine-tune the entire network , after the model selection phase , to the downstream task . | This paper presents a novel method for obtaining better representations for transfer learning. Specifically, instead of using a generic representation for various down-stream tasks, this paper proposed to create a family of expert models in pre-training, and selectively choose one expert to generate representation depending on the target transfer learning task. A simple yet effective k-nearest neighbor strategy is used for picking the best-fitting expert. This paper has extensive experiments including pre-training models on two large-scale image datasets, and evaluated on two transfer learning benchmarks (VTAB and datasets from DAT). | SP:ee3f9c45e31d0e04b40d2547215df4e4d34e0e0d |
Scalable Transfer Learning with Expert Models | 1 INTRODUCTION . Deep learning has been successful on many computer vision tasks . Unfortunately , this success often requires a large amount of per-task data and compute . To scale deep learning to new vision tasks , practitioners often turn to transfer learning . Transfer learning involves re-using models trained on a large source task , and tuning them on the target task . This can improve both convergence rates ( Ben-David et al. , 2007 ; 2010 ; Blitzer et al. , 2008 ; Du et al. , 2017 ; Kuzborskij & Orabona , 2013 ; Mansour et al. , 2009 ) and empirical performance ( Dai et al. , 2007 ; Donahue et al. , 2014 ; Oquab et al. , 2014 ; Tan et al. , 2018 ) . Transfer learning reduces per-task data or compute requirements , given a large one-off pre-training cost . In practice , this one-off down payment may not be made by the practitioner , since pre-trained networks are made available through platforms like PyTorch and TensorFlow Hub1 . For instance , ImageNet pre-training is popular since it is freely available and works well for many tasks ( Donahue et al. , 2014 ; Oquab et al. , 2014 ; Sharif Razavian et al. , 2014 ) . In contrast to generic homogeneous models ( e.g . most pre-trained ImageNet networks ) , Mixture of Experts ( MoE ) include multiple heterogeneous sub-models ( “ experts ” ) that specialize to sub-problems of the full task . MoEs have been studied for decades ( Eigen et al. , 2013 ; Jacobs & Jordan , 1993 ) , and have also been successful in deep learning ( Shazeer et al. , 2017 ) . Yet , the application of experts for deep transfer learning has been less explored . We study visual transfer with experts , and present a simple , scalable , yet effective strategy . Transfer of specialist models has been studied before . However , they either require expensive retraining on the source dataset for every target task ( Ngiam et al. , 2018 ; Yan et al. , 2020 ) , or operate at a small scale where all experts can be applied simultaneously ( Dvornik et al. , 2020 ) . Further , most of them are tested only on a limited suite of natural single-object classification tasks . We lift these ∗Equal contribution . Order decided by a coin toss . †Work done while interning at Google Research . 1https : //pytorch.org/hub/ and https : //tfhub.dev/ , respectively . constraints , and present a practical approach that scales to hundreds of large experts , while requiring relatively little compute per target task . Our strategy consists of four stages ( fig . 1 ) . ( 1 ) Unconditional pre-training . A single baseline model is trained on the entire upstream data . ( 2 ) Experts training . Multiple experts are pre-trained by exploiting the label hierarchy present in many large-scale image datasets , such as ImageNet and JFT . In addition to entire expert networks , we explore residual adapters that allow all of the expertise to be packed into a single model that can be loaded into memory . These two stages may be expensive , but are done only once . ( 3 ) Expert selection . Applying all experts to each task does not scale well ; some sort of sparsification is required . We focus on inexpensive model selection that can be applied to hundreds or thousands of experts . ( 4 ) Downstream fine-tuning . We take the output of the model selection phase and tune it on the target task . Importantly , this phase does not require revisiting the source dataset , which may be unavailable or expensive to train on . We show that this approach yields remarkably strong performance on many diverse tasks . We evaluate not only on classic vision tasks , but also on the diverse VTAB benchmark of 19 tasks ( Zhai et al. , 2019 ) . Our contributions can be summarized as follows . • We propose a transfer learning algorithm with a large number of experts based on per-task routing via nearest neighbors selection . Once we have amortized the pre-training cost , this algorithm requires little compute per target task , achieving an speed-up of 500×–1000× compared to competing strategies . Also , it can be easily replicated with any large upstream multilabel dataset . • We achieve a mean accuracy improvement of 3.6 % over the state-of-the-art performance on 19 VTAB datasets using ResNet50 networks . Our algorithm offers improvements on every group of tasks : natural , specialized , and structured . Figure 2 summarizes these results . • We explore using sub-networks as experts via residual adapters , allowing all experts to be packed into a single model . Surprisingly these perform almost as well as their full-network counterparts . 2 RELATED WORK . Transfer Learning . Tasks with little training data can benefit from other larger datasets , often from a similar domain . Transfer learning concerns the link between the source and target dataset ( Pan & Yang , 2009 ; Weiss et al. , 2016 ; Tan et al. , 2018 ; Wang , 2018 ) . One family of methods creates a single training dataset , where source instances are re-weighted according to their relevance ( Dai et al. , 2007 ; Pardoe & Stone , 2010 ; Wan et al. , 2011 ; Xu et al. , 2017 ) . A popular method consists of fine-tuning a model that was pre-trained on the source data ( Donahue et al. , 2014 ; Oquab et al. , 2014 ; Sharif Razavian et al. , 2014 ) . Some transfer learning algorithms condition the initial source model on the target dataset itself ( Ngiam et al. , 2018 ; Xie et al. , 2019 ; Yalniz et al. , 2019 ) , while others ( like ours ) are agnostic about the downstream task when the initial model is trained on the source data ( Kolesnikov et al. , 2019 ) . We offer an in-depth comparison with ( Ngiam et al. , 2018 ) in section 6.6 . In the context of few-shot learning , where out-of-the-box fine-tuning may not work , generic representations are sometimes frozen , and simple feature selection ( Dvornik et al. , 2020 ) or model training ( Chen et al. , 2019 ) techniques are applied on top . Instead of relying on fixed universal representations , ( Rebuffi et al. , 2017 ; 2018 ) use small additional modules , or adapters , that incorporate knowledge from several visual domains . Our work also explores this idea . Multi-task Learning . MTL tries to leverage the common aspects of several learning tasks ( Caruana , 1997 ) . A prominent approach uses explicit parameter sharing ; for instance , by means of common low-level layers leading to different heads . Among others , this has been successfully applied to vision ( Zhang et al. , 2014 ) , language ( Liu et al. , 2015 ) , and reinforcement learning ( Fedus et al. , 2019 ) tasks . In addition , a variety of ways to combine task-specific representations have arisen , such as cross-stitch networks ( Misra et al. , 2016 ) , or lateral connections ( Rusu et al. , 2016 ) . A different family of methods impose joint constraints on the –possibly different– models corresponding to each task . We can combine the learning problems via regularization and shared sparsity patterns ( Argyriou et al. , 2007 ; Lounici et al. , 2009 ) , or by imposing some prior knowledge regarding the task structure ( Evgeniou et al. , 2005 ; Jacob et al. , 2009 ; Kim et al. , 2012 ) . 3 THE TRANSFER LEARNING FRAMEWORK . In this section , we describe our transfer learning setup of interest . The high-level goal is to train strong models for arbitrary downstream tasks , possibly under severe data and compute limitations . To do so efficiently , one can offload computation to a previous upstream phase which is executed a priori , without knowing the downstream tasks in advance . Accordingly , the upstream model should not depend on any specific target data . We are mostly interested in the low data regime where downstream tasks contain few datapoints . These restrictions have a practical motivation : we would like to build and deploy universal representations that are easily transferred to a wide range of downstream settings . Any transfer algorithm must implement the following three stages . Upstream Training . Given the upstream data DU , the algorithm first outputs a source model M. The goal is to provide useful initial representations for various new tasks . This stage could actually produce a family of models { Me } rather than a single one . These models might not be disjoint , and could share parameters . The upstream learning problems are auxiliary ; accordingly , DU could include a diverse set of classification , regression , or even synthetic learning instances . Model Selection . When a new downstream task is given , a selection algorithm is applied to choose the upstream model ( s ) to transfer , possibly depending on the downstream data . This phase should be computationally cheap ; thus , the upstream data is no longer available . Sometimes , there is no choice to make ( say , with a single ImageNet representation ) . Alternatively , in models with a complex structure , one may choose which parts , routes , or modules to keep in a data-dependent fashion . Downstream Training . The final stage fine-tunes the selected model using the downstream data , either fully or partially . For neural nets , a new head is added as the output classes are task-specific . Our overall algorithm is depicted in fig . 1 . We give details about each step in the following sections . 4 UPSTREAM TRAINING . 4.1 EXPERT ARCHITECTURES . Our experts should provide feature extractions that are a good starting point to learn future tasks related to the expert ’ s upstream training data . We explore two different model architectures to train such experts . As an obvious choice , we first look at ResNets ( He et al. , 2016b ) . These are powerful models ; however , storing and deploying many of them can be challenging . As an alternative , we also develop more compact adapter modules that can all be assembled in a single architecture . Also , their individual size can be easily customized to meet memory and computational constraints , which makes them an ideal candidate for combining multiple experts in a single model , when needed . We informally refer to these as full and adapter modules ( or experts ) , respectively . Full ResNet Modules . As a base architecture for full experts we use ResNets . In particular , all of our experiments focus on the ResNet50-v2 architecture ( R50 ) ( He et al. , 2016a ) , which sequentially stacks a root block and 4 blocks with ( 3 , 4 , 6 , 3 ) residual units . The initial step in every experiment consists of training a baseline model B on the whole upstream data ( see stage 1 in fig . 1 ) . This baseline is subsequently fine-tuned by both full and adapter experts , but in different ways . A full expert trained on a slice of data is simply the baseline B fine-tuned on that data . The head will later be discarded for transfer . This approach requires as many R50s as there are experts . Adapter Modules . Residual adapters were proposed to adapt a neural network to a particular downstream task without needing to fine-tune the entire network ( Rebuffi et al. , 2017 ) . Instead , we use them to adapt the baseline architecture to slices of the upstream data . Originally , they were 1× 1 convolutions placed after each 3× 3 convolution , with a residual connection . Instead we place them before each of the R50 ’ s blocks . Finally , our adapters have a bottleneck and are non-linear , as in ( Houlsby et al. , 2019 ) . We insert several in parallel into the backbone B . When creating an expert , only the adapters are tuned and the backbone weights are frozen . Figure 3a depicts the ResNet architecture with multiple expert adapters ( a ( i ) 1 , . . . , a ( i ) n ) . Let Fi be the function implemented by the i-th block of the backbone network . We adapt its input by computing the output as xi : = Fi ( xi−1 + a ( i ) e ( xi−1 ) ) , where e = R ( x ) is the identity of the selected expert , given by some routing function R , and x is the original input . During upstream training , the function R may also use the labels in addition to the image , as we discuss in section 4.3 . Figure 3b shows the adapter ’ s bottleneck architecture . An adapter sequentially applies componentsA1 and A2 . Each component performs a group normalization ( N ) ( Wu & He , 2018 ) , a ReLU activation ( A ) ( Glorot et al. , 2011 ) , and a convolution ( C ) ( LeCun et al. , 1989 ) , in that order . Due to the skip connection , the output dimension of A2 ◦A1 must match that of its input , c. However , we can change the output channels k of A1 , in order to limit the amount of parameters . Thus , we set k = c2 so that the number of parameters equals that of a linear adapter . Each adapter only increases the parameter count of the R50 backbone by 6 % . We briefly explored placing these adapters in other locations , or using other variations ( Rebuffi et al. , 2018 ) , but we did not observe any significant improvement . It is important to emphasize that the names Full and Adapters refer to the parameters that are specialized to a given subset of the upstream data before any downstream fine-tuning . In both cases , we fine-tune the entire network , after the model selection phase , to the downstream task . | The authors address transfer learning scenarios. In particular, the authors resort to training to a diverse set of experts and "cheap" performance proxies to select, for a given task, the relevant expert. This "per-task routing" is conducted via a nearest neighbor classifier based on a reduced representation for each expert. Two variants are considered: (1) full ResNet50 models are used (one for each expert) and (2) "compact adapter modules", which depict expert layers between ResNet block (all experts are learnt simultaneously with the same model backbone). | SP:ee3f9c45e31d0e04b40d2547215df4e4d34e0e0d |
Predicting Infectiousness for Proactive Contact Tracing | 1 INTRODUCTION . Until pharmaceutical interventions such as a vaccine become available , control of the COVID-19 pandemic relies on nonpharmaceutical interventions such as lockdown and social distancing . While these have often been successful in limiting spread of the disease in the short term , these restrictive measures have important negative social , mental health , and economic impacts . Digital contact tracing ( DCT ) , a technique to track the spread of the virus among individuals in a population using smartphones , is an attractive potential solution to help reduce growth in the number of cases and thereby allow more economic and social activities to resume while keeping the number of cases low . Most currently deployed DCT solutions use binary contact tracing ( BCT ) , which sends a quarantine recommendation to all recent contacts of a person after a positive test result . While BCT is simple 1All bolded terms are defined in the Glossary ; Appendix 1 . * , † , ‡ Equal contributions , alphabetically sorted ; aMila , Québec ; bUniversity of Oxford ; cMax-Planck Institute for Intelligent Systems Tübingen ; dUniversity of Ottawa ; e McGill University ; fUniversité de Montreal ; gÉcole Polytechnique de Montreal ; hThe Alan Turing Institute ; iHEC Montréal and fast to deploy , and most importantly can help curb spread of the disease ( Abueg et al. , 2020 ) , epidemiological simulations by Hinch et al . ( 2020 ) suggest that using only one bit of information about the infection status can lead to quarantining many healthy individuals while failing to quarantine infectious individuals . Relying only on positive test results as a trigger is also inefficient for a number of reasons : ( i ) Tests have high false negative rates ( Li et al. , 2020 ) ; ( ii ) Tests are administered late , only after symptoms appear , leaving the asymptomatic population , estimated 20 % -30 % of cases ( Gandhi et al. , 2020 ) , likely untested ; ( iii ) It is estimated that infectiousness is highest before symptoms appear , well before someone would get a test ( Heneghan et al. , 2020 ) , thus allowing them to infect others before being traced , ( iv ) Results typically take at least 1-2 days , and ( v ) In many places , tests are in limited supply . Recognizing the issues with test-based tracing , Gupta et al . ( 2020 ) propose a rule-based system leveraging other input clues potentially available on a smartphone ( e.g . symptoms , pre-existing medical conditions ) , an approach they call feature-based contact tracing ( FCT ) . Probabilistic ( nonbinary ) approaches , using variants of belief propagation in graphical models , e.g . ( Baker et al. , 2020 ; Satorras & Welling , 2020 ; Briers et al. , 2020 ) , could also make use of features other than test results to improve over BCT , although these approaches rely on knowing the social graph , either centrally or via distributed exchanges between nodes . The latter solution may require many bits exchanged between nodes ( for precise probability distributions ) , which is challenging both in terms of privacy and bandwidth . Building on these works , we propose a novel FCT methodology we call proactive contact tracing ( PCT ) , in which we use the type of features proposed by Gupta et al . ( 2020 ) as inputs to a predictor trained to output proactive ( before current-day ) estimates of expected infectiousness ( i.e . risk of having infected others in the past and of infecting them in the future ) . The challenges of privacy and bandwidth motivated our particular form of distributed inference where we pretrain the predictor offline and do not assume that the messages exchanged are probability distributions , but instead just informative inputs to the node-level predictor of infectiousness . We use a recently proposed COVID-19 agent-based simulation testbed ( Gupta et al. , 2020 ) called COVI-AgentSim to compare PCT to other contact tracing methods under a wide variety of conditions . We develop deep learning predictors for PCT in concert with a professional app-development company , ensuring inference models are appropriate for legacy smartphones . By leveraging the rich individual-level data produced by COVI-AgentSim to train predictors offline , we are able to perform individual-level infectiousness predictions locally to the smartphone , with sensitive personal data never required to leave the device . We find deep learning based methods to be consistently able to reduce the spread of the disease more effectively , at lower cost to mobility , and at lower adoption rates than other predictors . These results suggest that deep learning enabled PCT could be deployed in a smartphone app to help produce a better trade-off between the spread of the virus and the economic cost of mobility constraints than other DCT methods , while enforcing strong privacy constraints . 1.1 SUMMARY OF TECHNICAL CONTRIBUTIONS . 1 . We examine the consequential problem of COVID-19 infectiousness prediction and propose a new method for contact tracing , called proactive contact tracing ( see Sec . 2 ) . 2 . In order to perform distributed inference with deep learning models , we develop an architectural scaffold whose core is any set-based neural network . We embed two recently proposed networks , namely Deep Sets ( Zaheer et al. , 2017 ) and Set Transformers ( Lee et al. , 2018 ) and evaluate the resulting models via the COVI-AgentSim testbed ( Gupta et al. , 2020 ) ( see Sec . 3.1 ) . 3 . To our knowledge the combination of techniques in this pipeline is entirely novel , and of potential interest in other settings where privacy , safety , and domain shift are of concern . Our training pipeline consists of training an ML infectiousness predictor on the domain-randomized output of an agent-based epidemiological model , in several loops of retraining to mitigate issues with ( i ) non-stationarity and ( ii ) distributional shift due to predictions made by one phone influencing the input for the predictions of other phones . ( see Sec . 3.2 ) 4 . To our knowledge this is the first work to apply and benchmark a deep learning approach for probabilistic contact tracing and infectiousness risk assessment . We find such models are able to leverage weak signals and patterns in noisy , heterogeneous data to better estimate infectiousness compared to binary contact tracing and rule-based methods ( see Sec . 4 ) 2 PROACTIVE CONTACT TRACING . Proactive contact tracing ( PCT ) is an approach to digital contact tracing which leverages the rich suite of features potentially available on a smartphone ( including information about symptoms , preexisting conditions , age and lifestyle habits if willingly reported ) to compute proactive estimates of an individual ’ s expected infectiousness . These estimates are used to ( a ) provide an individualized recommendation and ( b ) propagate a graded risk message to other people who have been in contact with that individual ( see Fig . 1 ) . This stands in contrast with existing approaches for contact tracing , which are either binary ( recommending all-or-nothing quarantine to contacts ) , or require centralized storage of the contact graph or other transfers of information which are incompatible with privacy constraints in many societies . Further , the estimator runs locally on the individual ’ s device , such that any sensitive information volunteered does not need to leave the device . In Section 2.1 , we formally define the general problem PCT solves . In Section 2.2 , we describe how privacy considerations inform and shape the design of the proposed framework and implementation . Finally , in Section 3.1 , we introduce deep-learning based estimators of expected infectiousness , which we show in Section 4 to outperform DCT baselines by a large margin . 2.1 PROBLEM SETUP . We wish to estimate infectiousness yd ′ i of an agent i on day d ′ , given access to locally observable information Odi now on day d ≥ d′ and over the past dmax days ( d′ ≥ d − dmax ) Some of the information available on day d is static , including reported age , sex , pre-existing conditions , and lifestyle habits ( e.g . smoking ) , denoted gi , the health profile . Other information is measured each day : the health status hdi of reported symptoms and known test results . Finally , O d i also includes information about encounters in the last dmax days , grouped in edi for day d. Thus : Odi = ( gi , h d i , e d i , h d−1 i , e d−1 i , . . . h d−dmax i , e d−dmax i ) ( 1 ) The information ed ′ i about the encounters from day d ′ is subject to privacy constraints detailed in Section 2.2 but provides indications about the estimated infectiousness of the persons encountered at d′ , given the last available information by these contacts as of day d , hence these contacts try to estimate their past infectiousness a posteriori . Our goal is thus to model the history of the agent ’ s infectiousness ( in the last dmax days ) , which is what enables the recommendations of PCT to be proactive and makes it possible for an infected asymptomatic person to receive a warning from their contact even before they develop symptoms , because their contact obtained sufficient evidence that they were contagious on the day of their encounter . Formally , we wish to model Pθ ( y d i |O d i ) , where y d i = ( y d i , y d−1 i , . . . , y d−dmax i ) is the vector of present and past infectiousness of agent i and θ specifies the parameters of the predictive model . In our experiments we only estimate conditional expectations with a predictor fθ , with ŷdi = ( ŷ d i , ... , ŷ d−dmax i ) = fθ ( O d i ) an estimate of the conditional expected per-day present and past infectiousness EPθ [ ydi |O d i ] . The predicted expected values are used in two ways . First , they are used to generate messages transmitted on day d to contacts involved in encounters on day d′ ∈ ( d− dmax , d ) . These messages contain the estimates ŷd ′ i of the expected infectiousness of i at day d ′ , quantized to 4 bits for privacy reasons discussed in section 2.2 . Second , the prediction for today ŷdi is also used to form a discrete recommendation level ζdi ∈ { 0 , 1 , ... , n } regarding the behavior of agent i at day d via a recommendation mapping ψ , i.e . ζdi = ψ ( ŷ d i ) . 2 At ζdi = 0 agent i is not subjected to any restrictions , ζdi = 1 is baseline restrictions of a post-lockdown scenario ( as in summer 2020 in many countries ) , ζdi = n is full quarantine ( also the behaviour recommended for contacts of positively diagnosed agents under BCT ) , and intermediate levels interpolate between levels 1 and n. Here we make two important observations about contact tracing : ( 1 ) There is a trade-off between decelerating spread of disease , measured by the reproduction number R , or as number of cases,3 and minimizing the degree of restriction on agents , e.g. , measured by the average number of contacts between agents . Managing this tradeoff is a social choice which involves not just epidemiology but also economics , politics , and the particular weight different people and nations may put on individual freedoms , economic productivity and public health . The purpose of PCT is to improve the corresponding Pareto frontier . A solution which performs well on this problem will encode a policy that contains the infection while applying minimal restrictions on healthy individuals , but it may be that different methods are more appropriate depending on where society stands on that tradeoff . ( 2 ) A significant challenge comes from the feedback loop between agents : observables Odi of agent i depend on the predicted infectiousness histories and the pattern of contacts generated by the behavior ζj of other agents j . This is compounded by privacy restrictions that prevent us from knowing which agent sent which message ; we discuss our proposed solution in the following section . | In this paper the authors propose a novel method of contact tracing which they dub Proactive Contact Tracing (PCT). PCT is aimed at detecting an individual's infectivity given locally observed information (and history), as can be carried on say a mobile device. As the name suggests, being able to estimate infectivity given this local information is useful in large part due to the fact that individuals can be asymptomatic, or they can have significant infectivity before demonstrating symptoms if they are to be symptomatic. Proactively estimating infectivity levels thus provides another tool in combatting viral spread through proper containment protocols. | SP:8d80ab2c84cae404e404a09f674bf9335f564975 |
Predicting Infectiousness for Proactive Contact Tracing | 1 INTRODUCTION . Until pharmaceutical interventions such as a vaccine become available , control of the COVID-19 pandemic relies on nonpharmaceutical interventions such as lockdown and social distancing . While these have often been successful in limiting spread of the disease in the short term , these restrictive measures have important negative social , mental health , and economic impacts . Digital contact tracing ( DCT ) , a technique to track the spread of the virus among individuals in a population using smartphones , is an attractive potential solution to help reduce growth in the number of cases and thereby allow more economic and social activities to resume while keeping the number of cases low . Most currently deployed DCT solutions use binary contact tracing ( BCT ) , which sends a quarantine recommendation to all recent contacts of a person after a positive test result . While BCT is simple 1All bolded terms are defined in the Glossary ; Appendix 1 . * , † , ‡ Equal contributions , alphabetically sorted ; aMila , Québec ; bUniversity of Oxford ; cMax-Planck Institute for Intelligent Systems Tübingen ; dUniversity of Ottawa ; e McGill University ; fUniversité de Montreal ; gÉcole Polytechnique de Montreal ; hThe Alan Turing Institute ; iHEC Montréal and fast to deploy , and most importantly can help curb spread of the disease ( Abueg et al. , 2020 ) , epidemiological simulations by Hinch et al . ( 2020 ) suggest that using only one bit of information about the infection status can lead to quarantining many healthy individuals while failing to quarantine infectious individuals . Relying only on positive test results as a trigger is also inefficient for a number of reasons : ( i ) Tests have high false negative rates ( Li et al. , 2020 ) ; ( ii ) Tests are administered late , only after symptoms appear , leaving the asymptomatic population , estimated 20 % -30 % of cases ( Gandhi et al. , 2020 ) , likely untested ; ( iii ) It is estimated that infectiousness is highest before symptoms appear , well before someone would get a test ( Heneghan et al. , 2020 ) , thus allowing them to infect others before being traced , ( iv ) Results typically take at least 1-2 days , and ( v ) In many places , tests are in limited supply . Recognizing the issues with test-based tracing , Gupta et al . ( 2020 ) propose a rule-based system leveraging other input clues potentially available on a smartphone ( e.g . symptoms , pre-existing medical conditions ) , an approach they call feature-based contact tracing ( FCT ) . Probabilistic ( nonbinary ) approaches , using variants of belief propagation in graphical models , e.g . ( Baker et al. , 2020 ; Satorras & Welling , 2020 ; Briers et al. , 2020 ) , could also make use of features other than test results to improve over BCT , although these approaches rely on knowing the social graph , either centrally or via distributed exchanges between nodes . The latter solution may require many bits exchanged between nodes ( for precise probability distributions ) , which is challenging both in terms of privacy and bandwidth . Building on these works , we propose a novel FCT methodology we call proactive contact tracing ( PCT ) , in which we use the type of features proposed by Gupta et al . ( 2020 ) as inputs to a predictor trained to output proactive ( before current-day ) estimates of expected infectiousness ( i.e . risk of having infected others in the past and of infecting them in the future ) . The challenges of privacy and bandwidth motivated our particular form of distributed inference where we pretrain the predictor offline and do not assume that the messages exchanged are probability distributions , but instead just informative inputs to the node-level predictor of infectiousness . We use a recently proposed COVID-19 agent-based simulation testbed ( Gupta et al. , 2020 ) called COVI-AgentSim to compare PCT to other contact tracing methods under a wide variety of conditions . We develop deep learning predictors for PCT in concert with a professional app-development company , ensuring inference models are appropriate for legacy smartphones . By leveraging the rich individual-level data produced by COVI-AgentSim to train predictors offline , we are able to perform individual-level infectiousness predictions locally to the smartphone , with sensitive personal data never required to leave the device . We find deep learning based methods to be consistently able to reduce the spread of the disease more effectively , at lower cost to mobility , and at lower adoption rates than other predictors . These results suggest that deep learning enabled PCT could be deployed in a smartphone app to help produce a better trade-off between the spread of the virus and the economic cost of mobility constraints than other DCT methods , while enforcing strong privacy constraints . 1.1 SUMMARY OF TECHNICAL CONTRIBUTIONS . 1 . We examine the consequential problem of COVID-19 infectiousness prediction and propose a new method for contact tracing , called proactive contact tracing ( see Sec . 2 ) . 2 . In order to perform distributed inference with deep learning models , we develop an architectural scaffold whose core is any set-based neural network . We embed two recently proposed networks , namely Deep Sets ( Zaheer et al. , 2017 ) and Set Transformers ( Lee et al. , 2018 ) and evaluate the resulting models via the COVI-AgentSim testbed ( Gupta et al. , 2020 ) ( see Sec . 3.1 ) . 3 . To our knowledge the combination of techniques in this pipeline is entirely novel , and of potential interest in other settings where privacy , safety , and domain shift are of concern . Our training pipeline consists of training an ML infectiousness predictor on the domain-randomized output of an agent-based epidemiological model , in several loops of retraining to mitigate issues with ( i ) non-stationarity and ( ii ) distributional shift due to predictions made by one phone influencing the input for the predictions of other phones . ( see Sec . 3.2 ) 4 . To our knowledge this is the first work to apply and benchmark a deep learning approach for probabilistic contact tracing and infectiousness risk assessment . We find such models are able to leverage weak signals and patterns in noisy , heterogeneous data to better estimate infectiousness compared to binary contact tracing and rule-based methods ( see Sec . 4 ) 2 PROACTIVE CONTACT TRACING . Proactive contact tracing ( PCT ) is an approach to digital contact tracing which leverages the rich suite of features potentially available on a smartphone ( including information about symptoms , preexisting conditions , age and lifestyle habits if willingly reported ) to compute proactive estimates of an individual ’ s expected infectiousness . These estimates are used to ( a ) provide an individualized recommendation and ( b ) propagate a graded risk message to other people who have been in contact with that individual ( see Fig . 1 ) . This stands in contrast with existing approaches for contact tracing , which are either binary ( recommending all-or-nothing quarantine to contacts ) , or require centralized storage of the contact graph or other transfers of information which are incompatible with privacy constraints in many societies . Further , the estimator runs locally on the individual ’ s device , such that any sensitive information volunteered does not need to leave the device . In Section 2.1 , we formally define the general problem PCT solves . In Section 2.2 , we describe how privacy considerations inform and shape the design of the proposed framework and implementation . Finally , in Section 3.1 , we introduce deep-learning based estimators of expected infectiousness , which we show in Section 4 to outperform DCT baselines by a large margin . 2.1 PROBLEM SETUP . We wish to estimate infectiousness yd ′ i of an agent i on day d ′ , given access to locally observable information Odi now on day d ≥ d′ and over the past dmax days ( d′ ≥ d − dmax ) Some of the information available on day d is static , including reported age , sex , pre-existing conditions , and lifestyle habits ( e.g . smoking ) , denoted gi , the health profile . Other information is measured each day : the health status hdi of reported symptoms and known test results . Finally , O d i also includes information about encounters in the last dmax days , grouped in edi for day d. Thus : Odi = ( gi , h d i , e d i , h d−1 i , e d−1 i , . . . h d−dmax i , e d−dmax i ) ( 1 ) The information ed ′ i about the encounters from day d ′ is subject to privacy constraints detailed in Section 2.2 but provides indications about the estimated infectiousness of the persons encountered at d′ , given the last available information by these contacts as of day d , hence these contacts try to estimate their past infectiousness a posteriori . Our goal is thus to model the history of the agent ’ s infectiousness ( in the last dmax days ) , which is what enables the recommendations of PCT to be proactive and makes it possible for an infected asymptomatic person to receive a warning from their contact even before they develop symptoms , because their contact obtained sufficient evidence that they were contagious on the day of their encounter . Formally , we wish to model Pθ ( y d i |O d i ) , where y d i = ( y d i , y d−1 i , . . . , y d−dmax i ) is the vector of present and past infectiousness of agent i and θ specifies the parameters of the predictive model . In our experiments we only estimate conditional expectations with a predictor fθ , with ŷdi = ( ŷ d i , ... , ŷ d−dmax i ) = fθ ( O d i ) an estimate of the conditional expected per-day present and past infectiousness EPθ [ ydi |O d i ] . The predicted expected values are used in two ways . First , they are used to generate messages transmitted on day d to contacts involved in encounters on day d′ ∈ ( d− dmax , d ) . These messages contain the estimates ŷd ′ i of the expected infectiousness of i at day d ′ , quantized to 4 bits for privacy reasons discussed in section 2.2 . Second , the prediction for today ŷdi is also used to form a discrete recommendation level ζdi ∈ { 0 , 1 , ... , n } regarding the behavior of agent i at day d via a recommendation mapping ψ , i.e . ζdi = ψ ( ŷ d i ) . 2 At ζdi = 0 agent i is not subjected to any restrictions , ζdi = 1 is baseline restrictions of a post-lockdown scenario ( as in summer 2020 in many countries ) , ζdi = n is full quarantine ( also the behaviour recommended for contacts of positively diagnosed agents under BCT ) , and intermediate levels interpolate between levels 1 and n. Here we make two important observations about contact tracing : ( 1 ) There is a trade-off between decelerating spread of disease , measured by the reproduction number R , or as number of cases,3 and minimizing the degree of restriction on agents , e.g. , measured by the average number of contacts between agents . Managing this tradeoff is a social choice which involves not just epidemiology but also economics , politics , and the particular weight different people and nations may put on individual freedoms , economic productivity and public health . The purpose of PCT is to improve the corresponding Pareto frontier . A solution which performs well on this problem will encode a policy that contains the infection while applying minimal restrictions on healthy individuals , but it may be that different methods are more appropriate depending on where society stands on that tradeoff . ( 2 ) A significant challenge comes from the feedback loop between agents : observables Odi of agent i depend on the predicted infectiousness histories and the pattern of contacts generated by the behavior ζj of other agents j . This is compounded by privacy restrictions that prevent us from knowing which agent sent which message ; we discuss our proposed solution in the following section . | This paper introduces a deep learning based digital contact tracing method to minimize the spread of COVID19. The proposed method is based on locally processed information collected on the mobile app. Unlike the most commonly used digital tracing approach that sends quarantine recommendations to all recent contacts of a newly diagnosed person, the developed method in this paper considers all the information related to the users and the ones who have been in contacts with them in order to make user specific recommendations. This is not an easy problem because of different conflicting factors involving in making recommendation decisions, i.e. user privacy, mobility restrictions, and public health. The proposed method, called proactive content tracing, is a set-based architecture (that uses attention) and perform distributed inference to preserve privacy. | SP:8d80ab2c84cae404e404a09f674bf9335f564975 |
Noise or Signal: The Role of Image Backgrounds in Object Recognition | 1 INTRODUCTION . Object recognition models are typically trained to minimize loss on a given dataset , and evaluated by the accuracy they attain on the corresponding test set . In this paradigm , model performance can be improved by incorporating any generalizing correlation between images and their labels into decision-making . However , the actual model reliability and robustness depend on the specific set of correlations that is used , and on how those correlations are combined . Indeed , outside of the training distribution , model predictions can deviate wildly from human expectations either due to relying on correlations that humans do not perceive ( Jetley et al. , 2018 ; Ilyas et al. , 2019 ; Jacobsen et al. , 2019 ) , or due to overusing correlations , such as texture ( Geirhos et al. , 2019 ; Baker et al. , 2018 ) and color ( Yip & Sinha , 2002 ) , that humans do use ( but to a lesser degree ) . Characterizing the correlations that models depend on thus has important implications for understanding model behavior , in general . Image backgrounds are a natural source of correlation between images and their labels in object recognition . Indeed , prior work has shown that models may use backgrounds in classification ( Zhang et al. , 2007 ; Ribeiro et al. , 2016 ; Zhu et al. , 2017 ; Rosenfeld et al. , 2018 ; Zech et al. , 2018 ; Barbu et al. , 2019 ; Shetty et al. , 2019 ; Sagawa et al. , 2020 ; Geirhos et al. , 2020 ) , and suggests that even human vision makes use of image context for scene and object recognition ( Torralba , 2003 ) . In this work , we aim to obtain a deeper and more holistic understanding of how current state-of-the-art image classifiers utilize image backgrounds . To this end , in contrast to most of the prior work ( which tends to study relatively small and often newly-curated image datasets1 ) , our focus is on ImageNet ( Russakovsky et al. , 2015 ) —one of the largest and most widely used datasets , with state-of-the-art training methods , architectures , and pre-trained models tuned to work well for it . Zhu et al . ( 2017 ) analyze ImageNet classification ( focusing on the older , AlexNet model ) to find that AlexNet achieves small but non-trivial test accuracy on a dataset consisting of only backgrounds ( where foreground objects are replaced by black rectangles ) . While sufficient for establishing that backgrounds can be used for classification , we aim to go beyond those initial explorations to get a more fine-grained understanding of the relative importance of backgrounds and foregrounds , for newer , state-of-the-art models , and to provide a versatile toolkit for others to use . Specifically , we investigate the extent to which models rely on backgrounds , the implications of this reliance , and how models ’ use of backgrounds has evolved over time . Concretely : • We create a suite of datasets that help disentangle ( and control for different aspects of ) the impact of foreground and background signals on classification . The code and datasets 1We discuss these works in greater detail in Section 5 , Related Works . are publicly available for others to use in this repository : https : //github.com/ MadryLab/backgrounds_challenge . • Using the aforementioned toolkit , we characterize models ’ reliance on image backgrounds . We find that image backgrounds alone suffice for fairly successful classification and that changing background signals decreases average-case performance . In fact , we further show that by choosing backgrounds in an adversarial manner , we can make standard models misclassify 88 % of images as the background class . • We demonstrate that standard models not only use but require backgrounds for correctly classifying large portions of test sets ( 35 % on our benchmark ) . • We study the impact of backgrounds on classification for a variety of classifiers , and find that models with higher ImageNet test accuracy tend to simultaneously have higher accuracy on image backgrounds alone and have greater robustness to changes in image background . 2 METHODOLOGY . To properly gauge image backgrounds ’ role in image classification , we construct a synthetic dataset for disentangling background from foreground signal : ImageNet-9 . Base dataset : ImageNet-9 . We organize a subset of ImageNet into a new dataset with nine coarse-grained classes and call it ImageNet-9 ( IN-9 ) 2 . To create it , we group together ImageNet classes sharing an ancestor in the WordNet ( Miller , 1995 ) hierarchy . We use coarse-grained classes because there are not enough images with annotated bounding boxes ( which we need to disentangle backgrounds and foregrounds ) to use the standard labels . The resulting IN-9 dataset is class-balanced and has 45405 training images and 4050 testing images . While we can ( and do ) apply our methods on the full ImageNet dataset as well , we choose to focus on this coarse-grained version of ImageNet because of its higher-fidelity images . We describe the dataset creation process in detail and discuss the advantages of focusing on IN-9 in Appendix A . 2These classes are dog , bird , vehicle , reptile , carnivore , insect , instrument , primate , and fish . Variations of ImageNet-9 From this base set of images , which we call the ORIGINAL version of IN-9 , we create seven other synthetic variations designed to understand the impact of backgrounds . We use both rectangular bounding boxes and the foreground segmentation algorithm GrabCut ( Rother et al. , 2004 ) , as implemented in OpenCV , to disentangle backgrounds and foregrounds . We visualize these variations in Figure 1 , and provide a detailed reference in Table 1 . These subdatasets of IN-9 differ only in how they process the foregrounds and backgrounds of each constituent image . Larger dataset : IN-9L We finally create a dataset called IN-9L that consists of all the images in ImageNet corresponding to the classes in ORIGINAL ( rather than just the images that have associated bounding boxes ) . This dataset has about 180k training images in total . We leverage this larger dataset to train better generalizing models , and prefer to analyze models trained on IN-9L whenever possible . 3 QUANTIFYING RELIANCE ON BACKGROUND SIGNALS . With ImageNet-9 in hand , we now assess the role of image backgrounds in classification . Backgrounds suffice for classification . Prior work has found that models are able to make accurate predictions based on backgrounds alone ; we begin by directly quantifying this ability . Looking at the ONLY-BG-T , ONLY-BG-B , and NO-FG datasets , we find ( cf . Figure 2 ) that models trained on these background-only training sets generalize reasonably well to both their corresponding test sets and to unmodified images from the ORIGINAL test set ( around 40-50 % for every model , far above the baseline of 11 % representing random classification ) . Our results confirm that image backgrounds contain signal that models can accurately classify standard images with . Models exploit background signal for classification . We discover that models can misclassify due to background signal , especially when the background class does not match that of the foreground . As a demonstration , we study model accuracies on the MIXED-RAND dataset , where image backgrounds are randomized and thus provide no information about the correct label . By comparing test accuracies on MIXED-RAND and MIXED-SAME 3 , where images have class-consistent backgrounds , we can measure classifiers ’ dependence on the correct background . We denote the resulting accuracy gap between MIXED-SAME and MIXED-RAND as the BG-GAP ; this difference represents the drop in model accuracy due to changing the class signal from the background . In Table 2 , we observe a BG-GAP of 13-22 % and 4-11 % for models trained on IN-9L and ImageNet , respectively , suggesting that backgrounds often mislead state-of-the-art models even when the correct foreground is present . More Training Data can reduce the BG-GAP . Our results indicate that ImageNet-trained models are less dependent on backgrounds than their IN-9L-trained counterparts—they have a smaller ( but still significant ) BG-GAP , and perform worse when predicting solely based on backgrounds ( i.e. , on the ONLY-BG-T dataset ) . We explore two ways that ImageNet differs from IN-9L to understand this phenomena—ImageNet has ( a ) more datapoints than IN-9L , and ( b ) a more fine-grained class structure . Figure 3 shows that more training data reduces the BG-GAP , particularly when the training dataset size approaches the size of ImageNet . This indicates that training on much more data ( and thus , more backgrounds ) can reduce ( but not eliminate ) the effect of backgrounds on model predictions . An ablation study of ImageNet ’ s more fine-grained class structure does not find strong evidence supporting its helpfulness ( cf . Appendix B ) . Models are vulnerable to adversarial backgrounds . To understand how worst-case backgrounds impact models ’ performance , we evaluate model robustness to adversarially chosen backgrounds . We find that 88 % of foregrounds are susceptible to such backgrounds ; that is , for these foregrounds , there is a background that causes the classifier to classify the resulting foreground-background combination as the background class . For a finer grained look , we also evaluate image backgrounds based on their attack success rate ( ASR ) , i.e. , how frequently they cause models to predict the ( background ) class in the presence of a conflicting foreground class . As an example , Figure 4 shows the five backgrounds with the highest ASR for the insect class—these backgrounds ( extracted from insect images in ORIGINAL ) fool a IN-9L-trained ResNet-50 model into predicting insect on up to 52 % of 3MIXED-SAME controls for artifacts from image processing presented in MIXED-RAND . For further discussion , see Appendix D. non-insect foregrounds . We plot a histogram of ASR over all insect backgrounds in Figure 24 of the Appendix—it has a long tail . Similar results are observed for other classes as well ( cf . Appendix G ) . Training on MIXED-RAND reduces background dependence . Next , we explore how to reduce models ’ dependence on background . To this end , we train models on MIXED-RAND , a synthetic dataset where background signals are decorrelated from class labels . As we would expect , MIXEDRAND-trained models extract less signal from backgrounds : evaluation results show that MIXEDRAND models perform poorly ( 15 % accuracy—barely higher than random ) on datasets with only backgrounds and no foregrounds , ( ONLY-BG-T or ONLY-BG-B ) . Indeed , such models are also more accurate on datasets where backgrounds do not match foregrounds . In Figure 5 , we observe that a MIXED-RAND-trained model has 17.3 % higher accuracy than its ORIGINAL-trained counterpart on MIXED-RAND , and 22.3 % higher accuracy on MIXED-NEXT , a dataset where background signals class-consistently mismatch foregrounds . ( Recall that MIXEDNEXT images have foregrounds from class y mixed with backgrounds from class y + 1 , labeled as class y . ) The MIXED-RAND-trained model also has little variation ( at most 3.8 % ) in accuracy across all five test sets that contain the correct foreground . Qualitatively , the MIXED-RAND-trained model also appears to place more relative importance on foreground pixels than the ORIGINAL-trained model ; the saliency maps of the two models in Figure 6 show that the MIXED-RAND-trained model ’ s saliency maps highlight more foreground pixels than those of ORIGINAL-trained models . A fine grained look at dependence on backgrounds . We now analyze models ’ reliance on backgrounds at an image-by-image level and ask : for which images does introducing backgrounds help or hurt classifiers ’ performance ? To this end , for each image in ORIGINAL , we decompose how models use foreground and background signals by examining classifiers ’ predictions on the corresponding image in MIXED-RAND and ONLY-BG-T . Here , we use the MIXED-RAND and ONLY-BG-T predictions as a proxy for which class the foreground and background signals ( alone ) point towards , respectively . We categorize each image based on how its background and foreground signals impact classification ; we list the categories in Table 3 and show the counts for each category as a histogram per classifier in Figure 7 . Our results show that while few backgrounds induce misclassification ( see Appendix H for examples ) , a large fraction of images require backgrounds for correct classification—approximately 35 % on the ORIGINAL trained classifiers , as calculated by combining the “ BG Required ” and “ BG+FG Required ” categories . Further insights derived from IN-9 are discussed in the Appendix D. We focus on key findings in this section , but also include more comprehensive results and examples of other questions that can be explored by using the toolkit of IN-9 in the Appendix . | The submission performs similar foreground-background analysis for object recognition as in [1], but with more modern networks in mind. As such, the main takeaways indicate that this phenomenon still exists - networks today continue to suffer from background bias as they did four years ago with AlexNet, although maybe to a lesser extent. This submission curates more careful evaluation setups by using segmentation of foreground objects, tiled backgrounds to create multiple datasets that serve to illustrate the trends in a more disambiguated way. | SP:0249d3ffcb3333fe857d83bae77e709a2f997956 |
Noise or Signal: The Role of Image Backgrounds in Object Recognition | 1 INTRODUCTION . Object recognition models are typically trained to minimize loss on a given dataset , and evaluated by the accuracy they attain on the corresponding test set . In this paradigm , model performance can be improved by incorporating any generalizing correlation between images and their labels into decision-making . However , the actual model reliability and robustness depend on the specific set of correlations that is used , and on how those correlations are combined . Indeed , outside of the training distribution , model predictions can deviate wildly from human expectations either due to relying on correlations that humans do not perceive ( Jetley et al. , 2018 ; Ilyas et al. , 2019 ; Jacobsen et al. , 2019 ) , or due to overusing correlations , such as texture ( Geirhos et al. , 2019 ; Baker et al. , 2018 ) and color ( Yip & Sinha , 2002 ) , that humans do use ( but to a lesser degree ) . Characterizing the correlations that models depend on thus has important implications for understanding model behavior , in general . Image backgrounds are a natural source of correlation between images and their labels in object recognition . Indeed , prior work has shown that models may use backgrounds in classification ( Zhang et al. , 2007 ; Ribeiro et al. , 2016 ; Zhu et al. , 2017 ; Rosenfeld et al. , 2018 ; Zech et al. , 2018 ; Barbu et al. , 2019 ; Shetty et al. , 2019 ; Sagawa et al. , 2020 ; Geirhos et al. , 2020 ) , and suggests that even human vision makes use of image context for scene and object recognition ( Torralba , 2003 ) . In this work , we aim to obtain a deeper and more holistic understanding of how current state-of-the-art image classifiers utilize image backgrounds . To this end , in contrast to most of the prior work ( which tends to study relatively small and often newly-curated image datasets1 ) , our focus is on ImageNet ( Russakovsky et al. , 2015 ) —one of the largest and most widely used datasets , with state-of-the-art training methods , architectures , and pre-trained models tuned to work well for it . Zhu et al . ( 2017 ) analyze ImageNet classification ( focusing on the older , AlexNet model ) to find that AlexNet achieves small but non-trivial test accuracy on a dataset consisting of only backgrounds ( where foreground objects are replaced by black rectangles ) . While sufficient for establishing that backgrounds can be used for classification , we aim to go beyond those initial explorations to get a more fine-grained understanding of the relative importance of backgrounds and foregrounds , for newer , state-of-the-art models , and to provide a versatile toolkit for others to use . Specifically , we investigate the extent to which models rely on backgrounds , the implications of this reliance , and how models ’ use of backgrounds has evolved over time . Concretely : • We create a suite of datasets that help disentangle ( and control for different aspects of ) the impact of foreground and background signals on classification . The code and datasets 1We discuss these works in greater detail in Section 5 , Related Works . are publicly available for others to use in this repository : https : //github.com/ MadryLab/backgrounds_challenge . • Using the aforementioned toolkit , we characterize models ’ reliance on image backgrounds . We find that image backgrounds alone suffice for fairly successful classification and that changing background signals decreases average-case performance . In fact , we further show that by choosing backgrounds in an adversarial manner , we can make standard models misclassify 88 % of images as the background class . • We demonstrate that standard models not only use but require backgrounds for correctly classifying large portions of test sets ( 35 % on our benchmark ) . • We study the impact of backgrounds on classification for a variety of classifiers , and find that models with higher ImageNet test accuracy tend to simultaneously have higher accuracy on image backgrounds alone and have greater robustness to changes in image background . 2 METHODOLOGY . To properly gauge image backgrounds ’ role in image classification , we construct a synthetic dataset for disentangling background from foreground signal : ImageNet-9 . Base dataset : ImageNet-9 . We organize a subset of ImageNet into a new dataset with nine coarse-grained classes and call it ImageNet-9 ( IN-9 ) 2 . To create it , we group together ImageNet classes sharing an ancestor in the WordNet ( Miller , 1995 ) hierarchy . We use coarse-grained classes because there are not enough images with annotated bounding boxes ( which we need to disentangle backgrounds and foregrounds ) to use the standard labels . The resulting IN-9 dataset is class-balanced and has 45405 training images and 4050 testing images . While we can ( and do ) apply our methods on the full ImageNet dataset as well , we choose to focus on this coarse-grained version of ImageNet because of its higher-fidelity images . We describe the dataset creation process in detail and discuss the advantages of focusing on IN-9 in Appendix A . 2These classes are dog , bird , vehicle , reptile , carnivore , insect , instrument , primate , and fish . Variations of ImageNet-9 From this base set of images , which we call the ORIGINAL version of IN-9 , we create seven other synthetic variations designed to understand the impact of backgrounds . We use both rectangular bounding boxes and the foreground segmentation algorithm GrabCut ( Rother et al. , 2004 ) , as implemented in OpenCV , to disentangle backgrounds and foregrounds . We visualize these variations in Figure 1 , and provide a detailed reference in Table 1 . These subdatasets of IN-9 differ only in how they process the foregrounds and backgrounds of each constituent image . Larger dataset : IN-9L We finally create a dataset called IN-9L that consists of all the images in ImageNet corresponding to the classes in ORIGINAL ( rather than just the images that have associated bounding boxes ) . This dataset has about 180k training images in total . We leverage this larger dataset to train better generalizing models , and prefer to analyze models trained on IN-9L whenever possible . 3 QUANTIFYING RELIANCE ON BACKGROUND SIGNALS . With ImageNet-9 in hand , we now assess the role of image backgrounds in classification . Backgrounds suffice for classification . Prior work has found that models are able to make accurate predictions based on backgrounds alone ; we begin by directly quantifying this ability . Looking at the ONLY-BG-T , ONLY-BG-B , and NO-FG datasets , we find ( cf . Figure 2 ) that models trained on these background-only training sets generalize reasonably well to both their corresponding test sets and to unmodified images from the ORIGINAL test set ( around 40-50 % for every model , far above the baseline of 11 % representing random classification ) . Our results confirm that image backgrounds contain signal that models can accurately classify standard images with . Models exploit background signal for classification . We discover that models can misclassify due to background signal , especially when the background class does not match that of the foreground . As a demonstration , we study model accuracies on the MIXED-RAND dataset , where image backgrounds are randomized and thus provide no information about the correct label . By comparing test accuracies on MIXED-RAND and MIXED-SAME 3 , where images have class-consistent backgrounds , we can measure classifiers ’ dependence on the correct background . We denote the resulting accuracy gap between MIXED-SAME and MIXED-RAND as the BG-GAP ; this difference represents the drop in model accuracy due to changing the class signal from the background . In Table 2 , we observe a BG-GAP of 13-22 % and 4-11 % for models trained on IN-9L and ImageNet , respectively , suggesting that backgrounds often mislead state-of-the-art models even when the correct foreground is present . More Training Data can reduce the BG-GAP . Our results indicate that ImageNet-trained models are less dependent on backgrounds than their IN-9L-trained counterparts—they have a smaller ( but still significant ) BG-GAP , and perform worse when predicting solely based on backgrounds ( i.e. , on the ONLY-BG-T dataset ) . We explore two ways that ImageNet differs from IN-9L to understand this phenomena—ImageNet has ( a ) more datapoints than IN-9L , and ( b ) a more fine-grained class structure . Figure 3 shows that more training data reduces the BG-GAP , particularly when the training dataset size approaches the size of ImageNet . This indicates that training on much more data ( and thus , more backgrounds ) can reduce ( but not eliminate ) the effect of backgrounds on model predictions . An ablation study of ImageNet ’ s more fine-grained class structure does not find strong evidence supporting its helpfulness ( cf . Appendix B ) . Models are vulnerable to adversarial backgrounds . To understand how worst-case backgrounds impact models ’ performance , we evaluate model robustness to adversarially chosen backgrounds . We find that 88 % of foregrounds are susceptible to such backgrounds ; that is , for these foregrounds , there is a background that causes the classifier to classify the resulting foreground-background combination as the background class . For a finer grained look , we also evaluate image backgrounds based on their attack success rate ( ASR ) , i.e. , how frequently they cause models to predict the ( background ) class in the presence of a conflicting foreground class . As an example , Figure 4 shows the five backgrounds with the highest ASR for the insect class—these backgrounds ( extracted from insect images in ORIGINAL ) fool a IN-9L-trained ResNet-50 model into predicting insect on up to 52 % of 3MIXED-SAME controls for artifacts from image processing presented in MIXED-RAND . For further discussion , see Appendix D. non-insect foregrounds . We plot a histogram of ASR over all insect backgrounds in Figure 24 of the Appendix—it has a long tail . Similar results are observed for other classes as well ( cf . Appendix G ) . Training on MIXED-RAND reduces background dependence . Next , we explore how to reduce models ’ dependence on background . To this end , we train models on MIXED-RAND , a synthetic dataset where background signals are decorrelated from class labels . As we would expect , MIXEDRAND-trained models extract less signal from backgrounds : evaluation results show that MIXEDRAND models perform poorly ( 15 % accuracy—barely higher than random ) on datasets with only backgrounds and no foregrounds , ( ONLY-BG-T or ONLY-BG-B ) . Indeed , such models are also more accurate on datasets where backgrounds do not match foregrounds . In Figure 5 , we observe that a MIXED-RAND-trained model has 17.3 % higher accuracy than its ORIGINAL-trained counterpart on MIXED-RAND , and 22.3 % higher accuracy on MIXED-NEXT , a dataset where background signals class-consistently mismatch foregrounds . ( Recall that MIXEDNEXT images have foregrounds from class y mixed with backgrounds from class y + 1 , labeled as class y . ) The MIXED-RAND-trained model also has little variation ( at most 3.8 % ) in accuracy across all five test sets that contain the correct foreground . Qualitatively , the MIXED-RAND-trained model also appears to place more relative importance on foreground pixels than the ORIGINAL-trained model ; the saliency maps of the two models in Figure 6 show that the MIXED-RAND-trained model ’ s saliency maps highlight more foreground pixels than those of ORIGINAL-trained models . A fine grained look at dependence on backgrounds . We now analyze models ’ reliance on backgrounds at an image-by-image level and ask : for which images does introducing backgrounds help or hurt classifiers ’ performance ? To this end , for each image in ORIGINAL , we decompose how models use foreground and background signals by examining classifiers ’ predictions on the corresponding image in MIXED-RAND and ONLY-BG-T . Here , we use the MIXED-RAND and ONLY-BG-T predictions as a proxy for which class the foreground and background signals ( alone ) point towards , respectively . We categorize each image based on how its background and foreground signals impact classification ; we list the categories in Table 3 and show the counts for each category as a histogram per classifier in Figure 7 . Our results show that while few backgrounds induce misclassification ( see Appendix H for examples ) , a large fraction of images require backgrounds for correct classification—approximately 35 % on the ORIGINAL trained classifiers , as calculated by combining the “ BG Required ” and “ BG+FG Required ” categories . Further insights derived from IN-9 are discussed in the Appendix D. We focus on key findings in this section , but also include more comprehensive results and examples of other questions that can be explored by using the toolkit of IN-9 in the Appendix . | The authors presented a comprehensive study on the role of background in image classification. They designed a new set of data and a lot of experiments to find answers to the following questions: (1) How much decrease in classification accuracy if the background signal is removed? (2) Can a model successfully classify an image solely based on its background? (3) Will an image be misclassified if the image's background is replaced by a different background? (4) With the advance of the model architecture, are the more advanced models like ResNet more robust to background effect? | SP:0249d3ffcb3333fe857d83bae77e709a2f997956 |
Q-Value Weighted Regression: Reinforcement Learning with Limited Data | Sample efficiency and performance in the offline setting have emerged as among the main challenges of deep reinforcement learning . We introduce Q-Value Weighted Regression ( QWR ) , a simple RL algorithm that excels in these aspects . QWR is an extension of Advantage Weighted Regression ( AWR ) , an off-policy actor-critic algorithm that performs very well on continuous control tasks , also in the offline setting , but struggles on tasks with discrete actions and in sample efficiency . We perform a theoretical analysis of AWR that explains its shortcomings and use the insights to motivate QWR theoretically . We show experimentally that QWR matches state-of-the-art algorithms both on tasks with continuous and discrete actions . We study the main hyperparameters of QWR and find that it is stable in a wide range of their choices and on different tasks . In particular , QWR yields results on par with SAC on the MuJoCo suite and – with the same set of hyperparameters – yields results on par with a highly tuned Rainbow implementation on a set of Atari games . We also verify that QWR performs well in the offline RL setting , making it a compelling choice for reinforcement learning in domains with limited data . 1 INTRODUCTION . Deep reinforcement learning has been applied to a large number of challenging tasks , from games ( Silver et al. , 2017 ; OpenAI , 2018 ; Vinyals et al. , 2017 ) to robotic control ( Sadeghi & Levine , 2016 ; OpenAI et al. , 2018 ; Rusu et al. , 2016 ) . Since RL makes minimal assumptions on the underlying task , it holds the promise of automating a wide range of applications . However , its widespread adoption has been hampered by a number of challenges . Reinforcement learning algorithms can be substantially more complex to implement and tune than standard supervised learning methods and can have a fair number of hyper-parameters and be brittle with respect to their choices , and may require a large number of interactions with the environment . These issues are well-known and there has been significant progress in addressing them . The policy gradient algorithm REINFORCE ( Williams ( 1992 ) ) is simple to understand and implement , but is both brittle and requires on-policy data . Proximal Policy Optimization ( PPO , Schulman et al . ( 2017 ) ) is a more stable on-policy algorithm that has seen a number of successful applications despite requiring a large number of interactions with the environment . Soft Actor-Critic ( SAC , Haarnoja et al . ( 2018 ) ) is a much more sample-efficient off-policy algorithm , but it is defined only for continuous action spaces and does not work well in the offline setting , known as batch reinforcement learning , where all samples are provided from earlier interactions with the environment , and the agent can not collect more samples . Advantage Weighted Regression ( AWR , Peng et al . ( 2019 ) ) is a recent offpolicy actor-critic algorithm that works well in the offline setting and is built using only simple and convergent maximum likelihood loss functions , making it easier to tune and debug . It is competitive with SAC given enough time to train , but is less sample-efficient and has not been demonstrated to succeed in settings with discrete actions . We replace the value function critic of AWR with a Q-value function . Next , we add action sampling to the actor training loop . Finally , we introduce a custom backup to the Q-value training . The resulting algorithm , which we call Q-Value Weighted Regression ( QWR ) inherits the advantages of AWR but is more sample-efficient and works well with discrete actions and in visual domains , e.g. , on Atari games . To better understand QWR we perform a number of ablations , checking different number of samples in actor training , different advantage estimators , and aggregation functions . These choices affect the performance of QWR only to a limited extent and it remains stable with each of the choices across the tasks we experiment with . We run experiments with QWR on the MuJoCo environments and on a subset of the Atari Learning Environment . Since sample efficiency is our main concern , we focus on the difficult case when the number of interactions with the environment is limited – in most our experiments we limit it to 100K interactions . The experiments demonstrate that QWR is indeed more sample-efficient than AWR . On MuJoCo , it performs on par with Soft Actor-Critic ( SAC ) , the current state-of-the-art algorithm for continuous domains . On Atari , QWR performs on par with OTRainbow , a variant of Rainbow highly tuned for sample efficiency . Notably , we use the same set of hyperparameters ( except for the network architecture ) for both our final MuJoCo and Atari experiments . 2 Q-VALUE WEIGHTED REGRESSION . 2.1 ADVANTAGE WEIGHTED REGRESSION . Peng et al . ( 2019 ) recently proposed Advantage Weighted Regression ( AWR ) , an off-policy , actorcritic algorithm notable for its simplicity and stability , achieving competitive results across a range of continuous control tasks . It can be expressed as interleaving data collection and two regression tasks performed on the replay buffer , as shown in Algorithm 1 . Algorithm 1 Advantage Weighted Regression . 1 : θ ← random actor parameters 2 : φ← random critic parameters 3 : D ← ∅ 4 : for k in 0 .. n_iterations− 1 do 5 : add trajectories { τi } sampled by πθ to D 6 : for i in 0 .. n_critic_steps− 1 do 7 : sample ( s , a ) ∼ D 8 : φ← φ− αV∇φ [ ||Rs , aD − Vφ ( s ) ||2 ] 9 : end for 10 : for i in 0 .. n_actor_steps− 1 do 11 : sample ( s , a ) ∼ D 12 : θ ← θ + απ∇θ [ log πθ ( a|s ) exp ( 1β ( R s , a D − Vφ ( s ) ) ] 13 : end for 14 : end for AWR optimizes expected improvement of an actor policy π ( a|s ) over a sampling policy µ ( a|s ) by regression towards the well-performing actions in the collected experience . Improvement is achieved by weighting the actor loss by exponentiated advantage Aµ ( s , a ) of an action , skewing the regression towards the better-performing actions . The advantage is calculated based on the expected return Rs , aµ achieved by performing action a in state s and then following the sampling policy µ . To calculate the advantage , one first estimates the value , Vµ ( s ) , using a learned critic and then computes Aµ ( s , a ) = Rs , aµ − Vµ ( s ) . This results in the following formula for the actor : argmax π Es∼dµ ( s ) Ea∼µ ( ·|s ) [ log π ( a|s ) exp ( 1 β ( Rs , aµ − Vµ ( s ) ) ) ] , ( 1 ) where dµ ( s ) = ∑∞ t=1 γ t−1p ( st = s|µ ) denotes the unnormalized , discounted state visitation distribution of the policy µ , and β is a temperature hyperparameter . The critic is trained to estimate the future returns of the sampling policy µ : argmin V Es∼dµ ( s ) Ea∼µ ( ·|s ) [ ||Rs , aµ − V ( s ) ||2 ] . ( 2 ) To achieve off-policy learning , the actor and the critic are trained on data collected from a mixture of policies from different training iterations , stored in the replay buffer D . 2.2 ANALYSIS OF AWR WITH LIMITED DATA . While AWR achieves very good results after longer training , it is not very sample efficient , as noted in the future work section of ( Peng et al. , 2019 ) . To understand this problem , we analyze a single loop of actor training in AWR under a special assumption . The assumption we introduce , called state-determines-action , concerns the content of the replay buffer D of an off-policy RL algorithm . The replay buffer contains all state-action pairs that the algorithm has visited so far during its interactions with the environment . We say that a replay buffer D satisfies the state-determines-action assumption when for each state s in the buffer , there is a unique action that was taken from it , formally : for all ( s , a ) , ( s′ , a′ ) ∈ D : s = s′ =⇒ a = a′ . This assumption may seem very limiting and indeed – it is not true in many artificial experiments with RL algorithms , such as Atari games . Even a random policy starting from the same state could violate the assumption the second time it collects a trajectory . But note that this assumption is almost always satisfied in real-world experiments with high-dimensional state spaces as any amount of noise added to a high-dimensional space will make repeating the exact same state highly improbable . For example , consider a robot observing 32x32 pixel images . To repeat a state , each of the 1024 pixels would have to have exactly the same value , which is highly improbable even with a small amount of noise . This assumption also holds in cases with limited data . When only a few trajectories are collected in a large state space , it is unlikely a state will be repeated in the replay buffer , which makes the assumption relevant to the study of sample efficiency . How does AWR perform under the state-determines-action assumption ? In Theorem 1 , formulated and proven in Appendix A.2 , we show that the AWR update rule under this assumption will converge to a policy that assigns probability 1 to the actions already present in the replay buffer , thus cloning the previous behaviors . This is not the desired behavior , as an agent should consider various actions from each state , to ensure exploration . The state-determines-action assumption is the main motivating point behind QWR , whose theoretical properties are proven in Theorem 2 in Appendix A.3 . We now illustrate the importance of this assumption by creating a simple environment in which it holds with high probability . We verify experimentally that AWR fails on this simple environment , while QWR is capable of solving it . The environment , which we call BitFlip , is parameterized by an integer N . The state of the environment consists of N bits and a step counter . The action space consists of N actions . When an action i is chosen , the i-th bit is flipped and the step counter is incremented . A game of BitFlip starts in a random state with the step counter set to 0 , and proceeds for 5 steps . The initial state is randomized in such a way to always leave at least 5 bits set to 0 . At each step , the reward is +1 if a bit was flipped from 0 to 1 and the reward is −1 in the opposite case . Since BitFlip starts in one random state out of 2N , at large enough N it is highly unlikely that the starting state will ever be repeated in the replay buffer . As the initial policy is random and BitFlip maintains a step counter to prevent returning to a state , the same holds for subsequent states . BitFlip is a simple game with a very simple strategy , but the initial replay buffer will satisfy the statedetermines-action assumption with high probability . As we will see , this is enough to break AWR . We ran both AWR and QWR on BitFlip for different values of N , for 10 iterations per experiment . In each iteration we collected 1000 interactions with the environment and trained both the actor and the critic for 300 steps . All shared hyperparameters of AWR and QWR were set to the same values , and the backup operator in QWR was set to mean . We report the mean out of 10 episodes played by the trained agent . The results are shown in Figure 1 . As we can see , the performance of AWR starts deteriorating at a relatively small value of N = 8 , which corresponds to a state space with 5 ·28 = 1280 states , while QWR maintains high performance even at N = 30 , so around 5 · 109 states . Notice how the returns of AWR drop with N – at higher values : 20− 30 , the agent struggles to flip even a single zero bit . This problem with AWR and large state spaces motivates us to introduce QWR next . | This paper presents a Q-value weighted regression (QWR) on top of the advantage weighted regression (AWR) to improve the sample efficiency for offline RL settings. Through the analysis to the AWR, the authors claim that it performs poorly in scenarios with discrete actions, which motivates the development of QWR. Empirically, the authors show that QWR is comparable to SAC in continuous tasks and a variant of Rainbow in discrete tasks. | SP:f9d1d627589f50a87c503a6df484145dc01ebcca |
Q-Value Weighted Regression: Reinforcement Learning with Limited Data | Sample efficiency and performance in the offline setting have emerged as among the main challenges of deep reinforcement learning . We introduce Q-Value Weighted Regression ( QWR ) , a simple RL algorithm that excels in these aspects . QWR is an extension of Advantage Weighted Regression ( AWR ) , an off-policy actor-critic algorithm that performs very well on continuous control tasks , also in the offline setting , but struggles on tasks with discrete actions and in sample efficiency . We perform a theoretical analysis of AWR that explains its shortcomings and use the insights to motivate QWR theoretically . We show experimentally that QWR matches state-of-the-art algorithms both on tasks with continuous and discrete actions . We study the main hyperparameters of QWR and find that it is stable in a wide range of their choices and on different tasks . In particular , QWR yields results on par with SAC on the MuJoCo suite and – with the same set of hyperparameters – yields results on par with a highly tuned Rainbow implementation on a set of Atari games . We also verify that QWR performs well in the offline RL setting , making it a compelling choice for reinforcement learning in domains with limited data . 1 INTRODUCTION . Deep reinforcement learning has been applied to a large number of challenging tasks , from games ( Silver et al. , 2017 ; OpenAI , 2018 ; Vinyals et al. , 2017 ) to robotic control ( Sadeghi & Levine , 2016 ; OpenAI et al. , 2018 ; Rusu et al. , 2016 ) . Since RL makes minimal assumptions on the underlying task , it holds the promise of automating a wide range of applications . However , its widespread adoption has been hampered by a number of challenges . Reinforcement learning algorithms can be substantially more complex to implement and tune than standard supervised learning methods and can have a fair number of hyper-parameters and be brittle with respect to their choices , and may require a large number of interactions with the environment . These issues are well-known and there has been significant progress in addressing them . The policy gradient algorithm REINFORCE ( Williams ( 1992 ) ) is simple to understand and implement , but is both brittle and requires on-policy data . Proximal Policy Optimization ( PPO , Schulman et al . ( 2017 ) ) is a more stable on-policy algorithm that has seen a number of successful applications despite requiring a large number of interactions with the environment . Soft Actor-Critic ( SAC , Haarnoja et al . ( 2018 ) ) is a much more sample-efficient off-policy algorithm , but it is defined only for continuous action spaces and does not work well in the offline setting , known as batch reinforcement learning , where all samples are provided from earlier interactions with the environment , and the agent can not collect more samples . Advantage Weighted Regression ( AWR , Peng et al . ( 2019 ) ) is a recent offpolicy actor-critic algorithm that works well in the offline setting and is built using only simple and convergent maximum likelihood loss functions , making it easier to tune and debug . It is competitive with SAC given enough time to train , but is less sample-efficient and has not been demonstrated to succeed in settings with discrete actions . We replace the value function critic of AWR with a Q-value function . Next , we add action sampling to the actor training loop . Finally , we introduce a custom backup to the Q-value training . The resulting algorithm , which we call Q-Value Weighted Regression ( QWR ) inherits the advantages of AWR but is more sample-efficient and works well with discrete actions and in visual domains , e.g. , on Atari games . To better understand QWR we perform a number of ablations , checking different number of samples in actor training , different advantage estimators , and aggregation functions . These choices affect the performance of QWR only to a limited extent and it remains stable with each of the choices across the tasks we experiment with . We run experiments with QWR on the MuJoCo environments and on a subset of the Atari Learning Environment . Since sample efficiency is our main concern , we focus on the difficult case when the number of interactions with the environment is limited – in most our experiments we limit it to 100K interactions . The experiments demonstrate that QWR is indeed more sample-efficient than AWR . On MuJoCo , it performs on par with Soft Actor-Critic ( SAC ) , the current state-of-the-art algorithm for continuous domains . On Atari , QWR performs on par with OTRainbow , a variant of Rainbow highly tuned for sample efficiency . Notably , we use the same set of hyperparameters ( except for the network architecture ) for both our final MuJoCo and Atari experiments . 2 Q-VALUE WEIGHTED REGRESSION . 2.1 ADVANTAGE WEIGHTED REGRESSION . Peng et al . ( 2019 ) recently proposed Advantage Weighted Regression ( AWR ) , an off-policy , actorcritic algorithm notable for its simplicity and stability , achieving competitive results across a range of continuous control tasks . It can be expressed as interleaving data collection and two regression tasks performed on the replay buffer , as shown in Algorithm 1 . Algorithm 1 Advantage Weighted Regression . 1 : θ ← random actor parameters 2 : φ← random critic parameters 3 : D ← ∅ 4 : for k in 0 .. n_iterations− 1 do 5 : add trajectories { τi } sampled by πθ to D 6 : for i in 0 .. n_critic_steps− 1 do 7 : sample ( s , a ) ∼ D 8 : φ← φ− αV∇φ [ ||Rs , aD − Vφ ( s ) ||2 ] 9 : end for 10 : for i in 0 .. n_actor_steps− 1 do 11 : sample ( s , a ) ∼ D 12 : θ ← θ + απ∇θ [ log πθ ( a|s ) exp ( 1β ( R s , a D − Vφ ( s ) ) ] 13 : end for 14 : end for AWR optimizes expected improvement of an actor policy π ( a|s ) over a sampling policy µ ( a|s ) by regression towards the well-performing actions in the collected experience . Improvement is achieved by weighting the actor loss by exponentiated advantage Aµ ( s , a ) of an action , skewing the regression towards the better-performing actions . The advantage is calculated based on the expected return Rs , aµ achieved by performing action a in state s and then following the sampling policy µ . To calculate the advantage , one first estimates the value , Vµ ( s ) , using a learned critic and then computes Aµ ( s , a ) = Rs , aµ − Vµ ( s ) . This results in the following formula for the actor : argmax π Es∼dµ ( s ) Ea∼µ ( ·|s ) [ log π ( a|s ) exp ( 1 β ( Rs , aµ − Vµ ( s ) ) ) ] , ( 1 ) where dµ ( s ) = ∑∞ t=1 γ t−1p ( st = s|µ ) denotes the unnormalized , discounted state visitation distribution of the policy µ , and β is a temperature hyperparameter . The critic is trained to estimate the future returns of the sampling policy µ : argmin V Es∼dµ ( s ) Ea∼µ ( ·|s ) [ ||Rs , aµ − V ( s ) ||2 ] . ( 2 ) To achieve off-policy learning , the actor and the critic are trained on data collected from a mixture of policies from different training iterations , stored in the replay buffer D . 2.2 ANALYSIS OF AWR WITH LIMITED DATA . While AWR achieves very good results after longer training , it is not very sample efficient , as noted in the future work section of ( Peng et al. , 2019 ) . To understand this problem , we analyze a single loop of actor training in AWR under a special assumption . The assumption we introduce , called state-determines-action , concerns the content of the replay buffer D of an off-policy RL algorithm . The replay buffer contains all state-action pairs that the algorithm has visited so far during its interactions with the environment . We say that a replay buffer D satisfies the state-determines-action assumption when for each state s in the buffer , there is a unique action that was taken from it , formally : for all ( s , a ) , ( s′ , a′ ) ∈ D : s = s′ =⇒ a = a′ . This assumption may seem very limiting and indeed – it is not true in many artificial experiments with RL algorithms , such as Atari games . Even a random policy starting from the same state could violate the assumption the second time it collects a trajectory . But note that this assumption is almost always satisfied in real-world experiments with high-dimensional state spaces as any amount of noise added to a high-dimensional space will make repeating the exact same state highly improbable . For example , consider a robot observing 32x32 pixel images . To repeat a state , each of the 1024 pixels would have to have exactly the same value , which is highly improbable even with a small amount of noise . This assumption also holds in cases with limited data . When only a few trajectories are collected in a large state space , it is unlikely a state will be repeated in the replay buffer , which makes the assumption relevant to the study of sample efficiency . How does AWR perform under the state-determines-action assumption ? In Theorem 1 , formulated and proven in Appendix A.2 , we show that the AWR update rule under this assumption will converge to a policy that assigns probability 1 to the actions already present in the replay buffer , thus cloning the previous behaviors . This is not the desired behavior , as an agent should consider various actions from each state , to ensure exploration . The state-determines-action assumption is the main motivating point behind QWR , whose theoretical properties are proven in Theorem 2 in Appendix A.3 . We now illustrate the importance of this assumption by creating a simple environment in which it holds with high probability . We verify experimentally that AWR fails on this simple environment , while QWR is capable of solving it . The environment , which we call BitFlip , is parameterized by an integer N . The state of the environment consists of N bits and a step counter . The action space consists of N actions . When an action i is chosen , the i-th bit is flipped and the step counter is incremented . A game of BitFlip starts in a random state with the step counter set to 0 , and proceeds for 5 steps . The initial state is randomized in such a way to always leave at least 5 bits set to 0 . At each step , the reward is +1 if a bit was flipped from 0 to 1 and the reward is −1 in the opposite case . Since BitFlip starts in one random state out of 2N , at large enough N it is highly unlikely that the starting state will ever be repeated in the replay buffer . As the initial policy is random and BitFlip maintains a step counter to prevent returning to a state , the same holds for subsequent states . BitFlip is a simple game with a very simple strategy , but the initial replay buffer will satisfy the statedetermines-action assumption with high probability . As we will see , this is enough to break AWR . We ran both AWR and QWR on BitFlip for different values of N , for 10 iterations per experiment . In each iteration we collected 1000 interactions with the environment and trained both the actor and the critic for 300 steps . All shared hyperparameters of AWR and QWR were set to the same values , and the backup operator in QWR was set to mean . We report the mean out of 10 episodes played by the trained agent . The results are shown in Figure 1 . As we can see , the performance of AWR starts deteriorating at a relatively small value of N = 8 , which corresponds to a state space with 5 ·28 = 1280 states , while QWR maintains high performance even at N = 30 , so around 5 · 109 states . Notice how the returns of AWR drop with N – at higher values : 20− 30 , the agent struggles to flip even a single zero bit . This problem with AWR and large state spaces motivates us to introduce QWR next . | This paper focuses on offline policy learning with a limited dataset and proposes a sample efficient algorithm called Q-Value Weighted Regression. Based on the Advantage Weighted Regression algorithm, this algorithm calculates the advantage of the sampling policy \mu by estimated Q-value function. Experiment results show that the QWR algorithm has better performance than the AWR algorithm with limited data. | SP:f9d1d627589f50a87c503a6df484145dc01ebcca |
MQES: Max-Q Entropy Search for Efficient Exploration in Continuous Reinforcement Learning | 1 INTRODUCTION . In Reinforcement Learning ( RL ) , one of the fundamental problems is exploration-exploitation dilemma , i.e. , the agents explore the states with imperfect knowledge to improve future reward or instead maximize the intermediate reward at the perfectly understood states . The main obstacle of designing efficient exploration strategies is how the agents decide whether the unexplored states leading high cumulative reward or not . Popular exploration strategies , like -greedy ( Sutton & Barto , 1998 ) and sampling from stochastic policy ( Haarnoja et al. , 2018 ) , lead to undirected exploration through additional random permutations . Recently , uncertainty of systems are introduced to guide the exploration ( Kirschner & Krause , 2018 ; Mavrin et al. , 2019 ; Clements et al. , 2019 ; Ciosek et al. , 2019 ) . Basically , as Moerland et al . ( 2017 ) points out , two source of uncertainty exists in the RL system , i.e. , epistemic and aleatoric uncertainty . Epistemic uncertainty is also called parametric uncertainty , which is the ambiguity of models arisen from the imperfect knowledge to the environment , and can be reduced with more data . Aleatoric uncertainty is an intrinsic variation associated with the environment , which is caused by the randomness of environment , and is not affected by the model . In the RL system , if the states are seldom visited , the epistemic uncertainty at these states are relatively large . Hence , the exploration methods should encourage exploration when epistemic uncertainty is large . Moreover , heteroscedastic aleatoric uncertainty means that different states may have difference randomness , which renders different aleatoric uncertainty . If we do not distinguish these two uncertainties and formulate them separately , we may explore the states visited frequently but with high randomness , i.e. , low epistemic uncertainty and high aleatoric uncertainty , which is undesirable . By introducing uncertainty , the exploration objectives like Thompson Sampling ( TS ) ( Thompson , 1933 ; Osband et al. , 2016 ) and Upper Confidence Bound ( UCB ) ( Auer , 2002 ; Mavrin et al. , 2019 ; Chen et al. , 2017 ) are utilized to guide the exploration in RL . However , since the aleatoric uncertainty in the RL systems are heteroscedastic , i.e. , the aleatoric uncertainty depends on states and actions and can be different , the above methods are not efficient . Hence , Nikolov et al . ( 2019 ) proposes novel exploration objective called Information-Directed Sampling ( IDS ) accounting for epistemic uncertainty and heteroscedastic aleatoric uncertainty . However , these methods ( Nikolov et al. , 2019 ; Mavrin et al. , 2019 ; Chen et al. , 2017 ; Osband et al. , 2016 ) can only be applied in the environment with discrete action space . In this paper , we propose a generally information-theoretic principle called Max-Q Entropy Search ( MQES ) for off-policy continuous RL algorithms . Further , as an application example of MQES , we combine distributional RL with soft actor-critic method , where the epistemic and aleatoric uncertainty are formulated accordingly . Then , we incorporate MQES to Distributional Soft Actor-Critic ( DSAC ) ( Ma et al. , 2020 ) method , and show how MQES utilizes both uncertainty to explore . Finally , our results on Mujoco environments show that our method can substantially outperform alternative state-of-the-art algorithms . 2 RELATED WORK . Efficient exploration can improve the efficiency and performance of RL algorithms . With the increasing emphasis on exploration efficiency , various exploration methods have been developed . One kind of methods use intrinsic motivation to stimulate agent to explore from different perspectives , such as count-based novelty ( Martin et al. , 2017 ; Ostrovski et al. , 2017 ; Bellemare et al. , 2016 ; Tang et al. , 2017 ; Fox et al. , 2018 ) , prediction error ( Pathak et al. , 2017 ) , reachability ( Savinov et al. , 2019 ) and information gain on environment dynamics ( Houthooft et al. , 2016 ) . Some recently proposed methods in DRL , originating from tracking uncertainty , do efficient exploration under the principle of OFU ( optimism in the face of uncertainty ) , such as Thompson Sampling ( Thompson , 1933 ; Osband et al. , 2016 ) , IDS ( Nikolov et al. , 2019 ; Clements et al. , 2019 ) and other customized methods ( Moerland et al. , 2017 ; Pathak et al. , 2019 ) . Methods for tracking uncertainty . Bootstrapped DQN ( Osband et al. , 2016 ) combines Thompson sampling with value-based algorithms in RL . It is similar to PSRL ( Strens , 2000 ; Osband et al. , 2013 ) , and leverages the uncertainty produced by the value estimations for deep exploration . Bootstrapped DQN has become the common baseline for lots of recent works , and also the well-used approach for capturing epistemic uncertainty ( Kirschner & Krause , 2018 ; Ciosek et al. , 2019 ) . However , this takes only epistemic uncertainty into account . Distributional RL approximates the return distribution directly , such as Categorical DQN ( C51 ) ( Bellemare et al. , 2017 ) , QR-DQN ( Dabney et al. , 2018b ) and IQN ( Dabney et al. , 2018a ) . Return distribution can be used to approximate aleatoric uncertainty , but those methods do not take advantage of the return distribution for exploration . Exploration with two types of uncertainty . Traditional OFU methods either focus only on the epistemic uncertainty , or consider the two kinds of uncertainty as a whole , which can easily lead the naive solution to favor actions with higher variances . To address that , Mavrin et al . ( 2019 ) studies how to take advantage of distributions learned by distributional RL methods for efficient exploration under both kinds of uncertainty , proposing Decaying Left Truncated Variance ( DLTV ) . Nikolov et al . ( 2019 ) and Clements et al . ( 2019 ) propose to use Information Direct Sampling ( Kirschner & Krause , 2018 ) for efficient exploration in RL ( IDS for RL ) , which estimate both kinds of uncertainty and use IDS to make decision for acting with environment . We refer to the practice of uncertainty estimation in ( Clements et al. , 2019 ) as shown in Sec . 4.2.1 . IDS integrates both uncertainty and has made progress on the issue of exploration , but this is limited on discrete action space . We do focus on how best to exploit both uncertainty for efficient exploration in a continuous action space in our paper . Optimistic Actor Critic . More closely related to our work is the paper of OAC ( Ciosek et al. , 2019 ) , which uses epistemic uncertainty to build the upper bound of Q estimation QUB . OAC is based on Soft Actor-Critic ( SAC ) ( Haarnoja et al. , 2018 ) , additionally proposing exploration bonus to facilitate exploration . Despite the advantages that OAC has achieved over SAC , it does not consider the potential impact of the aleatoric uncertainty , which may cause misleading for exploration . 3 PRELIMINARIES . 3.1 DISTRIBUTIONAL RL . Distributional RL methods study distributions rather than point estimates , which introduce aleatoric uncertainty from distributional perspective . There are different approaches to represent distribution in RL . In our paper , we focus on quantile regression used in QR-DQN ( Dabney et al. , 2018b ) , where the randomness of state-action value is represented by the quantile random variable Z with value z . Z maps the state-action pair to a uniform probability distribution supported on zi , where zi indicates the value of the corresponding quantile estimates . If τi is defined as the quantile fraction , the cumulative probabilities of such quantile distribution is denoted by FZ ( zi ) = Pr ( Z < zi ) = τi = 1/N for i ∈ 1 , ... , N . Similar to the Bellman operator in the traditional Q-Learning ( Watkins & Dayan , 1992 ) , the distributional Bellman operator T πD under policy π is given as : T πDZ ( st , at ) D = R ( st , at ) + γZ ( st+1 , at+1 ) , at+1 ∼ π ( ·|st+1 ) . ( 1 ) Notice that this operates on random variables , D= denotes that distributions on both sides have equal probability laws . Based on the distributional Bellman operator , Dabney et al . ( 2018b ) proposes QR-DQN to train quantile estimations via the quantile regression loss , which is denoted as : LQR ( θ ) = 1 N N∑ i=1 N∑ j=1 [ ρτ̂i ( δi , j ) ] ( 2 ) where δi , j = R ( st , at ) + γzj ( st+1 , at+1 ; θ ) − zi ( st , at ; θ ) , ρτ ( u ) = u ∗ ( τ − 1u < 0 ) , and τ̂i means the quantile midpoints , which is defined as τ̂i = τi+1+τi 2 . 3.2 DISTRIBUTIONAL SOFT ACTOR-CRITIC METHODS . Following Ma et al . ( 2020 ) , Distributional RL has been successfully integrated with soft ActorCritic ( SAC ) algorithm . Here , considering the maximum entropy RL , the distributional soft Bellman operator T πDS is defined as follows : T πDSZ ( st , at ) D = R ( st , at ) + γ [ Z ( st+1 , at+1 ) − αlogπ ( at+1|st+1 ) ] ( 3 ) where at+1 ∼ π ( ·|st+1 ) , st+1 ∼ P ( ·|st , at ) . The quantile regression loss in DSAC is different from original QR-DQN only on the δi , j by considering the maximum entropy RL framework . DSAC extends the clipped double Q-Learning proposed on TD3 ( Fujimoto et al. , 2018 ) to overcome the overestimation problem . Two Quantile Regression Deep Q Networks have the same structure that are parameterized by θk , k = 1 , 2 . Following the clipped double Q-Learning , the TD-error of DSAC is defined as : yti = min k=1,2 zi ( st+1 , at+1 ; θ̄k ) ( 4 ) δki , j = R ( st , at ) + γ [ y t i − α log π ( at+1|st+1 ; φ̄ ) ] − zj ( st , at ; θk ) ( 5 ) where θ̄ and φ̄ represents their target networks respectively . DSAC has the modified version of critic , while the update of actors is unaffected . It is worth noticing that the state-action value is the minimum value of the expectation on certain distributions , as Q ( st , at ; θ ) = min k=1,2 Q ( st , at ; θk ) = 1 N min k=1,2 N−1∑ i=0 zi ( st , at ; θk ) ( 6 ) Thus , in DSAC , the original problem aims to maximize the following objective function : Jπ ( φ ) = Est∼D , ∼N [ logπ ( f ( st , t ; φ ) |st ) −Q ( st , f ( st , t ; φ ) ; θ ) ] , ( 7 ) where D is the replay buffer , f ( st , t ; φ ) means sampling action with re-parameterized policy . 4 ALGORITHM . This paper proposes a new exploration principle for continuous RL algorithms , i.e. , MQES , which leverages epistemic and aleatoric uncertainties to explore optimistically and avoid over-exploration . To make MQES practically tractable , distributional and ensembleQ function approximations are introduced to formulate the epistemic and aleatoric uncertainty accordingly . Nevertheless , a constraint is introduced in the MQES to stabilize the training , and the approximated exploration policy is derived in the closed form . All these mechanisms are detailed in the following sections accordingly . | This work introduces max-Q Entropy Search (MQES) exploration principle for continuous RL algorithms. MQES addresses the exploration-exploitation dilemma that constitutes a fundamental RL problem. Actually, MQES defines an exploration policy able to explore optimistically and avoid over-exploration. One of the main advantages of MQES is its ability to recognise the epistemic and aleatoric uncertainty. Empirical analysis has been conducted on Mujoco, showing that the performance of MQES is comparable to those of other state-of-the-art algorithms. | SP:0b92f455d4643fb63c1d5885558545674bf120ee |
MQES: Max-Q Entropy Search for Efficient Exploration in Continuous Reinforcement Learning | 1 INTRODUCTION . In Reinforcement Learning ( RL ) , one of the fundamental problems is exploration-exploitation dilemma , i.e. , the agents explore the states with imperfect knowledge to improve future reward or instead maximize the intermediate reward at the perfectly understood states . The main obstacle of designing efficient exploration strategies is how the agents decide whether the unexplored states leading high cumulative reward or not . Popular exploration strategies , like -greedy ( Sutton & Barto , 1998 ) and sampling from stochastic policy ( Haarnoja et al. , 2018 ) , lead to undirected exploration through additional random permutations . Recently , uncertainty of systems are introduced to guide the exploration ( Kirschner & Krause , 2018 ; Mavrin et al. , 2019 ; Clements et al. , 2019 ; Ciosek et al. , 2019 ) . Basically , as Moerland et al . ( 2017 ) points out , two source of uncertainty exists in the RL system , i.e. , epistemic and aleatoric uncertainty . Epistemic uncertainty is also called parametric uncertainty , which is the ambiguity of models arisen from the imperfect knowledge to the environment , and can be reduced with more data . Aleatoric uncertainty is an intrinsic variation associated with the environment , which is caused by the randomness of environment , and is not affected by the model . In the RL system , if the states are seldom visited , the epistemic uncertainty at these states are relatively large . Hence , the exploration methods should encourage exploration when epistemic uncertainty is large . Moreover , heteroscedastic aleatoric uncertainty means that different states may have difference randomness , which renders different aleatoric uncertainty . If we do not distinguish these two uncertainties and formulate them separately , we may explore the states visited frequently but with high randomness , i.e. , low epistemic uncertainty and high aleatoric uncertainty , which is undesirable . By introducing uncertainty , the exploration objectives like Thompson Sampling ( TS ) ( Thompson , 1933 ; Osband et al. , 2016 ) and Upper Confidence Bound ( UCB ) ( Auer , 2002 ; Mavrin et al. , 2019 ; Chen et al. , 2017 ) are utilized to guide the exploration in RL . However , since the aleatoric uncertainty in the RL systems are heteroscedastic , i.e. , the aleatoric uncertainty depends on states and actions and can be different , the above methods are not efficient . Hence , Nikolov et al . ( 2019 ) proposes novel exploration objective called Information-Directed Sampling ( IDS ) accounting for epistemic uncertainty and heteroscedastic aleatoric uncertainty . However , these methods ( Nikolov et al. , 2019 ; Mavrin et al. , 2019 ; Chen et al. , 2017 ; Osband et al. , 2016 ) can only be applied in the environment with discrete action space . In this paper , we propose a generally information-theoretic principle called Max-Q Entropy Search ( MQES ) for off-policy continuous RL algorithms . Further , as an application example of MQES , we combine distributional RL with soft actor-critic method , where the epistemic and aleatoric uncertainty are formulated accordingly . Then , we incorporate MQES to Distributional Soft Actor-Critic ( DSAC ) ( Ma et al. , 2020 ) method , and show how MQES utilizes both uncertainty to explore . Finally , our results on Mujoco environments show that our method can substantially outperform alternative state-of-the-art algorithms . 2 RELATED WORK . Efficient exploration can improve the efficiency and performance of RL algorithms . With the increasing emphasis on exploration efficiency , various exploration methods have been developed . One kind of methods use intrinsic motivation to stimulate agent to explore from different perspectives , such as count-based novelty ( Martin et al. , 2017 ; Ostrovski et al. , 2017 ; Bellemare et al. , 2016 ; Tang et al. , 2017 ; Fox et al. , 2018 ) , prediction error ( Pathak et al. , 2017 ) , reachability ( Savinov et al. , 2019 ) and information gain on environment dynamics ( Houthooft et al. , 2016 ) . Some recently proposed methods in DRL , originating from tracking uncertainty , do efficient exploration under the principle of OFU ( optimism in the face of uncertainty ) , such as Thompson Sampling ( Thompson , 1933 ; Osband et al. , 2016 ) , IDS ( Nikolov et al. , 2019 ; Clements et al. , 2019 ) and other customized methods ( Moerland et al. , 2017 ; Pathak et al. , 2019 ) . Methods for tracking uncertainty . Bootstrapped DQN ( Osband et al. , 2016 ) combines Thompson sampling with value-based algorithms in RL . It is similar to PSRL ( Strens , 2000 ; Osband et al. , 2013 ) , and leverages the uncertainty produced by the value estimations for deep exploration . Bootstrapped DQN has become the common baseline for lots of recent works , and also the well-used approach for capturing epistemic uncertainty ( Kirschner & Krause , 2018 ; Ciosek et al. , 2019 ) . However , this takes only epistemic uncertainty into account . Distributional RL approximates the return distribution directly , such as Categorical DQN ( C51 ) ( Bellemare et al. , 2017 ) , QR-DQN ( Dabney et al. , 2018b ) and IQN ( Dabney et al. , 2018a ) . Return distribution can be used to approximate aleatoric uncertainty , but those methods do not take advantage of the return distribution for exploration . Exploration with two types of uncertainty . Traditional OFU methods either focus only on the epistemic uncertainty , or consider the two kinds of uncertainty as a whole , which can easily lead the naive solution to favor actions with higher variances . To address that , Mavrin et al . ( 2019 ) studies how to take advantage of distributions learned by distributional RL methods for efficient exploration under both kinds of uncertainty , proposing Decaying Left Truncated Variance ( DLTV ) . Nikolov et al . ( 2019 ) and Clements et al . ( 2019 ) propose to use Information Direct Sampling ( Kirschner & Krause , 2018 ) for efficient exploration in RL ( IDS for RL ) , which estimate both kinds of uncertainty and use IDS to make decision for acting with environment . We refer to the practice of uncertainty estimation in ( Clements et al. , 2019 ) as shown in Sec . 4.2.1 . IDS integrates both uncertainty and has made progress on the issue of exploration , but this is limited on discrete action space . We do focus on how best to exploit both uncertainty for efficient exploration in a continuous action space in our paper . Optimistic Actor Critic . More closely related to our work is the paper of OAC ( Ciosek et al. , 2019 ) , which uses epistemic uncertainty to build the upper bound of Q estimation QUB . OAC is based on Soft Actor-Critic ( SAC ) ( Haarnoja et al. , 2018 ) , additionally proposing exploration bonus to facilitate exploration . Despite the advantages that OAC has achieved over SAC , it does not consider the potential impact of the aleatoric uncertainty , which may cause misleading for exploration . 3 PRELIMINARIES . 3.1 DISTRIBUTIONAL RL . Distributional RL methods study distributions rather than point estimates , which introduce aleatoric uncertainty from distributional perspective . There are different approaches to represent distribution in RL . In our paper , we focus on quantile regression used in QR-DQN ( Dabney et al. , 2018b ) , where the randomness of state-action value is represented by the quantile random variable Z with value z . Z maps the state-action pair to a uniform probability distribution supported on zi , where zi indicates the value of the corresponding quantile estimates . If τi is defined as the quantile fraction , the cumulative probabilities of such quantile distribution is denoted by FZ ( zi ) = Pr ( Z < zi ) = τi = 1/N for i ∈ 1 , ... , N . Similar to the Bellman operator in the traditional Q-Learning ( Watkins & Dayan , 1992 ) , the distributional Bellman operator T πD under policy π is given as : T πDZ ( st , at ) D = R ( st , at ) + γZ ( st+1 , at+1 ) , at+1 ∼ π ( ·|st+1 ) . ( 1 ) Notice that this operates on random variables , D= denotes that distributions on both sides have equal probability laws . Based on the distributional Bellman operator , Dabney et al . ( 2018b ) proposes QR-DQN to train quantile estimations via the quantile regression loss , which is denoted as : LQR ( θ ) = 1 N N∑ i=1 N∑ j=1 [ ρτ̂i ( δi , j ) ] ( 2 ) where δi , j = R ( st , at ) + γzj ( st+1 , at+1 ; θ ) − zi ( st , at ; θ ) , ρτ ( u ) = u ∗ ( τ − 1u < 0 ) , and τ̂i means the quantile midpoints , which is defined as τ̂i = τi+1+τi 2 . 3.2 DISTRIBUTIONAL SOFT ACTOR-CRITIC METHODS . Following Ma et al . ( 2020 ) , Distributional RL has been successfully integrated with soft ActorCritic ( SAC ) algorithm . Here , considering the maximum entropy RL , the distributional soft Bellman operator T πDS is defined as follows : T πDSZ ( st , at ) D = R ( st , at ) + γ [ Z ( st+1 , at+1 ) − αlogπ ( at+1|st+1 ) ] ( 3 ) where at+1 ∼ π ( ·|st+1 ) , st+1 ∼ P ( ·|st , at ) . The quantile regression loss in DSAC is different from original QR-DQN only on the δi , j by considering the maximum entropy RL framework . DSAC extends the clipped double Q-Learning proposed on TD3 ( Fujimoto et al. , 2018 ) to overcome the overestimation problem . Two Quantile Regression Deep Q Networks have the same structure that are parameterized by θk , k = 1 , 2 . Following the clipped double Q-Learning , the TD-error of DSAC is defined as : yti = min k=1,2 zi ( st+1 , at+1 ; θ̄k ) ( 4 ) δki , j = R ( st , at ) + γ [ y t i − α log π ( at+1|st+1 ; φ̄ ) ] − zj ( st , at ; θk ) ( 5 ) where θ̄ and φ̄ represents their target networks respectively . DSAC has the modified version of critic , while the update of actors is unaffected . It is worth noticing that the state-action value is the minimum value of the expectation on certain distributions , as Q ( st , at ; θ ) = min k=1,2 Q ( st , at ; θk ) = 1 N min k=1,2 N−1∑ i=0 zi ( st , at ; θk ) ( 6 ) Thus , in DSAC , the original problem aims to maximize the following objective function : Jπ ( φ ) = Est∼D , ∼N [ logπ ( f ( st , t ; φ ) |st ) −Q ( st , f ( st , t ; φ ) ; θ ) ] , ( 7 ) where D is the replay buffer , f ( st , t ; φ ) means sampling action with re-parameterized policy . 4 ALGORITHM . This paper proposes a new exploration principle for continuous RL algorithms , i.e. , MQES , which leverages epistemic and aleatoric uncertainties to explore optimistically and avoid over-exploration . To make MQES practically tractable , distributional and ensembleQ function approximations are introduced to formulate the epistemic and aleatoric uncertainty accordingly . Nevertheless , a constraint is introduced in the MQES to stabilize the training , and the approximated exploration policy is derived in the closed form . All these mechanisms are detailed in the following sections accordingly . | This paper proposes MQES, a Max-Q entropy search for policy optimization in continuous RL. The authors propose to combine advantages of the information-theoretic principle and distributional RL, in which epistemic and aleatoric uncertainty are estimated using similar entropy-search acquisition functions in the Bayesian Optimization (BO). As said, this is a new method to introduce a more efficient exploration strategy. As a result, policy improvement is formulated as a constraint optimization problem where a next exploration policy can be solved in a closed-form. The proposed method is evaluated on Mujoco tasks and compared against other off-policy approaches, SAC, and DSAC. The results show MQES outperforms other methods in domains where exploration is needed. | SP:0b92f455d4643fb63c1d5885558545674bf120ee |
Are Neural Nets Modular? Inspecting Functional Modularity Through Differentiable Weight Masks | 1 INTRODUCTION . Modularity is an important organization principle in both artificial ( Ballard , 1987 ; Baldwin & Clark , 2000 ) and biological ( von Dassow & Munro , 1999 ; Lorenz et al. , 2011 ; Clune et al. , 2013 ) systems . It provides a natural way of achieving compositionality , which appears essential for systematic generalization , one of the areas where typical artificial neural networks ( NNs ) do not yet perform well ( Fodor et al. , 1988 ; Marcus , 1998 ; Lake & Baroni , 2018 ; Hupkes et al. , 2020 ) . Recently , NNs with explicitly designed modules have demonstrated superior generalization capabilities ( Clune et al. , 2013 ; Andreas et al. , 2016 ; Kirsch et al. , 2018 ; Chang et al. , 2019 ; Bahdanau et al. , 2019 ; Goyal et al. , 2021b ) , which support this intuition . An implicit assumption behind such models is that NNs without hand-designed modularity do not learn to become modular by themselves . In contrast , it was recently shown that certain types of modular structures do emerge in standard NNs ( Watanabe , 2019 ; Filan et al. , 2020 ) . However , due to defining modules in terms of activation statistics or clustering connectivity , it remains unclear whether these correspond to a functional decomposition . This paper contributes new insights into the generalization capabilities of popular neural networks by investigating whether modules implementing specific functionality emerge and to what extent they enable compositionality . This calls for a functional definition of modules , which has not previously been studied in prior work . In particular , we consider functional modules given by subsets of weights ( i.e . subnetworks ) responsible for performing a specific ‘ target functionality ’ , such as solving a subtask of the original task . By associating modules with performing a specific function they become easier to interpret . Moreover , depending on the chosen target functionality , modules at multiple different levels of granularity can be considered . To unveil whether a NN has learned to acquire functional modules we propose a novel analysis tool that works on pre-trained NNs . Given an auxiliary task corresponding to a particular target function of interest ( e.g. , train only on a specific subset of the samples from the original dataset ) , we train probabilistic , binary , but differentiable masks for all weights ( while the NN ’ s weights remain frozen ) . The result is a binary mask exhibiting the module necessary to perform the target function . Our approach is simple yet general , which readily enables us to analyze several popular NN architectures on a variety of tasks in this way , including recurrent NNs ( RNNs ) , Transformers ( Vaswani et al. , 2017 ) , feedforward NNs ( FNNs ) and convolutional NNs ( CNNs ) . To investigate whether the discovered functional modules are part of a compositional solution , we analyze whether the NN has the following two desirable properties : ( Pspecialize ) it uses different modules for very different functions , and ( Preuse ) it uses the same module for identical functions that may have to be performed multiple times1 . Here we treat Pspecialize and Preuse as continuous quantities , which lets us focus on the degree to which functional modularity emerges . Further , since for many tasks it is unclear what precise amount of sharing is desirable , we will measure Pspecialize and Preuse by considering the change in performance as a result of applying different masks corresponding to a target function . This yields an easy to interpret metric that does not assume precise knowledge about the desired level of weight sharing . We experimentally show that many typical NNs exhibit Pspecialize but not Preuse . By additionally analyzing the capacity for transfer learning , we provide further insight into this issue . We offer a possible explanation : while simple data routing between modules in standard NNs is often highly desirable , it is hard to learn since the weights must also implement the data transformation . Indeed , our findings suggest that standard NNs have no bias towards separating these conceptually different goals of data transformation and information routing . We also demonstrate how the functional modules discovered by typical NNs do not tend to encourage compositional solutions . For example , we analyze encoder-decoder LSTMs ( Hochreiter & Schmidhuber , 1997 ) and Transformers ( Vaswani et al. , 2017 ) on the SCAN dataset ( Lake & Baroni , 2018 ) designed to test systematic generalization based on textual commands . We show that combinationspecific weights are learned to deal with certain command combinations , even when they are governed by the same rules as the other combinations . The existence of such weights indicates that the learned solution is non-compositional and fails at performing the more symbolic manipulation required for systematic generalization on SCAN . To demonstrate that this issue is present even in more real-world scenarios , we highlight identical behavior on the challenging Mathematics Dataset ( Saxton et al. , 2019 ) . Finally , we study whether functional modules emerge in CNNs trained for image classification , which are thought to rely heavily on shared features . Surprisingly , we can identify subsets of weights solely responsible for single classes : when removing these weights the performance on its class drops significantly . By analyzing the resulting confusion matrices , we identify classes relying on similar features . 2 DISCOVERING MODULES VIA WEIGHT-LEVEL INTROSPECTION . To investigate whether functional modules emerge in neural networks one must perform a weight-level analysis . This precludes the use of existing methods , which discover modular structure in NNs based on clustering individual units according to their similarity ( Watanabe , 2019 ; Filan et al. , 2020 ) and that may not always be enough to draw meaningful conclusions . Units can be shared even when their weights , which perform the actual computation , are not . Indeed , units can be viewed as mere “ wires ” for transmitting information . Consider for example a gated RNN , such as an LSTM , where gates can be controlled either by the inputs or the state , yet make use of different weights to project to the same gating units . To overcome this limitation , we propose a novel method to inspect pre-trained NNs at the level of individual weights . It works as follows . First , we formulate a target task corresponding to the specific function for which we want to investigate if a module has been learned . For example , this can be a subset of the original problem ( i.e . a subtask ) , or based on a particular dataset split , e.g . to test generalization . Next , we train a weight mask on this target task while keeping the weights themselves frozen . The resulting mask then reveals the module ( subnetwork ) responsible for the target task . To train the mask , we treat all N weights seperately of each other . Let i ∈ [ 1 , N ] to denote the weight index . The mask ’ s probabilities are represented as learned logits li ∈ R , which are initialized to keep the weights with high probability ( 0.9 ) . If one were to apply continuous masks to the weights it would be possible to scale them arbitrarily , thereby potentially modifying the function the network performs . To prevent this , we binarize masks , which only provides for keeping or removing individual weights . The binarization is achieved using a Gumbel-Sigmoid with a straight-through estimator , which we derive from the Gumbel-Softmax ( Jang et al. , 2017 ; Maddison et al. , 2017 ) in Appendix A.1 . A 1We emphasize the distinction between the ability to reuse modules and the ability to compose them : a compositional solution may fail to reuse a module to implement the same behavior multiple times . Similarly , weights can be reused without them being composed to yield a compositional solution . Further , we consider specialization of modules a special case of modularization where modules are specialized to implement a particular functionality that is semantically meaningful . sample si ∈ [ 0 , 1 ] from the mask can be drawn as follows : si = σ ( ( li − log ( logU1/ logU2 ) ) /τ ) with U1 , U2 ∼ U ( 0 , 1 ) , ( 1 ) where τ ∈ ( 0 , ∞ ) is the temperature and σ ( x ) = 11+e−x is the sigmoid function . Next , we can use a straight-through estimator ( Hinton , 2012 ; Bengio et al. , 2013 ) to obtain a binarized sample bi ∈ { 0 , 1 } : bi = [ 1si > 0.5 − si ] stop + si , ( 2 ) where 1x is the indicator function and [ · ] stop is an operator for preventing backward gradient flow . In this case the bi are samples from a Bernoulli ( σ ( li ) ) random variable ( proof in Appendix A.3 ) . The masks are applied elementwise : w′i = wi∗bi . Training is done by applying the loss function defined by the target task and backpropagating into the logits li . Typically multiple ( between 4–8 ) binary masks are sampled and applied to different parts of a batch to improve the quality of the estimated gradient . The goal of the masking is to remove weights that are not necessary to perform the target function . Thus , the logits li should be regularized , such that the probability for weight wi to be active is small unlesswi is necessary for the task . This is achieved by adding a regularization term r = α ∑ i li to the loss , where α ∈ [ 0 , ∞ ) is a hyper-parameter responsible for the strength of the regularization . How to best choose α is described in detail in Appendix C.3 . At the end of the training process , deterministic binary masks Mi ∈ { 0 , 1 } for weights i are obtained via thresholding Mi = 1σ ( li ) > 0.52 . Applying the full mask M then uncovers the module responsible for the target task . A preliminary study confirmed that the mask training process is stable and thereby suitable for inspection ( Appendix B.1 ) . In the following sections we will analyze several standard NNs using this technique of mask-training34 . Throughout our experiments we will avoid drawing conclusions based on the measured amount of sharing alone as much as possible , since it is unclear what degree of sharing can be expected or is desirable . Rather , we will analyze the performance drop caused by removing weights corresponding to certain functionality , which offers a more consistent and easier to interpret metric5 . For example , to show that a module is responsible for a particular subtask ( A ) but not for another ( B ) , we train masks on A and test on both . A performance drop is expected on task B only . In contrast , to show that this module is exclusively needed for a particular subtask , we can invert the masks and test on both tasks . The inverted masks are expected to perform well on the complementary task , but not on the original one . However , we note that this mask inversion method is limited to analyzing entirely disjoint weights . We analyze weight sharing between two tasks using two different metrics : one is Intersection over Union ( IoU ) , which measures how much the weights used for solving the tasks overlap . We call the other Intersection over Minimum ( IoMin ) , which measures the number of overlapping weights ( intersection ) divided by the minimum of the total number of weights used for each task . In that sense IoMin is a measure of “ subsetness ” . Intuitively , if no weights are shared , both IoU and IoMin are zero . If all weights are shared , both IoU and IoMin are one . However , when the weights needed for one task are a strict subset of the other , then IoMin is one , while IoU < 1 . 2In general we find that li concentrates at either 0 or 1 and so thresholding is safe ( see also Fig . 9 ) . 3A complete overview of all experimental details is available in Appendix C. Mean and standard deviations shown in the figures are calculated over 10 runs unless otherwise noted . 4Code for all experiments is available at https : //github.com/RobertCsordas/modules . 5Exceptions only include cases where the observed amount of weight sharing can be clearly interpreted . However , even in these cases , our analysis will focus on general trends rather than the precise amounts observed . | The paper presents an empirical study of whether modularity can emerge within neural networks. It starts by proposing a novel definition of modularity that identifies modules by their functionality. To discover the module that implements a specific target functionality, the paper proposes to first pretrain the full network on the original task, then freeze the pretrained weights, and train a binary mask for each weight using Gumbel-Sigmoid. The training objective for the masks is given by the target functionality (e.g., a subtask of the original task), plus some sparsity regularization. The paper then investigates the discovered modules in terms of specialization, reusability, and compositionality. The main findings are: (1) Neural nets tend to satisfy specialization but not reusability; (2) Weight sharing between modules tends to be affected more by whether I/O are shared than by task similarity, and there tends to be less sharing in larger networks; (3) When trained on algorithmic tasks, neural nets fail to learn compositional rules, and thus generalize poorly; (4) CNNs trained for image classification contain class-specific, non-shared weights in the feature detectors. | SP:730c95c4ef5534877dcbd535e53dc8ba4879ed36 |
Are Neural Nets Modular? Inspecting Functional Modularity Through Differentiable Weight Masks | 1 INTRODUCTION . Modularity is an important organization principle in both artificial ( Ballard , 1987 ; Baldwin & Clark , 2000 ) and biological ( von Dassow & Munro , 1999 ; Lorenz et al. , 2011 ; Clune et al. , 2013 ) systems . It provides a natural way of achieving compositionality , which appears essential for systematic generalization , one of the areas where typical artificial neural networks ( NNs ) do not yet perform well ( Fodor et al. , 1988 ; Marcus , 1998 ; Lake & Baroni , 2018 ; Hupkes et al. , 2020 ) . Recently , NNs with explicitly designed modules have demonstrated superior generalization capabilities ( Clune et al. , 2013 ; Andreas et al. , 2016 ; Kirsch et al. , 2018 ; Chang et al. , 2019 ; Bahdanau et al. , 2019 ; Goyal et al. , 2021b ) , which support this intuition . An implicit assumption behind such models is that NNs without hand-designed modularity do not learn to become modular by themselves . In contrast , it was recently shown that certain types of modular structures do emerge in standard NNs ( Watanabe , 2019 ; Filan et al. , 2020 ) . However , due to defining modules in terms of activation statistics or clustering connectivity , it remains unclear whether these correspond to a functional decomposition . This paper contributes new insights into the generalization capabilities of popular neural networks by investigating whether modules implementing specific functionality emerge and to what extent they enable compositionality . This calls for a functional definition of modules , which has not previously been studied in prior work . In particular , we consider functional modules given by subsets of weights ( i.e . subnetworks ) responsible for performing a specific ‘ target functionality ’ , such as solving a subtask of the original task . By associating modules with performing a specific function they become easier to interpret . Moreover , depending on the chosen target functionality , modules at multiple different levels of granularity can be considered . To unveil whether a NN has learned to acquire functional modules we propose a novel analysis tool that works on pre-trained NNs . Given an auxiliary task corresponding to a particular target function of interest ( e.g. , train only on a specific subset of the samples from the original dataset ) , we train probabilistic , binary , but differentiable masks for all weights ( while the NN ’ s weights remain frozen ) . The result is a binary mask exhibiting the module necessary to perform the target function . Our approach is simple yet general , which readily enables us to analyze several popular NN architectures on a variety of tasks in this way , including recurrent NNs ( RNNs ) , Transformers ( Vaswani et al. , 2017 ) , feedforward NNs ( FNNs ) and convolutional NNs ( CNNs ) . To investigate whether the discovered functional modules are part of a compositional solution , we analyze whether the NN has the following two desirable properties : ( Pspecialize ) it uses different modules for very different functions , and ( Preuse ) it uses the same module for identical functions that may have to be performed multiple times1 . Here we treat Pspecialize and Preuse as continuous quantities , which lets us focus on the degree to which functional modularity emerges . Further , since for many tasks it is unclear what precise amount of sharing is desirable , we will measure Pspecialize and Preuse by considering the change in performance as a result of applying different masks corresponding to a target function . This yields an easy to interpret metric that does not assume precise knowledge about the desired level of weight sharing . We experimentally show that many typical NNs exhibit Pspecialize but not Preuse . By additionally analyzing the capacity for transfer learning , we provide further insight into this issue . We offer a possible explanation : while simple data routing between modules in standard NNs is often highly desirable , it is hard to learn since the weights must also implement the data transformation . Indeed , our findings suggest that standard NNs have no bias towards separating these conceptually different goals of data transformation and information routing . We also demonstrate how the functional modules discovered by typical NNs do not tend to encourage compositional solutions . For example , we analyze encoder-decoder LSTMs ( Hochreiter & Schmidhuber , 1997 ) and Transformers ( Vaswani et al. , 2017 ) on the SCAN dataset ( Lake & Baroni , 2018 ) designed to test systematic generalization based on textual commands . We show that combinationspecific weights are learned to deal with certain command combinations , even when they are governed by the same rules as the other combinations . The existence of such weights indicates that the learned solution is non-compositional and fails at performing the more symbolic manipulation required for systematic generalization on SCAN . To demonstrate that this issue is present even in more real-world scenarios , we highlight identical behavior on the challenging Mathematics Dataset ( Saxton et al. , 2019 ) . Finally , we study whether functional modules emerge in CNNs trained for image classification , which are thought to rely heavily on shared features . Surprisingly , we can identify subsets of weights solely responsible for single classes : when removing these weights the performance on its class drops significantly . By analyzing the resulting confusion matrices , we identify classes relying on similar features . 2 DISCOVERING MODULES VIA WEIGHT-LEVEL INTROSPECTION . To investigate whether functional modules emerge in neural networks one must perform a weight-level analysis . This precludes the use of existing methods , which discover modular structure in NNs based on clustering individual units according to their similarity ( Watanabe , 2019 ; Filan et al. , 2020 ) and that may not always be enough to draw meaningful conclusions . Units can be shared even when their weights , which perform the actual computation , are not . Indeed , units can be viewed as mere “ wires ” for transmitting information . Consider for example a gated RNN , such as an LSTM , where gates can be controlled either by the inputs or the state , yet make use of different weights to project to the same gating units . To overcome this limitation , we propose a novel method to inspect pre-trained NNs at the level of individual weights . It works as follows . First , we formulate a target task corresponding to the specific function for which we want to investigate if a module has been learned . For example , this can be a subset of the original problem ( i.e . a subtask ) , or based on a particular dataset split , e.g . to test generalization . Next , we train a weight mask on this target task while keeping the weights themselves frozen . The resulting mask then reveals the module ( subnetwork ) responsible for the target task . To train the mask , we treat all N weights seperately of each other . Let i ∈ [ 1 , N ] to denote the weight index . The mask ’ s probabilities are represented as learned logits li ∈ R , which are initialized to keep the weights with high probability ( 0.9 ) . If one were to apply continuous masks to the weights it would be possible to scale them arbitrarily , thereby potentially modifying the function the network performs . To prevent this , we binarize masks , which only provides for keeping or removing individual weights . The binarization is achieved using a Gumbel-Sigmoid with a straight-through estimator , which we derive from the Gumbel-Softmax ( Jang et al. , 2017 ; Maddison et al. , 2017 ) in Appendix A.1 . A 1We emphasize the distinction between the ability to reuse modules and the ability to compose them : a compositional solution may fail to reuse a module to implement the same behavior multiple times . Similarly , weights can be reused without them being composed to yield a compositional solution . Further , we consider specialization of modules a special case of modularization where modules are specialized to implement a particular functionality that is semantically meaningful . sample si ∈ [ 0 , 1 ] from the mask can be drawn as follows : si = σ ( ( li − log ( logU1/ logU2 ) ) /τ ) with U1 , U2 ∼ U ( 0 , 1 ) , ( 1 ) where τ ∈ ( 0 , ∞ ) is the temperature and σ ( x ) = 11+e−x is the sigmoid function . Next , we can use a straight-through estimator ( Hinton , 2012 ; Bengio et al. , 2013 ) to obtain a binarized sample bi ∈ { 0 , 1 } : bi = [ 1si > 0.5 − si ] stop + si , ( 2 ) where 1x is the indicator function and [ · ] stop is an operator for preventing backward gradient flow . In this case the bi are samples from a Bernoulli ( σ ( li ) ) random variable ( proof in Appendix A.3 ) . The masks are applied elementwise : w′i = wi∗bi . Training is done by applying the loss function defined by the target task and backpropagating into the logits li . Typically multiple ( between 4–8 ) binary masks are sampled and applied to different parts of a batch to improve the quality of the estimated gradient . The goal of the masking is to remove weights that are not necessary to perform the target function . Thus , the logits li should be regularized , such that the probability for weight wi to be active is small unlesswi is necessary for the task . This is achieved by adding a regularization term r = α ∑ i li to the loss , where α ∈ [ 0 , ∞ ) is a hyper-parameter responsible for the strength of the regularization . How to best choose α is described in detail in Appendix C.3 . At the end of the training process , deterministic binary masks Mi ∈ { 0 , 1 } for weights i are obtained via thresholding Mi = 1σ ( li ) > 0.52 . Applying the full mask M then uncovers the module responsible for the target task . A preliminary study confirmed that the mask training process is stable and thereby suitable for inspection ( Appendix B.1 ) . In the following sections we will analyze several standard NNs using this technique of mask-training34 . Throughout our experiments we will avoid drawing conclusions based on the measured amount of sharing alone as much as possible , since it is unclear what degree of sharing can be expected or is desirable . Rather , we will analyze the performance drop caused by removing weights corresponding to certain functionality , which offers a more consistent and easier to interpret metric5 . For example , to show that a module is responsible for a particular subtask ( A ) but not for another ( B ) , we train masks on A and test on both . A performance drop is expected on task B only . In contrast , to show that this module is exclusively needed for a particular subtask , we can invert the masks and test on both tasks . The inverted masks are expected to perform well on the complementary task , but not on the original one . However , we note that this mask inversion method is limited to analyzing entirely disjoint weights . We analyze weight sharing between two tasks using two different metrics : one is Intersection over Union ( IoU ) , which measures how much the weights used for solving the tasks overlap . We call the other Intersection over Minimum ( IoMin ) , which measures the number of overlapping weights ( intersection ) divided by the minimum of the total number of weights used for each task . In that sense IoMin is a measure of “ subsetness ” . Intuitively , if no weights are shared , both IoU and IoMin are zero . If all weights are shared , both IoU and IoMin are one . However , when the weights needed for one task are a strict subset of the other , then IoMin is one , while IoU < 1 . 2In general we find that li concentrates at either 0 or 1 and so thresholding is safe ( see also Fig . 9 ) . 3A complete overview of all experimental details is available in Appendix C. Mean and standard deviations shown in the figures are calculated over 10 runs unless otherwise noted . 4Code for all experiments is available at https : //github.com/RobertCsordas/modules . 5Exceptions only include cases where the observed amount of weight sharing can be clearly interpreted . However , even in these cases , our analysis will focus on general trends rather than the precise amounts observed . | This paper studies weight modularity in neural networks (NNs). In particular, given a NN trained to perform a task, a subset of weights are identified which in isolation perform well on a subtask of the original task. Such subsets are inspected to understand the extent to which they are specialized or reused across different subtasks of the original task. To identify subtask specific weights, a mask is learned that minimizes loss over a subtask when applied to the original NN's frozen weights. This process is carried out using gradient based optimization techniques (Adam). Extensive experiments are performed across various datasets and architectures. The paper concludes that while NNs seem to exhibit module specialization, they fail to exhibit reuse. | SP:730c95c4ef5534877dcbd535e53dc8ba4879ed36 |
GL-Disen: Global-Local disentanglement for unsupervised learning of graph-level representations | Graph-level representation learning plays a crucial role in a variety of tasks such as molecular property prediction and community analysis . Currently , several models based on mutual information maximization have shown strong performance on the task of unsupervised graph representation learning . In this paper , instead , we consider a disentanglement approach to learn graph-level representations in the unsupervised setting . Our work is the first to study disentanglement learning for graph-level representations . Our key observation is that the formation of many real-world graphs is a complex process with global and local generative factors . We hypothesize that disentangled representations which capture these global and local generative factors into independent latent units can be highly beneficial . Specifically , for graph-level representation learning , our disentanglement approach can alleviate distraction due to local variations of individual nodes or individual local neighbourhoods . We propose a VAE based learning algorithm to disentangle the global graph-level information , which is common across the entire graph , and local patch-level information , which varies across individual patches ( the local subgraphs centered around the nodes ) . Through extensive experiments and analysis , we show that our method achieves the state-of-the-art performance on the task of unsupervised graph representation learning . 1 INTRODUCTION . Graph structured data has been very useful in representing a variety of data types including social networks ( Newman & Girvan , 2004 ) , protein-protein interactions Krogan et al . ( 2006 ) , scene graphs ( Krishna et al. , 2016 ) , customer purchasing patterns ( Bhatia et al. , 2016 ) and many more . Graph Neural Networks ( GNNs ) have recently become the prominent approach for representing graph structured data ( Li et al. , 2016 ; Gilmer et al. , 2017 ; Kipf & Welling , 2017 ; Velickovic et al. , 2018 ; Xu et al. , 2019 ) . GNNs are capable of representing graphs in a permutation invariant manner , enabling information propagation among neighbours and mapping graphs to low dimensional spaces . In this work , we focus on graph-level representation learning . Graph-level representation learning is crucial for tasks like molecular property identification ( Duvenaud et al. , 2015 ) and community classification based on the patterns of discussion threads ( Yanardag & Vishwanathan , 2015 ) , and they are useful for applications such as drug discovery and recommendation systems . Availability of task specific labels plays a significant role in graph representation learning as much as its role in other domains such as images , text and speech . However , due to many specialized fields which graphs are utilized ( e.g. , biological sciences , quantum mechanics ) , collecting labels has become very expensive as it needs expert knowledge ( Sun et al. , 2020 ) . Therefore , unsupervised learning of graph representation is crucial . Recent state-of-the-art unsupervised graph representation learning methods ( Sun et al. , 2020 ; Hassani & Khasahmadi , 2020 ) are based on Infomax principle by Linsker ( 1988 ) . These methods learn the graph representation by maximizing the mutual information between the representation of the entire graph and the representations of individual patches of the graph . Here we follow ( Velickovic et al. , 2019 ; Sun et al. , 2020 ) and define patches as local subgraphs centered around a node . This approach allows the graph level representation to capture the globally relevant information from the patch representations ( Sun et al. , 2020 ) . Global-local disentanglement . We propose a novel approach for graph-level representation learning . Our observation is that many graphs are generated using multiple heterogeneous factors , with different factors providing different information . Specifically , the formation of many real-world graphs is driven by graph-level factors and node/patch-level factors . For example , an online discussion thread can be represented as a graph where nodes represent users who have participated in the discussion thread , and edges represent interaction between the users in the thread ( Yanardag & Vishwanathan , 2015 ) . Graph-level representation of such communication graphs can be used to classify the sub-community ( e.g . subreddits on Reddit ) of that discussion thread . However , the formation of these communication graphs is driven by global graph-level factors ( e.g. , the topic of the discussion-thread ) and local node-level factors ( e.g. , characteristics of individual users engaging in on-line discussion ) . The graph is formed with a complex process involving complicated interactions between global graph-level factors and local node/patch-level factors . It has been discussed in the literature that disentangling these generative factors can benefit many tasks in different domains ( Bengio et al. , 2013 ; Ridgeway , 2016 ) . This is because disentanglement enables to separate out explanatory generative factors which cause variations in data and facilitates selection of only those factors which are well suited for the downstream task . Importantly , removing the irrelevant factors from the prediction process increases the robustness of models ( Ma et al. , 2019 ) . Based on the above discussion , we hypothesize that graph representation learning that disentangles the graph-level and node/patch-level factors can be useful for many graph analysis tasks . In particular , the disentangled graph-level representation can be powerful for graph-level inference . Therefore , in this work , we propose GL-Disen : a global graph level - local node/patch level disentanglement method for graph level representation learning . Disentanglement learning is a novel direction for GNNs , and it has not been studied for graph level representations learning . Existing work have only focused on disentangling the factors which forms each neighbourhood , based on supervision from downstream tasks ( Ma et al. , 2019 ; Liu et al. , 2020 ; Yang et al. , 2020 ) and disentangling node and edge features in attributed graphs ( Guo et al. , 2020 ) . To summarize , our contributions are : • We propose GL-Disen : a novel global graph-level and local node/patch-level disentangling model . To the best of our knowledge , this is the first work of applying unsupervised disentangled learning for graph level representation learning . • We conduct extensive experiments to verify that our model learns meaningful disentangled global and local representations for graphs . The disentangled global representation achieves outstanding performance in graph classification . 2 RELATED WORK . Here we review the most relevant work on unsupervised graph level representation learning to ours . Reviews of disentangle learning and other unsupervised graph learning methods are in Appendix A . The most recent family of graph embedding methods are based on contrastive learning . Main idea is to train an encoder model to make it learn the contrast in between a representation which captures the structural and statistic information provided by original data and a negative sample . InfoGraph by Sun et al . ( 2020 ) was the first graph level embedding model which utilized contrastive learning and this method was inspired by Infomax principle based Deep Graph Infomax ( DGI ) ( Velickovic et al. , 2019 ) . It draws negative samples from other graphs and sum pooling is used as the readout function . Multi-view contrastive ( CMV ) learning method by Hassani & Khasahmadi ( 2020 ) enhances InfoGraph by introducing multi-view based data augmentation mechanism which uses contrastive learning to maximize mutual information among multiple structural views of the input graph . On the other hand , Graph Contrastive Coding ( GCC ) ( Qiu et al. , 2020 ) utilizes contrastive learning for learning universal graph embeddings which can be transferred to multiple downstream tasks . Infomax principle based and contrastive learning based methods have produced the best performance for graph embedding models so far . 3 GL-DISEN METHODOLOGY . 3.1 GRAPH GENERATION PROCESS . We follow the general framework of ( Higgins et al. , 2017 ) . However , our specific disentanglement method is quite different , as will be discussed . Let D = { G , Gf , Lf } be the set that consists of graphs and their ground truth generative factors for global and local level . Each graph G = ( V , A ) , contains a set of nodes V and A is the adjacency matrix . Gf and Lf represent two sets of generative factors : Gf contains global factors gf ⊂ Gf common for the entire graph and lf ⊂ Lf represents local factors which can differ from local patch to patch . In our model , gf and lf are conditionally independent given G , where p ( gf , lf |G ) = p ( gf |G ) · p ( lf |G ) . We assume that the graph G is generated using a true world generator which uses the ground truth generative factors : p ( G|gf , lf ) = Gen ( gf , lf ) . 3.2 GLOBAL GRAPH LEVEL AND LOCAL PATCH LEVEL DISENTANGLEMENT . Our goal is to develop an unsupervised deep graph generative model which can learn the joint distribution of graph G , the set of generative factors Z , using only the samples from G. This should be learnt in a way that the set of latent generative factors can generate the observed graphG , such that p ( G|Z ) ≈ p ( G|gf , lf ) = Gen ( gf , lf ) . A suitable approach to fulfill this objective is to maximize the marginal log-likelihood for the observed graph G over the whole distribution of latent factors Z. max θ Epθ ( Z ) [ log pθ ( G|Z ) ] ( 1 ) For an observed graphG , the inferred posterior probability distribution of the latent factors Z can be described as qφ ( Z|G ) . However , the graph generation process we described in Section 3.1 assumes two independent sets of generative factors representing global and local level information relevant for a graph . Therefore we consider a model where the latent factor set Z can be divided into two independent latent factor sets as Z = ( Zg , Zl ) . Zg represents the latent factors which capture the global generative factors of G and Zl captures the local counterpart . Therefore we can rewrite our inferred posterior distribution as follows : qφ ( Z|G ) = qφ ( Zg , Zl|G ) = qφ ( Zg|G ) qφ ( Zl|G ) ( 2 ) We discuss in detail the two posteriors : qφ ( Zg|G ) and qφ ( Zl|G ) . The graph G consists of |V | number of nodes . In a graph data structure , each node is not isolated . They are connected with its neighbours and propagates information . Therefore , we use the term patch to indicate the local neighbourhood centered at each node where the node interacts with . Therefore , qφ ( Zg|G ) and qφ ( Zl|G ) are the posterior distributions of all these |V | patches . However , if we consider the global latent posterior , it is common for all |V | patches , as the graph G was originally generated with gf common for all V . Hence , we propose to use a single latent zg to capture the global generative factors common for all patches . In particular , we use qφ ( zg|G ) to model this single posterior . On the other hand , the factors which contribute to generate each patch can vary significantly . Therefore in this model we assume the local latent factors are independent 1 . Therefore , we update Eq . 2 as : qφ ( Z|G ) = qφ ( zg , Zl|G ) = qφ ( zg|G ) |V |∏ i=1 qφ ( zl ( i ) |G ) ( 3 ) Here zl ( i ) is the latent factor that captures the local generative factors for a patch centered at node i . Now , our objective is to make sure the latent factors sampled from global and local latent posterior distributions can capture the global and local generative factors gf and lf respectively in a disentangled manner . Note that , we aim to only disentangle global latent factors from local latent factors in this work . This is because , since the intention of the global latent zg is to capture all the global factors for graph level representation , entanglement among individual factors in either global latent or local latent is not being focused . Thus , this is different from ( Higgins et al. , 2017 ) . To 1In the evaluation we assess the validity of this assumption . enforce the disentangling nature between these two latent factors , first , we try to match each of them to their respective priors p ( zg ) and p ( zl ) separately . We select unit Gaussians ( N ( 0 , 1 ) ) as priors . This leads to following constrained optimization problem ( Higgins et al. , 2017 ) . max θ , φ EG∼G [ Eqφ ( zg , Zl|G ) [ log pθ ( G|zg , Zl ) ] ] s.t . KL ( qφ ( zg|G ) ‖ p ( zg ) ) < KL ( qφ ( Zl|G ) ‖ p ( Zl ) ) < η ( 4 ) where and η are strengths of each constraint . Following ( Higgins et al. , 2017 ) , Eq . 4 can be written to obtain the variational evidence lower bound ( ELBO ) of a Graph Variational Autoencoder ( GVAE ) ( Kipf & Welling , 2016 ) ( Here we call this as GVAE because our input is a graph ) with two separate latent representations with additional coefficients as follows : F ( θ , φ , α , γ ; G , zg , Zl ) ≥ L ( θ , φ ; G , zg , Zl , α , γ ) = Eqφ ( zg , Zl|G ) [ log pθ ( G|zg , Zl ) ] − α KL ( qφ ( zg|G ) ‖ p ( zg ) ) − γ KL ( qφ ( Zl|G ) ‖ p ( Zl ) ) ( 5 ) Based on Eq.3 we can expand the KL divergence term KL ( qφ ( Zl|G ) ‖ p ( Zl ) ) and rewrite our objective function for a single graph G as : L ( θ , φ ; G , zg , Zl , α , γ ) = Eqφ ( zg , Zl|G ) [ log pθ ( G|zg , Zl ) ] − α KL ( qφ ( zg|G ) |p ( zg ) ) − γ |V |∑ i=1 KL ( qφ ( zl ( i ) |G ) ‖ p ( zl ( i ) ) ) ( 6 ) The training process maximizes this lower bound for all the graphs in a minibatch Gb from the full dataset G : Lθ , φ ( Gb ) = 1 |Gb| |Gb|∑ r=1 L ( θ , φ ; G , zg , Zl , α , γ ) ( 7 ) | This paper proposes an unsupervised graph-level representation learning method considering global-local disentanglement. Specifically, the authors propose a GL-Disen model based on graph VAE architecture to jointly learn global and local representations for a graph. The global information is shared across the whole graph while the local information varies from patch to patch, corresponding to common and local factors, respectively. Empirical experimental results show that the learned representation achieves superior performance in the downstream graph classification task, and analyses demonstrate the learned representations exhibit some disentangle property. | SP:47c40cbd381242ca804b1d6c6e95d04e28520733 |
GL-Disen: Global-Local disentanglement for unsupervised learning of graph-level representations | Graph-level representation learning plays a crucial role in a variety of tasks such as molecular property prediction and community analysis . Currently , several models based on mutual information maximization have shown strong performance on the task of unsupervised graph representation learning . In this paper , instead , we consider a disentanglement approach to learn graph-level representations in the unsupervised setting . Our work is the first to study disentanglement learning for graph-level representations . Our key observation is that the formation of many real-world graphs is a complex process with global and local generative factors . We hypothesize that disentangled representations which capture these global and local generative factors into independent latent units can be highly beneficial . Specifically , for graph-level representation learning , our disentanglement approach can alleviate distraction due to local variations of individual nodes or individual local neighbourhoods . We propose a VAE based learning algorithm to disentangle the global graph-level information , which is common across the entire graph , and local patch-level information , which varies across individual patches ( the local subgraphs centered around the nodes ) . Through extensive experiments and analysis , we show that our method achieves the state-of-the-art performance on the task of unsupervised graph representation learning . 1 INTRODUCTION . Graph structured data has been very useful in representing a variety of data types including social networks ( Newman & Girvan , 2004 ) , protein-protein interactions Krogan et al . ( 2006 ) , scene graphs ( Krishna et al. , 2016 ) , customer purchasing patterns ( Bhatia et al. , 2016 ) and many more . Graph Neural Networks ( GNNs ) have recently become the prominent approach for representing graph structured data ( Li et al. , 2016 ; Gilmer et al. , 2017 ; Kipf & Welling , 2017 ; Velickovic et al. , 2018 ; Xu et al. , 2019 ) . GNNs are capable of representing graphs in a permutation invariant manner , enabling information propagation among neighbours and mapping graphs to low dimensional spaces . In this work , we focus on graph-level representation learning . Graph-level representation learning is crucial for tasks like molecular property identification ( Duvenaud et al. , 2015 ) and community classification based on the patterns of discussion threads ( Yanardag & Vishwanathan , 2015 ) , and they are useful for applications such as drug discovery and recommendation systems . Availability of task specific labels plays a significant role in graph representation learning as much as its role in other domains such as images , text and speech . However , due to many specialized fields which graphs are utilized ( e.g. , biological sciences , quantum mechanics ) , collecting labels has become very expensive as it needs expert knowledge ( Sun et al. , 2020 ) . Therefore , unsupervised learning of graph representation is crucial . Recent state-of-the-art unsupervised graph representation learning methods ( Sun et al. , 2020 ; Hassani & Khasahmadi , 2020 ) are based on Infomax principle by Linsker ( 1988 ) . These methods learn the graph representation by maximizing the mutual information between the representation of the entire graph and the representations of individual patches of the graph . Here we follow ( Velickovic et al. , 2019 ; Sun et al. , 2020 ) and define patches as local subgraphs centered around a node . This approach allows the graph level representation to capture the globally relevant information from the patch representations ( Sun et al. , 2020 ) . Global-local disentanglement . We propose a novel approach for graph-level representation learning . Our observation is that many graphs are generated using multiple heterogeneous factors , with different factors providing different information . Specifically , the formation of many real-world graphs is driven by graph-level factors and node/patch-level factors . For example , an online discussion thread can be represented as a graph where nodes represent users who have participated in the discussion thread , and edges represent interaction between the users in the thread ( Yanardag & Vishwanathan , 2015 ) . Graph-level representation of such communication graphs can be used to classify the sub-community ( e.g . subreddits on Reddit ) of that discussion thread . However , the formation of these communication graphs is driven by global graph-level factors ( e.g. , the topic of the discussion-thread ) and local node-level factors ( e.g. , characteristics of individual users engaging in on-line discussion ) . The graph is formed with a complex process involving complicated interactions between global graph-level factors and local node/patch-level factors . It has been discussed in the literature that disentangling these generative factors can benefit many tasks in different domains ( Bengio et al. , 2013 ; Ridgeway , 2016 ) . This is because disentanglement enables to separate out explanatory generative factors which cause variations in data and facilitates selection of only those factors which are well suited for the downstream task . Importantly , removing the irrelevant factors from the prediction process increases the robustness of models ( Ma et al. , 2019 ) . Based on the above discussion , we hypothesize that graph representation learning that disentangles the graph-level and node/patch-level factors can be useful for many graph analysis tasks . In particular , the disentangled graph-level representation can be powerful for graph-level inference . Therefore , in this work , we propose GL-Disen : a global graph level - local node/patch level disentanglement method for graph level representation learning . Disentanglement learning is a novel direction for GNNs , and it has not been studied for graph level representations learning . Existing work have only focused on disentangling the factors which forms each neighbourhood , based on supervision from downstream tasks ( Ma et al. , 2019 ; Liu et al. , 2020 ; Yang et al. , 2020 ) and disentangling node and edge features in attributed graphs ( Guo et al. , 2020 ) . To summarize , our contributions are : • We propose GL-Disen : a novel global graph-level and local node/patch-level disentangling model . To the best of our knowledge , this is the first work of applying unsupervised disentangled learning for graph level representation learning . • We conduct extensive experiments to verify that our model learns meaningful disentangled global and local representations for graphs . The disentangled global representation achieves outstanding performance in graph classification . 2 RELATED WORK . Here we review the most relevant work on unsupervised graph level representation learning to ours . Reviews of disentangle learning and other unsupervised graph learning methods are in Appendix A . The most recent family of graph embedding methods are based on contrastive learning . Main idea is to train an encoder model to make it learn the contrast in between a representation which captures the structural and statistic information provided by original data and a negative sample . InfoGraph by Sun et al . ( 2020 ) was the first graph level embedding model which utilized contrastive learning and this method was inspired by Infomax principle based Deep Graph Infomax ( DGI ) ( Velickovic et al. , 2019 ) . It draws negative samples from other graphs and sum pooling is used as the readout function . Multi-view contrastive ( CMV ) learning method by Hassani & Khasahmadi ( 2020 ) enhances InfoGraph by introducing multi-view based data augmentation mechanism which uses contrastive learning to maximize mutual information among multiple structural views of the input graph . On the other hand , Graph Contrastive Coding ( GCC ) ( Qiu et al. , 2020 ) utilizes contrastive learning for learning universal graph embeddings which can be transferred to multiple downstream tasks . Infomax principle based and contrastive learning based methods have produced the best performance for graph embedding models so far . 3 GL-DISEN METHODOLOGY . 3.1 GRAPH GENERATION PROCESS . We follow the general framework of ( Higgins et al. , 2017 ) . However , our specific disentanglement method is quite different , as will be discussed . Let D = { G , Gf , Lf } be the set that consists of graphs and their ground truth generative factors for global and local level . Each graph G = ( V , A ) , contains a set of nodes V and A is the adjacency matrix . Gf and Lf represent two sets of generative factors : Gf contains global factors gf ⊂ Gf common for the entire graph and lf ⊂ Lf represents local factors which can differ from local patch to patch . In our model , gf and lf are conditionally independent given G , where p ( gf , lf |G ) = p ( gf |G ) · p ( lf |G ) . We assume that the graph G is generated using a true world generator which uses the ground truth generative factors : p ( G|gf , lf ) = Gen ( gf , lf ) . 3.2 GLOBAL GRAPH LEVEL AND LOCAL PATCH LEVEL DISENTANGLEMENT . Our goal is to develop an unsupervised deep graph generative model which can learn the joint distribution of graph G , the set of generative factors Z , using only the samples from G. This should be learnt in a way that the set of latent generative factors can generate the observed graphG , such that p ( G|Z ) ≈ p ( G|gf , lf ) = Gen ( gf , lf ) . A suitable approach to fulfill this objective is to maximize the marginal log-likelihood for the observed graph G over the whole distribution of latent factors Z. max θ Epθ ( Z ) [ log pθ ( G|Z ) ] ( 1 ) For an observed graphG , the inferred posterior probability distribution of the latent factors Z can be described as qφ ( Z|G ) . However , the graph generation process we described in Section 3.1 assumes two independent sets of generative factors representing global and local level information relevant for a graph . Therefore we consider a model where the latent factor set Z can be divided into two independent latent factor sets as Z = ( Zg , Zl ) . Zg represents the latent factors which capture the global generative factors of G and Zl captures the local counterpart . Therefore we can rewrite our inferred posterior distribution as follows : qφ ( Z|G ) = qφ ( Zg , Zl|G ) = qφ ( Zg|G ) qφ ( Zl|G ) ( 2 ) We discuss in detail the two posteriors : qφ ( Zg|G ) and qφ ( Zl|G ) . The graph G consists of |V | number of nodes . In a graph data structure , each node is not isolated . They are connected with its neighbours and propagates information . Therefore , we use the term patch to indicate the local neighbourhood centered at each node where the node interacts with . Therefore , qφ ( Zg|G ) and qφ ( Zl|G ) are the posterior distributions of all these |V | patches . However , if we consider the global latent posterior , it is common for all |V | patches , as the graph G was originally generated with gf common for all V . Hence , we propose to use a single latent zg to capture the global generative factors common for all patches . In particular , we use qφ ( zg|G ) to model this single posterior . On the other hand , the factors which contribute to generate each patch can vary significantly . Therefore in this model we assume the local latent factors are independent 1 . Therefore , we update Eq . 2 as : qφ ( Z|G ) = qφ ( zg , Zl|G ) = qφ ( zg|G ) |V |∏ i=1 qφ ( zl ( i ) |G ) ( 3 ) Here zl ( i ) is the latent factor that captures the local generative factors for a patch centered at node i . Now , our objective is to make sure the latent factors sampled from global and local latent posterior distributions can capture the global and local generative factors gf and lf respectively in a disentangled manner . Note that , we aim to only disentangle global latent factors from local latent factors in this work . This is because , since the intention of the global latent zg is to capture all the global factors for graph level representation , entanglement among individual factors in either global latent or local latent is not being focused . Thus , this is different from ( Higgins et al. , 2017 ) . To 1In the evaluation we assess the validity of this assumption . enforce the disentangling nature between these two latent factors , first , we try to match each of them to their respective priors p ( zg ) and p ( zl ) separately . We select unit Gaussians ( N ( 0 , 1 ) ) as priors . This leads to following constrained optimization problem ( Higgins et al. , 2017 ) . max θ , φ EG∼G [ Eqφ ( zg , Zl|G ) [ log pθ ( G|zg , Zl ) ] ] s.t . KL ( qφ ( zg|G ) ‖ p ( zg ) ) < KL ( qφ ( Zl|G ) ‖ p ( Zl ) ) < η ( 4 ) where and η are strengths of each constraint . Following ( Higgins et al. , 2017 ) , Eq . 4 can be written to obtain the variational evidence lower bound ( ELBO ) of a Graph Variational Autoencoder ( GVAE ) ( Kipf & Welling , 2016 ) ( Here we call this as GVAE because our input is a graph ) with two separate latent representations with additional coefficients as follows : F ( θ , φ , α , γ ; G , zg , Zl ) ≥ L ( θ , φ ; G , zg , Zl , α , γ ) = Eqφ ( zg , Zl|G ) [ log pθ ( G|zg , Zl ) ] − α KL ( qφ ( zg|G ) ‖ p ( zg ) ) − γ KL ( qφ ( Zl|G ) ‖ p ( Zl ) ) ( 5 ) Based on Eq.3 we can expand the KL divergence term KL ( qφ ( Zl|G ) ‖ p ( Zl ) ) and rewrite our objective function for a single graph G as : L ( θ , φ ; G , zg , Zl , α , γ ) = Eqφ ( zg , Zl|G ) [ log pθ ( G|zg , Zl ) ] − α KL ( qφ ( zg|G ) |p ( zg ) ) − γ |V |∑ i=1 KL ( qφ ( zl ( i ) |G ) ‖ p ( zl ( i ) ) ) ( 6 ) The training process maximizes this lower bound for all the graphs in a minibatch Gb from the full dataset G : Lθ , φ ( Gb ) = 1 |Gb| |Gb|∑ r=1 L ( θ , φ ; G , zg , Zl , α , γ ) ( 7 ) | In this paper, the authors proposed a disentanglement learning based approach for unsupervised graph level representation learning. They assume that disentangled representations which capture these global and local generative factors into independent latent units can be highly beneficial for graph level tasks. The extensive experiments and analysis show that our method achieves the state-of-the-art performance on the task of unsupervised graph representation learning. | SP:47c40cbd381242ca804b1d6c6e95d04e28520733 |
Unified Principles For Multi-Source Transfer Learning Under Label Shifts | 1 INTRODUCTION . Transfer learning ( Pan & Yang , 2009 ) is based on the motivation that learning a new task is easier after having learned several similar tasks . By learning the inductive bias from a set of related source domains ( S1 , . . . , ST ) and then leveraging the shared knowledge upon learning the target domain T , the prediction performance can be significantly improved . Based on this , transfer learning arises in deep learning applications such as computer vision ( Zhang et al. , 2019 ; Tan et al. , 2018 ; Hoffman et al. , 2018b ) , natural language processing ( Ruder et al. , 2019 ; Houlsby et al. , 2019 ) and biomedical engineering ( Raghu et al. , 2019 ; Lundervold & Lundervold , 2019 ; Zhang & An , 2017 ) . To ensure a reliable transfer , it is critical to understand the theoretical assumptions between the domains . One implicit assumption in most transfer learning algorithms is that the label proportions remain unchanged across different domains ( Du Plessis & Sugiyama , 2014 ) ( i.e. , S ( y ) = T ( y ) ) . However , in many real-world applications , the label distributions can vary markedly ( i.e . label shift ) ( Wen et al. , 2014 ; Lipton et al. , 2018 ; Li et al. , 2019b ) , in which existing approaches can not guarantee a small target generalization error , which is recently proved by Combes et al . ( 2020 ) . Moreover , transfer learning becomes more challenging when transferring knowledge from multiple sources to build a model for the target domain , as this requires an effective selection and leveraging the most useful source domains when label shift occurs . This is not only theoretically interesting but also commonly encountered in real-world applications . For example , in medical diagnostics , the disease distribution changes over countries ( Liu et al. , 2004 ; Geiss et al. , 2014 ) . Considering the task of diagnosing a disease in a country without sufficient data , how can we leverage the information from different countries with abundant data to help the diagnosing ? Obviously , naı̈vely combining all the sources and applying one-to-one single source transfer learning algorithm can lead to undesired results , as it can include low quality or even untrusted data from certain sources , which can severely influence the performance . In this paper , we study the label shift problem in multi-source transfer learning where St ( y ) 6= T ( y ) . We propose unified principles that are applicable for three common transfer scenarios : unsupervised Domain Adaptation ( DA ) ( Ben-David et al. , 2010 ) , limited target labels ( Mansour et al. , 2020 ) and partial unsupervised DA with supp ( T ( y ) ) ⊆ supp ( St ( y ) ) ( Cao et al. , 2018 ) , where prior works generally treated them as separate scenario . It should be noted that this work deals with target shift without assuming that semantic conditional distributions are identical ( i.e. , St ( x|y ) 6= T ( x|y ) ) , which is more realistic for real-world problems . Our contributions in this paper are two-folds : ( I ) We propose to use Wasserstein distance ( Arjovsky et al. , 2017 ) to develop a new target generalization risk upper bound ( Theorem 1 ) , which reveals the importance of label distribution ratio estimation and provides a principled guideline to learn the domain relation coefficients . Moreover , we provide a theoretical analysis in the context of representation learning ( Theorem 2 ) , which guides to learn a feature function that minimizes the conditional Wasserstein distance as well as controls the weighted source risk . We further reveal the relations in the aforementioned three scenarios lie in the different assumptions for estimating label distribution ratio . ( II ) Inspired by the theoretical results , we propose Wasserstein Aggregation Domain Network ( WADN ) for handling label-shift in multi-source transfer learning . We evaluate our algorithm on three benchmark datasets , and the results show that our algorithm can significantly outperform stateof-the-art principled approaches . 2 RELATED WORK . Multi-Source Transfer Learning Theories have been investigated in the previous literature with different principles to aggregate source domains . In the popular unsupervised DA , ( Zhao et al. , 2018 ; Peng et al. , 2019 ; Wen et al. , 2020 ; Li et al. , 2018b ) adoptedH-divergence ( Ben-David et al. , 2007 ) , discrepancy ( Mansour et al. , 2009 ) and Wasserstein distance ( Arjovsky et al. , 2017 ) of marginal distribution d ( St ( x ) , T ( x ) ) to estimate domain relations and dynamically leveraged different domains . These algorithms generally consists source risk , domain discrepancy and an un-observable term η , the optimal risk on all the domains , which are ignored in these approaches . However , as Combes et al . ( 2020 ) pointed out , ignoring the influence of η will be problematic when label distributions between source and target domains are significantly different . Therefore it is necessary to take η into consideration by using a small amount of labelled data is available for the target domain ( Wen et al. , 2020 ) . Following this line , very recent works ( Konstantinov & Lampert , 2019 ; Wang et al. , 2019a ; Mansour et al. , 2020 ) started to consider measure the divergence between two domains given label information for the target domain by using Y-discrepancy ( Mohri & Medina , 2012 ) . However , we empirically showed these methods are still unable to handle label shift . Label-Shift Label-Shift ( Zhang et al. , 2013 ; Gong et al. , 2016 ) is a common phenomena in the transfer learning with S ( y ) 6= T ( y ) and generally ignored by the previous multi-source transfer learning practice . Several theoretical principled approaches have been proposed such as ( Azizzadenesheli et al. , 2019 ; Garg et al. , 2020 ) . In addition , ( Combes et al. , 2020 ; Wu et al. , 2019 ) analyzed the generalized label shift problem in the one-to-one single unsupervised DA problem but did not provide guidelines of levering different sources to ensure a reliable transfer , which is more challenging . ( Redko et al. , 2019 ) proposed optimal transport strategy for the multiple unsupervised DA under label shift by assuming identical semantic conditional distribution . However they did not consider representation learning in conjunction with their framework and did not design neural network based approaches . Different from these , we analyzed our problem in the context of representation learning and propose an efficient and principled strategies . Moreover , our theoretical results highlights the importance of label shift problem in a variety of multi-source transfer problem . While the aforementioned work generally focus on the unsupervised DA problem , without considering unified rules for different scenarios ( e.g . partial multi-source DA ) . 3 THEORETICAL INSIGHTS : TRANSFER RISK UPPER BOUND . We assume a scoring hypothesis defined on the input space X and output space Y with h : X ×Y → R , is K-Lipschitz w.r.t . the feature x ( given the same label ) , i.e . for ∀y , ‖h ( x1 , y ) − h ( x2 , y ) ‖2 ≤ K‖x1 − x2‖2 , and the loss function ` : R × R → R+ is positive , L-Lipschitz and upper bounded by Lmax . We denote the expected risk w.r.t distribution D : RD ( h ) = E ( x , y ) ∼D ` ( h ( x , y ) ) and its empirical counterpart ( w.r.t . D̂ ) R̂D ( h ) = ∑ ( x , y ) ∈D̂ ` ( h ( x , y ) ) . We adopted Wasserstein-1 distance ( Arjovsky et al. , 2017 ) as a metric to measure the similarity of the domains . Compared with other divergences , Wasserstein distance has been theoretically proved tighter than TV distance ( Gong et al. , 2016 ) or Jensen-Shnannon divergence ( Combes et al. , 2020 ) . Based on previous work , the label shift is generally handled by label-distribution ratio weighted loss : RαS ( h ) = E ( x , y ) ∼Sα ( y ) ` ( h ( x , y ) ) with α ( y ) = T ( y ) /S ( y ) . We also denote α̂t as its empirical counterpart , estimated from samples . Besides , to measure the task relations , we define a simplex λ with λ [ t ] ≥ 0 , ∑T t=1 λ [ t ] = 1 as the task relation coefficient vector by assigning high weight to the similar task . Then we first present Theorem 1 , which proposed theoretical insights about how to combine source domains through properly estimating λ. Theorem 1 . Let { Ŝt = { ( xi , yi ) } NSt i=1 } Tt=1 and T̂ = { ( xi , yi ) } NT i=1 , respectively be T source and target i.i.d . samples . For ∀h ∈ H with H the hypothesis family and ∀λ , with high probability ≥ 1− 4δ , the target risk can be upper bounded by : RT ( h ) ≤ ∑ t λ [ t ] R̂α̂tSt ( h ) + LK ∑ t λ [ t ] Ey∼T̂ ( y ) W1 ( T̂ ( x|Y = y ) ‖Ŝt ( x|Y = y ) ) + Lmaxd sup ∞ √√√√ T∑ t=1 λ [ t ] 2 βt √ log ( 1/δ ) 2N + Lmax sup t ‖αt − α̂t‖2 + Comp ( NS1 , . . . , NST , NT , δ ) , where N = ∑T t=1NSt and βt = NSt/N and d sup ∞ = maxt∈ [ 1 , T ] , y∈ [ 1 , Y ] αt ( y ) the maximum true label distribution ratio value . W1 ( ·‖· ) is the Wasserstein-1 distance with L2-distance as cost function . Comp ( NS1 , . . . , NST , NT , δ ) is a function that decreases with larger NS1 , . . . , NT , given a fixed δ and hypothesis familyH . ( See Appendix E for details ) Remarks ( 1 ) In the first two terms , the relation coefficient λ is controlled by αt-weighted loss R̂α̂tSt ( h ) and conditional Wasserstein distance Ey∼T̂ ( y ) W1 ( T̂ ( x|Y = y ) ‖Ŝt ( x|Y = y ) ) . To minimize the upper bound , we need to assign a higher λ [ t ] to the source t with a smaller weighted prediction loss and a smaller weighted semantic conditional Wasserstein distance . Intuitively , we tend to leverage the source task which is semantic similar to the target and easier to learn . ( 2 ) If each source have equal observations with βt = 1 , then the third term will become ‖λ‖2 , a L2 norm regularization , which can be viewed as an encouragement of uniformly leveraging all the sources . Combing these three terms , we need to consider the trade-off between assigning a higher λ [ t ] to the source t that has a smaller weighted prediction loss and conditional Wasserstein distance , and assigning balanced λ [ t ] for avoiding concentrating on only one source . ( 3 ) ‖α̂t − αt‖2 indicates the gap between ground-truth and empirical label ratio . Therefore if we can estimate a good α̂t , these terms can be small . In the practice , If target labels are available , α̂t can be computed from the observed data and α̂t → αt . If target labels are absent ( unsupervised DA ) , we need to design methods and to properly estimate α̂t ( Sec . 4 ) . ( 4 ) Comp ( NS1 , . . . , NST , NT , δ ) is a function that reflects the convergence behavior , which decreases with larger observation numbers . If we fixH , δ , N and NT , this term can be viewed as a constant . Insights in Representation Learning Apart from Theorem 1 , we propose a novel theoretical analysis in the context of representation learning , which motivates practical guidelines in the deep learning regime . We define a stochastic feature function g and we denote its conditional distribution w.r.t . latent variable Z ( induced by g ) as S ( z|Y = y ) = ∫ x g ( z|x ) S ( x|Y = y ) dx . Then we have : Theorem 2 . We assume the settings of loss , the hypothesis are the same with Theorem 1 . We further denote the stochastic feature learning function g : X → Z , and the hypothesis h : Z × Y → R. Then ∀λ , the target risk is upper bounded by : RT ( h , g ) ≤ ∑ t λ [ t ] RαtSt ( h , g ) + LK ∑ t λ [ t ] Ey∼T ( y ) W1 ( St ( z|Y = y ) ‖T ( z|Y = y ) ) , where RT ( h , g ) = E ( x , y ) ∼T ( x , y ) Ez∼g ( z|x ) ` ( h ( z , y ) ) . Theorem 2 reveal that to control the upper bound , we need to learn g that minimizes the weighted conditional Wasserstein distance and learn ( g , h ) that minimizes the weighted source risk . Comparison with previous Theorems . Our theory proposed an alternative prospective to understand transfer learning . The first term is α-weighted loss . And it will recover the typical source loss minimization if there is no label shift with αt ( y ) ≡ 1 ( Li et al. , 2019a ; Peng et al. , 2019 ; Zhao et al. , 2018 ; Wen et al. , 2020 ) . Beside , minimizing the conditional Wasserstein distances has been shown to be advantageous , compared with W1 ( St ( z ) ‖T ( z ) ) ( Long et al. , 2018 ) . Moreover , Theorem 2 explicitly proposed the theoretical insights about the representation learning function g , which remains elusive for previous multi-source transfer theories such as ( Wang et al. , 2019a ; Mansour et al. , 2020 ; Konstantinov & Lampert , 2019 ; Li et al. , 2019a ; Peng et al. , 2019 ) . | In this paper, the authors focus on the label shift problem in multi-source transfer learning and derive new generic principles to control the target generalization risk. They propose a framework that unifies the principles of conditional feature alignment, label distribution ratio estimation, and domain relation weights estimation. A WADN algorithm is proposed for 3 multi-source label shift transfer scenarios: learning with limited target data, unsupervised DA, and label partial unsupervised DA. The proposed WADN algorithm is validated on different scenarios on common benchmark datasets (Digits, HomeOffice, Amazon Review), and results indicate that it can outperform related SOTA methods for these scenarios. | SP:b93dae908d1cdefa8097c5c96e4829fe157b4073 |
Unified Principles For Multi-Source Transfer Learning Under Label Shifts | 1 INTRODUCTION . Transfer learning ( Pan & Yang , 2009 ) is based on the motivation that learning a new task is easier after having learned several similar tasks . By learning the inductive bias from a set of related source domains ( S1 , . . . , ST ) and then leveraging the shared knowledge upon learning the target domain T , the prediction performance can be significantly improved . Based on this , transfer learning arises in deep learning applications such as computer vision ( Zhang et al. , 2019 ; Tan et al. , 2018 ; Hoffman et al. , 2018b ) , natural language processing ( Ruder et al. , 2019 ; Houlsby et al. , 2019 ) and biomedical engineering ( Raghu et al. , 2019 ; Lundervold & Lundervold , 2019 ; Zhang & An , 2017 ) . To ensure a reliable transfer , it is critical to understand the theoretical assumptions between the domains . One implicit assumption in most transfer learning algorithms is that the label proportions remain unchanged across different domains ( Du Plessis & Sugiyama , 2014 ) ( i.e. , S ( y ) = T ( y ) ) . However , in many real-world applications , the label distributions can vary markedly ( i.e . label shift ) ( Wen et al. , 2014 ; Lipton et al. , 2018 ; Li et al. , 2019b ) , in which existing approaches can not guarantee a small target generalization error , which is recently proved by Combes et al . ( 2020 ) . Moreover , transfer learning becomes more challenging when transferring knowledge from multiple sources to build a model for the target domain , as this requires an effective selection and leveraging the most useful source domains when label shift occurs . This is not only theoretically interesting but also commonly encountered in real-world applications . For example , in medical diagnostics , the disease distribution changes over countries ( Liu et al. , 2004 ; Geiss et al. , 2014 ) . Considering the task of diagnosing a disease in a country without sufficient data , how can we leverage the information from different countries with abundant data to help the diagnosing ? Obviously , naı̈vely combining all the sources and applying one-to-one single source transfer learning algorithm can lead to undesired results , as it can include low quality or even untrusted data from certain sources , which can severely influence the performance . In this paper , we study the label shift problem in multi-source transfer learning where St ( y ) 6= T ( y ) . We propose unified principles that are applicable for three common transfer scenarios : unsupervised Domain Adaptation ( DA ) ( Ben-David et al. , 2010 ) , limited target labels ( Mansour et al. , 2020 ) and partial unsupervised DA with supp ( T ( y ) ) ⊆ supp ( St ( y ) ) ( Cao et al. , 2018 ) , where prior works generally treated them as separate scenario . It should be noted that this work deals with target shift without assuming that semantic conditional distributions are identical ( i.e. , St ( x|y ) 6= T ( x|y ) ) , which is more realistic for real-world problems . Our contributions in this paper are two-folds : ( I ) We propose to use Wasserstein distance ( Arjovsky et al. , 2017 ) to develop a new target generalization risk upper bound ( Theorem 1 ) , which reveals the importance of label distribution ratio estimation and provides a principled guideline to learn the domain relation coefficients . Moreover , we provide a theoretical analysis in the context of representation learning ( Theorem 2 ) , which guides to learn a feature function that minimizes the conditional Wasserstein distance as well as controls the weighted source risk . We further reveal the relations in the aforementioned three scenarios lie in the different assumptions for estimating label distribution ratio . ( II ) Inspired by the theoretical results , we propose Wasserstein Aggregation Domain Network ( WADN ) for handling label-shift in multi-source transfer learning . We evaluate our algorithm on three benchmark datasets , and the results show that our algorithm can significantly outperform stateof-the-art principled approaches . 2 RELATED WORK . Multi-Source Transfer Learning Theories have been investigated in the previous literature with different principles to aggregate source domains . In the popular unsupervised DA , ( Zhao et al. , 2018 ; Peng et al. , 2019 ; Wen et al. , 2020 ; Li et al. , 2018b ) adoptedH-divergence ( Ben-David et al. , 2007 ) , discrepancy ( Mansour et al. , 2009 ) and Wasserstein distance ( Arjovsky et al. , 2017 ) of marginal distribution d ( St ( x ) , T ( x ) ) to estimate domain relations and dynamically leveraged different domains . These algorithms generally consists source risk , domain discrepancy and an un-observable term η , the optimal risk on all the domains , which are ignored in these approaches . However , as Combes et al . ( 2020 ) pointed out , ignoring the influence of η will be problematic when label distributions between source and target domains are significantly different . Therefore it is necessary to take η into consideration by using a small amount of labelled data is available for the target domain ( Wen et al. , 2020 ) . Following this line , very recent works ( Konstantinov & Lampert , 2019 ; Wang et al. , 2019a ; Mansour et al. , 2020 ) started to consider measure the divergence between two domains given label information for the target domain by using Y-discrepancy ( Mohri & Medina , 2012 ) . However , we empirically showed these methods are still unable to handle label shift . Label-Shift Label-Shift ( Zhang et al. , 2013 ; Gong et al. , 2016 ) is a common phenomena in the transfer learning with S ( y ) 6= T ( y ) and generally ignored by the previous multi-source transfer learning practice . Several theoretical principled approaches have been proposed such as ( Azizzadenesheli et al. , 2019 ; Garg et al. , 2020 ) . In addition , ( Combes et al. , 2020 ; Wu et al. , 2019 ) analyzed the generalized label shift problem in the one-to-one single unsupervised DA problem but did not provide guidelines of levering different sources to ensure a reliable transfer , which is more challenging . ( Redko et al. , 2019 ) proposed optimal transport strategy for the multiple unsupervised DA under label shift by assuming identical semantic conditional distribution . However they did not consider representation learning in conjunction with their framework and did not design neural network based approaches . Different from these , we analyzed our problem in the context of representation learning and propose an efficient and principled strategies . Moreover , our theoretical results highlights the importance of label shift problem in a variety of multi-source transfer problem . While the aforementioned work generally focus on the unsupervised DA problem , without considering unified rules for different scenarios ( e.g . partial multi-source DA ) . 3 THEORETICAL INSIGHTS : TRANSFER RISK UPPER BOUND . We assume a scoring hypothesis defined on the input space X and output space Y with h : X ×Y → R , is K-Lipschitz w.r.t . the feature x ( given the same label ) , i.e . for ∀y , ‖h ( x1 , y ) − h ( x2 , y ) ‖2 ≤ K‖x1 − x2‖2 , and the loss function ` : R × R → R+ is positive , L-Lipschitz and upper bounded by Lmax . We denote the expected risk w.r.t distribution D : RD ( h ) = E ( x , y ) ∼D ` ( h ( x , y ) ) and its empirical counterpart ( w.r.t . D̂ ) R̂D ( h ) = ∑ ( x , y ) ∈D̂ ` ( h ( x , y ) ) . We adopted Wasserstein-1 distance ( Arjovsky et al. , 2017 ) as a metric to measure the similarity of the domains . Compared with other divergences , Wasserstein distance has been theoretically proved tighter than TV distance ( Gong et al. , 2016 ) or Jensen-Shnannon divergence ( Combes et al. , 2020 ) . Based on previous work , the label shift is generally handled by label-distribution ratio weighted loss : RαS ( h ) = E ( x , y ) ∼Sα ( y ) ` ( h ( x , y ) ) with α ( y ) = T ( y ) /S ( y ) . We also denote α̂t as its empirical counterpart , estimated from samples . Besides , to measure the task relations , we define a simplex λ with λ [ t ] ≥ 0 , ∑T t=1 λ [ t ] = 1 as the task relation coefficient vector by assigning high weight to the similar task . Then we first present Theorem 1 , which proposed theoretical insights about how to combine source domains through properly estimating λ. Theorem 1 . Let { Ŝt = { ( xi , yi ) } NSt i=1 } Tt=1 and T̂ = { ( xi , yi ) } NT i=1 , respectively be T source and target i.i.d . samples . For ∀h ∈ H with H the hypothesis family and ∀λ , with high probability ≥ 1− 4δ , the target risk can be upper bounded by : RT ( h ) ≤ ∑ t λ [ t ] R̂α̂tSt ( h ) + LK ∑ t λ [ t ] Ey∼T̂ ( y ) W1 ( T̂ ( x|Y = y ) ‖Ŝt ( x|Y = y ) ) + Lmaxd sup ∞ √√√√ T∑ t=1 λ [ t ] 2 βt √ log ( 1/δ ) 2N + Lmax sup t ‖αt − α̂t‖2 + Comp ( NS1 , . . . , NST , NT , δ ) , where N = ∑T t=1NSt and βt = NSt/N and d sup ∞ = maxt∈ [ 1 , T ] , y∈ [ 1 , Y ] αt ( y ) the maximum true label distribution ratio value . W1 ( ·‖· ) is the Wasserstein-1 distance with L2-distance as cost function . Comp ( NS1 , . . . , NST , NT , δ ) is a function that decreases with larger NS1 , . . . , NT , given a fixed δ and hypothesis familyH . ( See Appendix E for details ) Remarks ( 1 ) In the first two terms , the relation coefficient λ is controlled by αt-weighted loss R̂α̂tSt ( h ) and conditional Wasserstein distance Ey∼T̂ ( y ) W1 ( T̂ ( x|Y = y ) ‖Ŝt ( x|Y = y ) ) . To minimize the upper bound , we need to assign a higher λ [ t ] to the source t with a smaller weighted prediction loss and a smaller weighted semantic conditional Wasserstein distance . Intuitively , we tend to leverage the source task which is semantic similar to the target and easier to learn . ( 2 ) If each source have equal observations with βt = 1 , then the third term will become ‖λ‖2 , a L2 norm regularization , which can be viewed as an encouragement of uniformly leveraging all the sources . Combing these three terms , we need to consider the trade-off between assigning a higher λ [ t ] to the source t that has a smaller weighted prediction loss and conditional Wasserstein distance , and assigning balanced λ [ t ] for avoiding concentrating on only one source . ( 3 ) ‖α̂t − αt‖2 indicates the gap between ground-truth and empirical label ratio . Therefore if we can estimate a good α̂t , these terms can be small . In the practice , If target labels are available , α̂t can be computed from the observed data and α̂t → αt . If target labels are absent ( unsupervised DA ) , we need to design methods and to properly estimate α̂t ( Sec . 4 ) . ( 4 ) Comp ( NS1 , . . . , NST , NT , δ ) is a function that reflects the convergence behavior , which decreases with larger observation numbers . If we fixH , δ , N and NT , this term can be viewed as a constant . Insights in Representation Learning Apart from Theorem 1 , we propose a novel theoretical analysis in the context of representation learning , which motivates practical guidelines in the deep learning regime . We define a stochastic feature function g and we denote its conditional distribution w.r.t . latent variable Z ( induced by g ) as S ( z|Y = y ) = ∫ x g ( z|x ) S ( x|Y = y ) dx . Then we have : Theorem 2 . We assume the settings of loss , the hypothesis are the same with Theorem 1 . We further denote the stochastic feature learning function g : X → Z , and the hypothesis h : Z × Y → R. Then ∀λ , the target risk is upper bounded by : RT ( h , g ) ≤ ∑ t λ [ t ] RαtSt ( h , g ) + LK ∑ t λ [ t ] Ey∼T ( y ) W1 ( St ( z|Y = y ) ‖T ( z|Y = y ) ) , where RT ( h , g ) = E ( x , y ) ∼T ( x , y ) Ez∼g ( z|x ) ` ( h ( z , y ) ) . Theorem 2 reveal that to control the upper bound , we need to learn g that minimizes the weighted conditional Wasserstein distance and learn ( g , h ) that minimizes the weighted source risk . Comparison with previous Theorems . Our theory proposed an alternative prospective to understand transfer learning . The first term is α-weighted loss . And it will recover the typical source loss minimization if there is no label shift with αt ( y ) ≡ 1 ( Li et al. , 2019a ; Peng et al. , 2019 ; Zhao et al. , 2018 ; Wen et al. , 2020 ) . Beside , minimizing the conditional Wasserstein distances has been shown to be advantageous , compared with W1 ( St ( z ) ‖T ( z ) ) ( Long et al. , 2018 ) . Moreover , Theorem 2 explicitly proposed the theoretical insights about the representation learning function g , which remains elusive for previous multi-source transfer theories such as ( Wang et al. , 2019a ; Mansour et al. , 2020 ; Konstantinov & Lampert , 2019 ; Li et al. , 2019a ; Peng et al. , 2019 ) . | This paper aims to provide a unified principle for multi-source transfer learning under label shifts. Based on this principle, this paper claims that a unified algorithm is proposed for various multi-source label shift transfer scenarios: learning with limited target data, unsupervised domain adaptation and label partial unsupervised domain adaptation. The proposed algorithm is validated on three benchmark datasets. The proof seems correct via combining existing single-domain DA theory and the theory regarding Wasserstein distance. The main theorem (Theorem 1) assumes that we can get the label information in the target domain, which is not realistic in many DA problem settings (e.g., UDA or multi-source UDA in this paper). In many DA problem settings, we have to use pseudo labels to replace with true labels in the target domain, which should be analysed in the proposed theorem. However, this paper does not make any efforts to theoretically analyse the effect of pseudo labels, which results in that this paper has very limited impacts on the DA field. Besides, there are some misleading conclusions in this paper. | SP:b93dae908d1cdefa8097c5c96e4829fe157b4073 |
Expectigrad: Fast Stochastic Optimization with Robust Convergence Properties | 1 INTRODUCTION . Efficiently training deep neural networks has proven crucial for achieving state-of-the-art results in machine learning ( e.g . Krizhevsky et al. , 2012 ; Graves et al. , 2013 ; Karpathy et al. , 2014 ; Mnih et al. , 2015 ; Silver et al. , 2016 ; Vaswani et al. , 2017 ; Radford et al. , 2019 ; Schrittwieser et al. , 2019 ; Vinyals et al. , 2019 ) . At the core of these successes lies the backpropagation algorithm ( Rumelhart et al. , 1986 ) , which provides a general procedure for computing the gradient of a loss measure with respect to the parameters of an arbitrary network . Because exact gradient computation over an entire dataset is expensive , training is often conducted using randomly sampled minibatches of data instead.1 Consequently , training can be modeled as a stochastic optimization problem where the loss is minimized in expectation . A natural algorithmic choice for this type of optimization problem is Stochastic Gradient Descent ( SGD ) ( Robbins & Monro , 1951 ) due to its relatively cheap computational cost and its reliable convergence when the learning rate is appropriately annealed . A major drawback of SGD is that its convergence rate is highly dependent on the condition number of the loss function ( Boyd & Vandenberghe , 2004 ) . Ill-conditioned loss functions are nearly inevitable in deep learning due to the high-dimensional nature of the models ; pathological features such as plateaus , sharp nonlinearities , and saddle points become increasingly probable as the number of model parameters grows—all of which can interfere with learning ( Pascanu et al. , 2013 ; Dauphin et al. , 2014 ; Goodfellow et al. , 2016 ; Goh , 2017 ) . Enhancements to SGD such as momentum ( Polyak , 1964 ) and Nesterov momentum ( Nesterov , 1983 ; Sutskever et al. , 2013 ) can help , but they still largely suffer from the same major shortcoming : namely , any particular choice of hyperparameters typically does not generalize well to a variety of different network topologies , and therefore costly hyperparameter searches must be conducted . This problem has motivated significant research into adaptive methods for deep learning , which dynamically modify learning rates on a per-component basis with the goal of accelerating learning without tuning hyperparameters . AdaGrad ( Duchi et al. , 2011 ) was an early success in this area that ( in its simplest form ) divides each step by a running sum of gradient magnitudes , but this can cause its empirical performance to degrade noticeably in the presence of dense gradients . Later methods such as ADADELTA ( Zeiler , 2012 ) , RMSProp ( Tieleman & Hinton , 2012 ) , and Adam ( Kingma & Ba , 2014 ) remedied this by instead normalizing stepsizes by an exponential moving average ( EMA ) . 1Training on small minibatches can also improve generalization ( Wilson & Martinez , 2003 ) . Such methods are able to increase their learning rates after encountering regions of small gradients and have enjoyed widespread adoption due to their consistent empirical performance . Unfortunately , the EMA has recently been shown to cause divergence on a certain convex optimization problem ( Reddi et al. , 2019 ) that we refer to as the Reddi Problem . This finding has severe implications because it points to an underlying flaw shared by the most widely used adaptive methods . Recent attempts to resolve this EMA-divergence issue have been unsatisfying . Proposed methods invariably begin with Adam , and then apply a minor adjustment aimed at suppressing divergence . Specifically , they either suddenly or gradually transition from Adam to SGD during training ( Keskar & Socher , 2017 ; Luo et al. , 2019 ) , or clip certain quantities in the Adam update rule to limit the EMA ’ s sensitivity ( Zaheer et al. , 2018 ; Reddi et al. , 2019 ) . While these methods technically do prevent divergence on the Reddi Problem , they fail to address the fundamental issue that the EMA can be unreliable , and they do not advance our theoretical understanding of alternatives that are inherently robust to divergence . Furthermore , by intentionally reducing the responsiveness of Adam , these modifications do not always translate into better empirical performance for problems of practical interest—yet they come at the expense of increased complexity . The principal objective of this work is to therefore develop a novel adaptive method that provides stronger convergence guarantees than EMA-based methods while retaining fast learning speed . Towards this , we propose the Expectigrad algorithm , which introduces two major innovations : ( 1 ) normalization by the arithmetic mean instead of the EMA , and ( 2 ) “ outer momentum ” in which bias-corrected momentum is applied jointly to the numerator and denominator . Expectigrad provably converges on all instances of the Reddi Problem that causes Adam to diverge , and minimizes the function significantly faster than related methods using the same hyperparameters . We also derive a regret bound for Expectigrad that establishes a convergence rate comparable to the best known rate for Adam . Our bounds also indicate that Expectigrad is less susceptible to noisy gradients . Finally , we test Expectigrad by training various neural network architectures with millions of learnable parameters ; we show that it consistently outperforms Adam and is competitive with other state-of-the-art methods . 2 PRELIMINARIES . We begin with some notational remarks . We always typeset vectors x , y in boldface to avoid confusion with scalars x , y . We represent the j-th component of vector xi as xi , j . The Euclidean norm is denoted by ‖x‖ and the inner product is denoted by 〈x , y〉 . All arithmetic operations can be assumed to be element-wise : e.g . x± y for addition and subtraction , xy for multiplication , x/y for division , xa for exponentiation by a scalar , √ x for square root , and so on . We now consider the optimization setting that is the focus of this paper . Let l : Rd × Rm 7→ R be a ( nonconvex ) function that we seek to ( locally ) minimize in expectation over some distribution P on Ξ ⊂ Rm . Precisely , we must locate a point x∗ ∈ Rd with the property ∇f ( x∗ ) = 0 , where f ( x ) : = E [ l ( x , ξ ) ] . All expectations in our work are implicitly taken over ξ ∼ P ( Ξ ) . Direct computation of∇f ( x ) is assumed to be infeasible , but repeated calculation of∇l ( x , ξ ) is permitted . We also assume that l has the following properties : Assumption 1. l is bounded below . Assumption 2. l is Lipschitz continuous : |l ( x , ξ ) − l ( y , ξ ) | ≤ L‖x− y‖ , ∀x , y ∈ Rd , ∀ξ ∈ Ξ . Assumption 3. l is Lipschitz smooth : ‖∇l ( x , ξ ) −∇l ( y , ξ ) ‖ ≤ L‖x− y‖ , ∀x , y ∈ Rd , ∀ξ ∈ Ξ . Assumption 1 guarantees the existence of a well-defined set of minima ( Nocedal & Wright , 2006 ) . While Assumptions 2 and 3 need not share the same Lipschitz constant L > 0 in general , we assume that L is sufficiently large to satisfy both criteria simultaneously . These conditions are often met in practice , making our assumptions amenable to the deep learning setting that is the focus of this paper.2 In Appendix B , we prove three lemmas from Assumptions 2 and 3 that are necessary for our later theorems . With these results , we are ready to present Expectigrad in the following section . 3 ALGORITHM . Our motivation for Expectigrad comes from the observation that successful adaptive methods are normalized by an EMA of past gradient magnitudes . This normalization process serves two important 2We note that the commonly used ReLU activation is unfortunately not Lipschitz smooth , but smooth approximations such as the softplus function ( Dugas et al. , 2001 ) can be substituted . This limitation is not specific to our work but affects convergence results for all first-order methods , including SGD . Algorithm 1 Expectigrad Select learning rate α > 0 . Default : α = 10−3 Select momentum constant β ∈ [ 0 , 1 ) . Default : β = 0.9 Select denominator constant > 0 . Default : = 10−8 Initialize parameters x0 ∈ Rd arbitrarily Initialize running sum s0 ← 0 · x0 Initialize running counter n0 ← 0 · x0 Initialize momentum m0 ← 0 · x0 for t = 1 , 2 , . . . , T do Compute gradient estimate : gt ← ∇l ( xt−1 , ξt ) with ξt ∼ P ( Ξ ) Update running sum : st ← st−1 + g2t Update running counter : nt ← nt−1 + sign ( g2t ) Update momentum : mt ← βmt−1 + ( 1− β ) gt + √ st/nt . Define 00 = 0 Update parameters : xt ← xt−1 − α1−βtmt end for return xT benefits . First , stepsizes become scale invariant ; the numerator and denominator are equally affected when the objective function is multiplied by a constant , meaning a particular choice of learning rate is more likely to work well for a wide array of tasks . Second , dividing by the recent gradient magnitude acts as a preconditioner , making the loss function more amenable to first-order optimization . One possible explanation for this is that dividing by the EMA—insofar as it estimates the ( diagonal ) Fisher information matrix for a log-likelihood function—acts as an approximation to natural gradient descent ( Amari , 1997 ; Pascanu & Bengio , 2013 ; Kingma & Ba , 2014 ) . A more recent hypothesis is that the EMA equalizes the stochastic gradient noise ( Balles & Hennig , 2017 ) , and that this isotropic noise is beneficial for escaping saddle points ( Staib et al. , 2019 ) . These properties help explain why EMA-based adaptive methods like RMSProp and Adam are successful on a variety of machine learning problems with relatively little hyperparameter tuning . Nevertheless , the EMA itself has been shown to cause divergence on the Reddi Problem—a synthetic online optimization problem proposed by Reddi et al . ( 2019 ) . The rapidly decaying nature of the EMA reduces the influence of large yet infrequent gradients , which can cause the optimization to progress in an arbitrarily poor direction . Various related works have proposed to clip terms in the Adam update rule to induce convergence on the Reddi Problem ; we discuss them in Section 4.1 . We argue that the approach of constraining EMA-based methods like Adam in an effort to force convergence is counterproductive . Doing so not only risks impacting performance , but it also points to a lack of theoretical understanding . While limiting the adaptation of the EMA may prevent divergence on the Reddi Problem , it does not address the root cause of divergence itself . We are instead interested in algorithms that are automatically robust to rare , high-magnitude gradients that are characteristic of the Reddi Problem . We begin our search by considering the following update rule in which stepsizes are normalized by an arithmetic mean of all gradient samples up to the current timestep t : xt ← xt−1 − α · gt + √ 1 t ∑t k=1 g 2 k ( 1 ) Here , α > 0 is the learning rate and > 0 is a positive constant that prevents division by zero . Crucially , this update retains the scale-invariance property of EMA-based methods discussed at the beginning of this section : multiplying the gradient by a scalar does not affect the stepsizes ( assuming is small ) . Furthermore , the denominator becomes less responsive to new gradients as training proceeds , but never becomes completely static . This is precisely the behavior we want for a method that balances empirical speed with theoretical convergence . To improve the performance of the algorithm , we will want to make some modifications to ( 1 ) . First , note that the explicit summation is unnecessary . If we store the sum st at each time t , then we can efficiently compute it from the previous sum : st ← st−1 + g2t . Second , observe that dividing by t to compute the mean could be problematic when gradients are very sparse—commonly the case when using Rectified Linear Unit ( ReLU ) activations ( Nair & Hinton , 2010 ) . Consider what happens when a component of the gradient is zero for a very long time : as t increments unconditionally , the ratio stt approaches zero . When a nonzero component is suddenly encountered , the algorithm will take a large—and potentially catastrophic—step along that dimension . We can mitigate this by introducing an auxiliary variable nt that counts the number of nonzero gradients that have occurred . Note that we can concisely update nt−1 by simply adding the element-wise sign of the squared gradient : nt ← nt−1 + sign ( g2t ) . Putting these two changes together ( and defining 00 = 0 ) , xt ← xt−1 − α · gt + √ st nt ( 2 ) This new algorithm tracks a per-component arithmetic mean where each component may have a distinct number of counts , thereby ignoring sparsity in the optimization problem . Thus , with some additional memory , we have made the update highly efficient and less prone to numerically instability . Finally , we can also apply momentum to help accelerate learning when the gradient signal is weak . Traditionally , momentum is first applied to the gradient estimator , and then is scaled by the adaptive method ( e.g . Adam ) . In our work , we propose to reverse the order by computing the adaptive steps first and then applying momentum to them . This is important to satisfy the superposition principle : the momentum step “ scheduled ” at the current timestep is not re-scaled by future changes in the denominator . Letting β ∈ [ 0 , 1 ) be the momentum constant , we arrive at our final update : xt ← xt−1 − α 1− βt mt where mt = βmt−1 + ( 1− β ) gt + √ st nt ( 3 ) We call this “ outer ” momentum as it applies to the entire update rule and not just the numerator . The coefficient 1/ ( 1−βt ) is a bias-corrective factor introduced by Kingma & Ba ( 2014 ) . We refer to ( 3 ) as Expectigrad and formally present it in Algorithm 1 . While we have only intuitively justified our design choices so far , we will spend the next few sections rigorously analyzing their theoretical and empirical implications . | This paper proposes Expectigrad, which is a new optimizer for nonconvex optimization. The main idea is to consider arithmetic mean of squared gradients instead of exponential moving average and to use a normalization factor that takes into account the number of nonzeros observed during the run of the algorithm, for each component. The algorithm is analyzed for solving smooth nonconvex optimization and its practical performance is investigated. | SP:9c00384d154224a1d849aa254aab6eec214a75d9 |
Expectigrad: Fast Stochastic Optimization with Robust Convergence Properties | 1 INTRODUCTION . Efficiently training deep neural networks has proven crucial for achieving state-of-the-art results in machine learning ( e.g . Krizhevsky et al. , 2012 ; Graves et al. , 2013 ; Karpathy et al. , 2014 ; Mnih et al. , 2015 ; Silver et al. , 2016 ; Vaswani et al. , 2017 ; Radford et al. , 2019 ; Schrittwieser et al. , 2019 ; Vinyals et al. , 2019 ) . At the core of these successes lies the backpropagation algorithm ( Rumelhart et al. , 1986 ) , which provides a general procedure for computing the gradient of a loss measure with respect to the parameters of an arbitrary network . Because exact gradient computation over an entire dataset is expensive , training is often conducted using randomly sampled minibatches of data instead.1 Consequently , training can be modeled as a stochastic optimization problem where the loss is minimized in expectation . A natural algorithmic choice for this type of optimization problem is Stochastic Gradient Descent ( SGD ) ( Robbins & Monro , 1951 ) due to its relatively cheap computational cost and its reliable convergence when the learning rate is appropriately annealed . A major drawback of SGD is that its convergence rate is highly dependent on the condition number of the loss function ( Boyd & Vandenberghe , 2004 ) . Ill-conditioned loss functions are nearly inevitable in deep learning due to the high-dimensional nature of the models ; pathological features such as plateaus , sharp nonlinearities , and saddle points become increasingly probable as the number of model parameters grows—all of which can interfere with learning ( Pascanu et al. , 2013 ; Dauphin et al. , 2014 ; Goodfellow et al. , 2016 ; Goh , 2017 ) . Enhancements to SGD such as momentum ( Polyak , 1964 ) and Nesterov momentum ( Nesterov , 1983 ; Sutskever et al. , 2013 ) can help , but they still largely suffer from the same major shortcoming : namely , any particular choice of hyperparameters typically does not generalize well to a variety of different network topologies , and therefore costly hyperparameter searches must be conducted . This problem has motivated significant research into adaptive methods for deep learning , which dynamically modify learning rates on a per-component basis with the goal of accelerating learning without tuning hyperparameters . AdaGrad ( Duchi et al. , 2011 ) was an early success in this area that ( in its simplest form ) divides each step by a running sum of gradient magnitudes , but this can cause its empirical performance to degrade noticeably in the presence of dense gradients . Later methods such as ADADELTA ( Zeiler , 2012 ) , RMSProp ( Tieleman & Hinton , 2012 ) , and Adam ( Kingma & Ba , 2014 ) remedied this by instead normalizing stepsizes by an exponential moving average ( EMA ) . 1Training on small minibatches can also improve generalization ( Wilson & Martinez , 2003 ) . Such methods are able to increase their learning rates after encountering regions of small gradients and have enjoyed widespread adoption due to their consistent empirical performance . Unfortunately , the EMA has recently been shown to cause divergence on a certain convex optimization problem ( Reddi et al. , 2019 ) that we refer to as the Reddi Problem . This finding has severe implications because it points to an underlying flaw shared by the most widely used adaptive methods . Recent attempts to resolve this EMA-divergence issue have been unsatisfying . Proposed methods invariably begin with Adam , and then apply a minor adjustment aimed at suppressing divergence . Specifically , they either suddenly or gradually transition from Adam to SGD during training ( Keskar & Socher , 2017 ; Luo et al. , 2019 ) , or clip certain quantities in the Adam update rule to limit the EMA ’ s sensitivity ( Zaheer et al. , 2018 ; Reddi et al. , 2019 ) . While these methods technically do prevent divergence on the Reddi Problem , they fail to address the fundamental issue that the EMA can be unreliable , and they do not advance our theoretical understanding of alternatives that are inherently robust to divergence . Furthermore , by intentionally reducing the responsiveness of Adam , these modifications do not always translate into better empirical performance for problems of practical interest—yet they come at the expense of increased complexity . The principal objective of this work is to therefore develop a novel adaptive method that provides stronger convergence guarantees than EMA-based methods while retaining fast learning speed . Towards this , we propose the Expectigrad algorithm , which introduces two major innovations : ( 1 ) normalization by the arithmetic mean instead of the EMA , and ( 2 ) “ outer momentum ” in which bias-corrected momentum is applied jointly to the numerator and denominator . Expectigrad provably converges on all instances of the Reddi Problem that causes Adam to diverge , and minimizes the function significantly faster than related methods using the same hyperparameters . We also derive a regret bound for Expectigrad that establishes a convergence rate comparable to the best known rate for Adam . Our bounds also indicate that Expectigrad is less susceptible to noisy gradients . Finally , we test Expectigrad by training various neural network architectures with millions of learnable parameters ; we show that it consistently outperforms Adam and is competitive with other state-of-the-art methods . 2 PRELIMINARIES . We begin with some notational remarks . We always typeset vectors x , y in boldface to avoid confusion with scalars x , y . We represent the j-th component of vector xi as xi , j . The Euclidean norm is denoted by ‖x‖ and the inner product is denoted by 〈x , y〉 . All arithmetic operations can be assumed to be element-wise : e.g . x± y for addition and subtraction , xy for multiplication , x/y for division , xa for exponentiation by a scalar , √ x for square root , and so on . We now consider the optimization setting that is the focus of this paper . Let l : Rd × Rm 7→ R be a ( nonconvex ) function that we seek to ( locally ) minimize in expectation over some distribution P on Ξ ⊂ Rm . Precisely , we must locate a point x∗ ∈ Rd with the property ∇f ( x∗ ) = 0 , where f ( x ) : = E [ l ( x , ξ ) ] . All expectations in our work are implicitly taken over ξ ∼ P ( Ξ ) . Direct computation of∇f ( x ) is assumed to be infeasible , but repeated calculation of∇l ( x , ξ ) is permitted . We also assume that l has the following properties : Assumption 1. l is bounded below . Assumption 2. l is Lipschitz continuous : |l ( x , ξ ) − l ( y , ξ ) | ≤ L‖x− y‖ , ∀x , y ∈ Rd , ∀ξ ∈ Ξ . Assumption 3. l is Lipschitz smooth : ‖∇l ( x , ξ ) −∇l ( y , ξ ) ‖ ≤ L‖x− y‖ , ∀x , y ∈ Rd , ∀ξ ∈ Ξ . Assumption 1 guarantees the existence of a well-defined set of minima ( Nocedal & Wright , 2006 ) . While Assumptions 2 and 3 need not share the same Lipschitz constant L > 0 in general , we assume that L is sufficiently large to satisfy both criteria simultaneously . These conditions are often met in practice , making our assumptions amenable to the deep learning setting that is the focus of this paper.2 In Appendix B , we prove three lemmas from Assumptions 2 and 3 that are necessary for our later theorems . With these results , we are ready to present Expectigrad in the following section . 3 ALGORITHM . Our motivation for Expectigrad comes from the observation that successful adaptive methods are normalized by an EMA of past gradient magnitudes . This normalization process serves two important 2We note that the commonly used ReLU activation is unfortunately not Lipschitz smooth , but smooth approximations such as the softplus function ( Dugas et al. , 2001 ) can be substituted . This limitation is not specific to our work but affects convergence results for all first-order methods , including SGD . Algorithm 1 Expectigrad Select learning rate α > 0 . Default : α = 10−3 Select momentum constant β ∈ [ 0 , 1 ) . Default : β = 0.9 Select denominator constant > 0 . Default : = 10−8 Initialize parameters x0 ∈ Rd arbitrarily Initialize running sum s0 ← 0 · x0 Initialize running counter n0 ← 0 · x0 Initialize momentum m0 ← 0 · x0 for t = 1 , 2 , . . . , T do Compute gradient estimate : gt ← ∇l ( xt−1 , ξt ) with ξt ∼ P ( Ξ ) Update running sum : st ← st−1 + g2t Update running counter : nt ← nt−1 + sign ( g2t ) Update momentum : mt ← βmt−1 + ( 1− β ) gt + √ st/nt . Define 00 = 0 Update parameters : xt ← xt−1 − α1−βtmt end for return xT benefits . First , stepsizes become scale invariant ; the numerator and denominator are equally affected when the objective function is multiplied by a constant , meaning a particular choice of learning rate is more likely to work well for a wide array of tasks . Second , dividing by the recent gradient magnitude acts as a preconditioner , making the loss function more amenable to first-order optimization . One possible explanation for this is that dividing by the EMA—insofar as it estimates the ( diagonal ) Fisher information matrix for a log-likelihood function—acts as an approximation to natural gradient descent ( Amari , 1997 ; Pascanu & Bengio , 2013 ; Kingma & Ba , 2014 ) . A more recent hypothesis is that the EMA equalizes the stochastic gradient noise ( Balles & Hennig , 2017 ) , and that this isotropic noise is beneficial for escaping saddle points ( Staib et al. , 2019 ) . These properties help explain why EMA-based adaptive methods like RMSProp and Adam are successful on a variety of machine learning problems with relatively little hyperparameter tuning . Nevertheless , the EMA itself has been shown to cause divergence on the Reddi Problem—a synthetic online optimization problem proposed by Reddi et al . ( 2019 ) . The rapidly decaying nature of the EMA reduces the influence of large yet infrequent gradients , which can cause the optimization to progress in an arbitrarily poor direction . Various related works have proposed to clip terms in the Adam update rule to induce convergence on the Reddi Problem ; we discuss them in Section 4.1 . We argue that the approach of constraining EMA-based methods like Adam in an effort to force convergence is counterproductive . Doing so not only risks impacting performance , but it also points to a lack of theoretical understanding . While limiting the adaptation of the EMA may prevent divergence on the Reddi Problem , it does not address the root cause of divergence itself . We are instead interested in algorithms that are automatically robust to rare , high-magnitude gradients that are characteristic of the Reddi Problem . We begin our search by considering the following update rule in which stepsizes are normalized by an arithmetic mean of all gradient samples up to the current timestep t : xt ← xt−1 − α · gt + √ 1 t ∑t k=1 g 2 k ( 1 ) Here , α > 0 is the learning rate and > 0 is a positive constant that prevents division by zero . Crucially , this update retains the scale-invariance property of EMA-based methods discussed at the beginning of this section : multiplying the gradient by a scalar does not affect the stepsizes ( assuming is small ) . Furthermore , the denominator becomes less responsive to new gradients as training proceeds , but never becomes completely static . This is precisely the behavior we want for a method that balances empirical speed with theoretical convergence . To improve the performance of the algorithm , we will want to make some modifications to ( 1 ) . First , note that the explicit summation is unnecessary . If we store the sum st at each time t , then we can efficiently compute it from the previous sum : st ← st−1 + g2t . Second , observe that dividing by t to compute the mean could be problematic when gradients are very sparse—commonly the case when using Rectified Linear Unit ( ReLU ) activations ( Nair & Hinton , 2010 ) . Consider what happens when a component of the gradient is zero for a very long time : as t increments unconditionally , the ratio stt approaches zero . When a nonzero component is suddenly encountered , the algorithm will take a large—and potentially catastrophic—step along that dimension . We can mitigate this by introducing an auxiliary variable nt that counts the number of nonzero gradients that have occurred . Note that we can concisely update nt−1 by simply adding the element-wise sign of the squared gradient : nt ← nt−1 + sign ( g2t ) . Putting these two changes together ( and defining 00 = 0 ) , xt ← xt−1 − α · gt + √ st nt ( 2 ) This new algorithm tracks a per-component arithmetic mean where each component may have a distinct number of counts , thereby ignoring sparsity in the optimization problem . Thus , with some additional memory , we have made the update highly efficient and less prone to numerically instability . Finally , we can also apply momentum to help accelerate learning when the gradient signal is weak . Traditionally , momentum is first applied to the gradient estimator , and then is scaled by the adaptive method ( e.g . Adam ) . In our work , we propose to reverse the order by computing the adaptive steps first and then applying momentum to them . This is important to satisfy the superposition principle : the momentum step “ scheduled ” at the current timestep is not re-scaled by future changes in the denominator . Letting β ∈ [ 0 , 1 ) be the momentum constant , we arrive at our final update : xt ← xt−1 − α 1− βt mt where mt = βmt−1 + ( 1− β ) gt + √ st nt ( 3 ) We call this “ outer ” momentum as it applies to the entire update rule and not just the numerator . The coefficient 1/ ( 1−βt ) is a bias-corrective factor introduced by Kingma & Ba ( 2014 ) . We refer to ( 3 ) as Expectigrad and formally present it in Algorithm 1 . While we have only intuitively justified our design choices so far , we will spend the next few sections rigorously analyzing their theoretical and empirical implications . | This paper proposes the Expectigrad algorithm that normalizes the exponential moving average (EMA) of first moments on the fly. This avoids normalizing historical gradients by future gradients. The normalization factor is an unweighted average, instead of an EMA, of the historical second moments. For the special case where the EMA constant of the first moment is zero, the paper shows that Expectigrad converges to the optimum on the online convex problems proposed by Reddi et al. (2018) for which the vanilla ADAM fails to converge. For general stochastic smooth convex problems with bounded stochastic gradients, the paper shows that the convergence rate of mini-batch Expectigrad is $O(1 / \sqrt{T} + 1 / b)$ where $b$ is the mini-batch size. | SP:9c00384d154224a1d849aa254aab6eec214a75d9 |
Diverse Video Generation using a Gaussian Process Trigger | 1 INTRODUCTION . Humans are often able to imagine multiple possible ways that the scene can change over time . Modeling and generating diverse futures is an incredibly challenging problem . The challenge stems from the inherent multi-modality of the task , i.e. , given a sequence of past frames , there can be multiple possible outcomes of the future frames . For example , given the image of a “ person holding a cup ” in Figure . 1 , most would predict that the next few frames correspond to either the action “ drinking from the cup ” or “ keeping the cup on the table. ” This challenge is exacerbated by the lack of real training data with diverse outputs – all real-world training videos come with a single real future and no “ other ” potential futures . Similar looking past frames can have completely different futures ( e.g. , Figure . 1 ) . In the absence of any priors or explicit supervision , the current methods struggle with modeling this diversity . Given similar looking past frames , with different futures in the training data , variational methods , which commonly utilize ( Kingma & Welling , 2013 ) , tend to average the results to better match to all different futures ( Denton & Fergus , 2018 ; Babaeizadeh et al. , 2017 ; Gao et al. , 2018 ; Lee et al. , 2018 ; Oliu et al. , 2017 ) . We hypothesize that explicit modeling of future diversity is essential for high-quality , diverse future frame generation . In this paper , we model the diversity of the future states , given past context , using Gaussian Processes ( GP ) ( Rasmussen , 2006 ) , which have several desirable properties . They learn a prior on potential future given past context , in a Bayesian formulation . This allows us to update the distribution of possible futures as more context frames are provided as evidence and maintain a list of potential futures ( underlying functions in GP ) . Finally , our formulation provides an interesting property that is crucial to generating future frames – the ability to estimate when to generate a diverse output vs. continue an on-going action , and a way to control the predicted futures . In particular , we utilize the variance of the GP at any specific time step as an indicator of whether an action sequence is on-going or finished . An illustration of this mechanism is presented in Figure . 2 . When we observe a frame ( say at time t ) that can have several possible futures , the variance of the GP model is high ( Figure . 2 ( left ) ) . Different functions represent potential action sequences that can be generated , starting from this particular frame . Once we select the next frame ( at t+2 ) , the GP variance of the future states is relatively low ( Figure . 2 ( center ) ) , indicating that an action sequence Potential Future 1 Potential Future 2 Person Holding Cup Person Keeping Cup on the Table Person Drinking from the Cup Past Figure 1 : Given “ person holding cup , ” humans can often predict multiple possible futures ( e.g. , “ drinking from the cup ” or “ keeping the cup on the table. ” ) . is on-going , and the model should continue it as opposed to trying to sample a diverse sample . After the completion of the on-going sequence , the GP variance over potential future states becomes high again . This implies that we can continue this action ( i.e. , pick the mean function represented by the black line in Figure . 2 ( center ) ) or try and sample a potentially diverse sample ( i.e. , one of the functions that contributes to high-variance ) . This illustrates how we can use GP to decide when to trigger diverse actions . An example of using GP trigger is shown in Figure . 2 ( right ) , where after every few frames , we trigger a different action . Now that we have a good way to model diversity , the next step is to generate future frames . Even after tremendous advances in the field of generative models for image synthesis ( Denton & Fergus , 2018 ; Babaeizadeh et al. , 2017 ; Lee et al. , 2018 ; Vondrick & Torralba , 2017 ; Lu et al. , 2017 ; Vondrick et al. , 2016 ; Saito et al. , 2017 ; Tulyakov et al. , 2018 ; Hu & Wang , 2019 ) , the task of generating future frames ( not necessarily diverse ) conditioned on past frames is still hard . As opposed to independent images , the future frames need to obey potential video dynamics that might be on-going in the past frames , follow world knowledge ( e.g. , how humans and objects interact ) , etc .. We utilize a fairly straightforward process to generate future frames , which utilizes two modules : a frame auto-encoder and a dynamics encoder . The frame auto-encoder learns to encode a frame in a latent representation and utilizes it to generate the original frame back . The dynamics encoder learns to model dynamics between past and future frames . We learn two independent dynamics encoders : an LSTM encoder , utilized to model on-going actions and the GP encoder ( similar to ( Srivastava et al. , 2015 ) ) , and a GP encoder , utilized to model transitions to new actions . The variance of this GP encoder can be used as a trigger to decide when to sample new actions . We train this framework end-to-end . We first provide an overview of GP formulation and scalable training techniques in §3 , and then describe our approach in §4 . Comprehensively evaluating diverse future frames generation is still an open research problem . Following recent state-of-the-art , we will evaluate different aspects of the approach independently . The quality of generated frames is quantified using image synthesis/reconstruction per-frame metrics : SSIM ( Wang et al. , 2019 ; Sampat et al. , 2009 ) , PSNR , and LPIPS ( Zhang et al. , 2018 ; Dosovitskiy & Brox , 2016 ; Johnson et al. , 2016 ) . The temporal coherence and quality of a short video clip ( 16 neighboring frames ) are jointly evaluated using the FVD ( Unterthiner et al. , 2018 ) metric . However , high-quality , temporarily coherent frame synthesis does not evaluate diversity in predicted frames . Therefore , to evaluate diversity , since there are no multiple ground-truth futures , we propose an alternative evaluation strategy , inspired by ( Villegas et al. , 2017b ) : utilizing action classifiers to evaluate whether an action switch has occurred or not . A change in action indicates that the method was able to sample a diverse future . Together , these metrics can evaluate if an approach can generate multiple high-quality frames that temporally coherent and diverse . Details of these metrics and baselines , and extensive quantitative and qualitative results are provided in §5 . To summarize , our contributions are : ( a ) modeling the diversity of future states using a GP , which maintains priors on future states given the past frames using a Bayesian formulation ( b ) leveraging the changing GP distribution over time ( given new observed evidence ) to estimate when an on-going action sequence completes and using GP variance to control the triggering of a diverse future state . This results in state-of-the-art results on future frame generation . We also quantify the diversity of the generated sequences using action classifiers as a proxy metric . 2 RELATED WORK . Understanding and predicting the future , given the observed past , is a fundamental problem in video understanding . The future states are inherently multi-modal and capturing their diversity finds direct applications in many safety-critical applications ( e.g. , autonomous vehicles ) , where it is critical to model different future modes . Earlier techniques for future prediction ( Yuen & Torralba , 2010 ; Walker et al. , 2014 ) relied on searching for matches of past frames in a given dataset and transferring the future states from these matches . However , the predictions were limited to symbolic trajectories or retrieved future frames . Given the modeling capabilities of deep representations , the field of future frame prediction tremendous progress in recent years . One of the first works on video generation ( Srivastava et al. , 2015 ) used a multi-layer LSTM network to learn representations of video sequences in a deterministic way . Since then , a wide range of papers ( Oliu et al. , 2017 ; Cricri et al. , 2016 ; Villegas et al. , 2017a ; Elsayed et al. , 2019 ; Villegas et al. , 2019 ; Wang et al. , 2019 ; Castrejón et al. , 2019 ) have built models that try to incorporate stochasticity of future states . Generally , this stochasticity lacks diverse high-level semantic actions . Recently , several video generation models have utilized generative models , like variational autoencoders ( VAEs ) ( Kingma & Welling , 2013 ) and generative adversarial networks ( GANs ) ( Goodfellow et al. , 2014 ) , for this task . One of the first works by Xue et al . ( 2016 ) utilized a conditional VAE ( cVAE ) formulation to learn video dynamics . Similar to our approach , their goal was to model the frame prediction problem in a probabilistic way and synthesizing many possible future frames from a single image . Since then , several works have utilized the cVAE for future generation ( Babaeizadeh et al. , 2017 ; Denton & Fergus , 2018 ) . The major drawback of using the cVAE approach is that its objective function marginalizes over the multi-modal future , limiting the diversity in the generated samples ( Bhattacharyya et al. , 2018 ) . GAN-based models are another important class of synthesis models used for future frame prediction or video generation ( Vondrick & Torralba , 2017 ; Lu et al. , 2017 ; Vondrick et al. , 2016 ; Saito et al. , 2017 ; Tulyakov et al. , 2018 ; Hu & Wang , 2019 ) . However , these models are very susceptible to mode collapse ( Salimans et al. , 2016 ) , i.e. , the model outputs only one or a few modes instead of generating a wide range of diverse output . The problem of mode collapse is quite severe for conditional settings , as demonstrated by ( Isola et al. , 2016 ; Zhu et al. , 2017 ; Mathieu et al. , 2015 ) . This problem is worse in the case of diverse future frame generation due to the inherent multi-modality of the output space and lack of training data . Another class of popular video generation models is hierarchical prediction ( Walker et al. , 2017 ; Villegas et al. , 2017b ; Wichers et al. , 2018 ; Cai et al. , 2018 ) . These models decompose the problems into two steps . They first predict a high-level structure of a video , like a human pose , and then leverage that structure to make predictions at the pixel level . These models generally require additional annotation for the high-level structure for training . Unlike these approaches , Our approach explicitly focuses on learning the distribution of diverse futures using a GP prior on the future states using a Bayesian formulation . Moreover , such GP approaches have been used in the past for modeling the human dynamics as demonstrated by ( Wang et al. , 2008 ; Hardy et al. , 2014 ; Moon & Pavlovic , 2008 ) . However , due to the scalability issues in GP , these models were limited to handling low dimensional data , like human pose , lane switching , path planning , etc . To the best of our knowledge , ours is the first approach that can process video sequences to predict when an on-going action sequence completes and control the generation of a diverse state . | The authors propose to use a Gaussian Process (GP) to model the uncertainty of future frames in a video prediction setup. In particular, they employ a GP to model the uncertainty of the next step latent in a latent variable model. This allows them to use the GP variance to decide when to change an "action sequence", corresponding to a deterministic dynamics function implemented using an LSTM. | SP:d92978dc1a820c8d0a8eb39a3129b4e3132cafa1 |
Diverse Video Generation using a Gaussian Process Trigger | 1 INTRODUCTION . Humans are often able to imagine multiple possible ways that the scene can change over time . Modeling and generating diverse futures is an incredibly challenging problem . The challenge stems from the inherent multi-modality of the task , i.e. , given a sequence of past frames , there can be multiple possible outcomes of the future frames . For example , given the image of a “ person holding a cup ” in Figure . 1 , most would predict that the next few frames correspond to either the action “ drinking from the cup ” or “ keeping the cup on the table. ” This challenge is exacerbated by the lack of real training data with diverse outputs – all real-world training videos come with a single real future and no “ other ” potential futures . Similar looking past frames can have completely different futures ( e.g. , Figure . 1 ) . In the absence of any priors or explicit supervision , the current methods struggle with modeling this diversity . Given similar looking past frames , with different futures in the training data , variational methods , which commonly utilize ( Kingma & Welling , 2013 ) , tend to average the results to better match to all different futures ( Denton & Fergus , 2018 ; Babaeizadeh et al. , 2017 ; Gao et al. , 2018 ; Lee et al. , 2018 ; Oliu et al. , 2017 ) . We hypothesize that explicit modeling of future diversity is essential for high-quality , diverse future frame generation . In this paper , we model the diversity of the future states , given past context , using Gaussian Processes ( GP ) ( Rasmussen , 2006 ) , which have several desirable properties . They learn a prior on potential future given past context , in a Bayesian formulation . This allows us to update the distribution of possible futures as more context frames are provided as evidence and maintain a list of potential futures ( underlying functions in GP ) . Finally , our formulation provides an interesting property that is crucial to generating future frames – the ability to estimate when to generate a diverse output vs. continue an on-going action , and a way to control the predicted futures . In particular , we utilize the variance of the GP at any specific time step as an indicator of whether an action sequence is on-going or finished . An illustration of this mechanism is presented in Figure . 2 . When we observe a frame ( say at time t ) that can have several possible futures , the variance of the GP model is high ( Figure . 2 ( left ) ) . Different functions represent potential action sequences that can be generated , starting from this particular frame . Once we select the next frame ( at t+2 ) , the GP variance of the future states is relatively low ( Figure . 2 ( center ) ) , indicating that an action sequence Potential Future 1 Potential Future 2 Person Holding Cup Person Keeping Cup on the Table Person Drinking from the Cup Past Figure 1 : Given “ person holding cup , ” humans can often predict multiple possible futures ( e.g. , “ drinking from the cup ” or “ keeping the cup on the table. ” ) . is on-going , and the model should continue it as opposed to trying to sample a diverse sample . After the completion of the on-going sequence , the GP variance over potential future states becomes high again . This implies that we can continue this action ( i.e. , pick the mean function represented by the black line in Figure . 2 ( center ) ) or try and sample a potentially diverse sample ( i.e. , one of the functions that contributes to high-variance ) . This illustrates how we can use GP to decide when to trigger diverse actions . An example of using GP trigger is shown in Figure . 2 ( right ) , where after every few frames , we trigger a different action . Now that we have a good way to model diversity , the next step is to generate future frames . Even after tremendous advances in the field of generative models for image synthesis ( Denton & Fergus , 2018 ; Babaeizadeh et al. , 2017 ; Lee et al. , 2018 ; Vondrick & Torralba , 2017 ; Lu et al. , 2017 ; Vondrick et al. , 2016 ; Saito et al. , 2017 ; Tulyakov et al. , 2018 ; Hu & Wang , 2019 ) , the task of generating future frames ( not necessarily diverse ) conditioned on past frames is still hard . As opposed to independent images , the future frames need to obey potential video dynamics that might be on-going in the past frames , follow world knowledge ( e.g. , how humans and objects interact ) , etc .. We utilize a fairly straightforward process to generate future frames , which utilizes two modules : a frame auto-encoder and a dynamics encoder . The frame auto-encoder learns to encode a frame in a latent representation and utilizes it to generate the original frame back . The dynamics encoder learns to model dynamics between past and future frames . We learn two independent dynamics encoders : an LSTM encoder , utilized to model on-going actions and the GP encoder ( similar to ( Srivastava et al. , 2015 ) ) , and a GP encoder , utilized to model transitions to new actions . The variance of this GP encoder can be used as a trigger to decide when to sample new actions . We train this framework end-to-end . We first provide an overview of GP formulation and scalable training techniques in §3 , and then describe our approach in §4 . Comprehensively evaluating diverse future frames generation is still an open research problem . Following recent state-of-the-art , we will evaluate different aspects of the approach independently . The quality of generated frames is quantified using image synthesis/reconstruction per-frame metrics : SSIM ( Wang et al. , 2019 ; Sampat et al. , 2009 ) , PSNR , and LPIPS ( Zhang et al. , 2018 ; Dosovitskiy & Brox , 2016 ; Johnson et al. , 2016 ) . The temporal coherence and quality of a short video clip ( 16 neighboring frames ) are jointly evaluated using the FVD ( Unterthiner et al. , 2018 ) metric . However , high-quality , temporarily coherent frame synthesis does not evaluate diversity in predicted frames . Therefore , to evaluate diversity , since there are no multiple ground-truth futures , we propose an alternative evaluation strategy , inspired by ( Villegas et al. , 2017b ) : utilizing action classifiers to evaluate whether an action switch has occurred or not . A change in action indicates that the method was able to sample a diverse future . Together , these metrics can evaluate if an approach can generate multiple high-quality frames that temporally coherent and diverse . Details of these metrics and baselines , and extensive quantitative and qualitative results are provided in §5 . To summarize , our contributions are : ( a ) modeling the diversity of future states using a GP , which maintains priors on future states given the past frames using a Bayesian formulation ( b ) leveraging the changing GP distribution over time ( given new observed evidence ) to estimate when an on-going action sequence completes and using GP variance to control the triggering of a diverse future state . This results in state-of-the-art results on future frame generation . We also quantify the diversity of the generated sequences using action classifiers as a proxy metric . 2 RELATED WORK . Understanding and predicting the future , given the observed past , is a fundamental problem in video understanding . The future states are inherently multi-modal and capturing their diversity finds direct applications in many safety-critical applications ( e.g. , autonomous vehicles ) , where it is critical to model different future modes . Earlier techniques for future prediction ( Yuen & Torralba , 2010 ; Walker et al. , 2014 ) relied on searching for matches of past frames in a given dataset and transferring the future states from these matches . However , the predictions were limited to symbolic trajectories or retrieved future frames . Given the modeling capabilities of deep representations , the field of future frame prediction tremendous progress in recent years . One of the first works on video generation ( Srivastava et al. , 2015 ) used a multi-layer LSTM network to learn representations of video sequences in a deterministic way . Since then , a wide range of papers ( Oliu et al. , 2017 ; Cricri et al. , 2016 ; Villegas et al. , 2017a ; Elsayed et al. , 2019 ; Villegas et al. , 2019 ; Wang et al. , 2019 ; Castrejón et al. , 2019 ) have built models that try to incorporate stochasticity of future states . Generally , this stochasticity lacks diverse high-level semantic actions . Recently , several video generation models have utilized generative models , like variational autoencoders ( VAEs ) ( Kingma & Welling , 2013 ) and generative adversarial networks ( GANs ) ( Goodfellow et al. , 2014 ) , for this task . One of the first works by Xue et al . ( 2016 ) utilized a conditional VAE ( cVAE ) formulation to learn video dynamics . Similar to our approach , their goal was to model the frame prediction problem in a probabilistic way and synthesizing many possible future frames from a single image . Since then , several works have utilized the cVAE for future generation ( Babaeizadeh et al. , 2017 ; Denton & Fergus , 2018 ) . The major drawback of using the cVAE approach is that its objective function marginalizes over the multi-modal future , limiting the diversity in the generated samples ( Bhattacharyya et al. , 2018 ) . GAN-based models are another important class of synthesis models used for future frame prediction or video generation ( Vondrick & Torralba , 2017 ; Lu et al. , 2017 ; Vondrick et al. , 2016 ; Saito et al. , 2017 ; Tulyakov et al. , 2018 ; Hu & Wang , 2019 ) . However , these models are very susceptible to mode collapse ( Salimans et al. , 2016 ) , i.e. , the model outputs only one or a few modes instead of generating a wide range of diverse output . The problem of mode collapse is quite severe for conditional settings , as demonstrated by ( Isola et al. , 2016 ; Zhu et al. , 2017 ; Mathieu et al. , 2015 ) . This problem is worse in the case of diverse future frame generation due to the inherent multi-modality of the output space and lack of training data . Another class of popular video generation models is hierarchical prediction ( Walker et al. , 2017 ; Villegas et al. , 2017b ; Wichers et al. , 2018 ; Cai et al. , 2018 ) . These models decompose the problems into two steps . They first predict a high-level structure of a video , like a human pose , and then leverage that structure to make predictions at the pixel level . These models generally require additional annotation for the high-level structure for training . Unlike these approaches , Our approach explicitly focuses on learning the distribution of diverse futures using a GP prior on the future states using a Bayesian formulation . Moreover , such GP approaches have been used in the past for modeling the human dynamics as demonstrated by ( Wang et al. , 2008 ; Hardy et al. , 2014 ; Moon & Pavlovic , 2008 ) . However , due to the scalability issues in GP , these models were limited to handling low dimensional data , like human pose , lane switching , path planning , etc . To the best of our knowledge , ours is the first approach that can process video sequences to predict when an on-going action sequence completes and control the generation of a diverse state . | This paper proposes a future frame prediction framework where the video generation can transition between different actions using a Gaussian process trigger. The framework consists of three components: an encoder which encodes the frame to a latent code, an LSTM which predicts the next latent code given the current one, and a Gaussian process which samples a new latent code. The framework can decide whether to switch to the next action by adopting the new latent code, depending on the number of frames passed or the variance of Gaussian. | SP:d92978dc1a820c8d0a8eb39a3129b4e3132cafa1 |
Adaptive and Generative Zero-Shot Learning | We address the problem of generalized zero-shot learning ( GZSL ) where the task is to predict the class label of a target image whether its label belongs to the seen or unseen category . Similar to ZSL , the learning setting assumes that all class-level semantic features are given , while only the images of seen classes are available for training . By exploring the correlation between image features and the corresponding semantic features , the main idea of the proposed approach is to enrich the semantic-to-visual ( S2V ) embeddings via a seamless fusion of adaptive and generative learning . To this end , we extend the semantic features of each class by supplementing image-adaptive attention so that the learned S2V embedding can account for not only inter-class but also intra-class variations . In addition , to break the limit of training with images only from seen classes , we design a generative scheme to simultaneously generate virtual class labels and their visual features by sampling and interpolating over seen counterparts . In inference , a testing image will give rise to two different S2V embeddings , seen and virtual . The former is used to decide whether the underlying label is of the unseen category or otherwise a specific seen class ; the latter is to predict an unseen class label . To demonstrate the effectiveness of our method , we report state-of-the-art results on four standard GZSL datasets , including an ablation study of the proposed modules . 1 INTRODUCTION . Different from conventional learning tasks , zero-shot learning ( ZSL ) by Lampert et al . ( 2009 ) ; Palatucci et al . ( 2009 ) ; Akata et al . ( 2013 ) explores the extreme case of performing inference only over samples of unseen classes . To make the scenario more realistic , generalized zero-shot learning ( GZSL ) ( Chao et al. , 2016 ; Xian et al. , 2017 ) is subsequently proposed so that inference can concern samples of both seen and unseen classes . Nevertheless . the learning setting in ZSL/GZSL is essentially the same where sample classes are divided into two categories , seen and unseen , but only those samples of seen classes are accessible to training . In addition , each of all the classes under consideration is characterized by semantic features such as attributes ( Xian et al. , 2018b ) or text descriptions ( Zhu et al. , 2018 ) to specify and relate seen and unseen classes . The lack of training samples from unseen classes has prompted generative approaches ( Chen et al. , 2018 ; Felix et al. , 2018 ; Kumar Verma et al. , 2018 ; Mishra et al. , 2018 ) to creating synthetic data from semantic features of unseen classes . The strategy could enable learning semantic-visual alignment on unseen classes implicitly , and thus improves the ability to classify unseen classes . However , such generative models are indeed trained on seen samples , and the quality of synthesized unseen samples is predominantly influenced by seen classes . If the number of training samples of each seen class is small , it is hard for generative models to adequately synthesize samples of unseen classes , leading to unsatisfactory zero-shot learning . To better address the issue , we propose to synthesize visual and semantic features of virtual classes rather than those of the unseen classes . An interesting analogy is that childhood experience and relevant study ( Greene , 1995 ) suggest the behavior of using human imagination to produce new object concepts could assist our cognitive capability . To mimic people utilizing imagination for exploring new knowledge , we create virtual classes by the integration of past ” experience ” ( seen classes ) . In detail , we extend the mixup technique by Zhang et al . ( 2018 ) to generate virtual classes , with a subtle difference that mixing is conducted on the semantic features ( in addition to the visual ones ) , instead of the class label vectors . In ZSL/GZSL , each seen or unseen class is typically described by a single semantic feature vector . The practice is useful in differentiating different classes in a principled way , but may not be sufficient to reflect the inter-class and intra-class visual discrepancies , not to mention the ambiguities caused by different backgrounds , view orientations , or occlusion in images . The concern of inefficient class-level representation can also be observed from how the semantic feature vectors are constructed . Take , for example , the Attribute Pascal and Yahoo ( aPY ) dataset ( Farhadi et al. , 2009 ) , where each instance is annotated by 64 attributes . The semantic features of each class in aPY are obtained by averaging the attribute vectors of all its instances . We are thus motivated to introduce an imageadaptive class representation , integrating the original semantic features for inter-class discrimination with an image-specific attention vector for intra-class variations . With the addition of virtual training data and the image-adaptive class representation , our method is designed to learn two classification experts : one for seen classes and the other for unseen classes . Both experts project the image-adaptive semantic feature vectors to the visual space and use cosine similarity to find the class label most similar to the given visual feature vector . The seen expert is trained with the provided training ( seen ) data , while the class prediction is over all possible classes , including seen and unseen . In inference , if its predicted class is not within the seen category . The testing sample is deemed to be from the unseen category , whose label is then decided by the unseen expert . The unseen expert is trained with the virtual data only , and the process indeed resembles meta-learning . However , the effectiveness of meta-learning is boosted by the design of the imageadaptive mechanism in that fine-tuning is not needed in performing zero-shot classification over unseen classes . We characterize the main contributions of this work as follows . • Instead of generating synthetic data of unseen classes , we propose to yield virtual classes and data by mixup interpolations . The virtual classes of synthetic data can then be seamlessly coupled with meta-learning to improve the inference on unseen testing samples . • We introduce the concept of representing each class with image-adaptive semantic features that could vary among intra-class samples . While the adaptive mechanism improves classifying the seen classes , it manifests the advantage in boosting the effect of meta-learning over virtual data to zero-shot inference over unseen classes . • We demonstrate state-of-the-art results of zero-shot learning over four popular benchmark datasets and justify the design of our method with a thorough ablation study . 2 RELATED WORK . We review relevant literature in this section . First , we describe generative approaches for ZSL/GZSL that synthesize unseen images for training . To improve GZSL performance , we propose to couple virtual class generation with meta-learning for mimicking the inference scenario . Next , we discuss attention approaches that extract discriminating features from images to help classification . 2.1 GENERATIVE APPROACHES FOR ZSL/GZSL . Arguably one of the most important problems in ZSL/GZSL is to prevent models from being biased to seen classes . Generative approaches ( Chen et al. , 2018 ; Felix et al. , 2018 ; Kumar Verma et al. , 2018 ; Mishra et al. , 2018 ; Schonfeld et al. , 2019 ; Paul et al. , 2019 ; Xian et al. , 2019 ) tackle the problem by synthesizing visual features of unseen classes from their semantic features with generative models like Generative Adversarial Networks ( GAN ; Goodfellow et al. , 2014 ) or Variational Autoencoders ( VAE ) ( VAE ; Kingma & Welling , 2014 ) . The synthetic visual features act as pseudo-examples of unseen classes , and effectively reduce the ZSL/GZSL problem to a supervised learning one . One key issue behind generative approaches comes from the insufficient amount of data to learn a good generative model . As a consequence , some semantic features that seem important during training may cause overfitting , and others that seem less important may be completely dropped . Therefore , several prior techniques propose new constraints or losses to preserve semantic features and regularize the generative model . For instance , ( Chen et al. , 2018 ) avoids the dropping of semantic information by disentangling the semantic space into two subspaces , one for classification and the other for reconstruction ; Felix et al . ( 2018 ) enforces visual-semantic feature consistency by requiring synthesized visual features to reconstruct semantic features accurately . However , even with the new constraints or losses , the success of generative approaches still highly depends on whether there is enough data/variation in the seen classes to synthesize diverse visual features . Otherwise , the yielded features will be too close to those few seen classes and can not help ZSL/GZSL much . For example , in AWA2 dataset ( Xian et al. , 2018a ) , the unseen samples of “ rat ” are easily misclassified as seen classes of “ mouse ” or “ hamster ” because synthetic visual features for “ rat ” are doomed to be confused with seen visual features of those similar classes . The phenomenon inspires us to generate synthetic visual features for not only the given unseen classes but also the virtual unseen classes . These virtual classes provide a wider spectrum of support for unseen scenarios to improve ZSL/GZSL performance . Our other focal effort is to connect the concept of meta-learning ( Vinyals et al. , 2016 ; Finn et al. , 2017 ) with virtual classes in the training phase of the unseen expert . The most closely related approaches in ZSL are Li et al . ( 2019b ) ; Yu et al . ( 2020 ) ; Verma et al . ( 2020 ) ; Sung et al . ( 2018 ) ; Hu et al . ( 2018 ) . Verma et al . ( 2020 ) combines meta-learning and generative models to conquer limits in generative models . Li et al . ( 2019b ) mimics the inference scenario by randomly selecting seen classes as ” fake ” new classes in each episode . Yu et al . ( 2020 ) randomly splits seen classes into two sets to train and refine the model . In contrast , we simulate the ZSL inference scenario in each episode by creating virtual classes from seen classes using mixup . Owing to the training scenario more resembling the inference setting in ZSL , our model achieves better S2V embedding on unseen classes and obtains state-of-the-art ZSL performance on most datasets . Besides , Sung et al . ( 2018 ) learns a deep distance metric to classify samples . Hu et al . ( 2018 ) utilizes the correction module to assist classification . On the contrary , our model does not need to learn complex relationship between classes and additional assistant module to achieve good performance . 2.2 ATTENTION . Attention mechanism is widely used in ZSL ( Ji et al. , 2018 ; Xie et al. , 2019 ; Huynh & Elhamifar , 2020 ; Min et al. , 2020 ; Liu et al. , 2019 ) . Highlighting important local features and reducing noisy feature influence generate a more effective mapping between visual and semantic domains . Ji et al . ( 2018 ) proposes S2GA which utilizes semantic features to emphasize most informative visual local features . ( Xie et al. , 2019 ) employs AREN and ACSE to focus on the most important region in images . Huynh & Elhamifar ( 2020 ) applies dense attribute-attention to find the most discriminating image parts and embed them to semantic features individually . DVBE ( Min et al. , 2020 ) utilizes spatial and channel attention to maximize inter-class margin . While the attention to visual features is proved useful by the above-mentioned research efforts , relatively few attempts assess the importance of attention on semantic features . In the ZSL setting , each class contains only one semantic feature vector such that intra-class variations are neglected from the single semantic representation . For example , the object of interest can be occluded partly in the image or in the front of different backgrounds , and a unique class-wise semantic feature vector is hard to reflect such variances . Thus , attention to semantic features is worth further exploring in ZSL . Along this line , the most relevant work to ours is LFGAA ( Liu et al. , 2019 ) , which considers semantic prediction of samples . Different from LFGAA , our method puts attention on discriminating dimensions of semantic features and maps them to the visual domain . The effect of the proposed attention mechanism is to attract the visual representation of ground-truth class and repel others . Besides , our other main difference from LFGAA is the shortcut design in the attention model . We add a shortcut to prevent the model from overfitting on training data and retain discriminating dimensions for unseen class classification . | The authors proposed an interesting method for zero-shot learning. In particular, the authors adopted an attention mechanism from the input feature in the semantic to visual mapping, to introduce intra-class variations in the visual space. They also propose a process to synthesize "fake" class representations such that a classifier for unseen classes can be trained. Combining these two the authors demonstrated significant results on benchmark zero-shot learning datasets. | SP:1164e721c240bb98c36386b627d10626a63c1f94 |
Adaptive and Generative Zero-Shot Learning | We address the problem of generalized zero-shot learning ( GZSL ) where the task is to predict the class label of a target image whether its label belongs to the seen or unseen category . Similar to ZSL , the learning setting assumes that all class-level semantic features are given , while only the images of seen classes are available for training . By exploring the correlation between image features and the corresponding semantic features , the main idea of the proposed approach is to enrich the semantic-to-visual ( S2V ) embeddings via a seamless fusion of adaptive and generative learning . To this end , we extend the semantic features of each class by supplementing image-adaptive attention so that the learned S2V embedding can account for not only inter-class but also intra-class variations . In addition , to break the limit of training with images only from seen classes , we design a generative scheme to simultaneously generate virtual class labels and their visual features by sampling and interpolating over seen counterparts . In inference , a testing image will give rise to two different S2V embeddings , seen and virtual . The former is used to decide whether the underlying label is of the unseen category or otherwise a specific seen class ; the latter is to predict an unseen class label . To demonstrate the effectiveness of our method , we report state-of-the-art results on four standard GZSL datasets , including an ablation study of the proposed modules . 1 INTRODUCTION . Different from conventional learning tasks , zero-shot learning ( ZSL ) by Lampert et al . ( 2009 ) ; Palatucci et al . ( 2009 ) ; Akata et al . ( 2013 ) explores the extreme case of performing inference only over samples of unseen classes . To make the scenario more realistic , generalized zero-shot learning ( GZSL ) ( Chao et al. , 2016 ; Xian et al. , 2017 ) is subsequently proposed so that inference can concern samples of both seen and unseen classes . Nevertheless . the learning setting in ZSL/GZSL is essentially the same where sample classes are divided into two categories , seen and unseen , but only those samples of seen classes are accessible to training . In addition , each of all the classes under consideration is characterized by semantic features such as attributes ( Xian et al. , 2018b ) or text descriptions ( Zhu et al. , 2018 ) to specify and relate seen and unseen classes . The lack of training samples from unseen classes has prompted generative approaches ( Chen et al. , 2018 ; Felix et al. , 2018 ; Kumar Verma et al. , 2018 ; Mishra et al. , 2018 ) to creating synthetic data from semantic features of unseen classes . The strategy could enable learning semantic-visual alignment on unseen classes implicitly , and thus improves the ability to classify unseen classes . However , such generative models are indeed trained on seen samples , and the quality of synthesized unseen samples is predominantly influenced by seen classes . If the number of training samples of each seen class is small , it is hard for generative models to adequately synthesize samples of unseen classes , leading to unsatisfactory zero-shot learning . To better address the issue , we propose to synthesize visual and semantic features of virtual classes rather than those of the unseen classes . An interesting analogy is that childhood experience and relevant study ( Greene , 1995 ) suggest the behavior of using human imagination to produce new object concepts could assist our cognitive capability . To mimic people utilizing imagination for exploring new knowledge , we create virtual classes by the integration of past ” experience ” ( seen classes ) . In detail , we extend the mixup technique by Zhang et al . ( 2018 ) to generate virtual classes , with a subtle difference that mixing is conducted on the semantic features ( in addition to the visual ones ) , instead of the class label vectors . In ZSL/GZSL , each seen or unseen class is typically described by a single semantic feature vector . The practice is useful in differentiating different classes in a principled way , but may not be sufficient to reflect the inter-class and intra-class visual discrepancies , not to mention the ambiguities caused by different backgrounds , view orientations , or occlusion in images . The concern of inefficient class-level representation can also be observed from how the semantic feature vectors are constructed . Take , for example , the Attribute Pascal and Yahoo ( aPY ) dataset ( Farhadi et al. , 2009 ) , where each instance is annotated by 64 attributes . The semantic features of each class in aPY are obtained by averaging the attribute vectors of all its instances . We are thus motivated to introduce an imageadaptive class representation , integrating the original semantic features for inter-class discrimination with an image-specific attention vector for intra-class variations . With the addition of virtual training data and the image-adaptive class representation , our method is designed to learn two classification experts : one for seen classes and the other for unseen classes . Both experts project the image-adaptive semantic feature vectors to the visual space and use cosine similarity to find the class label most similar to the given visual feature vector . The seen expert is trained with the provided training ( seen ) data , while the class prediction is over all possible classes , including seen and unseen . In inference , if its predicted class is not within the seen category . The testing sample is deemed to be from the unseen category , whose label is then decided by the unseen expert . The unseen expert is trained with the virtual data only , and the process indeed resembles meta-learning . However , the effectiveness of meta-learning is boosted by the design of the imageadaptive mechanism in that fine-tuning is not needed in performing zero-shot classification over unseen classes . We characterize the main contributions of this work as follows . • Instead of generating synthetic data of unseen classes , we propose to yield virtual classes and data by mixup interpolations . The virtual classes of synthetic data can then be seamlessly coupled with meta-learning to improve the inference on unseen testing samples . • We introduce the concept of representing each class with image-adaptive semantic features that could vary among intra-class samples . While the adaptive mechanism improves classifying the seen classes , it manifests the advantage in boosting the effect of meta-learning over virtual data to zero-shot inference over unseen classes . • We demonstrate state-of-the-art results of zero-shot learning over four popular benchmark datasets and justify the design of our method with a thorough ablation study . 2 RELATED WORK . We review relevant literature in this section . First , we describe generative approaches for ZSL/GZSL that synthesize unseen images for training . To improve GZSL performance , we propose to couple virtual class generation with meta-learning for mimicking the inference scenario . Next , we discuss attention approaches that extract discriminating features from images to help classification . 2.1 GENERATIVE APPROACHES FOR ZSL/GZSL . Arguably one of the most important problems in ZSL/GZSL is to prevent models from being biased to seen classes . Generative approaches ( Chen et al. , 2018 ; Felix et al. , 2018 ; Kumar Verma et al. , 2018 ; Mishra et al. , 2018 ; Schonfeld et al. , 2019 ; Paul et al. , 2019 ; Xian et al. , 2019 ) tackle the problem by synthesizing visual features of unseen classes from their semantic features with generative models like Generative Adversarial Networks ( GAN ; Goodfellow et al. , 2014 ) or Variational Autoencoders ( VAE ) ( VAE ; Kingma & Welling , 2014 ) . The synthetic visual features act as pseudo-examples of unseen classes , and effectively reduce the ZSL/GZSL problem to a supervised learning one . One key issue behind generative approaches comes from the insufficient amount of data to learn a good generative model . As a consequence , some semantic features that seem important during training may cause overfitting , and others that seem less important may be completely dropped . Therefore , several prior techniques propose new constraints or losses to preserve semantic features and regularize the generative model . For instance , ( Chen et al. , 2018 ) avoids the dropping of semantic information by disentangling the semantic space into two subspaces , one for classification and the other for reconstruction ; Felix et al . ( 2018 ) enforces visual-semantic feature consistency by requiring synthesized visual features to reconstruct semantic features accurately . However , even with the new constraints or losses , the success of generative approaches still highly depends on whether there is enough data/variation in the seen classes to synthesize diverse visual features . Otherwise , the yielded features will be too close to those few seen classes and can not help ZSL/GZSL much . For example , in AWA2 dataset ( Xian et al. , 2018a ) , the unseen samples of “ rat ” are easily misclassified as seen classes of “ mouse ” or “ hamster ” because synthetic visual features for “ rat ” are doomed to be confused with seen visual features of those similar classes . The phenomenon inspires us to generate synthetic visual features for not only the given unseen classes but also the virtual unseen classes . These virtual classes provide a wider spectrum of support for unseen scenarios to improve ZSL/GZSL performance . Our other focal effort is to connect the concept of meta-learning ( Vinyals et al. , 2016 ; Finn et al. , 2017 ) with virtual classes in the training phase of the unseen expert . The most closely related approaches in ZSL are Li et al . ( 2019b ) ; Yu et al . ( 2020 ) ; Verma et al . ( 2020 ) ; Sung et al . ( 2018 ) ; Hu et al . ( 2018 ) . Verma et al . ( 2020 ) combines meta-learning and generative models to conquer limits in generative models . Li et al . ( 2019b ) mimics the inference scenario by randomly selecting seen classes as ” fake ” new classes in each episode . Yu et al . ( 2020 ) randomly splits seen classes into two sets to train and refine the model . In contrast , we simulate the ZSL inference scenario in each episode by creating virtual classes from seen classes using mixup . Owing to the training scenario more resembling the inference setting in ZSL , our model achieves better S2V embedding on unseen classes and obtains state-of-the-art ZSL performance on most datasets . Besides , Sung et al . ( 2018 ) learns a deep distance metric to classify samples . Hu et al . ( 2018 ) utilizes the correction module to assist classification . On the contrary , our model does not need to learn complex relationship between classes and additional assistant module to achieve good performance . 2.2 ATTENTION . Attention mechanism is widely used in ZSL ( Ji et al. , 2018 ; Xie et al. , 2019 ; Huynh & Elhamifar , 2020 ; Min et al. , 2020 ; Liu et al. , 2019 ) . Highlighting important local features and reducing noisy feature influence generate a more effective mapping between visual and semantic domains . Ji et al . ( 2018 ) proposes S2GA which utilizes semantic features to emphasize most informative visual local features . ( Xie et al. , 2019 ) employs AREN and ACSE to focus on the most important region in images . Huynh & Elhamifar ( 2020 ) applies dense attribute-attention to find the most discriminating image parts and embed them to semantic features individually . DVBE ( Min et al. , 2020 ) utilizes spatial and channel attention to maximize inter-class margin . While the attention to visual features is proved useful by the above-mentioned research efforts , relatively few attempts assess the importance of attention on semantic features . In the ZSL setting , each class contains only one semantic feature vector such that intra-class variations are neglected from the single semantic representation . For example , the object of interest can be occluded partly in the image or in the front of different backgrounds , and a unique class-wise semantic feature vector is hard to reflect such variances . Thus , attention to semantic features is worth further exploring in ZSL . Along this line , the most relevant work to ours is LFGAA ( Liu et al. , 2019 ) , which considers semantic prediction of samples . Different from LFGAA , our method puts attention on discriminating dimensions of semantic features and maps them to the visual domain . The effect of the proposed attention mechanism is to attract the visual representation of ground-truth class and repel others . Besides , our other main difference from LFGAA is the shortcut design in the attention model . We add a shortcut to prevent the model from overfitting on training data and retain discriminating dimensions for unseen class classification . | The paper proposes a framework for the GZSL using the meta-learning and attention mechanism. The image-guided attention on the semantic space helps to adapt the better class specific semantic information. The modified semantic space projected to the visual space and in the visual space, cosine similarity is measured. The paper learns separate expert for the seen and unseen classes. The unseen class expert is trained with the pseudo negative samples with pseudo negative labels. Meta-learning based training helps to learn the model when only a few examples per class are available. | SP:1164e721c240bb98c36386b627d10626a63c1f94 |
TextSETTR: Label-Free Text Style Extraction and Tunable Targeted Restyling | We present a novel approach to the problem of text style transfer . Unlike previous approaches that use parallel or non-parallel labeled data , our technique removes the need for labels entirely , relying instead on the implicit connection in style between adjacent sentences in unlabeled text . We show that T5 ( Raffel et al. , 2020 ) , a strong pretrained text-to-text model , can be adapted to extract a style vector from arbitrary text and use this vector to condition the decoder to perform style transfer . As the resulting learned style vector space encodes many facets of textual style , we recast transfers as “ targeted restyling ” vector operations that adjust specific attributes of the input text while preserving others . When trained over unlabeled Amazon reviews data , our resulting TextSETTR model is competitive on sentiment transfer , even when given only four exemplars of each class . Furthermore , we demonstrate that a single model trained on unlabeled Common Crawl data is capable of transferring along multiple dimensions including dialect , emotiveness , formality , politeness , and sentiment . 1 INTRODUCTION . There has been a recent surge of interest in text style transfer , with the aim of training models able to modify specific attributes of input text ( e.g. , sentiment or formality ) while preserving the remaining content . For example , a sentiment transfer model might transform the input “ best book ever ! ” into “ worst book ever ! ” , while a formality transfer model might change the same input into “ This is the best book I have ever read. ” Work in this area falls into three categories . Supervised approaches like Jhamtani et al . ( 2017 ) transfer between pre-selected styles , and rely on aligned parallel training data to teach the model the desired input/output correspondence . This method is limited by the availability of parallel corpora . So-called “ unsupervised ” approaches like Li et al . ( 2018 ) and Lample et al . ( 2019 ) remove the requirement for parallel data , but still require labeled training examples of each style , and are limited to transfer between a pre-specified set of styles . Label-free approaches like the recent Xu et al . ( 2020 ) remove the need for any training labels . While the most technically challenging , this offers the potential for transferring between arbitrary styles at inference time and has significant value , as curated datasets are not available for many style attributes . In this work , we explore the hypothesis that large pretrained text-to-text models like T5 ( Raffel et al. , 2020 ) already contain a strong representation of textual style , which can be extracted and used to condition the decoder of a style transfer model through a relatively lightweight fine-tuning procedure . To isolate style information in the absence of labels , we rely on the observation that style is a “ slow-moving ” feature , which tends to be consistent over large spans of text . Specifically , given two adjacent sentences from an unlabeled corpus , we train our model to extract a “ style vector ” from the first and use that vector to perform denoising and other reconstruction tasks on the second . This technique extends the unsupervised approach of Lample et al . ( 2019 ) to the label-free setting , and allows us to reformulate the style transfer operation as a directional operation in style vector space using the difference between target and source style vectors ; we call this “ targeted restyling ” . When combined with a novel “ tunable inference ” technique for controlling token add/delete rates , this gives our final model : Text Style Extraction and Tunable Targeted Restyling ( TextSETTR ) . Our main contributions are to : ( 1 ) demonstrate the viability of label-free style transfer,1 ( 2 ) use sentence adjacency as a means for inducing text style representations , ( 3 ) reframe style transfer as “ targeted restyling ” directional operations in style space , ( 4 ) introduce “ tunable inference ” for finergrained control of transfers , ( 5 ) show the effectiveness of “ noisy ” back-translation training , and ( 6 ) illustrate few-shot generalization to a range of style attributes including dialect , emotiveness , formality , politeness , and sentiment . 2 METHOD . Figure 1 illustrates our proposed TextSETTR architecture . At a high level , our approach follows Lample et al . ( 2019 ) , who train a denoising auto-encoder conditioned on a fixed-width style vector . The key difference in our case is that the true style is unknown at training time . To overcome this , we jointly train a “ style extractor ” component to induce a useful style representation ( that can aid in reconstruction ) from text in the nearby context . We describe this in more detail below . 2.1 MODEL ARCHITECTURE . We conduct our experiments using a modified version of the Text-to-Text Transfer Transformer ( T5 ) ( Raffel et al. , 2020 ) . Like T5 , our model includes a transformer-based encoder and decoder . As in T5 pretraining , the input to the encoder is a corrupted/noised version of the target , resulting in a reconstruction task . Our goal is to design a type of corruption that results in this training task resembling style transfer , despite the lack of labeled training data . Our core addition to T5 is the style extractor . Based on the encoder ’ s architecture , this component ’ s input is an uncorrupted sentence in the same style as the target ; relying on our assumption that style is a slow-moving feature , we use the sentence preceding the target ( the “ context ” ) for this.2 This encourages extracting a style representation that is useful for repairing the corrupted input . The only architectural difference between the encoder and style extractor is that we mean-pool the style extractor ’ s hidden state sequence into a single fixed-width vector ( the “ style vector ” ) ; in our experiments , the dimensionality of this vector and the encoder hidden states is 1024 . To incorporate the style vector into the rest of the model , we simply add it to each of the final encoder hidden states . 1Our work is concurrent with Xu et al . ( 2020 ) , who offer a substantially different approach to label-free style transfer , as discussed in Sections 3 and 5 . 2This approach is similar to the use of adjacent sentences for weak supervision in Devlin et al . ( 2019 ) and Zhang et al . ( 2020 ) . We initialize the weights of our model with those of a pretrained T5 model . We initialize both the style extractor and encoder from the pretrained encoder , but the weights are not tied during training . 2.2 CORRUPTION STRATEGIES . We experiment with combinations of three different reconstruction tasks , each contributing a loss term . All three share the same overall structure , where a sentence si in the dataset is corrupted by some function f to produce s̃i = f ( si ) . The cross-entropy loss is calculated using the uncorrupted sentence si as the target , the corrupted sentence s̃i as the input , and the uncorrupted preceding sentence si−1 as the context . The three choices of f are Noise ( N ) , Back-Translation ( BT ) , and Noisy Back-Translation ( NBT ) , described below . Noise ( N ) This function corrupts the input by ( i ) dropping , ( ii ) replacing , and/or ( iii ) shuffling tokens , in that order . For each example we sample a separate noise probability p for each sub-type of noise from a uniform distribution in the range 20–60 % . We do this because the model should be able to “ undo ” varying degrees of noise , as some types of style transfer may require changing only a few tokens , while others may require larger rewrites . For drop noise , we drop each token in si with independent probability p. For replace noise , let sik be the k-th token within si . For each si , a random other example sj is chosen , and then each token sik is replaced by sjk with probability p . If sj has fewer than k tokens , then the replacement does not occur . For shuffle noise , each token in si is chosen with probability p , and then all chosen tokens are randomly shuffled to the position of another chosen token , leaving non-chosen tokens in place . The use of drop and shuffle noise results in a loss term similar to the denoising loss used by Lample et al . ( 2019 ) . Their motivation for this loss was to encourage language modeling . As we fine-tune an already-strong T5 language model in our experiments , our motivation is rather to introduce a conditional element to the language model , in the form of the extracted style vector input . Back-Translation ( BT ) This corruption function , used by Lample et al . ( 2019 ) , runs the current version of the model in inference mode to transfer si into a different style , giving the corrupted s̃i . In prior work using labels , specifying a different target style was straightforward . In our case , because we do not have access to labels , we simply sample a random sentence sj to use as the context . To increase diversity of the generated examples , we decode with sampling instead of greedy decoding . Because s̃i is produced by a strong language model , BT should result in training examples where both the input and output are coherent sentences , matching our intended inference setting . By contrast , the text produced by “ Noise ” corruption does not resemble test-time inputs . Noisy Back-Translation ( NBT ) This novel corruption function is a composition of the previous two . Noise is first applied to si as described above , and the result is used as the input ( with randomlysampled sj as the context ) to the model in inference mode to produce s̃i via sampling , as in BT . Once the model has learned to undo random noise from the associated loss term , NBT should produce training examples where some of the tokens are preserved from si while others were generated by the model itself under the influence of the “ incorrect ” context sj . This is similar to BT , but we hypothesize that it may be better suited to style transfer . BT was originally used for machine translation ( Sennrich et al. , 2016 ) , a setting where most or all input tokens need to be changed . In contrast , style transfer within a single language usually requires only changing a subset of input tokens ; the training examples resulting from the NBT procedure should have this property . We believe that this will encourage the model to identify which tokens in the input do not match the target style indicated by si−1 and change them , which is exactly what we want a style transfer model to do . This is conceptually similar to the work of Clark et al . ( 2020 ) , who pretrain language models to discriminate which input tokens were originally present and which were altered by a simpler language model . Final Loss The final loss term used for training is the sum of the above loss terms , each calculated from the same input si . However , not every model we experiment with includes all three losses . | This paper proposes a novel approach to the label-free style transfer task where an input is corrupted via different strategies and fed into an auto-encoder which is additionally conditioned on its prior adjacent context sentence via a "style encoder" which adds its mean pooled hidden state to the former before decoding. Both encoders are initialized to and leverage the strength of pre-trained T5 model. Additionally the amount of addition/deletion of tokens is tunable at both training and inference time. | SP:d3299ff1a9838da59e00b18add7185466d239bcc |
TextSETTR: Label-Free Text Style Extraction and Tunable Targeted Restyling | We present a novel approach to the problem of text style transfer . Unlike previous approaches that use parallel or non-parallel labeled data , our technique removes the need for labels entirely , relying instead on the implicit connection in style between adjacent sentences in unlabeled text . We show that T5 ( Raffel et al. , 2020 ) , a strong pretrained text-to-text model , can be adapted to extract a style vector from arbitrary text and use this vector to condition the decoder to perform style transfer . As the resulting learned style vector space encodes many facets of textual style , we recast transfers as “ targeted restyling ” vector operations that adjust specific attributes of the input text while preserving others . When trained over unlabeled Amazon reviews data , our resulting TextSETTR model is competitive on sentiment transfer , even when given only four exemplars of each class . Furthermore , we demonstrate that a single model trained on unlabeled Common Crawl data is capable of transferring along multiple dimensions including dialect , emotiveness , formality , politeness , and sentiment . 1 INTRODUCTION . There has been a recent surge of interest in text style transfer , with the aim of training models able to modify specific attributes of input text ( e.g. , sentiment or formality ) while preserving the remaining content . For example , a sentiment transfer model might transform the input “ best book ever ! ” into “ worst book ever ! ” , while a formality transfer model might change the same input into “ This is the best book I have ever read. ” Work in this area falls into three categories . Supervised approaches like Jhamtani et al . ( 2017 ) transfer between pre-selected styles , and rely on aligned parallel training data to teach the model the desired input/output correspondence . This method is limited by the availability of parallel corpora . So-called “ unsupervised ” approaches like Li et al . ( 2018 ) and Lample et al . ( 2019 ) remove the requirement for parallel data , but still require labeled training examples of each style , and are limited to transfer between a pre-specified set of styles . Label-free approaches like the recent Xu et al . ( 2020 ) remove the need for any training labels . While the most technically challenging , this offers the potential for transferring between arbitrary styles at inference time and has significant value , as curated datasets are not available for many style attributes . In this work , we explore the hypothesis that large pretrained text-to-text models like T5 ( Raffel et al. , 2020 ) already contain a strong representation of textual style , which can be extracted and used to condition the decoder of a style transfer model through a relatively lightweight fine-tuning procedure . To isolate style information in the absence of labels , we rely on the observation that style is a “ slow-moving ” feature , which tends to be consistent over large spans of text . Specifically , given two adjacent sentences from an unlabeled corpus , we train our model to extract a “ style vector ” from the first and use that vector to perform denoising and other reconstruction tasks on the second . This technique extends the unsupervised approach of Lample et al . ( 2019 ) to the label-free setting , and allows us to reformulate the style transfer operation as a directional operation in style vector space using the difference between target and source style vectors ; we call this “ targeted restyling ” . When combined with a novel “ tunable inference ” technique for controlling token add/delete rates , this gives our final model : Text Style Extraction and Tunable Targeted Restyling ( TextSETTR ) . Our main contributions are to : ( 1 ) demonstrate the viability of label-free style transfer,1 ( 2 ) use sentence adjacency as a means for inducing text style representations , ( 3 ) reframe style transfer as “ targeted restyling ” directional operations in style space , ( 4 ) introduce “ tunable inference ” for finergrained control of transfers , ( 5 ) show the effectiveness of “ noisy ” back-translation training , and ( 6 ) illustrate few-shot generalization to a range of style attributes including dialect , emotiveness , formality , politeness , and sentiment . 2 METHOD . Figure 1 illustrates our proposed TextSETTR architecture . At a high level , our approach follows Lample et al . ( 2019 ) , who train a denoising auto-encoder conditioned on a fixed-width style vector . The key difference in our case is that the true style is unknown at training time . To overcome this , we jointly train a “ style extractor ” component to induce a useful style representation ( that can aid in reconstruction ) from text in the nearby context . We describe this in more detail below . 2.1 MODEL ARCHITECTURE . We conduct our experiments using a modified version of the Text-to-Text Transfer Transformer ( T5 ) ( Raffel et al. , 2020 ) . Like T5 , our model includes a transformer-based encoder and decoder . As in T5 pretraining , the input to the encoder is a corrupted/noised version of the target , resulting in a reconstruction task . Our goal is to design a type of corruption that results in this training task resembling style transfer , despite the lack of labeled training data . Our core addition to T5 is the style extractor . Based on the encoder ’ s architecture , this component ’ s input is an uncorrupted sentence in the same style as the target ; relying on our assumption that style is a slow-moving feature , we use the sentence preceding the target ( the “ context ” ) for this.2 This encourages extracting a style representation that is useful for repairing the corrupted input . The only architectural difference between the encoder and style extractor is that we mean-pool the style extractor ’ s hidden state sequence into a single fixed-width vector ( the “ style vector ” ) ; in our experiments , the dimensionality of this vector and the encoder hidden states is 1024 . To incorporate the style vector into the rest of the model , we simply add it to each of the final encoder hidden states . 1Our work is concurrent with Xu et al . ( 2020 ) , who offer a substantially different approach to label-free style transfer , as discussed in Sections 3 and 5 . 2This approach is similar to the use of adjacent sentences for weak supervision in Devlin et al . ( 2019 ) and Zhang et al . ( 2020 ) . We initialize the weights of our model with those of a pretrained T5 model . We initialize both the style extractor and encoder from the pretrained encoder , but the weights are not tied during training . 2.2 CORRUPTION STRATEGIES . We experiment with combinations of three different reconstruction tasks , each contributing a loss term . All three share the same overall structure , where a sentence si in the dataset is corrupted by some function f to produce s̃i = f ( si ) . The cross-entropy loss is calculated using the uncorrupted sentence si as the target , the corrupted sentence s̃i as the input , and the uncorrupted preceding sentence si−1 as the context . The three choices of f are Noise ( N ) , Back-Translation ( BT ) , and Noisy Back-Translation ( NBT ) , described below . Noise ( N ) This function corrupts the input by ( i ) dropping , ( ii ) replacing , and/or ( iii ) shuffling tokens , in that order . For each example we sample a separate noise probability p for each sub-type of noise from a uniform distribution in the range 20–60 % . We do this because the model should be able to “ undo ” varying degrees of noise , as some types of style transfer may require changing only a few tokens , while others may require larger rewrites . For drop noise , we drop each token in si with independent probability p. For replace noise , let sik be the k-th token within si . For each si , a random other example sj is chosen , and then each token sik is replaced by sjk with probability p . If sj has fewer than k tokens , then the replacement does not occur . For shuffle noise , each token in si is chosen with probability p , and then all chosen tokens are randomly shuffled to the position of another chosen token , leaving non-chosen tokens in place . The use of drop and shuffle noise results in a loss term similar to the denoising loss used by Lample et al . ( 2019 ) . Their motivation for this loss was to encourage language modeling . As we fine-tune an already-strong T5 language model in our experiments , our motivation is rather to introduce a conditional element to the language model , in the form of the extracted style vector input . Back-Translation ( BT ) This corruption function , used by Lample et al . ( 2019 ) , runs the current version of the model in inference mode to transfer si into a different style , giving the corrupted s̃i . In prior work using labels , specifying a different target style was straightforward . In our case , because we do not have access to labels , we simply sample a random sentence sj to use as the context . To increase diversity of the generated examples , we decode with sampling instead of greedy decoding . Because s̃i is produced by a strong language model , BT should result in training examples where both the input and output are coherent sentences , matching our intended inference setting . By contrast , the text produced by “ Noise ” corruption does not resemble test-time inputs . Noisy Back-Translation ( NBT ) This novel corruption function is a composition of the previous two . Noise is first applied to si as described above , and the result is used as the input ( with randomlysampled sj as the context ) to the model in inference mode to produce s̃i via sampling , as in BT . Once the model has learned to undo random noise from the associated loss term , NBT should produce training examples where some of the tokens are preserved from si while others were generated by the model itself under the influence of the “ incorrect ” context sj . This is similar to BT , but we hypothesize that it may be better suited to style transfer . BT was originally used for machine translation ( Sennrich et al. , 2016 ) , a setting where most or all input tokens need to be changed . In contrast , style transfer within a single language usually requires only changing a subset of input tokens ; the training examples resulting from the NBT procedure should have this property . We believe that this will encourage the model to identify which tokens in the input do not match the target style indicated by si−1 and change them , which is exactly what we want a style transfer model to do . This is conceptually similar to the work of Clark et al . ( 2020 ) , who pretrain language models to discriminate which input tokens were originally present and which were altered by a simpler language model . Final Loss The final loss term used for training is the sum of the above loss terms , each calculated from the same input si . However , not every model we experiment with includes all three losses . | In this paper, the author proposed a transformer-based encoder-decoder framework for label-free text style transfer. The described task under the unsupervised setup is important and instructive for the text style transfer domain. The model architecture is well demonstrated and the writing is easy to follow up. The experiment results show satisfying performance even comparing with state-of-the-art supervised methods. | SP:d3299ff1a9838da59e00b18add7185466d239bcc |
Distributed Associative Memory Network with Association Reinforcing Loss | 1 INTRODUCTION . The essential part of human intelligence for understanding the story and predicting unobserved facts largely depends on the ability of memorizing the past and reasoning for relational information based on the pieces of memory . In this context , research on artificial intelligence has focused on designing human like associative memory network which can easily store and recall both events and relational information from a part of information . In neural network research , many approaches generally model sequential data with memory systems , such as Long Short Term Memory ( LSTM ) ( Hochreiter & Schmidhuber , 1997 ) and memoryaugmented neural networks ( MANN ) . Especially , recent approach in MANN constructs an associative memory with a content-based addressing mechanism and stores both input data and its relational information to a single external memory . MANN has already proven to be an essential component on many tasks which need long term context understanding ( Weston et al. , 2014 ; Sukhbaatar et al. , 2015 ; Graves et al. , 2014 ; 2016 ; Gulcehre et al. , 2018 ) . Also , compared to recurrent neural networks , it can store more information from sequential input data and correctly recall desired information from memory with a given cue . However , even with its promising performance on a wide range of tasks , MANN still has difficulties in solving complex relational reasoning problems ( Weston et al. , 2015 ) . Since content-based addressing model implicitly encodes data item and its relational information into one vector representation , they often result in a lossy representation of relational information which is not rich enough for solving relational reasoning tasks . To address such weakness , some researches find relational information by leveraging interaction between memory entities with attention ( Palm et al. , 2018 ; Santoro et al. , 2018 ) . Others focus on long sequence memorization performance of memory ( Trinh et al. , 2018 ; Le et al. , 2019 ; Munkhdalai et al. , 2019 ) . Another attempts apply a self-attention to memory contents and explicitly encode relational information to a separate external memory ( Le et al. , 2020b ) . However , all those models need to explicitly find relational information among memory entities with highly computational attention mechanism and have to repeatedly recompute it on every memory update . In this research , we approach the same problem in a much simpler and efficient way which do not require any explicit relational computation , such as self-attention , among memory entities . We hypothesize that lossy representation of relational information ( Le et al. , 2020b ) in MANN is caused by both a single memory based representation and long-temporal data association performance . Although MANN learns to correlate sequential events across time , its representation is not rich enough to reflect complex relational information existing in input data . Therefore , for the enhanced relation learning , we focus on the richness of representation which implicitly embeds associations existing in input data . For this purpose , we introduce a novel Distributed Associative Memory ( DAM ) architecture which is inspired by how the biological brain works ( Lashley , 1950 ; Bruce , 2001 ) . In DAM , we replace the single external memory with multiple smaller sub-memory blocks and update those memory blocks simultaneously and independently . The basic operations for each associative memory block are based on the content-based addressing mechanism of MANN , but its parallel memory architecture allows each sub-memory system to evolve over time independently . Therefore , similar to the underlying insight of multi-head attention ( Vaswani et al. , 2017 ) , our memory model can jointly attend to information from different representation subspaces at different sub-memory blocks and is able to provide a more rich representation of the same common input data . To retrieve rich information for relational reasoning , we apply a soft-attention based interpolation to the diverse representations distributed across multiple memories . Moreover , to enrich long-term relational information in the memory , we introduce a novel association reinforcing loss ( ARL ) which fortifies data associations of the memory and generally enhances the memorization capacity of MANN . The ARL forces the memory network to learn to reproduce the number of stochastically sampled input data only based on the stored memory contents . As if , other associated pieces of memory are reminded together whenever a person recalls a certain event in his memory , the data reproducing task enables MANN to have better association and memorization ability for input data . It is designed to reproduce a predefined percentage of input representations in the memory matrix on average and , while optimizing two different tasks at the same time , keep the balance between ARL and target objective loss by dynamically re-weighting each task ( Liu & Zhou , 2006 ; Cui et al. , 2019 ) . By combining the above two approaches , DAM , and ARL , our architecture provides rich representation which can be successfully used for tasks requiring both memorization and relational reasoning . We apply our architecture to Differential Neural Computer ( DNC ) ( Graves et al. , 2016 ) , which is one of the representative content-based addressing memory , to construct novel distributed associative memory architecture with ARL . DNC has promising performance on diverse tasks but also known to be poor at complex relational reasoning tasks . In experiments , we show that our architecture greatly enhances both memorization and relation reasoning performance of DNC , and even achieves the state-of-the-art records . 2 DIFFERENTIABLE NEURAL COMPUTER . We first briefly summarize DNC architecture which is a baseline model for our approaches . DNC ( Graves et al. , 2016 ) is a memory augmented neural network inspired by conventional computer architecture and mainly consists of two parts , a controller and an external memory . When input data are provided to the controller , usually LSTM , it generates a collection of memory operators called as an interface vector ξt for accessing an external memory . It consists of several keys and values for read/write operations and constructed with the controller internal state ht as ξt = Wξht at each time step t. Based on these memory operators , every read/write operation on DNC is performed . During writing process , DNC finds a writing address , wwt ∈ [ 0 , 1 ] A , where A is a memory address size , along with write memory operators , e.g . write-in key , and built-in functions . Then it updates write-in values , vt ∈ RL , in the external memory , Mt−1 ∈ RA×L , along with erasing value , et ∈ [ 0 , 1 ] L , where L is a memory length size as follows : Mt =Mt−1 ◦ ( E −wwt e > t ) +wwt v > t ( 1 ) where ◦ denotes element-wise multiplication and E is 1A×L . In the reading process , DNC searches a reading address , wr , it ∈ [ 0 , 1 ] A , for R read heads , along with read memory operators , e.g . read-out key . Then , it reads out information from the external memory : rit =Mtw r , i t > ( 2 ) Finally , the output is computed as yt = Wy [ ht ; rt ] ∈ Rdo , where rt = { rit ∈ RL ; 1 ≤ i ≤ R } . Through these operations , DNC can learn how to store input data and utilize stored information to solve a given task . These whole mechanisms make DNC suitable for a general purposed memory augmented neural network . 3 PROPOSED METHOD . In this section , we introduce two methods that improve both memorization and relational reasoning ability of conventional DNC , a distributed associative memory architecture , and an ARL function . For a clear explanation , we illustrate DAM mechanism with a single read head case . For R read head cases of DAM , the details are in the Appendix . 3.1 DISTRIBUTED ASSOCIATIVE MEMORY ARCHITECTURE . The distributed associative memory architecture consists of a controller network and K associative memory blocks where each memory block is a content addressable memory similar to the original DNC ( Graves et al. , 2016 ) . Figure 1 ( a ) shows the overall read/write process of the proposed DAM . For the writing operation , the controller of DAM produces multiple writing operator vectors for multiple memory blocks . Each writing operator vector is used for the content-based addressing of one of the multiple memory blocks , and it is independent of other memory blocks . Since it is produced based on the current input and previous hidden states of the controller , it can independently store its own representation of the same input contents . This writing process enables DAM to store the diverse representations of the same input data to multiple memory blocks with much flexibility . Furthermore , for the reading process , all memory blocks are read at the same time , and read values are interpolated with soft attention to produce single read-out information . Through this attention-based reading process , DAM retrieves the most suitable information for the current task from representations distributed in the multiple memory blocks . Based on these read/write operations , DAM learns how to store and retrieve the diverse representations of input data for different purposed tasks . The following sections detail the main operations . 3.1.1 CONTROLLER FOR MULTIPLE ASSOCIATIVE MEMORY BLOCKS . At each time step t , the controller receives an external input , it , read-out of the previous time step , rt−1 , and previous hidden state of controller , ht−1 , to update its current hidden state , ht . After layer normalization , it produces an interface vector , ξt ∈ RK∗ ( L∗R+3L+3R+3 ) , which includes read and write parameters for multiple memory access . 3.1.2 WRITE INTO MULTIPLE SUB-MEMORY BLOCKS . The multiple memory writing processes in our architecture is based on the content-based memory accessing mechanism of DNC . A single memory block is addressed and updated with the same procedure of DNC and such single memory block updating is applied to all blocks independently at the same time . As shown in Eq . ( 3 ) , each memory block has its own interface vector relevant weight Wξ,1 , · · · , Wξ , k , where k ∈ { 1 , · · · , K } . Theses weights are multiplied with a controller hidden state vector , ht , and used for memory operations of each independent memory block as following . ξt = [ ξt,1 , · · · , ξt , K , ĝatt ] = [ Wξ,1 , · · · , Wξ , K , Wξ , at ] ht ( 3 ) where ξt , k is a interface vector for each memory block and ĝatt is an attentive gate at time t. Based on a writing operator obtained from ξt , k , DAM updates input information into each memory block , Mt−1 , k , independently and simultaneously , following Eq . ( 1 ) . That independent and simultaneous writing procedures of sub-memory blocks allow that our DAM learns to construct diverse representations for the same common input data . The following attention-based reading process is designed to integrate representations distributed across sub-memory blocks , and it contributes to enrich representation for relational reasoning tasks . 3.1.3 READ FROM MULTIPLE SUB-MEMORY BLOCKS . As in the writing process , DAM obtains a reading operator from ξt , k , and computes reading address , wrt , k ∈ [ 0 , 1 ] A , for each memory block . Based on those addresses , DAM reads values from each memory block and derives read-out value , rt ∈ RL , from them , using processed attentive gate , gatt ∈ [ 0 , 1 ] K , as follows : rt = K∑ k=1 gatt , kM > t , kw r t , k where g at t , k = Softmax ( ĝ at t , k ) for k = 1 , · · · , K. ( 4 ) Compared to Eq . ( 2 ) of DNC , this reading process integrates representations stored in multiple memory blocks with attention gate and enables DAM to learn to provides the most appropriate distributed representation for a target task . | In this work the authors propose a novel memory architecture wherein memories are stored in multiple ways across a series of memory blocks. By "distributing" the memories in such a manner, the model can flexibly retrieve one version of a memory or another, which enables more flexible computations when conditioning on that memory. The authors demonstrate that such a memory network does well in tasks involving relational reasoning. | SP:da88bd545609da190d45106b615b2b1bbc132279 |
Distributed Associative Memory Network with Association Reinforcing Loss | 1 INTRODUCTION . The essential part of human intelligence for understanding the story and predicting unobserved facts largely depends on the ability of memorizing the past and reasoning for relational information based on the pieces of memory . In this context , research on artificial intelligence has focused on designing human like associative memory network which can easily store and recall both events and relational information from a part of information . In neural network research , many approaches generally model sequential data with memory systems , such as Long Short Term Memory ( LSTM ) ( Hochreiter & Schmidhuber , 1997 ) and memoryaugmented neural networks ( MANN ) . Especially , recent approach in MANN constructs an associative memory with a content-based addressing mechanism and stores both input data and its relational information to a single external memory . MANN has already proven to be an essential component on many tasks which need long term context understanding ( Weston et al. , 2014 ; Sukhbaatar et al. , 2015 ; Graves et al. , 2014 ; 2016 ; Gulcehre et al. , 2018 ) . Also , compared to recurrent neural networks , it can store more information from sequential input data and correctly recall desired information from memory with a given cue . However , even with its promising performance on a wide range of tasks , MANN still has difficulties in solving complex relational reasoning problems ( Weston et al. , 2015 ) . Since content-based addressing model implicitly encodes data item and its relational information into one vector representation , they often result in a lossy representation of relational information which is not rich enough for solving relational reasoning tasks . To address such weakness , some researches find relational information by leveraging interaction between memory entities with attention ( Palm et al. , 2018 ; Santoro et al. , 2018 ) . Others focus on long sequence memorization performance of memory ( Trinh et al. , 2018 ; Le et al. , 2019 ; Munkhdalai et al. , 2019 ) . Another attempts apply a self-attention to memory contents and explicitly encode relational information to a separate external memory ( Le et al. , 2020b ) . However , all those models need to explicitly find relational information among memory entities with highly computational attention mechanism and have to repeatedly recompute it on every memory update . In this research , we approach the same problem in a much simpler and efficient way which do not require any explicit relational computation , such as self-attention , among memory entities . We hypothesize that lossy representation of relational information ( Le et al. , 2020b ) in MANN is caused by both a single memory based representation and long-temporal data association performance . Although MANN learns to correlate sequential events across time , its representation is not rich enough to reflect complex relational information existing in input data . Therefore , for the enhanced relation learning , we focus on the richness of representation which implicitly embeds associations existing in input data . For this purpose , we introduce a novel Distributed Associative Memory ( DAM ) architecture which is inspired by how the biological brain works ( Lashley , 1950 ; Bruce , 2001 ) . In DAM , we replace the single external memory with multiple smaller sub-memory blocks and update those memory blocks simultaneously and independently . The basic operations for each associative memory block are based on the content-based addressing mechanism of MANN , but its parallel memory architecture allows each sub-memory system to evolve over time independently . Therefore , similar to the underlying insight of multi-head attention ( Vaswani et al. , 2017 ) , our memory model can jointly attend to information from different representation subspaces at different sub-memory blocks and is able to provide a more rich representation of the same common input data . To retrieve rich information for relational reasoning , we apply a soft-attention based interpolation to the diverse representations distributed across multiple memories . Moreover , to enrich long-term relational information in the memory , we introduce a novel association reinforcing loss ( ARL ) which fortifies data associations of the memory and generally enhances the memorization capacity of MANN . The ARL forces the memory network to learn to reproduce the number of stochastically sampled input data only based on the stored memory contents . As if , other associated pieces of memory are reminded together whenever a person recalls a certain event in his memory , the data reproducing task enables MANN to have better association and memorization ability for input data . It is designed to reproduce a predefined percentage of input representations in the memory matrix on average and , while optimizing two different tasks at the same time , keep the balance between ARL and target objective loss by dynamically re-weighting each task ( Liu & Zhou , 2006 ; Cui et al. , 2019 ) . By combining the above two approaches , DAM , and ARL , our architecture provides rich representation which can be successfully used for tasks requiring both memorization and relational reasoning . We apply our architecture to Differential Neural Computer ( DNC ) ( Graves et al. , 2016 ) , which is one of the representative content-based addressing memory , to construct novel distributed associative memory architecture with ARL . DNC has promising performance on diverse tasks but also known to be poor at complex relational reasoning tasks . In experiments , we show that our architecture greatly enhances both memorization and relation reasoning performance of DNC , and even achieves the state-of-the-art records . 2 DIFFERENTIABLE NEURAL COMPUTER . We first briefly summarize DNC architecture which is a baseline model for our approaches . DNC ( Graves et al. , 2016 ) is a memory augmented neural network inspired by conventional computer architecture and mainly consists of two parts , a controller and an external memory . When input data are provided to the controller , usually LSTM , it generates a collection of memory operators called as an interface vector ξt for accessing an external memory . It consists of several keys and values for read/write operations and constructed with the controller internal state ht as ξt = Wξht at each time step t. Based on these memory operators , every read/write operation on DNC is performed . During writing process , DNC finds a writing address , wwt ∈ [ 0 , 1 ] A , where A is a memory address size , along with write memory operators , e.g . write-in key , and built-in functions . Then it updates write-in values , vt ∈ RL , in the external memory , Mt−1 ∈ RA×L , along with erasing value , et ∈ [ 0 , 1 ] L , where L is a memory length size as follows : Mt =Mt−1 ◦ ( E −wwt e > t ) +wwt v > t ( 1 ) where ◦ denotes element-wise multiplication and E is 1A×L . In the reading process , DNC searches a reading address , wr , it ∈ [ 0 , 1 ] A , for R read heads , along with read memory operators , e.g . read-out key . Then , it reads out information from the external memory : rit =Mtw r , i t > ( 2 ) Finally , the output is computed as yt = Wy [ ht ; rt ] ∈ Rdo , where rt = { rit ∈ RL ; 1 ≤ i ≤ R } . Through these operations , DNC can learn how to store input data and utilize stored information to solve a given task . These whole mechanisms make DNC suitable for a general purposed memory augmented neural network . 3 PROPOSED METHOD . In this section , we introduce two methods that improve both memorization and relational reasoning ability of conventional DNC , a distributed associative memory architecture , and an ARL function . For a clear explanation , we illustrate DAM mechanism with a single read head case . For R read head cases of DAM , the details are in the Appendix . 3.1 DISTRIBUTED ASSOCIATIVE MEMORY ARCHITECTURE . The distributed associative memory architecture consists of a controller network and K associative memory blocks where each memory block is a content addressable memory similar to the original DNC ( Graves et al. , 2016 ) . Figure 1 ( a ) shows the overall read/write process of the proposed DAM . For the writing operation , the controller of DAM produces multiple writing operator vectors for multiple memory blocks . Each writing operator vector is used for the content-based addressing of one of the multiple memory blocks , and it is independent of other memory blocks . Since it is produced based on the current input and previous hidden states of the controller , it can independently store its own representation of the same input contents . This writing process enables DAM to store the diverse representations of the same input data to multiple memory blocks with much flexibility . Furthermore , for the reading process , all memory blocks are read at the same time , and read values are interpolated with soft attention to produce single read-out information . Through this attention-based reading process , DAM retrieves the most suitable information for the current task from representations distributed in the multiple memory blocks . Based on these read/write operations , DAM learns how to store and retrieve the diverse representations of input data for different purposed tasks . The following sections detail the main operations . 3.1.1 CONTROLLER FOR MULTIPLE ASSOCIATIVE MEMORY BLOCKS . At each time step t , the controller receives an external input , it , read-out of the previous time step , rt−1 , and previous hidden state of controller , ht−1 , to update its current hidden state , ht . After layer normalization , it produces an interface vector , ξt ∈ RK∗ ( L∗R+3L+3R+3 ) , which includes read and write parameters for multiple memory access . 3.1.2 WRITE INTO MULTIPLE SUB-MEMORY BLOCKS . The multiple memory writing processes in our architecture is based on the content-based memory accessing mechanism of DNC . A single memory block is addressed and updated with the same procedure of DNC and such single memory block updating is applied to all blocks independently at the same time . As shown in Eq . ( 3 ) , each memory block has its own interface vector relevant weight Wξ,1 , · · · , Wξ , k , where k ∈ { 1 , · · · , K } . Theses weights are multiplied with a controller hidden state vector , ht , and used for memory operations of each independent memory block as following . ξt = [ ξt,1 , · · · , ξt , K , ĝatt ] = [ Wξ,1 , · · · , Wξ , K , Wξ , at ] ht ( 3 ) where ξt , k is a interface vector for each memory block and ĝatt is an attentive gate at time t. Based on a writing operator obtained from ξt , k , DAM updates input information into each memory block , Mt−1 , k , independently and simultaneously , following Eq . ( 1 ) . That independent and simultaneous writing procedures of sub-memory blocks allow that our DAM learns to construct diverse representations for the same common input data . The following attention-based reading process is designed to integrate representations distributed across sub-memory blocks , and it contributes to enrich representation for relational reasoning tasks . 3.1.3 READ FROM MULTIPLE SUB-MEMORY BLOCKS . As in the writing process , DAM obtains a reading operator from ξt , k , and computes reading address , wrt , k ∈ [ 0 , 1 ] A , for each memory block . Based on those addresses , DAM reads values from each memory block and derives read-out value , rt ∈ RL , from them , using processed attentive gate , gatt ∈ [ 0 , 1 ] K , as follows : rt = K∑ k=1 gatt , kM > t , kw r t , k where g at t , k = Softmax ( ĝ at t , k ) for k = 1 , · · · , K. ( 4 ) Compared to Eq . ( 2 ) of DNC , this reading process integrates representations stored in multiple memory blocks with attention gate and enables DAM to learn to provides the most appropriate distributed representation for a target task . | The authors propose a distributed memory architecture which shares some interface with the Differentiable Neural Computer however crucially segments memory into a collection of K units. The authors show that by increasing K the model learns to use its memory for algorithmic tasks such as copying and associative recall and learn faster. The authors also propose an auxiliary loss to improve memory representations, which involves reconstructing inputs from the representations in memory. | SP:da88bd545609da190d45106b615b2b1bbc132279 |
Neural Potts Model | 1 INTRODUCTION . When two positions in a protein sequence are in spatial contact in the folded three-dimensional structure of the protein , evolution is not free to choose the amino acid at each position independently . This means that the positions co-evolve : when the amino acid at one position varies , the assignment at the contacting site may vary with it . A multiple sequence alignment ( MSA ) summarizes evolutionary variation by collecting a group of diverse but evolutionarily related sequences . Patterns of variation , including co-evolution , can be observed in the MSA . These patterns are in turn associated with the structure and function of the protein ( Göbel et al. , 1994 ) . Unsupervised contact prediction aims to detect co-evolutionary patterns in the statistics of the MSA and infer structure from them . The standard method for unsupervised contact prediction fits a Potts model energy function to the MSA ( Lapedes et al. , 1999 ; Thomas et al. , 2008 ; Weigt et al. , 2009 ) . Various approximations are used in practice including mean field ( Morcos et al. , 2011 ) , sparse inverse covariance estimation ( Jones et al. , 2011 ) , and pseudolikelihood maximization ( Balakrishnan et al. , 2011 ; Ekeberg et al. , 2013 ; Kamisetty et al. , 2013 ) . To construct the MSA for a given input sequence , a similarity query is performed across a large database to identify related sequences , which are then aligned to each other . Fitting the Potts model to the set of sequences identifies statistical couplings between different sites in the protein , which can be used to infer contacts in the structure ( Weigt et al. , 2009 ) . Contact prediction performance depends on the depth of the MSA and is reduced when few related sequences are available to fit the model . In this work we consider fitting many models across many families simultaneously with parameter sharing across all the families . We introduce this formally as the Neural Potts Model ( NPM ) objective . The objective is an amortized optimization problem across sequence families . A Transformer model is trained to predict the parameters of a Potts model energy function defined by the MSA of each input sequence . This approach builds on the ideas in the emerging field of protein language models ( Alley et al. , 2019 ; Rives et al. , 2019 ; Heinzinger et al. , 2019 ) , which proposes to fit a single model with unsupervised learning across many evolutionarily diverse protein sequences . We extend this core idea to train a model to output an explicit energy landscape for every sequence . To evaluate the approach , we focus on the problem setting of unsupervised contact prediction for proteins with low-depth MSAs . Unsupervised structure learning with Potts models performs poorly when few related sequences are available ( Jones et al. , 2011 ; Kamisetty et al. , 2013 ; Moult et al. , 2016 ) . Since larger protein families are likely to have structures available , the proteins of greatest interest for unsupervised structure prediction are likely to have lower depth MSAs ( Tetchner et al. , 2014 ) . This is especially a problem for higher organisms , where there are fewer related genomes ( Tetchner et al. , 2014 ) . The hope is that for low-depth MSAs , the parameter sharing in the neural model will improve results relative to fitting an independent Potts model to each family . We investigate the NPM objective in a controlled ablation experiment on a group of related protein families in PFAM ( Finn et al. , 2016 ) . In this artificial setting , information can be generalized by the pre-trained shared parameters to improve unsupervised contact prediction on a subset of the MSAs that have been artificially truncated to reduce their number of sequences . We then study the model in the setting of a large dataset without artificial reduction , training the model on MSAs for UniRef50 sequences . In this setting there is also an improvement on average for low depth MSAs both for sequences in the training set as well as for sequences not in the training set . 2 BACKGROUND . Multiple sequence alignments An MSA is a set of aligned protein sequences that are evolutionarily related . MSAs are constructed by retrieving related sequences from a sequence database and aligning the returned sequences using a heuristic . An MSA can be viewed as a matrix where each row is a sequence , and columns contain aligned positions after removing insertions and replacing deletions with gap characters . Potts model The generalized Potts model defines a Gibbs distribution over a protein sequence ( x1 , . . . , xL ) of length L with the negative energy function : −E ( x ) = ∑ i hi ( xi ) + ∑ ij Jij ( xi , xj ) ( 1 ) Which defines potentials hi for each position in the sequence , and couplings Jij for every pair of positions . The parameters of the model are W = { h , J } the set of fields and couplings respectively . The distribution p ( x ; W ) is obtained by normalization as exp { −E ( x ; W ) } /Z ( W ) . Since the normalization constant is intractable , pseudolikelihood is commonly used to fit the parameters ( Balakrishnan et al. , 2011 ; Ekeberg et al. , 2013 ) . Pseudolikelihood approximates the likelihood of a sequence x as a product of conditional distributions : ` PL ( x ; W ) = − ∑ i log p ( xi|x−i ; W ) . To estimate the Potts model , we take the expectation : LPL ( W ) = E x∼M [ ` PL ( x ; W ) ] ( 2 ) over an MSAM . In practice , we have a finite set of sequences M̂ in the MSA to estimate Eq . ( 2 ) . L2 regularization ρ ( W ) = λJ ‖J‖2 + λh ‖h‖2 is added , and sequences are reweighted to account for redundancy ( Morcos et al. , 2011 ) . We write the regularized finite sample estimator as : L̂PL ( W ) = 1 Meff M∑ m=1 wm [ ` PL ( x m ; W ) ] + ρ ( W ) ( 3 ) Which sums over all the M sequences of the finite MSA M̂ , weighted with wm summing collectively to Meff . The finite sample estimate of the parameters Ŵ ∗ is obtained by minimizing L̂PL . Idealized MSA Notice how in Eq . ( 2 ) , we idealized the MSAM as a distribution , defined by the protein family . We consider the set of sequences actually retrieved in the MSA M̂ in Eq . ( 3 ) as a finite sample from this underlying idealized distribution . For some protein families this sample will contain more information than for others , depending on what sequences are present in the database . We will refer to W ∗ as a hypothetical idealized estimate of the parameters to explain how the Neural Potts Model can improve on the finite sample estimate Ŵ ∗ for low-depth MSAs . 2.1 AMORTIZED OPTIMIZATION . We review amortized optimization ( Shu , 2017 ) , a generalization of amortized variational inference ( Kingma & Welling , 2013 ; Rezende et al. , 2014 ) that uses learning to predict the solution to continuous optimization problems to make the computation more tractable and potentially generalize across problem instances . We are interested in repeatedly solving expensive optimization problems W ∗ ( x ) = argmin W L ( W ; x ) , ( 4 ) where W ∈ Rm is the optimization variable , x ∈ Rn is the input or conditioning variable to the optimization problem , and L : Rm × Rn → R is the objective . We assume W ∗ ( x ) is unique . We consider the setting of having a distribution over optimization problems with inputs x ∼ p ( x ) , and the argmin of those optimization problems W ∗ ( x ) . Amortization uses learning to leverage the shared structure present across the distribution , e.g . a solutionW ∗ ( x ) is likely correlated with another solutionW ∗ ( x′ ) . Assuming an underlying regularity of the data and loss L , we can imagine learning to predict the outcome of the optimization problem with an expressive model Wθ ( x ) such that hopefully Wθ ≈W ∗ . Modeling and learning Wθ ( x ) are the key design decisions when using amortization . Modeling approaches . In this paper we consider models Wθ ( x ) that directly predict the solution to Eq . ( 4 ) with a neural network , an approach which follows fully amortized variational inference models and the meta-learning method ( Mishra et al. , 2017 ) . The model can also leverage the objective information L ( W ; x ) and gradient information ∇WL ( W ; x ) , e.g . by predicting multiple candidate solutions W and selecting the most optimal one . This is sometimes referred to as semi-amortization or unrolled optimization-based models and is considered in Gregor & LeCun ( 2010 ) for sparse coding , Li & Malik ( 2016 ) ; Andrychowicz et al . ( 2016 ) ; Finn et al . ( 2017 ) for meta-learning , and Marino et al . ( 2018 ) ; Kim et al . ( 2018 ) for posterior optimization . Learning approaches . There are two main classes of learning approaches for amortization : argmin θ E p ( x ) L ( Wθ ( x ) ; x ) ( 5 ) argmin θ E p ( x ) ‖Wθ ( x ) −W ∗ ( x ) ‖22 . ( 6 ) Gradient-based approaches leverage gradient information of the objective L and optimize Eq . ( 5 ) whereas regression-based approaches optimize a distance to ground-truth solutions W ∗ , such as the squared L2 distance in Eq . ( 6 ) . Prior work has shown that models trained with these objectives can learn to predict the optimal W ∗ directly as a function of x . Given enough regularity of the domain , if we observe new ( test ) samples x′ ∼ p ( x ) we expect the model to generalize and predict the solution to the original optimization problem Eq . ( 4 ) . Gradient-based approaches have the computational advantage of not requiring the expensive ground-truth solutionW ∗ while regression-based approaches are less susceptible to poor local optima in L. Gradient-based approaches are used in variational inference ( Kingma & Welling , 2013 ) , style transfer ( Chen & Schmidt , 2016 ) , meta learning ( Finn et al. , 2017 ; Mishra et al. , 2017 ) , and reinforcement learning , e.g . for the policy update in model-free actor-critic methods ( Sutton & Barto , 2018 ) . Regression-based approaches are more common in control for behavioral cloning and imitation learning ( Duriez et al. , 2017 ; Ratliff et al. , 2007 ; Bain & Sammut , 1995 ) . 3 NEURAL POTTS MODEL . In Eq . ( 2 ) we introduced the Potts model for a single MSA M ( aligned set of sequences x ) , to optimize W ∗ = { h∗ , J∗ } = argminW Ex̃∼M [ ` PL ( x̃ ; W ) ] . As per Eq . ( 5 ) We will now introduce a neural network to estimate Potts model parameters from a single sequence : { hθ ( x ) , Jθ ( x ) } =Wθ ( x ) with a single forward pass . We propose minimizing the following objective for the NPM parameters θ , which directly minimizes the Potts model losses in expectation over our data distribution x ∼ D and their MSAs x̃ ∼M ( x ) : LNPM ( θ ) = E x∼D [ E x̃∼M ( x ) ` PL ( x̃ ; Wθ ( x ) ) ] ( 7 ) To compute the loss for a given sequence x we compute the Potts model parameters Wθ ( x ) , and evaluate its pseudo-likelihood loss ` PL on a set of sequences x̃ from the MSA constructed with x as query sequence . This fits exactly in “ amortized optimization ” in Section 2.1 Eq . ( 5 ) : we train a model to predict the outcome of a set of highly related optimization problems . One key extension to the described amortized optimization setup is that the model Wθ estimates the Potts Model parameters from only the MSA query sequence x as input rather than the full MSAM ( x ) . Thus , our model must learn to distill the protein energy landscape into its parameters , since it can not look up related proteins during runtime . A full algorithm is given in Appendix A . Similar to the original Potts model , we need to add a regularization penalty ρ ( W ) to the main objective . For a finite sample of N different query sequences { xn } , and a corresponding sample of N× M aligned sequences { x̃mn } from MSA M̂ ( xn ) , the finite sample regularized loss , i.e . NPM training objective , becomes : L̂NPM ( θ ) = N∑ n=1 [ 1 Meff ( n ) M∑ m=1 wmn [ ` PL ( x̃ m n ; Wθ ( xn ) ) ] + ρ ( Wθ ( xn ) ) ] ( 8 ) Inductive generalization gain ( see Fig . 2 ) is when the Neural Potts Model improves over the individual Potts model . Intuitively this is possible because the individual Potts Models are not perfect estimates ( finite/biased MSAs ) , while the shared parameters of Wθ can transfer information between related protein families and from pre-training with another objective like masked language modeling ( MLM ) . Let us start with the normal amortized optimization setting , where we expect an amortization gap ( Cremer et al. , 2018 ) . The amortization gap means that Wθ ( x ) will be behind the optimal W ∗ for the objective L : L ( Wθ ( x ) ) > L ( W ∗ ) . This is closely related to underfitting : the model Wθ is not flexible enough to capture W ∗ ( x ) . However , recall that in the Potts model setting , there is a finite-sample training objective L̂ ( Eq . ( 8 ) ) , with minimizer Ŵ ∗ . We can expect an amortization gap in the training objective ; however this amortization gap can now be advantageous . Even if the amortized solution Wθ ( x ) is near-optimal on L̂ , it can likely find a more generalizable region of the overparametrized domain W by parameter sharing of θ , allowing it to transfer information between related instances . The inductive bias of Wθ ( x ) can allow the neural amortized estimate to generalize better , especially when the finite sample M̂ is poor . This inductive bias depends on the choice of model class for Wθ , its pre-training , as well as the shared structure between the protein families in the dataset . Concretely we will consider for the generalization loss L not just the pseudo-likelihood loss on test MSA sequences , but also the performance on downstream validation objectives like predicting contacts , a proxy for the model ’ s ability to capture the underlying structure of the protein . We will show that for some samples L ( Wθ ( x ) ) < L ( Ŵ ∗ ) , i.e . there is an inductive generalization gain . This is visually represented in Fig . 2 ; and Table 1 compares amortized optimization and NPM , making a connection to multi-task learning ( Caruana , 1998 ) . Additionally , we could frame NPM as a hypernetwork , a neural network that predicts the weights of second network ( in this case the Potts model ) as in , e.g. , Gomez & Schmidhuber ( 2005 ) ; Ha et al . ( 2016 ) ; Bertinetto et al . ( 2016 ) . In summary , the goal for the NPM is to “ distill ” an ensemble of Potts models into a single feedforward model . From a self-supervised learning perspective , rather than supervising the model with the input directly , we use supervision from an energy landscape around the input . | The paper proposes a new object called Neural Potts Model (NPM) to train a Transformer to learn the local energy landscape of protein sequences. The problem of modeling energy landscapes using the power of techniques in natural language processing (NLP) is a timely and interesting problem. However, there are some concerns that limit the strength and the main claim of the paper that needs to be addressed. | SP:8a7d41e17157971d368e584c9f0aa7132a361a80 |
Neural Potts Model | 1 INTRODUCTION . When two positions in a protein sequence are in spatial contact in the folded three-dimensional structure of the protein , evolution is not free to choose the amino acid at each position independently . This means that the positions co-evolve : when the amino acid at one position varies , the assignment at the contacting site may vary with it . A multiple sequence alignment ( MSA ) summarizes evolutionary variation by collecting a group of diverse but evolutionarily related sequences . Patterns of variation , including co-evolution , can be observed in the MSA . These patterns are in turn associated with the structure and function of the protein ( Göbel et al. , 1994 ) . Unsupervised contact prediction aims to detect co-evolutionary patterns in the statistics of the MSA and infer structure from them . The standard method for unsupervised contact prediction fits a Potts model energy function to the MSA ( Lapedes et al. , 1999 ; Thomas et al. , 2008 ; Weigt et al. , 2009 ) . Various approximations are used in practice including mean field ( Morcos et al. , 2011 ) , sparse inverse covariance estimation ( Jones et al. , 2011 ) , and pseudolikelihood maximization ( Balakrishnan et al. , 2011 ; Ekeberg et al. , 2013 ; Kamisetty et al. , 2013 ) . To construct the MSA for a given input sequence , a similarity query is performed across a large database to identify related sequences , which are then aligned to each other . Fitting the Potts model to the set of sequences identifies statistical couplings between different sites in the protein , which can be used to infer contacts in the structure ( Weigt et al. , 2009 ) . Contact prediction performance depends on the depth of the MSA and is reduced when few related sequences are available to fit the model . In this work we consider fitting many models across many families simultaneously with parameter sharing across all the families . We introduce this formally as the Neural Potts Model ( NPM ) objective . The objective is an amortized optimization problem across sequence families . A Transformer model is trained to predict the parameters of a Potts model energy function defined by the MSA of each input sequence . This approach builds on the ideas in the emerging field of protein language models ( Alley et al. , 2019 ; Rives et al. , 2019 ; Heinzinger et al. , 2019 ) , which proposes to fit a single model with unsupervised learning across many evolutionarily diverse protein sequences . We extend this core idea to train a model to output an explicit energy landscape for every sequence . To evaluate the approach , we focus on the problem setting of unsupervised contact prediction for proteins with low-depth MSAs . Unsupervised structure learning with Potts models performs poorly when few related sequences are available ( Jones et al. , 2011 ; Kamisetty et al. , 2013 ; Moult et al. , 2016 ) . Since larger protein families are likely to have structures available , the proteins of greatest interest for unsupervised structure prediction are likely to have lower depth MSAs ( Tetchner et al. , 2014 ) . This is especially a problem for higher organisms , where there are fewer related genomes ( Tetchner et al. , 2014 ) . The hope is that for low-depth MSAs , the parameter sharing in the neural model will improve results relative to fitting an independent Potts model to each family . We investigate the NPM objective in a controlled ablation experiment on a group of related protein families in PFAM ( Finn et al. , 2016 ) . In this artificial setting , information can be generalized by the pre-trained shared parameters to improve unsupervised contact prediction on a subset of the MSAs that have been artificially truncated to reduce their number of sequences . We then study the model in the setting of a large dataset without artificial reduction , training the model on MSAs for UniRef50 sequences . In this setting there is also an improvement on average for low depth MSAs both for sequences in the training set as well as for sequences not in the training set . 2 BACKGROUND . Multiple sequence alignments An MSA is a set of aligned protein sequences that are evolutionarily related . MSAs are constructed by retrieving related sequences from a sequence database and aligning the returned sequences using a heuristic . An MSA can be viewed as a matrix where each row is a sequence , and columns contain aligned positions after removing insertions and replacing deletions with gap characters . Potts model The generalized Potts model defines a Gibbs distribution over a protein sequence ( x1 , . . . , xL ) of length L with the negative energy function : −E ( x ) = ∑ i hi ( xi ) + ∑ ij Jij ( xi , xj ) ( 1 ) Which defines potentials hi for each position in the sequence , and couplings Jij for every pair of positions . The parameters of the model are W = { h , J } the set of fields and couplings respectively . The distribution p ( x ; W ) is obtained by normalization as exp { −E ( x ; W ) } /Z ( W ) . Since the normalization constant is intractable , pseudolikelihood is commonly used to fit the parameters ( Balakrishnan et al. , 2011 ; Ekeberg et al. , 2013 ) . Pseudolikelihood approximates the likelihood of a sequence x as a product of conditional distributions : ` PL ( x ; W ) = − ∑ i log p ( xi|x−i ; W ) . To estimate the Potts model , we take the expectation : LPL ( W ) = E x∼M [ ` PL ( x ; W ) ] ( 2 ) over an MSAM . In practice , we have a finite set of sequences M̂ in the MSA to estimate Eq . ( 2 ) . L2 regularization ρ ( W ) = λJ ‖J‖2 + λh ‖h‖2 is added , and sequences are reweighted to account for redundancy ( Morcos et al. , 2011 ) . We write the regularized finite sample estimator as : L̂PL ( W ) = 1 Meff M∑ m=1 wm [ ` PL ( x m ; W ) ] + ρ ( W ) ( 3 ) Which sums over all the M sequences of the finite MSA M̂ , weighted with wm summing collectively to Meff . The finite sample estimate of the parameters Ŵ ∗ is obtained by minimizing L̂PL . Idealized MSA Notice how in Eq . ( 2 ) , we idealized the MSAM as a distribution , defined by the protein family . We consider the set of sequences actually retrieved in the MSA M̂ in Eq . ( 3 ) as a finite sample from this underlying idealized distribution . For some protein families this sample will contain more information than for others , depending on what sequences are present in the database . We will refer to W ∗ as a hypothetical idealized estimate of the parameters to explain how the Neural Potts Model can improve on the finite sample estimate Ŵ ∗ for low-depth MSAs . 2.1 AMORTIZED OPTIMIZATION . We review amortized optimization ( Shu , 2017 ) , a generalization of amortized variational inference ( Kingma & Welling , 2013 ; Rezende et al. , 2014 ) that uses learning to predict the solution to continuous optimization problems to make the computation more tractable and potentially generalize across problem instances . We are interested in repeatedly solving expensive optimization problems W ∗ ( x ) = argmin W L ( W ; x ) , ( 4 ) where W ∈ Rm is the optimization variable , x ∈ Rn is the input or conditioning variable to the optimization problem , and L : Rm × Rn → R is the objective . We assume W ∗ ( x ) is unique . We consider the setting of having a distribution over optimization problems with inputs x ∼ p ( x ) , and the argmin of those optimization problems W ∗ ( x ) . Amortization uses learning to leverage the shared structure present across the distribution , e.g . a solutionW ∗ ( x ) is likely correlated with another solutionW ∗ ( x′ ) . Assuming an underlying regularity of the data and loss L , we can imagine learning to predict the outcome of the optimization problem with an expressive model Wθ ( x ) such that hopefully Wθ ≈W ∗ . Modeling and learning Wθ ( x ) are the key design decisions when using amortization . Modeling approaches . In this paper we consider models Wθ ( x ) that directly predict the solution to Eq . ( 4 ) with a neural network , an approach which follows fully amortized variational inference models and the meta-learning method ( Mishra et al. , 2017 ) . The model can also leverage the objective information L ( W ; x ) and gradient information ∇WL ( W ; x ) , e.g . by predicting multiple candidate solutions W and selecting the most optimal one . This is sometimes referred to as semi-amortization or unrolled optimization-based models and is considered in Gregor & LeCun ( 2010 ) for sparse coding , Li & Malik ( 2016 ) ; Andrychowicz et al . ( 2016 ) ; Finn et al . ( 2017 ) for meta-learning , and Marino et al . ( 2018 ) ; Kim et al . ( 2018 ) for posterior optimization . Learning approaches . There are two main classes of learning approaches for amortization : argmin θ E p ( x ) L ( Wθ ( x ) ; x ) ( 5 ) argmin θ E p ( x ) ‖Wθ ( x ) −W ∗ ( x ) ‖22 . ( 6 ) Gradient-based approaches leverage gradient information of the objective L and optimize Eq . ( 5 ) whereas regression-based approaches optimize a distance to ground-truth solutions W ∗ , such as the squared L2 distance in Eq . ( 6 ) . Prior work has shown that models trained with these objectives can learn to predict the optimal W ∗ directly as a function of x . Given enough regularity of the domain , if we observe new ( test ) samples x′ ∼ p ( x ) we expect the model to generalize and predict the solution to the original optimization problem Eq . ( 4 ) . Gradient-based approaches have the computational advantage of not requiring the expensive ground-truth solutionW ∗ while regression-based approaches are less susceptible to poor local optima in L. Gradient-based approaches are used in variational inference ( Kingma & Welling , 2013 ) , style transfer ( Chen & Schmidt , 2016 ) , meta learning ( Finn et al. , 2017 ; Mishra et al. , 2017 ) , and reinforcement learning , e.g . for the policy update in model-free actor-critic methods ( Sutton & Barto , 2018 ) . Regression-based approaches are more common in control for behavioral cloning and imitation learning ( Duriez et al. , 2017 ; Ratliff et al. , 2007 ; Bain & Sammut , 1995 ) . 3 NEURAL POTTS MODEL . In Eq . ( 2 ) we introduced the Potts model for a single MSA M ( aligned set of sequences x ) , to optimize W ∗ = { h∗ , J∗ } = argminW Ex̃∼M [ ` PL ( x̃ ; W ) ] . As per Eq . ( 5 ) We will now introduce a neural network to estimate Potts model parameters from a single sequence : { hθ ( x ) , Jθ ( x ) } =Wθ ( x ) with a single forward pass . We propose minimizing the following objective for the NPM parameters θ , which directly minimizes the Potts model losses in expectation over our data distribution x ∼ D and their MSAs x̃ ∼M ( x ) : LNPM ( θ ) = E x∼D [ E x̃∼M ( x ) ` PL ( x̃ ; Wθ ( x ) ) ] ( 7 ) To compute the loss for a given sequence x we compute the Potts model parameters Wθ ( x ) , and evaluate its pseudo-likelihood loss ` PL on a set of sequences x̃ from the MSA constructed with x as query sequence . This fits exactly in “ amortized optimization ” in Section 2.1 Eq . ( 5 ) : we train a model to predict the outcome of a set of highly related optimization problems . One key extension to the described amortized optimization setup is that the model Wθ estimates the Potts Model parameters from only the MSA query sequence x as input rather than the full MSAM ( x ) . Thus , our model must learn to distill the protein energy landscape into its parameters , since it can not look up related proteins during runtime . A full algorithm is given in Appendix A . Similar to the original Potts model , we need to add a regularization penalty ρ ( W ) to the main objective . For a finite sample of N different query sequences { xn } , and a corresponding sample of N× M aligned sequences { x̃mn } from MSA M̂ ( xn ) , the finite sample regularized loss , i.e . NPM training objective , becomes : L̂NPM ( θ ) = N∑ n=1 [ 1 Meff ( n ) M∑ m=1 wmn [ ` PL ( x̃ m n ; Wθ ( xn ) ) ] + ρ ( Wθ ( xn ) ) ] ( 8 ) Inductive generalization gain ( see Fig . 2 ) is when the Neural Potts Model improves over the individual Potts model . Intuitively this is possible because the individual Potts Models are not perfect estimates ( finite/biased MSAs ) , while the shared parameters of Wθ can transfer information between related protein families and from pre-training with another objective like masked language modeling ( MLM ) . Let us start with the normal amortized optimization setting , where we expect an amortization gap ( Cremer et al. , 2018 ) . The amortization gap means that Wθ ( x ) will be behind the optimal W ∗ for the objective L : L ( Wθ ( x ) ) > L ( W ∗ ) . This is closely related to underfitting : the model Wθ is not flexible enough to capture W ∗ ( x ) . However , recall that in the Potts model setting , there is a finite-sample training objective L̂ ( Eq . ( 8 ) ) , with minimizer Ŵ ∗ . We can expect an amortization gap in the training objective ; however this amortization gap can now be advantageous . Even if the amortized solution Wθ ( x ) is near-optimal on L̂ , it can likely find a more generalizable region of the overparametrized domain W by parameter sharing of θ , allowing it to transfer information between related instances . The inductive bias of Wθ ( x ) can allow the neural amortized estimate to generalize better , especially when the finite sample M̂ is poor . This inductive bias depends on the choice of model class for Wθ , its pre-training , as well as the shared structure between the protein families in the dataset . Concretely we will consider for the generalization loss L not just the pseudo-likelihood loss on test MSA sequences , but also the performance on downstream validation objectives like predicting contacts , a proxy for the model ’ s ability to capture the underlying structure of the protein . We will show that for some samples L ( Wθ ( x ) ) < L ( Ŵ ∗ ) , i.e . there is an inductive generalization gain . This is visually represented in Fig . 2 ; and Table 1 compares amortized optimization and NPM , making a connection to multi-task learning ( Caruana , 1998 ) . Additionally , we could frame NPM as a hypernetwork , a neural network that predicts the weights of second network ( in this case the Potts model ) as in , e.g. , Gomez & Schmidhuber ( 2005 ) ; Ha et al . ( 2016 ) ; Bertinetto et al . ( 2016 ) . In summary , the goal for the NPM is to “ distill ” an ensemble of Potts models into a single feedforward model . From a self-supervised learning perspective , rather than supervising the model with the input directly , we use supervision from an energy landscape around the input . | This paper aims to improve low-depth MSAs, when a protein of interest only has a small number of known evolutionarily related sequences. This is a well motivated problem. MSAs are commonly used for a variety of purposes. Methods to enhance low-depth MSAs can be very useful. In particular, this paper focuses on using MSAs for contact prediction as a down-stream task. I'm not sure if contact prediction is the best use case for this, but it's a well-studied task for proof of concept. | SP:8a7d41e17157971d368e584c9f0aa7132a361a80 |
Improving Mutual Information based Feature Selection by Boosting Unique Relevance | 1 INTRODUCTION . High-dimensional datasets tend to contain irrelevant or redundant features , leading to extra computation , larger storage , and decreased performance ( Bengio et al. , 2013 ; Gao et al. , 2016 ; Bermingham et al. , 2015 ; Hoque et al. , 2016 ) . Mutual Information ( MI ) ( Cover & Thomas , 2006 ) based feature selection , which is a classifier independent filter method , addresses those issues by selecting a relevant feature subset . We start this paper by discussing the value of MI based feature selection ( MIBFS ) . Interpretability : Dimensionality reduction methods consist of two classes : feature extraction and feature selection . Feature extraction transforms original features into new features with lower dimensionality ( e.g. , PCA ) . This method may perform well in dimensionality reduction , but the extraction process ( e.g. , projection ) loses the physical meaning of features ( Chandrashekar & Sahin , 2014 ; Sun & Xu , 2014 ; Nguyen et al. , 2014 ; Gao et al. , 2016 ) . In contrast , feature selection preserves the interpretability by selecting a relevant feature subset . This helps to understand the hidden relationship between variables and makes techniques such as MIBFS preferred in various domains ( e.g. , healthcare ) ( Kim et al. , 2015 ; Liu et al. , 2018 ; Chandrashekar & Sahin , 2014 ) . Generalization : Feature selection methods are either classifier dependent or classifier independent ( Guyon & Elisseeff , 2003 ; Chandrashekar & Sahin , 2014 ) . Examples of the former type include the wrapper method and the embedded method ( e.g. , LASSO ( Hastie et al. , 2015 ) ) which performs feature selection during the training of a pre-defined classifier . The classifier dependent method tends to provide good performance as it directly makes use of the interaction between features and accuracy . However , the selected features are optimized for the pre-defined classifier and may not perform well for other classifiers . The filter method , which is classifier independent , scores each feature according to its relevance with the label . As a filter method , MIBFS quantifies relevance using MI as MI can capture the dependencies between random variables ( e.g. , feature and label ) . Consequently , the feature subset selected by MIBFS is not tied to the bias of the classifier and is relatively easier to generalize ( Bengio et al. , 2013 ; L. et al. , 2011 ; Meyer et al. , 2008 ) . Performance : Although MIBFS is an old idea dating back to 1992 ( Lewis , 1992 ) , it still can provide competitive performance in dimensionality reduction ( see several recent survey works ( Zebari & et al , 2020 ; Venkatesh & Anuradha , 2019 ) ) . We now provide a new perspective using the Information Bottleneck ( Tishby et al. , 2000 ) ( IB ) to explain the superior performance of MIBFS and suggest why MI is the right metric for feature selection . IB was proposed to search for the solution that achieves the largest possible compression , while retaining the essential information about the target and in ( Shwartz-Ziv & Tishby , 2017 ) , IB is used to explain the behavior of neural networks . Specifically , let X be the input data to the neural network , Y be the corresponding label and X̃ be the hidden representation of neural networks . Shwartz-Ziv & Tishby ( 2017 ) demonstrate that the learning process in neural networks consists of two phases : ( i ) empirical error minimization ( ERM ) , where I ( X̃ ; Y ) gradually increases to capture relevant information about the label Y . ( ii ) representation compression , where I ( X̃ , X ) decreases and I ( X̃ ; Y ) remains almost unchanged , which may be responsible for the absence of overfitting in neural networks . We note that the goal of MIBFS is to find the minimal feature subset with maximum MI with respect to the label ( Brown et al. , 2012 ) . Mathematically , the goal can be written as follows . S∗ = arg min f ( arg max S⊆Ω I ( S ; Y ) ) , ( 1 ) where f ( A , B , · · · ) = ( |A| , |B| , · · · ) , |A| represents the number of features in A and Ω is the set of all features , S ⊆ Ω is the selected feature subset and S∗ is the optimal feature subset . In such a manner , MIBFS naturally converts the representation learning process of neural networks to the process of feature selection ( if we consider S as a type of hidden representation X̃ ) and attempts to obtain an equivalent learning outcome . Specifically , maximizing the I ( S ; Y ) corresponds to the ERM phase and minimizing the size of S corresponds to the representation compression phase . We believe this new perspective sheds light on the superior performance of MIBFS in dimensionality reduction and rationalizes the use of MI for feature selection . We note that finding the optimal feature subset S∗ in ( 1 ) through exhaustive search is computationally intractable . Therefore , numerous MIBFS algorithms ( Meyer et al. , 2008 ; Yang & Moody , 2000 ; Nguyen et al. , 2014 ; Bennasar et al. , 2015 ; Peng et al. , 2005 ) are proposed and attempt to select the optimal feature subset following the criterion of Maximize Relevance with Minimum Redundancy ( MRwMR ) ( Peng et al. , 2005 ) . In this paper , we explore a promising feature property , called Unique Relevance ( UR ) , which is the key to select the optimal feature subset in ( 1 ) . We note that UR has been defined for a long time and it is also known as strong relevance ( Kohavi & John , 1997 ) . However , only very few works ( Liu et al. , 2018 ; Liu & Motani , 2020 ) look into it and the use of UR for feature selection remains largely uninvestigated . We fill in this gap and improve the performance of MIBFS by exploring the utility of UR . We describe the flow of the remaining paper together with several contributions as follows . 1 . We shortlist seven state-of-the-art ( SOTA ) and classical MIBFS algorithms and uncover the fact that all of them ignore UR and end up underperforming , namely they select a non-negligible number of redundant features , contradicting the objective of minimal feature subset in ( 1 ) . In fact , it turns out that the minimal feature subset in ( 1 ) must contain all features with UR . 2 . We point out that , the heart of the problem is that existing MIBFS algorithms following the criterion of MRwMR ( Peng et al. , 2005 ) , which lacks a mechanism to explicitly identify the UR of features . This motivates us to augment MRwMR and include the objective of boosting UR , leading to a new criterion for MIBFS , called MRwMR-BUR . 3 . We estimate UR using the KSG estimator ( Kraskov et al. , 2004 ) and conduct experiments with five representative MIBFS algorithms on six datasets . The results indicate that the algorithms that boost UR consistently outperform their unboosted counterparts when tested with three classifiers . 4 . We improve MRwMR-BUR by proposing a classifier based approach to estimate UR and our experimental results indicate that this approach further improves the classification performance of MRwMR-BUR based algorithms . 2 BACKGROUND AND DEFINITIONS . We now formally define the notation used in this paper . We denote the set of all features by Ω = { Xk , k = 1 , · · · , M } , where M is the number of features . The feature Xk ∈ Ω and the label Y are both vectors of length N , where N is the number of samples . Let S ⊆ Ω be the set of selected features and S̃ ⊆ Ω be the set of unselected features , i.e. , Ω = { S , S̃ } . 2.1 INFORMATION CONTENT : OR , UR , II . The information content presents in a feature can be divided into three parts : Overlapped Relevance , Unique Relevance and Irrelevant Information ( see Feature A in Fig . 1 ) . Relevant information is quantified using MI with the label . The Unique Relevance ( UR ) of a feature Xk is defined as the unique relevant information which is not shared by any other features in Ω . Mathematically , UR can be calculated as the MI loss when removing that feature from Ω . By the chain rule for MI ( Cover & Thomas , 2006 ) , UR can be written as UR = I ( Ω ; Y ) − I ( Ω\Xk ; Y ) = I ( Xk ; Y |Ω\Xk ) . ( 2 ) We note that UR is equivalent to strong relevance defined in ( Kohavi & John , 1997 ; Brown et al. , 2012 ) . The Overlapped Relevance ( OR ) of a feature Xk is the relevant information content of a feature Xk which is shared ( or overlapped ) with other features in Ω . By the chain rule for MI , OR can be written as OR = I ( Xk ; Y ) − ( I ( Ω ; Y ) − I ( Ω\ ( Xk ) ; Y ) ) . ( 3 ) The definition of OR is equivalent to weak relevance defined in ( Kohavi & John , 1997 ; Brown et al. , 2012 ) . Consider an example of Ω containing two features Xj and Xk , then the OR of feature Xk is I ( Xj ; Xk ; Y ) , which is known as multivariate mutual information . A positive value of I ( Xj ; Xk ; Y ) is a sign of redundancy , while a negative value expresses synergy ( McGill , 1954 ) . Irrelevant information ( II ) can be understood as the noise in the signal . Overfitting to the irrelevant aspects of the data will confuse the classifier , leading to decreased accuracy ( John et al. , 1994 ; Song et al. , 2011 ) . Mathematically , we define II of feature Xk as II = H ( Xk ) − I ( Xk ; Y ) = H ( Xk|Y ) . ( 4 ) We note that a feature Xk can be completely irrelevant with respect to the label Y if I ( Xk ; Y ) = 0 . There is another popular type of decomposition called partial information decomposition ( PID ) ( Williams & Beer , 2010 ) which decomposes the total mutual information of a system into three parts : unique information , redundant information , synergistic information and a follow-up work ( Bertschinger & et al , 2014 ) attempts to quantify each term based on ideas from decision theory . The definition of UR is the same as the unique information in ( Williams & Beer , 2010 ) , but calculated differently from ( Bertschinger & et al , 2014 ) . Furthermore , OR is equal to the difference of shared information and synergistic information in ( Bertschinger & et al , 2014 ) . 2.2 ESTIMATION OF MUTUAL INFORMATION . In this paper , we estimate MI using the KSG estimator ( Kraskov et al. , 2004 ) which uses the K nearest neighbors of points in the dataset to detect structure in the underlying probability distribution . In a recent work ( Gao et al. , 2018 ) , the KSG estimator is proven to be consistent under some mild assumptions . We note that the KSG estimator is not applicable when the random variable being studied is a mixture of continuous and discrete values . For the case with mixed random variables , we can apply the mixed KSG estimator ( Gao & et al , 2017 ) , which demonstrates good performance at handling mixed variables . We note that the features of all datasets studied in this paper are either purely discrete ( real-valued ) or continuous while all labels are purely discrete ( real-valued ) ( see Table 1 ) . Hence , we use the KSG estimator ( Kraskov et al. , 2004 ) to compute MI quantities . | This work suggests improving mutual informaton based feature selection methods with an extra term (i.e., the unique relevance (UR)), and introduces a hyper-parameter $\beta$ to weight the UR. The work is easy to follow. However, the perspectives and methods are not novel. And there is a technical flaw in the analysis. | SP:121b6641093615ae9740da48399381c9ce68092e |
Improving Mutual Information based Feature Selection by Boosting Unique Relevance | 1 INTRODUCTION . High-dimensional datasets tend to contain irrelevant or redundant features , leading to extra computation , larger storage , and decreased performance ( Bengio et al. , 2013 ; Gao et al. , 2016 ; Bermingham et al. , 2015 ; Hoque et al. , 2016 ) . Mutual Information ( MI ) ( Cover & Thomas , 2006 ) based feature selection , which is a classifier independent filter method , addresses those issues by selecting a relevant feature subset . We start this paper by discussing the value of MI based feature selection ( MIBFS ) . Interpretability : Dimensionality reduction methods consist of two classes : feature extraction and feature selection . Feature extraction transforms original features into new features with lower dimensionality ( e.g. , PCA ) . This method may perform well in dimensionality reduction , but the extraction process ( e.g. , projection ) loses the physical meaning of features ( Chandrashekar & Sahin , 2014 ; Sun & Xu , 2014 ; Nguyen et al. , 2014 ; Gao et al. , 2016 ) . In contrast , feature selection preserves the interpretability by selecting a relevant feature subset . This helps to understand the hidden relationship between variables and makes techniques such as MIBFS preferred in various domains ( e.g. , healthcare ) ( Kim et al. , 2015 ; Liu et al. , 2018 ; Chandrashekar & Sahin , 2014 ) . Generalization : Feature selection methods are either classifier dependent or classifier independent ( Guyon & Elisseeff , 2003 ; Chandrashekar & Sahin , 2014 ) . Examples of the former type include the wrapper method and the embedded method ( e.g. , LASSO ( Hastie et al. , 2015 ) ) which performs feature selection during the training of a pre-defined classifier . The classifier dependent method tends to provide good performance as it directly makes use of the interaction between features and accuracy . However , the selected features are optimized for the pre-defined classifier and may not perform well for other classifiers . The filter method , which is classifier independent , scores each feature according to its relevance with the label . As a filter method , MIBFS quantifies relevance using MI as MI can capture the dependencies between random variables ( e.g. , feature and label ) . Consequently , the feature subset selected by MIBFS is not tied to the bias of the classifier and is relatively easier to generalize ( Bengio et al. , 2013 ; L. et al. , 2011 ; Meyer et al. , 2008 ) . Performance : Although MIBFS is an old idea dating back to 1992 ( Lewis , 1992 ) , it still can provide competitive performance in dimensionality reduction ( see several recent survey works ( Zebari & et al , 2020 ; Venkatesh & Anuradha , 2019 ) ) . We now provide a new perspective using the Information Bottleneck ( Tishby et al. , 2000 ) ( IB ) to explain the superior performance of MIBFS and suggest why MI is the right metric for feature selection . IB was proposed to search for the solution that achieves the largest possible compression , while retaining the essential information about the target and in ( Shwartz-Ziv & Tishby , 2017 ) , IB is used to explain the behavior of neural networks . Specifically , let X be the input data to the neural network , Y be the corresponding label and X̃ be the hidden representation of neural networks . Shwartz-Ziv & Tishby ( 2017 ) demonstrate that the learning process in neural networks consists of two phases : ( i ) empirical error minimization ( ERM ) , where I ( X̃ ; Y ) gradually increases to capture relevant information about the label Y . ( ii ) representation compression , where I ( X̃ , X ) decreases and I ( X̃ ; Y ) remains almost unchanged , which may be responsible for the absence of overfitting in neural networks . We note that the goal of MIBFS is to find the minimal feature subset with maximum MI with respect to the label ( Brown et al. , 2012 ) . Mathematically , the goal can be written as follows . S∗ = arg min f ( arg max S⊆Ω I ( S ; Y ) ) , ( 1 ) where f ( A , B , · · · ) = ( |A| , |B| , · · · ) , |A| represents the number of features in A and Ω is the set of all features , S ⊆ Ω is the selected feature subset and S∗ is the optimal feature subset . In such a manner , MIBFS naturally converts the representation learning process of neural networks to the process of feature selection ( if we consider S as a type of hidden representation X̃ ) and attempts to obtain an equivalent learning outcome . Specifically , maximizing the I ( S ; Y ) corresponds to the ERM phase and minimizing the size of S corresponds to the representation compression phase . We believe this new perspective sheds light on the superior performance of MIBFS in dimensionality reduction and rationalizes the use of MI for feature selection . We note that finding the optimal feature subset S∗ in ( 1 ) through exhaustive search is computationally intractable . Therefore , numerous MIBFS algorithms ( Meyer et al. , 2008 ; Yang & Moody , 2000 ; Nguyen et al. , 2014 ; Bennasar et al. , 2015 ; Peng et al. , 2005 ) are proposed and attempt to select the optimal feature subset following the criterion of Maximize Relevance with Minimum Redundancy ( MRwMR ) ( Peng et al. , 2005 ) . In this paper , we explore a promising feature property , called Unique Relevance ( UR ) , which is the key to select the optimal feature subset in ( 1 ) . We note that UR has been defined for a long time and it is also known as strong relevance ( Kohavi & John , 1997 ) . However , only very few works ( Liu et al. , 2018 ; Liu & Motani , 2020 ) look into it and the use of UR for feature selection remains largely uninvestigated . We fill in this gap and improve the performance of MIBFS by exploring the utility of UR . We describe the flow of the remaining paper together with several contributions as follows . 1 . We shortlist seven state-of-the-art ( SOTA ) and classical MIBFS algorithms and uncover the fact that all of them ignore UR and end up underperforming , namely they select a non-negligible number of redundant features , contradicting the objective of minimal feature subset in ( 1 ) . In fact , it turns out that the minimal feature subset in ( 1 ) must contain all features with UR . 2 . We point out that , the heart of the problem is that existing MIBFS algorithms following the criterion of MRwMR ( Peng et al. , 2005 ) , which lacks a mechanism to explicitly identify the UR of features . This motivates us to augment MRwMR and include the objective of boosting UR , leading to a new criterion for MIBFS , called MRwMR-BUR . 3 . We estimate UR using the KSG estimator ( Kraskov et al. , 2004 ) and conduct experiments with five representative MIBFS algorithms on six datasets . The results indicate that the algorithms that boost UR consistently outperform their unboosted counterparts when tested with three classifiers . 4 . We improve MRwMR-BUR by proposing a classifier based approach to estimate UR and our experimental results indicate that this approach further improves the classification performance of MRwMR-BUR based algorithms . 2 BACKGROUND AND DEFINITIONS . We now formally define the notation used in this paper . We denote the set of all features by Ω = { Xk , k = 1 , · · · , M } , where M is the number of features . The feature Xk ∈ Ω and the label Y are both vectors of length N , where N is the number of samples . Let S ⊆ Ω be the set of selected features and S̃ ⊆ Ω be the set of unselected features , i.e. , Ω = { S , S̃ } . 2.1 INFORMATION CONTENT : OR , UR , II . The information content presents in a feature can be divided into three parts : Overlapped Relevance , Unique Relevance and Irrelevant Information ( see Feature A in Fig . 1 ) . Relevant information is quantified using MI with the label . The Unique Relevance ( UR ) of a feature Xk is defined as the unique relevant information which is not shared by any other features in Ω . Mathematically , UR can be calculated as the MI loss when removing that feature from Ω . By the chain rule for MI ( Cover & Thomas , 2006 ) , UR can be written as UR = I ( Ω ; Y ) − I ( Ω\Xk ; Y ) = I ( Xk ; Y |Ω\Xk ) . ( 2 ) We note that UR is equivalent to strong relevance defined in ( Kohavi & John , 1997 ; Brown et al. , 2012 ) . The Overlapped Relevance ( OR ) of a feature Xk is the relevant information content of a feature Xk which is shared ( or overlapped ) with other features in Ω . By the chain rule for MI , OR can be written as OR = I ( Xk ; Y ) − ( I ( Ω ; Y ) − I ( Ω\ ( Xk ) ; Y ) ) . ( 3 ) The definition of OR is equivalent to weak relevance defined in ( Kohavi & John , 1997 ; Brown et al. , 2012 ) . Consider an example of Ω containing two features Xj and Xk , then the OR of feature Xk is I ( Xj ; Xk ; Y ) , which is known as multivariate mutual information . A positive value of I ( Xj ; Xk ; Y ) is a sign of redundancy , while a negative value expresses synergy ( McGill , 1954 ) . Irrelevant information ( II ) can be understood as the noise in the signal . Overfitting to the irrelevant aspects of the data will confuse the classifier , leading to decreased accuracy ( John et al. , 1994 ; Song et al. , 2011 ) . Mathematically , we define II of feature Xk as II = H ( Xk ) − I ( Xk ; Y ) = H ( Xk|Y ) . ( 4 ) We note that a feature Xk can be completely irrelevant with respect to the label Y if I ( Xk ; Y ) = 0 . There is another popular type of decomposition called partial information decomposition ( PID ) ( Williams & Beer , 2010 ) which decomposes the total mutual information of a system into three parts : unique information , redundant information , synergistic information and a follow-up work ( Bertschinger & et al , 2014 ) attempts to quantify each term based on ideas from decision theory . The definition of UR is the same as the unique information in ( Williams & Beer , 2010 ) , but calculated differently from ( Bertschinger & et al , 2014 ) . Furthermore , OR is equal to the difference of shared information and synergistic information in ( Bertschinger & et al , 2014 ) . 2.2 ESTIMATION OF MUTUAL INFORMATION . In this paper , we estimate MI using the KSG estimator ( Kraskov et al. , 2004 ) which uses the K nearest neighbors of points in the dataset to detect structure in the underlying probability distribution . In a recent work ( Gao et al. , 2018 ) , the KSG estimator is proven to be consistent under some mild assumptions . We note that the KSG estimator is not applicable when the random variable being studied is a mixture of continuous and discrete values . For the case with mixed random variables , we can apply the mixed KSG estimator ( Gao & et al , 2017 ) , which demonstrates good performance at handling mixed variables . We note that the features of all datasets studied in this paper are either purely discrete ( real-valued ) or continuous while all labels are purely discrete ( real-valued ) ( see Table 1 ) . Hence , we use the KSG estimator ( Kraskov et al. , 2004 ) to compute MI quantities . | In this paper, the authors recognized the function of unique relevance (UR) of features for optimal feature selection and augmented the existing mutual information based feature selection (MIBFS) methods by boosting unique relevance (BUR). As a result, they proposed a new criterion called MRwMR-BUR. Experimental results are provided to show that MIBFS with UR consistently outperform their unboosted conterparts in terms of peak accuracy and number of features required. | SP:121b6641093615ae9740da48399381c9ce68092e |
Adversarial Training using Contrastive Divergence | 1 INTRODUCTION . Although deep neural networks have become increasingly popular and successful in many machine learning tasks ( e.g. , image recognition He et al . ( 2016b ) , speech recognition Hinton et al . ( 2012 ) ; van den Oord et al . ( 2016 ) and natural language processing Hochreiter & Schmidhuber ( 1997 ) ; Vaswani et al . ( 2017 ) ) , the discovery of adversarial examples Szegedy et al . ( 2014 ) ; Goodfellow et al . ( 2015 ) has attracted great attention to strengthening the robustness of deep neural network ( DNN ) under such subtle but malicious perturbations . These crafted samples pose potential security threats in various safety-critical tasks such as autonomous vehicles Evtimov et al . ( 2017 ) or face recognition Sharif et al . ( 2016 ) ; Dong et al . ( 2019 ) , which are required to be highly stable and reliable . Unfortunately , it is considered to be unresolved since no final conclusion has yet been reached on the root of the adversarial examples . Many defense methods Papernot et al . ( 2016 ) ; Na et al . ( 2018 ) ; Buckman et al . ( 2018 ) motivated by different interpretability of adversarial examples Goodfellow et al . ( 2015 ) ; Fawzi et al . ( 2018 ) ; Ma et al . ( 2018 ) were broken within a short time , indicating that there is still no thorough solution to settle this matter once and away . Nonetheless , adversarial training Szegedy et al . ( 2014 ) ; Goodfellow et al . ( 2015 ) has shown its ability to make classifiers more robust against sorts of attacks than any other defenses in Madry et al . ( 2018 ) ; Athalye et al . ( 2018 ) . It offers an intuitive approach to handle the problem , which first obtains suitable adversarial examples by solving the inner maximization problem and then update the parameters of ML model from these examples by outer minimization . More and more advanced defenses Kannan et al . ( 2018 ) ; Lin et al . ( 2019 ) ; Xie et al . ( 2019 ) ; Zhang et al . ( 2019c ) are developed based on adversarial training . However , a major issue of the current adversarial training methods is their significantly higher computational cost than regular training . It often needs multiple days and hundreds of GPUs for ImageNet-like datasets to achieve better convergence Xie et al . ( 2019 ) , which makes it nearly intractable and impractical for large models on tons of data . Even for small-sized datasets like CIFAR10 , adversarial training takes much longer time than regular training . To address this issue , we formulate the problem of generating adversarial examples in a Hamiltonian Monte Carlo framework ( HMC ) Neal et al . ( 2011 ) , which can be considered as exploring the stationary distribution of adversarial examples for current parameters . The high computational cost of adversarial training can be easily attributed to the long trajectory of HMC producing . Therefore , we propose a new adversarial training algorithm called ATCD for strengthening the robustness of target models , enlightened by the Contrastive Divergence ( CD ) Hinton ( 2002 ) . We minimize the difference of Kullback-Leibler divergence between two adjacent sampling steps to avoid running long Monte-Carlo Markov Chains ( MCMC ) . Instead of running the chain to achieve equilibrium , we can simply run the chain for fewer or even only one full step and then update the parameters to reduce the tendency of the chain to wander away from the initial distribution on the first step . Our approach is advantageous over existing ones in three folds : • We offer a new perspective on adversarial examples generation in a HMC framework . From the view of HMC , we bridge the relationship between several adversarial examples generating methods and MCMC sampling , which effectively draw multiple fair samples from the underlying distribution of adversarial examples . • By analyzing the trajectory shift of different lengths of MCMC simulating , we speed up the adversarial training by proposing a contrastive adversarial training ( ATCD ) method , which accelerates the process of achieving distribution equilibrium . • We thoroughly compare the effectiveness of our algorithm in various settings and different architectures on ImageNet , CIFAR10 and MNIST . Models trained by our proposed algorithm achieve robust accuracies markedly exceeding the ones trained by regular adversarial training and the state-of-the-art speedup methods when defending against several attacks . 2 BACKGROUND AND RELATED WORK . Adversarial Defense . To deal with the threat of adversarial examples , different strategies have been studied to find countermeasures to protect ML models . These approaches can be roughly categorized into two main types : ( a ) detection only and ( b ) complete defense . The former approaches Bhagoji et al . ( 2018 ) ; Ma et al . ( 2018 ) ; Lee et al . ( 2018 ) ; Tao et al . ( 2018 ) ; Zhang et al . ( 2018 ) is to reject the potential malignant samples before feeding them to the ML models . The latter defenses obfuscate the gradient information of the classifiers to confuse the attack mechanisms including gradient masking Papernot & McDaniel ( 2017 ) ; Athalye et al . ( 2018 ) or randomized models Liu et al . ( 2018 ) ; Xie et al . ( 2018a ) ; Lecuyer et al . ( 2019 ) ; Liu et al . ( 2019 ) . There are also some add-ons modules Xie et al . ( 2019 ) ; Svoboda et al . ( 2019 ) ; Akhtar et al . ( 2018 ) ; Liao et al . ( 2018 ) being appended to the targeted network or adversarial interpolation schemes Zhang & Xu ( 2020 ) ; Lee et al . ( 2020 ) to protect deep networks against the adversarial attacks . Fast Adversarial Training . Besides all the above methods , adversarial training Goodfellow et al . ( 2015 ) ; Kurakin et al . ( 2017 ) ; Kannan et al . ( 2018 ) ; Madry et al . ( 2018 ) ; Tramèr et al . ( 2018 ) ; Liu & Hsieh ( 2019 ) ; Wang et al . ( 2020 ; 2019 ) is the most effective way to ensure better robustness , which has been widely verified in many works and competitions . However , limited works focus on boosting robust accuracy with reasonable training speed . Free Shafahi et al . ( 2019 ) recycle the gradient information computed to reduce the overhead cost of adversarial training . YOPO Zhang et al . ( 2019b ) recast the adversarial training as a discrete time differential game and derive a Pontryagin ’ s Maximum Principle ( PMP ) for it . Fast-FGSM Wong et al . ( 2020 ) combines FGSM with random initialization to accelerate the whole process . Markov Chain Monte Carlo Methods . Markov chain Monte Carlo ( MCMC ) Neal ( 1993 ) provides a powerful framework for exploring the complex solution space and achieves a nearly global optimal solution independent of the initial state . But the slow convergence rate of MCMC hinders its wide use in time critical fields . By utilizing the gradient information in the target solution space , Hamiltonian ( or Hybrid ) Monte Carlo method ( HMC ) Duane et al . ( 1987 ) ; Neal et al . ( 2011 ) achieves tremendous speed-up in comparison to previous MCMC algorithms . Multiple variants of HMC Pasarica & Gelman ( 2010 ) ; Salimans et al . ( 2015 ) ; Hoffman & Gelman ( 2014 ) were yet to be developed for adaptively tuning step size or iterations of leapfrog integrator . The fusion of MCMC and machine learning Tu & Zhu ( 2002 ) ; Chen et al . ( 2014 ) ; Song et al . ( 2017 ) ; Xie et al . ( 2018b ) also shows great potential of MCMC . Contrastive Divergence . Contrastive Divergence ( CD ) has achieved notable success in training energy-based models including Restricted Boltzmann Machines ( RBMs ) as an efficient training method . The standard approach to estimating the derivative of the log-likelihood function is using the Markov chain Monte Carlo Gilks et al . ( 1995 ) , which can be expressed as the difference of two expectations . It runs k MCMC transition steps at each iteration T and iteratively generates a sequence of parameter estimates { θT } T≥0 given an i.i.d . data sample { Xi } N i=1 ∼ pθ̄ , where pθ̄ is the distribution of target samples for the true parameter θ̄ . To reduce the computational complexity , the traditional Contrastive Divergence algorithm computes approximate RBM log-likelihood gradient setting k = 1 . Various works are devoted to addressing the problem of the vanilla CD afterwards , such as uncontrolled biases and divergence Carreira-Perpinan & Hinton ( 2005 ) ; Yuille ( 2005 ) ; MacKay ( 2001 ) ; Fischer & Igel ( 2011 ; 2014 ) . Persistent CD ( PCD ) and its relevant works Tieleman ( 2008 ) ; Tieleman & Hinton ( 2009 ) ; Desjardins et al . ( 2010 ) show a steady decrease of the log-likelihood in many numerical analysis while some works Schulz et al . ( 2010 ) ; Fischer & Igel ( 2010 ) also give examples in which PCD failed to converge . Although none of these works provide a solid convergence guarantee since the major problems of CD family stem from the fact that the stochastic approximation to the true gradient is a biased estimator , our work do not need the exact values of the derivatives . Actually , we just borrow the idea from the vanilla CD to accelerate the process of distribution equilibrium over the visible variables instead of discovering the unknown distribution Pang et al . ( 2018 ) ; Alayrac et al . ( 2019 ) . 3 PRELIMINARIES . Considering a target DNN model f̂ ∈ F , where F is the solution function space for classification task . We assume softmax is employed for the output layer of the model f ( · ) and let f ( x ) denote the softmax output of a given input x ∈ Rd , i.e. , f ( x ) : Rd → RC , where C is the number of categories . We also assume that there exists an oracle mapping function f∗ ∈ F : x 7→ y∗ , which pinpoints the belonging of the input x to all the categories by accurate confidence scores y∗ ∈ RC . The common training is to minimize the cross-entropy ( CE ) loss Jce , which is defined as : f = arg min f∈F E ( x , y ) ∼D [ Jce ( f ( x ) , y ) ] , ( 1 ) where y is the manual one-hot annotation of the input x since y∗ is invisible . The goal of Eq . ( 1 ) is to update the parameters of f for better approaching f∗ , which leads to f ( x ) ≈ y ≈ y∗ = f∗ ( x ) . Suppose the target DNN model correctly classifies most of the input after hundreds of iterations , it will still be badly misclassified by adversarial examples ( i.e. , arg maxc∈ { 1 , ··· , C } f ( x̃ ) c 6= y [ c ] ) . In adversarial training , these constructed adversarial examples are used to updates the model using minibatch SGD . The objective of this minmax game can be formulated as a robust optimization following Madry et al . ( 2018 ) : f ′ = arg min f∈F E ( x , y ) ∼D [ max x̃∈N ( x ) Jce ( f ( x̃ ) , y ) ] , ( 2 ) where the inner maximization problem attempts to generate the most easily misclassified samples while the outer minimization problem is to search a mapping function f ′ which is the closest one to the oracle f∗ . | Adversarial examples are time-consuming to generate. In this paper, the adversarial training is reformulated as a combination of stationary distribution exploring, sampling, and training. A Hamiltonian system is proposed to model data samples from their initial states, and is shown as the general form of FGSM. The sample generation method is proposed via contrastive divergence with few training iterations. Experiments have been validated on datasets. | SP:b478b1c0c0f94040c6272af647685b0185cf16ca |
Adversarial Training using Contrastive Divergence | 1 INTRODUCTION . Although deep neural networks have become increasingly popular and successful in many machine learning tasks ( e.g. , image recognition He et al . ( 2016b ) , speech recognition Hinton et al . ( 2012 ) ; van den Oord et al . ( 2016 ) and natural language processing Hochreiter & Schmidhuber ( 1997 ) ; Vaswani et al . ( 2017 ) ) , the discovery of adversarial examples Szegedy et al . ( 2014 ) ; Goodfellow et al . ( 2015 ) has attracted great attention to strengthening the robustness of deep neural network ( DNN ) under such subtle but malicious perturbations . These crafted samples pose potential security threats in various safety-critical tasks such as autonomous vehicles Evtimov et al . ( 2017 ) or face recognition Sharif et al . ( 2016 ) ; Dong et al . ( 2019 ) , which are required to be highly stable and reliable . Unfortunately , it is considered to be unresolved since no final conclusion has yet been reached on the root of the adversarial examples . Many defense methods Papernot et al . ( 2016 ) ; Na et al . ( 2018 ) ; Buckman et al . ( 2018 ) motivated by different interpretability of adversarial examples Goodfellow et al . ( 2015 ) ; Fawzi et al . ( 2018 ) ; Ma et al . ( 2018 ) were broken within a short time , indicating that there is still no thorough solution to settle this matter once and away . Nonetheless , adversarial training Szegedy et al . ( 2014 ) ; Goodfellow et al . ( 2015 ) has shown its ability to make classifiers more robust against sorts of attacks than any other defenses in Madry et al . ( 2018 ) ; Athalye et al . ( 2018 ) . It offers an intuitive approach to handle the problem , which first obtains suitable adversarial examples by solving the inner maximization problem and then update the parameters of ML model from these examples by outer minimization . More and more advanced defenses Kannan et al . ( 2018 ) ; Lin et al . ( 2019 ) ; Xie et al . ( 2019 ) ; Zhang et al . ( 2019c ) are developed based on adversarial training . However , a major issue of the current adversarial training methods is their significantly higher computational cost than regular training . It often needs multiple days and hundreds of GPUs for ImageNet-like datasets to achieve better convergence Xie et al . ( 2019 ) , which makes it nearly intractable and impractical for large models on tons of data . Even for small-sized datasets like CIFAR10 , adversarial training takes much longer time than regular training . To address this issue , we formulate the problem of generating adversarial examples in a Hamiltonian Monte Carlo framework ( HMC ) Neal et al . ( 2011 ) , which can be considered as exploring the stationary distribution of adversarial examples for current parameters . The high computational cost of adversarial training can be easily attributed to the long trajectory of HMC producing . Therefore , we propose a new adversarial training algorithm called ATCD for strengthening the robustness of target models , enlightened by the Contrastive Divergence ( CD ) Hinton ( 2002 ) . We minimize the difference of Kullback-Leibler divergence between two adjacent sampling steps to avoid running long Monte-Carlo Markov Chains ( MCMC ) . Instead of running the chain to achieve equilibrium , we can simply run the chain for fewer or even only one full step and then update the parameters to reduce the tendency of the chain to wander away from the initial distribution on the first step . Our approach is advantageous over existing ones in three folds : • We offer a new perspective on adversarial examples generation in a HMC framework . From the view of HMC , we bridge the relationship between several adversarial examples generating methods and MCMC sampling , which effectively draw multiple fair samples from the underlying distribution of adversarial examples . • By analyzing the trajectory shift of different lengths of MCMC simulating , we speed up the adversarial training by proposing a contrastive adversarial training ( ATCD ) method , which accelerates the process of achieving distribution equilibrium . • We thoroughly compare the effectiveness of our algorithm in various settings and different architectures on ImageNet , CIFAR10 and MNIST . Models trained by our proposed algorithm achieve robust accuracies markedly exceeding the ones trained by regular adversarial training and the state-of-the-art speedup methods when defending against several attacks . 2 BACKGROUND AND RELATED WORK . Adversarial Defense . To deal with the threat of adversarial examples , different strategies have been studied to find countermeasures to protect ML models . These approaches can be roughly categorized into two main types : ( a ) detection only and ( b ) complete defense . The former approaches Bhagoji et al . ( 2018 ) ; Ma et al . ( 2018 ) ; Lee et al . ( 2018 ) ; Tao et al . ( 2018 ) ; Zhang et al . ( 2018 ) is to reject the potential malignant samples before feeding them to the ML models . The latter defenses obfuscate the gradient information of the classifiers to confuse the attack mechanisms including gradient masking Papernot & McDaniel ( 2017 ) ; Athalye et al . ( 2018 ) or randomized models Liu et al . ( 2018 ) ; Xie et al . ( 2018a ) ; Lecuyer et al . ( 2019 ) ; Liu et al . ( 2019 ) . There are also some add-ons modules Xie et al . ( 2019 ) ; Svoboda et al . ( 2019 ) ; Akhtar et al . ( 2018 ) ; Liao et al . ( 2018 ) being appended to the targeted network or adversarial interpolation schemes Zhang & Xu ( 2020 ) ; Lee et al . ( 2020 ) to protect deep networks against the adversarial attacks . Fast Adversarial Training . Besides all the above methods , adversarial training Goodfellow et al . ( 2015 ) ; Kurakin et al . ( 2017 ) ; Kannan et al . ( 2018 ) ; Madry et al . ( 2018 ) ; Tramèr et al . ( 2018 ) ; Liu & Hsieh ( 2019 ) ; Wang et al . ( 2020 ; 2019 ) is the most effective way to ensure better robustness , which has been widely verified in many works and competitions . However , limited works focus on boosting robust accuracy with reasonable training speed . Free Shafahi et al . ( 2019 ) recycle the gradient information computed to reduce the overhead cost of adversarial training . YOPO Zhang et al . ( 2019b ) recast the adversarial training as a discrete time differential game and derive a Pontryagin ’ s Maximum Principle ( PMP ) for it . Fast-FGSM Wong et al . ( 2020 ) combines FGSM with random initialization to accelerate the whole process . Markov Chain Monte Carlo Methods . Markov chain Monte Carlo ( MCMC ) Neal ( 1993 ) provides a powerful framework for exploring the complex solution space and achieves a nearly global optimal solution independent of the initial state . But the slow convergence rate of MCMC hinders its wide use in time critical fields . By utilizing the gradient information in the target solution space , Hamiltonian ( or Hybrid ) Monte Carlo method ( HMC ) Duane et al . ( 1987 ) ; Neal et al . ( 2011 ) achieves tremendous speed-up in comparison to previous MCMC algorithms . Multiple variants of HMC Pasarica & Gelman ( 2010 ) ; Salimans et al . ( 2015 ) ; Hoffman & Gelman ( 2014 ) were yet to be developed for adaptively tuning step size or iterations of leapfrog integrator . The fusion of MCMC and machine learning Tu & Zhu ( 2002 ) ; Chen et al . ( 2014 ) ; Song et al . ( 2017 ) ; Xie et al . ( 2018b ) also shows great potential of MCMC . Contrastive Divergence . Contrastive Divergence ( CD ) has achieved notable success in training energy-based models including Restricted Boltzmann Machines ( RBMs ) as an efficient training method . The standard approach to estimating the derivative of the log-likelihood function is using the Markov chain Monte Carlo Gilks et al . ( 1995 ) , which can be expressed as the difference of two expectations . It runs k MCMC transition steps at each iteration T and iteratively generates a sequence of parameter estimates { θT } T≥0 given an i.i.d . data sample { Xi } N i=1 ∼ pθ̄ , where pθ̄ is the distribution of target samples for the true parameter θ̄ . To reduce the computational complexity , the traditional Contrastive Divergence algorithm computes approximate RBM log-likelihood gradient setting k = 1 . Various works are devoted to addressing the problem of the vanilla CD afterwards , such as uncontrolled biases and divergence Carreira-Perpinan & Hinton ( 2005 ) ; Yuille ( 2005 ) ; MacKay ( 2001 ) ; Fischer & Igel ( 2011 ; 2014 ) . Persistent CD ( PCD ) and its relevant works Tieleman ( 2008 ) ; Tieleman & Hinton ( 2009 ) ; Desjardins et al . ( 2010 ) show a steady decrease of the log-likelihood in many numerical analysis while some works Schulz et al . ( 2010 ) ; Fischer & Igel ( 2010 ) also give examples in which PCD failed to converge . Although none of these works provide a solid convergence guarantee since the major problems of CD family stem from the fact that the stochastic approximation to the true gradient is a biased estimator , our work do not need the exact values of the derivatives . Actually , we just borrow the idea from the vanilla CD to accelerate the process of distribution equilibrium over the visible variables instead of discovering the unknown distribution Pang et al . ( 2018 ) ; Alayrac et al . ( 2019 ) . 3 PRELIMINARIES . Considering a target DNN model f̂ ∈ F , where F is the solution function space for classification task . We assume softmax is employed for the output layer of the model f ( · ) and let f ( x ) denote the softmax output of a given input x ∈ Rd , i.e. , f ( x ) : Rd → RC , where C is the number of categories . We also assume that there exists an oracle mapping function f∗ ∈ F : x 7→ y∗ , which pinpoints the belonging of the input x to all the categories by accurate confidence scores y∗ ∈ RC . The common training is to minimize the cross-entropy ( CE ) loss Jce , which is defined as : f = arg min f∈F E ( x , y ) ∼D [ Jce ( f ( x ) , y ) ] , ( 1 ) where y is the manual one-hot annotation of the input x since y∗ is invisible . The goal of Eq . ( 1 ) is to update the parameters of f for better approaching f∗ , which leads to f ( x ) ≈ y ≈ y∗ = f∗ ( x ) . Suppose the target DNN model correctly classifies most of the input after hundreds of iterations , it will still be badly misclassified by adversarial examples ( i.e. , arg maxc∈ { 1 , ··· , C } f ( x̃ ) c 6= y [ c ] ) . In adversarial training , these constructed adversarial examples are used to updates the model using minibatch SGD . The objective of this minmax game can be formulated as a robust optimization following Madry et al . ( 2018 ) : f ′ = arg min f∈F E ( x , y ) ∼D [ max x̃∈N ( x ) Jce ( f ( x̃ ) , y ) ] , ( 2 ) where the inner maximization problem attempts to generate the most easily misclassified samples while the outer minimization problem is to search a mapping function f ′ which is the closest one to the oracle f∗ . | This paper proposed a new adversarial attack method by using Markov chain Monte Carlo. Based on this attack method, a new adversarial learning method called adversarial training by using Contrastive Divergence (ATCD) which approaches equilibrium distribution of adversarial examples with only a few iterations is performed. The experimental results demonstrated the effectiveness of ATCD. | SP:b478b1c0c0f94040c6272af647685b0185cf16ca |
The act of remembering: A study in partially observable reinforcement learning | 1 INTRODUCTION . Reinforcement Learning ( RL ) agents learn policies ( i.e. , mappings from observations to actions ) by interacting with an environment . RL agents usually learn memoryless policies , which are policies that only consider the last observation when selecting the next action . In fully observable environments , learning memoryless policies is an effective strategy . However , RL methods often struggle when the environment is partially observable . Indeed , partial observability is one of the main challenges to applying RL in real-world settings ( Dulac-Arnold et al. , 2019 ) . When faced with partially observable environments , RL agents require some form of memory to learn optimal behaviours . This is usually accomplished using k-order memories ( Mnih et al. , 2015 ) , recurrent networks ( Hausknecht & Stone , 2015 ) , or memory-augmented networks ( Oh et al. , 2016 ) . In this paper , we study a lightweight alternative approach to tackle partially observability in RL . The approach consists of providing the agent with an external memory and extra actions to control it ( as shown in Figure 1 ) . The resulting RL problem is still partially observable , but if the external memory is sufficiently expressive , then optimal memoryless policies will also yield globally optimal solutions . Previous works that explored this idea using external binary or continuous memories produced poor results with standard RL methods ( Peshkin et al. , 1999 ; Zhang et al. , 2016 ) . Our work shows that the main issue is with the type of memory they were using , and that RL agents are capable of learning effective strategies to utilize external memories when structured appropriately . In what follows , we • formalize the RL problem in the context of memory-augmented environments and study the theory behind memoryless policies that jointly decide what to do and what to remember ; • propose two novel forms of external memory called Ok and OAk . These k-size buffer memories generalize k-order memories by letting the agent ( learn to ) decide whether to push the current observation into the memory buffer or not ; • empirically evaluate Ok and OAk relative to previously proposed binary ( Bk ) , k-order ( Kk ) , and LSTM memories ( the most widely used approach for partially observable RL ) . Results show that Ok and OAk memories are usually more sample efficient than LSTM memories , while being faster to train and trivial to integrate with off-the-shelf RL methods . We therefore advocate for the adoption of Ok and OAk memories for partially observable RL problems . We end with a discussion of limitations of Ok and OAk and interesting avenues for future work . 2 PRELIMINARIES . RL agents learn how to act by interacting with an environment . Often these environments are modelled as a Markov Decision Process ( MDP ) . An MDP is a tupleM = 〈S , A , R , p , γ , µ〉 , where S is a finite set of states , A is a finite set of actions , R is the finite set of possible rewards , p ( s′ , r|s , a ) defines the dynamics of the MDP , γ is the discount factor , and µ is the initial state distribution . The interaction is usually divided into episodes . At the beginning of an episode , the environment is set to an initial state s0 , sampled from µ . Then , at time step t , the agent observes the current state st ∈ S and executes an action at ∈ A . In response , the environment returns the next state st+1 and immediate reward rt sampled from p ( st+1 , rt|st , at ) . The process then repeats until the end of the episode ( when a new episode will begin ) or potentially keep going for ever in non-episodic MDPs . Agents select actions according to a policy π ( a|s ) —which is a probability distribution from states to actions . The prediction task is to estimate how “ good ” a policy is , where the policy is evaluated according to the expected discounted return in any state . This can be done by estimating the action-value function qπ of policy π , where qπ ( s , a ) represents the expected discounted return when executing action a in state s and following π thereafter . Formally , qπ ( s , a ) = Eπ [ ∞∑ k=0 γkrt+k ∣∣∣∣∣St = s , At = a ] , where Eπ [ · ] denotes the expected value of a random variable given that the agent follows policy π , and t is any time step . qπ is usually estimated using Monte Carlo samples ( Barto & Duff , 1994 ) or TD methods ( Sutton , 1988 ) . The control task involves finding the optimal policy π∗ . This is the policy that maximizes the expected discounted return in every state . To do so , most RL methods rely on the policy improvement theorem , which we discuss in Section 5 . We use a Partially Observable Markov Decision Process ( POMDP ) formulation to model partial observability . A POMDP is a tuple P = 〈S , O , A , R , p , ω , γ , µ〉 , where S , A , R , p , γ , and µ are as in the MDP above , O is a finite set of observations , and ω ( o|s ) is the observation probability distribution . Interacting with a POMDP is similar to an MDP . The environment starts from a sampled initial state s0 ∼ µ . At time step t , the agent is in state st ∈ S , executes an action at ∈ A , receives an immediate reward rt , and moves to st+1 according to p ( st+1 , rt|st , at ) . However , the agent does not observe st directly . Instead , the agent observes ot ∈ O , which is linked to st via ω ( ot|st ) . 3 RELATED WORK . Early attempts to perform RL in partially observable domains focused on learning memoryless policies . Jaakkola et al . ( 1995 ) identified an RL algorithm that was guaranteed to converge to locally optimal memoryless policies , and similar guarantees have been given in the POMDP literature ( Li et al. , 2011 ) . Unfortunately , Singh et al . ( 1994 ) showed that an optimal memoryless policy π∗ ( at|ot ) can be arbitrarily worse than the optimal history-based policy π∗ ( at|o0 , a0 , . . . , ot ) for POMDPs . Different approaches have been proposed to learn history-based policies using some form of stateapproximation technique . For example , model-based RL methods learn a state representation of histories that enables Markovian prediction of future observations , rewards , or expected returns , and then learns policies over that representation ( McCallum , 1996 ; Littman et al. , 2002 ; Poupart & Vlassis , 2008 ; Doshi-Velez et al. , 2013 ; Ghavamzadeh et al. , 2015 ; Zhang et al. , 2019 ; Toro Icarte et al. , 2019 ) . The focus of our work is on model-free methods , which are the state of the art for solving partially observable problems from low-level inputs ( such as images ) . In model-free RL , history-based policies are approximated using recurrent neural networks ( Hausknecht & Stone , 2015 ; Mnih et al. , 2016 ; Wang et al. , 2016 ; Jaderberg et al. , 2016 ) , or some form of memory-augmented neural network ( Oh et al. , 2016 ; Parisotto & Salakhutdinov , 2017 ; Khan et al. , 2017 ; Hung et al. , 2018 ) . They are usually trained using policy gradient methods . These approaches are computationally expensive because they require the backpropagation of gradients through the history of observations and actions for learning history-based policies . In comparison , our approach is much more lightweight – being faster to train than LSTMs and generally having better sample complexity . We note that it is possible to learn memoryless policies that optimally solve POMDPs . The trick is to give the agent a ( large enough ) memory and extra actions to write to it . From the agent ’ s perspective , it learns a standard memoryless policy from observations to actions , but the observations now include the state of the memory , and the actions include options for how to alter the memory . The main purpose of our work is to resurrect this simple idea by understanding why previous work were unable to make it work . We also proposed a unified framework to study agents with external memories and two novel memories that outperform existing forms of external memories . Concretely , the idea of providing some form of external memory to an agent and actions to modify it goes back to Littman ( 1993 ) , who discussed a hypothetical agent that could learn to control an external binary memory in support of solving partially observable tasks . Peshkin et al . ( 1999 ) reported the first empirical results using tabular RL to learn memoryless policies over such binary memories . While the results were promising in some small environments that required only one bit of external memory to be solved , they did not scale to more complex domains . After Peshkin et al . ( 1999 ) , there was not much work trying to push this line of research forward . We believe that the reason is that RL agents can not reliably learn to control binary memories ( as shown in our results ) . That said , there is one recent work that has further explored the idea of modifying external memories using actions . Zhang et al . ( 2016 ) proposed to use continuous memories , where each element in the array was a floating point number , instead of binary memories . However , they learned the memoryless policies using imitation learning and pointed out that standard RL methods did not work because the reward signal was insufficient supervision for the agent to understand how to appropriately control the memory . One contribution of our work is to advance our understanding of methods that provide external memory to standard RL agents , and to show that they can work well in practice . Our work is also related to neural Turing machines ( NTM ) . The idea behind NTM is to provide an external memory to neural networks which they can write to and read from ( Graves et al. , 2014 ) . All their components are differentiable and , hence , they can be trained end-to-end using gradient descent and a training set of input and output examples ( i.e. , they solve a supervised learning problem ) . Zaremba & Sutskever ( 2015 ) proposed a variation of NTMs where they used the Reinforce algorithm to control how to move the head that reads and write over a memory tape – which can be seen as a case where an RL agent learns to ( partially ) control an external memory . That said , their overall system still solves a supervised learning problem as it requires the supervision coming from input and output examples to train the rest of the components in the NTM . 4 AGENTS WITH EXTERNAL MEMORY . In this section , we formally define what it means to provide external memory to an agent , and describe several forms of external memory . We will use the following problem to aid explanation : Example 4.1 ( the gravity domain ( Toro Icarte et al. , 2019 ) ) . The gravity domain , shown in Figure 2 , consists of an agent ( purple triangle ) , a cookie , and a button . The agent can move in the four cardinal directions and receives a reward of 1 when it eats the cookie . Doing so ends the episode . There is an external force pulling the agent down—i.e. , the outcome of the “ move-up ” action is a downward movement with probability 0.9—which can be turned off ( or back on ) by pressing the button . Every episode begins with the agent in the bottom left corner and the external force on . The optimal policy for this problem is to first press the button and then to go to the cookie . Since the agent can not observe the force , optimal behaviour requires memory of the state of the button , meaning that no memoryless policies can solve this problem optimally . However , suppose that the agent was given a single bit that they could write to on every step using the special actions write-1 and write-0 . This memory can then be used to record the state of the button , and so an optimal memoryless policy for this augmented problem will optimally solve the gravity domain . Figure 1 shows a generalization of this idea . From the agent ’ s perspective , they are , as usual , performing actions in an environment and receiving observations and rewards in return . However , they are now interacting with a memory-augmented environment—which consists of a sub-environment ( i.e. , the original POMDP environment ) and a memory . The memory receives an action w ( selected by the agent ) and local information coming from the sub-environment ( o , a , r , o′ ) to update its internal state to m′ . We formalize these external memory modules as follows : Definition 4.1 ( external memories ) . Let P = 〈S , O , A , R , p , ω , γ , µ〉 be a POMDP . An external memory for P is a tuple MP = 〈M , W , Γ , η〉 , where M is a finite set of memory-states , W is a finite set of memory-writing actions , Γ ( m′|m , w , o , a , r , o′ ) is the memory-writing distribution , and η is the initial memory-state distribution . An external memory module defines the set of possible memory configurations ( M ) and how the agent can manipulate that memory ( W and Γ ) . In the one-bit example for the gravity domain , M consists of the two possible values of the bit ( 0 or 1 ) , W consists of the two possible write options of the bit ( 0 or 1 ) , and the memory-writing distribution Γ updates the bit of memory to 0 or 1 depending on which action was selected . We now define a memory-augmented environment as follows : Definition 4.2 ( memory-augmented environments ) . A memory-augmented environment is a tuple E = 〈P , MP〉 where P is a POMDP andMP is an external memory for P . The interaction between an agent and a memory-augmented environment E = 〈P , MP〉 is the same as with the original environment , just with an augmented observation and action space . At the beginning of each episode , an initial state s0 , observation o0 , and memory state m0 , are sampled according to s0 ∼ µ , o0 ∼ ω ( o0|s0 ) , and m0 ∼ η , respectively . At time step t , the agent observes ōt = 〈ot , mt〉 and executes an action āt = 〈at , wt〉 ∈ A × W in E . Consequently , the subenvironment samples an immediate reward rt and the next state st+1 according to p ( st+1 , rt|st , at ) . The sub-environment also samples the next observation ot+1 ∼ ω ( ot+1|st+1 ) . The memory state is then updated to mt+1 according to Γ ( mt+1|mt , wt , ot , at , rt , ot+1 ) . Finally , the agent receives the immediate reward rt and the next observation ōt+1 = 〈ot+1 , mt+1〉 , and the process repeats . Any standard RL algorithm can be used to find a memoryless policy for a given memory-augmented environment E = 〈P , MP〉 . We note that the optimal memoryless policy for E must be at least as good as the optimal memoryless policy for the original POMDP P . This is because E and P share a reward function , and the agent can always choose to ignore the memory . That said , if the external memory moduleMP is “ expressive enough , ” then optimal memoryless policies for 〈P , MP〉 will be just as good as the optimal policy for P . This is shown formally in Appendix A.2 . | This paper focuses on reinforcement learning in partially-observable environments, and revisits the approach that consists of extending the agent with an external memory. The main contribution of the paper is the proposal (and evaluation) of adding an action to the agent, that allows it to push its current observation (and previous action is some cases) in a k-sized queue. The observation of the agent is extended with the contents of the queue. The main argument of the authors is that learning "when to push" is easier for the agent than learning "what to push" (as done with Neural Turing Machines and memory-bit external memories), and being able not to push the current observation allows the agent to remember past observations for longer durations, as opposed to k-step observation windows approaches. | SP:288991f341afc67f98e6318d17b06902b5488f15 |
The act of remembering: A study in partially observable reinforcement learning | 1 INTRODUCTION . Reinforcement Learning ( RL ) agents learn policies ( i.e. , mappings from observations to actions ) by interacting with an environment . RL agents usually learn memoryless policies , which are policies that only consider the last observation when selecting the next action . In fully observable environments , learning memoryless policies is an effective strategy . However , RL methods often struggle when the environment is partially observable . Indeed , partial observability is one of the main challenges to applying RL in real-world settings ( Dulac-Arnold et al. , 2019 ) . When faced with partially observable environments , RL agents require some form of memory to learn optimal behaviours . This is usually accomplished using k-order memories ( Mnih et al. , 2015 ) , recurrent networks ( Hausknecht & Stone , 2015 ) , or memory-augmented networks ( Oh et al. , 2016 ) . In this paper , we study a lightweight alternative approach to tackle partially observability in RL . The approach consists of providing the agent with an external memory and extra actions to control it ( as shown in Figure 1 ) . The resulting RL problem is still partially observable , but if the external memory is sufficiently expressive , then optimal memoryless policies will also yield globally optimal solutions . Previous works that explored this idea using external binary or continuous memories produced poor results with standard RL methods ( Peshkin et al. , 1999 ; Zhang et al. , 2016 ) . Our work shows that the main issue is with the type of memory they were using , and that RL agents are capable of learning effective strategies to utilize external memories when structured appropriately . In what follows , we • formalize the RL problem in the context of memory-augmented environments and study the theory behind memoryless policies that jointly decide what to do and what to remember ; • propose two novel forms of external memory called Ok and OAk . These k-size buffer memories generalize k-order memories by letting the agent ( learn to ) decide whether to push the current observation into the memory buffer or not ; • empirically evaluate Ok and OAk relative to previously proposed binary ( Bk ) , k-order ( Kk ) , and LSTM memories ( the most widely used approach for partially observable RL ) . Results show that Ok and OAk memories are usually more sample efficient than LSTM memories , while being faster to train and trivial to integrate with off-the-shelf RL methods . We therefore advocate for the adoption of Ok and OAk memories for partially observable RL problems . We end with a discussion of limitations of Ok and OAk and interesting avenues for future work . 2 PRELIMINARIES . RL agents learn how to act by interacting with an environment . Often these environments are modelled as a Markov Decision Process ( MDP ) . An MDP is a tupleM = 〈S , A , R , p , γ , µ〉 , where S is a finite set of states , A is a finite set of actions , R is the finite set of possible rewards , p ( s′ , r|s , a ) defines the dynamics of the MDP , γ is the discount factor , and µ is the initial state distribution . The interaction is usually divided into episodes . At the beginning of an episode , the environment is set to an initial state s0 , sampled from µ . Then , at time step t , the agent observes the current state st ∈ S and executes an action at ∈ A . In response , the environment returns the next state st+1 and immediate reward rt sampled from p ( st+1 , rt|st , at ) . The process then repeats until the end of the episode ( when a new episode will begin ) or potentially keep going for ever in non-episodic MDPs . Agents select actions according to a policy π ( a|s ) —which is a probability distribution from states to actions . The prediction task is to estimate how “ good ” a policy is , where the policy is evaluated according to the expected discounted return in any state . This can be done by estimating the action-value function qπ of policy π , where qπ ( s , a ) represents the expected discounted return when executing action a in state s and following π thereafter . Formally , qπ ( s , a ) = Eπ [ ∞∑ k=0 γkrt+k ∣∣∣∣∣St = s , At = a ] , where Eπ [ · ] denotes the expected value of a random variable given that the agent follows policy π , and t is any time step . qπ is usually estimated using Monte Carlo samples ( Barto & Duff , 1994 ) or TD methods ( Sutton , 1988 ) . The control task involves finding the optimal policy π∗ . This is the policy that maximizes the expected discounted return in every state . To do so , most RL methods rely on the policy improvement theorem , which we discuss in Section 5 . We use a Partially Observable Markov Decision Process ( POMDP ) formulation to model partial observability . A POMDP is a tuple P = 〈S , O , A , R , p , ω , γ , µ〉 , where S , A , R , p , γ , and µ are as in the MDP above , O is a finite set of observations , and ω ( o|s ) is the observation probability distribution . Interacting with a POMDP is similar to an MDP . The environment starts from a sampled initial state s0 ∼ µ . At time step t , the agent is in state st ∈ S , executes an action at ∈ A , receives an immediate reward rt , and moves to st+1 according to p ( st+1 , rt|st , at ) . However , the agent does not observe st directly . Instead , the agent observes ot ∈ O , which is linked to st via ω ( ot|st ) . 3 RELATED WORK . Early attempts to perform RL in partially observable domains focused on learning memoryless policies . Jaakkola et al . ( 1995 ) identified an RL algorithm that was guaranteed to converge to locally optimal memoryless policies , and similar guarantees have been given in the POMDP literature ( Li et al. , 2011 ) . Unfortunately , Singh et al . ( 1994 ) showed that an optimal memoryless policy π∗ ( at|ot ) can be arbitrarily worse than the optimal history-based policy π∗ ( at|o0 , a0 , . . . , ot ) for POMDPs . Different approaches have been proposed to learn history-based policies using some form of stateapproximation technique . For example , model-based RL methods learn a state representation of histories that enables Markovian prediction of future observations , rewards , or expected returns , and then learns policies over that representation ( McCallum , 1996 ; Littman et al. , 2002 ; Poupart & Vlassis , 2008 ; Doshi-Velez et al. , 2013 ; Ghavamzadeh et al. , 2015 ; Zhang et al. , 2019 ; Toro Icarte et al. , 2019 ) . The focus of our work is on model-free methods , which are the state of the art for solving partially observable problems from low-level inputs ( such as images ) . In model-free RL , history-based policies are approximated using recurrent neural networks ( Hausknecht & Stone , 2015 ; Mnih et al. , 2016 ; Wang et al. , 2016 ; Jaderberg et al. , 2016 ) , or some form of memory-augmented neural network ( Oh et al. , 2016 ; Parisotto & Salakhutdinov , 2017 ; Khan et al. , 2017 ; Hung et al. , 2018 ) . They are usually trained using policy gradient methods . These approaches are computationally expensive because they require the backpropagation of gradients through the history of observations and actions for learning history-based policies . In comparison , our approach is much more lightweight – being faster to train than LSTMs and generally having better sample complexity . We note that it is possible to learn memoryless policies that optimally solve POMDPs . The trick is to give the agent a ( large enough ) memory and extra actions to write to it . From the agent ’ s perspective , it learns a standard memoryless policy from observations to actions , but the observations now include the state of the memory , and the actions include options for how to alter the memory . The main purpose of our work is to resurrect this simple idea by understanding why previous work were unable to make it work . We also proposed a unified framework to study agents with external memories and two novel memories that outperform existing forms of external memories . Concretely , the idea of providing some form of external memory to an agent and actions to modify it goes back to Littman ( 1993 ) , who discussed a hypothetical agent that could learn to control an external binary memory in support of solving partially observable tasks . Peshkin et al . ( 1999 ) reported the first empirical results using tabular RL to learn memoryless policies over such binary memories . While the results were promising in some small environments that required only one bit of external memory to be solved , they did not scale to more complex domains . After Peshkin et al . ( 1999 ) , there was not much work trying to push this line of research forward . We believe that the reason is that RL agents can not reliably learn to control binary memories ( as shown in our results ) . That said , there is one recent work that has further explored the idea of modifying external memories using actions . Zhang et al . ( 2016 ) proposed to use continuous memories , where each element in the array was a floating point number , instead of binary memories . However , they learned the memoryless policies using imitation learning and pointed out that standard RL methods did not work because the reward signal was insufficient supervision for the agent to understand how to appropriately control the memory . One contribution of our work is to advance our understanding of methods that provide external memory to standard RL agents , and to show that they can work well in practice . Our work is also related to neural Turing machines ( NTM ) . The idea behind NTM is to provide an external memory to neural networks which they can write to and read from ( Graves et al. , 2014 ) . All their components are differentiable and , hence , they can be trained end-to-end using gradient descent and a training set of input and output examples ( i.e. , they solve a supervised learning problem ) . Zaremba & Sutskever ( 2015 ) proposed a variation of NTMs where they used the Reinforce algorithm to control how to move the head that reads and write over a memory tape – which can be seen as a case where an RL agent learns to ( partially ) control an external memory . That said , their overall system still solves a supervised learning problem as it requires the supervision coming from input and output examples to train the rest of the components in the NTM . 4 AGENTS WITH EXTERNAL MEMORY . In this section , we formally define what it means to provide external memory to an agent , and describe several forms of external memory . We will use the following problem to aid explanation : Example 4.1 ( the gravity domain ( Toro Icarte et al. , 2019 ) ) . The gravity domain , shown in Figure 2 , consists of an agent ( purple triangle ) , a cookie , and a button . The agent can move in the four cardinal directions and receives a reward of 1 when it eats the cookie . Doing so ends the episode . There is an external force pulling the agent down—i.e. , the outcome of the “ move-up ” action is a downward movement with probability 0.9—which can be turned off ( or back on ) by pressing the button . Every episode begins with the agent in the bottom left corner and the external force on . The optimal policy for this problem is to first press the button and then to go to the cookie . Since the agent can not observe the force , optimal behaviour requires memory of the state of the button , meaning that no memoryless policies can solve this problem optimally . However , suppose that the agent was given a single bit that they could write to on every step using the special actions write-1 and write-0 . This memory can then be used to record the state of the button , and so an optimal memoryless policy for this augmented problem will optimally solve the gravity domain . Figure 1 shows a generalization of this idea . From the agent ’ s perspective , they are , as usual , performing actions in an environment and receiving observations and rewards in return . However , they are now interacting with a memory-augmented environment—which consists of a sub-environment ( i.e. , the original POMDP environment ) and a memory . The memory receives an action w ( selected by the agent ) and local information coming from the sub-environment ( o , a , r , o′ ) to update its internal state to m′ . We formalize these external memory modules as follows : Definition 4.1 ( external memories ) . Let P = 〈S , O , A , R , p , ω , γ , µ〉 be a POMDP . An external memory for P is a tuple MP = 〈M , W , Γ , η〉 , where M is a finite set of memory-states , W is a finite set of memory-writing actions , Γ ( m′|m , w , o , a , r , o′ ) is the memory-writing distribution , and η is the initial memory-state distribution . An external memory module defines the set of possible memory configurations ( M ) and how the agent can manipulate that memory ( W and Γ ) . In the one-bit example for the gravity domain , M consists of the two possible values of the bit ( 0 or 1 ) , W consists of the two possible write options of the bit ( 0 or 1 ) , and the memory-writing distribution Γ updates the bit of memory to 0 or 1 depending on which action was selected . We now define a memory-augmented environment as follows : Definition 4.2 ( memory-augmented environments ) . A memory-augmented environment is a tuple E = 〈P , MP〉 where P is a POMDP andMP is an external memory for P . The interaction between an agent and a memory-augmented environment E = 〈P , MP〉 is the same as with the original environment , just with an augmented observation and action space . At the beginning of each episode , an initial state s0 , observation o0 , and memory state m0 , are sampled according to s0 ∼ µ , o0 ∼ ω ( o0|s0 ) , and m0 ∼ η , respectively . At time step t , the agent observes ōt = 〈ot , mt〉 and executes an action āt = 〈at , wt〉 ∈ A × W in E . Consequently , the subenvironment samples an immediate reward rt and the next state st+1 according to p ( st+1 , rt|st , at ) . The sub-environment also samples the next observation ot+1 ∼ ω ( ot+1|st+1 ) . The memory state is then updated to mt+1 according to Γ ( mt+1|mt , wt , ot , at , rt , ot+1 ) . Finally , the agent receives the immediate reward rt and the next observation ōt+1 = 〈ot+1 , mt+1〉 , and the process repeats . Any standard RL algorithm can be used to find a memoryless policy for a given memory-augmented environment E = 〈P , MP〉 . We note that the optimal memoryless policy for E must be at least as good as the optimal memoryless policy for the original POMDP P . This is because E and P share a reward function , and the agent can always choose to ignore the memory . That said , if the external memory moduleMP is “ expressive enough , ” then optimal memoryless policies for 〈P , MP〉 will be just as good as the optimal policy for P . This is shown formally in Appendix A.2 . | The paper extends the agent actions with an ability to write to an external memory. The paper does a nice survey of the previous approaches. The paper explains the difficulties with bootstrapping and policy improvement in POMDPs. The paper proposes simple memories for storing a buffer of k observations. The agent has the ability to push or not to push the current observation to the buffer. The whole content of the external memory is visible to the agent at each time step. | SP:288991f341afc67f98e6318d17b06902b5488f15 |
Deep Partition Aggregation: Provable Defenses against General Poisoning Attacks | 1 INTRODUCTION . Adversarial poisoning attacks are an important vulnerability in machine learning systems . In these attacks , an adversary can manipulate the training data of a classifier , in order to change the classifications of specific inputs at test time . Several poisoning threat models have been studied in the literature , including threat models where the adversary may insert new poison samples ( Chen et al. , 2017 ) , manipulate the training labels ( Xiao et al. , 2012 ; Rosenfeld et al. , 2020 ) , or manipulate the training sample values ( Biggio et al. , 2012 ; Shafahi et al. , 2018 ) . A certified defense against a poisoning attack provides a certificate for each test sample , which is a guaranteed lower bound on the magnitude of any adversarial distortion of the training set that can corrupt the test sample ’ s classification . In this work , we propose certified defenses against two types of poisoning attacks : General poisoning attacks : In this threat model , the attacker can insert or remove a bounded number of samples from the training set . In particular , the attack magnitude ρ is defined as the cardinality of the symmetric difference between the clean and poisoned training sets . This threat model also includes any distortion to an sample and/or label in the training set — a distortion of a training sample is simply the removal of the original sample followed by the insertion of the distorted sample . ( Note that a sample distortion or label flip therefore increases the symmetric difference attack magnitude by two . ) Label-flipping poisoning attacks : In this threat model , the adversary changes only the label for ρ out of m training samples . Rosenfeld et al . ( 2020 ) has recently provided a certified defense for this threat model , which we improve upon . In the last couple of years , certified defenses have been extensively studied for evasion attacks , where the adversary manipulates the test samples , rather than the training data ( e.g . Wong & Kolter ( 2018 ) ; Gowal et al . ( 2018 ) ; Lecuyer et al . ( 2019 ) ; Li et al . ( 2018 ) ; Salman et al . ( 2019 ) ; Levine & Feizi ( 2020a ; b ) ; Cohen et al . ( 2019 ) , etc . ) In the evasion case , a certificate is a lower bound on the distance from the sample to the classifier ’ s decision boundary : this guarantees that the sample ’ s classification remains unchanged under adversarial distortions up to the certified magnitude . Rosenfeld et al . ( 2020 ) provides an analogous certificate for label-flipping poisoning attacks : for an input sample x , the certificate of x is a lower bound on the number of labels in the training set that would have to change in order to change the classification of x.1 Rosenfeld et al . ( 2020 ) ’ s method is an adaptation of a certified defense for sparse ( L0 ) evasion attacks proposed by Lee et al . ( 2019 ) . The adapted method for label-flipping attacks proposed by Rosenfeld et al . ( 2020 ) is equivalent to randomly flipping each training label with fixed probability and taking a consensus result . If implemented directly , this would require one to train a large ensemble of classifiers on different noisy versions of the training data . However , instead of actually doing this , Rosenfeld et al . ( 2020 ) focuses only on linear classifiers and is therefore able to analytically calculate the expected result . This gives deterministic , rather than probabilistic , certificates . Further , because Rosenfeld et al . ( 2020 ) considers a threat model where only labels are modified , they are able to train an unsupervised nonlinear feature extractor on the ( unlabeled ) training data before applying their technique , in order to learn more complex features . Inspired by an improved provable defense against L0 evasion attacks ( Levine & Feizi , 2020a ) , in this paper , we develop certifiable defenses against general and label-flipping poisoning attacks that significantly outperform the current state-of-the-art certifiable defenses . In particular , we develop 1Steinhardt et al . ( 2017 ) also refers to a “ certified defense ” for poisoning attacks . However , the definition of the certificate is substantially different in that work , which instead provides overall accuracy guarantees under the assumption that the training and test data are drawn from similar distributions , rather than providing guarantees for individual realized inputs . a certifiable defense against general poisoning attacks called Deep Partition Aggregation ( DPA ) which is based on partitioning the training set into k partitions , with the partition assignment for a training sample determined by a hash function of the sample . The hash function can be any deterministic function that maps a training sample t to a partition assignment : the only requirement is that the hash value depends only on the value of the training sample t itself , so that neither poisoning other samples , nor changing the total number of samples , nor reordering the samples can change the partition that t is assigned to . We then train k base classifiers separately , one on each partition . At the test time , we evaluate each of the base classifiers on the test sample x and return the plurality classification c as the final result . The key insight is that removing a training sample , or adding a new sample , will only change the contents of one partition , and therefore will only affect the classification of one of the k base classifiers . This immediately leads to robustness certifications against general poisoning attacks which , to the best of our knowledge , is the first one of this kind . If the adversary is restricted to flipping labels only ( as in Rosenfeld et al . ( 2020 ) ) , we can achieve even larger certificates through a modified technique . In this setting , the unlabeled data is trustworthy : each base classifier in the ensemble can then make use of the entire training set without labels , but only has access to the labels in its own partition . Thus , each base classifier can be trained as if the entire dataset is available as unlabeled data , but only a very small number of labels are available . This is precisely the problem statement of semi-supervised learning ( Verma et al. , 2019 ; Luo et al. , 2018 ; Laine & Aila , 2017 ; Kingma et al. , 2014 ; Gidaris et al. , 2018 ) . We can then leverage these existing semi-supervised learning techniques directly to improve the accuracies of the base classifiers in DPA . Furthermore , we can ensure that a particular ( unlabeled ) sample is assigned to the same partition regardless of label , so that only one partition is affected by a label flip ( rather than possibly two ) . The resulting algorithm , Semi-Supervised Deep Partition Aggregation ( SS-DPA ) yields substantially increased certified accuracy against label-flipping attacks , compared to DPA alone and compared to the current state-of-the-art . Furthermore , while our method is de-randomized ( as Rosenfeld et al . ( 2020 ) is ) and therefore yields deterministic certificates , our technique does not require that the classification model be linear , allowing deep networks to be used . On MNIST , SS-DPA substantially outperforms the existing state of the art ( Rosenfeld et al. , 2020 ) in defending against label-flip attacks : we certify at least half of images in the test set against attacks to over 600 ( 1.0 % ) of the labels in the training set , while still maintaining over 93 % accuracy ( See Figure 1 , and Table 1 ) . In comparison , Rosenfeld et al . ( 2020 ) ’ s method achieves less than 60 % clean accuracy on MNIST , and most test images can not be certified with the correct class against attacks of even 200 label flips . We are also the first work to our knowledge to certify against general poisoning attacks , including insertions and deletions of new training images : in this domain , we can certify at least half of test images against attacks consisting of over 500 arbitrary training image insertions or deletions . On CIFAR-10 , a substantially more difficult classification task , we can certify at least half of test images against label-flipping attacks on over 300 labels using SS-DPA ( versus 175 label-flips for ( Rosenfeld et al. , 2020 ) ) , and can certify at least half of test images against general poisoning attacks of up to nine insertions or deletions using DPA . To see how our method performs on datasets with larger numbers of classes , we also tested our methods on the German Traffic Sign Recognition Benchmark ( Stallkamp et al. , 2012 ) , a task with 43 classes and on average ≈ 1000 samples per class . Here , we are able to certify at least half of test images as robust to 176 label flips , or 20 general poisoning attacks . These results establish new state-of-the-art in provable defenses against label-flipping and general poisoning attacks . 2 RELATED WORKS . Levine & Feizi ( 2020a ) propose a randomized ablation technique to certifiably defend against sparse atatcks . Their method ablates some pixels , replacing them with a null value . Since it is possible for the base classifier to distinguish exactly which pixels originate from x , this results in more accurate base classifications and therefore substantially greater certified robustness than Lee et al . ( 2019 ) . For example , on ImageNet , Lee et al . ( 2019 ) certifies the median test image against distortions of one pixel , while Levine & Feizi ( 2020a ) certifies against distortions of 16 pixels . Our proposed method is related to classical ensemble approaches in machine learning , namely bootstrap aggregation and subset aggregation ( Breiman , 1996 ; Buja & Stuetzle , 2006 ; Bühlmann , 2003 ; Zaman & Hirose , 2009 ) . However , in these methods each base classifier in the ensemble is trained on an independently sampled collection of points from the training set : multiple classifiers in the ensemble may be trained on ( and therefore poisoned by ) the same sample point . The purpose of these methods has typically been to improve generalization . Bootstrap aggregation has been proposed as an empirical defense against poisoning attacks ( Biggio et al. , 2011 ) as well as for evasion attacks ( Smutz & Stavrou , 2016 ) . However , at the time of the initial distribution of this work , these techniques had not yet been used to provide certified robustness.2 Our unique partition aggregation variant provides deterministic robustness certificates against poisoning attacks . See Appendix D for further discussion . Weber et al . ( 2020 ) have recently proposed a different randomized-smoothing based defense against poisoning attacks by directly applying Cohen et al . ( 2019 ) ’ s smoothing L2 evasion defense to the poisoning domain . The proposed technique can only certify for clean-label attacks ( where only the existing samples in the dataset are modified , and not their labels ) , and the certificate guarantees robustness only to bounded L2 distortions of the training data , where the L2 norm of the distortion is calculated across all pixels in the entire training set . Due to well-known limitations of dimensional scaling for smoothing-based robustness certificates ( Yang et al. , 2020 ; Kumar et al. , 2020 ; Blum et al. , 2020 ) , this yields certificates to only very small distortions of the training data . ( For binary MNIST [ 13,007 images ] , the maximum reportedL2 certificate is 2 pixels . ) Additionally , when using deep classifiers , Weber et al . ( 2020 ) proposes a randomized certificate , rather than a deterministic one , with a failure probability that decreases to zero only as the number of trained classifiers in an ensemble approaches infinity . Moreover , in Weber et al . ( 2020 ) , unlike in our method , each classifier in the ensemble must be trained on a noisy version of the entire dataset . These issues hinder Weber et al . ( 2020 ) ’ s method to be an effective scheme for certified robustness against poisoning attacks . After the initial distribution of this work , a recent revision of Rosenfeld et al . ( 2020 ) has suggested using randomised smoothing techniques on training samples , rather than just training labels , as a general approach to poisoning defense . Both this work and Weber et al . ( 2020 ) could be considered as implementations of this idea , although this generalized proposal in Rosenfeld et al . ( 2020 ) does not include a derandomization scheme ( unlike Rosenfeld et al . ( 2020 ) ’ s proposed derandomized defense against label-flipping attacks ) . Other prior works have provided distributional , rather than pointwise guarantees against poisoning attacks . In these works , there is a ( high-probability ) guarantee that the classifier will achieve a certain level of average overall accuracy on test data , under the assumption that the test data and clean ( pre-poisoning ) training data are drawn from the same distribution . These works do not provide any guarantees that apply to specific test samples , however . As mentioned above , Steinhardt et al . ( 2017 ) provides such a distributional guarantee , specifically for a threat model of addition of poison samples . Other such works include Sloan ( 1995 ) , which considers label-flipping attacks and determines conditions under which PAC-learning is possible in the presence of such attacks , and Bshouty et al . ( 2002 ) provides similar guarantees for replacement of samples . Other works ( Diakonikolas et al. , 2016 ; Lai et al. , 2016 ) provide distributional guarantees for unsupervised learning under poisoning attacks . Mahloujifar et al . ( 2019 ) proposes provably effective poisoning attacks with high-probability pointwise guarantees of effectiveness on test samples . However , that work relies on properties of the distribution that the training set is drawn from . Diakonikolas et al . ( 2019 ) provide a robust training algorithm which provably approximates the clean trained model despite poisoning ( rather than the behavior at a certain test point ) : this result also makes assumptions about the distribution of the clean training data . | This paper studies how to enhance the robustness of classifiers in face of data poisoning attacks. The key insight of the paper is that adding or deleting one training point can at most change one of the k partitions of the training set. Based on this idea, the authors propose Deep Partition Aggregation (DPA), a robust classification algorithm that first partitions the training data into k subsets, and then separately train a model on each subset. The final prediction is an aggregation of the predictions of those k classifiers using the majority vote. Apart from DPA, the authors also consider a setting where a large amount of data points do not have labels. In that scenario, semi-supervised learning algorithms are used as based algorithm when training separate models on each subset. The proposed method SS-DPA enjoys the property of being fast to train, since learning is performed on a subset that has smaller number of data points. The paper derives theoretical guarantees in terms of when the prediction of a particular data point can be certifiably correct. Finally, experiments on MNIST and CIFAR demonstrate the effectiveness of the proposed defense as compared to prior works. | SP:c496aecb8ebf5e0d803342e8582f8a2515fe344d |
Deep Partition Aggregation: Provable Defenses against General Poisoning Attacks | 1 INTRODUCTION . Adversarial poisoning attacks are an important vulnerability in machine learning systems . In these attacks , an adversary can manipulate the training data of a classifier , in order to change the classifications of specific inputs at test time . Several poisoning threat models have been studied in the literature , including threat models where the adversary may insert new poison samples ( Chen et al. , 2017 ) , manipulate the training labels ( Xiao et al. , 2012 ; Rosenfeld et al. , 2020 ) , or manipulate the training sample values ( Biggio et al. , 2012 ; Shafahi et al. , 2018 ) . A certified defense against a poisoning attack provides a certificate for each test sample , which is a guaranteed lower bound on the magnitude of any adversarial distortion of the training set that can corrupt the test sample ’ s classification . In this work , we propose certified defenses against two types of poisoning attacks : General poisoning attacks : In this threat model , the attacker can insert or remove a bounded number of samples from the training set . In particular , the attack magnitude ρ is defined as the cardinality of the symmetric difference between the clean and poisoned training sets . This threat model also includes any distortion to an sample and/or label in the training set — a distortion of a training sample is simply the removal of the original sample followed by the insertion of the distorted sample . ( Note that a sample distortion or label flip therefore increases the symmetric difference attack magnitude by two . ) Label-flipping poisoning attacks : In this threat model , the adversary changes only the label for ρ out of m training samples . Rosenfeld et al . ( 2020 ) has recently provided a certified defense for this threat model , which we improve upon . In the last couple of years , certified defenses have been extensively studied for evasion attacks , where the adversary manipulates the test samples , rather than the training data ( e.g . Wong & Kolter ( 2018 ) ; Gowal et al . ( 2018 ) ; Lecuyer et al . ( 2019 ) ; Li et al . ( 2018 ) ; Salman et al . ( 2019 ) ; Levine & Feizi ( 2020a ; b ) ; Cohen et al . ( 2019 ) , etc . ) In the evasion case , a certificate is a lower bound on the distance from the sample to the classifier ’ s decision boundary : this guarantees that the sample ’ s classification remains unchanged under adversarial distortions up to the certified magnitude . Rosenfeld et al . ( 2020 ) provides an analogous certificate for label-flipping poisoning attacks : for an input sample x , the certificate of x is a lower bound on the number of labels in the training set that would have to change in order to change the classification of x.1 Rosenfeld et al . ( 2020 ) ’ s method is an adaptation of a certified defense for sparse ( L0 ) evasion attacks proposed by Lee et al . ( 2019 ) . The adapted method for label-flipping attacks proposed by Rosenfeld et al . ( 2020 ) is equivalent to randomly flipping each training label with fixed probability and taking a consensus result . If implemented directly , this would require one to train a large ensemble of classifiers on different noisy versions of the training data . However , instead of actually doing this , Rosenfeld et al . ( 2020 ) focuses only on linear classifiers and is therefore able to analytically calculate the expected result . This gives deterministic , rather than probabilistic , certificates . Further , because Rosenfeld et al . ( 2020 ) considers a threat model where only labels are modified , they are able to train an unsupervised nonlinear feature extractor on the ( unlabeled ) training data before applying their technique , in order to learn more complex features . Inspired by an improved provable defense against L0 evasion attacks ( Levine & Feizi , 2020a ) , in this paper , we develop certifiable defenses against general and label-flipping poisoning attacks that significantly outperform the current state-of-the-art certifiable defenses . In particular , we develop 1Steinhardt et al . ( 2017 ) also refers to a “ certified defense ” for poisoning attacks . However , the definition of the certificate is substantially different in that work , which instead provides overall accuracy guarantees under the assumption that the training and test data are drawn from similar distributions , rather than providing guarantees for individual realized inputs . a certifiable defense against general poisoning attacks called Deep Partition Aggregation ( DPA ) which is based on partitioning the training set into k partitions , with the partition assignment for a training sample determined by a hash function of the sample . The hash function can be any deterministic function that maps a training sample t to a partition assignment : the only requirement is that the hash value depends only on the value of the training sample t itself , so that neither poisoning other samples , nor changing the total number of samples , nor reordering the samples can change the partition that t is assigned to . We then train k base classifiers separately , one on each partition . At the test time , we evaluate each of the base classifiers on the test sample x and return the plurality classification c as the final result . The key insight is that removing a training sample , or adding a new sample , will only change the contents of one partition , and therefore will only affect the classification of one of the k base classifiers . This immediately leads to robustness certifications against general poisoning attacks which , to the best of our knowledge , is the first one of this kind . If the adversary is restricted to flipping labels only ( as in Rosenfeld et al . ( 2020 ) ) , we can achieve even larger certificates through a modified technique . In this setting , the unlabeled data is trustworthy : each base classifier in the ensemble can then make use of the entire training set without labels , but only has access to the labels in its own partition . Thus , each base classifier can be trained as if the entire dataset is available as unlabeled data , but only a very small number of labels are available . This is precisely the problem statement of semi-supervised learning ( Verma et al. , 2019 ; Luo et al. , 2018 ; Laine & Aila , 2017 ; Kingma et al. , 2014 ; Gidaris et al. , 2018 ) . We can then leverage these existing semi-supervised learning techniques directly to improve the accuracies of the base classifiers in DPA . Furthermore , we can ensure that a particular ( unlabeled ) sample is assigned to the same partition regardless of label , so that only one partition is affected by a label flip ( rather than possibly two ) . The resulting algorithm , Semi-Supervised Deep Partition Aggregation ( SS-DPA ) yields substantially increased certified accuracy against label-flipping attacks , compared to DPA alone and compared to the current state-of-the-art . Furthermore , while our method is de-randomized ( as Rosenfeld et al . ( 2020 ) is ) and therefore yields deterministic certificates , our technique does not require that the classification model be linear , allowing deep networks to be used . On MNIST , SS-DPA substantially outperforms the existing state of the art ( Rosenfeld et al. , 2020 ) in defending against label-flip attacks : we certify at least half of images in the test set against attacks to over 600 ( 1.0 % ) of the labels in the training set , while still maintaining over 93 % accuracy ( See Figure 1 , and Table 1 ) . In comparison , Rosenfeld et al . ( 2020 ) ’ s method achieves less than 60 % clean accuracy on MNIST , and most test images can not be certified with the correct class against attacks of even 200 label flips . We are also the first work to our knowledge to certify against general poisoning attacks , including insertions and deletions of new training images : in this domain , we can certify at least half of test images against attacks consisting of over 500 arbitrary training image insertions or deletions . On CIFAR-10 , a substantially more difficult classification task , we can certify at least half of test images against label-flipping attacks on over 300 labels using SS-DPA ( versus 175 label-flips for ( Rosenfeld et al. , 2020 ) ) , and can certify at least half of test images against general poisoning attacks of up to nine insertions or deletions using DPA . To see how our method performs on datasets with larger numbers of classes , we also tested our methods on the German Traffic Sign Recognition Benchmark ( Stallkamp et al. , 2012 ) , a task with 43 classes and on average ≈ 1000 samples per class . Here , we are able to certify at least half of test images as robust to 176 label flips , or 20 general poisoning attacks . These results establish new state-of-the-art in provable defenses against label-flipping and general poisoning attacks . 2 RELATED WORKS . Levine & Feizi ( 2020a ) propose a randomized ablation technique to certifiably defend against sparse atatcks . Their method ablates some pixels , replacing them with a null value . Since it is possible for the base classifier to distinguish exactly which pixels originate from x , this results in more accurate base classifications and therefore substantially greater certified robustness than Lee et al . ( 2019 ) . For example , on ImageNet , Lee et al . ( 2019 ) certifies the median test image against distortions of one pixel , while Levine & Feizi ( 2020a ) certifies against distortions of 16 pixels . Our proposed method is related to classical ensemble approaches in machine learning , namely bootstrap aggregation and subset aggregation ( Breiman , 1996 ; Buja & Stuetzle , 2006 ; Bühlmann , 2003 ; Zaman & Hirose , 2009 ) . However , in these methods each base classifier in the ensemble is trained on an independently sampled collection of points from the training set : multiple classifiers in the ensemble may be trained on ( and therefore poisoned by ) the same sample point . The purpose of these methods has typically been to improve generalization . Bootstrap aggregation has been proposed as an empirical defense against poisoning attacks ( Biggio et al. , 2011 ) as well as for evasion attacks ( Smutz & Stavrou , 2016 ) . However , at the time of the initial distribution of this work , these techniques had not yet been used to provide certified robustness.2 Our unique partition aggregation variant provides deterministic robustness certificates against poisoning attacks . See Appendix D for further discussion . Weber et al . ( 2020 ) have recently proposed a different randomized-smoothing based defense against poisoning attacks by directly applying Cohen et al . ( 2019 ) ’ s smoothing L2 evasion defense to the poisoning domain . The proposed technique can only certify for clean-label attacks ( where only the existing samples in the dataset are modified , and not their labels ) , and the certificate guarantees robustness only to bounded L2 distortions of the training data , where the L2 norm of the distortion is calculated across all pixels in the entire training set . Due to well-known limitations of dimensional scaling for smoothing-based robustness certificates ( Yang et al. , 2020 ; Kumar et al. , 2020 ; Blum et al. , 2020 ) , this yields certificates to only very small distortions of the training data . ( For binary MNIST [ 13,007 images ] , the maximum reportedL2 certificate is 2 pixels . ) Additionally , when using deep classifiers , Weber et al . ( 2020 ) proposes a randomized certificate , rather than a deterministic one , with a failure probability that decreases to zero only as the number of trained classifiers in an ensemble approaches infinity . Moreover , in Weber et al . ( 2020 ) , unlike in our method , each classifier in the ensemble must be trained on a noisy version of the entire dataset . These issues hinder Weber et al . ( 2020 ) ’ s method to be an effective scheme for certified robustness against poisoning attacks . After the initial distribution of this work , a recent revision of Rosenfeld et al . ( 2020 ) has suggested using randomised smoothing techniques on training samples , rather than just training labels , as a general approach to poisoning defense . Both this work and Weber et al . ( 2020 ) could be considered as implementations of this idea , although this generalized proposal in Rosenfeld et al . ( 2020 ) does not include a derandomization scheme ( unlike Rosenfeld et al . ( 2020 ) ’ s proposed derandomized defense against label-flipping attacks ) . Other prior works have provided distributional , rather than pointwise guarantees against poisoning attacks . In these works , there is a ( high-probability ) guarantee that the classifier will achieve a certain level of average overall accuracy on test data , under the assumption that the test data and clean ( pre-poisoning ) training data are drawn from the same distribution . These works do not provide any guarantees that apply to specific test samples , however . As mentioned above , Steinhardt et al . ( 2017 ) provides such a distributional guarantee , specifically for a threat model of addition of poison samples . Other such works include Sloan ( 1995 ) , which considers label-flipping attacks and determines conditions under which PAC-learning is possible in the presence of such attacks , and Bshouty et al . ( 2002 ) provides similar guarantees for replacement of samples . Other works ( Diakonikolas et al. , 2016 ; Lai et al. , 2016 ) provide distributional guarantees for unsupervised learning under poisoning attacks . Mahloujifar et al . ( 2019 ) proposes provably effective poisoning attacks with high-probability pointwise guarantees of effectiveness on test samples . However , that work relies on properties of the distribution that the training set is drawn from . Diakonikolas et al . ( 2019 ) provide a robust training algorithm which provably approximates the clean trained model despite poisoning ( rather than the behavior at a certain test point ) : this result also makes assumptions about the distribution of the clean training data . | The paper proposes to solve two variants of adversarial poisoning attacks: 1) General Poisoning Attacks - where either the input is distorted or the label is flipped. 2) Label Flipping Poisoning Attacks - where the input images are intact but only the labels are flipped. The crux of the algorithm is the standard ensemble model idea, where we train multiple models each with a partition of the data and take the most prevalent prediction among all models during inference. This naturally adds robustness to the Additionally, the paper also provides theoretical lower bounds on the 'amount' of distortion below which precision is preserved. | SP:c496aecb8ebf5e0d803342e8582f8a2515fe344d |
TraDE: A Simple Self-Attention-Based Density Estimator | 1 INTRODUCTION . Density estimation involves estimating a probability density p ( x ) , given independent , identically distributed ( iid ) samples from it . This is a versatile and important problem as it allows one to generate synthetic data or perform novelty and outlier detection . It is also an important subroutine in applications of graphical models . Deep neural networks are a powerful function class and learning complex distributions with them is promising . This has resulted in a resurgence of interest in the classical problem of density estimation . One of the more popular techniques for density estimation is to sample data from a simple reference distribution and then to learn a ( sequence of ) invertible transformations that allow us to adapt it to a target distribution . Flow-based methods ( Durkan et al. , 2019b ) employ this with great success . A more classical approach is to decompose p ( x ) in an iterative manner via conditional probabilities p ( xi+1|x1 ... i ) and fit this distribution using the data ( Murphy , 2013 ) . One may even employ implicit generative models to sample from p ( x ) directly , perhaps without the ability to compute density estimates . This is the case with Generative Adversarial Networks ( GANs ) that reign supreme for image synthesis via sampling ( Goodfellow et al. , 2014 ; Karras et al. , 2017 ) . Implementing these above methods however requires special care , e.g. , the normalizing transform requires the network to be invertible with an efficiently computable Jacobian . Auto-regressive models using recurrent networks are difficult to scale to high-dimensional data due to the need to store a potentially high-dimensional conditional sufficient statistic ( and also due to vanishing gradients ) . Generative models can be difficult to train and GANs lack a closed density model . Much of the current work is devoted to mitigating these issues . The main contributions of this paper include : 1 . We introduce TraDE , a simple but novel auto-regressive density estimator that uses self-attention along with a recurrent neural network ( RNN ) -based input embedding to approximate arbitrary continuous and discrete conditional densities . It is more flexible than contemporary architectures such as those proposed by Durkan et al . ( 2019b ; a ) ; Kingma et al . ( 2016 ) ; De Cao et al . ( 2019 ) for this problem , yet it remains capable of approximating any density function . To our knowledge , this is the first adaptation of Transformer-like architectures for continuous-valued density estimation . 2 . Log-likelihood on held-out data is the prevalent metric to evaluate density estimators . However , this only provides a partial view of their performance in real-world applications . We propose a suite of experiments to systematically evaluate the performance of density estimators in downstream tasks such as classification and regression using generated samples , detection of out-of-distribution samples , and robustness to noise in the training data . 3 . We provide extensive empirical evidence that TraDE substantially outperforms other density estimators on standard and additional benchmarks , along with thorough ablation experiments to dissect the empirical gains . The main feature of this work is the simplicity of our proposed method along with its strong ( systematically evaluated ) empirical performance . 2 BACKGROUND AND RELATED WORK . Given a dataset { x1 , . . . , xn } where each sample xl ∈ Rd is drawn iid from a distribution p ( x ) , the maximum-likelihood formulation of density estimation finds a θ-parameterized distribution q with θ̂ = argmax θ 1 n n∑ l=1 log q ( xl ; θ ) . ( 1 ) The candidate distribution q can be parameterized in a variety of ways as we discuss next . Normalizing flows write x ∼ q as a transformation of samples z from some base distribution pz from which one can draw samples easily ( Papamakarios et al. , 2019 ) . If this mapping is fθ : z → x , two distributions can be related using the determinant of the Jacobian as q ( x ; θ ) : = pz ( z ) ∣∣∣dfθ dz ∣∣∣−1 . A practical limitation of flow-based models is that fθ must be a diffeomorphism , i.e. , it is invertible and both fθ and f−1θ are differentiable . Good performance using normalizing flows imposes nontrivial restrictions on how one can parametrize fθ : it must be flexible yet invertible with a Jacobian that can be computed efficiently . There are a number of techniques to achieve this , e.g. , linear mappings , planar/radial flows ( Rezende & Mohamed , 2015 ; Tabak & Turner , 2013 ) , Sylvester flows ( Berg et al. , 2018 ) , coupling ( Dinh et al. , 2014 ) and auto-regressive models ( Larochelle & Murray , 2011 ) . One may also compose the transformations , e.g. , using monotonic mappings fθ in each layer ( Huang et al. , 2018 ; De Cao et al. , 2019 ) . Auto-regressive models factorize the joint distribution as a product of univariate conditional distributions q ( x ; θ ) : = ∏ i qi ( xi|x1 , . . . xi−1 ; θ ) . The auto-regressive approach to density estimation is straightforward and flexible as there is no restriction on how each conditional distribution is modeled . Often , a single recurrent neural network ( RNN ) is used to sequentially estimate all conditionals with a shared set of parameters ( Oliva et al. , 2018 ; Kingma et al. , 2016 ) . For high-dimensional data , the challenge lies in handling the increasingly large state space x1 , . . . , xi−1 required to properly infer xi . In recurrent auto-regressive models , these conditioned-upon variables ’ values are stored in some representation hi which is updated via a function hi+1 = g ( hi , xi ) . This overcomes the problem of high-dimensional estimation , albeit at the expense of loss in fidelity . Techniques like masking the computational paths in a feed-forward network are popular to alleviate these problems further ( Uria et al. , 2016 ; Germain et al. , 2015 ; Papamakarios et al. , 2017 ) . Many existing auto-regressive algorithms are highly sensitive to the variable ordering chosen for factorizing q , and some methods must train complex ensembles over multiple orderings to achieve good performance ( Germain et al. , 2015 ; Uria et al. , 2014 ) . While autoregressive models are commonly applied to natural language and time series data , this setting only involves variables that are already naturally ordered ( Chelba et al. , 2013 ) . In contrast , we consider continuous ( and discrete ) density estimation of vector valued data , e.g . tabular data , where the underlying ordering and dependencies between variables is often unknown . Generative models focus on drawing samples from the estimated distribution that look resemble the true distribution of data . There is a rich history of learning explicit models from variational inference ( Jordan et al. , 1999 ) that allow both drawing samples and estimating the log-likelihood or implicit models such as Generative Adversarial Networks ( GANs , see ( Goodfellow et al. , 2014 ) ) where one may only draw samples . These have been shown to work well for natural images ( Kingma & Welling , 2013 ) but have not obtained similar performance for tabular data . We also note the existence of many classical techniques that are less popular in deep learning , such as kernel density estimation ( Silverman , 2018 ) and Chow-Liu trees ( Chow & Liu , 1968 ; Choi et al. , 2011 ) . 3 TOOLS OF THE TRADE x1 x2 x3 x4 x5 x6 x7 x8 x1 x8 x2 x7 x3 x6 x4 x5 Consider the 8-dimensional Markov Random Field shown here , where the underlying graphical model is unknown in practice . Consider the following two orders in which to factorize the autoregressive model : ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ) and ( 1 , 8 , 2 , 7 , 3 , 6 , 4 , 5 ) . In the latter case the model becomes a simple sequence where e.g . p ( x3|x1,8,2,7 ) = p ( x3|x7 ) due to conditional independence . A latent variable auto-regressive model only needs to preserve the most recently encountered state in this latter ordering . In the first ordering , p ( x3|x1,2 ) can be simplified further to p ( x3|x2 ) , but we still need to carry the precise value of x1 along until the end since p ( x8|x1 ... 7 ) = p ( x8|x1,2 ) . This is a fundamental weakness in models employing RNNs such as ( Oliva et al. , 2018 ) . In practice , we may be unable to select a favorable ordering for columns in a table ( unlike for language where words are inherently ordered ) , especially as the underlying distribution is unknown . 3.1 VERTEX ORDERING AND SUFFICIENT STATISTICS . The above problem is also seen in sequence modeling , and Transformers were introduced to better model such long-range dependencies through self-attention ( Vaswani et al. , 2017 ) . A recurrent network can , in principle , absorb this information into its hidden state . In fact , Long-Short-Term Memory ( LSTM ) ( Hochreiter & Schmidhuber , 1997 ) units were engineered specifically to store long-range dependencies until needed . Nonetheless , storing information costs parameter space . For an auto-regressive factorization where the true conditionals require one to store many variables ’ values for many time steps , the RNN/LSTM hidden state must be undesirably large to achieve low approximation error , which means these models must have many parameters ( Collins et al. , 2017 ) . The following simple lemma formalizes this . Lemma 1 . Denote by G the graph of an undirected graphical model over random variables x1 , . . . , xd . Depending on the order vertices are traversed in our factorization the largest number of latent variables a recurrent auto-regressive model needs to store is bounded from above and below by the minimum and the maximum number of variables with a cut edge of the graph G. Proof . Given a subset of known variables S ⊆ { 1 , . . . d } we want to estimate the conditional distribution of the variables on the complement C : = { 1 , . . . d } \S . For this we need to decompose S into the Markov blanket M of C and its remainder . By definition M consists of the variables with a cut edge . Since p ( xC |xS ) = p ( xC |xM ) we are done . This problem with long-dependencies in auto-regressive models has been noted before , and is exacerbated in density estimation with continuous-valued data , where values of conditioned-upon variables may need to be precisely retrieved . For instance , recent auto-regressive models employ masking to eliminate the sequential operations of recurrent models ( Papamakarios et al. , 2017 ) . There are also models like Pixel RNN ( Oord et al. , 2016 ) which explicitly design a multi-scale masking mechanism suited for natural images ( and also require discretization of continuous-valued data ) . Note that while there is a natural ordering of random variables in text/image data , variables in tabular data do not follow any canonical ordering . Applicable to both continuous and discrete valued data , our proposed TraDE model circumvents this issue by utilizing self-attention to retrieve feature values relevant for the conditioning , which does not require more parameters to retrieve the values of relevant features that happened to appear early in the auto-regressive factorization order ( Yun et al. , 2019 ) . Thus a major benefit of self-attention here is its effectiveness at maintaining an accurate representation of the feature values xj for j < i when inferring xi ( irrespective of the distance between i and j ) . | This paper proposes TraDE, a transformer-based density estimator that is capable of learning a density of real-valued tabular data. Compared to previously proposed transformers, there are three main differences in TraDE model: 1) the output is modeled as a mixture of Gaussians, 2) maximum mean discrepancy (MMD) is added to the loss, and 3) Gated Recurrent Unit (GRU) is used to provide positional encoding. Tested on a suite of benchmark tasks, the proposed method shows promising results over baselines. | SP:e8c5589f22688422495fbc1dd7418139443102b9 |
TraDE: A Simple Self-Attention-Based Density Estimator | 1 INTRODUCTION . Density estimation involves estimating a probability density p ( x ) , given independent , identically distributed ( iid ) samples from it . This is a versatile and important problem as it allows one to generate synthetic data or perform novelty and outlier detection . It is also an important subroutine in applications of graphical models . Deep neural networks are a powerful function class and learning complex distributions with them is promising . This has resulted in a resurgence of interest in the classical problem of density estimation . One of the more popular techniques for density estimation is to sample data from a simple reference distribution and then to learn a ( sequence of ) invertible transformations that allow us to adapt it to a target distribution . Flow-based methods ( Durkan et al. , 2019b ) employ this with great success . A more classical approach is to decompose p ( x ) in an iterative manner via conditional probabilities p ( xi+1|x1 ... i ) and fit this distribution using the data ( Murphy , 2013 ) . One may even employ implicit generative models to sample from p ( x ) directly , perhaps without the ability to compute density estimates . This is the case with Generative Adversarial Networks ( GANs ) that reign supreme for image synthesis via sampling ( Goodfellow et al. , 2014 ; Karras et al. , 2017 ) . Implementing these above methods however requires special care , e.g. , the normalizing transform requires the network to be invertible with an efficiently computable Jacobian . Auto-regressive models using recurrent networks are difficult to scale to high-dimensional data due to the need to store a potentially high-dimensional conditional sufficient statistic ( and also due to vanishing gradients ) . Generative models can be difficult to train and GANs lack a closed density model . Much of the current work is devoted to mitigating these issues . The main contributions of this paper include : 1 . We introduce TraDE , a simple but novel auto-regressive density estimator that uses self-attention along with a recurrent neural network ( RNN ) -based input embedding to approximate arbitrary continuous and discrete conditional densities . It is more flexible than contemporary architectures such as those proposed by Durkan et al . ( 2019b ; a ) ; Kingma et al . ( 2016 ) ; De Cao et al . ( 2019 ) for this problem , yet it remains capable of approximating any density function . To our knowledge , this is the first adaptation of Transformer-like architectures for continuous-valued density estimation . 2 . Log-likelihood on held-out data is the prevalent metric to evaluate density estimators . However , this only provides a partial view of their performance in real-world applications . We propose a suite of experiments to systematically evaluate the performance of density estimators in downstream tasks such as classification and regression using generated samples , detection of out-of-distribution samples , and robustness to noise in the training data . 3 . We provide extensive empirical evidence that TraDE substantially outperforms other density estimators on standard and additional benchmarks , along with thorough ablation experiments to dissect the empirical gains . The main feature of this work is the simplicity of our proposed method along with its strong ( systematically evaluated ) empirical performance . 2 BACKGROUND AND RELATED WORK . Given a dataset { x1 , . . . , xn } where each sample xl ∈ Rd is drawn iid from a distribution p ( x ) , the maximum-likelihood formulation of density estimation finds a θ-parameterized distribution q with θ̂ = argmax θ 1 n n∑ l=1 log q ( xl ; θ ) . ( 1 ) The candidate distribution q can be parameterized in a variety of ways as we discuss next . Normalizing flows write x ∼ q as a transformation of samples z from some base distribution pz from which one can draw samples easily ( Papamakarios et al. , 2019 ) . If this mapping is fθ : z → x , two distributions can be related using the determinant of the Jacobian as q ( x ; θ ) : = pz ( z ) ∣∣∣dfθ dz ∣∣∣−1 . A practical limitation of flow-based models is that fθ must be a diffeomorphism , i.e. , it is invertible and both fθ and f−1θ are differentiable . Good performance using normalizing flows imposes nontrivial restrictions on how one can parametrize fθ : it must be flexible yet invertible with a Jacobian that can be computed efficiently . There are a number of techniques to achieve this , e.g. , linear mappings , planar/radial flows ( Rezende & Mohamed , 2015 ; Tabak & Turner , 2013 ) , Sylvester flows ( Berg et al. , 2018 ) , coupling ( Dinh et al. , 2014 ) and auto-regressive models ( Larochelle & Murray , 2011 ) . One may also compose the transformations , e.g. , using monotonic mappings fθ in each layer ( Huang et al. , 2018 ; De Cao et al. , 2019 ) . Auto-regressive models factorize the joint distribution as a product of univariate conditional distributions q ( x ; θ ) : = ∏ i qi ( xi|x1 , . . . xi−1 ; θ ) . The auto-regressive approach to density estimation is straightforward and flexible as there is no restriction on how each conditional distribution is modeled . Often , a single recurrent neural network ( RNN ) is used to sequentially estimate all conditionals with a shared set of parameters ( Oliva et al. , 2018 ; Kingma et al. , 2016 ) . For high-dimensional data , the challenge lies in handling the increasingly large state space x1 , . . . , xi−1 required to properly infer xi . In recurrent auto-regressive models , these conditioned-upon variables ’ values are stored in some representation hi which is updated via a function hi+1 = g ( hi , xi ) . This overcomes the problem of high-dimensional estimation , albeit at the expense of loss in fidelity . Techniques like masking the computational paths in a feed-forward network are popular to alleviate these problems further ( Uria et al. , 2016 ; Germain et al. , 2015 ; Papamakarios et al. , 2017 ) . Many existing auto-regressive algorithms are highly sensitive to the variable ordering chosen for factorizing q , and some methods must train complex ensembles over multiple orderings to achieve good performance ( Germain et al. , 2015 ; Uria et al. , 2014 ) . While autoregressive models are commonly applied to natural language and time series data , this setting only involves variables that are already naturally ordered ( Chelba et al. , 2013 ) . In contrast , we consider continuous ( and discrete ) density estimation of vector valued data , e.g . tabular data , where the underlying ordering and dependencies between variables is often unknown . Generative models focus on drawing samples from the estimated distribution that look resemble the true distribution of data . There is a rich history of learning explicit models from variational inference ( Jordan et al. , 1999 ) that allow both drawing samples and estimating the log-likelihood or implicit models such as Generative Adversarial Networks ( GANs , see ( Goodfellow et al. , 2014 ) ) where one may only draw samples . These have been shown to work well for natural images ( Kingma & Welling , 2013 ) but have not obtained similar performance for tabular data . We also note the existence of many classical techniques that are less popular in deep learning , such as kernel density estimation ( Silverman , 2018 ) and Chow-Liu trees ( Chow & Liu , 1968 ; Choi et al. , 2011 ) . 3 TOOLS OF THE TRADE x1 x2 x3 x4 x5 x6 x7 x8 x1 x8 x2 x7 x3 x6 x4 x5 Consider the 8-dimensional Markov Random Field shown here , where the underlying graphical model is unknown in practice . Consider the following two orders in which to factorize the autoregressive model : ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ) and ( 1 , 8 , 2 , 7 , 3 , 6 , 4 , 5 ) . In the latter case the model becomes a simple sequence where e.g . p ( x3|x1,8,2,7 ) = p ( x3|x7 ) due to conditional independence . A latent variable auto-regressive model only needs to preserve the most recently encountered state in this latter ordering . In the first ordering , p ( x3|x1,2 ) can be simplified further to p ( x3|x2 ) , but we still need to carry the precise value of x1 along until the end since p ( x8|x1 ... 7 ) = p ( x8|x1,2 ) . This is a fundamental weakness in models employing RNNs such as ( Oliva et al. , 2018 ) . In practice , we may be unable to select a favorable ordering for columns in a table ( unlike for language where words are inherently ordered ) , especially as the underlying distribution is unknown . 3.1 VERTEX ORDERING AND SUFFICIENT STATISTICS . The above problem is also seen in sequence modeling , and Transformers were introduced to better model such long-range dependencies through self-attention ( Vaswani et al. , 2017 ) . A recurrent network can , in principle , absorb this information into its hidden state . In fact , Long-Short-Term Memory ( LSTM ) ( Hochreiter & Schmidhuber , 1997 ) units were engineered specifically to store long-range dependencies until needed . Nonetheless , storing information costs parameter space . For an auto-regressive factorization where the true conditionals require one to store many variables ’ values for many time steps , the RNN/LSTM hidden state must be undesirably large to achieve low approximation error , which means these models must have many parameters ( Collins et al. , 2017 ) . The following simple lemma formalizes this . Lemma 1 . Denote by G the graph of an undirected graphical model over random variables x1 , . . . , xd . Depending on the order vertices are traversed in our factorization the largest number of latent variables a recurrent auto-regressive model needs to store is bounded from above and below by the minimum and the maximum number of variables with a cut edge of the graph G. Proof . Given a subset of known variables S ⊆ { 1 , . . . d } we want to estimate the conditional distribution of the variables on the complement C : = { 1 , . . . d } \S . For this we need to decompose S into the Markov blanket M of C and its remainder . By definition M consists of the variables with a cut edge . Since p ( xC |xS ) = p ( xC |xM ) we are done . This problem with long-dependencies in auto-regressive models has been noted before , and is exacerbated in density estimation with continuous-valued data , where values of conditioned-upon variables may need to be precisely retrieved . For instance , recent auto-regressive models employ masking to eliminate the sequential operations of recurrent models ( Papamakarios et al. , 2017 ) . There are also models like Pixel RNN ( Oord et al. , 2016 ) which explicitly design a multi-scale masking mechanism suited for natural images ( and also require discretization of continuous-valued data ) . Note that while there is a natural ordering of random variables in text/image data , variables in tabular data do not follow any canonical ordering . Applicable to both continuous and discrete valued data , our proposed TraDE model circumvents this issue by utilizing self-attention to retrieve feature values relevant for the conditioning , which does not require more parameters to retrieve the values of relevant features that happened to appear early in the auto-regressive factorization order ( Yun et al. , 2019 ) . Thus a major benefit of self-attention here is its effectiveness at maintaining an accurate representation of the feature values xj for j < i when inferring xi ( irrespective of the distance between i and j ) . | This work proposes a new auto-regressive density estimator built using self-attention module from the popular Transformer network. TraDE can be seen as an extension of decoder-only Transformer network where an input embeddings are given by a simple RNN-based encoder. Like Transformer, TraDE leverages multiple layers of self-attention module to implicitly model long-range dependencies. This effectively eliminates the need for explicit vertex ordering and hence useful on data with no known canonical ordering. The proposed model is general and can be applied to both continuous as well as discrete data. Along with the MLE objective, TraDE is additionally regularised using MMD penalty which can be easily back-propagated using reparametrization / Gumbel softmax trick. | SP:e8c5589f22688422495fbc1dd7418139443102b9 |
Active Feature Acquisition with Generative Surrogate Models | 1 INTRODUCTION . A typical machine learning paradigm for discriminative tasks is to learn the distribution of an output , y given a complete set of features , x ∈ Rd : p ( y | x ) . Although this paradigm is successful in a multitude of domains , it is incongruous with the expectations of many real-world intelligent systems in two key ways : first , it assumes that a complete set of features has been observed ; second , as a consequence , it also assumes that no additional information ( features ) of an instance may be obtained at evaluation time . These assumptions often do not hold ; human agents routinely reason over instances with incomplete data and decide when and what additional information to obtain . For example , consider a doctor diagnosing a patient . The doctor usually has not observed all possible measurements ( such as blood samples , x-rays , etc . ) for the patient . He/she is not forced to make a diagnosis based on the observed measurements ; instead , he/she may dynamically decide to take more measurements to help determine the diagnosis . Of course , the next measurement to make ( feature to observe ) , if any , will depend on the values of the already observed features ; thus , the doctor may determine a different set of features to observe from patient to patient ( instance to instance ) depending on the values of the features that were observed . Hence , not each patient will have the same subset of features selected ( as would be the case with typical feature selection ) . Furthermore , acquiring features typically involves some cost ( in time , money and risk ) , and intelligent systems are expected to automatically balance the cost and the return on improvement of the task performance . In order to more closely match the needs of many real-world applications , we propose an active feature acquisition ( AFA ) model that not only makes predictions with incomplete/missing features , but also determines what next feature would be the most valuable to obtain for a particular instance . In this work , we formulate the active feature acquisition problem as a Markov decision process ( MDP ) , where the state is the set of currently observed features and the action is the next feature to acquire . We also introduce a special action to indicate whether to stop the acquisition process and make a final prediction . Reinforcement learning is then utilized to optimize the MDP , and the agent learns a policy for selecting which next feature to acquire based on the current state . After acquiring its value and paying the acquisition cost , the newly acquired feature is added to the observed subset and the agent proceeds to the next acquisition step . Once the agent decides to terminate the acquisition , it makes a final prediction based on the features acquired thus far . For example , in an image classification task ( Fig . 1 ) , the agent would dynamically acquire pixels until it is certain of the image class . The goal of the agent is to maximize the prediction performance while minimizing the acquisition cost . In the aforementioned MDP , the agent pays the acquisition cost at each acquisition step but only receives a reward about the prediction after completing the acquisition process . To reduce the sparsity of the rewards and simplify the credit assignment problem for potentially long episodes ( Minsky , 1961 ; Sutton , 1988 ) , we leverage a surrogate model to provide intermediate rewards . The surrogate model captures the arbitrary conditional distribution p ( y , xu | xo ) , where y is the target variable and u , o ⊆ { 1 , . . . , d } are arbitrary subsets of all d-dimensional features . Note that the surrogate model must be able to capture arbitrary conditionals ( for subsets u , o ) since the acquired features will vary from instance to instance . We propose using the surrogate model to calculate intermediate rewards by assessing the information gain of the newly acquired feature , which quantifies how much our confidence about the prediction improves by acquiring this feature . In addition to producing intermediate rewards , we also propose using the surrogate model to provide side information that assists the agent . First , in order to inform the agent of the current information held in observed features , we pass uncertainty on the target through p ( y | xo ) . Second , to inform the agent about potential values for unobserved features , we pass imputed values by sampling x̂u ∼ p ( xu | xo ) . Lastly , to inform the agent about the expected utility of acquisitions , we pass an estimate of the expected information gain of acquisitions i for the target variable , i.e. , H ( y | xo ) − Ep ( xi|xo ) H ( y | xi , xo ) . We note that the expected information gain can be used to directly build a greedy policy , where the next feature to acquire is the one maximizes the expected information gain ( Ma et al. , 2018 ; Gong et al. , 2019 ) . In contrast , our agent learns a non-greedy policy to maximize the long-term returns and use the greedy approach as a ‘ prior ’ policy to guide our agent . In summary , our agent actively acquires new feature and pays the acquisition cost until it decides to terminate the acquisition process and make a final prediction . Meanwhile , the surrogate model calculates the information gain of the acquired feature as an intermediate reward and provides side information to assist the agent in assessing its current uncertainty and help it ‘ look ahead ’ to expected outcomes from future acquisitions . When the acquisition process is completed , the environment provides a final reward based on the agent ’ s prediction . Note that the environment does have access to the ground-truth target y to evaluate the reward , but can not reveal it to the agent . Equipped with the surrogate model , our method , denoted as GSMRL , essentially combines model-free and modelbased RL into a holistic framework . Above we discussed AFA for supervised tasks , where the goal is to acquire new features to predict a target variable y . In some cases , however , there may not be a single target variable , but instead the target of interest may be the remaining unobserved features themselves . That is , rather than reduce the uncertainty with respect to some desired output response ( that can not be directly queried and must be predicted ) , we now propose active instance recognition ( AIR ) , where the task is to query as few features as possible that allows the agent to correctly uncover the remaining unobserved features . For example , in image data AIR , an agent queries new pixels until it can reliably uncover the remaining pixels ( see Fig . 2 ) . AIR is especially relevant in survey tasks , which are broadly applicable across various domains and applications . Most surveys aim to discover a broad set of underlying characteristics of instances ( e.g. , citizens in a census ) using a limited number of queries ( questions in the census form ) , which is at the core of AIR . Policies for AIR would build a personalized subset Algorithm 1 : Active Feature Acquisition with GSMRL 1. load pretrained surrogate model M , agent agent and prediction model fθ ( · ) ; 2. instantiate an environment with data D and surrogate model M : env = Environment ( D , M ) ; xo , o , done , reward = env.reset ( ) ; // o = ∅ , done=False , reward=0 while not done do aux = M .query ( xo , o ) ; // query M for auxiliary information // aux contains the prediction ŷ ∼ p ( y | xo ) and output likelihoods , // the imputed values x̂u ∼ p ( xu | xo ) and their uncertainties , // and estimated utilities Ui for each i ∈ u ( equation 4 ) . action = agent.act ( xo , o , aux ) ; // act based on the state and auxiliary info xo , o , done , r = env.step ( action ) ; // take a step based on the action // if action indicates termination : done=True , r=-L ( ŷ ( xo ) , y ) // else : done=False , r=rm ( s , action ) − αC ( action ) , o = o ∪ action reward = reward + r ; // accumulate rewards end prediction = M .predict ( xo , o , aux ) or fθ ( xo , o , aux ) ; // make a final prediction of survey questions ( for individual instances ) that quickly uncovered the likely answers to all remaining questions . To adapt our GSMRL framework to AIR , we set the target variable y equal to x and modify the surrogate model accordingly . Our contributions are as follows : 1 ) We propose a way of building surrogate models for AFA problem that captures the state transitions with arbitrary conditional distributions . 2 ) We leverage the surrogate model to provide intermediate rewards as training signals and to provide auxiliary information that assists the agent . Our framework represents a novel combination of model-free and model-based RL . 3 ) We extend the active feature acquisition problem to an unsupervised case where the target variables are the unobserved features themselves . Our RL agent can be adapted to this problem with simple modifications . 4 ) We achieve state-of-the-art performance on both supervised and unsupervised tasks . 5 ) We open-source a standardized environment inheriting the OpenAI gym interfaces ( Brockman et al. , 2016 ) to assist future research on active feature acquisition . Code will be released upon publication . 2 METHODS . In this section , we first describe our GSMRL framework for both active feature acquisition ( AFA ) and active instance recognition ( AIR ) problems . We then develop our RL algorithm and the corresponding surrogate models for different settings . We also introduce a special application that acquires features for time series data . 2.1 AFA AND AIR WITH GSMRL . Consider a discriminative task with features x ∈ Rd and target y . Instead of predicting the target by first collecting all the features , we perform a sequential feature acquisition process in which we start from an empty set of features and actively acquire more features . There is typically a cost associated with features and the goal is to maximize the task performance while minimizing the acquisition cost , i.e. , minimize L ( ŷ ( xo ) , y ) + αC ( o ) , ( 1 ) where L ( ŷ ( xo ) , y ) represents the loss function between the prediction ŷ ( xo ) and the target y . Note that the prediction is made with the acquired feature subset xo , o ⊆ { 1 , . . . , d } . Therefore the agent should be able to predict with arbitrary subset as inputs . C ( o ) represents the acquisition cost of the acquired features o . The hyperparameter α controls the trade-off between prediction loss and acquisition cost . For unsupervised tasks , the target variable y is equal to x ; that is , we acquire features actively to represent the instance with a selected subset . In order to solve the optimization problem in equation 1 , we formulate it as a Markov decision process as done in ( Shim et al. , 2018 ) : s = [ o , xo ] , a ∈ u ∪ φ , r ( s , a ) = −L ( ŷ , y ) I ( a = φ ) − αC ( a ) I ( a �= φ ) . ( 2 ) The state s is the current acquired feature subset o ⊆ { 1 , . . . , d } and their values xo . The action space contains the remaining candidate features u = { 1 , . . . , d } \ o and a special action φ that in- dicates the termination of the acquisition process . To optimize the MDP , a reinforcement learning agent acts based on the observed state and receives rewards from the environment . When the agent acquires a new feature i , the current state transits to a new state following o i−→ o ∪ i , xo i−→ xo ∪ xi , and the reward is the negative acquisition cost of this feature . Note xi is obtained from the environment ( i.e . we observe the true ith feature value for the instance ) . When the agent terminates the acquisition and makes a prediction , the reward equals to the negative prediction loss using current acquired features . Since the prediction is made at the end of the acquisition , the reward of the prediction is received only when the agent decide to terminate the acquisition process . This is a typical temporal credit assignment problem for RL algorithms , which could affect the learning of the agent ( Minsky , 1961 ; Sutton , 1988 ) . In order to remedy this issue , we propose to leverage a generative surrogate model to provide intermediate rewards for each acquisition . The surrogate model estimates the state transitions with arbitrary conditional distributions p ( y , xu | xo ) for arbitrary subsets u and o . We propose using the surrogate model to assess the intermediate reward rm for a newly acquired feature i . The intermediate rewards are inspired by the information gain to the target variable rm ( s , i ) = H ( y | xo ) − γH ( y | xo , xi ) , ( 3 ) where γ is a discount factor for the MDP . In appendix A , we show that our intermediate rewards will not change the optimal policy . In addition to intermediate rewards , we propose using the surrogate model to also provide side information to assist the agent , which includes the current prediction and output likelihood , the possible values and corresponding uncertainties of the unobserved features , and the estimated utilities of the candidate acquisitions . The current prediction ŷ and likelihood p ( y | xo ) inform the agent about its confidence , which can help the agent determine whether to stop the acquisition . The imputed values and uncertainties of the unobserved features give the agent the ability to look ahead into and future and guide its exploration . For example , if the surrogate model is very confident about the value of a currently unobserved feature , then acquiring it would be redundant . The utility of a feature i is estimated by its expected information gain to the target variable : Ui = H ( y | xo ) − Ep ( xi|xo ) H ( y | xi , xo ) = H ( xi | xo ) − Ep ( y|xo ) H ( xi | y , xo ) , ( 4 ) where the surrogate model is used to estimate the entropies . The utility essentially quantifies the conditional mutual information I ( xi ; y | xo ) between each candidate feature and the target variable . A greedy policy can be easily built based on the utilities where the next feature to acquire is the one with maximum utility ( Ma et al. , 2018 ; Gong et al. , 2019 ) . Here , our agent takes the utilities as side information to help balance exploration and exploitation , and eventually learns a non-greedy policy . When the agent deems that acquisition is complete , it makes a final prediction based on the acquired feaures thus far . The final prediction may be made using the surrogate model , i.e. , p ( y | xo ) , but it might be beneficial to train predictions specifically based on the agent ’ s own distribution of acquired features o , since the surrogate model is agnostic to the feature acquisition policy of the agent . Therefore , we optionally build a prediction model fθ ( · ) that takes both the current state xo and the side information as inputs ( i.e . the same inputs as the policy ) . The prediction model can be trained simultaneously with the policy as an auxiliary task ; weight sharing between the policy and prediction function helps facilitate the learning of more meaningful representations . Now we have two predictions , from the surrogate model and the prediction model respectively . The final reward −L ( ŷ , y ) during training is the maximum one using either predictions . During test time , we choose one prediction based on validation performance . An illustration of our framework is presented in Fig . 3 . Please refer to Algorithm 1 for the pseudo-code of the acquisition process with our GSMRL framework . We will expound on the surrogate models for different settings below . | In this work, a reinforcement learning (RL) approach is proposed to solve the active feature acquisition (AFA) problem (as well as the active instance recognition problem). Comparing to existing RL approaches for AFA, the main difference of the proposed approach is to introduce a generative model (utilizing the existing ACFlow model) to learn the transition function, in order to provide additional rewards and auxiliary information. The proposed approach is evaluated on MNIST and UCI datasets, which can outperform two existing baselines. | SP:c4549595bfdf81732bd6dbec7265f6bfed58d61b |
Active Feature Acquisition with Generative Surrogate Models | 1 INTRODUCTION . A typical machine learning paradigm for discriminative tasks is to learn the distribution of an output , y given a complete set of features , x ∈ Rd : p ( y | x ) . Although this paradigm is successful in a multitude of domains , it is incongruous with the expectations of many real-world intelligent systems in two key ways : first , it assumes that a complete set of features has been observed ; second , as a consequence , it also assumes that no additional information ( features ) of an instance may be obtained at evaluation time . These assumptions often do not hold ; human agents routinely reason over instances with incomplete data and decide when and what additional information to obtain . For example , consider a doctor diagnosing a patient . The doctor usually has not observed all possible measurements ( such as blood samples , x-rays , etc . ) for the patient . He/she is not forced to make a diagnosis based on the observed measurements ; instead , he/she may dynamically decide to take more measurements to help determine the diagnosis . Of course , the next measurement to make ( feature to observe ) , if any , will depend on the values of the already observed features ; thus , the doctor may determine a different set of features to observe from patient to patient ( instance to instance ) depending on the values of the features that were observed . Hence , not each patient will have the same subset of features selected ( as would be the case with typical feature selection ) . Furthermore , acquiring features typically involves some cost ( in time , money and risk ) , and intelligent systems are expected to automatically balance the cost and the return on improvement of the task performance . In order to more closely match the needs of many real-world applications , we propose an active feature acquisition ( AFA ) model that not only makes predictions with incomplete/missing features , but also determines what next feature would be the most valuable to obtain for a particular instance . In this work , we formulate the active feature acquisition problem as a Markov decision process ( MDP ) , where the state is the set of currently observed features and the action is the next feature to acquire . We also introduce a special action to indicate whether to stop the acquisition process and make a final prediction . Reinforcement learning is then utilized to optimize the MDP , and the agent learns a policy for selecting which next feature to acquire based on the current state . After acquiring its value and paying the acquisition cost , the newly acquired feature is added to the observed subset and the agent proceeds to the next acquisition step . Once the agent decides to terminate the acquisition , it makes a final prediction based on the features acquired thus far . For example , in an image classification task ( Fig . 1 ) , the agent would dynamically acquire pixels until it is certain of the image class . The goal of the agent is to maximize the prediction performance while minimizing the acquisition cost . In the aforementioned MDP , the agent pays the acquisition cost at each acquisition step but only receives a reward about the prediction after completing the acquisition process . To reduce the sparsity of the rewards and simplify the credit assignment problem for potentially long episodes ( Minsky , 1961 ; Sutton , 1988 ) , we leverage a surrogate model to provide intermediate rewards . The surrogate model captures the arbitrary conditional distribution p ( y , xu | xo ) , where y is the target variable and u , o ⊆ { 1 , . . . , d } are arbitrary subsets of all d-dimensional features . Note that the surrogate model must be able to capture arbitrary conditionals ( for subsets u , o ) since the acquired features will vary from instance to instance . We propose using the surrogate model to calculate intermediate rewards by assessing the information gain of the newly acquired feature , which quantifies how much our confidence about the prediction improves by acquiring this feature . In addition to producing intermediate rewards , we also propose using the surrogate model to provide side information that assists the agent . First , in order to inform the agent of the current information held in observed features , we pass uncertainty on the target through p ( y | xo ) . Second , to inform the agent about potential values for unobserved features , we pass imputed values by sampling x̂u ∼ p ( xu | xo ) . Lastly , to inform the agent about the expected utility of acquisitions , we pass an estimate of the expected information gain of acquisitions i for the target variable , i.e. , H ( y | xo ) − Ep ( xi|xo ) H ( y | xi , xo ) . We note that the expected information gain can be used to directly build a greedy policy , where the next feature to acquire is the one maximizes the expected information gain ( Ma et al. , 2018 ; Gong et al. , 2019 ) . In contrast , our agent learns a non-greedy policy to maximize the long-term returns and use the greedy approach as a ‘ prior ’ policy to guide our agent . In summary , our agent actively acquires new feature and pays the acquisition cost until it decides to terminate the acquisition process and make a final prediction . Meanwhile , the surrogate model calculates the information gain of the acquired feature as an intermediate reward and provides side information to assist the agent in assessing its current uncertainty and help it ‘ look ahead ’ to expected outcomes from future acquisitions . When the acquisition process is completed , the environment provides a final reward based on the agent ’ s prediction . Note that the environment does have access to the ground-truth target y to evaluate the reward , but can not reveal it to the agent . Equipped with the surrogate model , our method , denoted as GSMRL , essentially combines model-free and modelbased RL into a holistic framework . Above we discussed AFA for supervised tasks , where the goal is to acquire new features to predict a target variable y . In some cases , however , there may not be a single target variable , but instead the target of interest may be the remaining unobserved features themselves . That is , rather than reduce the uncertainty with respect to some desired output response ( that can not be directly queried and must be predicted ) , we now propose active instance recognition ( AIR ) , where the task is to query as few features as possible that allows the agent to correctly uncover the remaining unobserved features . For example , in image data AIR , an agent queries new pixels until it can reliably uncover the remaining pixels ( see Fig . 2 ) . AIR is especially relevant in survey tasks , which are broadly applicable across various domains and applications . Most surveys aim to discover a broad set of underlying characteristics of instances ( e.g. , citizens in a census ) using a limited number of queries ( questions in the census form ) , which is at the core of AIR . Policies for AIR would build a personalized subset Algorithm 1 : Active Feature Acquisition with GSMRL 1. load pretrained surrogate model M , agent agent and prediction model fθ ( · ) ; 2. instantiate an environment with data D and surrogate model M : env = Environment ( D , M ) ; xo , o , done , reward = env.reset ( ) ; // o = ∅ , done=False , reward=0 while not done do aux = M .query ( xo , o ) ; // query M for auxiliary information // aux contains the prediction ŷ ∼ p ( y | xo ) and output likelihoods , // the imputed values x̂u ∼ p ( xu | xo ) and their uncertainties , // and estimated utilities Ui for each i ∈ u ( equation 4 ) . action = agent.act ( xo , o , aux ) ; // act based on the state and auxiliary info xo , o , done , r = env.step ( action ) ; // take a step based on the action // if action indicates termination : done=True , r=-L ( ŷ ( xo ) , y ) // else : done=False , r=rm ( s , action ) − αC ( action ) , o = o ∪ action reward = reward + r ; // accumulate rewards end prediction = M .predict ( xo , o , aux ) or fθ ( xo , o , aux ) ; // make a final prediction of survey questions ( for individual instances ) that quickly uncovered the likely answers to all remaining questions . To adapt our GSMRL framework to AIR , we set the target variable y equal to x and modify the surrogate model accordingly . Our contributions are as follows : 1 ) We propose a way of building surrogate models for AFA problem that captures the state transitions with arbitrary conditional distributions . 2 ) We leverage the surrogate model to provide intermediate rewards as training signals and to provide auxiliary information that assists the agent . Our framework represents a novel combination of model-free and model-based RL . 3 ) We extend the active feature acquisition problem to an unsupervised case where the target variables are the unobserved features themselves . Our RL agent can be adapted to this problem with simple modifications . 4 ) We achieve state-of-the-art performance on both supervised and unsupervised tasks . 5 ) We open-source a standardized environment inheriting the OpenAI gym interfaces ( Brockman et al. , 2016 ) to assist future research on active feature acquisition . Code will be released upon publication . 2 METHODS . In this section , we first describe our GSMRL framework for both active feature acquisition ( AFA ) and active instance recognition ( AIR ) problems . We then develop our RL algorithm and the corresponding surrogate models for different settings . We also introduce a special application that acquires features for time series data . 2.1 AFA AND AIR WITH GSMRL . Consider a discriminative task with features x ∈ Rd and target y . Instead of predicting the target by first collecting all the features , we perform a sequential feature acquisition process in which we start from an empty set of features and actively acquire more features . There is typically a cost associated with features and the goal is to maximize the task performance while minimizing the acquisition cost , i.e. , minimize L ( ŷ ( xo ) , y ) + αC ( o ) , ( 1 ) where L ( ŷ ( xo ) , y ) represents the loss function between the prediction ŷ ( xo ) and the target y . Note that the prediction is made with the acquired feature subset xo , o ⊆ { 1 , . . . , d } . Therefore the agent should be able to predict with arbitrary subset as inputs . C ( o ) represents the acquisition cost of the acquired features o . The hyperparameter α controls the trade-off between prediction loss and acquisition cost . For unsupervised tasks , the target variable y is equal to x ; that is , we acquire features actively to represent the instance with a selected subset . In order to solve the optimization problem in equation 1 , we formulate it as a Markov decision process as done in ( Shim et al. , 2018 ) : s = [ o , xo ] , a ∈ u ∪ φ , r ( s , a ) = −L ( ŷ , y ) I ( a = φ ) − αC ( a ) I ( a �= φ ) . ( 2 ) The state s is the current acquired feature subset o ⊆ { 1 , . . . , d } and their values xo . The action space contains the remaining candidate features u = { 1 , . . . , d } \ o and a special action φ that in- dicates the termination of the acquisition process . To optimize the MDP , a reinforcement learning agent acts based on the observed state and receives rewards from the environment . When the agent acquires a new feature i , the current state transits to a new state following o i−→ o ∪ i , xo i−→ xo ∪ xi , and the reward is the negative acquisition cost of this feature . Note xi is obtained from the environment ( i.e . we observe the true ith feature value for the instance ) . When the agent terminates the acquisition and makes a prediction , the reward equals to the negative prediction loss using current acquired features . Since the prediction is made at the end of the acquisition , the reward of the prediction is received only when the agent decide to terminate the acquisition process . This is a typical temporal credit assignment problem for RL algorithms , which could affect the learning of the agent ( Minsky , 1961 ; Sutton , 1988 ) . In order to remedy this issue , we propose to leverage a generative surrogate model to provide intermediate rewards for each acquisition . The surrogate model estimates the state transitions with arbitrary conditional distributions p ( y , xu | xo ) for arbitrary subsets u and o . We propose using the surrogate model to assess the intermediate reward rm for a newly acquired feature i . The intermediate rewards are inspired by the information gain to the target variable rm ( s , i ) = H ( y | xo ) − γH ( y | xo , xi ) , ( 3 ) where γ is a discount factor for the MDP . In appendix A , we show that our intermediate rewards will not change the optimal policy . In addition to intermediate rewards , we propose using the surrogate model to also provide side information to assist the agent , which includes the current prediction and output likelihood , the possible values and corresponding uncertainties of the unobserved features , and the estimated utilities of the candidate acquisitions . The current prediction ŷ and likelihood p ( y | xo ) inform the agent about its confidence , which can help the agent determine whether to stop the acquisition . The imputed values and uncertainties of the unobserved features give the agent the ability to look ahead into and future and guide its exploration . For example , if the surrogate model is very confident about the value of a currently unobserved feature , then acquiring it would be redundant . The utility of a feature i is estimated by its expected information gain to the target variable : Ui = H ( y | xo ) − Ep ( xi|xo ) H ( y | xi , xo ) = H ( xi | xo ) − Ep ( y|xo ) H ( xi | y , xo ) , ( 4 ) where the surrogate model is used to estimate the entropies . The utility essentially quantifies the conditional mutual information I ( xi ; y | xo ) between each candidate feature and the target variable . A greedy policy can be easily built based on the utilities where the next feature to acquire is the one with maximum utility ( Ma et al. , 2018 ; Gong et al. , 2019 ) . Here , our agent takes the utilities as side information to help balance exploration and exploitation , and eventually learns a non-greedy policy . When the agent deems that acquisition is complete , it makes a final prediction based on the acquired feaures thus far . The final prediction may be made using the surrogate model , i.e. , p ( y | xo ) , but it might be beneficial to train predictions specifically based on the agent ’ s own distribution of acquired features o , since the surrogate model is agnostic to the feature acquisition policy of the agent . Therefore , we optionally build a prediction model fθ ( · ) that takes both the current state xo and the side information as inputs ( i.e . the same inputs as the policy ) . The prediction model can be trained simultaneously with the policy as an auxiliary task ; weight sharing between the policy and prediction function helps facilitate the learning of more meaningful representations . Now we have two predictions , from the surrogate model and the prediction model respectively . The final reward −L ( ŷ , y ) during training is the maximum one using either predictions . During test time , we choose one prediction based on validation performance . An illustration of our framework is presented in Fig . 3 . Please refer to Algorithm 1 for the pseudo-code of the acquisition process with our GSMRL framework . We will expound on the surrogate models for different settings below . | This paper studies the problem of active feature acquisition (AFA). The authors formulate AFA as a Markov decision process (MDF) and use reinforcement learning to resolve it. In order to overcome the sparse reward and complicated action space in this situation, the authors combine a generative surrogate model into their framework (GSMRL) to provide more feedback to the agent. Additionally, the authors adapt GSMRL into the supervised, unsupervised task (AIR) domain and introduce the corresponding dealing process in detail. Finally, the authors conduct lots of experiments to validate the superiority of GSMRL and the necessity of each component in GSMRL. | SP:c4549595bfdf81732bd6dbec7265f6bfed58d61b |
What Should Not Be Contrastive in Contrastive Learning | 1 INTRODUCTION . Self-supervised learning , which uses raw image data and/or available pretext tasks as its own supervision , has become increasingly popular as the inability of supervised models to generalize beyond their training data has become apparent . Different pretext tasks have been proposed with different transformations , such as spatial patch prediction ( Doersch et al. , 2015 ; Noroozi & Favaro , 2016 ) , colorization ( Zhang et al. , 2016 ; Larsson et al. , 2016 ; Zhang et al. , 2017 ) , rotation ( Gidaris et al. , 2018 ) . Whereas pretext tasks aim to recover the transformations between different “ views ” of the same data , more recent contrastive learning methods ( Wu et al. , 2018 ; Tian et al. , 2019 ; He et al. , 2020 ; Chen et al. , 2020a ) instead try to learn to be invariant to these transformations , while remaining discriminative with respect to other data points . Here , the transformations are generated using classic data augmentation techniques which correspond to common pretext tasks , e.g. , randomizing color , texture , orientation and cropping . Yet , the inductive bias introduced through such augmentations is a double-edged sword , as each augmentation encourages invariance to a transformation which can be beneficial in some cases and harmful in others : e.g. , adding rotation may help with view-independent aerial image recognition , but significantly downgrade the capacity of a network to solve tasks such as detecting which way is up in a photograph for a display application . Current self-supervised contrastive learning methods assume implicit knowledge of downstream task invariances . In this work , we propose to learn visual representations which capture individual factors of variation in a contrastive learning framework without presuming prior knowledge of downstream invariances . Instead of mapping an image into a single embedding space which is invariant to all the handcrafted augmentations , our model learns to construct separate embedding sub-spaces , each of which is sensitive to a specific augmentation while invariant to other augmentations . We achieve this by optimizing multiple augmentation-sensitive contrastive objectives using a multi-head architecture with a shared backbone . Our model aims to preserve information with regard to each augmentation in a unified representation , as well as learn invariances to them . The general representation trained with these augmentations can then be applied to different downstream tasks , where each task is free to selectively utilize different factors of variation in our representation . We consider transfer of either the shared backbone representation , or the concatenation of all the task-specific heads ; both Color Rotation Texture Color Rotation Texture Augmentations Downstream Tasks Augmentations ? Classes ( a ) ( b ) Coarse-grained Fine-grained ( bird ) Fine-grained ( flower ) Figure 1 : Self-supervised contrastive learning relies on data augmentations as depicted in ( a ) to learn visual representations . However , current methods introduce inductive bias by encouraging neural networks to be less sensitive to information w.r.t . augmentation , which may help or may hurt . As illustrated in ( b ) , rotation invariant embeddings can help on certain flower categories , but may hurt animal recognition performance ; conversely color invariance generally seems to help coarse grained animal classification , but can hurt many flower categories and bird categories . Our method , shown in the following figure , overcomes this limitation . outperform all baselines ; the former uses same embedding dimensions as typical baselines , while the latter provides greatest overall performance in our experiments . In this paper , we experiment with three types of augmentations : rotation , color jittering , and texture randomization , as visualized in Figure 1 . We evaluate our approach across a variety of diverse tasks including large-scale classification ( Deng et al. , 2009 ) , fine-grained classification ( Wah et al. , 2011 ; Van Horn et al. , 2018 ) , few-shot classification ( Nilsback & Zisserman , 2008 ) , and classification on corrupted data ( Barbu et al. , 2019 ; Hendrycks & Dietterich , 2019 ) . Our representation shows consistent performance gains with increasing number of augmentations . Our method does not require hand-selection of data augmentation strategies , and achieves better performance against state-of-the-art MoCo baseline ( He et al. , 2020 ; Chen et al. , 2020b ) , and demonstrates superior transferability , generalizability and robustness across tasks and categories . Specifically , we obtain around 10 % improvement over MoCo in classification when applied on the iNaturalist ( Van Horn et al. , 2018 ) dataset . 2 BACKGROUND : CONTRASTIVE LEARNING FRAMEWORK . Contrastive learning learns a representation by maximizing similarity and dissimilarity over data samples which are organized into similar and dissimilar pairs , respectively . It can be formulated as a dictionary look-up problem ( He et al. , 2020 ) , where a given reference image I is augmented into two views , query and key , and the query token q should match its designated key k+ over a set of sampled negative keys { k− } from other images . In general , the framework can be summarized as the following components : ( i ) A data augmentation module T constituting n atomic augmentation operators , such as random cropping , color jittering , and random flipping . We denote a pre-defined atomic augmentation as random variable Xi . Each time the atomic augmentation is executed by sampling a specific augmentation parameter from the random variable , i.e. , xi∼Xi . One sampled data augmentation module transforms image I into a random view Ĩ , denoted as Ĩ = T [ x1 , x2 , . . . , xn ] ( I ) . Positive pair ( q , k+ ) is generated by applying two randomly sampled data augmentation on the same reference image . ( ii ) An encoder network f which extracts the feature v of an image I by mapping it into a d-dimensional space Rd . ( iii ) A projection head h which further maps extracted representations into a hyper-spherical ( normalized ) embedding space . This space is subsequently used for a specific pretext task , i.e. , contrastive loss objective for a batch of positive/negative pairs . A common choice is InfoNCE ( Oord et al. , 2018 ) : Lq = − log exp ( q·k+/τ ) exp ( q·k+/τ ) + ∑ k− exp ( q·k−/τ ) , ( 1 ) where τ is a temperature hyper-parameter scaling the distribution of distances . As a key towards learning a good feature representation ( Chen et al. , 2020a ) , a strong augmentation policy prevents the network from exploiting naı̈ve cues to match the given instances . However , in- ductive bias is introduced through the selection of augmentations , along with their hyper-parameters defining the strength of each augmentation , manifested in Equation 1 that any views by the stochastic augmentation module T of the same instance are mapped onto the same point in the embedding space . The property negatively affects the learnt representations : 1 ) Generalizability and transferability are harmed if they are applied to the tasks where the discarded information is essential , e.g. , color plays an important role in fine-grained classification of birds ; 2 ) Adding an extra augmentation is complicated as the new operator may be helpful to certain classes while harmful to others , e.g. , a rotated flower could be very similar to the original one , whereas it does not hold for a rotated car ; 3 ) The hyper-parameters which control the strength of augmentations need to be carefully tuned for each augmentation to strike a delicate balance between leaving a short-cut open and completely invalidate one source of information . 3 LOOC : LEAVE-ONE-OUT CONTRASTIVE LEARNING . We propose Leave-one-out Contrastive Learning ( LooC ) , a framework for multi-augmentation contrastive learning . Our framework can selectively prevent information loss incurred by an augmentation . Rather than projecting every view into a single embedding space which is invariant to all augmentations , in our LooC method the representations of input images are projected into several embedding spaces , each of which is not invariant to a certain augmentation while remaining invariant to others , as illustrated in Figure 2 . In this way , each embedding sub-space is specialized to a single augmentation , and the shared layers will contain both augmentation-varying and invariant information . We learn a shared representation jointly with the several embedding spaces ; we transfer either the shared representation alone , or the concatenation of all spaces , to downstream tasks . View Generation . Given a reference image and n atomic augmentations , we first augment the reference image with two sets of independently sampled augmentation parameters into the query view Iq and the first key view Ik0 , i.e. , I { q , k0 } = T [ x { q , k0 } 1 , x { q , k0 } 2 , . . . , x { q , k0 } n ] ( I ) . Additionally , we generate n views from the reference image as extra key views , denoted as Iki , ∀i ∈ { 1 , . . . , n } . For the ith additional key view , the parameter of ith atomic augmentation is copied from it of the query view , i.e. , xkii ≡ x q i , ∀i ∈ { 1 , . . . , n } ; whereas the parameter of other atomic augmentations are still independently sampled , i.e. , xkij ∼ Xj , ∀j 6= i . For instance , assume that we have a set of two atomic augmentations { random_rotation , color_jitter } , Iq and Ik1 are always augmented by the same rotation angle but different color jittering ; Iq and Ik2 are always augmented by the same color jittering but different rotation angle ; Iq and Ik0 are augmented independently , as illustrated in the left part of Figure 2 . Contrastive Embedding Space . The augmented views are encoded by a neural network encoder f ( · ) into feature vectors vq , vk0 , · · · , vkn in a joint embedding space V ∈ Rd . Subsequently , they are projected into n+1 normalized embedding spaces Z0 , Z1 , · · · , Zn ∈ Rd ′ by projection heads h : V 7→ Z , among which Z0 is invariant to all types of augmentations , whereas Zi ( ∀i ∈ { 1 , 2 , · · · , n } ) is dependent on the ith type of augmentation but invariant to other types of augmentations . In other words , in Z0 all features v should be mapped to a single point , whereas in Zi ( ∀i ∈ { 1 , 2 , · · · , n } ) only vq and vki should be mapped to a single point while vkj ∀j 6= i should be mapped to n−1 separate points , as only Iq and Iki share the same ith augmentation . We perform contrastive learning in all normalized embedding spaces based on Equation 1 , as shown in the right part of Figure 2 . For each query zq , denote zk + as the keys from the same instance , and zk − as the keys from other instances . Since all views should be mapped to the single point in Z0 , the positive pair for the query zq0 is z k+0 0 , and the negative pairs are embeddings of other instances in this embedding space { zk − 0 0 } ; for embedding spaces Z1 , · · · , Zn , the positive pair for the query zqi is z k+i i , while the negative pairs are embeddings of other instances in this embedding space { zk − i i } , and { z k+j i | ∀j ∈ { 0 , 1 , · · · , n } and j 6= i } , which are the embeddings of the same instance with different ith augmentation . The network then learns to be sensitive to one type of augmentation while insensitive to other types of augmentations in one embedding space . Denote E { + , − } i , j = exp ( z q i · z k { + , − } j i /τ ) . The overall training objective for q is : Lq = − 1 n+ 1 ( log E+0,0 E+0,0 + ∑ k− E − 0,0 + n∑ i=1 log E+i , i∑n j=0 E + i , j + ∑ k− E − i , i ) , ( 2 ) The network must preserve information w.r.t . all augmentations in the general embedding space V in order to optimize the combined learning objectives of all normalized embedding spaces . Learnt representations . The representation for downstream tasks can be from the general embedding space V ( Figure 2 , blue region ) , or the concatenation of all embedding sub-spaces ( Figure 2 , grey region ) . LooC method returns V ; we term the implementation using the concatenation of all embedding sub-spaces as LooC++ . | The paper proposes a contrastive learning approach for self-supervised learning in which multiple heads are trained to be invariant to all but one type of data augmentation. The rationale is that different downstream tasks may require different types of invariances (e.g. we may want to be rotation invariant for pictures of flowers, but not for pictures of animals), and one does not know a-priori which kind of invariances will be required. After training multiple representation heads, one can later concatenate them or use the general embedding (the input to all the variant-specific heads) for the downstream task. | SP:ec83ad5b38ab973df53f6cf9c3bad784ef6a5170 |
What Should Not Be Contrastive in Contrastive Learning | 1 INTRODUCTION . Self-supervised learning , which uses raw image data and/or available pretext tasks as its own supervision , has become increasingly popular as the inability of supervised models to generalize beyond their training data has become apparent . Different pretext tasks have been proposed with different transformations , such as spatial patch prediction ( Doersch et al. , 2015 ; Noroozi & Favaro , 2016 ) , colorization ( Zhang et al. , 2016 ; Larsson et al. , 2016 ; Zhang et al. , 2017 ) , rotation ( Gidaris et al. , 2018 ) . Whereas pretext tasks aim to recover the transformations between different “ views ” of the same data , more recent contrastive learning methods ( Wu et al. , 2018 ; Tian et al. , 2019 ; He et al. , 2020 ; Chen et al. , 2020a ) instead try to learn to be invariant to these transformations , while remaining discriminative with respect to other data points . Here , the transformations are generated using classic data augmentation techniques which correspond to common pretext tasks , e.g. , randomizing color , texture , orientation and cropping . Yet , the inductive bias introduced through such augmentations is a double-edged sword , as each augmentation encourages invariance to a transformation which can be beneficial in some cases and harmful in others : e.g. , adding rotation may help with view-independent aerial image recognition , but significantly downgrade the capacity of a network to solve tasks such as detecting which way is up in a photograph for a display application . Current self-supervised contrastive learning methods assume implicit knowledge of downstream task invariances . In this work , we propose to learn visual representations which capture individual factors of variation in a contrastive learning framework without presuming prior knowledge of downstream invariances . Instead of mapping an image into a single embedding space which is invariant to all the handcrafted augmentations , our model learns to construct separate embedding sub-spaces , each of which is sensitive to a specific augmentation while invariant to other augmentations . We achieve this by optimizing multiple augmentation-sensitive contrastive objectives using a multi-head architecture with a shared backbone . Our model aims to preserve information with regard to each augmentation in a unified representation , as well as learn invariances to them . The general representation trained with these augmentations can then be applied to different downstream tasks , where each task is free to selectively utilize different factors of variation in our representation . We consider transfer of either the shared backbone representation , or the concatenation of all the task-specific heads ; both Color Rotation Texture Color Rotation Texture Augmentations Downstream Tasks Augmentations ? Classes ( a ) ( b ) Coarse-grained Fine-grained ( bird ) Fine-grained ( flower ) Figure 1 : Self-supervised contrastive learning relies on data augmentations as depicted in ( a ) to learn visual representations . However , current methods introduce inductive bias by encouraging neural networks to be less sensitive to information w.r.t . augmentation , which may help or may hurt . As illustrated in ( b ) , rotation invariant embeddings can help on certain flower categories , but may hurt animal recognition performance ; conversely color invariance generally seems to help coarse grained animal classification , but can hurt many flower categories and bird categories . Our method , shown in the following figure , overcomes this limitation . outperform all baselines ; the former uses same embedding dimensions as typical baselines , while the latter provides greatest overall performance in our experiments . In this paper , we experiment with three types of augmentations : rotation , color jittering , and texture randomization , as visualized in Figure 1 . We evaluate our approach across a variety of diverse tasks including large-scale classification ( Deng et al. , 2009 ) , fine-grained classification ( Wah et al. , 2011 ; Van Horn et al. , 2018 ) , few-shot classification ( Nilsback & Zisserman , 2008 ) , and classification on corrupted data ( Barbu et al. , 2019 ; Hendrycks & Dietterich , 2019 ) . Our representation shows consistent performance gains with increasing number of augmentations . Our method does not require hand-selection of data augmentation strategies , and achieves better performance against state-of-the-art MoCo baseline ( He et al. , 2020 ; Chen et al. , 2020b ) , and demonstrates superior transferability , generalizability and robustness across tasks and categories . Specifically , we obtain around 10 % improvement over MoCo in classification when applied on the iNaturalist ( Van Horn et al. , 2018 ) dataset . 2 BACKGROUND : CONTRASTIVE LEARNING FRAMEWORK . Contrastive learning learns a representation by maximizing similarity and dissimilarity over data samples which are organized into similar and dissimilar pairs , respectively . It can be formulated as a dictionary look-up problem ( He et al. , 2020 ) , where a given reference image I is augmented into two views , query and key , and the query token q should match its designated key k+ over a set of sampled negative keys { k− } from other images . In general , the framework can be summarized as the following components : ( i ) A data augmentation module T constituting n atomic augmentation operators , such as random cropping , color jittering , and random flipping . We denote a pre-defined atomic augmentation as random variable Xi . Each time the atomic augmentation is executed by sampling a specific augmentation parameter from the random variable , i.e. , xi∼Xi . One sampled data augmentation module transforms image I into a random view Ĩ , denoted as Ĩ = T [ x1 , x2 , . . . , xn ] ( I ) . Positive pair ( q , k+ ) is generated by applying two randomly sampled data augmentation on the same reference image . ( ii ) An encoder network f which extracts the feature v of an image I by mapping it into a d-dimensional space Rd . ( iii ) A projection head h which further maps extracted representations into a hyper-spherical ( normalized ) embedding space . This space is subsequently used for a specific pretext task , i.e. , contrastive loss objective for a batch of positive/negative pairs . A common choice is InfoNCE ( Oord et al. , 2018 ) : Lq = − log exp ( q·k+/τ ) exp ( q·k+/τ ) + ∑ k− exp ( q·k−/τ ) , ( 1 ) where τ is a temperature hyper-parameter scaling the distribution of distances . As a key towards learning a good feature representation ( Chen et al. , 2020a ) , a strong augmentation policy prevents the network from exploiting naı̈ve cues to match the given instances . However , in- ductive bias is introduced through the selection of augmentations , along with their hyper-parameters defining the strength of each augmentation , manifested in Equation 1 that any views by the stochastic augmentation module T of the same instance are mapped onto the same point in the embedding space . The property negatively affects the learnt representations : 1 ) Generalizability and transferability are harmed if they are applied to the tasks where the discarded information is essential , e.g. , color plays an important role in fine-grained classification of birds ; 2 ) Adding an extra augmentation is complicated as the new operator may be helpful to certain classes while harmful to others , e.g. , a rotated flower could be very similar to the original one , whereas it does not hold for a rotated car ; 3 ) The hyper-parameters which control the strength of augmentations need to be carefully tuned for each augmentation to strike a delicate balance between leaving a short-cut open and completely invalidate one source of information . 3 LOOC : LEAVE-ONE-OUT CONTRASTIVE LEARNING . We propose Leave-one-out Contrastive Learning ( LooC ) , a framework for multi-augmentation contrastive learning . Our framework can selectively prevent information loss incurred by an augmentation . Rather than projecting every view into a single embedding space which is invariant to all augmentations , in our LooC method the representations of input images are projected into several embedding spaces , each of which is not invariant to a certain augmentation while remaining invariant to others , as illustrated in Figure 2 . In this way , each embedding sub-space is specialized to a single augmentation , and the shared layers will contain both augmentation-varying and invariant information . We learn a shared representation jointly with the several embedding spaces ; we transfer either the shared representation alone , or the concatenation of all spaces , to downstream tasks . View Generation . Given a reference image and n atomic augmentations , we first augment the reference image with two sets of independently sampled augmentation parameters into the query view Iq and the first key view Ik0 , i.e. , I { q , k0 } = T [ x { q , k0 } 1 , x { q , k0 } 2 , . . . , x { q , k0 } n ] ( I ) . Additionally , we generate n views from the reference image as extra key views , denoted as Iki , ∀i ∈ { 1 , . . . , n } . For the ith additional key view , the parameter of ith atomic augmentation is copied from it of the query view , i.e. , xkii ≡ x q i , ∀i ∈ { 1 , . . . , n } ; whereas the parameter of other atomic augmentations are still independently sampled , i.e. , xkij ∼ Xj , ∀j 6= i . For instance , assume that we have a set of two atomic augmentations { random_rotation , color_jitter } , Iq and Ik1 are always augmented by the same rotation angle but different color jittering ; Iq and Ik2 are always augmented by the same color jittering but different rotation angle ; Iq and Ik0 are augmented independently , as illustrated in the left part of Figure 2 . Contrastive Embedding Space . The augmented views are encoded by a neural network encoder f ( · ) into feature vectors vq , vk0 , · · · , vkn in a joint embedding space V ∈ Rd . Subsequently , they are projected into n+1 normalized embedding spaces Z0 , Z1 , · · · , Zn ∈ Rd ′ by projection heads h : V 7→ Z , among which Z0 is invariant to all types of augmentations , whereas Zi ( ∀i ∈ { 1 , 2 , · · · , n } ) is dependent on the ith type of augmentation but invariant to other types of augmentations . In other words , in Z0 all features v should be mapped to a single point , whereas in Zi ( ∀i ∈ { 1 , 2 , · · · , n } ) only vq and vki should be mapped to a single point while vkj ∀j 6= i should be mapped to n−1 separate points , as only Iq and Iki share the same ith augmentation . We perform contrastive learning in all normalized embedding spaces based on Equation 1 , as shown in the right part of Figure 2 . For each query zq , denote zk + as the keys from the same instance , and zk − as the keys from other instances . Since all views should be mapped to the single point in Z0 , the positive pair for the query zq0 is z k+0 0 , and the negative pairs are embeddings of other instances in this embedding space { zk − 0 0 } ; for embedding spaces Z1 , · · · , Zn , the positive pair for the query zqi is z k+i i , while the negative pairs are embeddings of other instances in this embedding space { zk − i i } , and { z k+j i | ∀j ∈ { 0 , 1 , · · · , n } and j 6= i } , which are the embeddings of the same instance with different ith augmentation . The network then learns to be sensitive to one type of augmentation while insensitive to other types of augmentations in one embedding space . Denote E { + , − } i , j = exp ( z q i · z k { + , − } j i /τ ) . The overall training objective for q is : Lq = − 1 n+ 1 ( log E+0,0 E+0,0 + ∑ k− E − 0,0 + n∑ i=1 log E+i , i∑n j=0 E + i , j + ∑ k− E − i , i ) , ( 2 ) The network must preserve information w.r.t . all augmentations in the general embedding space V in order to optimize the combined learning objectives of all normalized embedding spaces . Learnt representations . The representation for downstream tasks can be from the general embedding space V ( Figure 2 , blue region ) , or the concatenation of all embedding sub-spaces ( Figure 2 , grey region ) . LooC method returns V ; we term the implementation using the concatenation of all embedding sub-spaces as LooC++ . | The authors observe that, while effective, contrastive learning unavoidably introduces some bias depending on the choice of augmentations the algorithm is made invariant to, and that deteriorates performance depending on the task. The authors corroborate this hypothesis with experiments with the MoCo baseline and proceed to propose a modification to the usual contrastive learning setup: learning a shared representation and multiple projection heads, each invariant to a different augmentation type. They empirically show the effectiveness of the proposed solution on several tasks, including few-shot learning and data corruption datasets. | SP:ec83ad5b38ab973df53f6cf9c3bad784ef6a5170 |
Distributional Reinforcement Learning for Risk-Sensitive Policies | 1 INTRODUCTION . In standard reinforcement learning ( RL ) ( Sutton & Barto , 2018 ) , one seeks to learn a policy that maximizes an objective , usually the expected total discounted rewards or the long-term average rewards . In stochastic domains , especially when the level of uncertainty involved is high , maximizing the expectation may not be the most desirable since the solution may have high variance and occasionally performs badly . In such scenarios one may choose to learn a policy that is more risk-averse and avoids bad outcomes , even though the long-term average performance is slightly lower than the optimal . In this work we consider optimizing the conditional value-at-risk ( CVaR ) ( Rockafellar & Uryasev , 2000 ) , a popular risk measure , widely used in financial applications , and is increasingly being used in RL . The CVaR objective focuses on the lower tail of the return and is therefore more sensitive to rare but catastrophic outcomes . Various settings and RL approaches have been proposed to solve this problem ( Petrik & Subramanian , 2012 ; Chow & Ghavamzadeh , 2014 ; Chow & Pavone , 2014 ; Tamar et al. , 2015 ; Tamar et al. , 2017 ; Huang & Haskell , 2020 ) . Most of the proposed approaches , however , involve more complicated algorithms than standard RL algorithms such as Q-learning ( Watkins & Dayan , 1992 ) and its deep variants , e.g . DQN ( Mnih et al. , 2015 ) . Recently , the distributional approach to RL ( Bellemare et al. , 2017 ; Morimura et al. , 2010 ) has received increased attention due to its ability to learn better policies than the standard approaches in many challenging tasks ( Dabney et al. , 2018a ; b ; Yang et al. , 2019 ) . Instead of learning a value function that provides the expected return of each state-action pair , the distributional approach learns the entire return distribution of each state-action pair . While this is computationally more costly , the approach itself is a simple extension to standard RL and is therefore easy to implement and able to leverage many of the advances in deep RL . Since the entire distribution is available , one naturally considers exploiting this information to optimize for an objective other than the expectation . Dabney et al . ( 2018a ) presented a simple way to do so for a family of risk measures including the CVaR . The theoretical properties of such approach , however , are not clear . In particular , it is not clear whether the algorithm converges to any particular variant of CVaR-optimal policy . We address this issue in this work . Our main contribution is to first show that the proposed algorithm in ( Dabney et al. , 2018a ) overestimates the dynamic , Markovian CVaR but empirically can be as conservative . It has been demon- strated that this variant of CVaR can be overly conservative in many scenarios ( Tamar et al. , 2017 ; Yu et al. , 2017 ) , and one may prefer the static CVaR instead as the objective . Our second contribution is to propose a modified algorithm that can help achieve this . Empirically , we show that the proposed approach learns policies that perform better in terms of the overall CVaR objective on both synthetic and real-world problems . We close the introduction section with some references to related works . We formally present our problem setup as well as our main analytical results in Section 2 . Section 3 describes our proposed algorithm and finally , Section 4 presents our empirical results . 1.1 RELATED WORKS . The literature on distributional RL has been greatly expanded recently ( Morimura et al. , 2010 ; Bellemare et al. , 2017 ; Barth-Maron et al. , 2018 ; Dabney et al. , 2018a ; b ; Yang et al. , 2019 ) . Most of these works focus on the modeling aspects , such as the choice of representations for the value distributions . The approach has been used to enhance exploration in RL ( Mavrin et al. , 2019 ; Zhang & Yao , 2019 ) and in risk-sensitive applications ( Wang et al. , 2019 ; Bernhard et al. , 2019 ) . Solving Markov decision processes ( MDP ) with risk-sensitive objectives have been addressed in many works ( Howard & Matheson , 1972 ; Ruszczynski , 2010 ; Bäuerle & Ott , 2011 ) , including RL approaches ( Borkar , 2001 ; Tamar et al. , 2012 ; L.A. & Ghavamzadeh , 2013 ) . In particular , Chow & Ghavamzadeh ( 2014 ) ; Tamar et al . ( 2015 ) deal with the static CVaR objectives while Petrik & Subramanian ( 2012 ) ; Chow & Pavone ( 2014 ) deal with the dynamic CVaR objectives . Tamar et al . ( 2017 ) proposed a policy-gradient approach that deals with both the static and the dynamic CVaR objectives . Closest to ours is the work by Stanko & Macek ( 2019 ) . Their proposed approach also makes use of distributional RL but it is not clear whether their action selection strategy properly optimizes either the static or the dynamic CVaR . 2 PROBLEM SETUP AND MAIN RESULTS . We consider a discrete-time Markov decision process with state space X and action space A . For simplicity we assume that X and A are finite , although our results and algorithm can be readily extended to more general state-action spaces . We assume that the rewards are bounded and drawn from a countable set R ⊂ R. Given states xt , xt+1 ∈ X for any t ∈ { 0 , 1 , . . . } , the probability of receiving reward rt ∈ R and transitioning to xt+1 after executing at ∈ A in xt is given by p ( rt , xt+1|xt , at ) . Without loss of generality we assume a fixed initial state x0 , unless stated otherwise . Given a policy π : H → P ( A ) , where H is the set of all histories so far ht : = ( x0 , a0 , r0 , x1 , a1 , r1 , . . . , xt ) ∈ H , and P ( A ) the space of distributions over A , its expected total discounted reward over time is given by V π : = Eπp [ ∞∑ t=0 γtrt ] where γ ∈ ( 0 , 1 ) is a discount factor . The superscript π in the expectation indicates that the actions at are drawn from π ( ht ) . The subscript p indicates that the rewards and state transitions are induced by p. In standard RL , we aim to find a policy that maximizes V π . It is well-known that there exists a deterministic stationary policy π : X → A whose decisions depend only on the current state , that gives optimal V π , and therefore one typically works in the space of stationary deterministic policies . Key to a dynamic-programming solution to the above problem is the use of a value function Qπ ( x , a ) : = Eπp [ ∑∞ t=0 γ trt|x0 = x , a0 = a ] , which satisfies the Bellman equation ∀x , a , Qπ ( x , a ) = ∑ r , x′ p ( r , x′|x , a ) [ r + γQπ ( x′ , π ( x′ ) ) ] . ( 1 ) The optimal valueQ∗ ( x , a ) : = Qπ ∗ ( x , a ) for any optimal policy π∗ satisfies the Bellman optimality equation ∀x , a , Q∗ ( x , a ) = ∑ r , x′ p ( r , x′|x , a ) [ r + γmax a′ Q∗ ( x′ , a′ ) ] . ( 2 ) Furthermore , for any Q-function Q ∈ Q : = { q : X × A → R | q ( x , a ) < ∞ , ∀x , a } , one can show that the operator T π defined by T πQ ( x , a ) : = ∑ r , x′ p ( r , x ′|x , a ) [ r + γQ ( x′ , π ( x′ ) ) ] is a γ-contraction in the sup-norm ‖Q‖∞ : = maxx , a |Q ( x , a ) | with fixed-point satisfying ( 1 ) . One can therefore start with an arbitraryQ-function and repeatedly apply T π , or its stochastic approximation , to learn Qπ . An analogous operator T can also be shown to be a γ-contraction with fixed-point satisfying ( 2 ) . 2.1 STATIC AND DYNAMIC CVAR . The expected return V π is risk-neutral in the sense that it does not take into account the inherent variability of the return . In many application scenarios , one may prefer a policy that is more riskaverse , with better sensitivity to bad outcomes . In this work , we focus on the conditional value-atrisk ( CVaR ) , which is a popular risk measure that satisfies the properties of being coherent ( Artzner et al. , 1999 ) . The α-level CVaR for a random real-valued variable Z , for α ∈ ( 0 , 1 ] , is given by ( Rockafellar & Uryasev , 2000 ) Cα ( Z ) : = max s∈R s− 1 α E [ ( s− Z ) + ] where ( x ) + = max { x , 0 } . Note that we are concerned with Z that represents returns ( the higher , the better ) , so this particular version of CVaR focuses on the lower tail of the distribution . In particular , the function s 7→ s − 1αE [ ( s − Z ) + ] is concave in s and the maximum is always attained at the α-level quantile , defined as qα ( Z ) : = inf { s : Pr ( Z ≤ s ) ≥ α } . For α = 1 , Cα reduces to the standard expectation . In the case Z is absolutely continuous , we have the intuitive Cα ( Z ) = E [ Z|Z < qα ] . Our target random variable is the total discounted return Zπ : = ∑∞ t=0 γ trt of a policy π , and our objective is to find a policy that maximizes Cα ( Zπ ) , where the optimal CVaR is given by max π max s s− 1 α Eπp [ ( s− Zπ ) + ] . ( 3 ) In the context where Z is accumulated over multiple time steps , the objective ( 3 ) corresponds to maximizing the so-called static CVaR . This objective is time-inconsistent in the sense that the optimal policy may be history-dependent and therefore non-Markov . This is , however , perfectly expected since the optimal behavior in the later time steps may depend on how much rewards have been accumulated thus far – more risky actions can be taken if one has already collected sufficiently large total rewards , and vice versa . From the point of view of dynamic programming , an alternative , time-consistent or Markovian version of CVaR may be more convenient . A class of such risk measures was proposed by Ruszczynski ( 2010 ) , and we shall refer to this version of CVaR as the dynamic CVaR , defined recursively as1 ∀π , x , a , Dπα,0 ( x , a ) : = Cα [ rt|xt = x , at = a ] , ∀π , x , a , T > 0 , Dπα , T ( x , a ) : = Cα [ rt + γDπα , T−1 ( xt+1 , π ( xt+1 ) ) |xt = x , at = a ] , and ∀π , x , a , Dπα ( x , a ) : = lim T→∞ Dπα , T ( x , a ) . It can be shown ( Ruszczynski , 2010 ) that there exists a stationary deterministic optimal policy π∗ , maximizing Dπα ( x , a ) for all x , a , whose dynamic CVaR is given by D ∗ α : = D π∗ α . In particular , the operator TD , α defined by TD , αD ( x , a ) : = Cα [ rt + γmax a′ D ( xt+1 , a ′ ) |xt = x , at = a ] ( 4 ) for D ∈ Q is a γ-contraction in sup-norm with fixed-point satisfying ∀x , a , D∗α ( x , a ) = Cα [ rt + γmax a′ D∗α ( xt+1 , a ′ ) |xt = x , at = a ] . ( 5 ) 1We use a slightly different definition from that in ( Ruszczynski , 2010 ) , but conceptually they are essentially the same . The dynamic CVaR , however , can be overly conservative in many cases . We illustrate this with some empirical results in Section 4 . In such cases it may be favorable to use the static CVaR . Bäuerle & Ott ( 2011 ) suggest an iterative process that can be used to solve for the optimal static CVaR policy . The approach is based on ( 3 ) : 1 . For a fixed s , one can solve for the optimal policy with respect to maxπ E [ − ( s− Zπ ) + ] . 2 . For a fixed π , the optimal s is given by the α-level quantile of Zπ . 3 . Repeat until convergence . Step one above can be done by solving an augmented MDP with states x̃ = ( x , s ) ∈ X × R , where s is a moving threshold keeping track of the accumulated rewards so far . In particular , this MDP has no rewards and state transition is given by p ( 0 , ( x′ , s−rγ ) | ( x , s ) , a ) : = p ( r , x ′|x , a ) . Solving this augmented MDP directly using RL , however , can result in poor sample efficiency since each example ( x , a , r , x′ ) may need to be experienced many times under different threshold s. In this work , we propose an alternative solution using the approach of distributional RL . | This paper consider the problem of learning a risk-averse policy base on CVaR measure using distributional reinforcement learning. The main contributions of this paper are twofold. First, they show that the standard distributional RL algorithm overestimate the dynamic, Markovian CVaR, which might be too conservative. Secondly, they propose a modified algorithm that can learn a proper CVaR-optimized policy based on static, non-Markovian CVaR. | SP:661b75d2b9213295a69ab5f524c6983c67e783ec |
Distributional Reinforcement Learning for Risk-Sensitive Policies | 1 INTRODUCTION . In standard reinforcement learning ( RL ) ( Sutton & Barto , 2018 ) , one seeks to learn a policy that maximizes an objective , usually the expected total discounted rewards or the long-term average rewards . In stochastic domains , especially when the level of uncertainty involved is high , maximizing the expectation may not be the most desirable since the solution may have high variance and occasionally performs badly . In such scenarios one may choose to learn a policy that is more risk-averse and avoids bad outcomes , even though the long-term average performance is slightly lower than the optimal . In this work we consider optimizing the conditional value-at-risk ( CVaR ) ( Rockafellar & Uryasev , 2000 ) , a popular risk measure , widely used in financial applications , and is increasingly being used in RL . The CVaR objective focuses on the lower tail of the return and is therefore more sensitive to rare but catastrophic outcomes . Various settings and RL approaches have been proposed to solve this problem ( Petrik & Subramanian , 2012 ; Chow & Ghavamzadeh , 2014 ; Chow & Pavone , 2014 ; Tamar et al. , 2015 ; Tamar et al. , 2017 ; Huang & Haskell , 2020 ) . Most of the proposed approaches , however , involve more complicated algorithms than standard RL algorithms such as Q-learning ( Watkins & Dayan , 1992 ) and its deep variants , e.g . DQN ( Mnih et al. , 2015 ) . Recently , the distributional approach to RL ( Bellemare et al. , 2017 ; Morimura et al. , 2010 ) has received increased attention due to its ability to learn better policies than the standard approaches in many challenging tasks ( Dabney et al. , 2018a ; b ; Yang et al. , 2019 ) . Instead of learning a value function that provides the expected return of each state-action pair , the distributional approach learns the entire return distribution of each state-action pair . While this is computationally more costly , the approach itself is a simple extension to standard RL and is therefore easy to implement and able to leverage many of the advances in deep RL . Since the entire distribution is available , one naturally considers exploiting this information to optimize for an objective other than the expectation . Dabney et al . ( 2018a ) presented a simple way to do so for a family of risk measures including the CVaR . The theoretical properties of such approach , however , are not clear . In particular , it is not clear whether the algorithm converges to any particular variant of CVaR-optimal policy . We address this issue in this work . Our main contribution is to first show that the proposed algorithm in ( Dabney et al. , 2018a ) overestimates the dynamic , Markovian CVaR but empirically can be as conservative . It has been demon- strated that this variant of CVaR can be overly conservative in many scenarios ( Tamar et al. , 2017 ; Yu et al. , 2017 ) , and one may prefer the static CVaR instead as the objective . Our second contribution is to propose a modified algorithm that can help achieve this . Empirically , we show that the proposed approach learns policies that perform better in terms of the overall CVaR objective on both synthetic and real-world problems . We close the introduction section with some references to related works . We formally present our problem setup as well as our main analytical results in Section 2 . Section 3 describes our proposed algorithm and finally , Section 4 presents our empirical results . 1.1 RELATED WORKS . The literature on distributional RL has been greatly expanded recently ( Morimura et al. , 2010 ; Bellemare et al. , 2017 ; Barth-Maron et al. , 2018 ; Dabney et al. , 2018a ; b ; Yang et al. , 2019 ) . Most of these works focus on the modeling aspects , such as the choice of representations for the value distributions . The approach has been used to enhance exploration in RL ( Mavrin et al. , 2019 ; Zhang & Yao , 2019 ) and in risk-sensitive applications ( Wang et al. , 2019 ; Bernhard et al. , 2019 ) . Solving Markov decision processes ( MDP ) with risk-sensitive objectives have been addressed in many works ( Howard & Matheson , 1972 ; Ruszczynski , 2010 ; Bäuerle & Ott , 2011 ) , including RL approaches ( Borkar , 2001 ; Tamar et al. , 2012 ; L.A. & Ghavamzadeh , 2013 ) . In particular , Chow & Ghavamzadeh ( 2014 ) ; Tamar et al . ( 2015 ) deal with the static CVaR objectives while Petrik & Subramanian ( 2012 ) ; Chow & Pavone ( 2014 ) deal with the dynamic CVaR objectives . Tamar et al . ( 2017 ) proposed a policy-gradient approach that deals with both the static and the dynamic CVaR objectives . Closest to ours is the work by Stanko & Macek ( 2019 ) . Their proposed approach also makes use of distributional RL but it is not clear whether their action selection strategy properly optimizes either the static or the dynamic CVaR . 2 PROBLEM SETUP AND MAIN RESULTS . We consider a discrete-time Markov decision process with state space X and action space A . For simplicity we assume that X and A are finite , although our results and algorithm can be readily extended to more general state-action spaces . We assume that the rewards are bounded and drawn from a countable set R ⊂ R. Given states xt , xt+1 ∈ X for any t ∈ { 0 , 1 , . . . } , the probability of receiving reward rt ∈ R and transitioning to xt+1 after executing at ∈ A in xt is given by p ( rt , xt+1|xt , at ) . Without loss of generality we assume a fixed initial state x0 , unless stated otherwise . Given a policy π : H → P ( A ) , where H is the set of all histories so far ht : = ( x0 , a0 , r0 , x1 , a1 , r1 , . . . , xt ) ∈ H , and P ( A ) the space of distributions over A , its expected total discounted reward over time is given by V π : = Eπp [ ∞∑ t=0 γtrt ] where γ ∈ ( 0 , 1 ) is a discount factor . The superscript π in the expectation indicates that the actions at are drawn from π ( ht ) . The subscript p indicates that the rewards and state transitions are induced by p. In standard RL , we aim to find a policy that maximizes V π . It is well-known that there exists a deterministic stationary policy π : X → A whose decisions depend only on the current state , that gives optimal V π , and therefore one typically works in the space of stationary deterministic policies . Key to a dynamic-programming solution to the above problem is the use of a value function Qπ ( x , a ) : = Eπp [ ∑∞ t=0 γ trt|x0 = x , a0 = a ] , which satisfies the Bellman equation ∀x , a , Qπ ( x , a ) = ∑ r , x′ p ( r , x′|x , a ) [ r + γQπ ( x′ , π ( x′ ) ) ] . ( 1 ) The optimal valueQ∗ ( x , a ) : = Qπ ∗ ( x , a ) for any optimal policy π∗ satisfies the Bellman optimality equation ∀x , a , Q∗ ( x , a ) = ∑ r , x′ p ( r , x′|x , a ) [ r + γmax a′ Q∗ ( x′ , a′ ) ] . ( 2 ) Furthermore , for any Q-function Q ∈ Q : = { q : X × A → R | q ( x , a ) < ∞ , ∀x , a } , one can show that the operator T π defined by T πQ ( x , a ) : = ∑ r , x′ p ( r , x ′|x , a ) [ r + γQ ( x′ , π ( x′ ) ) ] is a γ-contraction in the sup-norm ‖Q‖∞ : = maxx , a |Q ( x , a ) | with fixed-point satisfying ( 1 ) . One can therefore start with an arbitraryQ-function and repeatedly apply T π , or its stochastic approximation , to learn Qπ . An analogous operator T can also be shown to be a γ-contraction with fixed-point satisfying ( 2 ) . 2.1 STATIC AND DYNAMIC CVAR . The expected return V π is risk-neutral in the sense that it does not take into account the inherent variability of the return . In many application scenarios , one may prefer a policy that is more riskaverse , with better sensitivity to bad outcomes . In this work , we focus on the conditional value-atrisk ( CVaR ) , which is a popular risk measure that satisfies the properties of being coherent ( Artzner et al. , 1999 ) . The α-level CVaR for a random real-valued variable Z , for α ∈ ( 0 , 1 ] , is given by ( Rockafellar & Uryasev , 2000 ) Cα ( Z ) : = max s∈R s− 1 α E [ ( s− Z ) + ] where ( x ) + = max { x , 0 } . Note that we are concerned with Z that represents returns ( the higher , the better ) , so this particular version of CVaR focuses on the lower tail of the distribution . In particular , the function s 7→ s − 1αE [ ( s − Z ) + ] is concave in s and the maximum is always attained at the α-level quantile , defined as qα ( Z ) : = inf { s : Pr ( Z ≤ s ) ≥ α } . For α = 1 , Cα reduces to the standard expectation . In the case Z is absolutely continuous , we have the intuitive Cα ( Z ) = E [ Z|Z < qα ] . Our target random variable is the total discounted return Zπ : = ∑∞ t=0 γ trt of a policy π , and our objective is to find a policy that maximizes Cα ( Zπ ) , where the optimal CVaR is given by max π max s s− 1 α Eπp [ ( s− Zπ ) + ] . ( 3 ) In the context where Z is accumulated over multiple time steps , the objective ( 3 ) corresponds to maximizing the so-called static CVaR . This objective is time-inconsistent in the sense that the optimal policy may be history-dependent and therefore non-Markov . This is , however , perfectly expected since the optimal behavior in the later time steps may depend on how much rewards have been accumulated thus far – more risky actions can be taken if one has already collected sufficiently large total rewards , and vice versa . From the point of view of dynamic programming , an alternative , time-consistent or Markovian version of CVaR may be more convenient . A class of such risk measures was proposed by Ruszczynski ( 2010 ) , and we shall refer to this version of CVaR as the dynamic CVaR , defined recursively as1 ∀π , x , a , Dπα,0 ( x , a ) : = Cα [ rt|xt = x , at = a ] , ∀π , x , a , T > 0 , Dπα , T ( x , a ) : = Cα [ rt + γDπα , T−1 ( xt+1 , π ( xt+1 ) ) |xt = x , at = a ] , and ∀π , x , a , Dπα ( x , a ) : = lim T→∞ Dπα , T ( x , a ) . It can be shown ( Ruszczynski , 2010 ) that there exists a stationary deterministic optimal policy π∗ , maximizing Dπα ( x , a ) for all x , a , whose dynamic CVaR is given by D ∗ α : = D π∗ α . In particular , the operator TD , α defined by TD , αD ( x , a ) : = Cα [ rt + γmax a′ D ( xt+1 , a ′ ) |xt = x , at = a ] ( 4 ) for D ∈ Q is a γ-contraction in sup-norm with fixed-point satisfying ∀x , a , D∗α ( x , a ) = Cα [ rt + γmax a′ D∗α ( xt+1 , a ′ ) |xt = x , at = a ] . ( 5 ) 1We use a slightly different definition from that in ( Ruszczynski , 2010 ) , but conceptually they are essentially the same . The dynamic CVaR , however , can be overly conservative in many cases . We illustrate this with some empirical results in Section 4 . In such cases it may be favorable to use the static CVaR . Bäuerle & Ott ( 2011 ) suggest an iterative process that can be used to solve for the optimal static CVaR policy . The approach is based on ( 3 ) : 1 . For a fixed s , one can solve for the optimal policy with respect to maxπ E [ − ( s− Zπ ) + ] . 2 . For a fixed π , the optimal s is given by the α-level quantile of Zπ . 3 . Repeat until convergence . Step one above can be done by solving an augmented MDP with states x̃ = ( x , s ) ∈ X × R , where s is a moving threshold keeping track of the accumulated rewards so far . In particular , this MDP has no rewards and state transition is given by p ( 0 , ( x′ , s−rγ ) | ( x , s ) , a ) : = p ( r , x ′|x , a ) . Solving this augmented MDP directly using RL , however , can result in poor sample efficiency since each example ( x , a , r , x′ ) may need to be experienced many times under different threshold s. In this work , we propose an alternative solution using the approach of distributional RL . | This paper is about risk-sensitive RL based on the CVaR risk measure. This paper is mainly based on the work presented in Dabney et al. in 2018 which is about distributional RL for a family of risk measures which includes CVaR as well. The main motivation for this work was the point that the method presented in Dabney et al. 2018 overestimates the dynamics and could be excessively conservative in certain scenarios. Authors have proposed to use static CVaR instead and have developed algorithms to do that. | SP:661b75d2b9213295a69ab5f524c6983c67e783ec |
Quickly Finding a Benign Region via Heavy Ball Momentum in Non-Convex Optimization | 1 INTRODUCTION . Poylak ’ s Heavy Ball method ( Polyak ( 1964 ) ) has been very popular in modern non-convex optimization and deep learning , and the stochastic version ( a.k.a . SGD with momentum ) has become the de facto algorithm for training neural nets . Many empirical results show that the algorithm is better than the standard SGD in deep learning ( see e.g . Hoffer et al . ( 2017 ) ; Loshchilov & Hutter ( 2019 ) ; Wilson et al . ( 2017 ) ; Sutskever et al . ( 2013 ) ) , but there are almost no corresponding mathematical results that show a benefit relative to the more standard ( stochastic ) gradient descent . Despite its popularity , we still have a very poor justification theoretically for its success in non-convex optimization tasks , and Kidambi et al . ( 2018 ) were able to establish a negative result , showing that Heavy Ball momentum can not outperform other methods in certain problems . Furthermore , even for convex problems it appears that strongly convex , smooth , and twice differentiable functions ( e.g . strongly convex quadratic functions ) are one of just a handful examples for which a provable speedup over standard gradient descent can be shown ( e.g ( Lessard et al. , 2016 ; Goh , 2017 ; Ghadimi et al. , 2015 ; Gitman et al. , 2019 ; Loizou & Richtárik , 2017 ; 2018 ; Gadat et al. , 2016 ; Scieur & Pedregosa , 2020 ; Sun et al. , 2019 ; Yang et al. , 2018a ; Can et al. , 2019 ; Liu et al. , 2020 ; Sebbouh et al. , 2020 ; Flammarion & Bach , 2015 ) ) . There are even some negative results when the function is strongly convex but not twice differentiable . That is , Heavy Ball momentum might lead to a divergence in convex optimization ( see e.g . ( Ghadimi et al. , 2015 ; Lessard et al. , 2016 ) ) . The algorithm ’ s apparent success in modern non-convex optimization has remained quite mysterious . In this paper , we identify two non-convex optimization problems for which the use of Heavy Ball method has a provable advantage over vanilla gradient descent . The first problem is phase retrieval . It has some useful applications in physical science such as microscopy or astronomy ( see e.g . ( Candés et al. , 2013 ) , ( Fannjiang & Strohmer , 2020 ) , and ( Shechtman et al. , 2015 ) ) . The objective is minw∈Rd f ( w ) : = 1 4n ∑n i=1 ( ( x > i w ) 2 − yi ) 2 , ( 1 ) where xi ∈ Rd is the design vector and yi = ( x > i w∗ ) 2 is the label of sample i . The goal is to recover w∗ up to the sign that is not recoverable ( Candés et al. , 2013 ) . Under the Gaussian design setting ( i.e . xi ∼ N ( 0 , Id ) ) , it is known that the empirical risk minimizer ( 1 ) is w∗ or −w∗ , as long as the number of samples n exceeds the order of the dimension d ( see e.g . Bandeira et al . ( 2014 ) ) . Therefore , solving ( 1 ) allows one to recover the desired vectorw∗ ∈ Rd up to the sign . Unfortunately the problem is non-convex which limits our ability to efficiently find a minimizer . For this problem , there are many specialized algorithms that aim at achieving a better computational complexity and/or sample complexity to recoverw∗ modulo the unrecoverable sign ( e.g . ( Cai et al. , 2016 ; Candés & Li , 2014 ; Candés et al. , 2015 ; 2013 ; Chen & Candés , 2017 ; Duchi & Ruan , 2018 ; Ma et al. , 2017 ; 2018 ; Netrapalli et al. , 2013 ; Qu et al. , 2017 ; Tu et al. , 2016 ; Wang et al. , 2017a ; b ; Yang et al. , 2018b ; Zhang et al. , 2017a ; b ; Zheng & Lafferty , 2015 ) ) . Our goal is not about providing a state-of-the-art algorithm for solving ( 1 ) . Instead , we treat this problem as a starting point of understanding Heavy Ball momentum in non-convex optimization and hope for getting some insights on why Heavy Ball ( Algorithm 1 and 2 ) can be faster than the vanilla gradient descent in non-convex optimization and deep learning in practice . If we want to understand why Heavy Ball momentum leads to acceleration for a complicated non-convex problem , we should first understand it in the simplest possible setting . We provably show that Heavy Ball recovers the desired vector w∗ , up to a sign flip , given a random isotropic initialization . Our analysis divides the execution of the algorithm into two stages . In the first stage , the ratio of the projection of the current iterate wt on w∗ to the projection of wt on the perpendicular component keeps growing , which makes the iterate eventually enter a benign region which is strongly convex , smooth , twice differentiable , and contains a global optimal point . Therefore , in the second stage , Heavy Ball has a linear convergence rate . Furthermore , up to a value , a larger value of the momentum parameter has a faster linear convergence than the vanilla gradient descent in the second stage . Yet , most importantly , we show that Heavy Ball momentum also has an important role in reducing the number of iterations in the first stage , which is when the iterate might be in a non-convex region . We show that the higher the momentum parameter β , the fewer the iterations spent in the first stage ( see also Figure 1 ) . Namely , momentum helps the iterate to enter a benign region faster . Consequently , using a non-zero momentum parameter leads to a speedup over the standard gradient descent ( β = 0 ) . Therefore , our result shows a provable acceleration relative to the vanilla gradient descent , for computing a global optimal solution in non-convex optimization . The second of these is solving a class of cubic-regularized problems , minw f ( w ) : = 1 2w > Aw + b > w + ρ3‖w‖ 3 , ( 2 ) where the matrixA ∈ Rd×d is symmetric and possibly indefinite . Problem ( 2 ) is a sub-routine of the Nesterov-Polyak cubic-regularized method ( Nesterov & Polyak ( 2006 ) ) , which aims to minimize a non-convex objective F ( · ) by iteratively solving wt+1 = arg minw∈Rd { ∇F ( wt ) > ( w − wt ) + 12 ( w − wt ) > ∇2F ( w ) ( w − wt ) + ρ3‖w − wt‖ 3 } , ( 3 ) With some additional post-processing , the iterate wt converges to an ( g , h ) second order stationary point , defined as { w : ‖∇f ( w ) ‖ ≤ g and ∇2f ( w ) − hId } for any small g , h > 0 . However , their algorithm needs to compute a matrix inverse to solve ( 2 ) , which is computationally expensive when the dimension is high . A very recent result due to Carmon & Duchi ( 2019 ) shows that vanilla gradient descent approximately finds the global minimum of ( 2 ) under mild conditions , which only needs a Hessian-vector product and can be computed in the same computational complexity as computing gradients ( Pearlmutter , 1994 ) , and hence is computationally cheaper than the matrix inversion of the Hessian . Our result shows that , similar to the case of phase retrieval , the use of Heavy Ball momentum helps the iterate to enter a benign region of ( 3 ) that contains a global optimal solution faster , compared to vanilla gradient descent . For certain non-convex problems , e.g . dictionary learning ( Sun et al. , 2015 ) , matrix completion ( Chi et al. , 2019 ) , robust PCA ( Ge et al. , 2017 ) , and learning a neural network ( Ge et al . ( 2019 ) ; Bai & Lee ( 2020 ) ) , where it suffices to find a second-order stationary point , our result consequently might have application . To summarize , our theoretical results of the two non-convex problems provably show the benefit of using Heavy Ball momentum . Compared to the vanilla gradient descent , the use of momentum helps to accelerate the optimization process . The key to showing the acceleration in getting into benign regions of these problems is a family of simple dynamics due to Heavy Ball momentum . We will argue that the simple dynamics are not restricted to the two main problems considered in this paper . Specifically , the dynamics also naturally arise when solving the problem of top eigenvector computation ( Golub & Loan , 1996 ) and the problem of saddle points escape ( e.g . ( Jin et al. , 2017 ; Wang et al. , 2020 ) ) , which might imply the broad applicability of the dynamics for analyzing Heavy Ball in non-convex optimization . Algorithm 1 : Heavy Ball method ( Polyak , 1964 ) ( Equivalent version 1 ) 1 : Required : step size η and momentum parameter β ∈ [ 0 , 1 ] . 2 : Init : w0 = w−1 ∈ Rd 3 : for t = 0 to T do 4 : Update iterate wt+1 = wt− η∇f ( wt ) +β ( wt−wt−1 ) . 5 : end for Algorithm 2 : Heavy Ball method ( Polyak , 1964 ) ( Equivalent version 2 ) 1 : Required : step size η and momentum parameter β ∈ [ 0 , 1 ] . 2 : Init : w0 ∈ Rd and m−1 = 0 . 3 : for t = 0 to T do 4 : Update momentum mt : = βmt−1 +∇f ( wt ) . 5 : Update iterate wt+1 : = wt − ηmt . 6 : end for 2 MORE RELATED WORKS . Heavy Ball ( HB ) : HB has two exactly equivalent presentations in the literature ( see Algorithm 1 and 2 ) . Given the same initialization , both algorithms generate the same sequence of { wt } . In Algorithm 2 , we note that the momentum mt can be written as mt = ∑t s=0 β t−s∇f ( ws ) and can be viewed as a weighted sum of gradients . As we described in the opening paragraph , there is little theory of showing a provable acceleration of the method in non-convex optimization . The only exception that we are aware of is ( Wang et al. , 2020 ) . They show that HB momentum can help to escape saddle points faster and find a second-order stationary point faster for smooth non-convex optimization . They also observed that stochastic HB solves ( 1 ) and that using higher values of the momentum parameter β leads to faster convergence . However , while their work focused on the stochastic setting , their main result required some assumptions on the statistical properties of the sequence of observed gradients ; it is not clear whether these would hold in general . In appendix A , we provide a more detailed literature review of HB . To summarize , current results in the literature imply that we are still very far from understanding deterministic HB in non-convex optimization , let alone understanding the success of stochastic HB in deep learning . Hence , this work aims to make progress on a simple question : can we give a precise advantage argument for the acceleration effect of Heavy Ball in the deterministic setting ? Phase retrieval : The optimization landscape of problem ( 1 ) and its variants has been studied by ( Davis et al. , 2018 ; Soltanolkotabi , 2014 ; Sun et al. , 2016 ; White et al. , 2016 ) , which shows that as long as the number of samples is sufficiently large , it has no spurious local optima . We note that the problem can also be viewed as a special case of matrix sensing ( e.g . Li et al . ( 2018 ) ; Gunasekar et al . ( 2017 ) ; Li & Lin ( 2020 ) ; Li et al . ( 2019 ) ; Gidel et al . ( 2019 ) ; You et al . ( 2020 ) ) ; in Appendix A , we provide a brief summary of matrix sensing . For solving phase retrieval , Mannellia et al . ( 2020 ) study gradient flow , while Chen et al . ( 2018 ) show that the standard gradient descent with a random initialization like Gaussian initialization solves ( 1 ) and recovers w∗ up to the sign . Tan & Vershynin ( 2019 ) show that online gradient descent with a simple random initialization can converge to a global optimal point in an online setting where fresh samples are required for each step . In this paper , we show that Heavy Ball converges even faster than the vanilla gradient descent . Zhou et al . ( 2016 ) propose leveraging Nesterov ’ s momentum to solve phase retrieval . However , their approach requires delicate and computationally expensive initialization like spectral initialization so that the initial point is already within the neighborhood of a minimizer . Similarly , Xiong et al . ( 2018 ; 2020 ) show local convergence of Nesterov ’ s momentem and Heavy Ball momentum for phase retrieval , but require the initial point to be in the neighborhood of an optimal point . Jin et al . ( 2018 ) propose an algorithm that uses Nesterov ’ s momentum together as a subroutine with perturbation for finding a second-order stationary point , which could be applied for solving phase retrieval . Compared to ( Zhou et al. , 2016 ; Jin et al. , 2018 ; Xiong et al. , 2018 ; 2020 ) , we consider directly applying gradient descent with Heavy Ball momentum ( i.e . HB method ) to the objective function with simple random initialization , e.g . Gaussian initialization , which is what people do in practice and is what we want to understand . The goals of the works are different . Finally , we note that there are some efforts in integrating the technique of generative models and phase retrieval , which could help the task of image recovery ( e.g . Hand et al . ( 2018 ) ) . Phase retrieval might also be a good entry point of understanding some observations in optimization and neural net training ( e.g . Mannellia et al . ( 2020 ) ) . f ( w1 ) ≥ 0.5 } , i.e . if the relative change of objective value compared to the initial value has been increased to 50 % . Algorithm 3 and Algorithm 4 in Appendix H describe the procedures . All the lines are obtained by initializing the iterate at the same pointw0 ∼ N ( 0 , Id/ ( 10000d ) ) and using the same step size η = 5× 10−4 . Here we set w∗ = e1 and sample xi ∼ N ( 0 , Id ) with dimension d = 10 and number of samples n = 200 . We see that the higher the momentum parameter β , the faster the algorithm enters the linear convergence regime . ( a ) : Objective value ( 1 ) vs. iteration t. We see that the higher the momentum parameter β , the faster the algorithm enters the linear convergence regime . ( b ) : The size of projection of wt on w∗ over iterations ( i.e . |w‖t | vs. t ) , which is non-decreasing throughout the iterations until reaching an optimal point ( here , ‖w∗‖ = 1 ) . ( c ) : The size of the perpendicular component over iterations ( i.e . ‖w⊥t ‖ vs. t ) , which is increasing in the beginning and then it is decreasing towards zero after some point . We see that the slope of the curve corresponding to a larger momentum parameter β is steeper than that of a smaller one , which confirms Lemma 1 and Lemma 3 . | The authors analysed the dynamics heavy ball momentum in non-convex optimization settings (namely the phase retrieval and the cubic-regularized problems). The results show that the algorithm leads to a faster convergence rate in comparison with gradient descent without inertial contributions. Although there are results in the context of convex optimization, the result in non-convex setting is novel and very interesting. | SP:47a15159ddb23477577e4378f534181cb8537ee5 |
Quickly Finding a Benign Region via Heavy Ball Momentum in Non-Convex Optimization | 1 INTRODUCTION . Poylak ’ s Heavy Ball method ( Polyak ( 1964 ) ) has been very popular in modern non-convex optimization and deep learning , and the stochastic version ( a.k.a . SGD with momentum ) has become the de facto algorithm for training neural nets . Many empirical results show that the algorithm is better than the standard SGD in deep learning ( see e.g . Hoffer et al . ( 2017 ) ; Loshchilov & Hutter ( 2019 ) ; Wilson et al . ( 2017 ) ; Sutskever et al . ( 2013 ) ) , but there are almost no corresponding mathematical results that show a benefit relative to the more standard ( stochastic ) gradient descent . Despite its popularity , we still have a very poor justification theoretically for its success in non-convex optimization tasks , and Kidambi et al . ( 2018 ) were able to establish a negative result , showing that Heavy Ball momentum can not outperform other methods in certain problems . Furthermore , even for convex problems it appears that strongly convex , smooth , and twice differentiable functions ( e.g . strongly convex quadratic functions ) are one of just a handful examples for which a provable speedup over standard gradient descent can be shown ( e.g ( Lessard et al. , 2016 ; Goh , 2017 ; Ghadimi et al. , 2015 ; Gitman et al. , 2019 ; Loizou & Richtárik , 2017 ; 2018 ; Gadat et al. , 2016 ; Scieur & Pedregosa , 2020 ; Sun et al. , 2019 ; Yang et al. , 2018a ; Can et al. , 2019 ; Liu et al. , 2020 ; Sebbouh et al. , 2020 ; Flammarion & Bach , 2015 ) ) . There are even some negative results when the function is strongly convex but not twice differentiable . That is , Heavy Ball momentum might lead to a divergence in convex optimization ( see e.g . ( Ghadimi et al. , 2015 ; Lessard et al. , 2016 ) ) . The algorithm ’ s apparent success in modern non-convex optimization has remained quite mysterious . In this paper , we identify two non-convex optimization problems for which the use of Heavy Ball method has a provable advantage over vanilla gradient descent . The first problem is phase retrieval . It has some useful applications in physical science such as microscopy or astronomy ( see e.g . ( Candés et al. , 2013 ) , ( Fannjiang & Strohmer , 2020 ) , and ( Shechtman et al. , 2015 ) ) . The objective is minw∈Rd f ( w ) : = 1 4n ∑n i=1 ( ( x > i w ) 2 − yi ) 2 , ( 1 ) where xi ∈ Rd is the design vector and yi = ( x > i w∗ ) 2 is the label of sample i . The goal is to recover w∗ up to the sign that is not recoverable ( Candés et al. , 2013 ) . Under the Gaussian design setting ( i.e . xi ∼ N ( 0 , Id ) ) , it is known that the empirical risk minimizer ( 1 ) is w∗ or −w∗ , as long as the number of samples n exceeds the order of the dimension d ( see e.g . Bandeira et al . ( 2014 ) ) . Therefore , solving ( 1 ) allows one to recover the desired vectorw∗ ∈ Rd up to the sign . Unfortunately the problem is non-convex which limits our ability to efficiently find a minimizer . For this problem , there are many specialized algorithms that aim at achieving a better computational complexity and/or sample complexity to recoverw∗ modulo the unrecoverable sign ( e.g . ( Cai et al. , 2016 ; Candés & Li , 2014 ; Candés et al. , 2015 ; 2013 ; Chen & Candés , 2017 ; Duchi & Ruan , 2018 ; Ma et al. , 2017 ; 2018 ; Netrapalli et al. , 2013 ; Qu et al. , 2017 ; Tu et al. , 2016 ; Wang et al. , 2017a ; b ; Yang et al. , 2018b ; Zhang et al. , 2017a ; b ; Zheng & Lafferty , 2015 ) ) . Our goal is not about providing a state-of-the-art algorithm for solving ( 1 ) . Instead , we treat this problem as a starting point of understanding Heavy Ball momentum in non-convex optimization and hope for getting some insights on why Heavy Ball ( Algorithm 1 and 2 ) can be faster than the vanilla gradient descent in non-convex optimization and deep learning in practice . If we want to understand why Heavy Ball momentum leads to acceleration for a complicated non-convex problem , we should first understand it in the simplest possible setting . We provably show that Heavy Ball recovers the desired vector w∗ , up to a sign flip , given a random isotropic initialization . Our analysis divides the execution of the algorithm into two stages . In the first stage , the ratio of the projection of the current iterate wt on w∗ to the projection of wt on the perpendicular component keeps growing , which makes the iterate eventually enter a benign region which is strongly convex , smooth , twice differentiable , and contains a global optimal point . Therefore , in the second stage , Heavy Ball has a linear convergence rate . Furthermore , up to a value , a larger value of the momentum parameter has a faster linear convergence than the vanilla gradient descent in the second stage . Yet , most importantly , we show that Heavy Ball momentum also has an important role in reducing the number of iterations in the first stage , which is when the iterate might be in a non-convex region . We show that the higher the momentum parameter β , the fewer the iterations spent in the first stage ( see also Figure 1 ) . Namely , momentum helps the iterate to enter a benign region faster . Consequently , using a non-zero momentum parameter leads to a speedup over the standard gradient descent ( β = 0 ) . Therefore , our result shows a provable acceleration relative to the vanilla gradient descent , for computing a global optimal solution in non-convex optimization . The second of these is solving a class of cubic-regularized problems , minw f ( w ) : = 1 2w > Aw + b > w + ρ3‖w‖ 3 , ( 2 ) where the matrixA ∈ Rd×d is symmetric and possibly indefinite . Problem ( 2 ) is a sub-routine of the Nesterov-Polyak cubic-regularized method ( Nesterov & Polyak ( 2006 ) ) , which aims to minimize a non-convex objective F ( · ) by iteratively solving wt+1 = arg minw∈Rd { ∇F ( wt ) > ( w − wt ) + 12 ( w − wt ) > ∇2F ( w ) ( w − wt ) + ρ3‖w − wt‖ 3 } , ( 3 ) With some additional post-processing , the iterate wt converges to an ( g , h ) second order stationary point , defined as { w : ‖∇f ( w ) ‖ ≤ g and ∇2f ( w ) − hId } for any small g , h > 0 . However , their algorithm needs to compute a matrix inverse to solve ( 2 ) , which is computationally expensive when the dimension is high . A very recent result due to Carmon & Duchi ( 2019 ) shows that vanilla gradient descent approximately finds the global minimum of ( 2 ) under mild conditions , which only needs a Hessian-vector product and can be computed in the same computational complexity as computing gradients ( Pearlmutter , 1994 ) , and hence is computationally cheaper than the matrix inversion of the Hessian . Our result shows that , similar to the case of phase retrieval , the use of Heavy Ball momentum helps the iterate to enter a benign region of ( 3 ) that contains a global optimal solution faster , compared to vanilla gradient descent . For certain non-convex problems , e.g . dictionary learning ( Sun et al. , 2015 ) , matrix completion ( Chi et al. , 2019 ) , robust PCA ( Ge et al. , 2017 ) , and learning a neural network ( Ge et al . ( 2019 ) ; Bai & Lee ( 2020 ) ) , where it suffices to find a second-order stationary point , our result consequently might have application . To summarize , our theoretical results of the two non-convex problems provably show the benefit of using Heavy Ball momentum . Compared to the vanilla gradient descent , the use of momentum helps to accelerate the optimization process . The key to showing the acceleration in getting into benign regions of these problems is a family of simple dynamics due to Heavy Ball momentum . We will argue that the simple dynamics are not restricted to the two main problems considered in this paper . Specifically , the dynamics also naturally arise when solving the problem of top eigenvector computation ( Golub & Loan , 1996 ) and the problem of saddle points escape ( e.g . ( Jin et al. , 2017 ; Wang et al. , 2020 ) ) , which might imply the broad applicability of the dynamics for analyzing Heavy Ball in non-convex optimization . Algorithm 1 : Heavy Ball method ( Polyak , 1964 ) ( Equivalent version 1 ) 1 : Required : step size η and momentum parameter β ∈ [ 0 , 1 ] . 2 : Init : w0 = w−1 ∈ Rd 3 : for t = 0 to T do 4 : Update iterate wt+1 = wt− η∇f ( wt ) +β ( wt−wt−1 ) . 5 : end for Algorithm 2 : Heavy Ball method ( Polyak , 1964 ) ( Equivalent version 2 ) 1 : Required : step size η and momentum parameter β ∈ [ 0 , 1 ] . 2 : Init : w0 ∈ Rd and m−1 = 0 . 3 : for t = 0 to T do 4 : Update momentum mt : = βmt−1 +∇f ( wt ) . 5 : Update iterate wt+1 : = wt − ηmt . 6 : end for 2 MORE RELATED WORKS . Heavy Ball ( HB ) : HB has two exactly equivalent presentations in the literature ( see Algorithm 1 and 2 ) . Given the same initialization , both algorithms generate the same sequence of { wt } . In Algorithm 2 , we note that the momentum mt can be written as mt = ∑t s=0 β t−s∇f ( ws ) and can be viewed as a weighted sum of gradients . As we described in the opening paragraph , there is little theory of showing a provable acceleration of the method in non-convex optimization . The only exception that we are aware of is ( Wang et al. , 2020 ) . They show that HB momentum can help to escape saddle points faster and find a second-order stationary point faster for smooth non-convex optimization . They also observed that stochastic HB solves ( 1 ) and that using higher values of the momentum parameter β leads to faster convergence . However , while their work focused on the stochastic setting , their main result required some assumptions on the statistical properties of the sequence of observed gradients ; it is not clear whether these would hold in general . In appendix A , we provide a more detailed literature review of HB . To summarize , current results in the literature imply that we are still very far from understanding deterministic HB in non-convex optimization , let alone understanding the success of stochastic HB in deep learning . Hence , this work aims to make progress on a simple question : can we give a precise advantage argument for the acceleration effect of Heavy Ball in the deterministic setting ? Phase retrieval : The optimization landscape of problem ( 1 ) and its variants has been studied by ( Davis et al. , 2018 ; Soltanolkotabi , 2014 ; Sun et al. , 2016 ; White et al. , 2016 ) , which shows that as long as the number of samples is sufficiently large , it has no spurious local optima . We note that the problem can also be viewed as a special case of matrix sensing ( e.g . Li et al . ( 2018 ) ; Gunasekar et al . ( 2017 ) ; Li & Lin ( 2020 ) ; Li et al . ( 2019 ) ; Gidel et al . ( 2019 ) ; You et al . ( 2020 ) ) ; in Appendix A , we provide a brief summary of matrix sensing . For solving phase retrieval , Mannellia et al . ( 2020 ) study gradient flow , while Chen et al . ( 2018 ) show that the standard gradient descent with a random initialization like Gaussian initialization solves ( 1 ) and recovers w∗ up to the sign . Tan & Vershynin ( 2019 ) show that online gradient descent with a simple random initialization can converge to a global optimal point in an online setting where fresh samples are required for each step . In this paper , we show that Heavy Ball converges even faster than the vanilla gradient descent . Zhou et al . ( 2016 ) propose leveraging Nesterov ’ s momentum to solve phase retrieval . However , their approach requires delicate and computationally expensive initialization like spectral initialization so that the initial point is already within the neighborhood of a minimizer . Similarly , Xiong et al . ( 2018 ; 2020 ) show local convergence of Nesterov ’ s momentem and Heavy Ball momentum for phase retrieval , but require the initial point to be in the neighborhood of an optimal point . Jin et al . ( 2018 ) propose an algorithm that uses Nesterov ’ s momentum together as a subroutine with perturbation for finding a second-order stationary point , which could be applied for solving phase retrieval . Compared to ( Zhou et al. , 2016 ; Jin et al. , 2018 ; Xiong et al. , 2018 ; 2020 ) , we consider directly applying gradient descent with Heavy Ball momentum ( i.e . HB method ) to the objective function with simple random initialization , e.g . Gaussian initialization , which is what people do in practice and is what we want to understand . The goals of the works are different . Finally , we note that there are some efforts in integrating the technique of generative models and phase retrieval , which could help the task of image recovery ( e.g . Hand et al . ( 2018 ) ) . Phase retrieval might also be a good entry point of understanding some observations in optimization and neural net training ( e.g . Mannellia et al . ( 2020 ) ) . f ( w1 ) ≥ 0.5 } , i.e . if the relative change of objective value compared to the initial value has been increased to 50 % . Algorithm 3 and Algorithm 4 in Appendix H describe the procedures . All the lines are obtained by initializing the iterate at the same pointw0 ∼ N ( 0 , Id/ ( 10000d ) ) and using the same step size η = 5× 10−4 . Here we set w∗ = e1 and sample xi ∼ N ( 0 , Id ) with dimension d = 10 and number of samples n = 200 . We see that the higher the momentum parameter β , the faster the algorithm enters the linear convergence regime . ( a ) : Objective value ( 1 ) vs. iteration t. We see that the higher the momentum parameter β , the faster the algorithm enters the linear convergence regime . ( b ) : The size of projection of wt on w∗ over iterations ( i.e . |w‖t | vs. t ) , which is non-decreasing throughout the iterations until reaching an optimal point ( here , ‖w∗‖ = 1 ) . ( c ) : The size of the perpendicular component over iterations ( i.e . ‖w⊥t ‖ vs. t ) , which is increasing in the beginning and then it is decreasing towards zero after some point . We see that the slope of the curve corresponding to a larger momentum parameter β is steeper than that of a smaller one , which confirms Lemma 1 and Lemma 3 . | This paper analyzes Polyak momentum in the deterministic case for two simple but important non-convex problems: phase retrieval and finding the cubic-regularized newton step. It is shown that in both cases the problems posses a “benign region” in which the objective “looks” a bit convex. In the phase retrieval case, assuming that the data is generated from a normal distribution, it is shown that having a non-zero momentum parameter in fact allows the momentum method to find the benign region faster, after which standard convex analysis can take over to find the optimal point. | SP:47a15159ddb23477577e4378f534181cb8537ee5 |
DeepAveragers: Offline Reinforcement Learning By Solving Derived Non-Parametric MDPs | 1 INTRODUCTION . Research in automated planning and control has produced powerful algorithms to solve for optimal , or near-optimal , decisions given accurate environment models . Examples include the classic valueand policy-iteration algorithms for tabular representations or more sophisticated symbolic variants for graphical model representations ( e.g . Boutilier et al . ( 2000 ) ; Raghavan et al . ( 2012 ) ) . In concept , these planners address many of the traditional challenges in reinforcement learning ( RL ) . They can perform “ zero-shot transfer ” to new goals and changes to the environment model , accurately account for sparse reward or low-probability events , and solve for different optimization objectives ( e.g . robustness ) . Effectively leveraging these planners , however , requires an accurate model grounded in observations and expressed in the planner ’ s representation . On the other hand , model-based reinforcement learning ( MBRL ) aims to learn grounded models to improve RL ’ s data efficiency . Despite developing grounded environment models , the vast majority of current MBRL approaches do not leverage near-optimal planners to help address the above challenges . Rather , the models are used as black-box simulators for experience augmentation and/or Monte-Carlo search . Alternatively , model learning is sometimes treated as purely an auxiliary task to support representation learning . The high-level goal of this paper is to move toward MBRL approaches that can effectively leverage near-optimal planners for improved data efficiency and flexibility in complex environments . However , there are at least two significant challenges . First , there is a mismatch between the deep model representations typically learned in MBRL ( e.g . continuous state mappings ) and the representations assumed by many planners ( e.g . discrete tables or graphical models ) . Second , near-optimal planners are well-known for exploiting model inaccuracies in ways that hurt performance in the real environment , e.g . ( Atkeson , 1998 ) . This second challenge is particularly significant for offline RL , where the training experience for model learning is fixed and limited . We address the first challenge above by focusing on tabular representations , which are perhaps the simplest , but most universal representation for optimal planning . Our main contribution is an offline MBRL approach based on optimally solving a new model called the Deep Averagers with Costs MDP ( DAC-MDP ) . A DAC-MDP is a non-parametric model derived from an experience dataset and a corresponding ( possibly learned ) latent state representation . While the DAC-MDP is defined over the entire continuous latent state space , its full optimal policy can be computed by solving a standard ( finite ) tabular MDP derived from the dataset . This supports optimal planning via any tabular MDP solver , e.g . value iteration . To scale this approach to typical offline RL problems , we develop a simple GPU implementation of value iteration that scales to millions of states . As an additional engineering contribution , this implementation will be made public . To address the second challenge of model inaccuracy due to limited data , DAC-MDPs follow the pessimism in the face of uncertainty principle , which has been shown effective in a number of prior contexts ( e.g . ( Fonteneau et al. , 2013 ) ) . In particular , DAC-MDPs extend Gordon ’ s Averagers framework ( Gordon , 1995 ) with additional costs for exploiting transitions that are under-represented in the data . Our second contribution is to give a theoretical analysis of this model , which provides conditions under which a DAC-MDP solution will perform near optimally in the real environment . Our final contribution is to empirically investigate the DAC-MDP approach using simple latent representations derived from random projections and those learned by Q-iteration algorithms . Among other results , we demonstrate the ability to scale to Atari-scale problems , which is the first demonstration of optimal planning being effectively applied across multiple Atari games . In addition , we provide case studies in 3D first-person navigation that demonstrate the flexibility and adaptability afforded by integrating optimal planning into offline MBRL . These results show the promise of our approach for marrying advances in representation learning with optimal planning . 2 FORMAL PRELIMINARIES . A Markov Decision Process ( MDP ) is a tuple 〈S , A , T , R〉 ( Puterman , 1994 ) , with state set S , action set A , transition function T ( s , a , s′ ) , and reward function R ( s , a ) . A policy π maps states to actions and has Q-function Qπ ( s , a ) giving the expected infinite-horizon β-discounted reward of following π after taking action a in s. The optimal policy π∗ maximizes the Q-function over all policies and state-action pairs . Q∗ corresponds to the optimal Q-function that satisfies π∗ ( s ) = arg maxaQ ∗ ( s , a ) . Q∗ can be computed given the MDP by repeated application of the Bellman Backup Operator B , which for any Q-function Q , returns a new Q-function given by , B [ Q ] ( s , a ) = R ( s , a ) + γEs′∼T ( s , a , · ) [ max a Q ( s′ , a ) ] . ( 1 ) The objective of RL is to find a near-optimal policy without prior knowledge of the MDP . In the online RL setting , this is done by actively exploring actions in the environment . Rather , in the offline RL ( Levine et al. , 2020 ) , which is the focus of this paper , learning is based on a static dataset D = { ( si , ai , ri , s′i ) } , where each tuple gives the reward ri and next state s′i observed after taking action ai in state si . In strict offline RL setting , the final policy selection must be done using only the dataset , without direct access to the environment . This includes all hyperparameter tuning and the choice of when to stop learning . Evaluations of offline RL , however , often blur this distinction , for example , reporting performance of the best policy obtained across various hyperparameter settings as evaluated via new online experiences ( Gulcehre et al. , 2020 ) . Here we consider an evaluation protocol that makes the amount of online access to the environment explicit . In particular , the offline RL algorithm is allowed to use the environment to evaluate Ne policies ( e.g . an average over repeated trials for each policy ) , which , for example , may derive from different hyperparameter choices . The best of the evaluated policies can then be selected . Note that Ne = 1 corresponds to pure offline RL . 3 DEEP AVERAGERS WITH COSTS MDPS ( DAC-MDPS ) . From a practical perspective our approach carries out the following steps as illustrated in Figure 1 . ( 1 ) We start with a static experience dataset , where the states are assumed to come from a continuous latent state space . For example , states encoded via random or learned deep representations . ( 2 ) Next we compile the dataset into a tabular MDP over the “ core states ” of the DAC-MDP ( those in the dataset ) . This compilation uses k-nearest neighbor ( kNN ) queries to define the reward and transition functions ( Equation 2 ) functions of the core states . ( 3 ) Next we use a GPU implementation of value iteration to solve for the tabular MDP ’ s optimal Q-function . ( 4 ) Finally , this tabular Q-function is used to define the Q-function over the entire DAC-MDP ( Equation 3 ) . Previously unseen states at test time are assigned Q-values and in turn a policy action via kNN queries over the core states . Conceptually , our DAC-MDP model is inspired by Gordon ’ s ( 1995 ) early work that showed the convergence of ( offline ) approximate value iteration for a class of function approximators ; averagers , which includes methods such as k nearest neighbor ( kNN ) regression , among others . It was also observed that approximate value iteration using an averager was equivalent to solving an MDP derived from the offline data . That observation , however , was not investigated experimentally and has yet to be integrated with deep representation learning . Here we develop and evaluate such an integration . The quality of an averagers MDP , and model-learning in general , depends on the size and distribution of the dataset . In particular , an optimal planner can exploit inaccuracies in the underrepresented parts of the state-action space , which can lead to poor performance in the real environment . The DACMDPs aim to avoid this by augmenting the derived MDPs with costs/penalties on under-represented transitions . This turns out to be essential to achieving good performance on challenging benchmarks . 3.1 DAC-MDP DEFINITION . A DAC-MDP is defined in terms of an experience dataset D = { ( si , ai , ri , s′i ) } from the true MDP M with continuous latent state space S and finite action space A . The DAC-MDP M̃ = ( S , A , R̃ , T̃ ) shares the same state and action spaces as M , but defines the reward and transition functions in terms of empirical averages over the k nearest neighbors of ( s , a ) in D. The distance metric d ( s , a , s′ , a′ ) gives the distance between pairs ( s , a ) and ( s′ , a′ ) . This metric considers ( s , a ) pairs with different actions to be infinitely distant . Otherwise , the distance between pairs involving the same action is the euclidean distance between their states . In particular , the distance between ( s , a ) and a data tuple ( si , ai , ri , s′i ) is given by d ( s , a , si , ai ) . Also , we let kNN ( s , a ) denote the set of indices of the k nearest neighbors to ( s , a ) in D , noting that the dependence on D and d is left implicit . Given hyperparameters k ( smoothing factor ) and C ( cost factor ) we can now specify the DAC-MDP reward and transition function . R̃ ( s , a ) = 1 k ∑ i∈kNN ( s , a ) ri − C · d ( s , a , si , ai ) , T̃ ( s , a , s′ ) = 1 k ∑ i∈kNN ( s , a ) I [ s′ = s′i ] ( 2 ) The reward for ( s , a ) is simply the average reward of the nearest neighbors with a penalty for each neighbor that grows linearly with the distance to a neighbor . Thus , the farther ( s , a ) is to its nearest neighbor set , the less desirable its immediate reward will be . The transition function is simply the empirical distribution over destination states of the nearest neighbor set . Importantly , even though a DAC-MDP has an infinite continuous state space , it has a special finite structure . Since the transition function T̃ only allows transitions to states appearing as destination states in D. We can view M̃ as having a finite core set of states SD = { s′i | ( si , ai , ri , s′i ) ∈ D } . States in this core do not transition to non-core states and each non-core state immediately transitions to the core for any action . Hence , the value of core states is not influenced by non-core states . Further , once the core values are known , we can compute the values of any non-core state via onestep look ahead using T̃ . Thus , we can optimally solve a DAC-MDP by solving just its finite core . Specifically , let Q̃ be the optimal Q-function of M̃ . We can compute Q̃ for the core states by solving the finite MDP M̃D = ( SD , A , R̃ , T̃ ) . We can then compute Q̃ for any non-core state on demand via the following one-step look-ahead expression.1 This allows us to compute the optimal policy of M̃ , denoted π̃ , using any solver of finite MDPs . Q̃ ( s , a ) = 1 k ∑ i∈kNN ( s , a ) ri + γmax a Q̃ ( s′i , a ) − C · d ( s , a , si , ai ) ( 3 ) | The authors present a nearest neighbour method for learning a model offline from the statistics of the given data set. Representations are provided from other off-policy deep RL methods. Value iteration is used on top of the model to learn the final policy. The algorithm is tested in several Atari games over two data set sizes. | SP:3f293ac26fc0a4ce0f2a9845905d7f7601b172dc |
DeepAveragers: Offline Reinforcement Learning By Solving Derived Non-Parametric MDPs | 1 INTRODUCTION . Research in automated planning and control has produced powerful algorithms to solve for optimal , or near-optimal , decisions given accurate environment models . Examples include the classic valueand policy-iteration algorithms for tabular representations or more sophisticated symbolic variants for graphical model representations ( e.g . Boutilier et al . ( 2000 ) ; Raghavan et al . ( 2012 ) ) . In concept , these planners address many of the traditional challenges in reinforcement learning ( RL ) . They can perform “ zero-shot transfer ” to new goals and changes to the environment model , accurately account for sparse reward or low-probability events , and solve for different optimization objectives ( e.g . robustness ) . Effectively leveraging these planners , however , requires an accurate model grounded in observations and expressed in the planner ’ s representation . On the other hand , model-based reinforcement learning ( MBRL ) aims to learn grounded models to improve RL ’ s data efficiency . Despite developing grounded environment models , the vast majority of current MBRL approaches do not leverage near-optimal planners to help address the above challenges . Rather , the models are used as black-box simulators for experience augmentation and/or Monte-Carlo search . Alternatively , model learning is sometimes treated as purely an auxiliary task to support representation learning . The high-level goal of this paper is to move toward MBRL approaches that can effectively leverage near-optimal planners for improved data efficiency and flexibility in complex environments . However , there are at least two significant challenges . First , there is a mismatch between the deep model representations typically learned in MBRL ( e.g . continuous state mappings ) and the representations assumed by many planners ( e.g . discrete tables or graphical models ) . Second , near-optimal planners are well-known for exploiting model inaccuracies in ways that hurt performance in the real environment , e.g . ( Atkeson , 1998 ) . This second challenge is particularly significant for offline RL , where the training experience for model learning is fixed and limited . We address the first challenge above by focusing on tabular representations , which are perhaps the simplest , but most universal representation for optimal planning . Our main contribution is an offline MBRL approach based on optimally solving a new model called the Deep Averagers with Costs MDP ( DAC-MDP ) . A DAC-MDP is a non-parametric model derived from an experience dataset and a corresponding ( possibly learned ) latent state representation . While the DAC-MDP is defined over the entire continuous latent state space , its full optimal policy can be computed by solving a standard ( finite ) tabular MDP derived from the dataset . This supports optimal planning via any tabular MDP solver , e.g . value iteration . To scale this approach to typical offline RL problems , we develop a simple GPU implementation of value iteration that scales to millions of states . As an additional engineering contribution , this implementation will be made public . To address the second challenge of model inaccuracy due to limited data , DAC-MDPs follow the pessimism in the face of uncertainty principle , which has been shown effective in a number of prior contexts ( e.g . ( Fonteneau et al. , 2013 ) ) . In particular , DAC-MDPs extend Gordon ’ s Averagers framework ( Gordon , 1995 ) with additional costs for exploiting transitions that are under-represented in the data . Our second contribution is to give a theoretical analysis of this model , which provides conditions under which a DAC-MDP solution will perform near optimally in the real environment . Our final contribution is to empirically investigate the DAC-MDP approach using simple latent representations derived from random projections and those learned by Q-iteration algorithms . Among other results , we demonstrate the ability to scale to Atari-scale problems , which is the first demonstration of optimal planning being effectively applied across multiple Atari games . In addition , we provide case studies in 3D first-person navigation that demonstrate the flexibility and adaptability afforded by integrating optimal planning into offline MBRL . These results show the promise of our approach for marrying advances in representation learning with optimal planning . 2 FORMAL PRELIMINARIES . A Markov Decision Process ( MDP ) is a tuple 〈S , A , T , R〉 ( Puterman , 1994 ) , with state set S , action set A , transition function T ( s , a , s′ ) , and reward function R ( s , a ) . A policy π maps states to actions and has Q-function Qπ ( s , a ) giving the expected infinite-horizon β-discounted reward of following π after taking action a in s. The optimal policy π∗ maximizes the Q-function over all policies and state-action pairs . Q∗ corresponds to the optimal Q-function that satisfies π∗ ( s ) = arg maxaQ ∗ ( s , a ) . Q∗ can be computed given the MDP by repeated application of the Bellman Backup Operator B , which for any Q-function Q , returns a new Q-function given by , B [ Q ] ( s , a ) = R ( s , a ) + γEs′∼T ( s , a , · ) [ max a Q ( s′ , a ) ] . ( 1 ) The objective of RL is to find a near-optimal policy without prior knowledge of the MDP . In the online RL setting , this is done by actively exploring actions in the environment . Rather , in the offline RL ( Levine et al. , 2020 ) , which is the focus of this paper , learning is based on a static dataset D = { ( si , ai , ri , s′i ) } , where each tuple gives the reward ri and next state s′i observed after taking action ai in state si . In strict offline RL setting , the final policy selection must be done using only the dataset , without direct access to the environment . This includes all hyperparameter tuning and the choice of when to stop learning . Evaluations of offline RL , however , often blur this distinction , for example , reporting performance of the best policy obtained across various hyperparameter settings as evaluated via new online experiences ( Gulcehre et al. , 2020 ) . Here we consider an evaluation protocol that makes the amount of online access to the environment explicit . In particular , the offline RL algorithm is allowed to use the environment to evaluate Ne policies ( e.g . an average over repeated trials for each policy ) , which , for example , may derive from different hyperparameter choices . The best of the evaluated policies can then be selected . Note that Ne = 1 corresponds to pure offline RL . 3 DEEP AVERAGERS WITH COSTS MDPS ( DAC-MDPS ) . From a practical perspective our approach carries out the following steps as illustrated in Figure 1 . ( 1 ) We start with a static experience dataset , where the states are assumed to come from a continuous latent state space . For example , states encoded via random or learned deep representations . ( 2 ) Next we compile the dataset into a tabular MDP over the “ core states ” of the DAC-MDP ( those in the dataset ) . This compilation uses k-nearest neighbor ( kNN ) queries to define the reward and transition functions ( Equation 2 ) functions of the core states . ( 3 ) Next we use a GPU implementation of value iteration to solve for the tabular MDP ’ s optimal Q-function . ( 4 ) Finally , this tabular Q-function is used to define the Q-function over the entire DAC-MDP ( Equation 3 ) . Previously unseen states at test time are assigned Q-values and in turn a policy action via kNN queries over the core states . Conceptually , our DAC-MDP model is inspired by Gordon ’ s ( 1995 ) early work that showed the convergence of ( offline ) approximate value iteration for a class of function approximators ; averagers , which includes methods such as k nearest neighbor ( kNN ) regression , among others . It was also observed that approximate value iteration using an averager was equivalent to solving an MDP derived from the offline data . That observation , however , was not investigated experimentally and has yet to be integrated with deep representation learning . Here we develop and evaluate such an integration . The quality of an averagers MDP , and model-learning in general , depends on the size and distribution of the dataset . In particular , an optimal planner can exploit inaccuracies in the underrepresented parts of the state-action space , which can lead to poor performance in the real environment . The DACMDPs aim to avoid this by augmenting the derived MDPs with costs/penalties on under-represented transitions . This turns out to be essential to achieving good performance on challenging benchmarks . 3.1 DAC-MDP DEFINITION . A DAC-MDP is defined in terms of an experience dataset D = { ( si , ai , ri , s′i ) } from the true MDP M with continuous latent state space S and finite action space A . The DAC-MDP M̃ = ( S , A , R̃ , T̃ ) shares the same state and action spaces as M , but defines the reward and transition functions in terms of empirical averages over the k nearest neighbors of ( s , a ) in D. The distance metric d ( s , a , s′ , a′ ) gives the distance between pairs ( s , a ) and ( s′ , a′ ) . This metric considers ( s , a ) pairs with different actions to be infinitely distant . Otherwise , the distance between pairs involving the same action is the euclidean distance between their states . In particular , the distance between ( s , a ) and a data tuple ( si , ai , ri , s′i ) is given by d ( s , a , si , ai ) . Also , we let kNN ( s , a ) denote the set of indices of the k nearest neighbors to ( s , a ) in D , noting that the dependence on D and d is left implicit . Given hyperparameters k ( smoothing factor ) and C ( cost factor ) we can now specify the DAC-MDP reward and transition function . R̃ ( s , a ) = 1 k ∑ i∈kNN ( s , a ) ri − C · d ( s , a , si , ai ) , T̃ ( s , a , s′ ) = 1 k ∑ i∈kNN ( s , a ) I [ s′ = s′i ] ( 2 ) The reward for ( s , a ) is simply the average reward of the nearest neighbors with a penalty for each neighbor that grows linearly with the distance to a neighbor . Thus , the farther ( s , a ) is to its nearest neighbor set , the less desirable its immediate reward will be . The transition function is simply the empirical distribution over destination states of the nearest neighbor set . Importantly , even though a DAC-MDP has an infinite continuous state space , it has a special finite structure . Since the transition function T̃ only allows transitions to states appearing as destination states in D. We can view M̃ as having a finite core set of states SD = { s′i | ( si , ai , ri , s′i ) ∈ D } . States in this core do not transition to non-core states and each non-core state immediately transitions to the core for any action . Hence , the value of core states is not influenced by non-core states . Further , once the core values are known , we can compute the values of any non-core state via onestep look ahead using T̃ . Thus , we can optimally solve a DAC-MDP by solving just its finite core . Specifically , let Q̃ be the optimal Q-function of M̃ . We can compute Q̃ for the core states by solving the finite MDP M̃D = ( SD , A , R̃ , T̃ ) . We can then compute Q̃ for any non-core state on demand via the following one-step look-ahead expression.1 This allows us to compute the optimal policy of M̃ , denoted π̃ , using any solver of finite MDPs . Q̃ ( s , a ) = 1 k ∑ i∈kNN ( s , a ) ri + γmax a Q̃ ( s′i , a ) − C · d ( s , a , si , ai ) ( 3 ) | The authors propose to learn a non-parametric MDP model from batch data, which can be solved efficiently using discrete value iteration (by solving for the “core” states which are all the end-states in observed transitions) and which provides a Q-value defined over the full continuous space through a kNN lookup. There is an interesting penalty term when the estimate relies on far-away support data. The value of the optimal policy in the approximated MDP can be bounded, under some smoothness assumptions, in the original MDP. | SP:3f293ac26fc0a4ce0f2a9845905d7f7601b172dc |
Beyond Prioritized Replay: Sampling States in Model-Based RL via Simulated Priorities | 1 INTRODUCTION . Using hypothetical experience simulated from an environment model can significantly improve sample efficiency of RL agents ( Ha & Schmidhuber , 2018 ; Holland et al. , 2018 ; Pan et al. , 2018 ; Janner et al. , 2019 ; van Hasselt et al. , 2019 ) . Dyna ( Sutton , 1991 ) is a classical MBRL architecture where the agent uses real experience to updates its policy as well as its reward and dynamics models . In-between taking actions , the agent can get hypothetical experience from the model to further improve the policy . An important question for effective Dyna-style planning is search-control : from what states should the agent simulate hypothetical transitions ? On each planning step in Dyna , the agent has to select a state and action from which to query the model for the next state and reward . This question , in fact , already arises in what is arguably the simplest variant of Dyna : Experience Replay ( ER ) ( Lin , 1992 ) . In ER , visited transitions are stored in a buffer and at each time step , a mini-batch of experiences is sampled to update the value function . ER can be seen as an instance of Dyna , using a ( limited ) non-parametric model given by the buffer ( see van Seijen & Sutton ( 2015 ) for a deeper discussion ) . Performance can be significantly improved by sampling proportionally to priorities based on errors , as in prioritized ER ( Schaul et al. , 2016 ; de Bruin et al. , 2018 ) , as well as specialized sampling for the off-policy setting ( Schlegel et al. , 2019 ) . Search-control strategies in Dyna similarly often rely on using priorities , though they can be more flexible in leveraging the model rather than being limited to only retrieving visited experiences . For example , a model enables the agent to sweep backwards by generating predecessors , as in prioritized sweeping ( Moore & Atkeson , 1993 ; Sutton et al. , 2008 ; Pan et al. , 2018 ; Corneil et al. , 2018 ) . Other methods have tried alternatives to error-based prioritization , such as searching for states with high reward ( Goyal et al. , 2019 ) , high value ( Pan et al. , 2019 ) or states that are difficult to learn ( Pan et al. , 2020 ) . Another strategy is to directly generate hypothetical experiences from trajectory optimization algorithms ( Gu et al. , 2016 ) . These methods are all supported by nice intuition , but as yet lack solid theoretical reasons for why they can improve sample efficiency . In this work , we provide new insights about how to choose the sampling distribution over states from which we generate hypothetical experience . In particular , we theoretically motivate why errorbased prioritization is effective , and provide a mechanism to generate states according to more accurate error estimates . We first prove that l2 regression with error-based prioritized sampling is equivalent to minimizing a cubic objective with uniform sampling in an ideal setting . We then show that minimizing the cubic power objective has a faster convergence rate during early learning stage , providing theoretical motivation for error-based prioritization . The theoretical understanding illuminates two issues of prioritized ER : insufficient sample space coverage and outdated priorities . To overcome the limitations , we propose a search-control strategy in Dyna that leverages a model to simulate errors and to find states with high expected error . Finally , we demonstrate the efficacy of our method on various benchmark domains and an autonomous driving application . 2 PROBLEM FORMULATION . We formalize the problem as a Markov Decision Process ( MDP ) , a tuple ( S , A , P , R , γ ) including state space S , action space A , probability transition kernel P , reward function R , and discount rate γ ∈ [ 0 , 1 ] . At each environment time step t , an RL agent observes a state st ∈ S , and takes an action at ∈ A . The environment transitions to the next state st+1 ∼ P ( ·|st , at ) , and emits a scalar reward signal rt+1 = R ( st , at , st+1 ) . A policy is a mapping π : S ×A → [ 0 , 1 ] that determines the probability of choosing an action at a given state . Algorithm 1 HC-Dyna : Generic framework Input : hill climbing crit . h : S 7→ R , batch-size b Initialize empty search-control queue Bsc ; empty ER buffer Ber ; initialize policy and model P for t = 1 , 2 , . . . do Add ( st , at , st+1 , rt+1 ) to Ber while within some budget time steps do s← s+ αa∇sh ( s ) //hill climbing Add s into Bsc for n times do B ← ∅ for b/2 times do Sample s ∼ Bsc , on-policy action a Sample s′ , r ∼ P ( s , a ) B ← ( s , a , s′ , r ) Sample b/2 experiences from Ber , add to B Update policy on the mixed mini-batch B The agent ’ s objective is to find an optimal policy . A popular algorithm is Qlearning ( Watkins & Dayan , 1992 ) , where parameterized action-values Qθ are updated using θ = θ + αδt∇θQθ ( st , at ) for stepsize α > 0 with TD-error δt def = rt+1 + γmaxa′∈AQθ ( st+1 , a ′ ) − Qθ ( st , at ) . The policy is defined by acting greedily w.r.t . these action-values . ER is critical when using neural networks to estimate Qθ , as used in DQN ( Mnih et al. , 2015 ) , both to stabilize and speed up learning . MBRL has the potential to provide even further sample efficiency improvements . We build on the Dyna formalism ( Sutton , 1991 ) for MBRL , and more specifically the recently proposed HC-Dyna ( Pan et al. , 2019 ) as shown in Algorithm 1 . HC-Dyna provides a particular approach to search-control—the mechanism of generating states or state-action pairs from which to query the model to get next states and rewards ( i.e . hypothetical experiences ) . It is characterized the fact that it generates states by hill climbing on some criterion function h ( · ) . The term Hill Climbing ( HC ) is used for generality as the vanilla gradient ascent procedure is modified to resolve certain challenges ( Pan et al. , 2019 ) . Two particular choices have been proposed for h ( · ) : the value function v ( s ) from Pan et al . ( 2019 ) and the gradient magnitude ||∇sv ( s ) || from Pan et al . ( 2020 ) . The former is used as measure of the utility of visiting a state and the latter is considered as a measure of value approximation difficulty . The hypothetical experience is obtained by first selecting a state s , then typically selecting the action a according to the current policy , and then querying the model to get next state s′ and reward r. These hypothetical transitions are treated just like real transitions . For this reason , HC-Dyna combines both real experience and hypothetical experience into mini-batch updates . These n updates , performed before taking the next action , are called planning updates , as they improve the action-value estimates— and so the policy—using a model . However , it should be noted that there are several limitations to the two previous works . First , the HC method proposed by Pan et al . ( 2019 ) is mostly supported by intuitions , without any theoretical justification to use the stochastic gradient ascent trajectories for search-control . Second , the HC on gradient norm and Hessian norm of the learned value function Pan et al . ( 2020 ) is supported by some suggestive theoretical evidence , but it suffers from great computation cost and zero gradient due to the high order differentiation ( i.e. , ∇s||∇sv ( s ) || ) as suggested by the authors . This paper will introduce our novel HC search-control method motivated by overcoming the limitations of the prioritized ER method , which has stronger theoretical support than the work by Pan et al . ( 2019 ) and improved computational cost comparing with the existed work by Pan et al . ( 2020 ) . 3 A DEEPER LOOK AT ERROR-BASED PRIORITIZED SAMPLING . In this section , we provide theoretical motivation for error-based prioritized sampling . We show that prioritized sampling can be reformulated as optimizing a cubic power objective with uniform sampling . We prove that optimizing the cubic objective provides a faster convergence rate during early learning . Based on these results , we highlight that prioritized ER has two limitations 1 ) outdated priorities and 2 ) insufficient coverage of the sample space . This motivates our method in the next section to address the two limitations . 3.1 PRIORITIZED SAMPLING AS A CUBIC OBJECTIVE . In the l2 regression , we minimize the mean squared error minθ 12n ∑n i=1 ( fθ ( xi ) − yi ) 2 , for training set T = { ( xi , yi ) } ni=1 and function approximator fθ , such as a neural network . In error-based prioritized sampling , we define the priority of a sample ( x , y ) ∈ T as |fθ ( x ) − y| ; the probability of drawing a sample ( x , y ) ∈ T is typically q ( x , y ; θ ) ∝ |fθ ( x ) − y| . We employ the following form to compute the probabilities : q ( x , y ; θ ) def = |fθ ( x ) − y|∑n i=1 |fθ ( xi ) − yi| ( 1 ) We can show an equivalence between the gradients of the squared objective with this prioritization and the cubic power objective 13n ∑n i=1 |fθ ( xi ) − yi|3 . See Appendix A.3 for the proof . Theorem 1 . For a constant c determined by θ , T , we have E ( x , y ) ∼uniform ( T ) [ ∇θ ( 1/3 ) |fθ ( x ) − y|3 ] = cE ( x , y ) ∼q ( x , y ; θ ) [ ∇θ ( 1/2 ) ( fθ ( x ) − y ) 2 ] This simple theorem provides an intuitive reason for why prioritized sampling can help improve sample efficiency : the gradient direction of cubic function is sharper than that of the square function when the error is relatively large ( Figure 1 ) . Theorem 2 further characterizes the difference between the convergence rates by optimizing the mean square error and the cubic power objective , providing a solid motivation for using error-based prioritized sampling . Theorem 2 ( Fast early learning ) . Consider the following two objectives : ` 2 ( x , y ) def = 12 ( x− y ) 2 , and ` 3 ( x , y ) def = 13 |x− y| 3 . Denote δt def = |xt − y| , and δ̃t def = |x̃t − y| . Define the functional gradient flow updates on these two objectives : dxt dt = −η d { 12 ( xt − y ) 2 } dxt , dx̃t dt = −η d { 13 |x̃t − y| 3 } dx̃t . ( 2 ) Given error threshold ≥ 0 , define the hitting time t def = mint { t : δt ≤ } and t̃ def = mint { t : δ̃t ≤ } . For any initial function value x0 s.t . δ0 > 1 , ∃ 0 ∈ ( 0 , 1 ) such that ∀ > 0 , t ≥ t̃ .1 Proof . Please see Appendix A.4 . Given the same and the same initial value of x , first we derive t = 1 η · ln { δ0 } , t̃ = 1 η · ( 1 − 1 δ0 ) . Then we analyze the condition on to see when t ≥ t̃ , i.e . minimizing the square error is slower than minimizing the cubic error . The above theorem says that when the initial error is relatively large , it is faster to get to a certain low error point with the cubic objective . We can test this in simulation , with the following minimization problems : minx≥0 x2 and minx≥0 x3 . We use the hitting time formulae t = 1η · ln { δ0 } , t̃ = 1 η · ( 1 − 1 δ0 ) derived in the proof , to compute the hitting time ratio t t̃ under different initial values x0 and final error value . In Figure 1 ( c ) ( d ) , we can see that it usually takes a significantly shorter time for the cubic loss to reach a certain xt with various x0 values . 1Finding the exact value of 0 would require a definition of ordering on complex plane , which leads to 0 = − 1W ( log 1/a−1/a−πi ) and W ( · ) is a Wright Omega function , then we have t̃ ≤ t . Our theorem statement is sufficient for the purpose of characterizing convergence rate . Implications of the above theory . The equivalence from Theorem 1 inspires us to identify two limitations of the current prioritized ER method : 1 ) The equivalence requires the priorities of all samples to get updated after the training parameters get updated at each time step . 2 ) The equivalence requires the prioritized sampling distribution to be calculated on the whole training set ; in an online RL setting , at the current time step t , we only have visited samples . These visited samples provide a biased training set w.r.t . current policy which likely does not reasonably cover the state space . We will present our approach to overcome the limitations in Section 4 . In the next section , we will empirically verify our theoretical findings . | This paper investigates the search-control problem in Dyna-style reinforcement learning algorithms. They first provide a theoretical justification behind the error-based prioritization and propose a new sampling method based on gradient ascent of which optimization results are equivalent to samples drawn from the priority distribution. The suggested prioritization method is examined in various domains, namely, GridWorld, AcroBot, CartPole, MazeGridWorld, and roundabout-v0, and it shows a better sample efficiency in most domains. | SP:528ad3f6625f1cf86ac5219fba6ee1a457b65240 |
Beyond Prioritized Replay: Sampling States in Model-Based RL via Simulated Priorities | 1 INTRODUCTION . Using hypothetical experience simulated from an environment model can significantly improve sample efficiency of RL agents ( Ha & Schmidhuber , 2018 ; Holland et al. , 2018 ; Pan et al. , 2018 ; Janner et al. , 2019 ; van Hasselt et al. , 2019 ) . Dyna ( Sutton , 1991 ) is a classical MBRL architecture where the agent uses real experience to updates its policy as well as its reward and dynamics models . In-between taking actions , the agent can get hypothetical experience from the model to further improve the policy . An important question for effective Dyna-style planning is search-control : from what states should the agent simulate hypothetical transitions ? On each planning step in Dyna , the agent has to select a state and action from which to query the model for the next state and reward . This question , in fact , already arises in what is arguably the simplest variant of Dyna : Experience Replay ( ER ) ( Lin , 1992 ) . In ER , visited transitions are stored in a buffer and at each time step , a mini-batch of experiences is sampled to update the value function . ER can be seen as an instance of Dyna , using a ( limited ) non-parametric model given by the buffer ( see van Seijen & Sutton ( 2015 ) for a deeper discussion ) . Performance can be significantly improved by sampling proportionally to priorities based on errors , as in prioritized ER ( Schaul et al. , 2016 ; de Bruin et al. , 2018 ) , as well as specialized sampling for the off-policy setting ( Schlegel et al. , 2019 ) . Search-control strategies in Dyna similarly often rely on using priorities , though they can be more flexible in leveraging the model rather than being limited to only retrieving visited experiences . For example , a model enables the agent to sweep backwards by generating predecessors , as in prioritized sweeping ( Moore & Atkeson , 1993 ; Sutton et al. , 2008 ; Pan et al. , 2018 ; Corneil et al. , 2018 ) . Other methods have tried alternatives to error-based prioritization , such as searching for states with high reward ( Goyal et al. , 2019 ) , high value ( Pan et al. , 2019 ) or states that are difficult to learn ( Pan et al. , 2020 ) . Another strategy is to directly generate hypothetical experiences from trajectory optimization algorithms ( Gu et al. , 2016 ) . These methods are all supported by nice intuition , but as yet lack solid theoretical reasons for why they can improve sample efficiency . In this work , we provide new insights about how to choose the sampling distribution over states from which we generate hypothetical experience . In particular , we theoretically motivate why errorbased prioritization is effective , and provide a mechanism to generate states according to more accurate error estimates . We first prove that l2 regression with error-based prioritized sampling is equivalent to minimizing a cubic objective with uniform sampling in an ideal setting . We then show that minimizing the cubic power objective has a faster convergence rate during early learning stage , providing theoretical motivation for error-based prioritization . The theoretical understanding illuminates two issues of prioritized ER : insufficient sample space coverage and outdated priorities . To overcome the limitations , we propose a search-control strategy in Dyna that leverages a model to simulate errors and to find states with high expected error . Finally , we demonstrate the efficacy of our method on various benchmark domains and an autonomous driving application . 2 PROBLEM FORMULATION . We formalize the problem as a Markov Decision Process ( MDP ) , a tuple ( S , A , P , R , γ ) including state space S , action space A , probability transition kernel P , reward function R , and discount rate γ ∈ [ 0 , 1 ] . At each environment time step t , an RL agent observes a state st ∈ S , and takes an action at ∈ A . The environment transitions to the next state st+1 ∼ P ( ·|st , at ) , and emits a scalar reward signal rt+1 = R ( st , at , st+1 ) . A policy is a mapping π : S ×A → [ 0 , 1 ] that determines the probability of choosing an action at a given state . Algorithm 1 HC-Dyna : Generic framework Input : hill climbing crit . h : S 7→ R , batch-size b Initialize empty search-control queue Bsc ; empty ER buffer Ber ; initialize policy and model P for t = 1 , 2 , . . . do Add ( st , at , st+1 , rt+1 ) to Ber while within some budget time steps do s← s+ αa∇sh ( s ) //hill climbing Add s into Bsc for n times do B ← ∅ for b/2 times do Sample s ∼ Bsc , on-policy action a Sample s′ , r ∼ P ( s , a ) B ← ( s , a , s′ , r ) Sample b/2 experiences from Ber , add to B Update policy on the mixed mini-batch B The agent ’ s objective is to find an optimal policy . A popular algorithm is Qlearning ( Watkins & Dayan , 1992 ) , where parameterized action-values Qθ are updated using θ = θ + αδt∇θQθ ( st , at ) for stepsize α > 0 with TD-error δt def = rt+1 + γmaxa′∈AQθ ( st+1 , a ′ ) − Qθ ( st , at ) . The policy is defined by acting greedily w.r.t . these action-values . ER is critical when using neural networks to estimate Qθ , as used in DQN ( Mnih et al. , 2015 ) , both to stabilize and speed up learning . MBRL has the potential to provide even further sample efficiency improvements . We build on the Dyna formalism ( Sutton , 1991 ) for MBRL , and more specifically the recently proposed HC-Dyna ( Pan et al. , 2019 ) as shown in Algorithm 1 . HC-Dyna provides a particular approach to search-control—the mechanism of generating states or state-action pairs from which to query the model to get next states and rewards ( i.e . hypothetical experiences ) . It is characterized the fact that it generates states by hill climbing on some criterion function h ( · ) . The term Hill Climbing ( HC ) is used for generality as the vanilla gradient ascent procedure is modified to resolve certain challenges ( Pan et al. , 2019 ) . Two particular choices have been proposed for h ( · ) : the value function v ( s ) from Pan et al . ( 2019 ) and the gradient magnitude ||∇sv ( s ) || from Pan et al . ( 2020 ) . The former is used as measure of the utility of visiting a state and the latter is considered as a measure of value approximation difficulty . The hypothetical experience is obtained by first selecting a state s , then typically selecting the action a according to the current policy , and then querying the model to get next state s′ and reward r. These hypothetical transitions are treated just like real transitions . For this reason , HC-Dyna combines both real experience and hypothetical experience into mini-batch updates . These n updates , performed before taking the next action , are called planning updates , as they improve the action-value estimates— and so the policy—using a model . However , it should be noted that there are several limitations to the two previous works . First , the HC method proposed by Pan et al . ( 2019 ) is mostly supported by intuitions , without any theoretical justification to use the stochastic gradient ascent trajectories for search-control . Second , the HC on gradient norm and Hessian norm of the learned value function Pan et al . ( 2020 ) is supported by some suggestive theoretical evidence , but it suffers from great computation cost and zero gradient due to the high order differentiation ( i.e. , ∇s||∇sv ( s ) || ) as suggested by the authors . This paper will introduce our novel HC search-control method motivated by overcoming the limitations of the prioritized ER method , which has stronger theoretical support than the work by Pan et al . ( 2019 ) and improved computational cost comparing with the existed work by Pan et al . ( 2020 ) . 3 A DEEPER LOOK AT ERROR-BASED PRIORITIZED SAMPLING . In this section , we provide theoretical motivation for error-based prioritized sampling . We show that prioritized sampling can be reformulated as optimizing a cubic power objective with uniform sampling . We prove that optimizing the cubic objective provides a faster convergence rate during early learning . Based on these results , we highlight that prioritized ER has two limitations 1 ) outdated priorities and 2 ) insufficient coverage of the sample space . This motivates our method in the next section to address the two limitations . 3.1 PRIORITIZED SAMPLING AS A CUBIC OBJECTIVE . In the l2 regression , we minimize the mean squared error minθ 12n ∑n i=1 ( fθ ( xi ) − yi ) 2 , for training set T = { ( xi , yi ) } ni=1 and function approximator fθ , such as a neural network . In error-based prioritized sampling , we define the priority of a sample ( x , y ) ∈ T as |fθ ( x ) − y| ; the probability of drawing a sample ( x , y ) ∈ T is typically q ( x , y ; θ ) ∝ |fθ ( x ) − y| . We employ the following form to compute the probabilities : q ( x , y ; θ ) def = |fθ ( x ) − y|∑n i=1 |fθ ( xi ) − yi| ( 1 ) We can show an equivalence between the gradients of the squared objective with this prioritization and the cubic power objective 13n ∑n i=1 |fθ ( xi ) − yi|3 . See Appendix A.3 for the proof . Theorem 1 . For a constant c determined by θ , T , we have E ( x , y ) ∼uniform ( T ) [ ∇θ ( 1/3 ) |fθ ( x ) − y|3 ] = cE ( x , y ) ∼q ( x , y ; θ ) [ ∇θ ( 1/2 ) ( fθ ( x ) − y ) 2 ] This simple theorem provides an intuitive reason for why prioritized sampling can help improve sample efficiency : the gradient direction of cubic function is sharper than that of the square function when the error is relatively large ( Figure 1 ) . Theorem 2 further characterizes the difference between the convergence rates by optimizing the mean square error and the cubic power objective , providing a solid motivation for using error-based prioritized sampling . Theorem 2 ( Fast early learning ) . Consider the following two objectives : ` 2 ( x , y ) def = 12 ( x− y ) 2 , and ` 3 ( x , y ) def = 13 |x− y| 3 . Denote δt def = |xt − y| , and δ̃t def = |x̃t − y| . Define the functional gradient flow updates on these two objectives : dxt dt = −η d { 12 ( xt − y ) 2 } dxt , dx̃t dt = −η d { 13 |x̃t − y| 3 } dx̃t . ( 2 ) Given error threshold ≥ 0 , define the hitting time t def = mint { t : δt ≤ } and t̃ def = mint { t : δ̃t ≤ } . For any initial function value x0 s.t . δ0 > 1 , ∃ 0 ∈ ( 0 , 1 ) such that ∀ > 0 , t ≥ t̃ .1 Proof . Please see Appendix A.4 . Given the same and the same initial value of x , first we derive t = 1 η · ln { δ0 } , t̃ = 1 η · ( 1 − 1 δ0 ) . Then we analyze the condition on to see when t ≥ t̃ , i.e . minimizing the square error is slower than minimizing the cubic error . The above theorem says that when the initial error is relatively large , it is faster to get to a certain low error point with the cubic objective . We can test this in simulation , with the following minimization problems : minx≥0 x2 and minx≥0 x3 . We use the hitting time formulae t = 1η · ln { δ0 } , t̃ = 1 η · ( 1 − 1 δ0 ) derived in the proof , to compute the hitting time ratio t t̃ under different initial values x0 and final error value . In Figure 1 ( c ) ( d ) , we can see that it usually takes a significantly shorter time for the cubic loss to reach a certain xt with various x0 values . 1Finding the exact value of 0 would require a definition of ordering on complex plane , which leads to 0 = − 1W ( log 1/a−1/a−πi ) and W ( · ) is a Wright Omega function , then we have t̃ ≤ t . Our theorem statement is sufficient for the purpose of characterizing convergence rate . Implications of the above theory . The equivalence from Theorem 1 inspires us to identify two limitations of the current prioritized ER method : 1 ) The equivalence requires the priorities of all samples to get updated after the training parameters get updated at each time step . 2 ) The equivalence requires the prioritized sampling distribution to be calculated on the whole training set ; in an online RL setting , at the current time step t , we only have visited samples . These visited samples provide a biased training set w.r.t . current policy which likely does not reasonably cover the state space . We will present our approach to overcome the limitations in Section 4 . In the next section , we will empirically verify our theoretical findings . | The paper proposes a new way of prioritization in experience replay and Dyna-style planning methods. In particular, it proposes to exploit a learned model to actively search for states with high expected errors. The states are then prioritized proportional to the expected errors. The authors motivate the approach by a theoretical/empirical observation that the prioritized optimization of L2 loss is equivalent to the direct optimization of cubic loss. More specifically they tackle (1) outdated priorities of training samples, (2) insufficient coverage of the sample space; which are identified as the main shortcomings of previously explored prioritization methods. | SP:528ad3f6625f1cf86ac5219fba6ee1a457b65240 |
Transient Non-stationarity and Generalisation in Deep Reinforcement Learning | 1 INTRODUCTION . In RL , as an agent explores more of its environment and updates its policy and value function , the data distribution it uses for training changes . In deep RL , this non-stationarity is often not addressed explicitly . Typically , a single neural network model is initialised and continually updated during training . Conventional wisdom about catastrophic forgetting ( Kemker et al. , 2018 ) implies that old updates from a different data-distribution will simply be forgotten . However , we provide evidence for an alternative hypothesis : networks exhibit a memory effect in their learned representations which can harm generalisation permanently if the data-distribution changed over the course of training . To build intuition , we first study this phenomenon in a supervised setting on the CIFAR-10 dataset . We artificially introduce transient non-stationarity into the training data and investigate how this affects the asymptotic performance under the final , stationary data in the later epochs of training . Interestingly , we find that while asymptotic training performance is nearly unaffected , test performance degrades considerably , even after the data-distribution has converged . In other words , we find that latent representations in deep networks learned under certain types of non-stationary data can be inadequate for good generalisation and might not be improved by later training on stationary data . Such transient non-stationarity is typical in RL . Consequently , we argue that this observed degradation of generalisation might contribute to the inferior generalisation properties recently attributed to many RL agents evaluated on held out test environments ( Zhang et al. , 2018a ; b ; Zhao et al. , 2019 ) . Furthermore , in contrast to Supervised Learning ( SL ) , simply re-training the agent from scratch once the data-distribution has changed is infeasible in RL as current state of the art algorithms require data close to the on-policy distribution , even for off-policy algorithms like Q-learning ( Fedus et al. , 2020 ) . To improve generalisation of RL agents despite this restriction , we propose Iterated Relearning ( ITER ) . In this paradigm for deep RL training , the agent ’ s policy and value are periodically distilled into a freshly initialised student , which subsequently replaces the teacher for further optimisation . While this occasional distillation step simply aims to re-learn and replace the current policy and ∗University of Oxford . Corresponding author : Maximilian Igl ( maximilian.igl @ gmail.com ) †Now at DeepMind , London ‡Delft University of Technology value outputs for the training data , it allows the student to learn a better latent representation with improved performance for unseen inputs because it eliminates non-stationarity during distillation . We propose a practical implementation of ITER which performs the distillation in parallel to the training process without requiring additional training data . While this introduces a small amount of non-stationarity into the distillation step , it greatly improves sample efficiency without noticeably impacting performance . Experimentally , we evaluate ITER on the Multiroom environment , as well as several environments from the recently proposed ProcGen benchmark and find that it improves generalisation . This provides further support to our hypothesis and indicates that the non-stationarity inherent to many RL algorithms , even when training on stationary environments , should not be ignored when aiming to learn robust agents . Lastly , to further support this claim and provide more insight into possible causes of the discovered effect , we perform additional ablation studies on the CIFAR-10 dataset . 2 BACKGROUND . We describe an RL problem as a Markov decision process ( MDP ) ( S , A , T , r , p0 , γ ) ( Puterman , 2014 ) with actions a∈A , states s∈S , initial state s0∼p0 , transition dynamics s′∼T ( s , a ) , reward function r ( s , a ) ∈R and discount factor γ . The unnormalised discounted state distribution induced by a policy π is defined as dπ ( s ) = ∑∞ t=0 γ tPr ( St=s|S0∼p0 , At∼π ( ·|St ) , St+1∼T ( St , At ) ) . In ITER , we learn a sequence of policies and value functions , which we denote with π ( k ) ( a|s ) and V ( k ) ( s ) at the kth iteration ( k ∈ { 0 , 1 , 2 , . . . } ) , parameterized by θk . We briefly discuss some forms of non-stationarity which can arise in RL , even when the environment is stationary . For simplicity , we focus the exposition on actor-critic methods which use samples from interaction with the environment to estimate the policy gradient given by g = E [ ∇θ log πθ ( a|s ) Aπ ( s , a , s′ ) |s , a , s′ ∼ dπ ( s ) π ( a|s ) T ( s′|s , a ) ] . The advantage is often estimated as Aπ ( s , a , s′ ) = r ( s , a ) + γV π ( s′ ) − V π ( s ) . Typically , we also use neural networks to approximate the baseline V πφ ( s ) and for bootstrapping from the future value V π φ ( s ′ ) . φ can be learned by minimising E [ Aπ ( s , a , s′ ) 2 ] by stochastic semi-gradient descent , treating V πφ ( s′ ) as a constant . There are at least three main types of non-stationarity in deep RL . First , we update the policy πθ , which leads to changes in the state distribution dπθ ( s ) . Early on in training , a random policy πθ only explores states close to initial states s0 . As πθ improves , new states further from s0 are encountered . Second , changes to the policy also change the true value function V π ( s ) which V πφ ( s ) is approximating . Lastly , due to the use of bootstrap targets in temporal difference learning , the learned value V πφ ( s ) is not regressed directly towards V π ( s ) . Instead V πφ fits a gradually evolving target sequence even under a fixed policy π , thereby also changing the policy gradient estimator g . 3 THE IMPACT OF NON-STATIONARITY ON GENERALISATION . In this section we investigate how asymptotic performance is affected by changes to the datadistribution during training . In particular , we assume an initial , transient phase of non-stationarity , followed by an extended phase of training on a stationary data-distribution . This is similar to the situation in RL where the data-distribution is affected by a policy which converges over time . We show that this transient non-stationarity has a permanent effect on the learned representation and negatively impacts generalisation . As interventions in RL training can lead to confounding factors due to off-policy data or changed exploration behaviour , we utilise Supervised Learning ( SL ) here to provide initial evidence in a more controlled setup . We use the CIFAR-10 dataset for image classification ( Krizhevsky et al. , 2009 ) and artificially inject non-stationarity . Our goal is to provide qualitative results on the impact of non-stationarity , not to obtain optimal performance . We use a ResNet18 ( He et al. , 2016 ) architecture , similar to those used by Espeholt et al . ( 2018 ) and Cobbe et al . ( 2019a ) . Parameters are updated using Stochastic Gradient Descent ( SGD ) with momentum and , following standard practice in RL , we use a constant learning rate and do not use batch normalisation . Weight decay is used for regularisation . Hyper-parameters and more details can be found in appendix B . We train for a total of 2500 epochs . While the last 1500 epochs are trained on the full , unaltered dataset , we modify the training data in three different ways during the first 1000 epochs . Test data is left unmodified throughout training . While each modification is loosely motivated by the RL setting , our goal is not to mimic it exactly ( which would be infeasible ) , nor to disentangle the contributions of different types of non-stationarity . Instead , we aim to show that these effects reliably occur in the presence to various types of non-stationarity , and provide intuitions that can be brought into the RL setting in Section 4 . For the first modification , called Dataset Size , we initially train only on a small fraction of the full dataset and gradually add more data points after each epoch , at a constant rate , until the full dataset is available after epoch 1000 . During the non-stationary phase , data points are reused multiple times to ensure the same number of network updates are made in each epoch . For the modification Wrong Labels we replace all training labels by randomly drawn incorrect ones . After each epoch , a constant number of these labels are replaced by their correct values . Lastly , Noisy Labels is similar to Wrong Labels , but the incorrect labels are sampled uniformly at the start of each epoch . For both , all training labels are correct after epoch 1000 . While Dataset Size is inspired by the changing state distribution seen by an evolving policy , Wrong Labels and Noisy Labels are motivated by the consistent bias or fluctuating errors a learned critic can introduce in the policy gradient estimate . The results are shown in fig . 1 . While the final training accuracy ( left ) is almost unaffected ( see table 1 in the appendix for exact results ) , all three nonstationary modifications significantly reduce the test accuracy ( right ) . The plateau in accuracy shows that this effect persists even after the models are further trained using the full dataset with correct labels : non-stationarity early in training has a permanent effect on the learned representations and quality of generalisation . These results indicate that the non-stationarity introduced by the gradual convergence of the policy in RL might similarly de- teriorate the generalisation of the agent . To overcome this , we propose ITER in the next section . The key insight enabling ITER is that the observed negative effect is restricted to the test data , whereas the predictions on the training data are unaffected and of high quality . 4 ITER . In section 3 , we have seen evidence that the non-stationarity which is present in many deep RL algorithms might lead to impaired generalisation on held-out test environments . To mitigate this and improve generalisation to previously unseen states , we propose Iterated Relearning ( ITER ) : instead of updating a single agent model throughout the entire training process , ITER learns a sequence of models , each of which is exposed to less non-stationarity during its training . As we will show in section 5 , this improves generalisation . ITER can be applied on top of a wide range of base RL training methods . For simplicity , we focus in the following exposition on actor-critic methods and use Proximal Policy Optimization ( PPO ) ( Schulman et al. , 2017 ) for the experimental evaluation . The underlying insight behind ITER is that at any point during RL training the latent representation of our current agent network might be significantly damaged by non-stationarity , but its outputs on the training data are comparatively unaffected ( see fig . 1 ) . Consequently , ITER aims to periodically replace the current agent network , the ‘ teacher ’ , by a ‘ student ’ network which was freshly initialised and trained to mimic the teacher on the current training data . Because this re-learning and replacement step can be performed on stationary data , it allows us to re-learn a policy that matches performance on the training data but generalises better to novel test environments . ITER begins with an initial policy π ( 0 ) and value function V ( 0 ) and then repeats the following steps , starting with iteration k = 0 . 1 . Use the base RL algorithm to train π ( k ) and V ( k ) . 2 . Initialise new student networks for π ( k+1 ) and V ( k+1 ) . We refer to the current policy π ( k ) and value function V ( k ) as the teacher . 3 . Distill the teacher into the student . This phase is discussed in more detail in section 4.1 . 4 . The student replaces the teacher : π ( k ) and V ( k ) can be discarded . 5 . Increment k and return to step 1 . Repeat as many times as needed . This results in alternating RL training with distillation into a freshly initialised student . The RL training phases continue to introduce non-stationarity until the models converge , so we want to iterate the process , repeating steps 1-4 . How often we do so depends on the environment and can be chosen as a hyper-parameter . In practise we found the results to be quite robust to this choice and recommend , as general rule , to iterate as often as possible within the limits outlined in section 4.2 . There , we introduce a practical implementation of ITER which re-uses data between steps 1 and 3 in order to not require additional samples from the environment . | The paper deals with a relevant issue. The simplified supervised learning setting is a good way of looking at the issue of non-stationarity in isolation and it makes a compelling case that neural networks optimized by SGD can have generalization issues in settings where the data distribution changes over time, even after the data distribution converges. The solution proposed by the paper is simple and can be applied to most off-the-shelf RL algorithms. My main criticism would be that the hybrid objective feels rather ad-hoc and that the proposed method could use a bit more theoretical justification. Also, since the issue being tackled here is quite general to RL, a wider set of benchmarks and base-algorithms (in addition to PPO) would be necessary to get a better picture. | SP:d2d5800a67dc1972370362f55665a8fe2f25f961 |
Transient Non-stationarity and Generalisation in Deep Reinforcement Learning | 1 INTRODUCTION . In RL , as an agent explores more of its environment and updates its policy and value function , the data distribution it uses for training changes . In deep RL , this non-stationarity is often not addressed explicitly . Typically , a single neural network model is initialised and continually updated during training . Conventional wisdom about catastrophic forgetting ( Kemker et al. , 2018 ) implies that old updates from a different data-distribution will simply be forgotten . However , we provide evidence for an alternative hypothesis : networks exhibit a memory effect in their learned representations which can harm generalisation permanently if the data-distribution changed over the course of training . To build intuition , we first study this phenomenon in a supervised setting on the CIFAR-10 dataset . We artificially introduce transient non-stationarity into the training data and investigate how this affects the asymptotic performance under the final , stationary data in the later epochs of training . Interestingly , we find that while asymptotic training performance is nearly unaffected , test performance degrades considerably , even after the data-distribution has converged . In other words , we find that latent representations in deep networks learned under certain types of non-stationary data can be inadequate for good generalisation and might not be improved by later training on stationary data . Such transient non-stationarity is typical in RL . Consequently , we argue that this observed degradation of generalisation might contribute to the inferior generalisation properties recently attributed to many RL agents evaluated on held out test environments ( Zhang et al. , 2018a ; b ; Zhao et al. , 2019 ) . Furthermore , in contrast to Supervised Learning ( SL ) , simply re-training the agent from scratch once the data-distribution has changed is infeasible in RL as current state of the art algorithms require data close to the on-policy distribution , even for off-policy algorithms like Q-learning ( Fedus et al. , 2020 ) . To improve generalisation of RL agents despite this restriction , we propose Iterated Relearning ( ITER ) . In this paradigm for deep RL training , the agent ’ s policy and value are periodically distilled into a freshly initialised student , which subsequently replaces the teacher for further optimisation . While this occasional distillation step simply aims to re-learn and replace the current policy and ∗University of Oxford . Corresponding author : Maximilian Igl ( maximilian.igl @ gmail.com ) †Now at DeepMind , London ‡Delft University of Technology value outputs for the training data , it allows the student to learn a better latent representation with improved performance for unseen inputs because it eliminates non-stationarity during distillation . We propose a practical implementation of ITER which performs the distillation in parallel to the training process without requiring additional training data . While this introduces a small amount of non-stationarity into the distillation step , it greatly improves sample efficiency without noticeably impacting performance . Experimentally , we evaluate ITER on the Multiroom environment , as well as several environments from the recently proposed ProcGen benchmark and find that it improves generalisation . This provides further support to our hypothesis and indicates that the non-stationarity inherent to many RL algorithms , even when training on stationary environments , should not be ignored when aiming to learn robust agents . Lastly , to further support this claim and provide more insight into possible causes of the discovered effect , we perform additional ablation studies on the CIFAR-10 dataset . 2 BACKGROUND . We describe an RL problem as a Markov decision process ( MDP ) ( S , A , T , r , p0 , γ ) ( Puterman , 2014 ) with actions a∈A , states s∈S , initial state s0∼p0 , transition dynamics s′∼T ( s , a ) , reward function r ( s , a ) ∈R and discount factor γ . The unnormalised discounted state distribution induced by a policy π is defined as dπ ( s ) = ∑∞ t=0 γ tPr ( St=s|S0∼p0 , At∼π ( ·|St ) , St+1∼T ( St , At ) ) . In ITER , we learn a sequence of policies and value functions , which we denote with π ( k ) ( a|s ) and V ( k ) ( s ) at the kth iteration ( k ∈ { 0 , 1 , 2 , . . . } ) , parameterized by θk . We briefly discuss some forms of non-stationarity which can arise in RL , even when the environment is stationary . For simplicity , we focus the exposition on actor-critic methods which use samples from interaction with the environment to estimate the policy gradient given by g = E [ ∇θ log πθ ( a|s ) Aπ ( s , a , s′ ) |s , a , s′ ∼ dπ ( s ) π ( a|s ) T ( s′|s , a ) ] . The advantage is often estimated as Aπ ( s , a , s′ ) = r ( s , a ) + γV π ( s′ ) − V π ( s ) . Typically , we also use neural networks to approximate the baseline V πφ ( s ) and for bootstrapping from the future value V π φ ( s ′ ) . φ can be learned by minimising E [ Aπ ( s , a , s′ ) 2 ] by stochastic semi-gradient descent , treating V πφ ( s′ ) as a constant . There are at least three main types of non-stationarity in deep RL . First , we update the policy πθ , which leads to changes in the state distribution dπθ ( s ) . Early on in training , a random policy πθ only explores states close to initial states s0 . As πθ improves , new states further from s0 are encountered . Second , changes to the policy also change the true value function V π ( s ) which V πφ ( s ) is approximating . Lastly , due to the use of bootstrap targets in temporal difference learning , the learned value V πφ ( s ) is not regressed directly towards V π ( s ) . Instead V πφ fits a gradually evolving target sequence even under a fixed policy π , thereby also changing the policy gradient estimator g . 3 THE IMPACT OF NON-STATIONARITY ON GENERALISATION . In this section we investigate how asymptotic performance is affected by changes to the datadistribution during training . In particular , we assume an initial , transient phase of non-stationarity , followed by an extended phase of training on a stationary data-distribution . This is similar to the situation in RL where the data-distribution is affected by a policy which converges over time . We show that this transient non-stationarity has a permanent effect on the learned representation and negatively impacts generalisation . As interventions in RL training can lead to confounding factors due to off-policy data or changed exploration behaviour , we utilise Supervised Learning ( SL ) here to provide initial evidence in a more controlled setup . We use the CIFAR-10 dataset for image classification ( Krizhevsky et al. , 2009 ) and artificially inject non-stationarity . Our goal is to provide qualitative results on the impact of non-stationarity , not to obtain optimal performance . We use a ResNet18 ( He et al. , 2016 ) architecture , similar to those used by Espeholt et al . ( 2018 ) and Cobbe et al . ( 2019a ) . Parameters are updated using Stochastic Gradient Descent ( SGD ) with momentum and , following standard practice in RL , we use a constant learning rate and do not use batch normalisation . Weight decay is used for regularisation . Hyper-parameters and more details can be found in appendix B . We train for a total of 2500 epochs . While the last 1500 epochs are trained on the full , unaltered dataset , we modify the training data in three different ways during the first 1000 epochs . Test data is left unmodified throughout training . While each modification is loosely motivated by the RL setting , our goal is not to mimic it exactly ( which would be infeasible ) , nor to disentangle the contributions of different types of non-stationarity . Instead , we aim to show that these effects reliably occur in the presence to various types of non-stationarity , and provide intuitions that can be brought into the RL setting in Section 4 . For the first modification , called Dataset Size , we initially train only on a small fraction of the full dataset and gradually add more data points after each epoch , at a constant rate , until the full dataset is available after epoch 1000 . During the non-stationary phase , data points are reused multiple times to ensure the same number of network updates are made in each epoch . For the modification Wrong Labels we replace all training labels by randomly drawn incorrect ones . After each epoch , a constant number of these labels are replaced by their correct values . Lastly , Noisy Labels is similar to Wrong Labels , but the incorrect labels are sampled uniformly at the start of each epoch . For both , all training labels are correct after epoch 1000 . While Dataset Size is inspired by the changing state distribution seen by an evolving policy , Wrong Labels and Noisy Labels are motivated by the consistent bias or fluctuating errors a learned critic can introduce in the policy gradient estimate . The results are shown in fig . 1 . While the final training accuracy ( left ) is almost unaffected ( see table 1 in the appendix for exact results ) , all three nonstationary modifications significantly reduce the test accuracy ( right ) . The plateau in accuracy shows that this effect persists even after the models are further trained using the full dataset with correct labels : non-stationarity early in training has a permanent effect on the learned representations and quality of generalisation . These results indicate that the non-stationarity introduced by the gradual convergence of the policy in RL might similarly de- teriorate the generalisation of the agent . To overcome this , we propose ITER in the next section . The key insight enabling ITER is that the observed negative effect is restricted to the test data , whereas the predictions on the training data are unaffected and of high quality . 4 ITER . In section 3 , we have seen evidence that the non-stationarity which is present in many deep RL algorithms might lead to impaired generalisation on held-out test environments . To mitigate this and improve generalisation to previously unseen states , we propose Iterated Relearning ( ITER ) : instead of updating a single agent model throughout the entire training process , ITER learns a sequence of models , each of which is exposed to less non-stationarity during its training . As we will show in section 5 , this improves generalisation . ITER can be applied on top of a wide range of base RL training methods . For simplicity , we focus in the following exposition on actor-critic methods and use Proximal Policy Optimization ( PPO ) ( Schulman et al. , 2017 ) for the experimental evaluation . The underlying insight behind ITER is that at any point during RL training the latent representation of our current agent network might be significantly damaged by non-stationarity , but its outputs on the training data are comparatively unaffected ( see fig . 1 ) . Consequently , ITER aims to periodically replace the current agent network , the ‘ teacher ’ , by a ‘ student ’ network which was freshly initialised and trained to mimic the teacher on the current training data . Because this re-learning and replacement step can be performed on stationary data , it allows us to re-learn a policy that matches performance on the training data but generalises better to novel test environments . ITER begins with an initial policy π ( 0 ) and value function V ( 0 ) and then repeats the following steps , starting with iteration k = 0 . 1 . Use the base RL algorithm to train π ( k ) and V ( k ) . 2 . Initialise new student networks for π ( k+1 ) and V ( k+1 ) . We refer to the current policy π ( k ) and value function V ( k ) as the teacher . 3 . Distill the teacher into the student . This phase is discussed in more detail in section 4.1 . 4 . The student replaces the teacher : π ( k ) and V ( k ) can be discarded . 5 . Increment k and return to step 1 . Repeat as many times as needed . This results in alternating RL training with distillation into a freshly initialised student . The RL training phases continue to introduce non-stationarity until the models converge , so we want to iterate the process , repeating steps 1-4 . How often we do so depends on the environment and can be chosen as a hyper-parameter . In practise we found the results to be quite robust to this choice and recommend , as general rule , to iterate as often as possible within the limits outlined in section 4.2 . There , we introduce a practical implementation of ITER which re-uses data between steps 1 and 3 in order to not require additional samples from the environment . | This paper investigates an interesting problem that transient non-stationarity can affect the generalization of the neural network. This paper first conducts experiments on a supervised learning task to illustrate that transient non-stationarity can lead to degenerated performance on testing set. Then, the paper proposes an RL algorithm called ITER to avoid the negative impact of such non-stationarity. | SP:d2d5800a67dc1972370362f55665a8fe2f25f961 |
Improving Local Effectiveness for Global Robustness Training | 1 INTRODUCTION . With the proliferation of deep neural networks ( DNN ) in areas including computer vision , natural language processing and speech recognition , there has been a growing concern over their safety . For example , Szegedy et al . ( 2013 ) demonstrated that naturally trained DNNs are in fact fragile . By adding to each data a perturbation that is carefully designed but imperceptible to humans , DNNs previously reaching almost 100 % accuracy performance could hardly make a correct prediction any more . This could cause serious issues in areas such as autonomous navigation or personalised medicine , where an incorrect decision can endanger life . To tackle these issues , training DNNs that are robust to small perturbations has become an active area of research in machine learning . Various algorithms have been proposed ( Papernot et al. , 2016 ; Kannan et al. , 2018 ; Zhang et al. , 2019b ; Qin et al. , 2019 ; Moosavi-Dezfooli et al. , 2020 ; Madry et al. , 2018 ; Ding et al. , 2020 ) . Among them , adversarial training ( ADV ) ( Madry et al. , 2018 ) and TRADES ( Zhang et al. , 2019b ) are two of the most frequently used training methods so far . Although developed upon different ideas , both methods require using strong adversarial attacks , generally computed through several steps of projected gradient descent . Such attacks can quickly become prohibitive when model complexity and input dimensions increase , thereby limiting their applicability . Since the cost of finding strong adversaries is mainly due to the high number of gradient steps performed , one potential approach to alleviate the problem is to use cheap but weak adversaries . Weak adversaries are obtained using fewer gradient steps , and in the extreme case with a single gradient step . Based on this idea , Wong et al . ( 2020 ) argue that by using random initialization and a larger step-size , adversarial training with weak adversaries found via one gradient step is sufficient to achieve a satisfactory level of robustness . We term this method as one-step ADV from now on . While one-step ADV does indeed exhibit robustness , there is still a noticeable gap when compared with its multi-step counterpart . In this paper , we further bridge the gap by proposing a new robust training algorithm : Adversarial Training via LocAl Stability ( ATLAS ) . Local stability , in our context , implies stability of prediction and is the same as local robustness . Specifically , we make the following contributions : • We adopt a new perspective on robust accuracy and introduce a framework for constructing robust training losses that allow more effective use of adversaries . The framework consists of a local component and a global component . The local component maximizes the effectiveness of an given adversary by improving the network ’ s robustness on both the adversary and points around it . In other words , the local component attempts to increase the radius of a ball centered at the adversary on which the network is being robust . The global component combines all local balls in a regularized way to achieve the desired overall robust performance . • Based on the framework and guided by the need of fast robust training , we propose our novel robust training algorithm ATLAS . • We show that ATLAS makes a more effective use of weak adversaries by favourably comparing it against one-step ADV on three datasets : MNIST , CIFAR-10 and CIFAR-100 . • Although one-step ATLAS is more expensive than its other one-step counterparts , ATLAS still allows efficient robust training . We show that , with a one-step weak adversary , ATLAS manages to achieve comparable levels of robust accuracy to multi-step state of the art methods on all datasets . • Finally , we show that when strong adversaries are used , ATLAS matches with the current state of the art on MNIST and outperforms them on CIFAR-10 and CIFAR-100 . 2 RELATED WORKS . Robust training aims to learn a network such that it is able to give the same correct output even when the input is slightly perturbed . Existing robust training algorithms can be divided into two categories : natural image based methods and adversaries based methods . Within the first category , the common form of loss is a natural loss term plus a regularizer computed at natural images . We briefly mention some of these methods . Moosavi-Dezfooli et al . ( 2020 ) observed empirically that reducing the curvature of the loss function and the decision boundary could lead to robust models . The authors thus propose a regularizer based on the Hessian of the loss function . Closely related is the regularizer , introduced in ( Jakubovitz & Giryes , 2018 ; Hoffman et al. , 2019 ; Ross & Doshi-Velez , 2018 ) , that penalizes the Frobenius norm of the Jacobian of the loss function . Jacobian regularizer can also be seen as a way of reducing the curvature of the decision boundary ( Jakubovitz & Giryes , 2018 ) . Although calculating the norm is computationally expensive , a fast estimator with empirically high accuracy has been developed in Hoffman et al . ( 2019 ) . We focus on adversary based robust training , as they generally perform better in terms of robust accuracy . Under this category , an early fundamental work is the Fast Gradient Sign Method ( FGSM ) by Goodfellow et al . ( 2015 ) . Adversarial Training ( ADV ) ( Madry et al. , 2018 ) is a multi-step variant of FGSM . Rather than using one step FGSM , ADV employs multi-step projected gradient descent ( PGD ) ( Kurakin et al. , 2016 ) with smaller step-sizes to generate perturbed inputs . These modifications have allowed ADV to become one of the most effective robust training methods so far ( Athalye et al. , 2018 ) . Another frequently used robust training method is TRADES ( Zhang et al. , 2019b ) . Motivated by its theoretical analyses of the trade-off between natural accuracy and robust accuracy in a binary classification example , TRADES encourages model robustness by adding to the natural loss a regularizer involving adversaries to push away the decision boundary . Recently , Qin et al . ( 2019 ) suggest that a robust model can be learned through promoting linearity in the vicinity of the training examples . They designed a local linearity regularizer ( LLR ) , in which adversaries are used to maximize the penalty for non-linearity . Applying LLR also allows efficient robust training . We note that the underlying idea of LLR is complementary to ATLAS . In addition , several works have suggested to adopt input dependent treatments . These works include incorporating the fact of whether the given input is correctly classified ( Wang et al. , 2020 ) and using adaptive perturbation for different inputs ( Ding et al. , 2019 ) . One major drawback of adversary based methods ( Madry et al. , 2018 ; Zhang et al. , 2019b ; Qin et al. , 2019 ; Wang et al. , 2020 ; Ding et al. , 2019 ) is that most of them rely on strong adversaries , computed via expensive PGD . When the input dimension is high and the model structure is complicated , finding adversaries can be too expensive for these methods to work effectively . Several works have researched possible ways to speed up the process . Algorithmically , Zhang et al . ( 2019a ) cut down the total number of full forward and backward passes for generating multi-step PGD adversaries while Zhang et al . ( 2020 ) introduce a parameter to allow early stop PGD . Shafahi et al . ( 2019 ) reduce adversary overhead by combining weight update and input perturbation update within a single back propagation and use a single step FGSM adversary . Wong et al . ( 2020 ) argue that the main reason one-step FGSM , generally regarded as not robust , is effective in ( Shafahi et al. , 2019 ) is due to the non-zero initialization used . As a result , Wong et al . ( 2020 ) proposed that with random initialization and a larger step size , weak adversaries generated by FGSM could lead to models with a high level of robust accuracy . In this study , we adopt a similar viewpoint of accelerating robust training through the use of weak adversaries . 3 PRELIMINARIES AND NOTATIONS . We consider classification tasks . Let x be an image from the data distribution X ⊂ RN and yx be its correct label from classes C = { 1 , . . . , C } . We denote a neural network , parameterized by θ , as f ( x ; θ ) : X → RC . The function f outputs logits and the predicted class label is chosen to be the element with the largest scalar value . Given a supervised dataset , the parameters θ are obtained by minimizing a loss function ` over the dataset . In natural training , a common loss choice is the cross-entropy loss , denoted as ` CE . To compute ` CE , we need prediction probabilities p ( x ; θ ) , which is evaluated as pi ( x ; θ ) = exp ( fi ( x ; θ ) ) ∑ j exp ( fj ( x ; θ ) ) element-wise . Given a tolerance level and a distance measure norm Lp , we say the network f is robust to adversaries at a given point x ∈ X , if it satisfies arg max i∈C fi ( x ′ ; θ ) = arg max i∈C fi ( x ; θ ) , ∀x′ s.t ‖x′ − x‖p ≤ . ( 1 ) We equivalently use a ball B ( x ) = { x′ | ‖x′ − x‖p ≤ } to represent the allowed perturbation . If f is robust on B , we call B a robust ball . Evaluating the true robustness of f on X is challenging . In practice , we replace X with a test set and evaluate the robustness of f by measuring the percentage of the test set satisfying the condition in equation ( 1 ) . To check whether the condition is met , various attack strategies are applied . Commonly used attacks are PGD based . To be specific , PGD performs the following gradient step during each iteration t+ 1 , xt+1 = ΠB ( x ) ( xt + ξ · sgn ( ∇x ` ( f ( xt ; θ ) ) , y ) ) , ξ < , ( 2 ) and repeats the iteration several times . Here , sgn denotes the sign function . On the other hand , FGSM uses a single gradient step x′ = x+ · sgn ( ∇x ` ( f ( x ; θ ) ) , y ) . ( 3 ) Finally , we introduce the following notation to facilitate the discussion . We first assume that the neural network f contains ReLU activation for the sake of clarity . This implies that the neural network is piecewise linear . As a consequence , at each x ∈ X , it is easy to find a weight matrix Wx ∈ RC×N and a constant vector bx ∈ RC such that f ( x ; θ ) = Wxx+ bx . To simplify the notation , we define W̆x = [ Wx | bx ] ∈ RC× ( N+1 ) , x̆T = [ xT | 1 ] ∈ R1× ( N+1 ) . ( 4 ) As a result , at each point x , we have f ( x ; θ ) = W̆xx̆ . Before we delve in to the details of the algorithm ATLAS , we first introduce a new framework for designing robust training losses . | The paper proposes a new adversarial training scheme, LEAP, to obtain models robust against $\ell_\infty$-bounded adversarial examples. The loss used as the objective minimized during training involves both local and global (wrt the input space) properties of the network. Experiments suggest improved performance compared to single and multi-step standard adversarial training and TRADES. | SP:cb123d2c425d00ef5dd94db8c8faa0210f72b57c |
Improving Local Effectiveness for Global Robustness Training | 1 INTRODUCTION . With the proliferation of deep neural networks ( DNN ) in areas including computer vision , natural language processing and speech recognition , there has been a growing concern over their safety . For example , Szegedy et al . ( 2013 ) demonstrated that naturally trained DNNs are in fact fragile . By adding to each data a perturbation that is carefully designed but imperceptible to humans , DNNs previously reaching almost 100 % accuracy performance could hardly make a correct prediction any more . This could cause serious issues in areas such as autonomous navigation or personalised medicine , where an incorrect decision can endanger life . To tackle these issues , training DNNs that are robust to small perturbations has become an active area of research in machine learning . Various algorithms have been proposed ( Papernot et al. , 2016 ; Kannan et al. , 2018 ; Zhang et al. , 2019b ; Qin et al. , 2019 ; Moosavi-Dezfooli et al. , 2020 ; Madry et al. , 2018 ; Ding et al. , 2020 ) . Among them , adversarial training ( ADV ) ( Madry et al. , 2018 ) and TRADES ( Zhang et al. , 2019b ) are two of the most frequently used training methods so far . Although developed upon different ideas , both methods require using strong adversarial attacks , generally computed through several steps of projected gradient descent . Such attacks can quickly become prohibitive when model complexity and input dimensions increase , thereby limiting their applicability . Since the cost of finding strong adversaries is mainly due to the high number of gradient steps performed , one potential approach to alleviate the problem is to use cheap but weak adversaries . Weak adversaries are obtained using fewer gradient steps , and in the extreme case with a single gradient step . Based on this idea , Wong et al . ( 2020 ) argue that by using random initialization and a larger step-size , adversarial training with weak adversaries found via one gradient step is sufficient to achieve a satisfactory level of robustness . We term this method as one-step ADV from now on . While one-step ADV does indeed exhibit robustness , there is still a noticeable gap when compared with its multi-step counterpart . In this paper , we further bridge the gap by proposing a new robust training algorithm : Adversarial Training via LocAl Stability ( ATLAS ) . Local stability , in our context , implies stability of prediction and is the same as local robustness . Specifically , we make the following contributions : • We adopt a new perspective on robust accuracy and introduce a framework for constructing robust training losses that allow more effective use of adversaries . The framework consists of a local component and a global component . The local component maximizes the effectiveness of an given adversary by improving the network ’ s robustness on both the adversary and points around it . In other words , the local component attempts to increase the radius of a ball centered at the adversary on which the network is being robust . The global component combines all local balls in a regularized way to achieve the desired overall robust performance . • Based on the framework and guided by the need of fast robust training , we propose our novel robust training algorithm ATLAS . • We show that ATLAS makes a more effective use of weak adversaries by favourably comparing it against one-step ADV on three datasets : MNIST , CIFAR-10 and CIFAR-100 . • Although one-step ATLAS is more expensive than its other one-step counterparts , ATLAS still allows efficient robust training . We show that , with a one-step weak adversary , ATLAS manages to achieve comparable levels of robust accuracy to multi-step state of the art methods on all datasets . • Finally , we show that when strong adversaries are used , ATLAS matches with the current state of the art on MNIST and outperforms them on CIFAR-10 and CIFAR-100 . 2 RELATED WORKS . Robust training aims to learn a network such that it is able to give the same correct output even when the input is slightly perturbed . Existing robust training algorithms can be divided into two categories : natural image based methods and adversaries based methods . Within the first category , the common form of loss is a natural loss term plus a regularizer computed at natural images . We briefly mention some of these methods . Moosavi-Dezfooli et al . ( 2020 ) observed empirically that reducing the curvature of the loss function and the decision boundary could lead to robust models . The authors thus propose a regularizer based on the Hessian of the loss function . Closely related is the regularizer , introduced in ( Jakubovitz & Giryes , 2018 ; Hoffman et al. , 2019 ; Ross & Doshi-Velez , 2018 ) , that penalizes the Frobenius norm of the Jacobian of the loss function . Jacobian regularizer can also be seen as a way of reducing the curvature of the decision boundary ( Jakubovitz & Giryes , 2018 ) . Although calculating the norm is computationally expensive , a fast estimator with empirically high accuracy has been developed in Hoffman et al . ( 2019 ) . We focus on adversary based robust training , as they generally perform better in terms of robust accuracy . Under this category , an early fundamental work is the Fast Gradient Sign Method ( FGSM ) by Goodfellow et al . ( 2015 ) . Adversarial Training ( ADV ) ( Madry et al. , 2018 ) is a multi-step variant of FGSM . Rather than using one step FGSM , ADV employs multi-step projected gradient descent ( PGD ) ( Kurakin et al. , 2016 ) with smaller step-sizes to generate perturbed inputs . These modifications have allowed ADV to become one of the most effective robust training methods so far ( Athalye et al. , 2018 ) . Another frequently used robust training method is TRADES ( Zhang et al. , 2019b ) . Motivated by its theoretical analyses of the trade-off between natural accuracy and robust accuracy in a binary classification example , TRADES encourages model robustness by adding to the natural loss a regularizer involving adversaries to push away the decision boundary . Recently , Qin et al . ( 2019 ) suggest that a robust model can be learned through promoting linearity in the vicinity of the training examples . They designed a local linearity regularizer ( LLR ) , in which adversaries are used to maximize the penalty for non-linearity . Applying LLR also allows efficient robust training . We note that the underlying idea of LLR is complementary to ATLAS . In addition , several works have suggested to adopt input dependent treatments . These works include incorporating the fact of whether the given input is correctly classified ( Wang et al. , 2020 ) and using adaptive perturbation for different inputs ( Ding et al. , 2019 ) . One major drawback of adversary based methods ( Madry et al. , 2018 ; Zhang et al. , 2019b ; Qin et al. , 2019 ; Wang et al. , 2020 ; Ding et al. , 2019 ) is that most of them rely on strong adversaries , computed via expensive PGD . When the input dimension is high and the model structure is complicated , finding adversaries can be too expensive for these methods to work effectively . Several works have researched possible ways to speed up the process . Algorithmically , Zhang et al . ( 2019a ) cut down the total number of full forward and backward passes for generating multi-step PGD adversaries while Zhang et al . ( 2020 ) introduce a parameter to allow early stop PGD . Shafahi et al . ( 2019 ) reduce adversary overhead by combining weight update and input perturbation update within a single back propagation and use a single step FGSM adversary . Wong et al . ( 2020 ) argue that the main reason one-step FGSM , generally regarded as not robust , is effective in ( Shafahi et al. , 2019 ) is due to the non-zero initialization used . As a result , Wong et al . ( 2020 ) proposed that with random initialization and a larger step size , weak adversaries generated by FGSM could lead to models with a high level of robust accuracy . In this study , we adopt a similar viewpoint of accelerating robust training through the use of weak adversaries . 3 PRELIMINARIES AND NOTATIONS . We consider classification tasks . Let x be an image from the data distribution X ⊂ RN and yx be its correct label from classes C = { 1 , . . . , C } . We denote a neural network , parameterized by θ , as f ( x ; θ ) : X → RC . The function f outputs logits and the predicted class label is chosen to be the element with the largest scalar value . Given a supervised dataset , the parameters θ are obtained by minimizing a loss function ` over the dataset . In natural training , a common loss choice is the cross-entropy loss , denoted as ` CE . To compute ` CE , we need prediction probabilities p ( x ; θ ) , which is evaluated as pi ( x ; θ ) = exp ( fi ( x ; θ ) ) ∑ j exp ( fj ( x ; θ ) ) element-wise . Given a tolerance level and a distance measure norm Lp , we say the network f is robust to adversaries at a given point x ∈ X , if it satisfies arg max i∈C fi ( x ′ ; θ ) = arg max i∈C fi ( x ; θ ) , ∀x′ s.t ‖x′ − x‖p ≤ . ( 1 ) We equivalently use a ball B ( x ) = { x′ | ‖x′ − x‖p ≤ } to represent the allowed perturbation . If f is robust on B , we call B a robust ball . Evaluating the true robustness of f on X is challenging . In practice , we replace X with a test set and evaluate the robustness of f by measuring the percentage of the test set satisfying the condition in equation ( 1 ) . To check whether the condition is met , various attack strategies are applied . Commonly used attacks are PGD based . To be specific , PGD performs the following gradient step during each iteration t+ 1 , xt+1 = ΠB ( x ) ( xt + ξ · sgn ( ∇x ` ( f ( xt ; θ ) ) , y ) ) , ξ < , ( 2 ) and repeats the iteration several times . Here , sgn denotes the sign function . On the other hand , FGSM uses a single gradient step x′ = x+ · sgn ( ∇x ` ( f ( x ; θ ) ) , y ) . ( 3 ) Finally , we introduce the following notation to facilitate the discussion . We first assume that the neural network f contains ReLU activation for the sake of clarity . This implies that the neural network is piecewise linear . As a consequence , at each x ∈ X , it is easy to find a weight matrix Wx ∈ RC×N and a constant vector bx ∈ RC such that f ( x ; θ ) = Wxx+ bx . To simplify the notation , we define W̆x = [ Wx | bx ] ∈ RC× ( N+1 ) , x̆T = [ xT | 1 ] ∈ R1× ( N+1 ) . ( 4 ) As a result , at each point x , we have f ( x ; θ ) = W̆xx̆ . Before we delve in to the details of the algorithm ATLAS , we first introduce a new framework for designing robust training losses . | The authors developed a novel robust training algorithm LEAP to focus on the effective use of adversaries. The proposed method improves the model robustness at each local patch and combines these patches through a global term, achieves overall robustness. The authors showed by maximizing the use of adversaries, they achieved high robust accuracy with weak adversaries. Furthermore, when trained with strong adversaries, the proposed method matches with the current state of the art on MNIST and outperforms them on CIFAR-10 and CIFAR-100. | SP:cb123d2c425d00ef5dd94db8c8faa0210f72b57c |
Self-supervised Adversarial Robustness for the Low-label, High-data Regime | 1 INTRODUCTION . As neural networks tackle challenges ranging from ranking content on the web ( Covington et al. , 2016 ) to autonomous driving ( Bojarski et al. , 2016 ) via medical diagnostics ( De Fauw et al. , 2018 ) , it has becomes increasingly important to ensure that deployed models are robust and generalize to various input perturbations . Unfortunately , despite their success , neural networks are not intrinsically robust . In particular , the addition of small but carefully chosen deviations to the input , called adversarial perturbations , can cause the neural network to make incorrect predictions with high confidence ( Carlini & Wagner , 2017a ; Goodfellow et al. , 2014 ; Kurakin et al. , 2016 ; Szegedy et al. , 2013 ) . Starting with Szegedy et al . ( 2013 ) , there has been a lot of work on understanding and generating adversarial perturbations ( Carlini & Wagner , 2017b ; Athalye & Sutskever , 2017 ) , and on building models that are robust to such perturbations ( Papernot et al. , 2015 ; Madry et al. , 2017 ; Kannan et al. , 2018 ) . Robust optimization techniques , like the one developed by Madry et al . ( 2017 ) , learn robust models by trying to find the worst-case adversarial examples ( by using gradient ascent on the training loss ) at each training step and adding them to the training data . Since Madry et al . ( 2017 ) , various modifications to their original implementation have been proposed ( Zhang et al. , 2019 ; Pang et al. , 2020 ; Huang et al. , 2020 ; Qin et al. , 2019 ) . We highlight the simultaneous work from Carmon et al . ( 2019 ) ; Uesato et al . ( 2019 ) ; Zhai et al . ( 2019a ) ; Najafi et al . ( 2019 ) that pioneered the use of additional unlabeled data using pseudo-labeling . While , theoretically , robustness can be achieved with only limited amount of labeled data , in practice , it remains difficult to train models that are both robust and accurate in the low-label regime . 1 Finally , we note that there has been little work towards learning adversarially robust representations that allow for efficient training on multiple downstream tasks ( with the exception of Cemgil et al. , 2019 ; Kim et al. , 2020 ) . Learning good image representations is a key challenge in computer vision ( Wiskott & Sejnowski , 2002 ; Hinton et al. , 2006 ) , and many different approaches have been proposed . Among them state-of-the-art methods include contrastive methods ( Chen et al. , 2020b ; Oord et al. , 2018 ; He et al. , 2020 ) and latent bootstrapping ( Grill et al. , 2020 ) . However , none of these recent works consider the impact of adversarial manipulations , which can render the widespread use of general representations difficult . As an example , Fig . 1 demonstrates the effect that a non-robust representation has on a content retrieval task , where two seemingly identical query images are matched to widely different images ( i.e. , their nearest neighbors in representation space ) . In this paper , we tackle the issue of learning robust representations that are adversarially robust on multiple downstream tasks in the low-label regime . Our contributions are as follows : • We formulate Bootstrap Your Own Robust Latents ( BYORL ) , a modification of Bootstrap Your Own Latents ( BYOL ) ( Grill et al. , 2020 ) that enables the training of robust representations without the need for any label information . These representations allow for efficient training on multiple downstream tasks with a fraction of the original labels . • Most notably , even with only 1 % of the labels , BYORL comes close to or even exceeds previous state-of-the-art which uses all labels . For example , for ` 2 norm-bounded perturbations of size = 128/255 on CIFAR-10 , BYORL achieves 75.50 % robust accuracy compared to 72.91 % for the previous state-of-the-art using all labels . BYORL reaches 77.61 % robust accuracy when using all available labels ( and additional unlabeled data extracted from 80M-TINYIMAGES ; Torralba et al. , 2008 ) . • Finally , we show that the representations learned through BYORL transfer much better to downstream tasks ( i.e. , downscaled STL-10 ( Coates et al. , 2011 ) and CIFAR-100 ( Krizhevsky et al. , 2014 ) ) than those obtained through pseudo-labeling and standard adversarial training . Importantly , we also highlight that classifiers trained on top of these robust representations do not need to be trained adversarially to be robust . 2 RELATED WORK . Adversarial robustness . Biggio et al . ( 2013 ) and Szegedy et al . ( 2013 ) observed that neural networks , while they achieve high accuracy on test data , are vulnerable to carefully crafted inputs perturbations , called adversarial examples . Since then , there has been several work on building stronger adversarial examples as well as defense against such adversarial examples ( Carlini & Wagner , 2017b ; Athalye & Sutskever , 2017 ; Goodfellow et al. , 2014 ; Papernot et al. , 2015 ; Madry 1In Uesato et al . ( 2018 ) and Carmon et al . ( 2019 ) , robust accuracy drops by 10 % when limiting the number of labels to about 10 % . et al. , 2017 ; Kannan et al. , 2018 ) . Arguably , the most successful approach for learning adversarially robust models is adversarial training as proposed by Madry et al . ( Athalye et al. , 2018 ; Uesato et al. , 2018 ) . This classic version of adversarial training has been augmented in different ways – with changes in the attack procedure ( e.g. , by incorporating momentum ; Dong et al. , 2017 ) , loss function ( e.g. , logit pairing ; Mosbach et al. , 2018 ) or model architecture ( e.g. , using attention ; Zoran et al. , 2020 ) . We also highlight Zhang et al . ( 2019 ) , who proposed TRADES which balances the trade-off between standard and robust accuracy . By construction , to the contrary of our proposed method , all aforementioned approaches use label information and are not capable of learning generic representations that might be useful to multiple downstream tasks . Semi- and self-supervised learning . Since human annotations can be expensive , semi- and selfsupervised learning approaches that leverage both labeled and unlabeled data have been proposed to improve model performance ( Chapelle et al. , 2009 ; Bachman et al. , 2014 ; Berthelot et al. , 2019 ; Laine & Aila , 2017 ; Miyato et al. , 2018 ; Sajjadi et al. , 2016 ; Xie et al. , 2019 ) . A common approach is to train networks to solve a manually-predefined pretext task ( e.g. , predicting the relative location of image patches ) for representation learning , and later use the learned representation for a specific supervised learning task ( Dosovitskiy et al. , 2014 ; Doersch et al. , 2015 ; Noroozi & Favaro , 2016 ) . Recently , contrastive learning that uses different views of multiple augmented images has been an effective tool to learn rich representation from unsupervised data ( Oord et al. , 2018 ; Chen et al. , 2020b ; He et al. , 2020 ; Tian et al. , 2020 ) , as these methods achieve comparable performance to fully-supervised models . While these works focus on improving standard generalization , we leverage representation learning , as proposed by Grill et al . ( 2020 ) , to improve adversarial generalization . Semi- and self-supervised learning for adversarial robustness . Schmidt et al . ( 2018 ) showed that learning adversarially robust models requires more data . As such , adversarial robustness with unlabeled data has recently drawn a lot of attention . We highlight the works by Uesato et al . ( 2019 ) ; Carmon et al . ( 2019 ) ; Zhai et al . ( 2019a ) which leveraged labeled data to train a standard classifier that is in turn used to pseudo-label the remaining unlabeled data . However , as shown by Uesato et al . ( 2019 ) ; Carmon et al . ( 2019 ) ; Zhai et al . ( 2019a ) , when only 10 % of the CIFAR-10 labels are available the robust accuracy drops significantly . In this paper , we focus on improving adversarial robustness in the low-label regime by leveraging unlabeled data ( e.g. , when 1 % –10 % of labels are available ) to build robust representations . The result is a technique that significantly outperforms state-of-the-art pseudo-labeling techniques in the low-label regime and remains competitive with adversarial training when all labels are available . Chen et al . ( 2020a ) also study adversarial pretraining on self-supervised tasks and demonstrate that they can train robust representations . However , to the contrary of our approach , their method does not preserve the robustness of their resulting representations on downstream tasks ( unless robust fine-tuning is used ) . Hendrycks et al . ( 2019 ) combine supervised adversarial training with an additional self-supervised head . They demonstrate that they can improve on standard adversarial training , but do not learn general representations . We also highlight the recent work by Kim et al . ( 2020 ) which combines adversarial training with contrastive learning . Our method reaches comparable robust accuracy , but is more scalable ( as it is not based on contrastive learning which requires large batch sizes ) . To the contrary of Kim et al. , we also study the transferability of robust representations and focus on the low-label regime . 3 METHOD . In this section , we explain BYORL which elegantly combines adversarial training with BYOL . Hence , we start by giving a brief description of adversarial training and BYOL . 3.1 ADVERSARIAL TRAINING . Madry et al . ( 2017 ) formulate a saddle point problem whose goal is to find model parameters θ that minimize the adversarial risk : E ( x , y ) ∼D [ max δ∈S l ( f ( x+ δ ; θ ) , y ) ] ( 1 ) where D is a data distribution over pairs of examples x and corresponding labels y , f ( · ; θ ) is a model parametrized by θ , l is a suitable loss function ( such as the 0− 1 loss in the context of classification tasks ) , and S defines the set of allowed perturbations ( i.e. , the adversarial input set or threat model ) . Several methods ( also known as “ attacks ” ) have been proposed to find adversarial examples ( and effectively solve the inner maximization problem in Eq . 1 ) . Classical adversarial training as proposed by Madry et al . ( 2017 ) uses Projected Gradient Descent ( PGD ) ,2 which replaces the impractical 0− 1 loss l with the cross-entropy loss l̂ and computes an adversarial perturbation δ̂ = δ ( K ) in K gradient ascent steps of size α as δ ( k+1 ) ← projS ( δ ( k ) + α∇δ ( t ) l̂ ( f ( x+ δ ( k ) ; θ ) , y ) ) ( 2 ) where δ ( 0 ) is chosen at random within S , and where projA ( a ) projects a point a back onto a set A . Finally , for each example x with label y , adversarial training minimizes the loss given by LATθ = l̂ ( f ( x+ δ̂ ; θ ) , y ) ≈ max δ∈S l̂ ( f ( x+ δ ; θ ) , y ) ( 3 ) where δ̂ is given by Eq . 2 and l̂ is the softmax cross-entropy loss . | This paper introduces a new algorithm for learning adversarially robust models in the semi-supervised setting, where a small amount of labeled data is available together with a sizeable unlabeled dataset. The proposed approach BYORL adapts an existing self-supervised learning method BYOL by introducing a new adversarial augmentation technique based on maximizing the cosine similarity between representations. BYORL is evaluated on CIFAR-10 and compared against a recent pseudo-labelling based approach UAT-FT for the semi-supervised setting, and is shown to outperform UAT-FT in terms of robust accuracy under $\ell_2$ and $\ell_\infty$ attacks under the low-labelled data regime. The representations learnt by BYORL are also shown to be better than that of UAT-FT when transferred to other datasets. Finally, robust representations are shown to be more important than learning a robust linear classifier on top. | SP:f771887b75818f23da58a6d8f4cfa7f0ce640cc7 |
Self-supervised Adversarial Robustness for the Low-label, High-data Regime | 1 INTRODUCTION . As neural networks tackle challenges ranging from ranking content on the web ( Covington et al. , 2016 ) to autonomous driving ( Bojarski et al. , 2016 ) via medical diagnostics ( De Fauw et al. , 2018 ) , it has becomes increasingly important to ensure that deployed models are robust and generalize to various input perturbations . Unfortunately , despite their success , neural networks are not intrinsically robust . In particular , the addition of small but carefully chosen deviations to the input , called adversarial perturbations , can cause the neural network to make incorrect predictions with high confidence ( Carlini & Wagner , 2017a ; Goodfellow et al. , 2014 ; Kurakin et al. , 2016 ; Szegedy et al. , 2013 ) . Starting with Szegedy et al . ( 2013 ) , there has been a lot of work on understanding and generating adversarial perturbations ( Carlini & Wagner , 2017b ; Athalye & Sutskever , 2017 ) , and on building models that are robust to such perturbations ( Papernot et al. , 2015 ; Madry et al. , 2017 ; Kannan et al. , 2018 ) . Robust optimization techniques , like the one developed by Madry et al . ( 2017 ) , learn robust models by trying to find the worst-case adversarial examples ( by using gradient ascent on the training loss ) at each training step and adding them to the training data . Since Madry et al . ( 2017 ) , various modifications to their original implementation have been proposed ( Zhang et al. , 2019 ; Pang et al. , 2020 ; Huang et al. , 2020 ; Qin et al. , 2019 ) . We highlight the simultaneous work from Carmon et al . ( 2019 ) ; Uesato et al . ( 2019 ) ; Zhai et al . ( 2019a ) ; Najafi et al . ( 2019 ) that pioneered the use of additional unlabeled data using pseudo-labeling . While , theoretically , robustness can be achieved with only limited amount of labeled data , in practice , it remains difficult to train models that are both robust and accurate in the low-label regime . 1 Finally , we note that there has been little work towards learning adversarially robust representations that allow for efficient training on multiple downstream tasks ( with the exception of Cemgil et al. , 2019 ; Kim et al. , 2020 ) . Learning good image representations is a key challenge in computer vision ( Wiskott & Sejnowski , 2002 ; Hinton et al. , 2006 ) , and many different approaches have been proposed . Among them state-of-the-art methods include contrastive methods ( Chen et al. , 2020b ; Oord et al. , 2018 ; He et al. , 2020 ) and latent bootstrapping ( Grill et al. , 2020 ) . However , none of these recent works consider the impact of adversarial manipulations , which can render the widespread use of general representations difficult . As an example , Fig . 1 demonstrates the effect that a non-robust representation has on a content retrieval task , where two seemingly identical query images are matched to widely different images ( i.e. , their nearest neighbors in representation space ) . In this paper , we tackle the issue of learning robust representations that are adversarially robust on multiple downstream tasks in the low-label regime . Our contributions are as follows : • We formulate Bootstrap Your Own Robust Latents ( BYORL ) , a modification of Bootstrap Your Own Latents ( BYOL ) ( Grill et al. , 2020 ) that enables the training of robust representations without the need for any label information . These representations allow for efficient training on multiple downstream tasks with a fraction of the original labels . • Most notably , even with only 1 % of the labels , BYORL comes close to or even exceeds previous state-of-the-art which uses all labels . For example , for ` 2 norm-bounded perturbations of size = 128/255 on CIFAR-10 , BYORL achieves 75.50 % robust accuracy compared to 72.91 % for the previous state-of-the-art using all labels . BYORL reaches 77.61 % robust accuracy when using all available labels ( and additional unlabeled data extracted from 80M-TINYIMAGES ; Torralba et al. , 2008 ) . • Finally , we show that the representations learned through BYORL transfer much better to downstream tasks ( i.e. , downscaled STL-10 ( Coates et al. , 2011 ) and CIFAR-100 ( Krizhevsky et al. , 2014 ) ) than those obtained through pseudo-labeling and standard adversarial training . Importantly , we also highlight that classifiers trained on top of these robust representations do not need to be trained adversarially to be robust . 2 RELATED WORK . Adversarial robustness . Biggio et al . ( 2013 ) and Szegedy et al . ( 2013 ) observed that neural networks , while they achieve high accuracy on test data , are vulnerable to carefully crafted inputs perturbations , called adversarial examples . Since then , there has been several work on building stronger adversarial examples as well as defense against such adversarial examples ( Carlini & Wagner , 2017b ; Athalye & Sutskever , 2017 ; Goodfellow et al. , 2014 ; Papernot et al. , 2015 ; Madry 1In Uesato et al . ( 2018 ) and Carmon et al . ( 2019 ) , robust accuracy drops by 10 % when limiting the number of labels to about 10 % . et al. , 2017 ; Kannan et al. , 2018 ) . Arguably , the most successful approach for learning adversarially robust models is adversarial training as proposed by Madry et al . ( Athalye et al. , 2018 ; Uesato et al. , 2018 ) . This classic version of adversarial training has been augmented in different ways – with changes in the attack procedure ( e.g. , by incorporating momentum ; Dong et al. , 2017 ) , loss function ( e.g. , logit pairing ; Mosbach et al. , 2018 ) or model architecture ( e.g. , using attention ; Zoran et al. , 2020 ) . We also highlight Zhang et al . ( 2019 ) , who proposed TRADES which balances the trade-off between standard and robust accuracy . By construction , to the contrary of our proposed method , all aforementioned approaches use label information and are not capable of learning generic representations that might be useful to multiple downstream tasks . Semi- and self-supervised learning . Since human annotations can be expensive , semi- and selfsupervised learning approaches that leverage both labeled and unlabeled data have been proposed to improve model performance ( Chapelle et al. , 2009 ; Bachman et al. , 2014 ; Berthelot et al. , 2019 ; Laine & Aila , 2017 ; Miyato et al. , 2018 ; Sajjadi et al. , 2016 ; Xie et al. , 2019 ) . A common approach is to train networks to solve a manually-predefined pretext task ( e.g. , predicting the relative location of image patches ) for representation learning , and later use the learned representation for a specific supervised learning task ( Dosovitskiy et al. , 2014 ; Doersch et al. , 2015 ; Noroozi & Favaro , 2016 ) . Recently , contrastive learning that uses different views of multiple augmented images has been an effective tool to learn rich representation from unsupervised data ( Oord et al. , 2018 ; Chen et al. , 2020b ; He et al. , 2020 ; Tian et al. , 2020 ) , as these methods achieve comparable performance to fully-supervised models . While these works focus on improving standard generalization , we leverage representation learning , as proposed by Grill et al . ( 2020 ) , to improve adversarial generalization . Semi- and self-supervised learning for adversarial robustness . Schmidt et al . ( 2018 ) showed that learning adversarially robust models requires more data . As such , adversarial robustness with unlabeled data has recently drawn a lot of attention . We highlight the works by Uesato et al . ( 2019 ) ; Carmon et al . ( 2019 ) ; Zhai et al . ( 2019a ) which leveraged labeled data to train a standard classifier that is in turn used to pseudo-label the remaining unlabeled data . However , as shown by Uesato et al . ( 2019 ) ; Carmon et al . ( 2019 ) ; Zhai et al . ( 2019a ) , when only 10 % of the CIFAR-10 labels are available the robust accuracy drops significantly . In this paper , we focus on improving adversarial robustness in the low-label regime by leveraging unlabeled data ( e.g. , when 1 % –10 % of labels are available ) to build robust representations . The result is a technique that significantly outperforms state-of-the-art pseudo-labeling techniques in the low-label regime and remains competitive with adversarial training when all labels are available . Chen et al . ( 2020a ) also study adversarial pretraining on self-supervised tasks and demonstrate that they can train robust representations . However , to the contrary of our approach , their method does not preserve the robustness of their resulting representations on downstream tasks ( unless robust fine-tuning is used ) . Hendrycks et al . ( 2019 ) combine supervised adversarial training with an additional self-supervised head . They demonstrate that they can improve on standard adversarial training , but do not learn general representations . We also highlight the recent work by Kim et al . ( 2020 ) which combines adversarial training with contrastive learning . Our method reaches comparable robust accuracy , but is more scalable ( as it is not based on contrastive learning which requires large batch sizes ) . To the contrary of Kim et al. , we also study the transferability of robust representations and focus on the low-label regime . 3 METHOD . In this section , we explain BYORL which elegantly combines adversarial training with BYOL . Hence , we start by giving a brief description of adversarial training and BYOL . 3.1 ADVERSARIAL TRAINING . Madry et al . ( 2017 ) formulate a saddle point problem whose goal is to find model parameters θ that minimize the adversarial risk : E ( x , y ) ∼D [ max δ∈S l ( f ( x+ δ ; θ ) , y ) ] ( 1 ) where D is a data distribution over pairs of examples x and corresponding labels y , f ( · ; θ ) is a model parametrized by θ , l is a suitable loss function ( such as the 0− 1 loss in the context of classification tasks ) , and S defines the set of allowed perturbations ( i.e. , the adversarial input set or threat model ) . Several methods ( also known as “ attacks ” ) have been proposed to find adversarial examples ( and effectively solve the inner maximization problem in Eq . 1 ) . Classical adversarial training as proposed by Madry et al . ( 2017 ) uses Projected Gradient Descent ( PGD ) ,2 which replaces the impractical 0− 1 loss l with the cross-entropy loss l̂ and computes an adversarial perturbation δ̂ = δ ( K ) in K gradient ascent steps of size α as δ ( k+1 ) ← projS ( δ ( k ) + α∇δ ( t ) l̂ ( f ( x+ δ ( k ) ; θ ) , y ) ) ( 2 ) where δ ( 0 ) is chosen at random within S , and where projA ( a ) projects a point a back onto a set A . Finally , for each example x with label y , adversarial training minimizes the loss given by LATθ = l̂ ( f ( x+ δ̂ ; θ ) , y ) ≈ max δ∈S l̂ ( f ( x+ δ ; θ ) , y ) ( 3 ) where δ̂ is given by Eq . 2 and l̂ is the softmax cross-entropy loss . | The paper proposes a new self-supervised technique, Bootstrap Your Own Robust Latents (BYORL), based on an existing technique, BYOL. BYORL proposes to provide adversarially robust representations for low-label regimes. The paper claims that BYORL achieves state-of-the-art performance on CIFAR-10 even with data that is labeled as low as 1%. In fact, the authors highlight that the representations resulted from BYORL avoid the explicit training for adversarial robustness, because they are already robust. | SP:f771887b75818f23da58a6d8f4cfa7f0ce640cc7 |
Adversarial and Natural Perturbations for General Robustness | 1 INTRODUCTION . A large body of work in computer vision and machine learning research focuses on studying the robustness of neural networks against adversarial perturbations ( Kurakin et al. , 2016 ; Goodfellow et al. , 2014 ; Carlini & Wagner , 2017 ) . Various defense based methods have also been proposed against these adversarial perturbations ( Goodfellow et al. , 2014 ; Madry et al. , 2017 ; Zhang et al. , 2019b ; Song et al. , 2019 ) . Concurrently , research also shows that deep neural networks are not even robust to small random perturbations e.g . Gaussian noise , small rotations and translations ( Dodge & Karam , 2017 ; Fawzi & Frossard , 2015 ; Kanbak et al. , 2018 ) . There is plenty of research being performed in the domain of adversarial perturbations however , there is very little focus on robustifying the networks against natural perturbations as we do here . Furthermore , adversarial perturbations are difficult to be found in the real world , and naturally occuring perturbations are of different nature than these pixel based perturbations . Therefore , in this paper we consider natural perturbations of six different styles that are elastic , occlusion , Gaussian noise , wave , saturation , and Gaussian blur . In this , “ elastic ” denotes a random sheer transformation applied to the image , “ occlusion ” is a large randomly located dot in the image and “ wave ” is a random geometric distortion applied to the image . Additionally , there is no consensus about whether adversarial robustness helps against natural perturbations . Zhang & Zhu ( 2019 ) showed that adversarial training reduces texture bias . However , Engstrom et al . ( 2019 ) demonstrated that l∞ based robustness does not generalize to natural transformations like rotations and translations . Here we evaluate whether adversarial training helps against natural perturbations and vice versa . Besides the robustness of the neural networks against natural and adversarial perturbations there is an open debate in the literature about the trade-off between the robustness and the accuracy ( Tsipras et al. , 2018 ; Zhang et al. , 2019a ; Su et al. , 2018 ) . Contrasting with adversarial training we found that networks partially trained with naturally perturbed images does not degrade the classification performance on the clean images . On the CIFAR-10 dataset , we even found that partial training with naturally perturbed images improves the classification accuracy for clean images . Given that deep neural networks are on par in performance with humans or they even surpass humans on clean images however , they fail to perform well on small natural perturbations ( He et al. , 2016 ; Dodge & Karam , 2017 ) . Hendrycks & Dietterich ( 2019 ) introduced a subset of Imagenet Deng et al . ( 2009 ) called Imagenet-C with corruptions applied on images from Imagenet . Although in Imagenet-C each corruption has five severity levels however they are not standardized for comparison among them . We standardize the effect of perturbations on training data to a fixed drop in classification accuracy of the test set , through this we allow for a fair comparison between different styles of training to retain robustness in the classifier against perturbations . We also normalize the performance of the network on different datasets to compare the robustness of the network for different datasets . We conduct 320 experiments on five different datasets for adversarial and six different natural perturbations . General robustness is the most desired case given as , the robustness against perturbations not seen during the training of the classifier . Hence , we evaluate the general robustness of networks by testing them on seen perturbations i.e . when the training and testing type of perturbations is the same , as well as on unseen perturbations i.e . when the training and testing type of perturbations are different . Among classifiers tested on the both seen and unseen perturbations , the natural perturbations of elastic , wave and occlusion come out on top compared to other natural perturbations as well as compared to adversarial perturbations . Our contributions are given as follows : i ) We perform fair evaluation of robustness . ii ) We show that , natural perturbation robust classifiers generalize to clean images . iii ) We depict that , seen natural perturbations are more robust than seen adversarial perturbations . iv ) Our evaluation for general robustness shows natural elastic , wave and occlusion perturbations are best robust against unseen perturbations . 2 RELATED WORK . Robustness with Adversarial or Natural Perturbations . In Goodfellow et al . ( 2014 ) the robustness of neural networks was demonstrated by adding imperceptible i.e . adversarial perturbations in the input to the degree that it will misclassify the input into the wrong class . To solve the problem Carlini & Wagner ( 2017 ) proposed adversarial training ( AT ) procedure that is by training the network on adversarially perturbed images networks can be robustified against these perturbations . In this work we employ a strong yet undefended attack “ basic iterative method ( BIM ) ” to generate adversarial examples . “ Projected gradient descent ( PGD ) ” a state of the art defense technique for adversarial training to evaluate its effectiveness compared to other ways of robustification . Zhang et al . ( 2019a ) ; Tsipras et al . ( 2018 ) questioned the generalization capability of adversarially trained neural networks on the clean images and showed that with the increase in adversarial robustness the accuracy of the networks on clean images drops . Therefore , we evaluate the performance of adversarially trained networks on clean , adversarial as well as natural perturbations , and compare them with networks trained with natural perturbations . Hendrycks & Dietterich ( 2019 ) focused on testing the robustness of vanilla neural networks on 15 different natural perturbations with different perturbation levels . We observe that some of their perturbations are correlated e.g . Gaussian noise , shot noise and impulse noise ( Laugros et al. , 2019 ) . While , in our work we train and test on six different natural perturbations covering the breadth of styles of natural perturbations . Furthermore , instead of selecting different perturbation levels randomly we standardize their effect by dropping the accuracy of the network to a fix level for fair comparison among them . Finally , rather than testing vanilla networks , we propose to robustify the networks with natural perturbations and test them for both adversarial and natural perturbations . General Robustness with Adversarial and Natural Perturbations . Ford et al . ( 2019 ) established the close connections between adversarial robustness and natural perturbations robustness and suggested that adversarial and natural perturbations robustness should go hand in hand and networks should be robustified against both of them . In another similar line of work Kang et al . ( 2019 ) ; Engstrom et al . ( 2019 ) , proposed natural perturbations based adversarial attacks and showed that testing with only one type of adversarial perturbations does not tell about the complete robustness of the network . We focus on determining the general robustness of neural network classifiers by testing them against unseen adversarial and natural perturbations . Rusak et al . ( 2020 ) focus on robustification against natural corruptions besides adversarial perturbations . They utilize Gaussian and speckle noise and show that by augmenting the properly tuned training of a network with Gaussian noise makes it generalizable to unseen natural perturbations . However , in this work we show that elastic , wave and occlusion perturbations surpass the robustness with Gaussian noise . Laugros et al . ( 2019 ) study the relationship between adversarial and natural perturbations . However , they do not study elastic and wave transforms . Furthermore , they generate adversarial examples by randomly selecting parameters but we select the parameters of both natural and adversarial perturbations by standardizing the effect of perturbations . So , their results contrast with ours . They also do not evaluate the performance of robustified networks on clean images . 3 METHOD . Given the nth input image xn ∈ R2 , and the output class yn ∈ N , a standard classifier f ( xn ) = yn predicts the class . In the real world , inputs of the classifiers may deviate from the learning set , whose members will be referred to as clean images . As representatives of the perturbed images we consider sets of naturally occurring perturbations ζtn and adversarial perturbations ζ A n for the purpose of enhancing the robustness of the classifier . Constructing Adversarial Perturbations . Adversarial examples satisfy two properties 1 ) the class for the perturbed image is different from the class predicted for clean image i.e . f ( ζAn ( xn ) ) 6= f ( xn ) , 2 ) they are visually similar and their similarity is determined by the lp- norm . While fulfilling these two properties we follow the standard procedure of the basic iterative method Kurakin et al . ( 2016 ) to introduce adversarial perturbations ζAn ( xn ) in the images by finding the perturbation δn with a small norm l∞ bounded by such that , f ( xn ) 6= f ( ζAn ( xn ) ) , where ζAn = xn + δn and δn ≤ . The equation to be optimized is given as ζAn ( x 0 n ) = xn + δ ( 1 ) ζAn ( x k+1 n ) = ζ A n ( x k n ) + sSign ( 5x ( Lδr ( ζAn ( xkn ) , yn , θ ) ) ( 2 ) where , s is the step size at step k. Constructing Natural Perturbations . For natural perturbations we also restrict them to satisfy two properties 1 ) the overall drop in the performance of a classifier is the same as the drop with the adversarial perturbations for comparison among them , 2 ) they are visually similar enough to be correctly classified by humans . We consider a set of naturally occurring perturbations ζtn , where t ∈ { E , O , N , W , S , B } denotes the type of perturbation operator . We construct images ζtn ( xn ) by selecting a perturbation operator from t. When tested on a standard classifier , the perturbation will cause a drop in the performance . Selected samples of the six natural perturbations are shown in the Figure . 1 . The first natural perturbation is Elastic deformation ζE . Elastic deformation appears in small changes in the viewing angles . We introduce this perturbation by ζE = T ( xn , αx′n ~ N ( µ , σ2 ) ) , where , x′ ∈ rand ( −1 , +1 ) , selects random number between −1 and +1 , generated with a uniform distribution and T is the affine transform . Occlusion is created with ζO = min ( xn , bxc , t , r ) , where , b is a matrix of zeros with xc as its center and t , r being the thickness and radius of the circle respectively . Gaussian noise is introduced using ζN ( xn ) = xn + x N ( µ , σ2 ) n . A Wave transform is introduced in the images through ζW = xn 7−→ ( xn + sin ( 2πxnw ) ) , where , 7−→ is a shift operator . Saturation is added by using ζS = ( 1 − α ) x′ + αxn , where , α ∈ [ 0 , 1 ] , x′ is the black and white version of xn . Gaussian blur ζB is added by convolving a two dimensional Gaussian function to the image . Although these natural perturbations are class agnostic however , they are image specific that is , the perturbation for each image is different . For elastic transform the intensity of the transform is varied , in the occlusion the position of occlusion is randomly selected for each image , intensity of Gaussian noise is varied uniformly at random , wave is also scaled uniformly at random for each image , similarly saturation factor is also uniformly selected and finally , the intensity of Gaussian blur is uniformly randomly sampled for each image . Fair Comparison . To permit the fair comparison between natural and adversarial perturbations , instead of selecting perturbations randomly at different levels of intensity to normalize the impact of study we propose robustification level α which allows us to select the parameters of all perturbations such that , the performance drops to a specific level for all the perturbations i.e . # of { f ( xn ) 6=f ( ζtn ( xn ) ) } # of { xn } = α . | In this paper, the authors evaluate the performance of classifiers trained and then later tested on both adversarially generated perturbations as well as more natural perturbations. By considering six different natural perturbations, they show empirically that natural perturbations can improve performance against clean and adversarially-perturbed images. They also show that adversarial training does not improve performance on unseen natural transformations. | SP:6cadee7608c7194037b971dcec3115929aa5e4fe |
Adversarial and Natural Perturbations for General Robustness | 1 INTRODUCTION . A large body of work in computer vision and machine learning research focuses on studying the robustness of neural networks against adversarial perturbations ( Kurakin et al. , 2016 ; Goodfellow et al. , 2014 ; Carlini & Wagner , 2017 ) . Various defense based methods have also been proposed against these adversarial perturbations ( Goodfellow et al. , 2014 ; Madry et al. , 2017 ; Zhang et al. , 2019b ; Song et al. , 2019 ) . Concurrently , research also shows that deep neural networks are not even robust to small random perturbations e.g . Gaussian noise , small rotations and translations ( Dodge & Karam , 2017 ; Fawzi & Frossard , 2015 ; Kanbak et al. , 2018 ) . There is plenty of research being performed in the domain of adversarial perturbations however , there is very little focus on robustifying the networks against natural perturbations as we do here . Furthermore , adversarial perturbations are difficult to be found in the real world , and naturally occuring perturbations are of different nature than these pixel based perturbations . Therefore , in this paper we consider natural perturbations of six different styles that are elastic , occlusion , Gaussian noise , wave , saturation , and Gaussian blur . In this , “ elastic ” denotes a random sheer transformation applied to the image , “ occlusion ” is a large randomly located dot in the image and “ wave ” is a random geometric distortion applied to the image . Additionally , there is no consensus about whether adversarial robustness helps against natural perturbations . Zhang & Zhu ( 2019 ) showed that adversarial training reduces texture bias . However , Engstrom et al . ( 2019 ) demonstrated that l∞ based robustness does not generalize to natural transformations like rotations and translations . Here we evaluate whether adversarial training helps against natural perturbations and vice versa . Besides the robustness of the neural networks against natural and adversarial perturbations there is an open debate in the literature about the trade-off between the robustness and the accuracy ( Tsipras et al. , 2018 ; Zhang et al. , 2019a ; Su et al. , 2018 ) . Contrasting with adversarial training we found that networks partially trained with naturally perturbed images does not degrade the classification performance on the clean images . On the CIFAR-10 dataset , we even found that partial training with naturally perturbed images improves the classification accuracy for clean images . Given that deep neural networks are on par in performance with humans or they even surpass humans on clean images however , they fail to perform well on small natural perturbations ( He et al. , 2016 ; Dodge & Karam , 2017 ) . Hendrycks & Dietterich ( 2019 ) introduced a subset of Imagenet Deng et al . ( 2009 ) called Imagenet-C with corruptions applied on images from Imagenet . Although in Imagenet-C each corruption has five severity levels however they are not standardized for comparison among them . We standardize the effect of perturbations on training data to a fixed drop in classification accuracy of the test set , through this we allow for a fair comparison between different styles of training to retain robustness in the classifier against perturbations . We also normalize the performance of the network on different datasets to compare the robustness of the network for different datasets . We conduct 320 experiments on five different datasets for adversarial and six different natural perturbations . General robustness is the most desired case given as , the robustness against perturbations not seen during the training of the classifier . Hence , we evaluate the general robustness of networks by testing them on seen perturbations i.e . when the training and testing type of perturbations is the same , as well as on unseen perturbations i.e . when the training and testing type of perturbations are different . Among classifiers tested on the both seen and unseen perturbations , the natural perturbations of elastic , wave and occlusion come out on top compared to other natural perturbations as well as compared to adversarial perturbations . Our contributions are given as follows : i ) We perform fair evaluation of robustness . ii ) We show that , natural perturbation robust classifiers generalize to clean images . iii ) We depict that , seen natural perturbations are more robust than seen adversarial perturbations . iv ) Our evaluation for general robustness shows natural elastic , wave and occlusion perturbations are best robust against unseen perturbations . 2 RELATED WORK . Robustness with Adversarial or Natural Perturbations . In Goodfellow et al . ( 2014 ) the robustness of neural networks was demonstrated by adding imperceptible i.e . adversarial perturbations in the input to the degree that it will misclassify the input into the wrong class . To solve the problem Carlini & Wagner ( 2017 ) proposed adversarial training ( AT ) procedure that is by training the network on adversarially perturbed images networks can be robustified against these perturbations . In this work we employ a strong yet undefended attack “ basic iterative method ( BIM ) ” to generate adversarial examples . “ Projected gradient descent ( PGD ) ” a state of the art defense technique for adversarial training to evaluate its effectiveness compared to other ways of robustification . Zhang et al . ( 2019a ) ; Tsipras et al . ( 2018 ) questioned the generalization capability of adversarially trained neural networks on the clean images and showed that with the increase in adversarial robustness the accuracy of the networks on clean images drops . Therefore , we evaluate the performance of adversarially trained networks on clean , adversarial as well as natural perturbations , and compare them with networks trained with natural perturbations . Hendrycks & Dietterich ( 2019 ) focused on testing the robustness of vanilla neural networks on 15 different natural perturbations with different perturbation levels . We observe that some of their perturbations are correlated e.g . Gaussian noise , shot noise and impulse noise ( Laugros et al. , 2019 ) . While , in our work we train and test on six different natural perturbations covering the breadth of styles of natural perturbations . Furthermore , instead of selecting different perturbation levels randomly we standardize their effect by dropping the accuracy of the network to a fix level for fair comparison among them . Finally , rather than testing vanilla networks , we propose to robustify the networks with natural perturbations and test them for both adversarial and natural perturbations . General Robustness with Adversarial and Natural Perturbations . Ford et al . ( 2019 ) established the close connections between adversarial robustness and natural perturbations robustness and suggested that adversarial and natural perturbations robustness should go hand in hand and networks should be robustified against both of them . In another similar line of work Kang et al . ( 2019 ) ; Engstrom et al . ( 2019 ) , proposed natural perturbations based adversarial attacks and showed that testing with only one type of adversarial perturbations does not tell about the complete robustness of the network . We focus on determining the general robustness of neural network classifiers by testing them against unseen adversarial and natural perturbations . Rusak et al . ( 2020 ) focus on robustification against natural corruptions besides adversarial perturbations . They utilize Gaussian and speckle noise and show that by augmenting the properly tuned training of a network with Gaussian noise makes it generalizable to unseen natural perturbations . However , in this work we show that elastic , wave and occlusion perturbations surpass the robustness with Gaussian noise . Laugros et al . ( 2019 ) study the relationship between adversarial and natural perturbations . However , they do not study elastic and wave transforms . Furthermore , they generate adversarial examples by randomly selecting parameters but we select the parameters of both natural and adversarial perturbations by standardizing the effect of perturbations . So , their results contrast with ours . They also do not evaluate the performance of robustified networks on clean images . 3 METHOD . Given the nth input image xn ∈ R2 , and the output class yn ∈ N , a standard classifier f ( xn ) = yn predicts the class . In the real world , inputs of the classifiers may deviate from the learning set , whose members will be referred to as clean images . As representatives of the perturbed images we consider sets of naturally occurring perturbations ζtn and adversarial perturbations ζ A n for the purpose of enhancing the robustness of the classifier . Constructing Adversarial Perturbations . Adversarial examples satisfy two properties 1 ) the class for the perturbed image is different from the class predicted for clean image i.e . f ( ζAn ( xn ) ) 6= f ( xn ) , 2 ) they are visually similar and their similarity is determined by the lp- norm . While fulfilling these two properties we follow the standard procedure of the basic iterative method Kurakin et al . ( 2016 ) to introduce adversarial perturbations ζAn ( xn ) in the images by finding the perturbation δn with a small norm l∞ bounded by such that , f ( xn ) 6= f ( ζAn ( xn ) ) , where ζAn = xn + δn and δn ≤ . The equation to be optimized is given as ζAn ( x 0 n ) = xn + δ ( 1 ) ζAn ( x k+1 n ) = ζ A n ( x k n ) + sSign ( 5x ( Lδr ( ζAn ( xkn ) , yn , θ ) ) ( 2 ) where , s is the step size at step k. Constructing Natural Perturbations . For natural perturbations we also restrict them to satisfy two properties 1 ) the overall drop in the performance of a classifier is the same as the drop with the adversarial perturbations for comparison among them , 2 ) they are visually similar enough to be correctly classified by humans . We consider a set of naturally occurring perturbations ζtn , where t ∈ { E , O , N , W , S , B } denotes the type of perturbation operator . We construct images ζtn ( xn ) by selecting a perturbation operator from t. When tested on a standard classifier , the perturbation will cause a drop in the performance . Selected samples of the six natural perturbations are shown in the Figure . 1 . The first natural perturbation is Elastic deformation ζE . Elastic deformation appears in small changes in the viewing angles . We introduce this perturbation by ζE = T ( xn , αx′n ~ N ( µ , σ2 ) ) , where , x′ ∈ rand ( −1 , +1 ) , selects random number between −1 and +1 , generated with a uniform distribution and T is the affine transform . Occlusion is created with ζO = min ( xn , bxc , t , r ) , where , b is a matrix of zeros with xc as its center and t , r being the thickness and radius of the circle respectively . Gaussian noise is introduced using ζN ( xn ) = xn + x N ( µ , σ2 ) n . A Wave transform is introduced in the images through ζW = xn 7−→ ( xn + sin ( 2πxnw ) ) , where , 7−→ is a shift operator . Saturation is added by using ζS = ( 1 − α ) x′ + αxn , where , α ∈ [ 0 , 1 ] , x′ is the black and white version of xn . Gaussian blur ζB is added by convolving a two dimensional Gaussian function to the image . Although these natural perturbations are class agnostic however , they are image specific that is , the perturbation for each image is different . For elastic transform the intensity of the transform is varied , in the occlusion the position of occlusion is randomly selected for each image , intensity of Gaussian noise is varied uniformly at random , wave is also scaled uniformly at random for each image , similarly saturation factor is also uniformly selected and finally , the intensity of Gaussian blur is uniformly randomly sampled for each image . Fair Comparison . To permit the fair comparison between natural and adversarial perturbations , instead of selecting perturbations randomly at different levels of intensity to normalize the impact of study we propose robustification level α which allows us to select the parameters of all perturbations such that , the performance drops to a specific level for all the perturbations i.e . # of { f ( xn ) 6=f ( ζtn ( xn ) ) } # of { xn } = α . | This paper studies the effect of “robustification” (i.e., adversarial training or data augmentation) of models on the accuracy to seen and unseen perturbations. The authors propose a technique to “standardize” the robustification process across different perturbations. They evaluate their approach on several datasets, highlighting how standardization yields different insights compared to prior work. | SP:6cadee7608c7194037b971dcec3115929aa5e4fe |
Effective Abstract Reasoning with Dual-Contrast Network | EFFECTIVE ABSTRACT REASONING WITH DUAL-CONTRAST NETWORK Tao Zhuo , Mohan Kankanhalli School of Computing , National University of Singapore zhuotao @ nus.edu.sg , mohan @ comp.nus.edu.sg ABSTRACT As a step towards improving the abstract reasoning capability of machines , we aim to solve Raven ’ s Progressive Matrices ( RPM ) with neural networks , since solving RPM puzzles is highly correlated with human intelligence . Unlike previous methods that use auxiliary annotations or assume hidden rules to produce appropriate feature representation , we only use the ground truth answer of each question for model learning , aiming for an intelligent agent to have a strong learning capability with a small amount of supervision . Based on the RPM problem formulation , the correct answer filled into the missing entry of the third row/column has to best satisfy the same rules shared between the first two rows/columns . Thus we design a simple yet effective Dual-Contrast Network ( DCNet ) to exploit the inherent structure of RPM puzzles . Specifically , a rule contrast module is designed to compare the latent rules between the filled row/column and the first two rows/columns ; a choice contrast module is designed to increase the relative differences between candidate choices . Experimental results on the RAVEN and PGM datasets show that DCNet outperforms the state-of-the-art methods by a large margin of 5.77 % . Further experiments on few training samples and model generalization also show the effectiveness of DCNet . Code is available at https : //github.com/visiontao/dcnet . 1 INTRODUCTION . Abstract reasoning capability is a critical component of human intelligence , which relates to the ability of understanding and interpreting patterns , and further solving problems . Recently , as a step towards improving the abstract reasoning ability of machines , many methods ( Santoro et al. , 2018 ; Zhang et al. , 2019a ; b ; Zheng et al. , 2019 ; Zhuo & Kankanhalli , 2020 ) are developed to solve Raven ’ s Progress Matrices ( RPM ) ( Domino & Domino , 2006 ; Raven & Court , 1938 ) , since it is widely believed that RPM lies at the heart of human intelligence . As the example shown in Figure 1 , given a 3× 3 problem matrix with a final missing piece , the test taker has to find the logical rules shared between the first two rows or columns , and then pick the correct answer from 8 candidate choices to best complete the matrix . Since the logical rules hidden in RPM questions are complex and unknown , solving RPM with machines remains a challenging task . As described in ( Carpenter et al. , 1990 ) , the logical rules applied in a RPM question are manifested as visual structures . For a single image in the question , the logical rules could consist of several basic attributes , e.g. , shape , color , size , number , and position . For the images in a row or column , the logical rules could be applied row-wise or column-wise and formulated with an unknown relationship , e.g. , AND , OR , XOR , and so on ( Santoro et al. , 2018 ; Zhang et al. , 2019a ) . If we can extract the explicit rules of each question , the problem can be easily solved by using a heuristicsbased search method ( Zhang et al. , 2019a ) . However , given an arbitrary RPM question , the logical rules are unknown . What ’ s worse - even the number of rules is unknown . As a result , an intelligent machine needs to simultaneously learn the representation of these hidden rules and find the correct answer to satisfy all of the applied rules . With the success of deep learning in computer vision , solving RPM puzzles with neural networks has become popular . Because the learned features might be inconsistent with the logical rules , many supervised learning methods , e.g. , DRT ( Zhang et al. , 2019a ) , WReN ( Santoro et al. , 2018 ) and LEN ( Zheng et al. , 2019 ) , MXGNet ( Wang et al. , 2020 ) and ACL ( Kim et al. , 2020 ) , not only use the ground truth answer of each RPM question but also the auxiliary annotations ( such as logical rules with shape , size , color , number , AND , OR , XOR ) to learn the appropriate feature representation . Although auxiliary annotations provide lots of priors about how the logical rules are applied , noticeable performance improvement is not always obtained on different RPM problems , such as in the results reported in Table 1 . Moreover , such a learning strategy requires additional supervision . When auxiliary annotations are not available , it will fail to boost the performance . For example , DRT ( Zhang et al. , 2019a ) can not be applied to PGM dataset ( Santoro et al. , 2018 ) for the lack of structure annotations . To overcome the constraint of using auxiliary annotations , a recent method CoPINet ( Zhang et al. , 2019b ) only uses the ground truth answer of each question . Meanwhile , to produce the feature representation of hidden rules , CoPINet assumes there are at most N attributes in each problem , and each of which is subject to the governance of M rules . However , due to N and M being unknown for arbitrary RPM problems , such an assumption is still too strong . In this work , we aim to learn the abstract reasoning model by using only the ground truth answer of each question , and there is not any assumption about the latent rules . According to the RPM problem formulation ( Carpenter et al. , 1990 ) , it can be concluded that finding the correct answer of a RPM puzzle mainly depends on two contrasts of rules : ( 1 ) compare the hidden rules between the filled row/column and the first two rows/columns to check whether they are the same rules ; ( 2 ) compare all candidate choices to check which one best satisfies the hidden rules . Unlike making specific assumptions about latent rules that are only valid for particular cases , the above two contrasts are general properties of all RPM problems . Considering above two contrasts , we propose a simple yet effective Dual-Contrast Network ( DCNet ) to solve RPM problems . Specifically , a rule contrast module is used to compute the difference between the filled row/column and the first two rows/columns , which checks the difference between latent rules . Additionally , the second choice contrast module is used to increase the relative differences of all candidate choices , which helps find the correct answer when confusingly similar choices exist . Experiments on two major benchmark datasets demonstrate the effectiveness of our method . In summary , our main contributions are as follows : • We propose a new abstract reasoning model on RPM with only ground truth answers , i.e . there are not any assumptions or auxiliary annotations about the latent rules . Compared to previous methods , the problem setting of our method is more challenging , as we aim for an intelligent agent to learn a strong model with a small amount of supervision . • We propose a simple yet effective Dual-Contrast Network ( DCNet ) that consists of a rule contrast module and a choice contrast module . By exploiting the inherent structures of each RPM with basic problem formulation , robust feature representation can be learned . • Experimental results on RAVEN ( Zhang et al. , 2019a ) and PGM ( Santoro et al. , 2018 ) datasets show that our DCNet significantly improves the average accuracy by a large margin of 5.77 % . Moreover , from the perspective of few-shot learning , DCNet outperforms the state-of-the-art method CoPINet ( Zhang et al. , 2019b ) by a noticeable margin when few training samples are provided , see Table 3 and 4 . Further experiments on model generalization also show the effectiveness of our method , see Table 5 and 6 . 2 RELATED WORK . 2.1 VISUAL REASONING . One of the most popular visual reasoning tasks is Visual Question Answering ( VQA ) ( Antol et al. , 2015 ; Zellers et al. , 2019 ; Fan et al. , 2020 ) . To aid in the diagnostic evaluation of VQA systems , Johnson et al . ( 2017 ) designed a CLEVR dataset by minimizing bias and providing rich ground-truth representations for both images and questions . It is expected that rich diagnostics could help better understand the visual reasoning capabilities of VQA systems . Recently , to understand the human actions in videos , Zhou et al . ( 2018 ) proposed a temporal relational reasoning network to learn and reason about temporal dependencies between video frames at multiple time scales . Besides , for explainable video action reasoning , Zhuo et al . ( 2019 ) proposed to explain performed actions by recognizing the semantic-level state changes from a spatio-temporal video graph with pre-defined rules . Different from these visual tasks , solving RPM puzzles depends on sophisticated logical rules acquiring human intelligence ( Raven & Court , 1938 ; Santoro et al. , 2018 ; Zhang et al. , 2019a ) . Therefore , it is expected that solving RPM problems with machines could help better understand and perhaps improve the abstract reasoning ability of contemporary computer vision systems . 2.2 COMPUTATIONAL MODELS ON RPM . The early methods on RPM ( McGreggor & Goel , 2014 ; McGreggor et al. , 2014 ; Mekik et al. , 2018 ) often compute the feature similarity of images with a hand-crafted representation . Besides , structural affinity ( Shegheva & Goel , 2018 ) with graphical models are also used in RPM problems . Due to the lack of large-scale dataset , the early methods are only evaluated on a small dataset . Recently , with the introduction of deep learning in pattern recognition ( Deng et al. , 2009 ) , solving RPM with deep neural networks has becomes the main approach . For automatic RPM generation , Wang & Su ( 2015 ) introduced an abstract representation method for RPM by using the first-order logic formulae , and they applied three categories of relations ( i.e . unary , binary , and ternary ) . Hoshen & Werman ( 2017 ) first trained a CNN model to measure the IQ of neural networks in a simplistic evaluation environment . Santoro et al . ( 2018 ) measured the abstract reasoning capability of machines with several popular neural networks , such as LSTM , ResNet and Wild-ResNet . Besides , Zhuo & Kankanhalli ( 2020 ) studied the effect of ImageNet pre-training ( Deng et al. , 2009 ) for RPM problems and proposed a novel unsupervised abstract reasoning method by designing a pseudo target . To further improve the feature representation with auxiliary annotations , Santoro et al . ( 2018 ) proposed a WReN network that formulates pair-wise relations between the problem matrix and each individual choice in embedding space , independent of the other choices . Zhang et al . ( 2019a ) generated a RAVEN dataset with the structure annotations for each RPM problem and proposed a Dynamic Residual Tree ( DRT ) method . In addition , Zheng et al . ( 2019 ) proposed a Logic Embedding Network ( LEN ) with distracting features , which also uses the auxiliary annotations to boost the performance and designed a teacher model to control the learning trajectories . MXGNet ( Wang et al. , 2020 ) is a multi-layer graph neural network for multi-panel diagrammatic reasoning tasks . For better performance , MXGNet also uses auxiliary annotations for model training . ACL ( Kim et al. , 2020 ) uses symbolic labels to generate new RPMs with the same problem semantics but with different attributes ( e.g. , shapes and colors ) . Discarding the use of auxiliary annotations , CoPINet ( Zhang et al. , 2019b ) only utilizes the ground truth answer of each RPM question . By combining contrasting , perceptual inference , and permutation invariance , CoPINet achieves the state-of-the-art performance . However , it assumes the maximum number of attributes and rules is known . Different from the “ objective-level contrast ” in ( Zhang et al. , 2019b ) that treats the complete problem matrix ( 9 images , including a filling choice ) as an object for comparison , our model consists of a rule contrast module and a choice contrast module and we only compare the features of different rows/columns ( 3 images ) . Thus our method is more effective to exploit the inherent structure of RPM on rows/columns . Moreover , no assumptions about attributes and number of rules are made . | The paper proposes a neural network based approach called Dual-Contrast Network (DCNet) to solve Raven’s Progressive Matrices (RPM). The approach consists of a rule contrast module that compares the latent rules between the unfilled (third) row/column and the filled (first and second) rows/columns, a choice contrast module that helps in picking the correct choice among the given eight choices, and finally uses a 2-layer MLP to predict scores for the choices. Different from previous approaches, the only supervision used in the proposed approach is the ground-truth choice. The approach achieves state-of-the-art performance on RAVEN and PGM datasets. | SP:1da35440d501c36cb1a46e431a3d9de0288933c8 |
Effective Abstract Reasoning with Dual-Contrast Network | EFFECTIVE ABSTRACT REASONING WITH DUAL-CONTRAST NETWORK Tao Zhuo , Mohan Kankanhalli School of Computing , National University of Singapore zhuotao @ nus.edu.sg , mohan @ comp.nus.edu.sg ABSTRACT As a step towards improving the abstract reasoning capability of machines , we aim to solve Raven ’ s Progressive Matrices ( RPM ) with neural networks , since solving RPM puzzles is highly correlated with human intelligence . Unlike previous methods that use auxiliary annotations or assume hidden rules to produce appropriate feature representation , we only use the ground truth answer of each question for model learning , aiming for an intelligent agent to have a strong learning capability with a small amount of supervision . Based on the RPM problem formulation , the correct answer filled into the missing entry of the third row/column has to best satisfy the same rules shared between the first two rows/columns . Thus we design a simple yet effective Dual-Contrast Network ( DCNet ) to exploit the inherent structure of RPM puzzles . Specifically , a rule contrast module is designed to compare the latent rules between the filled row/column and the first two rows/columns ; a choice contrast module is designed to increase the relative differences between candidate choices . Experimental results on the RAVEN and PGM datasets show that DCNet outperforms the state-of-the-art methods by a large margin of 5.77 % . Further experiments on few training samples and model generalization also show the effectiveness of DCNet . Code is available at https : //github.com/visiontao/dcnet . 1 INTRODUCTION . Abstract reasoning capability is a critical component of human intelligence , which relates to the ability of understanding and interpreting patterns , and further solving problems . Recently , as a step towards improving the abstract reasoning ability of machines , many methods ( Santoro et al. , 2018 ; Zhang et al. , 2019a ; b ; Zheng et al. , 2019 ; Zhuo & Kankanhalli , 2020 ) are developed to solve Raven ’ s Progress Matrices ( RPM ) ( Domino & Domino , 2006 ; Raven & Court , 1938 ) , since it is widely believed that RPM lies at the heart of human intelligence . As the example shown in Figure 1 , given a 3× 3 problem matrix with a final missing piece , the test taker has to find the logical rules shared between the first two rows or columns , and then pick the correct answer from 8 candidate choices to best complete the matrix . Since the logical rules hidden in RPM questions are complex and unknown , solving RPM with machines remains a challenging task . As described in ( Carpenter et al. , 1990 ) , the logical rules applied in a RPM question are manifested as visual structures . For a single image in the question , the logical rules could consist of several basic attributes , e.g. , shape , color , size , number , and position . For the images in a row or column , the logical rules could be applied row-wise or column-wise and formulated with an unknown relationship , e.g. , AND , OR , XOR , and so on ( Santoro et al. , 2018 ; Zhang et al. , 2019a ) . If we can extract the explicit rules of each question , the problem can be easily solved by using a heuristicsbased search method ( Zhang et al. , 2019a ) . However , given an arbitrary RPM question , the logical rules are unknown . What ’ s worse - even the number of rules is unknown . As a result , an intelligent machine needs to simultaneously learn the representation of these hidden rules and find the correct answer to satisfy all of the applied rules . With the success of deep learning in computer vision , solving RPM puzzles with neural networks has become popular . Because the learned features might be inconsistent with the logical rules , many supervised learning methods , e.g. , DRT ( Zhang et al. , 2019a ) , WReN ( Santoro et al. , 2018 ) and LEN ( Zheng et al. , 2019 ) , MXGNet ( Wang et al. , 2020 ) and ACL ( Kim et al. , 2020 ) , not only use the ground truth answer of each RPM question but also the auxiliary annotations ( such as logical rules with shape , size , color , number , AND , OR , XOR ) to learn the appropriate feature representation . Although auxiliary annotations provide lots of priors about how the logical rules are applied , noticeable performance improvement is not always obtained on different RPM problems , such as in the results reported in Table 1 . Moreover , such a learning strategy requires additional supervision . When auxiliary annotations are not available , it will fail to boost the performance . For example , DRT ( Zhang et al. , 2019a ) can not be applied to PGM dataset ( Santoro et al. , 2018 ) for the lack of structure annotations . To overcome the constraint of using auxiliary annotations , a recent method CoPINet ( Zhang et al. , 2019b ) only uses the ground truth answer of each question . Meanwhile , to produce the feature representation of hidden rules , CoPINet assumes there are at most N attributes in each problem , and each of which is subject to the governance of M rules . However , due to N and M being unknown for arbitrary RPM problems , such an assumption is still too strong . In this work , we aim to learn the abstract reasoning model by using only the ground truth answer of each question , and there is not any assumption about the latent rules . According to the RPM problem formulation ( Carpenter et al. , 1990 ) , it can be concluded that finding the correct answer of a RPM puzzle mainly depends on two contrasts of rules : ( 1 ) compare the hidden rules between the filled row/column and the first two rows/columns to check whether they are the same rules ; ( 2 ) compare all candidate choices to check which one best satisfies the hidden rules . Unlike making specific assumptions about latent rules that are only valid for particular cases , the above two contrasts are general properties of all RPM problems . Considering above two contrasts , we propose a simple yet effective Dual-Contrast Network ( DCNet ) to solve RPM problems . Specifically , a rule contrast module is used to compute the difference between the filled row/column and the first two rows/columns , which checks the difference between latent rules . Additionally , the second choice contrast module is used to increase the relative differences of all candidate choices , which helps find the correct answer when confusingly similar choices exist . Experiments on two major benchmark datasets demonstrate the effectiveness of our method . In summary , our main contributions are as follows : • We propose a new abstract reasoning model on RPM with only ground truth answers , i.e . there are not any assumptions or auxiliary annotations about the latent rules . Compared to previous methods , the problem setting of our method is more challenging , as we aim for an intelligent agent to learn a strong model with a small amount of supervision . • We propose a simple yet effective Dual-Contrast Network ( DCNet ) that consists of a rule contrast module and a choice contrast module . By exploiting the inherent structures of each RPM with basic problem formulation , robust feature representation can be learned . • Experimental results on RAVEN ( Zhang et al. , 2019a ) and PGM ( Santoro et al. , 2018 ) datasets show that our DCNet significantly improves the average accuracy by a large margin of 5.77 % . Moreover , from the perspective of few-shot learning , DCNet outperforms the state-of-the-art method CoPINet ( Zhang et al. , 2019b ) by a noticeable margin when few training samples are provided , see Table 3 and 4 . Further experiments on model generalization also show the effectiveness of our method , see Table 5 and 6 . 2 RELATED WORK . 2.1 VISUAL REASONING . One of the most popular visual reasoning tasks is Visual Question Answering ( VQA ) ( Antol et al. , 2015 ; Zellers et al. , 2019 ; Fan et al. , 2020 ) . To aid in the diagnostic evaluation of VQA systems , Johnson et al . ( 2017 ) designed a CLEVR dataset by minimizing bias and providing rich ground-truth representations for both images and questions . It is expected that rich diagnostics could help better understand the visual reasoning capabilities of VQA systems . Recently , to understand the human actions in videos , Zhou et al . ( 2018 ) proposed a temporal relational reasoning network to learn and reason about temporal dependencies between video frames at multiple time scales . Besides , for explainable video action reasoning , Zhuo et al . ( 2019 ) proposed to explain performed actions by recognizing the semantic-level state changes from a spatio-temporal video graph with pre-defined rules . Different from these visual tasks , solving RPM puzzles depends on sophisticated logical rules acquiring human intelligence ( Raven & Court , 1938 ; Santoro et al. , 2018 ; Zhang et al. , 2019a ) . Therefore , it is expected that solving RPM problems with machines could help better understand and perhaps improve the abstract reasoning ability of contemporary computer vision systems . 2.2 COMPUTATIONAL MODELS ON RPM . The early methods on RPM ( McGreggor & Goel , 2014 ; McGreggor et al. , 2014 ; Mekik et al. , 2018 ) often compute the feature similarity of images with a hand-crafted representation . Besides , structural affinity ( Shegheva & Goel , 2018 ) with graphical models are also used in RPM problems . Due to the lack of large-scale dataset , the early methods are only evaluated on a small dataset . Recently , with the introduction of deep learning in pattern recognition ( Deng et al. , 2009 ) , solving RPM with deep neural networks has becomes the main approach . For automatic RPM generation , Wang & Su ( 2015 ) introduced an abstract representation method for RPM by using the first-order logic formulae , and they applied three categories of relations ( i.e . unary , binary , and ternary ) . Hoshen & Werman ( 2017 ) first trained a CNN model to measure the IQ of neural networks in a simplistic evaluation environment . Santoro et al . ( 2018 ) measured the abstract reasoning capability of machines with several popular neural networks , such as LSTM , ResNet and Wild-ResNet . Besides , Zhuo & Kankanhalli ( 2020 ) studied the effect of ImageNet pre-training ( Deng et al. , 2009 ) for RPM problems and proposed a novel unsupervised abstract reasoning method by designing a pseudo target . To further improve the feature representation with auxiliary annotations , Santoro et al . ( 2018 ) proposed a WReN network that formulates pair-wise relations between the problem matrix and each individual choice in embedding space , independent of the other choices . Zhang et al . ( 2019a ) generated a RAVEN dataset with the structure annotations for each RPM problem and proposed a Dynamic Residual Tree ( DRT ) method . In addition , Zheng et al . ( 2019 ) proposed a Logic Embedding Network ( LEN ) with distracting features , which also uses the auxiliary annotations to boost the performance and designed a teacher model to control the learning trajectories . MXGNet ( Wang et al. , 2020 ) is a multi-layer graph neural network for multi-panel diagrammatic reasoning tasks . For better performance , MXGNet also uses auxiliary annotations for model training . ACL ( Kim et al. , 2020 ) uses symbolic labels to generate new RPMs with the same problem semantics but with different attributes ( e.g. , shapes and colors ) . Discarding the use of auxiliary annotations , CoPINet ( Zhang et al. , 2019b ) only utilizes the ground truth answer of each RPM question . By combining contrasting , perceptual inference , and permutation invariance , CoPINet achieves the state-of-the-art performance . However , it assumes the maximum number of attributes and rules is known . Different from the “ objective-level contrast ” in ( Zhang et al. , 2019b ) that treats the complete problem matrix ( 9 images , including a filling choice ) as an object for comparison , our model consists of a rule contrast module and a choice contrast module and we only compare the features of different rows/columns ( 3 images ) . Thus our method is more effective to exploit the inherent structure of RPM on rows/columns . Moreover , no assumptions about attributes and number of rules are made . | The paper proposes a new approach for abstract reasoning and explores it in the context of the RPM task. In contrast to other competing approaches, the authors seek to build into the model as few assumptions as possible to keep the model general and not specific to the specific problem or to particular annotations or supervision signals. The general capability that they seek to incorporate into the model is the ability to effectively compare and contrast candidates in tasks that require choosing the best fit. | SP:1da35440d501c36cb1a46e431a3d9de0288933c8 |
Graph Edit Networks | 1 INTRODUCTION . Recent advances in graph representation learning have mostly focused on tasks of classification or regression , i.e . tasks with graph-structured input but numeric output ( Battaglia et al. , 2018 ; Kipf & Welling , 2016a ; Veličković et al. , 2018 ) . By contrast , few approaches to date can transform a graph-structured input to a graph-structured output ( Hajiramezanali et al. , 2019 ; Paaßen et al. , 2018 ; Zambon et al. , 2019 ) . This lacuna is crucial because time series prediction on graphs requires graphstructured output , namely the next graph in a time series . Applications of time series prediction on graphs include epidemiological models ( Keeling & Eames , 2005 ) , social ( Liben-Nowell & Kleinberg , 2007 ; Masuda & Holme , 2019 ) , telecommunications ( Nanavati et al. , 2006 ) , traffic ( Cui et al. , 2019 ) , citation ( Shibata et al. , 2012 ) , and financial transaction networks ( Chan & Olmsted , 2017 ) , as well as student solutions in intelligent tutoring systems ( Paaßen et al. , 2018 ) . In each of these settings , predicting the changes in graphs can deepen the understanding of the domain and provide useful knowledge for designing interventions . Currently , methods for time series prediction on graphs are limited to the dynamics of the node attributes ( Yu et al. , 2018 ) , or changes in connectivity ( Goyal et al. , 2020 ; Hajiramezanali et al. , 2019 ) , but do not cover changes in the node set . Fortunately , there exists a rich research tradition of edit distances ( e.g . Levenshtein , 1965 ; Zhang & Shasha , 1989 ; Sanfeliu & Fu , 1983 ) which can describe any change between two graphs . Further , edits are sparse and have a simple semantic ( delete , insert , relabel ) , which makes them easier to interpret for human observers and makes them computationally more efficient ( linear instead of quadratic ) compared to a dense representation . Finally , edits are local , enabling us to make edit decisions at each node instead of coordinating information across the entire graph . In this work , we connect graph neural networks to edit distances by developing a simple , linear output layer that maps node embeddings to graph edits . We call our output layer the graph edit network ( GEN ) . We also develop a general training and inference scheme to transform any graph Gt to its successor Gt+1 using only local binary edit decisions and a regression for node attributes . Theoretically , we prove that a ) a mapping between the nodes of Gt and Gt+1 is sufficient to construct training data for the GEN , b ) this construction yields almost no overhead compared to directly transforming the mapping to graph edits , and c ) provided that the mapping between Gt and Gt+1 is optimal and the GEN can perfectly reproduce the training data , the edit script is almost as short as the graph edit distance ( Sanfeliu & Fu , 1983 ) . In addition to this core theoretical contribution , we provide a proof-of-concept of our model by demonstrating that GENs can learn a variety of dynamical systems on graphs which are more difficult to handle for baseline systems from the literature . We also show that the sparsity of edits enables GENs to scale up to realistic graphs with thousands of nodes . 2 BACKGROUND . Graph Neural Networks : Graph neural networks ( GNNs ) compute representations of nodes in a graph by aggregating information of neighboring nodes ( Bacciu et al. , 2020 ; Defferrard et al. , 2016 ; Kipf & Welling , 2016a ; Micheli , 2009 ; Scarselli et al. , 2009 ) . In particular , the representation φl ( v ) ∈ Rnl of node v in layer l is computed as follows : φl ( v ) = f lmerge ( φl−1 ( v ) , f laggr ( { φl−1 ( u ) |u ∈ N ( v ) } ) ) ( 1 ) where N ( v ) is some neighborhood of v in the graph and f lmerge as well as f laggr are functions that aggregate the information of their arguments , returning a single vector ( Xu et al. , 2019 ) . The representation in the 0th layer is usually defined as the initial node attributes or a constant vector for all nodes ( Kipf & Welling , 2016a ) . Recently , many implementations of f lmerge , f l aggr , and neighborhood N have been suggested , such as a weighted sum via the graph Laplacian ( Kipf & Welling , 2016a ) , recurrent neural networks ( Hamilton et al. , 2017 ) , or attention mechanisms ( Veličković et al. , 2018 ) . Our approach is agnostic to the choice of graph neural network . We merely require some vectorial embedding for each node in the input graph . Graph Generators : Multiple works in recent years have proposed recurrent models to generate graphs ( Bacciu et al. , 2019 ; Li et al. , 2018 ; You et al. , 2018a ; b ; Zhang et al. , 2019 ) . Roughly speaking , these recurrent models first output a node , and then all connections of this node to previous nodes until a special end-of-sentence token is produced . While such a scheme does enable time series prediction , it only works for insertions , i.e . starting at an empty graph and inserting nodes and edges over time . If one wishes to account for general graph changes , one first has to encode a graph into a vector and then decode from this vector the graph in the next time step , similar to molecular design ( Jin et al. , 2019 ; Fu et al. , 2020 ) . However , such models have to generate the next graph from scratch and can not exploit the sparsity and interpretability of edits , as we suggest . Link Prediction : Link prediction is complementary to graph generation . It assumes a constant number of nodes , but changing connectivity between them ( Liben-Nowell & Kleinberg , 2007 ; Richard et al. , 2014 ; Shibata et al. , 2012 ) . Typical link prediction approaches compute node features first , followed by an affinity index between nodes based on their features . Finally , edges with low index are predicted to vanish , while edges with high index are predicted to appear . For example , Goyal et al . ( 2020 ) combine dense and recurrent blocks to build an autoencoder for link prediction , while Hajiramezanali et al . ( 2019 ) combine a GNN and a RNN to obtain a spatio-temporal variational graph autoencoder . In GENs , we predict edge changes with a similar scheme , using a graph neural network to obtain the node features and then mapping these node features to the graph changes . However , in contrast to prior work , we do not predict the next adjacency matrix but only the change in adjacencies , which is a much sparser signal , reducing the time complexity from quadratic to linear . Additionally , GENs can not only handle edge changes , but also node changes . We note that our current paper is limited to a Markovian setting , i.e . we do not consider the past for computing node representations . This limitation could be addressed by combining our output layer with EvolveGCN ( Pareja et al. , 2020 ) which uses a recurrent net to predict the weights of a graph neural net , thus being able to handle changes in the node set . Dynamic Attributes : Recently , graph neural networks have been extended to predict changes to node attributes , while the nodes and edges remain fixed ( Cui et al. , 2019 ; Seo et al. , 2018 ) , which is particularly useful for traffic networks . GENs are complementary to these works , in that we consider the more general case of graph topology changes . Time Series Prediction on Graphs : To our knowledge , only very few works to date have addressed the most general case of time series of graphs , where both nodes and edges are permitted to change . In particular , Paaßen et al . ( 2018 ) suggest several kernel-based time series prediction methods for graphs . However , their scheme is limited to predictions in the kernel space and mapping a prediction back to a graph requires solving an inverse kernel problem , relying on approximations that impact accuracy ( Paaßen et al. , 2018 ) . Zambon et al . ( 2019 ) embed the time series into a vector space using a GNN and use a recurrent neural network to predict the next time step . To obtain the corresponding graph , a multi-layer perceptron is used to compute the adjacency matrix and node features from the predicted embedding . Besides being computationally expensive , this dense decoder also assumes a fixed order of the nodes . Graph Edits : The basis for our approach are graph edits , which are functions that describe changes in graphs ( Sanfeliu & Fu , 1983 ) . Formally , we first define an attributed , directed graph as a triple G = ( V , E , X ) , where V = { 1 , . . . , N } is a finite set of node indices , E ⊆ V × V is a set of edges , and X ∈ RN×n is a matrix of node attributes for some n ∈ N. We define the nodes as indices for notational simplicity , but we do not assume any specific order , i.e . we treat isomorphic graphs as the same . Now , let G be the set of all possible attributed directed graphs . We define a graph edit as some function δ : G → G. In particular , we consider the graph edits of Sanfeliu & Fu ( 1983 ) , namely node deletions deli , which delete the ith node from a graph , node replacements repi , x , which set the attribute of node i to x , node insertions insx , which add a new node with attribute x to a graph , edge deletions edeli , j , which delete the edge ( i , j ) from a graph , and edge insertions einsi , j , which insert the edge ( i , j ) into a graph . We then define an edit script δ̄ as a finite sequence δ̄ = δ1 , . . . , δT of graph edits and we define the application of δ̄ as the composition of all edits , i.e . δ̄ ( G ) : = δT ◦ . . . ◦ δ1 ( G ) . Finally , we define the graph edit distance dGED ( G , G′ ) between two graphs G and G′ as the length of the shortest script δ̄ such that δ̄ ( G ) ∼= G′ , where∼= means isomorphic . The GED is well-defined and a proper metric , i.e . a script connecting any two graphs always exists , the GED between two isomorphic graphs is zero , the GED is symmetric , and it conforms to the triangular inequality ( Abu-Aisheh et al. , 2015 ; Sanfeliu & Fu , 1983 ) . While prior work has already attempted to approximate the graph edit distance with graph neural nets ( Bai et al. , 2019 ; Li et al. , 2019 ) our work is , to our knowledge , the first to produce actual graph edits as network output , and to avoid graph pooling layers . | Graph Editing is a prominent research area which overlaps a variety of fields in computer science. As a typical example, a series of graphs - each obtained from its predecessor - can naturally represent the evolution of a system over time. From this viewpoint, it would be natural to obtain a means of predicting how such a series of graphs will evolve over time. The authors introduce a simple output layer (called "GEN") that can be used in graph neural networks to do precisely that. | SP:8ade33116fbf73f44de1023349f61464bbae3ba2 |
Graph Edit Networks | 1 INTRODUCTION . Recent advances in graph representation learning have mostly focused on tasks of classification or regression , i.e . tasks with graph-structured input but numeric output ( Battaglia et al. , 2018 ; Kipf & Welling , 2016a ; Veličković et al. , 2018 ) . By contrast , few approaches to date can transform a graph-structured input to a graph-structured output ( Hajiramezanali et al. , 2019 ; Paaßen et al. , 2018 ; Zambon et al. , 2019 ) . This lacuna is crucial because time series prediction on graphs requires graphstructured output , namely the next graph in a time series . Applications of time series prediction on graphs include epidemiological models ( Keeling & Eames , 2005 ) , social ( Liben-Nowell & Kleinberg , 2007 ; Masuda & Holme , 2019 ) , telecommunications ( Nanavati et al. , 2006 ) , traffic ( Cui et al. , 2019 ) , citation ( Shibata et al. , 2012 ) , and financial transaction networks ( Chan & Olmsted , 2017 ) , as well as student solutions in intelligent tutoring systems ( Paaßen et al. , 2018 ) . In each of these settings , predicting the changes in graphs can deepen the understanding of the domain and provide useful knowledge for designing interventions . Currently , methods for time series prediction on graphs are limited to the dynamics of the node attributes ( Yu et al. , 2018 ) , or changes in connectivity ( Goyal et al. , 2020 ; Hajiramezanali et al. , 2019 ) , but do not cover changes in the node set . Fortunately , there exists a rich research tradition of edit distances ( e.g . Levenshtein , 1965 ; Zhang & Shasha , 1989 ; Sanfeliu & Fu , 1983 ) which can describe any change between two graphs . Further , edits are sparse and have a simple semantic ( delete , insert , relabel ) , which makes them easier to interpret for human observers and makes them computationally more efficient ( linear instead of quadratic ) compared to a dense representation . Finally , edits are local , enabling us to make edit decisions at each node instead of coordinating information across the entire graph . In this work , we connect graph neural networks to edit distances by developing a simple , linear output layer that maps node embeddings to graph edits . We call our output layer the graph edit network ( GEN ) . We also develop a general training and inference scheme to transform any graph Gt to its successor Gt+1 using only local binary edit decisions and a regression for node attributes . Theoretically , we prove that a ) a mapping between the nodes of Gt and Gt+1 is sufficient to construct training data for the GEN , b ) this construction yields almost no overhead compared to directly transforming the mapping to graph edits , and c ) provided that the mapping between Gt and Gt+1 is optimal and the GEN can perfectly reproduce the training data , the edit script is almost as short as the graph edit distance ( Sanfeliu & Fu , 1983 ) . In addition to this core theoretical contribution , we provide a proof-of-concept of our model by demonstrating that GENs can learn a variety of dynamical systems on graphs which are more difficult to handle for baseline systems from the literature . We also show that the sparsity of edits enables GENs to scale up to realistic graphs with thousands of nodes . 2 BACKGROUND . Graph Neural Networks : Graph neural networks ( GNNs ) compute representations of nodes in a graph by aggregating information of neighboring nodes ( Bacciu et al. , 2020 ; Defferrard et al. , 2016 ; Kipf & Welling , 2016a ; Micheli , 2009 ; Scarselli et al. , 2009 ) . In particular , the representation φl ( v ) ∈ Rnl of node v in layer l is computed as follows : φl ( v ) = f lmerge ( φl−1 ( v ) , f laggr ( { φl−1 ( u ) |u ∈ N ( v ) } ) ) ( 1 ) where N ( v ) is some neighborhood of v in the graph and f lmerge as well as f laggr are functions that aggregate the information of their arguments , returning a single vector ( Xu et al. , 2019 ) . The representation in the 0th layer is usually defined as the initial node attributes or a constant vector for all nodes ( Kipf & Welling , 2016a ) . Recently , many implementations of f lmerge , f l aggr , and neighborhood N have been suggested , such as a weighted sum via the graph Laplacian ( Kipf & Welling , 2016a ) , recurrent neural networks ( Hamilton et al. , 2017 ) , or attention mechanisms ( Veličković et al. , 2018 ) . Our approach is agnostic to the choice of graph neural network . We merely require some vectorial embedding for each node in the input graph . Graph Generators : Multiple works in recent years have proposed recurrent models to generate graphs ( Bacciu et al. , 2019 ; Li et al. , 2018 ; You et al. , 2018a ; b ; Zhang et al. , 2019 ) . Roughly speaking , these recurrent models first output a node , and then all connections of this node to previous nodes until a special end-of-sentence token is produced . While such a scheme does enable time series prediction , it only works for insertions , i.e . starting at an empty graph and inserting nodes and edges over time . If one wishes to account for general graph changes , one first has to encode a graph into a vector and then decode from this vector the graph in the next time step , similar to molecular design ( Jin et al. , 2019 ; Fu et al. , 2020 ) . However , such models have to generate the next graph from scratch and can not exploit the sparsity and interpretability of edits , as we suggest . Link Prediction : Link prediction is complementary to graph generation . It assumes a constant number of nodes , but changing connectivity between them ( Liben-Nowell & Kleinberg , 2007 ; Richard et al. , 2014 ; Shibata et al. , 2012 ) . Typical link prediction approaches compute node features first , followed by an affinity index between nodes based on their features . Finally , edges with low index are predicted to vanish , while edges with high index are predicted to appear . For example , Goyal et al . ( 2020 ) combine dense and recurrent blocks to build an autoencoder for link prediction , while Hajiramezanali et al . ( 2019 ) combine a GNN and a RNN to obtain a spatio-temporal variational graph autoencoder . In GENs , we predict edge changes with a similar scheme , using a graph neural network to obtain the node features and then mapping these node features to the graph changes . However , in contrast to prior work , we do not predict the next adjacency matrix but only the change in adjacencies , which is a much sparser signal , reducing the time complexity from quadratic to linear . Additionally , GENs can not only handle edge changes , but also node changes . We note that our current paper is limited to a Markovian setting , i.e . we do not consider the past for computing node representations . This limitation could be addressed by combining our output layer with EvolveGCN ( Pareja et al. , 2020 ) which uses a recurrent net to predict the weights of a graph neural net , thus being able to handle changes in the node set . Dynamic Attributes : Recently , graph neural networks have been extended to predict changes to node attributes , while the nodes and edges remain fixed ( Cui et al. , 2019 ; Seo et al. , 2018 ) , which is particularly useful for traffic networks . GENs are complementary to these works , in that we consider the more general case of graph topology changes . Time Series Prediction on Graphs : To our knowledge , only very few works to date have addressed the most general case of time series of graphs , where both nodes and edges are permitted to change . In particular , Paaßen et al . ( 2018 ) suggest several kernel-based time series prediction methods for graphs . However , their scheme is limited to predictions in the kernel space and mapping a prediction back to a graph requires solving an inverse kernel problem , relying on approximations that impact accuracy ( Paaßen et al. , 2018 ) . Zambon et al . ( 2019 ) embed the time series into a vector space using a GNN and use a recurrent neural network to predict the next time step . To obtain the corresponding graph , a multi-layer perceptron is used to compute the adjacency matrix and node features from the predicted embedding . Besides being computationally expensive , this dense decoder also assumes a fixed order of the nodes . Graph Edits : The basis for our approach are graph edits , which are functions that describe changes in graphs ( Sanfeliu & Fu , 1983 ) . Formally , we first define an attributed , directed graph as a triple G = ( V , E , X ) , where V = { 1 , . . . , N } is a finite set of node indices , E ⊆ V × V is a set of edges , and X ∈ RN×n is a matrix of node attributes for some n ∈ N. We define the nodes as indices for notational simplicity , but we do not assume any specific order , i.e . we treat isomorphic graphs as the same . Now , let G be the set of all possible attributed directed graphs . We define a graph edit as some function δ : G → G. In particular , we consider the graph edits of Sanfeliu & Fu ( 1983 ) , namely node deletions deli , which delete the ith node from a graph , node replacements repi , x , which set the attribute of node i to x , node insertions insx , which add a new node with attribute x to a graph , edge deletions edeli , j , which delete the edge ( i , j ) from a graph , and edge insertions einsi , j , which insert the edge ( i , j ) into a graph . We then define an edit script δ̄ as a finite sequence δ̄ = δ1 , . . . , δT of graph edits and we define the application of δ̄ as the composition of all edits , i.e . δ̄ ( G ) : = δT ◦ . . . ◦ δ1 ( G ) . Finally , we define the graph edit distance dGED ( G , G′ ) between two graphs G and G′ as the length of the shortest script δ̄ such that δ̄ ( G ) ∼= G′ , where∼= means isomorphic . The GED is well-defined and a proper metric , i.e . a script connecting any two graphs always exists , the GED between two isomorphic graphs is zero , the GED is symmetric , and it conforms to the triangular inequality ( Abu-Aisheh et al. , 2015 ; Sanfeliu & Fu , 1983 ) . While prior work has already attempted to approximate the graph edit distance with graph neural nets ( Bai et al. , 2019 ; Li et al. , 2019 ) our work is , to our knowledge , the first to produce actual graph edits as network output , and to avoid graph pooling layers . | This paper proposes a model that, given one graph, predicts a sequence of edits that transforms this graph to the next one in a sequence of evolving graphs. To this end, it proposes the graph edit network (GEN), which is a linear output layer that transforms node embeddings to a set of scores that are then used to deterministically select graph edits. The space of edits predictable by this model covers the full space of graph changes. The paper moreover shows that, given a graph matching and a pair of graphs, we can algorithmically find a near-optimal graph edit sequence for generating training data. Finally, the paper demonstrates the model's capabilities on a set of synthetic benchmarks. | SP:8ade33116fbf73f44de1023349f61464bbae3ba2 |
Novelty Detection via Robust Variational Autoencoding | 1 INTRODUCTION . Novelty detection refers to the task of detecting testing data points that deviate from the underlying structure of a given training dataset ( Chandola et al. , 2009 ; Pimentel et al. , 2014 ; Chalapathy & Chawla , 2019 ) . It finds crucial applications , in areas such as insurance and credit fraud ( Zhou et al. , 2018 ) , mobile robots ( Neto & Nehmzow , 2007 ) and medical diagnosis ( Wei et al. , 2018 ) . Ideally , novelty detection requires learning the underlying distribution of the training data , where sometimes it is sufficient to learn a significant feature , geometric structure or another property of the training data . One can then apply the learned distribution ( or property ) to detect deviating points in the test data . This is different from outlier detection ( Chandola et al. , 2009 ) , in which one does not have training data and has to determine the deviating points in a sufficiently large dataset assuming that the majority of points share the same structure or properties . We note that novelty detection is equivalent to the well-known one-class classification problem ( Moya & Hush , 1996 ) . In this problem , one needs to identify members of a class in a test dataset , and consequently distinguish them from “ novel ” data points , given training points from this class . The points of the main class are commonly referred to as inliers and the novel ones as outliers . Novelty detection is also commonly referred to as semi-supervised anomaly detection . In this terminology , the notion of being “ semi-supervised ” is different than usual . It emphasizes that only the inliers are trained , where there is no restriction on the fraction of training points . On the other hand , the unsupervised case has no training ( we referred to this setting above as “ outlier detection ” ) and in the supervised case there are training datasets for both the inliers and outliers . We remark that some authors refer to semi-supervised anomaly detection as the setting where a small amount of labeled data is provided for both the inliers and outliers ( Ruff et al. , 2020 ) . There are a myriad of solutions to novelty detection . Nevertheless , such solutions often assume that the training set is purely sampled from a single class or that it has a very low fraction of corrupted samples . This assumption is only valid when the area of investigation has been carefully studied and there are sufficiently precise tools to collect data . However , there are different important scenarios , where this assumption does not hold . One scenario includes new areas of studies , where it is unclear how to distinguish between normal and abnormal points . For example , in the beginning of the COVID-19 pandemic it was hard to diagnose COVID-19 patients and distinguish them from other patients with pneumonia . Another scenario occurs when it is very hard to make precise measurements , for example , when working with the highly corrupted images obtained in cryogenic electron microscopy ( cryo-EM ) . Therefore , we study a robust version of novelty detection that allows a nontrivial fraction of corrupted samples , namely outliers , within the training set . We solve this problem by using a special variational autoencoder ( VAE ) ( Kingma & Welling , 2014 ) . Our VAE is able to model the underlying distribution of the uncorrupted data , despite nontrivial corruption . We refer to our new method as “ Mixture Autoencoding with Wasserstein penalty ” , or “ MAW ” . In order to clarify it , we first review previous works and then explain our contributions in view of these works . 1.1 PREVIOUS WORK . Solutions to one-class classification and novelty detection either estimate the density of the inlier distribution ( Bengio & Monperrus , 2005 ; Ilonen et al. , 2006 ) or determine a geometric property of the inliers , such as their boundary set ( Breunig et al. , 2000 ; Schölkopf et al. , 2000 ; Xiao et al. , 2016 ; Wang & Lan , 2020 ; Jiang et al. , 2019 ) . When the inlier distribution is nicely approximated by a low-dimensional linear subspace , Shyu et al . ( 2003 ) proposes to distinguish between inliers and outliers via Principal Component Analysis ( PCA ) . In order to consider more general cases of nonlinear low-dimensional structures , one may use autoencoders ( or restricted Boltzmann machines ) , which nonlinearly generalize PCA ( Goodfellow et al. , 2016 , Ch . 2 ) and whose reconstruction error naturally provides a score for membership in the inlier class . Instances of this strategy with various architectures include Zhai et al . ( 2016 ) ; Zong et al . ( 2018 ) ; Sabokrou et al . ( 2018 ) ; Perera et al . ( 2019 ) ; Pidhorskyi et al . ( 2018 ) . In all of these works , but Zong et al . ( 2018 ) , the training set is assumed to solely represent the inlier class . In fact , Perera et al . ( 2019 ) observed that interpolation of a latent space , which was trained using digit images of a complex shape , can lead to digit representation of a simple shape . If there are also outliers ( with a simple shape ) among the inliers ( with a complex shape ) , encoding the inlier distribution becomes even more difficult . Nevertheless , some previous works already explored the possibility of corrupted training set ( Xiao et al. , 2016 ; Wang & Lan , 2020 ; Zong et al. , 2018 ) . In particular , Xiao et al . ( 2016 ) ; Zong et al . ( 2018 ) test artificial instances with at most 5 % corruption of the training set and Wang & Lan ( 2020 ) considers ratios of 10 % , but with very small numbers of training points . In this work we consider corruption ratios up to 30 % , with a method that tries to estimate the distribution of the training set , and not just a geometric property . VAEs ( Kingma & Welling , 2014 ) have been commonly used for generating distributions with reconstruction scores and are thus natural for novelty detection without corruption . They determine the latent code of an autoencoder via variational inference ( Jordan et al. , 1999 ; Blei et al. , 2017 ) . Alternatively , they can be viewed as autoencoders for distributions that penalize the Kullback-Leibler ( KL ) divergence of the latent distribution from the prior distribution . The first VAE-based method for novelty detection was suggested by An & Cho ( 2015 ) . It was recently extended by Daniel et al . ( 2019 ) who modified the training objective . A variety of VAE models were also proposed for special anomaly detection problems , which are different than novelty detection ( Xu et al. , 2018 ; Zhang et al. , 2019 ; Pol et al. , 2019 ) . Current VAE-based methods for novelty detection do not perform well when the training data is corrupted . Indeed , the learned distribution of any such method also represents the corruption , that is , the outlier component . To the best of our knowledge , no effective solutions were proposed for collapsing the outlier mode so that the trained VAE would only represent the inlier distribution . An adversarial autoencoder ( AAE ) ( Makhzani et al. , 2016 ) and a Wasserstein autoencoder ( WAE ) ( Tolstikhin et al. , 2018 ) can be considered as variants of VAE . The penalty term of AAE takes the form of a generative adversarial network ( GAN ) ( Goodfellow et al. , 2016 ) , where its generator is the encoder . A Wasserstein autoencoder ( WAE ) ( Tolstikhin et al. , 2018 ) generalizes AAE with a framework that minimizes the Wasserstein metric between the sample distribution and the inference distribution . It reformulates the corresponding objective function so that it can be implemented in the form of an AAE . There are two relevant lines of works on robustness to outliers in linear modeling that can be used in nonlinear settings via autoencoders or VAEs . Robust PCA aims to deal with sparse elementwise corruption of a data matrix ( Candès et al. , 2011 ; De La Torre & Black , 2003 ; Wright et al. , 2009 ; Vaswani & Narayanamurthy , 2018 ) . Robust subspace recovery ( RSR ) aims to address general corruption of selected data points and thus better fits the framework of outliers ( Watson , 2001 ; De La Torre & Black , 2003 ; Ding et al. , 2006 ; Zhang et al. , 2009 ; McCoy & Tropp , 2011 ; Xu et al. , 2012 ; Lerman & Zhang , 2014 ; Zhang & Lerman , 2014 ; Lerman et al. , 2015 ; Lerman & Maunu , 2017 ; Maunu et al. , 2019 ; Lerman & Maunu , 2018 ; Maunu & Lerman , 2019 ) . Autoencoders that use robust PCA for anomaly detection tasks were proposed in Chalapathy et al . ( 2017 ) ; Zhou & Paffenroth ( 2017 ) . Dai et al . ( 2018 ) show that a VAE can be interpreted as a nonlinear robust PCA problem . Nevertheless , explicit regularization is often required to improve robustness to sparse corruption in VAEs ( Akrami et al. , 2019 ; Eduardo et al. , 2020 ) . RSR was successfully applied to outlier detection by Lai et al . ( 2020 ) . One can apply their work to the different setting of novelty detection ; however , our proposed VAE formulation seems to work better . 1.2 THIS WORK . We propose a robust novelty detection procedure , MAW , that aims to model the distribution of the training data in the presence of nontrivial fraction of outliers . We highlight its following four features : • MAW models the latent distribution by a Gaussian mixture of low-rank inliers and full-rank outliers , and applies the inlier distribution for testing . Previous applications of mixture models for novelty detection were designed for multiple modes of inliers and used more complicated tools such as constructing another network ( Zong et al. , 2018 ) or applying clustering ( Aytekin et al. , 2018 ; Lee et al. , 2018 ) . • MAW applies a novel dimension reduction component , which extracts lower-dimensional features of the latent distribution . The reduced small dimension allows using full covariances for both the outliers ( with full rank ) and inliers ( with deficient rank ) ; whereas previous VAE-based methods for novelty detection used diagonal covariances in their models ( An & Cho , 2015 ; Daniel et al. , 2019 ) . The new component is inspired by the RSR layer in Lai et al . ( 2020 ) ; however , they are essentially different since the RSR layer is only applicable for data points and not for probability distributions . • For the latent code penalty , MAW uses the Wasserstein-1 ( W1 ) metric . Under a special setting , we prove that the Wasserstein metric gives rise to outliers-robust estimation and is suitable to the low-rank modeling of inliers by MAW . We also show that these properties do not hold for the KL divergence , which is used by VAE , AAE and WAE . We remark that the use of the Wasserstein metric in WAE is different than that of MAW . Indeed , in WAE it measures the distance between the data distribution and the generated distribution and it does not appear in the latent code . Our use ofW1 can be viewed as a variant of AAE , which replaces GAN with Wasserstein GAN ( WGAN ) ( Arjovsky et al. , 2017 ) . That is , it replaces the minimization of the KL divergence by that of theW1 distance . • MAW achieves state-of-the-art results on popular anomaly detection datasets . Additional two features are as follows . First , for reconstruction , MAW replaces the common least squares formulation with a least absolute deviations formulation . This can be justified by the use of either a robust estimator ( Lopuhaa & Rousseeuw , 1991 ) or a likelihood function with a heavier tail . Second , MAW is attractive for practitioners . It is simple to implement in any standard deep learning library , and is easily adaptable to other choices of network architecture , energy functions and similarity scores . We remark that since we do not have labels for the training set , we can not supervisedly learn the Gaussian component with low-rank covariance by the inliers and Gaussian component with the full-rank covariance by the outliers . However , the use of two robust losses ( least absolute deviation and the W1 distance ) helps obtain a careful model for the inliers , which is robust to outliers . Note that in our testing , we only use the model for the inliers . We explain MAW in §2 . We establish the advantage of its use of the Wasserstein metric in §3 . We carefully test MAW in §4 . At last , we conclude this work in §5 . | The paper seeks to address the problem of novelty detection under the circumstance of having high corruptions in the training data. This is different from most previous work, which often assumes that training dataset is pure. To address this issue, a VAE-based approach is adopted in this paper, with several modifications made to the vanilla VAE to promote the robustness of VAE in detecting outliers in the corruption circumstance. Among the modifications, the paper assumes the posterior is approximated by a two-component Gaussian mixture distribution, with each having a low-rank and full-rank covariance matrix, respectively. The paper hopes that the posterior of inliers (normal data points) can be represented by the low-rank covariance matrix, while that of outliers cannot. Another notable modification is that the Wasserstein-1 regularization is used to replace the KL-regularization in the ELBO, which is claimed to be more suitable to the low-rank modeling. Some experiments are conducted to evaluate the outlier detection performance of the proposed method under corrupted circumstance. | SP:77b9c09e04fa51dc104ced583ed8bbc270d73955 |
Novelty Detection via Robust Variational Autoencoding | 1 INTRODUCTION . Novelty detection refers to the task of detecting testing data points that deviate from the underlying structure of a given training dataset ( Chandola et al. , 2009 ; Pimentel et al. , 2014 ; Chalapathy & Chawla , 2019 ) . It finds crucial applications , in areas such as insurance and credit fraud ( Zhou et al. , 2018 ) , mobile robots ( Neto & Nehmzow , 2007 ) and medical diagnosis ( Wei et al. , 2018 ) . Ideally , novelty detection requires learning the underlying distribution of the training data , where sometimes it is sufficient to learn a significant feature , geometric structure or another property of the training data . One can then apply the learned distribution ( or property ) to detect deviating points in the test data . This is different from outlier detection ( Chandola et al. , 2009 ) , in which one does not have training data and has to determine the deviating points in a sufficiently large dataset assuming that the majority of points share the same structure or properties . We note that novelty detection is equivalent to the well-known one-class classification problem ( Moya & Hush , 1996 ) . In this problem , one needs to identify members of a class in a test dataset , and consequently distinguish them from “ novel ” data points , given training points from this class . The points of the main class are commonly referred to as inliers and the novel ones as outliers . Novelty detection is also commonly referred to as semi-supervised anomaly detection . In this terminology , the notion of being “ semi-supervised ” is different than usual . It emphasizes that only the inliers are trained , where there is no restriction on the fraction of training points . On the other hand , the unsupervised case has no training ( we referred to this setting above as “ outlier detection ” ) and in the supervised case there are training datasets for both the inliers and outliers . We remark that some authors refer to semi-supervised anomaly detection as the setting where a small amount of labeled data is provided for both the inliers and outliers ( Ruff et al. , 2020 ) . There are a myriad of solutions to novelty detection . Nevertheless , such solutions often assume that the training set is purely sampled from a single class or that it has a very low fraction of corrupted samples . This assumption is only valid when the area of investigation has been carefully studied and there are sufficiently precise tools to collect data . However , there are different important scenarios , where this assumption does not hold . One scenario includes new areas of studies , where it is unclear how to distinguish between normal and abnormal points . For example , in the beginning of the COVID-19 pandemic it was hard to diagnose COVID-19 patients and distinguish them from other patients with pneumonia . Another scenario occurs when it is very hard to make precise measurements , for example , when working with the highly corrupted images obtained in cryogenic electron microscopy ( cryo-EM ) . Therefore , we study a robust version of novelty detection that allows a nontrivial fraction of corrupted samples , namely outliers , within the training set . We solve this problem by using a special variational autoencoder ( VAE ) ( Kingma & Welling , 2014 ) . Our VAE is able to model the underlying distribution of the uncorrupted data , despite nontrivial corruption . We refer to our new method as “ Mixture Autoencoding with Wasserstein penalty ” , or “ MAW ” . In order to clarify it , we first review previous works and then explain our contributions in view of these works . 1.1 PREVIOUS WORK . Solutions to one-class classification and novelty detection either estimate the density of the inlier distribution ( Bengio & Monperrus , 2005 ; Ilonen et al. , 2006 ) or determine a geometric property of the inliers , such as their boundary set ( Breunig et al. , 2000 ; Schölkopf et al. , 2000 ; Xiao et al. , 2016 ; Wang & Lan , 2020 ; Jiang et al. , 2019 ) . When the inlier distribution is nicely approximated by a low-dimensional linear subspace , Shyu et al . ( 2003 ) proposes to distinguish between inliers and outliers via Principal Component Analysis ( PCA ) . In order to consider more general cases of nonlinear low-dimensional structures , one may use autoencoders ( or restricted Boltzmann machines ) , which nonlinearly generalize PCA ( Goodfellow et al. , 2016 , Ch . 2 ) and whose reconstruction error naturally provides a score for membership in the inlier class . Instances of this strategy with various architectures include Zhai et al . ( 2016 ) ; Zong et al . ( 2018 ) ; Sabokrou et al . ( 2018 ) ; Perera et al . ( 2019 ) ; Pidhorskyi et al . ( 2018 ) . In all of these works , but Zong et al . ( 2018 ) , the training set is assumed to solely represent the inlier class . In fact , Perera et al . ( 2019 ) observed that interpolation of a latent space , which was trained using digit images of a complex shape , can lead to digit representation of a simple shape . If there are also outliers ( with a simple shape ) among the inliers ( with a complex shape ) , encoding the inlier distribution becomes even more difficult . Nevertheless , some previous works already explored the possibility of corrupted training set ( Xiao et al. , 2016 ; Wang & Lan , 2020 ; Zong et al. , 2018 ) . In particular , Xiao et al . ( 2016 ) ; Zong et al . ( 2018 ) test artificial instances with at most 5 % corruption of the training set and Wang & Lan ( 2020 ) considers ratios of 10 % , but with very small numbers of training points . In this work we consider corruption ratios up to 30 % , with a method that tries to estimate the distribution of the training set , and not just a geometric property . VAEs ( Kingma & Welling , 2014 ) have been commonly used for generating distributions with reconstruction scores and are thus natural for novelty detection without corruption . They determine the latent code of an autoencoder via variational inference ( Jordan et al. , 1999 ; Blei et al. , 2017 ) . Alternatively , they can be viewed as autoencoders for distributions that penalize the Kullback-Leibler ( KL ) divergence of the latent distribution from the prior distribution . The first VAE-based method for novelty detection was suggested by An & Cho ( 2015 ) . It was recently extended by Daniel et al . ( 2019 ) who modified the training objective . A variety of VAE models were also proposed for special anomaly detection problems , which are different than novelty detection ( Xu et al. , 2018 ; Zhang et al. , 2019 ; Pol et al. , 2019 ) . Current VAE-based methods for novelty detection do not perform well when the training data is corrupted . Indeed , the learned distribution of any such method also represents the corruption , that is , the outlier component . To the best of our knowledge , no effective solutions were proposed for collapsing the outlier mode so that the trained VAE would only represent the inlier distribution . An adversarial autoencoder ( AAE ) ( Makhzani et al. , 2016 ) and a Wasserstein autoencoder ( WAE ) ( Tolstikhin et al. , 2018 ) can be considered as variants of VAE . The penalty term of AAE takes the form of a generative adversarial network ( GAN ) ( Goodfellow et al. , 2016 ) , where its generator is the encoder . A Wasserstein autoencoder ( WAE ) ( Tolstikhin et al. , 2018 ) generalizes AAE with a framework that minimizes the Wasserstein metric between the sample distribution and the inference distribution . It reformulates the corresponding objective function so that it can be implemented in the form of an AAE . There are two relevant lines of works on robustness to outliers in linear modeling that can be used in nonlinear settings via autoencoders or VAEs . Robust PCA aims to deal with sparse elementwise corruption of a data matrix ( Candès et al. , 2011 ; De La Torre & Black , 2003 ; Wright et al. , 2009 ; Vaswani & Narayanamurthy , 2018 ) . Robust subspace recovery ( RSR ) aims to address general corruption of selected data points and thus better fits the framework of outliers ( Watson , 2001 ; De La Torre & Black , 2003 ; Ding et al. , 2006 ; Zhang et al. , 2009 ; McCoy & Tropp , 2011 ; Xu et al. , 2012 ; Lerman & Zhang , 2014 ; Zhang & Lerman , 2014 ; Lerman et al. , 2015 ; Lerman & Maunu , 2017 ; Maunu et al. , 2019 ; Lerman & Maunu , 2018 ; Maunu & Lerman , 2019 ) . Autoencoders that use robust PCA for anomaly detection tasks were proposed in Chalapathy et al . ( 2017 ) ; Zhou & Paffenroth ( 2017 ) . Dai et al . ( 2018 ) show that a VAE can be interpreted as a nonlinear robust PCA problem . Nevertheless , explicit regularization is often required to improve robustness to sparse corruption in VAEs ( Akrami et al. , 2019 ; Eduardo et al. , 2020 ) . RSR was successfully applied to outlier detection by Lai et al . ( 2020 ) . One can apply their work to the different setting of novelty detection ; however , our proposed VAE formulation seems to work better . 1.2 THIS WORK . We propose a robust novelty detection procedure , MAW , that aims to model the distribution of the training data in the presence of nontrivial fraction of outliers . We highlight its following four features : • MAW models the latent distribution by a Gaussian mixture of low-rank inliers and full-rank outliers , and applies the inlier distribution for testing . Previous applications of mixture models for novelty detection were designed for multiple modes of inliers and used more complicated tools such as constructing another network ( Zong et al. , 2018 ) or applying clustering ( Aytekin et al. , 2018 ; Lee et al. , 2018 ) . • MAW applies a novel dimension reduction component , which extracts lower-dimensional features of the latent distribution . The reduced small dimension allows using full covariances for both the outliers ( with full rank ) and inliers ( with deficient rank ) ; whereas previous VAE-based methods for novelty detection used diagonal covariances in their models ( An & Cho , 2015 ; Daniel et al. , 2019 ) . The new component is inspired by the RSR layer in Lai et al . ( 2020 ) ; however , they are essentially different since the RSR layer is only applicable for data points and not for probability distributions . • For the latent code penalty , MAW uses the Wasserstein-1 ( W1 ) metric . Under a special setting , we prove that the Wasserstein metric gives rise to outliers-robust estimation and is suitable to the low-rank modeling of inliers by MAW . We also show that these properties do not hold for the KL divergence , which is used by VAE , AAE and WAE . We remark that the use of the Wasserstein metric in WAE is different than that of MAW . Indeed , in WAE it measures the distance between the data distribution and the generated distribution and it does not appear in the latent code . Our use ofW1 can be viewed as a variant of AAE , which replaces GAN with Wasserstein GAN ( WGAN ) ( Arjovsky et al. , 2017 ) . That is , it replaces the minimization of the KL divergence by that of theW1 distance . • MAW achieves state-of-the-art results on popular anomaly detection datasets . Additional two features are as follows . First , for reconstruction , MAW replaces the common least squares formulation with a least absolute deviations formulation . This can be justified by the use of either a robust estimator ( Lopuhaa & Rousseeuw , 1991 ) or a likelihood function with a heavier tail . Second , MAW is attractive for practitioners . It is simple to implement in any standard deep learning library , and is easily adaptable to other choices of network architecture , energy functions and similarity scores . We remark that since we do not have labels for the training set , we can not supervisedly learn the Gaussian component with low-rank covariance by the inliers and Gaussian component with the full-rank covariance by the outliers . However , the use of two robust losses ( least absolute deviation and the W1 distance ) helps obtain a careful model for the inliers , which is robust to outliers . Note that in our testing , we only use the model for the inliers . We explain MAW in §2 . We establish the advantage of its use of the Wasserstein metric in §3 . We carefully test MAW in §4 . At last , we conclude this work in §5 . | This study proposes a novel method that can work well even the training data is corrupted by partial data from the unknown domain. Though it deals with the well-known problem called 'Noisy data/label', its approach is not the same thing as the previous works as it focuses on variational autoencoder on the task of novelty detection. And its arguments and statistical assumptions are followed by mathematical proofs. | SP:77b9c09e04fa51dc104ced583ed8bbc270d73955 |
Seq2Tens: An Efficient Representation of Sequences by Low-Rank Tensor Projections | 1 INTRODUCTION . A central task of learning is to find representations of the underlying data that efficiently and faithfully capture their structure . In the case of sequential data , one data point consists of a sequence of objects . This is a rich and non-homogeneous class of data and includes classical uni- or multi-variate time series ( sequences of scalars or vectors ) , video ( sequences of images ) , and text ( sequences of letters ) . Particular challenges of sequential data are that each sequence entry can itself be a highly structured object and that data sets typically include sequences of different length which makes naive vectorization troublesome . Contribution . Our main result is a generic method that takes a static feature map for a class of objects ( e.g . a feature map for vectors , images , or letters ) as input and turns this into a feature map for sequences of arbitrary length of such objects ( e.g . a feature map for time series , video , or text ) . We call this feature map for sequences Seq2Tens for reasons that will become clear ; among its attractive properties are that it ( i ) provides a structured , parsimonious description of sequences ; generalizing classical methods for strings , ( ii ) comes with theoretical guarantees such as universality , ( iii ) can be turned into modular and flexible neural network ( NN ) layers for sequence data . The key ingredient to our approach is to embed the feature space of the static feature map into a larger linear space that forms an algebra ( a vector space equipped with a multiplication ) . The product in this algebra is then used to “ stitch together ” the static features of the individual sequence entries in a structured way . The construction that allows to do all this is classical in mathematics , and known as the free algebra ( over the static feature space ) . Outline . Section 2 formalizes the main ideas of Seq2Tens and introduces the free algebra T ( V ) over a space V as well as the associated product , the so-called convolution tensor product . Section 3 shows how low rank ( LR ) constructions combined with sequence-to-sequence transforms allows one to efficiently use this rich algebraic structure . Section 4 applies the results of Sections 2 and 3 to build modular and scalable NN layers for sequential data . Section 5 demonstrates the flexibility and modularity of this approach on both discriminative and generative benchmarks . Section 6 makes connections with previous work and summarizes this article . In the appendices we provide mathematical background , extensions , and detailed proofs for our theoretical results . 2 CAPTURING ORDER BY NON-COMMUTATIVE MULTIPLICATION . We denote the set of sequences of elements in a set X by Seq ( X ) = { x = ( xi ) i=1 , ... , L : xi ∈ X , L ≥ 1 } ( 1 ) where L ≥ 1 is some arbitrary length . Even if X itself is a linear space , e.g . X = R , Seq ( X ) is never a linear space since there is no natural addition of two sequences of different length . Seq2Tens in a nutshell . Given any vector space V we may construct the so-called free algebra T ( V ) over V . We describe the space T ( V ) in detail below , but as for now the only thing that is important is that T ( V ) is also a vector space that includes V , and that it carries a non-commutative product , which is , in a precise sense , “ the most general product ” on V . The main idea of Seq2Tens is that any “ static feature map ” for elements in X φ : X → V can be used to construct a new feature map Φ : Seq ( X ) → T ( V ) for sequences in X by using the algebraic structure of T ( V ) : the non-commutative product on T ( V ) makes it possible to “ stitch together ” the individual features φ ( x1 ) , . . . , φ ( xL ) ∈ V ⊂ T ( V ) of the sequence x in the larger space T ( V ) by multiplication in T ( V ) . With this we may define the feature map Φ ( x ) for a sequences x = ( x1 , . . . , xL ) ∈ Seq ( X ) as follows ( i ) lift the map φ : X → V to a map ϕ : X → T ( V ) , ( ii ) map Seq ( X ) → Seq ( T ( V ) ) by ( x1 , . . . , xL ) 7→ ( ϕ ( x1 ) , . . . , ϕ ( xL ) ) , ( iii ) map Seq ( T ( V ) ) → T ( V ) by multiplication ( ϕ ( x1 ) , . . . , ϕ ( xL ) ) 7→ ϕ ( x1 ) · · ·ϕ ( xL ) . In a more concise form , we define Φ as Φ : Seq ( X ) → T ( V ) , Φ ( x ) = L∏ i=1 ϕ ( xi ) ( 2 ) where ∏ denotes multiplication in T ( V ) . We refer to the resulting map Φ as the Seq2Tens map , which stands short for Sequences-2-Tensors . Why is this construction a good idea ? First note , that step ( i ) is always possible since V ⊂ T ( V ) and we discuss the simplest such lift before Theorem 2.1 as well as other choices in Appendix B . Further , if φ , respectively ϕ , provides a faithful representation of objects in X , then there is no loss of information in step ( ii ) . Finally , since step ( iii ) uses “ the most general product ” to multiply ϕ ( x1 ) · · ·ϕ ( xL ) one expects that Φ ( x ) ∈ T ( V ) faithfully represents the sequence x as an element of T ( V ) . Indeed in Theorem 2.1 below we show an even stronger statement , namely that if the static feature map φ : X → V contains enough non-linearities so that non-linear functions from X to R can be approximated as linear functions of the static feature map φ , then the above construction extends this property to functions of sequences . Put differently , if φ is a universal feature map for X , then Φ is a universal feature map for Seq ( X ) ; that is , any non-linear function f ( x ) of a sequence x can be approximated as a linear functional of Φ ( x ) , f ( x ) ≈ 〈 ` , Φ ( x ) 〉 . We also emphasize that the domain of Φ is the space Seq ( X ) of sequences of arbitrary ( finite ) length . The remainder of this Section gives more details about steps ( i ) , ( ii ) , ( iii ) for the construction of Φ . The free algebra T ( V ) over a vector space V . Let V be a vector space . We denote by T ( V ) the set of sequences of tensors indexed by their degree m , T ( V ) : = { t = ( tm ) m≥0 | tm ∈ V ⊗m } ( 3 ) where by convention V ⊗0 = R. For example , if V = Rd and t = ( tm ) m≥0 is some element of T ( Rd ) , then its degreem = 1 component is a d-dimensional vector t1 , its degreem = 2 component is a d× d matrix t2 , and its degree m = 3 component is a degree 3 tensor t3 . By defining addition and scalar multiplication as s + t : = ( sm + tm ) m≥0 , c · t = ( ctm ) m≥0 ( 4 ) the set T ( V ) becomes a linear space . By identifying v ∈ V as the element ( 0 , v , 0 , . . . , 0 ) ∈ T ( V ) we see that V is a linear subspace of T ( V ) . Moreover , while V is only a linear space , T ( V ) carries a product that turns T ( V ) into an algebra . This product is the so-called tensor convolution product , and is defined for s , t ∈ T ( V ) as s · t : = ( m∑ i=0 si ⊗ tm−i ) m≥0 = ( 1 , s1 + t1 , s2 + s1 ⊗ t1 + t2 , . . . ) ∈ T ( V ) ( 5 ) where ⊗ denotes the usual outer tensor product ; e.g . for vectors u = ( ui ) , v = ( vi ) ∈ Rd the outer tensor product u ⊗ v is the d × d matrix ( uivj ) i , j=1 , ... , d. We emphasize that like the outer tensor product⊗ , the tensor convolution product · is non-commutative , i.e . s ·t 6= t ·s . In a mathematically precise sense , T ( V ) is the most general algebra that contains V ; it is a “ free construction ” . Since T ( V ) is realized as series of tensors of increasing degree , the free algebra T ( V ) is also known as the tensor algebra in the literature . Appendix A contains background on tensors and further examples . Lifting static feature maps . Step ( i ) in the construction of Φ requires turning a given feature map φ : X → V into a map ϕ : X → T ( V ) . Throughout the rest of this article we use the lift ϕ ( x ) = ( 1 , φ ( x ) , 0 , 0 . . . ) ∈ T ( V ) . ( 6 ) We discuss other choices in Appendix B , but attractive properties of the lift 6 are that ( a ) the evaluation of Φ against low rank tensors becomes a simple recursive formula ( Proposition 3.3 , ( b ) it is a generalization of sequence sub-pattern matching as used in string kernels ( Appendix B.3 , ( c ) despite its simplicity it performs exceedingly well in practice ( Section 4 ) . Extending to sequences of arbitrary length . Steps ( i ) and ( ii ) in the construction specify how the map Φ : X → T ( V ) behaves on sequences of length-1 , that is , single observations . Step ( iii ) amounts to the requirement that for any two sequences x = ( x1 , . . . , xK ) , y = ( y1 , . . . , yL ) ∈ Seq ( V ) , their concatenation defined as z = ( x1 , . . . , xK , y1 , . . . , yL ) ∈ Seq ( V ) can be understood in the feature space as ( non-commutative ) multiplication of their corresponding features Φ ( z ) = Φ ( x ) · Φ ( y ) . ( 7 ) In other words , we inductively extend the lift ϕ to sequences of arbitrary length by starting from sequences consisting of a single observation , which is given in equation 2 . Repeatedly applying the definition of the tensor convolution product in equation 5 leads to the following explicit formula Φm ( x ) = ∑ 1≤i1 < ··· < im≤L xi1 ⊗ · · · ⊗ xim ∈ V ⊗m , Φ ( x ) = ( Φm ( x ) ) m≥0 , ( 8 ) where x = ( x1 , . . . , xL ) ∈ Seq ( V ) and the summation is over non-contiguous subsequences of x . Some intuition : generalized pattern matching . Our derivation of the feature map Φ ( x ) = ( 1 , Φ1 ( x ) , Φ2 ( x ) , . . . ) ∈ T ( V ) was guided by general algebraic principles , but equation 8 provides an intuitive interpretation . It shows that for each m ≥ 1 , the entry Φm ( x ) ∈ V ⊗m constructs a summary of a long sequence x = ( x1 , . . . , xL ) ∈ Seq ( V ) based on subsequences ( xi1 , . . . , xim ) of x of length-m . It does this by taking the usual outer tensor product xi1 ⊗ · · · ⊗ xim ∈ V ⊗m and summing over all possible subsequences . This is completely analogous to how string kernels provide a structured description of text by looking at non-contiguous substrings of length-m ( indeed , Appendix B.3 makes this rigorous ) . However , the main difference is that the above construction works for arbitrary sequences and not just sequences of discrete letters . Readers with less mathematical background might simply take this as motivation and regard equation 8 as definition . However , the algebraic background allows to prove that Φ is universal , see Theorem 2.1 below . Universality . A function φ : X → V is said to be universal for X if all continuous functions on X can be approximated as linear functions on the image of φ . One of the most powerful features of neural nets is their universality ( Hornik , 1991 ) . A very attractive property of Φ is that it preserves universality : if φ : X → V is universal forX , then Φ : Seq ( X ) → T ( V ) is universal for Seq ( X ) . To make this precise , note that V ⊗m is a linear space and therefore any ` = ( ` 0 , ` 1 , . . . , ` M , 0 , 0 , . . . ) ∈ T ( V ) consisting of M tensors ` m ∈ V ⊗m , yields a linear functional on T ( V ) ; e.g . if V = Rd and we identify ` m in coordinates as ` m = ( ` i1 , ... , imm ) i1 , ... , im∈ { 1 , ... , d } then 〈 ` , t〉 : = M∑ m=0 〈 ` m , tm〉 = M∑ m=0 ∑ i1 , ... , im∈ { 1 , ... , d } ` i1 , ... , imm t i1 , ... , im m . ( 9 ) Thus linear functionals of the feature map Φ , are real-valued functions of sequences . Theorem 2.1 below shows that any continuous function f : Seq ( X ) → R can by arbitrary well approximated by a ` ∈ T ( V ) , f ( x ) ≈ 〈 ` , Φ ( x ) 〉 . Theorem 2.1 . Let φ : X → V be a universal map with a lift that satisfies some mild constraints , then the following map is universal : Φ : Seq ( X ) → T ( V ) , x 7→ Φ ( x ) . ( 10 ) A detailed proof and the precise statement of Theorem 2.1 is given in Appendix B . | This paper introduces the free algebra, a classical mathematical concept as a generic tool to represent sequential data of arbitrary length. The proposed method has attractive theoretical property, such as preserving universality of static feature mapping, and convergence in the continuous setting. The author further proposes using stacked rank-1 projection of the free algebra as an approximation to the sequence representation in order to make it computationally feasible neural networks layers. The author illustrated the flexibility and effectiveness of the proposed method by combining the NN implementation with FCN to benchmark on multivariate time series classification problem, and GP-VAE model to benchmark on sequential data imputation problem. The proposed methods shows improved results over previous state-of-the-art. | SP:26e8b2aa5dd4391723debdf5af6add655c7a3586 |
Seq2Tens: An Efficient Representation of Sequences by Low-Rank Tensor Projections | 1 INTRODUCTION . A central task of learning is to find representations of the underlying data that efficiently and faithfully capture their structure . In the case of sequential data , one data point consists of a sequence of objects . This is a rich and non-homogeneous class of data and includes classical uni- or multi-variate time series ( sequences of scalars or vectors ) , video ( sequences of images ) , and text ( sequences of letters ) . Particular challenges of sequential data are that each sequence entry can itself be a highly structured object and that data sets typically include sequences of different length which makes naive vectorization troublesome . Contribution . Our main result is a generic method that takes a static feature map for a class of objects ( e.g . a feature map for vectors , images , or letters ) as input and turns this into a feature map for sequences of arbitrary length of such objects ( e.g . a feature map for time series , video , or text ) . We call this feature map for sequences Seq2Tens for reasons that will become clear ; among its attractive properties are that it ( i ) provides a structured , parsimonious description of sequences ; generalizing classical methods for strings , ( ii ) comes with theoretical guarantees such as universality , ( iii ) can be turned into modular and flexible neural network ( NN ) layers for sequence data . The key ingredient to our approach is to embed the feature space of the static feature map into a larger linear space that forms an algebra ( a vector space equipped with a multiplication ) . The product in this algebra is then used to “ stitch together ” the static features of the individual sequence entries in a structured way . The construction that allows to do all this is classical in mathematics , and known as the free algebra ( over the static feature space ) . Outline . Section 2 formalizes the main ideas of Seq2Tens and introduces the free algebra T ( V ) over a space V as well as the associated product , the so-called convolution tensor product . Section 3 shows how low rank ( LR ) constructions combined with sequence-to-sequence transforms allows one to efficiently use this rich algebraic structure . Section 4 applies the results of Sections 2 and 3 to build modular and scalable NN layers for sequential data . Section 5 demonstrates the flexibility and modularity of this approach on both discriminative and generative benchmarks . Section 6 makes connections with previous work and summarizes this article . In the appendices we provide mathematical background , extensions , and detailed proofs for our theoretical results . 2 CAPTURING ORDER BY NON-COMMUTATIVE MULTIPLICATION . We denote the set of sequences of elements in a set X by Seq ( X ) = { x = ( xi ) i=1 , ... , L : xi ∈ X , L ≥ 1 } ( 1 ) where L ≥ 1 is some arbitrary length . Even if X itself is a linear space , e.g . X = R , Seq ( X ) is never a linear space since there is no natural addition of two sequences of different length . Seq2Tens in a nutshell . Given any vector space V we may construct the so-called free algebra T ( V ) over V . We describe the space T ( V ) in detail below , but as for now the only thing that is important is that T ( V ) is also a vector space that includes V , and that it carries a non-commutative product , which is , in a precise sense , “ the most general product ” on V . The main idea of Seq2Tens is that any “ static feature map ” for elements in X φ : X → V can be used to construct a new feature map Φ : Seq ( X ) → T ( V ) for sequences in X by using the algebraic structure of T ( V ) : the non-commutative product on T ( V ) makes it possible to “ stitch together ” the individual features φ ( x1 ) , . . . , φ ( xL ) ∈ V ⊂ T ( V ) of the sequence x in the larger space T ( V ) by multiplication in T ( V ) . With this we may define the feature map Φ ( x ) for a sequences x = ( x1 , . . . , xL ) ∈ Seq ( X ) as follows ( i ) lift the map φ : X → V to a map ϕ : X → T ( V ) , ( ii ) map Seq ( X ) → Seq ( T ( V ) ) by ( x1 , . . . , xL ) 7→ ( ϕ ( x1 ) , . . . , ϕ ( xL ) ) , ( iii ) map Seq ( T ( V ) ) → T ( V ) by multiplication ( ϕ ( x1 ) , . . . , ϕ ( xL ) ) 7→ ϕ ( x1 ) · · ·ϕ ( xL ) . In a more concise form , we define Φ as Φ : Seq ( X ) → T ( V ) , Φ ( x ) = L∏ i=1 ϕ ( xi ) ( 2 ) where ∏ denotes multiplication in T ( V ) . We refer to the resulting map Φ as the Seq2Tens map , which stands short for Sequences-2-Tensors . Why is this construction a good idea ? First note , that step ( i ) is always possible since V ⊂ T ( V ) and we discuss the simplest such lift before Theorem 2.1 as well as other choices in Appendix B . Further , if φ , respectively ϕ , provides a faithful representation of objects in X , then there is no loss of information in step ( ii ) . Finally , since step ( iii ) uses “ the most general product ” to multiply ϕ ( x1 ) · · ·ϕ ( xL ) one expects that Φ ( x ) ∈ T ( V ) faithfully represents the sequence x as an element of T ( V ) . Indeed in Theorem 2.1 below we show an even stronger statement , namely that if the static feature map φ : X → V contains enough non-linearities so that non-linear functions from X to R can be approximated as linear functions of the static feature map φ , then the above construction extends this property to functions of sequences . Put differently , if φ is a universal feature map for X , then Φ is a universal feature map for Seq ( X ) ; that is , any non-linear function f ( x ) of a sequence x can be approximated as a linear functional of Φ ( x ) , f ( x ) ≈ 〈 ` , Φ ( x ) 〉 . We also emphasize that the domain of Φ is the space Seq ( X ) of sequences of arbitrary ( finite ) length . The remainder of this Section gives more details about steps ( i ) , ( ii ) , ( iii ) for the construction of Φ . The free algebra T ( V ) over a vector space V . Let V be a vector space . We denote by T ( V ) the set of sequences of tensors indexed by their degree m , T ( V ) : = { t = ( tm ) m≥0 | tm ∈ V ⊗m } ( 3 ) where by convention V ⊗0 = R. For example , if V = Rd and t = ( tm ) m≥0 is some element of T ( Rd ) , then its degreem = 1 component is a d-dimensional vector t1 , its degreem = 2 component is a d× d matrix t2 , and its degree m = 3 component is a degree 3 tensor t3 . By defining addition and scalar multiplication as s + t : = ( sm + tm ) m≥0 , c · t = ( ctm ) m≥0 ( 4 ) the set T ( V ) becomes a linear space . By identifying v ∈ V as the element ( 0 , v , 0 , . . . , 0 ) ∈ T ( V ) we see that V is a linear subspace of T ( V ) . Moreover , while V is only a linear space , T ( V ) carries a product that turns T ( V ) into an algebra . This product is the so-called tensor convolution product , and is defined for s , t ∈ T ( V ) as s · t : = ( m∑ i=0 si ⊗ tm−i ) m≥0 = ( 1 , s1 + t1 , s2 + s1 ⊗ t1 + t2 , . . . ) ∈ T ( V ) ( 5 ) where ⊗ denotes the usual outer tensor product ; e.g . for vectors u = ( ui ) , v = ( vi ) ∈ Rd the outer tensor product u ⊗ v is the d × d matrix ( uivj ) i , j=1 , ... , d. We emphasize that like the outer tensor product⊗ , the tensor convolution product · is non-commutative , i.e . s ·t 6= t ·s . In a mathematically precise sense , T ( V ) is the most general algebra that contains V ; it is a “ free construction ” . Since T ( V ) is realized as series of tensors of increasing degree , the free algebra T ( V ) is also known as the tensor algebra in the literature . Appendix A contains background on tensors and further examples . Lifting static feature maps . Step ( i ) in the construction of Φ requires turning a given feature map φ : X → V into a map ϕ : X → T ( V ) . Throughout the rest of this article we use the lift ϕ ( x ) = ( 1 , φ ( x ) , 0 , 0 . . . ) ∈ T ( V ) . ( 6 ) We discuss other choices in Appendix B , but attractive properties of the lift 6 are that ( a ) the evaluation of Φ against low rank tensors becomes a simple recursive formula ( Proposition 3.3 , ( b ) it is a generalization of sequence sub-pattern matching as used in string kernels ( Appendix B.3 , ( c ) despite its simplicity it performs exceedingly well in practice ( Section 4 ) . Extending to sequences of arbitrary length . Steps ( i ) and ( ii ) in the construction specify how the map Φ : X → T ( V ) behaves on sequences of length-1 , that is , single observations . Step ( iii ) amounts to the requirement that for any two sequences x = ( x1 , . . . , xK ) , y = ( y1 , . . . , yL ) ∈ Seq ( V ) , their concatenation defined as z = ( x1 , . . . , xK , y1 , . . . , yL ) ∈ Seq ( V ) can be understood in the feature space as ( non-commutative ) multiplication of their corresponding features Φ ( z ) = Φ ( x ) · Φ ( y ) . ( 7 ) In other words , we inductively extend the lift ϕ to sequences of arbitrary length by starting from sequences consisting of a single observation , which is given in equation 2 . Repeatedly applying the definition of the tensor convolution product in equation 5 leads to the following explicit formula Φm ( x ) = ∑ 1≤i1 < ··· < im≤L xi1 ⊗ · · · ⊗ xim ∈ V ⊗m , Φ ( x ) = ( Φm ( x ) ) m≥0 , ( 8 ) where x = ( x1 , . . . , xL ) ∈ Seq ( V ) and the summation is over non-contiguous subsequences of x . Some intuition : generalized pattern matching . Our derivation of the feature map Φ ( x ) = ( 1 , Φ1 ( x ) , Φ2 ( x ) , . . . ) ∈ T ( V ) was guided by general algebraic principles , but equation 8 provides an intuitive interpretation . It shows that for each m ≥ 1 , the entry Φm ( x ) ∈ V ⊗m constructs a summary of a long sequence x = ( x1 , . . . , xL ) ∈ Seq ( V ) based on subsequences ( xi1 , . . . , xim ) of x of length-m . It does this by taking the usual outer tensor product xi1 ⊗ · · · ⊗ xim ∈ V ⊗m and summing over all possible subsequences . This is completely analogous to how string kernels provide a structured description of text by looking at non-contiguous substrings of length-m ( indeed , Appendix B.3 makes this rigorous ) . However , the main difference is that the above construction works for arbitrary sequences and not just sequences of discrete letters . Readers with less mathematical background might simply take this as motivation and regard equation 8 as definition . However , the algebraic background allows to prove that Φ is universal , see Theorem 2.1 below . Universality . A function φ : X → V is said to be universal for X if all continuous functions on X can be approximated as linear functions on the image of φ . One of the most powerful features of neural nets is their universality ( Hornik , 1991 ) . A very attractive property of Φ is that it preserves universality : if φ : X → V is universal forX , then Φ : Seq ( X ) → T ( V ) is universal for Seq ( X ) . To make this precise , note that V ⊗m is a linear space and therefore any ` = ( ` 0 , ` 1 , . . . , ` M , 0 , 0 , . . . ) ∈ T ( V ) consisting of M tensors ` m ∈ V ⊗m , yields a linear functional on T ( V ) ; e.g . if V = Rd and we identify ` m in coordinates as ` m = ( ` i1 , ... , imm ) i1 , ... , im∈ { 1 , ... , d } then 〈 ` , t〉 : = M∑ m=0 〈 ` m , tm〉 = M∑ m=0 ∑ i1 , ... , im∈ { 1 , ... , d } ` i1 , ... , imm t i1 , ... , im m . ( 9 ) Thus linear functionals of the feature map Φ , are real-valued functions of sequences . Theorem 2.1 below shows that any continuous function f : Seq ( X ) → R can by arbitrary well approximated by a ` ∈ T ( V ) , f ( x ) ≈ 〈 ` , Φ ( x ) 〉 . Theorem 2.1 . Let φ : X → V be a universal map with a lift that satisfies some mild constraints , then the following map is universal : Φ : Seq ( X ) → T ( V ) , x 7→ Φ ( x ) . ( 10 ) A detailed proof and the precise statement of Theorem 2.1 is given in Appendix B . | This paper proposes to embed static feature maps into a larger linear space and shows that the proposed method achieves good performance on standard benchmarks. Detailed proofs and theoretical results are given in the appendices. The use of free algebras in ML seems novel and under-explored, although it is classical in mathematics. This paper shows that algebraic structure can significantly elevate the performance of existing models empirically. | SP:26e8b2aa5dd4391723debdf5af6add655c7a3586 |
Graph Information Bottleneck for Subgraph Recognition | 1 INTRODUCTION . Classifying the underlying labels or properties of graphs is a fundamental problem in deep graph learning with applications across many fields , such as biochemistry and social network analysis . However , real world graphs are likely to contain redundant even noisy information ( Franceschi et al. , 2019 ; Yu et al. , 2019 ) , which poses a huge negative impact for graph classification . This triggers an interesting problem of recognizing an informative yet compressed subgraph from the original graph . For example , in drug discovery , when viewing molecules as graphs with atoms as nodes and chemical bonds as edges , biochemists are interested in identifying the subgraphs that mostly represent certain properties of the molecules , namely the functional groups ( Jin et al. , 2020b ; Gilmer et al. , 2017 ) . In graph representation learning , the predictive subgraph highlights the vital substructure for graph classification , and provides an alternative way for yielding graph representation besides mean/sum aggregation ( Kipf & Welling , 2017 ; Velickovic et al. , 2017 ; Xu et al. , 2019 ) and pooling aggregation ( Ying et al. , 2018 ; Lee et al. , 2019 ; Bianchi et al. , 2020 ) . In graph attack and defense , it is vital to purify a perturbed graph and mine the robust structures for classification ( Jin et al. , 2020a ) . Recently , the mechanism of self-attentive aggregation ( Li et al. , 2019 ) somehow discovers a vital substructure at node level with a well-selected threshold . However , this method only identifies isolated important nodes but ignores the topological information at subgraph level . Consequently , it ∗This work was done when Junchi Yu was a research intern at Tencent AI LAB . †Corresponding Author leads to a novel challenge as subgraph recognition : How can we recognize a compressed subgraph with minimum information loss in terms of predicting the graph labels/properties ? Recalling the above challenge , there is a similar problem setting in information theory called information bottleneck ( IB ) principle ( Tishby et al. , 1999 ) , which aims to juice out a compressed data from the original data that keeps most predictive information of labels or properties . Enhanced with deep learning , IB can learn informative representation from regular data in the fields of computer vision ( Peng et al. , 2019 ; Alemi et al. , 2017 ; Luo et al. , 2019 ) , reinforcement learning ( Goyal et al. , 2019 ; Igl et al. , 2019 ) and natural language precessing ( Wang et al. , 2020 ) . However , current IB methods , like VIB ( Alemi et al. , 2017 ) , is still incapable for irregular graph data . It is still challenging for IB to compress irregular graph data , like a subgraph from an original graph , with a minimum information loss . Hence , we advance the IB principle for irregular graph data to resolve the proposed subgraph recognition problem , which leads to a novel principle , Graph Information Bottleneck ( GIB ) . Different from prior researches in IB that aims to learn an optimal representation of the input data in the hidden space , GIB directly reveals the vital substructure in the subgraph level . We first i ) leverage the mutual information estimator from Deep Variational Information Bottleneck ( VIB ) ( Alemi et al. , 2017 ) for irregular graph data as the GIB objective . However , VIB is intractable to compute the mutual information without knowing the distribution forms , especially on graph data . To tackle this issue , ii ) we adopt a bi-level optimization scheme to maximize the GIB objective . Meanwhile , the continuous relaxation that we adopt to approach the discrete selection of subgraph will lead to unstable optimization process . To further stabilize the training process and encourage a compact subgraph , iii ) we propose a novel connectivity loss to assist GIB to effectively discover the maximally informative but compressed subgraph , which is defined as IB-subgraph . By optimizing the above GIB objective and connectivity loss , one can recognize the IB-subgraph without any explicit subgraph annotation . On the other hand , iv ) GIB is model-agnostic and can be easily plugged into various Graph Neural Networks ( GNNs ) . We evaluate the properties of the IB-subgraph in three application scenarios : improvement of graph classification , graph interpretation , and graph denoising . Extensive experiments on both synthetic and real world datasets demonstrate that the information-theoretic IB-subgraph enjoys superior graph properties compared to the subgraphs found by SOTA baselines . 2 RELATED WORK . Graph Classification . In recent literature , there is a surge of interest in adopting graph neural networks ( GNN ) in graph classification . The core idea is to aggregate all the node information for graph representation . A typical implementation is the mean/sum aggregation ( Kipf & Welling , 2017 ; Xu et al. , 2019 ) , which is to average or sum up the node embeddings . An alternative way is to leverage the hierarchical structure of graphs , which leads to the pooling aggregation ( Ying et al. , 2018 ; Zhang et al. , 2018 ; Lee et al. , 2019 ; Bianchi et al. , 2020 ) . When tackling with the redundant and noisy graphs , these approaches will likely to result in sub-optimal graph representation . Recently , InfoGraph ( Sun et al. , 2019 ) maximize the mutual information between graph representations and multi-level local representations to obtain more informative global representations . Information Bottleneck . Information bottleneck ( IB ) , originally proposed for signal processing , attempts to find a short code of the input signal but preserve maximum information of the code ( Tishby et al. , 1999 ) . ( Alemi et al. , 2017 ) firstly bridges the gap between IB and the deep learning , and proposed variational information bottleneck ( VIB ) . Nowadays , IB and VIB have been wildly employed in computer vision ( Peng et al. , 2019 ; Luo et al. , 2019 ) , reinforcement learning ( Goyal et al. , 2019 ; Igl et al. , 2019 ) , natural language processing ( Wang et al. , 2020 ) and speech and acoustics ( Qian et al. , 2020 ) due to the capability of learning compact and meaningful representations . However , IB is less researched on irregular graphs due to the intractability of mutual information . Subgraph Discovery . Traditional subgraph discovery includes dense subgraph discovery and frequent subgraph mining . Dense subgraph discovery aims to find the subgraph with the highest density ( e.g . the number of edges over the number of nodes ( Fang et al. , 2019 ; Gionis & Tsourakakis , 2015 ) ) . Frequent subgraph mining is to look for the most common substructure among graphs ( Yan & Yan , 2002 ; Ketkar et al. , 2005 ; Zaki , 2005 ) . At node-level , researchers discover the vital substructure via the attention mechanism ( Velickovic et al. , 2017 ; Lee et al. , 2019 ; Knyazev et al. , 2019 ) . Ying et al . ( 2019 ) further identifies the important computational graph for node classification . Alsentzer et al . ( 2020 ) discovers subgraph representations with specific topology given subgraph-level annotation . Recently , it is popular to select a neighborhood subgraph of a central node to do message passing in node representation learning . DropEdge ( Rong et al. , 2020 ) relieves the over-smoothing phenomenon in deep GCNs by randomly dropping a portion of edges in graph data . Similar to DropEdge , DropNode ( Chen et al. , 2018 ; Hamilton et al. , 2017 ; Huang et al. , 2018 ) principle is also widely adopted in node representation learning . FastGCN ( Chen et al. , 2018 ) and ASGCN ( Huang et al. , 2018 ) accelerate GCN training via node sampling . GraphSAGE ( Hamilton et al. , 2017 ) leverages neighborhood sampling for inductive node representation learning . NeuralSparse ( Zheng et al. , 2020 ) select Top-K ( K is a hyper-parameter ) task-relevant 1-hop neighbors of a central node for robust node classification . Similarly , researchers discover the vital substructure at node level via the attention mechanism ( Velickovic et al. , 2017 ; Lee et al. , 2019 ; Knyazev et al. , 2019 ) . 3 NOTATIONS AND PRELIMINARIES . Let { ( G1 , Y1 ) , . . . , ( GN , YN ) } be a set of N graphs with their real value properties or categories , where Gn refers to the n-th graph and Yn refers to the corresponding properties or labels . We denote by Gn = ( V , E , A , X ) the n-th graph of size Mn with node set V = { Vi|i = 1 , . . . , Mn } , edge set E = { ( Vi , Vj ) |i > j ; Vi , Vj is connected } , adjacent matrix A ∈ { 0 , 1 } Mn×Mn , and feature matrix X ∈ RMn×d of V with d dimensions , respectively . Denote the neighborhood of Vi as N ( Vi ) = { Vj | ( Vi , Vj ) ∈ E } . We use Gsub as a specific subgraph and Gsub as the complementary structure of Gsub in G. Let f : G → R/ [ 0 , 1 , · · · , n ] be the mapping from graphs to the real value property or category , Y , G is the domain of the input graphs . I ( X , Y ) refers to the Shannon mutual information of two random variables . 3.1 GRAPH CONVOLUTIONAL NETWORK . Graph convolutional network ( GCN ) is widely adopted to graph classification . Given a graph G = ( V , E ) with node feature X and adjacent matrix A , GCN outputs the node embeddings X ′ from the following process : X ′ = GCN ( A , X ; W ) = ReLU ( D− 1 2 ÂD− 1 2XW ) , ( 1 ) where D refers to the diagonal matrix with nodes ’ degrees and W refers to the model parameters . One can simply sum up the node embeddings to get a fixed length graph embeddings ( Xu et al. , 2019 ) . Recently , researchers attempt to exploit hierarchical structure of graphs , which leads to various graph pooling methods ( Li et al. , 2019 ; Gao & Ji , 2019 ; Lee et al. , 2019 ; Diehl , 2019 ; Zhang et al. , 2018 ; Ranjan et al. , 2020 ; Ying et al. , 2018 ) . Li et al . ( 2019 ) enhances the graph pooling with self-attention mechanism to leverage the importance of different nodes contributing to the results . Finally , the graph embedding is obtained by multiplying the node embeddings with the normalized attention scores : E = Att ( X ′ ) = softmax ( Φ2tanh ( Φ1X ′T ) ) X ′ , ( 2 ) where Φ1 and Φ2 refers to the model parameters of self-attention . 3.2 OPTIMIZING INFORMATION BOTTLENECK OBJECTIVE . Given the input signal X and the label Y , the objective of IB is maximized to find the the internal code Z : maxZ I ( Z , Y ) − βI ( X , Z ) , where β refers to a hyper-parameter trading off informativeness and compression . Optimizing this objective will lead to a compact but informative Z. Alemi et al . ( 2017 ) optimize a tractable lower bound of the IB objective : LV IB = 1 N ∑N i=1 ∫ p ( z|xi ) log qφ ( yi|z ) dz − βKL ( p ( z|xi ) |r ( z ) ) , ( 3 ) where qφ ( yi|z ) is the variational approximation to pφ ( yi|z ) and r ( z ) is the prior distribution of Z . However , it is hard to estimate the mutual information in high dimensional space when the distribution forms are inaccessible , especially for irregular graph data . | I think this is a nice paper that successfully used information theoretic objective functions for graph representation learning. The authors leveraged the DONSKER approximation of mutual information for a global information bottleneck loss used on the input-space instead of learned latent-space. To help stabilise optimisation, the authors also use bi-level optimisation with more iterations on the inner $I(G, G_{sub})$ as well as automatic masks learning through their $L_{con}$ loss. The authors also showed many experiments on graph classification, denoising, and interpretation tasks. | SP:f2ed2231574562ccb4154e423154e1095c58ffa8 |
Graph Information Bottleneck for Subgraph Recognition | 1 INTRODUCTION . Classifying the underlying labels or properties of graphs is a fundamental problem in deep graph learning with applications across many fields , such as biochemistry and social network analysis . However , real world graphs are likely to contain redundant even noisy information ( Franceschi et al. , 2019 ; Yu et al. , 2019 ) , which poses a huge negative impact for graph classification . This triggers an interesting problem of recognizing an informative yet compressed subgraph from the original graph . For example , in drug discovery , when viewing molecules as graphs with atoms as nodes and chemical bonds as edges , biochemists are interested in identifying the subgraphs that mostly represent certain properties of the molecules , namely the functional groups ( Jin et al. , 2020b ; Gilmer et al. , 2017 ) . In graph representation learning , the predictive subgraph highlights the vital substructure for graph classification , and provides an alternative way for yielding graph representation besides mean/sum aggregation ( Kipf & Welling , 2017 ; Velickovic et al. , 2017 ; Xu et al. , 2019 ) and pooling aggregation ( Ying et al. , 2018 ; Lee et al. , 2019 ; Bianchi et al. , 2020 ) . In graph attack and defense , it is vital to purify a perturbed graph and mine the robust structures for classification ( Jin et al. , 2020a ) . Recently , the mechanism of self-attentive aggregation ( Li et al. , 2019 ) somehow discovers a vital substructure at node level with a well-selected threshold . However , this method only identifies isolated important nodes but ignores the topological information at subgraph level . Consequently , it ∗This work was done when Junchi Yu was a research intern at Tencent AI LAB . †Corresponding Author leads to a novel challenge as subgraph recognition : How can we recognize a compressed subgraph with minimum information loss in terms of predicting the graph labels/properties ? Recalling the above challenge , there is a similar problem setting in information theory called information bottleneck ( IB ) principle ( Tishby et al. , 1999 ) , which aims to juice out a compressed data from the original data that keeps most predictive information of labels or properties . Enhanced with deep learning , IB can learn informative representation from regular data in the fields of computer vision ( Peng et al. , 2019 ; Alemi et al. , 2017 ; Luo et al. , 2019 ) , reinforcement learning ( Goyal et al. , 2019 ; Igl et al. , 2019 ) and natural language precessing ( Wang et al. , 2020 ) . However , current IB methods , like VIB ( Alemi et al. , 2017 ) , is still incapable for irregular graph data . It is still challenging for IB to compress irregular graph data , like a subgraph from an original graph , with a minimum information loss . Hence , we advance the IB principle for irregular graph data to resolve the proposed subgraph recognition problem , which leads to a novel principle , Graph Information Bottleneck ( GIB ) . Different from prior researches in IB that aims to learn an optimal representation of the input data in the hidden space , GIB directly reveals the vital substructure in the subgraph level . We first i ) leverage the mutual information estimator from Deep Variational Information Bottleneck ( VIB ) ( Alemi et al. , 2017 ) for irregular graph data as the GIB objective . However , VIB is intractable to compute the mutual information without knowing the distribution forms , especially on graph data . To tackle this issue , ii ) we adopt a bi-level optimization scheme to maximize the GIB objective . Meanwhile , the continuous relaxation that we adopt to approach the discrete selection of subgraph will lead to unstable optimization process . To further stabilize the training process and encourage a compact subgraph , iii ) we propose a novel connectivity loss to assist GIB to effectively discover the maximally informative but compressed subgraph , which is defined as IB-subgraph . By optimizing the above GIB objective and connectivity loss , one can recognize the IB-subgraph without any explicit subgraph annotation . On the other hand , iv ) GIB is model-agnostic and can be easily plugged into various Graph Neural Networks ( GNNs ) . We evaluate the properties of the IB-subgraph in three application scenarios : improvement of graph classification , graph interpretation , and graph denoising . Extensive experiments on both synthetic and real world datasets demonstrate that the information-theoretic IB-subgraph enjoys superior graph properties compared to the subgraphs found by SOTA baselines . 2 RELATED WORK . Graph Classification . In recent literature , there is a surge of interest in adopting graph neural networks ( GNN ) in graph classification . The core idea is to aggregate all the node information for graph representation . A typical implementation is the mean/sum aggregation ( Kipf & Welling , 2017 ; Xu et al. , 2019 ) , which is to average or sum up the node embeddings . An alternative way is to leverage the hierarchical structure of graphs , which leads to the pooling aggregation ( Ying et al. , 2018 ; Zhang et al. , 2018 ; Lee et al. , 2019 ; Bianchi et al. , 2020 ) . When tackling with the redundant and noisy graphs , these approaches will likely to result in sub-optimal graph representation . Recently , InfoGraph ( Sun et al. , 2019 ) maximize the mutual information between graph representations and multi-level local representations to obtain more informative global representations . Information Bottleneck . Information bottleneck ( IB ) , originally proposed for signal processing , attempts to find a short code of the input signal but preserve maximum information of the code ( Tishby et al. , 1999 ) . ( Alemi et al. , 2017 ) firstly bridges the gap between IB and the deep learning , and proposed variational information bottleneck ( VIB ) . Nowadays , IB and VIB have been wildly employed in computer vision ( Peng et al. , 2019 ; Luo et al. , 2019 ) , reinforcement learning ( Goyal et al. , 2019 ; Igl et al. , 2019 ) , natural language processing ( Wang et al. , 2020 ) and speech and acoustics ( Qian et al. , 2020 ) due to the capability of learning compact and meaningful representations . However , IB is less researched on irregular graphs due to the intractability of mutual information . Subgraph Discovery . Traditional subgraph discovery includes dense subgraph discovery and frequent subgraph mining . Dense subgraph discovery aims to find the subgraph with the highest density ( e.g . the number of edges over the number of nodes ( Fang et al. , 2019 ; Gionis & Tsourakakis , 2015 ) ) . Frequent subgraph mining is to look for the most common substructure among graphs ( Yan & Yan , 2002 ; Ketkar et al. , 2005 ; Zaki , 2005 ) . At node-level , researchers discover the vital substructure via the attention mechanism ( Velickovic et al. , 2017 ; Lee et al. , 2019 ; Knyazev et al. , 2019 ) . Ying et al . ( 2019 ) further identifies the important computational graph for node classification . Alsentzer et al . ( 2020 ) discovers subgraph representations with specific topology given subgraph-level annotation . Recently , it is popular to select a neighborhood subgraph of a central node to do message passing in node representation learning . DropEdge ( Rong et al. , 2020 ) relieves the over-smoothing phenomenon in deep GCNs by randomly dropping a portion of edges in graph data . Similar to DropEdge , DropNode ( Chen et al. , 2018 ; Hamilton et al. , 2017 ; Huang et al. , 2018 ) principle is also widely adopted in node representation learning . FastGCN ( Chen et al. , 2018 ) and ASGCN ( Huang et al. , 2018 ) accelerate GCN training via node sampling . GraphSAGE ( Hamilton et al. , 2017 ) leverages neighborhood sampling for inductive node representation learning . NeuralSparse ( Zheng et al. , 2020 ) select Top-K ( K is a hyper-parameter ) task-relevant 1-hop neighbors of a central node for robust node classification . Similarly , researchers discover the vital substructure at node level via the attention mechanism ( Velickovic et al. , 2017 ; Lee et al. , 2019 ; Knyazev et al. , 2019 ) . 3 NOTATIONS AND PRELIMINARIES . Let { ( G1 , Y1 ) , . . . , ( GN , YN ) } be a set of N graphs with their real value properties or categories , where Gn refers to the n-th graph and Yn refers to the corresponding properties or labels . We denote by Gn = ( V , E , A , X ) the n-th graph of size Mn with node set V = { Vi|i = 1 , . . . , Mn } , edge set E = { ( Vi , Vj ) |i > j ; Vi , Vj is connected } , adjacent matrix A ∈ { 0 , 1 } Mn×Mn , and feature matrix X ∈ RMn×d of V with d dimensions , respectively . Denote the neighborhood of Vi as N ( Vi ) = { Vj | ( Vi , Vj ) ∈ E } . We use Gsub as a specific subgraph and Gsub as the complementary structure of Gsub in G. Let f : G → R/ [ 0 , 1 , · · · , n ] be the mapping from graphs to the real value property or category , Y , G is the domain of the input graphs . I ( X , Y ) refers to the Shannon mutual information of two random variables . 3.1 GRAPH CONVOLUTIONAL NETWORK . Graph convolutional network ( GCN ) is widely adopted to graph classification . Given a graph G = ( V , E ) with node feature X and adjacent matrix A , GCN outputs the node embeddings X ′ from the following process : X ′ = GCN ( A , X ; W ) = ReLU ( D− 1 2 ÂD− 1 2XW ) , ( 1 ) where D refers to the diagonal matrix with nodes ’ degrees and W refers to the model parameters . One can simply sum up the node embeddings to get a fixed length graph embeddings ( Xu et al. , 2019 ) . Recently , researchers attempt to exploit hierarchical structure of graphs , which leads to various graph pooling methods ( Li et al. , 2019 ; Gao & Ji , 2019 ; Lee et al. , 2019 ; Diehl , 2019 ; Zhang et al. , 2018 ; Ranjan et al. , 2020 ; Ying et al. , 2018 ) . Li et al . ( 2019 ) enhances the graph pooling with self-attention mechanism to leverage the importance of different nodes contributing to the results . Finally , the graph embedding is obtained by multiplying the node embeddings with the normalized attention scores : E = Att ( X ′ ) = softmax ( Φ2tanh ( Φ1X ′T ) ) X ′ , ( 2 ) where Φ1 and Φ2 refers to the model parameters of self-attention . 3.2 OPTIMIZING INFORMATION BOTTLENECK OBJECTIVE . Given the input signal X and the label Y , the objective of IB is maximized to find the the internal code Z : maxZ I ( Z , Y ) − βI ( X , Z ) , where β refers to a hyper-parameter trading off informativeness and compression . Optimizing this objective will lead to a compact but informative Z. Alemi et al . ( 2017 ) optimize a tractable lower bound of the IB objective : LV IB = 1 N ∑N i=1 ∫ p ( z|xi ) log qφ ( yi|z ) dz − βKL ( p ( z|xi ) |r ( z ) ) , ( 3 ) where qφ ( yi|z ) is the variational approximation to pφ ( yi|z ) and r ( z ) is the prior distribution of Z . However , it is hard to estimate the mutual information in high dimensional space when the distribution forms are inaccessible , especially for irregular graph data . | The paper introduces the Graph Information Bottleneck (GIB) which aims to learn the most-informative compressed representation $Z$ given graph $G$ with associated label $Y$. Further, it defines GIB-Subgraph which aims to learn the compressed representation as the subgraph $G_{sub}$ which maximizes the mutual information within the family of subgraphs ${\cal G}_sub$ of $G$. The paper introduces bi-level optimization objective which has the following parts: | SP:f2ed2231574562ccb4154e423154e1095c58ffa8 |
A Half-Space Stochastic Projected Gradient Method for Group Sparsity Regularization | 1 INTRODUCTION . In many recent machine learning optimization tasks , researchers not only focus on finding solutions with small prediction/generalization error but also concentrate on improving the interpretation of model by filtering out redundant parameters and achieving slimmer model architectures . One technique to achieve the above goal is by augmenting the sparsity-inducing regularization terms to the raw objective functions to generate sparse solutions ( including numerous zero elements ) . The popular ` 1-regularization promotes the sparsity of solutions by element-wise penalizing the optimization variables . However , in many practical applications , there exist additional constraints on variables such that the zero coefficients are often not randomly distributed but tend to be clustered into varying more sophisticated sparsity structures , e.g. , disjoint and overlapping groups and hierarchy ( Yuan & Lin , 2006 ; Huang et al. , 2010 ; 2009 ) . As the most important and natural form of structured sparsity , the disjoint group-sparsity regularization , which assumes the pre-specified disjoint blocks of variables are selected ( non-zero variables ) or ignored ( zero variables ) simultaneously ( Bach et al. , 2012 ) , serves as a momentous role in general structured sparsity learning tasks since other instances such as overlapping group and hierarchical sparsity are typically solved by converting into the equivalent disjoint group versions via introducing latent variables ( Bach et al. , 2012 ) , and has found numerous applications in computer vision ( Elhamifar et al. , 2012 ) , signal processing ( Chen & Selesnick , 2014 ) , medical imaging ( Liu et al. , 2018 ) , and deep learning ( Scardapane et al. , 2017 ) , especially on the model compression of deep neural networks , where the group sparsity1 is leveraged to remove redundant entire hidden structures directly . Problem Setting . We study the disjoint group sparsity regularization problem which can be typically formulated as the mixed ` 1/ ` p-regularization problem , and pay special attention to the most popular and widely used instance p as 2 ( Bach et al. , 2012 ; Halabi et al. , 2018 ) , minimize x∈Rn { Ψ ( x ) def = f ( x ) + λΩ ( x ) = 1 N N∑ i=1 fi ( x ) + λ ∑ g∈G ‖ [ x ] g‖ } , ( 1 ) where λ > 0 is a weighting factor , ‖·‖ denotes ` 2-norm , f ( x ) is the average of numerous N continuously differentiable instance functions fi : Rn → R , such as the loss functions measuring the deviation from the observations in various data fitting problems , Ω ( x ) is the so-called mixed ` 1/ ` 2 1Group sparsity is defined as # of zero groups , where a zero group means all its variables are exact zeros . norm , G is a prescribed fixed partition of index set I = { 1 , 2 , · · · , n } , wherein each component g ∈ G indexes a group of variables upon the perspective of applications . Theoretically , a larger λ typically results in a higher group sparsity while sacrifices more on the bias of model estimation , hence λ needs to be carefully fine-tuned to achieve both low f and high group-sparse solutions . Literature Review . Problem ( 1 ) has been well studied in deterministic optimization with various algorithms that are capable of returning solutions with both low objective value and high group sparsity under proper λ ( Yuan & Lin , 2006 ; Roth & Fischer , 2008 ; Huang et al. , 2011 ; Ndiaye et al. , 2017 ) . Proximal methods are classical approaches to solve the structured non-smooth optimization ( 1 ) , including the popular proximal gradient method ( Prox-FG ) which only uses the first-order derivative information . When N is huge , stochastic methods become ubiquitous to operate on a small subset to avoid the costly evaluation over all instances in deterministic methods for large-scale problems . Proximal stochastic gradient method ( Prox-SG ) ( Duchi & Singer , 2009 ) is the natural stochastic extension of Prox-FG . Regularized dual-averaging method ( RDA ) ( Xiao , 2010 ; Yang et al. , 2010 ) is proposed by extending the dual averaging scheme in ( Nesterov , 2009 ) . To improve the convergence rate , there exists a set of incremental gradient methods inspired by SAG ( Roux et al. , 2012 ) to utilizes the average of accumulated past gradients . For example , proximal stochastic variance-reduced gradient method ( Prox-SVRG ) ( Xiao & Zhang , 2014 ) and proximal spider ( Prox-Spider ) ( Zhang & Xiao , 2019 ) are developed to adopt multi-stage schemes based on the well-known variance reduction technique SVRG proposed in ( Johnson & Zhang , 2013 ) and Spider developed in ( Fang et al. , 2018 ) respectively . SAGA ( Defazio et al. , 2014 ) stands as the midpoint between SAG and Prox-SVRG . Compared to deterministic methods , the studies of mixed ` 1/ ` 2-regularization ( 1 ) in stochastic field become somewhat rare and limited . Prox-SG , RDA , Prox-SVRG , Prox-Spider and SAGA are valuable state-of-the-art stochastic algorithms for solving problem ( 1 ) but with apparent weakness . Particularly , these existing stochastic algorithms typically meet difficulties to achieve both decent convergence and effective group sparsity identification simultaneously ( e.g. , small function values but merely dense solutions ) , because of the randomness and the limited sparsity-promotion mechanisms . In depth , Prox-SG , RDA , Prox-SVRG , Prox-Spider and SAGA derive from proximal gradient method to utilize the proximal operator to produce group of zero variables . Such operator is generic to extensive non-smooth problems , consequently perhaps not sufficiently insightful if the target problems possess certain properties , e.g. , the group sparsity structure as problem ( 1 ) . In fact , in convex setting , the proximal operator suffers from variance of gradient estimate ; and in non-convex setting , especially deep learning , the discreet step size ( learning rate ) further deteriorates its effectiveness on the group sparsity promotion , as will show in Section 2 that the projection region vanishes rapidly except RDA . RDA has superiority on finding manifold structure to others ( Lee & Wright , 2012 ) , but inferiority on the objective convergence . Besides , the variance reduction techniques are typically required to measure over a huge mini-batch data points in both theory and practice which is probably prohibitive for large-scale problems , and have been observed as sometimes noneffective for deep learning applications ( Defazio & Bottou , 2019 ) . On the other hand , to introduce sparsity , there exist heuristic weight pruning methods ( Li et al. , 2016 ; Luo et al. , 2017 ) , whereas they commonly do not equip with theoretical guarantee , so that easily diverge and hurt generalization accuracy . Our Contributions . Half-Space Stochastic Projected Gradient ( HSPG ) method overcomes the limitations of the existing stochastic algorithms on the group sparsity identification , while maintains comparable convergence characteristics . While the main-stream works on ( group ) sparsity have focused on using proximal operators of regularization , our method is unique and fresh in enforcing group sparsity more effectively by leveraging half-space structure and is well supported by the theoretical analysis and empirical evaluations . We now summarize our contributions as follows . • Algorithmic Design : We propose the HSPG to solve the disjoint group sparsity regularized problem as ( 1 ) . Initialized with a Prox-SG Step for seeking a close-enough but perhaps dense solution estimate , the algorithmic framework relies on a novel Half-Space Step to exploit group sparse patterns . We delicately design the Half-Space Step with the following main features : ( i ) it utilizes previous iterate as the normal direction to construct a reduced space consisting of a set of halfspaces and the origin ; ( ii ) a new group projection operator maps groups of variables onto zero if they fall out of the constructed reduced space to identify group sparsity considerably more effectively than the proximal operator ; and ( iii ) with proper step size , the Half-Space Step enjoys the sufficient decrease property , and achieves progress to optimum in both theory and practice . • Theoretical Guarantee : We provide the convergence guarantees of HSPG . Moreover , we prove HSPG has looser requirements to identify the sparsity pattern than Prox-SG , revealing its superiority on the group sparsity exploration . Particularly , for the sparsity pattern identification , the required distance to the optimal solution x∗ of HSPG is better than the distance required by Prox-SG . • Numerical Experiments : Experimentally , HSPG outperforms the state-of-the-art methods in the aspect of the group sparsity exploration , and achieves competitive objective value convergence and runtime in both convex and non-convex problems . In the popular deep learning tasks , HSPG usually computes the solutions with multiple times higher group sparsity and similar generalization performance on unseen testing data than those generated by the competitors , which may be further used to construct smaller and more efficient network architectures . 2 THE HSPG METHOD . We state the Half-Space Stochastic Projected Gradient ( HSPG ) method in Algorithm 1 . In general , it contains two stages : Initialization Stage and Group-Sparsity Stage . The first Initialization Stage employs Prox-SG Step ( Algorithm 2 ) to search for a close-enough but usually non-sparse solution estimate . Then the second and fundamental stage proceeds Half-Space Step ( Algorithm 3 ) started with the non-sparse solution estimate to effectively exploit the group sparsity within a sequence of reduced spaces , and converges to the group-sparse solutions with theoretical convergence property . Algorithm 1 Outline of HSPG for solving ( 1 ) . 1 : Input : x0 ∈ Rn , α0 ∈ ( 0 , 1 ) , ∈ [ 0 , 1 ) , and NP ∈ Z+ . 2 : for k = 0 , 1 , 2 , . . . do 3 : if k < NP then 4 : Compute xk+1 ← Prox-SG ( xk , αk ) by Algorithm 2 . 5 : else 6 : Compute xk+1 ← Half-Space ( xk , αk , ) by Algorithm 3 . 7 : Update αk+1 . Algorithm 2 Prox-SG Step . 1 : Input : Current iterate xk , and step size αk . 2 : Compute the stochastic gradient of f on mini-batch Bk ∇fBk ( xk ) ← 1 |Bk| ∑ i∈Bk ∇fi ( xk ) . ( 2 ) 3 : Return xk+1 ← ProxαkλΩ ( · ) ( xk − αk∇fBk ( xk ) ) . Initialization Stage . The Initialization Stage performs the vanilla proximal stochastic gradient method ( Prox-SG , Algorithm 2 ) to approach the solution of ( 1 ) . At kth iteration , a mini-batch Bk is sampled to generate an unbiased estimator of the full gradient of f ( line 2 , Algorithm 2 ) to compute a trial iterate x̂k+1 : = xk − αk∇fBk ( xk ) , where αk is the step size , and fBk is the average of the instance functions fi cross Bk . The next iterate xk+1 is then updated based on the proximal mapping xk+1 = ProxαkλΩ ( · ) ( x̂k+1 ) = arg min x∈Rn 1 2αk ‖x− x̂k+1‖2 + λΩ ( x ) , ( 3 ) where the regularization term Ω ( x ) is defined in ( 1 ) . Notice that the above subproblem ( 3 ) has a closed-form solution , where for each g ∈ G , we have [ xk+1 ] g = max { 0 , 1− αkλ/ ‖ [ x̂k+1 ] g‖ } · [ x̂k+1 ] g. ( 4 ) In HSPG , the Initialization Stage proceeds Prox-SG Step NP times as a localization mechanism to seek an estimation which is close enough to a solution of problem ( 1 ) , where NP : = min { k : k ∈ Z+ , ‖xk − x∗‖ ≤ R/2 } associated with a positive constant R related to the optima , see ( 23 ) in Appendix C. In practice , although the close-enough requirement is perhaps hard to be verified , we empirically suggest to keep running the Prox-SG Step until observing some stage-switch signal by testing on the stationarity of objective values , norm of ( sub ) gradient or validation accuracy similarly to ( Zhang et al. , 2020 ) . However , the Initialization Stage alone is insufficient to exploit the group sparsity structure , i.e. , the computed solution estimate is typically dense , due to the randomness and the moderate truncation mechanism of proximal operator constrained in its projection region , i.e. , the trial iterate [ x̂k+1 ] g is projected to zero only if it falls into an ` 2-ball centered at the origin with radius αkλ by ( 4 ) . Our remedy is to incorporate it with the following Half-Space Step , which exhibits an effective sparsity promotion mechanism while still remains the convergent property . Algorithm 3 Half-Space Step 1 : Input : Current iterate xk , step size αk , and . 2 : Compute the stochastic gradient of Ψ on I 6=0 ( xk ) by mini-batch Bk [ ∇ΨBk ( xk ) ] I 6=0 ( xk ) ← 1 |Bk| ∑ i∈Bk [ ∇Ψi ( xk ) ] I 6=0 ( xk ) ( 5 ) 3 : Compute [ x̃k+1 ] I 6=0 ( xk ) ← [ xk − αk∇ΨBk ( xk ) ] I 6=0 ( xk ) and [ x̃k+1 ] I0 ( xk ) ← 0 . 4 : for each group g in I 6=0 ( xk ) do 5 : if [ x̃k+1 ] > g [ xk ] g < ‖ [ xk ] g‖ 2 then 6 : [ x̃k+1 ] g ← 0 . 7 : Return xk+1 ← x̃k+1 . Group-Sparsity Stage . The Group-Sparsity Stage is designed to effectively determine the groups of zero variables and capitalize convergence characteristic , which is in sharp contrast to other heuristic aggressive weight pruning methods but typically lacking theoretical guarantee ( Li et al. , 2016 ; Luo et al. , 2017 ) . The underlying intuition of its atomic Half-Space Step ( Algorithm 3 ) is to project [ xk ] g to zero only if − [ xk ] g serves as a descent step to Ψ ( xk ) , i.e. , − [ xk ] > g [ ∇Ψ ( xk ) ) ] g < 0 , hence updating [ xk+1 ] g ← [ xk ] g − [ xk ] g = 0 still results in some progress to the optimality . Before introducing that , we first define the following index sets for any x ∈ Rn : I0 ( x ) : = { g : g ∈ G , [ x ] g = 0 } and I 6=0 ( x ) : = { g : g ∈ G , [ x ] g 6= 0 } , ( 6 ) where I0 ( x ) represents the indices of groups of zero variables at x , and I 6=0 ( x ) indexes the groups of nonzero variables at x . To proceed , we further define an artificial set that x lies in : S ( x ) : = { z ∈ Rn : [ z ] g = 0 if g ∈ I0 ( x ) , and [ z ] > g [ x ] g ≥ ‖ [ x ] g‖ 2 if g ∈ I 6=0 ( x ) } ⋃ { 0 } , ( 7 ) which consists of half-spaces and the origin . Here the parameter > 0 controls the grey region presented in Figure 1b , and the exact way to set will be discussed in Section 4 and Appendix . Hence , x inhabits S ( xk ) , i.e. , x ∈ S ( xk ) , only if : ( i ) [ x ] g lies in the upper half-space for all g ∈ I 6=0 ( xk ) for some prescribed ∈ [ 0 , 1 ) as shown in Figure 1a ; and ( ii ) [ x ] g equals to zero for all g ∈ I0 ( xk ) . The fundamental assumption for Half-Space Step to success is that : the Initialization Stage has produced a ( possibly non-sparse ) solution estimate xk nearby a group sparse solution x∗ of problem ( 1 ) , i.e. , the optimal distance ‖xk − x∗‖ is sufficiently small . As seen in Appendix , it further indicates that the group sparse optimal solution x∗ inhabits Sk : = S ( xk ) , which implies that Sk has already covered the group-support of x∗ , i.e. , I 6=0 ( x∗ ) ⊆ I 6=0 ( xk ) . Our goal now becomes minimizing Ψ ( x ) over Sk to identify the remaining groups of zero variables , i.e. , I0 ( x∗ ) /I0 ( xk ) , which is formulated as the following smooth optimization problem : xk+1 = arg min x∈Sk Ψ ( x ) = f ( x ) + λΩ ( x ) . ( 8 ) By the definition of Sk , [ x ] I0 ( xk ) ≡ 0 are constrained as fixed during Algorithm 3 proceeding , and only the entries in I 6=0 ( xk ) are allowed to move . Hence Ψ ( x ) is smooth on Sk , and ( 8 ) is a reduced space optimization problem . A standard way to solve problem ( 8 ) would be the stochastic gradient descent equipped with Euclidean projection ( Nocedal & Wright , 2006 ) . However , such a projected method rarely produces zero ( group ) variables as the dense x̂E illustrated in Figure 1a . To address it , we introduce a novel projection operator to effectively conduct group projection as follows . As stated in Algorithm 3 , we first approximate the gradient of Ψ on the free variables in I 6=0 ( xk ) by [ ∇ΨBk ( xk ) ] I 6=0 ( xk ) ( line 2 , Algorithm 3 ) , then employ SGD to compute a trial point x̃k+1 ( line 3 , Algorithm 3 ) which is passed into a new projection operator ProjSk ( · ) defined as [ ProjSk ( z ) ] g : = { [ z ] g if [ z ] > g [ xk ] g ≥ ‖ [ xk ] g‖ 2 , 0 otherwise . ( 9 ) The above projector of form ( 9 ) is not the standard Euclidean projection operator in most cases2 , but still satisfies the following two advantages : ( i ) the actual search direction dk : = ( ProjSk ( x̃k+1 ) − xk ) /αk performs as a descent direction to ΨBk ( xk ) : = fBk ( xk ) + λΩ ( xk ) , i.e. , [ dk ] > g [ ∇ΨBk ( xk ) ) ] g < 0 as θ < 90◦ in Figure 1a , then the progress to the optimum is made via the sufficient decrease property as drawn in Lemma 1 ; and ( ii ) effectively project groups of variables to zero simultaneously if the inner product of corresponding entries is sufficiently small . In contrast , the Euclidean projection operator is far away effective to promote group sparsity , as the Euclidean projected point x̂E 6= 0 versus xk+1 = ProjSk ( x̃k+1 ) = 0 shown in Figure 1a . Lemma 1 . Algorithm 3 yields the next iteratexk+1 as ProjSk ( xk−αk∇ΨBk ( xk ) ) , then the search direction dk : = ( xk+1−xk ) /αk is a descent direction for ΨBk ( xk ) , i.e. , d > k∇ΨBk ( xk ) < 0 . Moreover , letting L be the Lipschitz constant for∇ΨBk on the feasible domain , and Ĝk : = I 6=0 ( xk ) ⋂ I0 ( xk+1 ) and G̃k : = I 6=0 ( xk ) ⋂ I 6=0 ( xk+1 ) be the sets of groups which projects or not onto zero , we have ΨBk ( xk+1 ) ≤ΨBk ( xk ) − ( αk − α2kL 2 ) ∑ g∈G̃k ‖ [ ∇ΨBk ( xk ) ] g‖ 2 − ( 1− αk − L 2 ) ∑ g∈Ĝk ‖ [ xk ] g‖2 . ( 10 ) We then intuitively illustrate the strength of HSPG on group sparsity exploration . In fact , the halfspace projection ( 9 ) is a more effective sparsity promotion mechanism compared to the existing methods . Particularly , it benefits from a much larger projection region to map a reference point x̂k+1 : = xk − αk∇fBk ( xk ) or its variants to zero . As the 2D case described in Figure 1b , the projection regions of Prox-SG , Prox-SVRG , Prox-Spider and SAGA are ` 2-balls with radius as αkλ . In stochastic learning , especially deep learning tasks , the step size αk is usually selected around 10−3 to 10−4 or even smaller for convergence . Together with the common setting of λ 1 , their projection regions would vanish rapidly , resulting in the difficulties to produce group sparsity . As a sharp contrast , even though αkλ is near zero , the projection region of HSPG { x : x > k x < ( αkλ+ ‖xk‖ ) ‖xk‖ } ( seen in Appendix ) is still an open half-space which contains those ` 2 balls as well as RDA ’ s if is large enough . Moreover , the positive control parameter adjusts the level of aggressiveness of group sparsity promotion ( 9 ) , i.e. , the larger the more aggressive , and meanwhile maintains the progress to the optimality by Lemma 1 . In practice , proper fine tuning is sometimes required to achieve both group sparsity enhancement and sufficient decrease on objective value as will see in Section 4 . Intuition of Two-Stage Method : To end this section , we discuss the advantage of designing such two stage schema rather than an adaptive switch back and forth between the Prox-SG Step and Half-Space Step based on some evaluation switching criteria , as many multi-step deterministic optimization algorithms ( Chen et al. , 2017 ) . In fact , we numerically observed that switching back to the Prox-SG Step consistently deteriorate the progress of group sparsity exploration by Half-Space Step while without obvious gain on convergence . Such regression on group sparsity by the Prox-SG Step 2Unless Ω ( x ) is ‖x‖1 where each g ∈ G is singleton , then Sk becomes an orthant face ( Chen et al. , 2020 ) . is less attractive in realistic applications , e.g. , model compression , where people usually possess heavy models of high generalization accuracy ahead and want to filter out the redundancy effectively . Therefore , in term of the ease of application , we end at organizing Prox-SG Step and Half-Space Step as such a two-stage schema , controlled by a switching hypermeter NP . In theory , we require NP sufficiently large to let the initial iterate of Half-Space Step be close enough to the local minimizer as shown in Section 3 . In practice , HSPG is sensitive to the choice of NP at early iterations , i.e. , switching to Half-Space Step too early may result accuracy loss . But such sensitivity vanishes rapidly if switching to Half-Space Step after some acceptable evaluation switching criteria . | The paper studies how to solve a class of group sparsity regularized minimization problems. In particular, a half-space stochastic projected gradient (HSPG) method is proposed, which is based on the Prox-SG and a new half-space step that promotes group sparsity. This step is to decompose the feasible space and then perform group projection. Convergence analysis is provided, together with the theoretical discussion that HSPG has looser requirements to identify the sparsity patter than Prox-SG. Numerical experiments on the DCNNs based image classification shows the proposed method achieves the state-of-the-art performance in terms of accuracy. The work looks interesting with wide applications, especially in deep neural networks. However, the novelty is incremental and limited. | SP:c64ba67ebf7b6abedb24f26cbd45e221cfd6b1d6 |
A Half-Space Stochastic Projected Gradient Method for Group Sparsity Regularization | 1 INTRODUCTION . In many recent machine learning optimization tasks , researchers not only focus on finding solutions with small prediction/generalization error but also concentrate on improving the interpretation of model by filtering out redundant parameters and achieving slimmer model architectures . One technique to achieve the above goal is by augmenting the sparsity-inducing regularization terms to the raw objective functions to generate sparse solutions ( including numerous zero elements ) . The popular ` 1-regularization promotes the sparsity of solutions by element-wise penalizing the optimization variables . However , in many practical applications , there exist additional constraints on variables such that the zero coefficients are often not randomly distributed but tend to be clustered into varying more sophisticated sparsity structures , e.g. , disjoint and overlapping groups and hierarchy ( Yuan & Lin , 2006 ; Huang et al. , 2010 ; 2009 ) . As the most important and natural form of structured sparsity , the disjoint group-sparsity regularization , which assumes the pre-specified disjoint blocks of variables are selected ( non-zero variables ) or ignored ( zero variables ) simultaneously ( Bach et al. , 2012 ) , serves as a momentous role in general structured sparsity learning tasks since other instances such as overlapping group and hierarchical sparsity are typically solved by converting into the equivalent disjoint group versions via introducing latent variables ( Bach et al. , 2012 ) , and has found numerous applications in computer vision ( Elhamifar et al. , 2012 ) , signal processing ( Chen & Selesnick , 2014 ) , medical imaging ( Liu et al. , 2018 ) , and deep learning ( Scardapane et al. , 2017 ) , especially on the model compression of deep neural networks , where the group sparsity1 is leveraged to remove redundant entire hidden structures directly . Problem Setting . We study the disjoint group sparsity regularization problem which can be typically formulated as the mixed ` 1/ ` p-regularization problem , and pay special attention to the most popular and widely used instance p as 2 ( Bach et al. , 2012 ; Halabi et al. , 2018 ) , minimize x∈Rn { Ψ ( x ) def = f ( x ) + λΩ ( x ) = 1 N N∑ i=1 fi ( x ) + λ ∑ g∈G ‖ [ x ] g‖ } , ( 1 ) where λ > 0 is a weighting factor , ‖·‖ denotes ` 2-norm , f ( x ) is the average of numerous N continuously differentiable instance functions fi : Rn → R , such as the loss functions measuring the deviation from the observations in various data fitting problems , Ω ( x ) is the so-called mixed ` 1/ ` 2 1Group sparsity is defined as # of zero groups , where a zero group means all its variables are exact zeros . norm , G is a prescribed fixed partition of index set I = { 1 , 2 , · · · , n } , wherein each component g ∈ G indexes a group of variables upon the perspective of applications . Theoretically , a larger λ typically results in a higher group sparsity while sacrifices more on the bias of model estimation , hence λ needs to be carefully fine-tuned to achieve both low f and high group-sparse solutions . Literature Review . Problem ( 1 ) has been well studied in deterministic optimization with various algorithms that are capable of returning solutions with both low objective value and high group sparsity under proper λ ( Yuan & Lin , 2006 ; Roth & Fischer , 2008 ; Huang et al. , 2011 ; Ndiaye et al. , 2017 ) . Proximal methods are classical approaches to solve the structured non-smooth optimization ( 1 ) , including the popular proximal gradient method ( Prox-FG ) which only uses the first-order derivative information . When N is huge , stochastic methods become ubiquitous to operate on a small subset to avoid the costly evaluation over all instances in deterministic methods for large-scale problems . Proximal stochastic gradient method ( Prox-SG ) ( Duchi & Singer , 2009 ) is the natural stochastic extension of Prox-FG . Regularized dual-averaging method ( RDA ) ( Xiao , 2010 ; Yang et al. , 2010 ) is proposed by extending the dual averaging scheme in ( Nesterov , 2009 ) . To improve the convergence rate , there exists a set of incremental gradient methods inspired by SAG ( Roux et al. , 2012 ) to utilizes the average of accumulated past gradients . For example , proximal stochastic variance-reduced gradient method ( Prox-SVRG ) ( Xiao & Zhang , 2014 ) and proximal spider ( Prox-Spider ) ( Zhang & Xiao , 2019 ) are developed to adopt multi-stage schemes based on the well-known variance reduction technique SVRG proposed in ( Johnson & Zhang , 2013 ) and Spider developed in ( Fang et al. , 2018 ) respectively . SAGA ( Defazio et al. , 2014 ) stands as the midpoint between SAG and Prox-SVRG . Compared to deterministic methods , the studies of mixed ` 1/ ` 2-regularization ( 1 ) in stochastic field become somewhat rare and limited . Prox-SG , RDA , Prox-SVRG , Prox-Spider and SAGA are valuable state-of-the-art stochastic algorithms for solving problem ( 1 ) but with apparent weakness . Particularly , these existing stochastic algorithms typically meet difficulties to achieve both decent convergence and effective group sparsity identification simultaneously ( e.g. , small function values but merely dense solutions ) , because of the randomness and the limited sparsity-promotion mechanisms . In depth , Prox-SG , RDA , Prox-SVRG , Prox-Spider and SAGA derive from proximal gradient method to utilize the proximal operator to produce group of zero variables . Such operator is generic to extensive non-smooth problems , consequently perhaps not sufficiently insightful if the target problems possess certain properties , e.g. , the group sparsity structure as problem ( 1 ) . In fact , in convex setting , the proximal operator suffers from variance of gradient estimate ; and in non-convex setting , especially deep learning , the discreet step size ( learning rate ) further deteriorates its effectiveness on the group sparsity promotion , as will show in Section 2 that the projection region vanishes rapidly except RDA . RDA has superiority on finding manifold structure to others ( Lee & Wright , 2012 ) , but inferiority on the objective convergence . Besides , the variance reduction techniques are typically required to measure over a huge mini-batch data points in both theory and practice which is probably prohibitive for large-scale problems , and have been observed as sometimes noneffective for deep learning applications ( Defazio & Bottou , 2019 ) . On the other hand , to introduce sparsity , there exist heuristic weight pruning methods ( Li et al. , 2016 ; Luo et al. , 2017 ) , whereas they commonly do not equip with theoretical guarantee , so that easily diverge and hurt generalization accuracy . Our Contributions . Half-Space Stochastic Projected Gradient ( HSPG ) method overcomes the limitations of the existing stochastic algorithms on the group sparsity identification , while maintains comparable convergence characteristics . While the main-stream works on ( group ) sparsity have focused on using proximal operators of regularization , our method is unique and fresh in enforcing group sparsity more effectively by leveraging half-space structure and is well supported by the theoretical analysis and empirical evaluations . We now summarize our contributions as follows . • Algorithmic Design : We propose the HSPG to solve the disjoint group sparsity regularized problem as ( 1 ) . Initialized with a Prox-SG Step for seeking a close-enough but perhaps dense solution estimate , the algorithmic framework relies on a novel Half-Space Step to exploit group sparse patterns . We delicately design the Half-Space Step with the following main features : ( i ) it utilizes previous iterate as the normal direction to construct a reduced space consisting of a set of halfspaces and the origin ; ( ii ) a new group projection operator maps groups of variables onto zero if they fall out of the constructed reduced space to identify group sparsity considerably more effectively than the proximal operator ; and ( iii ) with proper step size , the Half-Space Step enjoys the sufficient decrease property , and achieves progress to optimum in both theory and practice . • Theoretical Guarantee : We provide the convergence guarantees of HSPG . Moreover , we prove HSPG has looser requirements to identify the sparsity pattern than Prox-SG , revealing its superiority on the group sparsity exploration . Particularly , for the sparsity pattern identification , the required distance to the optimal solution x∗ of HSPG is better than the distance required by Prox-SG . • Numerical Experiments : Experimentally , HSPG outperforms the state-of-the-art methods in the aspect of the group sparsity exploration , and achieves competitive objective value convergence and runtime in both convex and non-convex problems . In the popular deep learning tasks , HSPG usually computes the solutions with multiple times higher group sparsity and similar generalization performance on unseen testing data than those generated by the competitors , which may be further used to construct smaller and more efficient network architectures . 2 THE HSPG METHOD . We state the Half-Space Stochastic Projected Gradient ( HSPG ) method in Algorithm 1 . In general , it contains two stages : Initialization Stage and Group-Sparsity Stage . The first Initialization Stage employs Prox-SG Step ( Algorithm 2 ) to search for a close-enough but usually non-sparse solution estimate . Then the second and fundamental stage proceeds Half-Space Step ( Algorithm 3 ) started with the non-sparse solution estimate to effectively exploit the group sparsity within a sequence of reduced spaces , and converges to the group-sparse solutions with theoretical convergence property . Algorithm 1 Outline of HSPG for solving ( 1 ) . 1 : Input : x0 ∈ Rn , α0 ∈ ( 0 , 1 ) , ∈ [ 0 , 1 ) , and NP ∈ Z+ . 2 : for k = 0 , 1 , 2 , . . . do 3 : if k < NP then 4 : Compute xk+1 ← Prox-SG ( xk , αk ) by Algorithm 2 . 5 : else 6 : Compute xk+1 ← Half-Space ( xk , αk , ) by Algorithm 3 . 7 : Update αk+1 . Algorithm 2 Prox-SG Step . 1 : Input : Current iterate xk , and step size αk . 2 : Compute the stochastic gradient of f on mini-batch Bk ∇fBk ( xk ) ← 1 |Bk| ∑ i∈Bk ∇fi ( xk ) . ( 2 ) 3 : Return xk+1 ← ProxαkλΩ ( · ) ( xk − αk∇fBk ( xk ) ) . Initialization Stage . The Initialization Stage performs the vanilla proximal stochastic gradient method ( Prox-SG , Algorithm 2 ) to approach the solution of ( 1 ) . At kth iteration , a mini-batch Bk is sampled to generate an unbiased estimator of the full gradient of f ( line 2 , Algorithm 2 ) to compute a trial iterate x̂k+1 : = xk − αk∇fBk ( xk ) , where αk is the step size , and fBk is the average of the instance functions fi cross Bk . The next iterate xk+1 is then updated based on the proximal mapping xk+1 = ProxαkλΩ ( · ) ( x̂k+1 ) = arg min x∈Rn 1 2αk ‖x− x̂k+1‖2 + λΩ ( x ) , ( 3 ) where the regularization term Ω ( x ) is defined in ( 1 ) . Notice that the above subproblem ( 3 ) has a closed-form solution , where for each g ∈ G , we have [ xk+1 ] g = max { 0 , 1− αkλ/ ‖ [ x̂k+1 ] g‖ } · [ x̂k+1 ] g. ( 4 ) In HSPG , the Initialization Stage proceeds Prox-SG Step NP times as a localization mechanism to seek an estimation which is close enough to a solution of problem ( 1 ) , where NP : = min { k : k ∈ Z+ , ‖xk − x∗‖ ≤ R/2 } associated with a positive constant R related to the optima , see ( 23 ) in Appendix C. In practice , although the close-enough requirement is perhaps hard to be verified , we empirically suggest to keep running the Prox-SG Step until observing some stage-switch signal by testing on the stationarity of objective values , norm of ( sub ) gradient or validation accuracy similarly to ( Zhang et al. , 2020 ) . However , the Initialization Stage alone is insufficient to exploit the group sparsity structure , i.e. , the computed solution estimate is typically dense , due to the randomness and the moderate truncation mechanism of proximal operator constrained in its projection region , i.e. , the trial iterate [ x̂k+1 ] g is projected to zero only if it falls into an ` 2-ball centered at the origin with radius αkλ by ( 4 ) . Our remedy is to incorporate it with the following Half-Space Step , which exhibits an effective sparsity promotion mechanism while still remains the convergent property . Algorithm 3 Half-Space Step 1 : Input : Current iterate xk , step size αk , and . 2 : Compute the stochastic gradient of Ψ on I 6=0 ( xk ) by mini-batch Bk [ ∇ΨBk ( xk ) ] I 6=0 ( xk ) ← 1 |Bk| ∑ i∈Bk [ ∇Ψi ( xk ) ] I 6=0 ( xk ) ( 5 ) 3 : Compute [ x̃k+1 ] I 6=0 ( xk ) ← [ xk − αk∇ΨBk ( xk ) ] I 6=0 ( xk ) and [ x̃k+1 ] I0 ( xk ) ← 0 . 4 : for each group g in I 6=0 ( xk ) do 5 : if [ x̃k+1 ] > g [ xk ] g < ‖ [ xk ] g‖ 2 then 6 : [ x̃k+1 ] g ← 0 . 7 : Return xk+1 ← x̃k+1 . Group-Sparsity Stage . The Group-Sparsity Stage is designed to effectively determine the groups of zero variables and capitalize convergence characteristic , which is in sharp contrast to other heuristic aggressive weight pruning methods but typically lacking theoretical guarantee ( Li et al. , 2016 ; Luo et al. , 2017 ) . The underlying intuition of its atomic Half-Space Step ( Algorithm 3 ) is to project [ xk ] g to zero only if − [ xk ] g serves as a descent step to Ψ ( xk ) , i.e. , − [ xk ] > g [ ∇Ψ ( xk ) ) ] g < 0 , hence updating [ xk+1 ] g ← [ xk ] g − [ xk ] g = 0 still results in some progress to the optimality . Before introducing that , we first define the following index sets for any x ∈ Rn : I0 ( x ) : = { g : g ∈ G , [ x ] g = 0 } and I 6=0 ( x ) : = { g : g ∈ G , [ x ] g 6= 0 } , ( 6 ) where I0 ( x ) represents the indices of groups of zero variables at x , and I 6=0 ( x ) indexes the groups of nonzero variables at x . To proceed , we further define an artificial set that x lies in : S ( x ) : = { z ∈ Rn : [ z ] g = 0 if g ∈ I0 ( x ) , and [ z ] > g [ x ] g ≥ ‖ [ x ] g‖ 2 if g ∈ I 6=0 ( x ) } ⋃ { 0 } , ( 7 ) which consists of half-spaces and the origin . Here the parameter > 0 controls the grey region presented in Figure 1b , and the exact way to set will be discussed in Section 4 and Appendix . Hence , x inhabits S ( xk ) , i.e. , x ∈ S ( xk ) , only if : ( i ) [ x ] g lies in the upper half-space for all g ∈ I 6=0 ( xk ) for some prescribed ∈ [ 0 , 1 ) as shown in Figure 1a ; and ( ii ) [ x ] g equals to zero for all g ∈ I0 ( xk ) . The fundamental assumption for Half-Space Step to success is that : the Initialization Stage has produced a ( possibly non-sparse ) solution estimate xk nearby a group sparse solution x∗ of problem ( 1 ) , i.e. , the optimal distance ‖xk − x∗‖ is sufficiently small . As seen in Appendix , it further indicates that the group sparse optimal solution x∗ inhabits Sk : = S ( xk ) , which implies that Sk has already covered the group-support of x∗ , i.e. , I 6=0 ( x∗ ) ⊆ I 6=0 ( xk ) . Our goal now becomes minimizing Ψ ( x ) over Sk to identify the remaining groups of zero variables , i.e. , I0 ( x∗ ) /I0 ( xk ) , which is formulated as the following smooth optimization problem : xk+1 = arg min x∈Sk Ψ ( x ) = f ( x ) + λΩ ( x ) . ( 8 ) By the definition of Sk , [ x ] I0 ( xk ) ≡ 0 are constrained as fixed during Algorithm 3 proceeding , and only the entries in I 6=0 ( xk ) are allowed to move . Hence Ψ ( x ) is smooth on Sk , and ( 8 ) is a reduced space optimization problem . A standard way to solve problem ( 8 ) would be the stochastic gradient descent equipped with Euclidean projection ( Nocedal & Wright , 2006 ) . However , such a projected method rarely produces zero ( group ) variables as the dense x̂E illustrated in Figure 1a . To address it , we introduce a novel projection operator to effectively conduct group projection as follows . As stated in Algorithm 3 , we first approximate the gradient of Ψ on the free variables in I 6=0 ( xk ) by [ ∇ΨBk ( xk ) ] I 6=0 ( xk ) ( line 2 , Algorithm 3 ) , then employ SGD to compute a trial point x̃k+1 ( line 3 , Algorithm 3 ) which is passed into a new projection operator ProjSk ( · ) defined as [ ProjSk ( z ) ] g : = { [ z ] g if [ z ] > g [ xk ] g ≥ ‖ [ xk ] g‖ 2 , 0 otherwise . ( 9 ) The above projector of form ( 9 ) is not the standard Euclidean projection operator in most cases2 , but still satisfies the following two advantages : ( i ) the actual search direction dk : = ( ProjSk ( x̃k+1 ) − xk ) /αk performs as a descent direction to ΨBk ( xk ) : = fBk ( xk ) + λΩ ( xk ) , i.e. , [ dk ] > g [ ∇ΨBk ( xk ) ) ] g < 0 as θ < 90◦ in Figure 1a , then the progress to the optimum is made via the sufficient decrease property as drawn in Lemma 1 ; and ( ii ) effectively project groups of variables to zero simultaneously if the inner product of corresponding entries is sufficiently small . In contrast , the Euclidean projection operator is far away effective to promote group sparsity , as the Euclidean projected point x̂E 6= 0 versus xk+1 = ProjSk ( x̃k+1 ) = 0 shown in Figure 1a . Lemma 1 . Algorithm 3 yields the next iteratexk+1 as ProjSk ( xk−αk∇ΨBk ( xk ) ) , then the search direction dk : = ( xk+1−xk ) /αk is a descent direction for ΨBk ( xk ) , i.e. , d > k∇ΨBk ( xk ) < 0 . Moreover , letting L be the Lipschitz constant for∇ΨBk on the feasible domain , and Ĝk : = I 6=0 ( xk ) ⋂ I0 ( xk+1 ) and G̃k : = I 6=0 ( xk ) ⋂ I 6=0 ( xk+1 ) be the sets of groups which projects or not onto zero , we have ΨBk ( xk+1 ) ≤ΨBk ( xk ) − ( αk − α2kL 2 ) ∑ g∈G̃k ‖ [ ∇ΨBk ( xk ) ] g‖ 2 − ( 1− αk − L 2 ) ∑ g∈Ĝk ‖ [ xk ] g‖2 . ( 10 ) We then intuitively illustrate the strength of HSPG on group sparsity exploration . In fact , the halfspace projection ( 9 ) is a more effective sparsity promotion mechanism compared to the existing methods . Particularly , it benefits from a much larger projection region to map a reference point x̂k+1 : = xk − αk∇fBk ( xk ) or its variants to zero . As the 2D case described in Figure 1b , the projection regions of Prox-SG , Prox-SVRG , Prox-Spider and SAGA are ` 2-balls with radius as αkλ . In stochastic learning , especially deep learning tasks , the step size αk is usually selected around 10−3 to 10−4 or even smaller for convergence . Together with the common setting of λ 1 , their projection regions would vanish rapidly , resulting in the difficulties to produce group sparsity . As a sharp contrast , even though αkλ is near zero , the projection region of HSPG { x : x > k x < ( αkλ+ ‖xk‖ ) ‖xk‖ } ( seen in Appendix ) is still an open half-space which contains those ` 2 balls as well as RDA ’ s if is large enough . Moreover , the positive control parameter adjusts the level of aggressiveness of group sparsity promotion ( 9 ) , i.e. , the larger the more aggressive , and meanwhile maintains the progress to the optimality by Lemma 1 . In practice , proper fine tuning is sometimes required to achieve both group sparsity enhancement and sufficient decrease on objective value as will see in Section 4 . Intuition of Two-Stage Method : To end this section , we discuss the advantage of designing such two stage schema rather than an adaptive switch back and forth between the Prox-SG Step and Half-Space Step based on some evaluation switching criteria , as many multi-step deterministic optimization algorithms ( Chen et al. , 2017 ) . In fact , we numerically observed that switching back to the Prox-SG Step consistently deteriorate the progress of group sparsity exploration by Half-Space Step while without obvious gain on convergence . Such regression on group sparsity by the Prox-SG Step 2Unless Ω ( x ) is ‖x‖1 where each g ∈ G is singleton , then Sk becomes an orthant face ( Chen et al. , 2020 ) . is less attractive in realistic applications , e.g. , model compression , where people usually possess heavy models of high generalization accuracy ahead and want to filter out the redundancy effectively . Therefore , in term of the ease of application , we end at organizing Prox-SG Step and Half-Space Step as such a two-stage schema , controlled by a switching hypermeter NP . In theory , we require NP sufficiently large to let the initial iterate of Half-Space Step be close enough to the local minimizer as shown in Section 3 . In practice , HSPG is sensitive to the choice of NP at early iterations , i.e. , switching to Half-Space Step too early may result accuracy loss . But such sensitivity vanishes rapidly if switching to Half-Space Step after some acceptable evaluation switching criteria . | This paper proposed a new algorithm for the group sparsity regularization problem. They claim most existing algorithms, though return solutions with low objective function value, only give dense solutions and cannot effectively ensure the desired structured sparsity. The new technique requires an initialization that is closed to some truly sparse local minimum, which is achieved by running proximal gradient descent first. Then, they proposed a new half-space iterative step to force elements in specific groups exactly to zero. The authors also provide convergence analysis and numerical evidence for the newly proposed algorithm. | SP:c64ba67ebf7b6abedb24f26cbd45e221cfd6b1d6 |
SEDONA: Search for Decoupled Neural Networks toward Greedy Block-wise Learning | 1 INTRODUCTION . Backpropagation ( Rumelhart et al. , 1986 ) has made a significant contribution to the success of deep learning as the core learning algorithm for SGD-based optimization . However , backpropagation is sequential in nature and supports only synchronous weight updates . Specifically , the limited concurrency in backpropagation breaks down into two locking problems ( Jaderberg et al. , 2017 ) . First , update locking – a forward pass must complete first before any weight update . Second , backward locking – gradient computation of upper layers must precede that of lower layers . Also , backpropagation may be biologically implausible since the human brain prefers local learning rules without the global movement of error signals ( Crick ( 1989 ) ; Marblestone et al . ( 2016 ) ; Lillicrap et al . ( 2020 ) ) . Greedy block-wise learning is a competitive alternative to backpropagation that overcomes these limitations . It splits layers into a stack of gradient-isolated blocks , each of which is trained with local error signals . Therefore , it is possible to simultaneously compute the gradients for different network components with more fine-grained locks . Limiting the depth of error propagation graphs also reduces the vanishing gradient and increases memory efficiency . Recently , Belilovsky et al . ( 2019 ) , Nøkland & Eidnes ( 2019 ) , Belilovsky et al . ( 2020 ) , and Löwe et al . ( 2019 ) empirically demonstrated that greedy block-wise learning could yield competitive performance to end-to-end backpropagation . However , greedy block-wise learning introduces a group of new architectural decisions . Let us consider a case where we want to decouple an L-layer network into K blocks for a given K ∈ { 1 , . . . , L } . Then , the number of all possible groupings is ( L−1 K−1 ) . If we want to choose one of M candidates of auxiliary networks to generate local error gradients , we would have to consider ( L−1 K−1 ) MK−1 different configurations . If local signals are not representative of the global goal , then the final performance would be damaged significantly . In this work , we introduce a novel search method named SEDONA ( SEarching for DecOupled Neural Architectures ) , which allows efficient search of decoupled neural architectures toward greedy block-wise learning . Given a base neural network , SEDONA optimizes the validation loss by grouping layers into blocks and selecting the best auxiliary network for each block . Inspired by DARTS ( Liu et al. , 2019 ) , we first relax the decision variables representing error propagation graphs and auxiliary networks to continuous domains . We then formulate a bilevel optimization problem for the decision variables , which is solved via gradient descent . Our key contributions are summarized as follows . 1 . To the best of our knowledge , this work is the first attempt to automate the discovery of decoupling neural networks for greedy block-wise learning . We propose an efficient search method named SEDONA , which finds decoupled error propagation graphs and auxiliary heads suitable for successful greedy training . 2 . Through extensive experiments on image classification tasks , we show that our locally optimized networks outperform not only the ones trained with end-to-end backpropagation but also two state-of-the-art greedy-learning methods of DGL ( Belilovsky et al. , 2020 ) and PredSim ( Nøkland & Eidnes , 2019 ) in CIFAR-10 , Tiny-ImageNet and ImageNet . 3 . SEDONA discovers decoupled architectures for VGG ( Simonyan & Zisserman , 2015 ) and ResNet ( He et al. , 2016 ) variants with only 0.25× width on CIFAR-10 . The discovered networks are transferable to Tiny-ImageNet and ImageNet in which they are high-performing enough to beat backpropagation and other greedy-leaning methods . It means that no search is required for every pair of a network and a dataset . 4 . Finally , based on experimental results , we analyze the common characteristics among the architectures that are favorable to greedy-learning , such as avoiding the shallow first block and using deeper auxiliary networks for lower blocks . 2 PROBLEM STATEMENT AND MOTIVATION . In typical neural network training , backpropagation computes the gradients of weights with respect to the global loss by the chain rule ( Rumelhart et al. , 1986 ) . On the other hand , in greedy block-wise learning ( Löwe et al. , 2019 ; Belilovsky et al. , 2020 ) , the network is split into several subnetworks ( i.e . blocks ) , each of which consists of one or more consecutive layers . Next , each block is attached to a small neural network called the auxiliary network that computes its own objective ( i.e . local loss ) , from which layer weights are optimized by propagating error signals within the block . Naturally , each block can independently perform parameter updates even while other blocks process forward passes . Figure 1 illustrates the high-level overview of greedy block-wise learning . For successful greedy block-wise learning , one must make two design decisions beforehand : ( i ) how to split the original network into a set of subnetworks , and ( ii ) which auxiliary network to use for each subnetwork . Finding the best configuration to both problems requires significant time and effort from human experts . We empirically show that the performance of greedy block-wise learning is critically sensitive to these two design choices in Appendix A . This sensitivity introduces a paradox of replacing backpropagation with greedy block-wise learning . If one has to put significant cost and time through a series of experiments to discover a workable configuration , then the benefit of greedy learning ( e.g . reduction of training time ) is diluted . Unfortunately , there has not been a generally acceptable practice to answer these two design choices . Therefore , this work aims to propose an automated search method for the discovery of the best configuration , which has not been discussed so far . Although there have been several works on modifying backward computation graphs ( Bello et al. , 2017 ; Alber et al. , 2018 ; Xu et al. , 2018 ) , they still rely on global end-to-end learning and focus on finding new optimizers , weight update formulas , or error propagation rules , assuming that the backward computation graphs are never discontinuous . In this work , we instead concern ourselves with making backward computation graphs discontinuous , i.e . finding optimal points where we stop gradient flow and use local gradients instead . 3 SEDONA : SEARCHING FOR DECOUPLED NEURAL ARCHITECTURES . We begin by describing the search space ( Section 3.1 ) and present a continuous relaxation strategy that allows searching for the decoupled architecture using stochastic gradient descent on the validation loss ( Section 3.2 ) . Finally , we propose a bilevel optimization that makes SEDONA computationally efficient ( Section 3.3 ) and the discretization on relaxed decision variables ( Section 3.4 ) . 3.1 THE SEARCH SPACE . Our goal is to vertically split an input network into a set of blocks to enable greedy block-wise training . This task is equivalent to solving the following two problems ( Figure 2 ) : ( i ) finding layers at which we discontinue the gradient flow and ( ii ) assigning the most appropriate auxiliary network to each of those layers for generating local error signals . We assume that an input network consists of L convolutional layers , each of which may contain normalization and pooling layers . If the network has residual connections , we regard each residual block as a single layer to simplify our notation . We focus on splitting the convolutional layers only and treat the last fully connected ( FC ) layers as the last block ’ s auxiliary network . To facilitate our exposition , we introduce two binary variables for every layer . First , the signal variable α ( l ) ∈ { 0 , 1 } denotes whether layer l should utilize local gradients ( i.e . the last layer of a block ) or backpropagated gradients ( i.e . the inside layer ) . In other words , if α ( l ) = 1 , the layer l is trained using local gradients , hence becoming the last layer in a gradient-isolated block . Otherwise , the layer is trained with backpropagated gradients , therefore becoming the inside layer in a block . Second , the auxiliary type variable β ( l ) ∈ { 0 , 1 } M denotes a one-hot encoding of which auxiliary is chosen out of M possible candidates for layer l. We here assume that every layer selects its own auxiliary network ; later , we leave it only for the last layer of each block . Note that the last layer of the whole network does not need these variables because the final classifier acts as its auxiliary head . Now , we can formulate the loss for layer l as follows : L ( l ) train ( θ , φ , β ) = 1 |D| ∑ ( x , y ) ∈D ` ( l ) ( y , o ( l ) ) where o ( l ) ( x ; θ ) = M∑ m=1 β ( l ) m · f ( l ) m ( a ( l ) ( x ; θ ) ; φ ( l ) m ) . ( 1 ) D is the training data , ` ( l ) is the loss function , { f ( l ) m } are M candidates for auxiliary networks , and a ( l ) is the activations , θ is the network layer weights , and φ ( l ) m is them-th auxiliary network weights . The error gradients at each non-last layer l are calculated as δ ( l ) = α ( l ) · δ ( l ) local + ( 1− α ( l ) ) · δ ( l ) bp , where δ ( l ) local = ∇a ( l ) L ( l ) train , δ ( l ) bp = δ ( l+1 ) · ∂a ( l+1 ) ∂a ( l ) , ( 2 ) which is equivalent to choosing between local and backpropagated error gradients . Algorithm 1 : SEDONA – Searching for Decoupled Neural Architectures Initialize signal variables α and auxiliary type variables β as 0 . Pretrain layer and auxiliary network weights ( θ , φ ) with Eq . ( 5 ) – ( 6 ) and store N sets of weights with the best validation accuracies in memoryM . while ( α , β ) not converged do Sample one set of layer and auxiliary network weights ( θ , φ ) fromM Calculate ( θT , φT ) by performing T gradient steps on ( θ , φ ) with Eq. ( 5 ) – ( 6 ) . Update ( α , β ) by descending ∇ ( α , β ) L ( L ) val ( θT , φT , α , β ) with Eq. ( 7 ) . Calculate ( θ1 , φ1 ) by performing single gradient step on ( θ , φ ) with Eq. ( 5 ) – ( 6 ) . Evict the oldest weights inM and save the updated weights ( θ1 , φ1 ) intoM . end Obtain decoupling by discretizing α and β 3.2 CONTINUOUS RELAXATION . We optimize over α and β after relaxing them to a continuous domain , in a similar way to DARTS ( Liu et al. , 2019 ) . It enables a gradient-based optimization , which is significantly faster than directly optimizing over the discrete domain using reinforcement learning or evolutionary algorithms . This benefit accelerates especially when the search space is large , i.e . when the input network is deep . Henceforth , we let α ( l ) ∈ R2 and β ( l ) ∈ RM . As a result , we relax the categorical choice of an auxiliary head to a weighted mixture of all possible auxiliary networks by replacing Eq . ( 1 ) with ō ( l ) = M∑ m=1 softmax ( β ( l ) ) m · f ( l ) m ( a ( l ) ; φ ( l ) m ) . ( 3 ) Also , replacing Eq . ( 2 ) , the gradients for layer l become a mix of local and backpropagated gradients : δ̄ ( l ) = ᾱ ( l ) 1 · δ ( l ) local + ᾱ ( l ) 2 · δ ( l ) bp , ( 4 ) which is the affine combination between δ ( l ) local = ∇a ( l ) L ( l ) train and δ ( l ) bp = δ̄ ( l+1 ) · ∂a ( l+1 ) ∂a ( l ) . We use ᾱ ( l ) = softmax ( α ( l ) ) and δ̄ ( L ) = ∇a ( L ) L ( L ) . | The paper proposes a method for decoupled training of neural networks called SEDONA. In the spirit of recent trends in greedy layer-wise and indirect training, SEDONA allows gradient information to flow either from the next layer as in backpropagation or from an auxiliary head, trying to make a prediction using the current layer's output. Since a direct search for the best decoupled configuration results into probing a combinatorial number of splits, authors propose a continuously relaxed formulation which they later discretize. Transferring the found decoupled configurations to datasets different from the "pretraining" ones shows improvements in terms of validation accuracy and training time. | SP:e290ab27d2ef262375e49897784ecb70927a264c |
SEDONA: Search for Decoupled Neural Networks toward Greedy Block-wise Learning | 1 INTRODUCTION . Backpropagation ( Rumelhart et al. , 1986 ) has made a significant contribution to the success of deep learning as the core learning algorithm for SGD-based optimization . However , backpropagation is sequential in nature and supports only synchronous weight updates . Specifically , the limited concurrency in backpropagation breaks down into two locking problems ( Jaderberg et al. , 2017 ) . First , update locking – a forward pass must complete first before any weight update . Second , backward locking – gradient computation of upper layers must precede that of lower layers . Also , backpropagation may be biologically implausible since the human brain prefers local learning rules without the global movement of error signals ( Crick ( 1989 ) ; Marblestone et al . ( 2016 ) ; Lillicrap et al . ( 2020 ) ) . Greedy block-wise learning is a competitive alternative to backpropagation that overcomes these limitations . It splits layers into a stack of gradient-isolated blocks , each of which is trained with local error signals . Therefore , it is possible to simultaneously compute the gradients for different network components with more fine-grained locks . Limiting the depth of error propagation graphs also reduces the vanishing gradient and increases memory efficiency . Recently , Belilovsky et al . ( 2019 ) , Nøkland & Eidnes ( 2019 ) , Belilovsky et al . ( 2020 ) , and Löwe et al . ( 2019 ) empirically demonstrated that greedy block-wise learning could yield competitive performance to end-to-end backpropagation . However , greedy block-wise learning introduces a group of new architectural decisions . Let us consider a case where we want to decouple an L-layer network into K blocks for a given K ∈ { 1 , . . . , L } . Then , the number of all possible groupings is ( L−1 K−1 ) . If we want to choose one of M candidates of auxiliary networks to generate local error gradients , we would have to consider ( L−1 K−1 ) MK−1 different configurations . If local signals are not representative of the global goal , then the final performance would be damaged significantly . In this work , we introduce a novel search method named SEDONA ( SEarching for DecOupled Neural Architectures ) , which allows efficient search of decoupled neural architectures toward greedy block-wise learning . Given a base neural network , SEDONA optimizes the validation loss by grouping layers into blocks and selecting the best auxiliary network for each block . Inspired by DARTS ( Liu et al. , 2019 ) , we first relax the decision variables representing error propagation graphs and auxiliary networks to continuous domains . We then formulate a bilevel optimization problem for the decision variables , which is solved via gradient descent . Our key contributions are summarized as follows . 1 . To the best of our knowledge , this work is the first attempt to automate the discovery of decoupling neural networks for greedy block-wise learning . We propose an efficient search method named SEDONA , which finds decoupled error propagation graphs and auxiliary heads suitable for successful greedy training . 2 . Through extensive experiments on image classification tasks , we show that our locally optimized networks outperform not only the ones trained with end-to-end backpropagation but also two state-of-the-art greedy-learning methods of DGL ( Belilovsky et al. , 2020 ) and PredSim ( Nøkland & Eidnes , 2019 ) in CIFAR-10 , Tiny-ImageNet and ImageNet . 3 . SEDONA discovers decoupled architectures for VGG ( Simonyan & Zisserman , 2015 ) and ResNet ( He et al. , 2016 ) variants with only 0.25× width on CIFAR-10 . The discovered networks are transferable to Tiny-ImageNet and ImageNet in which they are high-performing enough to beat backpropagation and other greedy-leaning methods . It means that no search is required for every pair of a network and a dataset . 4 . Finally , based on experimental results , we analyze the common characteristics among the architectures that are favorable to greedy-learning , such as avoiding the shallow first block and using deeper auxiliary networks for lower blocks . 2 PROBLEM STATEMENT AND MOTIVATION . In typical neural network training , backpropagation computes the gradients of weights with respect to the global loss by the chain rule ( Rumelhart et al. , 1986 ) . On the other hand , in greedy block-wise learning ( Löwe et al. , 2019 ; Belilovsky et al. , 2020 ) , the network is split into several subnetworks ( i.e . blocks ) , each of which consists of one or more consecutive layers . Next , each block is attached to a small neural network called the auxiliary network that computes its own objective ( i.e . local loss ) , from which layer weights are optimized by propagating error signals within the block . Naturally , each block can independently perform parameter updates even while other blocks process forward passes . Figure 1 illustrates the high-level overview of greedy block-wise learning . For successful greedy block-wise learning , one must make two design decisions beforehand : ( i ) how to split the original network into a set of subnetworks , and ( ii ) which auxiliary network to use for each subnetwork . Finding the best configuration to both problems requires significant time and effort from human experts . We empirically show that the performance of greedy block-wise learning is critically sensitive to these two design choices in Appendix A . This sensitivity introduces a paradox of replacing backpropagation with greedy block-wise learning . If one has to put significant cost and time through a series of experiments to discover a workable configuration , then the benefit of greedy learning ( e.g . reduction of training time ) is diluted . Unfortunately , there has not been a generally acceptable practice to answer these two design choices . Therefore , this work aims to propose an automated search method for the discovery of the best configuration , which has not been discussed so far . Although there have been several works on modifying backward computation graphs ( Bello et al. , 2017 ; Alber et al. , 2018 ; Xu et al. , 2018 ) , they still rely on global end-to-end learning and focus on finding new optimizers , weight update formulas , or error propagation rules , assuming that the backward computation graphs are never discontinuous . In this work , we instead concern ourselves with making backward computation graphs discontinuous , i.e . finding optimal points where we stop gradient flow and use local gradients instead . 3 SEDONA : SEARCHING FOR DECOUPLED NEURAL ARCHITECTURES . We begin by describing the search space ( Section 3.1 ) and present a continuous relaxation strategy that allows searching for the decoupled architecture using stochastic gradient descent on the validation loss ( Section 3.2 ) . Finally , we propose a bilevel optimization that makes SEDONA computationally efficient ( Section 3.3 ) and the discretization on relaxed decision variables ( Section 3.4 ) . 3.1 THE SEARCH SPACE . Our goal is to vertically split an input network into a set of blocks to enable greedy block-wise training . This task is equivalent to solving the following two problems ( Figure 2 ) : ( i ) finding layers at which we discontinue the gradient flow and ( ii ) assigning the most appropriate auxiliary network to each of those layers for generating local error signals . We assume that an input network consists of L convolutional layers , each of which may contain normalization and pooling layers . If the network has residual connections , we regard each residual block as a single layer to simplify our notation . We focus on splitting the convolutional layers only and treat the last fully connected ( FC ) layers as the last block ’ s auxiliary network . To facilitate our exposition , we introduce two binary variables for every layer . First , the signal variable α ( l ) ∈ { 0 , 1 } denotes whether layer l should utilize local gradients ( i.e . the last layer of a block ) or backpropagated gradients ( i.e . the inside layer ) . In other words , if α ( l ) = 1 , the layer l is trained using local gradients , hence becoming the last layer in a gradient-isolated block . Otherwise , the layer is trained with backpropagated gradients , therefore becoming the inside layer in a block . Second , the auxiliary type variable β ( l ) ∈ { 0 , 1 } M denotes a one-hot encoding of which auxiliary is chosen out of M possible candidates for layer l. We here assume that every layer selects its own auxiliary network ; later , we leave it only for the last layer of each block . Note that the last layer of the whole network does not need these variables because the final classifier acts as its auxiliary head . Now , we can formulate the loss for layer l as follows : L ( l ) train ( θ , φ , β ) = 1 |D| ∑ ( x , y ) ∈D ` ( l ) ( y , o ( l ) ) where o ( l ) ( x ; θ ) = M∑ m=1 β ( l ) m · f ( l ) m ( a ( l ) ( x ; θ ) ; φ ( l ) m ) . ( 1 ) D is the training data , ` ( l ) is the loss function , { f ( l ) m } are M candidates for auxiliary networks , and a ( l ) is the activations , θ is the network layer weights , and φ ( l ) m is them-th auxiliary network weights . The error gradients at each non-last layer l are calculated as δ ( l ) = α ( l ) · δ ( l ) local + ( 1− α ( l ) ) · δ ( l ) bp , where δ ( l ) local = ∇a ( l ) L ( l ) train , δ ( l ) bp = δ ( l+1 ) · ∂a ( l+1 ) ∂a ( l ) , ( 2 ) which is equivalent to choosing between local and backpropagated error gradients . Algorithm 1 : SEDONA – Searching for Decoupled Neural Architectures Initialize signal variables α and auxiliary type variables β as 0 . Pretrain layer and auxiliary network weights ( θ , φ ) with Eq . ( 5 ) – ( 6 ) and store N sets of weights with the best validation accuracies in memoryM . while ( α , β ) not converged do Sample one set of layer and auxiliary network weights ( θ , φ ) fromM Calculate ( θT , φT ) by performing T gradient steps on ( θ , φ ) with Eq. ( 5 ) – ( 6 ) . Update ( α , β ) by descending ∇ ( α , β ) L ( L ) val ( θT , φT , α , β ) with Eq. ( 7 ) . Calculate ( θ1 , φ1 ) by performing single gradient step on ( θ , φ ) with Eq. ( 5 ) – ( 6 ) . Evict the oldest weights inM and save the updated weights ( θ1 , φ1 ) intoM . end Obtain decoupling by discretizing α and β 3.2 CONTINUOUS RELAXATION . We optimize over α and β after relaxing them to a continuous domain , in a similar way to DARTS ( Liu et al. , 2019 ) . It enables a gradient-based optimization , which is significantly faster than directly optimizing over the discrete domain using reinforcement learning or evolutionary algorithms . This benefit accelerates especially when the search space is large , i.e . when the input network is deep . Henceforth , we let α ( l ) ∈ R2 and β ( l ) ∈ RM . As a result , we relax the categorical choice of an auxiliary head to a weighted mixture of all possible auxiliary networks by replacing Eq . ( 1 ) with ō ( l ) = M∑ m=1 softmax ( β ( l ) ) m · f ( l ) m ( a ( l ) ; φ ( l ) m ) . ( 3 ) Also , replacing Eq . ( 2 ) , the gradients for layer l become a mix of local and backpropagated gradients : δ̄ ( l ) = ᾱ ( l ) 1 · δ ( l ) local + ᾱ ( l ) 2 · δ ( l ) bp , ( 4 ) which is the affine combination between δ ( l ) local = ∇a ( l ) L ( l ) train and δ ( l ) bp = δ̄ ( l+1 ) · ∂a ( l+1 ) ∂a ( l ) . We use ᾱ ( l ) = softmax ( α ( l ) ) and δ̄ ( L ) = ∇a ( L ) L ( L ) . | This paper proposes a differentiable architecture search approach for splitting a deep network into locally-trained blocks to achieve training speedup. The approach achieves better performance than using backprop on small datasets (CIFAR10 and TinyImageNet), and comparable or slightly improved performance on ImageNet with 2x claimed training speedup. Learned network architecture choices seem to transfer between datasets. | SP:e290ab27d2ef262375e49897784ecb70927a264c |
Learning from multiscale wavelet superpixels using GNN with spatially heterogeneous pooling | Neural networks have become the standard for image classification tasks . On one hand , convolutional neural networks ( CNNs ) achieve state-of-the-art performance by learning from a regular grid representation of images . On the other hand , graph neural networks ( GNNs ) have shown promise in learning image classification from an embedded superpixel graph . However , in the latter , studies have been restricted to SLIC superpixels , where 1 ) a single target number of superpixels is arbitrarily defined for an entire dataset irrespective of differences across images and 2 ) the superpixels in a given image are of similar size despite intrinsic multiscale structure . In this study , we investigate learning from a new principled representation in which individual images are represented by an image-specific number of multiscale superpixels . We propose WaveMesh , a wavelet-based superpixeling algorithm , where the number and sizes of superpixels in an image are systematically computed based on the image content . We also present WavePool , a spatially heterogeneous pooling scheme tailored to WaveMesh superpixels . We study the feasibility of learning from the WaveMesh superpixel representation using SplineCNN , a state-of-the-art network for image graph classification . We show that under the same network architecture and training settings , SplineCNN with original Graclus-based pooling learns from WaveMesh superpixels on-par with SLIC superpixels . Additionally , we observe that the best performance is achieved when replacing Graclus-based pooling with WavePool while using WaveMesh superpixels . 1 INTRODUCTION . Convolutional neural networks ( CNNs ) achieve state-of-the-art performance on a variety of image classification tasks from different domains ( Tan & Le , 2019 ; Gulshan et al. , 2016 ) . CNNs learn from a regular pixel-grid representation of the images . Although not all pixels provide equal amount of new information , by design the filters in the first layer of a CNN operate on each pixel from top-left to bottom-right in the same way . Additionally , images are typically resized to a prescribed size before feeding into a CNN . In applications that use standard CNN architectures or pre-trained models on a new image classification dataset , the images are typically uniformly downsampled to meet the input size requirements of the architecture being used . Uniform downsampling may be suboptimal as real data naturally exhibits spatial and multiscale heterogeneity . Few studies have explored the impact of input image resolution on model performance ( Sabottke & Spieler , 2020 ) , despite its recognized importance ( Lakhani , 2020 ) . Graph neural network ( GNN ) is a type of neural network that learns from graph structured data . Recent studies have shown the performance of GNNs on image graph classification tasks ( Monti et al. , 2017 ; Fey et al. , 2018 ; Knyazev et al. , 2019 ; Dwivedi et al. , 2020 ) . In this task , a GNN learns to classify images from embedded graphs that represent superpixels in the images . However , prior studies have been restricted to SLIC superpixels ( Achanta et al. , 2012 ) . In this framework , a single target number of superpixels is arbitrarily defined for an entire dataset irrespective of differences across images , and the superpixels in a given image are of similar size despite intrinsic multiscale structure . Our proposed approach circumvents these limitations , as shown in Figure 1 . The objectives of our work are twofold . First , we aim to rethink the process of downsampling and/or superpixeling images by introducing a multiscale superpixel representation that can be considered as in between the regular grid and similar-sized superpixel representations . Secondly , we systematically study the feasibility of learning to classify images from embedded graphs that represent the multiscale superpixels . In this context , the contributions of our study are as follows . • We present WaveMesh , an algorithm to superpixel ( compress ) images in the pixel domain . WaveMesh is based on the quadtree representation of the wavelet transform . Our sample-specific method leads to non-uniformly distributed and multiscale superpixels . The number and size of superpixels in an image are systematically computed by the algorithm based on the image content . WaveMesh requires at most one tunable parameter . • We propose WavePool , a spatially heterogeneous pooling method tailored to WaveMesh superpixels . WavePool preserves spatial structure leading to interpretable intermediate outputs . WavePool generalizes the classical pooling employed in CNNs , and easily integrates with existing GNNs . • To evaluate the WaveMesh representation and the WavePool method for image graph classification , we compare them with SLIC superpixels and graclus-based pooling by conducting several experiments using SplineCNN , a network proposed by Fey et al . ( 2018 ) . 2 RELATED WORK . Superpixeling . Grouping pixels to form superpixels was proposed by Ren & Malik ( 2003 ) as a preprocessing mechanism that preserves most of the structure necessary for image segmentation . Since then many superpixeling algorithms have been proposed including deep learning based methods ( Liu et al. , 2011 ; Li & Chen , 2015 ; Tu et al. , 2018 ; Giraud et al. , 2018 ; Yang et al. , 2020 ; Zhang et al. , 2020 ) . The SLIC algorithm proposed by Achanta et al . ( 2012 ) is based on k-means clustering . GNN for image graph classification . Prior studies have demonstrated the representational power and generalization ability of GNNs on image graph classification tasks using SLIC superpixels . Dwivedi et al . ( 2020 ) show that message passing graph convolution networks ( GCNs ) outperform Weisfeiler-Lehman GNNs on MNIST and CIFAR-10 datasets . Recognizing the importance of spatial and hierarchical structure inherent in images , Knyazev et al . ( 2019 ) model images as multigraphs that represent SLIC superpixels computed at different user-defined scales , and then successfully train GNNs on the multigraphs . SplineCNN proposed by Fey et al . ( 2018 ) is another network for learning from irregularly structured data . It builds on the work of Monti et al . ( 2017 ) , but uses a spline convolution kernel instead of Gaussian mixture model kernels . Graclus-based pooling . Pooling is used in GNNs to coarsen the graph by aggregating nodes within specified clusters . Graclus is a kernel-based multilevel graph clustering algorithm that efficiently clusters nodes in large graphs without any eigenvector computation . Graclus is used in many GNNs to obtain a clustering on the nodes , which is then used by the pooling operator to coarsen the graph ( Defferrard et al. , 2016 ; Monti et al. , 2017 ; Fey et al. , 2018 ) . Hereafter , we refer to pooling based on graclus clustering as graclus-based pooling . 3 WAVEMESH : MULTISCALE WAVELET SUPERPIXELS . Superpixel meshes . The WaveMesh algorithm is broken down into its elementary steps below : 1 ) images are wavelet transformed , 2 ) images are filtered in wavelet space by thresholding the wavelet coefficients , and 3 ) the superpixel mesh is generated from the wavelet-filter mask . The algorithm is rooted in wavelet theory ’ s seminal work ( Mallat , 1989 ; Donoho & Johnstone , 1994b ) . The particular way in which wavelets are used in this work is inspired by their related application in the physical sciences ( Schneider & Vasilyev , 2010 ; Bassenne et al. , 2017 ; 2018 ) . 3.1 STEP 1 : WAVELET TRANSFORMATION OF THE INPUT IMAGE . Consider a two-dimensional ( 2D ) image I discretely described by its pixel values I [ x0 ] centered at locations x0 = 2−1 ( i∆ , j∆ ) of a N×N regular grid , where ∆ is the inter-pixel spacing and ( i , j ) = 1 , 3 , . . . , 2N − 1 . A continuous wavelet representation of I is I ( x ) = ∑ x0 I ∧ ( 0 ) [ x0 ] φ ( 0 ) ( x− x0 ) , where x is the continuous pixel-space coordinate , and φ0 ( x− x0 ) are scaling functions that form a orthonormal basis of low-pass filters centered at x0 , with filter width ∆ . The scaling functions have unit energy 〈 φ0 ( x− x0 ) φ0 ( x− x0 ) 〉 = 1 , where the bracket operator 〈y〉 = 1/ ( N∆ ) 2 ∫ y ( x ) dx denotes the global average for a general 2D continuous field y ( x ) . In practice , when dealing with discrete signals , I ∧ ( 0 ) [ x0 ] can not be computed exactly , since I is only known at discrete points x0 . Instead , it is numerically discretized and the approximation coefficients I ∧ ( 0 ) [ x0 ] are estimated as an algebraic function of I [ x0 ] . Assuming that φ0 ( x− x0 ) decays fast away from x = x0 , we get I ∧ ( 0 ) [ x0 ] = I [ x0 ] /N ( Addison , 2017 ) . This estimate for I ∧ ( 0 ) [ x0 ] is the initialization stage of the recursive wavelet multiresolution algorithm ( MRA ) of Mallat ( 1989 ) , which enables the computation of wavelet coefficients at coarser scales . The decomposition of the finest-scale low-pass filter φ0 ( x− x0 ) in terms of narrow-band wavelet filters ψ ( s , d ) ( x − xs ) with increasingly large filter width and a coarsest-scale scaling function φ ( S ) ( x− xS ) yields the full wavelet-series expansion of I , I ( x ) = S∑ s=1 ∑ xs 3∑ d=1 I ∧ ( s , d ) [ xs ] ψ ( s , d ) ( x− xs ) + I ∧ ( S ) [ xS ] φ ( S ) ( x− xS ) . ( 1 ) Here , I ∧ ( s , d ) [ xs ] = 〈 I ( x ) ψ ( s , d ) ( x− xs ) 〉 and I ∧ ( S ) [ xS ] = 〈 I ( x ) φ ( S ) ( x− xS ) 〉 are wavelet and approximation coefficients at scale s and S , respectively , obtained from the orthonormality properties of the wavelet and scaling functions . In this formulation , d = ( 1 , 2 , 3 ) is a wavelet directionality index , and s = ( 1 , 2 . . . , S ) is a scale exponent , with S = log2N the number of resolution levels allowed by the grid ( 5 for 32×32 images ) . Similarly , xs = 2s−1 ( i∆ , j∆ ) is a scale-dependent wavelet grid of ( N/2s ) × ( N/2s ) elements where the basis functions are centered , with i , j = 1 , 3 , . . . , N/2s−1 − 1 . The wavelet coefficients represent the local fluctuations of I centered at xs at scale s , while the approximation coefficient is proportional to the global mean of I . At each scale , the filter width of the wavelets is 2s∆ . In this study , the 2D orthonormal basis functions ψ ( s , d ) ( x− xs ) are products of one-dimensional ( 1D ) Haar wavelets ( Meneveau , 1991 ) . The definition of 2D wavelets as multiplicative products of 1D wavelets is a particular choice that follows the MRA formulation ( Mallat , 1989 ) . Haar wavelets have a narrow spatial support that provides a high degree of spatial localization . However , they display large spectral leakage at high wavenumbers since infinite spectral and spatial resolutions can not be simultaneously attained due to limitations imposed by the uncertainty principle ( Addison , 2017 ) . Different boundary conditions can be assumed for the field I . We do not require such a choice in this study as we restrict ourselves to square images . However , the wavelet MRA framework is not limited to square inputs and can be generalized to rectangular inputs ( Addison , 2017 ; Kim et al. , 2018 ) . The definition of 2D wavelets as multiplicative products of 1D wavelets is a particular choice that follows the MRA formulation described by Mallat ( 1989 ) , in which , the multivariate wavelets are characterized by an isotropic scale and therefore render limited information about anisotropy in the image . A large number of alternative basis functions have been recently proposed for replacing traditional wavelets when analyzing multi-dimensional data that exhibit complex anisotropic structures such as filaments and sheets . These include , but are not limited to , curvelets , contourlets , and shearlets ( see Kutyniok & Labate ( 2012 ) for an extensive review on this topic ) . | The paper introduces a new approach to leveraging graph neural networks for image tasks. While prior work has been based on constructing graphs using a super-pixel map using methods like SLIC, that generate super-pixels of all roughly the same size, the proposed method generates a scale-adaptive partition. It also introduces a new pooling operator on this graph structure, and demonstrates that, together, these lead to improved performance when used with GNNs. | SP:62b109418f4a6e8c755a0864e766448e37d2f9c3 |
Learning from multiscale wavelet superpixels using GNN with spatially heterogeneous pooling | Neural networks have become the standard for image classification tasks . On one hand , convolutional neural networks ( CNNs ) achieve state-of-the-art performance by learning from a regular grid representation of images . On the other hand , graph neural networks ( GNNs ) have shown promise in learning image classification from an embedded superpixel graph . However , in the latter , studies have been restricted to SLIC superpixels , where 1 ) a single target number of superpixels is arbitrarily defined for an entire dataset irrespective of differences across images and 2 ) the superpixels in a given image are of similar size despite intrinsic multiscale structure . In this study , we investigate learning from a new principled representation in which individual images are represented by an image-specific number of multiscale superpixels . We propose WaveMesh , a wavelet-based superpixeling algorithm , where the number and sizes of superpixels in an image are systematically computed based on the image content . We also present WavePool , a spatially heterogeneous pooling scheme tailored to WaveMesh superpixels . We study the feasibility of learning from the WaveMesh superpixel representation using SplineCNN , a state-of-the-art network for image graph classification . We show that under the same network architecture and training settings , SplineCNN with original Graclus-based pooling learns from WaveMesh superpixels on-par with SLIC superpixels . Additionally , we observe that the best performance is achieved when replacing Graclus-based pooling with WavePool while using WaveMesh superpixels . 1 INTRODUCTION . Convolutional neural networks ( CNNs ) achieve state-of-the-art performance on a variety of image classification tasks from different domains ( Tan & Le , 2019 ; Gulshan et al. , 2016 ) . CNNs learn from a regular pixel-grid representation of the images . Although not all pixels provide equal amount of new information , by design the filters in the first layer of a CNN operate on each pixel from top-left to bottom-right in the same way . Additionally , images are typically resized to a prescribed size before feeding into a CNN . In applications that use standard CNN architectures or pre-trained models on a new image classification dataset , the images are typically uniformly downsampled to meet the input size requirements of the architecture being used . Uniform downsampling may be suboptimal as real data naturally exhibits spatial and multiscale heterogeneity . Few studies have explored the impact of input image resolution on model performance ( Sabottke & Spieler , 2020 ) , despite its recognized importance ( Lakhani , 2020 ) . Graph neural network ( GNN ) is a type of neural network that learns from graph structured data . Recent studies have shown the performance of GNNs on image graph classification tasks ( Monti et al. , 2017 ; Fey et al. , 2018 ; Knyazev et al. , 2019 ; Dwivedi et al. , 2020 ) . In this task , a GNN learns to classify images from embedded graphs that represent superpixels in the images . However , prior studies have been restricted to SLIC superpixels ( Achanta et al. , 2012 ) . In this framework , a single target number of superpixels is arbitrarily defined for an entire dataset irrespective of differences across images , and the superpixels in a given image are of similar size despite intrinsic multiscale structure . Our proposed approach circumvents these limitations , as shown in Figure 1 . The objectives of our work are twofold . First , we aim to rethink the process of downsampling and/or superpixeling images by introducing a multiscale superpixel representation that can be considered as in between the regular grid and similar-sized superpixel representations . Secondly , we systematically study the feasibility of learning to classify images from embedded graphs that represent the multiscale superpixels . In this context , the contributions of our study are as follows . • We present WaveMesh , an algorithm to superpixel ( compress ) images in the pixel domain . WaveMesh is based on the quadtree representation of the wavelet transform . Our sample-specific method leads to non-uniformly distributed and multiscale superpixels . The number and size of superpixels in an image are systematically computed by the algorithm based on the image content . WaveMesh requires at most one tunable parameter . • We propose WavePool , a spatially heterogeneous pooling method tailored to WaveMesh superpixels . WavePool preserves spatial structure leading to interpretable intermediate outputs . WavePool generalizes the classical pooling employed in CNNs , and easily integrates with existing GNNs . • To evaluate the WaveMesh representation and the WavePool method for image graph classification , we compare them with SLIC superpixels and graclus-based pooling by conducting several experiments using SplineCNN , a network proposed by Fey et al . ( 2018 ) . 2 RELATED WORK . Superpixeling . Grouping pixels to form superpixels was proposed by Ren & Malik ( 2003 ) as a preprocessing mechanism that preserves most of the structure necessary for image segmentation . Since then many superpixeling algorithms have been proposed including deep learning based methods ( Liu et al. , 2011 ; Li & Chen , 2015 ; Tu et al. , 2018 ; Giraud et al. , 2018 ; Yang et al. , 2020 ; Zhang et al. , 2020 ) . The SLIC algorithm proposed by Achanta et al . ( 2012 ) is based on k-means clustering . GNN for image graph classification . Prior studies have demonstrated the representational power and generalization ability of GNNs on image graph classification tasks using SLIC superpixels . Dwivedi et al . ( 2020 ) show that message passing graph convolution networks ( GCNs ) outperform Weisfeiler-Lehman GNNs on MNIST and CIFAR-10 datasets . Recognizing the importance of spatial and hierarchical structure inherent in images , Knyazev et al . ( 2019 ) model images as multigraphs that represent SLIC superpixels computed at different user-defined scales , and then successfully train GNNs on the multigraphs . SplineCNN proposed by Fey et al . ( 2018 ) is another network for learning from irregularly structured data . It builds on the work of Monti et al . ( 2017 ) , but uses a spline convolution kernel instead of Gaussian mixture model kernels . Graclus-based pooling . Pooling is used in GNNs to coarsen the graph by aggregating nodes within specified clusters . Graclus is a kernel-based multilevel graph clustering algorithm that efficiently clusters nodes in large graphs without any eigenvector computation . Graclus is used in many GNNs to obtain a clustering on the nodes , which is then used by the pooling operator to coarsen the graph ( Defferrard et al. , 2016 ; Monti et al. , 2017 ; Fey et al. , 2018 ) . Hereafter , we refer to pooling based on graclus clustering as graclus-based pooling . 3 WAVEMESH : MULTISCALE WAVELET SUPERPIXELS . Superpixel meshes . The WaveMesh algorithm is broken down into its elementary steps below : 1 ) images are wavelet transformed , 2 ) images are filtered in wavelet space by thresholding the wavelet coefficients , and 3 ) the superpixel mesh is generated from the wavelet-filter mask . The algorithm is rooted in wavelet theory ’ s seminal work ( Mallat , 1989 ; Donoho & Johnstone , 1994b ) . The particular way in which wavelets are used in this work is inspired by their related application in the physical sciences ( Schneider & Vasilyev , 2010 ; Bassenne et al. , 2017 ; 2018 ) . 3.1 STEP 1 : WAVELET TRANSFORMATION OF THE INPUT IMAGE . Consider a two-dimensional ( 2D ) image I discretely described by its pixel values I [ x0 ] centered at locations x0 = 2−1 ( i∆ , j∆ ) of a N×N regular grid , where ∆ is the inter-pixel spacing and ( i , j ) = 1 , 3 , . . . , 2N − 1 . A continuous wavelet representation of I is I ( x ) = ∑ x0 I ∧ ( 0 ) [ x0 ] φ ( 0 ) ( x− x0 ) , where x is the continuous pixel-space coordinate , and φ0 ( x− x0 ) are scaling functions that form a orthonormal basis of low-pass filters centered at x0 , with filter width ∆ . The scaling functions have unit energy 〈 φ0 ( x− x0 ) φ0 ( x− x0 ) 〉 = 1 , where the bracket operator 〈y〉 = 1/ ( N∆ ) 2 ∫ y ( x ) dx denotes the global average for a general 2D continuous field y ( x ) . In practice , when dealing with discrete signals , I ∧ ( 0 ) [ x0 ] can not be computed exactly , since I is only known at discrete points x0 . Instead , it is numerically discretized and the approximation coefficients I ∧ ( 0 ) [ x0 ] are estimated as an algebraic function of I [ x0 ] . Assuming that φ0 ( x− x0 ) decays fast away from x = x0 , we get I ∧ ( 0 ) [ x0 ] = I [ x0 ] /N ( Addison , 2017 ) . This estimate for I ∧ ( 0 ) [ x0 ] is the initialization stage of the recursive wavelet multiresolution algorithm ( MRA ) of Mallat ( 1989 ) , which enables the computation of wavelet coefficients at coarser scales . The decomposition of the finest-scale low-pass filter φ0 ( x− x0 ) in terms of narrow-band wavelet filters ψ ( s , d ) ( x − xs ) with increasingly large filter width and a coarsest-scale scaling function φ ( S ) ( x− xS ) yields the full wavelet-series expansion of I , I ( x ) = S∑ s=1 ∑ xs 3∑ d=1 I ∧ ( s , d ) [ xs ] ψ ( s , d ) ( x− xs ) + I ∧ ( S ) [ xS ] φ ( S ) ( x− xS ) . ( 1 ) Here , I ∧ ( s , d ) [ xs ] = 〈 I ( x ) ψ ( s , d ) ( x− xs ) 〉 and I ∧ ( S ) [ xS ] = 〈 I ( x ) φ ( S ) ( x− xS ) 〉 are wavelet and approximation coefficients at scale s and S , respectively , obtained from the orthonormality properties of the wavelet and scaling functions . In this formulation , d = ( 1 , 2 , 3 ) is a wavelet directionality index , and s = ( 1 , 2 . . . , S ) is a scale exponent , with S = log2N the number of resolution levels allowed by the grid ( 5 for 32×32 images ) . Similarly , xs = 2s−1 ( i∆ , j∆ ) is a scale-dependent wavelet grid of ( N/2s ) × ( N/2s ) elements where the basis functions are centered , with i , j = 1 , 3 , . . . , N/2s−1 − 1 . The wavelet coefficients represent the local fluctuations of I centered at xs at scale s , while the approximation coefficient is proportional to the global mean of I . At each scale , the filter width of the wavelets is 2s∆ . In this study , the 2D orthonormal basis functions ψ ( s , d ) ( x− xs ) are products of one-dimensional ( 1D ) Haar wavelets ( Meneveau , 1991 ) . The definition of 2D wavelets as multiplicative products of 1D wavelets is a particular choice that follows the MRA formulation ( Mallat , 1989 ) . Haar wavelets have a narrow spatial support that provides a high degree of spatial localization . However , they display large spectral leakage at high wavenumbers since infinite spectral and spatial resolutions can not be simultaneously attained due to limitations imposed by the uncertainty principle ( Addison , 2017 ) . Different boundary conditions can be assumed for the field I . We do not require such a choice in this study as we restrict ourselves to square images . However , the wavelet MRA framework is not limited to square inputs and can be generalized to rectangular inputs ( Addison , 2017 ; Kim et al. , 2018 ) . The definition of 2D wavelets as multiplicative products of 1D wavelets is a particular choice that follows the MRA formulation described by Mallat ( 1989 ) , in which , the multivariate wavelets are characterized by an isotropic scale and therefore render limited information about anisotropy in the image . A large number of alternative basis functions have been recently proposed for replacing traditional wavelets when analyzing multi-dimensional data that exhibit complex anisotropic structures such as filaments and sheets . These include , but are not limited to , curvelets , contourlets , and shearlets ( see Kutyniok & Labate ( 2012 ) for an extensive review on this topic ) . | This paper introduces a wavelet-based superpixel algorithm and a spatially heterogeneous pooling. More specifically, they introduce an algorithm to compress images in the pixel domain and it leads non-uniformly distributed and multiscale superpixels. Furthermore, they introduced a spatially heterogeneous pooling method tailored to the superpixel algorithm. Finally, they demonstrate the effectiveness of their method on MNIST, Fashion-MNIST, and CIFAR-10 datasets. | SP:62b109418f4a6e8c755a0864e766448e37d2f9c3 |
A Unified View on Graph Neural Networks as Graph Signal Denoising | 1 INTRODUCTION . Graph Neural Networks ( GNNs ) have shown great capacity in learning representations for graphstructured data and thus have facilitated many down-stream tasks such as node classification ( Kipf & Welling , 2016 ; Veličković et al. , 2017 ; Ying et al. , 2018a ; Klicpera et al. , 2018 ) and graph classification ( Defferrard et al. , 2016 ; Ying et al. , 2018b ) . As traditional deep learning models , a GNN model is usually composed of several stacking GNN layers . Given a graph G with N nodes , a GNN layer typically contains a feature transformation and a feature aggregation operation as : Feature Transformation : X′in = ftrans ( Xin ) ; Feature Aggregation : Xout = fagg ( X ′ in ; G ) ( 1 ) where Xin ∈ RN×din and Xout ∈ RN×dout denote the input and output features of the GNN layer with din and dout as the corresponding dimensions , respectively . Note that the non-linear activation is not included in Eq . ( 1 ) to ease the discussion . The feature transformation operation ftrans ( · ) transforms the input of Xin to X′in ∈ RN×dout as its output ; and the feature aggregation operation fagg ( · ; G ) updates the node features by aggregating the transformed node features via the graph G. In general , different GNN models share similar feature transformations ( often , a single feed-forward layer ) , while adopting different designs for aggregation operation . We raise a natural question – is there an intrinsic connection among these feature aggregation operations and their assumptions ? The significance of a positive answer to this question is two-fold . Firstly , it offers a new perspective to create a uniform understanding on representative aggregation operations . Secondly , it enables us to develop a general GNN framework that not only provides a unified view on multiple existing representative GNN models , but also has the potential to inspire new ones . In this paper , we aim to build the connection among feature aggregation operations of representative GNN models including GCN ( Kipf & Welling , 2016 ) , GAT ( Veličković et al. , 2017 ) , PPNP and APPNP ( Klicpera et al. , 2018 ) . In particular , we mathematically establish that the aggregation operations in these models can be unified as the process of exactly , and sometimes approximately , addressing a graph signal denoising problem with Laplacian regularization ( Shuman et al. , 2013 ) . This connection suggests that these aggregation operations share a unified goal : to ensure feature smoothness of connected nodes . With this understanding , we propose a general GNN framework , UGNN , which not only provides a straightforward , unified view for many existing aggregation operations , but also suggests various promising directions to build new aggregation operations suitable for distinct applications . To demonstrate its potential , we build an instance of UGNN called ADA-UGNN , which is suited for handling varying smoothness properties across nodes , and conduct experiments to show its effectiveness . 2 REPRESENTATIVE GRAPH NEURAL NETWORKS . In this section , we introduce notations for graphs and briefly summarize several representative GNN models . A graph can be denoted as G = { V , E } , where V and E are its corresponding node and edge sets . The connections in G can be represented as an adjacency matrix A ∈ RN×N , with N the number of nodes in the graph . The Laplacian matrix of the graph G is denoted as L. It is defined as L = D −A , where D is a diagonal degree matrix corresponding to A . There are also normalized versions of the Laplacian matrix such as L = I −D− 12AD− 12 or L = I −D−1A . In this work , we sometimes adopt different Laplacians to establish connections between different GNNs and the graph denoising problem , clarifying in the text . In this section , we generally use Xin ∈ RN×din and Xout ∈ RN×dout to denote input and output features of GNN layers . Next , we describe a few representative GNN models . 2.1 GRAPH CONVOLUTIONAL NETWORKS ( GCN ) . Following Eq . ( 1 ) , a single layer in GCN ( Kipf & Welling , 2016 ) can be written as follows : Feature Transformation : X′in = XinW ; Feature Aggregation : Xout = ÃX ′ in , ( 2 ) where W ∈ Rdin×dout is a feature transformation matrix , and à is a normalized adjacency matrix which includes a self-loop , defined as follows : à = D̂− 1 2 ÂD̂− 1 2 , with  = A+ I and D = diag ( ∑ j Â1 , j , . . . , ∑ j ÂN , j ) . ( 3 ) In practice , multiple GCN layers can be stacked , where each layer takes the output of its previous layer as input . Non-linear activation functions are included between consecutive layers . 2.2 GRAPH ATTENTION NETWORKS ( GAT ) . Graph Attention Networks ( GAT ) adopts the same feature transformation operation as GCN in Eq . ( 2 ) . The feature aggregation operation ( written node-wise ) for a node i is as : Xout [ i , : ] = ∑ j∈Ñ ( i ) αijX ′ in [ j , : ] , with αij = exp ( eij ) ∑ k∈Ñ ( i ) exp ( eik ) . ( 4 ) where Ñ ( i ) = N ( i ) ∪ { i } denotes the neighbors ( self-inclusive ) of node i , and Xout [ i , : ] is the i-th row of the matrix Xout , i.e . the output node features of node i . In this aggregation operation , αij is a learnable attention score to differentiate the importance of distinct nodes in the neighborhood . Specifically , αij is a normalized form of eij , which is modeled as : eij = LeakyReLU ( [ X′in [ i , : ] ‖X′in [ j , : ] ] a ) ( 5 ) where [ ·‖· ] denotes the concatenation operation and a ∈ R2d is a learnable vector . Similar to GCN , a GAT model usually consists of multiple stacked GAT layers . 2.3 PERSONALIZED PROPAGATION OF NEURAL PREDICTIONS ( PPNP ) . Personalized Propagation of Neural Predictions ( PPNP ) ( Klicpera et al. , 2018 ) introduces an aggregation operation based on Personalized PageRank ( PPR ) . Specifically , the PPR matrix is defined as α ( I − ( 1 − α ) à ) −1 , where α ∈ ( 0 , 1 ) is a hyper-parameter . The ij-th element of the PPR matrix specifies the influence of node i on node j . The feature transformation operation is modeled as Multi-layer Perception ( MLP ) . The PPNP model can be written in the form of Eq . ( 1 ) as follows : Feature Transformation : X′in = MLP ( Xin ) ; Feature Aggregation : Xout = α ( I− ( 1− α ) à ) −1X′in . ( 6 ) Unlike GCN and GAT , PPNP only consists of a single feature aggregation layer , but with a poten- tially deep feature transformation . Since the matrix inverse in Eq . ( 6 ) is costly , Klicpera et al . ( 2018 ) also introduces a practical , approximated version of PPNP , called APPNP , where the aggregation operation is performed in an iterative way as : X ( k ) out = ( 1− α ) ÃX ( k−1 ) out + αX ′ in k = 1 , . . .K , ( 7 ) where X ( 0 ) out = X ′ in and X ( K ) out is the output of the feature aggregation operation . As proved in Klicpera et al . ( 2018 ) , X ( K ) out converges to the solution obtained by PPNP , i.e. , Xout in Eq . ( 6 ) . 3 GNNS AS GRAPH SIGNAL DENOISING . In this section , we aim to establish the connections between the introduced GNN models and a graph signal denoising problem with Laplacian regularization . We first introduce the problem . Problem 1 ( Graph Signal Denoising with Laplacian Regularization ) . Suppose that we are given a noisy signal X ∈ RN×d on a graph G. The goal of the problem is to recover a clean signal F ∈ RN×d , assumed to be smooth over G , by solving the following optimization problem : argmin F L = ‖F−X‖2F + c · tr ( F > LF ) , ( 8 ) Note that the first term guides F to be close to X , while the second term tr ( F > LF ) is the Laplacian regularization that guides the smoothness of F over the graph . c > 0 is a balancing constant . Assuming we adopt the unnormalized version of Laplacian matrix with L = D−A ( the adjacency matrix A is assumed to be binary ) , the second term in Eq . ( 8 ) can be written in an edge-centric way or a node-centric way as : edge-centric : c ∑ ( i , j ) ∈E ‖F [ i , : ] − F [ j , : ] ‖22 ; node-centric : 1 2 c ∑ i∈V ∑ j∈Ñ ( i ) ‖F [ i , : ] − F [ j , : ] ‖22 . ( 9 ) Clearly , from the edge-centric view , the regularization term measures the global smoothness of F , which is small when connected nodes share similar features . On the other hand , we can view the term∑ j∈Ñ ( i ) ‖F [ i , : ] − F [ j , : ] ‖ 2 2 as a local smoothness measure for node i as it measures the difference between node i and all its neighbors . The regularization term can then be regarded as a summation of local smoothness over all nodes . Note that the adjacency matrix A is assumed to be binary when deriving Eq . ( 9 ) . Similar formulations can also be derived to other types of Laplacian matrices . In the following subsections , we demonstrate the connections between aggregation operations in various GNN models and the graph signal denoising problem . 3.1 CONNECTION TO PPNP AND APPNP . In this subsection , we establish the connection between the graph signal denoising problem ( 8 ) and the aggregation propagations in PPNP and APPNP in Theorem 1 and Theorem 2 , respectively . Theorem 1 . When we adopt the normalized Laplacian matrix L = I−à , with à defined in Eq . ( 3 ) , the feature aggregation operation in PPNP ( Eq . ( 6 ) ) can be regarded as exactly solving the graph signal denoising problem ( 8 ) with X′in as the input noisy signal and c = 1 α − 1 . Proof . Note that the objective in Eq . ( 8 ) is convex . Hence , its closed-form solution F∗ to exactly solve the graph signal denosing problem can be obtained by setting its derivative to 0 as : ∂L ∂F = 2 ( F−X ) + 2cLF = 0⇒ F∗ = ( I+ cL ) −1X ( 10 ) Given L = I− à , F∗ can be reformulated as : F∗ = ( I+ cL ) −1 X = ( I+ c ( I− à ) ) −1 X = 1 1 + c ( I− c 1 + c à ) −1 X ( 11 ) The feature aggregation operation in Eq . ( 6 ) is equivalent to the closed-form solution in Eq . ( 11 ) when we set α = 1/ ( 1 + c ) and X = X′in . This completes the proof . Theorem 2 . When we adopt the normalized Laplacian matrix L = I − à , the feature aggregation operation in APPNP ( Eq . ( 7 ) ) approximately solves the graph signal denoising problem ( 8 ) by iterative gradient descent with X′in as the input noisy signal , c = 1 α − 1 and stepsize b = 1 2+2c . Proof . To solve the graph signal denoising problem ( 8 ) , we take iterative gradient method with the stepsize b . Specifically , the k-th step gradient descent on problem ( 8 ) is as follows : F ( k ) ← F ( k−1 ) − b · ∂L ∂F ( F = F ( k−1 ) ) = ( 1− 2b− 2bc ) F ( k−1 ) + 2bX+ 2bcÃF ( k−1 ) ( 12 ) where F ( 0 ) = X . When we set the stepsize b as 12+2c , we have the following iterative steps : F ( k ) ← 1 1 + c X+ c 1 + c ÃF ( k−1 ) , k = 1 , . . .K , ( 13 ) which is equivalent to the iterative aggregation operation of the APPNP model in Eq . ( 7 ) with X = X′in and α = 1 1+c . This completes the proof . These two connections provide a new explanation on the hyper-parameter α in PPNP and APPNP from the graph signal denoising perspective . Specifically , a smaller α indicates a larger c , which means the obtained Xout is enforced to be smoother over the graph . | 1). The novelty and contribution are very limited. In literature, many papers have discussed the connection between different GNNs, typically, including aggregators and Updaters, such as discussed in “Deep Learning on Graphs: A Survey”. The submission only provides a kind of connection between GCN, GAT, PPPN and APPNP in the perspective of denoising. Compared with that, the survey paper actually connects many different GNNs. | SP:7a420981b1627e310e77f84be095f948c6af3e84 |
A Unified View on Graph Neural Networks as Graph Signal Denoising | 1 INTRODUCTION . Graph Neural Networks ( GNNs ) have shown great capacity in learning representations for graphstructured data and thus have facilitated many down-stream tasks such as node classification ( Kipf & Welling , 2016 ; Veličković et al. , 2017 ; Ying et al. , 2018a ; Klicpera et al. , 2018 ) and graph classification ( Defferrard et al. , 2016 ; Ying et al. , 2018b ) . As traditional deep learning models , a GNN model is usually composed of several stacking GNN layers . Given a graph G with N nodes , a GNN layer typically contains a feature transformation and a feature aggregation operation as : Feature Transformation : X′in = ftrans ( Xin ) ; Feature Aggregation : Xout = fagg ( X ′ in ; G ) ( 1 ) where Xin ∈ RN×din and Xout ∈ RN×dout denote the input and output features of the GNN layer with din and dout as the corresponding dimensions , respectively . Note that the non-linear activation is not included in Eq . ( 1 ) to ease the discussion . The feature transformation operation ftrans ( · ) transforms the input of Xin to X′in ∈ RN×dout as its output ; and the feature aggregation operation fagg ( · ; G ) updates the node features by aggregating the transformed node features via the graph G. In general , different GNN models share similar feature transformations ( often , a single feed-forward layer ) , while adopting different designs for aggregation operation . We raise a natural question – is there an intrinsic connection among these feature aggregation operations and their assumptions ? The significance of a positive answer to this question is two-fold . Firstly , it offers a new perspective to create a uniform understanding on representative aggregation operations . Secondly , it enables us to develop a general GNN framework that not only provides a unified view on multiple existing representative GNN models , but also has the potential to inspire new ones . In this paper , we aim to build the connection among feature aggregation operations of representative GNN models including GCN ( Kipf & Welling , 2016 ) , GAT ( Veličković et al. , 2017 ) , PPNP and APPNP ( Klicpera et al. , 2018 ) . In particular , we mathematically establish that the aggregation operations in these models can be unified as the process of exactly , and sometimes approximately , addressing a graph signal denoising problem with Laplacian regularization ( Shuman et al. , 2013 ) . This connection suggests that these aggregation operations share a unified goal : to ensure feature smoothness of connected nodes . With this understanding , we propose a general GNN framework , UGNN , which not only provides a straightforward , unified view for many existing aggregation operations , but also suggests various promising directions to build new aggregation operations suitable for distinct applications . To demonstrate its potential , we build an instance of UGNN called ADA-UGNN , which is suited for handling varying smoothness properties across nodes , and conduct experiments to show its effectiveness . 2 REPRESENTATIVE GRAPH NEURAL NETWORKS . In this section , we introduce notations for graphs and briefly summarize several representative GNN models . A graph can be denoted as G = { V , E } , where V and E are its corresponding node and edge sets . The connections in G can be represented as an adjacency matrix A ∈ RN×N , with N the number of nodes in the graph . The Laplacian matrix of the graph G is denoted as L. It is defined as L = D −A , where D is a diagonal degree matrix corresponding to A . There are also normalized versions of the Laplacian matrix such as L = I −D− 12AD− 12 or L = I −D−1A . In this work , we sometimes adopt different Laplacians to establish connections between different GNNs and the graph denoising problem , clarifying in the text . In this section , we generally use Xin ∈ RN×din and Xout ∈ RN×dout to denote input and output features of GNN layers . Next , we describe a few representative GNN models . 2.1 GRAPH CONVOLUTIONAL NETWORKS ( GCN ) . Following Eq . ( 1 ) , a single layer in GCN ( Kipf & Welling , 2016 ) can be written as follows : Feature Transformation : X′in = XinW ; Feature Aggregation : Xout = ÃX ′ in , ( 2 ) where W ∈ Rdin×dout is a feature transformation matrix , and à is a normalized adjacency matrix which includes a self-loop , defined as follows : à = D̂− 1 2 ÂD̂− 1 2 , with  = A+ I and D = diag ( ∑ j Â1 , j , . . . , ∑ j ÂN , j ) . ( 3 ) In practice , multiple GCN layers can be stacked , where each layer takes the output of its previous layer as input . Non-linear activation functions are included between consecutive layers . 2.2 GRAPH ATTENTION NETWORKS ( GAT ) . Graph Attention Networks ( GAT ) adopts the same feature transformation operation as GCN in Eq . ( 2 ) . The feature aggregation operation ( written node-wise ) for a node i is as : Xout [ i , : ] = ∑ j∈Ñ ( i ) αijX ′ in [ j , : ] , with αij = exp ( eij ) ∑ k∈Ñ ( i ) exp ( eik ) . ( 4 ) where Ñ ( i ) = N ( i ) ∪ { i } denotes the neighbors ( self-inclusive ) of node i , and Xout [ i , : ] is the i-th row of the matrix Xout , i.e . the output node features of node i . In this aggregation operation , αij is a learnable attention score to differentiate the importance of distinct nodes in the neighborhood . Specifically , αij is a normalized form of eij , which is modeled as : eij = LeakyReLU ( [ X′in [ i , : ] ‖X′in [ j , : ] ] a ) ( 5 ) where [ ·‖· ] denotes the concatenation operation and a ∈ R2d is a learnable vector . Similar to GCN , a GAT model usually consists of multiple stacked GAT layers . 2.3 PERSONALIZED PROPAGATION OF NEURAL PREDICTIONS ( PPNP ) . Personalized Propagation of Neural Predictions ( PPNP ) ( Klicpera et al. , 2018 ) introduces an aggregation operation based on Personalized PageRank ( PPR ) . Specifically , the PPR matrix is defined as α ( I − ( 1 − α ) à ) −1 , where α ∈ ( 0 , 1 ) is a hyper-parameter . The ij-th element of the PPR matrix specifies the influence of node i on node j . The feature transformation operation is modeled as Multi-layer Perception ( MLP ) . The PPNP model can be written in the form of Eq . ( 1 ) as follows : Feature Transformation : X′in = MLP ( Xin ) ; Feature Aggregation : Xout = α ( I− ( 1− α ) à ) −1X′in . ( 6 ) Unlike GCN and GAT , PPNP only consists of a single feature aggregation layer , but with a poten- tially deep feature transformation . Since the matrix inverse in Eq . ( 6 ) is costly , Klicpera et al . ( 2018 ) also introduces a practical , approximated version of PPNP , called APPNP , where the aggregation operation is performed in an iterative way as : X ( k ) out = ( 1− α ) ÃX ( k−1 ) out + αX ′ in k = 1 , . . .K , ( 7 ) where X ( 0 ) out = X ′ in and X ( K ) out is the output of the feature aggregation operation . As proved in Klicpera et al . ( 2018 ) , X ( K ) out converges to the solution obtained by PPNP , i.e. , Xout in Eq . ( 6 ) . 3 GNNS AS GRAPH SIGNAL DENOISING . In this section , we aim to establish the connections between the introduced GNN models and a graph signal denoising problem with Laplacian regularization . We first introduce the problem . Problem 1 ( Graph Signal Denoising with Laplacian Regularization ) . Suppose that we are given a noisy signal X ∈ RN×d on a graph G. The goal of the problem is to recover a clean signal F ∈ RN×d , assumed to be smooth over G , by solving the following optimization problem : argmin F L = ‖F−X‖2F + c · tr ( F > LF ) , ( 8 ) Note that the first term guides F to be close to X , while the second term tr ( F > LF ) is the Laplacian regularization that guides the smoothness of F over the graph . c > 0 is a balancing constant . Assuming we adopt the unnormalized version of Laplacian matrix with L = D−A ( the adjacency matrix A is assumed to be binary ) , the second term in Eq . ( 8 ) can be written in an edge-centric way or a node-centric way as : edge-centric : c ∑ ( i , j ) ∈E ‖F [ i , : ] − F [ j , : ] ‖22 ; node-centric : 1 2 c ∑ i∈V ∑ j∈Ñ ( i ) ‖F [ i , : ] − F [ j , : ] ‖22 . ( 9 ) Clearly , from the edge-centric view , the regularization term measures the global smoothness of F , which is small when connected nodes share similar features . On the other hand , we can view the term∑ j∈Ñ ( i ) ‖F [ i , : ] − F [ j , : ] ‖ 2 2 as a local smoothness measure for node i as it measures the difference between node i and all its neighbors . The regularization term can then be regarded as a summation of local smoothness over all nodes . Note that the adjacency matrix A is assumed to be binary when deriving Eq . ( 9 ) . Similar formulations can also be derived to other types of Laplacian matrices . In the following subsections , we demonstrate the connections between aggregation operations in various GNN models and the graph signal denoising problem . 3.1 CONNECTION TO PPNP AND APPNP . In this subsection , we establish the connection between the graph signal denoising problem ( 8 ) and the aggregation propagations in PPNP and APPNP in Theorem 1 and Theorem 2 , respectively . Theorem 1 . When we adopt the normalized Laplacian matrix L = I−à , with à defined in Eq . ( 3 ) , the feature aggregation operation in PPNP ( Eq . ( 6 ) ) can be regarded as exactly solving the graph signal denoising problem ( 8 ) with X′in as the input noisy signal and c = 1 α − 1 . Proof . Note that the objective in Eq . ( 8 ) is convex . Hence , its closed-form solution F∗ to exactly solve the graph signal denosing problem can be obtained by setting its derivative to 0 as : ∂L ∂F = 2 ( F−X ) + 2cLF = 0⇒ F∗ = ( I+ cL ) −1X ( 10 ) Given L = I− à , F∗ can be reformulated as : F∗ = ( I+ cL ) −1 X = ( I+ c ( I− à ) ) −1 X = 1 1 + c ( I− c 1 + c à ) −1 X ( 11 ) The feature aggregation operation in Eq . ( 6 ) is equivalent to the closed-form solution in Eq . ( 11 ) when we set α = 1/ ( 1 + c ) and X = X′in . This completes the proof . Theorem 2 . When we adopt the normalized Laplacian matrix L = I − à , the feature aggregation operation in APPNP ( Eq . ( 7 ) ) approximately solves the graph signal denoising problem ( 8 ) by iterative gradient descent with X′in as the input noisy signal , c = 1 α − 1 and stepsize b = 1 2+2c . Proof . To solve the graph signal denoising problem ( 8 ) , we take iterative gradient method with the stepsize b . Specifically , the k-th step gradient descent on problem ( 8 ) is as follows : F ( k ) ← F ( k−1 ) − b · ∂L ∂F ( F = F ( k−1 ) ) = ( 1− 2b− 2bc ) F ( k−1 ) + 2bX+ 2bcÃF ( k−1 ) ( 12 ) where F ( 0 ) = X . When we set the stepsize b as 12+2c , we have the following iterative steps : F ( k ) ← 1 1 + c X+ c 1 + c ÃF ( k−1 ) , k = 1 , . . .K , ( 13 ) which is equivalent to the iterative aggregation operation of the APPNP model in Eq . ( 7 ) with X = X′in and α = 1 1+c . This completes the proof . These two connections provide a new explanation on the hyper-parameter α in PPNP and APPNP from the graph signal denoising perspective . Specifically , a smaller α indicates a larger c , which means the obtained Xout is enforced to be smoother over the graph . | of the paper: In this paper, the authors make the following new argument: The aggregation processes of current popular GNN models such as GCN, GAT, PPNP, and APPNP can be treated as a graph denoising problem where the objective is to minimize a recovery error (a norm of noisy feature matrix, i.e. ||F-X||) plus a graph-based regularization (smoothness). This new view provides a way to build a GNN model, namely (Ada-)UGNN. Experimental results show the effectiveness of Ada-UGNN on the task of node classification and the task of preventing adversarial attacks on graphs. | SP:7a420981b1627e310e77f84be095f948c6af3e84 |
Generating Furry Cars: Disentangling Object Shape and Appearance across Multiple Domains | 1 INTRODUCTION . Humans possess the incredible ability of being able to combine properties from multiple image distributions to create entirely new visual concepts . For example , Lake et al . ( 2015 ) discussed how humans can parse different object parts ( e.g. , wheels of a car , handle of a lawn mower ) and combine them to conceptualize novel object categories ( a scooter ) . Fig . 2 illustrates another example from a different angle ; it is easy for us humans to imagine how the brown car would look if its appearance were borrowed from the blue and red bird . To model a similar ability in machines , a precise disentanglement of shape and appearance features , and the ability to combine them across different domains are needed . In this work , we seek to develop a framework to do just that , where we define domains to correspond to “ basic-level categories ” ( Rosch , 1978 ) . Domain A YA Domain B XB YB IAA IBB XA ……… .. ……… .. ……… .. ……… .. IAB ( intra-domain ) ( inter-domain ) ( intra-domain ) I1 I2 I3 I4 shape appearance shape appearance Figure 2 : Each domain can be represented with e.g. , a set of object shapes ( XA/B ) and appearances ( YA/B ) . The ability to generate images of the form IAA/BB requires the system to learn intra-domain disentanglement ( Singh et al. , 2019 ) of latent factors , whereas the ability to generate images of the form IAB ( appearance/shape from domain A/B , respectively ) requires inter-domain disentanglement of factors , which is the goal of this work . Disentangling the factors of variation in visual data has received significant attention ( Chen et al. , 2016 ; Higgins et al. , 2017 ; Denton & Birodkar , 2017 ; Singh et al. , 2019 ) , in particular with advances in generative models ( Goodfellow et al. , 2014 ; Radford et al. , 2016 ; Zhang et al. , 2018 ; Karras et al. , 2019 ; Brock et al. , 2019 ) . The premise behind learning disentangled representations is that an image can be thought of as a function of , say two independent latent factors , such that each controls only one human interpretable property ( e.g. , shape vs. appearance ) . The existence of such representations enables combining latent factors from two different source images to create a new one , which has properties of both . Prior generative modeling work ( Hu et al. , 2018 ; Singh et al. , 2019 ; Li et al. , 2020 ) explore a part of this idea , where the space of latent factors being combined is limited to one domain ( e.g. , combining a sparrow ’ s appearance with a duck ’ s shape within the domain of birds ; IAA in Fig . 2 ) , a scenario which we refer to as intra-domain disentanglement of latent factors . This work , focusing on shape and appearance as factors , generalizes this idea to inter-domain disentanglement : combining latent factors from different domains ( e.g. , appearance from birds , shape from cars ) to create a new breed of images which does not exist in either domain ( IAB in Fig . 2 ) . The key challenge to this problem is that there is no ground-truth distribution for the hybrid visual concept that spans the two domains . Due to this , directly applying a single domain disentangled image generation approach to the multi-domain setting does not work , as the hybrid concept would be considered out of distribution ( we provide more analysis in Sec . 3 ) . Despite the lack of ground-truth , as humans , we would deem certain combinations of factors to be better than others . For example , if two domains share object parts ( e.g. , dog and leopard ) , we would prefer a transfer of appearance in which local part appearances are preserved . For the ones that don ’ t share object parts ( e.g. , bird and car ) , we may prefer a transfer of appearance in which the overall color/texture frequency is preserved ( e.g . Fig . 2 , I2 and IAB ) , which has been found to be useful in object categorization at the coarse level in a neuroimaging study ( Rice et al. , 2014 ) . Our work formulates this idea as a training process , where any two images having the same latent appearance are constrained to have similar frequency of those low-level features . These features in turn are learned ( as opposed to being hand-crafted ) , using contrastive learning ( Hadsell et al. , 2006 ; Chen et al. , 2020 ) , to better capture the low-level statistics of the dataset . The net effect is an accurate transfer of appearance , where important details remain consistent across domains in spite of large shape changes . Importantly , we achieve this by only requiring bounding box annotations to help disentangle object from background , without any other labels , including which domain an image comes from . To our knowledge , our work is the first to attempt combining factors from different data distributions to generate abstract visual concepts ( e.g. , car with dog ’ s texture ) . We perform experiments on a variety of multi-modal datasets , and demonstrate our method ’ s effectiveness qualitatively , quantitatively , and through user studies . We believe our work can open up new avenues for art/design ; e.g. , a customer could visualize how sofas would look with an animal print or a fashion/car designer could create a new space of designs using the appearance from arbitrary objects . Finally , we believe that the task introduced in this work offers better scrutiny of the quality of disentanglement learned by a method : if it succeeds in doing so within a domain but not in the presence of multiple ones , that in essence indicates some form of entanglement of factors with the domain ’ s properties . 2 RELATED WORK . Learning disentangled representations for image generation has been studied in both the supervised ( relying on e.g. , keypoints and object masks ) ( Peng et al. , 2017 ; Balakrishnan et al. , 2018 ; Ma et al. , 2018 ) and unsupervised settings ( Li et al. , 2018 ; Shu et al. , 2018 ) . Recent work disentangle object shape , appearance , pose , and background with only bounding box annotations ( Singh et al. , 2019 ; Li et al. , 2020 ) . All prior work , however , focus on disentangling and combining factors within a single domain ( e.g. , birds ) , and can not be directly extended to the multi-domain setting since hybrid images would be considered out of distribution ( i.e. , fake ) . We present a framework that addresses this limitation , and which works equally well in both single and multi-domain settings . Another potential angle to tackle the task at hand is through style-content disentanglement ( Gatys et al. , 2015 ; Johnson et al. , 2016 ; Ulyanov et al. , 2016 ) . However , an object ’ s appearance and shape in complex datasets do not necessarily align with those of style and content ( e.g. , color of background dominating the style rather than object ’ s appearance ) . Unsupervised image-to-image translation works ( Zhu et al. , 2017 ; Kim et al. , 2017 ; Huang et al. , 2018 ; Gonzalez-Garcia et al. , 2018 ; Choi et al. , 2020 ) translate an image from domain A to domain B , such that the resulting image preserves the property common to domains A and B ( e.g. , structure ) , and property exclusive to B ( e.g. , appearance/style ) . However , if the domains don ’ t have anything in common ( e.g. , cars ↔ dogs : different structure and appearance ) , the translated images typically become degenerate , and no longer preserve properties from different domains . In contrast , our method can combine latent factors across arbitrary domains that have no part-level correspondences . Moreover , when part-level correspondences do exist ( e.g. , dogs ↔ tiger ) , it combines appearance and shape in a way which preserves them . Lee et al . ( 2018 ) extended the multimodal image-to-image translation setting by conditioning the translation process on both a content image as well as a query attribute image , so that the resulting output preserves the content and attributes of the respective images . However , this application was explored in settings where both the content and attribute image share similar content/structure ( e.g. , natural and sketch images of face domain as content/attribute images respectively ) , which is different from our setting in which the factors to be combined come from entirely different domains ( e.g. , cars vs birds ) . 3 APPROACH . Given a single dataset consisting of two image domains A and B ( e.g. , dogs and cars ) , our goal is to learn a generative model of this distribution ( with only bounding box annotations and without domain/category/segmentation labels ) , so that one latent factor ( shape ) from A and another factor ( appearance ) from B ( or vice-versa ) can be combined to generate a new out-of-distribution image preserving the respective latent properties from the two domains . Since there is no ground truth for the desired hybrid out-of-distribution images , our key idea is to preserve the frequency of low-level appearance features when transferred from one domain ’ s shape to another domain ’ s shape . To this end , we develop a learnable , differentiable histogram-based representation of object appearance , and optimize the generator so that any two images that are assigned the same latent appearance factor produce similar feature histograms . This leads to the model learning better disentanglement of object shape and appearance , allowing it to create hybrid images that span multiple domains . We first formalize the desired properties of our model , and then discuss a single domain disentangled image generation base model ( Singh et al. , 2019 ) that we build upon . Finally , we explain how our proposed framework can augment the base model to achieve the complete set of desired properties . 3.1 PROBLEM FORMULATION . Combining factors from multiple domains requires learning a disentangled latent representation for appearance , shape , and background of an object . This enables each of the latent factor ’ s behavior to remain consistent , irrespective of other factors . For example , we want the latent appearance vector that represents red and blue object color to produce the same appearance ( color/texture distribution ) regardless of whether it is combined with a bird ’ s shape or a car ’ s shape ( IAA and IAB in Fig . 2 ) . Henceforth , we represent shape , appearance , and background of an object as x , y , b respectively , and remaining continuous factors ( e.g. , object pose ) using z . As shown in Fig . 2 , we can interpret domain A as having an associated set of shapes - XA ( e.g. , possible bird shapes ) , and an associated set of appearances - YA ( e.g. , possible bird appear- ances ) . With an analogous interpretation for domain B ( e.g. , cars ) , we formalize the following problems : ( i ) Intra-domain disentanglement : where a method can generate images of the form I = G ( x , y , z , b ) , where [ x , y ] ∈ ( XA × YA ) ( × denotes Cartesian product ) . In other words , the task is to combine all possible shapes with possible appearances within a domain ( e.g. , IAA/IBB in Fig . 2 ) . ( ii ) Inter-domain disentanglement : where everything remains the same as intradomain disentanglement , except that [ x , y ] ∈ ( XAB × YAB ) , where XAB = ( XA ∪ XB ) and YAB = ( YA ∪ YB ) . This is a more general version of the task , where we wish to combine all possible shapes with all possible appearances across multiple domains ( e.g. , IAB in Fig . 2 ) . | This paper proposes a generative model as an extension of FineGAN that aims to learn a disentangled representation for image shape and appearance across different domains rather than "intra-domain" disentanglement. To this end, the authors adopt the prior that features that correspond to an object's appearance should preserve frequency histograms. In order to incorporate this prior into the differential learning procedure, they learn a library of convolutional filters using a contrastive learning framework. They provide many convincing baselines and comparisons to related work and are able to attain reasonable results for style/content transfer between unrelated domains. | SP:7975585d96507de92ea59435396a8ed2fcc91008 |
Generating Furry Cars: Disentangling Object Shape and Appearance across Multiple Domains | 1 INTRODUCTION . Humans possess the incredible ability of being able to combine properties from multiple image distributions to create entirely new visual concepts . For example , Lake et al . ( 2015 ) discussed how humans can parse different object parts ( e.g. , wheels of a car , handle of a lawn mower ) and combine them to conceptualize novel object categories ( a scooter ) . Fig . 2 illustrates another example from a different angle ; it is easy for us humans to imagine how the brown car would look if its appearance were borrowed from the blue and red bird . To model a similar ability in machines , a precise disentanglement of shape and appearance features , and the ability to combine them across different domains are needed . In this work , we seek to develop a framework to do just that , where we define domains to correspond to “ basic-level categories ” ( Rosch , 1978 ) . Domain A YA Domain B XB YB IAA IBB XA ……… .. ……… .. ……… .. ……… .. IAB ( intra-domain ) ( inter-domain ) ( intra-domain ) I1 I2 I3 I4 shape appearance shape appearance Figure 2 : Each domain can be represented with e.g. , a set of object shapes ( XA/B ) and appearances ( YA/B ) . The ability to generate images of the form IAA/BB requires the system to learn intra-domain disentanglement ( Singh et al. , 2019 ) of latent factors , whereas the ability to generate images of the form IAB ( appearance/shape from domain A/B , respectively ) requires inter-domain disentanglement of factors , which is the goal of this work . Disentangling the factors of variation in visual data has received significant attention ( Chen et al. , 2016 ; Higgins et al. , 2017 ; Denton & Birodkar , 2017 ; Singh et al. , 2019 ) , in particular with advances in generative models ( Goodfellow et al. , 2014 ; Radford et al. , 2016 ; Zhang et al. , 2018 ; Karras et al. , 2019 ; Brock et al. , 2019 ) . The premise behind learning disentangled representations is that an image can be thought of as a function of , say two independent latent factors , such that each controls only one human interpretable property ( e.g. , shape vs. appearance ) . The existence of such representations enables combining latent factors from two different source images to create a new one , which has properties of both . Prior generative modeling work ( Hu et al. , 2018 ; Singh et al. , 2019 ; Li et al. , 2020 ) explore a part of this idea , where the space of latent factors being combined is limited to one domain ( e.g. , combining a sparrow ’ s appearance with a duck ’ s shape within the domain of birds ; IAA in Fig . 2 ) , a scenario which we refer to as intra-domain disentanglement of latent factors . This work , focusing on shape and appearance as factors , generalizes this idea to inter-domain disentanglement : combining latent factors from different domains ( e.g. , appearance from birds , shape from cars ) to create a new breed of images which does not exist in either domain ( IAB in Fig . 2 ) . The key challenge to this problem is that there is no ground-truth distribution for the hybrid visual concept that spans the two domains . Due to this , directly applying a single domain disentangled image generation approach to the multi-domain setting does not work , as the hybrid concept would be considered out of distribution ( we provide more analysis in Sec . 3 ) . Despite the lack of ground-truth , as humans , we would deem certain combinations of factors to be better than others . For example , if two domains share object parts ( e.g. , dog and leopard ) , we would prefer a transfer of appearance in which local part appearances are preserved . For the ones that don ’ t share object parts ( e.g. , bird and car ) , we may prefer a transfer of appearance in which the overall color/texture frequency is preserved ( e.g . Fig . 2 , I2 and IAB ) , which has been found to be useful in object categorization at the coarse level in a neuroimaging study ( Rice et al. , 2014 ) . Our work formulates this idea as a training process , where any two images having the same latent appearance are constrained to have similar frequency of those low-level features . These features in turn are learned ( as opposed to being hand-crafted ) , using contrastive learning ( Hadsell et al. , 2006 ; Chen et al. , 2020 ) , to better capture the low-level statistics of the dataset . The net effect is an accurate transfer of appearance , where important details remain consistent across domains in spite of large shape changes . Importantly , we achieve this by only requiring bounding box annotations to help disentangle object from background , without any other labels , including which domain an image comes from . To our knowledge , our work is the first to attempt combining factors from different data distributions to generate abstract visual concepts ( e.g. , car with dog ’ s texture ) . We perform experiments on a variety of multi-modal datasets , and demonstrate our method ’ s effectiveness qualitatively , quantitatively , and through user studies . We believe our work can open up new avenues for art/design ; e.g. , a customer could visualize how sofas would look with an animal print or a fashion/car designer could create a new space of designs using the appearance from arbitrary objects . Finally , we believe that the task introduced in this work offers better scrutiny of the quality of disentanglement learned by a method : if it succeeds in doing so within a domain but not in the presence of multiple ones , that in essence indicates some form of entanglement of factors with the domain ’ s properties . 2 RELATED WORK . Learning disentangled representations for image generation has been studied in both the supervised ( relying on e.g. , keypoints and object masks ) ( Peng et al. , 2017 ; Balakrishnan et al. , 2018 ; Ma et al. , 2018 ) and unsupervised settings ( Li et al. , 2018 ; Shu et al. , 2018 ) . Recent work disentangle object shape , appearance , pose , and background with only bounding box annotations ( Singh et al. , 2019 ; Li et al. , 2020 ) . All prior work , however , focus on disentangling and combining factors within a single domain ( e.g. , birds ) , and can not be directly extended to the multi-domain setting since hybrid images would be considered out of distribution ( i.e. , fake ) . We present a framework that addresses this limitation , and which works equally well in both single and multi-domain settings . Another potential angle to tackle the task at hand is through style-content disentanglement ( Gatys et al. , 2015 ; Johnson et al. , 2016 ; Ulyanov et al. , 2016 ) . However , an object ’ s appearance and shape in complex datasets do not necessarily align with those of style and content ( e.g. , color of background dominating the style rather than object ’ s appearance ) . Unsupervised image-to-image translation works ( Zhu et al. , 2017 ; Kim et al. , 2017 ; Huang et al. , 2018 ; Gonzalez-Garcia et al. , 2018 ; Choi et al. , 2020 ) translate an image from domain A to domain B , such that the resulting image preserves the property common to domains A and B ( e.g. , structure ) , and property exclusive to B ( e.g. , appearance/style ) . However , if the domains don ’ t have anything in common ( e.g. , cars ↔ dogs : different structure and appearance ) , the translated images typically become degenerate , and no longer preserve properties from different domains . In contrast , our method can combine latent factors across arbitrary domains that have no part-level correspondences . Moreover , when part-level correspondences do exist ( e.g. , dogs ↔ tiger ) , it combines appearance and shape in a way which preserves them . Lee et al . ( 2018 ) extended the multimodal image-to-image translation setting by conditioning the translation process on both a content image as well as a query attribute image , so that the resulting output preserves the content and attributes of the respective images . However , this application was explored in settings where both the content and attribute image share similar content/structure ( e.g. , natural and sketch images of face domain as content/attribute images respectively ) , which is different from our setting in which the factors to be combined come from entirely different domains ( e.g. , cars vs birds ) . 3 APPROACH . Given a single dataset consisting of two image domains A and B ( e.g. , dogs and cars ) , our goal is to learn a generative model of this distribution ( with only bounding box annotations and without domain/category/segmentation labels ) , so that one latent factor ( shape ) from A and another factor ( appearance ) from B ( or vice-versa ) can be combined to generate a new out-of-distribution image preserving the respective latent properties from the two domains . Since there is no ground truth for the desired hybrid out-of-distribution images , our key idea is to preserve the frequency of low-level appearance features when transferred from one domain ’ s shape to another domain ’ s shape . To this end , we develop a learnable , differentiable histogram-based representation of object appearance , and optimize the generator so that any two images that are assigned the same latent appearance factor produce similar feature histograms . This leads to the model learning better disentanglement of object shape and appearance , allowing it to create hybrid images that span multiple domains . We first formalize the desired properties of our model , and then discuss a single domain disentangled image generation base model ( Singh et al. , 2019 ) that we build upon . Finally , we explain how our proposed framework can augment the base model to achieve the complete set of desired properties . 3.1 PROBLEM FORMULATION . Combining factors from multiple domains requires learning a disentangled latent representation for appearance , shape , and background of an object . This enables each of the latent factor ’ s behavior to remain consistent , irrespective of other factors . For example , we want the latent appearance vector that represents red and blue object color to produce the same appearance ( color/texture distribution ) regardless of whether it is combined with a bird ’ s shape or a car ’ s shape ( IAA and IAB in Fig . 2 ) . Henceforth , we represent shape , appearance , and background of an object as x , y , b respectively , and remaining continuous factors ( e.g. , object pose ) using z . As shown in Fig . 2 , we can interpret domain A as having an associated set of shapes - XA ( e.g. , possible bird shapes ) , and an associated set of appearances - YA ( e.g. , possible bird appear- ances ) . With an analogous interpretation for domain B ( e.g. , cars ) , we formalize the following problems : ( i ) Intra-domain disentanglement : where a method can generate images of the form I = G ( x , y , z , b ) , where [ x , y ] ∈ ( XA × YA ) ( × denotes Cartesian product ) . In other words , the task is to combine all possible shapes with possible appearances within a domain ( e.g. , IAA/IBB in Fig . 2 ) . ( ii ) Inter-domain disentanglement : where everything remains the same as intradomain disentanglement , except that [ x , y ] ∈ ( XAB × YAB ) , where XAB = ( XA ∪ XB ) and YAB = ( YA ∪ YB ) . This is a more general version of the task , where we wish to combine all possible shapes with all possible appearances across multiple domains ( e.g. , IAB in Fig . 2 ) . | The submission describes a method to disentangle shape and appearance of images across two domains such that new images can be generated that have appearance and shape from either of these domains while still being visually convincing. Starting from an established method (FineGAN) to disentangle shape, appearance, background identity as well as a set of "nuisance" factors such as pose in one domain, the paper proposes to add a loss term that aims at retaining appearance when moving from one domain to another. This additional loss term essentials tries to keep the low-level image statistics between two images when both of them are generated with the same appearance, but possibly different shapes. It is trained such that it is invariant to the nuisance parameters (same object under differing views has same statistics), but discriminative towards the object appearance (different objects from the same view have differing statistics). The low level features are expressed as histograms of responses of convolution filters over the masked foreground pattern. The paper provides empirical evidences in the form of example images where appearance and shape are combined from two different domains (out of cars, birds, dogs, animals) as well as proxy measurements for the quality of the transfer: (a) how much do the low-level statistics differ in terms of $\chi^2$ distance, (b) how well is shape disentangled under changing appearance by measuring the foreground overlap between samples, (c) a user preference study (which method transfers shape and appearance better?). The results are compared to some relevant baselines (FineGAN, CycleGan, AdaIn, MUNIT), and show moderate improvements over those. | SP:7975585d96507de92ea59435396a8ed2fcc91008 |
Tracking the progress of Language Models by extracting their underlying Knowledge Graphs | 1 INTRODUCTION . Natural language processing ( NLP ) encompasses a wide variety of applications such as summarization ( Kovaleva et al. , 2019 ) , information retrieval ( Zhan et al. , 2020 ) , and machine translation ( Tang et al. , 2018 ) , among others . Currently , the use of pre-trained language models has become the de facto starting point to tackle most of these applications . The usual pipeline consists of finetuning a pre-trained language model by using a discriminative learning objective to adapt the model to the requirements of each specific task . As key ingredients , these models are pre-trained using massive amounts of unlabeled data that can include millions of documents , and may include billions of parameters . Massive data and parameters are supplemented with a suitable learning architecture , resulting in a highly powerful but also complex model , whose internal operation is hard to analyze . The success of pre-trained language models has driven the interest to understand how they manage to solve NLP tasks . As an example , in the case of BERT ( Devlin et al. , 2019 ) , one of the most popular pre-trained models based on a Transformer architecture ( Vaswani et al. , 2017 ) , several studies have attempted to access the knowledge encoded in its layers and attention heads ( Tenney et al. , 2019b ; Devlin et al. , 2019 ; Hewitt & Manning , 2019 ) . In particular , ( Jawahar et al. , 2019 ) shows that BERT can solve tasks at a syntactic level by using Transformer blocks to encode a soft hierarchy of features at different levels of abstraction . Similarly , ( Hewitt & Manning , 2019 ) shows that BERT is capable of encoding structural information from text . In particular , using a structural probe , they show that syntax trees are embedded in a linear transformation of the encodings provided by BERT . In general , previous efforts have provided strong evidence indicating that current pre-trained language models encode complex syntactic rules , however , relevant evidence about their abilities to capture semantic information remains still elusive . As an example , a recent study ( Si et al. , 2019 ) attempts to locate the encoding of semantic information as part of the top layers of Transformer architectures , however , results provide contradictory evidence . Similarly , ( Kovaleva et al. , 2019 ) focuses on studying knowledge encoded by self-attention weights , however , results provide evidence for over-parameterization but not about language understanding capabilities . In this work , we study to which extent pre-trained language models encode semantic information . As a key source of semantic knowledge , we focus on studying how precisely pre-trained language models encode the concept relations embedded in the conceptual taxonomy of WordNet1 ( Miller , 1995 ) . The ability to understand , organize , and correctly use concepts is one of the most remarkable capabilities of human intelligence ( Lake et al. , 2017 ) . Therefore , a quantification of the ability that a pre-trained language model can exhibit to encode the conceptual organization behind WordNet is highly valuable . In particular , it can provide useful insights about the inner mechanisms that these models use to encode semantic information . Furthermore , an analysis of concepts and associations that result difficult to these models can provide relevant insights about how to improve them . In contrast to most previous works , we do not focus on a particular model , but target a large list of the most popular pre-trained language and text-embedding models . In this sense , one of our goals is to provide a comparative analysis of the capacities of different types of approaches . Following Hewitt & Manning ( 2019 ) , we study semantic performance by defining a probing classifier based on concept relatedness according to WordNet . Using this tool , we analyze the different models , enlightening how and where semantic knowledge is encoded . Furthermore , we explore how these models encode suitable information to recreate the structure of WordNet . Among our main results , we show that the different pre-training strategies and architectures lead to different model biases . In particular , we show that contextualized word embeddings , such as BERT , encode high-level concepts and hierarchical relationships among them , creating a taxonomy . This finding corroborates previous work results ( Reif et al. , 2019 ) that claim that BERT vectors are stored in sub-spaces that have correspondence with semantic knowledge . Our study also shows evidence about the limitations of current pre-trained language models , demonstrating that they all have difficulties encoding specific concepts . As an example , all the models struggle with concepts related to “ taxonomical groups ” , performing worse than chance in some cases . Our results also reveal that models have very distinctive patterns in terms of where they encode most of the semantic information . These patterns are dependant on architecture and not on model sizes . 2 RELATED WORK . The success of deep learning architectures in various NLP tasks has fueled a growing interest from the community to improve understanding of what these models encode . Several works have studied these models ’ impact on downstream tasks at the syntactic or semantic level . Some studies ( Tenney et al. , 2019b ) claim that success in a specific task helps understand what type of information the model encodes . Other studies have improved the understanding of what and where these models encode information , by analyzing correlations between input-targets and specific architecture blocks , such as layers ( Jawahar et al. , 2019 ) , encoded hidden states ( Tang et al. , 2018 ; Saphra & Lopez , 2019 ) , and attention heads ( Michel et al. , 2019 ) . Evidence of syntactic information : Using probing classifiers , Clark et al . ( 2019 ) claims that some specific BERT ’ s attention heads show correspondence with syntactic tasks . Goldberg ( 2019 ) illustrates the capabilities that BERT has to solve syntactic tasks , such as subject-verb agreement . BERT ’ s success in these tasks fuels the belief that BERT can code the syntax of a language . Hewitt & Manning ( 2019 ) proposes a structural probe that evaluates whether syntax trees are encoded in a linear transformation of BERT embeddings . The study shows that such transformation exists in BERT , providing evidence that syntax trees are implicitly embedded in BERT ’ s vector geometry . Reif et al . ( 2019 ) has found evidence of syntactic representation in BERT ’ s attention matrices , with specific directions in space representing particular dependency relations . Evidence of semantic information : Reif et al . ( 2019 ) suggests that BERT ’ s internal geometry may be broken into multiple linear subspaces , with separate spaces for different syntactic and semantic information . Despite this , previous work has not yet reached consensus about this topic . While some studies show satisfactory results in tasks such as entity types ( Tenney et al. , 2019a ) , semantic roles ( Rogers et al. , 2020 ) , and sentence completion ( Ettinger , 2020 ) , other studies show less favorable results in coreference ( Tenney et al. , 2019b ) and Multiple-Choice Reading Comprehension ( Si et al. , 2019 ) , claiming that BERT ’ s performance may not reflect the model ’ s true ability of language understanding and reasoning . Some works have studied which blocks of BERT are used to solve 1WordNet is a human-generated graph , where each one of its 117000 nodes ( also called synsets ) represent a concept . In this work we use the hyponymy relations , which represent if a concept is a subclass of another . tasks at the semantic level . Tenney et al . ( 2019b ) proposes a set of edge probing tasks to test the encoded sentential structure of contextualized word embeddings . The study shows evidence that the improvements that BERT and GPT-2 offer over non contextualized embeddings as GloVe is only significant in syntactic-level tasks . Regarding static word embeddings , Yaghoobzadeh et al . ( 2019 ) shows that senses are well represented in single-vector embeddings if they are frequent , and that this does not have a negative impact on NLP tasks whose performance depends on frequent senses . Layer-wise or head-wise information : Tenney et al . ( 2019a ) shows that the first layers of BERT focus on encoding short dependency relationships at the syntactic level ( e.g. , subject-verb agreement ) while top layers focus on encoding long-range dependencies ( e.g. , subject-object dependencies ) . Peters et al . ( 2018a ) supports similar declarations for Convolutional , LSTM , and self-attention architectures . While these studies also support that the top layers appear to encode semantic information , the evidence to support this claim is not conclusive or contradictory with other works . As an example , Jawahar et al . ( 2019 ) could only identify one SentEval semantic task that topped at the last layer . In terms of information flow , Voita et al . ( 2019a ) reports that information about the past in left-to-right language models gets vanished as the information flows from bottom to top BERT ’ s layers . Hao et al . ( 2019 ) shows that the lower layers of BERT change less during finetuning , suggesting that layers close to inputs learn more transferable language representations . In terms of architecture design , Press et al . ( 2020 ) provides evidence that increasing self-attention at the bottom and increasing feed-forward sub-layers at the top improves results in language modeling tasks using BERT . Other studies have focused on understanding how self-attention heads contribute to solving specific tasks ( Vig , 2019 ) . Kovaleva et al . ( 2019 ) shows a set of attention patterns that is repeated across different heads when trying to solve GLUE tasks ( Wang et al. , 2018 ) . Furthermore , Michel et al . ( 2019 ) and Voita et al . ( 2019b ) show that several heads can be removed from trained Transformer models without degradation in downstream tasks . In summary , on the one hand , related work shows results that provide strong evidence concluding that BERT and other Transformer-based models can encode information at the syntactic level . Furthermore , BERT uses this information to solve various benchmark NLP tasks . Working with ambiguous words has allowed BERT to perform well on Machine Translation tasks ( MT ) , and outperforming other architectures in word sense disambiguation ( WSD ) . On the other hand , while some studies claim that top layers are helpful to solve semantic tasks , the results are not conclusive . Efforts to locate which blocks of the Transformer architecture operate at the semantic level have been unsuccessful . In this context , our work helps to fill the gap between the deeper understanding that we have now about how word embeddings and language models encode and work with syntax , and the still shallow comprehension of their abilities to encode and work with semantics . 3 STUDY METHODOLOGY . Probing methods consist of using the representation of a frozen pre-trained model to train a classifier to achieve a particular task . If the probing classifier succeeds in this setting but fails using an alternative model , it means that the source model encodes the knowledge needed to solve the task . Furthermore , the performance of the classifier can be used to measure how well the model captures this knowledge ( Conneau et al. , 2018 ) . Following Hewitt & Manning ( 2019 ) , we use a similar probing method at the semantic level and apply it to the nine models presented in Section 3.1 . Probing techniques have shown useful for NLP tasks ( Saphra & Lopez , 2019 ) , however , they have also been questioned ( Ravichander et al. , 2020 ) , as probe success does not guarantee that the model relies on that information to solve a target task . Consequently , our study limits to shed light on whether the models under evaluation encode relevant knowledge to solve the task of predicting concept relatedness in a semantic ontology such as Wordnet . To study how precisely the models encode semantic information , we measure correctness in predicted relations among concepts at two levels : ( a ) pair-wise-level by studying performance across sampled pairs of related or unrelated concepts , and ( b ) graph-level by using pair-wise predictions to reconstruct the actual graph . We describe these two approaches in Sections 3.2 and 3.3 , respectively . They essentially study the same phenomenon as both share the exact same model predictions . They only differ in the way they use these predictions . | The authors conduct a study investigating how different language models incorporate semantic information in their respective learned representations. Investigating language models on their performance in concept-level tasks is motivated by the importance of the ability to organize and understand concepts in human intelligence. Another motivation is that other studies on the semantics in language models are not conclusive according to the authors, especially in determining where the semantic knowledge lies within the language models. | SP:3fb778bf2a70b808044c4cd4be288a4d1a9a3465 |
Tracking the progress of Language Models by extracting their underlying Knowledge Graphs | 1 INTRODUCTION . Natural language processing ( NLP ) encompasses a wide variety of applications such as summarization ( Kovaleva et al. , 2019 ) , information retrieval ( Zhan et al. , 2020 ) , and machine translation ( Tang et al. , 2018 ) , among others . Currently , the use of pre-trained language models has become the de facto starting point to tackle most of these applications . The usual pipeline consists of finetuning a pre-trained language model by using a discriminative learning objective to adapt the model to the requirements of each specific task . As key ingredients , these models are pre-trained using massive amounts of unlabeled data that can include millions of documents , and may include billions of parameters . Massive data and parameters are supplemented with a suitable learning architecture , resulting in a highly powerful but also complex model , whose internal operation is hard to analyze . The success of pre-trained language models has driven the interest to understand how they manage to solve NLP tasks . As an example , in the case of BERT ( Devlin et al. , 2019 ) , one of the most popular pre-trained models based on a Transformer architecture ( Vaswani et al. , 2017 ) , several studies have attempted to access the knowledge encoded in its layers and attention heads ( Tenney et al. , 2019b ; Devlin et al. , 2019 ; Hewitt & Manning , 2019 ) . In particular , ( Jawahar et al. , 2019 ) shows that BERT can solve tasks at a syntactic level by using Transformer blocks to encode a soft hierarchy of features at different levels of abstraction . Similarly , ( Hewitt & Manning , 2019 ) shows that BERT is capable of encoding structural information from text . In particular , using a structural probe , they show that syntax trees are embedded in a linear transformation of the encodings provided by BERT . In general , previous efforts have provided strong evidence indicating that current pre-trained language models encode complex syntactic rules , however , relevant evidence about their abilities to capture semantic information remains still elusive . As an example , a recent study ( Si et al. , 2019 ) attempts to locate the encoding of semantic information as part of the top layers of Transformer architectures , however , results provide contradictory evidence . Similarly , ( Kovaleva et al. , 2019 ) focuses on studying knowledge encoded by self-attention weights , however , results provide evidence for over-parameterization but not about language understanding capabilities . In this work , we study to which extent pre-trained language models encode semantic information . As a key source of semantic knowledge , we focus on studying how precisely pre-trained language models encode the concept relations embedded in the conceptual taxonomy of WordNet1 ( Miller , 1995 ) . The ability to understand , organize , and correctly use concepts is one of the most remarkable capabilities of human intelligence ( Lake et al. , 2017 ) . Therefore , a quantification of the ability that a pre-trained language model can exhibit to encode the conceptual organization behind WordNet is highly valuable . In particular , it can provide useful insights about the inner mechanisms that these models use to encode semantic information . Furthermore , an analysis of concepts and associations that result difficult to these models can provide relevant insights about how to improve them . In contrast to most previous works , we do not focus on a particular model , but target a large list of the most popular pre-trained language and text-embedding models . In this sense , one of our goals is to provide a comparative analysis of the capacities of different types of approaches . Following Hewitt & Manning ( 2019 ) , we study semantic performance by defining a probing classifier based on concept relatedness according to WordNet . Using this tool , we analyze the different models , enlightening how and where semantic knowledge is encoded . Furthermore , we explore how these models encode suitable information to recreate the structure of WordNet . Among our main results , we show that the different pre-training strategies and architectures lead to different model biases . In particular , we show that contextualized word embeddings , such as BERT , encode high-level concepts and hierarchical relationships among them , creating a taxonomy . This finding corroborates previous work results ( Reif et al. , 2019 ) that claim that BERT vectors are stored in sub-spaces that have correspondence with semantic knowledge . Our study also shows evidence about the limitations of current pre-trained language models , demonstrating that they all have difficulties encoding specific concepts . As an example , all the models struggle with concepts related to “ taxonomical groups ” , performing worse than chance in some cases . Our results also reveal that models have very distinctive patterns in terms of where they encode most of the semantic information . These patterns are dependant on architecture and not on model sizes . 2 RELATED WORK . The success of deep learning architectures in various NLP tasks has fueled a growing interest from the community to improve understanding of what these models encode . Several works have studied these models ’ impact on downstream tasks at the syntactic or semantic level . Some studies ( Tenney et al. , 2019b ) claim that success in a specific task helps understand what type of information the model encodes . Other studies have improved the understanding of what and where these models encode information , by analyzing correlations between input-targets and specific architecture blocks , such as layers ( Jawahar et al. , 2019 ) , encoded hidden states ( Tang et al. , 2018 ; Saphra & Lopez , 2019 ) , and attention heads ( Michel et al. , 2019 ) . Evidence of syntactic information : Using probing classifiers , Clark et al . ( 2019 ) claims that some specific BERT ’ s attention heads show correspondence with syntactic tasks . Goldberg ( 2019 ) illustrates the capabilities that BERT has to solve syntactic tasks , such as subject-verb agreement . BERT ’ s success in these tasks fuels the belief that BERT can code the syntax of a language . Hewitt & Manning ( 2019 ) proposes a structural probe that evaluates whether syntax trees are encoded in a linear transformation of BERT embeddings . The study shows that such transformation exists in BERT , providing evidence that syntax trees are implicitly embedded in BERT ’ s vector geometry . Reif et al . ( 2019 ) has found evidence of syntactic representation in BERT ’ s attention matrices , with specific directions in space representing particular dependency relations . Evidence of semantic information : Reif et al . ( 2019 ) suggests that BERT ’ s internal geometry may be broken into multiple linear subspaces , with separate spaces for different syntactic and semantic information . Despite this , previous work has not yet reached consensus about this topic . While some studies show satisfactory results in tasks such as entity types ( Tenney et al. , 2019a ) , semantic roles ( Rogers et al. , 2020 ) , and sentence completion ( Ettinger , 2020 ) , other studies show less favorable results in coreference ( Tenney et al. , 2019b ) and Multiple-Choice Reading Comprehension ( Si et al. , 2019 ) , claiming that BERT ’ s performance may not reflect the model ’ s true ability of language understanding and reasoning . Some works have studied which blocks of BERT are used to solve 1WordNet is a human-generated graph , where each one of its 117000 nodes ( also called synsets ) represent a concept . In this work we use the hyponymy relations , which represent if a concept is a subclass of another . tasks at the semantic level . Tenney et al . ( 2019b ) proposes a set of edge probing tasks to test the encoded sentential structure of contextualized word embeddings . The study shows evidence that the improvements that BERT and GPT-2 offer over non contextualized embeddings as GloVe is only significant in syntactic-level tasks . Regarding static word embeddings , Yaghoobzadeh et al . ( 2019 ) shows that senses are well represented in single-vector embeddings if they are frequent , and that this does not have a negative impact on NLP tasks whose performance depends on frequent senses . Layer-wise or head-wise information : Tenney et al . ( 2019a ) shows that the first layers of BERT focus on encoding short dependency relationships at the syntactic level ( e.g. , subject-verb agreement ) while top layers focus on encoding long-range dependencies ( e.g. , subject-object dependencies ) . Peters et al . ( 2018a ) supports similar declarations for Convolutional , LSTM , and self-attention architectures . While these studies also support that the top layers appear to encode semantic information , the evidence to support this claim is not conclusive or contradictory with other works . As an example , Jawahar et al . ( 2019 ) could only identify one SentEval semantic task that topped at the last layer . In terms of information flow , Voita et al . ( 2019a ) reports that information about the past in left-to-right language models gets vanished as the information flows from bottom to top BERT ’ s layers . Hao et al . ( 2019 ) shows that the lower layers of BERT change less during finetuning , suggesting that layers close to inputs learn more transferable language representations . In terms of architecture design , Press et al . ( 2020 ) provides evidence that increasing self-attention at the bottom and increasing feed-forward sub-layers at the top improves results in language modeling tasks using BERT . Other studies have focused on understanding how self-attention heads contribute to solving specific tasks ( Vig , 2019 ) . Kovaleva et al . ( 2019 ) shows a set of attention patterns that is repeated across different heads when trying to solve GLUE tasks ( Wang et al. , 2018 ) . Furthermore , Michel et al . ( 2019 ) and Voita et al . ( 2019b ) show that several heads can be removed from trained Transformer models without degradation in downstream tasks . In summary , on the one hand , related work shows results that provide strong evidence concluding that BERT and other Transformer-based models can encode information at the syntactic level . Furthermore , BERT uses this information to solve various benchmark NLP tasks . Working with ambiguous words has allowed BERT to perform well on Machine Translation tasks ( MT ) , and outperforming other architectures in word sense disambiguation ( WSD ) . On the other hand , while some studies claim that top layers are helpful to solve semantic tasks , the results are not conclusive . Efforts to locate which blocks of the Transformer architecture operate at the semantic level have been unsuccessful . In this context , our work helps to fill the gap between the deeper understanding that we have now about how word embeddings and language models encode and work with syntax , and the still shallow comprehension of their abilities to encode and work with semantics . 3 STUDY METHODOLOGY . Probing methods consist of using the representation of a frozen pre-trained model to train a classifier to achieve a particular task . If the probing classifier succeeds in this setting but fails using an alternative model , it means that the source model encodes the knowledge needed to solve the task . Furthermore , the performance of the classifier can be used to measure how well the model captures this knowledge ( Conneau et al. , 2018 ) . Following Hewitt & Manning ( 2019 ) , we use a similar probing method at the semantic level and apply it to the nine models presented in Section 3.1 . Probing techniques have shown useful for NLP tasks ( Saphra & Lopez , 2019 ) , however , they have also been questioned ( Ravichander et al. , 2020 ) , as probe success does not guarantee that the model relies on that information to solve a target task . Consequently , our study limits to shed light on whether the models under evaluation encode relevant knowledge to solve the task of predicting concept relatedness in a semantic ontology such as Wordnet . To study how precisely the models encode semantic information , we measure correctness in predicted relations among concepts at two levels : ( a ) pair-wise-level by studying performance across sampled pairs of related or unrelated concepts , and ( b ) graph-level by using pair-wise predictions to reconstruct the actual graph . We describe these two approaches in Sections 3.2 and 3.3 , respectively . They essentially study the same phenomenon as both share the exact same model predictions . They only differ in the way they use these predictions . | This work addresses the question about how pre-trained language models encode semantic information. It adapts the methodology proposed in Hewitt & Manning (2019) for syntax to semantics, using the WordNet structure instead of a syntactic structure of a sentence to encode distances among word representations. The paper analyzes how embedding models encode suitable information to recreate the structure of WordNet. The study also shows evidence about the limitations of current pre-trained language models, demonstrating that all of them have difficulties to encode specific concepts. | SP:3fb778bf2a70b808044c4cd4be288a4d1a9a3465 |
Certified Distributional Robustness via Smoothed Classifiers | 1 INTRODUCTION . Deep neural networks ( DNNs ) have been known to be vulnerable to adversarial example attacks : by feeding the DNN with slightly perturbed inputs , the attack alters the prediction output . The attack can be fatal in performance-critical systems such as autonomous vehicles or automated tumor diagnosis . A DNN is robust when it can resist such an attack that , as long as the range of the perturbation is not too large ( usually invisible by human ) , the model produces an expected output despite of the specific perturbation . Various approaches have been proposed for improving the robustness of DNNs , with or without a performance guarantee . Although a number of approaches have been proposed for certified robustness , it is vague how robustness should be defined . For example , works including Cohen et al . ( 2019 ) ; Pinot et al . ( 2019 ) ; Li et al . ( 2019 ) ; Lecuyer et al . ( 2019 ) propose smoothed classifiers to ensure the inputs with adversarial perturbation to be classified into the same class as the inputs without . However , since both inputs are inserted randomized noise , it can not be guaranteed that the inputs are classified into the correct class . It is possible that the adversarially perturbed input has the same label as the original one which is wrongly classified by the DNN . In this case , the robustness guarantee does not make sense any more . Further , the robustness guarantee is provided at the instance level , i.e. , within a certain perturbation range , the modification of an input instance can not affect the prediction output . But a DNN is a statistical model to be evaluated on the input distribution , rather than a single instance . Instead of counting the number of input instances meeting the robustness definition , it is desired to evaluate the robustness of a DNN over the input distribution . We introduce the distributional risk as a DNN robustness metric , and propose a noisy adversarial learning ( NAL ) procedure based on distributional robust optimization , which provides a provable guarantee . Assume a base classifier f trying to map instance x0 to corresponding label y . It is found that when fed with the perturbed instance x ( within a l2 ball centered at x0 ) , a smoothed classifier g ( x ) = EZ [ f ( x + z ) ] with z ∼ Z = N ( 0 , σ2I ) can provably return the same label as g ( x0 ) does . However , we think such a robustness guarantee can not ensure g ( x0 ) to be correctly classified as y , resulting in unsatisfying performance in practice . Instead , we evaluate robustness as the worst-case loss over the distribution of noisy inputs . For simplicity , we jointly express the input instance and the label as x0 ∼ P0 where P0 is the distribution of the original input . By using ` ( · ) as the loss function , we evaluate DNNs by the worst-case distributional risk : supS ES [ ` ( θ ; s ) ] . The classifier is parameterized by θ ∈ Θ , and s = x+ z ∼ S where S is a distribution within a certain distance from P0 . We prove such a loss is upper bounded by a data-dependent certificate , which can be optimized by the noisy adversarial training procedure : minimize θ∈Θ sup S ES [ ` ( θ ; s ) ] . ( 1 ) Compared to previous robustness certificates via smoothed classifiers , our method provides a provable guarantee w.r.t . the ground truth input distribution . Letting the optimized θ be the parameter of g ( · ) and f ( · ) respectively , we further show that the smoothed classifier g ( · ) provides an improved robustness certificate than that of f ( · ) , due to a tighter bound on the worst-case loss . The key is that , for mild perturbations , we adopt a Lagrangian relaxation for the usual loss ` ( θ ; x+z ) as the robust surrogate , and the surrogate is strongly concave in x and hence easy to optimize . Our approach enjoys convergence guarantee similar to the method in Sinha et al . ( 2018 ) , but different from Sinha et al . ( 2018 ) , our approach does not require ` to be smooth , and thus can be applied to arbitrary neural networks . The advantage of the smoothed classifier also lies in a tighter robustness certificate than the base classifier . The intuition is that , in the inner maximization step , instead of seeking one direction which maximizes the loss , our approach performs gradient ascent along the direction which maximizes the total loss of examples sampled from the neighborhood of the original input . The noisy adversarial training procedure produces smoothed classifiers robust against the neighborhood of the worst-case adversarial examples with a certified bound . Highlights of our contribution are as follows . First , we review the drawbacks in the previous definition of robustness , and propose to evaluate robustness by the worst-case loss over the input distribution . Second , we derive a data-dependent upper bound for the worst-case loss , constituting a robustness certificate . Third , by minimizing the robustness certificate in the training loop , we propose noisy adversarial learning for enhancing model robustness , in which the smoothness property entails the computational tractability of the certificate . Through both theoretical analysis and experimental results , we verify that our certified DNNs enjoy better accuracies compared with the state-of-the-art defending adversarial example attacks . 2 RELATED WORK . Works proposed to defend against adversarial example attacks can be categorized into the following categories . In empirical defences , there is no guarantee how the DNN model would perform against the adversarial examples . Stability training ( Zheng et al . ( 2016 ) ; Zantedeschi et al . ( 2017 ) ; Liu et al . ( 2018 ) ) improves model robustness by adding randomized noise to the input during training but shows limited performance enhancement . Adversarial training ( Goodfellow et al . ( 2015 ) ; Kurakin et al . ( 2018 ) ; Madry et al . ( 2017 ) ; Kannan et al . ( 2018 ) ; Zhang et al . ( 2019 ) ; He et al . ( 2019 ) ; Wang et al . ( 2019 ) ) trains over adversarial examples found at each training step but unfortunately does not guarantee the performance over unseen adversarial inputs . Although without a guarantee , adversarial training has excellent performance in empirical defences against adversarial attacks . Certified defences are certifiably robust against any adversarial input within an ` p-norm perturbation range from the original input . A line of works construct a computationally tractable relaxation for computing an upper bound on the worst-case loss over all valid attacks . The relaxations include linear programming ( Wong & Kolter ( 2018 ) ) , mixed integer programming ( Tjeng et al . ( 2018 ) ) , semidefinite programming ( Raghunathan et al . ( 2018 ) ) , and convex relaxation ( Namkoong & Duchi ( 2017 ) ; Salman et al . ( 2019b ) ) . But those deterministic methods are not scalable . Some works such as Dvijotham et al . ( 2018 ) formulate the search for the largest perturbation range as an optimization problem and solve its dual problem . Sinha et al . ( 2018 ) also propose a robustness certificate based on a Lagrangian relaxation of the loss function , and it is provably robust against adversarial input distributions within a Wasserstein ball centered around the original input distribution . The certificate of our work is constructed on a Lagrangian relaxation form of the worst-case loss , but has a broader applicability than Sinha et al . ( 2018 ) with a tighter loss bound due to the smoothness property . An alternative line of works propose to select appropriate surrogates for each neuron activation layer by layer ( Weng et al . ( 2018 ) ; Zhang et al . ( 2018 ) ) to facilitate the search for a certified lower bound . By integrating with interval bound propagation ( Gowal et al . ( 2018 ) ) , Zhang et al . ( 2020 ) make the search computationally efficient and scalable . Other works ( Mirman et al . ( 2018 ) ; Singh et al . ( 2018 ) ) apply the abstract interpretation to train provably robust neural networks . Our work is orthogonal to these works . Randomized smoothing introduces randomized noise to the neural network , and tries to provide a statistically certified robustness guarantee . Pinot et al . ( 2020 ) have demonstrated by game theory that no deterministic classifier can claim to be more robust than all others against any possible adversarial attack . But such a question remains open in the randomized regime , where randomized smoothing can be considered as a contributing effort . The smoothing method does not depend on a specific neural network , or a type of relaxation , but can be generally applied to arbitrary neural networks . The idea of adding randomized noise was first proposed by Lecuyer et al . ( 2019 ) , given the inspiration of the differential privacy property , and then Li et al . ( 2019 ) improve the certificate with Rényi divergence . Cohen et al . ( 2019 ) obtain a larger certified robustness bound through the smoothed classifier based on Neyman-Pearson theorem . Phan et al . ( 2020 ) extend the noise addition mechanism to large-scale parallel algorithms . By extending the randomized noise to the general family of exponential distributions , Pinot et al . ( 2019 ) unify previous approaches to preserve robustness to adversarial attacks . Lee et al . ( 2019 ) offer adversarial robustness guarantees for ` 0-norm attacks . Both Salman et al . ( 2019a ) ; Jia et al . ( 2019 ) employ adversarial training to improve the performance of randomized smoothing . Following a similar principle , our work trains over adversarial data with randomized noise . But we provide a more practical robustness certificate and a training method achieving higher empirical accuracy than theirs . 3 PROPOSED APPROACH . We first define the closeness between distributions , based on which we constrain how far the input distribution is perturbed . Then we introduce our definition of robustness on smoothed classifiers . Our main theorem gives a tractable robustness certificate which is easy to optimize . Our algorithm for improving the robustness of the smoothed classifiers is provided . All proofs are collected in the appendices for conciseness . 3.1 A DISTRIBUTIONAL ROBUSTNESS CERTIFICATE . Definition 1 ( Wasserstein distance ) . Wasserstein distances define a notion of closeness between distributions . Let ( X ⊂ Rd , A , P ) be a probability space and the transportation cost c : X × X → [ 0 , ∞ ) be nonnegative , lower semi-continuous , and c ( x , x ) = 0 . P and Q are two probability measures supported on X . Let Π ( P , Q ) denotes the collection of all measures on X × X with marginals P and Q on the first and second factors respectively , i.e. , it holds that π ( A , X ) = P ( A ) and π ( X , A ) = Q ( A ) , ∀A ∈ A and π ∈ Π ( P , Q ) . The Wasserstein distance between P and Q is Wc ( P , Q ) : = inf π∈Π ( P , Q ) Eπ [ c ( x , y ) ] . ( 2 ) For example , the ` 2-norm c ( x , x0 ) = ‖x− x0‖22 satisfies the aforementioned conditions . Distributional robustness . Assume the original input x0 is drawn from the distribution P0 , and the perturbed input x is drawn from the distribution P . Each input is added randomized Gaussian noise z ∼ Z = N ( 0 , σ2I ) before being fed to the classifier . Instead of regarding the noise as a part of the smoothed classifier , we treat s = x + z as a noisy input coming from the distribution S in the analysis . Since z ∈ Rd , we need to set X = Rd to admit s ∈ X as Lecuyer et al . ( 2019 ) ; Cohen et al . ( 2019 ) ; Salman et al . ( 2019a ) do . Since the perturbed input should be visually indistinguishable from the original one , we define the robustness region as P = { P : Wc ( P , P0 ) ≤ ρ , P ∈ P ( X ) } , where ρ > 0 . Within such a region , we evaluate the robustness as a worst-case population loss over noisy inputs : supS∈P ES [ ` ( θ ; s ) ] . Essentially , we evaluate the robustness of a smoothed classifer based on its performance on the worst-case adversarial example distribution . A smaller loss indicates a higher level of robustness . We will compare the definition against others in the next section . However , such a robustness metric is impossible to measure in practice as we have no idea about P . Even if P can be acquired , it can be a non-convex region which renders the constrained optimization objective intractable . Hence we resort to the Lagrangian relaxation of the problem by assuming a dual variable γ . As the main theorem of this work , we provide an upper bound for the worst-case population loss for any level of robustness ρ . We further show that for small enough ρ , the upper bound is tractable and easy to optimize . Theorem 1 . Let ` : Θ × X → R and transportation cost function c : X × X → R+ be continuous . Let x0 be an input drawn from the input distribution P0 , x be the adversarial example which follows the distribution P and z ∼ Z = N ( 0 , σ2I ) be the additive noise of the same shape as x . The sum of x and z is denoted as s = x + z ∼ S and we let φγ ( θ ; x0 ) = supx∈X EZ { ` ( θ ; x+ z ) − γc ( x+ z , x0 ) } be the robust surrogate . For any γ , ρ > 0 and σ , we have sup S : Wc ( S , P0 ) ≤ρ ES [ ` ( θ ; s ) ] ≤ γρ+ EP0 [ φγ ( θ ; x0 ) ] . ( 3 ) The proof is given in Appendix A.1 . It is notable that the right-hand side take the expectation over P0 and Z respectively , and given a particular input x0 and a noise sample z , we seek an adversarial example which maximizes the surrogate loss . Typically , P0 is impossible to obtain and thus we use an empirical distribution , such as the training data distribution , to approximate P0 in practice . Since Thm . 1 provides an upper bound for the worst-case population loss , it offers a principled adversarial training approach which minimizes the upper bound instead of the actual loss , i.e. , minimize θ∈Θ EP0 [ φγ ( θ ; x0 ) ] . ( 4 ) In the following we show the above loss function has a form which is tractable for arbitrary neural networks , due to a smoothed loss function . Hence Thm . 1 provides a tractable robustness certificate depending on the data . Properties of the smoothed classifier . We show the optimization objective of Eq . 4 has a form which is tractable for any neural network , particular for the non-smooth ones with ReLU activation layers . More importantly , the smoothness of the classifier enables the adversarial training procedure to converge as we want by using the common optimization techniques such as stochastic gradient descent . The smoothness of the loss function comes from the smoothed classifier with randomized noise . Specifically , Theorem 2 . Assume ` : Θ × X → [ 0 , M ] is a bounded loss function . The loss function on the smoothed classifier can be expressed as ˆ̀ ( θ ; x ) : = EZ [ ` ( θ ; x+ z ) ] , z ∼ Z = N ( 0 , σ2I ) . Then we have ˆ̀ is 2Mσ2 -smooth w.r.t . ` 2-norm , i.e. , ˆ̀satisfies∥∥∥∇x ˆ̀ ( θ ; x ) −∇x ˆ̀ ( θ ; x′ ) ∥∥∥ 2 ≤ 2M σ2 ‖x− x′‖2 . ( 5 ) The proof is in Appendix A.2 . It mainly takes advantage of the randomized noise which has a smoothing effect on the loss function . For DNNs with non-smooth layers , the smoothed classifier makes it up and turns the loss function to a smoothed one , which contributes as an important property to the strong concavity of EZ [ ` ( θ ; x+ z ) − γc ( x+ z , x0 ) ] and therefore ensures the tractability of the robustness certificate . Corollary 1 . For any c : X × X → R+ ∪ { ∞ } 1-strongly convex in its first argument , and ˆ̀ : x 7→ EZ [ ` ( θ ; x+ z ) ] being 2Mσ2 -smooth , the function EZ { ` ( θ ; x+ z ) − γc ( x+ z , x0 ) } is strongly concave in x for any γ ≥ 2Mσ2 . The proof is in Appendix A.3 . Note that here we specify the requirement on the transportation cost c to be 1-strongly convex in its first argument . The ` 2-norm cost satisfies the condition . Before showing how the strong concavity plays a part in the convergence , we illustrate our algorithm first . | This paper studies the problem of certified robustness in adversarial learning. In a nutshell, they apply the randomized smoothing technique to the distributional robustness certificate proposed by Sinha et al. (2018), thereby relaxing the smoothness assumption required therein so that the ReLU network can be applied. Based on this new formulation, they derive the upper bound on the worst-case population loss and develop an algorithm with convergence guarantees. The results on tested on MNIST, CIFAR-10 and Tiny ImageNet. | SP:5eb3d197fb5005f876dac170b9a40717d965f66c |
Certified Distributional Robustness via Smoothed Classifiers | 1 INTRODUCTION . Deep neural networks ( DNNs ) have been known to be vulnerable to adversarial example attacks : by feeding the DNN with slightly perturbed inputs , the attack alters the prediction output . The attack can be fatal in performance-critical systems such as autonomous vehicles or automated tumor diagnosis . A DNN is robust when it can resist such an attack that , as long as the range of the perturbation is not too large ( usually invisible by human ) , the model produces an expected output despite of the specific perturbation . Various approaches have been proposed for improving the robustness of DNNs , with or without a performance guarantee . Although a number of approaches have been proposed for certified robustness , it is vague how robustness should be defined . For example , works including Cohen et al . ( 2019 ) ; Pinot et al . ( 2019 ) ; Li et al . ( 2019 ) ; Lecuyer et al . ( 2019 ) propose smoothed classifiers to ensure the inputs with adversarial perturbation to be classified into the same class as the inputs without . However , since both inputs are inserted randomized noise , it can not be guaranteed that the inputs are classified into the correct class . It is possible that the adversarially perturbed input has the same label as the original one which is wrongly classified by the DNN . In this case , the robustness guarantee does not make sense any more . Further , the robustness guarantee is provided at the instance level , i.e. , within a certain perturbation range , the modification of an input instance can not affect the prediction output . But a DNN is a statistical model to be evaluated on the input distribution , rather than a single instance . Instead of counting the number of input instances meeting the robustness definition , it is desired to evaluate the robustness of a DNN over the input distribution . We introduce the distributional risk as a DNN robustness metric , and propose a noisy adversarial learning ( NAL ) procedure based on distributional robust optimization , which provides a provable guarantee . Assume a base classifier f trying to map instance x0 to corresponding label y . It is found that when fed with the perturbed instance x ( within a l2 ball centered at x0 ) , a smoothed classifier g ( x ) = EZ [ f ( x + z ) ] with z ∼ Z = N ( 0 , σ2I ) can provably return the same label as g ( x0 ) does . However , we think such a robustness guarantee can not ensure g ( x0 ) to be correctly classified as y , resulting in unsatisfying performance in practice . Instead , we evaluate robustness as the worst-case loss over the distribution of noisy inputs . For simplicity , we jointly express the input instance and the label as x0 ∼ P0 where P0 is the distribution of the original input . By using ` ( · ) as the loss function , we evaluate DNNs by the worst-case distributional risk : supS ES [ ` ( θ ; s ) ] . The classifier is parameterized by θ ∈ Θ , and s = x+ z ∼ S where S is a distribution within a certain distance from P0 . We prove such a loss is upper bounded by a data-dependent certificate , which can be optimized by the noisy adversarial training procedure : minimize θ∈Θ sup S ES [ ` ( θ ; s ) ] . ( 1 ) Compared to previous robustness certificates via smoothed classifiers , our method provides a provable guarantee w.r.t . the ground truth input distribution . Letting the optimized θ be the parameter of g ( · ) and f ( · ) respectively , we further show that the smoothed classifier g ( · ) provides an improved robustness certificate than that of f ( · ) , due to a tighter bound on the worst-case loss . The key is that , for mild perturbations , we adopt a Lagrangian relaxation for the usual loss ` ( θ ; x+z ) as the robust surrogate , and the surrogate is strongly concave in x and hence easy to optimize . Our approach enjoys convergence guarantee similar to the method in Sinha et al . ( 2018 ) , but different from Sinha et al . ( 2018 ) , our approach does not require ` to be smooth , and thus can be applied to arbitrary neural networks . The advantage of the smoothed classifier also lies in a tighter robustness certificate than the base classifier . The intuition is that , in the inner maximization step , instead of seeking one direction which maximizes the loss , our approach performs gradient ascent along the direction which maximizes the total loss of examples sampled from the neighborhood of the original input . The noisy adversarial training procedure produces smoothed classifiers robust against the neighborhood of the worst-case adversarial examples with a certified bound . Highlights of our contribution are as follows . First , we review the drawbacks in the previous definition of robustness , and propose to evaluate robustness by the worst-case loss over the input distribution . Second , we derive a data-dependent upper bound for the worst-case loss , constituting a robustness certificate . Third , by minimizing the robustness certificate in the training loop , we propose noisy adversarial learning for enhancing model robustness , in which the smoothness property entails the computational tractability of the certificate . Through both theoretical analysis and experimental results , we verify that our certified DNNs enjoy better accuracies compared with the state-of-the-art defending adversarial example attacks . 2 RELATED WORK . Works proposed to defend against adversarial example attacks can be categorized into the following categories . In empirical defences , there is no guarantee how the DNN model would perform against the adversarial examples . Stability training ( Zheng et al . ( 2016 ) ; Zantedeschi et al . ( 2017 ) ; Liu et al . ( 2018 ) ) improves model robustness by adding randomized noise to the input during training but shows limited performance enhancement . Adversarial training ( Goodfellow et al . ( 2015 ) ; Kurakin et al . ( 2018 ) ; Madry et al . ( 2017 ) ; Kannan et al . ( 2018 ) ; Zhang et al . ( 2019 ) ; He et al . ( 2019 ) ; Wang et al . ( 2019 ) ) trains over adversarial examples found at each training step but unfortunately does not guarantee the performance over unseen adversarial inputs . Although without a guarantee , adversarial training has excellent performance in empirical defences against adversarial attacks . Certified defences are certifiably robust against any adversarial input within an ` p-norm perturbation range from the original input . A line of works construct a computationally tractable relaxation for computing an upper bound on the worst-case loss over all valid attacks . The relaxations include linear programming ( Wong & Kolter ( 2018 ) ) , mixed integer programming ( Tjeng et al . ( 2018 ) ) , semidefinite programming ( Raghunathan et al . ( 2018 ) ) , and convex relaxation ( Namkoong & Duchi ( 2017 ) ; Salman et al . ( 2019b ) ) . But those deterministic methods are not scalable . Some works such as Dvijotham et al . ( 2018 ) formulate the search for the largest perturbation range as an optimization problem and solve its dual problem . Sinha et al . ( 2018 ) also propose a robustness certificate based on a Lagrangian relaxation of the loss function , and it is provably robust against adversarial input distributions within a Wasserstein ball centered around the original input distribution . The certificate of our work is constructed on a Lagrangian relaxation form of the worst-case loss , but has a broader applicability than Sinha et al . ( 2018 ) with a tighter loss bound due to the smoothness property . An alternative line of works propose to select appropriate surrogates for each neuron activation layer by layer ( Weng et al . ( 2018 ) ; Zhang et al . ( 2018 ) ) to facilitate the search for a certified lower bound . By integrating with interval bound propagation ( Gowal et al . ( 2018 ) ) , Zhang et al . ( 2020 ) make the search computationally efficient and scalable . Other works ( Mirman et al . ( 2018 ) ; Singh et al . ( 2018 ) ) apply the abstract interpretation to train provably robust neural networks . Our work is orthogonal to these works . Randomized smoothing introduces randomized noise to the neural network , and tries to provide a statistically certified robustness guarantee . Pinot et al . ( 2020 ) have demonstrated by game theory that no deterministic classifier can claim to be more robust than all others against any possible adversarial attack . But such a question remains open in the randomized regime , where randomized smoothing can be considered as a contributing effort . The smoothing method does not depend on a specific neural network , or a type of relaxation , but can be generally applied to arbitrary neural networks . The idea of adding randomized noise was first proposed by Lecuyer et al . ( 2019 ) , given the inspiration of the differential privacy property , and then Li et al . ( 2019 ) improve the certificate with Rényi divergence . Cohen et al . ( 2019 ) obtain a larger certified robustness bound through the smoothed classifier based on Neyman-Pearson theorem . Phan et al . ( 2020 ) extend the noise addition mechanism to large-scale parallel algorithms . By extending the randomized noise to the general family of exponential distributions , Pinot et al . ( 2019 ) unify previous approaches to preserve robustness to adversarial attacks . Lee et al . ( 2019 ) offer adversarial robustness guarantees for ` 0-norm attacks . Both Salman et al . ( 2019a ) ; Jia et al . ( 2019 ) employ adversarial training to improve the performance of randomized smoothing . Following a similar principle , our work trains over adversarial data with randomized noise . But we provide a more practical robustness certificate and a training method achieving higher empirical accuracy than theirs . 3 PROPOSED APPROACH . We first define the closeness between distributions , based on which we constrain how far the input distribution is perturbed . Then we introduce our definition of robustness on smoothed classifiers . Our main theorem gives a tractable robustness certificate which is easy to optimize . Our algorithm for improving the robustness of the smoothed classifiers is provided . All proofs are collected in the appendices for conciseness . 3.1 A DISTRIBUTIONAL ROBUSTNESS CERTIFICATE . Definition 1 ( Wasserstein distance ) . Wasserstein distances define a notion of closeness between distributions . Let ( X ⊂ Rd , A , P ) be a probability space and the transportation cost c : X × X → [ 0 , ∞ ) be nonnegative , lower semi-continuous , and c ( x , x ) = 0 . P and Q are two probability measures supported on X . Let Π ( P , Q ) denotes the collection of all measures on X × X with marginals P and Q on the first and second factors respectively , i.e. , it holds that π ( A , X ) = P ( A ) and π ( X , A ) = Q ( A ) , ∀A ∈ A and π ∈ Π ( P , Q ) . The Wasserstein distance between P and Q is Wc ( P , Q ) : = inf π∈Π ( P , Q ) Eπ [ c ( x , y ) ] . ( 2 ) For example , the ` 2-norm c ( x , x0 ) = ‖x− x0‖22 satisfies the aforementioned conditions . Distributional robustness . Assume the original input x0 is drawn from the distribution P0 , and the perturbed input x is drawn from the distribution P . Each input is added randomized Gaussian noise z ∼ Z = N ( 0 , σ2I ) before being fed to the classifier . Instead of regarding the noise as a part of the smoothed classifier , we treat s = x + z as a noisy input coming from the distribution S in the analysis . Since z ∈ Rd , we need to set X = Rd to admit s ∈ X as Lecuyer et al . ( 2019 ) ; Cohen et al . ( 2019 ) ; Salman et al . ( 2019a ) do . Since the perturbed input should be visually indistinguishable from the original one , we define the robustness region as P = { P : Wc ( P , P0 ) ≤ ρ , P ∈ P ( X ) } , where ρ > 0 . Within such a region , we evaluate the robustness as a worst-case population loss over noisy inputs : supS∈P ES [ ` ( θ ; s ) ] . Essentially , we evaluate the robustness of a smoothed classifer based on its performance on the worst-case adversarial example distribution . A smaller loss indicates a higher level of robustness . We will compare the definition against others in the next section . However , such a robustness metric is impossible to measure in practice as we have no idea about P . Even if P can be acquired , it can be a non-convex region which renders the constrained optimization objective intractable . Hence we resort to the Lagrangian relaxation of the problem by assuming a dual variable γ . As the main theorem of this work , we provide an upper bound for the worst-case population loss for any level of robustness ρ . We further show that for small enough ρ , the upper bound is tractable and easy to optimize . Theorem 1 . Let ` : Θ × X → R and transportation cost function c : X × X → R+ be continuous . Let x0 be an input drawn from the input distribution P0 , x be the adversarial example which follows the distribution P and z ∼ Z = N ( 0 , σ2I ) be the additive noise of the same shape as x . The sum of x and z is denoted as s = x + z ∼ S and we let φγ ( θ ; x0 ) = supx∈X EZ { ` ( θ ; x+ z ) − γc ( x+ z , x0 ) } be the robust surrogate . For any γ , ρ > 0 and σ , we have sup S : Wc ( S , P0 ) ≤ρ ES [ ` ( θ ; s ) ] ≤ γρ+ EP0 [ φγ ( θ ; x0 ) ] . ( 3 ) The proof is given in Appendix A.1 . It is notable that the right-hand side take the expectation over P0 and Z respectively , and given a particular input x0 and a noise sample z , we seek an adversarial example which maximizes the surrogate loss . Typically , P0 is impossible to obtain and thus we use an empirical distribution , such as the training data distribution , to approximate P0 in practice . Since Thm . 1 provides an upper bound for the worst-case population loss , it offers a principled adversarial training approach which minimizes the upper bound instead of the actual loss , i.e. , minimize θ∈Θ EP0 [ φγ ( θ ; x0 ) ] . ( 4 ) In the following we show the above loss function has a form which is tractable for arbitrary neural networks , due to a smoothed loss function . Hence Thm . 1 provides a tractable robustness certificate depending on the data . Properties of the smoothed classifier . We show the optimization objective of Eq . 4 has a form which is tractable for any neural network , particular for the non-smooth ones with ReLU activation layers . More importantly , the smoothness of the classifier enables the adversarial training procedure to converge as we want by using the common optimization techniques such as stochastic gradient descent . The smoothness of the loss function comes from the smoothed classifier with randomized noise . Specifically , Theorem 2 . Assume ` : Θ × X → [ 0 , M ] is a bounded loss function . The loss function on the smoothed classifier can be expressed as ˆ̀ ( θ ; x ) : = EZ [ ` ( θ ; x+ z ) ] , z ∼ Z = N ( 0 , σ2I ) . Then we have ˆ̀ is 2Mσ2 -smooth w.r.t . ` 2-norm , i.e. , ˆ̀satisfies∥∥∥∇x ˆ̀ ( θ ; x ) −∇x ˆ̀ ( θ ; x′ ) ∥∥∥ 2 ≤ 2M σ2 ‖x− x′‖2 . ( 5 ) The proof is in Appendix A.2 . It mainly takes advantage of the randomized noise which has a smoothing effect on the loss function . For DNNs with non-smooth layers , the smoothed classifier makes it up and turns the loss function to a smoothed one , which contributes as an important property to the strong concavity of EZ [ ` ( θ ; x+ z ) − γc ( x+ z , x0 ) ] and therefore ensures the tractability of the robustness certificate . Corollary 1 . For any c : X × X → R+ ∪ { ∞ } 1-strongly convex in its first argument , and ˆ̀ : x 7→ EZ [ ` ( θ ; x+ z ) ] being 2Mσ2 -smooth , the function EZ { ` ( θ ; x+ z ) − γc ( x+ z , x0 ) } is strongly concave in x for any γ ≥ 2Mσ2 . The proof is in Appendix A.3 . Note that here we specify the requirement on the transportation cost c to be 1-strongly convex in its first argument . The ` 2-norm cost satisfies the condition . Before showing how the strong concavity plays a part in the convergence , we illustrate our algorithm first . | This paper proposes smoothing the classifier in the distributional robust learning framework by adding random noise to the input. The smoothed distributional robust framework is used to gain robustness against adversarial perturbations in settings where the classifier is originally non-smooth and then smoothed via the additive noise. While the proposed idea can be potentially useful for training adversarially-robust classifiers over non-smooth function spaces, the paper's theoretical formulation seems to reduce to original non-smoothed distributional robust optimization. Theorem 2 also seems incorrect and its proof suffers from several mistakes. | SP:5eb3d197fb5005f876dac170b9a40717d965f66c |
Model-Based Visual Planning with Self-Supervised Functional Distances | 1 INTRODUCTION . Designing general-purpose robots that can perform a wide range of tasks remains an open problem in AI and robotics . Reinforcement learning ( RL ) represents a particularly promising tool for learning robotic behaviors when skills can be learned one at a time from user-defined reward functions . However , general-purpose robots will likely require large and diverse repertoires of skills , and learning individual tasks one at a time from manually-specified rewards is onerous and time-consuming . How can we design learning systems that can autonomously acquire general-purpose knowledge that allows them to solve many different downstream tasks ? To address this problem , we must resolve three questions . ( 1 ) How can the robot be commanded to perform specific downstream tasks ? A simple and versatile choice is to define tasks in terms of desired outcomes , such as an example observation of the completed task . ( 2 ) What types of data should this robot learn from ? In settings where modern machine learning attains the best generalization results ( Deng et al. , 2009 ; Rajpurkar et al. , 2016 ; Devlin et al. , 2018 ) , a common theme is that excellent generalization is achieved by learning from large and diverse task-agnostic datasets . In the context of RL , this means we need offline methods that can use all sources of prior data , even in the absence of reward labels . As collecting new experience on a physical robot is often expensive , offline data is often more practical to use in real-world settings ( Levine et al. , 2020 ) . ( 3 ) What should the robot learn from this data to enable goal-reaching ? Similar to prior work ( Botvinick & Weinstein , 2014 ; Watter et al. , 2015 ; Finn & Levine , 2017 ; Ebert et al. , 2018b ) , we note that policies and value functions are specific to a particular task , while a predictive model captures the physics of the environment independently of the task , and thus can be used for solving almost any task . This makes model learning particularly effective for learning from large and diverse datasets , which do not necessarily contain successful behaviors . While model-based approaches have demonstrated promising results , including for vision-based tasks in real-world robotic systems ( Ebert et al. , 2018a ; Finn & Levine , 2017 ) , such methods face two major challenges . First , predictive models on raw images are only effective over short horizons , as uncertainty accumulates far into the future ( Denton & Fergus , 2018 ; Finn et al. , 2016 ; Hafner et al. , 2019b ; Babaeizadeh et al. , 2017 ) . Second , using such models for planning toward goals requires a notion of similarity between images . While prior methods have utilized latent variable models ( Watter et al. , 2015 ; Nair et al. , 2018 ) , ` 2 pixel-space distance ( Nair & Finn , 2020 ) , and other heuristic measures of similarity ( Ebert et al. , 2018b ) , these metrics only capture visual similarity . To enable reliable control with predictive models , we instead need distances that are aware of dynamics . In this paper , we propose Model-Based RL with Offline Learned Distances ( MBOLD ) , which aims to ad- dress both of these challenges by learning predictive models together with image-based distance functions that reflect functionality , from offline , unlabeled data . The learned distance function estimates of the number of steps that the optimal policy would take to transition from one state to another , incorporating not just visual appearance , but also an understanding of dynamics . However , to learn dynamical distances from task-agnostic data , supervised regression will lead to overestimation , since the paths in the data are not all optimal for any task . Instead , we utilize approximate dynamic programming for distance estimation . While prior work has studied such methods to learn goal-conditioned policies in online model-free RL settings ( Eysenbach et al. , 2019 ; Florensa et al. , 2019 ) , we extend it to the offline setting and show that approximate dynamic programming techniques derived from Q-learning style Bellman updates can learn effective shortest path dynamical distances . Although this procedure resembles model-free reinforcement learning , we find empirically that it does not by itself produce useful policies . Instead , our method ( Fig . 1 ) combines the strengths of dynamics models and distance functions , using the predictive model to plan over short horizons , and using the learned distances to provide a global cost that captures progress toward distant goals . The primary contribution of this work is an offline , self-supervised approach for solving arbitrary goal-reaching tasks by combining planning with predictive models and learned dynamical distances . To our knowledge , our method is the first to directly combine predictive models on images with dynamical distance estimators on images , entirely from random , offline data without reward labels . Through our experimental evaluation on challenging robotic object manipulation tasks , including simulated object relocation and real-world drawer manipulation , we find that our method can outperform previously introduced reward specification methods for visual model-based control with a relative performance improvement of at least 50 % across all tasks , and compares favorably to prior work in model-based and model-free RL . We also find that combining Q-functions with planning improves dramatically over policies directly learned with model-free RL . 2 RELATED WORK . Offline and Model-based RL : A number of prior works have studied the problem of learning behaviors from existing offline datasets . While recent progress has been made in applying model-free RL techniques to this problem of offline or batch RL ( Fujimoto et al. , 2019 ; Wu et al. , 2019 ; Kumar et al. , 2019 ; 2020 ; Nair et al. , 2020b ) , one approach that has shown promise is offline model-based RL ( Lowrey et al. , 2019 ; Kidambi et al. , 2020 ; Yu et al. , 2020 ; Argenson & Dulac-Arnold , 2020 ) , where the agent learns a predictive model of the world from data . Such model-based methods have seen success both in the offline and online RL settings , and have a rich history of being effective for planning ( Deisenroth & Rasmussen , 2011 ; Watter et al. , 2015 ; McAllister & Rasmussen , 2016 ; Chua et al. , 2018 ; Amos et al. , 2018 ; Hafner et al. , 2019b ; Nagabandi et al. , 2018 ; Kahn et al. , 2020 ; Dong et al. , 2020 ) or policy optimization ( Sutton , 1991 ; Weber et al. , 2017 ; Ha & Schmidhuber , 2018 ; Janner et al. , 2019 ; Wang & Ba , 2019 ; Hafner et al. , 2019a ) . However , the vast majority of these prior works consider the single task setting where the agent aims to maximize a single task reward . In contrast , in this work we circumvent the need for task rewards by adopting a selfsupervised multi-task approach , where a single learned model is used to perform a variety of tasks , specified in a flexible and general way by desired outcomes – i.e. , goal images . Self-supervised goal reaching : While the standard RL problem involves optimizing for a taskspecific reward , an alternative and potentially more general formulation involves learning a generic goal reaching policy , without task-specific reward labels . In fact , a number of prior works learn goal-conditioned policies using model-free RL ( Kaelbling , 1993 ; Nair et al. , 2018 ; Mandlekar et al. , 2019 ; Nair et al. , 2020a ) , or variants of goal-conditioned behavioral cloning ( GCBC ) ( Ghosh et al. , 2019 ; Ding et al. , 2019 ; Lynch et al. , 2020 ) . In our experiments , we show that our method outperforms both model-free approaches and goal-conditioned behavioral cloning . A number of methods combine model-free and model-based elements by planning over a graph representation ( Eysenbach et al. , 2019 ; Nasiriany et al. , 2019 ; Savinov et al. , 2018 ; Liu et al. , 2020 ) . Such methods can struggle in higher dimensions , where constructing graphs that adequately cover the space may require an excessive number of samples . We compare to these methods in our experiments . Similarly to Finn & Levine ( 2017 ) ; Ebert et al . ( 2018b ) ; Nair & Finn ( 2020 ) ; Yen-Chen et al . ( 2019 ) ; Suh & Tedrake ( 2020 ) , our method uses an action-conditioned video prediction model to generate plans . However , these prior methods generally utilize hand-crafted image similarity reward measures such as ` 2 pixel-error ( Ebert et al. , 2018a ; Nair & Finn , 2020 ) and pixel-flow prediction ( Finn & Levine , 2017 ) . In complex scenes , this can become a major bottleneck : predictions degrade rapidly further in the future , making an informative image similarity metric critical for effective planning . We propose to learn functional similarity metrics in terms of dynamical distances , which we find can be combined with predictive models to attain significantly improved results . Dynamical distance learning : Our method learns dynamical distances – distances that represent shortest paths – from offline data . In the literature , dynamical distances have been learned via direct regression using online data ( Hartikainen et al. , 2019 ) , representation learning ( Warde-Farley et al. , 2018 ; Yu et al. , 2019b ) , or via Q-learning by relabeling goals ( Eysenbach et al. , 2019 ; Florensa et al. , 2019 ) . While these last two works are most similar to ours , in that they also employ approximate dynamic programming to learn distances , our method directly combines these dynamical distances with visual predictive models and planning . Lastly , while prior work has also explored combining model-based planning with value functions ( Zhong et al. , 2013 ; Lowrey et al. , 2019 ; Hafner et al. , 2019a ; Schrittwieser et al. , 2019 ; Argenson & Dulac-Arnold , 2020 ) , these works consider the single task domain with a reward function , while our learned value function considers the multi-task goal reaching domain from entirely random , offline data without reward labels . 3 THE SELF-SUPERVISED OFFLINE RL PROBLEM STATEMENT . In this section , we introduce notation and define the problem setting . We will employ a Markov decision process ( MDP ) with state observations st ∈ S and actions at ∈ A , both indexed by time t ∈ 0 , 1 , · · · , H , where H denotes the maximum episode length . The initial state is sampled from an initial state distribution s0 ∼ p0 ( s0 ) , and subsequent states are sampled according to Markovian dynamics : st+1 ∼ p ( st+1 | st , at ) . Actions are sampled at ∼ π ( at | st , sg ) from a policy that is conditioned on both the current state and a goal state sg ∈ S. In our experiments , both the state and goal are images ( i.e. , S = RH×W×3 ) . We tackle offline learning in this setting , assuming access to a fixed dataset D consisting of trajectories { s0 , a0 , s1 , ... sT } of the agent interacting with the environment . This data can include any environment interactions , from expert demonstrations to trajectories which are not particularly successful at any task . In our experiments , we use data collected using a random policy , which is inexpensive to obtain . The agent does not have access to the environment to collect additional training data . Given this dataset , the objective is to determine the optimal goal-conditioned policy π ? ( at | st , sg ) , under which the agent is able to transition to any goal state sg from any starting state st in the minimum number of time steps possible . Note that unlike in the standard formulation of the RL problem , the agent does not receive any reward signal from its environment . | This paper proposes to learn functional distances to varying goals concurrently with a latent dynamics model from images. A network is trained to predict the Q-value of state action pairs for a sparse reward at the goal. This way the Q-function represents the shortest path distance to the goal. The paper also proposes a specific learning scheme for training the model from random rollouts in the environment. The learned distance function is used with the dynamics model for planning from start to goal images using model-predictive control (CEM). The approach is evaluated on simulated reaching and object pushing tasks. It is compared with state-of-the-art methods and demonstrates improved performance in some of the tasks. | SP:a1cb44f75e6ce83ead86c295ca0a1c51e3a4f456 |
Model-Based Visual Planning with Self-Supervised Functional Distances | 1 INTRODUCTION . Designing general-purpose robots that can perform a wide range of tasks remains an open problem in AI and robotics . Reinforcement learning ( RL ) represents a particularly promising tool for learning robotic behaviors when skills can be learned one at a time from user-defined reward functions . However , general-purpose robots will likely require large and diverse repertoires of skills , and learning individual tasks one at a time from manually-specified rewards is onerous and time-consuming . How can we design learning systems that can autonomously acquire general-purpose knowledge that allows them to solve many different downstream tasks ? To address this problem , we must resolve three questions . ( 1 ) How can the robot be commanded to perform specific downstream tasks ? A simple and versatile choice is to define tasks in terms of desired outcomes , such as an example observation of the completed task . ( 2 ) What types of data should this robot learn from ? In settings where modern machine learning attains the best generalization results ( Deng et al. , 2009 ; Rajpurkar et al. , 2016 ; Devlin et al. , 2018 ) , a common theme is that excellent generalization is achieved by learning from large and diverse task-agnostic datasets . In the context of RL , this means we need offline methods that can use all sources of prior data , even in the absence of reward labels . As collecting new experience on a physical robot is often expensive , offline data is often more practical to use in real-world settings ( Levine et al. , 2020 ) . ( 3 ) What should the robot learn from this data to enable goal-reaching ? Similar to prior work ( Botvinick & Weinstein , 2014 ; Watter et al. , 2015 ; Finn & Levine , 2017 ; Ebert et al. , 2018b ) , we note that policies and value functions are specific to a particular task , while a predictive model captures the physics of the environment independently of the task , and thus can be used for solving almost any task . This makes model learning particularly effective for learning from large and diverse datasets , which do not necessarily contain successful behaviors . While model-based approaches have demonstrated promising results , including for vision-based tasks in real-world robotic systems ( Ebert et al. , 2018a ; Finn & Levine , 2017 ) , such methods face two major challenges . First , predictive models on raw images are only effective over short horizons , as uncertainty accumulates far into the future ( Denton & Fergus , 2018 ; Finn et al. , 2016 ; Hafner et al. , 2019b ; Babaeizadeh et al. , 2017 ) . Second , using such models for planning toward goals requires a notion of similarity between images . While prior methods have utilized latent variable models ( Watter et al. , 2015 ; Nair et al. , 2018 ) , ` 2 pixel-space distance ( Nair & Finn , 2020 ) , and other heuristic measures of similarity ( Ebert et al. , 2018b ) , these metrics only capture visual similarity . To enable reliable control with predictive models , we instead need distances that are aware of dynamics . In this paper , we propose Model-Based RL with Offline Learned Distances ( MBOLD ) , which aims to ad- dress both of these challenges by learning predictive models together with image-based distance functions that reflect functionality , from offline , unlabeled data . The learned distance function estimates of the number of steps that the optimal policy would take to transition from one state to another , incorporating not just visual appearance , but also an understanding of dynamics . However , to learn dynamical distances from task-agnostic data , supervised regression will lead to overestimation , since the paths in the data are not all optimal for any task . Instead , we utilize approximate dynamic programming for distance estimation . While prior work has studied such methods to learn goal-conditioned policies in online model-free RL settings ( Eysenbach et al. , 2019 ; Florensa et al. , 2019 ) , we extend it to the offline setting and show that approximate dynamic programming techniques derived from Q-learning style Bellman updates can learn effective shortest path dynamical distances . Although this procedure resembles model-free reinforcement learning , we find empirically that it does not by itself produce useful policies . Instead , our method ( Fig . 1 ) combines the strengths of dynamics models and distance functions , using the predictive model to plan over short horizons , and using the learned distances to provide a global cost that captures progress toward distant goals . The primary contribution of this work is an offline , self-supervised approach for solving arbitrary goal-reaching tasks by combining planning with predictive models and learned dynamical distances . To our knowledge , our method is the first to directly combine predictive models on images with dynamical distance estimators on images , entirely from random , offline data without reward labels . Through our experimental evaluation on challenging robotic object manipulation tasks , including simulated object relocation and real-world drawer manipulation , we find that our method can outperform previously introduced reward specification methods for visual model-based control with a relative performance improvement of at least 50 % across all tasks , and compares favorably to prior work in model-based and model-free RL . We also find that combining Q-functions with planning improves dramatically over policies directly learned with model-free RL . 2 RELATED WORK . Offline and Model-based RL : A number of prior works have studied the problem of learning behaviors from existing offline datasets . While recent progress has been made in applying model-free RL techniques to this problem of offline or batch RL ( Fujimoto et al. , 2019 ; Wu et al. , 2019 ; Kumar et al. , 2019 ; 2020 ; Nair et al. , 2020b ) , one approach that has shown promise is offline model-based RL ( Lowrey et al. , 2019 ; Kidambi et al. , 2020 ; Yu et al. , 2020 ; Argenson & Dulac-Arnold , 2020 ) , where the agent learns a predictive model of the world from data . Such model-based methods have seen success both in the offline and online RL settings , and have a rich history of being effective for planning ( Deisenroth & Rasmussen , 2011 ; Watter et al. , 2015 ; McAllister & Rasmussen , 2016 ; Chua et al. , 2018 ; Amos et al. , 2018 ; Hafner et al. , 2019b ; Nagabandi et al. , 2018 ; Kahn et al. , 2020 ; Dong et al. , 2020 ) or policy optimization ( Sutton , 1991 ; Weber et al. , 2017 ; Ha & Schmidhuber , 2018 ; Janner et al. , 2019 ; Wang & Ba , 2019 ; Hafner et al. , 2019a ) . However , the vast majority of these prior works consider the single task setting where the agent aims to maximize a single task reward . In contrast , in this work we circumvent the need for task rewards by adopting a selfsupervised multi-task approach , where a single learned model is used to perform a variety of tasks , specified in a flexible and general way by desired outcomes – i.e. , goal images . Self-supervised goal reaching : While the standard RL problem involves optimizing for a taskspecific reward , an alternative and potentially more general formulation involves learning a generic goal reaching policy , without task-specific reward labels . In fact , a number of prior works learn goal-conditioned policies using model-free RL ( Kaelbling , 1993 ; Nair et al. , 2018 ; Mandlekar et al. , 2019 ; Nair et al. , 2020a ) , or variants of goal-conditioned behavioral cloning ( GCBC ) ( Ghosh et al. , 2019 ; Ding et al. , 2019 ; Lynch et al. , 2020 ) . In our experiments , we show that our method outperforms both model-free approaches and goal-conditioned behavioral cloning . A number of methods combine model-free and model-based elements by planning over a graph representation ( Eysenbach et al. , 2019 ; Nasiriany et al. , 2019 ; Savinov et al. , 2018 ; Liu et al. , 2020 ) . Such methods can struggle in higher dimensions , where constructing graphs that adequately cover the space may require an excessive number of samples . We compare to these methods in our experiments . Similarly to Finn & Levine ( 2017 ) ; Ebert et al . ( 2018b ) ; Nair & Finn ( 2020 ) ; Yen-Chen et al . ( 2019 ) ; Suh & Tedrake ( 2020 ) , our method uses an action-conditioned video prediction model to generate plans . However , these prior methods generally utilize hand-crafted image similarity reward measures such as ` 2 pixel-error ( Ebert et al. , 2018a ; Nair & Finn , 2020 ) and pixel-flow prediction ( Finn & Levine , 2017 ) . In complex scenes , this can become a major bottleneck : predictions degrade rapidly further in the future , making an informative image similarity metric critical for effective planning . We propose to learn functional similarity metrics in terms of dynamical distances , which we find can be combined with predictive models to attain significantly improved results . Dynamical distance learning : Our method learns dynamical distances – distances that represent shortest paths – from offline data . In the literature , dynamical distances have been learned via direct regression using online data ( Hartikainen et al. , 2019 ) , representation learning ( Warde-Farley et al. , 2018 ; Yu et al. , 2019b ) , or via Q-learning by relabeling goals ( Eysenbach et al. , 2019 ; Florensa et al. , 2019 ) . While these last two works are most similar to ours , in that they also employ approximate dynamic programming to learn distances , our method directly combines these dynamical distances with visual predictive models and planning . Lastly , while prior work has also explored combining model-based planning with value functions ( Zhong et al. , 2013 ; Lowrey et al. , 2019 ; Hafner et al. , 2019a ; Schrittwieser et al. , 2019 ; Argenson & Dulac-Arnold , 2020 ) , these works consider the single task domain with a reward function , while our learned value function considers the multi-task goal reaching domain from entirely random , offline data without reward labels . 3 THE SELF-SUPERVISED OFFLINE RL PROBLEM STATEMENT . In this section , we introduce notation and define the problem setting . We will employ a Markov decision process ( MDP ) with state observations st ∈ S and actions at ∈ A , both indexed by time t ∈ 0 , 1 , · · · , H , where H denotes the maximum episode length . The initial state is sampled from an initial state distribution s0 ∼ p0 ( s0 ) , and subsequent states are sampled according to Markovian dynamics : st+1 ∼ p ( st+1 | st , at ) . Actions are sampled at ∼ π ( at | st , sg ) from a policy that is conditioned on both the current state and a goal state sg ∈ S. In our experiments , both the state and goal are images ( i.e. , S = RH×W×3 ) . We tackle offline learning in this setting , assuming access to a fixed dataset D consisting of trajectories { s0 , a0 , s1 , ... sT } of the agent interacting with the environment . This data can include any environment interactions , from expert demonstrations to trajectories which are not particularly successful at any task . In our experiments , we use data collected using a random policy , which is inexpensive to obtain . The agent does not have access to the environment to collect additional training data . Given this dataset , the objective is to determine the optimal goal-conditioned policy π ? ( at | st , sg ) , under which the agent is able to transition to any goal state sg from any starting state st in the minimum number of time steps possible . Note that unlike in the standard formulation of the RL problem , the agent does not receive any reward signal from its environment . | The paper combines optimal control and reinforcement learning (RL) for the execution of robotic manipulation tasks with variable goals. The approach learns, on the one hand, an image-based predictive model using a deep neural network and, on the other hand, a distance cost function using Q-Learning. These model and cost function are used to define the next action to execute using model predictive control (MPC). The cost function is learned from task-agnostic data by randomly generating goal states from the state space and including these goals as input variables in a Q-learning approach. This permits defining cost functions for MPC for variable goals. | SP:a1cb44f75e6ce83ead86c295ca0a1c51e3a4f456 |
Decentralized SGD with Asynchronous, Local and Quantized Updates | 1 INTRODUCTION . Several techniques have been recently explored for scaling the distributed training of machine learning models , such as communication-reduction , asynchronous updates , or decentralized execution . For background , consider the classical data-parallel distribution strategy for SGD ( Bottou , 2010 ) , with the goal of solving a standard empirical risk minimization problem . Specifically , we have a set of samples S , and wish to minimize the d-dimensional function f : Rd → R , which is the average of losses over samples from S , by finding x ? = argmin x ∑ s∈S ` s ( x ) /|S| . We have n compute nodes which can process samples in parallel . In data-parallel SGD , each node computes the gradient for one sample , followed by a gradient exchange . Globally , this leads to the iteration : xt+1 = xt − ηt n∑ i=1 g̃it ( xt ) , where xt is the value of the global parameter , initially 0d , ηt is the learning rate , and g̃it ( xt ) is the stochastic gradient with respect to the parameter xt , computed by node i at time t. When executing this procedure at large scale , two major bottlenecks are communication , that is , the number of bits transmitted by each node , and synchronization , i.e. , the fact that nodes need to wait for each other in order to progress to the next iteration . Specifically , to maintain a consistent view of the parameter xt above , the nodes need to broadcast and receive all gradients , and need to synchronize globally at the end of every iteration . Significant work has been dedicated to removing these two barriers . In particular , there has been progress on communication-reduced variants of SGD , which propose various gradient compression schemes ( Seide et al. , 2014 ; Strom , 2015 ; Alistarh et al. , 2017 ; Wen et al. , 2017 ; Aji and Heafield , 2017 ; Dryden et al. , 2016 ; Grubic et al. , 2018 ; Davies et al. , 2020 ) , asynchronous variants , which relax the strict iteration-by-iteration synchronization ( Recht et al. , 2011 ; Sa et al. , 2015 ; Duchi et al. , 2015 ) , as well as large-batch or periodic model averaging methods , which aim to reduce the frequency of communication ( Goyal et al. , 2017 ; You et al. , 2017 ) and ( Chen and Huo , 2016 ; Stich , 2018 ) , or decentralized variants , which allow each node to maintain its own , possibly inconsistent , model variant ( Lian et al. , 2017 ; Tang et al. , 2018 ; Koloskova et al. , 2019 ) . ( We refer the reader to the recent surveys of ( Ben-Nun and Hoefler , 2019 ; Liu and Zhang , 2020 ) for a detailed discussion . ) Using such techniques , it is possible to scale SGD , even for complex objectives such as the training of deep neural networks . However , for modern large-scale models , the communication and synchronization requirements of these parallel variants of SGD can still be burdensome . Contribution . In this paper , we take a further step towards removing these scalability barriers , showing that all the previous scaling techniques—decentralization , quantization , asynchrony , and local steps—can in fact be used in conjunction . We consider a highly decoupled setting with n compute agents , located at vertices of a connected communication graph , each of which can execute sequential SGD on its own local model , based on a fraction of the data . Periodically , after some number of local optimization steps , a node can initiate a pairwise interaction with a uniform random neighbor . Our main finding is that this procedure can converge even though the nodes can take several local steps between interactions , may perform asynchronous communication , reading stale versions of each others ’ models , and may compress data transmission through quantization . However , both in theory and practice , we observe trade-offs between convergence rate and degree of synchronization , in that the algorithm may need to perform additional gradient steps in order to attain a good solution , relative to the sequential baseline . Our algorithm , called SWARMSGD , is decentralized in sense that each node maintains local version of the model , and two interacting nodes only see each others ’ models . We further allow that the data distribution at the nodes may not be i.i.d . Specifically , each node i is assigned a set of samples Si , and maintains its own parameter estimate xi . Each node i performs local SGD steps on its model xi based on its local data , and then picks a neighbor uniformly at random to share information with , by averaging of the two models . ( To streamline the exposition , we ignore quantization and model staleness unless otherwise specified . ) Effectively , if node i interacts with node j , node i ’ s updated model becomes xit+1 ← xit , Hi + x j t , Hj 2 , ( 1 ) where t is the total number of interactions performed by all nodes up to this point , j is the interaction partner of i at step t + 1 , and the input models xit , Hi and x j t , Hj have been obtained by iterating the SGD step Hi and Hj times , respectively , locally from the previous interaction of either node . We assume that Hi and Hj are random variables with mean H , that is , each node performs H local steps in expectation between two communication steps . The update for node j is symmetric , so that the two models match after the averaging step . In this paper , we analyze variants of the above SwarmSGD protocol . The main intuition behind the algorithm is that the independent SGD steps will allow nodes to explore local improvements to the objective function on their subset of the data , while the averaging steps provide a decentralized way for the models to converge jointly , albeit in a loosely coupled way . We show that , as long as the maximum number of local steps is bounded , this procedure still converges , in the sense that gradients calculated at the average over all models are vanishing as we increase the number of interactions . Specifically , assuming that the n nodes each take a constant number of local SGD steps on average before communicating , we show that SwarmSGD has Θ ( √ n ) speedup to convergence in the nonconvex case . This matches results from previous work which considered decentralized dynamics but which synchronized upon every SGD step , e.g . ( Lian et al. , 2017 ; 2018 ) . Our analysis also extends to arbitrary regular graph topologies , non-blocking ( delayed ) averaging of iterates , and quantization . Generally , we show that the impact of decentralization , asynchrony , quantization , and local updates can be asymptotically negligible in reasonable parameter regimes . On the practical side , we show that this algorithm can be mapped to a distributed system setting , where agents correspond to compute nodes , connected by a dense communication topology . Specifically , we apply SwarmSGD to train deep neural networks on image classification and machine translation ( NMT ) tasks , deployed on the Piz Daint supercomputer ( Piz , 2019 ) . Experiments confirm the intuition that the average synchronization cost of SwarmSGD per iteration is low : it stays around 10 % or less of the batch computation time , and remains constant as we increase the number of nodes . For example , using SwarmSGD deployed on 16 nodes , we are able to train a TransformerXL ( Vaswani et al. , 2017 ) model on WMT17 ( En-Ge ) 1.5× faster than a highly-optimized largebatch SGD baseline , and to slightly higher accuracy , without additional hyper-parameter tuning . At the same time , our method appears to be faster and more accurate than the previous practical decentralized methods , e.g . ( Lian et al. , 2017 ; 2018 ; Assran et al. , 2018 ) , in the same setting . Importantly , we also note a negative result : in less overparametrized settings such as training residual CNNs ( He et al. , 2016 ) on ImageNet ( Russakovsky et al. , 2015 ) , nodes do need to perform more iterations over the dataset relative to the baseline in order to recover full accuracy . This is predicted by the analysis , and confirms similar findings in previous work ( Assran et al. , 2018 ) . Overall , however , our family of methods should be well-suited to training very large modern models in large-scale settings , where global synchronization among all nodes is prohibitively expensive . Related Work . The study of decentralized optimization algorithms dates back to Tsitsiklis ( 1984 ) , and is related to the study of gossip algorithms for information dissemination ( Kempe et al. , 2003 ; Xiao and Boyd , 2004 ; Boyd et al. , 2006 ) . Gossip is usually studied in one of two models ( Boyd et al. , 2006 ) : synchronous , structured in global rounds , where each node interacts with a randomly chosen neighbor , and asynchronous , where each node wakes up at times given by a local Poisson clock , and picks a random neighbor to interact with . The model we consider can be seen as equivalent to the asynchronous gossip model . The key differences between our work and averaging in the gossip model , e.g . Boyd et al . ( 2006 ) , are that that 1 ) we consider local SGD steps , which would not make sense in the case of averaging fixed initial values ; and 2 ) the gossip input model is static ( node inputs are fixed , and node estimates must converge to the true mean ) , whereas we study a dynamic setting , where models are continually updated via SGD . Several optimization algorithms have been analyzed in this setting ( Nedic and Ozdaglar , 2009 ; Johansson et al. , 2009 ; Shamir and Srebro , 2014 ) , while Tang et al . ( 2018 ) ; Koloskova et al . ( 2019 ) analyze quantization in the synchronous gossip model . Lian et al . ( 2017 ; 2018 ) and Assran et al . ( 2018 ) considered SGD-type algorithms in gossip-like models . Specifically , they analyze the SGD averaging dynamic in the non-convex setting but do not allow nodes to perform local updates or quantize . In particular , nodes perform pairwise averaging upon every SGD step . Table 2 in the Appendix provides a thorough comparison of assumptions , results , and rates . Their results are phrased in the synchronous gossip model , in which nodes interact in a sequence of perfect matchings , for which they provide O ( 1/ √ Tn ) convergence rates under analytical assumptions . Lian et al . ( 2018 ) extends these results to a variant of the gossip model where updates can be performed based on stale information , similarly to our non-blocking extension . Upon careful examination , one can find that their results can be extended to the asynchronous gossip setting we consider , as long as nodes are not allowed to perform local SGD updates to their models ( corresponding toH = 1 ) or to quantize communication . Extending the analysis of distributed SGD to allow for local steps is challenging even in centralized models , see for instance Stich ( 2018 ) . If we assume H = 1 , our technique yields similar or better bounds relative to previous work in the decentralized model , as our potential analysis is specifically-tailored to this dynamic interaction model . For instance , for Assran et al . ( 2018 ) , the speedup with respect to the number of nodes depends on a parameter C , which in turn , depends on 1 ) the dimension d of the objective function , 2 ) the number of iterations for the graph given by edge sets of all matrices used in averaging to be connected , and the 3 ) diameter of the aforementioned connected graph . In the dynamic interaction model we consider , the parameter C will be at least linear in the number of nodes n , which will eliminate any speedup . We present a systematic comparison in Appendix B . In sum , relative to prior work on decentralized algorithms , our contributions are as follows . We are the first to consider the impact of local updates , asynchrony , and quantization in conjunction with decentralized SGD . We show that the cost for the linear reduction in communication in H given by local steps is at worst a squared variance increase in the parameter H . Our analysis technique relies on a fine-grained analysis of individual interactions , which is different than that of previous work , and can yield improved bounds even in the case where H = 1 . By leveraging the lattice-based quantization scheme of Davies et al . ( 2020 ) , we also allow for communication-compression . From the implementation perspective , the performance of our algorithm is superior to that of previous methods , notably D-PSGD ( Lian et al. , 2017 ) , AD-PSGD ( Lian et al. , 2018 ) and SGP ( Assran et al. , 2018 ) , mainly due to the ability to take local steps . Wang and Joshi ( 2018 ) and Koloskova et al . ( 2020 ) provide analysis frameworks for the synchronous version of decentralized SGD with local updates , and possibly changing topologies . This is a different setting from ours , since it requires each agent to take an equal number of gradient steps before every interaction round , and therefore does not allow for agents to progress at different speeds ( asynchrony ) . Further , we support quantization , and validate our analysis at scale . | The paper proposes and analyses a distributed learning algorithm for training with Stochastic Gradient Descent a global model on a regular graph, that allows for local and asynchronous gradient updates. Nodes continuously update their local models $X^i$ by gradient descent, while they communicate with their peers (a peer at a time) and update their local model with the pair model average $\frac{X^i + X^j}{2}$. Three extensions of the algorithm are also proposed to relax different constraints, while maintaining the convergence guarantees: | SP:120a40819527a564d4d1f66b2d138f849e44ed26 |
Decentralized SGD with Asynchronous, Local and Quantized Updates | 1 INTRODUCTION . Several techniques have been recently explored for scaling the distributed training of machine learning models , such as communication-reduction , asynchronous updates , or decentralized execution . For background , consider the classical data-parallel distribution strategy for SGD ( Bottou , 2010 ) , with the goal of solving a standard empirical risk minimization problem . Specifically , we have a set of samples S , and wish to minimize the d-dimensional function f : Rd → R , which is the average of losses over samples from S , by finding x ? = argmin x ∑ s∈S ` s ( x ) /|S| . We have n compute nodes which can process samples in parallel . In data-parallel SGD , each node computes the gradient for one sample , followed by a gradient exchange . Globally , this leads to the iteration : xt+1 = xt − ηt n∑ i=1 g̃it ( xt ) , where xt is the value of the global parameter , initially 0d , ηt is the learning rate , and g̃it ( xt ) is the stochastic gradient with respect to the parameter xt , computed by node i at time t. When executing this procedure at large scale , two major bottlenecks are communication , that is , the number of bits transmitted by each node , and synchronization , i.e. , the fact that nodes need to wait for each other in order to progress to the next iteration . Specifically , to maintain a consistent view of the parameter xt above , the nodes need to broadcast and receive all gradients , and need to synchronize globally at the end of every iteration . Significant work has been dedicated to removing these two barriers . In particular , there has been progress on communication-reduced variants of SGD , which propose various gradient compression schemes ( Seide et al. , 2014 ; Strom , 2015 ; Alistarh et al. , 2017 ; Wen et al. , 2017 ; Aji and Heafield , 2017 ; Dryden et al. , 2016 ; Grubic et al. , 2018 ; Davies et al. , 2020 ) , asynchronous variants , which relax the strict iteration-by-iteration synchronization ( Recht et al. , 2011 ; Sa et al. , 2015 ; Duchi et al. , 2015 ) , as well as large-batch or periodic model averaging methods , which aim to reduce the frequency of communication ( Goyal et al. , 2017 ; You et al. , 2017 ) and ( Chen and Huo , 2016 ; Stich , 2018 ) , or decentralized variants , which allow each node to maintain its own , possibly inconsistent , model variant ( Lian et al. , 2017 ; Tang et al. , 2018 ; Koloskova et al. , 2019 ) . ( We refer the reader to the recent surveys of ( Ben-Nun and Hoefler , 2019 ; Liu and Zhang , 2020 ) for a detailed discussion . ) Using such techniques , it is possible to scale SGD , even for complex objectives such as the training of deep neural networks . However , for modern large-scale models , the communication and synchronization requirements of these parallel variants of SGD can still be burdensome . Contribution . In this paper , we take a further step towards removing these scalability barriers , showing that all the previous scaling techniques—decentralization , quantization , asynchrony , and local steps—can in fact be used in conjunction . We consider a highly decoupled setting with n compute agents , located at vertices of a connected communication graph , each of which can execute sequential SGD on its own local model , based on a fraction of the data . Periodically , after some number of local optimization steps , a node can initiate a pairwise interaction with a uniform random neighbor . Our main finding is that this procedure can converge even though the nodes can take several local steps between interactions , may perform asynchronous communication , reading stale versions of each others ’ models , and may compress data transmission through quantization . However , both in theory and practice , we observe trade-offs between convergence rate and degree of synchronization , in that the algorithm may need to perform additional gradient steps in order to attain a good solution , relative to the sequential baseline . Our algorithm , called SWARMSGD , is decentralized in sense that each node maintains local version of the model , and two interacting nodes only see each others ’ models . We further allow that the data distribution at the nodes may not be i.i.d . Specifically , each node i is assigned a set of samples Si , and maintains its own parameter estimate xi . Each node i performs local SGD steps on its model xi based on its local data , and then picks a neighbor uniformly at random to share information with , by averaging of the two models . ( To streamline the exposition , we ignore quantization and model staleness unless otherwise specified . ) Effectively , if node i interacts with node j , node i ’ s updated model becomes xit+1 ← xit , Hi + x j t , Hj 2 , ( 1 ) where t is the total number of interactions performed by all nodes up to this point , j is the interaction partner of i at step t + 1 , and the input models xit , Hi and x j t , Hj have been obtained by iterating the SGD step Hi and Hj times , respectively , locally from the previous interaction of either node . We assume that Hi and Hj are random variables with mean H , that is , each node performs H local steps in expectation between two communication steps . The update for node j is symmetric , so that the two models match after the averaging step . In this paper , we analyze variants of the above SwarmSGD protocol . The main intuition behind the algorithm is that the independent SGD steps will allow nodes to explore local improvements to the objective function on their subset of the data , while the averaging steps provide a decentralized way for the models to converge jointly , albeit in a loosely coupled way . We show that , as long as the maximum number of local steps is bounded , this procedure still converges , in the sense that gradients calculated at the average over all models are vanishing as we increase the number of interactions . Specifically , assuming that the n nodes each take a constant number of local SGD steps on average before communicating , we show that SwarmSGD has Θ ( √ n ) speedup to convergence in the nonconvex case . This matches results from previous work which considered decentralized dynamics but which synchronized upon every SGD step , e.g . ( Lian et al. , 2017 ; 2018 ) . Our analysis also extends to arbitrary regular graph topologies , non-blocking ( delayed ) averaging of iterates , and quantization . Generally , we show that the impact of decentralization , asynchrony , quantization , and local updates can be asymptotically negligible in reasonable parameter regimes . On the practical side , we show that this algorithm can be mapped to a distributed system setting , where agents correspond to compute nodes , connected by a dense communication topology . Specifically , we apply SwarmSGD to train deep neural networks on image classification and machine translation ( NMT ) tasks , deployed on the Piz Daint supercomputer ( Piz , 2019 ) . Experiments confirm the intuition that the average synchronization cost of SwarmSGD per iteration is low : it stays around 10 % or less of the batch computation time , and remains constant as we increase the number of nodes . For example , using SwarmSGD deployed on 16 nodes , we are able to train a TransformerXL ( Vaswani et al. , 2017 ) model on WMT17 ( En-Ge ) 1.5× faster than a highly-optimized largebatch SGD baseline , and to slightly higher accuracy , without additional hyper-parameter tuning . At the same time , our method appears to be faster and more accurate than the previous practical decentralized methods , e.g . ( Lian et al. , 2017 ; 2018 ; Assran et al. , 2018 ) , in the same setting . Importantly , we also note a negative result : in less overparametrized settings such as training residual CNNs ( He et al. , 2016 ) on ImageNet ( Russakovsky et al. , 2015 ) , nodes do need to perform more iterations over the dataset relative to the baseline in order to recover full accuracy . This is predicted by the analysis , and confirms similar findings in previous work ( Assran et al. , 2018 ) . Overall , however , our family of methods should be well-suited to training very large modern models in large-scale settings , where global synchronization among all nodes is prohibitively expensive . Related Work . The study of decentralized optimization algorithms dates back to Tsitsiklis ( 1984 ) , and is related to the study of gossip algorithms for information dissemination ( Kempe et al. , 2003 ; Xiao and Boyd , 2004 ; Boyd et al. , 2006 ) . Gossip is usually studied in one of two models ( Boyd et al. , 2006 ) : synchronous , structured in global rounds , where each node interacts with a randomly chosen neighbor , and asynchronous , where each node wakes up at times given by a local Poisson clock , and picks a random neighbor to interact with . The model we consider can be seen as equivalent to the asynchronous gossip model . The key differences between our work and averaging in the gossip model , e.g . Boyd et al . ( 2006 ) , are that that 1 ) we consider local SGD steps , which would not make sense in the case of averaging fixed initial values ; and 2 ) the gossip input model is static ( node inputs are fixed , and node estimates must converge to the true mean ) , whereas we study a dynamic setting , where models are continually updated via SGD . Several optimization algorithms have been analyzed in this setting ( Nedic and Ozdaglar , 2009 ; Johansson et al. , 2009 ; Shamir and Srebro , 2014 ) , while Tang et al . ( 2018 ) ; Koloskova et al . ( 2019 ) analyze quantization in the synchronous gossip model . Lian et al . ( 2017 ; 2018 ) and Assran et al . ( 2018 ) considered SGD-type algorithms in gossip-like models . Specifically , they analyze the SGD averaging dynamic in the non-convex setting but do not allow nodes to perform local updates or quantize . In particular , nodes perform pairwise averaging upon every SGD step . Table 2 in the Appendix provides a thorough comparison of assumptions , results , and rates . Their results are phrased in the synchronous gossip model , in which nodes interact in a sequence of perfect matchings , for which they provide O ( 1/ √ Tn ) convergence rates under analytical assumptions . Lian et al . ( 2018 ) extends these results to a variant of the gossip model where updates can be performed based on stale information , similarly to our non-blocking extension . Upon careful examination , one can find that their results can be extended to the asynchronous gossip setting we consider , as long as nodes are not allowed to perform local SGD updates to their models ( corresponding toH = 1 ) or to quantize communication . Extending the analysis of distributed SGD to allow for local steps is challenging even in centralized models , see for instance Stich ( 2018 ) . If we assume H = 1 , our technique yields similar or better bounds relative to previous work in the decentralized model , as our potential analysis is specifically-tailored to this dynamic interaction model . For instance , for Assran et al . ( 2018 ) , the speedup with respect to the number of nodes depends on a parameter C , which in turn , depends on 1 ) the dimension d of the objective function , 2 ) the number of iterations for the graph given by edge sets of all matrices used in averaging to be connected , and the 3 ) diameter of the aforementioned connected graph . In the dynamic interaction model we consider , the parameter C will be at least linear in the number of nodes n , which will eliminate any speedup . We present a systematic comparison in Appendix B . In sum , relative to prior work on decentralized algorithms , our contributions are as follows . We are the first to consider the impact of local updates , asynchrony , and quantization in conjunction with decentralized SGD . We show that the cost for the linear reduction in communication in H given by local steps is at worst a squared variance increase in the parameter H . Our analysis technique relies on a fine-grained analysis of individual interactions , which is different than that of previous work , and can yield improved bounds even in the case where H = 1 . By leveraging the lattice-based quantization scheme of Davies et al . ( 2020 ) , we also allow for communication-compression . From the implementation perspective , the performance of our algorithm is superior to that of previous methods , notably D-PSGD ( Lian et al. , 2017 ) , AD-PSGD ( Lian et al. , 2018 ) and SGP ( Assran et al. , 2018 ) , mainly due to the ability to take local steps . Wang and Joshi ( 2018 ) and Koloskova et al . ( 2020 ) provide analysis frameworks for the synchronous version of decentralized SGD with local updates , and possibly changing topologies . This is a different setting from ours , since it requires each agent to take an equal number of gradient steps before every interaction round , and therefore does not allow for agents to progress at different speeds ( asynchrony ) . Further , we support quantization , and validate our analysis at scale . | This paper combines the existing scaling techniques to reduce the communication cost of distributed SGD among a large number of computing nodes. These techniques include asynchronous, decentralized, or quantized communication. The authors prove that this combined algorithm converges to a local optimal point. In the experiments, this algorithm also successfully converges and scales for big data. The authors claim that this is the first work to consider decentralization, local updates, asynchrony, and quantization in conjunction. | SP:120a40819527a564d4d1f66b2d138f849e44ed26 |
Fast Predictive Uncertainty for Classification with Bayesian Deep Networks | In Bayesian Deep Learning , distributions over the output of classification neural networks are approximated by first constructing a Gaussian distribution over the weights , then sampling from it to receive a distribution over the categorical output distribution . This is costly . We extend existing work to construct a Dirichlet approximation of this output distribution , yielding an analytic map between Gaussian distributions in logit space and Dirichlet distributions in the output space . We argue that the resulting Dirichlet distribution has theoretical and practical advantages , in particular more efficient computation of the uncertainty estimate , scaling to large datasets and networks like ImageNet and DenseNet . We demonstrate the use of this Dirichlet approximation by using it to construct a lightweight uncertainty-aware output ranking for the ImageNet setup . 1 INTRODUCTION . Quantifying the uncertainty of Neural Networks ’ ( NNs ) predictions is important in safety-critical applications such as medical-diagnosis ( Begoli et al. , 2019 ) and self-driving vehicles ( McAllister et al. , 2017 ; Michelmore et al. , 2018 ) . Architectures for classification tasks produce a probability distribution as their output , constructed by applying the softmax to the point-estimate output of the penultimate layer . However , it has been shown that this distribution is overconfident ( Nguyen et al. , 2015 ; Hein et al. , 2019 ) and thus can not be used for predictive uncertainty quantification . Approximate Bayesian methods provide quantified uncertainty over the network ’ s parameters and thus the outputs in a tractable fashion . The commonly used Gaussian approximate posterior ( MacKay , 1992a ; Graves , 2011 ; Blundell et al. , 2015 ; Ritter et al. , 2018 ) approximately induces a Gaussian distribution over the logits of a NN ( Mackay , 1995 ) . But the associated predictive distribution does not have an analytic form . It is thus generally approximated by Monte Carlo ( MC ) integration requiring multiple samples . Predictions in Bayesian Neural Networks ( BNNs ) are thus generally expensive operations . In this paper , we re-consider an old but largely overlooked idea originally proposed by David JC MacKay ( 1998 ) in a different setting ( arguably the inverse of the Deep Learning setting ) which transforms a Dirichlet distribution into a Gaussian . Dirichlet distributions are generally defined on the simplex . But when its variable is defined on the inverse softmax ’ s domain , its shape effectively approximates a Gaussian . The inverse of this approximation , which will be called the Laplace Bridge here ( Hennig et al. , 2012 ) , analytically maps a Gaussian distribution onto a Dirichlet distribution . Given a Gaussian distribution over the logits of a NN , one can thus efficiently obtain an approximate Dirichlet distribution over the softmax outputs ( Figure 1 ) . Our contributions are : We re-visit MacKay ’ s derivation with particular attention to a symmetry constraint that becomes necessary in our “ inverted ” use of the argument from the Gaussian to the Dirichlet family . We then validate the quality of this approximation both theoretically and empirically , and demonstrate significant speed-up over MC-integration . Finally , we show a use-case , leveraging the analytic properties of Dirichlets to improve the popular top-k metric through uncertainties . Section 2 provides the mathematical derivation . Section 3 discusses the Laplace Bridge in the context of NNs . We compare it to the recent approximations of the predictive distributions of NNs in Section 4 . Experiments are presented in Section 5 . 2 THE LAPLACE BRIDGE . Laplace approximations1 are a popular and light-weight method to approximate a general probability distribution q ( x ) with a Gaussian N ( x|µ , Σ ) when q ( x ) is twice differentiable and the Hessian at the mode is positive definite . It sets µ to a mode of q , and Σ = − ( ∇2 log q ( x ) |µ ) −1 , the inverse Hessian of log q at that mode . This scheme can work well if the true distribution is unimodal and defined on the real vector space . The Dirichlet distribution , which has the density function Dir ( π|α ) : = Γ ( ∑K k=1 αk ) ∏K k=1 Γ ( αk ) K∏ k=1 παk−1k , ( 1 ) is defined on the probability simplex and can be “ multimodal ” in the sense that the distribution diverges in the k-corner of the simplex when αk < 1 . Both issues preclude a Laplace approximation , at least in the naı̈ve form described above . However , MacKay ( 1998 ) noted that both can be fixed , elegantly , by a change of variable ( see Figure 2 ) . Details of the following argument can be found in the supplements . Consider the K-dimensional variable π ∼ Dir ( π|α ) defined as the softmax of z ∈ RK : πk ( z ) : = exp ( zk ) ∑K l=1 exp ( zl ) , ( 2 ) for all k = 1 , . . . , K. We will call z the logit of π . When expressed as a function of z , the density of the Dirichlet in π has to be multiplied by the absolute value of the determinan of the Jacobian det ∂π ∂z = ∏ k πk ( z ) , ( 3 ) thus removing the −1 terms in the exponent : Dirz ( π ( z ) |α ) : = Γ ( ∑K k=1 αk ) ∏K k=1 Γ ( αk ) K∏ k=1 πk ( z ) αk , ( 4 ) This density of z , the Dirichlet distribution in the softmax basis , can now be accurately approximated by a Gaussian through a Laplace approximation , yielding an analytic map from the parameter space α ∈ RK+ to the parameter space of the Gaussian ( µ ∈ RK and symmetric positive definite Σ ∈ 1For clarity : Laplace approximations are also one out of several possible ways to construct a Gaussian approximation to the weight posterior of a NN , by constructing a second-order Taylor approximation of the empirical risk at the trained weights . This is not the way they are used in this section . The Laplace Bridge is agnostic to how the input Gaussian distribution is constructed . It could , e.g. , also be constructed as a variational approximation , or the moments of Monte Carlo samples . See also Section 5 . RK×K ) , given by µk = logαk − 1 K K∑ l=1 logαl , ( 5 ) Σk ` = δk ` 1 αk − 1 K [ 1 αk + 1 α ` − 1 K K∑ u=1 1 αu ] . ( 6 ) The corresponding derivations require care because the Gaussian parameter space is evidently larger than that of the Dirichlet and not fully identified by the transformation . A pseudo-inverse of this map was provided by Hennig et al . ( 2012 ) . It maps the Gaussian parameters to those of the Dirichlet as αk = 1 Σkk ( 1− 2 K + eµk K2 K∑ l=1 e−µl ) ( 7 ) ( this equation ignores off-diagonal elements of Σ , more discussion below ) . Together , Eqs . 5 , 6 and 7 will here be used for Bayesian Deep Learning , and jointly called the Laplace Bridge . A full derivation of the Laplace Bridge can be found in B and C. Even though the Laplace Bridge implies a reduction of the expressiveness of the distribution , we show in Section 3 that this map is still sufficiently accurate . Figure 1 shows the quality of the resulting approximation . We consider multiple different µ , Σ in three dimensions . We exhaustively sample from the Gaussian and apply the softmax . The resulting histogram is compared to the PDF of the corresponding Dirichlet . The first part of the figure emphasizes that a point estimate is insufficient . Since the mean for the Dirichlet is the normalized parameter vector α , the parameters ( α1 = [ 2 , 2 , 6 ] > and α2 = [ 11 , 11 , 51 ] > ) yield the same point estimate even though their distributions are clearly different . The second part shows how the Laplace Bridge maps w.r.t decreasing uncertainty . 3 THE LAPLACE BRIDGE FOR BNNS . Let fθ : RN → RK be an L-layer Neural Network parametrized by θ ∈ RP , with a Gaussian approximate posterior N ( θ|µθ , Σθ ) . For any input x ∈ RN , one way to obtain an approximate Gaussian distribution on the pre-softmax output ( logit vector ) fθ ( x ) = : z is as q ( z|x ) ≈ N ( z|fmµθ ( x ) , J ( x ) > ΣθJ ( x ) ) , ( 8 ) where J ( x ) is the P × K Jacobian matrix representing the derivative ∂z∂θ ( Mackay , 1995 ) . This is a linearized approximation of the network which doesn ’ t account for non-linearities and is often computationally infeasible . For the experiments with larger networks we therefore use a last-layer Laplace approximation of the network as successfully used , e.g . by Snoek et al . ( 2015 ) ; Wilson et al . ( 2016 ) ; Brosse et al . ( 2020 ) ; Kristiadi et al . ( 2020 ) . It is given by q ( z|x ) ≈ N ( z|µW ( l ) φ ( x ) , φ ( x ) TΣW ( l ) φ ( x ) ) , ( 9 ) where φ ( x ) denotes the output of a forward pass through the first L−1 layers , µW ( l ) is the maximum likelihood estimate for the weights of the last layer , and ΣW ( l ) is the inverse of the negative Hessian w.r.t . the loss ΣW ( l ) = − { ∂ 2L ∂2W ( l ) } −1 . Approximating the density of the softmax of this Gaussian random variable as a Dirichlet , using the Laplace Bridge , analytically approximates the predictive distribution in a single step , as opposed to many samples . From Eq . ( 7 ) , this requires O ( K ) computations to construct the K parameters αk of the Dirichlet . In contrast , MC-integration has computational costs of O ( MJ ) , where M is the number of samples and J is the cost of sampling from q ( z|x ) ( typically J is of order K2 after an initial O ( K3 ) operation for a matrix decomposition of the covariance ) . The Monte Carlo approximation has the usual sampling error of O ( 1/ √ M ) , while the Laplace Bridge has a fixed but small error ( empirical comparison in Section 5.2 ) . We now discuss several qualitative properties of the Laplace Bridge relevant for the uncertainty quantification use case in Deep Learning . For output classes of “ comparably high ” probability , as defined below , the variance Var ( πk|α ) under the Laplace Bridge increases with the variance of the underlying Gaussian . In this sense , the Laplace Bridge approximates the uncertainty information encoded in the output of a BNN . Proposition 1 ( proof in supplements ) . Let Dir ( π|α ) be obtained via the Laplace Bridge from a Gaussian O N ( z|µ , Σ ) over RK . Then , for each k = 1 , . . . , K , letting α6=k : = ∑ l 6=k αl , if αk > 1 4 ( √ 9α26=k + 10α 6=k + 1− α6=k − 1 ) , then the variance Var ( πk|α ) of the k-th component of π is increasing in Σkk . Intuitively , this result describes the condition that needs to be fulfilled such that the variance of the resulting Dirichlet scales with the variance of the k-th component of the Gaussian . It can be seen as a proxy for a high-quality approximation . An empirical evaluation showing that this condition is fulfilled in most cases can be found in the supplements . Further benefits of this approximation arise from the convenient analytical properties of the Dirichlet exponential family . For example , a point estimate of the posterior predictive distribution is directly given by the Dirichlet ’ s mean , Eπ = ( α1∑K l=1 αl , . . . , αK∑K l=1 αl ) > , ( 10 ) Additionally , Dirichlets have Dirichlet marginals : If p ( π ) = Dir ( π|α ) , then p π1 , π2 , . . . , πj , ∑ k > j πk > = Dir α1 , α2 , . . . , αj , ∑ k > j αk . ( 11 ) An additional benefit of the Laplace Bridge for BNNs is that it is more flexible than an MC-integral . If we let p ( π ) be the distribution over π : = softmax ( z ) : = [ ez1/ ∑ l e zl , . . . , ezK/ ∑ l e zl ] > , then the MC-integral can be seen as a “ point-estimate ” of this distribution since it approximates Eπ . In contrast , the Dirichlet distribution Dir ( π|α ) approximates the distribution p ( π ) . Thus , the Laplace Bridge enables tasks that can be done only with a distribution but not a point estimate . For instance , one could ask “ what is the distribution of the first L classes ? ” when one is dealing with K-class ( L < K ) classification . Since the marginal distribution can be computed analytically ( 11 ) , the Laplace Bridge provides a convenient yet cheap way of answering this question . | The authors propose an approach called the Laplace Bridge to approximate predictive uncertainty in Bayesian neural networks. The approach is essentially based on first a change of variable, followed by a Laplace approximation. They provided a theoretical result for this approach, which essentially shows that for \alpha_k large enough, the variance of \pi_k given \alpha is increasing with the variance \Sigma_kk. They performed some experiments to essentially show the computational speedup of Laplace Bridge against more cumbersome MC based competitors. | SP:1f5df656d73634346199738039c56f47b211d8c5 |
Fast Predictive Uncertainty for Classification with Bayesian Deep Networks | In Bayesian Deep Learning , distributions over the output of classification neural networks are approximated by first constructing a Gaussian distribution over the weights , then sampling from it to receive a distribution over the categorical output distribution . This is costly . We extend existing work to construct a Dirichlet approximation of this output distribution , yielding an analytic map between Gaussian distributions in logit space and Dirichlet distributions in the output space . We argue that the resulting Dirichlet distribution has theoretical and practical advantages , in particular more efficient computation of the uncertainty estimate , scaling to large datasets and networks like ImageNet and DenseNet . We demonstrate the use of this Dirichlet approximation by using it to construct a lightweight uncertainty-aware output ranking for the ImageNet setup . 1 INTRODUCTION . Quantifying the uncertainty of Neural Networks ’ ( NNs ) predictions is important in safety-critical applications such as medical-diagnosis ( Begoli et al. , 2019 ) and self-driving vehicles ( McAllister et al. , 2017 ; Michelmore et al. , 2018 ) . Architectures for classification tasks produce a probability distribution as their output , constructed by applying the softmax to the point-estimate output of the penultimate layer . However , it has been shown that this distribution is overconfident ( Nguyen et al. , 2015 ; Hein et al. , 2019 ) and thus can not be used for predictive uncertainty quantification . Approximate Bayesian methods provide quantified uncertainty over the network ’ s parameters and thus the outputs in a tractable fashion . The commonly used Gaussian approximate posterior ( MacKay , 1992a ; Graves , 2011 ; Blundell et al. , 2015 ; Ritter et al. , 2018 ) approximately induces a Gaussian distribution over the logits of a NN ( Mackay , 1995 ) . But the associated predictive distribution does not have an analytic form . It is thus generally approximated by Monte Carlo ( MC ) integration requiring multiple samples . Predictions in Bayesian Neural Networks ( BNNs ) are thus generally expensive operations . In this paper , we re-consider an old but largely overlooked idea originally proposed by David JC MacKay ( 1998 ) in a different setting ( arguably the inverse of the Deep Learning setting ) which transforms a Dirichlet distribution into a Gaussian . Dirichlet distributions are generally defined on the simplex . But when its variable is defined on the inverse softmax ’ s domain , its shape effectively approximates a Gaussian . The inverse of this approximation , which will be called the Laplace Bridge here ( Hennig et al. , 2012 ) , analytically maps a Gaussian distribution onto a Dirichlet distribution . Given a Gaussian distribution over the logits of a NN , one can thus efficiently obtain an approximate Dirichlet distribution over the softmax outputs ( Figure 1 ) . Our contributions are : We re-visit MacKay ’ s derivation with particular attention to a symmetry constraint that becomes necessary in our “ inverted ” use of the argument from the Gaussian to the Dirichlet family . We then validate the quality of this approximation both theoretically and empirically , and demonstrate significant speed-up over MC-integration . Finally , we show a use-case , leveraging the analytic properties of Dirichlets to improve the popular top-k metric through uncertainties . Section 2 provides the mathematical derivation . Section 3 discusses the Laplace Bridge in the context of NNs . We compare it to the recent approximations of the predictive distributions of NNs in Section 4 . Experiments are presented in Section 5 . 2 THE LAPLACE BRIDGE . Laplace approximations1 are a popular and light-weight method to approximate a general probability distribution q ( x ) with a Gaussian N ( x|µ , Σ ) when q ( x ) is twice differentiable and the Hessian at the mode is positive definite . It sets µ to a mode of q , and Σ = − ( ∇2 log q ( x ) |µ ) −1 , the inverse Hessian of log q at that mode . This scheme can work well if the true distribution is unimodal and defined on the real vector space . The Dirichlet distribution , which has the density function Dir ( π|α ) : = Γ ( ∑K k=1 αk ) ∏K k=1 Γ ( αk ) K∏ k=1 παk−1k , ( 1 ) is defined on the probability simplex and can be “ multimodal ” in the sense that the distribution diverges in the k-corner of the simplex when αk < 1 . Both issues preclude a Laplace approximation , at least in the naı̈ve form described above . However , MacKay ( 1998 ) noted that both can be fixed , elegantly , by a change of variable ( see Figure 2 ) . Details of the following argument can be found in the supplements . Consider the K-dimensional variable π ∼ Dir ( π|α ) defined as the softmax of z ∈ RK : πk ( z ) : = exp ( zk ) ∑K l=1 exp ( zl ) , ( 2 ) for all k = 1 , . . . , K. We will call z the logit of π . When expressed as a function of z , the density of the Dirichlet in π has to be multiplied by the absolute value of the determinan of the Jacobian det ∂π ∂z = ∏ k πk ( z ) , ( 3 ) thus removing the −1 terms in the exponent : Dirz ( π ( z ) |α ) : = Γ ( ∑K k=1 αk ) ∏K k=1 Γ ( αk ) K∏ k=1 πk ( z ) αk , ( 4 ) This density of z , the Dirichlet distribution in the softmax basis , can now be accurately approximated by a Gaussian through a Laplace approximation , yielding an analytic map from the parameter space α ∈ RK+ to the parameter space of the Gaussian ( µ ∈ RK and symmetric positive definite Σ ∈ 1For clarity : Laplace approximations are also one out of several possible ways to construct a Gaussian approximation to the weight posterior of a NN , by constructing a second-order Taylor approximation of the empirical risk at the trained weights . This is not the way they are used in this section . The Laplace Bridge is agnostic to how the input Gaussian distribution is constructed . It could , e.g. , also be constructed as a variational approximation , or the moments of Monte Carlo samples . See also Section 5 . RK×K ) , given by µk = logαk − 1 K K∑ l=1 logαl , ( 5 ) Σk ` = δk ` 1 αk − 1 K [ 1 αk + 1 α ` − 1 K K∑ u=1 1 αu ] . ( 6 ) The corresponding derivations require care because the Gaussian parameter space is evidently larger than that of the Dirichlet and not fully identified by the transformation . A pseudo-inverse of this map was provided by Hennig et al . ( 2012 ) . It maps the Gaussian parameters to those of the Dirichlet as αk = 1 Σkk ( 1− 2 K + eµk K2 K∑ l=1 e−µl ) ( 7 ) ( this equation ignores off-diagonal elements of Σ , more discussion below ) . Together , Eqs . 5 , 6 and 7 will here be used for Bayesian Deep Learning , and jointly called the Laplace Bridge . A full derivation of the Laplace Bridge can be found in B and C. Even though the Laplace Bridge implies a reduction of the expressiveness of the distribution , we show in Section 3 that this map is still sufficiently accurate . Figure 1 shows the quality of the resulting approximation . We consider multiple different µ , Σ in three dimensions . We exhaustively sample from the Gaussian and apply the softmax . The resulting histogram is compared to the PDF of the corresponding Dirichlet . The first part of the figure emphasizes that a point estimate is insufficient . Since the mean for the Dirichlet is the normalized parameter vector α , the parameters ( α1 = [ 2 , 2 , 6 ] > and α2 = [ 11 , 11 , 51 ] > ) yield the same point estimate even though their distributions are clearly different . The second part shows how the Laplace Bridge maps w.r.t decreasing uncertainty . 3 THE LAPLACE BRIDGE FOR BNNS . Let fθ : RN → RK be an L-layer Neural Network parametrized by θ ∈ RP , with a Gaussian approximate posterior N ( θ|µθ , Σθ ) . For any input x ∈ RN , one way to obtain an approximate Gaussian distribution on the pre-softmax output ( logit vector ) fθ ( x ) = : z is as q ( z|x ) ≈ N ( z|fmµθ ( x ) , J ( x ) > ΣθJ ( x ) ) , ( 8 ) where J ( x ) is the P × K Jacobian matrix representing the derivative ∂z∂θ ( Mackay , 1995 ) . This is a linearized approximation of the network which doesn ’ t account for non-linearities and is often computationally infeasible . For the experiments with larger networks we therefore use a last-layer Laplace approximation of the network as successfully used , e.g . by Snoek et al . ( 2015 ) ; Wilson et al . ( 2016 ) ; Brosse et al . ( 2020 ) ; Kristiadi et al . ( 2020 ) . It is given by q ( z|x ) ≈ N ( z|µW ( l ) φ ( x ) , φ ( x ) TΣW ( l ) φ ( x ) ) , ( 9 ) where φ ( x ) denotes the output of a forward pass through the first L−1 layers , µW ( l ) is the maximum likelihood estimate for the weights of the last layer , and ΣW ( l ) is the inverse of the negative Hessian w.r.t . the loss ΣW ( l ) = − { ∂ 2L ∂2W ( l ) } −1 . Approximating the density of the softmax of this Gaussian random variable as a Dirichlet , using the Laplace Bridge , analytically approximates the predictive distribution in a single step , as opposed to many samples . From Eq . ( 7 ) , this requires O ( K ) computations to construct the K parameters αk of the Dirichlet . In contrast , MC-integration has computational costs of O ( MJ ) , where M is the number of samples and J is the cost of sampling from q ( z|x ) ( typically J is of order K2 after an initial O ( K3 ) operation for a matrix decomposition of the covariance ) . The Monte Carlo approximation has the usual sampling error of O ( 1/ √ M ) , while the Laplace Bridge has a fixed but small error ( empirical comparison in Section 5.2 ) . We now discuss several qualitative properties of the Laplace Bridge relevant for the uncertainty quantification use case in Deep Learning . For output classes of “ comparably high ” probability , as defined below , the variance Var ( πk|α ) under the Laplace Bridge increases with the variance of the underlying Gaussian . In this sense , the Laplace Bridge approximates the uncertainty information encoded in the output of a BNN . Proposition 1 ( proof in supplements ) . Let Dir ( π|α ) be obtained via the Laplace Bridge from a Gaussian O N ( z|µ , Σ ) over RK . Then , for each k = 1 , . . . , K , letting α6=k : = ∑ l 6=k αl , if αk > 1 4 ( √ 9α26=k + 10α 6=k + 1− α6=k − 1 ) , then the variance Var ( πk|α ) of the k-th component of π is increasing in Σkk . Intuitively , this result describes the condition that needs to be fulfilled such that the variance of the resulting Dirichlet scales with the variance of the k-th component of the Gaussian . It can be seen as a proxy for a high-quality approximation . An empirical evaluation showing that this condition is fulfilled in most cases can be found in the supplements . Further benefits of this approximation arise from the convenient analytical properties of the Dirichlet exponential family . For example , a point estimate of the posterior predictive distribution is directly given by the Dirichlet ’ s mean , Eπ = ( α1∑K l=1 αl , . . . , αK∑K l=1 αl ) > , ( 10 ) Additionally , Dirichlets have Dirichlet marginals : If p ( π ) = Dir ( π|α ) , then p π1 , π2 , . . . , πj , ∑ k > j πk > = Dir α1 , α2 , . . . , αj , ∑ k > j αk . ( 11 ) An additional benefit of the Laplace Bridge for BNNs is that it is more flexible than an MC-integral . If we let p ( π ) be the distribution over π : = softmax ( z ) : = [ ez1/ ∑ l e zl , . . . , ezK/ ∑ l e zl ] > , then the MC-integral can be seen as a “ point-estimate ” of this distribution since it approximates Eπ . In contrast , the Dirichlet distribution Dir ( π|α ) approximates the distribution p ( π ) . Thus , the Laplace Bridge enables tasks that can be done only with a distribution but not a point estimate . For instance , one could ask “ what is the distribution of the first L classes ? ” when one is dealing with K-class ( L < K ) classification . Since the marginal distribution can be computed analytically ( 11 ) , the Laplace Bridge provides a convenient yet cheap way of answering this question . | This article improves the efficiency of Bayesian neural networks (BNNs). It follows the sampling-free solutions within Bayesian deep learning (Wu et al., 2018; Haussmann et al., 2019, etc.). The difference is the proposed Laplace Bridge that approximates the full distribution over the softmax outputs of a neural network. The Laplace Bridge tackles the problem of approximating the distribution over the softmax outputs of the ubiquitous Gaussian-approximated BNNs without any additional training procedure. This allows the Laplace Bridge to be used with pre-trained networks and emphasizes its non-invasive nature. | SP:1f5df656d73634346199738039c56f47b211d8c5 |
A new accelerated gradient method inspired by continuous-time perspective | 1 Introduction . Optimization is a core component of statistic and machine learning problems . Recently , gradientbased algorithms are widely used in such optimization problems due to its simplicity and efficiency for large-scale situations . For solving convex optimization problem min x∈Rd F ( x ) , where F ( x ) is convex and sufficiently smooth , a classical first-order method is gradient descent . We assume that f ( x ) = ∇F ( x ) satisfies L-Lipschitz condition , that is , there exists constant L such that ∥f ( x ) − f ( y ) ∥ ≤ L∥x− y∥ , ∀x , y . Under these conditions , gradient descent achieves a convergence rate of O ( n−1 ) , i.e. , ∥F ( xn ) − F ( x∗ ) ∥ decreases to zero at a rate of O ( n−1 ) , where xn denotes the nth iteration and x∗ denotes the minimum point of F ( x ) in Rd . Nesterov ’ s accelerated method ( Nesterov , 1983 ) is a more efficient first-order algorithm than gradient descent , of which we will use the following form : starting with x0 = x1 , yn = xn + n− 3 n ( xn − xn−1 ) , xn+1 = yn − sf ( yn ) ( 1.1 ) for n ≥ 1 . It is shown that under abovementioned conditions , Nesterov ’ s accelerated method converges at a rate of O ( n−2 ) . Accelerated gradient method has been successful in training deep and recurrent neural networks ( Sutskever et al. , 2013 ) and is widely used in problems with machine learning background to avoid sophisticated second-order methods ( Cotter et al. , 2011 ; Hu et al. , 2009 ; Ji & Ye , 2009 ) . To provide more theorical understanding , an important research topic of Nesterov ’ s accelerated method is to find an explanation of the acceleration . On this topic , Nesterov ’ s method was studied via a continuous-time perspective ( Su et al. , 2014 ) . They considered a curve x ( t ) , introduced the ansatz xn ≈ x ( n √ s ) and substituted it to ( 1.1 ) . Letting s → 0 , they obtained the following differential equation . ẍ+ 3 t ẋ+ f ( x ) = 0 . ( 1.2 ) The differential equation was used as a tool for analyzing and generalizing Nesterov ’ s scheme . Furthermore , this idea has been studied from different directions . A class of accelerated methods have been generated in continuous-time ( Wibisono et al. , 2016 ) . ODE ( 1.2 ) can also be discretized directly using Runge-Kutta method to achieve acceleration ( Zhang et al. , 2018 ) . Although many results have been achieved , the process of obtaining the differential equation ( 1.2 ) has not been rigorous , and the method is still time-consuming for large-scale problems . In this work , we give the precise order of the iterations of Nesterov ’ s accelerated method converging to solution of the differential equation ( 1.2 ) with initial conditions x ( 0 ) = x0 , ẋ ( 0 ) = 0 ( 1.3 ) as step size s goes to zero . Inspired from this perspective , we present a new accelerated method to make this convergence faster . As we expected , iterations of the new method are closer to the solution x ( t ) of differential equation ( 1.2 ) than original Nesterov ’ s method . Moreover , we find the new method is more stable than original Nesterov ’ s method when step size is large . Based on abovementioned observations , we try to take advantage of the new method in more practical problems . We apply the new method to matrix completion problem . We combine the new method with proximal operator ( Parikh & Boyd , 2014 ) into a new algorithm , which we call modified FISTA . We find that the new method performs better than FISTA ( Beck & Teboulle , 2009 ) and acclerated proximal gradient method ( Parikh & Boyd , 2014 ) because it can work with larger step sizes . This paper is organized as follows . In section 2 , we prove that iterations of Nesterov ’ s accelerated method converge to solution of the differential equation ( 1.2 ) . In section 3 , we present a new method to make the convergence faster and show its better stablity through two simple examples . In section 4 , we apply the new method to matrix completion problem . 2 A strict analysis of the relation between Nesterov ’ s method and its continuous-time limit . We refer to x ( t ) as the solution of differential equation ( 1.2 ) with initial conditions ( 1.3 ) . Existance and uniqueness of such solutions have been proved ( Su et al. , 2014 ) . In this section , We give the order of the iterations of Nesterov ’ s accelerated method converging to x ( t ) as step sizes go to zero . For convenience , we substitute the first equation in Nesterov ’ s method ( 1.1 ) to the second one to get xn+1 = xn + n− 3 n ( xn − xn−1 ) − s · f ( xn + n− 3 n ( xn − xn−1 ) ) . We write s = h2 and rewrite the above recurrence relation as xn+1 = xn + n− 3 n ( xn − xn−1 ) − h2 · f ( xn + n− 3 n ( xn − xn−1 ) ) . ( 2.1 ) Inspired by the ansatz xn ≈ x ( n √ s ) ( Su et al. , 2014 ) , we consider the convergence between xn and x ( nh ) . More precisely , we show that for fixed time t , xn converges to x ( t ) as h goes to zero , where n = th . 2.1 Truncation error Firstly , we consider the following ‘ truncation error ’ : L [ x ( t ) ; h ] =x ( t+ h ) − 2t− 3h t x ( t ) + t− 3h t x ( t− h ) + h2f ( x ( t ) + t− 3h t ( x ( t ) − x ( t− h ) ) ) . ( 2.2 ) ( 2.2 ) is obtained from ( 2.1 ) by replacing xn+1 , xn , xn−1 with x ( t+h ) , x ( t ) , x ( t−h ) and substituting the relation n = th . Our first result is the order of truncation error L [ x ( t ) ; h ] . Theorem 1 . Assume f satisfies L-Lipschitz condition , and solution x ( t ) of the derived differential equation ( 1.2 ) has a continuous third derivative . For fixed time t , the truncation error ( 2.2 ) satisfies L [ x ( t ) ; h ] = O ( h3 ) . Theorem 1 shows the size of error caused by a single iteration when the starting point is just on x ( t ) . Then we have to add up these errors to prove the convergence proporty we need . 2.2 Convergence theorem We now come to the convergence theorem . In this theorem , we give the precise order of the iterations of Nesterov ’ s method converging to solution of the derived differential equation . Theorem 2 . Under conditions in Theorem 1 , for fixed time t , xt/h converges to x ( t ) as h goes to zero at a rate of O ( h ln 1h ) if x0 = x ( 0 ) and x1 = x ( h ) . Theorem 2 coincides with derivation of ODE ( 1.2 ) ( Su et al. , 2014 ) . 3 New accelerated method . 3.1 Derivation of the new method and analysis of truncation error Inspired from the continuous-time perspective and our proof of the convergence from iterations of Nesterov ’ s method to its continuous-time limit , we present a new method to make this convergence faster . Precisely , the new method has a higher truncation order . We need one more step in our scheme than in Nesterov ’ s method to achieve higher truncation order in the following analysis , so we consider a recurrence relation with form 4∑ i=1 ( αi + βi n + γi n2 ) xn+2−i = −sf ( xn + n− 3 n ( xn − xn−1 ) ) , ( 3.1 ) where { αi } , { βi } and { γi } are to be determined . Now we expand x ( t− h ) to first order . Calculation shows that f ( x ( t ) + t− 3h t ( x ( t ) − x ( t− h ) ) ) =− hx ( 3 ) ( t ) − ( 3h t + 1 ) x ( 2 ) ( t ) + ( 3h t2 − 3 t ) x ( 1 ) ( t ) +O ( h2 ) . Substitute this expansion to truncation error L [ x ( t ) ; h ] = 4∑ i=1 ( αi + βih t + γih 2 t2 ) x ( t+ ( 2− i ) h ) + h2f ( x ( t ) + t− 3h t ( x ( t ) − x ( t− h ) ) ) , and choose parameters appropriately to eliminate low-order terms , we get the following recurrence relation xn+1 = 10n2 + 9n+ 6 4n2 + 8n xn − 4n2 + 3 2n2 + 4n xn−1 + 2n− 1 4n+ 8 xn−2 − n 2n+ 4 sf ( 2n− 3 n xn − n− 3 n xn−1 ) . ( 3.2 ) Here we rewrite this scheme as Algorithm 1 . Algorithm 1 The new method ( 3.2 ) Input : step size s Initial value : X2 = X1 = X0 . ( k− 1 ) th iteration ( k ≥ 2 ) . Compute Yk = 10k2 + 9k + 6 4k2 + 8k Xk − 4k2 + 3 2k2 + 4k Xk−1 + 2k − 1 4k + 8 Xk−2 , Zk = 2k − 3 k Xk − k − 3 k Xk−1 , Xk+1 = X − ( Yk − ks 2k + 4 f ( Zk ) ) . For truncation order of this new method , we have the following theorem . The abovementioned procedure is presented in Appendix A.4 detailedly , as proof of Theorem 3 . Theorem 3 . If f has continuous second order derivative , the first and second derivative are bounded , and x ( t ) has continuous fourth derivative , then for fixed t , truncation error of ( 3.2 ) satisfies L [ x ( tn ) ; h ] = O ( h4 ) . The convergence of the new method and x ( t ) can be proved similar to Theorem 2 . 3.2 Advantage of the new method Since the new method has a truncation error of higher order than original Neaterov ’ s method , the iterations of the new method converge to the differential equation ( 1.2 ) when those of original Nesterov ’ s method diverge . In another word , the new method is more stable for large step size . We present two numerical results in Figure 1 to confirm it . Quadratic . F ( x ) = xTAx is a strongly convex function , in which x ∈ R2 and A is a 2× 2 matrix . Linear regression . F ( x ) = n∑ i=1 ( yi −wTi x ) 2 , where n is the number of samples and ( wi , yi ) is the ith sample . In these examples , iterations of the new method converge to the minimum point , while those of original Nesterov ’ s method diverge , which confirms that the new method is more stable for large step size . 3.3 Absolute stability of Nesterov ’ s method and the new method In this subsection , we explain the better stability of the new method with absolute stability theory . Firstly , recall the scheme of our new method xn+1 = 10n2 + 9n+ 6 4n2 + 8n xn − 4n2 + 3 2n2 + 4n xn−1 + 2n− 1 4n+ 8 xn−2 − n 2n+ 4 sf ( 2n− 3 n xn − n− 3 n xn−1 ) . We use linear approximation f ( xn + n− 3 n ( xn − xn−1 ) ) = ∇F ( xn + n− 3 n ( xn − xn−1 ) ) ≈ ∇2F · ( xn + n− 3 n ( xn − xn−1 ) ) , and the characteristic equation of this finite scheme is approximately λ3− ( 10n2 + 9n+ 6 4n2 + 8n − s · ∇2F · 2n 2 − 3n 2n2 + 4n ) λ2+ ( 4n2 + 3 2n2 + 4n − s · ∇2F · n 2 − 3n 2n2 + 4n ) λ− 2n− 1 4n+ 8 = 0 . For large n , we can ignore the high order terms and the characteristic equation becomes λ3 − ( 5 2 − s · ∇2F · ) λ2 + ( 2− s 2 · ∇2F ) λ− 1 2 = 0 . According to the absolute stability theory , the numerical stability of Nesterov ’ s scheme with respect to accumulated roundoff error is equivalent to this : all the roots of the characteristic equation lie in the unit circle ( Leader , 2004 ) . Noticing that the left hand of the equation can be factorized to ( λ− 1 2 ) ( λ2 − ( 2− s · ∇2F ) λ+ 1 ) , the largest modulu of the roots is 1 when 0 ≤ s · ∇2F ≤ 4 , and the absolutely stable region of the new method is s · ∇2F ∈ [ 0 , 4 ] . When s·∇2F lies in the absoletely stable region , the related theory guarantees that the error caused by every iteration will not be magnified as the iteration number increases . To make the analysis more precise , we should consider the difference of the scheme between iterations caused by different n. We define the transfer matrix Pn = ( 10n2+9n+6 4n2+8n − s · ∇ 2F · 2n 2−3n 2n2+4n ) − ( 4n2+3 2n2+4n − s · ∇ 2F · n 2−3n 2n2+4n ) 2n−1 4n+8 1 0 0 0 1 0 and Qn = PnPn−1 · · ·P1 . Error analysis shows that if the largest modulu of eigenvalues of Qn goes to zero , then error caused by iterations will be eliminated as the iteration number increases . Figure 2 presents the largest module of eigenvalues of Qn for different values of s · ∇2F . From the experiment we can see that the above condition is satisfied . We then apply the same method to Nesterov ’ s method discussed in ( Su et al. , 2014 ) and conclude that the absolutely stable region of Nesterov ’ s method is [ 0 , 43 ] . According to the above analysis , the absolutely stable region of the new method is four times as large as Nesterov ’ s method , so the new method is more stable , and we can choose larger step sizes to achieve faster convergence . | This paper proposes an accelerated method that has a high-order truncation error $O(h^4)$ to the ordinary differential equation $\ddot{x} + \frac{3}{t}\dot{x} + f(x) = 0$ obtained from Nesterov's accelerated method by (Su et al., 2014), while Nesterov's method has $O(h^3)$ error. This implies that the iterates of the proposed method converge to the trajectory of the differential equation faster than those of Nesterov's method. The two toy numerical experiments illustrate such phenomenon for certain large step size. A matrix completion problem experiment is further included. | SP:38070da400d31759e1d0d9e30eefb5b7f9f4d640 |
A new accelerated gradient method inspired by continuous-time perspective | 1 Introduction . Optimization is a core component of statistic and machine learning problems . Recently , gradientbased algorithms are widely used in such optimization problems due to its simplicity and efficiency for large-scale situations . For solving convex optimization problem min x∈Rd F ( x ) , where F ( x ) is convex and sufficiently smooth , a classical first-order method is gradient descent . We assume that f ( x ) = ∇F ( x ) satisfies L-Lipschitz condition , that is , there exists constant L such that ∥f ( x ) − f ( y ) ∥ ≤ L∥x− y∥ , ∀x , y . Under these conditions , gradient descent achieves a convergence rate of O ( n−1 ) , i.e. , ∥F ( xn ) − F ( x∗ ) ∥ decreases to zero at a rate of O ( n−1 ) , where xn denotes the nth iteration and x∗ denotes the minimum point of F ( x ) in Rd . Nesterov ’ s accelerated method ( Nesterov , 1983 ) is a more efficient first-order algorithm than gradient descent , of which we will use the following form : starting with x0 = x1 , yn = xn + n− 3 n ( xn − xn−1 ) , xn+1 = yn − sf ( yn ) ( 1.1 ) for n ≥ 1 . It is shown that under abovementioned conditions , Nesterov ’ s accelerated method converges at a rate of O ( n−2 ) . Accelerated gradient method has been successful in training deep and recurrent neural networks ( Sutskever et al. , 2013 ) and is widely used in problems with machine learning background to avoid sophisticated second-order methods ( Cotter et al. , 2011 ; Hu et al. , 2009 ; Ji & Ye , 2009 ) . To provide more theorical understanding , an important research topic of Nesterov ’ s accelerated method is to find an explanation of the acceleration . On this topic , Nesterov ’ s method was studied via a continuous-time perspective ( Su et al. , 2014 ) . They considered a curve x ( t ) , introduced the ansatz xn ≈ x ( n √ s ) and substituted it to ( 1.1 ) . Letting s → 0 , they obtained the following differential equation . ẍ+ 3 t ẋ+ f ( x ) = 0 . ( 1.2 ) The differential equation was used as a tool for analyzing and generalizing Nesterov ’ s scheme . Furthermore , this idea has been studied from different directions . A class of accelerated methods have been generated in continuous-time ( Wibisono et al. , 2016 ) . ODE ( 1.2 ) can also be discretized directly using Runge-Kutta method to achieve acceleration ( Zhang et al. , 2018 ) . Although many results have been achieved , the process of obtaining the differential equation ( 1.2 ) has not been rigorous , and the method is still time-consuming for large-scale problems . In this work , we give the precise order of the iterations of Nesterov ’ s accelerated method converging to solution of the differential equation ( 1.2 ) with initial conditions x ( 0 ) = x0 , ẋ ( 0 ) = 0 ( 1.3 ) as step size s goes to zero . Inspired from this perspective , we present a new accelerated method to make this convergence faster . As we expected , iterations of the new method are closer to the solution x ( t ) of differential equation ( 1.2 ) than original Nesterov ’ s method . Moreover , we find the new method is more stable than original Nesterov ’ s method when step size is large . Based on abovementioned observations , we try to take advantage of the new method in more practical problems . We apply the new method to matrix completion problem . We combine the new method with proximal operator ( Parikh & Boyd , 2014 ) into a new algorithm , which we call modified FISTA . We find that the new method performs better than FISTA ( Beck & Teboulle , 2009 ) and acclerated proximal gradient method ( Parikh & Boyd , 2014 ) because it can work with larger step sizes . This paper is organized as follows . In section 2 , we prove that iterations of Nesterov ’ s accelerated method converge to solution of the differential equation ( 1.2 ) . In section 3 , we present a new method to make the convergence faster and show its better stablity through two simple examples . In section 4 , we apply the new method to matrix completion problem . 2 A strict analysis of the relation between Nesterov ’ s method and its continuous-time limit . We refer to x ( t ) as the solution of differential equation ( 1.2 ) with initial conditions ( 1.3 ) . Existance and uniqueness of such solutions have been proved ( Su et al. , 2014 ) . In this section , We give the order of the iterations of Nesterov ’ s accelerated method converging to x ( t ) as step sizes go to zero . For convenience , we substitute the first equation in Nesterov ’ s method ( 1.1 ) to the second one to get xn+1 = xn + n− 3 n ( xn − xn−1 ) − s · f ( xn + n− 3 n ( xn − xn−1 ) ) . We write s = h2 and rewrite the above recurrence relation as xn+1 = xn + n− 3 n ( xn − xn−1 ) − h2 · f ( xn + n− 3 n ( xn − xn−1 ) ) . ( 2.1 ) Inspired by the ansatz xn ≈ x ( n √ s ) ( Su et al. , 2014 ) , we consider the convergence between xn and x ( nh ) . More precisely , we show that for fixed time t , xn converges to x ( t ) as h goes to zero , where n = th . 2.1 Truncation error Firstly , we consider the following ‘ truncation error ’ : L [ x ( t ) ; h ] =x ( t+ h ) − 2t− 3h t x ( t ) + t− 3h t x ( t− h ) + h2f ( x ( t ) + t− 3h t ( x ( t ) − x ( t− h ) ) ) . ( 2.2 ) ( 2.2 ) is obtained from ( 2.1 ) by replacing xn+1 , xn , xn−1 with x ( t+h ) , x ( t ) , x ( t−h ) and substituting the relation n = th . Our first result is the order of truncation error L [ x ( t ) ; h ] . Theorem 1 . Assume f satisfies L-Lipschitz condition , and solution x ( t ) of the derived differential equation ( 1.2 ) has a continuous third derivative . For fixed time t , the truncation error ( 2.2 ) satisfies L [ x ( t ) ; h ] = O ( h3 ) . Theorem 1 shows the size of error caused by a single iteration when the starting point is just on x ( t ) . Then we have to add up these errors to prove the convergence proporty we need . 2.2 Convergence theorem We now come to the convergence theorem . In this theorem , we give the precise order of the iterations of Nesterov ’ s method converging to solution of the derived differential equation . Theorem 2 . Under conditions in Theorem 1 , for fixed time t , xt/h converges to x ( t ) as h goes to zero at a rate of O ( h ln 1h ) if x0 = x ( 0 ) and x1 = x ( h ) . Theorem 2 coincides with derivation of ODE ( 1.2 ) ( Su et al. , 2014 ) . 3 New accelerated method . 3.1 Derivation of the new method and analysis of truncation error Inspired from the continuous-time perspective and our proof of the convergence from iterations of Nesterov ’ s method to its continuous-time limit , we present a new method to make this convergence faster . Precisely , the new method has a higher truncation order . We need one more step in our scheme than in Nesterov ’ s method to achieve higher truncation order in the following analysis , so we consider a recurrence relation with form 4∑ i=1 ( αi + βi n + γi n2 ) xn+2−i = −sf ( xn + n− 3 n ( xn − xn−1 ) ) , ( 3.1 ) where { αi } , { βi } and { γi } are to be determined . Now we expand x ( t− h ) to first order . Calculation shows that f ( x ( t ) + t− 3h t ( x ( t ) − x ( t− h ) ) ) =− hx ( 3 ) ( t ) − ( 3h t + 1 ) x ( 2 ) ( t ) + ( 3h t2 − 3 t ) x ( 1 ) ( t ) +O ( h2 ) . Substitute this expansion to truncation error L [ x ( t ) ; h ] = 4∑ i=1 ( αi + βih t + γih 2 t2 ) x ( t+ ( 2− i ) h ) + h2f ( x ( t ) + t− 3h t ( x ( t ) − x ( t− h ) ) ) , and choose parameters appropriately to eliminate low-order terms , we get the following recurrence relation xn+1 = 10n2 + 9n+ 6 4n2 + 8n xn − 4n2 + 3 2n2 + 4n xn−1 + 2n− 1 4n+ 8 xn−2 − n 2n+ 4 sf ( 2n− 3 n xn − n− 3 n xn−1 ) . ( 3.2 ) Here we rewrite this scheme as Algorithm 1 . Algorithm 1 The new method ( 3.2 ) Input : step size s Initial value : X2 = X1 = X0 . ( k− 1 ) th iteration ( k ≥ 2 ) . Compute Yk = 10k2 + 9k + 6 4k2 + 8k Xk − 4k2 + 3 2k2 + 4k Xk−1 + 2k − 1 4k + 8 Xk−2 , Zk = 2k − 3 k Xk − k − 3 k Xk−1 , Xk+1 = X − ( Yk − ks 2k + 4 f ( Zk ) ) . For truncation order of this new method , we have the following theorem . The abovementioned procedure is presented in Appendix A.4 detailedly , as proof of Theorem 3 . Theorem 3 . If f has continuous second order derivative , the first and second derivative are bounded , and x ( t ) has continuous fourth derivative , then for fixed t , truncation error of ( 3.2 ) satisfies L [ x ( tn ) ; h ] = O ( h4 ) . The convergence of the new method and x ( t ) can be proved similar to Theorem 2 . 3.2 Advantage of the new method Since the new method has a truncation error of higher order than original Neaterov ’ s method , the iterations of the new method converge to the differential equation ( 1.2 ) when those of original Nesterov ’ s method diverge . In another word , the new method is more stable for large step size . We present two numerical results in Figure 1 to confirm it . Quadratic . F ( x ) = xTAx is a strongly convex function , in which x ∈ R2 and A is a 2× 2 matrix . Linear regression . F ( x ) = n∑ i=1 ( yi −wTi x ) 2 , where n is the number of samples and ( wi , yi ) is the ith sample . In these examples , iterations of the new method converge to the minimum point , while those of original Nesterov ’ s method diverge , which confirms that the new method is more stable for large step size . 3.3 Absolute stability of Nesterov ’ s method and the new method In this subsection , we explain the better stability of the new method with absolute stability theory . Firstly , recall the scheme of our new method xn+1 = 10n2 + 9n+ 6 4n2 + 8n xn − 4n2 + 3 2n2 + 4n xn−1 + 2n− 1 4n+ 8 xn−2 − n 2n+ 4 sf ( 2n− 3 n xn − n− 3 n xn−1 ) . We use linear approximation f ( xn + n− 3 n ( xn − xn−1 ) ) = ∇F ( xn + n− 3 n ( xn − xn−1 ) ) ≈ ∇2F · ( xn + n− 3 n ( xn − xn−1 ) ) , and the characteristic equation of this finite scheme is approximately λ3− ( 10n2 + 9n+ 6 4n2 + 8n − s · ∇2F · 2n 2 − 3n 2n2 + 4n ) λ2+ ( 4n2 + 3 2n2 + 4n − s · ∇2F · n 2 − 3n 2n2 + 4n ) λ− 2n− 1 4n+ 8 = 0 . For large n , we can ignore the high order terms and the characteristic equation becomes λ3 − ( 5 2 − s · ∇2F · ) λ2 + ( 2− s 2 · ∇2F ) λ− 1 2 = 0 . According to the absolute stability theory , the numerical stability of Nesterov ’ s scheme with respect to accumulated roundoff error is equivalent to this : all the roots of the characteristic equation lie in the unit circle ( Leader , 2004 ) . Noticing that the left hand of the equation can be factorized to ( λ− 1 2 ) ( λ2 − ( 2− s · ∇2F ) λ+ 1 ) , the largest modulu of the roots is 1 when 0 ≤ s · ∇2F ≤ 4 , and the absolutely stable region of the new method is s · ∇2F ∈ [ 0 , 4 ] . When s·∇2F lies in the absoletely stable region , the related theory guarantees that the error caused by every iteration will not be magnified as the iteration number increases . To make the analysis more precise , we should consider the difference of the scheme between iterations caused by different n. We define the transfer matrix Pn = ( 10n2+9n+6 4n2+8n − s · ∇ 2F · 2n 2−3n 2n2+4n ) − ( 4n2+3 2n2+4n − s · ∇ 2F · n 2−3n 2n2+4n ) 2n−1 4n+8 1 0 0 0 1 0 and Qn = PnPn−1 · · ·P1 . Error analysis shows that if the largest modulu of eigenvalues of Qn goes to zero , then error caused by iterations will be eliminated as the iteration number increases . Figure 2 presents the largest module of eigenvalues of Qn for different values of s · ∇2F . From the experiment we can see that the above condition is satisfied . We then apply the same method to Nesterov ’ s method discussed in ( Su et al. , 2014 ) and conclude that the absolutely stable region of Nesterov ’ s method is [ 0 , 43 ] . According to the above analysis , the absolutely stable region of the new method is four times as large as Nesterov ’ s method , so the new method is more stable , and we can choose larger step sizes to achieve faster convergence . | Review: This paper refines the the truncation error analysis for discretizing the ODE to obtain accelerated optimization method. The truncation results include higher order term. Built upon the analysis, the authors propose a new method which is claimed to be more stable for large step size and converges faster. Numerical evidence on matrix completion problem is provided. | SP:38070da400d31759e1d0d9e30eefb5b7f9f4d640 |
Genetic Soft Updates for Policy Evolution in Deep Reinforcement Learning | 1 INTRODUCTION . The key to a wider and successful application of DRL techniques in real scenarios is the ability to adapt to the surrounding environment by generalizing from training experiences . These solutions have to cope with the uncertainties of the operational environment , requiring a huge number of trials to achieve good performance . Hence , devising robust learning approaches while improving sample efficiency is one of the challenges for wider utilization of DRL . Despite the promising results ( Tai et al. , 2017 ; Zhang et al. , 2017 ; Marchesini et al. , 2019 ) , DRL also suffer from convergence to local optima , which is mainly caused by the lack of diverse exploration when operating in high-dimensional spaces . Several studies address the exploration problem ( e.g. , curiosity-driven exploration ( Pathak et al. , 2017 ) , count-based exploration ( Ostrovski et al. , 2017 ) ) , but they typically rely on sensitive task-specific hyper-parameters . The sensitivity to such hyper-parameters is another significant issue in DRL as it typically results in brittle convergence properties and poor performance in practical tasks ( Haarnoja et al. , 2018 ) . Evolutionary Algorithms ( Fogel , 2006 ) have been recently employed as a promising gradient-free optimization alternative to DRL . The redundancy of these population-based approaches has the advantages of enabling diverse exploration and improve robustness , leading to a more stable convergence . In particular , Genetic Algorithms ( GA ) ( Montana & Davis , 1989 ) show competitive results compared to gradient-based DRL ( Such et al. , 2017 ) and are characterized by low computational cost . These gradient-free approaches , however , struggle to solve high-dimensional problems having poor generalization skills and are significantly less sample efficient than gradient-based methods . An emergent research direction proposes the combination of gradient-free and gradient-based methods following the physical world , where evolution and learning cooperate to assimilate the best of both solutions ( Simpson , 1953 ) . The first mixed approach , Evolutionary Reinforcement Learning ( ERL ) ( Khadka & Tumer , 2018 ) , relies on actor-critic architecture to inject information in an evolutionary population while both the gradient-free and gradient-based training phases proceed in parallel . Similarly , Proximal Distilled ERL ( PDERL ) ( Bodnar , 2020 ) extends ERL with different evolutionary methods . CEM-RL ( Pourchot , 2019 ) brings this research direction into the family of distributed approaches , combining a portfolio of TD3 ( Fujimoto et al. , 2018 ) learners with the Cross-Entropy Method ( Yan Duan , 2016 ) . ∗Contact author : enrico.marchesini @ univr.it These mixed approaches however also present several limitations , which we address through our work : ( i ) the parallel training phases of the DRL and EA components ( Khadka & Tumer , 2018 ; Bodnar , 2020 ) , or the multitude of learners ( Pourchot , 2019 ) result in significant overhead ( detailed in Section 4 ) . ( ii ) The actor-critic formalization of previous mixed approaches , allows them to be easily evaluated in continuous locomotion benchmarks ( Brockman et al. , 2016 ; Todorov et al. , 2012 ) . However , this also hinders their combination with value-based DRL ( Marchesini & Farinelli , 2020a ) . This is important as recent work ( Matheron et al. , 2019 ) shows the limitation of actor-critic in deterministic tasks , that in contrast can be effectively addressed with value-based DRL . In particular , Section 4 shows that a value-based implementation of Khadka & Tumer ( 2018 ) does not converge in our discrete robotic task . ( iii ) The combination strategy does not ensure better performance compared to the DRL agent as it does not prevent detrimental behaviours ( e.g. , drop in performance ) . This is shown in the poor performance of a value-based implementation of ERL and PDERL ( Section 4 ) . We propose a novel mixed framework , called Soft Updates for Policy Evolution ( Supe-RL ) , that enables us to combine the characteristics of GAs with any DRL algorithm , addressing the limitations of previous approaches . Supe-RL ( Figure 1 ) benefits from the high sampling efficiency of gradientbased DRL while incorporating gradient-free GA to generate diverse experiences and find better policies . Summarizing , Supe-RL based algorithms perform a periodical genetic evaluation applying GAs to the agent network . A selection operator uses a fitness metric to evaluate the population , choosing the best performing genome ( i.e. , the weights of the network ) that is used to update the weights of the DRL agent . In contrast to previous work , our genetic evaluation is only performed periodically , drastically reducing the overhead . Furthermore , our soft update ( Section 3 ) allows a direct integration of GAs to any DRL algorithm as it is similar to perform a gradient step towards a better policy , avoiding detrimental behaviours . As detailed in Section 3.1 , this allows using valuebased DRL , exploiting the variety of optimizations developed for the well-known DQN ( van Hasselt et al. , 2016 ; Schaul et al. , 2016 ; Wang et al. , 2016 ; Fortunato et al. , 2017 ; Bellemare et al. , 2017 ) . Crucially , our genetic component influences the DRL agent policy only if one of its mutated version performs better in a subset of evaluation episodes . Hence , as detailed in Section 3 , with a sufficient number of episodes we obtain a good estimation of the overall performance of the population . Our evaluation focuses on mapless navigation , a well-known problem in robotics and recent DRL ( Zhang et al. , 2017 ; Wahid et al. , 2019 ; Marchesini & Farinelli , 2020b ) . In particular , we consider two tasks developed with Unity ( Juliani et al. , 2018 ) : ( i ) a discrete action space indoor scenario with obstacles for a mobile robot and ( ii ) a continuous task for aquatic drones , with dynamic waves and physically realistic water . Besides considering standard metrics related to performance ( success rate and reward ) , we also consider safety properties that are particularly important in these domains ( e.g. , the agent does not collide with obstacles ) . In more detail , we employ formal verification ( ( Corsi et al. , 2020 ) ) to compute the percentage of input cases that cause violations of these properties . This is important to confirm our claim that Supe-RL based approaches correctly bias the exploration process in the direction of more robust policy regions with higher returns . Results show that Supe-RL algorithms improve performance ( i.e. , training time , success rate , average reward ) , stability , and safety over value-based and policy-gradient DRL ( Rainbow ( Hessel et al. , 2018 ) , PPO ( Schulman et al. , 2017 ) ) and ERL . Finally , we performed additional comparisons of Supe-RL with : ( i ) PDERL ( Bodnar , 2020 ) to evidence the poor performance of previous mixed approaches when combined with value-based DRL ; ( ii ) CEM-RL ( Pourchot , 2019 ) in the aquatic scenario , to show the differences with a multi learner approach ; ( iii ) ERL in standard continuous benchmarks ( i.e. , MuJoCo locomotion ( Brockman et al. , 2016 ; Todorov et al. , 2012 ) ) , where results confirm the superior performance of Supe-RL . 2 BACKGROUND AND RELATED WORK . We formalize robotic navigation as a RL problem , defined over a Markov Decision Process , as described in recent DRL literature ( Tai et al. , 2017 ; Zhang et al. , 2017 ; Wahid et al. , 2019 ) . DRL for robotic navigation focus exclusively on continuous action algorithms such as actor-critic DDPG ( Lillicrap et al. , 2015 ) , TD3 ( Fujimoto et al. , 2018 ) and PPO ( Schulman et al. , 2017 ) . Such methods have been adopted following the idea that value-based DQN ( Mnih et al. , 2013 ) can not deal with high-dimensional action spaces . However , discrete value-based solutions typically result in shorter training time being more sample efficient , and show better performance even in continuous settings . In detail , Marchesini & Farinelli ( 2020b ) shows that discrete DRL is a more efficient alternative to continuous DRL in robotic navigation . Moreover , Tavakoli et al . ( 2018 ) proposes an adaptation of Dueling DQN ( Wang et al. , 2016 ) with Double DQN ( van Hasselt et al. , 2016 ) that achieves competitive results in locomotion benchmarks ( Brockman et al. , 2016 ; Todorov et al. , 2012 ) . More recently , de Wiele et al . ( 2020 ) designed a DQN-based algorithm to handle enormous discrete and continuous action spaces . These researches further motivate our contribution in the design of a mixed approach that also works with value-based DRL . Evolutionary Algorithms EA are an alternative black-box optimization characterized by three main operators ( Fogel , 2006 ) : generation , alteration , and selection . In detail , Montana & Davis ( 1989 ) evolves a population of N individuals , each one represented by the network vector parameter θ ( genome ) . Each θi ( i ∈ [ 0 , .. , N − 1 ] ) is evaluated to produce a fitness F ( θi ) , used by the selection operator to choose the best genome . For the EA component of Supe-RL , we consider a mutationbased GA that shown competitive performance over gradient-based DRL ( Such et al. , 2017 ) . Combining EA and DRL Following the trend of using EA as an alternative for DRL ( Salimans et al. , 2017 ) , an emergent research field focuses on combining gradient-free and gradient-based solutions . In particular , ERL ( Khadka & Tumer , 2018 ) considers an actor-critic DDPG agent ( Lillicrap et al. , 2015 ) and a concurrent EA training that generates a population of individuals , which are mutated and selected based on their fitness . The DRL agent is trained in parallel from the samples generated by both the training phases and it is periodically injected in the running population which is used to collect the training performance . The mutation function of ERL ensures that , in a certain number of episodes , the gradient-based policy outperforms its evolutionary siblings , introducing the gradient-based benefits into the population . Hence , biasing the selection process of the next generation and its performance . In their experiments , the authors highlight an efficient transfer of information between the two families of algorithms , outperforming DDPG in well-known locomotion benchmarks ( Brockman et al. , 2016 ; Todorov et al. , 2012 ) . However , both the introduction of all the experiences in the buffer and forcing the DRL agent to perform better than the EA population , bias the training and can cause detrimental behaviours . Inspired by ERL , several combinations have been proposed ( Bodnar , 2020 ; Colas et al. , 2018 ; Pourchot , 2019 ; Khadka et al. , 2019 ) . While GEP-PG ( Bodnar , 2020 ) can be considered as a simplified version of a mixed approach , where a curiositydriven approach is used to fill the buffer of the agent , Proximal Distilled ERL ( PDERL ) ( Bodnar , 2020 ) addresses the EA component of ERL , introducing novel operators to compensate for the simplicity of the genetic representation ( as investigated by Lehman et al . ( 2018 ) , where authors address destructive behaviors of biologically-inspired variation operators applied to neural networks , which causes catastrophic forgetting ) . However , as detailed in Section 3.1 , our genetic evaluation is used to soft update the DRL agent only in the case of performance improvement , hence it does not show such catastrophic forgetting . We also mention CERL ( Khadka et al. , 2019 ) and CEM-RL ( Pourchot , 2019 ) as they are extensions of ERL for distributed training ( which we do not consider here ) with multiple active learners , which leads to non-negligible overhead ( nonetheless , Section 4.2 reports an additional experiment in our continuous task with CEM-RL , to provide a more heterogeneous overview of the superior performance of Supe-RL ) . These works share a common baseline as they all rely on actor-critic DRL and are built on the insights of ERL , which is the most closely related to Supe-RL . Hence , we choose ERL for complete performance comparison . Section 4.2 also shows a comparison with PDERL , to further highlights the poor performance of previous approaches when combined with value-based DRL . Finally , we use formal verification to support our claims on the beneficial effects of our genetic component into the policy . We report in Appendix A a brief description of the considered methodology . | Aiming at exploiting the benefits of population based policy optimization and policy gradient, this paper proposes a novel framework that combines these two techniques. The authors claim that the previously proposed frameworks that combines evolutionary approaches and policy gradient approaches uses actor critic approaches in the policy gradient part, and that it is important to be able to incorporate value-based methods instead of actor critic approaches since the value based approach sometimes outperforms the actor critic approaches. The proposed framework is designed to be capable of combining evolutionary policy search approaches with ANY deep reinforcement learning algorithms. The framework is simple and relatively easy to combine with different deep reinforcement learning algorithms. However, in two instantiation of the proposed framework presented in this paper, the authors tune the details for each of these two. For one cases the authors obviously exploiting the structure of the combined reinforcement learning algorithm (existence of the target network and update the target network only), which is not possible in general. | SP:05977d1cb6550b36bb633626b45f69652bca2ac5 |
Genetic Soft Updates for Policy Evolution in Deep Reinforcement Learning | 1 INTRODUCTION . The key to a wider and successful application of DRL techniques in real scenarios is the ability to adapt to the surrounding environment by generalizing from training experiences . These solutions have to cope with the uncertainties of the operational environment , requiring a huge number of trials to achieve good performance . Hence , devising robust learning approaches while improving sample efficiency is one of the challenges for wider utilization of DRL . Despite the promising results ( Tai et al. , 2017 ; Zhang et al. , 2017 ; Marchesini et al. , 2019 ) , DRL also suffer from convergence to local optima , which is mainly caused by the lack of diverse exploration when operating in high-dimensional spaces . Several studies address the exploration problem ( e.g. , curiosity-driven exploration ( Pathak et al. , 2017 ) , count-based exploration ( Ostrovski et al. , 2017 ) ) , but they typically rely on sensitive task-specific hyper-parameters . The sensitivity to such hyper-parameters is another significant issue in DRL as it typically results in brittle convergence properties and poor performance in practical tasks ( Haarnoja et al. , 2018 ) . Evolutionary Algorithms ( Fogel , 2006 ) have been recently employed as a promising gradient-free optimization alternative to DRL . The redundancy of these population-based approaches has the advantages of enabling diverse exploration and improve robustness , leading to a more stable convergence . In particular , Genetic Algorithms ( GA ) ( Montana & Davis , 1989 ) show competitive results compared to gradient-based DRL ( Such et al. , 2017 ) and are characterized by low computational cost . These gradient-free approaches , however , struggle to solve high-dimensional problems having poor generalization skills and are significantly less sample efficient than gradient-based methods . An emergent research direction proposes the combination of gradient-free and gradient-based methods following the physical world , where evolution and learning cooperate to assimilate the best of both solutions ( Simpson , 1953 ) . The first mixed approach , Evolutionary Reinforcement Learning ( ERL ) ( Khadka & Tumer , 2018 ) , relies on actor-critic architecture to inject information in an evolutionary population while both the gradient-free and gradient-based training phases proceed in parallel . Similarly , Proximal Distilled ERL ( PDERL ) ( Bodnar , 2020 ) extends ERL with different evolutionary methods . CEM-RL ( Pourchot , 2019 ) brings this research direction into the family of distributed approaches , combining a portfolio of TD3 ( Fujimoto et al. , 2018 ) learners with the Cross-Entropy Method ( Yan Duan , 2016 ) . ∗Contact author : enrico.marchesini @ univr.it These mixed approaches however also present several limitations , which we address through our work : ( i ) the parallel training phases of the DRL and EA components ( Khadka & Tumer , 2018 ; Bodnar , 2020 ) , or the multitude of learners ( Pourchot , 2019 ) result in significant overhead ( detailed in Section 4 ) . ( ii ) The actor-critic formalization of previous mixed approaches , allows them to be easily evaluated in continuous locomotion benchmarks ( Brockman et al. , 2016 ; Todorov et al. , 2012 ) . However , this also hinders their combination with value-based DRL ( Marchesini & Farinelli , 2020a ) . This is important as recent work ( Matheron et al. , 2019 ) shows the limitation of actor-critic in deterministic tasks , that in contrast can be effectively addressed with value-based DRL . In particular , Section 4 shows that a value-based implementation of Khadka & Tumer ( 2018 ) does not converge in our discrete robotic task . ( iii ) The combination strategy does not ensure better performance compared to the DRL agent as it does not prevent detrimental behaviours ( e.g. , drop in performance ) . This is shown in the poor performance of a value-based implementation of ERL and PDERL ( Section 4 ) . We propose a novel mixed framework , called Soft Updates for Policy Evolution ( Supe-RL ) , that enables us to combine the characteristics of GAs with any DRL algorithm , addressing the limitations of previous approaches . Supe-RL ( Figure 1 ) benefits from the high sampling efficiency of gradientbased DRL while incorporating gradient-free GA to generate diverse experiences and find better policies . Summarizing , Supe-RL based algorithms perform a periodical genetic evaluation applying GAs to the agent network . A selection operator uses a fitness metric to evaluate the population , choosing the best performing genome ( i.e. , the weights of the network ) that is used to update the weights of the DRL agent . In contrast to previous work , our genetic evaluation is only performed periodically , drastically reducing the overhead . Furthermore , our soft update ( Section 3 ) allows a direct integration of GAs to any DRL algorithm as it is similar to perform a gradient step towards a better policy , avoiding detrimental behaviours . As detailed in Section 3.1 , this allows using valuebased DRL , exploiting the variety of optimizations developed for the well-known DQN ( van Hasselt et al. , 2016 ; Schaul et al. , 2016 ; Wang et al. , 2016 ; Fortunato et al. , 2017 ; Bellemare et al. , 2017 ) . Crucially , our genetic component influences the DRL agent policy only if one of its mutated version performs better in a subset of evaluation episodes . Hence , as detailed in Section 3 , with a sufficient number of episodes we obtain a good estimation of the overall performance of the population . Our evaluation focuses on mapless navigation , a well-known problem in robotics and recent DRL ( Zhang et al. , 2017 ; Wahid et al. , 2019 ; Marchesini & Farinelli , 2020b ) . In particular , we consider two tasks developed with Unity ( Juliani et al. , 2018 ) : ( i ) a discrete action space indoor scenario with obstacles for a mobile robot and ( ii ) a continuous task for aquatic drones , with dynamic waves and physically realistic water . Besides considering standard metrics related to performance ( success rate and reward ) , we also consider safety properties that are particularly important in these domains ( e.g. , the agent does not collide with obstacles ) . In more detail , we employ formal verification ( ( Corsi et al. , 2020 ) ) to compute the percentage of input cases that cause violations of these properties . This is important to confirm our claim that Supe-RL based approaches correctly bias the exploration process in the direction of more robust policy regions with higher returns . Results show that Supe-RL algorithms improve performance ( i.e. , training time , success rate , average reward ) , stability , and safety over value-based and policy-gradient DRL ( Rainbow ( Hessel et al. , 2018 ) , PPO ( Schulman et al. , 2017 ) ) and ERL . Finally , we performed additional comparisons of Supe-RL with : ( i ) PDERL ( Bodnar , 2020 ) to evidence the poor performance of previous mixed approaches when combined with value-based DRL ; ( ii ) CEM-RL ( Pourchot , 2019 ) in the aquatic scenario , to show the differences with a multi learner approach ; ( iii ) ERL in standard continuous benchmarks ( i.e. , MuJoCo locomotion ( Brockman et al. , 2016 ; Todorov et al. , 2012 ) ) , where results confirm the superior performance of Supe-RL . 2 BACKGROUND AND RELATED WORK . We formalize robotic navigation as a RL problem , defined over a Markov Decision Process , as described in recent DRL literature ( Tai et al. , 2017 ; Zhang et al. , 2017 ; Wahid et al. , 2019 ) . DRL for robotic navigation focus exclusively on continuous action algorithms such as actor-critic DDPG ( Lillicrap et al. , 2015 ) , TD3 ( Fujimoto et al. , 2018 ) and PPO ( Schulman et al. , 2017 ) . Such methods have been adopted following the idea that value-based DQN ( Mnih et al. , 2013 ) can not deal with high-dimensional action spaces . However , discrete value-based solutions typically result in shorter training time being more sample efficient , and show better performance even in continuous settings . In detail , Marchesini & Farinelli ( 2020b ) shows that discrete DRL is a more efficient alternative to continuous DRL in robotic navigation . Moreover , Tavakoli et al . ( 2018 ) proposes an adaptation of Dueling DQN ( Wang et al. , 2016 ) with Double DQN ( van Hasselt et al. , 2016 ) that achieves competitive results in locomotion benchmarks ( Brockman et al. , 2016 ; Todorov et al. , 2012 ) . More recently , de Wiele et al . ( 2020 ) designed a DQN-based algorithm to handle enormous discrete and continuous action spaces . These researches further motivate our contribution in the design of a mixed approach that also works with value-based DRL . Evolutionary Algorithms EA are an alternative black-box optimization characterized by three main operators ( Fogel , 2006 ) : generation , alteration , and selection . In detail , Montana & Davis ( 1989 ) evolves a population of N individuals , each one represented by the network vector parameter θ ( genome ) . Each θi ( i ∈ [ 0 , .. , N − 1 ] ) is evaluated to produce a fitness F ( θi ) , used by the selection operator to choose the best genome . For the EA component of Supe-RL , we consider a mutationbased GA that shown competitive performance over gradient-based DRL ( Such et al. , 2017 ) . Combining EA and DRL Following the trend of using EA as an alternative for DRL ( Salimans et al. , 2017 ) , an emergent research field focuses on combining gradient-free and gradient-based solutions . In particular , ERL ( Khadka & Tumer , 2018 ) considers an actor-critic DDPG agent ( Lillicrap et al. , 2015 ) and a concurrent EA training that generates a population of individuals , which are mutated and selected based on their fitness . The DRL agent is trained in parallel from the samples generated by both the training phases and it is periodically injected in the running population which is used to collect the training performance . The mutation function of ERL ensures that , in a certain number of episodes , the gradient-based policy outperforms its evolutionary siblings , introducing the gradient-based benefits into the population . Hence , biasing the selection process of the next generation and its performance . In their experiments , the authors highlight an efficient transfer of information between the two families of algorithms , outperforming DDPG in well-known locomotion benchmarks ( Brockman et al. , 2016 ; Todorov et al. , 2012 ) . However , both the introduction of all the experiences in the buffer and forcing the DRL agent to perform better than the EA population , bias the training and can cause detrimental behaviours . Inspired by ERL , several combinations have been proposed ( Bodnar , 2020 ; Colas et al. , 2018 ; Pourchot , 2019 ; Khadka et al. , 2019 ) . While GEP-PG ( Bodnar , 2020 ) can be considered as a simplified version of a mixed approach , where a curiositydriven approach is used to fill the buffer of the agent , Proximal Distilled ERL ( PDERL ) ( Bodnar , 2020 ) addresses the EA component of ERL , introducing novel operators to compensate for the simplicity of the genetic representation ( as investigated by Lehman et al . ( 2018 ) , where authors address destructive behaviors of biologically-inspired variation operators applied to neural networks , which causes catastrophic forgetting ) . However , as detailed in Section 3.1 , our genetic evaluation is used to soft update the DRL agent only in the case of performance improvement , hence it does not show such catastrophic forgetting . We also mention CERL ( Khadka et al. , 2019 ) and CEM-RL ( Pourchot , 2019 ) as they are extensions of ERL for distributed training ( which we do not consider here ) with multiple active learners , which leads to non-negligible overhead ( nonetheless , Section 4.2 reports an additional experiment in our continuous task with CEM-RL , to provide a more heterogeneous overview of the superior performance of Supe-RL ) . These works share a common baseline as they all rely on actor-critic DRL and are built on the insights of ERL , which is the most closely related to Supe-RL . Hence , we choose ERL for complete performance comparison . Section 4.2 also shows a comparison with PDERL , to further highlights the poor performance of previous approaches when combined with value-based DRL . Finally , we use formal verification to support our claims on the beneficial effects of our genetic component into the policy . We report in Appendix A a brief description of the considered methodology . | The paper introduces Supe-RL that intermingles off-policy reinforcement learning with periodic beam search operations. The method makes a greedy selection between the rl-solution that it had and the best produced by the beam search using Polyak update to update the incumbent rl-solution if the one suggested by beam search is better. Experiments in robotics simulation benchmarks show that Supe-RL improves over prior hybrid methods. | SP:05977d1cb6550b36bb633626b45f69652bca2ac5 |
Transformer protein language models are unsupervised structure learners | 1 INTRODUCTION . Unsupervised modeling of protein contacts has an important role in computational protein design ( Russ et al. , 2020 ; Tian et al. , 2018 ; Blazejewski et al. , 2019 ) and is a central element of all current state-of-the-art structure prediction methods ( Wang et al. , 2017 ; Senior et al. , 2020 ; Yang et al. , 2019 ) . The standard bioinformatics pipeline for unsupervised contact prediction includes multiple components with specialized tools and databases that have been developed and optimized over decades . In this work we propose replacing the current multi-stage pipeline with a single forward pass of a pre-trained end-to-end protein language model . In the last year , protein language modeling with an unsupervised training objective has been investigated by multiple groups ( Rives et al. , 2019 ; Alley et al. , 2019 ; Heinzinger et al. , 2019 ; Rao et al. , 2019 ; Madani et al. , 2020 ) . The longstanding practice in bioinformatics has been to fit linear models on focused sets of evolutionarily related and aligned sequences ; by contrast , protein language modeling trains nonlinear deep neural networks on large databases of evolutionarily diverse and unaligned sequences . High capacity protein language models have been shown to learn underlying intrinsic properties of proteins such as structure and function from sequence data ( Rives et al. , 2019 ) . A line of work in this emerging field proposes the Transformer for protein language modeling ( Rives et al. , 2019 ; Rao et al. , 2019 ) . Originally developed in the NLP community to represent long range context , the main innovation of the Transformer model is its use of self-attention ( Vaswani et al. , 2017 ) . Self-attention has particular relevance for the modeling of protein sequences . Unlike convolutional or recurrent models , the Transformer constructs a pairwise interaction map between all positions in the sequence . In principle this mechanism has an ideal form to model protein contacts . In theory , end-to-end learning with a language model has advantages over the bioinformatics pipeline : ( i ) it replaces the expensive query , alignment , and training steps with a single forward ∗Work performed during an internship at Facebook . 1Weights for all ESM-1 and ESM-1b models , as well as regressions trained on these models can be found at https : //github.com/facebookresearch/esm . pass , greatly accelerating feature extraction ; and ( ii ) it shares parameters for all protein families , enabling generalization by capturing commonality across millions of evolutionarily diverse and unrelated sequences . We demonstrate that Transformer protein language models learn contacts in the self-attention maps with state-of-the-art performance . We compare ESM-1b ( Rives et al. , 2020 ) , a large-scale ( 650M parameters ) Transformer model trained on UniRef50 ( Suzek et al. , 2007 ) to the Gremlin ( Kamisetty et al. , 2013 ) pipeline which implements a log linear model trained with pseudolikelihood ( Balakrishnan et al. , 2011 ; Ekeberg et al. , 2013 ) . Contacts can be extracted from the attention maps of the Transformer model by a sparse linear combination of attention heads identified by logistic regression . ESM-1b model contacts have higher precision than Gremlin contacts . When ESM and Gremlin are compared with access to the same set of sequences the precision gain from the protein language model is significant ; the advantage holds on average even when Gremlin is given access to an optimized set of multiple sequence alignments incorporating metagenomics data . We find a linear relationship between language modeling perplexity and contact precision . We also find evidence for the value of parameter sharing : the ESM-1b model significantly outperforms Gremlin on proteins with low-depth MSAs . Finally we explore the Transformer language model ’ s ability to generate sequences and show that generated sequences preserve contact information . 2 BACKGROUND . Multiple Sequence Alignments ( MSAs ) A multiple sequence alignment consists of a set of evolutionarily related protein sequences . Since real protein sequences are likely to have insertions , deletions , and substitutions , the sequences are aligned by minimizing a Levenshtein distance-like metric over all the sequences . In practice heuristic alignment schemes are used . Tools like Jackhmmer and HHblits can increase the number and diversity of sequences returned by iteratively performing the search and alignment steps ( Johnson et al. , 2010 ; Remmert et al. , 2012 ) . Metrics For a protein of length L , we evaluate the precision of the top L , L/2 , and L/5 contacts for short range ( |i − j| ∈ [ 6 , 12 ) ) , medium range ( |i − j| ∈ [ 12 , 24 ) ) , and long range ( |i = j| ∈ [ 24 , ∞ ) ) contacts . We also separately evaluate local contacts ( |i−j| ∈ [ 3 , 6 ) ) for secondary structure prediction in Appendix A.9 . In general , all contacts provide information about protein structure and important interactions , with shorter-range contacts being useful for secondary and local structure , while longer range contacts are useful for determining global structure ( Taylor et al. , 2014 ) . 3 RELATED WORK . There is a long history of protein contact prediction ( Adhikari & Cheng , 2016 ) both from MSAs , and more recently , with protein language models . Supervised contact prediction Recently , supervised methods using deep learning have resulted in breakthrough results in supervised contact prediction ( Wang et al. , 2017 ; Jones & Kandathil , 2018 ; Yang et al. , 2019 ; Senior et al. , 2020 ; Adhikari & Elofsson , 2020 ) . State-of-the art methods use deep residual networks trained with supervision from many protein structures . Inputs are typically covariance statistics ( Jones & Kandathil , 2018 ; Adhikari & Elofsson , 2020 ) , or inferred coevolutionary parameters ( Wang et al. , 2017 ; Liu et al. , 2018 ; Senior et al. , 2020 ; Yang et al. , 2019 ) . Other recent work with deep learning uses sequences or evolutionary features as inputs ( AlQuraishi , 2018 ; Ingraham et al. , 2019 ) . Xu et al . ( 2020 ) demonstrates the incorporation of coevolutionary features is critical to performance of current state-of-the-art methods . Unsupervised contact prediction In contrast to supervised methods , unsupervised contact prediction models are trained on sequences without information from protein structures . In principle this allows them to take advantage of large sequence databases that include information from many sequences where no structural knowledge is available . The main approach has been to learn evolutionary constraints among a set of similar sequences by fitting a Markov Random Field ( Potts model ) to the underlying MSA , a technique known as Direct Coupling Analysis ( DCA ) . This was proposed by Lapedes et al . ( 1999 ) and reintroduced by Thomas et al . ( 2008 ) and Weigt et al . ( 2009 ) . Various methods have been developed to fit the underlying Markov Random Field , including meanfield DCA ( mfDCA ) ( Morcos et al. , 2011 ) , sparse inverse covariance ( PSICOV ) ( Jones et al. , 2011 ) and pseudolikelihood maximization ( Balakrishnan et al. , 2011 ; Ekeberg et al. , 2013 ; Seemayer et al. , 2014 ) . Pseudolikelihood maximization is generally considered state-of-the-art for unsupervised contact prediction and the Gremlin ( Balakrishnan et al. , 2011 ) implementation is used as the baseline throughout . We also provide mfDCA and PSICOV baselines . Recently deep learning methods have also been applied to fitting MSAs , and Riesselman et al . ( 2018 ) found evidence that factors learned by a VAE model may correlate with protein structure . Structure prediction from contacts While we do not perform structure prediction in this work , many methods have been proposed to extend contact prediction to structure prediction . For example , EVFold ( Marks et al. , 2011 ) and DCAFold ( Sulkowska et al. , 2012 ) predict co-evolving couplings using a Potts Model and then generate 3D conformations by directly folding an initial conformation with simulated annealing , using the predicted residue-residue contacts as constraints . Similarly , FragFold ( Kosciolek & Jones , 2014 ) and Rosetta ( Ovchinnikov et al. , 2016 ) incorporate constraints from a Potts Model into a fragment assembly based pipeline . Senior et al . ( 2019 ) , use features from a Potts model fit with pseudolikelihood maximization to predict pairwise distances with a deep residual network and optimize the final structure using Rosetta . All of these works build directly upon the unsupervised contact prediction pipeline . Contact prediction from protein language models Since the introduction of large scale language models for natural language processing ( Vaswani et al. , 2017 ; Devlin et al. , 2019 ) , there has been considerable interest in developing similar models for proteins ( Alley et al. , 2019 ; Rives et al. , 2019 ; Heinzinger et al. , 2019 ; Rao et al. , 2019 ; Elnaggar et al. , 2020 ; Lu et al. , 2020 ; Madani et al. , 2020 ; Shen et al. , 2021 ) . Rives et al . ( 2019 ) were the first to study protein Transformer language models , demonstrating that information about residue-residue contacts could be recovered from the learned representations by linear projections supervised with protein structures . Recently Vig et al . ( 2020 ) performed an extensive analysis of Transformer attention , identifying correspondences to biologically relevant features , and also found that different layers of the model are responsible for learning different features . In particular Vig et al . ( 2020 ) discovered a correlation between selfattention maps and contact patterns , suggesting they could be used for contact prediction . Prior work benchmarking contact prediction with protein language models has focused on the supervised problem . Bepler & Berger ( 2019 ) were the first to fine-tune an LSTM pretrained on protein sequences to fit contacts . Rao et al . ( 2019 ) and Rives et al . ( 2020 ) perform benchmarking of multiple protein language models using a deep residual network fit with supervised learning on top of pretrained language modeling features . In contrast to previous work on protein language models , we find that a state-of-the-art unsupervised contact predictor can be directly extracted from the Transformer self-attention maps . We perform a thorough analysis of the contact predictor , showing relationships between performance and MSA depth as well as language modeling perplexity . We also provide methods for improving performance using sequences from an MSA and for sampling sequences in a manner that preserves contacts . 4 MODELS . We compare Transformer models trained on large sequence databases to Potts Models trained on individual MSAs . While Transformers and Potts Models emerged in separate research communities , the two models share core similarities ( Wang & Cho , 2019 ) which we exploit here . Our main result is that just as Gremlin directly represents contacts via its pairwise component ( the weights ) , the Transformer also directly represents contacts via its pairwise component ( the self-attention ) . 4.1 OBJECTIVES . For a set of training sequences , X , Gremlin optimizes the following pseudolikelihood loss , where a single position is masked and predicted from its context . Inputs are aligned , so all have length L : LPLL ( X ; θ ) = E x∼X L∑ i=1 log p ( xi|xj 6=i ; θ ) ( 1 ) The masked language modeling ( MLM ) loss used by the Transformer models can be seen as a generalization of the Potts Model objective when written as follows : LMLM ( X ; θ ) = E x∼X E mask ∑ i∈mask log p ( xi|xj 6∈mask ; θ ) ( 2 ) In contrast to Gremlin , the MLM objective applied by protein language modeling is trained on unaligned sequences . The key distinction of MLM is to mask and predict multiple positions concurrently , instead of masking and predicting one at a time . This enables the model to scale beyond individual MSAs to massive sequence datasets . In practice , the expectation under the masking pattern is computed stochastically using a single sample at each epoch . | In this paper, the authors show that transformer protein language models can learn protein contacts from the unsupervised language modelling objectives. They also show that the residue-residue contacts can be extracted by sparse logistic regression to learn coefficients on the attention heads. One of the advantages of using transformers models is that they do not require an alignment step nor the use of specialized bioinformatics tools (which are computationally expensive). When compared to a method based on multiple sequence alignment, the transformers models can obtain a similar or higher precision. | SP:a826495e7d92c3cd68a71fc4961c296fec0307ed |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.